From 6a005e3a2ade7903d4ec37c03a2ca6b884a589d6 Mon Sep 17 00:00:00 2001 From: Magnus Norddahl Date: Sat, 3 Dec 2022 06:40:04 +0100 Subject: [PATCH] Switch vulkan backend to use the zvulkan library --- CMakeLists.txt | 4 +- libraries/ZVulkan/CMakeLists.txt | 199 + libraries/ZVulkan/LICENSE.md | 90 + libraries/ZVulkan/README.md | 2 + .../include/vulkan/vk_enum_string_helper.h | 8448 +++++++++++++++++ .../ZVulkan/include}/vulkan/vk_icd.h | 0 .../ZVulkan/include}/vulkan/vk_layer.h | 0 .../include/vulkan/vk_layer_dispatch_table.h | 525 + .../ZVulkan/include}/vulkan/vk_platform.h | 0 .../ZVulkan/include}/vulkan/vk_sdk_platform.h | 0 .../ZVulkan/include}/vulkan/vulkan.h | 0 .../ZVulkan/include}/vulkan/vulkan_android.h | 0 .../ZVulkan/include}/vulkan/vulkan_beta.h | 0 .../ZVulkan/include}/vulkan/vulkan_core.h | 0 .../ZVulkan/include}/vulkan/vulkan_directfb.h | 0 .../ZVulkan/include}/vulkan/vulkan_fuchsia.h | 0 .../ZVulkan/include}/vulkan/vulkan_ggp.h | 0 .../ZVulkan/include}/vulkan/vulkan_ios.h | 0 .../ZVulkan/include}/vulkan/vulkan_macos.h | 0 .../ZVulkan/include}/vulkan/vulkan_metal.h | 0 libraries/ZVulkan/include/vulkan/vulkan_mir.h | 65 + .../ZVulkan/include}/vulkan/vulkan_screen.h | 0 .../ZVulkan/include}/vulkan/vulkan_vi.h | 0 .../ZVulkan/include}/vulkan/vulkan_wayland.h | 0 .../ZVulkan/include}/vulkan/vulkan_win32.h | 0 .../ZVulkan/include}/vulkan/vulkan_xcb.h | 0 .../ZVulkan/include}/vulkan/vulkan_xlib.h | 0 .../include}/vulkan/vulkan_xlib_xrandr.h | 0 .../zvulkan}/vk_mem_alloc/vk_mem_alloc.h | 0 .../ZVulkan/include/zvulkan}/volk/volk.h | 0 .../ZVulkan/include/zvulkan/vulkanbuilders.h | 143 +- .../include/zvulkan/vulkancompatibledevice.h | 19 + .../ZVulkan/include/zvulkan/vulkandevice.h | 52 + .../ZVulkan/include/zvulkan/vulkaninstance.h | 96 + .../ZVulkan/include/zvulkan/vulkanobjects.h | 152 +- .../ZVulkan/include/zvulkan/vulkansurface.h | 30 + .../ZVulkan/include/zvulkan/vulkanswapchain.h | 50 + libraries/ZVulkan/src/glslang/LICENSE.txt | 1016 ++ .../glslang/OGLCompilersDLL/InitializeDll.cpp | 0 .../glslang/OGLCompilersDLL/InitializeDll.h | 0 .../glslang/GenericCodeGen/CodeGen.cpp | 0 .../glslang/glslang/GenericCodeGen/Link.cpp | 0 .../src}/glslang/glslang/Include/BaseTypes.h | 9 +- .../src}/glslang/glslang/Include/Common.h | 37 +- .../glslang/glslang/Include/ConstantUnion.h | 0 .../src}/glslang/glslang/Include/InfoSink.h | 0 .../glslang/Include/InitializeGlobals.h | 0 .../src}/glslang/glslang/Include/PoolAlloc.h | 2 - .../glslang/glslang/Include/ResourceLimits.h | 0 .../src}/glslang/glslang/Include/ShHandle.h | 0 .../glslang/glslang/Include/SpirvIntrinsics.h | 18 +- .../src}/glslang/glslang/Include/Types.h | 621 +- .../src}/glslang/glslang/Include/arrays.h | 0 .../src}/glslang/glslang/Include/build_info.h | 2 +- .../glslang/glslang/Include/intermediate.h | 3 +- .../glslang/MachineIndependent/Constant.cpp | 35 +- .../glslang/MachineIndependent/InfoSink.cpp | 0 .../glslang/MachineIndependent/Initialize.cpp | 224 +- .../glslang/MachineIndependent/Initialize.h | 0 .../MachineIndependent/IntermTraverse.cpp | 0 .../MachineIndependent/Intermediate.cpp | 62 +- .../MachineIndependent/LiveTraverser.h | 0 .../MachineIndependent/ParseContextBase.cpp | 16 - .../MachineIndependent/ParseHelper.cpp | 197 +- .../glslang/MachineIndependent/ParseHelper.h | 5 +- .../glslang/MachineIndependent/PoolAlloc.cpp | 0 .../glslang/MachineIndependent/RemoveTree.cpp | 0 .../glslang/MachineIndependent/RemoveTree.h | 0 .../glslang/MachineIndependent/Scan.cpp | 7 - .../glslang/glslang/MachineIndependent/Scan.h | 0 .../glslang/MachineIndependent/ScanContext.h | 0 .../glslang/MachineIndependent/ShaderLang.cpp | 35 +- .../MachineIndependent/SpirvIntrinsics.cpp | 33 +- .../MachineIndependent/SymbolTable.cpp | 29 +- .../glslang/MachineIndependent/SymbolTable.h | 31 +- .../glslang/MachineIndependent/Versions.cpp | 12 - .../glslang/MachineIndependent/Versions.h | 4 - .../glslang/MachineIndependent/attribute.cpp | 2 +- .../glslang/MachineIndependent/attribute.h | 0 .../glslang/MachineIndependent/gl_types.h | 0 .../glslang/MachineIndependent/glslang.m4 | 29 +- .../glslang/MachineIndependent/glslang.y | 29 +- .../MachineIndependent/glslang_tab.cpp | 7975 ++++++++-------- .../MachineIndependent/glslang_tab.cpp.h | 13 +- .../glslang/MachineIndependent/intermOut.cpp | 31 + .../glslang/MachineIndependent/iomapper.cpp | 108 +- .../glslang/MachineIndependent/iomapper.h | 27 +- .../glslang/MachineIndependent/limits.cpp | 0 .../MachineIndependent/linkValidate.cpp | 357 +- .../MachineIndependent/localintermediate.h | 34 +- .../glslang/MachineIndependent/parseConst.cpp | 0 .../MachineIndependent/parseVersions.h | 0 .../glslang/glslang/MachineIndependent/pch.h | 0 .../MachineIndependent/preprocessor/Pp.cpp | 0 .../preprocessor/PpAtom.cpp | 0 .../preprocessor/PpContext.cpp | 0 .../preprocessor/PpContext.h | 0 .../preprocessor/PpScanner.cpp | 0 .../preprocessor/PpTokens.cpp | 0 .../preprocessor/PpTokens.h | 0 .../propagateNoContraction.cpp | 0 .../propagateNoContraction.h | 0 .../glslang/MachineIndependent/reflection.cpp | 0 .../glslang/MachineIndependent/reflection.h | 0 .../glslang/OSDependent/Unix/CMakeLists.txt | 2 +- .../glslang/OSDependent/Unix/ossource.cpp | 8 +- .../glslang/OSDependent/Web/CMakeLists.txt | 6 +- .../glslang/OSDependent/Web/glslang.after.js | 0 .../glslang/OSDependent/Web/glslang.js.cpp | 0 .../glslang/OSDependent/Web/glslang.pre.js | 0 .../OSDependent/Windows/CMakeLists.txt | 4 +- .../glslang/OSDependent/Windows/main.cpp | 0 .../glslang/OSDependent/Windows/ossource.cpp | 0 .../glslang/glslang/OSDependent/osinclude.h | 0 .../src}/glslang/glslang/Public/ShaderLang.h | 20 +- .../src}/glslang/glslang/updateGrammar | 0 .../src}/glslang/spirv/GLSL.ext.AMD.h | 0 .../src}/glslang/spirv/GLSL.ext.EXT.h | 0 .../src}/glslang/spirv/GLSL.ext.KHR.h | 3 +- .../src}/glslang/spirv/GLSL.ext.NV.h | 0 .../src}/glslang/spirv/GLSL.std.450.h | 0 .../src}/glslang/spirv/GlslangToSpv.cpp | 283 +- .../src}/glslang/spirv/GlslangToSpv.h | 2 +- .../src}/glslang/spirv/InReadableOrder.cpp | 0 .../src}/glslang/spirv/Logger.cpp | 0 .../{ => ZVulkan/src}/glslang/spirv/Logger.h | 0 .../glslang/spirv/NonSemanticDebugPrintf.h | 0 .../src}/glslang/spirv/SPVRemapper.cpp | 53 +- .../src}/glslang/spirv/SPVRemapper.h | 8 - .../src}/glslang/spirv/SpvBuilder.cpp | 31 - .../src}/glslang/spirv/SpvBuilder.h | 5 - .../src}/glslang/spirv/SpvPostProcess.cpp | 39 +- .../src}/glslang/spirv/SpvTools.cpp | 3 - .../src}/glslang/spirv/SpvTools.h | 2 +- .../src}/glslang/spirv/bitutils.h | 0 .../src}/glslang/spirv/disassemble.cpp | 53 +- .../src}/glslang/spirv/disassemble.h | 0 .../{ => ZVulkan/src}/glslang/spirv/doc.cpp | 17 +- .../{ => ZVulkan/src}/glslang/spirv/doc.h | 0 .../src}/glslang/spirv/hex_float.h | 0 .../{ => ZVulkan/src}/glslang/spirv/spirv.hpp | 211 +- .../{ => ZVulkan/src}/glslang/spirv/spvIR.h | 39 +- .../src}/vk_mem_alloc/vk_mem_alloc.cpp | 2 +- .../src}/vk_mem_alloc/vk_mem_alloc.natvis | 0 .../ZVulkan/src}/volk/volk.c | 12 +- .../ZVulkan/src/vulkanbuilders.cpp | 469 +- libraries/ZVulkan/src/vulkandevice.cpp | 159 + libraries/ZVulkan/src/vulkaninstance.cpp | 387 + libraries/ZVulkan/src/vulkansurface.cpp | 47 + libraries/ZVulkan/src/vulkanswapchain.cpp | 365 + .../glslang/OGLCompilersDLL/CMakeLists.txt | 31 - libraries/glslang/glslang/CMakeLists.txt | 162 - .../glslang/MachineIndependent/pch.cpp | 35 - libraries/glslang/spirv/CMakeLists.txt | 118 - src/CMakeLists.txt | 18 +- src/common/platform/posix/cocoa/i_video.mm | 32 +- src/common/platform/posix/sdl/sdlglvideo.cpp | 30 +- .../platform/win32/win32vulkanvideo.cpp | 2 +- src/common/platform/win32/win32vulkanvideo.h | 34 +- .../vulkan/renderer/vk_descriptorset.cpp | 28 +- .../vulkan/renderer/vk_descriptorset.h | 9 +- .../vulkan/renderer/vk_postprocess.cpp | 11 +- .../vulkan/renderer/vk_postprocess.h | 10 +- .../vulkan/renderer/vk_pprenderstate.cpp | 21 +- .../vulkan/renderer/vk_pprenderstate.h | 8 +- .../rendering/vulkan/renderer/vk_raytrace.cpp | 28 +- .../rendering/vulkan/renderer/vk_raytrace.h | 8 +- .../vulkan/renderer/vk_renderpass.cpp | 71 +- .../rendering/vulkan/renderer/vk_renderpass.h | 19 +- .../vulkan/renderer/vk_renderstate.cpp | 24 +- .../vulkan/renderer/vk_renderstate.h | 6 +- .../vulkan/renderer/vk_streambuffer.cpp | 8 +- .../vulkan/renderer/vk_streambuffer.h | 4 +- .../rendering/vulkan/shaders/vk_ppshader.cpp | 14 +- .../rendering/vulkan/shaders/vk_ppshader.h | 8 +- .../rendering/vulkan/shaders/vk_shader.cpp | 23 +- .../rendering/vulkan/shaders/vk_shader.h | 6 +- .../rendering/vulkan/system/vk_buffer.cpp | 2 +- .../rendering/vulkan/system/vk_buffer.h | 8 +- .../vulkan/system/vk_commandbuffer.cpp | 50 +- .../vulkan/system/vk_commandbuffer.h | 17 +- .../rendering/vulkan/system/vk_device.cpp | 638 -- .../rendering/vulkan/system/vk_device.h | 141 - .../rendering/vulkan/system/vk_hwbuffer.cpp | 16 +- .../rendering/vulkan/system/vk_hwbuffer.h | 14 +- ...vk_framebuffer.cpp => vk_renderdevice.cpp} | 153 +- .../{vk_framebuffer.h => vk_renderdevice.h} | 23 +- .../rendering/vulkan/system/vk_swapchain.cpp | 380 - .../rendering/vulkan/system/vk_swapchain.h | 53 - .../vulkan/textures/vk_framebuffer.cpp | 79 + .../vulkan/textures/vk_framebuffer.h | 36 + .../vulkan/textures/vk_hwtexture.cpp | 34 +- .../rendering/vulkan/textures/vk_hwtexture.h | 12 +- .../vulkan/textures/vk_imagetransition.h | 8 +- .../vulkan/textures/vk_pptexture.cpp | 12 +- .../rendering/vulkan/textures/vk_pptexture.h | 8 +- .../vulkan/textures/vk_renderbuffers.cpp | 57 +- .../vulkan/textures/vk_renderbuffers.h | 8 +- .../rendering/vulkan/textures/vk_samplers.cpp | 24 +- .../rendering/vulkan/textures/vk_samplers.h | 8 +- .../rendering/vulkan/textures/vk_texture.cpp | 16 +- .../rendering/vulkan/textures/vk_texture.h | 8 +- wadsrc/static/shaders/glsl/main.fp | 6 +- 203 files changed, 17691 insertions(+), 7996 deletions(-) create mode 100644 libraries/ZVulkan/CMakeLists.txt create mode 100644 libraries/ZVulkan/LICENSE.md create mode 100644 libraries/ZVulkan/README.md create mode 100644 libraries/ZVulkan/include/vulkan/vk_enum_string_helper.h rename {src/common/rendering/vulkan/thirdparty => libraries/ZVulkan/include}/vulkan/vk_icd.h (100%) rename {src/common/rendering/vulkan/thirdparty => libraries/ZVulkan/include}/vulkan/vk_layer.h (100%) create mode 100644 libraries/ZVulkan/include/vulkan/vk_layer_dispatch_table.h rename {src/common/rendering/vulkan/thirdparty => libraries/ZVulkan/include}/vulkan/vk_platform.h (100%) rename {src/common/rendering/vulkan/thirdparty => libraries/ZVulkan/include}/vulkan/vk_sdk_platform.h (100%) rename {src/common/rendering/vulkan/thirdparty => libraries/ZVulkan/include}/vulkan/vulkan.h (100%) rename {src/common/rendering/vulkan/thirdparty => libraries/ZVulkan/include}/vulkan/vulkan_android.h (100%) rename {src/common/rendering/vulkan/thirdparty => libraries/ZVulkan/include}/vulkan/vulkan_beta.h (100%) rename {src/common/rendering/vulkan/thirdparty => libraries/ZVulkan/include}/vulkan/vulkan_core.h (100%) rename {src/common/rendering/vulkan/thirdparty => libraries/ZVulkan/include}/vulkan/vulkan_directfb.h (100%) rename {src/common/rendering/vulkan/thirdparty => libraries/ZVulkan/include}/vulkan/vulkan_fuchsia.h (100%) rename {src/common/rendering/vulkan/thirdparty => libraries/ZVulkan/include}/vulkan/vulkan_ggp.h (100%) rename {src/common/rendering/vulkan/thirdparty => libraries/ZVulkan/include}/vulkan/vulkan_ios.h (100%) rename {src/common/rendering/vulkan/thirdparty => libraries/ZVulkan/include}/vulkan/vulkan_macos.h (100%) rename {src/common/rendering/vulkan/thirdparty => libraries/ZVulkan/include}/vulkan/vulkan_metal.h (100%) create mode 100644 libraries/ZVulkan/include/vulkan/vulkan_mir.h rename {src/common/rendering/vulkan/thirdparty => libraries/ZVulkan/include}/vulkan/vulkan_screen.h (100%) rename {src/common/rendering/vulkan/thirdparty => libraries/ZVulkan/include}/vulkan/vulkan_vi.h (100%) rename {src/common/rendering/vulkan/thirdparty => libraries/ZVulkan/include}/vulkan/vulkan_wayland.h (100%) rename {src/common/rendering/vulkan/thirdparty => libraries/ZVulkan/include}/vulkan/vulkan_win32.h (100%) rename {src/common/rendering/vulkan/thirdparty => libraries/ZVulkan/include}/vulkan/vulkan_xcb.h (100%) rename {src/common/rendering/vulkan/thirdparty => libraries/ZVulkan/include}/vulkan/vulkan_xlib.h (100%) rename {src/common/rendering/vulkan/thirdparty => libraries/ZVulkan/include}/vulkan/vulkan_xlib_xrandr.h (100%) rename {src/common/rendering/vulkan/thirdparty => libraries/ZVulkan/include/zvulkan}/vk_mem_alloc/vk_mem_alloc.h (100%) rename {src/common/rendering/vulkan/thirdparty => libraries/ZVulkan/include/zvulkan}/volk/volk.h (100%) rename src/common/rendering/vulkan/system/vk_builders.h => libraries/ZVulkan/include/zvulkan/vulkanbuilders.h (78%) create mode 100644 libraries/ZVulkan/include/zvulkan/vulkancompatibledevice.h create mode 100644 libraries/ZVulkan/include/zvulkan/vulkandevice.h create mode 100644 libraries/ZVulkan/include/zvulkan/vulkaninstance.h rename src/common/rendering/vulkan/system/vk_objects.h => libraries/ZVulkan/include/zvulkan/vulkanobjects.h (87%) create mode 100644 libraries/ZVulkan/include/zvulkan/vulkansurface.h create mode 100644 libraries/ZVulkan/include/zvulkan/vulkanswapchain.h create mode 100644 libraries/ZVulkan/src/glslang/LICENSE.txt rename libraries/{ => ZVulkan/src}/glslang/OGLCompilersDLL/InitializeDll.cpp (100%) rename libraries/{ => ZVulkan/src}/glslang/OGLCompilersDLL/InitializeDll.h (100%) rename libraries/{ => ZVulkan/src}/glslang/glslang/GenericCodeGen/CodeGen.cpp (100%) rename libraries/{ => ZVulkan/src}/glslang/glslang/GenericCodeGen/Link.cpp (100%) rename libraries/{ => ZVulkan/src}/glslang/glslang/Include/BaseTypes.h (99%) rename libraries/{ => ZVulkan/src}/glslang/glslang/Include/Common.h (93%) rename libraries/{ => ZVulkan/src}/glslang/glslang/Include/ConstantUnion.h (100%) rename libraries/{ => ZVulkan/src}/glslang/glslang/Include/InfoSink.h (100%) rename libraries/{ => ZVulkan/src}/glslang/glslang/Include/InitializeGlobals.h (100%) rename libraries/{ => ZVulkan/src}/glslang/glslang/Include/PoolAlloc.h (99%) rename libraries/{ => ZVulkan/src}/glslang/glslang/Include/ResourceLimits.h (100%) rename libraries/{ => ZVulkan/src}/glslang/glslang/Include/ShHandle.h (100%) rename libraries/{ => ZVulkan/src}/glslang/glslang/Include/SpirvIntrinsics.h (85%) rename libraries/{ => ZVulkan/src}/glslang/glslang/Include/Types.h (86%) rename libraries/{ => ZVulkan/src}/glslang/glslang/Include/arrays.h (100%) rename libraries/{ => ZVulkan/src}/glslang/glslang/Include/build_info.h (98%) rename libraries/{ => ZVulkan/src}/glslang/glslang/Include/intermediate.h (99%) rename libraries/{ => ZVulkan/src}/glslang/glslang/MachineIndependent/Constant.cpp (98%) rename libraries/{ => ZVulkan/src}/glslang/glslang/MachineIndependent/InfoSink.cpp (100%) rename libraries/{ => ZVulkan/src}/glslang/glslang/MachineIndependent/Initialize.cpp (98%) rename libraries/{ => ZVulkan/src}/glslang/glslang/MachineIndependent/Initialize.h (100%) rename libraries/{ => ZVulkan/src}/glslang/glslang/MachineIndependent/IntermTraverse.cpp (100%) rename libraries/{ => ZVulkan/src}/glslang/glslang/MachineIndependent/Intermediate.cpp (98%) rename libraries/{ => ZVulkan/src}/glslang/glslang/MachineIndependent/LiveTraverser.h (100%) rename libraries/{ => ZVulkan/src}/glslang/glslang/MachineIndependent/ParseContextBase.cpp (97%) rename libraries/{ => ZVulkan/src}/glslang/glslang/MachineIndependent/ParseHelper.cpp (98%) rename libraries/{ => ZVulkan/src}/glslang/glslang/MachineIndependent/ParseHelper.h (99%) rename libraries/{ => ZVulkan/src}/glslang/glslang/MachineIndependent/PoolAlloc.cpp (100%) rename libraries/{ => ZVulkan/src}/glslang/glslang/MachineIndependent/RemoveTree.cpp (100%) rename libraries/{ => ZVulkan/src}/glslang/glslang/MachineIndependent/RemoveTree.h (100%) rename libraries/{ => ZVulkan/src}/glslang/glslang/MachineIndependent/Scan.cpp (99%) rename libraries/{ => ZVulkan/src}/glslang/glslang/MachineIndependent/Scan.h (100%) rename libraries/{ => ZVulkan/src}/glslang/glslang/MachineIndependent/ScanContext.h (100%) rename libraries/{ => ZVulkan/src}/glslang/glslang/MachineIndependent/ShaderLang.cpp (98%) rename libraries/{ => ZVulkan/src}/glslang/glslang/MachineIndependent/SpirvIntrinsics.cpp (91%) rename libraries/{ => ZVulkan/src}/glslang/glslang/MachineIndependent/SymbolTable.cpp (93%) rename libraries/{ => ZVulkan/src}/glslang/glslang/MachineIndependent/SymbolTable.h (96%) rename libraries/{ => ZVulkan/src}/glslang/glslang/MachineIndependent/Versions.cpp (99%) rename libraries/{ => ZVulkan/src}/glslang/glslang/MachineIndependent/Versions.h (98%) rename libraries/{ => ZVulkan/src}/glslang/glslang/MachineIndependent/attribute.cpp (99%) rename libraries/{ => ZVulkan/src}/glslang/glslang/MachineIndependent/attribute.h (100%) rename libraries/{ => ZVulkan/src}/glslang/glslang/MachineIndependent/gl_types.h (100%) rename libraries/{ => ZVulkan/src}/glslang/glslang/MachineIndependent/glslang.m4 (99%) rename libraries/{ => ZVulkan/src}/glslang/glslang/MachineIndependent/glslang.y (99%) rename libraries/{ => ZVulkan/src}/glslang/glslang/MachineIndependent/glslang_tab.cpp (71%) rename libraries/{ => ZVulkan/src}/glslang/glslang/MachineIndependent/glslang_tab.cpp.h (98%) rename libraries/{ => ZVulkan/src}/glslang/glslang/MachineIndependent/intermOut.cpp (99%) rename libraries/{ => ZVulkan/src}/glslang/glslang/MachineIndependent/iomapper.cpp (93%) rename libraries/{ => ZVulkan/src}/glslang/glslang/MachineIndependent/iomapper.h (94%) rename libraries/{ => ZVulkan/src}/glslang/glslang/MachineIndependent/limits.cpp (100%) rename libraries/{ => ZVulkan/src}/glslang/glslang/MachineIndependent/linkValidate.cpp (84%) rename libraries/{ => ZVulkan/src}/glslang/glslang/MachineIndependent/localintermediate.h (97%) rename libraries/{ => ZVulkan/src}/glslang/glslang/MachineIndependent/parseConst.cpp (100%) rename libraries/{ => ZVulkan/src}/glslang/glslang/MachineIndependent/parseVersions.h (100%) rename libraries/{ => ZVulkan/src}/glslang/glslang/MachineIndependent/pch.h (100%) rename libraries/{ => ZVulkan/src}/glslang/glslang/MachineIndependent/preprocessor/Pp.cpp (100%) rename libraries/{ => ZVulkan/src}/glslang/glslang/MachineIndependent/preprocessor/PpAtom.cpp (100%) rename libraries/{ => ZVulkan/src}/glslang/glslang/MachineIndependent/preprocessor/PpContext.cpp (100%) rename libraries/{ => ZVulkan/src}/glslang/glslang/MachineIndependent/preprocessor/PpContext.h (100%) rename libraries/{ => ZVulkan/src}/glslang/glslang/MachineIndependent/preprocessor/PpScanner.cpp (100%) rename libraries/{ => ZVulkan/src}/glslang/glslang/MachineIndependent/preprocessor/PpTokens.cpp (100%) rename libraries/{ => ZVulkan/src}/glslang/glslang/MachineIndependent/preprocessor/PpTokens.h (100%) rename libraries/{ => ZVulkan/src}/glslang/glslang/MachineIndependent/propagateNoContraction.cpp (100%) rename libraries/{ => ZVulkan/src}/glslang/glslang/MachineIndependent/propagateNoContraction.h (100%) rename libraries/{ => ZVulkan/src}/glslang/glslang/MachineIndependent/reflection.cpp (100%) rename libraries/{ => ZVulkan/src}/glslang/glslang/MachineIndependent/reflection.h (100%) rename libraries/{ => ZVulkan/src}/glslang/glslang/OSDependent/Unix/CMakeLists.txt (98%) rename libraries/{ => ZVulkan/src}/glslang/glslang/OSDependent/Unix/ossource.cpp (97%) rename libraries/{ => ZVulkan/src}/glslang/glslang/OSDependent/Web/CMakeLists.txt (97%) rename libraries/{ => ZVulkan/src}/glslang/glslang/OSDependent/Web/glslang.after.js (100%) rename libraries/{ => ZVulkan/src}/glslang/glslang/OSDependent/Web/glslang.js.cpp (100%) rename libraries/{ => ZVulkan/src}/glslang/glslang/OSDependent/Web/glslang.pre.js (100%) rename libraries/{ => ZVulkan/src}/glslang/glslang/OSDependent/Windows/CMakeLists.txt (98%) rename libraries/{ => ZVulkan/src}/glslang/glslang/OSDependent/Windows/main.cpp (100%) rename libraries/{ => ZVulkan/src}/glslang/glslang/OSDependent/Windows/ossource.cpp (100%) rename libraries/{ => ZVulkan/src}/glslang/glslang/OSDependent/osinclude.h (100%) rename libraries/{ => ZVulkan/src}/glslang/glslang/Public/ShaderLang.h (97%) rename libraries/{ => ZVulkan/src}/glslang/glslang/updateGrammar (100%) rename libraries/{ => ZVulkan/src}/glslang/spirv/GLSL.ext.AMD.h (100%) rename libraries/{ => ZVulkan/src}/glslang/spirv/GLSL.ext.EXT.h (100%) rename libraries/{ => ZVulkan/src}/glslang/spirv/GLSL.ext.KHR.h (96%) rename libraries/{ => ZVulkan/src}/glslang/spirv/GLSL.ext.NV.h (100%) rename libraries/{ => ZVulkan/src}/glslang/spirv/GLSL.std.450.h (100%) rename libraries/{ => ZVulkan/src}/glslang/spirv/GlslangToSpv.cpp (97%) rename libraries/{ => ZVulkan/src}/glslang/spirv/GlslangToSpv.h (98%) rename libraries/{ => ZVulkan/src}/glslang/spirv/InReadableOrder.cpp (100%) rename libraries/{ => ZVulkan/src}/glslang/spirv/Logger.cpp (100%) rename libraries/{ => ZVulkan/src}/glslang/spirv/Logger.h (100%) rename libraries/{ => ZVulkan/src}/glslang/spirv/NonSemanticDebugPrintf.h (100%) rename libraries/{ => ZVulkan/src}/glslang/spirv/SPVRemapper.cpp (97%) rename libraries/{ => ZVulkan/src}/glslang/spirv/SPVRemapper.h (97%) rename libraries/{ => ZVulkan/src}/glslang/spirv/SpvBuilder.cpp (99%) rename libraries/{ => ZVulkan/src}/glslang/spirv/SpvBuilder.h (99%) rename libraries/{ => ZVulkan/src}/glslang/spirv/SpvPostProcess.cpp (95%) rename libraries/{ => ZVulkan/src}/glslang/spirv/SpvTools.cpp (98%) rename libraries/{ => ZVulkan/src}/glslang/spirv/SpvTools.h (98%) rename libraries/{ => ZVulkan/src}/glslang/spirv/bitutils.h (100%) rename libraries/{ => ZVulkan/src}/glslang/spirv/disassemble.cpp (97%) rename libraries/{ => ZVulkan/src}/glslang/spirv/disassemble.h (100%) rename libraries/{ => ZVulkan/src}/glslang/spirv/doc.cpp (99%) rename libraries/{ => ZVulkan/src}/glslang/spirv/doc.h (100%) rename libraries/{ => ZVulkan/src}/glslang/spirv/hex_float.h (100%) rename libraries/{ => ZVulkan/src}/glslang/spirv/spirv.hpp (91%) rename libraries/{ => ZVulkan/src}/glslang/spirv/spvIR.h (94%) rename {src/common/rendering/vulkan/thirdparty => libraries/ZVulkan/src}/vk_mem_alloc/vk_mem_alloc.cpp (77%) rename {src/common/rendering/vulkan/thirdparty => libraries/ZVulkan/src}/vk_mem_alloc/vk_mem_alloc.natvis (100%) rename {src/common/rendering/vulkan/thirdparty => libraries/ZVulkan/src}/volk/volk.c (99%) rename src/common/rendering/vulkan/system/vk_builders.cpp => libraries/ZVulkan/src/vulkanbuilders.cpp (78%) create mode 100644 libraries/ZVulkan/src/vulkandevice.cpp create mode 100644 libraries/ZVulkan/src/vulkaninstance.cpp create mode 100644 libraries/ZVulkan/src/vulkansurface.cpp create mode 100644 libraries/ZVulkan/src/vulkanswapchain.cpp delete mode 100644 libraries/glslang/OGLCompilersDLL/CMakeLists.txt delete mode 100644 libraries/glslang/glslang/CMakeLists.txt delete mode 100644 libraries/glslang/glslang/MachineIndependent/pch.cpp delete mode 100644 libraries/glslang/spirv/CMakeLists.txt delete mode 100644 src/common/rendering/vulkan/system/vk_device.cpp delete mode 100644 src/common/rendering/vulkan/system/vk_device.h rename src/common/rendering/vulkan/system/{vk_framebuffer.cpp => vk_renderdevice.cpp} (75%) rename src/common/rendering/vulkan/system/{vk_framebuffer.h => vk_renderdevice.h} (86%) delete mode 100644 src/common/rendering/vulkan/system/vk_swapchain.cpp delete mode 100644 src/common/rendering/vulkan/system/vk_swapchain.h create mode 100644 src/common/rendering/vulkan/textures/vk_framebuffer.cpp create mode 100644 src/common/rendering/vulkan/textures/vk_framebuffer.h diff --git a/CMakeLists.txt b/CMakeLists.txt index c0b8ac9df7..156fa4ea98 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -324,9 +324,7 @@ option(FORCE_INTERNAL_ASMJIT "Use internal asmjit" ON) mark_as_advanced( FORCE_INTERNAL_ASMJIT ) if (HAVE_VULKAN) - add_subdirectory( libraries/glslang/glslang) - add_subdirectory( libraries/glslang/spirv ) - add_subdirectory( libraries/glslang/OGLCompilersDLL ) + add_subdirectory( libraries/ZVulkan ) endif() add_subdirectory( libraries/discordrpc EXCLUDE_FROM_ALL ) diff --git a/libraries/ZVulkan/CMakeLists.txt b/libraries/ZVulkan/CMakeLists.txt new file mode 100644 index 0000000000..8a99d6a917 --- /dev/null +++ b/libraries/ZVulkan/CMakeLists.txt @@ -0,0 +1,199 @@ +cmake_minimum_required(VERSION 3.15) +project(zvulkan) + +set(ZVULKAN_SOURCES + src/vulkanbuilders.cpp + src/vulkandevice.cpp + src/vulkaninstance.cpp + src/vulkansurface.cpp + src/vulkanswapchain.cpp + src/vk_mem_alloc/vk_mem_alloc.cpp + src/vk_mem_alloc/vk_mem_alloc.natvis + src/volk/volk.c + src/glslang/glslang/MachineIndependent/SymbolTable.h + src/glslang/glslang/MachineIndependent/propagateNoContraction.cpp + src/glslang/glslang/MachineIndependent/PoolAlloc.cpp + src/glslang/glslang/MachineIndependent/Intermediate.cpp + src/glslang/glslang/MachineIndependent/gl_types.h + src/glslang/glslang/MachineIndependent/parseVersions.h + src/glslang/glslang/MachineIndependent/attribute.cpp + src/glslang/glslang/MachineIndependent/Scan.cpp + src/glslang/glslang/MachineIndependent/iomapper.h + src/glslang/glslang/MachineIndependent/ParseHelper.h + src/glslang/glslang/MachineIndependent/glslang_tab.cpp.h + src/glslang/glslang/MachineIndependent/SymbolTable.cpp + src/glslang/glslang/MachineIndependent/RemoveTree.cpp + src/glslang/glslang/MachineIndependent/Versions.h + src/glslang/glslang/MachineIndependent/reflection.cpp + src/glslang/glslang/MachineIndependent/LiveTraverser.h + src/glslang/glslang/MachineIndependent/iomapper.cpp + src/glslang/glslang/MachineIndependent/intermOut.cpp + src/glslang/glslang/MachineIndependent/Versions.cpp + src/glslang/glslang/MachineIndependent/Initialize.h + src/glslang/glslang/MachineIndependent/linkValidate.cpp + src/glslang/glslang/MachineIndependent/InfoSink.cpp + src/glslang/glslang/MachineIndependent/Constant.cpp + src/glslang/glslang/MachineIndependent/IntermTraverse.cpp + src/glslang/glslang/MachineIndependent/propagateNoContraction.h + src/glslang/glslang/MachineIndependent/glslang_tab.cpp + src/glslang/glslang/MachineIndependent/ShaderLang.cpp + src/glslang/glslang/MachineIndependent/preprocessor/Pp.cpp + src/glslang/glslang/MachineIndependent/preprocessor/PpTokens.h + src/glslang/glslang/MachineIndependent/preprocessor/PpAtom.cpp + src/glslang/glslang/MachineIndependent/preprocessor/PpContext.cpp + src/glslang/glslang/MachineIndependent/preprocessor/PpTokens.cpp + src/glslang/glslang/MachineIndependent/preprocessor/PpScanner.cpp + src/glslang/glslang/MachineIndependent/preprocessor/PpContext.h + src/glslang/glslang/MachineIndependent/attribute.h + src/glslang/glslang/MachineIndependent/localintermediate.h + src/glslang/glslang/MachineIndependent/parseConst.cpp + src/glslang/glslang/MachineIndependent/Initialize.cpp + src/glslang/glslang/MachineIndependent/limits.cpp + src/glslang/glslang/MachineIndependent/ParseContextBase.cpp + src/glslang/glslang/MachineIndependent/RemoveTree.h + src/glslang/glslang/MachineIndependent/ParseHelper.cpp + src/glslang/glslang/MachineIndependent/Scan.h + src/glslang/glslang/MachineIndependent/reflection.h + src/glslang/glslang/MachineIndependent/ScanContext.h + src/glslang/glslang/MachineIndependent/SpirvIntrinsics.cpp + src/glslang/glslang/OSDependent/osinclude.h + src/glslang/glslang/GenericCodeGen/Link.cpp + src/glslang/glslang/GenericCodeGen/CodeGen.cpp + src/glslang/glslang/Public/ShaderLang.h + src/glslang/glslang/Include/ConstantUnion.h + src/glslang/glslang/Include/InitializeGlobals.h + src/glslang/glslang/Include/Common.h + src/glslang/glslang/Include/PoolAlloc.h + src/glslang/glslang/Include/arrays.h + src/glslang/glslang/Include/ShHandle.h + src/glslang/glslang/Include/InfoSink.h + src/glslang/glslang/Include/ResourceLimits.h + src/glslang/glslang/Include/Types.h + src/glslang/glslang/Include/BaseTypes.h + src/glslang/glslang/Include/intermediate.h + src/glslang/glslang/Include/SpirvIntrinsics.h + src/glslang/glslang/Include/build_info.h + src/glslang/glslang/OSDependent/osinclude.h + src/glslang/spirv/Logger.h + src/glslang/spirv/GlslangToSpv.cpp + src/glslang/spirv/SPVRemapper.h + src/glslang/spirv/GLSL.ext.EXT.h + src/glslang/spirv/hex_float.h + src/glslang/spirv/doc.cpp + src/glslang/spirv/disassemble.cpp + src/glslang/spirv/SpvPostProcess.cpp + src/glslang/spirv/bitutils.h + src/glslang/spirv/InReadableOrder.cpp + src/glslang/spirv/GLSL.ext.AMD.h + src/glslang/spirv/GLSL.ext.NV.h + src/glslang/spirv/SPVRemapper.cpp + src/glslang/spirv/SpvBuilder.h + src/glslang/spirv/GLSL.ext.KHR.h + src/glslang/spirv/disassemble.h + src/glslang/spirv/SpvBuilder.cpp + src/glslang/spirv/GlslangToSpv.h + src/glslang/spirv/doc.h + src/glslang/spirv/SpvTools.cpp + src/glslang/spirv/spvIR.h + src/glslang/spirv/Logger.cpp + src/glslang/spirv/SpvTools.h + src/glslang/spirv/GLSL.std.450.h + src/glslang/spirv/NonSemanticDebugPrintf.h + src/glslang/OGLCompilersDLL/InitializeDll.cpp + src/glslang/OGLCompilersDLL/InitializeDll.h +) + +set(ZVULKAN_INCLUDES + include/zvulkan/vulkanbuilders.h + include/zvulkan/vulkancompatibledevice.h + include/zvulkan/vulkandevice.h + include/zvulkan/vulkaninstance.h + include/zvulkan/vulkanobjects.h + include/zvulkan/vulkansurface.h + include/zvulkan/vulkanswapchain.h + include/zvulkan/volk/volk.h + include/zvulkan/vk_mem_alloc/vk_mem_alloc.h +) + +set(ZVULKAN_WIN32_SOURCES + src/glslang/glslang/OSDependent/Windows/ossource.cpp +) + +set(ZVULKAN_UNIX_SOURCES + src/glslang/glslang/OSDependent/Unix/ossource.cpp +) + +set(VULKAN_INCLUDES + include/vulkan/vk_enum_string_helper.h + include/vulkan/vk_icd.h + include/vulkan/vk_layer.h + include/vulkan/vk_layer_dispatch_table.h + include/vulkan/vk_platform.h + include/vulkan/vk_sdk_platform.h + include/vulkan/vulkan.h + include/vulkan/vulkan_android.h + include/vulkan/vulkan_beta.h + include/vulkan/vulkan_core.h + include/vulkan/vulkan_directfb.h + include/vulkan/vulkan_fuchsia.h + include/vulkan/vulkan_ggp.h + include/vulkan/vulkan_ios.h + include/vulkan/vulkan_macos.h + include/vulkan/vulkan_metal.h + include/vulkan/vulkan_mir.h + include/vulkan/vulkan_screen.h + include/vulkan/vulkan_vi.h + include/vulkan/vulkan_wayland.h + include/vulkan/vulkan_win32.h + include/vulkan/vulkan_xcb.h + include/vulkan/vulkan_xlib.h + include/vulkan/vulkan_xlib_xrandr.h +) + +source_group("src" REGULAR_EXPRESSION "${CMAKE_CURRENT_SOURCE_DIR}/src/.+") +source_group("src\\glslang" REGULAR_EXPRESSION "${CMAKE_CURRENT_SOURCE_DIR}/src/glslang/.+") +source_group("src\\glslang\\glslang" REGULAR_EXPRESSION "${CMAKE_CURRENT_SOURCE_DIR}/src/glslang/glslang/.+") +source_group("src\\glslang\\glslang\\GenericCodeGen" REGULAR_EXPRESSION "${CMAKE_CURRENT_SOURCE_DIR}/src/glslang/glslang/GenericCodeGen/.+") +source_group("src\\glslang\\glslang\\Include" REGULAR_EXPRESSION "${CMAKE_CURRENT_SOURCE_DIR}/src/glslang/glslang/Include/.+") +source_group("src\\glslang\\glslang\\MachineIndependent" REGULAR_EXPRESSION "${CMAKE_CURRENT_SOURCE_DIR}/src/glslang/glslang/MachineIndependent/.+") +source_group("src\\glslang\\glslang\\MachineIndependent\\preprocessor" REGULAR_EXPRESSION "${CMAKE_CURRENT_SOURCE_DIR}/src/glslang/glslang/MachineIndependent/preprocessor/.+") +source_group("src\\glslang\\glslang\\OSDependent" REGULAR_EXPRESSION "${CMAKE_CURRENT_SOURCE_DIR}/src/glslang/glslang/OSDependent/.+") +source_group("src\\glslang\\glslang\\OSDependent\\Unix" REGULAR_EXPRESSION "${CMAKE_CURRENT_SOURCE_DIR}/src/glslang/glslang/OSDependent/Unix/.+") +source_group("src\\glslang\\glslang\\OSDependent\\Web" REGULAR_EXPRESSION "${CMAKE_CURRENT_SOURCE_DIR}/src/glslang/glslang/OSDependent/Web/.+") +source_group("src\\glslang\\glslang\\OSDependent\\Windows" REGULAR_EXPRESSION "${CMAKE_CURRENT_SOURCE_DIR}/src/glslang/glslang/OSDependent/Windows/.+") +source_group("src\\glslang\\glslang\\Public" REGULAR_EXPRESSION "${CMAKE_CURRENT_SOURCE_DIR}/src/glslang/glslang/Public/.+") +source_group("src\\glslang\\OGLCompilersDLL" REGULAR_EXPRESSION "${CMAKE_CURRENT_SOURCE_DIR}/src/glslang/OGLCompilersDLL/.+") +source_group("src\\glslang\\spirv" REGULAR_EXPRESSION "${CMAKE_CURRENT_SOURCE_DIR}/src/glslang/spirv/.+") +source_group("src\\vk_mem_alloc" REGULAR_EXPRESSION "${CMAKE_CURRENT_SOURCE_DIR}/src/vk_mem_alloc/.+") +source_group("src\\volk" REGULAR_EXPRESSION "${CMAKE_CURRENT_SOURCE_DIR}/src/volk/.+") +source_group("include" REGULAR_EXPRESSION "${CMAKE_CURRENT_SOURCE_DIR}/include/zvulkan/.+") +source_group("include\\vk_mem_alloc" REGULAR_EXPRESSION "${CMAKE_CURRENT_SOURCE_DIR}/include/zvulkan/vk_mem_alloc/.+") +source_group("include\\volk" REGULAR_EXPRESSION "${CMAKE_CURRENT_SOURCE_DIR}/include/zvulkan/volk/.+") + +include_directories(include include/zvulkan src) + +if(WIN32) + set(ZVULKAN_SOURCES ${ZVULKAN_SOURCES} ${ZVULKAN_WIN32_SOURCES}) + add_definitions(-DUNICODE -D_UNICODE) +else() + set(ZVULKAN_SOURCES ${ZVULKAN_SOURCES} ${ZVULKAN_UNIX_SOURCES}) + set(ZVULKAN_LIBS ${CMAKE_DL_LIBS} -ldl) + add_definitions(-DUNIX -D_UNIX) + add_link_options(-pthread) +endif() + +if(MSVC) + # Use all cores for compilation + set(CMAKE_CXX_FLAGS "/MP ${CMAKE_CXX_FLAGS}") + + # Ignore warnings in third party code + #set_source_files_properties(${ZVULKAN_SOURCES} PROPERTIES COMPILE_FLAGS "/wd4244 /wd4267 /wd4005 /wd4018 -D_CRT_SECURE_NO_WARNINGS") +endif() + +add_library(zvulkan STATIC ${ZVULKAN_SOURCES} ${ZVULKAN_INCLUDES} ${VULKAN_INCLUDES}) +target_link_libraries(zvulkan ${ZVULKAN_LIBS}) +set_target_properties(zvulkan PROPERTIES CXX_STANDARD 17) + +if(MSVC) + set_property(TARGET zvulkan PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>") +endif() diff --git a/libraries/ZVulkan/LICENSE.md b/libraries/ZVulkan/LICENSE.md new file mode 100644 index 0000000000..6685241c00 --- /dev/null +++ b/libraries/ZVulkan/LICENSE.md @@ -0,0 +1,90 @@ +# License information + +## License for ZVulkan itself + + // Copyright (c) 2016-2022 Magnus Norddahl + // + // This software is provided 'as-is', without any express or implied + // warranty. In no event will the authors be held liable for any damages + // arising from the use of this software. + // + // Permission is granted to anyone to use this software for any purpose, + // including commercial applications, and to alter it and redistribute it + // freely, subject to the following restrictions: + // + // 1. The origin of this software must not be misrepresented; you must not + // claim that you wrote the original software. If you use this software + // in a product, an acknowledgment in the product documentation would be + // appreciated but is not required. + // 2. Altered source versions must be plainly marked as such, and must not be + // misrepresented as being the original software. + // 3. This notice may not be removed or altered from any source distribution. + +## License for src/vk_mem_alloc + + // Copyright (c) 2017-2018 Advanced Micro Devices, Inc. All rights reserved. + // + // Permission is hereby granted, free of charge, to any person obtaining a copy + // of this software and associated documentation files (the "Software"), to deal + // in the Software without restriction, including without limitation the rights + // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + // copies of the Software, and to permit persons to whom the Software is + // furnished to do so, subject to the following conditions: + // + // The above copyright notice and this permission notice shall be included in + // all copies or substantial portions of the Software. + // + // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + // THE SOFTWARE. + // + +## License for src/volk + + /** + * Copyright (c) 2018-2019 Arseny Kapoulkine + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +## License for include/zvulkan/vulkan + + /* + ** Copyright (c) 2015-2019 The Khronos Group Inc. + ** + ** Licensed under the Apache License, Version 2.0 (the "License"); + ** you may not use this file except in compliance with the License. + ** You may obtain a copy of the License at + ** + ** http://www.apache.org/licenses/LICENSE-2.0 + ** + ** Unless required by applicable law or agreed to in writing, software + ** distributed under the License is distributed on an "AS IS" BASIS, + ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + ** See the License for the specific language governing permissions and + ** limitations under the License. + */ + +## License for src/glslang + + See src/glslang/LICENSE.txt diff --git a/libraries/ZVulkan/README.md b/libraries/ZVulkan/README.md new file mode 100644 index 0000000000..391082b5c1 --- /dev/null +++ b/libraries/ZVulkan/README.md @@ -0,0 +1,2 @@ +# ZVulkan +A framework for building vulkan applications diff --git a/libraries/ZVulkan/include/vulkan/vk_enum_string_helper.h b/libraries/ZVulkan/include/vulkan/vk_enum_string_helper.h new file mode 100644 index 0000000000..e82bb6ce4e --- /dev/null +++ b/libraries/ZVulkan/include/vulkan/vk_enum_string_helper.h @@ -0,0 +1,8448 @@ +// *** THIS FILE IS GENERATED - DO NOT EDIT *** +// See helper_file_generator.py for modifications + + +/*************************************************************************** + * + * Copyright (c) 2015-2021 The Khronos Group Inc. + * Copyright (c) 2015-2021 Valve Corporation + * Copyright (c) 2015-2021 LunarG, Inc. + * Copyright (c) 2015-2021 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Author: Mark Lobodzinski + * Author: Courtney Goeltzenleuchter + * Author: Tobin Ehlis + * Author: Chris Forbes + * Author: John Zulauf + * + ****************************************************************************/ + + +#pragma once +#ifdef _MSC_VER +#pragma warning( disable : 4065 ) +#endif + +#include +#include + + +static inline const char* string_VkResult(VkResult input_value) +{ + switch (input_value) + { + case VK_ERROR_DEVICE_LOST: + return "VK_ERROR_DEVICE_LOST"; + case VK_ERROR_EXTENSION_NOT_PRESENT: + return "VK_ERROR_EXTENSION_NOT_PRESENT"; + case VK_ERROR_FEATURE_NOT_PRESENT: + return "VK_ERROR_FEATURE_NOT_PRESENT"; + case VK_ERROR_FORMAT_NOT_SUPPORTED: + return "VK_ERROR_FORMAT_NOT_SUPPORTED"; + case VK_ERROR_FRAGMENTATION: + return "VK_ERROR_FRAGMENTATION"; + case VK_ERROR_FRAGMENTED_POOL: + return "VK_ERROR_FRAGMENTED_POOL"; + case VK_ERROR_FULL_SCREEN_EXCLUSIVE_MODE_LOST_EXT: + return "VK_ERROR_FULL_SCREEN_EXCLUSIVE_MODE_LOST_EXT"; + case VK_ERROR_INCOMPATIBLE_DISPLAY_KHR: + return "VK_ERROR_INCOMPATIBLE_DISPLAY_KHR"; + case VK_ERROR_INCOMPATIBLE_DRIVER: + return "VK_ERROR_INCOMPATIBLE_DRIVER"; + case VK_ERROR_INITIALIZATION_FAILED: + return "VK_ERROR_INITIALIZATION_FAILED"; + case VK_ERROR_INVALID_DRM_FORMAT_MODIFIER_PLANE_LAYOUT_EXT: + return "VK_ERROR_INVALID_DRM_FORMAT_MODIFIER_PLANE_LAYOUT_EXT"; + case VK_ERROR_INVALID_EXTERNAL_HANDLE: + return "VK_ERROR_INVALID_EXTERNAL_HANDLE"; + case VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS: + return "VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS"; + case VK_ERROR_INVALID_SHADER_NV: + return "VK_ERROR_INVALID_SHADER_NV"; + case VK_ERROR_LAYER_NOT_PRESENT: + return "VK_ERROR_LAYER_NOT_PRESENT"; + case VK_ERROR_MEMORY_MAP_FAILED: + return "VK_ERROR_MEMORY_MAP_FAILED"; + case VK_ERROR_NATIVE_WINDOW_IN_USE_KHR: + return "VK_ERROR_NATIVE_WINDOW_IN_USE_KHR"; + case VK_ERROR_NOT_PERMITTED_EXT: + return "VK_ERROR_NOT_PERMITTED_EXT"; + case VK_ERROR_OUT_OF_DATE_KHR: + return "VK_ERROR_OUT_OF_DATE_KHR"; + case VK_ERROR_OUT_OF_DEVICE_MEMORY: + return "VK_ERROR_OUT_OF_DEVICE_MEMORY"; + case VK_ERROR_OUT_OF_HOST_MEMORY: + return "VK_ERROR_OUT_OF_HOST_MEMORY"; + case VK_ERROR_OUT_OF_POOL_MEMORY: + return "VK_ERROR_OUT_OF_POOL_MEMORY"; + case VK_ERROR_SURFACE_LOST_KHR: + return "VK_ERROR_SURFACE_LOST_KHR"; + case VK_ERROR_TOO_MANY_OBJECTS: + return "VK_ERROR_TOO_MANY_OBJECTS"; + case VK_ERROR_UNKNOWN: + return "VK_ERROR_UNKNOWN"; + case VK_ERROR_VALIDATION_FAILED_EXT: + return "VK_ERROR_VALIDATION_FAILED_EXT"; + case VK_EVENT_RESET: + return "VK_EVENT_RESET"; + case VK_EVENT_SET: + return "VK_EVENT_SET"; + case VK_INCOMPLETE: + return "VK_INCOMPLETE"; + case VK_NOT_READY: + return "VK_NOT_READY"; + case VK_OPERATION_DEFERRED_KHR: + return "VK_OPERATION_DEFERRED_KHR"; + case VK_OPERATION_NOT_DEFERRED_KHR: + return "VK_OPERATION_NOT_DEFERRED_KHR"; + case VK_PIPELINE_COMPILE_REQUIRED_EXT: + return "VK_PIPELINE_COMPILE_REQUIRED_EXT"; + case VK_SUBOPTIMAL_KHR: + return "VK_SUBOPTIMAL_KHR"; + case VK_SUCCESS: + return "VK_SUCCESS"; + case VK_THREAD_DONE_KHR: + return "VK_THREAD_DONE_KHR"; + case VK_THREAD_IDLE_KHR: + return "VK_THREAD_IDLE_KHR"; + case VK_TIMEOUT: + return "VK_TIMEOUT"; + default: + return "Unhandled VkResult"; + } +} + +static inline const char* string_VkStructureType(VkStructureType input_value) +{ + switch (input_value) + { + case VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_BUILD_GEOMETRY_INFO_KHR: + return "VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_BUILD_GEOMETRY_INFO_KHR"; + case VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_BUILD_SIZES_INFO_KHR: + return "VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_BUILD_SIZES_INFO_KHR"; + case VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_CREATE_INFO_KHR: + return "VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_CREATE_INFO_KHR"; + case VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_CREATE_INFO_NV: + return "VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_CREATE_INFO_NV"; + case VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_DEVICE_ADDRESS_INFO_KHR: + return "VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_DEVICE_ADDRESS_INFO_KHR"; + case VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_AABBS_DATA_KHR: + return "VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_AABBS_DATA_KHR"; + case VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_INSTANCES_DATA_KHR: + return "VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_INSTANCES_DATA_KHR"; + case VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_KHR: + return "VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_KHR"; + case VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_MOTION_TRIANGLES_DATA_NV: + return "VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_MOTION_TRIANGLES_DATA_NV"; + case VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_TRIANGLES_DATA_KHR: + return "VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_TRIANGLES_DATA_KHR"; + case VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_INFO_NV: + return "VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_INFO_NV"; + case VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_INFO_NV: + return "VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_INFO_NV"; + case VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_MOTION_INFO_NV: + return "VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_MOTION_INFO_NV"; + case VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_VERSION_INFO_KHR: + return "VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_VERSION_INFO_KHR"; + case VK_STRUCTURE_TYPE_ACQUIRE_NEXT_IMAGE_INFO_KHR: + return "VK_STRUCTURE_TYPE_ACQUIRE_NEXT_IMAGE_INFO_KHR"; + case VK_STRUCTURE_TYPE_ACQUIRE_PROFILING_LOCK_INFO_KHR: + return "VK_STRUCTURE_TYPE_ACQUIRE_PROFILING_LOCK_INFO_KHR"; + case VK_STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_FORMAT_PROPERTIES_ANDROID: + return "VK_STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_FORMAT_PROPERTIES_ANDROID"; + case VK_STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_PROPERTIES_ANDROID: + return "VK_STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_PROPERTIES_ANDROID"; + case VK_STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_USAGE_ANDROID: + return "VK_STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_USAGE_ANDROID"; + case VK_STRUCTURE_TYPE_ANDROID_SURFACE_CREATE_INFO_KHR: + return "VK_STRUCTURE_TYPE_ANDROID_SURFACE_CREATE_INFO_KHR"; + case VK_STRUCTURE_TYPE_APPLICATION_INFO: + return "VK_STRUCTURE_TYPE_APPLICATION_INFO"; + case VK_STRUCTURE_TYPE_ATTACHMENT_DESCRIPTION_2: + return "VK_STRUCTURE_TYPE_ATTACHMENT_DESCRIPTION_2"; + case VK_STRUCTURE_TYPE_ATTACHMENT_DESCRIPTION_STENCIL_LAYOUT: + return "VK_STRUCTURE_TYPE_ATTACHMENT_DESCRIPTION_STENCIL_LAYOUT"; + case VK_STRUCTURE_TYPE_ATTACHMENT_REFERENCE_2: + return "VK_STRUCTURE_TYPE_ATTACHMENT_REFERENCE_2"; + case VK_STRUCTURE_TYPE_ATTACHMENT_REFERENCE_STENCIL_LAYOUT: + return "VK_STRUCTURE_TYPE_ATTACHMENT_REFERENCE_STENCIL_LAYOUT"; + case VK_STRUCTURE_TYPE_BIND_ACCELERATION_STRUCTURE_MEMORY_INFO_NV: + return "VK_STRUCTURE_TYPE_BIND_ACCELERATION_STRUCTURE_MEMORY_INFO_NV"; + case VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_DEVICE_GROUP_INFO: + return "VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_DEVICE_GROUP_INFO"; + case VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_INFO: + return "VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_INFO"; + case VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_DEVICE_GROUP_INFO: + return "VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_DEVICE_GROUP_INFO"; + case VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_INFO: + return "VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_INFO"; + case VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_SWAPCHAIN_INFO_KHR: + return "VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_SWAPCHAIN_INFO_KHR"; + case VK_STRUCTURE_TYPE_BIND_IMAGE_PLANE_MEMORY_INFO: + return "VK_STRUCTURE_TYPE_BIND_IMAGE_PLANE_MEMORY_INFO"; + case VK_STRUCTURE_TYPE_BIND_SPARSE_INFO: + return "VK_STRUCTURE_TYPE_BIND_SPARSE_INFO"; + case VK_STRUCTURE_TYPE_BLIT_IMAGE_INFO_2_KHR: + return "VK_STRUCTURE_TYPE_BLIT_IMAGE_INFO_2_KHR"; + case VK_STRUCTURE_TYPE_BUFFER_COPY_2_KHR: + return "VK_STRUCTURE_TYPE_BUFFER_COPY_2_KHR"; + case VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO: + return "VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO"; + case VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_CREATE_INFO_EXT: + return "VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_CREATE_INFO_EXT"; + case VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_INFO: + return "VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_INFO"; + case VK_STRUCTURE_TYPE_BUFFER_IMAGE_COPY_2_KHR: + return "VK_STRUCTURE_TYPE_BUFFER_IMAGE_COPY_2_KHR"; + case VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER: + return "VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER"; + case VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER_2_KHR: + return "VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER_2_KHR"; + case VK_STRUCTURE_TYPE_BUFFER_MEMORY_REQUIREMENTS_INFO_2: + return "VK_STRUCTURE_TYPE_BUFFER_MEMORY_REQUIREMENTS_INFO_2"; + case VK_STRUCTURE_TYPE_BUFFER_OPAQUE_CAPTURE_ADDRESS_CREATE_INFO: + return "VK_STRUCTURE_TYPE_BUFFER_OPAQUE_CAPTURE_ADDRESS_CREATE_INFO"; + case VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO: + return "VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO"; + case VK_STRUCTURE_TYPE_CALIBRATED_TIMESTAMP_INFO_EXT: + return "VK_STRUCTURE_TYPE_CALIBRATED_TIMESTAMP_INFO_EXT"; + case VK_STRUCTURE_TYPE_CHECKPOINT_DATA_2_NV: + return "VK_STRUCTURE_TYPE_CHECKPOINT_DATA_2_NV"; + case VK_STRUCTURE_TYPE_CHECKPOINT_DATA_NV: + return "VK_STRUCTURE_TYPE_CHECKPOINT_DATA_NV"; + case VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO: + return "VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO"; + case VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO: + return "VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO"; + case VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_CONDITIONAL_RENDERING_INFO_EXT: + return "VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_CONDITIONAL_RENDERING_INFO_EXT"; + case VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_INFO: + return "VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_INFO"; + case VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_RENDER_PASS_TRANSFORM_INFO_QCOM: + return "VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_RENDER_PASS_TRANSFORM_INFO_QCOM"; + case VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_VIEWPORT_SCISSOR_INFO_NV: + return "VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_VIEWPORT_SCISSOR_INFO_NV"; + case VK_STRUCTURE_TYPE_COMMAND_BUFFER_SUBMIT_INFO_KHR: + return "VK_STRUCTURE_TYPE_COMMAND_BUFFER_SUBMIT_INFO_KHR"; + case VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO: + return "VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO"; + case VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO: + return "VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO"; + case VK_STRUCTURE_TYPE_CONDITIONAL_RENDERING_BEGIN_INFO_EXT: + return "VK_STRUCTURE_TYPE_CONDITIONAL_RENDERING_BEGIN_INFO_EXT"; + case VK_STRUCTURE_TYPE_COOPERATIVE_MATRIX_PROPERTIES_NV: + return "VK_STRUCTURE_TYPE_COOPERATIVE_MATRIX_PROPERTIES_NV"; + case VK_STRUCTURE_TYPE_COPY_ACCELERATION_STRUCTURE_INFO_KHR: + return "VK_STRUCTURE_TYPE_COPY_ACCELERATION_STRUCTURE_INFO_KHR"; + case VK_STRUCTURE_TYPE_COPY_ACCELERATION_STRUCTURE_TO_MEMORY_INFO_KHR: + return "VK_STRUCTURE_TYPE_COPY_ACCELERATION_STRUCTURE_TO_MEMORY_INFO_KHR"; + case VK_STRUCTURE_TYPE_COPY_BUFFER_INFO_2_KHR: + return "VK_STRUCTURE_TYPE_COPY_BUFFER_INFO_2_KHR"; + case VK_STRUCTURE_TYPE_COPY_BUFFER_TO_IMAGE_INFO_2_KHR: + return "VK_STRUCTURE_TYPE_COPY_BUFFER_TO_IMAGE_INFO_2_KHR"; + case VK_STRUCTURE_TYPE_COPY_COMMAND_TRANSFORM_INFO_QCOM: + return "VK_STRUCTURE_TYPE_COPY_COMMAND_TRANSFORM_INFO_QCOM"; + case VK_STRUCTURE_TYPE_COPY_DESCRIPTOR_SET: + return "VK_STRUCTURE_TYPE_COPY_DESCRIPTOR_SET"; + case VK_STRUCTURE_TYPE_COPY_IMAGE_INFO_2_KHR: + return "VK_STRUCTURE_TYPE_COPY_IMAGE_INFO_2_KHR"; + case VK_STRUCTURE_TYPE_COPY_IMAGE_TO_BUFFER_INFO_2_KHR: + return "VK_STRUCTURE_TYPE_COPY_IMAGE_TO_BUFFER_INFO_2_KHR"; + case VK_STRUCTURE_TYPE_COPY_MEMORY_TO_ACCELERATION_STRUCTURE_INFO_KHR: + return "VK_STRUCTURE_TYPE_COPY_MEMORY_TO_ACCELERATION_STRUCTURE_INFO_KHR"; + case VK_STRUCTURE_TYPE_CU_FUNCTION_CREATE_INFO_NVX: + return "VK_STRUCTURE_TYPE_CU_FUNCTION_CREATE_INFO_NVX"; + case VK_STRUCTURE_TYPE_CU_LAUNCH_INFO_NVX: + return "VK_STRUCTURE_TYPE_CU_LAUNCH_INFO_NVX"; + case VK_STRUCTURE_TYPE_CU_MODULE_CREATE_INFO_NVX: + return "VK_STRUCTURE_TYPE_CU_MODULE_CREATE_INFO_NVX"; + case VK_STRUCTURE_TYPE_D3D12_FENCE_SUBMIT_INFO_KHR: + return "VK_STRUCTURE_TYPE_D3D12_FENCE_SUBMIT_INFO_KHR"; + case VK_STRUCTURE_TYPE_DEBUG_MARKER_MARKER_INFO_EXT: + return "VK_STRUCTURE_TYPE_DEBUG_MARKER_MARKER_INFO_EXT"; + case VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_NAME_INFO_EXT: + return "VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_NAME_INFO_EXT"; + case VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_TAG_INFO_EXT: + return "VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_TAG_INFO_EXT"; + case VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT: + return "VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT"; + case VK_STRUCTURE_TYPE_DEBUG_UTILS_LABEL_EXT: + return "VK_STRUCTURE_TYPE_DEBUG_UTILS_LABEL_EXT"; + case VK_STRUCTURE_TYPE_DEBUG_UTILS_MESSENGER_CALLBACK_DATA_EXT: + return "VK_STRUCTURE_TYPE_DEBUG_UTILS_MESSENGER_CALLBACK_DATA_EXT"; + case VK_STRUCTURE_TYPE_DEBUG_UTILS_MESSENGER_CREATE_INFO_EXT: + return "VK_STRUCTURE_TYPE_DEBUG_UTILS_MESSENGER_CREATE_INFO_EXT"; + case VK_STRUCTURE_TYPE_DEBUG_UTILS_OBJECT_NAME_INFO_EXT: + return "VK_STRUCTURE_TYPE_DEBUG_UTILS_OBJECT_NAME_INFO_EXT"; + case VK_STRUCTURE_TYPE_DEBUG_UTILS_OBJECT_TAG_INFO_EXT: + return "VK_STRUCTURE_TYPE_DEBUG_UTILS_OBJECT_TAG_INFO_EXT"; + case VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_BUFFER_CREATE_INFO_NV: + return "VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_BUFFER_CREATE_INFO_NV"; + case VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_IMAGE_CREATE_INFO_NV: + return "VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_IMAGE_CREATE_INFO_NV"; + case VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_MEMORY_ALLOCATE_INFO_NV: + return "VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_MEMORY_ALLOCATE_INFO_NV"; + case VK_STRUCTURE_TYPE_DEPENDENCY_INFO_KHR: + return "VK_STRUCTURE_TYPE_DEPENDENCY_INFO_KHR"; + case VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO: + return "VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO"; + case VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_INLINE_UNIFORM_BLOCK_CREATE_INFO_EXT: + return "VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_INLINE_UNIFORM_BLOCK_CREATE_INFO_EXT"; + case VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO: + return "VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO"; + case VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_BINDING_FLAGS_CREATE_INFO: + return "VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_BINDING_FLAGS_CREATE_INFO"; + case VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO: + return "VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO"; + case VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_SUPPORT: + return "VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_SUPPORT"; + case VK_STRUCTURE_TYPE_DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_ALLOCATE_INFO: + return "VK_STRUCTURE_TYPE_DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_ALLOCATE_INFO"; + case VK_STRUCTURE_TYPE_DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_LAYOUT_SUPPORT: + return "VK_STRUCTURE_TYPE_DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_LAYOUT_SUPPORT"; + case VK_STRUCTURE_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_CREATE_INFO: + return "VK_STRUCTURE_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_CREATE_INFO"; + case VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO: + return "VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO"; + case VK_STRUCTURE_TYPE_DEVICE_DEVICE_MEMORY_REPORT_CREATE_INFO_EXT: + return "VK_STRUCTURE_TYPE_DEVICE_DEVICE_MEMORY_REPORT_CREATE_INFO_EXT"; + case VK_STRUCTURE_TYPE_DEVICE_DIAGNOSTICS_CONFIG_CREATE_INFO_NV: + return "VK_STRUCTURE_TYPE_DEVICE_DIAGNOSTICS_CONFIG_CREATE_INFO_NV"; + case VK_STRUCTURE_TYPE_DEVICE_EVENT_INFO_EXT: + return "VK_STRUCTURE_TYPE_DEVICE_EVENT_INFO_EXT"; + case VK_STRUCTURE_TYPE_DEVICE_GROUP_BIND_SPARSE_INFO: + return "VK_STRUCTURE_TYPE_DEVICE_GROUP_BIND_SPARSE_INFO"; + case VK_STRUCTURE_TYPE_DEVICE_GROUP_COMMAND_BUFFER_BEGIN_INFO: + return "VK_STRUCTURE_TYPE_DEVICE_GROUP_COMMAND_BUFFER_BEGIN_INFO"; + case VK_STRUCTURE_TYPE_DEVICE_GROUP_DEVICE_CREATE_INFO: + return "VK_STRUCTURE_TYPE_DEVICE_GROUP_DEVICE_CREATE_INFO"; + case VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_CAPABILITIES_KHR: + return "VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_CAPABILITIES_KHR"; + case VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_INFO_KHR: + return "VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_INFO_KHR"; + case VK_STRUCTURE_TYPE_DEVICE_GROUP_RENDER_PASS_BEGIN_INFO: + return "VK_STRUCTURE_TYPE_DEVICE_GROUP_RENDER_PASS_BEGIN_INFO"; + case VK_STRUCTURE_TYPE_DEVICE_GROUP_SUBMIT_INFO: + return "VK_STRUCTURE_TYPE_DEVICE_GROUP_SUBMIT_INFO"; + case VK_STRUCTURE_TYPE_DEVICE_GROUP_SWAPCHAIN_CREATE_INFO_KHR: + return "VK_STRUCTURE_TYPE_DEVICE_GROUP_SWAPCHAIN_CREATE_INFO_KHR"; + case VK_STRUCTURE_TYPE_DEVICE_MEMORY_OPAQUE_CAPTURE_ADDRESS_INFO: + return "VK_STRUCTURE_TYPE_DEVICE_MEMORY_OPAQUE_CAPTURE_ADDRESS_INFO"; + case VK_STRUCTURE_TYPE_DEVICE_MEMORY_OVERALLOCATION_CREATE_INFO_AMD: + return "VK_STRUCTURE_TYPE_DEVICE_MEMORY_OVERALLOCATION_CREATE_INFO_AMD"; + case VK_STRUCTURE_TYPE_DEVICE_MEMORY_REPORT_CALLBACK_DATA_EXT: + return "VK_STRUCTURE_TYPE_DEVICE_MEMORY_REPORT_CALLBACK_DATA_EXT"; + case VK_STRUCTURE_TYPE_DEVICE_PRIVATE_DATA_CREATE_INFO_EXT: + return "VK_STRUCTURE_TYPE_DEVICE_PRIVATE_DATA_CREATE_INFO_EXT"; + case VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO: + return "VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO"; + case VK_STRUCTURE_TYPE_DEVICE_QUEUE_GLOBAL_PRIORITY_CREATE_INFO_EXT: + return "VK_STRUCTURE_TYPE_DEVICE_QUEUE_GLOBAL_PRIORITY_CREATE_INFO_EXT"; + case VK_STRUCTURE_TYPE_DEVICE_QUEUE_INFO_2: + return "VK_STRUCTURE_TYPE_DEVICE_QUEUE_INFO_2"; + case VK_STRUCTURE_TYPE_DIRECTFB_SURFACE_CREATE_INFO_EXT: + return "VK_STRUCTURE_TYPE_DIRECTFB_SURFACE_CREATE_INFO_EXT"; + case VK_STRUCTURE_TYPE_DISPLAY_EVENT_INFO_EXT: + return "VK_STRUCTURE_TYPE_DISPLAY_EVENT_INFO_EXT"; + case VK_STRUCTURE_TYPE_DISPLAY_MODE_CREATE_INFO_KHR: + return "VK_STRUCTURE_TYPE_DISPLAY_MODE_CREATE_INFO_KHR"; + case VK_STRUCTURE_TYPE_DISPLAY_MODE_PROPERTIES_2_KHR: + return "VK_STRUCTURE_TYPE_DISPLAY_MODE_PROPERTIES_2_KHR"; + case VK_STRUCTURE_TYPE_DISPLAY_NATIVE_HDR_SURFACE_CAPABILITIES_AMD: + return "VK_STRUCTURE_TYPE_DISPLAY_NATIVE_HDR_SURFACE_CAPABILITIES_AMD"; + case VK_STRUCTURE_TYPE_DISPLAY_PLANE_CAPABILITIES_2_KHR: + return "VK_STRUCTURE_TYPE_DISPLAY_PLANE_CAPABILITIES_2_KHR"; + case VK_STRUCTURE_TYPE_DISPLAY_PLANE_INFO_2_KHR: + return "VK_STRUCTURE_TYPE_DISPLAY_PLANE_INFO_2_KHR"; + case VK_STRUCTURE_TYPE_DISPLAY_PLANE_PROPERTIES_2_KHR: + return "VK_STRUCTURE_TYPE_DISPLAY_PLANE_PROPERTIES_2_KHR"; + case VK_STRUCTURE_TYPE_DISPLAY_POWER_INFO_EXT: + return "VK_STRUCTURE_TYPE_DISPLAY_POWER_INFO_EXT"; + case VK_STRUCTURE_TYPE_DISPLAY_PRESENT_INFO_KHR: + return "VK_STRUCTURE_TYPE_DISPLAY_PRESENT_INFO_KHR"; + case VK_STRUCTURE_TYPE_DISPLAY_PROPERTIES_2_KHR: + return "VK_STRUCTURE_TYPE_DISPLAY_PROPERTIES_2_KHR"; + case VK_STRUCTURE_TYPE_DISPLAY_SURFACE_CREATE_INFO_KHR: + return "VK_STRUCTURE_TYPE_DISPLAY_SURFACE_CREATE_INFO_KHR"; + case VK_STRUCTURE_TYPE_DRM_FORMAT_MODIFIER_PROPERTIES_LIST_EXT: + return "VK_STRUCTURE_TYPE_DRM_FORMAT_MODIFIER_PROPERTIES_LIST_EXT"; + case VK_STRUCTURE_TYPE_EVENT_CREATE_INFO: + return "VK_STRUCTURE_TYPE_EVENT_CREATE_INFO"; + case VK_STRUCTURE_TYPE_EXPORT_FENCE_CREATE_INFO: + return "VK_STRUCTURE_TYPE_EXPORT_FENCE_CREATE_INFO"; + case VK_STRUCTURE_TYPE_EXPORT_FENCE_WIN32_HANDLE_INFO_KHR: + return "VK_STRUCTURE_TYPE_EXPORT_FENCE_WIN32_HANDLE_INFO_KHR"; + case VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO: + return "VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO"; + case VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_NV: + return "VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_NV"; + case VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_KHR: + return "VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_KHR"; + case VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_NV: + return "VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_NV"; + case VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_CREATE_INFO: + return "VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_CREATE_INFO"; + case VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHR: + return "VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHR"; + case VK_STRUCTURE_TYPE_EXTERNAL_BUFFER_PROPERTIES: + return "VK_STRUCTURE_TYPE_EXTERNAL_BUFFER_PROPERTIES"; + case VK_STRUCTURE_TYPE_EXTERNAL_FENCE_PROPERTIES: + return "VK_STRUCTURE_TYPE_EXTERNAL_FENCE_PROPERTIES"; + case VK_STRUCTURE_TYPE_EXTERNAL_FORMAT_ANDROID: + return "VK_STRUCTURE_TYPE_EXTERNAL_FORMAT_ANDROID"; + case VK_STRUCTURE_TYPE_EXTERNAL_IMAGE_FORMAT_PROPERTIES: + return "VK_STRUCTURE_TYPE_EXTERNAL_IMAGE_FORMAT_PROPERTIES"; + case VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_BUFFER_CREATE_INFO: + return "VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_BUFFER_CREATE_INFO"; + case VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO: + return "VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO"; + case VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO_NV: + return "VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO_NV"; + case VK_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_PROPERTIES: + return "VK_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_PROPERTIES"; + case VK_STRUCTURE_TYPE_FENCE_CREATE_INFO: + return "VK_STRUCTURE_TYPE_FENCE_CREATE_INFO"; + case VK_STRUCTURE_TYPE_FENCE_GET_FD_INFO_KHR: + return "VK_STRUCTURE_TYPE_FENCE_GET_FD_INFO_KHR"; + case VK_STRUCTURE_TYPE_FENCE_GET_WIN32_HANDLE_INFO_KHR: + return "VK_STRUCTURE_TYPE_FENCE_GET_WIN32_HANDLE_INFO_KHR"; + case VK_STRUCTURE_TYPE_FILTER_CUBIC_IMAGE_VIEW_IMAGE_FORMAT_PROPERTIES_EXT: + return "VK_STRUCTURE_TYPE_FILTER_CUBIC_IMAGE_VIEW_IMAGE_FORMAT_PROPERTIES_EXT"; + case VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2: + return "VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2"; + case VK_STRUCTURE_TYPE_FRAGMENT_SHADING_RATE_ATTACHMENT_INFO_KHR: + return "VK_STRUCTURE_TYPE_FRAGMENT_SHADING_RATE_ATTACHMENT_INFO_KHR"; + case VK_STRUCTURE_TYPE_FRAMEBUFFER_ATTACHMENTS_CREATE_INFO: + return "VK_STRUCTURE_TYPE_FRAMEBUFFER_ATTACHMENTS_CREATE_INFO"; + case VK_STRUCTURE_TYPE_FRAMEBUFFER_ATTACHMENT_IMAGE_INFO: + return "VK_STRUCTURE_TYPE_FRAMEBUFFER_ATTACHMENT_IMAGE_INFO"; + case VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO: + return "VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO"; + case VK_STRUCTURE_TYPE_FRAMEBUFFER_MIXED_SAMPLES_COMBINATION_NV: + return "VK_STRUCTURE_TYPE_FRAMEBUFFER_MIXED_SAMPLES_COMBINATION_NV"; + case VK_STRUCTURE_TYPE_GENERATED_COMMANDS_INFO_NV: + return "VK_STRUCTURE_TYPE_GENERATED_COMMANDS_INFO_NV"; + case VK_STRUCTURE_TYPE_GENERATED_COMMANDS_MEMORY_REQUIREMENTS_INFO_NV: + return "VK_STRUCTURE_TYPE_GENERATED_COMMANDS_MEMORY_REQUIREMENTS_INFO_NV"; + case VK_STRUCTURE_TYPE_GEOMETRY_AABB_NV: + return "VK_STRUCTURE_TYPE_GEOMETRY_AABB_NV"; + case VK_STRUCTURE_TYPE_GEOMETRY_NV: + return "VK_STRUCTURE_TYPE_GEOMETRY_NV"; + case VK_STRUCTURE_TYPE_GEOMETRY_TRIANGLES_NV: + return "VK_STRUCTURE_TYPE_GEOMETRY_TRIANGLES_NV"; + case VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO: + return "VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO"; + case VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_SHADER_GROUPS_CREATE_INFO_NV: + return "VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_SHADER_GROUPS_CREATE_INFO_NV"; + case VK_STRUCTURE_TYPE_GRAPHICS_SHADER_GROUP_CREATE_INFO_NV: + return "VK_STRUCTURE_TYPE_GRAPHICS_SHADER_GROUP_CREATE_INFO_NV"; + case VK_STRUCTURE_TYPE_HDR_METADATA_EXT: + return "VK_STRUCTURE_TYPE_HDR_METADATA_EXT"; + case VK_STRUCTURE_TYPE_HEADLESS_SURFACE_CREATE_INFO_EXT: + return "VK_STRUCTURE_TYPE_HEADLESS_SURFACE_CREATE_INFO_EXT"; + case VK_STRUCTURE_TYPE_IMAGEPIPE_SURFACE_CREATE_INFO_FUCHSIA: + return "VK_STRUCTURE_TYPE_IMAGEPIPE_SURFACE_CREATE_INFO_FUCHSIA"; + case VK_STRUCTURE_TYPE_IMAGE_BLIT_2_KHR: + return "VK_STRUCTURE_TYPE_IMAGE_BLIT_2_KHR"; + case VK_STRUCTURE_TYPE_IMAGE_COPY_2_KHR: + return "VK_STRUCTURE_TYPE_IMAGE_COPY_2_KHR"; + case VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO: + return "VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO"; + case VK_STRUCTURE_TYPE_IMAGE_DRM_FORMAT_MODIFIER_EXPLICIT_CREATE_INFO_EXT: + return "VK_STRUCTURE_TYPE_IMAGE_DRM_FORMAT_MODIFIER_EXPLICIT_CREATE_INFO_EXT"; + case VK_STRUCTURE_TYPE_IMAGE_DRM_FORMAT_MODIFIER_LIST_CREATE_INFO_EXT: + return "VK_STRUCTURE_TYPE_IMAGE_DRM_FORMAT_MODIFIER_LIST_CREATE_INFO_EXT"; + case VK_STRUCTURE_TYPE_IMAGE_DRM_FORMAT_MODIFIER_PROPERTIES_EXT: + return "VK_STRUCTURE_TYPE_IMAGE_DRM_FORMAT_MODIFIER_PROPERTIES_EXT"; + case VK_STRUCTURE_TYPE_IMAGE_FORMAT_LIST_CREATE_INFO: + return "VK_STRUCTURE_TYPE_IMAGE_FORMAT_LIST_CREATE_INFO"; + case VK_STRUCTURE_TYPE_IMAGE_FORMAT_PROPERTIES_2: + return "VK_STRUCTURE_TYPE_IMAGE_FORMAT_PROPERTIES_2"; + case VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER: + return "VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER"; + case VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER_2_KHR: + return "VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER_2_KHR"; + case VK_STRUCTURE_TYPE_IMAGE_MEMORY_REQUIREMENTS_INFO_2: + return "VK_STRUCTURE_TYPE_IMAGE_MEMORY_REQUIREMENTS_INFO_2"; + case VK_STRUCTURE_TYPE_IMAGE_PLANE_MEMORY_REQUIREMENTS_INFO: + return "VK_STRUCTURE_TYPE_IMAGE_PLANE_MEMORY_REQUIREMENTS_INFO"; + case VK_STRUCTURE_TYPE_IMAGE_RESOLVE_2_KHR: + return "VK_STRUCTURE_TYPE_IMAGE_RESOLVE_2_KHR"; + case VK_STRUCTURE_TYPE_IMAGE_SPARSE_MEMORY_REQUIREMENTS_INFO_2: + return "VK_STRUCTURE_TYPE_IMAGE_SPARSE_MEMORY_REQUIREMENTS_INFO_2"; + case VK_STRUCTURE_TYPE_IMAGE_STENCIL_USAGE_CREATE_INFO: + return "VK_STRUCTURE_TYPE_IMAGE_STENCIL_USAGE_CREATE_INFO"; + case VK_STRUCTURE_TYPE_IMAGE_SWAPCHAIN_CREATE_INFO_KHR: + return "VK_STRUCTURE_TYPE_IMAGE_SWAPCHAIN_CREATE_INFO_KHR"; + case VK_STRUCTURE_TYPE_IMAGE_VIEW_ADDRESS_PROPERTIES_NVX: + return "VK_STRUCTURE_TYPE_IMAGE_VIEW_ADDRESS_PROPERTIES_NVX"; + case VK_STRUCTURE_TYPE_IMAGE_VIEW_ASTC_DECODE_MODE_EXT: + return "VK_STRUCTURE_TYPE_IMAGE_VIEW_ASTC_DECODE_MODE_EXT"; + case VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO: + return "VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO"; + case VK_STRUCTURE_TYPE_IMAGE_VIEW_HANDLE_INFO_NVX: + return "VK_STRUCTURE_TYPE_IMAGE_VIEW_HANDLE_INFO_NVX"; + case VK_STRUCTURE_TYPE_IMAGE_VIEW_USAGE_CREATE_INFO: + return "VK_STRUCTURE_TYPE_IMAGE_VIEW_USAGE_CREATE_INFO"; + case VK_STRUCTURE_TYPE_IMPORT_ANDROID_HARDWARE_BUFFER_INFO_ANDROID: + return "VK_STRUCTURE_TYPE_IMPORT_ANDROID_HARDWARE_BUFFER_INFO_ANDROID"; + case VK_STRUCTURE_TYPE_IMPORT_FENCE_FD_INFO_KHR: + return "VK_STRUCTURE_TYPE_IMPORT_FENCE_FD_INFO_KHR"; + case VK_STRUCTURE_TYPE_IMPORT_FENCE_WIN32_HANDLE_INFO_KHR: + return "VK_STRUCTURE_TYPE_IMPORT_FENCE_WIN32_HANDLE_INFO_KHR"; + case VK_STRUCTURE_TYPE_IMPORT_MEMORY_FD_INFO_KHR: + return "VK_STRUCTURE_TYPE_IMPORT_MEMORY_FD_INFO_KHR"; + case VK_STRUCTURE_TYPE_IMPORT_MEMORY_HOST_POINTER_INFO_EXT: + return "VK_STRUCTURE_TYPE_IMPORT_MEMORY_HOST_POINTER_INFO_EXT"; + case VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_KHR: + return "VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_KHR"; + case VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_NV: + return "VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_NV"; + case VK_STRUCTURE_TYPE_IMPORT_MEMORY_ZIRCON_HANDLE_INFO_FUCHSIA: + return "VK_STRUCTURE_TYPE_IMPORT_MEMORY_ZIRCON_HANDLE_INFO_FUCHSIA"; + case VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_FD_INFO_KHR: + return "VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_FD_INFO_KHR"; + case VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHR: + return "VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHR"; + case VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_ZIRCON_HANDLE_INFO_FUCHSIA: + return "VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_ZIRCON_HANDLE_INFO_FUCHSIA"; + case VK_STRUCTURE_TYPE_INDIRECT_COMMANDS_LAYOUT_CREATE_INFO_NV: + return "VK_STRUCTURE_TYPE_INDIRECT_COMMANDS_LAYOUT_CREATE_INFO_NV"; + case VK_STRUCTURE_TYPE_INDIRECT_COMMANDS_LAYOUT_TOKEN_NV: + return "VK_STRUCTURE_TYPE_INDIRECT_COMMANDS_LAYOUT_TOKEN_NV"; + case VK_STRUCTURE_TYPE_INITIALIZE_PERFORMANCE_API_INFO_INTEL: + return "VK_STRUCTURE_TYPE_INITIALIZE_PERFORMANCE_API_INFO_INTEL"; + case VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO: + return "VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO"; + case VK_STRUCTURE_TYPE_IOS_SURFACE_CREATE_INFO_MVK: + return "VK_STRUCTURE_TYPE_IOS_SURFACE_CREATE_INFO_MVK"; + case VK_STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO: + return "VK_STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO"; + case VK_STRUCTURE_TYPE_LOADER_INSTANCE_CREATE_INFO: + return "VK_STRUCTURE_TYPE_LOADER_INSTANCE_CREATE_INFO"; + case VK_STRUCTURE_TYPE_MACOS_SURFACE_CREATE_INFO_MVK: + return "VK_STRUCTURE_TYPE_MACOS_SURFACE_CREATE_INFO_MVK"; + case VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE: + return "VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE"; + case VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_FLAGS_INFO: + return "VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_FLAGS_INFO"; + case VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO: + return "VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO"; + case VK_STRUCTURE_TYPE_MEMORY_BARRIER: + return "VK_STRUCTURE_TYPE_MEMORY_BARRIER"; + case VK_STRUCTURE_TYPE_MEMORY_BARRIER_2_KHR: + return "VK_STRUCTURE_TYPE_MEMORY_BARRIER_2_KHR"; + case VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO: + return "VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO"; + case VK_STRUCTURE_TYPE_MEMORY_DEDICATED_REQUIREMENTS: + return "VK_STRUCTURE_TYPE_MEMORY_DEDICATED_REQUIREMENTS"; + case VK_STRUCTURE_TYPE_MEMORY_FD_PROPERTIES_KHR: + return "VK_STRUCTURE_TYPE_MEMORY_FD_PROPERTIES_KHR"; + case VK_STRUCTURE_TYPE_MEMORY_GET_ANDROID_HARDWARE_BUFFER_INFO_ANDROID: + return "VK_STRUCTURE_TYPE_MEMORY_GET_ANDROID_HARDWARE_BUFFER_INFO_ANDROID"; + case VK_STRUCTURE_TYPE_MEMORY_GET_FD_INFO_KHR: + return "VK_STRUCTURE_TYPE_MEMORY_GET_FD_INFO_KHR"; + case VK_STRUCTURE_TYPE_MEMORY_GET_REMOTE_ADDRESS_INFO_NV: + return "VK_STRUCTURE_TYPE_MEMORY_GET_REMOTE_ADDRESS_INFO_NV"; + case VK_STRUCTURE_TYPE_MEMORY_GET_WIN32_HANDLE_INFO_KHR: + return "VK_STRUCTURE_TYPE_MEMORY_GET_WIN32_HANDLE_INFO_KHR"; + case VK_STRUCTURE_TYPE_MEMORY_GET_ZIRCON_HANDLE_INFO_FUCHSIA: + return "VK_STRUCTURE_TYPE_MEMORY_GET_ZIRCON_HANDLE_INFO_FUCHSIA"; + case VK_STRUCTURE_TYPE_MEMORY_HOST_POINTER_PROPERTIES_EXT: + return "VK_STRUCTURE_TYPE_MEMORY_HOST_POINTER_PROPERTIES_EXT"; + case VK_STRUCTURE_TYPE_MEMORY_OPAQUE_CAPTURE_ADDRESS_ALLOCATE_INFO: + return "VK_STRUCTURE_TYPE_MEMORY_OPAQUE_CAPTURE_ADDRESS_ALLOCATE_INFO"; + case VK_STRUCTURE_TYPE_MEMORY_PRIORITY_ALLOCATE_INFO_EXT: + return "VK_STRUCTURE_TYPE_MEMORY_PRIORITY_ALLOCATE_INFO_EXT"; + case VK_STRUCTURE_TYPE_MEMORY_REQUIREMENTS_2: + return "VK_STRUCTURE_TYPE_MEMORY_REQUIREMENTS_2"; + case VK_STRUCTURE_TYPE_MEMORY_WIN32_HANDLE_PROPERTIES_KHR: + return "VK_STRUCTURE_TYPE_MEMORY_WIN32_HANDLE_PROPERTIES_KHR"; + case VK_STRUCTURE_TYPE_MEMORY_ZIRCON_HANDLE_PROPERTIES_FUCHSIA: + return "VK_STRUCTURE_TYPE_MEMORY_ZIRCON_HANDLE_PROPERTIES_FUCHSIA"; + case VK_STRUCTURE_TYPE_METAL_SURFACE_CREATE_INFO_EXT: + return "VK_STRUCTURE_TYPE_METAL_SURFACE_CREATE_INFO_EXT"; + case VK_STRUCTURE_TYPE_MULTISAMPLE_PROPERTIES_EXT: + return "VK_STRUCTURE_TYPE_MULTISAMPLE_PROPERTIES_EXT"; + case VK_STRUCTURE_TYPE_MUTABLE_DESCRIPTOR_TYPE_CREATE_INFO_VALVE: + return "VK_STRUCTURE_TYPE_MUTABLE_DESCRIPTOR_TYPE_CREATE_INFO_VALVE"; + case VK_STRUCTURE_TYPE_PERFORMANCE_CONFIGURATION_ACQUIRE_INFO_INTEL: + return "VK_STRUCTURE_TYPE_PERFORMANCE_CONFIGURATION_ACQUIRE_INFO_INTEL"; + case VK_STRUCTURE_TYPE_PERFORMANCE_COUNTER_DESCRIPTION_KHR: + return "VK_STRUCTURE_TYPE_PERFORMANCE_COUNTER_DESCRIPTION_KHR"; + case VK_STRUCTURE_TYPE_PERFORMANCE_COUNTER_KHR: + return "VK_STRUCTURE_TYPE_PERFORMANCE_COUNTER_KHR"; + case VK_STRUCTURE_TYPE_PERFORMANCE_MARKER_INFO_INTEL: + return "VK_STRUCTURE_TYPE_PERFORMANCE_MARKER_INFO_INTEL"; + case VK_STRUCTURE_TYPE_PERFORMANCE_OVERRIDE_INFO_INTEL: + return "VK_STRUCTURE_TYPE_PERFORMANCE_OVERRIDE_INFO_INTEL"; + case VK_STRUCTURE_TYPE_PERFORMANCE_QUERY_SUBMIT_INFO_KHR: + return "VK_STRUCTURE_TYPE_PERFORMANCE_QUERY_SUBMIT_INFO_KHR"; + case VK_STRUCTURE_TYPE_PERFORMANCE_STREAM_MARKER_INFO_INTEL: + return "VK_STRUCTURE_TYPE_PERFORMANCE_STREAM_MARKER_INFO_INTEL"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_16BIT_STORAGE_FEATURES: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_16BIT_STORAGE_FEATURES"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_4444_FORMATS_FEATURES_EXT: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_4444_FORMATS_FEATURES_EXT"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_8BIT_STORAGE_FEATURES: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_8BIT_STORAGE_FEATURES"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ACCELERATION_STRUCTURE_FEATURES_KHR: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ACCELERATION_STRUCTURE_FEATURES_KHR"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ACCELERATION_STRUCTURE_PROPERTIES_KHR: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ACCELERATION_STRUCTURE_PROPERTIES_KHR"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ASTC_DECODE_FEATURES_EXT: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ASTC_DECODE_FEATURES_EXT"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_FEATURES_EXT: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_FEATURES_EXT"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_PROPERTIES_EXT: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_PROPERTIES_EXT"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES_EXT: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES_EXT"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COHERENT_MEMORY_FEATURES_AMD: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COHERENT_MEMORY_FEATURES_AMD"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COLOR_WRITE_ENABLE_FEATURES_EXT: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COLOR_WRITE_ENABLE_FEATURES_EXT"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COMPUTE_SHADER_DERIVATIVES_FEATURES_NV: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COMPUTE_SHADER_DERIVATIVES_FEATURES_NV"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CONDITIONAL_RENDERING_FEATURES_EXT: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CONDITIONAL_RENDERING_FEATURES_EXT"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CONSERVATIVE_RASTERIZATION_PROPERTIES_EXT: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CONSERVATIVE_RASTERIZATION_PROPERTIES_EXT"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_FEATURES_NV: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_FEATURES_NV"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_PROPERTIES_NV: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_PROPERTIES_NV"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CORNER_SAMPLED_IMAGE_FEATURES_NV: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CORNER_SAMPLED_IMAGE_FEATURES_NV"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COVERAGE_REDUCTION_MODE_FEATURES_NV: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COVERAGE_REDUCTION_MODE_FEATURES_NV"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CUSTOM_BORDER_COLOR_FEATURES_EXT: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CUSTOM_BORDER_COLOR_FEATURES_EXT"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CUSTOM_BORDER_COLOR_PROPERTIES_EXT: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CUSTOM_BORDER_COLOR_PROPERTIES_EXT"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEDICATED_ALLOCATION_IMAGE_ALIASING_FEATURES_NV: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEDICATED_ALLOCATION_IMAGE_ALIASING_FEATURES_NV"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLIP_ENABLE_FEATURES_EXT: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLIP_ENABLE_FEATURES_EXT"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_STENCIL_RESOLVE_PROPERTIES: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_STENCIL_RESOLVE_PROPERTIES"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_FEATURES: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_FEATURES"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_PROPERTIES: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_PROPERTIES"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEVICE_GENERATED_COMMANDS_FEATURES_NV: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEVICE_GENERATED_COMMANDS_FEATURES_NV"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEVICE_GENERATED_COMMANDS_PROPERTIES_NV: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEVICE_GENERATED_COMMANDS_PROPERTIES_NV"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEVICE_MEMORY_REPORT_FEATURES_EXT: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEVICE_MEMORY_REPORT_FEATURES_EXT"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DIAGNOSTICS_CONFIG_FEATURES_NV: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DIAGNOSTICS_CONFIG_FEATURES_NV"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DISCARD_RECTANGLE_PROPERTIES_EXT: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DISCARD_RECTANGLE_PROPERTIES_EXT"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DRIVER_PROPERTIES: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DRIVER_PROPERTIES"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DRM_PROPERTIES_EXT: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DRM_PROPERTIES_EXT"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXCLUSIVE_SCISSOR_FEATURES_NV: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXCLUSIVE_SCISSOR_FEATURES_NV"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_2_FEATURES_EXT: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_2_FEATURES_EXT"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_FEATURES_EXT: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_FEATURES_EXT"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_BUFFER_INFO: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_BUFFER_INFO"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_FENCE_INFO: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_FENCE_INFO"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_IMAGE_FORMAT_INFO: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_IMAGE_FORMAT_INFO"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_MEMORY_HOST_PROPERTIES_EXT: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_MEMORY_HOST_PROPERTIES_EXT"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_MEMORY_RDMA_FEATURES_NV: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_MEMORY_RDMA_FEATURES_NV"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_SEMAPHORE_INFO: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_SEMAPHORE_INFO"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FLOAT_CONTROLS_PROPERTIES: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FLOAT_CONTROLS_PROPERTIES"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_2_FEATURES_EXT: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_2_FEATURES_EXT"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_2_PROPERTIES_EXT: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_2_PROPERTIES_EXT"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_FEATURES_EXT: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_FEATURES_EXT"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_PROPERTIES_EXT: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_PROPERTIES_EXT"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADER_BARYCENTRIC_FEATURES_NV: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADER_BARYCENTRIC_FEATURES_NV"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADER_INTERLOCK_FEATURES_EXT: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADER_INTERLOCK_FEATURES_EXT"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_ENUMS_FEATURES_NV: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_ENUMS_FEATURES_NV"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_ENUMS_PROPERTIES_NV: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_ENUMS_PROPERTIES_NV"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_FEATURES_KHR: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_FEATURES_KHR"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_KHR: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_KHR"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_PROPERTIES_KHR: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_PROPERTIES_KHR"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GLOBAL_PRIORITY_QUERY_FEATURES_EXT: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GLOBAL_PRIORITY_QUERY_FEATURES_EXT"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GROUP_PROPERTIES: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GROUP_PROPERTIES"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_QUERY_RESET_FEATURES: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_QUERY_RESET_FEATURES"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGELESS_FRAMEBUFFER_FEATURES: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGELESS_FRAMEBUFFER_FEATURES"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_DRM_FORMAT_MODIFIER_INFO_EXT: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_DRM_FORMAT_MODIFIER_INFO_EXT"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_ROBUSTNESS_FEATURES_EXT: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_ROBUSTNESS_FEATURES_EXT"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_VIEW_IMAGE_FORMAT_INFO_EXT: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_VIEW_IMAGE_FORMAT_INFO_EXT"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INDEX_TYPE_UINT8_FEATURES_EXT: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INDEX_TYPE_UINT8_FEATURES_EXT"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INHERITED_VIEWPORT_SCISSOR_FEATURES_NV: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INHERITED_VIEWPORT_SCISSOR_FEATURES_NV"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_FEATURES_EXT: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_FEATURES_EXT"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_PROPERTIES_EXT: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_PROPERTIES_EXT"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INVOCATION_MASK_FEATURES_HUAWEI: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INVOCATION_MASK_FEATURES_HUAWEI"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_FEATURES_EXT: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_FEATURES_EXT"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_PROPERTIES_EXT: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_PROPERTIES_EXT"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_3_PROPERTIES: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_3_PROPERTIES"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_BUDGET_PROPERTIES_EXT: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_BUDGET_PROPERTIES_EXT"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PRIORITY_FEATURES_EXT: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PRIORITY_FEATURES_EXT"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PROPERTIES_2: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PROPERTIES_2"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MESH_SHADER_FEATURES_NV: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MESH_SHADER_FEATURES_NV"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MESH_SHADER_PROPERTIES_NV: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MESH_SHADER_PROPERTIES_NV"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PER_VIEW_ATTRIBUTES_PROPERTIES_NVX: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PER_VIEW_ATTRIBUTES_PROPERTIES_NVX"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PROPERTIES: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PROPERTIES"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTI_DRAW_FEATURES_EXT: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTI_DRAW_FEATURES_EXT"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTI_DRAW_PROPERTIES_EXT: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTI_DRAW_PROPERTIES_EXT"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MUTABLE_DESCRIPTOR_TYPE_FEATURES_VALVE: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MUTABLE_DESCRIPTOR_TYPE_FEATURES_VALVE"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PCI_BUS_INFO_PROPERTIES_EXT: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PCI_BUS_INFO_PROPERTIES_EXT"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PERFORMANCE_QUERY_FEATURES_KHR: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PERFORMANCE_QUERY_FEATURES_KHR"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PERFORMANCE_QUERY_PROPERTIES_KHR: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PERFORMANCE_QUERY_PROPERTIES_KHR"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_CREATION_CACHE_CONTROL_FEATURES_EXT: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_CREATION_CACHE_CONTROL_FEATURES_EXT"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_EXECUTABLE_PROPERTIES_FEATURES_KHR: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_EXECUTABLE_PROPERTIES_FEATURES_KHR"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_POINT_CLIPPING_PROPERTIES: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_POINT_CLIPPING_PROPERTIES"; +#ifdef VK_ENABLE_BETA_EXTENSIONS + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PORTABILITY_SUBSET_FEATURES_KHR: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PORTABILITY_SUBSET_FEATURES_KHR"; +#endif // VK_ENABLE_BETA_EXTENSIONS +#ifdef VK_ENABLE_BETA_EXTENSIONS + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PORTABILITY_SUBSET_PROPERTIES_KHR: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PORTABILITY_SUBSET_PROPERTIES_KHR"; +#endif // VK_ENABLE_BETA_EXTENSIONS + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRESENT_ID_FEATURES_KHR: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRESENT_ID_FEATURES_KHR"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRESENT_WAIT_FEATURES_KHR: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRESENT_WAIT_FEATURES_KHR"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIVATE_DATA_FEATURES_EXT: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIVATE_DATA_FEATURES_EXT"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROTECTED_MEMORY_FEATURES: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROTECTED_MEMORY_FEATURES"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROTECTED_MEMORY_PROPERTIES: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROTECTED_MEMORY_PROPERTIES"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROVOKING_VERTEX_FEATURES_EXT: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROVOKING_VERTEX_FEATURES_EXT"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROVOKING_VERTEX_PROPERTIES_EXT: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROVOKING_VERTEX_PROPERTIES_EXT"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PUSH_DESCRIPTOR_PROPERTIES_KHR: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PUSH_DESCRIPTOR_PROPERTIES_KHR"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_QUERY_FEATURES_KHR: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_QUERY_FEATURES_KHR"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_MOTION_BLUR_FEATURES_NV: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_MOTION_BLUR_FEATURES_NV"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PIPELINE_FEATURES_KHR: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PIPELINE_FEATURES_KHR"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PIPELINE_PROPERTIES_KHR: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PIPELINE_PROPERTIES_KHR"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PROPERTIES_NV: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PROPERTIES_NV"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_REPRESENTATIVE_FRAGMENT_TEST_FEATURES_NV: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_REPRESENTATIVE_FRAGMENT_TEST_FEATURES_NV"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ROBUSTNESS_2_FEATURES_EXT: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ROBUSTNESS_2_FEATURES_EXT"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ROBUSTNESS_2_PROPERTIES_EXT: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ROBUSTNESS_2_PROPERTIES_EXT"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_FILTER_MINMAX_PROPERTIES: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_FILTER_MINMAX_PROPERTIES"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_YCBCR_CONVERSION_FEATURES: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_YCBCR_CONVERSION_FEATURES"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLE_LOCATIONS_PROPERTIES_EXT: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLE_LOCATIONS_PROPERTIES_EXT"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SCALAR_BLOCK_LAYOUT_FEATURES: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SCALAR_BLOCK_LAYOUT_FEATURES"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SEPARATE_DEPTH_STENCIL_LAYOUTS_FEATURES: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SEPARATE_DEPTH_STENCIL_LAYOUTS_FEATURES"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_FLOAT_2_FEATURES_EXT: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_FLOAT_2_FEATURES_EXT"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_FLOAT_FEATURES_EXT: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_FLOAT_FEATURES_EXT"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_INT64_FEATURES: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_INT64_FEATURES"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CLOCK_FEATURES_KHR: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CLOCK_FEATURES_KHR"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CORE_PROPERTIES_2_AMD: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CORE_PROPERTIES_2_AMD"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CORE_PROPERTIES_AMD: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CORE_PROPERTIES_AMD"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DEMOTE_TO_HELPER_INVOCATION_FEATURES_EXT: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DEMOTE_TO_HELPER_INVOCATION_FEATURES_EXT"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DRAW_PARAMETERS_FEATURES: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DRAW_PARAMETERS_FEATURES"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FLOAT16_INT8_FEATURES: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FLOAT16_INT8_FEATURES"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_IMAGE_ATOMIC_INT64_FEATURES_EXT: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_IMAGE_ATOMIC_INT64_FEATURES_EXT"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_IMAGE_FOOTPRINT_FEATURES_NV: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_IMAGE_FOOTPRINT_FEATURES_NV"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_INTEGER_FUNCTIONS_2_FEATURES_INTEL: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_INTEGER_FUNCTIONS_2_FEATURES_INTEL"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SM_BUILTINS_FEATURES_NV: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SM_BUILTINS_FEATURES_NV"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SM_BUILTINS_PROPERTIES_NV: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SM_BUILTINS_PROPERTIES_NV"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_EXTENDED_TYPES_FEATURES: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_EXTENDED_TYPES_FEATURES"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_UNIFORM_CONTROL_FLOW_FEATURES_KHR: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_UNIFORM_CONTROL_FLOW_FEATURES_KHR"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_TERMINATE_INVOCATION_FEATURES_KHR: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_TERMINATE_INVOCATION_FEATURES_KHR"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADING_RATE_IMAGE_FEATURES_NV: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADING_RATE_IMAGE_FEATURES_NV"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADING_RATE_IMAGE_PROPERTIES_NV: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADING_RATE_IMAGE_PROPERTIES_NV"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SPARSE_IMAGE_FORMAT_INFO_2: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SPARSE_IMAGE_FORMAT_INFO_2"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_PROPERTIES: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_PROPERTIES"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_FEATURES_EXT: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_FEATURES_EXT"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_PROPERTIES_EXT: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_PROPERTIES_EXT"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBPASS_SHADING_FEATURES_HUAWEI: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBPASS_SHADING_FEATURES_HUAWEI"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBPASS_SHADING_PROPERTIES_HUAWEI: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBPASS_SHADING_PROPERTIES_HUAWEI"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SURFACE_INFO_2_KHR: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SURFACE_INFO_2_KHR"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SYNCHRONIZATION_2_FEATURES_KHR: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SYNCHRONIZATION_2_FEATURES_KHR"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXEL_BUFFER_ALIGNMENT_FEATURES_EXT: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXEL_BUFFER_ALIGNMENT_FEATURES_EXT"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXEL_BUFFER_ALIGNMENT_PROPERTIES_EXT: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXEL_BUFFER_ALIGNMENT_PROPERTIES_EXT"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXTURE_COMPRESSION_ASTC_HDR_FEATURES_EXT: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXTURE_COMPRESSION_ASTC_HDR_FEATURES_EXT"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_FEATURES: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_FEATURES"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_PROPERTIES: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_PROPERTIES"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TOOL_PROPERTIES_EXT: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TOOL_PROPERTIES_EXT"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_FEATURES_EXT: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_FEATURES_EXT"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_PROPERTIES_EXT: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_PROPERTIES_EXT"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_UNIFORM_BUFFER_STANDARD_LAYOUT_FEATURES: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_UNIFORM_BUFFER_STANDARD_LAYOUT_FEATURES"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTERS_FEATURES: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTERS_FEATURES"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_FEATURES_EXT: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_FEATURES_EXT"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_PROPERTIES_EXT: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_PROPERTIES_EXT"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_INPUT_DYNAMIC_STATE_FEATURES_EXT: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_INPUT_DYNAMIC_STATE_FEATURES_EXT"; +#ifdef VK_ENABLE_BETA_EXTENSIONS + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VIDEO_FORMAT_INFO_KHR: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VIDEO_FORMAT_INFO_KHR"; +#endif // VK_ENABLE_BETA_EXTENSIONS + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_1_FEATURES: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_1_FEATURES"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_1_PROPERTIES: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_1_PROPERTIES"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_2_FEATURES: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_2_FEATURES"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_2_PROPERTIES: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_2_PROPERTIES"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_MEMORY_MODEL_FEATURES: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_MEMORY_MODEL_FEATURES"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_WORKGROUP_MEMORY_EXPLICIT_LAYOUT_FEATURES_KHR: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_WORKGROUP_MEMORY_EXPLICIT_LAYOUT_FEATURES_KHR"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_YCBCR_2_PLANE_444_FORMATS_FEATURES_EXT: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_YCBCR_2_PLANE_444_FORMATS_FEATURES_EXT"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_YCBCR_IMAGE_ARRAYS_FEATURES_EXT: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_YCBCR_IMAGE_ARRAYS_FEATURES_EXT"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ZERO_INITIALIZE_WORKGROUP_MEMORY_FEATURES_KHR: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ZERO_INITIALIZE_WORKGROUP_MEMORY_FEATURES_KHR"; + case VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO: + return "VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO"; + case VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_ADVANCED_STATE_CREATE_INFO_EXT: + return "VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_ADVANCED_STATE_CREATE_INFO_EXT"; + case VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO: + return "VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO"; + case VK_STRUCTURE_TYPE_PIPELINE_COLOR_WRITE_CREATE_INFO_EXT: + return "VK_STRUCTURE_TYPE_PIPELINE_COLOR_WRITE_CREATE_INFO_EXT"; + case VK_STRUCTURE_TYPE_PIPELINE_COMPILER_CONTROL_CREATE_INFO_AMD: + return "VK_STRUCTURE_TYPE_PIPELINE_COMPILER_CONTROL_CREATE_INFO_AMD"; + case VK_STRUCTURE_TYPE_PIPELINE_COVERAGE_MODULATION_STATE_CREATE_INFO_NV: + return "VK_STRUCTURE_TYPE_PIPELINE_COVERAGE_MODULATION_STATE_CREATE_INFO_NV"; + case VK_STRUCTURE_TYPE_PIPELINE_COVERAGE_REDUCTION_STATE_CREATE_INFO_NV: + return "VK_STRUCTURE_TYPE_PIPELINE_COVERAGE_REDUCTION_STATE_CREATE_INFO_NV"; + case VK_STRUCTURE_TYPE_PIPELINE_COVERAGE_TO_COLOR_STATE_CREATE_INFO_NV: + return "VK_STRUCTURE_TYPE_PIPELINE_COVERAGE_TO_COLOR_STATE_CREATE_INFO_NV"; + case VK_STRUCTURE_TYPE_PIPELINE_CREATION_FEEDBACK_CREATE_INFO_EXT: + return "VK_STRUCTURE_TYPE_PIPELINE_CREATION_FEEDBACK_CREATE_INFO_EXT"; + case VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO: + return "VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO"; + case VK_STRUCTURE_TYPE_PIPELINE_DISCARD_RECTANGLE_STATE_CREATE_INFO_EXT: + return "VK_STRUCTURE_TYPE_PIPELINE_DISCARD_RECTANGLE_STATE_CREATE_INFO_EXT"; + case VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO: + return "VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO"; + case VK_STRUCTURE_TYPE_PIPELINE_EXECUTABLE_INFO_KHR: + return "VK_STRUCTURE_TYPE_PIPELINE_EXECUTABLE_INFO_KHR"; + case VK_STRUCTURE_TYPE_PIPELINE_EXECUTABLE_INTERNAL_REPRESENTATION_KHR: + return "VK_STRUCTURE_TYPE_PIPELINE_EXECUTABLE_INTERNAL_REPRESENTATION_KHR"; + case VK_STRUCTURE_TYPE_PIPELINE_EXECUTABLE_PROPERTIES_KHR: + return "VK_STRUCTURE_TYPE_PIPELINE_EXECUTABLE_PROPERTIES_KHR"; + case VK_STRUCTURE_TYPE_PIPELINE_EXECUTABLE_STATISTIC_KHR: + return "VK_STRUCTURE_TYPE_PIPELINE_EXECUTABLE_STATISTIC_KHR"; + case VK_STRUCTURE_TYPE_PIPELINE_FRAGMENT_SHADING_RATE_ENUM_STATE_CREATE_INFO_NV: + return "VK_STRUCTURE_TYPE_PIPELINE_FRAGMENT_SHADING_RATE_ENUM_STATE_CREATE_INFO_NV"; + case VK_STRUCTURE_TYPE_PIPELINE_FRAGMENT_SHADING_RATE_STATE_CREATE_INFO_KHR: + return "VK_STRUCTURE_TYPE_PIPELINE_FRAGMENT_SHADING_RATE_STATE_CREATE_INFO_KHR"; + case VK_STRUCTURE_TYPE_PIPELINE_INFO_KHR: + return "VK_STRUCTURE_TYPE_PIPELINE_INFO_KHR"; + case VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO: + return "VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO"; + case VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO: + return "VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO"; + case VK_STRUCTURE_TYPE_PIPELINE_LIBRARY_CREATE_INFO_KHR: + return "VK_STRUCTURE_TYPE_PIPELINE_LIBRARY_CREATE_INFO_KHR"; + case VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO: + return "VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO"; + case VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_CONSERVATIVE_STATE_CREATE_INFO_EXT: + return "VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_CONSERVATIVE_STATE_CREATE_INFO_EXT"; + case VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_DEPTH_CLIP_STATE_CREATE_INFO_EXT: + return "VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_DEPTH_CLIP_STATE_CREATE_INFO_EXT"; + case VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_LINE_STATE_CREATE_INFO_EXT: + return "VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_LINE_STATE_CREATE_INFO_EXT"; + case VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_PROVOKING_VERTEX_STATE_CREATE_INFO_EXT: + return "VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_PROVOKING_VERTEX_STATE_CREATE_INFO_EXT"; + case VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO: + return "VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO"; + case VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_RASTERIZATION_ORDER_AMD: + return "VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_RASTERIZATION_ORDER_AMD"; + case VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_STREAM_CREATE_INFO_EXT: + return "VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_STREAM_CREATE_INFO_EXT"; + case VK_STRUCTURE_TYPE_PIPELINE_REPRESENTATIVE_FRAGMENT_TEST_STATE_CREATE_INFO_NV: + return "VK_STRUCTURE_TYPE_PIPELINE_REPRESENTATIVE_FRAGMENT_TEST_STATE_CREATE_INFO_NV"; + case VK_STRUCTURE_TYPE_PIPELINE_SAMPLE_LOCATIONS_STATE_CREATE_INFO_EXT: + return "VK_STRUCTURE_TYPE_PIPELINE_SAMPLE_LOCATIONS_STATE_CREATE_INFO_EXT"; + case VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO: + return "VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO"; + case VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_REQUIRED_SUBGROUP_SIZE_CREATE_INFO_EXT: + return "VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_REQUIRED_SUBGROUP_SIZE_CREATE_INFO_EXT"; + case VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_DOMAIN_ORIGIN_STATE_CREATE_INFO: + return "VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_DOMAIN_ORIGIN_STATE_CREATE_INFO"; + case VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO: + return "VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO"; + case VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_DIVISOR_STATE_CREATE_INFO_EXT: + return "VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_DIVISOR_STATE_CREATE_INFO_EXT"; + case VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO: + return "VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO"; + case VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_COARSE_SAMPLE_ORDER_STATE_CREATE_INFO_NV: + return "VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_COARSE_SAMPLE_ORDER_STATE_CREATE_INFO_NV"; + case VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_EXCLUSIVE_SCISSOR_STATE_CREATE_INFO_NV: + return "VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_EXCLUSIVE_SCISSOR_STATE_CREATE_INFO_NV"; + case VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_SHADING_RATE_IMAGE_STATE_CREATE_INFO_NV: + return "VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_SHADING_RATE_IMAGE_STATE_CREATE_INFO_NV"; + case VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO: + return "VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO"; + case VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_SWIZZLE_STATE_CREATE_INFO_NV: + return "VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_SWIZZLE_STATE_CREATE_INFO_NV"; + case VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_W_SCALING_STATE_CREATE_INFO_NV: + return "VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_W_SCALING_STATE_CREATE_INFO_NV"; + case VK_STRUCTURE_TYPE_PRESENT_FRAME_TOKEN_GGP: + return "VK_STRUCTURE_TYPE_PRESENT_FRAME_TOKEN_GGP"; + case VK_STRUCTURE_TYPE_PRESENT_ID_KHR: + return "VK_STRUCTURE_TYPE_PRESENT_ID_KHR"; + case VK_STRUCTURE_TYPE_PRESENT_INFO_KHR: + return "VK_STRUCTURE_TYPE_PRESENT_INFO_KHR"; + case VK_STRUCTURE_TYPE_PRESENT_REGIONS_KHR: + return "VK_STRUCTURE_TYPE_PRESENT_REGIONS_KHR"; + case VK_STRUCTURE_TYPE_PRESENT_TIMES_INFO_GOOGLE: + return "VK_STRUCTURE_TYPE_PRESENT_TIMES_INFO_GOOGLE"; + case VK_STRUCTURE_TYPE_PRIVATE_DATA_SLOT_CREATE_INFO_EXT: + return "VK_STRUCTURE_TYPE_PRIVATE_DATA_SLOT_CREATE_INFO_EXT"; + case VK_STRUCTURE_TYPE_PROTECTED_SUBMIT_INFO: + return "VK_STRUCTURE_TYPE_PROTECTED_SUBMIT_INFO"; + case VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO: + return "VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO"; + case VK_STRUCTURE_TYPE_QUERY_POOL_PERFORMANCE_CREATE_INFO_KHR: + return "VK_STRUCTURE_TYPE_QUERY_POOL_PERFORMANCE_CREATE_INFO_KHR"; + case VK_STRUCTURE_TYPE_QUERY_POOL_PERFORMANCE_QUERY_CREATE_INFO_INTEL: + return "VK_STRUCTURE_TYPE_QUERY_POOL_PERFORMANCE_QUERY_CREATE_INFO_INTEL"; + case VK_STRUCTURE_TYPE_QUEUE_FAMILY_CHECKPOINT_PROPERTIES_2_NV: + return "VK_STRUCTURE_TYPE_QUEUE_FAMILY_CHECKPOINT_PROPERTIES_2_NV"; + case VK_STRUCTURE_TYPE_QUEUE_FAMILY_CHECKPOINT_PROPERTIES_NV: + return "VK_STRUCTURE_TYPE_QUEUE_FAMILY_CHECKPOINT_PROPERTIES_NV"; + case VK_STRUCTURE_TYPE_QUEUE_FAMILY_GLOBAL_PRIORITY_PROPERTIES_EXT: + return "VK_STRUCTURE_TYPE_QUEUE_FAMILY_GLOBAL_PRIORITY_PROPERTIES_EXT"; + case VK_STRUCTURE_TYPE_QUEUE_FAMILY_PROPERTIES_2: + return "VK_STRUCTURE_TYPE_QUEUE_FAMILY_PROPERTIES_2"; + case VK_STRUCTURE_TYPE_RAY_TRACING_PIPELINE_CREATE_INFO_KHR: + return "VK_STRUCTURE_TYPE_RAY_TRACING_PIPELINE_CREATE_INFO_KHR"; + case VK_STRUCTURE_TYPE_RAY_TRACING_PIPELINE_CREATE_INFO_NV: + return "VK_STRUCTURE_TYPE_RAY_TRACING_PIPELINE_CREATE_INFO_NV"; + case VK_STRUCTURE_TYPE_RAY_TRACING_PIPELINE_INTERFACE_CREATE_INFO_KHR: + return "VK_STRUCTURE_TYPE_RAY_TRACING_PIPELINE_INTERFACE_CREATE_INFO_KHR"; + case VK_STRUCTURE_TYPE_RAY_TRACING_SHADER_GROUP_CREATE_INFO_KHR: + return "VK_STRUCTURE_TYPE_RAY_TRACING_SHADER_GROUP_CREATE_INFO_KHR"; + case VK_STRUCTURE_TYPE_RAY_TRACING_SHADER_GROUP_CREATE_INFO_NV: + return "VK_STRUCTURE_TYPE_RAY_TRACING_SHADER_GROUP_CREATE_INFO_NV"; + case VK_STRUCTURE_TYPE_RENDER_PASS_ATTACHMENT_BEGIN_INFO: + return "VK_STRUCTURE_TYPE_RENDER_PASS_ATTACHMENT_BEGIN_INFO"; + case VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO: + return "VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO"; + case VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO: + return "VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO"; + case VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO_2: + return "VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO_2"; + case VK_STRUCTURE_TYPE_RENDER_PASS_FRAGMENT_DENSITY_MAP_CREATE_INFO_EXT: + return "VK_STRUCTURE_TYPE_RENDER_PASS_FRAGMENT_DENSITY_MAP_CREATE_INFO_EXT"; + case VK_STRUCTURE_TYPE_RENDER_PASS_INPUT_ATTACHMENT_ASPECT_CREATE_INFO: + return "VK_STRUCTURE_TYPE_RENDER_PASS_INPUT_ATTACHMENT_ASPECT_CREATE_INFO"; + case VK_STRUCTURE_TYPE_RENDER_PASS_MULTIVIEW_CREATE_INFO: + return "VK_STRUCTURE_TYPE_RENDER_PASS_MULTIVIEW_CREATE_INFO"; + case VK_STRUCTURE_TYPE_RENDER_PASS_SAMPLE_LOCATIONS_BEGIN_INFO_EXT: + return "VK_STRUCTURE_TYPE_RENDER_PASS_SAMPLE_LOCATIONS_BEGIN_INFO_EXT"; + case VK_STRUCTURE_TYPE_RENDER_PASS_TRANSFORM_BEGIN_INFO_QCOM: + return "VK_STRUCTURE_TYPE_RENDER_PASS_TRANSFORM_BEGIN_INFO_QCOM"; + case VK_STRUCTURE_TYPE_RESOLVE_IMAGE_INFO_2_KHR: + return "VK_STRUCTURE_TYPE_RESOLVE_IMAGE_INFO_2_KHR"; + case VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO: + return "VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO"; + case VK_STRUCTURE_TYPE_SAMPLER_CUSTOM_BORDER_COLOR_CREATE_INFO_EXT: + return "VK_STRUCTURE_TYPE_SAMPLER_CUSTOM_BORDER_COLOR_CREATE_INFO_EXT"; + case VK_STRUCTURE_TYPE_SAMPLER_REDUCTION_MODE_CREATE_INFO: + return "VK_STRUCTURE_TYPE_SAMPLER_REDUCTION_MODE_CREATE_INFO"; + case VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_CREATE_INFO: + return "VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_CREATE_INFO"; + case VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_IMAGE_FORMAT_PROPERTIES: + return "VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_IMAGE_FORMAT_PROPERTIES"; + case VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_INFO: + return "VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_INFO"; + case VK_STRUCTURE_TYPE_SAMPLE_LOCATIONS_INFO_EXT: + return "VK_STRUCTURE_TYPE_SAMPLE_LOCATIONS_INFO_EXT"; + case VK_STRUCTURE_TYPE_SCREEN_SURFACE_CREATE_INFO_QNX: + return "VK_STRUCTURE_TYPE_SCREEN_SURFACE_CREATE_INFO_QNX"; + case VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO: + return "VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO"; + case VK_STRUCTURE_TYPE_SEMAPHORE_GET_FD_INFO_KHR: + return "VK_STRUCTURE_TYPE_SEMAPHORE_GET_FD_INFO_KHR"; + case VK_STRUCTURE_TYPE_SEMAPHORE_GET_WIN32_HANDLE_INFO_KHR: + return "VK_STRUCTURE_TYPE_SEMAPHORE_GET_WIN32_HANDLE_INFO_KHR"; + case VK_STRUCTURE_TYPE_SEMAPHORE_GET_ZIRCON_HANDLE_INFO_FUCHSIA: + return "VK_STRUCTURE_TYPE_SEMAPHORE_GET_ZIRCON_HANDLE_INFO_FUCHSIA"; + case VK_STRUCTURE_TYPE_SEMAPHORE_SIGNAL_INFO: + return "VK_STRUCTURE_TYPE_SEMAPHORE_SIGNAL_INFO"; + case VK_STRUCTURE_TYPE_SEMAPHORE_SUBMIT_INFO_KHR: + return "VK_STRUCTURE_TYPE_SEMAPHORE_SUBMIT_INFO_KHR"; + case VK_STRUCTURE_TYPE_SEMAPHORE_TYPE_CREATE_INFO: + return "VK_STRUCTURE_TYPE_SEMAPHORE_TYPE_CREATE_INFO"; + case VK_STRUCTURE_TYPE_SEMAPHORE_WAIT_INFO: + return "VK_STRUCTURE_TYPE_SEMAPHORE_WAIT_INFO"; + case VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO: + return "VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO"; + case VK_STRUCTURE_TYPE_SHADER_MODULE_VALIDATION_CACHE_CREATE_INFO_EXT: + return "VK_STRUCTURE_TYPE_SHADER_MODULE_VALIDATION_CACHE_CREATE_INFO_EXT"; + case VK_STRUCTURE_TYPE_SHARED_PRESENT_SURFACE_CAPABILITIES_KHR: + return "VK_STRUCTURE_TYPE_SHARED_PRESENT_SURFACE_CAPABILITIES_KHR"; + case VK_STRUCTURE_TYPE_SPARSE_IMAGE_FORMAT_PROPERTIES_2: + return "VK_STRUCTURE_TYPE_SPARSE_IMAGE_FORMAT_PROPERTIES_2"; + case VK_STRUCTURE_TYPE_SPARSE_IMAGE_MEMORY_REQUIREMENTS_2: + return "VK_STRUCTURE_TYPE_SPARSE_IMAGE_MEMORY_REQUIREMENTS_2"; + case VK_STRUCTURE_TYPE_STREAM_DESCRIPTOR_SURFACE_CREATE_INFO_GGP: + return "VK_STRUCTURE_TYPE_STREAM_DESCRIPTOR_SURFACE_CREATE_INFO_GGP"; + case VK_STRUCTURE_TYPE_SUBMIT_INFO: + return "VK_STRUCTURE_TYPE_SUBMIT_INFO"; + case VK_STRUCTURE_TYPE_SUBMIT_INFO_2_KHR: + return "VK_STRUCTURE_TYPE_SUBMIT_INFO_2_KHR"; + case VK_STRUCTURE_TYPE_SUBPASS_BEGIN_INFO: + return "VK_STRUCTURE_TYPE_SUBPASS_BEGIN_INFO"; + case VK_STRUCTURE_TYPE_SUBPASS_DEPENDENCY_2: + return "VK_STRUCTURE_TYPE_SUBPASS_DEPENDENCY_2"; + case VK_STRUCTURE_TYPE_SUBPASS_DESCRIPTION_2: + return "VK_STRUCTURE_TYPE_SUBPASS_DESCRIPTION_2"; + case VK_STRUCTURE_TYPE_SUBPASS_DESCRIPTION_DEPTH_STENCIL_RESOLVE: + return "VK_STRUCTURE_TYPE_SUBPASS_DESCRIPTION_DEPTH_STENCIL_RESOLVE"; + case VK_STRUCTURE_TYPE_SUBPASS_END_INFO: + return "VK_STRUCTURE_TYPE_SUBPASS_END_INFO"; + case VK_STRUCTURE_TYPE_SUBPASS_SHADING_PIPELINE_CREATE_INFO_HUAWEI: + return "VK_STRUCTURE_TYPE_SUBPASS_SHADING_PIPELINE_CREATE_INFO_HUAWEI"; + case VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_2_EXT: + return "VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_2_EXT"; + case VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_2_KHR: + return "VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_2_KHR"; + case VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_FULL_SCREEN_EXCLUSIVE_EXT: + return "VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_FULL_SCREEN_EXCLUSIVE_EXT"; + case VK_STRUCTURE_TYPE_SURFACE_FORMAT_2_KHR: + return "VK_STRUCTURE_TYPE_SURFACE_FORMAT_2_KHR"; + case VK_STRUCTURE_TYPE_SURFACE_FULL_SCREEN_EXCLUSIVE_INFO_EXT: + return "VK_STRUCTURE_TYPE_SURFACE_FULL_SCREEN_EXCLUSIVE_INFO_EXT"; + case VK_STRUCTURE_TYPE_SURFACE_FULL_SCREEN_EXCLUSIVE_WIN32_INFO_EXT: + return "VK_STRUCTURE_TYPE_SURFACE_FULL_SCREEN_EXCLUSIVE_WIN32_INFO_EXT"; + case VK_STRUCTURE_TYPE_SURFACE_PROTECTED_CAPABILITIES_KHR: + return "VK_STRUCTURE_TYPE_SURFACE_PROTECTED_CAPABILITIES_KHR"; + case VK_STRUCTURE_TYPE_SWAPCHAIN_COUNTER_CREATE_INFO_EXT: + return "VK_STRUCTURE_TYPE_SWAPCHAIN_COUNTER_CREATE_INFO_EXT"; + case VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR: + return "VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR"; + case VK_STRUCTURE_TYPE_SWAPCHAIN_DISPLAY_NATIVE_HDR_CREATE_INFO_AMD: + return "VK_STRUCTURE_TYPE_SWAPCHAIN_DISPLAY_NATIVE_HDR_CREATE_INFO_AMD"; + case VK_STRUCTURE_TYPE_TEXTURE_LOD_GATHER_FORMAT_PROPERTIES_AMD: + return "VK_STRUCTURE_TYPE_TEXTURE_LOD_GATHER_FORMAT_PROPERTIES_AMD"; + case VK_STRUCTURE_TYPE_TIMELINE_SEMAPHORE_SUBMIT_INFO: + return "VK_STRUCTURE_TYPE_TIMELINE_SEMAPHORE_SUBMIT_INFO"; + case VK_STRUCTURE_TYPE_VALIDATION_CACHE_CREATE_INFO_EXT: + return "VK_STRUCTURE_TYPE_VALIDATION_CACHE_CREATE_INFO_EXT"; + case VK_STRUCTURE_TYPE_VALIDATION_FEATURES_EXT: + return "VK_STRUCTURE_TYPE_VALIDATION_FEATURES_EXT"; + case VK_STRUCTURE_TYPE_VALIDATION_FLAGS_EXT: + return "VK_STRUCTURE_TYPE_VALIDATION_FLAGS_EXT"; + case VK_STRUCTURE_TYPE_VERTEX_INPUT_ATTRIBUTE_DESCRIPTION_2_EXT: + return "VK_STRUCTURE_TYPE_VERTEX_INPUT_ATTRIBUTE_DESCRIPTION_2_EXT"; + case VK_STRUCTURE_TYPE_VERTEX_INPUT_BINDING_DESCRIPTION_2_EXT: + return "VK_STRUCTURE_TYPE_VERTEX_INPUT_BINDING_DESCRIPTION_2_EXT"; +#ifdef VK_ENABLE_BETA_EXTENSIONS + case VK_STRUCTURE_TYPE_VIDEO_BEGIN_CODING_INFO_KHR: + return "VK_STRUCTURE_TYPE_VIDEO_BEGIN_CODING_INFO_KHR"; +#endif // VK_ENABLE_BETA_EXTENSIONS +#ifdef VK_ENABLE_BETA_EXTENSIONS + case VK_STRUCTURE_TYPE_VIDEO_BIND_MEMORY_KHR: + return "VK_STRUCTURE_TYPE_VIDEO_BIND_MEMORY_KHR"; +#endif // VK_ENABLE_BETA_EXTENSIONS +#ifdef VK_ENABLE_BETA_EXTENSIONS + case VK_STRUCTURE_TYPE_VIDEO_CAPABILITIES_KHR: + return "VK_STRUCTURE_TYPE_VIDEO_CAPABILITIES_KHR"; +#endif // VK_ENABLE_BETA_EXTENSIONS +#ifdef VK_ENABLE_BETA_EXTENSIONS + case VK_STRUCTURE_TYPE_VIDEO_CODING_CONTROL_INFO_KHR: + return "VK_STRUCTURE_TYPE_VIDEO_CODING_CONTROL_INFO_KHR"; +#endif // VK_ENABLE_BETA_EXTENSIONS +#ifdef VK_ENABLE_BETA_EXTENSIONS + case VK_STRUCTURE_TYPE_VIDEO_DECODE_H264_CAPABILITIES_EXT: + return "VK_STRUCTURE_TYPE_VIDEO_DECODE_H264_CAPABILITIES_EXT"; +#endif // VK_ENABLE_BETA_EXTENSIONS +#ifdef VK_ENABLE_BETA_EXTENSIONS + case VK_STRUCTURE_TYPE_VIDEO_DECODE_H264_DPB_SLOT_INFO_EXT: + return "VK_STRUCTURE_TYPE_VIDEO_DECODE_H264_DPB_SLOT_INFO_EXT"; +#endif // VK_ENABLE_BETA_EXTENSIONS +#ifdef VK_ENABLE_BETA_EXTENSIONS + case VK_STRUCTURE_TYPE_VIDEO_DECODE_H264_MVC_EXT: + return "VK_STRUCTURE_TYPE_VIDEO_DECODE_H264_MVC_EXT"; +#endif // VK_ENABLE_BETA_EXTENSIONS +#ifdef VK_ENABLE_BETA_EXTENSIONS + case VK_STRUCTURE_TYPE_VIDEO_DECODE_H264_PICTURE_INFO_EXT: + return "VK_STRUCTURE_TYPE_VIDEO_DECODE_H264_PICTURE_INFO_EXT"; +#endif // VK_ENABLE_BETA_EXTENSIONS +#ifdef VK_ENABLE_BETA_EXTENSIONS + case VK_STRUCTURE_TYPE_VIDEO_DECODE_H264_PROFILE_EXT: + return "VK_STRUCTURE_TYPE_VIDEO_DECODE_H264_PROFILE_EXT"; +#endif // VK_ENABLE_BETA_EXTENSIONS +#ifdef VK_ENABLE_BETA_EXTENSIONS + case VK_STRUCTURE_TYPE_VIDEO_DECODE_H264_SESSION_CREATE_INFO_EXT: + return "VK_STRUCTURE_TYPE_VIDEO_DECODE_H264_SESSION_CREATE_INFO_EXT"; +#endif // VK_ENABLE_BETA_EXTENSIONS +#ifdef VK_ENABLE_BETA_EXTENSIONS + case VK_STRUCTURE_TYPE_VIDEO_DECODE_H264_SESSION_PARAMETERS_ADD_INFO_EXT: + return "VK_STRUCTURE_TYPE_VIDEO_DECODE_H264_SESSION_PARAMETERS_ADD_INFO_EXT"; +#endif // VK_ENABLE_BETA_EXTENSIONS +#ifdef VK_ENABLE_BETA_EXTENSIONS + case VK_STRUCTURE_TYPE_VIDEO_DECODE_H264_SESSION_PARAMETERS_CREATE_INFO_EXT: + return "VK_STRUCTURE_TYPE_VIDEO_DECODE_H264_SESSION_PARAMETERS_CREATE_INFO_EXT"; +#endif // VK_ENABLE_BETA_EXTENSIONS +#ifdef VK_ENABLE_BETA_EXTENSIONS + case VK_STRUCTURE_TYPE_VIDEO_DECODE_H265_CAPABILITIES_EXT: + return "VK_STRUCTURE_TYPE_VIDEO_DECODE_H265_CAPABILITIES_EXT"; +#endif // VK_ENABLE_BETA_EXTENSIONS +#ifdef VK_ENABLE_BETA_EXTENSIONS + case VK_STRUCTURE_TYPE_VIDEO_DECODE_H265_DPB_SLOT_INFO_EXT: + return "VK_STRUCTURE_TYPE_VIDEO_DECODE_H265_DPB_SLOT_INFO_EXT"; +#endif // VK_ENABLE_BETA_EXTENSIONS +#ifdef VK_ENABLE_BETA_EXTENSIONS + case VK_STRUCTURE_TYPE_VIDEO_DECODE_H265_PICTURE_INFO_EXT: + return "VK_STRUCTURE_TYPE_VIDEO_DECODE_H265_PICTURE_INFO_EXT"; +#endif // VK_ENABLE_BETA_EXTENSIONS +#ifdef VK_ENABLE_BETA_EXTENSIONS + case VK_STRUCTURE_TYPE_VIDEO_DECODE_H265_PROFILE_EXT: + return "VK_STRUCTURE_TYPE_VIDEO_DECODE_H265_PROFILE_EXT"; +#endif // VK_ENABLE_BETA_EXTENSIONS +#ifdef VK_ENABLE_BETA_EXTENSIONS + case VK_STRUCTURE_TYPE_VIDEO_DECODE_H265_SESSION_CREATE_INFO_EXT: + return "VK_STRUCTURE_TYPE_VIDEO_DECODE_H265_SESSION_CREATE_INFO_EXT"; +#endif // VK_ENABLE_BETA_EXTENSIONS +#ifdef VK_ENABLE_BETA_EXTENSIONS + case VK_STRUCTURE_TYPE_VIDEO_DECODE_H265_SESSION_PARAMETERS_ADD_INFO_EXT: + return "VK_STRUCTURE_TYPE_VIDEO_DECODE_H265_SESSION_PARAMETERS_ADD_INFO_EXT"; +#endif // VK_ENABLE_BETA_EXTENSIONS +#ifdef VK_ENABLE_BETA_EXTENSIONS + case VK_STRUCTURE_TYPE_VIDEO_DECODE_H265_SESSION_PARAMETERS_CREATE_INFO_EXT: + return "VK_STRUCTURE_TYPE_VIDEO_DECODE_H265_SESSION_PARAMETERS_CREATE_INFO_EXT"; +#endif // VK_ENABLE_BETA_EXTENSIONS +#ifdef VK_ENABLE_BETA_EXTENSIONS + case VK_STRUCTURE_TYPE_VIDEO_DECODE_INFO_KHR: + return "VK_STRUCTURE_TYPE_VIDEO_DECODE_INFO_KHR"; +#endif // VK_ENABLE_BETA_EXTENSIONS +#ifdef VK_ENABLE_BETA_EXTENSIONS + case VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_CAPABILITIES_EXT: + return "VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_CAPABILITIES_EXT"; +#endif // VK_ENABLE_BETA_EXTENSIONS +#ifdef VK_ENABLE_BETA_EXTENSIONS + case VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_DPB_SLOT_INFO_EXT: + return "VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_DPB_SLOT_INFO_EXT"; +#endif // VK_ENABLE_BETA_EXTENSIONS +#ifdef VK_ENABLE_BETA_EXTENSIONS + case VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_EMIT_PICTURE_PARAMETERS_EXT: + return "VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_EMIT_PICTURE_PARAMETERS_EXT"; +#endif // VK_ENABLE_BETA_EXTENSIONS +#ifdef VK_ENABLE_BETA_EXTENSIONS + case VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_NALU_SLICE_EXT: + return "VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_NALU_SLICE_EXT"; +#endif // VK_ENABLE_BETA_EXTENSIONS +#ifdef VK_ENABLE_BETA_EXTENSIONS + case VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_PROFILE_EXT: + return "VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_PROFILE_EXT"; +#endif // VK_ENABLE_BETA_EXTENSIONS +#ifdef VK_ENABLE_BETA_EXTENSIONS + case VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_SESSION_CREATE_INFO_EXT: + return "VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_SESSION_CREATE_INFO_EXT"; +#endif // VK_ENABLE_BETA_EXTENSIONS +#ifdef VK_ENABLE_BETA_EXTENSIONS + case VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_SESSION_PARAMETERS_ADD_INFO_EXT: + return "VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_SESSION_PARAMETERS_ADD_INFO_EXT"; +#endif // VK_ENABLE_BETA_EXTENSIONS +#ifdef VK_ENABLE_BETA_EXTENSIONS + case VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_SESSION_PARAMETERS_CREATE_INFO_EXT: + return "VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_SESSION_PARAMETERS_CREATE_INFO_EXT"; +#endif // VK_ENABLE_BETA_EXTENSIONS +#ifdef VK_ENABLE_BETA_EXTENSIONS + case VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_VCL_FRAME_INFO_EXT: + return "VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_VCL_FRAME_INFO_EXT"; +#endif // VK_ENABLE_BETA_EXTENSIONS +#ifdef VK_ENABLE_BETA_EXTENSIONS + case VK_STRUCTURE_TYPE_VIDEO_ENCODE_INFO_KHR: + return "VK_STRUCTURE_TYPE_VIDEO_ENCODE_INFO_KHR"; +#endif // VK_ENABLE_BETA_EXTENSIONS +#ifdef VK_ENABLE_BETA_EXTENSIONS + case VK_STRUCTURE_TYPE_VIDEO_ENCODE_RATE_CONTROL_INFO_KHR: + return "VK_STRUCTURE_TYPE_VIDEO_ENCODE_RATE_CONTROL_INFO_KHR"; +#endif // VK_ENABLE_BETA_EXTENSIONS +#ifdef VK_ENABLE_BETA_EXTENSIONS + case VK_STRUCTURE_TYPE_VIDEO_END_CODING_INFO_KHR: + return "VK_STRUCTURE_TYPE_VIDEO_END_CODING_INFO_KHR"; +#endif // VK_ENABLE_BETA_EXTENSIONS +#ifdef VK_ENABLE_BETA_EXTENSIONS + case VK_STRUCTURE_TYPE_VIDEO_FORMAT_PROPERTIES_KHR: + return "VK_STRUCTURE_TYPE_VIDEO_FORMAT_PROPERTIES_KHR"; +#endif // VK_ENABLE_BETA_EXTENSIONS +#ifdef VK_ENABLE_BETA_EXTENSIONS + case VK_STRUCTURE_TYPE_VIDEO_GET_MEMORY_PROPERTIES_KHR: + return "VK_STRUCTURE_TYPE_VIDEO_GET_MEMORY_PROPERTIES_KHR"; +#endif // VK_ENABLE_BETA_EXTENSIONS +#ifdef VK_ENABLE_BETA_EXTENSIONS + case VK_STRUCTURE_TYPE_VIDEO_PICTURE_RESOURCE_KHR: + return "VK_STRUCTURE_TYPE_VIDEO_PICTURE_RESOURCE_KHR"; +#endif // VK_ENABLE_BETA_EXTENSIONS +#ifdef VK_ENABLE_BETA_EXTENSIONS + case VK_STRUCTURE_TYPE_VIDEO_PROFILES_KHR: + return "VK_STRUCTURE_TYPE_VIDEO_PROFILES_KHR"; +#endif // VK_ENABLE_BETA_EXTENSIONS +#ifdef VK_ENABLE_BETA_EXTENSIONS + case VK_STRUCTURE_TYPE_VIDEO_PROFILE_KHR: + return "VK_STRUCTURE_TYPE_VIDEO_PROFILE_KHR"; +#endif // VK_ENABLE_BETA_EXTENSIONS +#ifdef VK_ENABLE_BETA_EXTENSIONS + case VK_STRUCTURE_TYPE_VIDEO_QUEUE_FAMILY_PROPERTIES_2_KHR: + return "VK_STRUCTURE_TYPE_VIDEO_QUEUE_FAMILY_PROPERTIES_2_KHR"; +#endif // VK_ENABLE_BETA_EXTENSIONS +#ifdef VK_ENABLE_BETA_EXTENSIONS + case VK_STRUCTURE_TYPE_VIDEO_REFERENCE_SLOT_KHR: + return "VK_STRUCTURE_TYPE_VIDEO_REFERENCE_SLOT_KHR"; +#endif // VK_ENABLE_BETA_EXTENSIONS +#ifdef VK_ENABLE_BETA_EXTENSIONS + case VK_STRUCTURE_TYPE_VIDEO_SESSION_CREATE_INFO_KHR: + return "VK_STRUCTURE_TYPE_VIDEO_SESSION_CREATE_INFO_KHR"; +#endif // VK_ENABLE_BETA_EXTENSIONS +#ifdef VK_ENABLE_BETA_EXTENSIONS + case VK_STRUCTURE_TYPE_VIDEO_SESSION_PARAMETERS_CREATE_INFO_KHR: + return "VK_STRUCTURE_TYPE_VIDEO_SESSION_PARAMETERS_CREATE_INFO_KHR"; +#endif // VK_ENABLE_BETA_EXTENSIONS +#ifdef VK_ENABLE_BETA_EXTENSIONS + case VK_STRUCTURE_TYPE_VIDEO_SESSION_PARAMETERS_UPDATE_INFO_KHR: + return "VK_STRUCTURE_TYPE_VIDEO_SESSION_PARAMETERS_UPDATE_INFO_KHR"; +#endif // VK_ENABLE_BETA_EXTENSIONS + case VK_STRUCTURE_TYPE_VI_SURFACE_CREATE_INFO_NN: + return "VK_STRUCTURE_TYPE_VI_SURFACE_CREATE_INFO_NN"; + case VK_STRUCTURE_TYPE_WAYLAND_SURFACE_CREATE_INFO_KHR: + return "VK_STRUCTURE_TYPE_WAYLAND_SURFACE_CREATE_INFO_KHR"; + case VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_KHR: + return "VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_KHR"; + case VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_NV: + return "VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_NV"; + case VK_STRUCTURE_TYPE_WIN32_SURFACE_CREATE_INFO_KHR: + return "VK_STRUCTURE_TYPE_WIN32_SURFACE_CREATE_INFO_KHR"; + case VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET: + return "VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET"; + case VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_ACCELERATION_STRUCTURE_KHR: + return "VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_ACCELERATION_STRUCTURE_KHR"; + case VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_ACCELERATION_STRUCTURE_NV: + return "VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_ACCELERATION_STRUCTURE_NV"; + case VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_INLINE_UNIFORM_BLOCK_EXT: + return "VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_INLINE_UNIFORM_BLOCK_EXT"; + case VK_STRUCTURE_TYPE_XCB_SURFACE_CREATE_INFO_KHR: + return "VK_STRUCTURE_TYPE_XCB_SURFACE_CREATE_INFO_KHR"; + case VK_STRUCTURE_TYPE_XLIB_SURFACE_CREATE_INFO_KHR: + return "VK_STRUCTURE_TYPE_XLIB_SURFACE_CREATE_INFO_KHR"; + default: + return "Unhandled VkStructureType"; + } +} + +static inline const char* string_VkAccessFlagBits(VkAccessFlagBits input_value) +{ + switch (input_value) + { + case VK_ACCESS_ACCELERATION_STRUCTURE_READ_BIT_KHR: + return "VK_ACCESS_ACCELERATION_STRUCTURE_READ_BIT_KHR"; + case VK_ACCESS_ACCELERATION_STRUCTURE_WRITE_BIT_KHR: + return "VK_ACCESS_ACCELERATION_STRUCTURE_WRITE_BIT_KHR"; + case VK_ACCESS_COLOR_ATTACHMENT_READ_BIT: + return "VK_ACCESS_COLOR_ATTACHMENT_READ_BIT"; + case VK_ACCESS_COLOR_ATTACHMENT_READ_NONCOHERENT_BIT_EXT: + return "VK_ACCESS_COLOR_ATTACHMENT_READ_NONCOHERENT_BIT_EXT"; + case VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT: + return "VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT"; + case VK_ACCESS_COMMAND_PREPROCESS_READ_BIT_NV: + return "VK_ACCESS_COMMAND_PREPROCESS_READ_BIT_NV"; + case VK_ACCESS_COMMAND_PREPROCESS_WRITE_BIT_NV: + return "VK_ACCESS_COMMAND_PREPROCESS_WRITE_BIT_NV"; + case VK_ACCESS_CONDITIONAL_RENDERING_READ_BIT_EXT: + return "VK_ACCESS_CONDITIONAL_RENDERING_READ_BIT_EXT"; + case VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BIT: + return "VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BIT"; + case VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT: + return "VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT"; + case VK_ACCESS_FRAGMENT_DENSITY_MAP_READ_BIT_EXT: + return "VK_ACCESS_FRAGMENT_DENSITY_MAP_READ_BIT_EXT"; + case VK_ACCESS_FRAGMENT_SHADING_RATE_ATTACHMENT_READ_BIT_KHR: + return "VK_ACCESS_FRAGMENT_SHADING_RATE_ATTACHMENT_READ_BIT_KHR"; + case VK_ACCESS_HOST_READ_BIT: + return "VK_ACCESS_HOST_READ_BIT"; + case VK_ACCESS_HOST_WRITE_BIT: + return "VK_ACCESS_HOST_WRITE_BIT"; + case VK_ACCESS_INDEX_READ_BIT: + return "VK_ACCESS_INDEX_READ_BIT"; + case VK_ACCESS_INDIRECT_COMMAND_READ_BIT: + return "VK_ACCESS_INDIRECT_COMMAND_READ_BIT"; + case VK_ACCESS_INPUT_ATTACHMENT_READ_BIT: + return "VK_ACCESS_INPUT_ATTACHMENT_READ_BIT"; + case VK_ACCESS_MEMORY_READ_BIT: + return "VK_ACCESS_MEMORY_READ_BIT"; + case VK_ACCESS_MEMORY_WRITE_BIT: + return "VK_ACCESS_MEMORY_WRITE_BIT"; + case VK_ACCESS_NONE_KHR: + return "VK_ACCESS_NONE_KHR"; + case VK_ACCESS_SHADER_READ_BIT: + return "VK_ACCESS_SHADER_READ_BIT"; + case VK_ACCESS_SHADER_WRITE_BIT: + return "VK_ACCESS_SHADER_WRITE_BIT"; + case VK_ACCESS_TRANSFER_READ_BIT: + return "VK_ACCESS_TRANSFER_READ_BIT"; + case VK_ACCESS_TRANSFER_WRITE_BIT: + return "VK_ACCESS_TRANSFER_WRITE_BIT"; + case VK_ACCESS_TRANSFORM_FEEDBACK_COUNTER_READ_BIT_EXT: + return "VK_ACCESS_TRANSFORM_FEEDBACK_COUNTER_READ_BIT_EXT"; + case VK_ACCESS_TRANSFORM_FEEDBACK_COUNTER_WRITE_BIT_EXT: + return "VK_ACCESS_TRANSFORM_FEEDBACK_COUNTER_WRITE_BIT_EXT"; + case VK_ACCESS_TRANSFORM_FEEDBACK_WRITE_BIT_EXT: + return "VK_ACCESS_TRANSFORM_FEEDBACK_WRITE_BIT_EXT"; + case VK_ACCESS_UNIFORM_READ_BIT: + return "VK_ACCESS_UNIFORM_READ_BIT"; + case VK_ACCESS_VERTEX_ATTRIBUTE_READ_BIT: + return "VK_ACCESS_VERTEX_ATTRIBUTE_READ_BIT"; + default: + return "Unhandled VkAccessFlagBits"; + } +} + +static inline std::string string_VkAccessFlags(VkAccessFlags input_value) +{ + std::string ret; + int index = 0; + while(input_value) { + if (input_value & 1) { + if( !ret.empty()) ret.append("|"); + ret.append(string_VkAccessFlagBits(static_cast(1U << index))); + } + ++index; + input_value >>= 1; + } + if( ret.empty()) ret.append(string_VkAccessFlagBits(static_cast(0))); + return ret; +} + +static inline const char* string_VkImageLayout(VkImageLayout input_value) +{ + switch (input_value) + { + case VK_IMAGE_LAYOUT_ATTACHMENT_OPTIMAL_KHR: + return "VK_IMAGE_LAYOUT_ATTACHMENT_OPTIMAL_KHR"; + case VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL: + return "VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL"; + case VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL: + return "VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL"; + case VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL: + return "VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL"; + case VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL: + return "VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL"; + case VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL: + return "VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL"; + case VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL: + return "VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL"; + case VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL: + return "VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL"; + case VK_IMAGE_LAYOUT_FRAGMENT_DENSITY_MAP_OPTIMAL_EXT: + return "VK_IMAGE_LAYOUT_FRAGMENT_DENSITY_MAP_OPTIMAL_EXT"; + case VK_IMAGE_LAYOUT_FRAGMENT_SHADING_RATE_ATTACHMENT_OPTIMAL_KHR: + return "VK_IMAGE_LAYOUT_FRAGMENT_SHADING_RATE_ATTACHMENT_OPTIMAL_KHR"; + case VK_IMAGE_LAYOUT_GENERAL: + return "VK_IMAGE_LAYOUT_GENERAL"; + case VK_IMAGE_LAYOUT_PREINITIALIZED: + return "VK_IMAGE_LAYOUT_PREINITIALIZED"; + case VK_IMAGE_LAYOUT_PRESENT_SRC_KHR: + return "VK_IMAGE_LAYOUT_PRESENT_SRC_KHR"; + case VK_IMAGE_LAYOUT_READ_ONLY_OPTIMAL_KHR: + return "VK_IMAGE_LAYOUT_READ_ONLY_OPTIMAL_KHR"; + case VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL: + return "VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL"; + case VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR: + return "VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR"; + case VK_IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL: + return "VK_IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL"; + case VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL: + return "VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL"; + case VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL: + return "VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL"; + case VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL: + return "VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL"; + case VK_IMAGE_LAYOUT_UNDEFINED: + return "VK_IMAGE_LAYOUT_UNDEFINED"; +#ifdef VK_ENABLE_BETA_EXTENSIONS + case VK_IMAGE_LAYOUT_VIDEO_DECODE_DPB_KHR: + return "VK_IMAGE_LAYOUT_VIDEO_DECODE_DPB_KHR"; +#endif // VK_ENABLE_BETA_EXTENSIONS +#ifdef VK_ENABLE_BETA_EXTENSIONS + case VK_IMAGE_LAYOUT_VIDEO_DECODE_DST_KHR: + return "VK_IMAGE_LAYOUT_VIDEO_DECODE_DST_KHR"; +#endif // VK_ENABLE_BETA_EXTENSIONS +#ifdef VK_ENABLE_BETA_EXTENSIONS + case VK_IMAGE_LAYOUT_VIDEO_DECODE_SRC_KHR: + return "VK_IMAGE_LAYOUT_VIDEO_DECODE_SRC_KHR"; +#endif // VK_ENABLE_BETA_EXTENSIONS +#ifdef VK_ENABLE_BETA_EXTENSIONS + case VK_IMAGE_LAYOUT_VIDEO_ENCODE_DPB_KHR: + return "VK_IMAGE_LAYOUT_VIDEO_ENCODE_DPB_KHR"; +#endif // VK_ENABLE_BETA_EXTENSIONS +#ifdef VK_ENABLE_BETA_EXTENSIONS + case VK_IMAGE_LAYOUT_VIDEO_ENCODE_DST_KHR: + return "VK_IMAGE_LAYOUT_VIDEO_ENCODE_DST_KHR"; +#endif // VK_ENABLE_BETA_EXTENSIONS +#ifdef VK_ENABLE_BETA_EXTENSIONS + case VK_IMAGE_LAYOUT_VIDEO_ENCODE_SRC_KHR: + return "VK_IMAGE_LAYOUT_VIDEO_ENCODE_SRC_KHR"; +#endif // VK_ENABLE_BETA_EXTENSIONS + default: + return "Unhandled VkImageLayout"; + } +} + +static inline const char* string_VkImageAspectFlagBits(VkImageAspectFlagBits input_value) +{ + switch (input_value) + { + case VK_IMAGE_ASPECT_COLOR_BIT: + return "VK_IMAGE_ASPECT_COLOR_BIT"; + case VK_IMAGE_ASPECT_DEPTH_BIT: + return "VK_IMAGE_ASPECT_DEPTH_BIT"; + case VK_IMAGE_ASPECT_MEMORY_PLANE_0_BIT_EXT: + return "VK_IMAGE_ASPECT_MEMORY_PLANE_0_BIT_EXT"; + case VK_IMAGE_ASPECT_MEMORY_PLANE_1_BIT_EXT: + return "VK_IMAGE_ASPECT_MEMORY_PLANE_1_BIT_EXT"; + case VK_IMAGE_ASPECT_MEMORY_PLANE_2_BIT_EXT: + return "VK_IMAGE_ASPECT_MEMORY_PLANE_2_BIT_EXT"; + case VK_IMAGE_ASPECT_MEMORY_PLANE_3_BIT_EXT: + return "VK_IMAGE_ASPECT_MEMORY_PLANE_3_BIT_EXT"; + case VK_IMAGE_ASPECT_METADATA_BIT: + return "VK_IMAGE_ASPECT_METADATA_BIT"; + case VK_IMAGE_ASPECT_PLANE_0_BIT: + return "VK_IMAGE_ASPECT_PLANE_0_BIT"; + case VK_IMAGE_ASPECT_PLANE_1_BIT: + return "VK_IMAGE_ASPECT_PLANE_1_BIT"; + case VK_IMAGE_ASPECT_PLANE_2_BIT: + return "VK_IMAGE_ASPECT_PLANE_2_BIT"; + case VK_IMAGE_ASPECT_STENCIL_BIT: + return "VK_IMAGE_ASPECT_STENCIL_BIT"; + default: + return "Unhandled VkImageAspectFlagBits"; + } +} + +static inline std::string string_VkImageAspectFlags(VkImageAspectFlags input_value) +{ + std::string ret; + int index = 0; + while(input_value) { + if (input_value & 1) { + if( !ret.empty()) ret.append("|"); + ret.append(string_VkImageAspectFlagBits(static_cast(1U << index))); + } + ++index; + input_value >>= 1; + } + if( ret.empty()) ret.append(string_VkImageAspectFlagBits(static_cast(0))); + return ret; +} + +static inline const char* string_VkObjectType(VkObjectType input_value) +{ + switch (input_value) + { + case VK_OBJECT_TYPE_ACCELERATION_STRUCTURE_KHR: + return "VK_OBJECT_TYPE_ACCELERATION_STRUCTURE_KHR"; + case VK_OBJECT_TYPE_ACCELERATION_STRUCTURE_NV: + return "VK_OBJECT_TYPE_ACCELERATION_STRUCTURE_NV"; + case VK_OBJECT_TYPE_BUFFER: + return "VK_OBJECT_TYPE_BUFFER"; + case VK_OBJECT_TYPE_BUFFER_VIEW: + return "VK_OBJECT_TYPE_BUFFER_VIEW"; + case VK_OBJECT_TYPE_COMMAND_BUFFER: + return "VK_OBJECT_TYPE_COMMAND_BUFFER"; + case VK_OBJECT_TYPE_COMMAND_POOL: + return "VK_OBJECT_TYPE_COMMAND_POOL"; + case VK_OBJECT_TYPE_CU_FUNCTION_NVX: + return "VK_OBJECT_TYPE_CU_FUNCTION_NVX"; + case VK_OBJECT_TYPE_CU_MODULE_NVX: + return "VK_OBJECT_TYPE_CU_MODULE_NVX"; + case VK_OBJECT_TYPE_DEBUG_REPORT_CALLBACK_EXT: + return "VK_OBJECT_TYPE_DEBUG_REPORT_CALLBACK_EXT"; + case VK_OBJECT_TYPE_DEBUG_UTILS_MESSENGER_EXT: + return "VK_OBJECT_TYPE_DEBUG_UTILS_MESSENGER_EXT"; + case VK_OBJECT_TYPE_DEFERRED_OPERATION_KHR: + return "VK_OBJECT_TYPE_DEFERRED_OPERATION_KHR"; + case VK_OBJECT_TYPE_DESCRIPTOR_POOL: + return "VK_OBJECT_TYPE_DESCRIPTOR_POOL"; + case VK_OBJECT_TYPE_DESCRIPTOR_SET: + return "VK_OBJECT_TYPE_DESCRIPTOR_SET"; + case VK_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT: + return "VK_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT"; + case VK_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE: + return "VK_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE"; + case VK_OBJECT_TYPE_DEVICE: + return "VK_OBJECT_TYPE_DEVICE"; + case VK_OBJECT_TYPE_DEVICE_MEMORY: + return "VK_OBJECT_TYPE_DEVICE_MEMORY"; + case VK_OBJECT_TYPE_DISPLAY_KHR: + return "VK_OBJECT_TYPE_DISPLAY_KHR"; + case VK_OBJECT_TYPE_DISPLAY_MODE_KHR: + return "VK_OBJECT_TYPE_DISPLAY_MODE_KHR"; + case VK_OBJECT_TYPE_EVENT: + return "VK_OBJECT_TYPE_EVENT"; + case VK_OBJECT_TYPE_FENCE: + return "VK_OBJECT_TYPE_FENCE"; + case VK_OBJECT_TYPE_FRAMEBUFFER: + return "VK_OBJECT_TYPE_FRAMEBUFFER"; + case VK_OBJECT_TYPE_IMAGE: + return "VK_OBJECT_TYPE_IMAGE"; + case VK_OBJECT_TYPE_IMAGE_VIEW: + return "VK_OBJECT_TYPE_IMAGE_VIEW"; + case VK_OBJECT_TYPE_INDIRECT_COMMANDS_LAYOUT_NV: + return "VK_OBJECT_TYPE_INDIRECT_COMMANDS_LAYOUT_NV"; + case VK_OBJECT_TYPE_INSTANCE: + return "VK_OBJECT_TYPE_INSTANCE"; + case VK_OBJECT_TYPE_PERFORMANCE_CONFIGURATION_INTEL: + return "VK_OBJECT_TYPE_PERFORMANCE_CONFIGURATION_INTEL"; + case VK_OBJECT_TYPE_PHYSICAL_DEVICE: + return "VK_OBJECT_TYPE_PHYSICAL_DEVICE"; + case VK_OBJECT_TYPE_PIPELINE: + return "VK_OBJECT_TYPE_PIPELINE"; + case VK_OBJECT_TYPE_PIPELINE_CACHE: + return "VK_OBJECT_TYPE_PIPELINE_CACHE"; + case VK_OBJECT_TYPE_PIPELINE_LAYOUT: + return "VK_OBJECT_TYPE_PIPELINE_LAYOUT"; + case VK_OBJECT_TYPE_PRIVATE_DATA_SLOT_EXT: + return "VK_OBJECT_TYPE_PRIVATE_DATA_SLOT_EXT"; + case VK_OBJECT_TYPE_QUERY_POOL: + return "VK_OBJECT_TYPE_QUERY_POOL"; + case VK_OBJECT_TYPE_QUEUE: + return "VK_OBJECT_TYPE_QUEUE"; + case VK_OBJECT_TYPE_RENDER_PASS: + return "VK_OBJECT_TYPE_RENDER_PASS"; + case VK_OBJECT_TYPE_SAMPLER: + return "VK_OBJECT_TYPE_SAMPLER"; + case VK_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION: + return "VK_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION"; + case VK_OBJECT_TYPE_SEMAPHORE: + return "VK_OBJECT_TYPE_SEMAPHORE"; + case VK_OBJECT_TYPE_SHADER_MODULE: + return "VK_OBJECT_TYPE_SHADER_MODULE"; + case VK_OBJECT_TYPE_SURFACE_KHR: + return "VK_OBJECT_TYPE_SURFACE_KHR"; + case VK_OBJECT_TYPE_SWAPCHAIN_KHR: + return "VK_OBJECT_TYPE_SWAPCHAIN_KHR"; + case VK_OBJECT_TYPE_UNKNOWN: + return "VK_OBJECT_TYPE_UNKNOWN"; + case VK_OBJECT_TYPE_VALIDATION_CACHE_EXT: + return "VK_OBJECT_TYPE_VALIDATION_CACHE_EXT"; +#ifdef VK_ENABLE_BETA_EXTENSIONS + case VK_OBJECT_TYPE_VIDEO_SESSION_KHR: + return "VK_OBJECT_TYPE_VIDEO_SESSION_KHR"; +#endif // VK_ENABLE_BETA_EXTENSIONS +#ifdef VK_ENABLE_BETA_EXTENSIONS + case VK_OBJECT_TYPE_VIDEO_SESSION_PARAMETERS_KHR: + return "VK_OBJECT_TYPE_VIDEO_SESSION_PARAMETERS_KHR"; +#endif // VK_ENABLE_BETA_EXTENSIONS + default: + return "Unhandled VkObjectType"; + } +} + +static inline const char* string_VkPipelineCacheHeaderVersion(VkPipelineCacheHeaderVersion input_value) +{ + switch (input_value) + { + case VK_PIPELINE_CACHE_HEADER_VERSION_ONE: + return "VK_PIPELINE_CACHE_HEADER_VERSION_ONE"; + default: + return "Unhandled VkPipelineCacheHeaderVersion"; + } +} + +static inline const char* string_VkVendorId(VkVendorId input_value) +{ + switch (input_value) + { + case VK_VENDOR_ID_CODEPLAY: + return "VK_VENDOR_ID_CODEPLAY"; + case VK_VENDOR_ID_KAZAN: + return "VK_VENDOR_ID_KAZAN"; + case VK_VENDOR_ID_MESA: + return "VK_VENDOR_ID_MESA"; + case VK_VENDOR_ID_POCL: + return "VK_VENDOR_ID_POCL"; + case VK_VENDOR_ID_VIV: + return "VK_VENDOR_ID_VIV"; + case VK_VENDOR_ID_VSI: + return "VK_VENDOR_ID_VSI"; + default: + return "Unhandled VkVendorId"; + } +} + +static inline const char* string_VkSystemAllocationScope(VkSystemAllocationScope input_value) +{ + switch (input_value) + { + case VK_SYSTEM_ALLOCATION_SCOPE_CACHE: + return "VK_SYSTEM_ALLOCATION_SCOPE_CACHE"; + case VK_SYSTEM_ALLOCATION_SCOPE_COMMAND: + return "VK_SYSTEM_ALLOCATION_SCOPE_COMMAND"; + case VK_SYSTEM_ALLOCATION_SCOPE_DEVICE: + return "VK_SYSTEM_ALLOCATION_SCOPE_DEVICE"; + case VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE: + return "VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE"; + case VK_SYSTEM_ALLOCATION_SCOPE_OBJECT: + return "VK_SYSTEM_ALLOCATION_SCOPE_OBJECT"; + default: + return "Unhandled VkSystemAllocationScope"; + } +} + +static inline const char* string_VkInternalAllocationType(VkInternalAllocationType input_value) +{ + switch (input_value) + { + case VK_INTERNAL_ALLOCATION_TYPE_EXECUTABLE: + return "VK_INTERNAL_ALLOCATION_TYPE_EXECUTABLE"; + default: + return "Unhandled VkInternalAllocationType"; + } +} + +static inline const char* string_VkFormat(VkFormat input_value) +{ + switch (input_value) + { + case VK_FORMAT_A1R5G5B5_UNORM_PACK16: + return "VK_FORMAT_A1R5G5B5_UNORM_PACK16"; + case VK_FORMAT_A2B10G10R10_SINT_PACK32: + return "VK_FORMAT_A2B10G10R10_SINT_PACK32"; + case VK_FORMAT_A2B10G10R10_SNORM_PACK32: + return "VK_FORMAT_A2B10G10R10_SNORM_PACK32"; + case VK_FORMAT_A2B10G10R10_SSCALED_PACK32: + return "VK_FORMAT_A2B10G10R10_SSCALED_PACK32"; + case VK_FORMAT_A2B10G10R10_UINT_PACK32: + return "VK_FORMAT_A2B10G10R10_UINT_PACK32"; + case VK_FORMAT_A2B10G10R10_UNORM_PACK32: + return "VK_FORMAT_A2B10G10R10_UNORM_PACK32"; + case VK_FORMAT_A2B10G10R10_USCALED_PACK32: + return "VK_FORMAT_A2B10G10R10_USCALED_PACK32"; + case VK_FORMAT_A2R10G10B10_SINT_PACK32: + return "VK_FORMAT_A2R10G10B10_SINT_PACK32"; + case VK_FORMAT_A2R10G10B10_SNORM_PACK32: + return "VK_FORMAT_A2R10G10B10_SNORM_PACK32"; + case VK_FORMAT_A2R10G10B10_SSCALED_PACK32: + return "VK_FORMAT_A2R10G10B10_SSCALED_PACK32"; + case VK_FORMAT_A2R10G10B10_UINT_PACK32: + return "VK_FORMAT_A2R10G10B10_UINT_PACK32"; + case VK_FORMAT_A2R10G10B10_UNORM_PACK32: + return "VK_FORMAT_A2R10G10B10_UNORM_PACK32"; + case VK_FORMAT_A2R10G10B10_USCALED_PACK32: + return "VK_FORMAT_A2R10G10B10_USCALED_PACK32"; + case VK_FORMAT_A4B4G4R4_UNORM_PACK16_EXT: + return "VK_FORMAT_A4B4G4R4_UNORM_PACK16_EXT"; + case VK_FORMAT_A4R4G4B4_UNORM_PACK16_EXT: + return "VK_FORMAT_A4R4G4B4_UNORM_PACK16_EXT"; + case VK_FORMAT_A8B8G8R8_SINT_PACK32: + return "VK_FORMAT_A8B8G8R8_SINT_PACK32"; + case VK_FORMAT_A8B8G8R8_SNORM_PACK32: + return "VK_FORMAT_A8B8G8R8_SNORM_PACK32"; + case VK_FORMAT_A8B8G8R8_SRGB_PACK32: + return "VK_FORMAT_A8B8G8R8_SRGB_PACK32"; + case VK_FORMAT_A8B8G8R8_SSCALED_PACK32: + return "VK_FORMAT_A8B8G8R8_SSCALED_PACK32"; + case VK_FORMAT_A8B8G8R8_UINT_PACK32: + return "VK_FORMAT_A8B8G8R8_UINT_PACK32"; + case VK_FORMAT_A8B8G8R8_UNORM_PACK32: + return "VK_FORMAT_A8B8G8R8_UNORM_PACK32"; + case VK_FORMAT_A8B8G8R8_USCALED_PACK32: + return "VK_FORMAT_A8B8G8R8_USCALED_PACK32"; + case VK_FORMAT_ASTC_10x10_SFLOAT_BLOCK_EXT: + return "VK_FORMAT_ASTC_10x10_SFLOAT_BLOCK_EXT"; + case VK_FORMAT_ASTC_10x10_SRGB_BLOCK: + return "VK_FORMAT_ASTC_10x10_SRGB_BLOCK"; + case VK_FORMAT_ASTC_10x10_UNORM_BLOCK: + return "VK_FORMAT_ASTC_10x10_UNORM_BLOCK"; + case VK_FORMAT_ASTC_10x5_SFLOAT_BLOCK_EXT: + return "VK_FORMAT_ASTC_10x5_SFLOAT_BLOCK_EXT"; + case VK_FORMAT_ASTC_10x5_SRGB_BLOCK: + return "VK_FORMAT_ASTC_10x5_SRGB_BLOCK"; + case VK_FORMAT_ASTC_10x5_UNORM_BLOCK: + return "VK_FORMAT_ASTC_10x5_UNORM_BLOCK"; + case VK_FORMAT_ASTC_10x6_SFLOAT_BLOCK_EXT: + return "VK_FORMAT_ASTC_10x6_SFLOAT_BLOCK_EXT"; + case VK_FORMAT_ASTC_10x6_SRGB_BLOCK: + return "VK_FORMAT_ASTC_10x6_SRGB_BLOCK"; + case VK_FORMAT_ASTC_10x6_UNORM_BLOCK: + return "VK_FORMAT_ASTC_10x6_UNORM_BLOCK"; + case VK_FORMAT_ASTC_10x8_SFLOAT_BLOCK_EXT: + return "VK_FORMAT_ASTC_10x8_SFLOAT_BLOCK_EXT"; + case VK_FORMAT_ASTC_10x8_SRGB_BLOCK: + return "VK_FORMAT_ASTC_10x8_SRGB_BLOCK"; + case VK_FORMAT_ASTC_10x8_UNORM_BLOCK: + return "VK_FORMAT_ASTC_10x8_UNORM_BLOCK"; + case VK_FORMAT_ASTC_12x10_SFLOAT_BLOCK_EXT: + return "VK_FORMAT_ASTC_12x10_SFLOAT_BLOCK_EXT"; + case VK_FORMAT_ASTC_12x10_SRGB_BLOCK: + return "VK_FORMAT_ASTC_12x10_SRGB_BLOCK"; + case VK_FORMAT_ASTC_12x10_UNORM_BLOCK: + return "VK_FORMAT_ASTC_12x10_UNORM_BLOCK"; + case VK_FORMAT_ASTC_12x12_SFLOAT_BLOCK_EXT: + return "VK_FORMAT_ASTC_12x12_SFLOAT_BLOCK_EXT"; + case VK_FORMAT_ASTC_12x12_SRGB_BLOCK: + return "VK_FORMAT_ASTC_12x12_SRGB_BLOCK"; + case VK_FORMAT_ASTC_12x12_UNORM_BLOCK: + return "VK_FORMAT_ASTC_12x12_UNORM_BLOCK"; + case VK_FORMAT_ASTC_4x4_SFLOAT_BLOCK_EXT: + return "VK_FORMAT_ASTC_4x4_SFLOAT_BLOCK_EXT"; + case VK_FORMAT_ASTC_4x4_SRGB_BLOCK: + return "VK_FORMAT_ASTC_4x4_SRGB_BLOCK"; + case VK_FORMAT_ASTC_4x4_UNORM_BLOCK: + return "VK_FORMAT_ASTC_4x4_UNORM_BLOCK"; + case VK_FORMAT_ASTC_5x4_SFLOAT_BLOCK_EXT: + return "VK_FORMAT_ASTC_5x4_SFLOAT_BLOCK_EXT"; + case VK_FORMAT_ASTC_5x4_SRGB_BLOCK: + return "VK_FORMAT_ASTC_5x4_SRGB_BLOCK"; + case VK_FORMAT_ASTC_5x4_UNORM_BLOCK: + return "VK_FORMAT_ASTC_5x4_UNORM_BLOCK"; + case VK_FORMAT_ASTC_5x5_SFLOAT_BLOCK_EXT: + return "VK_FORMAT_ASTC_5x5_SFLOAT_BLOCK_EXT"; + case VK_FORMAT_ASTC_5x5_SRGB_BLOCK: + return "VK_FORMAT_ASTC_5x5_SRGB_BLOCK"; + case VK_FORMAT_ASTC_5x5_UNORM_BLOCK: + return "VK_FORMAT_ASTC_5x5_UNORM_BLOCK"; + case VK_FORMAT_ASTC_6x5_SFLOAT_BLOCK_EXT: + return "VK_FORMAT_ASTC_6x5_SFLOAT_BLOCK_EXT"; + case VK_FORMAT_ASTC_6x5_SRGB_BLOCK: + return "VK_FORMAT_ASTC_6x5_SRGB_BLOCK"; + case VK_FORMAT_ASTC_6x5_UNORM_BLOCK: + return "VK_FORMAT_ASTC_6x5_UNORM_BLOCK"; + case VK_FORMAT_ASTC_6x6_SFLOAT_BLOCK_EXT: + return "VK_FORMAT_ASTC_6x6_SFLOAT_BLOCK_EXT"; + case VK_FORMAT_ASTC_6x6_SRGB_BLOCK: + return "VK_FORMAT_ASTC_6x6_SRGB_BLOCK"; + case VK_FORMAT_ASTC_6x6_UNORM_BLOCK: + return "VK_FORMAT_ASTC_6x6_UNORM_BLOCK"; + case VK_FORMAT_ASTC_8x5_SFLOAT_BLOCK_EXT: + return "VK_FORMAT_ASTC_8x5_SFLOAT_BLOCK_EXT"; + case VK_FORMAT_ASTC_8x5_SRGB_BLOCK: + return "VK_FORMAT_ASTC_8x5_SRGB_BLOCK"; + case VK_FORMAT_ASTC_8x5_UNORM_BLOCK: + return "VK_FORMAT_ASTC_8x5_UNORM_BLOCK"; + case VK_FORMAT_ASTC_8x6_SFLOAT_BLOCK_EXT: + return "VK_FORMAT_ASTC_8x6_SFLOAT_BLOCK_EXT"; + case VK_FORMAT_ASTC_8x6_SRGB_BLOCK: + return "VK_FORMAT_ASTC_8x6_SRGB_BLOCK"; + case VK_FORMAT_ASTC_8x6_UNORM_BLOCK: + return "VK_FORMAT_ASTC_8x6_UNORM_BLOCK"; + case VK_FORMAT_ASTC_8x8_SFLOAT_BLOCK_EXT: + return "VK_FORMAT_ASTC_8x8_SFLOAT_BLOCK_EXT"; + case VK_FORMAT_ASTC_8x8_SRGB_BLOCK: + return "VK_FORMAT_ASTC_8x8_SRGB_BLOCK"; + case VK_FORMAT_ASTC_8x8_UNORM_BLOCK: + return "VK_FORMAT_ASTC_8x8_UNORM_BLOCK"; + case VK_FORMAT_B10G11R11_UFLOAT_PACK32: + return "VK_FORMAT_B10G11R11_UFLOAT_PACK32"; + case VK_FORMAT_B10X6G10X6R10X6G10X6_422_UNORM_4PACK16: + return "VK_FORMAT_B10X6G10X6R10X6G10X6_422_UNORM_4PACK16"; + case VK_FORMAT_B12X4G12X4R12X4G12X4_422_UNORM_4PACK16: + return "VK_FORMAT_B12X4G12X4R12X4G12X4_422_UNORM_4PACK16"; + case VK_FORMAT_B16G16R16G16_422_UNORM: + return "VK_FORMAT_B16G16R16G16_422_UNORM"; + case VK_FORMAT_B4G4R4A4_UNORM_PACK16: + return "VK_FORMAT_B4G4R4A4_UNORM_PACK16"; + case VK_FORMAT_B5G5R5A1_UNORM_PACK16: + return "VK_FORMAT_B5G5R5A1_UNORM_PACK16"; + case VK_FORMAT_B5G6R5_UNORM_PACK16: + return "VK_FORMAT_B5G6R5_UNORM_PACK16"; + case VK_FORMAT_B8G8R8A8_SINT: + return "VK_FORMAT_B8G8R8A8_SINT"; + case VK_FORMAT_B8G8R8A8_SNORM: + return "VK_FORMAT_B8G8R8A8_SNORM"; + case VK_FORMAT_B8G8R8A8_SRGB: + return "VK_FORMAT_B8G8R8A8_SRGB"; + case VK_FORMAT_B8G8R8A8_SSCALED: + return "VK_FORMAT_B8G8R8A8_SSCALED"; + case VK_FORMAT_B8G8R8A8_UINT: + return "VK_FORMAT_B8G8R8A8_UINT"; + case VK_FORMAT_B8G8R8A8_UNORM: + return "VK_FORMAT_B8G8R8A8_UNORM"; + case VK_FORMAT_B8G8R8A8_USCALED: + return "VK_FORMAT_B8G8R8A8_USCALED"; + case VK_FORMAT_B8G8R8G8_422_UNORM: + return "VK_FORMAT_B8G8R8G8_422_UNORM"; + case VK_FORMAT_B8G8R8_SINT: + return "VK_FORMAT_B8G8R8_SINT"; + case VK_FORMAT_B8G8R8_SNORM: + return "VK_FORMAT_B8G8R8_SNORM"; + case VK_FORMAT_B8G8R8_SRGB: + return "VK_FORMAT_B8G8R8_SRGB"; + case VK_FORMAT_B8G8R8_SSCALED: + return "VK_FORMAT_B8G8R8_SSCALED"; + case VK_FORMAT_B8G8R8_UINT: + return "VK_FORMAT_B8G8R8_UINT"; + case VK_FORMAT_B8G8R8_UNORM: + return "VK_FORMAT_B8G8R8_UNORM"; + case VK_FORMAT_B8G8R8_USCALED: + return "VK_FORMAT_B8G8R8_USCALED"; + case VK_FORMAT_BC1_RGBA_SRGB_BLOCK: + return "VK_FORMAT_BC1_RGBA_SRGB_BLOCK"; + case VK_FORMAT_BC1_RGBA_UNORM_BLOCK: + return "VK_FORMAT_BC1_RGBA_UNORM_BLOCK"; + case VK_FORMAT_BC1_RGB_SRGB_BLOCK: + return "VK_FORMAT_BC1_RGB_SRGB_BLOCK"; + case VK_FORMAT_BC1_RGB_UNORM_BLOCK: + return "VK_FORMAT_BC1_RGB_UNORM_BLOCK"; + case VK_FORMAT_BC2_SRGB_BLOCK: + return "VK_FORMAT_BC2_SRGB_BLOCK"; + case VK_FORMAT_BC2_UNORM_BLOCK: + return "VK_FORMAT_BC2_UNORM_BLOCK"; + case VK_FORMAT_BC3_SRGB_BLOCK: + return "VK_FORMAT_BC3_SRGB_BLOCK"; + case VK_FORMAT_BC3_UNORM_BLOCK: + return "VK_FORMAT_BC3_UNORM_BLOCK"; + case VK_FORMAT_BC4_SNORM_BLOCK: + return "VK_FORMAT_BC4_SNORM_BLOCK"; + case VK_FORMAT_BC4_UNORM_BLOCK: + return "VK_FORMAT_BC4_UNORM_BLOCK"; + case VK_FORMAT_BC5_SNORM_BLOCK: + return "VK_FORMAT_BC5_SNORM_BLOCK"; + case VK_FORMAT_BC5_UNORM_BLOCK: + return "VK_FORMAT_BC5_UNORM_BLOCK"; + case VK_FORMAT_BC6H_SFLOAT_BLOCK: + return "VK_FORMAT_BC6H_SFLOAT_BLOCK"; + case VK_FORMAT_BC6H_UFLOAT_BLOCK: + return "VK_FORMAT_BC6H_UFLOAT_BLOCK"; + case VK_FORMAT_BC7_SRGB_BLOCK: + return "VK_FORMAT_BC7_SRGB_BLOCK"; + case VK_FORMAT_BC7_UNORM_BLOCK: + return "VK_FORMAT_BC7_UNORM_BLOCK"; + case VK_FORMAT_D16_UNORM: + return "VK_FORMAT_D16_UNORM"; + case VK_FORMAT_D16_UNORM_S8_UINT: + return "VK_FORMAT_D16_UNORM_S8_UINT"; + case VK_FORMAT_D24_UNORM_S8_UINT: + return "VK_FORMAT_D24_UNORM_S8_UINT"; + case VK_FORMAT_D32_SFLOAT: + return "VK_FORMAT_D32_SFLOAT"; + case VK_FORMAT_D32_SFLOAT_S8_UINT: + return "VK_FORMAT_D32_SFLOAT_S8_UINT"; + case VK_FORMAT_E5B9G9R9_UFLOAT_PACK32: + return "VK_FORMAT_E5B9G9R9_UFLOAT_PACK32"; + case VK_FORMAT_EAC_R11G11_SNORM_BLOCK: + return "VK_FORMAT_EAC_R11G11_SNORM_BLOCK"; + case VK_FORMAT_EAC_R11G11_UNORM_BLOCK: + return "VK_FORMAT_EAC_R11G11_UNORM_BLOCK"; + case VK_FORMAT_EAC_R11_SNORM_BLOCK: + return "VK_FORMAT_EAC_R11_SNORM_BLOCK"; + case VK_FORMAT_EAC_R11_UNORM_BLOCK: + return "VK_FORMAT_EAC_R11_UNORM_BLOCK"; + case VK_FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK: + return "VK_FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK"; + case VK_FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK: + return "VK_FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK"; + case VK_FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK: + return "VK_FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK"; + case VK_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK: + return "VK_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK"; + case VK_FORMAT_ETC2_R8G8B8_SRGB_BLOCK: + return "VK_FORMAT_ETC2_R8G8B8_SRGB_BLOCK"; + case VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK: + return "VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK"; + case VK_FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16: + return "VK_FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16"; + case VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16: + return "VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16"; + case VK_FORMAT_G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16: + return "VK_FORMAT_G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16"; + case VK_FORMAT_G10X6_B10X6R10X6_2PLANE_444_UNORM_3PACK16_EXT: + return "VK_FORMAT_G10X6_B10X6R10X6_2PLANE_444_UNORM_3PACK16_EXT"; + case VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16: + return "VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16"; + case VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16: + return "VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16"; + case VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16: + return "VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16"; + case VK_FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16: + return "VK_FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16"; + case VK_FORMAT_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16: + return "VK_FORMAT_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16"; + case VK_FORMAT_G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16: + return "VK_FORMAT_G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16"; + case VK_FORMAT_G12X4_B12X4R12X4_2PLANE_444_UNORM_3PACK16_EXT: + return "VK_FORMAT_G12X4_B12X4R12X4_2PLANE_444_UNORM_3PACK16_EXT"; + case VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16: + return "VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16"; + case VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16: + return "VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16"; + case VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16: + return "VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16"; + case VK_FORMAT_G16B16G16R16_422_UNORM: + return "VK_FORMAT_G16B16G16R16_422_UNORM"; + case VK_FORMAT_G16_B16R16_2PLANE_420_UNORM: + return "VK_FORMAT_G16_B16R16_2PLANE_420_UNORM"; + case VK_FORMAT_G16_B16R16_2PLANE_422_UNORM: + return "VK_FORMAT_G16_B16R16_2PLANE_422_UNORM"; + case VK_FORMAT_G16_B16R16_2PLANE_444_UNORM_EXT: + return "VK_FORMAT_G16_B16R16_2PLANE_444_UNORM_EXT"; + case VK_FORMAT_G16_B16_R16_3PLANE_420_UNORM: + return "VK_FORMAT_G16_B16_R16_3PLANE_420_UNORM"; + case VK_FORMAT_G16_B16_R16_3PLANE_422_UNORM: + return "VK_FORMAT_G16_B16_R16_3PLANE_422_UNORM"; + case VK_FORMAT_G16_B16_R16_3PLANE_444_UNORM: + return "VK_FORMAT_G16_B16_R16_3PLANE_444_UNORM"; + case VK_FORMAT_G8B8G8R8_422_UNORM: + return "VK_FORMAT_G8B8G8R8_422_UNORM"; + case VK_FORMAT_G8_B8R8_2PLANE_420_UNORM: + return "VK_FORMAT_G8_B8R8_2PLANE_420_UNORM"; + case VK_FORMAT_G8_B8R8_2PLANE_422_UNORM: + return "VK_FORMAT_G8_B8R8_2PLANE_422_UNORM"; + case VK_FORMAT_G8_B8R8_2PLANE_444_UNORM_EXT: + return "VK_FORMAT_G8_B8R8_2PLANE_444_UNORM_EXT"; + case VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM: + return "VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM"; + case VK_FORMAT_G8_B8_R8_3PLANE_422_UNORM: + return "VK_FORMAT_G8_B8_R8_3PLANE_422_UNORM"; + case VK_FORMAT_G8_B8_R8_3PLANE_444_UNORM: + return "VK_FORMAT_G8_B8_R8_3PLANE_444_UNORM"; + case VK_FORMAT_PVRTC1_2BPP_SRGB_BLOCK_IMG: + return "VK_FORMAT_PVRTC1_2BPP_SRGB_BLOCK_IMG"; + case VK_FORMAT_PVRTC1_2BPP_UNORM_BLOCK_IMG: + return "VK_FORMAT_PVRTC1_2BPP_UNORM_BLOCK_IMG"; + case VK_FORMAT_PVRTC1_4BPP_SRGB_BLOCK_IMG: + return "VK_FORMAT_PVRTC1_4BPP_SRGB_BLOCK_IMG"; + case VK_FORMAT_PVRTC1_4BPP_UNORM_BLOCK_IMG: + return "VK_FORMAT_PVRTC1_4BPP_UNORM_BLOCK_IMG"; + case VK_FORMAT_PVRTC2_2BPP_SRGB_BLOCK_IMG: + return "VK_FORMAT_PVRTC2_2BPP_SRGB_BLOCK_IMG"; + case VK_FORMAT_PVRTC2_2BPP_UNORM_BLOCK_IMG: + return "VK_FORMAT_PVRTC2_2BPP_UNORM_BLOCK_IMG"; + case VK_FORMAT_PVRTC2_4BPP_SRGB_BLOCK_IMG: + return "VK_FORMAT_PVRTC2_4BPP_SRGB_BLOCK_IMG"; + case VK_FORMAT_PVRTC2_4BPP_UNORM_BLOCK_IMG: + return "VK_FORMAT_PVRTC2_4BPP_UNORM_BLOCK_IMG"; + case VK_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16: + return "VK_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16"; + case VK_FORMAT_R10X6G10X6_UNORM_2PACK16: + return "VK_FORMAT_R10X6G10X6_UNORM_2PACK16"; + case VK_FORMAT_R10X6_UNORM_PACK16: + return "VK_FORMAT_R10X6_UNORM_PACK16"; + case VK_FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16: + return "VK_FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16"; + case VK_FORMAT_R12X4G12X4_UNORM_2PACK16: + return "VK_FORMAT_R12X4G12X4_UNORM_2PACK16"; + case VK_FORMAT_R12X4_UNORM_PACK16: + return "VK_FORMAT_R12X4_UNORM_PACK16"; + case VK_FORMAT_R16G16B16A16_SFLOAT: + return "VK_FORMAT_R16G16B16A16_SFLOAT"; + case VK_FORMAT_R16G16B16A16_SINT: + return "VK_FORMAT_R16G16B16A16_SINT"; + case VK_FORMAT_R16G16B16A16_SNORM: + return "VK_FORMAT_R16G16B16A16_SNORM"; + case VK_FORMAT_R16G16B16A16_SSCALED: + return "VK_FORMAT_R16G16B16A16_SSCALED"; + case VK_FORMAT_R16G16B16A16_UINT: + return "VK_FORMAT_R16G16B16A16_UINT"; + case VK_FORMAT_R16G16B16A16_UNORM: + return "VK_FORMAT_R16G16B16A16_UNORM"; + case VK_FORMAT_R16G16B16A16_USCALED: + return "VK_FORMAT_R16G16B16A16_USCALED"; + case VK_FORMAT_R16G16B16_SFLOAT: + return "VK_FORMAT_R16G16B16_SFLOAT"; + case VK_FORMAT_R16G16B16_SINT: + return "VK_FORMAT_R16G16B16_SINT"; + case VK_FORMAT_R16G16B16_SNORM: + return "VK_FORMAT_R16G16B16_SNORM"; + case VK_FORMAT_R16G16B16_SSCALED: + return "VK_FORMAT_R16G16B16_SSCALED"; + case VK_FORMAT_R16G16B16_UINT: + return "VK_FORMAT_R16G16B16_UINT"; + case VK_FORMAT_R16G16B16_UNORM: + return "VK_FORMAT_R16G16B16_UNORM"; + case VK_FORMAT_R16G16B16_USCALED: + return "VK_FORMAT_R16G16B16_USCALED"; + case VK_FORMAT_R16G16_SFLOAT: + return "VK_FORMAT_R16G16_SFLOAT"; + case VK_FORMAT_R16G16_SINT: + return "VK_FORMAT_R16G16_SINT"; + case VK_FORMAT_R16G16_SNORM: + return "VK_FORMAT_R16G16_SNORM"; + case VK_FORMAT_R16G16_SSCALED: + return "VK_FORMAT_R16G16_SSCALED"; + case VK_FORMAT_R16G16_UINT: + return "VK_FORMAT_R16G16_UINT"; + case VK_FORMAT_R16G16_UNORM: + return "VK_FORMAT_R16G16_UNORM"; + case VK_FORMAT_R16G16_USCALED: + return "VK_FORMAT_R16G16_USCALED"; + case VK_FORMAT_R16_SFLOAT: + return "VK_FORMAT_R16_SFLOAT"; + case VK_FORMAT_R16_SINT: + return "VK_FORMAT_R16_SINT"; + case VK_FORMAT_R16_SNORM: + return "VK_FORMAT_R16_SNORM"; + case VK_FORMAT_R16_SSCALED: + return "VK_FORMAT_R16_SSCALED"; + case VK_FORMAT_R16_UINT: + return "VK_FORMAT_R16_UINT"; + case VK_FORMAT_R16_UNORM: + return "VK_FORMAT_R16_UNORM"; + case VK_FORMAT_R16_USCALED: + return "VK_FORMAT_R16_USCALED"; + case VK_FORMAT_R32G32B32A32_SFLOAT: + return "VK_FORMAT_R32G32B32A32_SFLOAT"; + case VK_FORMAT_R32G32B32A32_SINT: + return "VK_FORMAT_R32G32B32A32_SINT"; + case VK_FORMAT_R32G32B32A32_UINT: + return "VK_FORMAT_R32G32B32A32_UINT"; + case VK_FORMAT_R32G32B32_SFLOAT: + return "VK_FORMAT_R32G32B32_SFLOAT"; + case VK_FORMAT_R32G32B32_SINT: + return "VK_FORMAT_R32G32B32_SINT"; + case VK_FORMAT_R32G32B32_UINT: + return "VK_FORMAT_R32G32B32_UINT"; + case VK_FORMAT_R32G32_SFLOAT: + return "VK_FORMAT_R32G32_SFLOAT"; + case VK_FORMAT_R32G32_SINT: + return "VK_FORMAT_R32G32_SINT"; + case VK_FORMAT_R32G32_UINT: + return "VK_FORMAT_R32G32_UINT"; + case VK_FORMAT_R32_SFLOAT: + return "VK_FORMAT_R32_SFLOAT"; + case VK_FORMAT_R32_SINT: + return "VK_FORMAT_R32_SINT"; + case VK_FORMAT_R32_UINT: + return "VK_FORMAT_R32_UINT"; + case VK_FORMAT_R4G4B4A4_UNORM_PACK16: + return "VK_FORMAT_R4G4B4A4_UNORM_PACK16"; + case VK_FORMAT_R4G4_UNORM_PACK8: + return "VK_FORMAT_R4G4_UNORM_PACK8"; + case VK_FORMAT_R5G5B5A1_UNORM_PACK16: + return "VK_FORMAT_R5G5B5A1_UNORM_PACK16"; + case VK_FORMAT_R5G6B5_UNORM_PACK16: + return "VK_FORMAT_R5G6B5_UNORM_PACK16"; + case VK_FORMAT_R64G64B64A64_SFLOAT: + return "VK_FORMAT_R64G64B64A64_SFLOAT"; + case VK_FORMAT_R64G64B64A64_SINT: + return "VK_FORMAT_R64G64B64A64_SINT"; + case VK_FORMAT_R64G64B64A64_UINT: + return "VK_FORMAT_R64G64B64A64_UINT"; + case VK_FORMAT_R64G64B64_SFLOAT: + return "VK_FORMAT_R64G64B64_SFLOAT"; + case VK_FORMAT_R64G64B64_SINT: + return "VK_FORMAT_R64G64B64_SINT"; + case VK_FORMAT_R64G64B64_UINT: + return "VK_FORMAT_R64G64B64_UINT"; + case VK_FORMAT_R64G64_SFLOAT: + return "VK_FORMAT_R64G64_SFLOAT"; + case VK_FORMAT_R64G64_SINT: + return "VK_FORMAT_R64G64_SINT"; + case VK_FORMAT_R64G64_UINT: + return "VK_FORMAT_R64G64_UINT"; + case VK_FORMAT_R64_SFLOAT: + return "VK_FORMAT_R64_SFLOAT"; + case VK_FORMAT_R64_SINT: + return "VK_FORMAT_R64_SINT"; + case VK_FORMAT_R64_UINT: + return "VK_FORMAT_R64_UINT"; + case VK_FORMAT_R8G8B8A8_SINT: + return "VK_FORMAT_R8G8B8A8_SINT"; + case VK_FORMAT_R8G8B8A8_SNORM: + return "VK_FORMAT_R8G8B8A8_SNORM"; + case VK_FORMAT_R8G8B8A8_SRGB: + return "VK_FORMAT_R8G8B8A8_SRGB"; + case VK_FORMAT_R8G8B8A8_SSCALED: + return "VK_FORMAT_R8G8B8A8_SSCALED"; + case VK_FORMAT_R8G8B8A8_UINT: + return "VK_FORMAT_R8G8B8A8_UINT"; + case VK_FORMAT_R8G8B8A8_UNORM: + return "VK_FORMAT_R8G8B8A8_UNORM"; + case VK_FORMAT_R8G8B8A8_USCALED: + return "VK_FORMAT_R8G8B8A8_USCALED"; + case VK_FORMAT_R8G8B8_SINT: + return "VK_FORMAT_R8G8B8_SINT"; + case VK_FORMAT_R8G8B8_SNORM: + return "VK_FORMAT_R8G8B8_SNORM"; + case VK_FORMAT_R8G8B8_SRGB: + return "VK_FORMAT_R8G8B8_SRGB"; + case VK_FORMAT_R8G8B8_SSCALED: + return "VK_FORMAT_R8G8B8_SSCALED"; + case VK_FORMAT_R8G8B8_UINT: + return "VK_FORMAT_R8G8B8_UINT"; + case VK_FORMAT_R8G8B8_UNORM: + return "VK_FORMAT_R8G8B8_UNORM"; + case VK_FORMAT_R8G8B8_USCALED: + return "VK_FORMAT_R8G8B8_USCALED"; + case VK_FORMAT_R8G8_SINT: + return "VK_FORMAT_R8G8_SINT"; + case VK_FORMAT_R8G8_SNORM: + return "VK_FORMAT_R8G8_SNORM"; + case VK_FORMAT_R8G8_SRGB: + return "VK_FORMAT_R8G8_SRGB"; + case VK_FORMAT_R8G8_SSCALED: + return "VK_FORMAT_R8G8_SSCALED"; + case VK_FORMAT_R8G8_UINT: + return "VK_FORMAT_R8G8_UINT"; + case VK_FORMAT_R8G8_UNORM: + return "VK_FORMAT_R8G8_UNORM"; + case VK_FORMAT_R8G8_USCALED: + return "VK_FORMAT_R8G8_USCALED"; + case VK_FORMAT_R8_SINT: + return "VK_FORMAT_R8_SINT"; + case VK_FORMAT_R8_SNORM: + return "VK_FORMAT_R8_SNORM"; + case VK_FORMAT_R8_SRGB: + return "VK_FORMAT_R8_SRGB"; + case VK_FORMAT_R8_SSCALED: + return "VK_FORMAT_R8_SSCALED"; + case VK_FORMAT_R8_UINT: + return "VK_FORMAT_R8_UINT"; + case VK_FORMAT_R8_UNORM: + return "VK_FORMAT_R8_UNORM"; + case VK_FORMAT_R8_USCALED: + return "VK_FORMAT_R8_USCALED"; + case VK_FORMAT_S8_UINT: + return "VK_FORMAT_S8_UINT"; + case VK_FORMAT_UNDEFINED: + return "VK_FORMAT_UNDEFINED"; + case VK_FORMAT_X8_D24_UNORM_PACK32: + return "VK_FORMAT_X8_D24_UNORM_PACK32"; + default: + return "Unhandled VkFormat"; + } +} + +static inline const char* string_VkFormatFeatureFlagBits(VkFormatFeatureFlagBits input_value) +{ + switch (input_value) + { + case VK_FORMAT_FEATURE_ACCELERATION_STRUCTURE_VERTEX_BUFFER_BIT_KHR: + return "VK_FORMAT_FEATURE_ACCELERATION_STRUCTURE_VERTEX_BUFFER_BIT_KHR"; + case VK_FORMAT_FEATURE_BLIT_DST_BIT: + return "VK_FORMAT_FEATURE_BLIT_DST_BIT"; + case VK_FORMAT_FEATURE_BLIT_SRC_BIT: + return "VK_FORMAT_FEATURE_BLIT_SRC_BIT"; + case VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT: + return "VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT"; + case VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT: + return "VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT"; + case VK_FORMAT_FEATURE_COSITED_CHROMA_SAMPLES_BIT: + return "VK_FORMAT_FEATURE_COSITED_CHROMA_SAMPLES_BIT"; + case VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT: + return "VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT"; + case VK_FORMAT_FEATURE_DISJOINT_BIT: + return "VK_FORMAT_FEATURE_DISJOINT_BIT"; + case VK_FORMAT_FEATURE_FRAGMENT_DENSITY_MAP_BIT_EXT: + return "VK_FORMAT_FEATURE_FRAGMENT_DENSITY_MAP_BIT_EXT"; + case VK_FORMAT_FEATURE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR: + return "VK_FORMAT_FEATURE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR"; + case VK_FORMAT_FEATURE_MIDPOINT_CHROMA_SAMPLES_BIT: + return "VK_FORMAT_FEATURE_MIDPOINT_CHROMA_SAMPLES_BIT"; + case VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT: + return "VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT"; + case VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_IMG: + return "VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_IMG"; + case VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT: + return "VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT"; + case VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT: + return "VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT"; + case VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_BIT: + return "VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_BIT"; + case VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_FORCEABLE_BIT: + return "VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_FORCEABLE_BIT"; + case VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_LINEAR_FILTER_BIT: + return "VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_LINEAR_FILTER_BIT"; + case VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_SEPARATE_RECONSTRUCTION_FILTER_BIT: + return "VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_SEPARATE_RECONSTRUCTION_FILTER_BIT"; + case VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT: + return "VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT"; + case VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT: + return "VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT"; + case VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT: + return "VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT"; + case VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT: + return "VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT"; + case VK_FORMAT_FEATURE_TRANSFER_DST_BIT: + return "VK_FORMAT_FEATURE_TRANSFER_DST_BIT"; + case VK_FORMAT_FEATURE_TRANSFER_SRC_BIT: + return "VK_FORMAT_FEATURE_TRANSFER_SRC_BIT"; + case VK_FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT: + return "VK_FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT"; + case VK_FORMAT_FEATURE_VERTEX_BUFFER_BIT: + return "VK_FORMAT_FEATURE_VERTEX_BUFFER_BIT"; +#ifdef VK_ENABLE_BETA_EXTENSIONS + case VK_FORMAT_FEATURE_VIDEO_DECODE_DPB_BIT_KHR: + return "VK_FORMAT_FEATURE_VIDEO_DECODE_DPB_BIT_KHR"; +#endif // VK_ENABLE_BETA_EXTENSIONS +#ifdef VK_ENABLE_BETA_EXTENSIONS + case VK_FORMAT_FEATURE_VIDEO_DECODE_OUTPUT_BIT_KHR: + return "VK_FORMAT_FEATURE_VIDEO_DECODE_OUTPUT_BIT_KHR"; +#endif // VK_ENABLE_BETA_EXTENSIONS +#ifdef VK_ENABLE_BETA_EXTENSIONS + case VK_FORMAT_FEATURE_VIDEO_ENCODE_DPB_BIT_KHR: + return "VK_FORMAT_FEATURE_VIDEO_ENCODE_DPB_BIT_KHR"; +#endif // VK_ENABLE_BETA_EXTENSIONS +#ifdef VK_ENABLE_BETA_EXTENSIONS + case VK_FORMAT_FEATURE_VIDEO_ENCODE_INPUT_BIT_KHR: + return "VK_FORMAT_FEATURE_VIDEO_ENCODE_INPUT_BIT_KHR"; +#endif // VK_ENABLE_BETA_EXTENSIONS + default: + return "Unhandled VkFormatFeatureFlagBits"; + } +} + +static inline std::string string_VkFormatFeatureFlags(VkFormatFeatureFlags input_value) +{ + std::string ret; + int index = 0; + while(input_value) { + if (input_value & 1) { + if( !ret.empty()) ret.append("|"); + ret.append(string_VkFormatFeatureFlagBits(static_cast(1U << index))); + } + ++index; + input_value >>= 1; + } + if( ret.empty()) ret.append(string_VkFormatFeatureFlagBits(static_cast(0))); + return ret; +} + +static inline const char* string_VkImageCreateFlagBits(VkImageCreateFlagBits input_value) +{ + switch (input_value) + { + case VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT: + return "VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT"; + case VK_IMAGE_CREATE_ALIAS_BIT: + return "VK_IMAGE_CREATE_ALIAS_BIT"; + case VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT: + return "VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT"; + case VK_IMAGE_CREATE_CORNER_SAMPLED_BIT_NV: + return "VK_IMAGE_CREATE_CORNER_SAMPLED_BIT_NV"; + case VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT: + return "VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT"; + case VK_IMAGE_CREATE_DISJOINT_BIT: + return "VK_IMAGE_CREATE_DISJOINT_BIT"; + case VK_IMAGE_CREATE_EXTENDED_USAGE_BIT: + return "VK_IMAGE_CREATE_EXTENDED_USAGE_BIT"; + case VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT: + return "VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT"; + case VK_IMAGE_CREATE_PROTECTED_BIT: + return "VK_IMAGE_CREATE_PROTECTED_BIT"; + case VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT: + return "VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT"; + case VK_IMAGE_CREATE_SPARSE_ALIASED_BIT: + return "VK_IMAGE_CREATE_SPARSE_ALIASED_BIT"; + case VK_IMAGE_CREATE_SPARSE_BINDING_BIT: + return "VK_IMAGE_CREATE_SPARSE_BINDING_BIT"; + case VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT: + return "VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT"; + case VK_IMAGE_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT: + return "VK_IMAGE_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT"; + case VK_IMAGE_CREATE_SUBSAMPLED_BIT_EXT: + return "VK_IMAGE_CREATE_SUBSAMPLED_BIT_EXT"; + default: + return "Unhandled VkImageCreateFlagBits"; + } +} + +static inline std::string string_VkImageCreateFlags(VkImageCreateFlags input_value) +{ + std::string ret; + int index = 0; + while(input_value) { + if (input_value & 1) { + if( !ret.empty()) ret.append("|"); + ret.append(string_VkImageCreateFlagBits(static_cast(1U << index))); + } + ++index; + input_value >>= 1; + } + if( ret.empty()) ret.append(string_VkImageCreateFlagBits(static_cast(0))); + return ret; +} + +static inline const char* string_VkSampleCountFlagBits(VkSampleCountFlagBits input_value) +{ + switch (input_value) + { + case VK_SAMPLE_COUNT_16_BIT: + return "VK_SAMPLE_COUNT_16_BIT"; + case VK_SAMPLE_COUNT_1_BIT: + return "VK_SAMPLE_COUNT_1_BIT"; + case VK_SAMPLE_COUNT_2_BIT: + return "VK_SAMPLE_COUNT_2_BIT"; + case VK_SAMPLE_COUNT_32_BIT: + return "VK_SAMPLE_COUNT_32_BIT"; + case VK_SAMPLE_COUNT_4_BIT: + return "VK_SAMPLE_COUNT_4_BIT"; + case VK_SAMPLE_COUNT_64_BIT: + return "VK_SAMPLE_COUNT_64_BIT"; + case VK_SAMPLE_COUNT_8_BIT: + return "VK_SAMPLE_COUNT_8_BIT"; + default: + return "Unhandled VkSampleCountFlagBits"; + } +} + +static inline std::string string_VkSampleCountFlags(VkSampleCountFlags input_value) +{ + std::string ret; + int index = 0; + while(input_value) { + if (input_value & 1) { + if( !ret.empty()) ret.append("|"); + ret.append(string_VkSampleCountFlagBits(static_cast(1U << index))); + } + ++index; + input_value >>= 1; + } + if( ret.empty()) ret.append(string_VkSampleCountFlagBits(static_cast(0))); + return ret; +} + +static inline const char* string_VkImageTiling(VkImageTiling input_value) +{ + switch (input_value) + { + case VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT: + return "VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT"; + case VK_IMAGE_TILING_LINEAR: + return "VK_IMAGE_TILING_LINEAR"; + case VK_IMAGE_TILING_OPTIMAL: + return "VK_IMAGE_TILING_OPTIMAL"; + default: + return "Unhandled VkImageTiling"; + } +} + +static inline const char* string_VkImageType(VkImageType input_value) +{ + switch (input_value) + { + case VK_IMAGE_TYPE_1D: + return "VK_IMAGE_TYPE_1D"; + case VK_IMAGE_TYPE_2D: + return "VK_IMAGE_TYPE_2D"; + case VK_IMAGE_TYPE_3D: + return "VK_IMAGE_TYPE_3D"; + default: + return "Unhandled VkImageType"; + } +} + +static inline const char* string_VkImageUsageFlagBits(VkImageUsageFlagBits input_value) +{ + switch (input_value) + { + case VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT: + return "VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT"; + case VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT: + return "VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT"; + case VK_IMAGE_USAGE_FRAGMENT_DENSITY_MAP_BIT_EXT: + return "VK_IMAGE_USAGE_FRAGMENT_DENSITY_MAP_BIT_EXT"; + case VK_IMAGE_USAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR: + return "VK_IMAGE_USAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR"; + case VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT: + return "VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT"; + case VK_IMAGE_USAGE_INVOCATION_MASK_BIT_HUAWEI: + return "VK_IMAGE_USAGE_INVOCATION_MASK_BIT_HUAWEI"; + case VK_IMAGE_USAGE_SAMPLED_BIT: + return "VK_IMAGE_USAGE_SAMPLED_BIT"; + case VK_IMAGE_USAGE_STORAGE_BIT: + return "VK_IMAGE_USAGE_STORAGE_BIT"; + case VK_IMAGE_USAGE_TRANSFER_DST_BIT: + return "VK_IMAGE_USAGE_TRANSFER_DST_BIT"; + case VK_IMAGE_USAGE_TRANSFER_SRC_BIT: + return "VK_IMAGE_USAGE_TRANSFER_SRC_BIT"; + case VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT: + return "VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT"; +#ifdef VK_ENABLE_BETA_EXTENSIONS + case VK_IMAGE_USAGE_VIDEO_DECODE_DPB_BIT_KHR: + return "VK_IMAGE_USAGE_VIDEO_DECODE_DPB_BIT_KHR"; +#endif // VK_ENABLE_BETA_EXTENSIONS +#ifdef VK_ENABLE_BETA_EXTENSIONS + case VK_IMAGE_USAGE_VIDEO_DECODE_DST_BIT_KHR: + return "VK_IMAGE_USAGE_VIDEO_DECODE_DST_BIT_KHR"; +#endif // VK_ENABLE_BETA_EXTENSIONS +#ifdef VK_ENABLE_BETA_EXTENSIONS + case VK_IMAGE_USAGE_VIDEO_DECODE_SRC_BIT_KHR: + return "VK_IMAGE_USAGE_VIDEO_DECODE_SRC_BIT_KHR"; +#endif // VK_ENABLE_BETA_EXTENSIONS +#ifdef VK_ENABLE_BETA_EXTENSIONS + case VK_IMAGE_USAGE_VIDEO_ENCODE_DPB_BIT_KHR: + return "VK_IMAGE_USAGE_VIDEO_ENCODE_DPB_BIT_KHR"; +#endif // VK_ENABLE_BETA_EXTENSIONS +#ifdef VK_ENABLE_BETA_EXTENSIONS + case VK_IMAGE_USAGE_VIDEO_ENCODE_DST_BIT_KHR: + return "VK_IMAGE_USAGE_VIDEO_ENCODE_DST_BIT_KHR"; +#endif // VK_ENABLE_BETA_EXTENSIONS +#ifdef VK_ENABLE_BETA_EXTENSIONS + case VK_IMAGE_USAGE_VIDEO_ENCODE_SRC_BIT_KHR: + return "VK_IMAGE_USAGE_VIDEO_ENCODE_SRC_BIT_KHR"; +#endif // VK_ENABLE_BETA_EXTENSIONS + default: + return "Unhandled VkImageUsageFlagBits"; + } +} + +static inline std::string string_VkImageUsageFlags(VkImageUsageFlags input_value) +{ + std::string ret; + int index = 0; + while(input_value) { + if (input_value & 1) { + if( !ret.empty()) ret.append("|"); + ret.append(string_VkImageUsageFlagBits(static_cast(1U << index))); + } + ++index; + input_value >>= 1; + } + if( ret.empty()) ret.append(string_VkImageUsageFlagBits(static_cast(0))); + return ret; +} + +static inline const char* string_VkMemoryHeapFlagBits(VkMemoryHeapFlagBits input_value) +{ + switch (input_value) + { + case VK_MEMORY_HEAP_DEVICE_LOCAL_BIT: + return "VK_MEMORY_HEAP_DEVICE_LOCAL_BIT"; + case VK_MEMORY_HEAP_MULTI_INSTANCE_BIT: + return "VK_MEMORY_HEAP_MULTI_INSTANCE_BIT"; + default: + return "Unhandled VkMemoryHeapFlagBits"; + } +} + +static inline std::string string_VkMemoryHeapFlags(VkMemoryHeapFlags input_value) +{ + std::string ret; + int index = 0; + while(input_value) { + if (input_value & 1) { + if( !ret.empty()) ret.append("|"); + ret.append(string_VkMemoryHeapFlagBits(static_cast(1U << index))); + } + ++index; + input_value >>= 1; + } + if( ret.empty()) ret.append(string_VkMemoryHeapFlagBits(static_cast(0))); + return ret; +} + +static inline const char* string_VkMemoryPropertyFlagBits(VkMemoryPropertyFlagBits input_value) +{ + switch (input_value) + { + case VK_MEMORY_PROPERTY_DEVICE_COHERENT_BIT_AMD: + return "VK_MEMORY_PROPERTY_DEVICE_COHERENT_BIT_AMD"; + case VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT: + return "VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT"; + case VK_MEMORY_PROPERTY_DEVICE_UNCACHED_BIT_AMD: + return "VK_MEMORY_PROPERTY_DEVICE_UNCACHED_BIT_AMD"; + case VK_MEMORY_PROPERTY_HOST_CACHED_BIT: + return "VK_MEMORY_PROPERTY_HOST_CACHED_BIT"; + case VK_MEMORY_PROPERTY_HOST_COHERENT_BIT: + return "VK_MEMORY_PROPERTY_HOST_COHERENT_BIT"; + case VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT: + return "VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT"; + case VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT: + return "VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT"; + case VK_MEMORY_PROPERTY_PROTECTED_BIT: + return "VK_MEMORY_PROPERTY_PROTECTED_BIT"; + case VK_MEMORY_PROPERTY_RDMA_CAPABLE_BIT_NV: + return "VK_MEMORY_PROPERTY_RDMA_CAPABLE_BIT_NV"; + default: + return "Unhandled VkMemoryPropertyFlagBits"; + } +} + +static inline std::string string_VkMemoryPropertyFlags(VkMemoryPropertyFlags input_value) +{ + std::string ret; + int index = 0; + while(input_value) { + if (input_value & 1) { + if( !ret.empty()) ret.append("|"); + ret.append(string_VkMemoryPropertyFlagBits(static_cast(1U << index))); + } + ++index; + input_value >>= 1; + } + if( ret.empty()) ret.append(string_VkMemoryPropertyFlagBits(static_cast(0))); + return ret; +} + +static inline const char* string_VkPhysicalDeviceType(VkPhysicalDeviceType input_value) +{ + switch (input_value) + { + case VK_PHYSICAL_DEVICE_TYPE_CPU: + return "VK_PHYSICAL_DEVICE_TYPE_CPU"; + case VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU: + return "VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU"; + case VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU: + return "VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU"; + case VK_PHYSICAL_DEVICE_TYPE_OTHER: + return "VK_PHYSICAL_DEVICE_TYPE_OTHER"; + case VK_PHYSICAL_DEVICE_TYPE_VIRTUAL_GPU: + return "VK_PHYSICAL_DEVICE_TYPE_VIRTUAL_GPU"; + default: + return "Unhandled VkPhysicalDeviceType"; + } +} + +static inline const char* string_VkQueueFlagBits(VkQueueFlagBits input_value) +{ + switch (input_value) + { + case VK_QUEUE_COMPUTE_BIT: + return "VK_QUEUE_COMPUTE_BIT"; + case VK_QUEUE_GRAPHICS_BIT: + return "VK_QUEUE_GRAPHICS_BIT"; + case VK_QUEUE_PROTECTED_BIT: + return "VK_QUEUE_PROTECTED_BIT"; + case VK_QUEUE_SPARSE_BINDING_BIT: + return "VK_QUEUE_SPARSE_BINDING_BIT"; + case VK_QUEUE_TRANSFER_BIT: + return "VK_QUEUE_TRANSFER_BIT"; +#ifdef VK_ENABLE_BETA_EXTENSIONS + case VK_QUEUE_VIDEO_DECODE_BIT_KHR: + return "VK_QUEUE_VIDEO_DECODE_BIT_KHR"; +#endif // VK_ENABLE_BETA_EXTENSIONS +#ifdef VK_ENABLE_BETA_EXTENSIONS + case VK_QUEUE_VIDEO_ENCODE_BIT_KHR: + return "VK_QUEUE_VIDEO_ENCODE_BIT_KHR"; +#endif // VK_ENABLE_BETA_EXTENSIONS + default: + return "Unhandled VkQueueFlagBits"; + } +} + +static inline std::string string_VkQueueFlags(VkQueueFlags input_value) +{ + std::string ret; + int index = 0; + while(input_value) { + if (input_value & 1) { + if( !ret.empty()) ret.append("|"); + ret.append(string_VkQueueFlagBits(static_cast(1U << index))); + } + ++index; + input_value >>= 1; + } + if( ret.empty()) ret.append(string_VkQueueFlagBits(static_cast(0))); + return ret; +} + +static inline const char* string_VkDeviceQueueCreateFlagBits(VkDeviceQueueCreateFlagBits input_value) +{ + switch (input_value) + { + case VK_DEVICE_QUEUE_CREATE_PROTECTED_BIT: + return "VK_DEVICE_QUEUE_CREATE_PROTECTED_BIT"; + default: + return "Unhandled VkDeviceQueueCreateFlagBits"; + } +} + +static inline std::string string_VkDeviceQueueCreateFlags(VkDeviceQueueCreateFlags input_value) +{ + std::string ret; + int index = 0; + while(input_value) { + if (input_value & 1) { + if( !ret.empty()) ret.append("|"); + ret.append(string_VkDeviceQueueCreateFlagBits(static_cast(1U << index))); + } + ++index; + input_value >>= 1; + } + if( ret.empty()) ret.append(string_VkDeviceQueueCreateFlagBits(static_cast(0))); + return ret; +} + +static inline const char* string_VkPipelineStageFlagBits(VkPipelineStageFlagBits input_value) +{ + switch (input_value) + { + case VK_PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_KHR: + return "VK_PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_KHR"; + case VK_PIPELINE_STAGE_ALL_COMMANDS_BIT: + return "VK_PIPELINE_STAGE_ALL_COMMANDS_BIT"; + case VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT: + return "VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT"; + case VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT: + return "VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT"; + case VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT: + return "VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT"; + case VK_PIPELINE_STAGE_COMMAND_PREPROCESS_BIT_NV: + return "VK_PIPELINE_STAGE_COMMAND_PREPROCESS_BIT_NV"; + case VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT: + return "VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT"; + case VK_PIPELINE_STAGE_CONDITIONAL_RENDERING_BIT_EXT: + return "VK_PIPELINE_STAGE_CONDITIONAL_RENDERING_BIT_EXT"; + case VK_PIPELINE_STAGE_DRAW_INDIRECT_BIT: + return "VK_PIPELINE_STAGE_DRAW_INDIRECT_BIT"; + case VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT: + return "VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT"; + case VK_PIPELINE_STAGE_FRAGMENT_DENSITY_PROCESS_BIT_EXT: + return "VK_PIPELINE_STAGE_FRAGMENT_DENSITY_PROCESS_BIT_EXT"; + case VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT: + return "VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT"; + case VK_PIPELINE_STAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR: + return "VK_PIPELINE_STAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR"; + case VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT: + return "VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT"; + case VK_PIPELINE_STAGE_HOST_BIT: + return "VK_PIPELINE_STAGE_HOST_BIT"; + case VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT: + return "VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT"; + case VK_PIPELINE_STAGE_MESH_SHADER_BIT_NV: + return "VK_PIPELINE_STAGE_MESH_SHADER_BIT_NV"; + case VK_PIPELINE_STAGE_NONE_KHR: + return "VK_PIPELINE_STAGE_NONE_KHR"; + case VK_PIPELINE_STAGE_RAY_TRACING_SHADER_BIT_KHR: + return "VK_PIPELINE_STAGE_RAY_TRACING_SHADER_BIT_KHR"; + case VK_PIPELINE_STAGE_TASK_SHADER_BIT_NV: + return "VK_PIPELINE_STAGE_TASK_SHADER_BIT_NV"; + case VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT: + return "VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT"; + case VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT: + return "VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT"; + case VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT: + return "VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT"; + case VK_PIPELINE_STAGE_TRANSFER_BIT: + return "VK_PIPELINE_STAGE_TRANSFER_BIT"; + case VK_PIPELINE_STAGE_TRANSFORM_FEEDBACK_BIT_EXT: + return "VK_PIPELINE_STAGE_TRANSFORM_FEEDBACK_BIT_EXT"; + case VK_PIPELINE_STAGE_VERTEX_INPUT_BIT: + return "VK_PIPELINE_STAGE_VERTEX_INPUT_BIT"; + case VK_PIPELINE_STAGE_VERTEX_SHADER_BIT: + return "VK_PIPELINE_STAGE_VERTEX_SHADER_BIT"; + default: + return "Unhandled VkPipelineStageFlagBits"; + } +} + +static inline std::string string_VkPipelineStageFlags(VkPipelineStageFlags input_value) +{ + std::string ret; + int index = 0; + while(input_value) { + if (input_value & 1) { + if( !ret.empty()) ret.append("|"); + ret.append(string_VkPipelineStageFlagBits(static_cast(1U << index))); + } + ++index; + input_value >>= 1; + } + if( ret.empty()) ret.append(string_VkPipelineStageFlagBits(static_cast(0))); + return ret; +} + +static inline const char* string_VkSparseMemoryBindFlagBits(VkSparseMemoryBindFlagBits input_value) +{ + switch (input_value) + { + case VK_SPARSE_MEMORY_BIND_METADATA_BIT: + return "VK_SPARSE_MEMORY_BIND_METADATA_BIT"; + default: + return "Unhandled VkSparseMemoryBindFlagBits"; + } +} + +static inline std::string string_VkSparseMemoryBindFlags(VkSparseMemoryBindFlags input_value) +{ + std::string ret; + int index = 0; + while(input_value) { + if (input_value & 1) { + if( !ret.empty()) ret.append("|"); + ret.append(string_VkSparseMemoryBindFlagBits(static_cast(1U << index))); + } + ++index; + input_value >>= 1; + } + if( ret.empty()) ret.append(string_VkSparseMemoryBindFlagBits(static_cast(0))); + return ret; +} + +static inline const char* string_VkSparseImageFormatFlagBits(VkSparseImageFormatFlagBits input_value) +{ + switch (input_value) + { + case VK_SPARSE_IMAGE_FORMAT_ALIGNED_MIP_SIZE_BIT: + return "VK_SPARSE_IMAGE_FORMAT_ALIGNED_MIP_SIZE_BIT"; + case VK_SPARSE_IMAGE_FORMAT_NONSTANDARD_BLOCK_SIZE_BIT: + return "VK_SPARSE_IMAGE_FORMAT_NONSTANDARD_BLOCK_SIZE_BIT"; + case VK_SPARSE_IMAGE_FORMAT_SINGLE_MIPTAIL_BIT: + return "VK_SPARSE_IMAGE_FORMAT_SINGLE_MIPTAIL_BIT"; + default: + return "Unhandled VkSparseImageFormatFlagBits"; + } +} + +static inline std::string string_VkSparseImageFormatFlags(VkSparseImageFormatFlags input_value) +{ + std::string ret; + int index = 0; + while(input_value) { + if (input_value & 1) { + if( !ret.empty()) ret.append("|"); + ret.append(string_VkSparseImageFormatFlagBits(static_cast(1U << index))); + } + ++index; + input_value >>= 1; + } + if( ret.empty()) ret.append(string_VkSparseImageFormatFlagBits(static_cast(0))); + return ret; +} + +static inline const char* string_VkFenceCreateFlagBits(VkFenceCreateFlagBits input_value) +{ + switch (input_value) + { + case VK_FENCE_CREATE_SIGNALED_BIT: + return "VK_FENCE_CREATE_SIGNALED_BIT"; + default: + return "Unhandled VkFenceCreateFlagBits"; + } +} + +static inline std::string string_VkFenceCreateFlags(VkFenceCreateFlags input_value) +{ + std::string ret; + int index = 0; + while(input_value) { + if (input_value & 1) { + if( !ret.empty()) ret.append("|"); + ret.append(string_VkFenceCreateFlagBits(static_cast(1U << index))); + } + ++index; + input_value >>= 1; + } + if( ret.empty()) ret.append(string_VkFenceCreateFlagBits(static_cast(0))); + return ret; +} + +static inline const char* string_VkEventCreateFlagBits(VkEventCreateFlagBits input_value) +{ + switch (input_value) + { + case VK_EVENT_CREATE_DEVICE_ONLY_BIT_KHR: + return "VK_EVENT_CREATE_DEVICE_ONLY_BIT_KHR"; + default: + return "Unhandled VkEventCreateFlagBits"; + } +} + +static inline std::string string_VkEventCreateFlags(VkEventCreateFlags input_value) +{ + std::string ret; + int index = 0; + while(input_value) { + if (input_value & 1) { + if( !ret.empty()) ret.append("|"); + ret.append(string_VkEventCreateFlagBits(static_cast(1U << index))); + } + ++index; + input_value >>= 1; + } + if( ret.empty()) ret.append(string_VkEventCreateFlagBits(static_cast(0))); + return ret; +} + +static inline const char* string_VkQueryPipelineStatisticFlagBits(VkQueryPipelineStatisticFlagBits input_value) +{ + switch (input_value) + { + case VK_QUERY_PIPELINE_STATISTIC_CLIPPING_INVOCATIONS_BIT: + return "VK_QUERY_PIPELINE_STATISTIC_CLIPPING_INVOCATIONS_BIT"; + case VK_QUERY_PIPELINE_STATISTIC_CLIPPING_PRIMITIVES_BIT: + return "VK_QUERY_PIPELINE_STATISTIC_CLIPPING_PRIMITIVES_BIT"; + case VK_QUERY_PIPELINE_STATISTIC_COMPUTE_SHADER_INVOCATIONS_BIT: + return "VK_QUERY_PIPELINE_STATISTIC_COMPUTE_SHADER_INVOCATIONS_BIT"; + case VK_QUERY_PIPELINE_STATISTIC_FRAGMENT_SHADER_INVOCATIONS_BIT: + return "VK_QUERY_PIPELINE_STATISTIC_FRAGMENT_SHADER_INVOCATIONS_BIT"; + case VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_INVOCATIONS_BIT: + return "VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_INVOCATIONS_BIT"; + case VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_PRIMITIVES_BIT: + return "VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_PRIMITIVES_BIT"; + case VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_PRIMITIVES_BIT: + return "VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_PRIMITIVES_BIT"; + case VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_VERTICES_BIT: + return "VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_VERTICES_BIT"; + case VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_CONTROL_SHADER_PATCHES_BIT: + return "VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_CONTROL_SHADER_PATCHES_BIT"; + case VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_EVALUATION_SHADER_INVOCATIONS_BIT: + return "VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_EVALUATION_SHADER_INVOCATIONS_BIT"; + case VK_QUERY_PIPELINE_STATISTIC_VERTEX_SHADER_INVOCATIONS_BIT: + return "VK_QUERY_PIPELINE_STATISTIC_VERTEX_SHADER_INVOCATIONS_BIT"; + default: + return "Unhandled VkQueryPipelineStatisticFlagBits"; + } +} + +static inline std::string string_VkQueryPipelineStatisticFlags(VkQueryPipelineStatisticFlags input_value) +{ + std::string ret; + int index = 0; + while(input_value) { + if (input_value & 1) { + if( !ret.empty()) ret.append("|"); + ret.append(string_VkQueryPipelineStatisticFlagBits(static_cast(1U << index))); + } + ++index; + input_value >>= 1; + } + if( ret.empty()) ret.append(string_VkQueryPipelineStatisticFlagBits(static_cast(0))); + return ret; +} + +static inline const char* string_VkQueryType(VkQueryType input_value) +{ + switch (input_value) + { + case VK_QUERY_TYPE_ACCELERATION_STRUCTURE_COMPACTED_SIZE_KHR: + return "VK_QUERY_TYPE_ACCELERATION_STRUCTURE_COMPACTED_SIZE_KHR"; + case VK_QUERY_TYPE_ACCELERATION_STRUCTURE_COMPACTED_SIZE_NV: + return "VK_QUERY_TYPE_ACCELERATION_STRUCTURE_COMPACTED_SIZE_NV"; + case VK_QUERY_TYPE_ACCELERATION_STRUCTURE_SERIALIZATION_SIZE_KHR: + return "VK_QUERY_TYPE_ACCELERATION_STRUCTURE_SERIALIZATION_SIZE_KHR"; + case VK_QUERY_TYPE_OCCLUSION: + return "VK_QUERY_TYPE_OCCLUSION"; + case VK_QUERY_TYPE_PERFORMANCE_QUERY_INTEL: + return "VK_QUERY_TYPE_PERFORMANCE_QUERY_INTEL"; + case VK_QUERY_TYPE_PERFORMANCE_QUERY_KHR: + return "VK_QUERY_TYPE_PERFORMANCE_QUERY_KHR"; + case VK_QUERY_TYPE_PIPELINE_STATISTICS: + return "VK_QUERY_TYPE_PIPELINE_STATISTICS"; +#ifdef VK_ENABLE_BETA_EXTENSIONS + case VK_QUERY_TYPE_RESULT_STATUS_ONLY_KHR: + return "VK_QUERY_TYPE_RESULT_STATUS_ONLY_KHR"; +#endif // VK_ENABLE_BETA_EXTENSIONS + case VK_QUERY_TYPE_TIMESTAMP: + return "VK_QUERY_TYPE_TIMESTAMP"; + case VK_QUERY_TYPE_TRANSFORM_FEEDBACK_STREAM_EXT: + return "VK_QUERY_TYPE_TRANSFORM_FEEDBACK_STREAM_EXT"; +#ifdef VK_ENABLE_BETA_EXTENSIONS + case VK_QUERY_TYPE_VIDEO_ENCODE_BITSTREAM_BUFFER_RANGE_KHR: + return "VK_QUERY_TYPE_VIDEO_ENCODE_BITSTREAM_BUFFER_RANGE_KHR"; +#endif // VK_ENABLE_BETA_EXTENSIONS + default: + return "Unhandled VkQueryType"; + } +} + +static inline const char* string_VkQueryResultFlagBits(VkQueryResultFlagBits input_value) +{ + switch (input_value) + { + case VK_QUERY_RESULT_64_BIT: + return "VK_QUERY_RESULT_64_BIT"; + case VK_QUERY_RESULT_PARTIAL_BIT: + return "VK_QUERY_RESULT_PARTIAL_BIT"; + case VK_QUERY_RESULT_WAIT_BIT: + return "VK_QUERY_RESULT_WAIT_BIT"; + case VK_QUERY_RESULT_WITH_AVAILABILITY_BIT: + return "VK_QUERY_RESULT_WITH_AVAILABILITY_BIT"; +#ifdef VK_ENABLE_BETA_EXTENSIONS + case VK_QUERY_RESULT_WITH_STATUS_BIT_KHR: + return "VK_QUERY_RESULT_WITH_STATUS_BIT_KHR"; +#endif // VK_ENABLE_BETA_EXTENSIONS + default: + return "Unhandled VkQueryResultFlagBits"; + } +} + +static inline std::string string_VkQueryResultFlags(VkQueryResultFlags input_value) +{ + std::string ret; + int index = 0; + while(input_value) { + if (input_value & 1) { + if( !ret.empty()) ret.append("|"); + ret.append(string_VkQueryResultFlagBits(static_cast(1U << index))); + } + ++index; + input_value >>= 1; + } + if( ret.empty()) ret.append(string_VkQueryResultFlagBits(static_cast(0))); + return ret; +} + +static inline const char* string_VkBufferCreateFlagBits(VkBufferCreateFlagBits input_value) +{ + switch (input_value) + { + case VK_BUFFER_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT: + return "VK_BUFFER_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT"; + case VK_BUFFER_CREATE_PROTECTED_BIT: + return "VK_BUFFER_CREATE_PROTECTED_BIT"; + case VK_BUFFER_CREATE_SPARSE_ALIASED_BIT: + return "VK_BUFFER_CREATE_SPARSE_ALIASED_BIT"; + case VK_BUFFER_CREATE_SPARSE_BINDING_BIT: + return "VK_BUFFER_CREATE_SPARSE_BINDING_BIT"; + case VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT: + return "VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT"; + default: + return "Unhandled VkBufferCreateFlagBits"; + } +} + +static inline std::string string_VkBufferCreateFlags(VkBufferCreateFlags input_value) +{ + std::string ret; + int index = 0; + while(input_value) { + if (input_value & 1) { + if( !ret.empty()) ret.append("|"); + ret.append(string_VkBufferCreateFlagBits(static_cast(1U << index))); + } + ++index; + input_value >>= 1; + } + if( ret.empty()) ret.append(string_VkBufferCreateFlagBits(static_cast(0))); + return ret; +} + +static inline const char* string_VkBufferUsageFlagBits(VkBufferUsageFlagBits input_value) +{ + switch (input_value) + { + case VK_BUFFER_USAGE_ACCELERATION_STRUCTURE_BUILD_INPUT_READ_ONLY_BIT_KHR: + return "VK_BUFFER_USAGE_ACCELERATION_STRUCTURE_BUILD_INPUT_READ_ONLY_BIT_KHR"; + case VK_BUFFER_USAGE_ACCELERATION_STRUCTURE_STORAGE_BIT_KHR: + return "VK_BUFFER_USAGE_ACCELERATION_STRUCTURE_STORAGE_BIT_KHR"; + case VK_BUFFER_USAGE_CONDITIONAL_RENDERING_BIT_EXT: + return "VK_BUFFER_USAGE_CONDITIONAL_RENDERING_BIT_EXT"; + case VK_BUFFER_USAGE_INDEX_BUFFER_BIT: + return "VK_BUFFER_USAGE_INDEX_BUFFER_BIT"; + case VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT: + return "VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT"; + case VK_BUFFER_USAGE_SHADER_BINDING_TABLE_BIT_KHR: + return "VK_BUFFER_USAGE_SHADER_BINDING_TABLE_BIT_KHR"; + case VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT: + return "VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT"; + case VK_BUFFER_USAGE_STORAGE_BUFFER_BIT: + return "VK_BUFFER_USAGE_STORAGE_BUFFER_BIT"; + case VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT: + return "VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT"; + case VK_BUFFER_USAGE_TRANSFER_DST_BIT: + return "VK_BUFFER_USAGE_TRANSFER_DST_BIT"; + case VK_BUFFER_USAGE_TRANSFER_SRC_BIT: + return "VK_BUFFER_USAGE_TRANSFER_SRC_BIT"; + case VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_BUFFER_BIT_EXT: + return "VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_BUFFER_BIT_EXT"; + case VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_COUNTER_BUFFER_BIT_EXT: + return "VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_COUNTER_BUFFER_BIT_EXT"; + case VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT: + return "VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT"; + case VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT: + return "VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT"; + case VK_BUFFER_USAGE_VERTEX_BUFFER_BIT: + return "VK_BUFFER_USAGE_VERTEX_BUFFER_BIT"; +#ifdef VK_ENABLE_BETA_EXTENSIONS + case VK_BUFFER_USAGE_VIDEO_DECODE_DST_BIT_KHR: + return "VK_BUFFER_USAGE_VIDEO_DECODE_DST_BIT_KHR"; +#endif // VK_ENABLE_BETA_EXTENSIONS +#ifdef VK_ENABLE_BETA_EXTENSIONS + case VK_BUFFER_USAGE_VIDEO_DECODE_SRC_BIT_KHR: + return "VK_BUFFER_USAGE_VIDEO_DECODE_SRC_BIT_KHR"; +#endif // VK_ENABLE_BETA_EXTENSIONS +#ifdef VK_ENABLE_BETA_EXTENSIONS + case VK_BUFFER_USAGE_VIDEO_ENCODE_DST_BIT_KHR: + return "VK_BUFFER_USAGE_VIDEO_ENCODE_DST_BIT_KHR"; +#endif // VK_ENABLE_BETA_EXTENSIONS +#ifdef VK_ENABLE_BETA_EXTENSIONS + case VK_BUFFER_USAGE_VIDEO_ENCODE_SRC_BIT_KHR: + return "VK_BUFFER_USAGE_VIDEO_ENCODE_SRC_BIT_KHR"; +#endif // VK_ENABLE_BETA_EXTENSIONS + default: + return "Unhandled VkBufferUsageFlagBits"; + } +} + +static inline std::string string_VkBufferUsageFlags(VkBufferUsageFlags input_value) +{ + std::string ret; + int index = 0; + while(input_value) { + if (input_value & 1) { + if( !ret.empty()) ret.append("|"); + ret.append(string_VkBufferUsageFlagBits(static_cast(1U << index))); + } + ++index; + input_value >>= 1; + } + if( ret.empty()) ret.append(string_VkBufferUsageFlagBits(static_cast(0))); + return ret; +} + +static inline const char* string_VkSharingMode(VkSharingMode input_value) +{ + switch (input_value) + { + case VK_SHARING_MODE_CONCURRENT: + return "VK_SHARING_MODE_CONCURRENT"; + case VK_SHARING_MODE_EXCLUSIVE: + return "VK_SHARING_MODE_EXCLUSIVE"; + default: + return "Unhandled VkSharingMode"; + } +} + +static inline const char* string_VkComponentSwizzle(VkComponentSwizzle input_value) +{ + switch (input_value) + { + case VK_COMPONENT_SWIZZLE_A: + return "VK_COMPONENT_SWIZZLE_A"; + case VK_COMPONENT_SWIZZLE_B: + return "VK_COMPONENT_SWIZZLE_B"; + case VK_COMPONENT_SWIZZLE_G: + return "VK_COMPONENT_SWIZZLE_G"; + case VK_COMPONENT_SWIZZLE_IDENTITY: + return "VK_COMPONENT_SWIZZLE_IDENTITY"; + case VK_COMPONENT_SWIZZLE_ONE: + return "VK_COMPONENT_SWIZZLE_ONE"; + case VK_COMPONENT_SWIZZLE_R: + return "VK_COMPONENT_SWIZZLE_R"; + case VK_COMPONENT_SWIZZLE_ZERO: + return "VK_COMPONENT_SWIZZLE_ZERO"; + default: + return "Unhandled VkComponentSwizzle"; + } +} + +static inline const char* string_VkImageViewCreateFlagBits(VkImageViewCreateFlagBits input_value) +{ + switch (input_value) + { + case VK_IMAGE_VIEW_CREATE_FRAGMENT_DENSITY_MAP_DEFERRED_BIT_EXT: + return "VK_IMAGE_VIEW_CREATE_FRAGMENT_DENSITY_MAP_DEFERRED_BIT_EXT"; + case VK_IMAGE_VIEW_CREATE_FRAGMENT_DENSITY_MAP_DYNAMIC_BIT_EXT: + return "VK_IMAGE_VIEW_CREATE_FRAGMENT_DENSITY_MAP_DYNAMIC_BIT_EXT"; + default: + return "Unhandled VkImageViewCreateFlagBits"; + } +} + +static inline std::string string_VkImageViewCreateFlags(VkImageViewCreateFlags input_value) +{ + std::string ret; + int index = 0; + while(input_value) { + if (input_value & 1) { + if( !ret.empty()) ret.append("|"); + ret.append(string_VkImageViewCreateFlagBits(static_cast(1U << index))); + } + ++index; + input_value >>= 1; + } + if( ret.empty()) ret.append(string_VkImageViewCreateFlagBits(static_cast(0))); + return ret; +} + +static inline const char* string_VkImageViewType(VkImageViewType input_value) +{ + switch (input_value) + { + case VK_IMAGE_VIEW_TYPE_1D: + return "VK_IMAGE_VIEW_TYPE_1D"; + case VK_IMAGE_VIEW_TYPE_1D_ARRAY: + return "VK_IMAGE_VIEW_TYPE_1D_ARRAY"; + case VK_IMAGE_VIEW_TYPE_2D: + return "VK_IMAGE_VIEW_TYPE_2D"; + case VK_IMAGE_VIEW_TYPE_2D_ARRAY: + return "VK_IMAGE_VIEW_TYPE_2D_ARRAY"; + case VK_IMAGE_VIEW_TYPE_3D: + return "VK_IMAGE_VIEW_TYPE_3D"; + case VK_IMAGE_VIEW_TYPE_CUBE: + return "VK_IMAGE_VIEW_TYPE_CUBE"; + case VK_IMAGE_VIEW_TYPE_CUBE_ARRAY: + return "VK_IMAGE_VIEW_TYPE_CUBE_ARRAY"; + default: + return "Unhandled VkImageViewType"; + } +} + +static inline const char* string_VkPipelineCacheCreateFlagBits(VkPipelineCacheCreateFlagBits input_value) +{ + switch (input_value) + { + case VK_PIPELINE_CACHE_CREATE_EXTERNALLY_SYNCHRONIZED_BIT_EXT: + return "VK_PIPELINE_CACHE_CREATE_EXTERNALLY_SYNCHRONIZED_BIT_EXT"; + default: + return "Unhandled VkPipelineCacheCreateFlagBits"; + } +} + +static inline std::string string_VkPipelineCacheCreateFlags(VkPipelineCacheCreateFlags input_value) +{ + std::string ret; + int index = 0; + while(input_value) { + if (input_value & 1) { + if( !ret.empty()) ret.append("|"); + ret.append(string_VkPipelineCacheCreateFlagBits(static_cast(1U << index))); + } + ++index; + input_value >>= 1; + } + if( ret.empty()) ret.append(string_VkPipelineCacheCreateFlagBits(static_cast(0))); + return ret; +} + +static inline const char* string_VkBlendFactor(VkBlendFactor input_value) +{ + switch (input_value) + { + case VK_BLEND_FACTOR_CONSTANT_ALPHA: + return "VK_BLEND_FACTOR_CONSTANT_ALPHA"; + case VK_BLEND_FACTOR_CONSTANT_COLOR: + return "VK_BLEND_FACTOR_CONSTANT_COLOR"; + case VK_BLEND_FACTOR_DST_ALPHA: + return "VK_BLEND_FACTOR_DST_ALPHA"; + case VK_BLEND_FACTOR_DST_COLOR: + return "VK_BLEND_FACTOR_DST_COLOR"; + case VK_BLEND_FACTOR_ONE: + return "VK_BLEND_FACTOR_ONE"; + case VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA: + return "VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA"; + case VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_COLOR: + return "VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_COLOR"; + case VK_BLEND_FACTOR_ONE_MINUS_DST_ALPHA: + return "VK_BLEND_FACTOR_ONE_MINUS_DST_ALPHA"; + case VK_BLEND_FACTOR_ONE_MINUS_DST_COLOR: + return "VK_BLEND_FACTOR_ONE_MINUS_DST_COLOR"; + case VK_BLEND_FACTOR_ONE_MINUS_SRC1_ALPHA: + return "VK_BLEND_FACTOR_ONE_MINUS_SRC1_ALPHA"; + case VK_BLEND_FACTOR_ONE_MINUS_SRC1_COLOR: + return "VK_BLEND_FACTOR_ONE_MINUS_SRC1_COLOR"; + case VK_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA: + return "VK_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA"; + case VK_BLEND_FACTOR_ONE_MINUS_SRC_COLOR: + return "VK_BLEND_FACTOR_ONE_MINUS_SRC_COLOR"; + case VK_BLEND_FACTOR_SRC1_ALPHA: + return "VK_BLEND_FACTOR_SRC1_ALPHA"; + case VK_BLEND_FACTOR_SRC1_COLOR: + return "VK_BLEND_FACTOR_SRC1_COLOR"; + case VK_BLEND_FACTOR_SRC_ALPHA: + return "VK_BLEND_FACTOR_SRC_ALPHA"; + case VK_BLEND_FACTOR_SRC_ALPHA_SATURATE: + return "VK_BLEND_FACTOR_SRC_ALPHA_SATURATE"; + case VK_BLEND_FACTOR_SRC_COLOR: + return "VK_BLEND_FACTOR_SRC_COLOR"; + case VK_BLEND_FACTOR_ZERO: + return "VK_BLEND_FACTOR_ZERO"; + default: + return "Unhandled VkBlendFactor"; + } +} + +static inline const char* string_VkBlendOp(VkBlendOp input_value) +{ + switch (input_value) + { + case VK_BLEND_OP_ADD: + return "VK_BLEND_OP_ADD"; + case VK_BLEND_OP_BLUE_EXT: + return "VK_BLEND_OP_BLUE_EXT"; + case VK_BLEND_OP_COLORBURN_EXT: + return "VK_BLEND_OP_COLORBURN_EXT"; + case VK_BLEND_OP_COLORDODGE_EXT: + return "VK_BLEND_OP_COLORDODGE_EXT"; + case VK_BLEND_OP_CONTRAST_EXT: + return "VK_BLEND_OP_CONTRAST_EXT"; + case VK_BLEND_OP_DARKEN_EXT: + return "VK_BLEND_OP_DARKEN_EXT"; + case VK_BLEND_OP_DIFFERENCE_EXT: + return "VK_BLEND_OP_DIFFERENCE_EXT"; + case VK_BLEND_OP_DST_ATOP_EXT: + return "VK_BLEND_OP_DST_ATOP_EXT"; + case VK_BLEND_OP_DST_EXT: + return "VK_BLEND_OP_DST_EXT"; + case VK_BLEND_OP_DST_IN_EXT: + return "VK_BLEND_OP_DST_IN_EXT"; + case VK_BLEND_OP_DST_OUT_EXT: + return "VK_BLEND_OP_DST_OUT_EXT"; + case VK_BLEND_OP_DST_OVER_EXT: + return "VK_BLEND_OP_DST_OVER_EXT"; + case VK_BLEND_OP_EXCLUSION_EXT: + return "VK_BLEND_OP_EXCLUSION_EXT"; + case VK_BLEND_OP_GREEN_EXT: + return "VK_BLEND_OP_GREEN_EXT"; + case VK_BLEND_OP_HARDLIGHT_EXT: + return "VK_BLEND_OP_HARDLIGHT_EXT"; + case VK_BLEND_OP_HARDMIX_EXT: + return "VK_BLEND_OP_HARDMIX_EXT"; + case VK_BLEND_OP_HSL_COLOR_EXT: + return "VK_BLEND_OP_HSL_COLOR_EXT"; + case VK_BLEND_OP_HSL_HUE_EXT: + return "VK_BLEND_OP_HSL_HUE_EXT"; + case VK_BLEND_OP_HSL_LUMINOSITY_EXT: + return "VK_BLEND_OP_HSL_LUMINOSITY_EXT"; + case VK_BLEND_OP_HSL_SATURATION_EXT: + return "VK_BLEND_OP_HSL_SATURATION_EXT"; + case VK_BLEND_OP_INVERT_EXT: + return "VK_BLEND_OP_INVERT_EXT"; + case VK_BLEND_OP_INVERT_OVG_EXT: + return "VK_BLEND_OP_INVERT_OVG_EXT"; + case VK_BLEND_OP_INVERT_RGB_EXT: + return "VK_BLEND_OP_INVERT_RGB_EXT"; + case VK_BLEND_OP_LIGHTEN_EXT: + return "VK_BLEND_OP_LIGHTEN_EXT"; + case VK_BLEND_OP_LINEARBURN_EXT: + return "VK_BLEND_OP_LINEARBURN_EXT"; + case VK_BLEND_OP_LINEARDODGE_EXT: + return "VK_BLEND_OP_LINEARDODGE_EXT"; + case VK_BLEND_OP_LINEARLIGHT_EXT: + return "VK_BLEND_OP_LINEARLIGHT_EXT"; + case VK_BLEND_OP_MAX: + return "VK_BLEND_OP_MAX"; + case VK_BLEND_OP_MIN: + return "VK_BLEND_OP_MIN"; + case VK_BLEND_OP_MINUS_CLAMPED_EXT: + return "VK_BLEND_OP_MINUS_CLAMPED_EXT"; + case VK_BLEND_OP_MINUS_EXT: + return "VK_BLEND_OP_MINUS_EXT"; + case VK_BLEND_OP_MULTIPLY_EXT: + return "VK_BLEND_OP_MULTIPLY_EXT"; + case VK_BLEND_OP_OVERLAY_EXT: + return "VK_BLEND_OP_OVERLAY_EXT"; + case VK_BLEND_OP_PINLIGHT_EXT: + return "VK_BLEND_OP_PINLIGHT_EXT"; + case VK_BLEND_OP_PLUS_CLAMPED_ALPHA_EXT: + return "VK_BLEND_OP_PLUS_CLAMPED_ALPHA_EXT"; + case VK_BLEND_OP_PLUS_CLAMPED_EXT: + return "VK_BLEND_OP_PLUS_CLAMPED_EXT"; + case VK_BLEND_OP_PLUS_DARKER_EXT: + return "VK_BLEND_OP_PLUS_DARKER_EXT"; + case VK_BLEND_OP_PLUS_EXT: + return "VK_BLEND_OP_PLUS_EXT"; + case VK_BLEND_OP_RED_EXT: + return "VK_BLEND_OP_RED_EXT"; + case VK_BLEND_OP_REVERSE_SUBTRACT: + return "VK_BLEND_OP_REVERSE_SUBTRACT"; + case VK_BLEND_OP_SCREEN_EXT: + return "VK_BLEND_OP_SCREEN_EXT"; + case VK_BLEND_OP_SOFTLIGHT_EXT: + return "VK_BLEND_OP_SOFTLIGHT_EXT"; + case VK_BLEND_OP_SRC_ATOP_EXT: + return "VK_BLEND_OP_SRC_ATOP_EXT"; + case VK_BLEND_OP_SRC_EXT: + return "VK_BLEND_OP_SRC_EXT"; + case VK_BLEND_OP_SRC_IN_EXT: + return "VK_BLEND_OP_SRC_IN_EXT"; + case VK_BLEND_OP_SRC_OUT_EXT: + return "VK_BLEND_OP_SRC_OUT_EXT"; + case VK_BLEND_OP_SRC_OVER_EXT: + return "VK_BLEND_OP_SRC_OVER_EXT"; + case VK_BLEND_OP_SUBTRACT: + return "VK_BLEND_OP_SUBTRACT"; + case VK_BLEND_OP_VIVIDLIGHT_EXT: + return "VK_BLEND_OP_VIVIDLIGHT_EXT"; + case VK_BLEND_OP_XOR_EXT: + return "VK_BLEND_OP_XOR_EXT"; + case VK_BLEND_OP_ZERO_EXT: + return "VK_BLEND_OP_ZERO_EXT"; + default: + return "Unhandled VkBlendOp"; + } +} + +static inline const char* string_VkColorComponentFlagBits(VkColorComponentFlagBits input_value) +{ + switch (input_value) + { + case VK_COLOR_COMPONENT_A_BIT: + return "VK_COLOR_COMPONENT_A_BIT"; + case VK_COLOR_COMPONENT_B_BIT: + return "VK_COLOR_COMPONENT_B_BIT"; + case VK_COLOR_COMPONENT_G_BIT: + return "VK_COLOR_COMPONENT_G_BIT"; + case VK_COLOR_COMPONENT_R_BIT: + return "VK_COLOR_COMPONENT_R_BIT"; + default: + return "Unhandled VkColorComponentFlagBits"; + } +} + +static inline std::string string_VkColorComponentFlags(VkColorComponentFlags input_value) +{ + std::string ret; + int index = 0; + while(input_value) { + if (input_value & 1) { + if( !ret.empty()) ret.append("|"); + ret.append(string_VkColorComponentFlagBits(static_cast(1U << index))); + } + ++index; + input_value >>= 1; + } + if( ret.empty()) ret.append(string_VkColorComponentFlagBits(static_cast(0))); + return ret; +} + +static inline const char* string_VkCompareOp(VkCompareOp input_value) +{ + switch (input_value) + { + case VK_COMPARE_OP_ALWAYS: + return "VK_COMPARE_OP_ALWAYS"; + case VK_COMPARE_OP_EQUAL: + return "VK_COMPARE_OP_EQUAL"; + case VK_COMPARE_OP_GREATER: + return "VK_COMPARE_OP_GREATER"; + case VK_COMPARE_OP_GREATER_OR_EQUAL: + return "VK_COMPARE_OP_GREATER_OR_EQUAL"; + case VK_COMPARE_OP_LESS: + return "VK_COMPARE_OP_LESS"; + case VK_COMPARE_OP_LESS_OR_EQUAL: + return "VK_COMPARE_OP_LESS_OR_EQUAL"; + case VK_COMPARE_OP_NEVER: + return "VK_COMPARE_OP_NEVER"; + case VK_COMPARE_OP_NOT_EQUAL: + return "VK_COMPARE_OP_NOT_EQUAL"; + default: + return "Unhandled VkCompareOp"; + } +} + +static inline const char* string_VkPipelineCreateFlagBits(VkPipelineCreateFlagBits input_value) +{ + switch (input_value) + { + case VK_PIPELINE_CREATE_ALLOW_DERIVATIVES_BIT: + return "VK_PIPELINE_CREATE_ALLOW_DERIVATIVES_BIT"; + case VK_PIPELINE_CREATE_CAPTURE_INTERNAL_REPRESENTATIONS_BIT_KHR: + return "VK_PIPELINE_CREATE_CAPTURE_INTERNAL_REPRESENTATIONS_BIT_KHR"; + case VK_PIPELINE_CREATE_CAPTURE_STATISTICS_BIT_KHR: + return "VK_PIPELINE_CREATE_CAPTURE_STATISTICS_BIT_KHR"; + case VK_PIPELINE_CREATE_DEFER_COMPILE_BIT_NV: + return "VK_PIPELINE_CREATE_DEFER_COMPILE_BIT_NV"; + case VK_PIPELINE_CREATE_DERIVATIVE_BIT: + return "VK_PIPELINE_CREATE_DERIVATIVE_BIT"; + case VK_PIPELINE_CREATE_DISABLE_OPTIMIZATION_BIT: + return "VK_PIPELINE_CREATE_DISABLE_OPTIMIZATION_BIT"; + case VK_PIPELINE_CREATE_DISPATCH_BASE_BIT: + return "VK_PIPELINE_CREATE_DISPATCH_BASE_BIT"; + case VK_PIPELINE_CREATE_EARLY_RETURN_ON_FAILURE_BIT_EXT: + return "VK_PIPELINE_CREATE_EARLY_RETURN_ON_FAILURE_BIT_EXT"; + case VK_PIPELINE_CREATE_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT_EXT: + return "VK_PIPELINE_CREATE_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT_EXT"; + case VK_PIPELINE_CREATE_INDIRECT_BINDABLE_BIT_NV: + return "VK_PIPELINE_CREATE_INDIRECT_BINDABLE_BIT_NV"; + case VK_PIPELINE_CREATE_LIBRARY_BIT_KHR: + return "VK_PIPELINE_CREATE_LIBRARY_BIT_KHR"; + case VK_PIPELINE_CREATE_RAY_TRACING_ALLOW_MOTION_BIT_NV: + return "VK_PIPELINE_CREATE_RAY_TRACING_ALLOW_MOTION_BIT_NV"; + case VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_ANY_HIT_SHADERS_BIT_KHR: + return "VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_ANY_HIT_SHADERS_BIT_KHR"; + case VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_CLOSEST_HIT_SHADERS_BIT_KHR: + return "VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_CLOSEST_HIT_SHADERS_BIT_KHR"; + case VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_INTERSECTION_SHADERS_BIT_KHR: + return "VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_INTERSECTION_SHADERS_BIT_KHR"; + case VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_MISS_SHADERS_BIT_KHR: + return "VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_MISS_SHADERS_BIT_KHR"; + case VK_PIPELINE_CREATE_RAY_TRACING_SHADER_GROUP_HANDLE_CAPTURE_REPLAY_BIT_KHR: + return "VK_PIPELINE_CREATE_RAY_TRACING_SHADER_GROUP_HANDLE_CAPTURE_REPLAY_BIT_KHR"; + case VK_PIPELINE_CREATE_RAY_TRACING_SKIP_AABBS_BIT_KHR: + return "VK_PIPELINE_CREATE_RAY_TRACING_SKIP_AABBS_BIT_KHR"; + case VK_PIPELINE_CREATE_RAY_TRACING_SKIP_TRIANGLES_BIT_KHR: + return "VK_PIPELINE_CREATE_RAY_TRACING_SKIP_TRIANGLES_BIT_KHR"; + case VK_PIPELINE_CREATE_VIEW_INDEX_FROM_DEVICE_INDEX_BIT: + return "VK_PIPELINE_CREATE_VIEW_INDEX_FROM_DEVICE_INDEX_BIT"; + default: + return "Unhandled VkPipelineCreateFlagBits"; + } +} + +static inline std::string string_VkPipelineCreateFlags(VkPipelineCreateFlags input_value) +{ + std::string ret; + int index = 0; + while(input_value) { + if (input_value & 1) { + if( !ret.empty()) ret.append("|"); + ret.append(string_VkPipelineCreateFlagBits(static_cast(1U << index))); + } + ++index; + input_value >>= 1; + } + if( ret.empty()) ret.append(string_VkPipelineCreateFlagBits(static_cast(0))); + return ret; +} + +static inline const char* string_VkPipelineShaderStageCreateFlagBits(VkPipelineShaderStageCreateFlagBits input_value) +{ + switch (input_value) + { + case VK_PIPELINE_SHADER_STAGE_CREATE_ALLOW_VARYING_SUBGROUP_SIZE_BIT_EXT: + return "VK_PIPELINE_SHADER_STAGE_CREATE_ALLOW_VARYING_SUBGROUP_SIZE_BIT_EXT"; + case VK_PIPELINE_SHADER_STAGE_CREATE_REQUIRE_FULL_SUBGROUPS_BIT_EXT: + return "VK_PIPELINE_SHADER_STAGE_CREATE_REQUIRE_FULL_SUBGROUPS_BIT_EXT"; + default: + return "Unhandled VkPipelineShaderStageCreateFlagBits"; + } +} + +static inline std::string string_VkPipelineShaderStageCreateFlags(VkPipelineShaderStageCreateFlags input_value) +{ + std::string ret; + int index = 0; + while(input_value) { + if (input_value & 1) { + if( !ret.empty()) ret.append("|"); + ret.append(string_VkPipelineShaderStageCreateFlagBits(static_cast(1U << index))); + } + ++index; + input_value >>= 1; + } + if( ret.empty()) ret.append(string_VkPipelineShaderStageCreateFlagBits(static_cast(0))); + return ret; +} + +static inline const char* string_VkShaderStageFlagBits(VkShaderStageFlagBits input_value) +{ + switch (input_value) + { + case VK_SHADER_STAGE_ALL: + return "VK_SHADER_STAGE_ALL"; + case VK_SHADER_STAGE_ALL_GRAPHICS: + return "VK_SHADER_STAGE_ALL_GRAPHICS"; + case VK_SHADER_STAGE_ANY_HIT_BIT_KHR: + return "VK_SHADER_STAGE_ANY_HIT_BIT_KHR"; + case VK_SHADER_STAGE_CALLABLE_BIT_KHR: + return "VK_SHADER_STAGE_CALLABLE_BIT_KHR"; + case VK_SHADER_STAGE_CLOSEST_HIT_BIT_KHR: + return "VK_SHADER_STAGE_CLOSEST_HIT_BIT_KHR"; + case VK_SHADER_STAGE_COMPUTE_BIT: + return "VK_SHADER_STAGE_COMPUTE_BIT"; + case VK_SHADER_STAGE_FRAGMENT_BIT: + return "VK_SHADER_STAGE_FRAGMENT_BIT"; + case VK_SHADER_STAGE_GEOMETRY_BIT: + return "VK_SHADER_STAGE_GEOMETRY_BIT"; + case VK_SHADER_STAGE_INTERSECTION_BIT_KHR: + return "VK_SHADER_STAGE_INTERSECTION_BIT_KHR"; + case VK_SHADER_STAGE_MESH_BIT_NV: + return "VK_SHADER_STAGE_MESH_BIT_NV"; + case VK_SHADER_STAGE_MISS_BIT_KHR: + return "VK_SHADER_STAGE_MISS_BIT_KHR"; + case VK_SHADER_STAGE_RAYGEN_BIT_KHR: + return "VK_SHADER_STAGE_RAYGEN_BIT_KHR"; + case VK_SHADER_STAGE_SUBPASS_SHADING_BIT_HUAWEI: + return "VK_SHADER_STAGE_SUBPASS_SHADING_BIT_HUAWEI"; + case VK_SHADER_STAGE_TASK_BIT_NV: + return "VK_SHADER_STAGE_TASK_BIT_NV"; + case VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT: + return "VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT"; + case VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT: + return "VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT"; + case VK_SHADER_STAGE_VERTEX_BIT: + return "VK_SHADER_STAGE_VERTEX_BIT"; + default: + return "Unhandled VkShaderStageFlagBits"; + } +} + +static inline std::string string_VkShaderStageFlags(VkShaderStageFlags input_value) +{ + std::string ret; + int index = 0; + while(input_value) { + if (input_value & 1) { + if( !ret.empty()) ret.append("|"); + ret.append(string_VkShaderStageFlagBits(static_cast(1U << index))); + } + ++index; + input_value >>= 1; + } + if( ret.empty()) ret.append(string_VkShaderStageFlagBits(static_cast(0))); + return ret; +} + +static inline const char* string_VkCullModeFlagBits(VkCullModeFlagBits input_value) +{ + switch (input_value) + { + case VK_CULL_MODE_BACK_BIT: + return "VK_CULL_MODE_BACK_BIT"; + case VK_CULL_MODE_FRONT_AND_BACK: + return "VK_CULL_MODE_FRONT_AND_BACK"; + case VK_CULL_MODE_FRONT_BIT: + return "VK_CULL_MODE_FRONT_BIT"; + case VK_CULL_MODE_NONE: + return "VK_CULL_MODE_NONE"; + default: + return "Unhandled VkCullModeFlagBits"; + } +} + +static inline std::string string_VkCullModeFlags(VkCullModeFlags input_value) +{ + std::string ret; + int index = 0; + while(input_value) { + if (input_value & 1) { + if( !ret.empty()) ret.append("|"); + ret.append(string_VkCullModeFlagBits(static_cast(1U << index))); + } + ++index; + input_value >>= 1; + } + if( ret.empty()) ret.append(string_VkCullModeFlagBits(static_cast(0))); + return ret; +} + +static inline const char* string_VkDynamicState(VkDynamicState input_value) +{ + switch (input_value) + { + case VK_DYNAMIC_STATE_BLEND_CONSTANTS: + return "VK_DYNAMIC_STATE_BLEND_CONSTANTS"; + case VK_DYNAMIC_STATE_COLOR_WRITE_ENABLE_EXT: + return "VK_DYNAMIC_STATE_COLOR_WRITE_ENABLE_EXT"; + case VK_DYNAMIC_STATE_CULL_MODE_EXT: + return "VK_DYNAMIC_STATE_CULL_MODE_EXT"; + case VK_DYNAMIC_STATE_DEPTH_BIAS: + return "VK_DYNAMIC_STATE_DEPTH_BIAS"; + case VK_DYNAMIC_STATE_DEPTH_BIAS_ENABLE_EXT: + return "VK_DYNAMIC_STATE_DEPTH_BIAS_ENABLE_EXT"; + case VK_DYNAMIC_STATE_DEPTH_BOUNDS: + return "VK_DYNAMIC_STATE_DEPTH_BOUNDS"; + case VK_DYNAMIC_STATE_DEPTH_BOUNDS_TEST_ENABLE_EXT: + return "VK_DYNAMIC_STATE_DEPTH_BOUNDS_TEST_ENABLE_EXT"; + case VK_DYNAMIC_STATE_DEPTH_COMPARE_OP_EXT: + return "VK_DYNAMIC_STATE_DEPTH_COMPARE_OP_EXT"; + case VK_DYNAMIC_STATE_DEPTH_TEST_ENABLE_EXT: + return "VK_DYNAMIC_STATE_DEPTH_TEST_ENABLE_EXT"; + case VK_DYNAMIC_STATE_DEPTH_WRITE_ENABLE_EXT: + return "VK_DYNAMIC_STATE_DEPTH_WRITE_ENABLE_EXT"; + case VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT: + return "VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT"; + case VK_DYNAMIC_STATE_EXCLUSIVE_SCISSOR_NV: + return "VK_DYNAMIC_STATE_EXCLUSIVE_SCISSOR_NV"; + case VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR: + return "VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR"; + case VK_DYNAMIC_STATE_FRONT_FACE_EXT: + return "VK_DYNAMIC_STATE_FRONT_FACE_EXT"; + case VK_DYNAMIC_STATE_LINE_STIPPLE_EXT: + return "VK_DYNAMIC_STATE_LINE_STIPPLE_EXT"; + case VK_DYNAMIC_STATE_LINE_WIDTH: + return "VK_DYNAMIC_STATE_LINE_WIDTH"; + case VK_DYNAMIC_STATE_LOGIC_OP_EXT: + return "VK_DYNAMIC_STATE_LOGIC_OP_EXT"; + case VK_DYNAMIC_STATE_PATCH_CONTROL_POINTS_EXT: + return "VK_DYNAMIC_STATE_PATCH_CONTROL_POINTS_EXT"; + case VK_DYNAMIC_STATE_PRIMITIVE_RESTART_ENABLE_EXT: + return "VK_DYNAMIC_STATE_PRIMITIVE_RESTART_ENABLE_EXT"; + case VK_DYNAMIC_STATE_PRIMITIVE_TOPOLOGY_EXT: + return "VK_DYNAMIC_STATE_PRIMITIVE_TOPOLOGY_EXT"; + case VK_DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE_EXT: + return "VK_DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE_EXT"; + case VK_DYNAMIC_STATE_RAY_TRACING_PIPELINE_STACK_SIZE_KHR: + return "VK_DYNAMIC_STATE_RAY_TRACING_PIPELINE_STACK_SIZE_KHR"; + case VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT: + return "VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT"; + case VK_DYNAMIC_STATE_SCISSOR: + return "VK_DYNAMIC_STATE_SCISSOR"; + case VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT_EXT: + return "VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT_EXT"; + case VK_DYNAMIC_STATE_STENCIL_COMPARE_MASK: + return "VK_DYNAMIC_STATE_STENCIL_COMPARE_MASK"; + case VK_DYNAMIC_STATE_STENCIL_OP_EXT: + return "VK_DYNAMIC_STATE_STENCIL_OP_EXT"; + case VK_DYNAMIC_STATE_STENCIL_REFERENCE: + return "VK_DYNAMIC_STATE_STENCIL_REFERENCE"; + case VK_DYNAMIC_STATE_STENCIL_TEST_ENABLE_EXT: + return "VK_DYNAMIC_STATE_STENCIL_TEST_ENABLE_EXT"; + case VK_DYNAMIC_STATE_STENCIL_WRITE_MASK: + return "VK_DYNAMIC_STATE_STENCIL_WRITE_MASK"; + case VK_DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE_EXT: + return "VK_DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE_EXT"; + case VK_DYNAMIC_STATE_VERTEX_INPUT_EXT: + return "VK_DYNAMIC_STATE_VERTEX_INPUT_EXT"; + case VK_DYNAMIC_STATE_VIEWPORT: + return "VK_DYNAMIC_STATE_VIEWPORT"; + case VK_DYNAMIC_STATE_VIEWPORT_COARSE_SAMPLE_ORDER_NV: + return "VK_DYNAMIC_STATE_VIEWPORT_COARSE_SAMPLE_ORDER_NV"; + case VK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV: + return "VK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV"; + case VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT: + return "VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT"; + case VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV: + return "VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV"; + default: + return "Unhandled VkDynamicState"; + } +} + +static inline const char* string_VkFrontFace(VkFrontFace input_value) +{ + switch (input_value) + { + case VK_FRONT_FACE_CLOCKWISE: + return "VK_FRONT_FACE_CLOCKWISE"; + case VK_FRONT_FACE_COUNTER_CLOCKWISE: + return "VK_FRONT_FACE_COUNTER_CLOCKWISE"; + default: + return "Unhandled VkFrontFace"; + } +} + +static inline const char* string_VkVertexInputRate(VkVertexInputRate input_value) +{ + switch (input_value) + { + case VK_VERTEX_INPUT_RATE_INSTANCE: + return "VK_VERTEX_INPUT_RATE_INSTANCE"; + case VK_VERTEX_INPUT_RATE_VERTEX: + return "VK_VERTEX_INPUT_RATE_VERTEX"; + default: + return "Unhandled VkVertexInputRate"; + } +} + +static inline const char* string_VkPrimitiveTopology(VkPrimitiveTopology input_value) +{ + switch (input_value) + { + case VK_PRIMITIVE_TOPOLOGY_LINE_LIST: + return "VK_PRIMITIVE_TOPOLOGY_LINE_LIST"; + case VK_PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY: + return "VK_PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY"; + case VK_PRIMITIVE_TOPOLOGY_LINE_STRIP: + return "VK_PRIMITIVE_TOPOLOGY_LINE_STRIP"; + case VK_PRIMITIVE_TOPOLOGY_LINE_STRIP_WITH_ADJACENCY: + return "VK_PRIMITIVE_TOPOLOGY_LINE_STRIP_WITH_ADJACENCY"; + case VK_PRIMITIVE_TOPOLOGY_PATCH_LIST: + return "VK_PRIMITIVE_TOPOLOGY_PATCH_LIST"; + case VK_PRIMITIVE_TOPOLOGY_POINT_LIST: + return "VK_PRIMITIVE_TOPOLOGY_POINT_LIST"; + case VK_PRIMITIVE_TOPOLOGY_TRIANGLE_FAN: + return "VK_PRIMITIVE_TOPOLOGY_TRIANGLE_FAN"; + case VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST: + return "VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST"; + case VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY: + return "VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY"; + case VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP: + return "VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP"; + case VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP_WITH_ADJACENCY: + return "VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP_WITH_ADJACENCY"; + default: + return "Unhandled VkPrimitiveTopology"; + } +} + +static inline const char* string_VkPolygonMode(VkPolygonMode input_value) +{ + switch (input_value) + { + case VK_POLYGON_MODE_FILL: + return "VK_POLYGON_MODE_FILL"; + case VK_POLYGON_MODE_FILL_RECTANGLE_NV: + return "VK_POLYGON_MODE_FILL_RECTANGLE_NV"; + case VK_POLYGON_MODE_LINE: + return "VK_POLYGON_MODE_LINE"; + case VK_POLYGON_MODE_POINT: + return "VK_POLYGON_MODE_POINT"; + default: + return "Unhandled VkPolygonMode"; + } +} + +static inline const char* string_VkStencilOp(VkStencilOp input_value) +{ + switch (input_value) + { + case VK_STENCIL_OP_DECREMENT_AND_CLAMP: + return "VK_STENCIL_OP_DECREMENT_AND_CLAMP"; + case VK_STENCIL_OP_DECREMENT_AND_WRAP: + return "VK_STENCIL_OP_DECREMENT_AND_WRAP"; + case VK_STENCIL_OP_INCREMENT_AND_CLAMP: + return "VK_STENCIL_OP_INCREMENT_AND_CLAMP"; + case VK_STENCIL_OP_INCREMENT_AND_WRAP: + return "VK_STENCIL_OP_INCREMENT_AND_WRAP"; + case VK_STENCIL_OP_INVERT: + return "VK_STENCIL_OP_INVERT"; + case VK_STENCIL_OP_KEEP: + return "VK_STENCIL_OP_KEEP"; + case VK_STENCIL_OP_REPLACE: + return "VK_STENCIL_OP_REPLACE"; + case VK_STENCIL_OP_ZERO: + return "VK_STENCIL_OP_ZERO"; + default: + return "Unhandled VkStencilOp"; + } +} + +static inline const char* string_VkLogicOp(VkLogicOp input_value) +{ + switch (input_value) + { + case VK_LOGIC_OP_AND: + return "VK_LOGIC_OP_AND"; + case VK_LOGIC_OP_AND_INVERTED: + return "VK_LOGIC_OP_AND_INVERTED"; + case VK_LOGIC_OP_AND_REVERSE: + return "VK_LOGIC_OP_AND_REVERSE"; + case VK_LOGIC_OP_CLEAR: + return "VK_LOGIC_OP_CLEAR"; + case VK_LOGIC_OP_COPY: + return "VK_LOGIC_OP_COPY"; + case VK_LOGIC_OP_COPY_INVERTED: + return "VK_LOGIC_OP_COPY_INVERTED"; + case VK_LOGIC_OP_EQUIVALENT: + return "VK_LOGIC_OP_EQUIVALENT"; + case VK_LOGIC_OP_INVERT: + return "VK_LOGIC_OP_INVERT"; + case VK_LOGIC_OP_NAND: + return "VK_LOGIC_OP_NAND"; + case VK_LOGIC_OP_NOR: + return "VK_LOGIC_OP_NOR"; + case VK_LOGIC_OP_NO_OP: + return "VK_LOGIC_OP_NO_OP"; + case VK_LOGIC_OP_OR: + return "VK_LOGIC_OP_OR"; + case VK_LOGIC_OP_OR_INVERTED: + return "VK_LOGIC_OP_OR_INVERTED"; + case VK_LOGIC_OP_OR_REVERSE: + return "VK_LOGIC_OP_OR_REVERSE"; + case VK_LOGIC_OP_SET: + return "VK_LOGIC_OP_SET"; + case VK_LOGIC_OP_XOR: + return "VK_LOGIC_OP_XOR"; + default: + return "Unhandled VkLogicOp"; + } +} + +static inline const char* string_VkBorderColor(VkBorderColor input_value) +{ + switch (input_value) + { + case VK_BORDER_COLOR_FLOAT_CUSTOM_EXT: + return "VK_BORDER_COLOR_FLOAT_CUSTOM_EXT"; + case VK_BORDER_COLOR_FLOAT_OPAQUE_BLACK: + return "VK_BORDER_COLOR_FLOAT_OPAQUE_BLACK"; + case VK_BORDER_COLOR_FLOAT_OPAQUE_WHITE: + return "VK_BORDER_COLOR_FLOAT_OPAQUE_WHITE"; + case VK_BORDER_COLOR_FLOAT_TRANSPARENT_BLACK: + return "VK_BORDER_COLOR_FLOAT_TRANSPARENT_BLACK"; + case VK_BORDER_COLOR_INT_CUSTOM_EXT: + return "VK_BORDER_COLOR_INT_CUSTOM_EXT"; + case VK_BORDER_COLOR_INT_OPAQUE_BLACK: + return "VK_BORDER_COLOR_INT_OPAQUE_BLACK"; + case VK_BORDER_COLOR_INT_OPAQUE_WHITE: + return "VK_BORDER_COLOR_INT_OPAQUE_WHITE"; + case VK_BORDER_COLOR_INT_TRANSPARENT_BLACK: + return "VK_BORDER_COLOR_INT_TRANSPARENT_BLACK"; + default: + return "Unhandled VkBorderColor"; + } +} + +static inline const char* string_VkFilter(VkFilter input_value) +{ + switch (input_value) + { + case VK_FILTER_CUBIC_IMG: + return "VK_FILTER_CUBIC_IMG"; + case VK_FILTER_LINEAR: + return "VK_FILTER_LINEAR"; + case VK_FILTER_NEAREST: + return "VK_FILTER_NEAREST"; + default: + return "Unhandled VkFilter"; + } +} + +static inline const char* string_VkSamplerAddressMode(VkSamplerAddressMode input_value) +{ + switch (input_value) + { + case VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER: + return "VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER"; + case VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE: + return "VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE"; + case VK_SAMPLER_ADDRESS_MODE_MIRRORED_REPEAT: + return "VK_SAMPLER_ADDRESS_MODE_MIRRORED_REPEAT"; + case VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE: + return "VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE"; + case VK_SAMPLER_ADDRESS_MODE_REPEAT: + return "VK_SAMPLER_ADDRESS_MODE_REPEAT"; + default: + return "Unhandled VkSamplerAddressMode"; + } +} + +static inline const char* string_VkSamplerCreateFlagBits(VkSamplerCreateFlagBits input_value) +{ + switch (input_value) + { + case VK_SAMPLER_CREATE_SUBSAMPLED_BIT_EXT: + return "VK_SAMPLER_CREATE_SUBSAMPLED_BIT_EXT"; + case VK_SAMPLER_CREATE_SUBSAMPLED_COARSE_RECONSTRUCTION_BIT_EXT: + return "VK_SAMPLER_CREATE_SUBSAMPLED_COARSE_RECONSTRUCTION_BIT_EXT"; + default: + return "Unhandled VkSamplerCreateFlagBits"; + } +} + +static inline std::string string_VkSamplerCreateFlags(VkSamplerCreateFlags input_value) +{ + std::string ret; + int index = 0; + while(input_value) { + if (input_value & 1) { + if( !ret.empty()) ret.append("|"); + ret.append(string_VkSamplerCreateFlagBits(static_cast(1U << index))); + } + ++index; + input_value >>= 1; + } + if( ret.empty()) ret.append(string_VkSamplerCreateFlagBits(static_cast(0))); + return ret; +} + +static inline const char* string_VkSamplerMipmapMode(VkSamplerMipmapMode input_value) +{ + switch (input_value) + { + case VK_SAMPLER_MIPMAP_MODE_LINEAR: + return "VK_SAMPLER_MIPMAP_MODE_LINEAR"; + case VK_SAMPLER_MIPMAP_MODE_NEAREST: + return "VK_SAMPLER_MIPMAP_MODE_NEAREST"; + default: + return "Unhandled VkSamplerMipmapMode"; + } +} + +static inline const char* string_VkDescriptorPoolCreateFlagBits(VkDescriptorPoolCreateFlagBits input_value) +{ + switch (input_value) + { + case VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT: + return "VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT"; + case VK_DESCRIPTOR_POOL_CREATE_HOST_ONLY_BIT_VALVE: + return "VK_DESCRIPTOR_POOL_CREATE_HOST_ONLY_BIT_VALVE"; + case VK_DESCRIPTOR_POOL_CREATE_UPDATE_AFTER_BIND_BIT: + return "VK_DESCRIPTOR_POOL_CREATE_UPDATE_AFTER_BIND_BIT"; + default: + return "Unhandled VkDescriptorPoolCreateFlagBits"; + } +} + +static inline std::string string_VkDescriptorPoolCreateFlags(VkDescriptorPoolCreateFlags input_value) +{ + std::string ret; + int index = 0; + while(input_value) { + if (input_value & 1) { + if( !ret.empty()) ret.append("|"); + ret.append(string_VkDescriptorPoolCreateFlagBits(static_cast(1U << index))); + } + ++index; + input_value >>= 1; + } + if( ret.empty()) ret.append(string_VkDescriptorPoolCreateFlagBits(static_cast(0))); + return ret; +} + +static inline const char* string_VkDescriptorType(VkDescriptorType input_value) +{ + switch (input_value) + { + case VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_KHR: + return "VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_KHR"; + case VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_NV: + return "VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_NV"; + case VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER: + return "VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER"; + case VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK_EXT: + return "VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK_EXT"; + case VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT: + return "VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT"; + case VK_DESCRIPTOR_TYPE_MUTABLE_VALVE: + return "VK_DESCRIPTOR_TYPE_MUTABLE_VALVE"; + case VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE: + return "VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE"; + case VK_DESCRIPTOR_TYPE_SAMPLER: + return "VK_DESCRIPTOR_TYPE_SAMPLER"; + case VK_DESCRIPTOR_TYPE_STORAGE_BUFFER: + return "VK_DESCRIPTOR_TYPE_STORAGE_BUFFER"; + case VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC: + return "VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC"; + case VK_DESCRIPTOR_TYPE_STORAGE_IMAGE: + return "VK_DESCRIPTOR_TYPE_STORAGE_IMAGE"; + case VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER: + return "VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER"; + case VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER: + return "VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER"; + case VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC: + return "VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC"; + case VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER: + return "VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER"; + default: + return "Unhandled VkDescriptorType"; + } +} + +static inline const char* string_VkDescriptorSetLayoutCreateFlagBits(VkDescriptorSetLayoutCreateFlagBits input_value) +{ + switch (input_value) + { + case VK_DESCRIPTOR_SET_LAYOUT_CREATE_HOST_ONLY_POOL_BIT_VALVE: + return "VK_DESCRIPTOR_SET_LAYOUT_CREATE_HOST_ONLY_POOL_BIT_VALVE"; + case VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR: + return "VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR"; + case VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT: + return "VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT"; + default: + return "Unhandled VkDescriptorSetLayoutCreateFlagBits"; + } +} + +static inline std::string string_VkDescriptorSetLayoutCreateFlags(VkDescriptorSetLayoutCreateFlags input_value) +{ + std::string ret; + int index = 0; + while(input_value) { + if (input_value & 1) { + if( !ret.empty()) ret.append("|"); + ret.append(string_VkDescriptorSetLayoutCreateFlagBits(static_cast(1U << index))); + } + ++index; + input_value >>= 1; + } + if( ret.empty()) ret.append(string_VkDescriptorSetLayoutCreateFlagBits(static_cast(0))); + return ret; +} + +static inline const char* string_VkAttachmentDescriptionFlagBits(VkAttachmentDescriptionFlagBits input_value) +{ + switch (input_value) + { + case VK_ATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT: + return "VK_ATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT"; + default: + return "Unhandled VkAttachmentDescriptionFlagBits"; + } +} + +static inline std::string string_VkAttachmentDescriptionFlags(VkAttachmentDescriptionFlags input_value) +{ + std::string ret; + int index = 0; + while(input_value) { + if (input_value & 1) { + if( !ret.empty()) ret.append("|"); + ret.append(string_VkAttachmentDescriptionFlagBits(static_cast(1U << index))); + } + ++index; + input_value >>= 1; + } + if( ret.empty()) ret.append(string_VkAttachmentDescriptionFlagBits(static_cast(0))); + return ret; +} + +static inline const char* string_VkAttachmentLoadOp(VkAttachmentLoadOp input_value) +{ + switch (input_value) + { + case VK_ATTACHMENT_LOAD_OP_CLEAR: + return "VK_ATTACHMENT_LOAD_OP_CLEAR"; + case VK_ATTACHMENT_LOAD_OP_DONT_CARE: + return "VK_ATTACHMENT_LOAD_OP_DONT_CARE"; + case VK_ATTACHMENT_LOAD_OP_LOAD: + return "VK_ATTACHMENT_LOAD_OP_LOAD"; + case VK_ATTACHMENT_LOAD_OP_NONE_EXT: + return "VK_ATTACHMENT_LOAD_OP_NONE_EXT"; + default: + return "Unhandled VkAttachmentLoadOp"; + } +} + +static inline const char* string_VkAttachmentStoreOp(VkAttachmentStoreOp input_value) +{ + switch (input_value) + { + case VK_ATTACHMENT_STORE_OP_DONT_CARE: + return "VK_ATTACHMENT_STORE_OP_DONT_CARE"; + case VK_ATTACHMENT_STORE_OP_NONE_EXT: + return "VK_ATTACHMENT_STORE_OP_NONE_EXT"; + case VK_ATTACHMENT_STORE_OP_STORE: + return "VK_ATTACHMENT_STORE_OP_STORE"; + default: + return "Unhandled VkAttachmentStoreOp"; + } +} + +static inline const char* string_VkDependencyFlagBits(VkDependencyFlagBits input_value) +{ + switch (input_value) + { + case VK_DEPENDENCY_BY_REGION_BIT: + return "VK_DEPENDENCY_BY_REGION_BIT"; + case VK_DEPENDENCY_DEVICE_GROUP_BIT: + return "VK_DEPENDENCY_DEVICE_GROUP_BIT"; + case VK_DEPENDENCY_VIEW_LOCAL_BIT: + return "VK_DEPENDENCY_VIEW_LOCAL_BIT"; + default: + return "Unhandled VkDependencyFlagBits"; + } +} + +static inline std::string string_VkDependencyFlags(VkDependencyFlags input_value) +{ + std::string ret; + int index = 0; + while(input_value) { + if (input_value & 1) { + if( !ret.empty()) ret.append("|"); + ret.append(string_VkDependencyFlagBits(static_cast(1U << index))); + } + ++index; + input_value >>= 1; + } + if( ret.empty()) ret.append(string_VkDependencyFlagBits(static_cast(0))); + return ret; +} + +static inline const char* string_VkFramebufferCreateFlagBits(VkFramebufferCreateFlagBits input_value) +{ + switch (input_value) + { + case VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT: + return "VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT"; + default: + return "Unhandled VkFramebufferCreateFlagBits"; + } +} + +static inline std::string string_VkFramebufferCreateFlags(VkFramebufferCreateFlags input_value) +{ + std::string ret; + int index = 0; + while(input_value) { + if (input_value & 1) { + if( !ret.empty()) ret.append("|"); + ret.append(string_VkFramebufferCreateFlagBits(static_cast(1U << index))); + } + ++index; + input_value >>= 1; + } + if( ret.empty()) ret.append(string_VkFramebufferCreateFlagBits(static_cast(0))); + return ret; +} + +static inline const char* string_VkPipelineBindPoint(VkPipelineBindPoint input_value) +{ + switch (input_value) + { + case VK_PIPELINE_BIND_POINT_COMPUTE: + return "VK_PIPELINE_BIND_POINT_COMPUTE"; + case VK_PIPELINE_BIND_POINT_GRAPHICS: + return "VK_PIPELINE_BIND_POINT_GRAPHICS"; + case VK_PIPELINE_BIND_POINT_RAY_TRACING_KHR: + return "VK_PIPELINE_BIND_POINT_RAY_TRACING_KHR"; + case VK_PIPELINE_BIND_POINT_SUBPASS_SHADING_HUAWEI: + return "VK_PIPELINE_BIND_POINT_SUBPASS_SHADING_HUAWEI"; + default: + return "Unhandled VkPipelineBindPoint"; + } +} + +static inline const char* string_VkRenderPassCreateFlagBits(VkRenderPassCreateFlagBits input_value) +{ + switch (input_value) + { + case VK_RENDER_PASS_CREATE_TRANSFORM_BIT_QCOM: + return "VK_RENDER_PASS_CREATE_TRANSFORM_BIT_QCOM"; + default: + return "Unhandled VkRenderPassCreateFlagBits"; + } +} + +static inline std::string string_VkRenderPassCreateFlags(VkRenderPassCreateFlags input_value) +{ + std::string ret; + int index = 0; + while(input_value) { + if (input_value & 1) { + if( !ret.empty()) ret.append("|"); + ret.append(string_VkRenderPassCreateFlagBits(static_cast(1U << index))); + } + ++index; + input_value >>= 1; + } + if( ret.empty()) ret.append(string_VkRenderPassCreateFlagBits(static_cast(0))); + return ret; +} + +static inline const char* string_VkSubpassDescriptionFlagBits(VkSubpassDescriptionFlagBits input_value) +{ + switch (input_value) + { + case VK_SUBPASS_DESCRIPTION_FRAGMENT_REGION_BIT_QCOM: + return "VK_SUBPASS_DESCRIPTION_FRAGMENT_REGION_BIT_QCOM"; + case VK_SUBPASS_DESCRIPTION_PER_VIEW_ATTRIBUTES_BIT_NVX: + return "VK_SUBPASS_DESCRIPTION_PER_VIEW_ATTRIBUTES_BIT_NVX"; + case VK_SUBPASS_DESCRIPTION_PER_VIEW_POSITION_X_ONLY_BIT_NVX: + return "VK_SUBPASS_DESCRIPTION_PER_VIEW_POSITION_X_ONLY_BIT_NVX"; + case VK_SUBPASS_DESCRIPTION_SHADER_RESOLVE_BIT_QCOM: + return "VK_SUBPASS_DESCRIPTION_SHADER_RESOLVE_BIT_QCOM"; + default: + return "Unhandled VkSubpassDescriptionFlagBits"; + } +} + +static inline std::string string_VkSubpassDescriptionFlags(VkSubpassDescriptionFlags input_value) +{ + std::string ret; + int index = 0; + while(input_value) { + if (input_value & 1) { + if( !ret.empty()) ret.append("|"); + ret.append(string_VkSubpassDescriptionFlagBits(static_cast(1U << index))); + } + ++index; + input_value >>= 1; + } + if( ret.empty()) ret.append(string_VkSubpassDescriptionFlagBits(static_cast(0))); + return ret; +} + +static inline const char* string_VkCommandPoolCreateFlagBits(VkCommandPoolCreateFlagBits input_value) +{ + switch (input_value) + { + case VK_COMMAND_POOL_CREATE_PROTECTED_BIT: + return "VK_COMMAND_POOL_CREATE_PROTECTED_BIT"; + case VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT: + return "VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT"; + case VK_COMMAND_POOL_CREATE_TRANSIENT_BIT: + return "VK_COMMAND_POOL_CREATE_TRANSIENT_BIT"; + default: + return "Unhandled VkCommandPoolCreateFlagBits"; + } +} + +static inline std::string string_VkCommandPoolCreateFlags(VkCommandPoolCreateFlags input_value) +{ + std::string ret; + int index = 0; + while(input_value) { + if (input_value & 1) { + if( !ret.empty()) ret.append("|"); + ret.append(string_VkCommandPoolCreateFlagBits(static_cast(1U << index))); + } + ++index; + input_value >>= 1; + } + if( ret.empty()) ret.append(string_VkCommandPoolCreateFlagBits(static_cast(0))); + return ret; +} + +static inline const char* string_VkCommandPoolResetFlagBits(VkCommandPoolResetFlagBits input_value) +{ + switch (input_value) + { + case VK_COMMAND_POOL_RESET_RELEASE_RESOURCES_BIT: + return "VK_COMMAND_POOL_RESET_RELEASE_RESOURCES_BIT"; + default: + return "Unhandled VkCommandPoolResetFlagBits"; + } +} + +static inline std::string string_VkCommandPoolResetFlags(VkCommandPoolResetFlags input_value) +{ + std::string ret; + int index = 0; + while(input_value) { + if (input_value & 1) { + if( !ret.empty()) ret.append("|"); + ret.append(string_VkCommandPoolResetFlagBits(static_cast(1U << index))); + } + ++index; + input_value >>= 1; + } + if( ret.empty()) ret.append(string_VkCommandPoolResetFlagBits(static_cast(0))); + return ret; +} + +static inline const char* string_VkCommandBufferLevel(VkCommandBufferLevel input_value) +{ + switch (input_value) + { + case VK_COMMAND_BUFFER_LEVEL_PRIMARY: + return "VK_COMMAND_BUFFER_LEVEL_PRIMARY"; + case VK_COMMAND_BUFFER_LEVEL_SECONDARY: + return "VK_COMMAND_BUFFER_LEVEL_SECONDARY"; + default: + return "Unhandled VkCommandBufferLevel"; + } +} + +static inline const char* string_VkCommandBufferUsageFlagBits(VkCommandBufferUsageFlagBits input_value) +{ + switch (input_value) + { + case VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT: + return "VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT"; + case VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT: + return "VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT"; + case VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT: + return "VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT"; + default: + return "Unhandled VkCommandBufferUsageFlagBits"; + } +} + +static inline std::string string_VkCommandBufferUsageFlags(VkCommandBufferUsageFlags input_value) +{ + std::string ret; + int index = 0; + while(input_value) { + if (input_value & 1) { + if( !ret.empty()) ret.append("|"); + ret.append(string_VkCommandBufferUsageFlagBits(static_cast(1U << index))); + } + ++index; + input_value >>= 1; + } + if( ret.empty()) ret.append(string_VkCommandBufferUsageFlagBits(static_cast(0))); + return ret; +} + +static inline const char* string_VkQueryControlFlagBits(VkQueryControlFlagBits input_value) +{ + switch (input_value) + { + case VK_QUERY_CONTROL_PRECISE_BIT: + return "VK_QUERY_CONTROL_PRECISE_BIT"; + default: + return "Unhandled VkQueryControlFlagBits"; + } +} + +static inline std::string string_VkQueryControlFlags(VkQueryControlFlags input_value) +{ + std::string ret; + int index = 0; + while(input_value) { + if (input_value & 1) { + if( !ret.empty()) ret.append("|"); + ret.append(string_VkQueryControlFlagBits(static_cast(1U << index))); + } + ++index; + input_value >>= 1; + } + if( ret.empty()) ret.append(string_VkQueryControlFlagBits(static_cast(0))); + return ret; +} + +static inline const char* string_VkCommandBufferResetFlagBits(VkCommandBufferResetFlagBits input_value) +{ + switch (input_value) + { + case VK_COMMAND_BUFFER_RESET_RELEASE_RESOURCES_BIT: + return "VK_COMMAND_BUFFER_RESET_RELEASE_RESOURCES_BIT"; + default: + return "Unhandled VkCommandBufferResetFlagBits"; + } +} + +static inline std::string string_VkCommandBufferResetFlags(VkCommandBufferResetFlags input_value) +{ + std::string ret; + int index = 0; + while(input_value) { + if (input_value & 1) { + if( !ret.empty()) ret.append("|"); + ret.append(string_VkCommandBufferResetFlagBits(static_cast(1U << index))); + } + ++index; + input_value >>= 1; + } + if( ret.empty()) ret.append(string_VkCommandBufferResetFlagBits(static_cast(0))); + return ret; +} + +static inline const char* string_VkIndexType(VkIndexType input_value) +{ + switch (input_value) + { + case VK_INDEX_TYPE_NONE_KHR: + return "VK_INDEX_TYPE_NONE_KHR"; + case VK_INDEX_TYPE_UINT16: + return "VK_INDEX_TYPE_UINT16"; + case VK_INDEX_TYPE_UINT32: + return "VK_INDEX_TYPE_UINT32"; + case VK_INDEX_TYPE_UINT8_EXT: + return "VK_INDEX_TYPE_UINT8_EXT"; + default: + return "Unhandled VkIndexType"; + } +} + +static inline const char* string_VkStencilFaceFlagBits(VkStencilFaceFlagBits input_value) +{ + switch (input_value) + { + case VK_STENCIL_FACE_BACK_BIT: + return "VK_STENCIL_FACE_BACK_BIT"; + case VK_STENCIL_FACE_FRONT_AND_BACK: + return "VK_STENCIL_FACE_FRONT_AND_BACK"; + case VK_STENCIL_FACE_FRONT_BIT: + return "VK_STENCIL_FACE_FRONT_BIT"; + default: + return "Unhandled VkStencilFaceFlagBits"; + } +} + +static inline std::string string_VkStencilFaceFlags(VkStencilFaceFlags input_value) +{ + std::string ret; + int index = 0; + while(input_value) { + if (input_value & 1) { + if( !ret.empty()) ret.append("|"); + ret.append(string_VkStencilFaceFlagBits(static_cast(1U << index))); + } + ++index; + input_value >>= 1; + } + if( ret.empty()) ret.append(string_VkStencilFaceFlagBits(static_cast(0))); + return ret; +} + +static inline const char* string_VkSubpassContents(VkSubpassContents input_value) +{ + switch (input_value) + { + case VK_SUBPASS_CONTENTS_INLINE: + return "VK_SUBPASS_CONTENTS_INLINE"; + case VK_SUBPASS_CONTENTS_SECONDARY_COMMAND_BUFFERS: + return "VK_SUBPASS_CONTENTS_SECONDARY_COMMAND_BUFFERS"; + default: + return "Unhandled VkSubpassContents"; + } +} + +static inline const char* string_VkSubgroupFeatureFlagBits(VkSubgroupFeatureFlagBits input_value) +{ + switch (input_value) + { + case VK_SUBGROUP_FEATURE_ARITHMETIC_BIT: + return "VK_SUBGROUP_FEATURE_ARITHMETIC_BIT"; + case VK_SUBGROUP_FEATURE_BALLOT_BIT: + return "VK_SUBGROUP_FEATURE_BALLOT_BIT"; + case VK_SUBGROUP_FEATURE_BASIC_BIT: + return "VK_SUBGROUP_FEATURE_BASIC_BIT"; + case VK_SUBGROUP_FEATURE_CLUSTERED_BIT: + return "VK_SUBGROUP_FEATURE_CLUSTERED_BIT"; + case VK_SUBGROUP_FEATURE_PARTITIONED_BIT_NV: + return "VK_SUBGROUP_FEATURE_PARTITIONED_BIT_NV"; + case VK_SUBGROUP_FEATURE_QUAD_BIT: + return "VK_SUBGROUP_FEATURE_QUAD_BIT"; + case VK_SUBGROUP_FEATURE_SHUFFLE_BIT: + return "VK_SUBGROUP_FEATURE_SHUFFLE_BIT"; + case VK_SUBGROUP_FEATURE_SHUFFLE_RELATIVE_BIT: + return "VK_SUBGROUP_FEATURE_SHUFFLE_RELATIVE_BIT"; + case VK_SUBGROUP_FEATURE_VOTE_BIT: + return "VK_SUBGROUP_FEATURE_VOTE_BIT"; + default: + return "Unhandled VkSubgroupFeatureFlagBits"; + } +} + +static inline std::string string_VkSubgroupFeatureFlags(VkSubgroupFeatureFlags input_value) +{ + std::string ret; + int index = 0; + while(input_value) { + if (input_value & 1) { + if( !ret.empty()) ret.append("|"); + ret.append(string_VkSubgroupFeatureFlagBits(static_cast(1U << index))); + } + ++index; + input_value >>= 1; + } + if( ret.empty()) ret.append(string_VkSubgroupFeatureFlagBits(static_cast(0))); + return ret; +} + +static inline const char* string_VkPeerMemoryFeatureFlagBits(VkPeerMemoryFeatureFlagBits input_value) +{ + switch (input_value) + { + case VK_PEER_MEMORY_FEATURE_COPY_DST_BIT: + return "VK_PEER_MEMORY_FEATURE_COPY_DST_BIT"; + case VK_PEER_MEMORY_FEATURE_COPY_SRC_BIT: + return "VK_PEER_MEMORY_FEATURE_COPY_SRC_BIT"; + case VK_PEER_MEMORY_FEATURE_GENERIC_DST_BIT: + return "VK_PEER_MEMORY_FEATURE_GENERIC_DST_BIT"; + case VK_PEER_MEMORY_FEATURE_GENERIC_SRC_BIT: + return "VK_PEER_MEMORY_FEATURE_GENERIC_SRC_BIT"; + default: + return "Unhandled VkPeerMemoryFeatureFlagBits"; + } +} + +static inline std::string string_VkPeerMemoryFeatureFlags(VkPeerMemoryFeatureFlags input_value) +{ + std::string ret; + int index = 0; + while(input_value) { + if (input_value & 1) { + if( !ret.empty()) ret.append("|"); + ret.append(string_VkPeerMemoryFeatureFlagBits(static_cast(1U << index))); + } + ++index; + input_value >>= 1; + } + if( ret.empty()) ret.append(string_VkPeerMemoryFeatureFlagBits(static_cast(0))); + return ret; +} + +static inline const char* string_VkMemoryAllocateFlagBits(VkMemoryAllocateFlagBits input_value) +{ + switch (input_value) + { + case VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_BIT: + return "VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_BIT"; + case VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT: + return "VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT"; + case VK_MEMORY_ALLOCATE_DEVICE_MASK_BIT: + return "VK_MEMORY_ALLOCATE_DEVICE_MASK_BIT"; + default: + return "Unhandled VkMemoryAllocateFlagBits"; + } +} + +static inline std::string string_VkMemoryAllocateFlags(VkMemoryAllocateFlags input_value) +{ + std::string ret; + int index = 0; + while(input_value) { + if (input_value & 1) { + if( !ret.empty()) ret.append("|"); + ret.append(string_VkMemoryAllocateFlagBits(static_cast(1U << index))); + } + ++index; + input_value >>= 1; + } + if( ret.empty()) ret.append(string_VkMemoryAllocateFlagBits(static_cast(0))); + return ret; +} + +static inline const char* string_VkPointClippingBehavior(VkPointClippingBehavior input_value) +{ + switch (input_value) + { + case VK_POINT_CLIPPING_BEHAVIOR_ALL_CLIP_PLANES: + return "VK_POINT_CLIPPING_BEHAVIOR_ALL_CLIP_PLANES"; + case VK_POINT_CLIPPING_BEHAVIOR_USER_CLIP_PLANES_ONLY: + return "VK_POINT_CLIPPING_BEHAVIOR_USER_CLIP_PLANES_ONLY"; + default: + return "Unhandled VkPointClippingBehavior"; + } +} + +static inline const char* string_VkTessellationDomainOrigin(VkTessellationDomainOrigin input_value) +{ + switch (input_value) + { + case VK_TESSELLATION_DOMAIN_ORIGIN_LOWER_LEFT: + return "VK_TESSELLATION_DOMAIN_ORIGIN_LOWER_LEFT"; + case VK_TESSELLATION_DOMAIN_ORIGIN_UPPER_LEFT: + return "VK_TESSELLATION_DOMAIN_ORIGIN_UPPER_LEFT"; + default: + return "Unhandled VkTessellationDomainOrigin"; + } +} + +static inline const char* string_VkSamplerYcbcrModelConversion(VkSamplerYcbcrModelConversion input_value) +{ + switch (input_value) + { + case VK_SAMPLER_YCBCR_MODEL_CONVERSION_RGB_IDENTITY: + return "VK_SAMPLER_YCBCR_MODEL_CONVERSION_RGB_IDENTITY"; + case VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_2020: + return "VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_2020"; + case VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_601: + return "VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_601"; + case VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_709: + return "VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_709"; + case VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_IDENTITY: + return "VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_IDENTITY"; + default: + return "Unhandled VkSamplerYcbcrModelConversion"; + } +} + +static inline const char* string_VkSamplerYcbcrRange(VkSamplerYcbcrRange input_value) +{ + switch (input_value) + { + case VK_SAMPLER_YCBCR_RANGE_ITU_FULL: + return "VK_SAMPLER_YCBCR_RANGE_ITU_FULL"; + case VK_SAMPLER_YCBCR_RANGE_ITU_NARROW: + return "VK_SAMPLER_YCBCR_RANGE_ITU_NARROW"; + default: + return "Unhandled VkSamplerYcbcrRange"; + } +} + +static inline const char* string_VkChromaLocation(VkChromaLocation input_value) +{ + switch (input_value) + { + case VK_CHROMA_LOCATION_COSITED_EVEN: + return "VK_CHROMA_LOCATION_COSITED_EVEN"; + case VK_CHROMA_LOCATION_MIDPOINT: + return "VK_CHROMA_LOCATION_MIDPOINT"; + default: + return "Unhandled VkChromaLocation"; + } +} + +static inline const char* string_VkDescriptorUpdateTemplateType(VkDescriptorUpdateTemplateType input_value) +{ + switch (input_value) + { + case VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_DESCRIPTOR_SET: + return "VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_DESCRIPTOR_SET"; + case VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS_KHR: + return "VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS_KHR"; + default: + return "Unhandled VkDescriptorUpdateTemplateType"; + } +} + +static inline const char* string_VkExternalMemoryHandleTypeFlagBits(VkExternalMemoryHandleTypeFlagBits input_value) +{ + switch (input_value) + { + case VK_EXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_BIT_ANDROID: + return "VK_EXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_BIT_ANDROID"; + case VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_BIT: + return "VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_BIT"; + case VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_KMT_BIT: + return "VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_KMT_BIT"; + case VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP_BIT: + return "VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP_BIT"; + case VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE_BIT: + return "VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE_BIT"; + case VK_EXTERNAL_MEMORY_HANDLE_TYPE_DMA_BUF_BIT_EXT: + return "VK_EXTERNAL_MEMORY_HANDLE_TYPE_DMA_BUF_BIT_EXT"; + case VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_ALLOCATION_BIT_EXT: + return "VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_ALLOCATION_BIT_EXT"; + case VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_MAPPED_FOREIGN_MEMORY_BIT_EXT: + return "VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_MAPPED_FOREIGN_MEMORY_BIT_EXT"; + case VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT: + return "VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT"; + case VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT: + return "VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT"; + case VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT: + return "VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT"; + case VK_EXTERNAL_MEMORY_HANDLE_TYPE_RDMA_ADDRESS_BIT_NV: + return "VK_EXTERNAL_MEMORY_HANDLE_TYPE_RDMA_ADDRESS_BIT_NV"; + case VK_EXTERNAL_MEMORY_HANDLE_TYPE_ZIRCON_VMO_BIT_FUCHSIA: + return "VK_EXTERNAL_MEMORY_HANDLE_TYPE_ZIRCON_VMO_BIT_FUCHSIA"; + default: + return "Unhandled VkExternalMemoryHandleTypeFlagBits"; + } +} + +static inline std::string string_VkExternalMemoryHandleTypeFlags(VkExternalMemoryHandleTypeFlags input_value) +{ + std::string ret; + int index = 0; + while(input_value) { + if (input_value & 1) { + if( !ret.empty()) ret.append("|"); + ret.append(string_VkExternalMemoryHandleTypeFlagBits(static_cast(1U << index))); + } + ++index; + input_value >>= 1; + } + if( ret.empty()) ret.append(string_VkExternalMemoryHandleTypeFlagBits(static_cast(0))); + return ret; +} + +static inline const char* string_VkExternalMemoryFeatureFlagBits(VkExternalMemoryFeatureFlagBits input_value) +{ + switch (input_value) + { + case VK_EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT: + return "VK_EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT"; + case VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT: + return "VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT"; + case VK_EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT: + return "VK_EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT"; + default: + return "Unhandled VkExternalMemoryFeatureFlagBits"; + } +} + +static inline std::string string_VkExternalMemoryFeatureFlags(VkExternalMemoryFeatureFlags input_value) +{ + std::string ret; + int index = 0; + while(input_value) { + if (input_value & 1) { + if( !ret.empty()) ret.append("|"); + ret.append(string_VkExternalMemoryFeatureFlagBits(static_cast(1U << index))); + } + ++index; + input_value >>= 1; + } + if( ret.empty()) ret.append(string_VkExternalMemoryFeatureFlagBits(static_cast(0))); + return ret; +} + +static inline const char* string_VkExternalFenceHandleTypeFlagBits(VkExternalFenceHandleTypeFlagBits input_value) +{ + switch (input_value) + { + case VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_FD_BIT: + return "VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_FD_BIT"; + case VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_BIT: + return "VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_BIT"; + case VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT: + return "VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT"; + case VK_EXTERNAL_FENCE_HANDLE_TYPE_SYNC_FD_BIT: + return "VK_EXTERNAL_FENCE_HANDLE_TYPE_SYNC_FD_BIT"; + default: + return "Unhandled VkExternalFenceHandleTypeFlagBits"; + } +} + +static inline std::string string_VkExternalFenceHandleTypeFlags(VkExternalFenceHandleTypeFlags input_value) +{ + std::string ret; + int index = 0; + while(input_value) { + if (input_value & 1) { + if( !ret.empty()) ret.append("|"); + ret.append(string_VkExternalFenceHandleTypeFlagBits(static_cast(1U << index))); + } + ++index; + input_value >>= 1; + } + if( ret.empty()) ret.append(string_VkExternalFenceHandleTypeFlagBits(static_cast(0))); + return ret; +} + +static inline const char* string_VkExternalFenceFeatureFlagBits(VkExternalFenceFeatureFlagBits input_value) +{ + switch (input_value) + { + case VK_EXTERNAL_FENCE_FEATURE_EXPORTABLE_BIT: + return "VK_EXTERNAL_FENCE_FEATURE_EXPORTABLE_BIT"; + case VK_EXTERNAL_FENCE_FEATURE_IMPORTABLE_BIT: + return "VK_EXTERNAL_FENCE_FEATURE_IMPORTABLE_BIT"; + default: + return "Unhandled VkExternalFenceFeatureFlagBits"; + } +} + +static inline std::string string_VkExternalFenceFeatureFlags(VkExternalFenceFeatureFlags input_value) +{ + std::string ret; + int index = 0; + while(input_value) { + if (input_value & 1) { + if( !ret.empty()) ret.append("|"); + ret.append(string_VkExternalFenceFeatureFlagBits(static_cast(1U << index))); + } + ++index; + input_value >>= 1; + } + if( ret.empty()) ret.append(string_VkExternalFenceFeatureFlagBits(static_cast(0))); + return ret; +} + +static inline const char* string_VkFenceImportFlagBits(VkFenceImportFlagBits input_value) +{ + switch (input_value) + { + case VK_FENCE_IMPORT_TEMPORARY_BIT: + return "VK_FENCE_IMPORT_TEMPORARY_BIT"; + default: + return "Unhandled VkFenceImportFlagBits"; + } +} + +static inline std::string string_VkFenceImportFlags(VkFenceImportFlags input_value) +{ + std::string ret; + int index = 0; + while(input_value) { + if (input_value & 1) { + if( !ret.empty()) ret.append("|"); + ret.append(string_VkFenceImportFlagBits(static_cast(1U << index))); + } + ++index; + input_value >>= 1; + } + if( ret.empty()) ret.append(string_VkFenceImportFlagBits(static_cast(0))); + return ret; +} + +static inline const char* string_VkSemaphoreImportFlagBits(VkSemaphoreImportFlagBits input_value) +{ + switch (input_value) + { + case VK_SEMAPHORE_IMPORT_TEMPORARY_BIT: + return "VK_SEMAPHORE_IMPORT_TEMPORARY_BIT"; + default: + return "Unhandled VkSemaphoreImportFlagBits"; + } +} + +static inline std::string string_VkSemaphoreImportFlags(VkSemaphoreImportFlags input_value) +{ + std::string ret; + int index = 0; + while(input_value) { + if (input_value & 1) { + if( !ret.empty()) ret.append("|"); + ret.append(string_VkSemaphoreImportFlagBits(static_cast(1U << index))); + } + ++index; + input_value >>= 1; + } + if( ret.empty()) ret.append(string_VkSemaphoreImportFlagBits(static_cast(0))); + return ret; +} + +static inline const char* string_VkExternalSemaphoreHandleTypeFlagBits(VkExternalSemaphoreHandleTypeFlagBits input_value) +{ + switch (input_value) + { + case VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE_BIT: + return "VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE_BIT"; + case VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT: + return "VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT"; + case VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_BIT: + return "VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_BIT"; + case VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT: + return "VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT"; + case VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD_BIT: + return "VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD_BIT"; + case VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_ZIRCON_EVENT_BIT_FUCHSIA: + return "VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_ZIRCON_EVENT_BIT_FUCHSIA"; + default: + return "Unhandled VkExternalSemaphoreHandleTypeFlagBits"; + } +} + +static inline std::string string_VkExternalSemaphoreHandleTypeFlags(VkExternalSemaphoreHandleTypeFlags input_value) +{ + std::string ret; + int index = 0; + while(input_value) { + if (input_value & 1) { + if( !ret.empty()) ret.append("|"); + ret.append(string_VkExternalSemaphoreHandleTypeFlagBits(static_cast(1U << index))); + } + ++index; + input_value >>= 1; + } + if( ret.empty()) ret.append(string_VkExternalSemaphoreHandleTypeFlagBits(static_cast(0))); + return ret; +} + +static inline const char* string_VkExternalSemaphoreFeatureFlagBits(VkExternalSemaphoreFeatureFlagBits input_value) +{ + switch (input_value) + { + case VK_EXTERNAL_SEMAPHORE_FEATURE_EXPORTABLE_BIT: + return "VK_EXTERNAL_SEMAPHORE_FEATURE_EXPORTABLE_BIT"; + case VK_EXTERNAL_SEMAPHORE_FEATURE_IMPORTABLE_BIT: + return "VK_EXTERNAL_SEMAPHORE_FEATURE_IMPORTABLE_BIT"; + default: + return "Unhandled VkExternalSemaphoreFeatureFlagBits"; + } +} + +static inline std::string string_VkExternalSemaphoreFeatureFlags(VkExternalSemaphoreFeatureFlags input_value) +{ + std::string ret; + int index = 0; + while(input_value) { + if (input_value & 1) { + if( !ret.empty()) ret.append("|"); + ret.append(string_VkExternalSemaphoreFeatureFlagBits(static_cast(1U << index))); + } + ++index; + input_value >>= 1; + } + if( ret.empty()) ret.append(string_VkExternalSemaphoreFeatureFlagBits(static_cast(0))); + return ret; +} + +static inline const char* string_VkDriverId(VkDriverId input_value) +{ + switch (input_value) + { + case VK_DRIVER_ID_AMD_OPEN_SOURCE: + return "VK_DRIVER_ID_AMD_OPEN_SOURCE"; + case VK_DRIVER_ID_AMD_PROPRIETARY: + return "VK_DRIVER_ID_AMD_PROPRIETARY"; + case VK_DRIVER_ID_ARM_PROPRIETARY: + return "VK_DRIVER_ID_ARM_PROPRIETARY"; + case VK_DRIVER_ID_BROADCOM_PROPRIETARY: + return "VK_DRIVER_ID_BROADCOM_PROPRIETARY"; + case VK_DRIVER_ID_COREAVI_PROPRIETARY: + return "VK_DRIVER_ID_COREAVI_PROPRIETARY"; + case VK_DRIVER_ID_GGP_PROPRIETARY: + return "VK_DRIVER_ID_GGP_PROPRIETARY"; + case VK_DRIVER_ID_GOOGLE_SWIFTSHADER: + return "VK_DRIVER_ID_GOOGLE_SWIFTSHADER"; + case VK_DRIVER_ID_IMAGINATION_PROPRIETARY: + return "VK_DRIVER_ID_IMAGINATION_PROPRIETARY"; + case VK_DRIVER_ID_INTEL_OPEN_SOURCE_MESA: + return "VK_DRIVER_ID_INTEL_OPEN_SOURCE_MESA"; + case VK_DRIVER_ID_INTEL_PROPRIETARY_WINDOWS: + return "VK_DRIVER_ID_INTEL_PROPRIETARY_WINDOWS"; + case VK_DRIVER_ID_JUICE_PROPRIETARY: + return "VK_DRIVER_ID_JUICE_PROPRIETARY"; + case VK_DRIVER_ID_MESA_LLVMPIPE: + return "VK_DRIVER_ID_MESA_LLVMPIPE"; + case VK_DRIVER_ID_MESA_RADV: + return "VK_DRIVER_ID_MESA_RADV"; + case VK_DRIVER_ID_MOLTENVK: + return "VK_DRIVER_ID_MOLTENVK"; + case VK_DRIVER_ID_NVIDIA_PROPRIETARY: + return "VK_DRIVER_ID_NVIDIA_PROPRIETARY"; + case VK_DRIVER_ID_QUALCOMM_PROPRIETARY: + return "VK_DRIVER_ID_QUALCOMM_PROPRIETARY"; + case VK_DRIVER_ID_VERISILICON_PROPRIETARY: + return "VK_DRIVER_ID_VERISILICON_PROPRIETARY"; + default: + return "Unhandled VkDriverId"; + } +} + +static inline const char* string_VkShaderFloatControlsIndependence(VkShaderFloatControlsIndependence input_value) +{ + switch (input_value) + { + case VK_SHADER_FLOAT_CONTROLS_INDEPENDENCE_32_BIT_ONLY: + return "VK_SHADER_FLOAT_CONTROLS_INDEPENDENCE_32_BIT_ONLY"; + case VK_SHADER_FLOAT_CONTROLS_INDEPENDENCE_ALL: + return "VK_SHADER_FLOAT_CONTROLS_INDEPENDENCE_ALL"; + case VK_SHADER_FLOAT_CONTROLS_INDEPENDENCE_NONE: + return "VK_SHADER_FLOAT_CONTROLS_INDEPENDENCE_NONE"; + default: + return "Unhandled VkShaderFloatControlsIndependence"; + } +} + +static inline const char* string_VkResolveModeFlagBits(VkResolveModeFlagBits input_value) +{ + switch (input_value) + { + case VK_RESOLVE_MODE_AVERAGE_BIT: + return "VK_RESOLVE_MODE_AVERAGE_BIT"; + case VK_RESOLVE_MODE_MAX_BIT: + return "VK_RESOLVE_MODE_MAX_BIT"; + case VK_RESOLVE_MODE_MIN_BIT: + return "VK_RESOLVE_MODE_MIN_BIT"; + case VK_RESOLVE_MODE_NONE: + return "VK_RESOLVE_MODE_NONE"; + case VK_RESOLVE_MODE_SAMPLE_ZERO_BIT: + return "VK_RESOLVE_MODE_SAMPLE_ZERO_BIT"; + default: + return "Unhandled VkResolveModeFlagBits"; + } +} + +static inline std::string string_VkResolveModeFlags(VkResolveModeFlags input_value) +{ + std::string ret; + int index = 0; + while(input_value) { + if (input_value & 1) { + if( !ret.empty()) ret.append("|"); + ret.append(string_VkResolveModeFlagBits(static_cast(1U << index))); + } + ++index; + input_value >>= 1; + } + if( ret.empty()) ret.append(string_VkResolveModeFlagBits(static_cast(0))); + return ret; +} + +static inline const char* string_VkDescriptorBindingFlagBits(VkDescriptorBindingFlagBits input_value) +{ + switch (input_value) + { + case VK_DESCRIPTOR_BINDING_PARTIALLY_BOUND_BIT: + return "VK_DESCRIPTOR_BINDING_PARTIALLY_BOUND_BIT"; + case VK_DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT: + return "VK_DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT"; + case VK_DESCRIPTOR_BINDING_UPDATE_UNUSED_WHILE_PENDING_BIT: + return "VK_DESCRIPTOR_BINDING_UPDATE_UNUSED_WHILE_PENDING_BIT"; + case VK_DESCRIPTOR_BINDING_VARIABLE_DESCRIPTOR_COUNT_BIT: + return "VK_DESCRIPTOR_BINDING_VARIABLE_DESCRIPTOR_COUNT_BIT"; + default: + return "Unhandled VkDescriptorBindingFlagBits"; + } +} + +static inline std::string string_VkDescriptorBindingFlags(VkDescriptorBindingFlags input_value) +{ + std::string ret; + int index = 0; + while(input_value) { + if (input_value & 1) { + if( !ret.empty()) ret.append("|"); + ret.append(string_VkDescriptorBindingFlagBits(static_cast(1U << index))); + } + ++index; + input_value >>= 1; + } + if( ret.empty()) ret.append(string_VkDescriptorBindingFlagBits(static_cast(0))); + return ret; +} + +static inline const char* string_VkSamplerReductionMode(VkSamplerReductionMode input_value) +{ + switch (input_value) + { + case VK_SAMPLER_REDUCTION_MODE_MAX: + return "VK_SAMPLER_REDUCTION_MODE_MAX"; + case VK_SAMPLER_REDUCTION_MODE_MIN: + return "VK_SAMPLER_REDUCTION_MODE_MIN"; + case VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE: + return "VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE"; + default: + return "Unhandled VkSamplerReductionMode"; + } +} + +static inline const char* string_VkSemaphoreType(VkSemaphoreType input_value) +{ + switch (input_value) + { + case VK_SEMAPHORE_TYPE_BINARY: + return "VK_SEMAPHORE_TYPE_BINARY"; + case VK_SEMAPHORE_TYPE_TIMELINE: + return "VK_SEMAPHORE_TYPE_TIMELINE"; + default: + return "Unhandled VkSemaphoreType"; + } +} + +static inline const char* string_VkSemaphoreWaitFlagBits(VkSemaphoreWaitFlagBits input_value) +{ + switch (input_value) + { + case VK_SEMAPHORE_WAIT_ANY_BIT: + return "VK_SEMAPHORE_WAIT_ANY_BIT"; + default: + return "Unhandled VkSemaphoreWaitFlagBits"; + } +} + +static inline std::string string_VkSemaphoreWaitFlags(VkSemaphoreWaitFlags input_value) +{ + std::string ret; + int index = 0; + while(input_value) { + if (input_value & 1) { + if( !ret.empty()) ret.append("|"); + ret.append(string_VkSemaphoreWaitFlagBits(static_cast(1U << index))); + } + ++index; + input_value >>= 1; + } + if( ret.empty()) ret.append(string_VkSemaphoreWaitFlagBits(static_cast(0))); + return ret; +} + +static inline const char* string_VkSurfaceTransformFlagBitsKHR(VkSurfaceTransformFlagBitsKHR input_value) +{ + switch (input_value) + { + case VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_BIT_KHR: + return "VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_BIT_KHR"; + case VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_180_BIT_KHR: + return "VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_180_BIT_KHR"; + case VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_270_BIT_KHR: + return "VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_270_BIT_KHR"; + case VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_90_BIT_KHR: + return "VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_90_BIT_KHR"; + case VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR: + return "VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR"; + case VK_SURFACE_TRANSFORM_INHERIT_BIT_KHR: + return "VK_SURFACE_TRANSFORM_INHERIT_BIT_KHR"; + case VK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR: + return "VK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR"; + case VK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR: + return "VK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR"; + case VK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR: + return "VK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR"; + default: + return "Unhandled VkSurfaceTransformFlagBitsKHR"; + } +} + +static inline std::string string_VkSurfaceTransformFlagsKHR(VkSurfaceTransformFlagsKHR input_value) +{ + std::string ret; + int index = 0; + while(input_value) { + if (input_value & 1) { + if( !ret.empty()) ret.append("|"); + ret.append(string_VkSurfaceTransformFlagBitsKHR(static_cast(1U << index))); + } + ++index; + input_value >>= 1; + } + if( ret.empty()) ret.append(string_VkSurfaceTransformFlagBitsKHR(static_cast(0))); + return ret; +} + +static inline const char* string_VkPresentModeKHR(VkPresentModeKHR input_value) +{ + switch (input_value) + { + case VK_PRESENT_MODE_FIFO_KHR: + return "VK_PRESENT_MODE_FIFO_KHR"; + case VK_PRESENT_MODE_FIFO_RELAXED_KHR: + return "VK_PRESENT_MODE_FIFO_RELAXED_KHR"; + case VK_PRESENT_MODE_IMMEDIATE_KHR: + return "VK_PRESENT_MODE_IMMEDIATE_KHR"; + case VK_PRESENT_MODE_MAILBOX_KHR: + return "VK_PRESENT_MODE_MAILBOX_KHR"; + case VK_PRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHR: + return "VK_PRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHR"; + case VK_PRESENT_MODE_SHARED_DEMAND_REFRESH_KHR: + return "VK_PRESENT_MODE_SHARED_DEMAND_REFRESH_KHR"; + default: + return "Unhandled VkPresentModeKHR"; + } +} + +static inline const char* string_VkColorSpaceKHR(VkColorSpaceKHR input_value) +{ + switch (input_value) + { + case VK_COLOR_SPACE_ADOBERGB_LINEAR_EXT: + return "VK_COLOR_SPACE_ADOBERGB_LINEAR_EXT"; + case VK_COLOR_SPACE_ADOBERGB_NONLINEAR_EXT: + return "VK_COLOR_SPACE_ADOBERGB_NONLINEAR_EXT"; + case VK_COLOR_SPACE_BT2020_LINEAR_EXT: + return "VK_COLOR_SPACE_BT2020_LINEAR_EXT"; + case VK_COLOR_SPACE_BT709_LINEAR_EXT: + return "VK_COLOR_SPACE_BT709_LINEAR_EXT"; + case VK_COLOR_SPACE_BT709_NONLINEAR_EXT: + return "VK_COLOR_SPACE_BT709_NONLINEAR_EXT"; + case VK_COLOR_SPACE_DCI_P3_NONLINEAR_EXT: + return "VK_COLOR_SPACE_DCI_P3_NONLINEAR_EXT"; + case VK_COLOR_SPACE_DISPLAY_NATIVE_AMD: + return "VK_COLOR_SPACE_DISPLAY_NATIVE_AMD"; + case VK_COLOR_SPACE_DISPLAY_P3_LINEAR_EXT: + return "VK_COLOR_SPACE_DISPLAY_P3_LINEAR_EXT"; + case VK_COLOR_SPACE_DISPLAY_P3_NONLINEAR_EXT: + return "VK_COLOR_SPACE_DISPLAY_P3_NONLINEAR_EXT"; + case VK_COLOR_SPACE_DOLBYVISION_EXT: + return "VK_COLOR_SPACE_DOLBYVISION_EXT"; + case VK_COLOR_SPACE_EXTENDED_SRGB_LINEAR_EXT: + return "VK_COLOR_SPACE_EXTENDED_SRGB_LINEAR_EXT"; + case VK_COLOR_SPACE_EXTENDED_SRGB_NONLINEAR_EXT: + return "VK_COLOR_SPACE_EXTENDED_SRGB_NONLINEAR_EXT"; + case VK_COLOR_SPACE_HDR10_HLG_EXT: + return "VK_COLOR_SPACE_HDR10_HLG_EXT"; + case VK_COLOR_SPACE_HDR10_ST2084_EXT: + return "VK_COLOR_SPACE_HDR10_ST2084_EXT"; + case VK_COLOR_SPACE_PASS_THROUGH_EXT: + return "VK_COLOR_SPACE_PASS_THROUGH_EXT"; + case VK_COLOR_SPACE_SRGB_NONLINEAR_KHR: + return "VK_COLOR_SPACE_SRGB_NONLINEAR_KHR"; + default: + return "Unhandled VkColorSpaceKHR"; + } +} + +static inline const char* string_VkCompositeAlphaFlagBitsKHR(VkCompositeAlphaFlagBitsKHR input_value) +{ + switch (input_value) + { + case VK_COMPOSITE_ALPHA_INHERIT_BIT_KHR: + return "VK_COMPOSITE_ALPHA_INHERIT_BIT_KHR"; + case VK_COMPOSITE_ALPHA_OPAQUE_BIT_KHR: + return "VK_COMPOSITE_ALPHA_OPAQUE_BIT_KHR"; + case VK_COMPOSITE_ALPHA_POST_MULTIPLIED_BIT_KHR: + return "VK_COMPOSITE_ALPHA_POST_MULTIPLIED_BIT_KHR"; + case VK_COMPOSITE_ALPHA_PRE_MULTIPLIED_BIT_KHR: + return "VK_COMPOSITE_ALPHA_PRE_MULTIPLIED_BIT_KHR"; + default: + return "Unhandled VkCompositeAlphaFlagBitsKHR"; + } +} + +static inline std::string string_VkCompositeAlphaFlagsKHR(VkCompositeAlphaFlagsKHR input_value) +{ + std::string ret; + int index = 0; + while(input_value) { + if (input_value & 1) { + if( !ret.empty()) ret.append("|"); + ret.append(string_VkCompositeAlphaFlagBitsKHR(static_cast(1U << index))); + } + ++index; + input_value >>= 1; + } + if( ret.empty()) ret.append(string_VkCompositeAlphaFlagBitsKHR(static_cast(0))); + return ret; +} + +static inline const char* string_VkSwapchainCreateFlagBitsKHR(VkSwapchainCreateFlagBitsKHR input_value) +{ + switch (input_value) + { + case VK_SWAPCHAIN_CREATE_MUTABLE_FORMAT_BIT_KHR: + return "VK_SWAPCHAIN_CREATE_MUTABLE_FORMAT_BIT_KHR"; + case VK_SWAPCHAIN_CREATE_PROTECTED_BIT_KHR: + return "VK_SWAPCHAIN_CREATE_PROTECTED_BIT_KHR"; + case VK_SWAPCHAIN_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT_KHR: + return "VK_SWAPCHAIN_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT_KHR"; + default: + return "Unhandled VkSwapchainCreateFlagBitsKHR"; + } +} + +static inline std::string string_VkSwapchainCreateFlagsKHR(VkSwapchainCreateFlagsKHR input_value) +{ + std::string ret; + int index = 0; + while(input_value) { + if (input_value & 1) { + if( !ret.empty()) ret.append("|"); + ret.append(string_VkSwapchainCreateFlagBitsKHR(static_cast(1U << index))); + } + ++index; + input_value >>= 1; + } + if( ret.empty()) ret.append(string_VkSwapchainCreateFlagBitsKHR(static_cast(0))); + return ret; +} + +static inline const char* string_VkDeviceGroupPresentModeFlagBitsKHR(VkDeviceGroupPresentModeFlagBitsKHR input_value) +{ + switch (input_value) + { + case VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_BIT_KHR: + return "VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_BIT_KHR"; + case VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_MULTI_DEVICE_BIT_KHR: + return "VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_MULTI_DEVICE_BIT_KHR"; + case VK_DEVICE_GROUP_PRESENT_MODE_REMOTE_BIT_KHR: + return "VK_DEVICE_GROUP_PRESENT_MODE_REMOTE_BIT_KHR"; + case VK_DEVICE_GROUP_PRESENT_MODE_SUM_BIT_KHR: + return "VK_DEVICE_GROUP_PRESENT_MODE_SUM_BIT_KHR"; + default: + return "Unhandled VkDeviceGroupPresentModeFlagBitsKHR"; + } +} + +static inline std::string string_VkDeviceGroupPresentModeFlagsKHR(VkDeviceGroupPresentModeFlagsKHR input_value) +{ + std::string ret; + int index = 0; + while(input_value) { + if (input_value & 1) { + if( !ret.empty()) ret.append("|"); + ret.append(string_VkDeviceGroupPresentModeFlagBitsKHR(static_cast(1U << index))); + } + ++index; + input_value >>= 1; + } + if( ret.empty()) ret.append(string_VkDeviceGroupPresentModeFlagBitsKHR(static_cast(0))); + return ret; +} + +static inline const char* string_VkDisplayPlaneAlphaFlagBitsKHR(VkDisplayPlaneAlphaFlagBitsKHR input_value) +{ + switch (input_value) + { + case VK_DISPLAY_PLANE_ALPHA_GLOBAL_BIT_KHR: + return "VK_DISPLAY_PLANE_ALPHA_GLOBAL_BIT_KHR"; + case VK_DISPLAY_PLANE_ALPHA_OPAQUE_BIT_KHR: + return "VK_DISPLAY_PLANE_ALPHA_OPAQUE_BIT_KHR"; + case VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_BIT_KHR: + return "VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_BIT_KHR"; + case VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_PREMULTIPLIED_BIT_KHR: + return "VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_PREMULTIPLIED_BIT_KHR"; + default: + return "Unhandled VkDisplayPlaneAlphaFlagBitsKHR"; + } +} + +static inline std::string string_VkDisplayPlaneAlphaFlagsKHR(VkDisplayPlaneAlphaFlagsKHR input_value) +{ + std::string ret; + int index = 0; + while(input_value) { + if (input_value & 1) { + if( !ret.empty()) ret.append("|"); + ret.append(string_VkDisplayPlaneAlphaFlagBitsKHR(static_cast(1U << index))); + } + ++index; + input_value >>= 1; + } + if( ret.empty()) ret.append(string_VkDisplayPlaneAlphaFlagBitsKHR(static_cast(0))); + return ret; +} + + +#ifdef VK_ENABLE_BETA_EXTENSIONS + +static inline const char* string_VkVideoCodecOperationFlagBitsKHR(VkVideoCodecOperationFlagBitsKHR input_value) +{ + switch (input_value) + { +#ifdef VK_ENABLE_BETA_EXTENSIONS + case VK_VIDEO_CODEC_OPERATION_DECODE_H264_BIT_EXT: + return "VK_VIDEO_CODEC_OPERATION_DECODE_H264_BIT_EXT"; +#endif // VK_ENABLE_BETA_EXTENSIONS +#ifdef VK_ENABLE_BETA_EXTENSIONS + case VK_VIDEO_CODEC_OPERATION_DECODE_H265_BIT_EXT: + return "VK_VIDEO_CODEC_OPERATION_DECODE_H265_BIT_EXT"; +#endif // VK_ENABLE_BETA_EXTENSIONS +#ifdef VK_ENABLE_BETA_EXTENSIONS + case VK_VIDEO_CODEC_OPERATION_ENCODE_H264_BIT_EXT: + return "VK_VIDEO_CODEC_OPERATION_ENCODE_H264_BIT_EXT"; +#endif // VK_ENABLE_BETA_EXTENSIONS + case VK_VIDEO_CODEC_OPERATION_INVALID_BIT_KHR: + return "VK_VIDEO_CODEC_OPERATION_INVALID_BIT_KHR"; + default: + return "Unhandled VkVideoCodecOperationFlagBitsKHR"; + } +} + +static inline std::string string_VkVideoCodecOperationFlagsKHR(VkVideoCodecOperationFlagsKHR input_value) +{ + std::string ret; + int index = 0; + while(input_value) { + if (input_value & 1) { + if( !ret.empty()) ret.append("|"); + ret.append(string_VkVideoCodecOperationFlagBitsKHR(static_cast(1U << index))); + } + ++index; + input_value >>= 1; + } + if( ret.empty()) ret.append(string_VkVideoCodecOperationFlagBitsKHR(static_cast(0))); + return ret; +} +#endif // VK_ENABLE_BETA_EXTENSIONS + + +#ifdef VK_ENABLE_BETA_EXTENSIONS + +static inline const char* string_VkVideoChromaSubsamplingFlagBitsKHR(VkVideoChromaSubsamplingFlagBitsKHR input_value) +{ + switch (input_value) + { + case VK_VIDEO_CHROMA_SUBSAMPLING_420_BIT_KHR: + return "VK_VIDEO_CHROMA_SUBSAMPLING_420_BIT_KHR"; + case VK_VIDEO_CHROMA_SUBSAMPLING_422_BIT_KHR: + return "VK_VIDEO_CHROMA_SUBSAMPLING_422_BIT_KHR"; + case VK_VIDEO_CHROMA_SUBSAMPLING_444_BIT_KHR: + return "VK_VIDEO_CHROMA_SUBSAMPLING_444_BIT_KHR"; + case VK_VIDEO_CHROMA_SUBSAMPLING_INVALID_BIT_KHR: + return "VK_VIDEO_CHROMA_SUBSAMPLING_INVALID_BIT_KHR"; + case VK_VIDEO_CHROMA_SUBSAMPLING_MONOCHROME_BIT_KHR: + return "VK_VIDEO_CHROMA_SUBSAMPLING_MONOCHROME_BIT_KHR"; + default: + return "Unhandled VkVideoChromaSubsamplingFlagBitsKHR"; + } +} + +static inline std::string string_VkVideoChromaSubsamplingFlagsKHR(VkVideoChromaSubsamplingFlagsKHR input_value) +{ + std::string ret; + int index = 0; + while(input_value) { + if (input_value & 1) { + if( !ret.empty()) ret.append("|"); + ret.append(string_VkVideoChromaSubsamplingFlagBitsKHR(static_cast(1U << index))); + } + ++index; + input_value >>= 1; + } + if( ret.empty()) ret.append(string_VkVideoChromaSubsamplingFlagBitsKHR(static_cast(0))); + return ret; +} +#endif // VK_ENABLE_BETA_EXTENSIONS + + +#ifdef VK_ENABLE_BETA_EXTENSIONS + +static inline const char* string_VkVideoComponentBitDepthFlagBitsKHR(VkVideoComponentBitDepthFlagBitsKHR input_value) +{ + switch (input_value) + { + case VK_VIDEO_COMPONENT_BIT_DEPTH_10_BIT_KHR: + return "VK_VIDEO_COMPONENT_BIT_DEPTH_10_BIT_KHR"; + case VK_VIDEO_COMPONENT_BIT_DEPTH_12_BIT_KHR: + return "VK_VIDEO_COMPONENT_BIT_DEPTH_12_BIT_KHR"; + case VK_VIDEO_COMPONENT_BIT_DEPTH_8_BIT_KHR: + return "VK_VIDEO_COMPONENT_BIT_DEPTH_8_BIT_KHR"; + case VK_VIDEO_COMPONENT_BIT_DEPTH_INVALID_KHR: + return "VK_VIDEO_COMPONENT_BIT_DEPTH_INVALID_KHR"; + default: + return "Unhandled VkVideoComponentBitDepthFlagBitsKHR"; + } +} + +static inline std::string string_VkVideoComponentBitDepthFlagsKHR(VkVideoComponentBitDepthFlagsKHR input_value) +{ + std::string ret; + int index = 0; + while(input_value) { + if (input_value & 1) { + if( !ret.empty()) ret.append("|"); + ret.append(string_VkVideoComponentBitDepthFlagBitsKHR(static_cast(1U << index))); + } + ++index; + input_value >>= 1; + } + if( ret.empty()) ret.append(string_VkVideoComponentBitDepthFlagBitsKHR(static_cast(0))); + return ret; +} +#endif // VK_ENABLE_BETA_EXTENSIONS + + +#ifdef VK_ENABLE_BETA_EXTENSIONS + +static inline const char* string_VkVideoCapabilityFlagBitsKHR(VkVideoCapabilityFlagBitsKHR input_value) +{ + switch (input_value) + { + case VK_VIDEO_CAPABILITY_PROTECTED_CONTENT_BIT_KHR: + return "VK_VIDEO_CAPABILITY_PROTECTED_CONTENT_BIT_KHR"; + case VK_VIDEO_CAPABILITY_SEPARATE_REFERENCE_IMAGES_BIT_KHR: + return "VK_VIDEO_CAPABILITY_SEPARATE_REFERENCE_IMAGES_BIT_KHR"; + default: + return "Unhandled VkVideoCapabilityFlagBitsKHR"; + } +} + +static inline std::string string_VkVideoCapabilityFlagsKHR(VkVideoCapabilityFlagsKHR input_value) +{ + std::string ret; + int index = 0; + while(input_value) { + if (input_value & 1) { + if( !ret.empty()) ret.append("|"); + ret.append(string_VkVideoCapabilityFlagBitsKHR(static_cast(1U << index))); + } + ++index; + input_value >>= 1; + } + if( ret.empty()) ret.append(string_VkVideoCapabilityFlagBitsKHR(static_cast(0))); + return ret; +} +#endif // VK_ENABLE_BETA_EXTENSIONS + + +#ifdef VK_ENABLE_BETA_EXTENSIONS + +static inline const char* string_VkVideoSessionCreateFlagBitsKHR(VkVideoSessionCreateFlagBitsKHR input_value) +{ + switch (input_value) + { + case VK_VIDEO_SESSION_CREATE_DEFAULT_KHR: + return "VK_VIDEO_SESSION_CREATE_DEFAULT_KHR"; + case VK_VIDEO_SESSION_CREATE_PROTECTED_CONTENT_BIT_KHR: + return "VK_VIDEO_SESSION_CREATE_PROTECTED_CONTENT_BIT_KHR"; + default: + return "Unhandled VkVideoSessionCreateFlagBitsKHR"; + } +} + +static inline std::string string_VkVideoSessionCreateFlagsKHR(VkVideoSessionCreateFlagsKHR input_value) +{ + std::string ret; + int index = 0; + while(input_value) { + if (input_value & 1) { + if( !ret.empty()) ret.append("|"); + ret.append(string_VkVideoSessionCreateFlagBitsKHR(static_cast(1U << index))); + } + ++index; + input_value >>= 1; + } + if( ret.empty()) ret.append(string_VkVideoSessionCreateFlagBitsKHR(static_cast(0))); + return ret; +} +#endif // VK_ENABLE_BETA_EXTENSIONS + + +#ifdef VK_ENABLE_BETA_EXTENSIONS + +static inline const char* string_VkVideoCodingControlFlagBitsKHR(VkVideoCodingControlFlagBitsKHR input_value) +{ + switch (input_value) + { + case VK_VIDEO_CODING_CONTROL_DEFAULT_KHR: + return "VK_VIDEO_CODING_CONTROL_DEFAULT_KHR"; + case VK_VIDEO_CODING_CONTROL_RESET_BIT_KHR: + return "VK_VIDEO_CODING_CONTROL_RESET_BIT_KHR"; + default: + return "Unhandled VkVideoCodingControlFlagBitsKHR"; + } +} + +static inline std::string string_VkVideoCodingControlFlagsKHR(VkVideoCodingControlFlagsKHR input_value) +{ + std::string ret; + int index = 0; + while(input_value) { + if (input_value & 1) { + if( !ret.empty()) ret.append("|"); + ret.append(string_VkVideoCodingControlFlagBitsKHR(static_cast(1U << index))); + } + ++index; + input_value >>= 1; + } + if( ret.empty()) ret.append(string_VkVideoCodingControlFlagBitsKHR(static_cast(0))); + return ret; +} +#endif // VK_ENABLE_BETA_EXTENSIONS + + +#ifdef VK_ENABLE_BETA_EXTENSIONS + +static inline const char* string_VkVideoCodingQualityPresetFlagBitsKHR(VkVideoCodingQualityPresetFlagBitsKHR input_value) +{ + switch (input_value) + { + case VK_VIDEO_CODING_QUALITY_PRESET_DEFAULT_BIT_KHR: + return "VK_VIDEO_CODING_QUALITY_PRESET_DEFAULT_BIT_KHR"; + case VK_VIDEO_CODING_QUALITY_PRESET_NORMAL_BIT_KHR: + return "VK_VIDEO_CODING_QUALITY_PRESET_NORMAL_BIT_KHR"; + case VK_VIDEO_CODING_QUALITY_PRESET_POWER_BIT_KHR: + return "VK_VIDEO_CODING_QUALITY_PRESET_POWER_BIT_KHR"; + case VK_VIDEO_CODING_QUALITY_PRESET_QUALITY_BIT_KHR: + return "VK_VIDEO_CODING_QUALITY_PRESET_QUALITY_BIT_KHR"; + default: + return "Unhandled VkVideoCodingQualityPresetFlagBitsKHR"; + } +} + +static inline std::string string_VkVideoCodingQualityPresetFlagsKHR(VkVideoCodingQualityPresetFlagsKHR input_value) +{ + std::string ret; + int index = 0; + while(input_value) { + if (input_value & 1) { + if( !ret.empty()) ret.append("|"); + ret.append(string_VkVideoCodingQualityPresetFlagBitsKHR(static_cast(1U << index))); + } + ++index; + input_value >>= 1; + } + if( ret.empty()) ret.append(string_VkVideoCodingQualityPresetFlagBitsKHR(static_cast(0))); + return ret; +} +#endif // VK_ENABLE_BETA_EXTENSIONS + + +#ifdef VK_ENABLE_BETA_EXTENSIONS + +static inline const char* string_VkQueryResultStatusKHR(VkQueryResultStatusKHR input_value) +{ + switch (input_value) + { + case VK_QUERY_RESULT_STATUS_COMPLETE_KHR: + return "VK_QUERY_RESULT_STATUS_COMPLETE_KHR"; + case VK_QUERY_RESULT_STATUS_ERROR_KHR: + return "VK_QUERY_RESULT_STATUS_ERROR_KHR"; + case VK_QUERY_RESULT_STATUS_NOT_READY_KHR: + return "VK_QUERY_RESULT_STATUS_NOT_READY_KHR"; + default: + return "Unhandled VkQueryResultStatusKHR"; + } +} +#endif // VK_ENABLE_BETA_EXTENSIONS + + +#ifdef VK_ENABLE_BETA_EXTENSIONS + +static inline const char* string_VkVideoDecodeFlagBitsKHR(VkVideoDecodeFlagBitsKHR input_value) +{ + switch (input_value) + { + case VK_VIDEO_DECODE_DEFAULT_KHR: + return "VK_VIDEO_DECODE_DEFAULT_KHR"; + case VK_VIDEO_DECODE_RESERVED_0_BIT_KHR: + return "VK_VIDEO_DECODE_RESERVED_0_BIT_KHR"; + default: + return "Unhandled VkVideoDecodeFlagBitsKHR"; + } +} + +static inline std::string string_VkVideoDecodeFlagsKHR(VkVideoDecodeFlagsKHR input_value) +{ + std::string ret; + int index = 0; + while(input_value) { + if (input_value & 1) { + if( !ret.empty()) ret.append("|"); + ret.append(string_VkVideoDecodeFlagBitsKHR(static_cast(1U << index))); + } + ++index; + input_value >>= 1; + } + if( ret.empty()) ret.append(string_VkVideoDecodeFlagBitsKHR(static_cast(0))); + return ret; +} +#endif // VK_ENABLE_BETA_EXTENSIONS + +static inline const char* string_VkPeerMemoryFeatureFlagBitsKHR(VkPeerMemoryFeatureFlagBitsKHR input_value) +{ + switch (input_value) + { + case VK_PEER_MEMORY_FEATURE_COPY_DST_BIT: + return "VK_PEER_MEMORY_FEATURE_COPY_DST_BIT"; + case VK_PEER_MEMORY_FEATURE_COPY_SRC_BIT: + return "VK_PEER_MEMORY_FEATURE_COPY_SRC_BIT"; + case VK_PEER_MEMORY_FEATURE_GENERIC_DST_BIT: + return "VK_PEER_MEMORY_FEATURE_GENERIC_DST_BIT"; + case VK_PEER_MEMORY_FEATURE_GENERIC_SRC_BIT: + return "VK_PEER_MEMORY_FEATURE_GENERIC_SRC_BIT"; + default: + return "Unhandled VkPeerMemoryFeatureFlagBitsKHR"; + } +} + +static inline std::string string_VkPeerMemoryFeatureFlagsKHR(VkPeerMemoryFeatureFlagsKHR input_value) +{ + std::string ret; + int index = 0; + while(input_value) { + if (input_value & 1) { + if( !ret.empty()) ret.append("|"); + ret.append(string_VkPeerMemoryFeatureFlagBitsKHR(static_cast(1U << index))); + } + ++index; + input_value >>= 1; + } + if( ret.empty()) ret.append(string_VkPeerMemoryFeatureFlagBitsKHR(static_cast(0))); + return ret; +} + +static inline const char* string_VkMemoryAllocateFlagBitsKHR(VkMemoryAllocateFlagBitsKHR input_value) +{ + switch (input_value) + { + case VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_BIT: + return "VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_BIT"; + case VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT: + return "VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT"; + case VK_MEMORY_ALLOCATE_DEVICE_MASK_BIT: + return "VK_MEMORY_ALLOCATE_DEVICE_MASK_BIT"; + default: + return "Unhandled VkMemoryAllocateFlagBitsKHR"; + } +} + +static inline std::string string_VkMemoryAllocateFlagsKHR(VkMemoryAllocateFlagsKHR input_value) +{ + std::string ret; + int index = 0; + while(input_value) { + if (input_value & 1) { + if( !ret.empty()) ret.append("|"); + ret.append(string_VkMemoryAllocateFlagBitsKHR(static_cast(1U << index))); + } + ++index; + input_value >>= 1; + } + if( ret.empty()) ret.append(string_VkMemoryAllocateFlagBitsKHR(static_cast(0))); + return ret; +} + +static inline const char* string_VkExternalMemoryHandleTypeFlagBitsKHR(VkExternalMemoryHandleTypeFlagBitsKHR input_value) +{ + switch (input_value) + { + case VK_EXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_BIT_ANDROID: + return "VK_EXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_BIT_ANDROID"; + case VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_BIT: + return "VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_BIT"; + case VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_KMT_BIT: + return "VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_KMT_BIT"; + case VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP_BIT: + return "VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP_BIT"; + case VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE_BIT: + return "VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE_BIT"; + case VK_EXTERNAL_MEMORY_HANDLE_TYPE_DMA_BUF_BIT_EXT: + return "VK_EXTERNAL_MEMORY_HANDLE_TYPE_DMA_BUF_BIT_EXT"; + case VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_ALLOCATION_BIT_EXT: + return "VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_ALLOCATION_BIT_EXT"; + case VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_MAPPED_FOREIGN_MEMORY_BIT_EXT: + return "VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_MAPPED_FOREIGN_MEMORY_BIT_EXT"; + case VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT: + return "VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT"; + case VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT: + return "VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT"; + case VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT: + return "VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT"; + case VK_EXTERNAL_MEMORY_HANDLE_TYPE_RDMA_ADDRESS_BIT_NV: + return "VK_EXTERNAL_MEMORY_HANDLE_TYPE_RDMA_ADDRESS_BIT_NV"; + case VK_EXTERNAL_MEMORY_HANDLE_TYPE_ZIRCON_VMO_BIT_FUCHSIA: + return "VK_EXTERNAL_MEMORY_HANDLE_TYPE_ZIRCON_VMO_BIT_FUCHSIA"; + default: + return "Unhandled VkExternalMemoryHandleTypeFlagBitsKHR"; + } +} + +static inline std::string string_VkExternalMemoryHandleTypeFlagsKHR(VkExternalMemoryHandleTypeFlagsKHR input_value) +{ + std::string ret; + int index = 0; + while(input_value) { + if (input_value & 1) { + if( !ret.empty()) ret.append("|"); + ret.append(string_VkExternalMemoryHandleTypeFlagBitsKHR(static_cast(1U << index))); + } + ++index; + input_value >>= 1; + } + if( ret.empty()) ret.append(string_VkExternalMemoryHandleTypeFlagBitsKHR(static_cast(0))); + return ret; +} + +static inline const char* string_VkExternalMemoryFeatureFlagBitsKHR(VkExternalMemoryFeatureFlagBitsKHR input_value) +{ + switch (input_value) + { + case VK_EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT: + return "VK_EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT"; + case VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT: + return "VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT"; + case VK_EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT: + return "VK_EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT"; + default: + return "Unhandled VkExternalMemoryFeatureFlagBitsKHR"; + } +} + +static inline std::string string_VkExternalMemoryFeatureFlagsKHR(VkExternalMemoryFeatureFlagsKHR input_value) +{ + std::string ret; + int index = 0; + while(input_value) { + if (input_value & 1) { + if( !ret.empty()) ret.append("|"); + ret.append(string_VkExternalMemoryFeatureFlagBitsKHR(static_cast(1U << index))); + } + ++index; + input_value >>= 1; + } + if( ret.empty()) ret.append(string_VkExternalMemoryFeatureFlagBitsKHR(static_cast(0))); + return ret; +} + +static inline const char* string_VkExternalSemaphoreHandleTypeFlagBitsKHR(VkExternalSemaphoreHandleTypeFlagBitsKHR input_value) +{ + switch (input_value) + { + case VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE_BIT: + return "VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE_BIT"; + case VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT: + return "VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT"; + case VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_BIT: + return "VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_BIT"; + case VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT: + return "VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT"; + case VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD_BIT: + return "VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD_BIT"; + case VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_ZIRCON_EVENT_BIT_FUCHSIA: + return "VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_ZIRCON_EVENT_BIT_FUCHSIA"; + default: + return "Unhandled VkExternalSemaphoreHandleTypeFlagBitsKHR"; + } +} + +static inline std::string string_VkExternalSemaphoreHandleTypeFlagsKHR(VkExternalSemaphoreHandleTypeFlagsKHR input_value) +{ + std::string ret; + int index = 0; + while(input_value) { + if (input_value & 1) { + if( !ret.empty()) ret.append("|"); + ret.append(string_VkExternalSemaphoreHandleTypeFlagBitsKHR(static_cast(1U << index))); + } + ++index; + input_value >>= 1; + } + if( ret.empty()) ret.append(string_VkExternalSemaphoreHandleTypeFlagBitsKHR(static_cast(0))); + return ret; +} + +static inline const char* string_VkExternalSemaphoreFeatureFlagBitsKHR(VkExternalSemaphoreFeatureFlagBitsKHR input_value) +{ + switch (input_value) + { + case VK_EXTERNAL_SEMAPHORE_FEATURE_EXPORTABLE_BIT: + return "VK_EXTERNAL_SEMAPHORE_FEATURE_EXPORTABLE_BIT"; + case VK_EXTERNAL_SEMAPHORE_FEATURE_IMPORTABLE_BIT: + return "VK_EXTERNAL_SEMAPHORE_FEATURE_IMPORTABLE_BIT"; + default: + return "Unhandled VkExternalSemaphoreFeatureFlagBitsKHR"; + } +} + +static inline std::string string_VkExternalSemaphoreFeatureFlagsKHR(VkExternalSemaphoreFeatureFlagsKHR input_value) +{ + std::string ret; + int index = 0; + while(input_value) { + if (input_value & 1) { + if( !ret.empty()) ret.append("|"); + ret.append(string_VkExternalSemaphoreFeatureFlagBitsKHR(static_cast(1U << index))); + } + ++index; + input_value >>= 1; + } + if( ret.empty()) ret.append(string_VkExternalSemaphoreFeatureFlagBitsKHR(static_cast(0))); + return ret; +} + +static inline const char* string_VkSemaphoreImportFlagBitsKHR(VkSemaphoreImportFlagBitsKHR input_value) +{ + switch (input_value) + { + case VK_SEMAPHORE_IMPORT_TEMPORARY_BIT: + return "VK_SEMAPHORE_IMPORT_TEMPORARY_BIT"; + default: + return "Unhandled VkSemaphoreImportFlagBitsKHR"; + } +} + +static inline std::string string_VkSemaphoreImportFlagsKHR(VkSemaphoreImportFlagsKHR input_value) +{ + std::string ret; + int index = 0; + while(input_value) { + if (input_value & 1) { + if( !ret.empty()) ret.append("|"); + ret.append(string_VkSemaphoreImportFlagBitsKHR(static_cast(1U << index))); + } + ++index; + input_value >>= 1; + } + if( ret.empty()) ret.append(string_VkSemaphoreImportFlagBitsKHR(static_cast(0))); + return ret; +} + +static inline const char* string_VkDescriptorUpdateTemplateTypeKHR(VkDescriptorUpdateTemplateTypeKHR input_value) +{ + switch (input_value) + { + case VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_DESCRIPTOR_SET: + return "VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_DESCRIPTOR_SET"; + case VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS_KHR: + return "VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS_KHR"; + default: + return "Unhandled VkDescriptorUpdateTemplateTypeKHR"; + } +} + +static inline const char* string_VkExternalFenceHandleTypeFlagBitsKHR(VkExternalFenceHandleTypeFlagBitsKHR input_value) +{ + switch (input_value) + { + case VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_FD_BIT: + return "VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_FD_BIT"; + case VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_BIT: + return "VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_BIT"; + case VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT: + return "VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT"; + case VK_EXTERNAL_FENCE_HANDLE_TYPE_SYNC_FD_BIT: + return "VK_EXTERNAL_FENCE_HANDLE_TYPE_SYNC_FD_BIT"; + default: + return "Unhandled VkExternalFenceHandleTypeFlagBitsKHR"; + } +} + +static inline std::string string_VkExternalFenceHandleTypeFlagsKHR(VkExternalFenceHandleTypeFlagsKHR input_value) +{ + std::string ret; + int index = 0; + while(input_value) { + if (input_value & 1) { + if( !ret.empty()) ret.append("|"); + ret.append(string_VkExternalFenceHandleTypeFlagBitsKHR(static_cast(1U << index))); + } + ++index; + input_value >>= 1; + } + if( ret.empty()) ret.append(string_VkExternalFenceHandleTypeFlagBitsKHR(static_cast(0))); + return ret; +} + +static inline const char* string_VkExternalFenceFeatureFlagBitsKHR(VkExternalFenceFeatureFlagBitsKHR input_value) +{ + switch (input_value) + { + case VK_EXTERNAL_FENCE_FEATURE_EXPORTABLE_BIT: + return "VK_EXTERNAL_FENCE_FEATURE_EXPORTABLE_BIT"; + case VK_EXTERNAL_FENCE_FEATURE_IMPORTABLE_BIT: + return "VK_EXTERNAL_FENCE_FEATURE_IMPORTABLE_BIT"; + default: + return "Unhandled VkExternalFenceFeatureFlagBitsKHR"; + } +} + +static inline std::string string_VkExternalFenceFeatureFlagsKHR(VkExternalFenceFeatureFlagsKHR input_value) +{ + std::string ret; + int index = 0; + while(input_value) { + if (input_value & 1) { + if( !ret.empty()) ret.append("|"); + ret.append(string_VkExternalFenceFeatureFlagBitsKHR(static_cast(1U << index))); + } + ++index; + input_value >>= 1; + } + if( ret.empty()) ret.append(string_VkExternalFenceFeatureFlagBitsKHR(static_cast(0))); + return ret; +} + +static inline const char* string_VkFenceImportFlagBitsKHR(VkFenceImportFlagBitsKHR input_value) +{ + switch (input_value) + { + case VK_FENCE_IMPORT_TEMPORARY_BIT: + return "VK_FENCE_IMPORT_TEMPORARY_BIT"; + default: + return "Unhandled VkFenceImportFlagBitsKHR"; + } +} + +static inline std::string string_VkFenceImportFlagsKHR(VkFenceImportFlagsKHR input_value) +{ + std::string ret; + int index = 0; + while(input_value) { + if (input_value & 1) { + if( !ret.empty()) ret.append("|"); + ret.append(string_VkFenceImportFlagBitsKHR(static_cast(1U << index))); + } + ++index; + input_value >>= 1; + } + if( ret.empty()) ret.append(string_VkFenceImportFlagBitsKHR(static_cast(0))); + return ret; +} + +static inline const char* string_VkPerformanceCounterUnitKHR(VkPerformanceCounterUnitKHR input_value) +{ + switch (input_value) + { + case VK_PERFORMANCE_COUNTER_UNIT_AMPS_KHR: + return "VK_PERFORMANCE_COUNTER_UNIT_AMPS_KHR"; + case VK_PERFORMANCE_COUNTER_UNIT_BYTES_KHR: + return "VK_PERFORMANCE_COUNTER_UNIT_BYTES_KHR"; + case VK_PERFORMANCE_COUNTER_UNIT_BYTES_PER_SECOND_KHR: + return "VK_PERFORMANCE_COUNTER_UNIT_BYTES_PER_SECOND_KHR"; + case VK_PERFORMANCE_COUNTER_UNIT_CYCLES_KHR: + return "VK_PERFORMANCE_COUNTER_UNIT_CYCLES_KHR"; + case VK_PERFORMANCE_COUNTER_UNIT_GENERIC_KHR: + return "VK_PERFORMANCE_COUNTER_UNIT_GENERIC_KHR"; + case VK_PERFORMANCE_COUNTER_UNIT_HERTZ_KHR: + return "VK_PERFORMANCE_COUNTER_UNIT_HERTZ_KHR"; + case VK_PERFORMANCE_COUNTER_UNIT_KELVIN_KHR: + return "VK_PERFORMANCE_COUNTER_UNIT_KELVIN_KHR"; + case VK_PERFORMANCE_COUNTER_UNIT_NANOSECONDS_KHR: + return "VK_PERFORMANCE_COUNTER_UNIT_NANOSECONDS_KHR"; + case VK_PERFORMANCE_COUNTER_UNIT_PERCENTAGE_KHR: + return "VK_PERFORMANCE_COUNTER_UNIT_PERCENTAGE_KHR"; + case VK_PERFORMANCE_COUNTER_UNIT_VOLTS_KHR: + return "VK_PERFORMANCE_COUNTER_UNIT_VOLTS_KHR"; + case VK_PERFORMANCE_COUNTER_UNIT_WATTS_KHR: + return "VK_PERFORMANCE_COUNTER_UNIT_WATTS_KHR"; + default: + return "Unhandled VkPerformanceCounterUnitKHR"; + } +} + +static inline const char* string_VkPerformanceCounterScopeKHR(VkPerformanceCounterScopeKHR input_value) +{ + switch (input_value) + { + case VK_PERFORMANCE_COUNTER_SCOPE_COMMAND_BUFFER_KHR: + return "VK_PERFORMANCE_COUNTER_SCOPE_COMMAND_BUFFER_KHR"; + case VK_PERFORMANCE_COUNTER_SCOPE_COMMAND_KHR: + return "VK_PERFORMANCE_COUNTER_SCOPE_COMMAND_KHR"; + case VK_PERFORMANCE_COUNTER_SCOPE_RENDER_PASS_KHR: + return "VK_PERFORMANCE_COUNTER_SCOPE_RENDER_PASS_KHR"; + default: + return "Unhandled VkPerformanceCounterScopeKHR"; + } +} + +static inline const char* string_VkPerformanceCounterStorageKHR(VkPerformanceCounterStorageKHR input_value) +{ + switch (input_value) + { + case VK_PERFORMANCE_COUNTER_STORAGE_FLOAT32_KHR: + return "VK_PERFORMANCE_COUNTER_STORAGE_FLOAT32_KHR"; + case VK_PERFORMANCE_COUNTER_STORAGE_FLOAT64_KHR: + return "VK_PERFORMANCE_COUNTER_STORAGE_FLOAT64_KHR"; + case VK_PERFORMANCE_COUNTER_STORAGE_INT32_KHR: + return "VK_PERFORMANCE_COUNTER_STORAGE_INT32_KHR"; + case VK_PERFORMANCE_COUNTER_STORAGE_INT64_KHR: + return "VK_PERFORMANCE_COUNTER_STORAGE_INT64_KHR"; + case VK_PERFORMANCE_COUNTER_STORAGE_UINT32_KHR: + return "VK_PERFORMANCE_COUNTER_STORAGE_UINT32_KHR"; + case VK_PERFORMANCE_COUNTER_STORAGE_UINT64_KHR: + return "VK_PERFORMANCE_COUNTER_STORAGE_UINT64_KHR"; + default: + return "Unhandled VkPerformanceCounterStorageKHR"; + } +} + +static inline const char* string_VkPerformanceCounterDescriptionFlagBitsKHR(VkPerformanceCounterDescriptionFlagBitsKHR input_value) +{ + switch (input_value) + { + case VK_PERFORMANCE_COUNTER_DESCRIPTION_CONCURRENTLY_IMPACTED_BIT_KHR: + return "VK_PERFORMANCE_COUNTER_DESCRIPTION_CONCURRENTLY_IMPACTED_BIT_KHR"; + case VK_PERFORMANCE_COUNTER_DESCRIPTION_PERFORMANCE_IMPACTING_BIT_KHR: + return "VK_PERFORMANCE_COUNTER_DESCRIPTION_PERFORMANCE_IMPACTING_BIT_KHR"; + default: + return "Unhandled VkPerformanceCounterDescriptionFlagBitsKHR"; + } +} + +static inline std::string string_VkPerformanceCounterDescriptionFlagsKHR(VkPerformanceCounterDescriptionFlagsKHR input_value) +{ + std::string ret; + int index = 0; + while(input_value) { + if (input_value & 1) { + if( !ret.empty()) ret.append("|"); + ret.append(string_VkPerformanceCounterDescriptionFlagBitsKHR(static_cast(1U << index))); + } + ++index; + input_value >>= 1; + } + if( ret.empty()) ret.append(string_VkPerformanceCounterDescriptionFlagBitsKHR(static_cast(0))); + return ret; +} + +static inline const char* string_VkPointClippingBehaviorKHR(VkPointClippingBehaviorKHR input_value) +{ + switch (input_value) + { + case VK_POINT_CLIPPING_BEHAVIOR_ALL_CLIP_PLANES: + return "VK_POINT_CLIPPING_BEHAVIOR_ALL_CLIP_PLANES"; + case VK_POINT_CLIPPING_BEHAVIOR_USER_CLIP_PLANES_ONLY: + return "VK_POINT_CLIPPING_BEHAVIOR_USER_CLIP_PLANES_ONLY"; + default: + return "Unhandled VkPointClippingBehaviorKHR"; + } +} + +static inline const char* string_VkTessellationDomainOriginKHR(VkTessellationDomainOriginKHR input_value) +{ + switch (input_value) + { + case VK_TESSELLATION_DOMAIN_ORIGIN_LOWER_LEFT: + return "VK_TESSELLATION_DOMAIN_ORIGIN_LOWER_LEFT"; + case VK_TESSELLATION_DOMAIN_ORIGIN_UPPER_LEFT: + return "VK_TESSELLATION_DOMAIN_ORIGIN_UPPER_LEFT"; + default: + return "Unhandled VkTessellationDomainOriginKHR"; + } +} + +static inline const char* string_VkSamplerYcbcrModelConversionKHR(VkSamplerYcbcrModelConversionKHR input_value) +{ + switch (input_value) + { + case VK_SAMPLER_YCBCR_MODEL_CONVERSION_RGB_IDENTITY: + return "VK_SAMPLER_YCBCR_MODEL_CONVERSION_RGB_IDENTITY"; + case VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_2020: + return "VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_2020"; + case VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_601: + return "VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_601"; + case VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_709: + return "VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_709"; + case VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_IDENTITY: + return "VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_IDENTITY"; + default: + return "Unhandled VkSamplerYcbcrModelConversionKHR"; + } +} + +static inline const char* string_VkSamplerYcbcrRangeKHR(VkSamplerYcbcrRangeKHR input_value) +{ + switch (input_value) + { + case VK_SAMPLER_YCBCR_RANGE_ITU_FULL: + return "VK_SAMPLER_YCBCR_RANGE_ITU_FULL"; + case VK_SAMPLER_YCBCR_RANGE_ITU_NARROW: + return "VK_SAMPLER_YCBCR_RANGE_ITU_NARROW"; + default: + return "Unhandled VkSamplerYcbcrRangeKHR"; + } +} + +static inline const char* string_VkChromaLocationKHR(VkChromaLocationKHR input_value) +{ + switch (input_value) + { + case VK_CHROMA_LOCATION_COSITED_EVEN: + return "VK_CHROMA_LOCATION_COSITED_EVEN"; + case VK_CHROMA_LOCATION_MIDPOINT: + return "VK_CHROMA_LOCATION_MIDPOINT"; + default: + return "Unhandled VkChromaLocationKHR"; + } +} + +static inline const char* string_VkDriverIdKHR(VkDriverIdKHR input_value) +{ + switch (input_value) + { + case VK_DRIVER_ID_AMD_OPEN_SOURCE: + return "VK_DRIVER_ID_AMD_OPEN_SOURCE"; + case VK_DRIVER_ID_AMD_PROPRIETARY: + return "VK_DRIVER_ID_AMD_PROPRIETARY"; + case VK_DRIVER_ID_ARM_PROPRIETARY: + return "VK_DRIVER_ID_ARM_PROPRIETARY"; + case VK_DRIVER_ID_BROADCOM_PROPRIETARY: + return "VK_DRIVER_ID_BROADCOM_PROPRIETARY"; + case VK_DRIVER_ID_COREAVI_PROPRIETARY: + return "VK_DRIVER_ID_COREAVI_PROPRIETARY"; + case VK_DRIVER_ID_GGP_PROPRIETARY: + return "VK_DRIVER_ID_GGP_PROPRIETARY"; + case VK_DRIVER_ID_GOOGLE_SWIFTSHADER: + return "VK_DRIVER_ID_GOOGLE_SWIFTSHADER"; + case VK_DRIVER_ID_IMAGINATION_PROPRIETARY: + return "VK_DRIVER_ID_IMAGINATION_PROPRIETARY"; + case VK_DRIVER_ID_INTEL_OPEN_SOURCE_MESA: + return "VK_DRIVER_ID_INTEL_OPEN_SOURCE_MESA"; + case VK_DRIVER_ID_INTEL_PROPRIETARY_WINDOWS: + return "VK_DRIVER_ID_INTEL_PROPRIETARY_WINDOWS"; + case VK_DRIVER_ID_JUICE_PROPRIETARY: + return "VK_DRIVER_ID_JUICE_PROPRIETARY"; + case VK_DRIVER_ID_MESA_LLVMPIPE: + return "VK_DRIVER_ID_MESA_LLVMPIPE"; + case VK_DRIVER_ID_MESA_RADV: + return "VK_DRIVER_ID_MESA_RADV"; + case VK_DRIVER_ID_MOLTENVK: + return "VK_DRIVER_ID_MOLTENVK"; + case VK_DRIVER_ID_NVIDIA_PROPRIETARY: + return "VK_DRIVER_ID_NVIDIA_PROPRIETARY"; + case VK_DRIVER_ID_QUALCOMM_PROPRIETARY: + return "VK_DRIVER_ID_QUALCOMM_PROPRIETARY"; + case VK_DRIVER_ID_VERISILICON_PROPRIETARY: + return "VK_DRIVER_ID_VERISILICON_PROPRIETARY"; + default: + return "Unhandled VkDriverIdKHR"; + } +} + +static inline const char* string_VkShaderFloatControlsIndependenceKHR(VkShaderFloatControlsIndependenceKHR input_value) +{ + switch (input_value) + { + case VK_SHADER_FLOAT_CONTROLS_INDEPENDENCE_32_BIT_ONLY: + return "VK_SHADER_FLOAT_CONTROLS_INDEPENDENCE_32_BIT_ONLY"; + case VK_SHADER_FLOAT_CONTROLS_INDEPENDENCE_ALL: + return "VK_SHADER_FLOAT_CONTROLS_INDEPENDENCE_ALL"; + case VK_SHADER_FLOAT_CONTROLS_INDEPENDENCE_NONE: + return "VK_SHADER_FLOAT_CONTROLS_INDEPENDENCE_NONE"; + default: + return "Unhandled VkShaderFloatControlsIndependenceKHR"; + } +} + +static inline const char* string_VkResolveModeFlagBitsKHR(VkResolveModeFlagBitsKHR input_value) +{ + switch (input_value) + { + case VK_RESOLVE_MODE_AVERAGE_BIT: + return "VK_RESOLVE_MODE_AVERAGE_BIT"; + case VK_RESOLVE_MODE_MAX_BIT: + return "VK_RESOLVE_MODE_MAX_BIT"; + case VK_RESOLVE_MODE_MIN_BIT: + return "VK_RESOLVE_MODE_MIN_BIT"; + case VK_RESOLVE_MODE_NONE: + return "VK_RESOLVE_MODE_NONE"; + case VK_RESOLVE_MODE_SAMPLE_ZERO_BIT: + return "VK_RESOLVE_MODE_SAMPLE_ZERO_BIT"; + default: + return "Unhandled VkResolveModeFlagBitsKHR"; + } +} + +static inline std::string string_VkResolveModeFlagsKHR(VkResolveModeFlagsKHR input_value) +{ + std::string ret; + int index = 0; + while(input_value) { + if (input_value & 1) { + if( !ret.empty()) ret.append("|"); + ret.append(string_VkResolveModeFlagBitsKHR(static_cast(1U << index))); + } + ++index; + input_value >>= 1; + } + if( ret.empty()) ret.append(string_VkResolveModeFlagBitsKHR(static_cast(0))); + return ret; +} + +static inline const char* string_VkSemaphoreTypeKHR(VkSemaphoreTypeKHR input_value) +{ + switch (input_value) + { + case VK_SEMAPHORE_TYPE_BINARY: + return "VK_SEMAPHORE_TYPE_BINARY"; + case VK_SEMAPHORE_TYPE_TIMELINE: + return "VK_SEMAPHORE_TYPE_TIMELINE"; + default: + return "Unhandled VkSemaphoreTypeKHR"; + } +} + +static inline const char* string_VkSemaphoreWaitFlagBitsKHR(VkSemaphoreWaitFlagBitsKHR input_value) +{ + switch (input_value) + { + case VK_SEMAPHORE_WAIT_ANY_BIT: + return "VK_SEMAPHORE_WAIT_ANY_BIT"; + default: + return "Unhandled VkSemaphoreWaitFlagBitsKHR"; + } +} + +static inline std::string string_VkSemaphoreWaitFlagsKHR(VkSemaphoreWaitFlagsKHR input_value) +{ + std::string ret; + int index = 0; + while(input_value) { + if (input_value & 1) { + if( !ret.empty()) ret.append("|"); + ret.append(string_VkSemaphoreWaitFlagBitsKHR(static_cast(1U << index))); + } + ++index; + input_value >>= 1; + } + if( ret.empty()) ret.append(string_VkSemaphoreWaitFlagBitsKHR(static_cast(0))); + return ret; +} + +static inline const char* string_VkFragmentShadingRateCombinerOpKHR(VkFragmentShadingRateCombinerOpKHR input_value) +{ + switch (input_value) + { + case VK_FRAGMENT_SHADING_RATE_COMBINER_OP_KEEP_KHR: + return "VK_FRAGMENT_SHADING_RATE_COMBINER_OP_KEEP_KHR"; + case VK_FRAGMENT_SHADING_RATE_COMBINER_OP_MAX_KHR: + return "VK_FRAGMENT_SHADING_RATE_COMBINER_OP_MAX_KHR"; + case VK_FRAGMENT_SHADING_RATE_COMBINER_OP_MIN_KHR: + return "VK_FRAGMENT_SHADING_RATE_COMBINER_OP_MIN_KHR"; + case VK_FRAGMENT_SHADING_RATE_COMBINER_OP_MUL_KHR: + return "VK_FRAGMENT_SHADING_RATE_COMBINER_OP_MUL_KHR"; + case VK_FRAGMENT_SHADING_RATE_COMBINER_OP_REPLACE_KHR: + return "VK_FRAGMENT_SHADING_RATE_COMBINER_OP_REPLACE_KHR"; + default: + return "Unhandled VkFragmentShadingRateCombinerOpKHR"; + } +} + +static inline const char* string_VkPipelineExecutableStatisticFormatKHR(VkPipelineExecutableStatisticFormatKHR input_value) +{ + switch (input_value) + { + case VK_PIPELINE_EXECUTABLE_STATISTIC_FORMAT_BOOL32_KHR: + return "VK_PIPELINE_EXECUTABLE_STATISTIC_FORMAT_BOOL32_KHR"; + case VK_PIPELINE_EXECUTABLE_STATISTIC_FORMAT_FLOAT64_KHR: + return "VK_PIPELINE_EXECUTABLE_STATISTIC_FORMAT_FLOAT64_KHR"; + case VK_PIPELINE_EXECUTABLE_STATISTIC_FORMAT_INT64_KHR: + return "VK_PIPELINE_EXECUTABLE_STATISTIC_FORMAT_INT64_KHR"; + case VK_PIPELINE_EXECUTABLE_STATISTIC_FORMAT_UINT64_KHR: + return "VK_PIPELINE_EXECUTABLE_STATISTIC_FORMAT_UINT64_KHR"; + default: + return "Unhandled VkPipelineExecutableStatisticFormatKHR"; + } +} + + +#ifdef VK_ENABLE_BETA_EXTENSIONS + +static inline const char* string_VkVideoEncodeFlagBitsKHR(VkVideoEncodeFlagBitsKHR input_value) +{ + switch (input_value) + { + case VK_VIDEO_ENCODE_DEFAULT_KHR: + return "VK_VIDEO_ENCODE_DEFAULT_KHR"; + case VK_VIDEO_ENCODE_RESERVED_0_BIT_KHR: + return "VK_VIDEO_ENCODE_RESERVED_0_BIT_KHR"; + default: + return "Unhandled VkVideoEncodeFlagBitsKHR"; + } +} + +static inline std::string string_VkVideoEncodeFlagsKHR(VkVideoEncodeFlagsKHR input_value) +{ + std::string ret; + int index = 0; + while(input_value) { + if (input_value & 1) { + if( !ret.empty()) ret.append("|"); + ret.append(string_VkVideoEncodeFlagBitsKHR(static_cast(1U << index))); + } + ++index; + input_value >>= 1; + } + if( ret.empty()) ret.append(string_VkVideoEncodeFlagBitsKHR(static_cast(0))); + return ret; +} +#endif // VK_ENABLE_BETA_EXTENSIONS + + +#ifdef VK_ENABLE_BETA_EXTENSIONS + +static inline const char* string_VkVideoEncodeRateControlFlagBitsKHR(VkVideoEncodeRateControlFlagBitsKHR input_value) +{ + switch (input_value) + { + case VK_VIDEO_ENCODE_RATE_CONTROL_DEFAULT_KHR: + return "VK_VIDEO_ENCODE_RATE_CONTROL_DEFAULT_KHR"; + case VK_VIDEO_ENCODE_RATE_CONTROL_RESET_BIT_KHR: + return "VK_VIDEO_ENCODE_RATE_CONTROL_RESET_BIT_KHR"; + default: + return "Unhandled VkVideoEncodeRateControlFlagBitsKHR"; + } +} + +static inline std::string string_VkVideoEncodeRateControlFlagsKHR(VkVideoEncodeRateControlFlagsKHR input_value) +{ + std::string ret; + int index = 0; + while(input_value) { + if (input_value & 1) { + if( !ret.empty()) ret.append("|"); + ret.append(string_VkVideoEncodeRateControlFlagBitsKHR(static_cast(1U << index))); + } + ++index; + input_value >>= 1; + } + if( ret.empty()) ret.append(string_VkVideoEncodeRateControlFlagBitsKHR(static_cast(0))); + return ret; +} +#endif // VK_ENABLE_BETA_EXTENSIONS + + +#ifdef VK_ENABLE_BETA_EXTENSIONS + +static inline const char* string_VkVideoEncodeRateControlModeFlagBitsKHR(VkVideoEncodeRateControlModeFlagBitsKHR input_value) +{ + switch (input_value) + { + case VK_VIDEO_ENCODE_RATE_CONTROL_MODE_CBR_BIT_KHR: + return "VK_VIDEO_ENCODE_RATE_CONTROL_MODE_CBR_BIT_KHR"; + case VK_VIDEO_ENCODE_RATE_CONTROL_MODE_NONE_BIT_KHR: + return "VK_VIDEO_ENCODE_RATE_CONTROL_MODE_NONE_BIT_KHR"; + case VK_VIDEO_ENCODE_RATE_CONTROL_MODE_VBR_BIT_KHR: + return "VK_VIDEO_ENCODE_RATE_CONTROL_MODE_VBR_BIT_KHR"; + default: + return "Unhandled VkVideoEncodeRateControlModeFlagBitsKHR"; + } +} + +static inline std::string string_VkVideoEncodeRateControlModeFlagsKHR(VkVideoEncodeRateControlModeFlagsKHR input_value) +{ + std::string ret; + int index = 0; + while(input_value) { + if (input_value & 1) { + if( !ret.empty()) ret.append("|"); + ret.append(string_VkVideoEncodeRateControlModeFlagBitsKHR(static_cast(1U << index))); + } + ++index; + input_value >>= 1; + } + if( ret.empty()) ret.append(string_VkVideoEncodeRateControlModeFlagBitsKHR(static_cast(0))); + return ret; +} +#endif // VK_ENABLE_BETA_EXTENSIONS + +static inline const char* string_VkPipelineStageFlagBits2KHR(uint64_t input_value) +{ + switch (input_value) + { + case VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_KHR: + return "VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_KHR"; + case VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT_KHR: + return "VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT_KHR"; + case VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT_KHR: + return "VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT_KHR"; + case VK_PIPELINE_STAGE_2_ALL_TRANSFER_BIT_KHR: + return "VK_PIPELINE_STAGE_2_ALL_TRANSFER_BIT_KHR"; + case VK_PIPELINE_STAGE_2_BLIT_BIT_KHR: + return "VK_PIPELINE_STAGE_2_BLIT_BIT_KHR"; + case VK_PIPELINE_STAGE_2_BOTTOM_OF_PIPE_BIT_KHR: + return "VK_PIPELINE_STAGE_2_BOTTOM_OF_PIPE_BIT_KHR"; + case VK_PIPELINE_STAGE_2_CLEAR_BIT_KHR: + return "VK_PIPELINE_STAGE_2_CLEAR_BIT_KHR"; + case VK_PIPELINE_STAGE_2_COLOR_ATTACHMENT_OUTPUT_BIT_KHR: + return "VK_PIPELINE_STAGE_2_COLOR_ATTACHMENT_OUTPUT_BIT_KHR"; + case VK_PIPELINE_STAGE_2_COMMAND_PREPROCESS_BIT_NV: + return "VK_PIPELINE_STAGE_2_COMMAND_PREPROCESS_BIT_NV"; + case VK_PIPELINE_STAGE_2_COMPUTE_SHADER_BIT_KHR: + return "VK_PIPELINE_STAGE_2_COMPUTE_SHADER_BIT_KHR"; + case VK_PIPELINE_STAGE_2_CONDITIONAL_RENDERING_BIT_EXT: + return "VK_PIPELINE_STAGE_2_CONDITIONAL_RENDERING_BIT_EXT"; + case VK_PIPELINE_STAGE_2_COPY_BIT_KHR: + return "VK_PIPELINE_STAGE_2_COPY_BIT_KHR"; + case VK_PIPELINE_STAGE_2_DRAW_INDIRECT_BIT_KHR: + return "VK_PIPELINE_STAGE_2_DRAW_INDIRECT_BIT_KHR"; + case VK_PIPELINE_STAGE_2_EARLY_FRAGMENT_TESTS_BIT_KHR: + return "VK_PIPELINE_STAGE_2_EARLY_FRAGMENT_TESTS_BIT_KHR"; + case VK_PIPELINE_STAGE_2_FRAGMENT_DENSITY_PROCESS_BIT_EXT: + return "VK_PIPELINE_STAGE_2_FRAGMENT_DENSITY_PROCESS_BIT_EXT"; + case VK_PIPELINE_STAGE_2_FRAGMENT_SHADER_BIT_KHR: + return "VK_PIPELINE_STAGE_2_FRAGMENT_SHADER_BIT_KHR"; + case VK_PIPELINE_STAGE_2_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR: + return "VK_PIPELINE_STAGE_2_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR"; + case VK_PIPELINE_STAGE_2_GEOMETRY_SHADER_BIT_KHR: + return "VK_PIPELINE_STAGE_2_GEOMETRY_SHADER_BIT_KHR"; + case VK_PIPELINE_STAGE_2_HOST_BIT_KHR: + return "VK_PIPELINE_STAGE_2_HOST_BIT_KHR"; + case VK_PIPELINE_STAGE_2_INDEX_INPUT_BIT_KHR: + return "VK_PIPELINE_STAGE_2_INDEX_INPUT_BIT_KHR"; + case VK_PIPELINE_STAGE_2_INVOCATION_MASK_BIT_HUAWEI: + return "VK_PIPELINE_STAGE_2_INVOCATION_MASK_BIT_HUAWEI"; + case VK_PIPELINE_STAGE_2_LATE_FRAGMENT_TESTS_BIT_KHR: + return "VK_PIPELINE_STAGE_2_LATE_FRAGMENT_TESTS_BIT_KHR"; + case VK_PIPELINE_STAGE_2_MESH_SHADER_BIT_NV: + return "VK_PIPELINE_STAGE_2_MESH_SHADER_BIT_NV"; + case VK_PIPELINE_STAGE_2_NONE_KHR: + return "VK_PIPELINE_STAGE_2_NONE_KHR"; + case VK_PIPELINE_STAGE_2_PRE_RASTERIZATION_SHADERS_BIT_KHR: + return "VK_PIPELINE_STAGE_2_PRE_RASTERIZATION_SHADERS_BIT_KHR"; + case VK_PIPELINE_STAGE_2_RAY_TRACING_SHADER_BIT_KHR: + return "VK_PIPELINE_STAGE_2_RAY_TRACING_SHADER_BIT_KHR"; + case VK_PIPELINE_STAGE_2_RESOLVE_BIT_KHR: + return "VK_PIPELINE_STAGE_2_RESOLVE_BIT_KHR"; + case VK_PIPELINE_STAGE_2_SUBPASS_SHADING_BIT_HUAWEI: + return "VK_PIPELINE_STAGE_2_SUBPASS_SHADING_BIT_HUAWEI"; + case VK_PIPELINE_STAGE_2_TASK_SHADER_BIT_NV: + return "VK_PIPELINE_STAGE_2_TASK_SHADER_BIT_NV"; + case VK_PIPELINE_STAGE_2_TESSELLATION_CONTROL_SHADER_BIT_KHR: + return "VK_PIPELINE_STAGE_2_TESSELLATION_CONTROL_SHADER_BIT_KHR"; + case VK_PIPELINE_STAGE_2_TESSELLATION_EVALUATION_SHADER_BIT_KHR: + return "VK_PIPELINE_STAGE_2_TESSELLATION_EVALUATION_SHADER_BIT_KHR"; + case VK_PIPELINE_STAGE_2_TOP_OF_PIPE_BIT_KHR: + return "VK_PIPELINE_STAGE_2_TOP_OF_PIPE_BIT_KHR"; + case VK_PIPELINE_STAGE_2_TRANSFORM_FEEDBACK_BIT_EXT: + return "VK_PIPELINE_STAGE_2_TRANSFORM_FEEDBACK_BIT_EXT"; + case VK_PIPELINE_STAGE_2_VERTEX_ATTRIBUTE_INPUT_BIT_KHR: + return "VK_PIPELINE_STAGE_2_VERTEX_ATTRIBUTE_INPUT_BIT_KHR"; + case VK_PIPELINE_STAGE_2_VERTEX_INPUT_BIT_KHR: + return "VK_PIPELINE_STAGE_2_VERTEX_INPUT_BIT_KHR"; + case VK_PIPELINE_STAGE_2_VERTEX_SHADER_BIT_KHR: + return "VK_PIPELINE_STAGE_2_VERTEX_SHADER_BIT_KHR"; +#ifdef VK_ENABLE_BETA_EXTENSIONS + case VK_PIPELINE_STAGE_2_VIDEO_DECODE_BIT_KHR: + return "VK_PIPELINE_STAGE_2_VIDEO_DECODE_BIT_KHR"; +#endif // VK_ENABLE_BETA_EXTENSIONS +#ifdef VK_ENABLE_BETA_EXTENSIONS + case VK_PIPELINE_STAGE_2_VIDEO_ENCODE_BIT_KHR: + return "VK_PIPELINE_STAGE_2_VIDEO_ENCODE_BIT_KHR"; +#endif // VK_ENABLE_BETA_EXTENSIONS + default: + return "Unhandled VkPipelineStageFlagBits2KHR"; + } +} + +static inline std::string string_VkPipelineStageFlags2KHR(VkPipelineStageFlags2KHR input_value) +{ + std::string ret; + int index = 0; + while(input_value) { + if (input_value & 1) { + if( !ret.empty()) ret.append("|"); + ret.append(string_VkPipelineStageFlagBits2KHR(static_cast(1ULL << index))); + } + ++index; + input_value >>= 1; + } + if( ret.empty()) ret.append(string_VkPipelineStageFlagBits2KHR(static_cast(0))); + return ret; +} + +static inline const char* string_VkAccessFlagBits2KHR(uint64_t input_value) +{ + switch (input_value) + { + case VK_ACCESS_2_ACCELERATION_STRUCTURE_READ_BIT_KHR: + return "VK_ACCESS_2_ACCELERATION_STRUCTURE_READ_BIT_KHR"; + case VK_ACCESS_2_ACCELERATION_STRUCTURE_WRITE_BIT_KHR: + return "VK_ACCESS_2_ACCELERATION_STRUCTURE_WRITE_BIT_KHR"; + case VK_ACCESS_2_COLOR_ATTACHMENT_READ_BIT_KHR: + return "VK_ACCESS_2_COLOR_ATTACHMENT_READ_BIT_KHR"; + case VK_ACCESS_2_COLOR_ATTACHMENT_READ_NONCOHERENT_BIT_EXT: + return "VK_ACCESS_2_COLOR_ATTACHMENT_READ_NONCOHERENT_BIT_EXT"; + case VK_ACCESS_2_COLOR_ATTACHMENT_WRITE_BIT_KHR: + return "VK_ACCESS_2_COLOR_ATTACHMENT_WRITE_BIT_KHR"; + case VK_ACCESS_2_COMMAND_PREPROCESS_READ_BIT_NV: + return "VK_ACCESS_2_COMMAND_PREPROCESS_READ_BIT_NV"; + case VK_ACCESS_2_COMMAND_PREPROCESS_WRITE_BIT_NV: + return "VK_ACCESS_2_COMMAND_PREPROCESS_WRITE_BIT_NV"; + case VK_ACCESS_2_CONDITIONAL_RENDERING_READ_BIT_EXT: + return "VK_ACCESS_2_CONDITIONAL_RENDERING_READ_BIT_EXT"; + case VK_ACCESS_2_DEPTH_STENCIL_ATTACHMENT_READ_BIT_KHR: + return "VK_ACCESS_2_DEPTH_STENCIL_ATTACHMENT_READ_BIT_KHR"; + case VK_ACCESS_2_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT_KHR: + return "VK_ACCESS_2_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT_KHR"; + case VK_ACCESS_2_FRAGMENT_DENSITY_MAP_READ_BIT_EXT: + return "VK_ACCESS_2_FRAGMENT_DENSITY_MAP_READ_BIT_EXT"; + case VK_ACCESS_2_FRAGMENT_SHADING_RATE_ATTACHMENT_READ_BIT_KHR: + return "VK_ACCESS_2_FRAGMENT_SHADING_RATE_ATTACHMENT_READ_BIT_KHR"; + case VK_ACCESS_2_HOST_READ_BIT_KHR: + return "VK_ACCESS_2_HOST_READ_BIT_KHR"; + case VK_ACCESS_2_HOST_WRITE_BIT_KHR: + return "VK_ACCESS_2_HOST_WRITE_BIT_KHR"; + case VK_ACCESS_2_INDEX_READ_BIT_KHR: + return "VK_ACCESS_2_INDEX_READ_BIT_KHR"; + case VK_ACCESS_2_INDIRECT_COMMAND_READ_BIT_KHR: + return "VK_ACCESS_2_INDIRECT_COMMAND_READ_BIT_KHR"; + case VK_ACCESS_2_INPUT_ATTACHMENT_READ_BIT_KHR: + return "VK_ACCESS_2_INPUT_ATTACHMENT_READ_BIT_KHR"; + case VK_ACCESS_2_INVOCATION_MASK_READ_BIT_HUAWEI: + return "VK_ACCESS_2_INVOCATION_MASK_READ_BIT_HUAWEI"; + case VK_ACCESS_2_MEMORY_READ_BIT_KHR: + return "VK_ACCESS_2_MEMORY_READ_BIT_KHR"; + case VK_ACCESS_2_MEMORY_WRITE_BIT_KHR: + return "VK_ACCESS_2_MEMORY_WRITE_BIT_KHR"; + case VK_ACCESS_2_NONE_KHR: + return "VK_ACCESS_2_NONE_KHR"; + case VK_ACCESS_2_SHADER_READ_BIT_KHR: + return "VK_ACCESS_2_SHADER_READ_BIT_KHR"; + case VK_ACCESS_2_SHADER_SAMPLED_READ_BIT_KHR: + return "VK_ACCESS_2_SHADER_SAMPLED_READ_BIT_KHR"; + case VK_ACCESS_2_SHADER_STORAGE_READ_BIT_KHR: + return "VK_ACCESS_2_SHADER_STORAGE_READ_BIT_KHR"; + case VK_ACCESS_2_SHADER_STORAGE_WRITE_BIT_KHR: + return "VK_ACCESS_2_SHADER_STORAGE_WRITE_BIT_KHR"; + case VK_ACCESS_2_SHADER_WRITE_BIT_KHR: + return "VK_ACCESS_2_SHADER_WRITE_BIT_KHR"; + case VK_ACCESS_2_TRANSFER_READ_BIT_KHR: + return "VK_ACCESS_2_TRANSFER_READ_BIT_KHR"; + case VK_ACCESS_2_TRANSFER_WRITE_BIT_KHR: + return "VK_ACCESS_2_TRANSFER_WRITE_BIT_KHR"; + case VK_ACCESS_2_TRANSFORM_FEEDBACK_COUNTER_READ_BIT_EXT: + return "VK_ACCESS_2_TRANSFORM_FEEDBACK_COUNTER_READ_BIT_EXT"; + case VK_ACCESS_2_TRANSFORM_FEEDBACK_COUNTER_WRITE_BIT_EXT: + return "VK_ACCESS_2_TRANSFORM_FEEDBACK_COUNTER_WRITE_BIT_EXT"; + case VK_ACCESS_2_TRANSFORM_FEEDBACK_WRITE_BIT_EXT: + return "VK_ACCESS_2_TRANSFORM_FEEDBACK_WRITE_BIT_EXT"; + case VK_ACCESS_2_UNIFORM_READ_BIT_KHR: + return "VK_ACCESS_2_UNIFORM_READ_BIT_KHR"; + case VK_ACCESS_2_VERTEX_ATTRIBUTE_READ_BIT_KHR: + return "VK_ACCESS_2_VERTEX_ATTRIBUTE_READ_BIT_KHR"; +#ifdef VK_ENABLE_BETA_EXTENSIONS + case VK_ACCESS_2_VIDEO_DECODE_READ_BIT_KHR: + return "VK_ACCESS_2_VIDEO_DECODE_READ_BIT_KHR"; +#endif // VK_ENABLE_BETA_EXTENSIONS +#ifdef VK_ENABLE_BETA_EXTENSIONS + case VK_ACCESS_2_VIDEO_DECODE_WRITE_BIT_KHR: + return "VK_ACCESS_2_VIDEO_DECODE_WRITE_BIT_KHR"; +#endif // VK_ENABLE_BETA_EXTENSIONS +#ifdef VK_ENABLE_BETA_EXTENSIONS + case VK_ACCESS_2_VIDEO_ENCODE_READ_BIT_KHR: + return "VK_ACCESS_2_VIDEO_ENCODE_READ_BIT_KHR"; +#endif // VK_ENABLE_BETA_EXTENSIONS +#ifdef VK_ENABLE_BETA_EXTENSIONS + case VK_ACCESS_2_VIDEO_ENCODE_WRITE_BIT_KHR: + return "VK_ACCESS_2_VIDEO_ENCODE_WRITE_BIT_KHR"; +#endif // VK_ENABLE_BETA_EXTENSIONS + default: + return "Unhandled VkAccessFlagBits2KHR"; + } +} + +static inline std::string string_VkAccessFlags2KHR(VkAccessFlags2KHR input_value) +{ + std::string ret; + int index = 0; + while(input_value) { + if (input_value & 1) { + if( !ret.empty()) ret.append("|"); + ret.append(string_VkAccessFlagBits2KHR(static_cast(1ULL << index))); + } + ++index; + input_value >>= 1; + } + if( ret.empty()) ret.append(string_VkAccessFlagBits2KHR(static_cast(0))); + return ret; +} + +static inline const char* string_VkSubmitFlagBitsKHR(VkSubmitFlagBitsKHR input_value) +{ + switch (input_value) + { + case VK_SUBMIT_PROTECTED_BIT_KHR: + return "VK_SUBMIT_PROTECTED_BIT_KHR"; + default: + return "Unhandled VkSubmitFlagBitsKHR"; + } +} + +static inline std::string string_VkSubmitFlagsKHR(VkSubmitFlagsKHR input_value) +{ + std::string ret; + int index = 0; + while(input_value) { + if (input_value & 1) { + if( !ret.empty()) ret.append("|"); + ret.append(string_VkSubmitFlagBitsKHR(static_cast(1U << index))); + } + ++index; + input_value >>= 1; + } + if( ret.empty()) ret.append(string_VkSubmitFlagBitsKHR(static_cast(0))); + return ret; +} + +static inline const char* string_VkDebugReportFlagBitsEXT(VkDebugReportFlagBitsEXT input_value) +{ + switch (input_value) + { + case VK_DEBUG_REPORT_DEBUG_BIT_EXT: + return "VK_DEBUG_REPORT_DEBUG_BIT_EXT"; + case VK_DEBUG_REPORT_ERROR_BIT_EXT: + return "VK_DEBUG_REPORT_ERROR_BIT_EXT"; + case VK_DEBUG_REPORT_INFORMATION_BIT_EXT: + return "VK_DEBUG_REPORT_INFORMATION_BIT_EXT"; + case VK_DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT: + return "VK_DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT"; + case VK_DEBUG_REPORT_WARNING_BIT_EXT: + return "VK_DEBUG_REPORT_WARNING_BIT_EXT"; + default: + return "Unhandled VkDebugReportFlagBitsEXT"; + } +} + +static inline std::string string_VkDebugReportFlagsEXT(VkDebugReportFlagsEXT input_value) +{ + std::string ret; + int index = 0; + while(input_value) { + if (input_value & 1) { + if( !ret.empty()) ret.append("|"); + ret.append(string_VkDebugReportFlagBitsEXT(static_cast(1U << index))); + } + ++index; + input_value >>= 1; + } + if( ret.empty()) ret.append(string_VkDebugReportFlagBitsEXT(static_cast(0))); + return ret; +} + +static inline const char* string_VkDebugReportObjectTypeEXT(VkDebugReportObjectTypeEXT input_value) +{ + switch (input_value) + { + case VK_DEBUG_REPORT_OBJECT_TYPE_ACCELERATION_STRUCTURE_KHR_EXT: + return "VK_DEBUG_REPORT_OBJECT_TYPE_ACCELERATION_STRUCTURE_KHR_EXT"; + case VK_DEBUG_REPORT_OBJECT_TYPE_ACCELERATION_STRUCTURE_NV_EXT: + return "VK_DEBUG_REPORT_OBJECT_TYPE_ACCELERATION_STRUCTURE_NV_EXT"; + case VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_EXT: + return "VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_EXT"; + case VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_VIEW_EXT: + return "VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_VIEW_EXT"; + case VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT: + return "VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT"; + case VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_POOL_EXT: + return "VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_POOL_EXT"; + case VK_DEBUG_REPORT_OBJECT_TYPE_CU_FUNCTION_NVX_EXT: + return "VK_DEBUG_REPORT_OBJECT_TYPE_CU_FUNCTION_NVX_EXT"; + case VK_DEBUG_REPORT_OBJECT_TYPE_CU_MODULE_NVX_EXT: + return "VK_DEBUG_REPORT_OBJECT_TYPE_CU_MODULE_NVX_EXT"; + case VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_CALLBACK_EXT_EXT: + return "VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_CALLBACK_EXT_EXT"; + case VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_POOL_EXT: + return "VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_POOL_EXT"; + case VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_EXT: + return "VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_EXT"; + case VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT_EXT: + return "VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT_EXT"; + case VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_EXT: + return "VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_EXT"; + case VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT: + return "VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT"; + case VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_MEMORY_EXT: + return "VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_MEMORY_EXT"; + case VK_DEBUG_REPORT_OBJECT_TYPE_DISPLAY_KHR_EXT: + return "VK_DEBUG_REPORT_OBJECT_TYPE_DISPLAY_KHR_EXT"; + case VK_DEBUG_REPORT_OBJECT_TYPE_DISPLAY_MODE_KHR_EXT: + return "VK_DEBUG_REPORT_OBJECT_TYPE_DISPLAY_MODE_KHR_EXT"; + case VK_DEBUG_REPORT_OBJECT_TYPE_EVENT_EXT: + return "VK_DEBUG_REPORT_OBJECT_TYPE_EVENT_EXT"; + case VK_DEBUG_REPORT_OBJECT_TYPE_FENCE_EXT: + return "VK_DEBUG_REPORT_OBJECT_TYPE_FENCE_EXT"; + case VK_DEBUG_REPORT_OBJECT_TYPE_FRAMEBUFFER_EXT: + return "VK_DEBUG_REPORT_OBJECT_TYPE_FRAMEBUFFER_EXT"; + case VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT: + return "VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT"; + case VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_VIEW_EXT: + return "VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_VIEW_EXT"; + case VK_DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT: + return "VK_DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT"; + case VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT: + return "VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT"; + case VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_CACHE_EXT: + return "VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_CACHE_EXT"; + case VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT: + return "VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT"; + case VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_LAYOUT_EXT: + return "VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_LAYOUT_EXT"; + case VK_DEBUG_REPORT_OBJECT_TYPE_QUERY_POOL_EXT: + return "VK_DEBUG_REPORT_OBJECT_TYPE_QUERY_POOL_EXT"; + case VK_DEBUG_REPORT_OBJECT_TYPE_QUEUE_EXT: + return "VK_DEBUG_REPORT_OBJECT_TYPE_QUEUE_EXT"; + case VK_DEBUG_REPORT_OBJECT_TYPE_RENDER_PASS_EXT: + return "VK_DEBUG_REPORT_OBJECT_TYPE_RENDER_PASS_EXT"; + case VK_DEBUG_REPORT_OBJECT_TYPE_SAMPLER_EXT: + return "VK_DEBUG_REPORT_OBJECT_TYPE_SAMPLER_EXT"; + case VK_DEBUG_REPORT_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION_EXT: + return "VK_DEBUG_REPORT_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION_EXT"; + case VK_DEBUG_REPORT_OBJECT_TYPE_SEMAPHORE_EXT: + return "VK_DEBUG_REPORT_OBJECT_TYPE_SEMAPHORE_EXT"; + case VK_DEBUG_REPORT_OBJECT_TYPE_SHADER_MODULE_EXT: + return "VK_DEBUG_REPORT_OBJECT_TYPE_SHADER_MODULE_EXT"; + case VK_DEBUG_REPORT_OBJECT_TYPE_SURFACE_KHR_EXT: + return "VK_DEBUG_REPORT_OBJECT_TYPE_SURFACE_KHR_EXT"; + case VK_DEBUG_REPORT_OBJECT_TYPE_SWAPCHAIN_KHR_EXT: + return "VK_DEBUG_REPORT_OBJECT_TYPE_SWAPCHAIN_KHR_EXT"; + case VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT: + return "VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT"; + case VK_DEBUG_REPORT_OBJECT_TYPE_VALIDATION_CACHE_EXT_EXT: + return "VK_DEBUG_REPORT_OBJECT_TYPE_VALIDATION_CACHE_EXT_EXT"; + default: + return "Unhandled VkDebugReportObjectTypeEXT"; + } +} + +static inline const char* string_VkRasterizationOrderAMD(VkRasterizationOrderAMD input_value) +{ + switch (input_value) + { + case VK_RASTERIZATION_ORDER_RELAXED_AMD: + return "VK_RASTERIZATION_ORDER_RELAXED_AMD"; + case VK_RASTERIZATION_ORDER_STRICT_AMD: + return "VK_RASTERIZATION_ORDER_STRICT_AMD"; + default: + return "Unhandled VkRasterizationOrderAMD"; + } +} + + +#ifdef VK_ENABLE_BETA_EXTENSIONS + +static inline const char* string_VkVideoEncodeH264CapabilityFlagBitsEXT(VkVideoEncodeH264CapabilityFlagBitsEXT input_value) +{ + switch (input_value) + { + case VK_VIDEO_ENCODE_H264_CAPABILITY_CABAC_BIT_EXT: + return "VK_VIDEO_ENCODE_H264_CAPABILITY_CABAC_BIT_EXT"; + case VK_VIDEO_ENCODE_H264_CAPABILITY_CAVLC_BIT_EXT: + return "VK_VIDEO_ENCODE_H264_CAPABILITY_CAVLC_BIT_EXT"; + case VK_VIDEO_ENCODE_H264_CAPABILITY_CHROMA_QP_OFFSET_BIT_EXT: + return "VK_VIDEO_ENCODE_H264_CAPABILITY_CHROMA_QP_OFFSET_BIT_EXT"; + case VK_VIDEO_ENCODE_H264_CAPABILITY_DEBLOCKING_FILTER_DISABLED_BIT_EXT: + return "VK_VIDEO_ENCODE_H264_CAPABILITY_DEBLOCKING_FILTER_DISABLED_BIT_EXT"; + case VK_VIDEO_ENCODE_H264_CAPABILITY_DEBLOCKING_FILTER_ENABLED_BIT_EXT: + return "VK_VIDEO_ENCODE_H264_CAPABILITY_DEBLOCKING_FILTER_ENABLED_BIT_EXT"; + case VK_VIDEO_ENCODE_H264_CAPABILITY_DEBLOCKING_FILTER_PARTIAL_BIT_EXT: + return "VK_VIDEO_ENCODE_H264_CAPABILITY_DEBLOCKING_FILTER_PARTIAL_BIT_EXT"; + case VK_VIDEO_ENCODE_H264_CAPABILITY_EVENLY_DISTRIBUTED_SLICE_SIZE_BIT_EXT: + return "VK_VIDEO_ENCODE_H264_CAPABILITY_EVENLY_DISTRIBUTED_SLICE_SIZE_BIT_EXT"; + case VK_VIDEO_ENCODE_H264_CAPABILITY_MULTIPLE_SLICE_PER_FRAME_BIT_EXT: + return "VK_VIDEO_ENCODE_H264_CAPABILITY_MULTIPLE_SLICE_PER_FRAME_BIT_EXT"; + case VK_VIDEO_ENCODE_H264_CAPABILITY_SECOND_CHROMA_QP_OFFSET_BIT_EXT: + return "VK_VIDEO_ENCODE_H264_CAPABILITY_SECOND_CHROMA_QP_OFFSET_BIT_EXT"; + case VK_VIDEO_ENCODE_H264_CAPABILITY_TRANSFORM_8X8_BIT_EXT: + return "VK_VIDEO_ENCODE_H264_CAPABILITY_TRANSFORM_8X8_BIT_EXT"; + case VK_VIDEO_ENCODE_H264_CAPABILITY_WEIGHTED_BI_PRED_IMPLICIT_BIT_EXT: + return "VK_VIDEO_ENCODE_H264_CAPABILITY_WEIGHTED_BI_PRED_IMPLICIT_BIT_EXT"; + default: + return "Unhandled VkVideoEncodeH264CapabilityFlagBitsEXT"; + } +} + +static inline std::string string_VkVideoEncodeH264CapabilityFlagsEXT(VkVideoEncodeH264CapabilityFlagsEXT input_value) +{ + std::string ret; + int index = 0; + while(input_value) { + if (input_value & 1) { + if( !ret.empty()) ret.append("|"); + ret.append(string_VkVideoEncodeH264CapabilityFlagBitsEXT(static_cast(1U << index))); + } + ++index; + input_value >>= 1; + } + if( ret.empty()) ret.append(string_VkVideoEncodeH264CapabilityFlagBitsEXT(static_cast(0))); + return ret; +} +#endif // VK_ENABLE_BETA_EXTENSIONS + + +#ifdef VK_ENABLE_BETA_EXTENSIONS + +static inline const char* string_VkVideoEncodeH264InputModeFlagBitsEXT(VkVideoEncodeH264InputModeFlagBitsEXT input_value) +{ + switch (input_value) + { + case VK_VIDEO_ENCODE_H264_INPUT_MODE_FRAME_BIT_EXT: + return "VK_VIDEO_ENCODE_H264_INPUT_MODE_FRAME_BIT_EXT"; + case VK_VIDEO_ENCODE_H264_INPUT_MODE_NON_VCL_BIT_EXT: + return "VK_VIDEO_ENCODE_H264_INPUT_MODE_NON_VCL_BIT_EXT"; + case VK_VIDEO_ENCODE_H264_INPUT_MODE_SLICE_BIT_EXT: + return "VK_VIDEO_ENCODE_H264_INPUT_MODE_SLICE_BIT_EXT"; + default: + return "Unhandled VkVideoEncodeH264InputModeFlagBitsEXT"; + } +} + +static inline std::string string_VkVideoEncodeH264InputModeFlagsEXT(VkVideoEncodeH264InputModeFlagsEXT input_value) +{ + std::string ret; + int index = 0; + while(input_value) { + if (input_value & 1) { + if( !ret.empty()) ret.append("|"); + ret.append(string_VkVideoEncodeH264InputModeFlagBitsEXT(static_cast(1U << index))); + } + ++index; + input_value >>= 1; + } + if( ret.empty()) ret.append(string_VkVideoEncodeH264InputModeFlagBitsEXT(static_cast(0))); + return ret; +} +#endif // VK_ENABLE_BETA_EXTENSIONS + + +#ifdef VK_ENABLE_BETA_EXTENSIONS + +static inline const char* string_VkVideoEncodeH264OutputModeFlagBitsEXT(VkVideoEncodeH264OutputModeFlagBitsEXT input_value) +{ + switch (input_value) + { + case VK_VIDEO_ENCODE_H264_OUTPUT_MODE_FRAME_BIT_EXT: + return "VK_VIDEO_ENCODE_H264_OUTPUT_MODE_FRAME_BIT_EXT"; + case VK_VIDEO_ENCODE_H264_OUTPUT_MODE_NON_VCL_BIT_EXT: + return "VK_VIDEO_ENCODE_H264_OUTPUT_MODE_NON_VCL_BIT_EXT"; + case VK_VIDEO_ENCODE_H264_OUTPUT_MODE_SLICE_BIT_EXT: + return "VK_VIDEO_ENCODE_H264_OUTPUT_MODE_SLICE_BIT_EXT"; + default: + return "Unhandled VkVideoEncodeH264OutputModeFlagBitsEXT"; + } +} + +static inline std::string string_VkVideoEncodeH264OutputModeFlagsEXT(VkVideoEncodeH264OutputModeFlagsEXT input_value) +{ + std::string ret; + int index = 0; + while(input_value) { + if (input_value & 1) { + if( !ret.empty()) ret.append("|"); + ret.append(string_VkVideoEncodeH264OutputModeFlagBitsEXT(static_cast(1U << index))); + } + ++index; + input_value >>= 1; + } + if( ret.empty()) ret.append(string_VkVideoEncodeH264OutputModeFlagBitsEXT(static_cast(0))); + return ret; +} +#endif // VK_ENABLE_BETA_EXTENSIONS + + +#ifdef VK_ENABLE_BETA_EXTENSIONS + +static inline const char* string_VkVideoEncodeH264CreateFlagBitsEXT(VkVideoEncodeH264CreateFlagBitsEXT input_value) +{ + switch (input_value) + { + case VK_VIDEO_ENCODE_H264_CREATE_DEFAULT_EXT: + return "VK_VIDEO_ENCODE_H264_CREATE_DEFAULT_EXT"; + case VK_VIDEO_ENCODE_H264_CREATE_RESERVED_0_BIT_EXT: + return "VK_VIDEO_ENCODE_H264_CREATE_RESERVED_0_BIT_EXT"; + default: + return "Unhandled VkVideoEncodeH264CreateFlagBitsEXT"; + } +} + +static inline std::string string_VkVideoEncodeH264CreateFlagsEXT(VkVideoEncodeH264CreateFlagsEXT input_value) +{ + std::string ret; + int index = 0; + while(input_value) { + if (input_value & 1) { + if( !ret.empty()) ret.append("|"); + ret.append(string_VkVideoEncodeH264CreateFlagBitsEXT(static_cast(1U << index))); + } + ++index; + input_value >>= 1; + } + if( ret.empty()) ret.append(string_VkVideoEncodeH264CreateFlagBitsEXT(static_cast(0))); + return ret; +} +#endif // VK_ENABLE_BETA_EXTENSIONS + + +#ifdef VK_ENABLE_BETA_EXTENSIONS + +static inline const char* string_VkVideoDecodeH264PictureLayoutFlagBitsEXT(VkVideoDecodeH264PictureLayoutFlagBitsEXT input_value) +{ + switch (input_value) + { + case VK_VIDEO_DECODE_H264_PICTURE_LAYOUT_INTERLACED_INTERLEAVED_LINES_BIT_EXT: + return "VK_VIDEO_DECODE_H264_PICTURE_LAYOUT_INTERLACED_INTERLEAVED_LINES_BIT_EXT"; + case VK_VIDEO_DECODE_H264_PICTURE_LAYOUT_INTERLACED_SEPARATE_PLANES_BIT_EXT: + return "VK_VIDEO_DECODE_H264_PICTURE_LAYOUT_INTERLACED_SEPARATE_PLANES_BIT_EXT"; + case VK_VIDEO_DECODE_H264_PICTURE_LAYOUT_PROGRESSIVE_EXT: + return "VK_VIDEO_DECODE_H264_PICTURE_LAYOUT_PROGRESSIVE_EXT"; + default: + return "Unhandled VkVideoDecodeH264PictureLayoutFlagBitsEXT"; + } +} + +static inline std::string string_VkVideoDecodeH264PictureLayoutFlagsEXT(VkVideoDecodeH264PictureLayoutFlagsEXT input_value) +{ + std::string ret; + int index = 0; + while(input_value) { + if (input_value & 1) { + if( !ret.empty()) ret.append("|"); + ret.append(string_VkVideoDecodeH264PictureLayoutFlagBitsEXT(static_cast(1U << index))); + } + ++index; + input_value >>= 1; + } + if( ret.empty()) ret.append(string_VkVideoDecodeH264PictureLayoutFlagBitsEXT(static_cast(0))); + return ret; +} +#endif // VK_ENABLE_BETA_EXTENSIONS + +static inline const char* string_VkShaderInfoTypeAMD(VkShaderInfoTypeAMD input_value) +{ + switch (input_value) + { + case VK_SHADER_INFO_TYPE_BINARY_AMD: + return "VK_SHADER_INFO_TYPE_BINARY_AMD"; + case VK_SHADER_INFO_TYPE_DISASSEMBLY_AMD: + return "VK_SHADER_INFO_TYPE_DISASSEMBLY_AMD"; + case VK_SHADER_INFO_TYPE_STATISTICS_AMD: + return "VK_SHADER_INFO_TYPE_STATISTICS_AMD"; + default: + return "Unhandled VkShaderInfoTypeAMD"; + } +} + +static inline const char* string_VkExternalMemoryHandleTypeFlagBitsNV(VkExternalMemoryHandleTypeFlagBitsNV input_value) +{ + switch (input_value) + { + case VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_IMAGE_BIT_NV: + return "VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_IMAGE_BIT_NV"; + case VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_IMAGE_KMT_BIT_NV: + return "VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_IMAGE_KMT_BIT_NV"; + case VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT_NV: + return "VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT_NV"; + case VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_NV: + return "VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_NV"; + default: + return "Unhandled VkExternalMemoryHandleTypeFlagBitsNV"; + } +} + +static inline std::string string_VkExternalMemoryHandleTypeFlagsNV(VkExternalMemoryHandleTypeFlagsNV input_value) +{ + std::string ret; + int index = 0; + while(input_value) { + if (input_value & 1) { + if( !ret.empty()) ret.append("|"); + ret.append(string_VkExternalMemoryHandleTypeFlagBitsNV(static_cast(1U << index))); + } + ++index; + input_value >>= 1; + } + if( ret.empty()) ret.append(string_VkExternalMemoryHandleTypeFlagBitsNV(static_cast(0))); + return ret; +} + +static inline const char* string_VkExternalMemoryFeatureFlagBitsNV(VkExternalMemoryFeatureFlagBitsNV input_value) +{ + switch (input_value) + { + case VK_EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT_NV: + return "VK_EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT_NV"; + case VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT_NV: + return "VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT_NV"; + case VK_EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT_NV: + return "VK_EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT_NV"; + default: + return "Unhandled VkExternalMemoryFeatureFlagBitsNV"; + } +} + +static inline std::string string_VkExternalMemoryFeatureFlagsNV(VkExternalMemoryFeatureFlagsNV input_value) +{ + std::string ret; + int index = 0; + while(input_value) { + if (input_value & 1) { + if( !ret.empty()) ret.append("|"); + ret.append(string_VkExternalMemoryFeatureFlagBitsNV(static_cast(1U << index))); + } + ++index; + input_value >>= 1; + } + if( ret.empty()) ret.append(string_VkExternalMemoryFeatureFlagBitsNV(static_cast(0))); + return ret; +} + +static inline const char* string_VkValidationCheckEXT(VkValidationCheckEXT input_value) +{ + switch (input_value) + { + case VK_VALIDATION_CHECK_ALL_EXT: + return "VK_VALIDATION_CHECK_ALL_EXT"; + case VK_VALIDATION_CHECK_SHADERS_EXT: + return "VK_VALIDATION_CHECK_SHADERS_EXT"; + default: + return "Unhandled VkValidationCheckEXT"; + } +} + +static inline const char* string_VkConditionalRenderingFlagBitsEXT(VkConditionalRenderingFlagBitsEXT input_value) +{ + switch (input_value) + { + case VK_CONDITIONAL_RENDERING_INVERTED_BIT_EXT: + return "VK_CONDITIONAL_RENDERING_INVERTED_BIT_EXT"; + default: + return "Unhandled VkConditionalRenderingFlagBitsEXT"; + } +} + +static inline std::string string_VkConditionalRenderingFlagsEXT(VkConditionalRenderingFlagsEXT input_value) +{ + std::string ret; + int index = 0; + while(input_value) { + if (input_value & 1) { + if( !ret.empty()) ret.append("|"); + ret.append(string_VkConditionalRenderingFlagBitsEXT(static_cast(1U << index))); + } + ++index; + input_value >>= 1; + } + if( ret.empty()) ret.append(string_VkConditionalRenderingFlagBitsEXT(static_cast(0))); + return ret; +} + +static inline const char* string_VkSurfaceCounterFlagBitsEXT(VkSurfaceCounterFlagBitsEXT input_value) +{ + switch (input_value) + { + case VK_SURFACE_COUNTER_VBLANK_BIT_EXT: + return "VK_SURFACE_COUNTER_VBLANK_BIT_EXT"; + default: + return "Unhandled VkSurfaceCounterFlagBitsEXT"; + } +} + +static inline std::string string_VkSurfaceCounterFlagsEXT(VkSurfaceCounterFlagsEXT input_value) +{ + std::string ret; + int index = 0; + while(input_value) { + if (input_value & 1) { + if( !ret.empty()) ret.append("|"); + ret.append(string_VkSurfaceCounterFlagBitsEXT(static_cast(1U << index))); + } + ++index; + input_value >>= 1; + } + if( ret.empty()) ret.append(string_VkSurfaceCounterFlagBitsEXT(static_cast(0))); + return ret; +} + +static inline const char* string_VkDisplayPowerStateEXT(VkDisplayPowerStateEXT input_value) +{ + switch (input_value) + { + case VK_DISPLAY_POWER_STATE_OFF_EXT: + return "VK_DISPLAY_POWER_STATE_OFF_EXT"; + case VK_DISPLAY_POWER_STATE_ON_EXT: + return "VK_DISPLAY_POWER_STATE_ON_EXT"; + case VK_DISPLAY_POWER_STATE_SUSPEND_EXT: + return "VK_DISPLAY_POWER_STATE_SUSPEND_EXT"; + default: + return "Unhandled VkDisplayPowerStateEXT"; + } +} + +static inline const char* string_VkDeviceEventTypeEXT(VkDeviceEventTypeEXT input_value) +{ + switch (input_value) + { + case VK_DEVICE_EVENT_TYPE_DISPLAY_HOTPLUG_EXT: + return "VK_DEVICE_EVENT_TYPE_DISPLAY_HOTPLUG_EXT"; + default: + return "Unhandled VkDeviceEventTypeEXT"; + } +} + +static inline const char* string_VkDisplayEventTypeEXT(VkDisplayEventTypeEXT input_value) +{ + switch (input_value) + { + case VK_DISPLAY_EVENT_TYPE_FIRST_PIXEL_OUT_EXT: + return "VK_DISPLAY_EVENT_TYPE_FIRST_PIXEL_OUT_EXT"; + default: + return "Unhandled VkDisplayEventTypeEXT"; + } +} + +static inline const char* string_VkViewportCoordinateSwizzleNV(VkViewportCoordinateSwizzleNV input_value) +{ + switch (input_value) + { + case VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_W_NV: + return "VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_W_NV"; + case VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_X_NV: + return "VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_X_NV"; + case VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_Y_NV: + return "VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_Y_NV"; + case VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_Z_NV: + return "VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_Z_NV"; + case VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_W_NV: + return "VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_W_NV"; + case VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_X_NV: + return "VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_X_NV"; + case VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_Y_NV: + return "VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_Y_NV"; + case VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_Z_NV: + return "VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_Z_NV"; + default: + return "Unhandled VkViewportCoordinateSwizzleNV"; + } +} + +static inline const char* string_VkDiscardRectangleModeEXT(VkDiscardRectangleModeEXT input_value) +{ + switch (input_value) + { + case VK_DISCARD_RECTANGLE_MODE_EXCLUSIVE_EXT: + return "VK_DISCARD_RECTANGLE_MODE_EXCLUSIVE_EXT"; + case VK_DISCARD_RECTANGLE_MODE_INCLUSIVE_EXT: + return "VK_DISCARD_RECTANGLE_MODE_INCLUSIVE_EXT"; + default: + return "Unhandled VkDiscardRectangleModeEXT"; + } +} + +static inline const char* string_VkConservativeRasterizationModeEXT(VkConservativeRasterizationModeEXT input_value) +{ + switch (input_value) + { + case VK_CONSERVATIVE_RASTERIZATION_MODE_DISABLED_EXT: + return "VK_CONSERVATIVE_RASTERIZATION_MODE_DISABLED_EXT"; + case VK_CONSERVATIVE_RASTERIZATION_MODE_OVERESTIMATE_EXT: + return "VK_CONSERVATIVE_RASTERIZATION_MODE_OVERESTIMATE_EXT"; + case VK_CONSERVATIVE_RASTERIZATION_MODE_UNDERESTIMATE_EXT: + return "VK_CONSERVATIVE_RASTERIZATION_MODE_UNDERESTIMATE_EXT"; + default: + return "Unhandled VkConservativeRasterizationModeEXT"; + } +} + +static inline const char* string_VkDebugUtilsMessageSeverityFlagBitsEXT(VkDebugUtilsMessageSeverityFlagBitsEXT input_value) +{ + switch (input_value) + { + case VK_DEBUG_UTILS_MESSAGE_SEVERITY_ERROR_BIT_EXT: + return "VK_DEBUG_UTILS_MESSAGE_SEVERITY_ERROR_BIT_EXT"; + case VK_DEBUG_UTILS_MESSAGE_SEVERITY_INFO_BIT_EXT: + return "VK_DEBUG_UTILS_MESSAGE_SEVERITY_INFO_BIT_EXT"; + case VK_DEBUG_UTILS_MESSAGE_SEVERITY_VERBOSE_BIT_EXT: + return "VK_DEBUG_UTILS_MESSAGE_SEVERITY_VERBOSE_BIT_EXT"; + case VK_DEBUG_UTILS_MESSAGE_SEVERITY_WARNING_BIT_EXT: + return "VK_DEBUG_UTILS_MESSAGE_SEVERITY_WARNING_BIT_EXT"; + default: + return "Unhandled VkDebugUtilsMessageSeverityFlagBitsEXT"; + } +} + +static inline std::string string_VkDebugUtilsMessageSeverityFlagsEXT(VkDebugUtilsMessageSeverityFlagsEXT input_value) +{ + std::string ret; + int index = 0; + while(input_value) { + if (input_value & 1) { + if( !ret.empty()) ret.append("|"); + ret.append(string_VkDebugUtilsMessageSeverityFlagBitsEXT(static_cast(1U << index))); + } + ++index; + input_value >>= 1; + } + if( ret.empty()) ret.append(string_VkDebugUtilsMessageSeverityFlagBitsEXT(static_cast(0))); + return ret; +} + +static inline const char* string_VkDebugUtilsMessageTypeFlagBitsEXT(VkDebugUtilsMessageTypeFlagBitsEXT input_value) +{ + switch (input_value) + { + case VK_DEBUG_UTILS_MESSAGE_TYPE_GENERAL_BIT_EXT: + return "VK_DEBUG_UTILS_MESSAGE_TYPE_GENERAL_BIT_EXT"; + case VK_DEBUG_UTILS_MESSAGE_TYPE_PERFORMANCE_BIT_EXT: + return "VK_DEBUG_UTILS_MESSAGE_TYPE_PERFORMANCE_BIT_EXT"; + case VK_DEBUG_UTILS_MESSAGE_TYPE_VALIDATION_BIT_EXT: + return "VK_DEBUG_UTILS_MESSAGE_TYPE_VALIDATION_BIT_EXT"; + default: + return "Unhandled VkDebugUtilsMessageTypeFlagBitsEXT"; + } +} + +static inline std::string string_VkDebugUtilsMessageTypeFlagsEXT(VkDebugUtilsMessageTypeFlagsEXT input_value) +{ + std::string ret; + int index = 0; + while(input_value) { + if (input_value & 1) { + if( !ret.empty()) ret.append("|"); + ret.append(string_VkDebugUtilsMessageTypeFlagBitsEXT(static_cast(1U << index))); + } + ++index; + input_value >>= 1; + } + if( ret.empty()) ret.append(string_VkDebugUtilsMessageTypeFlagBitsEXT(static_cast(0))); + return ret; +} + +static inline const char* string_VkSamplerReductionModeEXT(VkSamplerReductionModeEXT input_value) +{ + switch (input_value) + { + case VK_SAMPLER_REDUCTION_MODE_MAX: + return "VK_SAMPLER_REDUCTION_MODE_MAX"; + case VK_SAMPLER_REDUCTION_MODE_MIN: + return "VK_SAMPLER_REDUCTION_MODE_MIN"; + case VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE: + return "VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE"; + default: + return "Unhandled VkSamplerReductionModeEXT"; + } +} + +static inline const char* string_VkBlendOverlapEXT(VkBlendOverlapEXT input_value) +{ + switch (input_value) + { + case VK_BLEND_OVERLAP_CONJOINT_EXT: + return "VK_BLEND_OVERLAP_CONJOINT_EXT"; + case VK_BLEND_OVERLAP_DISJOINT_EXT: + return "VK_BLEND_OVERLAP_DISJOINT_EXT"; + case VK_BLEND_OVERLAP_UNCORRELATED_EXT: + return "VK_BLEND_OVERLAP_UNCORRELATED_EXT"; + default: + return "Unhandled VkBlendOverlapEXT"; + } +} + +static inline const char* string_VkCoverageModulationModeNV(VkCoverageModulationModeNV input_value) +{ + switch (input_value) + { + case VK_COVERAGE_MODULATION_MODE_ALPHA_NV: + return "VK_COVERAGE_MODULATION_MODE_ALPHA_NV"; + case VK_COVERAGE_MODULATION_MODE_NONE_NV: + return "VK_COVERAGE_MODULATION_MODE_NONE_NV"; + case VK_COVERAGE_MODULATION_MODE_RGBA_NV: + return "VK_COVERAGE_MODULATION_MODE_RGBA_NV"; + case VK_COVERAGE_MODULATION_MODE_RGB_NV: + return "VK_COVERAGE_MODULATION_MODE_RGB_NV"; + default: + return "Unhandled VkCoverageModulationModeNV"; + } +} + +static inline const char* string_VkValidationCacheHeaderVersionEXT(VkValidationCacheHeaderVersionEXT input_value) +{ + switch (input_value) + { + case VK_VALIDATION_CACHE_HEADER_VERSION_ONE_EXT: + return "VK_VALIDATION_CACHE_HEADER_VERSION_ONE_EXT"; + default: + return "Unhandled VkValidationCacheHeaderVersionEXT"; + } +} + +static inline const char* string_VkDescriptorBindingFlagBitsEXT(VkDescriptorBindingFlagBitsEXT input_value) +{ + switch (input_value) + { + case VK_DESCRIPTOR_BINDING_PARTIALLY_BOUND_BIT: + return "VK_DESCRIPTOR_BINDING_PARTIALLY_BOUND_BIT"; + case VK_DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT: + return "VK_DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT"; + case VK_DESCRIPTOR_BINDING_UPDATE_UNUSED_WHILE_PENDING_BIT: + return "VK_DESCRIPTOR_BINDING_UPDATE_UNUSED_WHILE_PENDING_BIT"; + case VK_DESCRIPTOR_BINDING_VARIABLE_DESCRIPTOR_COUNT_BIT: + return "VK_DESCRIPTOR_BINDING_VARIABLE_DESCRIPTOR_COUNT_BIT"; + default: + return "Unhandled VkDescriptorBindingFlagBitsEXT"; + } +} + +static inline std::string string_VkDescriptorBindingFlagsEXT(VkDescriptorBindingFlagsEXT input_value) +{ + std::string ret; + int index = 0; + while(input_value) { + if (input_value & 1) { + if( !ret.empty()) ret.append("|"); + ret.append(string_VkDescriptorBindingFlagBitsEXT(static_cast(1U << index))); + } + ++index; + input_value >>= 1; + } + if( ret.empty()) ret.append(string_VkDescriptorBindingFlagBitsEXT(static_cast(0))); + return ret; +} + +static inline const char* string_VkShadingRatePaletteEntryNV(VkShadingRatePaletteEntryNV input_value) +{ + switch (input_value) + { + case VK_SHADING_RATE_PALETTE_ENTRY_16_INVOCATIONS_PER_PIXEL_NV: + return "VK_SHADING_RATE_PALETTE_ENTRY_16_INVOCATIONS_PER_PIXEL_NV"; + case VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_1X2_PIXELS_NV: + return "VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_1X2_PIXELS_NV"; + case VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_2X1_PIXELS_NV: + return "VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_2X1_PIXELS_NV"; + case VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_2X2_PIXELS_NV: + return "VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_2X2_PIXELS_NV"; + case VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_2X4_PIXELS_NV: + return "VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_2X4_PIXELS_NV"; + case VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_4X2_PIXELS_NV: + return "VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_4X2_PIXELS_NV"; + case VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_4X4_PIXELS_NV: + return "VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_4X4_PIXELS_NV"; + case VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_PIXEL_NV: + return "VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_PIXEL_NV"; + case VK_SHADING_RATE_PALETTE_ENTRY_2_INVOCATIONS_PER_PIXEL_NV: + return "VK_SHADING_RATE_PALETTE_ENTRY_2_INVOCATIONS_PER_PIXEL_NV"; + case VK_SHADING_RATE_PALETTE_ENTRY_4_INVOCATIONS_PER_PIXEL_NV: + return "VK_SHADING_RATE_PALETTE_ENTRY_4_INVOCATIONS_PER_PIXEL_NV"; + case VK_SHADING_RATE_PALETTE_ENTRY_8_INVOCATIONS_PER_PIXEL_NV: + return "VK_SHADING_RATE_PALETTE_ENTRY_8_INVOCATIONS_PER_PIXEL_NV"; + case VK_SHADING_RATE_PALETTE_ENTRY_NO_INVOCATIONS_NV: + return "VK_SHADING_RATE_PALETTE_ENTRY_NO_INVOCATIONS_NV"; + default: + return "Unhandled VkShadingRatePaletteEntryNV"; + } +} + +static inline const char* string_VkCoarseSampleOrderTypeNV(VkCoarseSampleOrderTypeNV input_value) +{ + switch (input_value) + { + case VK_COARSE_SAMPLE_ORDER_TYPE_CUSTOM_NV: + return "VK_COARSE_SAMPLE_ORDER_TYPE_CUSTOM_NV"; + case VK_COARSE_SAMPLE_ORDER_TYPE_DEFAULT_NV: + return "VK_COARSE_SAMPLE_ORDER_TYPE_DEFAULT_NV"; + case VK_COARSE_SAMPLE_ORDER_TYPE_PIXEL_MAJOR_NV: + return "VK_COARSE_SAMPLE_ORDER_TYPE_PIXEL_MAJOR_NV"; + case VK_COARSE_SAMPLE_ORDER_TYPE_SAMPLE_MAJOR_NV: + return "VK_COARSE_SAMPLE_ORDER_TYPE_SAMPLE_MAJOR_NV"; + default: + return "Unhandled VkCoarseSampleOrderTypeNV"; + } +} + +static inline const char* string_VkRayTracingShaderGroupTypeKHR(VkRayTracingShaderGroupTypeKHR input_value) +{ + switch (input_value) + { + case VK_RAY_TRACING_SHADER_GROUP_TYPE_GENERAL_KHR: + return "VK_RAY_TRACING_SHADER_GROUP_TYPE_GENERAL_KHR"; + case VK_RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_KHR: + return "VK_RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_KHR"; + case VK_RAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_KHR: + return "VK_RAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_KHR"; + default: + return "Unhandled VkRayTracingShaderGroupTypeKHR"; + } +} + +static inline const char* string_VkRayTracingShaderGroupTypeNV(VkRayTracingShaderGroupTypeNV input_value) +{ + switch (input_value) + { + case VK_RAY_TRACING_SHADER_GROUP_TYPE_GENERAL_KHR: + return "VK_RAY_TRACING_SHADER_GROUP_TYPE_GENERAL_KHR"; + case VK_RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_KHR: + return "VK_RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_KHR"; + case VK_RAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_KHR: + return "VK_RAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_KHR"; + default: + return "Unhandled VkRayTracingShaderGroupTypeNV"; + } +} + +static inline const char* string_VkGeometryTypeKHR(VkGeometryTypeKHR input_value) +{ + switch (input_value) + { + case VK_GEOMETRY_TYPE_AABBS_KHR: + return "VK_GEOMETRY_TYPE_AABBS_KHR"; + case VK_GEOMETRY_TYPE_INSTANCES_KHR: + return "VK_GEOMETRY_TYPE_INSTANCES_KHR"; + case VK_GEOMETRY_TYPE_TRIANGLES_KHR: + return "VK_GEOMETRY_TYPE_TRIANGLES_KHR"; + default: + return "Unhandled VkGeometryTypeKHR"; + } +} + +static inline const char* string_VkGeometryTypeNV(VkGeometryTypeNV input_value) +{ + switch (input_value) + { + case VK_GEOMETRY_TYPE_AABBS_KHR: + return "VK_GEOMETRY_TYPE_AABBS_KHR"; + case VK_GEOMETRY_TYPE_INSTANCES_KHR: + return "VK_GEOMETRY_TYPE_INSTANCES_KHR"; + case VK_GEOMETRY_TYPE_TRIANGLES_KHR: + return "VK_GEOMETRY_TYPE_TRIANGLES_KHR"; + default: + return "Unhandled VkGeometryTypeNV"; + } +} + +static inline const char* string_VkAccelerationStructureTypeKHR(VkAccelerationStructureTypeKHR input_value) +{ + switch (input_value) + { + case VK_ACCELERATION_STRUCTURE_TYPE_BOTTOM_LEVEL_KHR: + return "VK_ACCELERATION_STRUCTURE_TYPE_BOTTOM_LEVEL_KHR"; + case VK_ACCELERATION_STRUCTURE_TYPE_GENERIC_KHR: + return "VK_ACCELERATION_STRUCTURE_TYPE_GENERIC_KHR"; + case VK_ACCELERATION_STRUCTURE_TYPE_TOP_LEVEL_KHR: + return "VK_ACCELERATION_STRUCTURE_TYPE_TOP_LEVEL_KHR"; + default: + return "Unhandled VkAccelerationStructureTypeKHR"; + } +} + +static inline const char* string_VkAccelerationStructureTypeNV(VkAccelerationStructureTypeNV input_value) +{ + switch (input_value) + { + case VK_ACCELERATION_STRUCTURE_TYPE_BOTTOM_LEVEL_KHR: + return "VK_ACCELERATION_STRUCTURE_TYPE_BOTTOM_LEVEL_KHR"; + case VK_ACCELERATION_STRUCTURE_TYPE_GENERIC_KHR: + return "VK_ACCELERATION_STRUCTURE_TYPE_GENERIC_KHR"; + case VK_ACCELERATION_STRUCTURE_TYPE_TOP_LEVEL_KHR: + return "VK_ACCELERATION_STRUCTURE_TYPE_TOP_LEVEL_KHR"; + default: + return "Unhandled VkAccelerationStructureTypeNV"; + } +} + +static inline const char* string_VkGeometryFlagBitsKHR(VkGeometryFlagBitsKHR input_value) +{ + switch (input_value) + { + case VK_GEOMETRY_NO_DUPLICATE_ANY_HIT_INVOCATION_BIT_KHR: + return "VK_GEOMETRY_NO_DUPLICATE_ANY_HIT_INVOCATION_BIT_KHR"; + case VK_GEOMETRY_OPAQUE_BIT_KHR: + return "VK_GEOMETRY_OPAQUE_BIT_KHR"; + default: + return "Unhandled VkGeometryFlagBitsKHR"; + } +} + +static inline std::string string_VkGeometryFlagsKHR(VkGeometryFlagsKHR input_value) +{ + std::string ret; + int index = 0; + while(input_value) { + if (input_value & 1) { + if( !ret.empty()) ret.append("|"); + ret.append(string_VkGeometryFlagBitsKHR(static_cast(1U << index))); + } + ++index; + input_value >>= 1; + } + if( ret.empty()) ret.append(string_VkGeometryFlagBitsKHR(static_cast(0))); + return ret; +} + +static inline const char* string_VkGeometryFlagBitsNV(VkGeometryFlagBitsNV input_value) +{ + switch (input_value) + { + case VK_GEOMETRY_NO_DUPLICATE_ANY_HIT_INVOCATION_BIT_KHR: + return "VK_GEOMETRY_NO_DUPLICATE_ANY_HIT_INVOCATION_BIT_KHR"; + case VK_GEOMETRY_OPAQUE_BIT_KHR: + return "VK_GEOMETRY_OPAQUE_BIT_KHR"; + default: + return "Unhandled VkGeometryFlagBitsNV"; + } +} + +static inline std::string string_VkGeometryFlagsNV(VkGeometryFlagsNV input_value) +{ + std::string ret; + int index = 0; + while(input_value) { + if (input_value & 1) { + if( !ret.empty()) ret.append("|"); + ret.append(string_VkGeometryFlagBitsNV(static_cast(1U << index))); + } + ++index; + input_value >>= 1; + } + if( ret.empty()) ret.append(string_VkGeometryFlagBitsNV(static_cast(0))); + return ret; +} + +static inline const char* string_VkGeometryInstanceFlagBitsKHR(VkGeometryInstanceFlagBitsKHR input_value) +{ + switch (input_value) + { + case VK_GEOMETRY_INSTANCE_FORCE_NO_OPAQUE_BIT_KHR: + return "VK_GEOMETRY_INSTANCE_FORCE_NO_OPAQUE_BIT_KHR"; + case VK_GEOMETRY_INSTANCE_FORCE_OPAQUE_BIT_KHR: + return "VK_GEOMETRY_INSTANCE_FORCE_OPAQUE_BIT_KHR"; + case VK_GEOMETRY_INSTANCE_TRIANGLE_FACING_CULL_DISABLE_BIT_KHR: + return "VK_GEOMETRY_INSTANCE_TRIANGLE_FACING_CULL_DISABLE_BIT_KHR"; + case VK_GEOMETRY_INSTANCE_TRIANGLE_FLIP_FACING_BIT_KHR: + return "VK_GEOMETRY_INSTANCE_TRIANGLE_FLIP_FACING_BIT_KHR"; + default: + return "Unhandled VkGeometryInstanceFlagBitsKHR"; + } +} + +static inline std::string string_VkGeometryInstanceFlagsKHR(VkGeometryInstanceFlagsKHR input_value) +{ + std::string ret; + int index = 0; + while(input_value) { + if (input_value & 1) { + if( !ret.empty()) ret.append("|"); + ret.append(string_VkGeometryInstanceFlagBitsKHR(static_cast(1U << index))); + } + ++index; + input_value >>= 1; + } + if( ret.empty()) ret.append(string_VkGeometryInstanceFlagBitsKHR(static_cast(0))); + return ret; +} + +static inline const char* string_VkGeometryInstanceFlagBitsNV(VkGeometryInstanceFlagBitsNV input_value) +{ + switch (input_value) + { + case VK_GEOMETRY_INSTANCE_FORCE_NO_OPAQUE_BIT_KHR: + return "VK_GEOMETRY_INSTANCE_FORCE_NO_OPAQUE_BIT_KHR"; + case VK_GEOMETRY_INSTANCE_FORCE_OPAQUE_BIT_KHR: + return "VK_GEOMETRY_INSTANCE_FORCE_OPAQUE_BIT_KHR"; + case VK_GEOMETRY_INSTANCE_TRIANGLE_FACING_CULL_DISABLE_BIT_KHR: + return "VK_GEOMETRY_INSTANCE_TRIANGLE_FACING_CULL_DISABLE_BIT_KHR"; + case VK_GEOMETRY_INSTANCE_TRIANGLE_FLIP_FACING_BIT_KHR: + return "VK_GEOMETRY_INSTANCE_TRIANGLE_FLIP_FACING_BIT_KHR"; + default: + return "Unhandled VkGeometryInstanceFlagBitsNV"; + } +} + +static inline std::string string_VkGeometryInstanceFlagsNV(VkGeometryInstanceFlagsNV input_value) +{ + std::string ret; + int index = 0; + while(input_value) { + if (input_value & 1) { + if( !ret.empty()) ret.append("|"); + ret.append(string_VkGeometryInstanceFlagBitsNV(static_cast(1U << index))); + } + ++index; + input_value >>= 1; + } + if( ret.empty()) ret.append(string_VkGeometryInstanceFlagBitsNV(static_cast(0))); + return ret; +} + +static inline const char* string_VkBuildAccelerationStructureFlagBitsKHR(VkBuildAccelerationStructureFlagBitsKHR input_value) +{ + switch (input_value) + { + case VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_COMPACTION_BIT_KHR: + return "VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_COMPACTION_BIT_KHR"; + case VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_UPDATE_BIT_KHR: + return "VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_UPDATE_BIT_KHR"; + case VK_BUILD_ACCELERATION_STRUCTURE_LOW_MEMORY_BIT_KHR: + return "VK_BUILD_ACCELERATION_STRUCTURE_LOW_MEMORY_BIT_KHR"; + case VK_BUILD_ACCELERATION_STRUCTURE_MOTION_BIT_NV: + return "VK_BUILD_ACCELERATION_STRUCTURE_MOTION_BIT_NV"; + case VK_BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_BUILD_BIT_KHR: + return "VK_BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_BUILD_BIT_KHR"; + case VK_BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_TRACE_BIT_KHR: + return "VK_BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_TRACE_BIT_KHR"; + default: + return "Unhandled VkBuildAccelerationStructureFlagBitsKHR"; + } +} + +static inline std::string string_VkBuildAccelerationStructureFlagsKHR(VkBuildAccelerationStructureFlagsKHR input_value) +{ + std::string ret; + int index = 0; + while(input_value) { + if (input_value & 1) { + if( !ret.empty()) ret.append("|"); + ret.append(string_VkBuildAccelerationStructureFlagBitsKHR(static_cast(1U << index))); + } + ++index; + input_value >>= 1; + } + if( ret.empty()) ret.append(string_VkBuildAccelerationStructureFlagBitsKHR(static_cast(0))); + return ret; +} + +static inline const char* string_VkBuildAccelerationStructureFlagBitsNV(VkBuildAccelerationStructureFlagBitsNV input_value) +{ + switch (input_value) + { + case VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_COMPACTION_BIT_KHR: + return "VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_COMPACTION_BIT_KHR"; + case VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_UPDATE_BIT_KHR: + return "VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_UPDATE_BIT_KHR"; + case VK_BUILD_ACCELERATION_STRUCTURE_LOW_MEMORY_BIT_KHR: + return "VK_BUILD_ACCELERATION_STRUCTURE_LOW_MEMORY_BIT_KHR"; + case VK_BUILD_ACCELERATION_STRUCTURE_MOTION_BIT_NV: + return "VK_BUILD_ACCELERATION_STRUCTURE_MOTION_BIT_NV"; + case VK_BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_BUILD_BIT_KHR: + return "VK_BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_BUILD_BIT_KHR"; + case VK_BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_TRACE_BIT_KHR: + return "VK_BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_TRACE_BIT_KHR"; + default: + return "Unhandled VkBuildAccelerationStructureFlagBitsNV"; + } +} + +static inline std::string string_VkBuildAccelerationStructureFlagsNV(VkBuildAccelerationStructureFlagsNV input_value) +{ + std::string ret; + int index = 0; + while(input_value) { + if (input_value & 1) { + if( !ret.empty()) ret.append("|"); + ret.append(string_VkBuildAccelerationStructureFlagBitsNV(static_cast(1U << index))); + } + ++index; + input_value >>= 1; + } + if( ret.empty()) ret.append(string_VkBuildAccelerationStructureFlagBitsNV(static_cast(0))); + return ret; +} + +static inline const char* string_VkCopyAccelerationStructureModeKHR(VkCopyAccelerationStructureModeKHR input_value) +{ + switch (input_value) + { + case VK_COPY_ACCELERATION_STRUCTURE_MODE_CLONE_KHR: + return "VK_COPY_ACCELERATION_STRUCTURE_MODE_CLONE_KHR"; + case VK_COPY_ACCELERATION_STRUCTURE_MODE_COMPACT_KHR: + return "VK_COPY_ACCELERATION_STRUCTURE_MODE_COMPACT_KHR"; + case VK_COPY_ACCELERATION_STRUCTURE_MODE_DESERIALIZE_KHR: + return "VK_COPY_ACCELERATION_STRUCTURE_MODE_DESERIALIZE_KHR"; + case VK_COPY_ACCELERATION_STRUCTURE_MODE_SERIALIZE_KHR: + return "VK_COPY_ACCELERATION_STRUCTURE_MODE_SERIALIZE_KHR"; + default: + return "Unhandled VkCopyAccelerationStructureModeKHR"; + } +} + +static inline const char* string_VkCopyAccelerationStructureModeNV(VkCopyAccelerationStructureModeNV input_value) +{ + switch (input_value) + { + case VK_COPY_ACCELERATION_STRUCTURE_MODE_CLONE_KHR: + return "VK_COPY_ACCELERATION_STRUCTURE_MODE_CLONE_KHR"; + case VK_COPY_ACCELERATION_STRUCTURE_MODE_COMPACT_KHR: + return "VK_COPY_ACCELERATION_STRUCTURE_MODE_COMPACT_KHR"; + case VK_COPY_ACCELERATION_STRUCTURE_MODE_DESERIALIZE_KHR: + return "VK_COPY_ACCELERATION_STRUCTURE_MODE_DESERIALIZE_KHR"; + case VK_COPY_ACCELERATION_STRUCTURE_MODE_SERIALIZE_KHR: + return "VK_COPY_ACCELERATION_STRUCTURE_MODE_SERIALIZE_KHR"; + default: + return "Unhandled VkCopyAccelerationStructureModeNV"; + } +} + +static inline const char* string_VkAccelerationStructureMemoryRequirementsTypeNV(VkAccelerationStructureMemoryRequirementsTypeNV input_value) +{ + switch (input_value) + { + case VK_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_BUILD_SCRATCH_NV: + return "VK_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_BUILD_SCRATCH_NV"; + case VK_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_OBJECT_NV: + return "VK_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_OBJECT_NV"; + case VK_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_UPDATE_SCRATCH_NV: + return "VK_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_UPDATE_SCRATCH_NV"; + default: + return "Unhandled VkAccelerationStructureMemoryRequirementsTypeNV"; + } +} + +static inline const char* string_VkQueueGlobalPriorityEXT(VkQueueGlobalPriorityEXT input_value) +{ + switch (input_value) + { + case VK_QUEUE_GLOBAL_PRIORITY_HIGH_EXT: + return "VK_QUEUE_GLOBAL_PRIORITY_HIGH_EXT"; + case VK_QUEUE_GLOBAL_PRIORITY_LOW_EXT: + return "VK_QUEUE_GLOBAL_PRIORITY_LOW_EXT"; + case VK_QUEUE_GLOBAL_PRIORITY_MEDIUM_EXT: + return "VK_QUEUE_GLOBAL_PRIORITY_MEDIUM_EXT"; + case VK_QUEUE_GLOBAL_PRIORITY_REALTIME_EXT: + return "VK_QUEUE_GLOBAL_PRIORITY_REALTIME_EXT"; + default: + return "Unhandled VkQueueGlobalPriorityEXT"; + } +} + +static inline const char* string_VkTimeDomainEXT(VkTimeDomainEXT input_value) +{ + switch (input_value) + { + case VK_TIME_DOMAIN_CLOCK_MONOTONIC_EXT: + return "VK_TIME_DOMAIN_CLOCK_MONOTONIC_EXT"; + case VK_TIME_DOMAIN_CLOCK_MONOTONIC_RAW_EXT: + return "VK_TIME_DOMAIN_CLOCK_MONOTONIC_RAW_EXT"; + case VK_TIME_DOMAIN_DEVICE_EXT: + return "VK_TIME_DOMAIN_DEVICE_EXT"; + case VK_TIME_DOMAIN_QUERY_PERFORMANCE_COUNTER_EXT: + return "VK_TIME_DOMAIN_QUERY_PERFORMANCE_COUNTER_EXT"; + default: + return "Unhandled VkTimeDomainEXT"; + } +} + +static inline const char* string_VkMemoryOverallocationBehaviorAMD(VkMemoryOverallocationBehaviorAMD input_value) +{ + switch (input_value) + { + case VK_MEMORY_OVERALLOCATION_BEHAVIOR_ALLOWED_AMD: + return "VK_MEMORY_OVERALLOCATION_BEHAVIOR_ALLOWED_AMD"; + case VK_MEMORY_OVERALLOCATION_BEHAVIOR_DEFAULT_AMD: + return "VK_MEMORY_OVERALLOCATION_BEHAVIOR_DEFAULT_AMD"; + case VK_MEMORY_OVERALLOCATION_BEHAVIOR_DISALLOWED_AMD: + return "VK_MEMORY_OVERALLOCATION_BEHAVIOR_DISALLOWED_AMD"; + default: + return "Unhandled VkMemoryOverallocationBehaviorAMD"; + } +} + +static inline const char* string_VkPipelineCreationFeedbackFlagBitsEXT(VkPipelineCreationFeedbackFlagBitsEXT input_value) +{ + switch (input_value) + { + case VK_PIPELINE_CREATION_FEEDBACK_APPLICATION_PIPELINE_CACHE_HIT_BIT_EXT: + return "VK_PIPELINE_CREATION_FEEDBACK_APPLICATION_PIPELINE_CACHE_HIT_BIT_EXT"; + case VK_PIPELINE_CREATION_FEEDBACK_BASE_PIPELINE_ACCELERATION_BIT_EXT: + return "VK_PIPELINE_CREATION_FEEDBACK_BASE_PIPELINE_ACCELERATION_BIT_EXT"; + case VK_PIPELINE_CREATION_FEEDBACK_VALID_BIT_EXT: + return "VK_PIPELINE_CREATION_FEEDBACK_VALID_BIT_EXT"; + default: + return "Unhandled VkPipelineCreationFeedbackFlagBitsEXT"; + } +} + +static inline std::string string_VkPipelineCreationFeedbackFlagsEXT(VkPipelineCreationFeedbackFlagsEXT input_value) +{ + std::string ret; + int index = 0; + while(input_value) { + if (input_value & 1) { + if( !ret.empty()) ret.append("|"); + ret.append(string_VkPipelineCreationFeedbackFlagBitsEXT(static_cast(1U << index))); + } + ++index; + input_value >>= 1; + } + if( ret.empty()) ret.append(string_VkPipelineCreationFeedbackFlagBitsEXT(static_cast(0))); + return ret; +} + +static inline const char* string_VkPerformanceConfigurationTypeINTEL(VkPerformanceConfigurationTypeINTEL input_value) +{ + switch (input_value) + { + case VK_PERFORMANCE_CONFIGURATION_TYPE_COMMAND_QUEUE_METRICS_DISCOVERY_ACTIVATED_INTEL: + return "VK_PERFORMANCE_CONFIGURATION_TYPE_COMMAND_QUEUE_METRICS_DISCOVERY_ACTIVATED_INTEL"; + default: + return "Unhandled VkPerformanceConfigurationTypeINTEL"; + } +} + +static inline const char* string_VkQueryPoolSamplingModeINTEL(VkQueryPoolSamplingModeINTEL input_value) +{ + switch (input_value) + { + case VK_QUERY_POOL_SAMPLING_MODE_MANUAL_INTEL: + return "VK_QUERY_POOL_SAMPLING_MODE_MANUAL_INTEL"; + default: + return "Unhandled VkQueryPoolSamplingModeINTEL"; + } +} + +static inline const char* string_VkPerformanceOverrideTypeINTEL(VkPerformanceOverrideTypeINTEL input_value) +{ + switch (input_value) + { + case VK_PERFORMANCE_OVERRIDE_TYPE_FLUSH_GPU_CACHES_INTEL: + return "VK_PERFORMANCE_OVERRIDE_TYPE_FLUSH_GPU_CACHES_INTEL"; + case VK_PERFORMANCE_OVERRIDE_TYPE_NULL_HARDWARE_INTEL: + return "VK_PERFORMANCE_OVERRIDE_TYPE_NULL_HARDWARE_INTEL"; + default: + return "Unhandled VkPerformanceOverrideTypeINTEL"; + } +} + +static inline const char* string_VkPerformanceParameterTypeINTEL(VkPerformanceParameterTypeINTEL input_value) +{ + switch (input_value) + { + case VK_PERFORMANCE_PARAMETER_TYPE_HW_COUNTERS_SUPPORTED_INTEL: + return "VK_PERFORMANCE_PARAMETER_TYPE_HW_COUNTERS_SUPPORTED_INTEL"; + case VK_PERFORMANCE_PARAMETER_TYPE_STREAM_MARKER_VALID_BITS_INTEL: + return "VK_PERFORMANCE_PARAMETER_TYPE_STREAM_MARKER_VALID_BITS_INTEL"; + default: + return "Unhandled VkPerformanceParameterTypeINTEL"; + } +} + +static inline const char* string_VkPerformanceValueTypeINTEL(VkPerformanceValueTypeINTEL input_value) +{ + switch (input_value) + { + case VK_PERFORMANCE_VALUE_TYPE_BOOL_INTEL: + return "VK_PERFORMANCE_VALUE_TYPE_BOOL_INTEL"; + case VK_PERFORMANCE_VALUE_TYPE_FLOAT_INTEL: + return "VK_PERFORMANCE_VALUE_TYPE_FLOAT_INTEL"; + case VK_PERFORMANCE_VALUE_TYPE_STRING_INTEL: + return "VK_PERFORMANCE_VALUE_TYPE_STRING_INTEL"; + case VK_PERFORMANCE_VALUE_TYPE_UINT32_INTEL: + return "VK_PERFORMANCE_VALUE_TYPE_UINT32_INTEL"; + case VK_PERFORMANCE_VALUE_TYPE_UINT64_INTEL: + return "VK_PERFORMANCE_VALUE_TYPE_UINT64_INTEL"; + default: + return "Unhandled VkPerformanceValueTypeINTEL"; + } +} + +static inline const char* string_VkToolPurposeFlagBitsEXT(VkToolPurposeFlagBitsEXT input_value) +{ + switch (input_value) + { + case VK_TOOL_PURPOSE_ADDITIONAL_FEATURES_BIT_EXT: + return "VK_TOOL_PURPOSE_ADDITIONAL_FEATURES_BIT_EXT"; + case VK_TOOL_PURPOSE_DEBUG_MARKERS_BIT_EXT: + return "VK_TOOL_PURPOSE_DEBUG_MARKERS_BIT_EXT"; + case VK_TOOL_PURPOSE_DEBUG_REPORTING_BIT_EXT: + return "VK_TOOL_PURPOSE_DEBUG_REPORTING_BIT_EXT"; + case VK_TOOL_PURPOSE_MODIFYING_FEATURES_BIT_EXT: + return "VK_TOOL_PURPOSE_MODIFYING_FEATURES_BIT_EXT"; + case VK_TOOL_PURPOSE_PROFILING_BIT_EXT: + return "VK_TOOL_PURPOSE_PROFILING_BIT_EXT"; + case VK_TOOL_PURPOSE_TRACING_BIT_EXT: + return "VK_TOOL_PURPOSE_TRACING_BIT_EXT"; + case VK_TOOL_PURPOSE_VALIDATION_BIT_EXT: + return "VK_TOOL_PURPOSE_VALIDATION_BIT_EXT"; + default: + return "Unhandled VkToolPurposeFlagBitsEXT"; + } +} + +static inline std::string string_VkToolPurposeFlagsEXT(VkToolPurposeFlagsEXT input_value) +{ + std::string ret; + int index = 0; + while(input_value) { + if (input_value & 1) { + if( !ret.empty()) ret.append("|"); + ret.append(string_VkToolPurposeFlagBitsEXT(static_cast(1U << index))); + } + ++index; + input_value >>= 1; + } + if( ret.empty()) ret.append(string_VkToolPurposeFlagBitsEXT(static_cast(0))); + return ret; +} + +static inline const char* string_VkValidationFeatureEnableEXT(VkValidationFeatureEnableEXT input_value) +{ + switch (input_value) + { + case VK_VALIDATION_FEATURE_ENABLE_BEST_PRACTICES_EXT: + return "VK_VALIDATION_FEATURE_ENABLE_BEST_PRACTICES_EXT"; + case VK_VALIDATION_FEATURE_ENABLE_DEBUG_PRINTF_EXT: + return "VK_VALIDATION_FEATURE_ENABLE_DEBUG_PRINTF_EXT"; + case VK_VALIDATION_FEATURE_ENABLE_GPU_ASSISTED_EXT: + return "VK_VALIDATION_FEATURE_ENABLE_GPU_ASSISTED_EXT"; + case VK_VALIDATION_FEATURE_ENABLE_GPU_ASSISTED_RESERVE_BINDING_SLOT_EXT: + return "VK_VALIDATION_FEATURE_ENABLE_GPU_ASSISTED_RESERVE_BINDING_SLOT_EXT"; + case VK_VALIDATION_FEATURE_ENABLE_SYNCHRONIZATION_VALIDATION_EXT: + return "VK_VALIDATION_FEATURE_ENABLE_SYNCHRONIZATION_VALIDATION_EXT"; + default: + return "Unhandled VkValidationFeatureEnableEXT"; + } +} + +static inline const char* string_VkValidationFeatureDisableEXT(VkValidationFeatureDisableEXT input_value) +{ + switch (input_value) + { + case VK_VALIDATION_FEATURE_DISABLE_ALL_EXT: + return "VK_VALIDATION_FEATURE_DISABLE_ALL_EXT"; + case VK_VALIDATION_FEATURE_DISABLE_API_PARAMETERS_EXT: + return "VK_VALIDATION_FEATURE_DISABLE_API_PARAMETERS_EXT"; + case VK_VALIDATION_FEATURE_DISABLE_CORE_CHECKS_EXT: + return "VK_VALIDATION_FEATURE_DISABLE_CORE_CHECKS_EXT"; + case VK_VALIDATION_FEATURE_DISABLE_OBJECT_LIFETIMES_EXT: + return "VK_VALIDATION_FEATURE_DISABLE_OBJECT_LIFETIMES_EXT"; + case VK_VALIDATION_FEATURE_DISABLE_SHADERS_EXT: + return "VK_VALIDATION_FEATURE_DISABLE_SHADERS_EXT"; + case VK_VALIDATION_FEATURE_DISABLE_SHADER_VALIDATION_CACHE_EXT: + return "VK_VALIDATION_FEATURE_DISABLE_SHADER_VALIDATION_CACHE_EXT"; + case VK_VALIDATION_FEATURE_DISABLE_THREAD_SAFETY_EXT: + return "VK_VALIDATION_FEATURE_DISABLE_THREAD_SAFETY_EXT"; + case VK_VALIDATION_FEATURE_DISABLE_UNIQUE_HANDLES_EXT: + return "VK_VALIDATION_FEATURE_DISABLE_UNIQUE_HANDLES_EXT"; + default: + return "Unhandled VkValidationFeatureDisableEXT"; + } +} + +static inline const char* string_VkComponentTypeNV(VkComponentTypeNV input_value) +{ + switch (input_value) + { + case VK_COMPONENT_TYPE_FLOAT16_NV: + return "VK_COMPONENT_TYPE_FLOAT16_NV"; + case VK_COMPONENT_TYPE_FLOAT32_NV: + return "VK_COMPONENT_TYPE_FLOAT32_NV"; + case VK_COMPONENT_TYPE_FLOAT64_NV: + return "VK_COMPONENT_TYPE_FLOAT64_NV"; + case VK_COMPONENT_TYPE_SINT16_NV: + return "VK_COMPONENT_TYPE_SINT16_NV"; + case VK_COMPONENT_TYPE_SINT32_NV: + return "VK_COMPONENT_TYPE_SINT32_NV"; + case VK_COMPONENT_TYPE_SINT64_NV: + return "VK_COMPONENT_TYPE_SINT64_NV"; + case VK_COMPONENT_TYPE_SINT8_NV: + return "VK_COMPONENT_TYPE_SINT8_NV"; + case VK_COMPONENT_TYPE_UINT16_NV: + return "VK_COMPONENT_TYPE_UINT16_NV"; + case VK_COMPONENT_TYPE_UINT32_NV: + return "VK_COMPONENT_TYPE_UINT32_NV"; + case VK_COMPONENT_TYPE_UINT64_NV: + return "VK_COMPONENT_TYPE_UINT64_NV"; + case VK_COMPONENT_TYPE_UINT8_NV: + return "VK_COMPONENT_TYPE_UINT8_NV"; + default: + return "Unhandled VkComponentTypeNV"; + } +} + +static inline const char* string_VkScopeNV(VkScopeNV input_value) +{ + switch (input_value) + { + case VK_SCOPE_DEVICE_NV: + return "VK_SCOPE_DEVICE_NV"; + case VK_SCOPE_QUEUE_FAMILY_NV: + return "VK_SCOPE_QUEUE_FAMILY_NV"; + case VK_SCOPE_SUBGROUP_NV: + return "VK_SCOPE_SUBGROUP_NV"; + case VK_SCOPE_WORKGROUP_NV: + return "VK_SCOPE_WORKGROUP_NV"; + default: + return "Unhandled VkScopeNV"; + } +} + +static inline const char* string_VkCoverageReductionModeNV(VkCoverageReductionModeNV input_value) +{ + switch (input_value) + { + case VK_COVERAGE_REDUCTION_MODE_MERGE_NV: + return "VK_COVERAGE_REDUCTION_MODE_MERGE_NV"; + case VK_COVERAGE_REDUCTION_MODE_TRUNCATE_NV: + return "VK_COVERAGE_REDUCTION_MODE_TRUNCATE_NV"; + default: + return "Unhandled VkCoverageReductionModeNV"; + } +} + +static inline const char* string_VkProvokingVertexModeEXT(VkProvokingVertexModeEXT input_value) +{ + switch (input_value) + { + case VK_PROVOKING_VERTEX_MODE_FIRST_VERTEX_EXT: + return "VK_PROVOKING_VERTEX_MODE_FIRST_VERTEX_EXT"; + case VK_PROVOKING_VERTEX_MODE_LAST_VERTEX_EXT: + return "VK_PROVOKING_VERTEX_MODE_LAST_VERTEX_EXT"; + default: + return "Unhandled VkProvokingVertexModeEXT"; + } +} + + +#ifdef VK_USE_PLATFORM_WIN32_KHR + +static inline const char* string_VkFullScreenExclusiveEXT(VkFullScreenExclusiveEXT input_value) +{ + switch (input_value) + { + case VK_FULL_SCREEN_EXCLUSIVE_ALLOWED_EXT: + return "VK_FULL_SCREEN_EXCLUSIVE_ALLOWED_EXT"; + case VK_FULL_SCREEN_EXCLUSIVE_APPLICATION_CONTROLLED_EXT: + return "VK_FULL_SCREEN_EXCLUSIVE_APPLICATION_CONTROLLED_EXT"; + case VK_FULL_SCREEN_EXCLUSIVE_DEFAULT_EXT: + return "VK_FULL_SCREEN_EXCLUSIVE_DEFAULT_EXT"; + case VK_FULL_SCREEN_EXCLUSIVE_DISALLOWED_EXT: + return "VK_FULL_SCREEN_EXCLUSIVE_DISALLOWED_EXT"; + default: + return "Unhandled VkFullScreenExclusiveEXT"; + } +} +#endif // VK_USE_PLATFORM_WIN32_KHR + +static inline const char* string_VkLineRasterizationModeEXT(VkLineRasterizationModeEXT input_value) +{ + switch (input_value) + { + case VK_LINE_RASTERIZATION_MODE_BRESENHAM_EXT: + return "VK_LINE_RASTERIZATION_MODE_BRESENHAM_EXT"; + case VK_LINE_RASTERIZATION_MODE_DEFAULT_EXT: + return "VK_LINE_RASTERIZATION_MODE_DEFAULT_EXT"; + case VK_LINE_RASTERIZATION_MODE_RECTANGULAR_EXT: + return "VK_LINE_RASTERIZATION_MODE_RECTANGULAR_EXT"; + case VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH_EXT: + return "VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH_EXT"; + default: + return "Unhandled VkLineRasterizationModeEXT"; + } +} + +static inline const char* string_VkIndirectStateFlagBitsNV(VkIndirectStateFlagBitsNV input_value) +{ + switch (input_value) + { + case VK_INDIRECT_STATE_FLAG_FRONTFACE_BIT_NV: + return "VK_INDIRECT_STATE_FLAG_FRONTFACE_BIT_NV"; + default: + return "Unhandled VkIndirectStateFlagBitsNV"; + } +} + +static inline std::string string_VkIndirectStateFlagsNV(VkIndirectStateFlagsNV input_value) +{ + std::string ret; + int index = 0; + while(input_value) { + if (input_value & 1) { + if( !ret.empty()) ret.append("|"); + ret.append(string_VkIndirectStateFlagBitsNV(static_cast(1U << index))); + } + ++index; + input_value >>= 1; + } + if( ret.empty()) ret.append(string_VkIndirectStateFlagBitsNV(static_cast(0))); + return ret; +} + +static inline const char* string_VkIndirectCommandsTokenTypeNV(VkIndirectCommandsTokenTypeNV input_value) +{ + switch (input_value) + { + case VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_INDEXED_NV: + return "VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_INDEXED_NV"; + case VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_NV: + return "VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_NV"; + case VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_TASKS_NV: + return "VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_TASKS_NV"; + case VK_INDIRECT_COMMANDS_TOKEN_TYPE_INDEX_BUFFER_NV: + return "VK_INDIRECT_COMMANDS_TOKEN_TYPE_INDEX_BUFFER_NV"; + case VK_INDIRECT_COMMANDS_TOKEN_TYPE_PUSH_CONSTANT_NV: + return "VK_INDIRECT_COMMANDS_TOKEN_TYPE_PUSH_CONSTANT_NV"; + case VK_INDIRECT_COMMANDS_TOKEN_TYPE_SHADER_GROUP_NV: + return "VK_INDIRECT_COMMANDS_TOKEN_TYPE_SHADER_GROUP_NV"; + case VK_INDIRECT_COMMANDS_TOKEN_TYPE_STATE_FLAGS_NV: + return "VK_INDIRECT_COMMANDS_TOKEN_TYPE_STATE_FLAGS_NV"; + case VK_INDIRECT_COMMANDS_TOKEN_TYPE_VERTEX_BUFFER_NV: + return "VK_INDIRECT_COMMANDS_TOKEN_TYPE_VERTEX_BUFFER_NV"; + default: + return "Unhandled VkIndirectCommandsTokenTypeNV"; + } +} + +static inline const char* string_VkIndirectCommandsLayoutUsageFlagBitsNV(VkIndirectCommandsLayoutUsageFlagBitsNV input_value) +{ + switch (input_value) + { + case VK_INDIRECT_COMMANDS_LAYOUT_USAGE_EXPLICIT_PREPROCESS_BIT_NV: + return "VK_INDIRECT_COMMANDS_LAYOUT_USAGE_EXPLICIT_PREPROCESS_BIT_NV"; + case VK_INDIRECT_COMMANDS_LAYOUT_USAGE_INDEXED_SEQUENCES_BIT_NV: + return "VK_INDIRECT_COMMANDS_LAYOUT_USAGE_INDEXED_SEQUENCES_BIT_NV"; + case VK_INDIRECT_COMMANDS_LAYOUT_USAGE_UNORDERED_SEQUENCES_BIT_NV: + return "VK_INDIRECT_COMMANDS_LAYOUT_USAGE_UNORDERED_SEQUENCES_BIT_NV"; + default: + return "Unhandled VkIndirectCommandsLayoutUsageFlagBitsNV"; + } +} + +static inline std::string string_VkIndirectCommandsLayoutUsageFlagsNV(VkIndirectCommandsLayoutUsageFlagsNV input_value) +{ + std::string ret; + int index = 0; + while(input_value) { + if (input_value & 1) { + if( !ret.empty()) ret.append("|"); + ret.append(string_VkIndirectCommandsLayoutUsageFlagBitsNV(static_cast(1U << index))); + } + ++index; + input_value >>= 1; + } + if( ret.empty()) ret.append(string_VkIndirectCommandsLayoutUsageFlagBitsNV(static_cast(0))); + return ret; +} + +static inline const char* string_VkDeviceMemoryReportEventTypeEXT(VkDeviceMemoryReportEventTypeEXT input_value) +{ + switch (input_value) + { + case VK_DEVICE_MEMORY_REPORT_EVENT_TYPE_ALLOCATE_EXT: + return "VK_DEVICE_MEMORY_REPORT_EVENT_TYPE_ALLOCATE_EXT"; + case VK_DEVICE_MEMORY_REPORT_EVENT_TYPE_ALLOCATION_FAILED_EXT: + return "VK_DEVICE_MEMORY_REPORT_EVENT_TYPE_ALLOCATION_FAILED_EXT"; + case VK_DEVICE_MEMORY_REPORT_EVENT_TYPE_FREE_EXT: + return "VK_DEVICE_MEMORY_REPORT_EVENT_TYPE_FREE_EXT"; + case VK_DEVICE_MEMORY_REPORT_EVENT_TYPE_IMPORT_EXT: + return "VK_DEVICE_MEMORY_REPORT_EVENT_TYPE_IMPORT_EXT"; + case VK_DEVICE_MEMORY_REPORT_EVENT_TYPE_UNIMPORT_EXT: + return "VK_DEVICE_MEMORY_REPORT_EVENT_TYPE_UNIMPORT_EXT"; + default: + return "Unhandled VkDeviceMemoryReportEventTypeEXT"; + } +} + +static inline const char* string_VkDeviceDiagnosticsConfigFlagBitsNV(VkDeviceDiagnosticsConfigFlagBitsNV input_value) +{ + switch (input_value) + { + case VK_DEVICE_DIAGNOSTICS_CONFIG_ENABLE_AUTOMATIC_CHECKPOINTS_BIT_NV: + return "VK_DEVICE_DIAGNOSTICS_CONFIG_ENABLE_AUTOMATIC_CHECKPOINTS_BIT_NV"; + case VK_DEVICE_DIAGNOSTICS_CONFIG_ENABLE_RESOURCE_TRACKING_BIT_NV: + return "VK_DEVICE_DIAGNOSTICS_CONFIG_ENABLE_RESOURCE_TRACKING_BIT_NV"; + case VK_DEVICE_DIAGNOSTICS_CONFIG_ENABLE_SHADER_DEBUG_INFO_BIT_NV: + return "VK_DEVICE_DIAGNOSTICS_CONFIG_ENABLE_SHADER_DEBUG_INFO_BIT_NV"; + default: + return "Unhandled VkDeviceDiagnosticsConfigFlagBitsNV"; + } +} + +static inline std::string string_VkDeviceDiagnosticsConfigFlagsNV(VkDeviceDiagnosticsConfigFlagsNV input_value) +{ + std::string ret; + int index = 0; + while(input_value) { + if (input_value & 1) { + if( !ret.empty()) ret.append("|"); + ret.append(string_VkDeviceDiagnosticsConfigFlagBitsNV(static_cast(1U << index))); + } + ++index; + input_value >>= 1; + } + if( ret.empty()) ret.append(string_VkDeviceDiagnosticsConfigFlagBitsNV(static_cast(0))); + return ret; +} + +static inline const char* string_VkFragmentShadingRateTypeNV(VkFragmentShadingRateTypeNV input_value) +{ + switch (input_value) + { + case VK_FRAGMENT_SHADING_RATE_TYPE_ENUMS_NV: + return "VK_FRAGMENT_SHADING_RATE_TYPE_ENUMS_NV"; + case VK_FRAGMENT_SHADING_RATE_TYPE_FRAGMENT_SIZE_NV: + return "VK_FRAGMENT_SHADING_RATE_TYPE_FRAGMENT_SIZE_NV"; + default: + return "Unhandled VkFragmentShadingRateTypeNV"; + } +} + +static inline const char* string_VkFragmentShadingRateNV(VkFragmentShadingRateNV input_value) +{ + switch (input_value) + { + case VK_FRAGMENT_SHADING_RATE_16_INVOCATIONS_PER_PIXEL_NV: + return "VK_FRAGMENT_SHADING_RATE_16_INVOCATIONS_PER_PIXEL_NV"; + case VK_FRAGMENT_SHADING_RATE_1_INVOCATION_PER_1X2_PIXELS_NV: + return "VK_FRAGMENT_SHADING_RATE_1_INVOCATION_PER_1X2_PIXELS_NV"; + case VK_FRAGMENT_SHADING_RATE_1_INVOCATION_PER_2X1_PIXELS_NV: + return "VK_FRAGMENT_SHADING_RATE_1_INVOCATION_PER_2X1_PIXELS_NV"; + case VK_FRAGMENT_SHADING_RATE_1_INVOCATION_PER_2X2_PIXELS_NV: + return "VK_FRAGMENT_SHADING_RATE_1_INVOCATION_PER_2X2_PIXELS_NV"; + case VK_FRAGMENT_SHADING_RATE_1_INVOCATION_PER_2X4_PIXELS_NV: + return "VK_FRAGMENT_SHADING_RATE_1_INVOCATION_PER_2X4_PIXELS_NV"; + case VK_FRAGMENT_SHADING_RATE_1_INVOCATION_PER_4X2_PIXELS_NV: + return "VK_FRAGMENT_SHADING_RATE_1_INVOCATION_PER_4X2_PIXELS_NV"; + case VK_FRAGMENT_SHADING_RATE_1_INVOCATION_PER_4X4_PIXELS_NV: + return "VK_FRAGMENT_SHADING_RATE_1_INVOCATION_PER_4X4_PIXELS_NV"; + case VK_FRAGMENT_SHADING_RATE_1_INVOCATION_PER_PIXEL_NV: + return "VK_FRAGMENT_SHADING_RATE_1_INVOCATION_PER_PIXEL_NV"; + case VK_FRAGMENT_SHADING_RATE_2_INVOCATIONS_PER_PIXEL_NV: + return "VK_FRAGMENT_SHADING_RATE_2_INVOCATIONS_PER_PIXEL_NV"; + case VK_FRAGMENT_SHADING_RATE_4_INVOCATIONS_PER_PIXEL_NV: + return "VK_FRAGMENT_SHADING_RATE_4_INVOCATIONS_PER_PIXEL_NV"; + case VK_FRAGMENT_SHADING_RATE_8_INVOCATIONS_PER_PIXEL_NV: + return "VK_FRAGMENT_SHADING_RATE_8_INVOCATIONS_PER_PIXEL_NV"; + case VK_FRAGMENT_SHADING_RATE_NO_INVOCATIONS_NV: + return "VK_FRAGMENT_SHADING_RATE_NO_INVOCATIONS_NV"; + default: + return "Unhandled VkFragmentShadingRateNV"; + } +} + +static inline const char* string_VkAccelerationStructureMotionInstanceTypeNV(VkAccelerationStructureMotionInstanceTypeNV input_value) +{ + switch (input_value) + { + case VK_ACCELERATION_STRUCTURE_MOTION_INSTANCE_TYPE_MATRIX_MOTION_NV: + return "VK_ACCELERATION_STRUCTURE_MOTION_INSTANCE_TYPE_MATRIX_MOTION_NV"; + case VK_ACCELERATION_STRUCTURE_MOTION_INSTANCE_TYPE_SRT_MOTION_NV: + return "VK_ACCELERATION_STRUCTURE_MOTION_INSTANCE_TYPE_SRT_MOTION_NV"; + case VK_ACCELERATION_STRUCTURE_MOTION_INSTANCE_TYPE_STATIC_NV: + return "VK_ACCELERATION_STRUCTURE_MOTION_INSTANCE_TYPE_STATIC_NV"; + default: + return "Unhandled VkAccelerationStructureMotionInstanceTypeNV"; + } +} + +static inline const char* string_VkBuildAccelerationStructureModeKHR(VkBuildAccelerationStructureModeKHR input_value) +{ + switch (input_value) + { + case VK_BUILD_ACCELERATION_STRUCTURE_MODE_BUILD_KHR: + return "VK_BUILD_ACCELERATION_STRUCTURE_MODE_BUILD_KHR"; + case VK_BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR: + return "VK_BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR"; + default: + return "Unhandled VkBuildAccelerationStructureModeKHR"; + } +} + +static inline const char* string_VkAccelerationStructureBuildTypeKHR(VkAccelerationStructureBuildTypeKHR input_value) +{ + switch (input_value) + { + case VK_ACCELERATION_STRUCTURE_BUILD_TYPE_DEVICE_KHR: + return "VK_ACCELERATION_STRUCTURE_BUILD_TYPE_DEVICE_KHR"; + case VK_ACCELERATION_STRUCTURE_BUILD_TYPE_HOST_KHR: + return "VK_ACCELERATION_STRUCTURE_BUILD_TYPE_HOST_KHR"; + case VK_ACCELERATION_STRUCTURE_BUILD_TYPE_HOST_OR_DEVICE_KHR: + return "VK_ACCELERATION_STRUCTURE_BUILD_TYPE_HOST_OR_DEVICE_KHR"; + default: + return "Unhandled VkAccelerationStructureBuildTypeKHR"; + } +} + +static inline const char* string_VkAccelerationStructureCreateFlagBitsKHR(VkAccelerationStructureCreateFlagBitsKHR input_value) +{ + switch (input_value) + { + case VK_ACCELERATION_STRUCTURE_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_KHR: + return "VK_ACCELERATION_STRUCTURE_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_KHR"; + case VK_ACCELERATION_STRUCTURE_CREATE_MOTION_BIT_NV: + return "VK_ACCELERATION_STRUCTURE_CREATE_MOTION_BIT_NV"; + default: + return "Unhandled VkAccelerationStructureCreateFlagBitsKHR"; + } +} + +static inline std::string string_VkAccelerationStructureCreateFlagsKHR(VkAccelerationStructureCreateFlagsKHR input_value) +{ + std::string ret; + int index = 0; + while(input_value) { + if (input_value & 1) { + if( !ret.empty()) ret.append("|"); + ret.append(string_VkAccelerationStructureCreateFlagBitsKHR(static_cast(1U << index))); + } + ++index; + input_value >>= 1; + } + if( ret.empty()) ret.append(string_VkAccelerationStructureCreateFlagBitsKHR(static_cast(0))); + return ret; +} + +static inline const char* string_VkAccelerationStructureCompatibilityKHR(VkAccelerationStructureCompatibilityKHR input_value) +{ + switch (input_value) + { + case VK_ACCELERATION_STRUCTURE_COMPATIBILITY_COMPATIBLE_KHR: + return "VK_ACCELERATION_STRUCTURE_COMPATIBILITY_COMPATIBLE_KHR"; + case VK_ACCELERATION_STRUCTURE_COMPATIBILITY_INCOMPATIBLE_KHR: + return "VK_ACCELERATION_STRUCTURE_COMPATIBILITY_INCOMPATIBLE_KHR"; + default: + return "Unhandled VkAccelerationStructureCompatibilityKHR"; + } +} + +static inline const char* string_VkShaderGroupShaderKHR(VkShaderGroupShaderKHR input_value) +{ + switch (input_value) + { + case VK_SHADER_GROUP_SHADER_ANY_HIT_KHR: + return "VK_SHADER_GROUP_SHADER_ANY_HIT_KHR"; + case VK_SHADER_GROUP_SHADER_CLOSEST_HIT_KHR: + return "VK_SHADER_GROUP_SHADER_CLOSEST_HIT_KHR"; + case VK_SHADER_GROUP_SHADER_GENERAL_KHR: + return "VK_SHADER_GROUP_SHADER_GENERAL_KHR"; + case VK_SHADER_GROUP_SHADER_INTERSECTION_KHR: + return "VK_SHADER_GROUP_SHADER_INTERSECTION_KHR"; + default: + return "Unhandled VkShaderGroupShaderKHR"; + } +} + +static inline const char * GetPhysDevFeatureString(uint32_t index) { + const char * IndexToPhysDevFeatureString[] = { + "robustBufferAccess", + "fullDrawIndexUint32", + "imageCubeArray", + "independentBlend", + "geometryShader", + "tessellationShader", + "sampleRateShading", + "dualSrcBlend", + "logicOp", + "multiDrawIndirect", + "drawIndirectFirstInstance", + "depthClamp", + "depthBiasClamp", + "fillModeNonSolid", + "depthBounds", + "wideLines", + "largePoints", + "alphaToOne", + "multiViewport", + "samplerAnisotropy", + "textureCompressionETC2", + "textureCompressionASTC_LDR", + "textureCompressionBC", + "occlusionQueryPrecise", + "pipelineStatisticsQuery", + "vertexPipelineStoresAndAtomics", + "fragmentStoresAndAtomics", + "shaderTessellationAndGeometryPointSize", + "shaderImageGatherExtended", + "shaderStorageImageExtendedFormats", + "shaderStorageImageMultisample", + "shaderStorageImageReadWithoutFormat", + "shaderStorageImageWriteWithoutFormat", + "shaderUniformBufferArrayDynamicIndexing", + "shaderSampledImageArrayDynamicIndexing", + "shaderStorageBufferArrayDynamicIndexing", + "shaderStorageImageArrayDynamicIndexing", + "shaderClipDistance", + "shaderCullDistance", + "shaderFloat64", + "shaderInt64", + "shaderInt16", + "shaderResourceResidency", + "shaderResourceMinLod", + "sparseBinding", + "sparseResidencyBuffer", + "sparseResidencyImage2D", + "sparseResidencyImage3D", + "sparseResidency2Samples", + "sparseResidency4Samples", + "sparseResidency8Samples", + "sparseResidency16Samples", + "sparseResidencyAliased", + "variableMultisampleRate", + "inheritedQueries", + }; + + return IndexToPhysDevFeatureString[index]; +} + +static inline bool IsDuplicatePnext(VkStructureType input_value) +{ + switch (input_value) + { + case VK_STRUCTURE_TYPE_DEBUG_UTILS_MESSENGER_CREATE_INFO_EXT: + case VK_STRUCTURE_TYPE_DEVICE_DEVICE_MEMORY_REPORT_CREATE_INFO_EXT: + case VK_STRUCTURE_TYPE_DEVICE_PRIVATE_DATA_CREATE_INFO_EXT: + return true; + default: + return false; + } +} diff --git a/src/common/rendering/vulkan/thirdparty/vulkan/vk_icd.h b/libraries/ZVulkan/include/vulkan/vk_icd.h similarity index 100% rename from src/common/rendering/vulkan/thirdparty/vulkan/vk_icd.h rename to libraries/ZVulkan/include/vulkan/vk_icd.h diff --git a/src/common/rendering/vulkan/thirdparty/vulkan/vk_layer.h b/libraries/ZVulkan/include/vulkan/vk_layer.h similarity index 100% rename from src/common/rendering/vulkan/thirdparty/vulkan/vk_layer.h rename to libraries/ZVulkan/include/vulkan/vk_layer.h diff --git a/libraries/ZVulkan/include/vulkan/vk_layer_dispatch_table.h b/libraries/ZVulkan/include/vulkan/vk_layer_dispatch_table.h new file mode 100644 index 0000000000..63d06b6c97 --- /dev/null +++ b/libraries/ZVulkan/include/vulkan/vk_layer_dispatch_table.h @@ -0,0 +1,525 @@ +// *** THIS FILE IS GENERATED - DO NOT EDIT *** +// See loader_extension_generator.py for modifications + +/* + * Copyright (c) 2015-2017 The Khronos Group Inc. + * Copyright (c) 2015-2017 Valve Corporation + * Copyright (c) 2015-2017 LunarG, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Author: Mark Lobodzinski + * Author: Mark Young + */ + +#pragma once + +typedef PFN_vkVoidFunction (VKAPI_PTR *PFN_GetPhysicalDeviceProcAddr)(VkInstance instance, const char* pName); + +// Instance function pointer dispatch table +typedef struct VkLayerInstanceDispatchTable_ { + // Manually add in GetPhysicalDeviceProcAddr entry + PFN_GetPhysicalDeviceProcAddr GetPhysicalDeviceProcAddr; + + // ---- Core 1_0 commands + PFN_vkCreateInstance CreateInstance; + PFN_vkDestroyInstance DestroyInstance; + PFN_vkEnumeratePhysicalDevices EnumeratePhysicalDevices; + PFN_vkGetPhysicalDeviceFeatures GetPhysicalDeviceFeatures; + PFN_vkGetPhysicalDeviceFormatProperties GetPhysicalDeviceFormatProperties; + PFN_vkGetPhysicalDeviceImageFormatProperties GetPhysicalDeviceImageFormatProperties; + PFN_vkGetPhysicalDeviceProperties GetPhysicalDeviceProperties; + PFN_vkGetPhysicalDeviceQueueFamilyProperties GetPhysicalDeviceQueueFamilyProperties; + PFN_vkGetPhysicalDeviceMemoryProperties GetPhysicalDeviceMemoryProperties; + PFN_vkGetInstanceProcAddr GetInstanceProcAddr; + PFN_vkCreateDevice CreateDevice; + PFN_vkEnumerateInstanceExtensionProperties EnumerateInstanceExtensionProperties; + PFN_vkEnumerateDeviceExtensionProperties EnumerateDeviceExtensionProperties; + PFN_vkEnumerateInstanceLayerProperties EnumerateInstanceLayerProperties; + PFN_vkEnumerateDeviceLayerProperties EnumerateDeviceLayerProperties; + PFN_vkGetPhysicalDeviceSparseImageFormatProperties GetPhysicalDeviceSparseImageFormatProperties; + + // ---- Core 1_1 commands + PFN_vkEnumerateInstanceVersion EnumerateInstanceVersion; + PFN_vkEnumeratePhysicalDeviceGroups EnumeratePhysicalDeviceGroups; + PFN_vkGetPhysicalDeviceFeatures2 GetPhysicalDeviceFeatures2; + PFN_vkGetPhysicalDeviceProperties2 GetPhysicalDeviceProperties2; + PFN_vkGetPhysicalDeviceFormatProperties2 GetPhysicalDeviceFormatProperties2; + PFN_vkGetPhysicalDeviceImageFormatProperties2 GetPhysicalDeviceImageFormatProperties2; + PFN_vkGetPhysicalDeviceQueueFamilyProperties2 GetPhysicalDeviceQueueFamilyProperties2; + PFN_vkGetPhysicalDeviceMemoryProperties2 GetPhysicalDeviceMemoryProperties2; + PFN_vkGetPhysicalDeviceSparseImageFormatProperties2 GetPhysicalDeviceSparseImageFormatProperties2; + PFN_vkGetPhysicalDeviceExternalBufferProperties GetPhysicalDeviceExternalBufferProperties; + PFN_vkGetPhysicalDeviceExternalFenceProperties GetPhysicalDeviceExternalFenceProperties; + PFN_vkGetPhysicalDeviceExternalSemaphoreProperties GetPhysicalDeviceExternalSemaphoreProperties; + + // ---- VK_KHR_surface extension commands + PFN_vkDestroySurfaceKHR DestroySurfaceKHR; + PFN_vkGetPhysicalDeviceSurfaceSupportKHR GetPhysicalDeviceSurfaceSupportKHR; + PFN_vkGetPhysicalDeviceSurfaceCapabilitiesKHR GetPhysicalDeviceSurfaceCapabilitiesKHR; + PFN_vkGetPhysicalDeviceSurfaceFormatsKHR GetPhysicalDeviceSurfaceFormatsKHR; + PFN_vkGetPhysicalDeviceSurfacePresentModesKHR GetPhysicalDeviceSurfacePresentModesKHR; + + // ---- VK_KHR_swapchain extension commands + PFN_vkGetPhysicalDevicePresentRectanglesKHR GetPhysicalDevicePresentRectanglesKHR; + + // ---- VK_KHR_display extension commands + PFN_vkGetPhysicalDeviceDisplayPropertiesKHR GetPhysicalDeviceDisplayPropertiesKHR; + PFN_vkGetPhysicalDeviceDisplayPlanePropertiesKHR GetPhysicalDeviceDisplayPlanePropertiesKHR; + PFN_vkGetDisplayPlaneSupportedDisplaysKHR GetDisplayPlaneSupportedDisplaysKHR; + PFN_vkGetDisplayModePropertiesKHR GetDisplayModePropertiesKHR; + PFN_vkCreateDisplayModeKHR CreateDisplayModeKHR; + PFN_vkGetDisplayPlaneCapabilitiesKHR GetDisplayPlaneCapabilitiesKHR; + PFN_vkCreateDisplayPlaneSurfaceKHR CreateDisplayPlaneSurfaceKHR; + + // ---- VK_KHR_xlib_surface extension commands +#ifdef VK_USE_PLATFORM_XLIB_KHR + PFN_vkCreateXlibSurfaceKHR CreateXlibSurfaceKHR; +#endif // VK_USE_PLATFORM_XLIB_KHR +#ifdef VK_USE_PLATFORM_XLIB_KHR + PFN_vkGetPhysicalDeviceXlibPresentationSupportKHR GetPhysicalDeviceXlibPresentationSupportKHR; +#endif // VK_USE_PLATFORM_XLIB_KHR + + // ---- VK_KHR_xcb_surface extension commands +#ifdef VK_USE_PLATFORM_XCB_KHR + PFN_vkCreateXcbSurfaceKHR CreateXcbSurfaceKHR; +#endif // VK_USE_PLATFORM_XCB_KHR +#ifdef VK_USE_PLATFORM_XCB_KHR + PFN_vkGetPhysicalDeviceXcbPresentationSupportKHR GetPhysicalDeviceXcbPresentationSupportKHR; +#endif // VK_USE_PLATFORM_XCB_KHR + + // ---- VK_KHR_wayland_surface extension commands +#ifdef VK_USE_PLATFORM_WAYLAND_KHR + PFN_vkCreateWaylandSurfaceKHR CreateWaylandSurfaceKHR; +#endif // VK_USE_PLATFORM_WAYLAND_KHR +#ifdef VK_USE_PLATFORM_WAYLAND_KHR + PFN_vkGetPhysicalDeviceWaylandPresentationSupportKHR GetPhysicalDeviceWaylandPresentationSupportKHR; +#endif // VK_USE_PLATFORM_WAYLAND_KHR + + // ---- VK_KHR_mir_surface extension commands +#ifdef VK_USE_PLATFORM_MIR_KHR + PFN_vkCreateMirSurfaceKHR CreateMirSurfaceKHR; +#endif // VK_USE_PLATFORM_MIR_KHR +#ifdef VK_USE_PLATFORM_MIR_KHR + PFN_vkGetPhysicalDeviceMirPresentationSupportKHR GetPhysicalDeviceMirPresentationSupportKHR; +#endif // VK_USE_PLATFORM_MIR_KHR + + // ---- VK_KHR_android_surface extension commands +#ifdef VK_USE_PLATFORM_ANDROID_KHR + PFN_vkCreateAndroidSurfaceKHR CreateAndroidSurfaceKHR; +#endif // VK_USE_PLATFORM_ANDROID_KHR + + // ---- VK_KHR_win32_surface extension commands +#ifdef VK_USE_PLATFORM_WIN32_KHR + PFN_vkCreateWin32SurfaceKHR CreateWin32SurfaceKHR; +#endif // VK_USE_PLATFORM_WIN32_KHR +#ifdef VK_USE_PLATFORM_WIN32_KHR + PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR GetPhysicalDeviceWin32PresentationSupportKHR; +#endif // VK_USE_PLATFORM_WIN32_KHR + + // ---- VK_KHR_get_physical_device_properties2 extension commands + PFN_vkGetPhysicalDeviceFeatures2KHR GetPhysicalDeviceFeatures2KHR; + PFN_vkGetPhysicalDeviceProperties2KHR GetPhysicalDeviceProperties2KHR; + PFN_vkGetPhysicalDeviceFormatProperties2KHR GetPhysicalDeviceFormatProperties2KHR; + PFN_vkGetPhysicalDeviceImageFormatProperties2KHR GetPhysicalDeviceImageFormatProperties2KHR; + PFN_vkGetPhysicalDeviceQueueFamilyProperties2KHR GetPhysicalDeviceQueueFamilyProperties2KHR; + PFN_vkGetPhysicalDeviceMemoryProperties2KHR GetPhysicalDeviceMemoryProperties2KHR; + PFN_vkGetPhysicalDeviceSparseImageFormatProperties2KHR GetPhysicalDeviceSparseImageFormatProperties2KHR; + + // ---- VK_KHR_device_group_creation extension commands + PFN_vkEnumeratePhysicalDeviceGroupsKHR EnumeratePhysicalDeviceGroupsKHR; + + // ---- VK_KHR_external_memory_capabilities extension commands + PFN_vkGetPhysicalDeviceExternalBufferPropertiesKHR GetPhysicalDeviceExternalBufferPropertiesKHR; + + // ---- VK_KHR_external_semaphore_capabilities extension commands + PFN_vkGetPhysicalDeviceExternalSemaphorePropertiesKHR GetPhysicalDeviceExternalSemaphorePropertiesKHR; + + // ---- VK_KHR_external_fence_capabilities extension commands + PFN_vkGetPhysicalDeviceExternalFencePropertiesKHR GetPhysicalDeviceExternalFencePropertiesKHR; + + // ---- VK_KHR_get_surface_capabilities2 extension commands + PFN_vkGetPhysicalDeviceSurfaceCapabilities2KHR GetPhysicalDeviceSurfaceCapabilities2KHR; + PFN_vkGetPhysicalDeviceSurfaceFormats2KHR GetPhysicalDeviceSurfaceFormats2KHR; + + // ---- VK_KHR_get_display_properties2 extension commands + PFN_vkGetPhysicalDeviceDisplayProperties2KHR GetPhysicalDeviceDisplayProperties2KHR; + PFN_vkGetPhysicalDeviceDisplayPlaneProperties2KHR GetPhysicalDeviceDisplayPlaneProperties2KHR; + PFN_vkGetDisplayModeProperties2KHR GetDisplayModeProperties2KHR; + PFN_vkGetDisplayPlaneCapabilities2KHR GetDisplayPlaneCapabilities2KHR; + + // ---- VK_EXT_debug_report extension commands + PFN_vkCreateDebugReportCallbackEXT CreateDebugReportCallbackEXT; + PFN_vkDestroyDebugReportCallbackEXT DestroyDebugReportCallbackEXT; + PFN_vkDebugReportMessageEXT DebugReportMessageEXT; + + // ---- VK_NV_external_memory_capabilities extension commands + PFN_vkGetPhysicalDeviceExternalImageFormatPropertiesNV GetPhysicalDeviceExternalImageFormatPropertiesNV; + + // ---- VK_NN_vi_surface extension commands +#ifdef VK_USE_PLATFORM_VI_NN + PFN_vkCreateViSurfaceNN CreateViSurfaceNN; +#endif // VK_USE_PLATFORM_VI_NN + + // ---- VK_NVX_device_generated_commands extension commands + PFN_vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX GetPhysicalDeviceGeneratedCommandsPropertiesNVX; + + // ---- VK_EXT_direct_mode_display extension commands + PFN_vkReleaseDisplayEXT ReleaseDisplayEXT; + + // ---- VK_EXT_acquire_xlib_display extension commands +#ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT + PFN_vkAcquireXlibDisplayEXT AcquireXlibDisplayEXT; +#endif // VK_USE_PLATFORM_XLIB_XRANDR_EXT +#ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT + PFN_vkGetRandROutputDisplayEXT GetRandROutputDisplayEXT; +#endif // VK_USE_PLATFORM_XLIB_XRANDR_EXT + + // ---- VK_EXT_display_surface_counter extension commands + PFN_vkGetPhysicalDeviceSurfaceCapabilities2EXT GetPhysicalDeviceSurfaceCapabilities2EXT; + + // ---- VK_MVK_ios_surface extension commands +#ifdef VK_USE_PLATFORM_IOS_MVK + PFN_vkCreateIOSSurfaceMVK CreateIOSSurfaceMVK; +#endif // VK_USE_PLATFORM_IOS_MVK + + // ---- VK_MVK_macos_surface extension commands +#ifdef VK_USE_PLATFORM_MACOS_MVK + PFN_vkCreateMacOSSurfaceMVK CreateMacOSSurfaceMVK; +#endif // VK_USE_PLATFORM_MACOS_MVK + + // ---- VK_EXT_debug_utils extension commands + PFN_vkCreateDebugUtilsMessengerEXT CreateDebugUtilsMessengerEXT; + PFN_vkDestroyDebugUtilsMessengerEXT DestroyDebugUtilsMessengerEXT; + PFN_vkSubmitDebugUtilsMessageEXT SubmitDebugUtilsMessageEXT; + + // ---- VK_EXT_sample_locations extension commands + PFN_vkGetPhysicalDeviceMultisamplePropertiesEXT GetPhysicalDeviceMultisamplePropertiesEXT; +} VkLayerInstanceDispatchTable; + +// Device function pointer dispatch table +typedef struct VkLayerDispatchTable_ { + + // ---- Core 1_0 commands + PFN_vkGetDeviceProcAddr GetDeviceProcAddr; + PFN_vkDestroyDevice DestroyDevice; + PFN_vkGetDeviceQueue GetDeviceQueue; + PFN_vkQueueSubmit QueueSubmit; + PFN_vkQueueWaitIdle QueueWaitIdle; + PFN_vkDeviceWaitIdle DeviceWaitIdle; + PFN_vkAllocateMemory AllocateMemory; + PFN_vkFreeMemory FreeMemory; + PFN_vkMapMemory MapMemory; + PFN_vkUnmapMemory UnmapMemory; + PFN_vkFlushMappedMemoryRanges FlushMappedMemoryRanges; + PFN_vkInvalidateMappedMemoryRanges InvalidateMappedMemoryRanges; + PFN_vkGetDeviceMemoryCommitment GetDeviceMemoryCommitment; + PFN_vkBindBufferMemory BindBufferMemory; + PFN_vkBindImageMemory BindImageMemory; + PFN_vkGetBufferMemoryRequirements GetBufferMemoryRequirements; + PFN_vkGetImageMemoryRequirements GetImageMemoryRequirements; + PFN_vkGetImageSparseMemoryRequirements GetImageSparseMemoryRequirements; + PFN_vkQueueBindSparse QueueBindSparse; + PFN_vkCreateFence CreateFence; + PFN_vkDestroyFence DestroyFence; + PFN_vkResetFences ResetFences; + PFN_vkGetFenceStatus GetFenceStatus; + PFN_vkWaitForFences WaitForFences; + PFN_vkCreateSemaphore CreateSemaphore; + PFN_vkDestroySemaphore DestroySemaphore; + PFN_vkCreateEvent CreateEvent; + PFN_vkDestroyEvent DestroyEvent; + PFN_vkGetEventStatus GetEventStatus; + PFN_vkSetEvent SetEvent; + PFN_vkResetEvent ResetEvent; + PFN_vkCreateQueryPool CreateQueryPool; + PFN_vkDestroyQueryPool DestroyQueryPool; + PFN_vkGetQueryPoolResults GetQueryPoolResults; + PFN_vkCreateBuffer CreateBuffer; + PFN_vkDestroyBuffer DestroyBuffer; + PFN_vkCreateBufferView CreateBufferView; + PFN_vkDestroyBufferView DestroyBufferView; + PFN_vkCreateImage CreateImage; + PFN_vkDestroyImage DestroyImage; + PFN_vkGetImageSubresourceLayout GetImageSubresourceLayout; + PFN_vkCreateImageView CreateImageView; + PFN_vkDestroyImageView DestroyImageView; + PFN_vkCreateShaderModule CreateShaderModule; + PFN_vkDestroyShaderModule DestroyShaderModule; + PFN_vkCreatePipelineCache CreatePipelineCache; + PFN_vkDestroyPipelineCache DestroyPipelineCache; + PFN_vkGetPipelineCacheData GetPipelineCacheData; + PFN_vkMergePipelineCaches MergePipelineCaches; + PFN_vkCreateGraphicsPipelines CreateGraphicsPipelines; + PFN_vkCreateComputePipelines CreateComputePipelines; + PFN_vkDestroyPipeline DestroyPipeline; + PFN_vkCreatePipelineLayout CreatePipelineLayout; + PFN_vkDestroyPipelineLayout DestroyPipelineLayout; + PFN_vkCreateSampler CreateSampler; + PFN_vkDestroySampler DestroySampler; + PFN_vkCreateDescriptorSetLayout CreateDescriptorSetLayout; + PFN_vkDestroyDescriptorSetLayout DestroyDescriptorSetLayout; + PFN_vkCreateDescriptorPool CreateDescriptorPool; + PFN_vkDestroyDescriptorPool DestroyDescriptorPool; + PFN_vkResetDescriptorPool ResetDescriptorPool; + PFN_vkAllocateDescriptorSets AllocateDescriptorSets; + PFN_vkFreeDescriptorSets FreeDescriptorSets; + PFN_vkUpdateDescriptorSets UpdateDescriptorSets; + PFN_vkCreateFramebuffer CreateFramebuffer; + PFN_vkDestroyFramebuffer DestroyFramebuffer; + PFN_vkCreateRenderPass CreateRenderPass; + PFN_vkDestroyRenderPass DestroyRenderPass; + PFN_vkGetRenderAreaGranularity GetRenderAreaGranularity; + PFN_vkCreateCommandPool CreateCommandPool; + PFN_vkDestroyCommandPool DestroyCommandPool; + PFN_vkResetCommandPool ResetCommandPool; + PFN_vkAllocateCommandBuffers AllocateCommandBuffers; + PFN_vkFreeCommandBuffers FreeCommandBuffers; + PFN_vkBeginCommandBuffer BeginCommandBuffer; + PFN_vkEndCommandBuffer EndCommandBuffer; + PFN_vkResetCommandBuffer ResetCommandBuffer; + PFN_vkCmdBindPipeline CmdBindPipeline; + PFN_vkCmdSetViewport CmdSetViewport; + PFN_vkCmdSetScissor CmdSetScissor; + PFN_vkCmdSetLineWidth CmdSetLineWidth; + PFN_vkCmdSetDepthBias CmdSetDepthBias; + PFN_vkCmdSetBlendConstants CmdSetBlendConstants; + PFN_vkCmdSetDepthBounds CmdSetDepthBounds; + PFN_vkCmdSetStencilCompareMask CmdSetStencilCompareMask; + PFN_vkCmdSetStencilWriteMask CmdSetStencilWriteMask; + PFN_vkCmdSetStencilReference CmdSetStencilReference; + PFN_vkCmdBindDescriptorSets CmdBindDescriptorSets; + PFN_vkCmdBindIndexBuffer CmdBindIndexBuffer; + PFN_vkCmdBindVertexBuffers CmdBindVertexBuffers; + PFN_vkCmdDraw CmdDraw; + PFN_vkCmdDrawIndexed CmdDrawIndexed; + PFN_vkCmdDrawIndirect CmdDrawIndirect; + PFN_vkCmdDrawIndexedIndirect CmdDrawIndexedIndirect; + PFN_vkCmdDispatch CmdDispatch; + PFN_vkCmdDispatchIndirect CmdDispatchIndirect; + PFN_vkCmdCopyBuffer CmdCopyBuffer; + PFN_vkCmdCopyImage CmdCopyImage; + PFN_vkCmdBlitImage CmdBlitImage; + PFN_vkCmdCopyBufferToImage CmdCopyBufferToImage; + PFN_vkCmdCopyImageToBuffer CmdCopyImageToBuffer; + PFN_vkCmdUpdateBuffer CmdUpdateBuffer; + PFN_vkCmdFillBuffer CmdFillBuffer; + PFN_vkCmdClearColorImage CmdClearColorImage; + PFN_vkCmdClearDepthStencilImage CmdClearDepthStencilImage; + PFN_vkCmdClearAttachments CmdClearAttachments; + PFN_vkCmdResolveImage CmdResolveImage; + PFN_vkCmdSetEvent CmdSetEvent; + PFN_vkCmdResetEvent CmdResetEvent; + PFN_vkCmdWaitEvents CmdWaitEvents; + PFN_vkCmdPipelineBarrier CmdPipelineBarrier; + PFN_vkCmdBeginQuery CmdBeginQuery; + PFN_vkCmdEndQuery CmdEndQuery; + PFN_vkCmdResetQueryPool CmdResetQueryPool; + PFN_vkCmdWriteTimestamp CmdWriteTimestamp; + PFN_vkCmdCopyQueryPoolResults CmdCopyQueryPoolResults; + PFN_vkCmdPushConstants CmdPushConstants; + PFN_vkCmdBeginRenderPass CmdBeginRenderPass; + PFN_vkCmdNextSubpass CmdNextSubpass; + PFN_vkCmdEndRenderPass CmdEndRenderPass; + PFN_vkCmdExecuteCommands CmdExecuteCommands; + + // ---- Core 1_1 commands + PFN_vkBindBufferMemory2 BindBufferMemory2; + PFN_vkBindImageMemory2 BindImageMemory2; + PFN_vkGetDeviceGroupPeerMemoryFeatures GetDeviceGroupPeerMemoryFeatures; + PFN_vkCmdSetDeviceMask CmdSetDeviceMask; + PFN_vkCmdDispatchBase CmdDispatchBase; + PFN_vkGetImageMemoryRequirements2 GetImageMemoryRequirements2; + PFN_vkGetBufferMemoryRequirements2 GetBufferMemoryRequirements2; + PFN_vkGetImageSparseMemoryRequirements2 GetImageSparseMemoryRequirements2; + PFN_vkTrimCommandPool TrimCommandPool; + PFN_vkGetDeviceQueue2 GetDeviceQueue2; + PFN_vkCreateSamplerYcbcrConversion CreateSamplerYcbcrConversion; + PFN_vkDestroySamplerYcbcrConversion DestroySamplerYcbcrConversion; + PFN_vkCreateDescriptorUpdateTemplate CreateDescriptorUpdateTemplate; + PFN_vkDestroyDescriptorUpdateTemplate DestroyDescriptorUpdateTemplate; + PFN_vkUpdateDescriptorSetWithTemplate UpdateDescriptorSetWithTemplate; + PFN_vkGetDescriptorSetLayoutSupport GetDescriptorSetLayoutSupport; + + // ---- VK_KHR_swapchain extension commands + PFN_vkCreateSwapchainKHR CreateSwapchainKHR; + PFN_vkDestroySwapchainKHR DestroySwapchainKHR; + PFN_vkGetSwapchainImagesKHR GetSwapchainImagesKHR; + PFN_vkAcquireNextImageKHR AcquireNextImageKHR; + PFN_vkQueuePresentKHR QueuePresentKHR; + PFN_vkGetDeviceGroupPresentCapabilitiesKHR GetDeviceGroupPresentCapabilitiesKHR; + PFN_vkGetDeviceGroupSurfacePresentModesKHR GetDeviceGroupSurfacePresentModesKHR; + PFN_vkAcquireNextImage2KHR AcquireNextImage2KHR; + + // ---- VK_KHR_display_swapchain extension commands + PFN_vkCreateSharedSwapchainsKHR CreateSharedSwapchainsKHR; + + // ---- VK_KHR_device_group extension commands + PFN_vkGetDeviceGroupPeerMemoryFeaturesKHR GetDeviceGroupPeerMemoryFeaturesKHR; + PFN_vkCmdSetDeviceMaskKHR CmdSetDeviceMaskKHR; + PFN_vkCmdDispatchBaseKHR CmdDispatchBaseKHR; + + // ---- VK_KHR_maintenance1 extension commands + PFN_vkTrimCommandPoolKHR TrimCommandPoolKHR; + + // ---- VK_KHR_external_memory_win32 extension commands +#ifdef VK_USE_PLATFORM_WIN32_KHR + PFN_vkGetMemoryWin32HandleKHR GetMemoryWin32HandleKHR; +#endif // VK_USE_PLATFORM_WIN32_KHR +#ifdef VK_USE_PLATFORM_WIN32_KHR + PFN_vkGetMemoryWin32HandlePropertiesKHR GetMemoryWin32HandlePropertiesKHR; +#endif // VK_USE_PLATFORM_WIN32_KHR + + // ---- VK_KHR_external_memory_fd extension commands + PFN_vkGetMemoryFdKHR GetMemoryFdKHR; + PFN_vkGetMemoryFdPropertiesKHR GetMemoryFdPropertiesKHR; + + // ---- VK_KHR_external_semaphore_win32 extension commands +#ifdef VK_USE_PLATFORM_WIN32_KHR + PFN_vkImportSemaphoreWin32HandleKHR ImportSemaphoreWin32HandleKHR; +#endif // VK_USE_PLATFORM_WIN32_KHR +#ifdef VK_USE_PLATFORM_WIN32_KHR + PFN_vkGetSemaphoreWin32HandleKHR GetSemaphoreWin32HandleKHR; +#endif // VK_USE_PLATFORM_WIN32_KHR + + // ---- VK_KHR_external_semaphore_fd extension commands + PFN_vkImportSemaphoreFdKHR ImportSemaphoreFdKHR; + PFN_vkGetSemaphoreFdKHR GetSemaphoreFdKHR; + + // ---- VK_KHR_push_descriptor extension commands + PFN_vkCmdPushDescriptorSetKHR CmdPushDescriptorSetKHR; + PFN_vkCmdPushDescriptorSetWithTemplateKHR CmdPushDescriptorSetWithTemplateKHR; + + // ---- VK_KHR_descriptor_update_template extension commands + PFN_vkCreateDescriptorUpdateTemplateKHR CreateDescriptorUpdateTemplateKHR; + PFN_vkDestroyDescriptorUpdateTemplateKHR DestroyDescriptorUpdateTemplateKHR; + PFN_vkUpdateDescriptorSetWithTemplateKHR UpdateDescriptorSetWithTemplateKHR; + + // ---- VK_KHR_shared_presentable_image extension commands + PFN_vkGetSwapchainStatusKHR GetSwapchainStatusKHR; + + // ---- VK_KHR_external_fence_win32 extension commands +#ifdef VK_USE_PLATFORM_WIN32_KHR + PFN_vkImportFenceWin32HandleKHR ImportFenceWin32HandleKHR; +#endif // VK_USE_PLATFORM_WIN32_KHR +#ifdef VK_USE_PLATFORM_WIN32_KHR + PFN_vkGetFenceWin32HandleKHR GetFenceWin32HandleKHR; +#endif // VK_USE_PLATFORM_WIN32_KHR + + // ---- VK_KHR_external_fence_fd extension commands + PFN_vkImportFenceFdKHR ImportFenceFdKHR; + PFN_vkGetFenceFdKHR GetFenceFdKHR; + + // ---- VK_KHR_get_memory_requirements2 extension commands + PFN_vkGetImageMemoryRequirements2KHR GetImageMemoryRequirements2KHR; + PFN_vkGetBufferMemoryRequirements2KHR GetBufferMemoryRequirements2KHR; + PFN_vkGetImageSparseMemoryRequirements2KHR GetImageSparseMemoryRequirements2KHR; + + // ---- VK_KHR_sampler_ycbcr_conversion extension commands + PFN_vkCreateSamplerYcbcrConversionKHR CreateSamplerYcbcrConversionKHR; + PFN_vkDestroySamplerYcbcrConversionKHR DestroySamplerYcbcrConversionKHR; + + // ---- VK_KHR_bind_memory2 extension commands + PFN_vkBindBufferMemory2KHR BindBufferMemory2KHR; + PFN_vkBindImageMemory2KHR BindImageMemory2KHR; + + // ---- VK_KHR_maintenance3 extension commands + PFN_vkGetDescriptorSetLayoutSupportKHR GetDescriptorSetLayoutSupportKHR; + + // ---- VK_KHR_draw_indirect_count extension commands + PFN_vkCmdDrawIndirectCountKHR CmdDrawIndirectCountKHR; + PFN_vkCmdDrawIndexedIndirectCountKHR CmdDrawIndexedIndirectCountKHR; + + // ---- VK_EXT_debug_marker extension commands + PFN_vkDebugMarkerSetObjectTagEXT DebugMarkerSetObjectTagEXT; + PFN_vkDebugMarkerSetObjectNameEXT DebugMarkerSetObjectNameEXT; + PFN_vkCmdDebugMarkerBeginEXT CmdDebugMarkerBeginEXT; + PFN_vkCmdDebugMarkerEndEXT CmdDebugMarkerEndEXT; + PFN_vkCmdDebugMarkerInsertEXT CmdDebugMarkerInsertEXT; + + // ---- VK_AMD_draw_indirect_count extension commands + PFN_vkCmdDrawIndirectCountAMD CmdDrawIndirectCountAMD; + PFN_vkCmdDrawIndexedIndirectCountAMD CmdDrawIndexedIndirectCountAMD; + + // ---- VK_AMD_shader_info extension commands + PFN_vkGetShaderInfoAMD GetShaderInfoAMD; + + // ---- VK_NV_external_memory_win32 extension commands +#ifdef VK_USE_PLATFORM_WIN32_KHR + PFN_vkGetMemoryWin32HandleNV GetMemoryWin32HandleNV; +#endif // VK_USE_PLATFORM_WIN32_KHR + + // ---- VK_NVX_device_generated_commands extension commands + PFN_vkCmdProcessCommandsNVX CmdProcessCommandsNVX; + PFN_vkCmdReserveSpaceForCommandsNVX CmdReserveSpaceForCommandsNVX; + PFN_vkCreateIndirectCommandsLayoutNVX CreateIndirectCommandsLayoutNVX; + PFN_vkDestroyIndirectCommandsLayoutNVX DestroyIndirectCommandsLayoutNVX; + PFN_vkCreateObjectTableNVX CreateObjectTableNVX; + PFN_vkDestroyObjectTableNVX DestroyObjectTableNVX; + PFN_vkRegisterObjectsNVX RegisterObjectsNVX; + PFN_vkUnregisterObjectsNVX UnregisterObjectsNVX; + + // ---- VK_NV_clip_space_w_scaling extension commands + PFN_vkCmdSetViewportWScalingNV CmdSetViewportWScalingNV; + + // ---- VK_EXT_display_control extension commands + PFN_vkDisplayPowerControlEXT DisplayPowerControlEXT; + PFN_vkRegisterDeviceEventEXT RegisterDeviceEventEXT; + PFN_vkRegisterDisplayEventEXT RegisterDisplayEventEXT; + PFN_vkGetSwapchainCounterEXT GetSwapchainCounterEXT; + + // ---- VK_GOOGLE_display_timing extension commands + PFN_vkGetRefreshCycleDurationGOOGLE GetRefreshCycleDurationGOOGLE; + PFN_vkGetPastPresentationTimingGOOGLE GetPastPresentationTimingGOOGLE; + + // ---- VK_EXT_discard_rectangles extension commands + PFN_vkCmdSetDiscardRectangleEXT CmdSetDiscardRectangleEXT; + + // ---- VK_EXT_hdr_metadata extension commands + PFN_vkSetHdrMetadataEXT SetHdrMetadataEXT; + + // ---- VK_EXT_debug_utils extension commands + PFN_vkSetDebugUtilsObjectNameEXT SetDebugUtilsObjectNameEXT; + PFN_vkSetDebugUtilsObjectTagEXT SetDebugUtilsObjectTagEXT; + PFN_vkQueueBeginDebugUtilsLabelEXT QueueBeginDebugUtilsLabelEXT; + PFN_vkQueueEndDebugUtilsLabelEXT QueueEndDebugUtilsLabelEXT; + PFN_vkQueueInsertDebugUtilsLabelEXT QueueInsertDebugUtilsLabelEXT; + PFN_vkCmdBeginDebugUtilsLabelEXT CmdBeginDebugUtilsLabelEXT; + PFN_vkCmdEndDebugUtilsLabelEXT CmdEndDebugUtilsLabelEXT; + PFN_vkCmdInsertDebugUtilsLabelEXT CmdInsertDebugUtilsLabelEXT; + + // ---- VK_ANDROID_external_memory_android_hardware_buffer extension commands +#ifdef VK_USE_PLATFORM_ANDROID_KHR + PFN_vkGetAndroidHardwareBufferPropertiesANDROID GetAndroidHardwareBufferPropertiesANDROID; +#endif // VK_USE_PLATFORM_ANDROID_KHR +#ifdef VK_USE_PLATFORM_ANDROID_KHR + PFN_vkGetMemoryAndroidHardwareBufferANDROID GetMemoryAndroidHardwareBufferANDROID; +#endif // VK_USE_PLATFORM_ANDROID_KHR + + // ---- VK_EXT_sample_locations extension commands + PFN_vkCmdSetSampleLocationsEXT CmdSetSampleLocationsEXT; + + // ---- VK_EXT_validation_cache extension commands + PFN_vkCreateValidationCacheEXT CreateValidationCacheEXT; + PFN_vkDestroyValidationCacheEXT DestroyValidationCacheEXT; + PFN_vkMergeValidationCachesEXT MergeValidationCachesEXT; + PFN_vkGetValidationCacheDataEXT GetValidationCacheDataEXT; + + // ---- VK_EXT_external_memory_host extension commands + PFN_vkGetMemoryHostPointerPropertiesEXT GetMemoryHostPointerPropertiesEXT; + + // ---- VK_AMD_buffer_marker extension commands + PFN_vkCmdWriteBufferMarkerAMD CmdWriteBufferMarkerAMD; +} VkLayerDispatchTable; + + diff --git a/src/common/rendering/vulkan/thirdparty/vulkan/vk_platform.h b/libraries/ZVulkan/include/vulkan/vk_platform.h similarity index 100% rename from src/common/rendering/vulkan/thirdparty/vulkan/vk_platform.h rename to libraries/ZVulkan/include/vulkan/vk_platform.h diff --git a/src/common/rendering/vulkan/thirdparty/vulkan/vk_sdk_platform.h b/libraries/ZVulkan/include/vulkan/vk_sdk_platform.h similarity index 100% rename from src/common/rendering/vulkan/thirdparty/vulkan/vk_sdk_platform.h rename to libraries/ZVulkan/include/vulkan/vk_sdk_platform.h diff --git a/src/common/rendering/vulkan/thirdparty/vulkan/vulkan.h b/libraries/ZVulkan/include/vulkan/vulkan.h similarity index 100% rename from src/common/rendering/vulkan/thirdparty/vulkan/vulkan.h rename to libraries/ZVulkan/include/vulkan/vulkan.h diff --git a/src/common/rendering/vulkan/thirdparty/vulkan/vulkan_android.h b/libraries/ZVulkan/include/vulkan/vulkan_android.h similarity index 100% rename from src/common/rendering/vulkan/thirdparty/vulkan/vulkan_android.h rename to libraries/ZVulkan/include/vulkan/vulkan_android.h diff --git a/src/common/rendering/vulkan/thirdparty/vulkan/vulkan_beta.h b/libraries/ZVulkan/include/vulkan/vulkan_beta.h similarity index 100% rename from src/common/rendering/vulkan/thirdparty/vulkan/vulkan_beta.h rename to libraries/ZVulkan/include/vulkan/vulkan_beta.h diff --git a/src/common/rendering/vulkan/thirdparty/vulkan/vulkan_core.h b/libraries/ZVulkan/include/vulkan/vulkan_core.h similarity index 100% rename from src/common/rendering/vulkan/thirdparty/vulkan/vulkan_core.h rename to libraries/ZVulkan/include/vulkan/vulkan_core.h diff --git a/src/common/rendering/vulkan/thirdparty/vulkan/vulkan_directfb.h b/libraries/ZVulkan/include/vulkan/vulkan_directfb.h similarity index 100% rename from src/common/rendering/vulkan/thirdparty/vulkan/vulkan_directfb.h rename to libraries/ZVulkan/include/vulkan/vulkan_directfb.h diff --git a/src/common/rendering/vulkan/thirdparty/vulkan/vulkan_fuchsia.h b/libraries/ZVulkan/include/vulkan/vulkan_fuchsia.h similarity index 100% rename from src/common/rendering/vulkan/thirdparty/vulkan/vulkan_fuchsia.h rename to libraries/ZVulkan/include/vulkan/vulkan_fuchsia.h diff --git a/src/common/rendering/vulkan/thirdparty/vulkan/vulkan_ggp.h b/libraries/ZVulkan/include/vulkan/vulkan_ggp.h similarity index 100% rename from src/common/rendering/vulkan/thirdparty/vulkan/vulkan_ggp.h rename to libraries/ZVulkan/include/vulkan/vulkan_ggp.h diff --git a/src/common/rendering/vulkan/thirdparty/vulkan/vulkan_ios.h b/libraries/ZVulkan/include/vulkan/vulkan_ios.h similarity index 100% rename from src/common/rendering/vulkan/thirdparty/vulkan/vulkan_ios.h rename to libraries/ZVulkan/include/vulkan/vulkan_ios.h diff --git a/src/common/rendering/vulkan/thirdparty/vulkan/vulkan_macos.h b/libraries/ZVulkan/include/vulkan/vulkan_macos.h similarity index 100% rename from src/common/rendering/vulkan/thirdparty/vulkan/vulkan_macos.h rename to libraries/ZVulkan/include/vulkan/vulkan_macos.h diff --git a/src/common/rendering/vulkan/thirdparty/vulkan/vulkan_metal.h b/libraries/ZVulkan/include/vulkan/vulkan_metal.h similarity index 100% rename from src/common/rendering/vulkan/thirdparty/vulkan/vulkan_metal.h rename to libraries/ZVulkan/include/vulkan/vulkan_metal.h diff --git a/libraries/ZVulkan/include/vulkan/vulkan_mir.h b/libraries/ZVulkan/include/vulkan/vulkan_mir.h new file mode 100644 index 0000000000..7d24ed27a3 --- /dev/null +++ b/libraries/ZVulkan/include/vulkan/vulkan_mir.h @@ -0,0 +1,65 @@ +#ifndef VULKAN_MIR_H_ +#define VULKAN_MIR_H_ 1 + +#ifdef __cplusplus +extern "C" { +#endif + +/* +** Copyright (c) 2015-2018 The Khronos Group Inc. +** +** Licensed under the Apache License, Version 2.0 (the "License"); +** you may not use this file except in compliance with the License. +** You may obtain a copy of the License at +** +** http://www.apache.org/licenses/LICENSE-2.0 +** +** Unless required by applicable law or agreed to in writing, software +** distributed under the License is distributed on an "AS IS" BASIS, +** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +** See the License for the specific language governing permissions and +** limitations under the License. +*/ + +/* +** This header is generated from the Khronos Vulkan XML API Registry. +** +*/ + + +#define VK_KHR_mir_surface 1 +#define VK_KHR_MIR_SURFACE_SPEC_VERSION 4 +#define VK_KHR_MIR_SURFACE_EXTENSION_NAME "VK_KHR_mir_surface" + +typedef VkFlags VkMirSurfaceCreateFlagsKHR; + +typedef struct VkMirSurfaceCreateInfoKHR { + VkStructureType sType; + const void* pNext; + VkMirSurfaceCreateFlagsKHR flags; + MirConnection* connection; + MirSurface* mirSurface; +} VkMirSurfaceCreateInfoKHR; + + +typedef VkResult (VKAPI_PTR *PFN_vkCreateMirSurfaceKHR)(VkInstance instance, const VkMirSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); +typedef VkBool32 (VKAPI_PTR *PFN_vkGetPhysicalDeviceMirPresentationSupportKHR)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, MirConnection* connection); + +#ifndef VK_NO_PROTOTYPES +VKAPI_ATTR VkResult VKAPI_CALL vkCreateMirSurfaceKHR( + VkInstance instance, + const VkMirSurfaceCreateInfoKHR* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkSurfaceKHR* pSurface); + +VKAPI_ATTR VkBool32 VKAPI_CALL vkGetPhysicalDeviceMirPresentationSupportKHR( + VkPhysicalDevice physicalDevice, + uint32_t queueFamilyIndex, + MirConnection* connection); +#endif + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/src/common/rendering/vulkan/thirdparty/vulkan/vulkan_screen.h b/libraries/ZVulkan/include/vulkan/vulkan_screen.h similarity index 100% rename from src/common/rendering/vulkan/thirdparty/vulkan/vulkan_screen.h rename to libraries/ZVulkan/include/vulkan/vulkan_screen.h diff --git a/src/common/rendering/vulkan/thirdparty/vulkan/vulkan_vi.h b/libraries/ZVulkan/include/vulkan/vulkan_vi.h similarity index 100% rename from src/common/rendering/vulkan/thirdparty/vulkan/vulkan_vi.h rename to libraries/ZVulkan/include/vulkan/vulkan_vi.h diff --git a/src/common/rendering/vulkan/thirdparty/vulkan/vulkan_wayland.h b/libraries/ZVulkan/include/vulkan/vulkan_wayland.h similarity index 100% rename from src/common/rendering/vulkan/thirdparty/vulkan/vulkan_wayland.h rename to libraries/ZVulkan/include/vulkan/vulkan_wayland.h diff --git a/src/common/rendering/vulkan/thirdparty/vulkan/vulkan_win32.h b/libraries/ZVulkan/include/vulkan/vulkan_win32.h similarity index 100% rename from src/common/rendering/vulkan/thirdparty/vulkan/vulkan_win32.h rename to libraries/ZVulkan/include/vulkan/vulkan_win32.h diff --git a/src/common/rendering/vulkan/thirdparty/vulkan/vulkan_xcb.h b/libraries/ZVulkan/include/vulkan/vulkan_xcb.h similarity index 100% rename from src/common/rendering/vulkan/thirdparty/vulkan/vulkan_xcb.h rename to libraries/ZVulkan/include/vulkan/vulkan_xcb.h diff --git a/src/common/rendering/vulkan/thirdparty/vulkan/vulkan_xlib.h b/libraries/ZVulkan/include/vulkan/vulkan_xlib.h similarity index 100% rename from src/common/rendering/vulkan/thirdparty/vulkan/vulkan_xlib.h rename to libraries/ZVulkan/include/vulkan/vulkan_xlib.h diff --git a/src/common/rendering/vulkan/thirdparty/vulkan/vulkan_xlib_xrandr.h b/libraries/ZVulkan/include/vulkan/vulkan_xlib_xrandr.h similarity index 100% rename from src/common/rendering/vulkan/thirdparty/vulkan/vulkan_xlib_xrandr.h rename to libraries/ZVulkan/include/vulkan/vulkan_xlib_xrandr.h diff --git a/src/common/rendering/vulkan/thirdparty/vk_mem_alloc/vk_mem_alloc.h b/libraries/ZVulkan/include/zvulkan/vk_mem_alloc/vk_mem_alloc.h similarity index 100% rename from src/common/rendering/vulkan/thirdparty/vk_mem_alloc/vk_mem_alloc.h rename to libraries/ZVulkan/include/zvulkan/vk_mem_alloc/vk_mem_alloc.h diff --git a/src/common/rendering/vulkan/thirdparty/volk/volk.h b/libraries/ZVulkan/include/zvulkan/volk/volk.h similarity index 100% rename from src/common/rendering/vulkan/thirdparty/volk/volk.h rename to libraries/ZVulkan/include/zvulkan/volk/volk.h diff --git a/src/common/rendering/vulkan/system/vk_builders.h b/libraries/ZVulkan/include/zvulkan/vulkanbuilders.h similarity index 78% rename from src/common/rendering/vulkan/system/vk_builders.h rename to libraries/ZVulkan/include/zvulkan/vulkanbuilders.h index db3528bb51..780711ec9f 100644 --- a/src/common/rendering/vulkan/system/vk_builders.h +++ b/libraries/ZVulkan/include/zvulkan/vulkanbuilders.h @@ -1,8 +1,123 @@ #pragma once -#include "vk_objects.h" -#include "zstring.h" +#include "vulkanobjects.h" #include +#include + +class VulkanCompatibleDevice; + +class VulkanInstanceBuilder +{ +public: + VulkanInstanceBuilder(); + + VulkanInstanceBuilder& ApiVersionsToTry(const std::vector& versions); + VulkanInstanceBuilder& RequireExtension(const std::string& extensionName); + VulkanInstanceBuilder& RequireSurfaceExtensions(bool enable = true); + VulkanInstanceBuilder& OptionalExtension(const std::string& extensionName); + VulkanInstanceBuilder& DebugLayer(bool enable = true); + + std::shared_ptr Create(); + +private: + std::vector apiVersionsToTry; + std::set requiredExtensions; + std::set optionalExtensions; + bool debugLayer = false; +}; + +class VulkanSurfaceBuilder +{ +public: + VulkanSurfaceBuilder(); + +#ifdef VK_USE_PLATFORM_WIN32_KHR + VulkanSurfaceBuilder& Win32Window(HWND handle); +#elif defined(VK_USE_PLATFORM_XLIB_KHR) + VulkanSurfaceBuilder& X11Window(Display* disp, Window wind); +#endif + + std::shared_ptr Create(std::shared_ptr instance); + +private: +#ifdef VK_USE_PLATFORM_WIN32_KHR + HWND hwnd = {}; +#elif defined(VK_USE_PLATFORM_XLIB_KHR) + Display* disp = nullptr; + Window wind = {}; +#endif +}; + +class VulkanDeviceBuilder +{ +public: + VulkanDeviceBuilder(); + + VulkanDeviceBuilder& RequireExtension(const std::string& extensionName); + VulkanDeviceBuilder& OptionalExtension(const std::string& extensionName); + VulkanDeviceBuilder& OptionalRayQuery(); + VulkanDeviceBuilder& OptionalDescriptorIndexing(); + VulkanDeviceBuilder& Surface(std::shared_ptr surface); + VulkanDeviceBuilder& SelectDevice(int index); + + std::vector FindDevices(const std::shared_ptr& instance); + std::shared_ptr Create(std::shared_ptr instance); + +private: + std::set requiredDeviceExtensions; + std::set optionalDeviceExtensions; + std::shared_ptr surface; + int deviceIndex = 0; +}; + +class VulkanSwapChainBuilder +{ +public: + VulkanSwapChainBuilder(); + + std::shared_ptr Create(VulkanDevice* device); +}; + +class CommandPoolBuilder +{ +public: + CommandPoolBuilder(); + + CommandPoolBuilder& QueueFamily(int index); + CommandPoolBuilder& DebugName(const char* name) { debugName = name; return *this; } + + std::unique_ptr Create(VulkanDevice* device); + +private: + const char* debugName = nullptr; + int queueFamilyIndex = -1; +}; + +class SemaphoreBuilder +{ +public: + SemaphoreBuilder(); + + SemaphoreBuilder& DebugName(const char* name) { debugName = name; return *this; } + + std::unique_ptr Create(VulkanDevice* device); + +private: + const char* debugName = nullptr; +}; + +class FenceBuilder +{ +public: + FenceBuilder(); + + FenceBuilder& DebugName(const char* name) { debugName = name; return *this; } + + std::unique_ptr Create(VulkanDevice* device); + +private: + const char* debugName = nullptr; +}; class ImageBuilder { @@ -55,6 +170,7 @@ public: SamplerBuilder& MagFilter(VkFilter magFilter); SamplerBuilder& MipmapMode(VkSamplerMipmapMode mode); SamplerBuilder& Anisotropy(float maxAnisotropy); + SamplerBuilder& MipLodBias(float bias); SamplerBuilder& MaxLod(float value); SamplerBuilder& DebugName(const char* name) { debugName = name; return *this; } @@ -88,14 +204,17 @@ class ShaderBuilder public: ShaderBuilder(); - ShaderBuilder& VertexShader(const FString &code); - ShaderBuilder& FragmentShader(const FString &code); + static void Init(); + static void Deinit(); + + ShaderBuilder& VertexShader(const std::string &code); + ShaderBuilder& FragmentShader(const std::string&code); ShaderBuilder& DebugName(const char* name) { debugName = name; return *this; } std::unique_ptr Create(const char *shadername, VulkanDevice *device); private: - FString code; + std::string code; int stage = 0; const char* debugName = nullptr; }; @@ -139,14 +258,17 @@ class DescriptorSetLayoutBuilder public: DescriptorSetLayoutBuilder(); - DescriptorSetLayoutBuilder& AddBinding(int binding, VkDescriptorType type, int arrayCount, VkShaderStageFlags stageFlags); + DescriptorSetLayoutBuilder& Flags(VkDescriptorSetLayoutCreateFlags flags); + DescriptorSetLayoutBuilder& AddBinding(int binding, VkDescriptorType type, int arrayCount, VkShaderStageFlags stageFlags, VkDescriptorBindingFlags flags = 0); DescriptorSetLayoutBuilder& DebugName(const char* name) { debugName = name; return *this; } std::unique_ptr Create(VulkanDevice *device); private: - VkDescriptorSetLayoutCreateInfo layoutInfo = {}; - TArray bindings; + VkDescriptorSetLayoutCreateInfo layoutInfo = { VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO }; + VkDescriptorSetLayoutBindingFlagsCreateInfoEXT bindingFlagsInfo = { VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_BINDING_FLAGS_CREATE_INFO_EXT }; + std::vector bindings; + std::vector bindingFlags; const char* debugName = nullptr; }; @@ -155,6 +277,7 @@ class DescriptorPoolBuilder public: DescriptorPoolBuilder(); + DescriptorPoolBuilder& Flags(VkDescriptorPoolCreateFlags flags); DescriptorPoolBuilder& MaxSets(int value); DescriptorPoolBuilder& AddPoolSize(VkDescriptorType type, int count); DescriptorPoolBuilder& DebugName(const char* name) { debugName = name; return *this; } @@ -201,8 +324,6 @@ private: const char* debugName = nullptr; }; -union FRenderStyle; - class GraphicsPipelineBuilder { public: @@ -226,7 +347,6 @@ public: GraphicsPipelineBuilder& AdditiveBlendMode(); GraphicsPipelineBuilder& AlphaBlendMode(); - GraphicsPipelineBuilder& BlendMode(const FRenderStyle &style); GraphicsPipelineBuilder& BlendMode(VkBlendOp op, VkBlendFactor src, VkBlendFactor dst); GraphicsPipelineBuilder& SubpassColorAttachmentCount(int count); @@ -364,6 +484,7 @@ public: WriteDescriptors& AddBuffer(VulkanDescriptorSet *descriptorSet, int binding, VkDescriptorType type, VulkanBuffer *buffer, size_t offset, size_t range); WriteDescriptors& AddStorageImage(VulkanDescriptorSet *descriptorSet, int binding, VulkanImageView *view, VkImageLayout imageLayout); WriteDescriptors& AddCombinedImageSampler(VulkanDescriptorSet *descriptorSet, int binding, VulkanImageView *view, VulkanSampler *sampler, VkImageLayout imageLayout); + WriteDescriptors& AddCombinedImageSampler(VulkanDescriptorSet* descriptorSet, int binding, int arrayIndex, VulkanImageView* view, VulkanSampler* sampler, VkImageLayout imageLayout); WriteDescriptors& AddAccelerationStructure(VulkanDescriptorSet* descriptorSet, int binding, VulkanAccelerationStructure* accelStruct); void Execute(VulkanDevice *device); diff --git a/libraries/ZVulkan/include/zvulkan/vulkancompatibledevice.h b/libraries/ZVulkan/include/zvulkan/vulkancompatibledevice.h new file mode 100644 index 0000000000..9a2cd5e424 --- /dev/null +++ b/libraries/ZVulkan/include/zvulkan/vulkancompatibledevice.h @@ -0,0 +1,19 @@ +#pragma once + +#include "vulkaninstance.h" + +class VulkanSurface; + +class VulkanCompatibleDevice +{ +public: + VulkanPhysicalDevice* Device = nullptr; + + int GraphicsFamily = -1; + int PresentFamily = -1; + + bool GraphicsTimeQueries = false; + + std::set EnabledDeviceExtensions; + VulkanDeviceFeatures EnabledFeatures; +}; diff --git a/libraries/ZVulkan/include/zvulkan/vulkandevice.h b/libraries/ZVulkan/include/zvulkan/vulkandevice.h new file mode 100644 index 0000000000..48c1a1f593 --- /dev/null +++ b/libraries/ZVulkan/include/zvulkan/vulkandevice.h @@ -0,0 +1,52 @@ +#pragma once + +#include "vulkaninstance.h" + +#include +#include +#include +#include +#include + +class VulkanSwapChain; +class VulkanSemaphore; +class VulkanFence; +class VulkanPhysicalDevice; +class VulkanSurface; +class VulkanCompatibleDevice; + +class VulkanDevice +{ +public: + VulkanDevice(std::shared_ptr instance, std::shared_ptr surface, const VulkanCompatibleDevice& selectedDevice); + ~VulkanDevice(); + + std::set EnabledDeviceExtensions; + VulkanDeviceFeatures EnabledFeatures; + + VulkanPhysicalDevice PhysicalDevice; + + std::shared_ptr Instance; + std::shared_ptr Surface; + + VkDevice device = VK_NULL_HANDLE; + VmaAllocator allocator = VK_NULL_HANDLE; + + VkQueue GraphicsQueue = VK_NULL_HANDLE; + VkQueue PresentQueue = VK_NULL_HANDLE; + + int GraphicsFamily = -1; + int PresentFamily = -1; + bool GraphicsTimeQueries = false; + + bool SupportsDeviceExtension(const char* ext) const; + + void SetObjectName(const char* name, uint64_t handle, VkObjectType type); + +private: + bool DebugLayerActive = false; + + void CreateDevice(); + void CreateAllocator(); + void ReleaseResources(); +}; diff --git a/libraries/ZVulkan/include/zvulkan/vulkaninstance.h b/libraries/ZVulkan/include/zvulkan/vulkaninstance.h new file mode 100644 index 0000000000..d9fc2618b4 --- /dev/null +++ b/libraries/ZVulkan/include/zvulkan/vulkaninstance.h @@ -0,0 +1,96 @@ +#pragma once + +#if defined(_WIN32) +#define VK_USE_PLATFORM_WIN32_KHR +#elif defined(__APPLE__) +#define VK_USE_PLATFORM_MACOS_MVK +#define VK_USE_PLATFORM_METAL_EXT +#else +#define VK_USE_PLATFORM_XLIB_KHR +#endif + +#include "volk/volk.h" +#include "vk_mem_alloc/vk_mem_alloc.h" + +#if defined(_WIN32) +#undef min +#undef max +#endif + +#include +#include +#include +#include +#include + +class VulkanDeviceFeatures +{ +public: + VkPhysicalDeviceFeatures Features = {}; + VkPhysicalDeviceBufferDeviceAddressFeatures BufferDeviceAddress = { VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES }; + VkPhysicalDeviceAccelerationStructureFeaturesKHR AccelerationStructure = { VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ACCELERATION_STRUCTURE_FEATURES_KHR }; + VkPhysicalDeviceRayQueryFeaturesKHR RayQuery = { VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_QUERY_FEATURES_KHR }; + VkPhysicalDeviceDescriptorIndexingFeatures DescriptorIndexing = { VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_FEATURES_EXT }; +}; + +class VulkanPhysicalDevice +{ +public: + VkPhysicalDevice Device = VK_NULL_HANDLE; + std::vector Extensions; + std::vector QueueFamilies; + VkPhysicalDeviceProperties Properties = {}; + VkPhysicalDeviceMemoryProperties MemoryProperties = {}; + VulkanDeviceFeatures Features; +}; + +class VulkanInstance +{ +public: + VulkanInstance(std::vector apiVersionsToTry, std::set requiredExtensions, std::set optionalExtensions, bool wantDebugLayer); + ~VulkanInstance(); + + std::vector ApiVersionsToTry; + + std::set RequiredExtensions; + std::set OptionalExtensions; + + std::vector AvailableLayers; + std::vector AvailableExtensions; + + std::set EnabledValidationLayers; + std::set EnabledExtensions; + + std::vector PhysicalDevices; + + uint32_t ApiVersion = {}; + VkInstance Instance = VK_NULL_HANDLE; + + bool DebugLayerActive = false; + +private: + bool WantDebugLayer = false; + VkDebugUtilsMessengerEXT debugMessenger = VK_NULL_HANDLE; + + void CreateInstance(); + void ReleaseResources(); + + static void InitVolk(); + static std::vector GetAvailableLayers(); + static std::vector GetExtensions(); + static std::vector GetPhysicalDevices(VkInstance instance, uint32_t apiVersion); + + static VKAPI_ATTR VkBool32 VKAPI_CALL DebugCallback(VkDebugUtilsMessageSeverityFlagBitsEXT messageSeverity, VkDebugUtilsMessageTypeFlagsEXT messageType, const VkDebugUtilsMessengerCallbackDataEXT* pCallbackData, void* pUserData); + static std::vector SplitString(const std::string& s, const std::string& seperator); +}; + +std::string VkResultToString(VkResult result); + +void VulkanPrintLog(const char* typestr, const std::string& msg); +void VulkanError(const char* text); + +inline void CheckVulkanError(VkResult result, const char* text) +{ + if (result >= VK_SUCCESS) return; + VulkanError((text + std::string(": ") + VkResultToString(result)).c_str()); +} diff --git a/src/common/rendering/vulkan/system/vk_objects.h b/libraries/ZVulkan/include/zvulkan/vulkanobjects.h similarity index 87% rename from src/common/rendering/vulkan/system/vk_objects.h rename to libraries/ZVulkan/include/zvulkan/vulkanobjects.h index bca47f24fd..f4934d942d 100644 --- a/src/common/rendering/vulkan/system/vk_objects.h +++ b/libraries/ZVulkan/include/zvulkan/vulkanobjects.h @@ -1,10 +1,10 @@ #pragma once -#include "vk_device.h" -#include "engineerrors.h" +#include "vulkandevice.h" class VulkanCommandPool; class VulkanDescriptorPool; +class VulkanCommandBuffer; class VulkanSemaphore { @@ -12,7 +12,7 @@ public: VulkanSemaphore(VulkanDevice *device); ~VulkanSemaphore(); - void SetDebugName(const char *name) { device->SetDebugObjectName(name, (uint64_t)semaphore, VK_OBJECT_TYPE_SEMAPHORE); } + void SetDebugName(const char *name) { device->SetObjectName(name, (uint64_t)semaphore, VK_OBJECT_TYPE_SEMAPHORE); } VulkanDevice *device = nullptr; VkSemaphore semaphore = VK_NULL_HANDLE; @@ -28,7 +28,7 @@ public: VulkanFence(VulkanDevice *device); ~VulkanFence(); - void SetDebugName(const char *name) { device->SetDebugObjectName(name, (uint64_t)fence, VK_OBJECT_TYPE_FENCE); } + void SetDebugName(const char *name) { device->SetObjectName(name, (uint64_t)fence, VK_OBJECT_TYPE_FENCE); } VulkanDevice *device = nullptr; VkFence fence = VK_NULL_HANDLE; @@ -52,10 +52,10 @@ public: } #ifdef _DEBUG - void SetDebugName(const char* name) { debugName = name; device->SetDebugObjectName(name, (uint64_t)buffer, VK_OBJECT_TYPE_BUFFER); } + void SetDebugName(const char* name) { debugName = name; device->SetObjectName(name, (uint64_t)buffer, VK_OBJECT_TYPE_BUFFER); } std::string debugName; #else - void SetDebugName(const char* name) { device->SetDebugObjectName(name, (uint64_t)buffer, VK_OBJECT_TYPE_BUFFER); } + void SetDebugName(const char* name) { device->SetObjectName(name, (uint64_t)buffer, VK_OBJECT_TYPE_BUFFER); } #endif VulkanDevice *device = nullptr; @@ -78,7 +78,7 @@ public: VulkanFramebuffer(VulkanDevice *device, VkFramebuffer framebuffer); ~VulkanFramebuffer(); - void SetDebugName(const char *name) { device->SetDebugObjectName(name, (uint64_t)framebuffer, VK_OBJECT_TYPE_FRAMEBUFFER); } + void SetDebugName(const char *name) { device->SetObjectName(name, (uint64_t)framebuffer, VK_OBJECT_TYPE_FRAMEBUFFER); } VulkanDevice *device; VkFramebuffer framebuffer; @@ -94,7 +94,7 @@ public: VulkanImage(VulkanDevice *device, VkImage image, VmaAllocation allocation, int width, int height, int mipLevels, int layerCount); ~VulkanImage(); - void SetDebugName(const char *name) { device->SetDebugObjectName(name, (uint64_t)image, VK_OBJECT_TYPE_IMAGE); } + void SetDebugName(const char *name) { device->SetObjectName(name, (uint64_t)image, VK_OBJECT_TYPE_IMAGE); } VkImage image = VK_NULL_HANDLE; int width = 0; @@ -119,7 +119,7 @@ public: VulkanImageView(VulkanDevice *device, VkImageView view); ~VulkanImageView(); - void SetDebugName(const char *name) { device->SetDebugObjectName(name, (uint64_t)view, VK_OBJECT_TYPE_IMAGE_VIEW); } + void SetDebugName(const char *name) { device->SetObjectName(name, (uint64_t)view, VK_OBJECT_TYPE_IMAGE_VIEW); } VkImageView view = VK_NULL_HANDLE; @@ -136,7 +136,7 @@ public: VulkanSampler(VulkanDevice *device, VkSampler sampler); ~VulkanSampler(); - void SetDebugName(const char *name) { device->SetDebugObjectName(name, (uint64_t)sampler, VK_OBJECT_TYPE_SAMPLER); } + void SetDebugName(const char *name) { device->SetObjectName(name, (uint64_t)sampler, VK_OBJECT_TYPE_SAMPLER); } VkSampler sampler = VK_NULL_HANDLE; @@ -153,7 +153,7 @@ public: VulkanShader(VulkanDevice *device, VkShaderModule module); ~VulkanShader(); - void SetDebugName(const char *name) { device->SetDebugObjectName(name, (uint64_t)module, VK_OBJECT_TYPE_SHADER_MODULE); } + void SetDebugName(const char *name) { device->SetObjectName(name, (uint64_t)module, VK_OBJECT_TYPE_SHADER_MODULE); } VkShaderModule module = VK_NULL_HANDLE; @@ -170,7 +170,7 @@ public: VulkanDescriptorSetLayout(VulkanDevice *device, VkDescriptorSetLayout layout); ~VulkanDescriptorSetLayout(); - void SetDebugName(const char *name) { device->SetDebugObjectName(name, (uint64_t)layout, VK_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT); } + void SetDebugName(const char *name) { device->SetObjectName(name, (uint64_t)layout, VK_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT); } VulkanDevice *device; VkDescriptorSetLayout layout; @@ -187,10 +187,10 @@ public: ~VulkanDescriptorSet(); #ifdef _DEBUG - void SetDebugName(const char* name) { debugName = name; device->SetDebugObjectName(name, (uint64_t)set, VK_OBJECT_TYPE_DESCRIPTOR_SET); } + void SetDebugName(const char* name) { debugName = name; device->SetObjectName(name, (uint64_t)set, VK_OBJECT_TYPE_DESCRIPTOR_SET); } std::string debugName; #else - void SetDebugName(const char* name) { device->SetDebugObjectName(name, (uint64_t)set, VK_OBJECT_TYPE_DESCRIPTOR_SET); } + void SetDebugName(const char* name) { device->SetObjectName(name, (uint64_t)set, VK_OBJECT_TYPE_DESCRIPTOR_SET); } #endif VulkanDevice *device; @@ -209,19 +209,25 @@ public: ~VulkanDescriptorPool(); #ifdef _DEBUG - void SetDebugName(const char* name) { debugName = name; device->SetDebugObjectName(name, (uint64_t)pool, VK_OBJECT_TYPE_DESCRIPTOR_POOL); } + void SetDebugName(const char* name) { debugName = name; device->SetObjectName(name, (uint64_t)pool, VK_OBJECT_TYPE_DESCRIPTOR_POOL); } std::string debugName; #else - void SetDebugName(const char* name) { device->SetDebugObjectName(name, (uint64_t)pool, VK_OBJECT_TYPE_DESCRIPTOR_POOL); } + void SetDebugName(const char* name) { device->SetObjectName(name, (uint64_t)pool, VK_OBJECT_TYPE_DESCRIPTOR_POOL); } #endif std::unique_ptr tryAllocate(VulkanDescriptorSetLayout *layout); + std::unique_ptr tryAllocate(VulkanDescriptorSetLayout* layout, uint32_t bindlessCount); std::unique_ptr allocate(VulkanDescriptorSetLayout *layout); + std::unique_ptr allocate(VulkanDescriptorSetLayout* layout, uint32_t bindlessCount); VulkanDevice *device; VkDescriptorPool pool; private: + enum class AllocType { TryAllocate, AlwaysAllocate }; + std::unique_ptr allocate(VulkanDescriptorSetLayout* layout, AllocType allocType); + std::unique_ptr allocate(VulkanDescriptorSetLayout* layout, uint32_t bindlessCount, AllocType allocType); + VulkanDescriptorPool(const VulkanDescriptorPool &) = delete; VulkanDescriptorPool &operator=(const VulkanDescriptorPool &) = delete; }; @@ -232,7 +238,7 @@ public: VulkanQueryPool(VulkanDevice *device, VkQueryPool pool); ~VulkanQueryPool(); - void SetDebugName(const char *name) { device->SetDebugObjectName(name, (uint64_t)pool, VK_OBJECT_TYPE_QUERY_POOL); } + void SetDebugName(const char *name) { device->SetObjectName(name, (uint64_t)pool, VK_OBJECT_TYPE_QUERY_POOL); } bool getResults(uint32_t firstQuery, uint32_t queryCount, size_t dataSize, void *data, VkDeviceSize stride, VkQueryResultFlags flags); @@ -257,7 +263,7 @@ public: return vkGetAccelerationStructureDeviceAddressKHR(device->device, &addressInfo); } - void SetDebugName(const char* name) { device->SetDebugObjectName(name, (uint64_t)accelstruct, VK_OBJECT_TYPE_ACCELERATION_STRUCTURE_KHR); } + void SetDebugName(const char* name) { device->SetObjectName(name, (uint64_t)accelstruct, VK_OBJECT_TYPE_ACCELERATION_STRUCTURE_KHR); } VulkanDevice* device; VkAccelerationStructureKHR accelstruct; @@ -273,7 +279,7 @@ public: VulkanPipeline(VulkanDevice *device, VkPipeline pipeline); ~VulkanPipeline(); - void SetDebugName(const char *name) { device->SetDebugObjectName(name, (uint64_t)pipeline, VK_OBJECT_TYPE_PIPELINE); } + void SetDebugName(const char *name) { device->SetObjectName(name, (uint64_t)pipeline, VK_OBJECT_TYPE_PIPELINE); } VulkanDevice *device; VkPipeline pipeline; @@ -289,7 +295,7 @@ public: VulkanPipelineLayout(VulkanDevice *device, VkPipelineLayout layout); ~VulkanPipelineLayout(); - void SetDebugName(const char *name) { device->SetDebugObjectName(name, (uint64_t)layout, VK_OBJECT_TYPE_PIPELINE_LAYOUT); } + void SetDebugName(const char *name) { device->SetObjectName(name, (uint64_t)layout, VK_OBJECT_TYPE_PIPELINE_LAYOUT); } VulkanDevice *device; VkPipelineLayout layout; @@ -305,7 +311,7 @@ public: VulkanRenderPass(VulkanDevice *device, VkRenderPass renderPass); ~VulkanRenderPass(); - void SetDebugName(const char *name) { device->SetDebugObjectName(name, (uint64_t)renderPass, VK_OBJECT_TYPE_RENDER_PASS); } + void SetDebugName(const char *name) { device->SetObjectName(name, (uint64_t)renderPass, VK_OBJECT_TYPE_RENDER_PASS); } VulkanDevice *device; VkRenderPass renderPass; @@ -320,13 +326,15 @@ class RenderPassBegin public: RenderPassBegin(); - void setRenderPass(VulkanRenderPass *renderpass); - void setRenderArea(int x, int y, int width, int height); - void setFramebuffer(VulkanFramebuffer *framebuffer); - void addClearColor(float r, float g, float b, float a); - void addClearDepth(float value); - void addClearStencil(int value); - void addClearDepthStencil(float depthValue, int stencilValue); + RenderPassBegin& RenderPass(VulkanRenderPass* renderpass); + RenderPassBegin& RenderArea(int x, int y, int width, int height); + RenderPassBegin& Framebuffer(VulkanFramebuffer* framebuffer); + RenderPassBegin& AddClearColor(float r, float g, float b, float a); + RenderPassBegin& AddClearDepth(float value); + RenderPassBegin& AddClearStencil(int value); + RenderPassBegin& AddClearDepthStencil(float depthValue, int stencilValue); + + void Execute(VulkanCommandBuffer* cmdbuffer, VkSubpassContents contents = VK_SUBPASS_CONTENTS_INLINE); VkRenderPassBeginInfo renderPassInfo = {}; @@ -421,7 +429,7 @@ public: VulkanCommandPool(VulkanDevice *device, int queueFamilyIndex); ~VulkanCommandPool(); - void SetDebugName(const char *name) { device->SetDebugObjectName(name, (uint64_t)pool, VK_OBJECT_TYPE_COMMAND_POOL); } + void SetDebugName(const char *name) { device->SetObjectName(name, (uint64_t)pool, VK_OBJECT_TYPE_COMMAND_POOL); } std::unique_ptr createBuffer(); @@ -519,35 +527,39 @@ inline RenderPassBegin::RenderPassBegin() renderPassInfo.sType = VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO; } -inline void RenderPassBegin::setRenderPass(VulkanRenderPass *renderPass) +inline RenderPassBegin& RenderPassBegin::RenderPass(VulkanRenderPass* renderPass) { renderPassInfo.renderPass = renderPass->renderPass; + return *this; } -inline void RenderPassBegin::setRenderArea(int x, int y, int width, int height) +inline RenderPassBegin& RenderPassBegin::RenderArea(int x, int y, int width, int height) { renderPassInfo.renderArea.offset.x = x; renderPassInfo.renderArea.offset.y = y; renderPassInfo.renderArea.extent.width = width; renderPassInfo.renderArea.extent.height = height; + return *this; } -inline void RenderPassBegin::setFramebuffer(VulkanFramebuffer *framebuffer) +inline RenderPassBegin& RenderPassBegin::Framebuffer(VulkanFramebuffer* framebuffer) { renderPassInfo.framebuffer = framebuffer->framebuffer; + return *this; } -inline void RenderPassBegin::addClearColor(float r, float g, float b, float a) +inline RenderPassBegin& RenderPassBegin::AddClearColor(float r, float g, float b, float a) { VkClearValue clearValue = { }; - clearValue.color = { {r, g, b, a} }; + clearValue.color = { r, g, b, a }; clearValues.push_back(clearValue); renderPassInfo.clearValueCount = (uint32_t)clearValues.size(); renderPassInfo.pClearValues = clearValues.data(); + return *this; } -inline void RenderPassBegin::addClearDepth(float value) +inline RenderPassBegin& RenderPassBegin::AddClearDepth(float value) { VkClearValue clearValue = { }; clearValue.depthStencil.depth = value; @@ -555,9 +567,10 @@ inline void RenderPassBegin::addClearDepth(float value) renderPassInfo.clearValueCount = (uint32_t)clearValues.size(); renderPassInfo.pClearValues = clearValues.data(); + return *this; } -inline void RenderPassBegin::addClearStencil(int value) +inline RenderPassBegin& RenderPassBegin::AddClearStencil(int value) { VkClearValue clearValue = { }; clearValue.depthStencil.stencil = value; @@ -565,9 +578,10 @@ inline void RenderPassBegin::addClearStencil(int value) renderPassInfo.clearValueCount = (uint32_t)clearValues.size(); renderPassInfo.pClearValues = clearValues.data(); + return *this; } -inline void RenderPassBegin::addClearDepthStencil(float depthValue, int stencilValue) +inline RenderPassBegin& RenderPassBegin::AddClearDepthStencil(float depthValue, int stencilValue) { VkClearValue clearValue = { }; clearValue.depthStencil.depth = depthValue; @@ -576,6 +590,12 @@ inline void RenderPassBegin::addClearDepthStencil(float depthValue, int stencilV renderPassInfo.clearValueCount = (uint32_t)clearValues.size(); renderPassInfo.pClearValues = clearValues.data(); + return *this; +} + +inline void RenderPassBegin::Execute(VulkanCommandBuffer* cmdbuffer, VkSubpassContents contents) +{ + cmdbuffer->beginRenderPass(&renderPassInfo, contents); } ///////////////////////////////////////////////////////////////////////////// @@ -945,7 +965,7 @@ inline void VulkanCommandBuffer::writeAccelerationStructuresProperties(uint32_t inline void VulkanCommandBuffer::SetDebugName(const char *name) { - pool->device->SetDebugObjectName(name, (uint64_t)buffer, VK_OBJECT_TYPE_COMMAND_BUFFER); + pool->device->SetObjectName(name, (uint64_t)buffer, VK_OBJECT_TYPE_COMMAND_BUFFER); } ///////////////////////////////////////////////////////////////////////////// @@ -992,35 +1012,60 @@ inline VulkanDescriptorPool::~VulkanDescriptorPool() vkDestroyDescriptorPool(device->device, pool, nullptr); } -inline std::unique_ptr VulkanDescriptorPool::tryAllocate(VulkanDescriptorSetLayout *layout) +inline std::unique_ptr VulkanDescriptorPool::allocate(VulkanDescriptorSetLayout* layout, AllocType allocType) { - VkDescriptorSetAllocateInfo allocInfo = {}; - allocInfo.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO; + VkDescriptorSetAllocateInfo allocInfo = { VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO }; allocInfo.descriptorPool = pool; allocInfo.descriptorSetCount = 1; allocInfo.pSetLayouts = &layout->layout; VkDescriptorSet descriptorSet; VkResult result = vkAllocateDescriptorSets(device->device, &allocInfo, &descriptorSet); - if (result != VK_SUCCESS) + if (allocType == AllocType::TryAllocate && result != VK_SUCCESS) return nullptr; - + else + CheckVulkanError(result, "Could not allocate descriptor sets"); return std::make_unique(device, this, descriptorSet); } +inline std::unique_ptr VulkanDescriptorPool::allocate(VulkanDescriptorSetLayout* layout, uint32_t bindlessCount, AllocType allocType) +{ + VkDescriptorSetAllocateInfo allocInfo = { VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO }; + VkDescriptorSetVariableDescriptorCountAllocateInfoEXT countInfo{ VK_STRUCTURE_TYPE_DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_ALLOCATE_INFO_EXT }; + allocInfo.descriptorPool = pool; + allocInfo.descriptorSetCount = 1; + allocInfo.pSetLayouts = &layout->layout; + allocInfo.pNext = &countInfo; + countInfo.descriptorSetCount = 1; + countInfo.pDescriptorCounts = &bindlessCount; + + VkDescriptorSet descriptorSet; + VkResult result = vkAllocateDescriptorSets(device->device, &allocInfo, &descriptorSet); + if (allocType == AllocType::TryAllocate && result != VK_SUCCESS) + return nullptr; + else + CheckVulkanError(result, "Could not allocate descriptor sets"); + return std::make_unique(device, this, descriptorSet); +} + +inline std::unique_ptr VulkanDescriptorPool::tryAllocate(VulkanDescriptorSetLayout *layout) +{ + return allocate(layout, AllocType::TryAllocate); +} + inline std::unique_ptr VulkanDescriptorPool::allocate(VulkanDescriptorSetLayout *layout) { - VkDescriptorSetAllocateInfo allocInfo = {}; - allocInfo.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO; - allocInfo.descriptorPool = pool; - allocInfo.descriptorSetCount = 1; - allocInfo.pSetLayouts = &layout->layout; + return allocate(layout, AllocType::AlwaysAllocate); +} - VkDescriptorSet descriptorSet; - VkResult result = vkAllocateDescriptorSets(device->device, &allocInfo, &descriptorSet); - CheckVulkanError(result, "Could not allocate descriptor sets"); +inline std::unique_ptr VulkanDescriptorPool::tryAllocate(VulkanDescriptorSetLayout* layout, uint32_t bindlessCount) +{ + return allocate(layout, bindlessCount, AllocType::TryAllocate); +} - return std::make_unique(device, this, descriptorSet); +inline std::unique_ptr VulkanDescriptorPool::allocate(VulkanDescriptorSetLayout* layout, uint32_t bindlessCount) +{ + return allocate(layout, bindlessCount, AllocType::AlwaysAllocate); } ///////////////////////////////////////////////////////////////////////////// @@ -1060,7 +1105,8 @@ inline VulkanImage::VulkanImage(VulkanDevice *device, VkImage image, VmaAllocati inline VulkanImage::~VulkanImage() { - vmaDestroyImage(device->allocator, image, allocation); + if (allocation) + vmaDestroyImage(device->allocator, image, allocation); } inline void *VulkanImage::Map(size_t offset, size_t size) diff --git a/libraries/ZVulkan/include/zvulkan/vulkansurface.h b/libraries/ZVulkan/include/zvulkan/vulkansurface.h new file mode 100644 index 0000000000..64f48b6174 --- /dev/null +++ b/libraries/ZVulkan/include/zvulkan/vulkansurface.h @@ -0,0 +1,30 @@ +#pragma once + +#include "vulkaninstance.h" + +#if defined(VK_USE_PLATFORM_XLIB_KHR) +#include +#endif + +class VulkanSurface +{ +public: + VulkanSurface(std::shared_ptr instance, VkSurfaceKHR surface); + ~VulkanSurface(); + + std::shared_ptr Instance; + VkSurfaceKHR Surface = VK_NULL_HANDLE; + +#ifdef VK_USE_PLATFORM_WIN32_KHR + + VulkanSurface(std::shared_ptr instance, HWND window); + HWND Window = 0; + +#elif defined(VK_USE_PLATFORM_XLIB_KHR) + + VulkanSurface(std::shared_ptr instance, Display* disp, Window wind); + Display* disp = nullptr; + Window wind; + +#endif +}; diff --git a/libraries/ZVulkan/include/zvulkan/vulkanswapchain.h b/libraries/ZVulkan/include/zvulkan/vulkanswapchain.h new file mode 100644 index 0000000000..cc9a9ed22c --- /dev/null +++ b/libraries/ZVulkan/include/zvulkan/vulkanswapchain.h @@ -0,0 +1,50 @@ +#pragma once + +#include "vulkandevice.h" +#include "vulkanobjects.h" + +class VulkanSemaphore; +class VulkanFence; + +class VulkanSwapChain +{ +public: + VulkanSwapChain(VulkanDevice* device); + ~VulkanSwapChain(); + + void Create(int width, int height, int imageCount, bool vsync, bool hdr, bool exclusivefullscreen); + bool Lost() const { return lost; } + + int Width() const { return actualExtent.width; } + int Height() const { return actualExtent.height; } + VkSurfaceFormatKHR Format() const { return format; } + + int ImageCount() const { return (int)images.size(); } + VulkanImage* GetImage(int index) { return images[index].get(); } + VulkanImageView* GetImageView(int index) { return views[index].get(); } + + int AcquireImage(VulkanSemaphore* semaphore = nullptr, VulkanFence* fence = nullptr); + void QueuePresent(int imageIndex, VulkanSemaphore* semaphore = nullptr); + +private: + void SelectFormat(bool hdr); + void SelectPresentMode(bool vsync, bool exclusivefullscreen); + + bool CreateSwapchain(int width, int height, int imageCount, bool exclusivefullscreen, VkSwapchainKHR oldSwapChain = VK_NULL_HANDLE); + + std::vector GetSurfaceFormats(); + std::vector GetPresentModes(bool exclusivefullscreen); + + VulkanDevice* device = nullptr; + bool lost = true; + + VkExtent2D actualExtent = {}; + VkSwapchainKHR swapchain = VK_NULL_HANDLE; + VkSurfaceFormatKHR format = {}; + VkPresentModeKHR presentMode; + std::vector> images; + std::vector> views; + + VulkanSwapChain(const VulkanSwapChain&) = delete; + VulkanSwapChain& operator=(const VulkanSwapChain&) = delete; +}; diff --git a/libraries/ZVulkan/src/glslang/LICENSE.txt b/libraries/ZVulkan/src/glslang/LICENSE.txt new file mode 100644 index 0000000000..054e68a461 --- /dev/null +++ b/libraries/ZVulkan/src/glslang/LICENSE.txt @@ -0,0 +1,1016 @@ +Here, glslang proper means core GLSL parsing, HLSL parsing, and SPIR-V code +generation. Glslang proper requires use of a number of licenses, one that covers +preprocessing and others that covers non-preprocessing. + +Bison was removed long ago. You can build glslang from the source grammar, +using tools of your choice, without using bison or any bison files. + +Other parts, outside of glslang proper, include: + +- gl_types.h, only needed for OpenGL-like reflection, and can be left out of + a parse and codegen project. See it for its license. + +- update_glslang_sources.py, which is not part of the project proper and does + not need to be used. + +- the SPIR-V "remapper", which is optional, but has the same license as + glslang proper + +- Google tests and SPIR-V tools, and anything in the external subdirectory + are external and optional; see them for their respective licenses. + +-------------------------------------------------------------------------------- + +The core of glslang-proper, minus the preprocessor is licenced as follows: + +-------------------------------------------------------------------------------- +3-Clause BSD License +-------------------------------------------------------------------------------- + +// +// Copyright (C) 2015-2018 Google, Inc. +// Copyright (C) +// +// 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. +// + + +-------------------------------------------------------------------------------- +2-Clause BSD License +-------------------------------------------------------------------------------- + +Copyright 2020 The Khronos Group Inc + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +-------------------------------------------------------------------------------- +The MIT License +-------------------------------------------------------------------------------- + +Copyright 2020 The Khronos Group Inc + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +-------------------------------------------------------------------------------- +APACHE LICENSE, VERSION 2.0 +-------------------------------------------------------------------------------- + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + +-------------------------------------------------------------------------------- +GPL 3 with special bison exception +-------------------------------------------------------------------------------- + + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + +Bison Exception + +As a special exception, you may create a larger work that contains part or all +of the Bison parser skeleton and distribute that work under terms of your +choice, so long as that work isn't itself a parser generator using the skeleton +or a modified version thereof as a parser skeleton. Alternatively, if you +modify or redistribute the parser skeleton itself, you may (at your option) +remove this special exception, which will cause the skeleton and the resulting +Bison output files to be licensed under the GNU General Public License without +this special exception. + +This special exception was added by the Free Software Foundation in version +2.2 of Bison. + + END OF TERMS AND CONDITIONS + +-------------------------------------------------------------------------------- +================================================================================ +-------------------------------------------------------------------------------- + +The preprocessor has the core licenses stated above, plus additional licences: + +/****************************************************************************\ +Copyright (c) 2002, NVIDIA Corporation. + +NVIDIA Corporation("NVIDIA") supplies this software to you in +consideration of your agreement to the following terms, and your use, +installation, modification or redistribution of this NVIDIA software +constitutes acceptance of these terms. If you do not agree with these +terms, please do not use, install, modify or redistribute this NVIDIA +software. + +In consideration of your agreement to abide by the following terms, and +subject to these terms, NVIDIA grants you a personal, non-exclusive +license, under NVIDIA's copyrights in this original NVIDIA software (the +"NVIDIA Software"), to use, reproduce, modify and redistribute the +NVIDIA Software, with or without modifications, in source and/or binary +forms; provided that if you redistribute the NVIDIA Software, you must +retain the copyright notice of NVIDIA, this notice and the following +text and disclaimers in all such redistributions of the NVIDIA Software. +Neither the name, trademarks, service marks nor logos of NVIDIA +Corporation may be used to endorse or promote products derived from the +NVIDIA Software without specific prior written permission from NVIDIA. +Except as expressly stated in this notice, no other rights or licenses +express or implied, are granted by NVIDIA herein, including but not +limited to any patent rights that may be infringed by your derivative +works or by other works in which the NVIDIA Software may be +incorporated. No hardware is licensed hereunder. + +THE NVIDIA SOFTWARE IS BEING PROVIDED ON AN "AS IS" BASIS, WITHOUT +WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, +INCLUDING WITHOUT LIMITATION, WARRANTIES OR CONDITIONS OF TITLE, +NON-INFRINGEMENT, MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR +ITS USE AND OPERATION EITHER ALONE OR IN COMBINATION WITH OTHER +PRODUCTS. + +IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT, +INCIDENTAL, EXEMPLARY, CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +TO, LOST PROFITS; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF +USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) OR ARISING IN ANY WAY +OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE +NVIDIA SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, +TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF +NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +\****************************************************************************/ + +/* +** Copyright (c) 2014-2016 The Khronos Group Inc. +** +** Permission is hereby granted, free of charge, to any person obtaining a copy +** of this software and/or associated documentation files (the "Materials"), +** to deal in the Materials without restriction, including without limitation +** the rights to use, copy, modify, merge, publish, distribute, sublicense, +** and/or sell copies of the Materials, and to permit persons to whom the +** Materials are furnished to do so, subject to the following conditions: +** +** The above copyright notice and this permission notice shall be included in +** all copies or substantial portions of the Materials. +** +** MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS KHRONOS +** STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND +** HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/ +** +** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +** OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +** FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +** THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +** LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +** FROM,OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS +** IN THE MATERIALS. +*/ diff --git a/libraries/glslang/OGLCompilersDLL/InitializeDll.cpp b/libraries/ZVulkan/src/glslang/OGLCompilersDLL/InitializeDll.cpp similarity index 100% rename from libraries/glslang/OGLCompilersDLL/InitializeDll.cpp rename to libraries/ZVulkan/src/glslang/OGLCompilersDLL/InitializeDll.cpp diff --git a/libraries/glslang/OGLCompilersDLL/InitializeDll.h b/libraries/ZVulkan/src/glslang/OGLCompilersDLL/InitializeDll.h similarity index 100% rename from libraries/glslang/OGLCompilersDLL/InitializeDll.h rename to libraries/ZVulkan/src/glslang/OGLCompilersDLL/InitializeDll.h diff --git a/libraries/glslang/glslang/GenericCodeGen/CodeGen.cpp b/libraries/ZVulkan/src/glslang/glslang/GenericCodeGen/CodeGen.cpp similarity index 100% rename from libraries/glslang/glslang/GenericCodeGen/CodeGen.cpp rename to libraries/ZVulkan/src/glslang/glslang/GenericCodeGen/CodeGen.cpp diff --git a/libraries/glslang/glslang/GenericCodeGen/Link.cpp b/libraries/ZVulkan/src/glslang/glslang/GenericCodeGen/Link.cpp similarity index 100% rename from libraries/glslang/glslang/GenericCodeGen/Link.cpp rename to libraries/ZVulkan/src/glslang/glslang/GenericCodeGen/Link.cpp diff --git a/libraries/glslang/glslang/Include/BaseTypes.h b/libraries/ZVulkan/src/glslang/glslang/Include/BaseTypes.h similarity index 99% rename from libraries/glslang/glslang/Include/BaseTypes.h rename to libraries/ZVulkan/src/glslang/glslang/Include/BaseTypes.h index 3eec5973b4..c8203c2232 100644 --- a/libraries/glslang/glslang/Include/BaseTypes.h +++ b/libraries/ZVulkan/src/glslang/glslang/Include/BaseTypes.h @@ -263,7 +263,6 @@ enum TBuiltInVariable { EbvObjectRayDirection, EbvRayTmin, EbvRayTmax, - EbvCullMask, EbvHitT, EbvHitKind, EbvObjectToWorld, @@ -275,8 +274,6 @@ enum TBuiltInVariable { // barycentrics EbvBaryCoordNV, EbvBaryCoordNoPerspNV, - EbvBaryCoordEXT, - EbvBaryCoordNoPerspEXT, // mesh shaders EbvTaskCountNV, EbvPrimitiveCountNV, @@ -481,10 +478,8 @@ __inline const char* GetBuiltInVariableString(TBuiltInVariable v) case EbvWorldToObject: return "WorldToObjectNV"; case EbvCurrentRayTimeNV: return "CurrentRayTimeNV"; - case EbvBaryCoordEXT: - case EbvBaryCoordNV: return "BaryCoordKHR"; - case EbvBaryCoordNoPerspEXT: - case EbvBaryCoordNoPerspNV: return "BaryCoordNoPerspKHR"; + case EbvBaryCoordNV: return "BaryCoordNV"; + case EbvBaryCoordNoPerspNV: return "BaryCoordNoPerspNV"; case EbvTaskCountNV: return "TaskCountNV"; case EbvPrimitiveCountNV: return "PrimitiveCountNV"; diff --git a/libraries/glslang/glslang/Include/Common.h b/libraries/ZVulkan/src/glslang/glslang/Include/Common.h similarity index 93% rename from libraries/glslang/glslang/Include/Common.h rename to libraries/ZVulkan/src/glslang/glslang/Include/Common.h index 4c59abe3f3..4f888ae166 100644 --- a/libraries/glslang/glslang/Include/Common.h +++ b/libraries/ZVulkan/src/glslang/glslang/Include/Common.h @@ -39,11 +39,6 @@ #include #include -#ifdef _MSC_VER -#include -#else -#include -#endif #include #include #include @@ -66,7 +61,7 @@ std::string to_string(const T& val) { } #endif -#if (defined(_MSC_VER) && _MSC_VER < 1900 /*vs2015*/) || MINGW_HAS_SECURE_API +#if (defined(_MSC_VER) && _MSC_VER < 1900 /*vs2015*/) || defined MINGW_HAS_SECURE_API #include #ifndef snprintf #define snprintf sprintf_s @@ -219,7 +214,7 @@ template T Max(const T a, const T b) { return a > b ? a : b; } // // Create a TString object from an integer. // -#if defined _MSC_VER || MINGW_HAS_SECURE_API +#if defined _MSC_VER || defined MINGW_HAS_SECURE_API inline const TString String(const int i, const int base = 10) { char text[16]; // 32 bit ints are at most 10 digits in base 10 @@ -308,34 +303,6 @@ template int IntLog2(T n) return result; } -inline bool IsInfinity(double x) { -#ifdef _MSC_VER - switch (_fpclass(x)) { - case _FPCLASS_NINF: - case _FPCLASS_PINF: - return true; - default: - return false; - } -#else - return std::isinf(x); -#endif -} - -inline bool IsNan(double x) { -#ifdef _MSC_VER - switch (_fpclass(x)) { - case _FPCLASS_SNAN: - case _FPCLASS_QNAN: - return true; - default: - return false; - } -#else - return std::isnan(x); -#endif -} - } // end namespace glslang #endif // _COMMON_INCLUDED_ diff --git a/libraries/glslang/glslang/Include/ConstantUnion.h b/libraries/ZVulkan/src/glslang/glslang/Include/ConstantUnion.h similarity index 100% rename from libraries/glslang/glslang/Include/ConstantUnion.h rename to libraries/ZVulkan/src/glslang/glslang/Include/ConstantUnion.h diff --git a/libraries/glslang/glslang/Include/InfoSink.h b/libraries/ZVulkan/src/glslang/glslang/Include/InfoSink.h similarity index 100% rename from libraries/glslang/glslang/Include/InfoSink.h rename to libraries/ZVulkan/src/glslang/glslang/Include/InfoSink.h diff --git a/libraries/glslang/glslang/Include/InitializeGlobals.h b/libraries/ZVulkan/src/glslang/glslang/Include/InitializeGlobals.h similarity index 100% rename from libraries/glslang/glslang/Include/InitializeGlobals.h rename to libraries/ZVulkan/src/glslang/glslang/Include/InitializeGlobals.h diff --git a/libraries/glslang/glslang/Include/PoolAlloc.h b/libraries/ZVulkan/src/glslang/glslang/Include/PoolAlloc.h similarity index 99% rename from libraries/glslang/glslang/Include/PoolAlloc.h rename to libraries/ZVulkan/src/glslang/glslang/Include/PoolAlloc.h index 1f5cac76de..b8eccb8832 100644 --- a/libraries/glslang/glslang/Include/PoolAlloc.h +++ b/libraries/ZVulkan/src/glslang/glslang/Include/PoolAlloc.h @@ -306,8 +306,6 @@ public: TPoolAllocator& getAllocator() const { return allocator; } - pool_allocator select_on_container_copy_construction() const { return pool_allocator{}; } - protected: pool_allocator& operator=(const pool_allocator&) { return *this; } TPoolAllocator& allocator; diff --git a/libraries/glslang/glslang/Include/ResourceLimits.h b/libraries/ZVulkan/src/glslang/glslang/Include/ResourceLimits.h similarity index 100% rename from libraries/glslang/glslang/Include/ResourceLimits.h rename to libraries/ZVulkan/src/glslang/glslang/Include/ResourceLimits.h diff --git a/libraries/glslang/glslang/Include/ShHandle.h b/libraries/ZVulkan/src/glslang/glslang/Include/ShHandle.h similarity index 100% rename from libraries/glslang/glslang/Include/ShHandle.h rename to libraries/ZVulkan/src/glslang/glslang/Include/ShHandle.h diff --git a/libraries/glslang/glslang/Include/SpirvIntrinsics.h b/libraries/ZVulkan/src/glslang/glslang/Include/SpirvIntrinsics.h similarity index 85% rename from libraries/glslang/glslang/Include/SpirvIntrinsics.h rename to libraries/ZVulkan/src/glslang/glslang/Include/SpirvIntrinsics.h index 3c7d72ce97..e7a999d408 100644 --- a/libraries/glslang/glslang/Include/SpirvIntrinsics.h +++ b/libraries/ZVulkan/src/glslang/glslang/Include/SpirvIntrinsics.h @@ -65,7 +65,7 @@ struct TSpirvExecutionMode { // spirv_execution_mode TMap> modes; // spirv_execution_mode_id - TMap > modeIds; + TMap > modeIds; }; // SPIR-V decorations @@ -75,7 +75,7 @@ struct TSpirvDecorate { // spirv_decorate TMap > decorates; // spirv_decorate_id - TMap> decorateIds; + TMap > decorateIds; // spirv_decorate_string TMap > decorateStrings; }; @@ -98,12 +98,20 @@ struct TSpirvInstruction { struct TSpirvTypeParameter { POOL_ALLOCATOR_NEW_DELETE(GetThreadPoolAllocator()) - TSpirvTypeParameter(const TIntermConstantUnion* arg) { constant = arg; } + TSpirvTypeParameter(const TIntermConstantUnion* arg) { isConstant = true; constant = arg; } + TSpirvTypeParameter(const TType* arg) { isConstant = false; type = arg; } - bool operator==(const TSpirvTypeParameter& rhs) const { return constant == rhs.constant; } + bool operator==(const TSpirvTypeParameter& rhs) const + { + return isConstant == rhs.isConstant && ((isConstant && constant == rhs.constant) || (!isConstant && type == rhs.type)); + } bool operator!=(const TSpirvTypeParameter& rhs) const { return !operator==(rhs); } - const TIntermConstantUnion* constant; + bool isConstant; + union { + const TIntermConstantUnion* constant; + const TType* type; + }; }; typedef TVector TSpirvTypeParameters; diff --git a/libraries/glslang/glslang/Include/Types.h b/libraries/ZVulkan/src/glslang/glslang/Include/Types.h similarity index 86% rename from libraries/glslang/glslang/Include/Types.h rename to libraries/ZVulkan/src/glslang/glslang/Include/Types.h index 682d124cc9..a6bf191d75 100644 --- a/libraries/glslang/glslang/Include/Types.h +++ b/libraries/ZVulkan/src/glslang/glslang/Include/Types.h @@ -552,7 +552,6 @@ public: perViewNV = false; perTaskNV = false; #endif - pervertexEXT = false; } void clearMemory() @@ -605,8 +604,7 @@ public: bool isNoContraction() const { return false; } void setNoContraction() { } bool isPervertexNV() const { return false; } - bool isPervertexEXT() const { return pervertexEXT; } - void setNullInit() {} + void setNullInit() { } bool isNullInit() const { return false; } void setSpirvByReference() { } bool isSpirvByReference() { return false; } @@ -617,7 +615,6 @@ public: bool nopersp : 1; bool explicitInterp : 1; bool pervertexNV : 1; - bool pervertexEXT : 1; bool perPrimitiveNV : 1; bool perViewNV : 1; bool perTaskNV : 1; @@ -666,13 +663,12 @@ public: } bool isAuxiliary() const { - return centroid || patch || sample || pervertexNV || pervertexEXT; + return centroid || patch || sample || pervertexNV; } bool isPatch() const { return patch; } bool isNoContraction() const { return noContraction; } void setNoContraction() { noContraction = true; } bool isPervertexNV() const { return pervertexNV; } - bool isPervertexEXT() const { return pervertexEXT; } void setNullInit() { nullInit = true; } bool isNullInit() const { return nullInit; } void setSpirvByReference() { spirvByReference = true; } @@ -745,16 +741,6 @@ public: } } - bool isUniform() const - { - switch (storage) { - case EvqUniform: - return true; - default: - return false; - } - } - bool isIo() const { switch (storage) { @@ -860,7 +846,7 @@ public: case EShLangTessEvaluation: return ! patch && isPipeInput(); case EShLangFragment: - return (pervertexNV || pervertexEXT) && isPipeInput(); + return pervertexNV && isPipeInput(); case EShLangMeshNV: return ! perTaskNV && isPipeOutput(); @@ -1869,12 +1855,10 @@ public: bool isAtomic() const { return false; } bool isCoopMat() const { return false; } bool isReference() const { return false; } - bool isSpirvType() const { return false; } #else bool isAtomic() const { return basicType == EbtAtomicUint; } bool isCoopMat() const { return coopmat; } bool isReference() const { return getBasicType() == EbtReference; } - bool isSpirvType() const { return getBasicType() == EbtSpirvType; } #endif // return true if this type contains any subtype which satisfies the given predicate. @@ -2146,8 +2130,7 @@ public: const char* getPrecisionQualifierString() const { return ""; } TString getBasicTypeString() const { return ""; } #else - TString getCompleteString(bool syntactic = false, bool getQualifiers = true, bool getPrecision = true, - bool getType = true, TString name = "", TString structName = "") const + TString getCompleteString() const { TString typeString; @@ -2155,337 +2138,232 @@ public: const auto appendUint = [&](unsigned int u) { typeString.append(std::to_string(u).c_str()); }; const auto appendInt = [&](int i) { typeString.append(std::to_string(i).c_str()); }; - if (getQualifiers) { - if (qualifier.hasSprivDecorate()) + if (qualifier.hasSprivDecorate()) appendStr(qualifier.getSpirvDecorateQualifierString().c_str()); - if (qualifier.hasLayout()) { + if (qualifier.hasLayout()) { // To reduce noise, skip this if the only layout is an xfb_buffer // with no triggering xfb_offset. TQualifier noXfbBuffer = qualifier; noXfbBuffer.layoutXfbBuffer = TQualifier::layoutXfbBufferEnd; if (noXfbBuffer.hasLayout()) { - appendStr("layout("); - if (qualifier.hasAnyLocation()) { - appendStr(" location="); - appendUint(qualifier.layoutLocation); - if (qualifier.hasComponent()) { - appendStr(" component="); - appendUint(qualifier.layoutComponent); - } - if (qualifier.hasIndex()) { - appendStr(" index="); - appendUint(qualifier.layoutIndex); - } - } - if (qualifier.hasSet()) { - appendStr(" set="); - appendUint(qualifier.layoutSet); - } - if (qualifier.hasBinding()) { - appendStr(" binding="); - appendUint(qualifier.layoutBinding); - } - if (qualifier.hasStream()) { - appendStr(" stream="); - appendUint(qualifier.layoutStream); - } - if (qualifier.hasMatrix()) { - appendStr(" "); - appendStr(TQualifier::getLayoutMatrixString(qualifier.layoutMatrix)); - } - if (qualifier.hasPacking()) { - appendStr(" "); - appendStr(TQualifier::getLayoutPackingString(qualifier.layoutPacking)); - } - if (qualifier.hasOffset()) { - appendStr(" offset="); - appendInt(qualifier.layoutOffset); - } - if (qualifier.hasAlign()) { - appendStr(" align="); - appendInt(qualifier.layoutAlign); - } - if (qualifier.hasFormat()) { - appendStr(" "); - appendStr(TQualifier::getLayoutFormatString(qualifier.layoutFormat)); - } - if (qualifier.hasXfbBuffer() && qualifier.hasXfbOffset()) { - appendStr(" xfb_buffer="); - appendUint(qualifier.layoutXfbBuffer); - } - if (qualifier.hasXfbOffset()) { - appendStr(" xfb_offset="); - appendUint(qualifier.layoutXfbOffset); - } - if (qualifier.hasXfbStride()) { - appendStr(" xfb_stride="); - appendUint(qualifier.layoutXfbStride); - } - if (qualifier.hasAttachment()) { - appendStr(" input_attachment_index="); - appendUint(qualifier.layoutAttachment); - } - if (qualifier.hasSpecConstantId()) { - appendStr(" constant_id="); - appendUint(qualifier.layoutSpecConstantId); - } - if (qualifier.layoutPushConstant) - appendStr(" push_constant"); - if (qualifier.layoutBufferReference) - appendStr(" buffer_reference"); - if (qualifier.hasBufferReferenceAlign()) { - appendStr(" buffer_reference_align="); - appendUint(1u << qualifier.layoutBufferReferenceAlign); - } - - if (qualifier.layoutPassthrough) - appendStr(" passthrough"); - if (qualifier.layoutViewportRelative) - appendStr(" layoutViewportRelative"); - if (qualifier.layoutSecondaryViewportRelativeOffset != -2048) { - appendStr(" layoutSecondaryViewportRelativeOffset="); - appendInt(qualifier.layoutSecondaryViewportRelativeOffset); - } - if (qualifier.layoutShaderRecord) - appendStr(" shaderRecordNV"); - - appendStr(")"); - } - } - - if (qualifier.invariant) - appendStr(" invariant"); - if (qualifier.noContraction) - appendStr(" noContraction"); - if (qualifier.centroid) - appendStr(" centroid"); - if (qualifier.smooth) - appendStr(" smooth"); - if (qualifier.flat) - appendStr(" flat"); - if (qualifier.nopersp) - appendStr(" noperspective"); - if (qualifier.explicitInterp) - appendStr(" __explicitInterpAMD"); - if (qualifier.pervertexNV) - appendStr(" pervertexNV"); - if (qualifier.pervertexEXT) - appendStr(" pervertexEXT"); - if (qualifier.perPrimitiveNV) - appendStr(" perprimitiveNV"); - if (qualifier.perViewNV) - appendStr(" perviewNV"); - if (qualifier.perTaskNV) - appendStr(" taskNV"); - if (qualifier.patch) - appendStr(" patch"); - if (qualifier.sample) - appendStr(" sample"); - if (qualifier.coherent) - appendStr(" coherent"); - if (qualifier.devicecoherent) - appendStr(" devicecoherent"); - if (qualifier.queuefamilycoherent) - appendStr(" queuefamilycoherent"); - if (qualifier.workgroupcoherent) - appendStr(" workgroupcoherent"); - if (qualifier.subgroupcoherent) - appendStr(" subgroupcoherent"); - if (qualifier.shadercallcoherent) - appendStr(" shadercallcoherent"); - if (qualifier.nonprivate) - appendStr(" nonprivate"); - if (qualifier.volatil) - appendStr(" volatile"); - if (qualifier.restrict) - appendStr(" restrict"); - if (qualifier.readonly) - appendStr(" readonly"); - if (qualifier.writeonly) - appendStr(" writeonly"); - if (qualifier.specConstant) - appendStr(" specialization-constant"); - if (qualifier.nonUniform) - appendStr(" nonuniform"); - if (qualifier.isNullInit()) - appendStr(" null-init"); - if (qualifier.isSpirvByReference()) - appendStr(" spirv_by_reference"); - if (qualifier.isSpirvLiteral()) - appendStr(" spirv_literal"); - appendStr(" "); - appendStr(getStorageQualifierString()); - } - if (getType) { - if (syntactic) { - if (getPrecision && qualifier.precision != EpqNone) { - appendStr(" "); - appendStr(getPrecisionQualifierString()); - } - if (isVector() || isMatrix()) { - appendStr(" "); - switch (basicType) { - case EbtDouble: - appendStr("d"); - break; - case EbtInt: - appendStr("i"); - break; - case EbtUint: - appendStr("u"); - break; - case EbtBool: - appendStr("b"); - break; - case EbtFloat: - default: - break; - } - if (isVector()) { - appendStr("vec"); - appendInt(vectorSize); - } else { - appendStr("mat"); - appendInt(matrixCols); - appendStr("x"); - appendInt(matrixRows); - } - } else if (isStruct() && structure) { - appendStr(" "); - appendStr(structName.c_str()); - appendStr("{"); - bool hasHiddenMember = true; - for (size_t i = 0; i < structure->size(); ++i) { - if (!(*structure)[i].type->hiddenMember()) { - if (!hasHiddenMember) - appendStr(", "); - typeString.append((*structure)[i].type->getCompleteString(syntactic, getQualifiers, getPrecision, getType, (*structure)[i].type->getFieldName())); - hasHiddenMember = false; - } - } - appendStr("}"); - } else { - appendStr(" "); - switch (basicType) { - case EbtDouble: - appendStr("double"); - break; - case EbtInt: - appendStr("int"); - break; - case EbtUint: - appendStr("uint"); - break; - case EbtBool: - appendStr("bool"); - break; - case EbtFloat: - appendStr("float"); - break; - default: - appendStr("unexpected"); - break; - } - } - if (name.length() > 0) { - appendStr(" "); - appendStr(name.c_str()); - } - if (isArray()) { - for (int i = 0; i < (int)arraySizes->getNumDims(); ++i) { - int size = arraySizes->getDimSize(i); - if (size == UnsizedArraySize && i == 0 && arraySizes->isVariablyIndexed()) - appendStr("[]"); - else { - if (size == UnsizedArraySize) { - appendStr("["); - if (i == 0) - appendInt(arraySizes->getImplicitSize()); - appendStr("]"); - } - else { - appendStr("["); - appendInt(arraySizes->getDimSize(i)); - appendStr("]"); - } - } - } - } - } - else { - if (isArray()) { - for (int i = 0; i < (int)arraySizes->getNumDims(); ++i) { - int size = arraySizes->getDimSize(i); - if (size == UnsizedArraySize && i == 0 && arraySizes->isVariablyIndexed()) - appendStr(" runtime-sized array of"); - else { - if (size == UnsizedArraySize) { - appendStr(" unsized"); - if (i == 0) { - appendStr(" "); - appendInt(arraySizes->getImplicitSize()); + appendStr("layout("); + if (qualifier.hasAnyLocation()) { + appendStr(" location="); + appendUint(qualifier.layoutLocation); + if (qualifier.hasComponent()) { + appendStr(" component="); + appendUint(qualifier.layoutComponent); + } + if (qualifier.hasIndex()) { + appendStr(" index="); + appendUint(qualifier.layoutIndex); } - } - else { - appendStr(" "); - appendInt(arraySizes->getDimSize(i)); - } - appendStr("-element array of"); } - } + if (qualifier.hasSet()) { + appendStr(" set="); + appendUint(qualifier.layoutSet); + } + if (qualifier.hasBinding()) { + appendStr(" binding="); + appendUint(qualifier.layoutBinding); + } + if (qualifier.hasStream()) { + appendStr(" stream="); + appendUint(qualifier.layoutStream); + } + if (qualifier.hasMatrix()) { + appendStr(" "); + appendStr(TQualifier::getLayoutMatrixString(qualifier.layoutMatrix)); + } + if (qualifier.hasPacking()) { + appendStr(" "); + appendStr(TQualifier::getLayoutPackingString(qualifier.layoutPacking)); + } + if (qualifier.hasOffset()) { + appendStr(" offset="); + appendInt(qualifier.layoutOffset); + } + if (qualifier.hasAlign()) { + appendStr(" align="); + appendInt(qualifier.layoutAlign); + } + if (qualifier.hasFormat()) { + appendStr(" "); + appendStr(TQualifier::getLayoutFormatString(qualifier.layoutFormat)); + } + if (qualifier.hasXfbBuffer() && qualifier.hasXfbOffset()) { + appendStr(" xfb_buffer="); + appendUint(qualifier.layoutXfbBuffer); + } + if (qualifier.hasXfbOffset()) { + appendStr(" xfb_offset="); + appendUint(qualifier.layoutXfbOffset); + } + if (qualifier.hasXfbStride()) { + appendStr(" xfb_stride="); + appendUint(qualifier.layoutXfbStride); + } + if (qualifier.hasAttachment()) { + appendStr(" input_attachment_index="); + appendUint(qualifier.layoutAttachment); + } + if (qualifier.hasSpecConstantId()) { + appendStr(" constant_id="); + appendUint(qualifier.layoutSpecConstantId); + } + if (qualifier.layoutPushConstant) + appendStr(" push_constant"); + if (qualifier.layoutBufferReference) + appendStr(" buffer_reference"); + if (qualifier.hasBufferReferenceAlign()) { + appendStr(" buffer_reference_align="); + appendUint(1u << qualifier.layoutBufferReferenceAlign); + } + + if (qualifier.layoutPassthrough) + appendStr(" passthrough"); + if (qualifier.layoutViewportRelative) + appendStr(" layoutViewportRelative"); + if (qualifier.layoutSecondaryViewportRelativeOffset != -2048) { + appendStr(" layoutSecondaryViewportRelativeOffset="); + appendInt(qualifier.layoutSecondaryViewportRelativeOffset); + } + if (qualifier.layoutShaderRecord) + appendStr(" shaderRecordNV"); + + appendStr(")"); } - if (isParameterized()) { - appendStr("<"); - for (int i = 0; i < (int)typeParameters->getNumDims(); ++i) { + } + + if (qualifier.invariant) + appendStr(" invariant"); + if (qualifier.noContraction) + appendStr(" noContraction"); + if (qualifier.centroid) + appendStr(" centroid"); + if (qualifier.smooth) + appendStr(" smooth"); + if (qualifier.flat) + appendStr(" flat"); + if (qualifier.nopersp) + appendStr(" noperspective"); + if (qualifier.explicitInterp) + appendStr(" __explicitInterpAMD"); + if (qualifier.pervertexNV) + appendStr(" pervertexNV"); + if (qualifier.perPrimitiveNV) + appendStr(" perprimitiveNV"); + if (qualifier.perViewNV) + appendStr(" perviewNV"); + if (qualifier.perTaskNV) + appendStr(" taskNV"); + if (qualifier.patch) + appendStr(" patch"); + if (qualifier.sample) + appendStr(" sample"); + if (qualifier.coherent) + appendStr(" coherent"); + if (qualifier.devicecoherent) + appendStr(" devicecoherent"); + if (qualifier.queuefamilycoherent) + appendStr(" queuefamilycoherent"); + if (qualifier.workgroupcoherent) + appendStr(" workgroupcoherent"); + if (qualifier.subgroupcoherent) + appendStr(" subgroupcoherent"); + if (qualifier.shadercallcoherent) + appendStr(" shadercallcoherent"); + if (qualifier.nonprivate) + appendStr(" nonprivate"); + if (qualifier.volatil) + appendStr(" volatile"); + if (qualifier.restrict) + appendStr(" restrict"); + if (qualifier.readonly) + appendStr(" readonly"); + if (qualifier.writeonly) + appendStr(" writeonly"); + if (qualifier.specConstant) + appendStr(" specialization-constant"); + if (qualifier.nonUniform) + appendStr(" nonuniform"); + if (qualifier.isNullInit()) + appendStr(" null-init"); + if (qualifier.isSpirvByReference()) + appendStr(" spirv_by_reference"); + if (qualifier.isSpirvLiteral()) + appendStr(" spirv_literal"); + appendStr(" "); + appendStr(getStorageQualifierString()); + if (isArray()) { + for(int i = 0; i < (int)arraySizes->getNumDims(); ++i) { + int size = arraySizes->getDimSize(i); + if (size == UnsizedArraySize && i == 0 && arraySizes->isVariablyIndexed()) + appendStr(" runtime-sized array of"); + else { + if (size == UnsizedArraySize) { + appendStr(" unsized"); + if (i == 0) { + appendStr(" "); + appendInt(arraySizes->getImplicitSize()); + } + } else { + appendStr(" "); + appendInt(arraySizes->getDimSize(i)); + } + appendStr("-element array of"); + } + } + } + if (isParameterized()) { + appendStr("<"); + for(int i = 0; i < (int)typeParameters->getNumDims(); ++i) { appendInt(typeParameters->getDimSize(i)); if (i != (int)typeParameters->getNumDims() - 1) - appendStr(", "); - } - appendStr(">"); - } - if (getPrecision && qualifier.precision != EpqNone) { - appendStr(" "); - appendStr(getPrecisionQualifierString()); - } - if (isMatrix()) { - appendStr(" "); - appendInt(matrixCols); - appendStr("X"); - appendInt(matrixRows); - appendStr(" matrix of"); - } - else if (isVector()) { - appendStr(" "); - appendInt(vectorSize); - appendStr("-component vector of"); - } - - appendStr(" "); - typeString.append(getBasicTypeString()); - - if (qualifier.builtIn != EbvNone) { - appendStr(" "); - appendStr(getBuiltInVariableString()); - } - - // Add struct/block members - if (isStruct() && structure) { - appendStr("{"); - bool hasHiddenMember = true; - for (size_t i = 0; i < structure->size(); ++i) { - if (!(*structure)[i].type->hiddenMember()) { - if (!hasHiddenMember) appendStr(", "); - typeString.append((*structure)[i].type->getCompleteString()); - typeString.append(" "); - typeString.append((*structure)[i].type->getFieldName()); - hasHiddenMember = false; - } - } - appendStr("}"); } - } + appendStr(">"); + } + if (qualifier.precision != EpqNone) { + appendStr(" "); + appendStr(getPrecisionQualifierString()); + } + if (isMatrix()) { + appendStr(" "); + appendInt(matrixCols); + appendStr("X"); + appendInt(matrixRows); + appendStr(" matrix of"); + } else if (isVector()) { + appendStr(" "); + appendInt(vectorSize); + appendStr("-component vector of"); + } + + appendStr(" "); + typeString.append(getBasicTypeString()); + + if (qualifier.builtIn != EbvNone) { + appendStr(" "); + appendStr(getBuiltInVariableString()); + } + + // Add struct/block members + if (isStruct() && structure) { + appendStr("{"); + bool hasHiddenMember = true; + for (size_t i = 0; i < structure->size(); ++i) { + if (! (*structure)[i].type->hiddenMember()) { + if (!hasHiddenMember) + appendStr(", "); + typeString.append((*structure)[i].type->getCompleteString()); + typeString.append(" "); + typeString.append((*structure)[i].type->getFieldName()); + hasHiddenMember = false; + } + } + appendStr("}"); } return typeString; @@ -2554,27 +2432,13 @@ public: // type definitions, and member names to be considered the same type. // This rule applies recursively for nested or embedded types." // - // If type mismatch in structure, return member indices through lpidx and rpidx. - // If matching members for either block are exhausted, return -1 for exhausted - // block and the index of the unmatched member. Otherwise return {-1,-1}. - // - bool sameStructType(const TType& right, int* lpidx = nullptr, int* rpidx = nullptr) const + bool sameStructType(const TType& right) const { - // Initialize error to general type mismatch. - if (lpidx != nullptr) { - *lpidx = -1; - *rpidx = -1; - } - // Most commonly, they are both nullptr, or the same pointer to the same actual structure - // TODO: Why return true when neither types are structures? if ((!isStruct() && !right.isStruct()) || (isStruct() && right.isStruct() && structure == right.structure)) return true; - if (!isStruct() || !right.isStruct()) - return false; - // Structure names have to match if (*typeName != *right.typeName) return false; @@ -2584,30 +2448,17 @@ public: bool isGLPerVertex = *typeName == "gl_PerVertex"; // Both being nullptr was caught above, now they both have to be structures of the same number of elements - if (lpidx == nullptr && - (structure->size() != right.structure->size() && !isGLPerVertex)) { + if (!isStruct() || !right.isStruct() || + (structure->size() != right.structure->size() && !isGLPerVertex)) return false; - } // Compare the names and types of all the members, which have to match for (size_t li = 0, ri = 0; li < structure->size() || ri < right.structure->size(); ++li, ++ri) { - if (lpidx != nullptr) { - *lpidx = static_cast(li); - *rpidx = static_cast(ri); - } if (li < structure->size() && ri < right.structure->size()) { if ((*structure)[li].type->getFieldName() == (*right.structure)[ri].type->getFieldName()) { if (*(*structure)[li].type != *(*right.structure)[ri].type) return false; } else { - // Skip hidden members - if ((*structure)[li].type->hiddenMember()) { - ri--; - continue; - } else if ((*right.structure)[ri].type->hiddenMember()) { - li--; - continue; - } // If one of the members is something that's inconsistently declared, skip over it // for now. if (isGLPerVertex) { @@ -2624,19 +2475,11 @@ public: } // If we get here, then there should only be inconsistently declared members left } else if (li < structure->size()) { - if (!(*structure)[li].type->hiddenMember() && !isInconsistentGLPerVertexMember((*structure)[li].type->getFieldName())) { - if (lpidx != nullptr) { - *rpidx = -1; - } + if (!isInconsistentGLPerVertexMember((*structure)[li].type->getFieldName())) return false; - } } else { - if (!(*right.structure)[ri].type->hiddenMember() && !isInconsistentGLPerVertexMember((*right.structure)[ri].type->getFieldName())) { - if (lpidx != nullptr) { - *lpidx = -1; - } + if (!isInconsistentGLPerVertexMember((*right.structure)[ri].type->getFieldName())) return false; - } } } @@ -2660,15 +2503,10 @@ public: return *referentType == *right.referentType; } - // See if two types match, in all aspects except arrayness - // If mismatch in structure members, return member indices in lpidx and rpidx. - bool sameElementType(const TType& right, int* lpidx = nullptr, int* rpidx = nullptr) const + // See if two types match, in all aspects except arrayness + bool sameElementType(const TType& right) const { - if (lpidx != nullptr) { - *lpidx = -1; - *rpidx = -1; - } - return basicType == right.basicType && sameElementShape(right, lpidx, rpidx); + return basicType == right.basicType && sameElementShape(right); } // See if two type's arrayness match @@ -2702,20 +2540,15 @@ public: #endif // See if two type's elements match in all ways except basic type - // If mismatch in structure members, return member indices in lpidx and rpidx. - bool sameElementShape(const TType& right, int* lpidx = nullptr, int* rpidx = nullptr) const + bool sameElementShape(const TType& right) const { - if (lpidx != nullptr) { - *lpidx = -1; - *rpidx = -1; - } - return ((basicType != EbtSampler && right.basicType != EbtSampler) || sampler == right.sampler) && + return sampler == right.sampler && vectorSize == right.vectorSize && matrixCols == right.matrixCols && matrixRows == right.matrixRows && vector1 == right.vector1 && isCoopMat() == right.isCoopMat() && - sameStructType(right, lpidx, rpidx) && + sameStructType(right) && sameReferenceType(right); } diff --git a/libraries/glslang/glslang/Include/arrays.h b/libraries/ZVulkan/src/glslang/glslang/Include/arrays.h similarity index 100% rename from libraries/glslang/glslang/Include/arrays.h rename to libraries/ZVulkan/src/glslang/glslang/Include/arrays.h diff --git a/libraries/glslang/glslang/Include/build_info.h b/libraries/ZVulkan/src/glslang/glslang/Include/build_info.h similarity index 98% rename from libraries/glslang/glslang/Include/build_info.h rename to libraries/ZVulkan/src/glslang/glslang/Include/build_info.h index e47b810c7c..661c4a3c1c 100644 --- a/libraries/glslang/glslang/Include/build_info.h +++ b/libraries/ZVulkan/src/glslang/glslang/Include/build_info.h @@ -35,7 +35,7 @@ #define GLSLANG_BUILD_INFO #define GLSLANG_VERSION_MAJOR 11 -#define GLSLANG_VERSION_MINOR 10 +#define GLSLANG_VERSION_MINOR 6 #define GLSLANG_VERSION_PATCH 0 #define GLSLANG_VERSION_FLAVOR "" diff --git a/libraries/glslang/glslang/Include/intermediate.h b/libraries/ZVulkan/src/glslang/glslang/Include/intermediate.h similarity index 99% rename from libraries/glslang/glslang/Include/intermediate.h rename to libraries/ZVulkan/src/glslang/glslang/Include/intermediate.h index a64ed68378..1e6ab4aa7a 100644 --- a/libraries/glslang/glslang/Include/intermediate.h +++ b/libraries/ZVulkan/src/glslang/glslang/Include/intermediate.h @@ -1155,7 +1155,7 @@ public: virtual bool isIntegerDomain() const { return type.isIntegerDomain(); } bool isAtomic() const { return type.isAtomic(); } bool isReference() const { return type.isReference(); } - TString getCompleteString(bool enhanced = false) const { return type.getCompleteString(enhanced); } + TString getCompleteString() const { return type.getCompleteString(); } protected: TIntermTyped& operator=(const TIntermTyped&); @@ -1643,7 +1643,6 @@ public: ~TIntermAggregate() { delete pragmaTable; } virtual TIntermAggregate* getAsAggregate() { return this; } virtual const TIntermAggregate* getAsAggregate() const { return this; } - virtual void updatePrecision(); virtual void setOperator(TOperator o) { op = o; } virtual TIntermSequence& getSequence() { return sequence; } virtual const TIntermSequence& getSequence() const { return sequence; } diff --git a/libraries/glslang/glslang/MachineIndependent/Constant.cpp b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/Constant.cpp similarity index 98% rename from libraries/glslang/glslang/MachineIndependent/Constant.cpp rename to libraries/ZVulkan/src/glslang/glslang/MachineIndependent/Constant.cpp index 74bde5e902..17b496c53f 100644 --- a/libraries/glslang/glslang/MachineIndependent/Constant.cpp +++ b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/Constant.cpp @@ -50,6 +50,35 @@ namespace { using namespace glslang; +typedef union { + double d; + int i[2]; +} DoubleIntUnion; + +// Some helper functions + +bool isNan(double x) +{ + DoubleIntUnion u; + // tough to find a platform independent library function, do it directly + u.d = x; + int bitPatternL = u.i[0]; + int bitPatternH = u.i[1]; + return (bitPatternH & 0x7ff80000) == 0x7ff80000 && + ((bitPatternH & 0xFFFFF) != 0 || bitPatternL != 0); +} + +bool isInf(double x) +{ + DoubleIntUnion u; + // tough to find a platform independent library function, do it directly + u.d = x; + int bitPatternL = u.i[0]; + int bitPatternH = u.i[1]; + return (bitPatternH & 0x7ff00000) == 0x7ff00000 && + (bitPatternH & 0xFFFFF) == 0 && bitPatternL == 0; +} + const double pi = 3.1415926535897932384626433832795; } // end anonymous namespace @@ -506,7 +535,7 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, const TType& returnType) case EbtFloat: newConstArray[i].setDConst(-unionArray[i].getDConst()); break; // Note: avoid UBSAN error regarding negating 0x80000000 case EbtInt: newConstArray[i].setIConst( - static_cast(unionArray[i].getIConst()) == 0x80000000 + unionArray[i].getIConst() == 0x80000000 ? -0x7FFFFFFF - 1 : -unionArray[i].getIConst()); break; @@ -638,12 +667,12 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, const TType& returnType) case EOpIsNan: { - newConstArray[i].setBConst(IsNan(unionArray[i].getDConst())); + newConstArray[i].setBConst(isNan(unionArray[i].getDConst())); break; } case EOpIsInf: { - newConstArray[i].setBConst(IsInfinity(unionArray[i].getDConst())); + newConstArray[i].setBConst(isInf(unionArray[i].getDConst())); break; } diff --git a/libraries/glslang/glslang/MachineIndependent/InfoSink.cpp b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/InfoSink.cpp similarity index 100% rename from libraries/glslang/glslang/MachineIndependent/InfoSink.cpp rename to libraries/ZVulkan/src/glslang/glslang/MachineIndependent/InfoSink.cpp diff --git a/libraries/glslang/glslang/MachineIndependent/Initialize.cpp b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/Initialize.cpp similarity index 98% rename from libraries/glslang/glslang/MachineIndependent/Initialize.cpp rename to libraries/ZVulkan/src/glslang/glslang/MachineIndependent/Initialize.cpp index b18b257525..823406c18d 100644 --- a/libraries/glslang/glslang/MachineIndependent/Initialize.cpp +++ b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/Initialize.cpp @@ -3,7 +3,7 @@ // Copyright (C) 2012-2016 LunarG, Inc. // Copyright (C) 2015-2020 Google, Inc. // Copyright (C) 2017 ARM Limited. -// Modifications Copyright (C) 2020-2021 Advanced Micro Devices, Inc. All rights reserved. +// Modifications Copyright (C) 2020 Advanced Micro Devices, Inc. All rights reserved. // // All rights reserved. // @@ -316,7 +316,6 @@ const CustomFunction CustomFunctions[] = { { EOpTextureQuerySize, "textureSize", nullptr }, { EOpTextureQueryLod, "textureQueryLod", nullptr }, - { EOpTextureQueryLod, "textureQueryLOD", nullptr }, // extension GL_ARB_texture_query_lod { EOpTextureQueryLevels, "textureQueryLevels", nullptr }, { EOpTextureQuerySamples, "textureSamples", nullptr }, { EOpTexture, "texture", nullptr }, @@ -4160,6 +4159,106 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "u16vec4 unpack16(uint64_t);" "i32vec2 unpack32(int64_t);" "u32vec2 unpack32(uint64_t);" + + "float64_t radians(float64_t);" + "f64vec2 radians(f64vec2);" + "f64vec3 radians(f64vec3);" + "f64vec4 radians(f64vec4);" + + "float64_t degrees(float64_t);" + "f64vec2 degrees(f64vec2);" + "f64vec3 degrees(f64vec3);" + "f64vec4 degrees(f64vec4);" + + "float64_t sin(float64_t);" + "f64vec2 sin(f64vec2);" + "f64vec3 sin(f64vec3);" + "f64vec4 sin(f64vec4);" + + "float64_t cos(float64_t);" + "f64vec2 cos(f64vec2);" + "f64vec3 cos(f64vec3);" + "f64vec4 cos(f64vec4);" + + "float64_t tan(float64_t);" + "f64vec2 tan(f64vec2);" + "f64vec3 tan(f64vec3);" + "f64vec4 tan(f64vec4);" + + "float64_t asin(float64_t);" + "f64vec2 asin(f64vec2);" + "f64vec3 asin(f64vec3);" + "f64vec4 asin(f64vec4);" + + "float64_t acos(float64_t);" + "f64vec2 acos(f64vec2);" + "f64vec3 acos(f64vec3);" + "f64vec4 acos(f64vec4);" + + "float64_t atan(float64_t, float64_t);" + "f64vec2 atan(f64vec2, f64vec2);" + "f64vec3 atan(f64vec3, f64vec3);" + "f64vec4 atan(f64vec4, f64vec4);" + + "float64_t atan(float64_t);" + "f64vec2 atan(f64vec2);" + "f64vec3 atan(f64vec3);" + "f64vec4 atan(f64vec4);" + + "float64_t sinh(float64_t);" + "f64vec2 sinh(f64vec2);" + "f64vec3 sinh(f64vec3);" + "f64vec4 sinh(f64vec4);" + + "float64_t cosh(float64_t);" + "f64vec2 cosh(f64vec2);" + "f64vec3 cosh(f64vec3);" + "f64vec4 cosh(f64vec4);" + + "float64_t tanh(float64_t);" + "f64vec2 tanh(f64vec2);" + "f64vec3 tanh(f64vec3);" + "f64vec4 tanh(f64vec4);" + + "float64_t asinh(float64_t);" + "f64vec2 asinh(f64vec2);" + "f64vec3 asinh(f64vec3);" + "f64vec4 asinh(f64vec4);" + + "float64_t acosh(float64_t);" + "f64vec2 acosh(f64vec2);" + "f64vec3 acosh(f64vec3);" + "f64vec4 acosh(f64vec4);" + + "float64_t atanh(float64_t);" + "f64vec2 atanh(f64vec2);" + "f64vec3 atanh(f64vec3);" + "f64vec4 atanh(f64vec4);" + + "float64_t pow(float64_t, float64_t);" + "f64vec2 pow(f64vec2, f64vec2);" + "f64vec3 pow(f64vec3, f64vec3);" + "f64vec4 pow(f64vec4, f64vec4);" + + "float64_t exp(float64_t);" + "f64vec2 exp(f64vec2);" + "f64vec3 exp(f64vec3);" + "f64vec4 exp(f64vec4);" + + "float64_t log(float64_t);" + "f64vec2 log(f64vec2);" + "f64vec3 log(f64vec3);" + "f64vec4 log(f64vec4);" + + "float64_t exp2(float64_t);" + "f64vec2 exp2(f64vec2);" + "f64vec3 exp2(f64vec3);" + "f64vec4 exp2(f64vec4);" + + "float64_t log2(float64_t);" + "f64vec2 log2(f64vec2);" + "f64vec3 log2(f64vec3);" + "f64vec4 log2(f64vec4);" "\n"); } @@ -4270,7 +4369,7 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV // //============================================================================ - if (profile != EEsProfile && (version >= 400 || version == 150)) { + if (profile != EEsProfile && version >= 400) { stageBuiltins[EShLangGeometry].append( "void EmitStreamVertex(int);" "void EndStreamPrimitive(int);" @@ -4554,7 +4653,7 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "\n"); } - // GL_ARB_shader_clock& GL_EXT_shader_realtime_clock + // GL_ARB_shader_clock & GL_EXT_shader_realtime_clock if (profile != EEsProfile && version >= 450) { commonBuiltins.append( "uvec2 clock2x32ARB();" @@ -5075,13 +5174,9 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV ); } - if (version >= 430) - stageBuiltins[EShLangVertex].append( - "out int gl_ViewportMask[];" // GL_NV_viewport_array2 - ); - if (version >= 450) stageBuiltins[EShLangVertex].append( + "out int gl_ViewportMask[];" // GL_NV_viewport_array2 "out int gl_SecondaryViewportMaskNV[];" // GL_NV_stereo_view_rendering "out vec4 gl_SecondaryPositionNV;" // GL_NV_stereo_view_rendering "out vec4 gl_PositionPerViewNV[];" // GL_NVX_multiview_per_view_attributes @@ -5217,13 +5312,9 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "in int gl_InvocationID;" ); - if (version >= 430) - stageBuiltins[EShLangGeometry].append( - "out int gl_ViewportMask[];" // GL_NV_viewport_array2 - ); - if (version >= 450) stageBuiltins[EShLangGeometry].append( + "out int gl_ViewportMask[];" // GL_NV_viewport_array2 "out int gl_SecondaryViewportMaskNV[];" // GL_NV_stereo_view_rendering "out vec4 gl_SecondaryPositionNV;" // GL_NV_stereo_view_rendering "out vec4 gl_PositionPerViewNV[];" // GL_NVX_multiview_per_view_attributes @@ -5299,13 +5390,7 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV if (version >= 450) stageBuiltins[EShLangTessControl].append( "float gl_CullDistance[];" - ); - if (version >= 430) - stageBuiltins[EShLangTessControl].append( "int gl_ViewportMask[];" // GL_NV_viewport_array2 - ); - if (version >= 450) - stageBuiltins[EShLangTessControl].append( "vec4 gl_SecondaryPositionNV;" // GL_NV_stereo_view_rendering "int gl_SecondaryViewportMaskNV[];" // GL_NV_stereo_view_rendering "vec4 gl_PositionPerViewNV[];" // GL_NVX_multiview_per_view_attributes @@ -5408,13 +5493,9 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "out int gl_Layer;" "\n"); - if (version >= 430) - stageBuiltins[EShLangTessEvaluation].append( - "out int gl_ViewportMask[];" // GL_NV_viewport_array2 - ); - if (version >= 450) stageBuiltins[EShLangTessEvaluation].append( + "out int gl_ViewportMask[];" // GL_NV_viewport_array2 "out vec4 gl_SecondaryPositionNV;" // GL_NV_stereo_view_rendering "out int gl_SecondaryViewportMaskNV[];" // GL_NV_stereo_view_rendering "out vec4 gl_PositionPerViewNV[];" // GL_NVX_multiview_per_view_attributes @@ -5571,8 +5652,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "flat in int gl_InvocationsPerPixelNV;" "in vec3 gl_BaryCoordNV;" // GL_NV_fragment_shader_barycentric "in vec3 gl_BaryCoordNoPerspNV;" - "in vec3 gl_BaryCoordEXT;" // GL_EXT_fragment_shader_barycentric - "in vec3 gl_BaryCoordNoPerspEXT;" ); if (version >= 450) @@ -5637,9 +5716,7 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV stageBuiltins[EShLangFragment].append( "in vec3 gl_BaryCoordNV;" "in vec3 gl_BaryCoordNoPerspNV;" - "in vec3 gl_BaryCoordEXT;" - "in vec3 gl_BaryCoordNoPerspEXT;" - ); + ); if (version >= 310) stageBuiltins[EShLangFragment].append( "flat in highp int gl_ShadingRateEXT;" // GL_EXT_fragment_shading_rate @@ -5861,7 +5938,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "in uint gl_IncomingRayFlagsNV;" "in uint gl_IncomingRayFlagsEXT;" "in float gl_CurrentRayTimeNV;" - "in uint gl_CullMaskEXT;" "\n"; const char *hitDecls = "in uvec3 gl_LaunchIDNV;" @@ -5898,7 +5974,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "in uint gl_IncomingRayFlagsNV;" "in uint gl_IncomingRayFlagsEXT;" "in float gl_CurrentRayTimeNV;" - "in uint gl_CullMaskEXT;" "\n"; const char *missDecls = "in uvec3 gl_LaunchIDNV;" @@ -5918,7 +5993,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "in uint gl_IncomingRayFlagsNV;" "in uint gl_IncomingRayFlagsEXT;" "in float gl_CurrentRayTimeNV;" - "in uint gl_CullMaskEXT;" "\n"; const char *callableDecls = @@ -6255,44 +6329,38 @@ void TBuiltIns::addQueryFunctions(TSampler sampler, const TString& typeName, int // // textureQueryLod(), fragment stage only // Also enabled with extension GL_ARB_texture_query_lod - // Extension GL_ARB_texture_query_lod says that textureQueryLOD() also exist at extension. if (profile != EEsProfile && version >= 150 && sampler.isCombined() && sampler.dim != EsdRect && ! sampler.isMultiSample() && ! sampler.isBuffer()) { - - const TString funcName[2] = {"vec2 textureQueryLod(", "vec2 textureQueryLOD("}; - - for (int i = 0; i < 2; ++i){ - for (int f16TexAddr = 0; f16TexAddr < 2; ++f16TexAddr) { - if (f16TexAddr && sampler.type != EbtFloat16) - continue; - stageBuiltins[EShLangFragment].append(funcName[i]); - stageBuiltins[EShLangFragment].append(typeName); - if (dimMap[sampler.dim] == 1) - if (f16TexAddr) - stageBuiltins[EShLangFragment].append(", float16_t"); - else - stageBuiltins[EShLangFragment].append(", float"); - else { - if (f16TexAddr) - stageBuiltins[EShLangFragment].append(", f16vec"); - else - stageBuiltins[EShLangFragment].append(", vec"); - stageBuiltins[EShLangFragment].append(postfixes[dimMap[sampler.dim]]); - } - stageBuiltins[EShLangFragment].append(");\n"); - } - - stageBuiltins[EShLangCompute].append(funcName[i]); - stageBuiltins[EShLangCompute].append(typeName); + for (int f16TexAddr = 0; f16TexAddr < 2; ++f16TexAddr) { + if (f16TexAddr && sampler.type != EbtFloat16) + continue; + stageBuiltins[EShLangFragment].append("vec2 textureQueryLod("); + stageBuiltins[EShLangFragment].append(typeName); if (dimMap[sampler.dim] == 1) - stageBuiltins[EShLangCompute].append(", float"); + if (f16TexAddr) + stageBuiltins[EShLangFragment].append(", float16_t"); + else + stageBuiltins[EShLangFragment].append(", float"); else { - stageBuiltins[EShLangCompute].append(", vec"); - stageBuiltins[EShLangCompute].append(postfixes[dimMap[sampler.dim]]); + if (f16TexAddr) + stageBuiltins[EShLangFragment].append(", f16vec"); + else + stageBuiltins[EShLangFragment].append(", vec"); + stageBuiltins[EShLangFragment].append(postfixes[dimMap[sampler.dim]]); } - stageBuiltins[EShLangCompute].append(");\n"); + stageBuiltins[EShLangFragment].append(");\n"); } + + stageBuiltins[EShLangCompute].append("vec2 textureQueryLod("); + stageBuiltins[EShLangCompute].append(typeName); + if (dimMap[sampler.dim] == 1) + stageBuiltins[EShLangCompute].append(", float"); + else { + stageBuiltins[EShLangCompute].append(", vec"); + stageBuiltins[EShLangCompute].append(postfixes[dimMap[sampler.dim]]); + } + stageBuiltins[EShLangCompute].append(");\n"); } // @@ -7633,11 +7701,6 @@ static void BuiltInVariable(const char* name, TBuiltInVariable builtIn, TSymbolT symQualifier.builtIn = builtIn; } -static void RetargetVariable(const char* from, const char* to, TSymbolTable& symbolTable) -{ - symbolTable.retargetSymbol(from, to); -} - // // For built-in variables inside a named block. // SpecialQualifier() won't ever go inside a block; their member's qualifier come @@ -7705,8 +7768,8 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion if (spvVersion.vulkan > 0 && spvVersion.vulkanRelaxed) { // treat these built-ins as aliases of VertexIndex and InstanceIndex - RetargetVariable("gl_InstanceID", "gl_InstanceIndex", symbolTable); - RetargetVariable("gl_VertexID", "gl_VertexIndex", symbolTable); + BuiltInVariable("gl_VertexID", EbvVertexIndex, symbolTable); + BuiltInVariable("gl_InstanceID", EbvInstanceIndex, symbolTable); } if (profile != EEsProfile) { @@ -8077,7 +8140,7 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion } if (profile != EEsProfile && version < 400) { - symbolTable.setFunctionExtensions("textureQueryLOD", 1, &E_GL_ARB_texture_query_lod); + symbolTable.setFunctionExtensions("textureQueryLod", 1, &E_GL_ARB_texture_query_lod); } if (profile != EEsProfile && version >= 460) { @@ -8325,10 +8388,6 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion symbolTable.setVariableExtensions("gl_BaryCoordNoPerspNV", 1, &E_GL_NV_fragment_shader_barycentric); BuiltInVariable("gl_BaryCoordNV", EbvBaryCoordNV, symbolTable); BuiltInVariable("gl_BaryCoordNoPerspNV", EbvBaryCoordNoPerspNV, symbolTable); - symbolTable.setVariableExtensions("gl_BaryCoordEXT", 1, &E_GL_EXT_fragment_shader_barycentric); - symbolTable.setVariableExtensions("gl_BaryCoordNoPerspEXT", 1, &E_GL_EXT_fragment_shader_barycentric); - BuiltInVariable("gl_BaryCoordEXT", EbvBaryCoordEXT, symbolTable); - BuiltInVariable("gl_BaryCoordNoPerspEXT", EbvBaryCoordNoPerspEXT, symbolTable); } if ((profile != EEsProfile && version >= 450) || @@ -8344,7 +8403,7 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion symbolTable.setFunctionExtensions("clockARB", 1, &E_GL_ARB_shader_clock); symbolTable.setFunctionExtensions("clock2x32ARB", 1, &E_GL_ARB_shader_clock); - symbolTable.setFunctionExtensions("clockRealtimeEXT", 1, &E_GL_EXT_shader_realtime_clock); + symbolTable.setFunctionExtensions("clockRealtimeEXT", 1, &E_GL_EXT_shader_realtime_clock); symbolTable.setFunctionExtensions("clockRealtime2x32EXT", 1, &E_GL_EXT_shader_realtime_clock); if (profile == EEsProfile && version < 320) { @@ -8364,11 +8423,10 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion } if (profile != EEsProfile && version < 330 ) { - const char* bitsConvertExt[2] = {E_GL_ARB_shader_bit_encoding, E_GL_ARB_gpu_shader5}; - symbolTable.setFunctionExtensions("floatBitsToInt", 2, bitsConvertExt); - symbolTable.setFunctionExtensions("floatBitsToUint", 2, bitsConvertExt); - symbolTable.setFunctionExtensions("intBitsToFloat", 2, bitsConvertExt); - symbolTable.setFunctionExtensions("uintBitsToFloat", 2, bitsConvertExt); + symbolTable.setFunctionExtensions("floatBitsToInt", 1, &E_GL_ARB_shader_bit_encoding); + symbolTable.setFunctionExtensions("floatBitsToUint", 1, &E_GL_ARB_shader_bit_encoding); + symbolTable.setFunctionExtensions("intBitsToFloat", 1, &E_GL_ARB_shader_bit_encoding); + symbolTable.setFunctionExtensions("uintBitsToFloat", 1, &E_GL_ARB_shader_bit_encoding); } if (profile != EEsProfile && version < 430 ) { @@ -8754,7 +8812,6 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion symbolTable.setVariableExtensions("gl_RayTminEXT", 1, &E_GL_EXT_ray_tracing); symbolTable.setVariableExtensions("gl_RayTmaxNV", 1, &E_GL_NV_ray_tracing); symbolTable.setVariableExtensions("gl_RayTmaxEXT", 1, &E_GL_EXT_ray_tracing); - symbolTable.setVariableExtensions("gl_CullMaskEXT", 1, &E_GL_EXT_ray_cull_mask); symbolTable.setVariableExtensions("gl_HitTNV", 1, &E_GL_NV_ray_tracing); symbolTable.setVariableExtensions("gl_HitTEXT", 1, &E_GL_EXT_ray_tracing); symbolTable.setVariableExtensions("gl_HitKindNV", 1, &E_GL_NV_ray_tracing); @@ -8804,7 +8861,6 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion BuiltInVariable("gl_RayTminEXT", EbvRayTmin, symbolTable); BuiltInVariable("gl_RayTmaxNV", EbvRayTmax, symbolTable); BuiltInVariable("gl_RayTmaxEXT", EbvRayTmax, symbolTable); - BuiltInVariable("gl_CullMaskEXT", EbvCullMask, symbolTable); BuiltInVariable("gl_HitTNV", EbvHitT, symbolTable); BuiltInVariable("gl_HitTEXT", EbvHitT, symbolTable); BuiltInVariable("gl_HitKindNV", EbvHitKind, symbolTable); diff --git a/libraries/glslang/glslang/MachineIndependent/Initialize.h b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/Initialize.h similarity index 100% rename from libraries/glslang/glslang/MachineIndependent/Initialize.h rename to libraries/ZVulkan/src/glslang/glslang/MachineIndependent/Initialize.h diff --git a/libraries/glslang/glslang/MachineIndependent/IntermTraverse.cpp b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/IntermTraverse.cpp similarity index 100% rename from libraries/glslang/glslang/MachineIndependent/IntermTraverse.cpp rename to libraries/ZVulkan/src/glslang/glslang/MachineIndependent/IntermTraverse.cpp diff --git a/libraries/glslang/glslang/MachineIndependent/Intermediate.cpp b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/Intermediate.cpp similarity index 98% rename from libraries/glslang/glslang/MachineIndependent/Intermediate.cpp rename to libraries/ZVulkan/src/glslang/glslang/MachineIndependent/Intermediate.cpp index 14fd053a79..0278445969 100644 --- a/libraries/glslang/glslang/MachineIndependent/Intermediate.cpp +++ b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/Intermediate.cpp @@ -416,24 +416,20 @@ TIntermTyped* TIntermediate::addUnaryMath(TOperator op, TIntermTyped* child, // TODO: but, did this bypass constant folding? // switch (op) { - case EOpConstructInt8: - case EOpConstructUint8: - case EOpConstructInt16: - case EOpConstructUint16: - case EOpConstructInt: - case EOpConstructUint: - case EOpConstructInt64: - case EOpConstructUint64: - case EOpConstructBool: - case EOpConstructFloat: - case EOpConstructDouble: - case EOpConstructFloat16: { - TIntermUnary* unary_node = child->getAsUnaryNode(); - if (unary_node != nullptr) - unary_node->updatePrecision(); - return child; - } - default: break; // some compilers want this + case EOpConstructInt8: + case EOpConstructUint8: + case EOpConstructInt16: + case EOpConstructUint16: + case EOpConstructInt: + case EOpConstructUint: + case EOpConstructInt64: + case EOpConstructUint64: + case EOpConstructBool: + case EOpConstructFloat: + case EOpConstructDouble: + case EOpConstructFloat16: + return child; + default: break; // some compilers want this } // @@ -2766,7 +2762,7 @@ void TIntermBranch::updatePrecision(TPrecisionQualifier parentPrecision) return; if (exp->getBasicType() == EbtInt || exp->getBasicType() == EbtUint || - exp->getBasicType() == EbtFloat) { + exp->getBasicType() == EbtFloat || exp->getBasicType() == EbtFloat16) { if (parentPrecision != EpqNone && exp->getQualifier().precision == EpqNone) { exp->propagatePrecision(parentPrecision); } @@ -3284,7 +3280,7 @@ bool TIntermediate::promoteUnary(TIntermUnary& node) void TIntermUnary::updatePrecision() { if (getBasicType() == EbtInt || getBasicType() == EbtUint || - getBasicType() == EbtFloat) { + getBasicType() == EbtFloat || getBasicType() == EbtFloat16) { if (operand->getQualifier().precision > getQualifier().precision) getQualifier().precision = operand->getQualifier().precision; } @@ -3780,34 +3776,12 @@ bool TIntermediate::promoteAggregate(TIntermAggregate& node) return false; } -// Propagate precision qualifiers *up* from children to parent, and then -// back *down* again to the children's subtrees. -void TIntermAggregate::updatePrecision() -{ - if (getBasicType() == EbtInt || getBasicType() == EbtUint || - getBasicType() == EbtFloat) { - TPrecisionQualifier maxPrecision = EpqNone; - TIntermSequence operands = getSequence(); - for (unsigned int i = 0; i < operands.size(); ++i) { - TIntermTyped* typedNode = operands[i]->getAsTyped(); - assert(typedNode); - maxPrecision = std::max(maxPrecision, typedNode->getQualifier().precision); - } - getQualifier().precision = maxPrecision; - for (unsigned int i = 0; i < operands.size(); ++i) { - TIntermTyped* typedNode = operands[i]->getAsTyped(); - assert(typedNode); - typedNode->propagatePrecision(maxPrecision); - } - } -} - // Propagate precision qualifiers *up* from children to parent, and then // back *down* again to the children's subtrees. void TIntermBinary::updatePrecision() { if (getBasicType() == EbtInt || getBasicType() == EbtUint || - getBasicType() == EbtFloat) { + getBasicType() == EbtFloat || getBasicType() == EbtFloat16) { if (op == EOpRightShift || op == EOpLeftShift) { // For shifts get precision from left side only and thus no need to propagate getQualifier().precision = left->getQualifier().precision; @@ -3902,7 +3876,7 @@ TIntermTyped* TIntermediate::promoteConstantUnion(TBasicType promoteTo, TIntermC case EbtFloat16: PROMOTE(setDConst, double, Get); break; \ case EbtFloat: PROMOTE(setDConst, double, Get); break; \ case EbtDouble: PROMOTE(setDConst, double, Get); break; \ - case EbtInt8: PROMOTE(setI8Const, signed char, Get); break; \ + case EbtInt8: PROMOTE(setI8Const, char, Get); break; \ case EbtInt16: PROMOTE(setI16Const, short, Get); break; \ case EbtInt: PROMOTE(setIConst, int, Get); break; \ case EbtInt64: PROMOTE(setI64Const, long long, Get); break; \ diff --git a/libraries/glslang/glslang/MachineIndependent/LiveTraverser.h b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/LiveTraverser.h similarity index 100% rename from libraries/glslang/glslang/MachineIndependent/LiveTraverser.h rename to libraries/ZVulkan/src/glslang/glslang/MachineIndependent/LiveTraverser.h diff --git a/libraries/glslang/glslang/MachineIndependent/ParseContextBase.cpp b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/ParseContextBase.cpp similarity index 97% rename from libraries/glslang/glslang/MachineIndependent/ParseContextBase.cpp rename to libraries/ZVulkan/src/glslang/glslang/MachineIndependent/ParseContextBase.cpp index 616580f993..02cca409e1 100644 --- a/libraries/glslang/glslang/MachineIndependent/ParseContextBase.cpp +++ b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/ParseContextBase.cpp @@ -74,9 +74,6 @@ void C_DECL TParseContextBase::error(const TSourceLoc& loc, const char* szReason { if (messages & EShMsgOnlyPreprocessor) return; - // If enhanced msg readability, only print one error - if (messages & EShMsgEnhanced && numErrors > 0) - return; va_list args; va_start(args, szExtraInfoFormat); outputMessage(loc, szReason, szToken, szExtraInfoFormat, EPrefixError, args); @@ -625,19 +622,6 @@ void TParseContextBase::growGlobalUniformBlock(const TSourceLoc& loc, TType& mem globalUniformBlock->getWritableType().getQualifier().layoutBinding = globalUniformBinding; globalUniformBlock->getWritableType().getQualifier().layoutSet = globalUniformSet; - // Check for declarations of this default uniform that already exist due to other compilation units. - TSymbol* symbol = symbolTable.find(memberName); - if (symbol) { - if (memberType != symbol->getType()) { - TString err; - err += "\"" + memberType.getCompleteString() + "\""; - err += " versus "; - err += "\"" + symbol->getType().getCompleteString() + "\""; - error(loc, "Types must match:", memberType.getFieldName().c_str(), err.c_str()); - } - return; - } - // Add the requested member as a member to the global block. TType* type = new TType; type->shallowCopy(memberType); diff --git a/libraries/glslang/glslang/MachineIndependent/ParseHelper.cpp b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/ParseHelper.cpp similarity index 98% rename from libraries/glslang/glslang/MachineIndependent/ParseHelper.cpp rename to libraries/ZVulkan/src/glslang/glslang/MachineIndependent/ParseHelper.cpp index 45a72d9333..b957bb87ca 100644 --- a/libraries/glslang/glslang/MachineIndependent/ParseHelper.cpp +++ b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/ParseHelper.cpp @@ -716,7 +716,7 @@ bool TParseContext::isIoResizeArray(const TType& type) const (language == EShLangTessControl && type.getQualifier().storage == EvqVaryingOut && ! type.getQualifier().patch) || (language == EShLangFragment && type.getQualifier().storage == EvqVaryingIn && - (type.getQualifier().pervertexNV || type.getQualifier().pervertexEXT)) || + type.getQualifier().pervertexNV) || (language == EShLangMeshNV && type.getQualifier().storage == EvqVaryingOut && !type.getQualifier().perTaskNV)); } @@ -856,7 +856,7 @@ void TParseContext::checkIoArrayConsistency(const TSourceLoc& loc, int requiredS error(loc, "inconsistent output number of vertices for array size of", feature, name.c_str()); else if (language == EShLangFragment) { if (type.getOuterArraySize() > requiredSize) - error(loc, " cannot be greater than 3 for pervertexEXT", feature, name.c_str()); + error(loc, " cannot be greater than 3 for pervertexNV", feature, name.c_str()); } else if (language == EShLangMeshNV) error(loc, "inconsistent output array size of", feature, name.c_str()); @@ -902,10 +902,8 @@ TIntermTyped* TParseContext::handleBinaryMath(const TSourceLoc& loc, const char* result = intermediate.addBinaryMath(op, left, right, loc); } - if (result == nullptr) { - bool enhanced = intermediate.getEnhancedMsgs(); - binaryOpError(loc, str, left->getCompleteString(enhanced), right->getCompleteString(enhanced)); - } + if (result == nullptr) + binaryOpError(loc, str, left->getCompleteString(), right->getCompleteString()); return result; } @@ -928,10 +926,8 @@ TIntermTyped* TParseContext::handleUnaryMath(const TSourceLoc& loc, const char* if (result) return result; - else { - bool enhanced = intermediate.getEnhancedMsgs(); - unaryOpError(loc, str, childNode->getCompleteString(enhanced)); - } + else + unaryOpError(loc, str, childNode->getCompleteString()); return childNode; } @@ -957,8 +953,8 @@ TIntermTyped* TParseContext::handleDotDereference(const TSourceLoc& loc, TInterm requireProfile(loc, ~EEsProfile, feature); profileRequires(loc, ~EEsProfile, 420, E_GL_ARB_shading_language_420pack, feature); } else if (!base->getType().isCoopMat()) { - bool enhanced = intermediate.getEnhancedMsgs(); - error(loc, "does not operate on this type:", field.c_str(), base->getType().getCompleteString(enhanced).c_str()); + error(loc, "does not operate on this type:", field.c_str(), base->getType().getCompleteString().c_str()); + return base; } @@ -1009,16 +1005,10 @@ TIntermTyped* TParseContext::handleDotDereference(const TSourceLoc& loc, TInterm intermediate.addIoAccessed(field); } inheritMemoryQualifiers(base->getQualifier(), result->getWritableType().getQualifier()); - } else { - auto baseSymbol = base; - while (baseSymbol->getAsSymbolNode() == nullptr) - baseSymbol = baseSymbol->getAsBinaryNode()->getLeft(); - TString structName; - structName.append("\'").append(baseSymbol->getAsSymbolNode()->getName().c_str()).append( "\'"); - error(loc, "no such field in structure", field.c_str(), structName.c_str()); - } + } else + error(loc, "no such field in structure", field.c_str(), ""); } else - error(loc, "does not apply to this type:", field.c_str(), base->getType().getCompleteString(intermediate.getEnhancedMsgs()).c_str()); + error(loc, "does not apply to this type:", field.c_str(), base->getType().getCompleteString().c_str()); // Propagate noContraction up the dereference chain if (base->getQualifier().isNoContraction()) @@ -1324,14 +1314,14 @@ TIntermTyped* TParseContext::handleFunctionCall(const TSourceLoc& loc, TFunction // result = addConstructor(loc, arguments, type); if (result == nullptr) - error(loc, "cannot construct with these arguments", type.getCompleteString(intermediate.getEnhancedMsgs()).c_str(), ""); + error(loc, "cannot construct with these arguments", type.getCompleteString().c_str(), ""); } } else { // // Find it in the symbol table. // const TFunction* fnCandidate; - bool builtIn {false}; + bool builtIn; fnCandidate = findFunction(loc, *function, builtIn); if (fnCandidate) { // This is a declared function that might map to @@ -1504,7 +1494,7 @@ TIntermTyped* TParseContext::handleBuiltInFunctionCall(TSourceLoc loc, TIntermNo else error(arguments->getLoc(), " wrong operand type", "Internal Error", "built in unary operator function. Type: %s", - static_cast(arguments)->getCompleteString(intermediate.getEnhancedMsgs()).c_str()); + static_cast(arguments)->getCompleteString().c_str()); } else if (result->getAsOperator()) builtInOpCheck(loc, function, *result->getAsOperator()); @@ -2327,7 +2317,7 @@ void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCan error(loc, "argument must be compile-time constant", "payload number", "a"); else { unsigned int location = (*argp)[10]->getAsConstantUnion()->getAsConstantUnion()->getConstArray()[0].getUConst(); - if (!extensionTurnedOn(E_GL_EXT_spirv_intrinsics) && intermediate.checkLocationRT(0, location) < 0) + if (intermediate.checkLocationRT(0, location) < 0) error(loc, "with layout(location =", "no rayPayloadEXT/rayPayloadInEXT declared", "%d)", location); } break; @@ -2340,7 +2330,7 @@ void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCan error(loc, "argument must be compile-time constant", "callable data number", ""); else { unsigned int location = (*argp)[1]->getAsConstantUnion()->getAsConstantUnion()->getConstArray()[0].getUConst(); - if (!extensionTurnedOn(E_GL_EXT_spirv_intrinsics) && intermediate.checkLocationRT(1, location) < 0) + if (intermediate.checkLocationRT(1, location) < 0) error(loc, "with layout(location =", "no callableDataEXT/callableDataInEXT declared", "%d)", location); } break; @@ -2505,8 +2495,6 @@ void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCan case EOpEmitStreamVertex: case EOpEndStreamPrimitive: - if (version == 150) - requireExtensions(loc, 1, &E_GL_ARB_gpu_shader5, "if the verison is 150 , the EmitStreamVertex and EndStreamPrimitive only support at extension GL_ARB_gpu_shader5"); intermediate.setMultiStream(); break; @@ -2609,24 +2597,23 @@ void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCan // Check that if extended types are being used that the correct extensions are enabled. if (arg0 != nullptr) { const TType& type = arg0->getType(); - bool enhanced = intermediate.getEnhancedMsgs(); switch (type.getBasicType()) { default: break; case EbtInt8: case EbtUint8: - requireExtensions(loc, 1, &E_GL_EXT_shader_subgroup_extended_types_int8, type.getCompleteString(enhanced).c_str()); + requireExtensions(loc, 1, &E_GL_EXT_shader_subgroup_extended_types_int8, type.getCompleteString().c_str()); break; case EbtInt16: case EbtUint16: - requireExtensions(loc, 1, &E_GL_EXT_shader_subgroup_extended_types_int16, type.getCompleteString(enhanced).c_str()); + requireExtensions(loc, 1, &E_GL_EXT_shader_subgroup_extended_types_int16, type.getCompleteString().c_str()); break; case EbtInt64: case EbtUint64: - requireExtensions(loc, 1, &E_GL_EXT_shader_subgroup_extended_types_int64, type.getCompleteString(enhanced).c_str()); + requireExtensions(loc, 1, &E_GL_EXT_shader_subgroup_extended_types_int64, type.getCompleteString().c_str()); break; case EbtFloat16: - requireExtensions(loc, 1, &E_GL_EXT_shader_subgroup_extended_types_float16, type.getCompleteString(enhanced).c_str()); + requireExtensions(loc, 1, &E_GL_EXT_shader_subgroup_extended_types_float16, type.getCompleteString().c_str()); break; } } @@ -2799,10 +2786,7 @@ TFunction* TParseContext::handleConstructorCall(const TSourceLoc& loc, const TPu TOperator op = intermediate.mapTypeToConstructorOp(type); if (op == EOpNull) { - if (intermediate.getEnhancedMsgs() && type.getBasicType() == EbtSampler) - error(loc, "function not supported in this version; use texture() instead", "texture*D*", ""); - else - error(loc, "cannot construct this type", type.getBasicString(), ""); + error(loc, "cannot construct this type", type.getBasicString(), ""); op = EOpConstructFloat; TType errorType(EbtFloat); type.shallowCopy(errorType); @@ -3045,14 +3029,11 @@ void TParseContext::constantValueCheck(TIntermTyped* node, const char* token) // // Both test, and if necessary spit out an error, to see if the node is really -// a 32-bit integer or can implicitly convert to one. +// an integer. // void TParseContext::integerCheck(const TIntermTyped* node, const char* token) { - auto from_type = node->getBasicType(); - if ((from_type == EbtInt || from_type == EbtUint || - intermediate.canImplicitlyPromote(from_type, EbtInt, EOpNull) || - intermediate.canImplicitlyPromote(from_type, EbtUint, EOpNull)) && node->isScalar()) + if ((node->getBasicType() == EbtInt || node->getBasicType() == EbtUint) && node->isScalar()) return; error(node->getLoc(), "scalar integer expression required", token, ""); @@ -3212,12 +3193,6 @@ bool TParseContext::constructorError(const TSourceLoc& loc, TIntermNode* node, T break; } - TString constructorString; - if (intermediate.getEnhancedMsgs()) - constructorString.append(type.getCompleteString(true, false, false, true)).append(" constructor"); - else - constructorString.append("constructor"); - // See if it's a matrix bool constructingMatrix = false; switch (op) { @@ -3275,7 +3250,7 @@ bool TParseContext::constructorError(const TSourceLoc& loc, TIntermNode* node, T if (function[arg].type->isArray()) { if (function[arg].type->isUnsizedArray()) { // Can't construct from an unsized array. - error(loc, "array argument must be sized", constructorString.c_str(), ""); + error(loc, "array argument must be sized", "constructor", ""); return true; } arrayArg = true; @@ -3305,13 +3280,13 @@ bool TParseContext::constructorError(const TSourceLoc& loc, TIntermNode* node, T intArgument = true; if (type.isStruct()) { if (function[arg].type->contains16BitFloat()) { - requireFloat16Arithmetic(loc, constructorString.c_str(), "can't construct structure containing 16-bit type"); + requireFloat16Arithmetic(loc, "constructor", "can't construct structure containing 16-bit type"); } if (function[arg].type->contains16BitInt()) { - requireInt16Arithmetic(loc, constructorString.c_str(), "can't construct structure containing 16-bit type"); + requireInt16Arithmetic(loc, "constructor", "can't construct structure containing 16-bit type"); } if (function[arg].type->contains8BitInt()) { - requireInt8Arithmetic(loc, constructorString.c_str(), "can't construct structure containing 8-bit type"); + requireInt8Arithmetic(loc, "constructor", "can't construct structure containing 8-bit type"); } } } @@ -3325,9 +3300,9 @@ bool TParseContext::constructorError(const TSourceLoc& loc, TIntermNode* node, T case EOpConstructF16Vec3: case EOpConstructF16Vec4: if (type.isArray()) - requireFloat16Arithmetic(loc, constructorString.c_str(), "16-bit arrays not supported"); + requireFloat16Arithmetic(loc, "constructor", "16-bit arrays not supported"); if (type.isVector() && function.getParamCount() != 1) - requireFloat16Arithmetic(loc, constructorString.c_str(), "16-bit vectors only take vector types"); + requireFloat16Arithmetic(loc, "constructor", "16-bit vectors only take vector types"); break; case EOpConstructUint16: case EOpConstructU16Vec2: @@ -3338,9 +3313,9 @@ bool TParseContext::constructorError(const TSourceLoc& loc, TIntermNode* node, T case EOpConstructI16Vec3: case EOpConstructI16Vec4: if (type.isArray()) - requireInt16Arithmetic(loc, constructorString.c_str(), "16-bit arrays not supported"); + requireInt16Arithmetic(loc, "constructor", "16-bit arrays not supported"); if (type.isVector() && function.getParamCount() != 1) - requireInt16Arithmetic(loc, constructorString.c_str(), "16-bit vectors only take vector types"); + requireInt16Arithmetic(loc, "constructor", "16-bit vectors only take vector types"); break; case EOpConstructUint8: case EOpConstructU8Vec2: @@ -3351,9 +3326,9 @@ bool TParseContext::constructorError(const TSourceLoc& loc, TIntermNode* node, T case EOpConstructI8Vec3: case EOpConstructI8Vec4: if (type.isArray()) - requireInt8Arithmetic(loc, constructorString.c_str(), "8-bit arrays not supported"); + requireInt8Arithmetic(loc, "constructor", "8-bit arrays not supported"); if (type.isVector() && function.getParamCount() != 1) - requireInt8Arithmetic(loc, constructorString.c_str(), "8-bit vectors only take vector types"); + requireInt8Arithmetic(loc, "constructor", "8-bit vectors only take vector types"); break; default: break; @@ -3435,7 +3410,7 @@ bool TParseContext::constructorError(const TSourceLoc& loc, TIntermNode* node, T if (type.isArray()) { if (function.getParamCount() == 0) { - error(loc, "array constructor must have at least one argument", constructorString.c_str(), ""); + error(loc, "array constructor must have at least one argument", "constructor", ""); return true; } @@ -3443,7 +3418,7 @@ bool TParseContext::constructorError(const TSourceLoc& loc, TIntermNode* node, T // auto adapt the constructor type to the number of arguments type.changeOuterArraySize(function.getParamCount()); } else if (type.getOuterArraySize() != function.getParamCount()) { - error(loc, "array constructor needs one argument per array element", constructorString.c_str(), ""); + error(loc, "array constructor needs one argument per array element", "constructor", ""); return true; } @@ -3456,7 +3431,7 @@ bool TParseContext::constructorError(const TSourceLoc& loc, TIntermNode* node, T // At least the dimensionalities have to match. if (! function[0].type->isArray() || arraySizes.getNumDims() != function[0].type->getArraySizes()->getNumDims() + 1) { - error(loc, "array constructor argument not correct type to construct array element", constructorString.c_str(), ""); + error(loc, "array constructor argument not correct type to construct array element", "constructor", ""); return true; } @@ -3473,7 +3448,7 @@ bool TParseContext::constructorError(const TSourceLoc& loc, TIntermNode* node, T } if (arrayArg && op != EOpConstructStruct && ! type.isArrayOfArrays()) { - error(loc, "constructing non-array constituent from array argument", constructorString.c_str(), ""); + error(loc, "constructing non-array constituent from array argument", "constructor", ""); return true; } @@ -3483,51 +3458,51 @@ bool TParseContext::constructorError(const TSourceLoc& loc, TIntermNode* node, T // "If a matrix argument is given to a matrix constructor, // it is a compile-time error to have any other arguments." if (function.getParamCount() != 1) - error(loc, "matrix constructed from matrix can only have one argument", constructorString.c_str(), ""); + error(loc, "matrix constructed from matrix can only have one argument", "constructor", ""); return false; } if (overFull) { - error(loc, "too many arguments", constructorString.c_str(), ""); + error(loc, "too many arguments", "constructor", ""); return true; } if (op == EOpConstructStruct && ! type.isArray() && (int)type.getStruct()->size() != function.getParamCount()) { - error(loc, "Number of constructor parameters does not match the number of structure fields", constructorString.c_str(), ""); + error(loc, "Number of constructor parameters does not match the number of structure fields", "constructor", ""); return true; } if ((op != EOpConstructStruct && size != 1 && size < type.computeNumComponents()) || (op == EOpConstructStruct && size < type.computeNumComponents())) { - error(loc, "not enough data provided for construction", constructorString.c_str(), ""); + error(loc, "not enough data provided for construction", "constructor", ""); return true; } if (type.isCoopMat() && function.getParamCount() != 1) { - error(loc, "wrong number of arguments", constructorString.c_str(), ""); + error(loc, "wrong number of arguments", "constructor", ""); return true; } if (type.isCoopMat() && !(function[0].type->isScalar() || function[0].type->isCoopMat())) { - error(loc, "Cooperative matrix constructor argument must be scalar or cooperative matrix", constructorString.c_str(), ""); + error(loc, "Cooperative matrix constructor argument must be scalar or cooperative matrix", "constructor", ""); return true; } TIntermTyped* typed = node->getAsTyped(); if (typed == nullptr) { - error(loc, "constructor argument does not have a type", constructorString.c_str(), ""); + error(loc, "constructor argument does not have a type", "constructor", ""); return true; } if (op != EOpConstructStruct && op != EOpConstructNonuniform && typed->getBasicType() == EbtSampler) { - error(loc, "cannot convert a sampler", constructorString.c_str(), ""); + error(loc, "cannot convert a sampler", "constructor", ""); return true; } if (op != EOpConstructStruct && typed->isAtomic()) { - error(loc, "cannot convert an atomic_uint", constructorString.c_str(), ""); + error(loc, "cannot convert an atomic_uint", "constructor", ""); return true; } if (typed->getBasicType() == EbtVoid) { - error(loc, "cannot convert a void", constructorString.c_str(), ""); + error(loc, "cannot convert a void", "constructor", ""); return true; } @@ -3806,7 +3781,7 @@ void TParseContext::globalQualifierTypeCheck(const TSourceLoc& loc, const TQuali if (isTypeInt(publicType.basicType) || publicType.basicType == EbtDouble) profileRequires(loc, EEsProfile, 300, nullptr, "shader input/output"); - if (!qualifier.flat && !qualifier.isExplicitInterpolation() && !qualifier.isPervertexNV() && !qualifier.isPervertexEXT()) { + if (!qualifier.flat && !qualifier.isExplicitInterpolation() && !qualifier.isPervertexNV()) { if (isTypeInt(publicType.basicType) || publicType.basicType == EbtDouble || (publicType.userDef && ( publicType.userDef->containsBasicType(EbtInt) @@ -4611,7 +4586,7 @@ TSymbol* TParseContext::redeclareBuiltinVariable(const TSourceLoc& loc, const TS if (ssoPre150 || (identifier == "gl_FragDepth" && ((nonEsRedecls && version >= 420) || esRedecls)) || - (identifier == "gl_FragCoord" && ((nonEsRedecls && version >= 140) || esRedecls)) || + (identifier == "gl_FragCoord" && ((nonEsRedecls && version >= 150) || esRedecls)) || identifier == "gl_ClipDistance" || identifier == "gl_CullDistance" || identifier == "gl_ShadingRateEXT" || @@ -4680,7 +4655,7 @@ TSymbol* TParseContext::redeclareBuiltinVariable(const TSourceLoc& loc, const TS symbolQualifier.storage != qualifier.storage) error(loc, "cannot change qualification of", "redeclaration", symbol->getName().c_str()); } else if (identifier == "gl_FragCoord") { - if (!intermediate.getTexCoordRedeclared() && intermediate.inIoAccessed("gl_FragCoord")) + if (intermediate.inIoAccessed("gl_FragCoord")) error(loc, "cannot redeclare after use", "gl_FragCoord", ""); if (qualifier.nopersp != symbolQualifier.nopersp || qualifier.flat != symbolQualifier.flat || qualifier.isMemory() || qualifier.isAuxiliary()) @@ -4690,9 +4665,6 @@ TSymbol* TParseContext::redeclareBuiltinVariable(const TSourceLoc& loc, const TS if (! builtIn && (publicType.pixelCenterInteger != intermediate.getPixelCenterInteger() || publicType.originUpperLeft != intermediate.getOriginUpperLeft())) error(loc, "cannot redeclare with different qualification:", "redeclaration", symbol->getName().c_str()); - - - intermediate.setTexCoordRedeclared(); if (publicType.pixelCenterInteger) intermediate.setPixelCenterInteger(); if (publicType.originUpperLeft) @@ -5524,19 +5496,12 @@ void TParseContext::setLayoutQualifier(const TSourceLoc& loc, TPublicType& publi } if (language == EShLangFragment) { if (id == "origin_upper_left") { - requireProfile(loc, ECoreProfile | ECompatibilityProfile | ENoProfile, "origin_upper_left"); - if (profile == ENoProfile) { - profileRequires(loc,ECoreProfile | ECompatibilityProfile, 140, E_GL_ARB_fragment_coord_conventions, "origin_upper_left"); - } - + requireProfile(loc, ECoreProfile | ECompatibilityProfile, "origin_upper_left"); publicType.shaderQualifiers.originUpperLeft = true; return; } if (id == "pixel_center_integer") { - requireProfile(loc, ECoreProfile | ECompatibilityProfile | ENoProfile, "pixel_center_integer"); - if (profile == ENoProfile) { - profileRequires(loc,ECoreProfile | ECompatibilityProfile, 140, E_GL_ARB_fragment_coord_conventions, "pixel_center_integer"); - } + requireProfile(loc, ECoreProfile | ECompatibilityProfile, "pixel_center_integer"); publicType.shaderQualifiers.pixelCenterInteger = true; return; } @@ -6069,8 +6034,6 @@ void TParseContext::mergeObjectLayoutQualifiers(TQualifier& dst, const TQualifie dst.layoutShaderRecord = true; if (src.pervertexNV) dst.pervertexNV = true; - if (src.pervertexEXT) - dst.pervertexEXT = true; #endif } } @@ -6244,13 +6207,11 @@ void TParseContext::layoutTypeCheck(const TSourceLoc& loc, const TType& type) #ifndef GLSLANG_WEB if (qualifier.hasXfbOffset() && qualifier.hasXfbBuffer()) { - if (type.isUnsizedArray()) { + int repeated = intermediate.addXfbBufferOffset(type); + if (repeated >= 0) + error(loc, "overlapping offsets at", "xfb_offset", "offset %d in buffer %d", repeated, qualifier.layoutXfbBuffer); + if (type.isUnsizedArray()) error(loc, "unsized array", "xfb_offset", "in buffer %d", qualifier.layoutXfbBuffer); - } else { - int repeated = intermediate.addXfbBufferOffset(type); - if (repeated >= 0) - error(loc, "overlapping offsets at", "xfb_offset", "offset %d in buffer %d", repeated, qualifier.layoutXfbBuffer); - } // "The offset must be a multiple of the size of the first component of the first // qualified variable or block member, or a compile-time error results. Further, if applied to an aggregate @@ -6370,12 +6331,8 @@ void TParseContext::layoutTypeCheck(const TSourceLoc& loc, const TType& type) profileRequires(loc, ECoreProfile | ECompatibilityProfile, 0, E_GL_EXT_shader_image_load_formatted, explanation); } - if (qualifier.isPushConstant()) { - if (type.getBasicType() != EbtBlock) - error(loc, "can only be used with a block", "push_constant", ""); - if (type.isArray()) - error(loc, "Push constants blocks can't be an array", "push_constant", ""); - } + if (qualifier.isPushConstant() && type.getBasicType() != EbtBlock) + error(loc, "can only be used with a block", "push_constant", ""); if (qualifier.hasBufferReference() && type.getBasicType() != EbtBlock) error(loc, "can only be used with a block", "buffer_reference", ""); @@ -6536,8 +6493,6 @@ void TParseContext::layoutQualifierCheck(const TSourceLoc& loc, const TQualifier error(loc, "can only be used with a uniform", "push_constant", ""); if (qualifier.hasSet()) error(loc, "cannot be used with push_constant", "set", ""); - if (qualifier.hasBinding()) - error(loc, "cannot be used with push_constant", "binding", ""); } if (qualifier.hasBufferReference()) { if (qualifier.storage != EvqBuffer) @@ -6692,10 +6647,8 @@ const TFunction* TParseContext::findFunction(const TSourceLoc& loc, const TFunct : findFunctionExact(loc, call, builtIn)); else if (version < 120) function = findFunctionExact(loc, call, builtIn); - else if (version < 400) { - bool needfindFunction400 = extensionTurnedOn(E_GL_ARB_gpu_shader_fp64) || extensionTurnedOn(E_GL_ARB_gpu_shader5); - function = needfindFunction400 ? findFunction400(loc, call, builtIn) : findFunction120(loc, call, builtIn); - } + else if (version < 400) + function = extensionTurnedOn(E_GL_ARB_gpu_shader_fp64) ? findFunction400(loc, call, builtIn) : findFunction120(loc, call, builtIn); else if (explicitTypesEnabled) function = findFunctionExplicitTypes(loc, call, builtIn); else @@ -7466,14 +7419,14 @@ TIntermNode* TParseContext::executeInitializer(const TSourceLoc& loc, TIntermTyp // Uniforms require a compile-time constant initializer if (qualifier == EvqUniform && ! initializer->getType().getQualifier().isFrontEndConstant()) { error(loc, "uniform initializers must be constant", "=", "'%s'", - variable->getType().getCompleteString(intermediate.getEnhancedMsgs()).c_str()); + variable->getType().getCompleteString().c_str()); variable->getWritableType().getQualifier().makeTemporary(); return nullptr; } // Global consts require a constant initializer (specialization constant is okay) if (qualifier == EvqConst && symbolTable.atGlobalLevel() && ! initializer->getType().getQualifier().isConstant()) { error(loc, "global const initializers must be constant", "=", "'%s'", - variable->getType().getCompleteString(intermediate.getEnhancedMsgs()).c_str()); + variable->getType().getCompleteString().c_str()); variable->getWritableType().getQualifier().makeTemporary(); return nullptr; } @@ -7536,7 +7489,7 @@ TIntermNode* TParseContext::executeInitializer(const TSourceLoc& loc, TIntermTyp TIntermSymbol* intermSymbol = intermediate.addSymbol(*variable, loc); TIntermTyped* initNode = intermediate.addAssign(EOpAssign, intermSymbol, initializer, loc); if (! initNode) - assignError(loc, "=", intermSymbol->getCompleteString(intermediate.getEnhancedMsgs()), initializer->getCompleteString(intermediate.getEnhancedMsgs())); + assignError(loc, "=", intermSymbol->getCompleteString(), initializer->getCompleteString()); return initNode; } @@ -7607,7 +7560,7 @@ TIntermTyped* TParseContext::convertInitializerList(const TSourceLoc& loc, const } } else if (type.isMatrix()) { if (type.getMatrixCols() != (int)initList->getSequence().size()) { - error(loc, "wrong number of matrix columns:", "initializer list", type.getCompleteString(intermediate.getEnhancedMsgs()).c_str()); + error(loc, "wrong number of matrix columns:", "initializer list", type.getCompleteString().c_str()); return nullptr; } TType vectorType(type, 0); // dereferenced type @@ -7618,20 +7571,20 @@ TIntermTyped* TParseContext::convertInitializerList(const TSourceLoc& loc, const } } else if (type.isVector()) { if (type.getVectorSize() != (int)initList->getSequence().size()) { - error(loc, "wrong vector size (or rows in a matrix column):", "initializer list", type.getCompleteString(intermediate.getEnhancedMsgs()).c_str()); + error(loc, "wrong vector size (or rows in a matrix column):", "initializer list", type.getCompleteString().c_str()); return nullptr; } TBasicType destType = type.getBasicType(); for (int i = 0; i < type.getVectorSize(); ++i) { TBasicType initType = initList->getSequence()[i]->getAsTyped()->getBasicType(); if (destType != initType && !intermediate.canImplicitlyPromote(initType, destType)) { - error(loc, "type mismatch in initializer list", "initializer list", type.getCompleteString(intermediate.getEnhancedMsgs()).c_str()); + error(loc, "type mismatch in initializer list", "initializer list", type.getCompleteString().c_str()); return nullptr; } } } else { - error(loc, "unexpected initializer-list type:", "initializer list", type.getCompleteString(intermediate.getEnhancedMsgs()).c_str()); + error(loc, "unexpected initializer-list type:", "initializer list", type.getCompleteString().c_str()); return nullptr; } @@ -7738,13 +7691,7 @@ TIntermTyped* TParseContext::addConstructor(const TSourceLoc& loc, TIntermNode* return nullptr; } - TIntermTyped *ret_node = intermediate.setAggregateOperator(aggrNode, op, type, loc); - - TIntermAggregate *agg_node = ret_node->getAsAggregate(); - if (agg_node && (agg_node->isVector() || agg_node->isArray() || agg_node->isMatrix())) - agg_node->updatePrecision(); - - return ret_node; + return intermediate.setAggregateOperator(aggrNode, op, type, loc); } // Function for constructor implementation. Calls addUnaryMath with appropriate EOp value @@ -8139,9 +8086,8 @@ TIntermTyped* TParseContext::constructAggregate(TIntermNode* node, const TType& { TIntermTyped* converted = intermediate.addConversion(EOpConstructStruct, type, node->getAsTyped()); if (! converted || converted->getType() != type) { - bool enhanced = intermediate.getEnhancedMsgs(); error(loc, "", "constructor", "cannot convert parameter %d from '%s' to '%s'", paramCount, - node->getAsTyped()->getType().getCompleteString(enhanced).c_str(), type.getCompleteString(enhanced).c_str()); + node->getAsTyped()->getType().getCompleteString().c_str(), type.getCompleteString().c_str()); return nullptr; } @@ -9291,14 +9237,11 @@ TIntermNode* TParseContext::addSwitch(const TSourceLoc& loc, TIntermTyped* expre // "it is an error to have no statement between a label and the end of the switch statement." // The specifications were updated to remove this (being ill-defined what a "statement" was), // so, this became a warning. However, 3.0 tests still check for the error. - if (isEsProfile() && (version <= 300 || version >= 320) && ! relaxedErrors()) - error(loc, "last case/default label not followed by statements", "switch", ""); - else if (!isEsProfile() && (version <= 430 || version >= 460)) + if (isEsProfile() && version <= 300 && ! relaxedErrors()) error(loc, "last case/default label not followed by statements", "switch", ""); else warn(loc, "last case/default label not followed by statements", "switch", ""); - // emulate a break for error recovery lastStatements = intermediate.makeAggregate(intermediate.addBranch(EOpBreak, loc)); lastStatements->setOperator(EOpSequence); diff --git a/libraries/glslang/glslang/MachineIndependent/ParseHelper.h b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/ParseHelper.h similarity index 99% rename from libraries/glslang/glslang/MachineIndependent/ParseHelper.h rename to libraries/ZVulkan/src/glslang/glslang/MachineIndependent/ParseHelper.h index 885fd90810..de44884653 100644 --- a/libraries/glslang/glslang/MachineIndependent/ParseHelper.h +++ b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/ParseHelper.h @@ -241,7 +241,7 @@ protected: // override this to set the language-specific name virtual const char* getAtomicCounterBlockName() const { return ""; } virtual void setAtomicCounterBlockDefaults(TType&) const {} - virtual void setInvariant(const TSourceLoc&, const char*) {} + virtual void setInvariant(const TSourceLoc& loc, const char* builtin) {} virtual void finalizeAtomicCounterBlockLayout(TVariable&) {} bool isAtomicCounterBlock(const TSymbol& symbol) { const TVariable* var = symbol.getAsVariable(); @@ -472,7 +472,7 @@ public: // Determine loop control from attributes void handleLoopAttributes(const TAttributes& attributes, TIntermNode*); // Function attributes - void handleFunctionAttributes(const TSourceLoc&, const TAttributes&); + void handleFunctionAttributes(const TSourceLoc&, const TAttributes&, TFunction*); // GL_EXT_spirv_intrinsics TSpirvRequirement* makeSpirvRequirement(const TSourceLoc& loc, const TString& name, @@ -480,6 +480,7 @@ public: TSpirvRequirement* mergeSpirvRequirements(const TSourceLoc& loc, TSpirvRequirement* spirvReq1, TSpirvRequirement* spirvReq2); TSpirvTypeParameters* makeSpirvTypeParameters(const TSourceLoc& loc, const TIntermConstantUnion* constant); + TSpirvTypeParameters* makeSpirvTypeParameters(const TPublicType& type); TSpirvTypeParameters* mergeSpirvTypeParameters(TSpirvTypeParameters* spirvTypeParams1, TSpirvTypeParameters* spirvTypeParams2); TSpirvInstruction* makeSpirvInstruction(const TSourceLoc& loc, const TString& name, const TString& value); diff --git a/libraries/glslang/glslang/MachineIndependent/PoolAlloc.cpp b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/PoolAlloc.cpp similarity index 100% rename from libraries/glslang/glslang/MachineIndependent/PoolAlloc.cpp rename to libraries/ZVulkan/src/glslang/glslang/MachineIndependent/PoolAlloc.cpp diff --git a/libraries/glslang/glslang/MachineIndependent/RemoveTree.cpp b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/RemoveTree.cpp similarity index 100% rename from libraries/glslang/glslang/MachineIndependent/RemoveTree.cpp rename to libraries/ZVulkan/src/glslang/glslang/MachineIndependent/RemoveTree.cpp diff --git a/libraries/glslang/glslang/MachineIndependent/RemoveTree.h b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/RemoveTree.h similarity index 100% rename from libraries/glslang/glslang/MachineIndependent/RemoveTree.h rename to libraries/ZVulkan/src/glslang/glslang/MachineIndependent/RemoveTree.h diff --git a/libraries/glslang/glslang/MachineIndependent/Scan.cpp b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/Scan.cpp similarity index 99% rename from libraries/glslang/glslang/MachineIndependent/Scan.cpp rename to libraries/ZVulkan/src/glslang/glslang/MachineIndependent/Scan.cpp index f53677f929..c387aede0e 100644 --- a/libraries/glslang/glslang/MachineIndependent/Scan.cpp +++ b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/Scan.cpp @@ -739,7 +739,6 @@ void TScanContext::fillInKeywordMap() (*KeywordMap)["f16subpassInputMS"] = F16SUBPASSINPUTMS; (*KeywordMap)["__explicitInterpAMD"] = EXPLICITINTERPAMD; (*KeywordMap)["pervertexNV"] = PERVERTEXNV; - (*KeywordMap)["pervertexEXT"] = PERVERTEXEXT; (*KeywordMap)["precise"] = PRECISE; (*KeywordMap)["rayPayloadNV"] = PAYLOADNV; @@ -1720,12 +1719,6 @@ int TScanContext::tokenizeIdentifier() return keyword; return identifierOrType(); - case PERVERTEXEXT: - if ((!parseContext.isEsProfile() && parseContext.version >= 450) || - parseContext.extensionTurnedOn(E_GL_EXT_fragment_shader_barycentric)) - return keyword; - return identifierOrType(); - case PRECISE: if ((parseContext.isEsProfile() && (parseContext.version >= 320 || parseContext.extensionsTurnedOn(Num_AEP_gpu_shader5, AEP_gpu_shader5))) || diff --git a/libraries/glslang/glslang/MachineIndependent/Scan.h b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/Scan.h similarity index 100% rename from libraries/glslang/glslang/MachineIndependent/Scan.h rename to libraries/ZVulkan/src/glslang/glslang/MachineIndependent/Scan.h diff --git a/libraries/glslang/glslang/MachineIndependent/ScanContext.h b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/ScanContext.h similarity index 100% rename from libraries/glslang/glslang/MachineIndependent/ScanContext.h rename to libraries/ZVulkan/src/glslang/glslang/MachineIndependent/ScanContext.h diff --git a/libraries/glslang/glslang/MachineIndependent/ShaderLang.cpp b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/ShaderLang.cpp similarity index 98% rename from libraries/glslang/glslang/MachineIndependent/ShaderLang.cpp rename to libraries/ZVulkan/src/glslang/glslang/MachineIndependent/ShaderLang.cpp index 2ef60753bc..17902b5dac 100644 --- a/libraries/glslang/glslang/MachineIndependent/ShaderLang.cpp +++ b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/ShaderLang.cpp @@ -813,7 +813,6 @@ bool ProcessDeferred( // set version/profile to defaultVersion/defaultProfile regardless of the #version // directive in the source code bool forceDefaultVersionAndProfile, - int overrideVersion, // overrides version specified by #verison or default version bool forwardCompatible, // give errors for use of deprecated features EShMessages messages, // warnings/errors/AST; things to print out TIntermediate& intermediate, // returned tree, etc. @@ -901,9 +900,6 @@ bool ProcessDeferred( version = defaultVersion; profile = defaultProfile; } - if (source == EShSourceGlsl && overrideVersion != 0) { - version = overrideVersion; - } bool goodVersion = DeduceVersionProfile(compiler->infoSink, stage, versionNotFirst, defaultVersion, source, version, profile, spvVersion); @@ -1279,7 +1275,6 @@ bool PreprocessDeferred( int defaultVersion, // use 100 for ES environment, 110 for desktop EProfile defaultProfile, bool forceDefaultVersionAndProfile, - int overrideVersion, // use 0 if not overriding GLSL version bool forwardCompatible, // give errors for use of deprecated features EShMessages messages, // warnings/errors/AST; things to print out TShader::Includer& includer, @@ -1290,7 +1285,7 @@ bool PreprocessDeferred( DoPreprocessing parser(outputString); return ProcessDeferred(compiler, shaderStrings, numStrings, inputLengths, stringNames, preamble, optLevel, resources, defaultVersion, - defaultProfile, forceDefaultVersionAndProfile, overrideVersion, + defaultProfile, forceDefaultVersionAndProfile, forwardCompatible, messages, intermediate, parser, false, includer, "", environment); } @@ -1319,7 +1314,6 @@ bool CompileDeferred( int defaultVersion, // use 100 for ES environment, 110 for desktop EProfile defaultProfile, bool forceDefaultVersionAndProfile, - int overrideVersion, // use 0 if not overriding GLSL version bool forwardCompatible, // give errors for use of deprecated features EShMessages messages, // warnings/errors/AST; things to print out TIntermediate& intermediate,// returned tree, etc. @@ -1330,7 +1324,7 @@ bool CompileDeferred( DoFullParse parser; return ProcessDeferred(compiler, shaderStrings, numStrings, inputLengths, stringNames, preamble, optLevel, resources, defaultVersion, - defaultProfile, forceDefaultVersionAndProfile, overrideVersion, + defaultProfile, forceDefaultVersionAndProfile, forwardCompatible, messages, intermediate, parser, true, includer, sourceEntryPointName, environment); } @@ -1349,6 +1343,7 @@ int ShInitialize() glslang::GetGlobalLock(); ++NumberOfClients; + glslang::ReleaseGlobalLock(); if (PerProcessGPA == nullptr) PerProcessGPA = new TPoolAllocator(); @@ -1358,7 +1353,6 @@ int ShInitialize() glslang::HlslScanContext::fillInKeywordMap(); #endif - glslang::ReleaseGlobalLock(); return 1; } @@ -1421,10 +1415,9 @@ int ShFinalize() --NumberOfClients; assert(NumberOfClients >= 0); bool finalize = NumberOfClients == 0; - if (! finalize) { - glslang::ReleaseGlobalLock(); + glslang::ReleaseGlobalLock(); + if (! finalize) return 1; - } for (int version = 0; version < VersionCount; ++version) { for (int spvVersion = 0; spvVersion < SpvVersionCount; ++spvVersion) { @@ -1462,7 +1455,6 @@ int ShFinalize() glslang::HlslScanContext::deleteKeywordMap(); #endif - glslang::ReleaseGlobalLock(); return 1; } @@ -1504,7 +1496,7 @@ int ShCompile( TIntermediate intermediate(compiler->getLanguage()); TShader::ForbidIncluder includer; bool success = CompileDeferred(compiler, shaderStrings, numStrings, inputLengths, nullptr, - "", optLevel, resources, defaultVersion, ENoProfile, false, 0, + "", optLevel, resources, defaultVersion, ENoProfile, false, forwardCompatible, messages, intermediate, includer); // @@ -1765,7 +1757,7 @@ public: }; TShader::TShader(EShLanguage s) - : stage(s), lengths(nullptr), stringNames(nullptr), preamble(""), overrideVersion(0) + : stage(s), lengths(nullptr), stringNames(nullptr), preamble("") { pool = new TPoolAllocator; infoSink = new TInfoSink; @@ -1834,14 +1826,7 @@ void TShader::setUniqueId(unsigned long long id) intermediate->setUniqueId(id); } -void TShader::setOverrideVersion(int version) -{ - overrideVersion = version; -} - void TShader::setInvertY(bool invert) { intermediate->setInvertY(invert); } -void TShader::setDxPositionW(bool invert) { intermediate->setDxPositionW(invert); } -void TShader::setEnhancedMsgs() { intermediate->setEnhancedMsgs(); } void TShader::setNanMinMaxClamp(bool useNonNan) { intermediate->setNanMinMaxClamp(useNonNan); } #ifndef GLSLANG_WEB @@ -1921,7 +1906,7 @@ bool TShader::parse(const TBuiltInResource* builtInResources, int defaultVersion return CompileDeferred(compiler, strings, numStrings, lengths, stringNames, preamble, EShOptNone, builtInResources, defaultVersion, - defaultProfile, forceDefaultVersionAndProfile, overrideVersion, + defaultProfile, forceDefaultVersionAndProfile, forwardCompatible, messages, *intermediate, includer, sourceEntryPointName, &environment); } @@ -1948,7 +1933,7 @@ bool TShader::preprocess(const TBuiltInResource* builtInResources, return PreprocessDeferred(compiler, strings, numStrings, lengths, stringNames, preamble, EShOptNone, builtInResources, defaultVersion, - defaultProfile, forceDefaultVersionAndProfile, overrideVersion, + defaultProfile, forceDefaultVersionAndProfile, forwardCompatible, message, includer, *intermediate, output_string, &environment); } @@ -2061,8 +2046,6 @@ bool TProgram::linkStage(EShLanguage stage, EShMessages messages) firstIntermediate->getVersion(), firstIntermediate->getProfile()); intermediate[stage]->setLimits(firstIntermediate->getLimits()); - if (firstIntermediate->getEnhancedMsgs()) - intermediate[stage]->setEnhancedMsgs(); // The new TIntermediate must use the same origin as the original TIntermediates. // Otherwise linking will fail due to different coordinate systems. diff --git a/libraries/glslang/glslang/MachineIndependent/SpirvIntrinsics.cpp b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/SpirvIntrinsics.cpp similarity index 91% rename from libraries/glslang/glslang/MachineIndependent/SpirvIntrinsics.cpp rename to libraries/ZVulkan/src/glslang/glslang/MachineIndependent/SpirvIntrinsics.cpp index 6650f7d9ee..38094eaaf7 100644 --- a/libraries/glslang/glslang/MachineIndependent/SpirvIntrinsics.cpp +++ b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/SpirvIntrinsics.cpp @@ -130,11 +130,11 @@ void TIntermediate::insertSpirvExecutionModeId(int executionMode, const TIntermA spirvExecutionMode = new TSpirvExecutionMode; assert(args); - TVector extraOperands; + TVector extraOperands; for (auto arg : args->getSequence()) { - auto extraOperand = arg->getAsTyped(); - assert(extraOperand != nullptr && extraOperand->getQualifier().isConstant()); + auto extraOperand = arg->getAsConstantUnion(); + assert(extraOperand != nullptr); extraOperands.push_back(extraOperand); } spirvExecutionMode->modeIds[executionMode] = extraOperands; @@ -165,10 +165,10 @@ void TQualifier::setSpirvDecorateId(int decoration, const TIntermAggregate* args spirvDecorate = new TSpirvDecorate; assert(args); - TVector extraOperands; + TVector extraOperands; for (auto arg : args->getSequence()) { - auto extraOperand = arg->getAsTyped(); - assert(extraOperand != nullptr && extraOperand->getQualifier().isConstant()); + auto extraOperand = arg->getAsConstantUnion(); + assert(extraOperand != nullptr); extraOperands.push_back(extraOperand); } spirvDecorate->decorateIds[decoration] = extraOperands; @@ -201,27 +201,25 @@ TString TQualifier::getSpirvDecorateQualifierString() const const auto appendBool = [&](bool b) { qualifierString.append(std::to_string(b).c_str()); }; const auto appendStr = [&](const char* s) { qualifierString.append(s); }; - const auto appendDecorate = [&](const TIntermTyped* constant) { - auto& constArray = constant->getAsConstantUnion() != nullptr ? constant->getAsConstantUnion()->getConstArray() - : constant->getAsSymbolNode()->getConstArray(); + const auto appendDecorate = [&](const TIntermConstantUnion* constant) { if (constant->getBasicType() == EbtFloat) { - float value = static_cast(constArray[0].getDConst()); + float value = static_cast(constant->getConstArray()[0].getDConst()); appendFloat(value); } else if (constant->getBasicType() == EbtInt) { - int value = constArray[0].getIConst(); + int value = constant->getConstArray()[0].getIConst(); appendInt(value); } else if (constant->getBasicType() == EbtUint) { - unsigned value = constArray[0].getUConst(); + unsigned value = constant->getConstArray()[0].getUConst(); appendUint(value); } else if (constant->getBasicType() == EbtBool) { - bool value = constArray[0].getBConst(); + bool value = constant->getConstArray()[0].getBConst(); appendBool(value); } else if (constant->getBasicType() == EbtString) { - const TString* value = constArray[0].getSConst(); + const TString* value = constant->getConstArray()[0].getSConst(); appendStr(value->c_str()); } else @@ -292,6 +290,13 @@ TSpirvTypeParameters* TParseContext::makeSpirvTypeParameters(const TSourceLoc& l return spirvTypeParams; } +TSpirvTypeParameters* TParseContext::makeSpirvTypeParameters(const TPublicType& type) +{ + TSpirvTypeParameters* spirvTypeParams = new TSpirvTypeParameters; + spirvTypeParams->push_back(TSpirvTypeParameter(new TType(type))); + return spirvTypeParams; +} + TSpirvTypeParameters* TParseContext::mergeSpirvTypeParameters(TSpirvTypeParameters* spirvTypeParams1, TSpirvTypeParameters* spirvTypeParams2) { // Merge SPIR-V type parameters of the second one to the first one diff --git a/libraries/glslang/glslang/MachineIndependent/SymbolTable.cpp b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/SymbolTable.cpp similarity index 93% rename from libraries/glslang/glslang/MachineIndependent/SymbolTable.cpp rename to libraries/ZVulkan/src/glslang/glslang/MachineIndependent/SymbolTable.cpp index a3ffa0c467..747b43666d 100644 --- a/libraries/glslang/glslang/MachineIndependent/SymbolTable.cpp +++ b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/SymbolTable.cpp @@ -279,14 +279,8 @@ TFunction::~TFunction() // TSymbolTableLevel::~TSymbolTableLevel() { - for (tLevel::iterator it = level.begin(); it != level.end(); ++it) { - const TString& name = it->first; - auto retargetIter = std::find_if(retargetedSymbols.begin(), retargetedSymbols.end(), - [&name](const std::pair& i) { return i.first == name; }); - if (retargetIter == retargetedSymbols.end()) - delete (*it).second; - } - + for (tLevel::iterator it = level.begin(); it != level.end(); ++it) + delete (*it).second; delete [] defaultPrecision; } @@ -424,10 +418,6 @@ TSymbolTableLevel* TSymbolTableLevel::clone() const TSymbolTableLevel *symTableLevel = new TSymbolTableLevel(); symTableLevel->anonId = anonId; symTableLevel->thisLevel = thisLevel; - symTableLevel->retargetedSymbols.clear(); - for (auto &s : retargetedSymbols) { - symTableLevel->retargetedSymbols.push_back({s.first, s.second}); - } std::vector containerCopied(anonId, false); tLevel::const_iterator iter; for (iter = level.begin(); iter != level.end(); ++iter) { @@ -443,21 +433,8 @@ TSymbolTableLevel* TSymbolTableLevel::clone() const symTableLevel->insert(*container, false); containerCopied[anon->getAnonId()] = true; } - } else { - const TString& name = iter->first; - auto retargetIter = std::find_if(retargetedSymbols.begin(), retargetedSymbols.end(), - [&name](const std::pair& i) { return i.first == name; }); - if (retargetIter != retargetedSymbols.end()) - continue; + } else symTableLevel->insert(*iter->second->clone(), false); - } - } - // Now point retargeted symbols to the newly created versions of them - for (auto &s : retargetedSymbols) { - TSymbol* sym = symTableLevel->find(s.second); - if (!sym) - continue; - symTableLevel->insert(s.first, sym); } return symTableLevel; diff --git a/libraries/glslang/glslang/MachineIndependent/SymbolTable.h b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/SymbolTable.h similarity index 96% rename from libraries/glslang/glslang/MachineIndependent/SymbolTable.h rename to libraries/ZVulkan/src/glslang/glslang/MachineIndependent/SymbolTable.h index 31312ecbaa..2196093073 100644 --- a/libraries/glslang/glslang/MachineIndependent/SymbolTable.h +++ b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/SymbolTable.h @@ -84,7 +84,7 @@ typedef TVector TExtensionList; class TSymbol { public: POOL_ALLOCATOR_NEW_DELETE(GetThreadPoolAllocator()) - explicit TSymbol(const TString *n) : name(n), uniqueId(0), extensions(0), writable(true) { } + explicit TSymbol(const TString *n) : name(n), extensions(0), writable(true) { } virtual TSymbol* clone() const = 0; virtual ~TSymbol() { } // rely on all symbol owned memory coming from the pool @@ -413,20 +413,13 @@ public: TSymbolTableLevel() : defaultPrecision(0), anonId(0), thisLevel(false) { } ~TSymbolTableLevel(); - bool insert(const TString& name, TSymbol* symbol) { - return level.insert(tLevelPair(name, symbol)).second; - } - - bool insert(TSymbol& symbol, bool separateNameSpaces, const TString& forcedKeyName = TString()) + bool insert(TSymbol& symbol, bool separateNameSpaces) { // // returning true means symbol was added to the table with no semantic errors // const TString& name = symbol.getName(); - if (forcedKeyName.length()) { - return level.insert(tLevelPair(forcedKeyName, &symbol)).second; - } - else if (name == "") { + if (name == "") { symbol.getAsVariable()->setAnonId(anonId++); // An empty name means an anonymous container, exposing its members to the external scope. // Give it a name and insert its members in the symbol table, pointing to the container. @@ -478,16 +471,6 @@ public: return true; } - void retargetSymbol(const TString& from, const TString& to) { - tLevel::const_iterator fromIt = level.find(from); - tLevel::const_iterator toIt = level.find(to); - if (fromIt == level.end() || toIt == level.end()) - return; - delete fromIt->second; - level[from] = toIt->second; - retargetedSymbols.push_back({from, to}); - } - TSymbol* find(const TString& name) const { tLevel::const_iterator it = level.find(name); @@ -600,8 +583,6 @@ protected: tLevel level; // named mappings TPrecisionQualifier *defaultPrecision; - // pair - TVector> retargetedSymbols; int anonId; bool thisLevel; // True if this level of the symbol table is a structure scope containing member function // that are supposed to see anonymous access to member variables. @@ -807,12 +788,6 @@ public: return symbol; } - void retargetSymbol(const TString& from, const TString& to) { - int level = currentLevel(); - table[level]->retargetSymbol(from, to); - } - - // Find of a symbol that returns how many layers deep of nested // structures-with-member-functions ('this' scopes) deep the symbol was // found in. diff --git a/libraries/glslang/glslang/MachineIndependent/Versions.cpp b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/Versions.cpp similarity index 99% rename from libraries/glslang/glslang/MachineIndependent/Versions.cpp rename to libraries/ZVulkan/src/glslang/glslang/MachineIndependent/Versions.cpp index 52c1e1ccd1..097ee84552 100644 --- a/libraries/glslang/glslang/MachineIndependent/Versions.cpp +++ b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/Versions.cpp @@ -225,9 +225,6 @@ void TParseVersions::initializeExtensionBehavior() extensionBehavior[E_GL_ARB_shading_language_packing] = EBhDisable; extensionBehavior[E_GL_ARB_texture_query_lod] = EBhDisable; extensionBehavior[E_GL_ARB_vertex_attrib_64bit] = EBhDisable; - extensionBehavior[E_GL_ARB_draw_instanced] = EBhDisable; - extensionBehavior[E_GL_ARB_fragment_coord_conventions] = EBhDisable; - extensionBehavior[E_GL_KHR_shader_subgroup_basic] = EBhDisable; extensionBehavior[E_GL_KHR_shader_subgroup_vote] = EBhDisable; @@ -259,8 +256,6 @@ void TParseVersions::initializeExtensionBehavior() extensionBehavior[E_GL_EXT_shader_8bit_storage] = EBhDisable; extensionBehavior[E_GL_EXT_subgroup_uniform_control_flow] = EBhDisable; - extensionBehavior[E_GL_EXT_fragment_shader_barycentric] = EBhDisable; - // #line and #include extensionBehavior[E_GL_GOOGLE_cpp_style_line_directive] = EBhDisable; extensionBehavior[E_GL_GOOGLE_include_directive] = EBhDisable; @@ -336,7 +331,6 @@ void TParseVersions::initializeExtensionBehavior() extensionBehavior[E_GL_EXT_ray_tracing] = EBhDisable; extensionBehavior[E_GL_EXT_ray_query] = EBhDisable; extensionBehavior[E_GL_EXT_ray_flags_primitive_culling] = EBhDisable; - extensionBehavior[E_GL_EXT_ray_cull_mask] = EBhDisable; extensionBehavior[E_GL_EXT_blend_func_extended] = EBhDisable; extensionBehavior[E_GL_EXT_shader_implicit_conversions] = EBhDisable; extensionBehavior[E_GL_EXT_fragment_shading_rate] = EBhDisable; @@ -471,8 +465,6 @@ void TParseVersions::getPreamble(std::string& preamble) "#define GL_ARB_shader_storage_buffer_object 1\n" "#define GL_ARB_texture_query_lod 1\n" "#define GL_ARB_vertex_attrib_64bit 1\n" - "#define GL_ARB_draw_instanced 1\n" - "#define GL_ARB_fragment_coord_conventions 1\n" "#define GL_EXT_shader_non_constant_global_initializers 1\n" "#define GL_EXT_shader_image_load_formatted 1\n" "#define GL_EXT_post_depth_coverage 1\n" @@ -490,7 +482,6 @@ void TParseVersions::getPreamble(std::string& preamble) "#define GL_EXT_debug_printf 1\n" "#define GL_EXT_fragment_shading_rate 1\n" "#define GL_EXT_shared_memory_block 1\n" - "#define GL_EXT_shader_integer_mix 1\n" // GL_KHR_shader_subgroup "#define GL_KHR_shader_subgroup_basic 1\n" @@ -508,7 +499,6 @@ void TParseVersions::getPreamble(std::string& preamble) "#define GL_EXT_ray_tracing 1\n" "#define GL_EXT_ray_query 1\n" "#define GL_EXT_ray_flags_primitive_culling 1\n" - "#define GL_EXT_ray_cull_mask 1\n" "#define GL_EXT_spirv_intrinsics 1\n" "#define GL_AMD_shader_ballot 1\n" @@ -556,8 +546,6 @@ void TParseVersions::getPreamble(std::string& preamble) "#define GL_EXT_shader_atomic_float 1\n" "#define GL_EXT_shader_atomic_float2 1\n" - - "#define GL_EXT_fragment_shader_barycentric 1\n" ; if (version >= 150) { diff --git a/libraries/glslang/glslang/MachineIndependent/Versions.h b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/Versions.h similarity index 98% rename from libraries/glslang/glslang/MachineIndependent/Versions.h rename to libraries/ZVulkan/src/glslang/glslang/MachineIndependent/Versions.h index c411f5b62e..949a7a1739 100644 --- a/libraries/glslang/glslang/MachineIndependent/Versions.h +++ b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/Versions.h @@ -161,8 +161,6 @@ const char* const E_GL_ARB_shader_storage_buffer_object = "GL_ARB_shader_storage const char* const E_GL_ARB_shading_language_packing = "GL_ARB_shading_language_packing"; const char* const E_GL_ARB_texture_query_lod = "GL_ARB_texture_query_lod"; const char* const E_GL_ARB_vertex_attrib_64bit = "GL_ARB_vertex_attrib_64bit"; -const char* const E_GL_ARB_draw_instanced = "GL_ARB_draw_instanced"; -const char* const E_GL_ARB_fragment_coord_conventions = "GL_ARB_fragment_coord_conventions"; const char* const E_GL_KHR_shader_subgroup_basic = "GL_KHR_shader_subgroup_basic"; const char* const E_GL_KHR_shader_subgroup_vote = "GL_KHR_shader_subgroup_vote"; @@ -201,7 +199,6 @@ const char* const E_GL_EXT_debug_printf = "GL_EXT_debug_prin const char* const E_GL_EXT_ray_tracing = "GL_EXT_ray_tracing"; const char* const E_GL_EXT_ray_query = "GL_EXT_ray_query"; const char* const E_GL_EXT_ray_flags_primitive_culling = "GL_EXT_ray_flags_primitive_culling"; -const char* const E_GL_EXT_ray_cull_mask = "GL_EXT_ray_cull_mask"; const char* const E_GL_EXT_blend_func_extended = "GL_EXT_blend_func_extended"; const char* const E_GL_EXT_shader_implicit_conversions = "GL_EXT_shader_implicit_conversions"; const char* const E_GL_EXT_fragment_shading_rate = "GL_EXT_fragment_shading_rate"; @@ -210,7 +207,6 @@ const char* const E_GL_EXT_null_initializer = "GL_EXT_null_initi const char* const E_GL_EXT_shared_memory_block = "GL_EXT_shared_memory_block"; const char* const E_GL_EXT_subgroup_uniform_control_flow = "GL_EXT_subgroup_uniform_control_flow"; const char* const E_GL_EXT_spirv_intrinsics = "GL_EXT_spirv_intrinsics"; -const char* const E_GL_EXT_fragment_shader_barycentric = "GL_EXT_fragment_shader_barycentric"; // Arrays of extensions for the above viewportEXTs duplications diff --git a/libraries/glslang/glslang/MachineIndependent/attribute.cpp b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/attribute.cpp similarity index 99% rename from libraries/glslang/glslang/MachineIndependent/attribute.cpp rename to libraries/ZVulkan/src/glslang/glslang/MachineIndependent/attribute.cpp index df7fdc2a60..8a92f6ae09 100644 --- a/libraries/glslang/glslang/MachineIndependent/attribute.cpp +++ b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/attribute.cpp @@ -347,7 +347,7 @@ void TParseContext::handleLoopAttributes(const TAttributes& attributes, TIntermN // // Function attributes // -void TParseContext::handleFunctionAttributes(const TSourceLoc& loc, const TAttributes& attributes) +void TParseContext::handleFunctionAttributes(const TSourceLoc& loc, const TAttributes& attributes, TFunction* function) { for (auto it = attributes.begin(); it != attributes.end(); ++it) { if (it->size() > 0) { diff --git a/libraries/glslang/glslang/MachineIndependent/attribute.h b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/attribute.h similarity index 100% rename from libraries/glslang/glslang/MachineIndependent/attribute.h rename to libraries/ZVulkan/src/glslang/glslang/MachineIndependent/attribute.h diff --git a/libraries/glslang/glslang/MachineIndependent/gl_types.h b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/gl_types.h similarity index 100% rename from libraries/glslang/glslang/MachineIndependent/gl_types.h rename to libraries/ZVulkan/src/glslang/glslang/MachineIndependent/gl_types.h diff --git a/libraries/glslang/glslang/MachineIndependent/glslang.m4 b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/glslang.m4 similarity index 99% rename from libraries/glslang/glslang/MachineIndependent/glslang.m4 rename to libraries/ZVulkan/src/glslang/glslang/MachineIndependent/glslang.m4 index 3ab7a3c0a0..93041ce39e 100644 --- a/libraries/glslang/glslang/MachineIndependent/glslang.m4 +++ b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/glslang.m4 @@ -315,7 +315,7 @@ GLSLANG_WEB_EXCLUDE_ON %token PATCH SAMPLE NONUNIFORM %token COHERENT VOLATILE RESTRICT READONLY WRITEONLY DEVICECOHERENT QUEUEFAMILYCOHERENT WORKGROUPCOHERENT %token SUBGROUPCOHERENT NONPRIVATE SHADERCALLCOHERENT -%token NOPERSPECTIVE EXPLICITINTERPAMD PERVERTEXEXT PERVERTEXNV PERPRIMITIVENV PERVIEWNV PERTASKNV +%token NOPERSPECTIVE EXPLICITINTERPAMD PERVERTEXNV PERPRIMITIVENV PERVIEWNV PERTASKNV %token PRECISE GLSLANG_WEB_EXCLUDE_OFF @@ -798,7 +798,7 @@ conditional_expression parseContext.rValueErrorCheck($5.loc, ":", $6); $$ = parseContext.intermediate.addSelection($1, $4, $6, $2.loc); if ($$ == 0) { - parseContext.binaryOpError($2.loc, ":", $4->getCompleteString(parseContext.intermediate.getEnhancedMsgs()), $6->getCompleteString(parseContext.intermediate.getEnhancedMsgs())); + parseContext.binaryOpError($2.loc, ":", $4->getCompleteString(), $6->getCompleteString()); $$ = $6; } } @@ -815,7 +815,7 @@ assignment_expression parseContext.rValueErrorCheck($2.loc, "assign", $3); $$ = parseContext.addAssign($2.loc, $2.op, $1, $3); if ($$ == 0) { - parseContext.assignError($2.loc, "assign", $1->getCompleteString(parseContext.intermediate.getEnhancedMsgs()), $3->getCompleteString(parseContext.intermediate.getEnhancedMsgs())); + parseContext.assignError($2.loc, "assign", $1->getCompleteString(), $3->getCompleteString()); $$ = $1; } } @@ -877,7 +877,7 @@ expression parseContext.samplerConstructorLocationCheck($2.loc, ",", $3); $$ = parseContext.intermediate.addComma($1, $3, $2.loc); if ($$ == 0) { - parseContext.binaryOpError($2.loc, ",", $1->getCompleteString(parseContext.intermediate.getEnhancedMsgs()), $3->getCompleteString(parseContext.intermediate.getEnhancedMsgs())); + parseContext.binaryOpError($2.loc, ",", $1->getCompleteString(), $3->getCompleteString()); $$ = $3; } } @@ -983,20 +983,20 @@ function_prototype $$.function = $1; $$.loc = $2.loc; parseContext.requireExtensions($2.loc, 1, &E_GL_EXT_subgroup_uniform_control_flow, "attribute"); - parseContext.handleFunctionAttributes($2.loc, *$3); + 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); + 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); - parseContext.handleFunctionAttributes($3.loc, *$4); + parseContext.handleFunctionAttributes($3.loc, *$1, $$.function); + parseContext.handleFunctionAttributes($3.loc, *$4, $$.function); } ; @@ -1290,14 +1290,6 @@ GLSLANG_WEB_EXCLUDE_ON $$.init($1.loc); $$.qualifier.pervertexNV = true; } - | PERVERTEXEXT { - parseContext.globalCheck($1.loc, "pervertexEXT"); - parseContext.profileRequires($1.loc, ECoreProfile, 0, E_GL_EXT_fragment_shader_barycentric, "fragment shader barycentric"); - parseContext.profileRequires($1.loc, ECompatibilityProfile, 0, E_GL_EXT_fragment_shader_barycentric, "fragment shader barycentric"); - parseContext.profileRequires($1.loc, EEsProfile, 0, E_GL_EXT_fragment_shader_barycentric, "fragment shader barycentric"); - $$.init($1.loc); - $$.qualifier.pervertexEXT = true; - } | PERPRIMITIVENV { // No need for profile version or extension check. Shader stage already checks both. parseContext.globalCheck($1.loc, "perprimitiveNV"); @@ -3934,7 +3926,6 @@ iteration_statement_nonattributed --parseContext.controlFlowNestingLevel; } | DO { - parseContext.symbolTable.push(); ++parseContext.loopNestingLevel; ++parseContext.statementNestingLevel; ++parseContext.controlFlowNestingLevel; @@ -3946,7 +3937,6 @@ iteration_statement_nonattributed parseContext.boolCheck($8.loc, $6); $$ = parseContext.intermediate.addLoop($3, $6, 0, false, $4.loc); - parseContext.symbolTable.pop(&parseContext.defaultPrecision[0]); --parseContext.loopNestingLevel; --parseContext.statementNestingLevel; --parseContext.controlFlowNestingLevel; @@ -4375,6 +4365,9 @@ 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 { diff --git a/libraries/glslang/glslang/MachineIndependent/glslang.y b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/glslang.y similarity index 99% rename from libraries/glslang/glslang/MachineIndependent/glslang.y rename to libraries/ZVulkan/src/glslang/glslang/MachineIndependent/glslang.y index d77c831585..b77f4617be 100644 --- a/libraries/glslang/glslang/MachineIndependent/glslang.y +++ b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/glslang.y @@ -315,7 +315,7 @@ extern int yylex(YYSTYPE*, TParseContext&); %token PATCH SAMPLE NONUNIFORM %token COHERENT VOLATILE RESTRICT READONLY WRITEONLY DEVICECOHERENT QUEUEFAMILYCOHERENT WORKGROUPCOHERENT %token SUBGROUPCOHERENT NONPRIVATE SHADERCALLCOHERENT -%token NOPERSPECTIVE EXPLICITINTERPAMD PERVERTEXEXT PERVERTEXNV PERPRIMITIVENV PERVIEWNV PERTASKNV +%token NOPERSPECTIVE EXPLICITINTERPAMD PERVERTEXNV PERPRIMITIVENV PERVIEWNV PERTASKNV %token PRECISE @@ -798,7 +798,7 @@ conditional_expression parseContext.rValueErrorCheck($5.loc, ":", $6); $$ = parseContext.intermediate.addSelection($1, $4, $6, $2.loc); if ($$ == 0) { - parseContext.binaryOpError($2.loc, ":", $4->getCompleteString(parseContext.intermediate.getEnhancedMsgs()), $6->getCompleteString(parseContext.intermediate.getEnhancedMsgs())); + parseContext.binaryOpError($2.loc, ":", $4->getCompleteString(), $6->getCompleteString()); $$ = $6; } } @@ -815,7 +815,7 @@ assignment_expression parseContext.rValueErrorCheck($2.loc, "assign", $3); $$ = parseContext.addAssign($2.loc, $2.op, $1, $3); if ($$ == 0) { - parseContext.assignError($2.loc, "assign", $1->getCompleteString(parseContext.intermediate.getEnhancedMsgs()), $3->getCompleteString(parseContext.intermediate.getEnhancedMsgs())); + parseContext.assignError($2.loc, "assign", $1->getCompleteString(), $3->getCompleteString()); $$ = $1; } } @@ -877,7 +877,7 @@ expression parseContext.samplerConstructorLocationCheck($2.loc, ",", $3); $$ = parseContext.intermediate.addComma($1, $3, $2.loc); if ($$ == 0) { - parseContext.binaryOpError($2.loc, ",", $1->getCompleteString(parseContext.intermediate.getEnhancedMsgs()), $3->getCompleteString(parseContext.intermediate.getEnhancedMsgs())); + parseContext.binaryOpError($2.loc, ",", $1->getCompleteString(), $3->getCompleteString()); $$ = $3; } } @@ -983,20 +983,20 @@ function_prototype $$.function = $1; $$.loc = $2.loc; parseContext.requireExtensions($2.loc, 1, &E_GL_EXT_subgroup_uniform_control_flow, "attribute"); - parseContext.handleFunctionAttributes($2.loc, *$3); + 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); + 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); - parseContext.handleFunctionAttributes($3.loc, *$4); + parseContext.handleFunctionAttributes($3.loc, *$1, $$.function); + parseContext.handleFunctionAttributes($3.loc, *$4, $$.function); } ; @@ -1290,14 +1290,6 @@ interpolation_qualifier $$.init($1.loc); $$.qualifier.pervertexNV = true; } - | PERVERTEXEXT { - parseContext.globalCheck($1.loc, "pervertexEXT"); - parseContext.profileRequires($1.loc, ECoreProfile, 0, E_GL_EXT_fragment_shader_barycentric, "fragment shader barycentric"); - parseContext.profileRequires($1.loc, ECompatibilityProfile, 0, E_GL_EXT_fragment_shader_barycentric, "fragment shader barycentric"); - parseContext.profileRequires($1.loc, EEsProfile, 0, E_GL_EXT_fragment_shader_barycentric, "fragment shader barycentric"); - $$.init($1.loc); - $$.qualifier.pervertexEXT = true; - } | PERPRIMITIVENV { // No need for profile version or extension check. Shader stage already checks both. parseContext.globalCheck($1.loc, "perprimitiveNV"); @@ -3934,7 +3926,6 @@ iteration_statement_nonattributed --parseContext.controlFlowNestingLevel; } | DO { - parseContext.symbolTable.push(); ++parseContext.loopNestingLevel; ++parseContext.statementNestingLevel; ++parseContext.controlFlowNestingLevel; @@ -3946,7 +3937,6 @@ iteration_statement_nonattributed parseContext.boolCheck($8.loc, $6); $$ = parseContext.intermediate.addLoop($3, $6, 0, false, $4.loc); - parseContext.symbolTable.pop(&parseContext.defaultPrecision[0]); --parseContext.loopNestingLevel; --parseContext.statementNestingLevel; --parseContext.controlFlowNestingLevel; @@ -4375,6 +4365,9 @@ 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 { diff --git a/libraries/glslang/glslang/MachineIndependent/glslang_tab.cpp b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/glslang_tab.cpp similarity index 71% rename from libraries/glslang/glslang/MachineIndependent/glslang_tab.cpp rename to libraries/ZVulkan/src/glslang/glslang/MachineIndependent/glslang_tab.cpp index 4e4768eaa5..dba06aefef 100644 --- a/libraries/glslang/glslang/MachineIndependent/glslang_tab.cpp +++ b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/glslang_tab.cpp @@ -571,143 +571,142 @@ enum yysymbol_kind_t YYSYMBOL_SHADERCALLCOHERENT = 447, /* SHADERCALLCOHERENT */ YYSYMBOL_NOPERSPECTIVE = 448, /* NOPERSPECTIVE */ YYSYMBOL_EXPLICITINTERPAMD = 449, /* EXPLICITINTERPAMD */ - YYSYMBOL_PERVERTEXEXT = 450, /* PERVERTEXEXT */ - YYSYMBOL_PERVERTEXNV = 451, /* PERVERTEXNV */ - YYSYMBOL_PERPRIMITIVENV = 452, /* PERPRIMITIVENV */ - YYSYMBOL_PERVIEWNV = 453, /* PERVIEWNV */ - YYSYMBOL_PERTASKNV = 454, /* PERTASKNV */ - YYSYMBOL_PRECISE = 455, /* PRECISE */ - YYSYMBOL_YYACCEPT = 456, /* $accept */ - YYSYMBOL_variable_identifier = 457, /* variable_identifier */ - YYSYMBOL_primary_expression = 458, /* primary_expression */ - YYSYMBOL_postfix_expression = 459, /* postfix_expression */ - YYSYMBOL_integer_expression = 460, /* integer_expression */ - YYSYMBOL_function_call = 461, /* function_call */ - YYSYMBOL_function_call_or_method = 462, /* function_call_or_method */ - YYSYMBOL_function_call_generic = 463, /* function_call_generic */ - YYSYMBOL_function_call_header_no_parameters = 464, /* function_call_header_no_parameters */ - YYSYMBOL_function_call_header_with_parameters = 465, /* function_call_header_with_parameters */ - YYSYMBOL_function_call_header = 466, /* function_call_header */ - YYSYMBOL_function_identifier = 467, /* function_identifier */ - YYSYMBOL_unary_expression = 468, /* unary_expression */ - YYSYMBOL_unary_operator = 469, /* unary_operator */ - YYSYMBOL_multiplicative_expression = 470, /* multiplicative_expression */ - YYSYMBOL_additive_expression = 471, /* additive_expression */ - YYSYMBOL_shift_expression = 472, /* shift_expression */ - YYSYMBOL_relational_expression = 473, /* relational_expression */ - YYSYMBOL_equality_expression = 474, /* equality_expression */ - YYSYMBOL_and_expression = 475, /* and_expression */ - YYSYMBOL_exclusive_or_expression = 476, /* exclusive_or_expression */ - YYSYMBOL_inclusive_or_expression = 477, /* inclusive_or_expression */ - YYSYMBOL_logical_and_expression = 478, /* logical_and_expression */ - YYSYMBOL_logical_xor_expression = 479, /* logical_xor_expression */ - YYSYMBOL_logical_or_expression = 480, /* logical_or_expression */ - YYSYMBOL_conditional_expression = 481, /* conditional_expression */ - YYSYMBOL_482_1 = 482, /* $@1 */ - YYSYMBOL_assignment_expression = 483, /* assignment_expression */ - YYSYMBOL_assignment_operator = 484, /* assignment_operator */ - YYSYMBOL_expression = 485, /* expression */ - YYSYMBOL_constant_expression = 486, /* constant_expression */ - YYSYMBOL_declaration = 487, /* declaration */ - YYSYMBOL_block_structure = 488, /* block_structure */ - YYSYMBOL_489_2 = 489, /* $@2 */ - YYSYMBOL_identifier_list = 490, /* identifier_list */ - YYSYMBOL_function_prototype = 491, /* function_prototype */ - YYSYMBOL_function_declarator = 492, /* function_declarator */ - YYSYMBOL_function_header_with_parameters = 493, /* function_header_with_parameters */ - YYSYMBOL_function_header = 494, /* function_header */ - YYSYMBOL_parameter_declarator = 495, /* parameter_declarator */ - YYSYMBOL_parameter_declaration = 496, /* parameter_declaration */ - YYSYMBOL_parameter_type_specifier = 497, /* parameter_type_specifier */ - YYSYMBOL_init_declarator_list = 498, /* init_declarator_list */ - YYSYMBOL_single_declaration = 499, /* single_declaration */ - YYSYMBOL_fully_specified_type = 500, /* fully_specified_type */ - YYSYMBOL_invariant_qualifier = 501, /* invariant_qualifier */ - YYSYMBOL_interpolation_qualifier = 502, /* interpolation_qualifier */ - YYSYMBOL_layout_qualifier = 503, /* layout_qualifier */ - YYSYMBOL_layout_qualifier_id_list = 504, /* layout_qualifier_id_list */ - YYSYMBOL_layout_qualifier_id = 505, /* layout_qualifier_id */ - YYSYMBOL_precise_qualifier = 506, /* precise_qualifier */ - YYSYMBOL_type_qualifier = 507, /* type_qualifier */ - YYSYMBOL_single_type_qualifier = 508, /* single_type_qualifier */ - YYSYMBOL_storage_qualifier = 509, /* storage_qualifier */ - YYSYMBOL_non_uniform_qualifier = 510, /* non_uniform_qualifier */ - YYSYMBOL_type_name_list = 511, /* type_name_list */ - YYSYMBOL_type_specifier = 512, /* type_specifier */ - YYSYMBOL_array_specifier = 513, /* array_specifier */ - YYSYMBOL_type_parameter_specifier_opt = 514, /* type_parameter_specifier_opt */ - YYSYMBOL_type_parameter_specifier = 515, /* type_parameter_specifier */ - YYSYMBOL_type_parameter_specifier_list = 516, /* type_parameter_specifier_list */ - YYSYMBOL_type_specifier_nonarray = 517, /* type_specifier_nonarray */ - YYSYMBOL_precision_qualifier = 518, /* precision_qualifier */ - YYSYMBOL_struct_specifier = 519, /* struct_specifier */ - YYSYMBOL_520_3 = 520, /* $@3 */ - YYSYMBOL_521_4 = 521, /* $@4 */ - YYSYMBOL_struct_declaration_list = 522, /* struct_declaration_list */ - YYSYMBOL_struct_declaration = 523, /* struct_declaration */ - YYSYMBOL_struct_declarator_list = 524, /* struct_declarator_list */ - YYSYMBOL_struct_declarator = 525, /* struct_declarator */ - YYSYMBOL_initializer = 526, /* initializer */ - YYSYMBOL_initializer_list = 527, /* initializer_list */ - YYSYMBOL_declaration_statement = 528, /* declaration_statement */ - YYSYMBOL_statement = 529, /* statement */ - YYSYMBOL_simple_statement = 530, /* simple_statement */ - YYSYMBOL_demote_statement = 531, /* demote_statement */ - YYSYMBOL_compound_statement = 532, /* compound_statement */ - YYSYMBOL_533_5 = 533, /* $@5 */ - YYSYMBOL_534_6 = 534, /* $@6 */ - YYSYMBOL_statement_no_new_scope = 535, /* statement_no_new_scope */ - YYSYMBOL_statement_scoped = 536, /* statement_scoped */ - YYSYMBOL_537_7 = 537, /* $@7 */ - YYSYMBOL_538_8 = 538, /* $@8 */ - YYSYMBOL_compound_statement_no_new_scope = 539, /* compound_statement_no_new_scope */ - YYSYMBOL_statement_list = 540, /* statement_list */ - YYSYMBOL_expression_statement = 541, /* expression_statement */ - YYSYMBOL_selection_statement = 542, /* selection_statement */ - YYSYMBOL_selection_statement_nonattributed = 543, /* selection_statement_nonattributed */ - YYSYMBOL_selection_rest_statement = 544, /* selection_rest_statement */ - YYSYMBOL_condition = 545, /* condition */ - YYSYMBOL_switch_statement = 546, /* switch_statement */ - YYSYMBOL_switch_statement_nonattributed = 547, /* switch_statement_nonattributed */ - YYSYMBOL_548_9 = 548, /* $@9 */ - YYSYMBOL_switch_statement_list = 549, /* switch_statement_list */ - YYSYMBOL_case_label = 550, /* case_label */ - YYSYMBOL_iteration_statement = 551, /* iteration_statement */ - YYSYMBOL_iteration_statement_nonattributed = 552, /* iteration_statement_nonattributed */ - YYSYMBOL_553_10 = 553, /* $@10 */ - YYSYMBOL_554_11 = 554, /* $@11 */ - YYSYMBOL_555_12 = 555, /* $@12 */ - YYSYMBOL_for_init_statement = 556, /* for_init_statement */ - YYSYMBOL_conditionopt = 557, /* conditionopt */ - YYSYMBOL_for_rest_statement = 558, /* for_rest_statement */ - YYSYMBOL_jump_statement = 559, /* jump_statement */ - YYSYMBOL_translation_unit = 560, /* translation_unit */ - YYSYMBOL_external_declaration = 561, /* external_declaration */ - YYSYMBOL_function_definition = 562, /* function_definition */ - YYSYMBOL_563_13 = 563, /* $@13 */ - YYSYMBOL_attribute = 564, /* attribute */ - YYSYMBOL_attribute_list = 565, /* attribute_list */ - YYSYMBOL_single_attribute = 566, /* single_attribute */ - YYSYMBOL_spirv_requirements_list = 567, /* spirv_requirements_list */ - YYSYMBOL_spirv_requirements_parameter = 568, /* spirv_requirements_parameter */ - YYSYMBOL_spirv_extension_list = 569, /* spirv_extension_list */ - YYSYMBOL_spirv_capability_list = 570, /* spirv_capability_list */ - YYSYMBOL_spirv_execution_mode_qualifier = 571, /* spirv_execution_mode_qualifier */ - YYSYMBOL_spirv_execution_mode_parameter_list = 572, /* spirv_execution_mode_parameter_list */ - YYSYMBOL_spirv_execution_mode_parameter = 573, /* spirv_execution_mode_parameter */ - YYSYMBOL_spirv_execution_mode_id_parameter_list = 574, /* spirv_execution_mode_id_parameter_list */ - YYSYMBOL_spirv_storage_class_qualifier = 575, /* spirv_storage_class_qualifier */ - YYSYMBOL_spirv_decorate_qualifier = 576, /* spirv_decorate_qualifier */ - YYSYMBOL_spirv_decorate_parameter_list = 577, /* spirv_decorate_parameter_list */ - YYSYMBOL_spirv_decorate_parameter = 578, /* spirv_decorate_parameter */ - YYSYMBOL_spirv_decorate_id_parameter_list = 579, /* spirv_decorate_id_parameter_list */ - YYSYMBOL_spirv_decorate_string_parameter_list = 580, /* spirv_decorate_string_parameter_list */ - YYSYMBOL_spirv_type_specifier = 581, /* spirv_type_specifier */ - YYSYMBOL_spirv_type_parameter_list = 582, /* spirv_type_parameter_list */ - YYSYMBOL_spirv_type_parameter = 583, /* spirv_type_parameter */ - YYSYMBOL_spirv_instruction_qualifier = 584, /* spirv_instruction_qualifier */ - YYSYMBOL_spirv_instruction_qualifier_list = 585, /* spirv_instruction_qualifier_list */ - YYSYMBOL_spirv_instruction_qualifier_id = 586 /* spirv_instruction_qualifier_id */ + YYSYMBOL_PERVERTEXNV = 450, /* PERVERTEXNV */ + YYSYMBOL_PERPRIMITIVENV = 451, /* PERPRIMITIVENV */ + YYSYMBOL_PERVIEWNV = 452, /* PERVIEWNV */ + YYSYMBOL_PERTASKNV = 453, /* PERTASKNV */ + YYSYMBOL_PRECISE = 454, /* PRECISE */ + YYSYMBOL_YYACCEPT = 455, /* $accept */ + YYSYMBOL_variable_identifier = 456, /* variable_identifier */ + YYSYMBOL_primary_expression = 457, /* primary_expression */ + YYSYMBOL_postfix_expression = 458, /* postfix_expression */ + YYSYMBOL_integer_expression = 459, /* integer_expression */ + YYSYMBOL_function_call = 460, /* function_call */ + YYSYMBOL_function_call_or_method = 461, /* function_call_or_method */ + YYSYMBOL_function_call_generic = 462, /* function_call_generic */ + YYSYMBOL_function_call_header_no_parameters = 463, /* function_call_header_no_parameters */ + YYSYMBOL_function_call_header_with_parameters = 464, /* function_call_header_with_parameters */ + YYSYMBOL_function_call_header = 465, /* function_call_header */ + YYSYMBOL_function_identifier = 466, /* function_identifier */ + YYSYMBOL_unary_expression = 467, /* unary_expression */ + YYSYMBOL_unary_operator = 468, /* unary_operator */ + YYSYMBOL_multiplicative_expression = 469, /* multiplicative_expression */ + YYSYMBOL_additive_expression = 470, /* additive_expression */ + YYSYMBOL_shift_expression = 471, /* shift_expression */ + YYSYMBOL_relational_expression = 472, /* relational_expression */ + YYSYMBOL_equality_expression = 473, /* equality_expression */ + YYSYMBOL_and_expression = 474, /* and_expression */ + YYSYMBOL_exclusive_or_expression = 475, /* exclusive_or_expression */ + YYSYMBOL_inclusive_or_expression = 476, /* inclusive_or_expression */ + YYSYMBOL_logical_and_expression = 477, /* logical_and_expression */ + YYSYMBOL_logical_xor_expression = 478, /* logical_xor_expression */ + YYSYMBOL_logical_or_expression = 479, /* logical_or_expression */ + YYSYMBOL_conditional_expression = 480, /* conditional_expression */ + YYSYMBOL_481_1 = 481, /* $@1 */ + YYSYMBOL_assignment_expression = 482, /* assignment_expression */ + YYSYMBOL_assignment_operator = 483, /* assignment_operator */ + YYSYMBOL_expression = 484, /* expression */ + YYSYMBOL_constant_expression = 485, /* constant_expression */ + YYSYMBOL_declaration = 486, /* declaration */ + YYSYMBOL_block_structure = 487, /* block_structure */ + YYSYMBOL_488_2 = 488, /* $@2 */ + YYSYMBOL_identifier_list = 489, /* identifier_list */ + YYSYMBOL_function_prototype = 490, /* function_prototype */ + YYSYMBOL_function_declarator = 491, /* function_declarator */ + YYSYMBOL_function_header_with_parameters = 492, /* function_header_with_parameters */ + YYSYMBOL_function_header = 493, /* function_header */ + YYSYMBOL_parameter_declarator = 494, /* parameter_declarator */ + YYSYMBOL_parameter_declaration = 495, /* parameter_declaration */ + YYSYMBOL_parameter_type_specifier = 496, /* parameter_type_specifier */ + YYSYMBOL_init_declarator_list = 497, /* init_declarator_list */ + YYSYMBOL_single_declaration = 498, /* single_declaration */ + YYSYMBOL_fully_specified_type = 499, /* fully_specified_type */ + YYSYMBOL_invariant_qualifier = 500, /* invariant_qualifier */ + YYSYMBOL_interpolation_qualifier = 501, /* interpolation_qualifier */ + YYSYMBOL_layout_qualifier = 502, /* layout_qualifier */ + YYSYMBOL_layout_qualifier_id_list = 503, /* layout_qualifier_id_list */ + YYSYMBOL_layout_qualifier_id = 504, /* layout_qualifier_id */ + YYSYMBOL_precise_qualifier = 505, /* precise_qualifier */ + YYSYMBOL_type_qualifier = 506, /* type_qualifier */ + YYSYMBOL_single_type_qualifier = 507, /* single_type_qualifier */ + YYSYMBOL_storage_qualifier = 508, /* storage_qualifier */ + YYSYMBOL_non_uniform_qualifier = 509, /* non_uniform_qualifier */ + YYSYMBOL_type_name_list = 510, /* type_name_list */ + YYSYMBOL_type_specifier = 511, /* type_specifier */ + YYSYMBOL_array_specifier = 512, /* array_specifier */ + YYSYMBOL_type_parameter_specifier_opt = 513, /* type_parameter_specifier_opt */ + YYSYMBOL_type_parameter_specifier = 514, /* type_parameter_specifier */ + YYSYMBOL_type_parameter_specifier_list = 515, /* type_parameter_specifier_list */ + YYSYMBOL_type_specifier_nonarray = 516, /* type_specifier_nonarray */ + YYSYMBOL_precision_qualifier = 517, /* precision_qualifier */ + YYSYMBOL_struct_specifier = 518, /* struct_specifier */ + YYSYMBOL_519_3 = 519, /* $@3 */ + YYSYMBOL_520_4 = 520, /* $@4 */ + YYSYMBOL_struct_declaration_list = 521, /* struct_declaration_list */ + YYSYMBOL_struct_declaration = 522, /* struct_declaration */ + YYSYMBOL_struct_declarator_list = 523, /* struct_declarator_list */ + YYSYMBOL_struct_declarator = 524, /* struct_declarator */ + YYSYMBOL_initializer = 525, /* initializer */ + YYSYMBOL_initializer_list = 526, /* initializer_list */ + YYSYMBOL_declaration_statement = 527, /* declaration_statement */ + YYSYMBOL_statement = 528, /* statement */ + YYSYMBOL_simple_statement = 529, /* simple_statement */ + YYSYMBOL_demote_statement = 530, /* demote_statement */ + YYSYMBOL_compound_statement = 531, /* compound_statement */ + YYSYMBOL_532_5 = 532, /* $@5 */ + YYSYMBOL_533_6 = 533, /* $@6 */ + YYSYMBOL_statement_no_new_scope = 534, /* statement_no_new_scope */ + YYSYMBOL_statement_scoped = 535, /* statement_scoped */ + YYSYMBOL_536_7 = 536, /* $@7 */ + YYSYMBOL_537_8 = 537, /* $@8 */ + YYSYMBOL_compound_statement_no_new_scope = 538, /* compound_statement_no_new_scope */ + YYSYMBOL_statement_list = 539, /* statement_list */ + YYSYMBOL_expression_statement = 540, /* expression_statement */ + YYSYMBOL_selection_statement = 541, /* selection_statement */ + YYSYMBOL_selection_statement_nonattributed = 542, /* selection_statement_nonattributed */ + YYSYMBOL_selection_rest_statement = 543, /* selection_rest_statement */ + YYSYMBOL_condition = 544, /* condition */ + YYSYMBOL_switch_statement = 545, /* switch_statement */ + YYSYMBOL_switch_statement_nonattributed = 546, /* switch_statement_nonattributed */ + YYSYMBOL_547_9 = 547, /* $@9 */ + YYSYMBOL_switch_statement_list = 548, /* switch_statement_list */ + YYSYMBOL_case_label = 549, /* case_label */ + YYSYMBOL_iteration_statement = 550, /* iteration_statement */ + YYSYMBOL_iteration_statement_nonattributed = 551, /* iteration_statement_nonattributed */ + YYSYMBOL_552_10 = 552, /* $@10 */ + YYSYMBOL_553_11 = 553, /* $@11 */ + YYSYMBOL_554_12 = 554, /* $@12 */ + YYSYMBOL_for_init_statement = 555, /* for_init_statement */ + YYSYMBOL_conditionopt = 556, /* conditionopt */ + YYSYMBOL_for_rest_statement = 557, /* for_rest_statement */ + YYSYMBOL_jump_statement = 558, /* jump_statement */ + YYSYMBOL_translation_unit = 559, /* translation_unit */ + YYSYMBOL_external_declaration = 560, /* external_declaration */ + YYSYMBOL_function_definition = 561, /* function_definition */ + YYSYMBOL_562_13 = 562, /* $@13 */ + YYSYMBOL_attribute = 563, /* attribute */ + YYSYMBOL_attribute_list = 564, /* attribute_list */ + YYSYMBOL_single_attribute = 565, /* single_attribute */ + YYSYMBOL_spirv_requirements_list = 566, /* spirv_requirements_list */ + YYSYMBOL_spirv_requirements_parameter = 567, /* spirv_requirements_parameter */ + YYSYMBOL_spirv_extension_list = 568, /* spirv_extension_list */ + YYSYMBOL_spirv_capability_list = 569, /* spirv_capability_list */ + YYSYMBOL_spirv_execution_mode_qualifier = 570, /* spirv_execution_mode_qualifier */ + YYSYMBOL_spirv_execution_mode_parameter_list = 571, /* spirv_execution_mode_parameter_list */ + YYSYMBOL_spirv_execution_mode_parameter = 572, /* spirv_execution_mode_parameter */ + YYSYMBOL_spirv_execution_mode_id_parameter_list = 573, /* spirv_execution_mode_id_parameter_list */ + YYSYMBOL_spirv_storage_class_qualifier = 574, /* spirv_storage_class_qualifier */ + YYSYMBOL_spirv_decorate_qualifier = 575, /* spirv_decorate_qualifier */ + YYSYMBOL_spirv_decorate_parameter_list = 576, /* spirv_decorate_parameter_list */ + YYSYMBOL_spirv_decorate_parameter = 577, /* spirv_decorate_parameter */ + YYSYMBOL_spirv_decorate_id_parameter_list = 578, /* spirv_decorate_id_parameter_list */ + YYSYMBOL_spirv_decorate_string_parameter_list = 579, /* spirv_decorate_string_parameter_list */ + YYSYMBOL_spirv_type_specifier = 580, /* spirv_type_specifier */ + YYSYMBOL_spirv_type_parameter_list = 581, /* spirv_type_parameter_list */ + YYSYMBOL_spirv_type_parameter = 582, /* spirv_type_parameter */ + YYSYMBOL_spirv_instruction_qualifier = 583, /* spirv_instruction_qualifier */ + YYSYMBOL_spirv_instruction_qualifier_list = 584, /* spirv_instruction_qualifier_list */ + YYSYMBOL_spirv_instruction_qualifier_id = 585 /* spirv_instruction_qualifier_id */ }; typedef enum yysymbol_kind_t yysymbol_kind_t; @@ -729,7 +728,7 @@ typedef enum yysymbol_kind_t yysymbol_kind_t; extern int yylex(YYSTYPE*, TParseContext&); -#line 733 "MachineIndependent/glslang_tab.cpp" +#line 732 "MachineIndependent/glslang_tab.cpp" #ifdef short @@ -1033,12 +1032,12 @@ union yyalloc #endif /* !YYCOPY_NEEDED */ /* YYFINAL -- State number of the termination state. */ -#define YYFINAL 443 +#define YYFINAL 442 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 12469 +#define YYLAST 12453 /* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 456 +#define YYNTOKENS 455 /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 131 /* YYNRULES -- Number of rules. */ @@ -1047,7 +1046,7 @@ union yyalloc #define YYNSTATES 930 /* YYMAXUTOK -- Last valid token kind. */ -#define YYMAXUTOK 710 +#define YYMAXUTOK 709 /* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM @@ -1131,8 +1130,7 @@ static const yytype_int16 yytranslate[] = 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 + 445, 446, 447, 448, 449, 450, 451, 452, 453, 454 }; #if YYDEBUG @@ -1153,61 +1151,61 @@ static const yytype_int16 yyrline[] = 982, 988, 994, 1004, 1007, 1014, 1022, 1042, 1065, 1080, 1105, 1116, 1126, 1136, 1146, 1155, 1158, 1162, 1166, 1171, 1179, 1186, 1191, 1196, 1201, 1210, 1220, 1247, 1256, 1263, - 1271, 1278, 1285, 1293, 1301, 1311, 1318, 1329, 1335, 1338, - 1345, 1349, 1353, 1362, 1372, 1375, 1386, 1389, 1392, 1396, - 1400, 1405, 1409, 1412, 1417, 1421, 1426, 1435, 1439, 1444, - 1450, 1456, 1463, 1468, 1476, 1482, 1494, 1508, 1514, 1519, - 1527, 1535, 1543, 1551, 1559, 1567, 1575, 1583, 1590, 1597, - 1601, 1606, 1611, 1616, 1621, 1626, 1631, 1635, 1639, 1643, - 1647, 1653, 1664, 1671, 1674, 1683, 1688, 1698, 1703, 1711, - 1715, 1725, 1728, 1734, 1740, 1747, 1757, 1761, 1765, 1769, - 1774, 1778, 1783, 1788, 1793, 1798, 1803, 1808, 1813, 1818, - 1823, 1829, 1835, 1841, 1846, 1851, 1856, 1861, 1866, 1871, - 1876, 1881, 1886, 1891, 1896, 1902, 1909, 1914, 1919, 1924, - 1929, 1934, 1939, 1944, 1949, 1954, 1959, 1964, 1972, 1980, - 1988, 1994, 2000, 2006, 2012, 2018, 2024, 2030, 2036, 2042, - 2048, 2054, 2060, 2066, 2072, 2078, 2084, 2090, 2096, 2102, - 2108, 2114, 2120, 2126, 2132, 2138, 2144, 2150, 2156, 2162, - 2168, 2174, 2180, 2186, 2194, 2202, 2210, 2218, 2226, 2234, - 2242, 2250, 2258, 2266, 2274, 2282, 2288, 2294, 2300, 2306, - 2312, 2318, 2324, 2330, 2336, 2342, 2348, 2354, 2360, 2366, - 2372, 2378, 2384, 2390, 2396, 2402, 2408, 2414, 2420, 2426, - 2432, 2438, 2444, 2450, 2456, 2462, 2468, 2474, 2480, 2486, - 2492, 2498, 2502, 2506, 2510, 2515, 2521, 2526, 2531, 2536, - 2541, 2546, 2551, 2557, 2562, 2567, 2572, 2577, 2582, 2588, - 2594, 2600, 2606, 2612, 2618, 2624, 2630, 2636, 2642, 2648, - 2654, 2660, 2666, 2671, 2676, 2681, 2686, 2691, 2696, 2702, - 2707, 2712, 2717, 2722, 2727, 2732, 2737, 2743, 2748, 2753, - 2758, 2763, 2768, 2773, 2778, 2783, 2788, 2793, 2798, 2803, - 2808, 2813, 2819, 2824, 2829, 2835, 2841, 2846, 2851, 2856, - 2862, 2867, 2872, 2877, 2883, 2888, 2893, 2898, 2904, 2909, - 2914, 2919, 2925, 2931, 2937, 2943, 2948, 2954, 2960, 2966, - 2971, 2976, 2981, 2986, 2991, 2997, 3002, 3007, 3012, 3018, - 3023, 3028, 3033, 3039, 3044, 3049, 3054, 3060, 3065, 3070, - 3075, 3081, 3086, 3091, 3096, 3102, 3107, 3112, 3117, 3123, - 3128, 3133, 3138, 3144, 3149, 3154, 3159, 3165, 3170, 3175, - 3180, 3186, 3191, 3196, 3201, 3207, 3212, 3217, 3222, 3228, - 3233, 3238, 3243, 3249, 3254, 3259, 3264, 3270, 3275, 3280, - 3285, 3291, 3296, 3301, 3306, 3311, 3316, 3321, 3326, 3331, - 3336, 3341, 3346, 3351, 3356, 3361, 3366, 3371, 3376, 3381, - 3386, 3391, 3396, 3401, 3406, 3411, 3417, 3423, 3429, 3435, - 3442, 3449, 3455, 3461, 3467, 3473, 3479, 3485, 3491, 3496, - 3501, 3517, 3522, 3527, 3535, 3535, 3546, 3546, 3556, 3559, - 3572, 3594, 3621, 3625, 3631, 3636, 3647, 3651, 3657, 3663, - 3674, 3677, 3684, 3688, 3689, 3695, 3696, 3697, 3698, 3699, - 3700, 3701, 3703, 3709, 3718, 3719, 3723, 3719, 3735, 3736, - 3740, 3740, 3747, 3747, 3761, 3764, 3772, 3780, 3791, 3792, - 3796, 3800, 3808, 3815, 3819, 3827, 3831, 3844, 3848, 3856, - 3856, 3876, 3879, 3885, 3897, 3909, 3913, 3921, 3921, 3936, - 3936, 3954, 3954, 3975, 3978, 3984, 3987, 3993, 3997, 4004, - 4009, 4014, 4021, 4024, 4028, 4033, 4037, 4047, 4051, 4060, - 4063, 4067, 4076, 4076, 4118, 4123, 4126, 4131, 4134, 4141, - 4144, 4149, 4152, 4157, 4160, 4165, 4168, 4173, 4177, 4182, - 4186, 4191, 4195, 4202, 4205, 4210, 4213, 4216, 4219, 4222, - 4227, 4236, 4247, 4252, 4260, 4264, 4269, 4273, 4278, 4282, - 4287, 4291, 4298, 4301, 4306, 4309, 4312, 4315, 4320, 4328, - 4338, 4342, 4347, 4351, 4356, 4360, 4367, 4370, 4375, 4380, - 4383, 4389, 4392, 4397, 4400 + 1271, 1278, 1285, 1293, 1303, 1310, 1321, 1327, 1330, 1337, + 1341, 1345, 1354, 1364, 1367, 1378, 1381, 1384, 1388, 1392, + 1397, 1401, 1404, 1409, 1413, 1418, 1427, 1431, 1436, 1442, + 1448, 1455, 1460, 1468, 1474, 1486, 1500, 1506, 1511, 1519, + 1527, 1535, 1543, 1551, 1559, 1567, 1575, 1582, 1589, 1593, + 1598, 1603, 1608, 1613, 1618, 1623, 1627, 1631, 1635, 1639, + 1645, 1656, 1663, 1666, 1675, 1680, 1690, 1695, 1703, 1707, + 1717, 1720, 1726, 1732, 1739, 1749, 1753, 1757, 1761, 1766, + 1770, 1775, 1780, 1785, 1790, 1795, 1800, 1805, 1810, 1815, + 1821, 1827, 1833, 1838, 1843, 1848, 1853, 1858, 1863, 1868, + 1873, 1878, 1883, 1888, 1894, 1901, 1906, 1911, 1916, 1921, + 1926, 1931, 1936, 1941, 1946, 1951, 1956, 1964, 1972, 1980, + 1986, 1992, 1998, 2004, 2010, 2016, 2022, 2028, 2034, 2040, + 2046, 2052, 2058, 2064, 2070, 2076, 2082, 2088, 2094, 2100, + 2106, 2112, 2118, 2124, 2130, 2136, 2142, 2148, 2154, 2160, + 2166, 2172, 2178, 2186, 2194, 2202, 2210, 2218, 2226, 2234, + 2242, 2250, 2258, 2266, 2274, 2280, 2286, 2292, 2298, 2304, + 2310, 2316, 2322, 2328, 2334, 2340, 2346, 2352, 2358, 2364, + 2370, 2376, 2382, 2388, 2394, 2400, 2406, 2412, 2418, 2424, + 2430, 2436, 2442, 2448, 2454, 2460, 2466, 2472, 2478, 2484, + 2490, 2494, 2498, 2502, 2507, 2513, 2518, 2523, 2528, 2533, + 2538, 2543, 2549, 2554, 2559, 2564, 2569, 2574, 2580, 2586, + 2592, 2598, 2604, 2610, 2616, 2622, 2628, 2634, 2640, 2646, + 2652, 2658, 2663, 2668, 2673, 2678, 2683, 2688, 2694, 2699, + 2704, 2709, 2714, 2719, 2724, 2729, 2735, 2740, 2745, 2750, + 2755, 2760, 2765, 2770, 2775, 2780, 2785, 2790, 2795, 2800, + 2805, 2811, 2816, 2821, 2827, 2833, 2838, 2843, 2848, 2854, + 2859, 2864, 2869, 2875, 2880, 2885, 2890, 2896, 2901, 2906, + 2911, 2917, 2923, 2929, 2935, 2940, 2946, 2952, 2958, 2963, + 2968, 2973, 2978, 2983, 2989, 2994, 2999, 3004, 3010, 3015, + 3020, 3025, 3031, 3036, 3041, 3046, 3052, 3057, 3062, 3067, + 3073, 3078, 3083, 3088, 3094, 3099, 3104, 3109, 3115, 3120, + 3125, 3130, 3136, 3141, 3146, 3151, 3157, 3162, 3167, 3172, + 3178, 3183, 3188, 3193, 3199, 3204, 3209, 3214, 3220, 3225, + 3230, 3235, 3241, 3246, 3251, 3256, 3262, 3267, 3272, 3277, + 3283, 3288, 3293, 3298, 3303, 3308, 3313, 3318, 3323, 3328, + 3333, 3338, 3343, 3348, 3353, 3358, 3363, 3368, 3373, 3378, + 3383, 3388, 3393, 3398, 3403, 3409, 3415, 3421, 3427, 3434, + 3441, 3447, 3453, 3459, 3465, 3471, 3477, 3483, 3488, 3493, + 3509, 3514, 3519, 3527, 3527, 3538, 3538, 3548, 3551, 3564, + 3586, 3613, 3617, 3623, 3628, 3639, 3643, 3649, 3655, 3666, + 3669, 3676, 3680, 3681, 3687, 3688, 3689, 3690, 3691, 3692, + 3693, 3695, 3701, 3710, 3711, 3715, 3711, 3727, 3728, 3732, + 3732, 3739, 3739, 3753, 3756, 3764, 3772, 3783, 3784, 3788, + 3792, 3800, 3807, 3811, 3819, 3823, 3836, 3840, 3848, 3848, + 3868, 3871, 3877, 3889, 3901, 3905, 3913, 3913, 3928, 3928, + 3944, 3944, 3965, 3968, 3974, 3977, 3983, 3987, 3994, 3999, + 4004, 4011, 4014, 4018, 4023, 4027, 4037, 4041, 4050, 4053, + 4057, 4066, 4066, 4108, 4113, 4116, 4121, 4124, 4131, 4134, + 4139, 4142, 4147, 4150, 4155, 4158, 4163, 4167, 4172, 4176, + 4181, 4185, 4192, 4195, 4200, 4203, 4206, 4209, 4212, 4217, + 4226, 4237, 4242, 4250, 4254, 4259, 4263, 4268, 4272, 4277, + 4281, 4288, 4291, 4296, 4299, 4302, 4305, 4310, 4318, 4328, + 4332, 4337, 4341, 4346, 4350, 4357, 4360, 4365, 4368, 4373, + 4376, 4382, 4385, 4390, 4393 }; #endif @@ -1321,10 +1319,10 @@ static const char *const yytname[] = "WRITEONLY", "DEVICECOHERENT", "QUEUEFAMILYCOHERENT", "WORKGROUPCOHERENT", "SUBGROUPCOHERENT", "NONPRIVATE", "SHADERCALLCOHERENT", "NOPERSPECTIVE", "EXPLICITINTERPAMD", - "PERVERTEXEXT", "PERVERTEXNV", "PERPRIMITIVENV", "PERVIEWNV", - "PERTASKNV", "PRECISE", "$accept", "variable_identifier", - "primary_expression", "postfix_expression", "integer_expression", - "function_call", "function_call_or_method", "function_call_generic", + "PERVERTEXNV", "PERPRIMITIVENV", "PERVIEWNV", "PERTASKNV", "PRECISE", + "$accept", "variable_identifier", "primary_expression", + "postfix_expression", "integer_expression", "function_call", + "function_call_or_method", "function_call_generic", "function_call_header_no_parameters", "function_call_header_with_parameters", "function_call_header", "function_identifier", "unary_expression", "unary_operator", @@ -1431,16 +1429,16 @@ static const yytype_int16 yytoknum[] = 675, 676, 677, 678, 679, 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, - 705, 706, 707, 708, 709, 710 + 705, 706, 707, 708, 709 }; #endif -#define YYPACT_NINF (-865) +#define YYPACT_NINF (-863) #define yypact_value_is_default(Yyn) \ ((Yyn) == YYPACT_NINF) -#define YYTABLE_NINF (-571) +#define YYTABLE_NINF (-570) #define yytable_value_is_error(Yyn) \ 0 @@ -1449,99 +1447,99 @@ static const yytype_int16 yytoknum[] = STATE-NUM. */ static const yytype_int16 yypact[] = { - 4557, -865, -865, -865, -865, -865, -865, -865, -865, -865, - -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, - -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, - -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, - -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, - -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, - -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, - -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, - -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, - -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, - -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, - -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, - -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, - -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, - -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, - -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, - -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, - -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, - -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, - -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, - -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, - -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, - -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, - -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, - -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, - -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, - -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, - -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, - -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, - -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, - -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, - -865, -865, -865, -865, -865, -306, -260, -237, -110, -102, - -100, -83, -77, -865, -865, -301, -865, -865, -865, -865, - -865, -106, -865, -865, -865, -865, -865, -309, -865, -865, - -865, -865, -865, -865, -66, -54, -865, -865, -865, -865, - -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, - -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, - -865, -865, -865, -865, -865, -865, -865, -865, -865, -328, - -116, -50, -55, 7728, -245, -865, -82, -865, -865, -865, - -865, 5463, -865, -865, -865, -865, -63, -865, -865, 933, - -865, -865, 7728, -57, -865, -865, -865, 5916, -80, -334, - -251, -157, -149, -141, -80, -140, -78, 12077, -865, -47, - -351, -76, -865, -269, -865, -45, -41, 7728, -865, -865, - -865, 7728, -74, -73, -865, -263, -865, -224, -865, -865, - 10778, -38, -865, -865, -865, -36, -69, 7728, -865, -42, - -40, -37, -865, -271, -865, -256, -33, -34, -30, -28, - -202, -27, -24, -23, -22, -21, -17, -199, -10, -15, - -29, -303, -865, -14, 7728, -865, -11, -865, -195, -865, - -865, -194, 9046, -865, -268, 1386, -865, -865, -865, -865, - -865, -38, -304, -865, 9479, -248, -865, -35, -865, -133, - 10778, 10778, -865, 10778, -865, -865, -865, -865, -865, -865, - -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, - -865, -865, -865, -274, -865, -865, -865, -6, -187, 11211, - 3, -865, 10778, -865, -865, -297, -2, -41, 4, -865, - -310, -80, -865, -31, -865, -321, 6, -130, 10778, -129, - -865, -166, -128, 10778, -124, 7, -122, -80, -865, 11644, - -865, -120, 10778, 10, -78, -865, 7728, -26, 6369, -865, - 7728, 10778, -865, -351, -865, -20, -865, -865, -79, -217, - -200, -299, -56, -13, -9, -3, 21, 26, -307, 15, - 9912, -865, 14, -865, -865, 20, 12, 13, -865, 24, - 25, 16, 10345, 27, 10778, 23, 18, 19, 22, 28, - -222, -865, -865, -132, -865, -116, 33, 35, -865, -865, - -865, -865, -865, 1839, -865, -865, -865, -865, -865, -865, - -865, -865, -865, 5010, -2, 9479, -225, 8180, -865, -865, - 9479, 7728, -865, 8, -865, -865, -865, -184, -865, -865, - 10778, 29, -865, -865, 10778, 38, -865, -865, -865, 10778, - -865, -865, -865, -312, -865, -865, -183, 31, -865, -865, - -865, -865, -865, -865, -182, -865, -180, -865, -865, -179, - 34, -865, -865, -865, -865, -175, -865, -172, -865, -171, - 39, -865, -167, 40, -163, 31, -865, -160, -865, 44, - 48, -865, -865, -26, -38, -121, -865, -865, -865, 6822, - -865, -865, -865, 10778, 10778, 10778, 10778, 10778, 10778, 10778, - 10778, 10778, 10778, 10778, 10778, 10778, 10778, 10778, 10778, 10778, - 10778, 10778, -865, -865, -865, 53, -865, 2292, -865, -865, - -865, 2292, -865, 10778, -865, -865, -119, 10778, -198, -865, - -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, - -865, -865, -865, -865, -865, 10778, 10778, -865, -865, -865, - -865, -865, -865, -865, 9479, -865, -865, -174, -865, 7275, - -865, -865, 61, 59, -865, -865, -865, -865, -865, -254, - -142, -865, -308, -865, -321, -865, -321, -865, 10778, 10778, - -865, -166, -865, -166, -865, 10778, 10778, -865, 37, 7, - -865, 11644, -865, 10778, -865, -865, -92, -2, -26, -865, - -865, -865, -865, -865, -79, -79, -217, -217, -200, -200, - -200, -200, -299, -299, -56, -13, -9, -3, 21, 26, - 10778, -865, 2292, 4104, 30, 3651, -159, -865, -158, -865, - -865, -865, -865, -865, 8613, -865, -865, -865, 71, -865, - -12, -865, -156, -865, -155, -865, -148, -865, -147, -865, - -145, -144, -865, -865, -865, -65, 67, 59, 41, 72, - 75, -865, -865, 4104, 76, -865, -865, -865, -865, -865, - -865, -865, -865, -865, -865, -865, 10778, -865, 74, 2745, - 10778, -865, 66, 80, 36, 81, 3198, -865, 82, -865, - 9479, -865, -865, -865, -143, 10778, 2745, 76, -865, -865, - 2292, -865, 78, 59, -865, -865, 2292, 84, -865, -865 + 4549, -863, -863, -863, -863, -863, -863, -863, -863, -863, + -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, + -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, + -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, + -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, + -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, + -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, + -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, + -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, + -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, + -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, + -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, + -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, + -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, + -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, + -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, + -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, + -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, + -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, + -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, + -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, + -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, + -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, + -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, + -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, + -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, + -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, + -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, + -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, + -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, + -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, + -863, -863, -863, -863, -863, -260, -182, -177, -163, -130, + -115, -100, -89, -863, -863, -196, -863, -863, -863, -863, + -863, -324, -863, -863, -863, -863, -863, -306, -863, -863, + -863, -863, -863, -863, -77, -66, -863, -863, -863, -863, + -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, + -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, + -863, -863, -863, -863, -863, -863, -863, -863, -332, -175, + -153, -161, 7713, -266, -863, -71, -863, -863, -863, -863, + 5453, -863, -863, -863, -863, -116, -863, -863, 933, -863, + -863, 7713, -35, -863, -863, -863, 5905, -54, -139, -138, + -137, -128, -124, -54, -123, -51, 12061, -863, -15, -347, + -44, -863, -295, -863, -9, -6, 7713, -863, -863, -863, + 7713, -39, -38, -863, -303, -863, -226, -863, -863, 10762, + -3, -863, -863, -863, 1, -32, 7713, -863, -5, -8, + -1, -863, -230, -863, -219, -2, 3, 4, 5, -215, + 6, 8, 10, 11, 12, 15, -214, 13, 16, 21, + -134, -863, 17, 7713, -863, 19, -863, -212, -863, -863, + -211, 9030, -863, -273, 1385, -863, -863, -863, -863, -863, + -3, -263, -863, 9463, -236, -863, -28, -863, -106, 10762, + 10762, -863, 10762, -863, -863, -863, -863, -863, -863, -863, + -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, + -863, -863, -264, -863, -863, -863, 23, -203, 11195, 25, + -863, 10762, -863, -863, -311, 24, -6, 29, -863, -309, + -54, -863, -20, -863, -323, 28, -118, 10762, -112, -863, + -155, -111, 10762, -103, 35, -98, -54, -863, 11628, -863, + -94, 10762, 32, -51, -863, 7713, 18, 6357, -863, 7713, + 10762, -863, -347, -863, 33, -863, -863, -72, -254, -86, + -297, -68, -13, 26, 20, 50, 49, -300, 42, 9896, + -863, 43, -863, -863, 55, 58, 60, -863, 65, 71, + 62, 10329, 73, 10762, 66, 69, 70, 72, 74, -241, + -863, -863, -41, -863, -175, 83, 85, -863, -863, -863, + -863, -863, 1837, -863, -863, -863, -863, -863, -863, -863, + -863, -863, 5001, 24, 9463, -233, 8164, -863, -863, 9463, + 7713, -863, 51, -863, -863, -863, -194, -863, -863, 10762, + 52, -863, -863, 10762, 88, -863, -863, -863, 10762, -863, + -863, -863, -315, -863, -863, -191, 82, -863, -863, -863, + -863, -863, -863, -190, -863, -187, -863, -863, -186, 86, + -863, -863, -863, -863, -169, -863, -168, -863, -167, 89, + -863, -165, 91, -157, 82, -863, 85, -156, -863, 94, + 98, -863, -863, 18, -3, -40, -863, -863, -863, 6809, + -863, -863, -863, 10762, 10762, 10762, 10762, 10762, 10762, 10762, + 10762, 10762, 10762, 10762, 10762, 10762, 10762, 10762, 10762, 10762, + 10762, 10762, -863, -863, -863, 97, -863, 2289, -863, -863, + -863, 2289, -863, 10762, -863, -863, -34, 10762, -79, -863, + -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, + -863, -863, -863, -863, -863, 10762, 10762, -863, -863, -863, + -863, -863, -863, -863, 9463, -863, -863, -208, -863, 7261, + -863, -863, 99, 96, -863, -863, -863, -863, -863, -132, + -131, -863, -307, -863, -323, -863, -323, -863, 10762, 10762, + -863, -155, -863, -155, -863, 10762, 10762, -863, 93, 35, + -863, 11628, -863, 10762, -863, -863, -33, 24, 18, -863, + -863, -863, -863, -863, -72, -72, -254, -254, -86, -86, + -86, -86, -297, -297, -68, -13, 26, 20, 50, 49, + 10762, -863, 2289, 4097, 57, 3645, -154, -863, -152, -863, + -863, -863, -863, -863, 8597, -863, -863, -863, 105, -863, + 75, -863, -145, -863, -144, -863, -143, -863, -142, -863, + -141, -140, -863, -863, -863, -27, 100, 96, 76, 106, + 109, -863, -863, 4097, 107, -863, -863, -863, -863, -863, + -863, -863, -863, -863, -863, -863, 10762, -863, 101, 2741, + 10762, -863, 103, 113, 67, 112, 3193, -863, 114, -863, + 9463, -863, -863, -863, -133, 10762, 2741, 107, -863, -863, + 2289, -863, 110, 96, -863, -863, 2289, 116, -863, -863 }; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. @@ -1549,137 +1547,137 @@ static const yytype_int16 yypact[] = means the default is an error. */ static const yytype_int16 yydefact[] = { - 0, 167, 220, 218, 219, 217, 224, 225, 226, 227, - 228, 229, 230, 231, 232, 221, 222, 223, 233, 234, - 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, - 346, 347, 348, 349, 350, 351, 352, 372, 373, 374, - 375, 376, 377, 378, 387, 400, 401, 388, 389, 391, - 390, 392, 393, 394, 395, 396, 397, 398, 399, 175, - 176, 246, 247, 245, 248, 255, 256, 253, 254, 251, - 252, 249, 250, 278, 279, 280, 290, 291, 292, 275, - 276, 277, 287, 288, 289, 272, 273, 274, 284, 285, - 286, 269, 270, 271, 281, 282, 283, 257, 258, 259, - 293, 294, 295, 260, 261, 262, 305, 306, 307, 263, - 264, 265, 317, 318, 319, 266, 267, 268, 329, 330, - 331, 296, 297, 298, 299, 300, 301, 302, 303, 304, - 308, 309, 310, 311, 312, 313, 314, 315, 316, 320, - 321, 322, 323, 324, 325, 326, 327, 328, 332, 333, - 334, 335, 336, 337, 338, 339, 340, 344, 341, 342, - 343, 525, 526, 527, 356, 357, 380, 383, 345, 354, - 355, 371, 353, 402, 403, 406, 407, 408, 410, 411, - 412, 414, 415, 416, 418, 419, 515, 516, 379, 381, - 382, 358, 359, 360, 404, 361, 365, 366, 369, 409, - 413, 417, 362, 363, 367, 368, 405, 364, 370, 449, - 451, 452, 453, 455, 456, 457, 459, 460, 461, 463, - 464, 465, 467, 468, 469, 471, 472, 473, 475, 476, - 477, 479, 480, 481, 483, 484, 485, 487, 488, 489, - 491, 492, 450, 454, 458, 462, 466, 474, 478, 482, - 470, 486, 490, 493, 494, 495, 496, 497, 498, 499, - 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, - 510, 511, 512, 513, 514, 384, 385, 386, 420, 429, - 431, 425, 430, 432, 433, 435, 436, 437, 439, 440, - 441, 443, 444, 445, 447, 448, 421, 422, 423, 434, - 424, 426, 427, 428, 438, 442, 446, 517, 518, 521, - 522, 523, 524, 519, 520, 0, 0, 0, 0, 0, - 0, 0, 0, 165, 166, 0, 621, 137, 531, 532, - 533, 0, 530, 171, 169, 170, 168, 0, 216, 172, - 173, 174, 139, 138, 0, 200, 181, 183, 179, 185, - 187, 182, 184, 180, 186, 188, 177, 178, 202, 189, - 196, 197, 198, 199, 190, 191, 192, 193, 194, 195, - 140, 141, 143, 142, 144, 145, 146, 153, 620, 0, - 622, 0, 114, 113, 0, 125, 130, 160, 159, 157, - 161, 0, 154, 156, 162, 135, 212, 158, 529, 0, - 617, 619, 0, 0, 163, 164, 528, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 536, 0, - 0, 0, 99, 0, 94, 0, 109, 0, 121, 115, - 123, 0, 124, 0, 97, 131, 102, 0, 155, 136, - 0, 205, 211, 1, 618, 0, 0, 0, 96, 0, - 0, 0, 629, 0, 681, 0, 0, 0, 0, 0, + 0, 166, 219, 217, 218, 216, 223, 224, 225, 226, + 227, 228, 229, 230, 231, 220, 221, 222, 232, 233, + 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, + 345, 346, 347, 348, 349, 350, 351, 371, 372, 373, + 374, 375, 376, 377, 386, 399, 400, 387, 388, 390, + 389, 391, 392, 393, 394, 395, 396, 397, 398, 174, + 175, 245, 246, 244, 247, 254, 255, 252, 253, 250, + 251, 248, 249, 277, 278, 279, 289, 290, 291, 274, + 275, 276, 286, 287, 288, 271, 272, 273, 283, 284, + 285, 268, 269, 270, 280, 281, 282, 256, 257, 258, + 292, 293, 294, 259, 260, 261, 304, 305, 306, 262, + 263, 264, 316, 317, 318, 265, 266, 267, 328, 329, + 330, 295, 296, 297, 298, 299, 300, 301, 302, 303, + 307, 308, 309, 310, 311, 312, 313, 314, 315, 319, + 320, 321, 322, 323, 324, 325, 326, 327, 331, 332, + 333, 334, 335, 336, 337, 338, 339, 343, 340, 341, + 342, 524, 525, 526, 355, 356, 379, 382, 344, 353, + 354, 370, 352, 401, 402, 405, 406, 407, 409, 410, + 411, 413, 414, 415, 417, 418, 514, 515, 378, 380, + 381, 357, 358, 359, 403, 360, 364, 365, 368, 408, + 412, 416, 361, 362, 366, 367, 404, 363, 369, 448, + 450, 451, 452, 454, 455, 456, 458, 459, 460, 462, + 463, 464, 466, 467, 468, 470, 471, 472, 474, 475, + 476, 478, 479, 480, 482, 483, 484, 486, 487, 488, + 490, 491, 449, 453, 457, 461, 465, 473, 477, 481, + 469, 485, 489, 492, 493, 494, 495, 496, 497, 498, + 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, + 509, 510, 511, 512, 513, 383, 384, 385, 419, 428, + 430, 424, 429, 431, 432, 434, 435, 436, 438, 439, + 440, 442, 443, 444, 446, 447, 420, 421, 422, 433, + 423, 425, 426, 427, 437, 441, 445, 516, 517, 520, + 521, 522, 523, 518, 519, 0, 0, 0, 0, 0, + 0, 0, 0, 164, 165, 0, 620, 137, 530, 531, + 532, 0, 529, 170, 168, 169, 167, 0, 215, 171, + 172, 173, 139, 138, 0, 199, 180, 182, 178, 184, + 186, 181, 183, 179, 185, 187, 176, 177, 201, 188, + 195, 196, 197, 198, 189, 190, 191, 192, 193, 194, + 140, 141, 142, 143, 144, 145, 152, 619, 0, 621, + 0, 114, 113, 0, 125, 130, 159, 158, 156, 160, + 0, 153, 155, 161, 135, 211, 157, 528, 0, 616, + 618, 0, 0, 162, 163, 527, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 535, 0, 0, + 0, 99, 0, 94, 0, 109, 0, 121, 115, 123, + 0, 124, 0, 97, 131, 102, 0, 154, 136, 0, + 204, 210, 1, 617, 0, 0, 0, 96, 0, 0, + 0, 628, 0, 681, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 626, + 0, 624, 0, 0, 533, 149, 151, 0, 147, 202, + 0, 0, 100, 0, 0, 622, 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, + 213, 0, 36, 34, 0, 205, 111, 0, 95, 0, + 0, 679, 0, 636, 0, 0, 0, 0, 0, 653, + 0, 0, 0, 0, 0, 0, 0, 673, 0, 651, + 0, 0, 0, 0, 98, 0, 0, 0, 537, 0, + 0, 146, 0, 200, 0, 206, 45, 49, 52, 55, + 60, 63, 65, 67, 69, 71, 73, 75, 0, 0, + 101, 564, 573, 577, 0, 0, 0, 598, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 45, + 78, 91, 0, 551, 0, 161, 135, 554, 575, 553, + 561, 552, 0, 555, 556, 579, 557, 586, 558, 559, + 594, 560, 0, 119, 0, 127, 0, 545, 134, 0, + 0, 107, 0, 104, 38, 39, 0, 22, 23, 0, + 0, 28, 27, 0, 215, 31, 33, 40, 0, 212, + 112, 683, 0, 684, 629, 0, 0, 682, 648, 644, + 645, 646, 647, 0, 642, 0, 93, 649, 0, 0, + 663, 664, 665, 666, 0, 661, 0, 667, 0, 0, + 669, 0, 0, 0, 2, 677, 678, 0, 675, 0, + 0, 623, 625, 0, 543, 0, 541, 536, 538, 0, + 150, 148, 203, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 627, 0, 625, 0, 0, 534, 150, 152, 0, 148, - 203, 0, 0, 100, 0, 0, 623, 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, 214, 0, 36, 34, 0, 206, 111, 0, 95, - 0, 0, 679, 0, 637, 0, 0, 0, 0, 0, - 654, 0, 0, 0, 0, 0, 0, 0, 674, 0, - 652, 0, 0, 0, 0, 98, 0, 0, 0, 538, - 0, 0, 147, 0, 201, 0, 207, 45, 49, 52, - 55, 60, 63, 65, 67, 69, 71, 73, 75, 0, - 0, 101, 565, 574, 578, 0, 0, 0, 599, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 45, 78, 91, 0, 552, 0, 162, 135, 555, 576, - 554, 562, 553, 0, 556, 557, 580, 558, 587, 559, - 560, 595, 561, 0, 119, 0, 127, 0, 546, 134, - 0, 0, 107, 0, 104, 38, 39, 0, 22, 23, - 0, 0, 28, 27, 0, 216, 31, 33, 40, 0, - 213, 112, 683, 0, 684, 630, 0, 0, 682, 649, - 645, 646, 647, 648, 0, 643, 0, 93, 650, 0, - 0, 664, 665, 666, 667, 0, 662, 0, 668, 0, - 0, 670, 0, 0, 0, 2, 678, 0, 676, 0, - 0, 624, 626, 0, 544, 0, 542, 537, 539, 0, - 151, 149, 204, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 76, 208, 209, 0, 564, 0, 597, 610, - 609, 0, 601, 0, 613, 611, 0, 0, 0, 594, - 614, 615, 616, 563, 81, 82, 84, 83, 86, 87, - 88, 89, 90, 85, 80, 0, 0, 579, 575, 577, - 581, 588, 596, 129, 0, 549, 550, 0, 133, 0, - 108, 4, 0, 24, 21, 32, 215, 633, 635, 0, - 0, 680, 0, 639, 0, 638, 0, 641, 0, 0, - 656, 0, 655, 0, 658, 0, 0, 660, 0, 0, - 675, 0, 672, 0, 653, 628, 0, 545, 0, 540, - 535, 46, 47, 48, 51, 50, 53, 54, 58, 59, + 0, 0, 76, 207, 208, 0, 563, 0, 596, 609, + 608, 0, 600, 0, 612, 610, 0, 0, 0, 593, + 613, 614, 615, 562, 81, 82, 84, 83, 86, 87, + 88, 89, 90, 85, 80, 0, 0, 578, 574, 576, + 580, 587, 595, 129, 0, 548, 549, 0, 133, 0, + 108, 4, 0, 24, 21, 32, 214, 632, 634, 0, + 0, 680, 0, 638, 0, 637, 0, 640, 0, 0, + 655, 0, 654, 0, 657, 0, 0, 659, 0, 0, + 674, 0, 671, 0, 652, 627, 0, 544, 0, 539, + 534, 46, 47, 48, 51, 50, 53, 54, 58, 59, 56, 57, 61, 62, 64, 66, 68, 70, 72, 74, - 0, 210, 566, 0, 0, 0, 0, 612, 0, 593, - 79, 92, 128, 547, 0, 106, 19, 631, 0, 632, - 0, 644, 0, 651, 0, 663, 0, 669, 0, 671, - 0, 0, 677, 541, 543, 0, 0, 585, 0, 0, - 0, 604, 603, 606, 572, 589, 548, 551, 634, 636, - 640, 642, 657, 659, 661, 673, 0, 567, 0, 0, - 0, 605, 0, 0, 584, 0, 0, 582, 0, 77, - 0, 569, 598, 568, 0, 607, 0, 572, 571, 573, - 591, 586, 0, 608, 602, 583, 592, 0, 600, 590 + 0, 209, 565, 0, 0, 0, 0, 611, 0, 592, + 79, 92, 128, 546, 0, 106, 19, 630, 0, 631, + 0, 643, 0, 650, 0, 662, 0, 668, 0, 670, + 0, 0, 676, 540, 542, 0, 0, 584, 0, 0, + 0, 603, 602, 605, 571, 588, 547, 550, 633, 635, + 639, 641, 656, 658, 660, 672, 0, 566, 0, 0, + 0, 604, 0, 0, 583, 0, 0, 581, 0, 77, + 0, 568, 597, 567, 0, 606, 0, 571, 570, 572, + 590, 585, 0, 607, 601, 582, 591, 0, 599, 589 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { - -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, - -865, -865, -211, -865, -423, -422, -501, -426, -287, -286, - -285, -284, -288, -282, -865, -475, -865, -490, -865, -497, - -525, 11, -865, -865, -865, 5, -385, -865, -865, 32, - 42, 45, -865, -865, -399, -865, -865, -865, -865, -127, - -865, -382, -367, -865, 9, -865, 0, -425, -865, -865, - -865, -865, 119, -865, -865, -865, -544, -549, -252, -366, - -622, -865, -391, -611, -864, -865, -452, -865, -865, -461, - -460, -865, -865, 43, -716, -387, -865, -173, -865, -424, - -865, -169, -865, -865, -865, -865, -168, -865, -865, -865, - -865, -865, -865, -865, -865, 63, -865, -865, 2, -865, - -98, -272, -448, -865, -865, -865, -329, -324, -327, -865, - -865, -332, -326, -333, -331, -865, -330, -336, -865, -392, - -529 + -863, -863, -863, -863, -863, -863, -863, -863, -863, -863, + -863, -863, -418, -863, -380, -379, -484, -382, -258, -256, + -253, -257, -252, -255, -863, -478, -863, -485, -863, -491, + -530, 14, -863, -863, -863, 7, -397, -863, -863, 44, + 53, 47, -863, -863, -400, -863, -863, -863, -863, -92, + -863, -377, -362, -863, 9, -863, 0, -414, -863, -863, + -863, -863, 150, -863, -863, -863, -546, -548, -218, -331, + -624, -863, -359, -609, -862, -863, -417, -863, -863, -427, + -426, -863, -863, 68, -719, -355, -863, -136, -863, -389, + -863, -135, -863, -863, -863, -863, -129, -863, -863, -863, + -863, -863, -863, -863, -863, 102, -863, -863, 2, -863, + -65, -234, -432, -863, -863, -863, -301, -293, -294, -863, + -863, -304, -299, -302, -298, -863, -296, -305, -863, -383, + -526 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int16 yydefgoto[] = { - -1, 521, 522, 523, 782, 524, 525, 526, 527, 528, - 529, 530, 610, 532, 578, 579, 580, 581, 582, 583, - 584, 585, 586, 587, 588, 611, 840, 612, 765, 613, - 696, 614, 379, 641, 499, 615, 381, 382, 383, 428, - 429, 430, 384, 385, 386, 387, 388, 389, 478, 479, - 390, 391, 392, 393, 533, 481, 534, 484, 441, 442, - 535, 396, 397, 398, 570, 474, 568, 569, 705, 706, - 639, 777, 618, 619, 620, 621, 622, 737, 876, 912, - 904, 905, 906, 913, 623, 624, 625, 626, 907, 879, - 627, 628, 908, 927, 629, 630, 631, 843, 741, 845, - 883, 902, 903, 632, 399, 400, 401, 425, 633, 471, - 472, 451, 452, 789, 790, 403, 674, 675, 679, 404, - 405, 685, 686, 689, 692, 406, 697, 698, 407, 453, - 454 + -1, 520, 521, 522, 782, 523, 524, 525, 526, 527, + 528, 529, 609, 531, 577, 578, 579, 580, 581, 582, + 583, 584, 585, 586, 587, 610, 840, 611, 765, 612, + 695, 613, 378, 640, 498, 614, 380, 381, 382, 427, + 428, 429, 383, 384, 385, 386, 387, 388, 477, 478, + 389, 390, 391, 392, 532, 480, 533, 483, 440, 441, + 534, 395, 396, 397, 569, 473, 567, 568, 705, 706, + 638, 777, 617, 618, 619, 620, 621, 737, 876, 912, + 904, 905, 906, 913, 622, 623, 624, 625, 907, 879, + 626, 627, 908, 927, 628, 629, 630, 843, 741, 845, + 883, 902, 903, 631, 398, 399, 400, 424, 632, 470, + 471, 450, 451, 789, 790, 402, 673, 674, 678, 403, + 404, 684, 685, 688, 691, 405, 697, 698, 406, 452, + 453 }; /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If @@ -1687,100 +1685,100 @@ static const yytype_int16 yydefgoto[] = number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_int16 yytable[] = { - 395, 431, 402, 446, 638, 380, 647, 589, 446, 394, - 495, 378, 769, 773, 668, 776, 536, 445, 778, 708, - 447, 842, 467, 678, 438, 447, 709, 669, 688, 731, - 668, 422, 720, 721, 476, 911, 787, 700, 662, 656, - 662, 663, 919, 408, 418, 431, 710, 482, 455, 563, - 416, 456, 911, 564, 635, 648, 649, 423, 477, 659, - 670, 671, 672, 673, 438, 732, 634, 636, 722, 723, - 788, 660, 664, 677, 664, -35, 419, 650, 677, 542, - 438, 651, 482, 590, 677, 543, 493, 677, 482, 409, - 483, 591, 566, 665, 544, 494, 677, 779, 857, 665, - 545, 665, 858, 590, 665, 746, 665, 748, 665, 665, - 640, 433, 410, 665, 434, 735, 754, 755, 756, 757, - 758, 759, 760, 761, 762, 763, 590, 718, 719, 496, - 844, 458, 497, 774, 456, 498, 764, 457, 459, 461, - 463, 465, 466, 469, 716, 638, 717, 638, 550, 666, - 638, 558, 852, 783, 551, 572, 574, 559, 766, 849, - 708, 573, 575, 653, 785, 694, 781, 791, 793, 654, - 795, 797, 766, 543, 794, 800, 796, 798, 802, 804, - 853, 801, 854, 807, 803, 805, 566, 810, 566, 808, - 812, 884, 885, 811, 890, 891, 813, 766, 766, 438, - 794, 798, 892, 893, 926, 894, 895, 922, 801, 805, - 859, 808, 813, 766, 860, 681, 682, 683, 684, 828, - 829, 830, 831, 643, 766, 460, 644, 767, 456, 531, - 708, 769, 887, 462, 446, 818, 456, 766, 819, 411, - 847, 464, 468, 424, 456, 456, 846, 412, 445, 413, - 848, 447, 676, 680, 687, 456, 456, 456, 690, 566, - 693, 456, 699, 456, 818, 456, 414, 873, 328, 329, - 330, 577, 415, 863, 678, 850, 851, 724, 725, 817, - 867, 688, 668, 420, 638, 713, 714, 715, 921, 645, - 646, 766, 896, 824, 825, 421, 826, 827, 832, 833, - 426, 427, 448, 435, 440, 450, 475, 470, 485, 480, - 325, 491, 492, 482, 537, 769, 538, 539, 540, 541, - 562, 658, 547, 677, 677, 546, 548, 566, 549, 552, - 677, 677, 553, 554, 555, 556, 677, 577, 677, 557, - 560, 561, 577, 875, 652, 565, 877, 571, 577, 590, - 642, 577, 657, 493, 667, 691, 729, 663, 726, 704, - 577, 727, 701, 730, 638, 712, 728, 733, 736, 738, - 889, 739, 740, 742, 743, 744, 747, 750, 751, 577, - 749, 752, -36, 432, -34, 869, 877, 753, -29, 792, - 799, 439, 394, 780, 814, 806, 809, 566, 815, 395, - 394, 402, 395, 914, 380, 841, 909, 395, 394, 402, - 378, 394, 449, 856, 784, 766, 394, 473, 923, 888, - 638, 897, 899, 880, 900, 915, 898, 432, 487, -570, - 916, 432, 910, 917, 592, 920, 394, 928, 929, 834, - 394, 835, 838, 836, 878, 837, 711, 439, 786, 839, - 417, 816, 874, 918, 881, 924, 394, 925, 882, 901, - 770, 447, 444, 489, 771, 772, 702, 862, 486, 488, - 861, 866, 864, 868, 567, 865, 490, 872, 870, 0, - 0, 871, 0, 394, 878, 617, 0, 0, 0, 0, - 0, 0, 0, 0, 616, 0, 0, 0, 0, 0, - 0, 447, 821, 822, 823, 577, 577, 577, 577, 577, - 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, - 577, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 661, + 394, 445, 401, 588, 444, 430, 445, 379, 637, 393, + 773, 646, 776, 769, 377, 778, 667, 677, 842, 708, + 494, 530, 687, 709, 446, 668, 535, 421, 437, 446, + 466, 700, 667, 787, 720, 721, 731, 911, 475, 661, + 710, 661, 662, 655, 919, 658, 492, 417, 481, 430, + 328, 329, 330, 422, 911, 493, 481, 659, 669, 670, + 671, 672, 476, 576, 482, 647, 648, 788, 437, 676, + 722, 723, 732, 663, 676, 663, 633, 635, 589, 418, + 676, 644, 645, 676, 437, -35, 590, 649, 481, 407, + 432, 650, 676, 433, 779, 634, 565, 754, 755, 756, + 757, 758, 759, 760, 761, 762, 763, 716, 664, 717, + 746, 735, 748, 657, 664, 589, 664, 764, 589, 664, + 541, 664, 639, 664, 664, 774, 542, 495, 664, 576, + 496, 543, 844, 497, 576, 549, 557, 544, 571, 573, + 576, 550, 558, 576, 572, 574, 853, 652, 854, 637, + 852, 637, 576, 653, 637, 415, 781, 665, 783, 791, + 793, 708, 766, 795, 797, 542, 794, 408, 785, 796, + 798, 576, 409, 693, 456, 458, 460, 462, 464, 465, + 468, 800, 802, 804, 423, 807, 410, 801, 803, 805, + 565, 808, 565, 810, 812, 426, 884, 425, 885, 811, + 813, 926, 766, 437, 766, 890, 891, 892, 893, 894, + 895, 794, 798, 801, 805, 808, 813, 922, 562, 411, + 857, 859, 563, 766, 858, 860, 680, 681, 682, 683, + 887, 708, 445, 769, 412, 444, 828, 829, 830, 831, + 786, 718, 719, 454, 457, 459, 455, 455, 455, 413, + 642, 439, 846, 643, 461, 446, 848, 455, 463, 467, + 414, 455, 455, 565, 675, 724, 725, 455, 863, 677, + 679, 686, 419, 455, 455, 867, 687, 766, 849, 689, + 850, 851, 455, 420, 692, 667, 921, 455, 699, 637, + 817, 455, 713, 714, 715, 821, 822, 823, 576, 576, + 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, + 576, 576, 576, 576, 434, 766, 818, 769, 767, 819, + 676, 676, 766, 818, 447, 847, 873, 676, 676, 766, + 896, 449, 565, 676, 469, 676, 824, 825, 474, 826, + 827, 479, 832, 833, 484, 325, 490, 491, 481, 875, + 539, 536, 877, 537, 538, 540, 545, 641, 726, 546, + 547, 548, 551, 559, 552, 666, 553, 554, 555, 637, + 561, 556, 560, 651, 656, 589, 564, 570, 492, 662, + 576, 576, 431, 690, 701, 729, 730, 576, 576, 728, + 438, 393, 877, 576, 733, 576, 727, 736, 394, 393, + 401, 394, 565, 704, 738, 379, 394, 393, 401, 914, + 393, 909, 377, 448, 742, 393, 472, 739, 712, 740, + 743, 744, 747, 749, 923, 637, 431, 486, 750, 751, + 431, 752, -36, 753, -34, 393, 780, 784, -29, 393, + 792, 869, 799, 878, 814, 806, 438, 809, 815, 841, + 880, 856, 766, 888, 897, 393, 899, 889, 900, 910, + -569, 898, 915, 916, 917, 591, 446, 920, 834, 928, + 929, 835, 837, 566, 488, 836, 839, 489, 838, 487, + 711, 416, 393, 878, 616, 816, 881, 874, 918, 924, + 882, 925, 485, 615, 901, 862, 770, 771, 702, 866, + 443, 861, 865, 772, 868, 864, 446, 0, 872, 0, + 0, 870, 0, 0, 0, 871, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 660, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 703, 0, 567, 0, - 567, 0, 0, 0, 0, 394, 0, 394, 0, 394, - 0, 0, 0, 0, 0, 0, 0, 577, 577, 0, - 0, 0, 0, 0, 577, 577, 0, 0, 0, 0, - 577, 0, 577, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 617, 0, 0, 0, 0, 0, 0, - 0, 0, 616, 395, 0, 0, 0, 0, 0, 0, - 0, 567, 394, 0, 0, 0, 0, 0, 0, 0, - 394, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 696, 0, + 0, 0, 0, 0, 0, 703, 0, 566, 0, 566, + 0, 0, 0, 0, 393, 0, 393, 0, 393, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 567, - 0, 0, 0, 0, 0, 0, 0, 0, 394, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 617, 0, 0, - 0, 617, 0, 0, 0, 0, 616, 0, 0, 0, - 616, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 567, - 0, 0, 0, 0, 0, 0, 0, 0, 394, 0, + 0, 0, 616, 0, 0, 0, 0, 0, 0, 0, + 0, 615, 394, 0, 0, 0, 0, 0, 0, 0, + 566, 393, 0, 0, 0, 0, 0, 0, 0, 393, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 617, 617, 0, 617, 0, 402, 0, 0, - 0, 616, 616, 0, 616, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 566, + 0, 0, 0, 0, 0, 0, 0, 0, 393, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 616, 0, 0, + 0, 616, 0, 0, 0, 0, 615, 0, 0, 0, + 615, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 566, + 0, 0, 0, 0, 0, 0, 0, 0, 393, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 617, 0, 0, 0, 0, 0, 0, - 0, 0, 616, 0, 0, 0, 0, 0, 0, 617, - 0, 0, 0, 0, 0, 0, 617, 0, 616, 0, - 0, 0, 0, 0, 0, 616, 617, 0, 0, 0, - 617, 0, 0, 0, 0, 616, 617, 0, 0, 616, - 0, 0, 0, 443, 0, 616, 1, 2, 3, 4, + 0, 696, 0, 696, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 616, 616, 0, 616, 0, 401, 0, 0, + 0, 615, 615, 0, 615, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 616, 0, 0, 0, 0, 0, 0, + 0, 0, 615, 0, 0, 0, 0, 0, 0, 616, + 0, 0, 0, 0, 0, 0, 616, 0, 615, 0, + 0, 0, 0, 0, 0, 615, 616, 0, 0, 0, + 616, 0, 0, 0, 0, 615, 616, 0, 0, 615, + 0, 0, 0, 442, 0, 615, 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, @@ -1825,143 +1823,7 @@ static const yytype_int16 yytable[] = 0, 0, 0, 0, 0, 345, 0, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, - 369, 370, 371, 372, 373, 374, 375, 376, 377, 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, 0, 0, 500, 501, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 502, 503, 0, 325, 0, 592, - 593, 0, 0, 0, 0, 594, 504, 505, 506, 507, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 327, - 328, 329, 330, 331, 0, 0, 0, 508, 509, 510, - 511, 512, 332, 333, 334, 335, 336, 337, 338, 595, - 596, 597, 598, 0, 599, 600, 601, 602, 603, 604, - 605, 606, 607, 608, 339, 340, 341, 342, 343, 344, - 513, 514, 515, 516, 517, 518, 519, 520, 345, 609, - 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, - 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, - 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, - 376, 377, 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, 0, 0, 500, 501, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 502, 503, 0, - 325, 0, 592, 768, 0, 0, 0, 0, 594, 504, - 505, 506, 507, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 327, 328, 329, 330, 331, 0, 0, 0, - 508, 509, 510, 511, 512, 332, 333, 334, 335, 336, - 337, 338, 595, 596, 597, 598, 0, 599, 600, 601, - 602, 603, 604, 605, 606, 607, 608, 339, 340, 341, - 342, 343, 344, 513, 514, 515, 516, 517, 518, 519, - 520, 345, 609, 346, 347, 348, 349, 350, 351, 352, - 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, - 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, - 373, 374, 375, 376, 377, 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, 0, - 0, 500, 501, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 502, 503, 0, 325, 0, 592, 0, 0, 0, 0, - 0, 594, 504, 505, 506, 507, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 327, 328, 329, 330, 331, - 0, 0, 0, 508, 509, 510, 511, 512, 332, 333, - 334, 335, 336, 337, 338, 595, 596, 597, 598, 0, - 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, - 339, 340, 341, 342, 343, 344, 513, 514, 515, 516, - 517, 518, 519, 520, 345, 609, 346, 347, 348, 349, - 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, - 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, - 370, 371, 372, 373, 374, 375, 376, 377, 1, 2, + 369, 370, 371, 372, 373, 374, 375, 376, 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, @@ -1994,155 +1856,19 @@ static const yytype_int16 yytable[] = 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, 0, 0, 500, 501, 0, 0, 0, 0, + 323, 324, 0, 0, 499, 500, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 502, 503, 0, 325, 0, 485, 0, - 0, 0, 0, 0, 594, 504, 505, 506, 507, 0, + 0, 0, 0, 501, 502, 0, 325, 0, 591, 592, + 0, 0, 0, 0, 593, 503, 504, 505, 506, 0, 0, 0, 0, 0, 0, 0, 0, 0, 327, 328, - 329, 330, 331, 0, 0, 0, 508, 509, 510, 511, - 512, 332, 333, 334, 335, 336, 337, 338, 595, 596, - 597, 598, 0, 599, 600, 601, 602, 603, 604, 605, - 606, 607, 608, 339, 340, 341, 342, 343, 344, 513, - 514, 515, 516, 517, 518, 519, 520, 345, 609, 346, + 329, 330, 331, 0, 0, 0, 507, 508, 509, 510, + 511, 332, 333, 334, 335, 336, 337, 338, 594, 595, + 596, 597, 0, 598, 599, 600, 601, 602, 603, 604, + 605, 606, 607, 339, 340, 341, 342, 343, 344, 512, + 513, 514, 515, 516, 517, 518, 519, 345, 608, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, - 377, 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, 0, 0, 500, 501, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 502, 503, 0, 325, - 0, 0, 0, 0, 0, 0, 0, 594, 504, 505, - 506, 507, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 327, 328, 329, 330, 331, 0, 0, 0, 508, - 509, 510, 511, 512, 332, 333, 334, 335, 336, 337, - 338, 595, 596, 597, 598, 0, 599, 600, 601, 602, - 603, 604, 605, 606, 607, 608, 339, 340, 341, 342, - 343, 344, 513, 514, 515, 516, 517, 518, 519, 520, - 345, 609, 346, 347, 348, 349, 350, 351, 352, 353, - 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, - 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, - 374, 375, 376, 377, 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, 0, 0, - 500, 501, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 502, - 503, 0, 325, 0, 0, 0, 0, 0, 0, 0, - 594, 504, 505, 506, 507, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 327, 328, 329, 330, 331, 0, - 0, 0, 508, 509, 510, 511, 512, 332, 333, 334, - 335, 336, 337, 338, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 339, - 340, 341, 342, 343, 344, 513, 514, 515, 516, 517, - 518, 519, 520, 345, 0, 346, 347, 348, 349, 350, - 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, - 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, - 371, 372, 373, 374, 375, 376, 377, 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, 0, 0, 0, 318, 319, 320, 321, 322, 323, - 324, 0, 0, 500, 501, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 502, 503, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 504, 505, 506, 507, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 327, 328, 329, - 330, 0, 0, 0, 0, 508, 509, 510, 511, 512, - 332, 333, 334, 335, 336, 337, 338, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 339, 340, 341, 342, 343, 344, 513, 514, - 515, 516, 517, 518, 519, 520, 345, 0, 346, 347, - 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, - 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, - 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 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, @@ -2175,65 +1901,336 @@ static const yytype_int16 yytable[] = 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, 0, 0, 0, 0, 0, 0, + 321, 322, 323, 324, 0, 0, 499, 500, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 325, 0, - 0, 0, 0, 0, 0, 0, 326, 0, 0, 0, + 0, 0, 0, 0, 0, 501, 502, 0, 325, 0, + 591, 768, 0, 0, 0, 0, 593, 503, 504, 505, + 506, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 327, 328, 329, 330, 331, 0, 0, 0, 507, 508, + 509, 510, 511, 332, 333, 334, 335, 336, 337, 338, + 594, 595, 596, 597, 0, 598, 599, 600, 601, 602, + 603, 604, 605, 606, 607, 339, 340, 341, 342, 343, + 344, 512, 513, 514, 515, 516, 517, 518, 519, 345, + 608, 346, 347, 348, 349, 350, 351, 352, 353, 354, + 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, + 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, + 375, 376, 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, 0, 0, 499, 500, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 327, 328, 329, 330, 331, 0, 0, 0, 0, 0, - 0, 0, 0, 332, 333, 334, 335, 336, 337, 338, + 0, 0, 0, 0, 0, 0, 0, 501, 502, 0, + 325, 0, 591, 0, 0, 0, 0, 0, 593, 503, + 504, 505, 506, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 327, 328, 329, 330, 331, 0, 0, 0, + 507, 508, 509, 510, 511, 332, 333, 334, 335, 336, + 337, 338, 594, 595, 596, 597, 0, 598, 599, 600, + 601, 602, 603, 604, 605, 606, 607, 339, 340, 341, + 342, 343, 344, 512, 513, 514, 515, 516, 517, 518, + 519, 345, 608, 346, 347, 348, 349, 350, 351, 352, + 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, + 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, + 373, 374, 375, 376, 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, 0, 0, + 499, 500, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 501, + 502, 0, 325, 0, 484, 0, 0, 0, 0, 0, + 593, 503, 504, 505, 506, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 327, 328, 329, 330, 331, 0, + 0, 0, 507, 508, 509, 510, 511, 332, 333, 334, + 335, 336, 337, 338, 594, 595, 596, 597, 0, 598, + 599, 600, 601, 602, 603, 604, 605, 606, 607, 339, + 340, 341, 342, 343, 344, 512, 513, 514, 515, 516, + 517, 518, 519, 345, 608, 346, 347, 348, 349, 350, + 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, + 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, + 371, 372, 373, 374, 375, 376, 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, + 0, 0, 499, 500, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 501, 502, 0, 325, 0, 0, 0, 0, 0, + 0, 0, 593, 503, 504, 505, 506, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 327, 328, 329, 330, + 331, 0, 0, 0, 507, 508, 509, 510, 511, 332, + 333, 334, 335, 336, 337, 338, 594, 595, 596, 597, + 0, 598, 599, 600, 601, 602, 603, 604, 605, 606, + 607, 339, 340, 341, 342, 343, 344, 512, 513, 514, + 515, 516, 517, 518, 519, 345, 608, 346, 347, 348, + 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, + 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, + 369, 370, 371, 372, 373, 374, 375, 376, 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, 0, 0, 499, 500, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 501, 502, 0, 325, 0, 0, 0, + 0, 0, 0, 0, 593, 503, 504, 505, 506, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 327, 328, + 329, 330, 331, 0, 0, 0, 507, 508, 509, 510, + 511, 332, 333, 334, 335, 336, 337, 338, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 339, 340, 341, 342, 343, 344, 512, + 513, 514, 515, 516, 517, 518, 519, 345, 0, 346, + 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, + 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, + 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, + 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, 0, 0, 0, 318, 319, 320, + 321, 322, 323, 324, 0, 0, 499, 500, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 501, 502, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 503, 504, 505, + 506, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 327, 328, 329, 330, 0, 0, 0, 0, 507, 508, + 509, 510, 511, 332, 333, 334, 335, 336, 337, 338, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 339, 340, 341, 342, 343, - 344, 0, 0, 0, 0, 0, 0, 0, 0, 345, + 344, 512, 513, 514, 515, 516, 517, 518, 519, 345, 0, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, - 375, 376, 377, 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, 0, 0, 0, - 318, 319, 320, 321, 322, 323, 324, 0, 0, 0, + 375, 376, 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, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 325, 0, 0, 0, 0, 0, 0, 0, 326, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 327, 328, 329, 330, 331, 0, 0, 0, + 0, 0, 0, 0, 0, 332, 333, 334, 335, 336, + 337, 338, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 339, 340, 341, + 342, 343, 344, 0, 0, 0, 0, 0, 0, 0, + 0, 345, 0, 346, 347, 348, 349, 350, 351, 352, + 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, + 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, + 373, 374, 375, 376, 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, 0, 0, + 0, 318, 319, 320, 321, 322, 323, 324, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 327, 328, 329, 330, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 332, 333, 334, 335, - 336, 337, 338, 595, 0, 0, 598, 0, 599, 600, - 0, 0, 603, 0, 0, 0, 0, 0, 339, 340, - 341, 342, 343, 344, 0, 0, 0, 0, 0, 0, - 0, 0, 345, 0, 346, 347, 348, 349, 350, 351, - 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, - 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, - 372, 373, 374, 375, 376, 377, 1, 2, 3, 4, + 0, 0, 0, 0, 327, 328, 329, 330, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 332, 333, 334, + 335, 336, 337, 338, 594, 0, 0, 597, 0, 598, + 599, 0, 0, 602, 0, 0, 0, 0, 0, 339, + 340, 341, 342, 343, 344, 0, 0, 0, 0, 0, + 0, 0, 0, 345, 0, 346, 347, 348, 349, 350, + 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, + 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, + 371, 372, 373, 374, 375, 376, 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, @@ -2269,152 +2266,16 @@ static const yytype_int16 yytable[] = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 436, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 435, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 327, 328, 329, 330, - 0, 0, 0, 0, 0, 0, 0, 0, 437, 332, + 0, 0, 0, 0, 0, 0, 0, 0, 436, 332, 333, 334, 335, 336, 337, 338, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 339, 340, 341, 342, 343, 344, 0, 0, 0, 0, 0, 0, 0, 0, 345, 0, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, - 369, 370, 371, 372, 373, 374, 375, 376, 377, 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, 0, 0, 0, 318, 319, 320, 321, - 322, 323, 324, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 325, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 327, - 328, 329, 330, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 332, 333, 334, 335, 336, 337, 338, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 339, 340, 341, 342, 343, 344, - 0, 0, 0, 0, 0, 0, 0, 0, 345, 0, - 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, - 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, - 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, - 376, 377, 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, 0, 0, 0, 318, - 319, 320, 321, 322, 323, 324, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 707, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 327, 328, 329, 330, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 332, 333, 334, 335, 336, - 337, 338, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 339, 340, 341, - 342, 343, 344, 0, 0, 0, 0, 0, 0, 0, - 0, 345, 0, 346, 347, 348, 349, 350, 351, 352, - 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, - 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, - 373, 374, 375, 376, 377, 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, 0, - 0, 0, 318, 319, 320, 321, 322, 323, 324, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 820, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 327, 328, 329, 330, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 332, 333, - 334, 335, 336, 337, 338, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 339, 340, 341, 342, 343, 344, 0, 0, 0, 0, - 0, 0, 0, 0, 345, 0, 346, 347, 348, 349, - 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, - 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, - 370, 371, 372, 373, 374, 375, 376, 377, 1, 2, + 369, 370, 371, 372, 373, 374, 375, 376, 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, @@ -2449,7 +2310,7 @@ static const yytype_int16 yytable[] = 313, 314, 0, 0, 0, 318, 319, 320, 321, 322, 323, 324, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 855, + 0, 0, 0, 0, 0, 0, 325, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 327, 328, 329, 330, 0, 0, 0, 0, 0, 0, 0, 0, @@ -2460,52 +2321,274 @@ static const yytype_int16 yytable[] = 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, - 377, 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, 0, 0, 0, 318, 319, - 320, 321, 322, 323, 324, 0, 0, 0, 0, 0, + 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, 0, 0, 0, 318, 319, 320, + 321, 322, 323, 324, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 707, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 327, 328, 329, 330, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 332, 333, 334, 335, 336, 337, 338, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 339, 340, 341, 342, 343, + 344, 0, 0, 0, 0, 0, 0, 0, 0, 345, + 0, 346, 347, 348, 349, 350, 351, 352, 353, 354, + 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, + 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, + 375, 376, 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, 0, 0, 0, 318, + 319, 320, 321, 322, 323, 324, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 820, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 327, 328, 329, 330, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 332, 333, 334, 335, 336, + 337, 338, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 339, 340, 341, + 342, 343, 344, 0, 0, 0, 0, 0, 0, 0, + 0, 345, 0, 346, 347, 348, 349, 350, 351, 352, + 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, + 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, + 373, 374, 375, 376, 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, 0, 0, + 0, 318, 319, 320, 321, 322, 323, 324, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 855, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 327, 328, 329, 330, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 332, 333, 334, + 335, 336, 337, 338, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 339, + 340, 341, 342, 343, 344, 0, 0, 0, 0, 0, + 0, 0, 0, 345, 0, 346, 347, 348, 349, 350, + 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, + 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, + 371, 372, 373, 374, 375, 376, 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, + 0, 0, 0, 318, 319, 320, 321, 322, 323, 324, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 327, 328, 329, 330, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 332, 333, 334, 335, 336, 337, - 338, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 339, 340, 341, 342, - 343, 344, 0, 0, 0, 0, 0, 0, 0, 0, - 345, 0, 346, 347, 348, 349, 350, 351, 352, 353, - 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, - 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, - 374, 375, 376, 377, 2, 3, 4, 5, 6, 7, + 0, 0, 0, 0, 0, 0, 327, 328, 329, 330, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 332, + 333, 334, 335, 336, 337, 338, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 339, 340, 341, 342, 343, 344, 0, 0, 0, + 0, 0, 0, 0, 0, 345, 0, 346, 347, 348, + 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, + 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, + 369, 370, 371, 372, 373, 374, 375, 376, 2, 3, + 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, + 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, + 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, + 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, + 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, + 54, 55, 56, 57, 58, 0, 0, 61, 62, 63, + 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, + 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, + 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, + 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, + 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, + 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, + 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, + 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, + 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, + 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, + 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, + 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, + 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, + 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, + 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, + 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, + 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, + 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, + 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, + 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, + 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, + 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, + 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, + 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, + 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, + 314, 0, 0, 0, 0, 0, 0, 321, 0, 0, + 0, 0, 0, 499, 500, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 501, 502, 0, 0, 0, 636, 775, 0, + 0, 0, 0, 0, 503, 504, 505, 506, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 507, 508, 509, 510, 511, + 332, 0, 0, 0, 0, 337, 338, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 512, 513, + 514, 515, 516, 517, 518, 519, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 358, 2, 3, 4, 5, 6, 7, 8, 9, 10, + 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, + 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, + 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, + 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, + 51, 52, 53, 54, 55, 56, 57, 58, 0, 0, + 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, + 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, + 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, + 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, + 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, + 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, + 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, + 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, + 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, + 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, + 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, + 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, + 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, + 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, + 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, + 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, + 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, + 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, + 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, + 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, + 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, + 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, + 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, + 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, + 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, + 311, 312, 313, 314, 0, 0, 0, 0, 0, 0, + 321, 0, 0, 0, 0, 0, 499, 500, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 501, 502, 0, 0, 0, + 636, 886, 0, 0, 0, 0, 0, 503, 504, 505, + 506, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 507, 508, + 509, 510, 511, 332, 0, 0, 0, 0, 337, 338, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 512, 513, 514, 515, 516, 517, 518, 519, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 358, 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, @@ -2537,17 +2620,17 @@ 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, 0, 0, 0, - 0, 0, 0, 321, 0, 0, 0, 0, 0, 500, - 501, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 502, 503, - 0, 0, 0, 637, 775, 0, 0, 0, 0, 0, - 504, 505, 506, 507, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 321, 0, 0, 0, 0, 0, 499, + 500, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 501, 502, + 0, 0, 575, 0, 0, 0, 0, 0, 0, 0, + 503, 504, 505, 506, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 508, 509, 510, 511, 512, 332, 0, 0, 0, + 0, 507, 508, 509, 510, 511, 332, 0, 0, 0, 0, 337, 338, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 513, 514, 515, 516, 517, 518, - 519, 520, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 512, 513, 514, 515, 516, 517, + 518, 519, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 358, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, @@ -2581,16 +2664,16 @@ static const yytype_int16 yytable[] = 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 0, 0, 0, 0, 0, 0, 321, 0, 0, 0, - 0, 0, 500, 501, 0, 0, 0, 0, 0, 0, + 0, 0, 499, 500, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 502, 503, 0, 0, 0, 637, 886, 0, 0, - 0, 0, 0, 504, 505, 506, 507, 0, 0, 0, + 0, 501, 502, 0, 0, 0, 636, 0, 0, 0, + 0, 0, 0, 503, 504, 505, 506, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 508, 509, 510, 511, 512, 332, + 0, 0, 0, 0, 507, 508, 509, 510, 511, 332, 0, 0, 0, 0, 337, 338, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 513, 514, 515, - 516, 517, 518, 519, 520, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 512, 513, 514, + 515, 516, 517, 518, 519, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 358, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, @@ -2624,16 +2707,16 @@ static const yytype_int16 yytable[] = 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 0, 0, 0, 0, 0, 0, 321, - 0, 0, 0, 0, 0, 500, 501, 0, 0, 0, + 0, 0, 0, 0, 0, 499, 500, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 502, 503, 0, 0, 576, 0, - 0, 0, 0, 0, 0, 0, 504, 505, 506, 507, + 0, 0, 0, 0, 501, 502, 0, 0, 734, 0, + 0, 0, 0, 0, 0, 0, 503, 504, 505, 506, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 508, 509, 510, - 511, 512, 332, 0, 0, 0, 0, 337, 338, 0, + 0, 0, 0, 0, 0, 0, 0, 507, 508, 509, + 510, 511, 332, 0, 0, 0, 0, 337, 338, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 513, 514, 515, 516, 517, 518, 519, 520, 0, 0, + 512, 513, 514, 515, 516, 517, 518, 519, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 358, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, @@ -2667,17 +2750,17 @@ static const yytype_int16 yytable[] = 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, 0, 0, 0, 0, - 0, 0, 321, 0, 0, 0, 0, 0, 500, 501, + 0, 0, 321, 0, 0, 0, 0, 0, 499, 500, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 502, 503, 0, - 0, 0, 637, 0, 0, 0, 0, 0, 0, 504, - 505, 506, 507, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 501, 502, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 745, 503, + 504, 505, 506, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 508, 509, 510, 511, 512, 332, 0, 0, 0, 0, + 507, 508, 509, 510, 511, 332, 0, 0, 0, 0, 337, 338, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 513, 514, 515, 516, 517, 518, 519, - 520, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 512, 513, 514, 515, 516, 517, 518, + 519, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 358, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, @@ -2711,16 +2794,16 @@ static const yytype_int16 yytable[] = 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 0, 0, 0, 0, 0, 0, 321, 0, 0, 0, 0, - 0, 500, 501, 0, 0, 0, 0, 0, 0, 0, + 0, 499, 500, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 502, 503, 0, 0, 734, 0, 0, 0, 0, 0, - 0, 0, 504, 505, 506, 507, 0, 0, 0, 0, + 501, 502, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 503, 504, 505, 506, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 508, 509, 510, 511, 512, 332, 0, + 0, 0, 0, 507, 508, 509, 510, 511, 332, 0, 0, 0, 0, 337, 338, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 513, 514, 515, 516, - 517, 518, 519, 520, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 512, 513, 514, 515, + 516, 517, 518, 519, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 358, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, @@ -2754,16 +2837,16 @@ static const yytype_int16 yytable[] = 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 0, 0, 0, 0, 0, 0, 321, 0, - 0, 0, 0, 0, 500, 501, 0, 0, 0, 0, + 0, 0, 0, 0, 499, 500, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 502, 503, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 745, 504, 505, 506, 507, 0, + 0, 0, 0, 501, 502, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 503, 504, 505, 506, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 508, 509, 510, 511, - 512, 332, 0, 0, 0, 0, 337, 338, 0, 0, + 0, 0, 0, 0, 0, 0, 507, 508, 509, 510, + 511, 332, 0, 0, 0, 0, 337, 654, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 513, - 514, 515, 516, 517, 518, 519, 520, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 512, + 513, 514, 515, 516, 517, 518, 519, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 358, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, @@ -2797,16 +2880,16 @@ 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, 0, 0, 0, 0, 0, - 0, 321, 0, 0, 0, 0, 0, 500, 501, 0, + 0, 321, 0, 0, 0, 0, 0, 499, 500, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 502, 503, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 504, 505, - 506, 507, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 508, - 509, 510, 511, 512, 332, 0, 0, 0, 0, 337, + 0, 0, 0, 0, 0, 0, 501, 502, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 503, 504, + 505, 506, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 507, + 508, 509, 510, 694, 332, 0, 0, 0, 0, 337, 338, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 513, 514, 515, 516, 517, 518, 519, 520, + 0, 0, 512, 513, 514, 515, 516, 517, 518, 519, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 358, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, @@ -2841,169 +2924,83 @@ static const yytype_int16 yytable[] = 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 0, 0, 0, 0, 0, 0, 321, 0, 0, 0, 0, 0, - 500, 501, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 502, - 503, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 504, 505, 506, 507, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 508, 509, 510, 511, 512, 332, 0, 0, - 0, 0, 337, 655, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 513, 514, 515, 516, 517, - 518, 519, 520, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 358, 2, 3, - 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, - 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, - 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, - 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, - 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, - 54, 55, 56, 57, 58, 0, 0, 61, 62, 63, - 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, - 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, - 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, - 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, - 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, - 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, - 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, - 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, - 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, - 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, - 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, - 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, - 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, - 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, - 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, - 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, - 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, - 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, - 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, - 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, - 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, - 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, - 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, - 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, - 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, - 314, 0, 0, 0, 0, 0, 0, 321, 0, 0, - 0, 0, 0, 500, 501, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 502, 503, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 504, 505, 506, 507, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 508, 509, 510, 511, 695, - 332, 0, 0, 0, 0, 337, 338, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 513, 514, - 515, 516, 517, 518, 519, 520, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 358, 2, 3, 4, 5, 6, 7, 8, 9, 10, - 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, - 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, - 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, - 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, - 51, 52, 53, 54, 55, 56, 57, 58, 0, 0, - 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, - 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, - 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, - 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, - 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, - 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, - 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, - 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, - 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, - 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, - 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, - 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, - 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, - 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, - 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, - 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, - 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, - 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, - 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, - 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, - 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, - 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, - 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, - 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, - 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, - 311, 312, 313, 314, 0, 0, 0, 0, 0, 0, - 321, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 332, 0, 0, 0, 0, 337, 338 + 0, 0, 0, 0, 0, 0, 0, 332, 0, 0, + 0, 0, 337, 338 }; static const yytype_int16 yycheck[] = { - 0, 383, 0, 402, 494, 0, 503, 482, 407, 0, - 435, 0, 623, 635, 543, 637, 441, 402, 640, 568, - 402, 737, 414, 548, 391, 407, 570, 348, 553, 336, - 559, 359, 331, 332, 385, 899, 348, 562, 348, 529, - 348, 351, 906, 349, 353, 427, 571, 351, 382, 352, - 351, 385, 916, 356, 358, 329, 330, 385, 409, 356, - 381, 382, 383, 384, 431, 372, 491, 492, 367, 368, - 382, 368, 382, 548, 382, 349, 385, 351, 553, 350, - 447, 355, 351, 351, 559, 356, 349, 562, 351, 349, - 359, 359, 474, 541, 350, 358, 571, 641, 352, 547, - 356, 549, 356, 351, 552, 602, 554, 604, 556, 557, - 358, 356, 349, 561, 359, 590, 338, 339, 340, 341, - 342, 343, 344, 345, 346, 347, 351, 327, 328, 353, - 741, 382, 356, 358, 385, 359, 358, 409, 410, 411, - 412, 413, 414, 415, 361, 635, 363, 637, 350, 541, - 640, 350, 774, 650, 356, 350, 350, 356, 356, 357, - 709, 356, 356, 350, 654, 557, 350, 350, 350, 356, - 350, 350, 356, 356, 356, 350, 356, 356, 350, 350, - 354, 356, 356, 350, 356, 356, 568, 350, 570, 356, - 350, 350, 350, 356, 350, 350, 356, 356, 356, 566, - 356, 356, 350, 350, 920, 350, 350, 350, 356, 356, - 352, 356, 356, 356, 356, 381, 382, 383, 384, 720, - 721, 722, 723, 356, 356, 382, 359, 359, 385, 440, - 779, 842, 854, 382, 633, 356, 385, 356, 359, 349, - 359, 382, 382, 359, 385, 385, 743, 349, 633, 349, - 747, 633, 382, 382, 382, 385, 385, 385, 382, 641, - 382, 385, 382, 385, 356, 385, 349, 359, 374, 375, - 376, 482, 349, 798, 799, 765, 766, 333, 334, 704, - 805, 806, 811, 349, 774, 364, 365, 366, 910, 500, - 501, 356, 357, 716, 717, 349, 718, 719, 724, 725, - 350, 356, 359, 385, 367, 385, 353, 385, 353, 385, - 351, 385, 385, 351, 350, 926, 385, 359, 358, 356, - 349, 532, 356, 798, 799, 358, 356, 709, 356, 356, - 805, 806, 356, 356, 356, 356, 811, 548, 813, 356, - 350, 356, 553, 840, 350, 359, 843, 358, 559, 351, - 385, 562, 349, 349, 385, 348, 335, 351, 371, 385, - 571, 370, 352, 337, 854, 385, 369, 352, 354, 349, - 382, 359, 359, 349, 349, 359, 349, 359, 359, 590, - 357, 359, 349, 383, 349, 348, 883, 359, 350, 358, - 356, 391, 383, 385, 350, 356, 356, 779, 350, 399, - 391, 399, 402, 900, 399, 352, 896, 407, 399, 407, - 399, 402, 407, 352, 385, 356, 407, 417, 915, 348, - 910, 354, 350, 393, 349, 359, 385, 427, 426, 353, - 350, 431, 358, 397, 353, 353, 427, 359, 354, 726, - 431, 727, 730, 728, 843, 729, 573, 447, 659, 731, - 331, 703, 818, 905, 845, 916, 447, 917, 845, 883, - 633, 843, 399, 431, 633, 633, 564, 796, 425, 427, - 794, 803, 799, 806, 474, 801, 431, 813, 809, -1, - -1, 811, -1, 474, 883, 485, -1, -1, -1, -1, - -1, -1, -1, -1, 485, -1, -1, -1, -1, -1, - -1, 883, 713, 714, 715, 716, 717, 718, 719, 720, - 721, 722, 723, 724, 725, 726, 727, 728, 729, 730, - 731, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 537, + 0, 401, 0, 481, 401, 382, 406, 0, 493, 0, + 634, 502, 636, 622, 0, 639, 542, 547, 737, 567, + 434, 439, 552, 569, 401, 348, 440, 359, 390, 406, + 413, 561, 558, 348, 331, 332, 336, 899, 385, 348, + 570, 348, 351, 528, 906, 356, 349, 353, 351, 426, + 374, 375, 376, 385, 916, 358, 351, 368, 381, 382, + 383, 384, 409, 481, 359, 329, 330, 382, 430, 547, + 367, 368, 372, 382, 552, 382, 490, 491, 351, 385, + 558, 499, 500, 561, 446, 349, 359, 351, 351, 349, + 356, 355, 570, 359, 640, 358, 473, 338, 339, 340, + 341, 342, 343, 344, 345, 346, 347, 361, 540, 363, + 601, 589, 603, 531, 546, 351, 548, 358, 351, 551, + 350, 553, 358, 555, 556, 358, 356, 353, 560, 547, + 356, 350, 741, 359, 552, 350, 350, 356, 350, 350, + 558, 356, 356, 561, 356, 356, 354, 350, 356, 634, + 774, 636, 570, 356, 639, 351, 350, 540, 649, 350, + 350, 709, 356, 350, 350, 356, 356, 349, 653, 356, + 356, 589, 349, 556, 408, 409, 410, 411, 412, 413, + 414, 350, 350, 350, 359, 350, 349, 356, 356, 356, + 567, 356, 569, 350, 350, 356, 350, 350, 350, 356, + 356, 920, 356, 565, 356, 350, 350, 350, 350, 350, + 350, 356, 356, 356, 356, 356, 356, 350, 352, 349, + 352, 352, 356, 356, 356, 356, 381, 382, 383, 384, + 854, 779, 632, 842, 349, 632, 720, 721, 722, 723, + 658, 327, 328, 382, 382, 382, 385, 385, 385, 349, + 356, 367, 743, 359, 382, 632, 747, 385, 382, 382, + 349, 385, 385, 640, 382, 333, 334, 385, 798, 799, + 382, 382, 349, 385, 385, 805, 806, 356, 357, 382, + 765, 766, 385, 349, 382, 811, 910, 385, 382, 774, + 704, 385, 364, 365, 366, 713, 714, 715, 716, 717, + 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, + 728, 729, 730, 731, 385, 356, 356, 926, 359, 359, + 798, 799, 356, 356, 359, 359, 359, 805, 806, 356, + 357, 385, 709, 811, 385, 813, 716, 717, 353, 718, + 719, 385, 724, 725, 353, 351, 385, 385, 351, 840, + 358, 350, 843, 385, 359, 356, 358, 385, 371, 356, + 356, 356, 356, 350, 356, 385, 356, 356, 356, 854, + 349, 356, 356, 350, 349, 351, 359, 358, 349, 351, + 798, 799, 382, 348, 352, 335, 337, 805, 806, 369, + 390, 382, 883, 811, 352, 813, 370, 354, 398, 390, + 398, 401, 779, 385, 349, 398, 406, 398, 406, 900, + 401, 896, 398, 406, 349, 406, 416, 359, 385, 359, + 349, 359, 349, 357, 915, 910, 426, 425, 359, 359, + 430, 359, 349, 359, 349, 426, 385, 385, 350, 430, + 358, 348, 356, 843, 350, 356, 446, 356, 350, 352, + 393, 352, 356, 348, 354, 446, 350, 382, 349, 358, + 353, 385, 359, 350, 397, 353, 843, 353, 726, 359, + 354, 727, 729, 473, 430, 728, 731, 430, 730, 426, + 572, 331, 473, 883, 484, 703, 845, 818, 905, 916, + 845, 917, 424, 484, 883, 796, 632, 632, 563, 803, + 398, 794, 801, 632, 806, 799, 883, -1, 813, -1, + -1, 809, -1, -1, -1, 811, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 536, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 558, -1, + -1, -1, -1, -1, -1, 565, -1, 567, -1, 569, + -1, -1, -1, -1, 565, -1, 567, -1, 569, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 566, -1, 568, -1, - 570, -1, -1, -1, -1, 566, -1, 568, -1, 570, - -1, -1, -1, -1, -1, -1, -1, 798, 799, -1, - -1, -1, -1, -1, 805, 806, -1, -1, -1, -1, - 811, -1, 813, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 623, -1, -1, -1, -1, -1, -1, - -1, -1, 623, 633, -1, -1, -1, -1, -1, -1, - -1, 641, 633, -1, -1, -1, -1, -1, -1, -1, - 641, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 622, -1, -1, -1, -1, -1, -1, -1, + -1, 622, 632, -1, -1, -1, -1, -1, -1, -1, + 640, 632, -1, -1, -1, -1, -1, -1, -1, 640, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, @@ -3019,7 +3016,7 @@ static const yytype_int16 yycheck[] = -1, -1, -1, -1, -1, -1, -1, -1, 779, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 811, -1, 813, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 842, 843, -1, 845, -1, 845, -1, -1, @@ -3076,143 +3073,7 @@ static const yytype_int16 yycheck[] = -1, -1, -1, -1, -1, 422, -1, 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, 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, -1, -1, 329, 330, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 348, 349, -1, 351, -1, 353, - 354, -1, -1, -1, -1, 359, 360, 361, 362, 363, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 373, - 374, 375, 376, 377, -1, -1, -1, 381, 382, 383, - 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, - 394, 395, 396, -1, 398, 399, 400, 401, 402, 403, - 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, - 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, - 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, - 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, - 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, - 454, 455, 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, -1, -1, 329, 330, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 348, 349, -1, - 351, -1, 353, 354, -1, -1, -1, -1, 359, 360, - 361, 362, 363, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 373, 374, 375, 376, 377, -1, -1, -1, - 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, - 391, 392, 393, 394, 395, 396, -1, 398, 399, 400, - 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, - 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, - 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, - 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, - 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, - 451, 452, 453, 454, 455, 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, -1, - -1, 329, 330, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 348, 349, -1, 351, -1, 353, -1, -1, -1, -1, - -1, 359, 360, 361, 362, 363, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 373, 374, 375, 376, 377, - -1, -1, -1, 381, 382, 383, 384, 385, 386, 387, - 388, 389, 390, 391, 392, 393, 394, 395, 396, -1, - 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, - 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, - 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, - 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, - 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, - 448, 449, 450, 451, 452, 453, 454, 455, 3, 4, + 447, 448, 449, 450, 451, 452, 453, 454, 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, @@ -3247,7 +3108,7 @@ static const yytype_int16 yycheck[] = 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, -1, -1, 329, 330, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 348, 349, -1, 351, -1, 353, -1, + -1, -1, -1, 348, 349, -1, 351, -1, 353, 354, -1, -1, -1, -1, 359, 360, 361, 362, 363, -1, -1, -1, -1, -1, -1, -1, -1, -1, 373, 374, 375, 376, 377, -1, -1, -1, 381, 382, 383, 384, @@ -3258,52 +3119,97 @@ static const yytype_int16 yycheck[] = 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, 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, -1, -1, 329, 330, -1, + 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, -1, -1, 329, 330, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 348, 349, -1, 351, - -1, -1, -1, -1, -1, -1, -1, 359, 360, 361, - 362, 363, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 373, 374, 375, 376, 377, -1, -1, -1, 381, - 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, - 392, 393, 394, 395, 396, -1, 398, 399, 400, 401, - 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, - 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, - 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, - 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, - 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, - 452, 453, 454, 455, 3, 4, 5, 6, 7, 8, + -1, -1, -1, -1, -1, 348, 349, -1, 351, -1, + 353, 354, -1, -1, -1, -1, 359, 360, 361, 362, + 363, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 373, 374, 375, 376, 377, -1, -1, -1, 381, 382, + 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, + 393, 394, 395, 396, -1, 398, 399, 400, 401, 402, + 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, + 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, + 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, + 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, + 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, + 453, 454, 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, -1, -1, 329, 330, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 348, 349, -1, + 351, -1, 353, -1, -1, -1, -1, -1, 359, 360, + 361, 362, 363, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 373, 374, 375, 376, 377, -1, -1, -1, + 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, + 391, 392, 393, 394, 395, 396, -1, 398, 399, 400, + 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, + 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, + 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, + 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, + 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, + 451, 452, 453, 454, 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, @@ -3338,62 +3244,107 @@ static const yytype_int16 yycheck[] = 319, 320, 321, 322, 323, 324, 325, 326, -1, -1, 329, 330, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 348, - 349, -1, 351, -1, -1, -1, -1, -1, -1, -1, + 349, -1, 351, -1, 353, -1, -1, -1, -1, -1, 359, 360, 361, 362, 363, -1, -1, -1, -1, -1, -1, -1, -1, -1, 373, 374, 375, 376, 377, -1, -1, -1, 381, 382, 383, 384, 385, 386, 387, 388, - 389, 390, 391, 392, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 408, + 389, 390, 391, 392, 393, 394, 395, 396, -1, 398, + 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, - 419, 420, 421, 422, -1, 424, 425, 426, 427, 428, + 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, 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, -1, -1, -1, 320, 321, 322, 323, 324, 325, - 326, -1, -1, 329, 330, -1, -1, -1, -1, -1, + 449, 450, 451, 452, 453, 454, 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, + -1, -1, 329, 330, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 348, 349, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 360, 361, 362, 363, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 373, 374, 375, - 376, -1, -1, -1, -1, 381, 382, 383, 384, 385, - 386, 387, 388, 389, 390, 391, 392, -1, -1, -1, + -1, 348, 349, -1, 351, -1, -1, -1, -1, -1, + -1, -1, 359, 360, 361, 362, 363, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 373, 374, 375, 376, + 377, -1, -1, -1, 381, 382, 383, 384, 385, 386, + 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, + -1, 398, 399, 400, 401, 402, 403, 404, 405, 406, + 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, + 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, + 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, + 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, + 447, 448, 449, 450, 451, 452, 453, 454, 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, -1, -1, 329, 330, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 408, 409, 410, 411, 412, 413, 414, 415, - 416, 417, 418, 419, 420, 421, 422, -1, 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, + -1, -1, -1, 348, 349, -1, 351, -1, -1, -1, + -1, -1, -1, -1, 359, 360, 361, 362, 363, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 373, 374, + 375, 376, 377, -1, -1, -1, 381, 382, 383, 384, + 385, 386, 387, 388, 389, 390, 391, 392, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 408, 409, 410, 411, 412, 413, 414, + 415, 416, 417, 418, 419, 420, 421, 422, -1, 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, 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, @@ -3425,66 +3376,111 @@ static const yytype_int16 yycheck[] = 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, -1, -1, -1, -1, -1, -1, + 313, 314, 315, 316, -1, -1, -1, 320, 321, 322, + 323, 324, 325, 326, -1, -1, 329, 330, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 351, -1, - -1, -1, -1, -1, -1, -1, 359, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 373, 374, 375, 376, 377, -1, -1, -1, -1, -1, - -1, -1, -1, 386, 387, 388, 389, 390, 391, 392, + -1, -1, -1, -1, -1, 348, 349, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 360, 361, 362, + 363, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 373, 374, 375, 376, -1, -1, -1, -1, 381, 382, + 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 408, 409, 410, 411, 412, - 413, -1, -1, -1, -1, -1, -1, -1, -1, 422, + 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, -1, 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, 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, -1, -1, -1, - 320, 321, 322, 323, 324, 325, 326, -1, -1, -1, + 453, 454, 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, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 351, -1, -1, -1, -1, -1, -1, -1, 359, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 373, 374, 375, 376, 377, -1, -1, -1, + -1, -1, -1, -1, -1, 386, 387, 388, 389, 390, + 391, 392, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 408, 409, 410, + 411, 412, 413, -1, -1, -1, -1, -1, -1, -1, + -1, 422, -1, 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, 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, -1, -1, + -1, 320, 321, 322, 323, 324, 325, 326, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 373, 374, 375, 376, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 386, 387, 388, 389, - 390, 391, 392, 393, -1, -1, 396, -1, 398, 399, - -1, -1, 402, -1, -1, -1, -1, -1, 408, 409, - 410, 411, 412, 413, -1, -1, -1, -1, -1, -1, - -1, -1, 422, -1, 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, 3, 4, 5, 6, + -1, -1, -1, -1, 373, 374, 375, 376, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 386, 387, 388, + 389, 390, 391, 392, 393, -1, -1, 396, -1, 398, + 399, -1, -1, 402, -1, -1, -1, -1, -1, 408, + 409, 410, 411, 412, 413, -1, -1, -1, -1, -1, + -1, -1, -1, 422, -1, 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, 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, @@ -3529,53 +3525,98 @@ static const yytype_int16 yycheck[] = -1, -1, -1, -1, -1, 422, -1, 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, 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, -1, -1, -1, 320, 321, 322, 323, - 324, 325, 326, -1, -1, -1, -1, -1, -1, -1, + 447, 448, 449, 450, 451, 452, 453, 454, 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, -1, -1, -1, 320, 321, 322, 323, 324, + 325, 326, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 351, -1, -1, + -1, -1, -1, -1, -1, -1, 351, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 373, - 374, 375, 376, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 386, 387, 388, 389, 390, 391, 392, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 373, 374, + 375, 376, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 386, 387, 388, 389, 390, 391, 392, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 408, 409, 410, 411, 412, 413, - -1, -1, -1, -1, -1, -1, -1, -1, 422, -1, - 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, 3, 4, 5, 6, 7, 8, 9, 10, + -1, -1, -1, 408, 409, 410, 411, 412, 413, -1, + -1, -1, -1, -1, -1, -1, -1, 422, -1, 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, + 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, -1, -1, -1, 320, 321, 322, + 323, 324, 325, 326, -1, -1, -1, -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, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 373, 374, 375, 376, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 386, 387, 388, 389, 390, 391, 392, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 408, 409, 410, 411, 412, + 413, -1, -1, -1, -1, -1, -1, -1, -1, 422, + -1, 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, 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, @@ -3620,143 +3661,184 @@ static const yytype_int16 yycheck[] = -1, 422, -1, 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, 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, -1, - -1, -1, 320, 321, 322, 323, 324, 325, 326, -1, + 451, 452, 453, 454, 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, -1, -1, + -1, 320, 321, 322, 323, 324, 325, 326, -1, -1, -1, -1, -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, -1, -1, -1, + -1, -1, -1, -1, -1, 354, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 373, 374, 375, 376, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 386, 387, - 388, 389, 390, 391, 392, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 408, 409, 410, 411, 412, 413, -1, -1, -1, -1, - -1, -1, -1, -1, 422, -1, 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, 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, -1, -1, -1, 320, 321, 322, 323, 324, - 325, 326, -1, -1, -1, -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, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 373, 374, - 375, 376, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 386, 387, 388, 389, 390, 391, 392, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 408, 409, 410, 411, 412, 413, -1, - -1, -1, -1, -1, -1, -1, -1, 422, -1, 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, 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, -1, -1, -1, 320, 321, - 322, 323, 324, 325, 326, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 373, 374, 375, 376, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 386, 387, 388, + 389, 390, 391, 392, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 408, + 409, 410, 411, 412, 413, -1, -1, -1, -1, -1, + -1, -1, -1, 422, -1, 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, 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, + -1, -1, -1, 320, 321, 322, 323, 324, 325, 326, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 373, 374, 375, 376, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 386, 387, 388, 389, 390, 391, - 392, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 408, 409, 410, 411, - 412, 413, -1, -1, -1, -1, -1, -1, -1, -1, - 422, -1, 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, 4, 5, 6, 7, 8, 9, + -1, -1, -1, -1, -1, -1, 373, 374, 375, 376, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 386, + 387, 388, 389, 390, 391, 392, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 408, 409, 410, 411, 412, 413, -1, -1, -1, + -1, -1, -1, -1, -1, 422, -1, 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, 4, 5, + 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, + 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, + 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, + 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, + 56, 57, 58, 59, 60, -1, -1, 63, 64, 65, + 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, + 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, + 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, + 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, + 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, + 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, + 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, + 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, + 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, + 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, + 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, + 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, + 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, + 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, + 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, + 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, + 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, + 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, + 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, + 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, + 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, + 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, + 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, + 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, + 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, + 316, -1, -1, -1, -1, -1, -1, 323, -1, -1, + -1, -1, -1, 329, 330, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 348, 349, -1, -1, -1, 353, 354, -1, + -1, -1, -1, -1, 360, 361, 362, 363, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 381, 382, 383, 384, 385, + 386, -1, -1, -1, -1, 391, 392, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 414, 415, + 416, 417, 418, 419, 420, 421, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 436, 4, 5, 6, 7, 8, 9, 10, 11, 12, + 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, + 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, + 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, + 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, + 53, 54, 55, 56, 57, 58, 59, 60, -1, -1, + 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, + 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, + 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, + 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, + 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, + 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, + 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, + 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, + 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, + 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, + 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, + 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, + 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, + 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, + 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, + 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, + 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, + 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, + 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, + 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, + 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, + 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, + 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, + 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, + 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, + 313, 314, 315, 316, -1, -1, -1, -1, -1, -1, + 323, -1, -1, -1, -1, -1, 329, 330, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 348, 349, -1, -1, -1, + 353, 354, -1, -1, -1, -1, -1, 360, 361, 362, + 363, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 381, 382, + 383, 384, 385, 386, -1, -1, -1, -1, 391, 392, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 414, 415, 416, 417, 418, 419, 420, 421, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 436, 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, @@ -3791,7 +3873,7 @@ static const yytype_int16 yycheck[] = -1, -1, -1, 323, -1, -1, -1, -1, -1, 329, 330, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 348, 349, - -1, -1, -1, 353, 354, -1, -1, -1, -1, -1, + -1, -1, 352, -1, -1, -1, -1, -1, -1, -1, 360, 361, 362, 363, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 381, 382, 383, 384, 385, 386, -1, -1, -1, @@ -3834,7 +3916,7 @@ static const yytype_int16 yycheck[] = -1, -1, -1, -1, -1, -1, 323, -1, -1, -1, -1, -1, 329, 330, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 348, 349, -1, -1, -1, 353, 354, -1, -1, + -1, 348, 349, -1, -1, -1, 353, -1, -1, -1, -1, -1, -1, 360, 361, 362, 363, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 381, 382, 383, 384, 385, 386, @@ -3921,7 +4003,7 @@ static const yytype_int16 yycheck[] = -1, -1, 323, -1, -1, -1, -1, -1, 329, 330, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 348, 349, -1, - -1, -1, 353, -1, -1, -1, -1, -1, -1, 360, + -1, -1, -1, -1, -1, -1, -1, -1, 359, 360, 361, 362, 363, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 381, 382, 383, 384, 385, 386, -1, -1, -1, -1, @@ -3964,7 +4046,7 @@ static const yytype_int16 yycheck[] = -1, -1, -1, -1, -1, 323, -1, -1, -1, -1, -1, 329, 330, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 348, 349, -1, -1, 352, -1, -1, -1, -1, -1, + 348, 349, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 360, 361, 362, 363, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 381, 382, 383, 384, 385, 386, -1, @@ -4008,7 +4090,7 @@ static const yytype_int16 yycheck[] = -1, -1, -1, -1, 329, 330, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 348, 349, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 359, 360, 361, 362, 363, -1, + -1, -1, -1, -1, -1, 360, 361, 362, 363, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 381, 382, 383, 384, 385, 386, -1, -1, -1, -1, 391, 392, -1, -1, @@ -4092,99 +4174,13 @@ static const yytype_int16 yycheck[] = 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, -1, -1, -1, -1, -1, -1, 323, -1, -1, -1, -1, -1, - 329, 330, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 348, - 349, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 360, 361, 362, 363, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 381, 382, 383, 384, 385, 386, -1, -1, - -1, -1, 391, 392, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 414, 415, 416, 417, 418, - 419, 420, 421, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 436, 4, 5, - 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, - 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, - 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, - 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, - 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, - 56, 57, 58, 59, 60, -1, -1, 63, 64, 65, - 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, - 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, - 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, - 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, - 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, - 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, - 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, - 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, - 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, - 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, - 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, - 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, - 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, - 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, - 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, - 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, - 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, - 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, - 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, - 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, - 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, - 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, - 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, - 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, - 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, - 316, -1, -1, -1, -1, -1, -1, 323, -1, -1, - -1, -1, -1, 329, 330, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 348, 349, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 360, 361, 362, 363, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 381, 382, 383, 384, 385, - 386, -1, -1, -1, -1, 391, 392, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 414, 415, - 416, 417, 418, 419, 420, 421, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 436, 4, 5, 6, 7, 8, 9, 10, 11, 12, - 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, - 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, - 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, - 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, - 53, 54, 55, 56, 57, 58, 59, 60, -1, -1, - 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, - 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, - 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, - 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, - 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, - 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, - 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, - 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, - 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, - 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, - 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, - 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, - 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, - 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, - 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, - 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, - 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, - 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, - 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, - 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, - 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, - 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, - 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, - 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, - 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, - 313, 314, 315, 316, -1, -1, -1, -1, -1, -1, - 323, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 386, -1, -1, -1, -1, 391, 392 + -1, -1, -1, -1, -1, -1, -1, 386, -1, -1, + -1, -1, 391, 392 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing @@ -4228,136 +4224,136 @@ static const yytype_int16 yystos[] = 409, 410, 411, 412, 413, 422, 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, 487, 488, - 491, 492, 493, 494, 498, 499, 500, 501, 502, 503, - 506, 507, 508, 509, 510, 512, 517, 518, 519, 560, - 561, 562, 564, 571, 575, 576, 581, 584, 349, 349, - 349, 349, 349, 349, 349, 349, 351, 518, 353, 385, - 349, 349, 359, 385, 359, 563, 350, 356, 495, 496, - 497, 507, 512, 356, 359, 385, 359, 385, 508, 512, - 367, 514, 515, 0, 561, 492, 500, 507, 359, 491, - 385, 567, 568, 585, 586, 382, 385, 567, 382, 567, - 382, 567, 382, 567, 382, 567, 567, 585, 382, 567, - 385, 565, 566, 512, 521, 353, 385, 409, 504, 505, - 385, 511, 351, 359, 513, 353, 539, 564, 496, 495, - 497, 385, 385, 349, 358, 513, 353, 356, 359, 490, - 329, 330, 348, 349, 360, 361, 362, 363, 381, 382, - 383, 384, 385, 414, 415, 416, 417, 418, 419, 420, - 421, 457, 458, 459, 461, 462, 463, 464, 465, 466, - 467, 468, 469, 510, 512, 516, 513, 350, 385, 359, - 358, 356, 350, 356, 350, 356, 358, 356, 356, 356, - 350, 356, 356, 356, 356, 356, 356, 356, 350, 356, - 350, 356, 349, 352, 356, 359, 507, 512, 522, 523, - 520, 358, 350, 356, 350, 356, 352, 468, 470, 471, - 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, - 351, 359, 353, 354, 359, 393, 394, 395, 396, 398, - 399, 400, 401, 402, 403, 404, 405, 406, 407, 423, - 468, 481, 483, 485, 487, 491, 510, 512, 528, 529, - 530, 531, 532, 540, 541, 542, 543, 546, 547, 550, - 551, 552, 559, 564, 513, 358, 513, 353, 483, 526, - 358, 489, 385, 356, 359, 468, 468, 485, 329, 330, - 351, 355, 350, 350, 356, 392, 483, 349, 468, 356, - 368, 564, 348, 351, 382, 568, 585, 385, 586, 348, - 381, 382, 383, 384, 572, 573, 382, 481, 486, 574, - 382, 381, 382, 383, 384, 577, 578, 382, 486, 579, - 382, 348, 580, 382, 585, 385, 486, 582, 583, 382, - 486, 352, 566, 512, 385, 524, 525, 354, 523, 522, - 486, 505, 385, 364, 365, 366, 361, 363, 327, 328, + 448, 449, 450, 451, 452, 453, 454, 486, 487, 490, + 491, 492, 493, 497, 498, 499, 500, 501, 502, 505, + 506, 507, 508, 509, 511, 516, 517, 518, 559, 560, + 561, 563, 570, 574, 575, 580, 583, 349, 349, 349, + 349, 349, 349, 349, 349, 351, 517, 353, 385, 349, + 349, 359, 385, 359, 562, 350, 356, 494, 495, 496, + 506, 511, 356, 359, 385, 359, 385, 507, 511, 367, + 513, 514, 0, 560, 491, 499, 506, 359, 490, 385, + 566, 567, 584, 585, 382, 385, 566, 382, 566, 382, + 566, 382, 566, 382, 566, 566, 584, 382, 566, 385, + 564, 565, 511, 520, 353, 385, 409, 503, 504, 385, + 510, 351, 359, 512, 353, 538, 563, 495, 494, 496, + 385, 385, 349, 358, 512, 353, 356, 359, 489, 329, + 330, 348, 349, 360, 361, 362, 363, 381, 382, 383, + 384, 385, 414, 415, 416, 417, 418, 419, 420, 421, + 456, 457, 458, 460, 461, 462, 463, 464, 465, 466, + 467, 468, 509, 511, 515, 512, 350, 385, 359, 358, + 356, 350, 356, 350, 356, 358, 356, 356, 356, 350, + 356, 356, 356, 356, 356, 356, 356, 350, 356, 350, + 356, 349, 352, 356, 359, 506, 511, 521, 522, 519, + 358, 350, 356, 350, 356, 352, 467, 469, 470, 471, + 472, 473, 474, 475, 476, 477, 478, 479, 480, 351, + 359, 353, 354, 359, 393, 394, 395, 396, 398, 399, + 400, 401, 402, 403, 404, 405, 406, 407, 423, 467, + 480, 482, 484, 486, 490, 509, 511, 527, 528, 529, + 530, 531, 539, 540, 541, 542, 545, 546, 549, 550, + 551, 558, 563, 512, 358, 512, 353, 482, 525, 358, + 488, 385, 356, 359, 467, 467, 484, 329, 330, 351, + 355, 350, 350, 356, 392, 482, 349, 467, 356, 368, + 563, 348, 351, 382, 567, 584, 385, 585, 348, 381, + 382, 383, 384, 571, 572, 382, 480, 485, 573, 382, + 381, 382, 383, 384, 576, 577, 382, 485, 578, 382, + 348, 579, 382, 584, 385, 485, 511, 581, 582, 382, + 485, 352, 565, 511, 385, 523, 524, 354, 522, 521, + 485, 504, 385, 364, 365, 366, 361, 363, 327, 328, 331, 332, 367, 368, 333, 334, 371, 370, 369, 335, - 337, 336, 372, 352, 352, 481, 354, 533, 349, 359, - 359, 554, 349, 349, 359, 359, 485, 349, 485, 357, + 337, 336, 372, 352, 352, 480, 354, 532, 349, 359, + 359, 553, 349, 349, 359, 359, 484, 349, 484, 357, 359, 359, 359, 359, 338, 339, 340, 341, 342, 343, - 344, 345, 346, 347, 358, 484, 356, 359, 354, 529, - 543, 547, 552, 526, 358, 354, 526, 527, 526, 522, - 385, 350, 460, 485, 385, 483, 468, 348, 382, 569, - 570, 350, 358, 350, 356, 350, 356, 350, 356, 356, + 344, 345, 346, 347, 358, 483, 356, 359, 354, 528, + 542, 546, 551, 525, 358, 354, 525, 526, 525, 521, + 385, 350, 459, 484, 385, 482, 467, 348, 382, 568, + 569, 350, 358, 350, 356, 350, 356, 350, 356, 356, 350, 356, 350, 356, 350, 356, 356, 350, 356, 356, - 350, 356, 350, 356, 350, 350, 524, 513, 356, 359, - 354, 468, 468, 468, 470, 470, 471, 471, 472, 472, - 472, 472, 473, 473, 474, 475, 476, 477, 478, 479, - 482, 352, 540, 553, 529, 555, 485, 359, 485, 357, - 483, 483, 526, 354, 356, 354, 352, 352, 356, 352, - 356, 573, 572, 486, 574, 578, 577, 486, 579, 348, - 580, 582, 583, 359, 525, 485, 534, 485, 500, 545, - 393, 528, 541, 556, 350, 350, 354, 526, 348, 382, + 350, 356, 350, 356, 350, 350, 523, 512, 356, 359, + 354, 467, 467, 467, 469, 469, 470, 470, 471, 471, + 471, 471, 472, 472, 473, 474, 475, 476, 477, 478, + 481, 352, 539, 552, 528, 554, 484, 359, 484, 357, + 482, 482, 525, 354, 356, 354, 352, 352, 356, 352, + 356, 572, 571, 485, 573, 577, 576, 485, 578, 348, + 579, 581, 582, 359, 524, 484, 533, 484, 499, 544, + 393, 527, 540, 555, 350, 350, 354, 525, 348, 382, 350, 350, 350, 350, 350, 350, 357, 354, 385, 350, - 349, 545, 557, 558, 536, 537, 538, 544, 548, 483, - 358, 530, 535, 539, 485, 359, 350, 397, 532, 530, - 353, 526, 350, 485, 535, 536, 540, 549, 359, 354 + 349, 544, 556, 557, 535, 536, 537, 543, 547, 482, + 358, 529, 534, 538, 484, 359, 350, 397, 531, 529, + 353, 525, 350, 484, 534, 535, 539, 548, 359, 354 }; /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ static const yytype_int16 yyr1[] = { - 0, 456, 457, 458, 458, 458, 458, 458, 458, 458, - 458, 458, 458, 458, 458, 458, 458, 458, 459, 459, - 459, 459, 459, 459, 460, 461, 462, 463, 463, 464, - 464, 465, 465, 466, 467, 467, 467, 468, 468, 468, - 468, 469, 469, 469, 469, 470, 470, 470, 470, 471, - 471, 471, 472, 472, 472, 473, 473, 473, 473, 473, - 474, 474, 474, 475, 475, 476, 476, 477, 477, 478, - 478, 479, 479, 480, 480, 481, 482, 481, 483, 483, - 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, - 484, 485, 485, 486, 487, 487, 487, 487, 487, 487, - 487, 487, 487, 487, 487, 489, 488, 490, 490, 491, - 491, 491, 491, 492, 492, 493, 493, 494, 495, 495, - 496, 496, 496, 496, 497, 498, 498, 498, 498, 498, - 499, 499, 499, 499, 499, 500, 500, 501, 502, 502, - 502, 502, 502, 502, 502, 502, 502, 503, 504, 504, - 505, 505, 505, 506, 507, 507, 508, 508, 508, 508, - 508, 508, 508, 508, 508, 508, 508, 509, 509, 509, - 509, 509, 509, 509, 509, 509, 509, 509, 509, 509, - 509, 509, 509, 509, 509, 509, 509, 509, 509, 509, - 509, 509, 509, 509, 509, 509, 509, 509, 509, 509, - 509, 509, 510, 511, 511, 512, 512, 513, 513, 513, - 513, 514, 514, 515, 516, 516, 517, 517, 517, 517, - 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, - 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, - 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, - 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, - 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, - 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, - 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, - 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, - 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, - 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, - 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, - 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, - 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, - 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, - 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, - 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, - 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, - 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, - 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, - 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, - 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, - 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, - 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, - 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, - 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, - 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, - 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, - 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, - 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, - 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, - 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, - 517, 518, 518, 518, 520, 519, 521, 519, 522, 522, - 523, 523, 524, 524, 525, 525, 526, 526, 526, 526, - 527, 527, 528, 529, 529, 530, 530, 530, 530, 530, - 530, 530, 530, 531, 532, 533, 534, 532, 535, 535, - 537, 536, 538, 536, 539, 539, 540, 540, 541, 541, - 542, 542, 543, 544, 544, 545, 545, 546, 546, 548, - 547, 549, 549, 550, 550, 551, 551, 553, 552, 554, - 552, 555, 552, 556, 556, 557, 557, 558, 558, 559, - 559, 559, 559, 559, 559, 559, 559, 560, 560, 561, - 561, 561, 563, 562, 564, 565, 565, 566, 566, 567, - 567, 568, 568, 569, 569, 570, 570, 571, 571, 571, - 571, 571, 571, 572, 572, 573, 573, 573, 573, 573, - 574, 574, 575, 575, 576, 576, 576, 576, 576, 576, - 576, 576, 577, 577, 578, 578, 578, 578, 579, 579, - 580, 580, 581, 581, 581, 581, 582, 582, 583, 584, - 584, 585, 585, 586, 586 + 0, 455, 456, 457, 457, 457, 457, 457, 457, 457, + 457, 457, 457, 457, 457, 457, 457, 457, 458, 458, + 458, 458, 458, 458, 459, 460, 461, 462, 462, 463, + 463, 464, 464, 465, 466, 466, 466, 467, 467, 467, + 467, 468, 468, 468, 468, 469, 469, 469, 469, 470, + 470, 470, 471, 471, 471, 472, 472, 472, 472, 472, + 473, 473, 473, 474, 474, 475, 475, 476, 476, 477, + 477, 478, 478, 479, 479, 480, 481, 480, 482, 482, + 483, 483, 483, 483, 483, 483, 483, 483, 483, 483, + 483, 484, 484, 485, 486, 486, 486, 486, 486, 486, + 486, 486, 486, 486, 486, 488, 487, 489, 489, 490, + 490, 490, 490, 491, 491, 492, 492, 493, 494, 494, + 495, 495, 495, 495, 496, 497, 497, 497, 497, 497, + 498, 498, 498, 498, 498, 499, 499, 500, 501, 501, + 501, 501, 501, 501, 501, 501, 502, 503, 503, 504, + 504, 504, 505, 506, 506, 507, 507, 507, 507, 507, + 507, 507, 507, 507, 507, 507, 508, 508, 508, 508, + 508, 508, 508, 508, 508, 508, 508, 508, 508, 508, + 508, 508, 508, 508, 508, 508, 508, 508, 508, 508, + 508, 508, 508, 508, 508, 508, 508, 508, 508, 508, + 508, 509, 510, 510, 511, 511, 512, 512, 512, 512, + 513, 513, 514, 515, 515, 516, 516, 516, 516, 516, + 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, + 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, + 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, + 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, + 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, + 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, + 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, + 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, + 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, + 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, + 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, + 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, + 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, + 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, + 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, + 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, + 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, + 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, + 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, + 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, + 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, + 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, + 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, + 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, + 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, + 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, + 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, + 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, + 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, + 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, + 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, + 517, 517, 517, 519, 518, 520, 518, 521, 521, 522, + 522, 523, 523, 524, 524, 525, 525, 525, 525, 526, + 526, 527, 528, 528, 529, 529, 529, 529, 529, 529, + 529, 529, 530, 531, 532, 533, 531, 534, 534, 536, + 535, 537, 535, 538, 538, 539, 539, 540, 540, 541, + 541, 542, 543, 543, 544, 544, 545, 545, 547, 546, + 548, 548, 549, 549, 550, 550, 552, 551, 553, 551, + 554, 551, 555, 555, 556, 556, 557, 557, 558, 558, + 558, 558, 558, 558, 558, 558, 559, 559, 560, 560, + 560, 562, 561, 563, 564, 564, 565, 565, 566, 566, + 567, 567, 568, 568, 569, 569, 570, 570, 570, 570, + 570, 570, 571, 571, 572, 572, 572, 572, 572, 573, + 573, 574, 574, 575, 575, 575, 575, 575, 575, 575, + 575, 576, 576, 577, 577, 577, 577, 578, 578, 579, + 579, 580, 580, 580, 580, 581, 581, 582, 582, 583, + 583, 584, 584, 585, 585 }; /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ @@ -4377,14 +4373,14 @@ static const yytype_int8 yyr2[] = 3, 3, 4, 1, 1, 2, 3, 3, 2, 3, 2, 1, 2, 1, 1, 1, 3, 4, 6, 5, 1, 2, 3, 5, 4, 1, 2, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 4, 1, 3, - 1, 3, 1, 1, 1, 2, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 4, 1, 3, 1, + 3, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 4, 1, 1, 3, 2, 3, 2, 3, 3, - 4, 1, 0, 3, 1, 3, 1, 1, 1, 1, + 4, 1, 1, 3, 2, 3, 2, 3, 3, 4, + 1, 0, 3, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -4416,21 +4412,21 @@ 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, 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, 3, 6, 8, 4, 6, 1, 3, 1, 4, + 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, + 3, 6, 8, 4, 6, 1, 3, 1, 1, 4, 6, 1, 3, 3, 3 }; @@ -5181,7 +5177,7 @@ yyreduce: { (yyval.interm.intermTypedNode) = parseContext.handleVariable((yyvsp[0].lex).loc, (yyvsp[0].lex).symbol, (yyvsp[0].lex).string); } -#line 5185 "MachineIndependent/glslang_tab.cpp" +#line 5181 "MachineIndependent/glslang_tab.cpp" break; case 3: /* primary_expression: variable_identifier */ @@ -5189,7 +5185,7 @@ yyreduce: { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 5193 "MachineIndependent/glslang_tab.cpp" +#line 5189 "MachineIndependent/glslang_tab.cpp" break; case 4: /* primary_expression: LEFT_PAREN expression RIGHT_PAREN */ @@ -5199,7 +5195,7 @@ yyreduce: if ((yyval.interm.intermTypedNode)->getAsConstantUnion()) (yyval.interm.intermTypedNode)->getAsConstantUnion()->setExpression(); } -#line 5203 "MachineIndependent/glslang_tab.cpp" +#line 5199 "MachineIndependent/glslang_tab.cpp" break; case 5: /* primary_expression: FLOATCONSTANT */ @@ -5207,7 +5203,7 @@ yyreduce: { (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).d, EbtFloat, (yyvsp[0].lex).loc, true); } -#line 5211 "MachineIndependent/glslang_tab.cpp" +#line 5207 "MachineIndependent/glslang_tab.cpp" break; case 6: /* primary_expression: INTCONSTANT */ @@ -5215,7 +5211,7 @@ yyreduce: { (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).i, (yyvsp[0].lex).loc, true); } -#line 5219 "MachineIndependent/glslang_tab.cpp" +#line 5215 "MachineIndependent/glslang_tab.cpp" break; case 7: /* primary_expression: UINTCONSTANT */ @@ -5224,7 +5220,7 @@ yyreduce: parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "unsigned literal"); (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).u, (yyvsp[0].lex).loc, true); } -#line 5228 "MachineIndependent/glslang_tab.cpp" +#line 5224 "MachineIndependent/glslang_tab.cpp" break; case 8: /* primary_expression: BOOLCONSTANT */ @@ -5232,7 +5228,7 @@ yyreduce: { (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).b, (yyvsp[0].lex).loc, true); } -#line 5236 "MachineIndependent/glslang_tab.cpp" +#line 5232 "MachineIndependent/glslang_tab.cpp" break; case 9: /* primary_expression: STRING_LITERAL */ @@ -5240,7 +5236,7 @@ yyreduce: { (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).string, (yyvsp[0].lex).loc, true); } -#line 5244 "MachineIndependent/glslang_tab.cpp" +#line 5240 "MachineIndependent/glslang_tab.cpp" break; case 10: /* primary_expression: INT32CONSTANT */ @@ -5249,7 +5245,7 @@ yyreduce: 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 5253 "MachineIndependent/glslang_tab.cpp" +#line 5249 "MachineIndependent/glslang_tab.cpp" break; case 11: /* primary_expression: UINT32CONSTANT */ @@ -5258,7 +5254,7 @@ yyreduce: 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 5262 "MachineIndependent/glslang_tab.cpp" +#line 5258 "MachineIndependent/glslang_tab.cpp" break; case 12: /* primary_expression: INT64CONSTANT */ @@ -5267,7 +5263,7 @@ yyreduce: 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 5271 "MachineIndependent/glslang_tab.cpp" +#line 5267 "MachineIndependent/glslang_tab.cpp" break; case 13: /* primary_expression: UINT64CONSTANT */ @@ -5276,7 +5272,7 @@ yyreduce: 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 5280 "MachineIndependent/glslang_tab.cpp" +#line 5276 "MachineIndependent/glslang_tab.cpp" break; case 14: /* primary_expression: INT16CONSTANT */ @@ -5285,7 +5281,7 @@ yyreduce: 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 5289 "MachineIndependent/glslang_tab.cpp" +#line 5285 "MachineIndependent/glslang_tab.cpp" break; case 15: /* primary_expression: UINT16CONSTANT */ @@ -5294,7 +5290,7 @@ yyreduce: 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 5298 "MachineIndependent/glslang_tab.cpp" +#line 5294 "MachineIndependent/glslang_tab.cpp" break; case 16: /* primary_expression: DOUBLECONSTANT */ @@ -5305,7 +5301,7 @@ yyreduce: 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 5309 "MachineIndependent/glslang_tab.cpp" +#line 5305 "MachineIndependent/glslang_tab.cpp" break; case 17: /* primary_expression: FLOAT16CONSTANT */ @@ -5314,7 +5310,7 @@ yyreduce: 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 5318 "MachineIndependent/glslang_tab.cpp" +#line 5314 "MachineIndependent/glslang_tab.cpp" break; case 18: /* postfix_expression: primary_expression */ @@ -5322,7 +5318,7 @@ yyreduce: { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 5326 "MachineIndependent/glslang_tab.cpp" +#line 5322 "MachineIndependent/glslang_tab.cpp" break; case 19: /* postfix_expression: postfix_expression LEFT_BRACKET integer_expression RIGHT_BRACKET */ @@ -5330,7 +5326,7 @@ yyreduce: { (yyval.interm.intermTypedNode) = parseContext.handleBracketDereference((yyvsp[-2].lex).loc, (yyvsp[-3].interm.intermTypedNode), (yyvsp[-1].interm.intermTypedNode)); } -#line 5334 "MachineIndependent/glslang_tab.cpp" +#line 5330 "MachineIndependent/glslang_tab.cpp" break; case 20: /* postfix_expression: function_call */ @@ -5338,7 +5334,7 @@ yyreduce: { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 5342 "MachineIndependent/glslang_tab.cpp" +#line 5338 "MachineIndependent/glslang_tab.cpp" break; case 21: /* postfix_expression: postfix_expression DOT IDENTIFIER */ @@ -5346,7 +5342,7 @@ yyreduce: { (yyval.interm.intermTypedNode) = parseContext.handleDotDereference((yyvsp[0].lex).loc, (yyvsp[-2].interm.intermTypedNode), *(yyvsp[0].lex).string); } -#line 5350 "MachineIndependent/glslang_tab.cpp" +#line 5346 "MachineIndependent/glslang_tab.cpp" break; case 22: /* postfix_expression: postfix_expression INC_OP */ @@ -5356,7 +5352,7 @@ yyreduce: 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 5360 "MachineIndependent/glslang_tab.cpp" +#line 5356 "MachineIndependent/glslang_tab.cpp" break; case 23: /* postfix_expression: postfix_expression DEC_OP */ @@ -5366,7 +5362,7 @@ yyreduce: 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 5370 "MachineIndependent/glslang_tab.cpp" +#line 5366 "MachineIndependent/glslang_tab.cpp" break; case 24: /* integer_expression: expression */ @@ -5375,7 +5371,7 @@ yyreduce: parseContext.integerCheck((yyvsp[0].interm.intermTypedNode), "[]"); (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 5379 "MachineIndependent/glslang_tab.cpp" +#line 5375 "MachineIndependent/glslang_tab.cpp" break; case 25: /* function_call: function_call_or_method */ @@ -5384,7 +5380,7 @@ yyreduce: (yyval.interm.intermTypedNode) = parseContext.handleFunctionCall((yyvsp[0].interm).loc, (yyvsp[0].interm).function, (yyvsp[0].interm).intermNode); delete (yyvsp[0].interm).function; } -#line 5388 "MachineIndependent/glslang_tab.cpp" +#line 5384 "MachineIndependent/glslang_tab.cpp" break; case 26: /* function_call_or_method: function_call_generic */ @@ -5392,7 +5388,7 @@ yyreduce: { (yyval.interm) = (yyvsp[0].interm); } -#line 5396 "MachineIndependent/glslang_tab.cpp" +#line 5392 "MachineIndependent/glslang_tab.cpp" break; case 27: /* function_call_generic: function_call_header_with_parameters RIGHT_PAREN */ @@ -5401,7 +5397,7 @@ yyreduce: (yyval.interm) = (yyvsp[-1].interm); (yyval.interm).loc = (yyvsp[0].lex).loc; } -#line 5405 "MachineIndependent/glslang_tab.cpp" +#line 5401 "MachineIndependent/glslang_tab.cpp" break; case 28: /* function_call_generic: function_call_header_no_parameters RIGHT_PAREN */ @@ -5410,7 +5406,7 @@ yyreduce: (yyval.interm) = (yyvsp[-1].interm); (yyval.interm).loc = (yyvsp[0].lex).loc; } -#line 5414 "MachineIndependent/glslang_tab.cpp" +#line 5410 "MachineIndependent/glslang_tab.cpp" break; case 29: /* function_call_header_no_parameters: function_call_header VOID */ @@ -5418,7 +5414,7 @@ yyreduce: { (yyval.interm) = (yyvsp[-1].interm); } -#line 5422 "MachineIndependent/glslang_tab.cpp" +#line 5418 "MachineIndependent/glslang_tab.cpp" break; case 30: /* function_call_header_no_parameters: function_call_header */ @@ -5426,7 +5422,7 @@ yyreduce: { (yyval.interm) = (yyvsp[0].interm); } -#line 5430 "MachineIndependent/glslang_tab.cpp" +#line 5426 "MachineIndependent/glslang_tab.cpp" break; case 31: /* function_call_header_with_parameters: function_call_header assignment_expression */ @@ -5438,7 +5434,7 @@ yyreduce: (yyval.interm).function = (yyvsp[-1].interm).function; (yyval.interm).intermNode = (yyvsp[0].interm.intermTypedNode); } -#line 5442 "MachineIndependent/glslang_tab.cpp" +#line 5438 "MachineIndependent/glslang_tab.cpp" break; case 32: /* function_call_header_with_parameters: function_call_header_with_parameters COMMA assignment_expression */ @@ -5450,7 +5446,7 @@ yyreduce: (yyval.interm).function = (yyvsp[-2].interm).function; (yyval.interm).intermNode = parseContext.intermediate.growAggregate((yyvsp[-2].interm).intermNode, (yyvsp[0].interm.intermTypedNode), (yyvsp[-1].lex).loc); } -#line 5454 "MachineIndependent/glslang_tab.cpp" +#line 5450 "MachineIndependent/glslang_tab.cpp" break; case 33: /* function_call_header: function_identifier LEFT_PAREN */ @@ -5458,7 +5454,7 @@ yyreduce: { (yyval.interm) = (yyvsp[-1].interm); } -#line 5462 "MachineIndependent/glslang_tab.cpp" +#line 5458 "MachineIndependent/glslang_tab.cpp" break; case 34: /* function_identifier: type_specifier */ @@ -5468,7 +5464,7 @@ yyreduce: (yyval.interm).intermNode = 0; (yyval.interm).function = parseContext.handleConstructorCall((yyvsp[0].interm.type).loc, (yyvsp[0].interm.type)); } -#line 5472 "MachineIndependent/glslang_tab.cpp" +#line 5468 "MachineIndependent/glslang_tab.cpp" break; case 35: /* function_identifier: postfix_expression */ @@ -5500,7 +5496,7 @@ yyreduce: (yyval.interm).function = new TFunction(empty, TType(EbtVoid), EOpNull); } } -#line 5504 "MachineIndependent/glslang_tab.cpp" +#line 5500 "MachineIndependent/glslang_tab.cpp" break; case 36: /* function_identifier: non_uniform_qualifier */ @@ -5510,7 +5506,7 @@ yyreduce: (yyval.interm).intermNode = 0; (yyval.interm).function = parseContext.handleConstructorCall((yyvsp[0].interm.type).loc, (yyvsp[0].interm.type)); } -#line 5514 "MachineIndependent/glslang_tab.cpp" +#line 5510 "MachineIndependent/glslang_tab.cpp" break; case 37: /* unary_expression: postfix_expression */ @@ -5521,7 +5517,7 @@ yyreduce: if (TIntermMethod* method = (yyvsp[0].interm.intermTypedNode)->getAsMethodNode()) parseContext.error((yyvsp[0].interm.intermTypedNode)->getLoc(), "incomplete method syntax", method->getMethodName().c_str(), ""); } -#line 5525 "MachineIndependent/glslang_tab.cpp" +#line 5521 "MachineIndependent/glslang_tab.cpp" break; case 38: /* unary_expression: INC_OP unary_expression */ @@ -5530,7 +5526,7 @@ yyreduce: 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 5534 "MachineIndependent/glslang_tab.cpp" +#line 5530 "MachineIndependent/glslang_tab.cpp" break; case 39: /* unary_expression: DEC_OP unary_expression */ @@ -5539,7 +5535,7 @@ yyreduce: 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 5543 "MachineIndependent/glslang_tab.cpp" +#line 5539 "MachineIndependent/glslang_tab.cpp" break; case 40: /* unary_expression: unary_operator unary_expression */ @@ -5560,38 +5556,38 @@ yyreduce: (yyval.interm.intermTypedNode)->getAsConstantUnion()->setExpression(); } } -#line 5564 "MachineIndependent/glslang_tab.cpp" +#line 5560 "MachineIndependent/glslang_tab.cpp" break; case 41: /* unary_operator: PLUS */ #line 627 "MachineIndependent/glslang.y" { (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpNull; } -#line 5570 "MachineIndependent/glslang_tab.cpp" +#line 5566 "MachineIndependent/glslang_tab.cpp" break; case 42: /* unary_operator: DASH */ #line 628 "MachineIndependent/glslang.y" { (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpNegative; } -#line 5576 "MachineIndependent/glslang_tab.cpp" +#line 5572 "MachineIndependent/glslang_tab.cpp" break; case 43: /* unary_operator: BANG */ #line 629 "MachineIndependent/glslang.y" { (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpLogicalNot; } -#line 5582 "MachineIndependent/glslang_tab.cpp" +#line 5578 "MachineIndependent/glslang_tab.cpp" break; case 44: /* unary_operator: TILDE */ #line 630 "MachineIndependent/glslang.y" { (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpBitwiseNot; parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "bitwise not"); } -#line 5589 "MachineIndependent/glslang_tab.cpp" +#line 5585 "MachineIndependent/glslang_tab.cpp" break; case 45: /* multiplicative_expression: unary_expression */ #line 636 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 5595 "MachineIndependent/glslang_tab.cpp" +#line 5591 "MachineIndependent/glslang_tab.cpp" break; case 46: /* multiplicative_expression: multiplicative_expression STAR unary_expression */ @@ -5601,7 +5597,7 @@ yyreduce: if ((yyval.interm.intermTypedNode) == 0) (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode); } -#line 5605 "MachineIndependent/glslang_tab.cpp" +#line 5601 "MachineIndependent/glslang_tab.cpp" break; case 47: /* multiplicative_expression: multiplicative_expression SLASH unary_expression */ @@ -5611,7 +5607,7 @@ yyreduce: if ((yyval.interm.intermTypedNode) == 0) (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode); } -#line 5615 "MachineIndependent/glslang_tab.cpp" +#line 5611 "MachineIndependent/glslang_tab.cpp" break; case 48: /* multiplicative_expression: multiplicative_expression PERCENT unary_expression */ @@ -5622,13 +5618,13 @@ yyreduce: if ((yyval.interm.intermTypedNode) == 0) (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode); } -#line 5626 "MachineIndependent/glslang_tab.cpp" +#line 5622 "MachineIndependent/glslang_tab.cpp" break; case 49: /* additive_expression: multiplicative_expression */ #line 656 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 5632 "MachineIndependent/glslang_tab.cpp" +#line 5628 "MachineIndependent/glslang_tab.cpp" break; case 50: /* additive_expression: additive_expression PLUS multiplicative_expression */ @@ -5638,7 +5634,7 @@ yyreduce: if ((yyval.interm.intermTypedNode) == 0) (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode); } -#line 5642 "MachineIndependent/glslang_tab.cpp" +#line 5638 "MachineIndependent/glslang_tab.cpp" break; case 51: /* additive_expression: additive_expression DASH multiplicative_expression */ @@ -5648,13 +5644,13 @@ yyreduce: if ((yyval.interm.intermTypedNode) == 0) (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode); } -#line 5652 "MachineIndependent/glslang_tab.cpp" +#line 5648 "MachineIndependent/glslang_tab.cpp" break; case 52: /* shift_expression: additive_expression */ #line 670 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 5658 "MachineIndependent/glslang_tab.cpp" +#line 5654 "MachineIndependent/glslang_tab.cpp" break; case 53: /* shift_expression: shift_expression LEFT_OP additive_expression */ @@ -5665,7 +5661,7 @@ yyreduce: if ((yyval.interm.intermTypedNode) == 0) (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode); } -#line 5669 "MachineIndependent/glslang_tab.cpp" +#line 5665 "MachineIndependent/glslang_tab.cpp" break; case 54: /* shift_expression: shift_expression RIGHT_OP additive_expression */ @@ -5676,13 +5672,13 @@ yyreduce: if ((yyval.interm.intermTypedNode) == 0) (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode); } -#line 5680 "MachineIndependent/glslang_tab.cpp" +#line 5676 "MachineIndependent/glslang_tab.cpp" break; case 55: /* relational_expression: shift_expression */ #line 686 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 5686 "MachineIndependent/glslang_tab.cpp" +#line 5682 "MachineIndependent/glslang_tab.cpp" break; case 56: /* relational_expression: relational_expression LEFT_ANGLE shift_expression */ @@ -5692,7 +5688,7 @@ yyreduce: if ((yyval.interm.intermTypedNode) == 0) (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[-1].lex).loc); } -#line 5696 "MachineIndependent/glslang_tab.cpp" +#line 5692 "MachineIndependent/glslang_tab.cpp" break; case 57: /* relational_expression: relational_expression RIGHT_ANGLE shift_expression */ @@ -5702,7 +5698,7 @@ yyreduce: if ((yyval.interm.intermTypedNode) == 0) (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[-1].lex).loc); } -#line 5706 "MachineIndependent/glslang_tab.cpp" +#line 5702 "MachineIndependent/glslang_tab.cpp" break; case 58: /* relational_expression: relational_expression LE_OP shift_expression */ @@ -5712,7 +5708,7 @@ yyreduce: if ((yyval.interm.intermTypedNode) == 0) (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[-1].lex).loc); } -#line 5716 "MachineIndependent/glslang_tab.cpp" +#line 5712 "MachineIndependent/glslang_tab.cpp" break; case 59: /* relational_expression: relational_expression GE_OP shift_expression */ @@ -5722,13 +5718,13 @@ yyreduce: if ((yyval.interm.intermTypedNode) == 0) (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[-1].lex).loc); } -#line 5726 "MachineIndependent/glslang_tab.cpp" +#line 5722 "MachineIndependent/glslang_tab.cpp" break; case 60: /* equality_expression: relational_expression */ #line 710 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 5732 "MachineIndependent/glslang_tab.cpp" +#line 5728 "MachineIndependent/glslang_tab.cpp" break; case 61: /* equality_expression: equality_expression EQ_OP relational_expression */ @@ -5742,7 +5738,7 @@ yyreduce: if ((yyval.interm.intermTypedNode) == 0) (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[-1].lex).loc); } -#line 5746 "MachineIndependent/glslang_tab.cpp" +#line 5742 "MachineIndependent/glslang_tab.cpp" break; case 62: /* equality_expression: equality_expression NE_OP relational_expression */ @@ -5756,13 +5752,13 @@ yyreduce: if ((yyval.interm.intermTypedNode) == 0) (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[-1].lex).loc); } -#line 5760 "MachineIndependent/glslang_tab.cpp" +#line 5756 "MachineIndependent/glslang_tab.cpp" break; case 63: /* and_expression: equality_expression */ #line 732 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 5766 "MachineIndependent/glslang_tab.cpp" +#line 5762 "MachineIndependent/glslang_tab.cpp" break; case 64: /* and_expression: and_expression AMPERSAND equality_expression */ @@ -5773,13 +5769,13 @@ yyreduce: if ((yyval.interm.intermTypedNode) == 0) (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode); } -#line 5777 "MachineIndependent/glslang_tab.cpp" +#line 5773 "MachineIndependent/glslang_tab.cpp" break; case 65: /* exclusive_or_expression: and_expression */ #line 742 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 5783 "MachineIndependent/glslang_tab.cpp" +#line 5779 "MachineIndependent/glslang_tab.cpp" break; case 66: /* exclusive_or_expression: exclusive_or_expression CARET and_expression */ @@ -5790,13 +5786,13 @@ yyreduce: if ((yyval.interm.intermTypedNode) == 0) (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode); } -#line 5794 "MachineIndependent/glslang_tab.cpp" +#line 5790 "MachineIndependent/glslang_tab.cpp" break; case 67: /* inclusive_or_expression: exclusive_or_expression */ #line 752 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 5800 "MachineIndependent/glslang_tab.cpp" +#line 5796 "MachineIndependent/glslang_tab.cpp" break; case 68: /* inclusive_or_expression: inclusive_or_expression VERTICAL_BAR exclusive_or_expression */ @@ -5807,13 +5803,13 @@ yyreduce: if ((yyval.interm.intermTypedNode) == 0) (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode); } -#line 5811 "MachineIndependent/glslang_tab.cpp" +#line 5807 "MachineIndependent/glslang_tab.cpp" break; case 69: /* logical_and_expression: inclusive_or_expression */ #line 762 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 5817 "MachineIndependent/glslang_tab.cpp" +#line 5813 "MachineIndependent/glslang_tab.cpp" break; case 70: /* logical_and_expression: logical_and_expression AND_OP inclusive_or_expression */ @@ -5823,13 +5819,13 @@ yyreduce: if ((yyval.interm.intermTypedNode) == 0) (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[-1].lex).loc); } -#line 5827 "MachineIndependent/glslang_tab.cpp" +#line 5823 "MachineIndependent/glslang_tab.cpp" break; case 71: /* logical_xor_expression: logical_and_expression */ #line 771 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 5833 "MachineIndependent/glslang_tab.cpp" +#line 5829 "MachineIndependent/glslang_tab.cpp" break; case 72: /* logical_xor_expression: logical_xor_expression XOR_OP logical_and_expression */ @@ -5839,13 +5835,13 @@ yyreduce: if ((yyval.interm.intermTypedNode) == 0) (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[-1].lex).loc); } -#line 5843 "MachineIndependent/glslang_tab.cpp" +#line 5839 "MachineIndependent/glslang_tab.cpp" break; case 73: /* logical_or_expression: logical_xor_expression */ #line 780 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 5849 "MachineIndependent/glslang_tab.cpp" +#line 5845 "MachineIndependent/glslang_tab.cpp" break; case 74: /* logical_or_expression: logical_or_expression OR_OP logical_xor_expression */ @@ -5855,13 +5851,13 @@ yyreduce: if ((yyval.interm.intermTypedNode) == 0) (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[-1].lex).loc); } -#line 5859 "MachineIndependent/glslang_tab.cpp" +#line 5855 "MachineIndependent/glslang_tab.cpp" break; case 75: /* conditional_expression: logical_or_expression */ #line 789 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 5865 "MachineIndependent/glslang_tab.cpp" +#line 5861 "MachineIndependent/glslang_tab.cpp" break; case 76: /* $@1: %empty */ @@ -5869,7 +5865,7 @@ yyreduce: { ++parseContext.controlFlowNestingLevel; } -#line 5873 "MachineIndependent/glslang_tab.cpp" +#line 5869 "MachineIndependent/glslang_tab.cpp" break; case 77: /* conditional_expression: logical_or_expression QUESTION $@1 expression COLON assignment_expression */ @@ -5882,17 +5878,17 @@ yyreduce: parseContext.rValueErrorCheck((yyvsp[-1].lex).loc, ":", (yyvsp[0].interm.intermTypedNode)); (yyval.interm.intermTypedNode) = parseContext.intermediate.addSelection((yyvsp[-5].interm.intermTypedNode), (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yyvsp[-4].lex).loc); if ((yyval.interm.intermTypedNode) == 0) { - parseContext.binaryOpError((yyvsp[-4].lex).loc, ":", (yyvsp[-2].interm.intermTypedNode)->getCompleteString(parseContext.intermediate.getEnhancedMsgs()), (yyvsp[0].interm.intermTypedNode)->getCompleteString(parseContext.intermediate.getEnhancedMsgs())); + parseContext.binaryOpError((yyvsp[-4].lex).loc, ":", (yyvsp[-2].interm.intermTypedNode)->getCompleteString(), (yyvsp[0].interm.intermTypedNode)->getCompleteString()); (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } } -#line 5890 "MachineIndependent/glslang_tab.cpp" +#line 5886 "MachineIndependent/glslang_tab.cpp" break; case 78: /* assignment_expression: conditional_expression */ #line 808 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 5896 "MachineIndependent/glslang_tab.cpp" +#line 5892 "MachineIndependent/glslang_tab.cpp" break; case 79: /* assignment_expression: unary_expression assignment_operator assignment_expression */ @@ -5906,11 +5902,11 @@ yyreduce: parseContext.rValueErrorCheck((yyvsp[-1].interm).loc, "assign", (yyvsp[0].interm.intermTypedNode)); (yyval.interm.intermTypedNode) = parseContext.addAssign((yyvsp[-1].interm).loc, (yyvsp[-1].interm).op, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); if ((yyval.interm.intermTypedNode) == 0) { - parseContext.assignError((yyvsp[-1].interm).loc, "assign", (yyvsp[-2].interm.intermTypedNode)->getCompleteString(parseContext.intermediate.getEnhancedMsgs()), (yyvsp[0].interm.intermTypedNode)->getCompleteString(parseContext.intermediate.getEnhancedMsgs())); + parseContext.assignError((yyvsp[-1].interm).loc, "assign", (yyvsp[-2].interm.intermTypedNode)->getCompleteString(), (yyvsp[0].interm.intermTypedNode)->getCompleteString()); (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode); } } -#line 5914 "MachineIndependent/glslang_tab.cpp" +#line 5910 "MachineIndependent/glslang_tab.cpp" break; case 80: /* assignment_operator: EQUAL */ @@ -5919,7 +5915,7 @@ yyreduce: (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpAssign; } -#line 5923 "MachineIndependent/glslang_tab.cpp" +#line 5919 "MachineIndependent/glslang_tab.cpp" break; case 81: /* assignment_operator: MUL_ASSIGN */ @@ -5928,7 +5924,7 @@ yyreduce: (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpMulAssign; } -#line 5932 "MachineIndependent/glslang_tab.cpp" +#line 5928 "MachineIndependent/glslang_tab.cpp" break; case 82: /* assignment_operator: DIV_ASSIGN */ @@ -5937,7 +5933,7 @@ yyreduce: (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpDivAssign; } -#line 5941 "MachineIndependent/glslang_tab.cpp" +#line 5937 "MachineIndependent/glslang_tab.cpp" break; case 83: /* assignment_operator: MOD_ASSIGN */ @@ -5947,7 +5943,7 @@ yyreduce: (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpModAssign; } -#line 5951 "MachineIndependent/glslang_tab.cpp" +#line 5947 "MachineIndependent/glslang_tab.cpp" break; case 84: /* assignment_operator: ADD_ASSIGN */ @@ -5956,7 +5952,7 @@ yyreduce: (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpAddAssign; } -#line 5960 "MachineIndependent/glslang_tab.cpp" +#line 5956 "MachineIndependent/glslang_tab.cpp" break; case 85: /* assignment_operator: SUB_ASSIGN */ @@ -5965,7 +5961,7 @@ yyreduce: (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpSubAssign; } -#line 5969 "MachineIndependent/glslang_tab.cpp" +#line 5965 "MachineIndependent/glslang_tab.cpp" break; case 86: /* assignment_operator: LEFT_ASSIGN */ @@ -5974,7 +5970,7 @@ yyreduce: parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "bit-shift left assign"); (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpLeftShiftAssign; } -#line 5978 "MachineIndependent/glslang_tab.cpp" +#line 5974 "MachineIndependent/glslang_tab.cpp" break; case 87: /* assignment_operator: RIGHT_ASSIGN */ @@ -5983,7 +5979,7 @@ yyreduce: parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "bit-shift right assign"); (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpRightShiftAssign; } -#line 5987 "MachineIndependent/glslang_tab.cpp" +#line 5983 "MachineIndependent/glslang_tab.cpp" break; case 88: /* assignment_operator: AND_ASSIGN */ @@ -5992,7 +5988,7 @@ yyreduce: parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "bitwise-and assign"); (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpAndAssign; } -#line 5996 "MachineIndependent/glslang_tab.cpp" +#line 5992 "MachineIndependent/glslang_tab.cpp" break; case 89: /* assignment_operator: XOR_ASSIGN */ @@ -6001,7 +5997,7 @@ yyreduce: parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "bitwise-xor assign"); (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpExclusiveOrAssign; } -#line 6005 "MachineIndependent/glslang_tab.cpp" +#line 6001 "MachineIndependent/glslang_tab.cpp" break; case 90: /* assignment_operator: OR_ASSIGN */ @@ -6010,7 +6006,7 @@ yyreduce: parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "bitwise-or assign"); (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpInclusiveOrAssign; } -#line 6014 "MachineIndependent/glslang_tab.cpp" +#line 6010 "MachineIndependent/glslang_tab.cpp" break; case 91: /* expression: assignment_expression */ @@ -6018,7 +6014,7 @@ yyreduce: { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 6022 "MachineIndependent/glslang_tab.cpp" +#line 6018 "MachineIndependent/glslang_tab.cpp" break; case 92: /* expression: expression COMMA assignment_expression */ @@ -6027,11 +6023,11 @@ yyreduce: 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); if ((yyval.interm.intermTypedNode) == 0) { - parseContext.binaryOpError((yyvsp[-1].lex).loc, ",", (yyvsp[-2].interm.intermTypedNode)->getCompleteString(parseContext.intermediate.getEnhancedMsgs()), (yyvsp[0].interm.intermTypedNode)->getCompleteString(parseContext.intermediate.getEnhancedMsgs())); + parseContext.binaryOpError((yyvsp[-1].lex).loc, ",", (yyvsp[-2].interm.intermTypedNode)->getCompleteString(), (yyvsp[0].interm.intermTypedNode)->getCompleteString()); (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } } -#line 6035 "MachineIndependent/glslang_tab.cpp" +#line 6031 "MachineIndependent/glslang_tab.cpp" break; case 93: /* constant_expression: conditional_expression */ @@ -6040,7 +6036,7 @@ yyreduce: parseContext.constantValueCheck((yyvsp[0].interm.intermTypedNode), ""); (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 6044 "MachineIndependent/glslang_tab.cpp" +#line 6040 "MachineIndependent/glslang_tab.cpp" break; case 94: /* declaration: function_prototype SEMICOLON */ @@ -6050,7 +6046,7 @@ yyreduce: (yyval.interm.intermNode) = 0; // TODO: 4.0 functionality: subroutines: make the identifier a user type for this signature } -#line 6054 "MachineIndependent/glslang_tab.cpp" +#line 6050 "MachineIndependent/glslang_tab.cpp" break; case 95: /* declaration: spirv_instruction_qualifier function_prototype SEMICOLON */ @@ -6062,7 +6058,7 @@ yyreduce: (yyval.interm.intermNode) = 0; // TODO: 4.0 functionality: subroutines: make the identifier a user type for this signature } -#line 6066 "MachineIndependent/glslang_tab.cpp" +#line 6062 "MachineIndependent/glslang_tab.cpp" break; case 96: /* declaration: spirv_execution_mode_qualifier SEMICOLON */ @@ -6072,7 +6068,7 @@ yyreduce: parseContext.requireExtensions((yyvsp[0].lex).loc, 1, &E_GL_EXT_spirv_intrinsics, "SPIR-V execution mode qualifier"); (yyval.interm.intermNode) = 0; } -#line 6076 "MachineIndependent/glslang_tab.cpp" +#line 6072 "MachineIndependent/glslang_tab.cpp" break; case 97: /* declaration: init_declarator_list SEMICOLON */ @@ -6082,7 +6078,7 @@ yyreduce: (yyvsp[-1].interm).intermNode->getAsAggregate()->setOperator(EOpSequence); (yyval.interm.intermNode) = (yyvsp[-1].interm).intermNode; } -#line 6086 "MachineIndependent/glslang_tab.cpp" +#line 6082 "MachineIndependent/glslang_tab.cpp" break; case 98: /* declaration: PRECISION precision_qualifier type_specifier SEMICOLON */ @@ -6094,7 +6090,7 @@ yyreduce: parseContext.setDefaultPrecision((yyvsp[-3].lex).loc, (yyvsp[-1].interm.type), (yyvsp[-2].interm.type).qualifier.precision); (yyval.interm.intermNode) = 0; } -#line 6098 "MachineIndependent/glslang_tab.cpp" +#line 6094 "MachineIndependent/glslang_tab.cpp" break; case 99: /* declaration: block_structure SEMICOLON */ @@ -6103,7 +6099,7 @@ yyreduce: parseContext.declareBlock((yyvsp[-1].interm).loc, *(yyvsp[-1].interm).typeList); (yyval.interm.intermNode) = 0; } -#line 6107 "MachineIndependent/glslang_tab.cpp" +#line 6103 "MachineIndependent/glslang_tab.cpp" break; case 100: /* declaration: block_structure IDENTIFIER SEMICOLON */ @@ -6112,7 +6108,7 @@ yyreduce: parseContext.declareBlock((yyvsp[-2].interm).loc, *(yyvsp[-2].interm).typeList, (yyvsp[-1].lex).string); (yyval.interm.intermNode) = 0; } -#line 6116 "MachineIndependent/glslang_tab.cpp" +#line 6112 "MachineIndependent/glslang_tab.cpp" break; case 101: /* declaration: block_structure IDENTIFIER array_specifier SEMICOLON */ @@ -6121,7 +6117,7 @@ yyreduce: parseContext.declareBlock((yyvsp[-3].interm).loc, *(yyvsp[-3].interm).typeList, (yyvsp[-2].lex).string, (yyvsp[-1].interm).arraySizes); (yyval.interm.intermNode) = 0; } -#line 6125 "MachineIndependent/glslang_tab.cpp" +#line 6121 "MachineIndependent/glslang_tab.cpp" break; case 102: /* declaration: type_qualifier SEMICOLON */ @@ -6131,7 +6127,7 @@ yyreduce: parseContext.updateStandaloneQualifierDefaults((yyvsp[-1].interm.type).loc, (yyvsp[-1].interm.type)); (yyval.interm.intermNode) = 0; } -#line 6135 "MachineIndependent/glslang_tab.cpp" +#line 6131 "MachineIndependent/glslang_tab.cpp" break; case 103: /* declaration: type_qualifier IDENTIFIER SEMICOLON */ @@ -6141,7 +6137,7 @@ yyreduce: parseContext.addQualifierToExisting((yyvsp[-2].interm.type).loc, (yyvsp[-2].interm.type).qualifier, *(yyvsp[-1].lex).string); (yyval.interm.intermNode) = 0; } -#line 6145 "MachineIndependent/glslang_tab.cpp" +#line 6141 "MachineIndependent/glslang_tab.cpp" break; case 104: /* declaration: type_qualifier IDENTIFIER identifier_list SEMICOLON */ @@ -6152,13 +6148,13 @@ yyreduce: parseContext.addQualifierToExisting((yyvsp[-3].interm.type).loc, (yyvsp[-3].interm.type).qualifier, *(yyvsp[-1].interm.identifierList)); (yyval.interm.intermNode) = 0; } -#line 6156 "MachineIndependent/glslang_tab.cpp" +#line 6152 "MachineIndependent/glslang_tab.cpp" break; case 105: /* $@2: %empty */ #line 956 "MachineIndependent/glslang.y" { parseContext.nestedBlockCheck((yyvsp[-2].interm.type).loc); } -#line 6162 "MachineIndependent/glslang_tab.cpp" +#line 6158 "MachineIndependent/glslang_tab.cpp" break; case 106: /* block_structure: type_qualifier IDENTIFIER LEFT_BRACE $@2 struct_declaration_list RIGHT_BRACE */ @@ -6172,7 +6168,7 @@ yyreduce: (yyval.interm).loc = (yyvsp[-5].interm.type).loc; (yyval.interm).typeList = (yyvsp[-1].interm.typeList); } -#line 6176 "MachineIndependent/glslang_tab.cpp" +#line 6172 "MachineIndependent/glslang_tab.cpp" break; case 107: /* identifier_list: COMMA IDENTIFIER */ @@ -6181,7 +6177,7 @@ yyreduce: (yyval.interm.identifierList) = new TIdentifierList; (yyval.interm.identifierList)->push_back((yyvsp[0].lex).string); } -#line 6185 "MachineIndependent/glslang_tab.cpp" +#line 6181 "MachineIndependent/glslang_tab.cpp" break; case 108: /* identifier_list: identifier_list COMMA IDENTIFIER */ @@ -6190,7 +6186,7 @@ yyreduce: (yyval.interm.identifierList) = (yyvsp[-2].interm.identifierList); (yyval.interm.identifierList)->push_back((yyvsp[0].lex).string); } -#line 6194 "MachineIndependent/glslang_tab.cpp" +#line 6190 "MachineIndependent/glslang_tab.cpp" break; case 109: /* function_prototype: function_declarator RIGHT_PAREN */ @@ -6199,7 +6195,7 @@ yyreduce: (yyval.interm).function = (yyvsp[-1].interm.function); (yyval.interm).loc = (yyvsp[0].lex).loc; } -#line 6203 "MachineIndependent/glslang_tab.cpp" +#line 6199 "MachineIndependent/glslang_tab.cpp" break; case 110: /* function_prototype: function_declarator RIGHT_PAREN attribute */ @@ -6208,9 +6204,9 @@ yyreduce: (yyval.interm).function = (yyvsp[-2].interm.function); (yyval.interm).loc = (yyvsp[-1].lex).loc; parseContext.requireExtensions((yyvsp[-1].lex).loc, 1, &E_GL_EXT_subgroup_uniform_control_flow, "attribute"); - parseContext.handleFunctionAttributes((yyvsp[-1].lex).loc, *(yyvsp[0].interm.attributes)); + parseContext.handleFunctionAttributes((yyvsp[-1].lex).loc, *(yyvsp[0].interm.attributes), (yyval.interm).function); } -#line 6214 "MachineIndependent/glslang_tab.cpp" +#line 6210 "MachineIndependent/glslang_tab.cpp" break; case 111: /* function_prototype: attribute function_declarator RIGHT_PAREN */ @@ -6219,9 +6215,9 @@ yyreduce: (yyval.interm).function = (yyvsp[-1].interm.function); (yyval.interm).loc = (yyvsp[0].lex).loc; parseContext.requireExtensions((yyvsp[0].lex).loc, 1, &E_GL_EXT_subgroup_uniform_control_flow, "attribute"); - parseContext.handleFunctionAttributes((yyvsp[0].lex).loc, *(yyvsp[-2].interm.attributes)); + parseContext.handleFunctionAttributes((yyvsp[0].lex).loc, *(yyvsp[-2].interm.attributes), (yyval.interm).function); } -#line 6225 "MachineIndependent/glslang_tab.cpp" +#line 6221 "MachineIndependent/glslang_tab.cpp" break; case 112: /* function_prototype: attribute function_declarator RIGHT_PAREN attribute */ @@ -6230,10 +6226,10 @@ yyreduce: (yyval.interm).function = (yyvsp[-2].interm.function); (yyval.interm).loc = (yyvsp[-1].lex).loc; parseContext.requireExtensions((yyvsp[-1].lex).loc, 1, &E_GL_EXT_subgroup_uniform_control_flow, "attribute"); - parseContext.handleFunctionAttributes((yyvsp[-1].lex).loc, *(yyvsp[-3].interm.attributes)); - parseContext.handleFunctionAttributes((yyvsp[-1].lex).loc, *(yyvsp[0].interm.attributes)); + parseContext.handleFunctionAttributes((yyvsp[-1].lex).loc, *(yyvsp[-3].interm.attributes), (yyval.interm).function); + parseContext.handleFunctionAttributes((yyvsp[-1].lex).loc, *(yyvsp[0].interm.attributes), (yyval.interm).function); } -#line 6237 "MachineIndependent/glslang_tab.cpp" +#line 6233 "MachineIndependent/glslang_tab.cpp" break; case 113: /* function_declarator: function_header */ @@ -6241,7 +6237,7 @@ yyreduce: { (yyval.interm.function) = (yyvsp[0].interm.function); } -#line 6245 "MachineIndependent/glslang_tab.cpp" +#line 6241 "MachineIndependent/glslang_tab.cpp" break; case 114: /* function_declarator: function_header_with_parameters */ @@ -6249,7 +6245,7 @@ yyreduce: { (yyval.interm.function) = (yyvsp[0].interm.function); } -#line 6253 "MachineIndependent/glslang_tab.cpp" +#line 6249 "MachineIndependent/glslang_tab.cpp" break; case 115: /* function_header_with_parameters: function_header parameter_declaration */ @@ -6262,7 +6258,7 @@ yyreduce: else delete (yyvsp[0].interm).param.type; } -#line 6266 "MachineIndependent/glslang_tab.cpp" +#line 6262 "MachineIndependent/glslang_tab.cpp" break; case 116: /* function_header_with_parameters: function_header_with_parameters COMMA parameter_declaration */ @@ -6284,7 +6280,7 @@ yyreduce: (yyvsp[-2].interm.function)->addParameter((yyvsp[0].interm).param); } } -#line 6288 "MachineIndependent/glslang_tab.cpp" +#line 6284 "MachineIndependent/glslang_tab.cpp" break; case 117: /* function_header: fully_specified_type IDENTIFIER LEFT_PAREN */ @@ -6308,7 +6304,7 @@ yyreduce: function = new TFunction((yyvsp[-1].lex).string, type); (yyval.interm.function) = function; } -#line 6312 "MachineIndependent/glslang_tab.cpp" +#line 6308 "MachineIndependent/glslang_tab.cpp" break; case 118: /* parameter_declarator: type_specifier IDENTIFIER */ @@ -6328,7 +6324,7 @@ yyreduce: (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).param = param; } -#line 6332 "MachineIndependent/glslang_tab.cpp" +#line 6328 "MachineIndependent/glslang_tab.cpp" break; case 119: /* parameter_declarator: type_specifier IDENTIFIER array_specifier */ @@ -6352,7 +6348,7 @@ yyreduce: (yyval.interm).loc = (yyvsp[-1].lex).loc; (yyval.interm).param = param; } -#line 6356 "MachineIndependent/glslang_tab.cpp" +#line 6352 "MachineIndependent/glslang_tab.cpp" break; case 120: /* parameter_declaration: type_qualifier parameter_declarator */ @@ -6368,7 +6364,7 @@ yyreduce: parseContext.paramCheckFix((yyvsp[-1].interm.type).loc, (yyvsp[-1].interm.type).qualifier, *(yyval.interm).param.type); } -#line 6372 "MachineIndependent/glslang_tab.cpp" +#line 6368 "MachineIndependent/glslang_tab.cpp" break; case 121: /* parameter_declaration: parameter_declarator */ @@ -6380,7 +6376,7 @@ yyreduce: parseContext.paramCheckFixStorage((yyvsp[0].interm).loc, EvqTemporary, *(yyval.interm).param.type); parseContext.precisionQualifierCheck((yyval.interm).loc, (yyval.interm).param.type->getBasicType(), (yyval.interm).param.type->getQualifier()); } -#line 6384 "MachineIndependent/glslang_tab.cpp" +#line 6380 "MachineIndependent/glslang_tab.cpp" break; case 122: /* parameter_declaration: type_qualifier parameter_type_specifier */ @@ -6395,7 +6391,7 @@ yyreduce: parseContext.parameterTypeCheck((yyvsp[0].interm).loc, (yyvsp[-1].interm.type).qualifier.storage, *(yyval.interm).param.type); parseContext.paramCheckFix((yyvsp[-1].interm.type).loc, (yyvsp[-1].interm.type).qualifier, *(yyval.interm).param.type); } -#line 6399 "MachineIndependent/glslang_tab.cpp" +#line 6395 "MachineIndependent/glslang_tab.cpp" break; case 123: /* parameter_declaration: parameter_type_specifier */ @@ -6407,7 +6403,7 @@ yyreduce: parseContext.paramCheckFixStorage((yyvsp[0].interm).loc, EvqTemporary, *(yyval.interm).param.type); parseContext.precisionQualifierCheck((yyval.interm).loc, (yyval.interm).param.type->getBasicType(), (yyval.interm).param.type->getQualifier()); } -#line 6411 "MachineIndependent/glslang_tab.cpp" +#line 6407 "MachineIndependent/glslang_tab.cpp" break; case 124: /* parameter_type_specifier: type_specifier */ @@ -6418,7 +6414,7 @@ yyreduce: if ((yyvsp[0].interm.type).arraySizes) parseContext.arraySizeRequiredCheck((yyvsp[0].interm.type).loc, *(yyvsp[0].interm.type).arraySizes); } -#line 6422 "MachineIndependent/glslang_tab.cpp" +#line 6418 "MachineIndependent/glslang_tab.cpp" break; case 125: /* init_declarator_list: single_declaration */ @@ -6426,7 +6422,7 @@ yyreduce: { (yyval.interm) = (yyvsp[0].interm); } -#line 6430 "MachineIndependent/glslang_tab.cpp" +#line 6426 "MachineIndependent/glslang_tab.cpp" break; case 126: /* init_declarator_list: init_declarator_list COMMA IDENTIFIER */ @@ -6435,7 +6431,7 @@ yyreduce: (yyval.interm) = (yyvsp[-2].interm); parseContext.declareVariable((yyvsp[0].lex).loc, *(yyvsp[0].lex).string, (yyvsp[-2].interm).type); } -#line 6439 "MachineIndependent/glslang_tab.cpp" +#line 6435 "MachineIndependent/glslang_tab.cpp" break; case 127: /* init_declarator_list: init_declarator_list COMMA IDENTIFIER array_specifier */ @@ -6444,7 +6440,7 @@ yyreduce: (yyval.interm) = (yyvsp[-3].interm); parseContext.declareVariable((yyvsp[-1].lex).loc, *(yyvsp[-1].lex).string, (yyvsp[-3].interm).type, (yyvsp[0].interm).arraySizes); } -#line 6448 "MachineIndependent/glslang_tab.cpp" +#line 6444 "MachineIndependent/glslang_tab.cpp" break; case 128: /* init_declarator_list: init_declarator_list COMMA IDENTIFIER array_specifier EQUAL initializer */ @@ -6454,7 +6450,7 @@ yyreduce: 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 6458 "MachineIndependent/glslang_tab.cpp" +#line 6454 "MachineIndependent/glslang_tab.cpp" break; case 129: /* init_declarator_list: init_declarator_list COMMA IDENTIFIER EQUAL initializer */ @@ -6464,7 +6460,7 @@ yyreduce: 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 6468 "MachineIndependent/glslang_tab.cpp" +#line 6464 "MachineIndependent/glslang_tab.cpp" break; case 130: /* single_declaration: fully_specified_type */ @@ -6476,7 +6472,7 @@ yyreduce: parseContext.declareTypeDefaults((yyval.interm).loc, (yyval.interm).type); } -#line 6480 "MachineIndependent/glslang_tab.cpp" +#line 6476 "MachineIndependent/glslang_tab.cpp" break; case 131: /* single_declaration: fully_specified_type IDENTIFIER */ @@ -6486,7 +6482,7 @@ yyreduce: (yyval.interm).intermNode = 0; parseContext.declareVariable((yyvsp[0].lex).loc, *(yyvsp[0].lex).string, (yyvsp[-1].interm.type)); } -#line 6490 "MachineIndependent/glslang_tab.cpp" +#line 6486 "MachineIndependent/glslang_tab.cpp" break; case 132: /* single_declaration: fully_specified_type IDENTIFIER array_specifier */ @@ -6496,7 +6492,7 @@ yyreduce: (yyval.interm).intermNode = 0; parseContext.declareVariable((yyvsp[-1].lex).loc, *(yyvsp[-1].lex).string, (yyvsp[-2].interm.type), (yyvsp[0].interm).arraySizes); } -#line 6500 "MachineIndependent/glslang_tab.cpp" +#line 6496 "MachineIndependent/glslang_tab.cpp" break; case 133: /* single_declaration: fully_specified_type IDENTIFIER array_specifier EQUAL initializer */ @@ -6506,7 +6502,7 @@ yyreduce: 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 6510 "MachineIndependent/glslang_tab.cpp" +#line 6506 "MachineIndependent/glslang_tab.cpp" break; case 134: /* single_declaration: fully_specified_type IDENTIFIER EQUAL initializer */ @@ -6516,7 +6512,7 @@ yyreduce: 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 6520 "MachineIndependent/glslang_tab.cpp" +#line 6516 "MachineIndependent/glslang_tab.cpp" break; case 135: /* fully_specified_type: type_specifier */ @@ -6531,7 +6527,7 @@ yyreduce: } parseContext.precisionQualifierCheck((yyval.interm.type).loc, (yyval.interm.type).basicType, (yyval.interm.type).qualifier); } -#line 6535 "MachineIndependent/glslang_tab.cpp" +#line 6531 "MachineIndependent/glslang_tab.cpp" break; case 136: /* fully_specified_type: type_qualifier type_specifier */ @@ -6560,7 +6556,7 @@ yyreduce: (parseContext.language == EShLangFragment && (yyval.interm.type).qualifier.storage == EvqVaryingIn))) (yyval.interm.type).qualifier.smooth = true; } -#line 6564 "MachineIndependent/glslang_tab.cpp" +#line 6560 "MachineIndependent/glslang_tab.cpp" break; case 137: /* invariant_qualifier: INVARIANT */ @@ -6571,7 +6567,7 @@ yyreduce: (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.invariant = true; } -#line 6575 "MachineIndependent/glslang_tab.cpp" +#line 6571 "MachineIndependent/glslang_tab.cpp" break; case 138: /* interpolation_qualifier: SMOOTH */ @@ -6583,7 +6579,7 @@ yyreduce: (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.smooth = true; } -#line 6587 "MachineIndependent/glslang_tab.cpp" +#line 6583 "MachineIndependent/glslang_tab.cpp" break; case 139: /* interpolation_qualifier: FLAT */ @@ -6595,7 +6591,7 @@ yyreduce: (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.flat = true; } -#line 6599 "MachineIndependent/glslang_tab.cpp" +#line 6595 "MachineIndependent/glslang_tab.cpp" break; case 140: /* interpolation_qualifier: NOPERSPECTIVE */ @@ -6607,7 +6603,7 @@ yyreduce: (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.nopersp = true; } -#line 6611 "MachineIndependent/glslang_tab.cpp" +#line 6607 "MachineIndependent/glslang_tab.cpp" break; case 141: /* interpolation_qualifier: EXPLICITINTERPAMD */ @@ -6619,7 +6615,7 @@ yyreduce: (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.explicitInterp = true; } -#line 6623 "MachineIndependent/glslang_tab.cpp" +#line 6619 "MachineIndependent/glslang_tab.cpp" break; case 142: /* interpolation_qualifier: PERVERTEXNV */ @@ -6632,24 +6628,11 @@ yyreduce: (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.pervertexNV = true; } -#line 6636 "MachineIndependent/glslang_tab.cpp" +#line 6632 "MachineIndependent/glslang_tab.cpp" break; - case 143: /* interpolation_qualifier: PERVERTEXEXT */ + case 143: /* interpolation_qualifier: PERPRIMITIVENV */ #line 1293 "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"); - parseContext.profileRequires((yyvsp[0].lex).loc, ECompatibilityProfile, 0, E_GL_EXT_fragment_shader_barycentric, "fragment shader barycentric"); - parseContext.profileRequires((yyvsp[0].lex).loc, EEsProfile, 0, E_GL_EXT_fragment_shader_barycentric, "fragment shader barycentric"); - (yyval.interm.type).init((yyvsp[0].lex).loc); - (yyval.interm.type).qualifier.pervertexEXT = true; - } -#line 6649 "MachineIndependent/glslang_tab.cpp" - break; - - case 144: /* interpolation_qualifier: PERPRIMITIVENV */ -#line 1301 "MachineIndependent/glslang.y" { // No need for profile version or extension check. Shader stage already checks both. parseContext.globalCheck((yyvsp[0].lex).loc, "perprimitiveNV"); @@ -6660,11 +6643,11 @@ yyreduce: (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.perPrimitiveNV = true; } -#line 6664 "MachineIndependent/glslang_tab.cpp" +#line 6647 "MachineIndependent/glslang_tab.cpp" break; - case 145: /* interpolation_qualifier: PERVIEWNV */ -#line 1311 "MachineIndependent/glslang.y" + case 144: /* interpolation_qualifier: PERVIEWNV */ +#line 1303 "MachineIndependent/glslang.y" { // No need for profile version or extension check. Shader stage already checks both. parseContext.globalCheck((yyvsp[0].lex).loc, "perviewNV"); @@ -6672,11 +6655,11 @@ yyreduce: (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.perViewNV = true; } -#line 6676 "MachineIndependent/glslang_tab.cpp" +#line 6659 "MachineIndependent/glslang_tab.cpp" break; - case 146: /* interpolation_qualifier: PERTASKNV */ -#line 1318 "MachineIndependent/glslang.y" + case 145: /* interpolation_qualifier: PERTASKNV */ +#line 1310 "MachineIndependent/glslang.y" { // No need for profile version or extension check. Shader stage already checks both. parseContext.globalCheck((yyvsp[0].lex).loc, "taskNV"); @@ -6684,84 +6667,84 @@ yyreduce: (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.perTaskNV = true; } -#line 6688 "MachineIndependent/glslang_tab.cpp" +#line 6671 "MachineIndependent/glslang_tab.cpp" break; - case 147: /* layout_qualifier: LAYOUT LEFT_PAREN layout_qualifier_id_list RIGHT_PAREN */ -#line 1329 "MachineIndependent/glslang.y" + case 146: /* layout_qualifier: LAYOUT LEFT_PAREN layout_qualifier_id_list RIGHT_PAREN */ +#line 1321 "MachineIndependent/glslang.y" { (yyval.interm.type) = (yyvsp[-1].interm.type); } -#line 6696 "MachineIndependent/glslang_tab.cpp" +#line 6679 "MachineIndependent/glslang_tab.cpp" break; - case 148: /* layout_qualifier_id_list: layout_qualifier_id */ -#line 1335 "MachineIndependent/glslang.y" + case 147: /* layout_qualifier_id_list: layout_qualifier_id */ +#line 1327 "MachineIndependent/glslang.y" { (yyval.interm.type) = (yyvsp[0].interm.type); } -#line 6704 "MachineIndependent/glslang_tab.cpp" +#line 6687 "MachineIndependent/glslang_tab.cpp" break; - case 149: /* layout_qualifier_id_list: layout_qualifier_id_list COMMA layout_qualifier_id */ -#line 1338 "MachineIndependent/glslang.y" + case 148: /* layout_qualifier_id_list: layout_qualifier_id_list COMMA layout_qualifier_id */ +#line 1330 "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 6714 "MachineIndependent/glslang_tab.cpp" +#line 6697 "MachineIndependent/glslang_tab.cpp" break; - case 150: /* layout_qualifier_id: IDENTIFIER */ -#line 1345 "MachineIndependent/glslang.y" + case 149: /* layout_qualifier_id: IDENTIFIER */ +#line 1337 "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 6723 "MachineIndependent/glslang_tab.cpp" +#line 6706 "MachineIndependent/glslang_tab.cpp" break; - case 151: /* layout_qualifier_id: IDENTIFIER EQUAL constant_expression */ -#line 1349 "MachineIndependent/glslang.y" + case 150: /* layout_qualifier_id: IDENTIFIER EQUAL constant_expression */ +#line 1341 "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 6732 "MachineIndependent/glslang_tab.cpp" +#line 6715 "MachineIndependent/glslang_tab.cpp" break; - case 152: /* layout_qualifier_id: SHARED */ -#line 1353 "MachineIndependent/glslang.y" + case 151: /* layout_qualifier_id: SHARED */ +#line 1345 "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 6742 "MachineIndependent/glslang_tab.cpp" +#line 6725 "MachineIndependent/glslang_tab.cpp" break; - case 153: /* precise_qualifier: PRECISE */ -#line 1362 "MachineIndependent/glslang.y" + case 152: /* precise_qualifier: PRECISE */ +#line 1354 "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 6753 "MachineIndependent/glslang_tab.cpp" +#line 6736 "MachineIndependent/glslang_tab.cpp" break; - case 154: /* type_qualifier: single_type_qualifier */ -#line 1372 "MachineIndependent/glslang.y" + case 153: /* type_qualifier: single_type_qualifier */ +#line 1364 "MachineIndependent/glslang.y" { (yyval.interm.type) = (yyvsp[0].interm.type); } -#line 6761 "MachineIndependent/glslang_tab.cpp" +#line 6744 "MachineIndependent/glslang_tab.cpp" break; - case 155: /* type_qualifier: type_qualifier single_type_qualifier */ -#line 1375 "MachineIndependent/glslang.y" + case 154: /* type_qualifier: type_qualifier single_type_qualifier */ +#line 1367 "MachineIndependent/glslang.y" { (yyval.interm.type) = (yyvsp[-1].interm.type); if ((yyval.interm.type).basicType == EbtVoid) @@ -6770,151 +6753,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 6774 "MachineIndependent/glslang_tab.cpp" +#line 6757 "MachineIndependent/glslang_tab.cpp" break; - case 156: /* single_type_qualifier: storage_qualifier */ -#line 1386 "MachineIndependent/glslang.y" + case 155: /* single_type_qualifier: storage_qualifier */ +#line 1378 "MachineIndependent/glslang.y" { (yyval.interm.type) = (yyvsp[0].interm.type); } +#line 6765 "MachineIndependent/glslang_tab.cpp" + break; + + case 156: /* single_type_qualifier: layout_qualifier */ +#line 1381 "MachineIndependent/glslang.y" + { + (yyval.interm.type) = (yyvsp[0].interm.type); + } +#line 6773 "MachineIndependent/glslang_tab.cpp" + break; + + case 157: /* single_type_qualifier: precision_qualifier */ +#line 1384 "MachineIndependent/glslang.y" + { + parseContext.checkPrecisionQualifier((yyvsp[0].interm.type).loc, (yyvsp[0].interm.type).qualifier.precision); + (yyval.interm.type) = (yyvsp[0].interm.type); + } #line 6782 "MachineIndependent/glslang_tab.cpp" break; - case 157: /* single_type_qualifier: layout_qualifier */ -#line 1389 "MachineIndependent/glslang.y" - { - (yyval.interm.type) = (yyvsp[0].interm.type); - } -#line 6790 "MachineIndependent/glslang_tab.cpp" - break; - - case 158: /* single_type_qualifier: precision_qualifier */ -#line 1392 "MachineIndependent/glslang.y" - { - parseContext.checkPrecisionQualifier((yyvsp[0].interm.type).loc, (yyvsp[0].interm.type).qualifier.precision); - (yyval.interm.type) = (yyvsp[0].interm.type); - } -#line 6799 "MachineIndependent/glslang_tab.cpp" - break; - - case 159: /* single_type_qualifier: interpolation_qualifier */ -#line 1396 "MachineIndependent/glslang.y" + case 158: /* single_type_qualifier: interpolation_qualifier */ +#line 1388 "MachineIndependent/glslang.y" { // allow inheritance of storage qualifier from block declaration (yyval.interm.type) = (yyvsp[0].interm.type); } -#line 6808 "MachineIndependent/glslang_tab.cpp" +#line 6791 "MachineIndependent/glslang_tab.cpp" break; - case 160: /* single_type_qualifier: invariant_qualifier */ -#line 1400 "MachineIndependent/glslang.y" + case 159: /* single_type_qualifier: invariant_qualifier */ +#line 1392 "MachineIndependent/glslang.y" { // allow inheritance of storage qualifier from block declaration (yyval.interm.type) = (yyvsp[0].interm.type); } +#line 6800 "MachineIndependent/glslang_tab.cpp" + break; + + case 160: /* single_type_qualifier: precise_qualifier */ +#line 1397 "MachineIndependent/glslang.y" + { + // allow inheritance of storage qualifier from block declaration + (yyval.interm.type) = (yyvsp[0].interm.type); + } +#line 6809 "MachineIndependent/glslang_tab.cpp" + break; + + case 161: /* single_type_qualifier: non_uniform_qualifier */ +#line 1401 "MachineIndependent/glslang.y" + { + (yyval.interm.type) = (yyvsp[0].interm.type); + } #line 6817 "MachineIndependent/glslang_tab.cpp" break; - case 161: /* single_type_qualifier: precise_qualifier */ -#line 1405 "MachineIndependent/glslang.y" - { - // allow inheritance of storage qualifier from block declaration - (yyval.interm.type) = (yyvsp[0].interm.type); - } -#line 6826 "MachineIndependent/glslang_tab.cpp" - break; - - case 162: /* single_type_qualifier: non_uniform_qualifier */ -#line 1409 "MachineIndependent/glslang.y" - { - (yyval.interm.type) = (yyvsp[0].interm.type); - } -#line 6834 "MachineIndependent/glslang_tab.cpp" - break; - - case 163: /* single_type_qualifier: spirv_storage_class_qualifier */ -#line 1412 "MachineIndependent/glslang.y" + case 162: /* single_type_qualifier: spirv_storage_class_qualifier */ +#line 1404 "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 6844 "MachineIndependent/glslang_tab.cpp" +#line 6827 "MachineIndependent/glslang_tab.cpp" break; - case 164: /* single_type_qualifier: spirv_decorate_qualifier */ -#line 1417 "MachineIndependent/glslang.y" + case 163: /* single_type_qualifier: spirv_decorate_qualifier */ +#line 1409 "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 6853 "MachineIndependent/glslang_tab.cpp" +#line 6836 "MachineIndependent/glslang_tab.cpp" break; - case 165: /* single_type_qualifier: SPIRV_BY_REFERENCE */ -#line 1421 "MachineIndependent/glslang.y" + case 164: /* single_type_qualifier: SPIRV_BY_REFERENCE */ +#line 1413 "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 6863 "MachineIndependent/glslang_tab.cpp" +#line 6846 "MachineIndependent/glslang_tab.cpp" break; - case 166: /* single_type_qualifier: SPIRV_LITERAL */ -#line 1426 "MachineIndependent/glslang.y" + case 165: /* single_type_qualifier: SPIRV_LITERAL */ +#line 1418 "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 6873 "MachineIndependent/glslang_tab.cpp" +#line 6856 "MachineIndependent/glslang_tab.cpp" break; - case 167: /* storage_qualifier: CONST */ -#line 1435 "MachineIndependent/glslang.y" + case 166: /* storage_qualifier: CONST */ +#line 1427 "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 6882 "MachineIndependent/glslang_tab.cpp" +#line 6865 "MachineIndependent/glslang_tab.cpp" break; - case 168: /* storage_qualifier: INOUT */ -#line 1439 "MachineIndependent/glslang.y" + case 167: /* storage_qualifier: INOUT */ +#line 1431 "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 6892 "MachineIndependent/glslang_tab.cpp" +#line 6875 "MachineIndependent/glslang_tab.cpp" break; - case 169: /* storage_qualifier: IN */ -#line 1444 "MachineIndependent/glslang.y" + case 168: /* storage_qualifier: IN */ +#line 1436 "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 6903 "MachineIndependent/glslang_tab.cpp" +#line 6886 "MachineIndependent/glslang_tab.cpp" break; - case 170: /* storage_qualifier: OUT */ -#line 1450 "MachineIndependent/glslang.y" + case 169: /* storage_qualifier: OUT */ +#line 1442 "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 6914 "MachineIndependent/glslang_tab.cpp" +#line 6897 "MachineIndependent/glslang_tab.cpp" break; - case 171: /* storage_qualifier: CENTROID */ -#line 1456 "MachineIndependent/glslang.y" + case 170: /* storage_qualifier: CENTROID */ +#line 1448 "MachineIndependent/glslang.y" { parseContext.profileRequires((yyvsp[0].lex).loc, ENoProfile, 120, 0, "centroid"); parseContext.profileRequires((yyvsp[0].lex).loc, EEsProfile, 300, 0, "centroid"); @@ -6922,21 +6905,21 @@ yyreduce: (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.centroid = true; } -#line 6926 "MachineIndependent/glslang_tab.cpp" +#line 6909 "MachineIndependent/glslang_tab.cpp" break; - case 172: /* storage_qualifier: UNIFORM */ -#line 1463 "MachineIndependent/glslang.y" + case 171: /* storage_qualifier: UNIFORM */ +#line 1455 "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 6936 "MachineIndependent/glslang_tab.cpp" +#line 6919 "MachineIndependent/glslang_tab.cpp" break; - case 173: /* storage_qualifier: SHARED */ -#line 1468 "MachineIndependent/glslang.y" + case 172: /* storage_qualifier: SHARED */ +#line 1460 "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"); @@ -6945,21 +6928,21 @@ yyreduce: (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.storage = EvqShared; } -#line 6949 "MachineIndependent/glslang_tab.cpp" +#line 6932 "MachineIndependent/glslang_tab.cpp" break; - case 174: /* storage_qualifier: BUFFER */ -#line 1476 "MachineIndependent/glslang.y" + case 173: /* storage_qualifier: BUFFER */ +#line 1468 "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 6959 "MachineIndependent/glslang_tab.cpp" +#line 6942 "MachineIndependent/glslang_tab.cpp" break; - case 175: /* storage_qualifier: ATTRIBUTE */ -#line 1482 "MachineIndependent/glslang.y" + case 174: /* storage_qualifier: ATTRIBUTE */ +#line 1474 "MachineIndependent/glslang.y" { parseContext.requireStage((yyvsp[0].lex).loc, EShLangVertex, "attribute"); parseContext.checkDeprecated((yyvsp[0].lex).loc, ECoreProfile, 130, "attribute"); @@ -6972,11 +6955,11 @@ yyreduce: (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.storage = EvqVaryingIn; } -#line 6976 "MachineIndependent/glslang_tab.cpp" +#line 6959 "MachineIndependent/glslang_tab.cpp" break; - case 176: /* storage_qualifier: VARYING */ -#line 1494 "MachineIndependent/glslang.y" + case 175: /* storage_qualifier: VARYING */ +#line 1486 "MachineIndependent/glslang.y" { parseContext.checkDeprecated((yyvsp[0].lex).loc, ENoProfile, 130, "varying"); parseContext.checkDeprecated((yyvsp[0].lex).loc, ECoreProfile, 130, "varying"); @@ -6991,32 +6974,32 @@ yyreduce: else (yyval.interm.type).qualifier.storage = EvqVaryingIn; } -#line 6995 "MachineIndependent/glslang_tab.cpp" +#line 6978 "MachineIndependent/glslang_tab.cpp" break; - case 177: /* storage_qualifier: PATCH */ -#line 1508 "MachineIndependent/glslang.y" + case 176: /* storage_qualifier: PATCH */ +#line 1500 "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 7006 "MachineIndependent/glslang_tab.cpp" +#line 6989 "MachineIndependent/glslang_tab.cpp" break; - case 178: /* storage_qualifier: SAMPLE */ -#line 1514 "MachineIndependent/glslang.y" + case 177: /* storage_qualifier: SAMPLE */ +#line 1506 "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 7016 "MachineIndependent/glslang_tab.cpp" +#line 6999 "MachineIndependent/glslang_tab.cpp" break; - case 179: /* storage_qualifier: HITATTRNV */ -#line 1519 "MachineIndependent/glslang.y" + case 178: /* storage_qualifier: HITATTRNV */ +#line 1511 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "hitAttributeNV"); parseContext.requireStage((yyvsp[0].lex).loc, (EShLanguageMask)(EShLangIntersectMask | EShLangClosestHitMask @@ -7025,11 +7008,11 @@ yyreduce: (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.storage = EvqHitAttr; } -#line 7029 "MachineIndependent/glslang_tab.cpp" +#line 7012 "MachineIndependent/glslang_tab.cpp" break; - case 180: /* storage_qualifier: HITATTREXT */ -#line 1527 "MachineIndependent/glslang.y" + case 179: /* storage_qualifier: HITATTREXT */ +#line 1519 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "hitAttributeEXT"); parseContext.requireStage((yyvsp[0].lex).loc, (EShLanguageMask)(EShLangIntersectMask | EShLangClosestHitMask @@ -7038,11 +7021,11 @@ yyreduce: (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.storage = EvqHitAttr; } -#line 7042 "MachineIndependent/glslang_tab.cpp" +#line 7025 "MachineIndependent/glslang_tab.cpp" break; - case 181: /* storage_qualifier: PAYLOADNV */ -#line 1535 "MachineIndependent/glslang.y" + case 180: /* storage_qualifier: PAYLOADNV */ +#line 1527 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "rayPayloadNV"); parseContext.requireStage((yyvsp[0].lex).loc, (EShLanguageMask)(EShLangRayGenMask | EShLangClosestHitMask | @@ -7051,11 +7034,11 @@ yyreduce: (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.storage = EvqPayload; } -#line 7055 "MachineIndependent/glslang_tab.cpp" +#line 7038 "MachineIndependent/glslang_tab.cpp" break; - case 182: /* storage_qualifier: PAYLOADEXT */ -#line 1543 "MachineIndependent/glslang.y" + case 181: /* storage_qualifier: PAYLOADEXT */ +#line 1535 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "rayPayloadEXT"); parseContext.requireStage((yyvsp[0].lex).loc, (EShLanguageMask)(EShLangRayGenMask | EShLangClosestHitMask | @@ -7064,11 +7047,11 @@ yyreduce: (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.storage = EvqPayload; } -#line 7068 "MachineIndependent/glslang_tab.cpp" +#line 7051 "MachineIndependent/glslang_tab.cpp" break; - case 183: /* storage_qualifier: PAYLOADINNV */ -#line 1551 "MachineIndependent/glslang.y" + case 182: /* storage_qualifier: PAYLOADINNV */ +#line 1543 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "rayPayloadInNV"); parseContext.requireStage((yyvsp[0].lex).loc, (EShLanguageMask)(EShLangClosestHitMask | @@ -7077,11 +7060,11 @@ yyreduce: (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.storage = EvqPayloadIn; } -#line 7081 "MachineIndependent/glslang_tab.cpp" +#line 7064 "MachineIndependent/glslang_tab.cpp" break; - case 184: /* storage_qualifier: PAYLOADINEXT */ -#line 1559 "MachineIndependent/glslang.y" + case 183: /* storage_qualifier: PAYLOADINEXT */ +#line 1551 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "rayPayloadInEXT"); parseContext.requireStage((yyvsp[0].lex).loc, (EShLanguageMask)(EShLangClosestHitMask | @@ -7090,11 +7073,11 @@ yyreduce: (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.storage = EvqPayloadIn; } -#line 7094 "MachineIndependent/glslang_tab.cpp" +#line 7077 "MachineIndependent/glslang_tab.cpp" break; - case 185: /* storage_qualifier: CALLDATANV */ -#line 1567 "MachineIndependent/glslang.y" + case 184: /* storage_qualifier: CALLDATANV */ +#line 1559 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "callableDataNV"); parseContext.requireStage((yyvsp[0].lex).loc, (EShLanguageMask)(EShLangRayGenMask | @@ -7103,11 +7086,11 @@ yyreduce: (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.storage = EvqCallableData; } -#line 7107 "MachineIndependent/glslang_tab.cpp" +#line 7090 "MachineIndependent/glslang_tab.cpp" break; - case 186: /* storage_qualifier: CALLDATAEXT */ -#line 1575 "MachineIndependent/glslang.y" + case 185: /* storage_qualifier: CALLDATAEXT */ +#line 1567 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "callableDataEXT"); parseContext.requireStage((yyvsp[0].lex).loc, (EShLanguageMask)(EShLangRayGenMask | @@ -7116,11 +7099,11 @@ yyreduce: (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.storage = EvqCallableData; } -#line 7120 "MachineIndependent/glslang_tab.cpp" +#line 7103 "MachineIndependent/glslang_tab.cpp" break; - case 187: /* storage_qualifier: CALLDATAINNV */ -#line 1583 "MachineIndependent/glslang.y" + case 186: /* storage_qualifier: CALLDATAINNV */ +#line 1575 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "callableDataInNV"); parseContext.requireStage((yyvsp[0].lex).loc, (EShLanguageMask)(EShLangCallableMask), "callableDataInNV"); @@ -7128,11 +7111,11 @@ yyreduce: (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.storage = EvqCallableDataIn; } -#line 7132 "MachineIndependent/glslang_tab.cpp" +#line 7115 "MachineIndependent/glslang_tab.cpp" break; - case 188: /* storage_qualifier: CALLDATAINEXT */ -#line 1590 "MachineIndependent/glslang.y" + case 187: /* storage_qualifier: CALLDATAINEXT */ +#line 1582 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "callableDataInEXT"); parseContext.requireStage((yyvsp[0].lex).loc, (EShLanguageMask)(EShLangCallableMask), "callableDataInEXT"); @@ -7140,175 +7123,175 @@ yyreduce: (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.storage = EvqCallableDataIn; } -#line 7144 "MachineIndependent/glslang_tab.cpp" +#line 7127 "MachineIndependent/glslang_tab.cpp" break; - case 189: /* storage_qualifier: COHERENT */ -#line 1597 "MachineIndependent/glslang.y" + case 188: /* storage_qualifier: COHERENT */ +#line 1589 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.coherent = true; } -#line 7153 "MachineIndependent/glslang_tab.cpp" +#line 7136 "MachineIndependent/glslang_tab.cpp" break; - case 190: /* storage_qualifier: DEVICECOHERENT */ -#line 1601 "MachineIndependent/glslang.y" + case 189: /* storage_qualifier: DEVICECOHERENT */ +#line 1593 "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 7163 "MachineIndependent/glslang_tab.cpp" +#line 7146 "MachineIndependent/glslang_tab.cpp" break; - case 191: /* storage_qualifier: QUEUEFAMILYCOHERENT */ -#line 1606 "MachineIndependent/glslang.y" + case 190: /* storage_qualifier: QUEUEFAMILYCOHERENT */ +#line 1598 "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 7173 "MachineIndependent/glslang_tab.cpp" +#line 7156 "MachineIndependent/glslang_tab.cpp" break; - case 192: /* storage_qualifier: WORKGROUPCOHERENT */ -#line 1611 "MachineIndependent/glslang.y" + case 191: /* storage_qualifier: WORKGROUPCOHERENT */ +#line 1603 "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 7183 "MachineIndependent/glslang_tab.cpp" +#line 7166 "MachineIndependent/glslang_tab.cpp" break; - case 193: /* storage_qualifier: SUBGROUPCOHERENT */ -#line 1616 "MachineIndependent/glslang.y" + case 192: /* storage_qualifier: SUBGROUPCOHERENT */ +#line 1608 "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 7193 "MachineIndependent/glslang_tab.cpp" +#line 7176 "MachineIndependent/glslang_tab.cpp" break; - case 194: /* storage_qualifier: NONPRIVATE */ -#line 1621 "MachineIndependent/glslang.y" + case 193: /* storage_qualifier: NONPRIVATE */ +#line 1613 "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 7203 "MachineIndependent/glslang_tab.cpp" +#line 7186 "MachineIndependent/glslang_tab.cpp" break; - case 195: /* storage_qualifier: SHADERCALLCOHERENT */ -#line 1626 "MachineIndependent/glslang.y" + case 194: /* storage_qualifier: SHADERCALLCOHERENT */ +#line 1618 "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 7213 "MachineIndependent/glslang_tab.cpp" +#line 7196 "MachineIndependent/glslang_tab.cpp" break; - case 196: /* storage_qualifier: VOLATILE */ -#line 1631 "MachineIndependent/glslang.y" + case 195: /* storage_qualifier: VOLATILE */ +#line 1623 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.volatil = true; } -#line 7222 "MachineIndependent/glslang_tab.cpp" +#line 7205 "MachineIndependent/glslang_tab.cpp" break; - case 197: /* storage_qualifier: RESTRICT */ -#line 1635 "MachineIndependent/glslang.y" + case 196: /* storage_qualifier: RESTRICT */ +#line 1627 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.restrict = true; } -#line 7231 "MachineIndependent/glslang_tab.cpp" +#line 7214 "MachineIndependent/glslang_tab.cpp" break; - case 198: /* storage_qualifier: READONLY */ -#line 1639 "MachineIndependent/glslang.y" + case 197: /* storage_qualifier: READONLY */ +#line 1631 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.readonly = true; } -#line 7240 "MachineIndependent/glslang_tab.cpp" +#line 7223 "MachineIndependent/glslang_tab.cpp" break; - case 199: /* storage_qualifier: WRITEONLY */ -#line 1643 "MachineIndependent/glslang.y" + case 198: /* storage_qualifier: WRITEONLY */ +#line 1635 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.writeonly = true; } -#line 7249 "MachineIndependent/glslang_tab.cpp" +#line 7232 "MachineIndependent/glslang_tab.cpp" break; - case 200: /* storage_qualifier: SUBROUTINE */ -#line 1647 "MachineIndependent/glslang.y" + case 199: /* storage_qualifier: SUBROUTINE */ +#line 1639 "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 7260 "MachineIndependent/glslang_tab.cpp" +#line 7243 "MachineIndependent/glslang_tab.cpp" break; - case 201: /* storage_qualifier: SUBROUTINE LEFT_PAREN type_name_list RIGHT_PAREN */ -#line 1653 "MachineIndependent/glslang.y" + case 200: /* storage_qualifier: SUBROUTINE LEFT_PAREN type_name_list RIGHT_PAREN */ +#line 1645 "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 7271 "MachineIndependent/glslang_tab.cpp" +#line 7254 "MachineIndependent/glslang_tab.cpp" break; - case 202: /* non_uniform_qualifier: NONUNIFORM */ -#line 1664 "MachineIndependent/glslang.y" + case 201: /* non_uniform_qualifier: NONUNIFORM */ +#line 1656 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.nonUniform = true; } -#line 7280 "MachineIndependent/glslang_tab.cpp" +#line 7263 "MachineIndependent/glslang_tab.cpp" break; - case 203: /* type_name_list: IDENTIFIER */ -#line 1671 "MachineIndependent/glslang.y" + case 202: /* type_name_list: IDENTIFIER */ +#line 1663 "MachineIndependent/glslang.y" { // TODO } -#line 7288 "MachineIndependent/glslang_tab.cpp" +#line 7271 "MachineIndependent/glslang_tab.cpp" break; - case 204: /* type_name_list: type_name_list COMMA IDENTIFIER */ -#line 1674 "MachineIndependent/glslang.y" + case 203: /* type_name_list: type_name_list COMMA IDENTIFIER */ +#line 1666 "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 7298 "MachineIndependent/glslang_tab.cpp" +#line 7281 "MachineIndependent/glslang_tab.cpp" break; - case 205: /* type_specifier: type_specifier_nonarray type_parameter_specifier_opt */ -#line 1683 "MachineIndependent/glslang.y" + case 204: /* type_specifier: type_specifier_nonarray type_parameter_specifier_opt */ +#line 1675 "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); } -#line 7308 "MachineIndependent/glslang_tab.cpp" +#line 7291 "MachineIndependent/glslang_tab.cpp" break; - case 206: /* type_specifier: type_specifier_nonarray type_parameter_specifier_opt array_specifier */ -#line 1688 "MachineIndependent/glslang.y" + case 205: /* type_specifier: type_specifier_nonarray type_parameter_specifier_opt array_specifier */ +#line 1680 "MachineIndependent/glslang.y" { parseContext.arrayOfArrayVersionCheck((yyvsp[0].interm).loc, (yyvsp[0].interm).arraySizes); (yyval.interm.type) = (yyvsp[-2].interm.type); @@ -7316,21 +7299,21 @@ yyreduce: (yyval.interm.type).typeParameters = (yyvsp[-1].interm.typeParameters); (yyval.interm.type).arraySizes = (yyvsp[0].interm).arraySizes; } -#line 7320 "MachineIndependent/glslang_tab.cpp" +#line 7303 "MachineIndependent/glslang_tab.cpp" break; - case 207: /* array_specifier: LEFT_BRACKET RIGHT_BRACKET */ -#line 1698 "MachineIndependent/glslang.y" + case 206: /* array_specifier: LEFT_BRACKET RIGHT_BRACKET */ +#line 1690 "MachineIndependent/glslang.y" { (yyval.interm).loc = (yyvsp[-1].lex).loc; (yyval.interm).arraySizes = new TArraySizes; (yyval.interm).arraySizes->addInnerSize(); } -#line 7330 "MachineIndependent/glslang_tab.cpp" +#line 7313 "MachineIndependent/glslang_tab.cpp" break; - case 208: /* array_specifier: LEFT_BRACKET conditional_expression RIGHT_BRACKET */ -#line 1703 "MachineIndependent/glslang.y" + case 207: /* array_specifier: LEFT_BRACKET conditional_expression RIGHT_BRACKET */ +#line 1695 "MachineIndependent/glslang.y" { (yyval.interm).loc = (yyvsp[-2].lex).loc; (yyval.interm).arraySizes = new TArraySizes; @@ -7339,20 +7322,20 @@ yyreduce: parseContext.arraySizeCheck((yyvsp[-1].interm.intermTypedNode)->getLoc(), (yyvsp[-1].interm.intermTypedNode), size, "array size"); (yyval.interm).arraySizes->addInnerSize(size); } -#line 7343 "MachineIndependent/glslang_tab.cpp" +#line 7326 "MachineIndependent/glslang_tab.cpp" break; - case 209: /* array_specifier: array_specifier LEFT_BRACKET RIGHT_BRACKET */ -#line 1711 "MachineIndependent/glslang.y" + case 208: /* array_specifier: array_specifier LEFT_BRACKET RIGHT_BRACKET */ +#line 1703 "MachineIndependent/glslang.y" { (yyval.interm) = (yyvsp[-2].interm); (yyval.interm).arraySizes->addInnerSize(); } -#line 7352 "MachineIndependent/glslang_tab.cpp" +#line 7335 "MachineIndependent/glslang_tab.cpp" break; - case 210: /* array_specifier: array_specifier LEFT_BRACKET conditional_expression RIGHT_BRACKET */ -#line 1715 "MachineIndependent/glslang.y" + case 209: /* array_specifier: array_specifier LEFT_BRACKET conditional_expression RIGHT_BRACKET */ +#line 1707 "MachineIndependent/glslang.y" { (yyval.interm) = (yyvsp[-3].interm); @@ -7360,35 +7343,35 @@ yyreduce: parseContext.arraySizeCheck((yyvsp[-1].interm.intermTypedNode)->getLoc(), (yyvsp[-1].interm.intermTypedNode), size, "array size"); (yyval.interm).arraySizes->addInnerSize(size); } -#line 7364 "MachineIndependent/glslang_tab.cpp" +#line 7347 "MachineIndependent/glslang_tab.cpp" break; - case 211: /* type_parameter_specifier_opt: type_parameter_specifier */ -#line 1725 "MachineIndependent/glslang.y" + case 210: /* type_parameter_specifier_opt: type_parameter_specifier */ +#line 1717 "MachineIndependent/glslang.y" { (yyval.interm.typeParameters) = (yyvsp[0].interm.typeParameters); } -#line 7372 "MachineIndependent/glslang_tab.cpp" +#line 7355 "MachineIndependent/glslang_tab.cpp" break; - case 212: /* type_parameter_specifier_opt: %empty */ -#line 1728 "MachineIndependent/glslang.y" + case 211: /* type_parameter_specifier_opt: %empty */ +#line 1720 "MachineIndependent/glslang.y" { (yyval.interm.typeParameters) = 0; } -#line 7380 "MachineIndependent/glslang_tab.cpp" +#line 7363 "MachineIndependent/glslang_tab.cpp" break; - case 213: /* type_parameter_specifier: LEFT_ANGLE type_parameter_specifier_list RIGHT_ANGLE */ -#line 1734 "MachineIndependent/glslang.y" + case 212: /* type_parameter_specifier: LEFT_ANGLE type_parameter_specifier_list RIGHT_ANGLE */ +#line 1726 "MachineIndependent/glslang.y" { (yyval.interm.typeParameters) = (yyvsp[-1].interm.typeParameters); } -#line 7388 "MachineIndependent/glslang_tab.cpp" +#line 7371 "MachineIndependent/glslang_tab.cpp" break; - case 214: /* type_parameter_specifier_list: unary_expression */ -#line 1740 "MachineIndependent/glslang.y" + case 213: /* type_parameter_specifier_list: unary_expression */ +#line 1732 "MachineIndependent/glslang.y" { (yyval.interm.typeParameters) = new TArraySizes; @@ -7396,11 +7379,11 @@ yyreduce: parseContext.arraySizeCheck((yyvsp[0].interm.intermTypedNode)->getLoc(), (yyvsp[0].interm.intermTypedNode), size, "type parameter"); (yyval.interm.typeParameters)->addInnerSize(size); } -#line 7400 "MachineIndependent/glslang_tab.cpp" +#line 7383 "MachineIndependent/glslang_tab.cpp" break; - case 215: /* type_parameter_specifier_list: type_parameter_specifier_list COMMA unary_expression */ -#line 1747 "MachineIndependent/glslang.y" + case 214: /* type_parameter_specifier_list: type_parameter_specifier_list COMMA unary_expression */ +#line 1739 "MachineIndependent/glslang.y" { (yyval.interm.typeParameters) = (yyvsp[-2].interm.typeParameters); @@ -7408,300 +7391,300 @@ yyreduce: parseContext.arraySizeCheck((yyvsp[0].interm.intermTypedNode)->getLoc(), (yyvsp[0].interm.intermTypedNode), size, "type parameter"); (yyval.interm.typeParameters)->addInnerSize(size); } -#line 7412 "MachineIndependent/glslang_tab.cpp" +#line 7395 "MachineIndependent/glslang_tab.cpp" break; - case 216: /* type_specifier_nonarray: VOID */ -#line 1757 "MachineIndependent/glslang.y" + case 215: /* type_specifier_nonarray: VOID */ +#line 1749 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtVoid; } -#line 7421 "MachineIndependent/glslang_tab.cpp" +#line 7404 "MachineIndependent/glslang_tab.cpp" break; - case 217: /* type_specifier_nonarray: FLOAT */ -#line 1761 "MachineIndependent/glslang.y" + case 216: /* type_specifier_nonarray: FLOAT */ +#line 1753 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat; } -#line 7430 "MachineIndependent/glslang_tab.cpp" +#line 7413 "MachineIndependent/glslang_tab.cpp" break; - case 218: /* type_specifier_nonarray: INT */ -#line 1765 "MachineIndependent/glslang.y" + case 217: /* type_specifier_nonarray: INT */ +#line 1757 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtInt; } -#line 7439 "MachineIndependent/glslang_tab.cpp" +#line 7422 "MachineIndependent/glslang_tab.cpp" break; - case 219: /* type_specifier_nonarray: UINT */ -#line 1769 "MachineIndependent/glslang.y" + case 218: /* type_specifier_nonarray: UINT */ +#line 1761 "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 7449 "MachineIndependent/glslang_tab.cpp" +#line 7432 "MachineIndependent/glslang_tab.cpp" break; - case 220: /* type_specifier_nonarray: BOOL */ -#line 1774 "MachineIndependent/glslang.y" + case 219: /* type_specifier_nonarray: BOOL */ +#line 1766 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtBool; } -#line 7458 "MachineIndependent/glslang_tab.cpp" +#line 7441 "MachineIndependent/glslang_tab.cpp" break; - case 221: /* type_specifier_nonarray: VEC2 */ -#line 1778 "MachineIndependent/glslang.y" + case 220: /* type_specifier_nonarray: VEC2 */ +#line 1770 "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 7468 "MachineIndependent/glslang_tab.cpp" +#line 7451 "MachineIndependent/glslang_tab.cpp" break; - case 222: /* type_specifier_nonarray: VEC3 */ -#line 1783 "MachineIndependent/glslang.y" + case 221: /* type_specifier_nonarray: VEC3 */ +#line 1775 "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 7478 "MachineIndependent/glslang_tab.cpp" +#line 7461 "MachineIndependent/glslang_tab.cpp" break; - case 223: /* type_specifier_nonarray: VEC4 */ -#line 1788 "MachineIndependent/glslang.y" + case 222: /* type_specifier_nonarray: VEC4 */ +#line 1780 "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 7488 "MachineIndependent/glslang_tab.cpp" +#line 7471 "MachineIndependent/glslang_tab.cpp" break; - case 224: /* type_specifier_nonarray: BVEC2 */ -#line 1793 "MachineIndependent/glslang.y" + case 223: /* type_specifier_nonarray: BVEC2 */ +#line 1785 "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 7498 "MachineIndependent/glslang_tab.cpp" +#line 7481 "MachineIndependent/glslang_tab.cpp" break; - case 225: /* type_specifier_nonarray: BVEC3 */ -#line 1798 "MachineIndependent/glslang.y" + case 224: /* type_specifier_nonarray: BVEC3 */ +#line 1790 "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 7508 "MachineIndependent/glslang_tab.cpp" +#line 7491 "MachineIndependent/glslang_tab.cpp" break; - case 226: /* type_specifier_nonarray: BVEC4 */ -#line 1803 "MachineIndependent/glslang.y" + case 225: /* type_specifier_nonarray: BVEC4 */ +#line 1795 "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 7518 "MachineIndependent/glslang_tab.cpp" +#line 7501 "MachineIndependent/glslang_tab.cpp" break; - case 227: /* type_specifier_nonarray: IVEC2 */ -#line 1808 "MachineIndependent/glslang.y" + case 226: /* type_specifier_nonarray: IVEC2 */ +#line 1800 "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 7528 "MachineIndependent/glslang_tab.cpp" +#line 7511 "MachineIndependent/glslang_tab.cpp" break; - case 228: /* type_specifier_nonarray: IVEC3 */ -#line 1813 "MachineIndependent/glslang.y" + case 227: /* type_specifier_nonarray: IVEC3 */ +#line 1805 "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 7538 "MachineIndependent/glslang_tab.cpp" +#line 7521 "MachineIndependent/glslang_tab.cpp" break; - case 229: /* type_specifier_nonarray: IVEC4 */ -#line 1818 "MachineIndependent/glslang.y" + case 228: /* type_specifier_nonarray: IVEC4 */ +#line 1810 "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 7548 "MachineIndependent/glslang_tab.cpp" +#line 7531 "MachineIndependent/glslang_tab.cpp" break; - case 230: /* type_specifier_nonarray: UVEC2 */ -#line 1823 "MachineIndependent/glslang.y" + case 229: /* type_specifier_nonarray: UVEC2 */ +#line 1815 "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 7559 "MachineIndependent/glslang_tab.cpp" +#line 7542 "MachineIndependent/glslang_tab.cpp" break; - case 231: /* type_specifier_nonarray: UVEC3 */ -#line 1829 "MachineIndependent/glslang.y" + case 230: /* type_specifier_nonarray: UVEC3 */ +#line 1821 "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 7570 "MachineIndependent/glslang_tab.cpp" +#line 7553 "MachineIndependent/glslang_tab.cpp" break; - case 232: /* type_specifier_nonarray: UVEC4 */ -#line 1835 "MachineIndependent/glslang.y" + case 231: /* type_specifier_nonarray: UVEC4 */ +#line 1827 "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 7581 "MachineIndependent/glslang_tab.cpp" +#line 7564 "MachineIndependent/glslang_tab.cpp" break; - case 233: /* type_specifier_nonarray: MAT2 */ -#line 1841 "MachineIndependent/glslang.y" + case 232: /* type_specifier_nonarray: MAT2 */ +#line 1833 "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 7591 "MachineIndependent/glslang_tab.cpp" +#line 7574 "MachineIndependent/glslang_tab.cpp" break; - case 234: /* type_specifier_nonarray: MAT3 */ -#line 1846 "MachineIndependent/glslang.y" + case 233: /* type_specifier_nonarray: MAT3 */ +#line 1838 "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 7601 "MachineIndependent/glslang_tab.cpp" +#line 7584 "MachineIndependent/glslang_tab.cpp" break; - case 235: /* type_specifier_nonarray: MAT4 */ -#line 1851 "MachineIndependent/glslang.y" + case 234: /* type_specifier_nonarray: MAT4 */ +#line 1843 "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 7611 "MachineIndependent/glslang_tab.cpp" +#line 7594 "MachineIndependent/glslang_tab.cpp" break; - case 236: /* type_specifier_nonarray: MAT2X2 */ -#line 1856 "MachineIndependent/glslang.y" + case 235: /* type_specifier_nonarray: MAT2X2 */ +#line 1848 "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 7621 "MachineIndependent/glslang_tab.cpp" +#line 7604 "MachineIndependent/glslang_tab.cpp" break; - case 237: /* type_specifier_nonarray: MAT2X3 */ -#line 1861 "MachineIndependent/glslang.y" + case 236: /* type_specifier_nonarray: MAT2X3 */ +#line 1853 "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 7631 "MachineIndependent/glslang_tab.cpp" +#line 7614 "MachineIndependent/glslang_tab.cpp" break; - case 238: /* type_specifier_nonarray: MAT2X4 */ -#line 1866 "MachineIndependent/glslang.y" + case 237: /* type_specifier_nonarray: MAT2X4 */ +#line 1858 "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 7641 "MachineIndependent/glslang_tab.cpp" +#line 7624 "MachineIndependent/glslang_tab.cpp" break; - case 239: /* type_specifier_nonarray: MAT3X2 */ -#line 1871 "MachineIndependent/glslang.y" + case 238: /* type_specifier_nonarray: MAT3X2 */ +#line 1863 "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 7651 "MachineIndependent/glslang_tab.cpp" +#line 7634 "MachineIndependent/glslang_tab.cpp" break; - case 240: /* type_specifier_nonarray: MAT3X3 */ -#line 1876 "MachineIndependent/glslang.y" + case 239: /* type_specifier_nonarray: MAT3X3 */ +#line 1868 "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 7661 "MachineIndependent/glslang_tab.cpp" +#line 7644 "MachineIndependent/glslang_tab.cpp" break; - case 241: /* type_specifier_nonarray: MAT3X4 */ -#line 1881 "MachineIndependent/glslang.y" + case 240: /* type_specifier_nonarray: MAT3X4 */ +#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(3, 4); } -#line 7671 "MachineIndependent/glslang_tab.cpp" +#line 7654 "MachineIndependent/glslang_tab.cpp" break; - case 242: /* type_specifier_nonarray: MAT4X2 */ -#line 1886 "MachineIndependent/glslang.y" + case 241: /* type_specifier_nonarray: MAT4X2 */ +#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(4, 2); } -#line 7681 "MachineIndependent/glslang_tab.cpp" +#line 7664 "MachineIndependent/glslang_tab.cpp" break; - case 243: /* type_specifier_nonarray: MAT4X3 */ -#line 1891 "MachineIndependent/glslang.y" + case 242: /* type_specifier_nonarray: MAT4X3 */ +#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, 3); } -#line 7691 "MachineIndependent/glslang_tab.cpp" +#line 7674 "MachineIndependent/glslang_tab.cpp" break; - case 244: /* type_specifier_nonarray: MAT4X4 */ -#line 1896 "MachineIndependent/glslang.y" + case 243: /* type_specifier_nonarray: MAT4X4 */ +#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(4, 4); } -#line 7701 "MachineIndependent/glslang_tab.cpp" +#line 7684 "MachineIndependent/glslang_tab.cpp" break; - case 245: /* type_specifier_nonarray: DOUBLE */ -#line 1902 "MachineIndependent/glslang.y" + case 244: /* type_specifier_nonarray: DOUBLE */ +#line 1894 "MachineIndependent/glslang.y" { parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double"); if (! parseContext.symbolTable.atBuiltInLevel()) @@ -7709,120 +7692,133 @@ yyreduce: (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtDouble; } -#line 7713 "MachineIndependent/glslang_tab.cpp" +#line 7696 "MachineIndependent/glslang_tab.cpp" break; - case 246: /* type_specifier_nonarray: FLOAT16_T */ -#line 1909 "MachineIndependent/glslang.y" + case 245: /* type_specifier_nonarray: FLOAT16_T */ +#line 1901 "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 7723 "MachineIndependent/glslang_tab.cpp" +#line 7706 "MachineIndependent/glslang_tab.cpp" break; - case 247: /* type_specifier_nonarray: FLOAT32_T */ -#line 1914 "MachineIndependent/glslang.y" + case 246: /* type_specifier_nonarray: FLOAT32_T */ +#line 1906 "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 7733 "MachineIndependent/glslang_tab.cpp" +#line 7716 "MachineIndependent/glslang_tab.cpp" break; - case 248: /* type_specifier_nonarray: FLOAT64_T */ -#line 1919 "MachineIndependent/glslang.y" + case 247: /* type_specifier_nonarray: FLOAT64_T */ +#line 1911 "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 7743 "MachineIndependent/glslang_tab.cpp" +#line 7726 "MachineIndependent/glslang_tab.cpp" break; - case 249: /* type_specifier_nonarray: INT8_T */ -#line 1924 "MachineIndependent/glslang.y" + case 248: /* type_specifier_nonarray: INT8_T */ +#line 1916 "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 7753 "MachineIndependent/glslang_tab.cpp" +#line 7736 "MachineIndependent/glslang_tab.cpp" break; - case 250: /* type_specifier_nonarray: UINT8_T */ -#line 1929 "MachineIndependent/glslang.y" + case 249: /* type_specifier_nonarray: UINT8_T */ +#line 1921 "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 7763 "MachineIndependent/glslang_tab.cpp" +#line 7746 "MachineIndependent/glslang_tab.cpp" break; - case 251: /* type_specifier_nonarray: INT16_T */ -#line 1934 "MachineIndependent/glslang.y" + case 250: /* type_specifier_nonarray: INT16_T */ +#line 1926 "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 7773 "MachineIndependent/glslang_tab.cpp" +#line 7756 "MachineIndependent/glslang_tab.cpp" break; - case 252: /* type_specifier_nonarray: UINT16_T */ -#line 1939 "MachineIndependent/glslang.y" + case 251: /* type_specifier_nonarray: UINT16_T */ +#line 1931 "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 7783 "MachineIndependent/glslang_tab.cpp" +#line 7766 "MachineIndependent/glslang_tab.cpp" break; - case 253: /* type_specifier_nonarray: INT32_T */ -#line 1944 "MachineIndependent/glslang.y" + case 252: /* type_specifier_nonarray: INT32_T */ +#line 1936 "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 7793 "MachineIndependent/glslang_tab.cpp" +#line 7776 "MachineIndependent/glslang_tab.cpp" break; - case 254: /* type_specifier_nonarray: UINT32_T */ -#line 1949 "MachineIndependent/glslang.y" + case 253: /* type_specifier_nonarray: UINT32_T */ +#line 1941 "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 7803 "MachineIndependent/glslang_tab.cpp" +#line 7786 "MachineIndependent/glslang_tab.cpp" break; - case 255: /* type_specifier_nonarray: INT64_T */ -#line 1954 "MachineIndependent/glslang.y" + case 254: /* type_specifier_nonarray: INT64_T */ +#line 1946 "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 7813 "MachineIndependent/glslang_tab.cpp" +#line 7796 "MachineIndependent/glslang_tab.cpp" break; - case 256: /* type_specifier_nonarray: UINT64_T */ -#line 1959 "MachineIndependent/glslang.y" + case 255: /* type_specifier_nonarray: UINT64_T */ +#line 1951 "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 7823 "MachineIndependent/glslang_tab.cpp" +#line 7806 "MachineIndependent/glslang_tab.cpp" break; - case 257: /* type_specifier_nonarray: DVEC2 */ + case 256: /* type_specifier_nonarray: DVEC2 */ +#line 1956 "MachineIndependent/glslang.y" + { + parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double vector"); + if (! parseContext.symbolTable.atBuiltInLevel()) + parseContext.doubleCheck((yyvsp[0].lex).loc, "double vector"); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtDouble; + (yyval.interm.type).setVector(2); + } +#line 7819 "MachineIndependent/glslang_tab.cpp" + break; + + case 257: /* type_specifier_nonarray: DVEC3 */ #line 1964 "MachineIndependent/glslang.y" { parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double vector"); @@ -7830,12 +7826,12 @@ yyreduce: parseContext.doubleCheck((yyvsp[0].lex).loc, "double vector"); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtDouble; - (yyval.interm.type).setVector(2); + (yyval.interm.type).setVector(3); } -#line 7836 "MachineIndependent/glslang_tab.cpp" +#line 7832 "MachineIndependent/glslang_tab.cpp" break; - case 258: /* type_specifier_nonarray: DVEC3 */ + case 258: /* type_specifier_nonarray: DVEC4 */ #line 1972 "MachineIndependent/glslang.y" { parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double vector"); @@ -7843,388 +7839,388 @@ yyreduce: parseContext.doubleCheck((yyvsp[0].lex).loc, "double vector"); (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(4); } -#line 7849 "MachineIndependent/glslang_tab.cpp" +#line 7845 "MachineIndependent/glslang_tab.cpp" break; - case 259: /* type_specifier_nonarray: DVEC4 */ + case 259: /* type_specifier_nonarray: F16VEC2 */ #line 1980 "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 7856 "MachineIndependent/glslang_tab.cpp" + break; + + case 260: /* type_specifier_nonarray: F16VEC3 */ +#line 1986 "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 7867 "MachineIndependent/glslang_tab.cpp" + break; + + case 261: /* type_specifier_nonarray: F16VEC4 */ +#line 1992 "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 7878 "MachineIndependent/glslang_tab.cpp" + break; + + case 262: /* type_specifier_nonarray: F32VEC2 */ +#line 1998 "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 7889 "MachineIndependent/glslang_tab.cpp" + break; + + case 263: /* type_specifier_nonarray: F32VEC3 */ +#line 2004 "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 7900 "MachineIndependent/glslang_tab.cpp" + break; + + case 264: /* type_specifier_nonarray: F32VEC4 */ +#line 2010 "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 7911 "MachineIndependent/glslang_tab.cpp" + break; + + case 265: /* type_specifier_nonarray: F64VEC2 */ +#line 2016 "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 7922 "MachineIndependent/glslang_tab.cpp" + break; + + case 266: /* type_specifier_nonarray: F64VEC3 */ +#line 2022 "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 7933 "MachineIndependent/glslang_tab.cpp" + break; + + case 267: /* type_specifier_nonarray: F64VEC4 */ +#line 2028 "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 7944 "MachineIndependent/glslang_tab.cpp" + break; + + case 268: /* type_specifier_nonarray: I8VEC2 */ +#line 2034 "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 7955 "MachineIndependent/glslang_tab.cpp" + break; + + case 269: /* type_specifier_nonarray: I8VEC3 */ +#line 2040 "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 7966 "MachineIndependent/glslang_tab.cpp" + break; + + case 270: /* type_specifier_nonarray: I8VEC4 */ +#line 2046 "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 7977 "MachineIndependent/glslang_tab.cpp" + break; + + case 271: /* type_specifier_nonarray: I16VEC2 */ +#line 2052 "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 7988 "MachineIndependent/glslang_tab.cpp" + break; + + case 272: /* type_specifier_nonarray: I16VEC3 */ +#line 2058 "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 7999 "MachineIndependent/glslang_tab.cpp" + break; + + case 273: /* type_specifier_nonarray: I16VEC4 */ +#line 2064 "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 8010 "MachineIndependent/glslang_tab.cpp" + break; + + case 274: /* type_specifier_nonarray: I32VEC2 */ +#line 2070 "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 8021 "MachineIndependent/glslang_tab.cpp" + break; + + case 275: /* type_specifier_nonarray: I32VEC3 */ +#line 2076 "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 8032 "MachineIndependent/glslang_tab.cpp" + break; + + case 276: /* type_specifier_nonarray: I32VEC4 */ +#line 2082 "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 8043 "MachineIndependent/glslang_tab.cpp" + break; + + case 277: /* type_specifier_nonarray: I64VEC2 */ +#line 2088 "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 8054 "MachineIndependent/glslang_tab.cpp" + break; + + case 278: /* type_specifier_nonarray: I64VEC3 */ +#line 2094 "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 8065 "MachineIndependent/glslang_tab.cpp" + break; + + case 279: /* type_specifier_nonarray: I64VEC4 */ +#line 2100 "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 8076 "MachineIndependent/glslang_tab.cpp" + break; + + case 280: /* type_specifier_nonarray: U8VEC2 */ +#line 2106 "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 8087 "MachineIndependent/glslang_tab.cpp" + break; + + case 281: /* type_specifier_nonarray: U8VEC3 */ +#line 2112 "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 8098 "MachineIndependent/glslang_tab.cpp" + break; + + case 282: /* type_specifier_nonarray: U8VEC4 */ +#line 2118 "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 8109 "MachineIndependent/glslang_tab.cpp" + break; + + case 283: /* type_specifier_nonarray: U16VEC2 */ +#line 2124 "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 8120 "MachineIndependent/glslang_tab.cpp" + break; + + case 284: /* type_specifier_nonarray: U16VEC3 */ +#line 2130 "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 8131 "MachineIndependent/glslang_tab.cpp" + break; + + case 285: /* type_specifier_nonarray: U16VEC4 */ +#line 2136 "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 8142 "MachineIndependent/glslang_tab.cpp" + break; + + case 286: /* type_specifier_nonarray: U32VEC2 */ +#line 2142 "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 8153 "MachineIndependent/glslang_tab.cpp" + break; + + case 287: /* type_specifier_nonarray: U32VEC3 */ +#line 2148 "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 8164 "MachineIndependent/glslang_tab.cpp" + break; + + case 288: /* type_specifier_nonarray: U32VEC4 */ +#line 2154 "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 8175 "MachineIndependent/glslang_tab.cpp" + break; + + case 289: /* type_specifier_nonarray: U64VEC2 */ +#line 2160 "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 8186 "MachineIndependent/glslang_tab.cpp" + break; + + case 290: /* type_specifier_nonarray: U64VEC3 */ +#line 2166 "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 8197 "MachineIndependent/glslang_tab.cpp" + break; + + case 291: /* type_specifier_nonarray: U64VEC4 */ +#line 2172 "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 8208 "MachineIndependent/glslang_tab.cpp" + break; + + case 292: /* type_specifier_nonarray: DMAT2 */ +#line 2178 "MachineIndependent/glslang.y" { - parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double vector"); + parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double matrix"); if (! parseContext.symbolTable.atBuiltInLevel()) - parseContext.doubleCheck((yyvsp[0].lex).loc, "double vector"); + parseContext.doubleCheck((yyvsp[0].lex).loc, "double matrix"); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtDouble; - (yyval.interm.type).setVector(4); + (yyval.interm.type).setMatrix(2, 2); } -#line 7862 "MachineIndependent/glslang_tab.cpp" +#line 8221 "MachineIndependent/glslang_tab.cpp" break; - case 260: /* type_specifier_nonarray: F16VEC2 */ -#line 1988 "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 7873 "MachineIndependent/glslang_tab.cpp" - break; - - case 261: /* type_specifier_nonarray: F16VEC3 */ -#line 1994 "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 7884 "MachineIndependent/glslang_tab.cpp" - break; - - case 262: /* type_specifier_nonarray: F16VEC4 */ -#line 2000 "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 7895 "MachineIndependent/glslang_tab.cpp" - break; - - case 263: /* type_specifier_nonarray: F32VEC2 */ -#line 2006 "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 7906 "MachineIndependent/glslang_tab.cpp" - break; - - case 264: /* type_specifier_nonarray: F32VEC3 */ -#line 2012 "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 7917 "MachineIndependent/glslang_tab.cpp" - break; - - case 265: /* type_specifier_nonarray: F32VEC4 */ -#line 2018 "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 7928 "MachineIndependent/glslang_tab.cpp" - break; - - case 266: /* type_specifier_nonarray: F64VEC2 */ -#line 2024 "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 7939 "MachineIndependent/glslang_tab.cpp" - break; - - case 267: /* type_specifier_nonarray: F64VEC3 */ -#line 2030 "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 7950 "MachineIndependent/glslang_tab.cpp" - break; - - case 268: /* type_specifier_nonarray: F64VEC4 */ -#line 2036 "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 7961 "MachineIndependent/glslang_tab.cpp" - break; - - case 269: /* type_specifier_nonarray: I8VEC2 */ -#line 2042 "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 7972 "MachineIndependent/glslang_tab.cpp" - break; - - case 270: /* type_specifier_nonarray: I8VEC3 */ -#line 2048 "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 7983 "MachineIndependent/glslang_tab.cpp" - break; - - case 271: /* type_specifier_nonarray: I8VEC4 */ -#line 2054 "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 7994 "MachineIndependent/glslang_tab.cpp" - break; - - case 272: /* type_specifier_nonarray: I16VEC2 */ -#line 2060 "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 8005 "MachineIndependent/glslang_tab.cpp" - break; - - case 273: /* type_specifier_nonarray: I16VEC3 */ -#line 2066 "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 8016 "MachineIndependent/glslang_tab.cpp" - break; - - case 274: /* type_specifier_nonarray: I16VEC4 */ -#line 2072 "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 8027 "MachineIndependent/glslang_tab.cpp" - break; - - case 275: /* type_specifier_nonarray: I32VEC2 */ -#line 2078 "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 8038 "MachineIndependent/glslang_tab.cpp" - break; - - case 276: /* type_specifier_nonarray: I32VEC3 */ -#line 2084 "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 8049 "MachineIndependent/glslang_tab.cpp" - break; - - case 277: /* type_specifier_nonarray: I32VEC4 */ -#line 2090 "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 8060 "MachineIndependent/glslang_tab.cpp" - break; - - case 278: /* type_specifier_nonarray: I64VEC2 */ -#line 2096 "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 8071 "MachineIndependent/glslang_tab.cpp" - break; - - case 279: /* type_specifier_nonarray: I64VEC3 */ -#line 2102 "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 8082 "MachineIndependent/glslang_tab.cpp" - break; - - case 280: /* type_specifier_nonarray: I64VEC4 */ -#line 2108 "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 8093 "MachineIndependent/glslang_tab.cpp" - break; - - case 281: /* type_specifier_nonarray: U8VEC2 */ -#line 2114 "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 8104 "MachineIndependent/glslang_tab.cpp" - break; - - case 282: /* type_specifier_nonarray: U8VEC3 */ -#line 2120 "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 8115 "MachineIndependent/glslang_tab.cpp" - break; - - case 283: /* type_specifier_nonarray: U8VEC4 */ -#line 2126 "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 8126 "MachineIndependent/glslang_tab.cpp" - break; - - case 284: /* type_specifier_nonarray: U16VEC2 */ -#line 2132 "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 8137 "MachineIndependent/glslang_tab.cpp" - break; - - case 285: /* type_specifier_nonarray: U16VEC3 */ -#line 2138 "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 8148 "MachineIndependent/glslang_tab.cpp" - break; - - case 286: /* type_specifier_nonarray: U16VEC4 */ -#line 2144 "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 8159 "MachineIndependent/glslang_tab.cpp" - break; - - case 287: /* type_specifier_nonarray: U32VEC2 */ -#line 2150 "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 8170 "MachineIndependent/glslang_tab.cpp" - break; - - case 288: /* type_specifier_nonarray: U32VEC3 */ -#line 2156 "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 8181 "MachineIndependent/glslang_tab.cpp" - break; - - case 289: /* type_specifier_nonarray: U32VEC4 */ -#line 2162 "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 8192 "MachineIndependent/glslang_tab.cpp" - break; - - case 290: /* type_specifier_nonarray: U64VEC2 */ -#line 2168 "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 8203 "MachineIndependent/glslang_tab.cpp" - break; - - case 291: /* type_specifier_nonarray: U64VEC3 */ -#line 2174 "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 8214 "MachineIndependent/glslang_tab.cpp" - break; - - case 292: /* type_specifier_nonarray: U64VEC4 */ -#line 2180 "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 8225 "MachineIndependent/glslang_tab.cpp" - break; - - case 293: /* type_specifier_nonarray: DMAT2 */ + case 293: /* type_specifier_nonarray: DMAT3 */ #line 2186 "MachineIndependent/glslang.y" { parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double matrix"); @@ -8232,12 +8228,12 @@ yyreduce: parseContext.doubleCheck((yyvsp[0].lex).loc, "double matrix"); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtDouble; - (yyval.interm.type).setMatrix(2, 2); + (yyval.interm.type).setMatrix(3, 3); } -#line 8238 "MachineIndependent/glslang_tab.cpp" +#line 8234 "MachineIndependent/glslang_tab.cpp" break; - case 294: /* type_specifier_nonarray: DMAT3 */ + case 294: /* type_specifier_nonarray: DMAT4 */ #line 2194 "MachineIndependent/glslang.y" { parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double matrix"); @@ -8245,25 +8241,25 @@ yyreduce: parseContext.doubleCheck((yyvsp[0].lex).loc, "double matrix"); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtDouble; - (yyval.interm.type).setMatrix(3, 3); + (yyval.interm.type).setMatrix(4, 4); } -#line 8251 "MachineIndependent/glslang_tab.cpp" +#line 8247 "MachineIndependent/glslang_tab.cpp" break; - case 295: /* type_specifier_nonarray: DMAT4 */ + case 295: /* type_specifier_nonarray: DMAT2X2 */ #line 2202 "MachineIndependent/glslang.y" - { + { parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double matrix"); if (! parseContext.symbolTable.atBuiltInLevel()) parseContext.doubleCheck((yyvsp[0].lex).loc, "double matrix"); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtDouble; - (yyval.interm.type).setMatrix(4, 4); + (yyval.interm.type).setMatrix(2, 2); } -#line 8264 "MachineIndependent/glslang_tab.cpp" +#line 8260 "MachineIndependent/glslang_tab.cpp" break; - case 296: /* type_specifier_nonarray: DMAT2X2 */ + case 296: /* type_specifier_nonarray: DMAT2X3 */ #line 2210 "MachineIndependent/glslang.y" { parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double matrix"); @@ -8271,12 +8267,12 @@ yyreduce: parseContext.doubleCheck((yyvsp[0].lex).loc, "double matrix"); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtDouble; - (yyval.interm.type).setMatrix(2, 2); + (yyval.interm.type).setMatrix(2, 3); } -#line 8277 "MachineIndependent/glslang_tab.cpp" +#line 8273 "MachineIndependent/glslang_tab.cpp" break; - case 297: /* type_specifier_nonarray: DMAT2X3 */ + case 297: /* type_specifier_nonarray: DMAT2X4 */ #line 2218 "MachineIndependent/glslang.y" { parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double matrix"); @@ -8284,12 +8280,12 @@ yyreduce: parseContext.doubleCheck((yyvsp[0].lex).loc, "double matrix"); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtDouble; - (yyval.interm.type).setMatrix(2, 3); + (yyval.interm.type).setMatrix(2, 4); } -#line 8290 "MachineIndependent/glslang_tab.cpp" +#line 8286 "MachineIndependent/glslang_tab.cpp" break; - case 298: /* type_specifier_nonarray: DMAT2X4 */ + case 298: /* type_specifier_nonarray: DMAT3X2 */ #line 2226 "MachineIndependent/glslang.y" { parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double matrix"); @@ -8297,12 +8293,12 @@ yyreduce: parseContext.doubleCheck((yyvsp[0].lex).loc, "double matrix"); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtDouble; - (yyval.interm.type).setMatrix(2, 4); + (yyval.interm.type).setMatrix(3, 2); } -#line 8303 "MachineIndependent/glslang_tab.cpp" +#line 8299 "MachineIndependent/glslang_tab.cpp" break; - case 299: /* type_specifier_nonarray: DMAT3X2 */ + case 299: /* type_specifier_nonarray: DMAT3X3 */ #line 2234 "MachineIndependent/glslang.y" { parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double matrix"); @@ -8310,12 +8306,12 @@ yyreduce: parseContext.doubleCheck((yyvsp[0].lex).loc, "double matrix"); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtDouble; - (yyval.interm.type).setMatrix(3, 2); + (yyval.interm.type).setMatrix(3, 3); } -#line 8316 "MachineIndependent/glslang_tab.cpp" +#line 8312 "MachineIndependent/glslang_tab.cpp" break; - case 300: /* type_specifier_nonarray: DMAT3X3 */ + case 300: /* type_specifier_nonarray: DMAT3X4 */ #line 2242 "MachineIndependent/glslang.y" { parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double matrix"); @@ -8323,12 +8319,12 @@ yyreduce: parseContext.doubleCheck((yyvsp[0].lex).loc, "double matrix"); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtDouble; - (yyval.interm.type).setMatrix(3, 3); + (yyval.interm.type).setMatrix(3, 4); } -#line 8329 "MachineIndependent/glslang_tab.cpp" +#line 8325 "MachineIndependent/glslang_tab.cpp" break; - case 301: /* type_specifier_nonarray: DMAT3X4 */ + case 301: /* type_specifier_nonarray: DMAT4X2 */ #line 2250 "MachineIndependent/glslang.y" { parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double matrix"); @@ -8336,12 +8332,12 @@ yyreduce: parseContext.doubleCheck((yyvsp[0].lex).loc, "double matrix"); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtDouble; - (yyval.interm.type).setMatrix(3, 4); + (yyval.interm.type).setMatrix(4, 2); } -#line 8342 "MachineIndependent/glslang_tab.cpp" +#line 8338 "MachineIndependent/glslang_tab.cpp" break; - case 302: /* type_specifier_nonarray: DMAT4X2 */ + case 302: /* type_specifier_nonarray: DMAT4X3 */ #line 2258 "MachineIndependent/glslang.y" { parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double matrix"); @@ -8349,12 +8345,12 @@ yyreduce: parseContext.doubleCheck((yyvsp[0].lex).loc, "double matrix"); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtDouble; - (yyval.interm.type).setMatrix(4, 2); + (yyval.interm.type).setMatrix(4, 3); } -#line 8355 "MachineIndependent/glslang_tab.cpp" +#line 8351 "MachineIndependent/glslang_tab.cpp" break; - case 303: /* type_specifier_nonarray: DMAT4X3 */ + case 303: /* type_specifier_nonarray: DMAT4X4 */ #line 2266 "MachineIndependent/glslang.y" { parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double matrix"); @@ -8362,2243 +8358,2230 @@ yyreduce: parseContext.doubleCheck((yyvsp[0].lex).loc, "double matrix"); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtDouble; - (yyval.interm.type).setMatrix(4, 3); + (yyval.interm.type).setMatrix(4, 4); } -#line 8368 "MachineIndependent/glslang_tab.cpp" +#line 8364 "MachineIndependent/glslang_tab.cpp" break; - case 304: /* type_specifier_nonarray: DMAT4X4 */ + case 304: /* type_specifier_nonarray: F16MAT2 */ #line 2274 "MachineIndependent/glslang.y" { - parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double matrix"); - if (! parseContext.symbolTable.atBuiltInLevel()) - parseContext.doubleCheck((yyvsp[0].lex).loc, "double matrix"); - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtDouble; - (yyval.interm.type).setMatrix(4, 4); - } -#line 8381 "MachineIndependent/glslang_tab.cpp" - break; - - case 305: /* type_specifier_nonarray: F16MAT2 */ -#line 2282 "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 8392 "MachineIndependent/glslang_tab.cpp" +#line 8375 "MachineIndependent/glslang_tab.cpp" break; - case 306: /* type_specifier_nonarray: F16MAT3 */ -#line 2288 "MachineIndependent/glslang.y" + case 305: /* type_specifier_nonarray: F16MAT3 */ +#line 2280 "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); } -#line 8403 "MachineIndependent/glslang_tab.cpp" +#line 8386 "MachineIndependent/glslang_tab.cpp" break; - case 307: /* type_specifier_nonarray: F16MAT4 */ -#line 2294 "MachineIndependent/glslang.y" + case 306: /* type_specifier_nonarray: F16MAT4 */ +#line 2286 "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 8414 "MachineIndependent/glslang_tab.cpp" +#line 8397 "MachineIndependent/glslang_tab.cpp" break; - case 308: /* type_specifier_nonarray: F16MAT2X2 */ -#line 2300 "MachineIndependent/glslang.y" + case 307: /* type_specifier_nonarray: F16MAT2X2 */ +#line 2292 "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 8425 "MachineIndependent/glslang_tab.cpp" +#line 8408 "MachineIndependent/glslang_tab.cpp" break; - case 309: /* type_specifier_nonarray: F16MAT2X3 */ -#line 2306 "MachineIndependent/glslang.y" + case 308: /* type_specifier_nonarray: F16MAT2X3 */ +#line 2298 "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); } -#line 8436 "MachineIndependent/glslang_tab.cpp" +#line 8419 "MachineIndependent/glslang_tab.cpp" break; - case 310: /* type_specifier_nonarray: F16MAT2X4 */ -#line 2312 "MachineIndependent/glslang.y" + case 309: /* type_specifier_nonarray: F16MAT2X4 */ +#line 2304 "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); } -#line 8447 "MachineIndependent/glslang_tab.cpp" +#line 8430 "MachineIndependent/glslang_tab.cpp" break; - case 311: /* type_specifier_nonarray: F16MAT3X2 */ -#line 2318 "MachineIndependent/glslang.y" + case 310: /* type_specifier_nonarray: F16MAT3X2 */ +#line 2310 "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); } -#line 8458 "MachineIndependent/glslang_tab.cpp" +#line 8441 "MachineIndependent/glslang_tab.cpp" break; - case 312: /* type_specifier_nonarray: F16MAT3X3 */ -#line 2324 "MachineIndependent/glslang.y" + case 311: /* type_specifier_nonarray: F16MAT3X3 */ +#line 2316 "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); } -#line 8469 "MachineIndependent/glslang_tab.cpp" +#line 8452 "MachineIndependent/glslang_tab.cpp" break; - case 313: /* type_specifier_nonarray: F16MAT3X4 */ -#line 2330 "MachineIndependent/glslang.y" + case 312: /* type_specifier_nonarray: F16MAT3X4 */ +#line 2322 "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); } -#line 8480 "MachineIndependent/glslang_tab.cpp" +#line 8463 "MachineIndependent/glslang_tab.cpp" break; - case 314: /* type_specifier_nonarray: F16MAT4X2 */ -#line 2336 "MachineIndependent/glslang.y" + case 313: /* type_specifier_nonarray: F16MAT4X2 */ +#line 2328 "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); } -#line 8491 "MachineIndependent/glslang_tab.cpp" +#line 8474 "MachineIndependent/glslang_tab.cpp" break; - case 315: /* type_specifier_nonarray: F16MAT4X3 */ -#line 2342 "MachineIndependent/glslang.y" + case 314: /* type_specifier_nonarray: F16MAT4X3 */ +#line 2334 "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 8502 "MachineIndependent/glslang_tab.cpp" +#line 8485 "MachineIndependent/glslang_tab.cpp" break; - case 316: /* type_specifier_nonarray: F16MAT4X4 */ -#line 2348 "MachineIndependent/glslang.y" + case 315: /* type_specifier_nonarray: F16MAT4X4 */ +#line 2340 "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 8513 "MachineIndependent/glslang_tab.cpp" +#line 8496 "MachineIndependent/glslang_tab.cpp" break; - case 317: /* type_specifier_nonarray: F32MAT2 */ -#line 2354 "MachineIndependent/glslang.y" + case 316: /* type_specifier_nonarray: F32MAT2 */ +#line 2346 "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 8524 "MachineIndependent/glslang_tab.cpp" +#line 8507 "MachineIndependent/glslang_tab.cpp" break; - case 318: /* type_specifier_nonarray: F32MAT3 */ -#line 2360 "MachineIndependent/glslang.y" + case 317: /* type_specifier_nonarray: F32MAT3 */ +#line 2352 "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 8535 "MachineIndependent/glslang_tab.cpp" +#line 8518 "MachineIndependent/glslang_tab.cpp" break; - case 319: /* type_specifier_nonarray: F32MAT4 */ -#line 2366 "MachineIndependent/glslang.y" + case 318: /* type_specifier_nonarray: F32MAT4 */ +#line 2358 "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 8546 "MachineIndependent/glslang_tab.cpp" +#line 8529 "MachineIndependent/glslang_tab.cpp" break; - case 320: /* type_specifier_nonarray: F32MAT2X2 */ -#line 2372 "MachineIndependent/glslang.y" + case 319: /* type_specifier_nonarray: F32MAT2X2 */ +#line 2364 "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 8557 "MachineIndependent/glslang_tab.cpp" +#line 8540 "MachineIndependent/glslang_tab.cpp" break; - case 321: /* type_specifier_nonarray: F32MAT2X3 */ -#line 2378 "MachineIndependent/glslang.y" + case 320: /* type_specifier_nonarray: F32MAT2X3 */ +#line 2370 "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); } -#line 8568 "MachineIndependent/glslang_tab.cpp" +#line 8551 "MachineIndependent/glslang_tab.cpp" break; - case 322: /* type_specifier_nonarray: F32MAT2X4 */ -#line 2384 "MachineIndependent/glslang.y" + case 321: /* type_specifier_nonarray: F32MAT2X4 */ +#line 2376 "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 8579 "MachineIndependent/glslang_tab.cpp" +#line 8562 "MachineIndependent/glslang_tab.cpp" break; - case 323: /* type_specifier_nonarray: F32MAT3X2 */ -#line 2390 "MachineIndependent/glslang.y" + case 322: /* type_specifier_nonarray: F32MAT3X2 */ +#line 2382 "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 8590 "MachineIndependent/glslang_tab.cpp" +#line 8573 "MachineIndependent/glslang_tab.cpp" break; - case 324: /* type_specifier_nonarray: F32MAT3X3 */ -#line 2396 "MachineIndependent/glslang.y" + case 323: /* type_specifier_nonarray: F32MAT3X3 */ +#line 2388 "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 8601 "MachineIndependent/glslang_tab.cpp" +#line 8584 "MachineIndependent/glslang_tab.cpp" break; - case 325: /* type_specifier_nonarray: F32MAT3X4 */ -#line 2402 "MachineIndependent/glslang.y" + case 324: /* type_specifier_nonarray: F32MAT3X4 */ +#line 2394 "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 8612 "MachineIndependent/glslang_tab.cpp" +#line 8595 "MachineIndependent/glslang_tab.cpp" break; - case 326: /* type_specifier_nonarray: F32MAT4X2 */ -#line 2408 "MachineIndependent/glslang.y" + case 325: /* type_specifier_nonarray: F32MAT4X2 */ +#line 2400 "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 8623 "MachineIndependent/glslang_tab.cpp" +#line 8606 "MachineIndependent/glslang_tab.cpp" break; - case 327: /* type_specifier_nonarray: F32MAT4X3 */ -#line 2414 "MachineIndependent/glslang.y" + case 326: /* type_specifier_nonarray: F32MAT4X3 */ +#line 2406 "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 8634 "MachineIndependent/glslang_tab.cpp" +#line 8617 "MachineIndependent/glslang_tab.cpp" break; - case 328: /* type_specifier_nonarray: F32MAT4X4 */ -#line 2420 "MachineIndependent/glslang.y" + case 327: /* type_specifier_nonarray: F32MAT4X4 */ +#line 2412 "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 8645 "MachineIndependent/glslang_tab.cpp" +#line 8628 "MachineIndependent/glslang_tab.cpp" break; - case 329: /* type_specifier_nonarray: F64MAT2 */ -#line 2426 "MachineIndependent/glslang.y" + case 328: /* type_specifier_nonarray: F64MAT2 */ +#line 2418 "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 8656 "MachineIndependent/glslang_tab.cpp" +#line 8639 "MachineIndependent/glslang_tab.cpp" break; - case 330: /* type_specifier_nonarray: F64MAT3 */ -#line 2432 "MachineIndependent/glslang.y" + case 329: /* type_specifier_nonarray: F64MAT3 */ +#line 2424 "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 8667 "MachineIndependent/glslang_tab.cpp" +#line 8650 "MachineIndependent/glslang_tab.cpp" break; - case 331: /* type_specifier_nonarray: F64MAT4 */ -#line 2438 "MachineIndependent/glslang.y" + case 330: /* type_specifier_nonarray: F64MAT4 */ +#line 2430 "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 8678 "MachineIndependent/glslang_tab.cpp" +#line 8661 "MachineIndependent/glslang_tab.cpp" break; - case 332: /* type_specifier_nonarray: F64MAT2X2 */ -#line 2444 "MachineIndependent/glslang.y" + case 331: /* type_specifier_nonarray: F64MAT2X2 */ +#line 2436 "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 8689 "MachineIndependent/glslang_tab.cpp" +#line 8672 "MachineIndependent/glslang_tab.cpp" break; - case 333: /* type_specifier_nonarray: F64MAT2X3 */ -#line 2450 "MachineIndependent/glslang.y" + case 332: /* type_specifier_nonarray: F64MAT2X3 */ +#line 2442 "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 8700 "MachineIndependent/glslang_tab.cpp" +#line 8683 "MachineIndependent/glslang_tab.cpp" break; - case 334: /* type_specifier_nonarray: F64MAT2X4 */ -#line 2456 "MachineIndependent/glslang.y" + case 333: /* type_specifier_nonarray: F64MAT2X4 */ +#line 2448 "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 8711 "MachineIndependent/glslang_tab.cpp" +#line 8694 "MachineIndependent/glslang_tab.cpp" break; - case 335: /* type_specifier_nonarray: F64MAT3X2 */ -#line 2462 "MachineIndependent/glslang.y" + case 334: /* type_specifier_nonarray: F64MAT3X2 */ +#line 2454 "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 8722 "MachineIndependent/glslang_tab.cpp" +#line 8705 "MachineIndependent/glslang_tab.cpp" break; - case 336: /* type_specifier_nonarray: F64MAT3X3 */ -#line 2468 "MachineIndependent/glslang.y" + case 335: /* type_specifier_nonarray: F64MAT3X3 */ +#line 2460 "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 8733 "MachineIndependent/glslang_tab.cpp" +#line 8716 "MachineIndependent/glslang_tab.cpp" break; - case 337: /* type_specifier_nonarray: F64MAT3X4 */ -#line 2474 "MachineIndependent/glslang.y" + case 336: /* type_specifier_nonarray: F64MAT3X4 */ +#line 2466 "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 8744 "MachineIndependent/glslang_tab.cpp" +#line 8727 "MachineIndependent/glslang_tab.cpp" break; - case 338: /* type_specifier_nonarray: F64MAT4X2 */ -#line 2480 "MachineIndependent/glslang.y" + case 337: /* type_specifier_nonarray: F64MAT4X2 */ +#line 2472 "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 8755 "MachineIndependent/glslang_tab.cpp" +#line 8738 "MachineIndependent/glslang_tab.cpp" break; - case 339: /* type_specifier_nonarray: F64MAT4X3 */ -#line 2486 "MachineIndependent/glslang.y" + case 338: /* type_specifier_nonarray: F64MAT4X3 */ +#line 2478 "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 8766 "MachineIndependent/glslang_tab.cpp" +#line 8749 "MachineIndependent/glslang_tab.cpp" break; - case 340: /* type_specifier_nonarray: F64MAT4X4 */ -#line 2492 "MachineIndependent/glslang.y" + case 339: /* type_specifier_nonarray: F64MAT4X4 */ +#line 2484 "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 8777 "MachineIndependent/glslang_tab.cpp" +#line 8760 "MachineIndependent/glslang_tab.cpp" break; - case 341: /* type_specifier_nonarray: ACCSTRUCTNV */ -#line 2498 "MachineIndependent/glslang.y" + case 340: /* type_specifier_nonarray: ACCSTRUCTNV */ +#line 2490 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtAccStruct; } -#line 8786 "MachineIndependent/glslang_tab.cpp" +#line 8769 "MachineIndependent/glslang_tab.cpp" break; - case 342: /* type_specifier_nonarray: ACCSTRUCTEXT */ -#line 2502 "MachineIndependent/glslang.y" + case 341: /* type_specifier_nonarray: ACCSTRUCTEXT */ +#line 2494 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtAccStruct; } -#line 8795 "MachineIndependent/glslang_tab.cpp" +#line 8778 "MachineIndependent/glslang_tab.cpp" break; - case 343: /* type_specifier_nonarray: RAYQUERYEXT */ -#line 2506 "MachineIndependent/glslang.y" + case 342: /* type_specifier_nonarray: RAYQUERYEXT */ +#line 2498 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtRayQuery; } -#line 8804 "MachineIndependent/glslang_tab.cpp" +#line 8787 "MachineIndependent/glslang_tab.cpp" break; - case 344: /* type_specifier_nonarray: ATOMIC_UINT */ -#line 2510 "MachineIndependent/glslang.y" + case 343: /* type_specifier_nonarray: ATOMIC_UINT */ +#line 2502 "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 8814 "MachineIndependent/glslang_tab.cpp" +#line 8797 "MachineIndependent/glslang_tab.cpp" break; - case 345: /* type_specifier_nonarray: SAMPLER1D */ -#line 2515 "MachineIndependent/glslang.y" + case 344: /* type_specifier_nonarray: SAMPLER1D */ +#line 2507 "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 8824 "MachineIndependent/glslang_tab.cpp" +#line 8807 "MachineIndependent/glslang_tab.cpp" break; - case 346: /* type_specifier_nonarray: SAMPLER2D */ -#line 2521 "MachineIndependent/glslang.y" + case 345: /* type_specifier_nonarray: SAMPLER2D */ +#line 2513 "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 8834 "MachineIndependent/glslang_tab.cpp" +#line 8817 "MachineIndependent/glslang_tab.cpp" break; - case 347: /* type_specifier_nonarray: SAMPLER3D */ -#line 2526 "MachineIndependent/glslang.y" + case 346: /* type_specifier_nonarray: SAMPLER3D */ +#line 2518 "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 8844 "MachineIndependent/glslang_tab.cpp" +#line 8827 "MachineIndependent/glslang_tab.cpp" break; - case 348: /* type_specifier_nonarray: SAMPLERCUBE */ -#line 2531 "MachineIndependent/glslang.y" + case 347: /* type_specifier_nonarray: SAMPLERCUBE */ +#line 2523 "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 8854 "MachineIndependent/glslang_tab.cpp" +#line 8837 "MachineIndependent/glslang_tab.cpp" break; - case 349: /* type_specifier_nonarray: SAMPLER2DSHADOW */ -#line 2536 "MachineIndependent/glslang.y" + case 348: /* type_specifier_nonarray: SAMPLER2DSHADOW */ +#line 2528 "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 8864 "MachineIndependent/glslang_tab.cpp" +#line 8847 "MachineIndependent/glslang_tab.cpp" break; - case 350: /* type_specifier_nonarray: SAMPLERCUBESHADOW */ -#line 2541 "MachineIndependent/glslang.y" + case 349: /* type_specifier_nonarray: SAMPLERCUBESHADOW */ +#line 2533 "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 8874 "MachineIndependent/glslang_tab.cpp" +#line 8857 "MachineIndependent/glslang_tab.cpp" break; - case 351: /* type_specifier_nonarray: SAMPLER2DARRAY */ -#line 2546 "MachineIndependent/glslang.y" + case 350: /* type_specifier_nonarray: SAMPLER2DARRAY */ +#line 2538 "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 8884 "MachineIndependent/glslang_tab.cpp" +#line 8867 "MachineIndependent/glslang_tab.cpp" break; - case 352: /* type_specifier_nonarray: SAMPLER2DARRAYSHADOW */ -#line 2551 "MachineIndependent/glslang.y" + case 351: /* type_specifier_nonarray: SAMPLER2DARRAYSHADOW */ +#line 2543 "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 8894 "MachineIndependent/glslang_tab.cpp" +#line 8877 "MachineIndependent/glslang_tab.cpp" break; - case 353: /* type_specifier_nonarray: SAMPLER1DSHADOW */ -#line 2557 "MachineIndependent/glslang.y" + case 352: /* type_specifier_nonarray: SAMPLER1DSHADOW */ +#line 2549 "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 8904 "MachineIndependent/glslang_tab.cpp" +#line 8887 "MachineIndependent/glslang_tab.cpp" break; - case 354: /* type_specifier_nonarray: SAMPLER1DARRAY */ -#line 2562 "MachineIndependent/glslang.y" + case 353: /* type_specifier_nonarray: SAMPLER1DARRAY */ +#line 2554 "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 8914 "MachineIndependent/glslang_tab.cpp" +#line 8897 "MachineIndependent/glslang_tab.cpp" break; - case 355: /* type_specifier_nonarray: SAMPLER1DARRAYSHADOW */ -#line 2567 "MachineIndependent/glslang.y" + case 354: /* type_specifier_nonarray: SAMPLER1DARRAYSHADOW */ +#line 2559 "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 8924 "MachineIndependent/glslang_tab.cpp" +#line 8907 "MachineIndependent/glslang_tab.cpp" break; - case 356: /* type_specifier_nonarray: SAMPLERCUBEARRAY */ -#line 2572 "MachineIndependent/glslang.y" + case 355: /* type_specifier_nonarray: SAMPLERCUBEARRAY */ +#line 2564 "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 8934 "MachineIndependent/glslang_tab.cpp" +#line 8917 "MachineIndependent/glslang_tab.cpp" break; - case 357: /* type_specifier_nonarray: SAMPLERCUBEARRAYSHADOW */ -#line 2577 "MachineIndependent/glslang.y" + case 356: /* type_specifier_nonarray: SAMPLERCUBEARRAYSHADOW */ +#line 2569 "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 8944 "MachineIndependent/glslang_tab.cpp" +#line 8927 "MachineIndependent/glslang_tab.cpp" break; - case 358: /* type_specifier_nonarray: F16SAMPLER1D */ -#line 2582 "MachineIndependent/glslang.y" + case 357: /* type_specifier_nonarray: F16SAMPLER1D */ +#line 2574 "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 8955 "MachineIndependent/glslang_tab.cpp" +#line 8938 "MachineIndependent/glslang_tab.cpp" break; - case 359: /* type_specifier_nonarray: F16SAMPLER2D */ -#line 2588 "MachineIndependent/glslang.y" + case 358: /* type_specifier_nonarray: F16SAMPLER2D */ +#line 2580 "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 8966 "MachineIndependent/glslang_tab.cpp" +#line 8949 "MachineIndependent/glslang_tab.cpp" break; - case 360: /* type_specifier_nonarray: F16SAMPLER3D */ -#line 2594 "MachineIndependent/glslang.y" + case 359: /* type_specifier_nonarray: F16SAMPLER3D */ +#line 2586 "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 8977 "MachineIndependent/glslang_tab.cpp" +#line 8960 "MachineIndependent/glslang_tab.cpp" break; - case 361: /* type_specifier_nonarray: F16SAMPLERCUBE */ -#line 2600 "MachineIndependent/glslang.y" + case 360: /* type_specifier_nonarray: F16SAMPLERCUBE */ +#line 2592 "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 8988 "MachineIndependent/glslang_tab.cpp" +#line 8971 "MachineIndependent/glslang_tab.cpp" break; - case 362: /* type_specifier_nonarray: F16SAMPLER1DSHADOW */ -#line 2606 "MachineIndependent/glslang.y" + case 361: /* type_specifier_nonarray: F16SAMPLER1DSHADOW */ +#line 2598 "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 8999 "MachineIndependent/glslang_tab.cpp" +#line 8982 "MachineIndependent/glslang_tab.cpp" break; - case 363: /* type_specifier_nonarray: F16SAMPLER2DSHADOW */ -#line 2612 "MachineIndependent/glslang.y" + case 362: /* type_specifier_nonarray: F16SAMPLER2DSHADOW */ +#line 2604 "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 9010 "MachineIndependent/glslang_tab.cpp" +#line 8993 "MachineIndependent/glslang_tab.cpp" break; - case 364: /* type_specifier_nonarray: F16SAMPLERCUBESHADOW */ -#line 2618 "MachineIndependent/glslang.y" + case 363: /* type_specifier_nonarray: F16SAMPLERCUBESHADOW */ +#line 2610 "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 9021 "MachineIndependent/glslang_tab.cpp" +#line 9004 "MachineIndependent/glslang_tab.cpp" break; - case 365: /* type_specifier_nonarray: F16SAMPLER1DARRAY */ -#line 2624 "MachineIndependent/glslang.y" + case 364: /* type_specifier_nonarray: F16SAMPLER1DARRAY */ +#line 2616 "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 9032 "MachineIndependent/glslang_tab.cpp" +#line 9015 "MachineIndependent/glslang_tab.cpp" break; - case 366: /* type_specifier_nonarray: F16SAMPLER2DARRAY */ -#line 2630 "MachineIndependent/glslang.y" + case 365: /* type_specifier_nonarray: F16SAMPLER2DARRAY */ +#line 2622 "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 9043 "MachineIndependent/glslang_tab.cpp" +#line 9026 "MachineIndependent/glslang_tab.cpp" break; - case 367: /* type_specifier_nonarray: F16SAMPLER1DARRAYSHADOW */ -#line 2636 "MachineIndependent/glslang.y" + case 366: /* type_specifier_nonarray: F16SAMPLER1DARRAYSHADOW */ +#line 2628 "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 9054 "MachineIndependent/glslang_tab.cpp" +#line 9037 "MachineIndependent/glslang_tab.cpp" break; - case 368: /* type_specifier_nonarray: F16SAMPLER2DARRAYSHADOW */ -#line 2642 "MachineIndependent/glslang.y" + case 367: /* type_specifier_nonarray: F16SAMPLER2DARRAYSHADOW */ +#line 2634 "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 9065 "MachineIndependent/glslang_tab.cpp" +#line 9048 "MachineIndependent/glslang_tab.cpp" break; - case 369: /* type_specifier_nonarray: F16SAMPLERCUBEARRAY */ -#line 2648 "MachineIndependent/glslang.y" + case 368: /* type_specifier_nonarray: F16SAMPLERCUBEARRAY */ +#line 2640 "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 9076 "MachineIndependent/glslang_tab.cpp" +#line 9059 "MachineIndependent/glslang_tab.cpp" break; - case 370: /* type_specifier_nonarray: F16SAMPLERCUBEARRAYSHADOW */ -#line 2654 "MachineIndependent/glslang.y" + case 369: /* type_specifier_nonarray: F16SAMPLERCUBEARRAYSHADOW */ +#line 2646 "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 9087 "MachineIndependent/glslang_tab.cpp" +#line 9070 "MachineIndependent/glslang_tab.cpp" break; - case 371: /* type_specifier_nonarray: ISAMPLER1D */ -#line 2660 "MachineIndependent/glslang.y" + case 370: /* type_specifier_nonarray: ISAMPLER1D */ +#line 2652 "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 9097 "MachineIndependent/glslang_tab.cpp" +#line 9080 "MachineIndependent/glslang_tab.cpp" break; - case 372: /* type_specifier_nonarray: ISAMPLER2D */ -#line 2666 "MachineIndependent/glslang.y" + case 371: /* type_specifier_nonarray: ISAMPLER2D */ +#line 2658 "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 9107 "MachineIndependent/glslang_tab.cpp" +#line 9090 "MachineIndependent/glslang_tab.cpp" break; - case 373: /* type_specifier_nonarray: ISAMPLER3D */ -#line 2671 "MachineIndependent/glslang.y" + case 372: /* type_specifier_nonarray: ISAMPLER3D */ +#line 2663 "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 9117 "MachineIndependent/glslang_tab.cpp" +#line 9100 "MachineIndependent/glslang_tab.cpp" break; - case 374: /* type_specifier_nonarray: ISAMPLERCUBE */ -#line 2676 "MachineIndependent/glslang.y" + case 373: /* type_specifier_nonarray: ISAMPLERCUBE */ +#line 2668 "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 9127 "MachineIndependent/glslang_tab.cpp" +#line 9110 "MachineIndependent/glslang_tab.cpp" break; - case 375: /* type_specifier_nonarray: ISAMPLER2DARRAY */ -#line 2681 "MachineIndependent/glslang.y" + case 374: /* type_specifier_nonarray: ISAMPLER2DARRAY */ +#line 2673 "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 9137 "MachineIndependent/glslang_tab.cpp" +#line 9120 "MachineIndependent/glslang_tab.cpp" break; - case 376: /* type_specifier_nonarray: USAMPLER2D */ -#line 2686 "MachineIndependent/glslang.y" + case 375: /* type_specifier_nonarray: USAMPLER2D */ +#line 2678 "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 9147 "MachineIndependent/glslang_tab.cpp" +#line 9130 "MachineIndependent/glslang_tab.cpp" break; - case 377: /* type_specifier_nonarray: USAMPLER3D */ -#line 2691 "MachineIndependent/glslang.y" + case 376: /* type_specifier_nonarray: USAMPLER3D */ +#line 2683 "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 9157 "MachineIndependent/glslang_tab.cpp" +#line 9140 "MachineIndependent/glslang_tab.cpp" break; - case 378: /* type_specifier_nonarray: USAMPLERCUBE */ -#line 2696 "MachineIndependent/glslang.y" + case 377: /* type_specifier_nonarray: USAMPLERCUBE */ +#line 2688 "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 9167 "MachineIndependent/glslang_tab.cpp" +#line 9150 "MachineIndependent/glslang_tab.cpp" break; - case 379: /* type_specifier_nonarray: ISAMPLER1DARRAY */ -#line 2702 "MachineIndependent/glslang.y" + case 378: /* type_specifier_nonarray: ISAMPLER1DARRAY */ +#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, Esd1D, true); } -#line 9177 "MachineIndependent/glslang_tab.cpp" +#line 9160 "MachineIndependent/glslang_tab.cpp" break; - case 380: /* type_specifier_nonarray: ISAMPLERCUBEARRAY */ -#line 2707 "MachineIndependent/glslang.y" + case 379: /* type_specifier_nonarray: ISAMPLERCUBEARRAY */ +#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, EsdCube, true); } -#line 9187 "MachineIndependent/glslang_tab.cpp" +#line 9170 "MachineIndependent/glslang_tab.cpp" break; - case 381: /* type_specifier_nonarray: USAMPLER1D */ -#line 2712 "MachineIndependent/glslang.y" + case 380: /* type_specifier_nonarray: USAMPLER1D */ +#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(EbtUint, Esd1D); } -#line 9197 "MachineIndependent/glslang_tab.cpp" +#line 9180 "MachineIndependent/glslang_tab.cpp" break; - case 382: /* type_specifier_nonarray: USAMPLER1DARRAY */ -#line 2717 "MachineIndependent/glslang.y" + case 381: /* type_specifier_nonarray: USAMPLER1DARRAY */ +#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(EbtUint, Esd1D, true); } -#line 9207 "MachineIndependent/glslang_tab.cpp" +#line 9190 "MachineIndependent/glslang_tab.cpp" break; - case 383: /* type_specifier_nonarray: USAMPLERCUBEARRAY */ -#line 2722 "MachineIndependent/glslang.y" + case 382: /* type_specifier_nonarray: USAMPLERCUBEARRAY */ +#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, EsdCube, true); } -#line 9217 "MachineIndependent/glslang_tab.cpp" +#line 9200 "MachineIndependent/glslang_tab.cpp" break; - case 384: /* type_specifier_nonarray: TEXTURECUBEARRAY */ -#line 2727 "MachineIndependent/glslang.y" + case 383: /* type_specifier_nonarray: TEXTURECUBEARRAY */ +#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.setTexture(EbtFloat, EsdCube, true); } -#line 9227 "MachineIndependent/glslang_tab.cpp" +#line 9210 "MachineIndependent/glslang_tab.cpp" break; - case 385: /* type_specifier_nonarray: ITEXTURECUBEARRAY */ -#line 2732 "MachineIndependent/glslang.y" + case 384: /* type_specifier_nonarray: ITEXTURECUBEARRAY */ +#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.setTexture(EbtInt, EsdCube, true); } -#line 9237 "MachineIndependent/glslang_tab.cpp" +#line 9220 "MachineIndependent/glslang_tab.cpp" break; - case 386: /* type_specifier_nonarray: UTEXTURECUBEARRAY */ -#line 2737 "MachineIndependent/glslang.y" + case 385: /* type_specifier_nonarray: UTEXTURECUBEARRAY */ +#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.setTexture(EbtUint, EsdCube, true); } -#line 9247 "MachineIndependent/glslang_tab.cpp" +#line 9230 "MachineIndependent/glslang_tab.cpp" break; - case 387: /* type_specifier_nonarray: USAMPLER2DARRAY */ -#line 2743 "MachineIndependent/glslang.y" + case 386: /* type_specifier_nonarray: USAMPLER2DARRAY */ +#line 2735 "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 9257 "MachineIndependent/glslang_tab.cpp" +#line 9240 "MachineIndependent/glslang_tab.cpp" break; - case 388: /* type_specifier_nonarray: TEXTURE2D */ -#line 2748 "MachineIndependent/glslang.y" + case 387: /* type_specifier_nonarray: TEXTURE2D */ +#line 2740 "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 9267 "MachineIndependent/glslang_tab.cpp" +#line 9250 "MachineIndependent/glslang_tab.cpp" break; - case 389: /* type_specifier_nonarray: TEXTURE3D */ -#line 2753 "MachineIndependent/glslang.y" + case 388: /* type_specifier_nonarray: TEXTURE3D */ +#line 2745 "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 9277 "MachineIndependent/glslang_tab.cpp" +#line 9260 "MachineIndependent/glslang_tab.cpp" break; - case 390: /* type_specifier_nonarray: TEXTURE2DARRAY */ -#line 2758 "MachineIndependent/glslang.y" + case 389: /* type_specifier_nonarray: TEXTURE2DARRAY */ +#line 2750 "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 9287 "MachineIndependent/glslang_tab.cpp" +#line 9270 "MachineIndependent/glslang_tab.cpp" break; - case 391: /* type_specifier_nonarray: TEXTURECUBE */ -#line 2763 "MachineIndependent/glslang.y" + case 390: /* type_specifier_nonarray: TEXTURECUBE */ +#line 2755 "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 9297 "MachineIndependent/glslang_tab.cpp" +#line 9280 "MachineIndependent/glslang_tab.cpp" break; - case 392: /* type_specifier_nonarray: ITEXTURE2D */ -#line 2768 "MachineIndependent/glslang.y" + case 391: /* type_specifier_nonarray: ITEXTURE2D */ +#line 2760 "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 9307 "MachineIndependent/glslang_tab.cpp" +#line 9290 "MachineIndependent/glslang_tab.cpp" break; - case 393: /* type_specifier_nonarray: ITEXTURE3D */ -#line 2773 "MachineIndependent/glslang.y" + case 392: /* type_specifier_nonarray: ITEXTURE3D */ +#line 2765 "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 9317 "MachineIndependent/glslang_tab.cpp" +#line 9300 "MachineIndependent/glslang_tab.cpp" break; - case 394: /* type_specifier_nonarray: ITEXTURECUBE */ -#line 2778 "MachineIndependent/glslang.y" + case 393: /* type_specifier_nonarray: ITEXTURECUBE */ +#line 2770 "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 9327 "MachineIndependent/glslang_tab.cpp" +#line 9310 "MachineIndependent/glslang_tab.cpp" break; - case 395: /* type_specifier_nonarray: ITEXTURE2DARRAY */ -#line 2783 "MachineIndependent/glslang.y" + case 394: /* type_specifier_nonarray: ITEXTURE2DARRAY */ +#line 2775 "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 9337 "MachineIndependent/glslang_tab.cpp" +#line 9320 "MachineIndependent/glslang_tab.cpp" break; - case 396: /* type_specifier_nonarray: UTEXTURE2D */ -#line 2788 "MachineIndependent/glslang.y" + case 395: /* type_specifier_nonarray: UTEXTURE2D */ +#line 2780 "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 9347 "MachineIndependent/glslang_tab.cpp" +#line 9330 "MachineIndependent/glslang_tab.cpp" break; - case 397: /* type_specifier_nonarray: UTEXTURE3D */ -#line 2793 "MachineIndependent/glslang.y" + case 396: /* type_specifier_nonarray: UTEXTURE3D */ +#line 2785 "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 9357 "MachineIndependent/glslang_tab.cpp" +#line 9340 "MachineIndependent/glslang_tab.cpp" break; - case 398: /* type_specifier_nonarray: UTEXTURECUBE */ -#line 2798 "MachineIndependent/glslang.y" + case 397: /* type_specifier_nonarray: UTEXTURECUBE */ +#line 2790 "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 9367 "MachineIndependent/glslang_tab.cpp" +#line 9350 "MachineIndependent/glslang_tab.cpp" break; - case 399: /* type_specifier_nonarray: UTEXTURE2DARRAY */ -#line 2803 "MachineIndependent/glslang.y" + case 398: /* type_specifier_nonarray: UTEXTURE2DARRAY */ +#line 2795 "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 9377 "MachineIndependent/glslang_tab.cpp" +#line 9360 "MachineIndependent/glslang_tab.cpp" break; - case 400: /* type_specifier_nonarray: SAMPLER */ -#line 2808 "MachineIndependent/glslang.y" + case 399: /* type_specifier_nonarray: SAMPLER */ +#line 2800 "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 9387 "MachineIndependent/glslang_tab.cpp" +#line 9370 "MachineIndependent/glslang_tab.cpp" break; - case 401: /* type_specifier_nonarray: SAMPLERSHADOW */ -#line 2813 "MachineIndependent/glslang.y" + case 400: /* type_specifier_nonarray: SAMPLERSHADOW */ +#line 2805 "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 9397 "MachineIndependent/glslang_tab.cpp" +#line 9380 "MachineIndependent/glslang_tab.cpp" break; - case 402: /* type_specifier_nonarray: SAMPLER2DRECT */ -#line 2819 "MachineIndependent/glslang.y" + case 401: /* type_specifier_nonarray: SAMPLER2DRECT */ +#line 2811 "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 9407 "MachineIndependent/glslang_tab.cpp" +#line 9390 "MachineIndependent/glslang_tab.cpp" break; - case 403: /* type_specifier_nonarray: SAMPLER2DRECTSHADOW */ -#line 2824 "MachineIndependent/glslang.y" + case 402: /* type_specifier_nonarray: SAMPLER2DRECTSHADOW */ +#line 2816 "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 9417 "MachineIndependent/glslang_tab.cpp" +#line 9400 "MachineIndependent/glslang_tab.cpp" break; - case 404: /* type_specifier_nonarray: F16SAMPLER2DRECT */ -#line 2829 "MachineIndependent/glslang.y" + case 403: /* type_specifier_nonarray: F16SAMPLER2DRECT */ +#line 2821 "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 9428 "MachineIndependent/glslang_tab.cpp" +#line 9411 "MachineIndependent/glslang_tab.cpp" break; - case 405: /* type_specifier_nonarray: F16SAMPLER2DRECTSHADOW */ -#line 2835 "MachineIndependent/glslang.y" + case 404: /* type_specifier_nonarray: F16SAMPLER2DRECTSHADOW */ +#line 2827 "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 9439 "MachineIndependent/glslang_tab.cpp" +#line 9422 "MachineIndependent/glslang_tab.cpp" break; - case 406: /* type_specifier_nonarray: ISAMPLER2DRECT */ -#line 2841 "MachineIndependent/glslang.y" + case 405: /* type_specifier_nonarray: ISAMPLER2DRECT */ +#line 2833 "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 9449 "MachineIndependent/glslang_tab.cpp" +#line 9432 "MachineIndependent/glslang_tab.cpp" break; - case 407: /* type_specifier_nonarray: USAMPLER2DRECT */ -#line 2846 "MachineIndependent/glslang.y" + case 406: /* type_specifier_nonarray: USAMPLER2DRECT */ +#line 2838 "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 9459 "MachineIndependent/glslang_tab.cpp" +#line 9442 "MachineIndependent/glslang_tab.cpp" break; - case 408: /* type_specifier_nonarray: SAMPLERBUFFER */ -#line 2851 "MachineIndependent/glslang.y" + case 407: /* type_specifier_nonarray: SAMPLERBUFFER */ +#line 2843 "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 9469 "MachineIndependent/glslang_tab.cpp" +#line 9452 "MachineIndependent/glslang_tab.cpp" break; - case 409: /* type_specifier_nonarray: F16SAMPLERBUFFER */ -#line 2856 "MachineIndependent/glslang.y" + case 408: /* type_specifier_nonarray: F16SAMPLERBUFFER */ +#line 2848 "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 9480 "MachineIndependent/glslang_tab.cpp" +#line 9463 "MachineIndependent/glslang_tab.cpp" break; - case 410: /* type_specifier_nonarray: ISAMPLERBUFFER */ -#line 2862 "MachineIndependent/glslang.y" + case 409: /* type_specifier_nonarray: ISAMPLERBUFFER */ +#line 2854 "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 9490 "MachineIndependent/glslang_tab.cpp" +#line 9473 "MachineIndependent/glslang_tab.cpp" break; - case 411: /* type_specifier_nonarray: USAMPLERBUFFER */ -#line 2867 "MachineIndependent/glslang.y" + case 410: /* type_specifier_nonarray: USAMPLERBUFFER */ +#line 2859 "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 9500 "MachineIndependent/glslang_tab.cpp" +#line 9483 "MachineIndependent/glslang_tab.cpp" break; - case 412: /* type_specifier_nonarray: SAMPLER2DMS */ -#line 2872 "MachineIndependent/glslang.y" + case 411: /* type_specifier_nonarray: SAMPLER2DMS */ +#line 2864 "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 9510 "MachineIndependent/glslang_tab.cpp" +#line 9493 "MachineIndependent/glslang_tab.cpp" break; - case 413: /* type_specifier_nonarray: F16SAMPLER2DMS */ -#line 2877 "MachineIndependent/glslang.y" + case 412: /* type_specifier_nonarray: F16SAMPLER2DMS */ +#line 2869 "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 9521 "MachineIndependent/glslang_tab.cpp" +#line 9504 "MachineIndependent/glslang_tab.cpp" break; - case 414: /* type_specifier_nonarray: ISAMPLER2DMS */ -#line 2883 "MachineIndependent/glslang.y" + case 413: /* type_specifier_nonarray: ISAMPLER2DMS */ +#line 2875 "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 9531 "MachineIndependent/glslang_tab.cpp" +#line 9514 "MachineIndependent/glslang_tab.cpp" break; - case 415: /* type_specifier_nonarray: USAMPLER2DMS */ -#line 2888 "MachineIndependent/glslang.y" + case 414: /* type_specifier_nonarray: USAMPLER2DMS */ +#line 2880 "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 9541 "MachineIndependent/glslang_tab.cpp" +#line 9524 "MachineIndependent/glslang_tab.cpp" break; - case 416: /* type_specifier_nonarray: SAMPLER2DMSARRAY */ -#line 2893 "MachineIndependent/glslang.y" + case 415: /* type_specifier_nonarray: SAMPLER2DMSARRAY */ +#line 2885 "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 9551 "MachineIndependent/glslang_tab.cpp" +#line 9534 "MachineIndependent/glslang_tab.cpp" break; - case 417: /* type_specifier_nonarray: F16SAMPLER2DMSARRAY */ -#line 2898 "MachineIndependent/glslang.y" + case 416: /* type_specifier_nonarray: F16SAMPLER2DMSARRAY */ +#line 2890 "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 9562 "MachineIndependent/glslang_tab.cpp" +#line 9545 "MachineIndependent/glslang_tab.cpp" break; - case 418: /* type_specifier_nonarray: ISAMPLER2DMSARRAY */ -#line 2904 "MachineIndependent/glslang.y" + case 417: /* type_specifier_nonarray: ISAMPLER2DMSARRAY */ +#line 2896 "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 9572 "MachineIndependent/glslang_tab.cpp" +#line 9555 "MachineIndependent/glslang_tab.cpp" break; - case 419: /* type_specifier_nonarray: USAMPLER2DMSARRAY */ -#line 2909 "MachineIndependent/glslang.y" + case 418: /* type_specifier_nonarray: USAMPLER2DMSARRAY */ +#line 2901 "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 9582 "MachineIndependent/glslang_tab.cpp" +#line 9565 "MachineIndependent/glslang_tab.cpp" break; - case 420: /* type_specifier_nonarray: TEXTURE1D */ -#line 2914 "MachineIndependent/glslang.y" + case 419: /* type_specifier_nonarray: TEXTURE1D */ +#line 2906 "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 9592 "MachineIndependent/glslang_tab.cpp" +#line 9575 "MachineIndependent/glslang_tab.cpp" break; - case 421: /* type_specifier_nonarray: F16TEXTURE1D */ -#line 2919 "MachineIndependent/glslang.y" + case 420: /* type_specifier_nonarray: F16TEXTURE1D */ +#line 2911 "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 9603 "MachineIndependent/glslang_tab.cpp" +#line 9586 "MachineIndependent/glslang_tab.cpp" break; - case 422: /* type_specifier_nonarray: F16TEXTURE2D */ -#line 2925 "MachineIndependent/glslang.y" + case 421: /* type_specifier_nonarray: F16TEXTURE2D */ +#line 2917 "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 9614 "MachineIndependent/glslang_tab.cpp" +#line 9597 "MachineIndependent/glslang_tab.cpp" break; - case 423: /* type_specifier_nonarray: F16TEXTURE3D */ -#line 2931 "MachineIndependent/glslang.y" + case 422: /* type_specifier_nonarray: F16TEXTURE3D */ +#line 2923 "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 9625 "MachineIndependent/glslang_tab.cpp" +#line 9608 "MachineIndependent/glslang_tab.cpp" break; - case 424: /* type_specifier_nonarray: F16TEXTURECUBE */ -#line 2937 "MachineIndependent/glslang.y" + case 423: /* type_specifier_nonarray: F16TEXTURECUBE */ +#line 2929 "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 9636 "MachineIndependent/glslang_tab.cpp" +#line 9619 "MachineIndependent/glslang_tab.cpp" break; - case 425: /* type_specifier_nonarray: TEXTURE1DARRAY */ -#line 2943 "MachineIndependent/glslang.y" + case 424: /* type_specifier_nonarray: TEXTURE1DARRAY */ +#line 2935 "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 9646 "MachineIndependent/glslang_tab.cpp" +#line 9629 "MachineIndependent/glslang_tab.cpp" break; - case 426: /* type_specifier_nonarray: F16TEXTURE1DARRAY */ -#line 2948 "MachineIndependent/glslang.y" + case 425: /* type_specifier_nonarray: F16TEXTURE1DARRAY */ +#line 2940 "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 9657 "MachineIndependent/glslang_tab.cpp" +#line 9640 "MachineIndependent/glslang_tab.cpp" break; - case 427: /* type_specifier_nonarray: F16TEXTURE2DARRAY */ -#line 2954 "MachineIndependent/glslang.y" + case 426: /* type_specifier_nonarray: F16TEXTURE2DARRAY */ +#line 2946 "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 9668 "MachineIndependent/glslang_tab.cpp" +#line 9651 "MachineIndependent/glslang_tab.cpp" break; - case 428: /* type_specifier_nonarray: F16TEXTURECUBEARRAY */ -#line 2960 "MachineIndependent/glslang.y" + case 427: /* type_specifier_nonarray: F16TEXTURECUBEARRAY */ +#line 2952 "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 9679 "MachineIndependent/glslang_tab.cpp" +#line 9662 "MachineIndependent/glslang_tab.cpp" break; - case 429: /* type_specifier_nonarray: ITEXTURE1D */ -#line 2966 "MachineIndependent/glslang.y" + case 428: /* type_specifier_nonarray: ITEXTURE1D */ +#line 2958 "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 9689 "MachineIndependent/glslang_tab.cpp" +#line 9672 "MachineIndependent/glslang_tab.cpp" break; - case 430: /* type_specifier_nonarray: ITEXTURE1DARRAY */ -#line 2971 "MachineIndependent/glslang.y" + case 429: /* type_specifier_nonarray: ITEXTURE1DARRAY */ +#line 2963 "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 9699 "MachineIndependent/glslang_tab.cpp" +#line 9682 "MachineIndependent/glslang_tab.cpp" break; - case 431: /* type_specifier_nonarray: UTEXTURE1D */ -#line 2976 "MachineIndependent/glslang.y" + case 430: /* type_specifier_nonarray: UTEXTURE1D */ +#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(EbtUint, Esd1D); } -#line 9709 "MachineIndependent/glslang_tab.cpp" +#line 9692 "MachineIndependent/glslang_tab.cpp" break; - case 432: /* type_specifier_nonarray: UTEXTURE1DARRAY */ -#line 2981 "MachineIndependent/glslang.y" + case 431: /* type_specifier_nonarray: UTEXTURE1DARRAY */ +#line 2973 "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 9719 "MachineIndependent/glslang_tab.cpp" +#line 9702 "MachineIndependent/glslang_tab.cpp" break; - case 433: /* type_specifier_nonarray: TEXTURE2DRECT */ -#line 2986 "MachineIndependent/glslang.y" + case 432: /* type_specifier_nonarray: TEXTURE2DRECT */ +#line 2978 "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 9729 "MachineIndependent/glslang_tab.cpp" +#line 9712 "MachineIndependent/glslang_tab.cpp" break; - case 434: /* type_specifier_nonarray: F16TEXTURE2DRECT */ -#line 2991 "MachineIndependent/glslang.y" + case 433: /* type_specifier_nonarray: F16TEXTURE2DRECT */ +#line 2983 "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 9740 "MachineIndependent/glslang_tab.cpp" +#line 9723 "MachineIndependent/glslang_tab.cpp" break; - case 435: /* type_specifier_nonarray: ITEXTURE2DRECT */ -#line 2997 "MachineIndependent/glslang.y" + case 434: /* type_specifier_nonarray: ITEXTURE2DRECT */ +#line 2989 "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 9750 "MachineIndependent/glslang_tab.cpp" +#line 9733 "MachineIndependent/glslang_tab.cpp" break; - case 436: /* type_specifier_nonarray: UTEXTURE2DRECT */ -#line 3002 "MachineIndependent/glslang.y" + case 435: /* type_specifier_nonarray: UTEXTURE2DRECT */ +#line 2994 "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 9760 "MachineIndependent/glslang_tab.cpp" +#line 9743 "MachineIndependent/glslang_tab.cpp" break; - case 437: /* type_specifier_nonarray: TEXTUREBUFFER */ -#line 3007 "MachineIndependent/glslang.y" + case 436: /* type_specifier_nonarray: TEXTUREBUFFER */ +#line 2999 "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 9770 "MachineIndependent/glslang_tab.cpp" +#line 9753 "MachineIndependent/glslang_tab.cpp" break; - case 438: /* type_specifier_nonarray: F16TEXTUREBUFFER */ -#line 3012 "MachineIndependent/glslang.y" + case 437: /* type_specifier_nonarray: F16TEXTUREBUFFER */ +#line 3004 "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 9781 "MachineIndependent/glslang_tab.cpp" +#line 9764 "MachineIndependent/glslang_tab.cpp" break; - case 439: /* type_specifier_nonarray: ITEXTUREBUFFER */ -#line 3018 "MachineIndependent/glslang.y" + case 438: /* type_specifier_nonarray: ITEXTUREBUFFER */ +#line 3010 "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 9791 "MachineIndependent/glslang_tab.cpp" +#line 9774 "MachineIndependent/glslang_tab.cpp" break; - case 440: /* type_specifier_nonarray: UTEXTUREBUFFER */ -#line 3023 "MachineIndependent/glslang.y" + case 439: /* type_specifier_nonarray: UTEXTUREBUFFER */ +#line 3015 "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 9801 "MachineIndependent/glslang_tab.cpp" +#line 9784 "MachineIndependent/glslang_tab.cpp" break; - case 441: /* type_specifier_nonarray: TEXTURE2DMS */ -#line 3028 "MachineIndependent/glslang.y" + case 440: /* type_specifier_nonarray: TEXTURE2DMS */ +#line 3020 "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 9811 "MachineIndependent/glslang_tab.cpp" +#line 9794 "MachineIndependent/glslang_tab.cpp" break; - case 442: /* type_specifier_nonarray: F16TEXTURE2DMS */ -#line 3033 "MachineIndependent/glslang.y" + case 441: /* type_specifier_nonarray: F16TEXTURE2DMS */ +#line 3025 "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 9822 "MachineIndependent/glslang_tab.cpp" +#line 9805 "MachineIndependent/glslang_tab.cpp" break; - case 443: /* type_specifier_nonarray: ITEXTURE2DMS */ -#line 3039 "MachineIndependent/glslang.y" + case 442: /* type_specifier_nonarray: ITEXTURE2DMS */ +#line 3031 "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 9832 "MachineIndependent/glslang_tab.cpp" +#line 9815 "MachineIndependent/glslang_tab.cpp" break; - case 444: /* type_specifier_nonarray: UTEXTURE2DMS */ -#line 3044 "MachineIndependent/glslang.y" + case 443: /* type_specifier_nonarray: UTEXTURE2DMS */ +#line 3036 "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 9842 "MachineIndependent/glslang_tab.cpp" +#line 9825 "MachineIndependent/glslang_tab.cpp" break; - case 445: /* type_specifier_nonarray: TEXTURE2DMSARRAY */ -#line 3049 "MachineIndependent/glslang.y" + case 444: /* type_specifier_nonarray: TEXTURE2DMSARRAY */ +#line 3041 "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 9852 "MachineIndependent/glslang_tab.cpp" +#line 9835 "MachineIndependent/glslang_tab.cpp" break; - case 446: /* type_specifier_nonarray: F16TEXTURE2DMSARRAY */ -#line 3054 "MachineIndependent/glslang.y" + case 445: /* type_specifier_nonarray: F16TEXTURE2DMSARRAY */ +#line 3046 "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 9863 "MachineIndependent/glslang_tab.cpp" +#line 9846 "MachineIndependent/glslang_tab.cpp" break; - case 447: /* type_specifier_nonarray: ITEXTURE2DMSARRAY */ -#line 3060 "MachineIndependent/glslang.y" + case 446: /* type_specifier_nonarray: ITEXTURE2DMSARRAY */ +#line 3052 "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 9873 "MachineIndependent/glslang_tab.cpp" +#line 9856 "MachineIndependent/glslang_tab.cpp" break; - case 448: /* type_specifier_nonarray: UTEXTURE2DMSARRAY */ -#line 3065 "MachineIndependent/glslang.y" + case 447: /* type_specifier_nonarray: UTEXTURE2DMSARRAY */ +#line 3057 "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 9883 "MachineIndependent/glslang_tab.cpp" +#line 9866 "MachineIndependent/glslang_tab.cpp" break; - case 449: /* type_specifier_nonarray: IMAGE1D */ -#line 3070 "MachineIndependent/glslang.y" + case 448: /* type_specifier_nonarray: IMAGE1D */ +#line 3062 "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 9893 "MachineIndependent/glslang_tab.cpp" +#line 9876 "MachineIndependent/glslang_tab.cpp" break; - case 450: /* type_specifier_nonarray: F16IMAGE1D */ -#line 3075 "MachineIndependent/glslang.y" + case 449: /* type_specifier_nonarray: F16IMAGE1D */ +#line 3067 "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 9904 "MachineIndependent/glslang_tab.cpp" +#line 9887 "MachineIndependent/glslang_tab.cpp" break; - case 451: /* type_specifier_nonarray: IIMAGE1D */ -#line 3081 "MachineIndependent/glslang.y" + case 450: /* type_specifier_nonarray: IIMAGE1D */ +#line 3073 "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 9914 "MachineIndependent/glslang_tab.cpp" +#line 9897 "MachineIndependent/glslang_tab.cpp" break; - case 452: /* type_specifier_nonarray: UIMAGE1D */ -#line 3086 "MachineIndependent/glslang.y" + case 451: /* type_specifier_nonarray: UIMAGE1D */ +#line 3078 "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 9924 "MachineIndependent/glslang_tab.cpp" +#line 9907 "MachineIndependent/glslang_tab.cpp" break; - case 453: /* type_specifier_nonarray: IMAGE2D */ -#line 3091 "MachineIndependent/glslang.y" + case 452: /* type_specifier_nonarray: IMAGE2D */ +#line 3083 "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 9934 "MachineIndependent/glslang_tab.cpp" +#line 9917 "MachineIndependent/glslang_tab.cpp" break; - case 454: /* type_specifier_nonarray: F16IMAGE2D */ -#line 3096 "MachineIndependent/glslang.y" + case 453: /* type_specifier_nonarray: F16IMAGE2D */ +#line 3088 "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 9945 "MachineIndependent/glslang_tab.cpp" +#line 9928 "MachineIndependent/glslang_tab.cpp" break; - case 455: /* type_specifier_nonarray: IIMAGE2D */ -#line 3102 "MachineIndependent/glslang.y" + case 454: /* type_specifier_nonarray: IIMAGE2D */ +#line 3094 "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 9955 "MachineIndependent/glslang_tab.cpp" +#line 9938 "MachineIndependent/glslang_tab.cpp" break; - case 456: /* type_specifier_nonarray: UIMAGE2D */ -#line 3107 "MachineIndependent/glslang.y" + case 455: /* type_specifier_nonarray: UIMAGE2D */ +#line 3099 "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 9965 "MachineIndependent/glslang_tab.cpp" +#line 9948 "MachineIndependent/glslang_tab.cpp" break; - case 457: /* type_specifier_nonarray: IMAGE3D */ -#line 3112 "MachineIndependent/glslang.y" + case 456: /* type_specifier_nonarray: IMAGE3D */ +#line 3104 "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 9975 "MachineIndependent/glslang_tab.cpp" +#line 9958 "MachineIndependent/glslang_tab.cpp" break; - case 458: /* type_specifier_nonarray: F16IMAGE3D */ -#line 3117 "MachineIndependent/glslang.y" + case 457: /* type_specifier_nonarray: F16IMAGE3D */ +#line 3109 "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 9986 "MachineIndependent/glslang_tab.cpp" +#line 9969 "MachineIndependent/glslang_tab.cpp" break; - case 459: /* type_specifier_nonarray: IIMAGE3D */ -#line 3123 "MachineIndependent/glslang.y" + case 458: /* type_specifier_nonarray: IIMAGE3D */ +#line 3115 "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 9996 "MachineIndependent/glslang_tab.cpp" +#line 9979 "MachineIndependent/glslang_tab.cpp" break; - case 460: /* type_specifier_nonarray: UIMAGE3D */ -#line 3128 "MachineIndependent/glslang.y" + case 459: /* type_specifier_nonarray: UIMAGE3D */ +#line 3120 "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 10006 "MachineIndependent/glslang_tab.cpp" +#line 9989 "MachineIndependent/glslang_tab.cpp" break; - case 461: /* type_specifier_nonarray: IMAGE2DRECT */ -#line 3133 "MachineIndependent/glslang.y" + case 460: /* type_specifier_nonarray: IMAGE2DRECT */ +#line 3125 "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 10016 "MachineIndependent/glslang_tab.cpp" +#line 9999 "MachineIndependent/glslang_tab.cpp" break; - case 462: /* type_specifier_nonarray: F16IMAGE2DRECT */ -#line 3138 "MachineIndependent/glslang.y" + case 461: /* type_specifier_nonarray: F16IMAGE2DRECT */ +#line 3130 "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 10027 "MachineIndependent/glslang_tab.cpp" +#line 10010 "MachineIndependent/glslang_tab.cpp" break; - case 463: /* type_specifier_nonarray: IIMAGE2DRECT */ -#line 3144 "MachineIndependent/glslang.y" + case 462: /* type_specifier_nonarray: IIMAGE2DRECT */ +#line 3136 "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 10037 "MachineIndependent/glslang_tab.cpp" +#line 10020 "MachineIndependent/glslang_tab.cpp" break; - case 464: /* type_specifier_nonarray: UIMAGE2DRECT */ -#line 3149 "MachineIndependent/glslang.y" + case 463: /* type_specifier_nonarray: UIMAGE2DRECT */ +#line 3141 "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 10047 "MachineIndependent/glslang_tab.cpp" +#line 10030 "MachineIndependent/glslang_tab.cpp" break; - case 465: /* type_specifier_nonarray: IMAGECUBE */ -#line 3154 "MachineIndependent/glslang.y" + case 464: /* type_specifier_nonarray: IMAGECUBE */ +#line 3146 "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 10057 "MachineIndependent/glslang_tab.cpp" +#line 10040 "MachineIndependent/glslang_tab.cpp" break; - case 466: /* type_specifier_nonarray: F16IMAGECUBE */ -#line 3159 "MachineIndependent/glslang.y" + case 465: /* type_specifier_nonarray: F16IMAGECUBE */ +#line 3151 "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 10068 "MachineIndependent/glslang_tab.cpp" +#line 10051 "MachineIndependent/glslang_tab.cpp" break; - case 467: /* type_specifier_nonarray: IIMAGECUBE */ -#line 3165 "MachineIndependent/glslang.y" + case 466: /* type_specifier_nonarray: IIMAGECUBE */ +#line 3157 "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 10078 "MachineIndependent/glslang_tab.cpp" +#line 10061 "MachineIndependent/glslang_tab.cpp" break; - case 468: /* type_specifier_nonarray: UIMAGECUBE */ -#line 3170 "MachineIndependent/glslang.y" + case 467: /* type_specifier_nonarray: UIMAGECUBE */ +#line 3162 "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 10088 "MachineIndependent/glslang_tab.cpp" +#line 10071 "MachineIndependent/glslang_tab.cpp" break; - case 469: /* type_specifier_nonarray: IMAGEBUFFER */ -#line 3175 "MachineIndependent/glslang.y" + case 468: /* type_specifier_nonarray: IMAGEBUFFER */ +#line 3167 "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 10098 "MachineIndependent/glslang_tab.cpp" +#line 10081 "MachineIndependent/glslang_tab.cpp" break; - case 470: /* type_specifier_nonarray: F16IMAGEBUFFER */ -#line 3180 "MachineIndependent/glslang.y" + case 469: /* type_specifier_nonarray: F16IMAGEBUFFER */ +#line 3172 "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 10109 "MachineIndependent/glslang_tab.cpp" +#line 10092 "MachineIndependent/glslang_tab.cpp" break; - case 471: /* type_specifier_nonarray: IIMAGEBUFFER */ -#line 3186 "MachineIndependent/glslang.y" + case 470: /* type_specifier_nonarray: IIMAGEBUFFER */ +#line 3178 "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 10119 "MachineIndependent/glslang_tab.cpp" +#line 10102 "MachineIndependent/glslang_tab.cpp" break; - case 472: /* type_specifier_nonarray: UIMAGEBUFFER */ -#line 3191 "MachineIndependent/glslang.y" + case 471: /* type_specifier_nonarray: UIMAGEBUFFER */ +#line 3183 "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 10129 "MachineIndependent/glslang_tab.cpp" +#line 10112 "MachineIndependent/glslang_tab.cpp" break; - case 473: /* type_specifier_nonarray: IMAGE1DARRAY */ -#line 3196 "MachineIndependent/glslang.y" + case 472: /* type_specifier_nonarray: IMAGE1DARRAY */ +#line 3188 "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 10139 "MachineIndependent/glslang_tab.cpp" +#line 10122 "MachineIndependent/glslang_tab.cpp" break; - case 474: /* type_specifier_nonarray: F16IMAGE1DARRAY */ -#line 3201 "MachineIndependent/glslang.y" + case 473: /* type_specifier_nonarray: F16IMAGE1DARRAY */ +#line 3193 "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 10150 "MachineIndependent/glslang_tab.cpp" +#line 10133 "MachineIndependent/glslang_tab.cpp" break; - case 475: /* type_specifier_nonarray: IIMAGE1DARRAY */ -#line 3207 "MachineIndependent/glslang.y" + case 474: /* type_specifier_nonarray: IIMAGE1DARRAY */ +#line 3199 "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 10160 "MachineIndependent/glslang_tab.cpp" +#line 10143 "MachineIndependent/glslang_tab.cpp" break; - case 476: /* type_specifier_nonarray: UIMAGE1DARRAY */ -#line 3212 "MachineIndependent/glslang.y" + case 475: /* type_specifier_nonarray: UIMAGE1DARRAY */ +#line 3204 "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 10170 "MachineIndependent/glslang_tab.cpp" +#line 10153 "MachineIndependent/glslang_tab.cpp" break; - case 477: /* type_specifier_nonarray: IMAGE2DARRAY */ -#line 3217 "MachineIndependent/glslang.y" + case 476: /* type_specifier_nonarray: IMAGE2DARRAY */ +#line 3209 "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 10180 "MachineIndependent/glslang_tab.cpp" +#line 10163 "MachineIndependent/glslang_tab.cpp" break; - case 478: /* type_specifier_nonarray: F16IMAGE2DARRAY */ -#line 3222 "MachineIndependent/glslang.y" + case 477: /* type_specifier_nonarray: F16IMAGE2DARRAY */ +#line 3214 "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 10191 "MachineIndependent/glslang_tab.cpp" +#line 10174 "MachineIndependent/glslang_tab.cpp" break; - case 479: /* type_specifier_nonarray: IIMAGE2DARRAY */ -#line 3228 "MachineIndependent/glslang.y" + case 478: /* type_specifier_nonarray: IIMAGE2DARRAY */ +#line 3220 "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 10201 "MachineIndependent/glslang_tab.cpp" +#line 10184 "MachineIndependent/glslang_tab.cpp" break; - case 480: /* type_specifier_nonarray: UIMAGE2DARRAY */ -#line 3233 "MachineIndependent/glslang.y" + case 479: /* type_specifier_nonarray: UIMAGE2DARRAY */ +#line 3225 "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 10211 "MachineIndependent/glslang_tab.cpp" +#line 10194 "MachineIndependent/glslang_tab.cpp" break; - case 481: /* type_specifier_nonarray: IMAGECUBEARRAY */ -#line 3238 "MachineIndependent/glslang.y" + case 480: /* type_specifier_nonarray: IMAGECUBEARRAY */ +#line 3230 "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 10221 "MachineIndependent/glslang_tab.cpp" +#line 10204 "MachineIndependent/glslang_tab.cpp" break; - case 482: /* type_specifier_nonarray: F16IMAGECUBEARRAY */ -#line 3243 "MachineIndependent/glslang.y" + case 481: /* type_specifier_nonarray: F16IMAGECUBEARRAY */ +#line 3235 "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 10232 "MachineIndependent/glslang_tab.cpp" +#line 10215 "MachineIndependent/glslang_tab.cpp" break; - case 483: /* type_specifier_nonarray: IIMAGECUBEARRAY */ -#line 3249 "MachineIndependent/glslang.y" + case 482: /* type_specifier_nonarray: IIMAGECUBEARRAY */ +#line 3241 "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 10242 "MachineIndependent/glslang_tab.cpp" +#line 10225 "MachineIndependent/glslang_tab.cpp" break; - case 484: /* type_specifier_nonarray: UIMAGECUBEARRAY */ -#line 3254 "MachineIndependent/glslang.y" + case 483: /* type_specifier_nonarray: UIMAGECUBEARRAY */ +#line 3246 "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 10252 "MachineIndependent/glslang_tab.cpp" +#line 10235 "MachineIndependent/glslang_tab.cpp" break; - case 485: /* type_specifier_nonarray: IMAGE2DMS */ -#line 3259 "MachineIndependent/glslang.y" + case 484: /* type_specifier_nonarray: IMAGE2DMS */ +#line 3251 "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 10262 "MachineIndependent/glslang_tab.cpp" +#line 10245 "MachineIndependent/glslang_tab.cpp" break; - case 486: /* type_specifier_nonarray: F16IMAGE2DMS */ -#line 3264 "MachineIndependent/glslang.y" + case 485: /* type_specifier_nonarray: F16IMAGE2DMS */ +#line 3256 "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 10273 "MachineIndependent/glslang_tab.cpp" +#line 10256 "MachineIndependent/glslang_tab.cpp" break; - case 487: /* type_specifier_nonarray: IIMAGE2DMS */ -#line 3270 "MachineIndependent/glslang.y" + case 486: /* type_specifier_nonarray: IIMAGE2DMS */ +#line 3262 "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 10283 "MachineIndependent/glslang_tab.cpp" +#line 10266 "MachineIndependent/glslang_tab.cpp" break; - case 488: /* type_specifier_nonarray: UIMAGE2DMS */ -#line 3275 "MachineIndependent/glslang.y" + case 487: /* type_specifier_nonarray: UIMAGE2DMS */ +#line 3267 "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 10293 "MachineIndependent/glslang_tab.cpp" +#line 10276 "MachineIndependent/glslang_tab.cpp" break; - case 489: /* type_specifier_nonarray: IMAGE2DMSARRAY */ -#line 3280 "MachineIndependent/glslang.y" + case 488: /* type_specifier_nonarray: IMAGE2DMSARRAY */ +#line 3272 "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 10303 "MachineIndependent/glslang_tab.cpp" +#line 10286 "MachineIndependent/glslang_tab.cpp" break; - case 490: /* type_specifier_nonarray: F16IMAGE2DMSARRAY */ -#line 3285 "MachineIndependent/glslang.y" + case 489: /* type_specifier_nonarray: F16IMAGE2DMSARRAY */ +#line 3277 "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 10314 "MachineIndependent/glslang_tab.cpp" +#line 10297 "MachineIndependent/glslang_tab.cpp" break; - case 491: /* type_specifier_nonarray: IIMAGE2DMSARRAY */ -#line 3291 "MachineIndependent/glslang.y" + case 490: /* type_specifier_nonarray: IIMAGE2DMSARRAY */ +#line 3283 "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 10324 "MachineIndependent/glslang_tab.cpp" +#line 10307 "MachineIndependent/glslang_tab.cpp" break; - case 492: /* type_specifier_nonarray: UIMAGE2DMSARRAY */ -#line 3296 "MachineIndependent/glslang.y" + case 491: /* type_specifier_nonarray: UIMAGE2DMSARRAY */ +#line 3288 "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 10334 "MachineIndependent/glslang_tab.cpp" +#line 10317 "MachineIndependent/glslang_tab.cpp" break; - case 493: /* type_specifier_nonarray: I64IMAGE1D */ -#line 3301 "MachineIndependent/glslang.y" + case 492: /* type_specifier_nonarray: I64IMAGE1D */ +#line 3293 "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 10344 "MachineIndependent/glslang_tab.cpp" +#line 10327 "MachineIndependent/glslang_tab.cpp" break; - case 494: /* type_specifier_nonarray: U64IMAGE1D */ -#line 3306 "MachineIndependent/glslang.y" + case 493: /* type_specifier_nonarray: U64IMAGE1D */ +#line 3298 "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 10354 "MachineIndependent/glslang_tab.cpp" +#line 10337 "MachineIndependent/glslang_tab.cpp" break; - case 495: /* type_specifier_nonarray: I64IMAGE2D */ -#line 3311 "MachineIndependent/glslang.y" + case 494: /* type_specifier_nonarray: I64IMAGE2D */ +#line 3303 "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 10364 "MachineIndependent/glslang_tab.cpp" +#line 10347 "MachineIndependent/glslang_tab.cpp" break; - case 496: /* type_specifier_nonarray: U64IMAGE2D */ -#line 3316 "MachineIndependent/glslang.y" + case 495: /* type_specifier_nonarray: U64IMAGE2D */ +#line 3308 "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 10374 "MachineIndependent/glslang_tab.cpp" +#line 10357 "MachineIndependent/glslang_tab.cpp" break; - case 497: /* type_specifier_nonarray: I64IMAGE3D */ -#line 3321 "MachineIndependent/glslang.y" + case 496: /* type_specifier_nonarray: I64IMAGE3D */ +#line 3313 "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 10384 "MachineIndependent/glslang_tab.cpp" +#line 10367 "MachineIndependent/glslang_tab.cpp" break; - case 498: /* type_specifier_nonarray: U64IMAGE3D */ -#line 3326 "MachineIndependent/glslang.y" + case 497: /* type_specifier_nonarray: U64IMAGE3D */ +#line 3318 "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 10394 "MachineIndependent/glslang_tab.cpp" +#line 10377 "MachineIndependent/glslang_tab.cpp" break; - case 499: /* type_specifier_nonarray: I64IMAGE2DRECT */ -#line 3331 "MachineIndependent/glslang.y" + case 498: /* type_specifier_nonarray: I64IMAGE2DRECT */ +#line 3323 "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 10404 "MachineIndependent/glslang_tab.cpp" +#line 10387 "MachineIndependent/glslang_tab.cpp" break; - case 500: /* type_specifier_nonarray: U64IMAGE2DRECT */ -#line 3336 "MachineIndependent/glslang.y" + case 499: /* type_specifier_nonarray: U64IMAGE2DRECT */ +#line 3328 "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 10414 "MachineIndependent/glslang_tab.cpp" +#line 10397 "MachineIndependent/glslang_tab.cpp" break; - case 501: /* type_specifier_nonarray: I64IMAGECUBE */ -#line 3341 "MachineIndependent/glslang.y" + case 500: /* type_specifier_nonarray: I64IMAGECUBE */ +#line 3333 "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 10424 "MachineIndependent/glslang_tab.cpp" +#line 10407 "MachineIndependent/glslang_tab.cpp" break; - case 502: /* type_specifier_nonarray: U64IMAGECUBE */ -#line 3346 "MachineIndependent/glslang.y" + case 501: /* type_specifier_nonarray: U64IMAGECUBE */ +#line 3338 "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 10434 "MachineIndependent/glslang_tab.cpp" +#line 10417 "MachineIndependent/glslang_tab.cpp" break; - case 503: /* type_specifier_nonarray: I64IMAGEBUFFER */ -#line 3351 "MachineIndependent/glslang.y" + case 502: /* type_specifier_nonarray: I64IMAGEBUFFER */ +#line 3343 "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 10444 "MachineIndependent/glslang_tab.cpp" +#line 10427 "MachineIndependent/glslang_tab.cpp" break; - case 504: /* type_specifier_nonarray: U64IMAGEBUFFER */ -#line 3356 "MachineIndependent/glslang.y" + case 503: /* type_specifier_nonarray: U64IMAGEBUFFER */ +#line 3348 "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 10454 "MachineIndependent/glslang_tab.cpp" +#line 10437 "MachineIndependent/glslang_tab.cpp" break; - case 505: /* type_specifier_nonarray: I64IMAGE1DARRAY */ -#line 3361 "MachineIndependent/glslang.y" + case 504: /* type_specifier_nonarray: I64IMAGE1DARRAY */ +#line 3353 "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 10464 "MachineIndependent/glslang_tab.cpp" +#line 10447 "MachineIndependent/glslang_tab.cpp" break; - case 506: /* type_specifier_nonarray: U64IMAGE1DARRAY */ -#line 3366 "MachineIndependent/glslang.y" + case 505: /* type_specifier_nonarray: U64IMAGE1DARRAY */ +#line 3358 "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 10474 "MachineIndependent/glslang_tab.cpp" +#line 10457 "MachineIndependent/glslang_tab.cpp" break; - case 507: /* type_specifier_nonarray: I64IMAGE2DARRAY */ -#line 3371 "MachineIndependent/glslang.y" + case 506: /* type_specifier_nonarray: I64IMAGE2DARRAY */ +#line 3363 "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 10484 "MachineIndependent/glslang_tab.cpp" +#line 10467 "MachineIndependent/glslang_tab.cpp" break; - case 508: /* type_specifier_nonarray: U64IMAGE2DARRAY */ -#line 3376 "MachineIndependent/glslang.y" + case 507: /* type_specifier_nonarray: U64IMAGE2DARRAY */ +#line 3368 "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 10494 "MachineIndependent/glslang_tab.cpp" +#line 10477 "MachineIndependent/glslang_tab.cpp" break; - case 509: /* type_specifier_nonarray: I64IMAGECUBEARRAY */ -#line 3381 "MachineIndependent/glslang.y" + case 508: /* type_specifier_nonarray: I64IMAGECUBEARRAY */ +#line 3373 "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 10504 "MachineIndependent/glslang_tab.cpp" +#line 10487 "MachineIndependent/glslang_tab.cpp" break; - case 510: /* type_specifier_nonarray: U64IMAGECUBEARRAY */ -#line 3386 "MachineIndependent/glslang.y" + case 509: /* type_specifier_nonarray: U64IMAGECUBEARRAY */ +#line 3378 "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 10514 "MachineIndependent/glslang_tab.cpp" +#line 10497 "MachineIndependent/glslang_tab.cpp" break; - case 511: /* type_specifier_nonarray: I64IMAGE2DMS */ -#line 3391 "MachineIndependent/glslang.y" + case 510: /* type_specifier_nonarray: I64IMAGE2DMS */ +#line 3383 "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 10524 "MachineIndependent/glslang_tab.cpp" +#line 10507 "MachineIndependent/glslang_tab.cpp" break; - case 512: /* type_specifier_nonarray: U64IMAGE2DMS */ -#line 3396 "MachineIndependent/glslang.y" + case 511: /* type_specifier_nonarray: U64IMAGE2DMS */ +#line 3388 "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 10534 "MachineIndependent/glslang_tab.cpp" +#line 10517 "MachineIndependent/glslang_tab.cpp" break; - case 513: /* type_specifier_nonarray: I64IMAGE2DMSARRAY */ -#line 3401 "MachineIndependent/glslang.y" + case 512: /* type_specifier_nonarray: I64IMAGE2DMSARRAY */ +#line 3393 "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 10544 "MachineIndependent/glslang_tab.cpp" +#line 10527 "MachineIndependent/glslang_tab.cpp" break; - case 514: /* type_specifier_nonarray: U64IMAGE2DMSARRAY */ -#line 3406 "MachineIndependent/glslang.y" + case 513: /* type_specifier_nonarray: U64IMAGE2DMSARRAY */ +#line 3398 "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 10554 "MachineIndependent/glslang_tab.cpp" +#line 10537 "MachineIndependent/glslang_tab.cpp" break; - case 515: /* type_specifier_nonarray: SAMPLEREXTERNALOES */ -#line 3411 "MachineIndependent/glslang.y" + case 514: /* type_specifier_nonarray: SAMPLEREXTERNALOES */ +#line 3403 "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 10565 "MachineIndependent/glslang_tab.cpp" +#line 10548 "MachineIndependent/glslang_tab.cpp" break; - case 516: /* type_specifier_nonarray: SAMPLEREXTERNAL2DY2YEXT */ -#line 3417 "MachineIndependent/glslang.y" + case 515: /* type_specifier_nonarray: SAMPLEREXTERNAL2DY2YEXT */ +#line 3409 "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 10576 "MachineIndependent/glslang_tab.cpp" +#line 10559 "MachineIndependent/glslang_tab.cpp" break; - case 517: /* type_specifier_nonarray: SUBPASSINPUT */ -#line 3423 "MachineIndependent/glslang.y" + case 516: /* type_specifier_nonarray: SUBPASSINPUT */ +#line 3415 "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 10587 "MachineIndependent/glslang_tab.cpp" +#line 10570 "MachineIndependent/glslang_tab.cpp" break; - case 518: /* type_specifier_nonarray: SUBPASSINPUTMS */ -#line 3429 "MachineIndependent/glslang.y" + case 517: /* type_specifier_nonarray: SUBPASSINPUTMS */ +#line 3421 "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 10598 "MachineIndependent/glslang_tab.cpp" +#line 10581 "MachineIndependent/glslang_tab.cpp" break; - case 519: /* type_specifier_nonarray: F16SUBPASSINPUT */ -#line 3435 "MachineIndependent/glslang.y" + case 518: /* type_specifier_nonarray: F16SUBPASSINPUT */ +#line 3427 "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"); @@ -10606,11 +10589,11 @@ yyreduce: (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setSubpass(EbtFloat16); } -#line 10610 "MachineIndependent/glslang_tab.cpp" +#line 10593 "MachineIndependent/glslang_tab.cpp" break; - case 520: /* type_specifier_nonarray: F16SUBPASSINPUTMS */ -#line 3442 "MachineIndependent/glslang.y" + case 519: /* type_specifier_nonarray: F16SUBPASSINPUTMS */ +#line 3434 "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"); @@ -10618,107 +10601,107 @@ yyreduce: (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setSubpass(EbtFloat16, true); } -#line 10622 "MachineIndependent/glslang_tab.cpp" +#line 10605 "MachineIndependent/glslang_tab.cpp" break; - case 521: /* type_specifier_nonarray: ISUBPASSINPUT */ -#line 3449 "MachineIndependent/glslang.y" + case 520: /* type_specifier_nonarray: ISUBPASSINPUT */ +#line 3441 "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 10633 "MachineIndependent/glslang_tab.cpp" +#line 10616 "MachineIndependent/glslang_tab.cpp" break; - case 522: /* type_specifier_nonarray: ISUBPASSINPUTMS */ -#line 3455 "MachineIndependent/glslang.y" + case 521: /* type_specifier_nonarray: ISUBPASSINPUTMS */ +#line 3447 "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 10644 "MachineIndependent/glslang_tab.cpp" +#line 10627 "MachineIndependent/glslang_tab.cpp" break; - case 523: /* type_specifier_nonarray: USUBPASSINPUT */ -#line 3461 "MachineIndependent/glslang.y" + case 522: /* type_specifier_nonarray: USUBPASSINPUT */ +#line 3453 "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 10655 "MachineIndependent/glslang_tab.cpp" +#line 10638 "MachineIndependent/glslang_tab.cpp" break; - case 524: /* type_specifier_nonarray: USUBPASSINPUTMS */ -#line 3467 "MachineIndependent/glslang.y" + case 523: /* type_specifier_nonarray: USUBPASSINPUTMS */ +#line 3459 "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 10666 "MachineIndependent/glslang_tab.cpp" +#line 10649 "MachineIndependent/glslang_tab.cpp" break; - case 525: /* type_specifier_nonarray: FCOOPMATNV */ -#line 3473 "MachineIndependent/glslang.y" + case 524: /* type_specifier_nonarray: FCOOPMATNV */ +#line 3465 "MachineIndependent/glslang.y" { parseContext.fcoopmatCheck((yyvsp[0].lex).loc, "fcoopmatNV", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat; (yyval.interm.type).coopmat = true; } -#line 10677 "MachineIndependent/glslang_tab.cpp" +#line 10660 "MachineIndependent/glslang_tab.cpp" break; - case 526: /* type_specifier_nonarray: ICOOPMATNV */ -#line 3479 "MachineIndependent/glslang.y" + case 525: /* type_specifier_nonarray: ICOOPMATNV */ +#line 3471 "MachineIndependent/glslang.y" { parseContext.intcoopmatCheck((yyvsp[0].lex).loc, "icoopmatNV", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtInt; (yyval.interm.type).coopmat = true; } -#line 10688 "MachineIndependent/glslang_tab.cpp" +#line 10671 "MachineIndependent/glslang_tab.cpp" break; - case 527: /* type_specifier_nonarray: UCOOPMATNV */ -#line 3485 "MachineIndependent/glslang.y" + case 526: /* type_specifier_nonarray: UCOOPMATNV */ +#line 3477 "MachineIndependent/glslang.y" { parseContext.intcoopmatCheck((yyvsp[0].lex).loc, "ucoopmatNV", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtUint; (yyval.interm.type).coopmat = true; } -#line 10699 "MachineIndependent/glslang_tab.cpp" +#line 10682 "MachineIndependent/glslang_tab.cpp" break; - case 528: /* type_specifier_nonarray: spirv_type_specifier */ -#line 3491 "MachineIndependent/glslang.y" + case 527: /* type_specifier_nonarray: spirv_type_specifier */ +#line 3483 "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 10708 "MachineIndependent/glslang_tab.cpp" +#line 10691 "MachineIndependent/glslang_tab.cpp" break; - case 529: /* type_specifier_nonarray: struct_specifier */ -#line 3496 "MachineIndependent/glslang.y" + case 528: /* type_specifier_nonarray: struct_specifier */ +#line 3488 "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 10718 "MachineIndependent/glslang_tab.cpp" +#line 10701 "MachineIndependent/glslang_tab.cpp" break; - case 530: /* type_specifier_nonarray: TYPE_NAME */ -#line 3501 "MachineIndependent/glslang.y" + case 529: /* type_specifier_nonarray: TYPE_NAME */ +#line 3493 "MachineIndependent/glslang.y" { // // This is for user defined type names. The lexical phase looked up the @@ -10732,47 +10715,47 @@ yyreduce: } else parseContext.error((yyvsp[0].lex).loc, "expected type name", (yyvsp[0].lex).string->c_str(), ""); } -#line 10736 "MachineIndependent/glslang_tab.cpp" +#line 10719 "MachineIndependent/glslang_tab.cpp" break; - case 531: /* precision_qualifier: HIGH_PRECISION */ -#line 3517 "MachineIndependent/glslang.y" + case 530: /* precision_qualifier: HIGH_PRECISION */ +#line 3509 "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 10746 "MachineIndependent/glslang_tab.cpp" +#line 10729 "MachineIndependent/glslang_tab.cpp" break; - case 532: /* precision_qualifier: MEDIUM_PRECISION */ -#line 3522 "MachineIndependent/glslang.y" + case 531: /* precision_qualifier: MEDIUM_PRECISION */ +#line 3514 "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 10756 "MachineIndependent/glslang_tab.cpp" +#line 10739 "MachineIndependent/glslang_tab.cpp" break; - case 533: /* precision_qualifier: LOW_PRECISION */ -#line 3527 "MachineIndependent/glslang.y" + case 532: /* precision_qualifier: LOW_PRECISION */ +#line 3519 "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 10766 "MachineIndependent/glslang_tab.cpp" +#line 10749 "MachineIndependent/glslang_tab.cpp" break; - case 534: /* $@3: %empty */ -#line 3535 "MachineIndependent/glslang.y" + case 533: /* $@3: %empty */ +#line 3527 "MachineIndependent/glslang.y" { parseContext.nestedStructCheck((yyvsp[-2].lex).loc); } -#line 10772 "MachineIndependent/glslang_tab.cpp" +#line 10755 "MachineIndependent/glslang_tab.cpp" break; - case 535: /* struct_specifier: STRUCT IDENTIFIER LEFT_BRACE $@3 struct_declaration_list RIGHT_BRACE */ -#line 3535 "MachineIndependent/glslang.y" + case 534: /* struct_specifier: STRUCT IDENTIFIER LEFT_BRACE $@3 struct_declaration_list RIGHT_BRACE */ +#line 3527 "MachineIndependent/glslang.y" { TType* structure = new TType((yyvsp[-1].interm.typeList), *(yyvsp[-4].lex).string); parseContext.structArrayCheck((yyvsp[-4].lex).loc, *structure); @@ -10784,17 +10767,17 @@ yyreduce: (yyval.interm.type).userDef = structure; --parseContext.structNestingLevel; } -#line 10788 "MachineIndependent/glslang_tab.cpp" +#line 10771 "MachineIndependent/glslang_tab.cpp" break; - case 536: /* $@4: %empty */ -#line 3546 "MachineIndependent/glslang.y" + case 535: /* $@4: %empty */ +#line 3538 "MachineIndependent/glslang.y" { parseContext.nestedStructCheck((yyvsp[-1].lex).loc); } -#line 10794 "MachineIndependent/glslang_tab.cpp" +#line 10777 "MachineIndependent/glslang_tab.cpp" break; - case 537: /* struct_specifier: STRUCT LEFT_BRACE $@4 struct_declaration_list RIGHT_BRACE */ -#line 3546 "MachineIndependent/glslang.y" + case 536: /* struct_specifier: STRUCT LEFT_BRACE $@4 struct_declaration_list RIGHT_BRACE */ +#line 3538 "MachineIndependent/glslang.y" { TType* structure = new TType((yyvsp[-1].interm.typeList), TString("")); (yyval.interm.type).init((yyvsp[-4].lex).loc); @@ -10802,19 +10785,19 @@ yyreduce: (yyval.interm.type).userDef = structure; --parseContext.structNestingLevel; } -#line 10806 "MachineIndependent/glslang_tab.cpp" +#line 10789 "MachineIndependent/glslang_tab.cpp" break; - case 538: /* struct_declaration_list: struct_declaration */ -#line 3556 "MachineIndependent/glslang.y" + case 537: /* struct_declaration_list: struct_declaration */ +#line 3548 "MachineIndependent/glslang.y" { (yyval.interm.typeList) = (yyvsp[0].interm.typeList); } -#line 10814 "MachineIndependent/glslang_tab.cpp" +#line 10797 "MachineIndependent/glslang_tab.cpp" break; - case 539: /* struct_declaration_list: struct_declaration_list struct_declaration */ -#line 3559 "MachineIndependent/glslang.y" + case 538: /* struct_declaration_list: struct_declaration_list struct_declaration */ +#line 3551 "MachineIndependent/glslang.y" { (yyval.interm.typeList) = (yyvsp[-1].interm.typeList); for (unsigned int i = 0; i < (yyvsp[0].interm.typeList)->size(); ++i) { @@ -10825,11 +10808,11 @@ yyreduce: (yyval.interm.typeList)->push_back((*(yyvsp[0].interm.typeList))[i]); } } -#line 10829 "MachineIndependent/glslang_tab.cpp" +#line 10812 "MachineIndependent/glslang_tab.cpp" break; - case 540: /* struct_declaration: type_specifier struct_declarator_list SEMICOLON */ -#line 3572 "MachineIndependent/glslang.y" + case 539: /* struct_declaration: type_specifier struct_declarator_list SEMICOLON */ +#line 3564 "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"); @@ -10852,11 +10835,11 @@ yyreduce: (*(yyval.interm.typeList))[i].type->shallowCopy(type); } } -#line 10856 "MachineIndependent/glslang_tab.cpp" +#line 10839 "MachineIndependent/glslang_tab.cpp" break; - case 541: /* struct_declaration: type_qualifier type_specifier struct_declarator_list SEMICOLON */ -#line 3594 "MachineIndependent/glslang.y" + case 540: /* struct_declaration: type_qualifier type_specifier struct_declarator_list SEMICOLON */ +#line 3586 "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"); @@ -10881,38 +10864,38 @@ yyreduce: (*(yyval.interm.typeList))[i].type->shallowCopy(type); } } -#line 10885 "MachineIndependent/glslang_tab.cpp" +#line 10868 "MachineIndependent/glslang_tab.cpp" break; - case 542: /* struct_declarator_list: struct_declarator */ -#line 3621 "MachineIndependent/glslang.y" + case 541: /* struct_declarator_list: struct_declarator */ +#line 3613 "MachineIndependent/glslang.y" { (yyval.interm.typeList) = new TTypeList; (yyval.interm.typeList)->push_back((yyvsp[0].interm.typeLine)); } -#line 10894 "MachineIndependent/glslang_tab.cpp" +#line 10877 "MachineIndependent/glslang_tab.cpp" break; - case 543: /* struct_declarator_list: struct_declarator_list COMMA struct_declarator */ -#line 3625 "MachineIndependent/glslang.y" + case 542: /* struct_declarator_list: struct_declarator_list COMMA struct_declarator */ +#line 3617 "MachineIndependent/glslang.y" { (yyval.interm.typeList)->push_back((yyvsp[0].interm.typeLine)); } -#line 10902 "MachineIndependent/glslang_tab.cpp" +#line 10885 "MachineIndependent/glslang_tab.cpp" break; - case 544: /* struct_declarator: IDENTIFIER */ -#line 3631 "MachineIndependent/glslang.y" + case 543: /* struct_declarator: IDENTIFIER */ +#line 3623 "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 10912 "MachineIndependent/glslang_tab.cpp" +#line 10895 "MachineIndependent/glslang_tab.cpp" break; - case 545: /* struct_declarator: IDENTIFIER array_specifier */ -#line 3636 "MachineIndependent/glslang.y" + case 544: /* struct_declarator: IDENTIFIER array_specifier */ +#line 3628 "MachineIndependent/glslang.y" { parseContext.arrayOfArrayVersionCheck((yyvsp[-1].lex).loc, (yyvsp[0].interm).arraySizes); @@ -10921,246 +10904,246 @@ yyreduce: (yyval.interm.typeLine).type->setFieldName(*(yyvsp[-1].lex).string); (yyval.interm.typeLine).type->transferArraySizes((yyvsp[0].interm).arraySizes); } -#line 10925 "MachineIndependent/glslang_tab.cpp" +#line 10908 "MachineIndependent/glslang_tab.cpp" break; - case 546: /* initializer: assignment_expression */ -#line 3647 "MachineIndependent/glslang.y" + case 545: /* initializer: assignment_expression */ +#line 3639 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 10933 "MachineIndependent/glslang_tab.cpp" +#line 10916 "MachineIndependent/glslang_tab.cpp" break; - case 547: /* initializer: LEFT_BRACE initializer_list RIGHT_BRACE */ -#line 3651 "MachineIndependent/glslang.y" + case 546: /* initializer: LEFT_BRACE initializer_list RIGHT_BRACE */ +#line 3643 "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 10944 "MachineIndependent/glslang_tab.cpp" +#line 10927 "MachineIndependent/glslang_tab.cpp" break; - case 548: /* initializer: LEFT_BRACE initializer_list COMMA RIGHT_BRACE */ -#line 3657 "MachineIndependent/glslang.y" + case 547: /* initializer: LEFT_BRACE initializer_list COMMA RIGHT_BRACE */ +#line 3649 "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 10955 "MachineIndependent/glslang_tab.cpp" +#line 10938 "MachineIndependent/glslang_tab.cpp" break; - case 549: /* initializer: LEFT_BRACE RIGHT_BRACE */ -#line 3663 "MachineIndependent/glslang.y" + case 548: /* initializer: LEFT_BRACE RIGHT_BRACE */ +#line 3655 "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 10966 "MachineIndependent/glslang_tab.cpp" +#line 10949 "MachineIndependent/glslang_tab.cpp" break; - case 550: /* initializer_list: initializer */ -#line 3674 "MachineIndependent/glslang.y" + case 549: /* initializer_list: initializer */ +#line 3666 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = parseContext.intermediate.growAggregate(0, (yyvsp[0].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)->getLoc()); } -#line 10974 "MachineIndependent/glslang_tab.cpp" +#line 10957 "MachineIndependent/glslang_tab.cpp" break; - case 551: /* initializer_list: initializer_list COMMA initializer */ -#line 3677 "MachineIndependent/glslang.y" + case 550: /* initializer_list: initializer_list COMMA initializer */ +#line 3669 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = parseContext.intermediate.growAggregate((yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); } -#line 10982 "MachineIndependent/glslang_tab.cpp" +#line 10965 "MachineIndependent/glslang_tab.cpp" break; - case 552: /* declaration_statement: declaration */ -#line 3684 "MachineIndependent/glslang.y" + case 551: /* declaration_statement: declaration */ +#line 3676 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 10988 "MachineIndependent/glslang_tab.cpp" +#line 10971 "MachineIndependent/glslang_tab.cpp" break; - case 553: /* statement: compound_statement */ + case 552: /* statement: compound_statement */ +#line 3680 "MachineIndependent/glslang.y" + { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } +#line 10977 "MachineIndependent/glslang_tab.cpp" + break; + + case 553: /* statement: simple_statement */ +#line 3681 "MachineIndependent/glslang.y" + { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } +#line 10983 "MachineIndependent/glslang_tab.cpp" + break; + + case 554: /* simple_statement: declaration_statement */ +#line 3687 "MachineIndependent/glslang.y" + { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } +#line 10989 "MachineIndependent/glslang_tab.cpp" + break; + + case 555: /* simple_statement: expression_statement */ #line 3688 "MachineIndependent/glslang.y" - { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 10994 "MachineIndependent/glslang_tab.cpp" + { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } +#line 10995 "MachineIndependent/glslang_tab.cpp" break; - case 554: /* statement: simple_statement */ + case 556: /* simple_statement: selection_statement */ #line 3689 "MachineIndependent/glslang.y" - { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 11000 "MachineIndependent/glslang_tab.cpp" + { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } +#line 11001 "MachineIndependent/glslang_tab.cpp" break; - case 555: /* simple_statement: declaration_statement */ + case 557: /* simple_statement: switch_statement */ +#line 3690 "MachineIndependent/glslang.y" + { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } +#line 11007 "MachineIndependent/glslang_tab.cpp" + break; + + case 558: /* simple_statement: case_label */ +#line 3691 "MachineIndependent/glslang.y" + { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } +#line 11013 "MachineIndependent/glslang_tab.cpp" + break; + + case 559: /* simple_statement: iteration_statement */ +#line 3692 "MachineIndependent/glslang.y" + { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } +#line 11019 "MachineIndependent/glslang_tab.cpp" + break; + + case 560: /* simple_statement: jump_statement */ +#line 3693 "MachineIndependent/glslang.y" + { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } +#line 11025 "MachineIndependent/glslang_tab.cpp" + break; + + case 561: /* simple_statement: demote_statement */ #line 3695 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 11006 "MachineIndependent/glslang_tab.cpp" +#line 11031 "MachineIndependent/glslang_tab.cpp" break; - case 556: /* simple_statement: expression_statement */ -#line 3696 "MachineIndependent/glslang.y" - { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 11012 "MachineIndependent/glslang_tab.cpp" - break; - - case 557: /* simple_statement: selection_statement */ -#line 3697 "MachineIndependent/glslang.y" - { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 11018 "MachineIndependent/glslang_tab.cpp" - break; - - case 558: /* simple_statement: switch_statement */ -#line 3698 "MachineIndependent/glslang.y" - { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 11024 "MachineIndependent/glslang_tab.cpp" - break; - - case 559: /* simple_statement: case_label */ -#line 3699 "MachineIndependent/glslang.y" - { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 11030 "MachineIndependent/glslang_tab.cpp" - break; - - case 560: /* simple_statement: iteration_statement */ -#line 3700 "MachineIndependent/glslang.y" - { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 11036 "MachineIndependent/glslang_tab.cpp" - break; - - case 561: /* simple_statement: jump_statement */ + case 562: /* demote_statement: DEMOTE SEMICOLON */ #line 3701 "MachineIndependent/glslang.y" - { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 11042 "MachineIndependent/glslang_tab.cpp" - break; - - case 562: /* simple_statement: demote_statement */ -#line 3703 "MachineIndependent/glslang.y" - { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 11048 "MachineIndependent/glslang_tab.cpp" - break; - - case 563: /* demote_statement: DEMOTE SEMICOLON */ -#line 3709 "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 11058 "MachineIndependent/glslang_tab.cpp" +#line 11041 "MachineIndependent/glslang_tab.cpp" break; - case 564: /* compound_statement: LEFT_BRACE RIGHT_BRACE */ -#line 3718 "MachineIndependent/glslang.y" + case 563: /* compound_statement: LEFT_BRACE RIGHT_BRACE */ +#line 3710 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = 0; } -#line 11064 "MachineIndependent/glslang_tab.cpp" +#line 11047 "MachineIndependent/glslang_tab.cpp" break; - case 565: /* $@5: %empty */ -#line 3719 "MachineIndependent/glslang.y" + case 564: /* $@5: %empty */ +#line 3711 "MachineIndependent/glslang.y" { parseContext.symbolTable.push(); ++parseContext.statementNestingLevel; } -#line 11073 "MachineIndependent/glslang_tab.cpp" +#line 11056 "MachineIndependent/glslang_tab.cpp" break; - case 566: /* $@6: %empty */ -#line 3723 "MachineIndependent/glslang.y" + case 565: /* $@6: %empty */ +#line 3715 "MachineIndependent/glslang.y" { parseContext.symbolTable.pop(&parseContext.defaultPrecision[0]); --parseContext.statementNestingLevel; } -#line 11082 "MachineIndependent/glslang_tab.cpp" +#line 11065 "MachineIndependent/glslang_tab.cpp" break; - case 567: /* compound_statement: LEFT_BRACE $@5 statement_list $@6 RIGHT_BRACE */ -#line 3727 "MachineIndependent/glslang.y" + case 566: /* compound_statement: LEFT_BRACE $@5 statement_list $@6 RIGHT_BRACE */ +#line 3719 "MachineIndependent/glslang.y" { if ((yyvsp[-2].interm.intermNode) && (yyvsp[-2].interm.intermNode)->getAsAggregate()) (yyvsp[-2].interm.intermNode)->getAsAggregate()->setOperator(EOpSequence); (yyval.interm.intermNode) = (yyvsp[-2].interm.intermNode); } -#line 11092 "MachineIndependent/glslang_tab.cpp" +#line 11075 "MachineIndependent/glslang_tab.cpp" break; - case 568: /* statement_no_new_scope: compound_statement_no_new_scope */ -#line 3735 "MachineIndependent/glslang.y" + case 567: /* statement_no_new_scope: compound_statement_no_new_scope */ +#line 3727 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 11098 "MachineIndependent/glslang_tab.cpp" +#line 11081 "MachineIndependent/glslang_tab.cpp" break; - case 569: /* statement_no_new_scope: simple_statement */ -#line 3736 "MachineIndependent/glslang.y" + case 568: /* statement_no_new_scope: simple_statement */ +#line 3728 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 11104 "MachineIndependent/glslang_tab.cpp" +#line 11087 "MachineIndependent/glslang_tab.cpp" break; - case 570: /* $@7: %empty */ -#line 3740 "MachineIndependent/glslang.y" + case 569: /* $@7: %empty */ +#line 3732 "MachineIndependent/glslang.y" { ++parseContext.controlFlowNestingLevel; } -#line 11112 "MachineIndependent/glslang_tab.cpp" +#line 11095 "MachineIndependent/glslang_tab.cpp" break; - case 571: /* statement_scoped: $@7 compound_statement */ -#line 3743 "MachineIndependent/glslang.y" + case 570: /* statement_scoped: $@7 compound_statement */ +#line 3735 "MachineIndependent/glslang.y" { --parseContext.controlFlowNestingLevel; (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 11121 "MachineIndependent/glslang_tab.cpp" +#line 11104 "MachineIndependent/glslang_tab.cpp" break; - case 572: /* $@8: %empty */ -#line 3747 "MachineIndependent/glslang.y" + case 571: /* $@8: %empty */ +#line 3739 "MachineIndependent/glslang.y" { parseContext.symbolTable.push(); ++parseContext.statementNestingLevel; ++parseContext.controlFlowNestingLevel; } -#line 11131 "MachineIndependent/glslang_tab.cpp" +#line 11114 "MachineIndependent/glslang_tab.cpp" break; - case 573: /* statement_scoped: $@8 simple_statement */ -#line 3752 "MachineIndependent/glslang.y" + case 572: /* statement_scoped: $@8 simple_statement */ +#line 3744 "MachineIndependent/glslang.y" { parseContext.symbolTable.pop(&parseContext.defaultPrecision[0]); --parseContext.statementNestingLevel; --parseContext.controlFlowNestingLevel; (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 11142 "MachineIndependent/glslang_tab.cpp" +#line 11125 "MachineIndependent/glslang_tab.cpp" break; - case 574: /* compound_statement_no_new_scope: LEFT_BRACE RIGHT_BRACE */ -#line 3761 "MachineIndependent/glslang.y" + case 573: /* compound_statement_no_new_scope: LEFT_BRACE RIGHT_BRACE */ +#line 3753 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = 0; } -#line 11150 "MachineIndependent/glslang_tab.cpp" +#line 11133 "MachineIndependent/glslang_tab.cpp" break; - case 575: /* compound_statement_no_new_scope: LEFT_BRACE statement_list RIGHT_BRACE */ -#line 3764 "MachineIndependent/glslang.y" + case 574: /* compound_statement_no_new_scope: LEFT_BRACE statement_list RIGHT_BRACE */ +#line 3756 "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 11160 "MachineIndependent/glslang_tab.cpp" +#line 11143 "MachineIndependent/glslang_tab.cpp" break; - case 576: /* statement_list: statement */ -#line 3772 "MachineIndependent/glslang.y" + case 575: /* statement_list: statement */ +#line 3764 "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 || @@ -11169,11 +11152,11 @@ yyreduce: (yyval.interm.intermNode) = 0; // start a fresh subsequence for what's after this case } } -#line 11173 "MachineIndependent/glslang_tab.cpp" +#line 11156 "MachineIndependent/glslang_tab.cpp" break; - case 577: /* statement_list: statement_list statement */ -#line 3780 "MachineIndependent/glslang.y" + case 576: /* statement_list: statement_list statement */ +#line 3772 "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)) { @@ -11182,77 +11165,77 @@ yyreduce: } else (yyval.interm.intermNode) = parseContext.intermediate.growAggregate((yyvsp[-1].interm.intermNode), (yyvsp[0].interm.intermNode)); } -#line 11186 "MachineIndependent/glslang_tab.cpp" +#line 11169 "MachineIndependent/glslang_tab.cpp" break; - case 578: /* expression_statement: SEMICOLON */ -#line 3791 "MachineIndependent/glslang.y" + case 577: /* expression_statement: SEMICOLON */ +#line 3783 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = 0; } -#line 11192 "MachineIndependent/glslang_tab.cpp" +#line 11175 "MachineIndependent/glslang_tab.cpp" break; - case 579: /* expression_statement: expression SEMICOLON */ -#line 3792 "MachineIndependent/glslang.y" + case 578: /* expression_statement: expression SEMICOLON */ +#line 3784 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = static_cast((yyvsp[-1].interm.intermTypedNode)); } -#line 11198 "MachineIndependent/glslang_tab.cpp" +#line 11181 "MachineIndependent/glslang_tab.cpp" break; - case 580: /* selection_statement: selection_statement_nonattributed */ -#line 3796 "MachineIndependent/glslang.y" + case 579: /* selection_statement: selection_statement_nonattributed */ +#line 3788 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 11206 "MachineIndependent/glslang_tab.cpp" +#line 11189 "MachineIndependent/glslang_tab.cpp" break; - case 581: /* selection_statement: attribute selection_statement_nonattributed */ -#line 3800 "MachineIndependent/glslang.y" + case 580: /* selection_statement: attribute selection_statement_nonattributed */ +#line 3792 "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 11216 "MachineIndependent/glslang_tab.cpp" +#line 11199 "MachineIndependent/glslang_tab.cpp" break; - case 582: /* selection_statement_nonattributed: IF LEFT_PAREN expression RIGHT_PAREN selection_rest_statement */ -#line 3808 "MachineIndependent/glslang.y" + case 581: /* selection_statement_nonattributed: IF LEFT_PAREN expression RIGHT_PAREN selection_rest_statement */ +#line 3800 "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 11225 "MachineIndependent/glslang_tab.cpp" +#line 11208 "MachineIndependent/glslang_tab.cpp" break; - case 583: /* selection_rest_statement: statement_scoped ELSE statement_scoped */ -#line 3815 "MachineIndependent/glslang.y" + case 582: /* selection_rest_statement: statement_scoped ELSE statement_scoped */ +#line 3807 "MachineIndependent/glslang.y" { (yyval.interm.nodePair).node1 = (yyvsp[-2].interm.intermNode); (yyval.interm.nodePair).node2 = (yyvsp[0].interm.intermNode); } -#line 11234 "MachineIndependent/glslang_tab.cpp" +#line 11217 "MachineIndependent/glslang_tab.cpp" break; - case 584: /* selection_rest_statement: statement_scoped */ -#line 3819 "MachineIndependent/glslang.y" + case 583: /* selection_rest_statement: statement_scoped */ +#line 3811 "MachineIndependent/glslang.y" { (yyval.interm.nodePair).node1 = (yyvsp[0].interm.intermNode); (yyval.interm.nodePair).node2 = 0; } -#line 11243 "MachineIndependent/glslang_tab.cpp" +#line 11226 "MachineIndependent/glslang_tab.cpp" break; - case 585: /* condition: expression */ -#line 3827 "MachineIndependent/glslang.y" + case 584: /* condition: expression */ +#line 3819 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); parseContext.boolCheck((yyvsp[0].interm.intermTypedNode)->getLoc(), (yyvsp[0].interm.intermTypedNode)); } -#line 11252 "MachineIndependent/glslang_tab.cpp" +#line 11235 "MachineIndependent/glslang_tab.cpp" break; - case 586: /* condition: fully_specified_type IDENTIFIER EQUAL initializer */ -#line 3831 "MachineIndependent/glslang.y" + case 585: /* condition: fully_specified_type IDENTIFIER EQUAL initializer */ +#line 3823 "MachineIndependent/glslang.y" { parseContext.boolCheck((yyvsp[-2].lex).loc, (yyvsp[-3].interm.type)); @@ -11263,29 +11246,29 @@ yyreduce: else (yyval.interm.intermTypedNode) = 0; } -#line 11267 "MachineIndependent/glslang_tab.cpp" +#line 11250 "MachineIndependent/glslang_tab.cpp" break; - case 587: /* switch_statement: switch_statement_nonattributed */ -#line 3844 "MachineIndependent/glslang.y" + case 586: /* switch_statement: switch_statement_nonattributed */ +#line 3836 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 11275 "MachineIndependent/glslang_tab.cpp" +#line 11258 "MachineIndependent/glslang_tab.cpp" break; - case 588: /* switch_statement: attribute switch_statement_nonattributed */ -#line 3848 "MachineIndependent/glslang.y" + case 587: /* switch_statement: attribute switch_statement_nonattributed */ +#line 3840 "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 11285 "MachineIndependent/glslang_tab.cpp" +#line 11268 "MachineIndependent/glslang_tab.cpp" break; - case 589: /* $@9: %empty */ -#line 3856 "MachineIndependent/glslang.y" + case 588: /* $@9: %empty */ +#line 3848 "MachineIndependent/glslang.y" { // start new switch sequence on the switch stack ++parseContext.controlFlowNestingLevel; @@ -11294,11 +11277,11 @@ yyreduce: parseContext.switchLevel.push_back(parseContext.statementNestingLevel); parseContext.symbolTable.push(); } -#line 11298 "MachineIndependent/glslang_tab.cpp" +#line 11281 "MachineIndependent/glslang_tab.cpp" break; - case 590: /* switch_statement_nonattributed: SWITCH LEFT_PAREN expression RIGHT_PAREN $@9 LEFT_BRACE switch_statement_list RIGHT_BRACE */ -#line 3864 "MachineIndependent/glslang.y" + case 589: /* switch_statement_nonattributed: SWITCH LEFT_PAREN expression RIGHT_PAREN $@9 LEFT_BRACE switch_statement_list RIGHT_BRACE */ +#line 3856 "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(); @@ -11308,27 +11291,27 @@ yyreduce: --parseContext.statementNestingLevel; --parseContext.controlFlowNestingLevel; } -#line 11312 "MachineIndependent/glslang_tab.cpp" +#line 11295 "MachineIndependent/glslang_tab.cpp" break; - case 591: /* switch_statement_list: %empty */ -#line 3876 "MachineIndependent/glslang.y" + case 590: /* switch_statement_list: %empty */ +#line 3868 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = 0; } -#line 11320 "MachineIndependent/glslang_tab.cpp" +#line 11303 "MachineIndependent/glslang_tab.cpp" break; - case 592: /* switch_statement_list: statement_list */ -#line 3879 "MachineIndependent/glslang.y" + case 591: /* switch_statement_list: statement_list */ +#line 3871 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 11328 "MachineIndependent/glslang_tab.cpp" +#line 11311 "MachineIndependent/glslang_tab.cpp" break; - case 593: /* case_label: CASE expression COLON */ -#line 3885 "MachineIndependent/glslang.y" + case 592: /* case_label: CASE expression COLON */ +#line 3877 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = 0; if (parseContext.switchLevel.size() == 0) @@ -11341,11 +11324,11 @@ yyreduce: (yyval.interm.intermNode) = parseContext.intermediate.addBranch(EOpCase, (yyvsp[-1].interm.intermTypedNode), (yyvsp[-2].lex).loc); } } -#line 11345 "MachineIndependent/glslang_tab.cpp" +#line 11328 "MachineIndependent/glslang_tab.cpp" break; - case 594: /* case_label: DEFAULT COLON */ -#line 3897 "MachineIndependent/glslang.y" + case 593: /* case_label: DEFAULT COLON */ +#line 3889 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = 0; if (parseContext.switchLevel.size() == 0) @@ -11355,29 +11338,29 @@ yyreduce: else (yyval.interm.intermNode) = parseContext.intermediate.addBranch(EOpDefault, (yyvsp[-1].lex).loc); } -#line 11359 "MachineIndependent/glslang_tab.cpp" +#line 11342 "MachineIndependent/glslang_tab.cpp" break; - case 595: /* iteration_statement: iteration_statement_nonattributed */ -#line 3909 "MachineIndependent/glslang.y" + case 594: /* iteration_statement: iteration_statement_nonattributed */ +#line 3901 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 11367 "MachineIndependent/glslang_tab.cpp" +#line 11350 "MachineIndependent/glslang_tab.cpp" break; - case 596: /* iteration_statement: attribute iteration_statement_nonattributed */ -#line 3913 "MachineIndependent/glslang.y" + case 595: /* iteration_statement: attribute iteration_statement_nonattributed */ +#line 3905 "MachineIndependent/glslang.y" { parseContext.requireExtensions((yyvsp[0].interm.intermNode)->getLoc(), 1, &E_GL_EXT_control_flow_attributes, "attribute"); parseContext.handleLoopAttributes(*(yyvsp[-1].interm.attributes), (yyvsp[0].interm.intermNode)); (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 11377 "MachineIndependent/glslang_tab.cpp" +#line 11360 "MachineIndependent/glslang_tab.cpp" break; - case 597: /* $@10: %empty */ -#line 3921 "MachineIndependent/glslang.y" + case 596: /* $@10: %empty */ +#line 3913 "MachineIndependent/glslang.y" { if (! parseContext.limits.whileLoops) parseContext.error((yyvsp[-1].lex).loc, "while loops not available", "limitation", ""); @@ -11386,11 +11369,11 @@ yyreduce: ++parseContext.statementNestingLevel; ++parseContext.controlFlowNestingLevel; } -#line 11390 "MachineIndependent/glslang_tab.cpp" +#line 11373 "MachineIndependent/glslang_tab.cpp" break; - case 598: /* iteration_statement_nonattributed: WHILE LEFT_PAREN $@10 condition RIGHT_PAREN statement_no_new_scope */ -#line 3929 "MachineIndependent/glslang.y" + case 597: /* iteration_statement_nonattributed: WHILE LEFT_PAREN $@10 condition RIGHT_PAREN statement_no_new_scope */ +#line 3921 "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); @@ -11398,22 +11381,21 @@ yyreduce: --parseContext.statementNestingLevel; --parseContext.controlFlowNestingLevel; } -#line 11402 "MachineIndependent/glslang_tab.cpp" +#line 11385 "MachineIndependent/glslang_tab.cpp" break; - case 599: /* $@11: %empty */ -#line 3936 "MachineIndependent/glslang.y" + case 598: /* $@11: %empty */ +#line 3928 "MachineIndependent/glslang.y" { - parseContext.symbolTable.push(); ++parseContext.loopNestingLevel; ++parseContext.statementNestingLevel; ++parseContext.controlFlowNestingLevel; } -#line 11413 "MachineIndependent/glslang_tab.cpp" +#line 11395 "MachineIndependent/glslang_tab.cpp" break; - case 600: /* iteration_statement_nonattributed: DO $@11 statement WHILE LEFT_PAREN expression RIGHT_PAREN SEMICOLON */ -#line 3942 "MachineIndependent/glslang.y" + case 599: /* iteration_statement_nonattributed: DO $@11 statement WHILE LEFT_PAREN expression RIGHT_PAREN SEMICOLON */ +#line 3933 "MachineIndependent/glslang.y" { if (! parseContext.limits.whileLoops) parseContext.error((yyvsp[-7].lex).loc, "do-while loops not available", "limitation", ""); @@ -11421,27 +11403,26 @@ yyreduce: parseContext.boolCheck((yyvsp[0].lex).loc, (yyvsp[-2].interm.intermTypedNode)); (yyval.interm.intermNode) = parseContext.intermediate.addLoop((yyvsp[-5].interm.intermNode), (yyvsp[-2].interm.intermTypedNode), 0, false, (yyvsp[-4].lex).loc); - parseContext.symbolTable.pop(&parseContext.defaultPrecision[0]); --parseContext.loopNestingLevel; --parseContext.statementNestingLevel; --parseContext.controlFlowNestingLevel; } -#line 11430 "MachineIndependent/glslang_tab.cpp" +#line 11411 "MachineIndependent/glslang_tab.cpp" break; - case 601: /* $@12: %empty */ -#line 3954 "MachineIndependent/glslang.y" + case 600: /* $@12: %empty */ +#line 3944 "MachineIndependent/glslang.y" { parseContext.symbolTable.push(); ++parseContext.loopNestingLevel; ++parseContext.statementNestingLevel; ++parseContext.controlFlowNestingLevel; } -#line 11441 "MachineIndependent/glslang_tab.cpp" +#line 11422 "MachineIndependent/glslang_tab.cpp" break; - case 602: /* iteration_statement_nonattributed: FOR LEFT_PAREN $@12 for_init_statement for_rest_statement RIGHT_PAREN statement_no_new_scope */ -#line 3960 "MachineIndependent/glslang.y" + case 601: /* iteration_statement_nonattributed: FOR LEFT_PAREN $@12 for_init_statement for_rest_statement RIGHT_PAREN statement_no_new_scope */ +#line 3950 "MachineIndependent/glslang.y" { parseContext.symbolTable.pop(&parseContext.defaultPrecision[0]); (yyval.interm.intermNode) = parseContext.intermediate.makeAggregate((yyvsp[-3].interm.intermNode), (yyvsp[-5].lex).loc); @@ -11454,81 +11435,81 @@ yyreduce: --parseContext.statementNestingLevel; --parseContext.controlFlowNestingLevel; } -#line 11458 "MachineIndependent/glslang_tab.cpp" +#line 11439 "MachineIndependent/glslang_tab.cpp" break; - case 603: /* for_init_statement: expression_statement */ -#line 3975 "MachineIndependent/glslang.y" + case 602: /* for_init_statement: expression_statement */ +#line 3965 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 11466 "MachineIndependent/glslang_tab.cpp" +#line 11447 "MachineIndependent/glslang_tab.cpp" break; - case 604: /* for_init_statement: declaration_statement */ -#line 3978 "MachineIndependent/glslang.y" + case 603: /* for_init_statement: declaration_statement */ +#line 3968 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 11474 "MachineIndependent/glslang_tab.cpp" +#line 11455 "MachineIndependent/glslang_tab.cpp" break; - case 605: /* conditionopt: condition */ -#line 3984 "MachineIndependent/glslang.y" + case 604: /* conditionopt: condition */ +#line 3974 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 11482 "MachineIndependent/glslang_tab.cpp" +#line 11463 "MachineIndependent/glslang_tab.cpp" break; - case 606: /* conditionopt: %empty */ -#line 3987 "MachineIndependent/glslang.y" + case 605: /* conditionopt: %empty */ +#line 3977 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = 0; } -#line 11490 "MachineIndependent/glslang_tab.cpp" +#line 11471 "MachineIndependent/glslang_tab.cpp" break; - case 607: /* for_rest_statement: conditionopt SEMICOLON */ -#line 3993 "MachineIndependent/glslang.y" + case 606: /* for_rest_statement: conditionopt SEMICOLON */ +#line 3983 "MachineIndependent/glslang.y" { (yyval.interm.nodePair).node1 = (yyvsp[-1].interm.intermTypedNode); (yyval.interm.nodePair).node2 = 0; } -#line 11499 "MachineIndependent/glslang_tab.cpp" +#line 11480 "MachineIndependent/glslang_tab.cpp" break; - case 608: /* for_rest_statement: conditionopt SEMICOLON expression */ -#line 3997 "MachineIndependent/glslang.y" + case 607: /* for_rest_statement: conditionopt SEMICOLON expression */ +#line 3987 "MachineIndependent/glslang.y" { (yyval.interm.nodePair).node1 = (yyvsp[-2].interm.intermTypedNode); (yyval.interm.nodePair).node2 = (yyvsp[0].interm.intermTypedNode); } -#line 11508 "MachineIndependent/glslang_tab.cpp" +#line 11489 "MachineIndependent/glslang_tab.cpp" break; - case 609: /* jump_statement: CONTINUE SEMICOLON */ -#line 4004 "MachineIndependent/glslang.y" + case 608: /* jump_statement: CONTINUE SEMICOLON */ +#line 3994 "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 11518 "MachineIndependent/glslang_tab.cpp" +#line 11499 "MachineIndependent/glslang_tab.cpp" break; - case 610: /* jump_statement: BREAK SEMICOLON */ -#line 4009 "MachineIndependent/glslang.y" + case 609: /* jump_statement: BREAK SEMICOLON */ +#line 3999 "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 11528 "MachineIndependent/glslang_tab.cpp" +#line 11509 "MachineIndependent/glslang_tab.cpp" break; - case 611: /* jump_statement: RETURN SEMICOLON */ -#line 4014 "MachineIndependent/glslang.y" + case 610: /* jump_statement: RETURN SEMICOLON */ +#line 4004 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = parseContext.intermediate.addBranch(EOpReturn, (yyvsp[-1].lex).loc); if (parseContext.currentFunctionType->getBasicType() != EbtVoid) @@ -11536,101 +11517,101 @@ yyreduce: if (parseContext.inMain) parseContext.postEntryPointReturn = true; } -#line 11540 "MachineIndependent/glslang_tab.cpp" +#line 11521 "MachineIndependent/glslang_tab.cpp" break; - case 612: /* jump_statement: RETURN expression SEMICOLON */ -#line 4021 "MachineIndependent/glslang.y" + case 611: /* jump_statement: RETURN expression SEMICOLON */ +#line 4011 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = parseContext.handleReturnValue((yyvsp[-2].lex).loc, (yyvsp[-1].interm.intermTypedNode)); } -#line 11548 "MachineIndependent/glslang_tab.cpp" +#line 11529 "MachineIndependent/glslang_tab.cpp" break; - case 613: /* jump_statement: DISCARD SEMICOLON */ -#line 4024 "MachineIndependent/glslang.y" + case 612: /* jump_statement: DISCARD SEMICOLON */ +#line 4014 "MachineIndependent/glslang.y" { parseContext.requireStage((yyvsp[-1].lex).loc, EShLangFragment, "discard"); (yyval.interm.intermNode) = parseContext.intermediate.addBranch(EOpKill, (yyvsp[-1].lex).loc); } -#line 11557 "MachineIndependent/glslang_tab.cpp" +#line 11538 "MachineIndependent/glslang_tab.cpp" break; - case 614: /* jump_statement: TERMINATE_INVOCATION SEMICOLON */ -#line 4028 "MachineIndependent/glslang.y" + case 613: /* jump_statement: TERMINATE_INVOCATION SEMICOLON */ +#line 4018 "MachineIndependent/glslang.y" { parseContext.requireStage((yyvsp[-1].lex).loc, EShLangFragment, "terminateInvocation"); (yyval.interm.intermNode) = parseContext.intermediate.addBranch(EOpTerminateInvocation, (yyvsp[-1].lex).loc); } -#line 11566 "MachineIndependent/glslang_tab.cpp" +#line 11547 "MachineIndependent/glslang_tab.cpp" break; - case 615: /* jump_statement: TERMINATE_RAY SEMICOLON */ -#line 4033 "MachineIndependent/glslang.y" + case 614: /* jump_statement: TERMINATE_RAY SEMICOLON */ +#line 4023 "MachineIndependent/glslang.y" { parseContext.requireStage((yyvsp[-1].lex).loc, EShLangAnyHit, "terminateRayEXT"); (yyval.interm.intermNode) = parseContext.intermediate.addBranch(EOpTerminateRayKHR, (yyvsp[-1].lex).loc); } -#line 11575 "MachineIndependent/glslang_tab.cpp" +#line 11556 "MachineIndependent/glslang_tab.cpp" break; - case 616: /* jump_statement: IGNORE_INTERSECTION SEMICOLON */ -#line 4037 "MachineIndependent/glslang.y" + case 615: /* jump_statement: IGNORE_INTERSECTION SEMICOLON */ +#line 4027 "MachineIndependent/glslang.y" { parseContext.requireStage((yyvsp[-1].lex).loc, EShLangAnyHit, "ignoreIntersectionEXT"); (yyval.interm.intermNode) = parseContext.intermediate.addBranch(EOpIgnoreIntersectionKHR, (yyvsp[-1].lex).loc); } -#line 11584 "MachineIndependent/glslang_tab.cpp" +#line 11565 "MachineIndependent/glslang_tab.cpp" break; - case 617: /* translation_unit: external_declaration */ -#line 4047 "MachineIndependent/glslang.y" + case 616: /* translation_unit: external_declaration */ +#line 4037 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); parseContext.intermediate.setTreeRoot((yyval.interm.intermNode)); } -#line 11593 "MachineIndependent/glslang_tab.cpp" +#line 11574 "MachineIndependent/glslang_tab.cpp" break; - case 618: /* translation_unit: translation_unit external_declaration */ -#line 4051 "MachineIndependent/glslang.y" + case 617: /* translation_unit: translation_unit external_declaration */ +#line 4041 "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 11604 "MachineIndependent/glslang_tab.cpp" +#line 11585 "MachineIndependent/glslang_tab.cpp" break; - case 619: /* external_declaration: function_definition */ -#line 4060 "MachineIndependent/glslang.y" + case 618: /* external_declaration: function_definition */ +#line 4050 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 11612 "MachineIndependent/glslang_tab.cpp" +#line 11593 "MachineIndependent/glslang_tab.cpp" break; - case 620: /* external_declaration: declaration */ -#line 4063 "MachineIndependent/glslang.y" + case 619: /* external_declaration: declaration */ +#line 4053 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 11620 "MachineIndependent/glslang_tab.cpp" +#line 11601 "MachineIndependent/glslang_tab.cpp" break; - case 621: /* external_declaration: SEMICOLON */ -#line 4067 "MachineIndependent/glslang.y" + case 620: /* external_declaration: SEMICOLON */ +#line 4057 "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 11630 "MachineIndependent/glslang_tab.cpp" +#line 11611 "MachineIndependent/glslang_tab.cpp" break; - case 622: /* $@13: %empty */ -#line 4076 "MachineIndependent/glslang.y" + case 621: /* $@13: %empty */ +#line 4066 "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); @@ -11643,11 +11624,11 @@ yyreduce: ++parseContext.statementNestingLevel; } } -#line 11647 "MachineIndependent/glslang_tab.cpp" +#line 11628 "MachineIndependent/glslang_tab.cpp" break; - case 623: /* function_definition: function_prototype $@13 compound_statement_no_new_scope */ -#line 4088 "MachineIndependent/glslang.y" + case 622: /* function_definition: function_prototype $@13 compound_statement_no_new_scope */ +#line 4078 "MachineIndependent/glslang.y" { // May be best done as post process phase on intermediate code if (parseContext.currentFunctionType->getBasicType() != EbtVoid && ! parseContext.functionReturnsValue) @@ -11674,228 +11655,228 @@ yyreduce: --parseContext.statementNestingLevel; } } -#line 11678 "MachineIndependent/glslang_tab.cpp" +#line 11659 "MachineIndependent/glslang_tab.cpp" break; - case 624: /* attribute: LEFT_BRACKET LEFT_BRACKET attribute_list RIGHT_BRACKET RIGHT_BRACKET */ -#line 4118 "MachineIndependent/glslang.y" + case 623: /* attribute: LEFT_BRACKET LEFT_BRACKET attribute_list RIGHT_BRACKET RIGHT_BRACKET */ +#line 4108 "MachineIndependent/glslang.y" { (yyval.interm.attributes) = (yyvsp[-2].interm.attributes); } -#line 11686 "MachineIndependent/glslang_tab.cpp" +#line 11667 "MachineIndependent/glslang_tab.cpp" break; - case 625: /* attribute_list: single_attribute */ -#line 4123 "MachineIndependent/glslang.y" + case 624: /* attribute_list: single_attribute */ +#line 4113 "MachineIndependent/glslang.y" { (yyval.interm.attributes) = (yyvsp[0].interm.attributes); } -#line 11694 "MachineIndependent/glslang_tab.cpp" +#line 11675 "MachineIndependent/glslang_tab.cpp" break; - case 626: /* attribute_list: attribute_list COMMA single_attribute */ -#line 4126 "MachineIndependent/glslang.y" + case 625: /* attribute_list: attribute_list COMMA single_attribute */ +#line 4116 "MachineIndependent/glslang.y" { (yyval.interm.attributes) = parseContext.mergeAttributes((yyvsp[-2].interm.attributes), (yyvsp[0].interm.attributes)); } -#line 11702 "MachineIndependent/glslang_tab.cpp" +#line 11683 "MachineIndependent/glslang_tab.cpp" break; - case 627: /* single_attribute: IDENTIFIER */ -#line 4131 "MachineIndependent/glslang.y" + case 626: /* single_attribute: IDENTIFIER */ +#line 4121 "MachineIndependent/glslang.y" { (yyval.interm.attributes) = parseContext.makeAttributes(*(yyvsp[0].lex).string); } -#line 11710 "MachineIndependent/glslang_tab.cpp" +#line 11691 "MachineIndependent/glslang_tab.cpp" break; - case 628: /* single_attribute: IDENTIFIER LEFT_PAREN constant_expression RIGHT_PAREN */ -#line 4134 "MachineIndependent/glslang.y" + case 627: /* single_attribute: IDENTIFIER LEFT_PAREN constant_expression RIGHT_PAREN */ +#line 4124 "MachineIndependent/glslang.y" { (yyval.interm.attributes) = parseContext.makeAttributes(*(yyvsp[-3].lex).string, (yyvsp[-1].interm.intermTypedNode)); } -#line 11718 "MachineIndependent/glslang_tab.cpp" +#line 11699 "MachineIndependent/glslang_tab.cpp" break; - case 629: /* spirv_requirements_list: spirv_requirements_parameter */ -#line 4141 "MachineIndependent/glslang.y" + case 628: /* spirv_requirements_list: spirv_requirements_parameter */ +#line 4131 "MachineIndependent/glslang.y" { (yyval.interm.spirvReq) = (yyvsp[0].interm.spirvReq); } -#line 11726 "MachineIndependent/glslang_tab.cpp" +#line 11707 "MachineIndependent/glslang_tab.cpp" break; - case 630: /* spirv_requirements_list: spirv_requirements_list COMMA spirv_requirements_parameter */ -#line 4144 "MachineIndependent/glslang.y" + case 629: /* spirv_requirements_list: spirv_requirements_list COMMA spirv_requirements_parameter */ +#line 4134 "MachineIndependent/glslang.y" { (yyval.interm.spirvReq) = parseContext.mergeSpirvRequirements((yyvsp[-1].lex).loc, (yyvsp[-2].interm.spirvReq), (yyvsp[0].interm.spirvReq)); } -#line 11734 "MachineIndependent/glslang_tab.cpp" +#line 11715 "MachineIndependent/glslang_tab.cpp" break; - case 631: /* spirv_requirements_parameter: IDENTIFIER EQUAL LEFT_BRACKET spirv_extension_list RIGHT_BRACKET */ -#line 4149 "MachineIndependent/glslang.y" + case 630: /* spirv_requirements_parameter: IDENTIFIER EQUAL LEFT_BRACKET spirv_extension_list RIGHT_BRACKET */ +#line 4139 "MachineIndependent/glslang.y" { (yyval.interm.spirvReq) = parseContext.makeSpirvRequirement((yyvsp[-3].lex).loc, *(yyvsp[-4].lex).string, (yyvsp[-1].interm.intermNode)->getAsAggregate(), nullptr); } -#line 11742 "MachineIndependent/glslang_tab.cpp" +#line 11723 "MachineIndependent/glslang_tab.cpp" break; - case 632: /* spirv_requirements_parameter: IDENTIFIER EQUAL LEFT_BRACKET spirv_capability_list RIGHT_BRACKET */ -#line 4152 "MachineIndependent/glslang.y" + case 631: /* spirv_requirements_parameter: IDENTIFIER EQUAL LEFT_BRACKET spirv_capability_list RIGHT_BRACKET */ +#line 4142 "MachineIndependent/glslang.y" { (yyval.interm.spirvReq) = parseContext.makeSpirvRequirement((yyvsp[-3].lex).loc, *(yyvsp[-4].lex).string, nullptr, (yyvsp[-1].interm.intermNode)->getAsAggregate()); } -#line 11750 "MachineIndependent/glslang_tab.cpp" +#line 11731 "MachineIndependent/glslang_tab.cpp" break; - case 633: /* spirv_extension_list: STRING_LITERAL */ -#line 4157 "MachineIndependent/glslang.y" + case 632: /* spirv_extension_list: STRING_LITERAL */ +#line 4147 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = parseContext.intermediate.makeAggregate(parseContext.intermediate.addConstantUnion((yyvsp[0].lex).string, (yyvsp[0].lex).loc, true)); } -#line 11758 "MachineIndependent/glslang_tab.cpp" +#line 11739 "MachineIndependent/glslang_tab.cpp" break; - case 634: /* spirv_extension_list: spirv_extension_list COMMA STRING_LITERAL */ -#line 4160 "MachineIndependent/glslang.y" + case 633: /* spirv_extension_list: spirv_extension_list COMMA STRING_LITERAL */ +#line 4150 "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 11766 "MachineIndependent/glslang_tab.cpp" +#line 11747 "MachineIndependent/glslang_tab.cpp" break; - case 635: /* spirv_capability_list: INTCONSTANT */ -#line 4165 "MachineIndependent/glslang.y" + case 634: /* spirv_capability_list: INTCONSTANT */ +#line 4155 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = parseContext.intermediate.makeAggregate(parseContext.intermediate.addConstantUnion((yyvsp[0].lex).i, (yyvsp[0].lex).loc, true)); } -#line 11774 "MachineIndependent/glslang_tab.cpp" +#line 11755 "MachineIndependent/glslang_tab.cpp" break; - case 636: /* spirv_capability_list: spirv_capability_list COMMA INTCONSTANT */ -#line 4168 "MachineIndependent/glslang.y" + case 635: /* spirv_capability_list: spirv_capability_list COMMA INTCONSTANT */ +#line 4158 "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 11782 "MachineIndependent/glslang_tab.cpp" +#line 11763 "MachineIndependent/glslang_tab.cpp" break; - case 637: /* spirv_execution_mode_qualifier: SPIRV_EXECUTION_MODE LEFT_PAREN INTCONSTANT RIGHT_PAREN */ -#line 4173 "MachineIndependent/glslang.y" + case 636: /* spirv_execution_mode_qualifier: SPIRV_EXECUTION_MODE LEFT_PAREN INTCONSTANT RIGHT_PAREN */ +#line 4163 "MachineIndependent/glslang.y" { parseContext.intermediate.insertSpirvExecutionMode((yyvsp[-1].lex).i); (yyval.interm.intermNode) = 0; } -#line 11791 "MachineIndependent/glslang_tab.cpp" +#line 11772 "MachineIndependent/glslang_tab.cpp" break; - case 638: /* spirv_execution_mode_qualifier: SPIRV_EXECUTION_MODE LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT RIGHT_PAREN */ -#line 4177 "MachineIndependent/glslang.y" + case 637: /* spirv_execution_mode_qualifier: SPIRV_EXECUTION_MODE LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT RIGHT_PAREN */ +#line 4167 "MachineIndependent/glslang.y" { parseContext.intermediate.insertSpirvRequirement((yyvsp[-3].interm.spirvReq)); parseContext.intermediate.insertSpirvExecutionMode((yyvsp[-1].lex).i); (yyval.interm.intermNode) = 0; } -#line 11801 "MachineIndependent/glslang_tab.cpp" +#line 11782 "MachineIndependent/glslang_tab.cpp" break; - case 639: /* spirv_execution_mode_qualifier: SPIRV_EXECUTION_MODE LEFT_PAREN INTCONSTANT COMMA spirv_execution_mode_parameter_list RIGHT_PAREN */ -#line 4182 "MachineIndependent/glslang.y" + case 638: /* spirv_execution_mode_qualifier: SPIRV_EXECUTION_MODE LEFT_PAREN INTCONSTANT COMMA spirv_execution_mode_parameter_list RIGHT_PAREN */ +#line 4172 "MachineIndependent/glslang.y" { parseContext.intermediate.insertSpirvExecutionMode((yyvsp[-3].lex).i, (yyvsp[-1].interm.intermNode)->getAsAggregate()); (yyval.interm.intermNode) = 0; } -#line 11810 "MachineIndependent/glslang_tab.cpp" +#line 11791 "MachineIndependent/glslang_tab.cpp" break; - case 640: /* spirv_execution_mode_qualifier: SPIRV_EXECUTION_MODE LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT COMMA spirv_execution_mode_parameter_list RIGHT_PAREN */ -#line 4186 "MachineIndependent/glslang.y" + case 639: /* spirv_execution_mode_qualifier: SPIRV_EXECUTION_MODE LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT COMMA spirv_execution_mode_parameter_list RIGHT_PAREN */ +#line 4176 "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 11820 "MachineIndependent/glslang_tab.cpp" +#line 11801 "MachineIndependent/glslang_tab.cpp" break; - case 641: /* spirv_execution_mode_qualifier: SPIRV_EXECUTION_MODE_ID LEFT_PAREN INTCONSTANT COMMA spirv_execution_mode_id_parameter_list RIGHT_PAREN */ -#line 4191 "MachineIndependent/glslang.y" + case 640: /* spirv_execution_mode_qualifier: SPIRV_EXECUTION_MODE_ID LEFT_PAREN INTCONSTANT COMMA spirv_execution_mode_id_parameter_list RIGHT_PAREN */ +#line 4181 "MachineIndependent/glslang.y" { parseContext.intermediate.insertSpirvExecutionModeId((yyvsp[-3].lex).i, (yyvsp[-1].interm.intermNode)->getAsAggregate()); (yyval.interm.intermNode) = 0; } -#line 11829 "MachineIndependent/glslang_tab.cpp" +#line 11810 "MachineIndependent/glslang_tab.cpp" break; - case 642: /* 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 4195 "MachineIndependent/glslang.y" + case 641: /* 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 4185 "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 11839 "MachineIndependent/glslang_tab.cpp" +#line 11820 "MachineIndependent/glslang_tab.cpp" break; - case 643: /* spirv_execution_mode_parameter_list: spirv_execution_mode_parameter */ -#line 4202 "MachineIndependent/glslang.y" + case 642: /* spirv_execution_mode_parameter_list: spirv_execution_mode_parameter */ +#line 4192 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = parseContext.intermediate.makeAggregate((yyvsp[0].interm.intermNode)); } -#line 11847 "MachineIndependent/glslang_tab.cpp" +#line 11828 "MachineIndependent/glslang_tab.cpp" break; - case 644: /* spirv_execution_mode_parameter_list: spirv_execution_mode_parameter_list COMMA spirv_execution_mode_parameter */ -#line 4205 "MachineIndependent/glslang.y" + case 643: /* spirv_execution_mode_parameter_list: spirv_execution_mode_parameter_list COMMA spirv_execution_mode_parameter */ +#line 4195 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = parseContext.intermediate.growAggregate((yyvsp[-2].interm.intermNode), (yyvsp[0].interm.intermNode)); } -#line 11855 "MachineIndependent/glslang_tab.cpp" +#line 11836 "MachineIndependent/glslang_tab.cpp" break; - case 645: /* spirv_execution_mode_parameter: FLOATCONSTANT */ -#line 4210 "MachineIndependent/glslang.y" + case 644: /* spirv_execution_mode_parameter: FLOATCONSTANT */ +#line 4200 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).d, EbtFloat, (yyvsp[0].lex).loc, true); } -#line 11863 "MachineIndependent/glslang_tab.cpp" +#line 11844 "MachineIndependent/glslang_tab.cpp" break; - case 646: /* spirv_execution_mode_parameter: INTCONSTANT */ -#line 4213 "MachineIndependent/glslang.y" + case 645: /* spirv_execution_mode_parameter: INTCONSTANT */ +#line 4203 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).i, (yyvsp[0].lex).loc, true); } -#line 11871 "MachineIndependent/glslang_tab.cpp" +#line 11852 "MachineIndependent/glslang_tab.cpp" break; - case 647: /* spirv_execution_mode_parameter: UINTCONSTANT */ -#line 4216 "MachineIndependent/glslang.y" + case 646: /* spirv_execution_mode_parameter: UINTCONSTANT */ +#line 4206 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).u, (yyvsp[0].lex).loc, true); } -#line 11879 "MachineIndependent/glslang_tab.cpp" +#line 11860 "MachineIndependent/glslang_tab.cpp" break; - case 648: /* spirv_execution_mode_parameter: BOOLCONSTANT */ -#line 4219 "MachineIndependent/glslang.y" + case 647: /* spirv_execution_mode_parameter: BOOLCONSTANT */ +#line 4209 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).b, (yyvsp[0].lex).loc, true); } -#line 11887 "MachineIndependent/glslang_tab.cpp" +#line 11868 "MachineIndependent/glslang_tab.cpp" break; - case 649: /* spirv_execution_mode_parameter: STRING_LITERAL */ -#line 4222 "MachineIndependent/glslang.y" + case 648: /* spirv_execution_mode_parameter: STRING_LITERAL */ +#line 4212 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).string, (yyvsp[0].lex).loc, true); } -#line 11895 "MachineIndependent/glslang_tab.cpp" +#line 11876 "MachineIndependent/glslang_tab.cpp" break; - case 650: /* spirv_execution_mode_id_parameter_list: constant_expression */ -#line 4227 "MachineIndependent/glslang.y" + case 649: /* spirv_execution_mode_id_parameter_list: constant_expression */ +#line 4217 "MachineIndependent/glslang.y" { if ((yyvsp[0].interm.intermTypedNode)->getBasicType() != EbtFloat && (yyvsp[0].interm.intermTypedNode)->getBasicType() != EbtInt && @@ -11905,11 +11886,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 11909 "MachineIndependent/glslang_tab.cpp" +#line 11890 "MachineIndependent/glslang_tab.cpp" break; - case 651: /* spirv_execution_mode_id_parameter_list: spirv_execution_mode_id_parameter_list COMMA constant_expression */ -#line 4236 "MachineIndependent/glslang.y" + case 650: /* spirv_execution_mode_id_parameter_list: spirv_execution_mode_id_parameter_list COMMA constant_expression */ +#line 4226 "MachineIndependent/glslang.y" { if ((yyvsp[0].interm.intermTypedNode)->getBasicType() != EbtFloat && (yyvsp[0].interm.intermTypedNode)->getBasicType() != EbtInt && @@ -11919,156 +11900,156 @@ 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 11923 "MachineIndependent/glslang_tab.cpp" +#line 11904 "MachineIndependent/glslang_tab.cpp" break; - case 652: /* spirv_storage_class_qualifier: SPIRV_STORAGE_CLASS LEFT_PAREN INTCONSTANT RIGHT_PAREN */ -#line 4247 "MachineIndependent/glslang.y" + case 651: /* spirv_storage_class_qualifier: SPIRV_STORAGE_CLASS LEFT_PAREN INTCONSTANT RIGHT_PAREN */ +#line 4237 "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 11933 "MachineIndependent/glslang_tab.cpp" +#line 11914 "MachineIndependent/glslang_tab.cpp" break; - case 653: /* spirv_storage_class_qualifier: SPIRV_STORAGE_CLASS LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT RIGHT_PAREN */ -#line 4252 "MachineIndependent/glslang.y" + case 652: /* spirv_storage_class_qualifier: SPIRV_STORAGE_CLASS LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT RIGHT_PAREN */ +#line 4242 "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 11944 "MachineIndependent/glslang_tab.cpp" +#line 11925 "MachineIndependent/glslang_tab.cpp" break; - case 654: /* spirv_decorate_qualifier: SPIRV_DECORATE LEFT_PAREN INTCONSTANT RIGHT_PAREN */ -#line 4260 "MachineIndependent/glslang.y" + case 653: /* spirv_decorate_qualifier: SPIRV_DECORATE LEFT_PAREN INTCONSTANT RIGHT_PAREN */ +#line 4250 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[-3].lex).loc); (yyval.interm.type).qualifier.setSpirvDecorate((yyvsp[-1].lex).i); } -#line 11953 "MachineIndependent/glslang_tab.cpp" +#line 11934 "MachineIndependent/glslang_tab.cpp" break; - case 655: /* spirv_decorate_qualifier: SPIRV_DECORATE LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT RIGHT_PAREN */ -#line 4264 "MachineIndependent/glslang.y" + case 654: /* spirv_decorate_qualifier: SPIRV_DECORATE LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT RIGHT_PAREN */ +#line 4254 "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 11963 "MachineIndependent/glslang_tab.cpp" +#line 11944 "MachineIndependent/glslang_tab.cpp" break; - case 656: /* spirv_decorate_qualifier: SPIRV_DECORATE LEFT_PAREN INTCONSTANT COMMA spirv_decorate_parameter_list RIGHT_PAREN */ -#line 4269 "MachineIndependent/glslang.y" + case 655: /* spirv_decorate_qualifier: SPIRV_DECORATE LEFT_PAREN INTCONSTANT COMMA spirv_decorate_parameter_list RIGHT_PAREN */ +#line 4259 "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 11972 "MachineIndependent/glslang_tab.cpp" +#line 11953 "MachineIndependent/glslang_tab.cpp" break; - case 657: /* spirv_decorate_qualifier: SPIRV_DECORATE LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT COMMA spirv_decorate_parameter_list RIGHT_PAREN */ -#line 4273 "MachineIndependent/glslang.y" + case 656: /* spirv_decorate_qualifier: SPIRV_DECORATE LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT COMMA spirv_decorate_parameter_list RIGHT_PAREN */ +#line 4263 "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 11982 "MachineIndependent/glslang_tab.cpp" +#line 11963 "MachineIndependent/glslang_tab.cpp" break; - case 658: /* spirv_decorate_qualifier: SPIRV_DECORATE_ID LEFT_PAREN INTCONSTANT COMMA spirv_decorate_id_parameter_list RIGHT_PAREN */ -#line 4278 "MachineIndependent/glslang.y" + case 657: /* spirv_decorate_qualifier: SPIRV_DECORATE_ID LEFT_PAREN INTCONSTANT COMMA spirv_decorate_id_parameter_list RIGHT_PAREN */ +#line 4268 "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 11991 "MachineIndependent/glslang_tab.cpp" +#line 11972 "MachineIndependent/glslang_tab.cpp" break; - case 659: /* spirv_decorate_qualifier: SPIRV_DECORATE_ID LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT COMMA spirv_decorate_id_parameter_list RIGHT_PAREN */ -#line 4282 "MachineIndependent/glslang.y" + case 658: /* spirv_decorate_qualifier: SPIRV_DECORATE_ID LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT COMMA spirv_decorate_id_parameter_list RIGHT_PAREN */ +#line 4272 "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 12001 "MachineIndependent/glslang_tab.cpp" +#line 11982 "MachineIndependent/glslang_tab.cpp" break; - case 660: /* spirv_decorate_qualifier: SPIRV_DECORATE_STRING LEFT_PAREN INTCONSTANT COMMA spirv_decorate_string_parameter_list RIGHT_PAREN */ -#line 4287 "MachineIndependent/glslang.y" + case 659: /* spirv_decorate_qualifier: SPIRV_DECORATE_STRING LEFT_PAREN INTCONSTANT COMMA spirv_decorate_string_parameter_list RIGHT_PAREN */ +#line 4277 "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 12010 "MachineIndependent/glslang_tab.cpp" +#line 11991 "MachineIndependent/glslang_tab.cpp" break; - case 661: /* spirv_decorate_qualifier: SPIRV_DECORATE_STRING LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT COMMA spirv_decorate_string_parameter_list RIGHT_PAREN */ -#line 4291 "MachineIndependent/glslang.y" + case 660: /* spirv_decorate_qualifier: SPIRV_DECORATE_STRING LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT COMMA spirv_decorate_string_parameter_list RIGHT_PAREN */ +#line 4281 "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 12020 "MachineIndependent/glslang_tab.cpp" +#line 12001 "MachineIndependent/glslang_tab.cpp" break; - case 662: /* spirv_decorate_parameter_list: spirv_decorate_parameter */ -#line 4298 "MachineIndependent/glslang.y" + case 661: /* spirv_decorate_parameter_list: spirv_decorate_parameter */ +#line 4288 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = parseContext.intermediate.makeAggregate((yyvsp[0].interm.intermNode)); } -#line 12028 "MachineIndependent/glslang_tab.cpp" +#line 12009 "MachineIndependent/glslang_tab.cpp" break; - case 663: /* spirv_decorate_parameter_list: spirv_decorate_parameter_list COMMA spirv_decorate_parameter */ -#line 4301 "MachineIndependent/glslang.y" + case 662: /* spirv_decorate_parameter_list: spirv_decorate_parameter_list COMMA spirv_decorate_parameter */ +#line 4291 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = parseContext.intermediate.growAggregate((yyvsp[-2].interm.intermNode), (yyvsp[0].interm.intermNode)); } -#line 12036 "MachineIndependent/glslang_tab.cpp" +#line 12017 "MachineIndependent/glslang_tab.cpp" break; - case 664: /* spirv_decorate_parameter: FLOATCONSTANT */ -#line 4306 "MachineIndependent/glslang.y" + case 663: /* spirv_decorate_parameter: FLOATCONSTANT */ +#line 4296 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).d, EbtFloat, (yyvsp[0].lex).loc, true); } -#line 12044 "MachineIndependent/glslang_tab.cpp" +#line 12025 "MachineIndependent/glslang_tab.cpp" break; - case 665: /* spirv_decorate_parameter: INTCONSTANT */ -#line 4309 "MachineIndependent/glslang.y" + case 664: /* spirv_decorate_parameter: INTCONSTANT */ +#line 4299 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).i, (yyvsp[0].lex).loc, true); } -#line 12052 "MachineIndependent/glslang_tab.cpp" +#line 12033 "MachineIndependent/glslang_tab.cpp" break; - case 666: /* spirv_decorate_parameter: UINTCONSTANT */ -#line 4312 "MachineIndependent/glslang.y" + case 665: /* spirv_decorate_parameter: UINTCONSTANT */ +#line 4302 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).u, (yyvsp[0].lex).loc, true); } -#line 12060 "MachineIndependent/glslang_tab.cpp" +#line 12041 "MachineIndependent/glslang_tab.cpp" break; - case 667: /* spirv_decorate_parameter: BOOLCONSTANT */ -#line 4315 "MachineIndependent/glslang.y" + case 666: /* spirv_decorate_parameter: BOOLCONSTANT */ +#line 4305 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).b, (yyvsp[0].lex).loc, true); } -#line 12068 "MachineIndependent/glslang_tab.cpp" +#line 12049 "MachineIndependent/glslang_tab.cpp" break; - case 668: /* spirv_decorate_id_parameter_list: constant_expression */ -#line 4320 "MachineIndependent/glslang.y" + case 667: /* spirv_decorate_id_parameter_list: constant_expression */ +#line 4310 "MachineIndependent/glslang.y" { if ((yyvsp[0].interm.intermTypedNode)->getBasicType() != EbtFloat && (yyvsp[0].interm.intermTypedNode)->getBasicType() != EbtInt && @@ -12077,11 +12058,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 12081 "MachineIndependent/glslang_tab.cpp" +#line 12062 "MachineIndependent/glslang_tab.cpp" break; - case 669: /* spirv_decorate_id_parameter_list: spirv_decorate_id_parameter_list COMMA constant_expression */ -#line 4328 "MachineIndependent/glslang.y" + case 668: /* spirv_decorate_id_parameter_list: spirv_decorate_id_parameter_list COMMA constant_expression */ +#line 4318 "MachineIndependent/glslang.y" { if ((yyvsp[0].interm.intermTypedNode)->getBasicType() != EbtFloat && (yyvsp[0].interm.intermTypedNode)->getBasicType() != EbtInt && @@ -12090,139 +12071,147 @@ 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 12094 "MachineIndependent/glslang_tab.cpp" +#line 12075 "MachineIndependent/glslang_tab.cpp" break; - case 670: /* spirv_decorate_string_parameter_list: STRING_LITERAL */ -#line 4338 "MachineIndependent/glslang.y" + case 669: /* spirv_decorate_string_parameter_list: STRING_LITERAL */ +#line 4328 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = parseContext.intermediate.makeAggregate( parseContext.intermediate.addConstantUnion((yyvsp[0].lex).string, (yyvsp[0].lex).loc, true)); } -#line 12103 "MachineIndependent/glslang_tab.cpp" +#line 12084 "MachineIndependent/glslang_tab.cpp" break; - case 671: /* spirv_decorate_string_parameter_list: spirv_decorate_string_parameter_list COMMA STRING_LITERAL */ -#line 4342 "MachineIndependent/glslang.y" + case 670: /* spirv_decorate_string_parameter_list: spirv_decorate_string_parameter_list COMMA STRING_LITERAL */ +#line 4332 "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 12111 "MachineIndependent/glslang_tab.cpp" +#line 12092 "MachineIndependent/glslang_tab.cpp" break; - case 672: /* spirv_type_specifier: SPIRV_TYPE LEFT_PAREN spirv_instruction_qualifier_list COMMA spirv_type_parameter_list RIGHT_PAREN */ -#line 4347 "MachineIndependent/glslang.y" + case 671: /* spirv_type_specifier: SPIRV_TYPE LEFT_PAREN spirv_instruction_qualifier_list COMMA spirv_type_parameter_list RIGHT_PAREN */ +#line 4337 "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 12120 "MachineIndependent/glslang_tab.cpp" +#line 12101 "MachineIndependent/glslang_tab.cpp" break; - case 673: /* spirv_type_specifier: SPIRV_TYPE LEFT_PAREN spirv_requirements_list COMMA spirv_instruction_qualifier_list COMMA spirv_type_parameter_list RIGHT_PAREN */ -#line 4351 "MachineIndependent/glslang.y" + case 672: /* spirv_type_specifier: SPIRV_TYPE LEFT_PAREN spirv_requirements_list COMMA spirv_instruction_qualifier_list COMMA spirv_type_parameter_list RIGHT_PAREN */ +#line 4341 "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 12130 "MachineIndependent/glslang_tab.cpp" +#line 12111 "MachineIndependent/glslang_tab.cpp" break; - case 674: /* spirv_type_specifier: SPIRV_TYPE LEFT_PAREN spirv_instruction_qualifier_list RIGHT_PAREN */ -#line 4356 "MachineIndependent/glslang.y" + case 673: /* spirv_type_specifier: SPIRV_TYPE LEFT_PAREN spirv_instruction_qualifier_list RIGHT_PAREN */ +#line 4346 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[-3].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).setSpirvType(*(yyvsp[-1].interm.spirvInst)); } -#line 12139 "MachineIndependent/glslang_tab.cpp" +#line 12120 "MachineIndependent/glslang_tab.cpp" break; - case 675: /* spirv_type_specifier: SPIRV_TYPE LEFT_PAREN spirv_requirements_list COMMA spirv_instruction_qualifier_list RIGHT_PAREN */ -#line 4360 "MachineIndependent/glslang.y" + case 674: /* spirv_type_specifier: SPIRV_TYPE LEFT_PAREN spirv_requirements_list COMMA spirv_instruction_qualifier_list RIGHT_PAREN */ +#line 4350 "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 12149 "MachineIndependent/glslang_tab.cpp" +#line 12130 "MachineIndependent/glslang_tab.cpp" break; - case 676: /* spirv_type_parameter_list: spirv_type_parameter */ -#line 4367 "MachineIndependent/glslang.y" + case 675: /* spirv_type_parameter_list: spirv_type_parameter */ +#line 4357 "MachineIndependent/glslang.y" { (yyval.interm.spirvTypeParams) = (yyvsp[0].interm.spirvTypeParams); } -#line 12157 "MachineIndependent/glslang_tab.cpp" +#line 12138 "MachineIndependent/glslang_tab.cpp" break; - case 677: /* spirv_type_parameter_list: spirv_type_parameter_list COMMA spirv_type_parameter */ -#line 4370 "MachineIndependent/glslang.y" + case 676: /* spirv_type_parameter_list: spirv_type_parameter_list COMMA spirv_type_parameter */ +#line 4360 "MachineIndependent/glslang.y" { (yyval.interm.spirvTypeParams) = parseContext.mergeSpirvTypeParameters((yyvsp[-2].interm.spirvTypeParams), (yyvsp[0].interm.spirvTypeParams)); } -#line 12165 "MachineIndependent/glslang_tab.cpp" +#line 12146 "MachineIndependent/glslang_tab.cpp" break; - case 678: /* spirv_type_parameter: constant_expression */ -#line 4375 "MachineIndependent/glslang.y" + case 677: /* spirv_type_parameter: constant_expression */ +#line 4365 "MachineIndependent/glslang.y" { (yyval.interm.spirvTypeParams) = parseContext.makeSpirvTypeParameters((yyvsp[0].interm.intermTypedNode)->getLoc(), (yyvsp[0].interm.intermTypedNode)->getAsConstantUnion()); } -#line 12173 "MachineIndependent/glslang_tab.cpp" +#line 12154 "MachineIndependent/glslang_tab.cpp" + break; + + case 678: /* spirv_type_parameter: type_specifier */ +#line 4368 "MachineIndependent/glslang.y" + { + (yyval.interm.spirvTypeParams) = parseContext.makeSpirvTypeParameters((yyvsp[0].interm.type)); + } +#line 12162 "MachineIndependent/glslang_tab.cpp" break; case 679: /* spirv_instruction_qualifier: SPIRV_INSTRUCTION LEFT_PAREN spirv_instruction_qualifier_list RIGHT_PAREN */ -#line 4380 "MachineIndependent/glslang.y" +#line 4373 "MachineIndependent/glslang.y" { (yyval.interm.spirvInst) = (yyvsp[-1].interm.spirvInst); } -#line 12181 "MachineIndependent/glslang_tab.cpp" +#line 12170 "MachineIndependent/glslang_tab.cpp" break; case 680: /* spirv_instruction_qualifier: SPIRV_INSTRUCTION LEFT_PAREN spirv_requirements_list COMMA spirv_instruction_qualifier_list RIGHT_PAREN */ -#line 4383 "MachineIndependent/glslang.y" +#line 4376 "MachineIndependent/glslang.y" { parseContext.intermediate.insertSpirvRequirement((yyvsp[-3].interm.spirvReq)); (yyval.interm.spirvInst) = (yyvsp[-1].interm.spirvInst); } -#line 12190 "MachineIndependent/glslang_tab.cpp" +#line 12179 "MachineIndependent/glslang_tab.cpp" break; case 681: /* spirv_instruction_qualifier_list: spirv_instruction_qualifier_id */ -#line 4389 "MachineIndependent/glslang.y" +#line 4382 "MachineIndependent/glslang.y" { (yyval.interm.spirvInst) = (yyvsp[0].interm.spirvInst); } -#line 12198 "MachineIndependent/glslang_tab.cpp" +#line 12187 "MachineIndependent/glslang_tab.cpp" break; case 682: /* spirv_instruction_qualifier_list: spirv_instruction_qualifier_list COMMA spirv_instruction_qualifier_id */ -#line 4392 "MachineIndependent/glslang.y" +#line 4385 "MachineIndependent/glslang.y" { (yyval.interm.spirvInst) = parseContext.mergeSpirvInstruction((yyvsp[-1].lex).loc, (yyvsp[-2].interm.spirvInst), (yyvsp[0].interm.spirvInst)); } -#line 12206 "MachineIndependent/glslang_tab.cpp" +#line 12195 "MachineIndependent/glslang_tab.cpp" break; case 683: /* spirv_instruction_qualifier_id: IDENTIFIER EQUAL STRING_LITERAL */ -#line 4397 "MachineIndependent/glslang.y" +#line 4390 "MachineIndependent/glslang.y" { (yyval.interm.spirvInst) = parseContext.makeSpirvInstruction((yyvsp[-1].lex).loc, *(yyvsp[-2].lex).string, *(yyvsp[0].lex).string); } -#line 12214 "MachineIndependent/glslang_tab.cpp" +#line 12203 "MachineIndependent/glslang_tab.cpp" break; case 684: /* spirv_instruction_qualifier_id: IDENTIFIER EQUAL INTCONSTANT */ -#line 4400 "MachineIndependent/glslang.y" +#line 4393 "MachineIndependent/glslang.y" { (yyval.interm.spirvInst) = parseContext.makeSpirvInstruction((yyvsp[-1].lex).loc, *(yyvsp[-2].lex).string, (yyvsp[0].lex).i); } -#line 12222 "MachineIndependent/glslang_tab.cpp" +#line 12211 "MachineIndependent/glslang_tab.cpp" break; -#line 12226 "MachineIndependent/glslang_tab.cpp" +#line 12215 "MachineIndependent/glslang_tab.cpp" default: break; } @@ -12447,5 +12436,5 @@ yyreturn: return yyresult; } -#line 4405 "MachineIndependent/glslang.y" +#line 4398 "MachineIndependent/glslang.y" diff --git a/libraries/glslang/glslang/MachineIndependent/glslang_tab.cpp.h b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/glslang_tab.cpp.h similarity index 98% rename from libraries/glslang/glslang/MachineIndependent/glslang_tab.cpp.h rename to libraries/ZVulkan/src/glslang/glslang/MachineIndependent/glslang_tab.cpp.h index a6871b319b..596a10e6d9 100644 --- a/libraries/glslang/glslang/MachineIndependent/glslang_tab.cpp.h +++ b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/glslang_tab.cpp.h @@ -501,12 +501,11 @@ extern int yydebug; SHADERCALLCOHERENT = 702, /* SHADERCALLCOHERENT */ NOPERSPECTIVE = 703, /* NOPERSPECTIVE */ EXPLICITINTERPAMD = 704, /* EXPLICITINTERPAMD */ - PERVERTEXEXT = 705, /* PERVERTEXEXT */ - PERVERTEXNV = 706, /* PERVERTEXNV */ - PERPRIMITIVENV = 707, /* PERPRIMITIVENV */ - PERVIEWNV = 708, /* PERVIEWNV */ - PERTASKNV = 709, /* PERTASKNV */ - PRECISE = 710 /* PRECISE */ + PERVERTEXNV = 705, /* PERVERTEXNV */ + PERPRIMITIVENV = 706, /* PERPRIMITIVENV */ + PERVIEWNV = 707, /* PERVIEWNV */ + PERTASKNV = 708, /* PERTASKNV */ + PRECISE = 709 /* PRECISE */ }; typedef enum yytokentype yytoken_kind_t; #endif @@ -554,7 +553,7 @@ union YYSTYPE glslang::TArraySizes* typeParameters; } interm; -#line 558 "MachineIndependent/glslang_tab.cpp.h" +#line 557 "MachineIndependent/glslang_tab.cpp.h" }; typedef union YYSTYPE YYSTYPE; diff --git a/libraries/glslang/glslang/MachineIndependent/intermOut.cpp b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/intermOut.cpp similarity index 99% rename from libraries/glslang/glslang/MachineIndependent/intermOut.cpp rename to libraries/ZVulkan/src/glslang/glslang/MachineIndependent/intermOut.cpp index d8a3aab5d0..a0fade16c0 100644 --- a/libraries/glslang/glslang/MachineIndependent/intermOut.cpp +++ b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/intermOut.cpp @@ -48,6 +48,37 @@ #endif #include +namespace { + +bool IsInfinity(double x) { +#ifdef _MSC_VER + switch (_fpclass(x)) { + case _FPCLASS_NINF: + case _FPCLASS_PINF: + return true; + default: + return false; + } +#else + return std::isinf(x); +#endif +} + +bool IsNan(double x) { +#ifdef _MSC_VER + switch (_fpclass(x)) { + case _FPCLASS_SNAN: + case _FPCLASS_QNAN: + return true; + default: + return false; + } +#else + return std::isnan(x); +#endif +} + +} namespace glslang { diff --git a/libraries/glslang/glslang/MachineIndependent/iomapper.cpp b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/iomapper.cpp similarity index 93% rename from libraries/glslang/glslang/MachineIndependent/iomapper.cpp rename to libraries/ZVulkan/src/glslang/glslang/MachineIndependent/iomapper.cpp index 4250e92da6..7e12864f36 100644 --- a/libraries/glslang/glslang/MachineIndependent/iomapper.cpp +++ b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/iomapper.cpp @@ -79,7 +79,7 @@ public: target = &inputList; else if (base->getQualifier().storage == EvqVaryingOut) target = &outputList; - else if (base->getQualifier().isUniformOrBuffer() && !base->getQualifier().isPushConstant() && !base->getQualifier().isShaderRecord()) + else if (base->getQualifier().isUniformOrBuffer() && !base->getQualifier().isPushConstant()) target = &uniformList; // If a global is being visited, then we should also traverse it incase it's evaluation // ends up visiting inputs we want to tag as live @@ -203,7 +203,11 @@ struct TResolverUniformAdaptor { inline void operator()(std::pair& entKey) { TVarEntryInfo& ent = entKey.second; - ent.clearNewAssignments(); + ent.newLocation = -1; + ent.newComponent = -1; + ent.newBinding = -1; + ent.newSet = -1; + ent.newIndex = -1; const bool isValid = resolver.validateBinding(stage, ent); if (isValid) { resolver.resolveSet(ent.stage, ent); @@ -277,7 +281,11 @@ struct TResolverInOutAdaptor { inline void operator()(std::pair& entKey) { TVarEntryInfo& ent = entKey.second; - ent.clearNewAssignments(); + ent.newLocation = -1; + ent.newComponent = -1; + ent.newBinding = -1; + ent.newSet = -1; + ent.newIndex = -1; const bool isValid = resolver.validateInOut(ent.stage, ent); if (isValid) { resolver.resolveInOutLocation(stage, ent); @@ -506,24 +514,6 @@ struct TSymbolValidater return; } else { - // Deal with input/output pairs where one is a block member but the other is loose, - // e.g. with ARB_separate_shader_objects - if (type1.getBasicType() == EbtBlock && - type1.isStruct() && !type2.isStruct()) { - // Iterate through block members tracking layout - glslang::TString name; - type1.getStruct()->begin()->type->appendMangledName(name); - if (name == mangleName2 - && type1.getQualifier().layoutLocation == type2.getQualifier().layoutLocation) return; - } - if (type2.getBasicType() == EbtBlock && - type2.isStruct() && !type1.isStruct()) { - // Iterate through block members tracking layout - glslang::TString name; - type2.getStruct()->begin()->type->appendMangledName(name); - if (name == mangleName1 - && type1.getQualifier().layoutLocation == type2.getQualifier().layoutLocation) return; - } TString err = "Invalid In/Out variable type : " + entKey.first; infoSink.info.message(EPrefixInternalError, err.c_str()); hadError = true; @@ -758,7 +748,7 @@ private: }; TDefaultIoResolverBase::TDefaultIoResolverBase(const TIntermediate& intermediate) - : referenceIntermediate(intermediate) + : intermediate(intermediate) , nextUniformLocation(intermediate.getUniformLocationBase()) , nextInputLocation(0) , nextOutputLocation(0) @@ -770,17 +760,17 @@ TDefaultIoResolverBase::TDefaultIoResolverBase(const TIntermediate& intermediate int TDefaultIoResolverBase::getBaseBinding(EShLanguage stage, TResourceType res, unsigned int set) const { return stageIntermediates[stage] ? selectBaseBinding(stageIntermediates[stage]->getShiftBinding(res), stageIntermediates[stage]->getShiftBindingForSet(res, set)) - : selectBaseBinding(referenceIntermediate.getShiftBinding(res), referenceIntermediate.getShiftBindingForSet(res, set)); + : selectBaseBinding(intermediate.getShiftBinding(res), intermediate.getShiftBindingForSet(res, set)); } const std::vector& TDefaultIoResolverBase::getResourceSetBinding(EShLanguage stage) const { return stageIntermediates[stage] ? stageIntermediates[stage]->getResourceSetBinding() - : referenceIntermediate.getResourceSetBinding(); + : intermediate.getResourceSetBinding(); } -bool TDefaultIoResolverBase::doAutoBindingMapping() const { return referenceIntermediate.getAutoMapBindings(); } +bool TDefaultIoResolverBase::doAutoBindingMapping() const { return intermediate.getAutoMapBindings(); } -bool TDefaultIoResolverBase::doAutoLocationMapping() const { return referenceIntermediate.getAutoMapLocations(); } +bool TDefaultIoResolverBase::doAutoLocationMapping() const { return intermediate.getAutoMapLocations(); } TDefaultIoResolverBase::TSlotSet::iterator TDefaultIoResolverBase::findSlot(int set, int slot) { return std::lower_bound(slots[set].begin(), slots[set].end(), slot); @@ -837,7 +827,7 @@ int TDefaultIoResolverBase::resolveUniformLocation(EShLanguage /*stage*/, TVarEn } // no locations added if already present, a built-in variable, a block, or an opaque if (type.getQualifier().hasLocation() || type.isBuiltIn() || type.getBasicType() == EbtBlock || - type.isAtomic() || type.isSpirvType() || (type.containsOpaque() && referenceIntermediate.getSpv().openGl == 0)) { + type.isAtomic() || (type.containsOpaque() && intermediate.getSpv().openGl == 0)) { return ent.newLocation = -1; } // no locations on blocks of built-in variables @@ -849,7 +839,7 @@ int TDefaultIoResolverBase::resolveUniformLocation(EShLanguage /*stage*/, TVarEn return ent.newLocation = -1; } } - int location = referenceIntermediate.getUniformLocationOverride(name); + int location = intermediate.getUniformLocationOverride(name); if (location != -1) { return ent.newLocation = location; } @@ -865,8 +855,8 @@ int TDefaultIoResolverBase::resolveInOutLocation(EShLanguage stage, TVarEntryInf return ent.newLocation = -1; } - // no locations added if already present, a built-in variable, or a variable with SPIR-V decorate - if (type.getQualifier().hasLocation() || type.isBuiltIn() || type.getQualifier().hasSprivDecorate()) { + // no locations added if already present, or a built-in variable + if (type.getQualifier().hasLocation() || type.isBuiltIn()) { return ent.newLocation = -1; } @@ -952,8 +942,8 @@ int TDefaultGlslIoResolver::resolveInOutLocation(EShLanguage stage, TVarEntryInf if (type.getQualifier().hasLocation()) { return ent.newLocation = type.getQualifier().layoutLocation; } - // no locations added if already present, a built-in variable, or a variable with SPIR-V decorate - if (type.isBuiltIn() || type.getQualifier().hasSprivDecorate()) { + // no locations added if already present, or a built-in variable + if (type.isBuiltIn()) { return ent.newLocation = -1; } // no locations on blocks of built-in variables @@ -1034,8 +1024,7 @@ int TDefaultGlslIoResolver::resolveUniformLocation(EShLanguage /*stage*/, TVarEn } else { // no locations added if already present, a built-in variable, a block, or an opaque if (type.getQualifier().hasLocation() || type.isBuiltIn() || type.getBasicType() == EbtBlock || - type.isAtomic() || type.isSpirvType() || - (type.containsOpaque() && referenceIntermediate.getSpv().openGl == 0)) { + type.isAtomic() || (type.containsOpaque() && intermediate.getSpv().openGl == 0)) { return ent.newLocation = -1; } // no locations on blocks of built-in variables @@ -1048,7 +1037,7 @@ int TDefaultGlslIoResolver::resolveUniformLocation(EShLanguage /*stage*/, TVarEn } } } - int location = referenceIntermediate.getUniformLocationOverride(name.c_str()); + int location = intermediate.getUniformLocationOverride(name.c_str()); if (location != -1) { return ent.newLocation = location; } @@ -1097,7 +1086,7 @@ int TDefaultGlslIoResolver::resolveBinding(EShLanguage stage, TVarEntryInfo& ent const TType& type = ent.symbol->getType(); const TString& name = ent.symbol->getAccessName(); // On OpenGL arrays of opaque types take a separate binding for each element - int numBindings = referenceIntermediate.getSpv().openGl != 0 && type.isSizedArray() ? type.getCumulativeArraySize() : 1; + int numBindings = intermediate.getSpv().openGl != 0 && type.isSizedArray() ? type.getCumulativeArraySize() : 1; TResourceType resource = getResourceType(type); // don't need to handle uniform symbol, it will be handled in resolveUniformLocation if (resource == EResUbo && type.getBasicType() != EbtBlock) { @@ -1106,7 +1095,7 @@ int TDefaultGlslIoResolver::resolveBinding(EShLanguage stage, TVarEntryInfo& ent // There is no 'set' qualifier in OpenGL shading language, each resource has its own // binding name space, so remap the 'set' to resource type which make each resource // binding is valid from 0 to MAX_XXRESOURCE_BINDINGS - int set = referenceIntermediate.getSpv().openGl != 0 ? resource : ent.newSet; + int set = intermediate.getSpv().openGl != 0 ? resource : ent.newSet; int resourceKey = set; if (resource < EResCount) { if (type.getQualifier().hasBinding()) { @@ -1234,7 +1223,7 @@ void TDefaultGlslIoResolver::reserverResourceSlot(TVarEntryInfo& ent, TInfoSink& const TType& type = ent.symbol->getType(); const TString& name = ent.symbol->getAccessName(); TResourceType resource = getResourceType(type); - int set = referenceIntermediate.getSpv().openGl != 0 ? resource : resolveSet(ent.stage, ent); + int set = intermediate.getSpv().openGl != 0 ? resource : resolveSet(ent.stage, ent); int resourceKey = set; if (type.getQualifier().hasBinding()) { @@ -1244,7 +1233,7 @@ void TDefaultGlslIoResolver::reserverResourceSlot(TVarEntryInfo& ent, TInfoSink& if (iter == varSlotMap.end()) { // Reserve the slots for the ubo, ssbo and opaques who has explicit binding - int numBindings = referenceIntermediate.getSpv().openGl != 0 && type.isSizedArray() ? type.getCumulativeArraySize() : 1; + int numBindings = intermediate.getSpv().openGl != 0 && type.isSizedArray() ? type.getCumulativeArraySize() : 1; varSlotMap[name] = binding; reserveSlot(resourceKey, binding, numBindings); } else { @@ -1299,7 +1288,7 @@ struct TDefaultIoResolver : public TDefaultIoResolverBase { const TType& type = ent.symbol->getType(); const int set = getLayoutSet(type); // On OpenGL arrays of opaque types take a seperate binding for each element - int numBindings = referenceIntermediate.getSpv().openGl != 0 && type.isSizedArray() ? type.getCumulativeArraySize() : 1; + int numBindings = intermediate.getSpv().openGl != 0 && type.isSizedArray() ? type.getCumulativeArraySize() : 1; TResourceType resource = getResourceType(type); if (resource < EResCount) { if (type.getQualifier().hasBinding()) { @@ -1644,45 +1633,6 @@ bool TGlslIoMapper::doMap(TIoMapResolver* resolver, TInfoSink& infoSink) { return TVarEntryInfo::TOrderByPriority()(p1.second, p2.second); }); resolver->endResolve(EShLangCount); - if (autoPushConstantBlockName.length()) { - bool upgraded = false; - for (size_t stage = 0; stage < EShLangCount; stage++) { - if (intermediates[stage] != nullptr) { - TVarLiveMap** pUniformVarMap = uniformResolve.uniformVarMap; - auto at = pUniformVarMap[stage]->find(autoPushConstantBlockName); - if (at == pUniformVarMap[stage]->end()) - continue; - TQualifier& qualifier = at->second.symbol->getQualifier(); - if (!qualifier.isUniform()) - continue; - TType& t = at->second.symbol->getWritableType(); - int size, stride; - TIntermediate::getBaseAlignment(t, size, stride, autoPushConstantBlockPacking, - qualifier.layoutMatrix == ElmRowMajor); - if (size <= int(autoPushConstantMaxSize)) { - qualifier.setBlockStorage(EbsPushConstant); - qualifier.layoutPacking = autoPushConstantBlockPacking; - // Push constants don't have set/binding etc. decorations, remove those. - qualifier.layoutSet = TQualifier::layoutSetEnd; - at->second.clearNewAssignments(); - - upgraded = true; - } - } - } - // If it's been upgraded to push_constant, then remove it from the uniformVector - // so it doesn't get a set/binding assigned to it. - if (upgraded) { - while (1) { - auto at = std::find_if(uniformVector.begin(), uniformVector.end(), - [this](const TVarLivePair& p) { return p.first == autoPushConstantBlockName; }); - if (at != uniformVector.end()) - uniformVector.erase(at); - else - break; - } - } - } for (size_t stage = 0; stage < EShLangCount; stage++) { if (intermediates[stage] != nullptr) { // traverse each stage, set new location to each input/output and unifom symbol, set new binding to diff --git a/libraries/glslang/glslang/MachineIndependent/iomapper.h b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/iomapper.h similarity index 94% rename from libraries/glslang/glslang/MachineIndependent/iomapper.h rename to libraries/ZVulkan/src/glslang/glslang/MachineIndependent/iomapper.h index ba7bc3bbc7..07357c2ef4 100644 --- a/libraries/glslang/glslang/MachineIndependent/iomapper.h +++ b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/iomapper.h @@ -61,15 +61,6 @@ struct TVarEntryInfo { int newComponent; int newIndex; EShLanguage stage; - - void clearNewAssignments() { - 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; } }; @@ -174,7 +165,7 @@ public: protected: TDefaultIoResolverBase(TDefaultIoResolverBase&); TDefaultIoResolverBase& operator=(TDefaultIoResolverBase&); - const TIntermediate& referenceIntermediate; + const TIntermediate& intermediate; int nextUniformLocation; int nextInputLocation; int nextOutputLocation; @@ -300,7 +291,7 @@ public: bool virtual doMap(TIoMapResolver*, TInfoSink&) { return true; } }; -// I/O mapper for GLSL +// I/O mapper for OpenGL class TGlslIoMapper : public TIoMapper { public: TGlslIoMapper() { @@ -310,8 +301,6 @@ public: 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++) { @@ -331,13 +320,6 @@ public: intermediates[stage] = nullptr; } } - // 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) { - autoPushConstantBlockName = name; - autoPushConstantMaxSize = maxSize; - autoPushConstantBlockPacking = packing; - } // grow the reflection stage by stage bool addStage(EShLanguage, TIntermediate&, TInfoSink&, TIoMapResolver*) override; bool doMap(TIoMapResolver*, TInfoSink&) override; @@ -347,11 +329,6 @@ public: bool hadError = false; EProfile profile; int version; - -private: - TString autoPushConstantBlockName; - unsigned int autoPushConstantMaxSize; - TLayoutPacking autoPushConstantBlockPacking; }; } // end namespace glslang diff --git a/libraries/glslang/glslang/MachineIndependent/limits.cpp b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/limits.cpp similarity index 100% rename from libraries/glslang/glslang/MachineIndependent/limits.cpp rename to libraries/ZVulkan/src/glslang/glslang/MachineIndependent/limits.cpp diff --git a/libraries/glslang/glslang/MachineIndependent/linkValidate.cpp b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/linkValidate.cpp similarity index 84% rename from libraries/glslang/glslang/MachineIndependent/linkValidate.cpp rename to libraries/ZVulkan/src/glslang/glslang/MachineIndependent/linkValidate.cpp index 6e60155aaf..9656e2e7e0 100644 --- a/libraries/glslang/glslang/MachineIndependent/linkValidate.cpp +++ b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/linkValidate.cpp @@ -55,28 +55,22 @@ namespace glslang { // // Link-time error emitter. // -void TIntermediate::error(TInfoSink& infoSink, const char* message, EShLanguage unitStage) +void TIntermediate::error(TInfoSink& infoSink, const char* message) { #ifndef GLSLANG_WEB infoSink.info.prefix(EPrefixError); - if (unitStage < EShLangCount) - infoSink.info << "Linking " << StageName(getStage()) << " and " << StageName(unitStage) << " stages: " << message << "\n"; - else - infoSink.info << "Linking " << StageName(language) << " stage: " << message << "\n"; + infoSink.info << "Linking " << StageName(language) << " stage: " << message << "\n"; #endif ++numErrors; } // Link-time warning. -void TIntermediate::warn(TInfoSink& infoSink, const char* message, EShLanguage unitStage) +void TIntermediate::warn(TInfoSink& infoSink, const char* message) { #ifndef GLSLANG_WEB infoSink.info.prefix(EPrefixWarning); - if (unitStage < EShLangCount) - infoSink.info << "Linking " << StageName(language) << " and " << StageName(unitStage) << " stages: " << message << "\n"; - else - infoSink.info << "Linking " << StageName(language) << " stage: " << message << "\n"; + infoSink.info << "Linking " << StageName(language) << " stage: " << message << "\n"; #endif } @@ -318,7 +312,6 @@ void TIntermediate::mergeModes(TInfoSink& infoSink, TIntermediate& unit) MERGE_TRUE(autoMapBindings); MERGE_TRUE(autoMapLocations); MERGE_TRUE(invertY); - MERGE_TRUE(dxPositionW); MERGE_TRUE(flattenUniformArrays); MERGE_TRUE(useUnknownFormat); MERGE_TRUE(hlslOffsets); @@ -586,6 +579,9 @@ void TIntermediate::mergeGlobalUniformBlocks(TInfoSink& infoSink, TIntermediate& } void TIntermediate::mergeBlockDefinitions(TInfoSink& infoSink, TIntermSymbol* block, TIntermSymbol* unitBlock, TIntermediate* unit) { + if (block->getType() == unitBlock->getType()) { + return; + } if (block->getType().getTypeName() != unitBlock->getType().getTypeName() || block->getType().getBasicType() != unitBlock->getType().getBasicType() || @@ -632,42 +628,44 @@ void TIntermediate::mergeBlockDefinitions(TInfoSink& infoSink, TIntermSymbol* bl } } + TType unitType; + unitType.shallowCopy(unitBlock->getType()); + // update symbol node in unit tree, // and other nodes that may reference it class TMergeBlockTraverser : public TIntermTraverser { public: - TMergeBlockTraverser(const TIntermSymbol* newSym) - : newSymbol(newSym), unitType(nullptr), unit(nullptr), memberIndexUpdates(nullptr) - { - } - TMergeBlockTraverser(const TIntermSymbol* newSym, const glslang::TType* unitType, glslang::TIntermediate* unit, - const std::map* memberIdxUpdates) - : TIntermTraverser(false, true), newSymbol(newSym), unitType(unitType), unit(unit), memberIndexUpdates(memberIdxUpdates) - { - } - virtual ~TMergeBlockTraverser() {} + TMergeBlockTraverser(const glslang::TType &type, const glslang::TType& unitType, + glslang::TIntermediate& unit, + const std::map& memberIdxUpdates) : + newType(type), unitType(unitType), unit(unit), memberIndexUpdates(memberIdxUpdates) + { } + virtual ~TMergeBlockTraverser() { } - const TIntermSymbol* newSymbol; - const glslang::TType* unitType; // copy of original type - glslang::TIntermediate* unit; // intermediate that is being updated - const std::map* memberIndexUpdates; + const glslang::TType& newType; // type with modifications + const glslang::TType& unitType; // copy of original type + glslang::TIntermediate& unit; // intermediate that is being updated + const std::map& memberIndexUpdates; virtual void visitSymbol(TIntermSymbol* symbol) { - if (newSymbol->getAccessName() == symbol->getAccessName() && - newSymbol->getQualifier().getBlockStorage() == symbol->getQualifier().getBlockStorage()) { - // Each symbol node may have a local copy of the block structure. - // Update those structures to match the new one post-merge - *(symbol->getWritableType().getWritableStruct()) = *(newSymbol->getType().getStruct()); + glslang::TType& symType = symbol->getWritableType(); + + if (symType == unitType) { + // each symbol node has a local copy of the unitType + // if merging involves changing properties that aren't shared objects + // they should be updated in all instances + + // e.g. the struct list is a ptr to an object, so it can be updated + // once, outside the traverser + //*symType.getWritableStruct() = *newType.getStruct(); } + } virtual bool visitBinary(TVisit, glslang::TIntermBinary* node) { - if (!unit || !unitType || !memberIndexUpdates || memberIndexUpdates->empty()) - return true; - - if (node->getOp() == EOpIndexDirectStruct && node->getLeft()->getType() == *unitType) { + if (node->getOp() == EOpIndexDirectStruct && node->getLeft()->getType() == unitType) { // this is a dereference to a member of the block since the // member list changed, need to update this to point to the // right index @@ -675,8 +673,8 @@ void TIntermediate::mergeBlockDefinitions(TInfoSink& infoSink, TIntermSymbol* bl glslang::TIntermConstantUnion* constNode = node->getRight()->getAsConstantUnion(); unsigned int memberIdx = constNode->getConstArray()[0].getUConst(); - unsigned int newIdx = memberIndexUpdates->at(memberIdx); - TIntermTyped* newConstNode = unit->addConstantUnion(newIdx, node->getRight()->getLoc()); + unsigned int newIdx = memberIndexUpdates.at(memberIdx); + TIntermTyped* newConstNode = unit.addConstantUnion(newIdx, node->getRight()->getLoc()); node->setRight(newConstNode); delete constNode; @@ -685,20 +683,10 @@ void TIntermediate::mergeBlockDefinitions(TInfoSink& infoSink, TIntermSymbol* bl } return true; } - }; + } finalLinkTraverser(block->getType(), unitType, *unit, memberIndexUpdates); - // 'this' may have symbols that are using the old block structure, so traverse the tree to update those - // in 'visitSymbol' - TMergeBlockTraverser finalLinkTraverser(block); - getTreeRoot()->traverse(&finalLinkTraverser); - - // The 'unit' intermediate needs the block structures update, but also structure entry indices - // may have changed from the old block to the new one that it was merged into, so update those - // in 'visitBinary' - TType unitType; - unitType.shallowCopy(unitBlock->getType()); - TMergeBlockTraverser unitFinalLinkTraverser(block, &unitType, unit, &memberIndexUpdates); - unit->getTreeRoot()->traverse(&unitFinalLinkTraverser); + // update the tree to use the new type + unit->getTreeRoot()->traverse(&finalLinkTraverser); // update the member list (*unitMemberList) = (*memberList); @@ -771,10 +759,7 @@ void TIntermediate::mergeLinkerObjects(TInfoSink& infoSink, TIntermSequence& lin auto checkName = [this, unitSymbol, &infoSink](const TString& name) { for (unsigned int i = 0; i < unitSymbol->getType().getStruct()->size(); ++i) { - if (name == (*unitSymbol->getType().getStruct())[i].type->getFieldName() - && !((*unitSymbol->getType().getStruct())[i].type->getQualifier().hasLocation() - || unitSymbol->getType().getQualifier().hasLocation()) - ) { + if (name == (*unitSymbol->getType().getStruct())[i].type->getFieldName()) { error(infoSink, "Anonymous member name used for global variable or other anonymous member: "); infoSink.info << (*unitSymbol->getType().getStruct())[i].type->getCompleteString() << "\n"; } @@ -830,10 +815,6 @@ void TIntermediate::mergeErrorCheck(TInfoSink& infoSink, const TIntermSymbol& sy #if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE) bool crossStage = getStage() != unitStage; bool writeTypeComparison = false; - bool errorReported = false; - bool printQualifiers = false; - bool printPrecision = false; - bool printType = false; // Types have to match { @@ -865,48 +846,11 @@ void TIntermediate::mergeErrorCheck(TInfoSink& infoSink, const TIntermSymbol& sy (symbol.getType().isUnsizedArray() || unitSymbol.getType().isUnsizedArray())); } - int lpidx = -1; - int rpidx = -1; - if (!symbol.getType().sameElementType(unitSymbol.getType(), &lpidx, &rpidx)) { - 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: \"" - << (*symbol.getType().getStruct())[lpidx].type->getCompleteString(true, false, false, true, - (*symbol.getType().getStruct())[lpidx].type->getFieldName()) << "\"\n"; - infoSink.info << " " << StageName(unitStage) << " stage: \"" - << (*unitSymbol.getType().getStruct())[rpidx].type->getCompleteString(true, false, false, true, - (*unitSymbol.getType().getStruct())[rpidx].type->getFieldName()) << "\"\n"; - errorReported = true; - } else if (lpidx >= 0 && rpidx == -1) { - TString errmsg = StageName(getStage()); - 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: " - << (*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:"); - 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"; - errorReported = true; - } else { - error(infoSink, "Types must match:", unitStage); - writeTypeComparison = true; - printType = true; - } - } else if (!arraysMatch) { - error(infoSink, "Array sizes must be compatible:", unitStage); + if (!symbol.getType().sameElementType(unitSymbol.getType()) || + !symbol.getType().sameTypeParameters(unitSymbol.getType()) || + !arraysMatch ) { writeTypeComparison = true; - printType = true; - } else if (!symbol.getType().sameTypeParameters(unitSymbol.getType())) { - error(infoSink, "Type parameters must match:", unitStage); - writeTypeComparison = true; - printType = true; + error(infoSink, "Types must match:"); } } @@ -914,51 +858,17 @@ void TIntermediate::mergeErrorCheck(TInfoSink& infoSink, const TIntermSymbol& sy if (symbol.getType().getBasicType() == EbtBlock && unitSymbol.getType().getBasicType() == EbtBlock && symbol.getType().getStruct() && unitSymbol.getType().getStruct() && symbol.getType().sameStructType(unitSymbol.getType())) { - unsigned int li = 0; - unsigned int ri = 0; - while (li < symbol.getType().getStruct()->size() && ri < unitSymbol.getType().getStruct()->size()) { - if ((*symbol.getType().getStruct())[li].type->hiddenMember()) { - ++li; - continue; + for (unsigned int i = 0; i < symbol.getType().getStruct()->size(); ++i) { + const TQualifier& qualifier = (*symbol.getType().getStruct())[i].type->getQualifier(); + const TQualifier& unitQualifier = (*unitSymbol.getType().getStruct())[i].type->getQualifier(); + if (qualifier.layoutMatrix != unitQualifier.layoutMatrix || + qualifier.layoutOffset != unitQualifier.layoutOffset || + qualifier.layoutAlign != unitQualifier.layoutAlign || + qualifier.layoutLocation != unitQualifier.layoutLocation || + qualifier.layoutComponent != unitQualifier.layoutComponent) { + error(infoSink, "Interface block member layout qualifiers must match:"); + writeTypeComparison = true; } - if ((*unitSymbol.getType().getStruct())[ri].type->hiddenMember()) { - ++ri; - continue; - } - const TQualifier& qualifier = (*symbol.getType().getStruct())[li].type->getQualifier(); - const TQualifier & unitQualifier = (*unitSymbol.getType().getStruct())[ri].type->getQualifier(); - bool layoutQualifierError = false; - if (qualifier.layoutMatrix != unitQualifier.layoutMatrix) { - error(infoSink, "Interface block member layout matrix qualifier must match:", unitStage); - layoutQualifierError = true; - } - if (qualifier.layoutOffset != unitQualifier.layoutOffset) { - error(infoSink, "Interface block member layout offset qualifier must match:", unitStage); - layoutQualifierError = true; - } - if (qualifier.layoutAlign != unitQualifier.layoutAlign) { - error(infoSink, "Interface block member layout align qualifier must match:", unitStage); - layoutQualifierError = true; - } - if (qualifier.layoutLocation != unitQualifier.layoutLocation) { - error(infoSink, "Interface block member layout location qualifier must match:", unitStage); - layoutQualifierError = true; - } - if (qualifier.layoutComponent != unitQualifier.layoutComponent) { - error(infoSink, "Interface block member layout component qualifier must match:", unitStage); - layoutQualifierError = true; - } - if (layoutQualifierError) { - infoSink.info << " " << StageName(getStage()) << " 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: " - << (*unitSymbol.getType().getStruct())[ri].type->getFieldName() << " \"" - << (*unitSymbol.getType().getStruct())[ri].type->getCompleteString(true, true, false, false) << "\"\n"; - errorReported = true; - } - ++li; - ++ri; } } @@ -969,9 +879,8 @@ void TIntermediate::mergeErrorCheck(TInfoSink& infoSink, const TIntermSymbol& sy // Qualifiers have to (almost) match // Storage... if (!isInOut && symbol.getQualifier().storage != unitSymbol.getQualifier().storage) { - error(infoSink, "Storage qualifiers must match:", unitStage); + error(infoSink, "Storage qualifiers must match:"); writeTypeComparison = true; - printQualifiers = true; } // Uniform and buffer blocks must either both have an instance name, or @@ -979,36 +888,33 @@ void TIntermediate::mergeErrorCheck(TInfoSink& infoSink, const TIntermSymbol& sy if (symbol.getQualifier().isUniformOrBuffer() && (IsAnonymous(symbol.getName()) != IsAnonymous(unitSymbol.getName()))) { error(infoSink, "Matched Uniform or Storage blocks must all be anonymous," - " or all be named:", unitStage); + " or all be named:"); writeTypeComparison = true; } if (symbol.getQualifier().storage == unitSymbol.getQualifier().storage && (IsAnonymous(symbol.getName()) != IsAnonymous(unitSymbol.getName()) || (!IsAnonymous(symbol.getName()) && symbol.getName() != unitSymbol.getName()))) { - warn(infoSink, "Matched shader interfaces are using different instance names.", unitStage); + warn(infoSink, "Matched shader interfaces are using different instance names."); writeTypeComparison = true; } // Precision... if (!isInOut && symbol.getQualifier().precision != unitSymbol.getQualifier().precision) { - error(infoSink, "Precision qualifiers must match:", unitStage); + error(infoSink, "Precision qualifiers must match:"); writeTypeComparison = true; - printPrecision = true; } // Invariance... if (! crossStage && symbol.getQualifier().invariant != unitSymbol.getQualifier().invariant) { - error(infoSink, "Presence of invariant qualifier must match:", unitStage); + error(infoSink, "Presence of invariant qualifier must match:"); writeTypeComparison = true; - printQualifiers = true; } // Precise... if (! crossStage && symbol.getQualifier().isNoContraction() != unitSymbol.getQualifier().isNoContraction()) { - error(infoSink, "Presence of precise qualifier must match:", unitStage); + error(infoSink, "Presence of precise qualifier must match:"); writeTypeComparison = true; - printPrecision = true; } // Auxiliary and interpolation... @@ -1022,137 +928,57 @@ void TIntermediate::mergeErrorCheck(TInfoSink& infoSink, const TIntermSymbol& sy symbol.getQualifier().isSample()!= unitSymbol.getQualifier().isSample() || symbol.getQualifier().isPatch() != unitSymbol.getQualifier().isPatch() || symbol.getQualifier().isNonPerspective() != unitSymbol.getQualifier().isNonPerspective())) { - error(infoSink, "Interpolation and auxiliary storage qualifiers must match:", unitStage); + error(infoSink, "Interpolation and auxiliary storage qualifiers must match:"); writeTypeComparison = true; - printQualifiers = true; } // Memory... - bool memoryQualifierError = false; - if (symbol.getQualifier().coherent != unitSymbol.getQualifier().coherent) { - error(infoSink, "Memory coherent qualifier must match:", unitStage); - memoryQualifierError = true; - } - if (symbol.getQualifier().devicecoherent != unitSymbol.getQualifier().devicecoherent) { - error(infoSink, "Memory devicecoherent qualifier must match:", unitStage); - memoryQualifierError = true; - } - if (symbol.getQualifier().queuefamilycoherent != unitSymbol.getQualifier().queuefamilycoherent) { - error(infoSink, "Memory queuefamilycoherent qualifier must match:", unitStage); - memoryQualifierError = true; - } - if (symbol.getQualifier().workgroupcoherent != unitSymbol.getQualifier().workgroupcoherent) { - error(infoSink, "Memory workgroupcoherent qualifier must match:", unitStage); - memoryQualifierError = true; - } - if (symbol.getQualifier().subgroupcoherent != unitSymbol.getQualifier().subgroupcoherent) { - error(infoSink, "Memory subgroupcoherent qualifier must match:", unitStage); - memoryQualifierError = true; - } - if (symbol.getQualifier().shadercallcoherent != unitSymbol.getQualifier().shadercallcoherent) { - error(infoSink, "Memory shadercallcoherent qualifier must match:", unitStage); - memoryQualifierError = true; - } - if (symbol.getQualifier().nonprivate != unitSymbol.getQualifier().nonprivate) { - error(infoSink, "Memory nonprivate qualifier must match:", unitStage); - memoryQualifierError = true; - } - if (symbol.getQualifier().volatil != unitSymbol.getQualifier().volatil) { - error(infoSink, "Memory volatil qualifier must match:", unitStage); - memoryQualifierError = true; - } - if (symbol.getQualifier().restrict != unitSymbol.getQualifier().restrict) { - error(infoSink, "Memory restrict qualifier must match:", unitStage); - memoryQualifierError = true; - } - if (symbol.getQualifier().readonly != unitSymbol.getQualifier().readonly) { - error(infoSink, "Memory readonly qualifier must match:", unitStage); - memoryQualifierError = true; - } - if (symbol.getQualifier().writeonly != unitSymbol.getQualifier().writeonly) { - error(infoSink, "Memory writeonly qualifier must match:", unitStage); - memoryQualifierError = true; - } - if (memoryQualifierError) { - writeTypeComparison = true; - printQualifiers = true; + if (symbol.getQualifier().coherent != unitSymbol.getQualifier().coherent || + symbol.getQualifier().devicecoherent != unitSymbol.getQualifier().devicecoherent || + symbol.getQualifier().queuefamilycoherent != unitSymbol.getQualifier().queuefamilycoherent || + symbol.getQualifier().workgroupcoherent != unitSymbol.getQualifier().workgroupcoherent || + symbol.getQualifier().subgroupcoherent != unitSymbol.getQualifier().subgroupcoherent || + symbol.getQualifier().shadercallcoherent!= unitSymbol.getQualifier().shadercallcoherent || + symbol.getQualifier().nonprivate != unitSymbol.getQualifier().nonprivate || + symbol.getQualifier().volatil != unitSymbol.getQualifier().volatil || + symbol.getQualifier().restrict != unitSymbol.getQualifier().restrict || + symbol.getQualifier().readonly != unitSymbol.getQualifier().readonly || + symbol.getQualifier().writeonly != unitSymbol.getQualifier().writeonly) { + error(infoSink, "Memory qualifiers must match:"); + writeTypeComparison = true; } // Layouts... // TODO: 4.4 enhanced layouts: Generalize to include offset/align: current spec // requires separate user-supplied offset from actual computed offset, but // current implementation only has one offset. - bool layoutQualifierError = false; - if (symbol.getQualifier().layoutMatrix != unitSymbol.getQualifier().layoutMatrix) { - error(infoSink, "Layout matrix qualifier must match:", unitStage); - layoutQualifierError = true; - } - if (symbol.getQualifier().layoutPacking != unitSymbol.getQualifier().layoutPacking) { - error(infoSink, "Layout packing qualifier must match:", unitStage); - layoutQualifierError = true; - } - if (symbol.getQualifier().hasLocation() && unitSymbol.getQualifier().hasLocation() && symbol.getQualifier().layoutLocation != unitSymbol.getQualifier().layoutLocation) { - error(infoSink, "Layout location qualifier must match:", unitStage); - layoutQualifierError = true; - } - if (symbol.getQualifier().layoutComponent != unitSymbol.getQualifier().layoutComponent) { - error(infoSink, "Layout component qualifier must match:", unitStage); - layoutQualifierError = true; - } - if (symbol.getQualifier().layoutIndex != unitSymbol.getQualifier().layoutIndex) { - error(infoSink, "Layout index qualifier must match:", unitStage); - layoutQualifierError = true; - } - if (symbol.getQualifier().hasBinding() && unitSymbol.getQualifier().hasBinding() && symbol.getQualifier().layoutBinding != unitSymbol.getQualifier().layoutBinding) { - error(infoSink, "Layout binding qualifier must match:", unitStage); - layoutQualifierError = true; - } - if (symbol.getQualifier().hasBinding() && (symbol.getQualifier().layoutOffset != unitSymbol.getQualifier().layoutOffset)) { - error(infoSink, "Layout offset qualifier must match:", unitStage); - layoutQualifierError = true; - } - if (layoutQualifierError) { + if (symbol.getQualifier().layoutMatrix != unitSymbol.getQualifier().layoutMatrix || + symbol.getQualifier().layoutPacking != unitSymbol.getQualifier().layoutPacking || + symbol.getQualifier().layoutLocation != unitSymbol.getQualifier().layoutLocation || + symbol.getQualifier().layoutComponent != unitSymbol.getQualifier().layoutComponent || + symbol.getQualifier().layoutIndex != unitSymbol.getQualifier().layoutIndex || + symbol.getQualifier().layoutBinding != unitSymbol.getQualifier().layoutBinding || + (symbol.getQualifier().hasBinding() && (symbol.getQualifier().layoutOffset != unitSymbol.getQualifier().layoutOffset))) { + error(infoSink, "Layout qualification must match:"); writeTypeComparison = true; - printQualifiers = true; } // Initializers have to match, if both are present, and if we don't already know the types don't match - if (! writeTypeComparison && ! errorReported) { + if (! writeTypeComparison) { if (! symbol.getConstArray().empty() && ! unitSymbol.getConstArray().empty()) { if (symbol.getConstArray() != unitSymbol.getConstArray()) { - error(infoSink, "Initializers must match:", unitStage); + error(infoSink, "Initializers must match:"); infoSink.info << " " << symbol.getName() << "\n"; } } } if (writeTypeComparison) { - 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, - 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() - << ": \"" << 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: \"" - << 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() << " \"" - << symbol.getType().getCompleteString(true, printQualifiers, printPrecision, printType) << "\"\n"; - infoSink.info << " " << StageName(unitStage) << " stage: " << unitSymbol.getName() << " \"" - << unitSymbol.getType().getCompleteString(true, printQualifiers, printPrecision, printType) << "\"\n"; - } - } + infoSink.info << " " << symbol.getName() << ": \"" << symbol.getType().getCompleteString() << "\" versus "; + if (symbol.getName() != unitSymbol.getName()) + infoSink.info << unitSymbol.getName() << ": "; + + infoSink.info << "\"" << unitSymbol.getType().getCompleteString() << "\"\n"; } #endif } @@ -1960,7 +1786,7 @@ unsigned int TIntermediate::computeTypeXfbSize(const TType& type, bool& contains return size; } - int numComponents {0}; + int numComponents; if (type.isScalar()) numComponents = 1; else if (type.isVector()) @@ -2108,7 +1934,7 @@ int TIntermediate::getBaseAlignment(const TType& type, int& size, int& stride, T } // rule 9 - if (type.getBasicType() == EbtStruct || type.getBasicType() == EbtBlock) { + if (type.getBasicType() == EbtStruct) { const TTypeList& memberList = *type.getStruct(); size = 0; @@ -2333,11 +2159,10 @@ int TIntermediate::computeBufferReferenceTypeSize(const TType& type) bool TIntermediate::isIoResizeArray(const TType& type, EShLanguage language) { return type.isArray() && ((language == EShLangGeometry && type.getQualifier().storage == EvqVaryingIn) || - (language == EShLangTessControl && (type.getQualifier().storage == EvqVaryingIn || type.getQualifier().storage == EvqVaryingOut) && + (language == EShLangTessControl && type.getQualifier().storage == EvqVaryingOut && ! type.getQualifier().patch) || - (language == EShLangTessEvaluation && type.getQualifier().storage == EvqVaryingIn) || (language == EShLangFragment && type.getQualifier().storage == EvqVaryingIn && - (type.getQualifier().pervertexNV || type.getQualifier().pervertexEXT)) || + type.getQualifier().pervertexNV) || (language == EShLangMeshNV && type.getQualifier().storage == EvqVaryingOut && !type.getQualifier().perTaskNV)); } diff --git a/libraries/glslang/glslang/MachineIndependent/localintermediate.h b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/localintermediate.h similarity index 97% rename from libraries/glslang/glslang/MachineIndependent/localintermediate.h rename to libraries/ZVulkan/src/glslang/glslang/MachineIndependent/localintermediate.h index 581e9aa2e4..6aa9399dcc 100644 --- a/libraries/glslang/glslang/MachineIndependent/localintermediate.h +++ b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/localintermediate.h @@ -290,8 +290,6 @@ public: resources(TBuiltInResource{}), numEntryPoints(0), numErrors(0), numPushConstants(0), recursive(false), invertY(false), - dxPositionW(false), - enhancedMsgs(false), useStorageBuffer(false), invariantAll(false), nanMinMaxClamp(false), @@ -309,7 +307,7 @@ public: useVulkanMemoryModel(false), invocations(TQualifier::layoutNotSet), vertices(TQualifier::layoutNotSet), inputPrimitive(ElgNone), outputPrimitive(ElgNone), - pixelCenterInteger(false), originUpperLeft(false),texCoordBuiltinRedeclared(false), + pixelCenterInteger(false), originUpperLeft(false), vertexSpacing(EvsNone), vertexOrder(EvoNone), interlockOrdering(EioNone), pointMode(false), earlyFragmentTests(false), postDepthCoverage(false), depthLayout(EldNone), hlslFunctionality1(false), @@ -399,9 +397,6 @@ public: case EShTargetSpv_1_5: processes.addProcess("target-env spirv1.5"); break; - case EShTargetSpv_1_6: - processes.addProcess("target-env spirv1.6"); - break; default: processes.addProcess("target-env spirvUnknown"); break; @@ -420,9 +415,6 @@ public: case EShTargetVulkan_1_2: processes.addProcess("target-env vulkan1.2"); break; - case EShTargetVulkan_1_3: - processes.addProcess("target-env vulkan1.3"); - break; default: processes.addProcess("target-env vulkanUnknown"); break; @@ -468,20 +460,6 @@ public: } bool getInvertY() const { return invertY; } - void setDxPositionW(bool dxPosW) - { - dxPositionW = dxPosW; - if (dxPositionW) - processes.addProcess("dx-position-w"); - } - bool getDxPositionW() const { return dxPositionW; } - - void setEnhancedMsgs() - { - enhancedMsgs = true; - } - bool getEnhancedMsgs() const { return enhancedMsgs && source == EShSourceGlsl; } - #ifdef ENABLE_HLSL void setSource(EShSource s) { source = s; } EShSource getSource() const { return source; } @@ -834,8 +812,6 @@ public: bool getOriginUpperLeft() const { return originUpperLeft; } void setPixelCenterInteger() { pixelCenterInteger = true; } bool getPixelCenterInteger() const { return pixelCenterInteger; } - void setTexCoordRedeclared() { texCoordBuiltinRedeclared = true; } - bool getTexCoordRedeclared() const { return texCoordBuiltinRedeclared; } void addBlendEquation(TBlendEquationShift b) { blendEquations |= (1 << b); } unsigned int getBlendEquations() const { return blendEquations; } bool setXfbBufferStride(int buffer, unsigned stride) @@ -1040,8 +1016,8 @@ public: protected: TIntermSymbol* addSymbol(long long Id, 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 error(TInfoSink& infoSink, const char*); + void warn(TInfoSink& infoSink, const char*); void mergeCallGraphs(TInfoSink&, TIntermediate&); void mergeModes(TInfoSink&, TIntermediate&); void mergeTrees(TInfoSink&, TIntermediate&); @@ -1094,8 +1070,6 @@ protected: int numPushConstants; bool recursive; bool invertY; - bool dxPositionW; - bool enhancedMsgs; bool useStorageBuffer; bool invariantAll; bool nanMinMaxClamp; // true if desiring min/max/clamp to favor non-NaN over NaN @@ -1124,7 +1098,6 @@ protected: TLayoutGeometry outputPrimitive; bool pixelCenterInteger; bool originUpperLeft; - bool texCoordBuiltinRedeclared; TVertexSpacing vertexSpacing; TVertexOrder vertexOrder; TInterlockOrdering interlockOrdering; @@ -1185,7 +1158,6 @@ protected: // for callableData/callableDataIn // set of names of statically read/written I/O that might need extra checking std::set ioAccessed; - // source code of shader, useful as part of debug information std::string sourceFile; std::string sourceText; diff --git a/libraries/glslang/glslang/MachineIndependent/parseConst.cpp b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/parseConst.cpp similarity index 100% rename from libraries/glslang/glslang/MachineIndependent/parseConst.cpp rename to libraries/ZVulkan/src/glslang/glslang/MachineIndependent/parseConst.cpp diff --git a/libraries/glslang/glslang/MachineIndependent/parseVersions.h b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/parseVersions.h similarity index 100% rename from libraries/glslang/glslang/MachineIndependent/parseVersions.h rename to libraries/ZVulkan/src/glslang/glslang/MachineIndependent/parseVersions.h diff --git a/libraries/glslang/glslang/MachineIndependent/pch.h b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/pch.h similarity index 100% rename from libraries/glslang/glslang/MachineIndependent/pch.h rename to libraries/ZVulkan/src/glslang/glslang/MachineIndependent/pch.h diff --git a/libraries/glslang/glslang/MachineIndependent/preprocessor/Pp.cpp b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/preprocessor/Pp.cpp similarity index 100% rename from libraries/glslang/glslang/MachineIndependent/preprocessor/Pp.cpp rename to libraries/ZVulkan/src/glslang/glslang/MachineIndependent/preprocessor/Pp.cpp diff --git a/libraries/glslang/glslang/MachineIndependent/preprocessor/PpAtom.cpp b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/preprocessor/PpAtom.cpp similarity index 100% rename from libraries/glslang/glslang/MachineIndependent/preprocessor/PpAtom.cpp rename to libraries/ZVulkan/src/glslang/glslang/MachineIndependent/preprocessor/PpAtom.cpp diff --git a/libraries/glslang/glslang/MachineIndependent/preprocessor/PpContext.cpp b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/preprocessor/PpContext.cpp similarity index 100% rename from libraries/glslang/glslang/MachineIndependent/preprocessor/PpContext.cpp rename to libraries/ZVulkan/src/glslang/glslang/MachineIndependent/preprocessor/PpContext.cpp diff --git a/libraries/glslang/glslang/MachineIndependent/preprocessor/PpContext.h b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/preprocessor/PpContext.h similarity index 100% rename from libraries/glslang/glslang/MachineIndependent/preprocessor/PpContext.h rename to libraries/ZVulkan/src/glslang/glslang/MachineIndependent/preprocessor/PpContext.h diff --git a/libraries/glslang/glslang/MachineIndependent/preprocessor/PpScanner.cpp b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/preprocessor/PpScanner.cpp similarity index 100% rename from libraries/glslang/glslang/MachineIndependent/preprocessor/PpScanner.cpp rename to libraries/ZVulkan/src/glslang/glslang/MachineIndependent/preprocessor/PpScanner.cpp diff --git a/libraries/glslang/glslang/MachineIndependent/preprocessor/PpTokens.cpp b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/preprocessor/PpTokens.cpp similarity index 100% rename from libraries/glslang/glslang/MachineIndependent/preprocessor/PpTokens.cpp rename to libraries/ZVulkan/src/glslang/glslang/MachineIndependent/preprocessor/PpTokens.cpp diff --git a/libraries/glslang/glslang/MachineIndependent/preprocessor/PpTokens.h b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/preprocessor/PpTokens.h similarity index 100% rename from libraries/glslang/glslang/MachineIndependent/preprocessor/PpTokens.h rename to libraries/ZVulkan/src/glslang/glslang/MachineIndependent/preprocessor/PpTokens.h diff --git a/libraries/glslang/glslang/MachineIndependent/propagateNoContraction.cpp b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/propagateNoContraction.cpp similarity index 100% rename from libraries/glslang/glslang/MachineIndependent/propagateNoContraction.cpp rename to libraries/ZVulkan/src/glslang/glslang/MachineIndependent/propagateNoContraction.cpp diff --git a/libraries/glslang/glslang/MachineIndependent/propagateNoContraction.h b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/propagateNoContraction.h similarity index 100% rename from libraries/glslang/glslang/MachineIndependent/propagateNoContraction.h rename to libraries/ZVulkan/src/glslang/glslang/MachineIndependent/propagateNoContraction.h diff --git a/libraries/glslang/glslang/MachineIndependent/reflection.cpp b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/reflection.cpp similarity index 100% rename from libraries/glslang/glslang/MachineIndependent/reflection.cpp rename to libraries/ZVulkan/src/glslang/glslang/MachineIndependent/reflection.cpp diff --git a/libraries/glslang/glslang/MachineIndependent/reflection.h b/libraries/ZVulkan/src/glslang/glslang/MachineIndependent/reflection.h similarity index 100% rename from libraries/glslang/glslang/MachineIndependent/reflection.h rename to libraries/ZVulkan/src/glslang/glslang/MachineIndependent/reflection.h diff --git a/libraries/glslang/glslang/OSDependent/Unix/CMakeLists.txt b/libraries/ZVulkan/src/glslang/glslang/OSDependent/Unix/CMakeLists.txt similarity index 98% rename from libraries/glslang/glslang/OSDependent/Unix/CMakeLists.txt rename to libraries/ZVulkan/src/glslang/glslang/OSDependent/Unix/CMakeLists.txt index d521da170a..354a3e9772 100644 --- a/libraries/glslang/glslang/OSDependent/Unix/CMakeLists.txt +++ b/libraries/ZVulkan/src/glslang/glslang/OSDependent/Unix/CMakeLists.txt @@ -56,4 +56,4 @@ if(ENABLE_GLSLANG_INSTALL) install(TARGETS OSDependent EXPORT OSDependentTargets ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) install(EXPORT OSDependentTargets DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake) -endif() +endif(ENABLE_GLSLANG_INSTALL) diff --git a/libraries/glslang/glslang/OSDependent/Unix/ossource.cpp b/libraries/ZVulkan/src/glslang/glslang/OSDependent/Unix/ossource.cpp similarity index 97% rename from libraries/glslang/glslang/OSDependent/Unix/ossource.cpp rename to libraries/ZVulkan/src/glslang/glslang/OSDependent/Unix/ossource.cpp index 81da99c2c4..3f029f0239 100644 --- a/libraries/glslang/glslang/OSDependent/Unix/ossource.cpp +++ b/libraries/ZVulkan/src/glslang/glslang/OSDependent/Unix/ossource.cpp @@ -172,7 +172,7 @@ namespace { pthread_mutex_t gMutex; } -static void InitMutex(void) +void InitGlobalLock() { pthread_mutexattr_t mutexattr; pthread_mutexattr_init(&mutexattr); @@ -180,12 +180,6 @@ static void InitMutex(void) pthread_mutex_init(&gMutex, &mutexattr); } -void InitGlobalLock() -{ - static pthread_once_t once = PTHREAD_ONCE_INIT; - pthread_once(&once, InitMutex); -} - void GetGlobalLock() { pthread_mutex_lock(&gMutex); diff --git a/libraries/glslang/glslang/OSDependent/Web/CMakeLists.txt b/libraries/ZVulkan/src/glslang/glslang/OSDependent/Web/CMakeLists.txt similarity index 97% rename from libraries/glslang/glslang/OSDependent/Web/CMakeLists.txt rename to libraries/ZVulkan/src/glslang/glslang/OSDependent/Web/CMakeLists.txt index 5bfbed415c..0f60dbcc13 100644 --- a/libraries/glslang/glslang/OSDependent/Web/CMakeLists.txt +++ b/libraries/ZVulkan/src/glslang/glslang/OSDependent/Web/CMakeLists.txt @@ -55,7 +55,7 @@ if(ENABLE_GLSLANG_JS) if(ENABLE_EMSCRIPTEN_SINGLE_FILE) target_link_libraries(glslang.js "-s SINGLE_FILE=1") - endif() + endif(ENABLE_EMSCRIPTEN_SINGLE_FILE) if(ENABLE_EMSCRIPTEN_ENVIRONMENT_NODE) target_link_libraries(glslang.js "-s ENVIRONMENT=node -s BINARYEN_ASYNC_COMPILATION=0") @@ -67,5 +67,5 @@ if(ENABLE_GLSLANG_JS) 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() -endif() + endif(EMSCRIPTEN) +endif(ENABLE_GLSLANG_JS) diff --git a/libraries/glslang/glslang/OSDependent/Web/glslang.after.js b/libraries/ZVulkan/src/glslang/glslang/OSDependent/Web/glslang.after.js similarity index 100% rename from libraries/glslang/glslang/OSDependent/Web/glslang.after.js rename to libraries/ZVulkan/src/glslang/glslang/OSDependent/Web/glslang.after.js diff --git a/libraries/glslang/glslang/OSDependent/Web/glslang.js.cpp b/libraries/ZVulkan/src/glslang/glslang/OSDependent/Web/glslang.js.cpp similarity index 100% rename from libraries/glslang/glslang/OSDependent/Web/glslang.js.cpp rename to libraries/ZVulkan/src/glslang/glslang/OSDependent/Web/glslang.js.cpp diff --git a/libraries/glslang/glslang/OSDependent/Web/glslang.pre.js b/libraries/ZVulkan/src/glslang/glslang/OSDependent/Web/glslang.pre.js similarity index 100% rename from libraries/glslang/glslang/OSDependent/Web/glslang.pre.js rename to libraries/ZVulkan/src/glslang/glslang/OSDependent/Web/glslang.pre.js diff --git a/libraries/glslang/glslang/OSDependent/Windows/CMakeLists.txt b/libraries/ZVulkan/src/glslang/glslang/OSDependent/Windows/CMakeLists.txt similarity index 98% rename from libraries/glslang/glslang/OSDependent/Windows/CMakeLists.txt rename to libraries/ZVulkan/src/glslang/glslang/OSDependent/Windows/CMakeLists.txt index 21d603e72c..9cf1b7fba3 100644 --- a/libraries/glslang/glslang/OSDependent/Windows/CMakeLists.txt +++ b/libraries/ZVulkan/src/glslang/glslang/OSDependent/Windows/CMakeLists.txt @@ -45,10 +45,10 @@ endif() if(WIN32) source_group("Source" FILES ${SOURCES}) -endif() +endif(WIN32) if(ENABLE_GLSLANG_INSTALL) install(TARGETS OSDependent EXPORT OSDependentTargets ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) install(EXPORT OSDependentTargets DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake) -endif() +endif(ENABLE_GLSLANG_INSTALL) diff --git a/libraries/glslang/glslang/OSDependent/Windows/main.cpp b/libraries/ZVulkan/src/glslang/glslang/OSDependent/Windows/main.cpp similarity index 100% rename from libraries/glslang/glslang/OSDependent/Windows/main.cpp rename to libraries/ZVulkan/src/glslang/glslang/OSDependent/Windows/main.cpp diff --git a/libraries/glslang/glslang/OSDependent/Windows/ossource.cpp b/libraries/ZVulkan/src/glslang/glslang/OSDependent/Windows/ossource.cpp similarity index 100% rename from libraries/glslang/glslang/OSDependent/Windows/ossource.cpp rename to libraries/ZVulkan/src/glslang/glslang/OSDependent/Windows/ossource.cpp diff --git a/libraries/glslang/glslang/OSDependent/osinclude.h b/libraries/ZVulkan/src/glslang/glslang/OSDependent/osinclude.h similarity index 100% rename from libraries/glslang/glslang/OSDependent/osinclude.h rename to libraries/ZVulkan/src/glslang/glslang/OSDependent/osinclude.h diff --git a/libraries/glslang/glslang/Public/ShaderLang.h b/libraries/ZVulkan/src/glslang/glslang/Public/ShaderLang.h similarity index 97% rename from libraries/glslang/glslang/Public/ShaderLang.h rename to libraries/ZVulkan/src/glslang/glslang/Public/ShaderLang.h index e44339db53..d2a4bf40a0 100644 --- a/libraries/glslang/glslang/Public/ShaderLang.h +++ b/libraries/ZVulkan/src/glslang/glslang/Public/ShaderLang.h @@ -150,8 +150,8 @@ typedef enum { typedef enum { EShClientNone, // use when there is no client, e.g. for validation - EShClientVulkan, // as GLSL dialect, specifies KHR_vulkan_glsl extension - EShClientOpenGL, // as GLSL dialect, specifies ARB_gl_spirv extension + EShClientVulkan, + EShClientOpenGL, LAST_ELEMENT_MARKER(EShClientCount), } EShClient; @@ -166,9 +166,8 @@ typedef enum { EShTargetVulkan_1_0 = (1 << 22), // Vulkan 1.0 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 EShTargetOpenGL_450 = 450, // OpenGL - LAST_ELEMENT_MARKER(EShTargetClientVersionCount = 5), + LAST_ELEMENT_MARKER(EShTargetClientVersionCount = 4), } EShTargetClientVersion; typedef EShTargetClientVersion EshTargetClientVersion; @@ -180,8 +179,7 @@ typedef enum { EShTargetSpv_1_3 = (1 << 16) | (3 << 8), // SPIR-V 1.3 EShTargetSpv_1_4 = (1 << 16) | (4 << 8), // SPIR-V 1.4 EShTargetSpv_1_5 = (1 << 16) | (5 << 8), // SPIR-V 1.5 - EShTargetSpv_1_6 = (1 << 16) | (6 << 8), // SPIR-V 1.6 - LAST_ELEMENT_MARKER(EShTargetLanguageVersionCount = 7), + LAST_ELEMENT_MARKER(EShTargetLanguageVersionCount = 6), } EShTargetLanguageVersion; struct TInputLanguage { @@ -264,7 +262,6 @@ enum EShMessages : unsigned { EShMsgHlslLegalization = (1 << 12), // enable HLSL Legalization messages EShMsgHlslDX9Compatible = (1 << 13), // enable HLSL DX9 compatible mode (for samplers and semantics) EShMsgBuiltinSymbolTable = (1 << 14), // print the builtin symbol table - EShMsgEnhanced = (1 << 15), // enhanced message readability LAST_ELEMENT_MARKER(EShMsgCount), }; @@ -471,7 +468,6 @@ public: GLSLANG_EXPORT void setSourceEntryPoint(const char* sourceEntryPointName); GLSLANG_EXPORT void addProcesses(const std::vector&); GLSLANG_EXPORT void setUniqueId(unsigned long long id); - GLSLANG_EXPORT void setOverrideVersion(int version); // IO resolver binding data: see comments in ShaderLang.cpp GLSLANG_EXPORT void setShiftBinding(TResourceType res, unsigned int base); @@ -489,8 +485,6 @@ public: GLSLANG_EXPORT void addUniformLocationOverride(const char* name, int loc); GLSLANG_EXPORT void setUniformLocationBase(int base); GLSLANG_EXPORT void setInvertY(bool invert); - GLSLANG_EXPORT void setDxPositionW(bool dxPosW); - GLSLANG_EXPORT void setEnhancedMsgs(); #ifdef ENABLE_HLSL GLSLANG_EXPORT void setHlslIoMapping(bool hlslIoMap); GLSLANG_EXPORT void setFlattenUniformArrays(bool flatten); @@ -518,9 +512,6 @@ public: // use EShClientNone and version of 0, e.g. for validation mode. // Note 'version' does not describe the target environment, // just the version of the source dialect to compile under. - // For example, to choose the Vulkan dialect of GLSL defined by - // version 100 of the KHR_vulkan_glsl extension: lang = EShSourceGlsl, - // dialect = EShClientVulkan, and version = 100. // // See the definitions of TEnvironment, EShSource, EShLanguage, // and EShClient for choices and more detail. @@ -712,9 +703,6 @@ protected: // a function in the source string can be renamed FROM this TO the name given in setEntryPoint. std::string sourceEntryPointName; - // overrides #version in shader source or default version if #version isn't present - int overrideVersion; - TEnvironment environment; friend class TProgram; diff --git a/libraries/glslang/glslang/updateGrammar b/libraries/ZVulkan/src/glslang/glslang/updateGrammar similarity index 100% rename from libraries/glslang/glslang/updateGrammar rename to libraries/ZVulkan/src/glslang/glslang/updateGrammar diff --git a/libraries/glslang/spirv/GLSL.ext.AMD.h b/libraries/ZVulkan/src/glslang/spirv/GLSL.ext.AMD.h similarity index 100% rename from libraries/glslang/spirv/GLSL.ext.AMD.h rename to libraries/ZVulkan/src/glslang/spirv/GLSL.ext.AMD.h diff --git a/libraries/glslang/spirv/GLSL.ext.EXT.h b/libraries/ZVulkan/src/glslang/spirv/GLSL.ext.EXT.h similarity index 100% rename from libraries/glslang/spirv/GLSL.ext.EXT.h rename to libraries/ZVulkan/src/glslang/spirv/GLSL.ext.EXT.h diff --git a/libraries/glslang/spirv/GLSL.ext.KHR.h b/libraries/ZVulkan/src/glslang/spirv/GLSL.ext.KHR.h similarity index 96% rename from libraries/glslang/spirv/GLSL.ext.KHR.h rename to libraries/ZVulkan/src/glslang/spirv/GLSL.ext.KHR.h index 5c89480e3a..5eb3e94482 100644 --- a/libraries/glslang/spirv/GLSL.ext.KHR.h +++ b/libraries/ZVulkan/src/glslang/spirv/GLSL.ext.KHR.h @@ -29,7 +29,7 @@ #define GLSLextKHR_H static const int GLSLextKHRVersion = 100; -static const int GLSLextKHRRevision = 3; +static const int GLSLextKHRRevision = 2; static const char* const E_SPV_KHR_shader_ballot = "SPV_KHR_shader_ballot"; static const char* const E_SPV_KHR_subgroup_vote = "SPV_KHR_subgroup_vote"; @@ -52,6 +52,5 @@ static const char* const E_SPV_KHR_fragment_shading_rate = "SPV_KHR_fragm static const char* const E_SPV_KHR_terminate_invocation = "SPV_KHR_terminate_invocation"; static const char* const E_SPV_KHR_workgroup_memory_explicit_layout = "SPV_KHR_workgroup_memory_explicit_layout"; static const char* const E_SPV_KHR_subgroup_uniform_control_flow = "SPV_KHR_subgroup_uniform_control_flow"; -static const char* const E_SPV_KHR_fragment_shader_barycentric = "SPV_KHR_fragment_shader_barycentric"; #endif // #ifndef GLSLextKHR_H diff --git a/libraries/glslang/spirv/GLSL.ext.NV.h b/libraries/ZVulkan/src/glslang/spirv/GLSL.ext.NV.h similarity index 100% rename from libraries/glslang/spirv/GLSL.ext.NV.h rename to libraries/ZVulkan/src/glslang/spirv/GLSL.ext.NV.h diff --git a/libraries/glslang/spirv/GLSL.std.450.h b/libraries/ZVulkan/src/glslang/spirv/GLSL.std.450.h similarity index 100% rename from libraries/glslang/spirv/GLSL.std.450.h rename to libraries/ZVulkan/src/glslang/spirv/GLSL.std.450.h diff --git a/libraries/glslang/spirv/GlslangToSpv.cpp b/libraries/ZVulkan/src/glslang/spirv/GlslangToSpv.cpp similarity index 97% rename from libraries/glslang/spirv/GlslangToSpv.cpp rename to libraries/ZVulkan/src/glslang/spirv/GlslangToSpv.cpp index 59509bc06a..42b084cbea 100644 --- a/libraries/glslang/spirv/GlslangToSpv.cpp +++ b/libraries/ZVulkan/src/glslang/spirv/GlslangToSpv.cpp @@ -260,7 +260,6 @@ protected: std::unordered_map extBuiltinMap; std::unordered_map symbolValues; - std::unordered_map builtInVariableIds; std::unordered_set rValueParameters; // set of formal function parameters passed as rValues, // rather than a pointer std::unordered_map functionMap; @@ -1008,8 +1007,6 @@ spv::BuiltIn TGlslangToSpvTraverser::TranslateBuiltInDecoration(glslang::TBuiltI return spv::BuiltInRayTminKHR; case glslang::EbvRayTmax: return spv::BuiltInRayTmaxKHR; - case glslang::EbvCullMask: - return spv::BuiltInCullMaskKHR; case glslang::EbvInstanceCustomIndex: return spv::BuiltInInstanceCustomIndexKHR; case glslang::EbvHitT: @@ -1051,15 +1048,6 @@ spv::BuiltIn TGlslangToSpvTraverser::TranslateBuiltInDecoration(glslang::TBuiltI builder.addCapability(spv::CapabilityFragmentBarycentricNV); return spv::BuiltInBaryCoordNoPerspNV; - case glslang::EbvBaryCoordEXT: - builder.addExtension(spv::E_SPV_KHR_fragment_shader_barycentric); - builder.addCapability(spv::CapabilityFragmentBarycentricKHR); - return spv::BuiltInBaryCoordKHR; - case glslang::EbvBaryCoordNoPerspEXT: - builder.addExtension(spv::E_SPV_KHR_fragment_shader_barycentric); - builder.addCapability(spv::CapabilityFragmentBarycentricKHR); - return spv::BuiltInBaryCoordNoPerspKHR; - // mesh shaders case glslang::EbvTaskCountNV: return spv::BuiltInTaskCountNV; @@ -1268,10 +1256,8 @@ spv::StorageClass TGlslangToSpvTraverser::TranslateStorageClass(const glslang::T if (type.getBasicType() == glslang::EbtRayQuery) return spv::StorageClassPrivate; #ifndef GLSLANG_WEB - if (type.getQualifier().isSpirvByReference()) { - if (type.getQualifier().isParamInput() || type.getQualifier().isParamOutput()) - return spv::StorageClassFunction; - } + if (type.getQualifier().isSpirvByReference()) + return spv::StorageClassFunction; #endif if (type.getQualifier().isPipeInput()) return spv::StorageClassInput; @@ -1676,22 +1662,9 @@ TGlslangToSpvTraverser::TGlslangToSpvTraverser(unsigned int spvVersion, case EShLangCompute: builder.addCapability(spv::CapabilityShader); - if (glslangIntermediate->getSpv().spv >= glslang::EShTargetSpv_1_6) { - std::vector dimConstId; - for (int dim = 0; dim < 3; ++dim) { - bool specConst = (glslangIntermediate->getLocalSizeSpecId(dim) != glslang::TQualifier::layoutNotSet); - dimConstId.push_back(builder.makeUintConstant(glslangIntermediate->getLocalSize(dim), specConst)); - if (specConst) { - builder.addDecoration(dimConstId.back(), spv::DecorationSpecId, - glslangIntermediate->getLocalSizeSpecId(dim)); - } - } - builder.addExecutionModeId(shaderEntry, spv::ExecutionModeLocalSizeId, dimConstId); - } else { - builder.addExecutionMode(shaderEntry, spv::ExecutionModeLocalSize, glslangIntermediate->getLocalSize(0), - glslangIntermediate->getLocalSize(1), - glslangIntermediate->getLocalSize(2)); - } + builder.addExecutionMode(shaderEntry, spv::ExecutionModeLocalSize, glslangIntermediate->getLocalSize(0), + glslangIntermediate->getLocalSize(1), + glslangIntermediate->getLocalSize(2)); if (glslangIntermediate->getLayoutDerivativeModeNone() == glslang::LayoutDerivativeGroupQuads) { builder.addCapability(spv::CapabilityComputeDerivativeGroupQuadsNV); builder.addExecutionMode(shaderEntry, spv::ExecutionModeDerivativeGroupQuadsNV); @@ -1789,35 +1762,15 @@ TGlslangToSpvTraverser::TGlslangToSpvTraverser(unsigned int spvVersion, builder.addCapability(spv::CapabilityRayTracingNV); builder.addExtension("SPV_NV_ray_tracing"); } - if (glslangIntermediate->getStage() != EShLangRayGen && glslangIntermediate->getStage() != EShLangCallable) - { - if (extensions.find("GL_EXT_ray_cull_mask") != extensions.end()) { - builder.addCapability(spv::CapabilityRayCullMaskKHR); - builder.addExtension("SPV_KHR_ray_cull_mask"); - } - } break; } case EShLangTaskNV: case EShLangMeshNV: builder.addCapability(spv::CapabilityMeshShadingNV); builder.addExtension(spv::E_SPV_NV_mesh_shader); - if (glslangIntermediate->getSpv().spv >= glslang::EShTargetSpv_1_6) { - std::vector dimConstId; - for (int dim = 0; dim < 3; ++dim) { - bool specConst = (glslangIntermediate->getLocalSizeSpecId(dim) != glslang::TQualifier::layoutNotSet); - dimConstId.push_back(builder.makeUintConstant(glslangIntermediate->getLocalSize(dim), specConst)); - if (specConst) { - builder.addDecoration(dimConstId.back(), spv::DecorationSpecId, - glslangIntermediate->getLocalSizeSpecId(dim)); - } - } - builder.addExecutionModeId(shaderEntry, spv::ExecutionModeLocalSizeId, dimConstId); - } else { - builder.addExecutionMode(shaderEntry, spv::ExecutionModeLocalSize, glslangIntermediate->getLocalSize(0), - glslangIntermediate->getLocalSize(1), - glslangIntermediate->getLocalSize(2)); - } + builder.addExecutionMode(shaderEntry, spv::ExecutionModeLocalSize, glslangIntermediate->getLocalSize(0), + glslangIntermediate->getLocalSize(1), + glslangIntermediate->getLocalSize(2)); if (glslangIntermediate->getStage() == EShLangMeshNV) { builder.addExecutionMode(shaderEntry, spv::ExecutionModeOutputVertices, glslangIntermediate->getVertices()); @@ -1877,10 +1830,10 @@ TGlslangToSpvTraverser::TGlslangToSpvTraverser(unsigned int spvVersion, std::vector operandIds; assert(!modeId.second.empty()); for (auto extraOperand : modeId.second) { - if (extraOperand->getType().getQualifier().isSpecConstant()) - operandIds.push_back(getSymbolId(extraOperand->getAsSymbolNode())); - else - operandIds.push_back(createSpvConstant(*extraOperand)); + int nextConst = 0; + spv::Id operandId = createSpvConstantFromConstUnionArray( + extraOperand->getType(), extraOperand->getConstArray(), nextConst, false); + operandIds.push_back(operandId); } builder.addExecutionModeId(shaderEntry, static_cast(modeId.first), operandIds); } @@ -2793,10 +2746,6 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt } else { handleFunctionEntry(node); } - if (options.generateDebugInfo) { - const auto& loc = node->getLoc(); - currentFunction->setDebugLineInfo(builder.getSourceFile(), loc.line, loc.column); - } } else { if (inEntryPoint) entryPointTerminated = true; @@ -3435,7 +3384,7 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt const auto& spirvInst = node->getSpirvInstruction(); if (spirvInst.set == "") { std::vector idImmOps; - for (unsigned int i = 0; i < glslangOperands.size(); ++i) { + for (int i = 0; i < glslangOperands.size(); ++i) { if (glslangOperands[i]->getAsTyped()->getQualifier().isSpirvLiteral()) { // Translate the constant to a literal value std::vector literals; @@ -3828,16 +3777,7 @@ bool TGlslangToSpvTraverser::visitBranch(glslang::TVisit /* visit */, glslang::T switch (node->getFlowOp()) { case glslang::EOpKill: - if (glslangIntermediate->getSpv().spv >= glslang::EShTargetSpv_1_6) { - if (glslangIntermediate->getSource() == glslang::EShSourceHlsl) { - builder.addCapability(spv::CapabilityDemoteToHelperInvocation); - builder.createNoResultOp(spv::OpDemoteToHelperInvocationEXT); - } else { - builder.makeStatementTerminator(spv::OpTerminateInvocation, "post-terminate-invocation"); - } - } else { - builder.makeStatementTerminator(spv::OpKill, "post-discard"); - } + builder.makeStatementTerminator(spv::OpKill, "post-discard"); break; case glslang::EOpTerminateInvocation: builder.addExtension(spv::E_SPV_KHR_terminate_invocation); @@ -4000,14 +3940,12 @@ spv::Id TGlslangToSpvTraverser::getSampledType(const glslang::TSampler& sampler) builder.addExtension(spv::E_SPV_AMD_gpu_shader_half_float_fetch); builder.addCapability(spv::CapabilityFloat16ImageAMD); return builder.makeFloatType(16); - case glslang::EbtInt64: + case glslang::EbtInt64: return builder.makeIntType(64); builder.addExtension(spv::E_SPV_EXT_shader_image_int64); - builder.addCapability(spv::CapabilityInt64ImageEXT); - return builder.makeIntType(64); - case glslang::EbtUint64: + builder.addCapability(spv::CapabilityFloat16ImageAMD); + case glslang::EbtUint64: return builder.makeUintType(64); builder.addExtension(spv::E_SPV_EXT_shader_image_int64); - builder.addCapability(spv::CapabilityInt64ImageEXT); - return builder.makeUintType(64); + builder.addCapability(spv::CapabilityFloat16ImageAMD); #endif default: assert(0); @@ -4208,55 +4146,68 @@ spv::Id TGlslangToSpvTraverser::convertGlslangToSpvType(const glslang::TType& ty const auto& spirvType = type.getSpirvType(); const auto& spirvInst = spirvType.spirvInst; - std::vector operands; + std::vector operands; for (const auto& typeParam : spirvType.typeParams) { - // Constant expression - if (typeParam.constant->isLiteral()) { - if (typeParam.constant->getBasicType() == glslang::EbtFloat) { - float floatValue = static_cast(typeParam.constant->getConstArray()[0].getDConst()); - unsigned literal = *reinterpret_cast(&floatValue); - operands.push_back({false, literal}); - } else if (typeParam.constant->getBasicType() == glslang::EbtInt) { - unsigned literal = typeParam.constant->getConstArray()[0].getIConst(); - operands.push_back({false, literal}); - } else if (typeParam.constant->getBasicType() == glslang::EbtUint) { - unsigned literal = typeParam.constant->getConstArray()[0].getUConst(); - operands.push_back({false, literal}); - } else if (typeParam.constant->getBasicType() == glslang::EbtBool) { - unsigned literal = typeParam.constant->getConstArray()[0].getBConst(); - operands.push_back({false, literal}); - } else if (typeParam.constant->getBasicType() == glslang::EbtString) { - auto str = typeParam.constant->getConstArray()[0].getSConst()->c_str(); - unsigned literal = 0; - char* literalPtr = reinterpret_cast(&literal); - unsigned charCount = 0; - char ch = 0; - do { - ch = *(str++); - *(literalPtr++) = ch; - ++charCount; - if (charCount == 4) { - operands.push_back({false, literal}); - literalPtr = reinterpret_cast(&literal); - charCount = 0; - } - } while (ch != 0); + if (typeParam.isConstant) { + // Constant expression + if (typeParam.constant->isLiteral()) { + if (typeParam.constant->getBasicType() == glslang::EbtFloat) { + float floatValue = static_cast(typeParam.constant->getConstArray()[0].getDConst()); + unsigned literal = *reinterpret_cast(&floatValue); + operands.push_back(literal); + } else if (typeParam.constant->getBasicType() == glslang::EbtInt) { + unsigned literal = typeParam.constant->getConstArray()[0].getIConst(); + operands.push_back(literal); + } else if (typeParam.constant->getBasicType() == glslang::EbtUint) { + unsigned literal = typeParam.constant->getConstArray()[0].getUConst(); + operands.push_back(literal); + } else if (typeParam.constant->getBasicType() == glslang::EbtBool) { + unsigned literal = typeParam.constant->getConstArray()[0].getBConst(); + operands.push_back(literal); + } else if (typeParam.constant->getBasicType() == glslang::EbtString) { + auto str = typeParam.constant->getConstArray()[0].getSConst()->c_str(); + unsigned literal = 0; + char* literalPtr = reinterpret_cast(&literal); + unsigned charCount = 0; + char ch = 0; + do { + ch = *(str++); + *(literalPtr++) = ch; + ++charCount; + if (charCount == 4) { + operands.push_back(literal); + literalPtr = reinterpret_cast(&literal); + charCount = 0; + } + } while (ch != 0); - // Partial literal is padded with 0 - if (charCount > 0) { - for (; charCount < 4; ++charCount) - *(literalPtr++) = 0; - operands.push_back({false, literal}); - } - } else - assert(0); // Unexpected type - } else - operands.push_back({true, createSpvConstant(*typeParam.constant)}); + // Partial literal is padded with 0 + if (charCount > 0) { + for (; charCount < 4; ++charCount) + *(literalPtr++) = 0; + operands.push_back(literal); + } + } else + assert(0); // Unexpected type + } else { + int nextConst = 0; + spv::Id constant = createSpvConstantFromConstUnionArray( + typeParam.constant->getType(), typeParam.constant->getConstArray(), nextConst, false); + operands.push_back(constant); + } + } else { + // Type specifier + spv::Id typeId = convertGlslangToSpvType(*typeParam.type); + operands.push_back(typeId); + } } - assert(spirvInst.set == ""); // Currently, couldn't be extended instructions. - spvType = builder.makeGenericType(static_cast(spirvInst.id), operands); - + if (spirvInst.set == "") + spvType = builder.createOp(static_cast(spirvInst.id), spv::NoType, operands); + else { + spvType = builder.createBuiltinCall( + spv::NoType, getExtBuiltins(spirvInst.set.c_str()), spirvInst.id, operands); + } break; } #endif @@ -7555,8 +7506,6 @@ spv::Id TGlslangToSpvTraverser::createInvocationsOperation(glslang::TOperator op break; case glslang::EOpReadFirstInvocation: opCode = spv::OpSubgroupFirstInvocationKHR; - if (builder.isVectorType(typeId)) - return CreateInvocationsVectorOperation(opCode, groupOperation, typeId, operands); break; case glslang::EOpBallot: { @@ -7681,7 +7630,7 @@ spv::Id TGlslangToSpvTraverser::CreateInvocationsVectorOperation(spv::Op op, spv assert(op == spv::OpGroupFMin || op == spv::OpGroupUMin || op == spv::OpGroupSMin || op == spv::OpGroupFMax || op == spv::OpGroupUMax || op == spv::OpGroupSMax || op == spv::OpGroupFAdd || op == spv::OpGroupIAdd || op == spv::OpGroupBroadcast || - op == spv::OpSubgroupReadInvocationKHR || op == spv::OpSubgroupFirstInvocationKHR || + op == spv::OpSubgroupReadInvocationKHR || op == spv::OpGroupFMinNonUniformAMD || op == spv::OpGroupUMinNonUniformAMD || op == spv::OpGroupSMinNonUniformAMD || op == spv::OpGroupFMaxNonUniformAMD || op == spv::OpGroupUMaxNonUniformAMD || @@ -7710,8 +7659,6 @@ spv::Id TGlslangToSpvTraverser::CreateInvocationsVectorOperation(spv::Op op, spv spvGroupOperands.push_back(scalar); spv::IdImmediate operand = { true, operands[1] }; spvGroupOperands.push_back(operand); - } else if (op == spv::OpSubgroupFirstInvocationKHR) { - spvGroupOperands.push_back(scalar); } else if (op == spv::OpGroupBroadcast) { spv::IdImmediate scope = { true, builder.makeUintConstant(spv::ScopeSubgroup) }; spvGroupOperands.push_back(scope); @@ -8751,32 +8698,7 @@ spv::Id TGlslangToSpvTraverser::getSymbolId(const glslang::TIntermSymbol* symbol // it was not found, create it spv::BuiltIn builtIn = TranslateBuiltInDecoration(symbol->getQualifier().builtIn, false); auto forcedType = getForcedType(symbol->getQualifier().builtIn, symbol->getType()); - - // There are pairs of symbols that map to the same SPIR-V built-in: - // gl_ObjectToWorldEXT and gl_ObjectToWorld3x4EXT, and gl_WorldToObjectEXT - // and gl_WorldToObject3x4EXT. SPIR-V forbids having two OpVariables - // with the same BuiltIn in the same storage class, so we must re-use one. - const bool mayNeedToReuseBuiltIn = - builtIn == spv::BuiltInObjectToWorldKHR || - builtIn == spv::BuiltInWorldToObjectKHR; - - if (mayNeedToReuseBuiltIn) { - auto iter = builtInVariableIds.find(uint32_t(builtIn)); - if (builtInVariableIds.end() != iter) { - id = iter->second; - symbolValues[symbol->getId()] = id; - if (forcedType.second != spv::NoType) - forceType[id] = forcedType.second; - return id; - } - } - id = createSpvVariable(symbol, forcedType.first); - - if (mayNeedToReuseBuiltIn) { - builtInVariableIds.insert({uint32_t(builtIn), id}); - } - symbolValues[symbol->getId()] = id; if (forcedType.second != spv::NoType) forceType[id] = forcedType.second; @@ -8799,18 +8721,8 @@ spv::Id TGlslangToSpvTraverser::getSymbolId(const glslang::TIntermSymbol* symbol builder.addDecoration(id, spv::DecorationOffset, symbol->getQualifier().layoutOffset); } - if (symbol->getQualifier().hasLocation()) { - if (!(glslangIntermediate->isRayTracingStage() && glslangIntermediate->IsRequestedExtension(glslang::E_GL_EXT_ray_tracing) - && (builder.getStorageClass(id) == spv::StorageClassRayPayloadKHR || - builder.getStorageClass(id) == spv::StorageClassIncomingRayPayloadKHR || - builder.getStorageClass(id) == spv::StorageClassCallableDataKHR || - builder.getStorageClass(id) == spv::StorageClassIncomingCallableDataKHR))) { - // Location values are used to link TraceRayKHR and ExecuteCallableKHR to corresponding variables - // but are not valid in SPIRV since they are supported only for Input/Output Storage classes. - builder.addDecoration(id, spv::DecorationLocation, symbol->getQualifier().layoutLocation); - } - } - + if (symbol->getQualifier().hasLocation()) + builder.addDecoration(id, spv::DecorationLocation, symbol->getQualifier().layoutLocation); builder.addDecoration(id, TranslateInvariantDecoration(symbol->getType().getQualifier())); if (symbol->getQualifier().hasStream() && glslangIntermediate->isMultiStream()) { builder.addCapability(spv::CapabilityGeometryStreams); @@ -8844,16 +8756,7 @@ spv::Id TGlslangToSpvTraverser::getSymbolId(const glslang::TIntermSymbol* symbol // add built-in variable decoration if (builtIn != spv::BuiltInMax) { - // WorkgroupSize deprecated in spirv1.6 - if (glslangIntermediate->getSpv().spv < glslang::EShTargetSpv_1_6 || - builtIn != spv::BuiltInWorkgroupSize) - builder.addDecoration(id, spv::DecorationBuiltIn, (int)builtIn); - } - - // Add volatile decoration to HelperInvocation for spirv1.6 and beyond - if (builtIn == spv::BuiltInHelperInvocation && - glslangIntermediate->getSpv().spv >= glslang::EShTargetSpv_1_6) { - builder.addDecoration(id, spv::DecorationVolatile); + builder.addDecoration(id, spv::DecorationBuiltIn, (int)builtIn); } #ifndef GLSLANG_WEB @@ -8905,12 +8808,6 @@ spv::Id TGlslangToSpvTraverser::getSymbolId(const glslang::TIntermSymbol* symbol builder.addExtension(spv::E_SPV_NV_fragment_shader_barycentric); } - if (symbol->getQualifier().pervertexEXT) { - builder.addDecoration(id, spv::DecorationPerVertexKHR); - builder.addCapability(spv::CapabilityFragmentBarycentricKHR); - builder.addExtension(spv::E_SPV_KHR_fragment_shader_barycentric); - } - if (glslangIntermediate->getHlslFunctionality1() && symbol->getType().getQualifier().semanticName != nullptr) { builder.addExtension("SPV_GOOGLE_hlsl_functionality1"); builder.addDecoration(id, (spv::Decoration)spv::DecorationHlslSemanticGOOGLE, @@ -8944,12 +8841,12 @@ spv::Id TGlslangToSpvTraverser::getSymbolId(const glslang::TIntermSymbol* symbol std::vector operandIds; assert(!decorateId.second.empty()); for (auto extraOperand : decorateId.second) { - if (extraOperand->getQualifier().isSpecConstant()) - operandIds.push_back(getSymbolId(extraOperand->getAsSymbolNode())); - else - operandIds.push_back(createSpvConstant(*extraOperand)); + int nextConst = 0; + spv::Id operandId = createSpvConstantFromConstUnionArray( + extraOperand->getType(), extraOperand->getConstArray(), nextConst, false); + operandIds.push_back(operandId); } - builder.addDecorationId(id, static_cast(decorateId.first), operandIds); + builder.addDecoration(id, static_cast(decorateId.first), operandIds); } // Add spirv_decorate_string @@ -9132,19 +9029,15 @@ spv::Id TGlslangToSpvTraverser::createSpvConstantFromConstUnionArray(const glsla break; #ifndef GLSLANG_WEB case glslang::EbtInt8: - builder.addCapability(spv::CapabilityInt8); spvConsts.push_back(builder.makeInt8Constant(zero ? 0 : consts[nextConst].getI8Const())); break; case glslang::EbtUint8: - builder.addCapability(spv::CapabilityInt8); spvConsts.push_back(builder.makeUint8Constant(zero ? 0 : consts[nextConst].getU8Const())); break; case glslang::EbtInt16: - builder.addCapability(spv::CapabilityInt16); spvConsts.push_back(builder.makeInt16Constant(zero ? 0 : consts[nextConst].getI16Const())); break; case glslang::EbtUint16: - builder.addCapability(spv::CapabilityInt16); spvConsts.push_back(builder.makeUint16Constant(zero ? 0 : consts[nextConst].getU16Const())); break; case glslang::EbtInt64: @@ -9157,7 +9050,6 @@ spv::Id TGlslangToSpvTraverser::createSpvConstantFromConstUnionArray(const glsla spvConsts.push_back(builder.makeDoubleConstant(zero ? 0.0 : consts[nextConst].getDConst())); break; case glslang::EbtFloat16: - builder.addCapability(spv::CapabilityFloat16); spvConsts.push_back(builder.makeFloat16Constant(zero ? 0.0F : (float)consts[nextConst].getDConst())); break; #endif @@ -9186,19 +9078,15 @@ spv::Id TGlslangToSpvTraverser::createSpvConstantFromConstUnionArray(const glsla break; #ifndef GLSLANG_WEB case glslang::EbtInt8: - builder.addCapability(spv::CapabilityInt8); scalar = builder.makeInt8Constant(zero ? 0 : consts[nextConst].getI8Const(), specConstant); break; case glslang::EbtUint8: - builder.addCapability(spv::CapabilityInt8); scalar = builder.makeUint8Constant(zero ? 0 : consts[nextConst].getU8Const(), specConstant); break; case glslang::EbtInt16: - builder.addCapability(spv::CapabilityInt16); scalar = builder.makeInt16Constant(zero ? 0 : consts[nextConst].getI16Const(), specConstant); break; case glslang::EbtUint16: - builder.addCapability(spv::CapabilityInt16); scalar = builder.makeUint16Constant(zero ? 0 : consts[nextConst].getU16Const(), specConstant); break; case glslang::EbtInt64: @@ -9211,7 +9099,6 @@ spv::Id TGlslangToSpvTraverser::createSpvConstantFromConstUnionArray(const glsla scalar = builder.makeDoubleConstant(zero ? 0.0 : consts[nextConst].getDConst(), specConstant); break; case glslang::EbtFloat16: - builder.addCapability(spv::CapabilityFloat16); scalar = builder.makeFloat16Constant(zero ? 0.0F : (float)consts[nextConst].getDConst(), specConstant); break; case glslang::EbtReference: diff --git a/libraries/glslang/spirv/GlslangToSpv.h b/libraries/ZVulkan/src/glslang/spirv/GlslangToSpv.h similarity index 98% rename from libraries/glslang/spirv/GlslangToSpv.h rename to libraries/ZVulkan/src/glslang/spirv/GlslangToSpv.h index 3907be43b7..86e1c23bf6 100644 --- a/libraries/glslang/spirv/GlslangToSpv.h +++ b/libraries/ZVulkan/src/glslang/spirv/GlslangToSpv.h @@ -40,7 +40,7 @@ #endif #include "SpvTools.h" -#include "glslang/Include/intermediate.h" +#include "../glslang/Include/intermediate.h" #include #include diff --git a/libraries/glslang/spirv/InReadableOrder.cpp b/libraries/ZVulkan/src/glslang/spirv/InReadableOrder.cpp similarity index 100% rename from libraries/glslang/spirv/InReadableOrder.cpp rename to libraries/ZVulkan/src/glslang/spirv/InReadableOrder.cpp diff --git a/libraries/glslang/spirv/Logger.cpp b/libraries/ZVulkan/src/glslang/spirv/Logger.cpp similarity index 100% rename from libraries/glslang/spirv/Logger.cpp rename to libraries/ZVulkan/src/glslang/spirv/Logger.cpp diff --git a/libraries/glslang/spirv/Logger.h b/libraries/ZVulkan/src/glslang/spirv/Logger.h similarity index 100% rename from libraries/glslang/spirv/Logger.h rename to libraries/ZVulkan/src/glslang/spirv/Logger.h diff --git a/libraries/glslang/spirv/NonSemanticDebugPrintf.h b/libraries/ZVulkan/src/glslang/spirv/NonSemanticDebugPrintf.h similarity index 100% rename from libraries/glslang/spirv/NonSemanticDebugPrintf.h rename to libraries/ZVulkan/src/glslang/spirv/NonSemanticDebugPrintf.h diff --git a/libraries/glslang/spirv/SPVRemapper.cpp b/libraries/ZVulkan/src/glslang/spirv/SPVRemapper.cpp similarity index 97% rename from libraries/glslang/spirv/SPVRemapper.cpp rename to libraries/ZVulkan/src/glslang/spirv/SPVRemapper.cpp index 6aca8cbcf0..56d6d5d4a5 100644 --- a/libraries/glslang/spirv/SPVRemapper.cpp +++ b/libraries/ZVulkan/src/glslang/spirv/SPVRemapper.cpp @@ -160,29 +160,15 @@ namespace spv { } // Is this an opcode we should remove when using --strip? - bool spirvbin_t::isStripOp(spv::Op opCode, unsigned start) const + bool spirvbin_t::isStripOp(spv::Op opCode) const { switch (opCode) { case spv::OpSource: case spv::OpSourceExtension: case spv::OpName: case spv::OpMemberName: - case spv::OpLine : - { - const std::string name = literalString(start + 2); - - std::vector::const_iterator it; - for (it = stripWhiteList.begin(); it < stripWhiteList.end(); it++) - { - if (name.find(*it) != std::string::npos) { - return false; - } - } - - return true; - } - default : - return false; + case spv::OpLine: return true; + default: return false; } } @@ -311,21 +297,15 @@ namespace spv { std::string spirvbin_t::literalString(unsigned word) const { std::string literal; - const spirword_t * pos = spv.data() + word; literal.reserve(16); - do { - spirword_t word = *pos; - for (int i = 0; i < 4; i++) { - char c = word & 0xff; - if (c == '\0') - return literal; - literal += c; - word >>= 8; - } - pos++; - } while (true); + const char* bytes = reinterpret_cast(spv.data() + word); + + while (bytes && *bytes) + literal += *bytes++; + + return literal; } void spirvbin_t::applyMap() @@ -386,7 +366,7 @@ namespace spv { process( [&](spv::Op opCode, unsigned start) { // remember opcodes we want to strip later - if (isStripOp(opCode, start)) + if (isStripOp(opCode)) stripInst(start); return true; }, @@ -1508,24 +1488,13 @@ namespace spv { } // remap from a memory image - void spirvbin_t::remap(std::vector& in_spv, const std::vector& whiteListStrings, - std::uint32_t opts) + void spirvbin_t::remap(std::vector& in_spv, std::uint32_t opts) { - stripWhiteList = whiteListStrings; spv.swap(in_spv); remap(opts); spv.swap(in_spv); } - // remap from a memory image - legacy interface without white list - void spirvbin_t::remap(std::vector& in_spv, std::uint32_t opts) - { - stripWhiteList.clear(); - spv.swap(in_spv); - remap(opts); - spv.swap(in_spv); - } - } // namespace SPV #endif // defined (use_cpp11) diff --git a/libraries/glslang/spirv/SPVRemapper.h b/libraries/ZVulkan/src/glslang/spirv/SPVRemapper.h similarity index 97% rename from libraries/glslang/spirv/SPVRemapper.h rename to libraries/ZVulkan/src/glslang/spirv/SPVRemapper.h index d21694635a..d6b9c346dd 100644 --- a/libraries/glslang/spirv/SPVRemapper.h +++ b/libraries/ZVulkan/src/glslang/spirv/SPVRemapper.h @@ -118,10 +118,6 @@ public: virtual ~spirvbin_t() { } // remap on an existing binary in memory - void remap(std::vector& spv, const std::vector& whiteListStrings, - std::uint32_t opts = DO_EVERYTHING); - - // remap on an existing binary in memory - legacy interface without white list void remap(std::vector& spv, std::uint32_t opts = DO_EVERYTHING); // Type for error/log handler functions @@ -184,8 +180,6 @@ private: unsigned typeSizeInWords(spv::Id id) const; unsigned idTypeSizeInWords(spv::Id id) const; - bool isStripOp(spv::Op opCode, unsigned start) const; - spv::Id& asId(unsigned word) { return spv[word]; } const spv::Id& asId(unsigned word) const { return spv[word]; } spv::Op asOpCode(unsigned word) const { return opOpCode(spv[word]); } @@ -255,8 +249,6 @@ private: std::vector spv; // SPIR words - std::vector stripWhiteList; - namemap_t nameMap; // ID names from OpName // Since we want to also do binary ops, we can't use std::vector. we could use diff --git a/libraries/glslang/spirv/SpvBuilder.cpp b/libraries/ZVulkan/src/glslang/spirv/SpvBuilder.cpp similarity index 99% rename from libraries/glslang/spirv/SpvBuilder.cpp rename to libraries/ZVulkan/src/glslang/spirv/SpvBuilder.cpp index 36a3f09744..e83306ebcb 100644 --- a/libraries/glslang/spirv/SpvBuilder.cpp +++ b/libraries/ZVulkan/src/glslang/spirv/SpvBuilder.cpp @@ -427,37 +427,6 @@ Id Builder::makeCooperativeMatrixType(Id component, Id scope, Id rows, Id cols) return type->getResultId(); } -Id Builder::makeGenericType(spv::Op opcode, std::vector& operands) -{ - // try to find it - Instruction* type; - for (int t = 0; t < (int)groupedTypes[opcode].size(); ++t) { - type = groupedTypes[opcode][t]; - if (static_cast(type->getNumOperands()) != operands.size()) - continue; // Number mismatch, find next - - bool match = true; - for (int op = 0; match && op < (int)operands.size(); ++op) { - match = (operands[op].isId ? type->getIdOperand(op) : type->getImmediateOperand(op)) == operands[op].word; - } - if (match) - return type->getResultId(); - } - - // not found, make it - type = new Instruction(getUniqueId(), NoType, opcode); - for (size_t op = 0; op < operands.size(); ++op) { - if (operands[op].isId) - type->addIdOperand(operands[op].word); - else - type->addImmediateOperand(operands[op].word); - } - groupedTypes[opcode].push_back(type); - constantsTypesGlobals.push_back(std::unique_ptr(type)); - module.mapInstruction(type); - - return type->getResultId(); -} // TODO: performance: track arrays per stride // If a stride is supplied (non-zero) make an array. diff --git a/libraries/glslang/spirv/SpvBuilder.h b/libraries/ZVulkan/src/glslang/spirv/SpvBuilder.h similarity index 99% rename from libraries/glslang/spirv/SpvBuilder.h rename to libraries/ZVulkan/src/glslang/spirv/SpvBuilder.h index 0d6bce631f..251b9ee823 100644 --- a/libraries/glslang/spirv/SpvBuilder.h +++ b/libraries/ZVulkan/src/glslang/spirv/SpvBuilder.h @@ -99,10 +99,6 @@ public: stringIds[file_c_str] = strId; return strId; } - spv::Id getSourceFile() const - { - return sourceFileStringId; - } void setSourceFile(const std::string& file) { sourceFileStringId = getStringId(file); @@ -185,7 +181,6 @@ public: Id makeSamplerType(); Id makeSampledImageType(Id imageType); Id makeCooperativeMatrixType(Id component, Id scope, Id rows, Id cols); - Id makeGenericType(spv::Op opcode, std::vector& operands); // accelerationStructureNV type Id makeAccelerationStructureType(); diff --git a/libraries/glslang/spirv/SpvPostProcess.cpp b/libraries/ZVulkan/src/glslang/spirv/SpvPostProcess.cpp similarity index 95% rename from libraries/glslang/spirv/SpvPostProcess.cpp rename to libraries/ZVulkan/src/glslang/spirv/SpvPostProcess.cpp index dd6dabce0d..23d7b5a461 100644 --- a/libraries/glslang/spirv/SpvPostProcess.cpp +++ b/libraries/ZVulkan/src/glslang/spirv/SpvPostProcess.cpp @@ -44,8 +44,10 @@ #include #include "SpvBuilder.h" -#include "spirv.hpp" +#include "spirv.hpp" +#include "GlslangToSpv.h" +#include "SpvBuilder.h" namespace spv { #include "GLSL.std.450.h" #include "GLSL.ext.KHR.h" @@ -111,6 +113,8 @@ void Builder::postProcessType(const Instruction& inst, Id typeId) } } break; + case OpAccessChain: + case OpPtrAccessChain: case OpCopyObject: break; case OpFConvert: @@ -157,43 +161,26 @@ void Builder::postProcessType(const Instruction& inst, Id typeId) switch (inst.getImmediateOperand(1)) { case GLSLstd450Frexp: case GLSLstd450FrexpStruct: - if (getSpvVersion() < spv::Spv_1_3 && containsType(typeId, OpTypeInt, 16)) + if (getSpvVersion() < glslang::EShTargetSpv_1_3 && containsType(typeId, OpTypeInt, 16)) addExtension(spv::E_SPV_AMD_gpu_shader_int16); break; case GLSLstd450InterpolateAtCentroid: case GLSLstd450InterpolateAtSample: case GLSLstd450InterpolateAtOffset: - if (getSpvVersion() < spv::Spv_1_3 && containsType(typeId, OpTypeFloat, 16)) + if (getSpvVersion() < glslang::EShTargetSpv_1_3 && containsType(typeId, OpTypeFloat, 16)) addExtension(spv::E_SPV_AMD_gpu_shader_half_float); break; default: break; } break; - case OpAccessChain: - case OpPtrAccessChain: - if (isPointerType(typeId)) - break; - if (basicTypeOp == OpTypeInt) { - if (width == 16) - addCapability(CapabilityInt16); - else if (width == 8) - addCapability(CapabilityInt8); - } default: - if (basicTypeOp == OpTypeInt) { - if (width == 16) - addCapability(CapabilityInt16); - else if (width == 8) - addCapability(CapabilityInt8); - else if (width == 64) - addCapability(CapabilityInt64); - } else if (basicTypeOp == OpTypeFloat) { - if (width == 16) - addCapability(CapabilityFloat16); - else if (width == 64) - addCapability(CapabilityFloat64); - } + if (basicTypeOp == OpTypeFloat && width == 16) + addCapability(CapabilityFloat16); + if (basicTypeOp == OpTypeInt && width == 16) + addCapability(CapabilityInt16); + if (basicTypeOp == OpTypeInt && width == 8) + addCapability(CapabilityInt8); break; } } diff --git a/libraries/glslang/spirv/SpvTools.cpp b/libraries/ZVulkan/src/glslang/spirv/SpvTools.cpp similarity index 98% rename from libraries/glslang/spirv/SpvTools.cpp rename to libraries/ZVulkan/src/glslang/spirv/SpvTools.cpp index 8cc17cca93..8acf9b139a 100644 --- a/libraries/glslang/spirv/SpvTools.cpp +++ b/libraries/ZVulkan/src/glslang/spirv/SpvTools.cpp @@ -68,8 +68,6 @@ spv_target_env MapToSpirvToolsEnv(const SpvVersion& spvVersion, spv::SpvBuildLog } case glslang::EShTargetVulkan_1_2: return spv_target_env::SPV_ENV_VULKAN_1_2; - case glslang::EShTargetVulkan_1_3: - return spv_target_env::SPV_ENV_VULKAN_1_3; default: break; } @@ -212,7 +210,6 @@ void SpirvToolsTransform(const glslang::TIntermediate& intermediate, std::vector optimizer.RegisterPass(spvtools::CreateInterpolateFixupPass()); if (options->optimizeSize) { optimizer.RegisterPass(spvtools::CreateRedundancyEliminationPass()); - optimizer.RegisterPass(spvtools::CreateEliminateDeadInputComponentsPass()); } optimizer.RegisterPass(spvtools::CreateAggressiveDCEPass()); optimizer.RegisterPass(spvtools::CreateCFGCleanupPass()); diff --git a/libraries/glslang/spirv/SpvTools.h b/libraries/ZVulkan/src/glslang/spirv/SpvTools.h similarity index 98% rename from libraries/glslang/spirv/SpvTools.h rename to libraries/ZVulkan/src/glslang/spirv/SpvTools.h index 3fb3cbacd3..d856c52369 100644 --- a/libraries/glslang/spirv/SpvTools.h +++ b/libraries/ZVulkan/src/glslang/spirv/SpvTools.h @@ -47,7 +47,7 @@ #include "spirv-tools/libspirv.h" #endif -#include "glslang/MachineIndependent/localintermediate.h" +#include "../glslang/MachineIndependent/localintermediate.h" #include "Logger.h" namespace glslang { diff --git a/libraries/glslang/spirv/bitutils.h b/libraries/ZVulkan/src/glslang/spirv/bitutils.h similarity index 100% rename from libraries/glslang/spirv/bitutils.h rename to libraries/ZVulkan/src/glslang/spirv/bitutils.h diff --git a/libraries/glslang/spirv/disassemble.cpp b/libraries/ZVulkan/src/glslang/spirv/disassemble.cpp similarity index 97% rename from libraries/glslang/spirv/disassemble.cpp rename to libraries/ZVulkan/src/glslang/spirv/disassemble.cpp index 74dd605409..73c988c5b3 100644 --- a/libraries/glslang/spirv/disassemble.cpp +++ b/libraries/ZVulkan/src/glslang/spirv/disassemble.cpp @@ -43,7 +43,6 @@ #include #include #include -#include #include "disassemble.h" #include "doc.h" @@ -101,7 +100,6 @@ protected: void outputMask(OperandClass operandClass, unsigned mask); void disassembleImmediates(int numOperands); void disassembleIds(int numOperands); - std::pair decodeString(); int disassembleString(); void disassembleInstruction(Id resultId, Id typeId, Op opCode, int numOperands); @@ -292,44 +290,31 @@ void SpirvStream::disassembleIds(int numOperands) } } -// decode string from words at current position (non-consuming) -std::pair SpirvStream::decodeString() -{ - std::string res; - int wordPos = word; - char c; - bool done = false; - - do { - unsigned int content = stream[wordPos]; - for (int charCount = 0; charCount < 4; ++charCount) { - c = content & 0xff; - content >>= 8; - if (c == '\0') { - done = true; - break; - } - res += c; - } - ++wordPos; - } while(! done); - - return std::make_pair(wordPos - word, res); -} - // return the number of operands consumed by the string int SpirvStream::disassembleString() { + int startWord = word; + out << " \""; - std::pair decoderes = decodeString(); + const char* wordString; + bool done = false; + do { + unsigned int content = stream[word]; + wordString = (const char*)&content; + for (int charCount = 0; charCount < 4; ++charCount) { + if (*wordString == 0) { + done = true; + break; + } + out << *(wordString++); + } + ++word; + } while (! done); - out << decoderes.second; out << "\""; - word += decoderes.first; - - return decoderes.first; + return word - startWord; } void SpirvStream::disassembleInstruction(Id resultId, Id /*typeId*/, Op opCode, int numOperands) @@ -346,7 +331,7 @@ void SpirvStream::disassembleInstruction(Id resultId, Id /*typeId*/, Op opCode, nextNestedControl = 0; } } else if (opCode == OpExtInstImport) { - idDescriptor[resultId] = decodeString().second; + idDescriptor[resultId] = (const char*)(&stream[word]); } else { if (resultId != 0 && idDescriptor[resultId].size() == 0) { @@ -443,7 +428,7 @@ void SpirvStream::disassembleInstruction(Id resultId, Id /*typeId*/, Op opCode, --numOperands; // Get names for printing "(XXX)" for readability, *after* this id if (opCode == OpName) - idDescriptor[stream[word - 1]] = decodeString().second; + idDescriptor[stream[word - 1]] = (const char*)(&stream[word]); break; case OperandVariableIds: disassembleIds(numOperands); diff --git a/libraries/glslang/spirv/disassemble.h b/libraries/ZVulkan/src/glslang/spirv/disassemble.h similarity index 100% rename from libraries/glslang/spirv/disassemble.h rename to libraries/ZVulkan/src/glslang/spirv/disassemble.h diff --git a/libraries/glslang/spirv/doc.cpp b/libraries/ZVulkan/src/glslang/spirv/doc.cpp similarity index 99% rename from libraries/glslang/spirv/doc.cpp rename to libraries/ZVulkan/src/glslang/spirv/doc.cpp index 1ba92a8798..dbdf7077a6 100644 --- a/libraries/glslang/spirv/doc.cpp +++ b/libraries/ZVulkan/src/glslang/spirv/doc.cpp @@ -305,8 +305,7 @@ const char* DecorationString(int decoration) case DecorationPerPrimitiveNV: return "PerPrimitiveNV"; case DecorationPerViewNV: return "PerViewNV"; case DecorationPerTaskNV: return "PerTaskNV"; - - case DecorationPerVertexKHR: return "PerVertexKHR"; + case DecorationPerVertexNV: return "PerVertexNV"; case DecorationNonUniformEXT: return "DecorationNonUniformEXT"; case DecorationHlslCounterBufferGOOGLE: return "DecorationHlslCounterBufferGOOGLE"; @@ -393,7 +392,6 @@ const char* BuiltInString(int builtIn) case BuiltInObjectRayDirectionKHR: return "ObjectRayDirectionKHR"; case BuiltInRayTminKHR: return "RayTminKHR"; case BuiltInRayTmaxKHR: return "RayTmaxKHR"; - case BuiltInCullMaskKHR: return "CullMaskKHR"; case BuiltInInstanceCustomIndexKHR: return "InstanceCustomIndexKHR"; case BuiltInRayGeometryIndexKHR: return "RayGeometryIndexKHR"; case BuiltInObjectToWorldKHR: return "ObjectToWorldKHR"; @@ -408,8 +406,8 @@ const char* BuiltInString(int builtIn) case BuiltInViewportMaskPerViewNV: return "ViewportMaskPerViewNV"; // case BuiltInFragmentSizeNV: return "FragmentSizeNV"; // superseded by BuiltInFragSizeEXT // case BuiltInInvocationsPerPixelNV: return "InvocationsPerPixelNV"; // superseded by BuiltInFragInvocationCountEXT - case BuiltInBaryCoordKHR: return "BaryCoordKHR"; - case BuiltInBaryCoordNoPerspKHR: return "BaryCoordNoPerspKHR"; + case BuiltInBaryCoordNV: return "BaryCoordNV"; + case BuiltInBaryCoordNoPerspNV: return "BaryCoordNoPerspNV"; case BuiltInFragSizeEXT: return "FragSizeEXT"; case BuiltInFragInvocationCountEXT: return "FragInvocationCountEXT"; @@ -902,12 +900,6 @@ const char* CapabilityString(int info) case CapabilityDeviceGroup: return "DeviceGroup"; case CapabilityMultiView: return "MultiView"; - case CapabilityDenormPreserve: return "DenormPreserve"; - case CapabilityDenormFlushToZero: return "DenormFlushToZero"; - case CapabilitySignedZeroInfNanPreserve: return "SignedZeroInfNanPreserve"; - case CapabilityRoundingModeRTE: return "RoundingModeRTE"; - case CapabilityRoundingModeRTZ: return "RoundingModeRTZ"; - case CapabilityStencilExportEXT: return "StencilExportEXT"; case CapabilityFloat16ImageAMD: return "Float16ImageAMD"; @@ -927,13 +919,12 @@ const char* CapabilityString(int info) case CapabilityRayTracingNV: return "RayTracingNV"; case CapabilityRayTracingMotionBlurNV: return "RayTracingMotionBlurNV"; case CapabilityRayTracingKHR: return "RayTracingKHR"; - case CapabilityRayCullMaskKHR: return "RayCullMaskKHR"; case CapabilityRayQueryKHR: return "RayQueryKHR"; case CapabilityRayTracingProvisionalKHR: return "RayTracingProvisionalKHR"; case CapabilityRayTraversalPrimitiveCullingKHR: return "RayTraversalPrimitiveCullingKHR"; case CapabilityComputeDerivativeGroupQuadsNV: return "ComputeDerivativeGroupQuadsNV"; case CapabilityComputeDerivativeGroupLinearNV: return "ComputeDerivativeGroupLinearNV"; - case CapabilityFragmentBarycentricKHR: return "FragmentBarycentricKHR"; + case CapabilityFragmentBarycentricNV: return "FragmentBarycentricNV"; case CapabilityMeshShadingNV: return "MeshShadingNV"; case CapabilityImageFootprintNV: return "ImageFootprintNV"; // case CapabilityShadingRateNV: return "ShadingRateNV"; // superseded by FragmentDensityEXT diff --git a/libraries/glslang/spirv/doc.h b/libraries/ZVulkan/src/glslang/spirv/doc.h similarity index 100% rename from libraries/glslang/spirv/doc.h rename to libraries/ZVulkan/src/glslang/spirv/doc.h diff --git a/libraries/glslang/spirv/hex_float.h b/libraries/ZVulkan/src/glslang/spirv/hex_float.h similarity index 100% rename from libraries/glslang/spirv/hex_float.h rename to libraries/ZVulkan/src/glslang/spirv/hex_float.h diff --git a/libraries/glslang/spirv/spirv.hpp b/libraries/ZVulkan/src/glslang/spirv/spirv.hpp similarity index 91% rename from libraries/glslang/spirv/spirv.hpp rename to libraries/ZVulkan/src/glslang/spirv/spirv.hpp index 4b618ca7b5..e0fe24980d 100644 --- a/libraries/glslang/spirv/spirv.hpp +++ b/libraries/ZVulkan/src/glslang/spirv/spirv.hpp @@ -49,12 +49,12 @@ namespace spv { typedef unsigned int Id; -#define SPV_VERSION 0x10600 -#define SPV_REVISION 1 +#define SPV_VERSION 0x10500 +#define SPV_REVISION 4 static const unsigned int MagicNumber = 0x07230203; -static const unsigned int Version = 0x00010600; -static const unsigned int Revision = 1; +static const unsigned int Version = 0x00010500; +static const unsigned int Revision = 4; static const unsigned int OpCodeMask = 0xffff; static const unsigned int WordCountShift = 16; @@ -65,7 +65,6 @@ enum SourceLanguage { SourceLanguageOpenCL_C = 3, SourceLanguageOpenCL_CPP = 4, SourceLanguageHLSL = 5, - SourceLanguageCPP_for_OpenCL = 6, SourceLanguageMax = 0x7fffffff, }; @@ -353,8 +352,6 @@ enum ImageOperandsShift { ImageOperandsVolatileTexelKHRShift = 11, ImageOperandsSignExtendShift = 12, ImageOperandsZeroExtendShift = 13, - ImageOperandsNontemporalShift = 14, - ImageOperandsOffsetsShift = 16, ImageOperandsMax = 0x7fffffff, }; @@ -378,8 +375,6 @@ enum ImageOperandsMask { ImageOperandsVolatileTexelKHRMask = 0x00000800, ImageOperandsSignExtendMask = 0x00001000, ImageOperandsZeroExtendMask = 0x00002000, - ImageOperandsNontemporalMask = 0x00004000, - ImageOperandsOffsetsMask = 0x00010000, }; enum FPFastMathModeShift { @@ -496,7 +491,6 @@ enum Decoration { DecorationPerPrimitiveNV = 5271, DecorationPerViewNV = 5272, DecorationPerTaskNV = 5273, - DecorationPerVertexKHR = 5285, DecorationPerVertexNV = 5285, DecorationNonUniform = 5300, DecorationNonUniformEXT = 5300, @@ -504,10 +498,6 @@ enum Decoration { DecorationRestrictPointerEXT = 5355, DecorationAliasedPointer = 5356, DecorationAliasedPointerEXT = 5356, - DecorationBindlessSamplerNV = 5398, - DecorationBindlessImageNV = 5399, - DecorationBoundSamplerNV = 5400, - DecorationBoundImageNV = 5401, DecorationSIMTCallINTEL = 5599, DecorationReferencedIndirectlyINTEL = 5602, DecorationClobberINTEL = 5607, @@ -547,7 +537,6 @@ enum Decoration { DecorationFunctionFloatingPointModeINTEL = 6080, DecorationSingleElementVectorINTEL = 6085, DecorationVectorComputeCallableFunctionINTEL = 6087, - DecorationMediaBlockIOINTEL = 6140, DecorationMax = 0x7fffffff, }; @@ -632,9 +621,7 @@ enum BuiltIn { BuiltInLayerPerViewNV = 5279, BuiltInMeshViewCountNV = 5280, BuiltInMeshViewIndicesNV = 5281, - BuiltInBaryCoordKHR = 5286, BuiltInBaryCoordNV = 5286, - BuiltInBaryCoordNoPerspKHR = 5287, BuiltInBaryCoordNoPerspNV = 5287, BuiltInFragSizeEXT = 5292, BuiltInFragmentSizeNV = 5292, @@ -673,7 +660,6 @@ enum BuiltIn { BuiltInSMCountNV = 5375, BuiltInWarpIDNV = 5376, BuiltInSMIDNV = 5377, - BuiltInCullMaskKHR = 6021, BuiltInMax = 0x7fffffff, }; @@ -736,7 +722,6 @@ enum FunctionControlShift { FunctionControlDontInlineShift = 1, FunctionControlPureShift = 2, FunctionControlConstShift = 3, - FunctionControlOptNoneINTELShift = 16, FunctionControlMax = 0x7fffffff, }; @@ -746,7 +731,6 @@ enum FunctionControlMask { FunctionControlDontInlineMask = 0x00000002, FunctionControlPureMask = 0x00000004, FunctionControlConstMask = 0x00000008, - FunctionControlOptNoneINTELMask = 0x00010000, }; enum MemorySemanticsShift { @@ -927,7 +911,6 @@ enum Capability { CapabilityGroupNonUniformQuad = 68, CapabilityShaderLayer = 69, CapabilityShaderViewportIndex = 70, - CapabilityUniformDecoration = 71, CapabilityFragmentShadingRateKHR = 4422, CapabilitySubgroupBallotKHR = 4423, CapabilityDrawParameters = 4427, @@ -976,7 +959,6 @@ enum Capability { CapabilityFragmentFullyCoveredEXT = 5265, CapabilityMeshShadingNV = 5266, CapabilityImageFootprintNV = 5282, - CapabilityFragmentBarycentricKHR = 5284, CapabilityFragmentBarycentricNV = 5284, CapabilityComputeDerivativeGroupQuadsNV = 5288, CapabilityFragmentDensityEXT = 5291, @@ -1021,9 +1003,7 @@ enum Capability { CapabilityFragmentShaderShadingRateInterlockEXT = 5372, CapabilityShaderSMBuiltinsNV = 5373, CapabilityFragmentShaderPixelInterlockEXT = 5378, - CapabilityDemoteToHelperInvocation = 5379, CapabilityDemoteToHelperInvocationEXT = 5379, - CapabilityBindlessTextureNV = 5390, CapabilitySubgroupShuffleINTEL = 5568, CapabilitySubgroupBufferBlockIOINTEL = 5569, CapabilitySubgroupImageBlockIOINTEL = 5570, @@ -1048,7 +1028,6 @@ enum Capability { CapabilityFPGAMemoryAttributesINTEL = 5824, CapabilityFPFastMathModeINTEL = 5837, CapabilityArbitraryPrecisionIntegersINTEL = 5844, - CapabilityArbitraryPrecisionFloatingPointINTEL = 5845, CapabilityUnstructuredLoopControlsINTEL = 5886, CapabilityFPGALoopControlsINTEL = 5888, CapabilityKernelAttributesINTEL = 5892, @@ -1057,27 +1036,14 @@ enum Capability { CapabilityFPGAClusterAttributesINTEL = 5904, CapabilityLoopFuseINTEL = 5906, CapabilityFPGABufferLocationINTEL = 5920, - CapabilityArbitraryPrecisionFixedPointINTEL = 5922, CapabilityUSMStorageClassesINTEL = 5935, CapabilityIOPipesINTEL = 5943, CapabilityBlockingPipesINTEL = 5945, CapabilityFPGARegINTEL = 5948, - CapabilityDotProductInputAll = 6016, - CapabilityDotProductInputAllKHR = 6016, - CapabilityDotProductInput4x8Bit = 6017, - CapabilityDotProductInput4x8BitKHR = 6017, - CapabilityDotProductInput4x8BitPacked = 6018, - CapabilityDotProductInput4x8BitPackedKHR = 6018, - CapabilityDotProduct = 6019, - CapabilityDotProductKHR = 6019, - CapabilityRayCullMaskKHR = 6020, - CapabilityBitInstructions = 6025, CapabilityAtomicFloat32AddEXT = 6033, CapabilityAtomicFloat64AddEXT = 6034, CapabilityLongConstantCompositeINTEL = 6089, - CapabilityOptNoneINTEL = 6094, CapabilityAtomicFloat16AddEXT = 6095, - CapabilityDebugInfoModuleINTEL = 6114, CapabilityMax = 0x7fffffff, }; @@ -1156,32 +1122,6 @@ enum FPOperationMode { FPOperationModeMax = 0x7fffffff, }; -enum QuantizationModes { - QuantizationModesTRN = 0, - QuantizationModesTRN_ZERO = 1, - QuantizationModesRND = 2, - QuantizationModesRND_ZERO = 3, - QuantizationModesRND_INF = 4, - QuantizationModesRND_MIN_INF = 5, - QuantizationModesRND_CONV = 6, - QuantizationModesRND_CONV_ODD = 7, - QuantizationModesMax = 0x7fffffff, -}; - -enum OverflowModes { - OverflowModesWRAP = 0, - OverflowModesSAT = 1, - OverflowModesSAT_ZERO = 2, - OverflowModesSAT_SYM = 3, - OverflowModesMax = 0x7fffffff, -}; - -enum PackedVectorFormat { - PackedVectorFormatPackedVectorFormat4x8Bit = 0, - PackedVectorFormatPackedVectorFormat4x8BitKHR = 0, - PackedVectorFormatMax = 0x7fffffff, -}; - enum Op { OpNop = 0, OpUndef = 1, @@ -1539,18 +1479,6 @@ enum Op { OpConvertUToAccelerationStructureKHR = 4447, OpIgnoreIntersectionKHR = 4448, OpTerminateRayKHR = 4449, - OpSDot = 4450, - OpSDotKHR = 4450, - OpUDot = 4451, - OpUDotKHR = 4451, - OpSUDot = 4452, - OpSUDotKHR = 4452, - OpSDotAccSat = 4453, - OpSDotAccSatKHR = 4453, - OpUDotAccSat = 4454, - OpUDotAccSatKHR = 4454, - OpSUDotAccSat = 4455, - OpSUDotAccSatKHR = 4455, OpTypeRayQueryKHR = 4472, OpRayQueryInitializeKHR = 4473, OpRayQueryTerminateKHR = 4474, @@ -1589,16 +1517,8 @@ enum Op { OpCooperativeMatrixLengthNV = 5362, OpBeginInvocationInterlockEXT = 5364, OpEndInvocationInterlockEXT = 5365, - OpDemoteToHelperInvocation = 5380, OpDemoteToHelperInvocationEXT = 5380, OpIsHelperInvocationEXT = 5381, - OpConvertUToImageNV = 5391, - OpConvertUToSamplerNV = 5392, - OpConvertImageToUNV = 5393, - OpConvertSamplerToUNV = 5394, - OpConvertUToSampledImageNV = 5395, - OpConvertSampledImageToUNV = 5396, - OpSamplerImageAddressingModeNV = 5397, OpSubgroupShuffleINTEL = 5571, OpSubgroupShuffleDownINTEL = 5572, OpSubgroupShuffleUpINTEL = 5573, @@ -1623,7 +1543,7 @@ enum Op { OpUSubSatINTEL = 5596, OpIMul32x16INTEL = 5597, OpUMul32x16INTEL = 5598, - OpConstantFunctionPointerINTEL = 5600, + OpConstFunctionPointerINTEL = 5600, OpFunctionPointerCallINTEL = 5601, OpAsmTargetINTEL = 5609, OpAsmINTEL = 5610, @@ -1757,59 +1677,7 @@ enum Op { OpVariableLengthArrayINTEL = 5818, OpSaveMemoryINTEL = 5819, OpRestoreMemoryINTEL = 5820, - OpArbitraryFloatSinCosPiINTEL = 5840, - OpArbitraryFloatCastINTEL = 5841, - OpArbitraryFloatCastFromIntINTEL = 5842, - OpArbitraryFloatCastToIntINTEL = 5843, - OpArbitraryFloatAddINTEL = 5846, - OpArbitraryFloatSubINTEL = 5847, - OpArbitraryFloatMulINTEL = 5848, - OpArbitraryFloatDivINTEL = 5849, - OpArbitraryFloatGTINTEL = 5850, - OpArbitraryFloatGEINTEL = 5851, - OpArbitraryFloatLTINTEL = 5852, - OpArbitraryFloatLEINTEL = 5853, - OpArbitraryFloatEQINTEL = 5854, - OpArbitraryFloatRecipINTEL = 5855, - OpArbitraryFloatRSqrtINTEL = 5856, - OpArbitraryFloatCbrtINTEL = 5857, - OpArbitraryFloatHypotINTEL = 5858, - OpArbitraryFloatSqrtINTEL = 5859, - OpArbitraryFloatLogINTEL = 5860, - OpArbitraryFloatLog2INTEL = 5861, - OpArbitraryFloatLog10INTEL = 5862, - OpArbitraryFloatLog1pINTEL = 5863, - OpArbitraryFloatExpINTEL = 5864, - OpArbitraryFloatExp2INTEL = 5865, - OpArbitraryFloatExp10INTEL = 5866, - OpArbitraryFloatExpm1INTEL = 5867, - OpArbitraryFloatSinINTEL = 5868, - OpArbitraryFloatCosINTEL = 5869, - OpArbitraryFloatSinCosINTEL = 5870, - OpArbitraryFloatSinPiINTEL = 5871, - OpArbitraryFloatCosPiINTEL = 5872, - OpArbitraryFloatASinINTEL = 5873, - OpArbitraryFloatASinPiINTEL = 5874, - OpArbitraryFloatACosINTEL = 5875, - OpArbitraryFloatACosPiINTEL = 5876, - OpArbitraryFloatATanINTEL = 5877, - OpArbitraryFloatATanPiINTEL = 5878, - OpArbitraryFloatATan2INTEL = 5879, - OpArbitraryFloatPowINTEL = 5880, - OpArbitraryFloatPowRINTEL = 5881, - OpArbitraryFloatPowNINTEL = 5882, OpLoopControlINTEL = 5887, - OpFixedSqrtINTEL = 5923, - OpFixedRecipINTEL = 5924, - OpFixedRsqrtINTEL = 5925, - OpFixedSinINTEL = 5926, - OpFixedCosINTEL = 5927, - OpFixedSinCosINTEL = 5928, - OpFixedSinPiINTEL = 5929, - OpFixedCosPiINTEL = 5930, - OpFixedSinCosPiINTEL = 5931, - OpFixedLogINTEL = 5932, - OpFixedExpINTEL = 5933, OpPtrCastToCrossWorkgroupINTEL = 5934, OpCrossWorkgroupCastToPtrINTEL = 5938, OpReadPipeBlockingINTEL = 5946, @@ -2201,12 +2069,6 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) { case OpConvertUToAccelerationStructureKHR: *hasResult = true; *hasResultType = true; break; case OpIgnoreIntersectionKHR: *hasResult = false; *hasResultType = false; break; case OpTerminateRayKHR: *hasResult = false; *hasResultType = false; break; - case OpSDot: *hasResult = true; *hasResultType = true; break; - case OpUDot: *hasResult = true; *hasResultType = true; break; - case OpSUDot: *hasResult = true; *hasResultType = true; break; - case OpSDotAccSat: *hasResult = true; *hasResultType = true; break; - case OpUDotAccSat: *hasResult = true; *hasResultType = true; break; - case OpSUDotAccSat: *hasResult = true; *hasResultType = true; break; case OpTypeRayQueryKHR: *hasResult = true; *hasResultType = false; break; case OpRayQueryInitializeKHR: *hasResult = false; *hasResultType = false; break; case OpRayQueryTerminateKHR: *hasResult = false; *hasResultType = false; break; @@ -2243,15 +2105,8 @@ 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 OpDemoteToHelperInvocation: *hasResult = false; *hasResultType = false; break; + case OpDemoteToHelperInvocationEXT: *hasResult = false; *hasResultType = false; break; case OpIsHelperInvocationEXT: *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; - case OpConvertSamplerToUNV: *hasResult = true; *hasResultType = true; break; - case OpConvertUToSampledImageNV: *hasResult = true; *hasResultType = true; break; - case OpConvertSampledImageToUNV: *hasResult = true; *hasResultType = true; break; - case OpSamplerImageAddressingModeNV: *hasResult = false; *hasResultType = false; break; case OpSubgroupShuffleINTEL: *hasResult = true; *hasResultType = true; break; case OpSubgroupShuffleDownINTEL: *hasResult = true; *hasResultType = true; break; case OpSubgroupShuffleUpINTEL: *hasResult = true; *hasResultType = true; break; @@ -2276,7 +2131,7 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) { case OpUSubSatINTEL: *hasResult = true; *hasResultType = true; break; case OpIMul32x16INTEL: *hasResult = true; *hasResultType = true; break; case OpUMul32x16INTEL: *hasResult = true; *hasResultType = true; break; - case OpConstantFunctionPointerINTEL: *hasResult = true; *hasResultType = true; break; + case OpConstFunctionPointerINTEL: *hasResult = true; *hasResultType = true; break; case OpFunctionPointerCallINTEL: *hasResult = true; *hasResultType = true; break; case OpAsmTargetINTEL: *hasResult = true; *hasResultType = true; break; case OpAsmINTEL: *hasResult = true; *hasResultType = true; break; @@ -2408,59 +2263,7 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) { case OpVariableLengthArrayINTEL: *hasResult = true; *hasResultType = true; break; case OpSaveMemoryINTEL: *hasResult = true; *hasResultType = true; break; case OpRestoreMemoryINTEL: *hasResult = false; *hasResultType = false; break; - case OpArbitraryFloatSinCosPiINTEL: *hasResult = true; *hasResultType = true; break; - case OpArbitraryFloatCastINTEL: *hasResult = true; *hasResultType = true; break; - case OpArbitraryFloatCastFromIntINTEL: *hasResult = true; *hasResultType = true; break; - case OpArbitraryFloatCastToIntINTEL: *hasResult = true; *hasResultType = true; break; - case OpArbitraryFloatAddINTEL: *hasResult = true; *hasResultType = true; break; - case OpArbitraryFloatSubINTEL: *hasResult = true; *hasResultType = true; break; - case OpArbitraryFloatMulINTEL: *hasResult = true; *hasResultType = true; break; - case OpArbitraryFloatDivINTEL: *hasResult = true; *hasResultType = true; break; - case OpArbitraryFloatGTINTEL: *hasResult = true; *hasResultType = true; break; - case OpArbitraryFloatGEINTEL: *hasResult = true; *hasResultType = true; break; - case OpArbitraryFloatLTINTEL: *hasResult = true; *hasResultType = true; break; - case OpArbitraryFloatLEINTEL: *hasResult = true; *hasResultType = true; break; - case OpArbitraryFloatEQINTEL: *hasResult = true; *hasResultType = true; break; - case OpArbitraryFloatRecipINTEL: *hasResult = true; *hasResultType = true; break; - case OpArbitraryFloatRSqrtINTEL: *hasResult = true; *hasResultType = true; break; - case OpArbitraryFloatCbrtINTEL: *hasResult = true; *hasResultType = true; break; - case OpArbitraryFloatHypotINTEL: *hasResult = true; *hasResultType = true; break; - case OpArbitraryFloatSqrtINTEL: *hasResult = true; *hasResultType = true; break; - case OpArbitraryFloatLogINTEL: *hasResult = true; *hasResultType = true; break; - case OpArbitraryFloatLog2INTEL: *hasResult = true; *hasResultType = true; break; - case OpArbitraryFloatLog10INTEL: *hasResult = true; *hasResultType = true; break; - case OpArbitraryFloatLog1pINTEL: *hasResult = true; *hasResultType = true; break; - case OpArbitraryFloatExpINTEL: *hasResult = true; *hasResultType = true; break; - case OpArbitraryFloatExp2INTEL: *hasResult = true; *hasResultType = true; break; - case OpArbitraryFloatExp10INTEL: *hasResult = true; *hasResultType = true; break; - case OpArbitraryFloatExpm1INTEL: *hasResult = true; *hasResultType = true; break; - case OpArbitraryFloatSinINTEL: *hasResult = true; *hasResultType = true; break; - case OpArbitraryFloatCosINTEL: *hasResult = true; *hasResultType = true; break; - case OpArbitraryFloatSinCosINTEL: *hasResult = true; *hasResultType = true; break; - case OpArbitraryFloatSinPiINTEL: *hasResult = true; *hasResultType = true; break; - case OpArbitraryFloatCosPiINTEL: *hasResult = true; *hasResultType = true; break; - case OpArbitraryFloatASinINTEL: *hasResult = true; *hasResultType = true; break; - case OpArbitraryFloatASinPiINTEL: *hasResult = true; *hasResultType = true; break; - case OpArbitraryFloatACosINTEL: *hasResult = true; *hasResultType = true; break; - case OpArbitraryFloatACosPiINTEL: *hasResult = true; *hasResultType = true; break; - case OpArbitraryFloatATanINTEL: *hasResult = true; *hasResultType = true; break; - case OpArbitraryFloatATanPiINTEL: *hasResult = true; *hasResultType = true; break; - case OpArbitraryFloatATan2INTEL: *hasResult = true; *hasResultType = true; break; - case OpArbitraryFloatPowINTEL: *hasResult = true; *hasResultType = true; break; - case OpArbitraryFloatPowRINTEL: *hasResult = true; *hasResultType = true; break; - case OpArbitraryFloatPowNINTEL: *hasResult = true; *hasResultType = true; break; case OpLoopControlINTEL: *hasResult = false; *hasResultType = false; break; - case OpFixedSqrtINTEL: *hasResult = true; *hasResultType = true; break; - case OpFixedRecipINTEL: *hasResult = true; *hasResultType = true; break; - case OpFixedRsqrtINTEL: *hasResult = true; *hasResultType = true; break; - case OpFixedSinINTEL: *hasResult = true; *hasResultType = true; break; - case OpFixedCosINTEL: *hasResult = true; *hasResultType = true; break; - case OpFixedSinCosINTEL: *hasResult = true; *hasResultType = true; break; - case OpFixedSinPiINTEL: *hasResult = true; *hasResultType = true; break; - case OpFixedCosPiINTEL: *hasResult = true; *hasResultType = true; break; - case OpFixedSinCosPiINTEL: *hasResult = true; *hasResultType = true; break; - case OpFixedLogINTEL: *hasResult = true; *hasResultType = true; break; - case OpFixedExpINTEL: *hasResult = true; *hasResultType = true; break; case OpPtrCastToCrossWorkgroupINTEL: *hasResult = true; *hasResultType = true; break; case OpCrossWorkgroupCastToPtrINTEL: *hasResult = true; *hasResultType = true; break; case OpReadPipeBlockingINTEL: *hasResult = true; *hasResultType = true; break; diff --git a/libraries/glslang/spirv/spvIR.h b/libraries/ZVulkan/src/glslang/spirv/spvIR.h similarity index 94% rename from libraries/glslang/spirv/spvIR.h rename to libraries/ZVulkan/src/glslang/spirv/spvIR.h index 57e7d378b9..486e80d000 100644 --- a/libraries/glslang/spirv/spvIR.h +++ b/libraries/ZVulkan/src/glslang/spirv/spvIR.h @@ -111,23 +111,27 @@ public: void addStringOperand(const char* str) { - unsigned int word = 0; - unsigned int shiftAmount = 0; + unsigned int word; + char* wordString = (char*)&word; + char* wordPtr = wordString; + int charCount = 0; char c; - do { c = *(str++); - word |= ((unsigned int)c) << shiftAmount; - shiftAmount += 8; - if (shiftAmount == 32) { + *(wordPtr++) = c; + ++charCount; + if (charCount == 4) { addImmediateOperand(word); - word = 0; - shiftAmount = 0; + wordPtr = wordString; + charCount = 0; } } while (c != 0); // deal with partial last word - if (shiftAmount > 0) { + if (charCount > 0) { + // pad with 0s + for (; charCount < 4; ++charCount) + *(wordPtr++) = 0; addImmediateOperand(word); } } @@ -357,14 +361,6 @@ public: Decoration getReturnPrecision() const { return reducedPrecisionReturn ? DecorationRelaxedPrecision : NoPrecision; } - void setDebugLineInfo(Id fileName, int line, int column) { - lineInstruction = std::unique_ptr{new Instruction(OpLine)}; - lineInstruction->addIdOperand(fileName); - lineInstruction->addImmediateOperand(line); - lineInstruction->addImmediateOperand(column); - } - bool hasDebugLineInfo() const { return lineInstruction != nullptr; } - void setImplicitThis() { implicitThis = true; } bool hasImplicitThis() const { return implicitThis; } @@ -381,11 +377,6 @@ public: void dump(std::vector& out) const { - // OpLine - if (lineInstruction != nullptr) { - lineInstruction->dump(out); - } - // OpFunction functionInstruction.dump(out); @@ -404,7 +395,6 @@ protected: Function& operator=(Function&); Module& parent; - std::unique_ptr lineInstruction; Instruction functionInstruction; std::vector parameterInstructions; std::vector blocks; @@ -471,8 +461,7 @@ protected: // - the OpFunction instruction // - all the OpFunctionParameter instructions __inline Function::Function(Id id, Id resultType, Id functionType, Id firstParamId, Module& parent) - : parent(parent), lineInstruction(nullptr), - functionInstruction(id, resultType, OpFunction), implicitThis(false), + : parent(parent), functionInstruction(id, resultType, OpFunction), implicitThis(false), reducedPrecisionReturn(false) { // OpFunction diff --git a/src/common/rendering/vulkan/thirdparty/vk_mem_alloc/vk_mem_alloc.cpp b/libraries/ZVulkan/src/vk_mem_alloc/vk_mem_alloc.cpp similarity index 77% rename from src/common/rendering/vulkan/thirdparty/vk_mem_alloc/vk_mem_alloc.cpp rename to libraries/ZVulkan/src/vk_mem_alloc/vk_mem_alloc.cpp index ee988cfc45..fb0d234729 100644 --- a/src/common/rendering/vulkan/thirdparty/vk_mem_alloc/vk_mem_alloc.cpp +++ b/libraries/ZVulkan/src/vk_mem_alloc/vk_mem_alloc.cpp @@ -5,4 +5,4 @@ #define VMA_NULLABLE #define VMA_NOT_NULL -#include "vk_mem_alloc.h" +#include "vk_mem_alloc/vk_mem_alloc.h" diff --git a/src/common/rendering/vulkan/thirdparty/vk_mem_alloc/vk_mem_alloc.natvis b/libraries/ZVulkan/src/vk_mem_alloc/vk_mem_alloc.natvis similarity index 100% rename from src/common/rendering/vulkan/thirdparty/vk_mem_alloc/vk_mem_alloc.natvis rename to libraries/ZVulkan/src/vk_mem_alloc/vk_mem_alloc.natvis diff --git a/src/common/rendering/vulkan/thirdparty/volk/volk.c b/libraries/ZVulkan/src/volk/volk.c similarity index 99% rename from src/common/rendering/vulkan/thirdparty/volk/volk.c rename to libraries/ZVulkan/src/volk/volk.c index 0604655b06..7a6969b10d 100644 --- a/src/common/rendering/vulkan/thirdparty/volk/volk.c +++ b/libraries/ZVulkan/src/volk/volk.c @@ -1,16 +1,16 @@ -#ifdef _WIN32 -#define VK_USE_PLATFORM_WIN32_KHR -#endif -#ifdef __APPLE__ +#if defined(_WIN32) +#define VK_USE_PLATFORM_WIN32_KHR +#elif defined(__APPLE__) #define VK_USE_PLATFORM_MACOS_MVK #define VK_USE_PLATFORM_METAL_EXT +#else +#define VK_USE_PLATFORM_XLIB_KHR #endif - /* This file is part of volk library; see volk.h for version/license details */ /* clang-format off */ -#include "volk.h" +#include "volk/volk.h" #ifdef _WIN32 typedef const char* LPCSTR; diff --git a/src/common/rendering/vulkan/system/vk_builders.cpp b/libraries/ZVulkan/src/vulkanbuilders.cpp similarity index 78% rename from src/common/rendering/vulkan/system/vk_builders.cpp rename to libraries/ZVulkan/src/vulkanbuilders.cpp index aff0de50a9..4299937a3c 100644 --- a/src/common/rendering/vulkan/system/vk_builders.cpp +++ b/libraries/ZVulkan/src/vulkanbuilders.cpp @@ -1,30 +1,10 @@ -/* -** Vulkan backend -** Copyright (c) 2016-2020 Magnus Norddahl -** -** This software is provided 'as-is', without any express or implied -** warranty. In no event will the authors be held liable for any damages -** arising from the use of this software. -** -** Permission is granted to anyone to use this software for any purpose, -** including commercial applications, and to alter it and redistribute it -** freely, subject to the following restrictions: -** -** 1. The origin of this software must not be misrepresented; you must not -** claim that you wrote the original software. If you use this software -** in a product, an acknowledgment in the product documentation would be -** appreciated but is not required. -** 2. Altered source versions must be plainly marked as such, and must not be -** misrepresented as being the original software. -** 3. This notice may not be removed or altered from any source distribution. -** -*/ -#include "vk_builders.h" -#include "engineerrors.h" -#include "renderstyle.h" -#include -#include +#include "vulkanbuilders.h" +#include "vulkansurface.h" +#include "vulkancompatibledevice.h" +#include "vulkanswapchain.h" +#include "glslang/glslang/Public/ShaderLang.h" +#include "glslang/spirv/GlslangToSpv.h" static const TBuiltInResource DefaultTBuiltInResource = { /* .MaxLights = */ 32, @@ -134,18 +114,28 @@ static const TBuiltInResource DefaultTBuiltInResource = { } }; +void ShaderBuilder::Init() +{ + ShInitialize(); +} + +void ShaderBuilder::Deinit() +{ + ShFinalize(); +} + ShaderBuilder::ShaderBuilder() { } -ShaderBuilder& ShaderBuilder::VertexShader(const FString &c) +ShaderBuilder& ShaderBuilder::VertexShader(const std::string& c) { code = c; stage = EShLanguage::EShLangVertex; return *this; } -ShaderBuilder& ShaderBuilder::FragmentShader(const FString &c) +ShaderBuilder& ShaderBuilder::FragmentShader(const std::string& c) { code = c; stage = EShLanguage::EShLangFragment; @@ -155,14 +145,14 @@ ShaderBuilder& ShaderBuilder::FragmentShader(const FString &c) std::unique_ptr ShaderBuilder::Create(const char *shadername, VulkanDevice *device) { EShLanguage stage = (EShLanguage)this->stage; - const char *sources[] = { code.GetChars() }; + const char *sources[] = { code.c_str() }; TBuiltInResource resources = DefaultTBuiltInResource; glslang::TShader shader(stage); shader.setStrings(sources, 1); shader.setEnvInput(glslang::EShSourceGlsl, stage, glslang::EShClientVulkan, 100); - if (device->ApiVersion >= VK_API_VERSION_1_2) + if (device->Instance->ApiVersion >= VK_API_VERSION_1_2) { shader.setEnvClient(glslang::EShClientVulkan, glslang::EShTargetVulkan_1_2); shader.setEnvTarget(glslang::EShTargetSpv, glslang::EShTargetSpv_1_4); @@ -175,7 +165,7 @@ std::unique_ptr ShaderBuilder::Create(const char *shadername, Vulk bool compileSuccess = shader.parse(&resources, 110, false, EShMsgVulkanRules); if (!compileSuccess) { - I_FatalError("Shader '%s' could not be compiled:\n%s\n", shadername, shader.getInfoLog()); + throw std::runtime_error(std::string("Shader compile failed: ") + shader.getInfoLog()); } glslang::TProgram program; @@ -183,13 +173,13 @@ std::unique_ptr ShaderBuilder::Create(const char *shadername, Vulk bool linkSuccess = program.link(EShMsgDefault); if (!linkSuccess) { - I_FatalError("Shader '%s' could not be linked:\n%s\n", shadername, program.getInfoLog()); + throw std::runtime_error(std::string("Shader link failed: ") + program.getInfoLog()); } glslang::TIntermediate *intermediate = program.getIntermediate(stage); if (!intermediate) { - I_FatalError("Internal shader compiler error while processing '%s'\n", shadername); + throw std::runtime_error("Internal shader compiler error"); } glslang::SpvOptions spvOptions; @@ -209,11 +199,7 @@ std::unique_ptr ShaderBuilder::Create(const char *shadername, Vulk VkShaderModule shaderModule; VkResult result = vkCreateShaderModule(device->device, &createInfo, nullptr, &shaderModule); if (result != VK_SUCCESS) - { - FString msg; - msg.Format("Could not create vulkan shader module for '%s': %s", shadername, VkResultToString(result).GetChars()); - VulkanError(msg.GetChars()); - } + throw std::runtime_error("Could not create vulkan shader module"); auto obj = std::make_unique(device, shaderModule); if (debugName) @@ -223,44 +209,50 @@ std::unique_ptr ShaderBuilder::Create(const char *shadername, Vulk ///////////////////////////////////////////////////////////////////////////// -GraphicsPipelineBuilder& GraphicsPipelineBuilder::BlendMode(const FRenderStyle &style) +CommandPoolBuilder::CommandPoolBuilder() { - // Just in case Vulkan doesn't do this optimization itself - if (style.BlendOp == STYLEOP_Add && style.SrcAlpha == STYLEALPHA_One && style.DestAlpha == STYLEALPHA_Zero && style.Flags == 0) - { - colorBlendAttachment.blendEnable = VK_FALSE; - return *this; - } +} - static const int blendstyles[] = { - VK_BLEND_FACTOR_ZERO, - VK_BLEND_FACTOR_ONE, - VK_BLEND_FACTOR_SRC_ALPHA, - VK_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA, - VK_BLEND_FACTOR_SRC_COLOR, - VK_BLEND_FACTOR_ONE_MINUS_SRC_COLOR, - VK_BLEND_FACTOR_DST_COLOR, - VK_BLEND_FACTOR_ONE_MINUS_DST_COLOR, - VK_BLEND_FACTOR_DST_ALPHA, - VK_BLEND_FACTOR_ONE_MINUS_DST_ALPHA, - }; +CommandPoolBuilder& CommandPoolBuilder::QueueFamily(int index) +{ + queueFamilyIndex = index; + return *this; +} - static const int renderops[] = { - 0, VK_BLEND_OP_ADD, VK_BLEND_OP_SUBTRACT, VK_BLEND_OP_REVERSE_SUBTRACT, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 - }; +std::unique_ptr CommandPoolBuilder::Create(VulkanDevice* device) +{ + auto obj = std::make_unique(device, queueFamilyIndex != -1 ? queueFamilyIndex : device->GraphicsFamily); + if (debugName) + obj->SetDebugName(debugName); + return obj; +} - int srcblend = blendstyles[style.SrcAlpha%STYLEALPHA_MAX]; - int dstblend = blendstyles[style.DestAlpha%STYLEALPHA_MAX]; - int blendequation = renderops[style.BlendOp & 15]; +///////////////////////////////////////////////////////////////////////////// - if (blendequation == -1) // This was a fuzz style. - { - srcblend = VK_BLEND_FACTOR_DST_COLOR; - dstblend = VK_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA; - blendequation = VK_BLEND_OP_ADD; - } +SemaphoreBuilder::SemaphoreBuilder() +{ +} - return BlendMode((VkBlendOp)blendequation, (VkBlendFactor)srcblend, (VkBlendFactor)dstblend); +std::unique_ptr SemaphoreBuilder::Create(VulkanDevice* device) +{ + auto obj = std::make_unique(device); + if (debugName) + obj->SetDebugName(debugName); + return obj; +} + +///////////////////////////////////////////////////////////////////////////// + +FenceBuilder::FenceBuilder() +{ +} + +std::unique_ptr FenceBuilder::Create(VulkanDevice* device) +{ + auto obj = std::make_unique(device); + if (debugName) + obj->SetDebugName(debugName); + return obj; } ///////////////////////////////////////////////////////////////////////////// @@ -482,6 +474,12 @@ SamplerBuilder& SamplerBuilder::Anisotropy(float maxAnisotropy) return *this; } +SamplerBuilder& SamplerBuilder::MipLodBias(float bias) +{ + samplerInfo.mipLodBias = bias; + return *this; +} + SamplerBuilder& SamplerBuilder::MaxLod(float value) { samplerInfo.maxLod = value; @@ -509,7 +507,7 @@ BufferBuilder::BufferBuilder() BufferBuilder& BufferBuilder::Size(size_t size) { - bufferInfo.size = max(size, (size_t)16); + bufferInfo.size = std::max(size, (size_t)16); return *this; } @@ -621,10 +619,15 @@ std::unique_ptr ComputePipelineBuilder::Create(VulkanDevice* dev DescriptorSetLayoutBuilder::DescriptorSetLayoutBuilder() { - layoutInfo.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO; } -DescriptorSetLayoutBuilder& DescriptorSetLayoutBuilder::AddBinding(int index, VkDescriptorType type, int arrayCount, VkShaderStageFlags stageFlags) +DescriptorSetLayoutBuilder& DescriptorSetLayoutBuilder::Flags(VkDescriptorSetLayoutCreateFlags flags) +{ + layoutInfo.flags = flags; + return *this; +} + +DescriptorSetLayoutBuilder& DescriptorSetLayoutBuilder::AddBinding(int index, VkDescriptorType type, int arrayCount, VkShaderStageFlags stageFlags, VkDescriptorBindingFlags flags) { VkDescriptorSetLayoutBinding binding = { }; binding.binding = index; @@ -632,10 +635,18 @@ DescriptorSetLayoutBuilder& DescriptorSetLayoutBuilder::AddBinding(int index, Vk binding.descriptorCount = arrayCount; binding.stageFlags = stageFlags; binding.pImmutableSamplers = nullptr; - bindings.Push(binding); + bindings.push_back(binding); + bindingFlags.push_back(flags); + + layoutInfo.bindingCount = (uint32_t)bindings.size(); + layoutInfo.pBindings = bindings.data(); + + bindingFlagsInfo.bindingCount = (uint32_t)bindings.size(); + bindingFlagsInfo.pBindingFlags = bindingFlags.data(); + + if (flags != 0) + layoutInfo.pNext = &bindingFlagsInfo; - layoutInfo.bindingCount = (uint32_t)bindings.Size(); - layoutInfo.pBindings = &bindings[0]; return *this; } @@ -659,6 +670,12 @@ DescriptorPoolBuilder::DescriptorPoolBuilder() poolInfo.flags = VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT; } +DescriptorPoolBuilder& DescriptorPoolBuilder::Flags(VkDescriptorPoolCreateFlags flags) +{ + poolInfo.flags = flags | VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT; + return *this; +} + DescriptorPoolBuilder& DescriptorPoolBuilder::MaxSets(int value) { poolInfo.maxSets = value; @@ -792,6 +809,10 @@ GraphicsPipelineBuilder::GraphicsPipelineBuilder() inputAssembly.primitiveRestartEnable = VK_FALSE; viewportState.sType = VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO; + viewportState.viewportCount = 1; + viewportState.pViewports = &viewport; + viewportState.scissorCount = 1; + viewportState.pScissors = &scissor; depthStencil.sType = VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO; depthStencil.depthCompareOp = VK_COMPARE_OP_LESS_OR_EQUAL; @@ -882,9 +903,6 @@ GraphicsPipelineBuilder& GraphicsPipelineBuilder::Viewport(float x, float y, flo viewport.height = height; viewport.minDepth = minDepth; viewport.maxDepth = maxDepth; - - viewportState.viewportCount = 1; - viewportState.pViewports = &viewport; return *this; } @@ -894,9 +912,6 @@ GraphicsPipelineBuilder& GraphicsPipelineBuilder::Scissor(int x, int y, int widt scissor.offset.y = y; scissor.extent.width = width; scissor.extent.height = height; - - viewportState.scissorCount = 1; - viewportState.pScissors = &scissor; return *this; } @@ -1357,7 +1372,7 @@ QueueSubmit& QueueSubmit::AddSignal(VulkanSemaphore* semaphore) void QueueSubmit::Execute(VulkanDevice* device, VkQueue queue, VulkanFence* fence) { - VkResult result = vkQueueSubmit(device->graphicsQueue, 1, &submitInfo, fence ? fence->fence : VK_NULL_HANDLE); + VkResult result = vkQueueSubmit(device->GraphicsQueue, 1, &submitInfo, fence ? fence->fence : VK_NULL_HANDLE); CheckVulkanError(result, "Could not submit command buffer"); } @@ -1414,6 +1429,11 @@ WriteDescriptors& WriteDescriptors::AddStorageImage(VulkanDescriptorSet* descrip } WriteDescriptors& WriteDescriptors::AddCombinedImageSampler(VulkanDescriptorSet* descriptorSet, int binding, VulkanImageView* view, VulkanSampler* sampler, VkImageLayout imageLayout) +{ + return AddCombinedImageSampler(descriptorSet, binding, 0, view, sampler, imageLayout); +} + +WriteDescriptors& WriteDescriptors::AddCombinedImageSampler(VulkanDescriptorSet* descriptorSet, int binding, int arrayIndex, VulkanImageView* view, VulkanSampler* sampler, VkImageLayout imageLayout) { VkDescriptorImageInfo imageInfo = {}; imageInfo.imageView = view->view; @@ -1427,7 +1447,7 @@ WriteDescriptors& WriteDescriptors::AddCombinedImageSampler(VulkanDescriptorSet* descriptorWrite.sType = VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET; descriptorWrite.dstSet = descriptorSet->set; descriptorWrite.dstBinding = binding; - descriptorWrite.dstArrayElement = 0; + descriptorWrite.dstArrayElement = arrayIndex; descriptorWrite.descriptorType = VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER; descriptorWrite.descriptorCount = 1; descriptorWrite.pImageInfo = &extra->imageInfo; @@ -1459,5 +1479,284 @@ WriteDescriptors& WriteDescriptors::AddAccelerationStructure(VulkanDescriptorSet void WriteDescriptors::Execute(VulkanDevice* device) { - vkUpdateDescriptorSets(device->device, (uint32_t)writes.size(), writes.data(), 0, nullptr); + if (!writes.empty()) + vkUpdateDescriptorSets(device->device, (uint32_t)writes.size(), writes.data(), 0, nullptr); +} + +///////////////////////////////////////////////////////////////////////////// + +VulkanInstanceBuilder::VulkanInstanceBuilder() +{ + apiVersionsToTry = { VK_API_VERSION_1_2, VK_API_VERSION_1_1, VK_API_VERSION_1_0 }; + + OptionalExtension(VK_KHR_GET_SURFACE_CAPABILITIES_2_EXTENSION_NAME); + OptionalExtension(VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME); +} + +VulkanInstanceBuilder& VulkanInstanceBuilder::ApiVersionsToTry(const std::vector& versions) +{ + apiVersionsToTry = versions; + return *this; +} + +VulkanInstanceBuilder& VulkanInstanceBuilder::RequireExtension(const std::string& extensionName) +{ + requiredExtensions.insert(extensionName); + return *this; +} + +VulkanInstanceBuilder& VulkanInstanceBuilder::RequireSurfaceExtensions(bool enable) +{ + if (enable) + { + RequireExtension(VK_KHR_SURFACE_EXTENSION_NAME); + +#if defined(VK_USE_PLATFORM_WIN32_KHR) + RequireExtension(VK_KHR_WIN32_SURFACE_EXTENSION_NAME); +#elif defined(VK_USE_PLATFORM_MACOS_MVK) + RequireExtension(VK_MVK_MACOS_SURFACE_EXTENSION_NAME); +#elif defined(VK_USE_PLATFORM_XLIB_KHR) + RequireExtension(VK_KHR_XLIB_SURFACE_EXTENSION_NAME); +#endif + + OptionalExtension(VK_EXT_SWAPCHAIN_COLOR_SPACE_EXTENSION_NAME); // For HDR support + } + return *this; +} + +VulkanInstanceBuilder& VulkanInstanceBuilder::OptionalExtension(const std::string& extensionName) +{ + optionalExtensions.insert(extensionName); + return *this; +} + +VulkanInstanceBuilder& VulkanInstanceBuilder::DebugLayer(bool enable) +{ + debugLayer = enable; + return *this; +} + +std::shared_ptr VulkanInstanceBuilder::Create() +{ + return std::make_shared(apiVersionsToTry, requiredExtensions, optionalExtensions, debugLayer); +} + +///////////////////////////////////////////////////////////////////////////// + +VulkanSurfaceBuilder::VulkanSurfaceBuilder() +{ +} + +#ifdef VK_USE_PLATFORM_WIN32_KHR + +VulkanSurfaceBuilder& VulkanSurfaceBuilder::Win32Window(HWND hwnd) +{ + this->hwnd = hwnd; + return *this; +} + +#elif defined(VK_USE_PLATFORM_XLIB_KHR) + +VulkanSurfaceBuilder& VulkanSurfaceBuilder::X11Window(Display* disp, Window wind) +{ + this->disp = disp; + this->wind = wind; +} + +#endif + +std::shared_ptr VulkanSurfaceBuilder::Create(std::shared_ptr instance) +{ +#ifdef VK_USE_PLATFORM_WIN32_KHR + return std::make_shared(std::move(instance), hwnd); +#elif defined(VK_USE_PLATFORM_XLIB_KHR) + return std::make_shared(std::move(instance), disp, wind); +#else + return std::make_shared(std::move(instance)); +#endif +} + +///////////////////////////////////////////////////////////////////////////// + +VulkanDeviceBuilder::VulkanDeviceBuilder() +{ + OptionalExtension(VK_KHR_DEDICATED_ALLOCATION_EXTENSION_NAME); + OptionalExtension(VK_KHR_GET_MEMORY_REQUIREMENTS_2_EXTENSION_NAME); +} + +VulkanDeviceBuilder& VulkanDeviceBuilder::RequireExtension(const std::string& extensionName) +{ + requiredDeviceExtensions.insert(extensionName); + return *this; +} + +VulkanDeviceBuilder& VulkanDeviceBuilder::OptionalExtension(const std::string& extensionName) +{ + optionalDeviceExtensions.insert(extensionName); + return *this; +} + +VulkanDeviceBuilder& VulkanDeviceBuilder::OptionalRayQuery() +{ + OptionalExtension(VK_KHR_BUFFER_DEVICE_ADDRESS_EXTENSION_NAME); + OptionalExtension(VK_KHR_ACCELERATION_STRUCTURE_EXTENSION_NAME); + OptionalExtension(VK_KHR_DEFERRED_HOST_OPERATIONS_EXTENSION_NAME); + OptionalExtension(VK_KHR_RAY_QUERY_EXTENSION_NAME); + return *this; +} + +VulkanDeviceBuilder& VulkanDeviceBuilder::OptionalDescriptorIndexing() +{ + OptionalExtension(VK_EXT_DESCRIPTOR_INDEXING_EXTENSION_NAME); + return *this; +} + +VulkanDeviceBuilder& VulkanDeviceBuilder::Surface(std::shared_ptr surface) +{ + if (surface) + { + RequireExtension(VK_KHR_SWAPCHAIN_EXTENSION_NAME); +#if defined(VK_USE_PLATFORM_WIN32_KHR) + OptionalExtension(VK_EXT_FULL_SCREEN_EXCLUSIVE_EXTENSION_NAME); +#endif + } + this->surface = std::move(surface); + return *this; +} + +VulkanDeviceBuilder& VulkanDeviceBuilder::SelectDevice(int index) +{ + deviceIndex = index; + return *this; +} + +std::vector VulkanDeviceBuilder::FindDevices(const std::shared_ptr& instance) +{ + std::vector supportedDevices; + + for (size_t idx = 0; idx < instance->PhysicalDevices.size(); idx++) + { + const auto& info = instance->PhysicalDevices[idx]; + + // Check if all required extensions are there + std::set requiredExtensionSearch = requiredDeviceExtensions; + for (const auto& ext : info.Extensions) + requiredExtensionSearch.erase(ext.extensionName); + if (!requiredExtensionSearch.empty()) + continue; + + // Check if all required features are there + if (info.Features.Features.samplerAnisotropy != VK_TRUE || + info.Features.Features.fragmentStoresAndAtomics != VK_TRUE) + continue; + + VulkanCompatibleDevice dev; + dev.Device = &instance->PhysicalDevices[idx]; + dev.EnabledDeviceExtensions = requiredDeviceExtensions; + + // Enable optional extensions we are interested in, if they are available on this device + for (const auto& ext : dev.Device->Extensions) + { + if (optionalDeviceExtensions.find(ext.extensionName) != optionalDeviceExtensions.end()) + { + dev.EnabledDeviceExtensions.insert(ext.extensionName); + } + } + + // Enable optional features we are interested in, if they are available on this device + auto& enabledFeatures = dev.EnabledFeatures; + auto& deviceFeatures = dev.Device->Features; + enabledFeatures.Features.samplerAnisotropy = deviceFeatures.Features.samplerAnisotropy; + enabledFeatures.Features.fragmentStoresAndAtomics = deviceFeatures.Features.fragmentStoresAndAtomics; + enabledFeatures.Features.depthClamp = deviceFeatures.Features.depthClamp; + enabledFeatures.Features.shaderClipDistance = deviceFeatures.Features.shaderClipDistance; + enabledFeatures.BufferDeviceAddress.bufferDeviceAddress = deviceFeatures.BufferDeviceAddress.bufferDeviceAddress; + enabledFeatures.AccelerationStructure.accelerationStructure = deviceFeatures.AccelerationStructure.accelerationStructure; + enabledFeatures.RayQuery.rayQuery = deviceFeatures.RayQuery.rayQuery; + enabledFeatures.DescriptorIndexing.runtimeDescriptorArray = deviceFeatures.DescriptorIndexing.runtimeDescriptorArray; + enabledFeatures.DescriptorIndexing.descriptorBindingPartiallyBound = deviceFeatures.DescriptorIndexing.descriptorBindingPartiallyBound; + enabledFeatures.DescriptorIndexing.descriptorBindingSampledImageUpdateAfterBind = deviceFeatures.DescriptorIndexing.descriptorBindingSampledImageUpdateAfterBind; + enabledFeatures.DescriptorIndexing.descriptorBindingVariableDescriptorCount = deviceFeatures.DescriptorIndexing.descriptorBindingVariableDescriptorCount; + + // Figure out which queue can present + if (surface) + { + for (int i = 0; i < (int)info.QueueFamilies.size(); i++) + { + VkBool32 presentSupport = false; + VkResult result = vkGetPhysicalDeviceSurfaceSupportKHR(info.Device, i, surface->Surface, &presentSupport); + if (result == VK_SUCCESS && info.QueueFamilies[i].queueCount > 0 && presentSupport) + { + dev.PresentFamily = i; + break; + } + } + } + + // The vulkan spec states that graphics and compute queues can always do transfer. + // Furthermore the spec states that graphics queues always can do compute. + // Last, the spec makes it OPTIONAL whether the VK_QUEUE_TRANSFER_BIT is set for such queues, but they MUST support transfer. + // + // In short: pick the first graphics queue family for everything. + for (int i = 0; i < (int)info.QueueFamilies.size(); i++) + { + const auto& queueFamily = info.QueueFamilies[i]; + if (queueFamily.queueCount > 0 && (queueFamily.queueFlags & VK_QUEUE_GRAPHICS_BIT)) + { + dev.GraphicsFamily = i; + dev.GraphicsTimeQueries = queueFamily.timestampValidBits != 0; + break; + } + } + + // Only use device if we found the required graphics and present queues + if (dev.GraphicsFamily != -1 && (!surface || dev.PresentFamily != -1)) + { + supportedDevices.push_back(dev); + } + } + + // The device order returned by Vulkan can be anything. Prefer discrete > integrated > virtual gpu > cpu > other + auto sortFunc = [&](const auto& a, const auto b) + { + // Sort by GPU type first. This will ensure the "best" device is most likely to map to vk_device 0 + static const int typeSort[] = { 4, 1, 0, 2, 3 }; + int sortA = a.Device->Properties.deviceType < 5 ? typeSort[a.Device->Properties.deviceType] : (int)a.Device->Properties.deviceType; + int sortB = b.Device->Properties.deviceType < 5 ? typeSort[b.Device->Properties.deviceType] : (int)b.Device->Properties.deviceType; + if (sortA != sortB) + return sortA < sortB; + + // Then sort by the device's unique ID so that vk_device uses a consistent order + int sortUUID = memcmp(a.Device->Properties.pipelineCacheUUID, b.Device->Properties.pipelineCacheUUID, VK_UUID_SIZE); + return sortUUID < 0; + }; + std::stable_sort(supportedDevices.begin(), supportedDevices.end(), sortFunc); + + return supportedDevices; +} + +std::shared_ptr VulkanDeviceBuilder::Create(std::shared_ptr instance) +{ + if (instance->PhysicalDevices.empty()) + VulkanError("No Vulkan devices found. The graphics card may have no vulkan support or the driver may be too old."); + + std::vector supportedDevices = FindDevices(instance); + if (supportedDevices.empty()) + VulkanError("No Vulkan device found supports the minimum requirements of this application"); + + size_t selected = deviceIndex; + if (selected >= supportedDevices.size()) + selected = 0; + return std::make_shared(instance, surface, supportedDevices[selected]); +} + +///////////////////////////////////////////////////////////////////////////// + +VulkanSwapChainBuilder::VulkanSwapChainBuilder() +{ +} + +std::shared_ptr VulkanSwapChainBuilder::Create(VulkanDevice* device) +{ + return std::make_shared(device); } diff --git a/libraries/ZVulkan/src/vulkandevice.cpp b/libraries/ZVulkan/src/vulkandevice.cpp new file mode 100644 index 0000000000..2edd93d059 --- /dev/null +++ b/libraries/ZVulkan/src/vulkandevice.cpp @@ -0,0 +1,159 @@ + +#include "vulkandevice.h" +#include "vulkanobjects.h" +#include "vulkancompatibledevice.h" +#include +#include +#include + +VulkanDevice::VulkanDevice(std::shared_ptr instance, std::shared_ptr surface, const VulkanCompatibleDevice& selectedDevice) : Instance(instance), Surface(surface) +{ + PhysicalDevice = *selectedDevice.Device; + EnabledDeviceExtensions = selectedDevice.EnabledDeviceExtensions; + EnabledFeatures = selectedDevice.EnabledFeatures; + + GraphicsFamily = selectedDevice.GraphicsFamily; + PresentFamily = selectedDevice.PresentFamily; + GraphicsTimeQueries = selectedDevice.GraphicsTimeQueries; + + try + { + CreateDevice(); + CreateAllocator(); + } + catch (...) + { + ReleaseResources(); + throw; + } +} + +VulkanDevice::~VulkanDevice() +{ + ReleaseResources(); +} + +bool VulkanDevice::SupportsDeviceExtension(const char* ext) const +{ + return EnabledDeviceExtensions.find(ext) != EnabledDeviceExtensions.end(); +} + +void VulkanDevice::CreateAllocator() +{ + VmaAllocatorCreateInfo allocinfo = {}; + allocinfo.vulkanApiVersion = Instance->ApiVersion; + if (SupportsDeviceExtension(VK_KHR_DEDICATED_ALLOCATION_EXTENSION_NAME) && SupportsDeviceExtension(VK_KHR_GET_MEMORY_REQUIREMENTS_2_EXTENSION_NAME)) + allocinfo.flags |= VMA_ALLOCATOR_CREATE_KHR_DEDICATED_ALLOCATION_BIT; + if (SupportsDeviceExtension(VK_KHR_BUFFER_DEVICE_ADDRESS_EXTENSION_NAME)) + allocinfo.flags |= VMA_ALLOCATOR_CREATE_BUFFER_DEVICE_ADDRESS_BIT; + allocinfo.physicalDevice = PhysicalDevice.Device; + allocinfo.device = device; + allocinfo.instance = Instance->Instance; + allocinfo.preferredLargeHeapBlockSize = 64 * 1024 * 1024; + if (vmaCreateAllocator(&allocinfo, &allocator) != VK_SUCCESS) + VulkanError("Unable to create allocator"); +} + +void VulkanDevice::CreateDevice() +{ + float queuePriority = 1.0f; + std::vector queueCreateInfos; + + std::set neededFamilies; + if (GraphicsFamily != -1) + neededFamilies.insert(GraphicsFamily); + if (PresentFamily != -1) + neededFamilies.insert(PresentFamily); + + for (int index : neededFamilies) + { + VkDeviceQueueCreateInfo queueCreateInfo = {}; + queueCreateInfo.sType = VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO; + queueCreateInfo.queueFamilyIndex = index; + queueCreateInfo.queueCount = 1; + queueCreateInfo.pQueuePriorities = &queuePriority; + queueCreateInfos.push_back(queueCreateInfo); + } + + std::vector extensionNames; + extensionNames.reserve(EnabledDeviceExtensions.size()); + for (const auto& name : EnabledDeviceExtensions) + extensionNames.push_back(name.c_str()); + + VkDeviceCreateInfo deviceCreateInfo = { VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO }; + deviceCreateInfo.queueCreateInfoCount = (uint32_t)queueCreateInfos.size(); + deviceCreateInfo.pQueueCreateInfos = queueCreateInfos.data(); + deviceCreateInfo.enabledExtensionCount = (uint32_t)extensionNames.size(); + deviceCreateInfo.ppEnabledExtensionNames = extensionNames.data(); + deviceCreateInfo.enabledLayerCount = 0; + + VkPhysicalDeviceFeatures2 deviceFeatures2 = { VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2 }; + deviceFeatures2.features = EnabledFeatures.Features; + + void** next = const_cast(&deviceCreateInfo.pNext); + if (SupportsDeviceExtension(VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME)) + { + *next = &deviceFeatures2; + next = &deviceFeatures2.pNext; + } + else // vulkan 1.0 specified features in a different way + { + deviceCreateInfo.pEnabledFeatures = &deviceFeatures2.features; + } + + if (SupportsDeviceExtension(VK_KHR_BUFFER_DEVICE_ADDRESS_EXTENSION_NAME)) + { + *next = &EnabledFeatures.BufferDeviceAddress; + next = &EnabledFeatures.BufferDeviceAddress.pNext; + } + if (SupportsDeviceExtension(VK_KHR_ACCELERATION_STRUCTURE_EXTENSION_NAME)) + { + *next = &EnabledFeatures.AccelerationStructure; + next = &EnabledFeatures.AccelerationStructure.pNext; + } + if (SupportsDeviceExtension(VK_KHR_RAY_QUERY_EXTENSION_NAME)) + { + *next = &EnabledFeatures.RayQuery; + next = &EnabledFeatures.RayQuery.pNext; + } + if (SupportsDeviceExtension(VK_EXT_DESCRIPTOR_INDEXING_EXTENSION_NAME)) + { + *next = &EnabledFeatures.DescriptorIndexing; + next = &EnabledFeatures.DescriptorIndexing.pNext; + } + + VkResult result = vkCreateDevice(PhysicalDevice.Device, &deviceCreateInfo, nullptr, &device); + CheckVulkanError(result, "Could not create vulkan device"); + + volkLoadDevice(device); + + if (GraphicsFamily != -1) + vkGetDeviceQueue(device, GraphicsFamily, 0, &GraphicsQueue); + if (PresentFamily != -1) + vkGetDeviceQueue(device, PresentFamily, 0, &PresentQueue); +} + +void VulkanDevice::ReleaseResources() +{ + if (device) + vkDeviceWaitIdle(device); + + if (allocator) + vmaDestroyAllocator(allocator); + + if (device) + vkDestroyDevice(device, nullptr); + device = nullptr; +} + +void VulkanDevice::SetObjectName(const char* name, uint64_t handle, VkObjectType type) +{ + if (!DebugLayerActive) return; + + VkDebugUtilsObjectNameInfoEXT info = {}; + info.sType = VK_STRUCTURE_TYPE_DEBUG_UTILS_OBJECT_NAME_INFO_EXT; + info.objectHandle = handle; + info.objectType = type; + info.pObjectName = name; + vkSetDebugUtilsObjectNameEXT(device, &info); +} diff --git a/libraries/ZVulkan/src/vulkaninstance.cpp b/libraries/ZVulkan/src/vulkaninstance.cpp new file mode 100644 index 0000000000..7d41a9e6a4 --- /dev/null +++ b/libraries/ZVulkan/src/vulkaninstance.cpp @@ -0,0 +1,387 @@ + +#include "vulkaninstance.h" +#include "vulkanbuilders.h" +#include +#include +#include +#include + +VulkanInstance::VulkanInstance(std::vector apiVersionsToTry, std::set requiredExtensions, std::set optionalExtensions, bool wantDebugLayer) + : ApiVersionsToTry(std::move(apiVersionsToTry)), RequiredExtensions(std::move(requiredExtensions)), OptionalExtensions(std::move(optionalExtensions)), WantDebugLayer(wantDebugLayer) +{ + try + { + ShaderBuilder::Init(); + InitVolk(); + CreateInstance(); + } + catch (...) + { + ReleaseResources(); + throw; + } +} + +VulkanInstance::~VulkanInstance() +{ + ReleaseResources(); +} + +void VulkanInstance::ReleaseResources() +{ + if (debugMessenger) + vkDestroyDebugUtilsMessengerEXT(Instance, debugMessenger, nullptr); + debugMessenger = VK_NULL_HANDLE; + + if (Instance) + vkDestroyInstance(Instance, nullptr); + Instance = nullptr; +} + +void VulkanInstance::InitVolk() +{ + if (volkInitialize() != VK_SUCCESS) + { + VulkanError("Unable to find Vulkan"); + } + auto iver = volkGetInstanceVersion(); + if (iver == 0) + { + VulkanError("Vulkan not supported"); + } +} + +void VulkanInstance::CreateInstance() +{ + AvailableLayers = GetAvailableLayers(); + AvailableExtensions = GetExtensions(); + EnabledExtensions = RequiredExtensions; + + std::string debugLayer = "VK_LAYER_KHRONOS_validation"; + bool debugLayerFound = false; + if (WantDebugLayer) + { + for (const VkLayerProperties& layer : AvailableLayers) + { + if (layer.layerName == debugLayer) + { + EnabledValidationLayers.insert(layer.layerName); + EnabledExtensions.insert(VK_EXT_DEBUG_UTILS_EXTENSION_NAME); + debugLayerFound = true; + break; + } + } + } + + // Enable optional instance extensions we are interested in + for (const auto& ext : AvailableExtensions) + { + if (OptionalExtensions.find(ext.extensionName) != OptionalExtensions.end()) + { + EnabledExtensions.insert(ext.extensionName); + } + } + + std::vector enabledValidationLayersCStr; + for (const std::string& layer : EnabledValidationLayers) + enabledValidationLayersCStr.push_back(layer.c_str()); + + std::vector enabledExtensionsCStr; + for (const std::string& ext : EnabledExtensions) + enabledExtensionsCStr.push_back(ext.c_str()); + + // Try get the highest vulkan version we can get + VkResult result = VK_ERROR_INITIALIZATION_FAILED; + for (uint32_t apiVersion : ApiVersionsToTry) + { + VkApplicationInfo appInfo = {}; + appInfo.sType = VK_STRUCTURE_TYPE_APPLICATION_INFO; + appInfo.pApplicationName = "VulkanDrv"; + appInfo.applicationVersion = VK_MAKE_VERSION(1, 0, 0); + appInfo.pEngineName = "VulkanDrv"; + appInfo.engineVersion = VK_MAKE_VERSION(1, 0, 0); + appInfo.apiVersion = apiVersion; + + VkInstanceCreateInfo createInfo = {}; + createInfo.sType = VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO; + createInfo.pApplicationInfo = &appInfo; + createInfo.enabledExtensionCount = (uint32_t)EnabledExtensions.size(); + createInfo.enabledLayerCount = (uint32_t)enabledValidationLayersCStr.size(); + createInfo.ppEnabledLayerNames = enabledValidationLayersCStr.data(); + createInfo.ppEnabledExtensionNames = enabledExtensionsCStr.data(); + + result = vkCreateInstance(&createInfo, nullptr, &Instance); + if (result >= VK_SUCCESS) + { + ApiVersion = apiVersion; + break; + } + } + CheckVulkanError(result, "Could not create vulkan instance"); + + volkLoadInstance(Instance); + + if (debugLayerFound) + { + VkDebugUtilsMessengerCreateInfoEXT dbgCreateInfo = {}; + dbgCreateInfo.sType = VK_STRUCTURE_TYPE_DEBUG_UTILS_MESSENGER_CREATE_INFO_EXT; + dbgCreateInfo.messageSeverity = + VK_DEBUG_UTILS_MESSAGE_SEVERITY_WARNING_BIT_EXT | + VK_DEBUG_UTILS_MESSAGE_SEVERITY_ERROR_BIT_EXT; + dbgCreateInfo.messageType = + VK_DEBUG_UTILS_MESSAGE_TYPE_GENERAL_BIT_EXT | + VK_DEBUG_UTILS_MESSAGE_TYPE_VALIDATION_BIT_EXT | + VK_DEBUG_UTILS_MESSAGE_TYPE_PERFORMANCE_BIT_EXT; + dbgCreateInfo.pfnUserCallback = DebugCallback; + dbgCreateInfo.pUserData = this; + result = vkCreateDebugUtilsMessengerEXT(Instance, &dbgCreateInfo, nullptr, &debugMessenger); + CheckVulkanError(result, "vkCreateDebugUtilsMessengerEXT failed"); + + DebugLayerActive = true; + } + + PhysicalDevices = GetPhysicalDevices(Instance, ApiVersion); +} + +std::vector VulkanInstance::GetPhysicalDevices(VkInstance instance, uint32_t apiVersion) +{ + uint32_t deviceCount = 0; + VkResult result = vkEnumeratePhysicalDevices(instance, &deviceCount, nullptr); + if (result == VK_ERROR_INITIALIZATION_FAILED) // Some drivers return this when a card does not support vulkan + return {}; + CheckVulkanError(result, "vkEnumeratePhysicalDevices failed"); + if (deviceCount == 0) + return {}; + + std::vector devices(deviceCount); + result = vkEnumeratePhysicalDevices(instance, &deviceCount, devices.data()); + CheckVulkanError(result, "vkEnumeratePhysicalDevices failed (2)"); + + std::vector devinfo(deviceCount); + for (size_t i = 0; i < devices.size(); i++) + { + auto& dev = devinfo[i]; + dev.Device = devices[i]; + + vkGetPhysicalDeviceMemoryProperties(dev.Device, &dev.MemoryProperties); + vkGetPhysicalDeviceProperties(dev.Device, &dev.Properties); + + uint32_t queueFamilyCount = 0; + vkGetPhysicalDeviceQueueFamilyProperties(dev.Device, &queueFamilyCount, nullptr); + dev.QueueFamilies.resize(queueFamilyCount); + vkGetPhysicalDeviceQueueFamilyProperties(dev.Device, &queueFamilyCount, dev.QueueFamilies.data()); + + uint32_t deviceExtensionCount = 0; + vkEnumerateDeviceExtensionProperties(dev.Device, nullptr, &deviceExtensionCount, nullptr); + dev.Extensions.resize(deviceExtensionCount); + vkEnumerateDeviceExtensionProperties(dev.Device, nullptr, &deviceExtensionCount, dev.Extensions.data()); + + auto checkForExtension = [&](const char* name) + { + for (const auto& ext : dev.Extensions) + { + if (strcmp(ext.extensionName, name) == 0) + return true; + } + return false; + }; + + if (apiVersion != VK_API_VERSION_1_0) + { + VkPhysicalDeviceFeatures2 deviceFeatures2 = { VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2 }; + + void** next = const_cast(&deviceFeatures2.pNext); + if (checkForExtension(VK_KHR_BUFFER_DEVICE_ADDRESS_EXTENSION_NAME)) + { + *next = &dev.Features.BufferDeviceAddress; + next = &dev.Features.BufferDeviceAddress.pNext; + } + if (checkForExtension(VK_KHR_ACCELERATION_STRUCTURE_EXTENSION_NAME)) + { + *next = &dev.Features.AccelerationStructure; + next = &dev.Features.AccelerationStructure.pNext; + } + if (checkForExtension(VK_KHR_RAY_QUERY_EXTENSION_NAME)) + { + *next = &dev.Features.RayQuery; + next = &dev.Features.RayQuery.pNext; + } + if (checkForExtension(VK_EXT_DESCRIPTOR_INDEXING_EXTENSION_NAME)) + { + *next = &dev.Features.DescriptorIndexing; + next = &dev.Features.DescriptorIndexing.pNext; + } + + vkGetPhysicalDeviceFeatures2(dev.Device, &deviceFeatures2); + dev.Features.Features = deviceFeatures2.features; + dev.Features.BufferDeviceAddress.pNext = nullptr; + dev.Features.AccelerationStructure.pNext = nullptr; + dev.Features.RayQuery.pNext = nullptr; + dev.Features.DescriptorIndexing.pNext = nullptr; + } + else + { + vkGetPhysicalDeviceFeatures(dev.Device, &dev.Features.Features); + } + } + return devinfo; +} + +std::vector VulkanInstance::GetAvailableLayers() +{ + uint32_t layerCount; + VkResult result = vkEnumerateInstanceLayerProperties(&layerCount, nullptr); + + std::vector availableLayers(layerCount); + result = vkEnumerateInstanceLayerProperties(&layerCount, availableLayers.data()); + return availableLayers; +} + +std::vector VulkanInstance::GetExtensions() +{ + uint32_t extensionCount = 0; + VkResult result = vkEnumerateInstanceExtensionProperties(nullptr, &extensionCount, nullptr); + + std::vector extensions(extensionCount); + result = vkEnumerateInstanceExtensionProperties(nullptr, &extensionCount, extensions.data()); + return extensions; +} + +VkBool32 VulkanInstance::DebugCallback(VkDebugUtilsMessageSeverityFlagBitsEXT messageSeverity, VkDebugUtilsMessageTypeFlagsEXT messageType, const VkDebugUtilsMessengerCallbackDataEXT* callbackData, void* userData) +{ + VulkanInstance* instance = (VulkanInstance*)userData; + + static std::mutex mtx; + static std::set seenMessages; + static int totalMessages; + + std::unique_lock lock(mtx); + + std::string msg = callbackData->pMessage; + + // Attempt to parse the string because the default formatting is totally unreadable and half of what it writes is totally useless! + auto parts = SplitString(msg, " | "); + if (parts.size() == 3) + { + msg = parts[2]; + size_t pos = msg.find(" The Vulkan spec states:"); + if (pos != std::string::npos) + msg = msg.substr(0, pos); + + if (callbackData->objectCount > 0) + { + msg += " ("; + for (uint32_t i = 0; i < callbackData->objectCount; i++) + { + if (i > 0) + msg += ", "; + if (callbackData->pObjects[i].pObjectName) + msg += callbackData->pObjects[i].pObjectName; + else + msg += ""; + } + msg += ")"; + } + } + + bool found = seenMessages.find(msg) != seenMessages.end(); + if (!found) + { + if (totalMessages < 20) + { + totalMessages++; + seenMessages.insert(msg); + + const char* typestr; + bool showcallstack = false; + if (messageSeverity & VK_DEBUG_UTILS_MESSAGE_SEVERITY_ERROR_BIT_EXT) + { + typestr = "vulkan error"; + showcallstack = true; + } + else if (messageSeverity & VK_DEBUG_UTILS_MESSAGE_SEVERITY_WARNING_BIT_EXT) + { + typestr = "vulkan warning"; + } + else if (messageSeverity & VK_DEBUG_UTILS_MESSAGE_SEVERITY_INFO_BIT_EXT) + { + typestr = "vulkan info"; + } + else if (messageSeverity & VK_DEBUG_UTILS_MESSAGE_SEVERITY_VERBOSE_BIT_EXT) + { + typestr = "vulkan verbose"; + } + else + { + typestr = "vulkan"; + } + + VulkanPrintLog(typestr, msg); + } + } + + return VK_FALSE; +} + +std::vector VulkanInstance::SplitString(const std::string& s, const std::string& seperator) +{ + std::vector output; + std::string::size_type prev_pos = 0, pos = 0; + + while ((pos = s.find(seperator, pos)) != std::string::npos) + { + std::string substring(s.substr(prev_pos, pos - prev_pos)); + + output.push_back(substring); + + pos += seperator.length(); + prev_pos = pos; + } + + output.push_back(s.substr(prev_pos, pos - prev_pos)); // Last word + return output; +} + +std::string VkResultToString(VkResult result) +{ + switch (result) + { + case VK_SUCCESS: return "success"; + case VK_NOT_READY: return "not ready"; + case VK_TIMEOUT: return "timeout"; + case VK_EVENT_SET: return "event set"; + case VK_EVENT_RESET: return "event reset"; + case VK_INCOMPLETE: return "incomplete"; + case VK_ERROR_OUT_OF_HOST_MEMORY: return "out of host memory"; + case VK_ERROR_OUT_OF_DEVICE_MEMORY: return "out of device memory"; + case VK_ERROR_INITIALIZATION_FAILED: return "initialization failed"; + case VK_ERROR_DEVICE_LOST: return "device lost"; + case VK_ERROR_MEMORY_MAP_FAILED: return "memory map failed"; + case VK_ERROR_LAYER_NOT_PRESENT: return "layer not present"; + case VK_ERROR_EXTENSION_NOT_PRESENT: return "extension not present"; + case VK_ERROR_FEATURE_NOT_PRESENT: return "feature not present"; + case VK_ERROR_INCOMPATIBLE_DRIVER: return "incompatible driver"; + case VK_ERROR_TOO_MANY_OBJECTS: return "too many objects"; + case VK_ERROR_FORMAT_NOT_SUPPORTED: return "format not supported"; + case VK_ERROR_FRAGMENTED_POOL: return "fragmented pool"; + case VK_ERROR_OUT_OF_POOL_MEMORY: return "out of pool memory"; + case VK_ERROR_INVALID_EXTERNAL_HANDLE: return "invalid external handle"; + case VK_ERROR_SURFACE_LOST_KHR: return "surface lost"; + case VK_ERROR_NATIVE_WINDOW_IN_USE_KHR: return "native window in use"; + case VK_SUBOPTIMAL_KHR: return "suboptimal"; + case VK_ERROR_OUT_OF_DATE_KHR: return "out of date"; + case VK_ERROR_INCOMPATIBLE_DISPLAY_KHR: return "incompatible display"; + case VK_ERROR_VALIDATION_FAILED_EXT: return "validation failed"; + case VK_ERROR_INVALID_SHADER_NV: return "invalid shader"; + case VK_ERROR_FRAGMENTATION_EXT: return "fragmentation"; + case VK_ERROR_NOT_PERMITTED_EXT: return "not permitted"; + case VK_ERROR_FULL_SCREEN_EXCLUSIVE_MODE_LOST_EXT: return "full screen exclusive mode lost"; + case VK_THREAD_IDLE_KHR: return "thread idle"; + case VK_THREAD_DONE_KHR: return "thread done"; + case VK_OPERATION_DEFERRED_KHR: return "operation deferred"; + case VK_OPERATION_NOT_DEFERRED_KHR: return "operation not deferred"; + case VK_PIPELINE_COMPILE_REQUIRED_EXT: return "pipeline compile required"; + default: break; + } + return "vkResult " + std::to_string((int)result); +} diff --git a/libraries/ZVulkan/src/vulkansurface.cpp b/libraries/ZVulkan/src/vulkansurface.cpp new file mode 100644 index 0000000000..69b61fabd0 --- /dev/null +++ b/libraries/ZVulkan/src/vulkansurface.cpp @@ -0,0 +1,47 @@ + +#include "vulkansurface.h" +#include "vulkaninstance.h" + +VulkanSurface::VulkanSurface(std::shared_ptr instance, VkSurfaceKHR surface) : Instance(std::move(instance)), Surface(surface) +{ +} + +VulkanSurface::~VulkanSurface() +{ + vkDestroySurfaceKHR(Instance->Instance, Surface, nullptr); +} + +#ifdef VK_USE_PLATFORM_WIN32_KHR + +VulkanSurface::VulkanSurface(std::shared_ptr instance, HWND window) : Instance(std::move(instance)), Window(window) +{ + VkWin32SurfaceCreateInfoKHR createInfo = { VK_STRUCTURE_TYPE_WIN32_SURFACE_CREATE_INFO_KHR }; + createInfo.hwnd = window; + createInfo.hinstance = GetModuleHandle(nullptr); + + VkResult result = vkCreateWin32SurfaceKHR(Instance->Instance, &createInfo, nullptr, &Surface); + if (result != VK_SUCCESS) + VulkanError("Could not create vulkan surface"); +} + +#elif defined(VK_USE_PLATFORM_XLIB_KHR) + +VulkanSurface::VulkanSurface(std::shared_ptr instance, Display* disp, Window wind) : Instance(std::move(instance)), disp(disp), wind(wind) +{ + VkXlibSurfaceCreateInfoKHR createInfo = { VK_STRUCTURE_TYPE_XLIB_SURFACE_CREATE_INFO_KHR }; + createInfo.dpy = disp; + createInfo.window = wind; + + VkResult result = vkCreateXlibSurfaceKHR(Instance->Instance, &createInfo, nullptr, &Surface); + if (result != VK_SUCCESS) + VulkanError("Could not create vulkan surface"); +} + +#else + +VulkanSurface::VulkanSurface(std::shared_ptr instance) : Instance(std::move(instance)) +{ + VulkanError("VulkanSurface not implemented on this platform"); +} + +#endif diff --git a/libraries/ZVulkan/src/vulkanswapchain.cpp b/libraries/ZVulkan/src/vulkanswapchain.cpp new file mode 100644 index 0000000000..7d6a6a9c58 --- /dev/null +++ b/libraries/ZVulkan/src/vulkanswapchain.cpp @@ -0,0 +1,365 @@ + +#include "vulkanswapchain.h" +#include "vulkanobjects.h" +#include "vulkansurface.h" +#include "vulkanbuilders.h" + +VulkanSwapChain::VulkanSwapChain(VulkanDevice* device) : device(device) +{ +} + +VulkanSwapChain::~VulkanSwapChain() +{ + views.clear(); + images.clear(); + if (swapchain) + vkDestroySwapchainKHR(device->device, swapchain, nullptr); +} + +void VulkanSwapChain::Create(int width, int height, int imageCount, bool vsync, bool hdr, bool exclusivefullscreen) +{ + views.clear(); + images.clear(); + + SelectFormat(hdr); + SelectPresentMode(vsync, exclusivefullscreen); + + VkSwapchainKHR oldSwapchain = swapchain; + CreateSwapchain(width, height, imageCount, exclusivefullscreen, oldSwapchain); + if (oldSwapchain) + vkDestroySwapchainKHR(device->device, oldSwapchain, nullptr); + + if (exclusivefullscreen && lost) + { + // We could not acquire exclusive fullscreen. Fall back to normal fullsceen instead. + exclusivefullscreen = false; + + SelectFormat(hdr); + SelectPresentMode(vsync, exclusivefullscreen); + + oldSwapchain = swapchain; + CreateSwapchain(width, height, imageCount, exclusivefullscreen, oldSwapchain); + if (oldSwapchain) + vkDestroySwapchainKHR(device->device, oldSwapchain, nullptr); + } + + if (swapchain) + { + uint32_t imageCount; + VkResult result = vkGetSwapchainImagesKHR(device->device, swapchain, &imageCount, nullptr); + if (result != VK_SUCCESS) + throw std::runtime_error("vkGetSwapchainImagesKHR failed"); + + std::vector swapchainImages; + swapchainImages.resize(imageCount); + result = vkGetSwapchainImagesKHR(device->device, swapchain, &imageCount, swapchainImages.data()); + if (result != VK_SUCCESS) + throw std::runtime_error("vkGetSwapchainImagesKHR failed (2)"); + + for (VkImage vkimage : swapchainImages) + { + auto image = std::make_unique(device, vkimage, nullptr, actualExtent.width, actualExtent.height, 1, 1); + auto view = ImageViewBuilder() + .Type(VK_IMAGE_VIEW_TYPE_2D) + .Image(image.get(), format.format) + .DebugName("SwapchainImageView") + .Create(device); + images.push_back(std::move(image)); + views.push_back(std::move(view)); + } + } +} + +void VulkanSwapChain::SelectFormat(bool hdr) +{ + std::vector surfaceFormats = GetSurfaceFormats(); + if (surfaceFormats.empty()) + throw std::runtime_error("No surface formats supported"); + + if (surfaceFormats.size() == 1 && surfaceFormats.front().format == VK_FORMAT_UNDEFINED) + { + format.format = VK_FORMAT_B8G8R8A8_UNORM; + format.colorSpace = VK_COLOR_SPACE_SRGB_NONLINEAR_KHR; + return; + } + + if (hdr) + { + for (const auto& f : surfaceFormats) + { + if (f.format == VK_FORMAT_R16G16B16A16_SFLOAT && f.colorSpace == VK_COLOR_SPACE_EXTENDED_SRGB_LINEAR_EXT) + { + format = f; + return; + } + } + } + + for (const auto& f : surfaceFormats) + { + if (f.format == VK_FORMAT_B8G8R8A8_UNORM && f.colorSpace == VK_COLOR_SPACE_SRGB_NONLINEAR_KHR) + { + format = f; + return; + } + } + + format = surfaceFormats.front(); +} + +void VulkanSwapChain::SelectPresentMode(bool vsync, bool exclusivefullscreen) +{ + std::vector presentModes = GetPresentModes(exclusivefullscreen); + if (presentModes.empty()) + throw std::runtime_error("No surface present modes supported"); + + presentMode = VK_PRESENT_MODE_FIFO_KHR; + if (vsync) + { + bool supportsFifoRelaxed = std::find(presentModes.begin(), presentModes.end(), VK_PRESENT_MODE_FIFO_RELAXED_KHR) != presentModes.end(); + if (supportsFifoRelaxed) + presentMode = VK_PRESENT_MODE_FIFO_RELAXED_KHR; + } + else + { + bool supportsMailbox = std::find(presentModes.begin(), presentModes.end(), VK_PRESENT_MODE_MAILBOX_KHR) != presentModes.end(); + bool supportsImmediate = std::find(presentModes.begin(), presentModes.end(), VK_PRESENT_MODE_IMMEDIATE_KHR) != presentModes.end(); + if (supportsMailbox) + presentMode = VK_PRESENT_MODE_MAILBOX_KHR; + else if (supportsImmediate) + presentMode = VK_PRESENT_MODE_IMMEDIATE_KHR; + } +} + +bool VulkanSwapChain::CreateSwapchain(int width, int height, int imageCount, bool exclusivefullscreen, VkSwapchainKHR oldSwapChain) +{ + lost = false; + + VkSurfaceCapabilitiesKHR surfaceCapabilities; +#ifdef WIN32 + if (exclusivefullscreen && device->SupportsDeviceExtension(VK_EXT_FULL_SCREEN_EXCLUSIVE_EXTENSION_NAME)) + { + VkPhysicalDeviceSurfaceInfo2KHR info = { VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SURFACE_INFO_2_KHR }; + VkSurfaceFullScreenExclusiveInfoEXT exclusiveInfo = { VK_STRUCTURE_TYPE_SURFACE_FULL_SCREEN_EXCLUSIVE_INFO_EXT }; + VkSurfaceFullScreenExclusiveWin32InfoEXT exclusiveWin32Info = { VK_STRUCTURE_TYPE_SURFACE_FULL_SCREEN_EXCLUSIVE_WIN32_INFO_EXT }; + info.surface = device->Surface->Surface; + info.pNext = &exclusiveInfo; + exclusiveInfo.fullScreenExclusive = VK_FULL_SCREEN_EXCLUSIVE_APPLICATION_CONTROLLED_EXT; + exclusiveInfo.pNext = &exclusiveWin32Info; + exclusiveWin32Info.hmonitor = MonitorFromWindow(device->Surface->Window, MONITOR_DEFAULTTONEAREST); + + VkSurfaceCapabilities2KHR capabilites = { VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_2_KHR }; + VkSurfaceCapabilitiesFullScreenExclusiveEXT exclusiveCapabilities = { VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_FULL_SCREEN_EXCLUSIVE_EXT }; + capabilites.pNext = &exclusiveCapabilities; + + VkResult result = vkGetPhysicalDeviceSurfaceCapabilities2KHR(device->PhysicalDevice.Device, &info, &capabilites); + if (result != VK_SUCCESS) + throw std::runtime_error("vkGetPhysicalDeviceSurfaceCapabilities2EXT failed"); + + surfaceCapabilities = capabilites.surfaceCapabilities; + exclusivefullscreen = exclusiveCapabilities.fullScreenExclusiveSupported == VK_TRUE; + } + else + { + VkResult result = vkGetPhysicalDeviceSurfaceCapabilitiesKHR(device->PhysicalDevice.Device, device->Surface->Surface, &surfaceCapabilities); + if (result != VK_SUCCESS) + throw std::runtime_error("vkGetPhysicalDeviceSurfaceCapabilitiesKHR failed"); + exclusivefullscreen = false; + } +#endif + + actualExtent = { static_cast(width), static_cast(height) }; + actualExtent.width = std::max(surfaceCapabilities.minImageExtent.width, std::min(surfaceCapabilities.maxImageExtent.width, actualExtent.width)); + actualExtent.height = std::max(surfaceCapabilities.minImageExtent.height, std::min(surfaceCapabilities.maxImageExtent.height, actualExtent.height)); + if (actualExtent.width == 0 || actualExtent.height == 0) + { + swapchain = VK_NULL_HANDLE; + lost = true; + return false; + } + + imageCount = std::max(surfaceCapabilities.minImageCount, std::min(surfaceCapabilities.maxImageCount, (uint32_t)imageCount)); + + VkSwapchainCreateInfoKHR swapChainCreateInfo = { VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR }; + swapChainCreateInfo.surface = device->Surface->Surface; + swapChainCreateInfo.minImageCount = imageCount; + swapChainCreateInfo.imageFormat = format.format; + swapChainCreateInfo.imageColorSpace = format.colorSpace; + swapChainCreateInfo.imageExtent = actualExtent; + swapChainCreateInfo.imageArrayLayers = 1; + swapChainCreateInfo.imageUsage = VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT; + + uint32_t queueFamilyIndices[] = { (uint32_t)device->GraphicsFamily, (uint32_t)device->PresentFamily }; + if (device->GraphicsFamily != device->PresentFamily) + { + swapChainCreateInfo.imageSharingMode = VK_SHARING_MODE_CONCURRENT; + swapChainCreateInfo.queueFamilyIndexCount = 2; + swapChainCreateInfo.pQueueFamilyIndices = queueFamilyIndices; + } + else + { + swapChainCreateInfo.imageSharingMode = VK_SHARING_MODE_EXCLUSIVE; + swapChainCreateInfo.queueFamilyIndexCount = 0; + swapChainCreateInfo.pQueueFamilyIndices = nullptr; + } + + swapChainCreateInfo.preTransform = surfaceCapabilities.currentTransform; + swapChainCreateInfo.compositeAlpha = VK_COMPOSITE_ALPHA_OPAQUE_BIT_KHR; // If alpha channel is passed on to the DWM or not + swapChainCreateInfo.presentMode = presentMode; + swapChainCreateInfo.clipped = VK_FALSE;// VK_TRUE; + swapChainCreateInfo.oldSwapchain = oldSwapChain; + +#ifdef WIN32 + VkSurfaceFullScreenExclusiveInfoEXT exclusiveInfo = { VK_STRUCTURE_TYPE_SURFACE_FULL_SCREEN_EXCLUSIVE_INFO_EXT }; + VkSurfaceFullScreenExclusiveWin32InfoEXT exclusiveWin32Info = { VK_STRUCTURE_TYPE_SURFACE_FULL_SCREEN_EXCLUSIVE_WIN32_INFO_EXT }; + if (exclusivefullscreen && device->SupportsDeviceExtension(VK_EXT_FULL_SCREEN_EXCLUSIVE_EXTENSION_NAME)) + { + swapChainCreateInfo.pNext = &exclusiveInfo; + exclusiveInfo.fullScreenExclusive = VK_FULL_SCREEN_EXCLUSIVE_APPLICATION_CONTROLLED_EXT; + exclusiveInfo.pNext = &exclusiveWin32Info; + exclusiveWin32Info.hmonitor = MonitorFromWindow(device->Surface->Window, MONITOR_DEFAULTTONEAREST); + } +#endif + + VkResult result = vkCreateSwapchainKHR(device->device, &swapChainCreateInfo, nullptr, &swapchain); + if (result != VK_SUCCESS) + { + swapchain = VK_NULL_HANDLE; + lost = true; + return false; + } + +#ifdef WIN32 + if (exclusivefullscreen && device->SupportsDeviceExtension(VK_EXT_FULL_SCREEN_EXCLUSIVE_EXTENSION_NAME)) + { + result = vkAcquireFullScreenExclusiveModeEXT(device->device, swapchain); + if (result != VK_SUCCESS) + { + lost = true; + } + } +#endif + + return true; +} + +int VulkanSwapChain::AcquireImage(VulkanSemaphore* semaphore, VulkanFence* fence) +{ + if (lost) + return -1; + + uint32_t imageIndex; + VkResult result = vkAcquireNextImageKHR(device->device, swapchain, 1'000'000'000, semaphore ? semaphore->semaphore : VK_NULL_HANDLE, fence ? fence->fence : VK_NULL_HANDLE, &imageIndex); + if (result == VK_SUCCESS || result == VK_SUBOPTIMAL_KHR) + { + return imageIndex; + } + else if (result == VK_ERROR_OUT_OF_DATE_KHR || result == VK_ERROR_FULL_SCREEN_EXCLUSIVE_MODE_LOST_EXT) + { + lost = true; + return -1; + } + else if (result == VK_NOT_READY || result == VK_TIMEOUT) + { + return -1; + } + else + { + throw std::runtime_error("Failed to acquire next image!"); + } +} + +void VulkanSwapChain::QueuePresent(int imageIndex, VulkanSemaphore* semaphore) +{ + uint32_t index = imageIndex; + VkPresentInfoKHR presentInfo = {}; + presentInfo.sType = VK_STRUCTURE_TYPE_PRESENT_INFO_KHR; + presentInfo.waitSemaphoreCount = semaphore ? 1 : 0; + presentInfo.pWaitSemaphores = semaphore ? &semaphore->semaphore : VK_NULL_HANDLE; + presentInfo.swapchainCount = 1; + presentInfo.pSwapchains = &swapchain; + presentInfo.pImageIndices = &index; + presentInfo.pResults = nullptr; + VkResult result = vkQueuePresentKHR(device->PresentQueue, &presentInfo); + if (result == VK_SUCCESS || result == VK_SUBOPTIMAL_KHR) + { + return; + } + else if (result == VK_ERROR_OUT_OF_DATE_KHR || result == VK_ERROR_SURFACE_LOST_KHR || result == VK_ERROR_FULL_SCREEN_EXCLUSIVE_MODE_LOST_EXT) + { + lost = true; + } + else if (result == VK_ERROR_OUT_OF_HOST_MEMORY || result == VK_ERROR_OUT_OF_DEVICE_MEMORY) + { + // The spec says we can recover from this. + // However, if we are out of memory it is better to crash now than in some other weird place further away from the source of the problem. + + throw std::runtime_error("vkQueuePresentKHR failed: out of memory"); + } + else if (result == VK_ERROR_DEVICE_LOST) + { + throw std::runtime_error("vkQueuePresentKHR failed: device lost"); + } + else + { + throw std::runtime_error("vkQueuePresentKHR failed"); + } +} + +std::vector VulkanSwapChain::GetSurfaceFormats() +{ + uint32_t surfaceFormatCount = 0; + VkResult result = vkGetPhysicalDeviceSurfaceFormatsKHR(device->PhysicalDevice.Device, device->Surface->Surface, &surfaceFormatCount, nullptr); + if (result != VK_SUCCESS) + throw std::runtime_error("vkGetPhysicalDeviceSurfaceFormatsKHR failed"); + else if (surfaceFormatCount == 0) + return {}; + + std::vector surfaceFormats(surfaceFormatCount); + result = vkGetPhysicalDeviceSurfaceFormatsKHR(device->PhysicalDevice.Device, device->Surface->Surface, &surfaceFormatCount, surfaceFormats.data()); + if (result != VK_SUCCESS) + throw std::runtime_error("vkGetPhysicalDeviceSurfaceFormatsKHR failed"); + return surfaceFormats; +} + +std::vector VulkanSwapChain::GetPresentModes(bool exclusivefullscreen) +{ +#ifdef WIN32 + if (exclusivefullscreen && device->SupportsDeviceExtension(VK_EXT_FULL_SCREEN_EXCLUSIVE_EXTENSION_NAME)) + { + VkPhysicalDeviceSurfaceInfo2KHR surfaceInfo = { VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SURFACE_INFO_2_KHR }; + VkSurfaceFullScreenExclusiveInfoEXT exclusiveInfo = { VK_STRUCTURE_TYPE_SURFACE_FULL_SCREEN_EXCLUSIVE_INFO_EXT }; + surfaceInfo.surface = device->Surface->Surface; + surfaceInfo.pNext = &exclusiveInfo; + exclusiveInfo.fullScreenExclusive = VK_FULL_SCREEN_EXCLUSIVE_APPLICATION_CONTROLLED_EXT; + + uint32_t presentModeCount = 0; + VkResult result = vkGetPhysicalDeviceSurfacePresentModes2EXT(device->PhysicalDevice.Device, &surfaceInfo, &presentModeCount, nullptr); + if (result != VK_SUCCESS) + throw std::runtime_error("vkGetPhysicalDeviceSurfacePresentModes2EXT failed"); + else if (presentModeCount == 0) + return {}; + + std::vector presentModes(presentModeCount); + result = vkGetPhysicalDeviceSurfacePresentModes2EXT(device->PhysicalDevice.Device, &surfaceInfo, &presentModeCount, presentModes.data()); + if (result != VK_SUCCESS) + throw std::runtime_error("vkGetPhysicalDeviceSurfacePresentModes2EXT failed"); + return presentModes; + } + else +#endif + { + uint32_t presentModeCount = 0; + VkResult result = vkGetPhysicalDeviceSurfacePresentModesKHR(device->PhysicalDevice.Device, device->Surface->Surface, &presentModeCount, nullptr); + if (result != VK_SUCCESS) + throw std::runtime_error("vkGetPhysicalDeviceSurfacePresentModesKHR failed"); + else if (presentModeCount == 0) + return {}; + + std::vector presentModes(presentModeCount); + result = vkGetPhysicalDeviceSurfacePresentModesKHR(device->PhysicalDevice.Device, device->Surface->Surface, &presentModeCount, presentModes.data()); + if (result != VK_SUCCESS) + throw std::runtime_error("vkGetPhysicalDeviceSurfacePresentModesKHR failed"); + return presentModes; + } +} diff --git a/libraries/glslang/OGLCompilersDLL/CMakeLists.txt b/libraries/glslang/OGLCompilersDLL/CMakeLists.txt deleted file mode 100644 index 392fa79005..0000000000 --- a/libraries/glslang/OGLCompilersDLL/CMakeLists.txt +++ /dev/null @@ -1,31 +0,0 @@ -cmake_minimum_required( VERSION 3.1.0 ) - -make_release_only() -use_fast_math() - -# Request C++11 -if(${CMAKE_VERSION} VERSION_LESS 3.1) - # CMake versions before 3.1 do not understand CMAKE_CXX_STANDARD - # remove this block once CMake >=3.1 has fixated in the ecosystem - add_compile_options(-std=c++11) -else() - set(CMAKE_CXX_STANDARD 11) - set(CMAKE_CXX_STANDARD_REQUIRED ON) - set(CMAKE_CXX_EXTENSIONS OFF) -endif() - -set(SOURCES InitializeDll.cpp InitializeDll.h) - -add_library(OGLCompiler STATIC ${SOURCES}) -set_property(TARGET OGLCompiler PROPERTY FOLDER glslang) -set_property(TARGET OGLCompiler PROPERTY POSITION_INDEPENDENT_CODE ON) - -if(WIN32) - source_group("Source" FILES ${SOURCES}) -endif(WIN32) - -if(ENABLE_GLSLANG_INSTALL) - install(TARGETS OGLCompiler - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) -endif(ENABLE_GLSLANG_INSTALL) - diff --git a/libraries/glslang/glslang/CMakeLists.txt b/libraries/glslang/glslang/CMakeLists.txt deleted file mode 100644 index ebcbca5584..0000000000 --- a/libraries/glslang/glslang/CMakeLists.txt +++ /dev/null @@ -1,162 +0,0 @@ -cmake_minimum_required( VERSION 3.1.0 ) - -make_release_only() -use_fast_math() - -if(WIN32) - add_subdirectory(OSDependent/Windows) -elseif(UNIX) - add_subdirectory(OSDependent/Unix) -else(WIN32) - message("unknown platform") -endif(WIN32) - -if(${CMAKE_CXX_COMPILER_ID} MATCHES "GNU") - add_compile_options(-Wall -Wmaybe-uninitialized -Wuninitialized -Wunused -Wunused-local-typedefs - -Wunused-parameter -Wunused-value -Wunused-variable -Wunused-but-set-parameter -Wunused-but-set-variable -fno-exceptions) - add_compile_options(-Wno-reorder) # disable this from -Wall, since it happens all over. -elseif(${CMAKE_CXX_COMPILER_ID} MATCHES "Clang") - add_compile_options(-Wall -Wuninitialized -Wunused -Wunused-local-typedefs - -Wunused-parameter -Wunused-value -Wunused-variable) - add_compile_options(-Wno-reorder) # disable this from -Wall, since it happens all over. -endif() - -# Request C++11 -if(${CMAKE_VERSION} VERSION_LESS 3.1) - # CMake versions before 3.1 do not understand CMAKE_CXX_STANDARD - # remove this block once CMake >=3.1 has fixated in the ecosystem - add_compile_options(-std=c++11) -else() - set(CMAKE_CXX_STANDARD 11) - set(CMAKE_CXX_STANDARD_REQUIRED ON) - set(CMAKE_CXX_EXTENSIONS OFF) -endif() - -set(SOURCES - MachineIndependent/glslang.y - MachineIndependent/glslang_tab.cpp - MachineIndependent/attribute.cpp - MachineIndependent/Constant.cpp - MachineIndependent/iomapper.cpp - MachineIndependent/InfoSink.cpp - MachineIndependent/Initialize.cpp - MachineIndependent/IntermTraverse.cpp - MachineIndependent/Intermediate.cpp - MachineIndependent/ParseContextBase.cpp - MachineIndependent/ParseHelper.cpp - MachineIndependent/PoolAlloc.cpp - MachineIndependent/RemoveTree.cpp - MachineIndependent/Scan.cpp - MachineIndependent/ShaderLang.cpp - MachineIndependent/SpirvIntrinsics.cpp - MachineIndependent/SymbolTable.cpp - MachineIndependent/Versions.cpp - MachineIndependent/intermOut.cpp - MachineIndependent/limits.cpp - MachineIndependent/linkValidate.cpp - MachineIndependent/parseConst.cpp - MachineIndependent/reflection.cpp - MachineIndependent/preprocessor/Pp.cpp - MachineIndependent/preprocessor/PpAtom.cpp - MachineIndependent/preprocessor/PpContext.cpp - MachineIndependent/preprocessor/PpScanner.cpp - MachineIndependent/preprocessor/PpTokens.cpp - MachineIndependent/propagateNoContraction.cpp - GenericCodeGen/CodeGen.cpp - GenericCodeGen/Link.cpp) - -set(HEADERS - Public/ShaderLang.h - Include/arrays.h - Include/BaseTypes.h - Include/Common.h - Include/ConstantUnion.h - Include/InfoSink.h - Include/InitializeGlobals.h - Include/intermediate.h - Include/PoolAlloc.h - Include/ResourceLimits.h - Include/ShHandle.h - Include/SpirvIntrinsics.h - Include/Types.h - MachineIndependent/attribute.h - MachineIndependent/glslang_tab.cpp.h - MachineIndependent/gl_types.h - MachineIndependent/Initialize.h - MachineIndependent/iomapper.h - MachineIndependent/LiveTraverser.h - MachineIndependent/localintermediate.h - MachineIndependent/ParseHelper.h - MachineIndependent/reflection.h - MachineIndependent/RemoveTree.h - MachineIndependent/Scan.h - MachineIndependent/ScanContext.h - MachineIndependent/SymbolTable.h - MachineIndependent/Versions.h - MachineIndependent/parseVersions.h - MachineIndependent/propagateNoContraction.h - MachineIndependent/preprocessor/PpContext.h - MachineIndependent/preprocessor/PpTokens.h) - -# This might be useful for making grammar changes: -# -# find_package(BISON) -# add_custom_command(OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/MachineIndependent/glslang_tab.cpp ${CMAKE_CURRENT_SOURCE_DIR}/MachineIndependent/glslang_tab.cpp.h -# COMMAND ${BISON_EXECUTABLE} --defines=${CMAKE_CURRENT_SOURCE_DIR}/MachineIndependent/glslang_tab.cpp.h -t ${CMAKE_CURRENT_SOURCE_DIR}/MachineIndependent/glslang.y -o ${CMAKE_CURRENT_SOURCE_DIR}/MachineIndependent/glslang_tab.cpp -# MAIN_DEPENDENCY MachineIndependent/glslang.y -# WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) -# set(BISON_GLSLParser_OUTPUT_SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/MachineIndependent/glslang_tab.cpp) - -# Precompiled header macro. Parameters are source file list and filename for pch cpp file. -macro(glslang_pch SRCS PCHCPP) - if(MSVC AND CMAKE_GENERATOR MATCHES "^Visual Studio") - set(PCH_NAME "$(IntDir)\\pch.pch") - # make source files use/depend on PCH_NAME - set_source_files_properties(${${SRCS}} PROPERTIES COMPILE_FLAGS "/Yupch.h /FIpch.h /Fp${PCH_NAME} /Zm300" OBJECT_DEPENDS "${PCH_NAME}") - # make PCHCPP file compile and generate PCH_NAME - set_source_files_properties(${PCHCPP} PROPERTIES COMPILE_FLAGS "/Ycpch.h /Fp${PCH_NAME} /Zm300" OBJECT_OUTPUTS "${PCH_NAME}") - list(APPEND ${SRCS} "${PCHCPP}") - endif() -endmacro(glslang_pch) - -glslang_pch(SOURCES MachineIndependent/pch.cpp) - -add_library(glslang STATIC ${LIB_TYPE} ${BISON_GLSLParser_OUTPUT_SOURCE} ${SOURCES} ${HEADERS}) -set_property(TARGET glslang PROPERTY FOLDER glslang) -set_property(TARGET glslang PROPERTY POSITION_INDEPENDENT_CODE ON) -target_link_libraries(glslang OGLCompiler OSDependent) -target_include_directories(glslang PUBLIC ..) - -if(WIN32 AND BUILD_SHARED_LIBS) - set_target_properties(glslang PROPERTIES PREFIX "") -endif() - -if(ENABLE_HLSL) - target_link_libraries(glslang HLSL) -endif() - -if(WIN32) - source_group("Public" REGULAR_EXPRESSION "Public/*") - source_group("MachineIndependent" REGULAR_EXPRESSION "MachineIndependent/[^/]*") - source_group("Include" REGULAR_EXPRESSION "Include/[^/]*") - source_group("GenericCodeGen" REGULAR_EXPRESSION "GenericCodeGen/*") - source_group("MachineIndependent\\Preprocessor" REGULAR_EXPRESSION "MachineIndependent/preprocessor/*") -endif(WIN32) - -if(ENABLE_GLSLANG_INSTALL) - if(BUILD_SHARED_LIBS) - install(TARGETS glslang - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) - else() - install(TARGETS glslang - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) - endif() -endif(ENABLE_GLSLANG_INSTALL) - -if(ENABLE_GLSLANG_INSTALL) - foreach(file ${HEADERS}) - get_filename_component(dir ${file} DIRECTORY) - install(FILES ${file} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/glslang/${dir}) - endforeach() -endif(ENABLE_GLSLANG_INSTALL) diff --git a/libraries/glslang/glslang/MachineIndependent/pch.cpp b/libraries/glslang/glslang/MachineIndependent/pch.cpp deleted file mode 100644 index b7a08654a5..0000000000 --- a/libraries/glslang/glslang/MachineIndependent/pch.cpp +++ /dev/null @@ -1,35 +0,0 @@ -// -// Copyright (C) 2018 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 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. -// - -#include "pch.h" diff --git a/libraries/glslang/spirv/CMakeLists.txt b/libraries/glslang/spirv/CMakeLists.txt deleted file mode 100644 index 16df27d7b8..0000000000 --- a/libraries/glslang/spirv/CMakeLists.txt +++ /dev/null @@ -1,118 +0,0 @@ -cmake_minimum_required( VERSION 3.1.0 ) - -make_release_only() -use_fast_math() - -# Request C++11 -if(${CMAKE_VERSION} VERSION_LESS 3.1) - # CMake versions before 3.1 do not understand CMAKE_CXX_STANDARD - # remove this block once CMake >=3.1 has fixated in the ecosystem - add_compile_options(-std=c++11) -else() - set(CMAKE_CXX_STANDARD 11) - set(CMAKE_CXX_STANDARD_REQUIRED ON) - set(CMAKE_CXX_EXTENSIONS OFF) -endif() - -set(SOURCES - GlslangToSpv.cpp - InReadableOrder.cpp - Logger.cpp - SpvBuilder.cpp - SpvPostProcess.cpp - doc.cpp - SpvTools.cpp - disassemble.cpp) - -set(SPVREMAP_SOURCES - SPVRemapper.cpp - doc.cpp) - -set(HEADERS - bitutils.h - spirv.hpp - GLSL.std.450.h - GLSL.ext.EXT.h - GLSL.ext.KHR.h - GlslangToSpv.h - hex_float.h - Logger.h - SpvBuilder.h - spvIR.h - doc.h - SpvTools.h - disassemble.h - GLSL.ext.AMD.h - GLSL.ext.NV.h) - -set(SPVREMAP_HEADERS - SPVRemapper.h - doc.h) - -add_library(SPIRV STATIC ${LIB_TYPE} ${SOURCES} ${HEADERS}) -set_property(TARGET SPIRV PROPERTY FOLDER glslang) -set_property(TARGET SPIRV PROPERTY POSITION_INDEPENDENT_CODE ON) -target_include_directories(SPIRV PUBLIC - $ - $) - -if (ENABLE_SPVREMAPPER) - add_library(SPVRemapper ${LIB_TYPE} ${SPVREMAP_SOURCES} ${SPVREMAP_HEADERS}) - set_property(TARGET SPVRemapper PROPERTY FOLDER glslang) - set_property(TARGET SPVRemapper PROPERTY POSITION_INDEPENDENT_CODE ON) -endif() - -if(WIN32 AND BUILD_SHARED_LIBS) - set_target_properties(SPIRV PROPERTIES PREFIX "") - if (ENABLE_SPVREMAPPER) - set_target_properties(SPVRemapper PROPERTIES PREFIX "") - endif() -endif() - -if(ENABLE_OPT) - target_include_directories(SPIRV - PRIVATE ${spirv-tools_SOURCE_DIR}/include - PRIVATE ${spirv-tools_SOURCE_DIR}/source - ) - target_link_libraries(SPIRV glslang SPIRV-Tools-opt) - target_include_directories(SPIRV PUBLIC - $ - $) -else() - target_link_libraries(SPIRV glslang) -endif(ENABLE_OPT) - -if(WIN32) - source_group("Source" FILES ${SOURCES} ${HEADERS}) - source_group("Source" FILES ${SPVREMAP_SOURCES} ${SPVREMAP_HEADERS}) -endif(WIN32) - -if(ENABLE_GLSLANG_INSTALL) - if(BUILD_SHARED_LIBS) - if (ENABLE_SPVREMAPPER) - install(TARGETS SPVRemapper EXPORT SPVRemapperTargets - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) - endif() - install(TARGETS SPIRV EXPORT SPIRVTargets - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) - else() - if (ENABLE_SPVREMAPPER) - install(TARGETS SPVRemapper EXPORT SPVRemapperTargets - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) - endif() - install(TARGETS SPIRV EXPORT SPIRVTargets - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) - endif() - - if (ENABLE_SPVREMAPPER) - install(EXPORT SPVRemapperTargets DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake) - endif() - - install(EXPORT SPIRVTargets DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake) - - install(FILES ${HEADERS} ${SPVREMAP_HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/SPIRV/) - install(FILES ${HEADERS} ${SPVREMAP_HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/glslang/SPIRV/) -endif(ENABLE_GLSLANG_INSTALL) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 911e35dce5..cd69f02092 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -314,7 +314,7 @@ add_custom_target( revision_check ALL set( PROJECT_LIBRARIES ${PROJECT_LIBRARIES} "${ZLIB_LIBRARIES}" "${JPEG_LIBRARIES}" "${BZIP2_LIBRARIES}" "${CMAKE_DL_LIBS}" "${DRPC_LIBRARIES}") if (HAVE_VULKAN) - set( PROJECT_LIBRARIES ${PROJECT_LIBRARIES} "glslang" "SPIRV" "OGLCompiler") + set( PROJECT_LIBRARIES ${PROJECT_LIBRARIES} "zvulkan") endif() # ZMUSIC @@ -678,7 +678,6 @@ set( NOT_COMPILED_SOURCE_FILES zcc-parse.c zcc-parse.h common/platform/win32/zutil.natvis - common/rendering/vulkan/thirdparty/vk_mem_alloc/vk_mem_alloc.natvis ) set( VM_JIT_SOURCES @@ -729,10 +728,7 @@ set( FASTMATH_SOURCES #Vulkan stuff must go into a separate list because it needs to be disabled for some platforms set (VULKAN_SOURCES - common/rendering/vulkan/system/vk_device.cpp - common/rendering/vulkan/system/vk_swapchain.cpp - common/rendering/vulkan/system/vk_builders.cpp - common/rendering/vulkan/system/vk_framebuffer.cpp + common/rendering/vulkan/system/vk_renderdevice.cpp common/rendering/vulkan/system/vk_commandbuffer.cpp common/rendering/vulkan/system/vk_hwbuffer.cpp common/rendering/vulkan/system/vk_buffer.cpp @@ -751,8 +747,7 @@ set (VULKAN_SOURCES common/rendering/vulkan/textures/vk_imagetransition.cpp common/rendering/vulkan/textures/vk_renderbuffers.cpp common/rendering/vulkan/textures/vk_texture.cpp - common/rendering/vulkan/thirdparty/volk/volk.c - common/rendering/vulkan/thirdparty/vk_mem_alloc/vk_mem_alloc.cpp + common/rendering/vulkan/textures/vk_framebuffer.cpp ) if (HAVE_GLES2) @@ -1270,7 +1265,6 @@ include_directories( . common/rendering/gles common/rendering/gles/glad/include common/rendering/gles/Mali_OpenGL_ES_Emulator/include - common/rendering/vulkan/thirdparty common/scripting/vm common/scripting/jit common/scripting/core @@ -1299,8 +1293,7 @@ include_directories( . scripting/zscript rendering ../libraries/gdtoa - ../libraries/glslang/glslang/Public - ../libraries/glslang/spirv + ../libraries/ZVulkan/include ${CMAKE_BINARY_DIR}/libraries/gdtoa ${SYSTEM_SOURCES_DIR} ) @@ -1478,9 +1471,6 @@ source_group("Common\\Rendering\\Vulkan Renderer\\System" REGULAR_EXPRESSION "^$ source_group("Common\\Rendering\\Vulkan Renderer\\Renderer" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/common/rendering/vulkan/renderer/.+") source_group("Common\\Rendering\\Vulkan Renderer\\Shaders" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/common/rendering/vulkan/shaders/.+") source_group("Common\\Rendering\\Vulkan Renderer\\Textures" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/common/rendering/vulkan/textures/.+") -source_group("Common\\Rendering\\Vulkan Renderer\\Third Party" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/common/rendering/vulkan/thirdparty/.+") -source_group("Common\\Rendering\\Vulkan Renderer\\Third Party\\Volk" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/common/rendering/vulkan/thirdparty/volk/.+") -source_group("Common\\Rendering\\Vulkan Renderer\\Third Party\\Vk_Mem_Alloc" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/common/rendering/vulkan/thirdparty/vk_mem_alloc.+") source_group("Common\\Models" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/common/models/.+") source_group("Common\\Textures" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/common/textures/.+") source_group("Common\\Textures\\Hires" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/common/textures/hires/.+") diff --git a/src/common/platform/posix/cocoa/i_video.mm b/src/common/platform/posix/cocoa/i_video.mm index b6c7d97a2d..a291cd35c2 100644 --- a/src/common/platform/posix/cocoa/i_video.mm +++ b/src/common/platform/posix/cocoa/i_video.mm @@ -34,9 +34,7 @@ #include "gl_load.h" #ifdef HAVE_VULKAN -#define VK_USE_PLATFORM_MACOS_MVK -#define VK_USE_PLATFORM_METAL_EXT -#include "volk/volk.h" +#include #endif #include "i_common.h" @@ -58,7 +56,7 @@ #endif #ifdef HAVE_VULKAN -#include "vulkan/system/vk_framebuffer.h" +#include "vulkan/system/vk_renderdevice.h" #endif extern bool ToggleFullscreen; @@ -377,9 +375,7 @@ public: ~CocoaVideo() { -#ifdef HAVE_VULKAN - delete m_vulkanDevice; -#endif + m_vulkanSurface.reset(); ms_window = nil; } @@ -433,8 +429,24 @@ public: try { - m_vulkanDevice = new VulkanDevice(); - fb = new VulkanFrameBuffer(nullptr, vid_fullscreen, m_vulkanDevice); + unsigned int count = 64; + const char* names[64]; + if (!I_GetVulkanPlatformExtensions(&count, names)) + VulkanError("I_GetVulkanPlatformExtensions failed"); + + VulkanInstanceBuilder builder; + builder.DebugLayer(vk_debug); + for (unsigned int i = 0; i < count; i++) + builder.RequireExtension(names[i]); + auto vulkanInstance = builder.Create(); + + VkSurfaceKHR surfacehandle = nullptr; + if (!I_CreateVulkanSurface(vulkanInstance->Instance, &surfacehandle)) + VulkanError("I_CreateVulkanSurface failed"); + + m_vulkanSurface = std::make_shared(vulkanInstance, surfacehandle); + + fb = new VulkanRenderDevice(nullptr, vid_fullscreen, m_vulkanSurface); } catch (std::exception const&) { @@ -484,7 +496,7 @@ public: private: #ifdef HAVE_VULKAN - VulkanDevice *m_vulkanDevice = nullptr; + std::shared_ptr m_vulkanSurface; #endif static CocoaWindow* ms_window; diff --git a/src/common/platform/posix/sdl/sdlglvideo.cpp b/src/common/platform/posix/sdl/sdlglvideo.cpp index 5f6bc51439..7f533ca774 100644 --- a/src/common/platform/posix/sdl/sdlglvideo.cpp +++ b/src/common/platform/posix/sdl/sdlglvideo.cpp @@ -55,7 +55,10 @@ #endif #ifdef HAVE_VULKAN -#include "vulkan/system/vk_framebuffer.h" +#include "vulkan/system/vk_renderdevice.h" +#include +#include +#include #endif // MACROS ------------------------------------------------------------------ @@ -199,7 +202,7 @@ public: private: #ifdef HAVE_VULKAN - VulkanDevice *device = nullptr; + std::shared_ptr surface; #endif }; @@ -261,7 +264,7 @@ SDLVideo::SDLVideo () SDLVideo::~SDLVideo () { #ifdef HAVE_VULKAN - delete device; + surface.reset(); #endif } @@ -276,8 +279,25 @@ DFrameBuffer *SDLVideo::CreateFrameBuffer () try { assert(device == nullptr); - device = new VulkanDevice(); - fb = new VulkanFrameBuffer(nullptr, vid_fullscreen, device); + + unsigned int count = 64; + const char* names[64]; + if (!I_GetVulkanPlatformExtensions(&count, names)) + VulkanError("I_GetVulkanPlatformExtensions failed"); + + VulkanInstanceBuilder builder; + builder.DebugLayer(vk_debug); + for (unsigned int i = 0; i < count; i++) + builder.RequireExtension(names[i]); + auto instance = builder.Create(); + + VkSurfaceKHR surfacehandle = nullptr; + if (!I_CreateVulkanSurface(instance->Instance, &surfacehandle)) + VulkanError("I_CreateVulkanSurface failed"); + + surface = std::make_shared(instance, surfacehandle); + + fb = new VulkanRenderDevice(nullptr, vid_fullscreen, surface); } catch (CVulkanError const &error) { diff --git a/src/common/platform/win32/win32vulkanvideo.cpp b/src/common/platform/win32/win32vulkanvideo.cpp index f34ba99b8e..25cf661cac 100644 --- a/src/common/platform/win32/win32vulkanvideo.cpp +++ b/src/common/platform/win32/win32vulkanvideo.cpp @@ -6,7 +6,7 @@ #define VK_USE_PLATFORM_WIN32_KHR #endif -#include "volk/volk.h" +#include #include "i_mainwindow.h" void I_GetVulkanDrawableSize(int *width, int *height) diff --git a/src/common/platform/win32/win32vulkanvideo.h b/src/common/platform/win32/win32vulkanvideo.h index 0e77d18a74..1cd070f2a0 100644 --- a/src/common/platform/win32/win32vulkanvideo.h +++ b/src/common/platform/win32/win32vulkanvideo.h @@ -2,10 +2,17 @@ #include "win32basevideo.h" #include "c_cvars.h" -#include "vulkan/system/vk_framebuffer.h" +#include "vulkan/system/vk_renderdevice.h" +#include +#include +void I_GetVulkanDrawableSize(int* width, int* height); +bool I_CreateVulkanSurface(VkInstance instance, VkSurfaceKHR* surface); +bool I_GetVulkanPlatformExtensions(unsigned int* count, const char** names); EXTERN_CVAR(Bool, vid_fullscreen) +EXTERN_CVAR(Bool, vk_debug) +EXTERN_CVAR(Int, vk_device) //========================================================================== // @@ -15,27 +22,40 @@ EXTERN_CVAR(Bool, vid_fullscreen) class Win32VulkanVideo : public Win32BaseVideo { - VulkanDevice *device = nullptr; + std::shared_ptr surface; public: Win32VulkanVideo() { - device = new VulkanDevice(); + unsigned int count = 64; + const char* names[64]; + if (!I_GetVulkanPlatformExtensions(&count, names)) + VulkanError("I_GetVulkanPlatformExtensions failed"); + + VulkanInstanceBuilder builder; + builder.DebugLayer(vk_debug); + for (unsigned int i = 0; i < count; i++) + builder.RequireExtension(names[i]); + auto instance = builder.Create(); + + VkSurfaceKHR surfacehandle = nullptr; + if (!I_CreateVulkanSurface(instance->Instance, &surfacehandle)) + VulkanError("I_CreateVulkanSurface failed"); + + surface = std::make_shared(instance, surfacehandle); } ~Win32VulkanVideo() { - delete device; } void Shutdown() override { - delete device; - device = nullptr; + surface.reset(); } DFrameBuffer *CreateFrameBuffer() override { - auto fb = new VulkanFrameBuffer(m_hMonitor, vid_fullscreen, device); + auto fb = new VulkanRenderDevice(m_hMonitor, vid_fullscreen, surface); return fb; } diff --git a/src/common/rendering/vulkan/renderer/vk_descriptorset.cpp b/src/common/rendering/vulkan/renderer/vk_descriptorset.cpp index ef6646580a..1c36f865ba 100644 --- a/src/common/rendering/vulkan/renderer/vk_descriptorset.cpp +++ b/src/common/rendering/vulkan/renderer/vk_descriptorset.cpp @@ -28,8 +28,8 @@ #include "vulkan/textures/vk_renderbuffers.h" #include "vulkan/textures/vk_hwtexture.h" #include "vulkan/textures/vk_texture.h" -#include "vulkan/system/vk_builders.h" -#include "vulkan/system/vk_framebuffer.h" +#include +#include "vulkan/system/vk_renderdevice.h" #include "vulkan/system/vk_hwbuffer.h" #include "vulkan/system/vk_commandbuffer.h" #include "vulkan/system/vk_buffer.h" @@ -37,7 +37,7 @@ #include "hw_viewpointuniforms.h" #include "v_2ddrawer.h" -VkDescriptorSetManager::VkDescriptorSetManager(VulkanFrameBuffer* fb) : fb(fb) +VkDescriptorSetManager::VkDescriptorSetManager(VulkanRenderDevice* fb) : fb(fb) { CreateHWBufferSetLayout(); CreateFixedSetLayout(); @@ -86,7 +86,7 @@ void VkDescriptorSetManager::UpdateHWBufferSet() .AddBuffer(HWBufferSet.get(), 2, VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC, fb->GetBufferManager()->StreamBuffer->UniformBuffer->mBuffer.get(), 0, sizeof(StreamUBO)) .AddBuffer(HWBufferSet.get(), 3, VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, fb->GetBufferManager()->LightBufferSSO->mBuffer.get()) .AddBuffer(HWBufferSet.get(), 4, VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, fb->GetBufferManager()->BoneBufferSSO->mBuffer.get()) - .Execute(fb->device); + .Execute(fb->device.get()); } void VkDescriptorSetManager::UpdateFixedSet() @@ -105,7 +105,7 @@ void VkDescriptorSetManager::UpdateFixedSet() update.AddCombinedImageSampler(FixedSet.get(), 1, fb->GetTextureManager()->Lightmap.View.get(), fb->GetSamplerManager()->LightmapSampler.get(), VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL); if (fb->RaytracingEnabled()) update.AddAccelerationStructure(FixedSet.get(), 2, fb->GetRaytrace()->GetAccelStruct()); - update.Execute(fb->device); + update.Execute(fb->device.get()); } void VkDescriptorSetManager::ResetHWTextureSets() @@ -136,7 +136,7 @@ VulkanDescriptorSet* VkDescriptorSetManager::GetNullTextureDescriptorSet() { update.AddCombinedImageSampler(NullTextureDescriptorSet.get(), i, fb->GetTextureManager()->GetNullTextureView(), fb->GetSamplerManager()->Get(CLAMP_XY_NOMIP), VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL); } - update.Execute(fb->device); + update.Execute(fb->device.get()); } return NullTextureDescriptorSet.get(); @@ -153,7 +153,7 @@ std::unique_ptr VkDescriptorSetManager::AllocateTextureDesc .AddPoolSize(VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, TextureDescriptorsLeft) .MaxSets(TextureDescriptorSetsLeft) .DebugName("VkDescriptorSetManager.TextureDescriptorPool") - .Create(fb->device)); + .Create(fb->device.get())); } TextureDescriptorSetsLeft--; @@ -176,7 +176,7 @@ VulkanDescriptorSetLayout* VkDescriptorSetManager::GetTextureSetLayout(int numLa builder.AddBinding(i, VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, 1, VK_SHADER_STAGE_FRAGMENT_BIT); } builder.DebugName("VkDescriptorSetManager.TextureSetLayout"); - layout = builder.Create(fb->device); + layout = builder.Create(fb->device.get()); return layout.get(); } @@ -217,7 +217,7 @@ VulkanDescriptorSet* VkDescriptorSetManager::GetInput(VkPPRenderPassSetup* passS write.AddBuffer(descriptors.get(), LIGHTLIST_BINDINGPOINT, VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, fb->GetBufferManager()->LightList->mBuffer.get()); } - write.Execute(fb->device); + write.Execute(fb->device.get()); imageTransition.Execute(fb->GetCommands()->GetDrawCommands()); VulkanDescriptorSet* set = descriptors.get(); @@ -241,7 +241,7 @@ std::unique_ptr VkDescriptorSetManager::AllocatePPDescripto .AddPoolSize(VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, 4) .MaxSets(100) .DebugName("PPDescriptorPool") - .Create(fb->device); + .Create(fb->device.get()); return PPDescriptorPool->allocate(layout); } @@ -255,7 +255,7 @@ void VkDescriptorSetManager::CreateHWBufferSetLayout() .AddBinding(3, VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, 1, VK_SHADER_STAGE_FRAGMENT_BIT) .AddBinding(4, VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, 1, VK_SHADER_STAGE_VERTEX_BIT) .DebugName("VkDescriptorSetManager.HWBufferSetLayout") - .Create(fb->device); + .Create(fb->device.get()); } void VkDescriptorSetManager::CreateFixedSetLayout() @@ -266,7 +266,7 @@ void VkDescriptorSetManager::CreateFixedSetLayout() if (fb->RaytracingEnabled()) builder.AddBinding(2, VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_KHR, 1, VK_SHADER_STAGE_FRAGMENT_BIT); builder.DebugName("VkDescriptorSetManager.FixedSetLayout"); - FixedSetLayout = builder.Create(fb->device); + FixedSetLayout = builder.Create(fb->device.get()); } void VkDescriptorSetManager::CreateHWBufferPool() @@ -276,7 +276,7 @@ void VkDescriptorSetManager::CreateHWBufferPool() .AddPoolSize(VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, 2 * maxSets) .MaxSets(maxSets) .DebugName("VkDescriptorSetManager.HWBufferDescriptorPool") - .Create(fb->device); + .Create(fb->device.get()); } void VkDescriptorSetManager::CreateFixedSetPool() @@ -287,5 +287,5 @@ void VkDescriptorSetManager::CreateFixedSetPool() poolbuilder.AddPoolSize(VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_KHR, 1 * maxSets); poolbuilder.MaxSets(maxSets); poolbuilder.DebugName("VkDescriptorSetManager.FixedDescriptorPool"); - FixedDescriptorPool = poolbuilder.Create(fb->device); + FixedDescriptorPool = poolbuilder.Create(fb->device.get()); } diff --git a/src/common/rendering/vulkan/renderer/vk_descriptorset.h b/src/common/rendering/vulkan/renderer/vk_descriptorset.h index 12b8131fb1..bbba2a9188 100644 --- a/src/common/rendering/vulkan/renderer/vk_descriptorset.h +++ b/src/common/rendering/vulkan/renderer/vk_descriptorset.h @@ -1,10 +1,11 @@ #pragma once -#include "vulkan/system/vk_objects.h" +#include "zvulkan/vulkanobjects.h" #include +#include "tarray.h" -class VulkanFrameBuffer; +class VulkanRenderDevice; class VkMaterial; class PPTextureInput; class VkPPRenderPassSetup; @@ -12,7 +13,7 @@ class VkPPRenderPassSetup; class VkDescriptorSetManager { public: - VkDescriptorSetManager(VulkanFrameBuffer* fb); + VkDescriptorSetManager(VulkanRenderDevice* fb); ~VkDescriptorSetManager(); void Init(); @@ -45,7 +46,7 @@ private: std::unique_ptr AllocatePPDescriptorSet(VulkanDescriptorSetLayout* layout); - VulkanFrameBuffer* fb = nullptr; + VulkanRenderDevice* fb = nullptr; std::unique_ptr HWBufferSetLayout; std::unique_ptr FixedSetLayout; diff --git a/src/common/rendering/vulkan/renderer/vk_postprocess.cpp b/src/common/rendering/vulkan/renderer/vk_postprocess.cpp index 0644a527f9..20ca83fd6c 100644 --- a/src/common/rendering/vulkan/renderer/vk_postprocess.cpp +++ b/src/common/rendering/vulkan/renderer/vk_postprocess.cpp @@ -22,10 +22,10 @@ #include "vk_postprocess.h" #include "vulkan/shaders/vk_shader.h" -#include "vulkan/system/vk_builders.h" -#include "vulkan/system/vk_framebuffer.h" +#include +#include +#include "vulkan/system/vk_renderdevice.h" #include "vulkan/system/vk_hwbuffer.h" -#include "vulkan/system/vk_swapchain.h" #include "vulkan/system/vk_commandbuffer.h" #include "vulkan/renderer/vk_renderstate.h" #include "vulkan/renderer/vk_pprenderstate.h" @@ -34,6 +34,7 @@ #include "vulkan/textures/vk_renderbuffers.h" #include "vulkan/textures/vk_imagetransition.h" #include "vulkan/textures/vk_texture.h" +#include "vulkan/textures/vk_framebuffer.h" #include "hw_cvars.h" #include "hwrenderer/postprocessing/hw_postprocess.h" #include "hwrenderer/postprocessing/hw_postprocess_cvars.h" @@ -43,7 +44,7 @@ EXTERN_CVAR(Int, gl_dither_bpc) -VkPostprocess::VkPostprocess(VulkanFrameBuffer* fb) : fb(fb) +VkPostprocess::VkPostprocess(VulkanRenderDevice* fb) : fb(fb) { } @@ -217,7 +218,7 @@ void VkPostprocess::DrawPresentTexture(const IntRect &box, bool applyGamma, bool uniforms.Offset = { 0.0f, 1.0f }; } - if (applyGamma && fb->GetCommands()->swapChain->IsHdrModeActive() && !screenshot) + if (applyGamma && fb->GetFramebufferManager()->SwapChain->Format().colorSpace == VK_COLOR_SPACE_EXTENDED_SRGB_LINEAR_EXT && !screenshot) { uniforms.HdrMode = 1; } diff --git a/src/common/rendering/vulkan/renderer/vk_postprocess.h b/src/common/rendering/vulkan/renderer/vk_postprocess.h index bd284f7b36..138113837d 100644 --- a/src/common/rendering/vulkan/renderer/vk_postprocess.h +++ b/src/common/rendering/vulkan/renderer/vk_postprocess.h @@ -6,8 +6,8 @@ #include #include "hwrenderer/postprocessing/hw_postprocess.h" -#include "vulkan/system/vk_objects.h" -#include "vulkan/system/vk_builders.h" +#include "zvulkan/vulkanobjects.h" +#include "zvulkan/vulkanbuilders.h" #include "vulkan/textures/vk_imagetransition.h" class FString; @@ -15,12 +15,12 @@ class FString; class VkPPShader; class VkPPTexture; class PipelineBarrier; -class VulkanFrameBuffer; +class VulkanRenderDevice; class VkPostprocess { public: - VkPostprocess(VulkanFrameBuffer* fb); + VkPostprocess(VulkanRenderDevice* fb); ~VkPostprocess(); void SetActiveRenderTarget(); @@ -43,7 +43,7 @@ public: private: void NextEye(int eyeCount); - VulkanFrameBuffer* fb = nullptr; + VulkanRenderDevice* fb = nullptr; int mCurrentPipelineImage = 0; diff --git a/src/common/rendering/vulkan/renderer/vk_pprenderstate.cpp b/src/common/rendering/vulkan/renderer/vk_pprenderstate.cpp index 3ef6d02513..838ca3fe24 100644 --- a/src/common/rendering/vulkan/renderer/vk_pprenderstate.cpp +++ b/src/common/rendering/vulkan/renderer/vk_pprenderstate.cpp @@ -22,20 +22,21 @@ #include "vk_pprenderstate.h" #include "vk_postprocess.h" -#include "vulkan/system/vk_framebuffer.h" +#include "vulkan/system/vk_renderdevice.h" #include "vulkan/system/vk_commandbuffer.h" -#include "vulkan/system/vk_swapchain.h" +#include #include "vulkan/system/vk_buffer.h" #include "vulkan/shaders/vk_ppshader.h" #include "vulkan/textures/vk_pptexture.h" #include "vulkan/textures/vk_renderbuffers.h" #include "vulkan/textures/vk_samplers.h" #include "vulkan/textures/vk_texture.h" +#include "vulkan/textures/vk_framebuffer.h" #include "vulkan/renderer/vk_renderstate.h" #include "vulkan/renderer/vk_descriptorset.h" #include "flatvertices.h" -VkPPRenderState::VkPPRenderState(VulkanFrameBuffer* fb) : fb(fb) +VkPPRenderState::VkPPRenderState(VulkanRenderDevice* fb) : fb(fb) { } @@ -63,7 +64,7 @@ void VkPPRenderState::Draw() if (Output.Type == PPTextureType::PPTexture) key.OutputFormat = fb->GetTextureManager()->GetTextureFormat(Output.Texture); else if (Output.Type == PPTextureType::SwapChain) - key.OutputFormat = fb->GetCommands()->swapChain->swapChainFormat.format; + key.OutputFormat = fb->GetFramebufferManager()->SwapChain->Format().format; else if (Output.Type == PPTextureType::ShadowMap) key.OutputFormat = VK_FORMAT_R32_SFLOAT; else @@ -114,16 +115,16 @@ void VkPPRenderState::RenderScreenQuad(VkPPRenderPassSetup *passSetup, VulkanDes scissor.extent.width = framebufferWidth; scissor.extent.height = framebufferHeight; - RenderPassBegin beginInfo; - beginInfo.setRenderPass(passSetup->RenderPass.get()); - beginInfo.setRenderArea(0, 0, framebufferWidth, framebufferHeight); - beginInfo.setFramebuffer(framebuffer); - beginInfo.addClearColor(0.0f, 0.0f, 0.0f, 1.0f); + RenderPassBegin() + .RenderPass(passSetup->RenderPass.get()) + .RenderArea(0, 0, framebufferWidth, framebufferHeight) + .Framebuffer(framebuffer) + .AddClearColor(0.0f, 0.0f, 0.0f, 1.0f) + .Execute(cmdbuffer); VkBuffer vertexBuffers[] = { static_cast(screen->mVertexData->GetBufferObjects().first)->mBuffer->buffer }; VkDeviceSize offsets[] = { 0 }; - cmdbuffer->beginRenderPass(beginInfo); cmdbuffer->bindPipeline(VK_PIPELINE_BIND_POINT_GRAPHICS, passSetup->Pipeline.get()); cmdbuffer->bindDescriptorSet(VK_PIPELINE_BIND_POINT_GRAPHICS, passSetup->PipelineLayout.get(), 0, descriptorSet); cmdbuffer->bindVertexBuffers(0, 1, vertexBuffers, offsets); diff --git a/src/common/rendering/vulkan/renderer/vk_pprenderstate.h b/src/common/rendering/vulkan/renderer/vk_pprenderstate.h index 36102cc01c..b0824bc188 100644 --- a/src/common/rendering/vulkan/renderer/vk_pprenderstate.h +++ b/src/common/rendering/vulkan/renderer/vk_pprenderstate.h @@ -2,18 +2,18 @@ #pragma once #include "hwrenderer/postprocessing/hw_postprocess.h" -#include "vulkan/system/vk_objects.h" +#include class VkPPRenderPassSetup; class VkPPShader; class VkPPTexture; class VkTextureImage; -class VulkanFrameBuffer; +class VulkanRenderDevice; class VkPPRenderState : public PPRenderState { public: - VkPPRenderState(VulkanFrameBuffer* fb); + VkPPRenderState(VulkanRenderDevice* fb); void PushGroup(const FString &name) override; void PopGroup() override; @@ -23,5 +23,5 @@ public: private: void RenderScreenQuad(VkPPRenderPassSetup *passSetup, VulkanDescriptorSet *descriptorSet, VulkanFramebuffer *framebuffer, int framebufferWidth, int framebufferHeight, int x, int y, int width, int height, const void *pushConstants, uint32_t pushConstantsSize, bool stencilTest); - VulkanFrameBuffer* fb = nullptr; + VulkanRenderDevice* fb = nullptr; }; diff --git a/src/common/rendering/vulkan/renderer/vk_raytrace.cpp b/src/common/rendering/vulkan/renderer/vk_raytrace.cpp index 3dd0cb0e31..084c475eb2 100644 --- a/src/common/rendering/vulkan/renderer/vk_raytrace.cpp +++ b/src/common/rendering/vulkan/renderer/vk_raytrace.cpp @@ -21,12 +21,12 @@ */ #include "vk_raytrace.h" -#include "vulkan/system/vk_builders.h" -#include "vulkan/system/vk_framebuffer.h" +#include "zvulkan/vulkanbuilders.h" +#include "vulkan/system/vk_renderdevice.h" #include "vulkan/system/vk_commandbuffer.h" #include "hw_levelmesh.h" -VkRaytrace::VkRaytrace(VulkanFrameBuffer* fb) : fb(fb) +VkRaytrace::VkRaytrace(VulkanRenderDevice* fb) : fb(fb) { NullMesh.MeshVertices.Push({ -1.0f, -1.0f, -1.0f }); NullMesh.MeshVertices.Push({ 1.0f, -1.0f, -1.0f }); @@ -99,7 +99,7 @@ void VkRaytrace::CreateVertexAndIndexBuffers() .Usage(VK_BUFFER_USAGE_TRANSFER_SRC_BIT, VMA_MEMORY_USAGE_CPU_ONLY) .Size(transferbuffersize) .DebugName("transferBuffer") - .Create(fb->device); + .Create(fb->device.get()); uint8_t* data = (uint8_t*)transferBuffer->Map(0, transferbuffersize); memcpy(data + vertexoffset, Mesh->MeshVertices.Data(), vertexbuffersize); @@ -114,7 +114,7 @@ void VkRaytrace::CreateVertexAndIndexBuffers() VK_BUFFER_USAGE_ACCELERATION_STRUCTURE_BUILD_INPUT_READ_ONLY_BIT_KHR) .Size(vertexbuffersize) .DebugName("vertexBuffer") - .Create(fb->device); + .Create(fb->device.get()); indexBuffer = BufferBuilder() .Usage( @@ -124,7 +124,7 @@ void VkRaytrace::CreateVertexAndIndexBuffers() VK_BUFFER_USAGE_ACCELERATION_STRUCTURE_BUILD_INPUT_READ_ONLY_BIT_KHR) .Size(indexbuffersize) .DebugName("indexBuffer") - .Create(fb->device); + .Create(fb->device.get()); fb->GetCommands()->GetTransferCommands()->copyBuffer(transferBuffer.get(), vertexBuffer.get(), vertexoffset); fb->GetCommands()->GetTransferCommands()->copyBuffer(transferBuffer.get(), indexBuffer.get(), indexoffset); @@ -168,19 +168,19 @@ void VkRaytrace::CreateBottomLevelAccelerationStructure() .Usage(VK_BUFFER_USAGE_ACCELERATION_STRUCTURE_STORAGE_BIT_KHR | VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT) .Size(sizeInfo.accelerationStructureSize) .DebugName("blAccelStructBuffer") - .Create(fb->device); + .Create(fb->device.get()); blAccelStruct = AccelerationStructureBuilder() .Type(VK_ACCELERATION_STRUCTURE_TYPE_BOTTOM_LEVEL_KHR) .Buffer(blAccelStructBuffer.get(), sizeInfo.accelerationStructureSize) .DebugName("blAccelStruct") - .Create(fb->device); + .Create(fb->device.get()); blScratchBuffer = BufferBuilder() .Usage(VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT | VK_BUFFER_USAGE_STORAGE_BUFFER_BIT) .Size(sizeInfo.buildScratchSize) .DebugName("blScratchBuffer") - .Create(fb->device); + .Create(fb->device.get()); buildInfo.dstAccelerationStructure = blAccelStruct->accelstruct; buildInfo.scratchData.deviceAddress = blScratchBuffer->GetDeviceAddress(); @@ -208,7 +208,7 @@ void VkRaytrace::CreateTopLevelAccelerationStructure() .Usage(VK_BUFFER_USAGE_TRANSFER_SRC_BIT, VMA_MEMORY_USAGE_CPU_ONLY) .Size(sizeof(VkAccelerationStructureInstanceKHR)) .DebugName("tlTransferBuffer") - .Create(fb->device); + .Create(fb->device.get()); auto data = (uint8_t*)tlTransferBuffer->Map(0, sizeof(VkAccelerationStructureInstanceKHR)); memcpy(data, &instance, sizeof(VkAccelerationStructureInstanceKHR)); @@ -218,7 +218,7 @@ void VkRaytrace::CreateTopLevelAccelerationStructure() .Usage(VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT | VK_BUFFER_USAGE_ACCELERATION_STRUCTURE_BUILD_INPUT_READ_ONLY_BIT_KHR | VK_BUFFER_USAGE_TRANSFER_DST_BIT) .Size(sizeof(VkAccelerationStructureInstanceKHR)) .DebugName("tlInstanceBuffer") - .Create(fb->device); + .Create(fb->device.get()); fb->GetCommands()->GetTransferCommands()->copyBuffer(tlTransferBuffer.get(), tlInstanceBuffer.get()); @@ -252,19 +252,19 @@ void VkRaytrace::CreateTopLevelAccelerationStructure() .Usage(VK_BUFFER_USAGE_ACCELERATION_STRUCTURE_STORAGE_BIT_KHR | VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT) .Size(sizeInfo.accelerationStructureSize) .DebugName("tlAccelStructBuffer") - .Create(fb->device); + .Create(fb->device.get()); tlAccelStruct = AccelerationStructureBuilder() .Type(VK_ACCELERATION_STRUCTURE_TYPE_TOP_LEVEL_KHR) .Buffer(tlAccelStructBuffer.get(), sizeInfo.accelerationStructureSize) .DebugName("tlAccelStruct") - .Create(fb->device); + .Create(fb->device.get()); tlScratchBuffer = BufferBuilder() .Usage(VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT | VK_BUFFER_USAGE_STORAGE_BUFFER_BIT) .Size(sizeInfo.buildScratchSize) .DebugName("tlScratchBuffer") - .Create(fb->device); + .Create(fb->device.get()); buildInfo.dstAccelerationStructure = tlAccelStruct->accelstruct; buildInfo.scratchData.deviceAddress = tlScratchBuffer->GetDeviceAddress(); diff --git a/src/common/rendering/vulkan/renderer/vk_raytrace.h b/src/common/rendering/vulkan/renderer/vk_raytrace.h index ae6f34ac9a..e54a9c623d 100644 --- a/src/common/rendering/vulkan/renderer/vk_raytrace.h +++ b/src/common/rendering/vulkan/renderer/vk_raytrace.h @@ -1,15 +1,15 @@ #pragma once -#include "vulkan/system/vk_objects.h" +#include "zvulkan/vulkanobjects.h" #include "hw_levelmesh.h" -class VulkanFrameBuffer; +class VulkanRenderDevice; class VkRaytrace { public: - VkRaytrace(VulkanFrameBuffer* fb); + VkRaytrace(VulkanRenderDevice* fb); void SetLevelMesh(hwrenderer::LevelMesh* mesh); @@ -22,7 +22,7 @@ private: void CreateBottomLevelAccelerationStructure(); void CreateTopLevelAccelerationStructure(); - VulkanFrameBuffer* fb = nullptr; + VulkanRenderDevice* fb = nullptr; hwrenderer::LevelMesh NullMesh; hwrenderer::LevelMesh* Mesh = nullptr; diff --git a/src/common/rendering/vulkan/renderer/vk_renderpass.cpp b/src/common/rendering/vulkan/renderer/vk_renderpass.cpp index 4a7531b746..a5d1400cdc 100644 --- a/src/common/rendering/vulkan/renderer/vk_renderpass.cpp +++ b/src/common/rendering/vulkan/renderer/vk_renderpass.cpp @@ -28,14 +28,14 @@ #include "vulkan/textures/vk_samplers.h" #include "vulkan/shaders/vk_shader.h" #include "vulkan/shaders/vk_ppshader.h" -#include "vulkan/system/vk_builders.h" -#include "vulkan/system/vk_framebuffer.h" +#include +#include "vulkan/system/vk_renderdevice.h" #include "vulkan/system/vk_hwbuffer.h" #include "flatvertices.h" #include "hw_viewpointuniforms.h" #include "v_2ddrawer.h" -VkRenderPassManager::VkRenderPassManager(VulkanFrameBuffer* fb) : fb(fb) +VkRenderPassManager::VkRenderPassManager(VulkanRenderDevice* fb) : fb(fb) { } @@ -118,7 +118,7 @@ VulkanPipelineLayout* VkRenderPassManager::GetPipelineLayout(int numLayers) builder.AddSetLayout(descriptors->GetTextureSetLayout(numLayers)); builder.AddPushConstantRange(VK_SHADER_STAGE_VERTEX_BIT | VK_SHADER_STAGE_FRAGMENT_BIT, 0, sizeof(PushConstants)); builder.DebugName("VkRenderPassManager.PipelineLayout"); - layout = builder.Create(fb->device); + layout = builder.Create(fb->device.get()); return layout.get(); } @@ -132,7 +132,7 @@ VkPPRenderPassSetup* VkRenderPassManager::GetPPRenderPass(const VkPPRenderPassKe ///////////////////////////////////////////////////////////////////////////// -VkRenderPassSetup::VkRenderPassSetup(VulkanFrameBuffer* fb, const VkRenderPassKey &key) : PassKey(key), fb(fb) +VkRenderPassSetup::VkRenderPassSetup(VulkanRenderDevice* fb, const VkRenderPassKey &key) : PassKey(key), fb(fb) { } @@ -185,7 +185,7 @@ std::unique_ptr VkRenderPassSetup::CreateRenderPass(int clearT VK_ACCESS_COLOR_ATTACHMENT_READ_BIT); } builder.DebugName("VkRenderPassSetup.RenderPass"); - return builder.Create(fb->device); + return builder.Create(fb->device.get()); } VulkanRenderPass *VkRenderPassSetup::GetRenderPass(int clearTargets) @@ -273,7 +273,7 @@ std::unique_ptr VkRenderPassSetup::CreatePipeline(const VkPipeli builder.Topology(vktopology[key.DrawType]); builder.DepthStencilEnable(key.DepthTest, key.DepthWrite, key.StencilTest); builder.DepthFunc(depthfunc2vk[key.DepthFunc]); - if (fb->device->UsedDeviceFeatures.depthClamp) + if (fb->device->EnabledFeatures.Features.depthClamp) builder.DepthClampEnable(key.DepthClamp); builder.DepthBias(key.DepthBias, 0.0f, 0.0f, 0.0f); @@ -283,7 +283,7 @@ std::unique_ptr VkRenderPassSetup::CreatePipeline(const VkPipeli builder.ColorWriteMask((VkColorComponentFlags)key.ColorMask); builder.Stencil(VK_STENCIL_OP_KEEP, op2vk[key.StencilPassOp], VK_STENCIL_OP_KEEP, VK_COMPARE_OP_EQUAL, 0xffffffff, 0xffffffff, 0); - builder.BlendMode(key.RenderStyle); + BlendMode(builder, key.RenderStyle); builder.SubpassColorAttachmentCount(PassKey.DrawBuffers); builder.RasterizationSamples((VkSampleCountFlagBits)PassKey.Samples); @@ -291,12 +291,12 @@ std::unique_ptr VkRenderPassSetup::CreatePipeline(const VkPipeli builder.RenderPass(GetRenderPass(0)); builder.DebugName("VkRenderPassSetup.Pipeline"); - return builder.Create(fb->device); + return builder.Create(fb->device.get()); } ///////////////////////////////////////////////////////////////////////////// -VkPPRenderPassSetup::VkPPRenderPassSetup(VulkanFrameBuffer* fb, const VkPPRenderPassKey& key) : fb(fb) +VkPPRenderPassSetup::VkPPRenderPassSetup(VulkanRenderDevice* fb, const VkPPRenderPassKey& key) : fb(fb) { CreateDescriptorLayout(key); CreatePipelineLayout(key); @@ -316,7 +316,7 @@ void VkPPRenderPassSetup::CreateDescriptorLayout(const VkPPRenderPassKey& key) builder.AddBinding(LIGHTLIST_BINDINGPOINT, VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, 1, VK_SHADER_STAGE_FRAGMENT_BIT); } builder.DebugName("VkPPRenderPassSetup.DescriptorLayout"); - DescriptorLayout = builder.Create(fb->device); + DescriptorLayout = builder.Create(fb->device.get()); } void VkPPRenderPassSetup::CreatePipelineLayout(const VkPPRenderPassKey& key) @@ -326,7 +326,7 @@ void VkPPRenderPassSetup::CreatePipelineLayout(const VkPPRenderPassKey& key) if (key.Uniforms > 0) builder.AddPushConstantRange(VK_SHADER_STAGE_FRAGMENT_BIT, 0, key.Uniforms); builder.DebugName("VkPPRenderPassSetup.PipelineLayout"); - PipelineLayout = builder.Create(fb->device); + PipelineLayout = builder.Create(fb->device.get()); } void VkPPRenderPassSetup::CreatePipeline(const VkPPRenderPassKey& key) @@ -350,12 +350,12 @@ void VkPPRenderPassSetup::CreatePipeline(const VkPPRenderPassKey& key) builder.Stencil(VK_STENCIL_OP_KEEP, VK_STENCIL_OP_KEEP, VK_STENCIL_OP_KEEP, VK_COMPARE_OP_EQUAL, 0xffffffff, 0xffffffff, 0); } builder.Topology(VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP); - builder.BlendMode(key.BlendMode); + BlendMode(builder, key.BlendMode); builder.RasterizationSamples(key.Samples); builder.Layout(PipelineLayout.get()); builder.RenderPass(RenderPass.get()); builder.DebugName("VkPPRenderPassSetup.Pipeline"); - Pipeline = builder.Create(fb->device); + Pipeline = builder.Create(fb->device.get()); } void VkPPRenderPassSetup::CreateRenderPass(const VkPPRenderPassKey& key) @@ -403,5 +403,46 @@ void VkPPRenderPassSetup::CreateRenderPass(const VkPPRenderPassKey& key) } builder.DebugName("VkPPRenderPassSetup.RenderPass"); - RenderPass = builder.Create(fb->device); + RenderPass = builder.Create(fb->device.get()); +} + +///////////////////////////////////////////////////////////////////////////// + +GraphicsPipelineBuilder& BlendMode(GraphicsPipelineBuilder& builder, const FRenderStyle& style) +{ + // Just in case Vulkan doesn't do this optimization itself + if (style.BlendOp == STYLEOP_Add && style.SrcAlpha == STYLEALPHA_One && style.DestAlpha == STYLEALPHA_Zero && style.Flags == 0) + { + return builder; + } + + static const int blendstyles[] = { + VK_BLEND_FACTOR_ZERO, + VK_BLEND_FACTOR_ONE, + VK_BLEND_FACTOR_SRC_ALPHA, + VK_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA, + VK_BLEND_FACTOR_SRC_COLOR, + VK_BLEND_FACTOR_ONE_MINUS_SRC_COLOR, + VK_BLEND_FACTOR_DST_COLOR, + VK_BLEND_FACTOR_ONE_MINUS_DST_COLOR, + VK_BLEND_FACTOR_DST_ALPHA, + VK_BLEND_FACTOR_ONE_MINUS_DST_ALPHA, + }; + + static const int renderops[] = { + 0, VK_BLEND_OP_ADD, VK_BLEND_OP_SUBTRACT, VK_BLEND_OP_REVERSE_SUBTRACT, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 + }; + + int srcblend = blendstyles[style.SrcAlpha % STYLEALPHA_MAX]; + int dstblend = blendstyles[style.DestAlpha % STYLEALPHA_MAX]; + int blendequation = renderops[style.BlendOp & 15]; + + if (blendequation == -1) // This was a fuzz style. + { + srcblend = VK_BLEND_FACTOR_DST_COLOR; + dstblend = VK_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA; + blendequation = VK_BLEND_OP_ADD; + } + + return builder.BlendMode((VkBlendOp)blendequation, (VkBlendFactor)srcblend, (VkBlendFactor)dstblend); } diff --git a/src/common/rendering/vulkan/renderer/vk_renderpass.h b/src/common/rendering/vulkan/renderer/vk_renderpass.h index 06cb47992f..1e99ae1cee 100644 --- a/src/common/rendering/vulkan/renderer/vk_renderpass.h +++ b/src/common/rendering/vulkan/renderer/vk_renderpass.h @@ -1,7 +1,7 @@ #pragma once -#include "vulkan/system/vk_objects.h" +#include "zvulkan/vulkanobjects.h" #include "renderstyle.h" #include "hwrenderer/data/buffers.h" #include "hwrenderer/postprocessing/hw_postprocess.h" @@ -9,8 +9,9 @@ #include #include -class VulkanFrameBuffer; +class VulkanRenderDevice; class VkPPShader; +class GraphicsPipelineBuilder; class VkPipelineKey { @@ -53,7 +54,7 @@ public: class VkRenderPassSetup { public: - VkRenderPassSetup(VulkanFrameBuffer* fb, const VkRenderPassKey &key); + VkRenderPassSetup(VulkanRenderDevice* fb, const VkRenderPassKey &key); VulkanRenderPass *GetRenderPass(int clearTargets); VulkanPipeline *GetPipeline(const VkPipelineKey &key); @@ -66,7 +67,7 @@ private: std::unique_ptr CreateRenderPass(int clearTargets); std::unique_ptr CreatePipeline(const VkPipelineKey &key); - VulkanFrameBuffer* fb = nullptr; + VulkanRenderDevice* fb = nullptr; }; class VkVertexFormat @@ -101,7 +102,7 @@ public: class VkPPRenderPassSetup { public: - VkPPRenderPassSetup(VulkanFrameBuffer* fb, const VkPPRenderPassKey& key); + VkPPRenderPassSetup(VulkanRenderDevice* fb, const VkPPRenderPassKey& key); std::unique_ptr DescriptorLayout; std::unique_ptr PipelineLayout; @@ -114,13 +115,15 @@ private: void CreatePipeline(const VkPPRenderPassKey& key); void CreateRenderPass(const VkPPRenderPassKey& key); - VulkanFrameBuffer* fb = nullptr; + VulkanRenderDevice* fb = nullptr; }; +GraphicsPipelineBuilder& BlendMode(GraphicsPipelineBuilder& builder, const FRenderStyle& style); + class VkRenderPassManager { public: - VkRenderPassManager(VulkanFrameBuffer* fb); + VkRenderPassManager(VulkanRenderDevice* fb); ~VkRenderPassManager(); void RenderBuffersReset(); @@ -133,7 +136,7 @@ public: VkPPRenderPassSetup* GetPPRenderPass(const VkPPRenderPassKey& key); private: - VulkanFrameBuffer* fb = nullptr; + VulkanRenderDevice* fb = nullptr; std::map> RenderPassSetup; std::vector> PipelineLayouts; diff --git a/src/common/rendering/vulkan/renderer/vk_renderstate.cpp b/src/common/rendering/vulkan/renderer/vk_renderstate.cpp index cb26679202..76bd35cb09 100644 --- a/src/common/rendering/vulkan/renderer/vk_renderstate.cpp +++ b/src/common/rendering/vulkan/renderer/vk_renderstate.cpp @@ -21,8 +21,8 @@ */ #include "vk_renderstate.h" -#include "vulkan/system/vk_framebuffer.h" -#include "vulkan/system/vk_builders.h" +#include "vulkan/system/vk_renderdevice.h" +#include "zvulkan/vulkanbuilders.h" #include "vulkan/system/vk_commandbuffer.h" #include "vulkan/system/vk_buffer.h" #include "vulkan/renderer/vk_renderpass.h" @@ -42,7 +42,7 @@ CVAR(Int, vk_submit_size, 1000, 0); EXTERN_CVAR(Bool, r_skipmats) -VkRenderState::VkRenderState(VulkanFrameBuffer* fb) : fb(fb), mStreamBufferWriter(fb), mMatrixBufferWriter(fb) +VkRenderState::VkRenderState(VulkanRenderDevice* fb) : fb(fb), mStreamBufferWriter(fb), mMatrixBufferWriter(fb) { Reset(); } @@ -555,7 +555,7 @@ void VkRenderState::BeginRenderPass(VulkanCommandBuffer *cmdbuffer) if (key.DepthStencil) builder.AddAttachment(mRenderTarget.DepthStencil); builder.DebugName("VkRenderPassSetup.Framebuffer"); - framebuffer = builder.Create(fb->device); + framebuffer = builder.Create(fb->device.get()); } // Only clear depth+stencil if the render target actually has that @@ -563,16 +563,16 @@ void VkRenderState::BeginRenderPass(VulkanCommandBuffer *cmdbuffer) mClearTargets &= ~(CT_Depth | CT_Stencil); RenderPassBegin beginInfo; - beginInfo.setRenderPass(mPassSetup->GetRenderPass(mClearTargets)); - beginInfo.setRenderArea(0, 0, mRenderTarget.Width, mRenderTarget.Height); - beginInfo.setFramebuffer(framebuffer.get()); - beginInfo.addClearColor(screen->mSceneClearColor[0], screen->mSceneClearColor[1], screen->mSceneClearColor[2], screen->mSceneClearColor[3]); + beginInfo.RenderPass(mPassSetup->GetRenderPass(mClearTargets)); + beginInfo.RenderArea(0, 0, mRenderTarget.Width, mRenderTarget.Height); + beginInfo.Framebuffer(framebuffer.get()); + beginInfo.AddClearColor(screen->mSceneClearColor[0], screen->mSceneClearColor[1], screen->mSceneClearColor[2], screen->mSceneClearColor[3]); if (key.DrawBuffers > 1) - beginInfo.addClearColor(0.0f, 0.0f, 0.0f, 0.0f); + beginInfo.AddClearColor(0.0f, 0.0f, 0.0f, 0.0f); if (key.DrawBuffers > 2) - beginInfo.addClearColor(0.0f, 0.0f, 0.0f, 0.0f); - beginInfo.addClearDepthStencil(1.0f, 0); - cmdbuffer->beginRenderPass(beginInfo); + beginInfo.AddClearColor(0.0f, 0.0f, 0.0f, 0.0f); + beginInfo.AddClearDepthStencil(1.0f, 0); + beginInfo.Execute(cmdbuffer); mMaterial.mChanged = true; mClearTargets = 0; diff --git a/src/common/rendering/vulkan/renderer/vk_renderstate.h b/src/common/rendering/vulkan/renderer/vk_renderstate.h index 5dc463bfbe..cc2e0d9081 100644 --- a/src/common/rendering/vulkan/renderer/vk_renderstate.h +++ b/src/common/rendering/vulkan/renderer/vk_renderstate.h @@ -11,14 +11,14 @@ #include "hw_renderstate.h" #include "hw_material.h" -class VulkanFrameBuffer; +class VulkanRenderDevice; class VkRenderPassSetup; class VkTextureImage; class VkRenderState : public FRenderState { public: - VkRenderState(VulkanFrameBuffer* fb); + VkRenderState(VulkanRenderDevice* fb); virtual ~VkRenderState() = default; // Draw commands @@ -67,7 +67,7 @@ protected: void BeginRenderPass(VulkanCommandBuffer *cmdbuffer); void WaitForStreamBuffers(); - VulkanFrameBuffer* fb = nullptr; + VulkanRenderDevice* fb = nullptr; bool mDepthClamp = true; VulkanCommandBuffer *mCommandBuffer = nullptr; diff --git a/src/common/rendering/vulkan/renderer/vk_streambuffer.cpp b/src/common/rendering/vulkan/renderer/vk_streambuffer.cpp index 1be05b5d17..0db0fb71a5 100644 --- a/src/common/rendering/vulkan/renderer/vk_streambuffer.cpp +++ b/src/common/rendering/vulkan/renderer/vk_streambuffer.cpp @@ -21,12 +21,12 @@ */ #include "vk_renderstate.h" -#include "vulkan/system/vk_framebuffer.h" -#include "vulkan/system/vk_builders.h" +#include "vulkan/system/vk_renderdevice.h" +#include "zvulkan/vulkanbuilders.h" #include "vulkan/system/vk_buffer.h" #include "vulkan/renderer/vk_streambuffer.h" -VkStreamBufferWriter::VkStreamBufferWriter(VulkanFrameBuffer* fb) +VkStreamBufferWriter::VkStreamBufferWriter(VulkanRenderDevice* fb) { mBuffer = fb->GetBufferManager()->StreamBuffer.get(); } @@ -55,7 +55,7 @@ void VkStreamBufferWriter::Reset() ///////////////////////////////////////////////////////////////////////////// -VkMatrixBufferWriter::VkMatrixBufferWriter(VulkanFrameBuffer* fb) +VkMatrixBufferWriter::VkMatrixBufferWriter(VulkanRenderDevice* fb) { mBuffer = fb->GetBufferManager()->MatrixBuffer.get(); mIdentityMatrix.loadIdentity(); diff --git a/src/common/rendering/vulkan/renderer/vk_streambuffer.h b/src/common/rendering/vulkan/renderer/vk_streambuffer.h index 749bc46e8d..3bae01fb1b 100644 --- a/src/common/rendering/vulkan/renderer/vk_streambuffer.h +++ b/src/common/rendering/vulkan/renderer/vk_streambuffer.h @@ -10,7 +10,7 @@ class VkMatrixBuffer; class VkStreamBufferWriter { public: - VkStreamBufferWriter(VulkanFrameBuffer* fb); + VkStreamBufferWriter(VulkanRenderDevice* fb); bool Write(const StreamData& data); void Reset(); @@ -27,7 +27,7 @@ private: class VkMatrixBufferWriter { public: - VkMatrixBufferWriter(VulkanFrameBuffer* fb); + VkMatrixBufferWriter(VulkanRenderDevice* fb); bool Write(const VSMatrix& modelMatrix, bool modelMatrixEnabled, const VSMatrix& textureMatrix, bool textureMatrixEnabled); void Reset(); diff --git a/src/common/rendering/vulkan/shaders/vk_ppshader.cpp b/src/common/rendering/vulkan/shaders/vk_ppshader.cpp index 225bb6adb3..287762f77e 100644 --- a/src/common/rendering/vulkan/shaders/vk_ppshader.cpp +++ b/src/common/rendering/vulkan/shaders/vk_ppshader.cpp @@ -22,12 +22,12 @@ #include "vk_ppshader.h" #include "vk_shader.h" -#include "vulkan/system/vk_framebuffer.h" -#include "vulkan/system/vk_builders.h" +#include "vulkan/system/vk_renderdevice.h" +#include "zvulkan/vulkanbuilders.h" #include "vulkan/system/vk_commandbuffer.h" #include "filesystem.h" -VkPPShader::VkPPShader(VulkanFrameBuffer* fb, PPShader *shader) : fb(fb) +VkPPShader::VkPPShader(VulkanRenderDevice* fb, PPShader *shader) : fb(fb) { FString prolog; if (!shader->Uniforms.empty()) @@ -35,14 +35,14 @@ VkPPShader::VkPPShader(VulkanFrameBuffer* fb, PPShader *shader) : fb(fb) prolog += shader->Defines; VertexShader = ShaderBuilder() - .VertexShader(LoadShaderCode(shader->VertexShader, "", shader->Version)) + .VertexShader(LoadShaderCode(shader->VertexShader, "", shader->Version).GetChars()) .DebugName(shader->VertexShader.GetChars()) - .Create(shader->VertexShader.GetChars(), fb->device); + .Create(shader->VertexShader.GetChars(), fb->device.get()); FragmentShader = ShaderBuilder() - .FragmentShader(LoadShaderCode(shader->FragmentShader, prolog, shader->Version)) + .FragmentShader(LoadShaderCode(shader->FragmentShader, prolog, shader->Version).GetChars()) .DebugName(shader->FragmentShader.GetChars()) - .Create(shader->FragmentShader.GetChars(), fb->device); + .Create(shader->FragmentShader.GetChars(), fb->device.get()); fb->GetShaderManager()->AddVkPPShader(this); } diff --git a/src/common/rendering/vulkan/shaders/vk_ppshader.h b/src/common/rendering/vulkan/shaders/vk_ppshader.h index 77bc2ea83b..6bb5ce4750 100644 --- a/src/common/rendering/vulkan/shaders/vk_ppshader.h +++ b/src/common/rendering/vulkan/shaders/vk_ppshader.h @@ -2,20 +2,20 @@ #pragma once #include "hwrenderer/postprocessing/hw_postprocess.h" -#include "vulkan/system/vk_objects.h" +#include #include -class VulkanFrameBuffer; +class VulkanRenderDevice; class VkPPShader : public PPShaderBackend { public: - VkPPShader(VulkanFrameBuffer* fb, PPShader *shader); + VkPPShader(VulkanRenderDevice* fb, PPShader *shader); ~VkPPShader(); void Reset(); - VulkanFrameBuffer* fb = nullptr; + VulkanRenderDevice* fb = nullptr; std::list::iterator it; std::unique_ptr VertexShader; diff --git a/src/common/rendering/vulkan/shaders/vk_shader.cpp b/src/common/rendering/vulkan/shaders/vk_shader.cpp index 44c419dda8..1c6df42f12 100644 --- a/src/common/rendering/vulkan/shaders/vk_shader.cpp +++ b/src/common/rendering/vulkan/shaders/vk_shader.cpp @@ -22,13 +22,12 @@ #include "vk_shader.h" #include "vk_ppshader.h" -#include "vulkan/system/vk_builders.h" -#include "vulkan/system/vk_framebuffer.h" +#include "zvulkan/vulkanbuilders.h" +#include "vulkan/system/vk_renderdevice.h" #include "hw_shaderpatcher.h" #include "filesystem.h" #include "engineerrors.h" #include "version.h" -#include bool VkShaderManager::CompileNextShader() { @@ -113,15 +112,13 @@ bool VkShaderManager::CompileNextShader() return false; } -VkShaderManager::VkShaderManager(VulkanFrameBuffer* fb) : fb(fb) +VkShaderManager::VkShaderManager(VulkanRenderDevice* fb) : fb(fb) { - ShInitialize(); CompileNextShader(); } VkShaderManager::~VkShaderManager() { - ShFinalize(); } void VkShaderManager::Deinit() @@ -346,14 +343,14 @@ std::unique_ptr VkShaderManager::LoadVertShader(FString shadername code << "#define NPOT_EMULATION\n"; #endif code << shaderBindings; - if (!fb->device->UsedDeviceFeatures.shaderClipDistance) code << "#define NO_CLIPDISTANCE_SUPPORT\n"; + if (!fb->device->EnabledFeatures.Features.shaderClipDistance) code << "#define NO_CLIPDISTANCE_SUPPORT\n"; code << "#line 1\n"; code << LoadPrivateShaderLump(vert_lump).GetChars() << "\n"; return ShaderBuilder() - .VertexShader(code) + .VertexShader(code.GetChars()) .DebugName(shadername.GetChars()) - .Create(shadername.GetChars(), fb->device); + .Create(shadername.GetChars(), fb->device.get()); } std::unique_ptr VkShaderManager::LoadFragShader(FString shadername, const char *frag_lump, const char *material_lump, const char *light_lump, const char *defines, bool alphatest, bool gbufferpass) @@ -370,7 +367,7 @@ std::unique_ptr VkShaderManager::LoadFragShader(FString shadername code << shaderBindings; FString placeholder = "\n"; - if (!fb->device->UsedDeviceFeatures.shaderClipDistance) code << "#define NO_CLIPDISTANCE_SUPPORT\n"; + if (!fb->device->EnabledFeatures.Features.shaderClipDistance) code << "#define NO_CLIPDISTANCE_SUPPORT\n"; if (!alphatest) code << "#define NO_ALPHATEST\n"; if (gbufferpass) code << "#define GBUFFER_PASS\n"; @@ -443,14 +440,14 @@ std::unique_ptr VkShaderManager::LoadFragShader(FString shadername } return ShaderBuilder() - .FragmentShader(code) + .FragmentShader(code.GetChars()) .DebugName(shadername.GetChars()) - .Create(shadername.GetChars(), fb->device); + .Create(shadername.GetChars(), fb->device.get()); } FString VkShaderManager::GetTargetGlslVersion() { - if (fb->device->ApiVersion == VK_API_VERSION_1_2) + if (fb->device->Instance->ApiVersion == VK_API_VERSION_1_2) { return "#version 460\n#extension GL_EXT_ray_query : enable\n"; } diff --git a/src/common/rendering/vulkan/shaders/vk_shader.h b/src/common/rendering/vulkan/shaders/vk_shader.h index ba13726a6c..cac924916b 100644 --- a/src/common/rendering/vulkan/shaders/vk_shader.h +++ b/src/common/rendering/vulkan/shaders/vk_shader.h @@ -11,7 +11,7 @@ #define SHADER_MIN_REQUIRED_TEXTURE_LAYERS 11 -class VulkanFrameBuffer; +class VulkanRenderDevice; class VulkanDevice; class VulkanShader; class VkPPShader; @@ -67,7 +67,7 @@ public: class VkShaderManager { public: - VkShaderManager(VulkanFrameBuffer* fb); + VkShaderManager(VulkanRenderDevice* fb); ~VkShaderManager(); void Deinit(); @@ -89,7 +89,7 @@ private: FString LoadPublicShaderLump(const char *lumpname); FString LoadPrivateShaderLump(const char *lumpname); - VulkanFrameBuffer* fb = nullptr; + VulkanRenderDevice* fb = nullptr; std::vector mMaterialShaders[MAX_PASS_TYPES]; std::vector mMaterialShadersNAT[MAX_PASS_TYPES]; diff --git a/src/common/rendering/vulkan/system/vk_buffer.cpp b/src/common/rendering/vulkan/system/vk_buffer.cpp index 2a45cc73c7..cc1d043876 100644 --- a/src/common/rendering/vulkan/system/vk_buffer.cpp +++ b/src/common/rendering/vulkan/system/vk_buffer.cpp @@ -25,7 +25,7 @@ #include "vulkan/renderer/vk_streambuffer.h" #include "hwrenderer/data/shaderuniforms.h" -VkBufferManager::VkBufferManager(VulkanFrameBuffer* fb) : fb(fb) +VkBufferManager::VkBufferManager(VulkanRenderDevice* fb) : fb(fb) { } diff --git a/src/common/rendering/vulkan/system/vk_buffer.h b/src/common/rendering/vulkan/system/vk_buffer.h index c54d60aac9..21ee7765fd 100644 --- a/src/common/rendering/vulkan/system/vk_buffer.h +++ b/src/common/rendering/vulkan/system/vk_buffer.h @@ -1,10 +1,10 @@ #pragma once -#include "vulkan/system/vk_objects.h" +#include "zvulkan/vulkanobjects.h" #include -class VulkanFrameBuffer; +class VulkanRenderDevice; class VkHardwareBuffer; class VkHardwareDataBuffer; class VkStreamBuffer; @@ -15,7 +15,7 @@ class IDataBuffer; class VkBufferManager { public: - VkBufferManager(VulkanFrameBuffer* fb); + VkBufferManager(VulkanRenderDevice* fb); ~VkBufferManager(); void Init(); @@ -43,7 +43,7 @@ public: private: void CreateFanToTrisIndexBuffer(); - VulkanFrameBuffer* fb = nullptr; + VulkanRenderDevice* fb = nullptr; std::list Buffers; }; diff --git a/src/common/rendering/vulkan/system/vk_commandbuffer.cpp b/src/common/rendering/vulkan/system/vk_commandbuffer.cpp index 7018d9df59..59d19719d8 100644 --- a/src/common/rendering/vulkan/system/vk_commandbuffer.cpp +++ b/src/common/rendering/vulkan/system/vk_commandbuffer.cpp @@ -21,9 +21,10 @@ */ #include "vk_commandbuffer.h" -#include "vk_framebuffer.h" -#include "vk_swapchain.h" -#include "vk_builders.h" +#include "vk_renderdevice.h" +#include "zvulkan/vulkanswapchain.h" +#include "zvulkan/vulkanbuilders.h" +#include "vulkan/textures/vk_framebuffer.h" #include "vulkan/renderer/vk_renderstate.h" #include "vulkan/renderer/vk_postprocess.h" #include "hw_clock.h" @@ -36,28 +37,27 @@ extern bool gpuStatActive; extern bool keepGpuStatActive; extern FString gpuStatOutput; -VkCommandBufferManager::VkCommandBufferManager(VulkanFrameBuffer* fb) : fb(fb) +VkCommandBufferManager::VkCommandBufferManager(VulkanRenderDevice* fb) : fb(fb) { - mCommandPool.reset(new VulkanCommandPool(fb->device, fb->device->graphicsFamily)); - - swapChain = std::make_unique(fb->device); - mSwapChainImageAvailableSemaphore.reset(new VulkanSemaphore(fb->device)); - mRenderFinishedSemaphore.reset(new VulkanSemaphore(fb->device)); + mCommandPool = CommandPoolBuilder() + .QueueFamily(fb->device->GraphicsFamily) + .DebugName("mCommandPool") + .Create(fb->device.get()); for (auto& semaphore : mSubmitSemaphore) - semaphore.reset(new VulkanSemaphore(fb->device)); + semaphore.reset(new VulkanSemaphore(fb->device.get())); for (auto& fence : mSubmitFence) - fence.reset(new VulkanFence(fb->device)); + fence.reset(new VulkanFence(fb->device.get())); for (int i = 0; i < maxConcurrentSubmitCount; i++) mSubmitWaitFences[i] = mSubmitFence[i]->fence; - if (fb->device->graphicsTimeQueries) + if (fb->device->GraphicsTimeQueries) { mTimestampQueryPool = QueryPoolBuilder() .QueryType(VK_QUERY_TYPE_TIMESTAMP, MaxTimestampQueries) - .Create(fb->device); + .Create(fb->device.get()); GetDrawCommands()->resetQueryPool(mTimestampQueryPool.get(), 0, MaxTimestampQueries); } @@ -72,7 +72,7 @@ VulkanCommandBuffer* VkCommandBufferManager::GetTransferCommands() if (!mTransferCommands) { mTransferCommands = mCommandPool->createBuffer(); - mTransferCommands->SetDebugName("VulkanFrameBuffer.mTransferCommands"); + mTransferCommands->SetDebugName("VulkanRenderDevice.mTransferCommands"); mTransferCommands->begin(); } return mTransferCommands.get(); @@ -83,7 +83,7 @@ VulkanCommandBuffer* VkCommandBufferManager::GetDrawCommands() if (!mDrawCommands) { mDrawCommands = mCommandPool->createBuffer(); - mDrawCommands->SetDebugName("VulkanFrameBuffer.mDrawCommands"); + mDrawCommands->SetDebugName("VulkanRenderDevice.mDrawCommands"); mDrawCommands->begin(); } return mDrawCommands.get(); @@ -116,16 +116,16 @@ void VkCommandBufferManager::FlushCommands(VulkanCommandBuffer** commands, size_ if (mNextSubmit > 0) submit.AddWait(VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT, mSubmitSemaphore[(mNextSubmit - 1) % maxConcurrentSubmitCount].get()); - if (finish && presentImageIndex != 0xffffffff) + if (finish && fb->GetFramebufferManager()->PresentImageIndex != -1) { - submit.AddWait(VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT, mSwapChainImageAvailableSemaphore.get()); - submit.AddSignal(mRenderFinishedSemaphore.get()); + submit.AddWait(VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT, fb->GetFramebufferManager()->SwapChainImageAvailableSemaphore.get()); + submit.AddSignal(fb->GetFramebufferManager()->RenderFinishedSemaphore.get()); } if (!lastsubmit) submit.AddSignal(mSubmitSemaphore[currentIndex].get()); - submit.Execute(fb->device, fb->device->graphicsQueue, mSubmitFence[currentIndex].get()); + submit.Execute(fb->device.get(), fb->device->GraphicsQueue, mSubmitFence[currentIndex].get()); mNextSubmit++; } @@ -166,9 +166,7 @@ void VkCommandBufferManager::WaitForCommands(bool finish, bool uploadOnly) Finish.Reset(); Finish.Clock(); - presentImageIndex = swapChain->AcquireImage(fb->GetClientWidth(), fb->GetClientHeight(), fb->GetVSync(), mSwapChainImageAvailableSemaphore.get()); - if (presentImageIndex != 0xffffffff) - fb->GetPostprocess()->DrawPresentTexture(fb->mOutputLetterbox, true, false); + fb->GetFramebufferManager()->AcquireImage(); } FlushCommands(finish, true, uploadOnly); @@ -176,9 +174,7 @@ void VkCommandBufferManager::WaitForCommands(bool finish, bool uploadOnly) if (finish) { fb->FPSLimit(); - - if (presentImageIndex != 0xffffffff) - swapChain->QueuePresent(presentImageIndex, mRenderFinishedSemaphore.get()); + fb->GetFramebufferManager()->QueuePresent(); } int numWaitFences = min(mNextSubmit, (int)maxConcurrentSubmitCount); @@ -212,7 +208,7 @@ void VkCommandBufferManager::PushGroup(const FString& name) if (!gpuStatActive) return; - if (mNextTimestampQuery < MaxTimestampQueries && fb->device->graphicsTimeQueries) + if (mNextTimestampQuery < MaxTimestampQueries && fb->device->GraphicsTimeQueries) { TimestampQuery q; q.name = name; @@ -232,7 +228,7 @@ void VkCommandBufferManager::PopGroup() TimestampQuery& q = timeElapsedQueries[mGroupStack.back()]; mGroupStack.pop_back(); - if (mNextTimestampQuery < MaxTimestampQueries && fb->device->graphicsTimeQueries) + if (mNextTimestampQuery < MaxTimestampQueries && fb->device->GraphicsTimeQueries) { q.endIndex = mNextTimestampQuery++; GetDrawCommands()->writeTimestamp(VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT, mTimestampQueryPool.get(), q.endIndex); diff --git a/src/common/rendering/vulkan/system/vk_commandbuffer.h b/src/common/rendering/vulkan/system/vk_commandbuffer.h index b97a44dbe4..1ce16b021f 100644 --- a/src/common/rendering/vulkan/system/vk_commandbuffer.h +++ b/src/common/rendering/vulkan/system/vk_commandbuffer.h @@ -1,14 +1,15 @@ #pragma once -#include "vk_device.h" -#include "vk_objects.h" +#include +#include +#include "zstring.h" -class VulkanFrameBuffer; +class VulkanRenderDevice; class VkCommandBufferManager { public: - VkCommandBufferManager(VulkanFrameBuffer* fb); + VkCommandBufferManager(VulkanRenderDevice* fb); ~VkCommandBufferManager(); void BeginFrame(); @@ -57,13 +58,10 @@ public: void DeleteFrameObjects(bool uploadOnly = false); - std::unique_ptr swapChain; - uint32_t presentImageIndex = 0xffffffff; - private: void FlushCommands(VulkanCommandBuffer** commands, size_t count, bool finish, bool lastsubmit); - VulkanFrameBuffer* fb = nullptr; + VulkanRenderDevice* fb = nullptr; std::unique_ptr mCommandPool; @@ -76,9 +74,6 @@ private: VkFence mSubmitWaitFences[maxConcurrentSubmitCount]; int mNextSubmit = 0; - std::unique_ptr mSwapChainImageAvailableSemaphore; - std::unique_ptr mRenderFinishedSemaphore; - struct TimestampQuery { FString name; diff --git a/src/common/rendering/vulkan/system/vk_device.cpp b/src/common/rendering/vulkan/system/vk_device.cpp deleted file mode 100644 index cdc0232dfe..0000000000 --- a/src/common/rendering/vulkan/system/vk_device.cpp +++ /dev/null @@ -1,638 +0,0 @@ -/* -** Vulkan backend -** Copyright (c) 2016-2020 Magnus Norddahl -** -** This software is provided 'as-is', without any express or implied -** warranty. In no event will the authors be held liable for any damages -** arising from the use of this software. -** -** Permission is granted to anyone to use this software for any purpose, -** including commercial applications, and to alter it and redistribute it -** freely, subject to the following restrictions: -** -** 1. The origin of this software must not be misrepresented; you must not -** claim that you wrote the original software. If you use this software -** in a product, an acknowledgment in the product documentation would be -** appreciated but is not required. -** 2. Altered source versions must be plainly marked as such, and must not be -** misrepresented as being the original software. -** 3. This notice may not be removed or altered from any source distribution. -** -*/ - -#include "volk/volk.h" - -#ifdef _WIN32 -#undef max -#undef min -#endif - -#include -#include -#include -#include -#include -#include - -#include "vk_device.h" -#include "vk_swapchain.h" -#include "vk_objects.h" -#include "c_cvars.h" -#include "c_dispatch.h" -#include "i_system.h" -#include "version.h" -#include "engineerrors.h" -#include "v_text.h" - -bool I_GetVulkanPlatformExtensions(unsigned int *count, const char **names); -bool I_CreateVulkanSurface(VkInstance instance, VkSurfaceKHR *surface); - -FString JitCaptureStackTrace(int framesToSkip, bool includeNativeFrames, int maxFrames = -1); - -// Physical device info -static std::vector AvailableDevices; -static std::vector SupportedDevices; - -CUSTOM_CVAR(Bool, vk_debug, false, CVAR_ARCHIVE | CVAR_GLOBALCONFIG | CVAR_NOINITCALL) -{ - Printf("This won't take effect until " GAMENAME " is restarted.\n"); -} - -CVAR(Bool, vk_debug_callstack, true, CVAR_ARCHIVE | CVAR_GLOBALCONFIG) - -CUSTOM_CVAR(Int, vk_device, 0, CVAR_ARCHIVE | CVAR_GLOBALCONFIG | CVAR_NOINITCALL) -{ - Printf("This won't take effect until " GAMENAME " is restarted.\n"); -} - -CCMD(vk_listdevices) -{ - for (size_t i = 0; i < SupportedDevices.size(); i++) - { - Printf("#%d - %s\n", (int)i, SupportedDevices[i].device->Properties.deviceName); - } -} - -VulkanDevice::VulkanDevice() -{ - try - { - InitVolk(); - CreateInstance(); - CreateSurface(); - SelectPhysicalDevice(); - SelectFeatures(); - CreateDevice(); - CreateAllocator(); - } - catch (...) - { - ReleaseResources(); - throw; - } -} - -VulkanDevice::~VulkanDevice() -{ - ReleaseResources(); -} - -void VulkanDevice::SelectFeatures() -{ - UsedDeviceFeatures.samplerAnisotropy = PhysicalDevice.Features.samplerAnisotropy; - UsedDeviceFeatures.fragmentStoresAndAtomics = PhysicalDevice.Features.fragmentStoresAndAtomics; - UsedDeviceFeatures.depthClamp = PhysicalDevice.Features.depthClamp; - UsedDeviceFeatures.shaderClipDistance = PhysicalDevice.Features.shaderClipDistance; -} - -bool VulkanDevice::CheckRequiredFeatures(const VkPhysicalDeviceFeatures &f) -{ - return - f.samplerAnisotropy == VK_TRUE && - f.fragmentStoresAndAtomics == VK_TRUE; -} - -void VulkanDevice::SelectPhysicalDevice() -{ - AvailableDevices = GetPhysicalDevices(instance); - if (AvailableDevices.empty()) - VulkanError("No Vulkan devices found. Either the graphics card has no vulkan support or the driver is too old."); - - for (size_t idx = 0; idx < AvailableDevices.size(); idx++) - { - const auto &info = AvailableDevices[idx]; - - if (!CheckRequiredFeatures(info.Features)) - continue; - - std::set requiredExtensionSearch(EnabledDeviceExtensions.begin(), EnabledDeviceExtensions.end()); - for (const auto &ext : info.Extensions) - requiredExtensionSearch.erase(ext.extensionName); - if (!requiredExtensionSearch.empty()) - continue; - - VulkanCompatibleDevice dev; - dev.device = &AvailableDevices[idx]; - - // Figure out what can present - for (int i = 0; i < (int)info.QueueFamilies.size(); i++) - { - VkBool32 presentSupport = false; - VkResult result = vkGetPhysicalDeviceSurfaceSupportKHR(info.Device, i, surface, &presentSupport); - if (result == VK_SUCCESS && info.QueueFamilies[i].queueCount > 0 && presentSupport) - { - dev.presentFamily = i; - break; - } - } - - // The vulkan spec states that graphics and compute queues can always do transfer. - // Furthermore the spec states that graphics queues always can do compute. - // Last, the spec makes it OPTIONAL whether the VK_QUEUE_TRANSFER_BIT is set for such queues, but they MUST support transfer. - // - // In short: pick the first graphics queue family for everything. - for (int i = 0; i < (int)info.QueueFamilies.size(); i++) - { - const auto &queueFamily = info.QueueFamilies[i]; - if (queueFamily.queueCount > 0 && (queueFamily.queueFlags & VK_QUEUE_GRAPHICS_BIT)) - { - dev.graphicsFamily = i; - dev.graphicsTimeQueries = queueFamily.timestampValidBits != 0; - break; - } - } - - if (dev.graphicsFamily != -1 && dev.presentFamily != -1) - { - SupportedDevices.push_back(dev); - } - } - - if (SupportedDevices.empty()) - VulkanError("No Vulkan device supports the minimum requirements of this application"); - - // The device order returned by Vulkan can be anything. Prefer discrete > integrated > virtual gpu > cpu > other - std::stable_sort(SupportedDevices.begin(), SupportedDevices.end(), [&](const auto &a, const auto b) { - - // Sort by GPU type first. This will ensure the "best" device is most likely to map to vk_device 0 - static const int typeSort[] = { 4, 1, 0, 2, 3 }; - int sortA = a.device->Properties.deviceType < 5 ? typeSort[a.device->Properties.deviceType] : (int)a.device->Properties.deviceType; - int sortB = b.device->Properties.deviceType < 5 ? typeSort[b.device->Properties.deviceType] : (int)b.device->Properties.deviceType; - if (sortA != sortB) - return sortA < sortB; - - // Then sort by the device's unique ID so that vk_device uses a consistent order - int sortUUID = memcmp(a.device->Properties.pipelineCacheUUID, b.device->Properties.pipelineCacheUUID, VK_UUID_SIZE); - return sortUUID < 0; - }); - - size_t selected = vk_device; - if (selected >= SupportedDevices.size()) - selected = 0; - - // Enable optional extensions we are interested in, if they are available on this device - for (const auto &ext : SupportedDevices[selected].device->Extensions) - { - for (const auto &opt : OptionalDeviceExtensions) - { - if (strcmp(ext.extensionName, opt) == 0) - { - EnabledDeviceExtensions.push_back(opt); - } - } - } - - PhysicalDevice = *SupportedDevices[selected].device; - graphicsFamily = SupportedDevices[selected].graphicsFamily; - presentFamily = SupportedDevices[selected].presentFamily; - graphicsTimeQueries = SupportedDevices[selected].graphicsTimeQueries; -} - -bool VulkanDevice::SupportsDeviceExtension(const char *ext) const -{ - return std::find(EnabledDeviceExtensions.begin(), EnabledDeviceExtensions.end(), ext) != EnabledDeviceExtensions.end(); -} - -void VulkanDevice::CreateAllocator() -{ - VmaAllocatorCreateInfo allocinfo = {}; - allocinfo.vulkanApiVersion = ApiVersion; - if (SupportsDeviceExtension(VK_KHR_DEDICATED_ALLOCATION_EXTENSION_NAME) && SupportsDeviceExtension(VK_KHR_GET_MEMORY_REQUIREMENTS_2_EXTENSION_NAME)) - allocinfo.flags |= VMA_ALLOCATOR_CREATE_KHR_DEDICATED_ALLOCATION_BIT; - if (SupportsDeviceExtension(VK_KHR_BUFFER_DEVICE_ADDRESS_EXTENSION_NAME)) - allocinfo.flags |= VMA_ALLOCATOR_CREATE_BUFFER_DEVICE_ADDRESS_BIT; - allocinfo.physicalDevice = PhysicalDevice.Device; - allocinfo.device = device; - allocinfo.instance = instance; - allocinfo.preferredLargeHeapBlockSize = 64 * 1024 * 1024; - if (vmaCreateAllocator(&allocinfo, &allocator) != VK_SUCCESS) - VulkanError("Unable to create allocator"); -} - -void VulkanDevice::CreateDevice() -{ - float queuePriority = 1.0f; - std::vector queueCreateInfos; - - std::set neededFamilies; - neededFamilies.insert(graphicsFamily); - neededFamilies.insert(presentFamily); - - for (int index : neededFamilies) - { - VkDeviceQueueCreateInfo queueCreateInfo = {}; - queueCreateInfo.sType = VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO; - queueCreateInfo.queueFamilyIndex = index; - queueCreateInfo.queueCount = 1; - queueCreateInfo.pQueuePriorities = &queuePriority; - queueCreateInfos.push_back(queueCreateInfo); - } - - VkDeviceCreateInfo deviceCreateInfo = { VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO }; - VkPhysicalDeviceFeatures2 deviceFeatures2 = { VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2 }; - VkPhysicalDeviceBufferDeviceAddressFeatures deviceAddressFeatures = { VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES }; - VkPhysicalDeviceAccelerationStructureFeaturesKHR deviceAccelFeatures = { VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ACCELERATION_STRUCTURE_FEATURES_KHR }; - VkPhysicalDeviceRayQueryFeaturesKHR rayQueryFeatures = { VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_QUERY_FEATURES_KHR }; - - deviceCreateInfo.queueCreateInfoCount = (uint32_t)queueCreateInfos.size(); - deviceCreateInfo.pQueueCreateInfos = queueCreateInfos.data(); - deviceCreateInfo.enabledExtensionCount = (uint32_t)EnabledDeviceExtensions.size(); - deviceCreateInfo.ppEnabledExtensionNames = EnabledDeviceExtensions.data(); - deviceCreateInfo.enabledLayerCount = 0; - deviceFeatures2.features = UsedDeviceFeatures; - deviceAddressFeatures.bufferDeviceAddress = true; - deviceAccelFeatures.accelerationStructure = true; - rayQueryFeatures.rayQuery = true; - - void** next = const_cast(&deviceCreateInfo.pNext); - if (SupportsDeviceExtension(VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME)) - { - *next = &deviceFeatures2; - next = &deviceFeatures2.pNext; - } - else // vulkan 1.0 specified features in a different way - { - deviceCreateInfo.pEnabledFeatures = &deviceFeatures2.features; - } - if (SupportsDeviceExtension(VK_KHR_BUFFER_DEVICE_ADDRESS_EXTENSION_NAME)) - { - *next = &deviceAddressFeatures; - next = &deviceAddressFeatures.pNext; - } - if (SupportsDeviceExtension(VK_KHR_ACCELERATION_STRUCTURE_EXTENSION_NAME)) - { - *next = &deviceAccelFeatures; - next = &deviceAccelFeatures.pNext; - } - if (SupportsDeviceExtension(VK_KHR_RAY_QUERY_EXTENSION_NAME)) - { - *next = &rayQueryFeatures; - next = &rayQueryFeatures.pNext; - } - - VkResult result = vkCreateDevice(PhysicalDevice.Device, &deviceCreateInfo, nullptr, &device); - CheckVulkanError(result, "Could not create vulkan device"); - - volkLoadDevice(device); - - vkGetDeviceQueue(device, graphicsFamily, 0, &graphicsQueue); - vkGetDeviceQueue(device, presentFamily, 0, &presentQueue); -} - -void VulkanDevice::CreateSurface() -{ - if (!I_CreateVulkanSurface(instance, &surface)) - { - VulkanError("Could not create vulkan surface"); - } -} - -void VulkanDevice::CreateInstance() -{ - AvailableLayers = GetAvailableLayers(); - Extensions = GetExtensions(); - EnabledExtensions = GetPlatformExtensions(); - - std::string debugLayer = "VK_LAYER_KHRONOS_validation"; - bool wantDebugLayer = vk_debug; - bool debugLayerFound = false; - if (wantDebugLayer) - { - for (const VkLayerProperties& layer : AvailableLayers) - { - if (layer.layerName == debugLayer) - { - EnabledValidationLayers.push_back(layer.layerName); - EnabledExtensions.push_back(VK_EXT_DEBUG_UTILS_EXTENSION_NAME); - debugLayerFound = true; - break; - } - } - } - - // Enable optional instance extensions we are interested in - for (const auto &ext : Extensions) - { - for (const auto &opt : OptionalExtensions) - { - if (strcmp(ext.extensionName, opt) == 0) - { - EnabledExtensions.push_back(opt); - } - } - } - - // Try get the highest vulkan version we can get - VkResult result = VK_ERROR_INITIALIZATION_FAILED; - for (uint32_t apiVersion : { VK_API_VERSION_1_2, VK_API_VERSION_1_1, VK_API_VERSION_1_0 }) - { - VkApplicationInfo appInfo = {}; - appInfo.sType = VK_STRUCTURE_TYPE_APPLICATION_INFO; - appInfo.pApplicationName = "GZDoom"; - appInfo.applicationVersion = VK_MAKE_VERSION(VER_MAJOR, VER_MINOR, VER_REVISION); - appInfo.pEngineName = "GZDoom"; - appInfo.engineVersion = VK_MAKE_VERSION(ENG_MAJOR, ENG_MINOR, ENG_REVISION); - appInfo.apiVersion = apiVersion; - - VkInstanceCreateInfo createInfo = {}; - createInfo.sType = VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO; - createInfo.pApplicationInfo = &appInfo; - createInfo.enabledExtensionCount = (uint32_t)EnabledExtensions.size(); - createInfo.enabledLayerCount = (uint32_t)EnabledValidationLayers.size(); - createInfo.ppEnabledLayerNames = EnabledValidationLayers.data(); - createInfo.ppEnabledExtensionNames = EnabledExtensions.data(); - - result = vkCreateInstance(&createInfo, nullptr, &instance); - if (result >= VK_SUCCESS) - { - ApiVersion = apiVersion; - break; - } - } - CheckVulkanError(result, "Could not create vulkan instance"); - - volkLoadInstance(instance); - - if (debugLayerFound) - { - VkDebugUtilsMessengerCreateInfoEXT dbgCreateInfo = {}; - dbgCreateInfo.sType = VK_STRUCTURE_TYPE_DEBUG_UTILS_MESSENGER_CREATE_INFO_EXT; - dbgCreateInfo.messageSeverity = - //VK_DEBUG_UTILS_MESSAGE_SEVERITY_VERBOSE_BIT_EXT | - //VK_DEBUG_UTILS_MESSAGE_SEVERITY_INFO_BIT_EXT | - VK_DEBUG_UTILS_MESSAGE_SEVERITY_WARNING_BIT_EXT | - VK_DEBUG_UTILS_MESSAGE_SEVERITY_ERROR_BIT_EXT; - dbgCreateInfo.messageType = - VK_DEBUG_UTILS_MESSAGE_TYPE_GENERAL_BIT_EXT | - VK_DEBUG_UTILS_MESSAGE_TYPE_VALIDATION_BIT_EXT | - VK_DEBUG_UTILS_MESSAGE_TYPE_PERFORMANCE_BIT_EXT; - dbgCreateInfo.pfnUserCallback = DebugCallback; - dbgCreateInfo.pUserData = this; - result = vkCreateDebugUtilsMessengerEXT(instance, &dbgCreateInfo, nullptr, &debugMessenger); - CheckVulkanError(result, "vkCreateDebugUtilsMessengerEXT failed"); - - DebugLayerActive = true; - } -} - -VkBool32 VulkanDevice::DebugCallback(VkDebugUtilsMessageSeverityFlagBitsEXT messageSeverity, VkDebugUtilsMessageTypeFlagsEXT messageType, const VkDebugUtilsMessengerCallbackDataEXT* callbackData, void* userData) -{ - static std::mutex mtx; - static std::set seenMessages; - static int totalMessages; - - std::unique_lock lock(mtx); - - FString msg = callbackData->pMessage; - - // Attempt to parse the string because the default formatting is totally unreadable and half of what it writes is totally useless! - auto parts = msg.Split(" | "); - if (parts.Size() == 3) - { - msg = parts[2]; - auto pos = msg.IndexOf(" The Vulkan spec states:"); - if (pos >= 0) - msg = msg.Left(pos); - - if (callbackData->objectCount > 0) - { - msg += " ("; - for (uint32_t i = 0; i < callbackData->objectCount; i++) - { - if (i > 0) - msg += ", "; - if (callbackData->pObjects[i].pObjectName) - msg += callbackData->pObjects[i].pObjectName; - else - msg += ""; - } - msg += ")"; - } - } - - bool found = seenMessages.find(msg) != seenMessages.end(); - if (!found) - { - if (totalMessages < 20) - { - totalMessages++; - seenMessages.insert(msg); - - const char *typestr; - bool showcallstack = false; - if (messageSeverity & VK_DEBUG_UTILS_MESSAGE_SEVERITY_ERROR_BIT_EXT) - { - typestr = "vulkan error"; - showcallstack = true; - } - else if (messageSeverity & VK_DEBUG_UTILS_MESSAGE_SEVERITY_WARNING_BIT_EXT) - { - typestr = "vulkan warning"; - } - else if (messageSeverity & VK_DEBUG_UTILS_MESSAGE_SEVERITY_INFO_BIT_EXT) - { - typestr = "vulkan info"; - } - else if (messageSeverity & VK_DEBUG_UTILS_MESSAGE_SEVERITY_VERBOSE_BIT_EXT) - { - typestr = "vulkan verbose"; - } - else - { - typestr = "vulkan"; - } - - if (showcallstack) - Printf("\n"); - Printf(TEXTCOLOR_RED "[%s] ", typestr); - Printf(TEXTCOLOR_WHITE "%s\n", msg.GetChars()); - - if (vk_debug_callstack && showcallstack) - { - FString callstack = JitCaptureStackTrace(0, true, 5); - if (!callstack.IsEmpty()) - Printf("%s\n", callstack.GetChars()); - } - } - } - - return VK_FALSE; -} - -std::vector VulkanDevice::GetAvailableLayers() -{ - uint32_t layerCount; - VkResult result = vkEnumerateInstanceLayerProperties(&layerCount, nullptr); - - std::vector availableLayers(layerCount); - result = vkEnumerateInstanceLayerProperties(&layerCount, availableLayers.data()); - return availableLayers; -} - -std::vector VulkanDevice::GetExtensions() -{ - uint32_t extensionCount = 0; - VkResult result = vkEnumerateInstanceExtensionProperties(nullptr, &extensionCount, nullptr); - - std::vector extensions(extensionCount); - result = vkEnumerateInstanceExtensionProperties(nullptr, &extensionCount, extensions.data()); - return extensions; -} - -std::vector VulkanDevice::GetPhysicalDevices(VkInstance instance) -{ - uint32_t deviceCount = 0; - VkResult result = vkEnumeratePhysicalDevices(instance, &deviceCount, nullptr); - if (result == VK_ERROR_INITIALIZATION_FAILED) // Some drivers return this when a card does not support vulkan - return {}; - CheckVulkanError(result, "vkEnumeratePhysicalDevices failed"); - if (deviceCount == 0) - return {}; - - std::vector devices(deviceCount); - result = vkEnumeratePhysicalDevices(instance, &deviceCount, devices.data()); - CheckVulkanError(result, "vkEnumeratePhysicalDevices failed (2)"); - - std::vector devinfo(deviceCount); - for (size_t i = 0; i < devices.size(); i++) - { - auto &dev = devinfo[i]; - dev.Device = devices[i]; - - vkGetPhysicalDeviceMemoryProperties(dev.Device, &dev.MemoryProperties); - vkGetPhysicalDeviceProperties(dev.Device, &dev.Properties); - vkGetPhysicalDeviceFeatures(dev.Device, &dev.Features); - - uint32_t queueFamilyCount = 0; - vkGetPhysicalDeviceQueueFamilyProperties(dev.Device, &queueFamilyCount, nullptr); - dev.QueueFamilies.resize(queueFamilyCount); - vkGetPhysicalDeviceQueueFamilyProperties(dev.Device, &queueFamilyCount, dev.QueueFamilies.data()); - - uint32_t deviceExtensionCount = 0; - vkEnumerateDeviceExtensionProperties(dev.Device, nullptr, &deviceExtensionCount, nullptr); - dev.Extensions.resize(deviceExtensionCount); - vkEnumerateDeviceExtensionProperties(dev.Device, nullptr, &deviceExtensionCount, dev.Extensions.data()); - } - return devinfo; -} - -std::vector VulkanDevice::GetPlatformExtensions() -{ - uint32_t extensionCount = 0; - if (!I_GetVulkanPlatformExtensions(&extensionCount, nullptr)) - VulkanError("Cannot obtain number of Vulkan extensions"); - - std::vector extensions(extensionCount); - if (!I_GetVulkanPlatformExtensions(&extensionCount, extensions.data())) - VulkanError("Cannot obtain list of Vulkan extensions"); - return extensions; -} - -void VulkanDevice::InitVolk() -{ - if (volkInitialize() != VK_SUCCESS) - { - VulkanError("Unable to find Vulkan"); - } - auto iver = volkGetInstanceVersion(); - if (iver == 0) - { - VulkanError("Vulkan not supported"); - } -} - -void VulkanDevice::ReleaseResources() -{ - if (device) - vkDeviceWaitIdle(device); - - if (allocator) - vmaDestroyAllocator(allocator); - - if (device) - vkDestroyDevice(device, nullptr); - device = nullptr; - - if (surface) - vkDestroySurfaceKHR(instance, surface, nullptr); - surface = 0; - - if (debugMessenger) - vkDestroyDebugUtilsMessengerEXT(instance, debugMessenger, nullptr); - - if (instance) - vkDestroyInstance(instance, nullptr); - instance = nullptr; -} - -uint32_t VulkanDevice::FindMemoryType(uint32_t typeFilter, VkMemoryPropertyFlags properties) -{ - for (uint32_t i = 0; i < PhysicalDevice.MemoryProperties.memoryTypeCount; i++) - { - if ((typeFilter & (1 << i)) && (PhysicalDevice.MemoryProperties.memoryTypes[i].propertyFlags & properties) == properties) - return i; - } - - VulkanError("failed to find suitable memory type!"); - return 0; -} - -FString VkResultToString(VkResult result) -{ - switch (result) - { - case VK_SUCCESS: return "success"; - case VK_NOT_READY: return "not ready"; - case VK_TIMEOUT: return "timeout"; - case VK_EVENT_SET: return "event set"; - case VK_EVENT_RESET: return "event reset"; - case VK_INCOMPLETE: return "incomplete"; - case VK_ERROR_OUT_OF_HOST_MEMORY: return "out of host memory"; - case VK_ERROR_OUT_OF_DEVICE_MEMORY: return "out of device memory"; - case VK_ERROR_INITIALIZATION_FAILED: return "initialization failed"; - case VK_ERROR_DEVICE_LOST: return "device lost"; - case VK_ERROR_MEMORY_MAP_FAILED: return "memory map failed"; - case VK_ERROR_LAYER_NOT_PRESENT: return "layer not present"; - case VK_ERROR_EXTENSION_NOT_PRESENT: return "extension not present"; - case VK_ERROR_FEATURE_NOT_PRESENT: return "feature not present"; - case VK_ERROR_INCOMPATIBLE_DRIVER: return "incompatible driver"; - case VK_ERROR_TOO_MANY_OBJECTS: return "too many objects"; - case VK_ERROR_FORMAT_NOT_SUPPORTED: return "format not supported"; - case VK_ERROR_FRAGMENTED_POOL: return "fragmented pool"; - case VK_ERROR_OUT_OF_POOL_MEMORY: return "out of pool memory"; - case VK_ERROR_INVALID_EXTERNAL_HANDLE: return "invalid external handle"; - case VK_ERROR_SURFACE_LOST_KHR: return "surface lost"; - case VK_ERROR_NATIVE_WINDOW_IN_USE_KHR: return "native window in use"; - case VK_SUBOPTIMAL_KHR: return "suboptimal"; - case VK_ERROR_OUT_OF_DATE_KHR: return "out of date"; - case VK_ERROR_INCOMPATIBLE_DISPLAY_KHR: return "incompatible display"; - case VK_ERROR_VALIDATION_FAILED_EXT: return "validation failed"; - case VK_ERROR_INVALID_SHADER_NV: return "invalid shader"; - case VK_ERROR_FRAGMENTATION_EXT: return "fragmentation"; - case VK_ERROR_NOT_PERMITTED_EXT: return "not permitted"; - default: break; - } - FString res; - res.Format("vkResult %d", (int)result); - return result; -} diff --git a/src/common/rendering/vulkan/system/vk_device.h b/src/common/rendering/vulkan/system/vk_device.h deleted file mode 100644 index 5709242e94..0000000000 --- a/src/common/rendering/vulkan/system/vk_device.h +++ /dev/null @@ -1,141 +0,0 @@ -#pragma once - -#include "volk/volk.h" -#include "vk_mem_alloc/vk_mem_alloc.h" -#include "engineerrors.h" -#include -#include -#include -#include -#include "zstring.h" - -class VulkanSwapChain; -class VulkanSemaphore; -class VulkanFence; - -class VulkanPhysicalDevice -{ -public: - VkPhysicalDevice Device = VK_NULL_HANDLE; - - std::vector Extensions; - std::vector QueueFamilies; - VkPhysicalDeviceProperties Properties = {}; - VkPhysicalDeviceFeatures Features = {}; - VkPhysicalDeviceMemoryProperties MemoryProperties = {}; -}; - -class VulkanCompatibleDevice -{ -public: - VulkanPhysicalDevice *device = nullptr; - int graphicsFamily = -1; - int presentFamily = -1; - bool graphicsTimeQueries = false; -}; - -class VulkanDevice -{ -public: - VulkanDevice(); - ~VulkanDevice(); - - void SetDebugObjectName(const char *name, uint64_t handle, VkObjectType type) - { - if (!DebugLayerActive) return; - - VkDebugUtilsObjectNameInfoEXT info = {}; - info.sType = VK_STRUCTURE_TYPE_DEBUG_UTILS_OBJECT_NAME_INFO_EXT; - info.objectHandle = handle; - info.objectType = type; - info.pObjectName = name; - vkSetDebugUtilsObjectNameEXT(device, &info); - } - - uint32_t FindMemoryType(uint32_t typeFilter, VkMemoryPropertyFlags properties); - - // Instance setup - std::vector AvailableLayers; - std::vector Extensions; - std::vector EnabledExtensions; - std::vector OptionalExtensions = { VK_EXT_SWAPCHAIN_COLOR_SPACE_EXTENSION_NAME }; - std::vector EnabledValidationLayers; - uint32_t ApiVersion = {}; - - // Device setup - VkPhysicalDeviceFeatures UsedDeviceFeatures = {}; - std::vector EnabledDeviceExtensions = { VK_KHR_SWAPCHAIN_EXTENSION_NAME }; - std::vector OptionalDeviceExtensions = - { - VK_EXT_HDR_METADATA_EXTENSION_NAME, - VK_KHR_DEDICATED_ALLOCATION_EXTENSION_NAME, - VK_KHR_GET_MEMORY_REQUIREMENTS_2_EXTENSION_NAME, - VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME, - VK_KHR_BUFFER_DEVICE_ADDRESS_EXTENSION_NAME, - VK_KHR_ACCELERATION_STRUCTURE_EXTENSION_NAME, - VK_KHR_DEFERRED_HOST_OPERATIONS_EXTENSION_NAME, - VK_KHR_RAY_QUERY_EXTENSION_NAME - }; - VulkanPhysicalDevice PhysicalDevice; - bool DebugLayerActive = false; - - VkInstance instance = VK_NULL_HANDLE; - VkSurfaceKHR surface = VK_NULL_HANDLE; - VkDevice device = VK_NULL_HANDLE; - VmaAllocator allocator = VK_NULL_HANDLE; - - VkQueue graphicsQueue = VK_NULL_HANDLE; - VkQueue presentQueue = VK_NULL_HANDLE; - - int graphicsFamily = -1; - int presentFamily = -1; - bool graphicsTimeQueries = false; - - bool SupportsDeviceExtension(const char* ext) const; - -private: - void CreateInstance(); - void CreateSurface(); - void SelectPhysicalDevice(); - void SelectFeatures(); - void CreateDevice(); - void CreateAllocator(); - void ReleaseResources(); - - static bool CheckRequiredFeatures(const VkPhysicalDeviceFeatures &f); - - VkDebugUtilsMessengerEXT debugMessenger = VK_NULL_HANDLE; - - static VKAPI_ATTR VkBool32 VKAPI_CALL DebugCallback(VkDebugUtilsMessageSeverityFlagBitsEXT messageSeverity, VkDebugUtilsMessageTypeFlagsEXT messageType, const VkDebugUtilsMessengerCallbackDataEXT* pCallbackData, void* pUserData); - - static void InitVolk(); - static std::vector GetAvailableLayers(); - static std::vector GetExtensions(); - static std::vector GetPlatformExtensions(); - static std::vector GetPhysicalDevices(VkInstance instance); -}; - -FString VkResultToString(VkResult result); - -class CVulkanError : public CEngineError -{ -public: - CVulkanError() : CEngineError() {} - CVulkanError(const char* message) : CEngineError(message) {} -}; - - -inline void VulkanError(const char *text) -{ - throw CVulkanError(text); -} - -inline void CheckVulkanError(VkResult result, const char *text) -{ - if (result >= VK_SUCCESS) - return; - - FString msg; - msg.Format("%s: %s", text, VkResultToString(result).GetChars()); - throw CVulkanError(msg.GetChars()); -} diff --git a/src/common/rendering/vulkan/system/vk_hwbuffer.cpp b/src/common/rendering/vulkan/system/vk_hwbuffer.cpp index cd0eb56ebd..7edfd471a4 100644 --- a/src/common/rendering/vulkan/system/vk_hwbuffer.cpp +++ b/src/common/rendering/vulkan/system/vk_hwbuffer.cpp @@ -21,15 +21,15 @@ */ #include "vk_hwbuffer.h" -#include "vk_builders.h" -#include "vk_framebuffer.h" +#include "zvulkan/vulkanbuilders.h" +#include "vk_renderdevice.h" #include "vk_commandbuffer.h" #include "vk_buffer.h" #include "vulkan/renderer/vk_renderstate.h" #include "vulkan/renderer/vk_descriptorset.h" #include "engineerrors.h" -VkHardwareBuffer::VkHardwareBuffer(VulkanFrameBuffer* fb) : fb(fb) +VkHardwareBuffer::VkHardwareBuffer(VulkanRenderDevice* fb) : fb(fb) { fb->GetBufferManager()->AddBuffer(this); } @@ -80,13 +80,13 @@ void VkHardwareBuffer::SetData(size_t size, const void *data, BufferUsageType us .Usage(VK_BUFFER_USAGE_TRANSFER_DST_BIT | mBufferType, VMA_MEMORY_USAGE_GPU_ONLY) .Size(bufsize) .DebugName(usage == BufferUsageType::Static ? "VkHardwareBuffer.Static" : "VkHardwareBuffer.Stream") - .Create(fb->device); + .Create(fb->device.get()); mStaging = BufferBuilder() .Usage(VK_BUFFER_USAGE_TRANSFER_SRC_BIT, VMA_MEMORY_USAGE_CPU_ONLY) .Size(bufsize) .DebugName(usage == BufferUsageType::Static ? "VkHardwareBuffer.Staging.Static" : "VkHardwareBuffer.Staging.Stream") - .Create(fb->device); + .Create(fb->device.get()); if (data) { @@ -108,7 +108,7 @@ void VkHardwareBuffer::SetData(size_t size, const void *data, BufferUsageType us VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT | VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT) .Size(bufsize) .DebugName("VkHardwareBuffer.Persistent") - .Create(fb->device); + .Create(fb->device.get()); map = mBuffer->Map(0, bufsize); if (data) @@ -125,7 +125,7 @@ void VkHardwareBuffer::SetData(size_t size, const void *data, BufferUsageType us VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT | VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT) .Size(bufsize) .DebugName("VkHardwareBuffer.Mappable") - .Create(fb->device); + .Create(fb->device.get()); if (data) { @@ -176,7 +176,7 @@ void VkHardwareBuffer::Resize(size_t newsize) VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT | VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT) .Size(newsize) .DebugName("VkHardwareBuffer.Resized") - .Create(fb->device); + .Create(fb->device.get()); buffersize = newsize; // Transfer data from old to new diff --git a/src/common/rendering/vulkan/system/vk_hwbuffer.h b/src/common/rendering/vulkan/system/vk_hwbuffer.h index 9eedf6c46c..95a0231414 100644 --- a/src/common/rendering/vulkan/system/vk_hwbuffer.h +++ b/src/common/rendering/vulkan/system/vk_hwbuffer.h @@ -1,7 +1,7 @@ #pragma once #include "hwrenderer/data/buffers.h" -#include "vk_objects.h" +#include "zvulkan/vulkanobjects.h" #include "tarray.h" #include @@ -11,12 +11,12 @@ #pragma warning(disable:4250) #endif -class VulkanFrameBuffer; +class VulkanRenderDevice; class VkHardwareBuffer : virtual public IBuffer { public: - VkHardwareBuffer(VulkanFrameBuffer* fb); + VkHardwareBuffer(VulkanRenderDevice* fb); ~VkHardwareBuffer(); void Reset(); @@ -31,7 +31,7 @@ public: void *Lock(unsigned int size) override; void Unlock() override; - VulkanFrameBuffer* fb = nullptr; + VulkanRenderDevice* fb = nullptr; std::list::iterator it; VkBufferUsageFlags mBufferType = 0; @@ -44,7 +44,7 @@ public: class VkHardwareVertexBuffer : public IVertexBuffer, public VkHardwareBuffer { public: - VkHardwareVertexBuffer(VulkanFrameBuffer* fb) : VkHardwareBuffer(fb) { mBufferType = VK_BUFFER_USAGE_VERTEX_BUFFER_BIT; } + VkHardwareVertexBuffer(VulkanRenderDevice* fb) : VkHardwareBuffer(fb) { mBufferType = VK_BUFFER_USAGE_VERTEX_BUFFER_BIT; } void SetFormat(int numBindingPoints, int numAttributes, size_t stride, const FVertexBufferAttribute *attrs) override; int VertexFormat = -1; @@ -53,13 +53,13 @@ public: class VkHardwareIndexBuffer : public IIndexBuffer, public VkHardwareBuffer { public: - VkHardwareIndexBuffer(VulkanFrameBuffer* fb) : VkHardwareBuffer(fb) { mBufferType = VK_BUFFER_USAGE_INDEX_BUFFER_BIT; } + VkHardwareIndexBuffer(VulkanRenderDevice* fb) : VkHardwareBuffer(fb) { mBufferType = VK_BUFFER_USAGE_INDEX_BUFFER_BIT; } }; class VkHardwareDataBuffer : public IDataBuffer, public VkHardwareBuffer { public: - VkHardwareDataBuffer(VulkanFrameBuffer* fb, int bindingpoint, bool ssbo, bool needresize) : VkHardwareBuffer(fb), bindingpoint(bindingpoint) + VkHardwareDataBuffer(VulkanRenderDevice* fb, int bindingpoint, bool ssbo, bool needresize) : VkHardwareBuffer(fb), bindingpoint(bindingpoint) { mBufferType = ssbo ? VK_BUFFER_USAGE_STORAGE_BUFFER_BIT : VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT; if (needresize) diff --git a/src/common/rendering/vulkan/system/vk_framebuffer.cpp b/src/common/rendering/vulkan/system/vk_renderdevice.cpp similarity index 75% rename from src/common/rendering/vulkan/system/vk_framebuffer.cpp rename to src/common/rendering/vulkan/system/vk_renderdevice.cpp index 9ca9d82895..8f4f1b7371 100644 --- a/src/common/rendering/vulkan/system/vk_framebuffer.cpp +++ b/src/common/rendering/vulkan/system/vk_renderdevice.cpp @@ -20,7 +20,7 @@ ** */ -#include "volk/volk.h" +#include #include @@ -43,7 +43,7 @@ #include "hw_lightbuffer.h" #include "hw_bonebuffer.h" -#include "vk_framebuffer.h" +#include "vk_renderdevice.h" #include "vk_hwbuffer.h" #include "vulkan/renderer/vk_renderstate.h" #include "vulkan/renderer/vk_renderpass.h" @@ -56,13 +56,18 @@ #include "vulkan/textures/vk_samplers.h" #include "vulkan/textures/vk_hwtexture.h" #include "vulkan/textures/vk_texture.h" -#include "vulkan/system/vk_builders.h" -#include "vulkan/system/vk_swapchain.h" +#include "vulkan/textures/vk_framebuffer.h" +#include +#include +#include +#include #include "vulkan/system/vk_commandbuffer.h" #include "vulkan/system/vk_buffer.h" #include "engineerrors.h" #include "c_dispatch.h" +FString JitCaptureStackTrace(int framesToSkip, bool includeNativeFrames, int maxFrames = -1); + EXTERN_CVAR(Bool, r_drawvoxels) EXTERN_CVAR(Int, gl_tonemap) EXTERN_CVAR(Int, screenblocks) @@ -73,7 +78,7 @@ CCMD(vk_memstats) if (screen->IsVulkan()) { VmaStats stats = {}; - vmaCalculateStats(static_cast(screen)->device->allocator, &stats); + vmaCalculateStats(static_cast(screen)->device->allocator, &stats); Printf("Allocated objects: %d, used bytes: %d MB\n", (int)stats.total.allocationCount, (int)stats.total.usedBytes / (1024 * 1024)); Printf("Unused range count: %d, unused bytes: %d MB\n", (int)stats.total.unusedRangeCount, (int)stats.total.unusedBytes / (1024 * 1024)); } @@ -83,15 +88,66 @@ CCMD(vk_memstats) } } -CVAR(Bool, vk_raytrace, false, 0/*CVAR_ARCHIVE | CVAR_GLOBALCONFIG*/) +CVAR(Bool, vk_raytrace, false, CVAR_ARCHIVE | CVAR_GLOBALCONFIG) -VulkanFrameBuffer::VulkanFrameBuffer(void *hMonitor, bool fullscreen, VulkanDevice *dev) : - Super(hMonitor, fullscreen) +// Physical device info +static std::vector SupportedDevices; + +CUSTOM_CVAR(Bool, vk_debug, false, CVAR_ARCHIVE | CVAR_GLOBALCONFIG | CVAR_NOINITCALL) { - device = dev; + Printf("This won't take effect until " GAMENAME " is restarted.\n"); } -VulkanFrameBuffer::~VulkanFrameBuffer() +CVAR(Bool, vk_debug_callstack, true, CVAR_ARCHIVE | CVAR_GLOBALCONFIG) + +CUSTOM_CVAR(Int, vk_device, 0, CVAR_ARCHIVE | CVAR_GLOBALCONFIG | CVAR_NOINITCALL) +{ + Printf("This won't take effect until " GAMENAME " is restarted.\n"); +} + +CCMD(vk_listdevices) +{ + for (size_t i = 0; i < SupportedDevices.size(); i++) + { + Printf("#%d - %s\n", (int)i, SupportedDevices[i].Device->Properties.deviceName); + } +} + +void VulkanError(const char* text) +{ + throw CVulkanError(text); +} + +void VulkanPrintLog(const char* typestr, const std::string& msg) +{ + bool showcallstack = strstr(typestr, "error") != nullptr; + + if (showcallstack) + Printf("\n"); + + Printf(TEXTCOLOR_RED "[%s] ", typestr); + Printf(TEXTCOLOR_WHITE "%s\n", msg.c_str()); + + if (vk_debug_callstack && showcallstack) + { + FString callstack = JitCaptureStackTrace(0, true, 5); + if (!callstack.IsEmpty()) + Printf("%s\n", callstack.GetChars()); + } +} + +VulkanRenderDevice::VulkanRenderDevice(void *hMonitor, bool fullscreen, std::shared_ptr surface) : + Super(hMonitor, fullscreen) +{ + VulkanDeviceBuilder builder; + builder.OptionalRayQuery(); + builder.Surface(surface); + builder.SelectDevice(vk_device); + SupportedDevices = builder.FindDevices(surface->Instance); + device = builder.Create(surface->Instance); +} + +VulkanRenderDevice::~VulkanRenderDevice() { vkDeviceWaitIdle(device->device); // make sure the GPU is no longer using any objects before RAII tears them down @@ -114,7 +170,7 @@ VulkanFrameBuffer::~VulkanFrameBuffer() mCommands->DeleteFrameObjects(); } -void VulkanFrameBuffer::InitializeState() +void VulkanRenderDevice::InitializeState() { static bool first = true; if (first) @@ -141,6 +197,7 @@ void VulkanFrameBuffer::InitializeState() mSamplerManager.reset(new VkSamplerManager(this)); mTextureManager.reset(new VkTextureManager(this)); + mFramebufferManager.reset(new VkFramebufferManager(this)); mBufferManager.reset(new VkBufferManager(this)); mBufferManager->Init(); @@ -168,7 +225,7 @@ void VulkanFrameBuffer::InitializeState() #endif } -void VulkanFrameBuffer::Update() +void VulkanRenderDevice::Update() { twoD.Reset(); Flush3D.Reset(); @@ -191,12 +248,12 @@ void VulkanFrameBuffer::Update() Super::Update(); } -bool VulkanFrameBuffer::CompileNextShader() +bool VulkanRenderDevice::CompileNextShader() { return mShaderManager->CompileNextShader(); } -void VulkanFrameBuffer::RenderTextureView(FCanvasTexture* tex, std::function renderFunc) +void VulkanRenderDevice::RenderTextureView(FCanvasTexture* tex, std::function renderFunc) { auto BaseLayer = static_cast(tex->GetHardwareTexture(0, 0)); @@ -229,24 +286,24 @@ void VulkanFrameBuffer::RenderTextureView(FCanvasTexture* tex, std::functionSetUpdated(true); } -void VulkanFrameBuffer::PostProcessScene(bool swscene, int fixedcm, float flash, const std::function &afterBloomDrawEndScene2D) +void VulkanRenderDevice::PostProcessScene(bool swscene, int fixedcm, float flash, const std::function &afterBloomDrawEndScene2D) { if (!swscene) mPostprocess->BlitSceneToPostprocess(); // Copy the resulting scene to the current post process texture mPostprocess->PostProcessScene(fixedcm, flash, afterBloomDrawEndScene2D); } -const char* VulkanFrameBuffer::DeviceName() const +const char* VulkanRenderDevice::DeviceName() const { const auto &props = device->PhysicalDevice.Properties; return props.deviceName; } -void VulkanFrameBuffer::SetVSync(bool vsync) +void VulkanRenderDevice::SetVSync(bool vsync) { mVSync = vsync; } -void VulkanFrameBuffer::PrecacheMaterial(FMaterial *mat, int translation) +void VulkanRenderDevice::PrecacheMaterial(FMaterial *mat, int translation) { if (mat->Source()->GetUseType() == ETextureType::SWCanvas) return; @@ -263,32 +320,32 @@ void VulkanFrameBuffer::PrecacheMaterial(FMaterial *mat, int translation) } } -IHardwareTexture *VulkanFrameBuffer::CreateHardwareTexture(int numchannels) +IHardwareTexture *VulkanRenderDevice::CreateHardwareTexture(int numchannels) { return new VkHardwareTexture(this, numchannels); } -FMaterial* VulkanFrameBuffer::CreateMaterial(FGameTexture* tex, int scaleflags) +FMaterial* VulkanRenderDevice::CreateMaterial(FGameTexture* tex, int scaleflags) { return new VkMaterial(this, tex, scaleflags); } -IVertexBuffer *VulkanFrameBuffer::CreateVertexBuffer() +IVertexBuffer *VulkanRenderDevice::CreateVertexBuffer() { return GetBufferManager()->CreateVertexBuffer(); } -IIndexBuffer *VulkanFrameBuffer::CreateIndexBuffer() +IIndexBuffer *VulkanRenderDevice::CreateIndexBuffer() { return GetBufferManager()->CreateIndexBuffer(); } -IDataBuffer *VulkanFrameBuffer::CreateDataBuffer(int bindingpoint, bool ssbo, bool needsresize) +IDataBuffer *VulkanRenderDevice::CreateDataBuffer(int bindingpoint, bool ssbo, bool needsresize) { return GetBufferManager()->CreateDataBuffer(bindingpoint, ssbo, needsresize); } -void VulkanFrameBuffer::SetTextureFilterMode() +void VulkanRenderDevice::SetTextureFilterMode() { if (mSamplerManager) { @@ -297,25 +354,25 @@ void VulkanFrameBuffer::SetTextureFilterMode() } } -void VulkanFrameBuffer::StartPrecaching() +void VulkanRenderDevice::StartPrecaching() { // Destroy the texture descriptors to avoid problems with potentially stale textures. mDescriptorSetManager->ResetHWTextureSets(); } -void VulkanFrameBuffer::BlurScene(float amount) +void VulkanRenderDevice::BlurScene(float amount) { if (mPostprocess) mPostprocess->BlurScene(amount); } -void VulkanFrameBuffer::UpdatePalette() +void VulkanRenderDevice::UpdatePalette() { if (mPostprocess) mPostprocess->ClearTonemapPalette(); } -FTexture *VulkanFrameBuffer::WipeStartScreen() +FTexture *VulkanRenderDevice::WipeStartScreen() { SetViewportRects(nullptr); @@ -327,7 +384,7 @@ FTexture *VulkanFrameBuffer::WipeStartScreen() return tex; } -FTexture *VulkanFrameBuffer::WipeEndScreen() +FTexture *VulkanRenderDevice::WipeEndScreen() { GetPostprocess()->SetActiveRenderTarget(); Draw2D(); @@ -341,7 +398,7 @@ FTexture *VulkanFrameBuffer::WipeEndScreen() return tex; } -void VulkanFrameBuffer::CopyScreenToBuffer(int w, int h, uint8_t *data) +void VulkanRenderDevice::CopyScreenToBuffer(int w, int h, uint8_t *data) { VkTextureImage image; @@ -351,7 +408,7 @@ void VulkanFrameBuffer::CopyScreenToBuffer(int w, int h, uint8_t *data) .Usage(VK_IMAGE_USAGE_TRANSFER_SRC_BIT | VK_IMAGE_USAGE_TRANSFER_DST_BIT) .Size(w, h) .DebugName("CopyScreenToBuffer") - .Create(device); + .Create(device.get()); GetPostprocess()->BlitCurrentToImage(&image, VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL); @@ -360,7 +417,7 @@ void VulkanFrameBuffer::CopyScreenToBuffer(int w, int h, uint8_t *data) .Size(w * h * 4) .Usage(VK_BUFFER_USAGE_TRANSFER_DST_BIT, VMA_MEMORY_USAGE_GPU_TO_CPU) .DebugName("CopyScreenToBuffer") - .Create(device); + .Create(device.get()); // Copy from image to buffer VkBufferImageCopy region = {}; @@ -393,12 +450,12 @@ void VulkanFrameBuffer::CopyScreenToBuffer(int w, int h, uint8_t *data) staging->Unmap(); } -void VulkanFrameBuffer::SetActiveRenderTarget() +void VulkanRenderDevice::SetActiveRenderTarget() { mPostprocess->SetActiveRenderTarget(); } -TArray VulkanFrameBuffer::GetScreenshotBuffer(int &pitch, ESSType &color_type, float &gamma) +TArray VulkanRenderDevice::GetScreenshotBuffer(int &pitch, ESSType &color_type, float &gamma) { int w = SCREENWIDTH; int h = SCREENHEIGHT; @@ -419,7 +476,7 @@ TArray VulkanFrameBuffer::GetScreenshotBuffer(int &pitch, ESSType &colo return ScreenshotBuffer; } -void VulkanFrameBuffer::BeginFrame() +void VulkanRenderDevice::BeginFrame() { SetViewportRects(nullptr); mViewpoints->Clear(); @@ -431,7 +488,7 @@ void VulkanFrameBuffer::BeginFrame() mDescriptorSetManager->BeginFrame(); } -void VulkanFrameBuffer::InitLightmap(int LMTextureSize, int LMTextureCount, TArray& LMTextureData) +void VulkanRenderDevice::InitLightmap(int LMTextureSize, int LMTextureCount, TArray& LMTextureData) { if (LMTextureData.Size() > 0) { @@ -440,22 +497,22 @@ void VulkanFrameBuffer::InitLightmap(int LMTextureSize, int LMTextureCount, TArr } } -void VulkanFrameBuffer::Draw2D() +void VulkanRenderDevice::Draw2D() { ::Draw2D(twod, *mRenderState); } -void VulkanFrameBuffer::WaitForCommands(bool finish) +void VulkanRenderDevice::WaitForCommands(bool finish) { mCommands->WaitForCommands(finish); } -unsigned int VulkanFrameBuffer::GetLightBufferBlockSize() const +unsigned int VulkanRenderDevice::GetLightBufferBlockSize() const { return mLights->GetBlockSize(); } -void VulkanFrameBuffer::PrintStartupLog() +void VulkanRenderDevice::PrintStartupLog() { const auto &props = device->PhysicalDevice.Properties; @@ -491,43 +548,43 @@ void VulkanFrameBuffer::PrintStartupLog() Printf("Min. uniform buffer offset alignment: %" PRIu64 "\n", limits.minUniformBufferOffsetAlignment); } -void VulkanFrameBuffer::SetLevelMesh(hwrenderer::LevelMesh* mesh) +void VulkanRenderDevice::SetLevelMesh(hwrenderer::LevelMesh* mesh) { mRaytrace->SetLevelMesh(mesh); } -void VulkanFrameBuffer::UpdateShadowMap() +void VulkanRenderDevice::UpdateShadowMap() { mPostprocess->UpdateShadowMap(); } -void VulkanFrameBuffer::SetSaveBuffers(bool yes) +void VulkanRenderDevice::SetSaveBuffers(bool yes) { if (yes) mActiveRenderBuffers = mSaveBuffers.get(); else mActiveRenderBuffers = mScreenBuffers.get(); } -void VulkanFrameBuffer::ImageTransitionScene(bool unknown) +void VulkanRenderDevice::ImageTransitionScene(bool unknown) { mPostprocess->ImageTransitionScene(unknown); } -FRenderState* VulkanFrameBuffer::RenderState() +FRenderState* VulkanRenderDevice::RenderState() { return mRenderState.get(); } -void VulkanFrameBuffer::AmbientOccludeScene(float m5) +void VulkanRenderDevice::AmbientOccludeScene(float m5) { mPostprocess->AmbientOccludeScene(m5); } -void VulkanFrameBuffer::SetSceneRenderTarget(bool useSSAO) +void VulkanRenderDevice::SetSceneRenderTarget(bool useSSAO) { mRenderState->SetRenderTarget(&GetBuffers()->SceneColor, GetBuffers()->SceneDepthStencil.View.get(), GetBuffers()->GetWidth(), GetBuffers()->GetHeight(), VK_FORMAT_R16G16B16A16_SFLOAT, GetBuffers()->GetSceneSamples()); } -bool VulkanFrameBuffer::RaytracingEnabled() +bool VulkanRenderDevice::RaytracingEnabled() { return vk_raytrace && device->SupportsDeviceExtension(VK_KHR_RAY_QUERY_EXTENSION_NAME); } diff --git a/src/common/rendering/vulkan/system/vk_framebuffer.h b/src/common/rendering/vulkan/system/vk_renderdevice.h similarity index 86% rename from src/common/rendering/vulkan/system/vk_framebuffer.h rename to src/common/rendering/vulkan/system/vk_renderdevice.h index 808e75e29d..6b11536711 100644 --- a/src/common/rendering/vulkan/system/vk_framebuffer.h +++ b/src/common/rendering/vulkan/system/vk_renderdevice.h @@ -1,8 +1,9 @@ #pragma once #include "gl_sysfb.h" -#include "vk_device.h" -#include "vk_objects.h" +#include "engineerrors.h" +#include +#include struct FRenderViewpoint; class VkSamplerManager; @@ -12,6 +13,7 @@ class VkShaderManager; class VkCommandBufferManager; class VkDescriptorSetManager; class VkRenderPassManager; +class VkFramebufferManager; class VkRaytrace; class VkRenderState; class VkStreamBuffer; @@ -21,19 +23,20 @@ class VkRenderBuffers; class VkPostprocess; class SWSceneDrawer; -class VulkanFrameBuffer : public SystemBaseFrameBuffer +class VulkanRenderDevice : public SystemBaseFrameBuffer { typedef SystemBaseFrameBuffer Super; public: - VulkanDevice *device; + std::shared_ptr device; VkCommandBufferManager* GetCommands() { return mCommands.get(); } VkShaderManager *GetShaderManager() { return mShaderManager.get(); } VkSamplerManager *GetSamplerManager() { return mSamplerManager.get(); } VkBufferManager* GetBufferManager() { return mBufferManager.get(); } VkTextureManager* GetTextureManager() { return mTextureManager.get(); } + VkFramebufferManager* GetFramebufferManager() { return mFramebufferManager.get(); } VkDescriptorSetManager* GetDescriptorSetManager() { return mDescriptorSetManager.get(); } VkRenderPassManager *GetRenderPassManager() { return mRenderPassManager.get(); } VkRaytrace* GetRaytrace() { return mRaytrace.get(); } @@ -44,8 +47,8 @@ public: unsigned int GetLightBufferBlockSize() const; - VulkanFrameBuffer(void *hMonitor, bool fullscreen, VulkanDevice *dev); - ~VulkanFrameBuffer(); + VulkanRenderDevice(void *hMonitor, bool fullscreen, std::shared_ptr surface); + ~VulkanRenderDevice(); bool IsVulkan() override { return true; } void Update() override; @@ -99,6 +102,7 @@ private: std::unique_ptr mBufferManager; std::unique_ptr mSamplerManager; std::unique_ptr mTextureManager; + std::unique_ptr mFramebufferManager; std::unique_ptr mShaderManager; std::unique_ptr mScreenBuffers; std::unique_ptr mSaveBuffers; @@ -112,3 +116,10 @@ private: bool mVSync = false; }; + +class CVulkanError : public CEngineError +{ +public: + CVulkanError() : CEngineError() {} + CVulkanError(const char* message) : CEngineError(message) {} +}; diff --git a/src/common/rendering/vulkan/system/vk_swapchain.cpp b/src/common/rendering/vulkan/system/vk_swapchain.cpp deleted file mode 100644 index f44139b1f5..0000000000 --- a/src/common/rendering/vulkan/system/vk_swapchain.cpp +++ /dev/null @@ -1,380 +0,0 @@ -/* -** Vulkan backend -** Copyright (c) 2016-2020 Magnus Norddahl -** -** This software is provided 'as-is', without any express or implied -** warranty. In no event will the authors be held liable for any damages -** arising from the use of this software. -** -** Permission is granted to anyone to use this software for any purpose, -** including commercial applications, and to alter it and redistribute it -** freely, subject to the following restrictions: -** -** 1. The origin of this software must not be misrepresented; you must not -** claim that you wrote the original software. If you use this software -** in a product, an acknowledgment in the product documentation would be -** appreciated but is not required. -** 2. Altered source versions must be plainly marked as such, and must not be -** misrepresented as being the original software. -** 3. This notice may not be removed or altered from any source distribution. -** -*/ - -#include "vk_swapchain.h" -#include "vk_objects.h" -#include "c_cvars.h" -#include "version.h" -#include "v_video.h" -#include "vk_framebuffer.h" - - -CVAR(Bool, vk_hdr, false, CVAR_ARCHIVE | CVAR_GLOBALCONFIG); - -void I_GetVulkanDrawableSize(int *width, int *height); - -VulkanSwapChain::VulkanSwapChain(VulkanDevice *device) : device(device) -{ -} - -VulkanSwapChain::~VulkanSwapChain() -{ - ReleaseResources(); -} - -uint32_t VulkanSwapChain::AcquireImage(int width, int height, bool vsync, VulkanSemaphore *semaphore, VulkanFence *fence) -{ - if (lastSwapWidth != width || lastSwapHeight != height || lastVsync != vsync || lastHdr != vk_hdr || !swapChain) - { - Recreate(vsync); - lastSwapWidth = width; - lastSwapHeight = height; - lastVsync = vsync; - lastHdr = vk_hdr; - } - - uint32_t imageIndex; - while (true) - { - if (!swapChain) - { - imageIndex = 0xffffffff; - break; - } - - VkResult result = vkAcquireNextImageKHR(device->device, swapChain, 1'000'000'000, semaphore ? semaphore->semaphore : VK_NULL_HANDLE, fence ? fence->fence : VK_NULL_HANDLE, &imageIndex); - if (result == VK_SUCCESS) - { - break; - } - else if (result == VK_SUBOPTIMAL_KHR || result == VK_ERROR_SURFACE_LOST_KHR) - { - // Force the recreate to happen next frame. - // The spec is not very clear about what happens to the semaphore or the acquired image if the swapchain is recreated before the image is released with a call to vkQueuePresentKHR. - lastSwapWidth = 0; - lastSwapHeight = 0; - break; - } - else if (result == VK_ERROR_OUT_OF_DATE_KHR) - { - Recreate(vsync); - } - else if (result == VK_NOT_READY || result == VK_TIMEOUT) - { - imageIndex = 0xffffffff; - break; - } - else if (result == VK_ERROR_OUT_OF_HOST_MEMORY || result == VK_ERROR_OUT_OF_DEVICE_MEMORY) - { - VulkanError("vkAcquireNextImageKHR failed: out of memory"); - } - else if (result == VK_ERROR_DEVICE_LOST) - { - VulkanError("vkAcquireNextImageKHR failed: device lost"); - } - else - { - VulkanError("vkAcquireNextImageKHR failed"); - } - } - return imageIndex; -} - -void VulkanSwapChain::QueuePresent(uint32_t imageIndex, VulkanSemaphore *semaphore) -{ - VkPresentInfoKHR presentInfo = {}; - presentInfo.sType = VK_STRUCTURE_TYPE_PRESENT_INFO_KHR; - presentInfo.waitSemaphoreCount = semaphore ? 1 : 0; - presentInfo.pWaitSemaphores = semaphore ? &semaphore->semaphore : VK_NULL_HANDLE; - presentInfo.swapchainCount = 1; - presentInfo.pSwapchains = &swapChain; - presentInfo.pImageIndices = &imageIndex; - presentInfo.pResults = nullptr; - VkResult result = vkQueuePresentKHR(device->presentQueue, &presentInfo); - if (result == VK_SUBOPTIMAL_KHR || result == VK_ERROR_OUT_OF_DATE_KHR || result == VK_ERROR_SURFACE_LOST_KHR) - { - lastSwapWidth = 0; - lastSwapHeight = 0; - } - else if (result == VK_ERROR_OUT_OF_HOST_MEMORY || result == VK_ERROR_OUT_OF_DEVICE_MEMORY) - { - // The spec says we can recover from this. - // However, if we are out of memory it is better to crash now than in some other weird place further away from the source of the problem. - - VulkanError("vkQueuePresentKHR failed: out of memory"); - } - else if (result == VK_ERROR_DEVICE_LOST) - { - VulkanError("vkQueuePresentKHR failed: device lost"); - } - else if (result != VK_SUCCESS) - { - VulkanError("vkQueuePresentKHR failed"); - } -} - -void VulkanSwapChain::Recreate(bool vsync) -{ - ReleaseViews(); - swapChainImages.clear(); - - VkSwapchainKHR oldSwapChain = swapChain; - CreateSwapChain(vsync, oldSwapChain); - if (oldSwapChain) - vkDestroySwapchainKHR(device->device, oldSwapChain, nullptr); - - if (swapChain) - { - GetImages(); - CreateViews(); - } -} - -bool VulkanSwapChain::CreateSwapChain(bool vsync, VkSwapchainKHR oldSwapChain) -{ - SelectFormat(); - SelectPresentMode(vsync); - - int width, height; - I_GetVulkanDrawableSize(&width, &height); - - VkSurfaceCapabilitiesKHR surfaceCapabilities = GetSurfaceCapabilities(); - - actualExtent = { static_cast(width), static_cast(height) }; - actualExtent.width = max(surfaceCapabilities.minImageExtent.width, min(surfaceCapabilities.maxImageExtent.width, actualExtent.width)); - actualExtent.height = max(surfaceCapabilities.minImageExtent.height, min(surfaceCapabilities.maxImageExtent.height, actualExtent.height)); - if (actualExtent.width == 0 || actualExtent.height == 0) - { - swapChain = VK_NULL_HANDLE; - return false; - } - - uint32_t imageCount = surfaceCapabilities.minImageCount + 1; - if (surfaceCapabilities.maxImageCount > 0 && imageCount > surfaceCapabilities.maxImageCount) - imageCount = surfaceCapabilities.maxImageCount; - - // When vsync is on we only want two images. This creates a slight performance penalty in exchange for reduced input latency (less mouse lag). - // When vsync is off we want three images as it allows us to generate new images even during the vertical blanking period where one entry is being used by the presentation engine. - if (swapChainPresentMode == VK_PRESENT_MODE_MAILBOX_KHR || swapChainPresentMode == VK_PRESENT_MODE_IMMEDIATE_KHR) - imageCount = min(imageCount, (uint32_t)3); - else - imageCount = min(imageCount, (uint32_t)2); - - VkSwapchainCreateInfoKHR swapChainCreateInfo = {}; - swapChainCreateInfo.sType = VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR; - swapChainCreateInfo.surface = device->surface; - swapChainCreateInfo.minImageCount = imageCount; - swapChainCreateInfo.imageFormat = swapChainFormat.format; - swapChainCreateInfo.imageColorSpace = swapChainFormat.colorSpace; - swapChainCreateInfo.imageExtent = actualExtent; - swapChainCreateInfo.imageArrayLayers = 1; - swapChainCreateInfo.imageUsage = VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT; - - uint32_t queueFamilyIndices[] = { (uint32_t)device->graphicsFamily, (uint32_t)device->presentFamily }; - if (device->graphicsFamily != device->presentFamily) - { - swapChainCreateInfo.imageSharingMode = VK_SHARING_MODE_CONCURRENT; - swapChainCreateInfo.queueFamilyIndexCount = 2; - swapChainCreateInfo.pQueueFamilyIndices = queueFamilyIndices; - } - else - { - swapChainCreateInfo.imageSharingMode = VK_SHARING_MODE_EXCLUSIVE; - swapChainCreateInfo.queueFamilyIndexCount = 0; - swapChainCreateInfo.pQueueFamilyIndices = nullptr; - } - - swapChainCreateInfo.preTransform = surfaceCapabilities.currentTransform; - swapChainCreateInfo.compositeAlpha = VK_COMPOSITE_ALPHA_OPAQUE_BIT_KHR; // If alpha channel is passed on to the DWM or not - swapChainCreateInfo.presentMode = swapChainPresentMode; - swapChainCreateInfo.clipped = VK_TRUE; - swapChainCreateInfo.oldSwapchain = oldSwapChain; - - VkResult result = vkCreateSwapchainKHR(device->device, &swapChainCreateInfo, nullptr, &swapChain); - if (result != VK_SUCCESS) - { - swapChain = VK_NULL_HANDLE; - return false; - } - - return true; -} - -void VulkanSwapChain::CreateViews() -{ - framebuffers.resize(swapChainImages.size()); - swapChainImageViews.reserve(swapChainImages.size()); - for (size_t i = 0; i < swapChainImages.size(); i++) - { - device->SetDebugObjectName("SwapChainImage", (uint64_t)swapChainImages[i], VK_OBJECT_TYPE_IMAGE); - - VkImageViewCreateInfo createInfo = {}; - createInfo.sType = VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO; - createInfo.image = swapChainImages[i]; - createInfo.viewType = VK_IMAGE_VIEW_TYPE_2D; - createInfo.format = swapChainFormat.format; - createInfo.subresourceRange.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT; - createInfo.subresourceRange.baseMipLevel = 0; - createInfo.subresourceRange.levelCount = 1; - createInfo.subresourceRange.baseArrayLayer = 0; - createInfo.subresourceRange.layerCount = 1; - - VkImageView view; - VkResult result = vkCreateImageView(device->device, &createInfo, nullptr, &view); - CheckVulkanError(result, "Could not create image view for swapchain image"); - - device->SetDebugObjectName("SwapChainImageView", (uint64_t)view, VK_OBJECT_TYPE_IMAGE_VIEW); - - swapChainImageViews.push_back(view); - } -} - -bool VulkanSwapChain::IsHdrModeActive() const -{ - return swapChainFormat.colorSpace == VK_COLOR_SPACE_EXTENDED_SRGB_LINEAR_EXT; -} - -void VulkanSwapChain::SelectFormat() -{ - std::vector surfaceFormats = GetSurfaceFormats(); - if (surfaceFormats.empty()) - VulkanError("No surface formats supported"); - - if (surfaceFormats.size() == 1 && surfaceFormats.front().format == VK_FORMAT_UNDEFINED) - { - swapChainFormat.format = VK_FORMAT_B8G8R8A8_UNORM; - swapChainFormat.colorSpace = VK_COLOR_SPACE_SRGB_NONLINEAR_KHR; - return; - } - - if (vk_hdr) - { - for (const auto& format : surfaceFormats) - { - if (format.format == VK_FORMAT_R16G16B16A16_SFLOAT && format.colorSpace == VK_COLOR_SPACE_EXTENDED_SRGB_LINEAR_EXT) - { - swapChainFormat = format; - return; - } - } - } - - for (const auto &format : surfaceFormats) - { - if (format.format == VK_FORMAT_B8G8R8A8_UNORM && format.colorSpace == VK_COLOR_SPACE_SRGB_NONLINEAR_KHR) - { - swapChainFormat = format; - return; - } - } - - swapChainFormat = surfaceFormats.front(); -} - -void VulkanSwapChain::SelectPresentMode(bool vsync) -{ - std::vector presentModes = GetPresentModes(); - - if (presentModes.empty()) - VulkanError("No surface present modes supported"); - - swapChainPresentMode = VK_PRESENT_MODE_FIFO_KHR; - if (vsync) - { - bool supportsFifoRelaxed = std::find(presentModes.begin(), presentModes.end(), VK_PRESENT_MODE_FIFO_RELAXED_KHR) != presentModes.end(); - if (supportsFifoRelaxed) - swapChainPresentMode = VK_PRESENT_MODE_FIFO_RELAXED_KHR; - } - else - { - bool supportsMailbox = std::find(presentModes.begin(), presentModes.end(), VK_PRESENT_MODE_MAILBOX_KHR) != presentModes.end(); - bool supportsImmediate = std::find(presentModes.begin(), presentModes.end(), VK_PRESENT_MODE_IMMEDIATE_KHR) != presentModes.end(); - if (supportsMailbox) - swapChainPresentMode = VK_PRESENT_MODE_MAILBOX_KHR; - else if (supportsImmediate) - swapChainPresentMode = VK_PRESENT_MODE_IMMEDIATE_KHR; - } -} - -void VulkanSwapChain::GetImages() -{ - uint32_t imageCount; - VkResult result = vkGetSwapchainImagesKHR(device->device, swapChain, &imageCount, nullptr); - CheckVulkanError(result, "vkGetSwapchainImagesKHR failed"); - - swapChainImages.resize(imageCount); - result = vkGetSwapchainImagesKHR(device->device, swapChain, &imageCount, swapChainImages.data()); - CheckVulkanError(result, "vkGetSwapchainImagesKHR failed (2)"); -} - -void VulkanSwapChain::ReleaseViews() -{ - framebuffers.clear(); - for (auto &view : swapChainImageViews) - { - vkDestroyImageView(device->device, view, nullptr); - } - swapChainImageViews.clear(); -} - -void VulkanSwapChain::ReleaseResources() -{ - ReleaseViews(); - if (swapChain) - vkDestroySwapchainKHR(device->device, swapChain, nullptr); -} - -VkSurfaceCapabilitiesKHR VulkanSwapChain::GetSurfaceCapabilities() -{ - VkSurfaceCapabilitiesKHR surfaceCapabilities; - VkResult result = vkGetPhysicalDeviceSurfaceCapabilitiesKHR(device->PhysicalDevice.Device, device->surface, &surfaceCapabilities); - CheckVulkanError(result, "vkGetPhysicalDeviceSurfaceCapabilitiesKHR failed"); - return surfaceCapabilities; -} - -std::vector VulkanSwapChain::GetSurfaceFormats() -{ - uint32_t surfaceFormatCount = 0; - VkResult result = vkGetPhysicalDeviceSurfaceFormatsKHR(device->PhysicalDevice.Device, device->surface, &surfaceFormatCount, nullptr); - CheckVulkanError(result, "vkGetPhysicalDeviceSurfaceFormatsKHR failed"); - if (surfaceFormatCount == 0) - return {}; - - std::vector surfaceFormats(surfaceFormatCount); - result = vkGetPhysicalDeviceSurfaceFormatsKHR(device->PhysicalDevice.Device, device->surface, &surfaceFormatCount, surfaceFormats.data()); - CheckVulkanError(result, "vkGetPhysicalDeviceSurfaceFormatsKHR failed"); - return surfaceFormats; -} - -std::vector VulkanSwapChain::GetPresentModes() -{ - uint32_t presentModeCount = 0; - VkResult result = vkGetPhysicalDeviceSurfacePresentModesKHR(device->PhysicalDevice.Device, device->surface, &presentModeCount, nullptr); - CheckVulkanError(result, "vkGetPhysicalDeviceSurfacePresentModesKHR failed"); - if (presentModeCount == 0) - return {}; - - std::vector presentModes(presentModeCount); - vkGetPhysicalDeviceSurfacePresentModesKHR(device->PhysicalDevice.Device, device->surface, &presentModeCount, presentModes.data()); - CheckVulkanError(result, "vkGetPhysicalDeviceSurfacePresentModesKHR failed"); - return presentModes; -} diff --git a/src/common/rendering/vulkan/system/vk_swapchain.h b/src/common/rendering/vulkan/system/vk_swapchain.h deleted file mode 100644 index cbb5ab6983..0000000000 --- a/src/common/rendering/vulkan/system/vk_swapchain.h +++ /dev/null @@ -1,53 +0,0 @@ -#pragma once - -#include "vk_device.h" - -class VulkanSemaphore; -class VulkanFence; -class VulkanFramebuffer; - -class VulkanSwapChain -{ -public: - VulkanSwapChain(VulkanDevice *device); - ~VulkanSwapChain(); - - uint32_t AcquireImage(int width, int height, bool vsync, VulkanSemaphore *semaphore = nullptr, VulkanFence *fence = nullptr); - void QueuePresent(uint32_t imageIndex, VulkanSemaphore *semaphore = nullptr); - - bool IsHdrModeActive() const; - - VkSwapchainKHR swapChain = VK_NULL_HANDLE; - VkSurfaceFormatKHR swapChainFormat; - VkPresentModeKHR swapChainPresentMode; - - std::vector swapChainImages; - std::vector swapChainImageViews; - std::vector> framebuffers; - - VkExtent2D actualExtent; - -private: - void Recreate(bool vsync); - void SelectFormat(); - void SelectPresentMode(bool vsync); - bool CreateSwapChain(bool vsync, VkSwapchainKHR oldSwapChain = VK_NULL_HANDLE); - void CreateViews(); - void GetImages(); - void ReleaseResources(); - void ReleaseViews(); - - VkSurfaceCapabilitiesKHR GetSurfaceCapabilities(); - std::vector GetSurfaceFormats(); - std::vector GetPresentModes(); - - VulkanDevice *device = nullptr; - - int lastSwapWidth = 0; - int lastSwapHeight = 0; - bool lastVsync = false; - bool lastHdr = false; - - VulkanSwapChain(const VulkanSwapChain &) = delete; - VulkanSwapChain &operator=(const VulkanSwapChain &) = delete; -}; diff --git a/src/common/rendering/vulkan/textures/vk_framebuffer.cpp b/src/common/rendering/vulkan/textures/vk_framebuffer.cpp new file mode 100644 index 0000000000..c32e73b9d4 --- /dev/null +++ b/src/common/rendering/vulkan/textures/vk_framebuffer.cpp @@ -0,0 +1,79 @@ +/* +** Vulkan backend +** Copyright (c) 2016-2020 Magnus Norddahl +** +** This software is provided 'as-is', without any express or implied +** warranty. In no event will the authors be held liable for any damages +** arising from the use of this software. +** +** Permission is granted to anyone to use this software for any purpose, +** including commercial applications, and to alter it and redistribute it +** freely, subject to the following restrictions: +** +** 1. The origin of this software must not be misrepresented; you must not +** claim that you wrote the original software. If you use this software +** in a product, an acknowledgment in the product documentation would be +** appreciated but is not required. +** 2. Altered source versions must be plainly marked as such, and must not be +** misrepresented as being the original software. +** 3. This notice may not be removed or altered from any source distribution. +** +*/ + +#include +#include +#include +#include +#include "vulkan/system/vk_renderdevice.h" +#include "vulkan/renderer/vk_postprocess.h" +#include "vk_framebuffer.h" + +CVAR(Bool, vk_hdr, false, CVAR_ARCHIVE | CVAR_GLOBALCONFIG); +CVAR(Bool, vk_exclusivefullscreen, false, CVAR_ARCHIVE | CVAR_GLOBALCONFIG); + +VkFramebufferManager::VkFramebufferManager(VulkanRenderDevice* fb) : fb(fb) +{ + SwapChain = VulkanSwapChainBuilder() + .Create(fb->device.get()); + + SwapChainImageAvailableSemaphore = SemaphoreBuilder() + .DebugName("SwapChainImageAvailableSemaphore") + .Create(fb->device.get()); + + RenderFinishedSemaphore = SemaphoreBuilder() + .DebugName("RenderFinishedSemaphore") + .Create(fb->device.get()); +} + +VkFramebufferManager::~VkFramebufferManager() +{ +} + +void VkFramebufferManager::AcquireImage() +{ + bool exclusiveFullscreen = fb->IsFullscreen() && vk_exclusivefullscreen; + if (SwapChain->Lost() || fb->GetClientWidth() != CurrentWidth || fb->GetClientHeight() != CurrentHeight || fb->GetVSync() != CurrentVSync || CurrentHdr != vk_hdr || CurrentExclusiveFullscreen != exclusiveFullscreen) + { + Framebuffers.clear(); + + CurrentWidth = fb->GetClientWidth(); + CurrentHeight = fb->GetClientHeight(); + CurrentVSync = fb->GetVSync(); + CurrentHdr = vk_hdr; + CurrentExclusiveFullscreen = exclusiveFullscreen; + + SwapChain->Create(CurrentWidth, CurrentHeight, CurrentVSync ? 2 : 3, CurrentVSync, CurrentHdr, CurrentExclusiveFullscreen); + } + + PresentImageIndex = SwapChain->AcquireImage(SwapChainImageAvailableSemaphore.get()); + if (PresentImageIndex != -1) + { + fb->GetPostprocess()->DrawPresentTexture(fb->mOutputLetterbox, true, false); + } +} + +void VkFramebufferManager::QueuePresent() +{ + if (PresentImageIndex != -1) + SwapChain->QueuePresent(PresentImageIndex, RenderFinishedSemaphore.get()); +} diff --git a/src/common/rendering/vulkan/textures/vk_framebuffer.h b/src/common/rendering/vulkan/textures/vk_framebuffer.h new file mode 100644 index 0000000000..06cc6a261c --- /dev/null +++ b/src/common/rendering/vulkan/textures/vk_framebuffer.h @@ -0,0 +1,36 @@ + +#pragma once + +#include "zvulkan/vulkanobjects.h" +#include +#include + +class VulkanRenderDevice; +enum class PPFilterMode; +enum class PPWrapMode; + +class VkFramebufferManager +{ +public: + VkFramebufferManager(VulkanRenderDevice* fb); + ~VkFramebufferManager(); + + void AcquireImage(); + void QueuePresent(); + + std::map> Framebuffers; + + std::shared_ptr SwapChain; + int PresentImageIndex = -1; + + std::unique_ptr SwapChainImageAvailableSemaphore; + std::unique_ptr RenderFinishedSemaphore; + +private: + VulkanRenderDevice* fb = nullptr; + int CurrentWidth = 0; + int CurrentHeight = 0; + bool CurrentVSync = false; + bool CurrentHdr = false; + bool CurrentExclusiveFullscreen = false; +}; diff --git a/src/common/rendering/vulkan/textures/vk_hwtexture.cpp b/src/common/rendering/vulkan/textures/vk_hwtexture.cpp index 3cc69ccefe..b42a45a19e 100644 --- a/src/common/rendering/vulkan/textures/vk_hwtexture.cpp +++ b/src/common/rendering/vulkan/textures/vk_hwtexture.cpp @@ -25,9 +25,9 @@ #include "hw_material.h" #include "hw_cvars.h" #include "hw_renderstate.h" -#include "vulkan/system/vk_objects.h" -#include "vulkan/system/vk_builders.h" -#include "vulkan/system/vk_framebuffer.h" +#include +#include +#include "vulkan/system/vk_renderdevice.h" #include "vulkan/system/vk_commandbuffer.h" #include "vulkan/textures/vk_samplers.h" #include "vulkan/textures/vk_renderbuffers.h" @@ -37,7 +37,7 @@ #include "vulkan/shaders/vk_shader.h" #include "vk_hwtexture.h" -VkHardwareTexture::VkHardwareTexture(VulkanFrameBuffer* fb, int numchannels) : fb(fb) +VkHardwareTexture::VkHardwareTexture(VulkanRenderDevice* fb, int numchannels) : fb(fb) { mTexelsize = numchannels; fb->GetTextureManager()->AddTexture(this); @@ -87,14 +87,14 @@ VkTextureImage *VkHardwareTexture::GetDepthStencil(FTexture *tex) .Format(format) .Usage(VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT) .DebugName("VkHardwareTexture.DepthStencil") - .Create(fb->device); + .Create(fb->device.get()); mDepthStencil.AspectMask = VK_IMAGE_ASPECT_DEPTH_BIT | VK_IMAGE_ASPECT_STENCIL_BIT; mDepthStencil.View = ImageViewBuilder() .Image(mDepthStencil.Image.get(), format, VK_IMAGE_ASPECT_DEPTH_BIT | VK_IMAGE_ASPECT_STENCIL_BIT) .DebugName("VkHardwareTexture.DepthStencilView") - .Create(fb->device); + .Create(fb->device.get()); VkImageTransition() .AddImage(&mDepthStencil, VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL, true) @@ -122,12 +122,12 @@ void VkHardwareTexture::CreateImage(FTexture *tex, int translation, int flags) .Size(w, h) .Usage(VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT | VK_IMAGE_USAGE_SAMPLED_BIT) .DebugName("VkHardwareTexture.mImage") - .Create(fb->device); + .Create(fb->device.get()); mImage.View = ImageViewBuilder() .Image(mImage.Image.get(), format) .DebugName("VkHardwareTexture.mImageView") - .Create(fb->device); + .Create(fb->device.get()); VkImageTransition() .AddImage(&mImage, VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL, true) @@ -146,7 +146,7 @@ void VkHardwareTexture::CreateTexture(int w, int h, int pixelsize, VkFormat form .Size(totalSize) .Usage(VK_BUFFER_USAGE_TRANSFER_SRC_BIT, VMA_MEMORY_USAGE_CPU_ONLY) .DebugName("VkHardwareTexture.mStagingBuffer") - .Create(fb->device); + .Create(fb->device.get()); uint8_t *data = (uint8_t*)stagingBuffer->Map(0, totalSize); memcpy(data, pixels, totalSize); @@ -157,12 +157,12 @@ void VkHardwareTexture::CreateTexture(int w, int h, int pixelsize, VkFormat form .Size(w, h, !mipmap ? 1 : GetMipLevels(w, h)) .Usage(VK_IMAGE_USAGE_TRANSFER_SRC_BIT | VK_IMAGE_USAGE_TRANSFER_DST_BIT | VK_IMAGE_USAGE_SAMPLED_BIT) .DebugName("VkHardwareTexture.mImage") - .Create(fb->device); + .Create(fb->device.get()); mImage.View = ImageViewBuilder() .Image(mImage.Image.get(), format) .DebugName("VkHardwareTexture.mImageView") - .Create(fb->device); + .Create(fb->device.get()); auto cmdbuffer = fb->GetCommands()->GetTransferCommands(); @@ -219,14 +219,14 @@ void VkHardwareTexture::AllocateBuffer(int w, int h, int texelsize) VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT, VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT | VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT) .DebugName("VkHardwareTexture.mImage") - .Create(fb->device, &allocatedBytes); + .Create(fb->device.get(), &allocatedBytes); mTexelsize = texelsize; mImage.View = ImageViewBuilder() .Image(mImage.Image.get(), format) .DebugName("VkHardwareTexture.mImageView") - .Create(fb->device); + .Create(fb->device.get()); VkImageTransition() .AddImage(&mImage, VK_IMAGE_LAYOUT_GENERAL, true) @@ -260,14 +260,14 @@ void VkHardwareTexture::CreateWipeTexture(int w, int h, const char *name) .Size(w, h) .Usage(VK_IMAGE_USAGE_SAMPLED_BIT | VK_IMAGE_USAGE_TRANSFER_DST_BIT, VMA_MEMORY_USAGE_GPU_ONLY) .DebugName(name) - .Create(fb->device); + .Create(fb->device.get()); mTexelsize = 4; mImage.View = ImageViewBuilder() .Image(mImage.Image.get(), format) .DebugName(name) - .Create(fb->device); + .Create(fb->device.get()); if (fb->GetBuffers()->GetWidth() > 0 && fb->GetBuffers()->GetHeight() > 0) { @@ -302,7 +302,7 @@ void VkHardwareTexture::CreateWipeTexture(int w, int h, const char *name) ///////////////////////////////////////////////////////////////////////////// -VkMaterial::VkMaterial(VulkanFrameBuffer* fb, FGameTexture* tex, int scaleflags) : FMaterial(tex, scaleflags), fb(fb) +VkMaterial::VkMaterial(VulkanRenderDevice* fb, FGameTexture* tex, int scaleflags) : FMaterial(tex, scaleflags), fb(fb) { fb->GetDescriptorSetManager()->AddMaterial(this); } @@ -380,7 +380,7 @@ VulkanDescriptorSet* VkMaterial::GetDescriptorSet(const FMaterialState& state) update.AddCombinedImageSampler(descriptor.get(), i, dummyImage, sampler, VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL); } - update.Execute(fb->device); + update.Execute(fb->device.get()); mDescriptorSets.emplace_back(clampmode, translationp, std::move(descriptor)); return mDescriptorSets.back().descriptor.get(); } diff --git a/src/common/rendering/vulkan/textures/vk_hwtexture.h b/src/common/rendering/vulkan/textures/vk_hwtexture.h index 030a97f529..2711bdb33d 100644 --- a/src/common/rendering/vulkan/textures/vk_hwtexture.h +++ b/src/common/rendering/vulkan/textures/vk_hwtexture.h @@ -9,7 +9,7 @@ #include "tarray.h" #include "hw_ihwtexture.h" -#include "volk/volk.h" +#include #include "vk_imagetransition.h" #include "hw_material.h" #include @@ -19,14 +19,14 @@ class VulkanDescriptorSet; class VulkanImage; class VulkanImageView; class VulkanBuffer; -class VulkanFrameBuffer; +class VulkanRenderDevice; class FGameTexture; class VkHardwareTexture : public IHardwareTexture { friend class VkMaterial; public: - VkHardwareTexture(VulkanFrameBuffer* fb, int numchannels); + VkHardwareTexture(VulkanRenderDevice* fb, int numchannels); ~VkHardwareTexture(); void Reset(); @@ -42,7 +42,7 @@ public: VkTextureImage *GetImage(FTexture *tex, int translation, int flags); VkTextureImage *GetDepthStencil(FTexture *tex); - VulkanFrameBuffer* fb = nullptr; + VulkanRenderDevice* fb = nullptr; std::list::iterator it; private: @@ -62,14 +62,14 @@ private: class VkMaterial : public FMaterial { public: - VkMaterial(VulkanFrameBuffer* fb, FGameTexture* tex, int scaleflags); + VkMaterial(VulkanRenderDevice* fb, FGameTexture* tex, int scaleflags); ~VkMaterial(); VulkanDescriptorSet* GetDescriptorSet(const FMaterialState& state); void DeleteDescriptors() override; - VulkanFrameBuffer* fb = nullptr; + VulkanRenderDevice* fb = nullptr; std::list::iterator it; private: diff --git a/src/common/rendering/vulkan/textures/vk_imagetransition.h b/src/common/rendering/vulkan/textures/vk_imagetransition.h index c314bf3dcc..9f1194bbf2 100644 --- a/src/common/rendering/vulkan/textures/vk_imagetransition.h +++ b/src/common/rendering/vulkan/textures/vk_imagetransition.h @@ -1,16 +1,16 @@ #pragma once -#include "vulkan/system/vk_objects.h" -#include "vulkan/system/vk_builders.h" -#include "vulkan/system/vk_framebuffer.h" +#include "zvulkan/vulkanobjects.h" +#include "zvulkan/vulkanbuilders.h" +#include "vulkan/system/vk_renderdevice.h" #include "vulkan/system/vk_commandbuffer.h" #include "vulkan/renderer/vk_renderpass.h" class VkTextureImage { public: - void Reset(VulkanFrameBuffer* fb) + void Reset(VulkanRenderDevice* fb) { AspectMask = VK_IMAGE_ASPECT_COLOR_BIT; Layout = VK_IMAGE_LAYOUT_UNDEFINED; diff --git a/src/common/rendering/vulkan/textures/vk_pptexture.cpp b/src/common/rendering/vulkan/textures/vk_pptexture.cpp index d76ad38a1b..94114d4b62 100644 --- a/src/common/rendering/vulkan/textures/vk_pptexture.cpp +++ b/src/common/rendering/vulkan/textures/vk_pptexture.cpp @@ -22,10 +22,10 @@ #include "vk_pptexture.h" #include "vk_texture.h" -#include "vulkan/system/vk_framebuffer.h" +#include "vulkan/system/vk_renderdevice.h" #include "vulkan/system/vk_commandbuffer.h" -VkPPTexture::VkPPTexture(VulkanFrameBuffer* fb, PPTexture *texture) : fb(fb) +VkPPTexture::VkPPTexture(VulkanRenderDevice* fb, PPTexture *texture) : fb(fb) { VkFormat format; int pixelsize; @@ -47,15 +47,15 @@ VkPPTexture::VkPPTexture(VulkanFrameBuffer* fb, PPTexture *texture) : fb(fb) else imgbuilder.Usage(VK_IMAGE_USAGE_SAMPLED_BIT | VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT); imgbuilder.DebugName("VkPPTexture"); - if (!imgbuilder.IsFormatSupported(fb->device)) + if (!imgbuilder.IsFormatSupported(fb->device.get())) I_FatalError("Vulkan device does not support the image format required by a postprocess texture\n"); - TexImage.Image = imgbuilder.Create(fb->device); + TexImage.Image = imgbuilder.Create(fb->device.get()); Format = format; TexImage.View = ImageViewBuilder() .Image(TexImage.Image.get(), format) .DebugName("VkPPTextureView") - .Create(fb->device); + .Create(fb->device.get()); if (texture->Data) { @@ -65,7 +65,7 @@ VkPPTexture::VkPPTexture(VulkanFrameBuffer* fb, PPTexture *texture) : fb(fb) .Size(totalsize) .Usage(VK_BUFFER_USAGE_TRANSFER_SRC_BIT, VMA_MEMORY_USAGE_CPU_ONLY) .DebugName("VkPPTextureStaging") - .Create(fb->device); + .Create(fb->device.get()); VkImageTransition() .AddImage(&TexImage, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, true) diff --git a/src/common/rendering/vulkan/textures/vk_pptexture.h b/src/common/rendering/vulkan/textures/vk_pptexture.h index e6590be572..e0544b0d02 100644 --- a/src/common/rendering/vulkan/textures/vk_pptexture.h +++ b/src/common/rendering/vulkan/textures/vk_pptexture.h @@ -2,21 +2,21 @@ #pragma once #include "hwrenderer/postprocessing/hw_postprocess.h" -#include "vulkan/system/vk_objects.h" +#include #include "vulkan/textures/vk_imagetransition.h" #include -class VulkanFrameBuffer; +class VulkanRenderDevice; class VkPPTexture : public PPTextureBackend { public: - VkPPTexture(VulkanFrameBuffer* fb, PPTexture *texture); + VkPPTexture(VulkanRenderDevice* fb, PPTexture *texture); ~VkPPTexture(); void Reset(); - VulkanFrameBuffer* fb = nullptr; + VulkanRenderDevice* fb = nullptr; std::list::iterator it; VkTextureImage TexImage; diff --git a/src/common/rendering/vulkan/textures/vk_renderbuffers.cpp b/src/common/rendering/vulkan/textures/vk_renderbuffers.cpp index 16f0fe7829..01bc8f59ac 100644 --- a/src/common/rendering/vulkan/textures/vk_renderbuffers.cpp +++ b/src/common/rendering/vulkan/textures/vk_renderbuffers.cpp @@ -23,14 +23,15 @@ #include "vk_renderbuffers.h" #include "vulkan/renderer/vk_postprocess.h" #include "vulkan/textures/vk_texture.h" +#include "vulkan/textures/vk_framebuffer.h" #include "vulkan/shaders/vk_shader.h" -#include "vulkan/system/vk_builders.h" -#include "vulkan/system/vk_framebuffer.h" +#include +#include +#include "vulkan/system/vk_renderdevice.h" #include "vulkan/system/vk_commandbuffer.h" -#include "vulkan/system/vk_swapchain.h" #include "hw_cvars.h" -VkRenderBuffers::VkRenderBuffers(VulkanFrameBuffer* fb) : fb(fb) +VkRenderBuffers::VkRenderBuffers(VulkanRenderDevice* fb) : fb(fb) { } @@ -89,29 +90,29 @@ void VkRenderBuffers::CreatePipelineDepthStencil(int width, int height) builder.Size(width, height); builder.Format(PipelineDepthStencilFormat); builder.Usage(VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT | VK_IMAGE_USAGE_SAMPLED_BIT); - if (!builder.IsFormatSupported(fb->device)) + if (!builder.IsFormatSupported(fb->device.get())) { PipelineDepthStencilFormat = VK_FORMAT_D32_SFLOAT_S8_UINT; builder.Format(PipelineDepthStencilFormat); - if (!builder.IsFormatSupported(fb->device)) + if (!builder.IsFormatSupported(fb->device.get())) { I_FatalError("This device does not support any of the required depth stencil image formats."); } } builder.DebugName("VkRenderBuffers.PipelineDepthStencil"); - PipelineDepthStencil.Image = builder.Create(fb->device); + PipelineDepthStencil.Image = builder.Create(fb->device.get()); PipelineDepthStencil.AspectMask = VK_IMAGE_ASPECT_DEPTH_BIT | VK_IMAGE_ASPECT_STENCIL_BIT; PipelineDepthStencil.View = ImageViewBuilder() .Image(PipelineDepthStencil.Image.get(), PipelineDepthStencilFormat, VK_IMAGE_ASPECT_DEPTH_BIT | VK_IMAGE_ASPECT_STENCIL_BIT) .DebugName("VkRenderBuffers.PipelineDepthStencilView") - .Create(fb->device); + .Create(fb->device.get()); PipelineDepthStencil.DepthOnlyView = ImageViewBuilder() .Image(PipelineDepthStencil.Image.get(), PipelineDepthStencilFormat, VK_IMAGE_ASPECT_DEPTH_BIT) .DebugName("VkRenderBuffers.PipelineDepthView") - .Create(fb->device); + .Create(fb->device.get()); } void VkRenderBuffers::CreatePipeline(int width, int height) @@ -133,12 +134,12 @@ void VkRenderBuffers::CreatePipeline(int width, int height) .Format(VK_FORMAT_R16G16B16A16_SFLOAT) .Usage(VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT | VK_IMAGE_USAGE_SAMPLED_BIT | VK_IMAGE_USAGE_TRANSFER_SRC_BIT | VK_IMAGE_USAGE_TRANSFER_DST_BIT) .DebugName("VkRenderBuffers.PipelineImage") - .Create(fb->device); + .Create(fb->device.get()); PipelineImage[i].View = ImageViewBuilder() .Image(PipelineImage[i].Image.get(), VK_FORMAT_R16G16B16A16_SFLOAT) .DebugName("VkRenderBuffers.PipelineView") - .Create(fb->device); + .Create(fb->device.get()); barrier.AddImage(&PipelineImage[i], VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL, true); } @@ -173,12 +174,12 @@ void VkRenderBuffers::CreateSceneColor(int width, int height, VkSampleCountFlagB .Format(VK_FORMAT_R16G16B16A16_SFLOAT) .Usage(VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT | VK_IMAGE_USAGE_SAMPLED_BIT | VK_IMAGE_USAGE_TRANSFER_SRC_BIT) .DebugName("VkRenderBuffers.SceneColor") - .Create(fb->device); + .Create(fb->device.get()); SceneColor.View = ImageViewBuilder() .Image(SceneColor.Image.get(), VK_FORMAT_R16G16B16A16_SFLOAT) .DebugName("VkRenderBuffers.SceneColorView") - .Create(fb->device); + .Create(fb->device.get()); } void VkRenderBuffers::CreateSceneDepthStencil(int width, int height, VkSampleCountFlagBits samples) @@ -188,29 +189,29 @@ void VkRenderBuffers::CreateSceneDepthStencil(int width, int height, VkSampleCou builder.Samples(samples); builder.Format(SceneDepthStencilFormat); builder.Usage(VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT | VK_IMAGE_USAGE_SAMPLED_BIT); - if (!builder.IsFormatSupported(fb->device)) + if (!builder.IsFormatSupported(fb->device.get())) { SceneDepthStencilFormat = VK_FORMAT_D32_SFLOAT_S8_UINT; builder.Format(SceneDepthStencilFormat); - if (!builder.IsFormatSupported(fb->device)) + if (!builder.IsFormatSupported(fb->device.get())) { I_FatalError("This device does not support any of the required depth stencil image formats."); } } builder.DebugName("VkRenderBuffers.SceneDepthStencil"); - SceneDepthStencil.Image = builder.Create(fb->device); + SceneDepthStencil.Image = builder.Create(fb->device.get()); SceneDepthStencil.AspectMask = VK_IMAGE_ASPECT_DEPTH_BIT | VK_IMAGE_ASPECT_STENCIL_BIT; SceneDepthStencil.View = ImageViewBuilder() .Image(SceneDepthStencil.Image.get(), SceneDepthStencilFormat, VK_IMAGE_ASPECT_DEPTH_BIT | VK_IMAGE_ASPECT_STENCIL_BIT) .DebugName("VkRenderBuffers.SceneDepthStencilView") - .Create(fb->device); + .Create(fb->device.get()); SceneDepthStencil.DepthOnlyView = ImageViewBuilder() .Image(SceneDepthStencil.Image.get(), SceneDepthStencilFormat, VK_IMAGE_ASPECT_DEPTH_BIT) .DebugName("VkRenderBuffers.SceneDepthView") - .Create(fb->device); + .Create(fb->device.get()); } void VkRenderBuffers::CreateSceneFog(int width, int height, VkSampleCountFlagBits samples) @@ -221,12 +222,12 @@ void VkRenderBuffers::CreateSceneFog(int width, int height, VkSampleCountFlagBit .Format(VK_FORMAT_R8G8B8A8_UNORM) .Usage(VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT | VK_IMAGE_USAGE_SAMPLED_BIT) .DebugName("VkRenderBuffers.SceneFog") - .Create(fb->device); + .Create(fb->device.get()); SceneFog.View = ImageViewBuilder() .Image(SceneFog.Image.get(), VK_FORMAT_R8G8B8A8_UNORM) .DebugName("VkRenderBuffers.SceneFogView") - .Create(fb->device); + .Create(fb->device.get()); } void VkRenderBuffers::CreateSceneNormal(int width, int height, VkSampleCountFlagBits samples) @@ -236,19 +237,19 @@ void VkRenderBuffers::CreateSceneNormal(int width, int height, VkSampleCountFlag builder.Samples(samples); builder.Format(SceneNormalFormat); builder.Usage(VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT | VK_IMAGE_USAGE_SAMPLED_BIT); - if (!builder.IsFormatSupported(fb->device, VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT | VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT)) + if (!builder.IsFormatSupported(fb->device.get(), VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT | VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT)) { SceneNormalFormat = VK_FORMAT_R8G8B8A8_UNORM; builder.Format(SceneNormalFormat); } builder.DebugName("VkRenderBuffers.SceneNormal"); - SceneNormal.Image = builder.Create(fb->device); + SceneNormal.Image = builder.Create(fb->device.get()); SceneNormal.View = ImageViewBuilder() .Image(SceneNormal.Image.get(), SceneNormalFormat) .DebugName("VkRenderBuffers.SceneNormalView") - .Create(fb->device); + .Create(fb->device.get()); } VulkanFramebuffer* VkRenderBuffers::GetOutput(VkPPRenderPassSetup* passSetup, const PPOutput& output, WhichDepthStencil stencilTest, int& framebufferWidth, int& framebufferHeight) @@ -277,10 +278,10 @@ VulkanFramebuffer* VkRenderBuffers::GetOutput(VkPPRenderPassSetup* passSetup, co } else { - view = fb->GetCommands()->swapChain->swapChainImageViews[fb->GetCommands()->presentImageIndex]; - framebufferptr = &fb->GetCommands()->swapChain->framebuffers[fb->GetCommands()->presentImageIndex]; - w = fb->GetCommands()->swapChain->actualExtent.width; - h = fb->GetCommands()->swapChain->actualExtent.height; + view = fb->GetFramebufferManager()->SwapChain->GetImageView(fb->GetFramebufferManager()->PresentImageIndex)->view; + framebufferptr = &fb->GetFramebufferManager()->Framebuffers[fb->GetFramebufferManager()->PresentImageIndex]; + w = fb->GetFramebufferManager()->SwapChain->Width(); + h = fb->GetFramebufferManager()->SwapChain->Height(); } auto& framebuffer = *framebufferptr; @@ -295,7 +296,7 @@ VulkanFramebuffer* VkRenderBuffers::GetOutput(VkPPRenderPassSetup* passSetup, co if (stencilTest == WhichDepthStencil::Pipeline) builder.AddAttachment(fb->GetBuffers()->PipelineDepthStencil.View.get()); builder.DebugName("PPOutputFB"); - framebuffer = builder.Create(fb->device); + framebuffer = builder.Create(fb->device.get()); } framebufferWidth = w; diff --git a/src/common/rendering/vulkan/textures/vk_renderbuffers.h b/src/common/rendering/vulkan/textures/vk_renderbuffers.h index 52d4258964..360b366abc 100644 --- a/src/common/rendering/vulkan/textures/vk_renderbuffers.h +++ b/src/common/rendering/vulkan/textures/vk_renderbuffers.h @@ -1,10 +1,10 @@ #pragma once -#include "vulkan/system/vk_objects.h" +#include "zvulkan/vulkanobjects.h" #include "vulkan/textures/vk_imagetransition.h" -class VulkanFrameBuffer; +class VulkanRenderDevice; class VkPPRenderPassSetup; class PPOutput; @@ -17,7 +17,7 @@ enum class WhichDepthStencil { class VkRenderBuffers { public: - VkRenderBuffers(VulkanFrameBuffer* fb); + VkRenderBuffers(VulkanRenderDevice* fb); ~VkRenderBuffers(); void BeginFrame(int width, int height, int sceneWidth, int sceneHeight); @@ -53,7 +53,7 @@ private: void CreateSceneNormal(int width, int height, VkSampleCountFlagBits samples); VkSampleCountFlagBits GetBestSampleCount(); - VulkanFrameBuffer* fb = nullptr; + VulkanRenderDevice* fb = nullptr; int mWidth = 0; int mHeight = 0; diff --git a/src/common/rendering/vulkan/textures/vk_samplers.cpp b/src/common/rendering/vulkan/textures/vk_samplers.cpp index d1d8a31bbf..1ce86fea02 100644 --- a/src/common/rendering/vulkan/textures/vk_samplers.cpp +++ b/src/common/rendering/vulkan/textures/vk_samplers.cpp @@ -20,13 +20,13 @@ ** */ -#include "volk/volk.h" +#include +#include +#include #include "c_cvars.h" #include "v_video.h" #include "hw_cvars.h" -#include "vulkan/system/vk_device.h" -#include "vulkan/system/vk_builders.h" -#include "vulkan/system/vk_framebuffer.h" +#include "vulkan/system/vk_renderdevice.h" #include "vulkan/system/vk_commandbuffer.h" #include "vk_samplers.h" #include "hw_material.h" @@ -66,7 +66,7 @@ static VkTexClamp TexClamp[] = { VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE, VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE }, }; -VkSamplerManager::VkSamplerManager(VulkanFrameBuffer* fb) : fb(fb) +VkSamplerManager::VkSamplerManager(VulkanRenderDevice* fb) : fb(fb) { CreateHWSamplers(); CreateShadowmapSampler(); @@ -104,7 +104,7 @@ void VkSamplerManager::CreateHWSamplers() builder.MaxLod(0.25f); } builder.DebugName("VkSamplerManager.mSamplers"); - mSamplers[i] = builder.Create(fb->device); + mSamplers[i] = builder.Create(fb->device.get()); } mSamplers[CLAMP_XY_NOMIP] = SamplerBuilder() @@ -114,7 +114,7 @@ void VkSamplerManager::CreateHWSamplers() .MipmapMode(VK_SAMPLER_MIPMAP_MODE_NEAREST) .MaxLod(0.25f) .DebugName("VkSamplerManager.mSamplers") - .Create(fb->device); + .Create(fb->device.get()); for (int i = CLAMP_NOFILTER; i <= CLAMP_NOFILTER_XY; i++) { @@ -125,7 +125,7 @@ void VkSamplerManager::CreateHWSamplers() .MipmapMode(VK_SAMPLER_MIPMAP_MODE_NEAREST) .MaxLod(0.25f) .DebugName("VkSamplerManager.mSamplers") - .Create(fb->device); + .Create(fb->device.get()); } // CAMTEX is repeating with texture filter and no mipmap @@ -136,7 +136,7 @@ void VkSamplerManager::CreateHWSamplers() .MipmapMode(VK_SAMPLER_MIPMAP_MODE_NEAREST) .MaxLod(0.25f) .DebugName("VkSamplerManager.mSamplers") - .Create(fb->device); + .Create(fb->device.get()); } void VkSamplerManager::DeleteHWSamplers() @@ -161,7 +161,7 @@ VulkanSampler* VkSamplerManager::Get(PPFilterMode filter, PPWrapMode wrap) .MagFilter(filter == PPFilterMode::Nearest ? VK_FILTER_NEAREST : VK_FILTER_LINEAR) .AddressMode(wrap == PPWrapMode::Clamp ? VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE : VK_SAMPLER_ADDRESS_MODE_REPEAT) .DebugName("VkPostprocess.mSamplers") - .Create(fb->device); + .Create(fb->device.get()); return sampler.get(); } @@ -174,7 +174,7 @@ void VkSamplerManager::CreateShadowmapSampler() .MagFilter(VK_FILTER_NEAREST) .AddressMode(VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE) .DebugName("VkRenderBuffers.ShadowmapSampler") - .Create(fb->device); + .Create(fb->device.get()); } void VkSamplerManager::CreateLightmapSampler() @@ -185,5 +185,5 @@ void VkSamplerManager::CreateLightmapSampler() .MagFilter(VK_FILTER_LINEAR) .AddressMode(VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE) .DebugName("VkRenderBuffers.LightmapSampler") - .Create(fb->device); + .Create(fb->device.get()); } diff --git a/src/common/rendering/vulkan/textures/vk_samplers.h b/src/common/rendering/vulkan/textures/vk_samplers.h index b50da70e84..a7f9ac68fa 100644 --- a/src/common/rendering/vulkan/textures/vk_samplers.h +++ b/src/common/rendering/vulkan/textures/vk_samplers.h @@ -1,17 +1,17 @@ #pragma once -#include "vulkan/system/vk_objects.h" +#include "zvulkan/vulkanobjects.h" #include -class VulkanFrameBuffer; +class VulkanRenderDevice; enum class PPFilterMode; enum class PPWrapMode; class VkSamplerManager { public: - VkSamplerManager(VulkanFrameBuffer* fb); + VkSamplerManager(VulkanRenderDevice* fb); ~VkSamplerManager(); void ResetHWSamplers(); @@ -28,7 +28,7 @@ private: void CreateShadowmapSampler(); void CreateLightmapSampler(); - VulkanFrameBuffer* fb = nullptr; + VulkanRenderDevice* fb = nullptr; std::array, NUMSAMPLERS> mSamplers; std::array, 4> mPPSamplers; }; diff --git a/src/common/rendering/vulkan/textures/vk_texture.cpp b/src/common/rendering/vulkan/textures/vk_texture.cpp index ae5ed10276..b7d88a08a7 100644 --- a/src/common/rendering/vulkan/textures/vk_texture.cpp +++ b/src/common/rendering/vulkan/textures/vk_texture.cpp @@ -27,7 +27,7 @@ #include "vulkan/renderer/vk_postprocess.h" #include "hw_cvars.h" -VkTextureManager::VkTextureManager(VulkanFrameBuffer* fb) : fb(fb) +VkTextureManager::VkTextureManager(VulkanRenderDevice* fb) : fb(fb) { CreateNullTexture(); CreateShadowmap(); @@ -148,12 +148,12 @@ void VkTextureManager::CreateNullTexture() .Size(1, 1) .Usage(VK_IMAGE_USAGE_SAMPLED_BIT) .DebugName("VkDescriptorSetManager.NullTexture") - .Create(fb->device); + .Create(fb->device.get()); NullTextureView = ImageViewBuilder() .Image(NullTexture.get(), VK_FORMAT_R8G8B8A8_UNORM) .DebugName("VkDescriptorSetManager.NullTextureView") - .Create(fb->device); + .Create(fb->device.get()); PipelineBarrier() .AddImage(NullTexture.get(), VK_IMAGE_LAYOUT_UNDEFINED, VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL, 0, VK_ACCESS_SHADER_READ_BIT, VK_IMAGE_ASPECT_COLOR_BIT) @@ -167,12 +167,12 @@ void VkTextureManager::CreateShadowmap() .Format(VK_FORMAT_R32_SFLOAT) .Usage(VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT | VK_IMAGE_USAGE_SAMPLED_BIT) .DebugName("VkRenderBuffers.Shadowmap") - .Create(fb->device); + .Create(fb->device.get()); Shadowmap.View = ImageViewBuilder() .Image(Shadowmap.Image.get(), VK_FORMAT_R32_SFLOAT) .DebugName("VkRenderBuffers.ShadowmapView") - .Create(fb->device); + .Create(fb->device.get()); VkImageTransition() .AddImage(&Shadowmap, VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL, true) @@ -203,13 +203,13 @@ void VkTextureManager::SetLightmap(int LMTextureSize, int LMTextureCount, const .Format(VK_FORMAT_R16G16B16A16_SFLOAT) .Usage(VK_IMAGE_USAGE_SAMPLED_BIT | VK_IMAGE_USAGE_TRANSFER_DST_BIT) .DebugName("VkRenderBuffers.Lightmap") - .Create(fb->device); + .Create(fb->device.get()); Lightmap.View = ImageViewBuilder() .Type(VK_IMAGE_VIEW_TYPE_2D_ARRAY) .Image(Lightmap.Image.get(), VK_FORMAT_R16G16B16A16_SFLOAT) .DebugName("VkRenderBuffers.LightmapView") - .Create(fb->device); + .Create(fb->device.get()); auto cmdbuffer = fb->GetCommands()->GetTransferCommands(); @@ -219,7 +219,7 @@ void VkTextureManager::SetLightmap(int LMTextureSize, int LMTextureCount, const .Size(totalSize) .Usage(VK_BUFFER_USAGE_TRANSFER_SRC_BIT, VMA_MEMORY_USAGE_CPU_ONLY) .DebugName("VkHardwareTexture.mStagingBuffer") - .Create(fb->device); + .Create(fb->device.get()); uint16_t one = 0x3c00; // half-float 1.0 const uint16_t* src = LMTextureData.Data(); diff --git a/src/common/rendering/vulkan/textures/vk_texture.h b/src/common/rendering/vulkan/textures/vk_texture.h index 47f698f6de..16b49001ac 100644 --- a/src/common/rendering/vulkan/textures/vk_texture.h +++ b/src/common/rendering/vulkan/textures/vk_texture.h @@ -1,11 +1,11 @@ #pragma once -#include "vulkan/system/vk_objects.h" +#include #include "vulkan/textures/vk_imagetransition.h" #include -class VulkanFrameBuffer; +class VulkanRenderDevice; class VkHardwareTexture; class VkMaterial; class VkPPTexture; @@ -16,7 +16,7 @@ class PPTexture; class VkTextureManager { public: - VkTextureManager(VulkanFrameBuffer* fb); + VkTextureManager(VulkanRenderDevice* fb); ~VkTextureManager(); void Deinit(); @@ -47,7 +47,7 @@ private: VkPPTexture* GetVkTexture(PPTexture* texture); - VulkanFrameBuffer* fb = nullptr; + VulkanRenderDevice* fb = nullptr; std::list Textures; std::list PPTextures; diff --git a/wadsrc/static/shaders/glsl/main.fp b/wadsrc/static/shaders/glsl/main.fp index 71a97e346a..61e84af28b 100644 --- a/wadsrc/static/shaders/glsl/main.fp +++ b/wadsrc/static/shaders/glsl/main.fp @@ -349,9 +349,9 @@ float R_DoomLightingEquation(float light) float shadowAttenuation(vec4 lightpos, float lightcolorA) { - vec3 origin = pixelpos.xyz; - vec3 direction = normalize(lightpos.xyz - pixelpos.xyz); - float lightDistance = distance(pixelpos.xyz, lightpos.xyz); + vec3 origin = pixelpos.xzy; + vec3 direction = normalize(lightpos.xzy - pixelpos.xzy); + float lightDistance = distance(pixelpos.xzy, lightpos.xzy); rayQueryEXT rayQuery; rayQueryInitializeEXT(rayQuery, TopLevelAS, gl_RayFlagsTerminateOnFirstHitEXT, 0xFF, origin, 0.01f, direction, lightDistance);