diff --git a/libraries/ZVulkan/src/glslang/OGLCompilersDLL/InitializeDll.cpp b/libraries/ZVulkan/src/glslang/OGLCompilersDLL/InitializeDll.cpp deleted file mode 100644 index abea9108b..000000000 --- a/libraries/ZVulkan/src/glslang/OGLCompilersDLL/InitializeDll.cpp +++ /dev/null @@ -1,165 +0,0 @@ -// -// Copyright (C) 2002-2005 3Dlabs Inc. Ltd. -// 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. -// - -#define SH_EXPORTING - -#include - -#include "InitializeDll.h" -#include "../glslang/Include/InitializeGlobals.h" -#include "../glslang/Public/ShaderLang.h" -#include "../glslang/Include/PoolAlloc.h" - -namespace glslang { - -OS_TLSIndex ThreadInitializeIndex = OS_INVALID_TLS_INDEX; - -// Per-process initialization. -// Needs to be called at least once before parsing, etc. is done. -// Will also do thread initialization for the calling thread; other -// threads will need to do that explicitly. -bool InitProcess() -{ - glslang::GetGlobalLock(); - - if (ThreadInitializeIndex != OS_INVALID_TLS_INDEX) { - // - // Function is re-entrant. - // - - glslang::ReleaseGlobalLock(); - return true; - } - - ThreadInitializeIndex = OS_AllocTLSIndex(); - - if (ThreadInitializeIndex == OS_INVALID_TLS_INDEX) { - assert(0 && "InitProcess(): Failed to allocate TLS area for init flag"); - - glslang::ReleaseGlobalLock(); - return false; - } - - if (! InitializePoolIndex()) { - assert(0 && "InitProcess(): Failed to initialize global pool"); - - glslang::ReleaseGlobalLock(); - return false; - } - - if (! InitThread()) { - assert(0 && "InitProcess(): Failed to initialize thread"); - - glslang::ReleaseGlobalLock(); - return false; - } - - glslang::ReleaseGlobalLock(); - return true; -} - -// Per-thread scoped initialization. -// Must be called at least once by each new thread sharing the -// symbol tables, etc., needed to parse. -bool InitThread() -{ - // - // This function is re-entrant - // - if (ThreadInitializeIndex == OS_INVALID_TLS_INDEX) { - assert(0 && "InitThread(): Process hasn't been initalised."); - return false; - } - - if (OS_GetTLSValue(ThreadInitializeIndex) != 0) - return true; - - if (! OS_SetTLSValue(ThreadInitializeIndex, (void *)1)) { - assert(0 && "InitThread(): Unable to set init flag."); - return false; - } - - glslang::SetThreadPoolAllocator(nullptr); - - return true; -} - -// Not necessary to call this: InitThread() is reentrant, and the need -// to do per thread tear down has been removed. -// -// This is kept, with memory management removed, to satisfy any exiting -// calls to it that rely on it. -bool DetachThread() -{ - bool success = true; - - if (ThreadInitializeIndex == OS_INVALID_TLS_INDEX) - return true; - - // - // Function is re-entrant and this thread may not have been initialized. - // - if (OS_GetTLSValue(ThreadInitializeIndex) != 0) { - if (!OS_SetTLSValue(ThreadInitializeIndex, (void *)0)) { - assert(0 && "DetachThread(): Unable to clear init flag."); - success = false; - } - } - - return success; -} - -// Not necessary to call this: InitProcess() is reentrant. -// -// This is kept, with memory management removed, to satisfy any exiting -// calls to it that rely on it. -// -// Users of glslang should call shFinalize() or glslang::FinalizeProcess() for -// process-scoped memory tear down. -bool DetachProcess() -{ - bool success = true; - - if (ThreadInitializeIndex == OS_INVALID_TLS_INDEX) - return true; - - success = DetachThread(); - - OS_FreeTLSIndex(ThreadInitializeIndex); - ThreadInitializeIndex = OS_INVALID_TLS_INDEX; - - return success; -} - -} // end namespace glslang diff --git a/libraries/ZVulkan/src/glslang/StandAlone/StandAlone.cpp b/libraries/ZVulkan/src/glslang/StandAlone/StandAlone.cpp index ac967f2b5..d2d9dce66 100644 --- a/libraries/ZVulkan/src/glslang/StandAlone/StandAlone.cpp +++ b/libraries/ZVulkan/src/glslang/StandAlone/StandAlone.cpp @@ -44,12 +44,10 @@ #include "glslang/Public/ResourceLimits.h" #include "Worklist.h" #include "DirStackFileIncluder.h" -#include "./../glslang/Include/ShHandle.h" #include "./../glslang/Public/ShaderLang.h" #include "../glslang/MachineIndependent/localintermediate.h" #include "../SPIRV/GlslangToSpv.h" #include "../SPIRV/GLSL.std.450.h" -#include "../SPIRV/doc.h" #include "../SPIRV/disassemble.h" #include @@ -58,10 +56,12 @@ #include #include #include +#include #include #include #include #include +#include #include "../glslang/OSDependent/osinclude.h" @@ -110,6 +110,8 @@ enum TOptions : uint64_t { EOptionInvertY = (1ull << 30), EOptionDumpBareVersion = (1ull << 31), EOptionCompileOnly = (1ull << 32), + EOptionDisplayErrorColumn = (1ull << 33), + EOptionLinkTimeOptimization = (1ull << 34), }; bool targetHlslFunctionality1 = false; bool SpvToolsDisassembler = false; @@ -842,6 +844,9 @@ void ProcessArguments(std::vector>& workItem } else if (strcmp(argv[1], "vulkan1.3") == 0) { setVulkanSpv(); ClientVersion = glslang::EShTargetVulkan_1_3; + } else if (strcmp(argv[1], "vulkan1.4") == 0) { + setVulkanSpv(); + ClientVersion = glslang::EShTargetVulkan_1_4; } else if (strcmp(argv[1], "opengl") == 0) { setOpenGlSpv(); ClientVersion = glslang::EShTargetOpenGL_450; @@ -898,6 +903,10 @@ void ProcessArguments(std::vector>& workItem Options |= EOptionDumpVersions; } else if (lowerword == "no-link") { Options |= EOptionCompileOnly; + } else if (lowerword == "error-column") { + Options |= EOptionDisplayErrorColumn; + } else if (lowerword == "lto") { + Options |= EOptionLinkTimeOptimization; } else if (lowerword == "help") { usage(); break; @@ -1082,6 +1091,10 @@ void ProcessArguments(std::vector>& workItem if ((Options & EOptionDumpReflection) && !(Options & EOptionLinkProgram)) Error("reflection requires -l for linking"); + // link time optimization makes no sense unless linking + if ((Options & EOptionLinkTimeOptimization) && !(Options & EOptionLinkProgram)) + Error("link time optimization requires -l for linking"); + // -o or -x makes no sense if there is no target binary if (binaryFileName && (Options & EOptionSpv) == 0) Error("no binary generation requested (e.g., -V)"); @@ -1113,6 +1126,10 @@ void ProcessArguments(std::vector>& workItem TargetLanguage = glslang::EShTargetSpv; TargetVersion = glslang::EShTargetSpv_1_6; break; + case glslang::EShTargetVulkan_1_4: + TargetLanguage = glslang::EShTargetSpv; + TargetVersion = glslang::EShTargetSpv_1_6; + break; case glslang::EShTargetOpenGL_450: TargetLanguage = glslang::EShTargetSpv; TargetVersion = glslang::EShTargetSpv_1_0; @@ -1164,6 +1181,10 @@ void SetMessageOptions(EShMessages& messages) messages = (EShMessages)(messages | EShMsgEnhanced); if (AbsolutePath) messages = (EShMessages)(messages | EShMsgAbsolutePath); + if (Options & EOptionDisplayErrorColumn) + messages = (EShMessages)(messages | EShMsgDisplayErrorColumn); + if (Options & EOptionLinkTimeOptimization) + messages = (EShMessages)(messages | EShMsgLinkTimeOptimization); } // @@ -1506,6 +1527,7 @@ void CompileAndLinkShaderUnits(std::vector compUnits) // Dump SPIR-V if (Options & EOptionSpv) { +#ifdef ENABLE_SPIRV CompileOrLinkFailed.fetch_or(CompileFailed); CompileOrLinkFailed.fetch_or(LinkFailed); if (static_cast(CompileOrLinkFailed.load())) @@ -1565,6 +1587,9 @@ void CompileAndLinkShaderUnits(std::vector compUnits) } } } +#else + Error("This configuration of glslang does not have SPIR-V support"); +#endif } CompileOrLinkFailed.fetch_or(CompileFailed); @@ -1664,21 +1689,31 @@ int singleMain() } if (Options & EOptionDumpBareVersion) { - printf("%d:%d.%d.%d%s\n", glslang::GetSpirvGeneratorVersion(), GLSLANG_VERSION_MAJOR, GLSLANG_VERSION_MINOR, + int spirvGeneratorVersion = 0; +#ifdef ENABLE_SPIRV + spirvGeneratorVersion = glslang::GetSpirvGeneratorVersion(); +#endif + printf("%d:%d.%d.%d%s\n", spirvGeneratorVersion, GLSLANG_VERSION_MAJOR, GLSLANG_VERSION_MINOR, GLSLANG_VERSION_PATCH, GLSLANG_VERSION_FLAVOR); if (workList.empty()) return ESuccess; } else if (Options & EOptionDumpVersions) { - printf("Glslang Version: %d:%d.%d.%d%s\n", glslang::GetSpirvGeneratorVersion(), GLSLANG_VERSION_MAJOR, + int spirvGeneratorVersion = 0; +#ifdef ENABLE_SPIRV + spirvGeneratorVersion = glslang::GetSpirvGeneratorVersion(); +#endif + printf("Glslang Version: %d:%d.%d.%d%s\n", spirvGeneratorVersion, GLSLANG_VERSION_MAJOR, GLSLANG_VERSION_MINOR, GLSLANG_VERSION_PATCH, GLSLANG_VERSION_FLAVOR); printf("ESSL Version: %s\n", glslang::GetEsslVersionString()); printf("GLSL Version: %s\n", glslang::GetGlslVersionString()); std::string spirvVersion; +#if ENABLE_SPIRV glslang::GetSpirvVersion(spirvVersion); +#endif printf("SPIR-V Version %s\n", spirvVersion.c_str()); printf("GLSL.std.450 Version %d, Revision %d\n", GLSLstd450Version, GLSLstd450Revision); printf("Khronos Tool ID %d\n", glslang::GetKhronosToolId()); - printf("SPIR-V Generator Version %d\n", glslang::GetSpirvGeneratorVersion()); + printf("SPIR-V Generator Version %d\n", spirvGeneratorVersion); printf("GL_KHR_vulkan_glsl version %d\n", 100); printf("ARB_GL_gl_spirv version %d\n", 100); if (workList.empty()) @@ -2024,6 +2059,7 @@ void usage() " shaders compatible with DirectX\n" " --invert-y | --iy invert position.Y output in vertex shader\n" " --enhanced-msgs print more readable error messages (GLSL only)\n" + " --error-column display the column of the error along the line\n" " --keep-uncalled | --ku don't eliminate uncalled functions\n" " --nan-clamp favor non-NaN operand in min, max, and clamp\n" " --no-storage-format | --nsf use Unknown image format\n" @@ -2117,7 +2153,8 @@ void usage() " initialized with the shader binary code\n" " --no-link Only compile shader; do not link (GLSL-only)\n" " NOTE: this option will set the export linkage\n" - " attribute on all functions\n"); + " attribute on all functions\n" + " --lto perform link time optimization\n"); exit(EFailUsage); } diff --git a/libraries/ZVulkan/src/glslang/StandAlone/Worklist.h b/libraries/ZVulkan/src/glslang/StandAlone/Worklist.h index 91b6f516b..dc726270a 100644 --- a/libraries/ZVulkan/src/glslang/StandAlone/Worklist.h +++ b/libraries/ZVulkan/src/glslang/StandAlone/Worklist.h @@ -35,7 +35,6 @@ #ifndef WORKLIST_H_INCLUDED #define WORKLIST_H_INCLUDED -#include "../glslang/OSDependent/osinclude.h" #include #include #include diff --git a/libraries/ZVulkan/src/glslang/StandAlone/spirv-remap.cpp b/libraries/ZVulkan/src/glslang/StandAlone/spirv-remap.cpp index 1bd4a2d6a..b1f032664 100644 --- a/libraries/ZVulkan/src/glslang/StandAlone/spirv-remap.cpp +++ b/libraries/ZVulkan/src/glslang/StandAlone/spirv-remap.cpp @@ -182,7 +182,7 @@ namespace { std::cout << " " << basename(name) << " [--version | -V]" << std::endl; std::cout << " " << basename(name) << " [--help | -?]" << std::endl; - exit(5); + exit(0); } // grind through each SPIR in turn diff --git a/libraries/ZVulkan/src/glslang/build_info.h b/libraries/ZVulkan/src/glslang/build_info.h index 35940d133..6f73ec077 100644 --- a/libraries/ZVulkan/src/glslang/build_info.h +++ b/libraries/ZVulkan/src/glslang/build_info.h @@ -34,8 +34,8 @@ #ifndef GLSLANG_BUILD_INFO #define GLSLANG_BUILD_INFO -#define GLSLANG_VERSION_MAJOR 14 -#define GLSLANG_VERSION_MINOR 3 +#define GLSLANG_VERSION_MAJOR 15 +#define GLSLANG_VERSION_MINOR 2 #define GLSLANG_VERSION_PATCH 0 #define GLSLANG_VERSION_FLAVOR "" diff --git a/libraries/ZVulkan/src/glslang/glslang/CInterface/glslang_c_interface.cpp b/libraries/ZVulkan/src/glslang/glslang/CInterface/glslang_c_interface.cpp index dcc46614d..7aeb3632d 100644 --- a/libraries/ZVulkan/src/glslang/glslang/CInterface/glslang_c_interface.cpp +++ b/libraries/ZVulkan/src/glslang/glslang/CInterface/glslang_c_interface.cpp @@ -30,15 +30,19 @@ 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 "../Include/glslang_c_interface.h" +#include "glslang/glslang/Include/glslang_c_interface.h" -#include "../../StandAlone/DirStackFileIncluder.h" -#include "../Public/ResourceLimits.h" -#include "../Include/ShHandle.h" +#include "glslang/StandAlone/DirStackFileIncluder.h" +#include "glslang/glslang/Public/ResourceLimits.h" +#include "glslang/glslang/Public/ShaderLang.h" +#include "glslang/glslang/Include/ShHandle.h" -#include "../Include/ResourceLimits.h" -#include "../MachineIndependent/Versions.h" -#include "../MachineIndependent/localintermediate.h" +#include "glslang/glslang/Include/BaseTypes.h" +#include "glslang/glslang/Include/ResourceLimits.h" +#include "glslang/glslang/Include/Types.h" +#include "glslang/glslang/MachineIndependent/iomapper.h" +#include "glslang/glslang/MachineIndependent/Versions.h" +#include "glslang/glslang/MachineIndependent/localintermediate.h" static_assert(int(GLSLANG_STAGE_COUNT) == EShLangCount, ""); static_assert(int(GLSLANG_STAGE_MASK_COUNT) == EShLanguageMaskCount, ""); @@ -54,10 +58,12 @@ 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), ""); +static_assert(sizeof(glslang_version_t) == sizeof(glslang::Version), ""); typedef struct glslang_shader_s { glslang::TShader* shader; std::string preprocessedGLSL; + std::vector baseResourceSetBinding; } glslang_shader_t; typedef struct glslang_program_s { @@ -141,6 +147,11 @@ private: void* context; }; +GLSLANG_EXPORT void glslang_get_version(glslang_version_t* version) +{ + *reinterpret_cast(version) = glslang::GetVersion(); +} + GLSLANG_EXPORT int glslang_initialize_process() { return static_cast(glslang::InitializeProcess()); } GLSLANG_EXPORT void glslang_finalize_process() { glslang::FinalizeProcess(); } @@ -205,7 +216,9 @@ static int c_shader_messages(glslang_messages_t messages) 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); + CONVERT_MSG(GLSLANG_MSG_ENHANCED, EShMsgEnhanced); CONVERT_MSG(GLSLANG_MSG_ABSOLUTE_PATH, EShMsgAbsolutePath); + CONVERT_MSG(GLSLANG_MSG_DISPLAY_ERROR_COLUMN, EShMsgDisplayErrorColumn); return res; #undef CONVERT_MSG } @@ -257,6 +270,8 @@ static glslang::EShTargetClientVersion c_shader_client_version(glslang_target_cl return glslang::EShTargetVulkan_1_2; case GLSLANG_TARGET_VULKAN_1_3: return glslang::EShTargetVulkan_1_3; + case GLSLANG_TARGET_VULKAN_1_4: + return glslang::EShTargetVulkan_1_4; case GLSLANG_TARGET_OPENGL_450: return glslang::EShTargetOpenGL_450; default: @@ -311,7 +326,7 @@ static EProfile c_shader_profile(glslang_profile_t profile) 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); + printf("Error creating shader: null input(%p)/input->code\n", (void*)input); if (input) printf("input->code = %p\n", input->code); @@ -368,11 +383,35 @@ GLSLANG_EXPORT void glslang_shader_set_glsl_version(glslang_shader_t* shader, in shader->shader->setOverrideVersion(version); } +GLSLANG_EXPORT void glslang_shader_set_default_uniform_block_set_and_binding(glslang_shader_t* shader, unsigned int set, unsigned int binding) { + shader->shader->setGlobalUniformSet(set); + shader->shader->setGlobalUniformBinding(binding); +} + +GLSLANG_EXPORT void glslang_shader_set_default_uniform_block_name(glslang_shader_t* shader, const char *name) { + shader->shader->setGlobalUniformBlockName(name); +} + +GLSLANG_EXPORT void glslang_shader_set_resource_set_binding(glslang_shader_t* shader, const char *const *bindings, unsigned int num_bindings) { + shader->baseResourceSetBinding.clear(); + + for (unsigned int i = 0; i < num_bindings; ++i) { + shader->baseResourceSetBinding.push_back(std::string(bindings[i])); + } + + shader->shader->setResourceSetBinding(shader->baseResourceSetBinding); +} + GLSLANG_EXPORT const char* glslang_shader_get_preprocessed_code(glslang_shader_t* shader) { return shader->preprocessedGLSL.c_str(); } +GLSLANG_EXPORT void glslang_shader_set_preprocessed_code(glslang_shader_t* shader, const char* code) +{ + shader->preprocessedGLSL.assign(code); +} + GLSLANG_EXPORT int glslang_shader_preprocess(glslang_shader_t* shader, const glslang_input_t* input) { DirStackFileIncluder dirStackFileIncluder; @@ -459,6 +498,11 @@ GLSLANG_EXPORT int glslang_program_map_io(glslang_program_t* program) return (int)program->program->mapIO(); } +GLSLANG_EXPORT int glslang_program_map_io_with_resolver_and_mapper(glslang_program_t* program, glslang_resolver_t* resolver, glslang_mapper_t* mapper) +{ + return (int)program->program->mapIO(reinterpret_cast(resolver), reinterpret_cast(mapper)); +} + GLSLANG_EXPORT const char* glslang_program_get_info_log(glslang_program_t* program) { return program->program->getInfoLog(); @@ -468,3 +512,30 @@ GLSLANG_EXPORT const char* glslang_program_get_info_debug_log(glslang_program_t* { return program->program->getInfoDebugLog(); } + +GLSLANG_EXPORT glslang_mapper_t* glslang_glsl_mapper_create() +{ + return reinterpret_cast(new glslang::TGlslIoMapper()); +} + +GLSLANG_EXPORT void glslang_glsl_mapper_delete(glslang_mapper_t* mapper) +{ + if (!mapper) + return; + + delete reinterpret_cast(mapper); +} + +GLSLANG_EXPORT glslang_resolver_t* glslang_glsl_resolver_create(glslang_program_t* program, glslang_stage_t stage) +{ + glslang::TIntermediate* intermediate = program->program->getIntermediate(c_shader_stage(stage)); + return reinterpret_cast(new glslang::TDefaultGlslIoResolver(reinterpret_cast(*intermediate))); +} + +GLSLANG_EXPORT void glslang_glsl_resolver_delete(glslang_resolver_t* resolver) +{ + if (!resolver) + return; + + delete reinterpret_cast(resolver); +} diff --git a/libraries/ZVulkan/src/glslang/OGLCompilersDLL/InitializeDll.h b/libraries/ZVulkan/src/glslang/glslang/ExtensionHeaders/GL_EXT_shader_realtime_clock.glsl similarity index 79% rename from libraries/ZVulkan/src/glslang/OGLCompilersDLL/InitializeDll.h rename to libraries/ZVulkan/src/glslang/glslang/ExtensionHeaders/GL_EXT_shader_realtime_clock.glsl index 661cee4d2..7cf545d94 100644 --- a/libraries/ZVulkan/src/glslang/OGLCompilersDLL/InitializeDll.h +++ b/libraries/ZVulkan/src/glslang/glslang/ExtensionHeaders/GL_EXT_shader_realtime_clock.glsl @@ -1,5 +1,9 @@ // // Copyright (C) 2002-2005 3Dlabs Inc. Ltd. +// Copyright (C) 2013-2016 LunarG, Inc. +// Copyright (C) 2016-2020 Google, Inc. +// Modifications Copyright(C) 2021 Advanced Micro Devices, Inc.All rights reserved. +// // All rights reserved. // // Redistribution and use in source and binary forms, with or without @@ -31,19 +35,4 @@ // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. // -#ifndef __INITIALIZEDLL_H -#define __INITIALIZEDLL_H - -#include "../glslang/OSDependent/osinclude.h" - -namespace glslang { - -bool InitProcess(); -bool InitThread(); -bool DetachThread(); // not called from standalone, perhaps other tools rely on parts of it -bool DetachProcess(); // not called from standalone, perhaps other tools rely on parts of it - -} // end namespace glslang - -#endif // __INITIALIZEDLL_H diff --git a/libraries/ZVulkan/src/glslang/glslang/Include/BaseTypes.h b/libraries/ZVulkan/src/glslang/glslang/Include/BaseTypes.h index 0ac526bfb..1d33a6900 100644 --- a/libraries/ZVulkan/src/glslang/glslang/Include/BaseTypes.h +++ b/libraries/ZVulkan/src/glslang/glslang/Include/BaseTypes.h @@ -67,6 +67,10 @@ enum TBasicType { EbtRayQuery, EbtHitObjectNV, EbtCoopmat, + EbtFunction, + EbtTensorLayoutNV, + EbtTensorViewNV, + EbtCoopvecNV, // SPIR-V type defined by spirv_type EbtSpirvType, @@ -275,6 +279,7 @@ enum TBuiltInVariable { EbvWorldToObject3x4, EbvIncomingRayFlags, EbvCurrentRayTimeNV, + EbvClusterIDNV, // barycentrics EbvBaryCoordNV, EbvBaryCoordNoPerspNV, @@ -295,6 +300,13 @@ enum TBuiltInVariable { EbvHitKindFrontFacingMicroTriangleNV, EbvHitKindBackFacingMicroTriangleNV, + EbvHitIsSphereNV, + EbvHitIsLSSNV, + EbvHitSpherePositionNV, + EbvHitSphereRadiusNV, + EbvHitLSSPositionsNV, + EbvHitLSSRadiiNV, + //GL_EXT_mesh_shader EbvPrimitivePointIndicesEXT, EbvPrimitiveLineIndicesEXT, @@ -499,6 +511,7 @@ __inline const char* GetBuiltInVariableString(TBuiltInVariable v) case EbvObjectToWorld: return "ObjectToWorldNV"; case EbvWorldToObject: return "WorldToObjectNV"; case EbvCurrentRayTimeNV: return "CurrentRayTimeNV"; + case EbvClusterIDNV: return "ClusterIDNV"; case EbvBaryCoordEXT: case EbvBaryCoordNV: return "BaryCoordKHR"; @@ -530,6 +543,13 @@ __inline const char* GetBuiltInVariableString(TBuiltInVariable v) case EbvHitKindFrontFacingMicroTriangleNV: return "HitKindFrontFacingMicroTriangleNV"; case EbvHitKindBackFacingMicroTriangleNV: return "HitKindBackFacingMicroTriangleNV"; + case EbvHitIsSphereNV: return "HitIsSphereNV"; + case EbvHitIsLSSNV: return "HitIsLSSNV"; + case EbvHitSpherePositionNV: return "HitSpherePositionNV"; + case EbvHitSphereRadiusNV: return "HitSphereRadiusNV"; + case EbvHitLSSPositionsNV: return "HitSpherePositionsNV"; + case EbvHitLSSRadiiNV: return "HitLSSRadiiNV"; + default: return "unknown built-in variable"; } } @@ -588,6 +608,30 @@ __inline bool isTypeFloat(TBasicType type) } } +__inline uint32_t GetNumBits(TBasicType type) +{ + switch (type) { + case EbtInt8: + case EbtUint8: + return 8; + case EbtFloat16: + case EbtInt16: + case EbtUint16: + return 16; + case EbtInt: + case EbtUint: + case EbtFloat: + return 32; + case EbtDouble: + case EbtInt64: + case EbtUint64: + return 64; + default: + assert(false); + return 0; + } +} + __inline int getTypeRank(TBasicType type) { int res = -1; diff --git a/libraries/ZVulkan/src/glslang/glslang/Include/Common.h b/libraries/ZVulkan/src/glslang/glslang/Include/Common.h index 7e48504dc..ead26b674 100644 --- a/libraries/ZVulkan/src/glslang/glslang/Include/Common.h +++ b/libraries/ZVulkan/src/glslang/glslang/Include/Common.h @@ -47,7 +47,6 @@ #include #include #include -#include #include #include #include @@ -95,6 +94,11 @@ std::string to_string(const T& val) { #pragma warning(disable : 4201) // nameless union #endif +// Allow compilation to WASI which does not support threads yet. +#ifdef __wasi__ +#define DISABLE_THREAD_SUPPORT +#endif + #include "PoolAlloc.h" // diff --git a/libraries/ZVulkan/src/glslang/glslang/Include/InfoSink.h b/libraries/ZVulkan/src/glslang/glslang/Include/InfoSink.h index 23f495dcb..262933941 100644 --- a/libraries/ZVulkan/src/glslang/glslang/Include/InfoSink.h +++ b/libraries/ZVulkan/src/glslang/glslang/Include/InfoSink.h @@ -95,10 +95,14 @@ public: default: append("UNKNOWN ERROR: "); break; } } - void location(const TSourceLoc& loc, bool absolute = false) { + void location(const TSourceLoc& loc, bool absolute = false, bool displayColumn = false) { const int maxSize = 24; char locText[maxSize]; - snprintf(locText, maxSize, ":%d", loc.line); + if (displayColumn) { + snprintf(locText, maxSize, ":%d:%d", loc.line, loc.column); + } else { + snprintf(locText, maxSize, ":%d", loc.line); + } if(loc.getFilename() == nullptr && shaderFileName != nullptr && absolute) { append(std::filesystem::absolute(shaderFileName).string()); @@ -119,9 +123,11 @@ public: append(s); append("\n"); } - void message(TPrefixType message, const char* s, const TSourceLoc& loc) { + void message(TPrefixType message, const char* s, const TSourceLoc& loc, bool absolute = false, + bool displayColumn = false) + { prefix(message); - location(loc); + location(loc, absolute, displayColumn); append(s); append("\n"); } diff --git a/libraries/ZVulkan/src/glslang/glslang/Include/Types.h b/libraries/ZVulkan/src/glslang/glslang/Include/Types.h index 232622854..4cf71beeb 100644 --- a/libraries/ZVulkan/src/glslang/glslang/Include/Types.h +++ b/libraries/ZVulkan/src/glslang/glslang/Include/Types.h @@ -307,21 +307,6 @@ typedef TVector TTypeList; typedef TVector TIdentifierList; -// -// Following are a series of helper enums for managing layouts and qualifiers, -// used for TPublicType, TType, others. -// - -enum TLayoutPacking { - ElpNone, - ElpShared, // default, but different than saying nothing - ElpStd140, - ElpStd430, - ElpPacked, - ElpScalar, - ElpCount // If expanding, see bitfield width below -}; - enum TLayoutMatrix { ElmNone, ElmRowMajor, @@ -567,6 +552,7 @@ public: shadercallcoherent = false; nonprivate = false; volatil = false; + nontemporal = false; restrict = false; readonly = false; writeonly = false; @@ -604,6 +590,7 @@ public: bool writeonly : 1; bool coherent : 1; bool volatil : 1; + bool nontemporal : 1; bool devicecoherent : 1; bool queuefamilycoherent : 1; bool workgroupcoherent : 1; @@ -618,14 +605,15 @@ public: bool isRestrict() const { return restrict; } bool isCoherent() const { return coherent; } bool isVolatile() const { return volatil; } + bool isNonTemporal() const { return nontemporal; } bool isSample() const { return sample; } bool isMemory() const { - return shadercallcoherent || subgroupcoherent || workgroupcoherent || queuefamilycoherent || devicecoherent || coherent || volatil || restrict || readonly || writeonly || nonprivate; + return shadercallcoherent || subgroupcoherent || workgroupcoherent || queuefamilycoherent || devicecoherent || coherent || volatil || nontemporal || restrict || readonly || writeonly || nonprivate; } bool isMemoryQualifierImageAndSSBOOnly() const { - return shadercallcoherent || subgroupcoherent || workgroupcoherent || queuefamilycoherent || devicecoherent || coherent || volatil || restrict || readonly || writeonly; + return shadercallcoherent || subgroupcoherent || workgroupcoherent || queuefamilycoherent || devicecoherent || coherent || volatil || nontemporal || restrict || readonly || writeonly; } bool bufferReferenceNeedsVulkanMemoryModel() const { @@ -1475,6 +1463,7 @@ public: uint32_t matrixRows : 4; bool coopmatNV : 1; bool coopmatKHR : 1; + bool coopvecNV : 1; TArraySizes* arraySizes; const TType* userDef; TSourceLoc loc; @@ -1485,6 +1474,11 @@ public: bool isCoopmat() const { return coopmatNV || coopmatKHR; } bool isCoopmatNV() const { return coopmatNV; } bool isCoopmatKHR() const { return coopmatKHR; } + bool isCoopvecNV() const { return coopvecNV; } + bool isCoopmatOrvec() const { return isCoopmat() || isCoopvecNV(); } + + bool isTensorLayoutNV() const { return basicType == EbtTensorLayoutNV; } + bool isTensorViewNV() const { return basicType == EbtTensorViewNV; } void initType(const TSourceLoc& l) { @@ -1498,6 +1492,7 @@ public: typeParameters = nullptr; coopmatNV = false; coopmatKHR = false; + coopvecNV = false; spirvType = nullptr; } @@ -1557,7 +1552,7 @@ public: // for "empty" type (no args) or simple scalar/vector/matrix explicit TType(TBasicType t = EbtVoid, TStorageQualifier q = EvqTemporary, int vs = 1, int mc = 0, int mr = 0, bool isVector = false) : - basicType(t), vectorSize(static_cast(vs) & 0b1111), matrixCols(static_cast(mc) & 0b1111), matrixRows(static_cast(mr) & 0b1111), vector1(isVector && vs == 1), coopmatNV(false), coopmatKHR(false), coopmatKHRuse(0), coopmatKHRUseValid(false), + basicType(t), vectorSize(static_cast(vs) & 0b1111), matrixCols(static_cast(mc) & 0b1111), matrixRows(static_cast(mr) & 0b1111), vector1(isVector && vs == 1), coopmatNV(false), coopmatKHR(false), coopmatKHRuse(0), coopmatKHRUseValid(false), coopvecNV(false), arraySizes(nullptr), structure(nullptr), fieldName(nullptr), typeName(nullptr), typeParameters(nullptr), spirvType(nullptr) { @@ -1573,7 +1568,7 @@ public: // for explicit precision qualifier TType(TBasicType t, TStorageQualifier q, TPrecisionQualifier p, int vs = 1, int mc = 0, int mr = 0, bool isVector = false) : - basicType(t), vectorSize(static_cast(vs) & 0b1111), matrixCols(static_cast(mc) & 0b1111), matrixRows(static_cast(mr) & 0b1111), vector1(isVector && vs == 1), coopmatNV(false), coopmatKHR(false), coopmatKHRuse(0), coopmatKHRUseValid(false), + basicType(t), vectorSize(static_cast(vs) & 0b1111), matrixCols(static_cast(mc) & 0b1111), matrixRows(static_cast(mr) & 0b1111), vector1(isVector && vs == 1), coopmatNV(false), coopmatKHR(false), coopmatKHRuse(0), coopmatKHRUseValid(false), coopvecNV(false), arraySizes(nullptr), structure(nullptr), fieldName(nullptr), typeName(nullptr), typeParameters(nullptr), spirvType(nullptr) { @@ -1591,7 +1586,7 @@ public: // for turning a TPublicType into a TType, using a shallow copy explicit TType(const TPublicType& p) : basicType(p.basicType), - vectorSize(p.vectorSize), matrixCols(p.matrixCols), matrixRows(p.matrixRows), vector1(false), coopmatNV(p.coopmatNV), coopmatKHR(p.coopmatKHR), coopmatKHRuse(0), coopmatKHRUseValid(false), + vectorSize(p.vectorSize), matrixCols(p.matrixCols), matrixRows(p.matrixRows), vector1(false), coopmatNV(p.coopmatNV), coopmatKHR(p.coopmatKHR), coopmatKHRuse(0), coopmatKHRUseValid(false), coopvecNV(p.coopvecNV), arraySizes(p.arraySizes), structure(nullptr), fieldName(nullptr), typeName(nullptr), typeParameters(p.typeParameters), spirvType(p.spirvType) { @@ -1640,13 +1635,15 @@ public: assert(dimSize >= 0); coopmatKHRuse = static_cast(dimSize) & 0b111; coopmatKHRUseValid = true; - p.typeParameters->arraySizes->removeLastSize(); } } + if (p.isCoopvecNV() && p.typeParameters) { + basicType = p.typeParameters->basicType; + } } // for construction of sampler types TType(const TSampler& sampler, TStorageQualifier q = EvqUniform, TArraySizes* as = nullptr) : - basicType(EbtSampler), vectorSize(1u), matrixCols(0u), matrixRows(0u), vector1(false), coopmatNV(false), coopmatKHR(false), coopmatKHRuse(0), coopmatKHRUseValid(false), + basicType(EbtSampler), vectorSize(1u), matrixCols(0u), matrixRows(0u), vector1(false), coopmatNV(false), coopmatKHR(false), coopmatKHRuse(0), coopmatKHRUseValid(false), coopvecNV(false), arraySizes(as), structure(nullptr), fieldName(nullptr), typeName(nullptr), sampler(sampler), typeParameters(nullptr), spirvType(nullptr) { @@ -1689,18 +1686,19 @@ public: // dereference from vector to scalar vectorSize = 1; vector1 = false; - } else if (isCoopMat()) { + } else if (isCoopMat() || isCoopVecNV()) { coopmatNV = false; coopmatKHR = false; coopmatKHRuse = 0; coopmatKHRUseValid = false; + coopvecNV = false; typeParameters = nullptr; } } } // for making structures, ... TType(TTypeList* userDef, const TString& n) : - basicType(EbtStruct), vectorSize(1), matrixCols(0), matrixRows(0), vector1(false), coopmatNV(false), coopmatKHR(false), coopmatKHRuse(0), coopmatKHRUseValid(false), + basicType(EbtStruct), vectorSize(1), matrixCols(0), matrixRows(0), vector1(false), coopmatNV(false), coopmatKHR(false), coopmatKHRuse(0), coopmatKHRUseValid(false), coopvecNV(false), arraySizes(nullptr), structure(userDef), fieldName(nullptr), typeParameters(nullptr), spirvType(nullptr) { @@ -1710,7 +1708,7 @@ public: } // For interface blocks TType(TTypeList* userDef, const TString& n, const TQualifier& q) : - basicType(EbtBlock), vectorSize(1), matrixCols(0), matrixRows(0), vector1(false), coopmatNV(false), coopmatKHR(false), coopmatKHRuse(0), coopmatKHRUseValid(false), + basicType(EbtBlock), vectorSize(1), matrixCols(0), matrixRows(0), vector1(false), coopmatNV(false), coopmatKHR(false), coopmatKHRuse(0), coopmatKHRUseValid(false), coopvecNV(false), qualifier(q), arraySizes(nullptr), structure(userDef), fieldName(nullptr), typeParameters(nullptr), spirvType(nullptr) { @@ -1758,6 +1756,7 @@ public: coopmatKHR = copyOf.isCoopMatKHR(); coopmatKHRuse = copyOf.coopmatKHRuse; coopmatKHRUseValid = copyOf.coopmatKHRUseValid; + coopvecNV = copyOf.isCoopVecNV(); } // Make complete copy of the whole type graph rooted at 'copyOf'. @@ -1841,7 +1840,7 @@ public: virtual const TTypeParameters* getTypeParameters() const { return typeParameters; } virtual TTypeParameters* getTypeParameters() { return typeParameters; } - virtual bool isScalar() const { return ! isVector() && ! isMatrix() && ! isStruct() && ! isArray(); } + virtual bool isScalar() const { return ! isVector() && ! isMatrix() && ! isStruct() && ! isArray() && ! isCoopVecNV(); } virtual bool isScalarOrVec1() const { return isScalar() || vector1; } virtual bool isScalarOrVector() const { return !isMatrix() && !isStruct() && !isArray(); } virtual bool isVector() const { return vectorSize > 1u || vector1; } @@ -1892,10 +1891,15 @@ public: bool isCoopMat() const { return coopmatNV || coopmatKHR; } bool isCoopMatNV() const { return coopmatNV; } bool isCoopMatKHR() const { return coopmatKHR; } + bool isCoopVecNV() const { return coopvecNV; } + bool isCoopMatOrVec() const { return isCoopMat() || isCoopVecNV(); } bool isReference() const { return getBasicType() == EbtReference; } bool isSpirvType() const { return getBasicType() == EbtSpirvType; } int getCoopMatKHRuse() const { return static_cast(coopmatKHRuse); } + bool isTensorLayoutNV() const { return getBasicType() == EbtTensorLayoutNV; } + bool isTensorViewNV() const { return getBasicType() == EbtTensorViewNV; } + // return true if this type contains any subtype which satisfies the given predicate. template bool contains(P predicate) const @@ -2004,6 +2008,10 @@ public: { return contains([](const TType* t) { return t->coopmatNV || t->coopmatKHR; } ); } + bool containsCoopVec() const + { + return contains([](const TType* t) { return t->coopvecNV; } ); + } bool containsReference() const { return containsBasicType(EbtReference); @@ -2121,6 +2129,9 @@ public: case EbtString: return "string"; case EbtSpirvType: return "spirv_type"; case EbtCoopmat: return "coopmat"; + case EbtTensorLayoutNV: return "tensorLayoutNV"; + case EbtTensorViewNV: return "tensorViewNV"; + case EbtCoopvecNV: return "coopvecNV"; default: return "unknown type"; } } @@ -2289,6 +2300,8 @@ public: appendStr(" nonprivate"); if (qualifier.volatil) appendStr(" volatile"); + if (qualifier.nontemporal) + appendStr(" nontemporal"); if (qualifier.restrict) appendStr(" restrict"); if (qualifier.readonly) @@ -2431,6 +2444,18 @@ public: appendStr(" "); appendStr("coopmat"); } + if (isTensorLayoutNV()) { + appendStr(" "); + appendStr("tensorLayoutNV"); + } + if (isTensorViewNV()) { + appendStr(" "); + appendStr("tensorViewNV"); + } + if (isCoopVecNV()) { + appendStr(" "); + appendStr("coopvecNV"); + } appendStr("<"); for (int i = 0; i < (int)typeParameters->arraySizes->getNumDims(); ++i) { @@ -2438,10 +2463,6 @@ public: if (i != (int)typeParameters->arraySizes->getNumDims() - 1) appendStr(", "); } - if (coopmatKHRUseValid) { - appendStr(", "); - appendInt(coopmatKHRuse); - } appendStr(">"); } if (getPrecision && qualifier.precision != EpqNone) { @@ -2516,7 +2537,9 @@ public: { uint32_t components = 0; - if (getBasicType() == EbtStruct || getBasicType() == EbtBlock) { + if (isCoopVecNV()) { + components = typeParameters->arraySizes->getDimSize(0); + } else if (getBasicType() == EbtStruct || getBasicType() == EbtBlock) { for (TTypeList::const_iterator tl = getStruct()->begin(); tl != getStruct()->end(); tl++) components += ((*tl).type)->computeNumComponents(); } else if (matrixCols) @@ -2720,6 +2743,7 @@ public: vector1 == right.vector1 && isCoopMatNV() == right.isCoopMatNV() && isCoopMatKHR() == right.isCoopMatKHR() && + isCoopVecNV() == right.isCoopVecNV() && sameStructType(right, lpidx, rpidx) && sameReferenceType(right); } @@ -2741,6 +2765,18 @@ public: return false; } + // See if a cooperative vector type parameter with unspecified parameters is + // an OK function parameter + bool coopVecParameterOK(const TType& right) const + { + if (isCoopVecNV() && right.isCoopVecNV()) { + return ((getBasicType() == right.getBasicType()) || (getBasicType() == EbtCoopvecNV) || + (right.getBasicType() == EbtCoopvecNV)) && + typeParameters == nullptr && right.typeParameters != nullptr; + } + return false; + } + bool sameCoopMatBaseType(const TType &right) const { bool rv = false; @@ -2767,24 +2803,60 @@ public: return rv; } + bool tensorParameterOK(const TType& right) const + { + if (isTensorLayoutNV()) { + return right.isTensorLayoutNV() && right.typeParameters == nullptr && typeParameters != nullptr; + } + if (isTensorViewNV()) { + return right.isTensorViewNV() && right.typeParameters == nullptr && typeParameters != nullptr; + } + return false; + } + + bool sameCoopVecBaseType(const TType &right) const { + bool rv = false; + + if (isCoopVecNV() && right.isCoopVecNV()) { + if (getBasicType() == EbtFloat || getBasicType() == EbtFloat16) + rv = right.getBasicType() == EbtFloat || right.getBasicType() == EbtFloat16 || right.getBasicType() == EbtCoopvecNV; + else if (getBasicType() == EbtUint || getBasicType() == EbtUint8 || getBasicType() == EbtUint16) + rv = right.getBasicType() == EbtUint || right.getBasicType() == EbtUint8 || right.getBasicType() == EbtUint16 || right.getBasicType() == EbtCoopvecNV; + else if (getBasicType() == EbtInt || getBasicType() == EbtInt8 || getBasicType() == EbtInt16) + rv = right.getBasicType() == EbtInt || right.getBasicType() == EbtInt8 || right.getBasicType() == EbtInt16 || right.getBasicType() == EbtCoopvecNV; + else + rv = false; + } + return rv; + } + bool sameCoopMatUse(const TType &right) const { return coopmatKHRuse == right.coopmatKHRuse; } - bool sameCoopMatShapeAndUse(const TType &right) const + bool sameCoopMatShape(const TType &right) const { if (!isCoopMat() || !right.isCoopMat() || isCoopMatKHR() != right.isCoopMatKHR()) return false; + // Skip bit width type parameter (first array size) for coopmatNV + int firstArrayDimToCompare = isCoopMatNV() ? 1 : 0; + int lastArrayDimToCompare = typeParameters->arraySizes->getNumDims() - (isCoopMatKHR() ? 1 : 0); + for (int i = firstArrayDimToCompare; i < lastArrayDimToCompare; ++i) { + if (typeParameters->arraySizes->getDimSize(i) != right.typeParameters->arraySizes->getDimSize(i)) + return false; + } + return true; + } + + bool sameCoopMatShapeAndUse(const TType &right) const + { + if (!sameCoopMatShape(right)) + return false; + if (coopmatKHRuse != right.coopmatKHRuse) return false; - // Skip bit width type parameter (first array size) for coopmatNV - int firstArrayDimToCompare = isCoopMatNV() ? 1 : 0; - for (int i = firstArrayDimToCompare; i < typeParameters->arraySizes->getNumDims(); ++i) { - if (typeParameters->arraySizes->getDimSize(i) != right.typeParameters->arraySizes->getDimSize(i)) - return false; - } return true; } @@ -2842,7 +2914,9 @@ protected: typeParameters = new TTypeParameters; typeParameters->arraySizes = new TArraySizes; *typeParameters->arraySizes = *copyOf.typeParameters->arraySizes; - *typeParameters->spirvType = *copyOf.typeParameters->spirvType; + if (copyOf.typeParameters->spirvType) { + *typeParameters->spirvType = *copyOf.typeParameters->spirvType; + } typeParameters->basicType = copyOf.basicType; } @@ -2885,6 +2959,7 @@ protected: bool coopmatKHR : 1; uint32_t coopmatKHRuse : 3; // Accepts one of three values: 0, 1, 2 (gl_MatrixUseA, gl_MatrixUseB, gl_MatrixUseAccumulator) bool coopmatKHRUseValid : 1; // True if coopmatKHRuse has been set + bool coopvecNV : 1; TQualifier qualifier; TArraySizes* arraySizes; // nullptr unless an array; can be shared across types diff --git a/libraries/ZVulkan/src/glslang/glslang/Include/build_info.h b/libraries/ZVulkan/src/glslang/glslang/Include/build_info.h deleted file mode 100644 index 661c4a3c1..000000000 --- a/libraries/ZVulkan/src/glslang/glslang/Include/build_info.h +++ /dev/null @@ -1,62 +0,0 @@ -// 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 6 -#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 diff --git a/libraries/ZVulkan/src/glslang/glslang/Include/glslang_c_interface.h b/libraries/ZVulkan/src/glslang/glslang/Include/glslang_c_interface.h index 7fa1a05d5..06120219d 100644 --- a/libraries/ZVulkan/src/glslang/glslang/Include/glslang_c_interface.h +++ b/libraries/ZVulkan/src/glslang/glslang/Include/glslang_c_interface.h @@ -37,9 +37,20 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include "glslang_c_shader_types.h" +#include "visibility.h" typedef struct glslang_shader_s glslang_shader_t; typedef struct glslang_program_s glslang_program_t; +typedef struct glslang_mapper_s glslang_mapper_t; +typedef struct glslang_resolver_s glslang_resolver_t; + +/* Version counterpart */ +typedef struct glslang_version_s { + int major; + int minor; + int patch; + const char* flavor; +} glslang_version_t; /* TLimits counterpart */ typedef struct glslang_limits_s { @@ -227,27 +238,14 @@ typedef struct glslang_spv_options_s { bool emit_nonsemantic_shader_debug_info; bool emit_nonsemantic_shader_debug_source; bool compile_only; + bool optimize_allow_expanded_id_bound; } glslang_spv_options_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 void glslang_get_version(glslang_version_t* version); GLSLANG_EXPORT int glslang_initialize_process(void); GLSLANG_EXPORT void glslang_finalize_process(void); @@ -259,9 +257,13 @@ GLSLANG_EXPORT void glslang_shader_shift_binding(glslang_shader_t* shader, glsla GLSLANG_EXPORT void glslang_shader_shift_binding_for_set(glslang_shader_t* shader, glslang_resource_type_t res, unsigned int base, unsigned int set); GLSLANG_EXPORT void glslang_shader_set_options(glslang_shader_t* shader, int options); // glslang_shader_options_t GLSLANG_EXPORT void glslang_shader_set_glsl_version(glslang_shader_t* shader, int version); +GLSLANG_EXPORT void glslang_shader_set_default_uniform_block_set_and_binding(glslang_shader_t* shader, unsigned int set, unsigned int binding); +GLSLANG_EXPORT void glslang_shader_set_default_uniform_block_name(glslang_shader_t* shader, const char *name); +GLSLANG_EXPORT void glslang_shader_set_resource_set_binding(glslang_shader_t* shader, const char *const *bindings, unsigned int num_bindings); 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 void glslang_shader_set_preprocessed_code(glslang_shader_t* shader, const char* code); 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); @@ -272,6 +274,7 @@ GLSLANG_EXPORT int glslang_program_link(glslang_program_t* program, int messages GLSLANG_EXPORT void glslang_program_add_source_text(glslang_program_t* program, glslang_stage_t stage, const char* text, size_t len); GLSLANG_EXPORT void glslang_program_set_source_file(glslang_program_t* program, glslang_stage_t stage, const char* file); GLSLANG_EXPORT int glslang_program_map_io(glslang_program_t* program); +GLSLANG_EXPORT int glslang_program_map_io_with_resolver_and_mapper(glslang_program_t* program, glslang_resolver_t* resolver, glslang_mapper_t* mapper); GLSLANG_EXPORT void glslang_program_SPIRV_generate(glslang_program_t* program, glslang_stage_t stage); GLSLANG_EXPORT void glslang_program_SPIRV_generate_with_options(glslang_program_t* program, glslang_stage_t stage, glslang_spv_options_t* spv_options); GLSLANG_EXPORT size_t glslang_program_SPIRV_get_size(glslang_program_t* program); @@ -281,6 +284,12 @@ GLSLANG_EXPORT const char* glslang_program_SPIRV_get_messages(glslang_program_t* 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); +GLSLANG_EXPORT glslang_mapper_t* glslang_glsl_mapper_create(void); +GLSLANG_EXPORT void glslang_glsl_mapper_delete(glslang_mapper_t* mapper); + +GLSLANG_EXPORT glslang_resolver_t* glslang_glsl_resolver_create(glslang_program_t* program, glslang_stage_t stage); +GLSLANG_EXPORT void glslang_glsl_resolver_delete(glslang_resolver_t* resolver); + #ifdef __cplusplus } #endif diff --git a/libraries/ZVulkan/src/glslang/glslang/Include/glslang_c_shader_types.h b/libraries/ZVulkan/src/glslang/glslang/Include/glslang_c_shader_types.h index 51f5642ab..d0bcced4d 100644 --- a/libraries/ZVulkan/src/glslang/glslang/Include/glslang_c_shader_types.h +++ b/libraries/ZVulkan/src/glslang/glslang/Include/glslang_c_shader_types.h @@ -118,8 +118,9 @@ typedef enum { GLSLANG_TARGET_VULKAN_1_1 = (1 << 22) | (1 << 12), GLSLANG_TARGET_VULKAN_1_2 = (1 << 22) | (2 << 12), GLSLANG_TARGET_VULKAN_1_3 = (1 << 22) | (3 << 12), + GLSLANG_TARGET_VULKAN_1_4 = (1 << 22) | (4 << 12), GLSLANG_TARGET_OPENGL_450 = 450, - LAST_ELEMENT_MARKER(GLSLANG_TARGET_CLIENT_VERSION_COUNT = 5), + LAST_ELEMENT_MARKER(GLSLANG_TARGET_CLIENT_VERSION_COUNT = 6), } glslang_target_client_version_t; /* SH_TARGET_LanguageVersion counterpart */ @@ -175,6 +176,8 @@ typedef enum { GLSLANG_MSG_BUILTIN_SYMBOL_TABLE_BIT = (1 << 14), GLSLANG_MSG_ENHANCED = (1 << 15), GLSLANG_MSG_ABSOLUTE_PATH = (1 << 16), + GLSLANG_MSG_DISPLAY_ERROR_COLUMN = (1 << 17), + GLSLANG_MSG_LINK_TIME_OPTIMIZATION_BIT = (1 << 18), LAST_ELEMENT_MARKER(GLSLANG_MSG_COUNT), } glslang_messages_t; diff --git a/libraries/ZVulkan/src/glslang/glslang/Include/intermediate.h b/libraries/ZVulkan/src/glslang/glslang/Include/intermediate.h index bcce91d3a..11f7b2a67 100644 --- a/libraries/ZVulkan/src/glslang/glslang/Include/intermediate.h +++ b/libraries/ZVulkan/src/glslang/glslang/Include/intermediate.h @@ -87,189 +87,9 @@ enum TOperator { EOpDeclare, // Used by debugging to force declaration of variable in correct scope - // (u)int* -> bool - EOpConvInt8ToBool, - EOpConvUint8ToBool, - EOpConvInt16ToBool, - EOpConvUint16ToBool, - EOpConvIntToBool, - EOpConvUintToBool, - EOpConvInt64ToBool, - EOpConvUint64ToBool, - - // float* -> bool - EOpConvFloat16ToBool, - EOpConvFloatToBool, - EOpConvDoubleToBool, - - // bool -> (u)int* - EOpConvBoolToInt8, - EOpConvBoolToUint8, - EOpConvBoolToInt16, - EOpConvBoolToUint16, - EOpConvBoolToInt, - EOpConvBoolToUint, - EOpConvBoolToInt64, - EOpConvBoolToUint64, - - // bool -> float* - EOpConvBoolToFloat16, - EOpConvBoolToFloat, - EOpConvBoolToDouble, - - // int8_t -> (u)int* - EOpConvInt8ToInt16, - EOpConvInt8ToInt, - EOpConvInt8ToInt64, - EOpConvInt8ToUint8, - EOpConvInt8ToUint16, - EOpConvInt8ToUint, - EOpConvInt8ToUint64, - - // uint8_t -> (u)int* - EOpConvUint8ToInt8, - EOpConvUint8ToInt16, - EOpConvUint8ToInt, - EOpConvUint8ToInt64, - EOpConvUint8ToUint16, - EOpConvUint8ToUint, - EOpConvUint8ToUint64, - - // int8_t -> float* - EOpConvInt8ToFloat16, - EOpConvInt8ToFloat, - EOpConvInt8ToDouble, - - // uint8_t -> float* - EOpConvUint8ToFloat16, - EOpConvUint8ToFloat, - EOpConvUint8ToDouble, - - // int16_t -> (u)int* - EOpConvInt16ToInt8, - EOpConvInt16ToInt, - EOpConvInt16ToInt64, - EOpConvInt16ToUint8, - EOpConvInt16ToUint16, - EOpConvInt16ToUint, - EOpConvInt16ToUint64, - - // uint16_t -> (u)int* - EOpConvUint16ToInt8, - EOpConvUint16ToInt16, - EOpConvUint16ToInt, - EOpConvUint16ToInt64, - EOpConvUint16ToUint8, - EOpConvUint16ToUint, - EOpConvUint16ToUint64, - - // int16_t -> float* - EOpConvInt16ToFloat16, - EOpConvInt16ToFloat, - EOpConvInt16ToDouble, - - // uint16_t -> float* - EOpConvUint16ToFloat16, - EOpConvUint16ToFloat, - EOpConvUint16ToDouble, - - // int32_t -> (u)int* - EOpConvIntToInt8, - EOpConvIntToInt16, - EOpConvIntToInt64, - EOpConvIntToUint8, - EOpConvIntToUint16, - EOpConvIntToUint, - EOpConvIntToUint64, - - // uint32_t -> (u)int* - EOpConvUintToInt8, - EOpConvUintToInt16, - EOpConvUintToInt, - EOpConvUintToInt64, - EOpConvUintToUint8, - EOpConvUintToUint16, - EOpConvUintToUint64, - - // int32_t -> float* - EOpConvIntToFloat16, - EOpConvIntToFloat, - EOpConvIntToDouble, - - // uint32_t -> float* - EOpConvUintToFloat16, - EOpConvUintToFloat, - EOpConvUintToDouble, - - // int64_t -> (u)int* - EOpConvInt64ToInt8, - EOpConvInt64ToInt16, - EOpConvInt64ToInt, - EOpConvInt64ToUint8, - EOpConvInt64ToUint16, - EOpConvInt64ToUint, - EOpConvInt64ToUint64, - - // uint64_t -> (u)int* - EOpConvUint64ToInt8, - EOpConvUint64ToInt16, - EOpConvUint64ToInt, - EOpConvUint64ToInt64, - EOpConvUint64ToUint8, - EOpConvUint64ToUint16, - EOpConvUint64ToUint, - - // int64_t -> float* - EOpConvInt64ToFloat16, - EOpConvInt64ToFloat, - EOpConvInt64ToDouble, - - // uint64_t -> float* - EOpConvUint64ToFloat16, - EOpConvUint64ToFloat, - EOpConvUint64ToDouble, - - // float16_t -> (u)int* - EOpConvFloat16ToInt8, - EOpConvFloat16ToInt16, - EOpConvFloat16ToInt, - EOpConvFloat16ToInt64, - EOpConvFloat16ToUint8, - EOpConvFloat16ToUint16, - EOpConvFloat16ToUint, - EOpConvFloat16ToUint64, - - // float16_t -> float* - EOpConvFloat16ToFloat, - EOpConvFloat16ToDouble, - - // float -> (u)int* - EOpConvFloatToInt8, - EOpConvFloatToInt16, - EOpConvFloatToInt, - EOpConvFloatToInt64, - EOpConvFloatToUint8, - EOpConvFloatToUint16, - EOpConvFloatToUint, - EOpConvFloatToUint64, - - // float -> float* - EOpConvFloatToFloat16, - EOpConvFloatToDouble, - - // float64 _t-> (u)int* - EOpConvDoubleToInt8, - EOpConvDoubleToInt16, - EOpConvDoubleToInt, - EOpConvDoubleToInt64, - EOpConvDoubleToUint8, - EOpConvDoubleToUint16, - EOpConvDoubleToUint, - EOpConvDoubleToUint64, - - // float64_t -> float* - EOpConvDoubleToFloat16, - EOpConvDoubleToFloat, + // Operator used to represent all conversions between int, float, and bool. + // The specific types are inferred from TBasicType. + EOpConvNumeric, // uint64_t <-> pointer EOpConvUint64ToPtr, @@ -567,6 +387,11 @@ enum TOperator { EOpSubgroupPartitionedExclusiveXor, EOpSubgroupGuardStop, + + // Integer dot product + EOpDotPackedEXT, + EOpDotAccSatEXT, + EOpDotPackedAccSatEXT, EOpMinInvocations, EOpMaxInvocations, @@ -628,7 +453,31 @@ enum TOperator { EOpCooperativeMatrixMulAdd, EOpCooperativeMatrixLoadNV, EOpCooperativeMatrixStoreNV, + EOpCooperativeMatrixLoadTensorNV, + EOpCooperativeMatrixStoreTensorNV, EOpCooperativeMatrixMulAddNV, + EOpCooperativeMatrixReduceNV, + EOpCooperativeMatrixPerElementOpNV, + EOpCooperativeMatrixTransposeNV, + + EOpCreateTensorLayoutNV, + EOpTensorLayoutSetBlockSizeNV, + EOpTensorLayoutSetDimensionNV, + EOpTensorLayoutSetStrideNV, + EOpTensorLayoutSliceNV, + EOpTensorLayoutSetClampValueNV, + + EOpCreateTensorViewNV, + EOpTensorViewSetDimensionNV, + EOpTensorViewSetStrideNV, + EOpTensorViewSetClipNV, + + EOpCooperativeVectorMatMulNV, + EOpCooperativeVectorMatMulAddNV, + EOpCooperativeVectorLoadNV, + EOpCooperativeVectorStoreNV, + EOpCooperativeVectorOuterProductAccumulateNV, + EOpCooperativeVectorReduceSumAccumulateNV, EOpBeginInvocationInterlock, // Fragment only EOpEndInvocationInterlock, // Fragment only @@ -768,6 +617,7 @@ enum TOperator { EOpConstructReference, EOpConstructCooperativeMatrixNV, EOpConstructCooperativeMatrixKHR, + EOpConstructCooperativeVectorNV, EOpConstructAccStruct, EOpConstructGuardEnd, @@ -1117,8 +967,31 @@ enum TOperator { EOpImageBlockMatchWindowSADQCOM, EOpImageBlockMatchGatherSSDQCOM, EOpImageBlockMatchGatherSADQCOM, + + // GL_NV_cluster_acceleration_structure + EOpRayQueryGetIntersectionClusterIdNV, + EOpHitObjectGetClusterIdNV, + + // GL_NV_linear_swept_spheres + EOpRayQueryGetIntersectionSpherePositionNV, + EOpRayQueryGetIntersectionSphereRadiusNV, + EOpRayQueryGetIntersectionLSSHitValueNV, + EOpRayQueryGetIntersectionLSSPositionsNV, + EOpRayQueryGetIntersectionLSSRadiiNV, + EOpRayQueryIsSphereHitNV, + EOpRayQueryIsLSSHitNV, + EOpHitObjectGetSpherePositionNV, + EOpHitObjectGetSphereRadiusNV, + EOpHitObjectGetLSSPositionsNV, + EOpHitObjectGetLSSRadiiNV, + EOpHitObjectIsSphereHitNV, + EOpHitObjectIsLSSHitNV, }; +inline bool IsOpNumericConv(const TOperator op) { + return op == EOpConvNumeric; +} + enum TLinkType { ELinkNone, ELinkExport, @@ -1356,11 +1229,19 @@ public: // if symbol is initialized as symbol(sym), the memory comes from the pool allocator of sym. If sym comes from // per process threadPoolAllocator, then it causes increased memory usage per compile // it is essential to use "symbol = sym" to assign to symbol - TIntermSymbol(long long i, const TString& n, const TType& t) - : TIntermTyped(t), id(i), flattenSubset(-1), constSubtree(nullptr) { name = n; } + TIntermSymbol(long long i, const TString& n, EShLanguage s, const TType& t, const TString* mn = nullptr) + : TIntermTyped(t), id(i), flattenSubset(-1), stage(s), constSubtree(nullptr) { + name = n; + if (mn) { + mangledName = *mn; + } else { + mangledName = n; + } + } virtual long long getId() const { return id; } virtual void changeId(long long i) { id = i; } virtual const TString& getName() const { return name; } + virtual const TString& getMangledName() const { return mangledName; } virtual void traverse(TIntermTraverser*); virtual TIntermSymbol* getAsSymbolNode() { return this; } virtual const TIntermSymbol* getAsSymbolNode() const { return this; } @@ -1376,11 +1257,14 @@ public: // This is meant for cases where a node has already been constructed, and // later on, it becomes necessary to switch to a different symbol. virtual void switchId(long long newId) { id = newId; } + EShLanguage getStage() const { return stage; } protected: long long id; // the unique id of the symbol this node represents int flattenSubset; // how deeply the flattened object rooted at id has been dereferenced TString name; // the name of the symbol this node represents + EShLanguage stage; + TString mangledName; // mangled function name, or a copy of name if not a function TConstUnionArray constArray; // if the symbol is a front-end compile-time constant, this is its value TIntermTyped* constSubtree; }; @@ -1694,8 +1578,12 @@ typedef TVector TQualifierList; // class TIntermAggregate : public TIntermOperator { public: - TIntermAggregate() : TIntermOperator(EOpNull), userDefined(false), pragmaTable(nullptr) { } - TIntermAggregate(TOperator o) : TIntermOperator(o), pragmaTable(nullptr) { } + TIntermAggregate() : TIntermOperator(EOpNull), userDefined(false), pragmaTable(nullptr) { + endLoc.init(); + } + TIntermAggregate(TOperator o) : TIntermOperator(o), pragmaTable(nullptr) { + endLoc.init(); + } ~TIntermAggregate() { delete pragmaTable; } virtual TIntermAggregate* getAsAggregate() { return this; } virtual const TIntermAggregate* getAsAggregate() const { return this; } @@ -1719,6 +1607,9 @@ public: void setSpirvInstruction(const TSpirvInstruction& inst) { spirvInst = inst; } const TSpirvInstruction& getSpirvInstruction() const { return spirvInst; } + void setEndLoc(TSourceLoc loc) { endLoc = loc; } + TSourceLoc getEndLoc() const { return endLoc; } + void setLinkType(TLinkType l) { linkType = l; } TLinkType getLinkType() const { return linkType; } protected: @@ -1733,6 +1624,10 @@ protected: TPragmaTable* pragmaTable; TSpirvInstruction spirvInst; TLinkType linkType = ELinkNone; + + // Marking the end source location of the aggregate. + // This is currently only set for a compound statement or a function body, pointing to '}'. + TSourceLoc endLoc; }; // diff --git a/libraries/ZVulkan/src/glslang/glslang/OSDependent/Windows/main.cpp b/libraries/ZVulkan/src/glslang/glslang/Include/visibility.h similarity index 67% rename from libraries/ZVulkan/src/glslang/glslang/OSDependent/Windows/main.cpp rename to libraries/ZVulkan/src/glslang/glslang/Include/visibility.h index 0bcde7b66..9bb8f3faa 100644 --- a/libraries/ZVulkan/src/glslang/glslang/OSDependent/Windows/main.cpp +++ b/libraries/ZVulkan/src/glslang/glslang/Include/visibility.h @@ -1,5 +1,6 @@ // -// Copyright (C) 2002-2005 3Dlabs Inc. Ltd. +// Copyright (C) 2023 LunarG, Inc. +// // All rights reserved. // // Redistribution and use in source and binary forms, with or without @@ -31,44 +32,23 @@ // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. // +#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 -#include "InitializeDll.h" +#ifndef GLSLANG_EXPORT +#define GLSLANG_EXPORT +#endif -#define STRICT -#define VC_EXTRALEAN 1 -#include -#include - -BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) -{ - switch (fdwReason) - { - case DLL_PROCESS_ATTACH: - - if (! glslang::InitProcess()) - return FALSE; - break; - case DLL_THREAD_ATTACH: - - if (! glslang::InitThread()) - return FALSE; - break; - - case DLL_THREAD_DETACH: - - if (! glslang::DetachThread()) - return FALSE; - break; - - case DLL_PROCESS_DETACH: - - glslang::DetachProcess(); - break; - - default: - assert(0 && "DllMain(): Reason for calling DLL Main is unknown"); - return FALSE; - } - - return TRUE; -} +// Symbols marked with this macro are only meant for public use by the test suite +// and do not appear in publicly installed headers. They are not considered to be +// part of the glslang library ABI. +#define GLSLANG_EXPORT_FOR_TESTS GLSLANG_EXPORT diff --git a/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/Constant.cpp b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/Constant.cpp index ac7fc8cd1..488ac8161 100644 --- a/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/Constant.cpp +++ b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/Constant.cpp @@ -490,6 +490,163 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, const TType& returnType) // Process component-wise operations for (int i = 0; i < objectSize; i++) { + // First read the value and convert to i64/u64/f64/bool, then convert + // to the destination type (still 64b), then convert down to the + // destination size. + if (IsOpNumericConv(op)) { + enum ConvType { CONV_FLOAT, CONV_INT, CONV_UINT, CONV_BOOL }; + ConvType srcType = CONV_UINT, dstType = CONV_UINT; + double valf = 0.0; + uint64_t valu = 0; + int64_t vali = 0; + bool valb = false; + switch (getType().getBasicType()) { + case EbtDouble: + case EbtFloat16: + case EbtFloat: + valf = unionArray[i].getDConst(); + srcType = CONV_FLOAT; + break; + case EbtInt8: + vali = unionArray[i].getI8Const(); + srcType = CONV_INT; + break; + case EbtInt16: + vali = unionArray[i].getI16Const(); + srcType = CONV_INT; + break; + case EbtInt: + vali = unionArray[i].getIConst(); + srcType = CONV_INT; + break; + case EbtInt64: + vali = unionArray[i].getI64Const(); + srcType = CONV_INT; + break; + case EbtUint8: + valu = unionArray[i].getU8Const(); + srcType = CONV_UINT; + break; + case EbtUint16: + valu = unionArray[i].getU16Const(); + srcType = CONV_UINT; + break; + case EbtUint: + valu = unionArray[i].getUConst(); + srcType = CONV_UINT; + break; + case EbtUint64: + valu = unionArray[i].getU64Const(); + srcType = CONV_UINT; + break; + case EbtBool: + valb = unionArray[i].getBConst(); + srcType = CONV_BOOL; + break; + default: + assert(0); + break; + } + + switch (returnType.getBasicType()) { + case EbtDouble: + case EbtFloat16: + case EbtFloat: + dstType = CONV_FLOAT; + break; + case EbtInt8: + case EbtInt16: + case EbtInt: + case EbtInt64: + dstType = CONV_INT; + break; + case EbtUint8: + case EbtUint16: + case EbtUint: + case EbtUint64: + dstType = CONV_UINT; + break; + case EbtBool: + dstType = CONV_BOOL; + break; + default: + assert(0); + break; + } + if (dstType == CONV_BOOL) { + switch (srcType) { + case CONV_FLOAT: + valb = (valf != 0.0); break; + case CONV_INT: + valb = (vali != 0.0); break; + case CONV_UINT: + valb = (valu != 0.0); break; + default: + break; + } + } else if (dstType == CONV_FLOAT) { + switch (srcType) { + case CONV_BOOL: + valf = (double)valb; break; + case CONV_INT: + valf = (double)vali; break; + case CONV_UINT: + valf = (double)valu; break; + default: + break; + } + } else if (dstType == CONV_INT) { + switch (srcType) { + case CONV_BOOL: + vali = (int64_t)valb; break; + case CONV_FLOAT: + vali = (int64_t)valf; break; + case CONV_UINT: + vali = (int64_t)valu; break; + default: + break; + } + } else if (dstType == CONV_UINT) { + switch (srcType) { + case CONV_BOOL: + valu = (uint64_t)valb; break; + case CONV_FLOAT: + valu = (uint64_t)valf; break; + case CONV_INT: + valu = (uint64_t)vali; break; + default: + break; + } + } + switch (returnType.getBasicType()) { + case EbtDouble: + case EbtFloat16: + case EbtFloat: + newConstArray[i].setDConst(valf); break; + case EbtInt8: + newConstArray[i].setI8Const(static_cast(vali)); break; + case EbtInt16: + newConstArray[i].setI16Const(static_cast(vali)); break; + case EbtInt: + newConstArray[i].setIConst(static_cast(vali)); break; + case EbtInt64: + newConstArray[i].setI64Const(vali); break; + case EbtUint8: + newConstArray[i].setU8Const(static_cast(valu)); break; + case EbtUint16: + newConstArray[i].setU16Const(static_cast(valu)); break; + case EbtUint: + newConstArray[i].setUConst(static_cast(valu)); break; + case EbtUint64: + newConstArray[i].setU64Const(valu); break; + case EbtBool: + newConstArray[i].setBConst(valb); break; + default: + assert(0); + break; + } + continue; + } switch (op) { case EOpNegative: switch (getType().getBasicType()) { @@ -507,7 +664,11 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, const TType& returnType) case EbtUint8: newConstArray[i].setU8Const(static_cast(-static_cast(unionArray[i].getU8Const()))); break; case EbtInt16: newConstArray[i].setI16Const(-unionArray[i].getI16Const()); break; case EbtUint16:newConstArray[i].setU16Const(static_cast(-static_cast(unionArray[i].getU16Const()))); break; - case EbtInt64: newConstArray[i].setI64Const(-unionArray[i].getI64Const()); break; + case EbtInt64: { + int64_t i64val = unionArray[i].getI64Const(); + newConstArray[i].setI64Const(i64val == INT64_MIN ? INT64_MIN : -i64val); + break; + } case EbtUint64: newConstArray[i].setU64Const(static_cast(-static_cast(unionArray[i].getU64Const()))); break; default: return nullptr; @@ -637,277 +798,6 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, const TType& returnType) break; } - case EOpConvIntToBool: - newConstArray[i].setBConst(unionArray[i].getIConst() != 0); break; - case EOpConvUintToBool: - newConstArray[i].setBConst(unionArray[i].getUConst() != 0); break; - case EOpConvBoolToInt: - newConstArray[i].setIConst(unionArray[i].getBConst()); break; - case EOpConvBoolToUint: - newConstArray[i].setUConst(unionArray[i].getBConst()); break; - case EOpConvIntToUint: - newConstArray[i].setUConst(unionArray[i].getIConst()); break; - case EOpConvUintToInt: - newConstArray[i].setIConst(unionArray[i].getUConst()); break; - - case EOpConvFloatToBool: - case EOpConvDoubleToBool: - newConstArray[i].setBConst(unionArray[i].getDConst() != 0); break; - - case EOpConvBoolToFloat: - case EOpConvBoolToDouble: - newConstArray[i].setDConst(unionArray[i].getBConst()); break; - - case EOpConvIntToFloat: - case EOpConvIntToDouble: - newConstArray[i].setDConst(unionArray[i].getIConst()); break; - - case EOpConvUintToFloat: - case EOpConvUintToDouble: - newConstArray[i].setDConst(unionArray[i].getUConst()); break; - - case EOpConvDoubleToFloat: - case EOpConvFloatToDouble: - newConstArray[i].setDConst(unionArray[i].getDConst()); break; - - case EOpConvFloatToUint: - case EOpConvDoubleToUint: - newConstArray[i].setUConst(static_cast(unionArray[i].getDConst())); break; - - case EOpConvFloatToInt: - case EOpConvDoubleToInt: - newConstArray[i].setIConst(static_cast(unionArray[i].getDConst())); break; - - case EOpConvInt8ToBool: - newConstArray[i].setBConst(unionArray[i].getI8Const() != 0); break; - case EOpConvUint8ToBool: - newConstArray[i].setBConst(unionArray[i].getU8Const() != 0); break; - case EOpConvInt16ToBool: - newConstArray[i].setBConst(unionArray[i].getI16Const() != 0); break; - case EOpConvUint16ToBool: - newConstArray[i].setBConst(unionArray[i].getU16Const() != 0); break; - case EOpConvInt64ToBool: - newConstArray[i].setBConst(unionArray[i].getI64Const() != 0); break; - case EOpConvUint64ToBool: - newConstArray[i].setBConst(unionArray[i].getU64Const() != 0); break; - case EOpConvFloat16ToBool: - newConstArray[i].setBConst(unionArray[i].getDConst() != 0); break; - - case EOpConvBoolToInt8: - newConstArray[i].setI8Const(unionArray[i].getBConst()); break; - case EOpConvBoolToUint8: - newConstArray[i].setU8Const(unionArray[i].getBConst()); break; - case EOpConvBoolToInt16: - newConstArray[i].setI16Const(unionArray[i].getBConst()); break; - case EOpConvBoolToUint16: - newConstArray[i].setU16Const(unionArray[i].getBConst()); break; - case EOpConvBoolToInt64: - newConstArray[i].setI64Const(unionArray[i].getBConst()); break; - case EOpConvBoolToUint64: - newConstArray[i].setU64Const(unionArray[i].getBConst()); break; - case EOpConvBoolToFloat16: - newConstArray[i].setDConst(unionArray[i].getBConst()); break; - - case EOpConvInt8ToInt16: - newConstArray[i].setI16Const(unionArray[i].getI8Const()); break; - case EOpConvInt8ToInt: - newConstArray[i].setIConst(unionArray[i].getI8Const()); break; - case EOpConvInt8ToInt64: - newConstArray[i].setI64Const(unionArray[i].getI8Const()); break; - case EOpConvInt8ToUint8: - newConstArray[i].setU8Const(unionArray[i].getI8Const()); break; - case EOpConvInt8ToUint16: - newConstArray[i].setU16Const(unionArray[i].getI8Const()); break; - case EOpConvInt8ToUint: - newConstArray[i].setUConst(unionArray[i].getI8Const()); break; - case EOpConvInt8ToUint64: - newConstArray[i].setU64Const(unionArray[i].getI8Const()); break; - case EOpConvUint8ToInt8: - newConstArray[i].setI8Const(unionArray[i].getU8Const()); break; - case EOpConvUint8ToInt16: - newConstArray[i].setI16Const(unionArray[i].getU8Const()); break; - case EOpConvUint8ToInt: - newConstArray[i].setIConst(unionArray[i].getU8Const()); break; - case EOpConvUint8ToInt64: - newConstArray[i].setI64Const(unionArray[i].getU8Const()); break; - case EOpConvUint8ToUint16: - newConstArray[i].setU16Const(unionArray[i].getU8Const()); break; - case EOpConvUint8ToUint: - newConstArray[i].setUConst(unionArray[i].getU8Const()); break; - case EOpConvUint8ToUint64: - newConstArray[i].setU64Const(unionArray[i].getU8Const()); break; - case EOpConvInt8ToFloat16: - newConstArray[i].setDConst(unionArray[i].getI8Const()); break; - case EOpConvInt8ToFloat: - newConstArray[i].setDConst(unionArray[i].getI8Const()); break; - case EOpConvInt8ToDouble: - newConstArray[i].setDConst(unionArray[i].getI8Const()); break; - case EOpConvUint8ToFloat16: - newConstArray[i].setDConst(unionArray[i].getU8Const()); break; - case EOpConvUint8ToFloat: - newConstArray[i].setDConst(unionArray[i].getU8Const()); break; - case EOpConvUint8ToDouble: - newConstArray[i].setDConst(unionArray[i].getU8Const()); break; - - case EOpConvInt16ToInt8: - newConstArray[i].setI8Const(static_cast(unionArray[i].getI16Const())); break; - case EOpConvInt16ToInt: - newConstArray[i].setIConst(unionArray[i].getI16Const()); break; - case EOpConvInt16ToInt64: - newConstArray[i].setI64Const(unionArray[i].getI16Const()); break; - case EOpConvInt16ToUint8: - newConstArray[i].setU8Const(static_cast(unionArray[i].getI16Const())); break; - case EOpConvInt16ToUint16: - newConstArray[i].setU16Const(unionArray[i].getI16Const()); break; - case EOpConvInt16ToUint: - newConstArray[i].setUConst(unionArray[i].getI16Const()); break; - case EOpConvInt16ToUint64: - newConstArray[i].setU64Const(unionArray[i].getI16Const()); break; - case EOpConvUint16ToInt8: - newConstArray[i].setI8Const(static_cast(unionArray[i].getU16Const())); break; - case EOpConvUint16ToInt16: - newConstArray[i].setI16Const(unionArray[i].getU16Const()); break; - case EOpConvUint16ToInt: - newConstArray[i].setIConst(unionArray[i].getU16Const()); break; - case EOpConvUint16ToInt64: - newConstArray[i].setI64Const(unionArray[i].getU16Const()); break; - case EOpConvUint16ToUint8: - newConstArray[i].setU8Const(static_cast(unionArray[i].getU16Const())); break; - - case EOpConvUint16ToUint: - newConstArray[i].setUConst(unionArray[i].getU16Const()); break; - case EOpConvUint16ToUint64: - newConstArray[i].setU64Const(unionArray[i].getU16Const()); break; - case EOpConvInt16ToFloat16: - newConstArray[i].setDConst(unionArray[i].getI16Const()); break; - case EOpConvInt16ToFloat: - newConstArray[i].setDConst(unionArray[i].getI16Const()); break; - case EOpConvInt16ToDouble: - newConstArray[i].setDConst(unionArray[i].getI16Const()); break; - case EOpConvUint16ToFloat16: - newConstArray[i].setDConst(unionArray[i].getU16Const()); break; - case EOpConvUint16ToFloat: - newConstArray[i].setDConst(unionArray[i].getU16Const()); break; - case EOpConvUint16ToDouble: - newConstArray[i].setDConst(unionArray[i].getU16Const()); break; - - case EOpConvIntToInt8: - newConstArray[i].setI8Const((signed char)unionArray[i].getIConst()); break; - case EOpConvIntToInt16: - newConstArray[i].setI16Const((signed short)unionArray[i].getIConst()); break; - case EOpConvIntToInt64: - newConstArray[i].setI64Const(unionArray[i].getIConst()); break; - case EOpConvIntToUint8: - newConstArray[i].setU8Const((unsigned char)unionArray[i].getIConst()); break; - case EOpConvIntToUint16: - newConstArray[i].setU16Const((unsigned char)unionArray[i].getIConst()); break; - case EOpConvIntToUint64: - newConstArray[i].setU64Const(unionArray[i].getIConst()); break; - - case EOpConvUintToInt8: - newConstArray[i].setI8Const((signed char)unionArray[i].getUConst()); break; - case EOpConvUintToInt16: - newConstArray[i].setI16Const((signed short)unionArray[i].getUConst()); break; - case EOpConvUintToInt64: - newConstArray[i].setI64Const(unionArray[i].getUConst()); break; - case EOpConvUintToUint8: - newConstArray[i].setU8Const((unsigned char)unionArray[i].getUConst()); break; - case EOpConvUintToUint16: - newConstArray[i].setU16Const((unsigned short)unionArray[i].getUConst()); break; - case EOpConvUintToUint64: - newConstArray[i].setU64Const(unionArray[i].getUConst()); break; - case EOpConvIntToFloat16: - newConstArray[i].setDConst(unionArray[i].getIConst()); break; - case EOpConvUintToFloat16: - newConstArray[i].setDConst(unionArray[i].getUConst()); break; - case EOpConvInt64ToInt8: - newConstArray[i].setI8Const(static_cast(unionArray[i].getI64Const())); break; - case EOpConvInt64ToInt16: - newConstArray[i].setI16Const(static_cast(unionArray[i].getI64Const())); break; - case EOpConvInt64ToInt: - newConstArray[i].setIConst(static_cast(unionArray[i].getI64Const())); break; - case EOpConvInt64ToUint8: - newConstArray[i].setU8Const(static_cast(unionArray[i].getI64Const())); break; - case EOpConvInt64ToUint16: - newConstArray[i].setU16Const(static_cast(unionArray[i].getI64Const())); break; - case EOpConvInt64ToUint: - newConstArray[i].setUConst(static_cast(unionArray[i].getI64Const())); break; - case EOpConvInt64ToUint64: - newConstArray[i].setU64Const(unionArray[i].getI64Const()); break; - case EOpConvUint64ToInt8: - newConstArray[i].setI8Const(static_cast(unionArray[i].getU64Const())); break; - case EOpConvUint64ToInt16: - newConstArray[i].setI16Const(static_cast(unionArray[i].getU64Const())); break; - case EOpConvUint64ToInt: - newConstArray[i].setIConst(static_cast(unionArray[i].getU64Const())); break; - case EOpConvUint64ToInt64: - newConstArray[i].setI64Const(unionArray[i].getU64Const()); break; - case EOpConvUint64ToUint8: - newConstArray[i].setU8Const(static_cast(unionArray[i].getU64Const())); break; - case EOpConvUint64ToUint16: - newConstArray[i].setU16Const(static_cast(unionArray[i].getU64Const())); break; - case EOpConvUint64ToUint: - newConstArray[i].setUConst(static_cast(unionArray[i].getU64Const())); break; - case EOpConvInt64ToFloat16: - newConstArray[i].setDConst(static_cast(unionArray[i].getI64Const())); break; - case EOpConvInt64ToFloat: - newConstArray[i].setDConst(static_cast(unionArray[i].getI64Const())); break; - case EOpConvInt64ToDouble: - newConstArray[i].setDConst(static_cast(unionArray[i].getI64Const())); break; - case EOpConvUint64ToFloat16: - newConstArray[i].setDConst(static_cast(unionArray[i].getU64Const())); break; - case EOpConvUint64ToFloat: - newConstArray[i].setDConst(static_cast(unionArray[i].getU64Const())); break; - case EOpConvUint64ToDouble: - newConstArray[i].setDConst(static_cast(unionArray[i].getU64Const())); break; - case EOpConvFloat16ToInt8: - newConstArray[i].setI8Const(static_cast(unionArray[i].getDConst())); break; - case EOpConvFloat16ToInt16: - newConstArray[i].setI16Const(static_cast(unionArray[i].getDConst())); break; - case EOpConvFloat16ToInt: - newConstArray[i].setIConst(static_cast(unionArray[i].getDConst())); break; - case EOpConvFloat16ToInt64: - newConstArray[i].setI64Const(static_cast(unionArray[i].getDConst())); break; - case EOpConvFloat16ToUint8: - newConstArray[i].setU8Const(static_cast(unionArray[i].getDConst())); break; - case EOpConvFloat16ToUint16: - newConstArray[i].setU16Const(static_cast(unionArray[i].getDConst())); break; - case EOpConvFloat16ToUint: - newConstArray[i].setUConst(static_cast(unionArray[i].getDConst())); break; - case EOpConvFloat16ToUint64: - newConstArray[i].setU64Const(static_cast(unionArray[i].getDConst())); break; - case EOpConvFloat16ToFloat: - newConstArray[i].setDConst(unionArray[i].getDConst()); break; - case EOpConvFloat16ToDouble: - newConstArray[i].setDConst(unionArray[i].getDConst()); break; - case EOpConvFloatToInt8: - newConstArray[i].setI8Const(static_cast(unionArray[i].getDConst())); break; - case EOpConvFloatToInt16: - newConstArray[i].setI16Const(static_cast(unionArray[i].getDConst())); break; - case EOpConvFloatToInt64: - newConstArray[i].setI64Const(static_cast(unionArray[i].getDConst())); break; - case EOpConvFloatToUint8: - newConstArray[i].setU8Const(static_cast(unionArray[i].getDConst())); break; - case EOpConvFloatToUint16: - newConstArray[i].setU16Const(static_cast(unionArray[i].getDConst())); break; - case EOpConvFloatToUint64: - newConstArray[i].setU64Const(static_cast(unionArray[i].getDConst())); break; - case EOpConvFloatToFloat16: - newConstArray[i].setDConst(unionArray[i].getDConst()); break; - case EOpConvDoubleToInt8: - newConstArray[i].setI8Const(static_cast(unionArray[i].getDConst())); break; - case EOpConvDoubleToInt16: - newConstArray[i].setI16Const(static_cast(unionArray[i].getDConst())); break; - case EOpConvDoubleToInt64: - newConstArray[i].setI64Const(static_cast(unionArray[i].getDConst())); break; - case EOpConvDoubleToUint8: - newConstArray[i].setU8Const(static_cast(unionArray[i].getDConst())); break; - case EOpConvDoubleToUint16: - newConstArray[i].setU16Const(static_cast(unionArray[i].getDConst())); break; - case EOpConvDoubleToUint64: - newConstArray[i].setU64Const(static_cast(unionArray[i].getDConst())); break; - case EOpConvDoubleToFloat16: - newConstArray[i].setDConst(unionArray[i].getDConst()); break; case EOpConvPtrToUint64: case EOpConvUint64ToPtr: case EOpConstructReference: @@ -1009,6 +899,12 @@ TIntermTyped* TIntermediate::fold(TIntermAggregate* aggrNode) objectSize = std::max(children[0]->getAsTyped()->getType().getVectorSize(), children[2]->getAsTyped()->getType().getVectorSize()); break; + case EOpMul: + { + TIntermConstantUnion* left = children[0]->getAsConstantUnion(); + TIntermConstantUnion* right = children[1]->getAsConstantUnion(); + return left->fold(EOpMul, right); + } default: return aggrNode; } @@ -1223,6 +1119,9 @@ TIntermTyped* TIntermediate::fold(TIntermAggregate* aggrNode) break; } case EOpDot: + if (!children[0]->getAsTyped()->isFloatingDomain()) { + return aggrNode; + } newConstArray[0].setDConst(childConstUnions[0].dot(childConstUnions[1])); break; case EOpCross: diff --git a/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/Initialize.cpp b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/Initialize.cpp index d8a969d77..8aebdba4f 100644 --- a/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/Initialize.cpp +++ b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/Initialize.cpp @@ -52,6 +52,7 @@ // #include +#include #include "Initialize.h" #include "span.h" @@ -117,12 +118,12 @@ enum ArgClass { ClassFIO = 1 << 9, // first argument is inout ClassRS = 1 << 10, // the return is held scalar as the arguments cycle ClassNS = 1 << 11, // no scalar prototype - ClassCV = 1 << 12, // first argument is 'coherent volatile' + ClassCVN = 1 << 12, // first argument is 'coherent volatile nontemporal' ClassFO = 1 << 13, // first argument is output ClassV3 = 1 << 14, // vec3 only }; // Mixtures of the above, to help the function tables -const ArgClass ClassV1FIOCV = (ArgClass)(ClassV1 | ClassFIO | ClassCV); +const ArgClass ClassV1FIOCVN = (ArgClass)(ClassV1 | ClassFIO | ClassCVN); const ArgClass ClassBNS = (ArgClass)(ClassB | ClassNS); const ArgClass ClassRSNS = (ArgClass)(ClassRS | ClassNS); @@ -245,14 +246,14 @@ const std::array BaseFunctions = { BuiltInFunction{ EOpGreaterThanEqual, "greaterThanEqual", 2, TypeU, ClassBNS, {Es300Desktop130Version} }, BuiltInFunction{ EOpVectorEqual, "equal", 2, TypeU, ClassBNS, {Es300Desktop130Version} }, BuiltInFunction{ EOpVectorNotEqual, "notEqual", 2, TypeU, ClassBNS, {Es300Desktop130Version} }, - BuiltInFunction{ EOpAtomicAdd, "atomicAdd", 2, TypeIU, ClassV1FIOCV, {Es310Desktop400Version} }, - BuiltInFunction{ EOpAtomicMin, "atomicMin", 2, TypeIU, ClassV1FIOCV, {Es310Desktop400Version} }, - BuiltInFunction{ EOpAtomicMax, "atomicMax", 2, TypeIU, ClassV1FIOCV, {Es310Desktop400Version} }, - BuiltInFunction{ EOpAtomicAnd, "atomicAnd", 2, TypeIU, ClassV1FIOCV, {Es310Desktop400Version} }, - BuiltInFunction{ EOpAtomicOr, "atomicOr", 2, TypeIU, ClassV1FIOCV, {Es310Desktop400Version} }, - BuiltInFunction{ EOpAtomicXor, "atomicXor", 2, TypeIU, ClassV1FIOCV, {Es310Desktop400Version} }, - BuiltInFunction{ EOpAtomicExchange, "atomicExchange", 2, TypeIU, ClassV1FIOCV, {Es310Desktop400Version} }, - BuiltInFunction{ EOpAtomicCompSwap, "atomicCompSwap", 3, TypeIU, ClassV1FIOCV, {Es310Desktop400Version} }, + BuiltInFunction{ EOpAtomicAdd, "atomicAdd", 2, TypeIU, ClassV1FIOCVN, {Es310Desktop400Version} }, + BuiltInFunction{ EOpAtomicMin, "atomicMin", 2, TypeIU, ClassV1FIOCVN, {Es310Desktop400Version} }, + BuiltInFunction{ EOpAtomicMax, "atomicMax", 2, TypeIU, ClassV1FIOCVN, {Es310Desktop400Version} }, + BuiltInFunction{ EOpAtomicAnd, "atomicAnd", 2, TypeIU, ClassV1FIOCVN, {Es310Desktop400Version} }, + BuiltInFunction{ EOpAtomicOr, "atomicOr", 2, TypeIU, ClassV1FIOCVN, {Es310Desktop400Version} }, + BuiltInFunction{ EOpAtomicXor, "atomicXor", 2, TypeIU, ClassV1FIOCVN, {Es310Desktop400Version} }, + BuiltInFunction{ EOpAtomicExchange, "atomicExchange", 2, TypeIU, ClassV1FIOCVN, {Es310Desktop400Version} }, + BuiltInFunction{ EOpAtomicCompSwap, "atomicCompSwap", 3, TypeIU, ClassV1FIOCVN, {Es310Desktop400Version} }, BuiltInFunction{ EOpMix, "mix", 3, TypeB, ClassRegular, {Es310Desktop450Version} }, BuiltInFunction{ EOpMix, "mix", 3, TypeIU, ClassLB, {Es310Desktop450Version} }, }; @@ -368,8 +369,8 @@ void AddTabledBuiltin(TString& decls, const BuiltInFunction& function) if (arg == function.numArguments - 1 && (function.classes & ClassLO)) decls.append("out "); if (arg == 0) { - if (function.classes & ClassCV) - decls.append("coherent volatile "); + if (function.classes & ClassCVN) + decls.append("coherent volatile nontemporal "); if (function.classes & ClassFIO) decls.append("inout "); if (function.classes & ClassFO) @@ -1352,130 +1353,130 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV if ((profile == EEsProfile && version >= 310) || (profile != EEsProfile && version >= 430)) { commonBuiltins.append( - "uint atomicAdd(coherent volatile inout uint, uint, int, int, int);" - " int atomicAdd(coherent volatile inout int, int, int, int, int);" + "uint atomicAdd(coherent volatile nontemporal inout uint, uint, int, int, int);" + " int atomicAdd(coherent volatile nontemporal inout int, int, int, int, int);" - "uint atomicMin(coherent volatile inout uint, uint, int, int, int);" - " int atomicMin(coherent volatile inout int, int, int, int, int);" + "uint atomicMin(coherent volatile nontemporal inout uint, uint, int, int, int);" + " int atomicMin(coherent volatile nontemporal inout int, int, int, int, int);" - "uint atomicMax(coherent volatile inout uint, uint, int, int, int);" - " int atomicMax(coherent volatile inout int, int, int, int, int);" + "uint atomicMax(coherent volatile nontemporal inout uint, uint, int, int, int);" + " int atomicMax(coherent volatile nontemporal inout int, int, int, int, int);" - "uint atomicAnd(coherent volatile inout uint, uint, int, int, int);" - " int atomicAnd(coherent volatile inout int, int, int, int, int);" + "uint atomicAnd(coherent volatile nontemporal inout uint, uint, int, int, int);" + " int atomicAnd(coherent volatile nontemporal inout int, int, int, int, int);" - "uint atomicOr (coherent volatile inout uint, uint, int, int, int);" - " int atomicOr (coherent volatile inout int, int, int, int, int);" + "uint atomicOr (coherent volatile nontemporal inout uint, uint, int, int, int);" + " int atomicOr (coherent volatile nontemporal inout int, int, int, int, int);" - "uint atomicXor(coherent volatile inout uint, uint, int, int, int);" - " int atomicXor(coherent volatile inout int, int, int, int, int);" + "uint atomicXor(coherent volatile nontemporal inout uint, uint, int, int, int);" + " int atomicXor(coherent volatile nontemporal inout int, int, int, int, int);" - "uint atomicExchange(coherent volatile inout uint, uint, int, int, int);" - " int atomicExchange(coherent volatile inout int, int, int, int, int);" + "uint atomicExchange(coherent volatile nontemporal inout uint, uint, int, int, int);" + " int atomicExchange(coherent volatile nontemporal inout int, int, int, int, int);" - "uint atomicCompSwap(coherent volatile inout uint, uint, uint, int, int, int, int, int);" - " int atomicCompSwap(coherent volatile inout int, int, int, int, int, int, int, int);" + "uint atomicCompSwap(coherent volatile nontemporal inout uint, uint, uint, int, int, int, int, int);" + " int atomicCompSwap(coherent volatile nontemporal inout int, int, int, int, int, int, int, int);" - "uint atomicLoad(coherent volatile in uint, int, int, int);" - " int atomicLoad(coherent volatile in int, int, int, int);" + "uint atomicLoad(coherent volatile nontemporal in uint, int, int, int);" + " int atomicLoad(coherent volatile nontemporal in int, int, int, int);" - "void atomicStore(coherent volatile out uint, uint, int, int, int);" - "void atomicStore(coherent volatile out int, int, int, int, int);" + "void atomicStore(coherent volatile nontemporal out uint, uint, int, int, int);" + "void atomicStore(coherent volatile nontemporal out int, int, int, int, int);" "\n"); } if (profile != EEsProfile && version >= 440) { commonBuiltins.append( - "uint64_t atomicMin(coherent volatile inout uint64_t, uint64_t);" - " int64_t atomicMin(coherent volatile inout int64_t, int64_t);" - "uint64_t atomicMin(coherent volatile inout uint64_t, uint64_t, int, int, int);" - " int64_t atomicMin(coherent volatile inout int64_t, int64_t, int, int, int);" - "float16_t atomicMin(coherent volatile inout float16_t, float16_t);" - "float16_t atomicMin(coherent volatile inout float16_t, float16_t, int, int, int);" - " float atomicMin(coherent volatile inout float, float);" - " float atomicMin(coherent volatile inout float, float, int, int, int);" - " double atomicMin(coherent volatile inout double, double);" - " double atomicMin(coherent volatile inout double, double, int, int, int);" + "uint64_t atomicMin(coherent volatile nontemporal inout uint64_t, uint64_t);" + " int64_t atomicMin(coherent volatile nontemporal inout int64_t, int64_t);" + "uint64_t atomicMin(coherent volatile nontemporal inout uint64_t, uint64_t, int, int, int);" + " int64_t atomicMin(coherent volatile nontemporal inout int64_t, int64_t, int, int, int);" + "float16_t atomicMin(coherent volatile nontemporal inout float16_t, float16_t);" + "float16_t atomicMin(coherent volatile nontemporal inout float16_t, float16_t, int, int, int);" + " float atomicMin(coherent volatile nontemporal inout float, float);" + " float atomicMin(coherent volatile nontemporal inout float, float, int, int, int);" + " double atomicMin(coherent volatile nontemporal inout double, double);" + " double atomicMin(coherent volatile nontemporal inout double, double, int, int, int);" - "uint64_t atomicMax(coherent volatile inout uint64_t, uint64_t);" - " int64_t atomicMax(coherent volatile inout int64_t, int64_t);" - "uint64_t atomicMax(coherent volatile inout uint64_t, uint64_t, int, int, int);" - " int64_t atomicMax(coherent volatile inout int64_t, int64_t, int, int, int);" - "float16_t atomicMax(coherent volatile inout float16_t, float16_t);" - "float16_t atomicMax(coherent volatile inout float16_t, float16_t, int, int, int);" - " float atomicMax(coherent volatile inout float, float);" - " float atomicMax(coherent volatile inout float, float, int, int, int);" - " double atomicMax(coherent volatile inout double, double);" - " double atomicMax(coherent volatile inout double, double, int, int, int);" + "uint64_t atomicMax(coherent volatile nontemporal inout uint64_t, uint64_t);" + " int64_t atomicMax(coherent volatile nontemporal inout int64_t, int64_t);" + "uint64_t atomicMax(coherent volatile nontemporal inout uint64_t, uint64_t, int, int, int);" + " int64_t atomicMax(coherent volatile nontemporal inout int64_t, int64_t, int, int, int);" + "float16_t atomicMax(coherent volatile nontemporal inout float16_t, float16_t);" + "float16_t atomicMax(coherent volatile nontemporal inout float16_t, float16_t, int, int, int);" + " float atomicMax(coherent volatile nontemporal inout float, float);" + " float atomicMax(coherent volatile nontemporal inout float, float, int, int, int);" + " double atomicMax(coherent volatile nontemporal inout double, double);" + " double atomicMax(coherent volatile nontemporal inout double, double, int, int, int);" - "uint64_t atomicAnd(coherent volatile inout uint64_t, uint64_t);" - " int64_t atomicAnd(coherent volatile inout int64_t, int64_t);" - "uint64_t atomicAnd(coherent volatile inout uint64_t, uint64_t, int, int, int);" - " int64_t atomicAnd(coherent volatile inout int64_t, int64_t, int, int, int);" + "uint64_t atomicAnd(coherent volatile nontemporal inout uint64_t, uint64_t);" + " int64_t atomicAnd(coherent volatile nontemporal inout int64_t, int64_t);" + "uint64_t atomicAnd(coherent volatile nontemporal inout uint64_t, uint64_t, int, int, int);" + " int64_t atomicAnd(coherent volatile nontemporal inout int64_t, int64_t, int, int, int);" - "uint64_t atomicOr (coherent volatile inout uint64_t, uint64_t);" - " int64_t atomicOr (coherent volatile inout int64_t, int64_t);" - "uint64_t atomicOr (coherent volatile inout uint64_t, uint64_t, int, int, int);" - " int64_t atomicOr (coherent volatile inout int64_t, int64_t, int, int, int);" + "uint64_t atomicOr (coherent volatile nontemporal inout uint64_t, uint64_t);" + " int64_t atomicOr (coherent volatile nontemporal inout int64_t, int64_t);" + "uint64_t atomicOr (coherent volatile nontemporal inout uint64_t, uint64_t, int, int, int);" + " int64_t atomicOr (coherent volatile nontemporal inout int64_t, int64_t, int, int, int);" - "uint64_t atomicXor(coherent volatile inout uint64_t, uint64_t);" - " int64_t atomicXor(coherent volatile inout int64_t, int64_t);" - "uint64_t atomicXor(coherent volatile inout uint64_t, uint64_t, int, int, int);" - " int64_t atomicXor(coherent volatile inout int64_t, int64_t, int, int, int);" + "uint64_t atomicXor(coherent volatile nontemporal inout uint64_t, uint64_t);" + " int64_t atomicXor(coherent volatile nontemporal inout int64_t, int64_t);" + "uint64_t atomicXor(coherent volatile nontemporal inout uint64_t, uint64_t, int, int, int);" + " int64_t atomicXor(coherent volatile nontemporal inout int64_t, int64_t, int, int, int);" - "uint64_t atomicAdd(coherent volatile inout uint64_t, uint64_t);" - " 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);" - "float16_t atomicAdd(coherent volatile inout float16_t, float16_t);" - "float16_t atomicAdd(coherent volatile inout float16_t, float16_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 atomicAdd(coherent volatile nontemporal inout uint64_t, uint64_t);" + " int64_t atomicAdd(coherent volatile nontemporal inout int64_t, int64_t);" + "uint64_t atomicAdd(coherent volatile nontemporal inout uint64_t, uint64_t, int, int, int);" + " int64_t atomicAdd(coherent volatile nontemporal inout int64_t, int64_t, int, int, int);" + "float16_t atomicAdd(coherent volatile nontemporal inout float16_t, float16_t);" + "float16_t atomicAdd(coherent volatile nontemporal inout float16_t, float16_t, int, int, int);" + " float atomicAdd(coherent volatile nontemporal inout float, float);" + " float atomicAdd(coherent volatile nontemporal inout float, float, int, int, int);" + " double atomicAdd(coherent volatile nontemporal inout double, double);" + " double atomicAdd(coherent volatile nontemporal 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);" - "float16_t atomicExchange(coherent volatile inout float16_t, float16_t);" - "float16_t atomicExchange(coherent volatile inout float16_t, float16_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 atomicExchange(coherent volatile nontemporal inout uint64_t, uint64_t);" + " int64_t atomicExchange(coherent volatile nontemporal inout int64_t, int64_t);" + "uint64_t atomicExchange(coherent volatile nontemporal inout uint64_t, uint64_t, int, int, int);" + " int64_t atomicExchange(coherent volatile nontemporal inout int64_t, int64_t, int, int, int);" + "float16_t atomicExchange(coherent volatile nontemporal inout float16_t, float16_t);" + "float16_t atomicExchange(coherent volatile nontemporal inout float16_t, float16_t, int, int, int);" + " float atomicExchange(coherent volatile nontemporal inout float, float);" + " float atomicExchange(coherent volatile nontemporal inout float, float, int, int, int);" + " double atomicExchange(coherent volatile nontemporal inout double, double);" + " double atomicExchange(coherent volatile nontemporal 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);" - "uint64_t atomicCompSwap(coherent volatile inout uint64_t, uint64_t, uint64_t, int, int, int, int, int);" - " int64_t atomicCompSwap(coherent volatile inout int64_t, int64_t, int64_t, int, int, int, int, int);" + "uint64_t atomicCompSwap(coherent volatile nontemporal inout uint64_t, uint64_t, uint64_t);" + " int64_t atomicCompSwap(coherent volatile nontemporal inout int64_t, int64_t, int64_t);" + "uint64_t atomicCompSwap(coherent volatile nontemporal inout uint64_t, uint64_t, uint64_t, int, int, int, int, int);" + " int64_t atomicCompSwap(coherent volatile nontemporal inout int64_t, int64_t, int64_t, int, int, int, int, int);" - "uint64_t atomicLoad(coherent volatile in uint64_t, int, int, int);" - " int64_t atomicLoad(coherent volatile in int64_t, int, int, int);" - "float16_t atomicLoad(coherent volatile in float16_t, int, int, int);" - " float atomicLoad(coherent volatile in float, int, int, int);" - " double atomicLoad(coherent volatile in double, int, int, int);" + "uint64_t atomicLoad(coherent volatile nontemporal in uint64_t, int, int, int);" + " int64_t atomicLoad(coherent volatile nontemporal in int64_t, int, int, int);" + "float16_t atomicLoad(coherent volatile nontemporal in float16_t, int, int, int);" + " float atomicLoad(coherent volatile nontemporal in float, int, int, int);" + " double atomicLoad(coherent volatile nontemporal 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 float16_t, float16_t, int, int, int);" - "void atomicStore(coherent volatile out float, float, int, int, int);" - "void atomicStore(coherent volatile out double, double, int, int, int);" + "void atomicStore(coherent volatile nontemporal out uint64_t, uint64_t, int, int, int);" + "void atomicStore(coherent volatile nontemporal out int64_t, int64_t, int, int, int);" + "void atomicStore(coherent volatile nontemporal out float16_t, float16_t, int, int, int);" + "void atomicStore(coherent volatile nontemporal out float, float, int, int, int);" + "void atomicStore(coherent volatile nontemporal out double, double, int, int, int);" "\n"); } // NV_shader_atomic_fp16_vector if (profile != EEsProfile && version >= 430) { commonBuiltins.append( - "f16vec2 atomicAdd(coherent volatile inout f16vec2, f16vec2);" - "f16vec4 atomicAdd(coherent volatile inout f16vec4, f16vec4);" - "f16vec2 atomicMin(coherent volatile inout f16vec2, f16vec2);" - "f16vec4 atomicMin(coherent volatile inout f16vec4, f16vec4);" - "f16vec2 atomicMax(coherent volatile inout f16vec2, f16vec2);" - "f16vec4 atomicMax(coherent volatile inout f16vec4, f16vec4);" - "f16vec2 atomicExchange(coherent volatile inout f16vec2, f16vec2);" - "f16vec4 atomicExchange(coherent volatile inout f16vec4, f16vec4);" + "f16vec2 atomicAdd(coherent volatile nontemporal inout f16vec2, f16vec2);" + "f16vec4 atomicAdd(coherent volatile nontemporal inout f16vec4, f16vec4);" + "f16vec2 atomicMin(coherent volatile nontemporal inout f16vec2, f16vec2);" + "f16vec4 atomicMin(coherent volatile nontemporal inout f16vec4, f16vec4);" + "f16vec2 atomicMax(coherent volatile nontemporal inout f16vec2, f16vec2);" + "f16vec4 atomicMax(coherent volatile nontemporal inout f16vec4, f16vec4);" + "f16vec2 atomicExchange(coherent volatile nontemporal inout f16vec2, f16vec2);" + "f16vec4 atomicExchange(coherent volatile nontemporal inout f16vec4, f16vec4);" "\n"); } @@ -1864,29 +1865,29 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV else if (spvVersion.vulkanRelaxed) { // // Atomic counter functions act as aliases to normal atomic functions. - // replace definitions to take 'volatile coherent uint' instead of 'atomic_uint' + // replace definitions to take 'volatile coherent nontemporal uint' instead of 'atomic_uint' // and map to equivalent non-counter atomic op // if ((profile != EEsProfile && version >= 300) || (profile == EEsProfile && version >= 310)) { commonBuiltins.append( - "uint atomicCounterIncrement(volatile coherent uint);" - "uint atomicCounterDecrement(volatile coherent uint);" - "uint atomicCounter(volatile coherent uint);" + "uint atomicCounterIncrement(volatile coherent nontemporal uint);" + "uint atomicCounterDecrement(volatile coherent nontemporal uint);" + "uint atomicCounter(volatile coherent nontemporal uint);" "\n"); } if (profile != EEsProfile && version >= 460) { commonBuiltins.append( - "uint atomicCounterAdd(volatile coherent uint, uint);" - "uint atomicCounterSubtract(volatile coherent uint, uint);" - "uint atomicCounterMin(volatile coherent uint, uint);" - "uint atomicCounterMax(volatile coherent uint, uint);" - "uint atomicCounterAnd(volatile coherent uint, uint);" - "uint atomicCounterOr(volatile coherent uint, uint);" - "uint atomicCounterXor(volatile coherent uint, uint);" - "uint atomicCounterExchange(volatile coherent uint, uint);" - "uint atomicCounterCompSwap(volatile coherent uint, uint, uint);" + "uint atomicCounterAdd(volatile coherent nontemporal uint, uint);" + "uint atomicCounterSubtract(volatile coherent nontemporal uint, uint);" + "uint atomicCounterMin(volatile coherent nontemporal uint, uint);" + "uint atomicCounterMax(volatile coherent nontemporal uint, uint);" + "uint atomicCounterAnd(volatile coherent nontemporal uint, uint);" + "uint atomicCounterOr(volatile coherent nontemporal uint, uint);" + "uint atomicCounterXor(volatile coherent nontemporal uint, uint);" + "uint atomicCounterExchange(volatile coherent nontemporal uint, uint);" + "uint atomicCounterCompSwap(volatile coherent nontemporal uint, uint, uint);" "\n"); } @@ -2081,6 +2082,143 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "\n"); } + // GL_EXT_integer_dot_product + if ((profile == EEsProfile && version >= 300) || + (profile != EEsProfile && version >= 450)) { + commonBuiltins.append( + + "uint dotEXT(uvec2 a, uvec2 b);" + "int dotEXT(ivec2 a, ivec2 b);" + "int dotEXT(ivec2 a, uvec2 b);" + "int dotEXT(uvec2 a, ivec2 b);" + + "uint dotEXT(uvec3 a, uvec3 b);" + "int dotEXT(ivec3 a, ivec3 b);" + "int dotEXT(ivec3 a, uvec3 b);" + "int dotEXT(uvec3 a, ivec3 b);" + + "uint dotEXT(uvec4 a, uvec4 b);" + "int dotEXT(ivec4 a, ivec4 b);" + "int dotEXT(ivec4 a, uvec4 b);" + "int dotEXT(uvec4 a, ivec4 b);" + + "uint dotPacked4x8EXT(uint a, uint b);" + "int dotPacked4x8EXT(int a, uint b);" + "int dotPacked4x8EXT(uint a, int b);" + "int dotPacked4x8EXT(int a, int b);" + + "uint dotEXT(u8vec2 a, u8vec2 b);" + "int dotEXT(i8vec2 a, u8vec2 b);" + "int dotEXT(u8vec2 a, i8vec2 b);" + "int dotEXT(i8vec2 a, i8vec2 b);" + + "uint dotEXT(u8vec3 a, u8vec3 b);" + "int dotEXT(i8vec3 a, u8vec3 b);" + "int dotEXT(u8vec3 a, i8vec3 b);" + "int dotEXT(i8vec3 a, i8vec3 b);" + + "uint dotEXT(u8vec4 a, u8vec4 b);" + "int dotEXT(i8vec4 a, u8vec4 b);" + "int dotEXT(u8vec4 a, i8vec4 b);" + "int dotEXT(i8vec4 a, i8vec4 b);" + + "uint dotEXT(u16vec2 a, u16vec2 b);" + "int dotEXT(i16vec2 a, u16vec2 b);" + "int dotEXT(u16vec2 a, i16vec2 b);" + "int dotEXT(i16vec2 a, i16vec2 b);" + + "uint dotEXT(u16vec3 a, u16vec3 b);" + "int dotEXT(i16vec3 a, u16vec3 b);" + "int dotEXT(u16vec3 a, i16vec3 b);" + "int dotEXT(i16vec3 a, i16vec3 b);" + + "uint dotEXT(u16vec4 a, u16vec4 b);" + "int dotEXT(i16vec4 a, u16vec4 b);" + "int dotEXT(u16vec4 a, i16vec4 b);" + "int dotEXT(i16vec4 a, i16vec4 b);" + + "uint64_t dotEXT(u64vec2 a, u64vec2 b);" + "int64_t dotEXT(i64vec2 a, u64vec2 b);" + "int64_t dotEXT(u64vec2 a, i64vec2 b);" + "int64_t dotEXT(i64vec2 a, i64vec2 b);" + + "uint64_t dotEXT(u64vec3 a, u64vec3 b);" + "int64_t dotEXT(i64vec3 a, u64vec3 b);" + "int64_t dotEXT(u64vec3 a, i64vec3 b);" + "int64_t dotEXT(i64vec3 a, i64vec3 b);" + + "uint64_t dotEXT(u64vec4 a, u64vec4 b);" + "int64_t dotEXT(i64vec4 a, u64vec4 b);" + "int64_t dotEXT(u64vec4 a, i64vec4 b);" + "int64_t dotEXT(i64vec4 a, i64vec4 b);" + + "uint dotAccSatEXT(uvec2 a, uvec2 b, uint c);" + "int dotAccSatEXT(ivec2 a, uvec2 b, int c);" + "int dotAccSatEXT(uvec2 a, ivec2 b, int c);" + "int dotAccSatEXT(ivec2 a, ivec2 b, int c);" + + "uint dotAccSatEXT(uvec3 a, uvec3 b, uint c);" + "int dotAccSatEXT(ivec3 a, uvec3 b, int c);" + "int dotAccSatEXT(uvec3 a, ivec3 b, int c);" + "int dotAccSatEXT(ivec3 a, ivec3 b, int c);" + + "uint dotAccSatEXT(uvec4 a, uvec4 b, uint c);" + "int dotAccSatEXT(ivec4 a, uvec4 b, int c);" + "int dotAccSatEXT(uvec4 a, ivec4 b, int c);" + "int dotAccSatEXT(ivec4 a, ivec4 b, int c);" + + "uint dotPacked4x8AccSatEXT(uint a, uint b, uint c);" + "int dotPacked4x8AccSatEXT(int a, uint b, int c);" + "int dotPacked4x8AccSatEXT(uint a, int b, int c);" + "int dotPacked4x8AccSatEXT(int a, int b, int c);" + + "uint dotAccSatEXT(u8vec2 a, u8vec2 b, uint c);" + "int dotAccSatEXT(i8vec2 a, u8vec2 b, int c);" + "int dotAccSatEXT(u8vec2 a, i8vec2 b, int c);" + "int dotAccSatEXT(i8vec2 a, i8vec2 b, int c);" + + "uint dotAccSatEXT(u8vec3 a, u8vec3 b, uint c);" + "int dotAccSatEXT(i8vec3 a, u8vec3 b, int c);" + "int dotAccSatEXT(u8vec3 a, i8vec3 b, int c);" + "int dotAccSatEXT(i8vec3 a, i8vec3 b, int c);" + + "uint dotAccSatEXT(u8vec4 a, u8vec4 b, uint c);" + "int dotAccSatEXT(i8vec4 a, u8vec4 b, int c);" + "int dotAccSatEXT(u8vec4 a, i8vec4 b, int c);" + "int dotAccSatEXT(i8vec4 a, i8vec4 b, int c);" + + "uint dotAccSatEXT(u16vec2 a, u16vec2 b, uint c);" + "int dotAccSatEXT(i16vec2 a, u16vec2 b, int c);" + "int dotAccSatEXT(u16vec2 a, i16vec2 b, int c);" + "int dotAccSatEXT(i16vec2 a, i16vec2 b, int c);" + + "uint dotAccSatEXT(u16vec3 a, u16vec3 b, uint c);" + "int dotAccSatEXT(i16vec3 a, u16vec3 b, int c);" + "int dotAccSatEXT(u16vec3 a, i16vec3 b, int c);" + "int dotAccSatEXT(i16vec3 a, i16vec3 b, int c);" + + "uint dotAccSatEXT(u16vec4 a, u16vec4 b, uint c);" + "int dotAccSatEXT(i16vec4 a, u16vec4 b, int c);" + "int dotAccSatEXT(u16vec4 a, i16vec4 b, int c);" + "int dotAccSatEXT(i16vec4 a, i16vec4 b, int c);" + + "uint64_t dotAccSatEXT(u64vec2 a, u64vec2 b, uint64_t c);" + "int64_t dotAccSatEXT(i64vec2 a, u64vec2 b, int64_t c);" + "int64_t dotAccSatEXT(u64vec2 a, i64vec2 b, int64_t c);" + "int64_t dotAccSatEXT(i64vec2 a, i64vec2 b, int64_t c);" + + "uint64_t dotAccSatEXT(u64vec3 a, u64vec3 b, uint64_t c);" + "int64_t dotAccSatEXT(i64vec3 a, u64vec3 b, int64_t c);" + "int64_t dotAccSatEXT(u64vec3 a, i64vec3 b, int64_t c);" + "int64_t dotAccSatEXT(i64vec3 a, i64vec3 b, int64_t c);" + + "uint64_t dotAccSatEXT(u64vec4 a, u64vec4 b, uint64_t c);" + "int64_t dotAccSatEXT(i64vec4 a, u64vec4 b, int64_t c);" + "int64_t dotAccSatEXT(u64vec4 a, i64vec4 b, int64_t c);" + "int64_t dotAccSatEXT(i64vec4 a, i64vec4 b, int64_t c);" + "\n"); + } + // GL_KHR_shader_subgroup if ((profile == EEsProfile && version >= 310) || (profile != EEsProfile && version >= 140)) { @@ -4397,159 +4535,117 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV // adding it introduces undesirable tempArgs on the stack. What we want // is more like "buf" thought of as a pointer value being an in parameter. stageBuiltins[EShLangCompute].append( - "void coopMatLoadNV(out fcoopmatNV m, volatile coherent float16_t[] buf, uint element, uint stride, bool colMajor);\n" - "void coopMatLoadNV(out fcoopmatNV m, volatile coherent float[] buf, uint element, uint stride, bool colMajor);\n" - "void coopMatLoadNV(out fcoopmatNV m, volatile coherent uint8_t[] buf, uint element, uint stride, bool colMajor);\n" - "void coopMatLoadNV(out fcoopmatNV m, volatile coherent uint16_t[] buf, uint element, uint stride, bool colMajor);\n" - "void coopMatLoadNV(out fcoopmatNV m, volatile coherent uint[] buf, uint element, uint stride, bool colMajor);\n" - "void coopMatLoadNV(out fcoopmatNV m, volatile coherent uint64_t[] buf, uint element, uint stride, bool colMajor);\n" - "void coopMatLoadNV(out fcoopmatNV m, volatile coherent uvec2[] buf, uint element, uint stride, bool colMajor);\n" - "void coopMatLoadNV(out fcoopmatNV m, volatile coherent uvec4[] buf, uint element, uint stride, bool colMajor);\n" + "void coopMatLoadNV(out fcoopmatNV m, volatile coherent nontemporal float16_t[] buf, uint element, uint stride, bool colMajor);\n" + "void coopMatLoadNV(out fcoopmatNV m, volatile coherent nontemporal float[] buf, uint element, uint stride, bool colMajor);\n" + "void coopMatLoadNV(out fcoopmatNV m, volatile coherent nontemporal uint8_t[] buf, uint element, uint stride, bool colMajor);\n" + "void coopMatLoadNV(out fcoopmatNV m, volatile coherent nontemporal uint16_t[] buf, uint element, uint stride, bool colMajor);\n" + "void coopMatLoadNV(out fcoopmatNV m, volatile coherent nontemporal uint[] buf, uint element, uint stride, bool colMajor);\n" + "void coopMatLoadNV(out fcoopmatNV m, volatile coherent nontemporal uint64_t[] buf, uint element, uint stride, bool colMajor);\n" + "void coopMatLoadNV(out fcoopmatNV m, volatile coherent nontemporal uvec2[] buf, uint element, uint stride, bool colMajor);\n" + "void coopMatLoadNV(out fcoopmatNV m, volatile coherent nontemporal uvec4[] buf, uint element, uint stride, bool colMajor);\n" - "void coopMatStoreNV(fcoopmatNV m, volatile coherent float16_t[] buf, uint element, uint stride, bool colMajor);\n" - "void coopMatStoreNV(fcoopmatNV m, volatile coherent float[] buf, uint element, uint stride, bool colMajor);\n" - "void coopMatStoreNV(fcoopmatNV m, volatile coherent float64_t[] buf, uint element, uint stride, bool colMajor);\n" - "void coopMatStoreNV(fcoopmatNV m, volatile coherent uint8_t[] buf, uint element, uint stride, bool colMajor);\n" - "void coopMatStoreNV(fcoopmatNV m, volatile coherent uint16_t[] buf, uint element, uint stride, bool colMajor);\n" - "void coopMatStoreNV(fcoopmatNV m, volatile coherent uint[] buf, uint element, uint stride, bool colMajor);\n" - "void coopMatStoreNV(fcoopmatNV m, volatile coherent uint64_t[] buf, uint element, uint stride, bool colMajor);\n" - "void coopMatStoreNV(fcoopmatNV m, volatile coherent uvec2[] buf, uint element, uint stride, bool colMajor);\n" - "void coopMatStoreNV(fcoopmatNV m, volatile coherent uvec4[] buf, uint element, uint stride, bool colMajor);\n" + "void coopMatStoreNV(fcoopmatNV m, volatile coherent nontemporal float16_t[] buf, uint element, uint stride, bool colMajor);\n" + "void coopMatStoreNV(fcoopmatNV m, volatile coherent nontemporal float[] buf, uint element, uint stride, bool colMajor);\n" + "void coopMatStoreNV(fcoopmatNV m, volatile coherent nontemporal float64_t[] buf, uint element, uint stride, bool colMajor);\n" + "void coopMatStoreNV(fcoopmatNV m, volatile coherent nontemporal uint8_t[] buf, uint element, uint stride, bool colMajor);\n" + "void coopMatStoreNV(fcoopmatNV m, volatile coherent nontemporal uint16_t[] buf, uint element, uint stride, bool colMajor);\n" + "void coopMatStoreNV(fcoopmatNV m, volatile coherent nontemporal uint[] buf, uint element, uint stride, bool colMajor);\n" + "void coopMatStoreNV(fcoopmatNV m, volatile coherent nontemporal uint64_t[] buf, uint element, uint stride, bool colMajor);\n" + "void coopMatStoreNV(fcoopmatNV m, volatile coherent nontemporal uvec2[] buf, uint element, uint stride, bool colMajor);\n" + "void coopMatStoreNV(fcoopmatNV m, volatile coherent nontemporal uvec4[] buf, uint element, uint stride, bool colMajor);\n" "fcoopmatNV coopMatMulAddNV(fcoopmatNV A, fcoopmatNV B, fcoopmatNV C);\n" - "void coopMatLoadNV(out icoopmatNV m, volatile coherent int8_t[] buf, uint element, uint stride, bool colMajor);\n" - "void coopMatLoadNV(out icoopmatNV m, volatile coherent int16_t[] buf, uint element, uint stride, bool colMajor);\n" - "void coopMatLoadNV(out icoopmatNV m, volatile coherent int[] buf, uint element, uint stride, bool colMajor);\n" - "void coopMatLoadNV(out icoopmatNV m, volatile coherent int64_t[] buf, uint element, uint stride, bool colMajor);\n" - "void coopMatLoadNV(out icoopmatNV m, volatile coherent ivec2[] buf, uint element, uint stride, bool colMajor);\n" - "void coopMatLoadNV(out icoopmatNV m, volatile coherent ivec4[] buf, uint element, uint stride, bool colMajor);\n" - "void coopMatLoadNV(out icoopmatNV m, volatile coherent uint8_t[] buf, uint element, uint stride, bool colMajor);\n" - "void coopMatLoadNV(out icoopmatNV m, volatile coherent uint16_t[] buf, uint element, uint stride, bool colMajor);\n" - "void coopMatLoadNV(out icoopmatNV m, volatile coherent uint[] buf, uint element, uint stride, bool colMajor);\n" - "void coopMatLoadNV(out icoopmatNV m, volatile coherent uint64_t[] buf, uint element, uint stride, bool colMajor);\n" - "void coopMatLoadNV(out icoopmatNV m, volatile coherent uvec2[] buf, uint element, uint stride, bool colMajor);\n" - "void coopMatLoadNV(out icoopmatNV m, volatile coherent uvec4[] buf, uint element, uint stride, bool colMajor);\n" + "void coopMatLoadNV(out icoopmatNV m, volatile coherent nontemporal int8_t[] buf, uint element, uint stride, bool colMajor);\n" + "void coopMatLoadNV(out icoopmatNV m, volatile coherent nontemporal int16_t[] buf, uint element, uint stride, bool colMajor);\n" + "void coopMatLoadNV(out icoopmatNV m, volatile coherent nontemporal int[] buf, uint element, uint stride, bool colMajor);\n" + "void coopMatLoadNV(out icoopmatNV m, volatile coherent nontemporal int64_t[] buf, uint element, uint stride, bool colMajor);\n" + "void coopMatLoadNV(out icoopmatNV m, volatile coherent nontemporal ivec2[] buf, uint element, uint stride, bool colMajor);\n" + "void coopMatLoadNV(out icoopmatNV m, volatile coherent nontemporal ivec4[] buf, uint element, uint stride, bool colMajor);\n" + "void coopMatLoadNV(out icoopmatNV m, volatile coherent nontemporal uint8_t[] buf, uint element, uint stride, bool colMajor);\n" + "void coopMatLoadNV(out icoopmatNV m, volatile coherent nontemporal uint16_t[] buf, uint element, uint stride, bool colMajor);\n" + "void coopMatLoadNV(out icoopmatNV m, volatile coherent nontemporal uint[] buf, uint element, uint stride, bool colMajor);\n" + "void coopMatLoadNV(out icoopmatNV m, volatile coherent nontemporal uint64_t[] buf, uint element, uint stride, bool colMajor);\n" + "void coopMatLoadNV(out icoopmatNV m, volatile coherent nontemporal uvec2[] buf, uint element, uint stride, bool colMajor);\n" + "void coopMatLoadNV(out icoopmatNV m, volatile coherent nontemporal uvec4[] buf, uint element, uint stride, bool colMajor);\n" - "void coopMatLoadNV(out ucoopmatNV m, volatile coherent int8_t[] buf, uint element, uint stride, bool colMajor);\n" - "void coopMatLoadNV(out ucoopmatNV m, volatile coherent int16_t[] buf, uint element, uint stride, bool colMajor);\n" - "void coopMatLoadNV(out ucoopmatNV m, volatile coherent int[] buf, uint element, uint stride, bool colMajor);\n" - "void coopMatLoadNV(out ucoopmatNV m, volatile coherent int64_t[] buf, uint element, uint stride, bool colMajor);\n" - "void coopMatLoadNV(out ucoopmatNV m, volatile coherent ivec2[] buf, uint element, uint stride, bool colMajor);\n" - "void coopMatLoadNV(out ucoopmatNV m, volatile coherent ivec4[] buf, uint element, uint stride, bool colMajor);\n" - "void coopMatLoadNV(out ucoopmatNV m, volatile coherent uint8_t[] buf, uint element, uint stride, bool colMajor);\n" - "void coopMatLoadNV(out ucoopmatNV m, volatile coherent uint16_t[] buf, uint element, uint stride, bool colMajor);\n" - "void coopMatLoadNV(out ucoopmatNV m, volatile coherent uint[] buf, uint element, uint stride, bool colMajor);\n" - "void coopMatLoadNV(out ucoopmatNV m, volatile coherent uint64_t[] buf, uint element, uint stride, bool colMajor);\n" - "void coopMatLoadNV(out ucoopmatNV m, volatile coherent uvec2[] buf, uint element, uint stride, bool colMajor);\n" - "void coopMatLoadNV(out ucoopmatNV m, volatile coherent uvec4[] buf, uint element, uint stride, bool colMajor);\n" + "void coopMatLoadNV(out ucoopmatNV m, volatile coherent nontemporal int8_t[] buf, uint element, uint stride, bool colMajor);\n" + "void coopMatLoadNV(out ucoopmatNV m, volatile coherent nontemporal int16_t[] buf, uint element, uint stride, bool colMajor);\n" + "void coopMatLoadNV(out ucoopmatNV m, volatile coherent nontemporal int[] buf, uint element, uint stride, bool colMajor);\n" + "void coopMatLoadNV(out ucoopmatNV m, volatile coherent nontemporal int64_t[] buf, uint element, uint stride, bool colMajor);\n" + "void coopMatLoadNV(out ucoopmatNV m, volatile coherent nontemporal ivec2[] buf, uint element, uint stride, bool colMajor);\n" + "void coopMatLoadNV(out ucoopmatNV m, volatile coherent nontemporal ivec4[] buf, uint element, uint stride, bool colMajor);\n" + "void coopMatLoadNV(out ucoopmatNV m, volatile coherent nontemporal uint8_t[] buf, uint element, uint stride, bool colMajor);\n" + "void coopMatLoadNV(out ucoopmatNV m, volatile coherent nontemporal uint16_t[] buf, uint element, uint stride, bool colMajor);\n" + "void coopMatLoadNV(out ucoopmatNV m, volatile coherent nontemporal uint[] buf, uint element, uint stride, bool colMajor);\n" + "void coopMatLoadNV(out ucoopmatNV m, volatile coherent nontemporal uint64_t[] buf, uint element, uint stride, bool colMajor);\n" + "void coopMatLoadNV(out ucoopmatNV m, volatile coherent nontemporal uvec2[] buf, uint element, uint stride, bool colMajor);\n" + "void coopMatLoadNV(out ucoopmatNV m, volatile coherent nontemporal uvec4[] buf, uint element, uint stride, bool colMajor);\n" - "void coopMatStoreNV(icoopmatNV m, volatile coherent int8_t[] buf, uint element, uint stride, bool colMajor);\n" - "void coopMatStoreNV(icoopmatNV m, volatile coherent int16_t[] buf, uint element, uint stride, bool colMajor);\n" - "void coopMatStoreNV(icoopmatNV m, volatile coherent int[] buf, uint element, uint stride, bool colMajor);\n" - "void coopMatStoreNV(icoopmatNV m, volatile coherent int64_t[] buf, uint element, uint stride, bool colMajor);\n" - "void coopMatStoreNV(icoopmatNV m, volatile coherent ivec2[] buf, uint element, uint stride, bool colMajor);\n" - "void coopMatStoreNV(icoopmatNV m, volatile coherent ivec4[] buf, uint element, uint stride, bool colMajor);\n" - "void coopMatStoreNV(icoopmatNV m, volatile coherent uint8_t[] buf, uint element, uint stride, bool colMajor);\n" - "void coopMatStoreNV(icoopmatNV m, volatile coherent uint16_t[] buf, uint element, uint stride, bool colMajor);\n" - "void coopMatStoreNV(icoopmatNV m, volatile coherent uint[] buf, uint element, uint stride, bool colMajor);\n" - "void coopMatStoreNV(icoopmatNV m, volatile coherent uint64_t[] buf, uint element, uint stride, bool colMajor);\n" - "void coopMatStoreNV(icoopmatNV m, volatile coherent uvec2[] buf, uint element, uint stride, bool colMajor);\n" - "void coopMatStoreNV(icoopmatNV m, volatile coherent uvec4[] buf, uint element, uint stride, bool colMajor);\n" + "void coopMatStoreNV(icoopmatNV m, volatile coherent nontemporal int8_t[] buf, uint element, uint stride, bool colMajor);\n" + "void coopMatStoreNV(icoopmatNV m, volatile coherent nontemporal int16_t[] buf, uint element, uint stride, bool colMajor);\n" + "void coopMatStoreNV(icoopmatNV m, volatile coherent nontemporal int[] buf, uint element, uint stride, bool colMajor);\n" + "void coopMatStoreNV(icoopmatNV m, volatile coherent nontemporal int64_t[] buf, uint element, uint stride, bool colMajor);\n" + "void coopMatStoreNV(icoopmatNV m, volatile coherent nontemporal ivec2[] buf, uint element, uint stride, bool colMajor);\n" + "void coopMatStoreNV(icoopmatNV m, volatile coherent nontemporal ivec4[] buf, uint element, uint stride, bool colMajor);\n" + "void coopMatStoreNV(icoopmatNV m, volatile coherent nontemporal uint8_t[] buf, uint element, uint stride, bool colMajor);\n" + "void coopMatStoreNV(icoopmatNV m, volatile coherent nontemporal uint16_t[] buf, uint element, uint stride, bool colMajor);\n" + "void coopMatStoreNV(icoopmatNV m, volatile coherent nontemporal uint[] buf, uint element, uint stride, bool colMajor);\n" + "void coopMatStoreNV(icoopmatNV m, volatile coherent nontemporal uint64_t[] buf, uint element, uint stride, bool colMajor);\n" + "void coopMatStoreNV(icoopmatNV m, volatile coherent nontemporal uvec2[] buf, uint element, uint stride, bool colMajor);\n" + "void coopMatStoreNV(icoopmatNV m, volatile coherent nontemporal uvec4[] buf, uint element, uint stride, bool colMajor);\n" - "void coopMatStoreNV(ucoopmatNV m, volatile coherent int8_t[] buf, uint element, uint stride, bool colMajor);\n" - "void coopMatStoreNV(ucoopmatNV m, volatile coherent int16_t[] buf, uint element, uint stride, bool colMajor);\n" - "void coopMatStoreNV(ucoopmatNV m, volatile coherent int[] buf, uint element, uint stride, bool colMajor);\n" - "void coopMatStoreNV(ucoopmatNV m, volatile coherent int64_t[] buf, uint element, uint stride, bool colMajor);\n" - "void coopMatStoreNV(ucoopmatNV m, volatile coherent ivec2[] buf, uint element, uint stride, bool colMajor);\n" - "void coopMatStoreNV(ucoopmatNV m, volatile coherent ivec4[] buf, uint element, uint stride, bool colMajor);\n" - "void coopMatStoreNV(ucoopmatNV m, volatile coherent uint8_t[] buf, uint element, uint stride, bool colMajor);\n" - "void coopMatStoreNV(ucoopmatNV m, volatile coherent uint16_t[] buf, uint element, uint stride, bool colMajor);\n" - "void coopMatStoreNV(ucoopmatNV m, volatile coherent uint[] buf, uint element, uint stride, bool colMajor);\n" - "void coopMatStoreNV(ucoopmatNV m, volatile coherent uint64_t[] buf, uint element, uint stride, bool colMajor);\n" - "void coopMatStoreNV(ucoopmatNV m, volatile coherent uvec2[] buf, uint element, uint stride, bool colMajor);\n" - "void coopMatStoreNV(ucoopmatNV m, volatile coherent uvec4[] buf, uint element, uint stride, bool colMajor);\n" + "void coopMatStoreNV(ucoopmatNV m, volatile coherent nontemporal int8_t[] buf, uint element, uint stride, bool colMajor);\n" + "void coopMatStoreNV(ucoopmatNV m, volatile coherent nontemporal int16_t[] buf, uint element, uint stride, bool colMajor);\n" + "void coopMatStoreNV(ucoopmatNV m, volatile coherent nontemporal int[] buf, uint element, uint stride, bool colMajor);\n" + "void coopMatStoreNV(ucoopmatNV m, volatile coherent nontemporal int64_t[] buf, uint element, uint stride, bool colMajor);\n" + "void coopMatStoreNV(ucoopmatNV m, volatile coherent nontemporal ivec2[] buf, uint element, uint stride, bool colMajor);\n" + "void coopMatStoreNV(ucoopmatNV m, volatile coherent nontemporal ivec4[] buf, uint element, uint stride, bool colMajor);\n" + "void coopMatStoreNV(ucoopmatNV m, volatile coherent nontemporal uint8_t[] buf, uint element, uint stride, bool colMajor);\n" + "void coopMatStoreNV(ucoopmatNV m, volatile coherent nontemporal uint16_t[] buf, uint element, uint stride, bool colMajor);\n" + "void coopMatStoreNV(ucoopmatNV m, volatile coherent nontemporal uint[] buf, uint element, uint stride, bool colMajor);\n" + "void coopMatStoreNV(ucoopmatNV m, volatile coherent nontemporal uint64_t[] buf, uint element, uint stride, bool colMajor);\n" + "void coopMatStoreNV(ucoopmatNV m, volatile coherent nontemporal uvec2[] buf, uint element, uint stride, bool colMajor);\n" + "void coopMatStoreNV(ucoopmatNV m, volatile coherent nontemporal uvec4[] buf, uint element, uint stride, bool colMajor);\n" "icoopmatNV coopMatMulAddNV(icoopmatNV A, icoopmatNV B, icoopmatNV C);\n" "ucoopmatNV coopMatMulAddNV(ucoopmatNV A, ucoopmatNV B, ucoopmatNV C);\n" ); - std::string cooperativeMatrixFuncs = - "void coopMatLoad(out coopmat m, volatile coherent int8_t[] buf, uint element, uint stride, int matrixLayout);\n" - "void coopMatLoad(out coopmat m, volatile coherent int16_t[] buf, uint element, uint stride, int matrixLayout);\n" - "void coopMatLoad(out coopmat m, volatile coherent int32_t[] buf, uint element, uint stride, int matrixLayout);\n" - "void coopMatLoad(out coopmat m, volatile coherent int64_t[] buf, uint element, uint stride, int matrixLayout);\n" - "void coopMatLoad(out coopmat m, volatile coherent uint8_t[] buf, uint element, uint stride, int matrixLayout);\n" - "void coopMatLoad(out coopmat m, volatile coherent uint16_t[] buf, uint element, uint stride, int matrixLayout);\n" - "void coopMatLoad(out coopmat m, volatile coherent uint32_t[] buf, uint element, uint stride, int matrixLayout);\n" - "void coopMatLoad(out coopmat m, volatile coherent uint64_t[] buf, uint element, uint stride, int matrixLayout);\n" - "void coopMatLoad(out coopmat m, volatile coherent float16_t[] buf, uint element, uint stride, int matrixLayout);\n" - "void coopMatLoad(out coopmat m, volatile coherent float[] buf, uint element, uint stride, int matrixLayout);\n" - "void coopMatLoad(out coopmat m, volatile coherent float64_t[] buf, uint element, uint stride, int matrixLayout);\n" + std::stringstream cooperativeMatrixFuncs; - "void coopMatLoad(out coopmat m, volatile coherent i8vec2[] buf, uint element, uint stride, int matrixLayout);\n" - "void coopMatLoad(out coopmat m, volatile coherent i16vec2[] buf, uint element, uint stride, int matrixLayout);\n" - "void coopMatLoad(out coopmat m, volatile coherent i32vec2[] buf, uint element, uint stride, int matrixLayout);\n" - "void coopMatLoad(out coopmat m, volatile coherent i64vec2[] buf, uint element, uint stride, int matrixLayout);\n" - "void coopMatLoad(out coopmat m, volatile coherent u8vec2[] buf, uint element, uint stride, int matrixLayout);\n" - "void coopMatLoad(out coopmat m, volatile coherent u16vec2[] buf, uint element, uint stride, int matrixLayout);\n" - "void coopMatLoad(out coopmat m, volatile coherent u32vec2[] buf, uint element, uint stride, int matrixLayout);\n" - "void coopMatLoad(out coopmat m, volatile coherent u64vec2[] buf, uint element, uint stride, int matrixLayout);\n" - "void coopMatLoad(out coopmat m, volatile coherent f16vec2[] buf, uint element, uint stride, int matrixLayout);\n" - "void coopMatLoad(out coopmat m, volatile coherent f32vec2[] buf, uint element, uint stride, int matrixLayout);\n" - "void coopMatLoad(out coopmat m, volatile coherent f64vec2[] buf, uint element, uint stride, int matrixLayout);\n" - - "void coopMatLoad(out coopmat m, volatile coherent i8vec4[] buf, uint element, uint stride, int matrixLayout);\n" - "void coopMatLoad(out coopmat m, volatile coherent i16vec4[] buf, uint element, uint stride, int matrixLayout);\n" - "void coopMatLoad(out coopmat m, volatile coherent i32vec4[] buf, uint element, uint stride, int matrixLayout);\n" - "void coopMatLoad(out coopmat m, volatile coherent i64vec4[] buf, uint element, uint stride, int matrixLayout);\n" - "void coopMatLoad(out coopmat m, volatile coherent u8vec4[] buf, uint element, uint stride, int matrixLayout);\n" - "void coopMatLoad(out coopmat m, volatile coherent u16vec4[] buf, uint element, uint stride, int matrixLayout);\n" - "void coopMatLoad(out coopmat m, volatile coherent u32vec4[] buf, uint element, uint stride, int matrixLayout);\n" - "void coopMatLoad(out coopmat m, volatile coherent u64vec4[] buf, uint element, uint stride, int matrixLayout);\n" - "void coopMatLoad(out coopmat m, volatile coherent f16vec4[] buf, uint element, uint stride, int matrixLayout);\n" - "void coopMatLoad(out coopmat m, volatile coherent f32vec4[] buf, uint element, uint stride, int matrixLayout);\n" - "void coopMatLoad(out coopmat m, volatile coherent f64vec4[] buf, uint element, uint stride, int matrixLayout);\n" - - "void coopMatStore(coopmat m, volatile coherent int8_t[] buf, uint element, uint stride, int matrixLayout);\n" - "void coopMatStore(coopmat m, volatile coherent int16_t[] buf, uint element, uint stride, int matrixLayout);\n" - "void coopMatStore(coopmat m, volatile coherent int32_t[] buf, uint element, uint stride, int matrixLayout);\n" - "void coopMatStore(coopmat m, volatile coherent int64_t[] buf, uint element, uint stride, int matrixLayout);\n" - "void coopMatStore(coopmat m, volatile coherent uint8_t[] buf, uint element, uint stride, int matrixLayout);\n" - "void coopMatStore(coopmat m, volatile coherent uint16_t[] buf, uint element, uint stride, int matrixLayout);\n" - "void coopMatStore(coopmat m, volatile coherent uint32_t[] buf, uint element, uint stride, int matrixLayout);\n" - "void coopMatStore(coopmat m, volatile coherent uint64_t[] buf, uint element, uint stride, int matrixLayout);\n" - "void coopMatStore(coopmat m, volatile coherent float16_t[] buf, uint element, uint stride, int matrixLayout);\n" - "void coopMatStore(coopmat m, volatile coherent float[] buf, uint element, uint stride, int matrixLayout);\n" - "void coopMatStore(coopmat m, volatile coherent float64_t[] buf, uint element, uint stride, int matrixLayout);\n" - - "void coopMatStore(coopmat m, volatile coherent i8vec2[] buf, uint element, uint stride, int matrixLayout);\n" - "void coopMatStore(coopmat m, volatile coherent i16vec2[] buf, uint element, uint stride, int matrixLayout);\n" - "void coopMatStore(coopmat m, volatile coherent i32vec2[] buf, uint element, uint stride, int matrixLayout);\n" - "void coopMatStore(coopmat m, volatile coherent i64vec2[] buf, uint element, uint stride, int matrixLayout);\n" - "void coopMatStore(coopmat m, volatile coherent u8vec2[] buf, uint element, uint stride, int matrixLayout);\n" - "void coopMatStore(coopmat m, volatile coherent u16vec2[] buf, uint element, uint stride, int matrixLayout);\n" - "void coopMatStore(coopmat m, volatile coherent u32vec2[] buf, uint element, uint stride, int matrixLayout);\n" - "void coopMatStore(coopmat m, volatile coherent u64vec2[] buf, uint element, uint stride, int matrixLayout);\n" - "void coopMatStore(coopmat m, volatile coherent f16vec2[] buf, uint element, uint stride, int matrixLayout);\n" - "void coopMatStore(coopmat m, volatile coherent f32vec2[] buf, uint element, uint stride, int matrixLayout);\n" - "void coopMatStore(coopmat m, volatile coherent f64vec2[] buf, uint element, uint stride, int matrixLayout);\n" - - "void coopMatStore(coopmat m, volatile coherent i8vec4[] buf, uint element, uint stride, int matrixLayout);\n" - "void coopMatStore(coopmat m, volatile coherent i16vec4[] buf, uint element, uint stride, int matrixLayout);\n" - "void coopMatStore(coopmat m, volatile coherent i32vec4[] buf, uint element, uint stride, int matrixLayout);\n" - "void coopMatStore(coopmat m, volatile coherent i64vec4[] buf, uint element, uint stride, int matrixLayout);\n" - "void coopMatStore(coopmat m, volatile coherent u8vec4[] buf, uint element, uint stride, int matrixLayout);\n" - "void coopMatStore(coopmat m, volatile coherent u16vec4[] buf, uint element, uint stride, int matrixLayout);\n" - "void coopMatStore(coopmat m, volatile coherent u32vec4[] buf, uint element, uint stride, int matrixLayout);\n" - "void coopMatStore(coopmat m, volatile coherent u64vec4[] buf, uint element, uint stride, int matrixLayout);\n" - "void coopMatStore(coopmat m, volatile coherent f16vec4[] buf, uint element, uint stride, int matrixLayout);\n" - "void coopMatStore(coopmat m, volatile coherent f32vec4[] buf, uint element, uint stride, int matrixLayout);\n" - "void coopMatStore(coopmat m, volatile coherent f64vec4[] buf, uint element, uint stride, int matrixLayout);\n" + { + static const char *allTypes[] = + { + "float", "vec2", "vec4", + "float16_t", "f16vec2", "f16vec4", + "double", "dvec2", "dvec4", + "int8_t", "i8vec2", "i8vec4", + "int16_t", "i16vec2", "i16vec4", + "int", "ivec2", "ivec4", + "int64_t", "i64vec2", "i64vec4", + "uint8_t", "u8vec2", "u8vec4", + "uint16_t", "u16vec2", "u16vec4", + "uint", "uvec2", "uvec4", + "uint64_t", "u64vec2", "u64vec4", + }; + for (auto t : allTypes) { + cooperativeMatrixFuncs << "void coopMatLoad(out coopmat m, volatile coherent nontemporal " << t << "[] buf, uint element, uint stride, int matrixLayout);\n"; + cooperativeMatrixFuncs << "void coopMatStore(coopmat m, volatile coherent nontemporal " << t << "[] buf, uint element, uint stride, int matrixLayout);\n"; + } + // Just use uint8_t for buffer type, we have special matching rules to allow any conversion + cooperativeMatrixFuncs << "void coopMatLoadTensorNV(inout coopmat m, volatile coherent nontemporal uint8_t[] buf, uint element, tensorLayoutNV t);\n"; + cooperativeMatrixFuncs << "void coopMatLoadTensorNV(inout coopmat m, volatile coherent nontemporal uint8_t[] buf, uint element, tensorLayoutNV t, tensorViewNV v);\n"; + cooperativeMatrixFuncs << "void coopMatLoadTensorNV(inout coopmat m, volatile coherent nontemporal uint8_t[] buf, uint element, tensorLayoutNV t, __function f);\n"; + cooperativeMatrixFuncs << "void coopMatLoadTensorNV(inout coopmat m, volatile coherent nontemporal uint8_t[] buf, uint element, tensorLayoutNV t, tensorViewNV v, __function f);\n"; + cooperativeMatrixFuncs << "void coopMatStoreTensorNV(coopmat m, volatile coherent nontemporal uint8_t[] buf, uint element, tensorLayoutNV t);\n"; + cooperativeMatrixFuncs << "void coopMatStoreTensorNV(coopmat m, volatile coherent nontemporal uint8_t[] buf, uint element, tensorLayoutNV t, tensorViewNV v);\n"; + } + cooperativeMatrixFuncs << "coopmat coopMatMulAdd(coopmat A, coopmat B, coopmat C);\n" "coopmat coopMatMulAdd(coopmat A, coopmat B, coopmat C, int matrixOperands);\n"; - commonBuiltins.append(cooperativeMatrixFuncs.c_str()); + commonBuiltins.append(cooperativeMatrixFuncs.str().c_str()); commonBuiltins.append( "const int gl_MatrixUseA = 0;\n" @@ -4562,6 +4658,238 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "const int gl_CooperativeMatrixLayoutColumnBlockedInterleavedARM = 4203;\n" "\n" ); + + commonBuiltins.append( + "void coopMatTransposeNV(out coopmat, coopmat);" + "void coopMatReduceNV(out coopmat, coopmat, int, __function);" + "void coopMatPerElementNV();" + ); + + commonBuiltins.append( + "const int gl_CooperativeMatrixReduceRowNV = 0x1;\n" + "const int gl_CooperativeMatrixReduceColumnNV = 0x2;\n" + "const int gl_CooperativeMatrixReduceRowAndColumnNV = 0x3;\n" + "const int gl_CooperativeMatrixReduce2x2NV = 0x4;\n" + "\n" + ); + + commonBuiltins.append( + "const int gl_CooperativeMatrixClampModeUndefinedNV = 0x0;\n" + "const int gl_CooperativeMatrixClampModeConstantNV = 0x1;\n" + "const int gl_CooperativeMatrixClampModeClampToEdgeNV = 0x2;\n" + "const int gl_CooperativeMatrixClampModeRepeatNV = 0x3;\n" + "const int gl_CooperativeMatrixClampModeMirrorRepeatNV = 0x4;\n" + "\n" + ); + + commonBuiltins.append( + "tensorLayoutNV createTensorLayoutNV(uint Dim);\n" + "tensorLayoutNV createTensorLayoutNV(uint Dim, uint Mode);\n" + + "tensorLayoutNV setTensorLayoutBlockSizeNV(tensorLayoutNV t, uint blockSize0);\n" + "tensorLayoutNV setTensorLayoutBlockSizeNV(tensorLayoutNV t, uint blockSize0, uint blockSize1);\n" + "tensorLayoutNV setTensorLayoutBlockSizeNV(tensorLayoutNV t, uint blockSize0, uint blockSize1, uint blockSize2);\n" + "tensorLayoutNV setTensorLayoutBlockSizeNV(tensorLayoutNV t, uint blockSize0, uint blockSize1, uint blockSize2, uint blockSize3);\n" + "tensorLayoutNV setTensorLayoutBlockSizeNV(tensorLayoutNV t, uint blockSize0, uint blockSize1, uint blockSize2, uint blockSize3, uint blockSize4);\n" + + "tensorLayoutNV setTensorLayoutDimensionNV(tensorLayoutNV t, uint dim0);\n" + "tensorLayoutNV setTensorLayoutDimensionNV(tensorLayoutNV t, uint dim0, uint dim1);\n" + "tensorLayoutNV setTensorLayoutDimensionNV(tensorLayoutNV t, uint dim0, uint dim1, uint dim2);\n" + "tensorLayoutNV setTensorLayoutDimensionNV(tensorLayoutNV t, uint dim0, uint dim1, uint dim2, uint dim3);\n" + "tensorLayoutNV setTensorLayoutDimensionNV(tensorLayoutNV t, uint dim0, uint dim1, uint dim2, uint dim3, uint dim4);\n" + + "tensorLayoutNV setTensorLayoutStrideNV(tensorLayoutNV t, uint stride0);\n" + "tensorLayoutNV setTensorLayoutStrideNV(tensorLayoutNV t, uint stride0, uint stride1);\n" + "tensorLayoutNV setTensorLayoutStrideNV(tensorLayoutNV t, uint stride0, uint stride1, uint stride2);\n" + "tensorLayoutNV setTensorLayoutStrideNV(tensorLayoutNV t, uint stride0, uint stride1, uint stride2, uint stride3);\n" + "tensorLayoutNV setTensorLayoutStrideNV(tensorLayoutNV t, uint stride0, uint stride1, uint stride2, uint stride3, uint stride4);\n" + + "tensorLayoutNV sliceTensorLayoutNV(tensorLayoutNV t, uint offset0, uint span0);\n" + "tensorLayoutNV sliceTensorLayoutNV(tensorLayoutNV t, uint offset0, uint span0, uint offset1, uint span1);\n" + "tensorLayoutNV sliceTensorLayoutNV(tensorLayoutNV t, uint offset0, uint span0, uint offset1, uint span1, uint offset2, uint span2);\n" + "tensorLayoutNV sliceTensorLayoutNV(tensorLayoutNV t, uint offset0, uint span0, uint offset1, uint span1, uint offset2, uint span2, uint offset3, uint span3);\n" + "tensorLayoutNV sliceTensorLayoutNV(tensorLayoutNV t, uint offset0, uint span0, uint offset1, uint span1, uint offset2, uint span2, uint offset3, uint span3, uint offset4, uint span4);\n" + + "tensorLayoutNV setTensorLayoutClampValueNV(tensorLayoutNV t, uint value);\n" + + "tensorViewNV createTensorViewNV(uint Dim);\n" + "tensorViewNV createTensorViewNV(uint Dim, bool HasDimensions);\n" + "tensorViewNV createTensorViewNV(uint Dim, bool HasDimensions, uint p0);\n" + "tensorViewNV createTensorViewNV(uint Dim, bool HasDimensions, uint p0, uint p1);\n" + "tensorViewNV createTensorViewNV(uint Dim, bool HasDimensions, uint p0, uint p1, uint p2);\n" + "tensorViewNV createTensorViewNV(uint Dim, bool HasDimensions, uint p0, uint p1, uint p2, uint p3);\n" + "tensorViewNV createTensorViewNV(uint Dim, bool HasDimensions, uint p0, uint p1, uint p2, uint p3, uint p4);\n" + + "tensorViewNV setTensorViewDimensionsNV(tensorViewNV v, uint dim0);\n" + "tensorViewNV setTensorViewDimensionsNV(tensorViewNV v, uint dim0, uint dim1);\n" + "tensorViewNV setTensorViewDimensionsNV(tensorViewNV v, uint dim0, uint dim1, uint dim2);\n" + "tensorViewNV setTensorViewDimensionsNV(tensorViewNV v, uint dim0, uint dim1, uint dim2, uint dim3);\n" + "tensorViewNV setTensorViewDimensionsNV(tensorViewNV v, uint dim0, uint dim1, uint dim2, uint dim3, uint dim4);\n" + + "tensorViewNV setTensorViewStrideNV(tensorViewNV v, uint stride0);\n" + "tensorViewNV setTensorViewStrideNV(tensorViewNV v, uint stride0, uint stride1);\n" + "tensorViewNV setTensorViewStrideNV(tensorViewNV v, uint stride0, uint stride1, uint stride2);\n" + "tensorViewNV setTensorViewStrideNV(tensorViewNV v, uint stride0, uint stride1, uint stride2, uint stride3);\n" + "tensorViewNV setTensorViewStrideNV(tensorViewNV v, uint stride0, uint stride1, uint stride2, uint stride3, uint stride4);\n" + + "tensorViewNV setTensorViewClipNV(tensorViewNV v, uint clipRowOffset, uint clipRowSpan, uint clipColOffset, uint clipColSpan);\n" + "\n" + ); + } + + if (profile != EEsProfile && version >= 450) { + const char *basicTypes[] = { + "int8_t", + "int16_t", + "int32_t", + "int64_t", + "uint8_t", + "uint16_t", + "uint32_t", + "uint64_t", + "float16_t", + "float32_t", + "float64_t", + }; + for (uint32_t i = 0; i < sizeof(basicTypes)/sizeof(basicTypes[0]); ++i) { + std::string func = std::string("void coopVecMatMulNV(out coopvecNV result, ") + + std::string("coopvecNV v, ") + + std::string("int inputInterpretation, ") + + std::string(basicTypes[i]) + std::string("[] matrix, ") + + std::string("uint matrixOffset, ") + + std::string("int matrixInterpretation, ") + + std::string("uint M, ") + + std::string("uint K, ") + + std::string("int matrixLayout, ") + + std::string("bool transpose, ") + + std::string("uint matrixStride);\n"); + commonBuiltins.append(func.c_str()); + + for (uint32_t j = 0; j < sizeof(basicTypes)/sizeof(basicTypes[0]); ++j) { + func = std::string("void coopVecMatMulAddNV(out coopvecNV result, ") + + std::string("coopvecNV v, ") + + std::string("int inputInterpretation, ") + + std::string(basicTypes[i]) + std::string("[] matrix, ") + + std::string("uint matrixOffset, ") + + std::string("int matrixInterpretation, ") + + std::string(basicTypes[j]) + std::string("[] bias, ") + + std::string("uint biasOffset, ") + + std::string("int biasInterpretation, ") + + std::string("uint M, ") + + std::string("uint K, ") + + std::string("int matrixLayout, ") + + std::string("bool transpose, ") + + std::string("uint matrixStride);\n"); + commonBuiltins.append(func.c_str()); + } + + func = std::string("void coopVecOuterProductAccumulateNV(coopvecNV v1, coopvecNV v2, ") + + std::string(basicTypes[i]) + + std::string("[] buf, uint offset, uint stride, int matrixLayout, int matrixInterpretation);\n"); + commonBuiltins.append(func.c_str()); + + func = std::string("void coopVecReduceSumAccumulateNV(coopvecNV v, ") + + std::string(basicTypes[i]) + + std::string("[] buf, uint offset);\n"); + commonBuiltins.append(func.c_str()); + } + + std::string cooperativeVectorFuncs = + "coopvecNV fma(coopvecNV, coopvecNV, coopvecNV);\n" + "coopvecNV min(coopvecNV, coopvecNV);\n" + "coopvecNV max(coopvecNV, coopvecNV);\n" + "coopvecNV step(coopvecNV, coopvecNV);\n" + "coopvecNV exp(coopvecNV);\n" + "coopvecNV log(coopvecNV);\n" + "coopvecNV tanh(coopvecNV);\n" + "coopvecNV atan(coopvecNV);\n" + "coopvecNV clamp(coopvecNV, coopvecNV, coopvecNV);\n" + "\n" + ; + + commonBuiltins.append(cooperativeVectorFuncs.c_str()); + + const char *scalarAndVectorTypes[] = { + "int8_t", + "int16_t", + "int32_t", + "int64_t", + "uint8_t", + "uint16_t", + "uint32_t", + "uint64_t", + "float16_t", + "float32_t", + "float64_t", + "i8vec2", + "i16vec2", + "i32vec2", + "i64vec2", + "u8vec2", + "u16vec2", + "u32vec2", + "u64vec2", + "f16vec2", + "f32vec2", + "f64vec2", + "i8vec3", + "i16vec3", + "i32vec3", + "i64vec3", + "u8vec3", + "u16vec3", + "u32vec3", + "u64vec3", + "f16vec3", + "f32vec3", + "f64vec3", + "i8vec4", + "i16vec4", + "i32vec4", + "i64vec4", + "u8vec4", + "u16vec4", + "u32vec4", + "u64vec4", + "f16vec4", + "f32vec4", + "f64vec4", + }; + for (uint32_t i = 0; i < sizeof(scalarAndVectorTypes)/sizeof(scalarAndVectorTypes[0]); ++i) { + std::string load = std::string("void coopVecLoadNV(out coopvecNV v, volatile coherent ") + + std::string(scalarAndVectorTypes[i]) + std::string("[] buf, uint offset);"); + std::string store = std::string("void coopVecStoreNV(coopvecNV v, volatile coherent ") + + std::string(scalarAndVectorTypes[i]) + std::string("[] buf, uint offset);"); + commonBuiltins.append(load.c_str()); + commonBuiltins.append(store.c_str()); + } + + commonBuiltins.append( + "const int gl_CooperativeVectorMatrixLayoutRowMajorNV = 0;\n" + "const int gl_CooperativeVectorMatrixLayoutColumnMajorNV = 1;\n" + "const int gl_CooperativeVectorMatrixLayoutInferencingOptimalNV = 2;\n" + "const int gl_CooperativeVectorMatrixLayoutTrainingOptimalNV = 3;\n" + "\n" + ); + + commonBuiltins.append( + "const int gl_ComponentTypeFloat16NV = 0;\n" + "const int gl_ComponentTypeFloat32NV = 1;\n" + "const int gl_ComponentTypeFloat64NV = 2;\n" + "const int gl_ComponentTypeSignedInt8NV = 3;\n" + "const int gl_ComponentTypeSignedInt16NV = 4;\n" + "const int gl_ComponentTypeSignedInt32NV = 5;\n" + "const int gl_ComponentTypeSignedInt64NV = 6;\n" + "const int gl_ComponentTypeUnsignedInt8NV = 7;\n" + "const int gl_ComponentTypeUnsignedInt16NV = 8;\n" + "const int gl_ComponentTypeUnsignedInt32NV = 9;\n" + "const int gl_ComponentTypeUnsignedInt64NV = 10;\n" + "const int gl_ComponentTypeSignedInt8PackedNV = 1000491000;\n" + "const int gl_ComponentTypeUnsignedInt8PackedNV = 1000491001;\n" + "const int gl_ComponentTypeFloatE4M3NV = 1000491002;\n" + "const int gl_ComponentTypeFloatE5M2NV = 1000491003;\n" + "\n" + ); } //============================================================================ @@ -4761,6 +5089,14 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "mat4x3 rayQueryGetIntersectionObjectToWorldEXT(rayQueryEXT, bool);" "mat4x3 rayQueryGetIntersectionWorldToObjectEXT(rayQueryEXT, bool);" "void rayQueryGetIntersectionTriangleVertexPositionsEXT(rayQueryEXT, bool, out vec3[3]);" + "int rayQueryGetIntersectionClusterIdNV(rayQueryEXT, bool);" + "vec3 rayQueryGetIntersectionSpherePositionNV(rayQueryEXT, bool);" + "float rayQueryGetIntersectionSphereRadiusNV(rayQueryEXT, bool);" + "float rayQueryGetIntersectionLSSHitValueNV(rayQueryEXT, bool);" + "void rayQueryGetIntersectionLSSPositionsNV(rayQueryEXT, bool, out vec3[2]);" + "void rayQueryGetIntersectionLSSRadiiNV(rayQueryEXT, bool, out float[2]);" + "bool rayQueryIsSphereHitNV(rayQueryEXT, bool);" + "bool rayQueryIsLSSHitNV(rayQueryEXT, bool);" "\n"); stageBuiltins[EShLangRayGen].append( @@ -4799,11 +5135,18 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "float hitObjectGetCurrentTimeNV(hitObjectNV);" "uint hitObjectGetShaderBindingTableRecordIndexNV(hitObjectNV);" "uvec2 hitObjectGetShaderRecordBufferHandleNV(hitObjectNV);" + "int hitObjectGetClusterIdNV(hitObjectNV);" "void reorderThreadNV(uint, uint);" "void reorderThreadNV(hitObjectNV);" "void reorderThreadNV(hitObjectNV, uint, uint);" "vec3 fetchMicroTriangleVertexPositionNV(accelerationStructureEXT, int, int, int, ivec2);" "vec2 fetchMicroTriangleVertexBarycentricNV(accelerationStructureEXT, int, int, int, ivec2);" + "vec3 hitObjectGetSpherePositionNV(hitObjectNV);" + "float hitObjectGetSphereRadiusNV(hitObjectNV);" + "void hitObjectGetLSSPositionsNV(hitObjectNV, out vec3[2]);" + "void hitObjectGetLSSRadiiNV(hitObjectNV, out float[2]);" + "bool hitObjectIsSphereHitNV(hitObjectNV);" + "bool hitObjectIsLSSHitNV(hitObjectNV);" "\n"); stageBuiltins[EShLangIntersect].append( "bool reportIntersectionNV(float, uint);" @@ -4849,6 +5192,13 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "float hitObjectGetCurrentTimeNV(hitObjectNV);" "uint hitObjectGetShaderBindingTableRecordIndexNV(hitObjectNV);" "uvec2 hitObjectGetShaderRecordBufferHandleNV(hitObjectNV);" + "int hitObjectGetClusterIdNV(hitObjectNV);" + "vec3 hitObjectGetSpherePositionNV(hitObjectNV);" + "float hitObjectGetSphereRadiusNV(hitObjectNV);" + "void hitObjectGetLSSPositionsNV(hitObjectNV, out vec3[2]);" + "void hitObjectGetLSSRadiiNV(hitObjectNV, out float[2]);" + "bool hitObjectIsSphereHitNV(hitObjectNV);" + "bool hitObjectIsLSSHitNV(hitObjectNV);" "\n"); stageBuiltins[EShLangMiss].append( "void traceNV(accelerationStructureNV,uint,uint,uint,uint,uint,vec3,float,vec3,float,int);" @@ -4886,6 +5236,13 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "float hitObjectGetCurrentTimeNV(hitObjectNV);" "uint hitObjectGetShaderBindingTableRecordIndexNV(hitObjectNV);" "uvec2 hitObjectGetShaderRecordBufferHandleNV(hitObjectNV);" + "int hitObjectGetClusterIdNV(hitObjectNV);" + "vec3 hitObjectGetSpherePositionNV(hitObjectNV);" + "float hitObjectGetSphereRadiusNV(hitObjectNV);" + "void hitObjectGetLSSPositionsNV(hitObjectNV, out vec3[2]);" + "void hitObjectGetLSSRadiiNV(hitObjectNV, out float[2]);" + "bool hitObjectIsSphereHitNV(hitObjectNV);" + "bool hitObjectIsLSSHitNV(hitObjectNV);" "\n"); stageBuiltins[EShLangCallable].append( "void executeCallableNV(uint, int);" @@ -6114,12 +6471,14 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "const uint gl_RayFlagsCullNoOpaqueNV = 128U;" "const uint gl_RayFlagsCullNoOpaqueEXT = 128U;" "const uint gl_RayFlagsSkipTrianglesEXT = 256U;" + "const uint gl_RayFlagsSkipBuiltinPrimitivesNV = 256U;" "const uint gl_RayFlagsSkipAABBEXT = 512U;" "const uint gl_RayFlagsForceOpacityMicromap2StateEXT = 1024U;" "const uint gl_HitKindFrontFacingTriangleEXT = 254U;" "const uint gl_HitKindBackFacingTriangleEXT = 255U;" "in uint gl_HitKindFrontFacingMicroTriangleNV;" "in uint gl_HitKindBackFacingMicroTriangleNV;" + "const int gl_ClusterIDNoneNV = -1;" "\n"; const char *constRayQueryIntersection = @@ -6210,6 +6569,13 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "in vec3 gl_HitTriangleVertexPositionsEXT[3];" "in vec3 gl_HitMicroTriangleVertexPositionsNV[3];" "in vec2 gl_HitMicroTriangleVertexBarycentricsNV[3];" + "in int gl_ClusterIDNV;" + "in bool gl_HitIsSphereNV;" + "in bool gl_HitIsLSSNV;" + "in vec3 gl_HitSpherePositionNV;" + "in float gl_HitSphereRadiusNV;" + "in vec3 gl_HitLSSPositionsNV[2];" + "in float gl_HitLSSRadiiNV[2];" "\n"; const char *missDecls = @@ -6502,7 +6868,7 @@ void TBuiltIns::addQueryFunctions(TSampler sampler, const TString& typeName, int commonBuiltins.append(postfixes[sizeDims]); } if (sampler.isImage()) - commonBuiltins.append(" imageSize(readonly writeonly volatile coherent "); + commonBuiltins.append(" imageSize(readonly writeonly volatile coherent nontemporal "); else commonBuiltins.append(" textureSize("); commonBuiltins.append(typeName); @@ -6520,7 +6886,7 @@ void TBuiltIns::addQueryFunctions(TSampler sampler, const TString& typeName, int if (profile != EEsProfile && version >= 430 && sampler.isMultiSample()) { commonBuiltins.append("int "); if (sampler.isImage()) - commonBuiltins.append("imageSamples(readonly writeonly volatile coherent "); + commonBuiltins.append("imageSamples(readonly writeonly volatile coherent nontemporal "); else commonBuiltins.append("textureSamples("); commonBuiltins.append(typeName); @@ -6608,18 +6974,18 @@ void TBuiltIns::addImageFunctions(TSampler sampler, const TString& typeName, int if (profile == EEsProfile) commonBuiltins.append("highp "); commonBuiltins.append(prefixes[sampler.type]); - commonBuiltins.append("vec4 imageLoad(readonly volatile coherent "); + commonBuiltins.append("vec4 imageLoad(readonly volatile coherent nontemporal "); commonBuiltins.append(imageParams); commonBuiltins.append(");\n"); - commonBuiltins.append("void imageStore(writeonly volatile coherent "); + commonBuiltins.append("void imageStore(writeonly volatile coherent nontemporal "); commonBuiltins.append(imageParams); commonBuiltins.append(", "); commonBuiltins.append(prefixes[sampler.type]); commonBuiltins.append("vec4);\n"); if (! sampler.is1D() && ! sampler.isBuffer() && profile != EEsProfile && version >= 450) { - commonBuiltins.append("int sparseImageLoadARB(readonly volatile coherent "); + commonBuiltins.append("int sparseImageLoadARB(readonly volatile coherent nontemporal "); commonBuiltins.append(imageParams); commonBuiltins.append(", out "); commonBuiltins.append(prefixes[sampler.type]); @@ -6643,13 +7009,13 @@ void TBuiltIns::addImageFunctions(TSampler sampler, const TString& typeName, int const int numBuiltins = 7; static const char* atomicFunc[numBuiltins] = { - " imageAtomicAdd(volatile coherent ", - " imageAtomicMin(volatile coherent ", - " imageAtomicMax(volatile coherent ", - " imageAtomicAnd(volatile coherent ", - " imageAtomicOr(volatile coherent ", - " imageAtomicXor(volatile coherent ", - " imageAtomicExchange(volatile coherent " + " imageAtomicAdd(volatile coherent nontemporal ", + " imageAtomicMin(volatile coherent nontemporal ", + " imageAtomicMax(volatile coherent nontemporal ", + " imageAtomicAnd(volatile coherent nontemporal ", + " imageAtomicOr(volatile coherent nontemporal ", + " imageAtomicXor(volatile coherent nontemporal ", + " imageAtomicExchange(volatile coherent nontemporal " }; // Loop twice to add prototypes with/without scope/semantics @@ -6667,7 +7033,7 @@ void TBuiltIns::addImageFunctions(TSampler sampler, const TString& typeName, int } commonBuiltins.append(dataType); - commonBuiltins.append(" imageAtomicCompSwap(volatile coherent "); + commonBuiltins.append(" imageAtomicCompSwap(volatile coherent nontemporal "); commonBuiltins.append(imageParams); commonBuiltins.append(", "); commonBuiltins.append(dataType); @@ -6680,11 +7046,11 @@ void TBuiltIns::addImageFunctions(TSampler sampler, const TString& typeName, int } commonBuiltins.append(dataType); - commonBuiltins.append(" imageAtomicLoad(volatile coherent "); + commonBuiltins.append(" imageAtomicLoad(volatile coherent nontemporal "); commonBuiltins.append(imageParams); commonBuiltins.append(", int, int, int);\n"); - commonBuiltins.append("void imageAtomicStore(volatile coherent "); + commonBuiltins.append("void imageAtomicStore(volatile coherent nontemporal "); commonBuiltins.append(imageParams); commonBuiltins.append(", "); commonBuiltins.append(dataType); @@ -6695,7 +7061,7 @@ void TBuiltIns::addImageFunctions(TSampler sampler, const TString& typeName, int // 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 >= 310) { - commonBuiltins.append("float imageAtomicExchange(volatile coherent "); + commonBuiltins.append("float imageAtomicExchange(volatile coherent nontemporal "); commonBuiltins.append(imageParams); commonBuiltins.append(", float);\n"); } @@ -6704,10 +7070,10 @@ void TBuiltIns::addImageFunctions(TSampler sampler, const TString& typeName, int if (profile != EEsProfile && version >= 430) { const int numFp16Builtins = 4; const char* atomicFp16Func[numFp16Builtins] = { - " imageAtomicAdd(volatile coherent ", - " imageAtomicMin(volatile coherent ", - " imageAtomicMax(volatile coherent ", - " imageAtomicExchange(volatile coherent " + " imageAtomicAdd(volatile coherent nontemporal ", + " imageAtomicMin(volatile coherent nontemporal ", + " imageAtomicMax(volatile coherent nontemporal ", + " imageAtomicExchange(volatile coherent nontemporal " }; const int numFp16DataTypes = 2; const char* atomicFp16DataTypes[numFp16DataTypes] = { @@ -6728,47 +7094,47 @@ void TBuiltIns::addImageFunctions(TSampler sampler, const TString& typeName, int } if (profile != EEsProfile && version >= 450) { - commonBuiltins.append("float imageAtomicAdd(volatile coherent "); + commonBuiltins.append("float imageAtomicAdd(volatile coherent nontemporal "); commonBuiltins.append(imageParams); commonBuiltins.append(", float);\n"); - commonBuiltins.append("float imageAtomicAdd(volatile coherent "); + commonBuiltins.append("float imageAtomicAdd(volatile coherent nontemporal "); commonBuiltins.append(imageParams); commonBuiltins.append(", float"); commonBuiltins.append(", int, int, int);\n"); - commonBuiltins.append("float imageAtomicExchange(volatile coherent "); + commonBuiltins.append("float imageAtomicExchange(volatile coherent nontemporal "); commonBuiltins.append(imageParams); commonBuiltins.append(", float);\n"); - commonBuiltins.append("float imageAtomicExchange(volatile coherent "); + commonBuiltins.append("float imageAtomicExchange(volatile coherent nontemporal "); commonBuiltins.append(imageParams); commonBuiltins.append(", float"); commonBuiltins.append(", int, int, int);\n"); - commonBuiltins.append("float imageAtomicLoad(readonly volatile coherent "); + commonBuiltins.append("float imageAtomicLoad(readonly volatile coherent nontemporal "); commonBuiltins.append(imageParams); commonBuiltins.append(", int, int, int);\n"); - commonBuiltins.append("void imageAtomicStore(writeonly volatile coherent "); + commonBuiltins.append("void imageAtomicStore(writeonly volatile coherent nontemporal "); commonBuiltins.append(imageParams); commonBuiltins.append(", float"); commonBuiltins.append(", int, int, int);\n"); - commonBuiltins.append("float imageAtomicMin(volatile coherent "); + commonBuiltins.append("float imageAtomicMin(volatile coherent nontemporal "); commonBuiltins.append(imageParams); commonBuiltins.append(", float);\n"); - commonBuiltins.append("float imageAtomicMin(volatile coherent "); + commonBuiltins.append("float imageAtomicMin(volatile coherent nontemporal "); commonBuiltins.append(imageParams); commonBuiltins.append(", float"); commonBuiltins.append(", int, int, int);\n"); - commonBuiltins.append("float imageAtomicMax(volatile coherent "); + commonBuiltins.append("float imageAtomicMax(volatile coherent nontemporal "); commonBuiltins.append(imageParams); commonBuiltins.append(", float);\n"); - commonBuiltins.append("float imageAtomicMax(volatile coherent "); + commonBuiltins.append("float imageAtomicMax(volatile coherent nontemporal "); commonBuiltins.append(imageParams); commonBuiltins.append(", float"); commonBuiltins.append(", int, int, int);\n"); @@ -6792,18 +7158,18 @@ void TBuiltIns::addImageFunctions(TSampler sampler, const TString& typeName, int imageLodParams.append(", int"); commonBuiltins.append(prefixes[sampler.type]); - commonBuiltins.append("vec4 imageLoadLodAMD(readonly volatile coherent "); + commonBuiltins.append("vec4 imageLoadLodAMD(readonly volatile coherent nontemporal "); commonBuiltins.append(imageLodParams); commonBuiltins.append(");\n"); - commonBuiltins.append("void imageStoreLodAMD(writeonly volatile coherent "); + commonBuiltins.append("void imageStoreLodAMD(writeonly volatile coherent nontemporal "); commonBuiltins.append(imageLodParams); commonBuiltins.append(", "); commonBuiltins.append(prefixes[sampler.type]); commonBuiltins.append("vec4);\n"); if (! sampler.is1D()) { - commonBuiltins.append("int sparseImageLoadLodAMD(readonly volatile coherent "); + commonBuiltins.append("int sparseImageLoadLodAMD(readonly volatile coherent nontemporal "); commonBuiltins.append(imageLodParams); commonBuiltins.append(", out "); commonBuiltins.append(prefixes[sampler.type]); @@ -8398,6 +8764,14 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion symbolTable.setFunctionExtensions("rayQueryGetWorldRayOriginEXT", 1, &E_GL_EXT_ray_query); symbolTable.setFunctionExtensions("rayQueryGetWorldRayDirectionEXT", 1, &E_GL_EXT_ray_query); symbolTable.setFunctionExtensions("rayQueryGetIntersectionTriangleVertexPositionsEXT", 1, &E_GL_EXT_ray_tracing_position_fetch); + symbolTable.setFunctionExtensions("rayQueryGetIntersectionClusterIdNV", 1, &E_GL_NV_cluster_acceleration_structure); + symbolTable.setFunctionExtensions("rayQueryGetIntersectionSpherePositionNV", 1, &E_GL_NV_linear_swept_spheres); + symbolTable.setFunctionExtensions("rayQueryGetIntersectionSphereRadiusNV", 1, &E_GL_NV_linear_swept_spheres); + symbolTable.setFunctionExtensions("rayQueryGetIntersectionLSSHitValueNV", 1, &E_GL_NV_linear_swept_spheres); + symbolTable.setFunctionExtensions("rayQueryGetIntersectionLSSPositionsNV", 1, &E_GL_NV_linear_swept_spheres); + symbolTable.setFunctionExtensions("rayQueryGetIntersectionLSSRadiiNV", 1, &E_GL_NV_linear_swept_spheres); + symbolTable.setFunctionExtensions("rayQueryIsSphereHitNV", 1, &E_GL_NV_linear_swept_spheres); + symbolTable.setFunctionExtensions("rayQueryIsLSSHitNV", 1, &E_GL_NV_linear_swept_spheres); symbolTable.setVariableExtensions("gl_RayFlagsSkipAABBEXT", 1, &E_GL_EXT_ray_flags_primitive_culling); symbolTable.setVariableExtensions("gl_RayFlagsSkipTrianglesEXT", 1, &E_GL_EXT_ray_flags_primitive_culling); symbolTable.setVariableExtensions("gl_RayFlagsForceOpacityMicromap2StateEXT", 1, &E_GL_EXT_opacity_micromap); @@ -9066,6 +9440,29 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion symbolTable.setFunctionExtensions("coopMatLoad", 1, &E_GL_KHR_cooperative_matrix); symbolTable.setFunctionExtensions("coopMatStore", 1, &E_GL_KHR_cooperative_matrix); symbolTable.setFunctionExtensions("coopMatMulAdd", 1, &E_GL_KHR_cooperative_matrix); + + symbolTable.setFunctionExtensions("coopMatReduceNV", 1, &E_GL_NV_cooperative_matrix2); + symbolTable.setFunctionExtensions("coopMatPerElementNV", 1, &E_GL_NV_cooperative_matrix2); + symbolTable.setFunctionExtensions("coopMatTransposeNV", 1, &E_GL_NV_cooperative_matrix2); + + symbolTable.setFunctionExtensions("createTensorLayoutNV", 1, &E_GL_NV_cooperative_matrix2); + symbolTable.setFunctionExtensions("setTensorLayoutBlockSizeNV", 1, &E_GL_NV_cooperative_matrix2); + symbolTable.setFunctionExtensions("setTensorLayoutDimensionNV", 1, &E_GL_NV_cooperative_matrix2); + symbolTable.setFunctionExtensions("setTensorLayoutStrideNV", 1, &E_GL_NV_cooperative_matrix2); + symbolTable.setFunctionExtensions("sliceTensorLayoutNV", 1, &E_GL_NV_cooperative_matrix2); + symbolTable.setFunctionExtensions("setTensorLayoutClampValueNV", 1, &E_GL_NV_cooperative_matrix2); + + symbolTable.setFunctionExtensions("createTensorViewNV", 1, &E_GL_NV_cooperative_matrix2); + symbolTable.setFunctionExtensions("setTensorViewDimensionsNV", 1, &E_GL_NV_cooperative_matrix2); + symbolTable.setFunctionExtensions("setTensorViewStrideNV", 1, &E_GL_NV_cooperative_matrix2); + symbolTable.setFunctionExtensions("setTensorViewClipNV", 1, &E_GL_NV_cooperative_matrix2); + } + + { + symbolTable.setFunctionExtensions("coopVecMatMulNV", 1, &E_GL_NV_cooperative_vector); + symbolTable.setFunctionExtensions("coopVecMatMulAddNV", 1, &E_GL_NV_cooperative_vector); + symbolTable.setFunctionExtensions("coopVecOuterProductAccumulateNV", 1, &E_GL_NV_cooperative_vector); + symbolTable.setFunctionExtensions("coopVecReduceSumAccumulateNV", 1, &E_GL_NV_cooperative_vector); } if ((profile != EEsProfile && version >= 450) || (profile == EEsProfile && version >= 320)) { @@ -9092,6 +9489,15 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion symbolTable.setFunctionExtensions("fetchMicroTriangleVertexPositionNV", 1, &E_GL_NV_displacement_micromap); symbolTable.setFunctionExtensions("fetchMicroTriangleVertexBarycentricNV", 1, &E_GL_NV_displacement_micromap); } + + // GL_EXT_integer_dot_product + if ((profile == EEsProfile && version >= 300) || + (profile != EEsProfile && version >= 450)) { + symbolTable.setFunctionExtensions("dotEXT", 1, &E_GL_EXT_integer_dot_product); + symbolTable.setFunctionExtensions("dotPacked4x8EXT", 1, &E_GL_EXT_integer_dot_product); + symbolTable.setFunctionExtensions("dotAccSatEXT", 1, &E_GL_EXT_integer_dot_product); + symbolTable.setFunctionExtensions("dotPacked4x8AccSatEXT", 1, &E_GL_EXT_integer_dot_product); + } break; case EShLangRayGen: @@ -9140,6 +9546,13 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion symbolTable.setVariableExtensions("gl_HitTriangleVertexPositionsEXT", 1, &E_GL_EXT_ray_tracing_position_fetch); symbolTable.setVariableExtensions("gl_HitMicroTriangleVertexPositionsNV", 1, &E_GL_NV_displacement_micromap); symbolTable.setVariableExtensions("gl_HitMicroTriangleVertexBarycentricsNV", 1, &E_GL_NV_displacement_micromap); + symbolTable.setVariableExtensions("gl_ClusterIDNV", 1, &E_GL_NV_cluster_acceleration_structure); + symbolTable.setVariableExtensions("gl_HitKindSphereNV", 1, &E_GL_NV_linear_swept_spheres); + symbolTable.setVariableExtensions("gl_HitKindLSSNV", 1, &E_GL_NV_linear_swept_spheres); + symbolTable.setVariableExtensions("gl_HitSpherePositionNV", 1, &E_GL_NV_linear_swept_spheres); + symbolTable.setVariableExtensions("gl_HitSphereRadiusNV", 1, &E_GL_NV_linear_swept_spheres); + symbolTable.setVariableExtensions("gl_HitLSSPositionNV", 1, &E_GL_NV_linear_swept_spheres); + symbolTable.setVariableExtensions("gl_HitLSSRadiiNV", 1, &E_GL_NV_linear_swept_spheres); symbolTable.setVariableExtensions("gl_DeviceIndex", 1, &E_GL_EXT_device_group); @@ -9184,9 +9597,16 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion symbolTable.setFunctionExtensions("hitObjectGetCurrentTimeNV", 1, &E_GL_NV_shader_invocation_reorder); symbolTable.setFunctionExtensions("hitObjectGetShaderBindingTableRecordIndexNV", 1, &E_GL_NV_shader_invocation_reorder); symbolTable.setFunctionExtensions("hitObjectGetShaderRecordBufferHandleNV", 1, &E_GL_NV_shader_invocation_reorder); + symbolTable.setFunctionExtensions("hitObjectGetClusterIdNV", 1, &E_GL_NV_cluster_acceleration_structure); symbolTable.setFunctionExtensions("reorderThreadNV", 1, &E_GL_NV_shader_invocation_reorder); symbolTable.setFunctionExtensions("fetchMicroTriangleVertexPositionNV", 1, &E_GL_NV_displacement_micromap); symbolTable.setFunctionExtensions("fetchMicroTriangleVertexBarycentricNV", 1, &E_GL_NV_displacement_micromap); + symbolTable.setFunctionExtensions("hitObjectGetSpherePositionNV", 1, &E_GL_NV_linear_swept_spheres); + symbolTable.setFunctionExtensions("hitObjectGetSphereRadiusNV", 1, &E_GL_NV_linear_swept_spheres); + symbolTable.setFunctionExtensions("hitObjectGetLSSPositionsNV", 1, &E_GL_NV_linear_swept_spheres); + symbolTable.setFunctionExtensions("hitObjectGetLSSRadiiNV", 1, &E_GL_NV_linear_swept_spheres); + symbolTable.setFunctionExtensions("hitObjectIsSphereHitNV", 1, &E_GL_NV_linear_swept_spheres); + symbolTable.setFunctionExtensions("hitObjectIsLSSHitNV", 1, &E_GL_NV_linear_swept_spheres); BuiltInVariable("gl_LaunchIDNV", EbvLaunchId, symbolTable); @@ -9228,6 +9648,13 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion BuiltInVariable("gl_HitMicroTriangleVertexBarycentricsNV", EbvMicroTriangleBaryNV, symbolTable); BuiltInVariable("gl_HitKindFrontFacingMicroTriangleNV", EbvHitKindFrontFacingMicroTriangleNV, symbolTable); BuiltInVariable("gl_HitKindBackFacingMicroTriangleNV", EbvHitKindBackFacingMicroTriangleNV, symbolTable); + BuiltInVariable("gl_ClusterIDNV", EbvClusterIDNV, symbolTable); + BuiltInVariable("gl_HitIsSphereNV", EbvHitIsSphereNV, symbolTable); + BuiltInVariable("gl_HitIsLSSNV", EbvHitIsLSSNV, symbolTable); + BuiltInVariable("gl_HitSpherePositionNV", EbvHitSpherePositionNV, symbolTable); + BuiltInVariable("gl_HitSphereRadiusNV", EbvHitSphereRadiusNV, symbolTable); + BuiltInVariable("gl_HitLSSPositionsNV", EbvHitLSSPositionsNV, symbolTable); + BuiltInVariable("gl_HitLSSRadiiNV", EbvHitLSSRadiiNV, symbolTable); // gl_HitT variables are aliases of their gl_RayTmax counterparts. RetargetVariable("gl_HitTNV", "gl_RayTmaxNV", symbolTable); @@ -10030,6 +10457,15 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion symbolTable.relateToOperator("fragmentFetchAMD", EOpFragmentFetch); } + // GL_EXT_integer_dot_product + if ((profile == EEsProfile && version >= 300) || + (profile != EEsProfile && version >= 450)) { + symbolTable.relateToOperator("dotEXT", EOpDot); + symbolTable.relateToOperator("dotPacked4x8EXT", EOpDotPackedEXT); + symbolTable.relateToOperator("dotAccSatEXT", EOpDotAccSatEXT); + symbolTable.relateToOperator("dotPacked4x8AccSatEXT", EOpDotPackedAccSatEXT); + } + // GL_KHR_shader_subgroup if ((profile == EEsProfile && version >= 310) || (profile != EEsProfile && version >= 140)) { @@ -10149,6 +10585,13 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion symbolTable.relateToOperator("texture2DArrayLod", EOpTextureLod); symbolTable.relateToOperator("shadow1DArrayLod", EOpTextureLod); } + + symbolTable.relateToOperator("coopVecMatMulNV", EOpCooperativeVectorMatMulNV); + symbolTable.relateToOperator("coopVecMatMulAddNV", EOpCooperativeVectorMatMulAddNV); + symbolTable.relateToOperator("coopVecLoadNV", EOpCooperativeVectorLoadNV); + symbolTable.relateToOperator("coopVecStoreNV", EOpCooperativeVectorStoreNV); + symbolTable.relateToOperator("coopVecOuterProductAccumulateNV", EOpCooperativeVectorOuterProductAccumulateNV); + symbolTable.relateToOperator("coopVecReduceSumAccumulateNV", EOpCooperativeVectorReduceSumAccumulateNV); } switch(language) { @@ -10201,6 +10644,14 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion symbolTable.relateToOperator("rayQueryGetIntersectionObjectToWorldEXT", EOpRayQueryGetIntersectionObjectToWorld); symbolTable.relateToOperator("rayQueryGetIntersectionWorldToObjectEXT", EOpRayQueryGetIntersectionWorldToObject); symbolTable.relateToOperator("rayQueryGetIntersectionTriangleVertexPositionsEXT", EOpRayQueryGetIntersectionTriangleVertexPositionsEXT); + symbolTable.relateToOperator("rayQueryGetIntersectionClusterIdNV", EOpRayQueryGetIntersectionClusterIdNV); + symbolTable.relateToOperator("rayQueryGetIntersectionSpherePositionNV", EOpRayQueryGetIntersectionSpherePositionNV); + symbolTable.relateToOperator("rayQueryGetIntersectionSphereRadiusNV", EOpRayQueryGetIntersectionSphereRadiusNV); + symbolTable.relateToOperator("rayQueryGetIntersectionLSSHitValueNV", EOpRayQueryGetIntersectionLSSHitValueNV); + symbolTable.relateToOperator("rayQueryGetIntersectionLSSPositionsNV", EOpRayQueryGetIntersectionLSSPositionsNV); + symbolTable.relateToOperator("rayQueryGetIntersectionLSSRadiiNV", EOpRayQueryGetIntersectionLSSRadiiNV); + symbolTable.relateToOperator("rayQueryIsSphereHitNV", EOpRayQueryIsSphereHitNV); + symbolTable.relateToOperator("rayQueryIsLSSHitNV", EOpRayQueryIsLSSHitNV); } symbolTable.relateToOperator("interpolateAtCentroid", EOpInterpolateAtCentroid); @@ -10241,6 +10692,25 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion symbolTable.relateToOperator("coopMatStore", EOpCooperativeMatrixStore); symbolTable.relateToOperator("coopMatMulAdd", EOpCooperativeMatrixMulAdd); + symbolTable.relateToOperator("coopMatLoadTensorNV", EOpCooperativeMatrixLoadTensorNV); + symbolTable.relateToOperator("coopMatStoreTensorNV", EOpCooperativeMatrixStoreTensorNV); + + symbolTable.relateToOperator("coopMatReduceNV", EOpCooperativeMatrixReduceNV); + symbolTable.relateToOperator("coopMatPerElementNV", EOpCooperativeMatrixPerElementOpNV); + symbolTable.relateToOperator("coopMatTransposeNV", EOpCooperativeMatrixTransposeNV); + + symbolTable.relateToOperator("createTensorLayoutNV", EOpCreateTensorLayoutNV); + symbolTable.relateToOperator("setTensorLayoutBlockSizeNV", EOpTensorLayoutSetBlockSizeNV); + symbolTable.relateToOperator("setTensorLayoutDimensionNV", EOpTensorLayoutSetDimensionNV); + symbolTable.relateToOperator("setTensorLayoutStrideNV", EOpTensorLayoutSetStrideNV); + symbolTable.relateToOperator("sliceTensorLayoutNV", EOpTensorLayoutSliceNV); + symbolTable.relateToOperator("setTensorLayoutClampValueNV", EOpTensorLayoutSetClampValueNV); + + symbolTable.relateToOperator("createTensorViewNV", EOpCreateTensorViewNV); + symbolTable.relateToOperator("setTensorViewDimensionsNV", EOpTensorViewSetDimensionNV); + symbolTable.relateToOperator("setTensorViewStrideNV", EOpTensorViewSetStrideNV); + symbolTable.relateToOperator("setTensorViewClipNV", EOpTensorViewSetClipNV); + if (profile != EEsProfile && version >= 460) { symbolTable.relateToOperator("fetchMicroTriangleVertexPositionNV", EOpFetchMicroTriangleVertexPositionNV); symbolTable.relateToOperator("fetchMicroTriangleVertexBarycentricNV", EOpFetchMicroTriangleVertexBarycentricNV); @@ -10292,7 +10762,14 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion symbolTable.relateToOperator("hitObjectGetCurrentTimeNV", EOpHitObjectGetCurrentTimeNV); symbolTable.relateToOperator("hitObjectGetShaderBindingTableRecordIndexNV", EOpHitObjectGetShaderBindingTableRecordIndexNV); symbolTable.relateToOperator("hitObjectGetShaderRecordBufferHandleNV", EOpHitObjectGetShaderRecordBufferHandleNV); + symbolTable.relateToOperator("hitObjectGetClusterIdNV", EOpHitObjectGetClusterIdNV); symbolTable.relateToOperator("reorderThreadNV", EOpReorderThreadNV); + symbolTable.relateToOperator("hitObjectGetSpherePositionNV", EOpHitObjectGetSpherePositionNV); + symbolTable.relateToOperator("hitObjectGetSphereRadiusNV", EOpHitObjectGetSphereRadiusNV); + symbolTable.relateToOperator("hitObjectGetLSSPositionsNV", EOpHitObjectGetLSSPositionsNV); + symbolTable.relateToOperator("hitObjectGetLSSRadiiNV", EOpHitObjectGetLSSRadiiNV); + symbolTable.relateToOperator("hitObjectIsSphereHitNV", EOpHitObjectIsSphereHitNV); + symbolTable.relateToOperator("hitObjectIsLSSHitNV", EOpHitObjectIsLSSHitNV); } break; case EShLangIntersect: diff --git a/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/Intermediate.cpp b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/Intermediate.cpp index 63e176e3a..a174855ac 100644 --- a/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/Intermediate.cpp +++ b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/Intermediate.cpp @@ -65,10 +65,10 @@ namespace glslang { // Returns the added node. // -TIntermSymbol* TIntermediate::addSymbol(long long id, const TString& name, const TType& type, const TConstUnionArray& constArray, +TIntermSymbol* TIntermediate::addSymbol(long long id, const TString& name, const TString& mangledName, const TType& type, const TConstUnionArray& constArray, TIntermTyped* constSubtree, const TSourceLoc& loc) { - TIntermSymbol* node = new TIntermSymbol(id, name, type); + TIntermSymbol* node = new TIntermSymbol(id, name, getStage(), type, &mangledName); node->setLoc(loc); node->setConstArray(constArray); node->setConstSubtree(constSubtree); @@ -80,6 +80,7 @@ TIntermSymbol* TIntermediate::addSymbol(const TIntermSymbol& intermSymbol) { return addSymbol(intermSymbol.getId(), intermSymbol.getName(), + intermSymbol.getMangledName(), intermSymbol.getType(), intermSymbol.getConstArray(), intermSymbol.getConstSubtree(), @@ -96,14 +97,14 @@ TIntermSymbol* TIntermediate::addSymbol(const TVariable& variable) TIntermSymbol* TIntermediate::addSymbol(const TVariable& variable, const TSourceLoc& loc) { - return addSymbol(variable.getUniqueId(), variable.getName(), variable.getType(), variable.getConstArray(), variable.getConstSubtree(), loc); + return addSymbol(variable.getUniqueId(), variable.getName(), variable.getMangledName(), variable.getType(), variable.getConstArray(), variable.getConstSubtree(), loc); } TIntermSymbol* TIntermediate::addSymbol(const TType& type, const TSourceLoc& loc) { TConstUnionArray unionArray; // just a null constant - return addSymbol(0, "", type, unionArray, nullptr, loc); + return addSymbol(0, "", "", type, unionArray, nullptr, loc); } // @@ -163,8 +164,8 @@ TIntermTyped* TIntermediate::addBinaryMath(TOperator op, TIntermTyped* left, TIn 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, EOpConvNumeric, true, left, TType(EbtInt64)); + right = addBuiltInFunctionCall(loc, EOpConvNumeric, true, right, TType(EbtInt64)); left = addBinaryMath(EOpSub, left, right, loc); @@ -567,222 +568,12 @@ bool TIntermediate::isConversionAllowed(TOperator op, TIntermTyped* node) const bool TIntermediate::buildConvertOp(TBasicType dst, TBasicType src, TOperator& newOp) const { - switch (dst) { - case EbtDouble: - switch (src) { - case EbtUint: newOp = EOpConvUintToDouble; break; - case EbtBool: newOp = EOpConvBoolToDouble; break; - case EbtFloat: newOp = EOpConvFloatToDouble; break; - case EbtInt: newOp = EOpConvIntToDouble; break; - case EbtInt8: newOp = EOpConvInt8ToDouble; break; - case EbtUint8: newOp = EOpConvUint8ToDouble; break; - case EbtInt16: newOp = EOpConvInt16ToDouble; break; - case EbtUint16: newOp = EOpConvUint16ToDouble; break; - case EbtFloat16: newOp = EOpConvFloat16ToDouble; break; - case EbtInt64: newOp = EOpConvInt64ToDouble; break; - case EbtUint64: newOp = EOpConvUint64ToDouble; break; - default: - return false; - } - break; - case EbtFloat: - switch (src) { - case EbtInt: newOp = EOpConvIntToFloat; break; - case EbtUint: newOp = EOpConvUintToFloat; break; - case EbtBool: newOp = EOpConvBoolToFloat; break; - case EbtDouble: newOp = EOpConvDoubleToFloat; break; - case EbtInt8: newOp = EOpConvInt8ToFloat; break; - case EbtUint8: newOp = EOpConvUint8ToFloat; break; - case EbtInt16: newOp = EOpConvInt16ToFloat; break; - case EbtUint16: newOp = EOpConvUint16ToFloat; break; - case EbtFloat16: newOp = EOpConvFloat16ToFloat; break; - case EbtInt64: newOp = EOpConvInt64ToFloat; break; - case EbtUint64: newOp = EOpConvUint64ToFloat; break; - default: - return false; - } - break; - case EbtFloat16: - switch (src) { - case EbtInt8: newOp = EOpConvInt8ToFloat16; break; - case EbtUint8: newOp = EOpConvUint8ToFloat16; break; - case EbtInt16: newOp = EOpConvInt16ToFloat16; break; - case EbtUint16: newOp = EOpConvUint16ToFloat16; break; - case EbtInt: newOp = EOpConvIntToFloat16; break; - case EbtUint: newOp = EOpConvUintToFloat16; break; - case EbtBool: newOp = EOpConvBoolToFloat16; break; - case EbtFloat: newOp = EOpConvFloatToFloat16; break; - case EbtDouble: newOp = EOpConvDoubleToFloat16; break; - case EbtInt64: newOp = EOpConvInt64ToFloat16; break; - case EbtUint64: newOp = EOpConvUint64ToFloat16; break; - default: - return false; - } - break; - case EbtBool: - switch (src) { - case EbtInt: newOp = EOpConvIntToBool; break; - case EbtUint: newOp = EOpConvUintToBool; break; - case EbtFloat: newOp = EOpConvFloatToBool; break; - case EbtDouble: newOp = EOpConvDoubleToBool; break; - case EbtInt8: newOp = EOpConvInt8ToBool; break; - case EbtUint8: newOp = EOpConvUint8ToBool; break; - case EbtInt16: newOp = EOpConvInt16ToBool; break; - case EbtUint16: newOp = EOpConvUint16ToBool; break; - case EbtFloat16: newOp = EOpConvFloat16ToBool; break; - case EbtInt64: newOp = EOpConvInt64ToBool; break; - case EbtUint64: newOp = EOpConvUint64ToBool; break; - default: - return false; - } - break; - case EbtInt8: - switch (src) { - case EbtUint8: newOp = EOpConvUint8ToInt8; break; - case EbtInt16: newOp = EOpConvInt16ToInt8; break; - case EbtUint16: newOp = EOpConvUint16ToInt8; break; - case EbtInt: newOp = EOpConvIntToInt8; break; - case EbtUint: newOp = EOpConvUintToInt8; break; - case EbtInt64: newOp = EOpConvInt64ToInt8; break; - case EbtUint64: newOp = EOpConvUint64ToInt8; break; - case EbtBool: newOp = EOpConvBoolToInt8; break; - case EbtFloat: newOp = EOpConvFloatToInt8; break; - case EbtDouble: newOp = EOpConvDoubleToInt8; break; - case EbtFloat16: newOp = EOpConvFloat16ToInt8; break; - default: - return false; - } - break; - case EbtUint8: - switch (src) { - case EbtInt8: newOp = EOpConvInt8ToUint8; break; - case EbtInt16: newOp = EOpConvInt16ToUint8; break; - case EbtUint16: newOp = EOpConvUint16ToUint8; break; - case EbtInt: newOp = EOpConvIntToUint8; break; - case EbtUint: newOp = EOpConvUintToUint8; break; - case EbtInt64: newOp = EOpConvInt64ToUint8; break; - case EbtUint64: newOp = EOpConvUint64ToUint8; break; - case EbtBool: newOp = EOpConvBoolToUint8; break; - case EbtFloat: newOp = EOpConvFloatToUint8; break; - case EbtDouble: newOp = EOpConvDoubleToUint8; break; - case EbtFloat16: newOp = EOpConvFloat16ToUint8; break; - default: - return false; - } - break; - - case EbtInt16: - switch (src) { - case EbtUint8: newOp = EOpConvUint8ToInt16; break; - case EbtInt8: newOp = EOpConvInt8ToInt16; break; - case EbtUint16: newOp = EOpConvUint16ToInt16; break; - case EbtInt: newOp = EOpConvIntToInt16; break; - case EbtUint: newOp = EOpConvUintToInt16; break; - case EbtInt64: newOp = EOpConvInt64ToInt16; break; - case EbtUint64: newOp = EOpConvUint64ToInt16; break; - case EbtBool: newOp = EOpConvBoolToInt16; break; - case EbtFloat: newOp = EOpConvFloatToInt16; break; - case EbtDouble: newOp = EOpConvDoubleToInt16; break; - case EbtFloat16: newOp = EOpConvFloat16ToInt16; break; - default: - return false; - } - break; - case EbtUint16: - switch (src) { - case EbtInt8: newOp = EOpConvInt8ToUint16; break; - case EbtUint8: newOp = EOpConvUint8ToUint16; break; - case EbtInt16: newOp = EOpConvInt16ToUint16; break; - case EbtInt: newOp = EOpConvIntToUint16; break; - case EbtUint: newOp = EOpConvUintToUint16; break; - case EbtInt64: newOp = EOpConvInt64ToUint16; break; - case EbtUint64: newOp = EOpConvUint64ToUint16; break; - case EbtBool: newOp = EOpConvBoolToUint16; break; - case EbtFloat: newOp = EOpConvFloatToUint16; break; - case EbtDouble: newOp = EOpConvDoubleToUint16; break; - case EbtFloat16: newOp = EOpConvFloat16ToUint16; break; - default: - return false; - } - break; - - case EbtInt: - switch (src) { - case EbtUint: newOp = EOpConvUintToInt; break; - case EbtBool: newOp = EOpConvBoolToInt; break; - case EbtFloat: newOp = EOpConvFloatToInt; break; - case EbtInt8: newOp = EOpConvInt8ToInt; break; - case EbtUint8: newOp = EOpConvUint8ToInt; break; - case EbtInt16: newOp = EOpConvInt16ToInt; break; - case EbtUint16: newOp = EOpConvUint16ToInt; break; - case EbtDouble: newOp = EOpConvDoubleToInt; break; - case EbtFloat16: newOp = EOpConvFloat16ToInt; break; - case EbtInt64: newOp = EOpConvInt64ToInt; break; - case EbtUint64: newOp = EOpConvUint64ToInt; break; - default: - return false; - } - break; - case EbtUint: - switch (src) { - case EbtInt: newOp = EOpConvIntToUint; break; - case EbtBool: newOp = EOpConvBoolToUint; break; - case EbtFloat: newOp = EOpConvFloatToUint; break; - case EbtInt8: newOp = EOpConvInt8ToUint; break; - case EbtUint8: newOp = EOpConvUint8ToUint; break; - case EbtInt16: newOp = EOpConvInt16ToUint; break; - case EbtUint16: newOp = EOpConvUint16ToUint; break; - case EbtDouble: newOp = EOpConvDoubleToUint; break; - case EbtFloat16: newOp = EOpConvFloat16ToUint; break; - case EbtInt64: newOp = EOpConvInt64ToUint; break; - case EbtUint64: newOp = EOpConvUint64ToUint; break; - // For bindless texture type conversion, add a dummy convert op, just - // to generate a new TIntermTyped - // uvec2(any sampler type) - // uvec2(any image type) - case EbtSampler: newOp = EOpConvIntToUint; break; - default: - return false; - } - break; - case EbtInt64: - switch (src) { - case EbtInt8: newOp = EOpConvInt8ToInt64; break; - case EbtUint8: newOp = EOpConvUint8ToInt64; break; - case EbtInt16: newOp = EOpConvInt16ToInt64; break; - case EbtUint16: newOp = EOpConvUint16ToInt64; break; - case EbtInt: newOp = EOpConvIntToInt64; break; - case EbtUint: newOp = EOpConvUintToInt64; break; - case EbtBool: newOp = EOpConvBoolToInt64; break; - case EbtFloat: newOp = EOpConvFloatToInt64; break; - case EbtDouble: newOp = EOpConvDoubleToInt64; break; - case EbtFloat16: newOp = EOpConvFloat16ToInt64; break; - case EbtUint64: newOp = EOpConvUint64ToInt64; break; - default: - return false; - } - break; - case EbtUint64: - switch (src) { - case EbtInt8: newOp = EOpConvInt8ToUint64; break; - case EbtUint8: newOp = EOpConvUint8ToUint64; break; - case EbtInt16: newOp = EOpConvInt16ToUint64; break; - case EbtUint16: newOp = EOpConvUint16ToUint64; break; - case EbtInt: newOp = EOpConvIntToUint64; break; - case EbtUint: newOp = EOpConvUintToUint64; break; - case EbtBool: newOp = EOpConvBoolToUint64; break; - case EbtFloat: newOp = EOpConvFloatToUint64; break; - case EbtDouble: newOp = EOpConvDoubleToUint64; break; - case EbtFloat16: newOp = EOpConvFloat16ToUint64; break; - case EbtInt64: newOp = EOpConvInt64ToUint64; break; - default: - return false; - } - break; - default: - return false; + if ((isTypeInt(dst) || isTypeFloat(dst) || dst == EbtBool) && + (isTypeInt(src) || isTypeFloat(src) || src == EbtBool)) { + newOp = EOpConvNumeric; + return true; } - return true; + return false; } // This is 'mechanism' here, it does any conversion told. @@ -1034,6 +825,15 @@ TIntermTyped* TIntermediate::addConversion(TOperator op, const TType& type, TInt op != EOpConstructCooperativeMatrixKHR) return nullptr; + if (node->getType().isTensorLayoutNV() || + node->getType().isTensorViewNV()) + return nullptr; + + // Reject implicit conversions to cooperative vector types + if (node->getType().isCoopVecNV() && + op != EOpConstructCooperativeVectorNV) + return nullptr; + // Note: callers are responsible for other aspects of shape, // like vector and matrix sizes. @@ -1101,6 +901,7 @@ TIntermTyped* TIntermediate::addConversion(TOperator op, const TType& type, TInt case EOpConstructStruct: case EOpConstructCooperativeMatrixNV: case EOpConstructCooperativeMatrixKHR: + case EOpConstructCooperativeVectorNV: if (type.isReference() || node->getType().isReference()) { // types must match to assign a reference @@ -1977,6 +1778,9 @@ TOperator TIntermediate::mapTypeToConstructorOp(const TType& type) const if (type.isCoopMatKHR()) return EOpConstructCooperativeMatrixKHR; + if (type.isCoopVecNV()) + return EOpConstructCooperativeVectorNV; + switch (type.getBasicType()) { case EbtStruct: op = EOpConstructStruct; @@ -2962,17 +2766,16 @@ bool TIntermediate::isSpecializationOperation(const TIntermOperator& node) const // (However, some floating-point operations result in bool, like ">", // so are handled later.) if (node.getType().isFloatingDomain()) { + if (IsOpNumericConv(node.getOp()) && + isTypeFloat(node.getType().getBasicType()) && + isTypeFloat(node.getAsUnaryNode()->getOperand()->getAsTyped()->getType().getBasicType())) { + return true; + } switch (node.getOp()) { case EOpIndexDirect: case EOpIndexIndirect: case EOpIndexDirectStruct: case EOpVectorSwizzle: - case EOpConvFloatToDouble: - case EOpConvDoubleToFloat: - case EOpConvFloat16ToFloat: - case EOpConvFloatToFloat16: - case EOpConvFloat16ToDouble: - case EOpConvDoubleToFloat16: return true; default: return false; @@ -2987,6 +2790,15 @@ bool TIntermediate::isSpecializationOperation(const TIntermOperator& node) const // So, for now, we can assume everything left is non-floating-point... + if (IsOpNumericConv(node.getOp())) { + TBasicType srcType = node.getAsUnaryNode()->getOperand()->getAsTyped()->getType().getBasicType(); + TBasicType dstType = node.getType().getBasicType(); + if ((isTypeInt(srcType) || srcType == EbtBool) && + (isTypeInt(dstType) || dstType == EbtBool)) { + return true; + } + } + // Now check for integer/bool-based operations switch (node.getOp()) { @@ -2996,98 +2808,6 @@ bool TIntermediate::isSpecializationOperation(const TIntermOperator& node) const case EOpIndexDirectStruct: case EOpVectorSwizzle: - // (u)int* -> bool - case EOpConvInt8ToBool: - case EOpConvInt16ToBool: - case EOpConvIntToBool: - case EOpConvInt64ToBool: - case EOpConvUint8ToBool: - case EOpConvUint16ToBool: - case EOpConvUintToBool: - case EOpConvUint64ToBool: - - // bool -> (u)int* - case EOpConvBoolToInt8: - case EOpConvBoolToInt16: - case EOpConvBoolToInt: - case EOpConvBoolToInt64: - case EOpConvBoolToUint8: - case EOpConvBoolToUint16: - case EOpConvBoolToUint: - case EOpConvBoolToUint64: - - // int8_t -> (u)int* - case EOpConvInt8ToInt16: - case EOpConvInt8ToInt: - case EOpConvInt8ToInt64: - case EOpConvInt8ToUint8: - case EOpConvInt8ToUint16: - case EOpConvInt8ToUint: - case EOpConvInt8ToUint64: - - // int16_t -> (u)int* - case EOpConvInt16ToInt8: - case EOpConvInt16ToInt: - case EOpConvInt16ToInt64: - case EOpConvInt16ToUint8: - case EOpConvInt16ToUint16: - case EOpConvInt16ToUint: - case EOpConvInt16ToUint64: - - // int32_t -> (u)int* - case EOpConvIntToInt8: - case EOpConvIntToInt16: - case EOpConvIntToInt64: - case EOpConvIntToUint8: - case EOpConvIntToUint16: - case EOpConvIntToUint: - case EOpConvIntToUint64: - - // int64_t -> (u)int* - case EOpConvInt64ToInt8: - case EOpConvInt64ToInt16: - case EOpConvInt64ToInt: - case EOpConvInt64ToUint8: - case EOpConvInt64ToUint16: - case EOpConvInt64ToUint: - case EOpConvInt64ToUint64: - - // uint8_t -> (u)int* - case EOpConvUint8ToInt8: - case EOpConvUint8ToInt16: - case EOpConvUint8ToInt: - case EOpConvUint8ToInt64: - case EOpConvUint8ToUint16: - case EOpConvUint8ToUint: - case EOpConvUint8ToUint64: - - // uint16_t -> (u)int* - case EOpConvUint16ToInt8: - case EOpConvUint16ToInt16: - case EOpConvUint16ToInt: - case EOpConvUint16ToInt64: - case EOpConvUint16ToUint8: - case EOpConvUint16ToUint: - case EOpConvUint16ToUint64: - - // uint32_t -> (u)int* - case EOpConvUintToInt8: - case EOpConvUintToInt16: - case EOpConvUintToInt: - case EOpConvUintToInt64: - case EOpConvUintToUint8: - case EOpConvUintToUint16: - case EOpConvUintToUint64: - - // uint64_t -> (u)int* - case EOpConvUint64ToInt8: - case EOpConvUint64ToInt16: - case EOpConvUint64ToInt: - case EOpConvUint64ToInt64: - case EOpConvUint64ToUint8: - case EOpConvUint64ToUint16: - case EOpConvUint64ToUint: - // unary operations case EOpNegative: case EOpLogicalNot: @@ -3590,6 +3310,43 @@ bool TIntermediate::promoteBinary(TIntermBinary& node) return false; } + if (left->getType().isCoopVecNV() || right->getType().isCoopVecNV()) { + // Operations on two cooperative vectors must have identical types + if (left->getType().isCoopVecNV() && right->getType().isCoopVecNV() && + left->getType() != right->getType()) { + return false; + } + switch (op) { + case EOpMul: + case EOpMulAssign: + // Use VectorTimesScalar if either operand is not a vector. Otherwise use Mul. + if (!left->getType().isCoopVecNV() || !right->getType().isCoopVecNV()) { + node.setOp(op == EOpMulAssign ? EOpVectorTimesScalarAssign : EOpVectorTimesScalar); + } + // In case of scalar*vector, take the result type from the vector. + if (right->getType().isCoopVecNV()) { + node.setType(right->getType()); + } + return true; + case EOpLeftShift: + case EOpLeftShiftAssign: + case EOpRightShift: + case EOpRightShiftAssign: + case EOpAdd: + case EOpSub: + case EOpDiv: + case EOpAssign: + // These require both to be cooperative vectors + if (!left->getType().isCoopVecNV() || !right->getType().isCoopVecNV()) { + return false; + } + return true; + default: + break; + } + return false; + } + // Finish handling the case, for all ops, where both operands are scalars. if (left->isScalar() && right->isScalar()) return true; diff --git a/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/ParseContextBase.cpp b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/ParseContextBase.cpp index 591dfc718..986b94194 100644 --- a/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/ParseContextBase.cpp +++ b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/ParseContextBase.cpp @@ -59,7 +59,7 @@ void TParseContextBase::outputMessage(const TSourceLoc& loc, const char* szReaso safe_vsprintf(szExtraInfo, maxSize, szExtraInfoFormat, args); infoSink.info.prefix(prefix); - infoSink.info.location(loc, messages & EShMsgAbsolutePath); + infoSink.info.location(loc, messages & EShMsgAbsolutePath, messages & EShMsgDisplayErrorColumn); infoSink.info << "'" << szToken << "' : " << szReason << " " << szExtraInfo << "\n"; if (prefix == EPrefixError) { @@ -305,6 +305,11 @@ void TParseContextBase::checkIndex(const TSourceLoc& loc, const TType& type, int error(loc, "", "[", "matrix index out of range '%d'", index); index = type.getMatrixCols() - 1; } + } else if (type.isCoopVecNV()) { + if (index >= type.computeNumComponents()) { + error(loc, "", "[", "cooperative vector index out of range '%d'", index); + index = type.computeNumComponents() - 1; + } } } diff --git a/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/ParseHelper.cpp b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/ParseHelper.cpp index b591c72f4..042ea0a1f 100644 --- a/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/ParseHelper.cpp +++ b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/ParseHelper.cpp @@ -42,9 +42,9 @@ #include "Initialize.h" #include "Scan.h" -#include "../OSDependent/osinclude.h" #include +#include "Versions.h" #include "preprocessor/PpContext.h" extern int yyparse(glslang::TParseContext*); @@ -507,8 +507,18 @@ TIntermTyped* TParseContext::handleVariable(const TSourceLoc& loc, TSymbol* symb } // Recovery, if it wasn't found or was not a variable. - if (! variable) - variable = new TVariable(string, TType(EbtVoid)); + if (! variable) { + bool builtIn = false; + TVector candidateList; + symbolTable.findFunctionNameList(*string + "(", candidateList, builtIn); + + // If it's a function, pass the name/mangledName + if (!candidateList.empty() && !builtIn) { + variable = new TVariable(&candidateList[0]->getName(), &candidateList[0]->getMangledName(), TType(EbtFunction)); + } else { + variable = new TVariable(string, TType(EbtVoid)); + } + } if (variable->getType().getQualifier().isFrontEndConstant()) node = intermediate.addConstantUnion(variable->getConstArray(), variable->getType(), loc); @@ -540,7 +550,7 @@ TIntermTyped* TParseContext::handleBracketDereference(const TSourceLoc& loc, TIn variableCheck(base); if (! base->isArray() && ! base->isMatrix() && ! base->isVector() && ! base->getType().isCoopMat() && - ! base->isReference()) { + ! base->isReference() && ! base->getType().isCoopVecNV()) { if (base->getAsSymbolNode()) error(loc, " left of '[' is not of type array, matrix, or vector ", base->getAsSymbolNode()->getName().c_str(), ""); else @@ -961,7 +971,7 @@ TIntermTyped* TParseContext::handleDotDereference(const TSourceLoc& loc, TInterm const char* feature = ".length() on vectors and matrices"; requireProfile(loc, ~EEsProfile, feature); profileRequires(loc, ~EEsProfile, 420, E_GL_ARB_shading_language_420pack, feature); - } else if (!base->getType().isCoopMat()) { + } else if (!base->getType().isCoopMat() && !base->getType().isCoopVecNV()) { bool enhanced = intermediate.getEnhancedMsgs(); error(loc, "does not operate on this type:", field.c_str(), base->getType().getCompleteString(enhanced).c_str()); return base; @@ -1173,19 +1183,23 @@ TFunction* TParseContext::handleFunctionDeclarator(const TSourceLoc& loc, TFunct if (prevDec) { if (prevDec->isPrototyped() && prototype) profileRequires(loc, EEsProfile, 300, nullptr, "multiple prototypes for same function"); - if (prevDec->getType() != function.getType()) - error(loc, "overloaded functions must have the same return type", function.getName().c_str(), ""); if (prevDec->getSpirvInstruction() != function.getSpirvInstruction()) { error(loc, "overloaded functions must have the same qualifiers", function.getName().c_str(), "spirv_instruction"); } + bool parameterTypesDiffer = false; for (int i = 0; i < prevDec->getParamCount(); ++i) { if ((*prevDec)[i].type->getQualifier().storage != function[i].type->getQualifier().storage) error(loc, "overloaded functions must have the same parameter storage qualifiers for argument", function[i].type->getStorageQualifierString(), "%d", i+1); if ((*prevDec)[i].type->getQualifier().precision != function[i].type->getQualifier().precision) error(loc, "overloaded functions must have the same parameter precision qualifiers for argument", function[i].type->getPrecisionQualifierString(), "%d", i+1); + + if (*(*prevDec)[i].type != *function[i].type) + parameterTypesDiffer = true; } + if (!parameterTypesDiffer && prevDec->getType() != function.getType()) + error(loc, "overloaded functions must have the same return type", function.getName().c_str(), ""); } arrayObjectCheck(loc, function.getType(), "array in function return type"); @@ -1418,6 +1432,8 @@ TIntermTyped* TParseContext::handleFunctionCall(const TSourceLoc& loc, TFunction error(arguments->getLoc(), message, "readonly", ""); if (argQualifier.writeonly && ! formalQualifier.writeonly) error(arguments->getLoc(), message, "writeonly", ""); + if (argQualifier.nontemporal && ! formalQualifier.nontemporal) + error(arguments->getLoc(), message, "nontemporal", ""); // Don't check 'restrict', it is different than the rest: // "...but only restrict can be taken away from a calling argument, by a formal parameter that // lacks the restrict qualifier..." @@ -1436,6 +1452,11 @@ TIntermTyped* TParseContext::handleFunctionCall(const TSourceLoc& loc, TFunction if (builtIn && arg->getAsTyped()->getType().contains8BitInt()) requireInt8Arithmetic(arguments->getLoc(), "built-in function", "(u)int8 types can only be in uniform block or buffer storage"); + // Check that coopVecOuterProductAccumulateNV vector component types match + if (builtIn && fnCandidate->getBuiltInOp() == EOpCooperativeVectorOuterProductAccumulateNV && + i == 1 && arg->getAsTyped()->getType().getBasicType() != aggregate->getSequence()[0]->getAsTyped()->getType().getBasicType()) + error(arguments->getLoc(), "cooperative vector basic types must match", fnCandidate->getName().c_str(), ""); + // TODO 4.5 functionality: A shader will fail to compile // if the value passed to the memargument of an atomic memory function does not correspond to a buffer or // shared variable. It is acceptable to pass an element of an array or a single component of a vector to the @@ -1490,12 +1511,14 @@ TIntermTyped* TParseContext::handleFunctionCall(const TSourceLoc& loc, TFunction result = addOutputArgumentConversions(*fnCandidate, *result->getAsAggregate()); } - if (result->getAsTyped()->getType().isCoopMat() && - !result->getAsTyped()->getType().isParameterized()) { - assert(fnCandidate->getBuiltInOp() == EOpCooperativeMatrixMulAdd || - fnCandidate->getBuiltInOp() == EOpCooperativeMatrixMulAddNV); + handleCoopMat2FunctionCall(loc, fnCandidate, result, arguments); - result->setType(result->getAsAggregate()->getSequence()[2]->getAsTyped()->getType()); + if (result->getAsTyped()->getType().isCoopVecNV() && + !result->getAsTyped()->getType().isParameterized()) { + if (auto unaryNode = result->getAsUnaryNode()) + result->setType(unaryNode->getOperand()->getAsTyped()->getType()); + else + result->setType(result->getAsAggregate()->getSequence()[0]->getAsTyped()->getType()); } } } @@ -1508,6 +1531,224 @@ TIntermTyped* TParseContext::handleFunctionCall(const TSourceLoc& loc, TFunction return result; } +void TParseContext::handleCoopMat2FunctionCall(const TSourceLoc& loc, const TFunction* fnCandidate, TIntermTyped* result, TIntermNode* arguments) +{ + if (arguments && arguments->getAsAggregate()) { + auto &sequence = arguments->getAsAggregate()->getSequence(); + for (uint32_t i = 0; i < sequence.size(); ++i) { + auto param = sequence[i]; + if (param->getAsTyped()->getBasicType() == EbtFunction) { + // Add the function to the callgraph + intermediate.addToCallGraph(infoSink, currentCaller, param->getAsSymbolNode()->getMangledName()); + + // error checking that all parameters are 'const in' + if (fnCandidate->getBuiltInOp() == EOpCooperativeMatrixLoadTensorNV || + fnCandidate->getBuiltInOp() == EOpCooperativeMatrixReduceNV || + fnCandidate->getBuiltInOp() == EOpCooperativeMatrixPerElementOpNV) { + const TFunction* func = symbolTable.find(param->getAsSymbolNode()->getMangledName())->getAsFunction(); + for (int i = 0; i < func->getParamCount(); ++i) { + const TParameter& arg = (*func)[i]; + const TQualifier& formalQualifier = arg.type->getQualifier(); + if (formalQualifier.storage != EvqConstReadOnly) { + error(loc, "function parameters must all be qualified 'const in'", param->getAsSymbolNode()->getMangledName().c_str(), ""); + } + } + } + + // error checking decodeFunc parameters are (reference, uint32_t[], uint32_t[]) + if (fnCandidate->getBuiltInOp() == EOpCooperativeMatrixLoadTensorNV) { + const TFunction* decodeFunc = symbolTable.find(param->getAsSymbolNode()->getMangledName())->getAsFunction(); + + if (decodeFunc->getParamCount() != 3) { + error(loc, "must have three parameters", param->getAsSymbolNode()->getMangledName().c_str(), ""); + } + + if ((*decodeFunc)[0].type->getBasicType() != EbtReference) { + error(loc, "first parameter must be buffer reference type", param->getAsSymbolNode()->getMangledName().c_str(), ""); + } + if ((*decodeFunc)[1].type->getBasicType() != EbtUint || (*decodeFunc)[2].type->getBasicType() != EbtUint) { + error(loc, "coordinate parameters must be uint32_t", param->getAsSymbolNode()->getMangledName().c_str(), ""); + } + if (!(*decodeFunc)[1].type->isArray() || !(*decodeFunc)[2].type->isArray()) { + error(loc, "coordinate parameters must be uint32_t", param->getAsSymbolNode()->getMangledName().c_str(), ""); + } + } + + // error checking reduce function has matching parameters + if (fnCandidate->getBuiltInOp() == EOpCooperativeMatrixReduceNV) { + const TFunction* combineOp = symbolTable.find(param->getAsSymbolNode()->getMangledName())->getAsFunction(); + + if (combineOp->getParamCount() != 2) { + error(loc, "must have two parameters", param->getAsSymbolNode()->getMangledName().c_str(), ""); + } + + for (int i = 0; i < combineOp->getParamCount(); ++i) { + const TParameter& arg = (*combineOp)[i]; + if (sequence[1]->getAsTyped()->getType().getBasicType() != arg.type->getBasicType()) { + error(loc, "parameter types must match cooperative matrix component type", param->getAsSymbolNode()->getMangledName().c_str(), ""); + } + } + if (sequence[1]->getAsTyped()->getType().getBasicType() != combineOp->getType().getBasicType()) { + error(loc, "return type must match cooperative matrix component type", param->getAsSymbolNode()->getMangledName().c_str(), ""); + } + } + + // error checking perelement op has correct parameters + if (fnCandidate->getBuiltInOp() == EOpCooperativeMatrixPerElementOpNV) { + const TFunction* elemOp = symbolTable.find(param->getAsSymbolNode()->getMangledName())->getAsFunction(); + + if (sequence[1]->getAsTyped()->getType() != sequence[0]->getAsTyped()->getType()) { + error(loc, "cooperative matrix input and result types must match", "", ""); + } + + if (elemOp->getParamCount() < 3) { + error(loc, "not enough parameters", param->getAsSymbolNode()->getMangledName().c_str(), ""); + } else if (elemOp->getParamCount() != (int)sequence.size()) { + error(loc, "number of parameters must match call to coopMatPerElementNV", param->getAsSymbolNode()->getMangledName().c_str(), ""); + } else { + if ((*elemOp)[0].type->getBasicType() != EbtUint || (*elemOp)[1].type->getBasicType() != EbtUint) { + error(loc, "row/column parameters must be uint32_t", param->getAsSymbolNode()->getMangledName().c_str(), ""); + } + + const TParameter& matArg = (*elemOp)[2]; + if (sequence[1]->getAsTyped()->getType().getBasicType() != matArg.type->getBasicType()) { + error(loc, "third parameter must match cooperative matrix component type", param->getAsSymbolNode()->getMangledName().c_str(), ""); + } + + for (int i = 3; i < elemOp->getParamCount(); ++i) { + const TParameter& arg = (*elemOp)[i]; + if (sequence[i]->getAsTyped()->getType().getBasicType() != arg.type->getBasicType()) { + error(loc, "parameter types must match or be cooperative matrix component type", param->getAsSymbolNode()->getMangledName().c_str(), ""); + } + } + if (sequence[1]->getAsTyped()->getType().getBasicType() != elemOp->getType().getBasicType()) { + error(loc, "return type must match cooperative matrix component type", param->getAsSymbolNode()->getMangledName().c_str(), ""); + } + } + } + } + } + } + if ((result->getAsTyped()->getType().isCoopMat() || + result->getAsTyped()->getType().isTensorLayoutNV() || + result->getAsTyped()->getType().isTensorViewNV()) && + !result->getAsTyped()->getType().isParameterized()) { + assert(fnCandidate->getBuiltInOp() == EOpCooperativeMatrixMulAdd || + fnCandidate->getBuiltInOp() == EOpCooperativeMatrixMulAddNV || + fnCandidate->getBuiltInOp() == EOpCooperativeMatrixReduceNV || + fnCandidate->getBuiltInOp() == EOpCooperativeMatrixPerElementOpNV || + fnCandidate->getBuiltInOp() == EOpCooperativeMatrixTransposeNV || + fnCandidate->getBuiltInOp() == EOpCreateTensorLayoutNV || + fnCandidate->getBuiltInOp() == EOpTensorLayoutSetDimensionNV || + fnCandidate->getBuiltInOp() == EOpTensorLayoutSetBlockSizeNV || + fnCandidate->getBuiltInOp() == EOpTensorLayoutSetStrideNV || + fnCandidate->getBuiltInOp() == EOpTensorLayoutSliceNV || + fnCandidate->getBuiltInOp() == EOpTensorLayoutSetClampValueNV || + fnCandidate->getBuiltInOp() == EOpCreateTensorViewNV || + fnCandidate->getBuiltInOp() == EOpTensorViewSetDimensionNV || + fnCandidate->getBuiltInOp() == EOpTensorViewSetStrideNV || + fnCandidate->getBuiltInOp() == EOpTensorViewSetClipNV); + + if (fnCandidate->getBuiltInOp() == EOpCreateTensorLayoutNV) { + + // Convert template parameters to arraySizes/typeParameters + TArraySizes *arraySizes = new TArraySizes; + for (uint32_t i = 0; i < 2; ++i) { + TIntermNode *param {}; + if (arguments->getAsConstantUnion()) { + if (i == 0) { + param = arguments; + } + } else { + assert(arguments->getAsAggregate()); + auto &sequence = arguments->getAsAggregate()->getSequence(); + if (i < sequence.size()) { + param = sequence[i]; + } + } + if (param) { + if (param->getAsTyped()->getType().getQualifier().isSpecConstant()) { + uint32_t value = param->getAsSymbolNode()->getConstArray()[0].getIConst(); + arraySizes->addInnerSize(value, param->getAsTyped()); + } else { + uint32_t value = param->getAsConstantUnion()->getConstArray()[0].getIConst(); + arraySizes->addInnerSize(value); + } + } else { + // gl_CooperativeMatrixClampModeUndefined + arraySizes->addInnerSize(0); + } + } + TTypeParameters typeParameters; + typeParameters.arraySizes = arraySizes; + + TType resultType; + resultType.deepCopy(result->getAsTyped()->getType()); + + resultType.copyTypeParameters(typeParameters); + result->setType(resultType); + } else if (fnCandidate->getBuiltInOp() == EOpCreateTensorViewNV) { + + // Convert template parameters to arraySizes/typeParameters + TArraySizes *arraySizes = new TArraySizes; + for (uint32_t i = 0; i < 7; ++i) { + TIntermNode *param {}; + if (arguments->getAsConstantUnion()) { + if (i == 0) { + param = arguments; + } + } else { + assert(arguments->getAsAggregate()); + auto &sequence = arguments->getAsAggregate()->getSequence(); + if (i < sequence.size()) { + param = sequence[i]; + } + } + if (param) { + if (param->getAsTyped()->getType().getQualifier().isSpecConstant()) { + uint32_t value = param->getAsSymbolNode()->getConstArray()[0].getIConst(); + arraySizes->addInnerSize(value, param->getAsTyped()); + } else { + uint32_t value = param->getAsConstantUnion()->getConstArray()[0].getIConst(); + arraySizes->addInnerSize(value); + } + } else { + uint32_t value = 0; + if (i >= 2) { + // default permutation values are an increasing sequence + value = i - 2; + } + arraySizes->addInnerSize(value); + } + } + TTypeParameters typeParameters; + typeParameters.arraySizes = arraySizes; + + TType resultType; + resultType.deepCopy(result->getAsTyped()->getType()); + + resultType.copyTypeParameters(typeParameters); + result->setType(resultType); + } else if (fnCandidate->getBuiltInOp() == EOpCooperativeMatrixReduceNV || + fnCandidate->getBuiltInOp() == EOpCooperativeMatrixPerElementOpNV || + fnCandidate->getBuiltInOp() == EOpCooperativeMatrixTransposeNV || + fnCandidate->getBuiltInOp() == EOpTensorLayoutSetDimensionNV || + fnCandidate->getBuiltInOp() == EOpTensorLayoutSetBlockSizeNV || + fnCandidate->getBuiltInOp() == EOpTensorLayoutSetStrideNV || + fnCandidate->getBuiltInOp() == EOpTensorLayoutSliceNV || + fnCandidate->getBuiltInOp() == EOpTensorLayoutSetClampValueNV || + fnCandidate->getBuiltInOp() == EOpTensorViewSetDimensionNV || + fnCandidate->getBuiltInOp() == EOpTensorViewSetStrideNV || + fnCandidate->getBuiltInOp() == EOpTensorViewSetClipNV) { + // Set result type to match type of first parameter + result->setType(result->getAsAggregate()->getSequence()[0]->getAsTyped()->getType()); + } else { + // For MulAdd, set result type to match type of C parameter + result->setType(result->getAsAggregate()->getSequence()[2]->getAsTyped()->getType()); + } + } +} + TIntermTyped* TParseContext::handleBuiltInFunctionCall(TSourceLoc loc, TIntermNode* arguments, const TFunction& function) { @@ -1623,6 +1864,8 @@ void TParseContext::computeBuiltinPrecisions(TIntermTyped& node, const TFunction numArgs = 1; break; case EOpDebugPrintf: + case EOpCooperativeMatrixPerElementOpNV: + case EOpCooperativeMatrixReduceNV: numArgs = 0; break; default: @@ -1798,7 +2041,7 @@ TIntermTyped* TParseContext::handleLengthMethod(const TSourceLoc& loc, TFunction length = type.getMatrixCols(); else if (type.isVector()) length = type.getVectorSize(); - else if (type.isCoopMat()) + else if (type.isCoopMat() || type.isCoopVecNV()) return intermediate.addBuiltInFunctionCall(loc, EOpArrayLength, true, intermNode, TType(EbtInt)); else { // we should not get here, because earlier semantic checking should have prevented this path @@ -1904,6 +2147,13 @@ TIntermTyped* TParseContext::addOutputArgumentConversions(const TFunction& funct } TVariable* tempArg = makeInternalVariable("tempArg", paramType); tempArg->getWritableType().getQualifier().makeTemporary(); + if (function[i].type->getQualifier().isParamInput()) { + // If the parameter is also an input, copy-in. + TIntermSymbol* tempArgNode = intermediate.addSymbol(*tempArg, intermNode.getLoc()); + TIntermTyped* tempAssign = intermediate.addAssign(EOpAssign, tempArgNode, intermediate.addSymbol(*arguments[i]->getAsTyped()->getAsSymbolNode()), arguments[i]->getLoc()); + conversionTree = intermediate.mergeAggregate(tempAssign, conversionTree, intermNode.getLoc()); + } + TIntermSymbol* tempArgNode = intermediate.addSymbol(*tempArg, intermNode.getLoc()); TIntermTyped* tempAssign = intermediate.addAssign(EOpAssign, arguments[i]->getAsTyped(), tempArgNode, arguments[i]->getLoc()); conversionTree = intermediate.growAggregate(conversionTree, tempAssign, arguments[i]->getLoc()); @@ -2310,18 +2560,34 @@ void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCan case EOpTextureProjLodOffset: case EOpTextureGradOffset: case EOpTextureProjGradOffset: + case EOpSparseTextureOffset: + case EOpSparseTextureFetchOffset: + case EOpSparseTextureLodOffset: + case EOpSparseTextureGradOffset: { // Handle texture-offset limits checking // Pick which argument has to hold constant offsets int arg = -1; switch (callNode.getOp()) { - case EOpTextureOffset: arg = 2; break; - case EOpTextureFetchOffset: arg = (arg0->getType().getSampler().isRect()) ? 2 : 3; break; - case EOpTextureProjOffset: arg = 2; break; - case EOpTextureLodOffset: arg = 3; break; - case EOpTextureProjLodOffset: arg = 3; break; - case EOpTextureGradOffset: arg = 4; break; - case EOpTextureProjGradOffset: arg = 4; break; + case EOpSparseTextureOffset: + case EOpTextureOffset: + case EOpTextureProjOffset: + arg = 2; + break; + case EOpSparseTextureLodOffset: + case EOpTextureLodOffset: + case EOpTextureProjLodOffset: + arg = 3; + break; + case EOpSparseTextureGradOffset: + case EOpTextureGradOffset: + case EOpTextureProjGradOffset: + arg = 4; + break; + case EOpSparseTextureFetchOffset: + case EOpTextureFetchOffset: + arg = (arg0->getType().getSampler().isRect()) ? 2 : 3; + break; default: assert(0); break; @@ -2333,8 +2599,10 @@ void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCan arg0->getType().getSampler().shadow; if (f16ShadowCompare) ++arg; - if (! (*argp)[arg]->getAsTyped()->getQualifier().isConstant()) - error(loc, "argument must be compile-time constant", "texel offset", ""); + if (! (*argp)[arg]->getAsTyped()->getQualifier().isConstant()) { + if (!extensionTurnedOn(E_GL_EXT_texture_offset_non_const)) + error(loc, "argument must be compile-time constant", "texel offset", ""); + } else if ((*argp)[arg]->getAsConstantUnion()) { const TType& type = (*argp)[arg]->getAsTyped()->getType(); for (int c = 0; c < type.getVectorSize(); ++c) { @@ -2345,11 +2613,13 @@ void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCan } } + // This check does not apply to sparse because + // GL_ARB_sparse_texture2 always includes this function. if (callNode.getOp() == EOpTextureOffset) { TSampler s = arg0->getType().getSampler(); if (s.is2D() && s.isArrayed() && s.isShadow()) { if ( - ((*argp)[1]->getAsTyped()->getType().getBasicType() == EbtFloat) && + ((*argp)[1]->getAsTyped()->getType().getBasicType() == EbtFloat) && ((*argp)[1]->getAsTyped()->getType().getVectorSize() == 4) && (fnCandidate.getParamCount() == 4)) { featureString = fnCandidate.getName() + " for sampler2DArrayShadow"; @@ -2365,6 +2635,9 @@ void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCan } } + // This check does not apply to sparse because + // GL_ARB_sparse_texture2 does not define sparseTextureLodOffsetARB + // with a sampler2DArrayShadow. if (callNode.getOp() == EOpTextureLodOffset) { TSampler s = arg0->getType().getSampler(); if (s.is2D() && s.isArrayed() && s.isShadow() && @@ -2501,6 +2774,12 @@ void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCan case EOpRayQueryGetIntersectionObjectToWorld: case EOpRayQueryGetIntersectionWorldToObject: case EOpRayQueryGetIntersectionTriangleVertexPositionsEXT: + case EOpRayQueryGetIntersectionClusterIdNV: + case EOpRayQueryGetIntersectionSpherePositionNV: + case EOpRayQueryGetIntersectionSphereRadiusNV: + case EOpRayQueryGetIntersectionLSSHitValueNV: + case EOpRayQueryGetIntersectionLSSPositionsNV: + case EOpRayQueryGetIntersectionLSSRadiiNV: if (!(*argp)[1]->getAsConstantUnion()) error(loc, "argument must be compile-time constant", "committed", ""); break; @@ -2533,7 +2812,7 @@ void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCan error(loc, "only supported on image with format r64i", fnCandidate.getName().c_str(), ""); else if (callNode.getType().getBasicType() == EbtUint64 && imageType.getQualifier().getFormat() != ElfR64ui) error(loc, "only supported on image with format r64ui", fnCandidate.getName().c_str(), ""); - } else if(callNode.getType().getBasicType() == EbtFloat16 && + } else if(callNode.getType().getBasicType() == EbtFloat16 && ((callNode.getType().getVectorSize() == 2 && arg0->getType().getQualifier().getFormat() == ElfRg16f) || (callNode.getType().getVectorSize() == 4 && arg0->getType().getQualifier().getFormat() == ElfRgba16f))) { if (StartsWith(fnCandidate.getName(), "imageAtomicAdd") || @@ -2604,7 +2883,7 @@ void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCan requireExtensions(loc, 2, extensions, fnCandidate.getName().c_str()); } else if ((callNode.getOp() == EOpAtomicAdd || callNode.getOp() == EOpAtomicExchange || callNode.getOp() == EOpAtomicMin || callNode.getOp() == EOpAtomicMax) && - arg0->getType().getBasicType() == EbtFloat16 && + arg0->getType().getBasicType() == EbtFloat16 && (arg0->getType().getVectorSize() == 2 || arg0->getType().getVectorSize() == 4 )) { requireExtensions(loc, 1, &E_GL_NV_shader_atomic_fp16_vector, fnCandidate.getName().c_str()); } else if ((callNode.getOp() == EOpAtomicAdd || callNode.getOp() == EOpAtomicExchange) && @@ -2773,7 +3052,41 @@ void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCan } break; + case EOpCooperativeVectorMatMulNV: + case EOpCooperativeVectorMatMulAddNV: + { + int inputInterpIdx = 2; + int matrixInterpIdx = 5; + int biasInterpIdx = 8; + int MIdx = callNode.getOp() == EOpCooperativeVectorMatMulAddNV ? 9 : 6; + int KIdx = callNode.getOp() == EOpCooperativeVectorMatMulAddNV ? 10 : 7; + int matrixLayoutIdx = callNode.getOp() == EOpCooperativeVectorMatMulAddNV ? 11 : 8; + int transposeIdx = callNode.getOp() == EOpCooperativeVectorMatMulAddNV ? 12 : 9; + if (!(*argp)[inputInterpIdx]->getAsTyped()->getType().getQualifier().isConstant()) + error(loc, "argument must be compile-time constant", "inputInterpretation", ""); + if (!(*argp)[matrixInterpIdx]->getAsTyped()->getType().getQualifier().isConstant()) + error(loc, "argument must be compile-time constant", "matrixInterpretation", ""); + if (callNode.getOp() == EOpCooperativeVectorMatMulAddNV) { + if (!(*argp)[biasInterpIdx]->getAsTyped()->getType().getQualifier().isConstant()) + error(loc, "argument must be compile-time constant", "biasInterpretation", ""); + } + if (!(*argp)[MIdx]->getAsTyped()->getType().getQualifier().isConstant()) + error(loc, "argument must be compile-time constant", "M", ""); + if (!(*argp)[KIdx]->getAsTyped()->getType().getQualifier().isConstant()) + error(loc, "argument must be compile-time constant", "K", ""); + if (!(*argp)[matrixLayoutIdx]->getAsTyped()->getType().getQualifier().isConstant()) + error(loc, "argument must be compile-time constant", "matrixLayout", ""); + if (!(*argp)[transposeIdx]->getAsTyped()->getType().getQualifier().isConstant()) + error(loc, "argument must be compile-time constant", "transpose", ""); + } + break; + case EOpCooperativeVectorOuterProductAccumulateNV: + if (!(*argp)[5]->getAsTyped()->getType().getQualifier().isConstant()) + error(loc, "argument must be compile-time constant", "matrixLayout", ""); + if (!(*argp)[6]->getAsTyped()->getType().getQualifier().isConstant()) + error(loc, "argument must be compile-time constant", "matrixInterpretation", ""); + break; default: break; } @@ -2927,8 +3240,10 @@ void TParseContext::nonOpBuiltInCheck(const TSourceLoc& loc, const TFunction& fn arg = 4; if (arg > 0) { - if (! callNode.getSequence()[arg]->getAsConstantUnion()) - error(loc, "argument must be compile-time constant", "texel offset", ""); + if (! callNode.getSequence()[arg]->getAsConstantUnion()) { + if (!extensionTurnedOn(E_GL_EXT_texture_offset_non_const)) + error(loc, "argument must be compile-time constant", "texel offset", ""); + } else { const TType& type = callNode.getSequence()[arg]->getAsTyped()->getType(); for (int c = 0; c < type.getVectorSize(); ++c) { @@ -3729,7 +4044,8 @@ bool TParseContext::constructorError(const TSourceLoc& loc, TIntermNode* node, T TIntermTyped* typed = node->getAsTyped(); if (type.isCoopMat() && typed->getType().isCoopMat() && - !type.sameCoopMatShapeAndUse(typed->getType())) { + ((extensionTurnedOn(E_GL_NV_cooperative_matrix2) && !type.sameCoopMatShape(typed->getType())) || + (!extensionTurnedOn(E_GL_NV_cooperative_matrix2) && !type.sameCoopMatShapeAndUse(typed->getType())))) { error(loc, "Cooperative matrix type parameters mismatch", constructorString.c_str(), ""); return true; } @@ -3936,6 +4252,18 @@ void TParseContext::accStructCheck(const TSourceLoc& loc, const TType& type, con } +void TParseContext::hitObjectNVCheck(const TSourceLoc & loc, const TType & type, const TString & identifier) +{ + if (type.getBasicType() == EbtStruct && containsFieldWithBasicType(type, EbtHitObjectNV)) { + error(loc, "struct is not allowed to contain hitObjectNV:", type.getTypeName().c_str(), identifier.c_str()); + } else if (type.getBasicType() == EbtHitObjectNV) { + TStorageQualifier qualifier = type.getQualifier().storage; + if (qualifier != EvqGlobal && qualifier != EvqTemporary) { + error(loc, "hitObjectNV can only be declared in global or function scope with no storage qualifier:", "hitObjectNV", identifier.c_str()); + } + } +} + void TParseContext::transparentOpaqueCheck(const TSourceLoc& loc, const TType& type, const TString& identifier) { if (parsingBuiltins) @@ -4291,6 +4619,7 @@ void TParseContext::mergeQualifiers(const TSourceLoc& loc, TQualifier& dst, cons MERGE_SINGLETON(shadercallcoherent); MERGE_SINGLETON(nonprivate); MERGE_SINGLETON(volatil); + MERGE_SINGLETON(nontemporal); MERGE_SINGLETON(restrict); MERGE_SINGLETON(readonly); MERGE_SINGLETON(writeonly); @@ -4391,7 +4720,7 @@ TPrecisionQualifier TParseContext::getDefaultPrecision(TPublicType& publicType) return defaultPrecision[publicType.basicType]; } -void TParseContext::precisionQualifierCheck(const TSourceLoc& loc, TBasicType baseType, TQualifier& qualifier, bool isCoopMat) +void TParseContext::precisionQualifierCheck(const TSourceLoc& loc, TBasicType baseType, TQualifier& qualifier, bool isCoopMatOrVec) { // Built-in symbols are allowed some ambiguous precisions, to be pinned down // later by context. @@ -4401,7 +4730,7 @@ void TParseContext::precisionQualifierCheck(const TSourceLoc& loc, TBasicType ba if (baseType == EbtAtomicUint && qualifier.precision != EpqNone && qualifier.precision != EpqHigh) error(loc, "atomic counters can only be highp", "atomic_uint", ""); - if (isCoopMat) + if (isCoopMatOrVec) return; if (baseType == EbtFloat || baseType == EbtUint || baseType == EbtInt || baseType == EbtSampler || baseType == EbtAtomicUint) { @@ -4449,7 +4778,7 @@ bool TParseContext::containsFieldWithBasicType(const TType& type, TBasicType bas // Do size checking for an array type's size. // void TParseContext::arraySizeCheck(const TSourceLoc& loc, TIntermTyped* expr, TArraySize& sizePair, - const char* sizeType, const bool allowZero) + const char* sizeType, const bool isTypeParameter) { bool isConst = false; sizePair.node = nullptr; @@ -4479,17 +4808,27 @@ void TParseContext::arraySizeCheck(const TSourceLoc& loc, TIntermTyped* expr, TA sizePair.size = size; - if (! isConst || (expr->getBasicType() != EbtInt && expr->getBasicType() != EbtUint)) { - error(loc, sizeType, "", "must be a constant integer expression"); - return; - } - - if (allowZero) { + if (isTypeParameter) { + if (extensionTurnedOn(E_GL_NV_cooperative_matrix2)) { + if (! isConst || (expr->getBasicType() != EbtInt && expr->getBasicType() != EbtUint && expr->getBasicType() != EbtBool)) { + error(loc, sizeType, "", "must be a constant integer or boolean expression"); + return; + } + } else { + if (! isConst || (expr->getBasicType() != EbtInt && expr->getBasicType() != EbtUint)) { + error(loc, sizeType, "", "must be a constant integer expression"); + return; + } + } if (size < 0) { error(loc, sizeType, "", "must be a non-negative integer"); return; } } else { + if (! isConst || (expr->getBasicType() != EbtInt && expr->getBasicType() != EbtUint)) { + error(loc, sizeType, "", "must be a constant integer expression"); + return; + } if (size <= 0) { error(loc, sizeType, "", "must be a positive integer"); return; @@ -5275,6 +5614,7 @@ void TParseContext::paramCheckFix(const TSourceLoc& loc, const TQualifier& quali { if (qualifier.isMemory()) { type.getQualifier().volatil = qualifier.volatil; + type.getQualifier().nontemporal = qualifier.nontemporal; type.getQualifier().coherent = qualifier.coherent; type.getQualifier().devicecoherent = qualifier.devicecoherent ; type.getQualifier().queuefamilycoherent = qualifier.queuefamilycoherent; @@ -6721,6 +7061,15 @@ void TParseContext::layoutTypeCheck(const TSourceLoc& loc, const TType& type) error(loc, "Push constants blocks can't be an array", "push_constant", ""); } + if (type.getBasicType() == EbtReference) { + if (qualifier.isPipeInput()) + error(loc, "cannot contain any structs with buffer_reference.", "in", + "If you want to interface shader stages with a buffer_reference cast to a uint64 or uvec2 instead."); + if (qualifier.isPipeOutput()) + error(loc, "cannot contain any structs with buffer_reference.", "out", + "If you want to interface shader stages with a buffer_reference cast to a uint64 or uvec2 instead."); + } + if (qualifier.hasBufferReference() && type.getBasicType() != EbtBlock) error(loc, "can only be used with a block", "buffer_reference", ""); @@ -6730,7 +7079,8 @@ void TParseContext::layoutTypeCheck(const TSourceLoc& loc, const TType& type) // input attachment if (type.isSubpass()) { if (extensionTurnedOn(E_GL_EXT_shader_tile_image)) - error(loc, "can not be used with GL_EXT_shader_tile_image enabled", type.getSampler().getString().c_str(), ""); + error(loc, "cannot be used with GL_EXT_shader_tile_image enabled", type.getSampler().getString().c_str(), + ""); if (! qualifier.hasAttachment()) error(loc, "requires an input_attachment_index layout qualifier", "subpass", ""); } else { @@ -7025,6 +7375,14 @@ const TFunction* TParseContext::findFunction(const TSourceLoc& loc, const TFunct return symbol->getAsFunction(); } + // coopMatPerElementNV is variadic. There is some function signature error + // checking in handleCoopMat2FunctionCall. + if (call.getName() == "coopMatPerElementNV") { + TSymbol* symbol = symbolTable.find("coopMatPerElementNV(", &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) || @@ -7190,15 +7548,27 @@ const TFunction* TParseContext::findFunction400(const TSourceLoc& loc, const TFu symbolTable.findFunctionNameList(call.getMangledName(), candidateList, builtIn); // can 'from' convert to 'to'? - const auto convertible = [this,builtIn](const TType& from, const TType& to, TOperator, int) -> bool { + const auto convertible = [this,builtIn](const TType& from, const TType& to, TOperator op, int param) -> bool { if (from == to) return true; if (from.coopMatParameterOK(to)) return true; + if (from.tensorParameterOK(to)) + return true; + if (from.getBasicType() == EbtFunction && to.getBasicType() == EbtFunction) + return true; + if (from.coopVecParameterOK(to)) + return true; // Allow a sized array to be passed through an unsized array parameter, for coopMatLoad/Store functions if (builtIn && from.isArray() && to.isUnsizedArray()) { TType fromElementType(from, 0); TType toElementType(to, 0); + // Load/store tensor functions allow any element type for the pointer + if ((op == EOpCooperativeMatrixLoadTensorNV || op == EOpCooperativeMatrixStoreTensorNV) && + param == 1 && + (from.getQualifier().storage == EvqBuffer || from.getQualifier().storage == EvqShared)) { + return true; + } if (fromElementType == toElementType) return true; } @@ -7206,6 +7576,8 @@ const TFunction* TParseContext::findFunction400(const TSourceLoc& loc, const TFu return false; if (from.isCoopMat() && to.isCoopMat()) return from.sameCoopMatBaseType(to); + if (from.isCoopVecNV() && to.isCoopVecNV()) + return from.sameCoopVecBaseType(to); return intermediate.canImplicitlyPromote(from.getBasicType(), to.getBasicType()); }; @@ -7266,15 +7638,27 @@ const TFunction* TParseContext::findFunctionExplicitTypes(const TSourceLoc& loc, symbolTable.findFunctionNameList(call.getMangledName(), candidateList, builtIn); // can 'from' convert to 'to'? - const auto convertible = [this,builtIn](const TType& from, const TType& to, TOperator, int) -> bool { + const auto convertible = [this,builtIn](const TType& from, const TType& to, TOperator op, int param) -> bool { if (from == to) return true; if (from.coopMatParameterOK(to)) return true; + if (from.tensorParameterOK(to)) + return true; + if (from.getBasicType() == EbtFunction && to.getBasicType() == EbtFunction) + return true; + if (from.coopVecParameterOK(to)) + return true; // Allow a sized array to be passed through an unsized array parameter, for coopMatLoad/Store functions if (builtIn && from.isArray() && to.isUnsizedArray()) { TType fromElementType(from, 0); TType toElementType(to, 0); + // Load/store tensor functions allow any element type for the pointer + if ((op == EOpCooperativeMatrixLoadTensorNV || op == EOpCooperativeMatrixStoreTensorNV) && + param == 1 && + (from.getQualifier().storage == EvqBuffer || from.getQualifier().storage == EvqShared)) { + return true; + } if (fromElementType == toElementType) return true; } @@ -7282,6 +7666,8 @@ const TFunction* TParseContext::findFunctionExplicitTypes(const TSourceLoc& loc, return false; if (from.isCoopMat() && to.isCoopMat()) return from.sameCoopMatBaseType(to); + if (from.isCoopVecNV() && to.isCoopVecNV()) + return from.sameCoopVecBaseType(to); return intermediate.canImplicitlyPromote(from.getBasicType(), to.getBasicType()); }; @@ -7387,7 +7773,7 @@ TIntermTyped* TParseContext::vkRelaxedRemapFunctionCall(const TSourceLoc& loc, T } } else if (function->getName() == "atomicCounter") { // change atomicCounter into a direct read of the variable - if (arguments->getAsTyped()) { + if (arguments && arguments->getAsTyped()) { result = arguments->getAsTyped(); } } @@ -7417,7 +7803,7 @@ void TParseContext::declareTypeDefaults(const TSourceLoc& loc, const TPublicType warn(loc, "useless application of layout qualifier", "layout", ""); } -void TParseContext::coopMatTypeParametersCheck(const TSourceLoc& loc, const TPublicType& publicType) +void TParseContext::typeParametersCheck(const TSourceLoc& loc, const TPublicType& publicType) { if (parsingBuiltins) return; @@ -7451,6 +7837,40 @@ void TParseContext::coopMatTypeParametersCheck(const TSourceLoc& loc, const TPub return; } } + if (publicType.isTensorLayoutNV()) { + if (publicType.typeParameters == nullptr) { + error(loc, "tensorLayout missing type parameters", "", ""); + return; + } + if (publicType.typeParameters->arraySizes->getNumDims() > 2) { + error(loc, "tensorLayout incorrect number of type parameters", "", ""); + return; + } + if (publicType.typeParameters && publicType.typeParameters->arraySizes->getNumDims() < 2) { + while (publicType.typeParameters->arraySizes->getNumDims() < 2) { + publicType.typeParameters->arraySizes->addInnerSize(0); + } + } + } + if (publicType.isTensorViewNV()) { + if (publicType.typeParameters == nullptr) { + error(loc, "tensorView missing type parameters", "", ""); + return; + } + if (publicType.typeParameters->arraySizes->getNumDims() < 1 || + publicType.typeParameters->arraySizes->getNumDims() > 7) { + error(loc, "tensorView incorrect number of type parameters", "", ""); + return; + } + if (publicType.typeParameters && publicType.typeParameters->arraySizes->getNumDims() < 7) { + uint32_t numDims = publicType.typeParameters->arraySizes->getNumDims(); + while (numDims < 7) { + uint32_t dim = (numDims == 1) ? 0 : (numDims - 2); + publicType.typeParameters->arraySizes->addInnerSize(dim); + numDims++; + } + } + } } bool TParseContext::vkRelaxedRemapUniformVariable(const TSourceLoc& loc, TString& identifier, const TPublicType& publicType, @@ -7559,7 +7979,7 @@ static void ForEachOpaque(const TType& type, const TString& path, Function callb for (size_t dimIndex = 0; dimIndex < indices.size(); ++dimIndex) { ++indices[dimIndex]; - if (indices[dimIndex] < (int)type.getArraySizes()->getDimSize((int)dimIndex)) + if (indices[dimIndex] < type.getArraySizes()->getDimSize((int)dimIndex)) break; else indices[dimIndex] = 0; @@ -7826,7 +8246,7 @@ TIntermNode* TParseContext::declareVariable(const TSourceLoc& loc, TString& iden intermediate.setUseStorageBuffer(); if (!publicType.typeParameters || !publicType.typeParameters->arraySizes || - publicType.typeParameters->arraySizes->getNumDims() != 3) { + publicType.typeParameters->arraySizes->getNumDims() != 4) { error(loc, "unexpected number type parameters", identifier.c_str(), ""); } if (publicType.typeParameters) { @@ -7840,10 +8260,9 @@ TIntermNode* TParseContext::declareVariable(const TSourceLoc& loc, TString& iden intermediate.setUseVulkanMemoryModel(); intermediate.setUseStorageBuffer(); - if (!publicType.typeParameters || publicType.typeParameters->arraySizes->getNumDims() != 4) { + if (!publicType.typeParameters || !publicType.typeParameters->arraySizes || publicType.typeParameters->arraySizes->getNumDims() != 4) { error(loc, "expected four type parameters", identifier.c_str(), ""); - } - if (publicType.typeParameters) { + } else { if (isTypeFloat(publicType.basicType) && publicType.typeParameters->arraySizes->getDimSize(0) != 16 && publicType.typeParameters->arraySizes->getDimSize(0) != 32 && @@ -7857,6 +8276,23 @@ TIntermNode* TParseContext::declareVariable(const TSourceLoc& loc, TString& iden error(loc, "expected 8, 16, or 32 bits for first type parameter", identifier.c_str(), ""); } } + } else if (type.isTensorLayoutNV()) { + if (!publicType.typeParameters || publicType.typeParameters->arraySizes->getNumDims() > 2) { + error(loc, "expected 1-2 type parameters", identifier.c_str(), ""); + } + } else if (type.isTensorViewNV()) { + if (!publicType.typeParameters || publicType.typeParameters->arraySizes->getNumDims() > 7) { + error(loc, "expected 1-7 type parameters", identifier.c_str(), ""); + } + } else if (type.isCoopVecNV()) { + intermediate.setUseVulkanMemoryModel(); + intermediate.setUseStorageBuffer(); + + if (!publicType.typeParameters || !publicType.typeParameters->arraySizes || publicType.typeParameters->arraySizes->getNumDims() != 1) { + error(loc, "expected two type parameters", identifier.c_str(), ""); + } else if (publicType.typeParameters->arraySizes->getDimSize(0) <= 0) { + error(loc, "expected positive number of components", identifier.c_str(), ""); + } } else { if (publicType.typeParameters && publicType.typeParameters->arraySizes->getNumDims() != 0) { error(loc, "unexpected type parameters", identifier.c_str(), ""); @@ -7875,6 +8311,7 @@ TIntermNode* TParseContext::declareVariable(const TSourceLoc& loc, TString& iden transparentOpaqueCheck(loc, type, identifier); atomicUintCheck(loc, type, identifier); accStructCheck(loc, type, identifier); + hitObjectNVCheck(loc, type, identifier); checkAndResizeMeshViewDim(loc, type, /*isBlockMember*/ false); if (type.getQualifier().storage == EvqConst && type.containsReference()) { error(loc, "variables with reference type can't have qualifier 'const'", "qualifier", ""); @@ -8539,7 +8976,7 @@ TIntermTyped* TParseContext::constructBuiltIn(const TType& type, TOperator op, T case EOpConstructF16Mat4x4: case EOpConstructFloat16: basicOp = EOpConstructFloat16; - // 8/16-bit storage extensions don't support constructing composites of 8/16-bit types, + // 8/16-bit storage extensions don't support direct constructing composites of 8/16-bit types, // so construct a 32-bit type and convert // and do not generate any conversion if it is an identity conversion, i.e. float16_t( var) if (!intermediate.getArithemeticFloat16Enabled() && (node->getBasicType() != EbtFloat16)) { @@ -8563,7 +9000,7 @@ TIntermTyped* TParseContext::constructBuiltIn(const TType& type, TOperator op, T case EOpConstructI8Vec4: case EOpConstructInt8: basicOp = EOpConstructInt8; - // 8/16-bit storage extensions don't support constructing composites of 8/16-bit types, + // 8/16-bit storage extensions don't support direct constructing composites of 8/16-bit types, // so construct a 32-bit type and convert // and do not generate any conversion if it is an identity conversion, i.e. int8_t( var) if (!intermediate.getArithemeticInt8Enabled() && (node->getBasicType() != EbtInt8)) { @@ -8587,7 +9024,7 @@ TIntermTyped* TParseContext::constructBuiltIn(const TType& type, TOperator op, T case EOpConstructU8Vec4: case EOpConstructUint8: basicOp = EOpConstructUint8; - // 8/16-bit storage extensions don't support constructing composites of 8/16-bit types, + // 8/16-bit storage extensions don't support direct constructing composites of 8/16-bit types, // so construct a 32-bit type and convert // and do not generate any conversion if it is an identity conversion, i.e. uint8_t( var) if (!intermediate.getArithemeticInt8Enabled() && (node->getBasicType() != EbtUint8)) { @@ -8611,7 +9048,7 @@ TIntermTyped* TParseContext::constructBuiltIn(const TType& type, TOperator op, T case EOpConstructI16Vec4: case EOpConstructInt16: basicOp = EOpConstructInt16; - // 8/16-bit storage extensions don't support constructing composites of 8/16-bit types, + // 8/16-bit storage extensions don't support direct constructing composites of 8/16-bit types, // so construct a 32-bit type and convert // and do not generate any conversion if it is an identity conversion, i.e. int16_t( var) if (!intermediate.getArithemeticInt16Enabled() && (node->getBasicType() != EbtInt16)) { @@ -8635,7 +9072,7 @@ TIntermTyped* TParseContext::constructBuiltIn(const TType& type, TOperator op, T case EOpConstructU16Vec4: case EOpConstructUint16: basicOp = EOpConstructUint16; - // 8/16-bit storage extensions don't support constructing composites of 8/16-bit types, + // 8/16-bit storage extensions don't support direct constructing composites of 8/16-bit types, // so construct a 32-bit type and convert // and do not generate any conversion if it is an identity conversion, i.e. uint16_t( var) if (!intermediate.getArithemeticInt16Enabled() && (node->getBasicType() != EbtUint16)) { @@ -8699,6 +9136,27 @@ TIntermTyped* TParseContext::constructBuiltIn(const TType& type, TOperator op, T return nullptr; } + case EOpConstructCooperativeVectorNV: + if (!node->getType().isCoopVecNV()) { + if (type.getBasicType() != node->getType().getBasicType()) { + node = intermediate.addConversion(type.getBasicType(), node); + if (node == nullptr) + return nullptr; + } + } + if (type.getBasicType() != node->getType().getBasicType()) { + intermediate.buildConvertOp(type.getBasicType(), node->getType().getBasicType(), op); + node = intermediate.addUnaryNode(op, node, node->getLoc(), type); + return node; + } + if (subset) { + return node; + } + + node = intermediate.setAggregateOperator(node, op, type, node->getLoc()); + + return node; + case EOpConstructCooperativeMatrixNV: case EOpConstructCooperativeMatrixKHR: if (node->getType() == type) { @@ -8711,109 +9169,11 @@ TIntermTyped* TParseContext::constructBuiltIn(const TType& type, TOperator op, T return nullptr; } node = intermediate.setAggregateOperator(node, op, type, node->getLoc()); + } else if (type.sameCoopMatShape(node->getType()) && !type.sameCoopMatUse(node->getType()) && + type.getBasicType() == node->getType().getBasicType()) { + node = intermediate.setAggregateOperator(node, op, type, node->getLoc()); } else { - TOperator op = EOpNull; - switch (type.getBasicType()) { - default: - assert(0); - break; - case EbtInt: - switch (node->getType().getBasicType()) { - case EbtFloat: op = EOpConvFloatToInt; break; - case EbtFloat16: op = EOpConvFloat16ToInt; break; - case EbtUint8: op = EOpConvUint8ToInt; break; - case EbtInt8: op = EOpConvInt8ToInt; break; - case EbtUint16: op = EOpConvUint16ToInt; break; - case EbtInt16: op = EOpConvInt16ToInt; break; - case EbtUint: op = EOpConvUintToInt; break; - default: assert(0); - } - break; - case EbtUint: - switch (node->getType().getBasicType()) { - case EbtFloat: op = EOpConvFloatToUint; break; - case EbtFloat16: op = EOpConvFloat16ToUint; break; - case EbtUint8: op = EOpConvUint8ToUint; break; - case EbtInt8: op = EOpConvInt8ToUint; break; - case EbtUint16: op = EOpConvUint16ToUint; break; - case EbtInt16: op = EOpConvInt16ToUint; break; - case EbtInt: op = EOpConvIntToUint; break; - default: assert(0); - } - break; - case EbtInt16: - switch (node->getType().getBasicType()) { - case EbtFloat: op = EOpConvFloatToInt16; break; - case EbtFloat16: op = EOpConvFloat16ToInt16; break; - case EbtUint8: op = EOpConvUint8ToInt16; break; - case EbtInt8: op = EOpConvInt8ToInt16; break; - case EbtUint16: op = EOpConvUint16ToInt16; break; - case EbtInt: op = EOpConvIntToInt16; break; - case EbtUint: op = EOpConvUintToInt16; break; - default: assert(0); - } - break; - case EbtUint16: - switch (node->getType().getBasicType()) { - case EbtFloat: op = EOpConvFloatToUint16; break; - case EbtFloat16: op = EOpConvFloat16ToUint16; break; - case EbtUint8: op = EOpConvUint8ToUint16; break; - case EbtInt8: op = EOpConvInt8ToUint16; break; - case EbtInt16: op = EOpConvInt16ToUint16; break; - case EbtInt: op = EOpConvIntToUint16; break; - case EbtUint: op = EOpConvUintToUint16; break; - default: assert(0); - } - break; - case EbtInt8: - switch (node->getType().getBasicType()) { - case EbtFloat: op = EOpConvFloatToInt8; break; - case EbtFloat16: op = EOpConvFloat16ToInt8; break; - case EbtUint8: op = EOpConvUint8ToInt8; break; - case EbtInt16: op = EOpConvInt16ToInt8; break; - case EbtUint16: op = EOpConvUint16ToInt8; break; - case EbtInt: op = EOpConvIntToInt8; break; - case EbtUint: op = EOpConvUintToInt8; break; - default: assert(0); - } - break; - case EbtUint8: - switch (node->getType().getBasicType()) { - case EbtFloat: op = EOpConvFloatToUint8; break; - case EbtFloat16: op = EOpConvFloat16ToUint8; break; - case EbtInt8: op = EOpConvInt8ToUint8; break; - case EbtInt16: op = EOpConvInt16ToUint8; break; - case EbtUint16: op = EOpConvUint16ToUint8; break; - case EbtInt: op = EOpConvIntToUint8; break; - case EbtUint: op = EOpConvUintToUint8; break; - default: assert(0); - } - break; - case EbtFloat: - switch (node->getType().getBasicType()) { - case EbtFloat16: op = EOpConvFloat16ToFloat; break; - case EbtInt8: op = EOpConvInt8ToFloat; break; - case EbtUint8: op = EOpConvUint8ToFloat; break; - case EbtInt16: op = EOpConvInt16ToFloat; break; - case EbtUint16: op = EOpConvUint16ToFloat; break; - case EbtInt: op = EOpConvIntToFloat; break; - case EbtUint: op = EOpConvUintToFloat; break; - default: assert(0); - } - break; - case EbtFloat16: - switch (node->getType().getBasicType()) { - case EbtFloat: op = EOpConvFloatToFloat16; break; - case EbtInt8: op = EOpConvInt8ToFloat16; break; - case EbtUint8: op = EOpConvUint8ToFloat16; break; - case EbtInt16: op = EOpConvInt16ToFloat16; break; - case EbtUint16: op = EOpConvUint16ToFloat16; break; - case EbtInt: op = EOpConvIntToFloat16; break; - case EbtUint: op = EOpConvUintToFloat16; break; - default: assert(0); - } - break; - } + TOperator op = EOpConvNumeric; node = intermediate.addUnaryNode(op, node, node->getLoc(), type); // If it's a (non-specialization) constant, it must be folded. @@ -8890,6 +9250,8 @@ void TParseContext::inheritMemoryQualifiers(const TQualifier& from, TQualifier& to.coherent = from.coherent; if (from.volatil) to.volatil = from.volatil; + if (from.nontemporal) + to.nontemporal = from.nontemporal; if (from.restrict) to.restrict = from.restrict; } @@ -8978,6 +9340,9 @@ void TParseContext::declareBlock(const TSourceLoc& loc, TTypeList& typeList, con if (memberType.containsCoopMat()) error(memberLoc, "member of block cannot be or contain a cooperative matrix type", typeList[member].type->getFieldName().c_str(), ""); + + if (memberType.containsCoopVec()) + error(memberLoc, "member of block cannot be or contain a cooperative vector type", typeList[member].type->getFieldName().c_str(), ""); } // This might be a redeclaration of a built-in block. If so, redeclareBuiltinBlock() will @@ -9593,6 +9958,15 @@ void TParseContext::addQualifierToExisting(const TSourceLoc& loc, TQualifier qua // type with an empty type list, which will be filled in later in // TParseContext::declareBlock. if (!symbol && qualifier.hasBufferReference()) { + // The layout qualifiers are ignored in forward declaration, give warning for the most probable to be seen + if (qualifier.hasBufferReferenceAlign()) { + warn(loc, "the buffer_reference_align layout is ignored when defined in forward declaration", + identifier.c_str(), ""); + } + if (qualifier.hasPacking()) { + warn(loc, "the packing layout (scalar, std430, etc) is ignored when defined in forward declaration", + identifier.c_str(), ""); + } TTypeList typeList; TType blockType(&typeList, identifier, qualifier); TType blockNameType(EbtReference, blockType, identifier); @@ -9912,8 +10286,8 @@ void TParseContext::updateStandaloneQualifierDefaults(const TSourceLoc& loc, con if (publicType.shaderQualifiers.layoutDerivativeGroupQuads) { if (publicType.qualifier.storage == EvqVaryingIn) { - if ((intermediate.getLocalSize(0) & 1) || - (intermediate.getLocalSize(1) & 1)) + if ((intermediate.getLocalSizeSpecId(0) == TQualifier::layoutNotSet && (intermediate.getLocalSize(0) & 1)) || + (intermediate.getLocalSizeSpecId(1) == TQualifier::layoutNotSet && (intermediate.getLocalSize(1) & 1))) error(loc, "requires local_size_x and local_size_y to be multiple of two", "derivative_group_quadsNV", ""); else intermediate.setLayoutDerivativeMode(LayoutDerivativeGroupQuads); @@ -9923,7 +10297,10 @@ void TParseContext::updateStandaloneQualifierDefaults(const TSourceLoc& loc, con } if (publicType.shaderQualifiers.layoutDerivativeGroupLinear) { if (publicType.qualifier.storage == EvqVaryingIn) { - if((intermediate.getLocalSize(0) * + if (intermediate.getLocalSizeSpecId(0) == TQualifier::layoutNotSet && + intermediate.getLocalSizeSpecId(1) == TQualifier::layoutNotSet && + intermediate.getLocalSizeSpecId(2) == TQualifier::layoutNotSet && + (intermediate.getLocalSize(0) * intermediate.getLocalSize(1) * intermediate.getLocalSize(2)) % 4 != 0) error(loc, "requires total group size to be multiple of four", "derivative_group_linearNV", ""); @@ -9944,7 +10321,7 @@ void TParseContext::updateStandaloneQualifierDefaults(const TSourceLoc& loc, con if (publicType.shaderQualifiers.layoutPrimitiveCulling) { if (publicType.qualifier.storage != EvqTemporary) - error(loc, "layout qualifier can not have storage qualifiers", "primitive_culling","", ""); + error(loc, "layout qualifier cannot have storage qualifiers", "primitive_culling", "", ""); else { intermediate.setLayoutPrimitiveCulling(); } diff --git a/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/ParseHelper.h b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/ParseHelper.h index 16902aefe..47a72999f 100644 --- a/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/ParseHelper.h +++ b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/ParseHelper.h @@ -384,7 +384,7 @@ public: void globalCheck(const TSourceLoc&, const char* token); bool constructorError(const TSourceLoc&, TIntermNode*, TFunction&, TOperator, TType&); bool constructorTextureSamplerError(const TSourceLoc&, const TFunction&); - void arraySizeCheck(const TSourceLoc&, TIntermTyped* expr, TArraySize&, const char *sizeType, const bool allowZero = false); + void arraySizeCheck(const TSourceLoc&, TIntermTyped* expr, TArraySize&, const char *sizeType, const bool isTypeParameter = false); bool arrayQualifierError(const TSourceLoc&, const TQualifier&); bool arrayError(const TSourceLoc&, const TType&); void arraySizeRequiredCheck(const TSourceLoc&, const TArraySizes&); @@ -397,6 +397,7 @@ public: void samplerCheck(const TSourceLoc&, const TType&, const TString& identifier, TIntermTyped* initializer); void atomicUintCheck(const TSourceLoc&, const TType&, const TString& identifier); void accStructCheck(const TSourceLoc & loc, const TType & type, const TString & identifier); + void hitObjectNVCheck(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&, bool isMemberCheck = false, const TPublicType* publicType = nullptr); @@ -406,7 +407,7 @@ public: void setDefaultPrecision(const TSourceLoc&, TPublicType&, TPrecisionQualifier); int computeSamplerTypeIndex(TSampler&); TPrecisionQualifier getDefaultPrecision(TPublicType&); - void precisionQualifierCheck(const TSourceLoc&, TBasicType, TQualifier&, bool isCoopMat); + void precisionQualifierCheck(const TSourceLoc&, TBasicType, TQualifier&, bool isCoopMatOrVec); void parameterTypeCheck(const TSourceLoc&, TStorageQualifier qualifier, const TType& type); bool containsFieldWithBasicType(const TType& type ,TBasicType basicType); TSymbol* redeclareBuiltinVariable(const TSourceLoc&, const TString&, const TQualifier&, const TShaderQualifiers&); @@ -424,7 +425,7 @@ public: void inductiveLoopCheck(const TSourceLoc&, TIntermNode* init, TIntermLoop* loop); void arrayLimitCheck(const TSourceLoc&, const TString&, int size); void limitCheck(const TSourceLoc&, int value, const char* limit, const char* feature); - void coopMatTypeParametersCheck(const TSourceLoc&, const TPublicType&); + void typeParametersCheck(const TSourceLoc&, const TPublicType&); void inductiveLoopBodyCheck(TIntermNode*, long long loopIndexId, TSymbolTable&); void constantIndexExpressionCheck(TIntermNode*); @@ -508,6 +509,7 @@ protected: TIntermNode* executeInitializer(const TSourceLoc&, TIntermTyped* initializer, TVariable* variable); TIntermTyped* convertInitializerList(const TSourceLoc&, const TType&, TIntermTyped* initializer); void finish() override; + void handleCoopMat2FunctionCall(const TSourceLoc& loc, const TFunction* fnCandidate, TIntermTyped* result, TIntermNode* arguments); virtual const char* getGlobalUniformBlockName() const override; virtual void finalizeGlobalUniformBlockLayout(TVariable&) override; diff --git a/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/PoolAlloc.cpp b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/PoolAlloc.cpp index 5d7173c9d..93a3b0d12 100644 --- a/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/PoolAlloc.cpp +++ b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/PoolAlloc.cpp @@ -35,14 +35,21 @@ #include "../Include/Common.h" #include "../Include/PoolAlloc.h" +// Mostly here for target that do not support threads such as WASI. +#ifdef DISABLE_THREAD_SUPPORT +#define THREAD_LOCAL +#else +#define THREAD_LOCAL thread_local +#endif + namespace glslang { namespace { -thread_local TPoolAllocator* threadPoolAllocator = nullptr; +THREAD_LOCAL TPoolAllocator* threadPoolAllocator = nullptr; TPoolAllocator* GetDefaultThreadPoolAllocator() { - thread_local TPoolAllocator defaultAllocator; + THREAD_LOCAL TPoolAllocator defaultAllocator; return &defaultAllocator; } } // anonymous namespace diff --git a/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/Scan.cpp b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/Scan.cpp index 44546596e..d2375a0e2 100644 --- a/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/Scan.cpp +++ b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/Scan.cpp @@ -322,503 +322,488 @@ struct str_hash }; // A single global usable by all threads, by all versions, by all languages. -// After a single process-level initialization, this is read only and thread safe -std::unordered_map* KeywordMap = nullptr; -std::unordered_set* ReservedSet = nullptr; +const std::unordered_map KeywordMap { + {"const",CONST}, + {"uniform",UNIFORM}, + {"tileImageEXT",TILEIMAGEEXT}, + {"buffer",BUFFER}, + {"in",IN}, + {"out",OUT}, + {"smooth",SMOOTH}, + {"flat",FLAT}, + {"centroid",CENTROID}, + {"invariant",INVARIANT}, + {"packed",PACKED}, + {"resource",RESOURCE}, + {"inout",INOUT}, + {"struct",STRUCT}, + {"break",BREAK}, + {"continue",CONTINUE}, + {"do",DO}, + {"for",FOR}, + {"while",WHILE}, + {"switch",SWITCH}, + {"case",CASE}, + {"default",DEFAULT}, + {"if",IF}, + {"else",ELSE}, + {"discard",DISCARD}, + {"terminateInvocation",TERMINATE_INVOCATION}, + {"terminateRayEXT",TERMINATE_RAY}, + {"ignoreIntersectionEXT",IGNORE_INTERSECTION}, + {"return",RETURN}, + {"void",VOID}, + {"bool",BOOL}, + {"float",FLOAT}, + {"int",INT}, + {"bvec2",BVEC2}, + {"bvec3",BVEC3}, + {"bvec4",BVEC4}, + {"vec2",VEC2}, + {"vec3",VEC3}, + {"vec4",VEC4}, + {"ivec2",IVEC2}, + {"ivec3",IVEC3}, + {"ivec4",IVEC4}, + {"mat2",MAT2}, + {"mat3",MAT3}, + {"mat4",MAT4}, + {"true",BOOLCONSTANT}, + {"false",BOOLCONSTANT}, + {"layout",LAYOUT}, + {"shared",SHARED}, + {"highp",HIGH_PRECISION}, + {"mediump",MEDIUM_PRECISION}, + {"lowp",LOW_PRECISION}, + {"superp",SUPERP}, + {"precision",PRECISION}, + {"mat2x2",MAT2X2}, + {"mat2x3",MAT2X3}, + {"mat2x4",MAT2X4}, + {"mat3x2",MAT3X2}, + {"mat3x3",MAT3X3}, + {"mat3x4",MAT3X4}, + {"mat4x2",MAT4X2}, + {"mat4x3",MAT4X3}, + {"mat4x4",MAT4X4}, + {"uint",UINT}, + {"uvec2",UVEC2}, + {"uvec3",UVEC3}, + {"uvec4",UVEC4}, + + {"nonuniformEXT",NONUNIFORM}, + {"demote",DEMOTE}, + {"attribute",ATTRIBUTE}, + {"varying",VARYING}, + {"noperspective",NOPERSPECTIVE}, + {"coherent",COHERENT}, + {"devicecoherent",DEVICECOHERENT}, + {"queuefamilycoherent",QUEUEFAMILYCOHERENT}, + {"workgroupcoherent",WORKGROUPCOHERENT}, + {"subgroupcoherent",SUBGROUPCOHERENT}, + {"shadercallcoherent",SHADERCALLCOHERENT}, + {"nonprivate",NONPRIVATE}, + {"restrict",RESTRICT}, + {"readonly",READONLY}, + {"writeonly",WRITEONLY}, + {"atomic_uint",ATOMIC_UINT}, + {"volatile",VOLATILE}, + {"nontemporal",NONTEMPORAL}, + {"patch",PATCH}, + {"sample",SAMPLE}, + {"subroutine",SUBROUTINE}, + {"dmat2",DMAT2}, + {"dmat3",DMAT3}, + {"dmat4",DMAT4}, + {"dmat2x2",DMAT2X2}, + {"dmat2x3",DMAT2X3}, + {"dmat2x4",DMAT2X4}, + {"dmat3x2",DMAT3X2}, + {"dmat3x3",DMAT3X3}, + {"dmat3x4",DMAT3X4}, + {"dmat4x2",DMAT4X2}, + {"dmat4x3",DMAT4X3}, + {"dmat4x4",DMAT4X4}, + {"image1D",IMAGE1D}, + {"iimage1D",IIMAGE1D}, + {"uimage1D",UIMAGE1D}, + {"image2D",IMAGE2D}, + {"iimage2D",IIMAGE2D}, + {"uimage2D",UIMAGE2D}, + {"image3D",IMAGE3D}, + {"iimage3D",IIMAGE3D}, + {"uimage3D",UIMAGE3D}, + {"image2DRect",IMAGE2DRECT}, + {"iimage2DRect",IIMAGE2DRECT}, + {"uimage2DRect",UIMAGE2DRECT}, + {"imageCube",IMAGECUBE}, + {"iimageCube",IIMAGECUBE}, + {"uimageCube",UIMAGECUBE}, + {"imageBuffer",IMAGEBUFFER}, + {"iimageBuffer",IIMAGEBUFFER}, + {"uimageBuffer",UIMAGEBUFFER}, + {"image1DArray",IMAGE1DARRAY}, + {"iimage1DArray",IIMAGE1DARRAY}, + {"uimage1DArray",UIMAGE1DARRAY}, + {"image2DArray",IMAGE2DARRAY}, + {"iimage2DArray",IIMAGE2DARRAY}, + {"uimage2DArray",UIMAGE2DARRAY}, + {"imageCubeArray",IMAGECUBEARRAY}, + {"iimageCubeArray",IIMAGECUBEARRAY}, + {"uimageCubeArray",UIMAGECUBEARRAY}, + {"image2DMS",IMAGE2DMS}, + {"iimage2DMS",IIMAGE2DMS}, + {"uimage2DMS",UIMAGE2DMS}, + {"image2DMSArray",IMAGE2DMSARRAY}, + {"iimage2DMSArray",IIMAGE2DMSARRAY}, + {"uimage2DMSArray",UIMAGE2DMSARRAY}, + {"i64image1D",I64IMAGE1D}, + {"u64image1D",U64IMAGE1D}, + {"i64image2D",I64IMAGE2D}, + {"u64image2D",U64IMAGE2D}, + {"i64image3D",I64IMAGE3D}, + {"u64image3D",U64IMAGE3D}, + {"i64image2DRect",I64IMAGE2DRECT}, + {"u64image2DRect",U64IMAGE2DRECT}, + {"i64imageCube",I64IMAGECUBE}, + {"u64imageCube",U64IMAGECUBE}, + {"i64imageBuffer",I64IMAGEBUFFER}, + {"u64imageBuffer",U64IMAGEBUFFER}, + {"i64image1DArray",I64IMAGE1DARRAY}, + {"u64image1DArray",U64IMAGE1DARRAY}, + {"i64image2DArray",I64IMAGE2DARRAY}, + {"u64image2DArray",U64IMAGE2DARRAY}, + {"i64imageCubeArray",I64IMAGECUBEARRAY}, + {"u64imageCubeArray",U64IMAGECUBEARRAY}, + {"i64image2DMS",I64IMAGE2DMS}, + {"u64image2DMS",U64IMAGE2DMS}, + {"i64image2DMSArray",I64IMAGE2DMSARRAY}, + {"u64image2DMSArray",U64IMAGE2DMSARRAY}, + {"double",DOUBLE}, + {"dvec2",DVEC2}, + {"dvec3",DVEC3}, + {"dvec4",DVEC4}, + {"int64_t",INT64_T}, + {"uint64_t",UINT64_T}, + {"i64vec2",I64VEC2}, + {"i64vec3",I64VEC3}, + {"i64vec4",I64VEC4}, + {"u64vec2",U64VEC2}, + {"u64vec3",U64VEC3}, + {"u64vec4",U64VEC4}, + + // GL_EXT_shader_explicit_arithmetic_types + {"int8_t",INT8_T}, + {"i8vec2",I8VEC2}, + {"i8vec3",I8VEC3}, + {"i8vec4",I8VEC4}, + {"uint8_t",UINT8_T}, + {"u8vec2",U8VEC2}, + {"u8vec3",U8VEC3}, + {"u8vec4",U8VEC4}, + + {"int16_t",INT16_T}, + {"i16vec2",I16VEC2}, + {"i16vec3",I16VEC3}, + {"i16vec4",I16VEC4}, + {"uint16_t",UINT16_T}, + {"u16vec2",U16VEC2}, + {"u16vec3",U16VEC3}, + {"u16vec4",U16VEC4}, + + {"int32_t",INT32_T}, + {"i32vec2",I32VEC2}, + {"i32vec3",I32VEC3}, + {"i32vec4",I32VEC4}, + {"uint32_t",UINT32_T}, + {"u32vec2",U32VEC2}, + {"u32vec3",U32VEC3}, + {"u32vec4",U32VEC4}, + + {"float16_t",FLOAT16_T}, + {"f16vec2",F16VEC2}, + {"f16vec3",F16VEC3}, + {"f16vec4",F16VEC4}, + {"f16mat2",F16MAT2}, + {"f16mat3",F16MAT3}, + {"f16mat4",F16MAT4}, + {"f16mat2x2",F16MAT2X2}, + {"f16mat2x3",F16MAT2X3}, + {"f16mat2x4",F16MAT2X4}, + {"f16mat3x2",F16MAT3X2}, + {"f16mat3x3",F16MAT3X3}, + {"f16mat3x4",F16MAT3X4}, + {"f16mat4x2",F16MAT4X2}, + {"f16mat4x3",F16MAT4X3}, + {"f16mat4x4",F16MAT4X4}, + + {"float32_t",FLOAT32_T}, + {"f32vec2",F32VEC2}, + {"f32vec3",F32VEC3}, + {"f32vec4",F32VEC4}, + {"f32mat2",F32MAT2}, + {"f32mat3",F32MAT3}, + {"f32mat4",F32MAT4}, + {"f32mat2x2",F32MAT2X2}, + {"f32mat2x3",F32MAT2X3}, + {"f32mat2x4",F32MAT2X4}, + {"f32mat3x2",F32MAT3X2}, + {"f32mat3x3",F32MAT3X3}, + {"f32mat3x4",F32MAT3X4}, + {"f32mat4x2",F32MAT4X2}, + {"f32mat4x3",F32MAT4X3}, + {"f32mat4x4",F32MAT4X4}, + {"float64_t",FLOAT64_T}, + {"f64vec2",F64VEC2}, + {"f64vec3",F64VEC3}, + {"f64vec4",F64VEC4}, + {"f64mat2",F64MAT2}, + {"f64mat3",F64MAT3}, + {"f64mat4",F64MAT4}, + {"f64mat2x2",F64MAT2X2}, + {"f64mat2x3",F64MAT2X3}, + {"f64mat2x4",F64MAT2X4}, + {"f64mat3x2",F64MAT3X2}, + {"f64mat3x3",F64MAT3X3}, + {"f64mat3x4",F64MAT3X4}, + {"f64mat4x2",F64MAT4X2}, + {"f64mat4x3",F64MAT4X3}, + {"f64mat4x4",F64MAT4X4}, + + // GL_EXT_spirv_intrinsics + {"spirv_instruction",SPIRV_INSTRUCTION}, + {"spirv_execution_mode",SPIRV_EXECUTION_MODE}, + {"spirv_execution_mode_id",SPIRV_EXECUTION_MODE_ID}, + {"spirv_decorate",SPIRV_DECORATE}, + {"spirv_decorate_id",SPIRV_DECORATE_ID}, + {"spirv_decorate_string",SPIRV_DECORATE_STRING}, + {"spirv_type",SPIRV_TYPE}, + {"spirv_storage_class",SPIRV_STORAGE_CLASS}, + {"spirv_by_reference",SPIRV_BY_REFERENCE}, + {"spirv_literal",SPIRV_LITERAL}, + + {"sampler2D",SAMPLER2D}, + {"samplerCube",SAMPLERCUBE}, + {"samplerCubeShadow",SAMPLERCUBESHADOW}, + {"sampler2DArray",SAMPLER2DARRAY}, + {"sampler2DArrayShadow",SAMPLER2DARRAYSHADOW}, + {"isampler2D",ISAMPLER2D}, + {"isampler3D",ISAMPLER3D}, + {"isamplerCube",ISAMPLERCUBE}, + {"isampler2DArray",ISAMPLER2DARRAY}, + {"usampler2D",USAMPLER2D}, + {"usampler3D",USAMPLER3D}, + {"usamplerCube",USAMPLERCUBE}, + {"usampler2DArray",USAMPLER2DARRAY}, + {"sampler3D",SAMPLER3D}, + {"sampler2DShadow",SAMPLER2DSHADOW}, + + {"texture2D",TEXTURE2D}, + {"textureCube",TEXTURECUBE}, + {"texture2DArray",TEXTURE2DARRAY}, + {"itexture2D",ITEXTURE2D}, + {"itexture3D",ITEXTURE3D}, + {"itextureCube",ITEXTURECUBE}, + {"itexture2DArray",ITEXTURE2DARRAY}, + {"utexture2D",UTEXTURE2D}, + {"utexture3D",UTEXTURE3D}, + {"utextureCube",UTEXTURECUBE}, + {"utexture2DArray",UTEXTURE2DARRAY}, + {"texture3D",TEXTURE3D}, + + {"sampler",SAMPLER}, + {"samplerShadow",SAMPLERSHADOW}, + + {"textureCubeArray",TEXTURECUBEARRAY}, + {"itextureCubeArray",ITEXTURECUBEARRAY}, + {"utextureCubeArray",UTEXTURECUBEARRAY}, + {"samplerCubeArray",SAMPLERCUBEARRAY}, + {"samplerCubeArrayShadow",SAMPLERCUBEARRAYSHADOW}, + {"isamplerCubeArray",ISAMPLERCUBEARRAY}, + {"usamplerCubeArray",USAMPLERCUBEARRAY}, + {"sampler1DArrayShadow",SAMPLER1DARRAYSHADOW}, + {"isampler1DArray",ISAMPLER1DARRAY}, + {"usampler1D",USAMPLER1D}, + {"isampler1D",ISAMPLER1D}, + {"usampler1DArray",USAMPLER1DARRAY}, + {"samplerBuffer",SAMPLERBUFFER}, + {"isampler2DRect",ISAMPLER2DRECT}, + {"usampler2DRect",USAMPLER2DRECT}, + {"isamplerBuffer",ISAMPLERBUFFER}, + {"usamplerBuffer",USAMPLERBUFFER}, + {"sampler2DMS",SAMPLER2DMS}, + {"isampler2DMS",ISAMPLER2DMS}, + {"usampler2DMS",USAMPLER2DMS}, + {"sampler2DMSArray",SAMPLER2DMSARRAY}, + {"isampler2DMSArray",ISAMPLER2DMSARRAY}, + {"usampler2DMSArray",USAMPLER2DMSARRAY}, + {"sampler1D",SAMPLER1D}, + {"sampler1DShadow",SAMPLER1DSHADOW}, + {"sampler2DRect",SAMPLER2DRECT}, + {"sampler2DRectShadow",SAMPLER2DRECTSHADOW}, + {"sampler1DArray",SAMPLER1DARRAY}, + + {"samplerExternalOES", SAMPLEREXTERNALOES}, // GL_OES_EGL_image_external + {"__samplerExternal2DY2YEXT", SAMPLEREXTERNAL2DY2YEXT}, // GL_EXT_YUV_target + + {"itexture1DArray",ITEXTURE1DARRAY}, + {"utexture1D",UTEXTURE1D}, + {"itexture1D",ITEXTURE1D}, + {"utexture1DArray",UTEXTURE1DARRAY}, + {"textureBuffer",TEXTUREBUFFER}, + {"itexture2DRect",ITEXTURE2DRECT}, + {"utexture2DRect",UTEXTURE2DRECT}, + {"itextureBuffer",ITEXTUREBUFFER}, + {"utextureBuffer",UTEXTUREBUFFER}, + {"texture2DMS",TEXTURE2DMS}, + {"itexture2DMS",ITEXTURE2DMS}, + {"utexture2DMS",UTEXTURE2DMS}, + {"texture2DMSArray",TEXTURE2DMSARRAY}, + {"itexture2DMSArray",ITEXTURE2DMSARRAY}, + {"utexture2DMSArray",UTEXTURE2DMSARRAY}, + {"texture1D",TEXTURE1D}, + {"texture2DRect",TEXTURE2DRECT}, + {"texture1DArray",TEXTURE1DARRAY}, + + {"attachmentEXT",ATTACHMENTEXT}, + {"iattachmentEXT",IATTACHMENTEXT}, + {"uattachmentEXT",UATTACHMENTEXT}, + + {"subpassInput",SUBPASSINPUT}, + {"subpassInputMS",SUBPASSINPUTMS}, + {"isubpassInput",ISUBPASSINPUT}, + {"isubpassInputMS",ISUBPASSINPUTMS}, + {"usubpassInput",USUBPASSINPUT}, + {"usubpassInputMS",USUBPASSINPUTMS}, + + {"f16sampler1D",F16SAMPLER1D}, + {"f16sampler2D",F16SAMPLER2D}, + {"f16sampler3D",F16SAMPLER3D}, + {"f16sampler2DRect",F16SAMPLER2DRECT}, + {"f16samplerCube",F16SAMPLERCUBE}, + {"f16sampler1DArray",F16SAMPLER1DARRAY}, + {"f16sampler2DArray",F16SAMPLER2DARRAY}, + {"f16samplerCubeArray",F16SAMPLERCUBEARRAY}, + {"f16samplerBuffer",F16SAMPLERBUFFER}, + {"f16sampler2DMS",F16SAMPLER2DMS}, + {"f16sampler2DMSArray",F16SAMPLER2DMSARRAY}, + {"f16sampler1DShadow",F16SAMPLER1DSHADOW}, + {"f16sampler2DShadow",F16SAMPLER2DSHADOW}, + {"f16sampler2DRectShadow",F16SAMPLER2DRECTSHADOW}, + {"f16samplerCubeShadow",F16SAMPLERCUBESHADOW}, + {"f16sampler1DArrayShadow",F16SAMPLER1DARRAYSHADOW}, + {"f16sampler2DArrayShadow",F16SAMPLER2DARRAYSHADOW}, + {"f16samplerCubeArrayShadow",F16SAMPLERCUBEARRAYSHADOW}, + + {"f16image1D",F16IMAGE1D}, + {"f16image2D",F16IMAGE2D}, + {"f16image3D",F16IMAGE3D}, + {"f16image2DRect",F16IMAGE2DRECT}, + {"f16imageCube",F16IMAGECUBE}, + {"f16image1DArray",F16IMAGE1DARRAY}, + {"f16image2DArray",F16IMAGE2DARRAY}, + {"f16imageCubeArray",F16IMAGECUBEARRAY}, + {"f16imageBuffer",F16IMAGEBUFFER}, + {"f16image2DMS",F16IMAGE2DMS}, + {"f16image2DMSArray",F16IMAGE2DMSARRAY}, + + {"f16texture1D",F16TEXTURE1D}, + {"f16texture2D",F16TEXTURE2D}, + {"f16texture3D",F16TEXTURE3D}, + {"f16texture2DRect",F16TEXTURE2DRECT}, + {"f16textureCube",F16TEXTURECUBE}, + {"f16texture1DArray",F16TEXTURE1DARRAY}, + {"f16texture2DArray",F16TEXTURE2DARRAY}, + {"f16textureCubeArray",F16TEXTURECUBEARRAY}, + {"f16textureBuffer",F16TEXTUREBUFFER}, + {"f16texture2DMS",F16TEXTURE2DMS}, + {"f16texture2DMSArray",F16TEXTURE2DMSARRAY}, + + {"f16subpassInput",F16SUBPASSINPUT}, + {"f16subpassInputMS",F16SUBPASSINPUTMS}, + {"__explicitInterpAMD",EXPLICITINTERPAMD}, + {"pervertexNV",PERVERTEXNV}, + {"pervertexEXT",PERVERTEXEXT}, + {"precise",PRECISE}, + + {"rayPayloadNV",PAYLOADNV}, + {"rayPayloadEXT",PAYLOADEXT}, + {"rayPayloadInNV",PAYLOADINNV}, + {"rayPayloadInEXT",PAYLOADINEXT}, + {"hitAttributeNV",HITATTRNV}, + {"hitAttributeEXT",HITATTREXT}, + {"callableDataNV",CALLDATANV}, + {"callableDataEXT",CALLDATAEXT}, + {"callableDataInNV",CALLDATAINNV}, + {"callableDataInEXT",CALLDATAINEXT}, + {"accelerationStructureNV",ACCSTRUCTNV}, + {"accelerationStructureEXT",ACCSTRUCTEXT}, + {"rayQueryEXT",RAYQUERYEXT}, + {"perprimitiveNV",PERPRIMITIVENV}, + {"perviewNV",PERVIEWNV}, + {"taskNV",PERTASKNV}, + {"perprimitiveEXT",PERPRIMITIVEEXT}, + {"taskPayloadSharedEXT",TASKPAYLOADWORKGROUPEXT}, + + {"fcoopmatNV",FCOOPMATNV}, + {"icoopmatNV",ICOOPMATNV}, + {"ucoopmatNV",UCOOPMATNV}, + + {"coopmat",COOPMAT}, + + {"hitObjectNV",HITOBJECTNV}, + {"hitObjectAttributeNV",HITOBJECTATTRNV}, + + {"__function",FUNCTION}, + {"tensorLayoutNV",TENSORLAYOUTNV}, + {"tensorViewNV",TENSORVIEWNV}, + + {"coopvecNV",COOPVECNV}, +}; +const std::unordered_set ReservedSet { + "common", + "partition", + "active", + "asm", + "class", + "union", + "enum", + "typedef", + "template", + "this", + "goto", + "inline", + "noinline", + "public", + "static", + "extern", + "external", + "interface", + "long", + "short", + "half", + "fixed", + "unsigned", + "input", + "output", + "hvec2", + "hvec3", + "hvec4", + "fvec2", + "fvec3", + "fvec4", + "sampler3DRect", + "filter", + "sizeof", + "cast", + "namespace", + "using", +}; } namespace glslang { -void TScanContext::fillInKeywordMap() -{ - if (KeywordMap != nullptr) { - // this is really an error, as this should called only once per process - // but, the only risk is if two threads called simultaneously - return; - } - KeywordMap = new std::unordered_map; - - (*KeywordMap)["const"] = CONST; - (*KeywordMap)["uniform"] = UNIFORM; - (*KeywordMap)["tileImageEXT"] = TILEIMAGEEXT; - (*KeywordMap)["buffer"] = BUFFER; - (*KeywordMap)["in"] = IN; - (*KeywordMap)["out"] = OUT; - (*KeywordMap)["smooth"] = SMOOTH; - (*KeywordMap)["flat"] = FLAT; - (*KeywordMap)["centroid"] = CENTROID; - (*KeywordMap)["invariant"] = INVARIANT; - (*KeywordMap)["packed"] = PACKED; - (*KeywordMap)["resource"] = RESOURCE; - (*KeywordMap)["inout"] = INOUT; - (*KeywordMap)["struct"] = STRUCT; - (*KeywordMap)["break"] = BREAK; - (*KeywordMap)["continue"] = CONTINUE; - (*KeywordMap)["do"] = DO; - (*KeywordMap)["for"] = FOR; - (*KeywordMap)["while"] = WHILE; - (*KeywordMap)["switch"] = SWITCH; - (*KeywordMap)["case"] = CASE; - (*KeywordMap)["default"] = DEFAULT; - (*KeywordMap)["if"] = IF; - (*KeywordMap)["else"] = ELSE; - (*KeywordMap)["discard"] = DISCARD; - (*KeywordMap)["terminateInvocation"] = TERMINATE_INVOCATION; - (*KeywordMap)["terminateRayEXT"] = TERMINATE_RAY; - (*KeywordMap)["ignoreIntersectionEXT"] = IGNORE_INTERSECTION; - (*KeywordMap)["return"] = RETURN; - (*KeywordMap)["void"] = VOID; - (*KeywordMap)["bool"] = BOOL; - (*KeywordMap)["float"] = FLOAT; - (*KeywordMap)["int"] = INT; - (*KeywordMap)["bvec2"] = BVEC2; - (*KeywordMap)["bvec3"] = BVEC3; - (*KeywordMap)["bvec4"] = BVEC4; - (*KeywordMap)["vec2"] = VEC2; - (*KeywordMap)["vec3"] = VEC3; - (*KeywordMap)["vec4"] = VEC4; - (*KeywordMap)["ivec2"] = IVEC2; - (*KeywordMap)["ivec3"] = IVEC3; - (*KeywordMap)["ivec4"] = IVEC4; - (*KeywordMap)["mat2"] = MAT2; - (*KeywordMap)["mat3"] = MAT3; - (*KeywordMap)["mat4"] = MAT4; - (*KeywordMap)["true"] = BOOLCONSTANT; - (*KeywordMap)["false"] = BOOLCONSTANT; - (*KeywordMap)["layout"] = LAYOUT; - (*KeywordMap)["shared"] = SHARED; - (*KeywordMap)["highp"] = HIGH_PRECISION; - (*KeywordMap)["mediump"] = MEDIUM_PRECISION; - (*KeywordMap)["lowp"] = LOW_PRECISION; - (*KeywordMap)["superp"] = SUPERP; - (*KeywordMap)["precision"] = PRECISION; - (*KeywordMap)["mat2x2"] = MAT2X2; - (*KeywordMap)["mat2x3"] = MAT2X3; - (*KeywordMap)["mat2x4"] = MAT2X4; - (*KeywordMap)["mat3x2"] = MAT3X2; - (*KeywordMap)["mat3x3"] = MAT3X3; - (*KeywordMap)["mat3x4"] = MAT3X4; - (*KeywordMap)["mat4x2"] = MAT4X2; - (*KeywordMap)["mat4x3"] = MAT4X3; - (*KeywordMap)["mat4x4"] = MAT4X4; - (*KeywordMap)["uint"] = UINT; - (*KeywordMap)["uvec2"] = UVEC2; - (*KeywordMap)["uvec3"] = UVEC3; - (*KeywordMap)["uvec4"] = UVEC4; - - (*KeywordMap)["nonuniformEXT"] = NONUNIFORM; - (*KeywordMap)["demote"] = DEMOTE; - (*KeywordMap)["attribute"] = ATTRIBUTE; - (*KeywordMap)["varying"] = VARYING; - (*KeywordMap)["noperspective"] = NOPERSPECTIVE; - (*KeywordMap)["coherent"] = COHERENT; - (*KeywordMap)["devicecoherent"] = DEVICECOHERENT; - (*KeywordMap)["queuefamilycoherent"] = QUEUEFAMILYCOHERENT; - (*KeywordMap)["workgroupcoherent"] = WORKGROUPCOHERENT; - (*KeywordMap)["subgroupcoherent"] = SUBGROUPCOHERENT; - (*KeywordMap)["shadercallcoherent"] = SHADERCALLCOHERENT; - (*KeywordMap)["nonprivate"] = NONPRIVATE; - (*KeywordMap)["restrict"] = RESTRICT; - (*KeywordMap)["readonly"] = READONLY; - (*KeywordMap)["writeonly"] = WRITEONLY; - (*KeywordMap)["atomic_uint"] = ATOMIC_UINT; - (*KeywordMap)["volatile"] = VOLATILE; - (*KeywordMap)["patch"] = PATCH; - (*KeywordMap)["sample"] = SAMPLE; - (*KeywordMap)["subroutine"] = SUBROUTINE; - (*KeywordMap)["dmat2"] = DMAT2; - (*KeywordMap)["dmat3"] = DMAT3; - (*KeywordMap)["dmat4"] = DMAT4; - (*KeywordMap)["dmat2x2"] = DMAT2X2; - (*KeywordMap)["dmat2x3"] = DMAT2X3; - (*KeywordMap)["dmat2x4"] = DMAT2X4; - (*KeywordMap)["dmat3x2"] = DMAT3X2; - (*KeywordMap)["dmat3x3"] = DMAT3X3; - (*KeywordMap)["dmat3x4"] = DMAT3X4; - (*KeywordMap)["dmat4x2"] = DMAT4X2; - (*KeywordMap)["dmat4x3"] = DMAT4X3; - (*KeywordMap)["dmat4x4"] = DMAT4X4; - (*KeywordMap)["image1D"] = IMAGE1D; - (*KeywordMap)["iimage1D"] = IIMAGE1D; - (*KeywordMap)["uimage1D"] = UIMAGE1D; - (*KeywordMap)["image2D"] = IMAGE2D; - (*KeywordMap)["iimage2D"] = IIMAGE2D; - (*KeywordMap)["uimage2D"] = UIMAGE2D; - (*KeywordMap)["image3D"] = IMAGE3D; - (*KeywordMap)["iimage3D"] = IIMAGE3D; - (*KeywordMap)["uimage3D"] = UIMAGE3D; - (*KeywordMap)["image2DRect"] = IMAGE2DRECT; - (*KeywordMap)["iimage2DRect"] = IIMAGE2DRECT; - (*KeywordMap)["uimage2DRect"] = UIMAGE2DRECT; - (*KeywordMap)["imageCube"] = IMAGECUBE; - (*KeywordMap)["iimageCube"] = IIMAGECUBE; - (*KeywordMap)["uimageCube"] = UIMAGECUBE; - (*KeywordMap)["imageBuffer"] = IMAGEBUFFER; - (*KeywordMap)["iimageBuffer"] = IIMAGEBUFFER; - (*KeywordMap)["uimageBuffer"] = UIMAGEBUFFER; - (*KeywordMap)["image1DArray"] = IMAGE1DARRAY; - (*KeywordMap)["iimage1DArray"] = IIMAGE1DARRAY; - (*KeywordMap)["uimage1DArray"] = UIMAGE1DARRAY; - (*KeywordMap)["image2DArray"] = IMAGE2DARRAY; - (*KeywordMap)["iimage2DArray"] = IIMAGE2DARRAY; - (*KeywordMap)["uimage2DArray"] = UIMAGE2DARRAY; - (*KeywordMap)["imageCubeArray"] = IMAGECUBEARRAY; - (*KeywordMap)["iimageCubeArray"] = IIMAGECUBEARRAY; - (*KeywordMap)["uimageCubeArray"] = UIMAGECUBEARRAY; - (*KeywordMap)["image2DMS"] = IMAGE2DMS; - (*KeywordMap)["iimage2DMS"] = IIMAGE2DMS; - (*KeywordMap)["uimage2DMS"] = UIMAGE2DMS; - (*KeywordMap)["image2DMSArray"] = IMAGE2DMSARRAY; - (*KeywordMap)["iimage2DMSArray"] = IIMAGE2DMSARRAY; - (*KeywordMap)["uimage2DMSArray"] = UIMAGE2DMSARRAY; - (*KeywordMap)["i64image1D"] = I64IMAGE1D; - (*KeywordMap)["u64image1D"] = U64IMAGE1D; - (*KeywordMap)["i64image2D"] = I64IMAGE2D; - (*KeywordMap)["u64image2D"] = U64IMAGE2D; - (*KeywordMap)["i64image3D"] = I64IMAGE3D; - (*KeywordMap)["u64image3D"] = U64IMAGE3D; - (*KeywordMap)["i64image2DRect"] = I64IMAGE2DRECT; - (*KeywordMap)["u64image2DRect"] = U64IMAGE2DRECT; - (*KeywordMap)["i64imageCube"] = I64IMAGECUBE; - (*KeywordMap)["u64imageCube"] = U64IMAGECUBE; - (*KeywordMap)["i64imageBuffer"] = I64IMAGEBUFFER; - (*KeywordMap)["u64imageBuffer"] = U64IMAGEBUFFER; - (*KeywordMap)["i64image1DArray"] = I64IMAGE1DARRAY; - (*KeywordMap)["u64image1DArray"] = U64IMAGE1DARRAY; - (*KeywordMap)["i64image2DArray"] = I64IMAGE2DARRAY; - (*KeywordMap)["u64image2DArray"] = U64IMAGE2DARRAY; - (*KeywordMap)["i64imageCubeArray"] = I64IMAGECUBEARRAY; - (*KeywordMap)["u64imageCubeArray"] = U64IMAGECUBEARRAY; - (*KeywordMap)["i64image2DMS"] = I64IMAGE2DMS; - (*KeywordMap)["u64image2DMS"] = U64IMAGE2DMS; - (*KeywordMap)["i64image2DMSArray"] = I64IMAGE2DMSARRAY; - (*KeywordMap)["u64image2DMSArray"] = U64IMAGE2DMSARRAY; - (*KeywordMap)["double"] = DOUBLE; - (*KeywordMap)["dvec2"] = DVEC2; - (*KeywordMap)["dvec3"] = DVEC3; - (*KeywordMap)["dvec4"] = DVEC4; - (*KeywordMap)["int64_t"] = INT64_T; - (*KeywordMap)["uint64_t"] = UINT64_T; - (*KeywordMap)["i64vec2"] = I64VEC2; - (*KeywordMap)["i64vec3"] = I64VEC3; - (*KeywordMap)["i64vec4"] = I64VEC4; - (*KeywordMap)["u64vec2"] = U64VEC2; - (*KeywordMap)["u64vec3"] = U64VEC3; - (*KeywordMap)["u64vec4"] = U64VEC4; - - // GL_EXT_shader_explicit_arithmetic_types - (*KeywordMap)["int8_t"] = INT8_T; - (*KeywordMap)["i8vec2"] = I8VEC2; - (*KeywordMap)["i8vec3"] = I8VEC3; - (*KeywordMap)["i8vec4"] = I8VEC4; - (*KeywordMap)["uint8_t"] = UINT8_T; - (*KeywordMap)["u8vec2"] = U8VEC2; - (*KeywordMap)["u8vec3"] = U8VEC3; - (*KeywordMap)["u8vec4"] = U8VEC4; - - (*KeywordMap)["int16_t"] = INT16_T; - (*KeywordMap)["i16vec2"] = I16VEC2; - (*KeywordMap)["i16vec3"] = I16VEC3; - (*KeywordMap)["i16vec4"] = I16VEC4; - (*KeywordMap)["uint16_t"] = UINT16_T; - (*KeywordMap)["u16vec2"] = U16VEC2; - (*KeywordMap)["u16vec3"] = U16VEC3; - (*KeywordMap)["u16vec4"] = U16VEC4; - - (*KeywordMap)["int32_t"] = INT32_T; - (*KeywordMap)["i32vec2"] = I32VEC2; - (*KeywordMap)["i32vec3"] = I32VEC3; - (*KeywordMap)["i32vec4"] = I32VEC4; - (*KeywordMap)["uint32_t"] = UINT32_T; - (*KeywordMap)["u32vec2"] = U32VEC2; - (*KeywordMap)["u32vec3"] = U32VEC3; - (*KeywordMap)["u32vec4"] = U32VEC4; - - (*KeywordMap)["float16_t"] = FLOAT16_T; - (*KeywordMap)["f16vec2"] = F16VEC2; - (*KeywordMap)["f16vec3"] = F16VEC3; - (*KeywordMap)["f16vec4"] = F16VEC4; - (*KeywordMap)["f16mat2"] = F16MAT2; - (*KeywordMap)["f16mat3"] = F16MAT3; - (*KeywordMap)["f16mat4"] = F16MAT4; - (*KeywordMap)["f16mat2x2"] = F16MAT2X2; - (*KeywordMap)["f16mat2x3"] = F16MAT2X3; - (*KeywordMap)["f16mat2x4"] = F16MAT2X4; - (*KeywordMap)["f16mat3x2"] = F16MAT3X2; - (*KeywordMap)["f16mat3x3"] = F16MAT3X3; - (*KeywordMap)["f16mat3x4"] = F16MAT3X4; - (*KeywordMap)["f16mat4x2"] = F16MAT4X2; - (*KeywordMap)["f16mat4x3"] = F16MAT4X3; - (*KeywordMap)["f16mat4x4"] = F16MAT4X4; - - (*KeywordMap)["float32_t"] = FLOAT32_T; - (*KeywordMap)["f32vec2"] = F32VEC2; - (*KeywordMap)["f32vec3"] = F32VEC3; - (*KeywordMap)["f32vec4"] = F32VEC4; - (*KeywordMap)["f32mat2"] = F32MAT2; - (*KeywordMap)["f32mat3"] = F32MAT3; - (*KeywordMap)["f32mat4"] = F32MAT4; - (*KeywordMap)["f32mat2x2"] = F32MAT2X2; - (*KeywordMap)["f32mat2x3"] = F32MAT2X3; - (*KeywordMap)["f32mat2x4"] = F32MAT2X4; - (*KeywordMap)["f32mat3x2"] = F32MAT3X2; - (*KeywordMap)["f32mat3x3"] = F32MAT3X3; - (*KeywordMap)["f32mat3x4"] = F32MAT3X4; - (*KeywordMap)["f32mat4x2"] = F32MAT4X2; - (*KeywordMap)["f32mat4x3"] = F32MAT4X3; - (*KeywordMap)["f32mat4x4"] = F32MAT4X4; - (*KeywordMap)["float64_t"] = FLOAT64_T; - (*KeywordMap)["f64vec2"] = F64VEC2; - (*KeywordMap)["f64vec3"] = F64VEC3; - (*KeywordMap)["f64vec4"] = F64VEC4; - (*KeywordMap)["f64mat2"] = F64MAT2; - (*KeywordMap)["f64mat3"] = F64MAT3; - (*KeywordMap)["f64mat4"] = F64MAT4; - (*KeywordMap)["f64mat2x2"] = F64MAT2X2; - (*KeywordMap)["f64mat2x3"] = F64MAT2X3; - (*KeywordMap)["f64mat2x4"] = F64MAT2X4; - (*KeywordMap)["f64mat3x2"] = F64MAT3X2; - (*KeywordMap)["f64mat3x3"] = F64MAT3X3; - (*KeywordMap)["f64mat3x4"] = F64MAT3X4; - (*KeywordMap)["f64mat4x2"] = F64MAT4X2; - (*KeywordMap)["f64mat4x3"] = F64MAT4X3; - (*KeywordMap)["f64mat4x4"] = F64MAT4X4; - - // GL_EXT_spirv_intrinsics - (*KeywordMap)["spirv_instruction"] = SPIRV_INSTRUCTION; - (*KeywordMap)["spirv_execution_mode"] = SPIRV_EXECUTION_MODE; - (*KeywordMap)["spirv_execution_mode_id"] = SPIRV_EXECUTION_MODE_ID; - (*KeywordMap)["spirv_decorate"] = SPIRV_DECORATE; - (*KeywordMap)["spirv_decorate_id"] = SPIRV_DECORATE_ID; - (*KeywordMap)["spirv_decorate_string"] = SPIRV_DECORATE_STRING; - (*KeywordMap)["spirv_type"] = SPIRV_TYPE; - (*KeywordMap)["spirv_storage_class"] = SPIRV_STORAGE_CLASS; - (*KeywordMap)["spirv_by_reference"] = SPIRV_BY_REFERENCE; - (*KeywordMap)["spirv_literal"] = SPIRV_LITERAL; - - (*KeywordMap)["sampler2D"] = SAMPLER2D; - (*KeywordMap)["samplerCube"] = SAMPLERCUBE; - (*KeywordMap)["samplerCubeShadow"] = SAMPLERCUBESHADOW; - (*KeywordMap)["sampler2DArray"] = SAMPLER2DARRAY; - (*KeywordMap)["sampler2DArrayShadow"] = SAMPLER2DARRAYSHADOW; - (*KeywordMap)["isampler2D"] = ISAMPLER2D; - (*KeywordMap)["isampler3D"] = ISAMPLER3D; - (*KeywordMap)["isamplerCube"] = ISAMPLERCUBE; - (*KeywordMap)["isampler2DArray"] = ISAMPLER2DARRAY; - (*KeywordMap)["usampler2D"] = USAMPLER2D; - (*KeywordMap)["usampler3D"] = USAMPLER3D; - (*KeywordMap)["usamplerCube"] = USAMPLERCUBE; - (*KeywordMap)["usampler2DArray"] = USAMPLER2DARRAY; - (*KeywordMap)["sampler3D"] = SAMPLER3D; - (*KeywordMap)["sampler2DShadow"] = SAMPLER2DSHADOW; - - (*KeywordMap)["texture2D"] = TEXTURE2D; - (*KeywordMap)["textureCube"] = TEXTURECUBE; - (*KeywordMap)["texture2DArray"] = TEXTURE2DARRAY; - (*KeywordMap)["itexture2D"] = ITEXTURE2D; - (*KeywordMap)["itexture3D"] = ITEXTURE3D; - (*KeywordMap)["itextureCube"] = ITEXTURECUBE; - (*KeywordMap)["itexture2DArray"] = ITEXTURE2DARRAY; - (*KeywordMap)["utexture2D"] = UTEXTURE2D; - (*KeywordMap)["utexture3D"] = UTEXTURE3D; - (*KeywordMap)["utextureCube"] = UTEXTURECUBE; - (*KeywordMap)["utexture2DArray"] = UTEXTURE2DARRAY; - (*KeywordMap)["texture3D"] = TEXTURE3D; - - (*KeywordMap)["sampler"] = SAMPLER; - (*KeywordMap)["samplerShadow"] = SAMPLERSHADOW; - - (*KeywordMap)["textureCubeArray"] = TEXTURECUBEARRAY; - (*KeywordMap)["itextureCubeArray"] = ITEXTURECUBEARRAY; - (*KeywordMap)["utextureCubeArray"] = UTEXTURECUBEARRAY; - (*KeywordMap)["samplerCubeArray"] = SAMPLERCUBEARRAY; - (*KeywordMap)["samplerCubeArrayShadow"] = SAMPLERCUBEARRAYSHADOW; - (*KeywordMap)["isamplerCubeArray"] = ISAMPLERCUBEARRAY; - (*KeywordMap)["usamplerCubeArray"] = USAMPLERCUBEARRAY; - (*KeywordMap)["sampler1DArrayShadow"] = SAMPLER1DARRAYSHADOW; - (*KeywordMap)["isampler1DArray"] = ISAMPLER1DARRAY; - (*KeywordMap)["usampler1D"] = USAMPLER1D; - (*KeywordMap)["isampler1D"] = ISAMPLER1D; - (*KeywordMap)["usampler1DArray"] = USAMPLER1DARRAY; - (*KeywordMap)["samplerBuffer"] = SAMPLERBUFFER; - (*KeywordMap)["isampler2DRect"] = ISAMPLER2DRECT; - (*KeywordMap)["usampler2DRect"] = USAMPLER2DRECT; - (*KeywordMap)["isamplerBuffer"] = ISAMPLERBUFFER; - (*KeywordMap)["usamplerBuffer"] = USAMPLERBUFFER; - (*KeywordMap)["sampler2DMS"] = SAMPLER2DMS; - (*KeywordMap)["isampler2DMS"] = ISAMPLER2DMS; - (*KeywordMap)["usampler2DMS"] = USAMPLER2DMS; - (*KeywordMap)["sampler2DMSArray"] = SAMPLER2DMSARRAY; - (*KeywordMap)["isampler2DMSArray"] = ISAMPLER2DMSARRAY; - (*KeywordMap)["usampler2DMSArray"] = USAMPLER2DMSARRAY; - (*KeywordMap)["sampler1D"] = SAMPLER1D; - (*KeywordMap)["sampler1DShadow"] = SAMPLER1DSHADOW; - (*KeywordMap)["sampler2DRect"] = SAMPLER2DRECT; - (*KeywordMap)["sampler2DRectShadow"] = SAMPLER2DRECTSHADOW; - (*KeywordMap)["sampler1DArray"] = SAMPLER1DARRAY; - - (*KeywordMap)["samplerExternalOES"] = SAMPLEREXTERNALOES; // GL_OES_EGL_image_external - - (*KeywordMap)["__samplerExternal2DY2YEXT"] = SAMPLEREXTERNAL2DY2YEXT; // GL_EXT_YUV_target - - (*KeywordMap)["itexture1DArray"] = ITEXTURE1DARRAY; - (*KeywordMap)["utexture1D"] = UTEXTURE1D; - (*KeywordMap)["itexture1D"] = ITEXTURE1D; - (*KeywordMap)["utexture1DArray"] = UTEXTURE1DARRAY; - (*KeywordMap)["textureBuffer"] = TEXTUREBUFFER; - (*KeywordMap)["itexture2DRect"] = ITEXTURE2DRECT; - (*KeywordMap)["utexture2DRect"] = UTEXTURE2DRECT; - (*KeywordMap)["itextureBuffer"] = ITEXTUREBUFFER; - (*KeywordMap)["utextureBuffer"] = UTEXTUREBUFFER; - (*KeywordMap)["texture2DMS"] = TEXTURE2DMS; - (*KeywordMap)["itexture2DMS"] = ITEXTURE2DMS; - (*KeywordMap)["utexture2DMS"] = UTEXTURE2DMS; - (*KeywordMap)["texture2DMSArray"] = TEXTURE2DMSARRAY; - (*KeywordMap)["itexture2DMSArray"] = ITEXTURE2DMSARRAY; - (*KeywordMap)["utexture2DMSArray"] = UTEXTURE2DMSARRAY; - (*KeywordMap)["texture1D"] = TEXTURE1D; - (*KeywordMap)["texture2DRect"] = TEXTURE2DRECT; - (*KeywordMap)["texture1DArray"] = TEXTURE1DARRAY; - - (*KeywordMap)["attachmentEXT"] = ATTACHMENTEXT; - (*KeywordMap)["iattachmentEXT"] = IATTACHMENTEXT; - (*KeywordMap)["uattachmentEXT"] = UATTACHMENTEXT; - - (*KeywordMap)["subpassInput"] = SUBPASSINPUT; - (*KeywordMap)["subpassInputMS"] = SUBPASSINPUTMS; - (*KeywordMap)["isubpassInput"] = ISUBPASSINPUT; - (*KeywordMap)["isubpassInputMS"] = ISUBPASSINPUTMS; - (*KeywordMap)["usubpassInput"] = USUBPASSINPUT; - (*KeywordMap)["usubpassInputMS"] = USUBPASSINPUTMS; - - (*KeywordMap)["f16sampler1D"] = F16SAMPLER1D; - (*KeywordMap)["f16sampler2D"] = F16SAMPLER2D; - (*KeywordMap)["f16sampler3D"] = F16SAMPLER3D; - (*KeywordMap)["f16sampler2DRect"] = F16SAMPLER2DRECT; - (*KeywordMap)["f16samplerCube"] = F16SAMPLERCUBE; - (*KeywordMap)["f16sampler1DArray"] = F16SAMPLER1DARRAY; - (*KeywordMap)["f16sampler2DArray"] = F16SAMPLER2DARRAY; - (*KeywordMap)["f16samplerCubeArray"] = F16SAMPLERCUBEARRAY; - (*KeywordMap)["f16samplerBuffer"] = F16SAMPLERBUFFER; - (*KeywordMap)["f16sampler2DMS"] = F16SAMPLER2DMS; - (*KeywordMap)["f16sampler2DMSArray"] = F16SAMPLER2DMSARRAY; - (*KeywordMap)["f16sampler1DShadow"] = F16SAMPLER1DSHADOW; - (*KeywordMap)["f16sampler2DShadow"] = F16SAMPLER2DSHADOW; - (*KeywordMap)["f16sampler2DRectShadow"] = F16SAMPLER2DRECTSHADOW; - (*KeywordMap)["f16samplerCubeShadow"] = F16SAMPLERCUBESHADOW; - (*KeywordMap)["f16sampler1DArrayShadow"] = F16SAMPLER1DARRAYSHADOW; - (*KeywordMap)["f16sampler2DArrayShadow"] = F16SAMPLER2DARRAYSHADOW; - (*KeywordMap)["f16samplerCubeArrayShadow"] = F16SAMPLERCUBEARRAYSHADOW; - - (*KeywordMap)["f16image1D"] = F16IMAGE1D; - (*KeywordMap)["f16image2D"] = F16IMAGE2D; - (*KeywordMap)["f16image3D"] = F16IMAGE3D; - (*KeywordMap)["f16image2DRect"] = F16IMAGE2DRECT; - (*KeywordMap)["f16imageCube"] = F16IMAGECUBE; - (*KeywordMap)["f16image1DArray"] = F16IMAGE1DARRAY; - (*KeywordMap)["f16image2DArray"] = F16IMAGE2DARRAY; - (*KeywordMap)["f16imageCubeArray"] = F16IMAGECUBEARRAY; - (*KeywordMap)["f16imageBuffer"] = F16IMAGEBUFFER; - (*KeywordMap)["f16image2DMS"] = F16IMAGE2DMS; - (*KeywordMap)["f16image2DMSArray"] = F16IMAGE2DMSARRAY; - - (*KeywordMap)["f16texture1D"] = F16TEXTURE1D; - (*KeywordMap)["f16texture2D"] = F16TEXTURE2D; - (*KeywordMap)["f16texture3D"] = F16TEXTURE3D; - (*KeywordMap)["f16texture2DRect"] = F16TEXTURE2DRECT; - (*KeywordMap)["f16textureCube"] = F16TEXTURECUBE; - (*KeywordMap)["f16texture1DArray"] = F16TEXTURE1DARRAY; - (*KeywordMap)["f16texture2DArray"] = F16TEXTURE2DARRAY; - (*KeywordMap)["f16textureCubeArray"] = F16TEXTURECUBEARRAY; - (*KeywordMap)["f16textureBuffer"] = F16TEXTUREBUFFER; - (*KeywordMap)["f16texture2DMS"] = F16TEXTURE2DMS; - (*KeywordMap)["f16texture2DMSArray"] = F16TEXTURE2DMSARRAY; - - (*KeywordMap)["f16subpassInput"] = F16SUBPASSINPUT; - (*KeywordMap)["f16subpassInputMS"] = F16SUBPASSINPUTMS; - (*KeywordMap)["__explicitInterpAMD"] = EXPLICITINTERPAMD; - (*KeywordMap)["pervertexNV"] = PERVERTEXNV; - (*KeywordMap)["pervertexEXT"] = PERVERTEXEXT; - (*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; - (*KeywordMap)["perprimitiveEXT"] = PERPRIMITIVEEXT; - (*KeywordMap)["taskPayloadSharedEXT"] = TASKPAYLOADWORKGROUPEXT; - - (*KeywordMap)["fcoopmatNV"] = FCOOPMATNV; - (*KeywordMap)["icoopmatNV"] = ICOOPMATNV; - (*KeywordMap)["ucoopmatNV"] = UCOOPMATNV; - - (*KeywordMap)["coopmat"] = COOPMAT; - - (*KeywordMap)["hitObjectNV"] = HITOBJECTNV; - (*KeywordMap)["hitObjectAttributeNV"] = HITOBJECTATTRNV; - - ReservedSet = new std::unordered_set; - - ReservedSet->insert("common"); - ReservedSet->insert("partition"); - ReservedSet->insert("active"); - ReservedSet->insert("asm"); - ReservedSet->insert("class"); - ReservedSet->insert("union"); - ReservedSet->insert("enum"); - ReservedSet->insert("typedef"); - ReservedSet->insert("template"); - ReservedSet->insert("this"); - ReservedSet->insert("goto"); - ReservedSet->insert("inline"); - ReservedSet->insert("noinline"); - ReservedSet->insert("public"); - ReservedSet->insert("static"); - ReservedSet->insert("extern"); - ReservedSet->insert("external"); - ReservedSet->insert("interface"); - ReservedSet->insert("long"); - ReservedSet->insert("short"); - ReservedSet->insert("half"); - ReservedSet->insert("fixed"); - ReservedSet->insert("unsigned"); - ReservedSet->insert("input"); - ReservedSet->insert("output"); - ReservedSet->insert("hvec2"); - ReservedSet->insert("hvec3"); - ReservedSet->insert("hvec4"); - ReservedSet->insert("fvec2"); - ReservedSet->insert("fvec3"); - ReservedSet->insert("fvec4"); - ReservedSet->insert("sampler3DRect"); - ReservedSet->insert("filter"); - ReservedSet->insert("sizeof"); - ReservedSet->insert("cast"); - ReservedSet->insert("namespace"); - ReservedSet->insert("using"); -} - -void TScanContext::deleteKeywordMap() -{ - delete KeywordMap; - KeywordMap = nullptr; - delete ReservedSet; - ReservedSet = nullptr; -} - // Called by yylex to get the next token. // Returning 0 implies end of input. int TScanContext::tokenize(TPpContext* pp, TParserToken& token) @@ -924,11 +909,11 @@ int TScanContext::tokenize(TPpContext* pp, TParserToken& token) int TScanContext::tokenizeIdentifier() { - if (ReservedSet->find(tokenText) != ReservedSet->end()) + if (ReservedSet.find(tokenText) != ReservedSet.end()) return reservedWord(); - auto it = KeywordMap->find(tokenText); - if (it == KeywordMap->end()) { + auto it = KeywordMap.find(tokenText); + if (it == KeywordMap.end()) { // Should have an identifier of some sort return identifierOrType(); } @@ -1122,6 +1107,15 @@ int TScanContext::tokenizeIdentifier() (parseContext.version < 420 && ! parseContext.extensionTurnedOn(E_GL_ARB_shader_image_load_store)))) reservedWord(); return keyword; + case NONTEMPORAL: + if (parseContext.symbolTable.atBuiltInLevel()) + return keyword; + if (parseContext.extensionTurnedOn(E_GL_EXT_nontemporal_keyword)) { + if (!parseContext.intermediate.usingVulkanMemoryModel()) + parseContext.warn(loc, "Nontemporal without the Vulkan Memory Model is ignored", tokenText, ""); + return keyword; + } + return identifierOrType(); case PATCH: if (parseContext.symbolTable.atBuiltInLevel() || (parseContext.isEsProfile() && @@ -1794,6 +1788,13 @@ int TScanContext::tokenizeIdentifier() return keyword; return identifierOrType(); + case COOPVECNV: + afterType = true; + if (parseContext.symbolTable.atBuiltInLevel() || + parseContext.extensionTurnedOn(E_GL_NV_cooperative_vector)) + return keyword; + return identifierOrType(); + case DEMOTE: if (parseContext.extensionTurnedOn(E_GL_EXT_demote_to_helper_invocation)) return keyword; @@ -1829,6 +1830,15 @@ int TScanContext::tokenizeIdentifier() return keyword; return identifierOrType(); + case FUNCTION: + case TENSORLAYOUTNV: + case TENSORVIEWNV: + afterType = true; + if (parseContext.symbolTable.atBuiltInLevel() || + parseContext.extensionTurnedOn(E_GL_NV_cooperative_matrix2)) + return keyword; + return identifierOrType(); + default: parseContext.infoSink.info.message(EPrefixInternalError, "Unknown glslang keyword", loc); return 0; diff --git a/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/ShaderLang.cpp b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/ShaderLang.cpp index e0358edbd..040b21daf 100644 --- a/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/ShaderLang.cpp +++ b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/ShaderLang.cpp @@ -73,7 +73,7 @@ #include "preprocessor/PpTokens.h" // Build-time generated includes -#include "../../build_info.h" +#include "glslang/build_info.h" namespace { // anonymous namespace for file-local functions and symbols @@ -82,7 +82,10 @@ namespace { // anonymous namespace for file-local functions and symbols int NumberOfClients = 0; // global initialization lock +#ifndef DISABLE_THREAD_SUPPORT std::mutex init_lock; +#endif + using namespace glslang; @@ -294,18 +297,21 @@ int CommonIndex(EProfile profile, EShLanguage language) // // To initialize per-stage shared tables, with the common table already complete. // -void InitializeStageSymbolTable(TBuiltInParseables& builtInParseables, int version, EProfile profile, const SpvVersion& spvVersion, +bool InitializeStageSymbolTable(TBuiltInParseables& builtInParseables, int version, EProfile profile, const SpvVersion& spvVersion, EShLanguage language, EShSource source, TInfoSink& infoSink, TSymbolTable** commonTable, TSymbolTable** symbolTables) { (*symbolTables[language]).adoptLevels(*commonTable[CommonIndex(profile, language)]); - InitializeSymbolTable(builtInParseables.getStageString(language), version, profile, spvVersion, language, source, - infoSink, *symbolTables[language]); + if (!InitializeSymbolTable(builtInParseables.getStageString(language), version, profile, spvVersion, language, source, + infoSink, *symbolTables[language])) + return false; builtInParseables.identifyBuiltIns(version, profile, spvVersion, language, *symbolTables[language]); if (profile == EEsProfile && version >= 300) (*symbolTables[language]).setNoBuiltInRedeclarations(); if (version == 110) (*symbolTables[language]).setSeparateNameSpaces(); + + return true; } // @@ -314,6 +320,7 @@ void InitializeStageSymbolTable(TBuiltInParseables& builtInParseables, int versi // bool InitializeSymbolTables(TInfoSink& infoSink, TSymbolTable** commonTable, TSymbolTable** symbolTables, int version, EProfile profile, const SpvVersion& spvVersion, EShSource source) { + bool success = true; std::unique_ptr builtInParseables(CreateBuiltInParseables(infoSink, source)); if (builtInParseables == nullptr) @@ -322,70 +329,70 @@ bool InitializeSymbolTables(TInfoSink& infoSink, TSymbolTable** commonTable, TS builtInParseables->initialize(version, profile, spvVersion); // do the common tables - InitializeSymbolTable(builtInParseables->getCommonString(), version, profile, spvVersion, EShLangVertex, source, + success &= InitializeSymbolTable(builtInParseables->getCommonString(), version, profile, spvVersion, EShLangVertex, source, infoSink, *commonTable[EPcGeneral]); if (profile == EEsProfile) - InitializeSymbolTable(builtInParseables->getCommonString(), version, profile, spvVersion, EShLangFragment, source, + success &= InitializeSymbolTable(builtInParseables->getCommonString(), version, profile, spvVersion, EShLangFragment, source, infoSink, *commonTable[EPcFragment]); // do the per-stage tables // always have vertex and fragment - InitializeStageSymbolTable(*builtInParseables, version, profile, spvVersion, EShLangVertex, source, + success &= InitializeStageSymbolTable(*builtInParseables, version, profile, spvVersion, EShLangVertex, source, infoSink, commonTable, symbolTables); - InitializeStageSymbolTable(*builtInParseables, version, profile, spvVersion, EShLangFragment, source, + success &= InitializeStageSymbolTable(*builtInParseables, version, profile, spvVersion, EShLangFragment, source, infoSink, commonTable, symbolTables); // check for tessellation if ((profile != EEsProfile && version >= 150) || (profile == EEsProfile && version >= 310)) { - InitializeStageSymbolTable(*builtInParseables, version, profile, spvVersion, EShLangTessControl, source, + success &= InitializeStageSymbolTable(*builtInParseables, version, profile, spvVersion, EShLangTessControl, source, infoSink, commonTable, symbolTables); - InitializeStageSymbolTable(*builtInParseables, version, profile, spvVersion, EShLangTessEvaluation, source, + success &= InitializeStageSymbolTable(*builtInParseables, version, profile, spvVersion, EShLangTessEvaluation, source, infoSink, commonTable, symbolTables); } // check for geometry if ((profile != EEsProfile && version >= 150) || (profile == EEsProfile && version >= 310)) - InitializeStageSymbolTable(*builtInParseables, version, profile, spvVersion, EShLangGeometry, source, + success &= InitializeStageSymbolTable(*builtInParseables, version, profile, spvVersion, EShLangGeometry, source, infoSink, commonTable, symbolTables); // check for compute if ((profile != EEsProfile && version >= 420) || (profile == EEsProfile && version >= 310)) - InitializeStageSymbolTable(*builtInParseables, version, profile, spvVersion, EShLangCompute, source, + success &= InitializeStageSymbolTable(*builtInParseables, version, profile, spvVersion, EShLangCompute, source, infoSink, commonTable, symbolTables); // check for ray tracing stages if (profile != EEsProfile && version >= 450) { - InitializeStageSymbolTable(*builtInParseables, version, profile, spvVersion, EShLangRayGen, source, + success &= InitializeStageSymbolTable(*builtInParseables, version, profile, spvVersion, EShLangRayGen, source, infoSink, commonTable, symbolTables); - InitializeStageSymbolTable(*builtInParseables, version, profile, spvVersion, EShLangIntersect, source, + success &= InitializeStageSymbolTable(*builtInParseables, version, profile, spvVersion, EShLangIntersect, source, infoSink, commonTable, symbolTables); - InitializeStageSymbolTable(*builtInParseables, version, profile, spvVersion, EShLangAnyHit, source, + success &= InitializeStageSymbolTable(*builtInParseables, version, profile, spvVersion, EShLangAnyHit, source, infoSink, commonTable, symbolTables); - InitializeStageSymbolTable(*builtInParseables, version, profile, spvVersion, EShLangClosestHit, source, + success &= InitializeStageSymbolTable(*builtInParseables, version, profile, spvVersion, EShLangClosestHit, source, infoSink, commonTable, symbolTables); - InitializeStageSymbolTable(*builtInParseables, version, profile, spvVersion, EShLangMiss, source, + success &= InitializeStageSymbolTable(*builtInParseables, version, profile, spvVersion, EShLangMiss, source, infoSink, commonTable, symbolTables); - InitializeStageSymbolTable(*builtInParseables, version, profile, spvVersion, EShLangCallable, source, + success &= InitializeStageSymbolTable(*builtInParseables, version, profile, spvVersion, EShLangCallable, source, infoSink, commonTable, symbolTables); } // check for mesh if ((profile != EEsProfile && version >= 450) || (profile == EEsProfile && version >= 320)) - InitializeStageSymbolTable(*builtInParseables, version, profile, spvVersion, EShLangMesh, source, + success &= InitializeStageSymbolTable(*builtInParseables, version, profile, spvVersion, EShLangMesh, source, infoSink, commonTable, symbolTables); // check for task if ((profile != EEsProfile && version >= 450) || (profile == EEsProfile && version >= 320)) - InitializeStageSymbolTable(*builtInParseables, version, profile, spvVersion, EShLangTask, source, + success &= InitializeStageSymbolTable(*builtInParseables, version, profile, spvVersion, EShLangTask, source, infoSink, commonTable, symbolTables); - return true; + return success; } bool AddContextSpecificSymbols(const TBuiltInResource* resources, TInfoSink& infoSink, TSymbolTable& symbolTable, int version, @@ -397,7 +404,8 @@ bool AddContextSpecificSymbols(const TBuiltInResource* resources, TInfoSink& inf return false; builtInParseables->initialize(*resources, version, profile, spvVersion, language); - InitializeSymbolTable(builtInParseables->getCommonString(), version, profile, spvVersion, language, source, infoSink, symbolTable); + if (!InitializeSymbolTable(builtInParseables->getCommonString(), version, profile, spvVersion, language, source, infoSink, symbolTable)) + return false; builtInParseables->identifyBuiltIns(version, profile, spvVersion, language, symbolTable, *resources); return true; @@ -415,20 +423,24 @@ bool AddContextSpecificSymbols(const TBuiltInResource* resources, TInfoSink& inf // This only gets done the first time any thread needs a particular symbol table // (lazy evaluation). // -void SetupBuiltinSymbolTable(int version, EProfile profile, const SpvVersion& spvVersion, EShSource source) +bool SetupBuiltinSymbolTable(int version, EProfile profile, const SpvVersion& spvVersion, EShSource source) { TInfoSink infoSink; + bool success; // Make sure only one thread tries to do this at a time +#ifndef DISABLE_THREAD_SUPPORT const std::lock_guard lock(init_lock); +#endif // See if it's already been done for this version/profile combination int versionIndex = MapVersionToIndex(version); int spvVersionIndex = MapSpvVersionToIndex(spvVersion); int profileIndex = MapProfileToIndex(profile); int sourceIndex = MapSourceToIndex(source); - if (CommonSymbolTable[versionIndex][spvVersionIndex][profileIndex][sourceIndex][EPcGeneral]) - return; + if (CommonSymbolTable[versionIndex][spvVersionIndex][profileIndex][sourceIndex][EPcGeneral]) { + return true; + } // Switch to a new pool TPoolAllocator& previousAllocator = GetThreadPoolAllocator(); @@ -444,7 +456,10 @@ void SetupBuiltinSymbolTable(int version, EProfile profile, const SpvVersion& sp stageTables[stage] = new TSymbolTable; // Generate the local symbol tables using the new pool - InitializeSymbolTables(infoSink, commonTable, stageTables, version, profile, spvVersion, source); + if (!InitializeSymbolTables(infoSink, commonTable, stageTables, version, profile, spvVersion, source)) { + success = false; + goto cleanup; + } // Switch to the process-global pool SetThreadPoolAllocator(PerProcessGPA); @@ -466,7 +481,9 @@ void SetupBuiltinSymbolTable(int version, EProfile profile, const SpvVersion& sp SharedSymbolTables[versionIndex][spvVersionIndex][profileIndex][sourceIndex][stage]->readOnly(); } } + success = true; +cleanup: // Clean up the local tables before deleting the pool they used. for (int precClass = 0; precClass < EPcCount; ++precClass) delete commonTable[precClass]; @@ -475,6 +492,8 @@ void SetupBuiltinSymbolTable(int version, EProfile profile, const SpvVersion& sp delete builtInPoolAllocator; SetThreadPoolAllocator(&previousAllocator); + + return success; } // Function to Print all builtins @@ -910,7 +929,9 @@ bool ProcessDeferred( intermediate.addSourceText(strings[numPre + s], lengths[numPre + s]); } } - SetupBuiltinSymbolTable(version, profile, spvVersion, source); + if (!SetupBuiltinSymbolTable(version, profile, spvVersion, source)) { + return false; + } TSymbolTable* cachedTable = SharedSymbolTables[MapVersionToIndex(version)] [MapSpvVersionToIndex(spvVersion)] @@ -1311,17 +1332,14 @@ bool CompileDeferred( // int ShInitialize() { +#ifndef DISABLE_THREAD_SUPPORT const std::lock_guard lock(init_lock); +#endif ++NumberOfClients; if (PerProcessGPA == nullptr) PerProcessGPA = new TPoolAllocator(); - glslang::TScanContext::fillInKeywordMap(); -#ifdef ENABLE_HLSL - glslang::HlslScanContext::fillInKeywordMap(); -#endif - return 1; } @@ -1371,7 +1389,9 @@ void ShDestruct(ShHandle handle) // int ShFinalize() { +#ifndef DISABLE_THREAD_SUPPORT const std::lock_guard lock(init_lock); +#endif --NumberOfClients; assert(NumberOfClients >= 0); if (NumberOfClients > 0) @@ -1408,11 +1428,6 @@ int ShFinalize() PerProcessGPA = nullptr; } - glslang::TScanContext::deleteKeywordMap(); -#ifdef ENABLE_HLSL - glslang::HlslScanContext::deleteKeywordMap(); -#endif - return 1; } @@ -1717,6 +1732,10 @@ public: virtual bool compile(TIntermNode*, int = 0, EProfile = ENoProfile) { return true; } }; +TIoMapper* GetGlslIoMapper() { + return static_cast(new TGlslIoMapper()); +} + TShader::TShader(EShLanguage s) : stage(s), lengths(nullptr), stringNames(nullptr), preamble(""), overrideVersion(0) { @@ -1849,6 +1868,9 @@ void TShader::setGlobalUniformBinding(unsigned int binding) { intermediate->setG void TShader::setAtomicCounterBlockName(const char* name) { intermediate->setAtomicCounterBlockName(name); } void TShader::setAtomicCounterBlockSet(unsigned int set) { intermediate->setAtomicCounterBlockSet(set); } +void TShader::addSourceText(const char* text, size_t len) { intermediate->addSourceText(text, len); } +void TShader::setSourceFile(const char* file) { intermediate->setSourceFile(file); } + #ifdef ENABLE_HLSL // See comment above TDefaultHlslIoMapper in iomapper.cpp: void TShader::setHlslIoMapping(bool hlslIoMap) { intermediate->setHlslIoMapping(hlslIoMap); } @@ -2033,7 +2055,7 @@ bool TProgram::linkStage(EShLanguage stage, EShMessages messages) // // Return true if no errors. // -bool TProgram::crossStageCheck(EShMessages) { +bool TProgram::crossStageCheck(EShMessages messages) { // make temporary intermediates to hold the linkage symbols for each linking interface // while we do the checks @@ -2088,6 +2110,13 @@ bool TProgram::crossStageCheck(EShMessages) { error |= (activeStages[i - 1]->getNumErrors() != 0); } + // if requested, optimize cross stage IO + if (messages & EShMsgLinkTimeOptimization) { + for (unsigned int i = 1; i < activeStages.size(); ++i) { + activeStages[i - 1]->optimizeStageIO(*infoSink, *activeStages[i]); + } + } + return !error; } @@ -2112,6 +2141,8 @@ bool TProgram::buildReflection(int opts) if (! linked || reflection != nullptr) return false; + SetThreadPoolAllocator(pool); + int firstStage = EShLangVertex, lastStage = EShLangFragment; if (opts & EShReflectionIntermediateIO) { @@ -2160,6 +2191,12 @@ int TProgram::getNumAtomicCounters() const { return r const TObjectReflection& TProgram::getAtomicCounter(int index) const { return reflection->getAtomicCounter(index); } void TProgram::dumpReflection() { if (reflection != nullptr) reflection->dump(); } +TIoMapResolver* TProgram::getGlslIoResolver(EShLanguage stage) { + auto *intermediate = getIntermediate(stage); + if (!intermediate) + return NULL; + return static_cast(new TDefaultGlslIoResolver(*intermediate)); +} // // I/O mapping implementation. // @@ -2167,6 +2204,9 @@ bool TProgram::mapIO(TIoMapResolver* pResolver, TIoMapper* pIoMapper) { if (! linked) return false; + + SetThreadPoolAllocator(pool); + TIoMapper* ioMapper = nullptr; TIoMapper defaultIOMapper; if (pIoMapper == nullptr) diff --git a/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/SymbolTable.cpp b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/SymbolTable.cpp index 3b56e414b..ec53fe378 100644 --- a/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/SymbolTable.cpp +++ b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/SymbolTable.cpp @@ -60,6 +60,9 @@ void TType::buildMangledName(TString& mangledName) const else if (isVector()) mangledName += 'v'; + if (isCoopVecNV()) + mangledName += "coopvec"; + switch (basicType) { case EbtFloat: mangledName += 'f'; break; case EbtInt: mangledName += 'i'; break; @@ -78,6 +81,8 @@ void TType::buildMangledName(TString& mangledName) const case EbtRayQuery: mangledName += "rq"; break; case EbtSpirvType: mangledName += "spv-t"; break; case EbtHitObjectNV: mangledName += "ho"; break; + case EbtTensorLayoutNV: mangledName += "tl"; break; + case EbtTensorViewNV: mangledName += "tv"; break; case EbtSampler: switch (sampler.type) { case EbtFloat16: mangledName += "f16"; break; @@ -161,6 +166,23 @@ void TType::buildMangledName(TString& mangledName) const mangledName += static_cast('0' + getMatrixRows()); } + if (typeParameters) { + const int maxSize = 11; + char buf[maxSize]; + for (int i = 0; i < typeParameters->arraySizes->getNumDims(); ++i) { + if (typeParameters->arraySizes->getDimNode(i)) { + if (typeParameters->arraySizes->getDimNode(i)->getAsSymbolNode()) + snprintf(buf, maxSize, "s%lld", typeParameters->arraySizes->getDimNode(i)->getAsSymbolNode()->getId()); + else + snprintf(buf, maxSize, "s%p", typeParameters->arraySizes->getDimNode(i)); + } else + snprintf(buf, maxSize, "%d", typeParameters->arraySizes->getDimSize(i)); + mangledName += '<'; + mangledName += buf; + mangledName += '>'; + } + } + if (arraySizes) { const int maxSize = 11; char buf[maxSize]; @@ -169,7 +191,7 @@ void TType::buildMangledName(TString& mangledName) const if (arraySizes->getDimNode(i)->getAsSymbolNode()) snprintf(buf, maxSize, "s%lld", arraySizes->getDimNode(i)->getAsSymbolNode()->getId()); else - snprintf(buf, maxSize, "s%p", arraySizes->getDimNode(i)); + snprintf(buf, maxSize, "s%p", (void*)(arraySizes->getDimNode(i))); } else snprintf(buf, maxSize, "%d", arraySizes->getDimSize(i)); mangledName += '['; @@ -344,6 +366,7 @@ void TSymbolTableLevel::readOnly() TSymbol::TSymbol(const TSymbol& copyOf) { name = NewPoolTString(copyOf.name->c_str()); + mangledName = NewPoolTString(copyOf.mangledName->c_str()); uniqueId = copyOf.uniqueId; writable = true; } diff --git a/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/SymbolTable.h b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/SymbolTable.h index 94c3929da..6d1a0c8e2 100644 --- a/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/SymbolTable.h +++ b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/SymbolTable.h @@ -84,7 +84,8 @@ typedef TVector TExtensionList; class TSymbol { public: POOL_ALLOCATOR_NEW_DELETE(GetThreadPoolAllocator()) - explicit TSymbol(const TString *n) : name(n), uniqueId(0), extensions(nullptr), writable(true) { } + explicit TSymbol(const TString *n, const TString *mn) : name(n), mangledName(mn), uniqueId(0), extensions(nullptr), writable(true) { } + explicit TSymbol(const TString *n) : TSymbol(n, n) { } virtual TSymbol* clone() const = 0; virtual ~TSymbol() { } // rely on all symbol owned memory coming from the pool @@ -96,7 +97,7 @@ public: newName.append(*name); changeName(NewPoolTString(newName.c_str())); } - virtual const TString& getMangledName() const { return getName(); } + virtual const TString& getMangledName() const { return *mangledName; } virtual TFunction* getAsFunction() { return nullptr; } virtual const TFunction* getAsFunction() const { return nullptr; } virtual TVariable* getAsVariable() { return nullptr; } @@ -128,6 +129,7 @@ protected: TSymbol& operator=(const TSymbol&); const TString *name; + const TString *mangledName; unsigned long long uniqueId; // For cross-scope comparing during code generation // For tracking what extensions must be present @@ -154,7 +156,9 @@ protected: class TVariable : public TSymbol { public: TVariable(const TString *name, const TType& t, bool uT = false ) - : TSymbol(name), + : TVariable(name, name, t, uT) {} + TVariable(const TString *name, const TString *mangledName, const TType& t, bool uT = false ) + : TSymbol(name, mangledName), userType(uT), constSubtree(nullptr), memberExtensions(nullptr), diff --git a/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/Versions.cpp b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/Versions.cpp index e016ef6b9..4e4246aa3 100644 --- a/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/Versions.cpp +++ b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/Versions.cpp @@ -165,7 +165,8 @@ void TParseVersions::initializeExtensionBehavior() const extensionData exts[] = { {E_GL_EXT_ray_tracing, EShTargetSpv_1_4}, {E_GL_NV_ray_tracing_motion_blur, EShTargetSpv_1_4}, - {E_GL_EXT_mesh_shader, EShTargetSpv_1_4} + {E_GL_EXT_mesh_shader, EShTargetSpv_1_4}, + {E_GL_NV_cooperative_matrix2, EShTargetSpv_1_6} }; for (size_t ii = 0; ii < sizeof(exts) / sizeof(exts[0]); ii++) { @@ -268,6 +269,7 @@ void TParseVersions::initializeExtensionBehavior() extensionBehavior[E_GL_EXT_spec_constant_composites] = EBhDisable; extensionBehavior[E_GL_KHR_cooperative_matrix] = EBhDisable; + extensionBehavior[E_GL_NV_cooperative_vector] = EBhDisable; // #line and #include extensionBehavior[E_GL_GOOGLE_cpp_style_line_directive] = EBhDisable; @@ -310,6 +312,9 @@ void TParseVersions::initializeExtensionBehavior() extensionBehavior[E_GL_NV_shader_invocation_reorder] = EBhDisable; extensionBehavior[E_GL_NV_displacement_micromap] = EBhDisable; extensionBehavior[E_GL_NV_shader_atomic_fp16_vector] = EBhDisable; + extensionBehavior[E_GL_NV_cooperative_matrix2] = EBhDisable; + extensionBehavior[E_GL_NV_cluster_acceleration_structure] = EBhDisable; + extensionBehavior[E_GL_NV_linear_swept_spheres] = EBhDisable; // ARM extensionBehavior[E_GL_ARM_shader_core_builtins] = EBhDisable; @@ -371,6 +376,8 @@ void TParseVersions::initializeExtensionBehavior() extensionBehavior[E_GL_EXT_texture_shadow_lod] = EBhDisable; extensionBehavior[E_GL_EXT_draw_instanced] = EBhDisable; extensionBehavior[E_GL_EXT_texture_array] = EBhDisable; + extensionBehavior[E_GL_EXT_texture_offset_non_const] = EBhDisable; + extensionBehavior[E_GL_EXT_nontemporal_keyword] = EBhDisable; // OVR extensions extensionBehavior[E_GL_OVR_multiview] = EBhDisable; @@ -394,6 +401,8 @@ void TParseVersions::initializeExtensionBehavior() extensionBehavior[E_GL_EXT_shader_atomic_float] = EBhDisable; extensionBehavior[E_GL_EXT_shader_atomic_float2] = EBhDisable; + extensionBehavior[E_GL_EXT_integer_dot_product] = EBhDisable; + // Record extensions not for spv. spvUnsupportedExt.push_back(E_GL_ARB_bindless_texture); } @@ -574,6 +583,7 @@ void TParseVersions::getPreamble(std::string& preamble) "#define GL_NV_cooperative_matrix 1\n" "#define GL_NV_integer_cooperative_matrix 1\n" "#define GL_NV_shader_invocation_reorder 1\n" + "#define GL_NV_cooperative_matrix2 1\n" "#define GL_QCOM_image_processing 1\n" "#define GL_QCOM_image_processing2 1\n" @@ -600,6 +610,8 @@ void TParseVersions::getPreamble(std::string& preamble) "#define GL_EXT_texture_array 1\n" "#define GL_EXT_control_flow_attributes2 1\n" + + "#define GL_EXT_integer_dot_product 1\n" ; if (spvVersion.spv == 0) { @@ -632,6 +644,11 @@ void TParseVersions::getPreamble(std::string& preamble) ; } + if ((!isEsProfile() && version >= 130) || + (isEsProfile() && version >= 300)) { + preamble += "#define GL_EXT_texture_offset_non_const 1\n"; + } + if (version >= 300 /* both ES and non-ES */) { preamble += "#define GL_OVR_multiview 1\n" @@ -775,7 +792,7 @@ void TParseVersions::profileRequires(const TSourceLoc& loc, int profileMask, int for (int i = 0; i < numExtensions; ++i) { switch (getExtensionBehavior(extensions[i])) { case EBhWarn: - infoSink.info.message(EPrefixWarning, ("extension " + TString(extensions[i]) + " is being used for " + featureDesc).c_str(), loc); + infoSink.info.message(EPrefixWarning, ("extension " + TString(extensions[i]) + " is being used for " + featureDesc).c_str(), loc, messages & EShMsgAbsolutePath, messages & EShMsgDisplayErrorColumn); [[fallthrough]]; case EBhRequire: case EBhEnable: @@ -813,7 +830,8 @@ void TParseVersions::checkDeprecated(const TSourceLoc& loc, int profileMask, int error(loc, "deprecated, may be removed in future release", featureDesc, ""); else if (! suppressWarnings()) infoSink.info.message(EPrefixWarning, (TString(featureDesc) + " deprecated in version " + - String(depVersion) + "; may be removed in future release").c_str(), loc); + String(depVersion) + "; may be removed in future release").c_str(), + loc, messages & EShMsgAbsolutePath, messages & EShMsgDisplayErrorColumn); } } } @@ -850,11 +868,14 @@ bool TParseVersions::checkExtensionsRequested(const TSourceLoc& loc, int numExte for (int i = 0; i < numExtensions; ++i) { TExtensionBehavior behavior = getExtensionBehavior(extensions[i]); if (behavior == EBhDisable && relaxedErrors()) { - infoSink.info.message(EPrefixWarning, "The following extension must be enabled to use this feature:", loc); + infoSink.info.message(EPrefixWarning, "The following extension must be enabled to use this feature:", loc, + messages & EShMsgAbsolutePath, messages & EShMsgDisplayErrorColumn); behavior = EBhWarn; } if (behavior == EBhWarn) { - infoSink.info.message(EPrefixWarning, ("extension " + TString(extensions[i]) + " is being used for " + featureDesc).c_str(), loc); + infoSink.info.message(EPrefixWarning, + ("extension " + TString(extensions[i]) + " is being used for " + featureDesc).c_str(), + loc, messages & EShMsgAbsolutePath, messages & EShMsgDisplayErrorColumn); warned = true; } } @@ -1017,6 +1038,8 @@ void TParseVersions::updateExtensionBehavior(int line, const char* extension, co updateExtensionBehavior(line, "GL_EXT_buffer_reference", behaviorString); else if (strcmp(extension, "GL_NV_integer_cooperative_matrix") == 0) updateExtensionBehavior(line, "GL_NV_cooperative_matrix", behaviorString); + else if (strcmp(extension, "GL_NV_cooperative_matrix2") == 0) + updateExtensionBehavior(line, "GL_KHR_cooperative_matrix", behaviorString); // subgroup extended types to explicit types else if (strcmp(extension, "GL_EXT_shader_subgroup_extended_types_int8") == 0) updateExtensionBehavior(line, "GL_EXT_shader_explicit_arithmetic_types_int8", behaviorString); @@ -1377,6 +1400,22 @@ void TParseVersions::coopmatCheck(const TSourceLoc& loc, const char* op, bool bu } } +void TParseVersions::tensorLayoutViewCheck(const TSourceLoc& loc, const char* op, bool builtIn) +{ + if (!builtIn) { + const char* const extensions[] = {E_GL_NV_cooperative_matrix2}; + requireExtensions(loc, sizeof(extensions)/sizeof(extensions[0]), extensions, op); + } +} + +void TParseVersions::coopvecCheck(const TSourceLoc& loc, const char* op, bool builtIn) +{ + if (!builtIn) { + const char* const extensions[] = {E_GL_NV_cooperative_vector}; + requireExtensions(loc, sizeof(extensions)/sizeof(extensions[0]), extensions, op); + } +} + // Call for any operation removed because SPIR-V is in use. void TParseVersions::spvRemoved(const TSourceLoc& loc, const char* op) { diff --git a/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/Versions.h b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/Versions.h index 75a823774..b7e2ba1dd 100644 --- a/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/Versions.h +++ b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/Versions.h @@ -4,6 +4,7 @@ // Copyright (C) 2017, 2022-2024 Arm Limited. // Copyright (C) 2015-2018 Google, Inc. // Modifications Copyright (C) 2020 Advanced Micro Devices, Inc. All rights reserved. +// Modifications Copyright (C) 2024 Valve Corporation. // // All rights reserved. // @@ -223,6 +224,8 @@ const char* const E_GL_EXT_maximal_reconvergence = "GL_EXT_maximal_re const char* const E_GL_EXT_expect_assume = "GL_EXT_expect_assume"; const char* const E_GL_EXT_control_flow_attributes2 = "GL_EXT_control_flow_attributes2"; const char* const E_GL_EXT_spec_constant_composites = "GL_EXT_spec_constant_composites"; +const char* const E_GL_EXT_texture_offset_non_const = "GL_EXT_texture_offset_non_const"; +const char* const E_GL_EXT_nontemporal_keyword = "GL_EXT_nontemporal_keyword"; // Arrays of extensions for the above viewportEXTs duplications @@ -282,6 +285,10 @@ const char* const E_GL_NV_shader_invocation_reorder = "GL_NV_shader_ const char* const E_GL_EXT_ray_tracing_position_fetch = "GL_EXT_ray_tracing_position_fetch"; const char* const E_GL_NV_displacement_micromap = "GL_NV_displacement_micromap"; const char* const E_GL_NV_shader_atomic_fp16_vector = "GL_NV_shader_atomic_fp16_vector"; +const char* const E_GL_NV_cooperative_matrix2 = "GL_NV_cooperative_matrix2"; +const char* const E_GL_NV_cooperative_vector = "GL_NV_cooperative_vector"; +const char* const E_GL_NV_cluster_acceleration_structure = "GL_NV_cluster_acceleration_structure"; +const char* const E_GL_NV_linear_swept_spheres = "GL_NV_linear_swept_spheres"; // ARM const char* const E_GL_ARM_shader_core_builtins = "GL_ARM_shader_core_builtins"; @@ -347,6 +354,8 @@ const char* const E_GL_EXT_shader_tile_image = "GL_EXT_shader_tile_image"; const char* const E_GL_EXT_texture_shadow_lod = "GL_EXT_texture_shadow_lod"; +const char* const E_GL_EXT_integer_dot_product = "GL_EXT_integer_dot_product"; + // 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/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/glslang.m4 b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/glslang.m4 deleted file mode 100644 index 93041ce39..000000000 --- a/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/glslang.m4 +++ /dev/null @@ -1,4398 +0,0 @@ -// -// Copyright (C) 2002-2005 3Dlabs Inc. Ltd. -// Copyright (C) 2012-2013 LunarG, Inc. -// Copyright (C) 2017 ARM Limited. -// Copyright (C) 2015-2019 Google, Inc. -// Modifications Copyright (C) 2020 Advanced Micro Devices, Inc. All rights reserved. -// -// 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. -// - -// -// Do not edit the .y file, only edit the .m4 file. -// The .y bison file is not a source file, it is a derivative of the .m4 file. -// The m4 file needs to be processed by m4 to generate the .y bison file. -// -// Code sandwiched between a pair: -// -// GLSLANG_WEB_EXCLUDE_ON -// ... -// ... -// ... -// GLSLANG_WEB_EXCLUDE_OFF -// -// Will be excluded from the grammar when m4 is executed as: -// -// m4 -P -DGLSLANG_WEB -// -// It will be included when m4 is executed as: -// -// m4 -P -// - -m4_define(`GLSLANG_WEB_EXCLUDE_ON', `m4_ifdef(`GLSLANG_WEB', `m4_divert(`-1')')') -m4_define(`GLSLANG_WEB_EXCLUDE_OFF', `m4_ifdef(`GLSLANG_WEB', `m4_divert')') - -/** - * This is bison grammar and productions for parsing all versions of the - * GLSL shading languages. - */ -%{ - -/* Based on: -ANSI C Yacc grammar - -In 1985, Jeff Lee published his Yacc grammar (which is accompanied by a -matching Lex specification) for the April 30, 1985 draft version of the -ANSI C standard. Tom Stockfisch reposted it to net.sources in 1987; that -original, as mentioned in the answer to question 17.25 of the comp.lang.c -FAQ, can be ftp'ed from ftp.uu.net, file usenet/net.sources/ansi.c.grammar.Z. - -I intend to keep this version as close to the current C Standard grammar as -possible; please let me know if you discover discrepancies. - -Jutta Degener, 1995 -*/ - -#include "SymbolTable.h" -#include "ParseHelper.h" -#include "../Public/ShaderLang.h" -#include "attribute.h" - -using namespace glslang; - -%} - -%define parse.error verbose - -%union { - struct { - glslang::TSourceLoc loc; - union { - glslang::TString *string; - int i; - unsigned int u; - long long i64; - unsigned long long u64; - bool b; - double d; - }; - glslang::TSymbol* symbol; - } lex; - struct { - glslang::TSourceLoc loc; - glslang::TOperator op; - union { - TIntermNode* intermNode; - glslang::TIntermNodePair nodePair; - glslang::TIntermTyped* intermTypedNode; - glslang::TAttributes* attributes; - glslang::TSpirvRequirement* spirvReq; - glslang::TSpirvInstruction* spirvInst; - glslang::TSpirvTypeParameters* spirvTypeParams; - }; - union { - glslang::TPublicType type; - glslang::TFunction* function; - glslang::TParameter param; - glslang::TTypeLoc typeLine; - glslang::TTypeList* typeList; - glslang::TArraySizes* arraySizes; - glslang::TIdentifierList* identifierList; - }; - glslang::TArraySizes* typeParameters; - } interm; -} - -%{ - -/* windows only pragma */ -#ifdef _MSC_VER - #pragma warning(disable : 4065) - #pragma warning(disable : 4127) - #pragma warning(disable : 4244) -#endif - -#define parseContext (*pParseContext) -#define yyerror(context, msg) context->parserError(msg) - -extern int yylex(YYSTYPE*, TParseContext&); - -%} - -%parse-param {glslang::TParseContext* pParseContext} -%lex-param {parseContext} -%pure-parser // enable thread safety -%expect 1 // One shift reduce conflict because of if | else - -%token CONST BOOL INT UINT FLOAT -%token BVEC2 BVEC3 BVEC4 -%token IVEC2 IVEC3 IVEC4 -%token UVEC2 UVEC3 UVEC4 -%token VEC2 VEC3 VEC4 -%token MAT2 MAT3 MAT4 -%token MAT2X2 MAT2X3 MAT2X4 -%token MAT3X2 MAT3X3 MAT3X4 -%token MAT4X2 MAT4X3 MAT4X4 - -// combined image/sampler -%token SAMPLER2D SAMPLER3D SAMPLERCUBE SAMPLER2DSHADOW -%token SAMPLERCUBESHADOW SAMPLER2DARRAY -%token SAMPLER2DARRAYSHADOW ISAMPLER2D ISAMPLER3D ISAMPLERCUBE -%token ISAMPLER2DARRAY USAMPLER2D USAMPLER3D -%token USAMPLERCUBE USAMPLER2DARRAY - -// separate image/sampler -%token SAMPLER SAMPLERSHADOW -%token TEXTURE2D TEXTURE3D TEXTURECUBE TEXTURE2DARRAY -%token ITEXTURE2D ITEXTURE3D ITEXTURECUBE ITEXTURE2DARRAY -%token UTEXTURE2D UTEXTURE3D UTEXTURECUBE UTEXTURE2DARRAY - -GLSLANG_WEB_EXCLUDE_ON - -%token ATTRIBUTE VARYING -%token FLOAT16_T FLOAT32_T DOUBLE FLOAT64_T -%token INT64_T UINT64_T INT32_T UINT32_T INT16_T UINT16_T INT8_T UINT8_T -%token I64VEC2 I64VEC3 I64VEC4 -%token U64VEC2 U64VEC3 U64VEC4 -%token I32VEC2 I32VEC3 I32VEC4 -%token U32VEC2 U32VEC3 U32VEC4 -%token I16VEC2 I16VEC3 I16VEC4 -%token U16VEC2 U16VEC3 U16VEC4 -%token I8VEC2 I8VEC3 I8VEC4 -%token U8VEC2 U8VEC3 U8VEC4 -%token DVEC2 DVEC3 DVEC4 DMAT2 DMAT3 DMAT4 -%token F16VEC2 F16VEC3 F16VEC4 F16MAT2 F16MAT3 F16MAT4 -%token F32VEC2 F32VEC3 F32VEC4 F32MAT2 F32MAT3 F32MAT4 -%token F64VEC2 F64VEC3 F64VEC4 F64MAT2 F64MAT3 F64MAT4 -%token DMAT2X2 DMAT2X3 DMAT2X4 -%token DMAT3X2 DMAT3X3 DMAT3X4 -%token DMAT4X2 DMAT4X3 DMAT4X4 -%token F16MAT2X2 F16MAT2X3 F16MAT2X4 -%token F16MAT3X2 F16MAT3X3 F16MAT3X4 -%token F16MAT4X2 F16MAT4X3 F16MAT4X4 -%token F32MAT2X2 F32MAT2X3 F32MAT2X4 -%token F32MAT3X2 F32MAT3X3 F32MAT3X4 -%token F32MAT4X2 F32MAT4X3 F32MAT4X4 -%token F64MAT2X2 F64MAT2X3 F64MAT2X4 -%token F64MAT3X2 F64MAT3X3 F64MAT3X4 -%token F64MAT4X2 F64MAT4X3 F64MAT4X4 -%token ATOMIC_UINT -%token ACCSTRUCTNV -%token ACCSTRUCTEXT -%token RAYQUERYEXT -%token FCOOPMATNV ICOOPMATNV UCOOPMATNV - -// combined image/sampler -%token SAMPLERCUBEARRAY SAMPLERCUBEARRAYSHADOW -%token ISAMPLERCUBEARRAY USAMPLERCUBEARRAY -%token SAMPLER1D SAMPLER1DARRAY SAMPLER1DARRAYSHADOW ISAMPLER1D SAMPLER1DSHADOW -%token SAMPLER2DRECT SAMPLER2DRECTSHADOW ISAMPLER2DRECT USAMPLER2DRECT -%token SAMPLERBUFFER ISAMPLERBUFFER USAMPLERBUFFER -%token SAMPLER2DMS ISAMPLER2DMS USAMPLER2DMS -%token SAMPLER2DMSARRAY ISAMPLER2DMSARRAY USAMPLER2DMSARRAY -%token SAMPLEREXTERNALOES -%token SAMPLEREXTERNAL2DY2YEXT -%token ISAMPLER1DARRAY USAMPLER1D USAMPLER1DARRAY -%token F16SAMPLER1D F16SAMPLER2D F16SAMPLER3D F16SAMPLER2DRECT F16SAMPLERCUBE -%token F16SAMPLER1DARRAY F16SAMPLER2DARRAY F16SAMPLERCUBEARRAY -%token F16SAMPLERBUFFER F16SAMPLER2DMS F16SAMPLER2DMSARRAY -%token F16SAMPLER1DSHADOW F16SAMPLER2DSHADOW F16SAMPLER1DARRAYSHADOW F16SAMPLER2DARRAYSHADOW -%token F16SAMPLER2DRECTSHADOW F16SAMPLERCUBESHADOW F16SAMPLERCUBEARRAYSHADOW - -// images -%token IMAGE1D IIMAGE1D UIMAGE1D IMAGE2D IIMAGE2D -%token UIMAGE2D IMAGE3D IIMAGE3D UIMAGE3D -%token IMAGE2DRECT IIMAGE2DRECT UIMAGE2DRECT -%token IMAGECUBE IIMAGECUBE UIMAGECUBE -%token IMAGEBUFFER IIMAGEBUFFER UIMAGEBUFFER -%token IMAGE1DARRAY IIMAGE1DARRAY UIMAGE1DARRAY -%token IMAGE2DARRAY IIMAGE2DARRAY UIMAGE2DARRAY -%token IMAGECUBEARRAY IIMAGECUBEARRAY UIMAGECUBEARRAY -%token IMAGE2DMS IIMAGE2DMS UIMAGE2DMS -%token IMAGE2DMSARRAY IIMAGE2DMSARRAY UIMAGE2DMSARRAY - -%token F16IMAGE1D F16IMAGE2D F16IMAGE3D F16IMAGE2DRECT -%token F16IMAGECUBE F16IMAGE1DARRAY F16IMAGE2DARRAY F16IMAGECUBEARRAY -%token F16IMAGEBUFFER F16IMAGE2DMS F16IMAGE2DMSARRAY - -%token I64IMAGE1D U64IMAGE1D -%token I64IMAGE2D U64IMAGE2D -%token I64IMAGE3D U64IMAGE3D -%token I64IMAGE2DRECT U64IMAGE2DRECT -%token I64IMAGECUBE U64IMAGECUBE -%token I64IMAGEBUFFER U64IMAGEBUFFER -%token I64IMAGE1DARRAY U64IMAGE1DARRAY -%token I64IMAGE2DARRAY U64IMAGE2DARRAY -%token I64IMAGECUBEARRAY U64IMAGECUBEARRAY -%token I64IMAGE2DMS U64IMAGE2DMS -%token I64IMAGE2DMSARRAY U64IMAGE2DMSARRAY - -// texture without sampler -%token TEXTURECUBEARRAY ITEXTURECUBEARRAY UTEXTURECUBEARRAY -%token TEXTURE1D ITEXTURE1D UTEXTURE1D -%token TEXTURE1DARRAY ITEXTURE1DARRAY UTEXTURE1DARRAY -%token TEXTURE2DRECT ITEXTURE2DRECT UTEXTURE2DRECT -%token TEXTUREBUFFER ITEXTUREBUFFER UTEXTUREBUFFER -%token TEXTURE2DMS ITEXTURE2DMS UTEXTURE2DMS -%token TEXTURE2DMSARRAY ITEXTURE2DMSARRAY UTEXTURE2DMSARRAY - -%token F16TEXTURE1D F16TEXTURE2D F16TEXTURE3D F16TEXTURE2DRECT F16TEXTURECUBE -%token F16TEXTURE1DARRAY F16TEXTURE2DARRAY F16TEXTURECUBEARRAY -%token F16TEXTUREBUFFER F16TEXTURE2DMS F16TEXTURE2DMSARRAY - -// input attachments -%token SUBPASSINPUT SUBPASSINPUTMS ISUBPASSINPUT ISUBPASSINPUTMS USUBPASSINPUT USUBPASSINPUTMS -%token F16SUBPASSINPUT F16SUBPASSINPUTMS - -// spirv intrinsics -%token SPIRV_INSTRUCTION SPIRV_EXECUTION_MODE SPIRV_EXECUTION_MODE_ID -%token SPIRV_DECORATE SPIRV_DECORATE_ID SPIRV_DECORATE_STRING -%token SPIRV_TYPE SPIRV_STORAGE_CLASS SPIRV_BY_REFERENCE SPIRV_LITERAL - -GLSLANG_WEB_EXCLUDE_OFF - -%token LEFT_OP RIGHT_OP -%token INC_OP DEC_OP LE_OP GE_OP EQ_OP NE_OP -%token AND_OP OR_OP XOR_OP MUL_ASSIGN DIV_ASSIGN ADD_ASSIGN -%token MOD_ASSIGN LEFT_ASSIGN RIGHT_ASSIGN AND_ASSIGN XOR_ASSIGN OR_ASSIGN -%token SUB_ASSIGN -%token STRING_LITERAL - -%token LEFT_PAREN RIGHT_PAREN LEFT_BRACKET RIGHT_BRACKET LEFT_BRACE RIGHT_BRACE DOT -%token COMMA COLON EQUAL SEMICOLON BANG DASH TILDE PLUS STAR SLASH PERCENT -%token LEFT_ANGLE RIGHT_ANGLE VERTICAL_BAR CARET AMPERSAND QUESTION - -%token INVARIANT -%token HIGH_PRECISION MEDIUM_PRECISION LOW_PRECISION PRECISION -%token PACKED RESOURCE SUPERP - -%token FLOATCONSTANT INTCONSTANT UINTCONSTANT BOOLCONSTANT -%token IDENTIFIER TYPE_NAME -%token CENTROID IN OUT INOUT -%token STRUCT VOID WHILE -%token BREAK CONTINUE DO ELSE FOR IF DISCARD RETURN SWITCH CASE DEFAULT -%token TERMINATE_INVOCATION -%token TERMINATE_RAY IGNORE_INTERSECTION -%token UNIFORM SHARED BUFFER -%token FLAT SMOOTH LAYOUT - -GLSLANG_WEB_EXCLUDE_ON -%token DOUBLECONSTANT INT16CONSTANT UINT16CONSTANT FLOAT16CONSTANT INT32CONSTANT UINT32CONSTANT -%token INT64CONSTANT UINT64CONSTANT -%token SUBROUTINE DEMOTE -%token PAYLOADNV PAYLOADINNV HITATTRNV CALLDATANV CALLDATAINNV -%token PAYLOADEXT PAYLOADINEXT HITATTREXT CALLDATAEXT CALLDATAINEXT -%token PATCH SAMPLE NONUNIFORM -%token COHERENT VOLATILE RESTRICT READONLY WRITEONLY DEVICECOHERENT QUEUEFAMILYCOHERENT WORKGROUPCOHERENT -%token SUBGROUPCOHERENT NONPRIVATE SHADERCALLCOHERENT -%token NOPERSPECTIVE EXPLICITINTERPAMD PERVERTEXNV PERPRIMITIVENV PERVIEWNV PERTASKNV -%token PRECISE -GLSLANG_WEB_EXCLUDE_OFF - -%type assignment_operator unary_operator -%type variable_identifier primary_expression postfix_expression -%type expression integer_expression assignment_expression -%type unary_expression multiplicative_expression additive_expression -%type relational_expression equality_expression -%type conditional_expression constant_expression -%type logical_or_expression logical_xor_expression logical_and_expression -%type shift_expression and_expression exclusive_or_expression inclusive_or_expression -%type function_call initializer condition conditionopt - -%type translation_unit function_definition -%type statement simple_statement -%type statement_list switch_statement_list compound_statement -%type declaration_statement selection_statement selection_statement_nonattributed expression_statement -%type switch_statement switch_statement_nonattributed case_label -%type declaration external_declaration -%type for_init_statement compound_statement_no_new_scope -%type selection_rest_statement for_rest_statement -%type iteration_statement iteration_statement_nonattributed jump_statement statement_no_new_scope statement_scoped -%type single_declaration init_declarator_list - -%type parameter_declaration parameter_declarator parameter_type_specifier - -%type array_specifier -%type invariant_qualifier interpolation_qualifier storage_qualifier precision_qualifier -%type layout_qualifier layout_qualifier_id_list layout_qualifier_id - -%type type_parameter_specifier -%type type_parameter_specifier_opt -%type type_parameter_specifier_list - -%type type_qualifier fully_specified_type type_specifier -%type single_type_qualifier -%type type_specifier_nonarray -%type struct_specifier -%type struct_declarator -%type struct_declarator_list struct_declaration struct_declaration_list -%type block_structure -%type function_header function_declarator -%type function_header_with_parameters -%type function_call_header_with_parameters function_call_header_no_parameters function_call_generic function_prototype -%type function_call_or_method function_identifier function_call_header - -%type identifier_list - -GLSLANG_WEB_EXCLUDE_ON -%type precise_qualifier non_uniform_qualifier -%type type_name_list -%type attribute attribute_list single_attribute -%type demote_statement -%type initializer_list -%type spirv_requirements_list spirv_requirements_parameter -%type spirv_extension_list spirv_capability_list -%type spirv_execution_mode_qualifier -%type spirv_execution_mode_parameter_list spirv_execution_mode_parameter spirv_execution_mode_id_parameter_list -%type spirv_storage_class_qualifier -%type spirv_decorate_qualifier -%type spirv_decorate_parameter_list spirv_decorate_parameter -%type spirv_decorate_id_parameter_list -%type spirv_decorate_string_parameter_list -%type spirv_type_specifier -%type spirv_type_parameter_list spirv_type_parameter -%type spirv_instruction_qualifier -%type spirv_instruction_qualifier_list spirv_instruction_qualifier_id -GLSLANG_WEB_EXCLUDE_OFF - -%start translation_unit -%% - -variable_identifier - : IDENTIFIER { - $$ = parseContext.handleVariable($1.loc, $1.symbol, $1.string); - } - ; - -primary_expression - : variable_identifier { - $$ = $1; - } - | LEFT_PAREN expression RIGHT_PAREN { - $$ = $2; - if ($$->getAsConstantUnion()) - $$->getAsConstantUnion()->setExpression(); - } - | FLOATCONSTANT { - $$ = parseContext.intermediate.addConstantUnion($1.d, EbtFloat, $1.loc, true); - } - | INTCONSTANT { - $$ = parseContext.intermediate.addConstantUnion($1.i, $1.loc, true); - } - | UINTCONSTANT { - parseContext.fullIntegerCheck($1.loc, "unsigned literal"); - $$ = parseContext.intermediate.addConstantUnion($1.u, $1.loc, true); - } - | BOOLCONSTANT { - $$ = parseContext.intermediate.addConstantUnion($1.b, $1.loc, true); - } -GLSLANG_WEB_EXCLUDE_ON - | 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); - } - | UINT32CONSTANT { - parseContext.explicitInt32Check($1.loc, "32-bit signed literal"); - $$ = parseContext.intermediate.addConstantUnion($1.u, $1.loc, true); - } - | INT64CONSTANT { - parseContext.int64Check($1.loc, "64-bit integer literal"); - $$ = parseContext.intermediate.addConstantUnion($1.i64, $1.loc, true); - } - | UINT64CONSTANT { - parseContext.int64Check($1.loc, "64-bit unsigned integer literal"); - $$ = parseContext.intermediate.addConstantUnion($1.u64, $1.loc, true); - } - | INT16CONSTANT { - parseContext.explicitInt16Check($1.loc, "16-bit integer literal"); - $$ = parseContext.intermediate.addConstantUnion((short)$1.i, $1.loc, true); - } - | UINT16CONSTANT { - parseContext.explicitInt16Check($1.loc, "16-bit unsigned integer literal"); - $$ = parseContext.intermediate.addConstantUnion((unsigned short)$1.u, $1.loc, true); - } - | DOUBLECONSTANT { - parseContext.requireProfile($1.loc, ECoreProfile | ECompatibilityProfile, "double literal"); - if (! parseContext.symbolTable.atBuiltInLevel()) - parseContext.doubleCheck($1.loc, "double literal"); - $$ = parseContext.intermediate.addConstantUnion($1.d, EbtDouble, $1.loc, true); - } - | FLOAT16CONSTANT { - parseContext.float16Check($1.loc, "half float literal"); - $$ = parseContext.intermediate.addConstantUnion($1.d, EbtFloat16, $1.loc, true); - } -GLSLANG_WEB_EXCLUDE_OFF - ; - -postfix_expression - : primary_expression { - $$ = $1; - } - | postfix_expression LEFT_BRACKET integer_expression RIGHT_BRACKET { - $$ = parseContext.handleBracketDereference($2.loc, $1, $3); - } - | function_call { - $$ = $1; - } - | postfix_expression DOT IDENTIFIER { - $$ = parseContext.handleDotDereference($3.loc, $1, *$3.string); - } - | postfix_expression INC_OP { - parseContext.variableCheck($1); - parseContext.lValueErrorCheck($2.loc, "++", $1); - $$ = parseContext.handleUnaryMath($2.loc, "++", EOpPostIncrement, $1); - } - | postfix_expression DEC_OP { - parseContext.variableCheck($1); - parseContext.lValueErrorCheck($2.loc, "--", $1); - $$ = parseContext.handleUnaryMath($2.loc, "--", EOpPostDecrement, $1); - } - ; - -integer_expression - : expression { - parseContext.integerCheck($1, "[]"); - $$ = $1; - } - ; - -function_call - : function_call_or_method { - $$ = parseContext.handleFunctionCall($1.loc, $1.function, $1.intermNode); - delete $1.function; - } - ; - -function_call_or_method - : function_call_generic { - $$ = $1; - } - ; - -function_call_generic - : function_call_header_with_parameters RIGHT_PAREN { - $$ = $1; - $$.loc = $2.loc; - } - | function_call_header_no_parameters RIGHT_PAREN { - $$ = $1; - $$.loc = $2.loc; - } - ; - -function_call_header_no_parameters - : function_call_header VOID { - $$ = $1; - } - | function_call_header { - $$ = $1; - } - ; - -function_call_header_with_parameters - : function_call_header assignment_expression { - TParameter param = { 0, new TType }; - param.type->shallowCopy($2->getType()); - $1.function->addParameter(param); - $$.function = $1.function; - $$.intermNode = $2; - } - | function_call_header_with_parameters COMMA assignment_expression { - TParameter param = { 0, new TType }; - param.type->shallowCopy($3->getType()); - $1.function->addParameter(param); - $$.function = $1.function; - $$.intermNode = parseContext.intermediate.growAggregate($1.intermNode, $3, $2.loc); - } - ; - -function_call_header - : function_identifier LEFT_PAREN { - $$ = $1; - } - ; - -// Grammar Note: Constructors look like functions, but are recognized as types. - -function_identifier - : type_specifier { - // Constructor - $$.intermNode = 0; - $$.function = parseContext.handleConstructorCall($1.loc, $1); - } - | postfix_expression { - // - // Should be a method or subroutine call, but we haven't recognized the arguments yet. - // - $$.function = 0; - $$.intermNode = 0; - - TIntermMethod* method = $1->getAsMethodNode(); - if (method) { - $$.function = new TFunction(&method->getMethodName(), TType(EbtInt), EOpArrayLength); - $$.intermNode = method->getObject(); - } else { - TIntermSymbol* symbol = $1->getAsSymbolNode(); - if (symbol) { - parseContext.reservedErrorCheck(symbol->getLoc(), symbol->getName()); - TFunction *function = new TFunction(&symbol->getName(), TType(EbtVoid)); - $$.function = function; - } else - parseContext.error($1->getLoc(), "function call, method, or subroutine call expected", "", ""); - } - - if ($$.function == 0) { - // error recover - TString* empty = NewPoolTString(""); - $$.function = new TFunction(empty, TType(EbtVoid), EOpNull); - } - } -GLSLANG_WEB_EXCLUDE_ON - | non_uniform_qualifier { - // Constructor - $$.intermNode = 0; - $$.function = parseContext.handleConstructorCall($1.loc, $1); - } -GLSLANG_WEB_EXCLUDE_OFF - ; - -unary_expression - : postfix_expression { - parseContext.variableCheck($1); - $$ = $1; - if (TIntermMethod* method = $1->getAsMethodNode()) - parseContext.error($1->getLoc(), "incomplete method syntax", method->getMethodName().c_str(), ""); - } - | INC_OP unary_expression { - parseContext.lValueErrorCheck($1.loc, "++", $2); - $$ = parseContext.handleUnaryMath($1.loc, "++", EOpPreIncrement, $2); - } - | DEC_OP unary_expression { - parseContext.lValueErrorCheck($1.loc, "--", $2); - $$ = parseContext.handleUnaryMath($1.loc, "--", EOpPreDecrement, $2); - } - | unary_operator unary_expression { - if ($1.op != EOpNull) { - char errorOp[2] = {0, 0}; - switch($1.op) { - case EOpNegative: errorOp[0] = '-'; break; - case EOpLogicalNot: errorOp[0] = '!'; break; - case EOpBitwiseNot: errorOp[0] = '~'; break; - default: break; // some compilers want this - } - $$ = parseContext.handleUnaryMath($1.loc, errorOp, $1.op, $2); - } else { - $$ = $2; - if ($$->getAsConstantUnion()) - $$->getAsConstantUnion()->setExpression(); - } - } - ; -// Grammar Note: No traditional style type casts. - -unary_operator - : PLUS { $$.loc = $1.loc; $$.op = EOpNull; } - | DASH { $$.loc = $1.loc; $$.op = EOpNegative; } - | BANG { $$.loc = $1.loc; $$.op = EOpLogicalNot; } - | TILDE { $$.loc = $1.loc; $$.op = EOpBitwiseNot; - parseContext.fullIntegerCheck($1.loc, "bitwise not"); } - ; -// Grammar Note: No '*' or '&' unary ops. Pointers are not supported. - -multiplicative_expression - : unary_expression { $$ = $1; } - | multiplicative_expression STAR unary_expression { - $$ = parseContext.handleBinaryMath($2.loc, "*", EOpMul, $1, $3); - if ($$ == 0) - $$ = $1; - } - | multiplicative_expression SLASH unary_expression { - $$ = parseContext.handleBinaryMath($2.loc, "/", EOpDiv, $1, $3); - if ($$ == 0) - $$ = $1; - } - | multiplicative_expression PERCENT unary_expression { - parseContext.fullIntegerCheck($2.loc, "%"); - $$ = parseContext.handleBinaryMath($2.loc, "%", EOpMod, $1, $3); - if ($$ == 0) - $$ = $1; - } - ; - -additive_expression - : multiplicative_expression { $$ = $1; } - | additive_expression PLUS multiplicative_expression { - $$ = parseContext.handleBinaryMath($2.loc, "+", EOpAdd, $1, $3); - if ($$ == 0) - $$ = $1; - } - | additive_expression DASH multiplicative_expression { - $$ = parseContext.handleBinaryMath($2.loc, "-", EOpSub, $1, $3); - if ($$ == 0) - $$ = $1; - } - ; - -shift_expression - : additive_expression { $$ = $1; } - | shift_expression LEFT_OP additive_expression { - parseContext.fullIntegerCheck($2.loc, "bit shift left"); - $$ = parseContext.handleBinaryMath($2.loc, "<<", EOpLeftShift, $1, $3); - if ($$ == 0) - $$ = $1; - } - | shift_expression RIGHT_OP additive_expression { - parseContext.fullIntegerCheck($2.loc, "bit shift right"); - $$ = parseContext.handleBinaryMath($2.loc, ">>", EOpRightShift, $1, $3); - if ($$ == 0) - $$ = $1; - } - ; - -relational_expression - : shift_expression { $$ = $1; } - | relational_expression LEFT_ANGLE shift_expression { - $$ = parseContext.handleBinaryMath($2.loc, "<", EOpLessThan, $1, $3); - if ($$ == 0) - $$ = parseContext.intermediate.addConstantUnion(false, $2.loc); - } - | relational_expression RIGHT_ANGLE shift_expression { - $$ = parseContext.handleBinaryMath($2.loc, ">", EOpGreaterThan, $1, $3); - if ($$ == 0) - $$ = parseContext.intermediate.addConstantUnion(false, $2.loc); - } - | relational_expression LE_OP shift_expression { - $$ = parseContext.handleBinaryMath($2.loc, "<=", EOpLessThanEqual, $1, $3); - if ($$ == 0) - $$ = parseContext.intermediate.addConstantUnion(false, $2.loc); - } - | relational_expression GE_OP shift_expression { - $$ = parseContext.handleBinaryMath($2.loc, ">=", EOpGreaterThanEqual, $1, $3); - if ($$ == 0) - $$ = parseContext.intermediate.addConstantUnion(false, $2.loc); - } - ; - -equality_expression - : relational_expression { $$ = $1; } - | equality_expression EQ_OP relational_expression { - parseContext.arrayObjectCheck($2.loc, $1->getType(), "array comparison"); - parseContext.opaqueCheck($2.loc, $1->getType(), "=="); - parseContext.specializationCheck($2.loc, $1->getType(), "=="); - parseContext.referenceCheck($2.loc, $1->getType(), "=="); - $$ = parseContext.handleBinaryMath($2.loc, "==", EOpEqual, $1, $3); - if ($$ == 0) - $$ = parseContext.intermediate.addConstantUnion(false, $2.loc); - } - | equality_expression NE_OP relational_expression { - parseContext.arrayObjectCheck($2.loc, $1->getType(), "array comparison"); - parseContext.opaqueCheck($2.loc, $1->getType(), "!="); - parseContext.specializationCheck($2.loc, $1->getType(), "!="); - parseContext.referenceCheck($2.loc, $1->getType(), "!="); - $$ = parseContext.handleBinaryMath($2.loc, "!=", EOpNotEqual, $1, $3); - if ($$ == 0) - $$ = parseContext.intermediate.addConstantUnion(false, $2.loc); - } - ; - -and_expression - : equality_expression { $$ = $1; } - | and_expression AMPERSAND equality_expression { - parseContext.fullIntegerCheck($2.loc, "bitwise and"); - $$ = parseContext.handleBinaryMath($2.loc, "&", EOpAnd, $1, $3); - if ($$ == 0) - $$ = $1; - } - ; - -exclusive_or_expression - : and_expression { $$ = $1; } - | exclusive_or_expression CARET and_expression { - parseContext.fullIntegerCheck($2.loc, "bitwise exclusive or"); - $$ = parseContext.handleBinaryMath($2.loc, "^", EOpExclusiveOr, $1, $3); - if ($$ == 0) - $$ = $1; - } - ; - -inclusive_or_expression - : exclusive_or_expression { $$ = $1; } - | inclusive_or_expression VERTICAL_BAR exclusive_or_expression { - parseContext.fullIntegerCheck($2.loc, "bitwise inclusive or"); - $$ = parseContext.handleBinaryMath($2.loc, "|", EOpInclusiveOr, $1, $3); - if ($$ == 0) - $$ = $1; - } - ; - -logical_and_expression - : inclusive_or_expression { $$ = $1; } - | logical_and_expression AND_OP inclusive_or_expression { - $$ = parseContext.handleBinaryMath($2.loc, "&&", EOpLogicalAnd, $1, $3); - if ($$ == 0) - $$ = parseContext.intermediate.addConstantUnion(false, $2.loc); - } - ; - -logical_xor_expression - : logical_and_expression { $$ = $1; } - | logical_xor_expression XOR_OP logical_and_expression { - $$ = parseContext.handleBinaryMath($2.loc, "^^", EOpLogicalXor, $1, $3); - if ($$ == 0) - $$ = parseContext.intermediate.addConstantUnion(false, $2.loc); - } - ; - -logical_or_expression - : logical_xor_expression { $$ = $1; } - | logical_or_expression OR_OP logical_xor_expression { - $$ = parseContext.handleBinaryMath($2.loc, "||", EOpLogicalOr, $1, $3); - if ($$ == 0) - $$ = parseContext.intermediate.addConstantUnion(false, $2.loc); - } - ; - -conditional_expression - : logical_or_expression { $$ = $1; } - | logical_or_expression QUESTION { - ++parseContext.controlFlowNestingLevel; - } - expression COLON assignment_expression { - --parseContext.controlFlowNestingLevel; - parseContext.boolCheck($2.loc, $1); - parseContext.rValueErrorCheck($2.loc, "?", $1); - parseContext.rValueErrorCheck($5.loc, ":", $4); - parseContext.rValueErrorCheck($5.loc, ":", $6); - $$ = parseContext.intermediate.addSelection($1, $4, $6, $2.loc); - if ($$ == 0) { - parseContext.binaryOpError($2.loc, ":", $4->getCompleteString(), $6->getCompleteString()); - $$ = $6; - } - } - ; - -assignment_expression - : conditional_expression { $$ = $1; } - | unary_expression assignment_operator assignment_expression { - parseContext.arrayObjectCheck($2.loc, $1->getType(), "array assignment"); - parseContext.opaqueCheck($2.loc, $1->getType(), "="); - parseContext.storage16BitAssignmentCheck($2.loc, $1->getType(), "="); - parseContext.specializationCheck($2.loc, $1->getType(), "="); - parseContext.lValueErrorCheck($2.loc, "assign", $1); - parseContext.rValueErrorCheck($2.loc, "assign", $3); - $$ = parseContext.addAssign($2.loc, $2.op, $1, $3); - if ($$ == 0) { - parseContext.assignError($2.loc, "assign", $1->getCompleteString(), $3->getCompleteString()); - $$ = $1; - } - } - ; - -assignment_operator - : EQUAL { - $$.loc = $1.loc; - $$.op = EOpAssign; - } - | MUL_ASSIGN { - $$.loc = $1.loc; - $$.op = EOpMulAssign; - } - | DIV_ASSIGN { - $$.loc = $1.loc; - $$.op = EOpDivAssign; - } - | MOD_ASSIGN { - parseContext.fullIntegerCheck($1.loc, "%="); - $$.loc = $1.loc; - $$.op = EOpModAssign; - } - | ADD_ASSIGN { - $$.loc = $1.loc; - $$.op = EOpAddAssign; - } - | SUB_ASSIGN { - $$.loc = $1.loc; - $$.op = EOpSubAssign; - } - | LEFT_ASSIGN { - parseContext.fullIntegerCheck($1.loc, "bit-shift left assign"); - $$.loc = $1.loc; $$.op = EOpLeftShiftAssign; - } - | RIGHT_ASSIGN { - parseContext.fullIntegerCheck($1.loc, "bit-shift right assign"); - $$.loc = $1.loc; $$.op = EOpRightShiftAssign; - } - | AND_ASSIGN { - parseContext.fullIntegerCheck($1.loc, "bitwise-and assign"); - $$.loc = $1.loc; $$.op = EOpAndAssign; - } - | XOR_ASSIGN { - parseContext.fullIntegerCheck($1.loc, "bitwise-xor assign"); - $$.loc = $1.loc; $$.op = EOpExclusiveOrAssign; - } - | OR_ASSIGN { - parseContext.fullIntegerCheck($1.loc, "bitwise-or assign"); - $$.loc = $1.loc; $$.op = EOpInclusiveOrAssign; - } - ; - -expression - : assignment_expression { - $$ = $1; - } - | expression COMMA assignment_expression { - parseContext.samplerConstructorLocationCheck($2.loc, ",", $3); - $$ = parseContext.intermediate.addComma($1, $3, $2.loc); - if ($$ == 0) { - parseContext.binaryOpError($2.loc, ",", $1->getCompleteString(), $3->getCompleteString()); - $$ = $3; - } - } - ; - -constant_expression - : conditional_expression { - parseContext.constantValueCheck($1, ""); - $$ = $1; - } - ; - -declaration - : function_prototype SEMICOLON { - parseContext.handleFunctionDeclarator($1.loc, *$1.function, true /* prototype */); - $$ = 0; - // TODO: 4.0 functionality: subroutines: make the identifier a user type for this signature - } -GLSLANG_WEB_EXCLUDE_ON - | spirv_instruction_qualifier function_prototype SEMICOLON { - parseContext.requireExtensions($2.loc, 1, &E_GL_EXT_spirv_intrinsics, "SPIR-V instruction qualifier"); - $2.function->setSpirvInstruction(*$1); // Attach SPIR-V intruction qualifier - parseContext.handleFunctionDeclarator($2.loc, *$2.function, true /* prototype */); - $$ = 0; - // TODO: 4.0 functionality: subroutines: make the identifier a user type for this signature - } - | spirv_execution_mode_qualifier SEMICOLON { - parseContext.globalCheck($2.loc, "SPIR-V execution mode qualifier"); - parseContext.requireExtensions($2.loc, 1, &E_GL_EXT_spirv_intrinsics, "SPIR-V execution mode qualifier"); - $$ = 0; - } -GLSLANG_WEB_EXCLUDE_OFF - | init_declarator_list SEMICOLON { - if ($1.intermNode && $1.intermNode->getAsAggregate()) - $1.intermNode->getAsAggregate()->setOperator(EOpSequence); - $$ = $1.intermNode; - } - | PRECISION precision_qualifier type_specifier SEMICOLON { - parseContext.profileRequires($1.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 - parseContext.symbolTable.setPreviousDefaultPrecisions(&parseContext.defaultPrecision[0]); - parseContext.setDefaultPrecision($1.loc, $3, $2.qualifier.precision); - $$ = 0; - } - | block_structure SEMICOLON { - parseContext.declareBlock($1.loc, *$1.typeList); - $$ = 0; - } - | block_structure IDENTIFIER SEMICOLON { - parseContext.declareBlock($1.loc, *$1.typeList, $2.string); - $$ = 0; - } - | block_structure IDENTIFIER array_specifier SEMICOLON { - parseContext.declareBlock($1.loc, *$1.typeList, $2.string, $3.arraySizes); - $$ = 0; - } - | type_qualifier SEMICOLON { - parseContext.globalQualifierFixCheck($1.loc, $1.qualifier); - parseContext.updateStandaloneQualifierDefaults($1.loc, $1); - $$ = 0; - } - | type_qualifier IDENTIFIER SEMICOLON { - parseContext.checkNoShaderLayouts($1.loc, $1.shaderQualifiers); - parseContext.addQualifierToExisting($1.loc, $1.qualifier, *$2.string); - $$ = 0; - } - | type_qualifier IDENTIFIER identifier_list SEMICOLON { - parseContext.checkNoShaderLayouts($1.loc, $1.shaderQualifiers); - $3->push_back($2.string); - parseContext.addQualifierToExisting($1.loc, $1.qualifier, *$3); - $$ = 0; - } - ; - -block_structure - : type_qualifier IDENTIFIER LEFT_BRACE { parseContext.nestedBlockCheck($1.loc); } struct_declaration_list RIGHT_BRACE { - --parseContext.blockNestingLevel; - parseContext.blockName = $2.string; - parseContext.globalQualifierFixCheck($1.loc, $1.qualifier); - parseContext.checkNoShaderLayouts($1.loc, $1.shaderQualifiers); - parseContext.currentBlockQualifier = $1.qualifier; - $$.loc = $1.loc; - $$.typeList = $5; - } - -identifier_list - : COMMA IDENTIFIER { - $$ = new TIdentifierList; - $$->push_back($2.string); - } - | identifier_list COMMA IDENTIFIER { - $$ = $1; - $$->push_back($3.string); - } - ; - -function_prototype - : function_declarator RIGHT_PAREN { - $$.function = $1; - $$.loc = $2.loc; - } - | function_declarator RIGHT_PAREN attribute { - $$.function = $1; - $$.loc = $2.loc; - parseContext.requireExtensions($2.loc, 1, &E_GL_EXT_subgroup_uniform_control_flow, "attribute"); - parseContext.handleFunctionAttributes($2.loc, *$3, $$.function); - } - | attribute function_declarator RIGHT_PAREN { - $$.function = $2; - $$.loc = $3.loc; - parseContext.requireExtensions($3.loc, 1, &E_GL_EXT_subgroup_uniform_control_flow, "attribute"); - parseContext.handleFunctionAttributes($3.loc, *$1, $$.function); - } - | attribute function_declarator RIGHT_PAREN attribute { - $$.function = $2; - $$.loc = $3.loc; - parseContext.requireExtensions($3.loc, 1, &E_GL_EXT_subgroup_uniform_control_flow, "attribute"); - parseContext.handleFunctionAttributes($3.loc, *$1, $$.function); - parseContext.handleFunctionAttributes($3.loc, *$4, $$.function); - } - ; - -function_declarator - : function_header { - $$ = $1; - } - | function_header_with_parameters { - $$ = $1; - } - ; - - -function_header_with_parameters - : function_header parameter_declaration { - // Add the parameter - $$ = $1; - if ($2.param.type->getBasicType() != EbtVoid) - $1->addParameter($2.param); - else - delete $2.param.type; - } - | function_header_with_parameters COMMA parameter_declaration { - // - // Only first parameter of one-parameter functions can be void - // The check for named parameters not being void is done in parameter_declarator - // - if ($3.param.type->getBasicType() == EbtVoid) { - // - // This parameter > first is void - // - parseContext.error($2.loc, "cannot be an argument type except for '(void)'", "void", ""); - delete $3.param.type; - } else { - // Add the parameter - $$ = $1; - $1->addParameter($3.param); - } - } - ; - -function_header - : fully_specified_type IDENTIFIER LEFT_PAREN { - if ($1.qualifier.storage != EvqGlobal && $1.qualifier.storage != EvqTemporary) { - parseContext.error($2.loc, "no qualifiers allowed for function return", - GetStorageQualifierString($1.qualifier.storage), ""); - } - if ($1.arraySizes) - parseContext.arraySizeRequiredCheck($1.loc, *$1.arraySizes); - - // Add the function as a prototype after parsing it (we do not support recursion) - TFunction *function; - TType type($1); - - // Potentially rename shader entry point function. No-op most of the time. - parseContext.renameShaderFunction($2.string); - - // Make the function - function = new TFunction($2.string, type); - $$ = function; - } - ; - -parameter_declarator - // Type + name - : type_specifier IDENTIFIER { - if ($1.arraySizes) { - parseContext.profileRequires($1.loc, ENoProfile, 120, E_GL_3DL_array_objects, "arrayed type"); - parseContext.profileRequires($1.loc, EEsProfile, 300, 0, "arrayed type"); - parseContext.arraySizeRequiredCheck($1.loc, *$1.arraySizes); - } - if ($1.basicType == EbtVoid) { - parseContext.error($2.loc, "illegal use of type 'void'", $2.string->c_str(), ""); - } - parseContext.reservedErrorCheck($2.loc, *$2.string); - - TParameter param = {$2.string, new TType($1)}; - $$.loc = $2.loc; - $$.param = param; - } - | type_specifier IDENTIFIER array_specifier { - if ($1.arraySizes) { - parseContext.profileRequires($1.loc, ENoProfile, 120, E_GL_3DL_array_objects, "arrayed type"); - parseContext.profileRequires($1.loc, EEsProfile, 300, 0, "arrayed type"); - parseContext.arraySizeRequiredCheck($1.loc, *$1.arraySizes); - } - TType* type = new TType($1); - type->transferArraySizes($3.arraySizes); - type->copyArrayInnerSizes($1.arraySizes); - - parseContext.arrayOfArrayVersionCheck($2.loc, type->getArraySizes()); - parseContext.arraySizeRequiredCheck($3.loc, *$3.arraySizes); - parseContext.reservedErrorCheck($2.loc, *$2.string); - - TParameter param = { $2.string, type }; - - $$.loc = $2.loc; - $$.param = param; - } - ; - -parameter_declaration - // - // With name - // - : type_qualifier parameter_declarator { - $$ = $2; - if ($1.qualifier.precision != EpqNone) - $$.param.type->getQualifier().precision = $1.qualifier.precision; - parseContext.precisionQualifierCheck($$.loc, $$.param.type->getBasicType(), $$.param.type->getQualifier()); - - parseContext.checkNoShaderLayouts($1.loc, $1.shaderQualifiers); - parseContext.parameterTypeCheck($2.loc, $1.qualifier.storage, *$$.param.type); - parseContext.paramCheckFix($1.loc, $1.qualifier, *$$.param.type); - - } - | parameter_declarator { - $$ = $1; - - parseContext.parameterTypeCheck($1.loc, EvqIn, *$1.param.type); - parseContext.paramCheckFixStorage($1.loc, EvqTemporary, *$$.param.type); - parseContext.precisionQualifierCheck($$.loc, $$.param.type->getBasicType(), $$.param.type->getQualifier()); - } - // - // Without name - // - | type_qualifier parameter_type_specifier { - $$ = $2; - if ($1.qualifier.precision != EpqNone) - $$.param.type->getQualifier().precision = $1.qualifier.precision; - parseContext.precisionQualifierCheck($1.loc, $$.param.type->getBasicType(), $$.param.type->getQualifier()); - - parseContext.checkNoShaderLayouts($1.loc, $1.shaderQualifiers); - parseContext.parameterTypeCheck($2.loc, $1.qualifier.storage, *$$.param.type); - parseContext.paramCheckFix($1.loc, $1.qualifier, *$$.param.type); - } - | parameter_type_specifier { - $$ = $1; - - parseContext.parameterTypeCheck($1.loc, EvqIn, *$1.param.type); - parseContext.paramCheckFixStorage($1.loc, EvqTemporary, *$$.param.type); - parseContext.precisionQualifierCheck($$.loc, $$.param.type->getBasicType(), $$.param.type->getQualifier()); - } - ; - -parameter_type_specifier - : type_specifier { - TParameter param = { 0, new TType($1) }; - $$.param = param; - if ($1.arraySizes) - parseContext.arraySizeRequiredCheck($1.loc, *$1.arraySizes); - } - ; - -init_declarator_list - : single_declaration { - $$ = $1; - } - | init_declarator_list COMMA IDENTIFIER { - $$ = $1; - parseContext.declareVariable($3.loc, *$3.string, $1.type); - } - | init_declarator_list COMMA IDENTIFIER array_specifier { - $$ = $1; - parseContext.declareVariable($3.loc, *$3.string, $1.type, $4.arraySizes); - } - | init_declarator_list COMMA IDENTIFIER array_specifier EQUAL initializer { - $$.type = $1.type; - TIntermNode* initNode = parseContext.declareVariable($3.loc, *$3.string, $1.type, $4.arraySizes, $6); - $$.intermNode = parseContext.intermediate.growAggregate($1.intermNode, initNode, $5.loc); - } - | init_declarator_list COMMA IDENTIFIER EQUAL initializer { - $$.type = $1.type; - TIntermNode* initNode = parseContext.declareVariable($3.loc, *$3.string, $1.type, 0, $5); - $$.intermNode = parseContext.intermediate.growAggregate($1.intermNode, initNode, $4.loc); - } - ; - -single_declaration - : fully_specified_type { - $$.type = $1; - $$.intermNode = 0; -GLSLANG_WEB_EXCLUDE_ON - parseContext.declareTypeDefaults($$.loc, $$.type); -GLSLANG_WEB_EXCLUDE_OFF - } - | fully_specified_type IDENTIFIER { - $$.type = $1; - $$.intermNode = 0; - parseContext.declareVariable($2.loc, *$2.string, $1); - } - | fully_specified_type IDENTIFIER array_specifier { - $$.type = $1; - $$.intermNode = 0; - parseContext.declareVariable($2.loc, *$2.string, $1, $3.arraySizes); - } - | fully_specified_type IDENTIFIER array_specifier EQUAL initializer { - $$.type = $1; - TIntermNode* initNode = parseContext.declareVariable($2.loc, *$2.string, $1, $3.arraySizes, $5); - $$.intermNode = parseContext.intermediate.growAggregate(0, initNode, $4.loc); - } - | fully_specified_type IDENTIFIER EQUAL initializer { - $$.type = $1; - TIntermNode* initNode = parseContext.declareVariable($2.loc, *$2.string, $1, 0, $4); - $$.intermNode = parseContext.intermediate.growAggregate(0, initNode, $3.loc); - } - -// Grammar Note: No 'enum', or 'typedef'. - -fully_specified_type - : type_specifier { - $$ = $1; - - parseContext.globalQualifierTypeCheck($1.loc, $1.qualifier, $$); - if ($1.arraySizes) { - parseContext.profileRequires($1.loc, ENoProfile, 120, E_GL_3DL_array_objects, "arrayed type"); - parseContext.profileRequires($1.loc, EEsProfile, 300, 0, "arrayed type"); - } - parseContext.precisionQualifierCheck($$.loc, $$.basicType, $$.qualifier); - } - | type_qualifier type_specifier { - parseContext.globalQualifierFixCheck($1.loc, $1.qualifier); - parseContext.globalQualifierTypeCheck($1.loc, $1.qualifier, $2); - - if ($2.arraySizes) { - parseContext.profileRequires($2.loc, ENoProfile, 120, E_GL_3DL_array_objects, "arrayed type"); - parseContext.profileRequires($2.loc, EEsProfile, 300, 0, "arrayed type"); - } - - if ($2.arraySizes && parseContext.arrayQualifierError($2.loc, $1.qualifier)) - $2.arraySizes = nullptr; - - parseContext.checkNoShaderLayouts($2.loc, $1.shaderQualifiers); - $2.shaderQualifiers.merge($1.shaderQualifiers); - parseContext.mergeQualifiers($2.loc, $2.qualifier, $1.qualifier, true); - parseContext.precisionQualifierCheck($2.loc, $2.basicType, $2.qualifier); - - $$ = $2; - - if (! $$.qualifier.isInterpolation() && - ((parseContext.language == EShLangVertex && $$.qualifier.storage == EvqVaryingOut) || - (parseContext.language == EShLangFragment && $$.qualifier.storage == EvqVaryingIn))) - $$.qualifier.smooth = true; - } - ; - -invariant_qualifier - : INVARIANT { - parseContext.globalCheck($1.loc, "invariant"); - parseContext.profileRequires($$.loc, ENoProfile, 120, 0, "invariant"); - $$.init($1.loc); - $$.qualifier.invariant = true; - } - ; - -interpolation_qualifier - : SMOOTH { - parseContext.globalCheck($1.loc, "smooth"); - parseContext.profileRequires($1.loc, ENoProfile, 130, 0, "smooth"); - parseContext.profileRequires($1.loc, EEsProfile, 300, 0, "smooth"); - $$.init($1.loc); - $$.qualifier.smooth = true; - } - | FLAT { - parseContext.globalCheck($1.loc, "flat"); - parseContext.profileRequires($1.loc, ENoProfile, 130, 0, "flat"); - parseContext.profileRequires($1.loc, EEsProfile, 300, 0, "flat"); - $$.init($1.loc); - $$.qualifier.flat = true; - } -GLSLANG_WEB_EXCLUDE_ON - | NOPERSPECTIVE { - parseContext.globalCheck($1.loc, "noperspective"); - parseContext.profileRequires($1.loc, EEsProfile, 0, E_GL_NV_shader_noperspective_interpolation, "noperspective"); - parseContext.profileRequires($1.loc, ENoProfile, 130, 0, "noperspective"); - $$.init($1.loc); - $$.qualifier.nopersp = true; - } - | EXPLICITINTERPAMD { - parseContext.globalCheck($1.loc, "__explicitInterpAMD"); - parseContext.profileRequires($1.loc, ECoreProfile, 450, E_GL_AMD_shader_explicit_vertex_parameter, "explicit interpolation"); - parseContext.profileRequires($1.loc, ECompatibilityProfile, 450, E_GL_AMD_shader_explicit_vertex_parameter, "explicit interpolation"); - $$.init($1.loc); - $$.qualifier.explicitInterp = true; - } - | PERVERTEXNV { - parseContext.globalCheck($1.loc, "pervertexNV"); - parseContext.profileRequires($1.loc, ECoreProfile, 0, E_GL_NV_fragment_shader_barycentric, "fragment shader barycentric"); - parseContext.profileRequires($1.loc, ECompatibilityProfile, 0, E_GL_NV_fragment_shader_barycentric, "fragment shader barycentric"); - parseContext.profileRequires($1.loc, EEsProfile, 0, E_GL_NV_fragment_shader_barycentric, "fragment shader barycentric"); - $$.init($1.loc); - $$.qualifier.pervertexNV = true; - } - | PERPRIMITIVENV { - // No need for profile version or extension check. Shader stage already checks both. - parseContext.globalCheck($1.loc, "perprimitiveNV"); - parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangFragmentMask | EShLangMeshNVMask), "perprimitiveNV"); - // Fragment shader stage doesn't check for extension. So we explicitly add below extension check. - if (parseContext.language == EShLangFragment) - parseContext.requireExtensions($1.loc, 1, &E_GL_NV_mesh_shader, "perprimitiveNV"); - $$.init($1.loc); - $$.qualifier.perPrimitiveNV = true; - } - | PERVIEWNV { - // No need for profile version or extension check. Shader stage already checks both. - parseContext.globalCheck($1.loc, "perviewNV"); - parseContext.requireStage($1.loc, EShLangMeshNV, "perviewNV"); - $$.init($1.loc); - $$.qualifier.perViewNV = true; - } - | PERTASKNV { - // No need for profile version or extension check. Shader stage already checks both. - parseContext.globalCheck($1.loc, "taskNV"); - parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangTaskNVMask | EShLangMeshNVMask), "taskNV"); - $$.init($1.loc); - $$.qualifier.perTaskNV = true; - } -GLSLANG_WEB_EXCLUDE_OFF - ; - -layout_qualifier - : LAYOUT LEFT_PAREN layout_qualifier_id_list RIGHT_PAREN { - $$ = $3; - } - ; - -layout_qualifier_id_list - : layout_qualifier_id { - $$ = $1; - } - | layout_qualifier_id_list COMMA layout_qualifier_id { - $$ = $1; - $$.shaderQualifiers.merge($3.shaderQualifiers); - parseContext.mergeObjectLayoutQualifiers($$.qualifier, $3.qualifier, false); - } - -layout_qualifier_id - : IDENTIFIER { - $$.init($1.loc); - parseContext.setLayoutQualifier($1.loc, $$, *$1.string); - } - | IDENTIFIER EQUAL constant_expression { - $$.init($1.loc); - parseContext.setLayoutQualifier($1.loc, $$, *$1.string, $3); - } - | SHARED { // because "shared" is both an identifier and a keyword - $$.init($1.loc); - TString strShared("shared"); - parseContext.setLayoutQualifier($1.loc, $$, strShared); - } - ; - -GLSLANG_WEB_EXCLUDE_ON -precise_qualifier - : PRECISE { - parseContext.profileRequires($$.loc, ECoreProfile | ECompatibilityProfile, 400, E_GL_ARB_gpu_shader5, "precise"); - parseContext.profileRequires($1.loc, EEsProfile, 320, Num_AEP_gpu_shader5, AEP_gpu_shader5, "precise"); - $$.init($1.loc); - $$.qualifier.noContraction = true; - } - ; -GLSLANG_WEB_EXCLUDE_OFF - -type_qualifier - : single_type_qualifier { - $$ = $1; - } - | type_qualifier single_type_qualifier { - $$ = $1; - if ($$.basicType == EbtVoid) - $$.basicType = $2.basicType; - - $$.shaderQualifiers.merge($2.shaderQualifiers); - parseContext.mergeQualifiers($$.loc, $$.qualifier, $2.qualifier, false); - } - ; - -single_type_qualifier - : storage_qualifier { - $$ = $1; - } - | layout_qualifier { - $$ = $1; - } - | precision_qualifier { - parseContext.checkPrecisionQualifier($1.loc, $1.qualifier.precision); - $$ = $1; - } - | interpolation_qualifier { - // allow inheritance of storage qualifier from block declaration - $$ = $1; - } - | invariant_qualifier { - // allow inheritance of storage qualifier from block declaration - $$ = $1; - } -GLSLANG_WEB_EXCLUDE_ON - | precise_qualifier { - // allow inheritance of storage qualifier from block declaration - $$ = $1; - } - | non_uniform_qualifier { - $$ = $1; - } - | spirv_storage_class_qualifier { - parseContext.globalCheck($1.loc, "spirv_storage_class"); - parseContext.requireExtensions($1.loc, 1, &E_GL_EXT_spirv_intrinsics, "SPIR-V storage class qualifier"); - $$ = $1; - } - | spirv_decorate_qualifier { - parseContext.requireExtensions($1.loc, 1, &E_GL_EXT_spirv_intrinsics, "SPIR-V decorate qualifier"); - $$ = $1; - } - | SPIRV_BY_REFERENCE { - parseContext.requireExtensions($1.loc, 1, &E_GL_EXT_spirv_intrinsics, "spirv_by_reference"); - $$.init($1.loc); - $$.qualifier.setSpirvByReference(); - } - | SPIRV_LITERAL { - parseContext.requireExtensions($1.loc, 1, &E_GL_EXT_spirv_intrinsics, "spirv_by_literal"); - $$.init($1.loc); - $$.qualifier.setSpirvLiteral(); - } -GLSLANG_WEB_EXCLUDE_OFF - ; - -storage_qualifier - : CONST { - $$.init($1.loc); - $$.qualifier.storage = EvqConst; // will later turn into EvqConstReadOnly, if the initializer is not constant - } - | INOUT { - parseContext.globalCheck($1.loc, "inout"); - $$.init($1.loc); - $$.qualifier.storage = EvqInOut; - } - | IN { - parseContext.globalCheck($1.loc, "in"); - $$.init($1.loc); - // whether this is a parameter "in" or a pipeline "in" will get sorted out a bit later - $$.qualifier.storage = EvqIn; - } - | OUT { - parseContext.globalCheck($1.loc, "out"); - $$.init($1.loc); - // whether this is a parameter "out" or a pipeline "out" will get sorted out a bit later - $$.qualifier.storage = EvqOut; - } - | CENTROID { - parseContext.profileRequires($1.loc, ENoProfile, 120, 0, "centroid"); - parseContext.profileRequires($1.loc, EEsProfile, 300, 0, "centroid"); - parseContext.globalCheck($1.loc, "centroid"); - $$.init($1.loc); - $$.qualifier.centroid = true; - } - | UNIFORM { - parseContext.globalCheck($1.loc, "uniform"); - $$.init($1.loc); - $$.qualifier.storage = EvqUniform; - } - | SHARED { - parseContext.globalCheck($1.loc, "shared"); - parseContext.profileRequires($1.loc, ECoreProfile | ECompatibilityProfile, 430, E_GL_ARB_compute_shader, "shared"); - parseContext.profileRequires($1.loc, EEsProfile, 310, 0, "shared"); - parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangComputeMask | EShLangMeshNVMask | EShLangTaskNVMask), "shared"); - $$.init($1.loc); - $$.qualifier.storage = EvqShared; - } - | BUFFER { - parseContext.globalCheck($1.loc, "buffer"); - $$.init($1.loc); - $$.qualifier.storage = EvqBuffer; - } -GLSLANG_WEB_EXCLUDE_ON - | ATTRIBUTE { - parseContext.requireStage($1.loc, EShLangVertex, "attribute"); - parseContext.checkDeprecated($1.loc, ECoreProfile, 130, "attribute"); - parseContext.checkDeprecated($1.loc, ENoProfile, 130, "attribute"); - parseContext.requireNotRemoved($1.loc, ECoreProfile, 420, "attribute"); - parseContext.requireNotRemoved($1.loc, EEsProfile, 300, "attribute"); - - parseContext.globalCheck($1.loc, "attribute"); - - $$.init($1.loc); - $$.qualifier.storage = EvqVaryingIn; - } - | VARYING { - parseContext.checkDeprecated($1.loc, ENoProfile, 130, "varying"); - parseContext.checkDeprecated($1.loc, ECoreProfile, 130, "varying"); - parseContext.requireNotRemoved($1.loc, ECoreProfile, 420, "varying"); - parseContext.requireNotRemoved($1.loc, EEsProfile, 300, "varying"); - - parseContext.globalCheck($1.loc, "varying"); - - $$.init($1.loc); - if (parseContext.language == EShLangVertex) - $$.qualifier.storage = EvqVaryingOut; - else - $$.qualifier.storage = EvqVaryingIn; - } - | PATCH { - parseContext.globalCheck($1.loc, "patch"); - parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangTessControlMask | EShLangTessEvaluationMask), "patch"); - $$.init($1.loc); - $$.qualifier.patch = true; - } - | SAMPLE { - parseContext.globalCheck($1.loc, "sample"); - $$.init($1.loc); - $$.qualifier.sample = true; - } - | HITATTRNV { - parseContext.globalCheck($1.loc, "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 = 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)(EShLangRayGenMask | EShLangClosestHitMask | - EShLangAnyHitMask | EShLangMissMask), "rayPayloadNV"); - parseContext.profileRequires($1.loc, ECoreProfile, 460, E_GL_NV_ray_tracing, "rayPayloadNV"); - $$.init($1.loc); - $$.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)(EShLangClosestHitMask | - EShLangAnyHitMask | EShLangMissMask), "rayPayloadInNV"); - parseContext.profileRequires($1.loc, ECoreProfile, 460, E_GL_NV_ray_tracing, "rayPayloadInNV"); - $$.init($1.loc); - $$.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)(EShLangRayGenMask | - EShLangClosestHitMask | EShLangMissMask | EShLangCallableMask), "callableDataNV"); - parseContext.profileRequires($1.loc, ECoreProfile, 460, E_GL_NV_ray_tracing, "callableDataNV"); - $$.init($1.loc); - $$.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)(EShLangCallableMask), "callableDataInNV"); - parseContext.profileRequires($1.loc, ECoreProfile, 460, E_GL_NV_ray_tracing, "callableDataInNV"); - $$.init($1.loc); - $$.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); - $$.qualifier.coherent = true; - } - | DEVICECOHERENT { - $$.init($1.loc); - parseContext.requireExtensions($1.loc, 1, &E_GL_KHR_memory_scope_semantics, "devicecoherent"); - $$.qualifier.devicecoherent = true; - } - | QUEUEFAMILYCOHERENT { - $$.init($1.loc); - parseContext.requireExtensions($1.loc, 1, &E_GL_KHR_memory_scope_semantics, "queuefamilycoherent"); - $$.qualifier.queuefamilycoherent = true; - } - | WORKGROUPCOHERENT { - $$.init($1.loc); - parseContext.requireExtensions($1.loc, 1, &E_GL_KHR_memory_scope_semantics, "workgroupcoherent"); - $$.qualifier.workgroupcoherent = true; - } - | SUBGROUPCOHERENT { - $$.init($1.loc); - parseContext.requireExtensions($1.loc, 1, &E_GL_KHR_memory_scope_semantics, "subgroupcoherent"); - $$.qualifier.subgroupcoherent = true; - } - | NONPRIVATE { - $$.init($1.loc); - 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; - } - | RESTRICT { - $$.init($1.loc); - $$.qualifier.restrict = true; - } - | READONLY { - $$.init($1.loc); - $$.qualifier.readonly = true; - } - | WRITEONLY { - $$.init($1.loc); - $$.qualifier.writeonly = true; - } - | SUBROUTINE { - parseContext.spvRemoved($1.loc, "subroutine"); - parseContext.globalCheck($1.loc, "subroutine"); - parseContext.unimplemented($1.loc, "subroutine"); - $$.init($1.loc); - } - | SUBROUTINE LEFT_PAREN type_name_list RIGHT_PAREN { - parseContext.spvRemoved($1.loc, "subroutine"); - parseContext.globalCheck($1.loc, "subroutine"); - parseContext.unimplemented($1.loc, "subroutine"); - $$.init($1.loc); - } -GLSLANG_WEB_EXCLUDE_OFF - ; - -GLSLANG_WEB_EXCLUDE_ON -non_uniform_qualifier - : NONUNIFORM { - $$.init($1.loc); - $$.qualifier.nonUniform = true; - } - ; - -type_name_list - : IDENTIFIER { - // TODO - } - | type_name_list COMMA IDENTIFIER { - // 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 - } - ; -GLSLANG_WEB_EXCLUDE_OFF - -type_specifier - : type_specifier_nonarray type_parameter_specifier_opt { - $$ = $1; - $$.qualifier.precision = parseContext.getDefaultPrecision($$); - $$.typeParameters = $2; - } - | type_specifier_nonarray type_parameter_specifier_opt array_specifier { - parseContext.arrayOfArrayVersionCheck($3.loc, $3.arraySizes); - $$ = $1; - $$.qualifier.precision = parseContext.getDefaultPrecision($$); - $$.typeParameters = $2; - $$.arraySizes = $3.arraySizes; - } - ; - -array_specifier - : LEFT_BRACKET RIGHT_BRACKET { - $$.loc = $1.loc; - $$.arraySizes = new TArraySizes; - $$.arraySizes->addInnerSize(); - } - | LEFT_BRACKET conditional_expression RIGHT_BRACKET { - $$.loc = $1.loc; - $$.arraySizes = new TArraySizes; - - TArraySize size; - parseContext.arraySizeCheck($2->getLoc(), $2, size, "array size"); - $$.arraySizes->addInnerSize(size); - } - | array_specifier LEFT_BRACKET RIGHT_BRACKET { - $$ = $1; - $$.arraySizes->addInnerSize(); - } - | array_specifier LEFT_BRACKET conditional_expression RIGHT_BRACKET { - $$ = $1; - - TArraySize size; - parseContext.arraySizeCheck($3->getLoc(), $3, size, "array size"); - $$.arraySizes->addInnerSize(size); - } - ; - -type_parameter_specifier_opt - : type_parameter_specifier { - $$ = $1; - } - | /* May be null */ { - $$ = 0; - } - ; - -type_parameter_specifier - : LEFT_ANGLE type_parameter_specifier_list RIGHT_ANGLE { - $$ = $2; - } - ; - -type_parameter_specifier_list - : unary_expression { - $$ = new TArraySizes; - - TArraySize size; - parseContext.arraySizeCheck($1->getLoc(), $1, size, "type parameter"); - $$->addInnerSize(size); - } - | type_parameter_specifier_list COMMA unary_expression { - $$ = $1; - - TArraySize size; - parseContext.arraySizeCheck($3->getLoc(), $3, size, "type parameter"); - $$->addInnerSize(size); - } - ; - -type_specifier_nonarray - : VOID { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtVoid; - } - | FLOAT { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat; - } - | INT { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtInt; - } - | UINT { - parseContext.fullIntegerCheck($1.loc, "unsigned integer"); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtUint; - } - | BOOL { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtBool; - } - | VEC2 { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat; - $$.setVector(2); - } - | VEC3 { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat; - $$.setVector(3); - } - | VEC4 { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat; - $$.setVector(4); - } - | BVEC2 { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtBool; - $$.setVector(2); - } - | BVEC3 { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtBool; - $$.setVector(3); - } - | BVEC4 { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtBool; - $$.setVector(4); - } - | IVEC2 { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtInt; - $$.setVector(2); - } - | IVEC3 { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtInt; - $$.setVector(3); - } - | IVEC4 { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtInt; - $$.setVector(4); - } - | UVEC2 { - parseContext.fullIntegerCheck($1.loc, "unsigned integer vector"); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtUint; - $$.setVector(2); - } - | UVEC3 { - parseContext.fullIntegerCheck($1.loc, "unsigned integer vector"); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtUint; - $$.setVector(3); - } - | UVEC4 { - parseContext.fullIntegerCheck($1.loc, "unsigned integer vector"); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtUint; - $$.setVector(4); - } - | MAT2 { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat; - $$.setMatrix(2, 2); - } - | MAT3 { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat; - $$.setMatrix(3, 3); - } - | MAT4 { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat; - $$.setMatrix(4, 4); - } - | MAT2X2 { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat; - $$.setMatrix(2, 2); - } - | MAT2X3 { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat; - $$.setMatrix(2, 3); - } - | MAT2X4 { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat; - $$.setMatrix(2, 4); - } - | MAT3X2 { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat; - $$.setMatrix(3, 2); - } - | MAT3X3 { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat; - $$.setMatrix(3, 3); - } - | MAT3X4 { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat; - $$.setMatrix(3, 4); - } - | MAT4X2 { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat; - $$.setMatrix(4, 2); - } - | MAT4X3 { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat; - $$.setMatrix(4, 3); - } - | MAT4X4 { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat; - $$.setMatrix(4, 4); - } -GLSLANG_WEB_EXCLUDE_ON - | DOUBLE { - parseContext.requireProfile($1.loc, ECoreProfile | ECompatibilityProfile, "double"); - if (! parseContext.symbolTable.atBuiltInLevel()) - parseContext.doubleCheck($1.loc, "double"); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtDouble; - } - | FLOAT16_T { - parseContext.float16ScalarVectorCheck($1.loc, "float16_t", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat16; - } - | FLOAT32_T { - parseContext.explicitFloat32Check($1.loc, "float32_t", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat; - } - | FLOAT64_T { - parseContext.explicitFloat64Check($1.loc, "float64_t", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtDouble; - } - | INT8_T { - parseContext.int8ScalarVectorCheck($1.loc, "8-bit signed integer", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtInt8; - } - | UINT8_T { - parseContext.int8ScalarVectorCheck($1.loc, "8-bit unsigned integer", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtUint8; - } - | INT16_T { - parseContext.int16ScalarVectorCheck($1.loc, "16-bit signed integer", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtInt16; - } - | UINT16_T { - parseContext.int16ScalarVectorCheck($1.loc, "16-bit unsigned integer", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtUint16; - } - | INT32_T { - parseContext.explicitInt32Check($1.loc, "32-bit signed integer", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtInt; - } - | UINT32_T { - parseContext.explicitInt32Check($1.loc, "32-bit unsigned integer", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtUint; - } - | INT64_T { - parseContext.int64Check($1.loc, "64-bit integer", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtInt64; - } - | UINT64_T { - parseContext.int64Check($1.loc, "64-bit unsigned integer", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtUint64; - } - | DVEC2 { - parseContext.requireProfile($1.loc, ECoreProfile | ECompatibilityProfile, "double vector"); - if (! parseContext.symbolTable.atBuiltInLevel()) - parseContext.doubleCheck($1.loc, "double vector"); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtDouble; - $$.setVector(2); - } - | DVEC3 { - parseContext.requireProfile($1.loc, ECoreProfile | ECompatibilityProfile, "double vector"); - if (! parseContext.symbolTable.atBuiltInLevel()) - parseContext.doubleCheck($1.loc, "double vector"); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtDouble; - $$.setVector(3); - } - | DVEC4 { - parseContext.requireProfile($1.loc, ECoreProfile | ECompatibilityProfile, "double vector"); - if (! parseContext.symbolTable.atBuiltInLevel()) - parseContext.doubleCheck($1.loc, "double vector"); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtDouble; - $$.setVector(4); - } - | F16VEC2 { - parseContext.float16ScalarVectorCheck($1.loc, "half float vector", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat16; - $$.setVector(2); - } - | F16VEC3 { - parseContext.float16ScalarVectorCheck($1.loc, "half float vector", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat16; - $$.setVector(3); - } - | F16VEC4 { - parseContext.float16ScalarVectorCheck($1.loc, "half float vector", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat16; - $$.setVector(4); - } - | F32VEC2 { - parseContext.explicitFloat32Check($1.loc, "float32_t vector", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat; - $$.setVector(2); - } - | F32VEC3 { - parseContext.explicitFloat32Check($1.loc, "float32_t vector", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat; - $$.setVector(3); - } - | F32VEC4 { - parseContext.explicitFloat32Check($1.loc, "float32_t vector", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat; - $$.setVector(4); - } - | F64VEC2 { - parseContext.explicitFloat64Check($1.loc, "float64_t vector", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtDouble; - $$.setVector(2); - } - | F64VEC3 { - parseContext.explicitFloat64Check($1.loc, "float64_t vector", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtDouble; - $$.setVector(3); - } - | F64VEC4 { - parseContext.explicitFloat64Check($1.loc, "float64_t vector", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtDouble; - $$.setVector(4); - } - | I8VEC2 { - parseContext.int8ScalarVectorCheck($1.loc, "8-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtInt8; - $$.setVector(2); - } - | I8VEC3 { - parseContext.int8ScalarVectorCheck($1.loc, "8-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtInt8; - $$.setVector(3); - } - | I8VEC4 { - parseContext.int8ScalarVectorCheck($1.loc, "8-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtInt8; - $$.setVector(4); - } - | I16VEC2 { - parseContext.int16ScalarVectorCheck($1.loc, "16-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtInt16; - $$.setVector(2); - } - | I16VEC3 { - parseContext.int16ScalarVectorCheck($1.loc, "16-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtInt16; - $$.setVector(3); - } - | I16VEC4 { - parseContext.int16ScalarVectorCheck($1.loc, "16-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtInt16; - $$.setVector(4); - } - | I32VEC2 { - parseContext.explicitInt32Check($1.loc, "32-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtInt; - $$.setVector(2); - } - | I32VEC3 { - parseContext.explicitInt32Check($1.loc, "32-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtInt; - $$.setVector(3); - } - | I32VEC4 { - parseContext.explicitInt32Check($1.loc, "32-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtInt; - $$.setVector(4); - } - | I64VEC2 { - parseContext.int64Check($1.loc, "64-bit integer vector", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtInt64; - $$.setVector(2); - } - | I64VEC3 { - parseContext.int64Check($1.loc, "64-bit integer vector", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtInt64; - $$.setVector(3); - } - | I64VEC4 { - parseContext.int64Check($1.loc, "64-bit integer vector", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtInt64; - $$.setVector(4); - } - | U8VEC2 { - parseContext.int8ScalarVectorCheck($1.loc, "8-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtUint8; - $$.setVector(2); - } - | U8VEC3 { - parseContext.int8ScalarVectorCheck($1.loc, "8-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtUint8; - $$.setVector(3); - } - | U8VEC4 { - parseContext.int8ScalarVectorCheck($1.loc, "8-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtUint8; - $$.setVector(4); - } - | U16VEC2 { - parseContext.int16ScalarVectorCheck($1.loc, "16-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtUint16; - $$.setVector(2); - } - | U16VEC3 { - parseContext.int16ScalarVectorCheck($1.loc, "16-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtUint16; - $$.setVector(3); - } - | U16VEC4 { - parseContext.int16ScalarVectorCheck($1.loc, "16-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtUint16; - $$.setVector(4); - } - | U32VEC2 { - parseContext.explicitInt32Check($1.loc, "32-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtUint; - $$.setVector(2); - } - | U32VEC3 { - parseContext.explicitInt32Check($1.loc, "32-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtUint; - $$.setVector(3); - } - | U32VEC4 { - parseContext.explicitInt32Check($1.loc, "32-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtUint; - $$.setVector(4); - } - | U64VEC2 { - parseContext.int64Check($1.loc, "64-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtUint64; - $$.setVector(2); - } - | U64VEC3 { - parseContext.int64Check($1.loc, "64-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtUint64; - $$.setVector(3); - } - | U64VEC4 { - parseContext.int64Check($1.loc, "64-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtUint64; - $$.setVector(4); - } - | DMAT2 { - parseContext.requireProfile($1.loc, ECoreProfile | ECompatibilityProfile, "double matrix"); - if (! parseContext.symbolTable.atBuiltInLevel()) - parseContext.doubleCheck($1.loc, "double matrix"); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtDouble; - $$.setMatrix(2, 2); - } - | DMAT3 { - parseContext.requireProfile($1.loc, ECoreProfile | ECompatibilityProfile, "double matrix"); - if (! parseContext.symbolTable.atBuiltInLevel()) - parseContext.doubleCheck($1.loc, "double matrix"); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtDouble; - $$.setMatrix(3, 3); - } - | DMAT4 { - parseContext.requireProfile($1.loc, ECoreProfile | ECompatibilityProfile, "double matrix"); - if (! parseContext.symbolTable.atBuiltInLevel()) - parseContext.doubleCheck($1.loc, "double matrix"); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtDouble; - $$.setMatrix(4, 4); - } - | DMAT2X2 { - parseContext.requireProfile($1.loc, ECoreProfile | ECompatibilityProfile, "double matrix"); - if (! parseContext.symbolTable.atBuiltInLevel()) - parseContext.doubleCheck($1.loc, "double matrix"); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtDouble; - $$.setMatrix(2, 2); - } - | DMAT2X3 { - parseContext.requireProfile($1.loc, ECoreProfile | ECompatibilityProfile, "double matrix"); - if (! parseContext.symbolTable.atBuiltInLevel()) - parseContext.doubleCheck($1.loc, "double matrix"); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtDouble; - $$.setMatrix(2, 3); - } - | DMAT2X4 { - parseContext.requireProfile($1.loc, ECoreProfile | ECompatibilityProfile, "double matrix"); - if (! parseContext.symbolTable.atBuiltInLevel()) - parseContext.doubleCheck($1.loc, "double matrix"); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtDouble; - $$.setMatrix(2, 4); - } - | DMAT3X2 { - parseContext.requireProfile($1.loc, ECoreProfile | ECompatibilityProfile, "double matrix"); - if (! parseContext.symbolTable.atBuiltInLevel()) - parseContext.doubleCheck($1.loc, "double matrix"); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtDouble; - $$.setMatrix(3, 2); - } - | DMAT3X3 { - parseContext.requireProfile($1.loc, ECoreProfile | ECompatibilityProfile, "double matrix"); - if (! parseContext.symbolTable.atBuiltInLevel()) - parseContext.doubleCheck($1.loc, "double matrix"); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtDouble; - $$.setMatrix(3, 3); - } - | DMAT3X4 { - parseContext.requireProfile($1.loc, ECoreProfile | ECompatibilityProfile, "double matrix"); - if (! parseContext.symbolTable.atBuiltInLevel()) - parseContext.doubleCheck($1.loc, "double matrix"); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtDouble; - $$.setMatrix(3, 4); - } - | DMAT4X2 { - parseContext.requireProfile($1.loc, ECoreProfile | ECompatibilityProfile, "double matrix"); - if (! parseContext.symbolTable.atBuiltInLevel()) - parseContext.doubleCheck($1.loc, "double matrix"); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtDouble; - $$.setMatrix(4, 2); - } - | DMAT4X3 { - parseContext.requireProfile($1.loc, ECoreProfile | ECompatibilityProfile, "double matrix"); - if (! parseContext.symbolTable.atBuiltInLevel()) - parseContext.doubleCheck($1.loc, "double matrix"); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtDouble; - $$.setMatrix(4, 3); - } - | DMAT4X4 { - parseContext.requireProfile($1.loc, ECoreProfile | ECompatibilityProfile, "double matrix"); - if (! parseContext.symbolTable.atBuiltInLevel()) - parseContext.doubleCheck($1.loc, "double matrix"); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtDouble; - $$.setMatrix(4, 4); - } - | F16MAT2 { - parseContext.float16Check($1.loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat16; - $$.setMatrix(2, 2); - } - | F16MAT3 { - parseContext.float16Check($1.loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat16; - $$.setMatrix(3, 3); - } - | F16MAT4 { - parseContext.float16Check($1.loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat16; - $$.setMatrix(4, 4); - } - | F16MAT2X2 { - parseContext.float16Check($1.loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat16; - $$.setMatrix(2, 2); - } - | F16MAT2X3 { - parseContext.float16Check($1.loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat16; - $$.setMatrix(2, 3); - } - | F16MAT2X4 { - parseContext.float16Check($1.loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat16; - $$.setMatrix(2, 4); - } - | F16MAT3X2 { - parseContext.float16Check($1.loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat16; - $$.setMatrix(3, 2); - } - | F16MAT3X3 { - parseContext.float16Check($1.loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat16; - $$.setMatrix(3, 3); - } - | F16MAT3X4 { - parseContext.float16Check($1.loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat16; - $$.setMatrix(3, 4); - } - | F16MAT4X2 { - parseContext.float16Check($1.loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat16; - $$.setMatrix(4, 2); - } - | F16MAT4X3 { - parseContext.float16Check($1.loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat16; - $$.setMatrix(4, 3); - } - | F16MAT4X4 { - parseContext.float16Check($1.loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat16; - $$.setMatrix(4, 4); - } - | F32MAT2 { - parseContext.explicitFloat32Check($1.loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat; - $$.setMatrix(2, 2); - } - | F32MAT3 { - parseContext.explicitFloat32Check($1.loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat; - $$.setMatrix(3, 3); - } - | F32MAT4 { - parseContext.explicitFloat32Check($1.loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat; - $$.setMatrix(4, 4); - } - | F32MAT2X2 { - parseContext.explicitFloat32Check($1.loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat; - $$.setMatrix(2, 2); - } - | F32MAT2X3 { - parseContext.explicitFloat32Check($1.loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat; - $$.setMatrix(2, 3); - } - | F32MAT2X4 { - parseContext.explicitFloat32Check($1.loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat; - $$.setMatrix(2, 4); - } - | F32MAT3X2 { - parseContext.explicitFloat32Check($1.loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat; - $$.setMatrix(3, 2); - } - | F32MAT3X3 { - parseContext.explicitFloat32Check($1.loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat; - $$.setMatrix(3, 3); - } - | F32MAT3X4 { - parseContext.explicitFloat32Check($1.loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat; - $$.setMatrix(3, 4); - } - | F32MAT4X2 { - parseContext.explicitFloat32Check($1.loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat; - $$.setMatrix(4, 2); - } - | F32MAT4X3 { - parseContext.explicitFloat32Check($1.loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat; - $$.setMatrix(4, 3); - } - | F32MAT4X4 { - parseContext.explicitFloat32Check($1.loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat; - $$.setMatrix(4, 4); - } - | F64MAT2 { - parseContext.explicitFloat64Check($1.loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtDouble; - $$.setMatrix(2, 2); - } - | F64MAT3 { - parseContext.explicitFloat64Check($1.loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtDouble; - $$.setMatrix(3, 3); - } - | F64MAT4 { - parseContext.explicitFloat64Check($1.loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtDouble; - $$.setMatrix(4, 4); - } - | F64MAT2X2 { - parseContext.explicitFloat64Check($1.loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtDouble; - $$.setMatrix(2, 2); - } - | F64MAT2X3 { - parseContext.explicitFloat64Check($1.loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtDouble; - $$.setMatrix(2, 3); - } - | F64MAT2X4 { - parseContext.explicitFloat64Check($1.loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtDouble; - $$.setMatrix(2, 4); - } - | F64MAT3X2 { - parseContext.explicitFloat64Check($1.loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtDouble; - $$.setMatrix(3, 2); - } - | F64MAT3X3 { - parseContext.explicitFloat64Check($1.loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtDouble; - $$.setMatrix(3, 3); - } - | F64MAT3X4 { - parseContext.explicitFloat64Check($1.loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtDouble; - $$.setMatrix(3, 4); - } - | F64MAT4X2 { - parseContext.explicitFloat64Check($1.loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtDouble; - $$.setMatrix(4, 2); - } - | F64MAT4X3 { - parseContext.explicitFloat64Check($1.loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtDouble; - $$.setMatrix(4, 3); - } - | F64MAT4X4 { - parseContext.explicitFloat64Check($1.loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtDouble; - $$.setMatrix(4, 4); - } - | ACCSTRUCTNV { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.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"); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtAtomicUint; - } - | SAMPLER1D { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtFloat, Esd1D); - } -GLSLANG_WEB_EXCLUDE_OFF - | SAMPLER2D { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtFloat, Esd2D); - } - | SAMPLER3D { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtFloat, Esd3D); - } - | SAMPLERCUBE { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtFloat, EsdCube); - } - | SAMPLER2DSHADOW { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtFloat, Esd2D, false, true); - } - | SAMPLERCUBESHADOW { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtFloat, EsdCube, false, true); - } - | SAMPLER2DARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtFloat, Esd2D, true); - } - | SAMPLER2DARRAYSHADOW { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtFloat, Esd2D, true, true); - } -GLSLANG_WEB_EXCLUDE_ON - | SAMPLER1DSHADOW { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtFloat, Esd1D, false, true); - } - | SAMPLER1DARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtFloat, Esd1D, true); - } - | SAMPLER1DARRAYSHADOW { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtFloat, Esd1D, true, true); - } - | SAMPLERCUBEARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtFloat, EsdCube, true); - } - | SAMPLERCUBEARRAYSHADOW { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtFloat, EsdCube, true, true); - } - | F16SAMPLER1D { - parseContext.float16OpaqueCheck($1.loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtFloat16, Esd1D); - } - | F16SAMPLER2D { - parseContext.float16OpaqueCheck($1.loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtFloat16, Esd2D); - } - | F16SAMPLER3D { - parseContext.float16OpaqueCheck($1.loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtFloat16, Esd3D); - } - | F16SAMPLERCUBE { - parseContext.float16OpaqueCheck($1.loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtFloat16, EsdCube); - } - | F16SAMPLER1DSHADOW { - parseContext.float16OpaqueCheck($1.loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtFloat16, Esd1D, false, true); - } - | F16SAMPLER2DSHADOW { - parseContext.float16OpaqueCheck($1.loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtFloat16, Esd2D, false, true); - } - | F16SAMPLERCUBESHADOW { - parseContext.float16OpaqueCheck($1.loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtFloat16, EsdCube, false, true); - } - | F16SAMPLER1DARRAY { - parseContext.float16OpaqueCheck($1.loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtFloat16, Esd1D, true); - } - | F16SAMPLER2DARRAY { - parseContext.float16OpaqueCheck($1.loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtFloat16, Esd2D, true); - } - | F16SAMPLER1DARRAYSHADOW { - parseContext.float16OpaqueCheck($1.loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtFloat16, Esd1D, true, true); - } - | F16SAMPLER2DARRAYSHADOW { - parseContext.float16OpaqueCheck($1.loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtFloat16, Esd2D, true, true); - } - | F16SAMPLERCUBEARRAY { - parseContext.float16OpaqueCheck($1.loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtFloat16, EsdCube, true); - } - | F16SAMPLERCUBEARRAYSHADOW { - parseContext.float16OpaqueCheck($1.loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtFloat16, EsdCube, true, true); - } - | ISAMPLER1D { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtInt, Esd1D); - } -GLSLANG_WEB_EXCLUDE_OFF - | ISAMPLER2D { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtInt, Esd2D); - } - | ISAMPLER3D { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtInt, Esd3D); - } - | ISAMPLERCUBE { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtInt, EsdCube); - } - | ISAMPLER2DARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtInt, Esd2D, true); - } - | USAMPLER2D { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtUint, Esd2D); - } - | USAMPLER3D { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtUint, Esd3D); - } - | USAMPLERCUBE { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtUint, EsdCube); - } -GLSLANG_WEB_EXCLUDE_ON - | ISAMPLER1DARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtInt, Esd1D, true); - } - | ISAMPLERCUBEARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtInt, EsdCube, true); - } - | USAMPLER1D { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtUint, Esd1D); - } - | USAMPLER1DARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtUint, Esd1D, true); - } - | USAMPLERCUBEARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtUint, EsdCube, true); - } - | TEXTURECUBEARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtFloat, EsdCube, true); - } - | ITEXTURECUBEARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtInt, EsdCube, true); - } - | UTEXTURECUBEARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtUint, EsdCube, true); - } -GLSLANG_WEB_EXCLUDE_OFF - | USAMPLER2DARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtUint, Esd2D, true); - } - | TEXTURE2D { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtFloat, Esd2D); - } - | TEXTURE3D { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtFloat, Esd3D); - } - | TEXTURE2DARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtFloat, Esd2D, true); - } - | TEXTURECUBE { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtFloat, EsdCube); - } - | ITEXTURE2D { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtInt, Esd2D); - } - | ITEXTURE3D { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtInt, Esd3D); - } - | ITEXTURECUBE { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtInt, EsdCube); - } - | ITEXTURE2DARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtInt, Esd2D, true); - } - | UTEXTURE2D { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtUint, Esd2D); - } - | UTEXTURE3D { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtUint, Esd3D); - } - | UTEXTURECUBE { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtUint, EsdCube); - } - | UTEXTURE2DARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtUint, Esd2D, true); - } - | SAMPLER { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setPureSampler(false); - } - | SAMPLERSHADOW { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setPureSampler(true); - } -GLSLANG_WEB_EXCLUDE_ON - | SAMPLER2DRECT { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtFloat, EsdRect); - } - | SAMPLER2DRECTSHADOW { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtFloat, EsdRect, false, true); - } - | F16SAMPLER2DRECT { - parseContext.float16OpaqueCheck($1.loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtFloat16, EsdRect); - } - | F16SAMPLER2DRECTSHADOW { - parseContext.float16OpaqueCheck($1.loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtFloat16, EsdRect, false, true); - } - | ISAMPLER2DRECT { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtInt, EsdRect); - } - | USAMPLER2DRECT { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtUint, EsdRect); - } - | SAMPLERBUFFER { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtFloat, EsdBuffer); - } - | F16SAMPLERBUFFER { - parseContext.float16OpaqueCheck($1.loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtFloat16, EsdBuffer); - } - | ISAMPLERBUFFER { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtInt, EsdBuffer); - } - | USAMPLERBUFFER { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtUint, EsdBuffer); - } - | SAMPLER2DMS { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtFloat, Esd2D, false, false, true); - } - | F16SAMPLER2DMS { - parseContext.float16OpaqueCheck($1.loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtFloat16, Esd2D, false, false, true); - } - | ISAMPLER2DMS { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtInt, Esd2D, false, false, true); - } - | USAMPLER2DMS { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtUint, Esd2D, false, false, true); - } - | SAMPLER2DMSARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtFloat, Esd2D, true, false, true); - } - | F16SAMPLER2DMSARRAY { - parseContext.float16OpaqueCheck($1.loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtFloat16, Esd2D, true, false, true); - } - | ISAMPLER2DMSARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtInt, Esd2D, true, false, true); - } - | USAMPLER2DMSARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtUint, Esd2D, true, false, true); - } - | TEXTURE1D { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtFloat, Esd1D); - } - | F16TEXTURE1D { - parseContext.float16OpaqueCheck($1.loc, "half float texture", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtFloat16, Esd1D); - } - | F16TEXTURE2D { - parseContext.float16OpaqueCheck($1.loc, "half float texture", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtFloat16, Esd2D); - } - | F16TEXTURE3D { - parseContext.float16OpaqueCheck($1.loc, "half float texture", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtFloat16, Esd3D); - } - | F16TEXTURECUBE { - parseContext.float16OpaqueCheck($1.loc, "half float texture", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtFloat16, EsdCube); - } - | TEXTURE1DARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtFloat, Esd1D, true); - } - | F16TEXTURE1DARRAY { - parseContext.float16OpaqueCheck($1.loc, "half float texture", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtFloat16, Esd1D, true); - } - | F16TEXTURE2DARRAY { - parseContext.float16OpaqueCheck($1.loc, "half float texture", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtFloat16, Esd2D, true); - } - | F16TEXTURECUBEARRAY { - parseContext.float16OpaqueCheck($1.loc, "half float texture", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtFloat16, EsdCube, true); - } - | ITEXTURE1D { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtInt, Esd1D); - } - | ITEXTURE1DARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtInt, Esd1D, true); - } - | UTEXTURE1D { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtUint, Esd1D); - } - | UTEXTURE1DARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtUint, Esd1D, true); - } - | TEXTURE2DRECT { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtFloat, EsdRect); - } - | F16TEXTURE2DRECT { - parseContext.float16OpaqueCheck($1.loc, "half float texture", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtFloat16, EsdRect); - } - | ITEXTURE2DRECT { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtInt, EsdRect); - } - | UTEXTURE2DRECT { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtUint, EsdRect); - } - | TEXTUREBUFFER { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtFloat, EsdBuffer); - } - | F16TEXTUREBUFFER { - parseContext.float16OpaqueCheck($1.loc, "half float texture", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtFloat16, EsdBuffer); - } - | ITEXTUREBUFFER { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtInt, EsdBuffer); - } - | UTEXTUREBUFFER { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtUint, EsdBuffer); - } - | TEXTURE2DMS { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtFloat, Esd2D, false, false, true); - } - | F16TEXTURE2DMS { - parseContext.float16OpaqueCheck($1.loc, "half float texture", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtFloat16, Esd2D, false, false, true); - } - | ITEXTURE2DMS { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtInt, Esd2D, false, false, true); - } - | UTEXTURE2DMS { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtUint, Esd2D, false, false, true); - } - | TEXTURE2DMSARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtFloat, Esd2D, true, false, true); - } - | F16TEXTURE2DMSARRAY { - parseContext.float16OpaqueCheck($1.loc, "half float texture", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtFloat16, Esd2D, true, false, true); - } - | ITEXTURE2DMSARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtInt, Esd2D, true, false, true); - } - | UTEXTURE2DMSARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtUint, Esd2D, true, false, true); - } - | IMAGE1D { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtFloat, Esd1D); - } - | F16IMAGE1D { - parseContext.float16OpaqueCheck($1.loc, "half float image", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtFloat16, Esd1D); - } - | IIMAGE1D { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtInt, Esd1D); - } - | UIMAGE1D { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtUint, Esd1D); - } - | IMAGE2D { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtFloat, Esd2D); - } - | F16IMAGE2D { - parseContext.float16OpaqueCheck($1.loc, "half float image", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtFloat16, Esd2D); - } - | IIMAGE2D { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtInt, Esd2D); - } - | UIMAGE2D { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtUint, Esd2D); - } - | IMAGE3D { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtFloat, Esd3D); - } - | F16IMAGE3D { - parseContext.float16OpaqueCheck($1.loc, "half float image", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtFloat16, Esd3D); - } - | IIMAGE3D { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtInt, Esd3D); - } - | UIMAGE3D { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtUint, Esd3D); - } - | IMAGE2DRECT { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtFloat, EsdRect); - } - | F16IMAGE2DRECT { - parseContext.float16OpaqueCheck($1.loc, "half float image", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtFloat16, EsdRect); - } - | IIMAGE2DRECT { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtInt, EsdRect); - } - | UIMAGE2DRECT { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtUint, EsdRect); - } - | IMAGECUBE { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtFloat, EsdCube); - } - | F16IMAGECUBE { - parseContext.float16OpaqueCheck($1.loc, "half float image", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtFloat16, EsdCube); - } - | IIMAGECUBE { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtInt, EsdCube); - } - | UIMAGECUBE { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtUint, EsdCube); - } - | IMAGEBUFFER { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtFloat, EsdBuffer); - } - | F16IMAGEBUFFER { - parseContext.float16OpaqueCheck($1.loc, "half float image", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtFloat16, EsdBuffer); - } - | IIMAGEBUFFER { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtInt, EsdBuffer); - } - | UIMAGEBUFFER { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtUint, EsdBuffer); - } - | IMAGE1DARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtFloat, Esd1D, true); - } - | F16IMAGE1DARRAY { - parseContext.float16OpaqueCheck($1.loc, "half float image", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtFloat16, Esd1D, true); - } - | IIMAGE1DARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtInt, Esd1D, true); - } - | UIMAGE1DARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtUint, Esd1D, true); - } - | IMAGE2DARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtFloat, Esd2D, true); - } - | F16IMAGE2DARRAY { - parseContext.float16OpaqueCheck($1.loc, "half float image", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtFloat16, Esd2D, true); - } - | IIMAGE2DARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtInt, Esd2D, true); - } - | UIMAGE2DARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtUint, Esd2D, true); - } - | IMAGECUBEARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtFloat, EsdCube, true); - } - | F16IMAGECUBEARRAY { - parseContext.float16OpaqueCheck($1.loc, "half float image", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtFloat16, EsdCube, true); - } - | IIMAGECUBEARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtInt, EsdCube, true); - } - | UIMAGECUBEARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtUint, EsdCube, true); - } - | IMAGE2DMS { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtFloat, Esd2D, false, false, true); - } - | F16IMAGE2DMS { - parseContext.float16OpaqueCheck($1.loc, "half float image", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtFloat16, Esd2D, false, false, true); - } - | IIMAGE2DMS { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtInt, Esd2D, false, false, true); - } - | UIMAGE2DMS { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtUint, Esd2D, false, false, true); - } - | IMAGE2DMSARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtFloat, Esd2D, true, false, true); - } - | F16IMAGE2DMSARRAY { - parseContext.float16OpaqueCheck($1.loc, "half float image", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtFloat16, Esd2D, true, false, true); - } - | IIMAGE2DMSARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtInt, Esd2D, true, false, true); - } - | UIMAGE2DMSARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtUint, Esd2D, true, false, true); - } - | I64IMAGE1D { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtInt64, Esd1D); - } - | U64IMAGE1D { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtUint64, Esd1D); - } - | I64IMAGE2D { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtInt64, Esd2D); - } - | U64IMAGE2D { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtUint64, Esd2D); - } - | I64IMAGE3D { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtInt64, Esd3D); - } - | U64IMAGE3D { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtUint64, Esd3D); - } - | I64IMAGE2DRECT { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtInt64, EsdRect); - } - | U64IMAGE2DRECT { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtUint64, EsdRect); - } - | I64IMAGECUBE { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtInt64, EsdCube); - } - | U64IMAGECUBE { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtUint64, EsdCube); - } - | I64IMAGEBUFFER { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtInt64, EsdBuffer); - } - | U64IMAGEBUFFER { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtUint64, EsdBuffer); - } - | I64IMAGE1DARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtInt64, Esd1D, true); - } - | U64IMAGE1DARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtUint64, Esd1D, true); - } - | I64IMAGE2DARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtInt64, Esd2D, true); - } - | U64IMAGE2DARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtUint64, Esd2D, true); - } - | I64IMAGECUBEARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtInt64, EsdCube, true); - } - | U64IMAGECUBEARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtUint64, EsdCube, true); - } - | I64IMAGE2DMS { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtInt64, Esd2D, false, false, true); - } - | U64IMAGE2DMS { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtUint64, Esd2D, false, false, true); - } - | I64IMAGE2DMSARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtInt64, Esd2D, true, false, true); - } - | U64IMAGE2DMSARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtUint64, Esd2D, true, false, true); - } - | SAMPLEREXTERNALOES { // GL_OES_EGL_image_external - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtFloat, Esd2D); - $$.sampler.external = true; - } - | SAMPLEREXTERNAL2DY2YEXT { // GL_EXT_YUV_target - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtFloat, Esd2D); - $$.sampler.yuv = true; - } - | SUBPASSINPUT { - parseContext.requireStage($1.loc, EShLangFragment, "subpass input"); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setSubpass(EbtFloat); - } - | SUBPASSINPUTMS { - parseContext.requireStage($1.loc, EShLangFragment, "subpass input"); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setSubpass(EbtFloat, true); - } - | F16SUBPASSINPUT { - parseContext.float16OpaqueCheck($1.loc, "half float subpass input", parseContext.symbolTable.atBuiltInLevel()); - parseContext.requireStage($1.loc, EShLangFragment, "subpass input"); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setSubpass(EbtFloat16); - } - | F16SUBPASSINPUTMS { - parseContext.float16OpaqueCheck($1.loc, "half float subpass input", parseContext.symbolTable.atBuiltInLevel()); - parseContext.requireStage($1.loc, EShLangFragment, "subpass input"); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setSubpass(EbtFloat16, true); - } - | ISUBPASSINPUT { - parseContext.requireStage($1.loc, EShLangFragment, "subpass input"); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setSubpass(EbtInt); - } - | ISUBPASSINPUTMS { - parseContext.requireStage($1.loc, EShLangFragment, "subpass input"); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setSubpass(EbtInt, true); - } - | USUBPASSINPUT { - parseContext.requireStage($1.loc, EShLangFragment, "subpass input"); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setSubpass(EbtUint); - } - | USUBPASSINPUTMS { - parseContext.requireStage($1.loc, EShLangFragment, "subpass input"); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setSubpass(EbtUint, true); - } - | FCOOPMATNV { - parseContext.fcoopmatCheck($1.loc, "fcoopmatNV", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat; - $$.coopmat = true; - } - | ICOOPMATNV { - parseContext.intcoopmatCheck($1.loc, "icoopmatNV", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtInt; - $$.coopmat = true; - } - | UCOOPMATNV { - parseContext.intcoopmatCheck($1.loc, "ucoopmatNV", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtUint; - $$.coopmat = true; - } - | spirv_type_specifier { - parseContext.requireExtensions($1.loc, 1, &E_GL_EXT_spirv_intrinsics, "SPIR-V type specifier"); - $$ = $1; - } -GLSLANG_WEB_EXCLUDE_OFF - | struct_specifier { - $$ = $1; - $$.qualifier.storage = parseContext.symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; - parseContext.structTypeCheck($$.loc, $$); - } - | TYPE_NAME { - // - // This is for user defined type names. The lexical phase looked up the - // type. - // - if (const TVariable* variable = ($1.symbol)->getAsVariable()) { - const TType& structure = variable->getType(); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtStruct; - $$.userDef = &structure; - } else - parseContext.error($1.loc, "expected type name", $1.string->c_str(), ""); - } - ; - -precision_qualifier - : HIGH_PRECISION { - parseContext.profileRequires($1.loc, ENoProfile, 130, 0, "highp precision qualifier"); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - parseContext.handlePrecisionQualifier($1.loc, $$.qualifier, EpqHigh); - } - | MEDIUM_PRECISION { - parseContext.profileRequires($1.loc, ENoProfile, 130, 0, "mediump precision qualifier"); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - parseContext.handlePrecisionQualifier($1.loc, $$.qualifier, EpqMedium); - } - | LOW_PRECISION { - parseContext.profileRequires($1.loc, ENoProfile, 130, 0, "lowp precision qualifier"); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - parseContext.handlePrecisionQualifier($1.loc, $$.qualifier, EpqLow); - } - ; - -struct_specifier - : STRUCT IDENTIFIER LEFT_BRACE { parseContext.nestedStructCheck($1.loc); } struct_declaration_list RIGHT_BRACE { - TType* structure = new TType($5, *$2.string); - parseContext.structArrayCheck($2.loc, *structure); - TVariable* userTypeDef = new TVariable($2.string, *structure, true); - if (! parseContext.symbolTable.insert(*userTypeDef)) - parseContext.error($2.loc, "redefinition", $2.string->c_str(), "struct"); - $$.init($1.loc); - $$.basicType = EbtStruct; - $$.userDef = structure; - --parseContext.structNestingLevel; - } - | STRUCT LEFT_BRACE { parseContext.nestedStructCheck($1.loc); } struct_declaration_list RIGHT_BRACE { - TType* structure = new TType($4, TString("")); - $$.init($1.loc); - $$.basicType = EbtStruct; - $$.userDef = structure; - --parseContext.structNestingLevel; - } - ; - -struct_declaration_list - : struct_declaration { - $$ = $1; - } - | struct_declaration_list struct_declaration { - $$ = $1; - for (unsigned int i = 0; i < $2->size(); ++i) { - for (unsigned int j = 0; j < $$->size(); ++j) { - if ((*$$)[j].type->getFieldName() == (*$2)[i].type->getFieldName()) - parseContext.error((*$2)[i].loc, "duplicate member name:", "", (*$2)[i].type->getFieldName().c_str()); - } - $$->push_back((*$2)[i]); - } - } - ; - -struct_declaration - : type_specifier struct_declarator_list SEMICOLON { - if ($1.arraySizes) { - parseContext.profileRequires($1.loc, ENoProfile, 120, E_GL_3DL_array_objects, "arrayed type"); - parseContext.profileRequires($1.loc, EEsProfile, 300, 0, "arrayed type"); - if (parseContext.isEsProfile()) - parseContext.arraySizeRequiredCheck($1.loc, *$1.arraySizes); - } - - $$ = $2; - - parseContext.voidErrorCheck($1.loc, (*$2)[0].type->getFieldName(), $1.basicType); - parseContext.precisionQualifierCheck($1.loc, $1.basicType, $1.qualifier); - - for (unsigned int i = 0; i < $$->size(); ++i) { - TType type($1); - type.setFieldName((*$$)[i].type->getFieldName()); - type.transferArraySizes((*$$)[i].type->getArraySizes()); - type.copyArrayInnerSizes($1.arraySizes); - parseContext.arrayOfArrayVersionCheck((*$$)[i].loc, type.getArraySizes()); - (*$$)[i].type->shallowCopy(type); - } - } - | type_qualifier type_specifier struct_declarator_list SEMICOLON { - if ($2.arraySizes) { - parseContext.profileRequires($2.loc, ENoProfile, 120, E_GL_3DL_array_objects, "arrayed type"); - parseContext.profileRequires($2.loc, EEsProfile, 300, 0, "arrayed type"); - if (parseContext.isEsProfile()) - parseContext.arraySizeRequiredCheck($2.loc, *$2.arraySizes); - } - - $$ = $3; - - parseContext.memberQualifierCheck($1); - parseContext.voidErrorCheck($2.loc, (*$3)[0].type->getFieldName(), $2.basicType); - parseContext.mergeQualifiers($2.loc, $2.qualifier, $1.qualifier, true); - parseContext.precisionQualifierCheck($2.loc, $2.basicType, $2.qualifier); - - for (unsigned int i = 0; i < $$->size(); ++i) { - TType type($2); - type.setFieldName((*$$)[i].type->getFieldName()); - type.transferArraySizes((*$$)[i].type->getArraySizes()); - type.copyArrayInnerSizes($2.arraySizes); - parseContext.arrayOfArrayVersionCheck((*$$)[i].loc, type.getArraySizes()); - (*$$)[i].type->shallowCopy(type); - } - } - ; - -struct_declarator_list - : struct_declarator { - $$ = new TTypeList; - $$->push_back($1); - } - | struct_declarator_list COMMA struct_declarator { - $$->push_back($3); - } - ; - -struct_declarator - : IDENTIFIER { - $$.type = new TType(EbtVoid); - $$.loc = $1.loc; - $$.type->setFieldName(*$1.string); - } - | IDENTIFIER array_specifier { - parseContext.arrayOfArrayVersionCheck($1.loc, $2.arraySizes); - - $$.type = new TType(EbtVoid); - $$.loc = $1.loc; - $$.type->setFieldName(*$1.string); - $$.type->transferArraySizes($2.arraySizes); - } - ; - -initializer - : assignment_expression { - $$ = $1; - } -GLSLANG_WEB_EXCLUDE_ON - | LEFT_BRACE initializer_list RIGHT_BRACE { - const char* initFeature = "{ } style initializers"; - parseContext.requireProfile($1.loc, ~EEsProfile, initFeature); - parseContext.profileRequires($1.loc, ~EEsProfile, 420, E_GL_ARB_shading_language_420pack, initFeature); - $$ = $2; - } - | LEFT_BRACE initializer_list COMMA RIGHT_BRACE { - const char* initFeature = "{ } style initializers"; - parseContext.requireProfile($1.loc, ~EEsProfile, initFeature); - parseContext.profileRequires($1.loc, ~EEsProfile, 420, E_GL_ARB_shading_language_420pack, initFeature); - $$ = $2; - } - | LEFT_BRACE RIGHT_BRACE { - const char* initFeature = "empty { } initializer"; - parseContext.profileRequires($1.loc, EEsProfile, 0, E_GL_EXT_null_initializer, initFeature); - parseContext.profileRequires($1.loc, ~EEsProfile, 0, E_GL_EXT_null_initializer, initFeature); - $$ = parseContext.intermediate.makeAggregate($1.loc); - } -GLSLANG_WEB_EXCLUDE_OFF - ; - -GLSLANG_WEB_EXCLUDE_ON -initializer_list - : initializer { - $$ = parseContext.intermediate.growAggregate(0, $1, $1->getLoc()); - } - | initializer_list COMMA initializer { - $$ = parseContext.intermediate.growAggregate($1, $3); - } - ; -GLSLANG_WEB_EXCLUDE_OFF - -declaration_statement - : declaration { $$ = $1; } - ; - -statement - : compound_statement { $$ = $1; } - | simple_statement { $$ = $1; } - ; - -// Grammar Note: labeled statements for switch statements only; 'goto' is not supported. - -simple_statement - : declaration_statement { $$ = $1; } - | expression_statement { $$ = $1; } - | selection_statement { $$ = $1; } - | switch_statement { $$ = $1; } - | case_label { $$ = $1; } - | iteration_statement { $$ = $1; } - | jump_statement { $$ = $1; } -GLSLANG_WEB_EXCLUDE_ON - | demote_statement { $$ = $1; } -GLSLANG_WEB_EXCLUDE_OFF - ; - -GLSLANG_WEB_EXCLUDE_ON -demote_statement - : DEMOTE SEMICOLON { - parseContext.requireStage($1.loc, EShLangFragment, "demote"); - parseContext.requireExtensions($1.loc, 1, &E_GL_EXT_demote_to_helper_invocation, "demote"); - $$ = parseContext.intermediate.addBranch(EOpDemote, $1.loc); - } - ; -GLSLANG_WEB_EXCLUDE_OFF - -compound_statement - : LEFT_BRACE RIGHT_BRACE { $$ = 0; } - | LEFT_BRACE { - parseContext.symbolTable.push(); - ++parseContext.statementNestingLevel; - } - statement_list { - parseContext.symbolTable.pop(&parseContext.defaultPrecision[0]); - --parseContext.statementNestingLevel; - } - RIGHT_BRACE { - if ($3 && $3->getAsAggregate()) - $3->getAsAggregate()->setOperator(EOpSequence); - $$ = $3; - } - ; - -statement_no_new_scope - : compound_statement_no_new_scope { $$ = $1; } - | simple_statement { $$ = $1; } - ; - -statement_scoped - : { - ++parseContext.controlFlowNestingLevel; - } - compound_statement { - --parseContext.controlFlowNestingLevel; - $$ = $2; - } - | { - parseContext.symbolTable.push(); - ++parseContext.statementNestingLevel; - ++parseContext.controlFlowNestingLevel; - } - simple_statement { - parseContext.symbolTable.pop(&parseContext.defaultPrecision[0]); - --parseContext.statementNestingLevel; - --parseContext.controlFlowNestingLevel; - $$ = $2; - } - -compound_statement_no_new_scope - // Statement that doesn't create a new scope, for selection_statement, iteration_statement - : LEFT_BRACE RIGHT_BRACE { - $$ = 0; - } - | LEFT_BRACE statement_list RIGHT_BRACE { - if ($2 && $2->getAsAggregate()) - $2->getAsAggregate()->setOperator(EOpSequence); - $$ = $2; - } - ; - -statement_list - : statement { - $$ = parseContext.intermediate.makeAggregate($1); - if ($1 && $1->getAsBranchNode() && ($1->getAsBranchNode()->getFlowOp() == EOpCase || - $1->getAsBranchNode()->getFlowOp() == EOpDefault)) { - parseContext.wrapupSwitchSubsequence(0, $1); - $$ = 0; // start a fresh subsequence for what's after this case - } - } - | statement_list statement { - if ($2 && $2->getAsBranchNode() && ($2->getAsBranchNode()->getFlowOp() == EOpCase || - $2->getAsBranchNode()->getFlowOp() == EOpDefault)) { - parseContext.wrapupSwitchSubsequence($1 ? $1->getAsAggregate() : 0, $2); - $$ = 0; // start a fresh subsequence for what's after this case - } else - $$ = parseContext.intermediate.growAggregate($1, $2); - } - ; - -expression_statement - : SEMICOLON { $$ = 0; } - | expression SEMICOLON { $$ = static_cast($1); } - ; - -selection_statement - : selection_statement_nonattributed { - $$ = $1; - } -GLSLANG_WEB_EXCLUDE_ON - | attribute selection_statement_nonattributed { - parseContext.requireExtensions($2->getLoc(), 1, &E_GL_EXT_control_flow_attributes, "attribute"); - parseContext.handleSelectionAttributes(*$1, $2); - $$ = $2; - } -GLSLANG_WEB_EXCLUDE_OFF - -selection_statement_nonattributed - : IF LEFT_PAREN expression RIGHT_PAREN selection_rest_statement { - parseContext.boolCheck($1.loc, $3); - $$ = parseContext.intermediate.addSelection($3, $5, $1.loc); - } - ; - -selection_rest_statement - : statement_scoped ELSE statement_scoped { - $$.node1 = $1; - $$.node2 = $3; - } - | statement_scoped { - $$.node1 = $1; - $$.node2 = 0; - } - ; - -condition - // In 1996 c++ draft, conditions can include single declarations - : expression { - $$ = $1; - parseContext.boolCheck($1->getLoc(), $1); - } - | fully_specified_type IDENTIFIER EQUAL initializer { - parseContext.boolCheck($2.loc, $1); - - TType type($1); - TIntermNode* initNode = parseContext.declareVariable($2.loc, *$2.string, $1, 0, $4); - if (initNode) - $$ = initNode->getAsTyped(); - else - $$ = 0; - } - ; - -switch_statement - : switch_statement_nonattributed { - $$ = $1; - } -GLSLANG_WEB_EXCLUDE_ON - | attribute switch_statement_nonattributed { - parseContext.requireExtensions($2->getLoc(), 1, &E_GL_EXT_control_flow_attributes, "attribute"); - parseContext.handleSwitchAttributes(*$1, $2); - $$ = $2; - } -GLSLANG_WEB_EXCLUDE_OFF - -switch_statement_nonattributed - : SWITCH LEFT_PAREN expression RIGHT_PAREN { - // start new switch sequence on the switch stack - ++parseContext.controlFlowNestingLevel; - ++parseContext.statementNestingLevel; - parseContext.switchSequenceStack.push_back(new TIntermSequence); - parseContext.switchLevel.push_back(parseContext.statementNestingLevel); - parseContext.symbolTable.push(); - } - LEFT_BRACE switch_statement_list RIGHT_BRACE { - $$ = parseContext.addSwitch($1.loc, $3, $7 ? $7->getAsAggregate() : 0); - delete parseContext.switchSequenceStack.back(); - parseContext.switchSequenceStack.pop_back(); - parseContext.switchLevel.pop_back(); - parseContext.symbolTable.pop(&parseContext.defaultPrecision[0]); - --parseContext.statementNestingLevel; - --parseContext.controlFlowNestingLevel; - } - ; - -switch_statement_list - : /* nothing */ { - $$ = 0; - } - | statement_list { - $$ = $1; - } - ; - -case_label - : CASE expression COLON { - $$ = 0; - if (parseContext.switchLevel.size() == 0) - parseContext.error($1.loc, "cannot appear outside switch statement", "case", ""); - else if (parseContext.switchLevel.back() != parseContext.statementNestingLevel) - parseContext.error($1.loc, "cannot be nested inside control flow", "case", ""); - else { - parseContext.constantValueCheck($2, "case"); - parseContext.integerCheck($2, "case"); - $$ = parseContext.intermediate.addBranch(EOpCase, $2, $1.loc); - } - } - | DEFAULT COLON { - $$ = 0; - if (parseContext.switchLevel.size() == 0) - parseContext.error($1.loc, "cannot appear outside switch statement", "default", ""); - else if (parseContext.switchLevel.back() != parseContext.statementNestingLevel) - parseContext.error($1.loc, "cannot be nested inside control flow", "default", ""); - else - $$ = parseContext.intermediate.addBranch(EOpDefault, $1.loc); - } - ; - -iteration_statement - : iteration_statement_nonattributed { - $$ = $1; - } -GLSLANG_WEB_EXCLUDE_ON - | attribute iteration_statement_nonattributed { - parseContext.requireExtensions($2->getLoc(), 1, &E_GL_EXT_control_flow_attributes, "attribute"); - parseContext.handleLoopAttributes(*$1, $2); - $$ = $2; - } -GLSLANG_WEB_EXCLUDE_OFF - -iteration_statement_nonattributed - : WHILE LEFT_PAREN { - if (! parseContext.limits.whileLoops) - parseContext.error($1.loc, "while loops not available", "limitation", ""); - parseContext.symbolTable.push(); - ++parseContext.loopNestingLevel; - ++parseContext.statementNestingLevel; - ++parseContext.controlFlowNestingLevel; - } - condition RIGHT_PAREN statement_no_new_scope { - parseContext.symbolTable.pop(&parseContext.defaultPrecision[0]); - $$ = parseContext.intermediate.addLoop($6, $4, 0, true, $1.loc); - --parseContext.loopNestingLevel; - --parseContext.statementNestingLevel; - --parseContext.controlFlowNestingLevel; - } - | DO { - ++parseContext.loopNestingLevel; - ++parseContext.statementNestingLevel; - ++parseContext.controlFlowNestingLevel; - } - statement WHILE LEFT_PAREN expression RIGHT_PAREN SEMICOLON { - if (! parseContext.limits.whileLoops) - parseContext.error($1.loc, "do-while loops not available", "limitation", ""); - - parseContext.boolCheck($8.loc, $6); - - $$ = parseContext.intermediate.addLoop($3, $6, 0, false, $4.loc); - --parseContext.loopNestingLevel; - --parseContext.statementNestingLevel; - --parseContext.controlFlowNestingLevel; - } - | FOR LEFT_PAREN { - parseContext.symbolTable.push(); - ++parseContext.loopNestingLevel; - ++parseContext.statementNestingLevel; - ++parseContext.controlFlowNestingLevel; - } - for_init_statement for_rest_statement RIGHT_PAREN statement_no_new_scope { - parseContext.symbolTable.pop(&parseContext.defaultPrecision[0]); - $$ = parseContext.intermediate.makeAggregate($4, $2.loc); - TIntermLoop* forLoop = parseContext.intermediate.addLoop($7, reinterpret_cast($5.node1), reinterpret_cast($5.node2), true, $1.loc); - if (! parseContext.limits.nonInductiveForLoops) - parseContext.inductiveLoopCheck($1.loc, $4, forLoop); - $$ = parseContext.intermediate.growAggregate($$, forLoop, $1.loc); - $$->getAsAggregate()->setOperator(EOpSequence); - --parseContext.loopNestingLevel; - --parseContext.statementNestingLevel; - --parseContext.controlFlowNestingLevel; - } - ; - -for_init_statement - : expression_statement { - $$ = $1; - } - | declaration_statement { - $$ = $1; - } - ; - -conditionopt - : condition { - $$ = $1; - } - | /* May be null */ { - $$ = 0; - } - ; - -for_rest_statement - : conditionopt SEMICOLON { - $$.node1 = $1; - $$.node2 = 0; - } - | conditionopt SEMICOLON expression { - $$.node1 = $1; - $$.node2 = $3; - } - ; - -jump_statement - : CONTINUE SEMICOLON { - if (parseContext.loopNestingLevel <= 0) - parseContext.error($1.loc, "continue statement only allowed in loops", "", ""); - $$ = parseContext.intermediate.addBranch(EOpContinue, $1.loc); - } - | BREAK SEMICOLON { - if (parseContext.loopNestingLevel + parseContext.switchSequenceStack.size() <= 0) - parseContext.error($1.loc, "break statement only allowed in switch and loops", "", ""); - $$ = parseContext.intermediate.addBranch(EOpBreak, $1.loc); - } - | RETURN SEMICOLON { - $$ = parseContext.intermediate.addBranch(EOpReturn, $1.loc); - if (parseContext.currentFunctionType->getBasicType() != EbtVoid) - parseContext.error($1.loc, "non-void function must return a value", "return", ""); - if (parseContext.inMain) - parseContext.postEntryPointReturn = true; - } - | RETURN expression SEMICOLON { - $$ = parseContext.handleReturnValue($1.loc, $2); - } - | DISCARD SEMICOLON { - parseContext.requireStage($1.loc, EShLangFragment, "discard"); - $$ = parseContext.intermediate.addBranch(EOpKill, $1.loc); - } - | TERMINATE_INVOCATION SEMICOLON { - parseContext.requireStage($1.loc, EShLangFragment, "terminateInvocation"); - $$ = parseContext.intermediate.addBranch(EOpTerminateInvocation, $1.loc); - } -GLSLANG_WEB_EXCLUDE_ON - | TERMINATE_RAY SEMICOLON { - parseContext.requireStage($1.loc, EShLangAnyHit, "terminateRayEXT"); - $$ = parseContext.intermediate.addBranch(EOpTerminateRayKHR, $1.loc); - } - | IGNORE_INTERSECTION SEMICOLON { - parseContext.requireStage($1.loc, EShLangAnyHit, "ignoreIntersectionEXT"); - $$ = parseContext.intermediate.addBranch(EOpIgnoreIntersectionKHR, $1.loc); - } -GLSLANG_WEB_EXCLUDE_OFF - ; - -// Grammar Note: No 'goto'. Gotos are not supported. - -translation_unit - : external_declaration { - $$ = $1; - parseContext.intermediate.setTreeRoot($$); - } - | translation_unit external_declaration { - if ($2 != nullptr) { - $$ = parseContext.intermediate.growAggregate($1, $2); - parseContext.intermediate.setTreeRoot($$); - } - } - ; - -external_declaration - : function_definition { - $$ = $1; - } - | declaration { - $$ = $1; - } -GLSLANG_WEB_EXCLUDE_ON - | SEMICOLON { - parseContext.requireProfile($1.loc, ~EEsProfile, "extraneous semicolon"); - parseContext.profileRequires($1.loc, ~EEsProfile, 460, nullptr, "extraneous semicolon"); - $$ = nullptr; - } -GLSLANG_WEB_EXCLUDE_OFF - ; - -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 - if (parseContext.currentFunctionType->getBasicType() != EbtVoid && ! parseContext.functionReturnsValue) - parseContext.error($1.loc, "function does not return a value:", "", $1.function->getName().c_str()); - parseContext.symbolTable.pop(&parseContext.defaultPrecision[0]); - $$ = parseContext.intermediate.growAggregate($1.intermNode, $3); - parseContext.intermediate.setAggregateOperator($$, EOpFunction, $1.function->getType(), $1.loc); - $$->getAsAggregate()->setName($1.function->getMangledName().c_str()); - - // store the pragma information for debug and optimize and other vendor specific - // information. This information can be queried from the parse tree - $$->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; - } - } - ; - -GLSLANG_WEB_EXCLUDE_ON -attribute - : LEFT_BRACKET LEFT_BRACKET attribute_list RIGHT_BRACKET RIGHT_BRACKET { - $$ = $3; - } - -attribute_list - : single_attribute { - $$ = $1; - } - | attribute_list COMMA single_attribute { - $$ = parseContext.mergeAttributes($1, $3); - } - -single_attribute - : IDENTIFIER { - $$ = parseContext.makeAttributes(*$1.string); - } - | IDENTIFIER LEFT_PAREN constant_expression RIGHT_PAREN { - $$ = parseContext.makeAttributes(*$1.string, $3); - } -GLSLANG_WEB_EXCLUDE_OFF - -GLSLANG_WEB_EXCLUDE_ON -spirv_requirements_list - : spirv_requirements_parameter { - $$ = $1; - } - | spirv_requirements_list COMMA spirv_requirements_parameter { - $$ = parseContext.mergeSpirvRequirements($2.loc, $1, $3); - } - -spirv_requirements_parameter - : IDENTIFIER EQUAL LEFT_BRACKET spirv_extension_list RIGHT_BRACKET { - $$ = parseContext.makeSpirvRequirement($2.loc, *$1.string, $4->getAsAggregate(), nullptr); - } - | IDENTIFIER EQUAL LEFT_BRACKET spirv_capability_list RIGHT_BRACKET { - $$ = parseContext.makeSpirvRequirement($2.loc, *$1.string, nullptr, $4->getAsAggregate()); - } - -spirv_extension_list - : STRING_LITERAL { - $$ = parseContext.intermediate.makeAggregate(parseContext.intermediate.addConstantUnion($1.string, $1.loc, true)); - } - | spirv_extension_list COMMA STRING_LITERAL { - $$ = parseContext.intermediate.growAggregate($1, parseContext.intermediate.addConstantUnion($3.string, $3.loc, true)); - } - -spirv_capability_list - : INTCONSTANT { - $$ = parseContext.intermediate.makeAggregate(parseContext.intermediate.addConstantUnion($1.i, $1.loc, true)); - } - | spirv_capability_list COMMA INTCONSTANT { - $$ = parseContext.intermediate.growAggregate($1, parseContext.intermediate.addConstantUnion($3.i, $3.loc, true)); - } - -spirv_execution_mode_qualifier - : SPIRV_EXECUTION_MODE LEFT_PAREN INTCONSTANT RIGHT_PAREN { - parseContext.intermediate.insertSpirvExecutionMode($3.i); - $$ = 0; - } - | SPIRV_EXECUTION_MODE LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT RIGHT_PAREN { - parseContext.intermediate.insertSpirvRequirement($3); - parseContext.intermediate.insertSpirvExecutionMode($5.i); - $$ = 0; - } - | SPIRV_EXECUTION_MODE LEFT_PAREN INTCONSTANT COMMA spirv_execution_mode_parameter_list RIGHT_PAREN { - parseContext.intermediate.insertSpirvExecutionMode($3.i, $5->getAsAggregate()); - $$ = 0; - } - | SPIRV_EXECUTION_MODE LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT COMMA spirv_execution_mode_parameter_list RIGHT_PAREN { - parseContext.intermediate.insertSpirvRequirement($3); - parseContext.intermediate.insertSpirvExecutionMode($5.i, $7->getAsAggregate()); - $$ = 0; - } - | SPIRV_EXECUTION_MODE_ID LEFT_PAREN INTCONSTANT COMMA spirv_execution_mode_id_parameter_list RIGHT_PAREN { - parseContext.intermediate.insertSpirvExecutionModeId($3.i, $5->getAsAggregate()); - $$ = 0; - } - | SPIRV_EXECUTION_MODE_ID LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT COMMA spirv_execution_mode_id_parameter_list RIGHT_PAREN { - parseContext.intermediate.insertSpirvRequirement($3); - parseContext.intermediate.insertSpirvExecutionModeId($5.i, $7->getAsAggregate()); - $$ = 0; - } - -spirv_execution_mode_parameter_list - : spirv_execution_mode_parameter { - $$ = parseContext.intermediate.makeAggregate($1); - } - | spirv_execution_mode_parameter_list COMMA spirv_execution_mode_parameter { - $$ = parseContext.intermediate.growAggregate($1, $3); - } - -spirv_execution_mode_parameter - : FLOATCONSTANT { - $$ = parseContext.intermediate.addConstantUnion($1.d, EbtFloat, $1.loc, true); - } - | INTCONSTANT { - $$ = parseContext.intermediate.addConstantUnion($1.i, $1.loc, true); - } - | UINTCONSTANT { - $$ = parseContext.intermediate.addConstantUnion($1.u, $1.loc, true); - } - | BOOLCONSTANT { - $$ = parseContext.intermediate.addConstantUnion($1.b, $1.loc, true); - } - | STRING_LITERAL { - $$ = parseContext.intermediate.addConstantUnion($1.string, $1.loc, true); - } - -spirv_execution_mode_id_parameter_list - : constant_expression { - if ($1->getBasicType() != EbtFloat && - $1->getBasicType() != EbtInt && - $1->getBasicType() != EbtUint && - $1->getBasicType() != EbtBool && - $1->getBasicType() != EbtString) - parseContext.error($1->getLoc(), "this type not allowed", $1->getType().getBasicString(), ""); - $$ = parseContext.intermediate.makeAggregate($1); - } - | spirv_execution_mode_id_parameter_list COMMA constant_expression { - if ($3->getBasicType() != EbtFloat && - $3->getBasicType() != EbtInt && - $3->getBasicType() != EbtUint && - $3->getBasicType() != EbtBool && - $3->getBasicType() != EbtString) - parseContext.error($3->getLoc(), "this type not allowed", $3->getType().getBasicString(), ""); - $$ = parseContext.intermediate.growAggregate($1, $3); - } - -spirv_storage_class_qualifier - : SPIRV_STORAGE_CLASS LEFT_PAREN INTCONSTANT RIGHT_PAREN { - $$.init($1.loc); - $$.qualifier.storage = EvqSpirvStorageClass; - $$.qualifier.spirvStorageClass = $3.i; - } - | SPIRV_STORAGE_CLASS LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT RIGHT_PAREN { - $$.init($1.loc); - parseContext.intermediate.insertSpirvRequirement($3); - $$.qualifier.storage = EvqSpirvStorageClass; - $$.qualifier.spirvStorageClass = $5.i; - } - -spirv_decorate_qualifier - : SPIRV_DECORATE LEFT_PAREN INTCONSTANT RIGHT_PAREN{ - $$.init($1.loc); - $$.qualifier.setSpirvDecorate($3.i); - } - | SPIRV_DECORATE LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT RIGHT_PAREN{ - $$.init($1.loc); - parseContext.intermediate.insertSpirvRequirement($3); - $$.qualifier.setSpirvDecorate($5.i); - } - | SPIRV_DECORATE LEFT_PAREN INTCONSTANT COMMA spirv_decorate_parameter_list RIGHT_PAREN { - $$.init($1.loc); - $$.qualifier.setSpirvDecorate($3.i, $5->getAsAggregate()); - } - | SPIRV_DECORATE LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT COMMA spirv_decorate_parameter_list RIGHT_PAREN { - $$.init($1.loc); - parseContext.intermediate.insertSpirvRequirement($3); - $$.qualifier.setSpirvDecorate($5.i, $7->getAsAggregate()); - } - | SPIRV_DECORATE_ID LEFT_PAREN INTCONSTANT COMMA spirv_decorate_id_parameter_list RIGHT_PAREN { - $$.init($1.loc); - $$.qualifier.setSpirvDecorateId($3.i, $5->getAsAggregate()); - } - | SPIRV_DECORATE_ID LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT COMMA spirv_decorate_id_parameter_list RIGHT_PAREN { - $$.init($1.loc); - parseContext.intermediate.insertSpirvRequirement($3); - $$.qualifier.setSpirvDecorateId($5.i, $7->getAsAggregate()); - } - | SPIRV_DECORATE_STRING LEFT_PAREN INTCONSTANT COMMA spirv_decorate_string_parameter_list RIGHT_PAREN { - $$.init($1.loc); - $$.qualifier.setSpirvDecorateString($3.i, $5->getAsAggregate()); - } - | SPIRV_DECORATE_STRING LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT COMMA spirv_decorate_string_parameter_list RIGHT_PAREN { - $$.init($1.loc); - parseContext.intermediate.insertSpirvRequirement($3); - $$.qualifier.setSpirvDecorateString($5.i, $7->getAsAggregate()); - } - -spirv_decorate_parameter_list - : spirv_decorate_parameter { - $$ = parseContext.intermediate.makeAggregate($1); - } - | spirv_decorate_parameter_list COMMA spirv_decorate_parameter { - $$ = parseContext.intermediate.growAggregate($1, $3); - } - -spirv_decorate_parameter - : FLOATCONSTANT { - $$ = parseContext.intermediate.addConstantUnion($1.d, EbtFloat, $1.loc, true); - } - | INTCONSTANT { - $$ = parseContext.intermediate.addConstantUnion($1.i, $1.loc, true); - } - | UINTCONSTANT { - $$ = parseContext.intermediate.addConstantUnion($1.u, $1.loc, true); - } - | BOOLCONSTANT { - $$ = parseContext.intermediate.addConstantUnion($1.b, $1.loc, true); - } - -spirv_decorate_id_parameter_list - : constant_expression { - if ($1->getBasicType() != EbtFloat && - $1->getBasicType() != EbtInt && - $1->getBasicType() != EbtUint && - $1->getBasicType() != EbtBool) - parseContext.error($1->getLoc(), "this type not allowed", $1->getType().getBasicString(), ""); - $$ = parseContext.intermediate.makeAggregate($1); - } - | spirv_decorate_id_parameter_list COMMA constant_expression { - if ($3->getBasicType() != EbtFloat && - $3->getBasicType() != EbtInt && - $3->getBasicType() != EbtUint && - $3->getBasicType() != EbtBool) - parseContext.error($3->getLoc(), "this type not allowed", $3->getType().getBasicString(), ""); - $$ = parseContext.intermediate.growAggregate($1, $3); - } - -spirv_decorate_string_parameter_list - : STRING_LITERAL { - $$ = parseContext.intermediate.makeAggregate( - parseContext.intermediate.addConstantUnion($1.string, $1.loc, true)); - } - | spirv_decorate_string_parameter_list COMMA STRING_LITERAL { - $$ = parseContext.intermediate.growAggregate($1, parseContext.intermediate.addConstantUnion($3.string, $3.loc, true)); - } - -spirv_type_specifier - : SPIRV_TYPE LEFT_PAREN spirv_instruction_qualifier_list COMMA spirv_type_parameter_list RIGHT_PAREN { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.setSpirvType(*$3, $5); - } - | SPIRV_TYPE LEFT_PAREN spirv_requirements_list COMMA spirv_instruction_qualifier_list COMMA spirv_type_parameter_list RIGHT_PAREN { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - parseContext.intermediate.insertSpirvRequirement($3); - $$.setSpirvType(*$5, $7); - } - | SPIRV_TYPE LEFT_PAREN spirv_instruction_qualifier_list RIGHT_PAREN { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.setSpirvType(*$3); - } - | SPIRV_TYPE LEFT_PAREN spirv_requirements_list COMMA spirv_instruction_qualifier_list RIGHT_PAREN { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - parseContext.intermediate.insertSpirvRequirement($3); - $$.setSpirvType(*$5); - } - -spirv_type_parameter_list - : spirv_type_parameter { - $$ = $1; - } - | spirv_type_parameter_list COMMA spirv_type_parameter { - $$ = parseContext.mergeSpirvTypeParameters($1, $3); - } - -spirv_type_parameter - : constant_expression { - $$ = parseContext.makeSpirvTypeParameters($1->getLoc(), $1->getAsConstantUnion()); - } - | type_specifier { - $$ = parseContext.makeSpirvTypeParameters($1); - } - -spirv_instruction_qualifier - : SPIRV_INSTRUCTION LEFT_PAREN spirv_instruction_qualifier_list RIGHT_PAREN { - $$ = $3; - } - | SPIRV_INSTRUCTION LEFT_PAREN spirv_requirements_list COMMA spirv_instruction_qualifier_list RIGHT_PAREN { - parseContext.intermediate.insertSpirvRequirement($3); - $$ = $5; - } - -spirv_instruction_qualifier_list - : spirv_instruction_qualifier_id { - $$ = $1; - } - | spirv_instruction_qualifier_list COMMA spirv_instruction_qualifier_id { - $$ = parseContext.mergeSpirvInstruction($2.loc, $1, $3); - } - -spirv_instruction_qualifier_id - : IDENTIFIER EQUAL STRING_LITERAL { - $$ = parseContext.makeSpirvInstruction($2.loc, *$1.string, *$3.string); - } - | IDENTIFIER EQUAL INTCONSTANT { - $$ = parseContext.makeSpirvInstruction($2.loc, *$1.string, $3.i); - } -GLSLANG_WEB_EXCLUDE_OFF - -%% diff --git a/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/glslang.y b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/glslang.y index 53c576778..6cd221ff3 100644 --- a/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/glslang.y +++ b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/glslang.y @@ -178,7 +178,9 @@ extern int yylex(YYSTYPE*, TParseContext&); %token RAYQUERYEXT %token FCOOPMATNV ICOOPMATNV UCOOPMATNV %token COOPMAT +%token COOPVECNV %token HITOBJECTNV HITOBJECTATTRNV +%token TENSORLAYOUTNV TENSORVIEWNV // combined image/sampler %token SAMPLERCUBEARRAY SAMPLERCUBEARRAYSHADOW @@ -275,11 +277,11 @@ extern int yylex(YYSTYPE*, TParseContext&); %token DOUBLECONSTANT INT16CONSTANT UINT16CONSTANT FLOAT16CONSTANT INT32CONSTANT UINT32CONSTANT %token INT64CONSTANT UINT64CONSTANT -%token SUBROUTINE DEMOTE +%token SUBROUTINE DEMOTE FUNCTION %token PAYLOADNV PAYLOADINNV HITATTRNV CALLDATANV CALLDATAINNV %token PAYLOADEXT PAYLOADINEXT HITATTREXT CALLDATAEXT CALLDATAINEXT %token PATCH SAMPLE NONUNIFORM -%token COHERENT VOLATILE RESTRICT READONLY WRITEONLY DEVICECOHERENT QUEUEFAMILYCOHERENT WORKGROUPCOHERENT +%token COHERENT VOLATILE RESTRICT READONLY WRITEONLY NONTEMPORAL DEVICECOHERENT QUEUEFAMILYCOHERENT WORKGROUPCOHERENT %token SUBGROUPCOHERENT NONPRIVATE SHADERCALLCOHERENT %token NOPERSPECTIVE EXPLICITINTERPAMD PERVERTEXEXT PERVERTEXNV PERPRIMITIVENV PERVIEWNV PERTASKNV PERPRIMITIVEEXT TASKPAYLOADWORKGROUPEXT %token PRECISE @@ -1104,7 +1106,7 @@ parameter_declaration $$ = $2; if ($1.qualifier.precision != EpqNone) $$.param.type->getQualifier().precision = $1.qualifier.precision; - parseContext.precisionQualifierCheck($$.loc, $$.param.type->getBasicType(), $$.param.type->getQualifier(), $$.param.type->isCoopMat()); + parseContext.precisionQualifierCheck($$.loc, $$.param.type->getBasicType(), $$.param.type->getQualifier(), $$.param.type->isCoopMatOrVec()); parseContext.checkNoShaderLayouts($1.loc, $1.shaderQualifiers); parseContext.parameterTypeCheck($2.loc, $1.qualifier.storage, *$$.param.type); @@ -1116,7 +1118,7 @@ parameter_declaration parseContext.parameterTypeCheck($1.loc, EvqIn, *$1.param.type); parseContext.paramCheckFixStorage($1.loc, EvqTemporary, *$$.param.type); - parseContext.precisionQualifierCheck($$.loc, $$.param.type->getBasicType(), $$.param.type->getQualifier(), $$.param.type->isCoopMat()); + parseContext.precisionQualifierCheck($$.loc, $$.param.type->getBasicType(), $$.param.type->getQualifier(), $$.param.type->isCoopMatOrVec()); } // // Without name @@ -1125,7 +1127,7 @@ parameter_declaration $$ = $2; if ($1.qualifier.precision != EpqNone) $$.param.type->getQualifier().precision = $1.qualifier.precision; - parseContext.precisionQualifierCheck($1.loc, $$.param.type->getBasicType(), $$.param.type->getQualifier(), $$.param.type->isCoopMat()); + parseContext.precisionQualifierCheck($1.loc, $$.param.type->getBasicType(), $$.param.type->getQualifier(), $$.param.type->isCoopMatOrVec()); parseContext.checkNoShaderLayouts($1.loc, $1.shaderQualifiers); parseContext.parameterTypeCheck($2.loc, $1.qualifier.storage, *$$.param.type); @@ -1136,7 +1138,7 @@ parameter_declaration parseContext.parameterTypeCheck($1.loc, EvqIn, *$1.param.type); parseContext.paramCheckFixStorage($1.loc, EvqTemporary, *$$.param.type); - parseContext.precisionQualifierCheck($$.loc, $$.param.type->getBasicType(), $$.param.type->getQualifier(), $$.param.type->isCoopMat()); + parseContext.precisionQualifierCheck($$.loc, $$.param.type->getBasicType(), $$.param.type->getQualifier(), $$.param.type->isCoopMatOrVec()); } ; @@ -1211,7 +1213,7 @@ fully_specified_type parseContext.profileRequires($1.loc, ENoProfile, 120, E_GL_3DL_array_objects, "arrayed type"); parseContext.profileRequires($1.loc, EEsProfile, 300, 0, "arrayed type"); } - parseContext.precisionQualifierCheck($$.loc, $$.basicType, $$.qualifier, $$.isCoopmat()); + parseContext.precisionQualifierCheck($$.loc, $$.basicType, $$.qualifier, $$.isCoopmatOrvec()); } | type_qualifier type_specifier { parseContext.globalQualifierFixCheck($1.loc, $1.qualifier, false, &$2); @@ -1228,7 +1230,7 @@ fully_specified_type parseContext.checkNoShaderLayouts($2.loc, $1.shaderQualifiers); $2.shaderQualifiers.merge($1.shaderQualifiers); parseContext.mergeQualifiers($2.loc, $2.qualifier, $1.qualifier, true); - parseContext.precisionQualifierCheck($2.loc, $2.basicType, $2.qualifier, $2.isCoopmat()); + parseContext.precisionQualifierCheck($2.loc, $2.basicType, $2.qualifier, $2.isCoopmatOrvec()); $$ = $2; @@ -1656,6 +1658,10 @@ storage_qualifier $$.init($1.loc); $$.qualifier.writeonly = true; } + | NONTEMPORAL { + $$.init($1.loc); + $$.qualifier.nontemporal = true; + } | SUBROUTINE { parseContext.spvRemoved($1.loc, "subroutine"); parseContext.globalCheck($1.loc, "subroutine"); @@ -1700,7 +1706,7 @@ type_specifier $$ = $1; $$.qualifier.precision = parseContext.getDefaultPrecision($$); $$.typeParameters = $2; - parseContext.coopMatTypeParametersCheck($1.loc, $$); + parseContext.typeParametersCheck($1.loc, $$); } | type_specifier_nonarray type_parameter_specifier_opt array_specifier { @@ -1709,7 +1715,7 @@ type_specifier $$.qualifier.precision = parseContext.getDefaultPrecision($$); $$.typeParameters = $2; $$.arraySizes = $3.arraySizes; - parseContext.coopMatTypeParametersCheck($1.loc, $$); + parseContext.typeParametersCheck($1.loc, $$); } ; @@ -3535,6 +3541,26 @@ type_specifier_nonarray $$.coopmatNV = false; $$.coopmatKHR = true; } + | TENSORLAYOUTNV { + parseContext.tensorLayoutViewCheck($1.loc, "tensorLayoutNV", parseContext.symbolTable.atBuiltInLevel()); + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtTensorLayoutNV; + } + | TENSORVIEWNV { + parseContext.tensorLayoutViewCheck($1.loc, "tensorViewNV", parseContext.symbolTable.atBuiltInLevel()); + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtTensorViewNV; + } + | FUNCTION { + $$.init($1.loc); + $$.basicType = EbtFunction; + } + | COOPVECNV { + parseContext.coopvecCheck($1.loc, "coopvecNV", parseContext.symbolTable.atBuiltInLevel()); + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtCoopvecNV; + $$.coopvecNV = true; + } | spirv_type_specifier { parseContext.requireExtensions($1.loc, 1, &E_GL_EXT_spirv_intrinsics, "SPIR-V type specifier"); $$ = $1; @@ -3636,7 +3662,7 @@ struct_declaration $$ = $2; parseContext.voidErrorCheck($1.loc, (*$2)[0].type->getFieldName(), $1.basicType); - parseContext.precisionQualifierCheck($1.loc, $1.basicType, $1.qualifier, $1.isCoopmat()); + parseContext.precisionQualifierCheck($1.loc, $1.basicType, $1.qualifier, $1.isCoopmatOrvec()); for (unsigned int i = 0; i < $$->size(); ++i) { TType type($1); @@ -3660,7 +3686,7 @@ struct_declaration parseContext.memberQualifierCheck($1); parseContext.voidErrorCheck($2.loc, (*$3)[0].type->getFieldName(), $2.basicType); parseContext.mergeQualifiers($2.loc, $2.qualifier, $1.qualifier, true); - parseContext.precisionQualifierCheck($2.loc, $2.basicType, $2.qualifier, $2.isCoopmat()); + parseContext.precisionQualifierCheck($2.loc, $2.basicType, $2.qualifier, $2.isCoopmatOrvec()); for (unsigned int i = 0; i < $$->size(); ++i) { TType type($2); @@ -3773,8 +3799,10 @@ compound_statement --parseContext.statementNestingLevel; } RIGHT_BRACE { - if ($3 && $3->getAsAggregate()) + if ($3 && $3->getAsAggregate()) { $3->getAsAggregate()->setOperator(parseContext.intermediate.getDebugInfo() ? EOpScope : EOpSequence); + $3->getAsAggregate()->setEndLoc($5.loc); + } $$ = $3; } ; @@ -3810,8 +3838,10 @@ compound_statement_no_new_scope $$ = 0; } | LEFT_BRACE statement_list RIGHT_BRACE { - if ($2 && $2->getAsAggregate()) + if ($2 && $2->getAsAggregate()) { $2->getAsAggregate()->setOperator(EOpSequence); + $2->getAsAggregate()->setEndLoc($3.loc); + } $$ = $2; } ; diff --git a/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/glslang_tab.cpp b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/glslang_tab.cpp index 5764d3929..c16143918 100644 --- a/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/glslang_tab.cpp +++ b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/glslang_tab.cpp @@ -288,436 +288,441 @@ enum yysymbol_kind_t YYSYMBOL_ICOOPMATNV = 164, /* ICOOPMATNV */ YYSYMBOL_UCOOPMATNV = 165, /* UCOOPMATNV */ YYSYMBOL_COOPMAT = 166, /* COOPMAT */ - YYSYMBOL_HITOBJECTNV = 167, /* HITOBJECTNV */ - YYSYMBOL_HITOBJECTATTRNV = 168, /* HITOBJECTATTRNV */ - YYSYMBOL_SAMPLERCUBEARRAY = 169, /* SAMPLERCUBEARRAY */ - YYSYMBOL_SAMPLERCUBEARRAYSHADOW = 170, /* SAMPLERCUBEARRAYSHADOW */ - YYSYMBOL_ISAMPLERCUBEARRAY = 171, /* ISAMPLERCUBEARRAY */ - YYSYMBOL_USAMPLERCUBEARRAY = 172, /* USAMPLERCUBEARRAY */ - YYSYMBOL_SAMPLER1D = 173, /* SAMPLER1D */ - YYSYMBOL_SAMPLER1DARRAY = 174, /* SAMPLER1DARRAY */ - YYSYMBOL_SAMPLER1DARRAYSHADOW = 175, /* SAMPLER1DARRAYSHADOW */ - YYSYMBOL_ISAMPLER1D = 176, /* ISAMPLER1D */ - YYSYMBOL_SAMPLER1DSHADOW = 177, /* SAMPLER1DSHADOW */ - YYSYMBOL_SAMPLER2DRECT = 178, /* SAMPLER2DRECT */ - YYSYMBOL_SAMPLER2DRECTSHADOW = 179, /* SAMPLER2DRECTSHADOW */ - YYSYMBOL_ISAMPLER2DRECT = 180, /* ISAMPLER2DRECT */ - YYSYMBOL_USAMPLER2DRECT = 181, /* USAMPLER2DRECT */ - YYSYMBOL_SAMPLERBUFFER = 182, /* SAMPLERBUFFER */ - YYSYMBOL_ISAMPLERBUFFER = 183, /* ISAMPLERBUFFER */ - YYSYMBOL_USAMPLERBUFFER = 184, /* USAMPLERBUFFER */ - YYSYMBOL_SAMPLER2DMS = 185, /* SAMPLER2DMS */ - YYSYMBOL_ISAMPLER2DMS = 186, /* ISAMPLER2DMS */ - YYSYMBOL_USAMPLER2DMS = 187, /* USAMPLER2DMS */ - YYSYMBOL_SAMPLER2DMSARRAY = 188, /* SAMPLER2DMSARRAY */ - YYSYMBOL_ISAMPLER2DMSARRAY = 189, /* ISAMPLER2DMSARRAY */ - YYSYMBOL_USAMPLER2DMSARRAY = 190, /* USAMPLER2DMSARRAY */ - YYSYMBOL_SAMPLEREXTERNALOES = 191, /* SAMPLEREXTERNALOES */ - YYSYMBOL_SAMPLEREXTERNAL2DY2YEXT = 192, /* SAMPLEREXTERNAL2DY2YEXT */ - YYSYMBOL_ISAMPLER1DARRAY = 193, /* ISAMPLER1DARRAY */ - YYSYMBOL_USAMPLER1D = 194, /* USAMPLER1D */ - YYSYMBOL_USAMPLER1DARRAY = 195, /* USAMPLER1DARRAY */ - YYSYMBOL_F16SAMPLER1D = 196, /* F16SAMPLER1D */ - YYSYMBOL_F16SAMPLER2D = 197, /* F16SAMPLER2D */ - YYSYMBOL_F16SAMPLER3D = 198, /* F16SAMPLER3D */ - YYSYMBOL_F16SAMPLER2DRECT = 199, /* F16SAMPLER2DRECT */ - YYSYMBOL_F16SAMPLERCUBE = 200, /* F16SAMPLERCUBE */ - YYSYMBOL_F16SAMPLER1DARRAY = 201, /* F16SAMPLER1DARRAY */ - YYSYMBOL_F16SAMPLER2DARRAY = 202, /* F16SAMPLER2DARRAY */ - YYSYMBOL_F16SAMPLERCUBEARRAY = 203, /* F16SAMPLERCUBEARRAY */ - YYSYMBOL_F16SAMPLERBUFFER = 204, /* F16SAMPLERBUFFER */ - YYSYMBOL_F16SAMPLER2DMS = 205, /* F16SAMPLER2DMS */ - YYSYMBOL_F16SAMPLER2DMSARRAY = 206, /* F16SAMPLER2DMSARRAY */ - YYSYMBOL_F16SAMPLER1DSHADOW = 207, /* F16SAMPLER1DSHADOW */ - YYSYMBOL_F16SAMPLER2DSHADOW = 208, /* F16SAMPLER2DSHADOW */ - YYSYMBOL_F16SAMPLER1DARRAYSHADOW = 209, /* F16SAMPLER1DARRAYSHADOW */ - YYSYMBOL_F16SAMPLER2DARRAYSHADOW = 210, /* F16SAMPLER2DARRAYSHADOW */ - YYSYMBOL_F16SAMPLER2DRECTSHADOW = 211, /* F16SAMPLER2DRECTSHADOW */ - YYSYMBOL_F16SAMPLERCUBESHADOW = 212, /* F16SAMPLERCUBESHADOW */ - YYSYMBOL_F16SAMPLERCUBEARRAYSHADOW = 213, /* F16SAMPLERCUBEARRAYSHADOW */ - YYSYMBOL_IMAGE1D = 214, /* IMAGE1D */ - YYSYMBOL_IIMAGE1D = 215, /* IIMAGE1D */ - YYSYMBOL_UIMAGE1D = 216, /* UIMAGE1D */ - YYSYMBOL_IMAGE2D = 217, /* IMAGE2D */ - YYSYMBOL_IIMAGE2D = 218, /* IIMAGE2D */ - YYSYMBOL_UIMAGE2D = 219, /* UIMAGE2D */ - YYSYMBOL_IMAGE3D = 220, /* IMAGE3D */ - YYSYMBOL_IIMAGE3D = 221, /* IIMAGE3D */ - YYSYMBOL_UIMAGE3D = 222, /* UIMAGE3D */ - YYSYMBOL_IMAGE2DRECT = 223, /* IMAGE2DRECT */ - YYSYMBOL_IIMAGE2DRECT = 224, /* IIMAGE2DRECT */ - YYSYMBOL_UIMAGE2DRECT = 225, /* UIMAGE2DRECT */ - YYSYMBOL_IMAGECUBE = 226, /* IMAGECUBE */ - YYSYMBOL_IIMAGECUBE = 227, /* IIMAGECUBE */ - YYSYMBOL_UIMAGECUBE = 228, /* UIMAGECUBE */ - YYSYMBOL_IMAGEBUFFER = 229, /* IMAGEBUFFER */ - YYSYMBOL_IIMAGEBUFFER = 230, /* IIMAGEBUFFER */ - YYSYMBOL_UIMAGEBUFFER = 231, /* UIMAGEBUFFER */ - YYSYMBOL_IMAGE1DARRAY = 232, /* IMAGE1DARRAY */ - YYSYMBOL_IIMAGE1DARRAY = 233, /* IIMAGE1DARRAY */ - YYSYMBOL_UIMAGE1DARRAY = 234, /* UIMAGE1DARRAY */ - YYSYMBOL_IMAGE2DARRAY = 235, /* IMAGE2DARRAY */ - YYSYMBOL_IIMAGE2DARRAY = 236, /* IIMAGE2DARRAY */ - YYSYMBOL_UIMAGE2DARRAY = 237, /* UIMAGE2DARRAY */ - YYSYMBOL_IMAGECUBEARRAY = 238, /* IMAGECUBEARRAY */ - YYSYMBOL_IIMAGECUBEARRAY = 239, /* IIMAGECUBEARRAY */ - YYSYMBOL_UIMAGECUBEARRAY = 240, /* UIMAGECUBEARRAY */ - YYSYMBOL_IMAGE2DMS = 241, /* IMAGE2DMS */ - YYSYMBOL_IIMAGE2DMS = 242, /* IIMAGE2DMS */ - YYSYMBOL_UIMAGE2DMS = 243, /* UIMAGE2DMS */ - YYSYMBOL_IMAGE2DMSARRAY = 244, /* IMAGE2DMSARRAY */ - YYSYMBOL_IIMAGE2DMSARRAY = 245, /* IIMAGE2DMSARRAY */ - YYSYMBOL_UIMAGE2DMSARRAY = 246, /* UIMAGE2DMSARRAY */ - YYSYMBOL_F16IMAGE1D = 247, /* F16IMAGE1D */ - YYSYMBOL_F16IMAGE2D = 248, /* F16IMAGE2D */ - YYSYMBOL_F16IMAGE3D = 249, /* F16IMAGE3D */ - YYSYMBOL_F16IMAGE2DRECT = 250, /* F16IMAGE2DRECT */ - YYSYMBOL_F16IMAGECUBE = 251, /* F16IMAGECUBE */ - YYSYMBOL_F16IMAGE1DARRAY = 252, /* F16IMAGE1DARRAY */ - YYSYMBOL_F16IMAGE2DARRAY = 253, /* F16IMAGE2DARRAY */ - YYSYMBOL_F16IMAGECUBEARRAY = 254, /* F16IMAGECUBEARRAY */ - YYSYMBOL_F16IMAGEBUFFER = 255, /* F16IMAGEBUFFER */ - YYSYMBOL_F16IMAGE2DMS = 256, /* F16IMAGE2DMS */ - YYSYMBOL_F16IMAGE2DMSARRAY = 257, /* F16IMAGE2DMSARRAY */ - YYSYMBOL_I64IMAGE1D = 258, /* I64IMAGE1D */ - YYSYMBOL_U64IMAGE1D = 259, /* U64IMAGE1D */ - YYSYMBOL_I64IMAGE2D = 260, /* I64IMAGE2D */ - YYSYMBOL_U64IMAGE2D = 261, /* U64IMAGE2D */ - YYSYMBOL_I64IMAGE3D = 262, /* I64IMAGE3D */ - YYSYMBOL_U64IMAGE3D = 263, /* U64IMAGE3D */ - YYSYMBOL_I64IMAGE2DRECT = 264, /* I64IMAGE2DRECT */ - YYSYMBOL_U64IMAGE2DRECT = 265, /* U64IMAGE2DRECT */ - YYSYMBOL_I64IMAGECUBE = 266, /* I64IMAGECUBE */ - YYSYMBOL_U64IMAGECUBE = 267, /* U64IMAGECUBE */ - YYSYMBOL_I64IMAGEBUFFER = 268, /* I64IMAGEBUFFER */ - YYSYMBOL_U64IMAGEBUFFER = 269, /* U64IMAGEBUFFER */ - YYSYMBOL_I64IMAGE1DARRAY = 270, /* I64IMAGE1DARRAY */ - YYSYMBOL_U64IMAGE1DARRAY = 271, /* U64IMAGE1DARRAY */ - YYSYMBOL_I64IMAGE2DARRAY = 272, /* I64IMAGE2DARRAY */ - YYSYMBOL_U64IMAGE2DARRAY = 273, /* U64IMAGE2DARRAY */ - YYSYMBOL_I64IMAGECUBEARRAY = 274, /* I64IMAGECUBEARRAY */ - YYSYMBOL_U64IMAGECUBEARRAY = 275, /* U64IMAGECUBEARRAY */ - YYSYMBOL_I64IMAGE2DMS = 276, /* I64IMAGE2DMS */ - YYSYMBOL_U64IMAGE2DMS = 277, /* U64IMAGE2DMS */ - YYSYMBOL_I64IMAGE2DMSARRAY = 278, /* I64IMAGE2DMSARRAY */ - YYSYMBOL_U64IMAGE2DMSARRAY = 279, /* U64IMAGE2DMSARRAY */ - YYSYMBOL_TEXTURECUBEARRAY = 280, /* TEXTURECUBEARRAY */ - YYSYMBOL_ITEXTURECUBEARRAY = 281, /* ITEXTURECUBEARRAY */ - YYSYMBOL_UTEXTURECUBEARRAY = 282, /* UTEXTURECUBEARRAY */ - YYSYMBOL_TEXTURE1D = 283, /* TEXTURE1D */ - YYSYMBOL_ITEXTURE1D = 284, /* ITEXTURE1D */ - YYSYMBOL_UTEXTURE1D = 285, /* UTEXTURE1D */ - YYSYMBOL_TEXTURE1DARRAY = 286, /* TEXTURE1DARRAY */ - YYSYMBOL_ITEXTURE1DARRAY = 287, /* ITEXTURE1DARRAY */ - YYSYMBOL_UTEXTURE1DARRAY = 288, /* UTEXTURE1DARRAY */ - YYSYMBOL_TEXTURE2DRECT = 289, /* TEXTURE2DRECT */ - YYSYMBOL_ITEXTURE2DRECT = 290, /* ITEXTURE2DRECT */ - YYSYMBOL_UTEXTURE2DRECT = 291, /* UTEXTURE2DRECT */ - YYSYMBOL_TEXTUREBUFFER = 292, /* TEXTUREBUFFER */ - YYSYMBOL_ITEXTUREBUFFER = 293, /* ITEXTUREBUFFER */ - YYSYMBOL_UTEXTUREBUFFER = 294, /* UTEXTUREBUFFER */ - YYSYMBOL_TEXTURE2DMS = 295, /* TEXTURE2DMS */ - YYSYMBOL_ITEXTURE2DMS = 296, /* ITEXTURE2DMS */ - YYSYMBOL_UTEXTURE2DMS = 297, /* UTEXTURE2DMS */ - YYSYMBOL_TEXTURE2DMSARRAY = 298, /* TEXTURE2DMSARRAY */ - YYSYMBOL_ITEXTURE2DMSARRAY = 299, /* ITEXTURE2DMSARRAY */ - YYSYMBOL_UTEXTURE2DMSARRAY = 300, /* UTEXTURE2DMSARRAY */ - YYSYMBOL_F16TEXTURE1D = 301, /* F16TEXTURE1D */ - YYSYMBOL_F16TEXTURE2D = 302, /* F16TEXTURE2D */ - YYSYMBOL_F16TEXTURE3D = 303, /* F16TEXTURE3D */ - YYSYMBOL_F16TEXTURE2DRECT = 304, /* F16TEXTURE2DRECT */ - YYSYMBOL_F16TEXTURECUBE = 305, /* F16TEXTURECUBE */ - YYSYMBOL_F16TEXTURE1DARRAY = 306, /* F16TEXTURE1DARRAY */ - YYSYMBOL_F16TEXTURE2DARRAY = 307, /* F16TEXTURE2DARRAY */ - YYSYMBOL_F16TEXTURECUBEARRAY = 308, /* F16TEXTURECUBEARRAY */ - YYSYMBOL_F16TEXTUREBUFFER = 309, /* F16TEXTUREBUFFER */ - YYSYMBOL_F16TEXTURE2DMS = 310, /* F16TEXTURE2DMS */ - YYSYMBOL_F16TEXTURE2DMSARRAY = 311, /* F16TEXTURE2DMSARRAY */ - YYSYMBOL_SUBPASSINPUT = 312, /* SUBPASSINPUT */ - YYSYMBOL_SUBPASSINPUTMS = 313, /* SUBPASSINPUTMS */ - YYSYMBOL_ISUBPASSINPUT = 314, /* ISUBPASSINPUT */ - YYSYMBOL_ISUBPASSINPUTMS = 315, /* ISUBPASSINPUTMS */ - YYSYMBOL_USUBPASSINPUT = 316, /* USUBPASSINPUT */ - YYSYMBOL_USUBPASSINPUTMS = 317, /* USUBPASSINPUTMS */ - YYSYMBOL_F16SUBPASSINPUT = 318, /* F16SUBPASSINPUT */ - YYSYMBOL_F16SUBPASSINPUTMS = 319, /* F16SUBPASSINPUTMS */ - YYSYMBOL_SPIRV_INSTRUCTION = 320, /* SPIRV_INSTRUCTION */ - YYSYMBOL_SPIRV_EXECUTION_MODE = 321, /* SPIRV_EXECUTION_MODE */ - YYSYMBOL_SPIRV_EXECUTION_MODE_ID = 322, /* SPIRV_EXECUTION_MODE_ID */ - YYSYMBOL_SPIRV_DECORATE = 323, /* SPIRV_DECORATE */ - YYSYMBOL_SPIRV_DECORATE_ID = 324, /* SPIRV_DECORATE_ID */ - YYSYMBOL_SPIRV_DECORATE_STRING = 325, /* SPIRV_DECORATE_STRING */ - YYSYMBOL_SPIRV_TYPE = 326, /* SPIRV_TYPE */ - YYSYMBOL_SPIRV_STORAGE_CLASS = 327, /* SPIRV_STORAGE_CLASS */ - YYSYMBOL_SPIRV_BY_REFERENCE = 328, /* SPIRV_BY_REFERENCE */ - YYSYMBOL_SPIRV_LITERAL = 329, /* SPIRV_LITERAL */ - YYSYMBOL_ATTACHMENTEXT = 330, /* ATTACHMENTEXT */ - YYSYMBOL_IATTACHMENTEXT = 331, /* IATTACHMENTEXT */ - YYSYMBOL_UATTACHMENTEXT = 332, /* UATTACHMENTEXT */ - YYSYMBOL_LEFT_OP = 333, /* LEFT_OP */ - YYSYMBOL_RIGHT_OP = 334, /* RIGHT_OP */ - YYSYMBOL_INC_OP = 335, /* INC_OP */ - YYSYMBOL_DEC_OP = 336, /* DEC_OP */ - YYSYMBOL_LE_OP = 337, /* LE_OP */ - YYSYMBOL_GE_OP = 338, /* GE_OP */ - YYSYMBOL_EQ_OP = 339, /* EQ_OP */ - YYSYMBOL_NE_OP = 340, /* NE_OP */ - YYSYMBOL_AND_OP = 341, /* AND_OP */ - YYSYMBOL_OR_OP = 342, /* OR_OP */ - YYSYMBOL_XOR_OP = 343, /* XOR_OP */ - YYSYMBOL_MUL_ASSIGN = 344, /* MUL_ASSIGN */ - YYSYMBOL_DIV_ASSIGN = 345, /* DIV_ASSIGN */ - YYSYMBOL_ADD_ASSIGN = 346, /* ADD_ASSIGN */ - YYSYMBOL_MOD_ASSIGN = 347, /* MOD_ASSIGN */ - YYSYMBOL_LEFT_ASSIGN = 348, /* LEFT_ASSIGN */ - YYSYMBOL_RIGHT_ASSIGN = 349, /* RIGHT_ASSIGN */ - YYSYMBOL_AND_ASSIGN = 350, /* AND_ASSIGN */ - YYSYMBOL_XOR_ASSIGN = 351, /* XOR_ASSIGN */ - YYSYMBOL_OR_ASSIGN = 352, /* OR_ASSIGN */ - YYSYMBOL_SUB_ASSIGN = 353, /* SUB_ASSIGN */ - YYSYMBOL_STRING_LITERAL = 354, /* STRING_LITERAL */ - YYSYMBOL_LEFT_PAREN = 355, /* LEFT_PAREN */ - YYSYMBOL_RIGHT_PAREN = 356, /* RIGHT_PAREN */ - YYSYMBOL_LEFT_BRACKET = 357, /* LEFT_BRACKET */ - YYSYMBOL_RIGHT_BRACKET = 358, /* RIGHT_BRACKET */ - YYSYMBOL_LEFT_BRACE = 359, /* LEFT_BRACE */ - YYSYMBOL_RIGHT_BRACE = 360, /* RIGHT_BRACE */ - YYSYMBOL_DOT = 361, /* DOT */ - YYSYMBOL_COMMA = 362, /* COMMA */ - YYSYMBOL_COLON = 363, /* COLON */ - YYSYMBOL_EQUAL = 364, /* EQUAL */ - YYSYMBOL_SEMICOLON = 365, /* SEMICOLON */ - YYSYMBOL_BANG = 366, /* BANG */ - YYSYMBOL_DASH = 367, /* DASH */ - YYSYMBOL_TILDE = 368, /* TILDE */ - YYSYMBOL_PLUS = 369, /* PLUS */ - YYSYMBOL_STAR = 370, /* STAR */ - YYSYMBOL_SLASH = 371, /* SLASH */ - YYSYMBOL_PERCENT = 372, /* PERCENT */ - YYSYMBOL_LEFT_ANGLE = 373, /* LEFT_ANGLE */ - YYSYMBOL_RIGHT_ANGLE = 374, /* RIGHT_ANGLE */ - YYSYMBOL_VERTICAL_BAR = 375, /* VERTICAL_BAR */ - YYSYMBOL_CARET = 376, /* CARET */ - YYSYMBOL_AMPERSAND = 377, /* AMPERSAND */ - YYSYMBOL_QUESTION = 378, /* QUESTION */ - YYSYMBOL_INVARIANT = 379, /* INVARIANT */ - YYSYMBOL_HIGH_PRECISION = 380, /* HIGH_PRECISION */ - YYSYMBOL_MEDIUM_PRECISION = 381, /* MEDIUM_PRECISION */ - YYSYMBOL_LOW_PRECISION = 382, /* LOW_PRECISION */ - YYSYMBOL_PRECISION = 383, /* PRECISION */ - YYSYMBOL_PACKED = 384, /* PACKED */ - YYSYMBOL_RESOURCE = 385, /* RESOURCE */ - YYSYMBOL_SUPERP = 386, /* SUPERP */ - YYSYMBOL_FLOATCONSTANT = 387, /* FLOATCONSTANT */ - YYSYMBOL_INTCONSTANT = 388, /* INTCONSTANT */ - YYSYMBOL_UINTCONSTANT = 389, /* UINTCONSTANT */ - YYSYMBOL_BOOLCONSTANT = 390, /* BOOLCONSTANT */ - YYSYMBOL_IDENTIFIER = 391, /* IDENTIFIER */ - YYSYMBOL_TYPE_NAME = 392, /* TYPE_NAME */ - YYSYMBOL_CENTROID = 393, /* CENTROID */ - YYSYMBOL_IN = 394, /* IN */ - YYSYMBOL_OUT = 395, /* OUT */ - YYSYMBOL_INOUT = 396, /* INOUT */ - YYSYMBOL_STRUCT = 397, /* STRUCT */ - YYSYMBOL_VOID = 398, /* VOID */ - YYSYMBOL_WHILE = 399, /* WHILE */ - YYSYMBOL_BREAK = 400, /* BREAK */ - YYSYMBOL_CONTINUE = 401, /* CONTINUE */ - YYSYMBOL_DO = 402, /* DO */ - YYSYMBOL_ELSE = 403, /* ELSE */ - YYSYMBOL_FOR = 404, /* FOR */ - YYSYMBOL_IF = 405, /* IF */ - YYSYMBOL_DISCARD = 406, /* DISCARD */ - YYSYMBOL_RETURN = 407, /* RETURN */ - YYSYMBOL_SWITCH = 408, /* SWITCH */ - YYSYMBOL_CASE = 409, /* CASE */ - YYSYMBOL_DEFAULT = 410, /* DEFAULT */ - YYSYMBOL_TERMINATE_INVOCATION = 411, /* TERMINATE_INVOCATION */ - YYSYMBOL_TERMINATE_RAY = 412, /* TERMINATE_RAY */ - YYSYMBOL_IGNORE_INTERSECTION = 413, /* IGNORE_INTERSECTION */ - YYSYMBOL_UNIFORM = 414, /* UNIFORM */ - YYSYMBOL_SHARED = 415, /* SHARED */ - YYSYMBOL_BUFFER = 416, /* BUFFER */ - YYSYMBOL_TILEIMAGEEXT = 417, /* TILEIMAGEEXT */ - YYSYMBOL_FLAT = 418, /* FLAT */ - YYSYMBOL_SMOOTH = 419, /* SMOOTH */ - YYSYMBOL_LAYOUT = 420, /* LAYOUT */ - YYSYMBOL_DOUBLECONSTANT = 421, /* DOUBLECONSTANT */ - YYSYMBOL_INT16CONSTANT = 422, /* INT16CONSTANT */ - YYSYMBOL_UINT16CONSTANT = 423, /* UINT16CONSTANT */ - YYSYMBOL_FLOAT16CONSTANT = 424, /* FLOAT16CONSTANT */ - YYSYMBOL_INT32CONSTANT = 425, /* INT32CONSTANT */ - YYSYMBOL_UINT32CONSTANT = 426, /* UINT32CONSTANT */ - YYSYMBOL_INT64CONSTANT = 427, /* INT64CONSTANT */ - YYSYMBOL_UINT64CONSTANT = 428, /* UINT64CONSTANT */ - YYSYMBOL_SUBROUTINE = 429, /* SUBROUTINE */ - YYSYMBOL_DEMOTE = 430, /* DEMOTE */ - YYSYMBOL_PAYLOADNV = 431, /* PAYLOADNV */ - YYSYMBOL_PAYLOADINNV = 432, /* PAYLOADINNV */ - YYSYMBOL_HITATTRNV = 433, /* HITATTRNV */ - YYSYMBOL_CALLDATANV = 434, /* CALLDATANV */ - YYSYMBOL_CALLDATAINNV = 435, /* CALLDATAINNV */ - YYSYMBOL_PAYLOADEXT = 436, /* PAYLOADEXT */ - YYSYMBOL_PAYLOADINEXT = 437, /* PAYLOADINEXT */ - YYSYMBOL_HITATTREXT = 438, /* HITATTREXT */ - YYSYMBOL_CALLDATAEXT = 439, /* CALLDATAEXT */ - YYSYMBOL_CALLDATAINEXT = 440, /* CALLDATAINEXT */ - YYSYMBOL_PATCH = 441, /* PATCH */ - YYSYMBOL_SAMPLE = 442, /* SAMPLE */ - YYSYMBOL_NONUNIFORM = 443, /* NONUNIFORM */ - YYSYMBOL_COHERENT = 444, /* COHERENT */ - YYSYMBOL_VOLATILE = 445, /* VOLATILE */ - YYSYMBOL_RESTRICT = 446, /* RESTRICT */ - YYSYMBOL_READONLY = 447, /* READONLY */ - YYSYMBOL_WRITEONLY = 448, /* WRITEONLY */ - YYSYMBOL_DEVICECOHERENT = 449, /* DEVICECOHERENT */ - YYSYMBOL_QUEUEFAMILYCOHERENT = 450, /* QUEUEFAMILYCOHERENT */ - YYSYMBOL_WORKGROUPCOHERENT = 451, /* WORKGROUPCOHERENT */ - YYSYMBOL_SUBGROUPCOHERENT = 452, /* SUBGROUPCOHERENT */ - YYSYMBOL_NONPRIVATE = 453, /* NONPRIVATE */ - YYSYMBOL_SHADERCALLCOHERENT = 454, /* SHADERCALLCOHERENT */ - YYSYMBOL_NOPERSPECTIVE = 455, /* NOPERSPECTIVE */ - YYSYMBOL_EXPLICITINTERPAMD = 456, /* EXPLICITINTERPAMD */ - YYSYMBOL_PERVERTEXEXT = 457, /* PERVERTEXEXT */ - YYSYMBOL_PERVERTEXNV = 458, /* PERVERTEXNV */ - YYSYMBOL_PERPRIMITIVENV = 459, /* PERPRIMITIVENV */ - YYSYMBOL_PERVIEWNV = 460, /* PERVIEWNV */ - YYSYMBOL_PERTASKNV = 461, /* PERTASKNV */ - YYSYMBOL_PERPRIMITIVEEXT = 462, /* PERPRIMITIVEEXT */ - YYSYMBOL_TASKPAYLOADWORKGROUPEXT = 463, /* TASKPAYLOADWORKGROUPEXT */ - YYSYMBOL_PRECISE = 464, /* PRECISE */ - YYSYMBOL_YYACCEPT = 465, /* $accept */ - YYSYMBOL_variable_identifier = 466, /* variable_identifier */ - YYSYMBOL_primary_expression = 467, /* primary_expression */ - YYSYMBOL_postfix_expression = 468, /* postfix_expression */ - YYSYMBOL_integer_expression = 469, /* integer_expression */ - YYSYMBOL_function_call = 470, /* function_call */ - YYSYMBOL_function_call_or_method = 471, /* function_call_or_method */ - YYSYMBOL_function_call_generic = 472, /* function_call_generic */ - YYSYMBOL_function_call_header_no_parameters = 473, /* function_call_header_no_parameters */ - YYSYMBOL_function_call_header_with_parameters = 474, /* function_call_header_with_parameters */ - YYSYMBOL_function_call_header = 475, /* function_call_header */ - YYSYMBOL_function_identifier = 476, /* function_identifier */ - YYSYMBOL_unary_expression = 477, /* unary_expression */ - YYSYMBOL_unary_operator = 478, /* unary_operator */ - YYSYMBOL_multiplicative_expression = 479, /* multiplicative_expression */ - YYSYMBOL_additive_expression = 480, /* additive_expression */ - YYSYMBOL_shift_expression = 481, /* shift_expression */ - YYSYMBOL_relational_expression = 482, /* relational_expression */ - YYSYMBOL_equality_expression = 483, /* equality_expression */ - YYSYMBOL_and_expression = 484, /* and_expression */ - YYSYMBOL_exclusive_or_expression = 485, /* exclusive_or_expression */ - YYSYMBOL_inclusive_or_expression = 486, /* inclusive_or_expression */ - YYSYMBOL_logical_and_expression = 487, /* logical_and_expression */ - YYSYMBOL_logical_xor_expression = 488, /* logical_xor_expression */ - YYSYMBOL_logical_or_expression = 489, /* logical_or_expression */ - YYSYMBOL_conditional_expression = 490, /* conditional_expression */ - YYSYMBOL_491_1 = 491, /* $@1 */ - YYSYMBOL_assignment_expression = 492, /* assignment_expression */ - YYSYMBOL_assignment_operator = 493, /* assignment_operator */ - YYSYMBOL_expression = 494, /* expression */ - YYSYMBOL_constant_expression = 495, /* constant_expression */ - YYSYMBOL_declaration = 496, /* declaration */ - YYSYMBOL_block_structure = 497, /* block_structure */ - YYSYMBOL_498_2 = 498, /* $@2 */ - YYSYMBOL_identifier_list = 499, /* identifier_list */ - YYSYMBOL_function_prototype = 500, /* function_prototype */ - YYSYMBOL_function_declarator = 501, /* function_declarator */ - YYSYMBOL_function_header_with_parameters = 502, /* function_header_with_parameters */ - YYSYMBOL_function_header = 503, /* function_header */ - YYSYMBOL_parameter_declarator = 504, /* parameter_declarator */ - YYSYMBOL_parameter_declaration = 505, /* parameter_declaration */ - YYSYMBOL_parameter_type_specifier = 506, /* parameter_type_specifier */ - YYSYMBOL_init_declarator_list = 507, /* init_declarator_list */ - YYSYMBOL_single_declaration = 508, /* single_declaration */ - YYSYMBOL_fully_specified_type = 509, /* fully_specified_type */ - YYSYMBOL_invariant_qualifier = 510, /* invariant_qualifier */ - YYSYMBOL_interpolation_qualifier = 511, /* interpolation_qualifier */ - YYSYMBOL_layout_qualifier = 512, /* layout_qualifier */ - YYSYMBOL_layout_qualifier_id_list = 513, /* layout_qualifier_id_list */ - YYSYMBOL_layout_qualifier_id = 514, /* layout_qualifier_id */ - YYSYMBOL_precise_qualifier = 515, /* precise_qualifier */ - YYSYMBOL_type_qualifier = 516, /* type_qualifier */ - YYSYMBOL_single_type_qualifier = 517, /* single_type_qualifier */ - YYSYMBOL_storage_qualifier = 518, /* storage_qualifier */ - YYSYMBOL_non_uniform_qualifier = 519, /* non_uniform_qualifier */ - YYSYMBOL_type_name_list = 520, /* type_name_list */ - YYSYMBOL_type_specifier = 521, /* type_specifier */ - YYSYMBOL_array_specifier = 522, /* array_specifier */ - YYSYMBOL_type_parameter_specifier_opt = 523, /* type_parameter_specifier_opt */ - YYSYMBOL_type_parameter_specifier = 524, /* type_parameter_specifier */ - YYSYMBOL_type_parameter_specifier_list = 525, /* type_parameter_specifier_list */ - YYSYMBOL_type_specifier_nonarray = 526, /* type_specifier_nonarray */ - YYSYMBOL_precision_qualifier = 527, /* precision_qualifier */ - YYSYMBOL_struct_specifier = 528, /* struct_specifier */ - YYSYMBOL_529_3 = 529, /* $@3 */ - YYSYMBOL_530_4 = 530, /* $@4 */ - YYSYMBOL_struct_declaration_list = 531, /* struct_declaration_list */ - YYSYMBOL_struct_declaration = 532, /* struct_declaration */ - YYSYMBOL_struct_declarator_list = 533, /* struct_declarator_list */ - YYSYMBOL_struct_declarator = 534, /* struct_declarator */ - YYSYMBOL_initializer = 535, /* initializer */ - YYSYMBOL_initializer_list = 536, /* initializer_list */ - YYSYMBOL_declaration_statement = 537, /* declaration_statement */ - YYSYMBOL_statement = 538, /* statement */ - YYSYMBOL_simple_statement = 539, /* simple_statement */ - YYSYMBOL_demote_statement = 540, /* demote_statement */ - YYSYMBOL_compound_statement = 541, /* compound_statement */ - YYSYMBOL_542_5 = 542, /* $@5 */ - YYSYMBOL_543_6 = 543, /* $@6 */ - YYSYMBOL_statement_no_new_scope = 544, /* statement_no_new_scope */ - YYSYMBOL_statement_scoped = 545, /* statement_scoped */ - YYSYMBOL_546_7 = 546, /* $@7 */ - YYSYMBOL_547_8 = 547, /* $@8 */ - YYSYMBOL_compound_statement_no_new_scope = 548, /* compound_statement_no_new_scope */ - YYSYMBOL_statement_list = 549, /* statement_list */ - YYSYMBOL_expression_statement = 550, /* expression_statement */ - YYSYMBOL_selection_statement = 551, /* selection_statement */ - YYSYMBOL_selection_statement_nonattributed = 552, /* selection_statement_nonattributed */ - YYSYMBOL_selection_rest_statement = 553, /* selection_rest_statement */ - YYSYMBOL_condition = 554, /* condition */ - YYSYMBOL_switch_statement = 555, /* switch_statement */ - YYSYMBOL_switch_statement_nonattributed = 556, /* switch_statement_nonattributed */ - YYSYMBOL_557_9 = 557, /* $@9 */ - YYSYMBOL_switch_statement_list = 558, /* switch_statement_list */ - YYSYMBOL_case_label = 559, /* case_label */ - YYSYMBOL_iteration_statement = 560, /* iteration_statement */ - YYSYMBOL_iteration_statement_nonattributed = 561, /* iteration_statement_nonattributed */ - YYSYMBOL_562_10 = 562, /* $@10 */ - YYSYMBOL_563_11 = 563, /* $@11 */ - YYSYMBOL_564_12 = 564, /* $@12 */ - YYSYMBOL_for_init_statement = 565, /* for_init_statement */ - YYSYMBOL_conditionopt = 566, /* conditionopt */ - YYSYMBOL_for_rest_statement = 567, /* for_rest_statement */ - YYSYMBOL_jump_statement = 568, /* jump_statement */ - YYSYMBOL_translation_unit = 569, /* translation_unit */ - YYSYMBOL_external_declaration = 570, /* external_declaration */ - YYSYMBOL_function_definition = 571, /* function_definition */ - YYSYMBOL_572_13 = 572, /* $@13 */ - YYSYMBOL_attribute = 573, /* attribute */ - YYSYMBOL_attribute_list = 574, /* attribute_list */ - YYSYMBOL_single_attribute = 575, /* single_attribute */ - YYSYMBOL_spirv_requirements_list = 576, /* spirv_requirements_list */ - YYSYMBOL_spirv_requirements_parameter = 577, /* spirv_requirements_parameter */ - YYSYMBOL_spirv_extension_list = 578, /* spirv_extension_list */ - YYSYMBOL_spirv_capability_list = 579, /* spirv_capability_list */ - YYSYMBOL_spirv_execution_mode_qualifier = 580, /* spirv_execution_mode_qualifier */ - YYSYMBOL_spirv_execution_mode_parameter_list = 581, /* spirv_execution_mode_parameter_list */ - YYSYMBOL_spirv_execution_mode_parameter = 582, /* spirv_execution_mode_parameter */ - YYSYMBOL_spirv_execution_mode_id_parameter_list = 583, /* spirv_execution_mode_id_parameter_list */ - YYSYMBOL_spirv_storage_class_qualifier = 584, /* spirv_storage_class_qualifier */ - YYSYMBOL_spirv_decorate_qualifier = 585, /* spirv_decorate_qualifier */ - YYSYMBOL_spirv_decorate_parameter_list = 586, /* spirv_decorate_parameter_list */ - YYSYMBOL_spirv_decorate_parameter = 587, /* spirv_decorate_parameter */ - YYSYMBOL_spirv_decorate_id_parameter_list = 588, /* spirv_decorate_id_parameter_list */ - YYSYMBOL_spirv_decorate_id_parameter = 589, /* spirv_decorate_id_parameter */ - YYSYMBOL_spirv_decorate_string_parameter_list = 590, /* spirv_decorate_string_parameter_list */ - YYSYMBOL_spirv_type_specifier = 591, /* spirv_type_specifier */ - YYSYMBOL_spirv_type_parameter_list = 592, /* spirv_type_parameter_list */ - YYSYMBOL_spirv_type_parameter = 593, /* spirv_type_parameter */ - YYSYMBOL_spirv_instruction_qualifier = 594, /* spirv_instruction_qualifier */ - YYSYMBOL_spirv_instruction_qualifier_list = 595, /* spirv_instruction_qualifier_list */ - YYSYMBOL_spirv_instruction_qualifier_id = 596 /* spirv_instruction_qualifier_id */ + YYSYMBOL_COOPVECNV = 167, /* COOPVECNV */ + YYSYMBOL_HITOBJECTNV = 168, /* HITOBJECTNV */ + YYSYMBOL_HITOBJECTATTRNV = 169, /* HITOBJECTATTRNV */ + YYSYMBOL_TENSORLAYOUTNV = 170, /* TENSORLAYOUTNV */ + YYSYMBOL_TENSORVIEWNV = 171, /* TENSORVIEWNV */ + YYSYMBOL_SAMPLERCUBEARRAY = 172, /* SAMPLERCUBEARRAY */ + YYSYMBOL_SAMPLERCUBEARRAYSHADOW = 173, /* SAMPLERCUBEARRAYSHADOW */ + YYSYMBOL_ISAMPLERCUBEARRAY = 174, /* ISAMPLERCUBEARRAY */ + YYSYMBOL_USAMPLERCUBEARRAY = 175, /* USAMPLERCUBEARRAY */ + YYSYMBOL_SAMPLER1D = 176, /* SAMPLER1D */ + YYSYMBOL_SAMPLER1DARRAY = 177, /* SAMPLER1DARRAY */ + YYSYMBOL_SAMPLER1DARRAYSHADOW = 178, /* SAMPLER1DARRAYSHADOW */ + YYSYMBOL_ISAMPLER1D = 179, /* ISAMPLER1D */ + YYSYMBOL_SAMPLER1DSHADOW = 180, /* SAMPLER1DSHADOW */ + YYSYMBOL_SAMPLER2DRECT = 181, /* SAMPLER2DRECT */ + YYSYMBOL_SAMPLER2DRECTSHADOW = 182, /* SAMPLER2DRECTSHADOW */ + YYSYMBOL_ISAMPLER2DRECT = 183, /* ISAMPLER2DRECT */ + YYSYMBOL_USAMPLER2DRECT = 184, /* USAMPLER2DRECT */ + YYSYMBOL_SAMPLERBUFFER = 185, /* SAMPLERBUFFER */ + YYSYMBOL_ISAMPLERBUFFER = 186, /* ISAMPLERBUFFER */ + YYSYMBOL_USAMPLERBUFFER = 187, /* USAMPLERBUFFER */ + YYSYMBOL_SAMPLER2DMS = 188, /* SAMPLER2DMS */ + YYSYMBOL_ISAMPLER2DMS = 189, /* ISAMPLER2DMS */ + YYSYMBOL_USAMPLER2DMS = 190, /* USAMPLER2DMS */ + YYSYMBOL_SAMPLER2DMSARRAY = 191, /* SAMPLER2DMSARRAY */ + YYSYMBOL_ISAMPLER2DMSARRAY = 192, /* ISAMPLER2DMSARRAY */ + YYSYMBOL_USAMPLER2DMSARRAY = 193, /* USAMPLER2DMSARRAY */ + YYSYMBOL_SAMPLEREXTERNALOES = 194, /* SAMPLEREXTERNALOES */ + YYSYMBOL_SAMPLEREXTERNAL2DY2YEXT = 195, /* SAMPLEREXTERNAL2DY2YEXT */ + YYSYMBOL_ISAMPLER1DARRAY = 196, /* ISAMPLER1DARRAY */ + YYSYMBOL_USAMPLER1D = 197, /* USAMPLER1D */ + YYSYMBOL_USAMPLER1DARRAY = 198, /* USAMPLER1DARRAY */ + YYSYMBOL_F16SAMPLER1D = 199, /* F16SAMPLER1D */ + YYSYMBOL_F16SAMPLER2D = 200, /* F16SAMPLER2D */ + YYSYMBOL_F16SAMPLER3D = 201, /* F16SAMPLER3D */ + YYSYMBOL_F16SAMPLER2DRECT = 202, /* F16SAMPLER2DRECT */ + YYSYMBOL_F16SAMPLERCUBE = 203, /* F16SAMPLERCUBE */ + YYSYMBOL_F16SAMPLER1DARRAY = 204, /* F16SAMPLER1DARRAY */ + YYSYMBOL_F16SAMPLER2DARRAY = 205, /* F16SAMPLER2DARRAY */ + YYSYMBOL_F16SAMPLERCUBEARRAY = 206, /* F16SAMPLERCUBEARRAY */ + YYSYMBOL_F16SAMPLERBUFFER = 207, /* F16SAMPLERBUFFER */ + YYSYMBOL_F16SAMPLER2DMS = 208, /* F16SAMPLER2DMS */ + YYSYMBOL_F16SAMPLER2DMSARRAY = 209, /* F16SAMPLER2DMSARRAY */ + YYSYMBOL_F16SAMPLER1DSHADOW = 210, /* F16SAMPLER1DSHADOW */ + YYSYMBOL_F16SAMPLER2DSHADOW = 211, /* F16SAMPLER2DSHADOW */ + YYSYMBOL_F16SAMPLER1DARRAYSHADOW = 212, /* F16SAMPLER1DARRAYSHADOW */ + YYSYMBOL_F16SAMPLER2DARRAYSHADOW = 213, /* F16SAMPLER2DARRAYSHADOW */ + YYSYMBOL_F16SAMPLER2DRECTSHADOW = 214, /* F16SAMPLER2DRECTSHADOW */ + YYSYMBOL_F16SAMPLERCUBESHADOW = 215, /* F16SAMPLERCUBESHADOW */ + YYSYMBOL_F16SAMPLERCUBEARRAYSHADOW = 216, /* F16SAMPLERCUBEARRAYSHADOW */ + YYSYMBOL_IMAGE1D = 217, /* IMAGE1D */ + YYSYMBOL_IIMAGE1D = 218, /* IIMAGE1D */ + YYSYMBOL_UIMAGE1D = 219, /* UIMAGE1D */ + YYSYMBOL_IMAGE2D = 220, /* IMAGE2D */ + YYSYMBOL_IIMAGE2D = 221, /* IIMAGE2D */ + YYSYMBOL_UIMAGE2D = 222, /* UIMAGE2D */ + YYSYMBOL_IMAGE3D = 223, /* IMAGE3D */ + YYSYMBOL_IIMAGE3D = 224, /* IIMAGE3D */ + YYSYMBOL_UIMAGE3D = 225, /* UIMAGE3D */ + YYSYMBOL_IMAGE2DRECT = 226, /* IMAGE2DRECT */ + YYSYMBOL_IIMAGE2DRECT = 227, /* IIMAGE2DRECT */ + YYSYMBOL_UIMAGE2DRECT = 228, /* UIMAGE2DRECT */ + YYSYMBOL_IMAGECUBE = 229, /* IMAGECUBE */ + YYSYMBOL_IIMAGECUBE = 230, /* IIMAGECUBE */ + YYSYMBOL_UIMAGECUBE = 231, /* UIMAGECUBE */ + YYSYMBOL_IMAGEBUFFER = 232, /* IMAGEBUFFER */ + YYSYMBOL_IIMAGEBUFFER = 233, /* IIMAGEBUFFER */ + YYSYMBOL_UIMAGEBUFFER = 234, /* UIMAGEBUFFER */ + YYSYMBOL_IMAGE1DARRAY = 235, /* IMAGE1DARRAY */ + YYSYMBOL_IIMAGE1DARRAY = 236, /* IIMAGE1DARRAY */ + YYSYMBOL_UIMAGE1DARRAY = 237, /* UIMAGE1DARRAY */ + YYSYMBOL_IMAGE2DARRAY = 238, /* IMAGE2DARRAY */ + YYSYMBOL_IIMAGE2DARRAY = 239, /* IIMAGE2DARRAY */ + YYSYMBOL_UIMAGE2DARRAY = 240, /* UIMAGE2DARRAY */ + YYSYMBOL_IMAGECUBEARRAY = 241, /* IMAGECUBEARRAY */ + YYSYMBOL_IIMAGECUBEARRAY = 242, /* IIMAGECUBEARRAY */ + YYSYMBOL_UIMAGECUBEARRAY = 243, /* UIMAGECUBEARRAY */ + YYSYMBOL_IMAGE2DMS = 244, /* IMAGE2DMS */ + YYSYMBOL_IIMAGE2DMS = 245, /* IIMAGE2DMS */ + YYSYMBOL_UIMAGE2DMS = 246, /* UIMAGE2DMS */ + YYSYMBOL_IMAGE2DMSARRAY = 247, /* IMAGE2DMSARRAY */ + YYSYMBOL_IIMAGE2DMSARRAY = 248, /* IIMAGE2DMSARRAY */ + YYSYMBOL_UIMAGE2DMSARRAY = 249, /* UIMAGE2DMSARRAY */ + YYSYMBOL_F16IMAGE1D = 250, /* F16IMAGE1D */ + YYSYMBOL_F16IMAGE2D = 251, /* F16IMAGE2D */ + YYSYMBOL_F16IMAGE3D = 252, /* F16IMAGE3D */ + YYSYMBOL_F16IMAGE2DRECT = 253, /* F16IMAGE2DRECT */ + YYSYMBOL_F16IMAGECUBE = 254, /* F16IMAGECUBE */ + YYSYMBOL_F16IMAGE1DARRAY = 255, /* F16IMAGE1DARRAY */ + YYSYMBOL_F16IMAGE2DARRAY = 256, /* F16IMAGE2DARRAY */ + YYSYMBOL_F16IMAGECUBEARRAY = 257, /* F16IMAGECUBEARRAY */ + YYSYMBOL_F16IMAGEBUFFER = 258, /* F16IMAGEBUFFER */ + YYSYMBOL_F16IMAGE2DMS = 259, /* F16IMAGE2DMS */ + YYSYMBOL_F16IMAGE2DMSARRAY = 260, /* F16IMAGE2DMSARRAY */ + YYSYMBOL_I64IMAGE1D = 261, /* I64IMAGE1D */ + YYSYMBOL_U64IMAGE1D = 262, /* U64IMAGE1D */ + YYSYMBOL_I64IMAGE2D = 263, /* I64IMAGE2D */ + YYSYMBOL_U64IMAGE2D = 264, /* U64IMAGE2D */ + YYSYMBOL_I64IMAGE3D = 265, /* I64IMAGE3D */ + YYSYMBOL_U64IMAGE3D = 266, /* U64IMAGE3D */ + YYSYMBOL_I64IMAGE2DRECT = 267, /* I64IMAGE2DRECT */ + YYSYMBOL_U64IMAGE2DRECT = 268, /* U64IMAGE2DRECT */ + YYSYMBOL_I64IMAGECUBE = 269, /* I64IMAGECUBE */ + YYSYMBOL_U64IMAGECUBE = 270, /* U64IMAGECUBE */ + YYSYMBOL_I64IMAGEBUFFER = 271, /* I64IMAGEBUFFER */ + YYSYMBOL_U64IMAGEBUFFER = 272, /* U64IMAGEBUFFER */ + YYSYMBOL_I64IMAGE1DARRAY = 273, /* I64IMAGE1DARRAY */ + YYSYMBOL_U64IMAGE1DARRAY = 274, /* U64IMAGE1DARRAY */ + YYSYMBOL_I64IMAGE2DARRAY = 275, /* I64IMAGE2DARRAY */ + YYSYMBOL_U64IMAGE2DARRAY = 276, /* U64IMAGE2DARRAY */ + YYSYMBOL_I64IMAGECUBEARRAY = 277, /* I64IMAGECUBEARRAY */ + YYSYMBOL_U64IMAGECUBEARRAY = 278, /* U64IMAGECUBEARRAY */ + YYSYMBOL_I64IMAGE2DMS = 279, /* I64IMAGE2DMS */ + YYSYMBOL_U64IMAGE2DMS = 280, /* U64IMAGE2DMS */ + YYSYMBOL_I64IMAGE2DMSARRAY = 281, /* I64IMAGE2DMSARRAY */ + YYSYMBOL_U64IMAGE2DMSARRAY = 282, /* U64IMAGE2DMSARRAY */ + YYSYMBOL_TEXTURECUBEARRAY = 283, /* TEXTURECUBEARRAY */ + YYSYMBOL_ITEXTURECUBEARRAY = 284, /* ITEXTURECUBEARRAY */ + YYSYMBOL_UTEXTURECUBEARRAY = 285, /* UTEXTURECUBEARRAY */ + YYSYMBOL_TEXTURE1D = 286, /* TEXTURE1D */ + YYSYMBOL_ITEXTURE1D = 287, /* ITEXTURE1D */ + YYSYMBOL_UTEXTURE1D = 288, /* UTEXTURE1D */ + YYSYMBOL_TEXTURE1DARRAY = 289, /* TEXTURE1DARRAY */ + YYSYMBOL_ITEXTURE1DARRAY = 290, /* ITEXTURE1DARRAY */ + YYSYMBOL_UTEXTURE1DARRAY = 291, /* UTEXTURE1DARRAY */ + YYSYMBOL_TEXTURE2DRECT = 292, /* TEXTURE2DRECT */ + YYSYMBOL_ITEXTURE2DRECT = 293, /* ITEXTURE2DRECT */ + YYSYMBOL_UTEXTURE2DRECT = 294, /* UTEXTURE2DRECT */ + YYSYMBOL_TEXTUREBUFFER = 295, /* TEXTUREBUFFER */ + YYSYMBOL_ITEXTUREBUFFER = 296, /* ITEXTUREBUFFER */ + YYSYMBOL_UTEXTUREBUFFER = 297, /* UTEXTUREBUFFER */ + YYSYMBOL_TEXTURE2DMS = 298, /* TEXTURE2DMS */ + YYSYMBOL_ITEXTURE2DMS = 299, /* ITEXTURE2DMS */ + YYSYMBOL_UTEXTURE2DMS = 300, /* UTEXTURE2DMS */ + YYSYMBOL_TEXTURE2DMSARRAY = 301, /* TEXTURE2DMSARRAY */ + YYSYMBOL_ITEXTURE2DMSARRAY = 302, /* ITEXTURE2DMSARRAY */ + YYSYMBOL_UTEXTURE2DMSARRAY = 303, /* UTEXTURE2DMSARRAY */ + YYSYMBOL_F16TEXTURE1D = 304, /* F16TEXTURE1D */ + YYSYMBOL_F16TEXTURE2D = 305, /* F16TEXTURE2D */ + YYSYMBOL_F16TEXTURE3D = 306, /* F16TEXTURE3D */ + YYSYMBOL_F16TEXTURE2DRECT = 307, /* F16TEXTURE2DRECT */ + YYSYMBOL_F16TEXTURECUBE = 308, /* F16TEXTURECUBE */ + YYSYMBOL_F16TEXTURE1DARRAY = 309, /* F16TEXTURE1DARRAY */ + YYSYMBOL_F16TEXTURE2DARRAY = 310, /* F16TEXTURE2DARRAY */ + YYSYMBOL_F16TEXTURECUBEARRAY = 311, /* F16TEXTURECUBEARRAY */ + YYSYMBOL_F16TEXTUREBUFFER = 312, /* F16TEXTUREBUFFER */ + YYSYMBOL_F16TEXTURE2DMS = 313, /* F16TEXTURE2DMS */ + YYSYMBOL_F16TEXTURE2DMSARRAY = 314, /* F16TEXTURE2DMSARRAY */ + YYSYMBOL_SUBPASSINPUT = 315, /* SUBPASSINPUT */ + YYSYMBOL_SUBPASSINPUTMS = 316, /* SUBPASSINPUTMS */ + YYSYMBOL_ISUBPASSINPUT = 317, /* ISUBPASSINPUT */ + YYSYMBOL_ISUBPASSINPUTMS = 318, /* ISUBPASSINPUTMS */ + YYSYMBOL_USUBPASSINPUT = 319, /* USUBPASSINPUT */ + YYSYMBOL_USUBPASSINPUTMS = 320, /* USUBPASSINPUTMS */ + YYSYMBOL_F16SUBPASSINPUT = 321, /* F16SUBPASSINPUT */ + YYSYMBOL_F16SUBPASSINPUTMS = 322, /* F16SUBPASSINPUTMS */ + YYSYMBOL_SPIRV_INSTRUCTION = 323, /* SPIRV_INSTRUCTION */ + YYSYMBOL_SPIRV_EXECUTION_MODE = 324, /* SPIRV_EXECUTION_MODE */ + YYSYMBOL_SPIRV_EXECUTION_MODE_ID = 325, /* SPIRV_EXECUTION_MODE_ID */ + YYSYMBOL_SPIRV_DECORATE = 326, /* SPIRV_DECORATE */ + YYSYMBOL_SPIRV_DECORATE_ID = 327, /* SPIRV_DECORATE_ID */ + YYSYMBOL_SPIRV_DECORATE_STRING = 328, /* SPIRV_DECORATE_STRING */ + YYSYMBOL_SPIRV_TYPE = 329, /* SPIRV_TYPE */ + YYSYMBOL_SPIRV_STORAGE_CLASS = 330, /* SPIRV_STORAGE_CLASS */ + YYSYMBOL_SPIRV_BY_REFERENCE = 331, /* SPIRV_BY_REFERENCE */ + YYSYMBOL_SPIRV_LITERAL = 332, /* SPIRV_LITERAL */ + YYSYMBOL_ATTACHMENTEXT = 333, /* ATTACHMENTEXT */ + YYSYMBOL_IATTACHMENTEXT = 334, /* IATTACHMENTEXT */ + YYSYMBOL_UATTACHMENTEXT = 335, /* UATTACHMENTEXT */ + YYSYMBOL_LEFT_OP = 336, /* LEFT_OP */ + YYSYMBOL_RIGHT_OP = 337, /* RIGHT_OP */ + YYSYMBOL_INC_OP = 338, /* INC_OP */ + YYSYMBOL_DEC_OP = 339, /* DEC_OP */ + YYSYMBOL_LE_OP = 340, /* LE_OP */ + YYSYMBOL_GE_OP = 341, /* GE_OP */ + YYSYMBOL_EQ_OP = 342, /* EQ_OP */ + YYSYMBOL_NE_OP = 343, /* NE_OP */ + YYSYMBOL_AND_OP = 344, /* AND_OP */ + YYSYMBOL_OR_OP = 345, /* OR_OP */ + YYSYMBOL_XOR_OP = 346, /* XOR_OP */ + YYSYMBOL_MUL_ASSIGN = 347, /* MUL_ASSIGN */ + YYSYMBOL_DIV_ASSIGN = 348, /* DIV_ASSIGN */ + YYSYMBOL_ADD_ASSIGN = 349, /* ADD_ASSIGN */ + YYSYMBOL_MOD_ASSIGN = 350, /* MOD_ASSIGN */ + YYSYMBOL_LEFT_ASSIGN = 351, /* LEFT_ASSIGN */ + YYSYMBOL_RIGHT_ASSIGN = 352, /* RIGHT_ASSIGN */ + YYSYMBOL_AND_ASSIGN = 353, /* AND_ASSIGN */ + YYSYMBOL_XOR_ASSIGN = 354, /* XOR_ASSIGN */ + YYSYMBOL_OR_ASSIGN = 355, /* OR_ASSIGN */ + YYSYMBOL_SUB_ASSIGN = 356, /* SUB_ASSIGN */ + YYSYMBOL_STRING_LITERAL = 357, /* STRING_LITERAL */ + YYSYMBOL_LEFT_PAREN = 358, /* LEFT_PAREN */ + YYSYMBOL_RIGHT_PAREN = 359, /* RIGHT_PAREN */ + YYSYMBOL_LEFT_BRACKET = 360, /* LEFT_BRACKET */ + YYSYMBOL_RIGHT_BRACKET = 361, /* RIGHT_BRACKET */ + YYSYMBOL_LEFT_BRACE = 362, /* LEFT_BRACE */ + YYSYMBOL_RIGHT_BRACE = 363, /* RIGHT_BRACE */ + YYSYMBOL_DOT = 364, /* DOT */ + YYSYMBOL_COMMA = 365, /* COMMA */ + YYSYMBOL_COLON = 366, /* COLON */ + YYSYMBOL_EQUAL = 367, /* EQUAL */ + YYSYMBOL_SEMICOLON = 368, /* SEMICOLON */ + YYSYMBOL_BANG = 369, /* BANG */ + YYSYMBOL_DASH = 370, /* DASH */ + YYSYMBOL_TILDE = 371, /* TILDE */ + YYSYMBOL_PLUS = 372, /* PLUS */ + YYSYMBOL_STAR = 373, /* STAR */ + YYSYMBOL_SLASH = 374, /* SLASH */ + YYSYMBOL_PERCENT = 375, /* PERCENT */ + YYSYMBOL_LEFT_ANGLE = 376, /* LEFT_ANGLE */ + YYSYMBOL_RIGHT_ANGLE = 377, /* RIGHT_ANGLE */ + YYSYMBOL_VERTICAL_BAR = 378, /* VERTICAL_BAR */ + YYSYMBOL_CARET = 379, /* CARET */ + YYSYMBOL_AMPERSAND = 380, /* AMPERSAND */ + YYSYMBOL_QUESTION = 381, /* QUESTION */ + YYSYMBOL_INVARIANT = 382, /* INVARIANT */ + YYSYMBOL_HIGH_PRECISION = 383, /* HIGH_PRECISION */ + YYSYMBOL_MEDIUM_PRECISION = 384, /* MEDIUM_PRECISION */ + YYSYMBOL_LOW_PRECISION = 385, /* LOW_PRECISION */ + YYSYMBOL_PRECISION = 386, /* PRECISION */ + YYSYMBOL_PACKED = 387, /* PACKED */ + YYSYMBOL_RESOURCE = 388, /* RESOURCE */ + YYSYMBOL_SUPERP = 389, /* SUPERP */ + YYSYMBOL_FLOATCONSTANT = 390, /* FLOATCONSTANT */ + YYSYMBOL_INTCONSTANT = 391, /* INTCONSTANT */ + YYSYMBOL_UINTCONSTANT = 392, /* UINTCONSTANT */ + YYSYMBOL_BOOLCONSTANT = 393, /* BOOLCONSTANT */ + YYSYMBOL_IDENTIFIER = 394, /* IDENTIFIER */ + YYSYMBOL_TYPE_NAME = 395, /* TYPE_NAME */ + YYSYMBOL_CENTROID = 396, /* CENTROID */ + YYSYMBOL_IN = 397, /* IN */ + YYSYMBOL_OUT = 398, /* OUT */ + YYSYMBOL_INOUT = 399, /* INOUT */ + YYSYMBOL_STRUCT = 400, /* STRUCT */ + YYSYMBOL_VOID = 401, /* VOID */ + YYSYMBOL_WHILE = 402, /* WHILE */ + YYSYMBOL_BREAK = 403, /* BREAK */ + YYSYMBOL_CONTINUE = 404, /* CONTINUE */ + YYSYMBOL_DO = 405, /* DO */ + YYSYMBOL_ELSE = 406, /* ELSE */ + YYSYMBOL_FOR = 407, /* FOR */ + YYSYMBOL_IF = 408, /* IF */ + YYSYMBOL_DISCARD = 409, /* DISCARD */ + YYSYMBOL_RETURN = 410, /* RETURN */ + YYSYMBOL_SWITCH = 411, /* SWITCH */ + YYSYMBOL_CASE = 412, /* CASE */ + YYSYMBOL_DEFAULT = 413, /* DEFAULT */ + YYSYMBOL_TERMINATE_INVOCATION = 414, /* TERMINATE_INVOCATION */ + YYSYMBOL_TERMINATE_RAY = 415, /* TERMINATE_RAY */ + YYSYMBOL_IGNORE_INTERSECTION = 416, /* IGNORE_INTERSECTION */ + YYSYMBOL_UNIFORM = 417, /* UNIFORM */ + YYSYMBOL_SHARED = 418, /* SHARED */ + YYSYMBOL_BUFFER = 419, /* BUFFER */ + YYSYMBOL_TILEIMAGEEXT = 420, /* TILEIMAGEEXT */ + YYSYMBOL_FLAT = 421, /* FLAT */ + YYSYMBOL_SMOOTH = 422, /* SMOOTH */ + YYSYMBOL_LAYOUT = 423, /* LAYOUT */ + YYSYMBOL_DOUBLECONSTANT = 424, /* DOUBLECONSTANT */ + YYSYMBOL_INT16CONSTANT = 425, /* INT16CONSTANT */ + YYSYMBOL_UINT16CONSTANT = 426, /* UINT16CONSTANT */ + YYSYMBOL_FLOAT16CONSTANT = 427, /* FLOAT16CONSTANT */ + YYSYMBOL_INT32CONSTANT = 428, /* INT32CONSTANT */ + YYSYMBOL_UINT32CONSTANT = 429, /* UINT32CONSTANT */ + YYSYMBOL_INT64CONSTANT = 430, /* INT64CONSTANT */ + YYSYMBOL_UINT64CONSTANT = 431, /* UINT64CONSTANT */ + YYSYMBOL_SUBROUTINE = 432, /* SUBROUTINE */ + YYSYMBOL_DEMOTE = 433, /* DEMOTE */ + YYSYMBOL_FUNCTION = 434, /* FUNCTION */ + YYSYMBOL_PAYLOADNV = 435, /* PAYLOADNV */ + YYSYMBOL_PAYLOADINNV = 436, /* PAYLOADINNV */ + YYSYMBOL_HITATTRNV = 437, /* HITATTRNV */ + YYSYMBOL_CALLDATANV = 438, /* CALLDATANV */ + YYSYMBOL_CALLDATAINNV = 439, /* CALLDATAINNV */ + YYSYMBOL_PAYLOADEXT = 440, /* PAYLOADEXT */ + YYSYMBOL_PAYLOADINEXT = 441, /* PAYLOADINEXT */ + YYSYMBOL_HITATTREXT = 442, /* HITATTREXT */ + YYSYMBOL_CALLDATAEXT = 443, /* CALLDATAEXT */ + YYSYMBOL_CALLDATAINEXT = 444, /* CALLDATAINEXT */ + YYSYMBOL_PATCH = 445, /* PATCH */ + YYSYMBOL_SAMPLE = 446, /* SAMPLE */ + YYSYMBOL_NONUNIFORM = 447, /* NONUNIFORM */ + YYSYMBOL_COHERENT = 448, /* COHERENT */ + YYSYMBOL_VOLATILE = 449, /* VOLATILE */ + YYSYMBOL_RESTRICT = 450, /* RESTRICT */ + YYSYMBOL_READONLY = 451, /* READONLY */ + YYSYMBOL_WRITEONLY = 452, /* WRITEONLY */ + YYSYMBOL_NONTEMPORAL = 453, /* NONTEMPORAL */ + YYSYMBOL_DEVICECOHERENT = 454, /* DEVICECOHERENT */ + YYSYMBOL_QUEUEFAMILYCOHERENT = 455, /* QUEUEFAMILYCOHERENT */ + YYSYMBOL_WORKGROUPCOHERENT = 456, /* WORKGROUPCOHERENT */ + YYSYMBOL_SUBGROUPCOHERENT = 457, /* SUBGROUPCOHERENT */ + YYSYMBOL_NONPRIVATE = 458, /* NONPRIVATE */ + YYSYMBOL_SHADERCALLCOHERENT = 459, /* SHADERCALLCOHERENT */ + YYSYMBOL_NOPERSPECTIVE = 460, /* NOPERSPECTIVE */ + YYSYMBOL_EXPLICITINTERPAMD = 461, /* EXPLICITINTERPAMD */ + YYSYMBOL_PERVERTEXEXT = 462, /* PERVERTEXEXT */ + YYSYMBOL_PERVERTEXNV = 463, /* PERVERTEXNV */ + YYSYMBOL_PERPRIMITIVENV = 464, /* PERPRIMITIVENV */ + YYSYMBOL_PERVIEWNV = 465, /* PERVIEWNV */ + YYSYMBOL_PERTASKNV = 466, /* PERTASKNV */ + YYSYMBOL_PERPRIMITIVEEXT = 467, /* PERPRIMITIVEEXT */ + YYSYMBOL_TASKPAYLOADWORKGROUPEXT = 468, /* TASKPAYLOADWORKGROUPEXT */ + YYSYMBOL_PRECISE = 469, /* PRECISE */ + YYSYMBOL_YYACCEPT = 470, /* $accept */ + YYSYMBOL_variable_identifier = 471, /* variable_identifier */ + YYSYMBOL_primary_expression = 472, /* primary_expression */ + YYSYMBOL_postfix_expression = 473, /* postfix_expression */ + YYSYMBOL_integer_expression = 474, /* integer_expression */ + YYSYMBOL_function_call = 475, /* function_call */ + YYSYMBOL_function_call_or_method = 476, /* function_call_or_method */ + YYSYMBOL_function_call_generic = 477, /* function_call_generic */ + YYSYMBOL_function_call_header_no_parameters = 478, /* function_call_header_no_parameters */ + YYSYMBOL_function_call_header_with_parameters = 479, /* function_call_header_with_parameters */ + YYSYMBOL_function_call_header = 480, /* function_call_header */ + YYSYMBOL_function_identifier = 481, /* function_identifier */ + YYSYMBOL_unary_expression = 482, /* unary_expression */ + YYSYMBOL_unary_operator = 483, /* unary_operator */ + YYSYMBOL_multiplicative_expression = 484, /* multiplicative_expression */ + YYSYMBOL_additive_expression = 485, /* additive_expression */ + YYSYMBOL_shift_expression = 486, /* shift_expression */ + YYSYMBOL_relational_expression = 487, /* relational_expression */ + YYSYMBOL_equality_expression = 488, /* equality_expression */ + YYSYMBOL_and_expression = 489, /* and_expression */ + YYSYMBOL_exclusive_or_expression = 490, /* exclusive_or_expression */ + YYSYMBOL_inclusive_or_expression = 491, /* inclusive_or_expression */ + YYSYMBOL_logical_and_expression = 492, /* logical_and_expression */ + YYSYMBOL_logical_xor_expression = 493, /* logical_xor_expression */ + YYSYMBOL_logical_or_expression = 494, /* logical_or_expression */ + YYSYMBOL_conditional_expression = 495, /* conditional_expression */ + YYSYMBOL_496_1 = 496, /* $@1 */ + YYSYMBOL_assignment_expression = 497, /* assignment_expression */ + YYSYMBOL_assignment_operator = 498, /* assignment_operator */ + YYSYMBOL_expression = 499, /* expression */ + YYSYMBOL_constant_expression = 500, /* constant_expression */ + YYSYMBOL_declaration = 501, /* declaration */ + YYSYMBOL_block_structure = 502, /* block_structure */ + YYSYMBOL_503_2 = 503, /* $@2 */ + YYSYMBOL_identifier_list = 504, /* identifier_list */ + YYSYMBOL_function_prototype = 505, /* function_prototype */ + YYSYMBOL_function_declarator = 506, /* function_declarator */ + YYSYMBOL_function_header_with_parameters = 507, /* function_header_with_parameters */ + YYSYMBOL_function_header = 508, /* function_header */ + YYSYMBOL_parameter_declarator = 509, /* parameter_declarator */ + YYSYMBOL_parameter_declaration = 510, /* parameter_declaration */ + YYSYMBOL_parameter_type_specifier = 511, /* parameter_type_specifier */ + YYSYMBOL_init_declarator_list = 512, /* init_declarator_list */ + YYSYMBOL_single_declaration = 513, /* single_declaration */ + YYSYMBOL_fully_specified_type = 514, /* fully_specified_type */ + YYSYMBOL_invariant_qualifier = 515, /* invariant_qualifier */ + YYSYMBOL_interpolation_qualifier = 516, /* interpolation_qualifier */ + YYSYMBOL_layout_qualifier = 517, /* layout_qualifier */ + YYSYMBOL_layout_qualifier_id_list = 518, /* layout_qualifier_id_list */ + YYSYMBOL_layout_qualifier_id = 519, /* layout_qualifier_id */ + YYSYMBOL_precise_qualifier = 520, /* precise_qualifier */ + YYSYMBOL_type_qualifier = 521, /* type_qualifier */ + YYSYMBOL_single_type_qualifier = 522, /* single_type_qualifier */ + YYSYMBOL_storage_qualifier = 523, /* storage_qualifier */ + YYSYMBOL_non_uniform_qualifier = 524, /* non_uniform_qualifier */ + YYSYMBOL_type_name_list = 525, /* type_name_list */ + YYSYMBOL_type_specifier = 526, /* type_specifier */ + YYSYMBOL_array_specifier = 527, /* array_specifier */ + YYSYMBOL_type_parameter_specifier_opt = 528, /* type_parameter_specifier_opt */ + YYSYMBOL_type_parameter_specifier = 529, /* type_parameter_specifier */ + YYSYMBOL_type_parameter_specifier_list = 530, /* type_parameter_specifier_list */ + YYSYMBOL_type_specifier_nonarray = 531, /* type_specifier_nonarray */ + YYSYMBOL_precision_qualifier = 532, /* precision_qualifier */ + YYSYMBOL_struct_specifier = 533, /* struct_specifier */ + YYSYMBOL_534_3 = 534, /* $@3 */ + YYSYMBOL_535_4 = 535, /* $@4 */ + YYSYMBOL_struct_declaration_list = 536, /* struct_declaration_list */ + YYSYMBOL_struct_declaration = 537, /* struct_declaration */ + YYSYMBOL_struct_declarator_list = 538, /* struct_declarator_list */ + YYSYMBOL_struct_declarator = 539, /* struct_declarator */ + YYSYMBOL_initializer = 540, /* initializer */ + YYSYMBOL_initializer_list = 541, /* initializer_list */ + YYSYMBOL_declaration_statement = 542, /* declaration_statement */ + YYSYMBOL_statement = 543, /* statement */ + YYSYMBOL_simple_statement = 544, /* simple_statement */ + YYSYMBOL_demote_statement = 545, /* demote_statement */ + YYSYMBOL_compound_statement = 546, /* compound_statement */ + YYSYMBOL_547_5 = 547, /* $@5 */ + YYSYMBOL_548_6 = 548, /* $@6 */ + YYSYMBOL_statement_no_new_scope = 549, /* statement_no_new_scope */ + YYSYMBOL_statement_scoped = 550, /* statement_scoped */ + YYSYMBOL_551_7 = 551, /* $@7 */ + YYSYMBOL_552_8 = 552, /* $@8 */ + YYSYMBOL_compound_statement_no_new_scope = 553, /* compound_statement_no_new_scope */ + YYSYMBOL_statement_list = 554, /* statement_list */ + YYSYMBOL_expression_statement = 555, /* expression_statement */ + YYSYMBOL_selection_statement = 556, /* selection_statement */ + YYSYMBOL_selection_statement_nonattributed = 557, /* selection_statement_nonattributed */ + YYSYMBOL_selection_rest_statement = 558, /* selection_rest_statement */ + YYSYMBOL_condition = 559, /* condition */ + YYSYMBOL_switch_statement = 560, /* switch_statement */ + YYSYMBOL_switch_statement_nonattributed = 561, /* switch_statement_nonattributed */ + YYSYMBOL_562_9 = 562, /* $@9 */ + YYSYMBOL_switch_statement_list = 563, /* switch_statement_list */ + YYSYMBOL_case_label = 564, /* case_label */ + YYSYMBOL_iteration_statement = 565, /* iteration_statement */ + YYSYMBOL_iteration_statement_nonattributed = 566, /* iteration_statement_nonattributed */ + YYSYMBOL_567_10 = 567, /* $@10 */ + YYSYMBOL_568_11 = 568, /* $@11 */ + YYSYMBOL_569_12 = 569, /* $@12 */ + YYSYMBOL_for_init_statement = 570, /* for_init_statement */ + YYSYMBOL_conditionopt = 571, /* conditionopt */ + YYSYMBOL_for_rest_statement = 572, /* for_rest_statement */ + YYSYMBOL_jump_statement = 573, /* jump_statement */ + YYSYMBOL_translation_unit = 574, /* translation_unit */ + YYSYMBOL_external_declaration = 575, /* external_declaration */ + YYSYMBOL_function_definition = 576, /* function_definition */ + YYSYMBOL_577_13 = 577, /* $@13 */ + YYSYMBOL_attribute = 578, /* attribute */ + YYSYMBOL_attribute_list = 579, /* attribute_list */ + YYSYMBOL_single_attribute = 580, /* single_attribute */ + YYSYMBOL_spirv_requirements_list = 581, /* spirv_requirements_list */ + YYSYMBOL_spirv_requirements_parameter = 582, /* spirv_requirements_parameter */ + YYSYMBOL_spirv_extension_list = 583, /* spirv_extension_list */ + YYSYMBOL_spirv_capability_list = 584, /* spirv_capability_list */ + YYSYMBOL_spirv_execution_mode_qualifier = 585, /* spirv_execution_mode_qualifier */ + YYSYMBOL_spirv_execution_mode_parameter_list = 586, /* spirv_execution_mode_parameter_list */ + YYSYMBOL_spirv_execution_mode_parameter = 587, /* spirv_execution_mode_parameter */ + YYSYMBOL_spirv_execution_mode_id_parameter_list = 588, /* spirv_execution_mode_id_parameter_list */ + YYSYMBOL_spirv_storage_class_qualifier = 589, /* spirv_storage_class_qualifier */ + YYSYMBOL_spirv_decorate_qualifier = 590, /* spirv_decorate_qualifier */ + YYSYMBOL_spirv_decorate_parameter_list = 591, /* spirv_decorate_parameter_list */ + YYSYMBOL_spirv_decorate_parameter = 592, /* spirv_decorate_parameter */ + YYSYMBOL_spirv_decorate_id_parameter_list = 593, /* spirv_decorate_id_parameter_list */ + YYSYMBOL_spirv_decorate_id_parameter = 594, /* spirv_decorate_id_parameter */ + YYSYMBOL_spirv_decorate_string_parameter_list = 595, /* spirv_decorate_string_parameter_list */ + YYSYMBOL_spirv_type_specifier = 596, /* spirv_type_specifier */ + YYSYMBOL_spirv_type_parameter_list = 597, /* spirv_type_parameter_list */ + YYSYMBOL_spirv_type_parameter = 598, /* spirv_type_parameter */ + YYSYMBOL_spirv_instruction_qualifier = 599, /* spirv_instruction_qualifier */ + YYSYMBOL_spirv_instruction_qualifier_list = 600, /* spirv_instruction_qualifier_list */ + YYSYMBOL_spirv_instruction_qualifier_id = 601 /* spirv_instruction_qualifier_id */ }; typedef enum yysymbol_kind_t yysymbol_kind_t; @@ -732,7 +737,7 @@ typedef enum yysymbol_kind_t yysymbol_kind_t; extern int yylex(YYSTYPE*, TParseContext&); -#line 736 "MachineIndependent/glslang_tab.cpp" +#line 741 "MachineIndependent/glslang_tab.cpp" #ifdef short @@ -1054,21 +1059,21 @@ union yyalloc #endif /* !YYCOPY_NEEDED */ /* YYFINAL -- State number of the termination state. */ -#define YYFINAL 452 +#define YYFINAL 457 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 12701 +#define YYLAST 12858 /* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 465 +#define YYNTOKENS 470 /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 132 /* YYNRULES -- Number of rules. */ -#define YYNRULES 700 +#define YYNRULES 705 /* YYNSTATES -- Number of states. */ -#define YYNSTATES 946 +#define YYNSTATES 951 /* YYMAXUTOK -- Last valid token kind. */ -#define YYMAXUTOK 719 +#define YYMAXUTOK 724 /* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM @@ -1153,84 +1158,85 @@ static const yytype_int16 yytranslate[] = 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, - 455, 456, 457, 458, 459, 460, 461, 462, 463, 464 + 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, + 465, 466, 467, 468, 469 }; #if YYDEBUG /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ static const yytype_int16 yyrline[] = { - 0, 355, 355, 361, 364, 369, 372, 375, 379, 382, - 385, 389, 393, 397, 401, 405, 409, 415, 422, 425, - 428, 431, 434, 439, 447, 454, 461, 467, 471, 478, - 481, 487, 505, 530, 538, 543, 570, 578, 584, 588, - 592, 612, 613, 614, 615, 621, 622, 627, 632, 641, - 642, 647, 655, 656, 662, 671, 672, 677, 682, 687, - 695, 696, 705, 717, 718, 727, 728, 737, 738, 747, - 748, 756, 757, 765, 766, 774, 775, 775, 793, 794, - 810, 814, 818, 822, 827, 831, 835, 839, 843, 847, - 851, 858, 861, 872, 879, 884, 891, 896, 901, 908, - 912, 916, 920, 925, 930, 939, 939, 950, 954, 961, - 966, 974, 982, 994, 997, 1004, 1017, 1040, 1063, 1078, - 1103, 1114, 1124, 1134, 1144, 1153, 1156, 1160, 1164, 1169, - 1177, 1182, 1187, 1192, 1197, 1206, 1216, 1243, 1252, 1259, - 1266, 1273, 1280, 1288, 1296, 1306, 1316, 1323, 1333, 1339, - 1342, 1349, 1353, 1357, 1365, 1374, 1377, 1388, 1391, 1394, - 1398, 1402, 1406, 1410, 1413, 1418, 1422, 1427, 1435, 1439, - 1444, 1450, 1456, 1463, 1468, 1473, 1481, 1486, 1498, 1512, - 1518, 1523, 1531, 1539, 1547, 1555, 1563, 1571, 1579, 1587, - 1595, 1602, 1609, 1613, 1618, 1623, 1628, 1633, 1638, 1643, - 1647, 1651, 1655, 1659, 1665, 1671, 1681, 1688, 1691, 1699, - 1706, 1717, 1722, 1730, 1734, 1744, 1747, 1753, 1759, 1765, - 1773, 1783, 1787, 1791, 1795, 1800, 1804, 1809, 1814, 1819, - 1824, 1829, 1834, 1839, 1844, 1849, 1855, 1861, 1867, 1872, - 1877, 1882, 1887, 1892, 1897, 1902, 1907, 1912, 1917, 1922, - 1927, 1934, 1939, 1944, 1949, 1954, 1959, 1964, 1969, 1974, - 1979, 1984, 1989, 1997, 2005, 2013, 2019, 2025, 2031, 2037, + 0, 357, 357, 363, 366, 371, 374, 377, 381, 384, + 387, 391, 395, 399, 403, 407, 411, 417, 424, 427, + 430, 433, 436, 441, 449, 456, 463, 469, 473, 480, + 483, 489, 507, 532, 540, 545, 572, 580, 586, 590, + 594, 614, 615, 616, 617, 623, 624, 629, 634, 643, + 644, 649, 657, 658, 664, 673, 674, 679, 684, 689, + 697, 698, 707, 719, 720, 729, 730, 739, 740, 749, + 750, 758, 759, 767, 768, 776, 777, 777, 795, 796, + 812, 816, 820, 824, 829, 833, 837, 841, 845, 849, + 853, 860, 863, 874, 881, 886, 893, 898, 903, 910, + 914, 918, 922, 927, 932, 941, 941, 952, 956, 963, + 968, 976, 984, 996, 999, 1006, 1019, 1042, 1065, 1080, + 1105, 1116, 1126, 1136, 1146, 1155, 1158, 1162, 1166, 1171, + 1179, 1184, 1189, 1194, 1199, 1208, 1218, 1245, 1254, 1261, + 1268, 1275, 1282, 1290, 1298, 1308, 1318, 1325, 1335, 1341, + 1344, 1351, 1355, 1359, 1367, 1376, 1379, 1390, 1393, 1396, + 1400, 1404, 1408, 1412, 1415, 1420, 1424, 1429, 1437, 1441, + 1446, 1452, 1458, 1465, 1470, 1475, 1483, 1488, 1500, 1514, + 1520, 1525, 1533, 1541, 1549, 1557, 1565, 1573, 1581, 1589, + 1597, 1604, 1611, 1615, 1620, 1625, 1630, 1635, 1640, 1645, + 1649, 1653, 1657, 1661, 1665, 1671, 1677, 1687, 1694, 1697, + 1705, 1712, 1723, 1728, 1736, 1740, 1750, 1753, 1759, 1765, + 1771, 1779, 1789, 1793, 1797, 1801, 1806, 1810, 1815, 1820, + 1825, 1830, 1835, 1840, 1845, 1850, 1855, 1861, 1867, 1873, + 1878, 1883, 1888, 1893, 1898, 1903, 1908, 1913, 1918, 1923, + 1928, 1933, 1940, 1945, 1950, 1955, 1960, 1965, 1970, 1975, + 1980, 1985, 1990, 1995, 2003, 2011, 2019, 2025, 2031, 2037, 2043, 2049, 2055, 2061, 2067, 2073, 2079, 2085, 2091, 2097, 2103, 2109, 2115, 2121, 2127, 2133, 2139, 2145, 2151, 2157, - 2163, 2169, 2175, 2181, 2187, 2193, 2199, 2205, 2211, 2219, - 2227, 2235, 2243, 2251, 2259, 2267, 2275, 2283, 2291, 2299, - 2307, 2313, 2319, 2325, 2331, 2337, 2343, 2349, 2355, 2361, + 2163, 2169, 2175, 2181, 2187, 2193, 2199, 2205, 2211, 2217, + 2225, 2233, 2241, 2249, 2257, 2265, 2273, 2281, 2289, 2297, + 2305, 2313, 2319, 2325, 2331, 2337, 2343, 2349, 2355, 2361, 2367, 2373, 2379, 2385, 2391, 2397, 2403, 2409, 2415, 2421, 2427, 2433, 2439, 2445, 2451, 2457, 2463, 2469, 2475, 2481, - 2487, 2493, 2499, 2505, 2511, 2517, 2523, 2527, 2531, 2535, - 2540, 2545, 2550, 2555, 2560, 2565, 2570, 2575, 2580, 2585, - 2590, 2595, 2600, 2605, 2611, 2617, 2623, 2629, 2635, 2641, - 2647, 2653, 2659, 2665, 2671, 2677, 2683, 2688, 2693, 2698, - 2703, 2708, 2713, 2718, 2723, 2728, 2733, 2738, 2743, 2748, - 2753, 2758, 2763, 2768, 2773, 2778, 2783, 2788, 2793, 2798, - 2803, 2808, 2813, 2818, 2823, 2828, 2833, 2838, 2843, 2848, - 2854, 2860, 2865, 2870, 2875, 2881, 2886, 2891, 2896, 2902, - 2907, 2912, 2917, 2923, 2928, 2933, 2938, 2944, 2950, 2956, - 2962, 2967, 2973, 2979, 2985, 2990, 2995, 3000, 3005, 3010, - 3016, 3021, 3026, 3031, 3037, 3042, 3047, 3052, 3058, 3063, - 3068, 3073, 3079, 3084, 3089, 3094, 3100, 3105, 3110, 3115, - 3121, 3126, 3131, 3136, 3142, 3147, 3152, 3157, 3163, 3168, - 3173, 3178, 3184, 3189, 3194, 3199, 3205, 3210, 3215, 3220, - 3226, 3231, 3236, 3241, 3247, 3252, 3257, 3262, 3268, 3273, - 3278, 3283, 3289, 3294, 3299, 3304, 3310, 3315, 3320, 3325, - 3330, 3335, 3340, 3345, 3350, 3355, 3360, 3365, 3370, 3375, - 3380, 3385, 3390, 3395, 3400, 3405, 3410, 3415, 3420, 3425, - 3430, 3436, 3442, 3448, 3454, 3460, 3466, 3472, 3479, 3486, - 3492, 3498, 3504, 3510, 3517, 3524, 3531, 3538, 3542, 3546, - 3551, 3567, 3572, 3577, 3585, 3585, 3602, 3602, 3612, 3615, - 3628, 3650, 3677, 3681, 3687, 3692, 3703, 3706, 3712, 3718, - 3727, 3730, 3736, 3740, 3741, 3747, 3748, 3749, 3750, 3751, - 3752, 3753, 3754, 3758, 3766, 3767, 3771, 3767, 3783, 3784, - 3788, 3788, 3795, 3795, 3809, 3812, 3820, 3828, 3839, 3840, - 3844, 3847, 3854, 3861, 3865, 3873, 3877, 3890, 3893, 3900, - 3900, 3920, 3923, 3929, 3941, 3953, 3956, 3964, 3964, 3979, - 3979, 3997, 3997, 4018, 4021, 4027, 4030, 4036, 4040, 4047, - 4052, 4057, 4064, 4067, 4071, 4075, 4079, 4088, 4092, 4101, - 4104, 4107, 4115, 4115, 4157, 4162, 4165, 4170, 4173, 4178, - 4181, 4186, 4189, 4194, 4197, 4202, 4205, 4210, 4214, 4219, - 4223, 4228, 4232, 4239, 4242, 4247, 4250, 4253, 4256, 4259, - 4264, 4273, 4284, 4289, 4297, 4301, 4306, 4310, 4315, 4319, - 4324, 4328, 4335, 4338, 4343, 4346, 4349, 4352, 4357, 4360, - 4365, 4371, 4374, 4377, 4380, 4385, 4389, 4394, 4398, 4403, - 4407, 4414, 4417, 4422, 4425, 4430, 4433, 4439, 4442, 4447, - 4450 + 2487, 2493, 2499, 2505, 2511, 2517, 2523, 2529, 2533, 2537, + 2541, 2546, 2551, 2556, 2561, 2566, 2571, 2576, 2581, 2586, + 2591, 2596, 2601, 2606, 2611, 2617, 2623, 2629, 2635, 2641, + 2647, 2653, 2659, 2665, 2671, 2677, 2683, 2689, 2694, 2699, + 2704, 2709, 2714, 2719, 2724, 2729, 2734, 2739, 2744, 2749, + 2754, 2759, 2764, 2769, 2774, 2779, 2784, 2789, 2794, 2799, + 2804, 2809, 2814, 2819, 2824, 2829, 2834, 2839, 2844, 2849, + 2854, 2860, 2866, 2871, 2876, 2881, 2887, 2892, 2897, 2902, + 2908, 2913, 2918, 2923, 2929, 2934, 2939, 2944, 2950, 2956, + 2962, 2968, 2973, 2979, 2985, 2991, 2996, 3001, 3006, 3011, + 3016, 3022, 3027, 3032, 3037, 3043, 3048, 3053, 3058, 3064, + 3069, 3074, 3079, 3085, 3090, 3095, 3100, 3106, 3111, 3116, + 3121, 3127, 3132, 3137, 3142, 3148, 3153, 3158, 3163, 3169, + 3174, 3179, 3184, 3190, 3195, 3200, 3205, 3211, 3216, 3221, + 3226, 3232, 3237, 3242, 3247, 3253, 3258, 3263, 3268, 3274, + 3279, 3284, 3289, 3295, 3300, 3305, 3310, 3316, 3321, 3326, + 3331, 3336, 3341, 3346, 3351, 3356, 3361, 3366, 3371, 3376, + 3381, 3386, 3391, 3396, 3401, 3406, 3411, 3416, 3421, 3426, + 3431, 3436, 3442, 3448, 3454, 3460, 3466, 3472, 3478, 3485, + 3492, 3498, 3504, 3510, 3516, 3523, 3530, 3537, 3544, 3549, + 3554, 3558, 3564, 3568, 3572, 3577, 3593, 3598, 3603, 3611, + 3611, 3628, 3628, 3638, 3641, 3654, 3676, 3703, 3707, 3713, + 3718, 3729, 3732, 3738, 3744, 3753, 3756, 3762, 3766, 3767, + 3773, 3774, 3775, 3776, 3777, 3778, 3779, 3780, 3784, 3792, + 3793, 3797, 3793, 3811, 3812, 3816, 3816, 3823, 3823, 3837, + 3840, 3850, 3858, 3869, 3870, 3874, 3877, 3884, 3891, 3895, + 3903, 3907, 3920, 3923, 3930, 3930, 3950, 3953, 3959, 3971, + 3983, 3986, 3994, 3994, 4009, 4009, 4027, 4027, 4048, 4051, + 4057, 4060, 4066, 4070, 4077, 4082, 4087, 4094, 4097, 4101, + 4105, 4109, 4118, 4122, 4131, 4134, 4137, 4145, 4145, 4187, + 4192, 4195, 4200, 4203, 4208, 4211, 4216, 4219, 4224, 4227, + 4232, 4235, 4240, 4244, 4249, 4253, 4258, 4262, 4269, 4272, + 4277, 4280, 4283, 4286, 4289, 4294, 4303, 4314, 4319, 4327, + 4331, 4336, 4340, 4345, 4349, 4354, 4358, 4365, 4368, 4373, + 4376, 4379, 4382, 4387, 4390, 4395, 4401, 4404, 4407, 4410, + 4415, 4419, 4424, 4428, 4433, 4437, 4444, 4447, 4452, 4455, + 4460, 4463, 4469, 4472, 4477, 4480 }; #endif @@ -1276,16 +1282,16 @@ static const char *const yytname[] = "F64MAT2X4", "F64MAT3X2", "F64MAT3X3", "F64MAT3X4", "F64MAT4X2", "F64MAT4X3", "F64MAT4X4", "ATOMIC_UINT", "ACCSTRUCTNV", "ACCSTRUCTEXT", "RAYQUERYEXT", "FCOOPMATNV", "ICOOPMATNV", "UCOOPMATNV", "COOPMAT", - "HITOBJECTNV", "HITOBJECTATTRNV", "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", + "COOPVECNV", "HITOBJECTNV", "HITOBJECTATTRNV", "TENSORLAYOUTNV", + "TENSORVIEWNV", "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", @@ -1340,15 +1346,16 @@ static const char *const yytname[] = "TILEIMAGEEXT", "FLAT", "SMOOTH", "LAYOUT", "DOUBLECONSTANT", "INT16CONSTANT", "UINT16CONSTANT", "FLOAT16CONSTANT", "INT32CONSTANT", "UINT32CONSTANT", "INT64CONSTANT", "UINT64CONSTANT", "SUBROUTINE", - "DEMOTE", "PAYLOADNV", "PAYLOADINNV", "HITATTRNV", "CALLDATANV", - "CALLDATAINNV", "PAYLOADEXT", "PAYLOADINEXT", "HITATTREXT", + "DEMOTE", "FUNCTION", "PAYLOADNV", "PAYLOADINNV", "HITATTRNV", + "CALLDATANV", "CALLDATAINNV", "PAYLOADEXT", "PAYLOADINEXT", "HITATTREXT", "CALLDATAEXT", "CALLDATAINEXT", "PATCH", "SAMPLE", "NONUNIFORM", "COHERENT", "VOLATILE", "RESTRICT", "READONLY", "WRITEONLY", - "DEVICECOHERENT", "QUEUEFAMILYCOHERENT", "WORKGROUPCOHERENT", - "SUBGROUPCOHERENT", "NONPRIVATE", "SHADERCALLCOHERENT", "NOPERSPECTIVE", - "EXPLICITINTERPAMD", "PERVERTEXEXT", "PERVERTEXNV", "PERPRIMITIVENV", - "PERVIEWNV", "PERTASKNV", "PERPRIMITIVEEXT", "TASKPAYLOADWORKGROUPEXT", - "PRECISE", "$accept", "variable_identifier", "primary_expression", + "NONTEMPORAL", "DEVICECOHERENT", "QUEUEFAMILYCOHERENT", + "WORKGROUPCOHERENT", "SUBGROUPCOHERENT", "NONPRIVATE", + "SHADERCALLCOHERENT", "NOPERSPECTIVE", "EXPLICITINTERPAMD", + "PERVERTEXEXT", "PERVERTEXNV", "PERPRIMITIVENV", "PERVIEWNV", + "PERTASKNV", "PERPRIMITIVEEXT", "TASKPAYLOADWORKGROUPEXT", "PRECISE", + "$accept", "variable_identifier", "primary_expression", "postfix_expression", "integer_expression", "function_call", "function_call_or_method", "function_call_generic", "function_call_header_no_parameters", @@ -1407,12 +1414,12 @@ yysymbol_name (yysymbol_kind_t yysymbol) } #endif -#define YYPACT_NINF (-872) +#define YYPACT_NINF (-838) #define yypact_value_is_default(Yyn) \ ((Yyn) == YYPACT_NINF) -#define YYTABLE_NINF (-695) +#define YYTABLE_NINF (-700) #define yytable_value_is_error(Yyn) \ 0 @@ -1421,101 +1428,102 @@ yysymbol_name (yysymbol_kind_t yysymbol) STATE-NUM. */ static const yytype_int16 yypact[] = { - 4648, -872, -872, -872, -872, -872, -872, -872, -872, -872, - -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, - -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, - -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, - -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, - -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, - -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, - -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, - -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, - -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, - -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, - -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, - -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, - -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, - -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, - -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, - -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, - -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, - -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, - -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, - -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, - -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, - -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, - -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, - -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, - -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, - -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, - -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, - -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, - -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, - -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, - -872, -872, -872, -872, -872, -872, -872, -872, -305, -301, - -289, -276, -246, -238, -227, -182, -872, -872, -872, -872, - -872, -168, -872, -872, -872, -872, -872, -55, -872, -872, - -872, -872, -872, -319, -872, -872, -872, -872, -872, -872, - -872, -135, -120, -872, -872, -872, -872, -872, -872, -872, - -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, - -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, - -872, -872, -872, -872, -872, -872, -872, -872, -327, -114, - -81, -124, 7882, -313, -872, -101, -872, -872, -872, -872, - 5572, -872, -872, -872, -872, -94, -872, -872, 952, -872, - -872, 7882, -73, -872, -872, -872, 6034, -78, -252, -250, - -216, -197, -136, -78, -127, -49, 12303, -872, -13, -346, - -39, -872, -309, -872, -10, -9, 7882, -872, -872, -872, - 7882, -38, -37, -872, -267, -872, -236, -872, -872, 10983, - -2, -872, -872, -872, 3, -35, 7882, -872, -8, -6, - -1, -872, -256, -872, -255, -4, 4, 7, 8, -237, - 10, 11, 13, 14, 15, 18, -232, 9, 19, 27, - -188, -872, -3, 7882, -872, 20, -872, -229, -872, -872, - -219, 9223, -872, -272, 1414, -872, -872, -872, -872, -872, - -2, -277, -872, 9663, -265, -872, -23, -872, -112, 10983, - 10983, -872, 10983, -872, -872, -872, -872, -872, -872, -872, - -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, - -872, -872, -253, -872, -872, -872, 29, -204, 11423, 28, - -872, 10983, -872, 31, -321, 17, -9, 32, -872, -325, - -78, -872, 5, -872, -330, 33, -125, 10983, -123, -872, - -130, -119, -146, -118, 34, -103, -78, -872, 11863, -872, - -74, 10983, 36, -49, -872, 7882, 24, 6496, -872, 7882, - 10983, -872, -346, -872, 30, -872, -872, -33, -133, -105, - -303, -11, -14, 21, 23, 48, 52, -316, 41, -872, - 10103, -872, 42, -872, -872, 46, 38, 40, -872, 64, - 67, 60, 10543, 74, 10983, 68, 65, 69, 70, 73, - -167, -872, -872, -47, -872, -114, 77, 31, -872, -872, - -872, -872, -872, 1876, -872, -872, -872, -872, -872, -872, - -872, -872, -872, 5110, 17, 9663, -261, 8343, -872, -872, - 9663, 7882, -872, 50, -872, -872, -872, -203, -872, -872, - 10983, 51, -872, -872, 10983, 87, -872, -872, -872, 10983, - -872, -872, -872, -312, -872, -872, -200, 80, -872, -872, - -872, -872, -872, -872, -199, -872, -196, -872, -872, -195, - 71, -872, -872, -872, -872, -169, -872, -164, -872, -872, - -872, -872, -872, -161, -872, 83, -872, -160, 84, -153, - 80, -872, -278, -152, -872, 91, 94, -872, -872, 24, - -2, -43, -872, -872, -872, 6958, -872, -872, -872, 10983, - 10983, 10983, 10983, 10983, 10983, 10983, 10983, 10983, 10983, 10983, - 10983, 10983, 10983, 10983, 10983, 10983, 10983, 10983, -872, -872, - -872, 93, -872, 2338, -872, -872, -872, 2338, -872, 10983, - -872, -872, -42, 10983, -32, -872, -872, -872, -872, -872, - -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, - -872, 10983, 10983, -872, -872, -872, -872, -872, -872, -872, - 9663, -872, -872, -76, -872, 7420, -872, -872, 96, 95, - -872, -872, -872, -872, -872, -132, -131, -872, -311, -872, - -330, -872, -330, -872, 10983, 10983, -872, -130, -872, -130, - -872, -146, -146, -872, 101, 34, -872, 11863, -872, 10983, - -872, -872, -41, 17, 24, -872, -872, -872, -872, -872, - -33, -33, -133, -133, -105, -105, -105, -105, -303, -303, - -11, -14, 21, 23, 48, 52, 10983, -872, 2338, 4186, - 59, 3724, -151, -872, -150, -872, -872, -872, -872, -872, - 8783, -872, -872, -872, 105, -872, 72, -872, -149, -872, - -148, -872, -141, -872, -140, -872, -139, -138, -872, -872, - -872, -28, 102, 95, 75, 107, 106, -872, -872, 4186, - 108, -872, -872, -872, -872, -872, -872, -872, -872, -872, - -872, -872, 10983, -872, 100, 2800, 10983, -872, 104, 109, - 76, 112, 3262, -872, 113, -872, 9663, -872, -872, -872, - -137, 10983, 2800, 108, -872, -872, 2338, -872, 110, 95, - -872, -872, 2338, 114, -872, -872 + 4693, -838, -838, -838, -838, -838, -838, -838, -838, -838, + -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, + -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, + -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, + -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, + -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, + -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, + -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, + -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, + -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, + -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, + -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, + -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, + -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, + -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, + -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, + -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, + -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, + -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, + -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, + -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, + -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, + -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, + -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, + -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, + -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, + -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, + -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, + -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, + -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, + -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, + -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, + -838, -301, -281, -273, -261, -183, -122, -105, -103, -838, + -838, -838, -838, -838, -91, -838, -838, -838, -838, -838, + -143, -838, -838, -838, -838, -838, -312, -838, -838, -838, + -838, -838, -838, -838, -77, -63, -838, -838, -838, -838, + -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, + -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, + -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, + -838, -838, -838, -338, -111, -136, -80, 7962, -175, -838, + -97, -838, -838, -838, -838, 5627, -838, -838, -838, -838, + -56, -838, -838, 957, -838, -838, 7962, -37, -838, -838, + -838, 6094, -53, -135, -129, -128, -127, -123, -53, -121, + -46, 12424, -838, -13, -360, -44, -838, -317, -838, -10, + -7, 7962, -838, -838, -838, 7962, -38, -36, -838, -269, + -838, -226, -838, -838, 11092, -5, -838, -838, -838, -2, + -34, 7962, -838, -9, -6, -3, -838, -311, -838, -254, + -4, -1, 1, 3, -224, 4, 5, 7, 8, 9, + 10, -213, 18, 13, 21, -306, -838, 14, 7962, -838, + 19, -838, -211, -838, -838, -202, 9316, -838, -307, 1424, + -838, -838, -838, -838, -838, -5, -272, -838, 9760, -266, + -838, -27, -838, -90, 11092, 11092, -838, 11092, -838, -838, + -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, + -838, -838, -838, -838, -838, -838, -838, -252, -838, -838, + -838, 22, -201, 11536, 27, -838, 11092, -838, 29, -330, + 20, -7, 30, -838, -329, -53, -838, -23, -838, -318, + 31, -112, 11092, -102, -838, -147, -101, -160, -100, 32, + -73, -53, -838, 11980, -838, -72, 11092, 34, -46, -838, + 7962, 16, 6561, -838, 7962, 11092, -838, -360, -838, 26, + -838, -838, -30, -268, -212, -308, -198, -15, 23, 15, + 46, 53, -316, 39, -838, 10204, -838, 38, -838, -838, + 45, 24, 40, -838, 48, 49, 44, 10648, 56, 11092, + 63, 54, 62, 66, 67, -233, -838, -838, -39, -838, + -111, 78, 29, -838, -838, -838, -838, -838, 1891, -838, + -838, -838, -838, -838, -838, -838, -838, -838, 5160, 20, + 9760, -264, 8428, -838, -838, 9760, 7962, -838, 43, -838, + -838, -838, -200, -838, -838, 11092, 50, -838, -838, 11092, + 79, -838, -838, -838, 11092, -838, -838, -838, -320, -838, + -838, -197, 72, -838, -838, -838, -838, -838, -838, -188, + -838, -187, -838, -838, -186, 75, -838, -838, -838, -838, + -185, -838, -165, -838, -838, -838, -838, -838, -164, -838, + 81, -838, -162, 82, -161, 72, -838, -313, -157, -838, + 84, 89, -838, -838, 16, -5, -35, -838, -838, -838, + 7028, -838, -838, -838, 11092, 11092, 11092, 11092, 11092, 11092, + 11092, 11092, 11092, 11092, 11092, 11092, 11092, 11092, 11092, 11092, + 11092, 11092, 11092, -838, -838, -838, 88, -838, 2358, -838, + -838, -838, 2358, -838, 11092, -838, -838, -33, 11092, -205, + -838, -838, -838, -838, -838, -838, -838, -838, -838, -838, + -838, -838, -838, -838, -838, -838, 11092, 11092, -838, -838, + -838, -838, -838, -838, -838, 9760, -838, -838, -180, -838, + 7495, -838, -838, 91, 85, -838, -838, -838, -838, -838, + -218, -139, -838, -315, -838, -318, -838, -318, -838, 11092, + 11092, -838, -147, -838, -147, -838, -160, -160, -838, 98, + 32, -838, 11980, -838, 11092, -838, -838, -29, 20, 16, + -838, -838, -838, -838, -838, -30, -30, -268, -268, -212, + -212, -212, -212, -308, -308, -198, -15, 23, 15, 46, + 53, 11092, -838, 2358, 4226, 57, 3759, -153, -838, -152, + -838, -838, -838, -838, -838, 8872, -838, -838, -838, 99, + -838, 69, -838, -150, -838, -149, -838, -148, -838, -145, + -838, -141, -140, -838, -838, -838, -137, 95, 85, 68, + 104, 106, -838, -838, 4226, 103, -838, -838, -838, -838, + -838, -838, -838, -838, -838, -838, -838, 11092, -838, 100, + 2825, 11092, -838, 101, 107, 64, 109, 3292, -838, 110, + -838, 9760, -838, -838, -838, -138, 11092, 2825, 103, -838, + -838, 2358, -838, 108, 85, -838, -838, 2358, 111, -838, + -838 }; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. @@ -1523,139 +1531,140 @@ static const yytype_int16 yypact[] = means the default is an error. */ static const yytype_int16 yydefact[] = { - 0, 168, 225, 223, 224, 222, 229, 230, 231, 232, - 233, 234, 235, 236, 237, 226, 227, 228, 238, 239, - 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, - 351, 352, 353, 354, 355, 356, 357, 377, 378, 379, - 380, 381, 382, 383, 392, 405, 406, 393, 394, 396, - 395, 397, 398, 399, 400, 401, 402, 403, 404, 177, - 178, 251, 252, 250, 253, 260, 261, 258, 259, 256, - 257, 254, 255, 283, 284, 285, 295, 296, 297, 280, - 281, 282, 292, 293, 294, 277, 278, 279, 289, 290, - 291, 274, 275, 276, 286, 287, 288, 262, 263, 264, - 298, 299, 300, 265, 266, 267, 310, 311, 312, 268, - 269, 270, 322, 323, 324, 271, 272, 273, 334, 335, - 336, 301, 302, 303, 304, 305, 306, 307, 308, 309, - 313, 314, 315, 316, 317, 318, 319, 320, 321, 325, - 326, 327, 328, 329, 330, 331, 332, 333, 337, 338, - 339, 340, 341, 342, 343, 344, 345, 349, 346, 347, - 348, 533, 534, 535, 536, 538, 182, 361, 362, 385, - 388, 350, 359, 360, 376, 358, 407, 408, 411, 412, - 413, 415, 416, 417, 419, 420, 421, 423, 424, 520, - 521, 384, 386, 387, 363, 364, 365, 409, 366, 370, - 371, 374, 414, 418, 422, 367, 368, 372, 373, 410, - 369, 375, 454, 456, 457, 458, 460, 461, 462, 464, - 465, 466, 468, 469, 470, 472, 473, 474, 476, 477, - 478, 480, 481, 482, 484, 485, 486, 488, 489, 490, - 492, 493, 494, 496, 497, 455, 459, 463, 467, 471, - 479, 483, 487, 475, 491, 495, 498, 499, 500, 501, - 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, - 512, 513, 514, 515, 516, 517, 518, 519, 389, 390, - 391, 425, 434, 436, 430, 435, 437, 438, 440, 441, - 442, 444, 445, 446, 448, 449, 450, 452, 453, 426, - 427, 428, 439, 429, 431, 432, 433, 443, 447, 451, - 525, 526, 529, 530, 531, 532, 527, 528, 0, 0, - 0, 0, 0, 0, 0, 0, 166, 167, 522, 523, - 524, 0, 631, 137, 541, 542, 543, 0, 540, 172, - 170, 171, 169, 0, 221, 173, 175, 176, 174, 139, - 138, 0, 203, 184, 186, 181, 188, 190, 185, 187, - 183, 189, 191, 179, 180, 206, 192, 199, 200, 201, - 202, 193, 194, 195, 196, 197, 198, 140, 141, 143, - 142, 144, 146, 147, 145, 205, 154, 630, 0, 632, - 0, 114, 113, 0, 125, 130, 161, 160, 158, 162, - 0, 155, 157, 163, 135, 216, 159, 539, 0, 627, - 629, 0, 0, 164, 165, 537, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 546, 0, 0, - 0, 99, 0, 94, 0, 109, 0, 121, 115, 123, - 0, 124, 0, 97, 131, 102, 0, 156, 136, 0, - 209, 215, 1, 628, 0, 0, 0, 96, 0, 0, - 0, 639, 0, 697, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 637, - 0, 635, 0, 0, 544, 151, 153, 0, 149, 207, - 0, 0, 100, 0, 0, 633, 110, 116, 120, 122, - 118, 126, 117, 0, 132, 105, 0, 103, 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, - 219, 0, 36, 218, 0, 210, 111, 0, 95, 0, - 0, 695, 0, 647, 0, 0, 0, 0, 0, 664, - 0, 0, 0, 0, 0, 0, 0, 689, 0, 662, - 0, 0, 0, 0, 98, 0, 0, 0, 548, 0, - 0, 148, 0, 204, 0, 211, 45, 49, 52, 55, - 60, 63, 65, 67, 69, 71, 73, 75, 0, 34, - 0, 101, 575, 584, 588, 0, 0, 0, 609, 0, + 0, 168, 226, 224, 225, 223, 230, 231, 232, 233, + 234, 235, 236, 237, 238, 227, 228, 229, 239, 240, + 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, + 352, 353, 354, 355, 356, 357, 358, 378, 379, 380, + 381, 382, 383, 384, 393, 406, 407, 394, 395, 397, + 396, 398, 399, 400, 401, 402, 403, 404, 405, 177, + 178, 252, 253, 251, 254, 261, 262, 259, 260, 257, + 258, 255, 256, 284, 285, 286, 296, 297, 298, 281, + 282, 283, 293, 294, 295, 278, 279, 280, 290, 291, + 292, 275, 276, 277, 287, 288, 289, 263, 264, 265, + 299, 300, 301, 266, 267, 268, 311, 312, 313, 269, + 270, 271, 323, 324, 325, 272, 273, 274, 335, 336, + 337, 302, 303, 304, 305, 306, 307, 308, 309, 310, + 314, 315, 316, 317, 318, 319, 320, 321, 322, 326, + 327, 328, 329, 330, 331, 332, 333, 334, 338, 339, + 340, 341, 342, 343, 344, 345, 346, 350, 347, 348, + 349, 534, 535, 536, 537, 541, 543, 182, 538, 539, + 362, 363, 386, 389, 351, 360, 361, 377, 359, 408, + 409, 412, 413, 414, 416, 417, 418, 420, 421, 422, + 424, 425, 521, 522, 385, 387, 388, 364, 365, 366, + 410, 367, 371, 372, 375, 415, 419, 423, 368, 369, + 373, 374, 411, 370, 376, 455, 457, 458, 459, 461, + 462, 463, 465, 466, 467, 469, 470, 471, 473, 474, + 475, 477, 478, 479, 481, 482, 483, 485, 486, 487, + 489, 490, 491, 493, 494, 495, 497, 498, 456, 460, + 464, 468, 472, 480, 484, 488, 476, 492, 496, 499, + 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, + 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, + 520, 390, 391, 392, 426, 435, 437, 431, 436, 438, + 439, 441, 442, 443, 445, 446, 447, 449, 450, 451, + 453, 454, 427, 428, 429, 440, 430, 432, 433, 434, + 444, 448, 452, 526, 527, 530, 531, 532, 533, 528, + 529, 0, 0, 0, 0, 0, 0, 0, 0, 166, + 167, 523, 524, 525, 0, 636, 137, 546, 547, 548, + 0, 545, 172, 170, 171, 169, 0, 222, 173, 175, + 176, 174, 139, 138, 0, 204, 540, 184, 186, 181, + 188, 190, 185, 187, 183, 189, 191, 179, 180, 207, + 192, 199, 200, 201, 202, 203, 193, 194, 195, 196, + 197, 198, 140, 141, 143, 142, 144, 146, 147, 145, + 206, 154, 635, 0, 637, 0, 114, 113, 0, 125, + 130, 161, 160, 158, 162, 0, 155, 157, 163, 135, + 217, 159, 544, 0, 632, 634, 0, 0, 164, 165, + 542, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 551, 0, 0, 0, 99, 0, 94, 0, + 109, 0, 121, 115, 123, 0, 124, 0, 97, 131, + 102, 0, 156, 136, 0, 210, 216, 1, 633, 0, + 0, 0, 96, 0, 0, 0, 644, 0, 702, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 45, 78, 91, 0, 562, 0, 163, 135, 565, 586, - 564, 572, 563, 0, 566, 567, 590, 568, 597, 569, - 570, 605, 571, 0, 119, 0, 127, 0, 556, 134, - 0, 0, 107, 0, 104, 38, 39, 0, 22, 23, - 0, 0, 28, 27, 0, 221, 31, 33, 40, 0, - 217, 112, 699, 0, 700, 640, 0, 0, 698, 659, - 655, 656, 657, 658, 0, 653, 0, 93, 660, 0, - 0, 674, 675, 676, 677, 0, 672, 0, 681, 682, - 683, 684, 680, 0, 678, 0, 685, 0, 0, 0, - 2, 693, 216, 0, 691, 0, 0, 634, 636, 0, - 554, 0, 552, 547, 549, 0, 152, 150, 208, 0, + 0, 0, 0, 0, 642, 0, 640, 0, 0, 549, + 151, 153, 0, 149, 208, 0, 0, 100, 0, 0, + 638, 110, 116, 120, 122, 118, 126, 117, 0, 132, + 105, 0, 103, 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, 220, 0, 36, 219, 0, + 211, 111, 0, 95, 0, 0, 700, 0, 652, 0, + 0, 0, 0, 0, 669, 0, 0, 0, 0, 0, + 0, 0, 694, 0, 667, 0, 0, 0, 0, 98, + 0, 0, 0, 553, 0, 0, 148, 0, 205, 0, + 212, 45, 49, 52, 55, 60, 63, 65, 67, 69, + 71, 73, 75, 0, 34, 0, 101, 580, 589, 593, + 0, 0, 0, 614, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 45, 78, 91, 0, 567, + 0, 163, 135, 570, 591, 569, 577, 568, 0, 571, + 572, 595, 573, 602, 574, 575, 610, 576, 0, 119, + 0, 127, 0, 561, 134, 0, 0, 107, 0, 104, + 38, 39, 0, 22, 23, 0, 0, 28, 27, 0, + 222, 31, 33, 40, 0, 218, 112, 704, 0, 705, + 645, 0, 0, 703, 664, 660, 661, 662, 663, 0, + 658, 0, 93, 665, 0, 0, 679, 680, 681, 682, + 0, 677, 0, 686, 687, 688, 689, 685, 0, 683, + 0, 690, 0, 0, 0, 2, 698, 217, 0, 696, + 0, 0, 639, 641, 0, 559, 0, 557, 552, 554, + 0, 152, 150, 209, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 76, 212, - 213, 0, 574, 0, 607, 620, 619, 0, 611, 0, - 623, 621, 0, 0, 0, 604, 624, 625, 626, 573, - 81, 82, 84, 83, 86, 87, 88, 89, 90, 85, - 80, 0, 0, 589, 585, 587, 591, 598, 606, 129, - 0, 559, 560, 0, 133, 0, 108, 4, 0, 24, - 21, 32, 220, 643, 645, 0, 0, 696, 0, 649, - 0, 648, 0, 651, 0, 0, 666, 0, 665, 0, - 668, 0, 0, 670, 0, 0, 690, 0, 687, 0, - 663, 638, 0, 555, 0, 550, 545, 46, 47, 48, - 51, 50, 53, 54, 58, 59, 56, 57, 61, 62, - 64, 66, 68, 70, 72, 74, 0, 214, 576, 0, - 0, 0, 0, 622, 0, 603, 79, 92, 128, 557, - 0, 106, 19, 641, 0, 642, 0, 654, 0, 661, - 0, 673, 0, 679, 0, 686, 0, 0, 692, 551, - 553, 0, 0, 595, 0, 0, 0, 614, 613, 616, - 582, 599, 558, 561, 644, 646, 650, 652, 667, 669, - 671, 688, 0, 577, 0, 0, 0, 615, 0, 0, - 594, 0, 0, 592, 0, 77, 0, 579, 608, 578, - 0, 617, 0, 582, 581, 583, 601, 596, 0, 618, - 612, 593, 602, 0, 610, 600 + 0, 0, 0, 76, 213, 214, 0, 579, 0, 612, + 625, 624, 0, 616, 0, 628, 626, 0, 0, 0, + 609, 629, 630, 631, 578, 81, 82, 84, 83, 86, + 87, 88, 89, 90, 85, 80, 0, 0, 594, 590, + 592, 596, 603, 611, 129, 0, 564, 565, 0, 133, + 0, 108, 4, 0, 24, 21, 32, 221, 648, 650, + 0, 0, 701, 0, 654, 0, 653, 0, 656, 0, + 0, 671, 0, 670, 0, 673, 0, 0, 675, 0, + 0, 695, 0, 692, 0, 668, 643, 0, 560, 0, + 555, 550, 46, 47, 48, 51, 50, 53, 54, 58, + 59, 56, 57, 61, 62, 64, 66, 68, 70, 72, + 74, 0, 215, 581, 0, 0, 0, 0, 627, 0, + 608, 79, 92, 128, 562, 0, 106, 19, 646, 0, + 647, 0, 659, 0, 666, 0, 678, 0, 684, 0, + 691, 0, 0, 697, 556, 558, 0, 0, 600, 0, + 0, 0, 619, 618, 621, 587, 604, 563, 566, 649, + 651, 655, 657, 672, 674, 676, 693, 0, 582, 0, + 0, 0, 620, 0, 0, 599, 0, 0, 597, 0, + 77, 0, 584, 613, 583, 0, 622, 0, 587, 586, + 588, 606, 601, 0, 623, 617, 598, 607, 0, 615, + 605 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { - -872, -544, -872, -872, -872, -872, -872, -872, -872, -872, - -872, -872, -436, -872, -392, -391, -490, -390, -269, -266, - -268, -264, -262, -260, -872, -482, -872, -499, -872, -492, - -534, 6, -872, -872, -872, 1, -403, -872, -872, 45, - 44, 49, -872, -872, -406, -872, -872, -872, -872, -104, - -872, -389, -375, -872, 12, -872, 0, -433, -872, -872, - -872, -553, 145, -872, -872, -872, -560, -556, -233, -344, - -614, -872, -373, -626, -871, -872, -430, -872, -872, -440, - -437, -872, -872, 63, -737, -363, -872, -144, -872, -399, - -872, -142, -872, -872, -872, -872, -134, -872, -872, -872, - -872, -872, -872, -872, -872, 97, -872, -872, 2, -872, - -71, -308, -416, -872, -872, -872, -304, -307, -302, -872, - -872, -315, -310, -306, -300, -314, -872, -299, -317, -872, - -395, -538 + -838, -550, -838, -838, -838, -838, -838, -838, -838, -838, + -838, -838, -436, -838, -400, -415, -493, -399, -270, -267, + -274, -271, -265, -263, -838, -492, -838, -499, -838, -510, + -536, 11, -838, -838, -838, 6, -401, -838, -838, 33, + 41, 35, -838, -838, -413, -838, -838, -838, -838, -104, + -838, -396, -381, -838, 12, -838, 0, -439, -838, -838, + -838, -560, 144, -838, -838, -838, -557, -563, -239, -352, + -614, -838, -376, -624, -837, -838, -434, -838, -838, -444, + -443, -838, -838, 55, -736, -370, -838, -151, -838, -406, + -838, -146, -838, -838, -838, -838, -144, -838, -838, -838, + -838, -838, -838, -838, -838, 90, -838, -838, 2, -838, + -71, -296, -379, -838, -838, -838, -305, -314, -310, -838, + -838, -319, -309, -321, -304, -303, -838, -323, -302, -838, + -405, -552 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int16 yydefgoto[] = { - 0, 530, 531, 532, 798, 533, 534, 535, 536, 537, - 538, 539, 620, 541, 587, 588, 589, 590, 591, 592, - 593, 594, 595, 596, 597, 621, 856, 622, 781, 623, - 711, 624, 388, 651, 508, 625, 390, 391, 392, 437, - 438, 439, 393, 394, 395, 396, 397, 398, 487, 488, - 399, 400, 401, 402, 542, 490, 599, 493, 450, 451, - 544, 405, 406, 407, 579, 483, 577, 578, 721, 722, - 649, 793, 628, 629, 630, 631, 632, 753, 892, 928, - 920, 921, 922, 929, 633, 634, 635, 636, 923, 895, - 637, 638, 924, 943, 639, 640, 641, 859, 757, 861, - 899, 918, 919, 642, 408, 409, 410, 434, 643, 480, - 481, 460, 461, 805, 806, 412, 684, 685, 689, 413, - 414, 695, 696, 703, 704, 707, 415, 713, 714, 416, - 462, 463 + 0, 535, 536, 537, 803, 538, 539, 540, 541, 542, + 543, 544, 625, 546, 592, 593, 594, 595, 596, 597, + 598, 599, 600, 601, 602, 626, 861, 627, 786, 628, + 716, 629, 393, 656, 513, 630, 395, 396, 397, 442, + 443, 444, 398, 399, 400, 401, 402, 403, 492, 493, + 404, 405, 406, 407, 547, 495, 604, 498, 455, 456, + 549, 410, 411, 412, 584, 488, 582, 583, 726, 727, + 654, 798, 633, 634, 635, 636, 637, 758, 897, 933, + 925, 926, 927, 934, 638, 639, 640, 641, 928, 900, + 642, 643, 929, 948, 644, 645, 646, 864, 762, 866, + 904, 923, 924, 647, 413, 414, 415, 439, 648, 485, + 486, 465, 466, 810, 811, 417, 689, 690, 694, 418, + 419, 700, 701, 708, 709, 712, 420, 718, 719, 421, + 467, 468 }; /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If @@ -1663,148 +1672,149 @@ static const yytype_int16 yydefgoto[] = number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_int16 yytable[] = { - 404, 389, 411, 440, 648, 455, 387, 785, 454, 598, - 455, 504, 403, 540, 678, 712, 858, 545, 702, 725, - 657, 724, 456, 688, 679, 447, 747, 456, 476, 672, - 678, 789, 673, 792, 736, 737, 794, 716, 431, 666, - 427, 669, 803, 672, 927, 485, 726, 440, 491, 442, - 417, 935, 443, 670, 418, 586, 492, 680, 681, 682, - 683, 927, 748, 674, 432, 447, 419, 644, 646, 486, - 738, 739, 428, 655, 656, 687, 804, 674, -694, 420, - 491, 447, 658, 659, -694, 600, 687, 645, 502, 687, - 491, 795, 600, 601, 575, 449, 600, 503, 687, 650, - 551, 553, -35, 790, 660, 668, 552, 554, 661, 421, - 466, 468, 470, 472, 474, 475, 478, 422, 751, 559, - 762, 586, 764, 505, 567, 560, 506, 581, 423, 507, - 568, 860, 586, 582, 675, 586, 464, 583, 467, 465, - 675, 465, 675, 584, 586, 675, 648, 675, 648, 675, - 675, 648, 663, 797, 675, 676, 807, 809, 664, 782, - 811, 813, 552, 810, 586, 801, 812, 814, 799, 724, - 572, 709, 469, 424, 573, 465, 868, 770, 771, 772, - 773, 774, 775, 776, 777, 778, 779, 816, 575, 425, - 575, 471, 818, 817, 465, 820, 823, 780, 819, 942, - 447, 821, 824, 826, 828, 900, 901, 906, 907, 827, - 829, 782, 782, 810, 814, 908, 909, 910, 911, 938, - 429, 817, 821, 824, 829, 782, 873, 875, 734, 735, - 874, 876, 785, 802, 732, 430, 733, 455, 436, 724, - 454, 698, 699, 700, 701, 521, 844, 845, 846, 847, - 653, 433, 473, 654, 456, 465, 903, 691, 692, 693, - 694, 477, 575, 686, 465, 690, 465, 862, 465, 697, - 705, 864, 465, 465, 712, 435, 712, 702, 702, 449, - 879, 688, 866, 867, 869, 708, 870, 833, 465, 678, - 444, 648, 457, 837, 838, 839, 586, 586, 586, 586, - 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, - 586, 586, 937, 459, 715, 782, 785, 465, 783, 834, - 782, 834, 835, 863, 889, 334, 335, 336, 740, 741, - 782, 865, 687, 687, 782, 912, 575, 729, 730, 731, - 840, 841, 479, 842, 843, 687, 484, 687, 331, 494, - 848, 849, 489, 500, 501, 491, 547, 548, 549, 546, - 555, 550, 574, 742, 891, 569, 556, 893, 652, 557, - 558, 648, 561, 562, 600, 563, 564, 565, 586, 586, - 566, 570, 571, 667, 580, 662, -34, 502, 706, 745, - 673, 586, 441, 586, 717, 746, 677, 743, 744, 749, - 448, 754, 752, 755, 403, 756, 575, 893, 404, 389, - 411, 404, 403, 925, 387, 720, 404, 458, 411, 758, - 403, 728, 759, 403, 930, 760, 482, 648, 403, 763, - 766, 765, -36, 815, 767, 768, 441, 496, 769, 939, - 441, 796, 800, -29, 808, 822, 825, 830, 403, 543, - 831, 857, 403, 894, 872, 885, 448, 782, 896, 904, - 905, 916, 913, 915, 926, 932, 914, -580, 403, 931, - 456, 602, 936, 850, 945, 944, 852, 851, 727, 933, - 497, 853, 426, 576, 854, 498, 832, 855, 897, 499, - 890, 934, 940, 894, 627, 403, 941, 495, 898, 786, - 917, 787, 718, 877, 882, 453, 626, 881, 878, 788, - 456, 886, 888, 880, 0, 0, 884, 0, 0, 0, - 0, 883, 0, 0, 0, 0, 0, 0, 887, 0, + 409, 445, 416, 460, 603, 683, 394, 662, 460, 653, + 509, 392, 408, 717, 790, 459, 550, 707, 545, 729, + 461, 683, 863, 481, 452, 461, 693, 730, 677, 752, + 436, 678, 741, 742, 490, 674, 794, 808, 797, 684, + 721, 799, 677, 496, 671, 445, -699, 675, 556, 731, + 432, 497, -699, 605, 557, 577, 437, 422, 491, 578, + 591, 606, 679, 454, 452, 753, 649, 651, 743, 744, + 692, 809, 685, 686, 687, 688, 679, 423, 660, 661, + 452, 692, 433, 932, 692, 424, 663, 664, 496, 507, + 940, 496, 580, 692, 605, 650, 605, 425, 508, 800, + 932, 655, 737, 795, 738, 558, -35, 767, 665, 769, + 673, 559, 666, 756, 775, 776, 777, 778, 779, 780, + 781, 782, 783, 784, 739, 740, 591, 471, 473, 475, + 477, 479, 480, 483, 785, 564, 510, 591, 865, 511, + 591, 565, 512, 878, 745, 746, 572, 879, 586, 591, + 681, 653, 573, 653, 587, 804, 653, 588, 668, 802, + 787, 870, 812, 589, 669, 787, 714, 729, 557, 591, + 806, 814, 816, 818, 821, 426, 680, 815, 817, 819, + 822, 873, 680, 874, 680, 875, 580, 680, 580, 680, + 447, 680, 680, 448, 823, 825, 680, 828, 831, 452, + 824, 826, 833, 829, 832, 947, 905, 906, 834, 911, + 912, 913, 787, 787, 914, 815, 819, 822, 915, 916, + 826, 943, 880, 440, 829, 834, 881, 787, 787, 917, + 703, 704, 705, 706, 526, 460, 427, 729, 807, 790, + 337, 338, 339, 696, 697, 698, 699, 459, 849, 850, + 851, 852, 461, 428, 867, 429, 469, 438, 869, 470, + 580, 908, 472, 474, 476, 470, 470, 470, 478, 430, + 482, 470, 717, 470, 717, 658, 707, 707, 659, 691, + 683, 434, 470, 884, 693, 441, 838, 871, 872, 695, + 702, 710, 470, 470, 470, 435, 653, 449, 842, 843, + 844, 591, 591, 591, 591, 591, 591, 591, 591, 591, + 591, 591, 591, 591, 591, 591, 591, 942, 713, 720, + 454, 470, 470, 790, 847, 848, 787, 692, 692, 788, + 839, 462, 787, 840, 580, 868, 839, 845, 846, 894, + 692, 464, 692, 734, 735, 736, 853, 854, 484, 489, + 494, 896, 499, 334, 898, 496, 505, 551, 506, 553, + 552, 554, 555, 560, 561, 747, 562, 657, 563, 566, + 567, 682, 568, 569, 570, 571, 653, 574, 575, 576, + 605, 667, 579, 591, 591, 672, 585, -34, 507, 711, + 750, 678, 760, 749, 898, 722, 591, 446, 591, 751, + 754, 757, 748, 759, 580, 453, 763, 764, 761, 408, + 725, 935, 765, 409, 768, 416, 409, 408, 930, 394, + 733, 409, 771, 416, 392, 408, 944, 463, 408, 770, + 772, 487, 653, 408, 773, 774, -36, 801, -29, 813, + 820, 446, 501, 835, 805, 446, 827, 830, 836, 862, + 787, 899, 877, 408, 548, 890, 909, 408, 918, 901, + 910, 453, 919, 920, 921, -585, 937, 931, 461, 936, + 938, 607, 941, 408, 950, 857, 949, 855, 503, 858, + 504, 856, 502, 732, 431, 837, 859, 895, 581, 860, + 902, 899, 939, 945, 500, 946, 903, 791, 922, 632, + 408, 882, 792, 458, 793, 887, 889, 723, 461, 892, + 885, 631, 883, 886, 0, 0, 0, 0, 0, 0, + 0, 0, 888, 0, 0, 0, 0, 891, 0, 0, + 0, 0, 893, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 671, 0, + 0, 0, 0, 676, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 719, 0, 576, 0, 576, - 0, 0, 0, 0, 0, 0, 0, 403, 0, 403, - 0, 403, 0, 0, 0, 0, 0, 0, 0, 0, + 724, 0, 581, 0, 581, 0, 0, 0, 0, 0, + 0, 0, 408, 0, 408, 0, 408, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 627, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 404, 0, 626, 0, 0, 0, 0, - 0, 576, 0, 0, 0, 403, 0, 0, 0, 0, - 0, 0, 0, 403, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 632, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 409, 0, + 631, 0, 0, 0, 0, 0, 581, 0, 0, 0, + 408, 0, 0, 0, 0, 0, 0, 0, 408, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 576, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 403, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 627, 0, 0, 0, 627, 0, 0, - 0, 0, 0, 0, 0, 626, 0, 0, 0, 626, + 581, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 408, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 632, 0, + 0, 0, 632, 0, 0, 0, 0, 0, 0, 0, + 631, 0, 0, 0, 631, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 576, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 403, 0, 0, + 581, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 408, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 627, 627, - 0, 627, 0, 411, 0, 0, 0, 0, 0, 0, - 626, 626, 0, 626, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 632, 632, 0, 632, 0, 416, 0, + 0, 0, 0, 0, 0, 631, 631, 0, 631, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 627, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 626, 0, 0, 0, 627, 0, 0, 0, 0, - 0, 0, 627, 0, 0, 0, 0, 626, 0, 0, - 0, 0, 627, 0, 626, 0, 627, 0, 0, 0, - 0, 0, 627, 0, 626, 0, 0, 0, 626, 0, - 0, 0, 452, 0, 626, 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, 293, 294, 295, - 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, - 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, - 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, - 326, 327, 328, 329, 330, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 632, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 631, 0, 0, 0, + 632, 0, 0, 0, 0, 0, 0, 632, 0, 0, + 0, 0, 631, 0, 0, 0, 0, 632, 0, 631, + 0, 632, 0, 0, 0, 0, 0, 632, 0, 631, + 0, 0, 0, 631, 0, 0, 0, 457, 0, 631, + 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, 293, 294, 295, 296, 297, 298, 299, 300, + 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, + 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, + 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, + 331, 332, 333, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 331, - 0, 0, 0, 0, 0, 0, 0, 332, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 334, 0, 0, + 0, 0, 0, 0, 0, 335, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 336, + 337, 338, 339, 340, 0, 0, 0, 0, 0, 0, + 0, 0, 341, 342, 343, 344, 345, 346, 347, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 333, 334, 335, 336, 337, 0, 0, 0, 0, - 0, 0, 0, 0, 338, 339, 340, 341, 342, 343, - 344, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 345, 346, 347, 348, - 349, 350, 351, 0, 0, 0, 0, 0, 0, 0, - 0, 352, 0, 353, 354, 355, 356, 357, 358, 359, - 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, - 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, - 380, 381, 382, 383, 384, 385, 386, 1, 2, 3, + 0, 0, 0, 0, 348, 349, 350, 351, 352, 353, + 354, 0, 0, 0, 0, 0, 0, 0, 0, 355, + 0, 356, 357, 358, 359, 360, 361, 362, 363, 364, + 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, + 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, + 385, 386, 387, 388, 389, 390, 391, 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, @@ -1837,67 +1847,68 @@ static const yytype_int16 yytable[] = 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, - 324, 325, 326, 327, 328, 329, 330, 0, 0, 509, - 510, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 511, 512, - 0, 331, 0, 602, 603, 0, 0, 0, 0, 604, - 513, 514, 515, 516, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 333, 334, 335, 336, 337, 0, 0, - 0, 517, 518, 519, 520, 521, 338, 339, 340, 341, - 342, 343, 344, 605, 606, 607, 608, 0, 609, 610, - 611, 612, 613, 614, 615, 616, 617, 618, 345, 346, - 347, 348, 349, 350, 351, 522, 523, 524, 525, 526, - 527, 528, 529, 352, 619, 353, 354, 355, 356, 357, + 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, + 0, 0, 514, 515, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 516, 517, 0, 334, 0, 607, 608, 0, 0, + 0, 0, 609, 518, 519, 520, 521, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 336, 337, 338, 339, + 340, 0, 0, 0, 522, 523, 524, 525, 526, 341, + 342, 343, 344, 345, 346, 347, 610, 611, 612, 613, + 0, 614, 615, 616, 617, 618, 619, 620, 621, 622, + 623, 348, 349, 350, 351, 352, 353, 354, 527, 528, + 529, 530, 531, 532, 533, 534, 355, 624, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, - 378, 379, 380, 381, 382, 383, 384, 385, 386, 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, 293, 294, 295, 296, 297, 298, 299, 300, 301, - 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, - 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, - 322, 323, 324, 325, 326, 327, 328, 329, 330, 0, - 0, 509, 510, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 511, 512, 0, 331, 0, 602, 784, 0, 0, 0, - 0, 604, 513, 514, 515, 516, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 333, 334, 335, 336, 337, - 0, 0, 0, 517, 518, 519, 520, 521, 338, 339, - 340, 341, 342, 343, 344, 605, 606, 607, 608, 0, - 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, - 345, 346, 347, 348, 349, 350, 351, 522, 523, 524, - 525, 526, 527, 528, 529, 352, 619, 353, 354, 355, - 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, - 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, - 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, - 386, 1, 2, 3, 4, 5, 6, 7, 8, 9, + 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, + 388, 389, 390, 391, 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, 293, 294, 295, 296, + 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, + 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, + 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, + 327, 328, 329, 330, 331, 332, 333, 0, 0, 514, + 515, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 516, 517, + 0, 334, 0, 607, 789, 0, 0, 0, 0, 609, + 518, 519, 520, 521, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 336, 337, 338, 339, 340, 0, 0, + 0, 522, 523, 524, 525, 526, 341, 342, 343, 344, + 345, 346, 347, 610, 611, 612, 613, 0, 614, 615, + 616, 617, 618, 619, 620, 621, 622, 623, 348, 349, + 350, 351, 352, 353, 354, 527, 528, 529, 530, 531, + 532, 533, 534, 355, 624, 356, 357, 358, 359, 360, + 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, + 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, + 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, + 391, 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, @@ -1930,66 +1941,67 @@ static const yytype_int16 yytable[] = 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, - 330, 0, 0, 509, 510, 0, 0, 0, 0, 0, + 330, 331, 332, 333, 0, 0, 514, 515, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 511, 512, 0, 331, 0, 602, 0, 0, - 0, 0, 0, 604, 513, 514, 515, 516, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 333, 334, 335, - 336, 337, 0, 0, 0, 517, 518, 519, 520, 521, - 338, 339, 340, 341, 342, 343, 344, 605, 606, 607, - 608, 0, 609, 610, 611, 612, 613, 614, 615, 616, - 617, 618, 345, 346, 347, 348, 349, 350, 351, 522, - 523, 524, 525, 526, 527, 528, 529, 352, 619, 353, - 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, + 0, 0, 0, 0, 0, 516, 517, 0, 334, 0, + 607, 0, 0, 0, 0, 0, 609, 518, 519, 520, + 521, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 336, 337, 338, 339, 340, 0, 0, 0, 522, 523, + 524, 525, 526, 341, 342, 343, 344, 345, 346, 347, + 610, 611, 612, 613, 0, 614, 615, 616, 617, 618, + 619, 620, 621, 622, 623, 348, 349, 350, 351, 352, + 353, 354, 527, 528, 529, 530, 531, 532, 533, 534, + 355, 624, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, - 384, 385, 386, 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, 293, 294, 295, 296, 297, - 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, - 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, - 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, - 328, 329, 330, 0, 0, 509, 510, 0, 0, 0, + 384, 385, 386, 387, 388, 389, 390, 391, 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, + 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, + 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, + 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, + 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, + 333, 0, 0, 514, 515, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 511, 512, 0, 331, 0, 494, - 0, 0, 0, 0, 0, 604, 513, 514, 515, 516, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 333, - 334, 335, 336, 337, 0, 0, 0, 517, 518, 519, - 520, 521, 338, 339, 340, 341, 342, 343, 344, 605, - 606, 607, 608, 0, 609, 610, 611, 612, 613, 614, - 615, 616, 617, 618, 345, 346, 347, 348, 349, 350, - 351, 522, 523, 524, 525, 526, 527, 528, 529, 352, - 619, 353, 354, 355, 356, 357, 358, 359, 360, 361, - 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, - 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, - 382, 383, 384, 385, 386, 1, 2, 3, 4, 5, + 0, 0, 516, 517, 0, 334, 0, 499, 0, 0, + 0, 0, 0, 609, 518, 519, 520, 521, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 336, 337, 338, + 339, 340, 0, 0, 0, 522, 523, 524, 525, 526, + 341, 342, 343, 344, 345, 346, 347, 610, 611, 612, + 613, 0, 614, 615, 616, 617, 618, 619, 620, 621, + 622, 623, 348, 349, 350, 351, 352, 353, 354, 527, + 528, 529, 530, 531, 532, 533, 534, 355, 624, 356, + 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, + 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, + 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, + 387, 388, 389, 390, 391, 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, @@ -2022,66 +2034,67 @@ static const yytype_int16 yytable[] = 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, - 326, 327, 328, 329, 330, 0, 0, 509, 510, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 511, 512, 0, 331, - 0, 0, 0, 0, 0, 0, 0, 604, 513, 514, - 515, 516, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 333, 334, 335, 336, 337, 0, 0, 0, 517, - 518, 519, 520, 521, 338, 339, 340, 341, 342, 343, - 344, 605, 606, 607, 608, 0, 609, 610, 611, 612, - 613, 614, 615, 616, 617, 618, 345, 346, 347, 348, - 349, 350, 351, 522, 523, 524, 525, 526, 527, 528, - 529, 352, 619, 353, 354, 355, 356, 357, 358, 359, + 326, 327, 328, 329, 330, 331, 332, 333, 0, 0, + 514, 515, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 516, + 517, 0, 334, 0, 0, 0, 0, 0, 0, 0, + 609, 518, 519, 520, 521, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 336, 337, 338, 339, 340, 0, + 0, 0, 522, 523, 524, 525, 526, 341, 342, 343, + 344, 345, 346, 347, 610, 611, 612, 613, 0, 614, + 615, 616, 617, 618, 619, 620, 621, 622, 623, 348, + 349, 350, 351, 352, 353, 354, 527, 528, 529, 530, + 531, 532, 533, 534, 355, 624, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, - 380, 381, 382, 383, 384, 385, 386, 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, 293, - 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, - 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, - 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, - 324, 325, 326, 327, 328, 329, 330, 0, 0, 509, - 510, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 511, 512, - 0, 331, 0, 0, 0, 0, 0, 0, 0, 604, - 513, 514, 515, 516, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 333, 334, 335, 336, 337, 0, 0, - 0, 517, 518, 519, 520, 521, 338, 339, 340, 341, - 342, 343, 344, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 345, 346, - 347, 348, 349, 350, 351, 522, 523, 524, 525, 526, - 527, 528, 529, 352, 0, 353, 354, 355, 356, 357, - 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, - 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, - 378, 379, 380, 381, 382, 383, 384, 385, 386, 1, + 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, + 390, 391, 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, 293, 294, 295, 296, 297, 298, + 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, + 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, + 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, + 329, 330, 331, 332, 333, 0, 0, 514, 515, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 516, 517, 0, 334, + 0, 0, 0, 0, 0, 0, 0, 609, 518, 519, + 520, 521, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 336, 337, 338, 339, 340, 0, 0, 0, 522, + 523, 524, 525, 526, 341, 342, 343, 344, 345, 346, + 347, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 348, 349, 350, 351, + 352, 353, 354, 527, 528, 529, 530, 531, 532, 533, + 534, 355, 0, 356, 357, 358, 359, 360, 361, 362, + 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, + 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, + 383, 384, 385, 386, 387, 388, 389, 390, 391, 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, @@ -2113,22 +2126,256 @@ static const yytype_int16 yytable[] = 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, - 312, 313, 314, 315, 316, 317, 0, 0, 0, 321, - 322, 323, 324, 325, 326, 327, 328, 329, 330, 0, - 0, 509, 510, 0, 0, 0, 0, 0, 0, 0, + 312, 313, 314, 315, 316, 317, 318, 319, 320, 0, + 0, 0, 324, 325, 326, 327, 328, 329, 330, 331, + 332, 333, 0, 0, 514, 515, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 511, 512, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 513, 514, 515, 516, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 333, 334, 335, 336, 0, - 0, 0, 0, 517, 518, 519, 520, 521, 338, 339, - 340, 341, 342, 343, 344, 0, 0, 0, 0, 0, + 0, 0, 0, 516, 517, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 518, 519, 520, 521, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 336, 337, + 338, 339, 0, 0, 0, 0, 522, 523, 524, 525, + 526, 341, 342, 343, 344, 345, 346, 347, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 345, 346, 347, 348, 349, 350, 351, 522, 523, 524, - 525, 526, 527, 528, 529, 352, 0, 353, 354, 355, + 0, 0, 0, 348, 349, 350, 351, 352, 353, 354, + 527, 528, 529, 530, 531, 532, 533, 534, 355, 0, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, - 386, 1, 2, 3, 4, 5, 6, 7, 8, 9, + 386, 387, 388, 389, 390, 391, 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, 293, 294, + 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, + 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, + 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, + 325, 326, 327, 328, 329, 330, 331, 332, 333, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 334, 0, 0, 0, 0, 0, 0, + 0, 335, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 336, 337, 338, 339, 340, + 0, 0, 0, 0, 0, 0, 0, 0, 341, 342, + 343, 344, 345, 346, 347, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 348, 349, 350, 351, 352, 353, 354, 0, 0, 0, + 0, 0, 0, 0, 0, 355, 0, 356, 357, 358, + 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, + 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, + 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, + 389, 390, 391, 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, 293, 294, 295, 296, 297, + 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, + 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, + 318, 319, 320, 0, 0, 0, 324, 325, 326, 327, + 328, 329, 330, 331, 332, 333, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 336, 337, 338, 339, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 341, 342, 343, 344, 345, + 346, 347, 610, 0, 0, 613, 0, 614, 615, 0, + 0, 618, 0, 0, 0, 0, 0, 348, 349, 350, + 351, 352, 353, 354, 0, 0, 0, 0, 0, 0, + 0, 0, 355, 0, 356, 357, 358, 359, 360, 361, + 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, + 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, + 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, + 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, 293, 294, 295, 296, 297, 298, 299, 300, + 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, + 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, + 0, 0, 0, 324, 325, 326, 327, 328, 329, 330, + 331, 332, 333, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 450, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 336, + 337, 338, 339, 0, 0, 0, 0, 0, 0, 0, + 0, 451, 341, 342, 343, 344, 345, 346, 347, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 348, 349, 350, 351, 352, 353, + 354, 0, 0, 0, 0, 0, 0, 0, 0, 355, + 0, 356, 357, 358, 359, 360, 361, 362, 363, 364, + 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, + 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, + 385, 386, 387, 388, 389, 390, 391, 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, 293, + 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, + 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, + 314, 315, 316, 317, 318, 319, 320, 0, 0, 0, + 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 334, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 336, 337, 338, 339, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 341, + 342, 343, 344, 345, 346, 347, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 348, 349, 350, 351, 352, 353, 354, 0, 0, + 0, 0, 0, 0, 0, 0, 355, 0, 356, 357, + 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, + 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, + 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, + 388, 389, 390, 391, 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, 293, 294, 295, 296, + 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, + 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, + 317, 318, 319, 320, 0, 0, 0, 324, 325, 326, + 327, 328, 329, 330, 331, 332, 333, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 728, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 336, 337, 338, 339, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 341, 342, 343, 344, + 345, 346, 347, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 348, 349, + 350, 351, 352, 353, 354, 0, 0, 0, 0, 0, + 0, 0, 0, 355, 0, 356, 357, 358, 359, 360, + 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, + 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, + 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, + 391, 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, @@ -2160,67 +2407,68 @@ static const yytype_int16 yytable[] = 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, - 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, - 330, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 320, 0, 0, 0, 324, 325, 326, 327, 328, 329, + 330, 331, 332, 333, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 331, 0, 0, 0, 0, - 0, 0, 0, 332, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 333, 334, 335, - 336, 337, 0, 0, 0, 0, 0, 0, 0, 0, - 338, 339, 340, 341, 342, 343, 344, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 345, 346, 347, 348, 349, 350, 351, 0, - 0, 0, 0, 0, 0, 0, 0, 352, 0, 353, - 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, + 0, 841, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 336, 337, 338, 339, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 341, 342, 343, 344, 345, 346, 347, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 348, 349, 350, 351, 352, + 353, 354, 0, 0, 0, 0, 0, 0, 0, 0, + 355, 0, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, - 384, 385, 386, 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, 293, 294, 295, 296, 297, - 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, - 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, - 0, 0, 0, 321, 322, 323, 324, 325, 326, 327, - 328, 329, 330, 0, 0, 0, 0, 0, 0, 0, + 384, 385, 386, 387, 388, 389, 390, 391, 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, + 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, + 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, + 313, 314, 315, 316, 317, 318, 319, 320, 0, 0, + 0, 324, 325, 326, 327, 328, 329, 330, 331, 332, + 333, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 876, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 336, 337, 338, + 339, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 341, 342, 343, 344, 345, 346, 347, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 333, - 334, 335, 336, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 338, 339, 340, 341, 342, 343, 344, 605, - 0, 0, 608, 0, 609, 610, 0, 0, 613, 0, - 0, 0, 0, 0, 345, 346, 347, 348, 349, 350, - 351, 0, 0, 0, 0, 0, 0, 0, 0, 352, - 0, 353, 354, 355, 356, 357, 358, 359, 360, 361, - 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, - 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, - 382, 383, 384, 385, 386, 1, 2, 3, 4, 5, + 0, 0, 348, 349, 350, 351, 352, 353, 354, 0, + 0, 0, 0, 0, 0, 0, 0, 355, 0, 356, + 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, + 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, + 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, + 387, 388, 389, 390, 391, 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, @@ -2252,120 +2500,28 @@ static const yytype_int16 yytable[] = 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, - 316, 317, 0, 0, 0, 321, 322, 323, 324, 325, - 326, 327, 328, 329, 330, 0, 0, 0, 0, 0, + 316, 317, 318, 319, 320, 0, 0, 0, 324, 325, + 326, 327, 328, 329, 330, 331, 332, 333, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 445, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 333, 334, 335, 336, 0, 0, 0, 0, 0, - 0, 0, 0, 446, 338, 339, 340, 341, 342, 343, - 344, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 345, 346, 347, 348, - 349, 350, 351, 0, 0, 0, 0, 0, 0, 0, - 0, 352, 0, 353, 354, 355, 356, 357, 358, 359, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 336, 337, 338, 339, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 341, 342, 343, + 344, 345, 346, 347, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 348, + 349, 350, 351, 352, 353, 354, 0, 0, 0, 0, + 0, 0, 0, 0, 355, 0, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, - 380, 381, 382, 383, 384, 385, 386, 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, 293, - 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, - 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, - 314, 315, 316, 317, 0, 0, 0, 321, 322, 323, - 324, 325, 326, 327, 328, 329, 330, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 331, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 333, 334, 335, 336, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 338, 339, 340, 341, - 342, 343, 344, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 345, 346, - 347, 348, 349, 350, 351, 0, 0, 0, 0, 0, - 0, 0, 0, 352, 0, 353, 354, 355, 356, 357, - 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, - 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, - 378, 379, 380, 381, 382, 383, 384, 385, 386, 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, 293, 294, 295, 296, 297, 298, 299, 300, 301, - 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, - 312, 313, 314, 315, 316, 317, 0, 0, 0, 321, - 322, 323, 324, 325, 326, 327, 328, 329, 330, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 723, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 333, 334, 335, 336, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 338, 339, - 340, 341, 342, 343, 344, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 345, 346, 347, 348, 349, 350, 351, 0, 0, 0, - 0, 0, 0, 0, 0, 352, 0, 353, 354, 355, - 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, - 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, - 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, - 386, 1, 2, 3, 4, 5, 6, 7, 8, 9, + 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, + 390, 391, 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, @@ -2375,7 +2531,7 @@ static const yytype_int16 yytable[] = 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, + 160, 161, 162, 163, 164, 165, 166, 0, 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, @@ -2390,28 +2546,115 @@ static const yytype_int16 yytable[] = 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, - 310, 311, 312, 313, 314, 315, 316, 317, 0, 0, - 0, 321, 322, 323, 324, 325, 326, 327, 328, 329, - 330, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, + 320, 0, 0, 0, 0, 0, 0, 327, 0, 0, + 0, 331, 332, 333, 0, 0, 514, 515, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 836, 0, + 0, 0, 0, 0, 0, 516, 517, 0, 0, 0, + 652, 796, 0, 0, 0, 0, 0, 518, 519, 520, + 521, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 522, 523, + 524, 525, 526, 341, 0, 0, 0, 0, 346, 347, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 333, 334, 335, - 336, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 338, 339, 340, 341, 342, 343, 344, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 345, 346, 347, 348, 349, 350, 351, 0, - 0, 0, 0, 0, 0, 0, 0, 352, 0, 353, - 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, - 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, - 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, - 384, 385, 386, 1, 2, 3, 4, 5, 6, 7, + 0, 0, 527, 528, 529, 530, 531, 532, 533, 534, + 0, 0, 356, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 369, 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, 0, 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, 295, + 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, + 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, + 316, 317, 318, 319, 320, 0, 0, 0, 0, 0, + 0, 327, 0, 0, 0, 331, 332, 333, 0, 0, + 514, 515, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 516, + 517, 0, 0, 0, 652, 907, 0, 0, 0, 0, + 0, 518, 519, 520, 521, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 522, 523, 524, 525, 526, 341, 0, 0, + 0, 0, 346, 347, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 527, 528, 529, 530, + 531, 532, 533, 534, 0, 0, 356, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 369, + 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, 0, 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, 295, 296, 297, 298, 299, 300, 301, + 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, + 312, 313, 314, 315, 316, 317, 318, 319, 320, 0, + 0, 0, 0, 0, 0, 327, 0, 0, 0, 331, + 332, 333, 0, 0, 514, 515, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 516, 517, 0, 0, 590, 0, 0, + 0, 0, 0, 0, 0, 518, 519, 520, 521, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 522, 523, 524, 525, + 526, 341, 0, 0, 0, 0, 346, 347, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 527, 528, 529, 530, 531, 532, 533, 534, 0, 0, + 356, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 369, 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, @@ -2421,7 +2664,7 @@ static const yytype_int16 yytable[] = 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, + 158, 159, 160, 161, 162, 163, 164, 165, 166, 0, 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, @@ -2437,27 +2680,114 @@ static const yytype_int16 yytable[] = 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, - 0, 0, 0, 321, 322, 323, 324, 325, 326, 327, - 328, 329, 330, 0, 0, 0, 0, 0, 0, 0, + 318, 319, 320, 0, 0, 0, 0, 0, 0, 327, + 0, 0, 0, 331, 332, 333, 0, 0, 514, 515, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 516, 517, 0, + 0, 0, 652, 0, 0, 0, 0, 0, 0, 518, + 519, 520, 521, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 522, 523, 524, 525, 526, 341, 0, 0, 0, 0, + 346, 347, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 527, 528, 529, 530, 531, 532, + 533, 534, 0, 0, 356, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 369, 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, 0, 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, 295, 296, 297, 298, 299, 300, 301, 302, 303, + 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, + 314, 315, 316, 317, 318, 319, 320, 0, 0, 0, + 0, 0, 0, 327, 0, 0, 0, 331, 332, 333, + 0, 0, 514, 515, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 516, 517, 0, 0, 755, 0, 0, 0, 0, + 0, 0, 0, 518, 519, 520, 521, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 522, 523, 524, 525, 526, 341, + 0, 0, 0, 0, 346, 347, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 527, 528, + 529, 530, 531, 532, 533, 534, 0, 0, 356, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 369, 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, 0, 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, 295, 296, 297, 298, 299, + 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, + 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, + 320, 0, 0, 0, 0, 0, 0, 327, 0, 0, + 0, 331, 332, 333, 0, 0, 514, 515, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 516, 517, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 766, 518, 519, 520, + 521, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 522, 523, + 524, 525, 526, 341, 0, 0, 0, 0, 346, 347, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 871, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 333, - 334, 335, 336, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 338, 339, 340, 341, 342, 343, 344, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 345, 346, 347, 348, 349, 350, - 351, 0, 0, 0, 0, 0, 0, 0, 0, 352, - 0, 353, 354, 355, 356, 357, 358, 359, 360, 361, - 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, - 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, - 382, 383, 384, 385, 386, 1, 2, 3, 4, 5, + 0, 0, 527, 528, 529, 530, 531, 532, 533, 534, + 0, 0, 356, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 369, 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, @@ -2468,7 +2798,7 @@ static const yytype_int16 yytable[] = 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, + 166, 0, 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, @@ -2483,603 +2813,298 @@ static const yytype_int16 yytable[] = 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, - 316, 317, 0, 0, 0, 321, 322, 323, 324, 325, - 326, 327, 328, 329, 330, 0, 0, 0, 0, 0, + 316, 317, 318, 319, 320, 0, 0, 0, 0, 0, + 0, 327, 0, 0, 0, 331, 332, 333, 0, 0, + 514, 515, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 516, + 517, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 518, 519, 520, 521, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 522, 523, 524, 525, 526, 341, 0, 0, + 0, 0, 346, 347, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 527, 528, 529, 530, + 531, 532, 533, 534, 0, 0, 356, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 369, + 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, 0, 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, 295, 296, 297, 298, 299, 300, 301, + 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, + 312, 313, 314, 315, 316, 317, 318, 319, 320, 0, + 0, 0, 0, 0, 0, 327, 0, 0, 0, 331, + 332, 333, 0, 0, 514, 515, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 516, 517, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 518, 519, 520, 521, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 522, 523, 524, 525, + 526, 341, 0, 0, 0, 0, 346, 670, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 527, 528, 529, 530, 531, 532, 533, 534, 0, 0, + 356, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 369, 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, 0, + 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, 295, 296, 297, + 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, + 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, + 318, 319, 320, 0, 0, 0, 0, 0, 0, 327, + 0, 0, 0, 331, 332, 333, 0, 0, 514, 515, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 516, 517, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 518, + 519, 520, 521, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 333, 334, 335, 336, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 338, 339, 340, 341, 342, 343, - 344, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 345, 346, 347, 348, - 349, 350, 351, 0, 0, 0, 0, 0, 0, 0, - 0, 352, 0, 353, 354, 355, 356, 357, 358, 359, - 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, - 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, - 380, 381, 382, 383, 384, 385, 386, 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, 0, 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, - 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, - 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, - 315, 316, 317, 0, 0, 0, 0, 0, 0, 324, - 0, 0, 0, 328, 329, 330, 0, 0, 509, 510, + 522, 523, 524, 525, 715, 341, 0, 0, 0, 0, + 346, 347, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 511, 512, 0, - 0, 0, 647, 791, 0, 0, 0, 0, 0, 513, - 514, 515, 516, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 517, 518, 519, 520, 521, 338, 0, 0, 0, 0, - 343, 344, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 522, 523, 524, 525, 526, 527, - 528, 529, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 365, 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, 0, 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, - 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, - 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, - 315, 316, 317, 0, 0, 0, 0, 0, 0, 324, - 0, 0, 0, 328, 329, 330, 0, 0, 509, 510, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 511, 512, 0, - 0, 0, 647, 902, 0, 0, 0, 0, 0, 513, - 514, 515, 516, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 517, 518, 519, 520, 521, 338, 0, 0, 0, 0, - 343, 344, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 522, 523, 524, 525, 526, 527, - 528, 529, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 365, 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, 0, 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, - 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, - 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, - 315, 316, 317, 0, 0, 0, 0, 0, 0, 324, - 0, 0, 0, 328, 329, 330, 0, 0, 509, 510, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 511, 512, 0, - 0, 585, 0, 0, 0, 0, 0, 0, 0, 513, - 514, 515, 516, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 517, 518, 519, 520, 521, 338, 0, 0, 0, 0, - 343, 344, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 522, 523, 524, 525, 526, 527, - 528, 529, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 365, 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, 0, 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, - 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, - 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, - 315, 316, 317, 0, 0, 0, 0, 0, 0, 324, - 0, 0, 0, 328, 329, 330, 0, 0, 509, 510, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 511, 512, 0, - 0, 0, 647, 0, 0, 0, 0, 0, 0, 513, - 514, 515, 516, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 517, 518, 519, 520, 521, 338, 0, 0, 0, 0, - 343, 344, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 522, 523, 524, 525, 526, 527, - 528, 529, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 365, 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, 0, 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, - 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, - 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, - 315, 316, 317, 0, 0, 0, 0, 0, 0, 324, - 0, 0, 0, 328, 329, 330, 0, 0, 509, 510, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 511, 512, 0, - 0, 750, 0, 0, 0, 0, 0, 0, 0, 513, - 514, 515, 516, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 517, 518, 519, 520, 521, 338, 0, 0, 0, 0, - 343, 344, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 522, 523, 524, 525, 526, 527, - 528, 529, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 365, 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, 0, 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, - 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, - 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, - 315, 316, 317, 0, 0, 0, 0, 0, 0, 324, - 0, 0, 0, 328, 329, 330, 0, 0, 509, 510, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 511, 512, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 761, 513, - 514, 515, 516, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 517, 518, 519, 520, 521, 338, 0, 0, 0, 0, - 343, 344, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 522, 523, 524, 525, 526, 527, - 528, 529, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 365, 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, 0, 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, - 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, - 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, - 315, 316, 317, 0, 0, 0, 0, 0, 0, 324, - 0, 0, 0, 328, 329, 330, 0, 0, 509, 510, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 511, 512, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 513, - 514, 515, 516, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 517, 518, 519, 520, 521, 338, 0, 0, 0, 0, - 343, 344, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 522, 523, 524, 525, 526, 527, - 528, 529, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 365, 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, 0, 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, - 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, - 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, - 315, 316, 317, 0, 0, 0, 0, 0, 0, 324, - 0, 0, 0, 328, 329, 330, 0, 0, 509, 510, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 511, 512, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 513, - 514, 515, 516, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 517, 518, 519, 520, 521, 338, 0, 0, 0, 0, - 343, 665, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 522, 523, 524, 525, 526, 527, - 528, 529, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 365, 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, 0, 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, - 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, - 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, - 315, 316, 317, 0, 0, 0, 0, 0, 0, 324, - 0, 0, 0, 328, 329, 330, 0, 0, 509, 510, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 511, 512, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 513, - 514, 515, 516, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 517, 518, 519, 520, 710, 338, 0, 0, 0, 0, - 343, 344, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 522, 523, 524, 525, 526, 527, - 528, 529, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 365, 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, 0, 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, - 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, - 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, - 315, 316, 317, 0, 0, 0, 0, 0, 0, 324, - 0, 0, 0, 328, 329, 330, 0, 0, 0, 0, + 0, 0, 0, 0, 527, 528, 529, 530, 531, 532, + 533, 534, 0, 0, 356, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 369, 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, 0, 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, 295, 296, 297, 298, 299, 300, 301, 302, 303, + 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, + 314, 315, 316, 317, 318, 319, 320, 0, 0, 0, + 0, 0, 0, 327, 0, 0, 0, 331, 332, 333, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 338, 0, 0, 0, 0, - 343, 344 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 341, + 0, 0, 0, 0, 346, 347, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 356 }; static const yytype_int16 yycheck[] = { - 0, 0, 0, 392, 503, 411, 0, 633, 411, 491, - 416, 444, 0, 449, 552, 568, 753, 450, 562, 579, - 512, 577, 411, 557, 354, 400, 342, 416, 423, 354, - 568, 645, 357, 647, 337, 338, 650, 571, 365, 538, - 359, 362, 354, 354, 915, 391, 580, 436, 357, 362, - 355, 922, 365, 374, 355, 491, 365, 387, 388, 389, - 390, 932, 378, 388, 391, 440, 355, 500, 501, 415, - 373, 374, 391, 509, 510, 557, 388, 388, 356, 355, - 357, 456, 335, 336, 362, 357, 568, 364, 355, 571, - 357, 651, 357, 365, 483, 373, 357, 364, 580, 364, - 356, 356, 355, 364, 357, 541, 362, 362, 361, 355, - 418, 419, 420, 421, 422, 423, 424, 355, 600, 356, - 612, 557, 614, 359, 356, 362, 362, 356, 355, 365, - 362, 757, 568, 362, 550, 571, 388, 356, 388, 391, - 556, 391, 558, 362, 580, 561, 645, 563, 647, 565, - 566, 650, 356, 356, 570, 550, 356, 356, 362, 362, - 356, 356, 362, 362, 600, 664, 362, 362, 660, 725, - 358, 566, 388, 355, 362, 391, 790, 344, 345, 346, - 347, 348, 349, 350, 351, 352, 353, 356, 577, 357, - 579, 388, 356, 362, 391, 356, 356, 364, 362, 936, - 575, 362, 362, 356, 356, 356, 356, 356, 356, 362, - 362, 362, 362, 362, 362, 356, 356, 356, 356, 356, - 355, 362, 362, 362, 362, 362, 358, 358, 333, 334, - 362, 362, 858, 669, 367, 355, 369, 643, 362, 795, - 643, 387, 388, 389, 390, 391, 736, 737, 738, 739, - 362, 365, 388, 365, 643, 391, 870, 387, 388, 389, - 390, 388, 651, 388, 391, 388, 391, 759, 391, 388, - 388, 763, 391, 391, 827, 356, 829, 821, 822, 373, - 814, 815, 781, 782, 360, 388, 362, 720, 391, 827, - 391, 790, 365, 729, 730, 731, 732, 733, 734, 735, + 0, 397, 0, 416, 496, 557, 0, 517, 421, 508, + 449, 0, 0, 573, 638, 416, 455, 567, 454, 582, + 416, 573, 758, 428, 405, 421, 562, 584, 357, 345, + 368, 360, 340, 341, 394, 365, 650, 357, 652, 357, + 576, 655, 357, 360, 543, 441, 359, 377, 359, 585, + 362, 368, 365, 360, 365, 361, 394, 358, 418, 365, + 496, 368, 391, 376, 445, 381, 505, 506, 376, 377, + 562, 391, 390, 391, 392, 393, 391, 358, 514, 515, + 461, 573, 394, 920, 576, 358, 338, 339, 360, 358, + 927, 360, 488, 585, 360, 367, 360, 358, 367, 656, + 937, 367, 370, 367, 372, 359, 358, 617, 360, 619, + 546, 365, 364, 605, 347, 348, 349, 350, 351, 352, + 353, 354, 355, 356, 336, 337, 562, 423, 424, 425, + 426, 427, 428, 429, 367, 359, 362, 573, 762, 365, + 576, 365, 368, 361, 342, 343, 359, 365, 359, 585, + 555, 650, 365, 652, 365, 665, 655, 359, 359, 359, + 365, 366, 359, 365, 365, 365, 571, 730, 365, 605, + 669, 359, 359, 359, 359, 358, 555, 365, 365, 365, + 365, 795, 561, 363, 563, 365, 582, 566, 584, 568, + 365, 570, 571, 368, 359, 359, 575, 359, 359, 580, + 365, 365, 359, 365, 365, 941, 359, 359, 365, 359, + 359, 359, 365, 365, 359, 365, 365, 365, 359, 359, + 365, 359, 361, 359, 365, 365, 365, 365, 365, 366, + 390, 391, 392, 393, 394, 648, 358, 800, 674, 863, + 383, 384, 385, 390, 391, 392, 393, 648, 741, 742, + 743, 744, 648, 358, 764, 358, 391, 368, 768, 394, + 656, 875, 391, 391, 391, 394, 394, 394, 391, 360, + 391, 394, 832, 394, 834, 365, 826, 827, 368, 391, + 832, 358, 394, 819, 820, 365, 725, 786, 787, 391, + 391, 391, 394, 394, 394, 358, 795, 394, 734, 735, 736, 737, 738, 739, 740, 741, 742, 743, 744, 745, - 746, 747, 926, 391, 388, 362, 942, 391, 365, 362, - 362, 362, 365, 365, 365, 380, 381, 382, 339, 340, - 362, 363, 814, 815, 362, 363, 725, 370, 371, 372, - 732, 733, 391, 734, 735, 827, 359, 829, 357, 359, - 740, 741, 391, 391, 391, 357, 391, 365, 364, 356, - 364, 362, 365, 377, 856, 356, 362, 859, 391, 362, - 362, 870, 362, 362, 357, 362, 362, 362, 814, 815, - 362, 362, 355, 355, 364, 356, 355, 355, 354, 341, - 357, 827, 392, 829, 358, 343, 391, 376, 375, 358, - 400, 355, 360, 365, 392, 365, 795, 899, 408, 408, - 408, 411, 400, 912, 408, 391, 416, 416, 416, 355, - 408, 391, 355, 411, 916, 365, 426, 926, 416, 355, - 365, 363, 355, 362, 365, 365, 436, 435, 365, 931, - 440, 391, 391, 356, 364, 362, 362, 356, 436, 449, - 356, 358, 440, 859, 358, 354, 456, 362, 399, 354, - 388, 355, 360, 356, 364, 356, 391, 359, 456, 365, - 859, 359, 359, 742, 360, 365, 744, 743, 582, 403, - 436, 745, 337, 483, 746, 440, 719, 747, 861, 440, - 834, 921, 932, 899, 494, 483, 933, 434, 861, 643, - 899, 643, 573, 810, 819, 408, 494, 817, 812, 643, - 899, 825, 829, 815, -1, -1, 822, -1, -1, -1, - -1, 821, -1, -1, -1, -1, -1, -1, 827, -1, + 746, 747, 748, 749, 750, 751, 752, 931, 391, 391, + 376, 394, 394, 947, 739, 740, 365, 819, 820, 368, + 365, 368, 365, 368, 730, 368, 365, 737, 738, 368, + 832, 394, 834, 373, 374, 375, 745, 746, 394, 362, + 394, 861, 362, 360, 864, 360, 394, 359, 394, 368, + 394, 367, 365, 367, 365, 380, 365, 394, 365, 365, + 365, 394, 365, 365, 365, 365, 875, 359, 365, 358, + 360, 359, 368, 819, 820, 358, 367, 358, 358, 357, + 344, 360, 368, 378, 904, 361, 832, 397, 834, 346, + 361, 363, 379, 358, 800, 405, 358, 358, 368, 397, + 394, 921, 368, 413, 358, 413, 416, 405, 917, 413, + 394, 421, 368, 421, 413, 413, 936, 421, 416, 366, + 368, 431, 931, 421, 368, 368, 358, 394, 359, 367, + 365, 441, 440, 359, 394, 445, 365, 365, 359, 361, + 365, 864, 361, 441, 454, 357, 357, 445, 363, 402, + 391, 461, 394, 359, 358, 362, 359, 367, 864, 368, + 406, 362, 362, 461, 363, 749, 368, 747, 445, 750, + 445, 748, 441, 587, 340, 724, 751, 839, 488, 752, + 866, 904, 926, 937, 439, 938, 866, 648, 904, 499, + 488, 815, 648, 413, 648, 824, 827, 578, 904, 832, + 820, 499, 817, 822, -1, -1, -1, -1, -1, -1, + -1, -1, 826, -1, -1, -1, -1, 830, -1, -1, + -1, -1, 834, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 546, -1, + -1, -1, -1, 551, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 575, -1, 577, -1, 579, - -1, -1, -1, -1, -1, -1, -1, 575, -1, 577, - -1, 579, -1, -1, -1, -1, -1, -1, -1, -1, + 580, -1, 582, -1, 584, -1, -1, -1, -1, -1, + -1, -1, 580, -1, 582, -1, 584, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 633, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 643, -1, 633, -1, -1, -1, -1, - -1, 651, -1, -1, -1, 643, -1, -1, -1, -1, - -1, -1, -1, 651, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 638, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 648, -1, + 638, -1, -1, -1, -1, -1, 656, -1, -1, -1, + 648, -1, -1, -1, -1, -1, -1, -1, 656, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 725, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 725, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 753, -1, -1, -1, 757, -1, -1, - -1, -1, -1, -1, -1, 753, -1, -1, -1, 757, + 730, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 730, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 758, -1, + -1, -1, 762, -1, -1, -1, -1, -1, -1, -1, + 758, -1, -1, -1, 762, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 795, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 795, -1, -1, + 800, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 800, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 858, 859, - -1, 861, -1, 861, -1, -1, -1, -1, -1, -1, - 858, 859, -1, 861, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 863, 864, -1, 866, -1, 866, -1, + -1, -1, -1, -1, -1, 863, 864, -1, 866, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 899, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 899, -1, -1, -1, 915, -1, -1, -1, -1, - -1, -1, 922, -1, -1, -1, -1, 915, -1, -1, - -1, -1, 932, -1, 922, -1, 936, -1, -1, -1, - -1, -1, 942, -1, 932, -1, -1, -1, 936, -1, - -1, -1, 0, -1, 942, 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, 295, 296, 297, - 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, - 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, - 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, - 328, 329, 330, 331, 332, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 904, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 904, -1, -1, -1, + 920, -1, -1, -1, -1, -1, -1, 927, -1, -1, + -1, -1, 920, -1, -1, -1, -1, 937, -1, 927, + -1, 941, -1, -1, -1, -1, -1, 947, -1, 937, + -1, -1, -1, 941, -1, -1, -1, 0, -1, 947, + 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, 295, 296, 297, 298, 299, 300, 301, 302, + 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, + 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, + 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, + 333, 334, 335, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 357, - -1, -1, -1, -1, -1, -1, -1, 365, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 360, -1, -1, + -1, -1, -1, -1, -1, 368, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 382, + 383, 384, 385, 386, -1, -1, -1, -1, -1, -1, + -1, -1, 395, 396, 397, 398, 399, 400, 401, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 379, 380, 381, 382, 383, -1, -1, -1, -1, - -1, -1, -1, -1, 392, 393, 394, 395, 396, 397, - 398, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 414, 415, 416, 417, - 418, 419, 420, -1, -1, -1, -1, -1, -1, -1, - -1, 429, -1, 431, 432, 433, 434, 435, 436, 437, - 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, - 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, - 458, 459, 460, 461, 462, 463, 464, 3, 4, 5, + -1, -1, -1, -1, 417, 418, 419, 420, 421, 422, + 423, -1, -1, -1, -1, -1, -1, -1, -1, 432, + -1, 434, 435, 436, 437, 438, 439, 440, 441, 442, + 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, + 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, + 463, 464, 465, 466, 467, 468, 469, 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, @@ -3112,67 +3137,68 @@ static const yytype_int16 yycheck[] = 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, - 326, 327, 328, 329, 330, 331, 332, -1, -1, 335, - 336, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 354, 355, - -1, 357, -1, 359, 360, -1, -1, -1, -1, 365, - 366, 367, 368, 369, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 379, 380, 381, 382, 383, -1, -1, - -1, 387, 388, 389, 390, 391, 392, 393, 394, 395, - 396, 397, 398, 399, 400, 401, 402, -1, 404, 405, - 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, + 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, + -1, -1, 338, 339, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 357, 358, -1, 360, -1, 362, 363, -1, -1, + -1, -1, 368, 369, 370, 371, 372, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 382, 383, 384, 385, + 386, -1, -1, -1, 390, 391, 392, 393, 394, 395, + 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, + -1, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, - 456, 457, 458, 459, 460, 461, 462, 463, 464, 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, 295, 296, 297, 298, 299, 300, 301, 302, 303, - 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, - 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, - 324, 325, 326, 327, 328, 329, 330, 331, 332, -1, - -1, 335, 336, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 354, 355, -1, 357, -1, 359, 360, -1, -1, -1, - -1, 365, 366, 367, 368, 369, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 379, 380, 381, 382, 383, - -1, -1, -1, 387, 388, 389, 390, 391, 392, 393, - 394, 395, 396, 397, 398, 399, 400, 401, 402, -1, - 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, - 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, - 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, - 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, - 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, - 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, - 464, 3, 4, 5, 6, 7, 8, 9, 10, 11, + 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, + 466, 467, 468, 469, 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, 295, 296, 297, 298, + 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, + 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, + 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, + 329, 330, 331, 332, 333, 334, 335, -1, -1, 338, + 339, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 357, 358, + -1, 360, -1, 362, 363, -1, -1, -1, -1, 368, + 369, 370, 371, 372, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 382, 383, 384, 385, 386, -1, -1, + -1, 390, 391, 392, 393, 394, 395, 396, 397, 398, + 399, 400, 401, 402, 403, 404, 405, -1, 407, 408, + 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, + 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, + 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, + 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, + 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, + 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, + 469, 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, @@ -3205,66 +3231,67 @@ static const yytype_int16 yycheck[] = 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, - 332, -1, -1, 335, 336, -1, -1, -1, -1, -1, + 332, 333, 334, 335, -1, -1, 338, 339, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 354, 355, -1, 357, -1, 359, -1, -1, - -1, -1, -1, 365, 366, 367, 368, 369, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 379, 380, 381, - 382, 383, -1, -1, -1, 387, 388, 389, 390, 391, + -1, -1, -1, -1, -1, 357, 358, -1, 360, -1, + 362, -1, -1, -1, -1, -1, 368, 369, 370, 371, + 372, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 382, 383, 384, 385, 386, -1, -1, -1, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, - 402, -1, 404, 405, 406, 407, 408, 409, 410, 411, + 402, 403, 404, 405, -1, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, - 462, 463, 464, 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, 295, 296, 297, 298, 299, - 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, - 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, - 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, - 330, 331, 332, -1, -1, 335, 336, -1, -1, -1, + 462, 463, 464, 465, 466, 467, 468, 469, 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, + 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, + 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, + 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, + 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, + 335, -1, -1, 338, 339, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 354, 355, -1, 357, -1, 359, - -1, -1, -1, -1, -1, 365, 366, 367, 368, 369, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 379, - 380, 381, 382, 383, -1, -1, -1, 387, 388, 389, - 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, - 400, 401, 402, -1, 404, 405, 406, 407, 408, 409, - 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, - 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, - 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, - 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, - 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, - 460, 461, 462, 463, 464, 3, 4, 5, 6, 7, + -1, -1, 357, 358, -1, 360, -1, 362, -1, -1, + -1, -1, -1, 368, 369, 370, 371, 372, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 382, 383, 384, + 385, 386, -1, -1, -1, 390, 391, 392, 393, 394, + 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, + 405, -1, 407, 408, 409, 410, 411, 412, 413, 414, + 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, + 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, + 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, + 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, + 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, + 465, 466, 467, 468, 469, 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, @@ -3297,66 +3324,67 @@ static const yytype_int16 yycheck[] = 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, - 328, 329, 330, 331, 332, -1, -1, 335, 336, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 354, 355, -1, 357, - -1, -1, -1, -1, -1, -1, -1, 365, 366, 367, - 368, 369, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 379, 380, 381, 382, 383, -1, -1, -1, 387, - 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, - 398, 399, 400, 401, 402, -1, 404, 405, 406, 407, + 328, 329, 330, 331, 332, 333, 334, 335, -1, -1, + 338, 339, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 357, + 358, -1, 360, -1, -1, -1, -1, -1, -1, -1, + 368, 369, 370, 371, 372, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 382, 383, 384, 385, 386, -1, + -1, -1, 390, 391, 392, 393, 394, 395, 396, 397, + 398, 399, 400, 401, 402, 403, 404, 405, -1, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, - 458, 459, 460, 461, 462, 463, 464, 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, 295, - 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, - 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, - 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, - 326, 327, 328, 329, 330, 331, 332, -1, -1, 335, - 336, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 354, 355, - -1, 357, -1, -1, -1, -1, -1, -1, -1, 365, - 366, 367, 368, 369, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 379, 380, 381, 382, 383, -1, -1, - -1, 387, 388, 389, 390, 391, 392, 393, 394, 395, - 396, 397, 398, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 414, 415, - 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, - 426, 427, 428, 429, -1, 431, 432, 433, 434, 435, - 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, - 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, - 456, 457, 458, 459, 460, 461, 462, 463, 464, 3, + 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, + 468, 469, 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, 295, 296, 297, 298, 299, 300, + 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, + 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, + 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, + 331, 332, 333, 334, 335, -1, -1, 338, 339, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 357, 358, -1, 360, + -1, -1, -1, -1, -1, -1, -1, 368, 369, 370, + 371, 372, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 382, 383, 384, 385, 386, -1, -1, -1, 390, + 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, + 401, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 417, 418, 419, 420, + 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, + 431, 432, -1, 434, 435, 436, 437, 438, 439, 440, + 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, + 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, + 461, 462, 463, 464, 465, 466, 467, 468, 469, 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, @@ -3388,22 +3416,256 @@ static const yytype_int16 yycheck[] = 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, - 314, 315, 316, 317, 318, 319, -1, -1, -1, 323, - 324, 325, 326, 327, 328, 329, 330, 331, 332, -1, - -1, 335, 336, -1, -1, -1, -1, -1, -1, -1, + 314, 315, 316, 317, 318, 319, 320, 321, 322, -1, + -1, -1, 326, 327, 328, 329, 330, 331, 332, 333, + 334, 335, -1, -1, 338, 339, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 354, 355, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 366, 367, 368, 369, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 379, 380, 381, 382, -1, - -1, -1, -1, 387, 388, 389, 390, 391, 392, 393, - 394, 395, 396, 397, 398, -1, -1, -1, -1, -1, + -1, -1, -1, 357, 358, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 369, 370, 371, 372, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 382, 383, + 384, 385, -1, -1, -1, -1, 390, 391, 392, 393, + 394, 395, 396, 397, 398, 399, 400, 401, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, - 424, 425, 426, 427, 428, 429, -1, 431, 432, 433, + -1, -1, -1, 417, 418, 419, 420, 421, 422, 423, + 424, 425, 426, 427, 428, 429, 430, 431, 432, -1, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, - 464, 3, 4, 5, 6, 7, 8, 9, 10, 11, + 464, 465, 466, 467, 468, 469, 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, 295, 296, + 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, + 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, + 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, + 327, 328, 329, 330, 331, 332, 333, 334, 335, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 360, -1, -1, -1, -1, -1, -1, + -1, 368, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 382, 383, 384, 385, 386, + -1, -1, -1, -1, -1, -1, -1, -1, 395, 396, + 397, 398, 399, 400, 401, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 417, 418, 419, 420, 421, 422, 423, -1, -1, -1, + -1, -1, -1, -1, -1, 432, -1, 434, 435, 436, + 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, + 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, + 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, + 467, 468, 469, 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, 295, 296, 297, 298, 299, + 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, + 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, + 320, 321, 322, -1, -1, -1, 326, 327, 328, 329, + 330, 331, 332, 333, 334, 335, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 382, 383, 384, 385, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 395, 396, 397, 398, 399, + 400, 401, 402, -1, -1, 405, -1, 407, 408, -1, + -1, 411, -1, -1, -1, -1, -1, 417, 418, 419, + 420, 421, 422, 423, -1, -1, -1, -1, -1, -1, + -1, -1, 432, -1, 434, 435, 436, 437, 438, 439, + 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, + 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, + 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, + 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, 295, 296, 297, 298, 299, 300, 301, 302, + 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, + 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, + -1, -1, -1, 326, 327, 328, 329, 330, 331, 332, + 333, 334, 335, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 368, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 382, + 383, 384, 385, -1, -1, -1, -1, -1, -1, -1, + -1, 394, 395, 396, 397, 398, 399, 400, 401, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 417, 418, 419, 420, 421, 422, + 423, -1, -1, -1, -1, -1, -1, -1, -1, 432, + -1, 434, 435, 436, 437, 438, 439, 440, 441, 442, + 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, + 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, + 463, 464, 465, 466, 467, 468, 469, 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, 295, + 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, + 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, + 316, 317, 318, 319, 320, 321, 322, -1, -1, -1, + 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 360, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 382, 383, 384, 385, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 395, + 396, 397, 398, 399, 400, 401, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 417, 418, 419, 420, 421, 422, 423, -1, -1, + -1, -1, -1, -1, -1, -1, 432, -1, 434, 435, + 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, + 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, + 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, + 466, 467, 468, 469, 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, 295, 296, 297, 298, + 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, + 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, + 319, 320, 321, 322, -1, -1, -1, 326, 327, 328, + 329, 330, 331, 332, 333, 334, 335, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 363, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 382, 383, 384, 385, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 395, 396, 397, 398, + 399, 400, 401, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 417, 418, + 419, 420, 421, 422, 423, -1, -1, -1, -1, -1, + -1, -1, -1, 432, -1, 434, 435, 436, 437, 438, + 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, + 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, + 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, + 469, 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, @@ -3435,67 +3697,68 @@ static const yytype_int16 yycheck[] = 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, - 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, - 332, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 322, -1, -1, -1, 326, 327, 328, 329, 330, 331, + 332, 333, 334, 335, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 357, -1, -1, -1, -1, - -1, -1, -1, 365, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 379, 380, 381, - 382, 383, -1, -1, -1, -1, -1, -1, -1, -1, - 392, 393, 394, 395, 396, 397, 398, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 414, 415, 416, 417, 418, 419, 420, -1, - -1, -1, -1, -1, -1, -1, -1, 429, -1, 431, - 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, + -1, 363, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 382, 383, 384, 385, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 395, 396, 397, 398, 399, 400, 401, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 417, 418, 419, 420, 421, + 422, 423, -1, -1, -1, -1, -1, -1, -1, -1, + 432, -1, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, - 462, 463, 464, 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, 295, 296, 297, 298, 299, - 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, - 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, - -1, -1, -1, 323, 324, 325, 326, 327, 328, 329, - 330, 331, 332, -1, -1, -1, -1, -1, -1, -1, + 462, 463, 464, 465, 466, 467, 468, 469, 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, + 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, + 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, + 315, 316, 317, 318, 319, 320, 321, 322, -1, -1, + -1, 326, 327, 328, 329, 330, 331, 332, 333, 334, + 335, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 363, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 382, 383, 384, + 385, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 395, 396, 397, 398, 399, 400, 401, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 379, - 380, 381, 382, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 392, 393, 394, 395, 396, 397, 398, 399, - -1, -1, 402, -1, 404, 405, -1, -1, 408, -1, - -1, -1, -1, -1, 414, 415, 416, 417, 418, 419, - 420, -1, -1, -1, -1, -1, -1, -1, -1, 429, - -1, 431, 432, 433, 434, 435, 436, 437, 438, 439, - 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, - 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, - 460, 461, 462, 463, 464, 3, 4, 5, 6, 7, + -1, -1, 417, 418, 419, 420, 421, 422, 423, -1, + -1, -1, -1, -1, -1, -1, -1, 432, -1, 434, + 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, + 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, + 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, + 465, 466, 467, 468, 469, 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, @@ -3527,120 +3790,28 @@ static const yytype_int16 yycheck[] = 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, - 318, 319, -1, -1, -1, 323, 324, 325, 326, 327, - 328, 329, 330, 331, 332, -1, -1, -1, -1, -1, + 318, 319, 320, 321, 322, -1, -1, -1, 326, 327, + 328, 329, 330, 331, 332, 333, 334, 335, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 365, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 379, 380, 381, 382, -1, -1, -1, -1, -1, - -1, -1, -1, 391, 392, 393, 394, 395, 396, 397, - 398, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 414, 415, 416, 417, - 418, 419, 420, -1, -1, -1, -1, -1, -1, -1, - -1, 429, -1, 431, 432, 433, 434, 435, 436, 437, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 382, 383, 384, 385, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 395, 396, 397, + 398, 399, 400, 401, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 417, + 418, 419, 420, 421, 422, 423, -1, -1, -1, -1, + -1, -1, -1, -1, 432, -1, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, - 458, 459, 460, 461, 462, 463, 464, 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, 295, - 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, - 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, - 316, 317, 318, 319, -1, -1, -1, 323, 324, 325, - 326, 327, 328, 329, 330, 331, 332, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 357, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 379, 380, 381, 382, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 392, 393, 394, 395, - 396, 397, 398, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 414, 415, - 416, 417, 418, 419, 420, -1, -1, -1, -1, -1, - -1, -1, -1, 429, -1, 431, 432, 433, 434, 435, - 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, - 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, - 456, 457, 458, 459, 460, 461, 462, 463, 464, 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, 295, 296, 297, 298, 299, 300, 301, 302, 303, - 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, - 314, 315, 316, 317, 318, 319, -1, -1, -1, 323, - 324, 325, 326, 327, 328, 329, 330, 331, 332, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 360, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 379, 380, 381, 382, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 392, 393, - 394, 395, 396, 397, 398, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 414, 415, 416, 417, 418, 419, 420, -1, -1, -1, - -1, -1, -1, -1, -1, 429, -1, 431, 432, 433, - 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, - 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, - 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, - 464, 3, 4, 5, 6, 7, 8, 9, 10, 11, + 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, + 468, 469, 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, @@ -3650,7 +3821,7 @@ static const yytype_int16 yycheck[] = 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, + 162, 163, 164, 165, 166, 167, 168, -1, 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, @@ -3665,28 +3836,115 @@ static const yytype_int16 yycheck[] = 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, - 312, 313, 314, 315, 316, 317, 318, 319, -1, -1, - -1, 323, 324, 325, 326, 327, 328, 329, 330, 331, - 332, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, + 322, -1, -1, -1, -1, -1, -1, 329, -1, -1, + -1, 333, 334, 335, -1, -1, 338, 339, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 360, -1, + -1, -1, -1, -1, -1, 357, 358, -1, -1, -1, + 362, 363, -1, -1, -1, -1, -1, 369, 370, 371, + 372, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 390, 391, + 392, 393, 394, 395, -1, -1, -1, -1, 400, 401, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 379, 380, 381, - 382, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 392, 393, 394, 395, 396, 397, 398, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 414, 415, 416, 417, 418, 419, 420, -1, - -1, -1, -1, -1, -1, -1, -1, 429, -1, 431, - 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, - 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, - 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, - 462, 463, 464, 3, 4, 5, 6, 7, 8, 9, + -1, -1, 424, 425, 426, 427, 428, 429, 430, 431, + -1, -1, 434, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 447, 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, -1, 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, 295, 296, 297, + 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, + 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, + 318, 319, 320, 321, 322, -1, -1, -1, -1, -1, + -1, 329, -1, -1, -1, 333, 334, 335, -1, -1, + 338, 339, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 357, + 358, -1, -1, -1, 362, 363, -1, -1, -1, -1, + -1, 369, 370, 371, 372, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 390, 391, 392, 393, 394, 395, -1, -1, + -1, -1, 400, 401, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 424, 425, 426, 427, + 428, 429, 430, 431, -1, -1, 434, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 447, + 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, -1, 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, 295, 296, 297, 298, 299, 300, 301, 302, 303, + 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, + 314, 315, 316, 317, 318, 319, 320, 321, 322, -1, + -1, -1, -1, -1, -1, 329, -1, -1, -1, 333, + 334, 335, -1, -1, 338, 339, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 357, 358, -1, -1, 361, -1, -1, + -1, -1, -1, -1, -1, 369, 370, 371, 372, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 390, 391, 392, 393, + 394, 395, -1, -1, -1, -1, 400, 401, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 424, 425, 426, 427, 428, 429, 430, 431, -1, -1, + 434, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 447, 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, @@ -3696,7 +3954,7 @@ static const yytype_int16 yycheck[] = 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, + 160, 161, 162, 163, 164, 165, 166, 167, 168, -1, 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, @@ -3712,27 +3970,114 @@ static const yytype_int16 yycheck[] = 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, - -1, -1, -1, 323, 324, 325, 326, 327, 328, 329, - 330, 331, 332, -1, -1, -1, -1, -1, -1, -1, + 320, 321, 322, -1, -1, -1, -1, -1, -1, 329, + -1, -1, -1, 333, 334, 335, -1, -1, 338, 339, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 357, 358, -1, + -1, -1, 362, -1, -1, -1, -1, -1, -1, 369, + 370, 371, 372, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 390, 391, 392, 393, 394, 395, -1, -1, -1, -1, + 400, 401, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 424, 425, 426, 427, 428, 429, + 430, 431, -1, -1, 434, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 447, 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, -1, 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, 295, + 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, + 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, + 316, 317, 318, 319, 320, 321, 322, -1, -1, -1, + -1, -1, -1, 329, -1, -1, -1, 333, 334, 335, + -1, -1, 338, 339, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 357, 358, -1, -1, 361, -1, -1, -1, -1, + -1, -1, -1, 369, 370, 371, 372, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 390, 391, 392, 393, 394, 395, + -1, -1, -1, -1, 400, 401, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 424, 425, + 426, 427, 428, 429, 430, 431, -1, -1, 434, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 447, 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, -1, 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, 295, 296, 297, 298, 299, 300, 301, + 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, + 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, + 322, -1, -1, -1, -1, -1, -1, 329, -1, -1, + -1, 333, 334, 335, -1, -1, 338, 339, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 357, 358, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 368, 369, 370, 371, + 372, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 390, 391, + 392, 393, 394, 395, -1, -1, -1, -1, 400, 401, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 360, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 379, - 380, 381, 382, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 392, 393, 394, 395, 396, 397, 398, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 414, 415, 416, 417, 418, 419, - 420, -1, -1, -1, -1, -1, -1, -1, -1, 429, - -1, 431, 432, 433, 434, 435, 436, 437, 438, 439, - 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, - 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, - 460, 461, 462, 463, 464, 3, 4, 5, 6, 7, + -1, -1, 424, 425, 426, 427, 428, 429, 430, 431, + -1, -1, 434, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 447, 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, @@ -3743,7 +4088,7 @@ static const yytype_int16 yycheck[] = 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, + 168, -1, 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, @@ -3758,457 +4103,151 @@ static const yytype_int16 yycheck[] = 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, - 318, 319, -1, -1, -1, 323, 324, 325, 326, 327, - 328, 329, 330, 331, 332, -1, -1, -1, -1, -1, + 318, 319, 320, 321, 322, -1, -1, -1, -1, -1, + -1, 329, -1, -1, -1, 333, 334, 335, -1, -1, + 338, 339, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 357, + 358, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 369, 370, 371, 372, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 390, 391, 392, 393, 394, 395, -1, -1, + -1, -1, 400, 401, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 424, 425, 426, 427, + 428, 429, 430, 431, -1, -1, 434, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 447, + 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, -1, 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, 295, 296, 297, 298, 299, 300, 301, 302, 303, + 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, + 314, 315, 316, 317, 318, 319, 320, 321, 322, -1, + -1, -1, -1, -1, -1, 329, -1, -1, -1, 333, + 334, 335, -1, -1, 338, 339, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 357, 358, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 369, 370, 371, 372, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 390, 391, 392, 393, + 394, 395, -1, -1, -1, -1, 400, 401, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 424, 425, 426, 427, 428, 429, 430, 431, -1, -1, + 434, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 447, 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, -1, + 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, 295, 296, 297, 298, 299, + 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, + 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, + 320, 321, 322, -1, -1, -1, -1, -1, -1, 329, + -1, -1, -1, 333, 334, 335, -1, -1, 338, 339, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 357, 358, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 369, + 370, 371, 372, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 379, 380, 381, 382, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 392, 393, 394, 395, 396, 397, - 398, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 414, 415, 416, 417, - 418, 419, 420, -1, -1, -1, -1, -1, -1, -1, - -1, 429, -1, 431, 432, 433, 434, 435, 436, 437, - 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, - 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, - 458, 459, 460, 461, 462, 463, 464, 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, -1, 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, 295, 296, - 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, - 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, - 317, 318, 319, -1, -1, -1, -1, -1, -1, 326, - -1, -1, -1, 330, 331, 332, -1, -1, 335, 336, + 390, 391, 392, 393, 394, 395, -1, -1, -1, -1, + 400, 401, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 354, 355, -1, - -1, -1, 359, 360, -1, -1, -1, -1, -1, 366, - 367, 368, 369, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 387, 388, 389, 390, 391, 392, -1, -1, -1, -1, - 397, 398, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 421, 422, 423, 424, 425, 426, - 427, 428, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 443, 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, -1, 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, 295, 296, - 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, - 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, - 317, 318, 319, -1, -1, -1, -1, -1, -1, 326, - -1, -1, -1, 330, 331, 332, -1, -1, 335, 336, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 354, 355, -1, - -1, -1, 359, 360, -1, -1, -1, -1, -1, 366, - 367, 368, 369, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 387, 388, 389, 390, 391, 392, -1, -1, -1, -1, - 397, 398, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 421, 422, 423, 424, 425, 426, - 427, 428, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 443, 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, -1, 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, 295, 296, - 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, - 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, - 317, 318, 319, -1, -1, -1, -1, -1, -1, 326, - -1, -1, -1, 330, 331, 332, -1, -1, 335, 336, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 354, 355, -1, - -1, 358, -1, -1, -1, -1, -1, -1, -1, 366, - 367, 368, 369, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 387, 388, 389, 390, 391, 392, -1, -1, -1, -1, - 397, 398, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 421, 422, 423, 424, 425, 426, - 427, 428, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 443, 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, -1, 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, 295, 296, - 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, - 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, - 317, 318, 319, -1, -1, -1, -1, -1, -1, 326, - -1, -1, -1, 330, 331, 332, -1, -1, 335, 336, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 354, 355, -1, - -1, -1, 359, -1, -1, -1, -1, -1, -1, 366, - 367, 368, 369, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 387, 388, 389, 390, 391, 392, -1, -1, -1, -1, - 397, 398, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 421, 422, 423, 424, 425, 426, - 427, 428, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 443, 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, -1, 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, 295, 296, - 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, - 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, - 317, 318, 319, -1, -1, -1, -1, -1, -1, 326, - -1, -1, -1, 330, 331, 332, -1, -1, 335, 336, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 354, 355, -1, - -1, 358, -1, -1, -1, -1, -1, -1, -1, 366, - 367, 368, 369, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 387, 388, 389, 390, 391, 392, -1, -1, -1, -1, - 397, 398, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 421, 422, 423, 424, 425, 426, - 427, 428, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 443, 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, -1, 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, 295, 296, - 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, - 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, - 317, 318, 319, -1, -1, -1, -1, -1, -1, 326, - -1, -1, -1, 330, 331, 332, -1, -1, 335, 336, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 354, 355, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 365, 366, - 367, 368, 369, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 387, 388, 389, 390, 391, 392, -1, -1, -1, -1, - 397, 398, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 421, 422, 423, 424, 425, 426, - 427, 428, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 443, 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, -1, 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, 295, 296, - 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, - 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, - 317, 318, 319, -1, -1, -1, -1, -1, -1, 326, - -1, -1, -1, 330, 331, 332, -1, -1, 335, 336, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 354, 355, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 366, - 367, 368, 369, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 387, 388, 389, 390, 391, 392, -1, -1, -1, -1, - 397, 398, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 421, 422, 423, 424, 425, 426, - 427, 428, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 443, 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, -1, 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, 295, 296, - 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, - 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, - 317, 318, 319, -1, -1, -1, -1, -1, -1, 326, - -1, -1, -1, 330, 331, 332, -1, -1, 335, 336, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 354, 355, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 366, - 367, 368, 369, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 387, 388, 389, 390, 391, 392, -1, -1, -1, -1, - 397, 398, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 421, 422, 423, 424, 425, 426, - 427, 428, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 443, 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, -1, 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, 295, 296, - 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, - 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, - 317, 318, 319, -1, -1, -1, -1, -1, -1, 326, - -1, -1, -1, 330, 331, 332, -1, -1, 335, 336, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 354, 355, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 366, - 367, 368, 369, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 387, 388, 389, 390, 391, 392, -1, -1, -1, -1, - 397, 398, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 421, 422, 423, 424, 425, 426, - 427, 428, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 443, 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, -1, 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, 295, 296, - 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, - 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, - 317, 318, 319, -1, -1, -1, -1, -1, -1, 326, - -1, -1, -1, 330, 331, 332, -1, -1, -1, -1, + -1, -1, -1, -1, 424, 425, 426, 427, 428, 429, + 430, 431, -1, -1, 434, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 447, 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, -1, 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, 295, + 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, + 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, + 316, 317, 318, 319, 320, 321, 322, -1, -1, -1, + -1, -1, -1, 329, -1, -1, -1, 333, 334, 335, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 392, -1, -1, -1, -1, - 397, 398 + -1, -1, -1, -1, -1, -1, -1, -1, -1, 395, + -1, -1, -1, -1, 400, 401, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 434 }; /* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of @@ -4248,144 +4287,145 @@ static const yytype_int16 yystos[] = 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, - 332, 357, 365, 379, 380, 381, 382, 383, 392, 393, - 394, 395, 396, 397, 398, 414, 415, 416, 417, 418, - 419, 420, 429, 431, 432, 433, 434, 435, 436, 437, + 332, 333, 334, 335, 360, 368, 382, 383, 384, 385, + 386, 395, 396, 397, 398, 399, 400, 401, 417, 418, + 419, 420, 421, 422, 423, 432, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, - 458, 459, 460, 461, 462, 463, 464, 496, 497, 500, - 501, 502, 503, 507, 508, 509, 510, 511, 512, 515, - 516, 517, 518, 519, 521, 526, 527, 528, 569, 570, - 571, 573, 580, 584, 585, 591, 594, 355, 355, 355, - 355, 355, 355, 355, 355, 357, 527, 359, 391, 355, - 355, 365, 391, 365, 572, 356, 362, 504, 505, 506, - 516, 521, 362, 365, 391, 365, 391, 517, 521, 373, - 523, 524, 0, 570, 501, 509, 516, 365, 500, 391, - 576, 577, 595, 596, 388, 391, 576, 388, 576, 388, - 576, 388, 576, 388, 576, 576, 595, 388, 576, 391, - 574, 575, 521, 530, 359, 391, 415, 513, 514, 391, - 520, 357, 365, 522, 359, 548, 573, 505, 504, 506, - 391, 391, 355, 364, 522, 359, 362, 365, 499, 335, - 336, 354, 355, 366, 367, 368, 369, 387, 388, 389, - 390, 391, 421, 422, 423, 424, 425, 426, 427, 428, - 466, 467, 468, 470, 471, 472, 473, 474, 475, 476, - 477, 478, 519, 521, 525, 522, 356, 391, 365, 364, - 362, 356, 362, 356, 362, 364, 362, 362, 362, 356, - 362, 362, 362, 362, 362, 362, 362, 356, 362, 356, - 362, 355, 358, 362, 365, 516, 521, 531, 532, 529, - 364, 356, 362, 356, 362, 358, 477, 479, 480, 481, - 482, 483, 484, 485, 486, 487, 488, 489, 490, 521, - 357, 365, 359, 360, 365, 399, 400, 401, 402, 404, - 405, 406, 407, 408, 409, 410, 411, 412, 413, 430, - 477, 490, 492, 494, 496, 500, 519, 521, 537, 538, - 539, 540, 541, 549, 550, 551, 552, 555, 556, 559, - 560, 561, 568, 573, 522, 364, 522, 359, 492, 535, - 364, 498, 391, 362, 365, 477, 477, 494, 335, 336, - 357, 361, 356, 356, 362, 398, 492, 355, 477, 362, - 374, 573, 354, 357, 388, 577, 595, 391, 596, 354, - 387, 388, 389, 390, 581, 582, 388, 490, 495, 583, - 388, 387, 388, 389, 390, 586, 587, 388, 387, 388, - 389, 390, 466, 588, 589, 388, 354, 590, 388, 595, - 391, 495, 526, 592, 593, 388, 495, 358, 575, 521, - 391, 533, 534, 360, 532, 531, 495, 514, 391, 370, - 371, 372, 367, 369, 333, 334, 337, 338, 373, 374, - 339, 340, 377, 376, 375, 341, 343, 342, 378, 358, - 358, 490, 360, 542, 355, 365, 365, 563, 355, 355, - 365, 365, 494, 355, 494, 363, 365, 365, 365, 365, - 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, - 364, 493, 362, 365, 360, 538, 552, 556, 561, 535, - 364, 360, 535, 536, 535, 531, 391, 356, 469, 494, - 391, 492, 477, 354, 388, 578, 579, 356, 364, 356, - 362, 356, 362, 356, 362, 362, 356, 362, 356, 362, - 356, 362, 362, 356, 362, 362, 356, 362, 356, 362, - 356, 356, 533, 522, 362, 365, 360, 477, 477, 477, - 479, 479, 480, 480, 481, 481, 481, 481, 482, 482, - 483, 484, 485, 486, 487, 488, 491, 358, 549, 562, - 538, 564, 494, 365, 494, 363, 492, 492, 535, 360, - 362, 360, 358, 358, 362, 358, 362, 582, 581, 495, - 583, 587, 586, 589, 588, 354, 590, 592, 593, 365, - 534, 494, 543, 494, 509, 554, 399, 537, 550, 565, - 356, 356, 360, 535, 354, 388, 356, 356, 356, 356, - 356, 356, 363, 360, 391, 356, 355, 554, 566, 567, - 545, 546, 547, 553, 557, 492, 364, 539, 544, 548, - 494, 365, 356, 403, 541, 539, 359, 535, 356, 494, - 544, 545, 549, 558, 365, 360 + 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, + 468, 469, 501, 502, 505, 506, 507, 508, 512, 513, + 514, 515, 516, 517, 520, 521, 522, 523, 524, 526, + 531, 532, 533, 574, 575, 576, 578, 585, 589, 590, + 596, 599, 358, 358, 358, 358, 358, 358, 358, 358, + 360, 532, 362, 394, 358, 358, 368, 394, 368, 577, + 359, 365, 509, 510, 511, 521, 526, 365, 368, 394, + 368, 394, 522, 526, 376, 528, 529, 0, 575, 506, + 514, 521, 368, 505, 394, 581, 582, 600, 601, 391, + 394, 581, 391, 581, 391, 581, 391, 581, 391, 581, + 581, 600, 391, 581, 394, 579, 580, 526, 535, 362, + 394, 418, 518, 519, 394, 525, 360, 368, 527, 362, + 553, 578, 510, 509, 511, 394, 394, 358, 367, 527, + 362, 365, 368, 504, 338, 339, 357, 358, 369, 370, + 371, 372, 390, 391, 392, 393, 394, 424, 425, 426, + 427, 428, 429, 430, 431, 471, 472, 473, 475, 476, + 477, 478, 479, 480, 481, 482, 483, 524, 526, 530, + 527, 359, 394, 368, 367, 365, 359, 365, 359, 365, + 367, 365, 365, 365, 359, 365, 365, 365, 365, 365, + 365, 365, 359, 365, 359, 365, 358, 361, 365, 368, + 521, 526, 536, 537, 534, 367, 359, 365, 359, 365, + 361, 482, 484, 485, 486, 487, 488, 489, 490, 491, + 492, 493, 494, 495, 526, 360, 368, 362, 363, 368, + 402, 403, 404, 405, 407, 408, 409, 410, 411, 412, + 413, 414, 415, 416, 433, 482, 495, 497, 499, 501, + 505, 524, 526, 542, 543, 544, 545, 546, 554, 555, + 556, 557, 560, 561, 564, 565, 566, 573, 578, 527, + 367, 527, 362, 497, 540, 367, 503, 394, 365, 368, + 482, 482, 499, 338, 339, 360, 364, 359, 359, 365, + 401, 497, 358, 482, 365, 377, 578, 357, 360, 391, + 582, 600, 394, 601, 357, 390, 391, 392, 393, 586, + 587, 391, 495, 500, 588, 391, 390, 391, 392, 393, + 591, 592, 391, 390, 391, 392, 393, 471, 593, 594, + 391, 357, 595, 391, 600, 394, 500, 531, 597, 598, + 391, 500, 361, 580, 526, 394, 538, 539, 363, 537, + 536, 500, 519, 394, 373, 374, 375, 370, 372, 336, + 337, 340, 341, 376, 377, 342, 343, 380, 379, 378, + 344, 346, 345, 381, 361, 361, 495, 363, 547, 358, + 368, 368, 568, 358, 358, 368, 368, 499, 358, 499, + 366, 368, 368, 368, 368, 347, 348, 349, 350, 351, + 352, 353, 354, 355, 356, 367, 498, 365, 368, 363, + 543, 557, 561, 566, 540, 367, 363, 540, 541, 540, + 536, 394, 359, 474, 499, 394, 497, 482, 357, 391, + 583, 584, 359, 367, 359, 365, 359, 365, 359, 365, + 365, 359, 365, 359, 365, 359, 365, 365, 359, 365, + 365, 359, 365, 359, 365, 359, 359, 538, 527, 365, + 368, 363, 482, 482, 482, 484, 484, 485, 485, 486, + 486, 486, 486, 487, 487, 488, 489, 490, 491, 492, + 493, 496, 361, 554, 567, 543, 569, 499, 368, 499, + 366, 497, 497, 540, 363, 365, 363, 361, 361, 365, + 361, 365, 587, 586, 500, 588, 592, 591, 594, 593, + 357, 595, 597, 598, 368, 539, 499, 548, 499, 514, + 559, 402, 542, 555, 570, 359, 359, 363, 540, 357, + 391, 359, 359, 359, 359, 359, 359, 366, 363, 394, + 359, 358, 559, 571, 572, 550, 551, 552, 558, 562, + 497, 367, 544, 549, 553, 499, 368, 359, 406, 546, + 544, 362, 540, 359, 499, 549, 550, 554, 563, 368, + 363 }; /* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */ static const yytype_int16 yyr1[] = { - 0, 465, 466, 467, 467, 467, 467, 467, 467, 467, - 467, 467, 467, 467, 467, 467, 467, 467, 468, 468, - 468, 468, 468, 468, 469, 470, 471, 472, 472, 473, - 473, 474, 474, 475, 476, 476, 476, 477, 477, 477, - 477, 478, 478, 478, 478, 479, 479, 479, 479, 480, - 480, 480, 481, 481, 481, 482, 482, 482, 482, 482, - 483, 483, 483, 484, 484, 485, 485, 486, 486, 487, - 487, 488, 488, 489, 489, 490, 491, 490, 492, 492, - 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, - 493, 494, 494, 495, 496, 496, 496, 496, 496, 496, - 496, 496, 496, 496, 496, 498, 497, 499, 499, 500, - 500, 500, 500, 501, 501, 502, 502, 503, 504, 504, - 505, 505, 505, 505, 506, 507, 507, 507, 507, 507, - 508, 508, 508, 508, 508, 509, 509, 510, 511, 511, - 511, 511, 511, 511, 511, 511, 511, 511, 512, 513, - 513, 514, 514, 514, 515, 516, 516, 517, 517, 517, - 517, 517, 517, 517, 517, 517, 517, 517, 518, 518, - 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, - 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, - 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, - 518, 518, 518, 518, 518, 518, 519, 520, 520, 521, - 521, 522, 522, 522, 522, 523, 523, 524, 525, 525, - 525, 526, 526, 526, 526, 526, 526, 526, 526, 526, - 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, - 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, - 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, - 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, - 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, - 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, - 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, - 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, - 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, - 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, - 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, - 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, - 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, - 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, - 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, - 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, - 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, - 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, - 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, - 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, - 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, - 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, - 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, - 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, - 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, - 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, - 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, - 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, - 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, - 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, - 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, - 526, 527, 527, 527, 529, 528, 530, 528, 531, 531, - 532, 532, 533, 533, 534, 534, 535, 535, 535, 535, - 536, 536, 537, 538, 538, 539, 539, 539, 539, 539, - 539, 539, 539, 540, 541, 542, 543, 541, 544, 544, - 546, 545, 547, 545, 548, 548, 549, 549, 550, 550, - 551, 551, 552, 553, 553, 554, 554, 555, 555, 557, - 556, 558, 558, 559, 559, 560, 560, 562, 561, 563, - 561, 564, 561, 565, 565, 566, 566, 567, 567, 568, - 568, 568, 568, 568, 568, 568, 568, 569, 569, 570, - 570, 570, 572, 571, 573, 574, 574, 575, 575, 576, - 576, 577, 577, 578, 578, 579, 579, 580, 580, 580, - 580, 580, 580, 581, 581, 582, 582, 582, 582, 582, - 583, 583, 584, 584, 585, 585, 585, 585, 585, 585, - 585, 585, 586, 586, 587, 587, 587, 587, 588, 588, - 589, 589, 589, 589, 589, 590, 590, 591, 591, 591, - 591, 592, 592, 593, 593, 594, 594, 595, 595, 596, - 596 + 0, 470, 471, 472, 472, 472, 472, 472, 472, 472, + 472, 472, 472, 472, 472, 472, 472, 472, 473, 473, + 473, 473, 473, 473, 474, 475, 476, 477, 477, 478, + 478, 479, 479, 480, 481, 481, 481, 482, 482, 482, + 482, 483, 483, 483, 483, 484, 484, 484, 484, 485, + 485, 485, 486, 486, 486, 487, 487, 487, 487, 487, + 488, 488, 488, 489, 489, 490, 490, 491, 491, 492, + 492, 493, 493, 494, 494, 495, 496, 495, 497, 497, + 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, + 498, 499, 499, 500, 501, 501, 501, 501, 501, 501, + 501, 501, 501, 501, 501, 503, 502, 504, 504, 505, + 505, 505, 505, 506, 506, 507, 507, 508, 509, 509, + 510, 510, 510, 510, 511, 512, 512, 512, 512, 512, + 513, 513, 513, 513, 513, 514, 514, 515, 516, 516, + 516, 516, 516, 516, 516, 516, 516, 516, 517, 518, + 518, 519, 519, 519, 520, 521, 521, 522, 522, 522, + 522, 522, 522, 522, 522, 522, 522, 522, 523, 523, + 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, + 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, + 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, + 523, 523, 523, 523, 523, 523, 523, 524, 525, 525, + 526, 526, 527, 527, 527, 527, 528, 528, 529, 530, + 530, 530, 531, 531, 531, 531, 531, 531, 531, 531, + 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, + 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, + 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, + 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, + 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, + 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, + 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, + 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, + 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, + 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, + 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, + 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, + 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, + 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, + 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, + 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, + 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, + 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, + 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, + 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, + 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, + 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, + 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, + 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, + 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, + 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, + 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, + 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, + 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, + 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, + 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, + 531, 531, 531, 531, 531, 531, 532, 532, 532, 534, + 533, 535, 533, 536, 536, 537, 537, 538, 538, 539, + 539, 540, 540, 540, 540, 541, 541, 542, 543, 543, + 544, 544, 544, 544, 544, 544, 544, 544, 545, 546, + 547, 548, 546, 549, 549, 551, 550, 552, 550, 553, + 553, 554, 554, 555, 555, 556, 556, 557, 558, 558, + 559, 559, 560, 560, 562, 561, 563, 563, 564, 564, + 565, 565, 567, 566, 568, 566, 569, 566, 570, 570, + 571, 571, 572, 572, 573, 573, 573, 573, 573, 573, + 573, 573, 574, 574, 575, 575, 575, 577, 576, 578, + 579, 579, 580, 580, 581, 581, 582, 582, 583, 583, + 584, 584, 585, 585, 585, 585, 585, 585, 586, 586, + 587, 587, 587, 587, 587, 588, 588, 589, 589, 590, + 590, 590, 590, 590, 590, 590, 590, 591, 591, 592, + 592, 592, 592, 593, 593, 594, 594, 594, 594, 594, + 595, 595, 596, 596, 596, 596, 597, 597, 598, 598, + 599, 599, 600, 600, 601, 601 }; /* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */ @@ -4411,57 +4451,57 @@ static const yytype_int8 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, 1, 1, 4, 1, 1, 1, 3, 2, - 3, 2, 3, 3, 4, 1, 0, 3, 1, 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, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 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, 2, + 1, 1, 1, 1, 1, 4, 1, 1, 1, 3, + 2, 3, 2, 3, 3, 4, 1, 0, 3, 1, 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, 2, 2, 2, 1, 2, 1, - 1, 1, 0, 3, 5, 1, 3, 1, 4, 1, - 3, 5, 5, 1, 3, 1, 3, 4, 6, 6, - 8, 6, 8, 1, 3, 1, 1, 1, 1, 1, - 1, 3, 4, 6, 4, 6, 6, 8, 6, 8, - 6, 8, 1, 3, 1, 1, 1, 1, 1, 3, - 1, 1, 1, 1, 1, 1, 3, 6, 8, 4, - 6, 1, 3, 1, 1, 4, 6, 1, 3, 3, - 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, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 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, 2, 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, 2, + 2, 2, 1, 2, 1, 1, 1, 0, 3, 5, + 1, 3, 1, 4, 1, 3, 5, 5, 1, 3, + 1, 3, 4, 6, 6, 8, 6, 8, 1, 3, + 1, 1, 1, 1, 1, 1, 3, 4, 6, 4, + 6, 6, 8, 6, 8, 6, 8, 1, 3, 1, + 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, + 1, 3, 6, 8, 4, 6, 1, 3, 1, 1, + 4, 6, 1, 3, 3, 3 }; @@ -5203,260 +5243,260 @@ yyreduce: switch (yyn) { case 2: /* variable_identifier: IDENTIFIER */ -#line 355 "MachineIndependent/glslang.y" +#line 357 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = parseContext.handleVariable((yyvsp[0].lex).loc, (yyvsp[0].lex).symbol, (yyvsp[0].lex).string); } -#line 5211 "MachineIndependent/glslang_tab.cpp" +#line 5251 "MachineIndependent/glslang_tab.cpp" break; case 3: /* primary_expression: variable_identifier */ -#line 361 "MachineIndependent/glslang.y" +#line 363 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 5219 "MachineIndependent/glslang_tab.cpp" +#line 5259 "MachineIndependent/glslang_tab.cpp" break; case 4: /* primary_expression: LEFT_PAREN expression RIGHT_PAREN */ -#line 364 "MachineIndependent/glslang.y" +#line 366 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = (yyvsp[-1].interm.intermTypedNode); if ((yyval.interm.intermTypedNode)->getAsConstantUnion()) (yyval.interm.intermTypedNode)->getAsConstantUnion()->setExpression(); } -#line 5229 "MachineIndependent/glslang_tab.cpp" +#line 5269 "MachineIndependent/glslang_tab.cpp" break; case 5: /* primary_expression: FLOATCONSTANT */ -#line 369 "MachineIndependent/glslang.y" +#line 371 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).d, EbtFloat, (yyvsp[0].lex).loc, true); } -#line 5237 "MachineIndependent/glslang_tab.cpp" +#line 5277 "MachineIndependent/glslang_tab.cpp" break; case 6: /* primary_expression: INTCONSTANT */ -#line 372 "MachineIndependent/glslang.y" +#line 374 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).i, (yyvsp[0].lex).loc, true); } -#line 5245 "MachineIndependent/glslang_tab.cpp" +#line 5285 "MachineIndependent/glslang_tab.cpp" break; case 7: /* primary_expression: UINTCONSTANT */ -#line 375 "MachineIndependent/glslang.y" +#line 377 "MachineIndependent/glslang.y" { parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "unsigned literal"); (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).u, (yyvsp[0].lex).loc, true); } -#line 5254 "MachineIndependent/glslang_tab.cpp" +#line 5294 "MachineIndependent/glslang_tab.cpp" break; case 8: /* primary_expression: BOOLCONSTANT */ -#line 379 "MachineIndependent/glslang.y" +#line 381 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).b, (yyvsp[0].lex).loc, true); } -#line 5262 "MachineIndependent/glslang_tab.cpp" +#line 5302 "MachineIndependent/glslang_tab.cpp" break; case 9: /* primary_expression: STRING_LITERAL */ -#line 382 "MachineIndependent/glslang.y" +#line 384 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).string, (yyvsp[0].lex).loc, true); } -#line 5270 "MachineIndependent/glslang_tab.cpp" +#line 5310 "MachineIndependent/glslang_tab.cpp" break; case 10: /* primary_expression: INT32CONSTANT */ -#line 385 "MachineIndependent/glslang.y" +#line 387 "MachineIndependent/glslang.y" { 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 5279 "MachineIndependent/glslang_tab.cpp" +#line 5319 "MachineIndependent/glslang_tab.cpp" break; case 11: /* primary_expression: UINT32CONSTANT */ -#line 389 "MachineIndependent/glslang.y" +#line 391 "MachineIndependent/glslang.y" { 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 5288 "MachineIndependent/glslang_tab.cpp" +#line 5328 "MachineIndependent/glslang_tab.cpp" break; case 12: /* primary_expression: INT64CONSTANT */ -#line 393 "MachineIndependent/glslang.y" +#line 395 "MachineIndependent/glslang.y" { 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 5297 "MachineIndependent/glslang_tab.cpp" +#line 5337 "MachineIndependent/glslang_tab.cpp" break; case 13: /* primary_expression: UINT64CONSTANT */ -#line 397 "MachineIndependent/glslang.y" +#line 399 "MachineIndependent/glslang.y" { 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 5306 "MachineIndependent/glslang_tab.cpp" +#line 5346 "MachineIndependent/glslang_tab.cpp" break; case 14: /* primary_expression: INT16CONSTANT */ -#line 401 "MachineIndependent/glslang.y" +#line 403 "MachineIndependent/glslang.y" { 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 5315 "MachineIndependent/glslang_tab.cpp" +#line 5355 "MachineIndependent/glslang_tab.cpp" break; case 15: /* primary_expression: UINT16CONSTANT */ -#line 405 "MachineIndependent/glslang.y" +#line 407 "MachineIndependent/glslang.y" { 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 5324 "MachineIndependent/glslang_tab.cpp" +#line 5364 "MachineIndependent/glslang_tab.cpp" break; case 16: /* primary_expression: DOUBLECONSTANT */ -#line 409 "MachineIndependent/glslang.y" +#line 411 "MachineIndependent/glslang.y" { 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 5335 "MachineIndependent/glslang_tab.cpp" +#line 5375 "MachineIndependent/glslang_tab.cpp" break; case 17: /* primary_expression: FLOAT16CONSTANT */ -#line 415 "MachineIndependent/glslang.y" +#line 417 "MachineIndependent/glslang.y" { 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 5344 "MachineIndependent/glslang_tab.cpp" +#line 5384 "MachineIndependent/glslang_tab.cpp" break; case 18: /* postfix_expression: primary_expression */ -#line 422 "MachineIndependent/glslang.y" +#line 424 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 5352 "MachineIndependent/glslang_tab.cpp" +#line 5392 "MachineIndependent/glslang_tab.cpp" break; case 19: /* postfix_expression: postfix_expression LEFT_BRACKET integer_expression RIGHT_BRACKET */ -#line 425 "MachineIndependent/glslang.y" +#line 427 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = parseContext.handleBracketDereference((yyvsp[-2].lex).loc, (yyvsp[-3].interm.intermTypedNode), (yyvsp[-1].interm.intermTypedNode)); } -#line 5360 "MachineIndependent/glslang_tab.cpp" +#line 5400 "MachineIndependent/glslang_tab.cpp" break; case 20: /* postfix_expression: function_call */ -#line 428 "MachineIndependent/glslang.y" +#line 430 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 5368 "MachineIndependent/glslang_tab.cpp" +#line 5408 "MachineIndependent/glslang_tab.cpp" break; case 21: /* postfix_expression: postfix_expression DOT IDENTIFIER */ -#line 431 "MachineIndependent/glslang.y" +#line 433 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = parseContext.handleDotDereference((yyvsp[0].lex).loc, (yyvsp[-2].interm.intermTypedNode), *(yyvsp[0].lex).string); } -#line 5376 "MachineIndependent/glslang_tab.cpp" +#line 5416 "MachineIndependent/glslang_tab.cpp" break; case 22: /* postfix_expression: postfix_expression INC_OP */ -#line 434 "MachineIndependent/glslang.y" +#line 436 "MachineIndependent/glslang.y" { 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 5386 "MachineIndependent/glslang_tab.cpp" +#line 5426 "MachineIndependent/glslang_tab.cpp" break; case 23: /* postfix_expression: postfix_expression DEC_OP */ -#line 439 "MachineIndependent/glslang.y" +#line 441 "MachineIndependent/glslang.y" { 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 5396 "MachineIndependent/glslang_tab.cpp" +#line 5436 "MachineIndependent/glslang_tab.cpp" break; case 24: /* integer_expression: expression */ -#line 447 "MachineIndependent/glslang.y" +#line 449 "MachineIndependent/glslang.y" { parseContext.integerCheck((yyvsp[0].interm.intermTypedNode), "[]"); (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 5405 "MachineIndependent/glslang_tab.cpp" +#line 5445 "MachineIndependent/glslang_tab.cpp" break; case 25: /* function_call: function_call_or_method */ -#line 454 "MachineIndependent/glslang.y" +#line 456 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = parseContext.handleFunctionCall((yyvsp[0].interm).loc, (yyvsp[0].interm).function, (yyvsp[0].interm).intermNode); delete (yyvsp[0].interm).function; } -#line 5414 "MachineIndependent/glslang_tab.cpp" +#line 5454 "MachineIndependent/glslang_tab.cpp" break; case 26: /* function_call_or_method: function_call_generic */ -#line 461 "MachineIndependent/glslang.y" +#line 463 "MachineIndependent/glslang.y" { (yyval.interm) = (yyvsp[0].interm); } -#line 5422 "MachineIndependent/glslang_tab.cpp" +#line 5462 "MachineIndependent/glslang_tab.cpp" break; case 27: /* function_call_generic: function_call_header_with_parameters RIGHT_PAREN */ -#line 467 "MachineIndependent/glslang.y" +#line 469 "MachineIndependent/glslang.y" { (yyval.interm) = (yyvsp[-1].interm); (yyval.interm).loc = (yyvsp[0].lex).loc; } -#line 5431 "MachineIndependent/glslang_tab.cpp" +#line 5471 "MachineIndependent/glslang_tab.cpp" break; case 28: /* function_call_generic: function_call_header_no_parameters RIGHT_PAREN */ -#line 471 "MachineIndependent/glslang.y" +#line 473 "MachineIndependent/glslang.y" { (yyval.interm) = (yyvsp[-1].interm); (yyval.interm).loc = (yyvsp[0].lex).loc; } -#line 5440 "MachineIndependent/glslang_tab.cpp" +#line 5480 "MachineIndependent/glslang_tab.cpp" break; case 29: /* function_call_header_no_parameters: function_call_header VOID */ -#line 478 "MachineIndependent/glslang.y" +#line 480 "MachineIndependent/glslang.y" { (yyval.interm) = (yyvsp[-1].interm); } -#line 5448 "MachineIndependent/glslang_tab.cpp" +#line 5488 "MachineIndependent/glslang_tab.cpp" break; case 30: /* function_call_header_no_parameters: function_call_header */ -#line 481 "MachineIndependent/glslang.y" +#line 483 "MachineIndependent/glslang.y" { (yyval.interm) = (yyvsp[0].interm); } -#line 5456 "MachineIndependent/glslang_tab.cpp" +#line 5496 "MachineIndependent/glslang_tab.cpp" break; case 31: /* function_call_header_with_parameters: function_call_header assignment_expression */ -#line 487 "MachineIndependent/glslang.y" +#line 489 "MachineIndependent/glslang.y" { if (parseContext.spvVersion.vulkan > 0 && parseContext.spvVersion.vulkanRelaxed @@ -5475,11 +5515,11 @@ yyreduce: (yyval.interm).intermNode = (yyvsp[0].interm.intermTypedNode); } } -#line 5479 "MachineIndependent/glslang_tab.cpp" +#line 5519 "MachineIndependent/glslang_tab.cpp" break; case 32: /* function_call_header_with_parameters: function_call_header_with_parameters COMMA assignment_expression */ -#line 505 "MachineIndependent/glslang.y" +#line 507 "MachineIndependent/glslang.y" { if (parseContext.spvVersion.vulkan > 0 && parseContext.spvVersion.vulkanRelaxed @@ -5502,29 +5542,29 @@ yyreduce: (yyval.interm).intermNode = parseContext.intermediate.growAggregate((yyvsp[-2].interm).intermNode, (yyvsp[0].interm.intermTypedNode), (yyvsp[-1].lex).loc); } } -#line 5506 "MachineIndependent/glslang_tab.cpp" +#line 5546 "MachineIndependent/glslang_tab.cpp" break; case 33: /* function_call_header: function_identifier LEFT_PAREN */ -#line 530 "MachineIndependent/glslang.y" +#line 532 "MachineIndependent/glslang.y" { (yyval.interm) = (yyvsp[-1].interm); } -#line 5514 "MachineIndependent/glslang_tab.cpp" +#line 5554 "MachineIndependent/glslang_tab.cpp" break; case 34: /* function_identifier: type_specifier */ -#line 538 "MachineIndependent/glslang.y" +#line 540 "MachineIndependent/glslang.y" { // Constructor (yyval.interm).intermNode = 0; (yyval.interm).function = parseContext.handleConstructorCall((yyvsp[0].interm.type).loc, (yyvsp[0].interm.type)); } -#line 5524 "MachineIndependent/glslang_tab.cpp" +#line 5564 "MachineIndependent/glslang_tab.cpp" break; case 35: /* function_identifier: postfix_expression */ -#line 543 "MachineIndependent/glslang.y" +#line 545 "MachineIndependent/glslang.y" { // // Should be a method or subroutine call, but we haven't recognized the arguments yet. @@ -5552,50 +5592,50 @@ yyreduce: (yyval.interm).function = new TFunction(empty, TType(EbtVoid), EOpNull); } } -#line 5556 "MachineIndependent/glslang_tab.cpp" +#line 5596 "MachineIndependent/glslang_tab.cpp" break; case 36: /* function_identifier: non_uniform_qualifier */ -#line 570 "MachineIndependent/glslang.y" +#line 572 "MachineIndependent/glslang.y" { // Constructor (yyval.interm).intermNode = 0; (yyval.interm).function = parseContext.handleConstructorCall((yyvsp[0].interm.type).loc, (yyvsp[0].interm.type)); } -#line 5566 "MachineIndependent/glslang_tab.cpp" +#line 5606 "MachineIndependent/glslang_tab.cpp" break; case 37: /* unary_expression: postfix_expression */ -#line 578 "MachineIndependent/glslang.y" +#line 580 "MachineIndependent/glslang.y" { 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 5577 "MachineIndependent/glslang_tab.cpp" +#line 5617 "MachineIndependent/glslang_tab.cpp" break; case 38: /* unary_expression: INC_OP unary_expression */ -#line 584 "MachineIndependent/glslang.y" +#line 586 "MachineIndependent/glslang.y" { 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 5586 "MachineIndependent/glslang_tab.cpp" +#line 5626 "MachineIndependent/glslang_tab.cpp" break; case 39: /* unary_expression: DEC_OP unary_expression */ -#line 588 "MachineIndependent/glslang.y" +#line 590 "MachineIndependent/glslang.y" { 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 5595 "MachineIndependent/glslang_tab.cpp" +#line 5635 "MachineIndependent/glslang_tab.cpp" break; case 40: /* unary_expression: unary_operator unary_expression */ -#line 592 "MachineIndependent/glslang.y" +#line 594 "MachineIndependent/glslang.y" { if ((yyvsp[-1].interm).op != EOpNull) { char errorOp[2] = {0, 0}; @@ -5612,179 +5652,179 @@ yyreduce: (yyval.interm.intermTypedNode)->getAsConstantUnion()->setExpression(); } } -#line 5616 "MachineIndependent/glslang_tab.cpp" +#line 5656 "MachineIndependent/glslang_tab.cpp" break; case 41: /* unary_operator: PLUS */ -#line 612 "MachineIndependent/glslang.y" +#line 614 "MachineIndependent/glslang.y" { (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpNull; } -#line 5622 "MachineIndependent/glslang_tab.cpp" +#line 5662 "MachineIndependent/glslang_tab.cpp" break; case 42: /* unary_operator: DASH */ -#line 613 "MachineIndependent/glslang.y" +#line 615 "MachineIndependent/glslang.y" { (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpNegative; } -#line 5628 "MachineIndependent/glslang_tab.cpp" +#line 5668 "MachineIndependent/glslang_tab.cpp" break; case 43: /* unary_operator: BANG */ -#line 614 "MachineIndependent/glslang.y" +#line 616 "MachineIndependent/glslang.y" { (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpLogicalNot; } -#line 5634 "MachineIndependent/glslang_tab.cpp" +#line 5674 "MachineIndependent/glslang_tab.cpp" break; case 44: /* unary_operator: TILDE */ -#line 615 "MachineIndependent/glslang.y" +#line 617 "MachineIndependent/glslang.y" { (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpBitwiseNot; parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "bitwise not"); } -#line 5641 "MachineIndependent/glslang_tab.cpp" +#line 5681 "MachineIndependent/glslang_tab.cpp" break; case 45: /* multiplicative_expression: unary_expression */ -#line 621 "MachineIndependent/glslang.y" +#line 623 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 5647 "MachineIndependent/glslang_tab.cpp" +#line 5687 "MachineIndependent/glslang_tab.cpp" break; case 46: /* multiplicative_expression: multiplicative_expression STAR unary_expression */ -#line 622 "MachineIndependent/glslang.y" +#line 624 "MachineIndependent/glslang.y" { (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 5657 "MachineIndependent/glslang_tab.cpp" +#line 5697 "MachineIndependent/glslang_tab.cpp" break; case 47: /* multiplicative_expression: multiplicative_expression SLASH unary_expression */ -#line 627 "MachineIndependent/glslang.y" +#line 629 "MachineIndependent/glslang.y" { (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 5667 "MachineIndependent/glslang_tab.cpp" +#line 5707 "MachineIndependent/glslang_tab.cpp" break; case 48: /* multiplicative_expression: multiplicative_expression PERCENT unary_expression */ -#line 632 "MachineIndependent/glslang.y" +#line 634 "MachineIndependent/glslang.y" { 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 5678 "MachineIndependent/glslang_tab.cpp" +#line 5718 "MachineIndependent/glslang_tab.cpp" break; case 49: /* additive_expression: multiplicative_expression */ -#line 641 "MachineIndependent/glslang.y" +#line 643 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 5684 "MachineIndependent/glslang_tab.cpp" +#line 5724 "MachineIndependent/glslang_tab.cpp" break; case 50: /* additive_expression: additive_expression PLUS multiplicative_expression */ -#line 642 "MachineIndependent/glslang.y" +#line 644 "MachineIndependent/glslang.y" { (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 5694 "MachineIndependent/glslang_tab.cpp" +#line 5734 "MachineIndependent/glslang_tab.cpp" break; case 51: /* additive_expression: additive_expression DASH multiplicative_expression */ -#line 647 "MachineIndependent/glslang.y" +#line 649 "MachineIndependent/glslang.y" { (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 5704 "MachineIndependent/glslang_tab.cpp" +#line 5744 "MachineIndependent/glslang_tab.cpp" break; case 52: /* shift_expression: additive_expression */ -#line 655 "MachineIndependent/glslang.y" +#line 657 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 5710 "MachineIndependent/glslang_tab.cpp" +#line 5750 "MachineIndependent/glslang_tab.cpp" break; case 53: /* shift_expression: shift_expression LEFT_OP additive_expression */ -#line 656 "MachineIndependent/glslang.y" +#line 658 "MachineIndependent/glslang.y" { 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 5721 "MachineIndependent/glslang_tab.cpp" +#line 5761 "MachineIndependent/glslang_tab.cpp" break; case 54: /* shift_expression: shift_expression RIGHT_OP additive_expression */ -#line 662 "MachineIndependent/glslang.y" +#line 664 "MachineIndependent/glslang.y" { 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 5732 "MachineIndependent/glslang_tab.cpp" +#line 5772 "MachineIndependent/glslang_tab.cpp" break; case 55: /* relational_expression: shift_expression */ -#line 671 "MachineIndependent/glslang.y" +#line 673 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 5738 "MachineIndependent/glslang_tab.cpp" +#line 5778 "MachineIndependent/glslang_tab.cpp" break; case 56: /* relational_expression: relational_expression LEFT_ANGLE shift_expression */ -#line 672 "MachineIndependent/glslang.y" +#line 674 "MachineIndependent/glslang.y" { (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 5748 "MachineIndependent/glslang_tab.cpp" +#line 5788 "MachineIndependent/glslang_tab.cpp" break; case 57: /* relational_expression: relational_expression RIGHT_ANGLE shift_expression */ -#line 677 "MachineIndependent/glslang.y" +#line 679 "MachineIndependent/glslang.y" { (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 5758 "MachineIndependent/glslang_tab.cpp" +#line 5798 "MachineIndependent/glslang_tab.cpp" break; case 58: /* relational_expression: relational_expression LE_OP shift_expression */ -#line 682 "MachineIndependent/glslang.y" +#line 684 "MachineIndependent/glslang.y" { (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 5768 "MachineIndependent/glslang_tab.cpp" +#line 5808 "MachineIndependent/glslang_tab.cpp" break; case 59: /* relational_expression: relational_expression GE_OP shift_expression */ -#line 687 "MachineIndependent/glslang.y" +#line 689 "MachineIndependent/glslang.y" { (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 5778 "MachineIndependent/glslang_tab.cpp" +#line 5818 "MachineIndependent/glslang_tab.cpp" break; case 60: /* equality_expression: relational_expression */ -#line 695 "MachineIndependent/glslang.y" +#line 697 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 5784 "MachineIndependent/glslang_tab.cpp" +#line 5824 "MachineIndependent/glslang_tab.cpp" break; case 61: /* equality_expression: equality_expression EQ_OP relational_expression */ -#line 696 "MachineIndependent/glslang.y" +#line 698 "MachineIndependent/glslang.y" { parseContext.arrayObjectCheck((yyvsp[-1].lex).loc, (yyvsp[-2].interm.intermTypedNode)->getType(), "array comparison"); parseContext.opaqueCheck((yyvsp[-1].lex).loc, (yyvsp[-2].interm.intermTypedNode)->getType(), "=="); @@ -5794,11 +5834,11 @@ yyreduce: if ((yyval.interm.intermTypedNode) == 0) (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[-1].lex).loc); } -#line 5798 "MachineIndependent/glslang_tab.cpp" +#line 5838 "MachineIndependent/glslang_tab.cpp" break; case 62: /* equality_expression: equality_expression NE_OP relational_expression */ -#line 705 "MachineIndependent/glslang.y" +#line 707 "MachineIndependent/glslang.y" { parseContext.arrayObjectCheck((yyvsp[-1].lex).loc, (yyvsp[-2].interm.intermTypedNode)->getType(), "array comparison"); parseContext.opaqueCheck((yyvsp[-1].lex).loc, (yyvsp[-2].interm.intermTypedNode)->getType(), "!="); @@ -5808,124 +5848,124 @@ yyreduce: if ((yyval.interm.intermTypedNode) == 0) (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[-1].lex).loc); } -#line 5812 "MachineIndependent/glslang_tab.cpp" +#line 5852 "MachineIndependent/glslang_tab.cpp" break; case 63: /* and_expression: equality_expression */ -#line 717 "MachineIndependent/glslang.y" +#line 719 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 5818 "MachineIndependent/glslang_tab.cpp" +#line 5858 "MachineIndependent/glslang_tab.cpp" break; case 64: /* and_expression: and_expression AMPERSAND equality_expression */ -#line 718 "MachineIndependent/glslang.y" +#line 720 "MachineIndependent/glslang.y" { 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 5829 "MachineIndependent/glslang_tab.cpp" +#line 5869 "MachineIndependent/glslang_tab.cpp" break; case 65: /* exclusive_or_expression: and_expression */ -#line 727 "MachineIndependent/glslang.y" +#line 729 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 5835 "MachineIndependent/glslang_tab.cpp" +#line 5875 "MachineIndependent/glslang_tab.cpp" break; case 66: /* exclusive_or_expression: exclusive_or_expression CARET and_expression */ -#line 728 "MachineIndependent/glslang.y" +#line 730 "MachineIndependent/glslang.y" { 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 5846 "MachineIndependent/glslang_tab.cpp" +#line 5886 "MachineIndependent/glslang_tab.cpp" break; case 67: /* inclusive_or_expression: exclusive_or_expression */ -#line 737 "MachineIndependent/glslang.y" +#line 739 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 5852 "MachineIndependent/glslang_tab.cpp" +#line 5892 "MachineIndependent/glslang_tab.cpp" break; case 68: /* inclusive_or_expression: inclusive_or_expression VERTICAL_BAR exclusive_or_expression */ -#line 738 "MachineIndependent/glslang.y" +#line 740 "MachineIndependent/glslang.y" { 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 5863 "MachineIndependent/glslang_tab.cpp" +#line 5903 "MachineIndependent/glslang_tab.cpp" break; case 69: /* logical_and_expression: inclusive_or_expression */ -#line 747 "MachineIndependent/glslang.y" +#line 749 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 5869 "MachineIndependent/glslang_tab.cpp" +#line 5909 "MachineIndependent/glslang_tab.cpp" break; case 70: /* logical_and_expression: logical_and_expression AND_OP inclusive_or_expression */ -#line 748 "MachineIndependent/glslang.y" +#line 750 "MachineIndependent/glslang.y" { (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 5879 "MachineIndependent/glslang_tab.cpp" +#line 5919 "MachineIndependent/glslang_tab.cpp" break; case 71: /* logical_xor_expression: logical_and_expression */ -#line 756 "MachineIndependent/glslang.y" +#line 758 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 5885 "MachineIndependent/glslang_tab.cpp" +#line 5925 "MachineIndependent/glslang_tab.cpp" break; case 72: /* logical_xor_expression: logical_xor_expression XOR_OP logical_and_expression */ -#line 757 "MachineIndependent/glslang.y" +#line 759 "MachineIndependent/glslang.y" { (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 5895 "MachineIndependent/glslang_tab.cpp" +#line 5935 "MachineIndependent/glslang_tab.cpp" break; case 73: /* logical_or_expression: logical_xor_expression */ -#line 765 "MachineIndependent/glslang.y" +#line 767 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 5901 "MachineIndependent/glslang_tab.cpp" +#line 5941 "MachineIndependent/glslang_tab.cpp" break; case 74: /* logical_or_expression: logical_or_expression OR_OP logical_xor_expression */ -#line 766 "MachineIndependent/glslang.y" +#line 768 "MachineIndependent/glslang.y" { (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 5911 "MachineIndependent/glslang_tab.cpp" +#line 5951 "MachineIndependent/glslang_tab.cpp" break; case 75: /* conditional_expression: logical_or_expression */ -#line 774 "MachineIndependent/glslang.y" +#line 776 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 5917 "MachineIndependent/glslang_tab.cpp" +#line 5957 "MachineIndependent/glslang_tab.cpp" break; case 76: /* $@1: %empty */ -#line 775 "MachineIndependent/glslang.y" +#line 777 "MachineIndependent/glslang.y" { ++parseContext.controlFlowNestingLevel; } -#line 5925 "MachineIndependent/glslang_tab.cpp" +#line 5965 "MachineIndependent/glslang_tab.cpp" break; case 77: /* conditional_expression: logical_or_expression QUESTION $@1 expression COLON assignment_expression */ -#line 778 "MachineIndependent/glslang.y" +#line 780 "MachineIndependent/glslang.y" { --parseContext.controlFlowNestingLevel; parseContext.boolCheck((yyvsp[-4].lex).loc, (yyvsp[-5].interm.intermTypedNode)); @@ -5938,17 +5978,17 @@ yyreduce: (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } } -#line 5942 "MachineIndependent/glslang_tab.cpp" +#line 5982 "MachineIndependent/glslang_tab.cpp" break; case 78: /* assignment_expression: conditional_expression */ -#line 793 "MachineIndependent/glslang.y" +#line 795 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 5948 "MachineIndependent/glslang_tab.cpp" +#line 5988 "MachineIndependent/glslang_tab.cpp" break; case 79: /* assignment_expression: unary_expression assignment_operator assignment_expression */ -#line 794 "MachineIndependent/glslang.y" +#line 796 "MachineIndependent/glslang.y" { parseContext.arrayObjectCheck((yyvsp[-1].interm).loc, (yyvsp[-2].interm.intermTypedNode)->getType(), "array assignment"); parseContext.opaqueCheck((yyvsp[-1].interm).loc, (yyvsp[-2].interm.intermTypedNode)->getType(), "="); @@ -5962,119 +6002,119 @@ yyreduce: (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode); } } -#line 5966 "MachineIndependent/glslang_tab.cpp" +#line 6006 "MachineIndependent/glslang_tab.cpp" break; case 80: /* assignment_operator: EQUAL */ -#line 810 "MachineIndependent/glslang.y" +#line 812 "MachineIndependent/glslang.y" { (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpAssign; } -#line 5975 "MachineIndependent/glslang_tab.cpp" +#line 6015 "MachineIndependent/glslang_tab.cpp" break; case 81: /* assignment_operator: MUL_ASSIGN */ -#line 814 "MachineIndependent/glslang.y" +#line 816 "MachineIndependent/glslang.y" { (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpMulAssign; } -#line 5984 "MachineIndependent/glslang_tab.cpp" +#line 6024 "MachineIndependent/glslang_tab.cpp" break; case 82: /* assignment_operator: DIV_ASSIGN */ -#line 818 "MachineIndependent/glslang.y" +#line 820 "MachineIndependent/glslang.y" { (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpDivAssign; } -#line 5993 "MachineIndependent/glslang_tab.cpp" +#line 6033 "MachineIndependent/glslang_tab.cpp" break; case 83: /* assignment_operator: MOD_ASSIGN */ -#line 822 "MachineIndependent/glslang.y" +#line 824 "MachineIndependent/glslang.y" { parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "%="); (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpModAssign; } -#line 6003 "MachineIndependent/glslang_tab.cpp" +#line 6043 "MachineIndependent/glslang_tab.cpp" break; case 84: /* assignment_operator: ADD_ASSIGN */ -#line 827 "MachineIndependent/glslang.y" +#line 829 "MachineIndependent/glslang.y" { (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpAddAssign; } -#line 6012 "MachineIndependent/glslang_tab.cpp" +#line 6052 "MachineIndependent/glslang_tab.cpp" break; case 85: /* assignment_operator: SUB_ASSIGN */ -#line 831 "MachineIndependent/glslang.y" +#line 833 "MachineIndependent/glslang.y" { (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpSubAssign; } -#line 6021 "MachineIndependent/glslang_tab.cpp" +#line 6061 "MachineIndependent/glslang_tab.cpp" break; case 86: /* assignment_operator: LEFT_ASSIGN */ -#line 835 "MachineIndependent/glslang.y" +#line 837 "MachineIndependent/glslang.y" { parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "bit-shift left assign"); (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpLeftShiftAssign; } -#line 6030 "MachineIndependent/glslang_tab.cpp" +#line 6070 "MachineIndependent/glslang_tab.cpp" break; case 87: /* assignment_operator: RIGHT_ASSIGN */ -#line 839 "MachineIndependent/glslang.y" +#line 841 "MachineIndependent/glslang.y" { parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "bit-shift right assign"); (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpRightShiftAssign; } -#line 6039 "MachineIndependent/glslang_tab.cpp" +#line 6079 "MachineIndependent/glslang_tab.cpp" break; case 88: /* assignment_operator: AND_ASSIGN */ -#line 843 "MachineIndependent/glslang.y" +#line 845 "MachineIndependent/glslang.y" { parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "bitwise-and assign"); (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpAndAssign; } -#line 6048 "MachineIndependent/glslang_tab.cpp" +#line 6088 "MachineIndependent/glslang_tab.cpp" break; case 89: /* assignment_operator: XOR_ASSIGN */ -#line 847 "MachineIndependent/glslang.y" +#line 849 "MachineIndependent/glslang.y" { parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "bitwise-xor assign"); (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpExclusiveOrAssign; } -#line 6057 "MachineIndependent/glslang_tab.cpp" +#line 6097 "MachineIndependent/glslang_tab.cpp" break; case 90: /* assignment_operator: OR_ASSIGN */ -#line 851 "MachineIndependent/glslang.y" +#line 853 "MachineIndependent/glslang.y" { parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "bitwise-or assign"); (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpInclusiveOrAssign; } -#line 6066 "MachineIndependent/glslang_tab.cpp" +#line 6106 "MachineIndependent/glslang_tab.cpp" break; case 91: /* expression: assignment_expression */ -#line 858 "MachineIndependent/glslang.y" +#line 860 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 6074 "MachineIndependent/glslang_tab.cpp" +#line 6114 "MachineIndependent/glslang_tab.cpp" break; case 92: /* expression: expression COMMA assignment_expression */ -#line 861 "MachineIndependent/glslang.y" +#line 863 "MachineIndependent/glslang.y" { 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); @@ -6083,30 +6123,30 @@ yyreduce: (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } } -#line 6087 "MachineIndependent/glslang_tab.cpp" +#line 6127 "MachineIndependent/glslang_tab.cpp" break; case 93: /* constant_expression: conditional_expression */ -#line 872 "MachineIndependent/glslang.y" +#line 874 "MachineIndependent/glslang.y" { parseContext.constantValueCheck((yyvsp[0].interm.intermTypedNode), ""); (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 6096 "MachineIndependent/glslang_tab.cpp" +#line 6136 "MachineIndependent/glslang_tab.cpp" break; case 94: /* declaration: function_prototype SEMICOLON */ -#line 879 "MachineIndependent/glslang.y" +#line 881 "MachineIndependent/glslang.y" { 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 6106 "MachineIndependent/glslang_tab.cpp" +#line 6146 "MachineIndependent/glslang_tab.cpp" break; case 95: /* declaration: spirv_instruction_qualifier function_prototype SEMICOLON */ -#line 884 "MachineIndependent/glslang.y" +#line 886 "MachineIndependent/glslang.y" { parseContext.requireExtensions((yyvsp[-1].interm).loc, 1, &E_GL_EXT_spirv_intrinsics, "SPIR-V instruction qualifier"); (yyvsp[-1].interm).function->setSpirvInstruction(*(yyvsp[-2].interm.spirvInst)); // Attach SPIR-V intruction qualifier @@ -6114,31 +6154,31 @@ yyreduce: (yyval.interm.intermNode) = 0; // TODO: 4.0 functionality: subroutines: make the identifier a user type for this signature } -#line 6118 "MachineIndependent/glslang_tab.cpp" +#line 6158 "MachineIndependent/glslang_tab.cpp" break; case 96: /* declaration: spirv_execution_mode_qualifier SEMICOLON */ -#line 891 "MachineIndependent/glslang.y" +#line 893 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "SPIR-V execution mode qualifier"); parseContext.requireExtensions((yyvsp[0].lex).loc, 1, &E_GL_EXT_spirv_intrinsics, "SPIR-V execution mode qualifier"); (yyval.interm.intermNode) = 0; } -#line 6128 "MachineIndependent/glslang_tab.cpp" +#line 6168 "MachineIndependent/glslang_tab.cpp" break; case 97: /* declaration: init_declarator_list SEMICOLON */ -#line 896 "MachineIndependent/glslang.y" +#line 898 "MachineIndependent/glslang.y" { 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 6138 "MachineIndependent/glslang_tab.cpp" +#line 6178 "MachineIndependent/glslang_tab.cpp" break; case 98: /* declaration: PRECISION precision_qualifier type_specifier SEMICOLON */ -#line 901 "MachineIndependent/glslang.y" +#line 903 "MachineIndependent/glslang.y" { 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 @@ -6146,75 +6186,75 @@ yyreduce: parseContext.setDefaultPrecision((yyvsp[-3].lex).loc, (yyvsp[-1].interm.type), (yyvsp[-2].interm.type).qualifier.precision); (yyval.interm.intermNode) = 0; } -#line 6150 "MachineIndependent/glslang_tab.cpp" +#line 6190 "MachineIndependent/glslang_tab.cpp" break; case 99: /* declaration: block_structure SEMICOLON */ -#line 908 "MachineIndependent/glslang.y" +#line 910 "MachineIndependent/glslang.y" { parseContext.declareBlock((yyvsp[-1].interm).loc, *(yyvsp[-1].interm).typeList); (yyval.interm.intermNode) = 0; } -#line 6159 "MachineIndependent/glslang_tab.cpp" +#line 6199 "MachineIndependent/glslang_tab.cpp" break; case 100: /* declaration: block_structure IDENTIFIER SEMICOLON */ -#line 912 "MachineIndependent/glslang.y" +#line 914 "MachineIndependent/glslang.y" { parseContext.declareBlock((yyvsp[-2].interm).loc, *(yyvsp[-2].interm).typeList, (yyvsp[-1].lex).string); (yyval.interm.intermNode) = 0; } -#line 6168 "MachineIndependent/glslang_tab.cpp" +#line 6208 "MachineIndependent/glslang_tab.cpp" break; case 101: /* declaration: block_structure IDENTIFIER array_specifier SEMICOLON */ -#line 916 "MachineIndependent/glslang.y" +#line 918 "MachineIndependent/glslang.y" { parseContext.declareBlock((yyvsp[-3].interm).loc, *(yyvsp[-3].interm).typeList, (yyvsp[-2].lex).string, (yyvsp[-1].interm).arraySizes); (yyval.interm.intermNode) = 0; } -#line 6177 "MachineIndependent/glslang_tab.cpp" +#line 6217 "MachineIndependent/glslang_tab.cpp" break; case 102: /* declaration: type_qualifier SEMICOLON */ -#line 920 "MachineIndependent/glslang.y" +#line 922 "MachineIndependent/glslang.y" { 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 6187 "MachineIndependent/glslang_tab.cpp" +#line 6227 "MachineIndependent/glslang_tab.cpp" break; case 103: /* declaration: type_qualifier IDENTIFIER SEMICOLON */ -#line 925 "MachineIndependent/glslang.y" +#line 927 "MachineIndependent/glslang.y" { 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 6197 "MachineIndependent/glslang_tab.cpp" +#line 6237 "MachineIndependent/glslang_tab.cpp" break; case 104: /* declaration: type_qualifier IDENTIFIER identifier_list SEMICOLON */ -#line 930 "MachineIndependent/glslang.y" +#line 932 "MachineIndependent/glslang.y" { 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 6208 "MachineIndependent/glslang_tab.cpp" +#line 6248 "MachineIndependent/glslang_tab.cpp" break; case 105: /* $@2: %empty */ -#line 939 "MachineIndependent/glslang.y" +#line 941 "MachineIndependent/glslang.y" { parseContext.nestedBlockCheck((yyvsp[-2].interm.type).loc); } -#line 6214 "MachineIndependent/glslang_tab.cpp" +#line 6254 "MachineIndependent/glslang_tab.cpp" break; case 106: /* block_structure: type_qualifier IDENTIFIER LEFT_BRACE $@2 struct_declaration_list RIGHT_BRACE */ -#line 939 "MachineIndependent/glslang.y" +#line 941 "MachineIndependent/glslang.y" { --parseContext.blockNestingLevel; parseContext.blockName = (yyvsp[-4].lex).string; @@ -6224,39 +6264,39 @@ yyreduce: (yyval.interm).loc = (yyvsp[-5].interm.type).loc; (yyval.interm).typeList = (yyvsp[-1].interm.typeList); } -#line 6228 "MachineIndependent/glslang_tab.cpp" +#line 6268 "MachineIndependent/glslang_tab.cpp" break; case 107: /* identifier_list: COMMA IDENTIFIER */ -#line 950 "MachineIndependent/glslang.y" +#line 952 "MachineIndependent/glslang.y" { (yyval.interm.identifierList) = new TIdentifierList; (yyval.interm.identifierList)->push_back((yyvsp[0].lex).string); } -#line 6237 "MachineIndependent/glslang_tab.cpp" +#line 6277 "MachineIndependent/glslang_tab.cpp" break; case 108: /* identifier_list: identifier_list COMMA IDENTIFIER */ -#line 954 "MachineIndependent/glslang.y" +#line 956 "MachineIndependent/glslang.y" { (yyval.interm.identifierList) = (yyvsp[-2].interm.identifierList); (yyval.interm.identifierList)->push_back((yyvsp[0].lex).string); } -#line 6246 "MachineIndependent/glslang_tab.cpp" +#line 6286 "MachineIndependent/glslang_tab.cpp" break; case 109: /* function_prototype: function_declarator RIGHT_PAREN */ -#line 961 "MachineIndependent/glslang.y" +#line 963 "MachineIndependent/glslang.y" { (yyval.interm).function = (yyvsp[-1].interm.function); if (parseContext.compileOnly) (yyval.interm).function->setExport(); (yyval.interm).loc = (yyvsp[0].lex).loc; } -#line 6256 "MachineIndependent/glslang_tab.cpp" +#line 6296 "MachineIndependent/glslang_tab.cpp" break; case 110: /* function_prototype: function_declarator RIGHT_PAREN attribute */ -#line 966 "MachineIndependent/glslang.y" +#line 968 "MachineIndependent/glslang.y" { (yyval.interm).function = (yyvsp[-2].interm.function); if (parseContext.compileOnly) (yyval.interm).function->setExport(); @@ -6265,11 +6305,11 @@ yyreduce: parseContext.requireExtensions((yyvsp[-1].lex).loc, 2, extensions, "attribute"); parseContext.handleFunctionAttributes((yyvsp[-1].lex).loc, *(yyvsp[0].interm.attributes)); } -#line 6269 "MachineIndependent/glslang_tab.cpp" +#line 6309 "MachineIndependent/glslang_tab.cpp" break; case 111: /* function_prototype: attribute function_declarator RIGHT_PAREN */ -#line 974 "MachineIndependent/glslang.y" +#line 976 "MachineIndependent/glslang.y" { (yyval.interm).function = (yyvsp[-1].interm.function); if (parseContext.compileOnly) (yyval.interm).function->setExport(); @@ -6278,11 +6318,11 @@ yyreduce: parseContext.requireExtensions((yyvsp[0].lex).loc, 2, extensions, "attribute"); parseContext.handleFunctionAttributes((yyvsp[0].lex).loc, *(yyvsp[-2].interm.attributes)); } -#line 6282 "MachineIndependent/glslang_tab.cpp" +#line 6322 "MachineIndependent/glslang_tab.cpp" break; case 112: /* function_prototype: attribute function_declarator RIGHT_PAREN attribute */ -#line 982 "MachineIndependent/glslang.y" +#line 984 "MachineIndependent/glslang.y" { (yyval.interm).function = (yyvsp[-2].interm.function); if (parseContext.compileOnly) (yyval.interm).function->setExport(); @@ -6292,27 +6332,27 @@ yyreduce: parseContext.handleFunctionAttributes((yyvsp[-1].lex).loc, *(yyvsp[-3].interm.attributes)); parseContext.handleFunctionAttributes((yyvsp[-1].lex).loc, *(yyvsp[0].interm.attributes)); } -#line 6296 "MachineIndependent/glslang_tab.cpp" +#line 6336 "MachineIndependent/glslang_tab.cpp" break; case 113: /* function_declarator: function_header */ -#line 994 "MachineIndependent/glslang.y" +#line 996 "MachineIndependent/glslang.y" { (yyval.interm.function) = (yyvsp[0].interm.function); } -#line 6304 "MachineIndependent/glslang_tab.cpp" +#line 6344 "MachineIndependent/glslang_tab.cpp" break; case 114: /* function_declarator: function_header_with_parameters */ -#line 997 "MachineIndependent/glslang.y" +#line 999 "MachineIndependent/glslang.y" { (yyval.interm.function) = (yyvsp[0].interm.function); } -#line 6312 "MachineIndependent/glslang_tab.cpp" +#line 6352 "MachineIndependent/glslang_tab.cpp" break; case 115: /* function_header_with_parameters: function_header parameter_declaration */ -#line 1004 "MachineIndependent/glslang.y" +#line 1006 "MachineIndependent/glslang.y" { // Add the parameter (yyval.interm.function) = (yyvsp[-1].interm.function); @@ -6326,11 +6366,11 @@ yyreduce: else delete (yyvsp[0].interm).param.type; } -#line 6330 "MachineIndependent/glslang_tab.cpp" +#line 6370 "MachineIndependent/glslang_tab.cpp" break; case 116: /* function_header_with_parameters: function_header_with_parameters COMMA parameter_declaration */ -#line 1017 "MachineIndependent/glslang.y" +#line 1019 "MachineIndependent/glslang.y" { // // Only first parameter of one-parameter functions can be void @@ -6351,11 +6391,11 @@ yyreduce: parseContext.vkRelaxedRemapFunctionParameter((yyvsp[-2].interm.function), (yyvsp[0].interm).param); } } -#line 6355 "MachineIndependent/glslang_tab.cpp" +#line 6395 "MachineIndependent/glslang_tab.cpp" break; case 117: /* function_header: fully_specified_type IDENTIFIER LEFT_PAREN */ -#line 1040 "MachineIndependent/glslang.y" +#line 1042 "MachineIndependent/glslang.y" { 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", @@ -6375,11 +6415,11 @@ yyreduce: function = new TFunction((yyvsp[-1].lex).string, type); (yyval.interm.function) = function; } -#line 6379 "MachineIndependent/glslang_tab.cpp" +#line 6419 "MachineIndependent/glslang_tab.cpp" break; case 118: /* parameter_declarator: type_specifier IDENTIFIER */ -#line 1063 "MachineIndependent/glslang.y" +#line 1065 "MachineIndependent/glslang.y" { if ((yyvsp[-1].interm.type).arraySizes) { parseContext.profileRequires((yyvsp[-1].interm.type).loc, ENoProfile, 120, E_GL_3DL_array_objects, "arrayed type"); @@ -6395,11 +6435,11 @@ yyreduce: (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).param = param; } -#line 6399 "MachineIndependent/glslang_tab.cpp" +#line 6439 "MachineIndependent/glslang_tab.cpp" break; case 119: /* parameter_declarator: type_specifier IDENTIFIER array_specifier */ -#line 1078 "MachineIndependent/glslang.y" +#line 1080 "MachineIndependent/glslang.y" { if ((yyvsp[-2].interm.type).arraySizes) { parseContext.profileRequires((yyvsp[-2].interm.type).loc, ENoProfile, 120, E_GL_3DL_array_objects, "arrayed type"); @@ -6419,173 +6459,173 @@ yyreduce: (yyval.interm).loc = (yyvsp[-1].lex).loc; (yyval.interm).param = param; } -#line 6423 "MachineIndependent/glslang_tab.cpp" +#line 6463 "MachineIndependent/glslang_tab.cpp" break; case 120: /* parameter_declaration: type_qualifier parameter_declarator */ -#line 1103 "MachineIndependent/glslang.y" +#line 1105 "MachineIndependent/glslang.y" { (yyval.interm) = (yyvsp[0].interm); if ((yyvsp[-1].interm.type).qualifier.precision != EpqNone) (yyval.interm).param.type->getQualifier().precision = (yyvsp[-1].interm.type).qualifier.precision; - parseContext.precisionQualifierCheck((yyval.interm).loc, (yyval.interm).param.type->getBasicType(), (yyval.interm).param.type->getQualifier(), (yyval.interm).param.type->isCoopMat()); + parseContext.precisionQualifierCheck((yyval.interm).loc, (yyval.interm).param.type->getBasicType(), (yyval.interm).param.type->getQualifier(), (yyval.interm).param.type->isCoopMatOrVec()); parseContext.checkNoShaderLayouts((yyvsp[-1].interm.type).loc, (yyvsp[-1].interm.type).shaderQualifiers); 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 6439 "MachineIndependent/glslang_tab.cpp" +#line 6479 "MachineIndependent/glslang_tab.cpp" break; case 121: /* parameter_declaration: parameter_declarator */ -#line 1114 "MachineIndependent/glslang.y" +#line 1116 "MachineIndependent/glslang.y" { (yyval.interm) = (yyvsp[0].interm); parseContext.parameterTypeCheck((yyvsp[0].interm).loc, EvqIn, *(yyvsp[0].interm).param.type); 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(), (yyval.interm).param.type->isCoopMat()); + parseContext.precisionQualifierCheck((yyval.interm).loc, (yyval.interm).param.type->getBasicType(), (yyval.interm).param.type->getQualifier(), (yyval.interm).param.type->isCoopMatOrVec()); } -#line 6451 "MachineIndependent/glslang_tab.cpp" +#line 6491 "MachineIndependent/glslang_tab.cpp" break; case 122: /* parameter_declaration: type_qualifier parameter_type_specifier */ -#line 1124 "MachineIndependent/glslang.y" +#line 1126 "MachineIndependent/glslang.y" { (yyval.interm) = (yyvsp[0].interm); if ((yyvsp[-1].interm.type).qualifier.precision != EpqNone) (yyval.interm).param.type->getQualifier().precision = (yyvsp[-1].interm.type).qualifier.precision; - parseContext.precisionQualifierCheck((yyvsp[-1].interm.type).loc, (yyval.interm).param.type->getBasicType(), (yyval.interm).param.type->getQualifier(), (yyval.interm).param.type->isCoopMat()); + parseContext.precisionQualifierCheck((yyvsp[-1].interm.type).loc, (yyval.interm).param.type->getBasicType(), (yyval.interm).param.type->getQualifier(), (yyval.interm).param.type->isCoopMatOrVec()); parseContext.checkNoShaderLayouts((yyvsp[-1].interm.type).loc, (yyvsp[-1].interm.type).shaderQualifiers); 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 6466 "MachineIndependent/glslang_tab.cpp" +#line 6506 "MachineIndependent/glslang_tab.cpp" break; case 123: /* parameter_declaration: parameter_type_specifier */ -#line 1134 "MachineIndependent/glslang.y" +#line 1136 "MachineIndependent/glslang.y" { (yyval.interm) = (yyvsp[0].interm); parseContext.parameterTypeCheck((yyvsp[0].interm).loc, EvqIn, *(yyvsp[0].interm).param.type); 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(), (yyval.interm).param.type->isCoopMat()); + parseContext.precisionQualifierCheck((yyval.interm).loc, (yyval.interm).param.type->getBasicType(), (yyval.interm).param.type->getQualifier(), (yyval.interm).param.type->isCoopMatOrVec()); } -#line 6478 "MachineIndependent/glslang_tab.cpp" +#line 6518 "MachineIndependent/glslang_tab.cpp" break; case 124: /* parameter_type_specifier: type_specifier */ -#line 1144 "MachineIndependent/glslang.y" +#line 1146 "MachineIndependent/glslang.y" { 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 6489 "MachineIndependent/glslang_tab.cpp" +#line 6529 "MachineIndependent/glslang_tab.cpp" break; case 125: /* init_declarator_list: single_declaration */ -#line 1153 "MachineIndependent/glslang.y" +#line 1155 "MachineIndependent/glslang.y" { (yyval.interm) = (yyvsp[0].interm); } -#line 6497 "MachineIndependent/glslang_tab.cpp" +#line 6537 "MachineIndependent/glslang_tab.cpp" break; case 126: /* init_declarator_list: init_declarator_list COMMA IDENTIFIER */ -#line 1156 "MachineIndependent/glslang.y" +#line 1158 "MachineIndependent/glslang.y" { (yyval.interm) = (yyvsp[-2].interm); parseContext.declareVariable((yyvsp[0].lex).loc, *(yyvsp[0].lex).string, (yyvsp[-2].interm).type); } -#line 6506 "MachineIndependent/glslang_tab.cpp" +#line 6546 "MachineIndependent/glslang_tab.cpp" break; case 127: /* init_declarator_list: init_declarator_list COMMA IDENTIFIER array_specifier */ -#line 1160 "MachineIndependent/glslang.y" +#line 1162 "MachineIndependent/glslang.y" { (yyval.interm) = (yyvsp[-3].interm); parseContext.declareVariable((yyvsp[-1].lex).loc, *(yyvsp[-1].lex).string, (yyvsp[-3].interm).type, (yyvsp[0].interm).arraySizes); } -#line 6515 "MachineIndependent/glslang_tab.cpp" +#line 6555 "MachineIndependent/glslang_tab.cpp" break; case 128: /* init_declarator_list: init_declarator_list COMMA IDENTIFIER array_specifier EQUAL initializer */ -#line 1164 "MachineIndependent/glslang.y" +#line 1166 "MachineIndependent/glslang.y" { (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 6525 "MachineIndependent/glslang_tab.cpp" +#line 6565 "MachineIndependent/glslang_tab.cpp" break; case 129: /* init_declarator_list: init_declarator_list COMMA IDENTIFIER EQUAL initializer */ -#line 1169 "MachineIndependent/glslang.y" +#line 1171 "MachineIndependent/glslang.y" { (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 6535 "MachineIndependent/glslang_tab.cpp" +#line 6575 "MachineIndependent/glslang_tab.cpp" break; case 130: /* single_declaration: fully_specified_type */ -#line 1177 "MachineIndependent/glslang.y" +#line 1179 "MachineIndependent/glslang.y" { (yyval.interm).type = (yyvsp[0].interm.type); (yyval.interm).intermNode = 0; parseContext.declareTypeDefaults((yyval.interm).loc, (yyval.interm).type); } -#line 6545 "MachineIndependent/glslang_tab.cpp" +#line 6585 "MachineIndependent/glslang_tab.cpp" break; case 131: /* single_declaration: fully_specified_type IDENTIFIER */ -#line 1182 "MachineIndependent/glslang.y" +#line 1184 "MachineIndependent/glslang.y" { (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 6555 "MachineIndependent/glslang_tab.cpp" +#line 6595 "MachineIndependent/glslang_tab.cpp" break; case 132: /* single_declaration: fully_specified_type IDENTIFIER array_specifier */ -#line 1187 "MachineIndependent/glslang.y" +#line 1189 "MachineIndependent/glslang.y" { (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 6565 "MachineIndependent/glslang_tab.cpp" +#line 6605 "MachineIndependent/glslang_tab.cpp" break; case 133: /* single_declaration: fully_specified_type IDENTIFIER array_specifier EQUAL initializer */ -#line 1192 "MachineIndependent/glslang.y" +#line 1194 "MachineIndependent/glslang.y" { (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 6575 "MachineIndependent/glslang_tab.cpp" +#line 6615 "MachineIndependent/glslang_tab.cpp" break; case 134: /* single_declaration: fully_specified_type IDENTIFIER EQUAL initializer */ -#line 1197 "MachineIndependent/glslang.y" +#line 1199 "MachineIndependent/glslang.y" { (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 6585 "MachineIndependent/glslang_tab.cpp" +#line 6625 "MachineIndependent/glslang_tab.cpp" break; case 135: /* fully_specified_type: type_specifier */ -#line 1206 "MachineIndependent/glslang.y" +#line 1208 "MachineIndependent/glslang.y" { (yyval.interm.type) = (yyvsp[0].interm.type); @@ -6594,13 +6634,13 @@ yyreduce: parseContext.profileRequires((yyvsp[0].interm.type).loc, ENoProfile, 120, E_GL_3DL_array_objects, "arrayed type"); parseContext.profileRequires((yyvsp[0].interm.type).loc, EEsProfile, 300, 0, "arrayed type"); } - parseContext.precisionQualifierCheck((yyval.interm.type).loc, (yyval.interm.type).basicType, (yyval.interm.type).qualifier, (yyval.interm.type).isCoopmat()); + parseContext.precisionQualifierCheck((yyval.interm.type).loc, (yyval.interm.type).basicType, (yyval.interm.type).qualifier, (yyval.interm.type).isCoopmatOrvec()); } -#line 6600 "MachineIndependent/glslang_tab.cpp" +#line 6640 "MachineIndependent/glslang_tab.cpp" break; case 136: /* fully_specified_type: type_qualifier type_specifier */ -#line 1216 "MachineIndependent/glslang.y" +#line 1218 "MachineIndependent/glslang.y" { parseContext.globalQualifierFixCheck((yyvsp[-1].interm.type).loc, (yyvsp[-1].interm.type).qualifier, false, &(yyvsp[0].interm.type)); parseContext.globalQualifierTypeCheck((yyvsp[-1].interm.type).loc, (yyvsp[-1].interm.type).qualifier, (yyvsp[0].interm.type)); @@ -6616,7 +6656,7 @@ yyreduce: parseContext.checkNoShaderLayouts((yyvsp[0].interm.type).loc, (yyvsp[-1].interm.type).shaderQualifiers); (yyvsp[0].interm.type).shaderQualifiers.merge((yyvsp[-1].interm.type).shaderQualifiers); parseContext.mergeQualifiers((yyvsp[0].interm.type).loc, (yyvsp[0].interm.type).qualifier, (yyvsp[-1].interm.type).qualifier, true); - parseContext.precisionQualifierCheck((yyvsp[0].interm.type).loc, (yyvsp[0].interm.type).basicType, (yyvsp[0].interm.type).qualifier, (yyvsp[0].interm.type).isCoopmat()); + parseContext.precisionQualifierCheck((yyvsp[0].interm.type).loc, (yyvsp[0].interm.type).basicType, (yyvsp[0].interm.type).qualifier, (yyvsp[0].interm.type).isCoopmatOrvec()); (yyval.interm.type) = (yyvsp[0].interm.type); @@ -6625,22 +6665,22 @@ yyreduce: (parseContext.language == EShLangFragment && (yyval.interm.type).qualifier.storage == EvqVaryingIn))) (yyval.interm.type).qualifier.smooth = true; } -#line 6629 "MachineIndependent/glslang_tab.cpp" +#line 6669 "MachineIndependent/glslang_tab.cpp" break; case 137: /* invariant_qualifier: INVARIANT */ -#line 1243 "MachineIndependent/glslang.y" +#line 1245 "MachineIndependent/glslang.y" { 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 6640 "MachineIndependent/glslang_tab.cpp" +#line 6680 "MachineIndependent/glslang_tab.cpp" break; case 138: /* interpolation_qualifier: SMOOTH */ -#line 1252 "MachineIndependent/glslang.y" +#line 1254 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "smooth"); parseContext.profileRequires((yyvsp[0].lex).loc, ENoProfile, 130, 0, "smooth"); @@ -6648,11 +6688,11 @@ yyreduce: (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.smooth = true; } -#line 6652 "MachineIndependent/glslang_tab.cpp" +#line 6692 "MachineIndependent/glslang_tab.cpp" break; case 139: /* interpolation_qualifier: FLAT */ -#line 1259 "MachineIndependent/glslang.y" +#line 1261 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "flat"); parseContext.profileRequires((yyvsp[0].lex).loc, ENoProfile, 130, 0, "flat"); @@ -6660,11 +6700,11 @@ yyreduce: (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.flat = true; } -#line 6664 "MachineIndependent/glslang_tab.cpp" +#line 6704 "MachineIndependent/glslang_tab.cpp" break; case 140: /* interpolation_qualifier: NOPERSPECTIVE */ -#line 1266 "MachineIndependent/glslang.y" +#line 1268 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "noperspective"); parseContext.profileRequires((yyvsp[0].lex).loc, EEsProfile, 0, E_GL_NV_shader_noperspective_interpolation, "noperspective"); @@ -6672,11 +6712,11 @@ yyreduce: (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.nopersp = true; } -#line 6676 "MachineIndependent/glslang_tab.cpp" +#line 6716 "MachineIndependent/glslang_tab.cpp" break; case 141: /* interpolation_qualifier: EXPLICITINTERPAMD */ -#line 1273 "MachineIndependent/glslang.y" +#line 1275 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "__explicitInterpAMD"); parseContext.profileRequires((yyvsp[0].lex).loc, ECoreProfile, 450, E_GL_AMD_shader_explicit_vertex_parameter, "explicit interpolation"); @@ -6684,11 +6724,11 @@ yyreduce: (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.explicitInterp = true; } -#line 6688 "MachineIndependent/glslang_tab.cpp" +#line 6728 "MachineIndependent/glslang_tab.cpp" break; case 142: /* interpolation_qualifier: PERVERTEXNV */ -#line 1280 "MachineIndependent/glslang.y" +#line 1282 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "pervertexNV"); parseContext.profileRequires((yyvsp[0].lex).loc, ECoreProfile, 0, E_GL_NV_fragment_shader_barycentric, "fragment shader barycentric"); @@ -6697,11 +6737,11 @@ yyreduce: (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.pervertexNV = true; } -#line 6701 "MachineIndependent/glslang_tab.cpp" +#line 6741 "MachineIndependent/glslang_tab.cpp" break; case 143: /* interpolation_qualifier: PERVERTEXEXT */ -#line 1288 "MachineIndependent/glslang.y" +#line 1290 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "pervertexEXT"); parseContext.profileRequires((yyvsp[0].lex).loc, ECoreProfile, 0, E_GL_EXT_fragment_shader_barycentric, "fragment shader barycentric"); @@ -6710,11 +6750,11 @@ yyreduce: (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.pervertexEXT = true; } -#line 6714 "MachineIndependent/glslang_tab.cpp" +#line 6754 "MachineIndependent/glslang_tab.cpp" break; case 144: /* interpolation_qualifier: PERPRIMITIVENV */ -#line 1296 "MachineIndependent/glslang.y" +#line 1298 "MachineIndependent/glslang.y" { // No need for profile version or extension check. Shader stage already checks both. parseContext.globalCheck((yyvsp[0].lex).loc, "perprimitiveNV"); @@ -6725,11 +6765,11 @@ yyreduce: (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.perPrimitiveNV = true; } -#line 6729 "MachineIndependent/glslang_tab.cpp" +#line 6769 "MachineIndependent/glslang_tab.cpp" break; case 145: /* interpolation_qualifier: PERPRIMITIVEEXT */ -#line 1306 "MachineIndependent/glslang.y" +#line 1308 "MachineIndependent/glslang.y" { // No need for profile version or extension check. Shader stage already checks both. parseContext.globalCheck((yyvsp[0].lex).loc, "perprimitiveEXT"); @@ -6740,11 +6780,11 @@ yyreduce: (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.perPrimitiveNV = true; } -#line 6744 "MachineIndependent/glslang_tab.cpp" +#line 6784 "MachineIndependent/glslang_tab.cpp" break; case 146: /* interpolation_qualifier: PERVIEWNV */ -#line 1316 "MachineIndependent/glslang.y" +#line 1318 "MachineIndependent/glslang.y" { // No need for profile version or extension check. Shader stage already checks both. parseContext.globalCheck((yyvsp[0].lex).loc, "perviewNV"); @@ -6752,11 +6792,11 @@ yyreduce: (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.perViewNV = true; } -#line 6756 "MachineIndependent/glslang_tab.cpp" +#line 6796 "MachineIndependent/glslang_tab.cpp" break; case 147: /* interpolation_qualifier: PERTASKNV */ -#line 1323 "MachineIndependent/glslang.y" +#line 1325 "MachineIndependent/glslang.y" { // No need for profile version or extension check. Shader stage already checks both. parseContext.globalCheck((yyvsp[0].lex).loc, "taskNV"); @@ -6764,84 +6804,84 @@ yyreduce: (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.perTaskNV = true; } -#line 6768 "MachineIndependent/glslang_tab.cpp" +#line 6808 "MachineIndependent/glslang_tab.cpp" break; case 148: /* layout_qualifier: LAYOUT LEFT_PAREN layout_qualifier_id_list RIGHT_PAREN */ -#line 1333 "MachineIndependent/glslang.y" +#line 1335 "MachineIndependent/glslang.y" { (yyval.interm.type) = (yyvsp[-1].interm.type); } -#line 6776 "MachineIndependent/glslang_tab.cpp" +#line 6816 "MachineIndependent/glslang_tab.cpp" break; case 149: /* layout_qualifier_id_list: layout_qualifier_id */ -#line 1339 "MachineIndependent/glslang.y" +#line 1341 "MachineIndependent/glslang.y" { (yyval.interm.type) = (yyvsp[0].interm.type); } -#line 6784 "MachineIndependent/glslang_tab.cpp" +#line 6824 "MachineIndependent/glslang_tab.cpp" break; case 150: /* layout_qualifier_id_list: layout_qualifier_id_list COMMA layout_qualifier_id */ -#line 1342 "MachineIndependent/glslang.y" +#line 1344 "MachineIndependent/glslang.y" { (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 6794 "MachineIndependent/glslang_tab.cpp" +#line 6834 "MachineIndependent/glslang_tab.cpp" break; case 151: /* layout_qualifier_id: IDENTIFIER */ -#line 1349 "MachineIndependent/glslang.y" +#line 1351 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc); parseContext.setLayoutQualifier((yyvsp[0].lex).loc, (yyval.interm.type), *(yyvsp[0].lex).string); } -#line 6803 "MachineIndependent/glslang_tab.cpp" +#line 6843 "MachineIndependent/glslang_tab.cpp" break; case 152: /* layout_qualifier_id: IDENTIFIER EQUAL constant_expression */ -#line 1353 "MachineIndependent/glslang.y" +#line 1355 "MachineIndependent/glslang.y" { (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 6812 "MachineIndependent/glslang_tab.cpp" +#line 6852 "MachineIndependent/glslang_tab.cpp" break; case 153: /* layout_qualifier_id: SHARED */ -#line 1357 "MachineIndependent/glslang.y" +#line 1359 "MachineIndependent/glslang.y" { // 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 6822 "MachineIndependent/glslang_tab.cpp" +#line 6862 "MachineIndependent/glslang_tab.cpp" break; case 154: /* precise_qualifier: PRECISE */ -#line 1365 "MachineIndependent/glslang.y" +#line 1367 "MachineIndependent/glslang.y" { 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 6833 "MachineIndependent/glslang_tab.cpp" +#line 6873 "MachineIndependent/glslang_tab.cpp" break; case 155: /* type_qualifier: single_type_qualifier */ -#line 1374 "MachineIndependent/glslang.y" +#line 1376 "MachineIndependent/glslang.y" { (yyval.interm.type) = (yyvsp[0].interm.type); } -#line 6841 "MachineIndependent/glslang_tab.cpp" +#line 6881 "MachineIndependent/glslang_tab.cpp" break; case 156: /* type_qualifier: type_qualifier single_type_qualifier */ -#line 1377 "MachineIndependent/glslang.y" +#line 1379 "MachineIndependent/glslang.y" { (yyval.interm.type) = (yyvsp[-1].interm.type); if ((yyval.interm.type).basicType == EbtVoid) @@ -6850,151 +6890,151 @@ 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 6854 "MachineIndependent/glslang_tab.cpp" +#line 6894 "MachineIndependent/glslang_tab.cpp" break; case 157: /* single_type_qualifier: storage_qualifier */ -#line 1388 "MachineIndependent/glslang.y" +#line 1390 "MachineIndependent/glslang.y" { (yyval.interm.type) = (yyvsp[0].interm.type); } -#line 6862 "MachineIndependent/glslang_tab.cpp" +#line 6902 "MachineIndependent/glslang_tab.cpp" break; case 158: /* single_type_qualifier: layout_qualifier */ -#line 1391 "MachineIndependent/glslang.y" +#line 1393 "MachineIndependent/glslang.y" { (yyval.interm.type) = (yyvsp[0].interm.type); } -#line 6870 "MachineIndependent/glslang_tab.cpp" +#line 6910 "MachineIndependent/glslang_tab.cpp" break; case 159: /* single_type_qualifier: precision_qualifier */ -#line 1394 "MachineIndependent/glslang.y" +#line 1396 "MachineIndependent/glslang.y" { parseContext.checkPrecisionQualifier((yyvsp[0].interm.type).loc, (yyvsp[0].interm.type).qualifier.precision); (yyval.interm.type) = (yyvsp[0].interm.type); } -#line 6879 "MachineIndependent/glslang_tab.cpp" +#line 6919 "MachineIndependent/glslang_tab.cpp" break; case 160: /* single_type_qualifier: interpolation_qualifier */ -#line 1398 "MachineIndependent/glslang.y" +#line 1400 "MachineIndependent/glslang.y" { // allow inheritance of storage qualifier from block declaration (yyval.interm.type) = (yyvsp[0].interm.type); } -#line 6888 "MachineIndependent/glslang_tab.cpp" +#line 6928 "MachineIndependent/glslang_tab.cpp" break; case 161: /* single_type_qualifier: invariant_qualifier */ -#line 1402 "MachineIndependent/glslang.y" +#line 1404 "MachineIndependent/glslang.y" { // allow inheritance of storage qualifier from block declaration (yyval.interm.type) = (yyvsp[0].interm.type); } -#line 6897 "MachineIndependent/glslang_tab.cpp" +#line 6937 "MachineIndependent/glslang_tab.cpp" break; case 162: /* single_type_qualifier: precise_qualifier */ -#line 1406 "MachineIndependent/glslang.y" +#line 1408 "MachineIndependent/glslang.y" { // allow inheritance of storage qualifier from block declaration (yyval.interm.type) = (yyvsp[0].interm.type); } -#line 6906 "MachineIndependent/glslang_tab.cpp" +#line 6946 "MachineIndependent/glslang_tab.cpp" break; case 163: /* single_type_qualifier: non_uniform_qualifier */ -#line 1410 "MachineIndependent/glslang.y" +#line 1412 "MachineIndependent/glslang.y" { (yyval.interm.type) = (yyvsp[0].interm.type); } -#line 6914 "MachineIndependent/glslang_tab.cpp" +#line 6954 "MachineIndependent/glslang_tab.cpp" break; case 164: /* single_type_qualifier: spirv_storage_class_qualifier */ -#line 1413 "MachineIndependent/glslang.y" +#line 1415 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].interm.type).loc, "spirv_storage_class"); parseContext.requireExtensions((yyvsp[0].interm.type).loc, 1, &E_GL_EXT_spirv_intrinsics, "SPIR-V storage class qualifier"); (yyval.interm.type) = (yyvsp[0].interm.type); } -#line 6924 "MachineIndependent/glslang_tab.cpp" +#line 6964 "MachineIndependent/glslang_tab.cpp" break; case 165: /* single_type_qualifier: spirv_decorate_qualifier */ -#line 1418 "MachineIndependent/glslang.y" +#line 1420 "MachineIndependent/glslang.y" { parseContext.requireExtensions((yyvsp[0].interm.type).loc, 1, &E_GL_EXT_spirv_intrinsics, "SPIR-V decorate qualifier"); (yyval.interm.type) = (yyvsp[0].interm.type); } -#line 6933 "MachineIndependent/glslang_tab.cpp" +#line 6973 "MachineIndependent/glslang_tab.cpp" break; case 166: /* single_type_qualifier: SPIRV_BY_REFERENCE */ -#line 1422 "MachineIndependent/glslang.y" +#line 1424 "MachineIndependent/glslang.y" { parseContext.requireExtensions((yyvsp[0].lex).loc, 1, &E_GL_EXT_spirv_intrinsics, "spirv_by_reference"); (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.setSpirvByReference(); } -#line 6943 "MachineIndependent/glslang_tab.cpp" +#line 6983 "MachineIndependent/glslang_tab.cpp" break; case 167: /* single_type_qualifier: SPIRV_LITERAL */ -#line 1427 "MachineIndependent/glslang.y" +#line 1429 "MachineIndependent/glslang.y" { parseContext.requireExtensions((yyvsp[0].lex).loc, 1, &E_GL_EXT_spirv_intrinsics, "spirv_by_literal"); (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.setSpirvLiteral(); } -#line 6953 "MachineIndependent/glslang_tab.cpp" +#line 6993 "MachineIndependent/glslang_tab.cpp" break; case 168: /* storage_qualifier: CONST */ -#line 1435 "MachineIndependent/glslang.y" +#line 1437 "MachineIndependent/glslang.y" { (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 6962 "MachineIndependent/glslang_tab.cpp" +#line 7002 "MachineIndependent/glslang_tab.cpp" break; case 169: /* storage_qualifier: INOUT */ -#line 1439 "MachineIndependent/glslang.y" +#line 1441 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "inout"); (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.storage = EvqInOut; } -#line 6972 "MachineIndependent/glslang_tab.cpp" +#line 7012 "MachineIndependent/glslang_tab.cpp" break; case 170: /* storage_qualifier: IN */ -#line 1444 "MachineIndependent/glslang.y" +#line 1446 "MachineIndependent/glslang.y" { 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 6983 "MachineIndependent/glslang_tab.cpp" +#line 7023 "MachineIndependent/glslang_tab.cpp" break; case 171: /* storage_qualifier: OUT */ -#line 1450 "MachineIndependent/glslang.y" +#line 1452 "MachineIndependent/glslang.y" { 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 6994 "MachineIndependent/glslang_tab.cpp" +#line 7034 "MachineIndependent/glslang_tab.cpp" break; case 172: /* storage_qualifier: CENTROID */ -#line 1456 "MachineIndependent/glslang.y" +#line 1458 "MachineIndependent/glslang.y" { parseContext.profileRequires((yyvsp[0].lex).loc, ENoProfile, 120, 0, "centroid"); parseContext.profileRequires((yyvsp[0].lex).loc, EEsProfile, 300, 0, "centroid"); @@ -7002,31 +7042,31 @@ yyreduce: (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.centroid = true; } -#line 7006 "MachineIndependent/glslang_tab.cpp" +#line 7046 "MachineIndependent/glslang_tab.cpp" break; case 173: /* storage_qualifier: UNIFORM */ -#line 1463 "MachineIndependent/glslang.y" +#line 1465 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "uniform"); (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.storage = EvqUniform; } -#line 7016 "MachineIndependent/glslang_tab.cpp" +#line 7056 "MachineIndependent/glslang_tab.cpp" break; case 174: /* storage_qualifier: TILEIMAGEEXT */ -#line 1468 "MachineIndependent/glslang.y" +#line 1470 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "tileImageEXT"); (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.storage = EvqTileImageEXT; } -#line 7026 "MachineIndependent/glslang_tab.cpp" +#line 7066 "MachineIndependent/glslang_tab.cpp" break; case 175: /* storage_qualifier: SHARED */ -#line 1473 "MachineIndependent/glslang.y" +#line 1475 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "shared"); parseContext.profileRequires((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, 430, E_GL_ARB_compute_shader, "shared"); @@ -7035,21 +7075,21 @@ yyreduce: (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.storage = EvqShared; } -#line 7039 "MachineIndependent/glslang_tab.cpp" +#line 7079 "MachineIndependent/glslang_tab.cpp" break; case 176: /* storage_qualifier: BUFFER */ -#line 1481 "MachineIndependent/glslang.y" +#line 1483 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "buffer"); (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.storage = EvqBuffer; } -#line 7049 "MachineIndependent/glslang_tab.cpp" +#line 7089 "MachineIndependent/glslang_tab.cpp" break; case 177: /* storage_qualifier: ATTRIBUTE */ -#line 1486 "MachineIndependent/glslang.y" +#line 1488 "MachineIndependent/glslang.y" { parseContext.requireStage((yyvsp[0].lex).loc, EShLangVertex, "attribute"); parseContext.checkDeprecated((yyvsp[0].lex).loc, ECoreProfile, 130, "attribute"); @@ -7062,11 +7102,11 @@ yyreduce: (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.storage = EvqVaryingIn; } -#line 7066 "MachineIndependent/glslang_tab.cpp" +#line 7106 "MachineIndependent/glslang_tab.cpp" break; case 178: /* storage_qualifier: VARYING */ -#line 1498 "MachineIndependent/glslang.y" +#line 1500 "MachineIndependent/glslang.y" { parseContext.checkDeprecated((yyvsp[0].lex).loc, ENoProfile, 130, "varying"); parseContext.checkDeprecated((yyvsp[0].lex).loc, ECoreProfile, 130, "varying"); @@ -7081,32 +7121,32 @@ yyreduce: else (yyval.interm.type).qualifier.storage = EvqVaryingIn; } -#line 7085 "MachineIndependent/glslang_tab.cpp" +#line 7125 "MachineIndependent/glslang_tab.cpp" break; case 179: /* storage_qualifier: PATCH */ -#line 1512 "MachineIndependent/glslang.y" +#line 1514 "MachineIndependent/glslang.y" { 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 7096 "MachineIndependent/glslang_tab.cpp" +#line 7136 "MachineIndependent/glslang_tab.cpp" break; case 180: /* storage_qualifier: SAMPLE */ -#line 1518 "MachineIndependent/glslang.y" +#line 1520 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "sample"); (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.sample = true; } -#line 7106 "MachineIndependent/glslang_tab.cpp" +#line 7146 "MachineIndependent/glslang_tab.cpp" break; case 181: /* storage_qualifier: HITATTRNV */ -#line 1523 "MachineIndependent/glslang.y" +#line 1525 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "hitAttributeNV"); parseContext.requireStage((yyvsp[0].lex).loc, (EShLanguageMask)(EShLangIntersectMask | EShLangClosestHitMask @@ -7115,11 +7155,11 @@ yyreduce: (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.storage = EvqHitAttr; } -#line 7119 "MachineIndependent/glslang_tab.cpp" +#line 7159 "MachineIndependent/glslang_tab.cpp" break; case 182: /* storage_qualifier: HITOBJECTATTRNV */ -#line 1531 "MachineIndependent/glslang.y" +#line 1533 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "hitAttributeNV"); parseContext.requireStage((yyvsp[0].lex).loc, (EShLanguageMask)(EShLangRayGenMask | EShLangClosestHitMask @@ -7128,11 +7168,11 @@ yyreduce: (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.storage = EvqHitObjectAttrNV; } -#line 7132 "MachineIndependent/glslang_tab.cpp" +#line 7172 "MachineIndependent/glslang_tab.cpp" break; case 183: /* storage_qualifier: HITATTREXT */ -#line 1539 "MachineIndependent/glslang.y" +#line 1541 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "hitAttributeEXT"); parseContext.requireStage((yyvsp[0].lex).loc, (EShLanguageMask)(EShLangIntersectMask | EShLangClosestHitMask @@ -7141,11 +7181,11 @@ yyreduce: (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.storage = EvqHitAttr; } -#line 7145 "MachineIndependent/glslang_tab.cpp" +#line 7185 "MachineIndependent/glslang_tab.cpp" break; case 184: /* storage_qualifier: PAYLOADNV */ -#line 1547 "MachineIndependent/glslang.y" +#line 1549 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "rayPayloadNV"); parseContext.requireStage((yyvsp[0].lex).loc, (EShLanguageMask)(EShLangRayGenMask | EShLangClosestHitMask | @@ -7154,11 +7194,11 @@ yyreduce: (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.storage = EvqPayload; } -#line 7158 "MachineIndependent/glslang_tab.cpp" +#line 7198 "MachineIndependent/glslang_tab.cpp" break; case 185: /* storage_qualifier: PAYLOADEXT */ -#line 1555 "MachineIndependent/glslang.y" +#line 1557 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "rayPayloadEXT"); parseContext.requireStage((yyvsp[0].lex).loc, (EShLanguageMask)(EShLangRayGenMask | EShLangClosestHitMask | @@ -7167,11 +7207,11 @@ yyreduce: (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.storage = EvqPayload; } -#line 7171 "MachineIndependent/glslang_tab.cpp" +#line 7211 "MachineIndependent/glslang_tab.cpp" break; case 186: /* storage_qualifier: PAYLOADINNV */ -#line 1563 "MachineIndependent/glslang.y" +#line 1565 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "rayPayloadInNV"); parseContext.requireStage((yyvsp[0].lex).loc, (EShLanguageMask)(EShLangClosestHitMask | @@ -7180,11 +7220,11 @@ yyreduce: (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.storage = EvqPayloadIn; } -#line 7184 "MachineIndependent/glslang_tab.cpp" +#line 7224 "MachineIndependent/glslang_tab.cpp" break; case 187: /* storage_qualifier: PAYLOADINEXT */ -#line 1571 "MachineIndependent/glslang.y" +#line 1573 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "rayPayloadInEXT"); parseContext.requireStage((yyvsp[0].lex).loc, (EShLanguageMask)(EShLangClosestHitMask | @@ -7193,11 +7233,11 @@ yyreduce: (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.storage = EvqPayloadIn; } -#line 7197 "MachineIndependent/glslang_tab.cpp" +#line 7237 "MachineIndependent/glslang_tab.cpp" break; case 188: /* storage_qualifier: CALLDATANV */ -#line 1579 "MachineIndependent/glslang.y" +#line 1581 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "callableDataNV"); parseContext.requireStage((yyvsp[0].lex).loc, (EShLanguageMask)(EShLangRayGenMask | @@ -7206,11 +7246,11 @@ yyreduce: (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.storage = EvqCallableData; } -#line 7210 "MachineIndependent/glslang_tab.cpp" +#line 7250 "MachineIndependent/glslang_tab.cpp" break; case 189: /* storage_qualifier: CALLDATAEXT */ -#line 1587 "MachineIndependent/glslang.y" +#line 1589 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "callableDataEXT"); parseContext.requireStage((yyvsp[0].lex).loc, (EShLanguageMask)(EShLangRayGenMask | @@ -7219,11 +7259,11 @@ yyreduce: (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.storage = EvqCallableData; } -#line 7223 "MachineIndependent/glslang_tab.cpp" +#line 7263 "MachineIndependent/glslang_tab.cpp" break; case 190: /* storage_qualifier: CALLDATAINNV */ -#line 1595 "MachineIndependent/glslang.y" +#line 1597 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "callableDataInNV"); parseContext.requireStage((yyvsp[0].lex).loc, (EShLanguageMask)(EShLangCallableMask), "callableDataInNV"); @@ -7231,11 +7271,11 @@ yyreduce: (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.storage = EvqCallableDataIn; } -#line 7235 "MachineIndependent/glslang_tab.cpp" +#line 7275 "MachineIndependent/glslang_tab.cpp" break; case 191: /* storage_qualifier: CALLDATAINEXT */ -#line 1602 "MachineIndependent/glslang.y" +#line 1604 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "callableDataInEXT"); parseContext.requireStage((yyvsp[0].lex).loc, (EShLanguageMask)(EShLangCallableMask), "callableDataInEXT"); @@ -7243,138 +7283,147 @@ yyreduce: (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.storage = EvqCallableDataIn; } -#line 7247 "MachineIndependent/glslang_tab.cpp" +#line 7287 "MachineIndependent/glslang_tab.cpp" break; case 192: /* storage_qualifier: COHERENT */ -#line 1609 "MachineIndependent/glslang.y" +#line 1611 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.coherent = true; } -#line 7256 "MachineIndependent/glslang_tab.cpp" +#line 7296 "MachineIndependent/glslang_tab.cpp" break; case 193: /* storage_qualifier: DEVICECOHERENT */ -#line 1613 "MachineIndependent/glslang.y" +#line 1615 "MachineIndependent/glslang.y" { (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 7266 "MachineIndependent/glslang_tab.cpp" +#line 7306 "MachineIndependent/glslang_tab.cpp" break; case 194: /* storage_qualifier: QUEUEFAMILYCOHERENT */ -#line 1618 "MachineIndependent/glslang.y" +#line 1620 "MachineIndependent/glslang.y" { (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 7276 "MachineIndependent/glslang_tab.cpp" +#line 7316 "MachineIndependent/glslang_tab.cpp" break; case 195: /* storage_qualifier: WORKGROUPCOHERENT */ -#line 1623 "MachineIndependent/glslang.y" +#line 1625 "MachineIndependent/glslang.y" { (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 7286 "MachineIndependent/glslang_tab.cpp" +#line 7326 "MachineIndependent/glslang_tab.cpp" break; case 196: /* storage_qualifier: SUBGROUPCOHERENT */ -#line 1628 "MachineIndependent/glslang.y" +#line 1630 "MachineIndependent/glslang.y" { (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 7296 "MachineIndependent/glslang_tab.cpp" +#line 7336 "MachineIndependent/glslang_tab.cpp" break; case 197: /* storage_qualifier: NONPRIVATE */ -#line 1633 "MachineIndependent/glslang.y" +#line 1635 "MachineIndependent/glslang.y" { (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 7306 "MachineIndependent/glslang_tab.cpp" +#line 7346 "MachineIndependent/glslang_tab.cpp" break; case 198: /* storage_qualifier: SHADERCALLCOHERENT */ -#line 1638 "MachineIndependent/glslang.y" +#line 1640 "MachineIndependent/glslang.y" { (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 7316 "MachineIndependent/glslang_tab.cpp" +#line 7356 "MachineIndependent/glslang_tab.cpp" break; case 199: /* storage_qualifier: VOLATILE */ -#line 1643 "MachineIndependent/glslang.y" +#line 1645 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.volatil = true; } -#line 7325 "MachineIndependent/glslang_tab.cpp" +#line 7365 "MachineIndependent/glslang_tab.cpp" break; case 200: /* storage_qualifier: RESTRICT */ -#line 1647 "MachineIndependent/glslang.y" +#line 1649 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.restrict = true; } -#line 7334 "MachineIndependent/glslang_tab.cpp" +#line 7374 "MachineIndependent/glslang_tab.cpp" break; case 201: /* storage_qualifier: READONLY */ -#line 1651 "MachineIndependent/glslang.y" +#line 1653 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.readonly = true; } -#line 7343 "MachineIndependent/glslang_tab.cpp" +#line 7383 "MachineIndependent/glslang_tab.cpp" break; case 202: /* storage_qualifier: WRITEONLY */ -#line 1655 "MachineIndependent/glslang.y" +#line 1657 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.writeonly = true; } -#line 7352 "MachineIndependent/glslang_tab.cpp" +#line 7392 "MachineIndependent/glslang_tab.cpp" break; - case 203: /* storage_qualifier: SUBROUTINE */ -#line 1659 "MachineIndependent/glslang.y" + case 203: /* storage_qualifier: NONTEMPORAL */ +#line 1661 "MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[0].lex).loc); + (yyval.interm.type).qualifier.nontemporal = true; + } +#line 7401 "MachineIndependent/glslang_tab.cpp" + break; + + case 204: /* storage_qualifier: SUBROUTINE */ +#line 1665 "MachineIndependent/glslang.y" { 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 7363 "MachineIndependent/glslang_tab.cpp" +#line 7412 "MachineIndependent/glslang_tab.cpp" break; - case 204: /* storage_qualifier: SUBROUTINE LEFT_PAREN type_name_list RIGHT_PAREN */ -#line 1665 "MachineIndependent/glslang.y" + case 205: /* storage_qualifier: SUBROUTINE LEFT_PAREN type_name_list RIGHT_PAREN */ +#line 1671 "MachineIndependent/glslang.y" { 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 7374 "MachineIndependent/glslang_tab.cpp" +#line 7423 "MachineIndependent/glslang_tab.cpp" break; - case 205: /* storage_qualifier: TASKPAYLOADWORKGROUPEXT */ -#line 1671 "MachineIndependent/glslang.y" + case 206: /* storage_qualifier: TASKPAYLOADWORKGROUPEXT */ +#line 1677 "MachineIndependent/glslang.y" { // No need for profile version or extension check. Shader stage already checks both. parseContext.globalCheck((yyvsp[0].lex).loc, "taskPayloadSharedEXT"); @@ -7382,73 +7431,73 @@ yyreduce: (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.storage = EvqtaskPayloadSharedEXT; } -#line 7386 "MachineIndependent/glslang_tab.cpp" +#line 7435 "MachineIndependent/glslang_tab.cpp" break; - case 206: /* non_uniform_qualifier: NONUNIFORM */ -#line 1681 "MachineIndependent/glslang.y" + case 207: /* non_uniform_qualifier: NONUNIFORM */ +#line 1687 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.nonUniform = true; } -#line 7395 "MachineIndependent/glslang_tab.cpp" +#line 7444 "MachineIndependent/glslang_tab.cpp" break; - case 207: /* type_name_list: IDENTIFIER */ -#line 1688 "MachineIndependent/glslang.y" + case 208: /* type_name_list: IDENTIFIER */ +#line 1694 "MachineIndependent/glslang.y" { // TODO } -#line 7403 "MachineIndependent/glslang_tab.cpp" +#line 7452 "MachineIndependent/glslang_tab.cpp" break; - case 208: /* type_name_list: type_name_list COMMA IDENTIFIER */ -#line 1691 "MachineIndependent/glslang.y" + case 209: /* type_name_list: type_name_list COMMA IDENTIFIER */ +#line 1697 "MachineIndependent/glslang.y" { // 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 7413 "MachineIndependent/glslang_tab.cpp" +#line 7462 "MachineIndependent/glslang_tab.cpp" break; - case 209: /* type_specifier: type_specifier_nonarray type_parameter_specifier_opt */ -#line 1699 "MachineIndependent/glslang.y" + case 210: /* type_specifier: type_specifier_nonarray type_parameter_specifier_opt */ +#line 1705 "MachineIndependent/glslang.y" { (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); - parseContext.coopMatTypeParametersCheck((yyvsp[-1].interm.type).loc, (yyval.interm.type)); + parseContext.typeParametersCheck((yyvsp[-1].interm.type).loc, (yyval.interm.type)); } -#line 7425 "MachineIndependent/glslang_tab.cpp" +#line 7474 "MachineIndependent/glslang_tab.cpp" break; - case 210: /* type_specifier: type_specifier_nonarray type_parameter_specifier_opt array_specifier */ -#line 1706 "MachineIndependent/glslang.y" + case 211: /* type_specifier: type_specifier_nonarray type_parameter_specifier_opt array_specifier */ +#line 1712 "MachineIndependent/glslang.y" { parseContext.arrayOfArrayVersionCheck((yyvsp[0].interm).loc, (yyvsp[0].interm).arraySizes); (yyval.interm.type) = (yyvsp[-2].interm.type); (yyval.interm.type).qualifier.precision = parseContext.getDefaultPrecision((yyval.interm.type)); (yyval.interm.type).typeParameters = (yyvsp[-1].interm.typeParameters); (yyval.interm.type).arraySizes = (yyvsp[0].interm).arraySizes; - parseContext.coopMatTypeParametersCheck((yyvsp[-2].interm.type).loc, (yyval.interm.type)); + parseContext.typeParametersCheck((yyvsp[-2].interm.type).loc, (yyval.interm.type)); } -#line 7438 "MachineIndependent/glslang_tab.cpp" +#line 7487 "MachineIndependent/glslang_tab.cpp" break; - case 211: /* array_specifier: LEFT_BRACKET RIGHT_BRACKET */ -#line 1717 "MachineIndependent/glslang.y" + case 212: /* array_specifier: LEFT_BRACKET RIGHT_BRACKET */ +#line 1723 "MachineIndependent/glslang.y" { (yyval.interm).loc = (yyvsp[-1].lex).loc; (yyval.interm).arraySizes = new TArraySizes; (yyval.interm).arraySizes->addInnerSize(); } -#line 7448 "MachineIndependent/glslang_tab.cpp" +#line 7497 "MachineIndependent/glslang_tab.cpp" break; - case 212: /* array_specifier: LEFT_BRACKET conditional_expression RIGHT_BRACKET */ -#line 1722 "MachineIndependent/glslang.y" + case 213: /* array_specifier: LEFT_BRACKET conditional_expression RIGHT_BRACKET */ +#line 1728 "MachineIndependent/glslang.y" { (yyval.interm).loc = (yyvsp[-2].lex).loc; (yyval.interm).arraySizes = new TArraySizes; @@ -7457,20 +7506,20 @@ yyreduce: parseContext.arraySizeCheck((yyvsp[-1].interm.intermTypedNode)->getLoc(), (yyvsp[-1].interm.intermTypedNode), size, "array size"); (yyval.interm).arraySizes->addInnerSize(size); } -#line 7461 "MachineIndependent/glslang_tab.cpp" +#line 7510 "MachineIndependent/glslang_tab.cpp" break; - case 213: /* array_specifier: array_specifier LEFT_BRACKET RIGHT_BRACKET */ -#line 1730 "MachineIndependent/glslang.y" + case 214: /* array_specifier: array_specifier LEFT_BRACKET RIGHT_BRACKET */ +#line 1736 "MachineIndependent/glslang.y" { (yyval.interm) = (yyvsp[-2].interm); (yyval.interm).arraySizes->addInnerSize(); } -#line 7470 "MachineIndependent/glslang_tab.cpp" +#line 7519 "MachineIndependent/glslang_tab.cpp" break; - case 214: /* array_specifier: array_specifier LEFT_BRACKET conditional_expression RIGHT_BRACKET */ -#line 1734 "MachineIndependent/glslang.y" + case 215: /* array_specifier: array_specifier LEFT_BRACKET conditional_expression RIGHT_BRACKET */ +#line 1740 "MachineIndependent/glslang.y" { (yyval.interm) = (yyvsp[-3].interm); @@ -7478,46 +7527,46 @@ yyreduce: parseContext.arraySizeCheck((yyvsp[-1].interm.intermTypedNode)->getLoc(), (yyvsp[-1].interm.intermTypedNode), size, "array size"); (yyval.interm).arraySizes->addInnerSize(size); } -#line 7482 "MachineIndependent/glslang_tab.cpp" +#line 7531 "MachineIndependent/glslang_tab.cpp" break; - case 215: /* type_parameter_specifier_opt: type_parameter_specifier */ -#line 1744 "MachineIndependent/glslang.y" + case 216: /* type_parameter_specifier_opt: type_parameter_specifier */ +#line 1750 "MachineIndependent/glslang.y" { (yyval.interm.typeParameters) = (yyvsp[0].interm.typeParameters); } -#line 7490 "MachineIndependent/glslang_tab.cpp" +#line 7539 "MachineIndependent/glslang_tab.cpp" break; - case 216: /* type_parameter_specifier_opt: %empty */ -#line 1747 "MachineIndependent/glslang.y" + case 217: /* type_parameter_specifier_opt: %empty */ +#line 1753 "MachineIndependent/glslang.y" { (yyval.interm.typeParameters) = 0; } -#line 7498 "MachineIndependent/glslang_tab.cpp" +#line 7547 "MachineIndependent/glslang_tab.cpp" break; - case 217: /* type_parameter_specifier: LEFT_ANGLE type_parameter_specifier_list RIGHT_ANGLE */ -#line 1753 "MachineIndependent/glslang.y" + case 218: /* type_parameter_specifier: LEFT_ANGLE type_parameter_specifier_list RIGHT_ANGLE */ +#line 1759 "MachineIndependent/glslang.y" { (yyval.interm.typeParameters) = (yyvsp[-1].interm.typeParameters); } -#line 7506 "MachineIndependent/glslang_tab.cpp" +#line 7555 "MachineIndependent/glslang_tab.cpp" break; - case 218: /* type_parameter_specifier_list: type_specifier */ -#line 1759 "MachineIndependent/glslang.y" + case 219: /* type_parameter_specifier_list: type_specifier */ +#line 1765 "MachineIndependent/glslang.y" { (yyval.interm.typeParameters) = new TTypeParameters; (yyval.interm.typeParameters)->arraySizes = new TArraySizes; (yyval.interm.typeParameters)->spirvType = (yyvsp[0].interm.type).spirvType; (yyval.interm.typeParameters)->basicType = (yyvsp[0].interm.type).basicType; } -#line 7517 "MachineIndependent/glslang_tab.cpp" +#line 7566 "MachineIndependent/glslang_tab.cpp" break; - case 219: /* type_parameter_specifier_list: unary_expression */ -#line 1765 "MachineIndependent/glslang.y" + case 220: /* type_parameter_specifier_list: unary_expression */ +#line 1771 "MachineIndependent/glslang.y" { (yyval.interm.typeParameters) = new TTypeParameters; (yyval.interm.typeParameters)->arraySizes = new TArraySizes; @@ -7526,11 +7575,11 @@ yyreduce: parseContext.arraySizeCheck((yyvsp[0].interm.intermTypedNode)->getLoc(), (yyvsp[0].interm.intermTypedNode), size, "type parameter", true); (yyval.interm.typeParameters)->arraySizes->addInnerSize(size); } -#line 7530 "MachineIndependent/glslang_tab.cpp" +#line 7579 "MachineIndependent/glslang_tab.cpp" break; - case 220: /* type_parameter_specifier_list: type_parameter_specifier_list COMMA unary_expression */ -#line 1773 "MachineIndependent/glslang.y" + case 221: /* type_parameter_specifier_list: type_parameter_specifier_list COMMA unary_expression */ +#line 1779 "MachineIndependent/glslang.y" { (yyval.interm.typeParameters) = (yyvsp[-2].interm.typeParameters); @@ -7538,300 +7587,300 @@ yyreduce: parseContext.arraySizeCheck((yyvsp[0].interm.intermTypedNode)->getLoc(), (yyvsp[0].interm.intermTypedNode), size, "type parameter", true); (yyval.interm.typeParameters)->arraySizes->addInnerSize(size); } -#line 7542 "MachineIndependent/glslang_tab.cpp" +#line 7591 "MachineIndependent/glslang_tab.cpp" break; - case 221: /* type_specifier_nonarray: VOID */ -#line 1783 "MachineIndependent/glslang.y" + case 222: /* type_specifier_nonarray: VOID */ +#line 1789 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtVoid; } -#line 7551 "MachineIndependent/glslang_tab.cpp" +#line 7600 "MachineIndependent/glslang_tab.cpp" break; - case 222: /* type_specifier_nonarray: FLOAT */ -#line 1787 "MachineIndependent/glslang.y" + case 223: /* type_specifier_nonarray: FLOAT */ +#line 1793 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat; } -#line 7560 "MachineIndependent/glslang_tab.cpp" +#line 7609 "MachineIndependent/glslang_tab.cpp" break; - case 223: /* type_specifier_nonarray: INT */ -#line 1791 "MachineIndependent/glslang.y" + case 224: /* type_specifier_nonarray: INT */ +#line 1797 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtInt; } -#line 7569 "MachineIndependent/glslang_tab.cpp" +#line 7618 "MachineIndependent/glslang_tab.cpp" break; - case 224: /* type_specifier_nonarray: UINT */ -#line 1795 "MachineIndependent/glslang.y" + case 225: /* type_specifier_nonarray: UINT */ +#line 1801 "MachineIndependent/glslang.y" { 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 7579 "MachineIndependent/glslang_tab.cpp" - break; - - case 225: /* type_specifier_nonarray: BOOL */ -#line 1800 "MachineIndependent/glslang.y" - { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtBool; - } -#line 7588 "MachineIndependent/glslang_tab.cpp" - break; - - case 226: /* type_specifier_nonarray: VEC2 */ -#line 1804 "MachineIndependent/glslang.y" - { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtFloat; - (yyval.interm.type).setVector(2); - } -#line 7598 "MachineIndependent/glslang_tab.cpp" - break; - - case 227: /* type_specifier_nonarray: VEC3 */ -#line 1809 "MachineIndependent/glslang.y" - { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtFloat; - (yyval.interm.type).setVector(3); - } -#line 7608 "MachineIndependent/glslang_tab.cpp" - break; - - case 228: /* type_specifier_nonarray: VEC4 */ -#line 1814 "MachineIndependent/glslang.y" - { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtFloat; - (yyval.interm.type).setVector(4); - } -#line 7618 "MachineIndependent/glslang_tab.cpp" - break; - - case 229: /* type_specifier_nonarray: BVEC2 */ -#line 1819 "MachineIndependent/glslang.y" - { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtBool; - (yyval.interm.type).setVector(2); - } #line 7628 "MachineIndependent/glslang_tab.cpp" break; - case 230: /* type_specifier_nonarray: BVEC3 */ -#line 1824 "MachineIndependent/glslang.y" + case 226: /* type_specifier_nonarray: BOOL */ +#line 1806 "MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtBool; + } +#line 7637 "MachineIndependent/glslang_tab.cpp" + break; + + case 227: /* type_specifier_nonarray: VEC2 */ +#line 1810 "MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtFloat; + (yyval.interm.type).setVector(2); + } +#line 7647 "MachineIndependent/glslang_tab.cpp" + break; + + case 228: /* type_specifier_nonarray: VEC3 */ +#line 1815 "MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtFloat; + (yyval.interm.type).setVector(3); + } +#line 7657 "MachineIndependent/glslang_tab.cpp" + break; + + case 229: /* type_specifier_nonarray: VEC4 */ +#line 1820 "MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtFloat; + (yyval.interm.type).setVector(4); + } +#line 7667 "MachineIndependent/glslang_tab.cpp" + break; + + case 230: /* type_specifier_nonarray: BVEC2 */ +#line 1825 "MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtBool; + (yyval.interm.type).setVector(2); + } +#line 7677 "MachineIndependent/glslang_tab.cpp" + break; + + case 231: /* type_specifier_nonarray: BVEC3 */ +#line 1830 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtBool; (yyval.interm.type).setVector(3); } -#line 7638 "MachineIndependent/glslang_tab.cpp" +#line 7687 "MachineIndependent/glslang_tab.cpp" break; - case 231: /* type_specifier_nonarray: BVEC4 */ -#line 1829 "MachineIndependent/glslang.y" + case 232: /* type_specifier_nonarray: BVEC4 */ +#line 1835 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtBool; (yyval.interm.type).setVector(4); } -#line 7648 "MachineIndependent/glslang_tab.cpp" +#line 7697 "MachineIndependent/glslang_tab.cpp" break; - case 232: /* type_specifier_nonarray: IVEC2 */ -#line 1834 "MachineIndependent/glslang.y" + case 233: /* type_specifier_nonarray: IVEC2 */ +#line 1840 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtInt; (yyval.interm.type).setVector(2); } -#line 7658 "MachineIndependent/glslang_tab.cpp" +#line 7707 "MachineIndependent/glslang_tab.cpp" break; - case 233: /* type_specifier_nonarray: IVEC3 */ -#line 1839 "MachineIndependent/glslang.y" + case 234: /* type_specifier_nonarray: IVEC3 */ +#line 1845 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtInt; (yyval.interm.type).setVector(3); } -#line 7668 "MachineIndependent/glslang_tab.cpp" +#line 7717 "MachineIndependent/glslang_tab.cpp" break; - case 234: /* type_specifier_nonarray: IVEC4 */ -#line 1844 "MachineIndependent/glslang.y" + case 235: /* type_specifier_nonarray: IVEC4 */ +#line 1850 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtInt; (yyval.interm.type).setVector(4); } -#line 7678 "MachineIndependent/glslang_tab.cpp" +#line 7727 "MachineIndependent/glslang_tab.cpp" break; - case 235: /* type_specifier_nonarray: UVEC2 */ -#line 1849 "MachineIndependent/glslang.y" - { - 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 7689 "MachineIndependent/glslang_tab.cpp" - break; - - case 236: /* type_specifier_nonarray: UVEC3 */ + case 236: /* type_specifier_nonarray: UVEC2 */ #line 1855 "MachineIndependent/glslang.y" { 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); + (yyval.interm.type).setVector(2); } -#line 7700 "MachineIndependent/glslang_tab.cpp" +#line 7738 "MachineIndependent/glslang_tab.cpp" break; - case 237: /* type_specifier_nonarray: UVEC4 */ + case 237: /* type_specifier_nonarray: UVEC3 */ #line 1861 "MachineIndependent/glslang.y" { 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 7749 "MachineIndependent/glslang_tab.cpp" + break; + + case 238: /* type_specifier_nonarray: UVEC4 */ +#line 1867 "MachineIndependent/glslang.y" + { + 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 7711 "MachineIndependent/glslang_tab.cpp" +#line 7760 "MachineIndependent/glslang_tab.cpp" break; - case 238: /* type_specifier_nonarray: MAT2 */ -#line 1867 "MachineIndependent/glslang.y" + case 239: /* type_specifier_nonarray: MAT2 */ +#line 1873 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat; (yyval.interm.type).setMatrix(2, 2); } -#line 7721 "MachineIndependent/glslang_tab.cpp" +#line 7770 "MachineIndependent/glslang_tab.cpp" break; - case 239: /* type_specifier_nonarray: MAT3 */ -#line 1872 "MachineIndependent/glslang.y" + case 240: /* type_specifier_nonarray: MAT3 */ +#line 1878 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat; (yyval.interm.type).setMatrix(3, 3); } -#line 7731 "MachineIndependent/glslang_tab.cpp" +#line 7780 "MachineIndependent/glslang_tab.cpp" break; - case 240: /* type_specifier_nonarray: MAT4 */ -#line 1877 "MachineIndependent/glslang.y" + case 241: /* type_specifier_nonarray: MAT4 */ +#line 1883 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat; (yyval.interm.type).setMatrix(4, 4); } -#line 7741 "MachineIndependent/glslang_tab.cpp" +#line 7790 "MachineIndependent/glslang_tab.cpp" break; - case 241: /* type_specifier_nonarray: MAT2X2 */ -#line 1882 "MachineIndependent/glslang.y" + case 242: /* type_specifier_nonarray: MAT2X2 */ +#line 1888 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat; (yyval.interm.type).setMatrix(2, 2); } -#line 7751 "MachineIndependent/glslang_tab.cpp" +#line 7800 "MachineIndependent/glslang_tab.cpp" break; - case 242: /* type_specifier_nonarray: MAT2X3 */ -#line 1887 "MachineIndependent/glslang.y" + case 243: /* type_specifier_nonarray: MAT2X3 */ +#line 1893 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat; (yyval.interm.type).setMatrix(2, 3); } -#line 7761 "MachineIndependent/glslang_tab.cpp" +#line 7810 "MachineIndependent/glslang_tab.cpp" break; - case 243: /* type_specifier_nonarray: MAT2X4 */ -#line 1892 "MachineIndependent/glslang.y" + case 244: /* type_specifier_nonarray: MAT2X4 */ +#line 1898 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat; (yyval.interm.type).setMatrix(2, 4); } -#line 7771 "MachineIndependent/glslang_tab.cpp" +#line 7820 "MachineIndependent/glslang_tab.cpp" break; - case 244: /* type_specifier_nonarray: MAT3X2 */ -#line 1897 "MachineIndependent/glslang.y" + case 245: /* type_specifier_nonarray: MAT3X2 */ +#line 1903 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat; (yyval.interm.type).setMatrix(3, 2); } -#line 7781 "MachineIndependent/glslang_tab.cpp" +#line 7830 "MachineIndependent/glslang_tab.cpp" break; - case 245: /* type_specifier_nonarray: MAT3X3 */ -#line 1902 "MachineIndependent/glslang.y" + case 246: /* type_specifier_nonarray: MAT3X3 */ +#line 1908 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat; (yyval.interm.type).setMatrix(3, 3); } -#line 7791 "MachineIndependent/glslang_tab.cpp" +#line 7840 "MachineIndependent/glslang_tab.cpp" break; - case 246: /* type_specifier_nonarray: MAT3X4 */ -#line 1907 "MachineIndependent/glslang.y" + case 247: /* type_specifier_nonarray: MAT3X4 */ +#line 1913 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat; (yyval.interm.type).setMatrix(3, 4); } -#line 7801 "MachineIndependent/glslang_tab.cpp" +#line 7850 "MachineIndependent/glslang_tab.cpp" break; - case 247: /* type_specifier_nonarray: MAT4X2 */ -#line 1912 "MachineIndependent/glslang.y" + case 248: /* type_specifier_nonarray: MAT4X2 */ +#line 1918 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat; (yyval.interm.type).setMatrix(4, 2); } -#line 7811 "MachineIndependent/glslang_tab.cpp" +#line 7860 "MachineIndependent/glslang_tab.cpp" break; - case 248: /* type_specifier_nonarray: MAT4X3 */ -#line 1917 "MachineIndependent/glslang.y" + case 249: /* type_specifier_nonarray: MAT4X3 */ +#line 1923 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat; (yyval.interm.type).setMatrix(4, 3); } -#line 7821 "MachineIndependent/glslang_tab.cpp" +#line 7870 "MachineIndependent/glslang_tab.cpp" break; - case 249: /* type_specifier_nonarray: MAT4X4 */ -#line 1922 "MachineIndependent/glslang.y" + case 250: /* type_specifier_nonarray: MAT4X4 */ +#line 1928 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat; (yyval.interm.type).setMatrix(4, 4); } -#line 7831 "MachineIndependent/glslang_tab.cpp" +#line 7880 "MachineIndependent/glslang_tab.cpp" break; - case 250: /* type_specifier_nonarray: DOUBLE */ -#line 1927 "MachineIndependent/glslang.y" + case 251: /* type_specifier_nonarray: DOUBLE */ +#line 1933 "MachineIndependent/glslang.y" { parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double"); if (! parseContext.symbolTable.atBuiltInLevel()) @@ -7839,121 +7888,121 @@ yyreduce: (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtDouble; } -#line 7843 "MachineIndependent/glslang_tab.cpp" +#line 7892 "MachineIndependent/glslang_tab.cpp" break; - case 251: /* type_specifier_nonarray: FLOAT16_T */ -#line 1934 "MachineIndependent/glslang.y" + case 252: /* type_specifier_nonarray: FLOAT16_T */ +#line 1940 "MachineIndependent/glslang.y" { 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 7853 "MachineIndependent/glslang_tab.cpp" +#line 7902 "MachineIndependent/glslang_tab.cpp" break; - case 252: /* type_specifier_nonarray: FLOAT32_T */ -#line 1939 "MachineIndependent/glslang.y" + case 253: /* type_specifier_nonarray: FLOAT32_T */ +#line 1945 "MachineIndependent/glslang.y" { 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 7863 "MachineIndependent/glslang_tab.cpp" +#line 7912 "MachineIndependent/glslang_tab.cpp" break; - case 253: /* type_specifier_nonarray: FLOAT64_T */ -#line 1944 "MachineIndependent/glslang.y" + case 254: /* type_specifier_nonarray: FLOAT64_T */ +#line 1950 "MachineIndependent/glslang.y" { 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 7873 "MachineIndependent/glslang_tab.cpp" +#line 7922 "MachineIndependent/glslang_tab.cpp" break; - case 254: /* type_specifier_nonarray: INT8_T */ -#line 1949 "MachineIndependent/glslang.y" + case 255: /* type_specifier_nonarray: INT8_T */ +#line 1955 "MachineIndependent/glslang.y" { 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 7883 "MachineIndependent/glslang_tab.cpp" +#line 7932 "MachineIndependent/glslang_tab.cpp" break; - case 255: /* type_specifier_nonarray: UINT8_T */ -#line 1954 "MachineIndependent/glslang.y" + case 256: /* type_specifier_nonarray: UINT8_T */ +#line 1960 "MachineIndependent/glslang.y" { 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 7893 "MachineIndependent/glslang_tab.cpp" +#line 7942 "MachineIndependent/glslang_tab.cpp" break; - case 256: /* type_specifier_nonarray: INT16_T */ -#line 1959 "MachineIndependent/glslang.y" + case 257: /* type_specifier_nonarray: INT16_T */ +#line 1965 "MachineIndependent/glslang.y" { 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 7903 "MachineIndependent/glslang_tab.cpp" +#line 7952 "MachineIndependent/glslang_tab.cpp" break; - case 257: /* type_specifier_nonarray: UINT16_T */ -#line 1964 "MachineIndependent/glslang.y" + case 258: /* type_specifier_nonarray: UINT16_T */ +#line 1970 "MachineIndependent/glslang.y" { 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 7913 "MachineIndependent/glslang_tab.cpp" +#line 7962 "MachineIndependent/glslang_tab.cpp" break; - case 258: /* type_specifier_nonarray: INT32_T */ -#line 1969 "MachineIndependent/glslang.y" + case 259: /* type_specifier_nonarray: INT32_T */ +#line 1975 "MachineIndependent/glslang.y" { 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 7923 "MachineIndependent/glslang_tab.cpp" +#line 7972 "MachineIndependent/glslang_tab.cpp" break; - case 259: /* type_specifier_nonarray: UINT32_T */ -#line 1974 "MachineIndependent/glslang.y" + case 260: /* type_specifier_nonarray: UINT32_T */ +#line 1980 "MachineIndependent/glslang.y" { 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 7933 "MachineIndependent/glslang_tab.cpp" +#line 7982 "MachineIndependent/glslang_tab.cpp" break; - case 260: /* type_specifier_nonarray: INT64_T */ -#line 1979 "MachineIndependent/glslang.y" + case 261: /* type_specifier_nonarray: INT64_T */ +#line 1985 "MachineIndependent/glslang.y" { 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 7943 "MachineIndependent/glslang_tab.cpp" +#line 7992 "MachineIndependent/glslang_tab.cpp" break; - case 261: /* type_specifier_nonarray: UINT64_T */ -#line 1984 "MachineIndependent/glslang.y" + case 262: /* type_specifier_nonarray: UINT64_T */ +#line 1990 "MachineIndependent/glslang.y" { 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 7953 "MachineIndependent/glslang_tab.cpp" +#line 8002 "MachineIndependent/glslang_tab.cpp" break; - case 262: /* type_specifier_nonarray: DVEC2 */ -#line 1989 "MachineIndependent/glslang.y" + case 263: /* type_specifier_nonarray: DVEC2 */ +#line 1995 "MachineIndependent/glslang.y" { parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double vector"); if (! parseContext.symbolTable.atBuiltInLevel()) @@ -7962,11 +8011,11 @@ yyreduce: (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setVector(2); } -#line 7966 "MachineIndependent/glslang_tab.cpp" +#line 8015 "MachineIndependent/glslang_tab.cpp" break; - case 263: /* type_specifier_nonarray: DVEC3 */ -#line 1997 "MachineIndependent/glslang.y" + case 264: /* type_specifier_nonarray: DVEC3 */ +#line 2003 "MachineIndependent/glslang.y" { parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double vector"); if (! parseContext.symbolTable.atBuiltInLevel()) @@ -7975,11 +8024,11 @@ yyreduce: (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setVector(3); } -#line 7979 "MachineIndependent/glslang_tab.cpp" +#line 8028 "MachineIndependent/glslang_tab.cpp" break; - case 264: /* type_specifier_nonarray: DVEC4 */ -#line 2005 "MachineIndependent/glslang.y" + case 265: /* type_specifier_nonarray: DVEC4 */ +#line 2011 "MachineIndependent/glslang.y" { parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double vector"); if (! parseContext.symbolTable.atBuiltInLevel()) @@ -7988,374 +8037,374 @@ yyreduce: (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setVector(4); } -#line 7992 "MachineIndependent/glslang_tab.cpp" +#line 8041 "MachineIndependent/glslang_tab.cpp" break; - case 265: /* type_specifier_nonarray: F16VEC2 */ -#line 2013 "MachineIndependent/glslang.y" - { - 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 8003 "MachineIndependent/glslang_tab.cpp" - break; - - case 266: /* type_specifier_nonarray: F16VEC3 */ + case 266: /* type_specifier_nonarray: F16VEC2 */ #line 2019 "MachineIndependent/glslang.y" { 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); + (yyval.interm.type).setVector(2); } -#line 8014 "MachineIndependent/glslang_tab.cpp" +#line 8052 "MachineIndependent/glslang_tab.cpp" break; - case 267: /* type_specifier_nonarray: F16VEC4 */ + case 267: /* type_specifier_nonarray: F16VEC3 */ #line 2025 "MachineIndependent/glslang.y" { 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 8063 "MachineIndependent/glslang_tab.cpp" + break; + + case 268: /* type_specifier_nonarray: F16VEC4 */ +#line 2031 "MachineIndependent/glslang.y" + { + 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 8025 "MachineIndependent/glslang_tab.cpp" +#line 8074 "MachineIndependent/glslang_tab.cpp" break; - case 268: /* type_specifier_nonarray: F32VEC2 */ -#line 2031 "MachineIndependent/glslang.y" - { - 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 8036 "MachineIndependent/glslang_tab.cpp" - break; - - case 269: /* type_specifier_nonarray: F32VEC3 */ + case 269: /* type_specifier_nonarray: F32VEC2 */ #line 2037 "MachineIndependent/glslang.y" { 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); + (yyval.interm.type).setVector(2); } -#line 8047 "MachineIndependent/glslang_tab.cpp" +#line 8085 "MachineIndependent/glslang_tab.cpp" break; - case 270: /* type_specifier_nonarray: F32VEC4 */ + case 270: /* type_specifier_nonarray: F32VEC3 */ #line 2043 "MachineIndependent/glslang.y" { 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 8096 "MachineIndependent/glslang_tab.cpp" + break; + + case 271: /* type_specifier_nonarray: F32VEC4 */ +#line 2049 "MachineIndependent/glslang.y" + { + 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 8058 "MachineIndependent/glslang_tab.cpp" +#line 8107 "MachineIndependent/glslang_tab.cpp" break; - case 271: /* type_specifier_nonarray: F64VEC2 */ -#line 2049 "MachineIndependent/glslang.y" - { - 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 8069 "MachineIndependent/glslang_tab.cpp" - break; - - case 272: /* type_specifier_nonarray: F64VEC3 */ + case 272: /* type_specifier_nonarray: F64VEC2 */ #line 2055 "MachineIndependent/glslang.y" { 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); + (yyval.interm.type).setVector(2); } -#line 8080 "MachineIndependent/glslang_tab.cpp" +#line 8118 "MachineIndependent/glslang_tab.cpp" break; - case 273: /* type_specifier_nonarray: F64VEC4 */ + case 273: /* type_specifier_nonarray: F64VEC3 */ #line 2061 "MachineIndependent/glslang.y" { 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 8129 "MachineIndependent/glslang_tab.cpp" + break; + + case 274: /* type_specifier_nonarray: F64VEC4 */ +#line 2067 "MachineIndependent/glslang.y" + { + 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 8091 "MachineIndependent/glslang_tab.cpp" +#line 8140 "MachineIndependent/glslang_tab.cpp" break; - case 274: /* type_specifier_nonarray: I8VEC2 */ -#line 2067 "MachineIndependent/glslang.y" - { - 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 8102 "MachineIndependent/glslang_tab.cpp" - break; - - case 275: /* type_specifier_nonarray: I8VEC3 */ + case 275: /* type_specifier_nonarray: I8VEC2 */ #line 2073 "MachineIndependent/glslang.y" { 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); + (yyval.interm.type).setVector(2); } -#line 8113 "MachineIndependent/glslang_tab.cpp" +#line 8151 "MachineIndependent/glslang_tab.cpp" break; - case 276: /* type_specifier_nonarray: I8VEC4 */ + case 276: /* type_specifier_nonarray: I8VEC3 */ #line 2079 "MachineIndependent/glslang.y" { 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 8162 "MachineIndependent/glslang_tab.cpp" + break; + + case 277: /* type_specifier_nonarray: I8VEC4 */ +#line 2085 "MachineIndependent/glslang.y" + { + 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 8124 "MachineIndependent/glslang_tab.cpp" +#line 8173 "MachineIndependent/glslang_tab.cpp" break; - case 277: /* type_specifier_nonarray: I16VEC2 */ -#line 2085 "MachineIndependent/glslang.y" - { - 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 8135 "MachineIndependent/glslang_tab.cpp" - break; - - case 278: /* type_specifier_nonarray: I16VEC3 */ + case 278: /* type_specifier_nonarray: I16VEC2 */ #line 2091 "MachineIndependent/glslang.y" { 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); + (yyval.interm.type).setVector(2); } -#line 8146 "MachineIndependent/glslang_tab.cpp" +#line 8184 "MachineIndependent/glslang_tab.cpp" break; - case 279: /* type_specifier_nonarray: I16VEC4 */ + case 279: /* type_specifier_nonarray: I16VEC3 */ #line 2097 "MachineIndependent/glslang.y" { 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 8195 "MachineIndependent/glslang_tab.cpp" + break; + + case 280: /* type_specifier_nonarray: I16VEC4 */ +#line 2103 "MachineIndependent/glslang.y" + { + 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 8157 "MachineIndependent/glslang_tab.cpp" +#line 8206 "MachineIndependent/glslang_tab.cpp" break; - case 280: /* type_specifier_nonarray: I32VEC2 */ -#line 2103 "MachineIndependent/glslang.y" - { - 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 8168 "MachineIndependent/glslang_tab.cpp" - break; - - case 281: /* type_specifier_nonarray: I32VEC3 */ + case 281: /* type_specifier_nonarray: I32VEC2 */ #line 2109 "MachineIndependent/glslang.y" { 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); + (yyval.interm.type).setVector(2); } -#line 8179 "MachineIndependent/glslang_tab.cpp" +#line 8217 "MachineIndependent/glslang_tab.cpp" break; - case 282: /* type_specifier_nonarray: I32VEC4 */ + case 282: /* type_specifier_nonarray: I32VEC3 */ #line 2115 "MachineIndependent/glslang.y" { 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 8228 "MachineIndependent/glslang_tab.cpp" + break; + + case 283: /* type_specifier_nonarray: I32VEC4 */ +#line 2121 "MachineIndependent/glslang.y" + { + 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 8190 "MachineIndependent/glslang_tab.cpp" +#line 8239 "MachineIndependent/glslang_tab.cpp" break; - case 283: /* type_specifier_nonarray: I64VEC2 */ -#line 2121 "MachineIndependent/glslang.y" - { - 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 8201 "MachineIndependent/glslang_tab.cpp" - break; - - case 284: /* type_specifier_nonarray: I64VEC3 */ + case 284: /* type_specifier_nonarray: I64VEC2 */ #line 2127 "MachineIndependent/glslang.y" { 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); + (yyval.interm.type).setVector(2); } -#line 8212 "MachineIndependent/glslang_tab.cpp" +#line 8250 "MachineIndependent/glslang_tab.cpp" break; - case 285: /* type_specifier_nonarray: I64VEC4 */ + case 285: /* type_specifier_nonarray: I64VEC3 */ #line 2133 "MachineIndependent/glslang.y" { 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 8261 "MachineIndependent/glslang_tab.cpp" + break; + + case 286: /* type_specifier_nonarray: I64VEC4 */ +#line 2139 "MachineIndependent/glslang.y" + { + 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 8223 "MachineIndependent/glslang_tab.cpp" +#line 8272 "MachineIndependent/glslang_tab.cpp" break; - case 286: /* type_specifier_nonarray: U8VEC2 */ -#line 2139 "MachineIndependent/glslang.y" - { - 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 8234 "MachineIndependent/glslang_tab.cpp" - break; - - case 287: /* type_specifier_nonarray: U8VEC3 */ + case 287: /* type_specifier_nonarray: U8VEC2 */ #line 2145 "MachineIndependent/glslang.y" { 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); + (yyval.interm.type).setVector(2); } -#line 8245 "MachineIndependent/glslang_tab.cpp" +#line 8283 "MachineIndependent/glslang_tab.cpp" break; - case 288: /* type_specifier_nonarray: U8VEC4 */ + case 288: /* type_specifier_nonarray: U8VEC3 */ #line 2151 "MachineIndependent/glslang.y" { 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 8294 "MachineIndependent/glslang_tab.cpp" + break; + + case 289: /* type_specifier_nonarray: U8VEC4 */ +#line 2157 "MachineIndependent/glslang.y" + { + 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 8256 "MachineIndependent/glslang_tab.cpp" +#line 8305 "MachineIndependent/glslang_tab.cpp" break; - case 289: /* type_specifier_nonarray: U16VEC2 */ -#line 2157 "MachineIndependent/glslang.y" - { - 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 8267 "MachineIndependent/glslang_tab.cpp" - break; - - case 290: /* type_specifier_nonarray: U16VEC3 */ + case 290: /* type_specifier_nonarray: U16VEC2 */ #line 2163 "MachineIndependent/glslang.y" { 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); + (yyval.interm.type).setVector(2); } -#line 8278 "MachineIndependent/glslang_tab.cpp" +#line 8316 "MachineIndependent/glslang_tab.cpp" break; - case 291: /* type_specifier_nonarray: U16VEC4 */ + case 291: /* type_specifier_nonarray: U16VEC3 */ #line 2169 "MachineIndependent/glslang.y" { 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 8327 "MachineIndependent/glslang_tab.cpp" + break; + + case 292: /* type_specifier_nonarray: U16VEC4 */ +#line 2175 "MachineIndependent/glslang.y" + { + 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 8289 "MachineIndependent/glslang_tab.cpp" +#line 8338 "MachineIndependent/glslang_tab.cpp" break; - case 292: /* type_specifier_nonarray: U32VEC2 */ -#line 2175 "MachineIndependent/glslang.y" - { - 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 8300 "MachineIndependent/glslang_tab.cpp" - break; - - case 293: /* type_specifier_nonarray: U32VEC3 */ + case 293: /* type_specifier_nonarray: U32VEC2 */ #line 2181 "MachineIndependent/glslang.y" { 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); + (yyval.interm.type).setVector(2); } -#line 8311 "MachineIndependent/glslang_tab.cpp" +#line 8349 "MachineIndependent/glslang_tab.cpp" break; - case 294: /* type_specifier_nonarray: U32VEC4 */ + case 294: /* type_specifier_nonarray: U32VEC3 */ #line 2187 "MachineIndependent/glslang.y" { 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 8360 "MachineIndependent/glslang_tab.cpp" + break; + + case 295: /* type_specifier_nonarray: U32VEC4 */ +#line 2193 "MachineIndependent/glslang.y" + { + 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 8322 "MachineIndependent/glslang_tab.cpp" +#line 8371 "MachineIndependent/glslang_tab.cpp" break; - case 295: /* type_specifier_nonarray: U64VEC2 */ -#line 2193 "MachineIndependent/glslang.y" + case 296: /* type_specifier_nonarray: U64VEC2 */ +#line 2199 "MachineIndependent/glslang.y" { 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 8333 "MachineIndependent/glslang_tab.cpp" +#line 8382 "MachineIndependent/glslang_tab.cpp" break; - case 296: /* type_specifier_nonarray: U64VEC3 */ -#line 2199 "MachineIndependent/glslang.y" + case 297: /* type_specifier_nonarray: U64VEC3 */ +#line 2205 "MachineIndependent/glslang.y" { 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 8344 "MachineIndependent/glslang_tab.cpp" +#line 8393 "MachineIndependent/glslang_tab.cpp" break; - case 297: /* type_specifier_nonarray: U64VEC4 */ -#line 2205 "MachineIndependent/glslang.y" + case 298: /* type_specifier_nonarray: U64VEC4 */ +#line 2211 "MachineIndependent/glslang.y" { 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 8355 "MachineIndependent/glslang_tab.cpp" +#line 8404 "MachineIndependent/glslang_tab.cpp" break; - case 298: /* type_specifier_nonarray: DMAT2 */ -#line 2211 "MachineIndependent/glslang.y" + case 299: /* type_specifier_nonarray: DMAT2 */ +#line 2217 "MachineIndependent/glslang.y" { parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double matrix"); if (! parseContext.symbolTable.atBuiltInLevel()) @@ -8364,11 +8413,11 @@ yyreduce: (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setMatrix(2, 2); } -#line 8368 "MachineIndependent/glslang_tab.cpp" +#line 8417 "MachineIndependent/glslang_tab.cpp" break; - case 299: /* type_specifier_nonarray: DMAT3 */ -#line 2219 "MachineIndependent/glslang.y" + case 300: /* type_specifier_nonarray: DMAT3 */ +#line 2225 "MachineIndependent/glslang.y" { parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double matrix"); if (! parseContext.symbolTable.atBuiltInLevel()) @@ -8377,11 +8426,11 @@ yyreduce: (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setMatrix(3, 3); } -#line 8381 "MachineIndependent/glslang_tab.cpp" +#line 8430 "MachineIndependent/glslang_tab.cpp" break; - case 300: /* type_specifier_nonarray: DMAT4 */ -#line 2227 "MachineIndependent/glslang.y" + case 301: /* type_specifier_nonarray: DMAT4 */ +#line 2233 "MachineIndependent/glslang.y" { parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double matrix"); if (! parseContext.symbolTable.atBuiltInLevel()) @@ -8390,11 +8439,11 @@ yyreduce: (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setMatrix(4, 4); } -#line 8394 "MachineIndependent/glslang_tab.cpp" +#line 8443 "MachineIndependent/glslang_tab.cpp" break; - case 301: /* type_specifier_nonarray: DMAT2X2 */ -#line 2235 "MachineIndependent/glslang.y" + case 302: /* type_specifier_nonarray: DMAT2X2 */ +#line 2241 "MachineIndependent/glslang.y" { parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double matrix"); if (! parseContext.symbolTable.atBuiltInLevel()) @@ -8403,11 +8452,11 @@ yyreduce: (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setMatrix(2, 2); } -#line 8407 "MachineIndependent/glslang_tab.cpp" +#line 8456 "MachineIndependent/glslang_tab.cpp" break; - case 302: /* type_specifier_nonarray: DMAT2X3 */ -#line 2243 "MachineIndependent/glslang.y" + case 303: /* type_specifier_nonarray: DMAT2X3 */ +#line 2249 "MachineIndependent/glslang.y" { parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double matrix"); if (! parseContext.symbolTable.atBuiltInLevel()) @@ -8416,11 +8465,11 @@ yyreduce: (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setMatrix(2, 3); } -#line 8420 "MachineIndependent/glslang_tab.cpp" +#line 8469 "MachineIndependent/glslang_tab.cpp" break; - case 303: /* type_specifier_nonarray: DMAT2X4 */ -#line 2251 "MachineIndependent/glslang.y" + case 304: /* type_specifier_nonarray: DMAT2X4 */ +#line 2257 "MachineIndependent/glslang.y" { parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double matrix"); if (! parseContext.symbolTable.atBuiltInLevel()) @@ -8429,11 +8478,11 @@ yyreduce: (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setMatrix(2, 4); } -#line 8433 "MachineIndependent/glslang_tab.cpp" +#line 8482 "MachineIndependent/glslang_tab.cpp" break; - case 304: /* type_specifier_nonarray: DMAT3X2 */ -#line 2259 "MachineIndependent/glslang.y" + case 305: /* type_specifier_nonarray: DMAT3X2 */ +#line 2265 "MachineIndependent/glslang.y" { parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double matrix"); if (! parseContext.symbolTable.atBuiltInLevel()) @@ -8442,11 +8491,11 @@ yyreduce: (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setMatrix(3, 2); } -#line 8446 "MachineIndependent/glslang_tab.cpp" +#line 8495 "MachineIndependent/glslang_tab.cpp" break; - case 305: /* type_specifier_nonarray: DMAT3X3 */ -#line 2267 "MachineIndependent/glslang.y" + case 306: /* type_specifier_nonarray: DMAT3X3 */ +#line 2273 "MachineIndependent/glslang.y" { parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double matrix"); if (! parseContext.symbolTable.atBuiltInLevel()) @@ -8455,11 +8504,11 @@ yyreduce: (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setMatrix(3, 3); } -#line 8459 "MachineIndependent/glslang_tab.cpp" +#line 8508 "MachineIndependent/glslang_tab.cpp" break; - case 306: /* type_specifier_nonarray: DMAT3X4 */ -#line 2275 "MachineIndependent/glslang.y" + case 307: /* type_specifier_nonarray: DMAT3X4 */ +#line 2281 "MachineIndependent/glslang.y" { parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double matrix"); if (! parseContext.symbolTable.atBuiltInLevel()) @@ -8468,11 +8517,11 @@ yyreduce: (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setMatrix(3, 4); } -#line 8472 "MachineIndependent/glslang_tab.cpp" +#line 8521 "MachineIndependent/glslang_tab.cpp" break; - case 307: /* type_specifier_nonarray: DMAT4X2 */ -#line 2283 "MachineIndependent/glslang.y" + case 308: /* type_specifier_nonarray: DMAT4X2 */ +#line 2289 "MachineIndependent/glslang.y" { parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double matrix"); if (! parseContext.symbolTable.atBuiltInLevel()) @@ -8481,11 +8530,11 @@ yyreduce: (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setMatrix(4, 2); } -#line 8485 "MachineIndependent/glslang_tab.cpp" +#line 8534 "MachineIndependent/glslang_tab.cpp" break; - case 308: /* type_specifier_nonarray: DMAT4X3 */ -#line 2291 "MachineIndependent/glslang.y" + case 309: /* type_specifier_nonarray: DMAT4X3 */ +#line 2297 "MachineIndependent/glslang.y" { parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double matrix"); if (! parseContext.symbolTable.atBuiltInLevel()) @@ -8494,11 +8543,11 @@ yyreduce: (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setMatrix(4, 3); } -#line 8498 "MachineIndependent/glslang_tab.cpp" +#line 8547 "MachineIndependent/glslang_tab.cpp" break; - case 309: /* type_specifier_nonarray: DMAT4X4 */ -#line 2299 "MachineIndependent/glslang.y" + case 310: /* type_specifier_nonarray: DMAT4X4 */ +#line 2305 "MachineIndependent/glslang.y" { parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double matrix"); if (! parseContext.symbolTable.atBuiltInLevel()) @@ -8507,2261 +8556,2261 @@ yyreduce: (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setMatrix(4, 4); } -#line 8511 "MachineIndependent/glslang_tab.cpp" +#line 8560 "MachineIndependent/glslang_tab.cpp" break; - case 310: /* type_specifier_nonarray: F16MAT2 */ -#line 2307 "MachineIndependent/glslang.y" - { - 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 8522 "MachineIndependent/glslang_tab.cpp" - break; - - case 311: /* type_specifier_nonarray: F16MAT3 */ + case 311: /* type_specifier_nonarray: F16MAT2 */ #line 2313 "MachineIndependent/glslang.y" { 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); + (yyval.interm.type).setMatrix(2, 2); } -#line 8533 "MachineIndependent/glslang_tab.cpp" +#line 8571 "MachineIndependent/glslang_tab.cpp" break; - case 312: /* type_specifier_nonarray: F16MAT4 */ + case 312: /* type_specifier_nonarray: F16MAT3 */ #line 2319 "MachineIndependent/glslang.y" { 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); + (yyval.interm.type).setMatrix(3, 3); } -#line 8544 "MachineIndependent/glslang_tab.cpp" +#line 8582 "MachineIndependent/glslang_tab.cpp" break; - case 313: /* type_specifier_nonarray: F16MAT2X2 */ + case 313: /* type_specifier_nonarray: F16MAT4 */ #line 2325 "MachineIndependent/glslang.y" - { + { 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); + (yyval.interm.type).setMatrix(4, 4); } -#line 8555 "MachineIndependent/glslang_tab.cpp" +#line 8593 "MachineIndependent/glslang_tab.cpp" break; - case 314: /* type_specifier_nonarray: F16MAT2X3 */ + case 314: /* type_specifier_nonarray: F16MAT2X2 */ #line 2331 "MachineIndependent/glslang.y" { 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); + (yyval.interm.type).setMatrix(2, 2); } -#line 8566 "MachineIndependent/glslang_tab.cpp" +#line 8604 "MachineIndependent/glslang_tab.cpp" break; - case 315: /* type_specifier_nonarray: F16MAT2X4 */ + case 315: /* type_specifier_nonarray: F16MAT2X3 */ #line 2337 "MachineIndependent/glslang.y" { 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); + (yyval.interm.type).setMatrix(2, 3); } -#line 8577 "MachineIndependent/glslang_tab.cpp" +#line 8615 "MachineIndependent/glslang_tab.cpp" break; - case 316: /* type_specifier_nonarray: F16MAT3X2 */ + case 316: /* type_specifier_nonarray: F16MAT2X4 */ #line 2343 "MachineIndependent/glslang.y" { 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); + (yyval.interm.type).setMatrix(2, 4); } -#line 8588 "MachineIndependent/glslang_tab.cpp" +#line 8626 "MachineIndependent/glslang_tab.cpp" break; - case 317: /* type_specifier_nonarray: F16MAT3X3 */ + case 317: /* type_specifier_nonarray: F16MAT3X2 */ #line 2349 "MachineIndependent/glslang.y" { 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); + (yyval.interm.type).setMatrix(3, 2); } -#line 8599 "MachineIndependent/glslang_tab.cpp" +#line 8637 "MachineIndependent/glslang_tab.cpp" break; - case 318: /* type_specifier_nonarray: F16MAT3X4 */ + case 318: /* type_specifier_nonarray: F16MAT3X3 */ #line 2355 "MachineIndependent/glslang.y" { 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); + (yyval.interm.type).setMatrix(3, 3); } -#line 8610 "MachineIndependent/glslang_tab.cpp" +#line 8648 "MachineIndependent/glslang_tab.cpp" break; - case 319: /* type_specifier_nonarray: F16MAT4X2 */ + case 319: /* type_specifier_nonarray: F16MAT3X4 */ #line 2361 "MachineIndependent/glslang.y" { 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); + (yyval.interm.type).setMatrix(3, 4); } -#line 8621 "MachineIndependent/glslang_tab.cpp" +#line 8659 "MachineIndependent/glslang_tab.cpp" break; - case 320: /* type_specifier_nonarray: F16MAT4X3 */ + case 320: /* type_specifier_nonarray: F16MAT4X2 */ #line 2367 "MachineIndependent/glslang.y" { 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); + (yyval.interm.type).setMatrix(4, 2); } -#line 8632 "MachineIndependent/glslang_tab.cpp" +#line 8670 "MachineIndependent/glslang_tab.cpp" break; - case 321: /* type_specifier_nonarray: F16MAT4X4 */ + case 321: /* type_specifier_nonarray: F16MAT4X3 */ #line 2373 "MachineIndependent/glslang.y" { 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 8681 "MachineIndependent/glslang_tab.cpp" + break; + + case 322: /* type_specifier_nonarray: F16MAT4X4 */ +#line 2379 "MachineIndependent/glslang.y" + { + 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 8643 "MachineIndependent/glslang_tab.cpp" +#line 8692 "MachineIndependent/glslang_tab.cpp" break; - case 322: /* type_specifier_nonarray: F32MAT2 */ -#line 2379 "MachineIndependent/glslang.y" - { - 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 8654 "MachineIndependent/glslang_tab.cpp" - break; - - case 323: /* type_specifier_nonarray: F32MAT3 */ + case 323: /* type_specifier_nonarray: F32MAT2 */ #line 2385 "MachineIndependent/glslang.y" { 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); + (yyval.interm.type).setMatrix(2, 2); } -#line 8665 "MachineIndependent/glslang_tab.cpp" +#line 8703 "MachineIndependent/glslang_tab.cpp" break; - case 324: /* type_specifier_nonarray: F32MAT4 */ + case 324: /* type_specifier_nonarray: F32MAT3 */ #line 2391 "MachineIndependent/glslang.y" { 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); + (yyval.interm.type).setMatrix(3, 3); } -#line 8676 "MachineIndependent/glslang_tab.cpp" +#line 8714 "MachineIndependent/glslang_tab.cpp" break; - case 325: /* type_specifier_nonarray: F32MAT2X2 */ + case 325: /* type_specifier_nonarray: F32MAT4 */ #line 2397 "MachineIndependent/glslang.y" - { + { 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); + (yyval.interm.type).setMatrix(4, 4); } -#line 8687 "MachineIndependent/glslang_tab.cpp" +#line 8725 "MachineIndependent/glslang_tab.cpp" break; - case 326: /* type_specifier_nonarray: F32MAT2X3 */ + case 326: /* type_specifier_nonarray: F32MAT2X2 */ #line 2403 "MachineIndependent/glslang.y" { 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); + (yyval.interm.type).setMatrix(2, 2); } -#line 8698 "MachineIndependent/glslang_tab.cpp" +#line 8736 "MachineIndependent/glslang_tab.cpp" break; - case 327: /* type_specifier_nonarray: F32MAT2X4 */ + case 327: /* type_specifier_nonarray: F32MAT2X3 */ #line 2409 "MachineIndependent/glslang.y" { 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); + (yyval.interm.type).setMatrix(2, 3); } -#line 8709 "MachineIndependent/glslang_tab.cpp" +#line 8747 "MachineIndependent/glslang_tab.cpp" break; - case 328: /* type_specifier_nonarray: F32MAT3X2 */ + case 328: /* type_specifier_nonarray: F32MAT2X4 */ #line 2415 "MachineIndependent/glslang.y" { 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 8758 "MachineIndependent/glslang_tab.cpp" + break; + + case 329: /* type_specifier_nonarray: F32MAT3X2 */ +#line 2421 "MachineIndependent/glslang.y" + { + 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 8720 "MachineIndependent/glslang_tab.cpp" +#line 8769 "MachineIndependent/glslang_tab.cpp" break; - case 329: /* type_specifier_nonarray: F32MAT3X3 */ -#line 2421 "MachineIndependent/glslang.y" + case 330: /* type_specifier_nonarray: F32MAT3X3 */ +#line 2427 "MachineIndependent/glslang.y" { 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 8731 "MachineIndependent/glslang_tab.cpp" +#line 8780 "MachineIndependent/glslang_tab.cpp" break; - case 330: /* type_specifier_nonarray: F32MAT3X4 */ -#line 2427 "MachineIndependent/glslang.y" + case 331: /* type_specifier_nonarray: F32MAT3X4 */ +#line 2433 "MachineIndependent/glslang.y" { 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 8742 "MachineIndependent/glslang_tab.cpp" +#line 8791 "MachineIndependent/glslang_tab.cpp" break; - case 331: /* type_specifier_nonarray: F32MAT4X2 */ -#line 2433 "MachineIndependent/glslang.y" + case 332: /* type_specifier_nonarray: F32MAT4X2 */ +#line 2439 "MachineIndependent/glslang.y" { 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 8753 "MachineIndependent/glslang_tab.cpp" +#line 8802 "MachineIndependent/glslang_tab.cpp" break; - case 332: /* type_specifier_nonarray: F32MAT4X3 */ -#line 2439 "MachineIndependent/glslang.y" + case 333: /* type_specifier_nonarray: F32MAT4X3 */ +#line 2445 "MachineIndependent/glslang.y" { 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 8764 "MachineIndependent/glslang_tab.cpp" +#line 8813 "MachineIndependent/glslang_tab.cpp" break; - case 333: /* type_specifier_nonarray: F32MAT4X4 */ -#line 2445 "MachineIndependent/glslang.y" + case 334: /* type_specifier_nonarray: F32MAT4X4 */ +#line 2451 "MachineIndependent/glslang.y" { 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 8775 "MachineIndependent/glslang_tab.cpp" +#line 8824 "MachineIndependent/glslang_tab.cpp" break; - case 334: /* type_specifier_nonarray: F64MAT2 */ -#line 2451 "MachineIndependent/glslang.y" + case 335: /* type_specifier_nonarray: F64MAT2 */ +#line 2457 "MachineIndependent/glslang.y" { 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 8786 "MachineIndependent/glslang_tab.cpp" +#line 8835 "MachineIndependent/glslang_tab.cpp" break; - case 335: /* type_specifier_nonarray: F64MAT3 */ -#line 2457 "MachineIndependent/glslang.y" + case 336: /* type_specifier_nonarray: F64MAT3 */ +#line 2463 "MachineIndependent/glslang.y" { 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 8797 "MachineIndependent/glslang_tab.cpp" +#line 8846 "MachineIndependent/glslang_tab.cpp" break; - case 336: /* type_specifier_nonarray: F64MAT4 */ -#line 2463 "MachineIndependent/glslang.y" + case 337: /* type_specifier_nonarray: F64MAT4 */ +#line 2469 "MachineIndependent/glslang.y" { 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 8808 "MachineIndependent/glslang_tab.cpp" +#line 8857 "MachineIndependent/glslang_tab.cpp" break; - case 337: /* type_specifier_nonarray: F64MAT2X2 */ -#line 2469 "MachineIndependent/glslang.y" + case 338: /* type_specifier_nonarray: F64MAT2X2 */ +#line 2475 "MachineIndependent/glslang.y" { 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 8819 "MachineIndependent/glslang_tab.cpp" +#line 8868 "MachineIndependent/glslang_tab.cpp" break; - case 338: /* type_specifier_nonarray: F64MAT2X3 */ -#line 2475 "MachineIndependent/glslang.y" + case 339: /* type_specifier_nonarray: F64MAT2X3 */ +#line 2481 "MachineIndependent/glslang.y" { 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 8830 "MachineIndependent/glslang_tab.cpp" +#line 8879 "MachineIndependent/glslang_tab.cpp" break; - case 339: /* type_specifier_nonarray: F64MAT2X4 */ -#line 2481 "MachineIndependent/glslang.y" + case 340: /* type_specifier_nonarray: F64MAT2X4 */ +#line 2487 "MachineIndependent/glslang.y" { 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 8841 "MachineIndependent/glslang_tab.cpp" +#line 8890 "MachineIndependent/glslang_tab.cpp" break; - case 340: /* type_specifier_nonarray: F64MAT3X2 */ -#line 2487 "MachineIndependent/glslang.y" + case 341: /* type_specifier_nonarray: F64MAT3X2 */ +#line 2493 "MachineIndependent/glslang.y" { 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 8852 "MachineIndependent/glslang_tab.cpp" +#line 8901 "MachineIndependent/glslang_tab.cpp" break; - case 341: /* type_specifier_nonarray: F64MAT3X3 */ -#line 2493 "MachineIndependent/glslang.y" + case 342: /* type_specifier_nonarray: F64MAT3X3 */ +#line 2499 "MachineIndependent/glslang.y" { 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 8863 "MachineIndependent/glslang_tab.cpp" +#line 8912 "MachineIndependent/glslang_tab.cpp" break; - case 342: /* type_specifier_nonarray: F64MAT3X4 */ -#line 2499 "MachineIndependent/glslang.y" + case 343: /* type_specifier_nonarray: F64MAT3X4 */ +#line 2505 "MachineIndependent/glslang.y" { 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 8874 "MachineIndependent/glslang_tab.cpp" +#line 8923 "MachineIndependent/glslang_tab.cpp" break; - case 343: /* type_specifier_nonarray: F64MAT4X2 */ -#line 2505 "MachineIndependent/glslang.y" + case 344: /* type_specifier_nonarray: F64MAT4X2 */ +#line 2511 "MachineIndependent/glslang.y" { 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 8885 "MachineIndependent/glslang_tab.cpp" +#line 8934 "MachineIndependent/glslang_tab.cpp" break; - case 344: /* type_specifier_nonarray: F64MAT4X3 */ -#line 2511 "MachineIndependent/glslang.y" + case 345: /* type_specifier_nonarray: F64MAT4X3 */ +#line 2517 "MachineIndependent/glslang.y" { 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 8896 "MachineIndependent/glslang_tab.cpp" +#line 8945 "MachineIndependent/glslang_tab.cpp" break; - case 345: /* type_specifier_nonarray: F64MAT4X4 */ -#line 2517 "MachineIndependent/glslang.y" + case 346: /* type_specifier_nonarray: F64MAT4X4 */ +#line 2523 "MachineIndependent/glslang.y" { 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 8907 "MachineIndependent/glslang_tab.cpp" +#line 8956 "MachineIndependent/glslang_tab.cpp" break; - case 346: /* type_specifier_nonarray: ACCSTRUCTNV */ -#line 2523 "MachineIndependent/glslang.y" + case 347: /* type_specifier_nonarray: ACCSTRUCTNV */ +#line 2529 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtAccStruct; } -#line 8916 "MachineIndependent/glslang_tab.cpp" +#line 8965 "MachineIndependent/glslang_tab.cpp" break; - case 347: /* type_specifier_nonarray: ACCSTRUCTEXT */ -#line 2527 "MachineIndependent/glslang.y" + case 348: /* type_specifier_nonarray: ACCSTRUCTEXT */ +#line 2533 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtAccStruct; } -#line 8925 "MachineIndependent/glslang_tab.cpp" +#line 8974 "MachineIndependent/glslang_tab.cpp" break; - case 348: /* type_specifier_nonarray: RAYQUERYEXT */ -#line 2531 "MachineIndependent/glslang.y" + case 349: /* type_specifier_nonarray: RAYQUERYEXT */ +#line 2537 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtRayQuery; } -#line 8934 "MachineIndependent/glslang_tab.cpp" +#line 8983 "MachineIndependent/glslang_tab.cpp" break; - case 349: /* type_specifier_nonarray: ATOMIC_UINT */ -#line 2535 "MachineIndependent/glslang.y" + case 350: /* type_specifier_nonarray: ATOMIC_UINT */ +#line 2541 "MachineIndependent/glslang.y" { 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 8944 "MachineIndependent/glslang_tab.cpp" +#line 8993 "MachineIndependent/glslang_tab.cpp" break; - case 350: /* type_specifier_nonarray: SAMPLER1D */ -#line 2540 "MachineIndependent/glslang.y" + case 351: /* type_specifier_nonarray: SAMPLER1D */ +#line 2546 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat, Esd1D); } -#line 8954 "MachineIndependent/glslang_tab.cpp" +#line 9003 "MachineIndependent/glslang_tab.cpp" break; - case 351: /* type_specifier_nonarray: SAMPLER2D */ -#line 2545 "MachineIndependent/glslang.y" + case 352: /* type_specifier_nonarray: SAMPLER2D */ +#line 2551 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat, Esd2D); } -#line 8964 "MachineIndependent/glslang_tab.cpp" +#line 9013 "MachineIndependent/glslang_tab.cpp" break; - case 352: /* type_specifier_nonarray: SAMPLER3D */ -#line 2550 "MachineIndependent/glslang.y" + case 353: /* type_specifier_nonarray: SAMPLER3D */ +#line 2556 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat, Esd3D); } -#line 8974 "MachineIndependent/glslang_tab.cpp" +#line 9023 "MachineIndependent/glslang_tab.cpp" break; - case 353: /* type_specifier_nonarray: SAMPLERCUBE */ -#line 2555 "MachineIndependent/glslang.y" + case 354: /* type_specifier_nonarray: SAMPLERCUBE */ +#line 2561 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat, EsdCube); } -#line 8984 "MachineIndependent/glslang_tab.cpp" +#line 9033 "MachineIndependent/glslang_tab.cpp" break; - case 354: /* type_specifier_nonarray: SAMPLER2DSHADOW */ -#line 2560 "MachineIndependent/glslang.y" + case 355: /* type_specifier_nonarray: SAMPLER2DSHADOW */ +#line 2566 "MachineIndependent/glslang.y" { (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 8994 "MachineIndependent/glslang_tab.cpp" +#line 9043 "MachineIndependent/glslang_tab.cpp" break; - case 355: /* type_specifier_nonarray: SAMPLERCUBESHADOW */ -#line 2565 "MachineIndependent/glslang.y" + case 356: /* type_specifier_nonarray: SAMPLERCUBESHADOW */ +#line 2571 "MachineIndependent/glslang.y" { (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 9004 "MachineIndependent/glslang_tab.cpp" +#line 9053 "MachineIndependent/glslang_tab.cpp" break; - case 356: /* type_specifier_nonarray: SAMPLER2DARRAY */ -#line 2570 "MachineIndependent/glslang.y" + case 357: /* type_specifier_nonarray: SAMPLER2DARRAY */ +#line 2576 "MachineIndependent/glslang.y" { (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 9014 "MachineIndependent/glslang_tab.cpp" +#line 9063 "MachineIndependent/glslang_tab.cpp" break; - case 357: /* type_specifier_nonarray: SAMPLER2DARRAYSHADOW */ -#line 2575 "MachineIndependent/glslang.y" + case 358: /* type_specifier_nonarray: SAMPLER2DARRAYSHADOW */ +#line 2581 "MachineIndependent/glslang.y" { (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 9024 "MachineIndependent/glslang_tab.cpp" +#line 9073 "MachineIndependent/glslang_tab.cpp" break; - case 358: /* type_specifier_nonarray: SAMPLER1DSHADOW */ -#line 2580 "MachineIndependent/glslang.y" + case 359: /* type_specifier_nonarray: SAMPLER1DSHADOW */ +#line 2586 "MachineIndependent/glslang.y" { (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 9034 "MachineIndependent/glslang_tab.cpp" +#line 9083 "MachineIndependent/glslang_tab.cpp" break; - case 359: /* type_specifier_nonarray: SAMPLER1DARRAY */ -#line 2585 "MachineIndependent/glslang.y" + case 360: /* type_specifier_nonarray: SAMPLER1DARRAY */ +#line 2591 "MachineIndependent/glslang.y" { (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 9044 "MachineIndependent/glslang_tab.cpp" +#line 9093 "MachineIndependent/glslang_tab.cpp" break; - case 360: /* type_specifier_nonarray: SAMPLER1DARRAYSHADOW */ -#line 2590 "MachineIndependent/glslang.y" + case 361: /* type_specifier_nonarray: SAMPLER1DARRAYSHADOW */ +#line 2596 "MachineIndependent/glslang.y" { (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 9054 "MachineIndependent/glslang_tab.cpp" +#line 9103 "MachineIndependent/glslang_tab.cpp" break; - case 361: /* type_specifier_nonarray: SAMPLERCUBEARRAY */ -#line 2595 "MachineIndependent/glslang.y" + case 362: /* type_specifier_nonarray: SAMPLERCUBEARRAY */ +#line 2601 "MachineIndependent/glslang.y" { (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 9064 "MachineIndependent/glslang_tab.cpp" +#line 9113 "MachineIndependent/glslang_tab.cpp" break; - case 362: /* type_specifier_nonarray: SAMPLERCUBEARRAYSHADOW */ -#line 2600 "MachineIndependent/glslang.y" + case 363: /* type_specifier_nonarray: SAMPLERCUBEARRAYSHADOW */ +#line 2606 "MachineIndependent/glslang.y" { (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 9074 "MachineIndependent/glslang_tab.cpp" +#line 9123 "MachineIndependent/glslang_tab.cpp" break; - case 363: /* type_specifier_nonarray: F16SAMPLER1D */ -#line 2605 "MachineIndependent/glslang.y" + case 364: /* type_specifier_nonarray: F16SAMPLER1D */ +#line 2611 "MachineIndependent/glslang.y" { 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 9085 "MachineIndependent/glslang_tab.cpp" +#line 9134 "MachineIndependent/glslang_tab.cpp" break; - case 364: /* type_specifier_nonarray: F16SAMPLER2D */ -#line 2611 "MachineIndependent/glslang.y" + case 365: /* type_specifier_nonarray: F16SAMPLER2D */ +#line 2617 "MachineIndependent/glslang.y" { 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 9096 "MachineIndependent/glslang_tab.cpp" +#line 9145 "MachineIndependent/glslang_tab.cpp" break; - case 365: /* type_specifier_nonarray: F16SAMPLER3D */ -#line 2617 "MachineIndependent/glslang.y" + case 366: /* type_specifier_nonarray: F16SAMPLER3D */ +#line 2623 "MachineIndependent/glslang.y" { 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 9107 "MachineIndependent/glslang_tab.cpp" +#line 9156 "MachineIndependent/glslang_tab.cpp" break; - case 366: /* type_specifier_nonarray: F16SAMPLERCUBE */ -#line 2623 "MachineIndependent/glslang.y" + case 367: /* type_specifier_nonarray: F16SAMPLERCUBE */ +#line 2629 "MachineIndependent/glslang.y" { 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 9118 "MachineIndependent/glslang_tab.cpp" +#line 9167 "MachineIndependent/glslang_tab.cpp" break; - case 367: /* type_specifier_nonarray: F16SAMPLER1DSHADOW */ -#line 2629 "MachineIndependent/glslang.y" + case 368: /* type_specifier_nonarray: F16SAMPLER1DSHADOW */ +#line 2635 "MachineIndependent/glslang.y" { 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 9129 "MachineIndependent/glslang_tab.cpp" +#line 9178 "MachineIndependent/glslang_tab.cpp" break; - case 368: /* type_specifier_nonarray: F16SAMPLER2DSHADOW */ -#line 2635 "MachineIndependent/glslang.y" + case 369: /* type_specifier_nonarray: F16SAMPLER2DSHADOW */ +#line 2641 "MachineIndependent/glslang.y" { 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 9140 "MachineIndependent/glslang_tab.cpp" +#line 9189 "MachineIndependent/glslang_tab.cpp" break; - case 369: /* type_specifier_nonarray: F16SAMPLERCUBESHADOW */ -#line 2641 "MachineIndependent/glslang.y" + case 370: /* type_specifier_nonarray: F16SAMPLERCUBESHADOW */ +#line 2647 "MachineIndependent/glslang.y" { 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 9151 "MachineIndependent/glslang_tab.cpp" +#line 9200 "MachineIndependent/glslang_tab.cpp" break; - case 370: /* type_specifier_nonarray: F16SAMPLER1DARRAY */ -#line 2647 "MachineIndependent/glslang.y" + case 371: /* type_specifier_nonarray: F16SAMPLER1DARRAY */ +#line 2653 "MachineIndependent/glslang.y" { 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 9162 "MachineIndependent/glslang_tab.cpp" +#line 9211 "MachineIndependent/glslang_tab.cpp" break; - case 371: /* type_specifier_nonarray: F16SAMPLER2DARRAY */ -#line 2653 "MachineIndependent/glslang.y" + case 372: /* type_specifier_nonarray: F16SAMPLER2DARRAY */ +#line 2659 "MachineIndependent/glslang.y" { 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 9173 "MachineIndependent/glslang_tab.cpp" +#line 9222 "MachineIndependent/glslang_tab.cpp" break; - case 372: /* type_specifier_nonarray: F16SAMPLER1DARRAYSHADOW */ -#line 2659 "MachineIndependent/glslang.y" + case 373: /* type_specifier_nonarray: F16SAMPLER1DARRAYSHADOW */ +#line 2665 "MachineIndependent/glslang.y" { 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 9184 "MachineIndependent/glslang_tab.cpp" +#line 9233 "MachineIndependent/glslang_tab.cpp" break; - case 373: /* type_specifier_nonarray: F16SAMPLER2DARRAYSHADOW */ -#line 2665 "MachineIndependent/glslang.y" + case 374: /* type_specifier_nonarray: F16SAMPLER2DARRAYSHADOW */ +#line 2671 "MachineIndependent/glslang.y" { 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 9195 "MachineIndependent/glslang_tab.cpp" +#line 9244 "MachineIndependent/glslang_tab.cpp" break; - case 374: /* type_specifier_nonarray: F16SAMPLERCUBEARRAY */ -#line 2671 "MachineIndependent/glslang.y" + case 375: /* type_specifier_nonarray: F16SAMPLERCUBEARRAY */ +#line 2677 "MachineIndependent/glslang.y" { 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 9206 "MachineIndependent/glslang_tab.cpp" +#line 9255 "MachineIndependent/glslang_tab.cpp" break; - case 375: /* type_specifier_nonarray: F16SAMPLERCUBEARRAYSHADOW */ -#line 2677 "MachineIndependent/glslang.y" + case 376: /* type_specifier_nonarray: F16SAMPLERCUBEARRAYSHADOW */ +#line 2683 "MachineIndependent/glslang.y" { 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 9217 "MachineIndependent/glslang_tab.cpp" +#line 9266 "MachineIndependent/glslang_tab.cpp" break; - case 376: /* type_specifier_nonarray: ISAMPLER1D */ -#line 2683 "MachineIndependent/glslang.y" + case 377: /* type_specifier_nonarray: ISAMPLER1D */ +#line 2689 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtInt, Esd1D); } -#line 9227 "MachineIndependent/glslang_tab.cpp" +#line 9276 "MachineIndependent/glslang_tab.cpp" break; - case 377: /* type_specifier_nonarray: ISAMPLER2D */ -#line 2688 "MachineIndependent/glslang.y" + case 378: /* type_specifier_nonarray: ISAMPLER2D */ +#line 2694 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtInt, Esd2D); } -#line 9237 "MachineIndependent/glslang_tab.cpp" +#line 9286 "MachineIndependent/glslang_tab.cpp" break; - case 378: /* type_specifier_nonarray: ISAMPLER3D */ -#line 2693 "MachineIndependent/glslang.y" + case 379: /* type_specifier_nonarray: ISAMPLER3D */ +#line 2699 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtInt, Esd3D); } -#line 9247 "MachineIndependent/glslang_tab.cpp" +#line 9296 "MachineIndependent/glslang_tab.cpp" break; - case 379: /* type_specifier_nonarray: ISAMPLERCUBE */ -#line 2698 "MachineIndependent/glslang.y" + case 380: /* type_specifier_nonarray: ISAMPLERCUBE */ +#line 2704 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtInt, EsdCube); } -#line 9257 "MachineIndependent/glslang_tab.cpp" +#line 9306 "MachineIndependent/glslang_tab.cpp" break; - case 380: /* type_specifier_nonarray: ISAMPLER2DARRAY */ -#line 2703 "MachineIndependent/glslang.y" + case 381: /* type_specifier_nonarray: ISAMPLER2DARRAY */ +#line 2709 "MachineIndependent/glslang.y" { (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 9267 "MachineIndependent/glslang_tab.cpp" +#line 9316 "MachineIndependent/glslang_tab.cpp" break; - case 381: /* type_specifier_nonarray: USAMPLER2D */ -#line 2708 "MachineIndependent/glslang.y" + case 382: /* type_specifier_nonarray: USAMPLER2D */ +#line 2714 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtUint, Esd2D); } -#line 9277 "MachineIndependent/glslang_tab.cpp" +#line 9326 "MachineIndependent/glslang_tab.cpp" break; - case 382: /* type_specifier_nonarray: USAMPLER3D */ -#line 2713 "MachineIndependent/glslang.y" + case 383: /* type_specifier_nonarray: USAMPLER3D */ +#line 2719 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtUint, Esd3D); } -#line 9287 "MachineIndependent/glslang_tab.cpp" +#line 9336 "MachineIndependent/glslang_tab.cpp" break; - case 383: /* type_specifier_nonarray: USAMPLERCUBE */ -#line 2718 "MachineIndependent/glslang.y" + case 384: /* type_specifier_nonarray: USAMPLERCUBE */ +#line 2724 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtUint, EsdCube); } -#line 9297 "MachineIndependent/glslang_tab.cpp" +#line 9346 "MachineIndependent/glslang_tab.cpp" break; - case 384: /* type_specifier_nonarray: ISAMPLER1DARRAY */ -#line 2723 "MachineIndependent/glslang.y" + case 385: /* type_specifier_nonarray: ISAMPLER1DARRAY */ +#line 2729 "MachineIndependent/glslang.y" { (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 9307 "MachineIndependent/glslang_tab.cpp" +#line 9356 "MachineIndependent/glslang_tab.cpp" break; - case 385: /* type_specifier_nonarray: ISAMPLERCUBEARRAY */ -#line 2728 "MachineIndependent/glslang.y" + case 386: /* type_specifier_nonarray: ISAMPLERCUBEARRAY */ +#line 2734 "MachineIndependent/glslang.y" { (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 9317 "MachineIndependent/glslang_tab.cpp" +#line 9366 "MachineIndependent/glslang_tab.cpp" break; - case 386: /* type_specifier_nonarray: USAMPLER1D */ -#line 2733 "MachineIndependent/glslang.y" + case 387: /* type_specifier_nonarray: USAMPLER1D */ +#line 2739 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtUint, Esd1D); } -#line 9327 "MachineIndependent/glslang_tab.cpp" +#line 9376 "MachineIndependent/glslang_tab.cpp" break; - case 387: /* type_specifier_nonarray: USAMPLER1DARRAY */ -#line 2738 "MachineIndependent/glslang.y" + case 388: /* type_specifier_nonarray: USAMPLER1DARRAY */ +#line 2744 "MachineIndependent/glslang.y" { (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 9337 "MachineIndependent/glslang_tab.cpp" +#line 9386 "MachineIndependent/glslang_tab.cpp" break; - case 388: /* type_specifier_nonarray: USAMPLERCUBEARRAY */ -#line 2743 "MachineIndependent/glslang.y" + case 389: /* type_specifier_nonarray: USAMPLERCUBEARRAY */ +#line 2749 "MachineIndependent/glslang.y" { (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 9347 "MachineIndependent/glslang_tab.cpp" +#line 9396 "MachineIndependent/glslang_tab.cpp" break; - case 389: /* type_specifier_nonarray: TEXTURECUBEARRAY */ -#line 2748 "MachineIndependent/glslang.y" + case 390: /* type_specifier_nonarray: TEXTURECUBEARRAY */ +#line 2754 "MachineIndependent/glslang.y" { (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 9357 "MachineIndependent/glslang_tab.cpp" +#line 9406 "MachineIndependent/glslang_tab.cpp" break; - case 390: /* type_specifier_nonarray: ITEXTURECUBEARRAY */ -#line 2753 "MachineIndependent/glslang.y" + case 391: /* type_specifier_nonarray: ITEXTURECUBEARRAY */ +#line 2759 "MachineIndependent/glslang.y" { (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 9367 "MachineIndependent/glslang_tab.cpp" +#line 9416 "MachineIndependent/glslang_tab.cpp" break; - case 391: /* type_specifier_nonarray: UTEXTURECUBEARRAY */ -#line 2758 "MachineIndependent/glslang.y" + case 392: /* type_specifier_nonarray: UTEXTURECUBEARRAY */ +#line 2764 "MachineIndependent/glslang.y" { (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 9377 "MachineIndependent/glslang_tab.cpp" +#line 9426 "MachineIndependent/glslang_tab.cpp" break; - case 392: /* type_specifier_nonarray: USAMPLER2DARRAY */ -#line 2763 "MachineIndependent/glslang.y" + case 393: /* type_specifier_nonarray: USAMPLER2DARRAY */ +#line 2769 "MachineIndependent/glslang.y" { (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 9387 "MachineIndependent/glslang_tab.cpp" +#line 9436 "MachineIndependent/glslang_tab.cpp" break; - case 393: /* type_specifier_nonarray: TEXTURE2D */ -#line 2768 "MachineIndependent/glslang.y" + case 394: /* type_specifier_nonarray: TEXTURE2D */ +#line 2774 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtFloat, Esd2D); } -#line 9397 "MachineIndependent/glslang_tab.cpp" +#line 9446 "MachineIndependent/glslang_tab.cpp" break; - case 394: /* type_specifier_nonarray: TEXTURE3D */ -#line 2773 "MachineIndependent/glslang.y" + case 395: /* type_specifier_nonarray: TEXTURE3D */ +#line 2779 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtFloat, Esd3D); } -#line 9407 "MachineIndependent/glslang_tab.cpp" +#line 9456 "MachineIndependent/glslang_tab.cpp" break; - case 395: /* type_specifier_nonarray: TEXTURE2DARRAY */ -#line 2778 "MachineIndependent/glslang.y" + case 396: /* type_specifier_nonarray: TEXTURE2DARRAY */ +#line 2784 "MachineIndependent/glslang.y" { (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 9417 "MachineIndependent/glslang_tab.cpp" +#line 9466 "MachineIndependent/glslang_tab.cpp" break; - case 396: /* type_specifier_nonarray: TEXTURECUBE */ -#line 2783 "MachineIndependent/glslang.y" + case 397: /* type_specifier_nonarray: TEXTURECUBE */ +#line 2789 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtFloat, EsdCube); } -#line 9427 "MachineIndependent/glslang_tab.cpp" +#line 9476 "MachineIndependent/glslang_tab.cpp" break; - case 397: /* type_specifier_nonarray: ITEXTURE2D */ -#line 2788 "MachineIndependent/glslang.y" + case 398: /* type_specifier_nonarray: ITEXTURE2D */ +#line 2794 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtInt, Esd2D); } -#line 9437 "MachineIndependent/glslang_tab.cpp" +#line 9486 "MachineIndependent/glslang_tab.cpp" break; - case 398: /* type_specifier_nonarray: ITEXTURE3D */ -#line 2793 "MachineIndependent/glslang.y" + case 399: /* type_specifier_nonarray: ITEXTURE3D */ +#line 2799 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtInt, Esd3D); } -#line 9447 "MachineIndependent/glslang_tab.cpp" +#line 9496 "MachineIndependent/glslang_tab.cpp" break; - case 399: /* type_specifier_nonarray: ITEXTURECUBE */ -#line 2798 "MachineIndependent/glslang.y" + case 400: /* type_specifier_nonarray: ITEXTURECUBE */ +#line 2804 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtInt, EsdCube); } -#line 9457 "MachineIndependent/glslang_tab.cpp" +#line 9506 "MachineIndependent/glslang_tab.cpp" break; - case 400: /* type_specifier_nonarray: ITEXTURE2DARRAY */ -#line 2803 "MachineIndependent/glslang.y" + case 401: /* type_specifier_nonarray: ITEXTURE2DARRAY */ +#line 2809 "MachineIndependent/glslang.y" { (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 9467 "MachineIndependent/glslang_tab.cpp" +#line 9516 "MachineIndependent/glslang_tab.cpp" break; - case 401: /* type_specifier_nonarray: UTEXTURE2D */ -#line 2808 "MachineIndependent/glslang.y" + case 402: /* type_specifier_nonarray: UTEXTURE2D */ +#line 2814 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtUint, Esd2D); } -#line 9477 "MachineIndependent/glslang_tab.cpp" +#line 9526 "MachineIndependent/glslang_tab.cpp" break; - case 402: /* type_specifier_nonarray: UTEXTURE3D */ -#line 2813 "MachineIndependent/glslang.y" + case 403: /* type_specifier_nonarray: UTEXTURE3D */ +#line 2819 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtUint, Esd3D); } -#line 9487 "MachineIndependent/glslang_tab.cpp" +#line 9536 "MachineIndependent/glslang_tab.cpp" break; - case 403: /* type_specifier_nonarray: UTEXTURECUBE */ -#line 2818 "MachineIndependent/glslang.y" + case 404: /* type_specifier_nonarray: UTEXTURECUBE */ +#line 2824 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtUint, EsdCube); } -#line 9497 "MachineIndependent/glslang_tab.cpp" +#line 9546 "MachineIndependent/glslang_tab.cpp" break; - case 404: /* type_specifier_nonarray: UTEXTURE2DARRAY */ -#line 2823 "MachineIndependent/glslang.y" + case 405: /* type_specifier_nonarray: UTEXTURE2DARRAY */ +#line 2829 "MachineIndependent/glslang.y" { (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 9507 "MachineIndependent/glslang_tab.cpp" +#line 9556 "MachineIndependent/glslang_tab.cpp" break; - case 405: /* type_specifier_nonarray: SAMPLER */ -#line 2828 "MachineIndependent/glslang.y" + case 406: /* type_specifier_nonarray: SAMPLER */ +#line 2834 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setPureSampler(false); } -#line 9517 "MachineIndependent/glslang_tab.cpp" +#line 9566 "MachineIndependent/glslang_tab.cpp" break; - case 406: /* type_specifier_nonarray: SAMPLERSHADOW */ -#line 2833 "MachineIndependent/glslang.y" + case 407: /* type_specifier_nonarray: SAMPLERSHADOW */ +#line 2839 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setPureSampler(true); } -#line 9527 "MachineIndependent/glslang_tab.cpp" +#line 9576 "MachineIndependent/glslang_tab.cpp" break; - case 407: /* type_specifier_nonarray: SAMPLER2DRECT */ -#line 2838 "MachineIndependent/glslang.y" + case 408: /* type_specifier_nonarray: SAMPLER2DRECT */ +#line 2844 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat, EsdRect); } -#line 9537 "MachineIndependent/glslang_tab.cpp" +#line 9586 "MachineIndependent/glslang_tab.cpp" break; - case 408: /* type_specifier_nonarray: SAMPLER2DRECTSHADOW */ -#line 2843 "MachineIndependent/glslang.y" + case 409: /* type_specifier_nonarray: SAMPLER2DRECTSHADOW */ +#line 2849 "MachineIndependent/glslang.y" { (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 9547 "MachineIndependent/glslang_tab.cpp" +#line 9596 "MachineIndependent/glslang_tab.cpp" break; - case 409: /* type_specifier_nonarray: F16SAMPLER2DRECT */ -#line 2848 "MachineIndependent/glslang.y" + case 410: /* type_specifier_nonarray: F16SAMPLER2DRECT */ +#line 2854 "MachineIndependent/glslang.y" { 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 9558 "MachineIndependent/glslang_tab.cpp" +#line 9607 "MachineIndependent/glslang_tab.cpp" break; - case 410: /* type_specifier_nonarray: F16SAMPLER2DRECTSHADOW */ -#line 2854 "MachineIndependent/glslang.y" + case 411: /* type_specifier_nonarray: F16SAMPLER2DRECTSHADOW */ +#line 2860 "MachineIndependent/glslang.y" { 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 9569 "MachineIndependent/glslang_tab.cpp" +#line 9618 "MachineIndependent/glslang_tab.cpp" break; - case 411: /* type_specifier_nonarray: ISAMPLER2DRECT */ -#line 2860 "MachineIndependent/glslang.y" + case 412: /* type_specifier_nonarray: ISAMPLER2DRECT */ +#line 2866 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtInt, EsdRect); } -#line 9579 "MachineIndependent/glslang_tab.cpp" +#line 9628 "MachineIndependent/glslang_tab.cpp" break; - case 412: /* type_specifier_nonarray: USAMPLER2DRECT */ -#line 2865 "MachineIndependent/glslang.y" + case 413: /* type_specifier_nonarray: USAMPLER2DRECT */ +#line 2871 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtUint, EsdRect); } -#line 9589 "MachineIndependent/glslang_tab.cpp" +#line 9638 "MachineIndependent/glslang_tab.cpp" break; - case 413: /* type_specifier_nonarray: SAMPLERBUFFER */ -#line 2870 "MachineIndependent/glslang.y" + case 414: /* type_specifier_nonarray: SAMPLERBUFFER */ +#line 2876 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat, EsdBuffer); } -#line 9599 "MachineIndependent/glslang_tab.cpp" +#line 9648 "MachineIndependent/glslang_tab.cpp" break; - case 414: /* type_specifier_nonarray: F16SAMPLERBUFFER */ -#line 2875 "MachineIndependent/glslang.y" + case 415: /* type_specifier_nonarray: F16SAMPLERBUFFER */ +#line 2881 "MachineIndependent/glslang.y" { 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 9610 "MachineIndependent/glslang_tab.cpp" +#line 9659 "MachineIndependent/glslang_tab.cpp" break; - case 415: /* type_specifier_nonarray: ISAMPLERBUFFER */ -#line 2881 "MachineIndependent/glslang.y" + case 416: /* type_specifier_nonarray: ISAMPLERBUFFER */ +#line 2887 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtInt, EsdBuffer); } -#line 9620 "MachineIndependent/glslang_tab.cpp" +#line 9669 "MachineIndependent/glslang_tab.cpp" break; - case 416: /* type_specifier_nonarray: USAMPLERBUFFER */ -#line 2886 "MachineIndependent/glslang.y" + case 417: /* type_specifier_nonarray: USAMPLERBUFFER */ +#line 2892 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtUint, EsdBuffer); } -#line 9630 "MachineIndependent/glslang_tab.cpp" +#line 9679 "MachineIndependent/glslang_tab.cpp" break; - case 417: /* type_specifier_nonarray: SAMPLER2DMS */ -#line 2891 "MachineIndependent/glslang.y" + case 418: /* type_specifier_nonarray: SAMPLER2DMS */ +#line 2897 "MachineIndependent/glslang.y" { (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 9640 "MachineIndependent/glslang_tab.cpp" +#line 9689 "MachineIndependent/glslang_tab.cpp" break; - case 418: /* type_specifier_nonarray: F16SAMPLER2DMS */ -#line 2896 "MachineIndependent/glslang.y" + case 419: /* type_specifier_nonarray: F16SAMPLER2DMS */ +#line 2902 "MachineIndependent/glslang.y" { 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 9651 "MachineIndependent/glslang_tab.cpp" +#line 9700 "MachineIndependent/glslang_tab.cpp" break; - case 419: /* type_specifier_nonarray: ISAMPLER2DMS */ -#line 2902 "MachineIndependent/glslang.y" + case 420: /* type_specifier_nonarray: ISAMPLER2DMS */ +#line 2908 "MachineIndependent/glslang.y" { (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 9661 "MachineIndependent/glslang_tab.cpp" +#line 9710 "MachineIndependent/glslang_tab.cpp" break; - case 420: /* type_specifier_nonarray: USAMPLER2DMS */ -#line 2907 "MachineIndependent/glslang.y" + case 421: /* type_specifier_nonarray: USAMPLER2DMS */ +#line 2913 "MachineIndependent/glslang.y" { (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 9671 "MachineIndependent/glslang_tab.cpp" +#line 9720 "MachineIndependent/glslang_tab.cpp" break; - case 421: /* type_specifier_nonarray: SAMPLER2DMSARRAY */ -#line 2912 "MachineIndependent/glslang.y" + case 422: /* type_specifier_nonarray: SAMPLER2DMSARRAY */ +#line 2918 "MachineIndependent/glslang.y" { (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 9681 "MachineIndependent/glslang_tab.cpp" +#line 9730 "MachineIndependent/glslang_tab.cpp" break; - case 422: /* type_specifier_nonarray: F16SAMPLER2DMSARRAY */ -#line 2917 "MachineIndependent/glslang.y" + case 423: /* type_specifier_nonarray: F16SAMPLER2DMSARRAY */ +#line 2923 "MachineIndependent/glslang.y" { 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 9692 "MachineIndependent/glslang_tab.cpp" +#line 9741 "MachineIndependent/glslang_tab.cpp" break; - case 423: /* type_specifier_nonarray: ISAMPLER2DMSARRAY */ -#line 2923 "MachineIndependent/glslang.y" + case 424: /* type_specifier_nonarray: ISAMPLER2DMSARRAY */ +#line 2929 "MachineIndependent/glslang.y" { (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 9702 "MachineIndependent/glslang_tab.cpp" +#line 9751 "MachineIndependent/glslang_tab.cpp" break; - case 424: /* type_specifier_nonarray: USAMPLER2DMSARRAY */ -#line 2928 "MachineIndependent/glslang.y" + case 425: /* type_specifier_nonarray: USAMPLER2DMSARRAY */ +#line 2934 "MachineIndependent/glslang.y" { (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 9712 "MachineIndependent/glslang_tab.cpp" +#line 9761 "MachineIndependent/glslang_tab.cpp" break; - case 425: /* type_specifier_nonarray: TEXTURE1D */ -#line 2933 "MachineIndependent/glslang.y" + case 426: /* type_specifier_nonarray: TEXTURE1D */ +#line 2939 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtFloat, Esd1D); } -#line 9722 "MachineIndependent/glslang_tab.cpp" +#line 9771 "MachineIndependent/glslang_tab.cpp" break; - case 426: /* type_specifier_nonarray: F16TEXTURE1D */ -#line 2938 "MachineIndependent/glslang.y" + case 427: /* type_specifier_nonarray: F16TEXTURE1D */ +#line 2944 "MachineIndependent/glslang.y" { 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 9733 "MachineIndependent/glslang_tab.cpp" +#line 9782 "MachineIndependent/glslang_tab.cpp" break; - case 427: /* type_specifier_nonarray: F16TEXTURE2D */ -#line 2944 "MachineIndependent/glslang.y" + case 428: /* type_specifier_nonarray: F16TEXTURE2D */ +#line 2950 "MachineIndependent/glslang.y" { 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 9744 "MachineIndependent/glslang_tab.cpp" +#line 9793 "MachineIndependent/glslang_tab.cpp" break; - case 428: /* type_specifier_nonarray: F16TEXTURE3D */ -#line 2950 "MachineIndependent/glslang.y" + case 429: /* type_specifier_nonarray: F16TEXTURE3D */ +#line 2956 "MachineIndependent/glslang.y" { 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 9755 "MachineIndependent/glslang_tab.cpp" +#line 9804 "MachineIndependent/glslang_tab.cpp" break; - case 429: /* type_specifier_nonarray: F16TEXTURECUBE */ -#line 2956 "MachineIndependent/glslang.y" + case 430: /* type_specifier_nonarray: F16TEXTURECUBE */ +#line 2962 "MachineIndependent/glslang.y" { 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 9766 "MachineIndependent/glslang_tab.cpp" +#line 9815 "MachineIndependent/glslang_tab.cpp" break; - case 430: /* type_specifier_nonarray: TEXTURE1DARRAY */ -#line 2962 "MachineIndependent/glslang.y" + case 431: /* type_specifier_nonarray: TEXTURE1DARRAY */ +#line 2968 "MachineIndependent/glslang.y" { (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 9776 "MachineIndependent/glslang_tab.cpp" +#line 9825 "MachineIndependent/glslang_tab.cpp" break; - case 431: /* type_specifier_nonarray: F16TEXTURE1DARRAY */ -#line 2967 "MachineIndependent/glslang.y" + case 432: /* type_specifier_nonarray: F16TEXTURE1DARRAY */ +#line 2973 "MachineIndependent/glslang.y" { 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 9787 "MachineIndependent/glslang_tab.cpp" +#line 9836 "MachineIndependent/glslang_tab.cpp" break; - case 432: /* type_specifier_nonarray: F16TEXTURE2DARRAY */ -#line 2973 "MachineIndependent/glslang.y" + case 433: /* type_specifier_nonarray: F16TEXTURE2DARRAY */ +#line 2979 "MachineIndependent/glslang.y" { 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 9798 "MachineIndependent/glslang_tab.cpp" +#line 9847 "MachineIndependent/glslang_tab.cpp" break; - case 433: /* type_specifier_nonarray: F16TEXTURECUBEARRAY */ -#line 2979 "MachineIndependent/glslang.y" + case 434: /* type_specifier_nonarray: F16TEXTURECUBEARRAY */ +#line 2985 "MachineIndependent/glslang.y" { 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 9809 "MachineIndependent/glslang_tab.cpp" +#line 9858 "MachineIndependent/glslang_tab.cpp" break; - case 434: /* type_specifier_nonarray: ITEXTURE1D */ -#line 2985 "MachineIndependent/glslang.y" + case 435: /* type_specifier_nonarray: ITEXTURE1D */ +#line 2991 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtInt, Esd1D); } -#line 9819 "MachineIndependent/glslang_tab.cpp" +#line 9868 "MachineIndependent/glslang_tab.cpp" break; - case 435: /* type_specifier_nonarray: ITEXTURE1DARRAY */ -#line 2990 "MachineIndependent/glslang.y" + case 436: /* type_specifier_nonarray: ITEXTURE1DARRAY */ +#line 2996 "MachineIndependent/glslang.y" { (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 9829 "MachineIndependent/glslang_tab.cpp" +#line 9878 "MachineIndependent/glslang_tab.cpp" break; - case 436: /* type_specifier_nonarray: UTEXTURE1D */ -#line 2995 "MachineIndependent/glslang.y" + case 437: /* type_specifier_nonarray: UTEXTURE1D */ +#line 3001 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtUint, Esd1D); } -#line 9839 "MachineIndependent/glslang_tab.cpp" +#line 9888 "MachineIndependent/glslang_tab.cpp" break; - case 437: /* type_specifier_nonarray: UTEXTURE1DARRAY */ -#line 3000 "MachineIndependent/glslang.y" + case 438: /* type_specifier_nonarray: UTEXTURE1DARRAY */ +#line 3006 "MachineIndependent/glslang.y" { (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 9849 "MachineIndependent/glslang_tab.cpp" +#line 9898 "MachineIndependent/glslang_tab.cpp" break; - case 438: /* type_specifier_nonarray: TEXTURE2DRECT */ -#line 3005 "MachineIndependent/glslang.y" + case 439: /* type_specifier_nonarray: TEXTURE2DRECT */ +#line 3011 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtFloat, EsdRect); } -#line 9859 "MachineIndependent/glslang_tab.cpp" +#line 9908 "MachineIndependent/glslang_tab.cpp" break; - case 439: /* type_specifier_nonarray: F16TEXTURE2DRECT */ -#line 3010 "MachineIndependent/glslang.y" + case 440: /* type_specifier_nonarray: F16TEXTURE2DRECT */ +#line 3016 "MachineIndependent/glslang.y" { 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 9870 "MachineIndependent/glslang_tab.cpp" +#line 9919 "MachineIndependent/glslang_tab.cpp" break; - case 440: /* type_specifier_nonarray: ITEXTURE2DRECT */ -#line 3016 "MachineIndependent/glslang.y" + case 441: /* type_specifier_nonarray: ITEXTURE2DRECT */ +#line 3022 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtInt, EsdRect); } -#line 9880 "MachineIndependent/glslang_tab.cpp" +#line 9929 "MachineIndependent/glslang_tab.cpp" break; - case 441: /* type_specifier_nonarray: UTEXTURE2DRECT */ -#line 3021 "MachineIndependent/glslang.y" + case 442: /* type_specifier_nonarray: UTEXTURE2DRECT */ +#line 3027 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtUint, EsdRect); } -#line 9890 "MachineIndependent/glslang_tab.cpp" +#line 9939 "MachineIndependent/glslang_tab.cpp" break; - case 442: /* type_specifier_nonarray: TEXTUREBUFFER */ -#line 3026 "MachineIndependent/glslang.y" + case 443: /* type_specifier_nonarray: TEXTUREBUFFER */ +#line 3032 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtFloat, EsdBuffer); } -#line 9900 "MachineIndependent/glslang_tab.cpp" +#line 9949 "MachineIndependent/glslang_tab.cpp" break; - case 443: /* type_specifier_nonarray: F16TEXTUREBUFFER */ -#line 3031 "MachineIndependent/glslang.y" + case 444: /* type_specifier_nonarray: F16TEXTUREBUFFER */ +#line 3037 "MachineIndependent/glslang.y" { 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 9911 "MachineIndependent/glslang_tab.cpp" +#line 9960 "MachineIndependent/glslang_tab.cpp" break; - case 444: /* type_specifier_nonarray: ITEXTUREBUFFER */ -#line 3037 "MachineIndependent/glslang.y" + case 445: /* type_specifier_nonarray: ITEXTUREBUFFER */ +#line 3043 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtInt, EsdBuffer); } -#line 9921 "MachineIndependent/glslang_tab.cpp" +#line 9970 "MachineIndependent/glslang_tab.cpp" break; - case 445: /* type_specifier_nonarray: UTEXTUREBUFFER */ -#line 3042 "MachineIndependent/glslang.y" + case 446: /* type_specifier_nonarray: UTEXTUREBUFFER */ +#line 3048 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtUint, EsdBuffer); } -#line 9931 "MachineIndependent/glslang_tab.cpp" +#line 9980 "MachineIndependent/glslang_tab.cpp" break; - case 446: /* type_specifier_nonarray: TEXTURE2DMS */ -#line 3047 "MachineIndependent/glslang.y" + case 447: /* type_specifier_nonarray: TEXTURE2DMS */ +#line 3053 "MachineIndependent/glslang.y" { (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 9941 "MachineIndependent/glslang_tab.cpp" +#line 9990 "MachineIndependent/glslang_tab.cpp" break; - case 447: /* type_specifier_nonarray: F16TEXTURE2DMS */ -#line 3052 "MachineIndependent/glslang.y" + case 448: /* type_specifier_nonarray: F16TEXTURE2DMS */ +#line 3058 "MachineIndependent/glslang.y" { 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 9952 "MachineIndependent/glslang_tab.cpp" +#line 10001 "MachineIndependent/glslang_tab.cpp" break; - case 448: /* type_specifier_nonarray: ITEXTURE2DMS */ -#line 3058 "MachineIndependent/glslang.y" + case 449: /* type_specifier_nonarray: ITEXTURE2DMS */ +#line 3064 "MachineIndependent/glslang.y" { (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 9962 "MachineIndependent/glslang_tab.cpp" +#line 10011 "MachineIndependent/glslang_tab.cpp" break; - case 449: /* type_specifier_nonarray: UTEXTURE2DMS */ -#line 3063 "MachineIndependent/glslang.y" + case 450: /* type_specifier_nonarray: UTEXTURE2DMS */ +#line 3069 "MachineIndependent/glslang.y" { (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 9972 "MachineIndependent/glslang_tab.cpp" +#line 10021 "MachineIndependent/glslang_tab.cpp" break; - case 450: /* type_specifier_nonarray: TEXTURE2DMSARRAY */ -#line 3068 "MachineIndependent/glslang.y" + case 451: /* type_specifier_nonarray: TEXTURE2DMSARRAY */ +#line 3074 "MachineIndependent/glslang.y" { (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 9982 "MachineIndependent/glslang_tab.cpp" +#line 10031 "MachineIndependent/glslang_tab.cpp" break; - case 451: /* type_specifier_nonarray: F16TEXTURE2DMSARRAY */ -#line 3073 "MachineIndependent/glslang.y" + case 452: /* type_specifier_nonarray: F16TEXTURE2DMSARRAY */ +#line 3079 "MachineIndependent/glslang.y" { 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 9993 "MachineIndependent/glslang_tab.cpp" +#line 10042 "MachineIndependent/glslang_tab.cpp" break; - case 452: /* type_specifier_nonarray: ITEXTURE2DMSARRAY */ -#line 3079 "MachineIndependent/glslang.y" + case 453: /* type_specifier_nonarray: ITEXTURE2DMSARRAY */ +#line 3085 "MachineIndependent/glslang.y" { (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 10003 "MachineIndependent/glslang_tab.cpp" +#line 10052 "MachineIndependent/glslang_tab.cpp" break; - case 453: /* type_specifier_nonarray: UTEXTURE2DMSARRAY */ -#line 3084 "MachineIndependent/glslang.y" + case 454: /* type_specifier_nonarray: UTEXTURE2DMSARRAY */ +#line 3090 "MachineIndependent/glslang.y" { (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 10013 "MachineIndependent/glslang_tab.cpp" +#line 10062 "MachineIndependent/glslang_tab.cpp" break; - case 454: /* type_specifier_nonarray: IMAGE1D */ -#line 3089 "MachineIndependent/glslang.y" + case 455: /* type_specifier_nonarray: IMAGE1D */ +#line 3095 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtFloat, Esd1D); } -#line 10023 "MachineIndependent/glslang_tab.cpp" +#line 10072 "MachineIndependent/glslang_tab.cpp" break; - case 455: /* type_specifier_nonarray: F16IMAGE1D */ -#line 3094 "MachineIndependent/glslang.y" + case 456: /* type_specifier_nonarray: F16IMAGE1D */ +#line 3100 "MachineIndependent/glslang.y" { 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 10034 "MachineIndependent/glslang_tab.cpp" +#line 10083 "MachineIndependent/glslang_tab.cpp" break; - case 456: /* type_specifier_nonarray: IIMAGE1D */ -#line 3100 "MachineIndependent/glslang.y" + case 457: /* type_specifier_nonarray: IIMAGE1D */ +#line 3106 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtInt, Esd1D); } -#line 10044 "MachineIndependent/glslang_tab.cpp" +#line 10093 "MachineIndependent/glslang_tab.cpp" break; - case 457: /* type_specifier_nonarray: UIMAGE1D */ -#line 3105 "MachineIndependent/glslang.y" + case 458: /* type_specifier_nonarray: UIMAGE1D */ +#line 3111 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtUint, Esd1D); } -#line 10054 "MachineIndependent/glslang_tab.cpp" +#line 10103 "MachineIndependent/glslang_tab.cpp" break; - case 458: /* type_specifier_nonarray: IMAGE2D */ -#line 3110 "MachineIndependent/glslang.y" + case 459: /* type_specifier_nonarray: IMAGE2D */ +#line 3116 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtFloat, Esd2D); } -#line 10064 "MachineIndependent/glslang_tab.cpp" +#line 10113 "MachineIndependent/glslang_tab.cpp" break; - case 459: /* type_specifier_nonarray: F16IMAGE2D */ -#line 3115 "MachineIndependent/glslang.y" + case 460: /* type_specifier_nonarray: F16IMAGE2D */ +#line 3121 "MachineIndependent/glslang.y" { 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 10075 "MachineIndependent/glslang_tab.cpp" +#line 10124 "MachineIndependent/glslang_tab.cpp" break; - case 460: /* type_specifier_nonarray: IIMAGE2D */ -#line 3121 "MachineIndependent/glslang.y" + case 461: /* type_specifier_nonarray: IIMAGE2D */ +#line 3127 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtInt, Esd2D); } -#line 10085 "MachineIndependent/glslang_tab.cpp" +#line 10134 "MachineIndependent/glslang_tab.cpp" break; - case 461: /* type_specifier_nonarray: UIMAGE2D */ -#line 3126 "MachineIndependent/glslang.y" + case 462: /* type_specifier_nonarray: UIMAGE2D */ +#line 3132 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtUint, Esd2D); } -#line 10095 "MachineIndependent/glslang_tab.cpp" +#line 10144 "MachineIndependent/glslang_tab.cpp" break; - case 462: /* type_specifier_nonarray: IMAGE3D */ -#line 3131 "MachineIndependent/glslang.y" + case 463: /* type_specifier_nonarray: IMAGE3D */ +#line 3137 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtFloat, Esd3D); } -#line 10105 "MachineIndependent/glslang_tab.cpp" +#line 10154 "MachineIndependent/glslang_tab.cpp" break; - case 463: /* type_specifier_nonarray: F16IMAGE3D */ -#line 3136 "MachineIndependent/glslang.y" + case 464: /* type_specifier_nonarray: F16IMAGE3D */ +#line 3142 "MachineIndependent/glslang.y" { 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 10116 "MachineIndependent/glslang_tab.cpp" +#line 10165 "MachineIndependent/glslang_tab.cpp" break; - case 464: /* type_specifier_nonarray: IIMAGE3D */ -#line 3142 "MachineIndependent/glslang.y" + case 465: /* type_specifier_nonarray: IIMAGE3D */ +#line 3148 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtInt, Esd3D); } -#line 10126 "MachineIndependent/glslang_tab.cpp" +#line 10175 "MachineIndependent/glslang_tab.cpp" break; - case 465: /* type_specifier_nonarray: UIMAGE3D */ -#line 3147 "MachineIndependent/glslang.y" + case 466: /* type_specifier_nonarray: UIMAGE3D */ +#line 3153 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtUint, Esd3D); } -#line 10136 "MachineIndependent/glslang_tab.cpp" +#line 10185 "MachineIndependent/glslang_tab.cpp" break; - case 466: /* type_specifier_nonarray: IMAGE2DRECT */ -#line 3152 "MachineIndependent/glslang.y" + case 467: /* type_specifier_nonarray: IMAGE2DRECT */ +#line 3158 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtFloat, EsdRect); } -#line 10146 "MachineIndependent/glslang_tab.cpp" +#line 10195 "MachineIndependent/glslang_tab.cpp" break; - case 467: /* type_specifier_nonarray: F16IMAGE2DRECT */ -#line 3157 "MachineIndependent/glslang.y" + case 468: /* type_specifier_nonarray: F16IMAGE2DRECT */ +#line 3163 "MachineIndependent/glslang.y" { 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 10157 "MachineIndependent/glslang_tab.cpp" +#line 10206 "MachineIndependent/glslang_tab.cpp" break; - case 468: /* type_specifier_nonarray: IIMAGE2DRECT */ -#line 3163 "MachineIndependent/glslang.y" + case 469: /* type_specifier_nonarray: IIMAGE2DRECT */ +#line 3169 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtInt, EsdRect); } -#line 10167 "MachineIndependent/glslang_tab.cpp" +#line 10216 "MachineIndependent/glslang_tab.cpp" break; - case 469: /* type_specifier_nonarray: UIMAGE2DRECT */ -#line 3168 "MachineIndependent/glslang.y" + case 470: /* type_specifier_nonarray: UIMAGE2DRECT */ +#line 3174 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtUint, EsdRect); } -#line 10177 "MachineIndependent/glslang_tab.cpp" +#line 10226 "MachineIndependent/glslang_tab.cpp" break; - case 470: /* type_specifier_nonarray: IMAGECUBE */ -#line 3173 "MachineIndependent/glslang.y" + case 471: /* type_specifier_nonarray: IMAGECUBE */ +#line 3179 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtFloat, EsdCube); } -#line 10187 "MachineIndependent/glslang_tab.cpp" +#line 10236 "MachineIndependent/glslang_tab.cpp" break; - case 471: /* type_specifier_nonarray: F16IMAGECUBE */ -#line 3178 "MachineIndependent/glslang.y" + case 472: /* type_specifier_nonarray: F16IMAGECUBE */ +#line 3184 "MachineIndependent/glslang.y" { 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 10198 "MachineIndependent/glslang_tab.cpp" +#line 10247 "MachineIndependent/glslang_tab.cpp" break; - case 472: /* type_specifier_nonarray: IIMAGECUBE */ -#line 3184 "MachineIndependent/glslang.y" + case 473: /* type_specifier_nonarray: IIMAGECUBE */ +#line 3190 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtInt, EsdCube); } -#line 10208 "MachineIndependent/glslang_tab.cpp" +#line 10257 "MachineIndependent/glslang_tab.cpp" break; - case 473: /* type_specifier_nonarray: UIMAGECUBE */ -#line 3189 "MachineIndependent/glslang.y" + case 474: /* type_specifier_nonarray: UIMAGECUBE */ +#line 3195 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtUint, EsdCube); } -#line 10218 "MachineIndependent/glslang_tab.cpp" +#line 10267 "MachineIndependent/glslang_tab.cpp" break; - case 474: /* type_specifier_nonarray: IMAGEBUFFER */ -#line 3194 "MachineIndependent/glslang.y" + case 475: /* type_specifier_nonarray: IMAGEBUFFER */ +#line 3200 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtFloat, EsdBuffer); } -#line 10228 "MachineIndependent/glslang_tab.cpp" +#line 10277 "MachineIndependent/glslang_tab.cpp" break; - case 475: /* type_specifier_nonarray: F16IMAGEBUFFER */ -#line 3199 "MachineIndependent/glslang.y" + case 476: /* type_specifier_nonarray: F16IMAGEBUFFER */ +#line 3205 "MachineIndependent/glslang.y" { 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 10239 "MachineIndependent/glslang_tab.cpp" +#line 10288 "MachineIndependent/glslang_tab.cpp" break; - case 476: /* type_specifier_nonarray: IIMAGEBUFFER */ -#line 3205 "MachineIndependent/glslang.y" + case 477: /* type_specifier_nonarray: IIMAGEBUFFER */ +#line 3211 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtInt, EsdBuffer); } -#line 10249 "MachineIndependent/glslang_tab.cpp" +#line 10298 "MachineIndependent/glslang_tab.cpp" break; - case 477: /* type_specifier_nonarray: UIMAGEBUFFER */ -#line 3210 "MachineIndependent/glslang.y" + case 478: /* type_specifier_nonarray: UIMAGEBUFFER */ +#line 3216 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtUint, EsdBuffer); } -#line 10259 "MachineIndependent/glslang_tab.cpp" +#line 10308 "MachineIndependent/glslang_tab.cpp" break; - case 478: /* type_specifier_nonarray: IMAGE1DARRAY */ -#line 3215 "MachineIndependent/glslang.y" + case 479: /* type_specifier_nonarray: IMAGE1DARRAY */ +#line 3221 "MachineIndependent/glslang.y" { (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 10269 "MachineIndependent/glslang_tab.cpp" +#line 10318 "MachineIndependent/glslang_tab.cpp" break; - case 479: /* type_specifier_nonarray: F16IMAGE1DARRAY */ -#line 3220 "MachineIndependent/glslang.y" + case 480: /* type_specifier_nonarray: F16IMAGE1DARRAY */ +#line 3226 "MachineIndependent/glslang.y" { 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 10280 "MachineIndependent/glslang_tab.cpp" +#line 10329 "MachineIndependent/glslang_tab.cpp" break; - case 480: /* type_specifier_nonarray: IIMAGE1DARRAY */ -#line 3226 "MachineIndependent/glslang.y" + case 481: /* type_specifier_nonarray: IIMAGE1DARRAY */ +#line 3232 "MachineIndependent/glslang.y" { (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 10290 "MachineIndependent/glslang_tab.cpp" +#line 10339 "MachineIndependent/glslang_tab.cpp" break; - case 481: /* type_specifier_nonarray: UIMAGE1DARRAY */ -#line 3231 "MachineIndependent/glslang.y" + case 482: /* type_specifier_nonarray: UIMAGE1DARRAY */ +#line 3237 "MachineIndependent/glslang.y" { (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 10300 "MachineIndependent/glslang_tab.cpp" +#line 10349 "MachineIndependent/glslang_tab.cpp" break; - case 482: /* type_specifier_nonarray: IMAGE2DARRAY */ -#line 3236 "MachineIndependent/glslang.y" + case 483: /* type_specifier_nonarray: IMAGE2DARRAY */ +#line 3242 "MachineIndependent/glslang.y" { (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 10310 "MachineIndependent/glslang_tab.cpp" +#line 10359 "MachineIndependent/glslang_tab.cpp" break; - case 483: /* type_specifier_nonarray: F16IMAGE2DARRAY */ -#line 3241 "MachineIndependent/glslang.y" + case 484: /* type_specifier_nonarray: F16IMAGE2DARRAY */ +#line 3247 "MachineIndependent/glslang.y" { 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 10321 "MachineIndependent/glslang_tab.cpp" +#line 10370 "MachineIndependent/glslang_tab.cpp" break; - case 484: /* type_specifier_nonarray: IIMAGE2DARRAY */ -#line 3247 "MachineIndependent/glslang.y" + case 485: /* type_specifier_nonarray: IIMAGE2DARRAY */ +#line 3253 "MachineIndependent/glslang.y" { (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 10331 "MachineIndependent/glslang_tab.cpp" +#line 10380 "MachineIndependent/glslang_tab.cpp" break; - case 485: /* type_specifier_nonarray: UIMAGE2DARRAY */ -#line 3252 "MachineIndependent/glslang.y" + case 486: /* type_specifier_nonarray: UIMAGE2DARRAY */ +#line 3258 "MachineIndependent/glslang.y" { (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 10341 "MachineIndependent/glslang_tab.cpp" +#line 10390 "MachineIndependent/glslang_tab.cpp" break; - case 486: /* type_specifier_nonarray: IMAGECUBEARRAY */ -#line 3257 "MachineIndependent/glslang.y" + case 487: /* type_specifier_nonarray: IMAGECUBEARRAY */ +#line 3263 "MachineIndependent/glslang.y" { (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 10351 "MachineIndependent/glslang_tab.cpp" +#line 10400 "MachineIndependent/glslang_tab.cpp" break; - case 487: /* type_specifier_nonarray: F16IMAGECUBEARRAY */ -#line 3262 "MachineIndependent/glslang.y" + case 488: /* type_specifier_nonarray: F16IMAGECUBEARRAY */ +#line 3268 "MachineIndependent/glslang.y" { 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 10362 "MachineIndependent/glslang_tab.cpp" +#line 10411 "MachineIndependent/glslang_tab.cpp" break; - case 488: /* type_specifier_nonarray: IIMAGECUBEARRAY */ -#line 3268 "MachineIndependent/glslang.y" + case 489: /* type_specifier_nonarray: IIMAGECUBEARRAY */ +#line 3274 "MachineIndependent/glslang.y" { (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 10372 "MachineIndependent/glslang_tab.cpp" +#line 10421 "MachineIndependent/glslang_tab.cpp" break; - case 489: /* type_specifier_nonarray: UIMAGECUBEARRAY */ -#line 3273 "MachineIndependent/glslang.y" + case 490: /* type_specifier_nonarray: UIMAGECUBEARRAY */ +#line 3279 "MachineIndependent/glslang.y" { (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 10382 "MachineIndependent/glslang_tab.cpp" +#line 10431 "MachineIndependent/glslang_tab.cpp" break; - case 490: /* type_specifier_nonarray: IMAGE2DMS */ -#line 3278 "MachineIndependent/glslang.y" + case 491: /* type_specifier_nonarray: IMAGE2DMS */ +#line 3284 "MachineIndependent/glslang.y" { (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 10392 "MachineIndependent/glslang_tab.cpp" +#line 10441 "MachineIndependent/glslang_tab.cpp" break; - case 491: /* type_specifier_nonarray: F16IMAGE2DMS */ -#line 3283 "MachineIndependent/glslang.y" + case 492: /* type_specifier_nonarray: F16IMAGE2DMS */ +#line 3289 "MachineIndependent/glslang.y" { 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 10403 "MachineIndependent/glslang_tab.cpp" +#line 10452 "MachineIndependent/glslang_tab.cpp" break; - case 492: /* type_specifier_nonarray: IIMAGE2DMS */ -#line 3289 "MachineIndependent/glslang.y" + case 493: /* type_specifier_nonarray: IIMAGE2DMS */ +#line 3295 "MachineIndependent/glslang.y" { (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 10413 "MachineIndependent/glslang_tab.cpp" +#line 10462 "MachineIndependent/glslang_tab.cpp" break; - case 493: /* type_specifier_nonarray: UIMAGE2DMS */ -#line 3294 "MachineIndependent/glslang.y" + case 494: /* type_specifier_nonarray: UIMAGE2DMS */ +#line 3300 "MachineIndependent/glslang.y" { (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 10423 "MachineIndependent/glslang_tab.cpp" +#line 10472 "MachineIndependent/glslang_tab.cpp" break; - case 494: /* type_specifier_nonarray: IMAGE2DMSARRAY */ -#line 3299 "MachineIndependent/glslang.y" + case 495: /* type_specifier_nonarray: IMAGE2DMSARRAY */ +#line 3305 "MachineIndependent/glslang.y" { (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 10433 "MachineIndependent/glslang_tab.cpp" +#line 10482 "MachineIndependent/glslang_tab.cpp" break; - case 495: /* type_specifier_nonarray: F16IMAGE2DMSARRAY */ -#line 3304 "MachineIndependent/glslang.y" + case 496: /* type_specifier_nonarray: F16IMAGE2DMSARRAY */ +#line 3310 "MachineIndependent/glslang.y" { 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 10444 "MachineIndependent/glslang_tab.cpp" +#line 10493 "MachineIndependent/glslang_tab.cpp" break; - case 496: /* type_specifier_nonarray: IIMAGE2DMSARRAY */ -#line 3310 "MachineIndependent/glslang.y" + case 497: /* type_specifier_nonarray: IIMAGE2DMSARRAY */ +#line 3316 "MachineIndependent/glslang.y" { (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 10454 "MachineIndependent/glslang_tab.cpp" +#line 10503 "MachineIndependent/glslang_tab.cpp" break; - case 497: /* type_specifier_nonarray: UIMAGE2DMSARRAY */ -#line 3315 "MachineIndependent/glslang.y" + case 498: /* type_specifier_nonarray: UIMAGE2DMSARRAY */ +#line 3321 "MachineIndependent/glslang.y" { (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 10464 "MachineIndependent/glslang_tab.cpp" +#line 10513 "MachineIndependent/glslang_tab.cpp" break; - case 498: /* type_specifier_nonarray: I64IMAGE1D */ -#line 3320 "MachineIndependent/glslang.y" + case 499: /* type_specifier_nonarray: I64IMAGE1D */ +#line 3326 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtInt64, Esd1D); } -#line 10474 "MachineIndependent/glslang_tab.cpp" +#line 10523 "MachineIndependent/glslang_tab.cpp" break; - case 499: /* type_specifier_nonarray: U64IMAGE1D */ -#line 3325 "MachineIndependent/glslang.y" + case 500: /* type_specifier_nonarray: U64IMAGE1D */ +#line 3331 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtUint64, Esd1D); } -#line 10484 "MachineIndependent/glslang_tab.cpp" +#line 10533 "MachineIndependent/glslang_tab.cpp" break; - case 500: /* type_specifier_nonarray: I64IMAGE2D */ -#line 3330 "MachineIndependent/glslang.y" + case 501: /* type_specifier_nonarray: I64IMAGE2D */ +#line 3336 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtInt64, Esd2D); } -#line 10494 "MachineIndependent/glslang_tab.cpp" +#line 10543 "MachineIndependent/glslang_tab.cpp" break; - case 501: /* type_specifier_nonarray: U64IMAGE2D */ -#line 3335 "MachineIndependent/glslang.y" + case 502: /* type_specifier_nonarray: U64IMAGE2D */ +#line 3341 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtUint64, Esd2D); } -#line 10504 "MachineIndependent/glslang_tab.cpp" +#line 10553 "MachineIndependent/glslang_tab.cpp" break; - case 502: /* type_specifier_nonarray: I64IMAGE3D */ -#line 3340 "MachineIndependent/glslang.y" + case 503: /* type_specifier_nonarray: I64IMAGE3D */ +#line 3346 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtInt64, Esd3D); } -#line 10514 "MachineIndependent/glslang_tab.cpp" +#line 10563 "MachineIndependent/glslang_tab.cpp" break; - case 503: /* type_specifier_nonarray: U64IMAGE3D */ -#line 3345 "MachineIndependent/glslang.y" + case 504: /* type_specifier_nonarray: U64IMAGE3D */ +#line 3351 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtUint64, Esd3D); } -#line 10524 "MachineIndependent/glslang_tab.cpp" +#line 10573 "MachineIndependent/glslang_tab.cpp" break; - case 504: /* type_specifier_nonarray: I64IMAGE2DRECT */ -#line 3350 "MachineIndependent/glslang.y" + case 505: /* type_specifier_nonarray: I64IMAGE2DRECT */ +#line 3356 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtInt64, EsdRect); } -#line 10534 "MachineIndependent/glslang_tab.cpp" +#line 10583 "MachineIndependent/glslang_tab.cpp" break; - case 505: /* type_specifier_nonarray: U64IMAGE2DRECT */ -#line 3355 "MachineIndependent/glslang.y" + case 506: /* type_specifier_nonarray: U64IMAGE2DRECT */ +#line 3361 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtUint64, EsdRect); } -#line 10544 "MachineIndependent/glslang_tab.cpp" +#line 10593 "MachineIndependent/glslang_tab.cpp" break; - case 506: /* type_specifier_nonarray: I64IMAGECUBE */ -#line 3360 "MachineIndependent/glslang.y" + case 507: /* type_specifier_nonarray: I64IMAGECUBE */ +#line 3366 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtInt64, EsdCube); } -#line 10554 "MachineIndependent/glslang_tab.cpp" +#line 10603 "MachineIndependent/glslang_tab.cpp" break; - case 507: /* type_specifier_nonarray: U64IMAGECUBE */ -#line 3365 "MachineIndependent/glslang.y" + case 508: /* type_specifier_nonarray: U64IMAGECUBE */ +#line 3371 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtUint64, EsdCube); } -#line 10564 "MachineIndependent/glslang_tab.cpp" +#line 10613 "MachineIndependent/glslang_tab.cpp" break; - case 508: /* type_specifier_nonarray: I64IMAGEBUFFER */ -#line 3370 "MachineIndependent/glslang.y" + case 509: /* type_specifier_nonarray: I64IMAGEBUFFER */ +#line 3376 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtInt64, EsdBuffer); } -#line 10574 "MachineIndependent/glslang_tab.cpp" +#line 10623 "MachineIndependent/glslang_tab.cpp" break; - case 509: /* type_specifier_nonarray: U64IMAGEBUFFER */ -#line 3375 "MachineIndependent/glslang.y" + case 510: /* type_specifier_nonarray: U64IMAGEBUFFER */ +#line 3381 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtUint64, EsdBuffer); } -#line 10584 "MachineIndependent/glslang_tab.cpp" +#line 10633 "MachineIndependent/glslang_tab.cpp" break; - case 510: /* type_specifier_nonarray: I64IMAGE1DARRAY */ -#line 3380 "MachineIndependent/glslang.y" + case 511: /* type_specifier_nonarray: I64IMAGE1DARRAY */ +#line 3386 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtInt64, Esd1D, true); } -#line 10594 "MachineIndependent/glslang_tab.cpp" +#line 10643 "MachineIndependent/glslang_tab.cpp" break; - case 511: /* type_specifier_nonarray: U64IMAGE1DARRAY */ -#line 3385 "MachineIndependent/glslang.y" + case 512: /* type_specifier_nonarray: U64IMAGE1DARRAY */ +#line 3391 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtUint64, Esd1D, true); } -#line 10604 "MachineIndependent/glslang_tab.cpp" +#line 10653 "MachineIndependent/glslang_tab.cpp" break; - case 512: /* type_specifier_nonarray: I64IMAGE2DARRAY */ -#line 3390 "MachineIndependent/glslang.y" + case 513: /* type_specifier_nonarray: I64IMAGE2DARRAY */ +#line 3396 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtInt64, Esd2D, true); } -#line 10614 "MachineIndependent/glslang_tab.cpp" +#line 10663 "MachineIndependent/glslang_tab.cpp" break; - case 513: /* type_specifier_nonarray: U64IMAGE2DARRAY */ -#line 3395 "MachineIndependent/glslang.y" + case 514: /* type_specifier_nonarray: U64IMAGE2DARRAY */ +#line 3401 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtUint64, Esd2D, true); } -#line 10624 "MachineIndependent/glslang_tab.cpp" +#line 10673 "MachineIndependent/glslang_tab.cpp" break; - case 514: /* type_specifier_nonarray: I64IMAGECUBEARRAY */ -#line 3400 "MachineIndependent/glslang.y" + case 515: /* type_specifier_nonarray: I64IMAGECUBEARRAY */ +#line 3406 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtInt64, EsdCube, true); } -#line 10634 "MachineIndependent/glslang_tab.cpp" +#line 10683 "MachineIndependent/glslang_tab.cpp" break; - case 515: /* type_specifier_nonarray: U64IMAGECUBEARRAY */ -#line 3405 "MachineIndependent/glslang.y" + case 516: /* type_specifier_nonarray: U64IMAGECUBEARRAY */ +#line 3411 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtUint64, EsdCube, true); } -#line 10644 "MachineIndependent/glslang_tab.cpp" +#line 10693 "MachineIndependent/glslang_tab.cpp" break; - case 516: /* type_specifier_nonarray: I64IMAGE2DMS */ -#line 3410 "MachineIndependent/glslang.y" + case 517: /* type_specifier_nonarray: I64IMAGE2DMS */ +#line 3416 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtInt64, Esd2D, false, false, true); } -#line 10654 "MachineIndependent/glslang_tab.cpp" +#line 10703 "MachineIndependent/glslang_tab.cpp" break; - case 517: /* type_specifier_nonarray: U64IMAGE2DMS */ -#line 3415 "MachineIndependent/glslang.y" + case 518: /* type_specifier_nonarray: U64IMAGE2DMS */ +#line 3421 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtUint64, Esd2D, false, false, true); } -#line 10664 "MachineIndependent/glslang_tab.cpp" +#line 10713 "MachineIndependent/glslang_tab.cpp" break; - case 518: /* type_specifier_nonarray: I64IMAGE2DMSARRAY */ -#line 3420 "MachineIndependent/glslang.y" + case 519: /* type_specifier_nonarray: I64IMAGE2DMSARRAY */ +#line 3426 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtInt64, Esd2D, true, false, true); } -#line 10674 "MachineIndependent/glslang_tab.cpp" +#line 10723 "MachineIndependent/glslang_tab.cpp" break; - case 519: /* type_specifier_nonarray: U64IMAGE2DMSARRAY */ -#line 3425 "MachineIndependent/glslang.y" + case 520: /* type_specifier_nonarray: U64IMAGE2DMSARRAY */ +#line 3431 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtUint64, Esd2D, true, false, true); } -#line 10684 "MachineIndependent/glslang_tab.cpp" +#line 10733 "MachineIndependent/glslang_tab.cpp" break; - case 520: /* type_specifier_nonarray: SAMPLEREXTERNALOES */ -#line 3430 "MachineIndependent/glslang.y" + case 521: /* type_specifier_nonarray: SAMPLEREXTERNALOES */ +#line 3436 "MachineIndependent/glslang.y" { // 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 10695 "MachineIndependent/glslang_tab.cpp" +#line 10744 "MachineIndependent/glslang_tab.cpp" break; - case 521: /* type_specifier_nonarray: SAMPLEREXTERNAL2DY2YEXT */ -#line 3436 "MachineIndependent/glslang.y" + case 522: /* type_specifier_nonarray: SAMPLEREXTERNAL2DY2YEXT */ +#line 3442 "MachineIndependent/glslang.y" { // 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 10706 "MachineIndependent/glslang_tab.cpp" +#line 10755 "MachineIndependent/glslang_tab.cpp" break; - case 522: /* type_specifier_nonarray: ATTACHMENTEXT */ -#line 3442 "MachineIndependent/glslang.y" + case 523: /* type_specifier_nonarray: ATTACHMENTEXT */ +#line 3448 "MachineIndependent/glslang.y" { parseContext.requireStage((yyvsp[0].lex).loc, EShLangFragment, "attachmentEXT input"); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setAttachmentEXT(EbtFloat); } -#line 10717 "MachineIndependent/glslang_tab.cpp" +#line 10766 "MachineIndependent/glslang_tab.cpp" break; - case 523: /* type_specifier_nonarray: IATTACHMENTEXT */ -#line 3448 "MachineIndependent/glslang.y" + case 524: /* type_specifier_nonarray: IATTACHMENTEXT */ +#line 3454 "MachineIndependent/glslang.y" { parseContext.requireStage((yyvsp[0].lex).loc, EShLangFragment, "attachmentEXT input"); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setAttachmentEXT(EbtInt); } -#line 10728 "MachineIndependent/glslang_tab.cpp" +#line 10777 "MachineIndependent/glslang_tab.cpp" break; - case 524: /* type_specifier_nonarray: UATTACHMENTEXT */ -#line 3454 "MachineIndependent/glslang.y" + case 525: /* type_specifier_nonarray: UATTACHMENTEXT */ +#line 3460 "MachineIndependent/glslang.y" { parseContext.requireStage((yyvsp[0].lex).loc, EShLangFragment, "attachmentEXT input"); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setAttachmentEXT(EbtUint); } -#line 10739 "MachineIndependent/glslang_tab.cpp" +#line 10788 "MachineIndependent/glslang_tab.cpp" break; - case 525: /* type_specifier_nonarray: SUBPASSINPUT */ -#line 3460 "MachineIndependent/glslang.y" + case 526: /* type_specifier_nonarray: SUBPASSINPUT */ +#line 3466 "MachineIndependent/glslang.y" { 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 10750 "MachineIndependent/glslang_tab.cpp" +#line 10799 "MachineIndependent/glslang_tab.cpp" break; - case 526: /* type_specifier_nonarray: SUBPASSINPUTMS */ -#line 3466 "MachineIndependent/glslang.y" + case 527: /* type_specifier_nonarray: SUBPASSINPUTMS */ +#line 3472 "MachineIndependent/glslang.y" { 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 10761 "MachineIndependent/glslang_tab.cpp" +#line 10810 "MachineIndependent/glslang_tab.cpp" break; - case 527: /* type_specifier_nonarray: F16SUBPASSINPUT */ -#line 3472 "MachineIndependent/glslang.y" + case 528: /* type_specifier_nonarray: F16SUBPASSINPUT */ +#line 3478 "MachineIndependent/glslang.y" { parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float subpass input", parseContext.symbolTable.atBuiltInLevel()); parseContext.requireStage((yyvsp[0].lex).loc, EShLangFragment, "subpass input"); @@ -10769,11 +10818,11 @@ yyreduce: (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setSubpass(EbtFloat16); } -#line 10773 "MachineIndependent/glslang_tab.cpp" +#line 10822 "MachineIndependent/glslang_tab.cpp" break; - case 528: /* type_specifier_nonarray: F16SUBPASSINPUTMS */ -#line 3479 "MachineIndependent/glslang.y" + case 529: /* type_specifier_nonarray: F16SUBPASSINPUTMS */ +#line 3485 "MachineIndependent/glslang.y" { parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float subpass input", parseContext.symbolTable.atBuiltInLevel()); parseContext.requireStage((yyvsp[0].lex).loc, EShLangFragment, "subpass input"); @@ -10781,55 +10830,55 @@ yyreduce: (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setSubpass(EbtFloat16, true); } -#line 10785 "MachineIndependent/glslang_tab.cpp" +#line 10834 "MachineIndependent/glslang_tab.cpp" break; - case 529: /* type_specifier_nonarray: ISUBPASSINPUT */ -#line 3486 "MachineIndependent/glslang.y" + case 530: /* type_specifier_nonarray: ISUBPASSINPUT */ +#line 3492 "MachineIndependent/glslang.y" { 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 10796 "MachineIndependent/glslang_tab.cpp" +#line 10845 "MachineIndependent/glslang_tab.cpp" break; - case 530: /* type_specifier_nonarray: ISUBPASSINPUTMS */ -#line 3492 "MachineIndependent/glslang.y" + case 531: /* type_specifier_nonarray: ISUBPASSINPUTMS */ +#line 3498 "MachineIndependent/glslang.y" { 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 10807 "MachineIndependent/glslang_tab.cpp" +#line 10856 "MachineIndependent/glslang_tab.cpp" break; - case 531: /* type_specifier_nonarray: USUBPASSINPUT */ -#line 3498 "MachineIndependent/glslang.y" + case 532: /* type_specifier_nonarray: USUBPASSINPUT */ +#line 3504 "MachineIndependent/glslang.y" { 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 10818 "MachineIndependent/glslang_tab.cpp" +#line 10867 "MachineIndependent/glslang_tab.cpp" break; - case 532: /* type_specifier_nonarray: USUBPASSINPUTMS */ -#line 3504 "MachineIndependent/glslang.y" + case 533: /* type_specifier_nonarray: USUBPASSINPUTMS */ +#line 3510 "MachineIndependent/glslang.y" { 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 10829 "MachineIndependent/glslang_tab.cpp" +#line 10878 "MachineIndependent/glslang_tab.cpp" break; - case 533: /* type_specifier_nonarray: FCOOPMATNV */ -#line 3510 "MachineIndependent/glslang.y" + case 534: /* type_specifier_nonarray: FCOOPMATNV */ +#line 3516 "MachineIndependent/glslang.y" { parseContext.fcoopmatCheckNV((yyvsp[0].lex).loc, "fcoopmatNV", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); @@ -10837,11 +10886,11 @@ yyreduce: (yyval.interm.type).coopmatNV = true; (yyval.interm.type).coopmatKHR = false; } -#line 10841 "MachineIndependent/glslang_tab.cpp" +#line 10890 "MachineIndependent/glslang_tab.cpp" break; - case 534: /* type_specifier_nonarray: ICOOPMATNV */ -#line 3517 "MachineIndependent/glslang.y" + case 535: /* type_specifier_nonarray: ICOOPMATNV */ +#line 3523 "MachineIndependent/glslang.y" { parseContext.intcoopmatCheckNV((yyvsp[0].lex).loc, "icoopmatNV", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); @@ -10849,11 +10898,11 @@ yyreduce: (yyval.interm.type).coopmatNV = true; (yyval.interm.type).coopmatKHR = false; } -#line 10853 "MachineIndependent/glslang_tab.cpp" +#line 10902 "MachineIndependent/glslang_tab.cpp" break; - case 535: /* type_specifier_nonarray: UCOOPMATNV */ -#line 3524 "MachineIndependent/glslang.y" + case 536: /* type_specifier_nonarray: UCOOPMATNV */ +#line 3530 "MachineIndependent/glslang.y" { parseContext.intcoopmatCheckNV((yyvsp[0].lex).loc, "ucoopmatNV", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); @@ -10861,11 +10910,11 @@ yyreduce: (yyval.interm.type).coopmatNV = true; (yyval.interm.type).coopmatKHR = false; } -#line 10865 "MachineIndependent/glslang_tab.cpp" +#line 10914 "MachineIndependent/glslang_tab.cpp" break; - case 536: /* type_specifier_nonarray: COOPMAT */ -#line 3531 "MachineIndependent/glslang.y" + case 537: /* type_specifier_nonarray: COOPMAT */ +#line 3537 "MachineIndependent/glslang.y" { parseContext.coopmatCheck((yyvsp[0].lex).loc, "coopmat", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); @@ -10873,39 +10922,79 @@ yyreduce: (yyval.interm.type).coopmatNV = false; (yyval.interm.type).coopmatKHR = true; } -#line 10877 "MachineIndependent/glslang_tab.cpp" +#line 10926 "MachineIndependent/glslang_tab.cpp" break; - case 537: /* type_specifier_nonarray: spirv_type_specifier */ -#line 3538 "MachineIndependent/glslang.y" + case 538: /* type_specifier_nonarray: TENSORLAYOUTNV */ +#line 3544 "MachineIndependent/glslang.y" + { + parseContext.tensorLayoutViewCheck((yyvsp[0].lex).loc, "tensorLayoutNV", parseContext.symbolTable.atBuiltInLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtTensorLayoutNV; + } +#line 10936 "MachineIndependent/glslang_tab.cpp" + break; + + case 539: /* type_specifier_nonarray: TENSORVIEWNV */ +#line 3549 "MachineIndependent/glslang.y" + { + parseContext.tensorLayoutViewCheck((yyvsp[0].lex).loc, "tensorViewNV", parseContext.symbolTable.atBuiltInLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtTensorViewNV; + } +#line 10946 "MachineIndependent/glslang_tab.cpp" + break; + + case 540: /* type_specifier_nonarray: FUNCTION */ +#line 3554 "MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[0].lex).loc); + (yyval.interm.type).basicType = EbtFunction; + } +#line 10955 "MachineIndependent/glslang_tab.cpp" + break; + + case 541: /* type_specifier_nonarray: COOPVECNV */ +#line 3558 "MachineIndependent/glslang.y" + { + parseContext.coopvecCheck((yyvsp[0].lex).loc, "coopvecNV", parseContext.symbolTable.atBuiltInLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtCoopvecNV; + (yyval.interm.type).coopvecNV = true; + } +#line 10966 "MachineIndependent/glslang_tab.cpp" + break; + + case 542: /* type_specifier_nonarray: spirv_type_specifier */ +#line 3564 "MachineIndependent/glslang.y" { parseContext.requireExtensions((yyvsp[0].interm.type).loc, 1, &E_GL_EXT_spirv_intrinsics, "SPIR-V type specifier"); (yyval.interm.type) = (yyvsp[0].interm.type); } -#line 10886 "MachineIndependent/glslang_tab.cpp" +#line 10975 "MachineIndependent/glslang_tab.cpp" break; - case 538: /* type_specifier_nonarray: HITOBJECTNV */ -#line 3542 "MachineIndependent/glslang.y" + case 543: /* type_specifier_nonarray: HITOBJECTNV */ +#line 3568 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtHitObjectNV; } -#line 10895 "MachineIndependent/glslang_tab.cpp" +#line 10984 "MachineIndependent/glslang_tab.cpp" break; - case 539: /* type_specifier_nonarray: struct_specifier */ -#line 3546 "MachineIndependent/glslang.y" + case 544: /* type_specifier_nonarray: struct_specifier */ +#line 3572 "MachineIndependent/glslang.y" { (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 10905 "MachineIndependent/glslang_tab.cpp" +#line 10994 "MachineIndependent/glslang_tab.cpp" break; - case 540: /* type_specifier_nonarray: TYPE_NAME */ -#line 3551 "MachineIndependent/glslang.y" + case 545: /* type_specifier_nonarray: TYPE_NAME */ +#line 3577 "MachineIndependent/glslang.y" { // // This is for user defined type names. The lexical phase looked up the @@ -10919,47 +11008,47 @@ yyreduce: } else parseContext.error((yyvsp[0].lex).loc, "expected type name", (yyvsp[0].lex).string->c_str(), ""); } -#line 10923 "MachineIndependent/glslang_tab.cpp" +#line 11012 "MachineIndependent/glslang_tab.cpp" break; - case 541: /* precision_qualifier: HIGH_PRECISION */ -#line 3567 "MachineIndependent/glslang.y" + case 546: /* precision_qualifier: HIGH_PRECISION */ +#line 3593 "MachineIndependent/glslang.y" { 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 10933 "MachineIndependent/glslang_tab.cpp" +#line 11022 "MachineIndependent/glslang_tab.cpp" break; - case 542: /* precision_qualifier: MEDIUM_PRECISION */ -#line 3572 "MachineIndependent/glslang.y" + case 547: /* precision_qualifier: MEDIUM_PRECISION */ +#line 3598 "MachineIndependent/glslang.y" { 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 10943 "MachineIndependent/glslang_tab.cpp" +#line 11032 "MachineIndependent/glslang_tab.cpp" break; - case 543: /* precision_qualifier: LOW_PRECISION */ -#line 3577 "MachineIndependent/glslang.y" + case 548: /* precision_qualifier: LOW_PRECISION */ +#line 3603 "MachineIndependent/glslang.y" { 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 10953 "MachineIndependent/glslang_tab.cpp" +#line 11042 "MachineIndependent/glslang_tab.cpp" break; - case 544: /* $@3: %empty */ -#line 3585 "MachineIndependent/glslang.y" + case 549: /* $@3: %empty */ +#line 3611 "MachineIndependent/glslang.y" { parseContext.nestedStructCheck((yyvsp[-2].lex).loc); } -#line 10959 "MachineIndependent/glslang_tab.cpp" +#line 11048 "MachineIndependent/glslang_tab.cpp" break; - case 545: /* struct_specifier: STRUCT IDENTIFIER LEFT_BRACE $@3 struct_declaration_list RIGHT_BRACE */ -#line 3585 "MachineIndependent/glslang.y" + case 550: /* struct_specifier: STRUCT IDENTIFIER LEFT_BRACE $@3 struct_declaration_list RIGHT_BRACE */ +#line 3611 "MachineIndependent/glslang.y" { TType* structure = new TType((yyvsp[-1].interm.typeList), *(yyvsp[-4].lex).string); @@ -10977,17 +11066,17 @@ yyreduce: (yyval.interm.type).userDef = structure; --parseContext.structNestingLevel; } -#line 10981 "MachineIndependent/glslang_tab.cpp" +#line 11070 "MachineIndependent/glslang_tab.cpp" break; - case 546: /* $@4: %empty */ -#line 3602 "MachineIndependent/glslang.y" + case 551: /* $@4: %empty */ +#line 3628 "MachineIndependent/glslang.y" { parseContext.nestedStructCheck((yyvsp[-1].lex).loc); } -#line 10987 "MachineIndependent/glslang_tab.cpp" +#line 11076 "MachineIndependent/glslang_tab.cpp" break; - case 547: /* struct_specifier: STRUCT LEFT_BRACE $@4 struct_declaration_list RIGHT_BRACE */ -#line 3602 "MachineIndependent/glslang.y" + case 552: /* struct_specifier: STRUCT LEFT_BRACE $@4 struct_declaration_list RIGHT_BRACE */ +#line 3628 "MachineIndependent/glslang.y" { TType* structure = new TType((yyvsp[-1].interm.typeList), TString("")); (yyval.interm.type).init((yyvsp[-4].lex).loc); @@ -10995,19 +11084,19 @@ yyreduce: (yyval.interm.type).userDef = structure; --parseContext.structNestingLevel; } -#line 10999 "MachineIndependent/glslang_tab.cpp" +#line 11088 "MachineIndependent/glslang_tab.cpp" break; - case 548: /* struct_declaration_list: struct_declaration */ -#line 3612 "MachineIndependent/glslang.y" + case 553: /* struct_declaration_list: struct_declaration */ +#line 3638 "MachineIndependent/glslang.y" { (yyval.interm.typeList) = (yyvsp[0].interm.typeList); } -#line 11007 "MachineIndependent/glslang_tab.cpp" +#line 11096 "MachineIndependent/glslang_tab.cpp" break; - case 549: /* struct_declaration_list: struct_declaration_list struct_declaration */ -#line 3615 "MachineIndependent/glslang.y" + case 554: /* struct_declaration_list: struct_declaration_list struct_declaration */ +#line 3641 "MachineIndependent/glslang.y" { (yyval.interm.typeList) = (yyvsp[-1].interm.typeList); for (unsigned int i = 0; i < (yyvsp[0].interm.typeList)->size(); ++i) { @@ -11018,11 +11107,11 @@ yyreduce: (yyval.interm.typeList)->push_back((*(yyvsp[0].interm.typeList))[i]); } } -#line 11022 "MachineIndependent/glslang_tab.cpp" +#line 11111 "MachineIndependent/glslang_tab.cpp" break; - case 550: /* struct_declaration: type_specifier struct_declarator_list SEMICOLON */ -#line 3628 "MachineIndependent/glslang.y" + case 555: /* struct_declaration: type_specifier struct_declarator_list SEMICOLON */ +#line 3654 "MachineIndependent/glslang.y" { if ((yyvsp[-2].interm.type).arraySizes) { parseContext.profileRequires((yyvsp[-2].interm.type).loc, ENoProfile, 120, E_GL_3DL_array_objects, "arrayed type"); @@ -11034,7 +11123,7 @@ yyreduce: (yyval.interm.typeList) = (yyvsp[-1].interm.typeList); parseContext.voidErrorCheck((yyvsp[-2].interm.type).loc, (*(yyvsp[-1].interm.typeList))[0].type->getFieldName(), (yyvsp[-2].interm.type).basicType); - parseContext.precisionQualifierCheck((yyvsp[-2].interm.type).loc, (yyvsp[-2].interm.type).basicType, (yyvsp[-2].interm.type).qualifier, (yyvsp[-2].interm.type).isCoopmat()); + parseContext.precisionQualifierCheck((yyvsp[-2].interm.type).loc, (yyvsp[-2].interm.type).basicType, (yyvsp[-2].interm.type).qualifier, (yyvsp[-2].interm.type).isCoopmatOrvec()); for (unsigned int i = 0; i < (yyval.interm.typeList)->size(); ++i) { TType type((yyvsp[-2].interm.type)); @@ -11045,11 +11134,11 @@ yyreduce: (*(yyval.interm.typeList))[i].type->shallowCopy(type); } } -#line 11049 "MachineIndependent/glslang_tab.cpp" +#line 11138 "MachineIndependent/glslang_tab.cpp" break; - case 551: /* struct_declaration: type_qualifier type_specifier struct_declarator_list SEMICOLON */ -#line 3650 "MachineIndependent/glslang.y" + case 556: /* struct_declaration: type_qualifier type_specifier struct_declarator_list SEMICOLON */ +#line 3676 "MachineIndependent/glslang.y" { if ((yyvsp[-2].interm.type).arraySizes) { parseContext.profileRequires((yyvsp[-2].interm.type).loc, ENoProfile, 120, E_GL_3DL_array_objects, "arrayed type"); @@ -11063,7 +11152,7 @@ yyreduce: parseContext.memberQualifierCheck((yyvsp[-3].interm.type)); parseContext.voidErrorCheck((yyvsp[-2].interm.type).loc, (*(yyvsp[-1].interm.typeList))[0].type->getFieldName(), (yyvsp[-2].interm.type).basicType); parseContext.mergeQualifiers((yyvsp[-2].interm.type).loc, (yyvsp[-2].interm.type).qualifier, (yyvsp[-3].interm.type).qualifier, true); - parseContext.precisionQualifierCheck((yyvsp[-2].interm.type).loc, (yyvsp[-2].interm.type).basicType, (yyvsp[-2].interm.type).qualifier, (yyvsp[-2].interm.type).isCoopmat()); + parseContext.precisionQualifierCheck((yyvsp[-2].interm.type).loc, (yyvsp[-2].interm.type).basicType, (yyvsp[-2].interm.type).qualifier, (yyvsp[-2].interm.type).isCoopmatOrvec()); for (unsigned int i = 0; i < (yyval.interm.typeList)->size(); ++i) { TType type((yyvsp[-2].interm.type)); @@ -11074,38 +11163,38 @@ yyreduce: (*(yyval.interm.typeList))[i].type->shallowCopy(type); } } -#line 11078 "MachineIndependent/glslang_tab.cpp" +#line 11167 "MachineIndependent/glslang_tab.cpp" break; - case 552: /* struct_declarator_list: struct_declarator */ -#line 3677 "MachineIndependent/glslang.y" + case 557: /* struct_declarator_list: struct_declarator */ +#line 3703 "MachineIndependent/glslang.y" { (yyval.interm.typeList) = new TTypeList; (yyval.interm.typeList)->push_back((yyvsp[0].interm.typeLine)); } -#line 11087 "MachineIndependent/glslang_tab.cpp" +#line 11176 "MachineIndependent/glslang_tab.cpp" break; - case 553: /* struct_declarator_list: struct_declarator_list COMMA struct_declarator */ -#line 3681 "MachineIndependent/glslang.y" + case 558: /* struct_declarator_list: struct_declarator_list COMMA struct_declarator */ +#line 3707 "MachineIndependent/glslang.y" { (yyval.interm.typeList)->push_back((yyvsp[0].interm.typeLine)); } -#line 11095 "MachineIndependent/glslang_tab.cpp" +#line 11184 "MachineIndependent/glslang_tab.cpp" break; - case 554: /* struct_declarator: IDENTIFIER */ -#line 3687 "MachineIndependent/glslang.y" + case 559: /* struct_declarator: IDENTIFIER */ +#line 3713 "MachineIndependent/glslang.y" { (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 11105 "MachineIndependent/glslang_tab.cpp" +#line 11194 "MachineIndependent/glslang_tab.cpp" break; - case 555: /* struct_declarator: IDENTIFIER array_specifier */ -#line 3692 "MachineIndependent/glslang.y" + case 560: /* struct_declarator: IDENTIFIER array_specifier */ +#line 3718 "MachineIndependent/glslang.y" { parseContext.arrayOfArrayVersionCheck((yyvsp[-1].lex).loc, (yyvsp[0].interm).arraySizes); @@ -11114,246 +11203,250 @@ yyreduce: (yyval.interm.typeLine).type->setFieldName(*(yyvsp[-1].lex).string); (yyval.interm.typeLine).type->transferArraySizes((yyvsp[0].interm).arraySizes); } -#line 11118 "MachineIndependent/glslang_tab.cpp" +#line 11207 "MachineIndependent/glslang_tab.cpp" break; - case 556: /* initializer: assignment_expression */ -#line 3703 "MachineIndependent/glslang.y" + case 561: /* initializer: assignment_expression */ +#line 3729 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 11126 "MachineIndependent/glslang_tab.cpp" +#line 11215 "MachineIndependent/glslang_tab.cpp" break; - case 557: /* initializer: LEFT_BRACE initializer_list RIGHT_BRACE */ -#line 3706 "MachineIndependent/glslang.y" + case 562: /* initializer: LEFT_BRACE initializer_list RIGHT_BRACE */ +#line 3732 "MachineIndependent/glslang.y" { 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 11137 "MachineIndependent/glslang_tab.cpp" +#line 11226 "MachineIndependent/glslang_tab.cpp" break; - case 558: /* initializer: LEFT_BRACE initializer_list COMMA RIGHT_BRACE */ -#line 3712 "MachineIndependent/glslang.y" + case 563: /* initializer: LEFT_BRACE initializer_list COMMA RIGHT_BRACE */ +#line 3738 "MachineIndependent/glslang.y" { 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 11148 "MachineIndependent/glslang_tab.cpp" +#line 11237 "MachineIndependent/glslang_tab.cpp" break; - case 559: /* initializer: LEFT_BRACE RIGHT_BRACE */ -#line 3718 "MachineIndependent/glslang.y" + case 564: /* initializer: LEFT_BRACE RIGHT_BRACE */ +#line 3744 "MachineIndependent/glslang.y" { const char* initFeature = "empty { } initializer"; parseContext.profileRequires((yyvsp[-1].lex).loc, EEsProfile, 0, E_GL_EXT_null_initializer, initFeature); parseContext.profileRequires((yyvsp[-1].lex).loc, ~EEsProfile, 0, E_GL_EXT_null_initializer, initFeature); (yyval.interm.intermTypedNode) = parseContext.intermediate.makeAggregate((yyvsp[-1].lex).loc); } -#line 11159 "MachineIndependent/glslang_tab.cpp" +#line 11248 "MachineIndependent/glslang_tab.cpp" break; - case 560: /* initializer_list: initializer */ -#line 3727 "MachineIndependent/glslang.y" + case 565: /* initializer_list: initializer */ +#line 3753 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = parseContext.intermediate.growAggregate(0, (yyvsp[0].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)->getLoc()); } -#line 11167 "MachineIndependent/glslang_tab.cpp" +#line 11256 "MachineIndependent/glslang_tab.cpp" break; - case 561: /* initializer_list: initializer_list COMMA initializer */ -#line 3730 "MachineIndependent/glslang.y" + case 566: /* initializer_list: initializer_list COMMA initializer */ +#line 3756 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = parseContext.intermediate.growAggregate((yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); } -#line 11175 "MachineIndependent/glslang_tab.cpp" +#line 11264 "MachineIndependent/glslang_tab.cpp" break; - case 562: /* declaration_statement: declaration */ -#line 3736 "MachineIndependent/glslang.y" + case 567: /* declaration_statement: declaration */ +#line 3762 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 11181 "MachineIndependent/glslang_tab.cpp" +#line 11270 "MachineIndependent/glslang_tab.cpp" break; - case 563: /* statement: compound_statement */ -#line 3740 "MachineIndependent/glslang.y" + case 568: /* statement: compound_statement */ +#line 3766 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 11187 "MachineIndependent/glslang_tab.cpp" +#line 11276 "MachineIndependent/glslang_tab.cpp" break; - case 564: /* statement: simple_statement */ -#line 3741 "MachineIndependent/glslang.y" + case 569: /* statement: simple_statement */ +#line 3767 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 11193 "MachineIndependent/glslang_tab.cpp" +#line 11282 "MachineIndependent/glslang_tab.cpp" break; - case 565: /* simple_statement: declaration_statement */ -#line 3747 "MachineIndependent/glslang.y" + case 570: /* simple_statement: declaration_statement */ +#line 3773 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 11199 "MachineIndependent/glslang_tab.cpp" +#line 11288 "MachineIndependent/glslang_tab.cpp" break; - case 566: /* simple_statement: expression_statement */ -#line 3748 "MachineIndependent/glslang.y" + case 571: /* simple_statement: expression_statement */ +#line 3774 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 11205 "MachineIndependent/glslang_tab.cpp" +#line 11294 "MachineIndependent/glslang_tab.cpp" break; - case 567: /* simple_statement: selection_statement */ -#line 3749 "MachineIndependent/glslang.y" + case 572: /* simple_statement: selection_statement */ +#line 3775 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 11211 "MachineIndependent/glslang_tab.cpp" +#line 11300 "MachineIndependent/glslang_tab.cpp" break; - case 568: /* simple_statement: switch_statement */ -#line 3750 "MachineIndependent/glslang.y" + case 573: /* simple_statement: switch_statement */ +#line 3776 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 11217 "MachineIndependent/glslang_tab.cpp" +#line 11306 "MachineIndependent/glslang_tab.cpp" break; - case 569: /* simple_statement: case_label */ -#line 3751 "MachineIndependent/glslang.y" + case 574: /* simple_statement: case_label */ +#line 3777 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 11223 "MachineIndependent/glslang_tab.cpp" +#line 11312 "MachineIndependent/glslang_tab.cpp" break; - case 570: /* simple_statement: iteration_statement */ -#line 3752 "MachineIndependent/glslang.y" + case 575: /* simple_statement: iteration_statement */ +#line 3778 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 11229 "MachineIndependent/glslang_tab.cpp" +#line 11318 "MachineIndependent/glslang_tab.cpp" break; - case 571: /* simple_statement: jump_statement */ -#line 3753 "MachineIndependent/glslang.y" + case 576: /* simple_statement: jump_statement */ +#line 3779 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 11235 "MachineIndependent/glslang_tab.cpp" +#line 11324 "MachineIndependent/glslang_tab.cpp" break; - case 572: /* simple_statement: demote_statement */ -#line 3754 "MachineIndependent/glslang.y" + case 577: /* simple_statement: demote_statement */ +#line 3780 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 11241 "MachineIndependent/glslang_tab.cpp" +#line 11330 "MachineIndependent/glslang_tab.cpp" break; - case 573: /* demote_statement: DEMOTE SEMICOLON */ -#line 3758 "MachineIndependent/glslang.y" + case 578: /* demote_statement: DEMOTE SEMICOLON */ +#line 3784 "MachineIndependent/glslang.y" { 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 11251 "MachineIndependent/glslang_tab.cpp" +#line 11340 "MachineIndependent/glslang_tab.cpp" break; - case 574: /* compound_statement: LEFT_BRACE RIGHT_BRACE */ -#line 3766 "MachineIndependent/glslang.y" + case 579: /* compound_statement: LEFT_BRACE RIGHT_BRACE */ +#line 3792 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = 0; } -#line 11257 "MachineIndependent/glslang_tab.cpp" +#line 11346 "MachineIndependent/glslang_tab.cpp" break; - case 575: /* $@5: %empty */ -#line 3767 "MachineIndependent/glslang.y" + case 580: /* $@5: %empty */ +#line 3793 "MachineIndependent/glslang.y" { parseContext.symbolTable.push(); ++parseContext.statementNestingLevel; } -#line 11266 "MachineIndependent/glslang_tab.cpp" +#line 11355 "MachineIndependent/glslang_tab.cpp" break; - case 576: /* $@6: %empty */ -#line 3771 "MachineIndependent/glslang.y" + case 581: /* $@6: %empty */ +#line 3797 "MachineIndependent/glslang.y" { parseContext.symbolTable.pop(&parseContext.defaultPrecision[0]); --parseContext.statementNestingLevel; } -#line 11275 "MachineIndependent/glslang_tab.cpp" +#line 11364 "MachineIndependent/glslang_tab.cpp" break; - case 577: /* compound_statement: LEFT_BRACE $@5 statement_list $@6 RIGHT_BRACE */ -#line 3775 "MachineIndependent/glslang.y" + case 582: /* compound_statement: LEFT_BRACE $@5 statement_list $@6 RIGHT_BRACE */ +#line 3801 "MachineIndependent/glslang.y" { - if ((yyvsp[-2].interm.intermNode) && (yyvsp[-2].interm.intermNode)->getAsAggregate()) + if ((yyvsp[-2].interm.intermNode) && (yyvsp[-2].interm.intermNode)->getAsAggregate()) { (yyvsp[-2].interm.intermNode)->getAsAggregate()->setOperator(parseContext.intermediate.getDebugInfo() ? EOpScope : EOpSequence); + (yyvsp[-2].interm.intermNode)->getAsAggregate()->setEndLoc((yyvsp[0].lex).loc); + } (yyval.interm.intermNode) = (yyvsp[-2].interm.intermNode); } -#line 11285 "MachineIndependent/glslang_tab.cpp" +#line 11376 "MachineIndependent/glslang_tab.cpp" break; - case 578: /* statement_no_new_scope: compound_statement_no_new_scope */ -#line 3783 "MachineIndependent/glslang.y" + case 583: /* statement_no_new_scope: compound_statement_no_new_scope */ +#line 3811 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 11291 "MachineIndependent/glslang_tab.cpp" +#line 11382 "MachineIndependent/glslang_tab.cpp" break; - case 579: /* statement_no_new_scope: simple_statement */ -#line 3784 "MachineIndependent/glslang.y" + case 584: /* statement_no_new_scope: simple_statement */ +#line 3812 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 11297 "MachineIndependent/glslang_tab.cpp" +#line 11388 "MachineIndependent/glslang_tab.cpp" break; - case 580: /* $@7: %empty */ -#line 3788 "MachineIndependent/glslang.y" + case 585: /* $@7: %empty */ +#line 3816 "MachineIndependent/glslang.y" { ++parseContext.controlFlowNestingLevel; } -#line 11305 "MachineIndependent/glslang_tab.cpp" +#line 11396 "MachineIndependent/glslang_tab.cpp" break; - case 581: /* statement_scoped: $@7 compound_statement */ -#line 3791 "MachineIndependent/glslang.y" + case 586: /* statement_scoped: $@7 compound_statement */ +#line 3819 "MachineIndependent/glslang.y" { --parseContext.controlFlowNestingLevel; (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 11314 "MachineIndependent/glslang_tab.cpp" +#line 11405 "MachineIndependent/glslang_tab.cpp" break; - case 582: /* $@8: %empty */ -#line 3795 "MachineIndependent/glslang.y" + case 587: /* $@8: %empty */ +#line 3823 "MachineIndependent/glslang.y" { parseContext.symbolTable.push(); ++parseContext.statementNestingLevel; ++parseContext.controlFlowNestingLevel; } -#line 11324 "MachineIndependent/glslang_tab.cpp" +#line 11415 "MachineIndependent/glslang_tab.cpp" break; - case 583: /* statement_scoped: $@8 simple_statement */ -#line 3800 "MachineIndependent/glslang.y" + case 588: /* statement_scoped: $@8 simple_statement */ +#line 3828 "MachineIndependent/glslang.y" { parseContext.symbolTable.pop(&parseContext.defaultPrecision[0]); --parseContext.statementNestingLevel; --parseContext.controlFlowNestingLevel; (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 11335 "MachineIndependent/glslang_tab.cpp" +#line 11426 "MachineIndependent/glslang_tab.cpp" break; - case 584: /* compound_statement_no_new_scope: LEFT_BRACE RIGHT_BRACE */ -#line 3809 "MachineIndependent/glslang.y" + case 589: /* compound_statement_no_new_scope: LEFT_BRACE RIGHT_BRACE */ +#line 3837 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = 0; } -#line 11343 "MachineIndependent/glslang_tab.cpp" +#line 11434 "MachineIndependent/glslang_tab.cpp" break; - case 585: /* compound_statement_no_new_scope: LEFT_BRACE statement_list RIGHT_BRACE */ -#line 3812 "MachineIndependent/glslang.y" + case 590: /* compound_statement_no_new_scope: LEFT_BRACE statement_list RIGHT_BRACE */ +#line 3840 "MachineIndependent/glslang.y" { - if ((yyvsp[-1].interm.intermNode) && (yyvsp[-1].interm.intermNode)->getAsAggregate()) + if ((yyvsp[-1].interm.intermNode) && (yyvsp[-1].interm.intermNode)->getAsAggregate()) { (yyvsp[-1].interm.intermNode)->getAsAggregate()->setOperator(EOpSequence); + (yyvsp[-1].interm.intermNode)->getAsAggregate()->setEndLoc((yyvsp[0].lex).loc); + } (yyval.interm.intermNode) = (yyvsp[-1].interm.intermNode); } -#line 11353 "MachineIndependent/glslang_tab.cpp" +#line 11446 "MachineIndependent/glslang_tab.cpp" break; - case 586: /* statement_list: statement */ -#line 3820 "MachineIndependent/glslang.y" + case 591: /* statement_list: statement */ +#line 3850 "MachineIndependent/glslang.y" { (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 || @@ -11362,11 +11455,11 @@ yyreduce: (yyval.interm.intermNode) = 0; // start a fresh subsequence for what's after this case } } -#line 11366 "MachineIndependent/glslang_tab.cpp" +#line 11459 "MachineIndependent/glslang_tab.cpp" break; - case 587: /* statement_list: statement_list statement */ -#line 3828 "MachineIndependent/glslang.y" + case 592: /* statement_list: statement_list statement */ +#line 3858 "MachineIndependent/glslang.y" { if ((yyvsp[0].interm.intermNode) && (yyvsp[0].interm.intermNode)->getAsBranchNode() && ((yyvsp[0].interm.intermNode)->getAsBranchNode()->getFlowOp() == EOpCase || (yyvsp[0].interm.intermNode)->getAsBranchNode()->getFlowOp() == EOpDefault)) { @@ -11375,77 +11468,77 @@ yyreduce: } else (yyval.interm.intermNode) = parseContext.intermediate.growAggregate((yyvsp[-1].interm.intermNode), (yyvsp[0].interm.intermNode)); } -#line 11379 "MachineIndependent/glslang_tab.cpp" +#line 11472 "MachineIndependent/glslang_tab.cpp" break; - case 588: /* expression_statement: SEMICOLON */ -#line 3839 "MachineIndependent/glslang.y" + case 593: /* expression_statement: SEMICOLON */ +#line 3869 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = 0; } -#line 11385 "MachineIndependent/glslang_tab.cpp" +#line 11478 "MachineIndependent/glslang_tab.cpp" break; - case 589: /* expression_statement: expression SEMICOLON */ -#line 3840 "MachineIndependent/glslang.y" + case 594: /* expression_statement: expression SEMICOLON */ +#line 3870 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = static_cast((yyvsp[-1].interm.intermTypedNode)); } -#line 11391 "MachineIndependent/glslang_tab.cpp" +#line 11484 "MachineIndependent/glslang_tab.cpp" break; - case 590: /* selection_statement: selection_statement_nonattributed */ -#line 3844 "MachineIndependent/glslang.y" + case 595: /* selection_statement: selection_statement_nonattributed */ +#line 3874 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 11399 "MachineIndependent/glslang_tab.cpp" +#line 11492 "MachineIndependent/glslang_tab.cpp" break; - case 591: /* selection_statement: attribute selection_statement_nonattributed */ -#line 3847 "MachineIndependent/glslang.y" + case 596: /* selection_statement: attribute selection_statement_nonattributed */ +#line 3877 "MachineIndependent/glslang.y" { parseContext.requireExtensions((yyvsp[0].interm.intermNode)->getLoc(), 1, &E_GL_EXT_control_flow_attributes, "attribute"); parseContext.handleSelectionAttributes(*(yyvsp[-1].interm.attributes), (yyvsp[0].interm.intermNode)); (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 11409 "MachineIndependent/glslang_tab.cpp" +#line 11502 "MachineIndependent/glslang_tab.cpp" break; - case 592: /* selection_statement_nonattributed: IF LEFT_PAREN expression RIGHT_PAREN selection_rest_statement */ -#line 3854 "MachineIndependent/glslang.y" + case 597: /* selection_statement_nonattributed: IF LEFT_PAREN expression RIGHT_PAREN selection_rest_statement */ +#line 3884 "MachineIndependent/glslang.y" { 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 11418 "MachineIndependent/glslang_tab.cpp" +#line 11511 "MachineIndependent/glslang_tab.cpp" break; - case 593: /* selection_rest_statement: statement_scoped ELSE statement_scoped */ -#line 3861 "MachineIndependent/glslang.y" + case 598: /* selection_rest_statement: statement_scoped ELSE statement_scoped */ +#line 3891 "MachineIndependent/glslang.y" { (yyval.interm.nodePair).node1 = (yyvsp[-2].interm.intermNode); (yyval.interm.nodePair).node2 = (yyvsp[0].interm.intermNode); } -#line 11427 "MachineIndependent/glslang_tab.cpp" +#line 11520 "MachineIndependent/glslang_tab.cpp" break; - case 594: /* selection_rest_statement: statement_scoped */ -#line 3865 "MachineIndependent/glslang.y" + case 599: /* selection_rest_statement: statement_scoped */ +#line 3895 "MachineIndependent/glslang.y" { (yyval.interm.nodePair).node1 = (yyvsp[0].interm.intermNode); (yyval.interm.nodePair).node2 = 0; } -#line 11436 "MachineIndependent/glslang_tab.cpp" +#line 11529 "MachineIndependent/glslang_tab.cpp" break; - case 595: /* condition: expression */ -#line 3873 "MachineIndependent/glslang.y" + case 600: /* condition: expression */ +#line 3903 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); parseContext.boolCheck((yyvsp[0].interm.intermTypedNode)->getLoc(), (yyvsp[0].interm.intermTypedNode)); } -#line 11445 "MachineIndependent/glslang_tab.cpp" +#line 11538 "MachineIndependent/glslang_tab.cpp" break; - case 596: /* condition: fully_specified_type IDENTIFIER EQUAL initializer */ -#line 3877 "MachineIndependent/glslang.y" + case 601: /* condition: fully_specified_type IDENTIFIER EQUAL initializer */ +#line 3907 "MachineIndependent/glslang.y" { parseContext.boolCheck((yyvsp[-2].lex).loc, (yyvsp[-3].interm.type)); @@ -11456,29 +11549,29 @@ yyreduce: else (yyval.interm.intermTypedNode) = 0; } -#line 11460 "MachineIndependent/glslang_tab.cpp" +#line 11553 "MachineIndependent/glslang_tab.cpp" break; - case 597: /* switch_statement: switch_statement_nonattributed */ -#line 3890 "MachineIndependent/glslang.y" + case 602: /* switch_statement: switch_statement_nonattributed */ +#line 3920 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 11468 "MachineIndependent/glslang_tab.cpp" +#line 11561 "MachineIndependent/glslang_tab.cpp" break; - case 598: /* switch_statement: attribute switch_statement_nonattributed */ -#line 3893 "MachineIndependent/glslang.y" + case 603: /* switch_statement: attribute switch_statement_nonattributed */ +#line 3923 "MachineIndependent/glslang.y" { parseContext.requireExtensions((yyvsp[0].interm.intermNode)->getLoc(), 1, &E_GL_EXT_control_flow_attributes, "attribute"); parseContext.handleSwitchAttributes(*(yyvsp[-1].interm.attributes), (yyvsp[0].interm.intermNode)); (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 11478 "MachineIndependent/glslang_tab.cpp" +#line 11571 "MachineIndependent/glslang_tab.cpp" break; - case 599: /* $@9: %empty */ -#line 3900 "MachineIndependent/glslang.y" + case 604: /* $@9: %empty */ +#line 3930 "MachineIndependent/glslang.y" { // start new switch sequence on the switch stack ++parseContext.controlFlowNestingLevel; @@ -11487,11 +11580,11 @@ yyreduce: parseContext.switchLevel.push_back(parseContext.statementNestingLevel); parseContext.symbolTable.push(); } -#line 11491 "MachineIndependent/glslang_tab.cpp" +#line 11584 "MachineIndependent/glslang_tab.cpp" break; - case 600: /* switch_statement_nonattributed: SWITCH LEFT_PAREN expression RIGHT_PAREN $@9 LEFT_BRACE switch_statement_list RIGHT_BRACE */ -#line 3908 "MachineIndependent/glslang.y" + case 605: /* switch_statement_nonattributed: SWITCH LEFT_PAREN expression RIGHT_PAREN $@9 LEFT_BRACE switch_statement_list RIGHT_BRACE */ +#line 3938 "MachineIndependent/glslang.y" { (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(); @@ -11501,27 +11594,27 @@ yyreduce: --parseContext.statementNestingLevel; --parseContext.controlFlowNestingLevel; } -#line 11505 "MachineIndependent/glslang_tab.cpp" +#line 11598 "MachineIndependent/glslang_tab.cpp" break; - case 601: /* switch_statement_list: %empty */ -#line 3920 "MachineIndependent/glslang.y" + case 606: /* switch_statement_list: %empty */ +#line 3950 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = 0; } -#line 11513 "MachineIndependent/glslang_tab.cpp" +#line 11606 "MachineIndependent/glslang_tab.cpp" break; - case 602: /* switch_statement_list: statement_list */ -#line 3923 "MachineIndependent/glslang.y" + case 607: /* switch_statement_list: statement_list */ +#line 3953 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 11521 "MachineIndependent/glslang_tab.cpp" +#line 11614 "MachineIndependent/glslang_tab.cpp" break; - case 603: /* case_label: CASE expression COLON */ -#line 3929 "MachineIndependent/glslang.y" + case 608: /* case_label: CASE expression COLON */ +#line 3959 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = 0; if (parseContext.switchLevel.size() == 0) @@ -11534,11 +11627,11 @@ yyreduce: (yyval.interm.intermNode) = parseContext.intermediate.addBranch(EOpCase, (yyvsp[-1].interm.intermTypedNode), (yyvsp[-2].lex).loc); } } -#line 11538 "MachineIndependent/glslang_tab.cpp" +#line 11631 "MachineIndependent/glslang_tab.cpp" break; - case 604: /* case_label: DEFAULT COLON */ -#line 3941 "MachineIndependent/glslang.y" + case 609: /* case_label: DEFAULT COLON */ +#line 3971 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = 0; if (parseContext.switchLevel.size() == 0) @@ -11548,30 +11641,30 @@ yyreduce: else (yyval.interm.intermNode) = parseContext.intermediate.addBranch(EOpDefault, (yyvsp[-1].lex).loc); } -#line 11552 "MachineIndependent/glslang_tab.cpp" +#line 11645 "MachineIndependent/glslang_tab.cpp" break; - case 605: /* iteration_statement: iteration_statement_nonattributed */ -#line 3953 "MachineIndependent/glslang.y" + case 610: /* iteration_statement: iteration_statement_nonattributed */ +#line 3983 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 11560 "MachineIndependent/glslang_tab.cpp" +#line 11653 "MachineIndependent/glslang_tab.cpp" break; - case 606: /* iteration_statement: attribute iteration_statement_nonattributed */ -#line 3956 "MachineIndependent/glslang.y" + case 611: /* iteration_statement: attribute iteration_statement_nonattributed */ +#line 3986 "MachineIndependent/glslang.y" { const char * extensions[2] = { E_GL_EXT_control_flow_attributes, E_GL_EXT_control_flow_attributes2 }; parseContext.requireExtensions((yyvsp[0].interm.intermNode)->getLoc(), 2, extensions, "attribute"); parseContext.handleLoopAttributes(*(yyvsp[-1].interm.attributes), (yyvsp[0].interm.intermNode)); (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 11571 "MachineIndependent/glslang_tab.cpp" +#line 11664 "MachineIndependent/glslang_tab.cpp" break; - case 607: /* $@10: %empty */ -#line 3964 "MachineIndependent/glslang.y" + case 612: /* $@10: %empty */ +#line 3994 "MachineIndependent/glslang.y" { if (! parseContext.limits.whileLoops) parseContext.error((yyvsp[-1].lex).loc, "while loops not available", "limitation", ""); @@ -11580,11 +11673,11 @@ yyreduce: ++parseContext.statementNestingLevel; ++parseContext.controlFlowNestingLevel; } -#line 11584 "MachineIndependent/glslang_tab.cpp" +#line 11677 "MachineIndependent/glslang_tab.cpp" break; - case 608: /* iteration_statement_nonattributed: WHILE LEFT_PAREN $@10 condition RIGHT_PAREN statement_no_new_scope */ -#line 3972 "MachineIndependent/glslang.y" + case 613: /* iteration_statement_nonattributed: WHILE LEFT_PAREN $@10 condition RIGHT_PAREN statement_no_new_scope */ +#line 4002 "MachineIndependent/glslang.y" { 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); @@ -11592,22 +11685,22 @@ yyreduce: --parseContext.statementNestingLevel; --parseContext.controlFlowNestingLevel; } -#line 11596 "MachineIndependent/glslang_tab.cpp" +#line 11689 "MachineIndependent/glslang_tab.cpp" break; - case 609: /* $@11: %empty */ -#line 3979 "MachineIndependent/glslang.y" + case 614: /* $@11: %empty */ +#line 4009 "MachineIndependent/glslang.y" { parseContext.symbolTable.push(); ++parseContext.loopNestingLevel; ++parseContext.statementNestingLevel; ++parseContext.controlFlowNestingLevel; } -#line 11607 "MachineIndependent/glslang_tab.cpp" +#line 11700 "MachineIndependent/glslang_tab.cpp" break; - case 610: /* iteration_statement_nonattributed: DO $@11 statement WHILE LEFT_PAREN expression RIGHT_PAREN SEMICOLON */ -#line 3985 "MachineIndependent/glslang.y" + case 615: /* iteration_statement_nonattributed: DO $@11 statement WHILE LEFT_PAREN expression RIGHT_PAREN SEMICOLON */ +#line 4015 "MachineIndependent/glslang.y" { if (! parseContext.limits.whileLoops) parseContext.error((yyvsp[-7].lex).loc, "do-while loops not available", "limitation", ""); @@ -11620,22 +11713,22 @@ yyreduce: --parseContext.statementNestingLevel; --parseContext.controlFlowNestingLevel; } -#line 11624 "MachineIndependent/glslang_tab.cpp" +#line 11717 "MachineIndependent/glslang_tab.cpp" break; - case 611: /* $@12: %empty */ -#line 3997 "MachineIndependent/glslang.y" + case 616: /* $@12: %empty */ +#line 4027 "MachineIndependent/glslang.y" { parseContext.symbolTable.push(); ++parseContext.loopNestingLevel; ++parseContext.statementNestingLevel; ++parseContext.controlFlowNestingLevel; } -#line 11635 "MachineIndependent/glslang_tab.cpp" +#line 11728 "MachineIndependent/glslang_tab.cpp" break; - case 612: /* iteration_statement_nonattributed: FOR LEFT_PAREN $@12 for_init_statement for_rest_statement RIGHT_PAREN statement_no_new_scope */ -#line 4003 "MachineIndependent/glslang.y" + case 617: /* iteration_statement_nonattributed: FOR LEFT_PAREN $@12 for_init_statement for_rest_statement RIGHT_PAREN statement_no_new_scope */ +#line 4033 "MachineIndependent/glslang.y" { parseContext.symbolTable.pop(&parseContext.defaultPrecision[0]); (yyval.interm.intermNode) = parseContext.intermediate.makeAggregate((yyvsp[-3].interm.intermNode), (yyvsp[-5].lex).loc); @@ -11648,81 +11741,81 @@ yyreduce: --parseContext.statementNestingLevel; --parseContext.controlFlowNestingLevel; } -#line 11652 "MachineIndependent/glslang_tab.cpp" +#line 11745 "MachineIndependent/glslang_tab.cpp" break; - case 613: /* for_init_statement: expression_statement */ -#line 4018 "MachineIndependent/glslang.y" + case 618: /* for_init_statement: expression_statement */ +#line 4048 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 11660 "MachineIndependent/glslang_tab.cpp" +#line 11753 "MachineIndependent/glslang_tab.cpp" break; - case 614: /* for_init_statement: declaration_statement */ -#line 4021 "MachineIndependent/glslang.y" + case 619: /* for_init_statement: declaration_statement */ +#line 4051 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 11668 "MachineIndependent/glslang_tab.cpp" +#line 11761 "MachineIndependent/glslang_tab.cpp" break; - case 615: /* conditionopt: condition */ -#line 4027 "MachineIndependent/glslang.y" + case 620: /* conditionopt: condition */ +#line 4057 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 11676 "MachineIndependent/glslang_tab.cpp" +#line 11769 "MachineIndependent/glslang_tab.cpp" break; - case 616: /* conditionopt: %empty */ -#line 4030 "MachineIndependent/glslang.y" + case 621: /* conditionopt: %empty */ +#line 4060 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = 0; } -#line 11684 "MachineIndependent/glslang_tab.cpp" +#line 11777 "MachineIndependent/glslang_tab.cpp" break; - case 617: /* for_rest_statement: conditionopt SEMICOLON */ -#line 4036 "MachineIndependent/glslang.y" + case 622: /* for_rest_statement: conditionopt SEMICOLON */ +#line 4066 "MachineIndependent/glslang.y" { (yyval.interm.nodePair).node1 = (yyvsp[-1].interm.intermTypedNode); (yyval.interm.nodePair).node2 = 0; } -#line 11693 "MachineIndependent/glslang_tab.cpp" +#line 11786 "MachineIndependent/glslang_tab.cpp" break; - case 618: /* for_rest_statement: conditionopt SEMICOLON expression */ -#line 4040 "MachineIndependent/glslang.y" + case 623: /* for_rest_statement: conditionopt SEMICOLON expression */ +#line 4070 "MachineIndependent/glslang.y" { (yyval.interm.nodePair).node1 = (yyvsp[-2].interm.intermTypedNode); (yyval.interm.nodePair).node2 = (yyvsp[0].interm.intermTypedNode); } -#line 11702 "MachineIndependent/glslang_tab.cpp" +#line 11795 "MachineIndependent/glslang_tab.cpp" break; - case 619: /* jump_statement: CONTINUE SEMICOLON */ -#line 4047 "MachineIndependent/glslang.y" + case 624: /* jump_statement: CONTINUE SEMICOLON */ +#line 4077 "MachineIndependent/glslang.y" { 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 11712 "MachineIndependent/glslang_tab.cpp" +#line 11805 "MachineIndependent/glslang_tab.cpp" break; - case 620: /* jump_statement: BREAK SEMICOLON */ -#line 4052 "MachineIndependent/glslang.y" + case 625: /* jump_statement: BREAK SEMICOLON */ +#line 4082 "MachineIndependent/glslang.y" { 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 11722 "MachineIndependent/glslang_tab.cpp" +#line 11815 "MachineIndependent/glslang_tab.cpp" break; - case 621: /* jump_statement: RETURN SEMICOLON */ -#line 4057 "MachineIndependent/glslang.y" + case 626: /* jump_statement: RETURN SEMICOLON */ +#line 4087 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = parseContext.intermediate.addBranch(EOpReturn, (yyvsp[-1].lex).loc); if (parseContext.currentFunctionType->getBasicType() != EbtVoid) @@ -11730,101 +11823,101 @@ yyreduce: if (parseContext.inMain) parseContext.postEntryPointReturn = true; } -#line 11734 "MachineIndependent/glslang_tab.cpp" +#line 11827 "MachineIndependent/glslang_tab.cpp" break; - case 622: /* jump_statement: RETURN expression SEMICOLON */ -#line 4064 "MachineIndependent/glslang.y" + case 627: /* jump_statement: RETURN expression SEMICOLON */ +#line 4094 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = parseContext.handleReturnValue((yyvsp[-2].lex).loc, (yyvsp[-1].interm.intermTypedNode)); } -#line 11742 "MachineIndependent/glslang_tab.cpp" +#line 11835 "MachineIndependent/glslang_tab.cpp" break; - case 623: /* jump_statement: DISCARD SEMICOLON */ -#line 4067 "MachineIndependent/glslang.y" + case 628: /* jump_statement: DISCARD SEMICOLON */ +#line 4097 "MachineIndependent/glslang.y" { parseContext.requireStage((yyvsp[-1].lex).loc, EShLangFragment, "discard"); (yyval.interm.intermNode) = parseContext.intermediate.addBranch(EOpKill, (yyvsp[-1].lex).loc); } -#line 11751 "MachineIndependent/glslang_tab.cpp" +#line 11844 "MachineIndependent/glslang_tab.cpp" break; - case 624: /* jump_statement: TERMINATE_INVOCATION SEMICOLON */ -#line 4071 "MachineIndependent/glslang.y" + case 629: /* jump_statement: TERMINATE_INVOCATION SEMICOLON */ +#line 4101 "MachineIndependent/glslang.y" { parseContext.requireStage((yyvsp[-1].lex).loc, EShLangFragment, "terminateInvocation"); (yyval.interm.intermNode) = parseContext.intermediate.addBranch(EOpTerminateInvocation, (yyvsp[-1].lex).loc); } -#line 11760 "MachineIndependent/glslang_tab.cpp" +#line 11853 "MachineIndependent/glslang_tab.cpp" break; - case 625: /* jump_statement: TERMINATE_RAY SEMICOLON */ -#line 4075 "MachineIndependent/glslang.y" + case 630: /* jump_statement: TERMINATE_RAY SEMICOLON */ +#line 4105 "MachineIndependent/glslang.y" { parseContext.requireStage((yyvsp[-1].lex).loc, EShLangAnyHit, "terminateRayEXT"); (yyval.interm.intermNode) = parseContext.intermediate.addBranch(EOpTerminateRayKHR, (yyvsp[-1].lex).loc); } -#line 11769 "MachineIndependent/glslang_tab.cpp" +#line 11862 "MachineIndependent/glslang_tab.cpp" break; - case 626: /* jump_statement: IGNORE_INTERSECTION SEMICOLON */ -#line 4079 "MachineIndependent/glslang.y" + case 631: /* jump_statement: IGNORE_INTERSECTION SEMICOLON */ +#line 4109 "MachineIndependent/glslang.y" { parseContext.requireStage((yyvsp[-1].lex).loc, EShLangAnyHit, "ignoreIntersectionEXT"); (yyval.interm.intermNode) = parseContext.intermediate.addBranch(EOpIgnoreIntersectionKHR, (yyvsp[-1].lex).loc); } -#line 11778 "MachineIndependent/glslang_tab.cpp" +#line 11871 "MachineIndependent/glslang_tab.cpp" break; - case 627: /* translation_unit: external_declaration */ -#line 4088 "MachineIndependent/glslang.y" + case 632: /* translation_unit: external_declaration */ +#line 4118 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); parseContext.intermediate.setTreeRoot((yyval.interm.intermNode)); } -#line 11787 "MachineIndependent/glslang_tab.cpp" +#line 11880 "MachineIndependent/glslang_tab.cpp" break; - case 628: /* translation_unit: translation_unit external_declaration */ -#line 4092 "MachineIndependent/glslang.y" + case 633: /* translation_unit: translation_unit external_declaration */ +#line 4122 "MachineIndependent/glslang.y" { 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 11798 "MachineIndependent/glslang_tab.cpp" +#line 11891 "MachineIndependent/glslang_tab.cpp" break; - case 629: /* external_declaration: function_definition */ -#line 4101 "MachineIndependent/glslang.y" + case 634: /* external_declaration: function_definition */ +#line 4131 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 11806 "MachineIndependent/glslang_tab.cpp" +#line 11899 "MachineIndependent/glslang_tab.cpp" break; - case 630: /* external_declaration: declaration */ -#line 4104 "MachineIndependent/glslang.y" + case 635: /* external_declaration: declaration */ +#line 4134 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 11814 "MachineIndependent/glslang_tab.cpp" +#line 11907 "MachineIndependent/glslang_tab.cpp" break; - case 631: /* external_declaration: SEMICOLON */ -#line 4107 "MachineIndependent/glslang.y" + case 636: /* external_declaration: SEMICOLON */ +#line 4137 "MachineIndependent/glslang.y" { 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 11824 "MachineIndependent/glslang_tab.cpp" +#line 11917 "MachineIndependent/glslang_tab.cpp" break; - case 632: /* $@13: %empty */ -#line 4115 "MachineIndependent/glslang.y" + case 637: /* $@13: %empty */ +#line 4145 "MachineIndependent/glslang.y" { (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); @@ -11837,11 +11930,11 @@ yyreduce: ++parseContext.statementNestingLevel; } } -#line 11841 "MachineIndependent/glslang_tab.cpp" +#line 11934 "MachineIndependent/glslang_tab.cpp" break; - case 633: /* function_definition: function_prototype $@13 compound_statement_no_new_scope */ -#line 4127 "MachineIndependent/glslang.y" + case 638: /* function_definition: function_prototype $@13 compound_statement_no_new_scope */ +#line 4157 "MachineIndependent/glslang.y" { // May be best done as post process phase on intermediate code if (parseContext.currentFunctionType->getBasicType() != EbtVoid && ! parseContext.functionReturnsValue) @@ -11869,228 +11962,228 @@ yyreduce: --parseContext.statementNestingLevel; } } -#line 11873 "MachineIndependent/glslang_tab.cpp" +#line 11966 "MachineIndependent/glslang_tab.cpp" break; - case 634: /* attribute: LEFT_BRACKET LEFT_BRACKET attribute_list RIGHT_BRACKET RIGHT_BRACKET */ -#line 4157 "MachineIndependent/glslang.y" + case 639: /* attribute: LEFT_BRACKET LEFT_BRACKET attribute_list RIGHT_BRACKET RIGHT_BRACKET */ +#line 4187 "MachineIndependent/glslang.y" { (yyval.interm.attributes) = (yyvsp[-2].interm.attributes); } -#line 11881 "MachineIndependent/glslang_tab.cpp" +#line 11974 "MachineIndependent/glslang_tab.cpp" break; - case 635: /* attribute_list: single_attribute */ -#line 4162 "MachineIndependent/glslang.y" + case 640: /* attribute_list: single_attribute */ +#line 4192 "MachineIndependent/glslang.y" { (yyval.interm.attributes) = (yyvsp[0].interm.attributes); } -#line 11889 "MachineIndependent/glslang_tab.cpp" +#line 11982 "MachineIndependent/glslang_tab.cpp" break; - case 636: /* attribute_list: attribute_list COMMA single_attribute */ -#line 4165 "MachineIndependent/glslang.y" + case 641: /* attribute_list: attribute_list COMMA single_attribute */ +#line 4195 "MachineIndependent/glslang.y" { (yyval.interm.attributes) = parseContext.mergeAttributes((yyvsp[-2].interm.attributes), (yyvsp[0].interm.attributes)); } -#line 11897 "MachineIndependent/glslang_tab.cpp" +#line 11990 "MachineIndependent/glslang_tab.cpp" break; - case 637: /* single_attribute: IDENTIFIER */ -#line 4170 "MachineIndependent/glslang.y" + case 642: /* single_attribute: IDENTIFIER */ +#line 4200 "MachineIndependent/glslang.y" { (yyval.interm.attributes) = parseContext.makeAttributes(*(yyvsp[0].lex).string); } -#line 11905 "MachineIndependent/glslang_tab.cpp" +#line 11998 "MachineIndependent/glslang_tab.cpp" break; - case 638: /* single_attribute: IDENTIFIER LEFT_PAREN constant_expression RIGHT_PAREN */ -#line 4173 "MachineIndependent/glslang.y" + case 643: /* single_attribute: IDENTIFIER LEFT_PAREN constant_expression RIGHT_PAREN */ +#line 4203 "MachineIndependent/glslang.y" { (yyval.interm.attributes) = parseContext.makeAttributes(*(yyvsp[-3].lex).string, (yyvsp[-1].interm.intermTypedNode)); } -#line 11913 "MachineIndependent/glslang_tab.cpp" +#line 12006 "MachineIndependent/glslang_tab.cpp" break; - case 639: /* spirv_requirements_list: spirv_requirements_parameter */ -#line 4178 "MachineIndependent/glslang.y" + case 644: /* spirv_requirements_list: spirv_requirements_parameter */ +#line 4208 "MachineIndependent/glslang.y" { (yyval.interm.spirvReq) = (yyvsp[0].interm.spirvReq); } -#line 11921 "MachineIndependent/glslang_tab.cpp" +#line 12014 "MachineIndependent/glslang_tab.cpp" break; - case 640: /* spirv_requirements_list: spirv_requirements_list COMMA spirv_requirements_parameter */ -#line 4181 "MachineIndependent/glslang.y" + case 645: /* spirv_requirements_list: spirv_requirements_list COMMA spirv_requirements_parameter */ +#line 4211 "MachineIndependent/glslang.y" { (yyval.interm.spirvReq) = parseContext.mergeSpirvRequirements((yyvsp[-1].lex).loc, (yyvsp[-2].interm.spirvReq), (yyvsp[0].interm.spirvReq)); } -#line 11929 "MachineIndependent/glslang_tab.cpp" +#line 12022 "MachineIndependent/glslang_tab.cpp" break; - case 641: /* spirv_requirements_parameter: IDENTIFIER EQUAL LEFT_BRACKET spirv_extension_list RIGHT_BRACKET */ -#line 4186 "MachineIndependent/glslang.y" + case 646: /* spirv_requirements_parameter: IDENTIFIER EQUAL LEFT_BRACKET spirv_extension_list RIGHT_BRACKET */ +#line 4216 "MachineIndependent/glslang.y" { (yyval.interm.spirvReq) = parseContext.makeSpirvRequirement((yyvsp[-3].lex).loc, *(yyvsp[-4].lex).string, (yyvsp[-1].interm.intermNode)->getAsAggregate(), nullptr); } -#line 11937 "MachineIndependent/glslang_tab.cpp" +#line 12030 "MachineIndependent/glslang_tab.cpp" break; - case 642: /* spirv_requirements_parameter: IDENTIFIER EQUAL LEFT_BRACKET spirv_capability_list RIGHT_BRACKET */ -#line 4189 "MachineIndependent/glslang.y" + case 647: /* spirv_requirements_parameter: IDENTIFIER EQUAL LEFT_BRACKET spirv_capability_list RIGHT_BRACKET */ +#line 4219 "MachineIndependent/glslang.y" { (yyval.interm.spirvReq) = parseContext.makeSpirvRequirement((yyvsp[-3].lex).loc, *(yyvsp[-4].lex).string, nullptr, (yyvsp[-1].interm.intermNode)->getAsAggregate()); } -#line 11945 "MachineIndependent/glslang_tab.cpp" +#line 12038 "MachineIndependent/glslang_tab.cpp" break; - case 643: /* spirv_extension_list: STRING_LITERAL */ -#line 4194 "MachineIndependent/glslang.y" + case 648: /* spirv_extension_list: STRING_LITERAL */ +#line 4224 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = parseContext.intermediate.makeAggregate(parseContext.intermediate.addConstantUnion((yyvsp[0].lex).string, (yyvsp[0].lex).loc, true)); } -#line 11953 "MachineIndependent/glslang_tab.cpp" +#line 12046 "MachineIndependent/glslang_tab.cpp" break; - case 644: /* spirv_extension_list: spirv_extension_list COMMA STRING_LITERAL */ -#line 4197 "MachineIndependent/glslang.y" + case 649: /* spirv_extension_list: spirv_extension_list COMMA STRING_LITERAL */ +#line 4227 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = parseContext.intermediate.growAggregate((yyvsp[-2].interm.intermNode), parseContext.intermediate.addConstantUnion((yyvsp[0].lex).string, (yyvsp[0].lex).loc, true)); } -#line 11961 "MachineIndependent/glslang_tab.cpp" +#line 12054 "MachineIndependent/glslang_tab.cpp" break; - case 645: /* spirv_capability_list: INTCONSTANT */ -#line 4202 "MachineIndependent/glslang.y" + case 650: /* spirv_capability_list: INTCONSTANT */ +#line 4232 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = parseContext.intermediate.makeAggregate(parseContext.intermediate.addConstantUnion((yyvsp[0].lex).i, (yyvsp[0].lex).loc, true)); } -#line 11969 "MachineIndependent/glslang_tab.cpp" +#line 12062 "MachineIndependent/glslang_tab.cpp" break; - case 646: /* spirv_capability_list: spirv_capability_list COMMA INTCONSTANT */ -#line 4205 "MachineIndependent/glslang.y" + case 651: /* spirv_capability_list: spirv_capability_list COMMA INTCONSTANT */ +#line 4235 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = parseContext.intermediate.growAggregate((yyvsp[-2].interm.intermNode), parseContext.intermediate.addConstantUnion((yyvsp[0].lex).i, (yyvsp[0].lex).loc, true)); } -#line 11977 "MachineIndependent/glslang_tab.cpp" +#line 12070 "MachineIndependent/glslang_tab.cpp" break; - case 647: /* spirv_execution_mode_qualifier: SPIRV_EXECUTION_MODE LEFT_PAREN INTCONSTANT RIGHT_PAREN */ -#line 4210 "MachineIndependent/glslang.y" + case 652: /* spirv_execution_mode_qualifier: SPIRV_EXECUTION_MODE LEFT_PAREN INTCONSTANT RIGHT_PAREN */ +#line 4240 "MachineIndependent/glslang.y" { parseContext.intermediate.insertSpirvExecutionMode((yyvsp[-1].lex).i); (yyval.interm.intermNode) = 0; } -#line 11986 "MachineIndependent/glslang_tab.cpp" +#line 12079 "MachineIndependent/glslang_tab.cpp" break; - case 648: /* spirv_execution_mode_qualifier: SPIRV_EXECUTION_MODE LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT RIGHT_PAREN */ -#line 4214 "MachineIndependent/glslang.y" + case 653: /* spirv_execution_mode_qualifier: SPIRV_EXECUTION_MODE LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT RIGHT_PAREN */ +#line 4244 "MachineIndependent/glslang.y" { parseContext.intermediate.insertSpirvRequirement((yyvsp[-3].interm.spirvReq)); parseContext.intermediate.insertSpirvExecutionMode((yyvsp[-1].lex).i); (yyval.interm.intermNode) = 0; } -#line 11996 "MachineIndependent/glslang_tab.cpp" +#line 12089 "MachineIndependent/glslang_tab.cpp" break; - case 649: /* spirv_execution_mode_qualifier: SPIRV_EXECUTION_MODE LEFT_PAREN INTCONSTANT COMMA spirv_execution_mode_parameter_list RIGHT_PAREN */ -#line 4219 "MachineIndependent/glslang.y" + case 654: /* spirv_execution_mode_qualifier: SPIRV_EXECUTION_MODE LEFT_PAREN INTCONSTANT COMMA spirv_execution_mode_parameter_list RIGHT_PAREN */ +#line 4249 "MachineIndependent/glslang.y" { parseContext.intermediate.insertSpirvExecutionMode((yyvsp[-3].lex).i, (yyvsp[-1].interm.intermNode)->getAsAggregate()); (yyval.interm.intermNode) = 0; } -#line 12005 "MachineIndependent/glslang_tab.cpp" +#line 12098 "MachineIndependent/glslang_tab.cpp" break; - case 650: /* spirv_execution_mode_qualifier: SPIRV_EXECUTION_MODE LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT COMMA spirv_execution_mode_parameter_list RIGHT_PAREN */ -#line 4223 "MachineIndependent/glslang.y" + case 655: /* spirv_execution_mode_qualifier: SPIRV_EXECUTION_MODE LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT COMMA spirv_execution_mode_parameter_list RIGHT_PAREN */ +#line 4253 "MachineIndependent/glslang.y" { parseContext.intermediate.insertSpirvRequirement((yyvsp[-5].interm.spirvReq)); parseContext.intermediate.insertSpirvExecutionMode((yyvsp[-3].lex).i, (yyvsp[-1].interm.intermNode)->getAsAggregate()); (yyval.interm.intermNode) = 0; } -#line 12015 "MachineIndependent/glslang_tab.cpp" +#line 12108 "MachineIndependent/glslang_tab.cpp" break; - case 651: /* spirv_execution_mode_qualifier: SPIRV_EXECUTION_MODE_ID LEFT_PAREN INTCONSTANT COMMA spirv_execution_mode_id_parameter_list RIGHT_PAREN */ -#line 4228 "MachineIndependent/glslang.y" + case 656: /* spirv_execution_mode_qualifier: SPIRV_EXECUTION_MODE_ID LEFT_PAREN INTCONSTANT COMMA spirv_execution_mode_id_parameter_list RIGHT_PAREN */ +#line 4258 "MachineIndependent/glslang.y" { parseContext.intermediate.insertSpirvExecutionModeId((yyvsp[-3].lex).i, (yyvsp[-1].interm.intermNode)->getAsAggregate()); (yyval.interm.intermNode) = 0; } -#line 12024 "MachineIndependent/glslang_tab.cpp" +#line 12117 "MachineIndependent/glslang_tab.cpp" break; - case 652: /* spirv_execution_mode_qualifier: SPIRV_EXECUTION_MODE_ID LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT COMMA spirv_execution_mode_id_parameter_list RIGHT_PAREN */ -#line 4232 "MachineIndependent/glslang.y" + case 657: /* spirv_execution_mode_qualifier: SPIRV_EXECUTION_MODE_ID LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT COMMA spirv_execution_mode_id_parameter_list RIGHT_PAREN */ +#line 4262 "MachineIndependent/glslang.y" { parseContext.intermediate.insertSpirvRequirement((yyvsp[-5].interm.spirvReq)); parseContext.intermediate.insertSpirvExecutionModeId((yyvsp[-3].lex).i, (yyvsp[-1].interm.intermNode)->getAsAggregate()); (yyval.interm.intermNode) = 0; } -#line 12034 "MachineIndependent/glslang_tab.cpp" +#line 12127 "MachineIndependent/glslang_tab.cpp" break; - case 653: /* spirv_execution_mode_parameter_list: spirv_execution_mode_parameter */ -#line 4239 "MachineIndependent/glslang.y" + case 658: /* spirv_execution_mode_parameter_list: spirv_execution_mode_parameter */ +#line 4269 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = parseContext.intermediate.makeAggregate((yyvsp[0].interm.intermNode)); } -#line 12042 "MachineIndependent/glslang_tab.cpp" +#line 12135 "MachineIndependent/glslang_tab.cpp" break; - case 654: /* spirv_execution_mode_parameter_list: spirv_execution_mode_parameter_list COMMA spirv_execution_mode_parameter */ -#line 4242 "MachineIndependent/glslang.y" + case 659: /* spirv_execution_mode_parameter_list: spirv_execution_mode_parameter_list COMMA spirv_execution_mode_parameter */ +#line 4272 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = parseContext.intermediate.growAggregate((yyvsp[-2].interm.intermNode), (yyvsp[0].interm.intermNode)); } -#line 12050 "MachineIndependent/glslang_tab.cpp" +#line 12143 "MachineIndependent/glslang_tab.cpp" break; - case 655: /* spirv_execution_mode_parameter: FLOATCONSTANT */ -#line 4247 "MachineIndependent/glslang.y" + case 660: /* spirv_execution_mode_parameter: FLOATCONSTANT */ +#line 4277 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).d, EbtFloat, (yyvsp[0].lex).loc, true); } -#line 12058 "MachineIndependent/glslang_tab.cpp" +#line 12151 "MachineIndependent/glslang_tab.cpp" break; - case 656: /* spirv_execution_mode_parameter: INTCONSTANT */ -#line 4250 "MachineIndependent/glslang.y" + case 661: /* spirv_execution_mode_parameter: INTCONSTANT */ +#line 4280 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).i, (yyvsp[0].lex).loc, true); } -#line 12066 "MachineIndependent/glslang_tab.cpp" +#line 12159 "MachineIndependent/glslang_tab.cpp" break; - case 657: /* spirv_execution_mode_parameter: UINTCONSTANT */ -#line 4253 "MachineIndependent/glslang.y" + case 662: /* spirv_execution_mode_parameter: UINTCONSTANT */ +#line 4283 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).u, (yyvsp[0].lex).loc, true); } -#line 12074 "MachineIndependent/glslang_tab.cpp" +#line 12167 "MachineIndependent/glslang_tab.cpp" break; - case 658: /* spirv_execution_mode_parameter: BOOLCONSTANT */ -#line 4256 "MachineIndependent/glslang.y" + case 663: /* spirv_execution_mode_parameter: BOOLCONSTANT */ +#line 4286 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).b, (yyvsp[0].lex).loc, true); } -#line 12082 "MachineIndependent/glslang_tab.cpp" +#line 12175 "MachineIndependent/glslang_tab.cpp" break; - case 659: /* spirv_execution_mode_parameter: STRING_LITERAL */ -#line 4259 "MachineIndependent/glslang.y" + case 664: /* spirv_execution_mode_parameter: STRING_LITERAL */ +#line 4289 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).string, (yyvsp[0].lex).loc, true); } -#line 12090 "MachineIndependent/glslang_tab.cpp" +#line 12183 "MachineIndependent/glslang_tab.cpp" break; - case 660: /* spirv_execution_mode_id_parameter_list: constant_expression */ -#line 4264 "MachineIndependent/glslang.y" + case 665: /* spirv_execution_mode_id_parameter_list: constant_expression */ +#line 4294 "MachineIndependent/glslang.y" { if ((yyvsp[0].interm.intermTypedNode)->getBasicType() != EbtFloat && (yyvsp[0].interm.intermTypedNode)->getBasicType() != EbtInt && @@ -12100,11 +12193,11 @@ yyreduce: parseContext.error((yyvsp[0].interm.intermTypedNode)->getLoc(), "this type not allowed", (yyvsp[0].interm.intermTypedNode)->getType().getBasicString(), ""); (yyval.interm.intermNode) = parseContext.intermediate.makeAggregate((yyvsp[0].interm.intermTypedNode)); } -#line 12104 "MachineIndependent/glslang_tab.cpp" +#line 12197 "MachineIndependent/glslang_tab.cpp" break; - case 661: /* spirv_execution_mode_id_parameter_list: spirv_execution_mode_id_parameter_list COMMA constant_expression */ -#line 4273 "MachineIndependent/glslang.y" + case 666: /* spirv_execution_mode_id_parameter_list: spirv_execution_mode_id_parameter_list COMMA constant_expression */ +#line 4303 "MachineIndependent/glslang.y" { if ((yyvsp[0].interm.intermTypedNode)->getBasicType() != EbtFloat && (yyvsp[0].interm.intermTypedNode)->getBasicType() != EbtInt && @@ -12114,351 +12207,351 @@ yyreduce: parseContext.error((yyvsp[0].interm.intermTypedNode)->getLoc(), "this type not allowed", (yyvsp[0].interm.intermTypedNode)->getType().getBasicString(), ""); (yyval.interm.intermNode) = parseContext.intermediate.growAggregate((yyvsp[-2].interm.intermNode), (yyvsp[0].interm.intermTypedNode)); } -#line 12118 "MachineIndependent/glslang_tab.cpp" +#line 12211 "MachineIndependent/glslang_tab.cpp" break; - case 662: /* spirv_storage_class_qualifier: SPIRV_STORAGE_CLASS LEFT_PAREN INTCONSTANT RIGHT_PAREN */ -#line 4284 "MachineIndependent/glslang.y" + case 667: /* spirv_storage_class_qualifier: SPIRV_STORAGE_CLASS LEFT_PAREN INTCONSTANT RIGHT_PAREN */ +#line 4314 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[-3].lex).loc); (yyval.interm.type).qualifier.storage = EvqSpirvStorageClass; (yyval.interm.type).qualifier.spirvStorageClass = (yyvsp[-1].lex).i; } -#line 12128 "MachineIndependent/glslang_tab.cpp" +#line 12221 "MachineIndependent/glslang_tab.cpp" break; - case 663: /* spirv_storage_class_qualifier: SPIRV_STORAGE_CLASS LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT RIGHT_PAREN */ -#line 4289 "MachineIndependent/glslang.y" + case 668: /* spirv_storage_class_qualifier: SPIRV_STORAGE_CLASS LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT RIGHT_PAREN */ +#line 4319 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[-5].lex).loc); parseContext.intermediate.insertSpirvRequirement((yyvsp[-3].interm.spirvReq)); (yyval.interm.type).qualifier.storage = EvqSpirvStorageClass; (yyval.interm.type).qualifier.spirvStorageClass = (yyvsp[-1].lex).i; } -#line 12139 "MachineIndependent/glslang_tab.cpp" +#line 12232 "MachineIndependent/glslang_tab.cpp" break; - case 664: /* spirv_decorate_qualifier: SPIRV_DECORATE LEFT_PAREN INTCONSTANT RIGHT_PAREN */ -#line 4297 "MachineIndependent/glslang.y" + case 669: /* spirv_decorate_qualifier: SPIRV_DECORATE LEFT_PAREN INTCONSTANT RIGHT_PAREN */ +#line 4327 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[-3].lex).loc); (yyval.interm.type).qualifier.setSpirvDecorate((yyvsp[-1].lex).i); } -#line 12148 "MachineIndependent/glslang_tab.cpp" +#line 12241 "MachineIndependent/glslang_tab.cpp" break; - case 665: /* spirv_decorate_qualifier: SPIRV_DECORATE LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT RIGHT_PAREN */ -#line 4301 "MachineIndependent/glslang.y" + case 670: /* spirv_decorate_qualifier: SPIRV_DECORATE LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT RIGHT_PAREN */ +#line 4331 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[-5].lex).loc); parseContext.intermediate.insertSpirvRequirement((yyvsp[-3].interm.spirvReq)); (yyval.interm.type).qualifier.setSpirvDecorate((yyvsp[-1].lex).i); } -#line 12158 "MachineIndependent/glslang_tab.cpp" +#line 12251 "MachineIndependent/glslang_tab.cpp" break; - case 666: /* spirv_decorate_qualifier: SPIRV_DECORATE LEFT_PAREN INTCONSTANT COMMA spirv_decorate_parameter_list RIGHT_PAREN */ -#line 4306 "MachineIndependent/glslang.y" + case 671: /* spirv_decorate_qualifier: SPIRV_DECORATE LEFT_PAREN INTCONSTANT COMMA spirv_decorate_parameter_list RIGHT_PAREN */ +#line 4336 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[-5].lex).loc); (yyval.interm.type).qualifier.setSpirvDecorate((yyvsp[-3].lex).i, (yyvsp[-1].interm.intermNode)->getAsAggregate()); } -#line 12167 "MachineIndependent/glslang_tab.cpp" +#line 12260 "MachineIndependent/glslang_tab.cpp" break; - case 667: /* spirv_decorate_qualifier: SPIRV_DECORATE LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT COMMA spirv_decorate_parameter_list RIGHT_PAREN */ -#line 4310 "MachineIndependent/glslang.y" + case 672: /* spirv_decorate_qualifier: SPIRV_DECORATE LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT COMMA spirv_decorate_parameter_list RIGHT_PAREN */ +#line 4340 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[-7].lex).loc); parseContext.intermediate.insertSpirvRequirement((yyvsp[-5].interm.spirvReq)); (yyval.interm.type).qualifier.setSpirvDecorate((yyvsp[-3].lex).i, (yyvsp[-1].interm.intermNode)->getAsAggregate()); } -#line 12177 "MachineIndependent/glslang_tab.cpp" +#line 12270 "MachineIndependent/glslang_tab.cpp" break; - case 668: /* spirv_decorate_qualifier: SPIRV_DECORATE_ID LEFT_PAREN INTCONSTANT COMMA spirv_decorate_id_parameter_list RIGHT_PAREN */ -#line 4315 "MachineIndependent/glslang.y" + case 673: /* spirv_decorate_qualifier: SPIRV_DECORATE_ID LEFT_PAREN INTCONSTANT COMMA spirv_decorate_id_parameter_list RIGHT_PAREN */ +#line 4345 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[-5].lex).loc); (yyval.interm.type).qualifier.setSpirvDecorateId((yyvsp[-3].lex).i, (yyvsp[-1].interm.intermNode)->getAsAggregate()); } -#line 12186 "MachineIndependent/glslang_tab.cpp" +#line 12279 "MachineIndependent/glslang_tab.cpp" break; - case 669: /* spirv_decorate_qualifier: SPIRV_DECORATE_ID LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT COMMA spirv_decorate_id_parameter_list RIGHT_PAREN */ -#line 4319 "MachineIndependent/glslang.y" + case 674: /* spirv_decorate_qualifier: SPIRV_DECORATE_ID LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT COMMA spirv_decorate_id_parameter_list RIGHT_PAREN */ +#line 4349 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[-7].lex).loc); parseContext.intermediate.insertSpirvRequirement((yyvsp[-5].interm.spirvReq)); (yyval.interm.type).qualifier.setSpirvDecorateId((yyvsp[-3].lex).i, (yyvsp[-1].interm.intermNode)->getAsAggregate()); } -#line 12196 "MachineIndependent/glslang_tab.cpp" +#line 12289 "MachineIndependent/glslang_tab.cpp" break; - case 670: /* spirv_decorate_qualifier: SPIRV_DECORATE_STRING LEFT_PAREN INTCONSTANT COMMA spirv_decorate_string_parameter_list RIGHT_PAREN */ -#line 4324 "MachineIndependent/glslang.y" + case 675: /* spirv_decorate_qualifier: SPIRV_DECORATE_STRING LEFT_PAREN INTCONSTANT COMMA spirv_decorate_string_parameter_list RIGHT_PAREN */ +#line 4354 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[-5].lex).loc); (yyval.interm.type).qualifier.setSpirvDecorateString((yyvsp[-3].lex).i, (yyvsp[-1].interm.intermNode)->getAsAggregate()); } -#line 12205 "MachineIndependent/glslang_tab.cpp" +#line 12298 "MachineIndependent/glslang_tab.cpp" break; - case 671: /* spirv_decorate_qualifier: SPIRV_DECORATE_STRING LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT COMMA spirv_decorate_string_parameter_list RIGHT_PAREN */ -#line 4328 "MachineIndependent/glslang.y" + case 676: /* spirv_decorate_qualifier: SPIRV_DECORATE_STRING LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT COMMA spirv_decorate_string_parameter_list RIGHT_PAREN */ +#line 4358 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[-7].lex).loc); parseContext.intermediate.insertSpirvRequirement((yyvsp[-5].interm.spirvReq)); (yyval.interm.type).qualifier.setSpirvDecorateString((yyvsp[-3].lex).i, (yyvsp[-1].interm.intermNode)->getAsAggregate()); } -#line 12215 "MachineIndependent/glslang_tab.cpp" +#line 12308 "MachineIndependent/glslang_tab.cpp" break; - case 672: /* spirv_decorate_parameter_list: spirv_decorate_parameter */ -#line 4335 "MachineIndependent/glslang.y" + case 677: /* spirv_decorate_parameter_list: spirv_decorate_parameter */ +#line 4365 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = parseContext.intermediate.makeAggregate((yyvsp[0].interm.intermNode)); } -#line 12223 "MachineIndependent/glslang_tab.cpp" +#line 12316 "MachineIndependent/glslang_tab.cpp" break; - case 673: /* spirv_decorate_parameter_list: spirv_decorate_parameter_list COMMA spirv_decorate_parameter */ -#line 4338 "MachineIndependent/glslang.y" + case 678: /* spirv_decorate_parameter_list: spirv_decorate_parameter_list COMMA spirv_decorate_parameter */ +#line 4368 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = parseContext.intermediate.growAggregate((yyvsp[-2].interm.intermNode), (yyvsp[0].interm.intermNode)); } -#line 12231 "MachineIndependent/glslang_tab.cpp" +#line 12324 "MachineIndependent/glslang_tab.cpp" break; - case 674: /* spirv_decorate_parameter: FLOATCONSTANT */ -#line 4343 "MachineIndependent/glslang.y" + case 679: /* spirv_decorate_parameter: FLOATCONSTANT */ +#line 4373 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).d, EbtFloat, (yyvsp[0].lex).loc, true); } -#line 12239 "MachineIndependent/glslang_tab.cpp" +#line 12332 "MachineIndependent/glslang_tab.cpp" break; - case 675: /* spirv_decorate_parameter: INTCONSTANT */ -#line 4346 "MachineIndependent/glslang.y" + case 680: /* spirv_decorate_parameter: INTCONSTANT */ +#line 4376 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).i, (yyvsp[0].lex).loc, true); } -#line 12247 "MachineIndependent/glslang_tab.cpp" +#line 12340 "MachineIndependent/glslang_tab.cpp" break; - case 676: /* spirv_decorate_parameter: UINTCONSTANT */ -#line 4349 "MachineIndependent/glslang.y" + case 681: /* spirv_decorate_parameter: UINTCONSTANT */ +#line 4379 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).u, (yyvsp[0].lex).loc, true); } -#line 12255 "MachineIndependent/glslang_tab.cpp" +#line 12348 "MachineIndependent/glslang_tab.cpp" break; - case 677: /* spirv_decorate_parameter: BOOLCONSTANT */ -#line 4352 "MachineIndependent/glslang.y" + case 682: /* spirv_decorate_parameter: BOOLCONSTANT */ +#line 4382 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).b, (yyvsp[0].lex).loc, true); } -#line 12263 "MachineIndependent/glslang_tab.cpp" +#line 12356 "MachineIndependent/glslang_tab.cpp" break; - case 678: /* spirv_decorate_id_parameter_list: spirv_decorate_id_parameter */ -#line 4357 "MachineIndependent/glslang.y" + case 683: /* spirv_decorate_id_parameter_list: spirv_decorate_id_parameter */ +#line 4387 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = parseContext.intermediate.makeAggregate((yyvsp[0].interm.intermNode)); } -#line 12271 "MachineIndependent/glslang_tab.cpp" +#line 12364 "MachineIndependent/glslang_tab.cpp" break; - case 679: /* spirv_decorate_id_parameter_list: spirv_decorate_id_parameter_list COMMA spirv_decorate_id_parameter */ -#line 4360 "MachineIndependent/glslang.y" + case 684: /* spirv_decorate_id_parameter_list: spirv_decorate_id_parameter_list COMMA spirv_decorate_id_parameter */ +#line 4390 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = parseContext.intermediate.growAggregate((yyvsp[-2].interm.intermNode), (yyvsp[0].interm.intermNode)); } -#line 12279 "MachineIndependent/glslang_tab.cpp" +#line 12372 "MachineIndependent/glslang_tab.cpp" break; - case 680: /* spirv_decorate_id_parameter: variable_identifier */ -#line 4365 "MachineIndependent/glslang.y" + case 685: /* spirv_decorate_id_parameter: variable_identifier */ +#line 4395 "MachineIndependent/glslang.y" { if ((yyvsp[0].interm.intermTypedNode)->getAsConstantUnion() || (yyvsp[0].interm.intermTypedNode)->getAsSymbolNode()) (yyval.interm.intermNode) = (yyvsp[0].interm.intermTypedNode); else parseContext.error((yyvsp[0].interm.intermTypedNode)->getLoc(), "only allow constants or variables which are not elements of a composite", "", ""); } -#line 12290 "MachineIndependent/glslang_tab.cpp" +#line 12383 "MachineIndependent/glslang_tab.cpp" break; - case 681: /* spirv_decorate_id_parameter: FLOATCONSTANT */ -#line 4371 "MachineIndependent/glslang.y" + case 686: /* spirv_decorate_id_parameter: FLOATCONSTANT */ +#line 4401 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).d, EbtFloat, (yyvsp[0].lex).loc, true); } -#line 12298 "MachineIndependent/glslang_tab.cpp" +#line 12391 "MachineIndependent/glslang_tab.cpp" break; - case 682: /* spirv_decorate_id_parameter: INTCONSTANT */ -#line 4374 "MachineIndependent/glslang.y" + case 687: /* spirv_decorate_id_parameter: INTCONSTANT */ +#line 4404 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).i, (yyvsp[0].lex).loc, true); } -#line 12306 "MachineIndependent/glslang_tab.cpp" +#line 12399 "MachineIndependent/glslang_tab.cpp" break; - case 683: /* spirv_decorate_id_parameter: UINTCONSTANT */ -#line 4377 "MachineIndependent/glslang.y" + case 688: /* spirv_decorate_id_parameter: UINTCONSTANT */ +#line 4407 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).u, (yyvsp[0].lex).loc, true); } -#line 12314 "MachineIndependent/glslang_tab.cpp" +#line 12407 "MachineIndependent/glslang_tab.cpp" break; - case 684: /* spirv_decorate_id_parameter: BOOLCONSTANT */ -#line 4380 "MachineIndependent/glslang.y" + case 689: /* spirv_decorate_id_parameter: BOOLCONSTANT */ +#line 4410 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).b, (yyvsp[0].lex).loc, true); } -#line 12322 "MachineIndependent/glslang_tab.cpp" +#line 12415 "MachineIndependent/glslang_tab.cpp" break; - case 685: /* spirv_decorate_string_parameter_list: STRING_LITERAL */ -#line 4385 "MachineIndependent/glslang.y" + case 690: /* spirv_decorate_string_parameter_list: STRING_LITERAL */ +#line 4415 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = parseContext.intermediate.makeAggregate( parseContext.intermediate.addConstantUnion((yyvsp[0].lex).string, (yyvsp[0].lex).loc, true)); } -#line 12331 "MachineIndependent/glslang_tab.cpp" +#line 12424 "MachineIndependent/glslang_tab.cpp" break; - case 686: /* spirv_decorate_string_parameter_list: spirv_decorate_string_parameter_list COMMA STRING_LITERAL */ -#line 4389 "MachineIndependent/glslang.y" + case 691: /* spirv_decorate_string_parameter_list: spirv_decorate_string_parameter_list COMMA STRING_LITERAL */ +#line 4419 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = parseContext.intermediate.growAggregate((yyvsp[-2].interm.intermNode), parseContext.intermediate.addConstantUnion((yyvsp[0].lex).string, (yyvsp[0].lex).loc, true)); } -#line 12339 "MachineIndependent/glslang_tab.cpp" +#line 12432 "MachineIndependent/glslang_tab.cpp" break; - case 687: /* spirv_type_specifier: SPIRV_TYPE LEFT_PAREN spirv_instruction_qualifier_list COMMA spirv_type_parameter_list RIGHT_PAREN */ -#line 4394 "MachineIndependent/glslang.y" + case 692: /* spirv_type_specifier: SPIRV_TYPE LEFT_PAREN spirv_instruction_qualifier_list COMMA spirv_type_parameter_list RIGHT_PAREN */ +#line 4424 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[-5].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).setSpirvType(*(yyvsp[-3].interm.spirvInst), (yyvsp[-1].interm.spirvTypeParams)); } -#line 12348 "MachineIndependent/glslang_tab.cpp" +#line 12441 "MachineIndependent/glslang_tab.cpp" break; - case 688: /* spirv_type_specifier: SPIRV_TYPE LEFT_PAREN spirv_requirements_list COMMA spirv_instruction_qualifier_list COMMA spirv_type_parameter_list RIGHT_PAREN */ -#line 4398 "MachineIndependent/glslang.y" + case 693: /* spirv_type_specifier: SPIRV_TYPE LEFT_PAREN spirv_requirements_list COMMA spirv_instruction_qualifier_list COMMA spirv_type_parameter_list RIGHT_PAREN */ +#line 4428 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[-7].lex).loc, parseContext.symbolTable.atGlobalLevel()); parseContext.intermediate.insertSpirvRequirement((yyvsp[-5].interm.spirvReq)); (yyval.interm.type).setSpirvType(*(yyvsp[-3].interm.spirvInst), (yyvsp[-1].interm.spirvTypeParams)); } -#line 12358 "MachineIndependent/glslang_tab.cpp" +#line 12451 "MachineIndependent/glslang_tab.cpp" break; - case 689: /* spirv_type_specifier: SPIRV_TYPE LEFT_PAREN spirv_instruction_qualifier_list RIGHT_PAREN */ -#line 4403 "MachineIndependent/glslang.y" + case 694: /* spirv_type_specifier: SPIRV_TYPE LEFT_PAREN spirv_instruction_qualifier_list RIGHT_PAREN */ +#line 4433 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[-3].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).setSpirvType(*(yyvsp[-1].interm.spirvInst)); } -#line 12367 "MachineIndependent/glslang_tab.cpp" +#line 12460 "MachineIndependent/glslang_tab.cpp" break; - case 690: /* spirv_type_specifier: SPIRV_TYPE LEFT_PAREN spirv_requirements_list COMMA spirv_instruction_qualifier_list RIGHT_PAREN */ -#line 4407 "MachineIndependent/glslang.y" + case 695: /* spirv_type_specifier: SPIRV_TYPE LEFT_PAREN spirv_requirements_list COMMA spirv_instruction_qualifier_list RIGHT_PAREN */ +#line 4437 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[-5].lex).loc, parseContext.symbolTable.atGlobalLevel()); parseContext.intermediate.insertSpirvRequirement((yyvsp[-3].interm.spirvReq)); (yyval.interm.type).setSpirvType(*(yyvsp[-1].interm.spirvInst)); } -#line 12377 "MachineIndependent/glslang_tab.cpp" +#line 12470 "MachineIndependent/glslang_tab.cpp" break; - case 691: /* spirv_type_parameter_list: spirv_type_parameter */ -#line 4414 "MachineIndependent/glslang.y" + case 696: /* spirv_type_parameter_list: spirv_type_parameter */ +#line 4444 "MachineIndependent/glslang.y" { (yyval.interm.spirvTypeParams) = (yyvsp[0].interm.spirvTypeParams); } -#line 12385 "MachineIndependent/glslang_tab.cpp" +#line 12478 "MachineIndependent/glslang_tab.cpp" break; - case 692: /* spirv_type_parameter_list: spirv_type_parameter_list COMMA spirv_type_parameter */ -#line 4417 "MachineIndependent/glslang.y" + case 697: /* spirv_type_parameter_list: spirv_type_parameter_list COMMA spirv_type_parameter */ +#line 4447 "MachineIndependent/glslang.y" { (yyval.interm.spirvTypeParams) = parseContext.mergeSpirvTypeParameters((yyvsp[-2].interm.spirvTypeParams), (yyvsp[0].interm.spirvTypeParams)); } -#line 12393 "MachineIndependent/glslang_tab.cpp" +#line 12486 "MachineIndependent/glslang_tab.cpp" break; - case 693: /* spirv_type_parameter: constant_expression */ -#line 4422 "MachineIndependent/glslang.y" + case 698: /* spirv_type_parameter: constant_expression */ +#line 4452 "MachineIndependent/glslang.y" { (yyval.interm.spirvTypeParams) = parseContext.makeSpirvTypeParameters((yyvsp[0].interm.intermTypedNode)->getLoc(), (yyvsp[0].interm.intermTypedNode)->getAsConstantUnion()); } -#line 12401 "MachineIndependent/glslang_tab.cpp" +#line 12494 "MachineIndependent/glslang_tab.cpp" break; - case 694: /* spirv_type_parameter: type_specifier_nonarray */ -#line 4425 "MachineIndependent/glslang.y" + case 699: /* spirv_type_parameter: type_specifier_nonarray */ +#line 4455 "MachineIndependent/glslang.y" { (yyval.interm.spirvTypeParams) = parseContext.makeSpirvTypeParameters((yyvsp[0].interm.type).loc, (yyvsp[0].interm.type)); } -#line 12409 "MachineIndependent/glslang_tab.cpp" +#line 12502 "MachineIndependent/glslang_tab.cpp" break; - case 695: /* spirv_instruction_qualifier: SPIRV_INSTRUCTION LEFT_PAREN spirv_instruction_qualifier_list RIGHT_PAREN */ -#line 4430 "MachineIndependent/glslang.y" + case 700: /* spirv_instruction_qualifier: SPIRV_INSTRUCTION LEFT_PAREN spirv_instruction_qualifier_list RIGHT_PAREN */ +#line 4460 "MachineIndependent/glslang.y" { (yyval.interm.spirvInst) = (yyvsp[-1].interm.spirvInst); } -#line 12417 "MachineIndependent/glslang_tab.cpp" +#line 12510 "MachineIndependent/glslang_tab.cpp" break; - case 696: /* spirv_instruction_qualifier: SPIRV_INSTRUCTION LEFT_PAREN spirv_requirements_list COMMA spirv_instruction_qualifier_list RIGHT_PAREN */ -#line 4433 "MachineIndependent/glslang.y" + case 701: /* spirv_instruction_qualifier: SPIRV_INSTRUCTION LEFT_PAREN spirv_requirements_list COMMA spirv_instruction_qualifier_list RIGHT_PAREN */ +#line 4463 "MachineIndependent/glslang.y" { parseContext.intermediate.insertSpirvRequirement((yyvsp[-3].interm.spirvReq)); (yyval.interm.spirvInst) = (yyvsp[-1].interm.spirvInst); } -#line 12426 "MachineIndependent/glslang_tab.cpp" +#line 12519 "MachineIndependent/glslang_tab.cpp" break; - case 697: /* spirv_instruction_qualifier_list: spirv_instruction_qualifier_id */ -#line 4439 "MachineIndependent/glslang.y" + case 702: /* spirv_instruction_qualifier_list: spirv_instruction_qualifier_id */ +#line 4469 "MachineIndependent/glslang.y" { (yyval.interm.spirvInst) = (yyvsp[0].interm.spirvInst); } -#line 12434 "MachineIndependent/glslang_tab.cpp" +#line 12527 "MachineIndependent/glslang_tab.cpp" break; - case 698: /* spirv_instruction_qualifier_list: spirv_instruction_qualifier_list COMMA spirv_instruction_qualifier_id */ -#line 4442 "MachineIndependent/glslang.y" + case 703: /* spirv_instruction_qualifier_list: spirv_instruction_qualifier_list COMMA spirv_instruction_qualifier_id */ +#line 4472 "MachineIndependent/glslang.y" { (yyval.interm.spirvInst) = parseContext.mergeSpirvInstruction((yyvsp[-1].lex).loc, (yyvsp[-2].interm.spirvInst), (yyvsp[0].interm.spirvInst)); } -#line 12442 "MachineIndependent/glslang_tab.cpp" +#line 12535 "MachineIndependent/glslang_tab.cpp" break; - case 699: /* spirv_instruction_qualifier_id: IDENTIFIER EQUAL STRING_LITERAL */ -#line 4447 "MachineIndependent/glslang.y" + case 704: /* spirv_instruction_qualifier_id: IDENTIFIER EQUAL STRING_LITERAL */ +#line 4477 "MachineIndependent/glslang.y" { (yyval.interm.spirvInst) = parseContext.makeSpirvInstruction((yyvsp[-1].lex).loc, *(yyvsp[-2].lex).string, *(yyvsp[0].lex).string); } -#line 12450 "MachineIndependent/glslang_tab.cpp" +#line 12543 "MachineIndependent/glslang_tab.cpp" break; - case 700: /* spirv_instruction_qualifier_id: IDENTIFIER EQUAL INTCONSTANT */ -#line 4450 "MachineIndependent/glslang.y" + case 705: /* spirv_instruction_qualifier_id: IDENTIFIER EQUAL INTCONSTANT */ +#line 4480 "MachineIndependent/glslang.y" { (yyval.interm.spirvInst) = parseContext.makeSpirvInstruction((yyvsp[-1].lex).loc, *(yyvsp[-2].lex).string, (yyvsp[0].lex).i); } -#line 12458 "MachineIndependent/glslang_tab.cpp" +#line 12551 "MachineIndependent/glslang_tab.cpp" break; -#line 12462 "MachineIndependent/glslang_tab.cpp" +#line 12555 "MachineIndependent/glslang_tab.cpp" default: break; } @@ -12682,5 +12775,5 @@ yyreturnlab: return yyresult; } -#line 4454 "MachineIndependent/glslang.y" +#line 4484 "MachineIndependent/glslang.y" diff --git a/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/glslang_tab.cpp.h b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/glslang_tab.cpp.h index d6484924d..270714c00 100644 --- a/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/glslang_tab.cpp.h +++ b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/glslang_tab.cpp.h @@ -218,304 +218,309 @@ extern int yydebug; ICOOPMATNV = 419, /* ICOOPMATNV */ UCOOPMATNV = 420, /* UCOOPMATNV */ COOPMAT = 421, /* COOPMAT */ - HITOBJECTNV = 422, /* HITOBJECTNV */ - HITOBJECTATTRNV = 423, /* HITOBJECTATTRNV */ - SAMPLERCUBEARRAY = 424, /* SAMPLERCUBEARRAY */ - SAMPLERCUBEARRAYSHADOW = 425, /* SAMPLERCUBEARRAYSHADOW */ - ISAMPLERCUBEARRAY = 426, /* ISAMPLERCUBEARRAY */ - USAMPLERCUBEARRAY = 427, /* USAMPLERCUBEARRAY */ - SAMPLER1D = 428, /* SAMPLER1D */ - SAMPLER1DARRAY = 429, /* SAMPLER1DARRAY */ - SAMPLER1DARRAYSHADOW = 430, /* SAMPLER1DARRAYSHADOW */ - ISAMPLER1D = 431, /* ISAMPLER1D */ - SAMPLER1DSHADOW = 432, /* SAMPLER1DSHADOW */ - SAMPLER2DRECT = 433, /* SAMPLER2DRECT */ - SAMPLER2DRECTSHADOW = 434, /* SAMPLER2DRECTSHADOW */ - ISAMPLER2DRECT = 435, /* ISAMPLER2DRECT */ - USAMPLER2DRECT = 436, /* USAMPLER2DRECT */ - SAMPLERBUFFER = 437, /* SAMPLERBUFFER */ - ISAMPLERBUFFER = 438, /* ISAMPLERBUFFER */ - USAMPLERBUFFER = 439, /* USAMPLERBUFFER */ - SAMPLER2DMS = 440, /* SAMPLER2DMS */ - ISAMPLER2DMS = 441, /* ISAMPLER2DMS */ - USAMPLER2DMS = 442, /* USAMPLER2DMS */ - SAMPLER2DMSARRAY = 443, /* SAMPLER2DMSARRAY */ - ISAMPLER2DMSARRAY = 444, /* ISAMPLER2DMSARRAY */ - USAMPLER2DMSARRAY = 445, /* USAMPLER2DMSARRAY */ - SAMPLEREXTERNALOES = 446, /* SAMPLEREXTERNALOES */ - SAMPLEREXTERNAL2DY2YEXT = 447, /* SAMPLEREXTERNAL2DY2YEXT */ - ISAMPLER1DARRAY = 448, /* ISAMPLER1DARRAY */ - USAMPLER1D = 449, /* USAMPLER1D */ - USAMPLER1DARRAY = 450, /* USAMPLER1DARRAY */ - F16SAMPLER1D = 451, /* F16SAMPLER1D */ - F16SAMPLER2D = 452, /* F16SAMPLER2D */ - F16SAMPLER3D = 453, /* F16SAMPLER3D */ - F16SAMPLER2DRECT = 454, /* F16SAMPLER2DRECT */ - F16SAMPLERCUBE = 455, /* F16SAMPLERCUBE */ - F16SAMPLER1DARRAY = 456, /* F16SAMPLER1DARRAY */ - F16SAMPLER2DARRAY = 457, /* F16SAMPLER2DARRAY */ - F16SAMPLERCUBEARRAY = 458, /* F16SAMPLERCUBEARRAY */ - F16SAMPLERBUFFER = 459, /* F16SAMPLERBUFFER */ - F16SAMPLER2DMS = 460, /* F16SAMPLER2DMS */ - F16SAMPLER2DMSARRAY = 461, /* F16SAMPLER2DMSARRAY */ - F16SAMPLER1DSHADOW = 462, /* F16SAMPLER1DSHADOW */ - F16SAMPLER2DSHADOW = 463, /* F16SAMPLER2DSHADOW */ - F16SAMPLER1DARRAYSHADOW = 464, /* F16SAMPLER1DARRAYSHADOW */ - F16SAMPLER2DARRAYSHADOW = 465, /* F16SAMPLER2DARRAYSHADOW */ - F16SAMPLER2DRECTSHADOW = 466, /* F16SAMPLER2DRECTSHADOW */ - F16SAMPLERCUBESHADOW = 467, /* F16SAMPLERCUBESHADOW */ - F16SAMPLERCUBEARRAYSHADOW = 468, /* F16SAMPLERCUBEARRAYSHADOW */ - IMAGE1D = 469, /* IMAGE1D */ - IIMAGE1D = 470, /* IIMAGE1D */ - UIMAGE1D = 471, /* UIMAGE1D */ - IMAGE2D = 472, /* IMAGE2D */ - IIMAGE2D = 473, /* IIMAGE2D */ - UIMAGE2D = 474, /* UIMAGE2D */ - IMAGE3D = 475, /* IMAGE3D */ - IIMAGE3D = 476, /* IIMAGE3D */ - UIMAGE3D = 477, /* UIMAGE3D */ - IMAGE2DRECT = 478, /* IMAGE2DRECT */ - IIMAGE2DRECT = 479, /* IIMAGE2DRECT */ - UIMAGE2DRECT = 480, /* UIMAGE2DRECT */ - IMAGECUBE = 481, /* IMAGECUBE */ - IIMAGECUBE = 482, /* IIMAGECUBE */ - UIMAGECUBE = 483, /* UIMAGECUBE */ - IMAGEBUFFER = 484, /* IMAGEBUFFER */ - IIMAGEBUFFER = 485, /* IIMAGEBUFFER */ - UIMAGEBUFFER = 486, /* UIMAGEBUFFER */ - IMAGE1DARRAY = 487, /* IMAGE1DARRAY */ - IIMAGE1DARRAY = 488, /* IIMAGE1DARRAY */ - UIMAGE1DARRAY = 489, /* UIMAGE1DARRAY */ - IMAGE2DARRAY = 490, /* IMAGE2DARRAY */ - IIMAGE2DARRAY = 491, /* IIMAGE2DARRAY */ - UIMAGE2DARRAY = 492, /* UIMAGE2DARRAY */ - IMAGECUBEARRAY = 493, /* IMAGECUBEARRAY */ - IIMAGECUBEARRAY = 494, /* IIMAGECUBEARRAY */ - UIMAGECUBEARRAY = 495, /* UIMAGECUBEARRAY */ - IMAGE2DMS = 496, /* IMAGE2DMS */ - IIMAGE2DMS = 497, /* IIMAGE2DMS */ - UIMAGE2DMS = 498, /* UIMAGE2DMS */ - IMAGE2DMSARRAY = 499, /* IMAGE2DMSARRAY */ - IIMAGE2DMSARRAY = 500, /* IIMAGE2DMSARRAY */ - UIMAGE2DMSARRAY = 501, /* UIMAGE2DMSARRAY */ - F16IMAGE1D = 502, /* F16IMAGE1D */ - F16IMAGE2D = 503, /* F16IMAGE2D */ - F16IMAGE3D = 504, /* F16IMAGE3D */ - F16IMAGE2DRECT = 505, /* F16IMAGE2DRECT */ - F16IMAGECUBE = 506, /* F16IMAGECUBE */ - F16IMAGE1DARRAY = 507, /* F16IMAGE1DARRAY */ - F16IMAGE2DARRAY = 508, /* F16IMAGE2DARRAY */ - F16IMAGECUBEARRAY = 509, /* F16IMAGECUBEARRAY */ - F16IMAGEBUFFER = 510, /* F16IMAGEBUFFER */ - F16IMAGE2DMS = 511, /* F16IMAGE2DMS */ - F16IMAGE2DMSARRAY = 512, /* F16IMAGE2DMSARRAY */ - I64IMAGE1D = 513, /* I64IMAGE1D */ - U64IMAGE1D = 514, /* U64IMAGE1D */ - I64IMAGE2D = 515, /* I64IMAGE2D */ - U64IMAGE2D = 516, /* U64IMAGE2D */ - I64IMAGE3D = 517, /* I64IMAGE3D */ - U64IMAGE3D = 518, /* U64IMAGE3D */ - I64IMAGE2DRECT = 519, /* I64IMAGE2DRECT */ - U64IMAGE2DRECT = 520, /* U64IMAGE2DRECT */ - I64IMAGECUBE = 521, /* I64IMAGECUBE */ - U64IMAGECUBE = 522, /* U64IMAGECUBE */ - I64IMAGEBUFFER = 523, /* I64IMAGEBUFFER */ - U64IMAGEBUFFER = 524, /* U64IMAGEBUFFER */ - I64IMAGE1DARRAY = 525, /* I64IMAGE1DARRAY */ - U64IMAGE1DARRAY = 526, /* U64IMAGE1DARRAY */ - I64IMAGE2DARRAY = 527, /* I64IMAGE2DARRAY */ - U64IMAGE2DARRAY = 528, /* U64IMAGE2DARRAY */ - I64IMAGECUBEARRAY = 529, /* I64IMAGECUBEARRAY */ - U64IMAGECUBEARRAY = 530, /* U64IMAGECUBEARRAY */ - I64IMAGE2DMS = 531, /* I64IMAGE2DMS */ - U64IMAGE2DMS = 532, /* U64IMAGE2DMS */ - I64IMAGE2DMSARRAY = 533, /* I64IMAGE2DMSARRAY */ - U64IMAGE2DMSARRAY = 534, /* U64IMAGE2DMSARRAY */ - TEXTURECUBEARRAY = 535, /* TEXTURECUBEARRAY */ - ITEXTURECUBEARRAY = 536, /* ITEXTURECUBEARRAY */ - UTEXTURECUBEARRAY = 537, /* UTEXTURECUBEARRAY */ - TEXTURE1D = 538, /* TEXTURE1D */ - ITEXTURE1D = 539, /* ITEXTURE1D */ - UTEXTURE1D = 540, /* UTEXTURE1D */ - TEXTURE1DARRAY = 541, /* TEXTURE1DARRAY */ - ITEXTURE1DARRAY = 542, /* ITEXTURE1DARRAY */ - UTEXTURE1DARRAY = 543, /* UTEXTURE1DARRAY */ - TEXTURE2DRECT = 544, /* TEXTURE2DRECT */ - ITEXTURE2DRECT = 545, /* ITEXTURE2DRECT */ - UTEXTURE2DRECT = 546, /* UTEXTURE2DRECT */ - TEXTUREBUFFER = 547, /* TEXTUREBUFFER */ - ITEXTUREBUFFER = 548, /* ITEXTUREBUFFER */ - UTEXTUREBUFFER = 549, /* UTEXTUREBUFFER */ - TEXTURE2DMS = 550, /* TEXTURE2DMS */ - ITEXTURE2DMS = 551, /* ITEXTURE2DMS */ - UTEXTURE2DMS = 552, /* UTEXTURE2DMS */ - TEXTURE2DMSARRAY = 553, /* TEXTURE2DMSARRAY */ - ITEXTURE2DMSARRAY = 554, /* ITEXTURE2DMSARRAY */ - UTEXTURE2DMSARRAY = 555, /* UTEXTURE2DMSARRAY */ - F16TEXTURE1D = 556, /* F16TEXTURE1D */ - F16TEXTURE2D = 557, /* F16TEXTURE2D */ - F16TEXTURE3D = 558, /* F16TEXTURE3D */ - F16TEXTURE2DRECT = 559, /* F16TEXTURE2DRECT */ - F16TEXTURECUBE = 560, /* F16TEXTURECUBE */ - F16TEXTURE1DARRAY = 561, /* F16TEXTURE1DARRAY */ - F16TEXTURE2DARRAY = 562, /* F16TEXTURE2DARRAY */ - F16TEXTURECUBEARRAY = 563, /* F16TEXTURECUBEARRAY */ - F16TEXTUREBUFFER = 564, /* F16TEXTUREBUFFER */ - F16TEXTURE2DMS = 565, /* F16TEXTURE2DMS */ - F16TEXTURE2DMSARRAY = 566, /* F16TEXTURE2DMSARRAY */ - SUBPASSINPUT = 567, /* SUBPASSINPUT */ - SUBPASSINPUTMS = 568, /* SUBPASSINPUTMS */ - ISUBPASSINPUT = 569, /* ISUBPASSINPUT */ - ISUBPASSINPUTMS = 570, /* ISUBPASSINPUTMS */ - USUBPASSINPUT = 571, /* USUBPASSINPUT */ - USUBPASSINPUTMS = 572, /* USUBPASSINPUTMS */ - F16SUBPASSINPUT = 573, /* F16SUBPASSINPUT */ - F16SUBPASSINPUTMS = 574, /* F16SUBPASSINPUTMS */ - SPIRV_INSTRUCTION = 575, /* SPIRV_INSTRUCTION */ - SPIRV_EXECUTION_MODE = 576, /* SPIRV_EXECUTION_MODE */ - SPIRV_EXECUTION_MODE_ID = 577, /* SPIRV_EXECUTION_MODE_ID */ - SPIRV_DECORATE = 578, /* SPIRV_DECORATE */ - SPIRV_DECORATE_ID = 579, /* SPIRV_DECORATE_ID */ - SPIRV_DECORATE_STRING = 580, /* SPIRV_DECORATE_STRING */ - SPIRV_TYPE = 581, /* SPIRV_TYPE */ - SPIRV_STORAGE_CLASS = 582, /* SPIRV_STORAGE_CLASS */ - SPIRV_BY_REFERENCE = 583, /* SPIRV_BY_REFERENCE */ - SPIRV_LITERAL = 584, /* SPIRV_LITERAL */ - ATTACHMENTEXT = 585, /* ATTACHMENTEXT */ - IATTACHMENTEXT = 586, /* IATTACHMENTEXT */ - UATTACHMENTEXT = 587, /* UATTACHMENTEXT */ - LEFT_OP = 588, /* LEFT_OP */ - RIGHT_OP = 589, /* RIGHT_OP */ - INC_OP = 590, /* INC_OP */ - DEC_OP = 591, /* DEC_OP */ - LE_OP = 592, /* LE_OP */ - GE_OP = 593, /* GE_OP */ - EQ_OP = 594, /* EQ_OP */ - NE_OP = 595, /* NE_OP */ - AND_OP = 596, /* AND_OP */ - OR_OP = 597, /* OR_OP */ - XOR_OP = 598, /* XOR_OP */ - MUL_ASSIGN = 599, /* MUL_ASSIGN */ - DIV_ASSIGN = 600, /* DIV_ASSIGN */ - ADD_ASSIGN = 601, /* ADD_ASSIGN */ - MOD_ASSIGN = 602, /* MOD_ASSIGN */ - LEFT_ASSIGN = 603, /* LEFT_ASSIGN */ - RIGHT_ASSIGN = 604, /* RIGHT_ASSIGN */ - AND_ASSIGN = 605, /* AND_ASSIGN */ - XOR_ASSIGN = 606, /* XOR_ASSIGN */ - OR_ASSIGN = 607, /* OR_ASSIGN */ - SUB_ASSIGN = 608, /* SUB_ASSIGN */ - STRING_LITERAL = 609, /* STRING_LITERAL */ - LEFT_PAREN = 610, /* LEFT_PAREN */ - RIGHT_PAREN = 611, /* RIGHT_PAREN */ - LEFT_BRACKET = 612, /* LEFT_BRACKET */ - RIGHT_BRACKET = 613, /* RIGHT_BRACKET */ - LEFT_BRACE = 614, /* LEFT_BRACE */ - RIGHT_BRACE = 615, /* RIGHT_BRACE */ - DOT = 616, /* DOT */ - COMMA = 617, /* COMMA */ - COLON = 618, /* COLON */ - EQUAL = 619, /* EQUAL */ - SEMICOLON = 620, /* SEMICOLON */ - BANG = 621, /* BANG */ - DASH = 622, /* DASH */ - TILDE = 623, /* TILDE */ - PLUS = 624, /* PLUS */ - STAR = 625, /* STAR */ - SLASH = 626, /* SLASH */ - PERCENT = 627, /* PERCENT */ - LEFT_ANGLE = 628, /* LEFT_ANGLE */ - RIGHT_ANGLE = 629, /* RIGHT_ANGLE */ - VERTICAL_BAR = 630, /* VERTICAL_BAR */ - CARET = 631, /* CARET */ - AMPERSAND = 632, /* AMPERSAND */ - QUESTION = 633, /* QUESTION */ - INVARIANT = 634, /* INVARIANT */ - HIGH_PRECISION = 635, /* HIGH_PRECISION */ - MEDIUM_PRECISION = 636, /* MEDIUM_PRECISION */ - LOW_PRECISION = 637, /* LOW_PRECISION */ - PRECISION = 638, /* PRECISION */ - PACKED = 639, /* PACKED */ - RESOURCE = 640, /* RESOURCE */ - SUPERP = 641, /* SUPERP */ - FLOATCONSTANT = 642, /* FLOATCONSTANT */ - INTCONSTANT = 643, /* INTCONSTANT */ - UINTCONSTANT = 644, /* UINTCONSTANT */ - BOOLCONSTANT = 645, /* BOOLCONSTANT */ - IDENTIFIER = 646, /* IDENTIFIER */ - TYPE_NAME = 647, /* TYPE_NAME */ - CENTROID = 648, /* CENTROID */ - IN = 649, /* IN */ - OUT = 650, /* OUT */ - INOUT = 651, /* INOUT */ - STRUCT = 652, /* STRUCT */ - VOID = 653, /* VOID */ - WHILE = 654, /* WHILE */ - BREAK = 655, /* BREAK */ - CONTINUE = 656, /* CONTINUE */ - DO = 657, /* DO */ - ELSE = 658, /* ELSE */ - FOR = 659, /* FOR */ - IF = 660, /* IF */ - DISCARD = 661, /* DISCARD */ - RETURN = 662, /* RETURN */ - SWITCH = 663, /* SWITCH */ - CASE = 664, /* CASE */ - DEFAULT = 665, /* DEFAULT */ - TERMINATE_INVOCATION = 666, /* TERMINATE_INVOCATION */ - TERMINATE_RAY = 667, /* TERMINATE_RAY */ - IGNORE_INTERSECTION = 668, /* IGNORE_INTERSECTION */ - UNIFORM = 669, /* UNIFORM */ - SHARED = 670, /* SHARED */ - BUFFER = 671, /* BUFFER */ - TILEIMAGEEXT = 672, /* TILEIMAGEEXT */ - FLAT = 673, /* FLAT */ - SMOOTH = 674, /* SMOOTH */ - LAYOUT = 675, /* LAYOUT */ - DOUBLECONSTANT = 676, /* DOUBLECONSTANT */ - INT16CONSTANT = 677, /* INT16CONSTANT */ - UINT16CONSTANT = 678, /* UINT16CONSTANT */ - FLOAT16CONSTANT = 679, /* FLOAT16CONSTANT */ - INT32CONSTANT = 680, /* INT32CONSTANT */ - UINT32CONSTANT = 681, /* UINT32CONSTANT */ - INT64CONSTANT = 682, /* INT64CONSTANT */ - UINT64CONSTANT = 683, /* UINT64CONSTANT */ - SUBROUTINE = 684, /* SUBROUTINE */ - DEMOTE = 685, /* DEMOTE */ - PAYLOADNV = 686, /* PAYLOADNV */ - PAYLOADINNV = 687, /* PAYLOADINNV */ - HITATTRNV = 688, /* HITATTRNV */ - CALLDATANV = 689, /* CALLDATANV */ - CALLDATAINNV = 690, /* CALLDATAINNV */ - PAYLOADEXT = 691, /* PAYLOADEXT */ - PAYLOADINEXT = 692, /* PAYLOADINEXT */ - HITATTREXT = 693, /* HITATTREXT */ - CALLDATAEXT = 694, /* CALLDATAEXT */ - CALLDATAINEXT = 695, /* CALLDATAINEXT */ - PATCH = 696, /* PATCH */ - SAMPLE = 697, /* SAMPLE */ - NONUNIFORM = 698, /* NONUNIFORM */ - COHERENT = 699, /* COHERENT */ - VOLATILE = 700, /* VOLATILE */ - RESTRICT = 701, /* RESTRICT */ - READONLY = 702, /* READONLY */ - WRITEONLY = 703, /* WRITEONLY */ - DEVICECOHERENT = 704, /* DEVICECOHERENT */ - QUEUEFAMILYCOHERENT = 705, /* QUEUEFAMILYCOHERENT */ - WORKGROUPCOHERENT = 706, /* WORKGROUPCOHERENT */ - SUBGROUPCOHERENT = 707, /* SUBGROUPCOHERENT */ - NONPRIVATE = 708, /* NONPRIVATE */ - SHADERCALLCOHERENT = 709, /* SHADERCALLCOHERENT */ - NOPERSPECTIVE = 710, /* NOPERSPECTIVE */ - EXPLICITINTERPAMD = 711, /* EXPLICITINTERPAMD */ - PERVERTEXEXT = 712, /* PERVERTEXEXT */ - PERVERTEXNV = 713, /* PERVERTEXNV */ - PERPRIMITIVENV = 714, /* PERPRIMITIVENV */ - PERVIEWNV = 715, /* PERVIEWNV */ - PERTASKNV = 716, /* PERTASKNV */ - PERPRIMITIVEEXT = 717, /* PERPRIMITIVEEXT */ - TASKPAYLOADWORKGROUPEXT = 718, /* TASKPAYLOADWORKGROUPEXT */ - PRECISE = 719 /* PRECISE */ + COOPVECNV = 422, /* COOPVECNV */ + HITOBJECTNV = 423, /* HITOBJECTNV */ + HITOBJECTATTRNV = 424, /* HITOBJECTATTRNV */ + TENSORLAYOUTNV = 425, /* TENSORLAYOUTNV */ + TENSORVIEWNV = 426, /* TENSORVIEWNV */ + SAMPLERCUBEARRAY = 427, /* SAMPLERCUBEARRAY */ + SAMPLERCUBEARRAYSHADOW = 428, /* SAMPLERCUBEARRAYSHADOW */ + ISAMPLERCUBEARRAY = 429, /* ISAMPLERCUBEARRAY */ + USAMPLERCUBEARRAY = 430, /* USAMPLERCUBEARRAY */ + SAMPLER1D = 431, /* SAMPLER1D */ + SAMPLER1DARRAY = 432, /* SAMPLER1DARRAY */ + SAMPLER1DARRAYSHADOW = 433, /* SAMPLER1DARRAYSHADOW */ + ISAMPLER1D = 434, /* ISAMPLER1D */ + SAMPLER1DSHADOW = 435, /* SAMPLER1DSHADOW */ + SAMPLER2DRECT = 436, /* SAMPLER2DRECT */ + SAMPLER2DRECTSHADOW = 437, /* SAMPLER2DRECTSHADOW */ + ISAMPLER2DRECT = 438, /* ISAMPLER2DRECT */ + USAMPLER2DRECT = 439, /* USAMPLER2DRECT */ + SAMPLERBUFFER = 440, /* SAMPLERBUFFER */ + ISAMPLERBUFFER = 441, /* ISAMPLERBUFFER */ + USAMPLERBUFFER = 442, /* USAMPLERBUFFER */ + SAMPLER2DMS = 443, /* SAMPLER2DMS */ + ISAMPLER2DMS = 444, /* ISAMPLER2DMS */ + USAMPLER2DMS = 445, /* USAMPLER2DMS */ + SAMPLER2DMSARRAY = 446, /* SAMPLER2DMSARRAY */ + ISAMPLER2DMSARRAY = 447, /* ISAMPLER2DMSARRAY */ + USAMPLER2DMSARRAY = 448, /* USAMPLER2DMSARRAY */ + SAMPLEREXTERNALOES = 449, /* SAMPLEREXTERNALOES */ + SAMPLEREXTERNAL2DY2YEXT = 450, /* SAMPLEREXTERNAL2DY2YEXT */ + ISAMPLER1DARRAY = 451, /* ISAMPLER1DARRAY */ + USAMPLER1D = 452, /* USAMPLER1D */ + USAMPLER1DARRAY = 453, /* USAMPLER1DARRAY */ + F16SAMPLER1D = 454, /* F16SAMPLER1D */ + F16SAMPLER2D = 455, /* F16SAMPLER2D */ + F16SAMPLER3D = 456, /* F16SAMPLER3D */ + F16SAMPLER2DRECT = 457, /* F16SAMPLER2DRECT */ + F16SAMPLERCUBE = 458, /* F16SAMPLERCUBE */ + F16SAMPLER1DARRAY = 459, /* F16SAMPLER1DARRAY */ + F16SAMPLER2DARRAY = 460, /* F16SAMPLER2DARRAY */ + F16SAMPLERCUBEARRAY = 461, /* F16SAMPLERCUBEARRAY */ + F16SAMPLERBUFFER = 462, /* F16SAMPLERBUFFER */ + F16SAMPLER2DMS = 463, /* F16SAMPLER2DMS */ + F16SAMPLER2DMSARRAY = 464, /* F16SAMPLER2DMSARRAY */ + F16SAMPLER1DSHADOW = 465, /* F16SAMPLER1DSHADOW */ + F16SAMPLER2DSHADOW = 466, /* F16SAMPLER2DSHADOW */ + F16SAMPLER1DARRAYSHADOW = 467, /* F16SAMPLER1DARRAYSHADOW */ + F16SAMPLER2DARRAYSHADOW = 468, /* F16SAMPLER2DARRAYSHADOW */ + F16SAMPLER2DRECTSHADOW = 469, /* F16SAMPLER2DRECTSHADOW */ + F16SAMPLERCUBESHADOW = 470, /* F16SAMPLERCUBESHADOW */ + F16SAMPLERCUBEARRAYSHADOW = 471, /* F16SAMPLERCUBEARRAYSHADOW */ + IMAGE1D = 472, /* IMAGE1D */ + IIMAGE1D = 473, /* IIMAGE1D */ + UIMAGE1D = 474, /* UIMAGE1D */ + IMAGE2D = 475, /* IMAGE2D */ + IIMAGE2D = 476, /* IIMAGE2D */ + UIMAGE2D = 477, /* UIMAGE2D */ + IMAGE3D = 478, /* IMAGE3D */ + IIMAGE3D = 479, /* IIMAGE3D */ + UIMAGE3D = 480, /* UIMAGE3D */ + IMAGE2DRECT = 481, /* IMAGE2DRECT */ + IIMAGE2DRECT = 482, /* IIMAGE2DRECT */ + UIMAGE2DRECT = 483, /* UIMAGE2DRECT */ + IMAGECUBE = 484, /* IMAGECUBE */ + IIMAGECUBE = 485, /* IIMAGECUBE */ + UIMAGECUBE = 486, /* UIMAGECUBE */ + IMAGEBUFFER = 487, /* IMAGEBUFFER */ + IIMAGEBUFFER = 488, /* IIMAGEBUFFER */ + UIMAGEBUFFER = 489, /* UIMAGEBUFFER */ + IMAGE1DARRAY = 490, /* IMAGE1DARRAY */ + IIMAGE1DARRAY = 491, /* IIMAGE1DARRAY */ + UIMAGE1DARRAY = 492, /* UIMAGE1DARRAY */ + IMAGE2DARRAY = 493, /* IMAGE2DARRAY */ + IIMAGE2DARRAY = 494, /* IIMAGE2DARRAY */ + UIMAGE2DARRAY = 495, /* UIMAGE2DARRAY */ + IMAGECUBEARRAY = 496, /* IMAGECUBEARRAY */ + IIMAGECUBEARRAY = 497, /* IIMAGECUBEARRAY */ + UIMAGECUBEARRAY = 498, /* UIMAGECUBEARRAY */ + IMAGE2DMS = 499, /* IMAGE2DMS */ + IIMAGE2DMS = 500, /* IIMAGE2DMS */ + UIMAGE2DMS = 501, /* UIMAGE2DMS */ + IMAGE2DMSARRAY = 502, /* IMAGE2DMSARRAY */ + IIMAGE2DMSARRAY = 503, /* IIMAGE2DMSARRAY */ + UIMAGE2DMSARRAY = 504, /* UIMAGE2DMSARRAY */ + F16IMAGE1D = 505, /* F16IMAGE1D */ + F16IMAGE2D = 506, /* F16IMAGE2D */ + F16IMAGE3D = 507, /* F16IMAGE3D */ + F16IMAGE2DRECT = 508, /* F16IMAGE2DRECT */ + F16IMAGECUBE = 509, /* F16IMAGECUBE */ + F16IMAGE1DARRAY = 510, /* F16IMAGE1DARRAY */ + F16IMAGE2DARRAY = 511, /* F16IMAGE2DARRAY */ + F16IMAGECUBEARRAY = 512, /* F16IMAGECUBEARRAY */ + F16IMAGEBUFFER = 513, /* F16IMAGEBUFFER */ + F16IMAGE2DMS = 514, /* F16IMAGE2DMS */ + F16IMAGE2DMSARRAY = 515, /* F16IMAGE2DMSARRAY */ + I64IMAGE1D = 516, /* I64IMAGE1D */ + U64IMAGE1D = 517, /* U64IMAGE1D */ + I64IMAGE2D = 518, /* I64IMAGE2D */ + U64IMAGE2D = 519, /* U64IMAGE2D */ + I64IMAGE3D = 520, /* I64IMAGE3D */ + U64IMAGE3D = 521, /* U64IMAGE3D */ + I64IMAGE2DRECT = 522, /* I64IMAGE2DRECT */ + U64IMAGE2DRECT = 523, /* U64IMAGE2DRECT */ + I64IMAGECUBE = 524, /* I64IMAGECUBE */ + U64IMAGECUBE = 525, /* U64IMAGECUBE */ + I64IMAGEBUFFER = 526, /* I64IMAGEBUFFER */ + U64IMAGEBUFFER = 527, /* U64IMAGEBUFFER */ + I64IMAGE1DARRAY = 528, /* I64IMAGE1DARRAY */ + U64IMAGE1DARRAY = 529, /* U64IMAGE1DARRAY */ + I64IMAGE2DARRAY = 530, /* I64IMAGE2DARRAY */ + U64IMAGE2DARRAY = 531, /* U64IMAGE2DARRAY */ + I64IMAGECUBEARRAY = 532, /* I64IMAGECUBEARRAY */ + U64IMAGECUBEARRAY = 533, /* U64IMAGECUBEARRAY */ + I64IMAGE2DMS = 534, /* I64IMAGE2DMS */ + U64IMAGE2DMS = 535, /* U64IMAGE2DMS */ + I64IMAGE2DMSARRAY = 536, /* I64IMAGE2DMSARRAY */ + U64IMAGE2DMSARRAY = 537, /* U64IMAGE2DMSARRAY */ + TEXTURECUBEARRAY = 538, /* TEXTURECUBEARRAY */ + ITEXTURECUBEARRAY = 539, /* ITEXTURECUBEARRAY */ + UTEXTURECUBEARRAY = 540, /* UTEXTURECUBEARRAY */ + TEXTURE1D = 541, /* TEXTURE1D */ + ITEXTURE1D = 542, /* ITEXTURE1D */ + UTEXTURE1D = 543, /* UTEXTURE1D */ + TEXTURE1DARRAY = 544, /* TEXTURE1DARRAY */ + ITEXTURE1DARRAY = 545, /* ITEXTURE1DARRAY */ + UTEXTURE1DARRAY = 546, /* UTEXTURE1DARRAY */ + TEXTURE2DRECT = 547, /* TEXTURE2DRECT */ + ITEXTURE2DRECT = 548, /* ITEXTURE2DRECT */ + UTEXTURE2DRECT = 549, /* UTEXTURE2DRECT */ + TEXTUREBUFFER = 550, /* TEXTUREBUFFER */ + ITEXTUREBUFFER = 551, /* ITEXTUREBUFFER */ + UTEXTUREBUFFER = 552, /* UTEXTUREBUFFER */ + TEXTURE2DMS = 553, /* TEXTURE2DMS */ + ITEXTURE2DMS = 554, /* ITEXTURE2DMS */ + UTEXTURE2DMS = 555, /* UTEXTURE2DMS */ + TEXTURE2DMSARRAY = 556, /* TEXTURE2DMSARRAY */ + ITEXTURE2DMSARRAY = 557, /* ITEXTURE2DMSARRAY */ + UTEXTURE2DMSARRAY = 558, /* UTEXTURE2DMSARRAY */ + F16TEXTURE1D = 559, /* F16TEXTURE1D */ + F16TEXTURE2D = 560, /* F16TEXTURE2D */ + F16TEXTURE3D = 561, /* F16TEXTURE3D */ + F16TEXTURE2DRECT = 562, /* F16TEXTURE2DRECT */ + F16TEXTURECUBE = 563, /* F16TEXTURECUBE */ + F16TEXTURE1DARRAY = 564, /* F16TEXTURE1DARRAY */ + F16TEXTURE2DARRAY = 565, /* F16TEXTURE2DARRAY */ + F16TEXTURECUBEARRAY = 566, /* F16TEXTURECUBEARRAY */ + F16TEXTUREBUFFER = 567, /* F16TEXTUREBUFFER */ + F16TEXTURE2DMS = 568, /* F16TEXTURE2DMS */ + F16TEXTURE2DMSARRAY = 569, /* F16TEXTURE2DMSARRAY */ + SUBPASSINPUT = 570, /* SUBPASSINPUT */ + SUBPASSINPUTMS = 571, /* SUBPASSINPUTMS */ + ISUBPASSINPUT = 572, /* ISUBPASSINPUT */ + ISUBPASSINPUTMS = 573, /* ISUBPASSINPUTMS */ + USUBPASSINPUT = 574, /* USUBPASSINPUT */ + USUBPASSINPUTMS = 575, /* USUBPASSINPUTMS */ + F16SUBPASSINPUT = 576, /* F16SUBPASSINPUT */ + F16SUBPASSINPUTMS = 577, /* F16SUBPASSINPUTMS */ + SPIRV_INSTRUCTION = 578, /* SPIRV_INSTRUCTION */ + SPIRV_EXECUTION_MODE = 579, /* SPIRV_EXECUTION_MODE */ + SPIRV_EXECUTION_MODE_ID = 580, /* SPIRV_EXECUTION_MODE_ID */ + SPIRV_DECORATE = 581, /* SPIRV_DECORATE */ + SPIRV_DECORATE_ID = 582, /* SPIRV_DECORATE_ID */ + SPIRV_DECORATE_STRING = 583, /* SPIRV_DECORATE_STRING */ + SPIRV_TYPE = 584, /* SPIRV_TYPE */ + SPIRV_STORAGE_CLASS = 585, /* SPIRV_STORAGE_CLASS */ + SPIRV_BY_REFERENCE = 586, /* SPIRV_BY_REFERENCE */ + SPIRV_LITERAL = 587, /* SPIRV_LITERAL */ + ATTACHMENTEXT = 588, /* ATTACHMENTEXT */ + IATTACHMENTEXT = 589, /* IATTACHMENTEXT */ + UATTACHMENTEXT = 590, /* UATTACHMENTEXT */ + LEFT_OP = 591, /* LEFT_OP */ + RIGHT_OP = 592, /* RIGHT_OP */ + INC_OP = 593, /* INC_OP */ + DEC_OP = 594, /* DEC_OP */ + LE_OP = 595, /* LE_OP */ + GE_OP = 596, /* GE_OP */ + EQ_OP = 597, /* EQ_OP */ + NE_OP = 598, /* NE_OP */ + AND_OP = 599, /* AND_OP */ + OR_OP = 600, /* OR_OP */ + XOR_OP = 601, /* XOR_OP */ + MUL_ASSIGN = 602, /* MUL_ASSIGN */ + DIV_ASSIGN = 603, /* DIV_ASSIGN */ + ADD_ASSIGN = 604, /* ADD_ASSIGN */ + MOD_ASSIGN = 605, /* MOD_ASSIGN */ + LEFT_ASSIGN = 606, /* LEFT_ASSIGN */ + RIGHT_ASSIGN = 607, /* RIGHT_ASSIGN */ + AND_ASSIGN = 608, /* AND_ASSIGN */ + XOR_ASSIGN = 609, /* XOR_ASSIGN */ + OR_ASSIGN = 610, /* OR_ASSIGN */ + SUB_ASSIGN = 611, /* SUB_ASSIGN */ + STRING_LITERAL = 612, /* STRING_LITERAL */ + LEFT_PAREN = 613, /* LEFT_PAREN */ + RIGHT_PAREN = 614, /* RIGHT_PAREN */ + LEFT_BRACKET = 615, /* LEFT_BRACKET */ + RIGHT_BRACKET = 616, /* RIGHT_BRACKET */ + LEFT_BRACE = 617, /* LEFT_BRACE */ + RIGHT_BRACE = 618, /* RIGHT_BRACE */ + DOT = 619, /* DOT */ + COMMA = 620, /* COMMA */ + COLON = 621, /* COLON */ + EQUAL = 622, /* EQUAL */ + SEMICOLON = 623, /* SEMICOLON */ + BANG = 624, /* BANG */ + DASH = 625, /* DASH */ + TILDE = 626, /* TILDE */ + PLUS = 627, /* PLUS */ + STAR = 628, /* STAR */ + SLASH = 629, /* SLASH */ + PERCENT = 630, /* PERCENT */ + LEFT_ANGLE = 631, /* LEFT_ANGLE */ + RIGHT_ANGLE = 632, /* RIGHT_ANGLE */ + VERTICAL_BAR = 633, /* VERTICAL_BAR */ + CARET = 634, /* CARET */ + AMPERSAND = 635, /* AMPERSAND */ + QUESTION = 636, /* QUESTION */ + INVARIANT = 637, /* INVARIANT */ + HIGH_PRECISION = 638, /* HIGH_PRECISION */ + MEDIUM_PRECISION = 639, /* MEDIUM_PRECISION */ + LOW_PRECISION = 640, /* LOW_PRECISION */ + PRECISION = 641, /* PRECISION */ + PACKED = 642, /* PACKED */ + RESOURCE = 643, /* RESOURCE */ + SUPERP = 644, /* SUPERP */ + FLOATCONSTANT = 645, /* FLOATCONSTANT */ + INTCONSTANT = 646, /* INTCONSTANT */ + UINTCONSTANT = 647, /* UINTCONSTANT */ + BOOLCONSTANT = 648, /* BOOLCONSTANT */ + IDENTIFIER = 649, /* IDENTIFIER */ + TYPE_NAME = 650, /* TYPE_NAME */ + CENTROID = 651, /* CENTROID */ + IN = 652, /* IN */ + OUT = 653, /* OUT */ + INOUT = 654, /* INOUT */ + STRUCT = 655, /* STRUCT */ + VOID = 656, /* VOID */ + WHILE = 657, /* WHILE */ + BREAK = 658, /* BREAK */ + CONTINUE = 659, /* CONTINUE */ + DO = 660, /* DO */ + ELSE = 661, /* ELSE */ + FOR = 662, /* FOR */ + IF = 663, /* IF */ + DISCARD = 664, /* DISCARD */ + RETURN = 665, /* RETURN */ + SWITCH = 666, /* SWITCH */ + CASE = 667, /* CASE */ + DEFAULT = 668, /* DEFAULT */ + TERMINATE_INVOCATION = 669, /* TERMINATE_INVOCATION */ + TERMINATE_RAY = 670, /* TERMINATE_RAY */ + IGNORE_INTERSECTION = 671, /* IGNORE_INTERSECTION */ + UNIFORM = 672, /* UNIFORM */ + SHARED = 673, /* SHARED */ + BUFFER = 674, /* BUFFER */ + TILEIMAGEEXT = 675, /* TILEIMAGEEXT */ + FLAT = 676, /* FLAT */ + SMOOTH = 677, /* SMOOTH */ + LAYOUT = 678, /* LAYOUT */ + DOUBLECONSTANT = 679, /* DOUBLECONSTANT */ + INT16CONSTANT = 680, /* INT16CONSTANT */ + UINT16CONSTANT = 681, /* UINT16CONSTANT */ + FLOAT16CONSTANT = 682, /* FLOAT16CONSTANT */ + INT32CONSTANT = 683, /* INT32CONSTANT */ + UINT32CONSTANT = 684, /* UINT32CONSTANT */ + INT64CONSTANT = 685, /* INT64CONSTANT */ + UINT64CONSTANT = 686, /* UINT64CONSTANT */ + SUBROUTINE = 687, /* SUBROUTINE */ + DEMOTE = 688, /* DEMOTE */ + FUNCTION = 689, /* FUNCTION */ + PAYLOADNV = 690, /* PAYLOADNV */ + PAYLOADINNV = 691, /* PAYLOADINNV */ + HITATTRNV = 692, /* HITATTRNV */ + CALLDATANV = 693, /* CALLDATANV */ + CALLDATAINNV = 694, /* CALLDATAINNV */ + PAYLOADEXT = 695, /* PAYLOADEXT */ + PAYLOADINEXT = 696, /* PAYLOADINEXT */ + HITATTREXT = 697, /* HITATTREXT */ + CALLDATAEXT = 698, /* CALLDATAEXT */ + CALLDATAINEXT = 699, /* CALLDATAINEXT */ + PATCH = 700, /* PATCH */ + SAMPLE = 701, /* SAMPLE */ + NONUNIFORM = 702, /* NONUNIFORM */ + COHERENT = 703, /* COHERENT */ + VOLATILE = 704, /* VOLATILE */ + RESTRICT = 705, /* RESTRICT */ + READONLY = 706, /* READONLY */ + WRITEONLY = 707, /* WRITEONLY */ + NONTEMPORAL = 708, /* NONTEMPORAL */ + DEVICECOHERENT = 709, /* DEVICECOHERENT */ + QUEUEFAMILYCOHERENT = 710, /* QUEUEFAMILYCOHERENT */ + WORKGROUPCOHERENT = 711, /* WORKGROUPCOHERENT */ + SUBGROUPCOHERENT = 712, /* SUBGROUPCOHERENT */ + NONPRIVATE = 713, /* NONPRIVATE */ + SHADERCALLCOHERENT = 714, /* SHADERCALLCOHERENT */ + NOPERSPECTIVE = 715, /* NOPERSPECTIVE */ + EXPLICITINTERPAMD = 716, /* EXPLICITINTERPAMD */ + PERVERTEXEXT = 717, /* PERVERTEXEXT */ + PERVERTEXNV = 718, /* PERVERTEXNV */ + PERPRIMITIVENV = 719, /* PERPRIMITIVENV */ + PERVIEWNV = 720, /* PERVIEWNV */ + PERTASKNV = 721, /* PERTASKNV */ + PERPRIMITIVEEXT = 722, /* PERPRIMITIVEEXT */ + TASKPAYLOADWORKGROUPEXT = 723, /* TASKPAYLOADWORKGROUPEXT */ + PRECISE = 724 /* PRECISE */ }; typedef enum yytokentype yytoken_kind_t; #endif @@ -563,7 +568,7 @@ union YYSTYPE glslang::TTypeParameters* typeParameters; } interm; -#line 567 "MachineIndependent/glslang_tab.cpp.h" +#line 572 "MachineIndependent/glslang_tab.cpp.h" }; typedef union YYSTYPE YYSTYPE; diff --git a/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/intermOut.cpp b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/intermOut.cpp index f0621bd9e..9415547d6 100644 --- a/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/intermOut.cpp +++ b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/intermOut.cpp @@ -204,6 +204,13 @@ bool TOutputTraverser::visitUnary(TVisit /* visit */, TIntermUnary* node) OutputTreeText(out, node, depth); + if (IsOpNumericConv(node->getAsOperator()->getOp())) { + out.debug << "Convert " << TType::getBasicString(node->getOperand()->getType().getBasicType()) << " to " << TType::getBasicString(node->getType().getBasicType()); + out.debug << " (" << node->getCompleteString() << ")"; + out.debug << "\n"; + return true; + } + switch (node->getOp()) { case EOpNegative: out.debug << "Negate value"; break; case EOpVectorLogicalNot: @@ -216,192 +223,6 @@ bool TOutputTraverser::visitUnary(TVisit /* visit */, TIntermUnary* node) case EOpPreDecrement: out.debug << "Pre-Decrement"; break; case EOpCopyObject: out.debug << "copy object"; break; - // * -> bool - case EOpConvInt8ToBool: out.debug << "Convert int8_t to bool"; break; - case EOpConvUint8ToBool: out.debug << "Convert uint8_t to bool"; break; - case EOpConvInt16ToBool: out.debug << "Convert int16_t to bool"; break; - case EOpConvUint16ToBool: out.debug << "Convert uint16_t to bool";break; - case EOpConvIntToBool: out.debug << "Convert int to bool"; break; - case EOpConvUintToBool: out.debug << "Convert uint to bool"; break; - case EOpConvInt64ToBool: out.debug << "Convert int64 to bool"; break; - case EOpConvUint64ToBool: out.debug << "Convert uint64 to bool"; break; - case EOpConvFloat16ToBool: out.debug << "Convert float16_t to bool"; break; - case EOpConvFloatToBool: out.debug << "Convert float to bool"; break; - case EOpConvDoubleToBool: out.debug << "Convert double to bool"; break; - - // bool -> * - case EOpConvBoolToInt8: out.debug << "Convert bool to int8_t"; break; - case EOpConvBoolToUint8: out.debug << "Convert bool to uint8_t"; break; - case EOpConvBoolToInt16: out.debug << "Convert bool to in16t_t"; break; - case EOpConvBoolToUint16: out.debug << "Convert bool to uint16_t";break; - case EOpConvBoolToInt: out.debug << "Convert bool to int" ; break; - case EOpConvBoolToUint: out.debug << "Convert bool to uint"; break; - case EOpConvBoolToInt64: out.debug << "Convert bool to int64"; break; - case EOpConvBoolToUint64: out.debug << "Convert bool to uint64";break; - case EOpConvBoolToFloat16: out.debug << "Convert bool to float16_t"; break; - case EOpConvBoolToFloat: out.debug << "Convert bool to float"; break; - case EOpConvBoolToDouble: out.debug << "Convert bool to double"; break; - - // int8_t -> (u)int* - case EOpConvInt8ToInt16: out.debug << "Convert int8_t to int16_t";break; - case EOpConvInt8ToInt: out.debug << "Convert int8_t to int"; break; - case EOpConvInt8ToInt64: out.debug << "Convert int8_t to int64"; break; - case EOpConvInt8ToUint8: out.debug << "Convert int8_t to uint8_t";break; - case EOpConvInt8ToUint16: out.debug << "Convert int8_t to uint16_t";break; - case EOpConvInt8ToUint: out.debug << "Convert int8_t to uint"; break; - case EOpConvInt8ToUint64: out.debug << "Convert int8_t to uint64"; break; - - // uint8_t -> (u)int* - case EOpConvUint8ToInt8: out.debug << "Convert uint8_t to int8_t";break; - case EOpConvUint8ToInt16: out.debug << "Convert uint8_t to int16_t";break; - case EOpConvUint8ToInt: out.debug << "Convert uint8_t to int"; break; - case EOpConvUint8ToInt64: out.debug << "Convert uint8_t to int64"; break; - case EOpConvUint8ToUint16: out.debug << "Convert uint8_t to uint16_t";break; - case EOpConvUint8ToUint: out.debug << "Convert uint8_t to uint"; break; - case EOpConvUint8ToUint64: out.debug << "Convert uint8_t to uint64"; break; - - // int8_t -> float* - case EOpConvInt8ToFloat16: out.debug << "Convert int8_t to float16_t";break; - case EOpConvInt8ToFloat: out.debug << "Convert int8_t to float"; break; - case EOpConvInt8ToDouble: out.debug << "Convert int8_t to double"; break; - - // uint8_t -> float* - case EOpConvUint8ToFloat16: out.debug << "Convert uint8_t to float16_t";break; - case EOpConvUint8ToFloat: out.debug << "Convert uint8_t to float"; break; - case EOpConvUint8ToDouble: out.debug << "Convert uint8_t to double"; break; - - // int16_t -> (u)int* - case EOpConvInt16ToInt8: out.debug << "Convert int16_t to int8_t";break; - case EOpConvInt16ToInt: out.debug << "Convert int16_t to int"; break; - case EOpConvInt16ToInt64: out.debug << "Convert int16_t to int64"; break; - case EOpConvInt16ToUint8: out.debug << "Convert int16_t to uint8_t";break; - case EOpConvInt16ToUint16: out.debug << "Convert int16_t to uint16_t";break; - case EOpConvInt16ToUint: out.debug << "Convert int16_t to uint"; break; - case EOpConvInt16ToUint64: out.debug << "Convert int16_t to uint64"; break; - - // int16_t -> float* - case EOpConvInt16ToFloat16: out.debug << "Convert int16_t to float16_t";break; - case EOpConvInt16ToFloat: out.debug << "Convert int16_t to float"; break; - case EOpConvInt16ToDouble: out.debug << "Convert int16_t to double"; break; - - // uint16_t -> (u)int* - case EOpConvUint16ToInt8: out.debug << "Convert uint16_t to int8_t";break; - case EOpConvUint16ToInt16: out.debug << "Convert uint16_t to int16_t";break; - case EOpConvUint16ToInt: out.debug << "Convert uint16_t to int"; break; - case EOpConvUint16ToInt64: out.debug << "Convert uint16_t to int64"; break; - case EOpConvUint16ToUint8: out.debug << "Convert uint16_t to uint8_t";break; - case EOpConvUint16ToUint: out.debug << "Convert uint16_t to uint"; break; - case EOpConvUint16ToUint64: out.debug << "Convert uint16_t to uint64"; break; - - // uint16_t -> float* - case EOpConvUint16ToFloat16: out.debug << "Convert uint16_t to float16_t";break; - case EOpConvUint16ToFloat: out.debug << "Convert uint16_t to float"; break; - case EOpConvUint16ToDouble: out.debug << "Convert uint16_t to double"; break; - - // int32_t -> (u)int* - case EOpConvIntToInt8: out.debug << "Convert int to int8_t";break; - case EOpConvIntToInt16: out.debug << "Convert int to int16_t";break; - case EOpConvIntToInt64: out.debug << "Convert int to int64"; break; - case EOpConvIntToUint8: out.debug << "Convert int to uint8_t";break; - case EOpConvIntToUint16: out.debug << "Convert int to uint16_t";break; - case EOpConvIntToUint: out.debug << "Convert int to uint"; break; - case EOpConvIntToUint64: out.debug << "Convert int to uint64"; break; - - // int32_t -> float* - case EOpConvIntToFloat16: out.debug << "Convert int to float16_t";break; - case EOpConvIntToFloat: out.debug << "Convert int to float"; break; - case EOpConvIntToDouble: out.debug << "Convert int to double"; break; - - // uint32_t -> (u)int* - case EOpConvUintToInt8: out.debug << "Convert uint to int8_t";break; - case EOpConvUintToInt16: out.debug << "Convert uint to int16_t";break; - case EOpConvUintToInt: out.debug << "Convert uint to int";break; - case EOpConvUintToInt64: out.debug << "Convert uint to int64"; break; - case EOpConvUintToUint8: out.debug << "Convert uint to uint8_t";break; - case EOpConvUintToUint16: out.debug << "Convert uint to uint16_t";break; - case EOpConvUintToUint64: out.debug << "Convert uint to uint64"; break; - - // uint32_t -> float* - case EOpConvUintToFloat16: out.debug << "Convert uint to float16_t";break; - case EOpConvUintToFloat: out.debug << "Convert uint to float"; break; - case EOpConvUintToDouble: out.debug << "Convert uint to double"; break; - - // int64 -> (u)int* - case EOpConvInt64ToInt8: out.debug << "Convert int64 to int8_t"; break; - case EOpConvInt64ToInt16: out.debug << "Convert int64 to int16_t"; break; - case EOpConvInt64ToInt: out.debug << "Convert int64 to int"; break; - case EOpConvInt64ToUint8: out.debug << "Convert int64 to uint8_t";break; - case EOpConvInt64ToUint16: out.debug << "Convert int64 to uint16_t";break; - case EOpConvInt64ToUint: out.debug << "Convert int64 to uint"; break; - case EOpConvInt64ToUint64: out.debug << "Convert int64 to uint64"; break; - - // int64 -> float* - case EOpConvInt64ToFloat16: out.debug << "Convert int64 to float16_t";break; - case EOpConvInt64ToFloat: out.debug << "Convert int64 to float"; break; - case EOpConvInt64ToDouble: out.debug << "Convert int64 to double"; break; - - // uint64 -> (u)int* - case EOpConvUint64ToInt8: out.debug << "Convert uint64 to int8_t";break; - case EOpConvUint64ToInt16: out.debug << "Convert uint64 to int16_t";break; - case EOpConvUint64ToInt: out.debug << "Convert uint64 to int"; break; - case EOpConvUint64ToInt64: out.debug << "Convert uint64 to int64"; break; - case EOpConvUint64ToUint8: out.debug << "Convert uint64 to uint8_t";break; - case EOpConvUint64ToUint16: out.debug << "Convert uint64 to uint16"; break; - case EOpConvUint64ToUint: out.debug << "Convert uint64 to uint"; break; - - // uint64 -> float* - case EOpConvUint64ToFloat16: out.debug << "Convert uint64 to float16_t";break; - case EOpConvUint64ToFloat: out.debug << "Convert uint64 to float"; break; - case EOpConvUint64ToDouble: out.debug << "Convert uint64 to double"; break; - - // float16_t -> int* - case EOpConvFloat16ToInt8: out.debug << "Convert float16_t to int8_t"; break; - case EOpConvFloat16ToInt16: out.debug << "Convert float16_t to int16_t"; break; - case EOpConvFloat16ToInt: out.debug << "Convert float16_t to int"; break; - case EOpConvFloat16ToInt64: out.debug << "Convert float16_t to int64"; break; - - // float16_t -> uint* - case EOpConvFloat16ToUint8: out.debug << "Convert float16_t to uint8_t"; break; - case EOpConvFloat16ToUint16: out.debug << "Convert float16_t to uint16_t"; break; - case EOpConvFloat16ToUint: out.debug << "Convert float16_t to uint"; break; - case EOpConvFloat16ToUint64: out.debug << "Convert float16_t to uint64"; break; - - // float16_t -> float* - case EOpConvFloat16ToFloat: out.debug << "Convert float16_t to float"; break; - case EOpConvFloat16ToDouble: out.debug << "Convert float16_t to double"; break; - - // float32 -> float* - case EOpConvFloatToFloat16: out.debug << "Convert float to float16_t"; break; - case EOpConvFloatToDouble: out.debug << "Convert float to double"; break; - - // float32_t -> int* - case EOpConvFloatToInt8: out.debug << "Convert float to int8_t"; break; - case EOpConvFloatToInt16: out.debug << "Convert float to int16_t"; break; - case EOpConvFloatToInt: out.debug << "Convert float to int"; break; - case EOpConvFloatToInt64: out.debug << "Convert float to int64"; break; - - // float32_t -> uint* - case EOpConvFloatToUint8: out.debug << "Convert float to uint8_t"; break; - case EOpConvFloatToUint16: out.debug << "Convert float to uint16_t"; break; - case EOpConvFloatToUint: out.debug << "Convert float to uint"; break; - case EOpConvFloatToUint64: out.debug << "Convert float to uint64"; break; - - // double -> float* - case EOpConvDoubleToFloat16: out.debug << "Convert double to float16_t"; break; - case EOpConvDoubleToFloat: out.debug << "Convert double to float"; break; - - // double -> int* - case EOpConvDoubleToInt8: out.debug << "Convert double to int8_t"; break; - case EOpConvDoubleToInt16: out.debug << "Convert double to int16_t"; break; - case EOpConvDoubleToInt: out.debug << "Convert double to int"; break; - case EOpConvDoubleToInt64: out.debug << "Convert double to int64"; break; - - // float32_t -> uint* - case EOpConvDoubleToUint8: out.debug << "Convert double to uint8_t"; break; - case EOpConvDoubleToUint16: out.debug << "Convert double to uint16_t"; break; - case EOpConvDoubleToUint: out.debug << "Convert double to uint"; break; - case EOpConvDoubleToUint64: out.debug << "Convert double to uint64"; break; - case EOpConvUint64ToPtr: out.debug << "Convert uint64_t to pointer"; break; case EOpConvPtrToUint64: out.debug << "Convert pointer to uint64_t"; break; @@ -673,6 +494,17 @@ bool TOutputTraverser::visitUnary(TVisit /* visit */, TIntermUnary* node) case EOpSpirvInst: out.debug << "spirv_instruction"; break; + case EOpCreateTensorLayoutNV: out.debug << "createTensorLayoutNV"; break; + case EOpTensorLayoutSetBlockSizeNV: out.debug << "setTensorLayoutBlockSizeNV"; break; + case EOpTensorLayoutSetDimensionNV: out.debug << "setTensorLayoutDimensionNV"; break; + case EOpTensorLayoutSetStrideNV: out.debug << "setTensorLayoutStrideNV"; break; + case EOpTensorLayoutSliceNV: out.debug << "sliceTensorLayoutNV"; break; + case EOpTensorLayoutSetClampValueNV: out.debug << "setTensorLayoutClampValueNV"; break; + case EOpCreateTensorViewNV: out.debug << "createTensorViewNV"; break; + case EOpTensorViewSetDimensionNV: out.debug << "setTensorViewDimensionsNV"; break; + case EOpTensorViewSetStrideNV: out.debug << "setTensorViewStrideNV"; break; + case EOpTensorViewSetClipNV: out.debug << "setTensorViewClipNV"; break; + default: out.debug.message(EPrefixError, "Bad unary op"); } @@ -811,6 +643,7 @@ bool TOutputTraverser::visitAggregate(TVisit /* visit */, TIntermAggregate* node case EOpConstructReference: out.debug << "Construct reference"; break; case EOpConstructCooperativeMatrixNV: out.debug << "Construct cooperative matrix NV"; break; case EOpConstructCooperativeMatrixKHR: out.debug << "Construct cooperative matrix KHR"; break; + case EOpConstructCooperativeVectorNV: out.debug << "Construct cooperative vector NV"; break; case EOpConstructAccStruct: out.debug << "Construct acceleration structure"; break; case EOpLessThan: out.debug << "Compare Less Than"; break; @@ -835,6 +668,9 @@ bool TOutputTraverser::visitAggregate(TVisit /* visit */, TIntermAggregate* node case EOpDistance: out.debug << "distance"; break; case EOpDot: out.debug << "dot-product"; break; + case EOpDotPackedEXT: out.debug << "dot-product-packed";break; + case EOpDotAccSatEXT: out.debug << "dot-product-accumulate-saturate";break; + case EOpDotPackedAccSatEXT: out.debug << "dot-product-packed-accumulate-saturate";break; case EOpCross: out.debug << "cross-product"; break; case EOpFaceForward: out.debug << "face-forward"; break; case EOpReflect: out.debug << "reflect"; break; @@ -1107,13 +943,33 @@ bool TOutputTraverser::visitAggregate(TVisit /* visit */, TIntermAggregate* node case EOpRayQueryGetIntersectionObjectToWorld: out.debug << "rayQueryGetIntersectionObjectToWorldEXT"; break; case EOpRayQueryGetIntersectionWorldToObject: out.debug << "rayQueryGetIntersectionWorldToObjectEXT"; break; case EOpRayQueryGetIntersectionTriangleVertexPositionsEXT: out.debug << "rayQueryGetIntersectionTriangleVertexPositionsEXT"; break; + case EOpRayQueryGetIntersectionClusterIdNV: out.debug << "rayQueryGetIntersectionClusterIdNV"; break; + case EOpRayQueryGetIntersectionSpherePositionNV: out.debug << "rayQueryGetIntersectionSpherePositionNV"; break; + case EOpRayQueryGetIntersectionSphereRadiusNV: out.debug << "rayQueryGetIntersectionSphereRadiusNV"; break; + case EOpRayQueryGetIntersectionLSSHitValueNV: out.debug << "rayQueryGetIntersectionLSSHitValueNV"; break; + case EOpRayQueryGetIntersectionLSSPositionsNV: out.debug << "rayQueryGetIntersectionLSSPositionsNV"; break; + case EOpRayQueryGetIntersectionLSSRadiiNV: out.debug << "rayQueryGetIntersectionLSSRadiiNV"; break; + case EOpRayQueryIsSphereHitNV: out.debug << "rayQueryIsSphereHitNV"; break; + case EOpRayQueryIsLSSHitNV: out.debug << "rayQueryIsLSSHitNV"; break; case EOpCooperativeMatrixLoad: out.debug << "Load cooperative matrix KHR"; break; case EOpCooperativeMatrixStore: out.debug << "Store cooperative matrix KHR"; break; case EOpCooperativeMatrixMulAdd: out.debug << "MulAdd cooperative matrices KHR"; break; case EOpCooperativeMatrixLoadNV: out.debug << "Load cooperative matrix NV"; break; case EOpCooperativeMatrixStoreNV: out.debug << "Store cooperative matrix NV"; break; + case EOpCooperativeMatrixLoadTensorNV: out.debug << "Load cooperative matrix tensor NV"; break; + case EOpCooperativeMatrixStoreTensorNV: out.debug << "Store cooperative matrix tensor NV"; break; case EOpCooperativeMatrixMulAddNV: out.debug << "MulAdd cooperative matrices NV"; break; + case EOpCooperativeMatrixReduceNV: out.debug << "Reduce cooperative matrices"; break; + case EOpCooperativeMatrixPerElementOpNV: out.debug << "cooperative matrix per element op"; break; + case EOpCooperativeMatrixTransposeNV: out.debug << "Transpose cooperative matrix"; break; + + case EOpCooperativeVectorMatMulNV: out.debug << "Cooperative vector matrix multiply NV"; break; + case EOpCooperativeVectorMatMulAddNV: out.debug << "Cooperative vector matrix multiply add NV"; break; + case EOpCooperativeVectorLoadNV: out.debug << "Load cooperative vector NV"; break; + case EOpCooperativeVectorStoreNV: out.debug << "Store cooperative vector NV"; break; + case EOpCooperativeVectorOuterProductAccumulateNV: out.debug << "Cooperative vector outer product accumulate NV"; break; + case EOpCooperativeVectorReduceSumAccumulateNV: out.debug << "Cooperative vector reduce sum accumulate NV"; break; case EOpIsHelperInvocation: out.debug << "IsHelperInvocation"; break; case EOpDebugPrintf: out.debug << "Debug printf"; break; @@ -1148,14 +1004,32 @@ bool TOutputTraverser::visitAggregate(TVisit /* visit */, TIntermAggregate* node case EOpHitObjectGetCurrentTimeNV: out.debug << "HitObjectGetCurrentTimeNV"; break; case EOpHitObjectGetShaderBindingTableRecordIndexNV: out.debug << "HitObjectGetShaderBindingTableRecordIndexNV"; break; case EOpHitObjectGetShaderRecordBufferHandleNV: out.debug << "HitObjectReadShaderRecordBufferHandleNV"; break; + case EOpHitObjectGetClusterIdNV: out.debug << "HitObjectGetClusterIdNV"; break; case EOpReorderThreadNV: out.debug << "ReorderThreadNV"; break; case EOpFetchMicroTriangleVertexPositionNV: out.debug << "MicroTriangleVertexPositionNV"; break; case EOpFetchMicroTriangleVertexBarycentricNV: out.debug << "MicroTriangleVertexBarycentricNV"; break; + case EOpHitObjectGetSpherePositionNV: out.debug << "HitObjectGetSpherePositionNV"; break; + case EOpHitObjectGetSphereRadiusNV: out.debug << "HitObjectGetSphereRadiusNV"; break; + case EOpHitObjectGetLSSPositionsNV: out.debug << "HitObjectGetLSSPositionsNV"; break; + case EOpHitObjectGetLSSRadiiNV: out.debug << "HitObjectGetLSSRadiiNV"; break; + case EOpHitObjectIsSphereHitNV: out.debug << "HitObjectIsSphereHitNV"; break; + case EOpHitObjectIsLSSHitNV: out.debug << "HitObjectIsLSSHitNV"; break; case EOpSpirvInst: out.debug << "spirv_instruction"; break; case EOpStencilAttachmentReadEXT: out.debug << "stencilAttachmentReadEXT"; break; case EOpDepthAttachmentReadEXT: out.debug << "depthAttachmentReadEXT"; break; + case EOpCreateTensorLayoutNV: out.debug << "createTensorLayout"; break; + case EOpTensorLayoutSetBlockSizeNV: out.debug << "setBlockSize"; break; + case EOpTensorLayoutSetDimensionNV: out.debug << "setDimension"; break; + case EOpTensorLayoutSetStrideNV: out.debug << "setStride"; break; + case EOpTensorLayoutSliceNV: out.debug << "slice"; break; + case EOpTensorLayoutSetClampValueNV: out.debug << "setClampValue"; break; + case EOpCreateTensorViewNV: out.debug << "createTensorView"; break; + case EOpTensorViewSetDimensionNV: out.debug << "setTensorViewDimensions"; break; + case EOpTensorViewSetStrideNV: out.debug << "setTensorViewStride"; break; + case EOpTensorViewSetClipNV: out.debug << "clipTensorView"; break; + default: out.debug.message(EPrefixError, "Bad aggregation op"); } diff --git a/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/iomapper.cpp b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/iomapper.cpp index 5e94a9e8d..26c3eaa62 100644 --- a/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/iomapper.cpp +++ b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/iomapper.cpp @@ -39,6 +39,7 @@ #include "gl_types.h" #include "iomapper.h" +#include "LiveTraverser.h" #include "SymbolTable.h" // @@ -60,6 +61,108 @@ namespace glslang { +struct TVarEntryInfo { + long long id; + TIntermSymbol* symbol; + bool live; + TLayoutPacking upgradedToPushConstantPacking; // ElpNone means it hasn't been upgraded + int newBinding; + int newSet; + int newLocation; + int newComponent; + int newIndex; + EShLanguage stage; + + void clearNewAssignments() { + upgradedToPushConstantPacking = ElpNone; + newBinding = -1; + newSet = -1; + newLocation = -1; + newComponent = -1; + newIndex = -1; + } + + struct TOrderById { + inline bool operator()(const TVarEntryInfo& l, const TVarEntryInfo& r) { return l.id < r.id; } + }; + + struct TOrderByPriority { + // ordering: + // 1) has both binding and set + // 2) has binding but no set + // 3) has no binding but set + // 4) has no binding and no set + inline bool operator()(const TVarEntryInfo& l, const TVarEntryInfo& r) { + const TQualifier& lq = l.symbol->getQualifier(); + const TQualifier& rq = r.symbol->getQualifier(); + + // simple rules: + // has binding gives 2 points + // has set gives 1 point + // who has the most points is more important. + int lPoints = (lq.hasBinding() ? 2 : 0) + (lq.hasSet() ? 1 : 0); + int rPoints = (rq.hasBinding() ? 2 : 0) + (rq.hasSet() ? 1 : 0); + + if (lPoints == rPoints) + return l.id < r.id; + return lPoints > rPoints; + } + }; + + struct TOrderByPriorityAndLive { + // ordering: + // 1) do live variables first + // 2) has both binding and set + // 3) has binding but no set + // 4) has no binding but set + // 5) has no binding and no set + inline bool operator()(const TVarEntryInfo& l, const TVarEntryInfo& r) { + + const TQualifier& lq = l.symbol->getQualifier(); + const TQualifier& rq = r.symbol->getQualifier(); + + // simple rules: + // has binding gives 2 points + // has set gives 1 point + // who has the most points is more important. + int lPoints = (lq.hasBinding() ? 2 : 0) + (lq.hasSet() ? 1 : 0); + int rPoints = (rq.hasBinding() ? 2 : 0) + (rq.hasSet() ? 1 : 0); + + if (l.live != r.live) + return l.live > r.live; + + if (lPoints != rPoints) + return lPoints > rPoints; + + return l.id < r.id; + } + }; +}; + +// override function "operator=", if a vector being sort, +// when use vc++, the sort function will call : +// pair& operator=(const pair<_Other1, _Other2>& _Right) +// { +// first = _Right.first; +// second = _Right.second; +// return (*this); +// } +// that will make a const type handing on left. +// override this function can avoid a compiler error. +// In the future, if the vc++ compiler can handle such a situation, +// this part of the code will be removed. +struct TVarLivePair : std::pair { + TVarLivePair(const std::pair& _Right) : pair(_Right.first, _Right.second) {} + TVarLivePair& operator=(const TVarLivePair& _Right) { + const_cast(first) = _Right.first; + second = _Right.second; + return (*this); + } + TVarLivePair(const TVarLivePair& src) : pair(src) { } +}; +typedef std::vector TVarLiveVector; + + class TVarGatherTraverser : public TLiveTraverser { public: TVarGatherTraverser(const TIntermediate& i, bool traverseDeadCode, TVarLiveMap& inList, TVarLiveMap& outList, TVarLiveMap& uniformList) @@ -143,8 +246,11 @@ public: base->getWritableType().getQualifier().layoutComponent = at->second.newComponent; if (at->second.newIndex != -1) base->getWritableType().getQualifier().layoutIndex = at->second.newIndex; - if (at->second.upgradedToPushConstant) + if (at->second.upgradedToPushConstantPacking != ElpNone) { base->getWritableType().getQualifier().layoutPushConstant = true; + base->getWritableType().getQualifier().setBlockStorage(EbsPushConstant); + base->getWritableType().getQualifier().layoutPacking = at->second.upgradedToPushConstantPacking; + } } private: @@ -176,7 +282,7 @@ struct TNotifyInOutAdaptor { EShLanguage stage; TIoMapResolver& resolver; - inline TNotifyInOutAdaptor(EShLanguage s, TIoMapResolver& r) + inline TNotifyInOutAdaptor(EShLanguage s, TIoMapResolver& r) : stage(s) , resolver(r) { @@ -1497,6 +1603,36 @@ bool TIoMapper::addStage(EShLanguage stage, TIntermediate& intermediate, TInfoSi return !hadError; } +TGlslIoMapper::TGlslIoMapper() { + memset(inVarMaps, 0, sizeof(TVarLiveMap*) * EShLangCount); + memset(outVarMaps, 0, sizeof(TVarLiveMap*) * EShLangCount); + memset(uniformVarMap, 0, sizeof(TVarLiveMap*) * EShLangCount); + memset(intermediates, 0, sizeof(TIntermediate*) * EShLangCount); + profile = ENoProfile; + version = 0; + autoPushConstantMaxSize = 128; + autoPushConstantBlockPacking = ElpStd430; +} + +TGlslIoMapper::~TGlslIoMapper() { + for (size_t stage = 0; stage < EShLangCount; stage++) { + if (inVarMaps[stage] != nullptr) { + delete inVarMaps[stage]; + inVarMaps[stage] = nullptr; + } + if (outVarMaps[stage] != nullptr) { + delete outVarMaps[stage]; + outVarMaps[stage] = nullptr; + } + if (uniformVarMap[stage] != nullptr) { + delete uniformVarMap[stage]; + uniformVarMap[stage] = nullptr; + } + if (intermediates[stage] != nullptr) + intermediates[stage] = nullptr; + } +} + // Map I/O variables to provided offsets, and make bindings for // unbound but live variables. // @@ -1677,7 +1813,8 @@ bool TGlslIoMapper::doMap(TIoMapResolver* resolver, TInfoSink& infoSink) { std::for_each(uniformVector.begin(), uniformVector.end(), [this](TVarLivePair& p) { if (p.first == autoPushConstantBlockName) { - p.second.upgradedToPushConstant = true; + p.second.upgradedToPushConstantPacking = autoPushConstantBlockPacking; + p.second.newSet = TQualifier::layoutSetEnd; } }); } @@ -1690,8 +1827,8 @@ bool TGlslIoMapper::doMap(TIoMapResolver* resolver, TInfoSink& infoSink) { std::for_each(uniformVector.begin(), uniformVector.end(), [pUniformVarMap, stage](TVarLivePair p) { auto at = pUniformVarMap[stage]->find(p.second.symbol->getAccessName()); if (at != pUniformVarMap[stage]->end() && at->second.id == p.second.id){ - if (p.second.upgradedToPushConstant) { - at->second.upgradedToPushConstant = true; + if (p.second.upgradedToPushConstantPacking != ElpNone) { + at->second.upgradedToPushConstantPacking = p.second.upgradedToPushConstantPacking; } else { int resolvedBinding = at->second.newBinding; at->second = p.second; diff --git a/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/iomapper.h b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/iomapper.h index 35babbce1..ef513d9a6 100644 --- a/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/iomapper.h +++ b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/iomapper.h @@ -37,7 +37,6 @@ #define _IOMAPPER_INCLUDED #include -#include "LiveTraverser.h" #include #include // @@ -49,84 +48,7 @@ class TInfoSink; namespace glslang { class TIntermediate; -struct TVarEntryInfo { - long long id; - TIntermSymbol* symbol; - bool live; - bool upgradedToPushConstant; - int newBinding; - int newSet; - int newLocation; - int newComponent; - int newIndex; - EShLanguage stage; - - void clearNewAssignments() { - upgradedToPushConstant = false; - newBinding = -1; - newSet = -1; - newLocation = -1; - newComponent = -1; - newIndex = -1; - } - - struct TOrderById { - inline bool operator()(const TVarEntryInfo& l, const TVarEntryInfo& r) { return l.id < r.id; } - }; - - struct TOrderByPriority { - // ordering: - // 1) has both binding and set - // 2) has binding but no set - // 3) has no binding but set - // 4) has no binding and no set - inline bool operator()(const TVarEntryInfo& l, const TVarEntryInfo& r) { - const TQualifier& lq = l.symbol->getQualifier(); - const TQualifier& rq = r.symbol->getQualifier(); - - // simple rules: - // has binding gives 2 points - // has set gives 1 point - // who has the most points is more important. - int lPoints = (lq.hasBinding() ? 2 : 0) + (lq.hasSet() ? 1 : 0); - int rPoints = (rq.hasBinding() ? 2 : 0) + (rq.hasSet() ? 1 : 0); - - if (lPoints == rPoints) - return l.id < r.id; - return lPoints > rPoints; - } - }; - - struct TOrderByPriorityAndLive { - // ordering: - // 1) do live variables first - // 2) has both binding and set - // 3) has binding but no set - // 4) has no binding but set - // 5) has no binding and no set - inline bool operator()(const TVarEntryInfo& l, const TVarEntryInfo& r) { - - const TQualifier& lq = l.symbol->getQualifier(); - const TQualifier& rq = r.symbol->getQualifier(); - - // simple rules: - // has binding gives 2 points - // has set gives 1 point - // who has the most points is more important. - int lPoints = (lq.hasBinding() ? 2 : 0) + (lq.hasSet() ? 1 : 0); - int rPoints = (rq.hasBinding() ? 2 : 0) + (rq.hasSet() ? 1 : 0); - - if (l.live != r.live) - return l.live > r.live; - - if (lPoints != rPoints) - return lPoints > rPoints; - - return l.id < r.id; - } - }; -}; - +struct TVarEntryInfo; // Base class for shared TIoMapResolver services, used by several derivations. struct TDefaultIoResolverBase : public glslang::TIoMapResolver { public: @@ -267,82 +189,22 @@ protected: typedef std::map TVarLiveMap; -// override function "operator=", if a vector being sort, -// when use vc++, the sort function will call : -// pair& operator=(const pair<_Other1, _Other2>& _Right) -// { -// first = _Right.first; -// second = _Right.second; -// return (*this); -// } -// that will make a const type handing on left. -// override this function can avoid a compiler error. -// In the future, if the vc++ compiler can handle such a situation, -// this part of the code will be removed. -struct TVarLivePair : std::pair { - TVarLivePair(const std::pair& _Right) : pair(_Right.first, _Right.second) {} - TVarLivePair& operator=(const TVarLivePair& _Right) { - const_cast(first) = _Right.first; - second = _Right.second; - return (*this); - } - TVarLivePair(const TVarLivePair& src) : pair(src) { } -}; -typedef std::vector TVarLiveVector; - -// I/O mapper -class TIoMapper { -public: - TIoMapper() {} - virtual ~TIoMapper() {} - // grow the reflection stage by stage - bool virtual addStage(EShLanguage, TIntermediate&, TInfoSink&, TIoMapResolver*); - bool virtual doMap(TIoMapResolver*, TInfoSink&) { return true; } -}; - // I/O mapper for GLSL 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)); - profile = ENoProfile; - version = 0; - autoPushConstantMaxSize = 128; - autoPushConstantBlockPacking = ElpStd430; - } - virtual ~TGlslIoMapper() { - for (size_t stage = 0; stage < EShLangCount; stage++) { - if (inVarMaps[stage] != nullptr) { - delete inVarMaps[stage]; - inVarMaps[stage] = nullptr; - } - if (outVarMaps[stage] != nullptr) { - delete outVarMaps[stage]; - outVarMaps[stage] = nullptr; - } - if (uniformVarMap[stage] != nullptr) { - delete uniformVarMap[stage]; - uniformVarMap[stage] = nullptr; - } - if (intermediates[stage] != nullptr) - intermediates[stage] = nullptr; - } - } + TGlslIoMapper(); + virtual ~TGlslIoMapper(); // If set, the uniform block with the given name will be changed to be backed by // push_constant if it's size is <= maxSize - void setAutoPushConstantBlock(const char* name, unsigned int maxSize, TLayoutPacking packing) { + bool setAutoPushConstantBlock(const char* name, unsigned int maxSize, TLayoutPacking packing) override { autoPushConstantBlockName = name; autoPushConstantMaxSize = maxSize; autoPushConstantBlockPacking = packing; + return true; } // grow the reflection stage by stage bool addStage(EShLanguage, TIntermediate&, TInfoSink&, TIoMapResolver*) override; bool doMap(TIoMapResolver*, TInfoSink&) override; - TVarLiveMap *inVarMaps[EShLangCount], *outVarMaps[EShLangCount], - *uniformVarMap[EShLangCount]; TIntermediate* intermediates[EShLangCount]; bool hadError = false; EProfile profile; @@ -352,6 +214,8 @@ private: TString autoPushConstantBlockName; unsigned int autoPushConstantMaxSize; TLayoutPacking autoPushConstantBlockPacking; + TVarLiveMap *inVarMaps[EShLangCount], *outVarMaps[EShLangCount], + *uniformVarMap[EShLangCount]; }; } // end namespace glslang diff --git a/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/linkValidate.cpp b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/linkValidate.cpp index 62e24426e..c93a01489 100644 --- a/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/linkValidate.cpp +++ b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/linkValidate.cpp @@ -46,9 +46,11 @@ // even if no merging was done (i.e., the stage was only one compilation unit). // +#include "glslang/glslang/Public/ShaderLang.h" #include "localintermediate.h" #include "../Include/InfoSink.h" #include "SymbolTable.h" +#include "LiveTraverser.h" namespace glslang { @@ -58,10 +60,12 @@ namespace glslang { void TIntermediate::error(TInfoSink& infoSink, const char* message, EShLanguage unitStage) { infoSink.info.prefix(EPrefixError); - if (unitStage < EShLangCount) - infoSink.info << "Linking " << StageName(getStage()) << " and " << StageName(unitStage) << " stages: " << message << "\n"; - else + if (unitStage == EShLangCount) infoSink.info << "Linking " << StageName(language) << " stage: " << message << "\n"; + else if (language == EShLangCount) + infoSink.info << "Linking " << StageName(unitStage) << " stage: " << message << "\n"; + else + infoSink.info << "Linking " << StageName(language) << " and " << StageName(unitStage) << " stages: " << message << "\n"; ++numErrors; } @@ -70,10 +74,12 @@ void TIntermediate::error(TInfoSink& infoSink, const char* message, EShLanguage void TIntermediate::warn(TInfoSink& infoSink, const char* message, EShLanguage unitStage) { infoSink.info.prefix(EPrefixWarning); - if (unitStage < EShLangCount) - infoSink.info << "Linking " << StageName(language) << " and " << StageName(unitStage) << " stages: " << message << "\n"; - else + if (unitStage == EShLangCount) infoSink.info << "Linking " << StageName(language) << " stage: " << message << "\n"; + else if (language == EShLangCount) + infoSink.info << "Linking " << StageName(unitStage) << " stage: " << message << "\n"; + else + infoSink.info << "Linking " << StageName(language) << " and " << StageName(unitStage) << " stages: " << message << "\n"; } // TODO: 4.4 offset/align: "Two blocks linked together in the same program with the same block @@ -113,6 +119,30 @@ void TIntermediate::mergeUniformObjects(TInfoSink& infoSink, TIntermediate& unit mergeLinkerObjects(infoSink, linkerObjects, unitLinkerObjects, unit.getStage()); } +static inline bool isSameInterface(TIntermSymbol* symbol, TIntermSymbol* unitSymbol) { + EShLanguage stage = symbol->getStage(); + EShLanguage unitStage = unitSymbol->getStage(); + return // 1) same stage and same shader interface + (stage == unitStage && symbol->getType().getShaderInterface() == unitSymbol->getType().getShaderInterface()) || + // 2) accross stages and both are uniform or buffer + (symbol->getQualifier().storage == EvqUniform && unitSymbol->getQualifier().storage == EvqUniform) || + (symbol->getQualifier().storage == EvqBuffer && unitSymbol->getQualifier().storage == EvqBuffer) || + // 3) in/out matched across stage boundary + (stage < unitStage && symbol->getQualifier().storage == EvqVaryingOut && unitSymbol->getQualifier().storage == EvqVaryingIn) || + (unitStage < stage && symbol->getQualifier().storage == EvqVaryingIn && unitSymbol->getQualifier().storage == EvqVaryingOut); +} + +static bool isSameSymbol(TIntermSymbol* symbol1, TIntermSymbol* symbol2) { + // If they are both blocks in the same shader interface, + // match by the block-name, not the identifier name. + if (symbol1->getType().getBasicType() == EbtBlock && symbol2->getType().getBasicType() == EbtBlock) { + if (isSameInterface(symbol1, symbol2)) { + return symbol1->getType().getTypeName() == symbol2->getType().getTypeName(); + } + } else if (symbol1->getName() == symbol2->getName()) + return true; + return false; +} // // do error checking on the shader boundary in / out vars // @@ -140,6 +170,107 @@ void TIntermediate::checkStageIO(TInfoSink& infoSink, TIntermediate& unit) { // TODO: final check; make sure that any statically used `in` have matching `out` written to } +void TIntermediate::optimizeStageIO(TInfoSink&, TIntermediate& unit) +{ + // don't do any input/output demotion on compute, raytracing, or task/mesh stages + // TODO: support task/mesh + if (getStage() > EShLangFragment || unit.getStage() > EShLangFragment) { + return; + } + + class TIOTraverser : public TLiveTraverser { + public: + TIOTraverser(TIntermediate& i, bool all, TIntermSequence& sequence, TStorageQualifier storage) + : TLiveTraverser(i, all, true, false, false), sequence(sequence), storage(storage) + { + } + + virtual void visitSymbol(TIntermSymbol* symbol) + { + if (symbol->getQualifier().storage == storage) { + sequence.push_back(symbol); + } + } + + private: + TIntermSequence& sequence; + TStorageQualifier storage; + }; + + // live symbols only + TIntermSequence unitLiveInputs; + + TIOTraverser unitTraverser(unit, false, unitLiveInputs, EvqVaryingIn); + unitTraverser.pushFunction(unit.getEntryPointMangledName().c_str()); + while (! unitTraverser.destinations.empty()) { + TIntermNode* destination = unitTraverser.destinations.back(); + unitTraverser.destinations.pop_back(); + destination->traverse(&unitTraverser); + } + + TIntermSequence allOutputs; + TIntermSequence unitAllInputs; + + TIOTraverser allTraverser(*this, true, allOutputs, EvqVaryingOut); + getTreeRoot()->traverse(&allTraverser); + + TIOTraverser unitAllTraverser(unit, true, unitAllInputs, EvqVaryingIn); + unit.getTreeRoot()->traverse(&unitAllTraverser); + + // find outputs not consumed by the next stage + std::for_each(allOutputs.begin(), allOutputs.end(), [&unitLiveInputs, &unitAllInputs](TIntermNode* output) { + // don't do anything to builtins + if (output->getAsSymbolNode()->getAccessName().compare(0, 3, "gl_") == 0) + return; + + // don't demote block outputs (for now) + if (output->getAsSymbolNode()->getBasicType() == EbtBlock) + return; + + // check if the (loose) output has a matching loose input + auto isMatchingInput = [output](TIntermNode* input) { + return output->getAsSymbolNode()->getAccessName() == input->getAsSymbolNode()->getAccessName(); + }; + + // check if the (loose) output has a matching block member input + auto isMatchingInputBlockMember = [output](TIntermNode* input) { + // ignore loose inputs + if (input->getAsSymbolNode()->getBasicType() != EbtBlock) + return false; + + // don't demote loose outputs with matching input block members + auto isMatchingBlockMember = [output](TTypeLoc type) { + return type.type->getFieldName() == output->getAsSymbolNode()->getName(); + }; + const TTypeList* members = input->getAsSymbolNode()->getType().getStruct(); + return std::any_of(members->begin(), members->end(), isMatchingBlockMember); + }; + + // determine if the input/output pair should be demoted + // do the faster (and more likely) loose-loose check first + if (std::none_of(unitLiveInputs.begin(), unitLiveInputs.end(), isMatchingInput) && + std::none_of(unitAllInputs.begin(), unitAllInputs.end(), isMatchingInputBlockMember)) { + // demote any input matching the output + auto demoteMatchingInputs = [output](TIntermNode* input) { + if (output->getAsSymbolNode()->getAccessName() == input->getAsSymbolNode()->getAccessName()) { + // demote input to a plain variable + TIntermSymbol* symbol = input->getAsSymbolNode(); + symbol->getQualifier().storage = EvqGlobal; + symbol->getQualifier().clearInterstage(); + symbol->getQualifier().clearLayout(); + } + }; + + // demote all matching outputs to a plain variable + TIntermSymbol* symbol = output->getAsSymbolNode(); + symbol->getQualifier().storage = EvqGlobal; + symbol->getQualifier().clearInterstage(); + symbol->getQualifier().clearLayout(); + std::for_each(unitAllInputs.begin(), unitAllInputs.end(), demoteMatchingInputs); + } + }); +} + void TIntermediate::mergeCallGraphs(TInfoSink& infoSink, TIntermediate& unit) { if (unit.getNumEntryPoints() > 0) { @@ -511,17 +642,6 @@ void TIntermediate::mergeBodies(TInfoSink& infoSink, TIntermSequence& globals, c globals.insert(globals.end() - 1, unitGlobals.begin(), unitGlobals.end() - 1); } -static inline bool isSameInterface(TIntermSymbol* symbol, EShLanguage stage, TIntermSymbol* unitSymbol, EShLanguage unitStage) { - return // 1) same stage and same shader interface - (stage == unitStage && symbol->getType().getShaderInterface() == unitSymbol->getType().getShaderInterface()) || - // 2) accross stages and both are uniform or buffer - (symbol->getQualifier().storage == EvqUniform && unitSymbol->getQualifier().storage == EvqUniform) || - (symbol->getQualifier().storage == EvqBuffer && unitSymbol->getQualifier().storage == EvqBuffer) || - // 3) in/out matched across stage boundary - (stage < unitStage && symbol->getQualifier().storage == EvqVaryingOut && unitSymbol->getQualifier().storage == EvqVaryingIn) || - (unitStage < stage && symbol->getQualifier().storage == EvqVaryingIn && unitSymbol->getQualifier().storage == EvqVaryingOut); -} - // // Global Unfiform block stores any default uniforms (i.e. uniforms without a block) // If two linked stages declare the same member, they are meant to be the same uniform @@ -611,10 +731,10 @@ void TIntermediate::mergeBlockDefinitions(TInfoSink& infoSink, TIntermSymbol* bl // don't need as many checks as when merging symbols, since // initializers and most qualifiers are stripped when the member is moved into the block if ((*memberType) != (*unitMemberType)) { - error(infoSink, "Types must match:"); + error(infoSink, "Types must match:", unitBlock->getStage()); infoSink.info << " " << memberType->getFieldName() << ": "; - infoSink.info << "\"" << memberType->getCompleteString() << "\" versus "; - infoSink.info << "\"" << unitMemberType->getCompleteString() << "\"\n"; + infoSink.info << "\"" << memberType->getCompleteString() << "\" in stage " << StageName(block->getStage()) << " versus "; + infoSink.info << "\"" << unitMemberType->getCompleteString() << "\" in stage " << StageName(unitBlock->getStage()) << "\n"; } memberIndexUpdates[i] = j; @@ -713,18 +833,7 @@ void TIntermediate::mergeLinkerObjects(TInfoSink& infoSink, TIntermSequence& lin TIntermSymbol* unitSymbol = unitLinkerObjects[unitLinkObj]->getAsSymbolNode(); assert(symbol && unitSymbol); - 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 (isSameInterface(symbol, getStage(), unitSymbol, unitStage)) { - isSameSymbol = symbol->getType().getTypeName() == unitSymbol->getType().getTypeName(); - } - } - else if (symbol->getName() == unitSymbol->getName()) - isSameSymbol = true; - - if (isSameSymbol) { + if (isSameSymbol(symbol, unitSymbol)) { // filter out copy merge = false; @@ -761,7 +870,7 @@ void TIntermediate::mergeLinkerObjects(TInfoSink& infoSink, TIntermSequence& lin mergeImplicitArraySizes(symbol->getWritableType(), unitSymbol->getType()); // Check for consistent types/qualification/initializers etc. - mergeErrorCheck(infoSink, *symbol, *unitSymbol, unitStage); + mergeErrorCheck(infoSink, *symbol, *unitSymbol); } // 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() && getStage() == unitStage) @@ -803,7 +912,7 @@ void TIntermediate::mergeLinkerObjects(TInfoSink& infoSink, TIntermSequence& lin } }; - if (isSameInterface(symbol, getStage(), unitSymbol, unitStage)) { + if (isSameInterface(symbol, unitSymbol)) { checkName(symbol->getName()); // check members of other anonymous blocks @@ -847,9 +956,11 @@ void TIntermediate::mergeImplicitArraySizes(TType& type, const TType& unitType) // // This function only does one of intra- or cross-stage matching per call. // -void TIntermediate::mergeErrorCheck(TInfoSink& infoSink, const TIntermSymbol& symbol, const TIntermSymbol& unitSymbol, EShLanguage unitStage) +void TIntermediate::mergeErrorCheck(TInfoSink& infoSink, const TIntermSymbol& symbol, const TIntermSymbol& unitSymbol) { - bool crossStage = getStage() != unitStage; + EShLanguage stage = symbol.getStage(); + EShLanguage unitStage = unitSymbol.getStage(); + bool crossStage = stage != unitStage; bool writeTypeComparison = false; bool errorReported = false; bool printQualifiers = false; @@ -861,10 +972,10 @@ void TIntermediate::mergeErrorCheck(TInfoSink& infoSink, const TIntermSymbol& sy // but, we make an exception if one is an implicit array and the other is sized // or if the array sizes differ because of the extra array dimension on some in/out boundaries bool arraysMatch = false; - if (isIoResizeArray(symbol.getType(), getStage()) || isIoResizeArray(unitSymbol.getType(), unitStage)) { + if (isIoResizeArray(symbol.getType(), stage) || isIoResizeArray(unitSymbol.getType(), unitStage)) { // if the arrays have an extra dimension because of the stage. // compare dimensions while ignoring the outer dimension - unsigned int firstDim = isIoResizeArray(symbol.getType(), getStage()) ? 1 : 0; + unsigned int firstDim = isIoResizeArray(symbol.getType(), stage) ? 1 : 0; unsigned int numDim = symbol.getArraySizes() ? symbol.getArraySizes()->getNumDims() : 0; unsigned int unitFirstDim = isIoResizeArray(unitSymbol.getType(), unitStage) ? 1 : 0; @@ -893,7 +1004,7 @@ void TIntermediate::mergeErrorCheck(TInfoSink& infoSink, const TIntermSymbol& sy if (lpidx >= 0 && rpidx >= 0) { error(infoSink, "Member names and types must match:", unitStage); infoSink.info << " Block: " << symbol.getType().getTypeName() << "\n"; - infoSink.info << " " << StageName(getStage()) << " stage: \"" + infoSink.info << " " << StageName(stage) << " stage: \"" << (*symbol.getType().getStruct())[lpidx].type->getCompleteString(true, false, false, true, (*symbol.getType().getStruct())[lpidx].type->getFieldName()) << "\"\n"; infoSink.info << " " << StageName(unitStage) << " stage: \"" @@ -901,20 +1012,20 @@ void TIntermediate::mergeErrorCheck(TInfoSink& infoSink, const TIntermSymbol& sy (*unitSymbol.getType().getStruct())[rpidx].type->getFieldName()) << "\"\n"; errorReported = true; } else if (lpidx >= 0 && rpidx == -1) { - TString errmsg = StageName(getStage()); + TString errmsg = StageName(stage); errmsg.append(" block member has no corresponding member in ").append(StageName(unitStage)).append(" block:"); error(infoSink, errmsg.c_str(), unitStage); - infoSink.info << " " << StageName(getStage()) << " stage: Block: " << symbol.getType().getTypeName() << ", Member: " + infoSink.info << " " << StageName(stage) << " stage: Block: " << symbol.getType().getTypeName() << ", Member: " << (*symbol.getType().getStruct())[lpidx].type->getFieldName() << "\n"; infoSink.info << " " << StageName(unitStage) << " stage: Block: " << unitSymbol.getType().getTypeName() << ", Member: n/a \n"; errorReported = true; } else if (lpidx == -1 && rpidx >= 0) { TString errmsg = StageName(unitStage); - errmsg.append(" block member has no corresponding member in ").append(StageName(getStage())).append(" block:"); + errmsg.append(" block member has no corresponding member in ").append(StageName(stage)).append(" block:"); error(infoSink, errmsg.c_str(), unitStage); infoSink.info << " " << StageName(unitStage) << " stage: Block: " << unitSymbol.getType().getTypeName() << ", Member: " << (*unitSymbol.getType().getStruct())[rpidx].type->getFieldName() << "\n"; - infoSink.info << " " << StageName(getStage()) << " stage: Block: " << symbol.getType().getTypeName() << ", Member: n/a \n"; + infoSink.info << " " << StageName(stage) << " stage: Block: " << symbol.getType().getTypeName() << ", Member: n/a \n"; errorReported = true; } else { error(infoSink, "Types must match:", unitStage); @@ -971,7 +1082,7 @@ void TIntermediate::mergeErrorCheck(TInfoSink& infoSink, const TIntermSymbol& sy layoutQualifierError = true; } if (layoutQualifierError) { - infoSink.info << " " << StageName(getStage()) << " stage: Block: " << symbol.getType().getTypeName() << ", Member: " + infoSink.info << " " << StageName(stage) << " stage: Block: " << symbol.getType().getTypeName() << ", Member: " << (*symbol.getType().getStruct())[li].type->getFieldName() << " \"" << (*symbol.getType().getStruct())[li].type->getCompleteString(true, true, false, false) << "\"\n"; infoSink.info << " " << StageName(unitStage) << " stage: Block: " << unitSymbol.getType().getTypeName() << ", Member: " @@ -1083,6 +1194,10 @@ void TIntermediate::mergeErrorCheck(TInfoSink& infoSink, const TIntermSymbol& sy error(infoSink, "Memory volatil qualifier must match:", unitStage); memoryQualifierError = true; } + if (symbol.getQualifier().nontemporal != unitSymbol.getQualifier().nontemporal) { + error(infoSink, "Memory nontemporal qualifier must match:", unitStage); + memoryQualifierError = true; + } if (symbol.getQualifier().restrict != unitSymbol.getQualifier().restrict) { error(infoSink, "Memory restrict qualifier must match:", unitStage); memoryQualifierError = true; @@ -1152,24 +1267,24 @@ void TIntermediate::mergeErrorCheck(TInfoSink& infoSink, const TIntermSymbol& sy if (symbol.getType().getBasicType() == EbtBlock && unitSymbol.getType().getBasicType() == EbtBlock && symbol.getType().getStruct() && unitSymbol.getType().getStruct()) { if (printType) { - infoSink.info << " " << StageName(getStage()) << " stage: \"" << symbol.getType().getCompleteString(true, printQualifiers, printPrecision, + infoSink.info << " " << StageName(stage) << " stage: \"" << symbol.getType().getCompleteString(true, printQualifiers, printPrecision, printType, symbol.getName(), symbol.getType().getTypeName()) << "\"\n"; infoSink.info << " " << StageName(unitStage) << " stage: \"" << unitSymbol.getType().getCompleteString(true, printQualifiers, printPrecision, printType, unitSymbol.getName(), unitSymbol.getType().getTypeName()) << "\"\n"; } else { - infoSink.info << " " << StageName(getStage()) << " stage: Block: " << symbol.getType().getTypeName() << " Instance: " << symbol.getName() + infoSink.info << " " << StageName(stage) << " stage: Block: " << symbol.getType().getTypeName() << " Instance: " << symbol.getName() << ": \"" << symbol.getType().getCompleteString(true, printQualifiers, printPrecision, printType) << "\"\n"; infoSink.info << " " << StageName(unitStage) << " stage: Block: " << unitSymbol.getType().getTypeName() << " Instance: " << unitSymbol.getName() << ": \"" << unitSymbol.getType().getCompleteString(true, printQualifiers, printPrecision, printType) << "\"\n"; } } else { if (printType) { - infoSink.info << " " << StageName(getStage()) << " stage: \"" + infoSink.info << " " << StageName(stage) << " stage: \"" << symbol.getType().getCompleteString(true, printQualifiers, printPrecision, printType, symbol.getName()) << "\"\n"; infoSink.info << " " << StageName(unitStage) << " stage: \"" << unitSymbol.getType().getCompleteString(true, printQualifiers, printPrecision, printType, unitSymbol.getName()) << "\"\n"; } else { - infoSink.info << " " << StageName(getStage()) << " stage: " << symbol.getName() << " \"" + infoSink.info << " " << StageName(stage) << " stage: " << symbol.getName() << " \"" << symbol.getType().getCompleteString(true, printQualifiers, printPrecision, printType) << "\"\n"; infoSink.info << " " << StageName(unitStage) << " stage: " << unitSymbol.getName() << " \"" << unitSymbol.getType().getCompleteString(true, printQualifiers, printPrecision, printType) << "\"\n"; @@ -1689,7 +1804,7 @@ int TIntermediate::addUsedLocation(const TQualifier& qualifier, const TType& typ // First range: TRange locationRange(qualifier.layoutLocation, qualifier.layoutLocation); TRange componentRange(0, 3); - TIoRange range(locationRange, componentRange, type.getBasicType(), 0, qualifier.centroid, qualifier.smooth, qualifier.flat); + TIoRange range(locationRange, componentRange, type.getBasicType(), 0, qualifier.centroid, qualifier.smooth, qualifier.flat, qualifier.sample, qualifier.patch); // check for collisions collision = checkLocationRange(set, range, type, typeCollision); @@ -1699,7 +1814,7 @@ int TIntermediate::addUsedLocation(const TQualifier& qualifier, const TType& typ // Second range: TRange locationRange2(qualifier.layoutLocation + 1, qualifier.layoutLocation + 1); TRange componentRange2(0, 1); - TIoRange range2(locationRange2, componentRange2, type.getBasicType(), 0, qualifier.centroid, qualifier.smooth, qualifier.flat); + TIoRange range2(locationRange2, componentRange2, type.getBasicType(), 0, qualifier.centroid, qualifier.smooth, qualifier.flat, qualifier.sample, qualifier.patch); // check for collisions collision = checkLocationRange(set, range2, type, typeCollision); @@ -1725,7 +1840,7 @@ int TIntermediate::addUsedLocation(const TQualifier& qualifier, const TType& typ TBasicType basicTy = type.getBasicType(); if (basicTy == EbtSampler && type.getSampler().isAttachmentEXT()) basicTy = type.getSampler().type; - TIoRange range(locationRange, componentRange, basicTy, qualifier.hasIndex() ? qualifier.getIndex() : 0, qualifier.centroid, qualifier.smooth, qualifier.flat); + TIoRange range(locationRange, componentRange, basicTy, qualifier.hasIndex() ? qualifier.getIndex() : 0, qualifier.centroid, qualifier.smooth, qualifier.flat, qualifier.sample, qualifier.patch); // check for collisions, except for vertex inputs on desktop targeting OpenGL if (! (!isEsProfile() && language == EShLangVertex && qualifier.isPipeInput()) || spvVersion.vulkan > 0) @@ -1737,6 +1852,24 @@ int TIntermediate::addUsedLocation(const TQualifier& qualifier, const TType& typ return collision; } +// Check that two types can be stored in different components in the same location. +// They must be the same type, except signed/unsigned integers are considered compatible. +static bool checkCompatibleTypes(TBasicType t1, TBasicType t2) { + if (t1 != t2) { + if ((t1 == EbtInt8 && t2 == EbtUint8) || + (t2 == EbtInt8 && t1 == EbtUint8) || + (t1 == EbtInt16 && t2 == EbtUint16) || + (t2 == EbtInt16 && t1 == EbtUint16)|| + (t1 == EbtInt && t2 == EbtUint) || + (t2 == EbtInt && t1 == EbtUint)|| + (t1 == EbtInt64 && t2 == EbtUint64) || + (t2 == EbtInt64 && t1 == EbtUint64)) { + return true; + } + } + return t1 == t2; +} + // Compare a new (the passed in) 'range' against the existing set, and see // if there are any collisions. // @@ -1749,10 +1882,12 @@ int TIntermediate::checkLocationRange(int set, const TIoRange& range, const TTyp // there is a collision; pick one return std::max(range.location.start, usedIo[set][r].location.start); } else if (range.location.overlap(usedIo[set][r].location) && - (type.getBasicType() != usedIo[set][r].basicType || + (!checkCompatibleTypes(type.getBasicType(), usedIo[set][r].basicType) || type.getQualifier().centroid != usedIo[set][r].centroid || type.getQualifier().smooth != usedIo[set][r].smooth || - type.getQualifier().flat != usedIo[set][r].flat)) { + type.getQualifier().flat != usedIo[set][r].flat || + type.getQualifier().sample != usedIo[set][r].sample || + type.getQualifier().patch != usedIo[set][r].patch)) { // aliased-type mismatch typeCollision = true; return std::max(range.location.start, usedIo[set][r].location.start); diff --git a/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/localintermediate.h b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/localintermediate.h index 2a24cdaf7..0ab9e4b07 100644 --- a/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/localintermediate.h +++ b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/localintermediate.h @@ -99,7 +99,8 @@ private: // A "call" is a pair: . // There can be duplicates. General assumption is the list is small. struct TCall { - TCall(const TString& pCaller, const TString& pCallee) : caller(pCaller), callee(pCallee) { } + TCall(const TString& pCaller, const TString& pCallee) + : caller(pCaller), callee(pCallee), visited(false), currentPath(false), errorGiven(false) { } TString caller; TString callee; bool visited; @@ -123,8 +124,8 @@ struct TRange { // within the same location range, component range, and index value. Locations don't alias unless // all other dimensions of their range overlap. struct TIoRange { - TIoRange(TRange location, TRange component, TBasicType basicType, int index, bool centroid, bool smooth, bool flat) - : location(location), component(component), basicType(basicType), index(index), centroid(centroid), smooth(smooth), flat(flat) + TIoRange(TRange location, TRange component, TBasicType basicType, int index, bool centroid, bool smooth, bool flat, bool sample, bool patch) + : location(location), component(component), basicType(basicType), index(index), centroid(centroid), smooth(smooth), flat(flat), sample(sample), patch(patch) { } bool overlap(const TIoRange& rhs) const @@ -138,6 +139,8 @@ struct TIoRange { bool centroid; bool smooth; bool flat; + bool sample; + bool patch; }; // An offset range is a 2-D rectangle; the set of (binding, offset) pairs all lying @@ -436,6 +439,9 @@ public: case EShTargetVulkan_1_3: processes.addProcess("target-env vulkan1.3"); break; + case EShTargetVulkan_1_4: + processes.addProcess("target-env vulkan1.4"); + break; default: processes.addProcess("target-env vulkanUnknown"); break; @@ -1029,11 +1035,11 @@ public: #endif bool usingScalarBlockLayout() const { - for (auto extIt = requestedExtensions.begin(); extIt != requestedExtensions.end(); ++extIt) { - if (*extIt == E_GL_EXT_scalar_block_layout) - return true; - } - return false; + return IsRequestedExtension(E_GL_EXT_scalar_block_layout); + } + + bool usingTextureOffsetNonConst() const { + return IsRequestedExtension(E_GL_EXT_texture_offset_non_const); } bool IsRequestedExtension(const char* extension) const @@ -1048,6 +1054,7 @@ public: void mergeGlobalUniformBlocks(TInfoSink& infoSink, TIntermediate& unit, bool mergeExistingOnly); void mergeUniformObjects(TInfoSink& infoSink, TIntermediate& unit); void checkStageIO(TInfoSink&, TIntermediate&); + void optimizeStageIO(TInfoSink&, TIntermediate&); bool buildConvertOp(TBasicType dst, TBasicType src, TOperator& convertOp) const; TIntermTyped* createConversion(TBasicType convertTo, TIntermTyped* node) const; @@ -1060,6 +1067,7 @@ public: int checkLocationRT(int set, int location); int addUsedOffsets(int binding, int offset, int numOffsets); bool addUsedConstantId(int id); + GLSLANG_EXPORT_FOR_TESTS static int computeTypeLocationSize(const TType&, EShLanguage); static int computeTypeUniformLocationSize(const TType&); @@ -1115,7 +1123,7 @@ public: { on ? numericFeatures.insert(f) : numericFeatures.erase(f); } protected: - TIntermSymbol* addSymbol(long long Id, const TString&, const TType&, const TConstUnionArray&, TIntermTyped* subtree, const TSourceLoc&); + TIntermSymbol* addSymbol(long long Id, const TString&, const TString&, const TType&, const TConstUnionArray&, TIntermTyped* subtree, const TSourceLoc&); void error(TInfoSink& infoSink, const char*, EShLanguage unitStage = EShLangCount); void warn(TInfoSink& infoSink, const char*, EShLanguage unitStage = EShLangCount); void mergeCallGraphs(TInfoSink&, TIntermediate&); @@ -1127,7 +1135,7 @@ protected: void mergeLinkerObjects(TInfoSink&, TIntermSequence& linkerObjects, const TIntermSequence& unitLinkerObjects, EShLanguage); void mergeBlockDefinitions(TInfoSink&, TIntermSymbol* block, TIntermSymbol* unitBlock, TIntermediate* unitRoot); void mergeImplicitArraySizes(TType&, const TType&); - void mergeErrorCheck(TInfoSink&, const TIntermSymbol&, const TIntermSymbol&, EShLanguage); + void mergeErrorCheck(TInfoSink&, const TIntermSymbol&, const TIntermSymbol&); void checkCallGraphCycles(TInfoSink&); void checkCallGraphBodies(TInfoSink&, bool keepUncalled); void inOutLocationCheck(TInfoSink&); diff --git a/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/parseVersions.h b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/parseVersions.h index 5c77e42ce..6509efd76 100644 --- a/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/parseVersions.h +++ b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/parseVersions.h @@ -121,6 +121,8 @@ public: virtual void fcoopmatCheckNV(const TSourceLoc&, const char* op, bool builtIn = false); virtual void intcoopmatCheckNV(const TSourceLoc&, const char *op, bool builtIn = false); virtual void coopmatCheck(const TSourceLoc&, const char* op, bool builtIn = false); + virtual void tensorLayoutViewCheck(const TSourceLoc&, const char* op, bool builtIn = false); + virtual void coopvecCheck(const TSourceLoc&, const char* op, bool builtIn = false); bool relaxedErrors() const { return (messages & EShMsgRelaxedErrors) != 0; } bool suppressWarnings() const { return (messages & EShMsgSuppressWarnings) != 0; } bool isForwardCompatible() const { return forwardCompatible; } diff --git a/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/preprocessor/Pp.cpp b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/preprocessor/Pp.cpp index 5f18c4e92..5b44b1304 100644 --- a/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/preprocessor/Pp.cpp +++ b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/preprocessor/Pp.cpp @@ -241,6 +241,7 @@ int TPpContext::CPPundef(TPpToken* ppToken) */ int TPpContext::CPPelse(int matchelse, TPpToken* ppToken) { + inElseSkip = true; int depth = 0; int token = scanToken(ppToken); @@ -297,7 +298,7 @@ int TPpContext::CPPelse(int matchelse, TPpToken* ppToken) elseSeen[elsetracker] = false; --elsetracker; } - + inElseSkip = false; return CPPif(ppToken); } } else if (nextAtom == PpAtomElse) { @@ -311,7 +312,8 @@ int TPpContext::CPPelse(int matchelse, TPpToken* ppToken) parseContext.ppError(ppToken->loc, "#elif after #else", "#elif", ""); } } - + + inElseSkip = false; return token; } @@ -374,7 +376,7 @@ namespace { int op_div(int a, int b) { return a == INT_MIN && b == -1 ? 0 : a / b; } int op_mod(int a, int b) { return a == INT_MIN && b == -1 ? 0 : a % b; } int op_pos(int a) { return a; } - int op_neg(int a) { return -a; } + int op_neg(int a) { return a == INT_MIN ? INT_MIN : -a; } int op_cmpl(int a) { return ~a; } int op_not(int a) { return !a; } diff --git a/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/preprocessor/PpContext.cpp b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/preprocessor/PpContext.cpp index 70f511978..f27204bc4 100644 --- a/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/preprocessor/PpContext.cpp +++ b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/preprocessor/PpContext.cpp @@ -88,7 +88,8 @@ TPpContext::TPpContext(TParseContextBase& pc, const std::string& rootFileName, T preamble(nullptr), strings(nullptr), previous_token('\n'), parseContext(pc), includer(inclr), inComment(false), rootFileName(rootFileName), currentSourceFile(rootFileName), - disableEscapeSequences(false) + disableEscapeSequences(false), + inElseSkip(false) { ifdepth = 0; for (elsetracker = 0; elsetracker < maxIfNesting; elsetracker++) diff --git a/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/preprocessor/PpContext.h b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/preprocessor/PpContext.h index 1ec30491c..3446f1e1c 100644 --- a/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/preprocessor/PpContext.h +++ b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/preprocessor/PpContext.h @@ -371,7 +371,7 @@ protected: break; popInput(); } - if (!inputStack.empty() && inputStack.back()->isStringInput()) { + if (!inputStack.empty() && inputStack.back()->isStringInput() && !inElseSkip) { if (token == '\n') { bool seenNumSign = false; for (int i = 0; i < (int)lastLineTokens.size() - 1;) { @@ -732,6 +732,9 @@ protected: std::istringstream strtodStream; bool disableEscapeSequences; + // True if we're skipping a section enclosed by #if/#ifdef/#elif/#else which was evaluated to + // be inactive, e.g. #if 0 + bool inElseSkip; }; } // end namespace glslang diff --git a/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/propagateNoContraction.cpp b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/propagateNoContraction.cpp index 7b5cd03fa..600541f61 100644 --- a/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/propagateNoContraction.cpp +++ b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/propagateNoContraction.cpp @@ -174,6 +174,9 @@ bool isArithmeticOperation(glslang::TOperator op) case glslang::EOpMatrixTimesMatrix: case glslang::EOpDot: + case glslang::EOpDotPackedEXT: + case glslang::EOpDotAccSatEXT: + case glslang::EOpDotPackedAccSatEXT: case glslang::EOpPostIncrement: case glslang::EOpPostDecrement: diff --git a/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/propagateNoContraction.h b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/propagateNoContraction.h index 8521ad7d6..d849be837 100644 --- a/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/propagateNoContraction.h +++ b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/propagateNoContraction.h @@ -52,4 +52,5 @@ namespace glslang { // 'noContraction' means the object is 'precise'; and for arithmetic operation // nodes, it means the operation should not be contracted. void PropagateNoContraction(const glslang::TIntermediate& intermediate); -}; + +} // end namespace glslang diff --git a/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/reflection.h b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/reflection.h index 221d93f8b..8315b1128 100644 --- a/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/reflection.h +++ b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/reflection.h @@ -37,8 +37,8 @@ #define _REFLECTION_INCLUDED #include "../Public/ShaderLang.h" -#include "../Include/Types.h" - +#include "../Include/BaseTypes.h" +#include "../Include/visibility.h" #include #include @@ -65,6 +65,7 @@ public: virtual ~TReflection() {} // grow the reflection stage by stage + GLSLANG_EXPORT_FOR_TESTS bool addStage(EShLanguage, const TIntermediate&); // for mapping a uniform index to a uniform object's description diff --git a/libraries/ZVulkan/src/glslang/glslang/OSDependent/Unix/CMakeLists.txt b/libraries/ZVulkan/src/glslang/glslang/OSDependent/Unix/CMakeLists.txt index 0c5497568..53d9ad384 100644 --- a/libraries/ZVulkan/src/glslang/glslang/OSDependent/Unix/CMakeLists.txt +++ b/libraries/ZVulkan/src/glslang/glslang/OSDependent/Unix/CMakeLists.txt @@ -31,15 +31,18 @@ # ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGE. -add_library(OSDependent STATIC ossource.cpp ../osinclude.h) +set(OSDEPENDENT_SOURCES + ${CMAKE_CURRENT_SOURCE_DIR}/ossource.cpp + PARENT_SCOPE) + +set(OSDEPENDENT_HEADERS + ${CMAKE_CURRENT_SOURCE_DIR}/../osinclude.h + PARENT_SCOPE) + +add_library(OSDependent STATIC ${CMAKE_CURRENT_SOURCE_DIR}/../../stub.cpp) set_property(TARGET OSDependent PROPERTY FOLDER glslang) set_property(TARGET OSDependent PROPERTY POSITION_INDEPENDENT_CODE ON) -# Link pthread -set(THREADS_PREFER_PTHREAD_FLAG ON) -find_package(Threads REQUIRED) -target_link_libraries(OSDependent Threads::Threads) - if(GLSLANG_ENABLE_INSTALL AND NOT BUILD_SHARED_LIBS) install(TARGETS OSDependent EXPORT glslang-targets) endif() diff --git a/libraries/ZVulkan/src/glslang/glslang/OSDependent/Web/CMakeLists.txt b/libraries/ZVulkan/src/glslang/glslang/OSDependent/Web/CMakeLists.txt index 5d1749608..ef50d4105 100644 --- a/libraries/ZVulkan/src/glslang/glslang/OSDependent/Web/CMakeLists.txt +++ b/libraries/ZVulkan/src/glslang/glslang/OSDependent/Web/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2020 The Khronos Group Inc. +# Copyright (C) 2020-2025 The Khronos Group Inc. # # All rights reserved. # @@ -34,7 +34,7 @@ if(ENABLE_GLSLANG_JS) add_executable(glslang.js "glslang.js.cpp") glslang_set_link_args(glslang.js) - target_link_libraries(glslang.js glslang SPIRV) + target_link_libraries(glslang.js glslang) # Link library names that start with "-" are treated as link flags. # "-Os" should be OK in MSVC; don't use /Os because CMake won't @@ -67,28 +67,9 @@ if(ENABLE_GLSLANG_JS) endif() if(NOT ENABLE_EMSCRIPTEN_ENVIRONMENT_NODE) - if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.18") - add_custom_command(TARGET glslang.js POST_BUILD - COMMAND ${CMAKE_COMMAND} -E cat ${CMAKE_CURRENT_SOURCE_DIR}/glslang.after.js >> ${CMAKE_CURRENT_BINARY_DIR}/glslang.js - ) - else() - if (MINGW) - message(FATAL_ERROR "Must use at least CMake 3.18") - endif() - - if (CMAKE_HOST_SYSTEM MATCHES "Windows.*") - # There are several ways we could append one file to another on Windows, but unfortunately 'cat' is not one of them - # (there is no 'cat' command in cmd). Also, since this will ultimately run in cmd and not pwsh, we need to ensure - # Windows path separators are used. - file(TO_NATIVE_PATH "${CMAKE_CURRENT_BINARY_DIR}/glslang.js" glslang_js_path) - file(TO_NATIVE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/glslang.after.js" glslang_after_js_path) - add_custom_command(TARGET glslang.js POST_BUILD - COMMAND type "${glslang_after_js_path}" >> "${glslang_js_path}") - else() - add_custom_command(TARGET glslang.js POST_BUILD - COMMAND cat ${CMAKE_CURRENT_SOURCE_DIR}/glslang.after.js >> ${CMAKE_CURRENT_BINARY_DIR}/glslang.js) - endif() - endif() + add_custom_command(TARGET glslang.js POST_BUILD + COMMAND ${CMAKE_COMMAND} -E cat ${CMAKE_CURRENT_SOURCE_DIR}/glslang.after.js >> ${CMAKE_CURRENT_BINARY_DIR}/glslang.js + ) endif() endif() endif() \ No newline at end of file diff --git a/libraries/ZVulkan/src/glslang/glslang/OSDependent/Windows/CMakeLists.txt b/libraries/ZVulkan/src/glslang/glslang/OSDependent/Windows/CMakeLists.txt index 8a9a8c42c..040f4348f 100644 --- a/libraries/ZVulkan/src/glslang/glslang/OSDependent/Windows/CMakeLists.txt +++ b/libraries/ZVulkan/src/glslang/glslang/OSDependent/Windows/CMakeLists.txt @@ -31,12 +31,18 @@ # ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGE. +set(OSDEPENDENT_SOURCES + ${CMAKE_CURRENT_SOURCE_DIR}/ossource.cpp + PARENT_SCOPE) + +set(OSDEPENDENT_HEADERS + ${CMAKE_CURRENT_SOURCE_DIR}/../osinclude.h + PARENT_SCOPE) + add_library(OSDependent STATIC) target_sources(OSDependent PRIVATE - ../osinclude.h - ossource.cpp -) + ${CMAKE_CURRENT_SOURCE_DIR}/../../stub.cpp) set_property(TARGET OSDependent PROPERTY FOLDER glslang) set_property(TARGET OSDependent PROPERTY POSITION_INDEPENDENT_CODE ON) @@ -44,7 +50,7 @@ set_property(TARGET OSDependent PROPERTY POSITION_INDEPENDENT_CODE ON) # MinGW GCC complains about function pointer casts to void*. # Turn that off with -fpermissive. if(MINGW AND ${CMAKE_CXX_COMPILER_ID} MATCHES "GNU") - target_compile_options(OSDependent PRIVATE -fpermissive) + set_source_files_properties(${OSDEPENDENT_SOURCES} PROPERTIES COMPILE_FLAGS -fpermissive) endif() if(WIN32) diff --git a/libraries/ZVulkan/src/glslang/glslang/OSDependent/osinclude.h b/libraries/ZVulkan/src/glslang/glslang/OSDependent/osinclude.h index 0d677e4af..da1c4f695 100644 --- a/libraries/ZVulkan/src/glslang/glslang/OSDependent/osinclude.h +++ b/libraries/ZVulkan/src/glslang/glslang/OSDependent/osinclude.h @@ -35,9 +35,10 @@ #ifndef __OSINCLUDE_H #define __OSINCLUDE_H +#include "../Include/visibility.h" namespace glslang { -void OS_DumpMemoryCounters(); +GLSLANG_EXPORT void OS_DumpMemoryCounters(); } // end namespace glslang diff --git a/libraries/ZVulkan/src/glslang/glslang/Public/ResourceLimits.h b/libraries/ZVulkan/src/glslang/glslang/Public/ResourceLimits.h index f70be8172..8245e12d7 100644 --- a/libraries/ZVulkan/src/glslang/glslang/Public/ResourceLimits.h +++ b/libraries/ZVulkan/src/glslang/glslang/Public/ResourceLimits.h @@ -38,20 +38,21 @@ #include #include "../Include/ResourceLimits.h" +#include "../Include/visibility.h" // Return pointer to user-writable Resource to pass through API in // future-proof way. -extern TBuiltInResource* GetResources(); +GLSLANG_EXPORT extern TBuiltInResource* GetResources(); // 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* GetDefaultResources(); +GLSLANG_EXPORT extern const TBuiltInResource* GetDefaultResources(); // Returns the DefaultTBuiltInResource as a human-readable string. -std::string GetDefaultTBuiltInResourceString(); +GLSLANG_EXPORT std::string GetDefaultTBuiltInResourceString(); // Decodes the resource limits from |config| to |resources|. -void DecodeResourceLimits(TBuiltInResource* resources, char* config); +GLSLANG_EXPORT void DecodeResourceLimits(TBuiltInResource* resources, char* config); #endif // _STAND_ALONE_RESOURCE_LIMITS_INCLUDED_ diff --git a/libraries/ZVulkan/src/glslang/glslang/Public/ShaderLang.h b/libraries/ZVulkan/src/glslang/glslang/Public/ShaderLang.h index b71b147a5..1a3a0b243 100644 --- a/libraries/ZVulkan/src/glslang/glslang/Public/ShaderLang.h +++ b/libraries/ZVulkan/src/glslang/glslang/Public/ShaderLang.h @@ -38,6 +38,7 @@ #define _COMPILER_INTERFACE_INCLUDED_ #include "../Include/ResourceLimits.h" +#include "../Include/visibility.h" #include "../MachineIndependent/Versions.h" #include @@ -49,22 +50,6 @@ #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 - // // This is the platform independent interface between an OGL driver // and the shading language compiler/linker. @@ -171,8 +156,9 @@ typedef enum { EShTargetVulkan_1_1 = (1 << 22) | (1 << 12), // Vulkan 1.1 EShTargetVulkan_1_2 = (1 << 22) | (2 << 12), // Vulkan 1.2 EShTargetVulkan_1_3 = (1 << 22) | (3 << 12), // Vulkan 1.3 + EShTargetVulkan_1_4 = (1 << 22) | (4 << 12), // Vulkan 1.4 EShTargetOpenGL_450 = 450, // OpenGL - LAST_ELEMENT_MARKER(EShTargetClientVersionCount = 5), + LAST_ELEMENT_MARKER(EShTargetClientVersionCount = 6), } EShTargetClientVersion; typedef EShTargetClientVersion EshTargetClientVersion; @@ -188,6 +174,21 @@ typedef enum { LAST_ELEMENT_MARKER(EShTargetLanguageVersionCount = 7), } EShTargetLanguageVersion; +// +// Following are a series of helper enums for managing layouts and qualifiers, +// used for TPublicType, TType, others. +// + +enum TLayoutPacking { + ElpNone, + ElpShared, // default, but different than saying nothing + ElpStd140, + ElpStd430, + ElpPacked, + ElpScalar, + ElpCount // If expanding, see bitfield width below +}; + struct TInputLanguage { EShSource languageFamily; // redundant information with other input, this one overrides when not EShSourceNone EShLanguage stage; // redundant information with other input, this one overrides when not EShSourceNone @@ -270,6 +271,8 @@ enum EShMessages : unsigned { EShMsgBuiltinSymbolTable = (1 << 14), // print the builtin symbol table EShMsgEnhanced = (1 << 15), // enhanced message readability EShMsgAbsolutePath = (1 << 16), // Output Absolute path for messages + EShMsgDisplayErrorColumn = (1 << 17), // Display error message column aswell as line + EShMsgLinkTimeOptimization = (1 << 18), // perform cross-stage optimizations during linking LAST_ELEMENT_MARKER(EShMsgCount), }; @@ -414,6 +417,7 @@ GLSLANG_EXPORT int GetKhronosToolId(); class TIntermediate; class TProgram; class TPoolAllocator; +class TIoMapResolver; // Call this exactly once per process before using anything else GLSLANG_EXPORT bool InitializeProcess(); @@ -509,6 +513,9 @@ public: GLSLANG_EXPORT void setAtomicCounterBlockSet(unsigned int set); GLSLANG_EXPORT void setAtomicCounterBlockBinding(unsigned int binding); + GLSLANG_EXPORT void addSourceText(const char* text, size_t len); + GLSLANG_EXPORT void setSourceFile(const char* file); + // 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 // target environment, either indirectly through TranslateEnvironment() based on @@ -849,6 +856,20 @@ public: virtual void addStage(EShLanguage stage, TIntermediate& stageIntermediate) = 0; }; +// I/O mapper +class TIoMapper { +public: + TIoMapper() {} + virtual ~TIoMapper() {} + // grow the reflection stage by stage + bool virtual addStage(EShLanguage, TIntermediate&, TInfoSink&, TIoMapResolver*); + bool virtual doMap(TIoMapResolver*, TInfoSink&) { return true; } + bool virtual setAutoPushConstantBlock(const char*, unsigned int, TLayoutPacking) { return false; } +}; + +// Get the default GLSL IO mapper +GLSLANG_EXPORT TIoMapper* GetGlslIoMapper(); + // 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() // for all shaders, call link(). @@ -956,6 +977,10 @@ public: const TType *getAttributeTType(int index) const { return getPipeInput(index).getType(); } GLSLANG_EXPORT void dumpReflection(); + + // Get the IO resolver to use for mapIO + GLSLANG_EXPORT TIoMapResolver* getGlslIoResolver(EShLanguage stage); + // 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. diff --git a/libraries/ZVulkan/src/glslang/glslang/Public/resource_limits_c.h b/libraries/ZVulkan/src/glslang/glslang/Public/resource_limits_c.h index 05aa8eb02..3cf7442f4 100644 --- a/libraries/ZVulkan/src/glslang/glslang/Public/resource_limits_c.h +++ b/libraries/ZVulkan/src/glslang/glslang/Public/resource_limits_c.h @@ -30,25 +30,26 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #define _STAND_ALONE_RESOURCE_LIMITS_C_INCLUDED_ #include "../Include/glslang_c_interface.h" +#include "../Include/visibility.h" #ifdef __cplusplus extern "C" { #endif // Returns a struct that can be use to create custom resource values. -glslang_resource_t* glslang_resource(void); +GLSLANG_EXPORT glslang_resource_t* glslang_resource(void); // 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. -const glslang_resource_t* glslang_default_resource(void); +GLSLANG_EXPORT const glslang_resource_t* glslang_default_resource(void); // Returns the DefaultTBuiltInResource as a human-readable string. // NOTE: User is responsible for freeing this string. -const char* glslang_default_resource_string(); +GLSLANG_EXPORT const char* glslang_default_resource_string(); // Decodes the resource limits from |config| to |resources|. -void glslang_decode_resource_limits(glslang_resource_t* resources, char* config); +GLSLANG_EXPORT void glslang_decode_resource_limits(glslang_resource_t* resources, char* config); #ifdef __cplusplus } diff --git a/libraries/ZVulkan/src/glslang/glslang/ResourceLimits/ResourceLimits.cpp b/libraries/ZVulkan/src/glslang/glslang/ResourceLimits/ResourceLimits.cpp index 45e0804e1..df87cc6e9 100644 --- a/libraries/ZVulkan/src/glslang/glslang/ResourceLimits/ResourceLimits.cpp +++ b/libraries/ZVulkan/src/glslang/glslang/ResourceLimits/ResourceLimits.cpp @@ -37,7 +37,7 @@ #include #include -#include "../Public/ResourceLimits.h" +#include "glslang/glslang/Public/ResourceLimits.h" TBuiltInResource Resources; diff --git a/libraries/ZVulkan/src/glslang/glslang/ResourceLimits/resource_limits_c.cpp b/libraries/ZVulkan/src/glslang/glslang/ResourceLimits/resource_limits_c.cpp index 7b1e20f5b..e78fcfb29 100644 --- a/libraries/ZVulkan/src/glslang/glslang/ResourceLimits/resource_limits_c.cpp +++ b/libraries/ZVulkan/src/glslang/glslang/ResourceLimits/resource_limits_c.cpp @@ -30,8 +30,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #define _CRT_SECURE_NO_WARNINGS #endif -#include "../Public/resource_limits_c.h" -#include "../Public/ResourceLimits.h" +#include "glslang/glslang/Public/resource_limits_c.h" +#include "glslang/glslang/Public/ResourceLimits.h" #include #include #include diff --git a/libraries/ZVulkan/src/glslang/spirv/CInterface/spirv_c_interface.cpp b/libraries/ZVulkan/src/glslang/spirv/CInterface/spirv_c_interface.cpp index 775e029c2..ea98be3e2 100644 --- a/libraries/ZVulkan/src/glslang/spirv/CInterface/spirv_c_interface.cpp +++ b/libraries/ZVulkan/src/glslang/spirv/CInterface/spirv_c_interface.cpp @@ -30,11 +30,13 @@ 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 "glslang/glslang/Include/glslang_c_interface.h" -#include "../GlslangToSpv.h" -#include "../Logger.h" -#include "../SpvTools.h" +#include +#include "glslang/glslang/Public/ShaderLang.h" +#include "glslang/spirv/GlslangToSpv.h" +#include "glslang/spirv/Logger.h" +#include "glslang/spirv/SpvTools.h" static_assert(sizeof(glslang_spv_options_t) == sizeof(glslang::SpvOptions), ""); diff --git a/libraries/ZVulkan/src/glslang/spirv/GLSL.ext.KHR.h b/libraries/ZVulkan/src/glslang/spirv/GLSL.ext.KHR.h index 38d3b974b..fb73f25f8 100644 --- a/libraries/ZVulkan/src/glslang/spirv/GLSL.ext.KHR.h +++ b/libraries/ZVulkan/src/glslang/spirv/GLSL.ext.KHR.h @@ -63,5 +63,7 @@ static const char* const E_SPV_KHR_subgroup_rotate = "SPV_KHR_subgr static const char* const E_SPV_KHR_expect_assume = "SPV_KHR_expect_assume"; static const char* const E_SPV_EXT_replicated_composites = "SPV_EXT_replicated_composites"; static const char* const E_SPV_KHR_relaxed_extended_instruction = "SPV_KHR_relaxed_extended_instruction"; +static const char* const E_SPV_KHR_integer_dot_product = "SPV_KHR_integer_dot_product"; +static const char* const E_SPV_NV_cooperative_vector = "SPV_NV_cooperative_vector"; #endif // #ifndef GLSLextKHR_H diff --git a/libraries/ZVulkan/src/glslang/spirv/GLSL.ext.NV.h b/libraries/ZVulkan/src/glslang/spirv/GLSL.ext.NV.h index e4f11e4bf..d4a97b31f 100644 --- a/libraries/ZVulkan/src/glslang/spirv/GLSL.ext.NV.h +++ b/libraries/ZVulkan/src/glslang/spirv/GLSL.ext.NV.h @@ -90,4 +90,15 @@ const char* const E_SPV_NV_displacement_micromap = "SPV_NV_displacement_micromap //SPV_NV_shader_atomic_fp16_vector const char* const E_SPV_NV_shader_atomic_fp16_vector = "SPV_NV_shader_atomic_fp16_vector"; +//SPV_NV_tensor_addressing +const char* const E_SPV_NV_tensor_addressing = "SPV_NV_tensor_addressing"; + +//SPV_NV_cooperative_matrix2 +const char* const E_SPV_NV_cooperative_matrix2 = "SPV_NV_cooperative_matrix2"; + +//SPV_NV_cluster_acceleration_structure +const char* const E_SPV_NV_cluster_acceleration_structure = "SPV_NV_cluster_acceleration_structure"; + +//SPV_NV_linear_swept_spheres +const char* const E_SPV_NV_linear_swept_spheres = "SPV_NV_linear_swept_spheres"; #endif // #ifndef GLSLextNV_H diff --git a/libraries/ZVulkan/src/glslang/spirv/GlslangToSpv.cpp b/libraries/ZVulkan/src/glslang/spirv/GlslangToSpv.cpp index 0fd79b1a4..1e0ff3305 100644 --- a/libraries/ZVulkan/src/glslang/spirv/GlslangToSpv.cpp +++ b/libraries/ZVulkan/src/glslang/spirv/GlslangToSpv.cpp @@ -1,7 +1,7 @@ // // Copyright (C) 2014-2016 LunarG, Inc. // Copyright (C) 2015-2020 Google, Inc. -// Copyright (C) 2017, 2022-2024 Arm Limited. +// Copyright (C) 2017, 2022-2025 Arm Limited. // Modifications Copyright (C) 2020 Advanced Micro Devices, Inc. All rights reserved. // // All rights reserved. @@ -173,7 +173,7 @@ protected: spv::LinkageType convertGlslangLinkageToSpv(glslang::TLinkType glslangLinkType); void decorateStructType(const glslang::TType&, const glslang::TTypeList* glslangStruct, glslang::TLayoutPacking, const glslang::TQualifier&, spv::Id, const std::vector& spvMembers); - spv::Id makeArraySizeId(const glslang::TArraySizes&, int dim, bool allowZero = false); + spv::Id makeArraySizeId(const glslang::TArraySizes&, int dim, bool allowZero = false, bool boolType = false); spv::Id accessChainLoad(const glslang::TType& type); void accessChainStore(const glslang::TType& type, spv::Id rvalue); void multiTypeStore(const glslang::TType&, spv::Id rValue); @@ -209,8 +209,9 @@ protected: 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 destType); + glslang::TBasicType resultBasicType, glslang::TBasicType operandBasicType); + spv::Id createIntWidthConversion(spv::Id operand, int vectorSize, spv::Id destType, + glslang::TBasicType resultBasicType, glslang::TBasicType operandBasicType); spv::Id makeSmearedConstant(spv::Id constant, int vectorSize); spv::Id createAtomicOperation(glslang::TOperator op, spv::Decoration precision, spv::Id typeId, std::vector& operands, glslang::TBasicType typeProxy, @@ -568,6 +569,9 @@ spv::MemoryAccessMask TGlslangToSpvTraverser::TranslateMemoryAccess( if (coherentFlags.volatil) { mask = mask | spv::MemoryAccessVolatileMask; } + if (coherentFlags.nontemporal) { + mask = mask | spv::MemoryAccessNontemporalMask; + } if (mask != spv::MemoryAccessMaskNone) { builder.addCapability(spv::CapabilityVulkanMemoryModelKHR); } @@ -594,6 +598,9 @@ spv::ImageOperandsMask TGlslangToSpvTraverser::TranslateImageOperands( if (coherentFlags.volatil) { mask = mask | spv::ImageOperandsVolatileTexelKHRMask; } + if (coherentFlags.nontemporal && builder.getSpvVersion() >= spv::Spv_1_6) { + mask = mask | spv::ImageOperandsNontemporalMask; + } if (mask != spv::ImageOperandsMaskNone) { builder.addCapability(spv::CapabilityVulkanMemoryModelKHR); } @@ -613,6 +620,7 @@ spv::Builder::AccessChain::CoherentFlags TGlslangToSpvTraverser::TranslateCohere flags.subgroupcoherent = type.getQualifier().subgroupcoherent; flags.shadercallcoherent = type.getQualifier().shadercallcoherent; flags.volatil = type.getQualifier().volatil; + flags.nontemporal = type.getQualifier().nontemporal; // *coherent variables are implicitly nonprivate in GLSL flags.nonprivate = type.getQualifier().nonprivate || flags.anyCoherent() || @@ -1021,6 +1029,34 @@ spv::BuiltIn TGlslangToSpvTraverser::TranslateBuiltInDecoration(glslang::TBuiltI builder.addCapability(spv::CapabilityRayTracingDisplacementMicromapNV); builder.addExtension("SPV_NV_displacement_micromap"); return spv::BuiltInHitKindBackFacingMicroTriangleNV; + case glslang::EbvClusterIDNV: + builder.addCapability(spv::CapabilityRayTracingClusterAccelerationStructureNV); + builder.addExtension("SPV_NV_cluster_acceleration_structure"); + return spv::BuiltInClusterIDNV; + case glslang::EbvHitIsSphereNV: + builder.addCapability(spv::CapabilityRayTracingSpheresGeometryNV); + builder.addExtension("SPV_NV_linear_swept_spheres"); + return spv::BuiltInHitIsSphereNV; + case glslang::EbvHitIsLSSNV: + builder.addCapability(spv::CapabilityRayTracingLinearSweptSpheresGeometryNV); + builder.addExtension("SPV_NV_linear_swept_spheres"); + return spv::BuiltInHitIsLSSNV; + case glslang::EbvHitSpherePositionNV: + builder.addCapability(spv::CapabilityRayTracingSpheresGeometryNV); + builder.addExtension("SPV_NV_linear_swept_spheres"); + return spv::BuiltInHitSpherePositionNV; + case glslang::EbvHitSphereRadiusNV: + builder.addCapability(spv::CapabilityRayTracingSpheresGeometryNV); + builder.addExtension("SPV_NV_linear_swept_spheres"); + return spv::BuiltInHitSphereRadiusNV; + case glslang::EbvHitLSSPositionsNV: + builder.addCapability(spv::CapabilityRayTracingLinearSweptSpheresGeometryNV); + builder.addExtension("SPV_NV_linear_swept_spheres"); + return spv::BuiltInHitLSSPositionsNV; + case glslang::EbvHitLSSRadiiNV: + builder.addCapability(spv::CapabilityRayTracingLinearSweptSpheresGeometryNV); + builder.addExtension("SPV_NV_linear_swept_spheres"); + return spv::BuiltInHitLSSRadiiNV; // barycentrics case glslang::EbvBaryCoordNV: @@ -1497,6 +1533,8 @@ void InheritQualifiers(glslang::TQualifier& child, const glslang::TQualifier& pa child.nonprivate = true; if (parent.volatil) child.volatil = true; + if (parent.nontemporal) + child.nontemporal = true; if (parent.restrict) child.restrict = true; if (parent.readonly) @@ -1558,7 +1596,7 @@ TGlslangToSpvTraverser::TGlslangToSpvTraverser(unsigned int spvVersion, else { builder.setEmitSpirvDebugInfo(); } - builder.setDebugSourceFile(glslangIntermediate->getSourceFile()); + builder.setDebugMainSourceFile(glslangIntermediate->getSourceFile()); // Set the source shader's text. If for SPV version 1.0, include // a preamble in comments stating the OpModuleProcessed instructions. @@ -1875,6 +1913,10 @@ TGlslangToSpvTraverser::TGlslangToSpvTraverser(unsigned int spvVersion, case EShLangCallable: { auto& extensions = glslangIntermediate->getRequestedExtensions(); + if (extensions.find("GL_EXT_opacity_micromap") != extensions.end()) { + builder.addCapability(spv::CapabilityRayTracingOpacityMicromapEXT); + builder.addExtension("SPV_EXT_opacity_micromap"); + } if (extensions.find("GL_NV_ray_tracing") == extensions.end()) { builder.addCapability(spv::CapabilityRayTracingKHR); builder.addExtension("SPV_KHR_ray_tracing"); @@ -2040,6 +2082,10 @@ void TGlslangToSpvTraverser::visitSymbol(glslang::TIntermSymbol* symbol) builder.setDebugSourceLocation(symbol->getLoc().line, symbol->getLoc().getFilename()); } + if (symbol->getBasicType() == glslang::EbtFunction) { + return; + } + SpecConstantOpModeGuard spec_constant_op_mode_setter(&builder); if (symbol->getType().isStruct()) glslangTypeToIdMap[symbol->getType().getStruct()] = symbol->getId(); @@ -2567,6 +2613,9 @@ bool TGlslangToSpvTraverser::visitUnary(glslang::TVisit /* visit */, glslang::TI spec_constant_op_mode_setter.turnOnSpecConstantOpMode(); length = builder.createCooperativeMatrixLengthNV(typeId); } + } else if (node->getOperand()->getType().isCoopVecNV()) { + spv::Id typeId = convertGlslangToSpvType(node->getOperand()->getType()); + length = builder.getCooperativeVectorNumComponents(typeId); } else { glslang::TIntermTyped* block = node->getOperand()->getAsBinaryNode()->getLeft(); block->traverse(this); @@ -2646,6 +2695,11 @@ bool TGlslangToSpvTraverser::visitUnary(glslang::TVisit /* visit */, glslang::TI case glslang::EOpHitObjectRecordEmptyNV: case glslang::EOpHitObjectGetShaderBindingTableRecordIndexNV: case glslang::EOpHitObjectGetShaderRecordBufferHandleNV: + case glslang::EOpHitObjectGetClusterIdNV: + case glslang::EOpHitObjectGetSpherePositionNV: + case glslang::EOpHitObjectGetSphereRadiusNV: + case glslang::EOpHitObjectIsSphereHitNV: + case glslang::EOpHitObjectIsLSSHitNV: return true; default: return false; @@ -2682,9 +2736,18 @@ bool TGlslangToSpvTraverser::visitUnary(glslang::TVisit /* visit */, glslang::TI TranslateNonUniformDecoration(node->getType().getQualifier()) }; // it could be a conversion - if (! result) + if (! result) { result = createConversion(node->getOp(), decorations, resultType(), operand, - node->getOperand()->getBasicType()); + node->getType().getBasicType(), node->getOperand()->getBasicType()); + if (result) { + if (node->getType().isCoopMatKHR() && node->getOperand()->getAsTyped()->getType().isCoopMatKHR() && + !node->getAsTyped()->getType().sameCoopMatUse(node->getOperand()->getAsTyped()->getType())) { + // Conversions that change use need CapabilityCooperativeMatrixConversionsNV + builder.addCapability(spv::CapabilityCooperativeMatrixConversionsNV); + builder.addExtension(spv::E_SPV_NV_cooperative_matrix2); + } + } + } // if not, then possibly an operation if (! result) @@ -2806,6 +2869,18 @@ bool TGlslangToSpvTraverser::visitUnary(glslang::TVisit /* visit */, glslang::TI builder.createNoResultOp(spv::OpHitObjectRecordEmptyNV, operand); return false; + case glslang::EOpCreateTensorLayoutNV: + result = builder.createOp(spv::OpCreateTensorLayoutNV, resultType(), std::vector{}); + builder.clearAccessChain(); + builder.setAccessChainRValue(result); + return false; + + case glslang::EOpCreateTensorViewNV: + result = builder.createOp(spv::OpCreateTensorViewNV, resultType(), std::vector{}); + builder.clearAccessChain(); + builder.setAccessChainRValue(result); + return false; + default: logger->missingFunctionality("unknown glslang unary"); return true; // pick up operand as placeholder result @@ -2858,9 +2933,16 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt // SPIR-V, for an out parameter std::vector temporaryLvalues; // temporaries to pass, as proxies for complexLValues - auto resultType = [&invertedType, &node, this](){ return invertedType != spv::NoType ? - invertedType : - convertGlslangToSpvType(node->getType()); }; + auto resultType = [&invertedType, &node, this](){ + if (invertedType != spv::NoType) { + return invertedType; + } else { + auto ret = convertGlslangToSpvType(node->getType()); + // convertGlslangToSpvType may clobber the debug location, reset it + builder.setDebugSourceLocation(node->getLoc().line, node->getLoc().getFilename()); + return ret; + } + }; // try texturing result = createImageTextureFunctionCall(node); @@ -2917,8 +2999,10 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt return false; } else { - if (node->getOp() == glslang::EOpScope) - builder.enterLexicalBlock(0); + if (node->getOp() == glslang::EOpScope) { + auto loc = node->getLoc(); + builder.enterLexicalBlock(loc.line, loc.column); + } } } else { if (sequenceDepth > 1 && node->getOp() == glslang::EOpScope) @@ -2967,6 +3051,12 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt currentFunction->setDebugLineInfo(sourceFileId, loc.line, loc.column); } } else { + if (options.generateDebugInfo) { + if (glslangIntermediate->getSource() == glslang::EShSourceGlsl && node->getSequence().size() > 1) { + auto endLoc = node->getSequence()[1]->getAsAggregate()->getEndLoc(); + builder.setDebugSourceLocation(endLoc.line, endLoc.getFilename()); + } + } if (inEntryPoint) entryPointTerminated = true; builder.leaveFunction(); @@ -3101,6 +3191,7 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt case glslang::EOpConstructReference: case glslang::EOpConstructCooperativeMatrixNV: case glslang::EOpConstructCooperativeMatrixKHR: + case glslang::EOpConstructCooperativeVectorNV: { builder.setDebugSourceLocation(node->getLoc().line, node->getLoc().getFilename()); std::vector arguments; @@ -3116,10 +3207,22 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt constructed = arguments[0]; } else constructed = builder.createOp(spv::OpSampledImage, resultType(), arguments); + } else if (node->getOp() == glslang::EOpConstructCooperativeMatrixKHR && + node->getType().isCoopMatKHR() && node->getSequence()[0]->getAsTyped()->getType().isCoopMatKHR()) { + builder.addCapability(spv::CapabilityCooperativeMatrixConversionsNV); + builder.addExtension(spv::E_SPV_NV_cooperative_matrix2); + constructed = builder.createCooperativeMatrixConversion(resultType(), arguments[0]); + } else if (node->getOp() == glslang::EOpConstructCooperativeVectorNV && + arguments.size() == 1 && + builder.getTypeId(arguments[0]) == resultType()) { + constructed = arguments[0]; } else if (node->getOp() == glslang::EOpConstructStruct || node->getOp() == glslang::EOpConstructCooperativeMatrixNV || node->getOp() == glslang::EOpConstructCooperativeMatrixKHR || - node->getType().isArray()) { + node->getType().isArray() || + // Handle constructing coopvec from one component here, to avoid the component + // getting smeared + (node->getOp() == glslang::EOpConstructCooperativeVectorNV && arguments.size() == 1 && builder.isScalar(arguments[0]))) { std::vector constituents; for (int c = 0; c < (int)arguments.size(); ++c) constituents.push_back(arguments[c]); @@ -3300,6 +3403,17 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt case glslang::EOpCooperativeMatrixStore: case glslang::EOpCooperativeMatrixLoadNV: case glslang::EOpCooperativeMatrixStoreNV: + case glslang::EOpCooperativeMatrixLoadTensorNV: + case glslang::EOpCooperativeMatrixStoreTensorNV: + case glslang::EOpCooperativeMatrixReduceNV: + case glslang::EOpCooperativeMatrixPerElementOpNV: + case glslang::EOpCooperativeMatrixTransposeNV: + case glslang::EOpCooperativeVectorMatMulNV: + case glslang::EOpCooperativeVectorMatMulAddNV: + case glslang::EOpCooperativeVectorLoadNV: + case glslang::EOpCooperativeVectorStoreNV: + case glslang::EOpCooperativeVectorOuterProductAccumulateNV: + case glslang::EOpCooperativeVectorReduceSumAccumulateNV: noReturnValue = true; break; case glslang::EOpBeginInvocationInterlock: @@ -3344,6 +3458,53 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt builder.addExtension(spv::E_SPV_NV_shader_invocation_reorder); builder.addCapability(spv::CapabilityShaderInvocationReorderNV); break; + + case glslang::EOpHitObjectGetLSSPositionsNV: + case glslang::EOpHitObjectGetLSSRadiiNV: + builder.addExtension(spv::E_SPV_NV_linear_swept_spheres); + builder.addCapability(spv::CapabilityShaderInvocationReorderNV); + builder.addCapability(spv::CapabilityRayTracingLinearSweptSpheresGeometryNV); + noReturnValue = true; + break; + + case glslang::EOpHitObjectGetSpherePositionNV: + case glslang::EOpHitObjectGetSphereRadiusNV: + case glslang::EOpHitObjectIsSphereHitNV: + builder.addExtension(spv::E_SPV_NV_linear_swept_spheres); + builder.addCapability(spv::CapabilityShaderInvocationReorderNV); + builder.addCapability(spv::CapabilityRayTracingSpheresGeometryNV); + break; + + case glslang::EOpHitObjectIsLSSHitNV: + builder.addExtension(spv::E_SPV_NV_linear_swept_spheres); + builder.addCapability(spv::CapabilityShaderInvocationReorderNV); + builder.addCapability(spv::CapabilityRayTracingLinearSweptSpheresGeometryNV); + break; + + case glslang::EOpRayQueryGetIntersectionLSSPositionsNV: + case glslang::EOpRayQueryGetIntersectionLSSRadiiNV: + builder.addExtension(spv::E_SPV_NV_linear_swept_spheres); + builder.addCapability(spv::CapabilityRayQueryKHR); + builder.addCapability(spv::CapabilityRayTracingLinearSweptSpheresGeometryNV); + noReturnValue = true; + break; + + case glslang::EOpRayQueryGetIntersectionSpherePositionNV: + case glslang::EOpRayQueryGetIntersectionSphereRadiusNV: + case glslang::EOpRayQueryIsSphereHitNV: + builder.addExtension(spv::E_SPV_NV_linear_swept_spheres); + builder.addCapability(spv::CapabilityRayQueryKHR); + builder.addCapability(spv::CapabilityRayTracingSpheresGeometryNV); + builder.addCapability(spv::CapabilityRayTracingLinearSweptSpheresGeometryNV); + break; + + case glslang::EOpRayQueryGetIntersectionLSSHitValueNV: + case glslang::EOpRayQueryIsLSSHitNV: + builder.addExtension(spv::E_SPV_NV_linear_swept_spheres); + builder.addCapability(spv::CapabilityRayQueryKHR); + builder.addCapability(spv::CapabilityRayTracingLinearSweptSpheresGeometryNV); + break; + case glslang::EOpRayQueryGetIntersectionTriangleVertexPositionsEXT: builder.addExtension(spv::E_SPV_KHR_ray_tracing_position_fetch); builder.addCapability(spv::CapabilityRayQueryPositionFetchKHR); @@ -3386,6 +3547,12 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt builder.addCapability(spv::CapabilityDisplacementMicromapNV); break; + case glslang::EOpRayQueryGetIntersectionClusterIdNV: + builder.addExtension(spv::E_SPV_NV_cluster_acceleration_structure); + builder.addCapability(spv::CapabilityRayQueryKHR); + builder.addCapability(spv::CapabilityRayTracingClusterAccelerationStructureNV); + break; + case glslang::EOpDebugPrintf: noReturnValue = true; break; @@ -3453,10 +3620,16 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt case glslang::EOpHitObjectRecordMissNV: case glslang::EOpHitObjectRecordMissMotionNV: case glslang::EOpHitObjectGetAttributesNV: + case glslang::EOpHitObjectGetClusterIdNV: if (arg == 0) lvalue = true; break; + case glslang::EOpHitObjectGetLSSPositionsNV: + case glslang::EOpHitObjectGetLSSRadiiNV: + lvalue = true; + break; + case glslang::EOpRayQueryInitialize: case glslang::EOpRayQueryTerminate: case glslang::EOpRayQueryConfirmIntersection: @@ -3475,6 +3648,12 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt case glslang::EOpRayQueryGetIntersectionObjectRayOrigin: case glslang::EOpRayQueryGetIntersectionObjectToWorld: case glslang::EOpRayQueryGetIntersectionWorldToObject: + case glslang::EOpRayQueryGetIntersectionClusterIdNV: + case glslang::EOpRayQueryGetIntersectionSpherePositionNV: + case glslang::EOpRayQueryGetIntersectionSphereRadiusNV: + case glslang::EOpRayQueryGetIntersectionLSSHitValueNV: + case glslang::EOpRayQueryIsSphereHitNV: + case glslang::EOpRayQueryIsLSSHitNV: if (arg == 0) lvalue = true; break; @@ -3546,14 +3725,40 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt break; case glslang::EOpCooperativeMatrixLoad: case glslang::EOpCooperativeMatrixLoadNV: + case glslang::EOpCooperativeMatrixLoadTensorNV: + case glslang::EOpCooperativeVectorLoadNV: if (arg == 0 || arg == 1) lvalue = true; break; case glslang::EOpCooperativeMatrixStore: case glslang::EOpCooperativeMatrixStoreNV: + case glslang::EOpCooperativeMatrixStoreTensorNV: + case glslang::EOpCooperativeVectorStoreNV: if (arg == 1) lvalue = true; break; + case glslang::EOpCooperativeVectorMatMulNV: + if (arg == 0 || arg == 3) + lvalue = true; + break; + case glslang::EOpCooperativeVectorMatMulAddNV: + if (arg == 0 || arg == 3 || arg == 6) + lvalue = true; + break; + case glslang::EOpCooperativeVectorOuterProductAccumulateNV: + if (arg == 2) + lvalue = true; + break; + case glslang::EOpCooperativeVectorReduceSumAccumulateNV: + if (arg == 1) + lvalue = true; + break; + case glslang::EOpCooperativeMatrixReduceNV: + case glslang::EOpCooperativeMatrixPerElementOpNV: + case glslang::EOpCooperativeMatrixTransposeNV: + if (arg == 0) + lvalue = true; + break; case glslang::EOpSpirvInst: if (glslangOperands[arg]->getAsTyped()->getQualifier().isSpirvByReference()) lvalue = true; @@ -3564,6 +3769,8 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt lvalue = true; break; case glslang::EOpRayQueryGetIntersectionTriangleVertexPositionsEXT: + case glslang::EOpRayQueryGetIntersectionLSSPositionsNV: + case glslang::EOpRayQueryGetIntersectionLSSRadiiNV: if (arg == 0 || arg == 2) lvalue = true; break; @@ -3576,35 +3783,51 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt else glslangOperands[arg]->traverse(this); - if (node->getOp() == glslang::EOpCooperativeMatrixLoad || - node->getOp() == glslang::EOpCooperativeMatrixStore || - node->getOp() == glslang::EOpCooperativeMatrixLoadNV || - node->getOp() == glslang::EOpCooperativeMatrixStoreNV) { + bool isCoopMat = node->getOp() == glslang::EOpCooperativeMatrixLoad || + node->getOp() == glslang::EOpCooperativeMatrixStore || + node->getOp() == glslang::EOpCooperativeMatrixLoadNV || + node->getOp() == glslang::EOpCooperativeMatrixStoreNV || + node->getOp() == glslang::EOpCooperativeMatrixLoadTensorNV || + node->getOp() == glslang::EOpCooperativeMatrixStoreTensorNV; + bool isCoopVec = node->getOp() == glslang::EOpCooperativeVectorLoadNV || + node->getOp() == glslang::EOpCooperativeVectorStoreNV; + if (isCoopMat || isCoopVec) { if (arg == 1) { - // fold "element" parameter into the access chain - spv::Builder::AccessChain save = builder.getAccessChain(); - builder.clearAccessChain(); - glslangOperands[2]->traverse(this); + spv::Builder::AccessChain::CoherentFlags coherentFlags {}; + unsigned int alignment {}; + if (isCoopMat) { + // fold "element" parameter into the access chain + spv::Builder::AccessChain save = builder.getAccessChain(); + builder.clearAccessChain(); + glslangOperands[2]->traverse(this); - spv::Id elementId = accessChainLoad(glslangOperands[2]->getAsTyped()->getType()); + spv::Id elementId = accessChainLoad(glslangOperands[2]->getAsTyped()->getType()); - builder.setAccessChain(save); + builder.setAccessChain(save); - // Point to the first element of the array. - 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; + // Point to the first element of the array. + builder.accessChainPush(elementId, + TranslateCoherent(glslangOperands[arg]->getAsTyped()->getType()), + glslangOperands[arg]->getAsTyped()->getType().getBufferReferenceAlignment()); + coherentFlags = builder.getAccessChain().coherentFlags; + alignment = builder.getAccessChain().alignment; + } else { + coherentFlags = builder.getAccessChain().coherentFlags; + coherentFlags |= TranslateCoherent(glslangOperands[arg]->getAsTyped()->getType()); + alignment = 16; + } int memoryAccess = TranslateMemoryAccess(coherentFlags); if (node->getOp() == glslang::EOpCooperativeMatrixLoad || - node->getOp() == glslang::EOpCooperativeMatrixLoadNV) + node->getOp() == glslang::EOpCooperativeMatrixLoadNV || + node->getOp() == glslang::EOpCooperativeMatrixLoadTensorNV || + node->getOp() == glslang::EOpCooperativeVectorLoadNV) memoryAccess &= ~spv::MemoryAccessMakePointerAvailableKHRMask; if (node->getOp() == glslang::EOpCooperativeMatrixStore || - node->getOp() == glslang::EOpCooperativeMatrixStoreNV) + node->getOp() == glslang::EOpCooperativeMatrixStoreNV || + node->getOp() == glslang::EOpCooperativeMatrixStoreTensorNV || + node->getOp() == glslang::EOpCooperativeVectorStoreNV) memoryAccess &= ~spv::MemoryAccessMakePointerVisibleKHRMask; if (builder.getStorageClass(builder.getAccessChain().base) == spv::StorageClassPhysicalStorageBufferEXT) { @@ -3622,7 +3845,7 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt memoryAccessOperands.push_back(spv::IdImmediate(true, builder.makeUintConstant(TranslateMemoryScope(coherentFlags)))); } - } else if (arg == 2) { + } else if (isCoopMat && arg == 2) { continue; } } @@ -3661,7 +3884,15 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt glslangOp == glslang::EOpRayQueryGetIntersectionObjectRayOrigin || glslangOp == glslang::EOpRayQueryGetIntersectionObjectToWorld || glslangOp == glslang::EOpRayQueryGetIntersectionWorldToObject || - glslangOp == glslang::EOpRayQueryGetIntersectionTriangleVertexPositionsEXT + glslangOp == glslang::EOpRayQueryGetIntersectionTriangleVertexPositionsEXT || + glslangOp == glslang::EOpRayQueryGetIntersectionClusterIdNV || + glslangOp == glslang::EOpRayQueryGetIntersectionSpherePositionNV || + glslangOp == glslang::EOpRayQueryGetIntersectionSphereRadiusNV || + glslangOp == glslang::EOpRayQueryGetIntersectionLSSHitValueNV || + glslangOp == glslang::EOpRayQueryGetIntersectionLSSPositionsNV || + glslangOp == glslang::EOpRayQueryGetIntersectionLSSRadiiNV || + glslangOp == glslang::EOpRayQueryIsLSSHitNV || + glslangOp == glslang::EOpRayQueryIsSphereHitNV )) { bool cond = glslangOperands[arg]->getAsConstantUnion()->getConstArray()[0].getBConst(); operands.push_back(builder.makeIntConstant(cond ? 1 : 0)); @@ -3691,6 +3922,10 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt } else if (glslangOperands[arg]->getAsTyped()->getQualifier().isSpirvLiteral()) { // Will be translated to a literal value, make a placeholder here operands.push_back(spv::NoResult); + } else if (glslangOperands[arg]->getAsTyped()->getBasicType() == glslang::EbtFunction) { + spv::Function* function = functionMap[glslangOperands[arg]->getAsSymbolNode()->getMangledName().c_str()]; + assert(function); + operands.push_back(function->getId()); } else { operands.push_back(accessChainLoad(glslangOperands[arg]->getAsTyped()->getType())); } @@ -3698,8 +3933,45 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt } builder.setDebugSourceLocation(node->getLoc().line, node->getLoc().getFilename()); - if (node->getOp() == glslang::EOpCooperativeMatrixLoad || - node->getOp() == glslang::EOpCooperativeMatrixLoadNV) { + if (node->getOp() == glslang::EOpCooperativeMatrixLoadTensorNV) { + std::vector idImmOps; + + builder.addCapability(spv::CapabilityCooperativeMatrixTensorAddressingNV); + builder.addExtension(spv::E_SPV_NV_cooperative_matrix2); + + spv::Id object = builder.createLoad(operands[0], spv::NoPrecision); + + idImmOps.push_back(spv::IdImmediate(true, operands[1])); // Pointer + idImmOps.push_back(spv::IdImmediate(true, object)); // Object + idImmOps.push_back(spv::IdImmediate(true, operands[2])); // tensorLayout + + idImmOps.insert(idImmOps.end(), memoryAccessOperands.begin(), memoryAccessOperands.end()); // memoryaccess + + // initialize tensor operands to zero, then OR in flags based on the operands + size_t tensorOpIdx = idImmOps.size(); + idImmOps.push_back(spv::IdImmediate(false, 0)); + + for (uint32_t i = 3; i < operands.size(); ++i) { + if (builder.isTensorView(operands[i])) { + idImmOps[tensorOpIdx].word |= spv::TensorAddressingOperandsTensorViewMask; + } else { + // must be the decode func + idImmOps[tensorOpIdx].word |= spv::TensorAddressingOperandsDecodeFuncMask; + builder.addCapability(spv::CapabilityCooperativeMatrixBlockLoadsNV); + } + idImmOps.push_back(spv::IdImmediate(true, operands[i])); // tensorView or decodeFunc + } + + // get the pointee type + spv::Id typeId = builder.getContainedTypeId(builder.getTypeId(operands[0])); + assert(builder.isCooperativeMatrixType(typeId)); + // do the op + spv::Id result = builder.createOp(spv::OpCooperativeMatrixLoadTensorNV, typeId, idImmOps); + // store the result to the pointer (out param 'm') + builder.createStore(result, operands[0]); + result = 0; + } else if (node->getOp() == glslang::EOpCooperativeMatrixLoad || + node->getOp() == glslang::EOpCooperativeMatrixLoadNV) { std::vector idImmOps; idImmOps.push_back(spv::IdImmediate(true, operands[1])); // buf @@ -3727,6 +3999,28 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt // store the result to the pointer (out param 'm') builder.createStore(result, operands[0]); result = 0; + } else if (node->getOp() == glslang::EOpCooperativeMatrixStoreTensorNV) { + std::vector idImmOps; + + idImmOps.push_back(spv::IdImmediate(true, operands[1])); // buf + idImmOps.push_back(spv::IdImmediate(true, operands[0])); // object + + builder.addCapability(spv::CapabilityCooperativeMatrixTensorAddressingNV); + builder.addExtension(spv::E_SPV_NV_cooperative_matrix2); + + idImmOps.push_back(spv::IdImmediate(true, operands[2])); // tensorLayout + + idImmOps.insert(idImmOps.end(), memoryAccessOperands.begin(), memoryAccessOperands.end()); // memoryaccess + + if (operands.size() > 3) { + idImmOps.push_back(spv::IdImmediate(false, spv::TensorAddressingOperandsTensorViewMask)); + idImmOps.push_back(spv::IdImmediate(true, operands[3])); // tensorView + } else { + idImmOps.push_back(spv::IdImmediate(false, 0)); + } + + builder.createNoResultOp(spv::OpCooperativeMatrixStoreTensorNV, idImmOps); + result = 0; } else if (node->getOp() == glslang::EOpCooperativeMatrixStore || node->getOp() == glslang::EOpCooperativeMatrixStoreNV) { std::vector idImmOps; @@ -3769,6 +4063,65 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt // store the result to the pointer (out param 'm') builder.createStore(result, operands[2]); result = 0; + } else if (node->getOp() == glslang::EOpRayQueryGetIntersectionLSSPositionsNV) { + std::vector idImmOps; + + idImmOps.push_back(spv::IdImmediate(true, operands[0])); // q + idImmOps.push_back(spv::IdImmediate(true, operands[1])); // committed + + spv::Id typeId = builder.makeArrayType(builder.makeVectorType(builder.makeFloatType(32), 3), + builder.makeUintConstant(2), 0); + // do the op + + spv::Op spvOp = spv::OpRayQueryGetIntersectionLSSPositionsNV; + + spv::Id result = builder.createOp(spvOp, typeId, idImmOps); + // store the result to the pointer (out param 'm') + builder.createStore(result, operands[2]); + result = 0; + } else if (node->getOp() == glslang::EOpRayQueryGetIntersectionLSSRadiiNV) { + std::vector idImmOps; + + idImmOps.push_back(spv::IdImmediate(true, operands[0])); // q + idImmOps.push_back(spv::IdImmediate(true, operands[1])); // committed + + spv::Id typeId = builder.makeArrayType(builder.makeFloatType(32), + builder.makeUintConstant(2), 0); + // do the op + + spv::Op spvOp = spv::OpRayQueryGetIntersectionLSSRadiiNV; + + spv::Id result = builder.createOp(spvOp, typeId, idImmOps); + // store the result to the pointer (out param 'm') + builder.createStore(result, operands[2]); + result = 0; + } else if (node->getOp() == glslang::EOpHitObjectGetLSSPositionsNV) { + std::vector idImmOps; + + idImmOps.push_back(spv::IdImmediate(true, operands[0])); // hitObject + + spv::Op spvOp = spv::OpHitObjectGetLSSPositionsNV; + spv::Id typeId = builder.makeArrayType(builder.makeVectorType(builder.makeFloatType(32), 3), + builder.makeUintConstant(2), 0); + + spv::Id result = builder.createOp(spvOp, typeId, idImmOps); + // store the result to the pointer (out param 'm') + builder.createStore(result, operands[1]); + result = 0; + } else if (node->getOp() == glslang::EOpHitObjectGetLSSRadiiNV) { + std::vector idImmOps; + + idImmOps.push_back(spv::IdImmediate(true, operands[0])); // hitObject + + spv::Op spvOp = spv::OpHitObjectGetLSSRadiiNV; + spv::Id typeId = builder.makeArrayType(builder.makeFloatType(32), + builder.makeUintConstant(2), 0); + + spv::Id result = builder.createOp(spvOp, typeId, idImmOps); + // store the result to the pointer (out param 'm') + builder.createStore(result, operands[1]); + result = 0; + } else if (node->getOp() == glslang::EOpCooperativeMatrixMulAdd) { uint32_t matrixOperands = 0; @@ -3795,6 +4148,133 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt idImmOps.push_back(spv::IdImmediate(false, matrixOperands)); result = builder.createOp(spv::OpCooperativeMatrixMulAddKHR, resultType(), idImmOps); + } else if (node->getOp() == glslang::EOpCooperativeMatrixReduceNV) { + builder.addCapability(spv::CapabilityCooperativeMatrixReductionsNV); + builder.addExtension(spv::E_SPV_NV_cooperative_matrix2); + + spv::Op opcode = spv::OpCooperativeMatrixReduceNV; + unsigned mask = glslangOperands[2]->getAsConstantUnion()->getConstArray()[0].getUConst(); + + spv::Id typeId = builder.getContainedTypeId(builder.getTypeId(operands[0])); + assert(builder.isCooperativeMatrixType(typeId)); + + result = builder.createCooperativeMatrixReduce(opcode, typeId, operands[1], mask, operands[3]); + // store the result to the pointer (out param 'm') + builder.createStore(result, operands[0]); + result = 0; + } else if (node->getOp() == glslang::EOpCooperativeMatrixPerElementOpNV) { + builder.addCapability(spv::CapabilityCooperativeMatrixPerElementOperationsNV); + builder.addExtension(spv::E_SPV_NV_cooperative_matrix2); + + spv::Id typeId = builder.getContainedTypeId(builder.getTypeId(operands[0])); + assert(builder.isCooperativeMatrixType(typeId)); + + result = builder.createCooperativeMatrixPerElementOp(typeId, operands); + // store the result to the pointer + builder.createStore(result, operands[0]); + result = 0; + } else if (node->getOp() == glslang::EOpCooperativeMatrixTransposeNV) { + + builder.addCapability(spv::CapabilityCooperativeMatrixConversionsNV); + builder.addExtension(spv::E_SPV_NV_cooperative_matrix2); + + spv::Id typeId = builder.getContainedTypeId(builder.getTypeId(operands[0])); + assert(builder.isCooperativeMatrixType(typeId)); + + result = builder.createUnaryOp(spv::OpCooperativeMatrixTransposeNV, typeId, operands[1]); + // store the result to the pointer + builder.createStore(result, operands[0]); + result = 0; + } else if (node->getOp() == glslang::EOpCooperativeVectorMatMulNV || + node->getOp() == glslang::EOpCooperativeVectorMatMulAddNV) { + uint32_t matrixOperands = 0; + + bool isMulAdd = node->getOp() == glslang::EOpCooperativeVectorMatMulAddNV; + + // Determine Cooperative Matrix Operands bits from the signedness of the types. + + if (isTypeSignedInt(glslangOperands[1]->getAsTyped()->getBasicType())) + matrixOperands |= spv::CooperativeMatrixOperandsMatrixBSignedComponentsKHRMask; + if (isTypeSignedInt(glslangOperands[0]->getAsTyped()->getBasicType())) + matrixOperands |= spv::CooperativeMatrixOperandsMatrixResultSignedComponentsKHRMask; + + uint32_t opIdx = 1; + std::vector idImmOps; + idImmOps.push_back(spv::IdImmediate(true, operands[opIdx++])); // Input + idImmOps.push_back(spv::IdImmediate(true, operands[opIdx++])); // InputInterpretation + idImmOps.push_back(spv::IdImmediate(true, operands[opIdx++])); // Matrix + idImmOps.push_back(spv::IdImmediate(true, operands[opIdx++])); // MatrixOffset + idImmOps.push_back(spv::IdImmediate(true, operands[opIdx++])); // MatrixInterpretation + if (isMulAdd) { + idImmOps.push_back(spv::IdImmediate(true, operands[opIdx++])); // Bias + idImmOps.push_back(spv::IdImmediate(true, operands[opIdx++])); // BiasOffset + idImmOps.push_back(spv::IdImmediate(true, operands[opIdx++])); // BiasInterpretation + } + idImmOps.push_back(spv::IdImmediate(true, operands[opIdx++])); // M + idImmOps.push_back(spv::IdImmediate(true, operands[opIdx++])); // K + idImmOps.push_back(spv::IdImmediate(true, operands[opIdx++])); // MemoryLayout + idImmOps.push_back(spv::IdImmediate(true, operands[opIdx++])); // Transpose + idImmOps.push_back(spv::IdImmediate(true, operands[opIdx++])); // MatrixStride + if (matrixOperands != 0) + idImmOps.push_back(spv::IdImmediate(false, matrixOperands)); // Cooperative Matrix Operands + + // get the pointee type + spv::Id typeId = builder.getContainedTypeId(builder.getTypeId(operands[0])); + assert(builder.isCooperativeVectorType(typeId)); + // do the op + spv::Id result = builder.createOp(isMulAdd ? spv::OpCooperativeVectorMatrixMulAddNV : spv::OpCooperativeVectorMatrixMulNV, typeId, idImmOps); + // store the result to the pointer (out param 'res') + builder.createStore(result, operands[0]); + result = 0; + } else if (node->getOp() == glslang::EOpCooperativeVectorLoadNV) { + std::vector idImmOps; + + idImmOps.push_back(spv::IdImmediate(true, operands[1])); // buf + idImmOps.push_back(spv::IdImmediate(true, operands[2])); // offset + idImmOps.insert(idImmOps.end(), memoryAccessOperands.begin(), memoryAccessOperands.end()); + // get the pointee type + spv::Id typeId = builder.getContainedTypeId(builder.getTypeId(operands[0])); + assert(builder.isCooperativeVectorType(typeId)); + // do the op + spv::Id result = builder.createOp(spv::OpCooperativeVectorLoadNV, typeId, idImmOps); + // store the result to the pointer (out param 'v') + builder.createStore(result, operands[0]); + result = 0; + } else if (node->getOp() == glslang::EOpCooperativeVectorStoreNV) { + std::vector idImmOps; + + idImmOps.push_back(spv::IdImmediate(true, operands[1])); // buf + idImmOps.push_back(spv::IdImmediate(true, operands[2])); // offset + idImmOps.push_back(spv::IdImmediate(true, operands[0])); // object + idImmOps.insert(idImmOps.end(), memoryAccessOperands.begin(), memoryAccessOperands.end()); + builder.createNoResultOp(spv::OpCooperativeVectorStoreNV, idImmOps); + result = 0; + } else if (node->getOp() == glslang::EOpCooperativeVectorOuterProductAccumulateNV) { + builder.addCapability(spv::CapabilityCooperativeVectorTrainingNV); + builder.addExtension(spv::E_SPV_NV_cooperative_vector); + + std::vector idImmOps; + + idImmOps.push_back(spv::IdImmediate(true, operands[2])); // Matrix + idImmOps.push_back(spv::IdImmediate(true, operands[3])); // Offset + idImmOps.push_back(spv::IdImmediate(true, operands[0])); // A + idImmOps.push_back(spv::IdImmediate(true, operands[1])); // B + idImmOps.push_back(spv::IdImmediate(true, operands[5])); // MemoryLayout + idImmOps.push_back(spv::IdImmediate(true, operands[6])); // MatrixInterpretation + idImmOps.push_back(spv::IdImmediate(true, operands[4])); // Stride + builder.createNoResultOp(spv::OpCooperativeVectorOuterProductAccumulateNV, idImmOps); + result = 0; + } else if (node->getOp() == glslang::EOpCooperativeVectorReduceSumAccumulateNV) { + builder.addCapability(spv::CapabilityCooperativeVectorTrainingNV); + builder.addExtension(spv::E_SPV_NV_cooperative_vector); + + std::vector idImmOps; + + idImmOps.push_back(spv::IdImmediate(true, operands[1])); // Buf + idImmOps.push_back(spv::IdImmediate(true, operands[2])); // Offset + idImmOps.push_back(spv::IdImmediate(true, operands[0])); // A + builder.createNoResultOp(spv::OpCooperativeVectorReduceSumAccumulateNV, idImmOps); + result = 0; } else if (atomic) { // Handle all atomics glslang::TBasicType typeProxy = (node->getOp() == glslang::EOpAtomicStore) @@ -4120,7 +4600,7 @@ bool TGlslangToSpvTraverser::visitSwitch(glslang::TVisit /* visit */, glslang::T if (codeSegments[s]) codeSegments[s]->traverse(this); else - builder.addSwitchBreak(); + builder.addSwitchBreak(true); } breakForLoop.pop(); @@ -4144,7 +4624,7 @@ void TGlslangToSpvTraverser::visitConstantUnion(glslang::TIntermConstantUnion* n bool TGlslangToSpvTraverser::visitLoop(glslang::TVisit /* visit */, glslang::TIntermLoop* node) { auto blocks = builder.makeNewLoop(); - builder.createBranch(&blocks.head); + builder.createBranch(true, &blocks.head); // Loop control: std::vector operands; @@ -4161,7 +4641,7 @@ bool TGlslangToSpvTraverser::visitLoop(glslang::TVisit /* visit */, glslang::TIn builder.createLoopMerge(&blocks.merge, &blocks.continue_target, control, operands); if (node->testFirst() && node->getTest()) { spv::Block& test = builder.makeNewBlock(); - builder.createBranch(&test); + builder.createBranch(true, &test); builder.setBuildPoint(&test); node->getTest()->traverse(this); @@ -4172,22 +4652,22 @@ bool TGlslangToSpvTraverser::visitLoop(glslang::TVisit /* visit */, glslang::TIn breakForLoop.push(true); if (node->getBody()) node->getBody()->traverse(this); - builder.createBranch(&blocks.continue_target); + builder.createBranch(true, &blocks.continue_target); breakForLoop.pop(); builder.setBuildPoint(&blocks.continue_target); if (node->getTerminal()) node->getTerminal()->traverse(this); - builder.createBranch(&blocks.head); + builder.createBranch(true, &blocks.head); } else { builder.setDebugSourceLocation(node->getLoc().line, node->getLoc().getFilename()); - builder.createBranch(&blocks.body); + builder.createBranch(true, &blocks.body); breakForLoop.push(true); builder.setBuildPoint(&blocks.body); if (node->getBody()) node->getBody()->traverse(this); - builder.createBranch(&blocks.continue_target); + builder.createBranch(true, &blocks.continue_target); breakForLoop.pop(); builder.setBuildPoint(&blocks.continue_target); @@ -4202,7 +4682,7 @@ bool TGlslangToSpvTraverser::visitLoop(glslang::TVisit /* visit */, glslang::TIn // TODO: unless there was a break/return/discard instruction // somewhere in the body, this is an infinite loop, so we should // issue a warning. - builder.createBranch(&blocks.head); + builder.createBranch(true, &blocks.head); } } builder.setBuildPoint(&blocks.merge); @@ -4238,7 +4718,7 @@ bool TGlslangToSpvTraverser::visitBranch(glslang::TVisit /* visit */, glslang::T if (breakForLoop.top()) builder.createLoopExit(); else - builder.addSwitchBreak(); + builder.addSwitchBreak(false); break; case glslang::EOpContinue: builder.createLoopContinue(); @@ -4372,7 +4852,14 @@ spv::Id TGlslangToSpvTraverser::createSpvVariable(const glslang::TIntermSymbol* initializer = builder.makeNullConstant(spvType); } - return builder.createVariable(spv::NoPrecision, storageClass, spvType, name, initializer, false); + spv::Id var = builder.createVariable(spv::NoPrecision, storageClass, spvType, name, initializer, false); + std::vector topLevelDecorations; + glslang::TQualifier typeQualifier = node->getType().getQualifier(); + TranslateMemoryDecoration(typeQualifier, topLevelDecorations, glslangIntermediate->usingVulkanMemoryModel()); + for (auto deco : topLevelDecorations) { + builder.addDecoration(var, deco); + } + return var; } // Return type Id of the sampled type. @@ -4669,6 +5156,32 @@ spv::Id TGlslangToSpvTraverser::convertGlslangToSpvType(const glslang::TType& ty break; } + case glslang::EbtTensorLayoutNV: + { + builder.addCapability(spv::CapabilityTensorAddressingNV); + builder.addExtension(spv::E_SPV_NV_tensor_addressing); + + std::vector operands; + for (uint32_t i = 0; i < 2; ++i) { + operands.push_back({true, makeArraySizeId(*type.getTypeParameters()->arraySizes, i, true)}); + } + spvType = builder.makeGenericType(spv::OpTypeTensorLayoutNV, operands); + break; + } + case glslang::EbtTensorViewNV: + { + builder.addCapability(spv::CapabilityTensorAddressingNV); + builder.addExtension(spv::E_SPV_NV_tensor_addressing); + + uint32_t dim = type.getTypeParameters()->arraySizes->getDimSize(0); + assert(dim >= 1 && dim <= 5); + std::vector operands; + for (uint32_t i = 0; i < dim + 2; ++i) { + operands.push_back({true, makeArraySizeId(*type.getTypeParameters()->arraySizes, i, true, i==1)}); + } + spvType = builder.makeGenericType(spv::OpTypeTensorViewNV, operands); + break; + } default: assert(0); break; @@ -4718,6 +5231,21 @@ spv::Id TGlslangToSpvTraverser::convertGlslangToSpvType(const glslang::TType& ty spvType = builder.makeCooperativeMatrixTypeKHR(spvType, scope, rows, cols, use); } + if (type.isCoopVecNV()) { + builder.addCapability(spv::CapabilityCooperativeVectorNV); + builder.addExtension(spv::E_SPV_NV_cooperative_vector); + + if (type.getBasicType() == glslang::EbtFloat16) + builder.addCapability(spv::CapabilityFloat16); + if (type.getBasicType() == glslang::EbtUint8 || type.getBasicType() == glslang::EbtInt8) { + builder.addCapability(spv::CapabilityInt8); + } + + spv::Id components = makeArraySizeId(*type.getTypeParameters()->arraySizes, 0); + + spvType = builder.makeCooperativeVectorTypeNV(spvType, components); + } + if (type.isArray()) { int stride = 0; // keep this 0 unless doing an explicit layout; 0 will mean no decoration, no stride @@ -4861,7 +5389,7 @@ bool TGlslangToSpvTraverser::filterMember(const glslang::TType& member) } return false; -}; +} // Do full recursive conversion of a glslang structure (or block) type to a SPIR-V Id. // explicitLayout can be kept the same throughout the hierarchical recursive walk. @@ -5091,7 +5619,7 @@ void TGlslangToSpvTraverser::decorateStructType(const glslang::TType& type, // This is not quite trivial, because of specialization constants. // Sometimes, a raw constant is turned into an Id, and sometimes // a specialization constant expression is. -spv::Id TGlslangToSpvTraverser::makeArraySizeId(const glslang::TArraySizes& arraySizes, int dim, bool allowZero) +spv::Id TGlslangToSpvTraverser::makeArraySizeId(const glslang::TArraySizes& arraySizes, int dim, bool allowZero, bool boolType) { // First, see if this is sized with a node, meaning a specialization constant: glslang::TIntermTyped* specNode = arraySizes.getDimNode(dim); @@ -5109,7 +5637,11 @@ spv::Id TGlslangToSpvTraverser::makeArraySizeId(const glslang::TArraySizes& arra if (!allowZero) assert(size > 0); - return builder.makeUintConstant(size); + if (boolType) { + return builder.makeBoolConstant(size); + } else { + return builder.makeUintConstant(size); + } } // Wrap the builder's accessChainLoad to: @@ -5404,13 +5936,16 @@ void TGlslangToSpvTraverser::updateMemberOffset(const glslang::TType& structType memberAlignment = componentAlignment; // Don't add unnecessary padding after this member - if (memberType.isMatrix()) { - if (matrixLayout == glslang::ElmRowMajor) - memberSize -= componentSize * (4 - memberType.getMatrixCols()); - else - memberSize -= componentSize * (4 - memberType.getMatrixRows()); - } else if (memberType.isArray()) - memberSize -= componentSize * (4 - memberType.getVectorSize()); + // (undo std140 bumping size to a mutliple of vec4) + if (explicitLayout == glslang::ElpStd140) { + if (memberType.isMatrix()) { + if (matrixLayout == glslang::ElmRowMajor) + memberSize -= componentSize * (4 - memberType.getMatrixCols()); + else + memberSize -= componentSize * (4 - memberType.getMatrixRows()); + } else if (memberType.isArray()) + memberSize -= componentSize * (4 - memberType.getVectorSize()); + } } // Bump up to member alignment @@ -5518,12 +6053,16 @@ void TGlslangToSpvTraverser::makeFunctions(const glslang::TIntermSequence& glslF glslang::TIntermAggregate* glslFunction = glslFunctions[f]->getAsAggregate(); if (! glslFunction || glslFunction->getOp() != glslang::EOpFunction) continue; + + builder.setDebugSourceLocation(glslFunction->getLoc().line, glslFunction->getLoc().getFilename()); + if (isShaderEntryPoint(glslFunction)) { + // For HLSL, the entry function is actually a compiler generated function to resolve the difference of + // entry function signature between HLSL and SPIR-V. So we don't emit debug information for that. if (glslangIntermediate->getSource() != glslang::EShSourceHlsl) { - builder.setupDebugFunctionEntry(shaderEntry, glslangIntermediate->getEntryPointMangledName().c_str(), - glslFunction->getLoc().line, - std::vector(), // main function has no param - std::vector()); + builder.setupFunctionDebugInfo(shaderEntry, glslangIntermediate->getEntryPointMangledName().c_str(), + std::vector(), // main function has no param + std::vector()); } continue; } @@ -5576,8 +6115,7 @@ void TGlslangToSpvTraverser::makeFunctions(const glslang::TIntermSequence& glslF TranslatePrecisionDecoration(glslFunction->getType()), convertGlslangToSpvType(glslFunction->getType()), glslFunction->getName().c_str(), convertGlslangLinkageToSpv(glslFunction->getLinkType()), paramTypes, paramDecorations, &functionBlock); - builder.setupDebugFunctionEntry(function, glslFunction->getName().c_str(), glslFunction->getLoc().line, - paramTypes, paramNames); + builder.setupFunctionDebugInfo(function, glslFunction->getName().c_str(), paramTypes, paramNames); if (implicitThis) function->setImplicitThis(); @@ -5788,6 +6326,8 @@ void TGlslangToSpvTraverser::translateArguments(const glslang::TIntermAggregate& lvalue = true; break; case glslang::EOpRayQueryGetIntersectionTriangleVertexPositionsEXT: + case glslang::EOpRayQueryGetIntersectionLSSPositionsNV: + case glslang::EOpRayQueryGetIntersectionLSSRadiiNV: if (i == 2) lvalue = true; break; @@ -6392,6 +6932,10 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO params.volatil = true; } + if (imageType.getQualifier().nontemporal) { + params.nontemporal = true; + } + std::vector result( 1, builder.createTextureCall(precision, resultType(), sparse, cracked.fetch, cracked.proj, cracked.gather, noImplicitLod, params, signExtensionMask()) @@ -6441,6 +6985,9 @@ spv::Id TGlslangToSpvTraverser::handleUserFunctionCall(const glslang::TIntermAgg } } + // Reset source location to the function call location after argument evaluation + builder.setDebugSourceLocation(node->getLoc().line, node->getLoc().getFilename()); + // 2. Allocate space for anything needing a copy, and if it's "in" or "inout" // copy the original into that space. // @@ -6545,16 +7092,24 @@ spv::Id TGlslangToSpvTraverser::createBinaryOperation(glslang::TOperator op, OpD break; case glslang::EOpVectorTimesScalar: case glslang::EOpVectorTimesScalarAssign: - if (isFloat && (builder.isVector(left) || builder.isVector(right))) { - if (builder.isVector(right)) + if (isFloat && (builder.isVector(left) || builder.isVector(right) || builder.isCooperativeVector(left) || builder.isCooperativeVector(right))) { + if (builder.isVector(right) || builder.isCooperativeVector(right)) std::swap(left, right); assert(builder.isScalar(right)); needMatchingVectors = false; binOp = spv::OpVectorTimesScalar; - } else if (isFloat) + } else if (isFloat) { binOp = spv::OpFMul; - else + } else if (builder.isCooperativeVector(left) || builder.isCooperativeVector(right)) { + if (builder.isCooperativeVector(right)) + std::swap(left, right); + assert(builder.isScalar(right)); + // Construct a cooperative vector from the scalar + right = builder.createCompositeConstruct(builder.getTypeId(left), { right }); binOp = spv::OpIMul; + } else { + binOp = spv::OpIMul; + } break; case glslang::EOpVectorTimesMatrix: case glslang::EOpVectorTimesMatrixAssign: @@ -7371,6 +7926,29 @@ spv::Id TGlslangToSpvTraverser::createUnaryOperation(glslang::TOperator op, OpDe unaryOp = spv::OpHitObjectGetShaderRecordBufferHandleNV; break; + case glslang::EOpHitObjectGetClusterIdNV: + unaryOp = spv::OpHitObjectGetClusterIdNV; + builder.addExtension(spv::E_SPV_NV_cluster_acceleration_structure); + builder.addCapability(spv::CapabilityShaderInvocationReorderNV); + builder.addCapability(spv::CapabilityRayTracingClusterAccelerationStructureNV); + break; + + case glslang::EOpHitObjectGetSpherePositionNV: + unaryOp = spv::OpHitObjectGetSpherePositionNV; + break; + + case glslang::EOpHitObjectGetSphereRadiusNV: + unaryOp = spv::OpHitObjectGetSphereRadiusNV; + break; + + case glslang::EOpHitObjectIsSphereHitNV: + unaryOp = spv::OpHitObjectIsSphereHitNV; + break; + + case glslang::EOpHitObjectIsLSSHitNV: + unaryOp = spv::OpHitObjectIsLSSHitNV; + break; + case glslang::EOpFetchMicroTriangleVertexPositionNV: unaryOp = spv::OpFetchMicroTriangleVertexPositionNV; break; @@ -7454,76 +8032,27 @@ spv::Id TGlslangToSpvTraverser::createUnaryMatrixOperation(spv::Op op, OpDecorat // for the signedness conversion. // destType is the final type that will be converted to, but this function // may only be doing part of that conversion. -spv::Id TGlslangToSpvTraverser::createIntWidthConversion(glslang::TOperator op, spv::Id operand, int vectorSize, spv::Id destType) +spv::Id TGlslangToSpvTraverser::createIntWidthConversion(spv::Id operand, int vectorSize, spv::Id destType, + glslang::TBasicType resultBasicType, glslang::TBasicType operandBasicType) { // Get the result type width, based on the type to convert to. - int width = 32; - switch(op) { - case glslang::EOpConvInt16ToUint8: - case glslang::EOpConvIntToUint8: - case glslang::EOpConvInt64ToUint8: - case glslang::EOpConvUint16ToInt8: - case glslang::EOpConvUintToInt8: - case glslang::EOpConvUint64ToInt8: - width = 8; - break; - case glslang::EOpConvInt8ToUint16: - case glslang::EOpConvIntToUint16: - case glslang::EOpConvInt64ToUint16: - case glslang::EOpConvUint8ToInt16: - case glslang::EOpConvUintToInt16: - case glslang::EOpConvUint64ToInt16: - width = 16; - break; - case glslang::EOpConvInt8ToUint: - case glslang::EOpConvInt16ToUint: - case glslang::EOpConvInt64ToUint: - case glslang::EOpConvUint8ToInt: - case glslang::EOpConvUint16ToInt: - case glslang::EOpConvUint64ToInt: - width = 32; - break; - case glslang::EOpConvInt8ToUint64: - case glslang::EOpConvInt16ToUint64: - case glslang::EOpConvIntToUint64: - case glslang::EOpConvUint8ToInt64: - case glslang::EOpConvUint16ToInt64: - case glslang::EOpConvUintToInt64: - width = 64; - break; - - default: - assert(false && "Default missing"); - break; - } + int width = GetNumBits(resultBasicType); // Get the conversion operation and result type, // based on the target width, but the source type. spv::Id type = spv::NoType; spv::Op convOp = spv::OpNop; - switch(op) { - case glslang::EOpConvInt8ToUint16: - case glslang::EOpConvInt8ToUint: - case glslang::EOpConvInt8ToUint64: - case glslang::EOpConvInt16ToUint8: - case glslang::EOpConvInt16ToUint: - case glslang::EOpConvInt16ToUint64: - case glslang::EOpConvIntToUint8: - case glslang::EOpConvIntToUint16: - case glslang::EOpConvIntToUint64: - case glslang::EOpConvInt64ToUint8: - case glslang::EOpConvInt64ToUint16: - case glslang::EOpConvInt64ToUint: + if (isTypeSignedInt(operandBasicType)) { convOp = spv::OpSConvert; type = builder.makeIntType(width); - break; - default: + } else { convOp = spv::OpUConvert; type = builder.makeUintType(width); - break; } - if (vectorSize > 0) + if (builder.getOpCode(destType) == spv::OpTypeCooperativeVectorNV) { + type = builder.makeCooperativeVectorTypeNV(type, builder.getCooperativeVectorNumComponents(destType)); + } else if (vectorSize > 0) type = builder.makeVectorType(type, vectorSize); else if (builder.getOpCode(destType) == spv::OpTypeCooperativeMatrixKHR || builder.getOpCode(destType) == spv::OpTypeCooperativeMatrixNV) { @@ -7535,7 +8064,7 @@ spv::Id TGlslangToSpvTraverser::createIntWidthConversion(glslang::TOperator op, } spv::Id TGlslangToSpvTraverser::createConversion(glslang::TOperator op, OpDecorations& decorations, spv::Id destType, - spv::Id operand, glslang::TBasicType typeProxy) + spv::Id operand, glslang::TBasicType resultBasicType, glslang::TBasicType operandBasicType) { spv::Op convOp = spv::OpNop; spv::Id zero = 0; @@ -7543,317 +8072,124 @@ spv::Id TGlslangToSpvTraverser::createConversion(glslang::TOperator op, OpDecora int vectorSize = builder.isVectorType(destType) ? builder.getNumTypeComponents(destType) : 0; - switch (op) { - case glslang::EOpConvIntToBool: - case glslang::EOpConvUintToBool: - zero = builder.makeUintConstant(0); - zero = makeSmearedConstant(zero, vectorSize); - return builder.createBinOp(spv::OpINotEqual, destType, operand, zero); - case glslang::EOpConvFloatToBool: - zero = builder.makeFloatConstant(0.0F); - zero = makeSmearedConstant(zero, vectorSize); - return builder.createBinOp(spv::OpFUnordNotEqual, destType, operand, zero); - case glslang::EOpConvBoolToFloat: - convOp = spv::OpSelect; - zero = builder.makeFloatConstant(0.0F); - one = builder.makeFloatConstant(1.0F); - break; - - case glslang::EOpConvBoolToInt: - case glslang::EOpConvBoolToInt64: - if (op == glslang::EOpConvBoolToInt64) { - zero = builder.makeInt64Constant(0); - one = builder.makeInt64Constant(1); - } else { - zero = builder.makeIntConstant(0); - one = builder.makeIntConstant(1); + if (IsOpNumericConv(op)) { + if (isTypeSignedInt(operandBasicType) && isTypeFloat(resultBasicType)) { + convOp = spv::OpConvertSToF; } - - convOp = spv::OpSelect; - break; - - case glslang::EOpConvBoolToUint: - case glslang::EOpConvBoolToUint64: - if (op == glslang::EOpConvBoolToUint64) { - zero = builder.makeUint64Constant(0); - one = builder.makeUint64Constant(1); - } else { - zero = builder.makeUintConstant(0); - one = builder.makeUintConstant(1); + if (isTypeUnsignedInt(operandBasicType) && isTypeFloat(resultBasicType)) { + convOp = spv::OpConvertUToF; } + if (isTypeFloat(operandBasicType) && isTypeSignedInt(resultBasicType)) { + convOp = spv::OpConvertFToS; + } + if (isTypeFloat(operandBasicType) && isTypeUnsignedInt(resultBasicType)) { + convOp = spv::OpConvertFToU; + } + if (isTypeSignedInt(operandBasicType) && isTypeSignedInt(resultBasicType)) { + convOp = spv::OpSConvert; + } + if (isTypeUnsignedInt(operandBasicType) && isTypeUnsignedInt(resultBasicType)) { + convOp = spv::OpUConvert; + } + if (isTypeFloat(operandBasicType) && isTypeFloat(resultBasicType)) { + convOp = spv::OpFConvert; + if (builder.isMatrixType(destType)) + return createUnaryMatrixOperation(convOp, decorations, destType, operand, operandBasicType); + } + if (isTypeInt(operandBasicType) && isTypeInt(resultBasicType) && + isTypeUnsignedInt(operandBasicType) != isTypeUnsignedInt(resultBasicType)) { - convOp = spv::OpSelect; - break; + if (GetNumBits(operandBasicType) != GetNumBits(resultBasicType)) { + // OpSConvert/OpUConvert + OpBitCast + operand = createIntWidthConversion(operand, vectorSize, destType, resultBasicType, operandBasicType); + } - case glslang::EOpConvInt8ToFloat16: - case glslang::EOpConvInt8ToFloat: - case glslang::EOpConvInt8ToDouble: - case glslang::EOpConvInt16ToFloat16: - case glslang::EOpConvInt16ToFloat: - case glslang::EOpConvInt16ToDouble: - case glslang::EOpConvIntToFloat16: - case glslang::EOpConvIntToFloat: - case glslang::EOpConvIntToDouble: - case glslang::EOpConvInt64ToFloat: - case glslang::EOpConvInt64ToDouble: - case glslang::EOpConvInt64ToFloat16: - convOp = spv::OpConvertSToF; - break; - - case glslang::EOpConvUint8ToFloat16: - case glslang::EOpConvUint8ToFloat: - case glslang::EOpConvUint8ToDouble: - case glslang::EOpConvUint16ToFloat16: - case glslang::EOpConvUint16ToFloat: - case glslang::EOpConvUint16ToDouble: - case glslang::EOpConvUintToFloat16: - case glslang::EOpConvUintToFloat: - case glslang::EOpConvUintToDouble: - case glslang::EOpConvUint64ToFloat: - case glslang::EOpConvUint64ToDouble: - case glslang::EOpConvUint64ToFloat16: - convOp = spv::OpConvertUToF; - break; - - case glslang::EOpConvFloat16ToInt8: - case glslang::EOpConvFloatToInt8: - case glslang::EOpConvDoubleToInt8: - case glslang::EOpConvFloat16ToInt16: - case glslang::EOpConvFloatToInt16: - case glslang::EOpConvDoubleToInt16: - case glslang::EOpConvFloat16ToInt: - case glslang::EOpConvFloatToInt: - case glslang::EOpConvDoubleToInt: - case glslang::EOpConvFloat16ToInt64: - case glslang::EOpConvFloatToInt64: - case glslang::EOpConvDoubleToInt64: - convOp = spv::OpConvertFToS; - break; - - case glslang::EOpConvUint8ToInt8: - case glslang::EOpConvInt8ToUint8: - case glslang::EOpConvUint16ToInt16: - case glslang::EOpConvInt16ToUint16: - case glslang::EOpConvUintToInt: - case glslang::EOpConvIntToUint: - case glslang::EOpConvUint64ToInt64: - case glslang::EOpConvInt64ToUint64: - if (builder.isInSpecConstCodeGenMode()) { - // Build zero scalar or vector for OpIAdd. - if(op == glslang::EOpConvUint8ToInt8 || op == glslang::EOpConvInt8ToUint8) { - zero = builder.makeUint8Constant(0); - } else if (op == glslang::EOpConvUint16ToInt16 || op == glslang::EOpConvInt16ToUint16) { - zero = builder.makeUint16Constant(0); - } else if (op == glslang::EOpConvUint64ToInt64 || op == glslang::EOpConvInt64ToUint64) { - zero = builder.makeUint64Constant(0); + if (builder.isInSpecConstCodeGenMode()) { + uint32_t bits = GetNumBits(resultBasicType); + spv::Id zeroType = builder.makeUintType(bits); + if (bits == 64) { + zero = builder.makeInt64Constant(zeroType, 0, false); + } else { + zero = builder.makeIntConstant(zeroType, 0, false); + } + zero = makeSmearedConstant(zero, vectorSize); + // Use OpIAdd, instead of OpBitcast to do the conversion when + // generating for OpSpecConstantOp instruction. + return builder.createBinOp(spv::OpIAdd, destType, operand, zero); + } + // For normal run-time conversion instruction, use OpBitcast. + convOp = spv::OpBitcast; + } + if (resultBasicType == glslang::EbtBool) { + uint32_t bits = GetNumBits(operandBasicType); + if (isTypeInt(operandBasicType)) { + spv::Id zeroType = builder.makeUintType(bits); + if (bits == 64) { + zero = builder.makeInt64Constant(zeroType, 0, false); + } else { + zero = builder.makeIntConstant(zeroType, 0, false); + } + zero = makeSmearedConstant(zero, vectorSize); + return builder.createBinOp(spv::OpINotEqual, destType, operand, zero); } else { - zero = builder.makeUintConstant(0); + assert(isTypeFloat(operandBasicType)); + if (bits == 64) { + zero = builder.makeDoubleConstant(0.0); + } else if (bits == 32) { + zero = builder.makeFloatConstant(0.0); + } else { + assert(bits == 16); + zero = builder.makeFloat16Constant(0.0); + } + zero = makeSmearedConstant(zero, vectorSize); + return builder.createBinOp(spv::OpFUnordNotEqual, destType, operand, zero); } - zero = makeSmearedConstant(zero, vectorSize); - // Use OpIAdd, instead of OpBitcast to do the conversion when - // generating for OpSpecConstantOp instruction. - return builder.createBinOp(spv::OpIAdd, destType, operand, zero); } - // For normal run-time conversion instruction, use OpBitcast. - convOp = spv::OpBitcast; - break; - - case glslang::EOpConvFloat16ToUint8: - case glslang::EOpConvFloatToUint8: - case glslang::EOpConvDoubleToUint8: - case glslang::EOpConvFloat16ToUint16: - case glslang::EOpConvFloatToUint16: - case glslang::EOpConvDoubleToUint16: - case glslang::EOpConvFloat16ToUint: - case glslang::EOpConvFloatToUint: - case glslang::EOpConvDoubleToUint: - case glslang::EOpConvFloatToUint64: - case glslang::EOpConvDoubleToUint64: - case glslang::EOpConvFloat16ToUint64: - convOp = spv::OpConvertFToU; - break; - - case glslang::EOpConvInt8ToBool: - case glslang::EOpConvUint8ToBool: - zero = builder.makeUint8Constant(0); - zero = makeSmearedConstant(zero, vectorSize); - return builder.createBinOp(spv::OpINotEqual, destType, operand, zero); - case glslang::EOpConvInt16ToBool: - case glslang::EOpConvUint16ToBool: - zero = builder.makeUint16Constant(0); - zero = makeSmearedConstant(zero, vectorSize); - return builder.createBinOp(spv::OpINotEqual, destType, operand, zero); - case glslang::EOpConvInt64ToBool: - case glslang::EOpConvUint64ToBool: - zero = builder.makeUint64Constant(0); - zero = makeSmearedConstant(zero, vectorSize); - return builder.createBinOp(spv::OpINotEqual, destType, operand, zero); - case glslang::EOpConvDoubleToBool: - zero = builder.makeDoubleConstant(0.0); - zero = makeSmearedConstant(zero, vectorSize); - return builder.createBinOp(spv::OpFUnordNotEqual, destType, operand, zero); - case glslang::EOpConvFloat16ToBool: - zero = builder.makeFloat16Constant(0.0F); - zero = makeSmearedConstant(zero, vectorSize); - return builder.createBinOp(spv::OpFUnordNotEqual, destType, operand, zero); - case glslang::EOpConvBoolToDouble: - convOp = spv::OpSelect; - zero = builder.makeDoubleConstant(0.0); - one = builder.makeDoubleConstant(1.0); - break; - case glslang::EOpConvBoolToFloat16: - convOp = spv::OpSelect; - zero = builder.makeFloat16Constant(0.0F); - one = builder.makeFloat16Constant(1.0F); - break; - case glslang::EOpConvBoolToInt8: - zero = builder.makeInt8Constant(0); - one = builder.makeInt8Constant(1); - convOp = spv::OpSelect; - break; - case glslang::EOpConvBoolToUint8: - zero = builder.makeUint8Constant(0); - one = builder.makeUint8Constant(1); - convOp = spv::OpSelect; - break; - case glslang::EOpConvBoolToInt16: - zero = builder.makeInt16Constant(0); - one = builder.makeInt16Constant(1); - convOp = spv::OpSelect; - break; - case glslang::EOpConvBoolToUint16: - zero = builder.makeUint16Constant(0); - one = builder.makeUint16Constant(1); - convOp = spv::OpSelect; - break; - case glslang::EOpConvDoubleToFloat: - case glslang::EOpConvFloatToDouble: - case glslang::EOpConvDoubleToFloat16: - case glslang::EOpConvFloat16ToDouble: - case glslang::EOpConvFloatToFloat16: - case glslang::EOpConvFloat16ToFloat: - convOp = spv::OpFConvert; - if (builder.isMatrixType(destType)) - return createUnaryMatrixOperation(convOp, decorations, destType, operand, typeProxy); - break; - - case glslang::EOpConvInt8ToInt16: - case glslang::EOpConvInt8ToInt: - case glslang::EOpConvInt8ToInt64: - case glslang::EOpConvInt16ToInt8: - case glslang::EOpConvInt16ToInt: - case glslang::EOpConvInt16ToInt64: - case glslang::EOpConvIntToInt8: - case glslang::EOpConvIntToInt16: - case glslang::EOpConvIntToInt64: - case glslang::EOpConvInt64ToInt8: - case glslang::EOpConvInt64ToInt16: - case glslang::EOpConvInt64ToInt: - convOp = spv::OpSConvert; - break; - - case glslang::EOpConvUint8ToUint16: - case glslang::EOpConvUint8ToUint: - case glslang::EOpConvUint8ToUint64: - case glslang::EOpConvUint16ToUint8: - case glslang::EOpConvUint16ToUint: - case glslang::EOpConvUint16ToUint64: - case glslang::EOpConvUintToUint8: - case glslang::EOpConvUintToUint16: - case glslang::EOpConvUintToUint64: - case glslang::EOpConvUint64ToUint8: - case glslang::EOpConvUint64ToUint16: - case glslang::EOpConvUint64ToUint: - convOp = spv::OpUConvert; - break; - - case glslang::EOpConvInt8ToUint16: - case glslang::EOpConvInt8ToUint: - case glslang::EOpConvInt8ToUint64: - case glslang::EOpConvInt16ToUint8: - case glslang::EOpConvInt16ToUint: - case glslang::EOpConvInt16ToUint64: - case glslang::EOpConvIntToUint8: - case glslang::EOpConvIntToUint16: - case glslang::EOpConvIntToUint64: - case glslang::EOpConvInt64ToUint8: - case glslang::EOpConvInt64ToUint16: - case glslang::EOpConvInt64ToUint: - case glslang::EOpConvUint8ToInt16: - case glslang::EOpConvUint8ToInt: - case glslang::EOpConvUint8ToInt64: - case glslang::EOpConvUint16ToInt8: - case glslang::EOpConvUint16ToInt: - case glslang::EOpConvUint16ToInt64: - case glslang::EOpConvUintToInt8: - case glslang::EOpConvUintToInt16: - case glslang::EOpConvUintToInt64: - case glslang::EOpConvUint64ToInt8: - case glslang::EOpConvUint64ToInt16: - case glslang::EOpConvUint64ToInt: - // OpSConvert/OpUConvert + OpBitCast - operand = createIntWidthConversion(op, operand, vectorSize, destType); - - if (builder.isInSpecConstCodeGenMode()) { - // Build zero scalar or vector for OpIAdd. - switch(op) { - case glslang::EOpConvInt16ToUint8: - case glslang::EOpConvIntToUint8: - case glslang::EOpConvInt64ToUint8: - case glslang::EOpConvUint16ToInt8: - case glslang::EOpConvUintToInt8: - case glslang::EOpConvUint64ToInt8: - zero = builder.makeUint8Constant(0); - break; - case glslang::EOpConvInt8ToUint16: - case glslang::EOpConvIntToUint16: - case glslang::EOpConvInt64ToUint16: - case glslang::EOpConvUint8ToInt16: - case glslang::EOpConvUintToInt16: - case glslang::EOpConvUint64ToInt16: - zero = builder.makeUint16Constant(0); - break; - case glslang::EOpConvInt8ToUint: - case glslang::EOpConvInt16ToUint: - case glslang::EOpConvInt64ToUint: - case glslang::EOpConvUint8ToInt: - case glslang::EOpConvUint16ToInt: - case glslang::EOpConvUint64ToInt: - zero = builder.makeUintConstant(0); - break; - case glslang::EOpConvInt8ToUint64: - case glslang::EOpConvInt16ToUint64: - case glslang::EOpConvIntToUint64: - case glslang::EOpConvUint8ToInt64: - case glslang::EOpConvUint16ToInt64: - case glslang::EOpConvUintToInt64: - zero = builder.makeUint64Constant(0); - break; - default: - assert(false && "Default missing"); - break; + if (operandBasicType == glslang::EbtBool) { + uint32_t bits = GetNumBits(resultBasicType); + convOp = spv::OpSelect; + if (isTypeInt(resultBasicType)) { + spv::Id zeroType = isTypeSignedInt(resultBasicType) ? builder.makeIntType(bits) : builder.makeUintType(bits); + if (bits == 64) { + zero = builder.makeInt64Constant(zeroType, 0, false); + one = builder.makeInt64Constant(zeroType, 1, false); + } else { + zero = builder.makeIntConstant(zeroType, 0, false); + one = builder.makeIntConstant(zeroType, 1, false); + } + } else { + assert(isTypeFloat(resultBasicType)); + if (bits == 64) { + zero = builder.makeDoubleConstant(0.0); + one = builder.makeDoubleConstant(1.0); + } else if (bits == 32) { + zero = builder.makeFloatConstant(0.0); + one = builder.makeFloatConstant(1.0); + } else { + assert(bits == 16); + zero = builder.makeFloat16Constant(0.0); + one = builder.makeFloat16Constant(1.0); + } } - zero = makeSmearedConstant(zero, vectorSize); - // Use OpIAdd, instead of OpBitcast to do the conversion when - // generating for OpSpecConstantOp instruction. - return builder.createBinOp(spv::OpIAdd, destType, operand, zero); } - // For normal run-time conversion instruction, use OpBitcast. - convOp = spv::OpBitcast; - break; - case glslang::EOpConvUint64ToPtr: - convOp = spv::OpConvertUToPtr; - break; - case glslang::EOpConvPtrToUint64: - convOp = spv::OpConvertPtrToU; - break; - case glslang::EOpConvPtrToUvec2: - case glslang::EOpConvUvec2ToPtr: - convOp = spv::OpBitcast; - break; + } - default: - break; + if (convOp == spv::OpNop) { + switch (op) { + case glslang::EOpConvUint64ToPtr: + convOp = spv::OpConvertUToPtr; + break; + case glslang::EOpConvPtrToUint64: + convOp = spv::OpConvertPtrToU; + break; + case glslang::EOpConvPtrToUvec2: + case glslang::EOpConvUvec2ToPtr: + convOp = spv::OpBitcast; + break; + + default: + break; + } } spv::Id result = 0; @@ -8774,7 +9110,13 @@ spv::Id TGlslangToSpvTraverser::createMiscOperation(glslang::TOperator op, spv:: builder.promoteScalar(precision, operands.front(), operands.back()); break; case glslang::EOpModf: - libCall = spv::GLSLstd450Modf; + { + libCall = spv::GLSLstd450ModfStruct; + assert(builder.isFloatType(builder.getScalarTypeId(typeId0))); + // The returned struct has two members of the same type as the first argument + typeId = builder.makeStructResultType(typeId0, typeId0); + consumedOperands = 1; + } break; case glslang::EOpMax: if (isFloat) @@ -8789,7 +9131,49 @@ spv::Id TGlslangToSpvTraverser::createMiscOperation(glslang::TOperator op, spv:: libCall = spv::GLSLstd450Pow; break; case glslang::EOpDot: - opCode = spv::OpDot; + case glslang::EOpDotPackedEXT: + case glslang::EOpDotAccSatEXT: + case glslang::EOpDotPackedAccSatEXT: + { + if (builder.isFloatType(builder.getScalarTypeId(typeId0)) || + // HLSL supports dot(int,int) which is just a multiply + glslangIntermediate->getSource() == glslang::EShSourceHlsl) { + opCode = spv::OpDot; + } else { + builder.addExtension(spv::E_SPV_KHR_integer_dot_product); + builder.addCapability(spv::CapabilityDotProductKHR); + const unsigned int vectorSize = builder.getNumComponents(operands[0]); + if (op == glslang::EOpDotPackedEXT || op == glslang::EOpDotPackedAccSatEXT) { + builder.addCapability(spv::CapabilityDotProductInput4x8BitPackedKHR); + } else if (vectorSize == 4 && builder.getScalarTypeWidth(typeId0) == 8) { + builder.addCapability(spv::CapabilityDotProductInput4x8BitKHR); + } else { + builder.addCapability(spv::CapabilityDotProductInputAllKHR); + } + const bool type0isSigned = builder.isIntType(builder.getScalarTypeId(typeId0)); + const bool type1isSigned = builder.isIntType(builder.getScalarTypeId(typeId1)); + const bool accSat = (op == glslang::EOpDotAccSatEXT || op == glslang::EOpDotPackedAccSatEXT); + if (!type0isSigned && !type1isSigned) { + opCode = accSat ? spv::OpUDotAccSatKHR : spv::OpUDotKHR; + } else if (type0isSigned && type1isSigned) { + opCode = accSat ? spv::OpSDotAccSatKHR : spv::OpSDotKHR; + } else { + opCode = accSat ? spv::OpSUDotAccSatKHR : spv::OpSUDotKHR; + // the spir-v opcode assumes the operands to be "signed, unsigned" in that order, so swap if needed + if (type1isSigned) { + std::swap(operands[0], operands[1]); + } + } + std::vector operands2; + for (auto &o : operands) { + operands2.push_back({true, o}); + } + if (op == glslang::EOpDotPackedEXT || op == glslang::EOpDotPackedAccSatEXT) { + operands2.push_back({false, 0}); + } + return builder.createOp(opCode, typeId, operands2); + } + } break; case glslang::EOpAtan: libCall = spv::GLSLstd450Atan2; @@ -9151,10 +9535,34 @@ spv::Id TGlslangToSpvTraverser::createMiscOperation(glslang::TOperator op, spv:: typeId = builder.makeMatrixType(builder.makeFloatType(32), 4, 3); opCode = spv::OpRayQueryGetIntersectionObjectToWorldKHR; break; + case glslang::EOpRayQueryGetIntersectionClusterIdNV: + typeId = builder.makeIntegerType(32, 1); + opCode = spv::OpRayQueryGetIntersectionClusterIdNV; + break; case glslang::EOpRayQueryGetIntersectionWorldToObject: typeId = builder.makeMatrixType(builder.makeFloatType(32), 4, 3); opCode = spv::OpRayQueryGetIntersectionWorldToObjectKHR; break; + case glslang::EOpRayQueryGetIntersectionSpherePositionNV: + typeId = builder.makeVectorType(builder.makeFloatType(32), 3); + opCode = spv::OpRayQueryGetIntersectionSpherePositionNV; + break; + case glslang::EOpRayQueryGetIntersectionSphereRadiusNV: + typeId = builder.makeFloatType(32); + opCode = spv::OpRayQueryGetIntersectionSphereRadiusNV; + break; + case glslang::EOpRayQueryGetIntersectionLSSHitValueNV: + typeId = builder.makeFloatType(32); + opCode = spv::OpRayQueryGetIntersectionLSSHitValueNV; + break; + case glslang::EOpRayQueryIsSphereHitNV: + typeId = builder.makeBoolType(); + opCode = spv::OpRayQueryIsSphereHitNV; + break; + case glslang::EOpRayQueryIsLSSHitNV: + typeId = builder.makeBoolType(); + opCode = spv::OpRayQueryIsLSSHitNV; + break; case glslang::EOpWritePackedPrimitiveIndices4x8NV: builder.createNoResultOp(spv::OpWritePackedPrimitiveIndices4x8NV, operands); return 0; @@ -9209,6 +9617,14 @@ spv::Id TGlslangToSpvTraverser::createMiscOperation(glslang::TOperator op, spv:: typeId = builder.makeBoolType(); opCode = spv::OpHitObjectIsHitNV; break; + case glslang::EOpHitObjectIsSphereHitNV: + typeId = builder.makeBoolType(); + opCode = spv::OpHitObjectIsSphereHitNV; + break; + case glslang::EOpHitObjectIsLSSHitNV: + typeId = builder.makeBoolType(); + opCode = spv::OpHitObjectIsLSSHitNV; + break; case glslang::EOpHitObjectGetRayTMinNV: typeId = builder.makeFloatType(32); opCode = spv::OpHitObjectGetRayTMinNV; @@ -9276,6 +9692,10 @@ spv::Id TGlslangToSpvTraverser::createMiscOperation(glslang::TOperator op, spv:: typeId = builder.makeVectorType(builder.makeUintType(32), 2); opCode = spv::OpHitObjectGetShaderRecordBufferHandleNV; break; + case glslang::EOpHitObjectGetClusterIdNV: + typeId = builder.makeIntegerType(32, 1); + opCode = spv::OpHitObjectGetClusterIdNV; + break; case glslang::EOpReorderThreadNV: { if (operands.size() == 2) { builder.createNoResultOp(spv::OpReorderThreadWithHintNV, operands); @@ -9342,6 +9762,34 @@ spv::Id TGlslangToSpvTraverser::createMiscOperation(glslang::TOperator op, spv:: addImageProcessing2QCOMDecoration(operands[0], true); addImageProcessing2QCOMDecoration(operands[2], true); break; + case glslang::EOpCreateTensorLayoutNV: + return builder.createOp(spv::OpCreateTensorLayoutNV, typeId, std::vector{}); + case glslang::EOpCreateTensorViewNV: + return builder.createOp(spv::OpCreateTensorViewNV, typeId, std::vector{}); + case glslang::EOpTensorLayoutSetBlockSizeNV: + opCode = spv::OpTensorLayoutSetBlockSizeNV; + break; + case glslang::EOpTensorLayoutSetDimensionNV: + opCode = spv::OpTensorLayoutSetDimensionNV; + break; + case glslang::EOpTensorLayoutSetStrideNV: + opCode = spv::OpTensorLayoutSetStrideNV; + break; + case glslang::EOpTensorLayoutSliceNV: + opCode = spv::OpTensorLayoutSliceNV; + break; + case glslang::EOpTensorLayoutSetClampValueNV: + opCode = spv::OpTensorLayoutSetClampValueNV; + break; + case glslang::EOpTensorViewSetDimensionNV: + opCode = spv::OpTensorViewSetDimensionNV; + break; + case glslang::EOpTensorViewSetStrideNV: + opCode = spv::OpTensorViewSetStrideNV; + break; + case glslang::EOpTensorViewSetClipNV: + opCode = spv::OpTensorViewSetClipNV; + break; default: return 0; } @@ -9397,6 +9845,13 @@ spv::Id TGlslangToSpvTraverser::createMiscOperation(glslang::TOperator op, spv:: builder.createStore(builder.createCompositeExtract(id, typeId0, 0), operands[3]); builder.createStore(builder.createCompositeExtract(id, typeId0, 1), operands[2]); break; + case glslang::EOpModf: + { + assert(operands.size() == 2); + builder.createStore(builder.createCompositeExtract(id, typeId0, 1), operands[1]); + id = builder.createCompositeExtract(id, typeId0, 0); + } + break; case glslang::EOpFrexp: { assert(operands.size() == 2); @@ -9641,6 +10096,10 @@ spv::Id TGlslangToSpvTraverser::getSymbolId(const glslang::TIntermSymbol* symbol } } + if (symbol->getBasicType() == glslang::EbtFunction) { + return 0; + } + id = createSpvVariable(symbol, forcedType.first); if (mayNeedToReuseBuiltIn) { @@ -10018,8 +10477,9 @@ spv::Id TGlslangToSpvTraverser::createSpvConstantFromConstUnionArray(const glsla glslang::TVector::const_iterator iter; for (iter = glslangType.getStruct()->begin(); iter != glslangType.getStruct()->end(); ++iter) spvConsts.push_back(createSpvConstantFromConstUnionArray(*iter->type, consts, nextConst, false)); - } else if (glslangType.getVectorSize() > 1) { - for (unsigned int i = 0; i < (unsigned int)glslangType.getVectorSize(); ++i) { + } else if (glslangType.getVectorSize() > 1 || glslangType.isCoopVecNV()) { + unsigned int numComponents = glslangType.isCoopVecNV() ? glslangType.getTypeParameters()->arraySizes->getDimSize(0) : glslangType.getVectorSize(); + for (unsigned int i = 0; i < numComponents; ++i) { bool zero = nextConst >= consts.size(); switch (glslangType.getBasicType()) { case glslang::EbtInt: @@ -10197,12 +10657,13 @@ bool TGlslangToSpvTraverser::isTrivial(const glslang::TIntermTyped* node) return false; } + if (IsOpNumericConv(node->getAsOperator()->getOp()) && + node->getType().getBasicType() == glslang::EbtBool) { + return true; + } + switch (node->getAsOperator()->getOp()) { case glslang::EOpLogicalNot: - case glslang::EOpConvIntToBool: - case glslang::EOpConvUintToBool: - case glslang::EOpConvFloatToBool: - case glslang::EOpConvDoubleToBool: case glslang::EOpEqual: case glslang::EOpNotEqual: case glslang::EOpLessThan: @@ -10280,7 +10741,7 @@ spv::Id TGlslangToSpvTraverser::getExtBuiltins(const char* name) } } -}; // end anonymous namespace +} // end anonymous namespace namespace glslang { @@ -10417,4 +10878,4 @@ void GlslangToSpv(const TIntermediate& intermediate, std::vector& GetThreadPoolAllocator().pop(); } -}; // end namespace glslang +} // end namespace glslang diff --git a/libraries/ZVulkan/src/glslang/spirv/GlslangToSpv.h b/libraries/ZVulkan/src/glslang/spirv/GlslangToSpv.h index 1b9ef3c51..185819d3d 100644 --- a/libraries/ZVulkan/src/glslang/spirv/GlslangToSpv.h +++ b/libraries/ZVulkan/src/glslang/spirv/GlslangToSpv.h @@ -39,6 +39,7 @@ #include #include "Logger.h" +#include "glslang/glslang/Include/visibility.h" namespace glslang { class TIntermediate; @@ -53,15 +54,16 @@ struct SpvOptions { bool emitNonSemanticShaderDebugInfo {false}; bool emitNonSemanticShaderDebugSource{ false }; bool compileOnly{false}; + bool optimizerAllowExpandedIDBound{false}; }; -void GetSpirvVersion(std::string&); -int GetSpirvGeneratorVersion(); -void GlslangToSpv(const glslang::TIntermediate& intermediate, std::vector& spirv, - SpvOptions* options = nullptr); -void GlslangToSpv(const glslang::TIntermediate& intermediate, std::vector& spirv, - spv::SpvBuildLogger* logger, SpvOptions* options = nullptr); -bool OutputSpvBin(const std::vector& spirv, const char* baseName); -bool OutputSpvHex(const std::vector& spirv, const char* baseName, const char* varName); +GLSLANG_EXPORT void GetSpirvVersion(std::string&); +GLSLANG_EXPORT int GetSpirvGeneratorVersion(); +GLSLANG_EXPORT void GlslangToSpv(const glslang::TIntermediate& intermediate, std::vector& spirv, + SpvOptions* options = nullptr); +GLSLANG_EXPORT void GlslangToSpv(const glslang::TIntermediate& intermediate, std::vector& spirv, + spv::SpvBuildLogger* logger, SpvOptions* options = nullptr); +GLSLANG_EXPORT bool OutputSpvBin(const std::vector& spirv, const char* baseName); +GLSLANG_EXPORT bool OutputSpvHex(const std::vector& spirv, const char* baseName, const char* varName); } diff --git a/libraries/ZVulkan/src/glslang/spirv/Logger.h b/libraries/ZVulkan/src/glslang/spirv/Logger.h index 2e4ddaf51..8cb6ba71d 100644 --- a/libraries/ZVulkan/src/glslang/spirv/Logger.h +++ b/libraries/ZVulkan/src/glslang/spirv/Logger.h @@ -37,12 +37,13 @@ #include #include +#include "glslang/glslang/Include/visibility.h" namespace spv { // A class for holding all SPIR-V build status messages, including // missing/TBD functionalities, warnings, and errors. -class SpvBuildLogger { +class GLSLANG_EXPORT SpvBuildLogger { public: SpvBuildLogger() {} diff --git a/libraries/ZVulkan/src/glslang/spirv/SPVRemapper.cpp b/libraries/ZVulkan/src/glslang/spirv/SPVRemapper.cpp index f8f50a951..fab177319 100644 --- a/libraries/ZVulkan/src/glslang/spirv/SPVRemapper.cpp +++ b/libraries/ZVulkan/src/glslang/spirv/SPVRemapper.cpp @@ -38,7 +38,6 @@ #include #include -#include "../glslang/Include/Common.h" namespace spv { @@ -651,6 +650,40 @@ namespace spv { case spv::OperandExecutionMode: return nextInst; + case spv::OperandMemoryAccess: + { + uint32_t mask = spv[word]; + if (mask & uint32_t(spv::MemoryAccessMask::MemoryAccessAlignedMask)) { + ++word; + --numOperands; + } + if (mask & uint32_t(spv::MemoryAccessMask::MemoryAccessMakePointerAvailableMask | + spv::MemoryAccessMask::MemoryAccessMakePointerVisibleMask)) { + idFn(asId(word+1)); + ++word; + --numOperands; + } + ++word; + } + break; + + case spv::OperandTensorAddressingOperands: + { + uint32_t mask = spv[word]; + if (mask & uint32_t(spv::TensorAddressingOperandsMask::TensorAddressingOperandsTensorViewMask)) { + idFn(asId(word+1)); + ++word; + --numOperands; + } + if (mask & uint32_t(spv::TensorAddressingOperandsMask::TensorAddressingOperandsDecodeFuncMask)) { + idFn(asId(word+1)); + ++word; + --numOperands; + } + ++word; + } + break; + // Single word operands we simply ignore, as they hold no IDs case spv::OperandLiteralNumber: case spv::OperandSource: @@ -675,7 +708,6 @@ namespace spv { case spv::OperandSelect: case spv::OperandLoop: case spv::OperandFunction: - case spv::OperandMemoryAccess: case spv::OperandGroupOperation: case spv::OperandKernelEnqueueFlags: case spv::OperandKernelProfilingInfo: @@ -1352,13 +1384,15 @@ namespace spv { return hash; } - case spv::OpTypeEvent: return 300000; - case spv::OpTypeDeviceEvent: return 300001; - case spv::OpTypeReserveId: return 300002; - case spv::OpTypeQueue: return 300003; - case spv::OpTypePipe: return 300004; - case spv::OpConstantTrue: return 300007; - case spv::OpConstantFalse: return 300008; + case spv::OpTypeEvent: return 300000; + case spv::OpTypeDeviceEvent: return 300001; + case spv::OpTypeReserveId: return 300002; + case spv::OpTypeQueue: return 300003; + case spv::OpTypePipe: return 300004; + case spv::OpConstantTrue: return 300007; + case spv::OpConstantFalse: return 300008; + case spv::OpTypeRayQueryKHR: return 300009; + case spv::OpTypeAccelerationStructureKHR: return 300010; case spv::OpConstantComposite: { std::uint32_t hash = 300011 + hashType(idPos(spv[typeStart+1])); diff --git a/libraries/ZVulkan/src/glslang/spirv/SPVRemapper.h b/libraries/ZVulkan/src/glslang/spirv/SPVRemapper.h index 33efe331e..e60da792f 100644 --- a/libraries/ZVulkan/src/glslang/spirv/SPVRemapper.h +++ b/libraries/ZVulkan/src/glslang/spirv/SPVRemapper.h @@ -41,6 +41,21 @@ #include #include +#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 + namespace spv { class spirvbin_base_t @@ -79,10 +94,11 @@ public: #include "spirv.hpp" namespace spv { -const Id NoResult = 0; + +static inline constexpr Id NoResult = 0; // class to hold SPIR-V binary data for remapping, DCE, and debug stripping -class spirvbin_t : public spirvbin_base_t +class GLSLANG_EXPORT spirvbin_t : public spirvbin_base_t { public: spirvbin_t(int verbose = 0) : entryPoint(spv::NoResult), largestNewId(0), verbose(verbose), errorLatch(false) diff --git a/libraries/ZVulkan/src/glslang/spirv/SpvBuilder.cpp b/libraries/ZVulkan/src/glslang/spirv/SpvBuilder.cpp index b0e6d3063..3d3637c4b 100644 --- a/libraries/ZVulkan/src/glslang/spirv/SpvBuilder.cpp +++ b/libraries/ZVulkan/src/glslang/spirv/SpvBuilder.cpp @@ -439,6 +439,43 @@ Id Builder::makeCooperativeMatrixTypeKHR(Id component, Id scope, Id rows, Id col constantsTypesGlobals.push_back(std::unique_ptr(type)); module.mapInstruction(type); + if (emitNonSemanticShaderDebugInfo) + { + // Find a name for one of the parameters. It can either come from debuginfo for another + // type, or an OpName from a constant. + auto const findName = [&](Id id) { + Id id2 = debugId[id]; + for (auto &t : groupedDebugTypes[NonSemanticShaderDebugInfo100DebugTypeBasic]) { + if (t->getResultId() == id2) { + for (auto &s : strings) { + if (s->getResultId() == t->getIdOperand(2)) { + return s->getNameString(); + } + } + } + } + for (auto &t : names) { + if (t->getIdOperand(0) == id) { + return t->getNameString(); + } + } + return "unknown"; + }; + std::string debugName = "coopmat<"; + debugName += std::string(findName(component)) + ", "; + if (isConstantScalar(scope)) { + debugName += std::string("gl_Scope") + std::string(spv::ScopeToString((spv::Scope)getConstantScalar(scope))) + ", "; + } else { + debugName += std::string(findName(scope)) + ", "; + } + debugName += std::string(findName(rows)) + ", "; + debugName += std::string(findName(cols)) + ">"; + // There's no nonsemantic debug info instruction for cooperative matrix types, + // use opaque composite instead. + auto const debugResultId = makeCompositeDebugType({}, debugName.c_str(), NonSemanticShaderDebugInfo100Structure, true); + debugId[type->getResultId()] = debugResultId; + } + return type->getResultId(); } @@ -478,6 +515,28 @@ Id Builder::makeCooperativeMatrixTypeWithSameShape(Id component, Id otherType) } } +Id Builder::makeCooperativeVectorTypeNV(Id componentType, Id components) +{ + // try to find it + Instruction* type; + for (int t = 0; t < (int)groupedTypes[OpTypeCooperativeVectorNV].size(); ++t) { + type = groupedTypes[OpTypeCooperativeVectorNV][t]; + if (type->getIdOperand(0) == componentType && + type->getIdOperand(1) == components) + return type->getResultId(); + } + + // not found, make it + type = new Instruction(getUniqueId(), NoType, OpTypeCooperativeVectorNV); + type->addIdOperand(componentType); + type->addIdOperand(components); + groupedTypes[OpTypeCooperativeVectorNV].push_back(type); + constantsTypesGlobals.push_back(std::unique_ptr(type)); + module.mapInstruction(type); + + return type->getResultId(); +} + Id Builder::makeGenericType(spv::Op opcode, std::vector& operands) { // try to find it @@ -1326,6 +1385,7 @@ unsigned int Builder::getNumTypeConstituents(Id typeId) const case OpTypeVector: case OpTypeMatrix: return instr->getImmediateOperand(1); + case OpTypeCooperativeVectorNV: case OpTypeArray: { Id lengthId = instr->getIdOperand(1); @@ -1364,6 +1424,7 @@ Id Builder::getScalarTypeId(Id typeId) const case OpTypeArray: case OpTypeRuntimeArray: case OpTypePointer: + case OpTypeCooperativeVectorNV: return getScalarTypeId(getContainedTypeId(typeId)); default: assert(0); @@ -1385,6 +1446,7 @@ Id Builder::getContainedTypeId(Id typeId, int member) const case OpTypeRuntimeArray: case OpTypeCooperativeMatrixKHR: case OpTypeCooperativeMatrixNV: + case OpTypeCooperativeVectorNV: return instr->getIdOperand(0); case OpTypePointer: return instr->getIdOperand(1); @@ -1767,7 +1829,7 @@ Id Builder::importNonSemanticShaderDebugInfoInstructions() return nonSemanticShaderDebugInfo; } -Id Builder::findCompositeConstant(Op typeClass, Id typeId, const std::vector& comps) +Id Builder::findCompositeConstant(Op typeClass, Op opcode, Id typeId, const std::vector& comps, size_t numMembers) { Instruction* constant = nullptr; bool found = false; @@ -1777,6 +1839,13 @@ Id Builder::findCompositeConstant(Op typeClass, Id typeId, const std::vector if (constant->getTypeId() != typeId) continue; + if (constant->getOpCode() != opcode) { + continue; + } + + if (constant->getNumOperands() != (int)numMembers) + continue; + // same contents? bool mismatch = false; for (int op = 0; op < constant->getNumOperands(); ++op) { @@ -1826,7 +1895,7 @@ Id Builder::makeCompositeConstant(Id typeId, const std::vector& members, boo bool replicate = false; size_t numMembers = members.size(); - if (useReplicatedComposites) { + if (useReplicatedComposites || typeClass == OpTypeCooperativeVectorNV) { // use replicate if all members are the same replicate = numMembers > 0 && std::equal(members.begin() + 1, members.end(), members.begin()); @@ -1848,8 +1917,9 @@ Id Builder::makeCompositeConstant(Id typeId, const std::vector& members, boo case OpTypeMatrix: case OpTypeCooperativeMatrixKHR: case OpTypeCooperativeMatrixNV: + case OpTypeCooperativeVectorNV: if (! specConstant) { - Id existing = findCompositeConstant(typeClass, typeId, members); + Id existing = findCompositeConstant(typeClass, opcode, typeId, members, numMembers); if (existing) return existing; } @@ -1979,7 +2049,7 @@ void Builder::addDecoration(Id id, Decoration decoration, int num) if (num >= 0) dec->addImmediateOperand(num); - decorations.push_back(std::unique_ptr(dec)); + decorations.insert(std::unique_ptr(dec)); } void Builder::addDecoration(Id id, Decoration decoration, const char* s) @@ -1993,7 +2063,7 @@ void Builder::addDecoration(Id id, Decoration decoration, const char* s) dec->addImmediateOperand(decoration); dec->addStringOperand(s); - decorations.push_back(std::unique_ptr(dec)); + decorations.insert(std::unique_ptr(dec)); } void Builder::addDecoration(Id id, Decoration decoration, const std::vector& literals) @@ -2008,7 +2078,7 @@ void Builder::addDecoration(Id id, Decoration decoration, const std::vectoraddImmediateOperand(literal); - decorations.push_back(std::unique_ptr(dec)); + decorations.insert(std::unique_ptr(dec)); } void Builder::addDecoration(Id id, Decoration decoration, const std::vector& strings) @@ -2023,7 +2093,7 @@ void Builder::addDecoration(Id id, Decoration decoration, const std::vectoraddStringOperand(string); - decorations.push_back(std::unique_ptr(dec)); + decorations.insert(std::unique_ptr(dec)); } void Builder::addLinkageDecoration(Id id, const char* name, spv::LinkageType linkType) { @@ -2034,7 +2104,7 @@ void Builder::addLinkageDecoration(Id id, const char* name, spv::LinkageType lin dec->addStringOperand(name); dec->addImmediateOperand(linkType); - decorations.push_back(std::unique_ptr(dec)); + decorations.insert(std::unique_ptr(dec)); } void Builder::addDecorationId(Id id, Decoration decoration, Id idDecoration) @@ -2048,7 +2118,7 @@ void Builder::addDecorationId(Id id, Decoration decoration, Id idDecoration) dec->addImmediateOperand(decoration); dec->addIdOperand(idDecoration); - decorations.push_back(std::unique_ptr(dec)); + decorations.insert(std::unique_ptr(dec)); } void Builder::addDecorationId(Id id, Decoration decoration, const std::vector& operandIds) @@ -2064,7 +2134,7 @@ void Builder::addDecorationId(Id id, Decoration decoration, const std::vectoraddIdOperand(operandId); - decorations.push_back(std::unique_ptr(dec)); + decorations.insert(std::unique_ptr(dec)); } void Builder::addMemberDecoration(Id id, unsigned int member, Decoration decoration, int num) @@ -2080,7 +2150,7 @@ void Builder::addMemberDecoration(Id id, unsigned int member, Decoration decorat if (num >= 0) dec->addImmediateOperand(num); - decorations.push_back(std::unique_ptr(dec)); + decorations.insert(std::unique_ptr(dec)); } void Builder::addMemberDecoration(Id id, unsigned int member, Decoration decoration, const char *s) @@ -2095,7 +2165,7 @@ void Builder::addMemberDecoration(Id id, unsigned int member, Decoration decorat dec->addImmediateOperand(decoration); dec->addStringOperand(s); - decorations.push_back(std::unique_ptr(dec)); + decorations.insert(std::unique_ptr(dec)); } void Builder::addMemberDecoration(Id id, unsigned int member, Decoration decoration, const std::vector& literals) @@ -2111,7 +2181,7 @@ void Builder::addMemberDecoration(Id id, unsigned int member, Decoration decorat for (auto literal : literals) dec->addImmediateOperand(literal); - decorations.push_back(std::unique_ptr(dec)); + decorations.insert(std::unique_ptr(dec)); } void Builder::addMemberDecoration(Id id, unsigned int member, Decoration decoration, const std::vector& strings) @@ -2127,10 +2197,16 @@ void Builder::addMemberDecoration(Id id, unsigned int member, Decoration decorat for (auto string : strings) dec->addStringOperand(string); - decorations.push_back(std::unique_ptr(dec)); + decorations.insert(std::unique_ptr(dec)); } void Builder::addInstruction(std::unique_ptr inst) { + // Phis must appear first in their block, don't insert line tracking instructions + // in front of them, just add the OpPhi and return. + if (inst->getOpCode() == OpPhi) { + buildPoint->addInstruction(std::move(inst)); + return; + } // Optionally insert OpDebugScope if (emitNonSemanticShaderDebugInfo && dirtyScopeTracker) { if (buildPoint->updateDebugScope(currentDebugScopeId.top())) { @@ -2176,6 +2252,10 @@ void Builder::addInstruction(std::unique_ptr inst) { buildPoint->addInstruction(std::move(inst)); } +void Builder::addInstructionNoDebugInfo(std::unique_ptr inst) { + buildPoint->addInstruction(std::move(inst)); +} + // Comments in header Function* Builder::makeEntryPoint(const char* entryPoint) { @@ -2236,14 +2316,13 @@ Function* Builder::makeFunctionEntry(Decoration precision, Id returnType, const return function; } -void Builder::setupDebugFunctionEntry(Function* function, const char* name, int line, const std::vector& paramTypes, - const std::vector& paramNames) +void Builder::setupFunctionDebugInfo(Function* function, const char* name, const std::vector& paramTypes, + const std::vector& paramNames) { if (!emitNonSemanticShaderDebugInfo) return; - currentLine = line; Id nameId = getStringId(unmangleFunctionName(name)); Id funcTypeId = function->getFuncTypeId(); assert(debugId[funcTypeId] != 0); @@ -2315,7 +2394,7 @@ Id Builder::makeDebugFunction([[maybe_unused]] Function* function, Id nameId, Id return funcId; } -Id Builder::makeDebugLexicalBlock(uint32_t line) { +Id Builder::makeDebugLexicalBlock(uint32_t line, uint32_t column) { assert(!currentDebugScopeId.empty()); Id lexId = getUniqueId(); @@ -2325,7 +2404,7 @@ Id Builder::makeDebugLexicalBlock(uint32_t line) { lex->addImmediateOperand(NonSemanticShaderDebugInfo100DebugLexicalBlock); lex->addIdOperand(makeDebugSource(currentFileId)); lex->addIdOperand(makeUintConstant(line)); - lex->addIdOperand(makeUintConstant(0)); // column + lex->addIdOperand(makeUintConstant(column)); // column lex->addIdOperand(currentDebugScopeId.top()); // scope constantsTypesGlobals.push_back(std::unique_ptr(lex)); module.mapInstruction(lex); @@ -2358,10 +2437,14 @@ void Builder::makeReturn(bool implicit, Id retVal) } // Comments in header -void Builder::enterLexicalBlock(uint32_t line) +void Builder::enterLexicalBlock(uint32_t line, uint32_t column) { + if (!emitNonSemanticShaderDebugInfo) { + return; + } + // Generate new lexical scope debug instruction - Id lexId = makeDebugLexicalBlock(line); + Id lexId = makeDebugLexicalBlock(line, column); currentDebugScopeId.push(lexId); dirtyScopeTracker = true; } @@ -2369,6 +2452,10 @@ void Builder::enterLexicalBlock(uint32_t line) // Comments in header void Builder::leaveLexicalBlock() { + if (!emitNonSemanticShaderDebugInfo) { + return; + } + // Pop current scope from stack and clear current scope currentDebugScopeId.pop(); dirtyScopeTracker = true; @@ -2967,7 +3054,7 @@ Id Builder::smearScalar(Decoration precision, Id scalar, Id vectorType) assert(getTypeId(scalar) == getScalarTypeId(vectorType)); int numComponents = getNumTypeComponents(vectorType); - if (numComponents == 1) + if (numComponents == 1 && !isCooperativeVectorType(vectorType)) return scalar; Instruction* smear = nullptr; @@ -2984,7 +3071,7 @@ Id Builder::smearScalar(Decoration precision, Id scalar, Id vectorType) auto result_id = makeCompositeConstant(vectorType, members, isSpecConstant(scalar)); smear = module.getInstruction(result_id); } else { - bool replicate = useReplicatedComposites && (numComponents > 0); + bool replicate = (useReplicatedComposites || isCooperativeVectorType(vectorType)) && (numComponents > 0); if (replicate) { numComponents = 1; @@ -3098,6 +3185,9 @@ Id Builder::createTextureCall(Decoration precision, Id resultType, bool sparse, if (parameters.volatil) { mask = mask | ImageOperandsVolatileTexelKHRMask; } + if (parameters.nontemporal) { + mask = mask | ImageOperandsNontemporalMask; + } mask = mask | signExtensionMask; // insert the operand for the mask, if any bits were set. if (mask != ImageOperandsMaskNone) @@ -3371,7 +3461,8 @@ Id Builder::createCompositeCompare(Decoration precision, Id value1, Id value2, b Id Builder::createCompositeConstruct(Id typeId, const std::vector& constituents) { assert(isAggregateType(typeId) || (getNumTypeConstituents(typeId) > 1 && - getNumTypeConstituents(typeId) == constituents.size())); + getNumTypeConstituents(typeId) == constituents.size()) || + (isCooperativeVectorType(typeId) && constituents.size() == 1)); if (generatingOpCodeForSpecConst) { // Sometime, even in spec-constant-op mode, the constant composite to be @@ -3390,7 +3481,7 @@ Id Builder::createCompositeConstruct(Id typeId, const std::vector& constitue bool replicate = false; size_t numConstituents = constituents.size(); - if (useReplicatedComposites) { + if (useReplicatedComposites || isCooperativeVectorType(typeId)) { replicate = numConstituents > 0 && std::equal(constituents.begin() + 1, constituents.end(), constituents.begin()); } @@ -3412,6 +3503,41 @@ Id Builder::createCompositeConstruct(Id typeId, const std::vector& constitue return op->getResultId(); } +// coopmat conversion +Id Builder::createCooperativeMatrixConversion(Id typeId, Id source) +{ + Instruction* op = new Instruction(getUniqueId(), typeId, OpCooperativeMatrixConvertNV); + op->addIdOperand(source); + addInstruction(std::unique_ptr(op)); + + return op->getResultId(); +} + +// coopmat reduce +Id Builder::createCooperativeMatrixReduce(Op opcode, Id typeId, Id source, unsigned int mask, Id func) +{ + Instruction* op = new Instruction(getUniqueId(), typeId, opcode); + op->addIdOperand(source); + op->addImmediateOperand(mask); + op->addIdOperand(func); + addInstruction(std::unique_ptr(op)); + + return op->getResultId(); +} + +// coopmat per-element operation +Id Builder::createCooperativeMatrixPerElementOp(Id typeId, const std::vector& operands) +{ + Instruction* op = new Instruction(getUniqueId(), typeId, spv::OpCooperativeMatrixPerElementOpNV); + // skip operand[0], which is where the result is stored + for (uint32_t i = 1; i < operands.size(); ++i) { + op->addIdOperand(operands[i]); + } + addInstruction(std::unique_ptr(op)); + + return op->getResultId(); +} + // Vector or scalar constructor Id Builder::createConstructor(Decoration precision, const std::vector& sources, Id resultTypeId) { @@ -3421,7 +3547,7 @@ Id Builder::createConstructor(Decoration precision, const std::vector& sourc // Special case: when calling a vector constructor with a single scalar // argument, smear the scalar - if (sources.size() == 1 && isScalar(sources[0]) && numTargetComponents > 1) + if (sources.size() == 1 && isScalar(sources[0]) && (numTargetComponents > 1 || isCooperativeVectorType(resultTypeId))) return smearScalar(precision, sources[0], resultTypeId); // Special case: 2 vectors of equal size @@ -3485,7 +3611,7 @@ Id Builder::createConstructor(Decoration precision, const std::vector& sourc if (isScalar(sources[i]) || isPointer(sources[i])) latchResult(sources[i]); - else if (isVector(sources[i])) + else if (isVector(sources[i]) || isCooperativeVector(sources[i])) accumulateVectorConstituents(sources[i]); else if (isMatrix(sources[i])) accumulateMatrixConstituents(sources[i]); @@ -3654,6 +3780,7 @@ Builder::If::If(Id cond, unsigned int ctrl, Builder& gb) : // Save the current block, so that we can add in the flow control split when // makeEndIf is called. headerBlock = builder.getBuildPoint(); + builder.createSelectionMerge(mergeBlock, control); function->addBlock(thenBlock); builder.setBuildPoint(thenBlock); @@ -3663,7 +3790,7 @@ Builder::If::If(Id cond, unsigned int ctrl, Builder& gb) : void Builder::If::makeBeginElse() { // Close out the "then" by having it jump to the mergeBlock - builder.createBranch(mergeBlock); + builder.createBranch(true, mergeBlock); // Make the first else block and add it to the function elseBlock = new Block(builder.getUniqueId(), *function); @@ -3677,11 +3804,10 @@ void Builder::If::makeBeginElse() void Builder::If::makeEndIf() { // jump to the merge block - builder.createBranch(mergeBlock); + builder.createBranch(true, mergeBlock); // Go back to the headerBlock and make the flow control split builder.setBuildPoint(headerBlock); - builder.createSelectionMerge(mergeBlock, control); if (elseBlock) builder.createConditionalBranch(condition, thenBlock, elseBlock); else @@ -3727,10 +3853,10 @@ void Builder::makeSwitch(Id selector, unsigned int control, int numSegments, con } // Comments in header -void Builder::addSwitchBreak() +void Builder::addSwitchBreak(bool implicit) { // branch to the top of the merge block stack - createBranch(switchMerges.top()); + createBranch(implicit, switchMerges.top()); createAndSetNoPredecessorBlock("post-switch-break"); } @@ -3741,7 +3867,7 @@ void Builder::nextSwitchSegment(std::vector& segmentBlock, int nextSegme if (lastSegment >= 0) { // Close out previous segment by jumping, if necessary, to next segment if (! buildPoint->isTerminated()) - createBranch(segmentBlock[nextSegment]); + createBranch(true, segmentBlock[nextSegment]); } Block* block = segmentBlock[nextSegment]; block->getParent().addBlock(block); @@ -3753,7 +3879,7 @@ void Builder::endSwitch(std::vector& /*segmentBlock*/) { // Close out previous segment by jumping, if necessary, to next segment if (! buildPoint->isTerminated()) - addSwitchBreak(); + addSwitchBreak(true); switchMerges.top()->getParent().addBlock(switchMerges.top()); setBuildPoint(switchMerges.top()); @@ -3786,14 +3912,14 @@ Builder::LoopBlocks& Builder::makeNewLoop() void Builder::createLoopContinue() { - createBranch(&loops.top().continue_target); + createBranch(false, &loops.top().continue_target); // Set up a block for dead code. createAndSetNoPredecessorBlock("post-loop-continue"); } void Builder::createLoopExit() { - createBranch(&loops.top().merge); + createBranch(false, &loops.top().merge); // Set up a block for dead code. createAndSetNoPredecessorBlock("post-loop-break"); } @@ -3932,6 +4058,9 @@ Id Builder::accessChainLoad(Decoration precision, Decoration l_nonUniform, if (constant) { id = createCompositeExtract(accessChain.base, swizzleBase, indexes); setPrecision(id, precision); + } else if (isCooperativeVector(accessChain.base)) { + assert(accessChain.indexChain.size() == 1); + id = createVectorExtractDynamic(accessChain.base, resultType, accessChain.indexChain[0]); } else { Id lValue = NoResult; if (spvVersion >= Spv_1_4 && isValidInitializer(accessChain.base)) { @@ -4235,11 +4364,16 @@ void Builder::createAndSetNoPredecessorBlock(const char* /*name*/) } // Comments in header -void Builder::createBranch(Block* block) +void Builder::createBranch(bool implicit, Block* block) { Instruction* branch = new Instruction(OpBranch); branch->addIdOperand(block->getId()); - addInstruction(std::unique_ptr(branch)); + if (implicit) { + addInstructionNoDebugInfo(std::unique_ptr(branch)); + } + else { + addInstruction(std::unique_ptr(branch)); + } block->addPredecessor(buildPoint); } @@ -4272,7 +4406,10 @@ void Builder::createConditionalBranch(Id condition, Block* thenBlock, Block* els branch->addIdOperand(condition); branch->addIdOperand(thenBlock->getId()); branch->addIdOperand(elseBlock->getId()); - addInstruction(std::unique_ptr(branch)); + + // A conditional branch is always attached to a condition expression + addInstructionNoDebugInfo(std::unique_ptr(branch)); + thenBlock->addPredecessor(buildPoint); elseBlock->addPredecessor(buildPoint); } @@ -4330,11 +4467,10 @@ void Builder::dumpSourceInstructions(std::vector& out) const dumpSourceInstructions(iItr->first, *iItr->second, out); } -void Builder::dumpInstructions(std::vector& out, - const std::vector >& instructions) const +template void Builder::dumpInstructions(std::vector& out, const Range& instructions) const { - for (int i = 0; i < (int)instructions.size(); ++i) { - instructions[i]->dump(out); + for (const auto& inst : instructions) { + inst->dump(out); } } @@ -4347,4 +4483,40 @@ void Builder::dumpModuleProcesses(std::vector& out) const } } +bool Builder::DecorationInstructionLessThan::operator()(const std::unique_ptr& lhs, + const std::unique_ptr& rhs) const +{ + // Order by the id to which the decoration applies first. This is more intuitive. + assert(lhs->isIdOperand(0) && rhs->isIdOperand(0)); + if (lhs->getIdOperand(0) != rhs->getIdOperand(0)) { + return lhs->getIdOperand(0) < rhs->getIdOperand(0); + } + + if (lhs->getOpCode() != rhs->getOpCode()) + return lhs->getOpCode() < rhs->getOpCode(); + + // Now compare the operands. + int minSize = std::min(lhs->getNumOperands(), rhs->getNumOperands()); + for (int i = 1; i < minSize; ++i) { + if (lhs->isIdOperand(i) != rhs->isIdOperand(i)) { + return lhs->isIdOperand(i) < rhs->isIdOperand(i); + } + + if (lhs->isIdOperand(i)) { + if (lhs->getIdOperand(i) != rhs->getIdOperand(i)) { + return lhs->getIdOperand(i) < rhs->getIdOperand(i); + } + } else { + if (lhs->getImmediateOperand(i) != rhs->getImmediateOperand(i)) { + return lhs->getImmediateOperand(i) < rhs->getImmediateOperand(i); + } + } + } + + if (lhs->getNumOperands() != rhs->getNumOperands()) + return lhs->getNumOperands() < rhs->getNumOperands(); + + // In this case they are equal. + return false; +} } // end spv namespace diff --git a/libraries/ZVulkan/src/glslang/spirv/SpvBuilder.h b/libraries/ZVulkan/src/glslang/spirv/SpvBuilder.h index 08057f439..008320fdf 100644 --- a/libraries/ZVulkan/src/glslang/spirv/SpvBuilder.h +++ b/libraries/ZVulkan/src/glslang/spirv/SpvBuilder.h @@ -48,6 +48,7 @@ #define SpvBuilder_H #include "Logger.h" +#define SPV_ENABLE_UTILITY_CODE #include "spirv.hpp" #include "spvIR.h" namespace spv { @@ -56,6 +57,7 @@ namespace spv { } #include +#include #include #include #include @@ -73,6 +75,7 @@ typedef enum { Spv_1_3 = (1 << 16) | (3 << 8), Spv_1_4 = (1 << 16) | (4 << 8), Spv_1_5 = (1 << 16) | (5 << 8), + Spv_1_6 = (1 << 16) | (6 << 8), } SpvVersion; class Builder { @@ -107,7 +110,7 @@ public: spv::Id getMainFileId() const { return mainFileId; } // Initialize the main source file name - void setDebugSourceFile(const std::string& file) + void setDebugMainSourceFile(const std::string& file) { if (trackDebugInfo) { dirtyLineTracker = true; @@ -214,6 +217,7 @@ public: Id makeCooperativeMatrixTypeKHR(Id component, Id scope, Id rows, Id cols, Id use); Id makeCooperativeMatrixTypeNV(Id component, Id scope, Id rows, Id cols); Id makeCooperativeMatrixTypeWithSameShape(Id component, Id otherType); + Id makeCooperativeVectorTypeNV(Id componentType, Id components); Id makeGenericType(spv::Op opcode, std::vector& operands); // SPIR-V NonSemantic Shader DebugInfo Instructions @@ -245,11 +249,14 @@ public: Id makeDebugValue(Id const debugLocalVariable, Id const value); Id makeDebugFunctionType(Id returnType, const std::vector& paramTypes); Id makeDebugFunction(Function* function, Id nameId, Id funcTypeId); - Id makeDebugLexicalBlock(uint32_t line); + Id makeDebugLexicalBlock(uint32_t line, uint32_t column); std::string unmangleFunctionName(std::string const& name) const; - void setupDebugFunctionEntry(Function* function, const char* name, int line, - const std::vector& paramTypes, - const std::vector& paramNames); + + // Initialize non-semantic debug information for a function, including those of: + // - The function definition + // - The function parameters + void setupFunctionDebugInfo(Function* function, const char* name, const std::vector& paramTypes, + const std::vector& paramNames); // accelerationStructureNV type Id makeAccelerationStructureType(); @@ -275,14 +282,17 @@ public: { return (ImageFormat)module.getInstruction(typeId)->getImmediateOperand(6); } Id getResultingAccessChainType() const; Id getIdOperand(Id resultId, int idx) { return module.getInstruction(resultId)->getIdOperand(idx); } + Id getCooperativeVectorNumComponents(Id typeId) const { return module.getInstruction(typeId)->getIdOperand(1); } bool isPointer(Id resultId) const { return isPointerType(getTypeId(resultId)); } bool isScalar(Id resultId) const { return isScalarType(getTypeId(resultId)); } bool isVector(Id resultId) const { return isVectorType(getTypeId(resultId)); } bool isMatrix(Id resultId) const { return isMatrixType(getTypeId(resultId)); } bool isCooperativeMatrix(Id resultId)const { return isCooperativeMatrixType(getTypeId(resultId)); } + bool isCooperativeVector(Id resultId)const { return isCooperativeVectorType(getTypeId(resultId)); } bool isAggregate(Id resultId) const { return isAggregateType(getTypeId(resultId)); } bool isSampledImage(Id resultId) const { return isSampledImageType(getTypeId(resultId)); } + bool isTensorView(Id resultId)const { return isTensorViewType(getTypeId(resultId)); } bool isBoolType(Id typeId) { return groupedTypes[OpTypeBool].size() > 0 && typeId == groupedTypes[OpTypeBool].back()->getResultId(); } @@ -303,6 +313,8 @@ public: { return getTypeClass(typeId) == OpTypeCooperativeMatrixKHR || getTypeClass(typeId) == OpTypeCooperativeMatrixNV; } + bool isTensorViewType(Id typeId) const { return getTypeClass(typeId) == OpTypeTensorViewNV; } + bool isCooperativeVectorType(Id typeId)const { return getTypeClass(typeId) == OpTypeCooperativeVectorNV; } bool isAggregateType(Id typeId) const { return isArrayType(typeId) || isStructType(typeId) || isCooperativeMatrixType(typeId); } bool isImageType(Id typeId) const { return getTypeClass(typeId) == OpTypeImage; } @@ -367,6 +379,8 @@ public: // For making new constants (will return old constant if the requested one was already made). Id makeNullConstant(Id typeId); Id makeBoolConstant(bool b, bool specConstant = false); + Id makeIntConstant(Id typeId, unsigned value, bool specConstant); + Id makeInt64Constant(Id typeId, unsigned long long value, bool specConstant); Id makeInt8Constant(int i, bool specConstant = false) { return makeIntConstant(makeIntType(8), (unsigned)i, specConstant); } Id makeUint8Constant(unsigned u, bool specConstant = false) @@ -416,8 +430,7 @@ public: // Also reset current last DebugScope and current source line to unknown void setBuildPoint(Block* bp) { buildPoint = bp; - // TODO: Technically, change of build point should set line tracker dirty. But we'll have bad line info for - // branch instructions. Commenting this for now because at least this matches the old behavior. + dirtyLineTracker = true; dirtyScopeTracker = true; } Block* getBuildPoint() const { return buildPoint; } @@ -426,6 +439,11 @@ public: // Optionally, additional debug info instructions may also be prepended. void addInstruction(std::unique_ptr inst); + // Append an instruction to the end of the current build point without prepending any debug instructions. + // This is useful for insertion of some debug info instructions themselves or some control flow instructions + // that are attached to its predecessor instruction. + void addInstructionNoDebugInfo(std::unique_ptr inst); + // Make the entry-point function. The returned pointer is only valid // for the lifetime of this builder. Function* makeEntryPoint(const char*); @@ -442,7 +460,7 @@ public: void makeReturn(bool implicit, Id retVal = 0); // Initialize state and generate instructions for new lexical scope - void enterLexicalBlock(uint32_t line); + void enterLexicalBlock(uint32_t line, uint32_t column); // Set state and generate instructions to exit current lexical scope void leaveLexicalBlock(); @@ -573,6 +591,7 @@ public: Id coarse; bool nonprivate; bool volatil; + bool nontemporal; }; // Select the correct texture operation based on all inputs, and emit the correct instruction @@ -600,6 +619,11 @@ public: // matrix constructor Id createMatrixConstructor(Decoration precision, const std::vector& sources, Id constructee); + // coopmat conversion + Id createCooperativeMatrixConversion(Id typeId, Id source); + Id createCooperativeMatrixReduce(Op opcode, Id typeId, Id source, unsigned int mask, Id func); + Id createCooperativeMatrixPerElementOp(Id typeId, const std::vector& operands); + // Helper to use for building nested control flow with if-then-else. class If { public: @@ -639,7 +663,7 @@ public: const std::vector& valueToSegment, int defaultSegment, std::vector& segmentBB); // Add a branch to the innermost switch's merge block. - void addSwitchBreak(); + void addSwitchBreak(bool implicit); // Move to the next code segment, passing in the return argument in makeSwitch() void nextSwitchSegment(std::vector& segmentBB, int segment); @@ -736,6 +760,7 @@ public: unsigned shadercallcoherent : 1; unsigned nonprivate : 1; unsigned volatil : 1; + unsigned nontemporal : 1; unsigned isImage : 1; unsigned nonUniform : 1; @@ -748,6 +773,7 @@ public: shadercallcoherent = 0; nonprivate = 0; volatil = 0; + nontemporal = 0; isImage = 0; nonUniform = 0; } @@ -761,6 +787,7 @@ public: shadercallcoherent |= other.shadercallcoherent; nonprivate |= other.nonprivate; volatil |= other.volatil; + nontemporal = other.nontemporal; isImage |= other.isImage; nonUniform |= other.nonUniform; return *this; @@ -861,7 +888,9 @@ public: void dump(std::vector&) const; - void createBranch(Block* block); + // Add a branch to the target block. + // If set implicit, the branch instruction shouldn't have debug source location. + void createBranch(bool implicit, Block* block); void createConditionalBranch(Id condition, Block* thenBlock, Block* elseBlock); void createLoopMerge(Block* mergeBlock, Block* continueBlock, unsigned int control, const std::vector& operands); @@ -876,11 +905,9 @@ public: void setUseReplicatedComposites(bool use) { useReplicatedComposites = use; } protected: - Id makeIntConstant(Id typeId, unsigned value, bool specConstant); - Id makeInt64Constant(Id typeId, unsigned long long value, bool specConstant); Id findScalarConstant(Op typeClass, Op opcode, Id typeId, unsigned value); Id findScalarConstant(Op typeClass, Op opcode, Id typeId, unsigned v1, unsigned v2); - Id findCompositeConstant(Op typeClass, Id typeId, const std::vector& comps); + Id findCompositeConstant(Op typeClass, Op opcode, Id typeId, const std::vector& comps, size_t numMembers); Id findStructConstant(Id typeId, const std::vector& comps); Id collapseAccessChain(); void remapDynamicSwizzle(); @@ -890,10 +917,13 @@ public: void createSelectionMerge(Block* mergeBlock, unsigned int control); void dumpSourceInstructions(std::vector&) const; void dumpSourceInstructions(const spv::Id fileId, const std::string& text, std::vector&) const; - void dumpInstructions(std::vector&, const std::vector >&) const; + template void dumpInstructions(std::vector& out, const Range& instructions) const; void dumpModuleProcesses(std::vector&) const; spv::MemoryAccessMask sanitizeMemoryAccessForStorageClass(spv::MemoryAccessMask memoryAccess, StorageClass sc) const; + struct DecorationInstructionLessThan { + bool operator()(const std::unique_ptr& lhs, const std::unique_ptr& rhs) const; + }; unsigned int spvVersion; // the version of SPIR-V to emit in the header SourceLanguage sourceLang; @@ -950,7 +980,7 @@ public: std::vector > entryPoints; std::vector > executionModes; std::vector > names; - std::vector > decorations; + std::set, DecorationInstructionLessThan> decorations; std::vector > constantsTypesGlobals; std::vector > externals; std::vector > functions; @@ -990,6 +1020,6 @@ public: SpvBuildLogger* logger; }; // end Builder class -}; // end spv namespace +} // end spv namespace #endif // SpvBuilder_H diff --git a/libraries/ZVulkan/src/glslang/spirv/SpvPostProcess.cpp b/libraries/ZVulkan/src/glslang/spirv/SpvPostProcess.cpp index 5b3fbb565..4cd011028 100644 --- a/libraries/ZVulkan/src/glslang/spirv/SpvPostProcess.cpp +++ b/libraries/ZVulkan/src/glslang/spirv/SpvPostProcess.cpp @@ -387,12 +387,14 @@ void Builder::postProcessCFG() } // Remove unneeded decorations, for unreachable instructions - decorations.erase(std::remove_if(decorations.begin(), decorations.end(), - [&unreachableDefinitions](std::unique_ptr& I) -> bool { - Id decoration_id = I.get()->getIdOperand(0); - return unreachableDefinitions.count(decoration_id) != 0; - }), - decorations.end()); + for (auto decorationIter = decorations.begin(); decorationIter != decorations.end();) { + Id decorationId = (*decorationIter)->getIdOperand(0); + if (unreachableDefinitions.count(decorationId) != 0) { + decorationIter = decorations.erase(decorationIter); + } else { + ++decorationIter; + } + } } // comment in header @@ -546,4 +548,4 @@ void Builder::postProcess(bool compileOnly) postProcessSamplers(); } -}; // end spv namespace +} // end spv namespace diff --git a/libraries/ZVulkan/src/glslang/spirv/SpvTools.cpp b/libraries/ZVulkan/src/glslang/spirv/SpvTools.cpp index ff04f4f96..d1b411f29 100644 --- a/libraries/ZVulkan/src/glslang/spirv/SpvTools.cpp +++ b/libraries/ZVulkan/src/glslang/spirv/SpvTools.cpp @@ -44,6 +44,7 @@ #include "SpvTools.h" #include "spirv-tools/optimizer.hpp" +#include "glslang/MachineIndependent/localintermediate.h" namespace glslang { @@ -70,6 +71,8 @@ spv_target_env MapToSpirvToolsEnv(const SpvVersion& spvVersion, spv::SpvBuildLog return spv_target_env::SPV_ENV_VULKAN_1_2; case glslang::EShTargetVulkan_1_3: return spv_target_env::SPV_ENV_VULKAN_1_3; + case glslang::EShTargetVulkan_1_4: + return spv_target_env::SPV_ENV_VULKAN_1_4; default: break; } @@ -81,6 +84,11 @@ spv_target_env MapToSpirvToolsEnv(const SpvVersion& spvVersion, spv::SpvBuildLog return spv_target_env::SPV_ENV_UNIVERSAL_1_0; } +spv_target_env MapToSpirvToolsEnv(const glslang::TIntermediate& intermediate, spv::SpvBuildLogger* logger) +{ + return MapToSpirvToolsEnv(intermediate.getSpv(), logger); +} + // Callback passed to spvtools::Optimizer::SetMessageConsumer void OptimizerMesssageConsumer(spv_message_level_t level, const char *source, const spv_position_t &position, const char *message) @@ -157,6 +165,7 @@ void SpirvToolsValidate(const glslang::TIntermediate& intermediate, std::vector< spvValidatorOptionsSetBeforeHlslLegalization(options, prelegalization); spvValidatorOptionsSetScalarBlockLayout(options, intermediate.usingScalarBlockLayout()); spvValidatorOptionsSetWorkgroupScalarBlockLayout(options, intermediate.usingScalarBlockLayout()); + spvValidatorOptionsSetAllowOffsetTextureOperand(options, intermediate.usingTextureOffsetNonConst()); spvValidateWithOptions(context, options, &binary, &diagnostic); // report @@ -218,9 +227,20 @@ void SpirvToolsTransform(const glslang::TIntermediate& intermediate, std::vector optimizer.RegisterPass(spvtools::CreateCFGCleanupPass()); spvtools::OptimizerOptions spvOptOptions; + if (options->optimizerAllowExpandedIDBound) + spvOptOptions.set_max_id_bound(0x3FFFFFFF); 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); + + if (options->optimizerAllowExpandedIDBound) { + if (spirv.size() > 3 && spirv[3] > kDefaultMaxIdBound) { + spvtools::Optimizer optimizer2(target_env); + optimizer2.SetMessageConsumer(OptimizerMesssageConsumer); + optimizer2.RegisterPass(spvtools::CreateCompactIdsPass()); + optimizer2.Run(spirv.data(), spirv.size(), &spirv, spvOptOptions); + } + } } bool SpirvToolsAnalyzeDeadOutputStores(spv_target_env target_env, std::vector& spirv, @@ -292,6 +312,6 @@ void SpirvToolsStripDebugInfo(const glslang::TIntermediate& intermediate, optimizer.Run(spirv.data(), spirv.size(), &spirv, spvOptOptions); } -}; // end namespace glslang +} // end namespace glslang #endif diff --git a/libraries/ZVulkan/src/glslang/spirv/SpvTools.h b/libraries/ZVulkan/src/glslang/spirv/SpvTools.h index 3ef053d73..1b2c76404 100644 --- a/libraries/ZVulkan/src/glslang/spirv/SpvTools.h +++ b/libraries/ZVulkan/src/glslang/spirv/SpvTools.h @@ -44,10 +44,12 @@ #if ENABLE_OPT #include #include +#include #include "spirv-tools/libspirv.h" #endif -#include "../glslang/MachineIndependent/localintermediate.h" +#include "glslang/glslang/MachineIndependent/Versions.h" +#include "glslang/glslang/Include/visibility.h" #include "GlslangToSpv.h" #include "Logger.h" @@ -55,45 +57,50 @@ namespace glslang { #if ENABLE_OPT +class TIntermediate; + // Translate glslang's view of target versioning to what SPIRV-Tools uses. -spv_target_env MapToSpirvToolsEnv(const SpvVersion& spvVersion, spv::SpvBuildLogger* logger); +GLSLANG_EXPORT spv_target_env MapToSpirvToolsEnv(const SpvVersion& spvVersion, spv::SpvBuildLogger* logger); +GLSLANG_EXPORT spv_target_env MapToSpirvToolsEnv(const glslang::TIntermediate& intermediate, spv::SpvBuildLogger* logger); // Use the SPIRV-Tools disassembler to print SPIR-V using a SPV_ENV_UNIVERSAL_1_3 environment. -void SpirvToolsDisassemble(std::ostream& out, const std::vector& spirv); +GLSLANG_EXPORT void SpirvToolsDisassemble(std::ostream& out, const std::vector& spirv); // Use the SPIRV-Tools disassembler to print SPIR-V with a provided SPIR-V environment. -void SpirvToolsDisassemble(std::ostream& out, const std::vector& spirv, - spv_target_env requested_context); +GLSLANG_EXPORT void SpirvToolsDisassemble(std::ostream& out, const std::vector& spirv, + spv_target_env requested_context); // Apply the SPIRV-Tools validator to generated SPIR-V. -void SpirvToolsValidate(const glslang::TIntermediate& intermediate, std::vector& spirv, - spv::SpvBuildLogger*, bool prelegalization); +GLSLANG_EXPORT void SpirvToolsValidate(const glslang::TIntermediate& intermediate, std::vector& spirv, + spv::SpvBuildLogger*, bool prelegalization); // 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& spirv, - spv::SpvBuildLogger*, const SpvOptions*); +GLSLANG_EXPORT void SpirvToolsTransform(const glslang::TIntermediate& intermediate, std::vector& spirv, + spv::SpvBuildLogger*, const SpvOptions*); // Apply the SPIRV-Tools EliminateDeadInputComponents pass to generated SPIR-V. Put result in |spirv|. -void SpirvToolsEliminateDeadInputComponents(spv_target_env target_env, std::vector& spirv, - spv::SpvBuildLogger*); +GLSLANG_EXPORT void SpirvToolsEliminateDeadInputComponents(spv_target_env target_env, std::vector& spirv, + spv::SpvBuildLogger*); // Apply the SPIRV-Tools AnalyzeDeadOutputStores pass to generated SPIR-V. Put result in |live_locs|. // Return true if the result is valid. -bool SpirvToolsAnalyzeDeadOutputStores(spv_target_env target_env, std::vector& spirv, - std::unordered_set* live_locs, - std::unordered_set* live_builtins, spv::SpvBuildLogger*); +GLSLANG_EXPORT bool SpirvToolsAnalyzeDeadOutputStores(spv_target_env target_env, std::vector& spirv, + std::unordered_set* live_locs, + std::unordered_set* live_builtins, + spv::SpvBuildLogger*); // Apply the SPIRV-Tools EliminateDeadOutputStores and AggressiveDeadCodeElimination passes to generated SPIR-V using // |live_locs|. Put result in |spirv|. -void SpirvToolsEliminateDeadOutputStores(spv_target_env target_env, std::vector& spirv, - std::unordered_set* live_locs, - std::unordered_set* live_builtins, spv::SpvBuildLogger*); +GLSLANG_EXPORT void SpirvToolsEliminateDeadOutputStores(spv_target_env target_env, std::vector& spirv, + std::unordered_set* live_locs, + std::unordered_set* live_builtins, + spv::SpvBuildLogger*); // 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& spirv, spv::SpvBuildLogger*); +GLSLANG_EXPORT void SpirvToolsStripDebugInfo(const glslang::TIntermediate& intermediate, + std::vector& spirv, spv::SpvBuildLogger*); #endif diff --git a/libraries/ZVulkan/src/glslang/spirv/disassemble.cpp b/libraries/ZVulkan/src/glslang/spirv/disassemble.cpp index ab77610c4..606e8899d 100644 --- a/libraries/ZVulkan/src/glslang/spirv/disassemble.cpp +++ b/libraries/ZVulkan/src/glslang/spirv/disassemble.cpp @@ -36,6 +36,7 @@ // Disassembler for SPIR-V. // +#include #include #include #include @@ -338,6 +339,18 @@ int SpirvStream::disassembleString() return decoderes.first; } +static uint32_t popcount(uint32_t mask) +{ + uint32_t count = 0; + while (mask) { + if (mask & 1) { + count++; + } + mask >>= 1; + } + return count; +} + void SpirvStream::disassembleInstruction(Id resultId, Id /*typeId*/, Op opCode, int numOperands) { // Process the opcode @@ -552,18 +565,41 @@ void SpirvStream::disassembleInstruction(Id resultId, Id /*typeId*/, Op opCode, numOperands -= disassembleString(); return; case OperandMemoryAccess: - outputMask(OperandMemoryAccess, stream[word++]); - --numOperands; - // Aligned is the only memory access operand that uses an immediate - // value, and it is also the first operand that uses a value at all. - if (stream[word-1] & MemoryAccessAlignedMask) { - disassembleImmediates(1); - numOperands--; - if (numOperands) + { + outputMask(OperandMemoryAccess, stream[word++]); + --numOperands; + // Put a space after "None" if there are any remaining operands + if (numOperands && stream[word-1] == 0) { out << " "; + } + uint32_t mask = stream[word-1]; + // Aligned is the only memory access operand that uses an immediate + // value, and it is also the first operand that uses a value at all. + if (mask & MemoryAccessAlignedMask) { + disassembleImmediates(1); + numOperands--; + if (numOperands) + out << " "; + } + + uint32_t bitCount = popcount(mask & (MemoryAccessMakePointerAvailableMask | MemoryAccessMakePointerVisibleMask)); + disassembleIds(bitCount); + numOperands -= bitCount; } - disassembleIds(numOperands); - return; + break; + case OperandTensorAddressingOperands: + { + outputMask(OperandTensorAddressingOperands, stream[word++]); + --numOperands; + // Put a space after "None" if there are any remaining operands + if (numOperands && stream[word-1] == 0) { + out << " "; + } + uint32_t bitCount = popcount(stream[word-1]); + disassembleIds(bitCount); + numOperands -= bitCount; + } + break; default: assert(operandClass >= OperandSource && operandClass < OperandOpcode); @@ -825,4 +861,4 @@ void Disassemble(std::ostream& out, const std::vector& stream) SpirvStream.processInstructions(); } -}; // end namespace spv +} // end namespace spv diff --git a/libraries/ZVulkan/src/glslang/spirv/disassemble.h b/libraries/ZVulkan/src/glslang/spirv/disassemble.h index b6a463577..a6955f84f 100644 --- a/libraries/ZVulkan/src/glslang/spirv/disassemble.h +++ b/libraries/ZVulkan/src/glslang/spirv/disassemble.h @@ -43,10 +43,12 @@ #include #include +#include "glslang/glslang/Include/visibility.h" + namespace spv { // disassemble with glslang custom disassembler - void Disassemble(std::ostream& out, const std::vector&); + GLSLANG_EXPORT void Disassemble(std::ostream& out, const std::vector&); } // end namespace spv diff --git a/libraries/ZVulkan/src/glslang/spirv/doc.cpp b/libraries/ZVulkan/src/glslang/spirv/doc.cpp index 0105caa2e..09f2d76fc 100644 --- a/libraries/ZVulkan/src/glslang/spirv/doc.cpp +++ b/libraries/ZVulkan/src/glslang/spirv/doc.cpp @@ -1,6 +1,6 @@ // // Copyright (C) 2014-2015 LunarG, Inc. -// Copyright (C) 2022-2024 Arm Limited. +// Copyright (C) 2022-2025 Arm Limited. // Modifications Copyright (C) 2020 Advanced Micro Devices, Inc. All rights reserved. // // All rights reserved. @@ -424,6 +424,12 @@ const char* BuiltInString(int builtIn) case BuiltInHitMicroTriangleVertexBarycentricsNV: return "HitMicroTriangleVertexBarycentricsNV"; case BuiltInHitKindFrontFacingMicroTriangleNV: return "HitKindFrontFacingMicroTriangleNV"; case BuiltInHitKindBackFacingMicroTriangleNV: return "HitKindBackFacingMicroTriangleNV"; + case BuiltInHitIsSphereNV: return "HitIsSphereNV"; + case BuiltInHitIsLSSNV: return "HitIsLSSNV"; + case BuiltInHitSpherePositionNV: return "HitSpherePositionNV"; + case BuiltInHitSphereRadiusNV: return "HitSphereRadiusNV"; + case BuiltInHitLSSPositionsNV: return "HitLSSPositionsNV"; + case BuiltInHitLSSRadiiNV: return "HitLLSSRadiiNV"; case BuiltInInstanceCustomIndexKHR: return "InstanceCustomIndexKHR"; case BuiltInRayGeometryIndexKHR: return "RayGeometryIndexKHR"; case BuiltInObjectToWorldKHR: return "ObjectToWorldKHR"; @@ -440,6 +446,7 @@ const char* BuiltInString(int builtIn) // case BuiltInInvocationsPerPixelNV: return "InvocationsPerPixelNV"; // superseded by BuiltInFragInvocationCountEXT case BuiltInBaryCoordKHR: return "BaryCoordKHR"; case BuiltInBaryCoordNoPerspKHR: return "BaryCoordNoPerspKHR"; + case BuiltInClusterIDNV: return "ClusterIDNV"; case BuiltInFragSizeEXT: return "FragSizeEXT"; case BuiltInFragInvocationCountEXT: return "FragInvocationCountEXT"; @@ -630,7 +637,7 @@ const char* ImageChannelDataTypeString(int type) } } -const int ImageOperandsCeiling = 14; +const int ImageOperandsCeiling = 15; const char* ImageOperandsString(int format) { @@ -649,6 +656,7 @@ const char* ImageOperandsString(int format) case ImageOperandsVolatileTexelKHRShift: return "VolatileTexelKHR"; case ImageOperandsSignExtendShift: return "SignExtend"; case ImageOperandsZeroExtendShift: return "ZeroExtend"; + case ImageOperandsNontemporalShift: return "Nontemporal"; case ImageOperandsCeiling: default: @@ -818,6 +826,18 @@ const char* CooperativeMatrixOperandsString(int op) } } +const int TensorAddressingOperandsCeiling = 3; + +const char* TensorAddressingOperandsString(int op) +{ + switch (op) { + case TensorAddressingOperandsTensorViewShift: return "TensorView"; + case TensorAddressingOperandsDecodeFuncShift: return "DecodeFunc"; + + default: return "Bad"; + } +} + const char* ScopeString(int mem) { switch (mem) { @@ -989,6 +1009,7 @@ const char* CapabilityString(int info) case CapabilityRayTraversalPrimitiveCullingKHR: return "RayTraversalPrimitiveCullingKHR"; case CapabilityRayTracingPositionFetchKHR: return "RayTracingPositionFetchKHR"; case CapabilityDisplacementMicromapNV: return "DisplacementMicromapNV"; + case CapabilityRayTracingOpacityMicromapEXT: return "RayTracingOpacityMicromapEXT"; case CapabilityRayTracingDisplacementMicromapNV: return "CapabilityRayTracingDisplacementMicromapNV"; case CapabilityRayQueryPositionFetchKHR: return "RayQueryPositionFetchKHR"; case CapabilityComputeDerivativeGroupQuadsNV: return "ComputeDerivativeGroupQuadsNV"; @@ -1025,8 +1046,18 @@ const char* CapabilityString(int info) case CapabilityCooperativeMatrixNV: return "CooperativeMatrixNV"; case CapabilityCooperativeMatrixKHR: return "CooperativeMatrixKHR"; + case CapabilityCooperativeMatrixReductionsNV: return "CooperativeMatrixReductionsNV"; + case CapabilityCooperativeMatrixConversionsNV: return "CooperativeMatrixConversionsNV"; + case CapabilityCooperativeMatrixPerElementOperationsNV: return "CooperativeMatrixPerElementOperationsNV"; + case CapabilityCooperativeMatrixTensorAddressingNV: return "CooperativeMatrixTensorAddressingNV"; + case CapabilityCooperativeMatrixBlockLoadsNV: return "CooperativeMatrixBlockLoadsNV"; + case CapabilityTensorAddressingNV: return "TensorAddressingNV"; + case CapabilityShaderSMBuiltinsNV: return "ShaderSMBuiltinsNV"; + case CapabilityCooperativeVectorNV: return "CooperativeVectorNV"; + case CapabilityCooperativeVectorTrainingNV: return "CooperativeVectorTrainingNV"; + case CapabilityFragmentShaderSampleInterlockEXT: return "CapabilityFragmentShaderSampleInterlockEXT"; case CapabilityFragmentShaderPixelInterlockEXT: return "CapabilityFragmentShaderPixelInterlockEXT"; case CapabilityFragmentShaderShadingRateInterlockEXT: return "CapabilityFragmentShaderShadingRateInterlockEXT"; @@ -1070,6 +1101,15 @@ const char* CapabilityString(int info) case CapabilityReplicatedCompositesEXT: return "CapabilityReplicatedCompositesEXT"; + case CapabilityDotProductKHR: return "DotProductKHR"; + case CapabilityDotProductInputAllKHR: return "DotProductInputAllKHR"; + case CapabilityDotProductInput4x8BitKHR: return "DotProductInput4x8BitKHR"; + case CapabilityDotProductInput4x8BitPackedKHR: return "DotProductInput4x8BitPackedKHR"; + + case CapabilityRayTracingClusterAccelerationStructureNV: return "RayTracingClusterAccelerationStructureNV"; + + case CapabilityRayTracingSpheresGeometryNV: return "RayTracingSpheresGeometryNV"; + case CapabilityRayTracingLinearSweptSpheresGeometryNV: return "RayTracingLinearSweptSpheresGeometryNV"; default: return "Bad"; } } @@ -1522,6 +1562,15 @@ const char* OpcodeString(int op) case OpRayQueryGetIntersectionObjectToWorldKHR: return "OpRayQueryGetIntersectionObjectToWorldKHR"; case OpRayQueryGetIntersectionWorldToObjectKHR: return "OpRayQueryGetIntersectionWorldToObjectKHR"; case OpRayQueryGetIntersectionTriangleVertexPositionsKHR: return "OpRayQueryGetIntersectionTriangleVertexPositionsKHR"; + case OpRayQueryGetIntersectionClusterIdNV: return "OpRayQueryGetIntersectionClusterIdNV"; + + case OpRayQueryGetIntersectionSpherePositionNV: return "OpRayQueryGetIntersectionSpherePositionNV"; + case OpRayQueryGetIntersectionSphereRadiusNV: return "OpRayQueryGetIntersectionSphereRadiusNV"; + case OpRayQueryGetIntersectionLSSHitValueNV: return "OpRayQueryGetIntersectionLSSHitValueNV"; + case OpRayQueryGetIntersectionLSSPositionsNV: return "OpRayQueryGetIntersectionLSSPositionsNV"; + case OpRayQueryGetIntersectionLSSRadiiNV: return "OpRayQueryGetIntersectionLSSRadiiNV"; + case OpRayQueryIsSphereHitNV: return "OpRayQueryIsSphereHitNV"; + case OpRayQueryIsLSSHitNV: return "OpRayQueryIsLSSHitNV"; case OpTypeCooperativeMatrixNV: return "OpTypeCooperativeMatrixNV"; case OpCooperativeMatrixLoadNV: return "OpCooperativeMatrixLoadNV"; @@ -1536,6 +1585,33 @@ const char* OpcodeString(int op) case OpDemoteToHelperInvocationEXT: return "OpDemoteToHelperInvocationEXT"; case OpIsHelperInvocationEXT: return "OpIsHelperInvocationEXT"; + case OpCooperativeMatrixConvertNV: return "OpCooperativeMatrixConvertNV"; + case OpCooperativeMatrixTransposeNV: return "OpCooperativeMatrixTransposeNV"; + case OpCooperativeMatrixReduceNV: return "OpCooperativeMatrixReduceNV"; + case OpCooperativeMatrixLoadTensorNV: return "OpCooperativeMatrixLoadTensorNV"; + case OpCooperativeMatrixStoreTensorNV: return "OpCooperativeMatrixStoreTensorNV"; + case OpCooperativeMatrixPerElementOpNV: return "OpCooperativeMatrixPerElementOpNV"; + case OpTypeTensorLayoutNV: return "OpTypeTensorLayoutNV"; + case OpTypeTensorViewNV: return "OpTypeTensorViewNV"; + case OpCreateTensorLayoutNV: return "OpCreateTensorLayoutNV"; + case OpTensorLayoutSetBlockSizeNV: return "OpTensorLayoutSetBlockSizeNV"; + case OpTensorLayoutSetDimensionNV: return "OpTensorLayoutSetDimensionNV"; + case OpTensorLayoutSetStrideNV: return "OpTensorLayoutSetStrideNV"; + case OpTensorLayoutSliceNV: return "OpTensorLayoutSliceNV"; + case OpTensorLayoutSetClampValueNV: return "OpTensorLayoutSetClampValueNV"; + case OpCreateTensorViewNV: return "OpCreateTensorViewNV"; + case OpTensorViewSetDimensionNV: return "OpTensorViewSetDimensionNV"; + case OpTensorViewSetStrideNV: return "OpTensorViewSetStrideNV"; + case OpTensorViewSetClipNV: return "OpTensorViewSetClipNV"; + + case OpTypeCooperativeVectorNV: return "OpTypeCooperativeVectorNV"; + case OpCooperativeVectorMatrixMulNV: return "OpCooperativeVectorMatrixMulNV"; + case OpCooperativeVectorMatrixMulAddNV: return "OpCooperativeVectorMatrixMulAddNV"; + case OpCooperativeVectorLoadNV: return "OpCooperativeVectorLoadNV"; + case OpCooperativeVectorStoreNV: return "OpCooperativeVectorStoreNV"; + case OpCooperativeVectorOuterProductAccumulateNV: return "OpCooperativeVectorOuterProductAccumulateNV"; + case OpCooperativeVectorReduceSumAccumulateNV: return "OpCooperativeVectorReduceSumAccumulateNV"; + case OpBeginInvocationInterlockEXT: return "OpBeginInvocationInterlockEXT"; case OpEndInvocationInterlockEXT: return "OpEndInvocationInterlockEXT"; @@ -1572,6 +1648,13 @@ const char* OpcodeString(int op) case OpHitObjectIsMissNV: return "OpHitObjectIsMissNV"; case OpHitObjectGetShaderBindingTableRecordIndexNV: return "OpHitObjectGetShaderBindingTableRecordIndexNV"; case OpHitObjectGetShaderRecordBufferHandleNV: return "OpHitObjectGetShaderRecordBufferHandleNV"; + case OpHitObjectGetClusterIdNV: return "OpHitObjectGetClusterIdNV"; + case OpHitObjectGetSpherePositionNV: return "OpHitObjectGetSpherePositionNV"; + case OpHitObjectGetSphereRadiusNV: return "OpHitObjectGetSphereRadiusNV"; + case OpHitObjectGetLSSPositionsNV: return "OpHitObjectGetLSSPositionsNV"; + case OpHitObjectGetLSSRadiiNV: return "OpHitObjectGetLSSRadiiNV"; + case OpHitObjectIsSphereHitNV: return "OpHitObjectIsSphereHitNV"; + case OpHitObjectIsLSSHitNV: return "OpHitObjectIsLSSHitNV"; case OpFetchMicroTriangleVertexBarycentricNV: return "OpFetchMicroTriangleVertexBarycentricNV"; case OpFetchMicroTriangleVertexPositionNV: return "OpFetchMicroTriangleVertexPositionNV"; @@ -1593,6 +1676,13 @@ const char* OpcodeString(int op) case OpSpecConstantCompositeReplicateEXT: return "OpSpecConstantCompositeReplicateEXT"; case OpCompositeConstructReplicateEXT: return "OpCompositeConstructReplicateEXT"; + case OpSDotKHR: return "OpSDotKHR"; + case OpUDotKHR: return "OpUDotKHR"; + case OpSUDotKHR: return "OpSUDotKHR"; + case OpSDotAccSatKHR: return "OpSDotAccSatKHR"; + case OpUDotAccSatKHR: return "OpUDotAccSatKHR"; + case OpSUDotAccSatKHR: return "OpSUDotAccSatKHR"; + default: return "Bad"; } @@ -1613,6 +1703,7 @@ EnumParameters SelectionControlParams[SelectControlCeiling]; EnumParameters FunctionControlParams[FunctionControlCeiling]; EnumParameters MemoryAccessParams[MemoryAccessCeiling]; EnumParameters CooperativeMatrixOperandsParams[CooperativeMatrixOperandsCeiling]; +EnumParameters TensorAddressingOperandsParams[TensorAddressingOperandsCeiling]; // Set up all the parameterizing descriptions of the opcodes, operands, etc. void Parameterize() @@ -1712,6 +1803,14 @@ void Parameterize() InstructionDesc[OpBeginInvocationInterlockEXT].setResultAndType(false, false); InstructionDesc[OpEndInvocationInterlockEXT].setResultAndType(false, false); InstructionDesc[OpAssumeTrueKHR].setResultAndType(false, false); + InstructionDesc[OpTypeTensorLayoutNV].setResultAndType(true, false); + InstructionDesc[OpTypeTensorViewNV].setResultAndType(true, false); + InstructionDesc[OpCooperativeMatrixStoreTensorNV].setResultAndType(false, false); + InstructionDesc[OpTypeCooperativeVectorNV].setResultAndType(true, false); + InstructionDesc[OpCooperativeVectorStoreNV].setResultAndType(false, false); + InstructionDesc[OpCooperativeVectorOuterProductAccumulateNV].setResultAndType(false, false); + InstructionDesc[OpCooperativeVectorReduceSumAccumulateNV].setResultAndType(false, false); + // Specific additional context-dependent operands ExecutionModeOperands[ExecutionModeInvocations].push(OperandLiteralNumber, "'Number of <>'"); @@ -1781,6 +1880,7 @@ void Parameterize() OperandClassParams[OperandKernelProfilingInfo].set(0, KernelProfilingInfoString, nullptr, true); OperandClassParams[OperandCapability].set(0, CapabilityString, nullptr); OperandClassParams[OperandCooperativeMatrixOperands].set(CooperativeMatrixOperandsCeiling, CooperativeMatrixOperandsString, CooperativeMatrixOperandsParams, true); + OperandClassParams[OperandTensorAddressingOperands].set(TensorAddressingOperandsCeiling, TensorAddressingOperandsString, TensorAddressingOperandsParams, true); OperandClassParams[OperandOpcode].set(OpCodeMask + 1, OpcodeString, nullptr); // set name of operator, an initial set of style operands, and the description @@ -3142,6 +3242,37 @@ void Parameterize() InstructionDesc[OpRayQueryGetIntersectionTriangleVertexPositionsKHR].operands.push(OperandId, "'Committed'"); InstructionDesc[OpRayQueryGetIntersectionTriangleVertexPositionsKHR].setResultAndType(true, true); + InstructionDesc[OpRayQueryGetIntersectionClusterIdNV].operands.push(OperandId, "'RayQuery'"); + InstructionDesc[OpRayQueryGetIntersectionClusterIdNV].operands.push(OperandId, "'Committed'"); + InstructionDesc[OpRayQueryGetIntersectionClusterIdNV].setResultAndType(true, true); + InstructionDesc[OpRayQueryGetIntersectionSpherePositionNV].operands.push(OperandId, "'RayQuery'"); + InstructionDesc[OpRayQueryGetIntersectionSpherePositionNV].operands.push(OperandId, "'Committed'"); + InstructionDesc[OpRayQueryGetIntersectionSpherePositionNV].setResultAndType(true, true); + + InstructionDesc[OpRayQueryGetIntersectionSphereRadiusNV].operands.push(OperandId, "'RayQuery'"); + InstructionDesc[OpRayQueryGetIntersectionSphereRadiusNV].operands.push(OperandId, "'Committed'"); + InstructionDesc[OpRayQueryGetIntersectionSphereRadiusNV].setResultAndType(true, true); + + InstructionDesc[OpRayQueryGetIntersectionLSSHitValueNV].operands.push(OperandId, "'RayQuery'"); + InstructionDesc[OpRayQueryGetIntersectionLSSHitValueNV].operands.push(OperandId, "'Committed'"); + InstructionDesc[OpRayQueryGetIntersectionLSSHitValueNV].setResultAndType(true, true); + + InstructionDesc[OpRayQueryGetIntersectionLSSPositionsNV].operands.push(OperandId, "'RayQuery'"); + InstructionDesc[OpRayQueryGetIntersectionLSSPositionsNV].operands.push(OperandId, "'Committed'"); + InstructionDesc[OpRayQueryGetIntersectionLSSPositionsNV].setResultAndType(true, true); + + InstructionDesc[OpRayQueryGetIntersectionLSSRadiiNV].operands.push(OperandId, "'RayQuery'"); + InstructionDesc[OpRayQueryGetIntersectionLSSRadiiNV].operands.push(OperandId, "'Committed'"); + InstructionDesc[OpRayQueryGetIntersectionLSSRadiiNV].setResultAndType(true, true); + + InstructionDesc[OpRayQueryIsSphereHitNV].operands.push(OperandId, "'RayQuery'"); + InstructionDesc[OpRayQueryIsSphereHitNV].operands.push(OperandId, "'Committed'"); + InstructionDesc[OpRayQueryIsSphereHitNV].setResultAndType(true, true); + + InstructionDesc[OpRayQueryIsLSSHitNV].operands.push(OperandId, "'RayQuery'"); + InstructionDesc[OpRayQueryIsLSSHitNV].operands.push(OperandId, "'Committed'"); + InstructionDesc[OpRayQueryIsLSSHitNV].setResultAndType(true, true); + InstructionDesc[OpImageSampleFootprintNV].operands.push(OperandId, "'Sampled Image'"); InstructionDesc[OpImageSampleFootprintNV].operands.push(OperandId, "'Coordinate'"); InstructionDesc[OpImageSampleFootprintNV].operands.push(OperandId, "'Granularity'"); @@ -3217,6 +3348,61 @@ void Parameterize() InstructionDesc[OpCooperativeMatrixLengthKHR].operands.push(OperandId, "'Type'"); + InstructionDesc[OpTypeCooperativeVectorNV].operands.push(OperandId, "'Component Type'"); + InstructionDesc[OpTypeCooperativeVectorNV].operands.push(OperandId, "'Components'"); + + InstructionDesc[OpCooperativeVectorMatrixMulNV].operands.push(OperandId, "'Input'"); + InstructionDesc[OpCooperativeVectorMatrixMulNV].operands.push(OperandId, "'InputInterpretation'"); + InstructionDesc[OpCooperativeVectorMatrixMulNV].operands.push(OperandId, "'Matrix'"); + InstructionDesc[OpCooperativeVectorMatrixMulNV].operands.push(OperandId, "'MatrixOffset'"); + InstructionDesc[OpCooperativeVectorMatrixMulNV].operands.push(OperandId, "'MatrixInterpretation'"); + InstructionDesc[OpCooperativeVectorMatrixMulNV].operands.push(OperandId, "'M'"); + InstructionDesc[OpCooperativeVectorMatrixMulNV].operands.push(OperandId, "'K'"); + InstructionDesc[OpCooperativeVectorMatrixMulNV].operands.push(OperandId, "'MemoryLayout'"); + InstructionDesc[OpCooperativeVectorMatrixMulNV].operands.push(OperandId, "'Transpose'"); + InstructionDesc[OpCooperativeVectorMatrixMulNV].operands.push(OperandId, "'MatrixStride'", true); + InstructionDesc[OpCooperativeVectorMatrixMulNV].operands.push(OperandCooperativeMatrixOperands, "'Cooperative Matrix Operands'", true); + + InstructionDesc[OpCooperativeVectorMatrixMulAddNV].operands.push(OperandId, "'Input'"); + InstructionDesc[OpCooperativeVectorMatrixMulAddNV].operands.push(OperandId, "'InputInterpretation'"); + InstructionDesc[OpCooperativeVectorMatrixMulAddNV].operands.push(OperandId, "'Matrix'"); + InstructionDesc[OpCooperativeVectorMatrixMulAddNV].operands.push(OperandId, "'MatrixOffset'"); + InstructionDesc[OpCooperativeVectorMatrixMulAddNV].operands.push(OperandId, "'MatrixInterpretation'"); + InstructionDesc[OpCooperativeVectorMatrixMulAddNV].operands.push(OperandId, "'Bias'"); + InstructionDesc[OpCooperativeVectorMatrixMulAddNV].operands.push(OperandId, "'BiasOffset'"); + InstructionDesc[OpCooperativeVectorMatrixMulAddNV].operands.push(OperandId, "'BiasInterpretation'"); + InstructionDesc[OpCooperativeVectorMatrixMulAddNV].operands.push(OperandId, "'M'"); + InstructionDesc[OpCooperativeVectorMatrixMulAddNV].operands.push(OperandId, "'K'"); + InstructionDesc[OpCooperativeVectorMatrixMulAddNV].operands.push(OperandId, "'MemoryLayout'"); + InstructionDesc[OpCooperativeVectorMatrixMulAddNV].operands.push(OperandId, "'Transpose'"); + InstructionDesc[OpCooperativeVectorMatrixMulAddNV].operands.push(OperandId, "'MatrixStride'", true); + InstructionDesc[OpCooperativeVectorMatrixMulAddNV].operands.push(OperandCooperativeMatrixOperands, "'Cooperative Matrix Operands'", true); + + InstructionDesc[OpCooperativeVectorLoadNV].operands.push(OperandId, "'Pointer'"); + InstructionDesc[OpCooperativeVectorLoadNV].operands.push(OperandId, "'Offset'"); + InstructionDesc[OpCooperativeVectorLoadNV].operands.push(OperandMemoryAccess, "'Memory Access'"); + InstructionDesc[OpCooperativeVectorLoadNV].operands.push(OperandLiteralNumber, "", true); + InstructionDesc[OpCooperativeVectorLoadNV].operands.push(OperandId, "", true); + + InstructionDesc[OpCooperativeVectorStoreNV].operands.push(OperandId, "'Pointer'"); + InstructionDesc[OpCooperativeVectorStoreNV].operands.push(OperandId, "'Offset'"); + InstructionDesc[OpCooperativeVectorStoreNV].operands.push(OperandId, "'Object'"); + InstructionDesc[OpCooperativeVectorStoreNV].operands.push(OperandMemoryAccess, "'Memory Access'"); + InstructionDesc[OpCooperativeVectorStoreNV].operands.push(OperandLiteralNumber, "", true); + InstructionDesc[OpCooperativeVectorStoreNV].operands.push(OperandId, "", true); + + InstructionDesc[OpCooperativeVectorOuterProductAccumulateNV].operands.push(OperandId, "'Pointer'"); + InstructionDesc[OpCooperativeVectorOuterProductAccumulateNV].operands.push(OperandId, "'Offset'"); + InstructionDesc[OpCooperativeVectorOuterProductAccumulateNV].operands.push(OperandId, "'A'"); + InstructionDesc[OpCooperativeVectorOuterProductAccumulateNV].operands.push(OperandId, "'B'"); + InstructionDesc[OpCooperativeVectorOuterProductAccumulateNV].operands.push(OperandId, "'MemoryLayout'"); + InstructionDesc[OpCooperativeVectorOuterProductAccumulateNV].operands.push(OperandId, "'MatrixInterpretation'"); + InstructionDesc[OpCooperativeVectorOuterProductAccumulateNV].operands.push(OperandId, "'MatrixStride'", true); + + InstructionDesc[OpCooperativeVectorReduceSumAccumulateNV].operands.push(OperandId, "'Pointer'"); + InstructionDesc[OpCooperativeVectorReduceSumAccumulateNV].operands.push(OperandId, "'Offset'"); + InstructionDesc[OpCooperativeVectorReduceSumAccumulateNV].operands.push(OperandId, "'V'"); + InstructionDesc[OpDemoteToHelperInvocationEXT].setResultAndType(false, false); InstructionDesc[OpReadClockKHR].operands.push(OperandScope, "'Scope'"); @@ -3406,6 +3592,26 @@ void Parameterize() InstructionDesc[OpHitObjectTraceRayMotionNV].operands.push(OperandId, "'Payload'"); InstructionDesc[OpHitObjectTraceRayMotionNV].setResultAndType(false, false); + InstructionDesc[OpHitObjectGetClusterIdNV].operands.push(OperandId, "'HitObject'"); + InstructionDesc[OpHitObjectGetClusterIdNV].setResultAndType(true, true); + InstructionDesc[OpHitObjectGetSpherePositionNV].operands.push(OperandId, "'HitObject'"); + InstructionDesc[OpHitObjectGetSpherePositionNV].setResultAndType(true, true); + + InstructionDesc[OpHitObjectGetSphereRadiusNV].operands.push(OperandId, "'HitObject'"); + InstructionDesc[OpHitObjectGetSphereRadiusNV].setResultAndType(true, true); + + InstructionDesc[OpHitObjectGetLSSPositionsNV].operands.push(OperandId, "'HitObject'"); + InstructionDesc[OpHitObjectGetLSSPositionsNV].setResultAndType(true, true); + + InstructionDesc[OpHitObjectGetLSSRadiiNV].operands.push(OperandId, "'HitObject'"); + InstructionDesc[OpHitObjectGetLSSRadiiNV].setResultAndType(true, true); + + InstructionDesc[OpHitObjectIsSphereHitNV].operands.push(OperandId, "'HitObject'"); + InstructionDesc[OpHitObjectIsSphereHitNV].setResultAndType(true, true); + + InstructionDesc[OpHitObjectIsLSSHitNV].operands.push(OperandId, "'HitObject'"); + InstructionDesc[OpHitObjectIsLSSHitNV].setResultAndType(true, true); + InstructionDesc[OpFetchMicroTriangleVertexBarycentricNV].operands.push(OperandId, "'Acceleration Structure'"); InstructionDesc[OpFetchMicroTriangleVertexBarycentricNV].operands.push(OperandId, "'Instance ID'"); InstructionDesc[OpFetchMicroTriangleVertexBarycentricNV].operands.push(OperandId, "'Geometry Index'"); @@ -3488,7 +3694,95 @@ void Parameterize() InstructionDesc[OpConstantCompositeReplicateEXT].operands.push(OperandId, "'Value'"); InstructionDesc[OpSpecConstantCompositeReplicateEXT].operands.push(OperandId, "'Value'"); InstructionDesc[OpCompositeConstructReplicateEXT].operands.push(OperandId, "'Value'"); + + InstructionDesc[OpCooperativeMatrixConvertNV].operands.push(OperandId, "'Value'"); + + InstructionDesc[OpCooperativeMatrixTransposeNV].operands.push(OperandId, "'Matrix'"); + + InstructionDesc[OpCooperativeMatrixReduceNV].operands.push(OperandId, "'Matrix'"); + InstructionDesc[OpCooperativeMatrixReduceNV].operands.push(OperandLiteralNumber, "'ReduceMask'"); + InstructionDesc[OpCooperativeMatrixReduceNV].operands.push(OperandId, "'CombineFunc'"); + + InstructionDesc[OpCooperativeMatrixPerElementOpNV].operands.push(OperandId, "'Matrix'"); + InstructionDesc[OpCooperativeMatrixPerElementOpNV].operands.push(OperandId, "'Operation'"); + InstructionDesc[OpCooperativeMatrixPerElementOpNV].operands.push(OperandVariableIds, "'Operands'"); + + InstructionDesc[OpCooperativeMatrixLoadTensorNV].operands.push(OperandId, "'Pointer'"); + InstructionDesc[OpCooperativeMatrixLoadTensorNV].operands.push(OperandId, "'Object'"); + InstructionDesc[OpCooperativeMatrixLoadTensorNV].operands.push(OperandId, "'TensorLayout'"); + InstructionDesc[OpCooperativeMatrixLoadTensorNV].operands.push(OperandMemoryAccess, "'Memory Access'"); + InstructionDesc[OpCooperativeMatrixLoadTensorNV].operands.push(OperandTensorAddressingOperands, "'Tensor Addressing Operands'"); + + InstructionDesc[OpCooperativeMatrixStoreTensorNV].operands.push(OperandId, "'Pointer'"); + InstructionDesc[OpCooperativeMatrixStoreTensorNV].operands.push(OperandId, "'Object'"); + InstructionDesc[OpCooperativeMatrixStoreTensorNV].operands.push(OperandId, "'TensorLayout'"); + InstructionDesc[OpCooperativeMatrixStoreTensorNV].operands.push(OperandMemoryAccess, "'Memory Access'"); + InstructionDesc[OpCooperativeMatrixStoreTensorNV].operands.push(OperandTensorAddressingOperands, "'Tensor Addressing Operands'"); + + InstructionDesc[OpCooperativeMatrixReduceNV].operands.push(OperandId, "'Matrix'"); + InstructionDesc[OpCooperativeMatrixReduceNV].operands.push(OperandLiteralNumber, "'ReduceMask'"); + + InstructionDesc[OpTypeTensorLayoutNV].operands.push(OperandId, "'Dim'"); + InstructionDesc[OpTypeTensorLayoutNV].operands.push(OperandId, "'ClampMode'"); + + InstructionDesc[OpTypeTensorViewNV].operands.push(OperandId, "'Dim'"); + InstructionDesc[OpTypeTensorViewNV].operands.push(OperandId, "'HasDimensions'"); + InstructionDesc[OpTypeTensorViewNV].operands.push(OperandVariableIds, "'p'"); + + InstructionDesc[OpTensorLayoutSetBlockSizeNV].operands.push(OperandId, "'TensorLayout'"); + InstructionDesc[OpTensorLayoutSetBlockSizeNV].operands.push(OperandVariableIds, "'BlockSize'"); + + InstructionDesc[OpTensorLayoutSetDimensionNV].operands.push(OperandId, "'TensorLayout'"); + InstructionDesc[OpTensorLayoutSetDimensionNV].operands.push(OperandVariableIds, "'Dim'"); + + InstructionDesc[OpTensorLayoutSetStrideNV].operands.push(OperandId, "'TensorLayout'"); + InstructionDesc[OpTensorLayoutSetStrideNV].operands.push(OperandVariableIds, "'Stride'"); + + InstructionDesc[OpTensorLayoutSliceNV].operands.push(OperandId, "'TensorLayout'"); + InstructionDesc[OpTensorLayoutSliceNV].operands.push(OperandVariableIds, "'Operands'"); + + InstructionDesc[OpTensorLayoutSetClampValueNV].operands.push(OperandId, "'TensorLayout'"); + InstructionDesc[OpTensorLayoutSetClampValueNV].operands.push(OperandId, "'Value'"); + + InstructionDesc[OpTensorViewSetDimensionNV].operands.push(OperandId, "'TensorView'"); + InstructionDesc[OpTensorViewSetDimensionNV].operands.push(OperandVariableIds, "'Dim'"); + + InstructionDesc[OpTensorViewSetStrideNV].operands.push(OperandId, "'TensorView'"); + InstructionDesc[OpTensorViewSetStrideNV].operands.push(OperandVariableIds, "'Stride'"); + + InstructionDesc[OpTensorViewSetClipNV].operands.push(OperandId, "'TensorView'"); + InstructionDesc[OpTensorViewSetClipNV].operands.push(OperandId, "'ClipRowOffset'"); + InstructionDesc[OpTensorViewSetClipNV].operands.push(OperandId, "'ClipRowSpan'"); + InstructionDesc[OpTensorViewSetClipNV].operands.push(OperandId, "'ClipColOffset'"); + InstructionDesc[OpTensorViewSetClipNV].operands.push(OperandId, "'ClipColSpan'"); + + InstructionDesc[OpSDotKHR].operands.push(OperandId, "'Vector1'"); + InstructionDesc[OpSDotKHR].operands.push(OperandId, "'Vector2'"); + InstructionDesc[OpSDotKHR].operands.push(OperandLiteralNumber, "'PackedVectorFormat'"); + + InstructionDesc[OpUDotKHR].operands.push(OperandId, "'Vector1'"); + InstructionDesc[OpUDotKHR].operands.push(OperandId, "'Vector2'"); + InstructionDesc[OpUDotKHR].operands.push(OperandLiteralNumber, "'PackedVectorFormat'"); + + InstructionDesc[OpSUDotKHR].operands.push(OperandId, "'Vector1'"); + InstructionDesc[OpSUDotKHR].operands.push(OperandId, "'Vector2'"); + InstructionDesc[OpSUDotKHR].operands.push(OperandLiteralNumber, "'PackedVectorFormat'"); + + InstructionDesc[OpSDotAccSatKHR].operands.push(OperandId, "'Vector1'"); + InstructionDesc[OpSDotAccSatKHR].operands.push(OperandId, "'Vector2'"); + InstructionDesc[OpSDotAccSatKHR].operands.push(OperandId, "'Accumulator'"); + InstructionDesc[OpSDotAccSatKHR].operands.push(OperandLiteralNumber, "'PackedVectorFormat'"); + + InstructionDesc[OpUDotAccSatKHR].operands.push(OperandId, "'Vector1'"); + InstructionDesc[OpUDotAccSatKHR].operands.push(OperandId, "'Vector2'"); + InstructionDesc[OpUDotAccSatKHR].operands.push(OperandId, "'Accumulator'"); + InstructionDesc[OpUDotAccSatKHR].operands.push(OperandLiteralNumber, "'PackedVectorFormat'"); + + InstructionDesc[OpSUDotAccSatKHR].operands.push(OperandId, "'Vector1'"); + InstructionDesc[OpSUDotAccSatKHR].operands.push(OperandId, "'Vector2'"); + InstructionDesc[OpSUDotAccSatKHR].operands.push(OperandId, "'Accumulator'"); + InstructionDesc[OpSUDotAccSatKHR].operands.push(OperandLiteralNumber, "'PackedVectorFormat'"); }); } -}; // end spv namespace +} // end spv namespace diff --git a/libraries/ZVulkan/src/glslang/spirv/doc.h b/libraries/ZVulkan/src/glslang/spirv/doc.h index 521529913..8cd388a17 100644 --- a/libraries/ZVulkan/src/glslang/spirv/doc.h +++ b/libraries/ZVulkan/src/glslang/spirv/doc.h @@ -157,6 +157,7 @@ enum OperandClass { OperandKernelProfilingInfo, OperandCapability, OperandCooperativeMatrixOperands, + OperandTensorAddressingOperands, OperandOpcode, diff --git a/libraries/ZVulkan/src/glslang/spirv/spirv.hpp b/libraries/ZVulkan/src/glslang/spirv/spirv.hpp index 38af7fc3e..4dca5e228 100644 --- a/libraries/ZVulkan/src/glslang/spirv/spirv.hpp +++ b/libraries/ZVulkan/src/glslang/spirv/spirv.hpp @@ -1,19 +1,19 @@ // Copyright (c) 2014-2024 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/ -// +// 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 @@ -27,7 +27,7 @@ // Enumeration tokens for SPIR-V, in various styles: // C, C++, C++11, JSON, Lua, Python, C#, D, Beef -// +// // - C will have tokens with a "Spv" prefix, e.g.: SpvSourceLanguageGLSL // - C++ will have tokens in the "spv" name space, e.g.: spv::SourceLanguageGLSL // - C++11 will use enum classes in the spv namespace, e.g.: spv::SourceLanguage::GLSL @@ -38,7 +38,7 @@ // - D will have tokens under the "spv" module, e.g: spv.SourceLanguage.GLSL // - Beef will use enum classes in the Specification class located in the "Spv" namespace, // e.g.: Spv.Specification.SourceLanguage.GLSL -// +// // Some tokens act like mask values, which can be OR'd together, // while others are mutually exclusive. The mask-like ones have // "Mask" in their name, and a parallel enum that has the shift @@ -69,6 +69,11 @@ enum SourceLanguage { SourceLanguageHLSL = 5, SourceLanguageCPP_for_OpenCL = 6, SourceLanguageSYCL = 7, + SourceLanguageHERO_C = 8, + SourceLanguageNZSL = 9, + SourceLanguageWGSL = 10, + SourceLanguageSlang = 11, + SourceLanguageZig = 12, SourceLanguageMax = 0x7fffffff, }; @@ -168,6 +173,12 @@ enum ExecutionMode { ExecutionModeRoundingModeRTZ = 4463, ExecutionModeEarlyAndLateFragmentTestsAMD = 5017, ExecutionModeStencilRefReplacingEXT = 5027, + ExecutionModeCoalescingAMDX = 5069, + ExecutionModeIsApiEntryAMDX = 5070, + ExecutionModeMaxNodeRecursionAMDX = 5071, + ExecutionModeStaticNumWorkgroupsAMDX = 5072, + ExecutionModeShaderIndexAMDX = 5073, + ExecutionModeMaxNumWorkgroupsAMDX = 5077, ExecutionModeStencilRefUnchangedFrontAMD = 5079, ExecutionModeStencilRefGreaterFrontAMD = 5080, ExecutionModeStencilRefLessFrontAMD = 5081, @@ -176,11 +187,14 @@ enum ExecutionMode { ExecutionModeStencilRefLessBackAMD = 5084, ExecutionModeQuadDerivativesKHR = 5088, ExecutionModeRequireFullQuadsKHR = 5089, + ExecutionModeSharesInputWithAMDX = 5102, ExecutionModeOutputLinesEXT = 5269, ExecutionModeOutputLinesNV = 5269, ExecutionModeOutputPrimitivesEXT = 5270, ExecutionModeOutputPrimitivesNV = 5270, + ExecutionModeDerivativeGroupQuadsKHR = 5289, ExecutionModeDerivativeGroupQuadsNV = 5289, + ExecutionModeDerivativeGroupLinearKHR = 5290, ExecutionModeDerivativeGroupLinearNV = 5290, ExecutionModeOutputTrianglesEXT = 5298, ExecutionModeOutputTrianglesNV = 5298, @@ -201,8 +215,13 @@ enum ExecutionMode { ExecutionModeNumSIMDWorkitemsINTEL = 5896, ExecutionModeSchedulerTargetFmaxMhzINTEL = 5903, ExecutionModeMaximallyReconvergesKHR = 6023, + ExecutionModeFPFastMathDefault = 6028, ExecutionModeStreamingInterfaceINTEL = 6154, + ExecutionModeRegisterMapInterfaceINTEL = 6160, ExecutionModeNamedBarrierCountINTEL = 6417, + ExecutionModeMaximumRegistersINTEL = 6461, + ExecutionModeMaximumRegistersIdINTEL = 6462, + ExecutionModeNamedMaximumRegistersINTEL = 6463, ExecutionModeMax = 0x7fffffff, }; @@ -221,6 +240,7 @@ enum StorageClass { StorageClassImage = 11, StorageClassStorageBuffer = 12, StorageClassTileImageEXT = 4172, + StorageClassNodePayloadAMDX = 5068, StorageClassCallableDataKHR = 5328, StorageClassCallableDataNV = 5328, StorageClassIncomingCallableDataKHR = 5329, @@ -358,6 +378,9 @@ enum ImageChannelDataType { ImageChannelDataTypeFloat = 14, ImageChannelDataTypeUnormInt24 = 15, ImageChannelDataTypeUnormInt101010_2 = 16, + ImageChannelDataTypeUnsignedIntRaw10EXT = 19, + ImageChannelDataTypeUnsignedIntRaw12EXT = 20, + ImageChannelDataTypeUnormInt2_101010EXT = 21, ImageChannelDataTypeMax = 0x7fffffff, }; @@ -385,7 +408,7 @@ enum ImageOperandsShift { ImageOperandsMax = 0x7fffffff, }; -enum ImageOperandsMask { +enum ImageOperandsMask : unsigned { ImageOperandsMaskNone = 0, ImageOperandsBiasMask = 0x00000001, ImageOperandsLodMask = 0x00000002, @@ -415,20 +438,26 @@ enum FPFastMathModeShift { FPFastMathModeNSZShift = 2, FPFastMathModeAllowRecipShift = 3, FPFastMathModeFastShift = 4, + FPFastMathModeAllowContractShift = 16, FPFastMathModeAllowContractFastINTELShift = 16, + FPFastMathModeAllowReassocShift = 17, FPFastMathModeAllowReassocINTELShift = 17, + FPFastMathModeAllowTransformShift = 18, FPFastMathModeMax = 0x7fffffff, }; -enum FPFastMathModeMask { +enum FPFastMathModeMask : unsigned { FPFastMathModeMaskNone = 0, FPFastMathModeNotNaNMask = 0x00000001, FPFastMathModeNotInfMask = 0x00000002, FPFastMathModeNSZMask = 0x00000004, FPFastMathModeAllowRecipMask = 0x00000008, FPFastMathModeFastMask = 0x00000010, + FPFastMathModeAllowContractMask = 0x00010000, FPFastMathModeAllowContractFastINTELMask = 0x00010000, + FPFastMathModeAllowReassocMask = 0x00020000, FPFastMathModeAllowReassocINTELMask = 0x00020000, + FPFastMathModeAllowTransformMask = 0x00040000, }; enum FPRoundingMode { @@ -520,6 +549,14 @@ enum Decoration { DecorationBlockMatchTextureQCOM = 4488, DecorationBlockMatchSamplerQCOM = 4499, DecorationExplicitInterpAMD = 4999, + DecorationNodeSharesPayloadLimitsWithAMDX = 5019, + DecorationNodeMaxPayloadsAMDX = 5020, + DecorationTrackFinishWritingAMDX = 5078, + DecorationPayloadNodeNameAMDX = 5091, + DecorationPayloadNodeBaseIndexAMDX = 5098, + DecorationPayloadNodeSparseArrayAMDX = 5099, + DecorationPayloadNodeArraySizeAMDX = 5100, + DecorationPayloadDispatchIndirectAMDX = 5105, DecorationOverrideCoverageNV = 5248, DecorationPassthroughNV = 5250, DecorationViewportRelativeNV = 5252, @@ -569,6 +606,9 @@ enum Decoration { DecorationMergeINTEL = 5834, DecorationBankBitsINTEL = 5835, DecorationForcePow2DepthINTEL = 5836, + DecorationStridesizeINTEL = 5883, + DecorationWordsizeINTEL = 5884, + DecorationTrueDualPortINTEL = 5885, DecorationBurstCoalesceINTEL = 5899, DecorationCacheSizeINTEL = 5900, DecorationDontStaticallyCoalesceINTEL = 5901, @@ -587,6 +627,10 @@ enum Decoration { DecorationSingleElementVectorINTEL = 6085, DecorationVectorComputeCallableFunctionINTEL = 6087, DecorationMediaBlockIOINTEL = 6140, + DecorationStallFreeINTEL = 6151, + DecorationFPMaxErrorDecorationINTEL = 6170, + DecorationLatencyControlLabelINTEL = 6172, + DecorationLatencyControlConstraintINTEL = 6173, DecorationConduitKernelArgumentINTEL = 6175, DecorationRegisterMapKernelArgumentINTEL = 6176, DecorationMMHostInterfaceAddressWidthINTEL = 6177, @@ -596,6 +640,11 @@ enum Decoration { DecorationMMHostInterfaceMaxBurstINTEL = 6181, DecorationMMHostInterfaceWaitRequestINTEL = 6182, DecorationStableKernelArgumentINTEL = 6183, + DecorationHostAccessINTEL = 6188, + DecorationInitModeINTEL = 6190, + DecorationImplementInRegisterMapINTEL = 6191, + DecorationCacheControlLoadINTEL = 6442, + DecorationCacheControlStoreINTEL = 6443, DecorationMax = 0x7fffffff, }; @@ -671,6 +720,8 @@ enum BuiltIn { BuiltInBaryCoordSmoothSampleAMD = 4997, BuiltInBaryCoordPullModelAMD = 4998, BuiltInFragStencilRefEXT = 5014, + BuiltInRemainingRecursionLevelsAMDX = 5021, + BuiltInShaderIndexAMDX = 5073, BuiltInViewportMaskNV = 5253, BuiltInSecondaryPositionNV = 5257, BuiltInSecondaryViewportMaskNV = 5258, @@ -729,12 +780,19 @@ enum BuiltIn { BuiltInIncomingRayFlagsKHR = 5351, BuiltInIncomingRayFlagsNV = 5351, BuiltInRayGeometryIndexKHR = 5352, + BuiltInHitIsSphereNV = 5359, + BuiltInHitIsLSSNV = 5360, + BuiltInHitSpherePositionNV = 5361, BuiltInWarpsPerSMNV = 5374, BuiltInSMCountNV = 5375, BuiltInWarpIDNV = 5376, BuiltInSMIDNV = 5377, + BuiltInHitLSSPositionsNV = 5396, BuiltInHitKindFrontFacingMicroTriangleNV = 5405, BuiltInHitKindBackFacingMicroTriangleNV = 5406, + BuiltInHitSphereRadiusNV = 5420, + BuiltInHitLSSRadiiNV = 5421, + BuiltInClusterIDNV = 5436, BuiltInCullMaskKHR = 6021, BuiltInMax = 0x7fffffff, }; @@ -745,7 +803,7 @@ enum SelectionControlShift { SelectionControlMax = 0x7fffffff, }; -enum SelectionControlMask { +enum SelectionControlMask : unsigned { SelectionControlMaskNone = 0, SelectionControlFlattenMask = 0x00000001, SelectionControlDontFlattenMask = 0x00000002, @@ -774,7 +832,7 @@ enum LoopControlShift { LoopControlMax = 0x7fffffff, }; -enum LoopControlMask { +enum LoopControlMask : unsigned { LoopControlMaskNone = 0, LoopControlUnrollMask = 0x00000001, LoopControlDontUnrollMask = 0x00000002, @@ -802,16 +860,18 @@ enum FunctionControlShift { FunctionControlDontInlineShift = 1, FunctionControlPureShift = 2, FunctionControlConstShift = 3, + FunctionControlOptNoneEXTShift = 16, FunctionControlOptNoneINTELShift = 16, FunctionControlMax = 0x7fffffff, }; -enum FunctionControlMask { +enum FunctionControlMask : unsigned { FunctionControlMaskNone = 0, FunctionControlInlineMask = 0x00000001, FunctionControlDontInlineMask = 0x00000002, FunctionControlPureMask = 0x00000004, FunctionControlConstMask = 0x00000008, + FunctionControlOptNoneEXTMask = 0x00010000, FunctionControlOptNoneINTELMask = 0x00010000, }; @@ -836,7 +896,7 @@ enum MemorySemanticsShift { MemorySemanticsMax = 0x7fffffff, }; -enum MemorySemanticsMask { +enum MemorySemanticsMask : unsigned { MemorySemanticsMaskNone = 0, MemorySemanticsAcquireMask = 0x00000002, MemorySemanticsReleaseMask = 0x00000004, @@ -872,7 +932,7 @@ enum MemoryAccessShift { MemoryAccessMax = 0x7fffffff, }; -enum MemoryAccessMask { +enum MemoryAccessMask : unsigned { MemoryAccessMaskNone = 0, MemoryAccessVolatileMask = 0x00000001, MemoryAccessAlignedMask = 0x00000002, @@ -922,7 +982,7 @@ enum KernelProfilingInfoShift { KernelProfilingInfoMax = 0x7fffffff, }; -enum KernelProfilingInfoMask { +enum KernelProfilingInfoMask : unsigned { KernelProfilingInfoMaskNone = 0, KernelProfilingInfoCmdExecTimeMask = 0x00000001, }; @@ -1032,6 +1092,7 @@ enum Capability { CapabilityRoundingModeRTZ = 4468, CapabilityRayQueryProvisionalKHR = 4471, CapabilityRayQueryKHR = 4472, + CapabilityUntypedPointersKHR = 4473, CapabilityRayTraversalPrimitiveCullingKHR = 4478, CapabilityRayTracingKHR = 4479, CapabilityTextureSampleWeightedQCOM = 4484, @@ -1045,6 +1106,7 @@ enum Capability { CapabilityImageReadWriteLodAMD = 5015, CapabilityInt64ImageEXT = 5016, CapabilityShaderClockKHR = 5055, + CapabilityShaderEnqueueAMDX = 5067, CapabilityQuadControlKHR = 5087, CapabilitySampleMaskOverrideCoverageNV = 5249, CapabilityGeometryShaderPassthroughNV = 5251, @@ -1059,6 +1121,7 @@ enum Capability { CapabilityMeshShadingEXT = 5283, CapabilityFragmentBarycentricKHR = 5284, CapabilityFragmentBarycentricNV = 5284, + CapabilityComputeDerivativeGroupQuadsKHR = 5288, CapabilityComputeDerivativeGroupQuadsNV = 5288, CapabilityFragmentDensityEXT = 5291, CapabilityShadingRateNV = 5291, @@ -1096,6 +1159,7 @@ enum Capability { CapabilityVulkanMemoryModelDeviceScopeKHR = 5346, CapabilityPhysicalStorageBufferAddresses = 5347, CapabilityPhysicalStorageBufferAddressesEXT = 5347, + CapabilityComputeDerivativeGroupLinearKHR = 5350, CapabilityComputeDerivativeGroupLinearNV = 5350, CapabilityRayTracingProvisionalKHR = 5353, CapabilityCooperativeMatrixNV = 5357, @@ -1110,8 +1174,20 @@ enum Capability { CapabilityShaderInvocationReorderNV = 5383, CapabilityBindlessTextureNV = 5390, CapabilityRayQueryPositionFetchKHR = 5391, + CapabilityCooperativeVectorNV = 5394, CapabilityAtomicFloat16VectorNV = 5404, CapabilityRayTracingDisplacementMicromapNV = 5409, + CapabilityRawAccessChainsNV = 5414, + CapabilityRayTracingSpheresGeometryNV = 5418, + CapabilityRayTracingLinearSweptSpheresGeometryNV = 5419, + CapabilityCooperativeMatrixReductionsNV = 5430, + CapabilityCooperativeMatrixConversionsNV = 5431, + CapabilityCooperativeMatrixPerElementOperationsNV = 5432, + CapabilityCooperativeMatrixTensorAddressingNV = 5433, + CapabilityCooperativeMatrixBlockLoadsNV = 5434, + CapabilityCooperativeVectorTrainingNV = 5435, + CapabilityRayTracingClusterAccelerationStructureNV = 5437, + CapabilityTensorAddressingNV = 5439, CapabilitySubgroupShuffleINTEL = 5568, CapabilitySubgroupBufferBlockIOINTEL = 5569, CapabilitySubgroupImageBlockIOINTEL = 5570, @@ -1167,15 +1243,29 @@ enum Capability { CapabilityReplicatedCompositesEXT = 6024, CapabilityBitInstructions = 6025, CapabilityGroupNonUniformRotateKHR = 6026, + CapabilityFloatControls2 = 6029, CapabilityAtomicFloat32AddEXT = 6033, CapabilityAtomicFloat64AddEXT = 6034, - CapabilityLongConstantCompositeINTEL = 6089, + CapabilityLongCompositesINTEL = 6089, + CapabilityOptNoneEXT = 6094, CapabilityOptNoneINTEL = 6094, CapabilityAtomicFloat16AddEXT = 6095, CapabilityDebugInfoModuleINTEL = 6114, + CapabilityBFloat16ConversionINTEL = 6115, CapabilitySplitBarrierINTEL = 6141, + CapabilityArithmeticFenceEXT = 6144, + CapabilityFPGAClusterAttributesV2INTEL = 6150, + CapabilityFPGAKernelAttributesv2INTEL = 6161, + CapabilityFPMaxErrorINTEL = 6169, + CapabilityFPGALatencyControlINTEL = 6171, CapabilityFPGAArgumentInterfacesINTEL = 6174, + CapabilityGlobalVariableHostAccessINTEL = 6187, + CapabilityGlobalVariableFPGADecorationsINTEL = 6189, + CapabilitySubgroupBufferPrefetchINTEL = 6220, CapabilityGroupUniformArithmeticKHR = 6400, + CapabilityMaskedGatherScatterINTEL = 6427, + CapabilityCacheControlsINTEL = 6441, + CapabilityRegisterLimitsINTEL = 6460, CapabilityMax = 0x7fffffff, }; @@ -1194,7 +1284,7 @@ enum RayFlagsShift { RayFlagsMax = 0x7fffffff, }; -enum RayFlagsMask { +enum RayFlagsMask : unsigned { RayFlagsMaskNone = 0, RayFlagsOpaqueKHRMask = 0x00000001, RayFlagsNoOpaqueKHRMask = 0x00000002, @@ -1236,7 +1326,7 @@ enum FragmentShadingRateShift { FragmentShadingRateMax = 0x7fffffff, }; -enum FragmentShadingRateMask { +enum FragmentShadingRateMask : unsigned { FragmentShadingRateMaskNone = 0, FragmentShadingRateVertical2PixelsMask = 0x00000001, FragmentShadingRateVertical4PixelsMask = 0x00000002, @@ -1291,7 +1381,7 @@ enum CooperativeMatrixOperandsShift { CooperativeMatrixOperandsMax = 0x7fffffff, }; -enum CooperativeMatrixOperandsMask { +enum CooperativeMatrixOperandsMask : unsigned { CooperativeMatrixOperandsMaskNone = 0, CooperativeMatrixOperandsMatrixASignedComponentsKHRMask = 0x00000001, CooperativeMatrixOperandsMatrixBSignedComponentsKHRMask = 0x00000002, @@ -1315,6 +1405,120 @@ enum CooperativeMatrixUse { CooperativeMatrixUseMax = 0x7fffffff, }; +enum CooperativeMatrixReduceShift { + CooperativeMatrixReduceRowShift = 0, + CooperativeMatrixReduceColumnShift = 1, + CooperativeMatrixReduce2x2Shift = 2, + CooperativeMatrixReduceMax = 0x7fffffff, +}; + +enum CooperativeMatrixReduceMask : unsigned { + CooperativeMatrixReduceMaskNone = 0, + CooperativeMatrixReduceRowMask = 0x00000001, + CooperativeMatrixReduceColumnMask = 0x00000002, + CooperativeMatrixReduce2x2Mask = 0x00000004, +}; + +enum TensorClampMode { + TensorClampModeUndefined = 0, + TensorClampModeConstant = 1, + TensorClampModeClampToEdge = 2, + TensorClampModeRepeat = 3, + TensorClampModeRepeatMirrored = 4, + TensorClampModeMax = 0x7fffffff, +}; + +enum TensorAddressingOperandsShift { + TensorAddressingOperandsTensorViewShift = 0, + TensorAddressingOperandsDecodeFuncShift = 1, + TensorAddressingOperandsMax = 0x7fffffff, +}; + +enum TensorAddressingOperandsMask : unsigned { + TensorAddressingOperandsMaskNone = 0, + TensorAddressingOperandsTensorViewMask = 0x00000001, + TensorAddressingOperandsDecodeFuncMask = 0x00000002, +}; + +enum InitializationModeQualifier { + InitializationModeQualifierInitOnDeviceReprogramINTEL = 0, + InitializationModeQualifierInitOnDeviceResetINTEL = 1, + InitializationModeQualifierMax = 0x7fffffff, +}; + +enum HostAccessQualifier { + HostAccessQualifierNoneINTEL = 0, + HostAccessQualifierReadINTEL = 1, + HostAccessQualifierWriteINTEL = 2, + HostAccessQualifierReadWriteINTEL = 3, + HostAccessQualifierMax = 0x7fffffff, +}; + +enum LoadCacheControl { + LoadCacheControlUncachedINTEL = 0, + LoadCacheControlCachedINTEL = 1, + LoadCacheControlStreamingINTEL = 2, + LoadCacheControlInvalidateAfterReadINTEL = 3, + LoadCacheControlConstCachedINTEL = 4, + LoadCacheControlMax = 0x7fffffff, +}; + +enum StoreCacheControl { + StoreCacheControlUncachedINTEL = 0, + StoreCacheControlWriteThroughINTEL = 1, + StoreCacheControlWriteBackINTEL = 2, + StoreCacheControlStreamingINTEL = 3, + StoreCacheControlMax = 0x7fffffff, +}; + +enum NamedMaximumNumberOfRegisters { + NamedMaximumNumberOfRegistersAutoINTEL = 0, + NamedMaximumNumberOfRegistersMax = 0x7fffffff, +}; + +enum RawAccessChainOperandsShift { + RawAccessChainOperandsRobustnessPerComponentNVShift = 0, + RawAccessChainOperandsRobustnessPerElementNVShift = 1, + RawAccessChainOperandsMax = 0x7fffffff, +}; + +enum RawAccessChainOperandsMask : unsigned { + RawAccessChainOperandsMaskNone = 0, + RawAccessChainOperandsRobustnessPerComponentNVMask = 0x00000001, + RawAccessChainOperandsRobustnessPerElementNVMask = 0x00000002, +}; + +enum FPEncoding { + FPEncodingMax = 0x7fffffff, +}; + +enum CooperativeVectorMatrixLayout { + CooperativeVectorMatrixLayoutRowMajorNV = 0, + CooperativeVectorMatrixLayoutColumnMajorNV = 1, + CooperativeVectorMatrixLayoutInferencingOptimalNV = 2, + CooperativeVectorMatrixLayoutTrainingOptimalNV = 3, + CooperativeVectorMatrixLayoutMax = 0x7fffffff, +}; + +enum ComponentType { + ComponentTypeFloat16NV = 0, + ComponentTypeFloat32NV = 1, + ComponentTypeFloat64NV = 2, + ComponentTypeSignedInt8NV = 3, + ComponentTypeSignedInt16NV = 4, + ComponentTypeSignedInt32NV = 5, + ComponentTypeSignedInt64NV = 6, + ComponentTypeUnsignedInt8NV = 7, + ComponentTypeUnsignedInt16NV = 8, + ComponentTypeUnsignedInt32NV = 9, + ComponentTypeUnsignedInt64NV = 10, + ComponentTypeSignedInt8PackedNV = 1000491000, + ComponentTypeUnsignedInt8PackedNV = 1000491001, + ComponentTypeFloatE4M3NV = 1000491002, + ComponentTypeFloatE5M2NV = 1000491003, + ComponentTypeMax = 0x7fffffff, +}; + enum Op { OpNop = 0, OpUndef = 1, @@ -1664,8 +1868,16 @@ enum Op { OpDepthAttachmentReadEXT = 4161, OpStencilAttachmentReadEXT = 4162, OpTerminateInvocation = 4416, + OpTypeUntypedPointerKHR = 4417, + OpUntypedVariableKHR = 4418, + OpUntypedAccessChainKHR = 4419, + OpUntypedInBoundsAccessChainKHR = 4420, OpSubgroupBallotKHR = 4421, OpSubgroupFirstInvocationKHR = 4422, + OpUntypedPtrAccessChainKHR = 4423, + OpUntypedInBoundsPtrAccessChainKHR = 4424, + OpUntypedArrayLengthKHR = 4425, + OpUntypedPrefetchKHR = 4426, OpSubgroupAllKHR = 4428, OpSubgroupAnyKHR = 4429, OpSubgroupAllEqualKHR = 4430, @@ -1723,6 +1935,14 @@ enum Op { OpFragmentMaskFetchAMD = 5011, OpFragmentFetchAMD = 5012, OpReadClockKHR = 5056, + OpAllocateNodePayloadsAMDX = 5074, + OpEnqueueNodePayloadsAMDX = 5075, + OpTypeNodePayloadArrayAMDX = 5076, + OpFinishWritingNodePayloadAMDX = 5078, + OpNodePayloadArrayLengthAMDX = 5090, + OpIsNodePayloadValidAMDX = 5101, + OpConstantStringAMDX = 5103, + OpSpecConstantStringAMDX = 5104, OpGroupNonUniformQuadAllKHR = 5110, OpGroupNonUniformQuadAnyKHR = 5111, OpHitObjectRecordHitMotionNV = 5249, @@ -1759,12 +1979,20 @@ enum Op { OpReorderThreadWithHintNV = 5280, OpTypeHitObjectNV = 5281, OpImageSampleFootprintNV = 5283, + OpTypeCooperativeVectorNV = 5288, + OpCooperativeVectorMatrixMulNV = 5289, + OpCooperativeVectorOuterProductAccumulateNV = 5290, + OpCooperativeVectorReduceSumAccumulateNV = 5291, + OpCooperativeVectorMatrixMulAddNV = 5292, + OpCooperativeMatrixConvertNV = 5293, OpEmitMeshTasksEXT = 5294, OpSetMeshOutputsEXT = 5295, OpGroupNonUniformPartitionNV = 5296, OpWritePackedPrimitiveIndices4x8NV = 5299, OpFetchMicroTriangleVertexPositionNV = 5300, OpFetchMicroTriangleVertexBarycentricNV = 5301, + OpCooperativeVectorLoadNV = 5302, + OpCooperativeVectorStoreNV = 5303, OpReportIntersectionKHR = 5334, OpReportIntersectionNV = 5334, OpIgnoreIntersectionNV = 5335, @@ -1776,6 +2004,8 @@ enum Op { OpTypeAccelerationStructureKHR = 5341, OpTypeAccelerationStructureNV = 5341, OpExecuteCallableNV = 5344, + OpRayQueryGetIntersectionClusterIdNV = 5345, + OpHitObjectGetClusterIdNV = 5346, OpTypeCooperativeMatrixNV = 5358, OpCooperativeMatrixLoadNV = 5359, OpCooperativeMatrixStoreNV = 5360, @@ -1783,9 +2013,26 @@ enum Op { OpCooperativeMatrixLengthNV = 5362, OpBeginInvocationInterlockEXT = 5364, OpEndInvocationInterlockEXT = 5365, + OpCooperativeMatrixReduceNV = 5366, + OpCooperativeMatrixLoadTensorNV = 5367, + OpCooperativeMatrixStoreTensorNV = 5368, + OpCooperativeMatrixPerElementOpNV = 5369, + OpTypeTensorLayoutNV = 5370, + OpTypeTensorViewNV = 5371, + OpCreateTensorLayoutNV = 5372, + OpTensorLayoutSetDimensionNV = 5373, + OpTensorLayoutSetStrideNV = 5374, + OpTensorLayoutSliceNV = 5375, + OpTensorLayoutSetClampValueNV = 5376, + OpCreateTensorViewNV = 5377, + OpTensorViewSetDimensionNV = 5378, + OpTensorViewSetStrideNV = 5379, OpDemoteToHelperInvocation = 5380, OpDemoteToHelperInvocationEXT = 5380, OpIsHelperInvocationEXT = 5381, + OpTensorViewSetClipNV = 5382, + OpTensorLayoutSetBlockSizeNV = 5384, + OpCooperativeMatrixTransposeNV = 5390, OpConvertUToImageNV = 5391, OpConvertUToSamplerNV = 5392, OpConvertImageToUNV = 5393, @@ -1793,6 +2040,20 @@ enum Op { OpConvertUToSampledImageNV = 5395, OpConvertSampledImageToUNV = 5396, OpSamplerImageAddressingModeNV = 5397, + OpRawAccessChainNV = 5398, + OpRayQueryGetIntersectionSpherePositionNV = 5427, + OpRayQueryGetIntersectionSphereRadiusNV = 5428, + OpRayQueryGetIntersectionLSSPositionsNV = 5429, + OpRayQueryGetIntersectionLSSRadiiNV = 5430, + OpRayQueryGetIntersectionLSSHitValueNV = 5431, + OpHitObjectGetSpherePositionNV = 5432, + OpHitObjectGetSphereRadiusNV = 5433, + OpHitObjectGetLSSPositionsNV = 5434, + OpHitObjectGetLSSRadiiNV = 5435, + OpHitObjectIsSphereHitNV = 5436, + OpHitObjectIsLSSHitNV = 5437, + OpRayQueryIsSphereHitNV = 5438, + OpRayQueryIsLSSHitNV = 5439, OpSubgroupShuffleINTEL = 5571, OpSubgroupShuffleDownINTEL = 5572, OpSubgroupShuffleUpINTEL = 5573, @@ -2034,8 +2295,13 @@ enum Op { OpTypeStructContinuedINTEL = 6090, OpConstantCompositeContinuedINTEL = 6091, OpSpecConstantCompositeContinuedINTEL = 6092, + OpCompositeConstructContinuedINTEL = 6096, + OpConvertFToBF16INTEL = 6116, + OpConvertBF16ToFINTEL = 6117, OpControlBarrierArriveINTEL = 6142, OpControlBarrierWaitINTEL = 6143, + OpArithmeticFenceEXT = 6145, + OpSubgroupBlockPrefetchINTEL = 6221, OpGroupIMulKHR = 6401, OpGroupFMulKHR = 6402, OpGroupBitwiseAndKHR = 6403, @@ -2044,6 +2310,8 @@ enum Op { OpGroupLogicalAndKHR = 6406, OpGroupLogicalOrKHR = 6407, OpGroupLogicalXorKHR = 6408, + OpMaskedGatherINTEL = 6428, + OpMaskedScatterINTEL = 6429, OpMax = 0x7fffffff, }; @@ -2399,18 +2667,26 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) { case OpPtrEqual: *hasResult = true; *hasResultType = true; break; case OpPtrNotEqual: *hasResult = true; *hasResultType = true; break; case OpPtrDiff: *hasResult = true; *hasResultType = true; break; - case OpExtInstWithForwardRefsKHR: *hasResult = true; *hasResultType = true; break; case OpColorAttachmentReadEXT: *hasResult = true; *hasResultType = true; break; case OpDepthAttachmentReadEXT: *hasResult = true; *hasResultType = true; break; case OpStencilAttachmentReadEXT: *hasResult = true; *hasResultType = true; break; case OpTerminateInvocation: *hasResult = false; *hasResultType = false; break; + case OpTypeUntypedPointerKHR: *hasResult = true; *hasResultType = false; break; + case OpUntypedVariableKHR: *hasResult = true; *hasResultType = true; break; + case OpUntypedAccessChainKHR: *hasResult = true; *hasResultType = true; break; + case OpUntypedInBoundsAccessChainKHR: *hasResult = true; *hasResultType = true; break; case OpSubgroupBallotKHR: *hasResult = true; *hasResultType = true; break; case OpSubgroupFirstInvocationKHR: *hasResult = true; *hasResultType = true; break; + case OpUntypedPtrAccessChainKHR: *hasResult = true; *hasResultType = true; break; + case OpUntypedInBoundsPtrAccessChainKHR: *hasResult = true; *hasResultType = true; break; + case OpUntypedArrayLengthKHR: *hasResult = true; *hasResultType = true; break; + case OpUntypedPrefetchKHR: *hasResult = false; *hasResultType = false; break; case OpSubgroupAllKHR: *hasResult = true; *hasResultType = true; break; case OpSubgroupAnyKHR: *hasResult = true; *hasResultType = true; break; case OpSubgroupAllEqualKHR: *hasResult = true; *hasResultType = true; break; case OpGroupNonUniformRotateKHR: *hasResult = true; *hasResultType = true; break; case OpSubgroupReadInvocationKHR: *hasResult = true; *hasResultType = true; break; + case OpExtInstWithForwardRefsKHR: *hasResult = true; *hasResultType = true; break; case OpTraceRayKHR: *hasResult = false; *hasResultType = false; break; case OpExecuteCallableKHR: *hasResult = false; *hasResultType = false; break; case OpConvertUToAccelerationStructureKHR: *hasResult = true; *hasResultType = true; break; @@ -2456,6 +2732,14 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) { case OpFragmentMaskFetchAMD: *hasResult = true; *hasResultType = true; break; case OpFragmentFetchAMD: *hasResult = true; *hasResultType = true; break; case OpReadClockKHR: *hasResult = true; *hasResultType = true; break; + case OpAllocateNodePayloadsAMDX: *hasResult = true; *hasResultType = true; break; + case OpEnqueueNodePayloadsAMDX: *hasResult = false; *hasResultType = false; break; + case OpTypeNodePayloadArrayAMDX: *hasResult = true; *hasResultType = false; break; + case OpFinishWritingNodePayloadAMDX: *hasResult = true; *hasResultType = true; break; + case OpNodePayloadArrayLengthAMDX: *hasResult = true; *hasResultType = true; break; + case OpIsNodePayloadValidAMDX: *hasResult = true; *hasResultType = true; break; + case OpConstantStringAMDX: *hasResult = true; *hasResultType = false; break; + case OpSpecConstantStringAMDX: *hasResult = true; *hasResultType = false; break; case OpGroupNonUniformQuadAllKHR: *hasResult = true; *hasResultType = true; break; case OpGroupNonUniformQuadAnyKHR: *hasResult = true; *hasResultType = true; break; case OpHitObjectRecordHitMotionNV: *hasResult = false; *hasResultType = false; break; @@ -2488,22 +2772,33 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) { case OpHitObjectIsEmptyNV: *hasResult = true; *hasResultType = true; break; case OpHitObjectIsHitNV: *hasResult = true; *hasResultType = true; break; case OpHitObjectIsMissNV: *hasResult = true; *hasResultType = true; break; + case OpHitObjectGetClusterIdNV: *hasResult = true; *hasResultType = true; break; case OpReorderThreadWithHitObjectNV: *hasResult = false; *hasResultType = false; break; case OpReorderThreadWithHintNV: *hasResult = false; *hasResultType = false; break; case OpTypeHitObjectNV: *hasResult = true; *hasResultType = false; break; case OpImageSampleFootprintNV: *hasResult = true; *hasResultType = true; break; + case OpTypeCooperativeVectorNV: *hasResult = true; *hasResultType = false; break; + case OpCooperativeVectorMatrixMulNV: *hasResult = true; *hasResultType = true; break; + case OpCooperativeVectorOuterProductAccumulateNV: *hasResult = false; *hasResultType = false; break; + case OpCooperativeVectorReduceSumAccumulateNV: *hasResult = false; *hasResultType = false; break; + case OpCooperativeVectorMatrixMulAddNV: *hasResult = true; *hasResultType = true; break; + case OpCooperativeMatrixConvertNV: *hasResult = true; *hasResultType = true; break; case OpEmitMeshTasksEXT: *hasResult = false; *hasResultType = false; break; case OpSetMeshOutputsEXT: *hasResult = false; *hasResultType = false; break; case OpGroupNonUniformPartitionNV: *hasResult = true; *hasResultType = true; break; case OpWritePackedPrimitiveIndices4x8NV: *hasResult = false; *hasResultType = false; break; - case OpReportIntersectionNV: *hasResult = true; *hasResultType = true; break; + case OpFetchMicroTriangleVertexPositionNV: *hasResult = true; *hasResultType = true; break; + case OpFetchMicroTriangleVertexBarycentricNV: *hasResult = true; *hasResultType = true; break; + case OpCooperativeVectorLoadNV: *hasResult = true; *hasResultType = true; break; + case OpCooperativeVectorStoreNV: *hasResult = false; *hasResultType = false; break; + case OpReportIntersectionKHR: *hasResult = true; *hasResultType = true; break; case OpIgnoreIntersectionNV: *hasResult = false; *hasResultType = false; break; case OpTerminateRayNV: *hasResult = false; *hasResultType = false; break; case OpTraceNV: *hasResult = false; *hasResultType = false; break; case OpTraceMotionNV: *hasResult = false; *hasResultType = false; break; case OpTraceRayMotionNV: *hasResult = false; *hasResultType = false; break; case OpRayQueryGetIntersectionTriangleVertexPositionsKHR: *hasResult = true; *hasResultType = true; break; - case OpTypeAccelerationStructureNV: *hasResult = true; *hasResultType = false; break; + case OpTypeAccelerationStructureKHR: *hasResult = true; *hasResultType = false; break; case OpExecuteCallableNV: *hasResult = false; *hasResultType = false; break; case OpTypeCooperativeMatrixNV: *hasResult = true; *hasResultType = false; break; case OpCooperativeMatrixLoadNV: *hasResult = true; *hasResultType = true; break; @@ -2512,8 +2807,25 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) { case OpCooperativeMatrixLengthNV: *hasResult = true; *hasResultType = true; break; case OpBeginInvocationInterlockEXT: *hasResult = false; *hasResultType = false; break; case OpEndInvocationInterlockEXT: *hasResult = false; *hasResultType = false; break; + case OpCooperativeMatrixReduceNV: *hasResult = true; *hasResultType = true; break; + case OpCooperativeMatrixLoadTensorNV: *hasResult = true; *hasResultType = true; break; + case OpCooperativeMatrixStoreTensorNV: *hasResult = false; *hasResultType = false; break; + case OpCooperativeMatrixPerElementOpNV: *hasResult = true; *hasResultType = true; break; + case OpTypeTensorLayoutNV: *hasResult = true; *hasResultType = false; break; + case OpTypeTensorViewNV: *hasResult = true; *hasResultType = false; break; + case OpCreateTensorLayoutNV: *hasResult = true; *hasResultType = true; break; + case OpTensorLayoutSetDimensionNV: *hasResult = true; *hasResultType = true; break; + case OpTensorLayoutSetStrideNV: *hasResult = true; *hasResultType = true; break; + case OpTensorLayoutSliceNV: *hasResult = true; *hasResultType = true; break; + case OpTensorLayoutSetClampValueNV: *hasResult = true; *hasResultType = true; break; + case OpCreateTensorViewNV: *hasResult = true; *hasResultType = true; break; + case OpTensorViewSetDimensionNV: *hasResult = true; *hasResultType = true; break; + case OpTensorViewSetStrideNV: *hasResult = true; *hasResultType = true; break; case OpDemoteToHelperInvocation: *hasResult = false; *hasResultType = false; break; case OpIsHelperInvocationEXT: *hasResult = true; *hasResultType = true; break; + case OpTensorViewSetClipNV: *hasResult = true; *hasResultType = true; break; + case OpTensorLayoutSetBlockSizeNV: *hasResult = true; *hasResultType = true; break; + case OpCooperativeMatrixTransposeNV: *hasResult = true; *hasResultType = true; break; case OpConvertUToImageNV: *hasResult = true; *hasResultType = true; break; case OpConvertUToSamplerNV: *hasResult = true; *hasResultType = true; break; case OpConvertImageToUNV: *hasResult = true; *hasResultType = true; break; @@ -2521,6 +2833,7 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) { case OpConvertUToSampledImageNV: *hasResult = true; *hasResultType = true; break; case OpConvertSampledImageToUNV: *hasResult = true; *hasResultType = true; break; case OpSamplerImageAddressingModeNV: *hasResult = false; *hasResultType = false; break; + case OpRawAccessChainNV: *hasResult = true; *hasResultType = true; break; case OpSubgroupShuffleINTEL: *hasResult = true; *hasResultType = true; break; case OpSubgroupShuffleDownINTEL: *hasResult = true; *hasResultType = true; break; case OpSubgroupShuffleUpINTEL: *hasResult = true; *hasResultType = true; break; @@ -2755,13 +3068,19 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) { case OpRayQueryGetWorldRayOriginKHR: *hasResult = true; *hasResultType = true; break; case OpRayQueryGetIntersectionObjectToWorldKHR: *hasResult = true; *hasResultType = true; break; case OpRayQueryGetIntersectionWorldToObjectKHR: *hasResult = true; *hasResultType = true; break; + case OpRayQueryGetIntersectionClusterIdNV: *hasResult = true; *hasResultType = true; break; case OpAtomicFAddEXT: *hasResult = true; *hasResultType = true; break; case OpTypeBufferSurfaceINTEL: *hasResult = true; *hasResultType = false; break; case OpTypeStructContinuedINTEL: *hasResult = false; *hasResultType = false; break; case OpConstantCompositeContinuedINTEL: *hasResult = false; *hasResultType = false; break; case OpSpecConstantCompositeContinuedINTEL: *hasResult = false; *hasResultType = false; break; + case OpCompositeConstructContinuedINTEL: *hasResult = true; *hasResultType = true; break; + case OpConvertFToBF16INTEL: *hasResult = true; *hasResultType = true; break; + case OpConvertBF16ToFINTEL: *hasResult = true; *hasResultType = true; break; case OpControlBarrierArriveINTEL: *hasResult = false; *hasResultType = false; break; case OpControlBarrierWaitINTEL: *hasResult = false; *hasResultType = false; break; + case OpArithmeticFenceEXT: *hasResult = true; *hasResultType = true; break; + case OpSubgroupBlockPrefetchINTEL: *hasResult = false; *hasResultType = false; break; case OpGroupIMulKHR: *hasResult = true; *hasResultType = true; break; case OpGroupFMulKHR: *hasResult = true; *hasResultType = true; break; case OpGroupBitwiseAndKHR: *hasResult = true; *hasResultType = true; break; @@ -2770,8 +3089,1894 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) { case OpGroupLogicalAndKHR: *hasResult = true; *hasResultType = true; break; case OpGroupLogicalOrKHR: *hasResult = true; *hasResultType = true; break; case OpGroupLogicalXorKHR: *hasResult = true; *hasResultType = true; break; + case OpMaskedGatherINTEL: *hasResult = true; *hasResultType = true; break; + case OpMaskedScatterINTEL: *hasResult = false; *hasResultType = false; break; } } +inline const char* SourceLanguageToString(SourceLanguage value) { + switch (value) { + case SourceLanguageUnknown: return "Unknown"; + case SourceLanguageESSL: return "ESSL"; + case SourceLanguageGLSL: return "GLSL"; + case SourceLanguageOpenCL_C: return "OpenCL_C"; + case SourceLanguageOpenCL_CPP: return "OpenCL_CPP"; + case SourceLanguageHLSL: return "HLSL"; + case SourceLanguageCPP_for_OpenCL: return "CPP_for_OpenCL"; + case SourceLanguageSYCL: return "SYCL"; + case SourceLanguageHERO_C: return "HERO_C"; + case SourceLanguageNZSL: return "NZSL"; + case SourceLanguageWGSL: return "WGSL"; + case SourceLanguageSlang: return "Slang"; + case SourceLanguageZig: return "Zig"; + default: return "Unknown"; + } +} + +inline const char* ExecutionModelToString(ExecutionModel value) { + switch (value) { + case ExecutionModelVertex: return "Vertex"; + case ExecutionModelTessellationControl: return "TessellationControl"; + case ExecutionModelTessellationEvaluation: return "TessellationEvaluation"; + case ExecutionModelGeometry: return "Geometry"; + case ExecutionModelFragment: return "Fragment"; + case ExecutionModelGLCompute: return "GLCompute"; + case ExecutionModelKernel: return "Kernel"; + case ExecutionModelTaskNV: return "TaskNV"; + case ExecutionModelMeshNV: return "MeshNV"; + case ExecutionModelRayGenerationKHR: return "RayGenerationKHR"; + case ExecutionModelIntersectionKHR: return "IntersectionKHR"; + case ExecutionModelAnyHitKHR: return "AnyHitKHR"; + case ExecutionModelClosestHitKHR: return "ClosestHitKHR"; + case ExecutionModelMissKHR: return "MissKHR"; + case ExecutionModelCallableKHR: return "CallableKHR"; + case ExecutionModelTaskEXT: return "TaskEXT"; + case ExecutionModelMeshEXT: return "MeshEXT"; + default: return "Unknown"; + } +} + +inline const char* AddressingModelToString(AddressingModel value) { + switch (value) { + case AddressingModelLogical: return "Logical"; + case AddressingModelPhysical32: return "Physical32"; + case AddressingModelPhysical64: return "Physical64"; + case AddressingModelPhysicalStorageBuffer64: return "PhysicalStorageBuffer64"; + default: return "Unknown"; + } +} + +inline const char* MemoryModelToString(MemoryModel value) { + switch (value) { + case MemoryModelSimple: return "Simple"; + case MemoryModelGLSL450: return "GLSL450"; + case MemoryModelOpenCL: return "OpenCL"; + case MemoryModelVulkan: return "Vulkan"; + default: return "Unknown"; + } +} + +inline const char* ExecutionModeToString(ExecutionMode value) { + switch (value) { + case ExecutionModeInvocations: return "Invocations"; + case ExecutionModeSpacingEqual: return "SpacingEqual"; + case ExecutionModeSpacingFractionalEven: return "SpacingFractionalEven"; + case ExecutionModeSpacingFractionalOdd: return "SpacingFractionalOdd"; + case ExecutionModeVertexOrderCw: return "VertexOrderCw"; + case ExecutionModeVertexOrderCcw: return "VertexOrderCcw"; + case ExecutionModePixelCenterInteger: return "PixelCenterInteger"; + case ExecutionModeOriginUpperLeft: return "OriginUpperLeft"; + case ExecutionModeOriginLowerLeft: return "OriginLowerLeft"; + case ExecutionModeEarlyFragmentTests: return "EarlyFragmentTests"; + case ExecutionModePointMode: return "PointMode"; + case ExecutionModeXfb: return "Xfb"; + case ExecutionModeDepthReplacing: return "DepthReplacing"; + case ExecutionModeDepthGreater: return "DepthGreater"; + case ExecutionModeDepthLess: return "DepthLess"; + case ExecutionModeDepthUnchanged: return "DepthUnchanged"; + case ExecutionModeLocalSize: return "LocalSize"; + case ExecutionModeLocalSizeHint: return "LocalSizeHint"; + case ExecutionModeInputPoints: return "InputPoints"; + case ExecutionModeInputLines: return "InputLines"; + case ExecutionModeInputLinesAdjacency: return "InputLinesAdjacency"; + case ExecutionModeTriangles: return "Triangles"; + case ExecutionModeInputTrianglesAdjacency: return "InputTrianglesAdjacency"; + case ExecutionModeQuads: return "Quads"; + case ExecutionModeIsolines: return "Isolines"; + case ExecutionModeOutputVertices: return "OutputVertices"; + case ExecutionModeOutputPoints: return "OutputPoints"; + case ExecutionModeOutputLineStrip: return "OutputLineStrip"; + case ExecutionModeOutputTriangleStrip: return "OutputTriangleStrip"; + case ExecutionModeVecTypeHint: return "VecTypeHint"; + case ExecutionModeContractionOff: return "ContractionOff"; + 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 ExecutionModeNonCoherentColorAttachmentReadEXT: return "NonCoherentColorAttachmentReadEXT"; + case ExecutionModeNonCoherentDepthAttachmentReadEXT: return "NonCoherentDepthAttachmentReadEXT"; + case ExecutionModeNonCoherentStencilAttachmentReadEXT: return "NonCoherentStencilAttachmentReadEXT"; + case ExecutionModeSubgroupUniformControlFlowKHR: return "SubgroupUniformControlFlowKHR"; + 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 ExecutionModeEarlyAndLateFragmentTestsAMD: return "EarlyAndLateFragmentTestsAMD"; + case ExecutionModeStencilRefReplacingEXT: return "StencilRefReplacingEXT"; + case ExecutionModeCoalescingAMDX: return "CoalescingAMDX"; + case ExecutionModeIsApiEntryAMDX: return "IsApiEntryAMDX"; + case ExecutionModeMaxNodeRecursionAMDX: return "MaxNodeRecursionAMDX"; + case ExecutionModeStaticNumWorkgroupsAMDX: return "StaticNumWorkgroupsAMDX"; + case ExecutionModeShaderIndexAMDX: return "ShaderIndexAMDX"; + case ExecutionModeMaxNumWorkgroupsAMDX: return "MaxNumWorkgroupsAMDX"; + case ExecutionModeStencilRefUnchangedFrontAMD: return "StencilRefUnchangedFrontAMD"; + case ExecutionModeStencilRefGreaterFrontAMD: return "StencilRefGreaterFrontAMD"; + case ExecutionModeStencilRefLessFrontAMD: return "StencilRefLessFrontAMD"; + case ExecutionModeStencilRefUnchangedBackAMD: return "StencilRefUnchangedBackAMD"; + case ExecutionModeStencilRefGreaterBackAMD: return "StencilRefGreaterBackAMD"; + case ExecutionModeStencilRefLessBackAMD: return "StencilRefLessBackAMD"; + case ExecutionModeQuadDerivativesKHR: return "QuadDerivativesKHR"; + case ExecutionModeRequireFullQuadsKHR: return "RequireFullQuadsKHR"; + case ExecutionModeSharesInputWithAMDX: return "SharesInputWithAMDX"; + case ExecutionModeOutputLinesEXT: return "OutputLinesEXT"; + case ExecutionModeOutputPrimitivesEXT: return "OutputPrimitivesEXT"; + case ExecutionModeDerivativeGroupQuadsKHR: return "DerivativeGroupQuadsKHR"; + case ExecutionModeDerivativeGroupLinearKHR: return "DerivativeGroupLinearKHR"; + case ExecutionModeOutputTrianglesEXT: return "OutputTrianglesEXT"; + case ExecutionModePixelInterlockOrderedEXT: return "PixelInterlockOrderedEXT"; + case ExecutionModePixelInterlockUnorderedEXT: return "PixelInterlockUnorderedEXT"; + case ExecutionModeSampleInterlockOrderedEXT: return "SampleInterlockOrderedEXT"; + case ExecutionModeSampleInterlockUnorderedEXT: return "SampleInterlockUnorderedEXT"; + case ExecutionModeShadingRateInterlockOrderedEXT: return "ShadingRateInterlockOrderedEXT"; + case ExecutionModeShadingRateInterlockUnorderedEXT: return "ShadingRateInterlockUnorderedEXT"; + case ExecutionModeSharedLocalMemorySizeINTEL: return "SharedLocalMemorySizeINTEL"; + case ExecutionModeRoundingModeRTPINTEL: return "RoundingModeRTPINTEL"; + case ExecutionModeRoundingModeRTNINTEL: return "RoundingModeRTNINTEL"; + case ExecutionModeFloatingPointModeALTINTEL: return "FloatingPointModeALTINTEL"; + case ExecutionModeFloatingPointModeIEEEINTEL: return "FloatingPointModeIEEEINTEL"; + case ExecutionModeMaxWorkgroupSizeINTEL: return "MaxWorkgroupSizeINTEL"; + case ExecutionModeMaxWorkDimINTEL: return "MaxWorkDimINTEL"; + case ExecutionModeNoGlobalOffsetINTEL: return "NoGlobalOffsetINTEL"; + case ExecutionModeNumSIMDWorkitemsINTEL: return "NumSIMDWorkitemsINTEL"; + case ExecutionModeSchedulerTargetFmaxMhzINTEL: return "SchedulerTargetFmaxMhzINTEL"; + case ExecutionModeMaximallyReconvergesKHR: return "MaximallyReconvergesKHR"; + case ExecutionModeFPFastMathDefault: return "FPFastMathDefault"; + case ExecutionModeStreamingInterfaceINTEL: return "StreamingInterfaceINTEL"; + case ExecutionModeRegisterMapInterfaceINTEL: return "RegisterMapInterfaceINTEL"; + case ExecutionModeNamedBarrierCountINTEL: return "NamedBarrierCountINTEL"; + case ExecutionModeMaximumRegistersINTEL: return "MaximumRegistersINTEL"; + case ExecutionModeMaximumRegistersIdINTEL: return "MaximumRegistersIdINTEL"; + case ExecutionModeNamedMaximumRegistersINTEL: return "NamedMaximumRegistersINTEL"; + default: return "Unknown"; + } +} + +inline const char* StorageClassToString(StorageClass value) { + switch (value) { + case StorageClassUniformConstant: return "UniformConstant"; + case StorageClassInput: return "Input"; + case StorageClassUniform: return "Uniform"; + case StorageClassOutput: return "Output"; + case StorageClassWorkgroup: return "Workgroup"; + case StorageClassCrossWorkgroup: return "CrossWorkgroup"; + case StorageClassPrivate: return "Private"; + case StorageClassFunction: return "Function"; + case StorageClassGeneric: return "Generic"; + case StorageClassPushConstant: return "PushConstant"; + case StorageClassAtomicCounter: return "AtomicCounter"; + case StorageClassImage: return "Image"; + case StorageClassStorageBuffer: return "StorageBuffer"; + case StorageClassTileImageEXT: return "TileImageEXT"; + case StorageClassNodePayloadAMDX: return "NodePayloadAMDX"; + case StorageClassCallableDataKHR: return "CallableDataKHR"; + case StorageClassIncomingCallableDataKHR: return "IncomingCallableDataKHR"; + case StorageClassRayPayloadKHR: return "RayPayloadKHR"; + case StorageClassHitAttributeKHR: return "HitAttributeKHR"; + case StorageClassIncomingRayPayloadKHR: return "IncomingRayPayloadKHR"; + case StorageClassShaderRecordBufferKHR: return "ShaderRecordBufferKHR"; + case StorageClassPhysicalStorageBuffer: return "PhysicalStorageBuffer"; + case StorageClassHitObjectAttributeNV: return "HitObjectAttributeNV"; + case StorageClassTaskPayloadWorkgroupEXT: return "TaskPayloadWorkgroupEXT"; + case StorageClassCodeSectionINTEL: return "CodeSectionINTEL"; + case StorageClassDeviceOnlyINTEL: return "DeviceOnlyINTEL"; + case StorageClassHostOnlyINTEL: return "HostOnlyINTEL"; + default: return "Unknown"; + } +} + +inline const char* DimToString(Dim value) { + switch (value) { + case Dim1D: return "1D"; + case Dim2D: return "2D"; + case Dim3D: return "3D"; + case DimCube: return "Cube"; + case DimRect: return "Rect"; + case DimBuffer: return "Buffer"; + case DimSubpassData: return "SubpassData"; + case DimTileImageDataEXT: return "TileImageDataEXT"; + default: return "Unknown"; + } +} + +inline const char* SamplerAddressingModeToString(SamplerAddressingMode value) { + switch (value) { + case SamplerAddressingModeNone: return "None"; + case SamplerAddressingModeClampToEdge: return "ClampToEdge"; + case SamplerAddressingModeClamp: return "Clamp"; + case SamplerAddressingModeRepeat: return "Repeat"; + case SamplerAddressingModeRepeatMirrored: return "RepeatMirrored"; + default: return "Unknown"; + } +} + +inline const char* SamplerFilterModeToString(SamplerFilterMode value) { + switch (value) { + case SamplerFilterModeNearest: return "Nearest"; + case SamplerFilterModeLinear: return "Linear"; + default: return "Unknown"; + } +} + +inline const char* ImageFormatToString(ImageFormat value) { + switch (value) { + case ImageFormatUnknown: return "Unknown"; + case ImageFormatRgba32f: return "Rgba32f"; + case ImageFormatRgba16f: return "Rgba16f"; + case ImageFormatR32f: return "R32f"; + case ImageFormatRgba8: return "Rgba8"; + case ImageFormatRgba8Snorm: return "Rgba8Snorm"; + case ImageFormatRg32f: return "Rg32f"; + case ImageFormatRg16f: return "Rg16f"; + case ImageFormatR11fG11fB10f: return "R11fG11fB10f"; + case ImageFormatR16f: return "R16f"; + case ImageFormatRgba16: return "Rgba16"; + case ImageFormatRgb10A2: return "Rgb10A2"; + case ImageFormatRg16: return "Rg16"; + case ImageFormatRg8: return "Rg8"; + case ImageFormatR16: return "R16"; + case ImageFormatR8: return "R8"; + case ImageFormatRgba16Snorm: return "Rgba16Snorm"; + case ImageFormatRg16Snorm: return "Rg16Snorm"; + case ImageFormatRg8Snorm: return "Rg8Snorm"; + case ImageFormatR16Snorm: return "R16Snorm"; + case ImageFormatR8Snorm: return "R8Snorm"; + case ImageFormatRgba32i: return "Rgba32i"; + case ImageFormatRgba16i: return "Rgba16i"; + case ImageFormatRgba8i: return "Rgba8i"; + case ImageFormatR32i: return "R32i"; + case ImageFormatRg32i: return "Rg32i"; + case ImageFormatRg16i: return "Rg16i"; + case ImageFormatRg8i: return "Rg8i"; + case ImageFormatR16i: return "R16i"; + case ImageFormatR8i: return "R8i"; + case ImageFormatRgba32ui: return "Rgba32ui"; + case ImageFormatRgba16ui: return "Rgba16ui"; + case ImageFormatRgba8ui: return "Rgba8ui"; + case ImageFormatR32ui: return "R32ui"; + case ImageFormatRgb10a2ui: return "Rgb10a2ui"; + case ImageFormatRg32ui: return "Rg32ui"; + case ImageFormatRg16ui: return "Rg16ui"; + case ImageFormatRg8ui: return "Rg8ui"; + case ImageFormatR16ui: return "R16ui"; + case ImageFormatR8ui: return "R8ui"; + case ImageFormatR64ui: return "R64ui"; + case ImageFormatR64i: return "R64i"; + default: return "Unknown"; + } +} + +inline const char* ImageChannelOrderToString(ImageChannelOrder value) { + switch (value) { + case ImageChannelOrderR: return "R"; + case ImageChannelOrderA: return "A"; + case ImageChannelOrderRG: return "RG"; + case ImageChannelOrderRA: return "RA"; + case ImageChannelOrderRGB: return "RGB"; + case ImageChannelOrderRGBA: return "RGBA"; + case ImageChannelOrderBGRA: return "BGRA"; + case ImageChannelOrderARGB: return "ARGB"; + case ImageChannelOrderIntensity: return "Intensity"; + case ImageChannelOrderLuminance: return "Luminance"; + case ImageChannelOrderRx: return "Rx"; + case ImageChannelOrderRGx: return "RGx"; + case ImageChannelOrderRGBx: return "RGBx"; + case ImageChannelOrderDepth: return "Depth"; + case ImageChannelOrderDepthStencil: return "DepthStencil"; + case ImageChannelOrdersRGB: return "sRGB"; + case ImageChannelOrdersRGBx: return "sRGBx"; + case ImageChannelOrdersRGBA: return "sRGBA"; + case ImageChannelOrdersBGRA: return "sBGRA"; + case ImageChannelOrderABGR: return "ABGR"; + default: return "Unknown"; + } +} + +inline const char* ImageChannelDataTypeToString(ImageChannelDataType value) { + switch (value) { + case ImageChannelDataTypeSnormInt8: return "SnormInt8"; + case ImageChannelDataTypeSnormInt16: return "SnormInt16"; + case ImageChannelDataTypeUnormInt8: return "UnormInt8"; + case ImageChannelDataTypeUnormInt16: return "UnormInt16"; + case ImageChannelDataTypeUnormShort565: return "UnormShort565"; + case ImageChannelDataTypeUnormShort555: return "UnormShort555"; + case ImageChannelDataTypeUnormInt101010: return "UnormInt101010"; + case ImageChannelDataTypeSignedInt8: return "SignedInt8"; + case ImageChannelDataTypeSignedInt16: return "SignedInt16"; + case ImageChannelDataTypeSignedInt32: return "SignedInt32"; + case ImageChannelDataTypeUnsignedInt8: return "UnsignedInt8"; + case ImageChannelDataTypeUnsignedInt16: return "UnsignedInt16"; + case ImageChannelDataTypeUnsignedInt32: return "UnsignedInt32"; + case ImageChannelDataTypeHalfFloat: return "HalfFloat"; + case ImageChannelDataTypeFloat: return "Float"; + case ImageChannelDataTypeUnormInt24: return "UnormInt24"; + case ImageChannelDataTypeUnormInt101010_2: return "UnormInt101010_2"; + case ImageChannelDataTypeUnsignedIntRaw10EXT: return "UnsignedIntRaw10EXT"; + case ImageChannelDataTypeUnsignedIntRaw12EXT: return "UnsignedIntRaw12EXT"; + case ImageChannelDataTypeUnormInt2_101010EXT: return "UnormInt2_101010EXT"; + default: return "Unknown"; + } +} + +inline const char* FPRoundingModeToString(FPRoundingMode value) { + switch (value) { + case FPRoundingModeRTE: return "RTE"; + case FPRoundingModeRTZ: return "RTZ"; + case FPRoundingModeRTP: return "RTP"; + case FPRoundingModeRTN: return "RTN"; + default: return "Unknown"; + } +} + +inline const char* LinkageTypeToString(LinkageType value) { + switch (value) { + case LinkageTypeExport: return "Export"; + case LinkageTypeImport: return "Import"; + case LinkageTypeLinkOnceODR: return "LinkOnceODR"; + default: return "Unknown"; + } +} + +inline const char* AccessQualifierToString(AccessQualifier value) { + switch (value) { + case AccessQualifierReadOnly: return "ReadOnly"; + case AccessQualifierWriteOnly: return "WriteOnly"; + case AccessQualifierReadWrite: return "ReadWrite"; + default: return "Unknown"; + } +} + +inline const char* FunctionParameterAttributeToString(FunctionParameterAttribute value) { + switch (value) { + case FunctionParameterAttributeZext: return "Zext"; + case FunctionParameterAttributeSext: return "Sext"; + case FunctionParameterAttributeByVal: return "ByVal"; + case FunctionParameterAttributeSret: return "Sret"; + case FunctionParameterAttributeNoAlias: return "NoAlias"; + case FunctionParameterAttributeNoCapture: return "NoCapture"; + case FunctionParameterAttributeNoWrite: return "NoWrite"; + case FunctionParameterAttributeNoReadWrite: return "NoReadWrite"; + case FunctionParameterAttributeRuntimeAlignedINTEL: return "RuntimeAlignedINTEL"; + default: return "Unknown"; + } +} + +inline const char* DecorationToString(Decoration value) { + switch (value) { + case DecorationRelaxedPrecision: return "RelaxedPrecision"; + case DecorationSpecId: return "SpecId"; + case DecorationBlock: return "Block"; + case DecorationBufferBlock: return "BufferBlock"; + case DecorationRowMajor: return "RowMajor"; + case DecorationColMajor: return "ColMajor"; + case DecorationArrayStride: return "ArrayStride"; + case DecorationMatrixStride: return "MatrixStride"; + case DecorationGLSLShared: return "GLSLShared"; + case DecorationGLSLPacked: return "GLSLPacked"; + case DecorationCPacked: return "CPacked"; + case DecorationBuiltIn: return "BuiltIn"; + case DecorationNoPerspective: return "NoPerspective"; + case DecorationFlat: return "Flat"; + case DecorationPatch: return "Patch"; + case DecorationCentroid: return "Centroid"; + case DecorationSample: return "Sample"; + case DecorationInvariant: return "Invariant"; + case DecorationRestrict: return "Restrict"; + case DecorationAliased: return "Aliased"; + case DecorationVolatile: return "Volatile"; + case DecorationConstant: return "Constant"; + case DecorationCoherent: return "Coherent"; + case DecorationNonWritable: return "NonWritable"; + case DecorationNonReadable: return "NonReadable"; + case DecorationUniform: return "Uniform"; + case DecorationUniformId: return "UniformId"; + case DecorationSaturatedConversion: return "SaturatedConversion"; + case DecorationStream: return "Stream"; + case DecorationLocation: return "Location"; + case DecorationComponent: return "Component"; + case DecorationIndex: return "Index"; + case DecorationBinding: return "Binding"; + case DecorationDescriptorSet: return "DescriptorSet"; + case DecorationOffset: return "Offset"; + case DecorationXfbBuffer: return "XfbBuffer"; + case DecorationXfbStride: return "XfbStride"; + case DecorationFuncParamAttr: return "FuncParamAttr"; + case DecorationFPRoundingMode: return "FPRoundingMode"; + case DecorationFPFastMathMode: return "FPFastMathMode"; + case DecorationLinkageAttributes: return "LinkageAttributes"; + case DecorationNoContraction: return "NoContraction"; + case DecorationInputAttachmentIndex: return "InputAttachmentIndex"; + case DecorationAlignment: return "Alignment"; + case DecorationMaxByteOffset: return "MaxByteOffset"; + case DecorationAlignmentId: return "AlignmentId"; + case DecorationMaxByteOffsetId: return "MaxByteOffsetId"; + case DecorationNoSignedWrap: return "NoSignedWrap"; + case DecorationNoUnsignedWrap: return "NoUnsignedWrap"; + case DecorationWeightTextureQCOM: return "WeightTextureQCOM"; + case DecorationBlockMatchTextureQCOM: return "BlockMatchTextureQCOM"; + case DecorationBlockMatchSamplerQCOM: return "BlockMatchSamplerQCOM"; + case DecorationExplicitInterpAMD: return "ExplicitInterpAMD"; + case DecorationNodeSharesPayloadLimitsWithAMDX: return "NodeSharesPayloadLimitsWithAMDX"; + case DecorationNodeMaxPayloadsAMDX: return "NodeMaxPayloadsAMDX"; + case DecorationTrackFinishWritingAMDX: return "TrackFinishWritingAMDX"; + case DecorationPayloadNodeNameAMDX: return "PayloadNodeNameAMDX"; + case DecorationPayloadNodeBaseIndexAMDX: return "PayloadNodeBaseIndexAMDX"; + case DecorationPayloadNodeSparseArrayAMDX: return "PayloadNodeSparseArrayAMDX"; + case DecorationPayloadNodeArraySizeAMDX: return "PayloadNodeArraySizeAMDX"; + case DecorationPayloadDispatchIndirectAMDX: return "PayloadDispatchIndirectAMDX"; + case DecorationOverrideCoverageNV: return "OverrideCoverageNV"; + case DecorationPassthroughNV: return "PassthroughNV"; + case DecorationViewportRelativeNV: return "ViewportRelativeNV"; + case DecorationSecondaryViewportRelativeNV: return "SecondaryViewportRelativeNV"; + case DecorationPerPrimitiveEXT: return "PerPrimitiveEXT"; + case DecorationPerViewNV: return "PerViewNV"; + case DecorationPerTaskNV: return "PerTaskNV"; + case DecorationPerVertexKHR: return "PerVertexKHR"; + case DecorationNonUniform: return "NonUniform"; + case DecorationRestrictPointer: return "RestrictPointer"; + case DecorationAliasedPointer: return "AliasedPointer"; + case DecorationHitObjectShaderRecordBufferNV: return "HitObjectShaderRecordBufferNV"; + case DecorationBindlessSamplerNV: return "BindlessSamplerNV"; + case DecorationBindlessImageNV: return "BindlessImageNV"; + case DecorationBoundSamplerNV: return "BoundSamplerNV"; + case DecorationBoundImageNV: return "BoundImageNV"; + case DecorationSIMTCallINTEL: return "SIMTCallINTEL"; + case DecorationReferencedIndirectlyINTEL: return "ReferencedIndirectlyINTEL"; + case DecorationClobberINTEL: return "ClobberINTEL"; + case DecorationSideEffectsINTEL: return "SideEffectsINTEL"; + case DecorationVectorComputeVariableINTEL: return "VectorComputeVariableINTEL"; + case DecorationFuncParamIOKindINTEL: return "FuncParamIOKindINTEL"; + case DecorationVectorComputeFunctionINTEL: return "VectorComputeFunctionINTEL"; + case DecorationStackCallINTEL: return "StackCallINTEL"; + case DecorationGlobalVariableOffsetINTEL: return "GlobalVariableOffsetINTEL"; + case DecorationCounterBuffer: return "CounterBuffer"; + case DecorationHlslSemanticGOOGLE: return "HlslSemanticGOOGLE"; + case DecorationUserTypeGOOGLE: return "UserTypeGOOGLE"; + case DecorationFunctionRoundingModeINTEL: return "FunctionRoundingModeINTEL"; + case DecorationFunctionDenormModeINTEL: return "FunctionDenormModeINTEL"; + case DecorationRegisterINTEL: return "RegisterINTEL"; + case DecorationMemoryINTEL: return "MemoryINTEL"; + case DecorationNumbanksINTEL: return "NumbanksINTEL"; + case DecorationBankwidthINTEL: return "BankwidthINTEL"; + case DecorationMaxPrivateCopiesINTEL: return "MaxPrivateCopiesINTEL"; + case DecorationSinglepumpINTEL: return "SinglepumpINTEL"; + case DecorationDoublepumpINTEL: return "DoublepumpINTEL"; + case DecorationMaxReplicatesINTEL: return "MaxReplicatesINTEL"; + case DecorationSimpleDualPortINTEL: return "SimpleDualPortINTEL"; + case DecorationMergeINTEL: return "MergeINTEL"; + case DecorationBankBitsINTEL: return "BankBitsINTEL"; + case DecorationForcePow2DepthINTEL: return "ForcePow2DepthINTEL"; + case DecorationStridesizeINTEL: return "StridesizeINTEL"; + case DecorationWordsizeINTEL: return "WordsizeINTEL"; + case DecorationTrueDualPortINTEL: return "TrueDualPortINTEL"; + case DecorationBurstCoalesceINTEL: return "BurstCoalesceINTEL"; + case DecorationCacheSizeINTEL: return "CacheSizeINTEL"; + case DecorationDontStaticallyCoalesceINTEL: return "DontStaticallyCoalesceINTEL"; + case DecorationPrefetchINTEL: return "PrefetchINTEL"; + case DecorationStallEnableINTEL: return "StallEnableINTEL"; + case DecorationFuseLoopsInFunctionINTEL: return "FuseLoopsInFunctionINTEL"; + case DecorationMathOpDSPModeINTEL: return "MathOpDSPModeINTEL"; + case DecorationAliasScopeINTEL: return "AliasScopeINTEL"; + case DecorationNoAliasINTEL: return "NoAliasINTEL"; + case DecorationInitiationIntervalINTEL: return "InitiationIntervalINTEL"; + case DecorationMaxConcurrencyINTEL: return "MaxConcurrencyINTEL"; + case DecorationPipelineEnableINTEL: return "PipelineEnableINTEL"; + case DecorationBufferLocationINTEL: return "BufferLocationINTEL"; + case DecorationIOPipeStorageINTEL: return "IOPipeStorageINTEL"; + case DecorationFunctionFloatingPointModeINTEL: return "FunctionFloatingPointModeINTEL"; + case DecorationSingleElementVectorINTEL: return "SingleElementVectorINTEL"; + case DecorationVectorComputeCallableFunctionINTEL: return "VectorComputeCallableFunctionINTEL"; + case DecorationMediaBlockIOINTEL: return "MediaBlockIOINTEL"; + case DecorationStallFreeINTEL: return "StallFreeINTEL"; + case DecorationFPMaxErrorDecorationINTEL: return "FPMaxErrorDecorationINTEL"; + case DecorationLatencyControlLabelINTEL: return "LatencyControlLabelINTEL"; + case DecorationLatencyControlConstraintINTEL: return "LatencyControlConstraintINTEL"; + case DecorationConduitKernelArgumentINTEL: return "ConduitKernelArgumentINTEL"; + case DecorationRegisterMapKernelArgumentINTEL: return "RegisterMapKernelArgumentINTEL"; + case DecorationMMHostInterfaceAddressWidthINTEL: return "MMHostInterfaceAddressWidthINTEL"; + case DecorationMMHostInterfaceDataWidthINTEL: return "MMHostInterfaceDataWidthINTEL"; + case DecorationMMHostInterfaceLatencyINTEL: return "MMHostInterfaceLatencyINTEL"; + case DecorationMMHostInterfaceReadWriteModeINTEL: return "MMHostInterfaceReadWriteModeINTEL"; + case DecorationMMHostInterfaceMaxBurstINTEL: return "MMHostInterfaceMaxBurstINTEL"; + case DecorationMMHostInterfaceWaitRequestINTEL: return "MMHostInterfaceWaitRequestINTEL"; + case DecorationStableKernelArgumentINTEL: return "StableKernelArgumentINTEL"; + case DecorationHostAccessINTEL: return "HostAccessINTEL"; + case DecorationInitModeINTEL: return "InitModeINTEL"; + case DecorationImplementInRegisterMapINTEL: return "ImplementInRegisterMapINTEL"; + case DecorationCacheControlLoadINTEL: return "CacheControlLoadINTEL"; + case DecorationCacheControlStoreINTEL: return "CacheControlStoreINTEL"; + default: return "Unknown"; + } +} + +inline const char* BuiltInToString(BuiltIn value) { + switch (value) { + case BuiltInPosition: return "Position"; + case BuiltInPointSize: return "PointSize"; + case BuiltInClipDistance: return "ClipDistance"; + case BuiltInCullDistance: return "CullDistance"; + case BuiltInVertexId: return "VertexId"; + case BuiltInInstanceId: return "InstanceId"; + case BuiltInPrimitiveId: return "PrimitiveId"; + case BuiltInInvocationId: return "InvocationId"; + case BuiltInLayer: return "Layer"; + case BuiltInViewportIndex: return "ViewportIndex"; + case BuiltInTessLevelOuter: return "TessLevelOuter"; + case BuiltInTessLevelInner: return "TessLevelInner"; + case BuiltInTessCoord: return "TessCoord"; + case BuiltInPatchVertices: return "PatchVertices"; + case BuiltInFragCoord: return "FragCoord"; + case BuiltInPointCoord: return "PointCoord"; + case BuiltInFrontFacing: return "FrontFacing"; + case BuiltInSampleId: return "SampleId"; + case BuiltInSamplePosition: return "SamplePosition"; + case BuiltInSampleMask: return "SampleMask"; + case BuiltInFragDepth: return "FragDepth"; + case BuiltInHelperInvocation: return "HelperInvocation"; + case BuiltInNumWorkgroups: return "NumWorkgroups"; + case BuiltInWorkgroupSize: return "WorkgroupSize"; + case BuiltInWorkgroupId: return "WorkgroupId"; + case BuiltInLocalInvocationId: return "LocalInvocationId"; + case BuiltInGlobalInvocationId: return "GlobalInvocationId"; + case BuiltInLocalInvocationIndex: return "LocalInvocationIndex"; + case BuiltInWorkDim: return "WorkDim"; + case BuiltInGlobalSize: return "GlobalSize"; + case BuiltInEnqueuedWorkgroupSize: return "EnqueuedWorkgroupSize"; + case BuiltInGlobalOffset: return "GlobalOffset"; + case BuiltInGlobalLinearId: return "GlobalLinearId"; + case BuiltInSubgroupSize: return "SubgroupSize"; + case BuiltInSubgroupMaxSize: return "SubgroupMaxSize"; + case BuiltInNumSubgroups: return "NumSubgroups"; + case BuiltInNumEnqueuedSubgroups: return "NumEnqueuedSubgroups"; + case BuiltInSubgroupId: return "SubgroupId"; + case BuiltInSubgroupLocalInvocationId: return "SubgroupLocalInvocationId"; + case BuiltInVertexIndex: return "VertexIndex"; + case BuiltInInstanceIndex: return "InstanceIndex"; + case BuiltInCoreIDARM: return "CoreIDARM"; + case BuiltInCoreCountARM: return "CoreCountARM"; + case BuiltInCoreMaxIDARM: return "CoreMaxIDARM"; + case BuiltInWarpIDARM: return "WarpIDARM"; + case BuiltInWarpMaxIDARM: return "WarpMaxIDARM"; + case BuiltInSubgroupEqMask: return "SubgroupEqMask"; + case BuiltInSubgroupGeMask: return "SubgroupGeMask"; + case BuiltInSubgroupGtMask: return "SubgroupGtMask"; + case BuiltInSubgroupLeMask: return "SubgroupLeMask"; + case BuiltInSubgroupLtMask: return "SubgroupLtMask"; + case BuiltInBaseVertex: return "BaseVertex"; + case BuiltInBaseInstance: return "BaseInstance"; + case BuiltInDrawIndex: return "DrawIndex"; + case BuiltInPrimitiveShadingRateKHR: return "PrimitiveShadingRateKHR"; + case BuiltInDeviceIndex: return "DeviceIndex"; + case BuiltInViewIndex: return "ViewIndex"; + case BuiltInShadingRateKHR: return "ShadingRateKHR"; + case BuiltInBaryCoordNoPerspAMD: return "BaryCoordNoPerspAMD"; + case BuiltInBaryCoordNoPerspCentroidAMD: return "BaryCoordNoPerspCentroidAMD"; + case BuiltInBaryCoordNoPerspSampleAMD: return "BaryCoordNoPerspSampleAMD"; + case BuiltInBaryCoordSmoothAMD: return "BaryCoordSmoothAMD"; + case BuiltInBaryCoordSmoothCentroidAMD: return "BaryCoordSmoothCentroidAMD"; + case BuiltInBaryCoordSmoothSampleAMD: return "BaryCoordSmoothSampleAMD"; + case BuiltInBaryCoordPullModelAMD: return "BaryCoordPullModelAMD"; + case BuiltInFragStencilRefEXT: return "FragStencilRefEXT"; + case BuiltInRemainingRecursionLevelsAMDX: return "RemainingRecursionLevelsAMDX"; + case BuiltInShaderIndexAMDX: return "ShaderIndexAMDX"; + case BuiltInViewportMaskNV: return "ViewportMaskNV"; + case BuiltInSecondaryPositionNV: return "SecondaryPositionNV"; + case BuiltInSecondaryViewportMaskNV: return "SecondaryViewportMaskNV"; + case BuiltInPositionPerViewNV: return "PositionPerViewNV"; + case BuiltInViewportMaskPerViewNV: return "ViewportMaskPerViewNV"; + case BuiltInFullyCoveredEXT: return "FullyCoveredEXT"; + case BuiltInTaskCountNV: return "TaskCountNV"; + case BuiltInPrimitiveCountNV: return "PrimitiveCountNV"; + case BuiltInPrimitiveIndicesNV: return "PrimitiveIndicesNV"; + case BuiltInClipDistancePerViewNV: return "ClipDistancePerViewNV"; + case BuiltInCullDistancePerViewNV: return "CullDistancePerViewNV"; + case BuiltInLayerPerViewNV: return "LayerPerViewNV"; + case BuiltInMeshViewCountNV: return "MeshViewCountNV"; + case BuiltInMeshViewIndicesNV: return "MeshViewIndicesNV"; + case BuiltInBaryCoordKHR: return "BaryCoordKHR"; + case BuiltInBaryCoordNoPerspKHR: return "BaryCoordNoPerspKHR"; + case BuiltInFragSizeEXT: return "FragSizeEXT"; + case BuiltInFragInvocationCountEXT: return "FragInvocationCountEXT"; + case BuiltInPrimitivePointIndicesEXT: return "PrimitivePointIndicesEXT"; + case BuiltInPrimitiveLineIndicesEXT: return "PrimitiveLineIndicesEXT"; + case BuiltInPrimitiveTriangleIndicesEXT: return "PrimitiveTriangleIndicesEXT"; + case BuiltInCullPrimitiveEXT: return "CullPrimitiveEXT"; + 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 BuiltInObjectToWorldKHR: return "ObjectToWorldKHR"; + case BuiltInWorldToObjectKHR: return "WorldToObjectKHR"; + case BuiltInHitTNV: return "HitTNV"; + case BuiltInHitKindKHR: return "HitKindKHR"; + case BuiltInCurrentRayTimeNV: return "CurrentRayTimeNV"; + case BuiltInHitTriangleVertexPositionsKHR: return "HitTriangleVertexPositionsKHR"; + case BuiltInHitMicroTriangleVertexPositionsNV: return "HitMicroTriangleVertexPositionsNV"; + case BuiltInHitMicroTriangleVertexBarycentricsNV: return "HitMicroTriangleVertexBarycentricsNV"; + case BuiltInIncomingRayFlagsKHR: return "IncomingRayFlagsKHR"; + case BuiltInRayGeometryIndexKHR: return "RayGeometryIndexKHR"; + case BuiltInWarpsPerSMNV: return "WarpsPerSMNV"; + case BuiltInSMCountNV: return "SMCountNV"; + case BuiltInWarpIDNV: return "WarpIDNV"; + case BuiltInSMIDNV: return "SMIDNV"; + case BuiltInHitKindFrontFacingMicroTriangleNV: return "HitKindFrontFacingMicroTriangleNV"; + case BuiltInHitKindBackFacingMicroTriangleNV: return "HitKindBackFacingMicroTriangleNV"; + case BuiltInCullMaskKHR: return "CullMaskKHR"; + default: return "Unknown"; + } +} + +inline const char* ScopeToString(Scope value) { + switch (value) { + case ScopeCrossDevice: return "CrossDevice"; + case ScopeDevice: return "Device"; + case ScopeWorkgroup: return "Workgroup"; + case ScopeSubgroup: return "Subgroup"; + case ScopeInvocation: return "Invocation"; + case ScopeQueueFamily: return "QueueFamily"; + case ScopeShaderCallKHR: return "ShaderCallKHR"; + default: return "Unknown"; + } +} + +inline const char* GroupOperationToString(GroupOperation value) { + switch (value) { + case GroupOperationReduce: return "Reduce"; + case GroupOperationInclusiveScan: return "InclusiveScan"; + case GroupOperationExclusiveScan: return "ExclusiveScan"; + case GroupOperationClusteredReduce: return "ClusteredReduce"; + case GroupOperationPartitionedReduceNV: return "PartitionedReduceNV"; + case GroupOperationPartitionedInclusiveScanNV: return "PartitionedInclusiveScanNV"; + case GroupOperationPartitionedExclusiveScanNV: return "PartitionedExclusiveScanNV"; + default: return "Unknown"; + } +} + +inline const char* KernelEnqueueFlagsToString(KernelEnqueueFlags value) { + switch (value) { + case KernelEnqueueFlagsNoWait: return "NoWait"; + case KernelEnqueueFlagsWaitKernel: return "WaitKernel"; + case KernelEnqueueFlagsWaitWorkGroup: return "WaitWorkGroup"; + default: return "Unknown"; + } +} + +inline const char* CapabilityToString(Capability value) { + switch (value) { + case CapabilityMatrix: return "Matrix"; + case CapabilityShader: return "Shader"; + case CapabilityGeometry: return "Geometry"; + case CapabilityTessellation: return "Tessellation"; + case CapabilityAddresses: return "Addresses"; + case CapabilityLinkage: return "Linkage"; + case CapabilityKernel: return "Kernel"; + case CapabilityVector16: return "Vector16"; + case CapabilityFloat16Buffer: return "Float16Buffer"; + case CapabilityFloat16: return "Float16"; + case CapabilityFloat64: return "Float64"; + case CapabilityInt64: return "Int64"; + case CapabilityInt64Atomics: return "Int64Atomics"; + case CapabilityImageBasic: return "ImageBasic"; + case CapabilityImageReadWrite: return "ImageReadWrite"; + case CapabilityImageMipmap: return "ImageMipmap"; + case CapabilityPipes: return "Pipes"; + case CapabilityGroups: return "Groups"; + case CapabilityDeviceEnqueue: return "DeviceEnqueue"; + case CapabilityLiteralSampler: return "LiteralSampler"; + case CapabilityAtomicStorage: return "AtomicStorage"; + case CapabilityInt16: return "Int16"; + case CapabilityTessellationPointSize: return "TessellationPointSize"; + case CapabilityGeometryPointSize: return "GeometryPointSize"; + case CapabilityImageGatherExtended: return "ImageGatherExtended"; + case CapabilityStorageImageMultisample: return "StorageImageMultisample"; + case CapabilityUniformBufferArrayDynamicIndexing: return "UniformBufferArrayDynamicIndexing"; + case CapabilitySampledImageArrayDynamicIndexing: return "SampledImageArrayDynamicIndexing"; + case CapabilityStorageBufferArrayDynamicIndexing: return "StorageBufferArrayDynamicIndexing"; + case CapabilityStorageImageArrayDynamicIndexing: return "StorageImageArrayDynamicIndexing"; + case CapabilityClipDistance: return "ClipDistance"; + case CapabilityCullDistance: return "CullDistance"; + case CapabilityImageCubeArray: return "ImageCubeArray"; + case CapabilitySampleRateShading: return "SampleRateShading"; + case CapabilityImageRect: return "ImageRect"; + case CapabilitySampledRect: return "SampledRect"; + case CapabilityGenericPointer: return "GenericPointer"; + case CapabilityInt8: return "Int8"; + case CapabilityInputAttachment: return "InputAttachment"; + case CapabilitySparseResidency: return "SparseResidency"; + case CapabilityMinLod: return "MinLod"; + case CapabilitySampled1D: return "Sampled1D"; + case CapabilityImage1D: return "Image1D"; + case CapabilitySampledCubeArray: return "SampledCubeArray"; + case CapabilitySampledBuffer: return "SampledBuffer"; + case CapabilityImageBuffer: return "ImageBuffer"; + case CapabilityImageMSArray: return "ImageMSArray"; + case CapabilityStorageImageExtendedFormats: return "StorageImageExtendedFormats"; + case CapabilityImageQuery: return "ImageQuery"; + case CapabilityDerivativeControl: return "DerivativeControl"; + case CapabilityInterpolationFunction: return "InterpolationFunction"; + case CapabilityTransformFeedback: return "TransformFeedback"; + case CapabilityGeometryStreams: return "GeometryStreams"; + case CapabilityStorageImageReadWithoutFormat: return "StorageImageReadWithoutFormat"; + case CapabilityStorageImageWriteWithoutFormat: return "StorageImageWriteWithoutFormat"; + case CapabilityMultiViewport: return "MultiViewport"; + case CapabilitySubgroupDispatch: return "SubgroupDispatch"; + case CapabilityNamedBarrier: return "NamedBarrier"; + case CapabilityPipeStorage: return "PipeStorage"; + case CapabilityGroupNonUniform: return "GroupNonUniform"; + case CapabilityGroupNonUniformVote: return "GroupNonUniformVote"; + case CapabilityGroupNonUniformArithmetic: return "GroupNonUniformArithmetic"; + case CapabilityGroupNonUniformBallot: return "GroupNonUniformBallot"; + case CapabilityGroupNonUniformShuffle: return "GroupNonUniformShuffle"; + case CapabilityGroupNonUniformShuffleRelative: return "GroupNonUniformShuffleRelative"; + case CapabilityGroupNonUniformClustered: return "GroupNonUniformClustered"; + case CapabilityGroupNonUniformQuad: return "GroupNonUniformQuad"; + case CapabilityShaderLayer: return "ShaderLayer"; + case CapabilityShaderViewportIndex: return "ShaderViewportIndex"; + case CapabilityUniformDecoration: return "UniformDecoration"; + case CapabilityCoreBuiltinsARM: return "CoreBuiltinsARM"; + case CapabilityTileImageColorReadAccessEXT: return "TileImageColorReadAccessEXT"; + case CapabilityTileImageDepthReadAccessEXT: return "TileImageDepthReadAccessEXT"; + case CapabilityTileImageStencilReadAccessEXT: return "TileImageStencilReadAccessEXT"; + case CapabilityCooperativeMatrixLayoutsARM: return "CooperativeMatrixLayoutsARM"; + case CapabilityFragmentShadingRateKHR: return "FragmentShadingRateKHR"; + case CapabilitySubgroupBallotKHR: return "SubgroupBallotKHR"; + case CapabilityDrawParameters: return "DrawParameters"; + case CapabilityWorkgroupMemoryExplicitLayoutKHR: return "WorkgroupMemoryExplicitLayoutKHR"; + case CapabilityWorkgroupMemoryExplicitLayout8BitAccessKHR: return "WorkgroupMemoryExplicitLayout8BitAccessKHR"; + case CapabilityWorkgroupMemoryExplicitLayout16BitAccessKHR: return "WorkgroupMemoryExplicitLayout16BitAccessKHR"; + case CapabilitySubgroupVoteKHR: return "SubgroupVoteKHR"; + case CapabilityStorageBuffer16BitAccess: return "StorageBuffer16BitAccess"; + case CapabilityStorageUniform16: return "StorageUniform16"; + case CapabilityStoragePushConstant16: return "StoragePushConstant16"; + case CapabilityStorageInputOutput16: return "StorageInputOutput16"; + case CapabilityDeviceGroup: return "DeviceGroup"; + case CapabilityMultiView: return "MultiView"; + case CapabilityVariablePointersStorageBuffer: return "VariablePointersStorageBuffer"; + case CapabilityVariablePointers: return "VariablePointers"; + case CapabilityAtomicStorageOps: return "AtomicStorageOps"; + case CapabilitySampleMaskPostDepthCoverage: return "SampleMaskPostDepthCoverage"; + case CapabilityStorageBuffer8BitAccess: return "StorageBuffer8BitAccess"; + case CapabilityUniformAndStorageBuffer8BitAccess: return "UniformAndStorageBuffer8BitAccess"; + case CapabilityStoragePushConstant8: return "StoragePushConstant8"; + case CapabilityDenormPreserve: return "DenormPreserve"; + case CapabilityDenormFlushToZero: return "DenormFlushToZero"; + case CapabilitySignedZeroInfNanPreserve: return "SignedZeroInfNanPreserve"; + case CapabilityRoundingModeRTE: return "RoundingModeRTE"; + case CapabilityRoundingModeRTZ: return "RoundingModeRTZ"; + case CapabilityRayQueryProvisionalKHR: return "RayQueryProvisionalKHR"; + case CapabilityRayQueryKHR: return "RayQueryKHR"; + case CapabilityUntypedPointersKHR: return "UntypedPointersKHR"; + case CapabilityRayTraversalPrimitiveCullingKHR: return "RayTraversalPrimitiveCullingKHR"; + case CapabilityRayTracingKHR: return "RayTracingKHR"; + case CapabilityTextureSampleWeightedQCOM: return "TextureSampleWeightedQCOM"; + case CapabilityTextureBoxFilterQCOM: return "TextureBoxFilterQCOM"; + case CapabilityTextureBlockMatchQCOM: return "TextureBlockMatchQCOM"; + case CapabilityTextureBlockMatch2QCOM: return "TextureBlockMatch2QCOM"; + case CapabilityFloat16ImageAMD: return "Float16ImageAMD"; + case CapabilityImageGatherBiasLodAMD: return "ImageGatherBiasLodAMD"; + case CapabilityFragmentMaskAMD: return "FragmentMaskAMD"; + case CapabilityStencilExportEXT: return "StencilExportEXT"; + case CapabilityImageReadWriteLodAMD: return "ImageReadWriteLodAMD"; + case CapabilityInt64ImageEXT: return "Int64ImageEXT"; + case CapabilityShaderClockKHR: return "ShaderClockKHR"; + case CapabilityShaderEnqueueAMDX: return "ShaderEnqueueAMDX"; + case CapabilityQuadControlKHR: return "QuadControlKHR"; + case CapabilitySampleMaskOverrideCoverageNV: return "SampleMaskOverrideCoverageNV"; + case CapabilityGeometryShaderPassthroughNV: return "GeometryShaderPassthroughNV"; + case CapabilityShaderViewportIndexLayerEXT: return "ShaderViewportIndexLayerEXT"; + case CapabilityShaderViewportMaskNV: return "ShaderViewportMaskNV"; + case CapabilityShaderStereoViewNV: return "ShaderStereoViewNV"; + case CapabilityPerViewAttributesNV: return "PerViewAttributesNV"; + case CapabilityFragmentFullyCoveredEXT: return "FragmentFullyCoveredEXT"; + case CapabilityMeshShadingNV: return "MeshShadingNV"; + case CapabilityImageFootprintNV: return "ImageFootprintNV"; + case CapabilityMeshShadingEXT: return "MeshShadingEXT"; + case CapabilityFragmentBarycentricKHR: return "FragmentBarycentricKHR"; + case CapabilityComputeDerivativeGroupQuadsKHR: return "ComputeDerivativeGroupQuadsKHR"; + case CapabilityFragmentDensityEXT: return "FragmentDensityEXT"; + case CapabilityGroupNonUniformPartitionedNV: return "GroupNonUniformPartitionedNV"; + case CapabilityShaderNonUniform: return "ShaderNonUniform"; + case CapabilityRuntimeDescriptorArray: return "RuntimeDescriptorArray"; + case CapabilityInputAttachmentArrayDynamicIndexing: return "InputAttachmentArrayDynamicIndexing"; + case CapabilityUniformTexelBufferArrayDynamicIndexing: return "UniformTexelBufferArrayDynamicIndexing"; + case CapabilityStorageTexelBufferArrayDynamicIndexing: return "StorageTexelBufferArrayDynamicIndexing"; + case CapabilityUniformBufferArrayNonUniformIndexing: return "UniformBufferArrayNonUniformIndexing"; + case CapabilitySampledImageArrayNonUniformIndexing: return "SampledImageArrayNonUniformIndexing"; + case CapabilityStorageBufferArrayNonUniformIndexing: return "StorageBufferArrayNonUniformIndexing"; + case CapabilityStorageImageArrayNonUniformIndexing: return "StorageImageArrayNonUniformIndexing"; + case CapabilityInputAttachmentArrayNonUniformIndexing: return "InputAttachmentArrayNonUniformIndexing"; + case CapabilityUniformTexelBufferArrayNonUniformIndexing: return "UniformTexelBufferArrayNonUniformIndexing"; + case CapabilityStorageTexelBufferArrayNonUniformIndexing: return "StorageTexelBufferArrayNonUniformIndexing"; + case CapabilityRayTracingPositionFetchKHR: return "RayTracingPositionFetchKHR"; + case CapabilityRayTracingNV: return "RayTracingNV"; + case CapabilityRayTracingMotionBlurNV: return "RayTracingMotionBlurNV"; + case CapabilityVulkanMemoryModel: return "VulkanMemoryModel"; + case CapabilityVulkanMemoryModelDeviceScope: return "VulkanMemoryModelDeviceScope"; + case CapabilityPhysicalStorageBufferAddresses: return "PhysicalStorageBufferAddresses"; + case CapabilityComputeDerivativeGroupLinearKHR: return "ComputeDerivativeGroupLinearKHR"; + case CapabilityRayTracingProvisionalKHR: return "RayTracingProvisionalKHR"; + case CapabilityCooperativeMatrixNV: return "CooperativeMatrixNV"; + case CapabilityFragmentShaderSampleInterlockEXT: return "FragmentShaderSampleInterlockEXT"; + case CapabilityFragmentShaderShadingRateInterlockEXT: return "FragmentShaderShadingRateInterlockEXT"; + case CapabilityShaderSMBuiltinsNV: return "ShaderSMBuiltinsNV"; + case CapabilityFragmentShaderPixelInterlockEXT: return "FragmentShaderPixelInterlockEXT"; + case CapabilityDemoteToHelperInvocation: return "DemoteToHelperInvocation"; + case CapabilityDisplacementMicromapNV: return "DisplacementMicromapNV"; + case CapabilityRayTracingOpacityMicromapEXT: return "RayTracingOpacityMicromapEXT"; + case CapabilityShaderInvocationReorderNV: return "ShaderInvocationReorderNV"; + case CapabilityBindlessTextureNV: return "BindlessTextureNV"; + case CapabilityRayQueryPositionFetchKHR: return "RayQueryPositionFetchKHR"; + case CapabilityCooperativeVectorNV: return "CooperativeVectorNV"; + case CapabilityAtomicFloat16VectorNV: return "AtomicFloat16VectorNV"; + case CapabilityRayTracingDisplacementMicromapNV: return "RayTracingDisplacementMicromapNV"; + case CapabilityRawAccessChainsNV: return "RawAccessChainsNV"; + case CapabilityCooperativeMatrixReductionsNV: return "CooperativeMatrixReductionsNV"; + case CapabilityCooperativeMatrixConversionsNV: return "CooperativeMatrixConversionsNV"; + case CapabilityCooperativeMatrixPerElementOperationsNV: return "CooperativeMatrixPerElementOperationsNV"; + case CapabilityCooperativeMatrixTensorAddressingNV: return "CooperativeMatrixTensorAddressingNV"; + case CapabilityCooperativeMatrixBlockLoadsNV: return "CooperativeMatrixBlockLoadsNV"; + case CapabilityCooperativeVectorTrainingNV: return "CooperativeVectorTrainingNV"; + case CapabilityTensorAddressingNV: return "TensorAddressingNV"; + case CapabilitySubgroupShuffleINTEL: return "SubgroupShuffleINTEL"; + case CapabilitySubgroupBufferBlockIOINTEL: return "SubgroupBufferBlockIOINTEL"; + case CapabilitySubgroupImageBlockIOINTEL: return "SubgroupImageBlockIOINTEL"; + case CapabilitySubgroupImageMediaBlockIOINTEL: return "SubgroupImageMediaBlockIOINTEL"; + case CapabilityRoundToInfinityINTEL: return "RoundToInfinityINTEL"; + case CapabilityFloatingPointModeINTEL: return "FloatingPointModeINTEL"; + case CapabilityIntegerFunctions2INTEL: return "IntegerFunctions2INTEL"; + case CapabilityFunctionPointersINTEL: return "FunctionPointersINTEL"; + case CapabilityIndirectReferencesINTEL: return "IndirectReferencesINTEL"; + case CapabilityAsmINTEL: return "AsmINTEL"; + case CapabilityAtomicFloat32MinMaxEXT: return "AtomicFloat32MinMaxEXT"; + case CapabilityAtomicFloat64MinMaxEXT: return "AtomicFloat64MinMaxEXT"; + case CapabilityAtomicFloat16MinMaxEXT: return "AtomicFloat16MinMaxEXT"; + case CapabilityVectorComputeINTEL: return "VectorComputeINTEL"; + case CapabilityVectorAnyINTEL: return "VectorAnyINTEL"; + case CapabilityExpectAssumeKHR: return "ExpectAssumeKHR"; + case CapabilitySubgroupAvcMotionEstimationINTEL: return "SubgroupAvcMotionEstimationINTEL"; + case CapabilitySubgroupAvcMotionEstimationIntraINTEL: return "SubgroupAvcMotionEstimationIntraINTEL"; + case CapabilitySubgroupAvcMotionEstimationChromaINTEL: return "SubgroupAvcMotionEstimationChromaINTEL"; + case CapabilityVariableLengthArrayINTEL: return "VariableLengthArrayINTEL"; + case CapabilityFunctionFloatControlINTEL: return "FunctionFloatControlINTEL"; + case CapabilityFPGAMemoryAttributesINTEL: return "FPGAMemoryAttributesINTEL"; + case CapabilityFPFastMathModeINTEL: return "FPFastMathModeINTEL"; + case CapabilityArbitraryPrecisionIntegersINTEL: return "ArbitraryPrecisionIntegersINTEL"; + case CapabilityArbitraryPrecisionFloatingPointINTEL: return "ArbitraryPrecisionFloatingPointINTEL"; + case CapabilityUnstructuredLoopControlsINTEL: return "UnstructuredLoopControlsINTEL"; + case CapabilityFPGALoopControlsINTEL: return "FPGALoopControlsINTEL"; + case CapabilityKernelAttributesINTEL: return "KernelAttributesINTEL"; + case CapabilityFPGAKernelAttributesINTEL: return "FPGAKernelAttributesINTEL"; + case CapabilityFPGAMemoryAccessesINTEL: return "FPGAMemoryAccessesINTEL"; + case CapabilityFPGAClusterAttributesINTEL: return "FPGAClusterAttributesINTEL"; + case CapabilityLoopFuseINTEL: return "LoopFuseINTEL"; + case CapabilityFPGADSPControlINTEL: return "FPGADSPControlINTEL"; + case CapabilityMemoryAccessAliasingINTEL: return "MemoryAccessAliasingINTEL"; + case CapabilityFPGAInvocationPipeliningAttributesINTEL: return "FPGAInvocationPipeliningAttributesINTEL"; + case CapabilityFPGABufferLocationINTEL: return "FPGABufferLocationINTEL"; + case CapabilityArbitraryPrecisionFixedPointINTEL: return "ArbitraryPrecisionFixedPointINTEL"; + case CapabilityUSMStorageClassesINTEL: return "USMStorageClassesINTEL"; + case CapabilityRuntimeAlignedAttributeINTEL: return "RuntimeAlignedAttributeINTEL"; + case CapabilityIOPipesINTEL: return "IOPipesINTEL"; + case CapabilityBlockingPipesINTEL: return "BlockingPipesINTEL"; + case CapabilityFPGARegINTEL: return "FPGARegINTEL"; + case CapabilityDotProductInputAll: return "DotProductInputAll"; + case CapabilityDotProductInput4x8Bit: return "DotProductInput4x8Bit"; + case CapabilityDotProductInput4x8BitPacked: return "DotProductInput4x8BitPacked"; + case CapabilityDotProduct: return "DotProduct"; + case CapabilityRayCullMaskKHR: return "RayCullMaskKHR"; + case CapabilityCooperativeMatrixKHR: return "CooperativeMatrixKHR"; + case CapabilityReplicatedCompositesEXT: return "ReplicatedCompositesEXT"; + case CapabilityBitInstructions: return "BitInstructions"; + case CapabilityGroupNonUniformRotateKHR: return "GroupNonUniformRotateKHR"; + case CapabilityFloatControls2: return "FloatControls2"; + case CapabilityAtomicFloat32AddEXT: return "AtomicFloat32AddEXT"; + case CapabilityAtomicFloat64AddEXT: return "AtomicFloat64AddEXT"; + case CapabilityLongCompositesINTEL: return "LongCompositesINTEL"; + case CapabilityOptNoneEXT: return "OptNoneEXT"; + case CapabilityAtomicFloat16AddEXT: return "AtomicFloat16AddEXT"; + case CapabilityDebugInfoModuleINTEL: return "DebugInfoModuleINTEL"; + case CapabilityBFloat16ConversionINTEL: return "BFloat16ConversionINTEL"; + case CapabilitySplitBarrierINTEL: return "SplitBarrierINTEL"; + case CapabilityArithmeticFenceEXT: return "ArithmeticFenceEXT"; + case CapabilityFPGAClusterAttributesV2INTEL: return "FPGAClusterAttributesV2INTEL"; + case CapabilityFPGAKernelAttributesv2INTEL: return "FPGAKernelAttributesv2INTEL"; + case CapabilityFPMaxErrorINTEL: return "FPMaxErrorINTEL"; + case CapabilityFPGALatencyControlINTEL: return "FPGALatencyControlINTEL"; + case CapabilityFPGAArgumentInterfacesINTEL: return "FPGAArgumentInterfacesINTEL"; + case CapabilityGlobalVariableHostAccessINTEL: return "GlobalVariableHostAccessINTEL"; + case CapabilityGlobalVariableFPGADecorationsINTEL: return "GlobalVariableFPGADecorationsINTEL"; + case CapabilitySubgroupBufferPrefetchINTEL: return "SubgroupBufferPrefetchINTEL"; + case CapabilityGroupUniformArithmeticKHR: return "GroupUniformArithmeticKHR"; + case CapabilityMaskedGatherScatterINTEL: return "MaskedGatherScatterINTEL"; + case CapabilityCacheControlsINTEL: return "CacheControlsINTEL"; + case CapabilityRegisterLimitsINTEL: return "RegisterLimitsINTEL"; + default: return "Unknown"; + } +} + +inline const char* RayQueryIntersectionToString(RayQueryIntersection value) { + switch (value) { + case RayQueryIntersectionRayQueryCandidateIntersectionKHR: return "RayQueryCandidateIntersectionKHR"; + case RayQueryIntersectionRayQueryCommittedIntersectionKHR: return "RayQueryCommittedIntersectionKHR"; + default: return "Unknown"; + } +} + +inline const char* RayQueryCommittedIntersectionTypeToString(RayQueryCommittedIntersectionType value) { + switch (value) { + case RayQueryCommittedIntersectionTypeRayQueryCommittedIntersectionNoneKHR: return "RayQueryCommittedIntersectionNoneKHR"; + case RayQueryCommittedIntersectionTypeRayQueryCommittedIntersectionTriangleKHR: return "RayQueryCommittedIntersectionTriangleKHR"; + case RayQueryCommittedIntersectionTypeRayQueryCommittedIntersectionGeneratedKHR: return "RayQueryCommittedIntersectionGeneratedKHR"; + default: return "Unknown"; + } +} + +inline const char* RayQueryCandidateIntersectionTypeToString(RayQueryCandidateIntersectionType value) { + switch (value) { + case RayQueryCandidateIntersectionTypeRayQueryCandidateIntersectionTriangleKHR: return "RayQueryCandidateIntersectionTriangleKHR"; + case RayQueryCandidateIntersectionTypeRayQueryCandidateIntersectionAABBKHR: return "RayQueryCandidateIntersectionAABBKHR"; + default: return "Unknown"; + } +} + +inline const char* FPDenormModeToString(FPDenormMode value) { + switch (value) { + case FPDenormModePreserve: return "Preserve"; + case FPDenormModeFlushToZero: return "FlushToZero"; + default: return "Unknown"; + } +} + +inline const char* FPOperationModeToString(FPOperationMode value) { + switch (value) { + case FPOperationModeIEEE: return "IEEE"; + case FPOperationModeALT: return "ALT"; + default: return "Unknown"; + } +} + +inline const char* QuantizationModesToString(QuantizationModes value) { + switch (value) { + case QuantizationModesTRN: return "TRN"; + case QuantizationModesTRN_ZERO: return "TRN_ZERO"; + case QuantizationModesRND: return "RND"; + case QuantizationModesRND_ZERO: return "RND_ZERO"; + case QuantizationModesRND_INF: return "RND_INF"; + case QuantizationModesRND_MIN_INF: return "RND_MIN_INF"; + case QuantizationModesRND_CONV: return "RND_CONV"; + case QuantizationModesRND_CONV_ODD: return "RND_CONV_ODD"; + default: return "Unknown"; + } +} + +inline const char* OverflowModesToString(OverflowModes value) { + switch (value) { + case OverflowModesWRAP: return "WRAP"; + case OverflowModesSAT: return "SAT"; + case OverflowModesSAT_ZERO: return "SAT_ZERO"; + case OverflowModesSAT_SYM: return "SAT_SYM"; + default: return "Unknown"; + } +} + +inline const char* PackedVectorFormatToString(PackedVectorFormat value) { + switch (value) { + case PackedVectorFormatPackedVectorFormat4x8Bit: return "PackedVectorFormat4x8Bit"; + default: return "Unknown"; + } +} + +inline const char* CooperativeMatrixLayoutToString(CooperativeMatrixLayout value) { + switch (value) { + case CooperativeMatrixLayoutRowMajorKHR: return "RowMajorKHR"; + case CooperativeMatrixLayoutColumnMajorKHR: return "ColumnMajorKHR"; + case CooperativeMatrixLayoutRowBlockedInterleavedARM: return "RowBlockedInterleavedARM"; + case CooperativeMatrixLayoutColumnBlockedInterleavedARM: return "ColumnBlockedInterleavedARM"; + default: return "Unknown"; + } +} + +inline const char* CooperativeMatrixUseToString(CooperativeMatrixUse value) { + switch (value) { + case CooperativeMatrixUseMatrixAKHR: return "MatrixAKHR"; + case CooperativeMatrixUseMatrixBKHR: return "MatrixBKHR"; + case CooperativeMatrixUseMatrixAccumulatorKHR: return "MatrixAccumulatorKHR"; + default: return "Unknown"; + } +} + +inline const char* TensorClampModeToString(TensorClampMode value) { + switch (value) { + case TensorClampModeUndefined: return "Undefined"; + case TensorClampModeConstant: return "Constant"; + case TensorClampModeClampToEdge: return "ClampToEdge"; + case TensorClampModeRepeat: return "Repeat"; + case TensorClampModeRepeatMirrored: return "RepeatMirrored"; + default: return "Unknown"; + } +} + +inline const char* InitializationModeQualifierToString(InitializationModeQualifier value) { + switch (value) { + case InitializationModeQualifierInitOnDeviceReprogramINTEL: return "InitOnDeviceReprogramINTEL"; + case InitializationModeQualifierInitOnDeviceResetINTEL: return "InitOnDeviceResetINTEL"; + default: return "Unknown"; + } +} + +inline const char* HostAccessQualifierToString(HostAccessQualifier value) { + switch (value) { + case HostAccessQualifierNoneINTEL: return "NoneINTEL"; + case HostAccessQualifierReadINTEL: return "ReadINTEL"; + case HostAccessQualifierWriteINTEL: return "WriteINTEL"; + case HostAccessQualifierReadWriteINTEL: return "ReadWriteINTEL"; + default: return "Unknown"; + } +} + +inline const char* LoadCacheControlToString(LoadCacheControl value) { + switch (value) { + case LoadCacheControlUncachedINTEL: return "UncachedINTEL"; + case LoadCacheControlCachedINTEL: return "CachedINTEL"; + case LoadCacheControlStreamingINTEL: return "StreamingINTEL"; + case LoadCacheControlInvalidateAfterReadINTEL: return "InvalidateAfterReadINTEL"; + case LoadCacheControlConstCachedINTEL: return "ConstCachedINTEL"; + default: return "Unknown"; + } +} + +inline const char* StoreCacheControlToString(StoreCacheControl value) { + switch (value) { + case StoreCacheControlUncachedINTEL: return "UncachedINTEL"; + case StoreCacheControlWriteThroughINTEL: return "WriteThroughINTEL"; + case StoreCacheControlWriteBackINTEL: return "WriteBackINTEL"; + case StoreCacheControlStreamingINTEL: return "StreamingINTEL"; + default: return "Unknown"; + } +} + +inline const char* NamedMaximumNumberOfRegistersToString(NamedMaximumNumberOfRegisters value) { + switch (value) { + case NamedMaximumNumberOfRegistersAutoINTEL: return "AutoINTEL"; + default: return "Unknown"; + } +} + +inline const char* FPEncodingToString(FPEncoding value) { + return "Unknown"; +} + +inline const char* CooperativeVectorMatrixLayoutToString(CooperativeVectorMatrixLayout value) { + switch (value) { + case CooperativeVectorMatrixLayoutRowMajorNV: return "RowMajorNV"; + case CooperativeVectorMatrixLayoutColumnMajorNV: return "ColumnMajorNV"; + case CooperativeVectorMatrixLayoutInferencingOptimalNV: return "InferencingOptimalNV"; + case CooperativeVectorMatrixLayoutTrainingOptimalNV: return "TrainingOptimalNV"; + default: return "Unknown"; + } +} + +inline const char* ComponentTypeToString(ComponentType value) { + switch (value) { + case ComponentTypeFloat16NV: return "Float16NV"; + case ComponentTypeFloat32NV: return "Float32NV"; + case ComponentTypeFloat64NV: return "Float64NV"; + case ComponentTypeSignedInt8NV: return "SignedInt8NV"; + case ComponentTypeSignedInt16NV: return "SignedInt16NV"; + case ComponentTypeSignedInt32NV: return "SignedInt32NV"; + case ComponentTypeSignedInt64NV: return "SignedInt64NV"; + case ComponentTypeUnsignedInt8NV: return "UnsignedInt8NV"; + case ComponentTypeUnsignedInt16NV: return "UnsignedInt16NV"; + case ComponentTypeUnsignedInt32NV: return "UnsignedInt32NV"; + case ComponentTypeUnsignedInt64NV: return "UnsignedInt64NV"; + case ComponentTypeSignedInt8PackedNV: return "SignedInt8PackedNV"; + case ComponentTypeUnsignedInt8PackedNV: return "UnsignedInt8PackedNV"; + case ComponentTypeFloatE4M3NV: return "FloatE4M3NV"; + case ComponentTypeFloatE5M2NV: return "FloatE5M2NV"; + default: return "Unknown"; + } +} + +inline const char* OpToString(Op value) { + switch (value) { + case OpNop: return "OpNop"; + case OpUndef: return "OpUndef"; + case OpSourceContinued: return "OpSourceContinued"; + case OpSource: return "OpSource"; + case OpSourceExtension: return "OpSourceExtension"; + case OpName: return "OpName"; + case OpMemberName: return "OpMemberName"; + case OpString: return "OpString"; + case OpLine: return "OpLine"; + case OpExtension: return "OpExtension"; + case OpExtInstImport: return "OpExtInstImport"; + case OpExtInst: return "OpExtInst"; + case OpMemoryModel: return "OpMemoryModel"; + case OpEntryPoint: return "OpEntryPoint"; + case OpExecutionMode: return "OpExecutionMode"; + case OpCapability: return "OpCapability"; + case OpTypeVoid: return "OpTypeVoid"; + case OpTypeBool: return "OpTypeBool"; + case OpTypeInt: return "OpTypeInt"; + case OpTypeFloat: return "OpTypeFloat"; + case OpTypeVector: return "OpTypeVector"; + case OpTypeMatrix: return "OpTypeMatrix"; + case OpTypeImage: return "OpTypeImage"; + case OpTypeSampler: return "OpTypeSampler"; + case OpTypeSampledImage: return "OpTypeSampledImage"; + case OpTypeArray: return "OpTypeArray"; + case OpTypeRuntimeArray: return "OpTypeRuntimeArray"; + case OpTypeStruct: return "OpTypeStruct"; + case OpTypeOpaque: return "OpTypeOpaque"; + case OpTypePointer: return "OpTypePointer"; + case OpTypeFunction: return "OpTypeFunction"; + case OpTypeEvent: return "OpTypeEvent"; + case OpTypeDeviceEvent: return "OpTypeDeviceEvent"; + case OpTypeReserveId: return "OpTypeReserveId"; + case OpTypeQueue: return "OpTypeQueue"; + case OpTypePipe: return "OpTypePipe"; + case OpTypeForwardPointer: return "OpTypeForwardPointer"; + case OpConstantTrue: return "OpConstantTrue"; + case OpConstantFalse: return "OpConstantFalse"; + case OpConstant: return "OpConstant"; + case OpConstantComposite: return "OpConstantComposite"; + case OpConstantSampler: return "OpConstantSampler"; + case OpConstantNull: return "OpConstantNull"; + case OpSpecConstantTrue: return "OpSpecConstantTrue"; + case OpSpecConstantFalse: return "OpSpecConstantFalse"; + case OpSpecConstant: return "OpSpecConstant"; + case OpSpecConstantComposite: return "OpSpecConstantComposite"; + case OpSpecConstantOp: return "OpSpecConstantOp"; + case OpFunction: return "OpFunction"; + case OpFunctionParameter: return "OpFunctionParameter"; + case OpFunctionEnd: return "OpFunctionEnd"; + case OpFunctionCall: return "OpFunctionCall"; + case OpVariable: return "OpVariable"; + case OpImageTexelPointer: return "OpImageTexelPointer"; + case OpLoad: return "OpLoad"; + case OpStore: return "OpStore"; + case OpCopyMemory: return "OpCopyMemory"; + case OpCopyMemorySized: return "OpCopyMemorySized"; + case OpAccessChain: return "OpAccessChain"; + case OpInBoundsAccessChain: return "OpInBoundsAccessChain"; + case OpPtrAccessChain: return "OpPtrAccessChain"; + case OpArrayLength: return "OpArrayLength"; + case OpGenericPtrMemSemantics: return "OpGenericPtrMemSemantics"; + case OpInBoundsPtrAccessChain: return "OpInBoundsPtrAccessChain"; + case OpDecorate: return "OpDecorate"; + case OpMemberDecorate: return "OpMemberDecorate"; + case OpDecorationGroup: return "OpDecorationGroup"; + case OpGroupDecorate: return "OpGroupDecorate"; + case OpGroupMemberDecorate: return "OpGroupMemberDecorate"; + case OpVectorExtractDynamic: return "OpVectorExtractDynamic"; + case OpVectorInsertDynamic: return "OpVectorInsertDynamic"; + case OpVectorShuffle: return "OpVectorShuffle"; + case OpCompositeConstruct: return "OpCompositeConstruct"; + case OpCompositeExtract: return "OpCompositeExtract"; + case OpCompositeInsert: return "OpCompositeInsert"; + case OpCopyObject: return "OpCopyObject"; + case OpTranspose: return "OpTranspose"; + case OpSampledImage: return "OpSampledImage"; + case OpImageSampleImplicitLod: return "OpImageSampleImplicitLod"; + case OpImageSampleExplicitLod: return "OpImageSampleExplicitLod"; + case OpImageSampleDrefImplicitLod: return "OpImageSampleDrefImplicitLod"; + case OpImageSampleDrefExplicitLod: return "OpImageSampleDrefExplicitLod"; + case OpImageSampleProjImplicitLod: return "OpImageSampleProjImplicitLod"; + case OpImageSampleProjExplicitLod: return "OpImageSampleProjExplicitLod"; + case OpImageSampleProjDrefImplicitLod: return "OpImageSampleProjDrefImplicitLod"; + case OpImageSampleProjDrefExplicitLod: return "OpImageSampleProjDrefExplicitLod"; + case OpImageFetch: return "OpImageFetch"; + case OpImageGather: return "OpImageGather"; + case OpImageDrefGather: return "OpImageDrefGather"; + case OpImageRead: return "OpImageRead"; + case OpImageWrite: return "OpImageWrite"; + case OpImage: return "OpImage"; + case OpImageQueryFormat: return "OpImageQueryFormat"; + case OpImageQueryOrder: return "OpImageQueryOrder"; + case OpImageQuerySizeLod: return "OpImageQuerySizeLod"; + case OpImageQuerySize: return "OpImageQuerySize"; + case OpImageQueryLod: return "OpImageQueryLod"; + case OpImageQueryLevels: return "OpImageQueryLevels"; + case OpImageQuerySamples: return "OpImageQuerySamples"; + case OpConvertFToU: return "OpConvertFToU"; + case OpConvertFToS: return "OpConvertFToS"; + case OpConvertSToF: return "OpConvertSToF"; + case OpConvertUToF: return "OpConvertUToF"; + case OpUConvert: return "OpUConvert"; + case OpSConvert: return "OpSConvert"; + case OpFConvert: return "OpFConvert"; + case OpQuantizeToF16: return "OpQuantizeToF16"; + case OpConvertPtrToU: return "OpConvertPtrToU"; + case OpSatConvertSToU: return "OpSatConvertSToU"; + case OpSatConvertUToS: return "OpSatConvertUToS"; + case OpConvertUToPtr: return "OpConvertUToPtr"; + case OpPtrCastToGeneric: return "OpPtrCastToGeneric"; + case OpGenericCastToPtr: return "OpGenericCastToPtr"; + case OpGenericCastToPtrExplicit: return "OpGenericCastToPtrExplicit"; + case OpBitcast: return "OpBitcast"; + case OpSNegate: return "OpSNegate"; + case OpFNegate: return "OpFNegate"; + case OpIAdd: return "OpIAdd"; + case OpFAdd: return "OpFAdd"; + case OpISub: return "OpISub"; + case OpFSub: return "OpFSub"; + case OpIMul: return "OpIMul"; + case OpFMul: return "OpFMul"; + case OpUDiv: return "OpUDiv"; + case OpSDiv: return "OpSDiv"; + case OpFDiv: return "OpFDiv"; + case OpUMod: return "OpUMod"; + case OpSRem: return "OpSRem"; + case OpSMod: return "OpSMod"; + case OpFRem: return "OpFRem"; + case OpFMod: return "OpFMod"; + case OpVectorTimesScalar: return "OpVectorTimesScalar"; + case OpMatrixTimesScalar: return "OpMatrixTimesScalar"; + case OpVectorTimesMatrix: return "OpVectorTimesMatrix"; + case OpMatrixTimesVector: return "OpMatrixTimesVector"; + case OpMatrixTimesMatrix: return "OpMatrixTimesMatrix"; + case OpOuterProduct: return "OpOuterProduct"; + case OpDot: return "OpDot"; + case OpIAddCarry: return "OpIAddCarry"; + case OpISubBorrow: return "OpISubBorrow"; + case OpUMulExtended: return "OpUMulExtended"; + case OpSMulExtended: return "OpSMulExtended"; + case OpAny: return "OpAny"; + case OpAll: return "OpAll"; + case OpIsNan: return "OpIsNan"; + case OpIsInf: return "OpIsInf"; + case OpIsFinite: return "OpIsFinite"; + case OpIsNormal: return "OpIsNormal"; + case OpSignBitSet: return "OpSignBitSet"; + case OpLessOrGreater: return "OpLessOrGreater"; + case OpOrdered: return "OpOrdered"; + case OpUnordered: return "OpUnordered"; + case OpLogicalEqual: return "OpLogicalEqual"; + case OpLogicalNotEqual: return "OpLogicalNotEqual"; + case OpLogicalOr: return "OpLogicalOr"; + case OpLogicalAnd: return "OpLogicalAnd"; + case OpLogicalNot: return "OpLogicalNot"; + case OpSelect: return "OpSelect"; + case OpIEqual: return "OpIEqual"; + case OpINotEqual: return "OpINotEqual"; + case OpUGreaterThan: return "OpUGreaterThan"; + case OpSGreaterThan: return "OpSGreaterThan"; + case OpUGreaterThanEqual: return "OpUGreaterThanEqual"; + case OpSGreaterThanEqual: return "OpSGreaterThanEqual"; + case OpULessThan: return "OpULessThan"; + case OpSLessThan: return "OpSLessThan"; + case OpULessThanEqual: return "OpULessThanEqual"; + case OpSLessThanEqual: return "OpSLessThanEqual"; + case OpFOrdEqual: return "OpFOrdEqual"; + case OpFUnordEqual: return "OpFUnordEqual"; + case OpFOrdNotEqual: return "OpFOrdNotEqual"; + case OpFUnordNotEqual: return "OpFUnordNotEqual"; + case OpFOrdLessThan: return "OpFOrdLessThan"; + case OpFUnordLessThan: return "OpFUnordLessThan"; + case OpFOrdGreaterThan: return "OpFOrdGreaterThan"; + case OpFUnordGreaterThan: return "OpFUnordGreaterThan"; + case OpFOrdLessThanEqual: return "OpFOrdLessThanEqual"; + case OpFUnordLessThanEqual: return "OpFUnordLessThanEqual"; + case OpFOrdGreaterThanEqual: return "OpFOrdGreaterThanEqual"; + case OpFUnordGreaterThanEqual: return "OpFUnordGreaterThanEqual"; + case OpShiftRightLogical: return "OpShiftRightLogical"; + case OpShiftRightArithmetic: return "OpShiftRightArithmetic"; + case OpShiftLeftLogical: return "OpShiftLeftLogical"; + case OpBitwiseOr: return "OpBitwiseOr"; + case OpBitwiseXor: return "OpBitwiseXor"; + case OpBitwiseAnd: return "OpBitwiseAnd"; + case OpNot: return "OpNot"; + case OpBitFieldInsert: return "OpBitFieldInsert"; + case OpBitFieldSExtract: return "OpBitFieldSExtract"; + case OpBitFieldUExtract: return "OpBitFieldUExtract"; + case OpBitReverse: return "OpBitReverse"; + case OpBitCount: return "OpBitCount"; + case OpDPdx: return "OpDPdx"; + case OpDPdy: return "OpDPdy"; + case OpFwidth: return "OpFwidth"; + case OpDPdxFine: return "OpDPdxFine"; + case OpDPdyFine: return "OpDPdyFine"; + case OpFwidthFine: return "OpFwidthFine"; + case OpDPdxCoarse: return "OpDPdxCoarse"; + case OpDPdyCoarse: return "OpDPdyCoarse"; + case OpFwidthCoarse: return "OpFwidthCoarse"; + case OpEmitVertex: return "OpEmitVertex"; + case OpEndPrimitive: return "OpEndPrimitive"; + case OpEmitStreamVertex: return "OpEmitStreamVertex"; + case OpEndStreamPrimitive: return "OpEndStreamPrimitive"; + case OpControlBarrier: return "OpControlBarrier"; + case OpMemoryBarrier: return "OpMemoryBarrier"; + case OpAtomicLoad: return "OpAtomicLoad"; + case OpAtomicStore: return "OpAtomicStore"; + case OpAtomicExchange: return "OpAtomicExchange"; + case OpAtomicCompareExchange: return "OpAtomicCompareExchange"; + case OpAtomicCompareExchangeWeak: return "OpAtomicCompareExchangeWeak"; + case OpAtomicIIncrement: return "OpAtomicIIncrement"; + case OpAtomicIDecrement: return "OpAtomicIDecrement"; + case OpAtomicIAdd: return "OpAtomicIAdd"; + case OpAtomicISub: return "OpAtomicISub"; + case OpAtomicSMin: return "OpAtomicSMin"; + case OpAtomicUMin: return "OpAtomicUMin"; + case OpAtomicSMax: return "OpAtomicSMax"; + case OpAtomicUMax: return "OpAtomicUMax"; + case OpAtomicAnd: return "OpAtomicAnd"; + case OpAtomicOr: return "OpAtomicOr"; + case OpAtomicXor: return "OpAtomicXor"; + case OpPhi: return "OpPhi"; + case OpLoopMerge: return "OpLoopMerge"; + case OpSelectionMerge: return "OpSelectionMerge"; + case OpLabel: return "OpLabel"; + case OpBranch: return "OpBranch"; + case OpBranchConditional: return "OpBranchConditional"; + case OpSwitch: return "OpSwitch"; + case OpKill: return "OpKill"; + case OpReturn: return "OpReturn"; + case OpReturnValue: return "OpReturnValue"; + case OpUnreachable: return "OpUnreachable"; + case OpLifetimeStart: return "OpLifetimeStart"; + case OpLifetimeStop: return "OpLifetimeStop"; + case OpGroupAsyncCopy: return "OpGroupAsyncCopy"; + case OpGroupWaitEvents: return "OpGroupWaitEvents"; + case OpGroupAll: return "OpGroupAll"; + case OpGroupAny: return "OpGroupAny"; + case OpGroupBroadcast: return "OpGroupBroadcast"; + case OpGroupIAdd: return "OpGroupIAdd"; + case OpGroupFAdd: return "OpGroupFAdd"; + case OpGroupFMin: return "OpGroupFMin"; + case OpGroupUMin: return "OpGroupUMin"; + case OpGroupSMin: return "OpGroupSMin"; + case OpGroupFMax: return "OpGroupFMax"; + case OpGroupUMax: return "OpGroupUMax"; + case OpGroupSMax: return "OpGroupSMax"; + case OpReadPipe: return "OpReadPipe"; + case OpWritePipe: return "OpWritePipe"; + case OpReservedReadPipe: return "OpReservedReadPipe"; + case OpReservedWritePipe: return "OpReservedWritePipe"; + case OpReserveReadPipePackets: return "OpReserveReadPipePackets"; + case OpReserveWritePipePackets: return "OpReserveWritePipePackets"; + case OpCommitReadPipe: return "OpCommitReadPipe"; + case OpCommitWritePipe: return "OpCommitWritePipe"; + case OpIsValidReserveId: return "OpIsValidReserveId"; + case OpGetNumPipePackets: return "OpGetNumPipePackets"; + case OpGetMaxPipePackets: return "OpGetMaxPipePackets"; + case OpGroupReserveReadPipePackets: return "OpGroupReserveReadPipePackets"; + case OpGroupReserveWritePipePackets: return "OpGroupReserveWritePipePackets"; + case OpGroupCommitReadPipe: return "OpGroupCommitReadPipe"; + case OpGroupCommitWritePipe: return "OpGroupCommitWritePipe"; + case OpEnqueueMarker: return "OpEnqueueMarker"; + case OpEnqueueKernel: return "OpEnqueueKernel"; + case OpGetKernelNDrangeSubGroupCount: return "OpGetKernelNDrangeSubGroupCount"; + case OpGetKernelNDrangeMaxSubGroupSize: return "OpGetKernelNDrangeMaxSubGroupSize"; + case OpGetKernelWorkGroupSize: return "OpGetKernelWorkGroupSize"; + case OpGetKernelPreferredWorkGroupSizeMultiple: return "OpGetKernelPreferredWorkGroupSizeMultiple"; + case OpRetainEvent: return "OpRetainEvent"; + case OpReleaseEvent: return "OpReleaseEvent"; + case OpCreateUserEvent: return "OpCreateUserEvent"; + case OpIsValidEvent: return "OpIsValidEvent"; + case OpSetUserEventStatus: return "OpSetUserEventStatus"; + case OpCaptureEventProfilingInfo: return "OpCaptureEventProfilingInfo"; + case OpGetDefaultQueue: return "OpGetDefaultQueue"; + case OpBuildNDRange: return "OpBuildNDRange"; + case OpImageSparseSampleImplicitLod: return "OpImageSparseSampleImplicitLod"; + case OpImageSparseSampleExplicitLod: return "OpImageSparseSampleExplicitLod"; + case OpImageSparseSampleDrefImplicitLod: return "OpImageSparseSampleDrefImplicitLod"; + case OpImageSparseSampleDrefExplicitLod: return "OpImageSparseSampleDrefExplicitLod"; + case OpImageSparseSampleProjImplicitLod: return "OpImageSparseSampleProjImplicitLod"; + case OpImageSparseSampleProjExplicitLod: return "OpImageSparseSampleProjExplicitLod"; + case OpImageSparseSampleProjDrefImplicitLod: return "OpImageSparseSampleProjDrefImplicitLod"; + case OpImageSparseSampleProjDrefExplicitLod: return "OpImageSparseSampleProjDrefExplicitLod"; + case OpImageSparseFetch: return "OpImageSparseFetch"; + case OpImageSparseGather: return "OpImageSparseGather"; + case OpImageSparseDrefGather: return "OpImageSparseDrefGather"; + case OpImageSparseTexelsResident: return "OpImageSparseTexelsResident"; + case OpNoLine: return "OpNoLine"; + case OpAtomicFlagTestAndSet: return "OpAtomicFlagTestAndSet"; + case OpAtomicFlagClear: return "OpAtomicFlagClear"; + case OpImageSparseRead: return "OpImageSparseRead"; + case OpSizeOf: return "OpSizeOf"; + case OpTypePipeStorage: return "OpTypePipeStorage"; + case OpConstantPipeStorage: return "OpConstantPipeStorage"; + case OpCreatePipeFromPipeStorage: return "OpCreatePipeFromPipeStorage"; + case OpGetKernelLocalSizeForSubgroupCount: return "OpGetKernelLocalSizeForSubgroupCount"; + case OpGetKernelMaxNumSubgroups: return "OpGetKernelMaxNumSubgroups"; + case OpTypeNamedBarrier: return "OpTypeNamedBarrier"; + case OpNamedBarrierInitialize: return "OpNamedBarrierInitialize"; + case OpMemoryNamedBarrier: return "OpMemoryNamedBarrier"; + case OpModuleProcessed: return "OpModuleProcessed"; + case OpExecutionModeId: return "OpExecutionModeId"; + case OpDecorateId: return "OpDecorateId"; + case OpGroupNonUniformElect: return "OpGroupNonUniformElect"; + case OpGroupNonUniformAll: return "OpGroupNonUniformAll"; + case OpGroupNonUniformAny: return "OpGroupNonUniformAny"; + case OpGroupNonUniformAllEqual: return "OpGroupNonUniformAllEqual"; + case OpGroupNonUniformBroadcast: return "OpGroupNonUniformBroadcast"; + case OpGroupNonUniformBroadcastFirst: return "OpGroupNonUniformBroadcastFirst"; + case OpGroupNonUniformBallot: return "OpGroupNonUniformBallot"; + case OpGroupNonUniformInverseBallot: return "OpGroupNonUniformInverseBallot"; + case OpGroupNonUniformBallotBitExtract: return "OpGroupNonUniformBallotBitExtract"; + case OpGroupNonUniformBallotBitCount: return "OpGroupNonUniformBallotBitCount"; + case OpGroupNonUniformBallotFindLSB: return "OpGroupNonUniformBallotFindLSB"; + case OpGroupNonUniformBallotFindMSB: return "OpGroupNonUniformBallotFindMSB"; + case OpGroupNonUniformShuffle: return "OpGroupNonUniformShuffle"; + case OpGroupNonUniformShuffleXor: return "OpGroupNonUniformShuffleXor"; + case OpGroupNonUniformShuffleUp: return "OpGroupNonUniformShuffleUp"; + case OpGroupNonUniformShuffleDown: return "OpGroupNonUniformShuffleDown"; + case OpGroupNonUniformIAdd: return "OpGroupNonUniformIAdd"; + case OpGroupNonUniformFAdd: return "OpGroupNonUniformFAdd"; + case OpGroupNonUniformIMul: return "OpGroupNonUniformIMul"; + case OpGroupNonUniformFMul: return "OpGroupNonUniformFMul"; + case OpGroupNonUniformSMin: return "OpGroupNonUniformSMin"; + case OpGroupNonUniformUMin: return "OpGroupNonUniformUMin"; + case OpGroupNonUniformFMin: return "OpGroupNonUniformFMin"; + case OpGroupNonUniformSMax: return "OpGroupNonUniformSMax"; + case OpGroupNonUniformUMax: return "OpGroupNonUniformUMax"; + case OpGroupNonUniformFMax: return "OpGroupNonUniformFMax"; + case OpGroupNonUniformBitwiseAnd: return "OpGroupNonUniformBitwiseAnd"; + case OpGroupNonUniformBitwiseOr: return "OpGroupNonUniformBitwiseOr"; + case OpGroupNonUniformBitwiseXor: return "OpGroupNonUniformBitwiseXor"; + case OpGroupNonUniformLogicalAnd: return "OpGroupNonUniformLogicalAnd"; + case OpGroupNonUniformLogicalOr: return "OpGroupNonUniformLogicalOr"; + case OpGroupNonUniformLogicalXor: return "OpGroupNonUniformLogicalXor"; + case OpGroupNonUniformQuadBroadcast: return "OpGroupNonUniformQuadBroadcast"; + case OpGroupNonUniformQuadSwap: return "OpGroupNonUniformQuadSwap"; + case OpCopyLogical: return "OpCopyLogical"; + case OpPtrEqual: return "OpPtrEqual"; + case OpPtrNotEqual: return "OpPtrNotEqual"; + case OpPtrDiff: return "OpPtrDiff"; + case OpColorAttachmentReadEXT: return "OpColorAttachmentReadEXT"; + case OpDepthAttachmentReadEXT: return "OpDepthAttachmentReadEXT"; + case OpStencilAttachmentReadEXT: return "OpStencilAttachmentReadEXT"; + case OpTerminateInvocation: return "OpTerminateInvocation"; + case OpTypeUntypedPointerKHR: return "OpTypeUntypedPointerKHR"; + case OpUntypedVariableKHR: return "OpUntypedVariableKHR"; + case OpUntypedAccessChainKHR: return "OpUntypedAccessChainKHR"; + case OpUntypedInBoundsAccessChainKHR: return "OpUntypedInBoundsAccessChainKHR"; + case OpSubgroupBallotKHR: return "OpSubgroupBallotKHR"; + case OpSubgroupFirstInvocationKHR: return "OpSubgroupFirstInvocationKHR"; + case OpUntypedPtrAccessChainKHR: return "OpUntypedPtrAccessChainKHR"; + case OpUntypedInBoundsPtrAccessChainKHR: return "OpUntypedInBoundsPtrAccessChainKHR"; + case OpUntypedArrayLengthKHR: return "OpUntypedArrayLengthKHR"; + case OpUntypedPrefetchKHR: return "OpUntypedPrefetchKHR"; + case OpSubgroupAllKHR: return "OpSubgroupAllKHR"; + case OpSubgroupAnyKHR: return "OpSubgroupAnyKHR"; + case OpSubgroupAllEqualKHR: return "OpSubgroupAllEqualKHR"; + case OpGroupNonUniformRotateKHR: return "OpGroupNonUniformRotateKHR"; + case OpSubgroupReadInvocationKHR: return "OpSubgroupReadInvocationKHR"; + case OpExtInstWithForwardRefsKHR: return "OpExtInstWithForwardRefsKHR"; + case OpTraceRayKHR: return "OpTraceRayKHR"; + case OpExecuteCallableKHR: return "OpExecuteCallableKHR"; + case OpConvertUToAccelerationStructureKHR: return "OpConvertUToAccelerationStructureKHR"; + case OpIgnoreIntersectionKHR: return "OpIgnoreIntersectionKHR"; + case OpTerminateRayKHR: return "OpTerminateRayKHR"; + case OpSDot: return "OpSDot"; + case OpUDot: return "OpUDot"; + case OpSUDot: return "OpSUDot"; + case OpSDotAccSat: return "OpSDotAccSat"; + case OpUDotAccSat: return "OpUDotAccSat"; + case OpSUDotAccSat: return "OpSUDotAccSat"; + case OpTypeCooperativeMatrixKHR: return "OpTypeCooperativeMatrixKHR"; + case OpCooperativeMatrixLoadKHR: return "OpCooperativeMatrixLoadKHR"; + case OpCooperativeMatrixStoreKHR: return "OpCooperativeMatrixStoreKHR"; + case OpCooperativeMatrixMulAddKHR: return "OpCooperativeMatrixMulAddKHR"; + case OpCooperativeMatrixLengthKHR: return "OpCooperativeMatrixLengthKHR"; + case OpConstantCompositeReplicateEXT: return "OpConstantCompositeReplicateEXT"; + case OpSpecConstantCompositeReplicateEXT: return "OpSpecConstantCompositeReplicateEXT"; + case OpCompositeConstructReplicateEXT: return "OpCompositeConstructReplicateEXT"; + case OpTypeRayQueryKHR: return "OpTypeRayQueryKHR"; + 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 OpImageSampleWeightedQCOM: return "OpImageSampleWeightedQCOM"; + case OpImageBoxFilterQCOM: return "OpImageBoxFilterQCOM"; + case OpImageBlockMatchSSDQCOM: return "OpImageBlockMatchSSDQCOM"; + case OpImageBlockMatchSADQCOM: return "OpImageBlockMatchSADQCOM"; + case OpImageBlockMatchWindowSSDQCOM: return "OpImageBlockMatchWindowSSDQCOM"; + case OpImageBlockMatchWindowSADQCOM: return "OpImageBlockMatchWindowSADQCOM"; + case OpImageBlockMatchGatherSSDQCOM: return "OpImageBlockMatchGatherSSDQCOM"; + case OpImageBlockMatchGatherSADQCOM: return "OpImageBlockMatchGatherSADQCOM"; + case OpGroupIAddNonUniformAMD: return "OpGroupIAddNonUniformAMD"; + case OpGroupFAddNonUniformAMD: return "OpGroupFAddNonUniformAMD"; + case OpGroupFMinNonUniformAMD: return "OpGroupFMinNonUniformAMD"; + case OpGroupUMinNonUniformAMD: return "OpGroupUMinNonUniformAMD"; + case OpGroupSMinNonUniformAMD: return "OpGroupSMinNonUniformAMD"; + case OpGroupFMaxNonUniformAMD: return "OpGroupFMaxNonUniformAMD"; + case OpGroupUMaxNonUniformAMD: return "OpGroupUMaxNonUniformAMD"; + case OpGroupSMaxNonUniformAMD: return "OpGroupSMaxNonUniformAMD"; + case OpFragmentMaskFetchAMD: return "OpFragmentMaskFetchAMD"; + case OpFragmentFetchAMD: return "OpFragmentFetchAMD"; + case OpReadClockKHR: return "OpReadClockKHR"; + case OpAllocateNodePayloadsAMDX: return "OpAllocateNodePayloadsAMDX"; + case OpEnqueueNodePayloadsAMDX: return "OpEnqueueNodePayloadsAMDX"; + case OpTypeNodePayloadArrayAMDX: return "OpTypeNodePayloadArrayAMDX"; + case OpFinishWritingNodePayloadAMDX: return "OpFinishWritingNodePayloadAMDX"; + case OpNodePayloadArrayLengthAMDX: return "OpNodePayloadArrayLengthAMDX"; + case OpIsNodePayloadValidAMDX: return "OpIsNodePayloadValidAMDX"; + case OpConstantStringAMDX: return "OpConstantStringAMDX"; + case OpSpecConstantStringAMDX: return "OpSpecConstantStringAMDX"; + case OpGroupNonUniformQuadAllKHR: return "OpGroupNonUniformQuadAllKHR"; + case OpGroupNonUniformQuadAnyKHR: return "OpGroupNonUniformQuadAnyKHR"; + case OpHitObjectRecordHitMotionNV: return "OpHitObjectRecordHitMotionNV"; + case OpHitObjectRecordHitWithIndexMotionNV: return "OpHitObjectRecordHitWithIndexMotionNV"; + case OpHitObjectRecordMissMotionNV: return "OpHitObjectRecordMissMotionNV"; + case OpHitObjectGetWorldToObjectNV: return "OpHitObjectGetWorldToObjectNV"; + case OpHitObjectGetObjectToWorldNV: return "OpHitObjectGetObjectToWorldNV"; + case OpHitObjectGetObjectRayDirectionNV: return "OpHitObjectGetObjectRayDirectionNV"; + case OpHitObjectGetObjectRayOriginNV: return "OpHitObjectGetObjectRayOriginNV"; + case OpHitObjectTraceRayMotionNV: return "OpHitObjectTraceRayMotionNV"; + case OpHitObjectGetShaderRecordBufferHandleNV: return "OpHitObjectGetShaderRecordBufferHandleNV"; + case OpHitObjectGetShaderBindingTableRecordIndexNV: return "OpHitObjectGetShaderBindingTableRecordIndexNV"; + case OpHitObjectRecordEmptyNV: return "OpHitObjectRecordEmptyNV"; + case OpHitObjectTraceRayNV: return "OpHitObjectTraceRayNV"; + case OpHitObjectRecordHitNV: return "OpHitObjectRecordHitNV"; + case OpHitObjectRecordHitWithIndexNV: return "OpHitObjectRecordHitWithIndexNV"; + case OpHitObjectRecordMissNV: return "OpHitObjectRecordMissNV"; + case OpHitObjectExecuteShaderNV: return "OpHitObjectExecuteShaderNV"; + case OpHitObjectGetCurrentTimeNV: return "OpHitObjectGetCurrentTimeNV"; + case OpHitObjectGetAttributesNV: return "OpHitObjectGetAttributesNV"; + case OpHitObjectGetHitKindNV: return "OpHitObjectGetHitKindNV"; + case OpHitObjectGetPrimitiveIndexNV: return "OpHitObjectGetPrimitiveIndexNV"; + case OpHitObjectGetGeometryIndexNV: return "OpHitObjectGetGeometryIndexNV"; + case OpHitObjectGetInstanceIdNV: return "OpHitObjectGetInstanceIdNV"; + case OpHitObjectGetInstanceCustomIndexNV: return "OpHitObjectGetInstanceCustomIndexNV"; + case OpHitObjectGetWorldRayDirectionNV: return "OpHitObjectGetWorldRayDirectionNV"; + case OpHitObjectGetWorldRayOriginNV: return "OpHitObjectGetWorldRayOriginNV"; + case OpHitObjectGetRayTMaxNV: return "OpHitObjectGetRayTMaxNV"; + case OpHitObjectGetRayTMinNV: return "OpHitObjectGetRayTMinNV"; + case OpHitObjectIsEmptyNV: return "OpHitObjectIsEmptyNV"; + case OpHitObjectIsHitNV: return "OpHitObjectIsHitNV"; + case OpHitObjectIsMissNV: return "OpHitObjectIsMissNV"; + case OpReorderThreadWithHitObjectNV: return "OpReorderThreadWithHitObjectNV"; + case OpReorderThreadWithHintNV: return "OpReorderThreadWithHintNV"; + case OpTypeHitObjectNV: return "OpTypeHitObjectNV"; + case OpImageSampleFootprintNV: return "OpImageSampleFootprintNV"; + case OpTypeCooperativeVectorNV: return "OpTypeCooperativeVectorNV"; + case OpCooperativeVectorMatrixMulNV: return "OpCooperativeVectorMatrixMulNV"; + case OpCooperativeVectorOuterProductAccumulateNV: return "OpCooperativeVectorOuterProductAccumulateNV"; + case OpCooperativeVectorReduceSumAccumulateNV: return "OpCooperativeVectorReduceSumAccumulateNV"; + case OpCooperativeVectorMatrixMulAddNV: return "OpCooperativeVectorMatrixMulAddNV"; + case OpCooperativeMatrixConvertNV: return "OpCooperativeMatrixConvertNV"; + case OpEmitMeshTasksEXT: return "OpEmitMeshTasksEXT"; + case OpSetMeshOutputsEXT: return "OpSetMeshOutputsEXT"; + case OpGroupNonUniformPartitionNV: return "OpGroupNonUniformPartitionNV"; + case OpWritePackedPrimitiveIndices4x8NV: return "OpWritePackedPrimitiveIndices4x8NV"; + case OpFetchMicroTriangleVertexPositionNV: return "OpFetchMicroTriangleVertexPositionNV"; + case OpFetchMicroTriangleVertexBarycentricNV: return "OpFetchMicroTriangleVertexBarycentricNV"; + case OpCooperativeVectorLoadNV: return "OpCooperativeVectorLoadNV"; + case OpCooperativeVectorStoreNV: return "OpCooperativeVectorStoreNV"; + case OpReportIntersectionKHR: return "OpReportIntersectionKHR"; + case OpIgnoreIntersectionNV: return "OpIgnoreIntersectionNV"; + case OpTerminateRayNV: return "OpTerminateRayNV"; + case OpTraceNV: return "OpTraceNV"; + case OpTraceMotionNV: return "OpTraceMotionNV"; + case OpTraceRayMotionNV: return "OpTraceRayMotionNV"; + case OpRayQueryGetIntersectionTriangleVertexPositionsKHR: return "OpRayQueryGetIntersectionTriangleVertexPositionsKHR"; + case OpTypeAccelerationStructureKHR: return "OpTypeAccelerationStructureKHR"; + case OpExecuteCallableNV: return "OpExecuteCallableNV"; + case OpTypeCooperativeMatrixNV: return "OpTypeCooperativeMatrixNV"; + case OpCooperativeMatrixLoadNV: return "OpCooperativeMatrixLoadNV"; + case OpCooperativeMatrixStoreNV: return "OpCooperativeMatrixStoreNV"; + case OpCooperativeMatrixMulAddNV: return "OpCooperativeMatrixMulAddNV"; + case OpCooperativeMatrixLengthNV: return "OpCooperativeMatrixLengthNV"; + case OpBeginInvocationInterlockEXT: return "OpBeginInvocationInterlockEXT"; + case OpEndInvocationInterlockEXT: return "OpEndInvocationInterlockEXT"; + case OpCooperativeMatrixReduceNV: return "OpCooperativeMatrixReduceNV"; + case OpCooperativeMatrixLoadTensorNV: return "OpCooperativeMatrixLoadTensorNV"; + case OpCooperativeMatrixStoreTensorNV: return "OpCooperativeMatrixStoreTensorNV"; + case OpCooperativeMatrixPerElementOpNV: return "OpCooperativeMatrixPerElementOpNV"; + case OpTypeTensorLayoutNV: return "OpTypeTensorLayoutNV"; + case OpTypeTensorViewNV: return "OpTypeTensorViewNV"; + case OpCreateTensorLayoutNV: return "OpCreateTensorLayoutNV"; + case OpTensorLayoutSetDimensionNV: return "OpTensorLayoutSetDimensionNV"; + case OpTensorLayoutSetStrideNV: return "OpTensorLayoutSetStrideNV"; + case OpTensorLayoutSliceNV: return "OpTensorLayoutSliceNV"; + case OpTensorLayoutSetClampValueNV: return "OpTensorLayoutSetClampValueNV"; + case OpCreateTensorViewNV: return "OpCreateTensorViewNV"; + case OpTensorViewSetDimensionNV: return "OpTensorViewSetDimensionNV"; + case OpTensorViewSetStrideNV: return "OpTensorViewSetStrideNV"; + case OpDemoteToHelperInvocation: return "OpDemoteToHelperInvocation"; + case OpIsHelperInvocationEXT: return "OpIsHelperInvocationEXT"; + case OpTensorViewSetClipNV: return "OpTensorViewSetClipNV"; + case OpTensorLayoutSetBlockSizeNV: return "OpTensorLayoutSetBlockSizeNV"; + case OpCooperativeMatrixTransposeNV: return "OpCooperativeMatrixTransposeNV"; + case OpConvertUToImageNV: return "OpConvertUToImageNV"; + case OpConvertUToSamplerNV: return "OpConvertUToSamplerNV"; + case OpConvertImageToUNV: return "OpConvertImageToUNV"; + case OpConvertSamplerToUNV: return "OpConvertSamplerToUNV"; + case OpConvertUToSampledImageNV: return "OpConvertUToSampledImageNV"; + case OpConvertSampledImageToUNV: return "OpConvertSampledImageToUNV"; + case OpSamplerImageAddressingModeNV: return "OpSamplerImageAddressingModeNV"; + case OpRawAccessChainNV: return "OpRawAccessChainNV"; + case OpSubgroupShuffleINTEL: return "OpSubgroupShuffleINTEL"; + case OpSubgroupShuffleDownINTEL: return "OpSubgroupShuffleDownINTEL"; + case OpSubgroupShuffleUpINTEL: return "OpSubgroupShuffleUpINTEL"; + case OpSubgroupShuffleXorINTEL: return "OpSubgroupShuffleXorINTEL"; + case OpSubgroupBlockReadINTEL: return "OpSubgroupBlockReadINTEL"; + case OpSubgroupBlockWriteINTEL: return "OpSubgroupBlockWriteINTEL"; + case OpSubgroupImageBlockReadINTEL: return "OpSubgroupImageBlockReadINTEL"; + case OpSubgroupImageBlockWriteINTEL: return "OpSubgroupImageBlockWriteINTEL"; + case OpSubgroupImageMediaBlockReadINTEL: return "OpSubgroupImageMediaBlockReadINTEL"; + case OpSubgroupImageMediaBlockWriteINTEL: return "OpSubgroupImageMediaBlockWriteINTEL"; + case OpUCountLeadingZerosINTEL: return "OpUCountLeadingZerosINTEL"; + case OpUCountTrailingZerosINTEL: return "OpUCountTrailingZerosINTEL"; + case OpAbsISubINTEL: return "OpAbsISubINTEL"; + case OpAbsUSubINTEL: return "OpAbsUSubINTEL"; + case OpIAddSatINTEL: return "OpIAddSatINTEL"; + case OpUAddSatINTEL: return "OpUAddSatINTEL"; + case OpIAverageINTEL: return "OpIAverageINTEL"; + case OpUAverageINTEL: return "OpUAverageINTEL"; + case OpIAverageRoundedINTEL: return "OpIAverageRoundedINTEL"; + case OpUAverageRoundedINTEL: return "OpUAverageRoundedINTEL"; + case OpISubSatINTEL: return "OpISubSatINTEL"; + case OpUSubSatINTEL: return "OpUSubSatINTEL"; + case OpIMul32x16INTEL: return "OpIMul32x16INTEL"; + case OpUMul32x16INTEL: return "OpUMul32x16INTEL"; + case OpConstantFunctionPointerINTEL: return "OpConstantFunctionPointerINTEL"; + case OpFunctionPointerCallINTEL: return "OpFunctionPointerCallINTEL"; + case OpAsmTargetINTEL: return "OpAsmTargetINTEL"; + case OpAsmINTEL: return "OpAsmINTEL"; + case OpAsmCallINTEL: return "OpAsmCallINTEL"; + case OpAtomicFMinEXT: return "OpAtomicFMinEXT"; + case OpAtomicFMaxEXT: return "OpAtomicFMaxEXT"; + case OpAssumeTrueKHR: return "OpAssumeTrueKHR"; + case OpExpectKHR: return "OpExpectKHR"; + case OpDecorateString: return "OpDecorateString"; + case OpMemberDecorateString: return "OpMemberDecorateString"; + case OpVmeImageINTEL: return "OpVmeImageINTEL"; + case OpTypeVmeImageINTEL: return "OpTypeVmeImageINTEL"; + case OpTypeAvcImePayloadINTEL: return "OpTypeAvcImePayloadINTEL"; + case OpTypeAvcRefPayloadINTEL: return "OpTypeAvcRefPayloadINTEL"; + case OpTypeAvcSicPayloadINTEL: return "OpTypeAvcSicPayloadINTEL"; + case OpTypeAvcMcePayloadINTEL: return "OpTypeAvcMcePayloadINTEL"; + case OpTypeAvcMceResultINTEL: return "OpTypeAvcMceResultINTEL"; + case OpTypeAvcImeResultINTEL: return "OpTypeAvcImeResultINTEL"; + case OpTypeAvcImeResultSingleReferenceStreamoutINTEL: return "OpTypeAvcImeResultSingleReferenceStreamoutINTEL"; + case OpTypeAvcImeResultDualReferenceStreamoutINTEL: return "OpTypeAvcImeResultDualReferenceStreamoutINTEL"; + case OpTypeAvcImeSingleReferenceStreaminINTEL: return "OpTypeAvcImeSingleReferenceStreaminINTEL"; + case OpTypeAvcImeDualReferenceStreaminINTEL: return "OpTypeAvcImeDualReferenceStreaminINTEL"; + case OpTypeAvcRefResultINTEL: return "OpTypeAvcRefResultINTEL"; + case OpTypeAvcSicResultINTEL: return "OpTypeAvcSicResultINTEL"; + case OpSubgroupAvcMceGetDefaultInterBaseMultiReferencePenaltyINTEL: return "OpSubgroupAvcMceGetDefaultInterBaseMultiReferencePenaltyINTEL"; + case OpSubgroupAvcMceSetInterBaseMultiReferencePenaltyINTEL: return "OpSubgroupAvcMceSetInterBaseMultiReferencePenaltyINTEL"; + case OpSubgroupAvcMceGetDefaultInterShapePenaltyINTEL: return "OpSubgroupAvcMceGetDefaultInterShapePenaltyINTEL"; + case OpSubgroupAvcMceSetInterShapePenaltyINTEL: return "OpSubgroupAvcMceSetInterShapePenaltyINTEL"; + case OpSubgroupAvcMceGetDefaultInterDirectionPenaltyINTEL: return "OpSubgroupAvcMceGetDefaultInterDirectionPenaltyINTEL"; + case OpSubgroupAvcMceSetInterDirectionPenaltyINTEL: return "OpSubgroupAvcMceSetInterDirectionPenaltyINTEL"; + case OpSubgroupAvcMceGetDefaultIntraLumaShapePenaltyINTEL: return "OpSubgroupAvcMceGetDefaultIntraLumaShapePenaltyINTEL"; + case OpSubgroupAvcMceGetDefaultInterMotionVectorCostTableINTEL: return "OpSubgroupAvcMceGetDefaultInterMotionVectorCostTableINTEL"; + case OpSubgroupAvcMceGetDefaultHighPenaltyCostTableINTEL: return "OpSubgroupAvcMceGetDefaultHighPenaltyCostTableINTEL"; + case OpSubgroupAvcMceGetDefaultMediumPenaltyCostTableINTEL: return "OpSubgroupAvcMceGetDefaultMediumPenaltyCostTableINTEL"; + case OpSubgroupAvcMceGetDefaultLowPenaltyCostTableINTEL: return "OpSubgroupAvcMceGetDefaultLowPenaltyCostTableINTEL"; + case OpSubgroupAvcMceSetMotionVectorCostFunctionINTEL: return "OpSubgroupAvcMceSetMotionVectorCostFunctionINTEL"; + case OpSubgroupAvcMceGetDefaultIntraLumaModePenaltyINTEL: return "OpSubgroupAvcMceGetDefaultIntraLumaModePenaltyINTEL"; + case OpSubgroupAvcMceGetDefaultNonDcLumaIntraPenaltyINTEL: return "OpSubgroupAvcMceGetDefaultNonDcLumaIntraPenaltyINTEL"; + case OpSubgroupAvcMceGetDefaultIntraChromaModeBasePenaltyINTEL: return "OpSubgroupAvcMceGetDefaultIntraChromaModeBasePenaltyINTEL"; + case OpSubgroupAvcMceSetAcOnlyHaarINTEL: return "OpSubgroupAvcMceSetAcOnlyHaarINTEL"; + case OpSubgroupAvcMceSetSourceInterlacedFieldPolarityINTEL: return "OpSubgroupAvcMceSetSourceInterlacedFieldPolarityINTEL"; + case OpSubgroupAvcMceSetSingleReferenceInterlacedFieldPolarityINTEL: return "OpSubgroupAvcMceSetSingleReferenceInterlacedFieldPolarityINTEL"; + case OpSubgroupAvcMceSetDualReferenceInterlacedFieldPolaritiesINTEL: return "OpSubgroupAvcMceSetDualReferenceInterlacedFieldPolaritiesINTEL"; + case OpSubgroupAvcMceConvertToImePayloadINTEL: return "OpSubgroupAvcMceConvertToImePayloadINTEL"; + case OpSubgroupAvcMceConvertToImeResultINTEL: return "OpSubgroupAvcMceConvertToImeResultINTEL"; + case OpSubgroupAvcMceConvertToRefPayloadINTEL: return "OpSubgroupAvcMceConvertToRefPayloadINTEL"; + case OpSubgroupAvcMceConvertToRefResultINTEL: return "OpSubgroupAvcMceConvertToRefResultINTEL"; + case OpSubgroupAvcMceConvertToSicPayloadINTEL: return "OpSubgroupAvcMceConvertToSicPayloadINTEL"; + case OpSubgroupAvcMceConvertToSicResultINTEL: return "OpSubgroupAvcMceConvertToSicResultINTEL"; + case OpSubgroupAvcMceGetMotionVectorsINTEL: return "OpSubgroupAvcMceGetMotionVectorsINTEL"; + case OpSubgroupAvcMceGetInterDistortionsINTEL: return "OpSubgroupAvcMceGetInterDistortionsINTEL"; + case OpSubgroupAvcMceGetBestInterDistortionsINTEL: return "OpSubgroupAvcMceGetBestInterDistortionsINTEL"; + case OpSubgroupAvcMceGetInterMajorShapeINTEL: return "OpSubgroupAvcMceGetInterMajorShapeINTEL"; + case OpSubgroupAvcMceGetInterMinorShapeINTEL: return "OpSubgroupAvcMceGetInterMinorShapeINTEL"; + case OpSubgroupAvcMceGetInterDirectionsINTEL: return "OpSubgroupAvcMceGetInterDirectionsINTEL"; + case OpSubgroupAvcMceGetInterMotionVectorCountINTEL: return "OpSubgroupAvcMceGetInterMotionVectorCountINTEL"; + case OpSubgroupAvcMceGetInterReferenceIdsINTEL: return "OpSubgroupAvcMceGetInterReferenceIdsINTEL"; + case OpSubgroupAvcMceGetInterReferenceInterlacedFieldPolaritiesINTEL: return "OpSubgroupAvcMceGetInterReferenceInterlacedFieldPolaritiesINTEL"; + case OpSubgroupAvcImeInitializeINTEL: return "OpSubgroupAvcImeInitializeINTEL"; + case OpSubgroupAvcImeSetSingleReferenceINTEL: return "OpSubgroupAvcImeSetSingleReferenceINTEL"; + case OpSubgroupAvcImeSetDualReferenceINTEL: return "OpSubgroupAvcImeSetDualReferenceINTEL"; + case OpSubgroupAvcImeRefWindowSizeINTEL: return "OpSubgroupAvcImeRefWindowSizeINTEL"; + case OpSubgroupAvcImeAdjustRefOffsetINTEL: return "OpSubgroupAvcImeAdjustRefOffsetINTEL"; + case OpSubgroupAvcImeConvertToMcePayloadINTEL: return "OpSubgroupAvcImeConvertToMcePayloadINTEL"; + case OpSubgroupAvcImeSetMaxMotionVectorCountINTEL: return "OpSubgroupAvcImeSetMaxMotionVectorCountINTEL"; + case OpSubgroupAvcImeSetUnidirectionalMixDisableINTEL: return "OpSubgroupAvcImeSetUnidirectionalMixDisableINTEL"; + case OpSubgroupAvcImeSetEarlySearchTerminationThresholdINTEL: return "OpSubgroupAvcImeSetEarlySearchTerminationThresholdINTEL"; + case OpSubgroupAvcImeSetWeightedSadINTEL: return "OpSubgroupAvcImeSetWeightedSadINTEL"; + case OpSubgroupAvcImeEvaluateWithSingleReferenceINTEL: return "OpSubgroupAvcImeEvaluateWithSingleReferenceINTEL"; + case OpSubgroupAvcImeEvaluateWithDualReferenceINTEL: return "OpSubgroupAvcImeEvaluateWithDualReferenceINTEL"; + case OpSubgroupAvcImeEvaluateWithSingleReferenceStreaminINTEL: return "OpSubgroupAvcImeEvaluateWithSingleReferenceStreaminINTEL"; + case OpSubgroupAvcImeEvaluateWithDualReferenceStreaminINTEL: return "OpSubgroupAvcImeEvaluateWithDualReferenceStreaminINTEL"; + case OpSubgroupAvcImeEvaluateWithSingleReferenceStreamoutINTEL: return "OpSubgroupAvcImeEvaluateWithSingleReferenceStreamoutINTEL"; + case OpSubgroupAvcImeEvaluateWithDualReferenceStreamoutINTEL: return "OpSubgroupAvcImeEvaluateWithDualReferenceStreamoutINTEL"; + case OpSubgroupAvcImeEvaluateWithSingleReferenceStreaminoutINTEL: return "OpSubgroupAvcImeEvaluateWithSingleReferenceStreaminoutINTEL"; + case OpSubgroupAvcImeEvaluateWithDualReferenceStreaminoutINTEL: return "OpSubgroupAvcImeEvaluateWithDualReferenceStreaminoutINTEL"; + case OpSubgroupAvcImeConvertToMceResultINTEL: return "OpSubgroupAvcImeConvertToMceResultINTEL"; + case OpSubgroupAvcImeGetSingleReferenceStreaminINTEL: return "OpSubgroupAvcImeGetSingleReferenceStreaminINTEL"; + case OpSubgroupAvcImeGetDualReferenceStreaminINTEL: return "OpSubgroupAvcImeGetDualReferenceStreaminINTEL"; + case OpSubgroupAvcImeStripSingleReferenceStreamoutINTEL: return "OpSubgroupAvcImeStripSingleReferenceStreamoutINTEL"; + case OpSubgroupAvcImeStripDualReferenceStreamoutINTEL: return "OpSubgroupAvcImeStripDualReferenceStreamoutINTEL"; + case OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeMotionVectorsINTEL: return "OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeMotionVectorsINTEL"; + case OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeDistortionsINTEL: return "OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeDistortionsINTEL"; + case OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeReferenceIdsINTEL: return "OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeReferenceIdsINTEL"; + case OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeMotionVectorsINTEL: return "OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeMotionVectorsINTEL"; + case OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeDistortionsINTEL: return "OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeDistortionsINTEL"; + case OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeReferenceIdsINTEL: return "OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeReferenceIdsINTEL"; + case OpSubgroupAvcImeGetBorderReachedINTEL: return "OpSubgroupAvcImeGetBorderReachedINTEL"; + case OpSubgroupAvcImeGetTruncatedSearchIndicationINTEL: return "OpSubgroupAvcImeGetTruncatedSearchIndicationINTEL"; + case OpSubgroupAvcImeGetUnidirectionalEarlySearchTerminationINTEL: return "OpSubgroupAvcImeGetUnidirectionalEarlySearchTerminationINTEL"; + case OpSubgroupAvcImeGetWeightingPatternMinimumMotionVectorINTEL: return "OpSubgroupAvcImeGetWeightingPatternMinimumMotionVectorINTEL"; + case OpSubgroupAvcImeGetWeightingPatternMinimumDistortionINTEL: return "OpSubgroupAvcImeGetWeightingPatternMinimumDistortionINTEL"; + case OpSubgroupAvcFmeInitializeINTEL: return "OpSubgroupAvcFmeInitializeINTEL"; + case OpSubgroupAvcBmeInitializeINTEL: return "OpSubgroupAvcBmeInitializeINTEL"; + case OpSubgroupAvcRefConvertToMcePayloadINTEL: return "OpSubgroupAvcRefConvertToMcePayloadINTEL"; + case OpSubgroupAvcRefSetBidirectionalMixDisableINTEL: return "OpSubgroupAvcRefSetBidirectionalMixDisableINTEL"; + case OpSubgroupAvcRefSetBilinearFilterEnableINTEL: return "OpSubgroupAvcRefSetBilinearFilterEnableINTEL"; + case OpSubgroupAvcRefEvaluateWithSingleReferenceINTEL: return "OpSubgroupAvcRefEvaluateWithSingleReferenceINTEL"; + case OpSubgroupAvcRefEvaluateWithDualReferenceINTEL: return "OpSubgroupAvcRefEvaluateWithDualReferenceINTEL"; + case OpSubgroupAvcRefEvaluateWithMultiReferenceINTEL: return "OpSubgroupAvcRefEvaluateWithMultiReferenceINTEL"; + case OpSubgroupAvcRefEvaluateWithMultiReferenceInterlacedINTEL: return "OpSubgroupAvcRefEvaluateWithMultiReferenceInterlacedINTEL"; + case OpSubgroupAvcRefConvertToMceResultINTEL: return "OpSubgroupAvcRefConvertToMceResultINTEL"; + case OpSubgroupAvcSicInitializeINTEL: return "OpSubgroupAvcSicInitializeINTEL"; + case OpSubgroupAvcSicConfigureSkcINTEL: return "OpSubgroupAvcSicConfigureSkcINTEL"; + case OpSubgroupAvcSicConfigureIpeLumaINTEL: return "OpSubgroupAvcSicConfigureIpeLumaINTEL"; + case OpSubgroupAvcSicConfigureIpeLumaChromaINTEL: return "OpSubgroupAvcSicConfigureIpeLumaChromaINTEL"; + case OpSubgroupAvcSicGetMotionVectorMaskINTEL: return "OpSubgroupAvcSicGetMotionVectorMaskINTEL"; + case OpSubgroupAvcSicConvertToMcePayloadINTEL: return "OpSubgroupAvcSicConvertToMcePayloadINTEL"; + case OpSubgroupAvcSicSetIntraLumaShapePenaltyINTEL: return "OpSubgroupAvcSicSetIntraLumaShapePenaltyINTEL"; + case OpSubgroupAvcSicSetIntraLumaModeCostFunctionINTEL: return "OpSubgroupAvcSicSetIntraLumaModeCostFunctionINTEL"; + case OpSubgroupAvcSicSetIntraChromaModeCostFunctionINTEL: return "OpSubgroupAvcSicSetIntraChromaModeCostFunctionINTEL"; + case OpSubgroupAvcSicSetBilinearFilterEnableINTEL: return "OpSubgroupAvcSicSetBilinearFilterEnableINTEL"; + case OpSubgroupAvcSicSetSkcForwardTransformEnableINTEL: return "OpSubgroupAvcSicSetSkcForwardTransformEnableINTEL"; + case OpSubgroupAvcSicSetBlockBasedRawSkipSadINTEL: return "OpSubgroupAvcSicSetBlockBasedRawSkipSadINTEL"; + case OpSubgroupAvcSicEvaluateIpeINTEL: return "OpSubgroupAvcSicEvaluateIpeINTEL"; + case OpSubgroupAvcSicEvaluateWithSingleReferenceINTEL: return "OpSubgroupAvcSicEvaluateWithSingleReferenceINTEL"; + case OpSubgroupAvcSicEvaluateWithDualReferenceINTEL: return "OpSubgroupAvcSicEvaluateWithDualReferenceINTEL"; + case OpSubgroupAvcSicEvaluateWithMultiReferenceINTEL: return "OpSubgroupAvcSicEvaluateWithMultiReferenceINTEL"; + case OpSubgroupAvcSicEvaluateWithMultiReferenceInterlacedINTEL: return "OpSubgroupAvcSicEvaluateWithMultiReferenceInterlacedINTEL"; + case OpSubgroupAvcSicConvertToMceResultINTEL: return "OpSubgroupAvcSicConvertToMceResultINTEL"; + case OpSubgroupAvcSicGetIpeLumaShapeINTEL: return "OpSubgroupAvcSicGetIpeLumaShapeINTEL"; + case OpSubgroupAvcSicGetBestIpeLumaDistortionINTEL: return "OpSubgroupAvcSicGetBestIpeLumaDistortionINTEL"; + case OpSubgroupAvcSicGetBestIpeChromaDistortionINTEL: return "OpSubgroupAvcSicGetBestIpeChromaDistortionINTEL"; + case OpSubgroupAvcSicGetPackedIpeLumaModesINTEL: return "OpSubgroupAvcSicGetPackedIpeLumaModesINTEL"; + case OpSubgroupAvcSicGetIpeChromaModeINTEL: return "OpSubgroupAvcSicGetIpeChromaModeINTEL"; + case OpSubgroupAvcSicGetPackedSkcLumaCountThresholdINTEL: return "OpSubgroupAvcSicGetPackedSkcLumaCountThresholdINTEL"; + case OpSubgroupAvcSicGetPackedSkcLumaSumThresholdINTEL: return "OpSubgroupAvcSicGetPackedSkcLumaSumThresholdINTEL"; + case OpSubgroupAvcSicGetInterRawSadsINTEL: return "OpSubgroupAvcSicGetInterRawSadsINTEL"; + case OpVariableLengthArrayINTEL: return "OpVariableLengthArrayINTEL"; + case OpSaveMemoryINTEL: return "OpSaveMemoryINTEL"; + case OpRestoreMemoryINTEL: return "OpRestoreMemoryINTEL"; + case OpArbitraryFloatSinCosPiINTEL: return "OpArbitraryFloatSinCosPiINTEL"; + case OpArbitraryFloatCastINTEL: return "OpArbitraryFloatCastINTEL"; + case OpArbitraryFloatCastFromIntINTEL: return "OpArbitraryFloatCastFromIntINTEL"; + case OpArbitraryFloatCastToIntINTEL: return "OpArbitraryFloatCastToIntINTEL"; + case OpArbitraryFloatAddINTEL: return "OpArbitraryFloatAddINTEL"; + case OpArbitraryFloatSubINTEL: return "OpArbitraryFloatSubINTEL"; + case OpArbitraryFloatMulINTEL: return "OpArbitraryFloatMulINTEL"; + case OpArbitraryFloatDivINTEL: return "OpArbitraryFloatDivINTEL"; + case OpArbitraryFloatGTINTEL: return "OpArbitraryFloatGTINTEL"; + case OpArbitraryFloatGEINTEL: return "OpArbitraryFloatGEINTEL"; + case OpArbitraryFloatLTINTEL: return "OpArbitraryFloatLTINTEL"; + case OpArbitraryFloatLEINTEL: return "OpArbitraryFloatLEINTEL"; + case OpArbitraryFloatEQINTEL: return "OpArbitraryFloatEQINTEL"; + case OpArbitraryFloatRecipINTEL: return "OpArbitraryFloatRecipINTEL"; + case OpArbitraryFloatRSqrtINTEL: return "OpArbitraryFloatRSqrtINTEL"; + case OpArbitraryFloatCbrtINTEL: return "OpArbitraryFloatCbrtINTEL"; + case OpArbitraryFloatHypotINTEL: return "OpArbitraryFloatHypotINTEL"; + case OpArbitraryFloatSqrtINTEL: return "OpArbitraryFloatSqrtINTEL"; + case OpArbitraryFloatLogINTEL: return "OpArbitraryFloatLogINTEL"; + case OpArbitraryFloatLog2INTEL: return "OpArbitraryFloatLog2INTEL"; + case OpArbitraryFloatLog10INTEL: return "OpArbitraryFloatLog10INTEL"; + case OpArbitraryFloatLog1pINTEL: return "OpArbitraryFloatLog1pINTEL"; + case OpArbitraryFloatExpINTEL: return "OpArbitraryFloatExpINTEL"; + case OpArbitraryFloatExp2INTEL: return "OpArbitraryFloatExp2INTEL"; + case OpArbitraryFloatExp10INTEL: return "OpArbitraryFloatExp10INTEL"; + case OpArbitraryFloatExpm1INTEL: return "OpArbitraryFloatExpm1INTEL"; + case OpArbitraryFloatSinINTEL: return "OpArbitraryFloatSinINTEL"; + case OpArbitraryFloatCosINTEL: return "OpArbitraryFloatCosINTEL"; + case OpArbitraryFloatSinCosINTEL: return "OpArbitraryFloatSinCosINTEL"; + case OpArbitraryFloatSinPiINTEL: return "OpArbitraryFloatSinPiINTEL"; + case OpArbitraryFloatCosPiINTEL: return "OpArbitraryFloatCosPiINTEL"; + case OpArbitraryFloatASinINTEL: return "OpArbitraryFloatASinINTEL"; + case OpArbitraryFloatASinPiINTEL: return "OpArbitraryFloatASinPiINTEL"; + case OpArbitraryFloatACosINTEL: return "OpArbitraryFloatACosINTEL"; + case OpArbitraryFloatACosPiINTEL: return "OpArbitraryFloatACosPiINTEL"; + case OpArbitraryFloatATanINTEL: return "OpArbitraryFloatATanINTEL"; + case OpArbitraryFloatATanPiINTEL: return "OpArbitraryFloatATanPiINTEL"; + case OpArbitraryFloatATan2INTEL: return "OpArbitraryFloatATan2INTEL"; + case OpArbitraryFloatPowINTEL: return "OpArbitraryFloatPowINTEL"; + case OpArbitraryFloatPowRINTEL: return "OpArbitraryFloatPowRINTEL"; + case OpArbitraryFloatPowNINTEL: return "OpArbitraryFloatPowNINTEL"; + case OpLoopControlINTEL: return "OpLoopControlINTEL"; + case OpAliasDomainDeclINTEL: return "OpAliasDomainDeclINTEL"; + case OpAliasScopeDeclINTEL: return "OpAliasScopeDeclINTEL"; + case OpAliasScopeListDeclINTEL: return "OpAliasScopeListDeclINTEL"; + case OpFixedSqrtINTEL: return "OpFixedSqrtINTEL"; + case OpFixedRecipINTEL: return "OpFixedRecipINTEL"; + case OpFixedRsqrtINTEL: return "OpFixedRsqrtINTEL"; + case OpFixedSinINTEL: return "OpFixedSinINTEL"; + case OpFixedCosINTEL: return "OpFixedCosINTEL"; + case OpFixedSinCosINTEL: return "OpFixedSinCosINTEL"; + case OpFixedSinPiINTEL: return "OpFixedSinPiINTEL"; + case OpFixedCosPiINTEL: return "OpFixedCosPiINTEL"; + case OpFixedSinCosPiINTEL: return "OpFixedSinCosPiINTEL"; + case OpFixedLogINTEL: return "OpFixedLogINTEL"; + case OpFixedExpINTEL: return "OpFixedExpINTEL"; + case OpPtrCastToCrossWorkgroupINTEL: return "OpPtrCastToCrossWorkgroupINTEL"; + case OpCrossWorkgroupCastToPtrINTEL: return "OpCrossWorkgroupCastToPtrINTEL"; + case OpReadPipeBlockingINTEL: return "OpReadPipeBlockingINTEL"; + case OpWritePipeBlockingINTEL: return "OpWritePipeBlockingINTEL"; + case OpFPGARegINTEL: return "OpFPGARegINTEL"; + 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 OpAtomicFAddEXT: return "OpAtomicFAddEXT"; + case OpTypeBufferSurfaceINTEL: return "OpTypeBufferSurfaceINTEL"; + case OpTypeStructContinuedINTEL: return "OpTypeStructContinuedINTEL"; + case OpConstantCompositeContinuedINTEL: return "OpConstantCompositeContinuedINTEL"; + case OpSpecConstantCompositeContinuedINTEL: return "OpSpecConstantCompositeContinuedINTEL"; + case OpCompositeConstructContinuedINTEL: return "OpCompositeConstructContinuedINTEL"; + case OpConvertFToBF16INTEL: return "OpConvertFToBF16INTEL"; + case OpConvertBF16ToFINTEL: return "OpConvertBF16ToFINTEL"; + case OpControlBarrierArriveINTEL: return "OpControlBarrierArriveINTEL"; + case OpControlBarrierWaitINTEL: return "OpControlBarrierWaitINTEL"; + case OpArithmeticFenceEXT: return "OpArithmeticFenceEXT"; + case OpSubgroupBlockPrefetchINTEL: return "OpSubgroupBlockPrefetchINTEL"; + case OpGroupIMulKHR: return "OpGroupIMulKHR"; + case OpGroupFMulKHR: return "OpGroupFMulKHR"; + case OpGroupBitwiseAndKHR: return "OpGroupBitwiseAndKHR"; + case OpGroupBitwiseOrKHR: return "OpGroupBitwiseOrKHR"; + case OpGroupBitwiseXorKHR: return "OpGroupBitwiseXorKHR"; + case OpGroupLogicalAndKHR: return "OpGroupLogicalAndKHR"; + case OpGroupLogicalOrKHR: return "OpGroupLogicalOrKHR"; + case OpGroupLogicalXorKHR: return "OpGroupLogicalXorKHR"; + case OpMaskedGatherINTEL: return "OpMaskedGatherINTEL"; + case OpMaskedScatterINTEL: return "OpMaskedScatterINTEL"; + default: return "Unknown"; + } +} + #endif /* SPV_ENABLE_UTILITY_CODE */ // Overload bitwise operators for mask bit combining @@ -2820,6 +5025,18 @@ inline CooperativeMatrixOperandsMask operator|(CooperativeMatrixOperandsMask a, inline CooperativeMatrixOperandsMask operator&(CooperativeMatrixOperandsMask a, CooperativeMatrixOperandsMask b) { return CooperativeMatrixOperandsMask(unsigned(a) & unsigned(b)); } inline CooperativeMatrixOperandsMask operator^(CooperativeMatrixOperandsMask a, CooperativeMatrixOperandsMask b) { return CooperativeMatrixOperandsMask(unsigned(a) ^ unsigned(b)); } inline CooperativeMatrixOperandsMask operator~(CooperativeMatrixOperandsMask a) { return CooperativeMatrixOperandsMask(~unsigned(a)); } +inline CooperativeMatrixReduceMask operator|(CooperativeMatrixReduceMask a, CooperativeMatrixReduceMask b) { return CooperativeMatrixReduceMask(unsigned(a) | unsigned(b)); } +inline CooperativeMatrixReduceMask operator&(CooperativeMatrixReduceMask a, CooperativeMatrixReduceMask b) { return CooperativeMatrixReduceMask(unsigned(a) & unsigned(b)); } +inline CooperativeMatrixReduceMask operator^(CooperativeMatrixReduceMask a, CooperativeMatrixReduceMask b) { return CooperativeMatrixReduceMask(unsigned(a) ^ unsigned(b)); } +inline CooperativeMatrixReduceMask operator~(CooperativeMatrixReduceMask a) { return CooperativeMatrixReduceMask(~unsigned(a)); } +inline TensorAddressingOperandsMask operator|(TensorAddressingOperandsMask a, TensorAddressingOperandsMask b) { return TensorAddressingOperandsMask(unsigned(a) | unsigned(b)); } +inline TensorAddressingOperandsMask operator&(TensorAddressingOperandsMask a, TensorAddressingOperandsMask b) { return TensorAddressingOperandsMask(unsigned(a) & unsigned(b)); } +inline TensorAddressingOperandsMask operator^(TensorAddressingOperandsMask a, TensorAddressingOperandsMask b) { return TensorAddressingOperandsMask(unsigned(a) ^ unsigned(b)); } +inline TensorAddressingOperandsMask operator~(TensorAddressingOperandsMask a) { return TensorAddressingOperandsMask(~unsigned(a)); } +inline RawAccessChainOperandsMask operator|(RawAccessChainOperandsMask a, RawAccessChainOperandsMask b) { return RawAccessChainOperandsMask(unsigned(a) | unsigned(b)); } +inline RawAccessChainOperandsMask operator&(RawAccessChainOperandsMask a, RawAccessChainOperandsMask b) { return RawAccessChainOperandsMask(unsigned(a) & unsigned(b)); } +inline RawAccessChainOperandsMask operator^(RawAccessChainOperandsMask a, RawAccessChainOperandsMask b) { return RawAccessChainOperandsMask(unsigned(a) ^ unsigned(b)); } +inline RawAccessChainOperandsMask operator~(RawAccessChainOperandsMask a) { return RawAccessChainOperandsMask(~unsigned(a)); } } // end namespace spv diff --git a/libraries/ZVulkan/src/glslang/spirv/spvIR.h b/libraries/ZVulkan/src/glslang/spirv/spvIR.h index bd639d8f7..e723f0e1e 100644 --- a/libraries/ZVulkan/src/glslang/spirv/spvIR.h +++ b/libraries/ZVulkan/src/glslang/spirv/spvIR.h @@ -189,6 +189,15 @@ public: out.push_back(operands[op]); } + const char *getNameString() const { + if (opCode == OpString) { + return (const char *)&operands[0]; + } else { + assert(opCode == OpName); + return (const char *)&operands[1]; + } + } + protected: Instruction(const Instruction&); Id resultId; diff --git a/src/common/rendering/vulkan/shaders/vk_shadercache.cpp b/src/common/rendering/vulkan/shaders/vk_shadercache.cpp index 4c2cb2958..f28c49c87 100644 --- a/src/common/rendering/vulkan/shaders/vk_shadercache.cpp +++ b/src/common/rendering/vulkan/shaders/vk_shadercache.cpp @@ -214,7 +214,7 @@ void VkShaderCache::Load() return; uint32_t version = readUInt32(fr); - if (version != 1) + if (version != 2) return; std::vector strbuffer; @@ -265,7 +265,7 @@ void VkShaderCache::Save() fw->Write("shadercache", 11); - uint32_t version = 1; + uint32_t version = 2; writeUInt32(fw, version); writeUInt32(fw, CodeCache.size());