diff --git a/.gitignore b/.gitignore old mode 100644 new mode 100755 index 333fb762..732b3459 --- a/.gitignore +++ b/.gitignore @@ -11,6 +11,7 @@ Test/localResults/ External/googletest External/spirv-tools out/ +CMakeUserPresets.json # GN generated files .cipd/ diff --git a/Android.mk b/Android.mk index 40cddb75..dcb99584 100755 --- a/Android.mk +++ b/Android.mk @@ -1,4 +1,4 @@ -# Copyright (C) 2020 The Khronos Group Inc. +# Copyright (C) 2020-2023 The Khronos Group Inc. # # All rights reserved. # @@ -53,38 +53,17 @@ $(eval $(call gen_glslang_build_info_h)) GLSLANG_OS_FLAGS := -DGLSLANG_OSINCLUDE_UNIX # AMD and NV extensions are turned on by default in upstream Glslang. -GLSLANG_DEFINES:= -DAMD_EXTENSIONS -DNV_EXTENSIONS -DENABLE_HLSL $(GLSLANG_OS_FLAGS) +GLSLANG_DEFINES:= -DENABLE_HLSL $(GLSLANG_OS_FLAGS) include $(CLEAR_VARS) LOCAL_MODULE:=OSDependent -LOCAL_CXXFLAGS:=-std=c++11 -fno-exceptions -fno-rtti $(GLSLANG_DEFINES) +LOCAL_CXXFLAGS:=-std=c++17 -fno-exceptions -fno-rtti $(GLSLANG_DEFINES) LOCAL_EXPORT_C_INCLUDES:=$(LOCAL_PATH) LOCAL_SRC_FILES:=glslang/OSDependent/Unix/ossource.cpp LOCAL_C_INCLUDES:=$(LOCAL_PATH) $(LOCAL_PATH)/glslang/OSDependent/Unix/ LOCAL_EXPORT_C_INCLUDES:=$(LOCAL_PATH)/glslang/OSDependent/Unix/ include $(BUILD_STATIC_LIBRARY) -include $(CLEAR_VARS) -LOCAL_MODULE:=OGLCompiler -LOCAL_CXXFLAGS:=-std=c++11 -fno-exceptions -fno-rtti $(GLSLANG_DEFINES) -LOCAL_EXPORT_C_INCLUDES:=$(LOCAL_PATH) -LOCAL_SRC_FILES:=OGLCompilersDLL/InitializeDll.cpp -LOCAL_C_INCLUDES:=$(LOCAL_PATH)/OGLCompiler -LOCAL_STATIC_LIBRARIES:=OSDependent -include $(BUILD_STATIC_LIBRARY) - -# Build the stubbed HLSL library. -# The HLSL source is now directly referenced by the glslang static library -# instead. -include $(CLEAR_VARS) -LOCAL_MODULE:=HLSL -LOCAL_CXXFLAGS:=-std=c++11 -fno-exceptions -fno-rtti $(GLSLANG_DEFINES) -LOCAL_SRC_FILES:= \ - hlsl/stub.cpp -LOCAL_C_INCLUDES:=$(LOCAL_PATH) \ - $(LOCAL_PATH)/glslang/HLSL -include $(BUILD_STATIC_LIBRARY) - include $(CLEAR_VARS) GLSLANG_OUT_PATH=$(if $(call host-path-is-absolute,$(TARGET_OUT)),$(TARGET_OUT),$(abspath $(TARGET_OUT))) @@ -93,7 +72,7 @@ $(LOCAL_PATH)/glslang/MachineIndependent/ShaderLang.cpp: \ $(GLSLANG_BUILD_INFO_H) LOCAL_MODULE:=glslang -LOCAL_CXXFLAGS:=-std=c++11 -fno-exceptions -fno-rtti $(GLSLANG_DEFINES) +LOCAL_CXXFLAGS:=-std=c++17 -fno-exceptions -fno-rtti $(GLSLANG_DEFINES) LOCAL_EXPORT_C_INCLUDES:=$(LOCAL_PATH) LOCAL_SRC_FILES:= \ glslang/CInterface/glslang_c_interface.cpp \ @@ -138,7 +117,7 @@ LOCAL_C_INCLUDES:=$(LOCAL_PATH) \ $(LOCAL_PATH)/glslang/MachineIndependent \ $(GLSLANG_GENERATED_INCLUDEDIR) \ $(GLSLANG_OUT_PATH) -LOCAL_STATIC_LIBRARIES:=OSDependent OGLCompiler HLSL +LOCAL_STATIC_LIBRARIES:=OSDependent include $(BUILD_STATIC_LIBRARY) include $(CLEAR_VARS) @@ -148,7 +127,7 @@ $(LOCAL_PATH)/SPIRV/GlslangToSpv.cpp: \ $(GLSLANG_BUILD_INFO_H) LOCAL_MODULE:=SPIRV -LOCAL_CXXFLAGS:=-std=c++11 -fno-exceptions -fno-rtti -Werror $(GLSLANG_DEFINES) +LOCAL_CXXFLAGS:=-std=c++17 -fno-exceptions -fno-rtti -Werror $(GLSLANG_DEFINES) LOCAL_SRC_FILES:= \ SPIRV/CInterface/spirv_c_interface.cpp \ SPIRV/GlslangToSpv.cpp \ diff --git a/BUILD.gn b/BUILD.gn index c6ec8ae3..267d7df1 100755 --- a/BUILD.gn +++ b/BUILD.gn @@ -113,13 +113,12 @@ template("glslang_sources_common") { } sources = [ - "OGLCompilersDLL/InitializeDll.cpp", - "OGLCompilersDLL/InitializeDll.h", "SPIRV/GLSL.ext.AMD.h", - "SPIRV/GLSL.ext.ARM.h", "SPIRV/GLSL.ext.EXT.h", "SPIRV/GLSL.ext.KHR.h", "SPIRV/GLSL.ext.NV.h", + "SPIRV/GLSL.ext.ARM.h", + "SPIRV/GLSL.ext.QCOM.h", "SPIRV/GLSL.std.450.h", "SPIRV/GlslangToSpv.cpp", "SPIRV/GlslangToSpv.h", @@ -284,20 +283,20 @@ template("glslang_sources_common") { } glslang_sources_common("glslang_lib_sources") { - enable_opt = false + enable_opt = true enable_hlsl = true } glslang_sources_common("glslang_sources") { - enable_opt = false + enable_opt = true enable_hlsl = true } source_set("glslang_default_resource_limits_sources") { sources = [ - "StandAlone/ResourceLimits.cpp", - "glslang/Include/ResourceLimits.h", + "glslang/ResourceLimits/ResourceLimits.cpp", "glslang/Public/ResourceLimits.h", + "glslang/Include/ResourceLimits.h", ] public_configs = [ ":glslang_public" ] @@ -317,8 +316,8 @@ executable("glslang_validator") { deps = [ ":glslang_build_info", ":glslang_default_resource_limits_sources", - ":glslang_extension_headers", ":glslang_sources", + ":glslang_extension_headers", ] public_configs = [ ":glslang_hlsl" ] @@ -346,10 +345,8 @@ import("//build/ohos.gni") group("glslang") { deps = [ - "//third_party/glslang/OGLCompilersDLL:libdeqp_OGLCompiler", "//third_party/glslang/SPIRV:libdeqp_spirv", "//third_party/glslang/SPIRV:libdeqp_spvremapper", "//third_party/glslang/glslang:libdeqp_glslang", - "//third_party/glslang/hlsl:libdeqp_hlsl", ] } diff --git a/CHANGES.md b/CHANGES.md index aee747f5..71db4e87 100755 --- a/CHANGES.md +++ b/CHANGES.md @@ -3,6 +3,119 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](https://semver.org/). +## 14.0.0 2023-12-21 + +### Breaking changes +* The legacy libraries named HLSL and OGLCompiler have been removed. To avoid future disruptions, please use cmake's find_package mechanism rather than hardcoding library dependencies. +* Only the headers that are part of glslang's public interface are included in the install target. +* Remove OVERRIDE_MSVCCRT cmake option. + +### Other changes +* Fix spv_options initialization +* Fix line number for OpDebugFunction and OpDebugScope for function +* Fix SPV_KHR_cooperative_matrix enumerants +* Fix nullptr crash +* Fix GL_ARB_shader_storage_buffer_object version +* Fix interpolant ES error +* Generate DebugValue for constant arguments +* Overflow/underflow out-of-range floats to infinity/0.0 respectively +* Support SV_ViewID keywords for HLSL +* Implement relaxed rule for opaque struct members +* Add BUILD_WERROR cmake option +* Add GLSLANG_TESTS cmake option +* Always generate OpDebugBasicType for bool type +* Fix GLSL parsing of '#' when not preceded by space or tab +* Fix GL_ARB_bindless_texture availability +* Support GL_EXT_draw_instanced extension +* Support GL_EXT_texture_array extension +* Fix conversion of 64-bit unsigned integer constants to bool +* Output 8-bit and 16-bit capabilities when appropriate for OpSpecConstant + +## 13.1.1 2023-10-16 +* Initialize compile_only field in C interface + +## 13.1.0 2023-10-13 +* Support GL_EXT_texture_shadow_lod +* Support GL_NV_displacement_micromap +* Fix ByteAddressBuffer when used a function parameter +* Add more verbose messages if SPIRV-Tools is not found +* Fix names for explicitly sized types when emitting nonsemantic debug info +* Emit error for r-value arguments in atomic memory operations +* Add --no-link option +* Beautify preprocessor output format +* Fix race condition in glslangValidator +* Only set LocalSizeId mode when necessary +* Don't emit invalid debug info for buffer references + +## 13.0.0 2023-08-23 + +### Breaking changes +* Simplify PoolAlloc via thread_local + * Remove InitializeDLL functions + * Remove OSDependent TLS functions +* Remove GLSLANG_WEB and GLSLANG_WEB_DEVEL code paths + +### Other changes +* Raise CMAKE minimum to 3.17.2 +* Support GL_KHR_cooperative_matrix +* Support GL_QCOM_image_processing_support +* Support outputting each module to a filename with spirv-remap +* Generate an error when gl_PrimitiveShaderRateEXT is used without enabling the extension +* Improve layout checking when GL_EXT_spirv_intrinsics is enabled + +## 12.3.1 2023-07-20 + +### Other changes +* Improve backward compatibility for glslangValidator rename on Windows + +## 12.3.0 2023-07-19 + +### Other changes +* Rename glslangValidator to glslang and create glslangValidator symlink +* Support HLSL binary literals +* Add missing initialization members for web +* Improve push_constant upgrading +* Fix race condition in spirv remap +* Support pre and post HLSL qualifier validation +* Force generateDebugInfo when non-semantic debug info is enabled +* Exit with error if output file cannot be written +* Fix struct member buffer reference decorations + +## 12.2.0 2023-05-17 + +### Other changes +* Support GLSL_EXT_shader_tile_image +* Support GL_EXT_ray_tracing_position_fetch +* Support custom include callbacks via the C API +* Add preamble-text command-line option +* Accept variables as parameters of spirv_decorate_id +* Fix generation of conditionals with a struct result +* Fix double expansion of macros +* Fix DebugCompilationUnit scope +* Improve line information + +## 12.1.0 2023-03-21 + +### Other changes +* Reject non-float inputs/outputs for version less than 120 +* Fix invalid BufferBlock decoration for SPIR-V 1.3 and above +* Add HLSL relaxed-precision float/int matrix expansions +* Block decorate Vulkan structs with RuntimeArrays +* Support InterlockedAdd on float types + +## 12.0.0 2023-01-18 + +### Breaking changes +* An ABI was accidentally broken in #3014. Consequently, we have incremented the major revision number. + +### Other changes +* Add support for ARB_bindless_texture. +* Add support for GL_NV_shader_invocation_reorder. +* Fix const parameter debug types when using NonSemantic.Shader.DebugInfo.100. +* Fix NonSemantic.Shader.DebugInfo.100 disassembly. +* Fix MaxDualSourceDrawBuffersEXT usage. +* Fix structure member reference crash. + ## 11.13.0 2022-12-06 ### Other changes diff --git a/CMakeLists.txt b/CMakeLists.txt index b581c842..5cdd3e31 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2020 The Khronos Group Inc. +# Copyright (C) 2020-2023 The Khronos Group Inc. # # All rights reserved. # @@ -30,24 +30,16 @@ # 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. +cmake_minimum_required(VERSION 3.17.2) +project(glslang) -# increase to 3.1 once all major distributions -# include a version of CMake >= 3.1 -cmake_minimum_required(VERSION 3.14.0) -if (POLICY CMP0048) - cmake_policy(SET CMP0048 NEW) +if (CMAKE_VERSION VERSION_LESS "3.21") + # https://cmake.org/cmake/help/latest/variable/PROJECT_IS_TOP_LEVEL.html + string(COMPARE EQUAL ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_SOURCE_DIR} PROJECT_IS_TOP_LEVEL) endif() -if(POLICY CMP0054) - cmake_policy(SET CMP0054 NEW) -endif() - -project(glslang LANGUAGES CXX) set_property(GLOBAL PROPERTY USE_FOLDERS ON) -# Enable compile commands database -set(CMAKE_EXPORT_COMPILE_COMMANDS ON) - # Adhere to GNU filesystem layout conventions include(GNUInstallDirs) include(CMakePackageConfigHelpers) @@ -55,8 +47,9 @@ include(CMakePackageConfigHelpers) # Needed for CMAKE_DEPENDENT_OPTION macro include(CMakeDependentOption) -option(BUILD_SHARED_LIBS "Build Shared Libraries" OFF) +option(BUILD_SHARED_LIBS "Build Shared Libraries") option(BUILD_EXTERNAL "Build external dependencies in /External" ON) +option(BUILD_WERROR "Enable warnings as errors (default is OFF)" OFF) set(LIB_TYPE STATIC) @@ -72,24 +65,24 @@ if ("${CMAKE_BUILD_TYPE}" STREQUAL "") set(CMAKE_BUILD_TYPE "Debug") endif() -option(SKIP_GLSLANG_INSTALL "Skip installation" ${SKIP_GLSLANG_INSTALL}) -if(NOT ${SKIP_GLSLANG_INSTALL}) - set(ENABLE_GLSLANG_INSTALL ON) +# Currently iOS and Android are very similar. +# They both have their own packaging (APP/APK). +# Which makes regular executables/testing problematic. +# +# Currently the only deliverables for these platforms are +# libraries (either STATIC or SHARED). +# +# Furthermore testing is equally problematic. +if (IOS OR ANDROID) + set(ENABLE_GLSLANG_BINARIES OFF) + set(GLSLANG_TESTS OFF) endif() + option(ENABLE_SPVREMAPPER "Enables building of SPVRemapper" ON) -option(ENABLE_GLSLANG_BINARIES "Builds glslangValidator and spirv-remap" ON) +option(ENABLE_GLSLANG_BINARIES "Builds glslang and spirv-remap" ON) -option(ENABLE_GLSLANG_JS - "If using Emscripten, build glslang.js. Otherwise, builds a sample executable for binary-size testing." OFF) -CMAKE_DEPENDENT_OPTION(ENABLE_GLSLANG_WEBMIN - "Reduces glslang to minimum needed for web use" - OFF "ENABLE_GLSLANG_JS" - OFF) -CMAKE_DEPENDENT_OPTION(ENABLE_GLSLANG_WEBMIN_DEVEL - "For ENABLE_GLSLANG_WEBMIN builds, enables compilation error messages" - OFF "ENABLE_GLSLANG_WEBMIN" - OFF) +option(ENABLE_GLSLANG_JS "If using Emscripten, build glslang.js. Otherwise, builds a sample executable for binary-size testing.") CMAKE_DEPENDENT_OPTION(ENABLE_EMSCRIPTEN_SINGLE_FILE "If using Emscripten, enables SINGLE_FILE build" OFF "ENABLE_GLSLANG_JS AND EMSCRIPTEN" @@ -99,59 +92,28 @@ CMAKE_DEPENDENT_OPTION(ENABLE_EMSCRIPTEN_ENVIRONMENT_NODE OFF "ENABLE_GLSLANG_JS AND EMSCRIPTEN" OFF) -CMAKE_DEPENDENT_OPTION(ENABLE_HLSL - "Enables HLSL input support" - ON "NOT ENABLE_GLSLANG_WEBMIN" - OFF) - -option(ENABLE_RTTI "Enables RTTI" OFF) -option(ENABLE_EXCEPTIONS "Enables Exceptions" OFF) +option(ENABLE_HLSL "Enables HLSL input support" ON) +option(ENABLE_RTTI "Enables RTTI") +option(ENABLE_EXCEPTIONS "Enables Exceptions") option(ENABLE_OPT "Enables spirv-opt capability if present" ON) -if(MINGW OR (CMAKE_SYSTEM_NAME STREQUAL "Darwin" AND ${CMAKE_CXX_COMPILER_ID} MATCHES "GNU")) +if(MINGW OR (APPLE AND ${CMAKE_CXX_COMPILER_ID} MATCHES "GNU")) # Workaround for CMake behavior on Mac OS with gcc, cmake generates -Xarch_* arguments # which gcc rejects - option(ENABLE_PCH "Enables Precompiled header" OFF) -else() - option(ENABLE_PCH "Enables Precompiled header" ON) -endif() -option(ENABLE_CTEST "Enables testing" ON) - -if(ENABLE_GLSLANG_INSTALL AND CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT AND WIN32) - set(CMAKE_INSTALL_PREFIX "install" CACHE STRING "..." FORCE) + set(ENABLE_PCH OFF) + message(NOTICE "Disabling PCH") endif() -option(USE_CCACHE "Use ccache" OFF) -if(USE_CCACHE) - find_program(CCACHE_FOUND ccache) - if(CCACHE_FOUND) - set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache) - endif() -endif() - -if(ENABLE_CTEST) - include(CTest) -endif() +option(ENABLE_PCH "Enables Precompiled header" ON) if(ENABLE_HLSL) - add_definitions(-DENABLE_HLSL) -endif() - -if(ENABLE_GLSLANG_WEBMIN) - add_definitions(-DGLSLANG_WEB) - if(ENABLE_GLSLANG_WEBMIN_DEVEL) - add_definitions(-DGLSLANG_WEB_DEVEL) - endif() + add_compile_definitions(ENABLE_HLSL) endif() if(WIN32) set(CMAKE_DEBUG_POSTFIX "d") - option(OVERRIDE_MSVCCRT "Overrides runtime of MSVC " ON) - if(MSVC AND OVERRIDE_MSVCCRT) - include(ChooseMSVCCRT.cmake) - endif() add_definitions(-DGLSLANG_OSINCLUDE_WIN32) -elseif(UNIX) +elseif(UNIX OR ANDROID) add_definitions(-DGLSLANG_OSINCLUDE_UNIX) else() message("unknown platform") @@ -160,7 +122,6 @@ endif() 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. if(NOT ENABLE_RTTI) add_compile_options(-fno-rtti) endif() @@ -171,16 +132,15 @@ if(${CMAKE_CXX_COMPILER_ID} MATCHES "GNU") add_compile_options(-Werror=deprecated-copy) endif() - if(NOT CMAKE_VERSION VERSION_LESS "3.13" AND NOT CMAKE_SYSTEM_NAME STREQUAL "Darwin") - # Error if there's symbols that are not found at link time. - # add_link_options() was added in CMake 3.13 - if using an earlier - # version don't set this - it should be caught by presubmits anyway. - add_link_options("-Wl,--no-undefined") + if(NOT (CMAKE_SYSTEM_NAME STREQUAL "OpenBSD")) + if (NOT APPLE) + # Error if there's symbols that are not found at link time. + add_link_options("-Wl,--no-undefined") + endif() endif() elseif(${CMAKE_CXX_COMPILER_ID} MATCHES "Clang" AND NOT MSVC) 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. if(NOT ENABLE_RTTI) add_compile_options(-fno-rtti) endif() @@ -188,14 +148,10 @@ elseif(${CMAKE_CXX_COMPILER_ID} MATCHES "Clang" AND NOT MSVC) add_compile_options(-fno-exceptions) endif() - if(NOT CMAKE_VERSION VERSION_LESS "3.13") - # Error if there's symbols that are not found at link time. - # add_link_options() was added in CMake 3.13 - if using an earlier - # version don't set this - it should be caught by presubmits anyway. - if (WIN32) + if(NOT (CMAKE_SYSTEM_NAME MATCHES "OpenBSD|Emscripten")) + # Error if there's symbols that are not found at link time. Some linkers do not support this flag. + if(NOT APPLE) add_link_options("-Wl,--no-undefined") - else() - add_link_options("-Wl,-undefined,error") endif() endif() elseif(MSVC) @@ -215,6 +171,15 @@ elseif(MSVC) endif() endif() +# NOTE we could potentially replace this logic with COMPILE_WARNING_AS_ERROR if cmake minimum is bumped to >= 3.24 +if (BUILD_WERROR) + if (NOT MSVC) + add_compile_options(-Werror) + else() + add_compile_options(/WX) + endif() +endif() + if(ENABLE_GLSLANG_JS) if(MSVC) add_compile_options(/Os /GR-) @@ -227,32 +192,21 @@ if(ENABLE_GLSLANG_JS) endif() 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 - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") -else() - set(CMAKE_CXX_STANDARD 11) - set(CMAKE_CXX_STANDARD_REQUIRED ON) - set(CMAKE_CXX_EXTENSIONS OFF) -endif() +# Request C++17 +set(CMAKE_CXX_STANDARD 17) +set(CMAKE_CXX_STANDARD_REQUIRED ON) +set(CMAKE_CXX_EXTENSIONS OFF) function(glslang_set_link_args TARGET) # For MinGW compiles, statically link against the GCC and C++ runtimes. # This avoids the need to ship those runtimes as DLLs. - if(WIN32 AND ${CMAKE_CXX_COMPILER_ID} MATCHES "GNU") + # This is supported by GCC and Clang. + if(WIN32 AND NOT MSVC) set_target_properties(${TARGET} PROPERTIES LINK_FLAGS "-static -static-libgcc -static-libstdc++") endif() endfunction(glslang_set_link_args) -if(NOT COMMAND find_host_package) - macro(find_host_package) - find_package(${ARGN}) - endmacro() -endif() - # Root directory for build-time generated include files set(GLSLANG_GENERATED_INCLUDEDIR "${CMAKE_BINARY_DIR}/include") @@ -289,10 +243,9 @@ endfunction() function(glslang_only_export_explicit_symbols target) if(BUILD_SHARED_LIBS) target_compile_definitions(${target} PUBLIC "GLSLANG_IS_SHARED_LIBRARY=1") + set_target_properties(${target} PROPERTIES CMAKE_CXX_VISIBILITY_PRESET hidden) if(WIN32) target_compile_definitions(${target} PRIVATE "GLSLANG_EXPORTING=1") - else() - target_compile_options(${target} PRIVATE "-fvisibility=hidden") endif() endif() endfunction() @@ -300,27 +253,35 @@ endfunction() # glslang_pch() adds precompiled header rules to for the pre-compiled # header file . As target_precompile_headers() was added in CMake 3.16, # this is a no-op if called on earlier versions of CMake. -if(NOT CMAKE_VERSION VERSION_LESS "3.16" AND ENABLE_PCH) - function(glslang_pch target pch) - target_precompile_headers(${target} PRIVATE ${pch}) - endfunction() -else() - function(glslang_pch target pch) - endfunction() +function(glslang_pch target pch) if(ENABLE_PCH) - message("Your CMake version is ${CMAKE_VERSION}. Update to at least 3.16 to enable precompiled headers to speed up incremental builds") + target_precompile_headers(${target} PRIVATE ${pch}) endif() -endif() +endfunction() if(BUILD_EXTERNAL AND IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/External) - find_host_package(PythonInterp 3 REQUIRED) - # We depend on these for later projects, so they should come first. add_subdirectory(External) endif() +option(ALLOW_EXTERNAL_SPIRV_TOOLS "Allows to build against installed SPIRV-Tools-opt") if(NOT TARGET SPIRV-Tools-opt) - set(ENABLE_OPT OFF) + if(ALLOW_EXTERNAL_SPIRV_TOOLS) + # Look for external SPIR-V Tools build, if not building in-tree + message(STATUS "Trying to find local SPIR-V tools") + find_package(SPIRV-Tools-opt) + if(NOT TARGET SPIRV-Tools-opt) + if(ENABLE_OPT) + message(WARNING "ENABLE_OPT set but SPIR-V tools not found! Disabling SPIR-V optimization.") + endif() + set(ENABLE_OPT OFF) + endif() + else() + if(ENABLE_OPT) + message(SEND_ERROR "ENABLE_OPT set but SPIR-V tools not found. Please run update_glslang_sources.py, " + "set the ALLOW_EXTERNAL_SPIRV_TOOLS option to use a local install of SPIRV-Tools, or set ENABLE_OPT=0.") + endif() + endif() endif() if(ENABLE_OPT) @@ -334,48 +295,57 @@ else() endif() add_subdirectory(glslang) -add_subdirectory(OGLCompilersDLL) if(ENABLE_GLSLANG_BINARIES) add_subdirectory(StandAlone) endif() add_subdirectory(SPIRV) -if(ENABLE_HLSL) - add_subdirectory(hlsl) -endif() -if(ENABLE_CTEST) - add_subdirectory(gtests) -endif() -if(ENABLE_CTEST AND BUILD_TESTING) - # glslang-testsuite runs a bash script on Windows. - # Make sure to use '-o igncr' flag to ignore carriage returns (\r). - set(IGNORE_CR_FLAG "") - if(WIN32) - set(IGNORE_CR_FLAG -o igncr) +# Testing / installation only makes sense when the project is top level. +# +# Otherwise add_subdirectory users have a harder time consuming the library. +# Since glslang will pollute the installation and add undesirable testing. +if(PROJECT_IS_TOP_LEVEL) + option(GLSLANG_TESTS "Enable glslang testing") + if(GLSLANG_TESTS) + enable_testing() + add_subdirectory(gtests) + + # glslang-testsuite runs a bash script on Windows. + # Make sure to use '-o igncr' flag to ignore carriage returns (\r). + set(IGNORE_CR_FLAG "") + if(WIN32) + set(IGNORE_CR_FLAG -o igncr) + endif() + + if (CMAKE_CONFIGURATION_TYPES) + set(RESULTS_PATH ${CMAKE_CURRENT_BINARY_DIR}/$/localResults) + set(VALIDATOR_PATH ${CMAKE_CURRENT_BINARY_DIR}/StandAlone/$/glslang) + set(REMAP_PATH ${CMAKE_CURRENT_BINARY_DIR}/StandAlone/$/spirv-remap) + else() + set(RESULTS_PATH ${CMAKE_CURRENT_BINARY_DIR}/localResults) + set(VALIDATOR_PATH ${CMAKE_CURRENT_BINARY_DIR}/StandAlone/glslang) + set(REMAP_PATH ${CMAKE_CURRENT_BINARY_DIR}/StandAlone/spirv-remap) + endif() + + add_test(NAME glslang-testsuite + COMMAND bash ${IGNORE_CR_FLAG} runtests ${RESULTS_PATH} ${VALIDATOR_PATH} ${REMAP_PATH} + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/Test/) endif() - if (CMAKE_CONFIGURATION_TYPES) - set(RESULTS_PATH ${CMAKE_CURRENT_BINARY_DIR}/$/localResults) - set(VALIDATOR_PATH ${CMAKE_CURRENT_BINARY_DIR}/StandAlone/$/glslangValidator) - set(REMAP_PATH ${CMAKE_CURRENT_BINARY_DIR}/StandAlone/$/spirv-remap) - else() - set(RESULTS_PATH ${CMAKE_CURRENT_BINARY_DIR}/localResults) - set(VALIDATOR_PATH ${CMAKE_CURRENT_BINARY_DIR}/StandAlone/glslangValidator) - set(REMAP_PATH ${CMAKE_CURRENT_BINARY_DIR}/StandAlone/spirv-remap) - endif() - - add_test(NAME glslang-testsuite - COMMAND bash ${IGNORE_CR_FLAG} runtests ${RESULTS_PATH} ${VALIDATOR_PATH} ${REMAP_PATH} - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/Test/) -endif() - -if(ENABLE_GLSLANG_INSTALL) file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/glslang-config.cmake.in" [=[ @PACKAGE_INIT@ + @INSTALL_CONFIG_UNIX@ include("@PACKAGE_PATH_EXPORT_TARGETS@") ]=]) - + set(PATH_EXPORT_TARGETS "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}/glslang-targets.cmake") + if(UNIX OR "${CMAKE_SYSTEM_NAME}" STREQUAL "Fuchsia") + set(INSTALL_CONFIG_UNIX [=[ + include(CMakeFindDependencyMacro) + set(THREADS_PREFER_PTHREAD_FLAG ON) + find_dependency(Threads REQUIRED) + ]=]) + endif() configure_package_config_file( "${CMAKE_CURRENT_BINARY_DIR}/glslang-config.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/glslang-config.cmake" @@ -383,18 +353,18 @@ if(ENABLE_GLSLANG_INSTALL) PATH_EXPORT_TARGETS INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME} ) - + write_basic_package_version_file("${CMAKE_CURRENT_BINARY_DIR}/glslang-config-version.cmake" VERSION ${GLSLANG_VERSION} COMPATIBILITY SameMajorVersion ) - + install( EXPORT glslang-targets NAMESPACE "glslang::" DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}" ) - + install( FILES "${CMAKE_CURRENT_BINARY_DIR}/glslang-config.cmake" @@ -402,4 +372,4 @@ if(ENABLE_GLSLANG_INSTALL) DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}" ) -endif() \ No newline at end of file +endif() diff --git a/External/CMakeLists.txt b/External/CMakeLists.txt index cbabd2e3..46284fd5 100755 --- a/External/CMakeLists.txt +++ b/External/CMakeLists.txt @@ -34,7 +34,7 @@ # Suppress all warnings from external projects. set_property(DIRECTORY APPEND PROPERTY COMPILE_OPTIONS -w) -if(BUILD_TESTING) +if(GLSLANG_TESTS) if(TARGET gmock) message(STATUS "Google Mock already configured - use it") elseif(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/googletest) @@ -71,7 +71,7 @@ endif() if(ENABLE_OPT AND NOT TARGET SPIRV-Tools-opt) if(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/spirv-tools) set(SPIRV_SKIP_TESTS ON CACHE BOOL "Skip building SPIRV-Tools tests") - add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/spirv-tools spirv-tools) + add_subdirectory(spirv-tools) endif() endif() diff --git a/OGLCompilersDLL/BUILD.gn b/OGLCompilersDLL/BUILD.gn deleted file mode 100755 index 077b4ade..00000000 --- a/OGLCompilersDLL/BUILD.gn +++ /dev/null @@ -1,63 +0,0 @@ -# Copyright (c) 2022 Shenzhen Kaihong Digital Industry Development Co., Ltd. -# 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. - -# external glslang OGLCompiler build - -import("//build/ohos.gni") -import("//third_party/vk-gl-cts/vk_gl_cts.gni") - -config("OGLCompiler_config") { - cflags_cc = deqp_common_cflags_cc - - cflags_cc -= [ - "-frtti", - "-fexceptions", - ] - - cflags_cc += [ - "-fPIC", - "-Wno-reorder", - "-fno-rtti", - "-fno-exceptions", - ] - - defines = deqp_common_defines - defines -= [ - "DEQP_SUPPORT_DRM=0", - "DEQP_TARGET_NAME=\"Default\"", - ] - - defines += [ - "ENABLE_HLSL", - "ENABLE_OPT=0", - "GLSLANG_OSINCLUDE_UNIX", - ] -} - -ohos_source_set("OGLCompiler_source") { - sources = [ "//third_party/glslang/OGLCompilersDLL/InitializeDll.cpp" ] - include_dirs = [ "//third_party/zlib/src" ] - include_dirs += deqp_common_include_dirs - - deps = [ - #"//third_party/glslang/glslang:libdeqp_glslang", - ] - - configs = [ ":OGLCompiler_config" ] -} - -ohos_static_library("libdeqp_OGLCompiler") { - deps = [ ":OGLCompiler_source" ] - part_name = "graphic_2d" - subsystem_name = "graphic" -} diff --git a/OGLCompilersDLL/CMakeLists.txt b/OGLCompilersDLL/CMakeLists.txt deleted file mode 100755 index 33f16b0d..00000000 --- a/OGLCompilersDLL/CMakeLists.txt +++ /dev/null @@ -1,59 +0,0 @@ -# Copyright (C) 2020 The Khronos Group Inc. -# -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following -# disclaimer in the documentation and/or other materials provided -# with the distribution. -# -# Neither the name of The Khronos Group Inc. nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. - -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 AND NOT BUILD_SHARED_LIBS) - install(TARGETS OGLCompiler EXPORT glslang-targets) - - # Backward compatibility - file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/OGLCompilerTargets.cmake" " - message(WARNING \"Using `OGLCompilerTargets.cmake` is deprecated: use `find_package(glslang)` to find glslang CMake targets.\") - - if (NOT TARGET glslang::OGLCompiler) - include(\"\${CMAKE_CURRENT_LIST_DIR}/../../${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}/glslang-targets.cmake\") - endif() - - add_library(OGLCompiler ALIAS glslang::OGLCompiler) - ") - install(FILES "${CMAKE_CURRENT_BINARY_DIR}/OGLCompilerTargets.cmake" DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake) - -endif() diff --git a/OGLCompilersDLL/InitializeDll.cpp b/OGLCompilersDLL/InitializeDll.cpp deleted file mode 100755 index 9d81f578..00000000 --- a/OGLCompilersDLL/InitializeDll.cpp +++ /dev/null @@ -1,165 +0,0 @@ -// -// Copyright (C) 2002-2005 3Dlabs Inc. Ltd. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions -// are met: -// -// Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// -// Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following -// disclaimer in the documentation and/or other materials provided -// with the distribution. -// -// Neither the name of 3Dlabs Inc. Ltd. nor the names of its -// contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -// COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. -// - -#define SH_EXPORTING - -#include - -#include "InitializeDll.h" -#include "../glslang/Include/InitializeGlobals.h" -#include "../glslang/Public/ShaderLang.h" -#include "../glslang/Include/PoolAlloc.h" - -namespace glslang { - -OS_TLSIndex ThreadInitializeIndex = OS_INVALID_TLS_INDEX; - -// Per-process initialization. -// Needs to be called at least once before parsing, etc. is done. -// Will also do thread initialization for the calling thread; other -// threads will need to do that explicitly. -bool InitProcess() -{ - glslang::GetGlobalLock(); - - if (ThreadInitializeIndex != OS_INVALID_TLS_INDEX) { - // - // Function is re-entrant. - // - - glslang::ReleaseGlobalLock(); - return true; - } - - ThreadInitializeIndex = OS_AllocTLSIndex(); - - if (ThreadInitializeIndex == OS_INVALID_TLS_INDEX) { - assert(0 && "InitProcess(): Failed to allocate TLS area for init flag"); - - glslang::ReleaseGlobalLock(); - return false; - } - - if (! InitializePoolIndex()) { - assert(0 && "InitProcess(): Failed to initialize global pool"); - - glslang::ReleaseGlobalLock(); - return false; - } - - if (! InitThread()) { - assert(0 && "InitProcess(): Failed to initialize thread"); - - glslang::ReleaseGlobalLock(); - return false; - } - - glslang::ReleaseGlobalLock(); - return true; -} - -// Per-thread scoped initialization. -// Must be called at least once by each new thread sharing the -// symbol tables, etc., needed to parse. -bool InitThread() -{ - // - // This function is re-entrant - // - if (ThreadInitializeIndex == OS_INVALID_TLS_INDEX) { - assert(0 && "InitThread(): Process hasn't been initalised."); - return false; - } - - if (OS_GetTLSValue(ThreadInitializeIndex) != nullptr) - return true; - - if (! OS_SetTLSValue(ThreadInitializeIndex, (void *)1)) { - assert(0 && "InitThread(): Unable to set init flag."); - return false; - } - - glslang::SetThreadPoolAllocator(nullptr); - - return true; -} - -// Not necessary to call this: InitThread() is reentrant, and the need -// to do per thread tear down has been removed. -// -// This is kept, with memory management removed, to satisfy any exiting -// calls to it that rely on it. -bool DetachThread() -{ - bool success = true; - - if (ThreadInitializeIndex == OS_INVALID_TLS_INDEX) - return true; - - // - // Function is re-entrant and this thread may not have been initialized. - // - if (OS_GetTLSValue(ThreadInitializeIndex) != nullptr) { - if (!OS_SetTLSValue(ThreadInitializeIndex, nullptr)) { - assert(0 && "DetachThread(): Unable to clear init flag."); - success = false; - } - } - - return success; -} - -// Not necessary to call this: InitProcess() is reentrant. -// -// This is kept, with memory management removed, to satisfy any exiting -// calls to it that rely on it. -// -// Users of glslang should call shFinalize() or glslang::FinalizeProcess() for -// process-scoped memory tear down. -bool DetachProcess() -{ - bool success = true; - - if (ThreadInitializeIndex == OS_INVALID_TLS_INDEX) - return true; - - success = DetachThread(); - - OS_FreeTLSIndex(ThreadInitializeIndex); - ThreadInitializeIndex = OS_INVALID_TLS_INDEX; - - return success; -} - -} // end namespace glslang diff --git a/OGLCompilersDLL/InitializeDll.h b/OGLCompilersDLL/InitializeDll.h deleted file mode 100755 index 661cee4d..00000000 --- a/OGLCompilersDLL/InitializeDll.h +++ /dev/null @@ -1,49 +0,0 @@ -// -// Copyright (C) 2002-2005 3Dlabs Inc. Ltd. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions -// are met: -// -// Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// -// Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following -// disclaimer in the documentation and/or other materials provided -// with the distribution. -// -// Neither the name of 3Dlabs Inc. Ltd. nor the names of its -// contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -// COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. -// -#ifndef __INITIALIZEDLL_H -#define __INITIALIZEDLL_H - -#include "../glslang/OSDependent/osinclude.h" - -namespace glslang { - -bool InitProcess(); -bool InitThread(); -bool DetachThread(); // not called from standalone, perhaps other tools rely on parts of it -bool DetachProcess(); // not called from standalone, perhaps other tools rely on parts of it - -} // end namespace glslang - -#endif // __INITIALIZEDLL_H - diff --git a/README-spirv-remap.txt b/README-spirv-remap.txt index 3e5288aa..f3efee83 100755 --- a/README-spirv-remap.txt +++ b/README-spirv-remap.txt @@ -112,7 +112,7 @@ BUILD DEPENDENCIES: BUILDING -------------------------------------------------------------------------------- -The standalone remapper is built along side glslangValidator through its +The standalone remapper is built along side glslang through its normal build process. diff --git a/README.md b/README.md index 5e642e69..44388108 100755 --- a/README.md +++ b/README.md @@ -1,26 +1,14 @@ +![Continuous Integration](https://github.com/KhronosGroup/glslang/actions/workflows/continuous_integration.yml/badge.svg) +![Continuous Deployment](https://github.com/KhronosGroup/glslang/actions/workflows/continuous_deployment.yml/badge.svg) +[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/KhronosGroup/glslang/badge)](https://securityscorecards.dev/viewer/?uri=github.com/KhronosGroup/glslang) + # News -1. Visual Studio 2013 is no longer supported +1. `OGLCompiler` and `HLSL` stub libraries have been fully removed from the build. - [As scheduled](https://github.com/KhronosGroup/glslang/blob/9eef54b2513ca6b40b47b07d24f453848b65c0df/README.md#planned-deprecationsremovals), -Microsoft Visual Studio 2013 is no longer officially supported. \ - Please upgrade to at least Visual Studio 2015. +2. `OVERRIDE_MSVCCRT` has been removed in favor of `CMAKE_MSVC_RUNTIME_LIBRARY` -2. The versioning scheme is being improved, and you might notice some differences. This is currently WIP, but will be coming soon. See, for example, PR #2277. - -3. If you get a new **compilation error due to a missing header**, it might be caused by this planned removal: - -**SPIRV Folder, 1-May, 2020.** Glslang, when installed through CMake, -will install a `SPIRV` folder into `${CMAKE_INSTALL_INCLUDEDIR}`. -This `SPIRV` folder is being moved to `glslang/SPIRV`. -During the transition the `SPIRV` folder will be installed into both locations. -The old install of `SPIRV/` will be removed as a CMake install target no sooner than May 1, 2020. -See issue #1964. - -If people are only using this location to get spirv.hpp, I recommend they get that from [SPIRV-Headers](https://github.com/KhronosGroup/SPIRV-Headers) instead. - -[![appveyor status](https://ci.appveyor.com/api/projects/status/q6fi9cb0qnhkla68/branch/master?svg=true)](https://ci.appveyor.com/project/Khronoswebmaster/glslang/branch/master) -![Continuous Deployment](https://github.com/KhronosGroup/glslang/actions/workflows/continuous_deployment.yml/badge.svg) +Users are encouraged to utilize the standard approach via [CMAKE_MSVC_RUNTIME_LIBRARY](https://cmake.org/cmake/help/latest/variable/CMAKE_MSVC_RUNTIME_LIBRARY.html). # Glslang Components and Status @@ -55,7 +43,7 @@ An API for getting reflection information from the AST, reflection types/variabl ### Standalone Wrapper -`glslangValidator` is command-line tool for accessing the functionality above. +`glslang` is command-line tool for accessing the functionality above. Status: Complete. @@ -73,7 +61,7 @@ The above page, while not kept up to date, includes additional information regar ## Execution of Standalone Wrapper -To use the standalone binary form, execute `glslangValidator`, and it will print +To use the standalone binary form, execute `glslang`, and it will print a usage statement. Basic operation is to give it a file containing a shader, and it will print out warnings/errors and optionally an AST. @@ -99,15 +87,15 @@ There is also a non-shader extension: ## Building (CMake) Instead of building manually, you can also download the binaries for your -platform directly from the [master-tot release][master-tot-release] on GitHub. +platform directly from the [main-tot release][main-tot-release] on GitHub. Those binaries are automatically uploaded by the buildbots after successful -testing and they always reflect the current top of the tree of the master +testing and they always reflect the current top of the tree of the main branch. ### Dependencies -* A C++11 compiler. - (For MSVS: use 2015 or later.) +* A C++17 compiler. + (For MSVS: use 2019 or later.) * [CMake][cmake]: for generating compilation targets. * make: _Linux_, ninja is an alternative, if configured. * [Python 3.x][python]: for executing SPIRV-Tools scripts. (Optional if not using SPIRV-Tools and the 'External' subdirectory does not exist.) @@ -128,24 +116,6 @@ git clone https://github.com/KhronosGroup/glslang.git #### 2) Check-Out External Projects -```bash -cd -git clone https://github.com/google/googletest.git External/googletest -``` - -TEMPORARY NOTICE: additionally perform the following to avoid a current -breakage in googletest: - -```bash -cd External/googletest -git checkout 0c400f67fcf305869c5fb113dd296eca266c9725 -cd ../.. -``` - -If you wish to assure that SPIR-V generated from HLSL is legal for Vulkan, -wish to invoke -Os to reduce SPIR-V size from HLSL or GLSL, or wish to run the -integrated test suite, install spirv-tools with this: - ```bash ./update_glslang_sources.py ``` @@ -201,6 +171,10 @@ cmake --build . --config Release --target install If using MSVC, after running CMake to configure, use the Configuration Manager to check the `INSTALL` project. +If you want to enable testing via CMake set `GLSLANG_TESTS=ON` when configuring the build. + +`GLSLANG_TESTS` is off by default to streamline the packaging / Vulkan SDK process. + ### Building (GN) glslang can also be built with the [GN build system](https://gn.googlesource.com/gn/). @@ -242,16 +216,13 @@ changes are quite infrequent. For windows you can get binaries from The command to rebuild is: ```bash -m4 -P MachineIndependent/glslang.m4 > MachineIndependent/glslang.y bison --defines=MachineIndependent/glslang_tab.cpp.h -t MachineIndependent/glslang.y -o MachineIndependent/glslang_tab.cpp ``` -The above commands are also available in the bash script in `updateGrammar`, +The above command is also available in the bash script in `updateGrammar`, when executed from the glslang subdirectory of the glslang repository. -With no arguments it builds the full grammar, and with a "web" argument, -the web grammar subset (see more about the web subset in the next section). ### Building to WASM for the Web and Node ### Building a standalone JS/WASM library for the Web and Node @@ -261,15 +232,9 @@ Use the steps in [Build Steps](#build-steps), with the following notes/exception Bash-like environments: + [Instructions located here](https://emscripten.org/docs/getting_started/downloads.html#sdk-download-and-install) * Wrap cmake call: `emcmake cmake` -* Set `-DBUILD_TESTING=OFF -DENABLE_OPT=OFF -DINSTALL_GTEST=OFF`. +* Set `-DENABLE_OPT=OFF`. * Set `-DENABLE_HLSL=OFF` if HLSL is not needed. * For a standalone JS/WASM library, turn on `-DENABLE_GLSLANG_JS=ON`. -* For building a minimum-size web subset of core glslang: - + turn on `-DENABLE_GLSLANG_WEBMIN=ON` (disables HLSL) - + execute `updateGrammar web` from the glslang subdirectory - (or if using your own scripts, `m4` needs a `-DGLSLANG_WEB` argument) - + optionally, for GLSL compilation error messages, turn on - `-DENABLE_GLSLANG_WEBMIN_DEVEL=ON` * To get a fully minimized build, make sure to use `brotli` to compress the .js and .wasm files @@ -277,7 +242,7 @@ Example: ```sh emcmake cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_GLSLANG_JS=ON \ - -DENABLE_HLSL=OFF -DBUILD_TESTING=OFF -DENABLE_OPT=OFF -DINSTALL_GTEST=OFF .. + -DENABLE_HLSL=OFF -DENABLE_OPT=OFF .. ``` ## Building glslang - Using vcpkg @@ -433,9 +398,18 @@ warning/error and other options for controlling compilation. This interface is located `glslang_c_interface.h` and exposes functionality similar to the C++ interface. The following snippet is a complete example showing how to compile GLSL into SPIR-V 1.5 for Vulkan 1.2. -```cxx -std::vector compileShaderToSPIRV_Vulkan(glslang_stage_t stage, const char* shaderSource, const char* fileName) -{ +```c +#include + +// Required for use of glslang_default_resource +#include + +typedef struct SpirVBinary { + uint32_t *words; // SPIR-V words + int size; // number of words in SPIR-V binary +} SpirVBinary; + +SpirVBinary compileShaderToSPIRV_Vulkan(glslang_stage_t stage, const char* shaderSource, const char* fileName) { const glslang_input_t input = { .language = GLSLANG_SOURCE_GLSL, .stage = stage, @@ -449,18 +423,22 @@ std::vector compileShaderToSPIRV_Vulkan(glslang_stage_t stage, const c .force_default_version_and_profile = false, .forward_compatible = false, .messages = GLSLANG_MSG_DEFAULT_BIT, - .resource = reinterpret_cast(&glslang::DefaultTBuiltInResource), + .resource = glslang_default_resource(), }; glslang_shader_t* shader = glslang_shader_create(&input); + SpirVBinary bin = { + .words = NULL, + .size = 0, + }; if (!glslang_shader_preprocess(shader, &input)) { printf("GLSL preprocessing failed %s\n", fileName); printf("%s\n", glslang_shader_get_info_log(shader)); printf("%s\n", glslang_shader_get_info_debug_log(shader)); printf("%s\n", input.code); glslang_shader_delete(shader); - return std::vector(); + return bin; } if (!glslang_shader_parse(shader, &input)) { @@ -469,7 +447,7 @@ std::vector compileShaderToSPIRV_Vulkan(glslang_stage_t stage, const c printf("%s\n", glslang_shader_get_info_debug_log(shader)); printf("%s\n", glslang_shader_get_preprocessed_code(shader)); glslang_shader_delete(shader); - return std::vector(); + return bin; } glslang_program_t* program = glslang_program_create(); @@ -481,13 +459,14 @@ std::vector compileShaderToSPIRV_Vulkan(glslang_stage_t stage, const c printf("%s\n", glslang_program_get_info_debug_log(program)); glslang_program_delete(program); glslang_shader_delete(shader); - return std::vector(); + return bin; } glslang_program_SPIRV_generate(program, stage); - std::vector outShaderModule(glslang_program_SPIRV_get_size(program)); - glslang_program_SPIRV_get(program, outShaderModule.data()); + bin.size = glslang_program_SPIRV_get_size(program); + bin.words = malloc(bin.size * sizeof(uint32_t)); + glslang_program_SPIRV_get(program, bin.words); const char* spirv_messages = glslang_program_SPIRV_get_messages(program); if (spirv_messages) @@ -496,7 +475,7 @@ std::vector compileShaderToSPIRV_Vulkan(glslang_stage_t stage, const c glslang_program_delete(program); glslang_shader_delete(shader); - return outShaderModule; + return bin; } ``` @@ -555,4 +534,4 @@ std::vector compileShaderToSPIRV_Vulkan(glslang_stage_t stage, const c [bison]: https://www.gnu.org/software/bison/ [googletest]: https://github.com/google/googletest [bison-gnu-win32]: http://gnuwin32.sourceforge.net/packages/bison.htm -[master-tot-release]: https://github.com/KhronosGroup/glslang/releases/tag/master-tot +[main-tot-release]: https://github.com/KhronosGroup/glslang/releases/tag/main-tot diff --git a/SECURITY.md b/SECURITY.md new file mode 100755 index 00000000..ffa39bf7 --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,6 @@ +# Security Policy + +To report a security issue, please disclose it at [security advisory](https://github.com/KhronosGroup/glslang/security/advisories/new). + +This project is maintained by a team of volunteers on a reasonable-effort basis. As +such, please give us at least 90 days to work on a fix before public exposure. diff --git a/SPIRV/BUILD.gn b/SPIRV/BUILD.gn index 1a0300cd..42d258ee 100755 --- a/SPIRV/BUILD.gn +++ b/SPIRV/BUILD.gn @@ -25,12 +25,12 @@ config("SPIRV_config") { ] cflags_cc += [ "-fPIC", + "-std=c++17", "-Wno-reorder", "-fno-rtti", "-fno-exceptions", "-Wno-sign-compare", "-Wno-unused-parameter", - "-std=c++11", ] defines = deqp_common_defines @@ -67,7 +67,7 @@ ohos_source_set("SPIRV_source") { include_dirs += deqp_common_include_dirs deps = [ - "//third_party/glslang/OGLCompilersDLL:libdeqp_OGLCompiler", + #"//third_party/glslang/OGLCompilersDLL:libdeqp_OGLCompiler", "//third_party/glslang/glslang:libdeqp_GenericCodeGen", "//third_party/glslang/glslang:libdeqp_MachineIndependent", "//third_party/glslang/glslang:libdeqp_OSDependent", diff --git a/SPIRV/CInterface/spirv_c_interface.cpp b/SPIRV/CInterface/spirv_c_interface.cpp index d56ad46e..f421ea5a 100755 --- a/SPIRV/CInterface/spirv_c_interface.cpp +++ b/SPIRV/CInterface/spirv_c_interface.cpp @@ -83,14 +83,8 @@ static EShLanguage c_shader_stage(glslang_stage_t stage) GLSLANG_EXPORT void glslang_program_SPIRV_generate(glslang_program_t* program, glslang_stage_t stage) { - glslang_spv_options_t spv_options; - spv_options.generate_debug_info = false; - spv_options.strip_debug_info = false; - spv_options.emit_nonsemantic_shader_debug_info = false; - spv_options.emit_nonsemantic_shader_debug_source = false; + glslang_spv_options_t spv_options {}; spv_options.disable_optimizer = true; - spv_options.optimize_size = false; - spv_options.disassemble = false; spv_options.validate = true; glslang_program_SPIRV_generate_with_options(program, stage, &spv_options); diff --git a/SPIRV/CMakeLists.txt b/SPIRV/CMakeLists.txt index 62ffbc45..61c7a266 100755 --- a/SPIRV/CMakeLists.txt +++ b/SPIRV/CMakeLists.txt @@ -70,9 +70,19 @@ set(SPVREMAP_HEADERS SPVRemapper.h doc.h) +set(PUBLIC_HEADERS + GlslangToSpv.h + disassemble.h + Logger.h + spirv.hpp + SPVRemapper.h) + add_library(SPIRV ${LIB_TYPE} ${SOURCES} ${HEADERS}) -set_property(TARGET SPIRV PROPERTY FOLDER glslang) -set_property(TARGET SPIRV PROPERTY POSITION_INDEPENDENT_CODE ON) +set_target_properties(SPIRV PROPERTIES + FOLDER glslang + POSITION_INDEPENDENT_CODE ON + VERSION "${GLSLANG_VERSION}" + SOVERSION "${GLSLANG_VERSION_MAJOR}") target_include_directories(SPIRV PUBLIC $ $) @@ -81,8 +91,11 @@ glslang_add_build_info_dependency(SPIRV) 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) + set_target_properties(SPVRemapper PROPERTIES + FOLDER glslang + POSITION_INDEPENDENT_CODE ON + VERSION "${GLSLANG_VERSION}" + SOVERSION "${GLSLANG_VERSION_MAJOR}") endif() if(WIN32 AND BUILD_SHARED_LIBS) @@ -93,14 +106,9 @@ if(WIN32 AND BUILD_SHARED_LIBS) endif() if(ENABLE_OPT) - target_include_directories(SPIRV - PRIVATE ${spirv-tools_SOURCE_DIR}/include - PRIVATE ${spirv-tools_SOURCE_DIR}/source - ) - target_link_libraries(SPIRV PRIVATE MachineIndependent SPIRV-Tools-opt) + target_link_libraries(SPIRV PRIVATE MachineIndependent PUBLIC SPIRV-Tools-opt) target_include_directories(SPIRV PUBLIC - $ - $) + $) else() target_link_libraries(SPIRV PRIVATE MachineIndependent) endif() @@ -110,7 +118,7 @@ if(WIN32) source_group("Source" FILES ${SPVREMAP_SOURCES} ${SPVREMAP_HEADERS}) endif() -if(ENABLE_GLSLANG_INSTALL) +if(PROJECT_IS_TOP_LEVEL) if (ENABLE_SPVREMAPPER) install(TARGETS SPVRemapper EXPORT glslang-targets) endif() @@ -123,7 +131,7 @@ if(ENABLE_GLSLANG_INSTALL) message(WARNING \"Using `SPVRemapperTargets.cmake` is deprecated: use `find_package(glslang)` to find glslang CMake targets.\") if (NOT TARGET glslang::SPVRemapper) - include(\"\${CMAKE_CURRENT_LIST_DIR}/../../${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}/glslang-targets.cmake\") + include(\"${CMAKE_INSTALL_FULL_LIBDIR}/cmake/${PROJECT_NAME}/glslang-targets.cmake\") endif() add_library(SPVRemapper ALIAS glslang::SPVRemapper) @@ -135,12 +143,12 @@ if(ENABLE_GLSLANG_INSTALL) message(WARNING \"Using `SPIRVTargets.cmake` is deprecated: use `find_package(glslang)` to find glslang CMake targets.\") if (NOT TARGET glslang::SPIRV) - include(\"\${CMAKE_CURRENT_LIST_DIR}/../../${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}/glslang-targets.cmake\") + include(\"${CMAKE_INSTALL_FULL_LIBDIR}/cmake/${PROJECT_NAME}/glslang-targets.cmake\") endif() add_library(SPIRV ALIAS glslang::SPIRV) ") install(FILES "${CMAKE_CURRENT_BINARY_DIR}/SPIRVTargets.cmake" DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake) - install(FILES ${HEADERS} ${SPVREMAP_HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/glslang/SPIRV/) + install(FILES ${PUBLIC_HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/glslang/SPIRV/) endif() diff --git a/SPIRV/GLSL.ext.EXT.h b/SPIRV/GLSL.ext.EXT.h index a247b4cd..caab2793 100755 --- a/SPIRV/GLSL.ext.EXT.h +++ b/SPIRV/GLSL.ext.EXT.h @@ -39,6 +39,7 @@ static const char* const E_SPV_EXT_shader_atomic_float_add = "SPV_EXT_shader_ato static const char* const E_SPV_EXT_shader_atomic_float16_add = "SPV_EXT_shader_atomic_float16_add"; static const char* const E_SPV_EXT_shader_atomic_float_min_max = "SPV_EXT_shader_atomic_float_min_max"; static const char* const E_SPV_EXT_shader_image_int64 = "SPV_EXT_shader_image_int64"; +static const char* const E_SPV_EXT_shader_tile_image = "SPV_EXT_shader_tile_image"; static const char* const E_SPV_EXT_mesh_shader = "SPV_EXT_mesh_shader"; #endif // #ifndef GLSLextEXT_H diff --git a/SPIRV/GLSL.ext.KHR.h b/SPIRV/GLSL.ext.KHR.h index d5c670f0..121defa1 100755 --- a/SPIRV/GLSL.ext.KHR.h +++ b/SPIRV/GLSL.ext.KHR.h @@ -54,5 +54,7 @@ static const char* const E_SPV_KHR_workgroup_memory_explicit_layout = "SPV_KHR_w 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"; static const char* const E_SPV_AMD_shader_early_and_late_fragment_tests = "SPV_AMD_shader_early_and_late_fragment_tests"; +static const char* const E_SPV_KHR_ray_tracing_position_fetch = "SPV_KHR_ray_tracing_position_fetch"; +static const char* const E_SPV_KHR_cooperative_matrix = "SPV_KHR_cooperative_matrix"; #endif // #ifndef GLSLextKHR_H diff --git a/SPIRV/GLSL.ext.NV.h b/SPIRV/GLSL.ext.NV.h index 93c98bf6..9889bc9f 100755 --- a/SPIRV/GLSL.ext.NV.h +++ b/SPIRV/GLSL.ext.NV.h @@ -81,4 +81,10 @@ const char* const E_SPV_NV_cooperative_matrix = "SPV_NV_cooperative_matrix"; //SPV_NV_shader_sm_builtins const char* const E_SPV_NV_shader_sm_builtins = "SPV_NV_shader_sm_builtins"; +//SPV_NV_shader_execution_reorder +const char* const E_SPV_NV_shader_invocation_reorder = "SPV_NV_shader_invocation_reorder"; + +//SPV_NV_displacement_micromap +const char* const E_SPV_NV_displacement_micromap = "SPV_NV_displacement_micromap"; + #endif // #ifndef GLSLextNV_H diff --git a/SPIRV/GLSL.ext.QCOM.h b/SPIRV/GLSL.ext.QCOM.h new file mode 100755 index 00000000..f13bb693 --- /dev/null +++ b/SPIRV/GLSL.ext.QCOM.h @@ -0,0 +1,41 @@ +/* +** Copyright (c) 2021 The Khronos Group Inc. +** +** Permission is hereby granted, free of charge, to any person obtaining a copy +** of this software and/or associated documentation files (the "Materials"), +** to deal in the Materials without restriction, including without limitation +** the rights to use, copy, modify, merge, publish, distribute, sublicense, +** and/or sell copies of the Materials, and to permit persons to whom the +** Materials are furnished to do so, subject to the following conditions: +** +** The above copyright notice and this permission notice shall be included in +** all copies or substantial portions of the Materials. +** +** MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS KHRONOS +** STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND +** HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/ +** +** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +** OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +** FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +** THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +** LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +** FROM,OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS +** IN THE MATERIALS. +*/ + +#ifndef GLSLextQCOM_H +#define GLSLextQCOM_H + +enum BuiltIn; +enum Decoration; +enum Op; +enum Capability; + +static const int GLSLextQCOMVersion = 100; +static const int GLSLextQCOMRevision = 1; + +//SPV_QCOM_image_processing +const char* const E_SPV_QCOM_image_processing = "SPV_QCOM_image_processing"; + +#endif // #ifndef GLSLextQCOM_H diff --git a/SPIRV/GLSL.std.450.h b/SPIRV/GLSL.std.450.h index df31092b..86d3da80 100755 --- a/SPIRV/GLSL.std.450.h +++ b/SPIRV/GLSL.std.450.h @@ -13,7 +13,7 @@ ** ** MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS KHRONOS ** STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND -** HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/ +** HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/ ** ** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS ** OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/SPIRV/GlslangToSpv.cpp b/SPIRV/GlslangToSpv.cpp index 17be9683..ec40f663 100755 --- a/SPIRV/GlslangToSpv.cpp +++ b/SPIRV/GlslangToSpv.cpp @@ -43,6 +43,7 @@ #include "spirv.hpp" #include "GlslangToSpv.h" #include "SpvBuilder.h" +#include "SpvTools.h" namespace spv { #include "GLSL.std.450.h" #include "GLSL.ext.KHR.h" @@ -50,6 +51,7 @@ namespace spv { #include "GLSL.ext.AMD.h" #include "GLSL.ext.NV.h" #include "GLSL.ext.ARM.h" + #include "GLSL.ext.QCOM.h" #include "NonSemanticDebugPrintf.h" } @@ -65,6 +67,7 @@ namespace spv { #include #include #include +#include #include #include #include @@ -95,26 +98,18 @@ struct OpDecorations { public: OpDecorations(spv::Decoration precision, spv::Decoration noContraction, spv::Decoration nonUniform) : precision(precision) -#ifndef GLSLANG_WEB , noContraction(noContraction), nonUniform(nonUniform) -#endif { } spv::Decoration precision; -#ifdef GLSLANG_WEB - void addNoContraction(spv::Builder&, spv::Id) const { } - void addNonUniform(spv::Builder&, spv::Id) const { } -#else void addNoContraction(spv::Builder& builder, spv::Id t) { builder.addDecoration(t, noContraction); } void addNonUniform(spv::Builder& builder, spv::Id t) { builder.addDecoration(t, nonUniform); } protected: spv::Decoration noContraction; spv::Decoration nonUniform; -#endif - }; } // namespace @@ -140,7 +135,7 @@ public: bool visitLoop(glslang::TVisit, glslang::TIntermLoop*); bool visitBranch(glslang::TVisit visit, glslang::TIntermBranch*); - void finishSpv(); + void finishSpv(bool compileOnly); void dumpSpv(std::vector& out); protected: @@ -171,12 +166,14 @@ protected: spv::Id convertGlslangToSpvType(const glslang::TType& type, bool forwardReferenceOnly = false); spv::Id convertGlslangToSpvType(const glslang::TType& type, glslang::TLayoutPacking, const glslang::TQualifier&, bool lastBufferBlockMember, bool forwardReferenceOnly = false); + void applySpirvDecorate(const glslang::TType& type, spv::Id id, std::optional member); bool filterMember(const glslang::TType& member); spv::Id convertGlslangStructToSpvType(const glslang::TType&, const glslang::TTypeList* glslangStruct, glslang::TLayoutPacking, const glslang::TQualifier&); + spv::LinkageType convertGlslangLinkageToSpv(glslang::TLinkType glslangLinkType); void decorateStructType(const glslang::TType&, const glslang::TTypeList* glslangStruct, glslang::TLayoutPacking, - const glslang::TQualifier&, spv::Id); - spv::Id makeArraySizeId(const glslang::TArraySizes&, int dim); + const glslang::TQualifier&, spv::Id, const std::vector& spvMembers); + spv::Id makeArraySizeId(const glslang::TArraySizes&, int dim, bool allowZero = false); spv::Id accessChainLoad(const glslang::TType& type); void accessChainStore(const glslang::TType& type, spv::Id rvalue); void multiTypeStore(const glslang::TType&, spv::Id rValue); @@ -212,7 +209,7 @@ protected: glslang::TBasicType typeProxy); spv::Id createConversion(glslang::TOperator op, OpDecorations&, spv::Id destTypeId, spv::Id operand, glslang::TBasicType typeProxy); - spv::Id createIntWidthConversion(glslang::TOperator op, spv::Id operand, int vectorSize); + spv::Id createIntWidthConversion(glslang::TOperator op, spv::Id operand, int vectorSize, spv::Id destType); spv::Id makeSmearedConstant(spv::Id constant, int vectorSize); spv::Id createAtomicOperation(glslang::TOperator op, spv::Decoration precision, spv::Id typeId, std::vector& operands, glslang::TBasicType typeProxy, @@ -228,6 +225,7 @@ protected: spv::Id createNoArgOperation(glslang::TOperator op, spv::Decoration precision, spv::Id typeId); spv::Id getSymbolId(const glslang::TIntermSymbol* node); void addMeshNVDecoration(spv::Id id, int member, const glslang::TQualifier & qualifier); + void addImageProcessingQCOMDecoration(spv::Id id, spv::Decoration decor); spv::Id createSpvConstant(const glslang::TIntermTyped&); spv::Id createSpvConstantFromConstUnionArray(const glslang::TType& type, const glslang::TConstUnionArray&, int& nextConst, bool specConstant); @@ -278,12 +276,10 @@ protected: // requiring local translation to and from SPIR-V type on every access. // Maps AST-required-type-id> std::unordered_map forceType; - - // Used later for generating OpTraceKHR/OpExecuteCallableKHR - std::unordered_map locationToSymbol[2]; - // Used by Task shader while generating opearnds for OpEmitMeshTasksEXT spv::Id taskPayloadID; + // Used later for generating OpTraceKHR/OpExecuteCallableKHR/OpHitObjectRecordHit*/OpHitObjectGetShaderBindingTableData + std::unordered_map locationToSymbol[4]; }; // @@ -293,10 +289,6 @@ protected: // Translate glslang profile to SPIR-V source language. spv::SourceLanguage TranslateSourceLanguage(glslang::EShSource source, EProfile profile) { -#ifdef GLSLANG_WEB - return spv::SourceLanguageESSL; -#endif - switch (source) { case glslang::EShSourceGlsl: switch (profile) { @@ -323,7 +315,6 @@ spv::ExecutionModel TranslateExecutionModel(EShLanguage stage, bool isMeshShader case EShLangVertex: return spv::ExecutionModelVertex; case EShLangFragment: return spv::ExecutionModelFragment; case EShLangCompute: return spv::ExecutionModelGLCompute; -#ifndef GLSLANG_WEB case EShLangTessControl: return spv::ExecutionModelTessellationControl; case EShLangTessEvaluation: return spv::ExecutionModelTessellationEvaluation; case EShLangGeometry: return spv::ExecutionModelGeometry; @@ -335,7 +326,6 @@ spv::ExecutionModel TranslateExecutionModel(EShLanguage stage, bool isMeshShader case EShLangCallable: return spv::ExecutionModelCallableKHR; case EShLangTask: return (isMeshShaderEXT)? spv::ExecutionModelTaskEXT : spv::ExecutionModelTaskNV; case EShLangMesh: return (isMeshShaderEXT)? spv::ExecutionModelMeshEXT: spv::ExecutionModelMeshNV; -#endif default: assert(0); return spv::ExecutionModelFragment; @@ -353,6 +343,7 @@ spv::Dim TranslateDimensionality(const glslang::TSampler& sampler) case glslang::EsdRect: return spv::DimRect; case glslang::EsdBuffer: return spv::DimBuffer; case glslang::EsdSubpass: return spv::DimSubpassData; + case glslang::EsdAttachmentEXT: return spv::DimTileImageDataEXT; default: assert(0); return spv::Dim2D; @@ -377,26 +368,23 @@ spv::Decoration TranslatePrecisionDecoration(const glslang::TType& type) } // Translate glslang type to SPIR-V block decorations. -spv::Decoration TranslateBlockDecoration(const glslang::TType& type, bool useStorageBuffer) +spv::Decoration TranslateBlockDecoration(const glslang::TStorageQualifier storage, bool useStorageBuffer) { - if (type.getBasicType() == glslang::EbtBlock) { - switch (type.getQualifier().storage) { - case glslang::EvqUniform: return spv::DecorationBlock; - case glslang::EvqBuffer: return useStorageBuffer ? spv::DecorationBlock : spv::DecorationBufferBlock; - case glslang::EvqVaryingIn: return spv::DecorationBlock; - case glslang::EvqVaryingOut: return spv::DecorationBlock; - case glslang::EvqShared: return spv::DecorationBlock; -#ifndef GLSLANG_WEB - case glslang::EvqPayload: return spv::DecorationBlock; - case glslang::EvqPayloadIn: return spv::DecorationBlock; - case glslang::EvqHitAttr: return spv::DecorationBlock; - case glslang::EvqCallableData: return spv::DecorationBlock; - case glslang::EvqCallableDataIn: return spv::DecorationBlock; -#endif - default: - assert(0); - break; - } + switch (storage) { + case glslang::EvqUniform: return spv::DecorationBlock; + case glslang::EvqBuffer: return useStorageBuffer ? spv::DecorationBlock : spv::DecorationBufferBlock; + case glslang::EvqVaryingIn: return spv::DecorationBlock; + case glslang::EvqVaryingOut: return spv::DecorationBlock; + case glslang::EvqShared: return spv::DecorationBlock; + case glslang::EvqPayload: return spv::DecorationBlock; + case glslang::EvqPayloadIn: return spv::DecorationBlock; + case glslang::EvqHitAttr: return spv::DecorationBlock; + case glslang::EvqCallableData: return spv::DecorationBlock; + case glslang::EvqCallableDataIn: return spv::DecorationBlock; + case glslang::EvqHitObjectAttrNV: return spv::DecorationBlock; + default: + assert(0); + break; } return spv::DecorationMax; @@ -463,14 +451,13 @@ spv::Decoration TranslateLayoutDecoration(const glslang::TType& type, glslang::T assert(type.getQualifier().layoutPacking == glslang::ElpNone); } return spv::DecorationMax; -#ifndef GLSLANG_WEB case glslang::EvqPayload: case glslang::EvqPayloadIn: case glslang::EvqHitAttr: case glslang::EvqCallableData: case glslang::EvqCallableDataIn: + case glslang::EvqHitObjectAttrNV: return spv::DecorationMax; -#endif default: assert(0); return spv::DecorationMax; @@ -506,14 +493,12 @@ spv::Decoration TGlslangToSpvTraverser::TranslateAuxiliaryStorageDecoration(cons { if (qualifier.centroid) return spv::DecorationCentroid; -#ifndef GLSLANG_WEB else if (qualifier.patch) return spv::DecorationPatch; else if (qualifier.sample) { builder.addCapability(spv::CapabilitySampleRateShading); return spv::DecorationSample; } -#endif return spv::DecorationMax; } @@ -530,24 +515,20 @@ spv::Decoration TranslateInvariantDecoration(const glslang::TQualifier& qualifie // If glslang type is noContraction, return SPIR-V NoContraction decoration. spv::Decoration TranslateNoContractionDecoration(const glslang::TQualifier& qualifier) { -#ifndef GLSLANG_WEB if (qualifier.isNoContraction()) return spv::DecorationNoContraction; else -#endif return spv::DecorationMax; } // If glslang type is nonUniform, return SPIR-V NonUniform decoration. spv::Decoration TGlslangToSpvTraverser::TranslateNonUniformDecoration(const glslang::TQualifier& qualifier) { -#ifndef GLSLANG_WEB if (qualifier.isNonUniform()) { builder.addIncorporatedExtension("SPV_EXT_descriptor_indexing", spv::Spv_1_5); builder.addCapability(spv::CapabilityShaderNonUniformEXT); return spv::DecorationNonUniformEXT; } else -#endif return spv::DecorationMax; } @@ -555,13 +536,11 @@ spv::Decoration TGlslangToSpvTraverser::TranslateNonUniformDecoration(const glsl spv::Decoration TGlslangToSpvTraverser::TranslateNonUniformDecoration( const spv::Builder::AccessChain::CoherentFlags& coherentFlags) { -#ifndef GLSLANG_WEB if (coherentFlags.isNonUniform()) { builder.addIncorporatedExtension("SPV_EXT_descriptor_indexing", spv::Spv_1_5); builder.addCapability(spv::CapabilityShaderNonUniformEXT); return spv::DecorationNonUniformEXT; } else -#endif return spv::DecorationMax; } @@ -570,7 +549,6 @@ spv::MemoryAccessMask TGlslangToSpvTraverser::TranslateMemoryAccess( { spv::MemoryAccessMask mask = spv::MemoryAccessMaskNone; -#ifndef GLSLANG_WEB if (!glslangIntermediate->usingVulkanMemoryModel() || coherentFlags.isImage) return mask; @@ -588,7 +566,6 @@ spv::MemoryAccessMask TGlslangToSpvTraverser::TranslateMemoryAccess( if (mask != spv::MemoryAccessMaskNone) { builder.addCapability(spv::CapabilityVulkanMemoryModelKHR); } -#endif return mask; } @@ -598,7 +575,6 @@ spv::ImageOperandsMask TGlslangToSpvTraverser::TranslateImageOperands( { spv::ImageOperandsMask mask = spv::ImageOperandsMaskNone; -#ifndef GLSLANG_WEB if (!glslangIntermediate->usingVulkanMemoryModel()) return mask; @@ -616,7 +592,6 @@ spv::ImageOperandsMask TGlslangToSpvTraverser::TranslateImageOperands( if (mask != spv::ImageOperandsMaskNone) { builder.addCapability(spv::CapabilityVulkanMemoryModelKHR); } -#endif return mask; } @@ -624,7 +599,6 @@ spv::ImageOperandsMask TGlslangToSpvTraverser::TranslateImageOperands( spv::Builder::AccessChain::CoherentFlags TGlslangToSpvTraverser::TranslateCoherent(const glslang::TType& type) { spv::Builder::AccessChain::CoherentFlags flags = {}; -#ifndef GLSLANG_WEB flags.coherent = type.getQualifier().coherent; flags.devicecoherent = type.getQualifier().devicecoherent; flags.queuefamilycoherent = type.getQualifier().queuefamilycoherent; @@ -639,7 +613,6 @@ spv::Builder::AccessChain::CoherentFlags TGlslangToSpvTraverser::TranslateCohere flags.anyCoherent() || flags.volatil; flags.isImage = type.getBasicType() == glslang::EbtSampler; -#endif flags.nonUniform = type.getQualifier().nonUniform; return flags; } @@ -649,7 +622,6 @@ spv::Scope TGlslangToSpvTraverser::TranslateMemoryScope( { spv::Scope scope = spv::ScopeMax; -#ifndef GLSLANG_WEB if (coherentFlags.volatil || coherentFlags.coherent) { // coherent defaults to Device scope in the old model, QueueFamilyKHR scope in the new model scope = glslangIntermediate->usingVulkanMemoryModel() ? spv::ScopeQueueFamilyKHR : spv::ScopeDevice; @@ -667,7 +639,6 @@ spv::Scope TGlslangToSpvTraverser::TranslateMemoryScope( if (glslangIntermediate->usingVulkanMemoryModel() && scope == spv::ScopeDevice) { builder.addCapability(spv::CapabilityVulkanMemoryModelDeviceScopeKHR); } -#endif return scope; } @@ -682,7 +653,6 @@ spv::BuiltIn TGlslangToSpvTraverser::TranslateBuiltInDecoration(glslang::TBuiltI { switch (builtIn) { case glslang::EbvPointSize: -#ifndef GLSLANG_WEB // Defer adding the capability until the built-in is actually used. if (! memberDeclaration) { switch (glslangIntermediate->getStage()) { @@ -697,7 +667,6 @@ spv::BuiltIn TGlslangToSpvTraverser::TranslateBuiltInDecoration(glslang::TBuiltI break; } } -#endif return spv::BuiltInPointSize; case glslang::EbvPosition: return spv::BuiltInPosition; @@ -718,7 +687,6 @@ spv::BuiltIn TGlslangToSpvTraverser::TranslateBuiltInDecoration(glslang::TBuiltI case glslang::EbvLocalInvocationIndex: return spv::BuiltInLocalInvocationIndex; case glslang::EbvGlobalInvocationId: return spv::BuiltInGlobalInvocationId; -#ifndef GLSLANG_WEB // These *Distance capabilities logically belong here, but if the member is declared and // then never used, consumers of SPIR-V prefer the capability not be declared. // They are now generated when used, rather than here when declared. @@ -1012,6 +980,8 @@ spv::BuiltIn TGlslangToSpvTraverser::TranslateBuiltInDecoration(glslang::TBuiltI return spv::BuiltInRayTmaxKHR; case glslang::EbvCullMask: return spv::BuiltInCullMaskKHR; + case glslang::EbvPositionFetch: + return spv::BuiltInHitTriangleVertexPositionsKHR; case glslang::EbvInstanceCustomIndex: return spv::BuiltInInstanceCustomIndexKHR; case glslang::EbvHitT: @@ -1042,6 +1012,22 @@ spv::BuiltIn TGlslangToSpvTraverser::TranslateBuiltInDecoration(glslang::TBuiltI builder.addExtension(spv::E_SPV_NV_ray_tracing_motion_blur); builder.addCapability(spv::CapabilityRayTracingMotionBlurNV); return spv::BuiltInCurrentRayTimeNV; + case glslang::EbvMicroTrianglePositionNV: + builder.addCapability(spv::CapabilityRayTracingDisplacementMicromapNV); + builder.addExtension("SPV_NV_displacement_micromap"); + return spv::BuiltInHitMicroTriangleVertexPositionsNV; + case glslang::EbvMicroTriangleBaryNV: + builder.addCapability(spv::CapabilityRayTracingDisplacementMicromapNV); + builder.addExtension("SPV_NV_displacement_micromap"); + return spv::BuiltInHitMicroTriangleVertexBarycentricsNV; + case glslang::EbvHitKindFrontFacingMicroTriangleNV: + builder.addCapability(spv::CapabilityRayTracingDisplacementMicromapNV); + builder.addExtension("SPV_NV_displacement_micromap"); + return spv::BuiltInHitKindFrontFacingMicroTriangleNV; + case glslang::EbvHitKindBackFacingMicroTriangleNV: + builder.addCapability(spv::CapabilityRayTracingDisplacementMicromapNV); + builder.addExtension("SPV_NV_displacement_micromap"); + return spv::BuiltInHitKindBackFacingMicroTriangleNV; // barycentrics case glslang::EbvBaryCoordNV: @@ -1129,7 +1115,6 @@ spv::BuiltIn TGlslangToSpvTraverser::TranslateBuiltInDecoration(glslang::TBuiltI builder.addExtension(spv::E_SPV_ARM_core_builtins); builder.addCapability(spv::CapabilityCoreBuiltinsARM); return spv::BuiltInWarpMaxIDARM; -#endif default: return spv::BuiltInMax; @@ -1141,10 +1126,6 @@ spv::ImageFormat TGlslangToSpvTraverser::TranslateImageFormat(const glslang::TTy { assert(type.getBasicType() == glslang::EbtSampler); -#ifdef GLSLANG_WEB - return spv::ImageFormatUnknown; -#endif - // Check for capabilities switch (type.getQualifier().getFormat()) { case glslang::ElfRg32f: @@ -1299,24 +1280,27 @@ spv::LoopControlMask TGlslangToSpvTraverser::TranslateLoopControl(const glslang: // Translate glslang type to SPIR-V storage class. spv::StorageClass TGlslangToSpvTraverser::TranslateStorageClass(const glslang::TType& type) { - if (type.getBasicType() == glslang::EbtRayQuery) + if (type.getBasicType() == glslang::EbtRayQuery || type.getBasicType() == glslang::EbtHitObjectNV) return spv::StorageClassPrivate; -#ifndef GLSLANG_WEB if (type.getQualifier().isSpirvByReference()) { if (type.getQualifier().isParamInput() || type.getQualifier().isParamOutput()) return spv::StorageClassFunction; } -#endif if (type.getQualifier().isPipeInput()) return spv::StorageClassInput; if (type.getQualifier().isPipeOutput()) return spv::StorageClassOutput; + if (type.getQualifier().storage == glslang::EvqTileImageEXT || type.isAttachmentEXT()) { + builder.addExtension(spv::E_SPV_EXT_shader_tile_image); + builder.addCapability(spv::CapabilityTileImageColorReadAccessEXT); + return spv::StorageClassTileImageEXT; + } if (glslangIntermediate->getSource() != glslang::EShSourceHlsl || type.getQualifier().storage == glslang::EvqUniform) { if (type.isAtomic()) return spv::StorageClassAtomicCounter; - if (type.containsOpaque()) + if (type.containsOpaque() && !glslangIntermediate->getBindlessMode()) return spv::StorageClassUniformConstant; } @@ -1349,15 +1333,14 @@ spv::StorageClass TGlslangToSpvTraverser::TranslateStorageClass(const glslang::T case glslang::EvqConstReadOnly: return spv::StorageClassFunction; case glslang::EvqTemporary: return spv::StorageClassFunction; case glslang::EvqShared: return spv::StorageClassWorkgroup; -#ifndef GLSLANG_WEB case glslang::EvqPayload: return spv::StorageClassRayPayloadKHR; case glslang::EvqPayloadIn: return spv::StorageClassIncomingRayPayloadKHR; case glslang::EvqHitAttr: return spv::StorageClassHitAttributeKHR; case glslang::EvqCallableData: return spv::StorageClassCallableDataKHR; case glslang::EvqCallableDataIn: return spv::StorageClassIncomingCallableDataKHR; case glslang::EvqtaskPayloadSharedEXT : return spv::StorageClassTaskPayloadWorkgroupEXT; + case glslang::EvqHitObjectAttrNV: return spv::StorageClassHitObjectAttributeNV; case glslang::EvqSpirvStorageClass: return static_cast(type.getQualifier().spirvStorageClass); -#endif default: assert(0); break; @@ -1418,7 +1401,6 @@ void TGlslangToSpvTraverser::TranslateLiterals(const glslang::TVectorgetSource(), glslangIntermediate->getProfile()), glslangIntermediate->getVersion()); - if (options.generateDebugInfo) { + if (options.emitNonSemanticShaderDebugSource) + this->options.emitNonSemanticShaderDebugInfo = true; + if (options.emitNonSemanticShaderDebugInfo) + this->options.generateDebugInfo = true; + + if (this->options.generateDebugInfo) { builder.setEmitOpLines(); builder.setSourceFile(glslangIntermediate->getSourceFile()); @@ -1600,8 +1584,8 @@ TGlslangToSpvTraverser::TGlslangToSpvTraverser(unsigned int spvVersion, builder.addInclude(iItr->first, iItr->second); } - builder.setEmitNonSemanticShaderDebugInfo(options.emitNonSemanticShaderDebugInfo); - builder.setEmitNonSemanticShaderDebugSource(options.emitNonSemanticShaderDebugSource); + builder.setEmitNonSemanticShaderDebugInfo(this->options.emitNonSemanticShaderDebugInfo); + builder.setEmitNonSemanticShaderDebugSource(this->options.emitNonSemanticShaderDebugSource); stdBuiltins = builder.import("GLSL.std.450"); @@ -1624,8 +1608,12 @@ TGlslangToSpvTraverser::TGlslangToSpvTraverser(unsigned int spvVersion, builder.addCapability(spv::CapabilityVariablePointers); } - shaderEntry = builder.makeEntryPoint(glslangIntermediate->getEntryPointName().c_str()); - entryPoint = builder.addEntryPoint(executionModel, shaderEntry, glslangIntermediate->getEntryPointName().c_str()); + // If not linking, there is no entry point + if (!options.compileOnly) { + shaderEntry = builder.makeEntryPoint(glslangIntermediate->getEntryPointName().c_str()); + entryPoint = + builder.addEntryPoint(executionModel, shaderEntry, glslangIntermediate->getEntryPointName().c_str()); + } // Add the source extensions const auto& sourceExtensions = glslangIntermediate->getRequestedExtensions(); @@ -1643,12 +1631,10 @@ TGlslangToSpvTraverser::TGlslangToSpvTraverser(unsigned int spvVersion, builder.addCapability(spv::CapabilityRayTraversalPrimitiveCullingKHR); } -#ifndef GLSLANG_WEB if (glslangIntermediate->getSubgroupUniformControlFlow()) { builder.addExtension(spv::E_SPV_KHR_subgroup_uniform_control_flow); builder.addExecutionMode(shaderEntry, spv::ExecutionModeSubgroupUniformControlFlowKHR); } -#endif unsigned int mode; switch (glslangIntermediate->getStage()) { @@ -1681,14 +1667,30 @@ TGlslangToSpvTraverser::TGlslangToSpvTraverser(unsigned int spvVersion, builder.addExtension(spv::E_SPV_KHR_post_depth_coverage); } + if (glslangIntermediate->getNonCoherentColorAttachmentReadEXT()) { + builder.addCapability(spv::CapabilityTileImageColorReadAccessEXT); + builder.addExecutionMode(shaderEntry, spv::ExecutionModeNonCoherentColorAttachmentReadEXT); + builder.addExtension(spv::E_SPV_EXT_shader_tile_image); + } + + if (glslangIntermediate->getNonCoherentDepthAttachmentReadEXT()) { + builder.addCapability(spv::CapabilityTileImageDepthReadAccessEXT); + builder.addExecutionMode(shaderEntry, spv::ExecutionModeNonCoherentDepthAttachmentReadEXT); + builder.addExtension(spv::E_SPV_EXT_shader_tile_image); + } + + if (glslangIntermediate->getNonCoherentStencilAttachmentReadEXT()) { + builder.addCapability(spv::CapabilityTileImageStencilReadAccessEXT); + builder.addExecutionMode(shaderEntry, spv::ExecutionModeNonCoherentStencilAttachmentReadEXT); + builder.addExtension(spv::E_SPV_EXT_shader_tile_image); + } + if (glslangIntermediate->isDepthReplacing()) builder.addExecutionMode(shaderEntry, spv::ExecutionModeDepthReplacing); if (glslangIntermediate->isStencilReplacing()) builder.addExecutionMode(shaderEntry, spv::ExecutionModeStencilRefReplacingEXT); -#ifndef GLSLANG_WEB - switch(glslangIntermediate->getDepth()) { case glslang::EldGreater: mode = spv::ExecutionModeDepthGreater; break; case glslang::EldLess: mode = spv::ExecutionModeDepthLess; break; @@ -1740,26 +1742,33 @@ TGlslangToSpvTraverser::TGlslangToSpvTraverser(unsigned int spvVersion, } builder.addExtension(spv::E_SPV_EXT_fragment_shader_interlock); } -#endif break; - case EShLangCompute: + 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)); + bool needSizeId = false; + for (int dim = 0; dim < 3; ++dim) { + if ((glslangIntermediate->getLocalSizeSpecId(dim) != glslang::TQualifier::layoutNotSet)) { + needSizeId = true; + break; } - } - builder.addExecutionModeId(shaderEntry, spv::ExecutionModeLocalSizeId, dimConstId); + } + if (glslangIntermediate->getSpv().spv >= glslang::EShTargetSpv_1_6 && needSizeId) { + 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)); + needSizeId = true; + } + } + 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); @@ -1771,7 +1780,7 @@ TGlslangToSpvTraverser::TGlslangToSpvTraverser(unsigned int spvVersion, builder.addExtension(spv::E_SPV_NV_compute_shader_derivatives); } break; -#ifndef GLSLANG_WEB + } case EShLangTessEvaluation: case EShLangTessControl: builder.addCapability(spv::CapabilityTessellation); @@ -1858,13 +1867,16 @@ 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"); - } - } + 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"); + } + if (extensions.find("GL_EXT_ray_tracing_position_fetch") != extensions.end()) { + builder.addCapability(spv::CapabilityRayTracingPositionFetchKHR); + builder.addExtension("SPV_KHR_ray_tracing_position_fetch"); + } + } break; } case EShLangTask: @@ -1908,13 +1920,11 @@ TGlslangToSpvTraverser::TGlslangToSpvTraverser(unsigned int spvVersion, builder.addExecutionMode(shaderEntry, (spv::ExecutionMode)mode); } break; -#endif default: break; } -#ifndef GLSLANG_WEB // // Add SPIR-V requirements (GL_EXT_spirv_intrinsics) // @@ -1959,27 +1969,29 @@ TGlslangToSpvTraverser::TGlslangToSpvTraverser(unsigned int spvVersion, builder.addExecutionModeId(shaderEntry, static_cast(modeId.first), operandIds); } } -#endif } // Finish creating SPV, after the traversal is complete. -void TGlslangToSpvTraverser::finishSpv() +void TGlslangToSpvTraverser::finishSpv(bool compileOnly) { - // Finish the entry point function - if (! entryPointTerminated) { - builder.setBuildPoint(shaderEntry->getLastBlock()); - builder.leaveFunction(); - } + // If not linking, an entry point is not expected + if (!compileOnly) { + // Finish the entry point function + if (!entryPointTerminated) { + builder.setBuildPoint(shaderEntry->getLastBlock()); + builder.leaveFunction(); + } - // finish off the entry-point SPV instruction by adding the Input/Output - for (auto it = iOSet.cbegin(); it != iOSet.cend(); ++it) - entryPoint->addIdOperand(*it); + // finish off the entry-point SPV instruction by adding the Input/Output + for (auto it = iOSet.cbegin(); it != iOSet.cend(); ++it) + entryPoint->addIdOperand(*it); + } // Add capabilities, extensions, remove unneeded decorations, etc., // based on the resulting SPIR-V. // Note: WebGPU code generation must have the opportunity to aggressively // prune unreachable merge blocks and continue targets. - builder.postProcess(); + builder.postProcess(compileOnly); } // Write the SPV into 'out'. @@ -2005,6 +2017,10 @@ void TGlslangToSpvTraverser::dumpSpv(std::vector& out) // void TGlslangToSpvTraverser::visitSymbol(glslang::TIntermSymbol* symbol) { + // We update the line information even though no code might be generated here + // This is helpful to yield correct lines for control flow instructions + builder.setLine(symbol->getLoc().line, symbol->getLoc().getFilename()); + SpecConstantOpModeGuard spec_constant_op_mode_setter(&builder); if (symbol->getType().isStruct()) glslangTypeToIdMap[symbol->getType().getStruct()] = symbol->getId(); @@ -2034,7 +2050,7 @@ void TGlslangToSpvTraverser::visitSymbol(glslang::TIntermSymbol* symbol) spv::StorageClass sc = builder.getStorageClass(id); // Before SPIR-V 1.4, we only want to include Input and Output. // Starting with SPIR-V 1.4, we want all globals. - if ((glslangIntermediate->getSpv().spv >= glslang::EShTargetSpv_1_4 && builder.isGlobalStorage(id)) || + if ((glslangIntermediate->getSpv().spv >= glslang::EShTargetSpv_1_4 && builder.isGlobalVariable(id)) || (sc == spv::StorageClassInput || sc == spv::StorageClassOutput)) { iOSet.insert(id); } @@ -2156,6 +2172,9 @@ bool TGlslangToSpvTraverser::visitBinary(glslang::TVisit /* visit */, glslang::T node->getRight()->traverse(this); spv::Id rValue = accessChainLoad(node->getRight()->getType()); + // reset line number for assignment + builder.setLine(node->getLoc().line, node->getLoc().getFilename()); + if (node->getOp() != glslang::EOpAssign) { // the left is also an r-value builder.setAccessChain(lValue); @@ -2520,12 +2539,15 @@ bool TGlslangToSpvTraverser::visitUnary(glslang::TVisit /* visit */, glslang::TI spv::Id length; if (node->getOperand()->getType().isCoopMat()) { - spec_constant_op_mode_setter.turnOnSpecConstantOpMode(); - spv::Id typeId = convertGlslangToSpvType(node->getOperand()->getType()); assert(builder.isCooperativeMatrixType(typeId)); - length = builder.createCooperativeMatrixLength(typeId); + if (node->getOperand()->getType().isCoopMatKHR()) { + length = builder.createCooperativeMatrixLengthKHR(typeId); + } else { + spec_constant_op_mode_setter.turnOnSpecConstantOpMode(); + length = builder.createCooperativeMatrixLengthNV(typeId); + } } else { glslang::TIntermTyped* block = node->getOperand()->getAsBinaryNode()->getLeft(); block->traverse(this); @@ -2582,7 +2604,35 @@ bool TGlslangToSpvTraverser::visitUnary(glslang::TVisit /* visit */, glslang::TI spv::Builder::AccessChain::CoherentFlags lvalueCoherentFlags; -#ifndef GLSLANG_WEB + const auto hitObjectOpsWithLvalue = [](glslang::TOperator op) { + switch(op) { + case glslang::EOpReorderThreadNV: + case glslang::EOpHitObjectGetCurrentTimeNV: + case glslang::EOpHitObjectGetHitKindNV: + case glslang::EOpHitObjectGetPrimitiveIndexNV: + case glslang::EOpHitObjectGetGeometryIndexNV: + case glslang::EOpHitObjectGetInstanceIdNV: + case glslang::EOpHitObjectGetInstanceCustomIndexNV: + case glslang::EOpHitObjectGetObjectRayDirectionNV: + case glslang::EOpHitObjectGetObjectRayOriginNV: + case glslang::EOpHitObjectGetWorldRayDirectionNV: + case glslang::EOpHitObjectGetWorldRayOriginNV: + case glslang::EOpHitObjectGetWorldToObjectNV: + case glslang::EOpHitObjectGetObjectToWorldNV: + case glslang::EOpHitObjectGetRayTMaxNV: + case glslang::EOpHitObjectGetRayTMinNV: + case glslang::EOpHitObjectIsEmptyNV: + case glslang::EOpHitObjectIsHitNV: + case glslang::EOpHitObjectIsMissNV: + case glslang::EOpHitObjectRecordEmptyNV: + case glslang::EOpHitObjectGetShaderBindingTableRecordIndexNV: + case glslang::EOpHitObjectGetShaderRecordBufferHandleNV: + return true; + default: + return false; + } + }; + if (node->getOp() == glslang::EOpAtomicCounterIncrement || node->getOp() == glslang::EOpAtomicCounterDecrement || node->getOp() == glslang::EOpAtomicCounter || @@ -2596,16 +2646,15 @@ bool TGlslangToSpvTraverser::visitUnary(glslang::TVisit /* visit */, glslang::TI node->getOp() == glslang::EOpRayQueryGetIntersectionCandidateAABBOpaque || node->getOp() == glslang::EOpRayQueryTerminate || node->getOp() == glslang::EOpRayQueryConfirmIntersection || - (node->getOp() == glslang::EOpSpirvInst && operandNode->getAsTyped()->getQualifier().isSpirvByReference())) { + (node->getOp() == glslang::EOpSpirvInst && operandNode->getAsTyped()->getQualifier().isSpirvByReference()) || + hitObjectOpsWithLvalue(node->getOp())) { operand = builder.accessChainGetLValue(); // Special case l-value operands lvalueCoherentFlags = builder.getAccessChain().coherentFlags; lvalueCoherentFlags |= TranslateCoherent(operandNode->getAsTyped()->getType()); } else if (operandNode->getAsTyped()->getQualifier().isSpirvLiteral()) { // Will be translated to a literal value, make a placeholder here operand = spv::NoResult; - } else -#endif - { + } else { operand = accessChainLoad(node->getOperand()->getType()); } @@ -2623,7 +2672,6 @@ bool TGlslangToSpvTraverser::visitUnary(glslang::TVisit /* visit */, glslang::TI result = createUnaryOperation(node->getOp(), decorations, resultType(), operand, node->getOperand()->getBasicType(), lvalueCoherentFlags); -#ifndef GLSLANG_WEB // it could be attached to a SPIR-V intruction if (!result) { if (node->getOp() == glslang::EOpSpirvInst) { @@ -2653,7 +2701,6 @@ bool TGlslangToSpvTraverser::visitUnary(glslang::TVisit /* visit */, glslang::TI return false; // done with this node } } -#endif if (result) { if (invertedType) { @@ -2678,7 +2725,6 @@ bool TGlslangToSpvTraverser::visitUnary(glslang::TVisit /* visit */, glslang::TI spv::Id one = 0; if (node->getBasicType() == glslang::EbtFloat) one = builder.makeFloatConstant(1.0F); -#ifndef GLSLANG_WEB else if (node->getBasicType() == glslang::EbtDouble) one = builder.makeDoubleConstant(1.0); else if (node->getBasicType() == glslang::EbtFloat16) @@ -2689,7 +2735,6 @@ bool TGlslangToSpvTraverser::visitUnary(glslang::TVisit /* visit */, glslang::TI one = builder.makeInt16Constant(1); else if (node->getBasicType() == glslang::EbtInt64 || node->getBasicType() == glslang::EbtUint64) one = builder.makeInt64Constant(1); -#endif else one = builder.makeIntConstant(1); glslang::TOperator op; @@ -2718,7 +2763,6 @@ bool TGlslangToSpvTraverser::visitUnary(glslang::TVisit /* visit */, glslang::TI return false; -#ifndef GLSLANG_WEB case glslang::EOpEmitStreamVertex: builder.createNoResultOp(spv::OpEmitStreamVertex, operand); return false; @@ -2731,7 +2775,12 @@ bool TGlslangToSpvTraverser::visitUnary(glslang::TVisit /* visit */, glslang::TI case glslang::EOpRayQueryConfirmIntersection: builder.createNoResultOp(spv::OpRayQueryConfirmIntersectionKHR, operand); return false; -#endif + case glslang::EOpReorderThreadNV: + builder.createNoResultOp(spv::OpReorderThreadWithHitObjectNV, operand); + return false; + case glslang::EOpHitObjectRecordEmptyNV: + builder.createNoResultOp(spv::OpHitObjectRecordEmptyNV, operand); + return false; default: logger->missingFunctionality("unknown glslang unary"); @@ -2796,15 +2845,12 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt builder.setAccessChainRValue(result); return false; - } -#ifndef GLSLANG_WEB - else if (node->getOp() == glslang::EOpImageStore || + } else if (node->getOp() == glslang::EOpImageStore || node->getOp() == glslang::EOpImageStoreLod || node->getOp() == glslang::EOpImageAtomicStore) { // "imageStore" is a special case, which has no result return false; } -#endif glslang::TOperator binOp = glslang::EOpNull; bool reduceComparison = true; @@ -2830,9 +2876,12 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt // In all cases, still let the traverser visit the children for us. makeFunctions(node->getAsAggregate()->getSequence()); - // Also, we want all globals initializers to go into the beginning of the entry point, before - // anything else gets there, so visit out of order, doing them all now. - makeGlobalInitializers(node->getAsAggregate()->getSequence()); + // Global initializers is specific to the shader entry point, which does not exist in compile-only mode + if (!options.compileOnly) { + // Also, we want all globals initializers to go into the beginning of the entry point, before + // anything else gets there, so visit out of order, doing them all now. + makeGlobalInitializers(node->getAsAggregate()->getSequence()); + } //Pre process linker objects for ray tracing stages if (glslangIntermediate->isRayTracingStage()) @@ -3023,7 +3072,8 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt case glslang::EOpConstructStruct: case glslang::EOpConstructTextureSampler: case glslang::EOpConstructReference: - case glslang::EOpConstructCooperativeMatrix: + case glslang::EOpConstructCooperativeMatrixNV: + case glslang::EOpConstructCooperativeMatrixKHR: { builder.setLine(node->getLoc().line, node->getLoc().getFilename()); std::vector arguments; @@ -3040,7 +3090,8 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt } else constructed = builder.createOp(spv::OpSampledImage, resultType(), arguments); } else if (node->getOp() == glslang::EOpConstructStruct || - node->getOp() == glslang::EOpConstructCooperativeMatrix || + node->getOp() == glslang::EOpConstructCooperativeMatrixNV || + node->getOp() == glslang::EOpConstructCooperativeMatrixKHR || node->getType().isArray()) { std::vector constituents; for (int c = 0; c < (int)arguments.size(); ++c) @@ -3138,7 +3189,6 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt atomic = true; break; -#ifndef GLSLANG_WEB case glslang::EOpAtomicStore: noReturnValue = true; // fallthrough @@ -3215,6 +3265,8 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt break; case glslang::EOpCooperativeMatrixLoad: case glslang::EOpCooperativeMatrixStore: + case glslang::EOpCooperativeMatrixLoadNV: + case glslang::EOpCooperativeMatrixStoreNV: noReturnValue = true; break; case glslang::EOpBeginInvocationInterlock: @@ -3222,7 +3274,68 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt builder.addExtension(spv::E_SPV_EXT_fragment_shader_interlock); noReturnValue = true; break; -#endif + + case glslang::EOpHitObjectTraceRayNV: + case glslang::EOpHitObjectTraceRayMotionNV: + case glslang::EOpHitObjectGetAttributesNV: + case glslang::EOpHitObjectExecuteShaderNV: + case glslang::EOpHitObjectRecordEmptyNV: + case glslang::EOpHitObjectRecordMissNV: + case glslang::EOpHitObjectRecordMissMotionNV: + case glslang::EOpHitObjectRecordHitNV: + case glslang::EOpHitObjectRecordHitMotionNV: + case glslang::EOpHitObjectRecordHitWithIndexNV: + case glslang::EOpHitObjectRecordHitWithIndexMotionNV: + case glslang::EOpReorderThreadNV: + noReturnValue = true; + //Fallthrough + case glslang::EOpHitObjectIsEmptyNV: + case glslang::EOpHitObjectIsMissNV: + case glslang::EOpHitObjectIsHitNV: + case glslang::EOpHitObjectGetRayTMinNV: + case glslang::EOpHitObjectGetRayTMaxNV: + case glslang::EOpHitObjectGetObjectRayOriginNV: + case glslang::EOpHitObjectGetObjectRayDirectionNV: + case glslang::EOpHitObjectGetWorldRayOriginNV: + case glslang::EOpHitObjectGetWorldRayDirectionNV: + case glslang::EOpHitObjectGetObjectToWorldNV: + case glslang::EOpHitObjectGetWorldToObjectNV: + case glslang::EOpHitObjectGetInstanceCustomIndexNV: + case glslang::EOpHitObjectGetInstanceIdNV: + case glslang::EOpHitObjectGetGeometryIndexNV: + case glslang::EOpHitObjectGetPrimitiveIndexNV: + case glslang::EOpHitObjectGetHitKindNV: + case glslang::EOpHitObjectGetCurrentTimeNV: + case glslang::EOpHitObjectGetShaderBindingTableRecordIndexNV: + case glslang::EOpHitObjectGetShaderRecordBufferHandleNV: + builder.addExtension(spv::E_SPV_NV_shader_invocation_reorder); + builder.addCapability(spv::CapabilityShaderInvocationReorderNV); + break; + case glslang::EOpRayQueryGetIntersectionTriangleVertexPositionsEXT: + builder.addExtension(spv::E_SPV_KHR_ray_tracing_position_fetch); + builder.addCapability(spv::CapabilityRayQueryPositionFetchKHR); + noReturnValue = true; + break; + + case glslang::EOpImageSampleWeightedQCOM: + builder.addCapability(spv::CapabilityTextureSampleWeightedQCOM); + builder.addExtension(spv::E_SPV_QCOM_image_processing); + break; + case glslang::EOpImageBoxFilterQCOM: + builder.addCapability(spv::CapabilityTextureBoxFilterQCOM); + builder.addExtension(spv::E_SPV_QCOM_image_processing); + break; + case glslang::EOpImageBlockMatchSADQCOM: + case glslang::EOpImageBlockMatchSSDQCOM: + builder.addCapability(spv::CapabilityTextureBlockMatchQCOM); + builder.addExtension(spv::E_SPV_QCOM_image_processing); + break; + + case glslang::EOpFetchMicroTriangleVertexPositionNV: + case glslang::EOpFetchMicroTriangleVertexBarycentricNV: + builder.addExtension(spv::E_SPV_NV_displacement_micromap); + builder.addCapability(spv::CapabilityDisplacementMicromapNV); + break; case glslang::EOpDebugPrintf: noReturnValue = true; @@ -3279,6 +3392,22 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt lvalue = true; break; + + + case glslang::EOpHitObjectRecordHitNV: + case glslang::EOpHitObjectRecordHitMotionNV: + case glslang::EOpHitObjectRecordHitWithIndexNV: + case glslang::EOpHitObjectRecordHitWithIndexMotionNV: + case glslang::EOpHitObjectTraceRayNV: + case glslang::EOpHitObjectTraceRayMotionNV: + case glslang::EOpHitObjectExecuteShaderNV: + case glslang::EOpHitObjectRecordMissNV: + case glslang::EOpHitObjectRecordMissMotionNV: + case glslang::EOpHitObjectGetAttributesNV: + if (arg == 0) + lvalue = true; + break; + case glslang::EOpRayQueryInitialize: case glslang::EOpRayQueryTerminate: case glslang::EOpRayQueryConfirmIntersection: @@ -3314,7 +3443,6 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt lvalue = true; break; -#ifndef GLSLANG_WEB case glslang::EOpFrexp: if (arg == 1) lvalue = true; @@ -3368,10 +3496,12 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt lvalue = true; break; case glslang::EOpCooperativeMatrixLoad: + case glslang::EOpCooperativeMatrixLoadNV: if (arg == 0 || arg == 1) lvalue = true; break; case glslang::EOpCooperativeMatrixStore: + case glslang::EOpCooperativeMatrixStoreNV: if (arg == 1) lvalue = true; break; @@ -3379,7 +3509,15 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt if (glslangOperands[arg]->getAsTyped()->getQualifier().isSpirvByReference()) lvalue = true; break; -#endif + case glslang::EOpReorderThreadNV: + //Three variants of reorderThreadNV, two of them use hitObjectNV + if (arg == 0 && glslangOperands.size() != 2) + lvalue = true; + break; + case glslang::EOpRayQueryGetIntersectionTriangleVertexPositionsEXT: + if (arg == 0 || arg == 2) + lvalue = true; + break; default: break; } @@ -3389,9 +3527,10 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt else glslangOperands[arg]->traverse(this); -#ifndef GLSLANG_WEB if (node->getOp() == glslang::EOpCooperativeMatrixLoad || - node->getOp() == glslang::EOpCooperativeMatrixStore) { + node->getOp() == glslang::EOpCooperativeMatrixStore || + node->getOp() == glslang::EOpCooperativeMatrixLoadNV || + node->getOp() == glslang::EOpCooperativeMatrixStoreNV) { if (arg == 1) { // fold "element" parameter into the access chain @@ -3412,9 +3551,11 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt unsigned int alignment = builder.getAccessChain().alignment; int memoryAccess = TranslateMemoryAccess(coherentFlags); - if (node->getOp() == glslang::EOpCooperativeMatrixLoad) + if (node->getOp() == glslang::EOpCooperativeMatrixLoad || + node->getOp() == glslang::EOpCooperativeMatrixLoadNV) memoryAccess &= ~spv::MemoryAccessMakePointerAvailableKHRMask; - if (node->getOp() == glslang::EOpCooperativeMatrixStore) + if (node->getOp() == glslang::EOpCooperativeMatrixStore || + node->getOp() == glslang::EOpCooperativeMatrixStoreNV) memoryAccess &= ~spv::MemoryAccessMakePointerVisibleKHRMask; if (builder.getStorageClass(builder.getAccessChain().base) == spv::StorageClassPhysicalStorageBufferEXT) { @@ -3436,7 +3577,6 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt continue; } } -#endif // for l-values, pass the address, for r-values, pass the value if (lvalue) { @@ -3471,26 +3611,37 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt glslangOp == glslang::EOpRayQueryGetIntersectionObjectRayDirection || glslangOp == glslang::EOpRayQueryGetIntersectionObjectRayOrigin || glslangOp == glslang::EOpRayQueryGetIntersectionObjectToWorld || - glslangOp == glslang::EOpRayQueryGetIntersectionWorldToObject + glslangOp == glslang::EOpRayQueryGetIntersectionWorldToObject || + glslangOp == glslang::EOpRayQueryGetIntersectionTriangleVertexPositionsEXT )) { bool cond = glslangOperands[arg]->getAsConstantUnion()->getConstArray()[0].getBConst(); operands.push_back(builder.makeIntConstant(cond ? 1 : 0)); } else if ((arg == 10 && glslangOp == glslang::EOpTraceKHR) || (arg == 11 && glslangOp == glslang::EOpTraceRayMotionNV) || - (arg == 1 && glslangOp == glslang::EOpExecuteCallableKHR)) { - const int opdNum = glslangOp == glslang::EOpTraceKHR ? 10 : (glslangOp == glslang::EOpTraceRayMotionNV ? 11 : 1); + (arg == 1 && glslangOp == glslang::EOpExecuteCallableKHR) || + (arg == 1 && glslangOp == glslang::EOpHitObjectExecuteShaderNV) || + (arg == 11 && glslangOp == glslang::EOpHitObjectTraceRayNV) || + (arg == 12 && glslangOp == glslang::EOpHitObjectTraceRayMotionNV)) { const int set = glslangOp == glslang::EOpExecuteCallableKHR ? 1 : 0; - - const int location = glslangOperands[opdNum]->getAsConstantUnion()->getConstArray()[0].getUConst(); + const int location = glslangOperands[arg]->getAsConstantUnion()->getConstArray()[0].getUConst(); + auto itNode = locationToSymbol[set].find(location); + visitSymbol(itNode->second); + spv::Id symId = getSymbolId(itNode->second); + operands.push_back(symId); + } else if ((arg == 12 && glslangOp == glslang::EOpHitObjectRecordHitNV) || + (arg == 13 && glslangOp == glslang::EOpHitObjectRecordHitMotionNV) || + (arg == 11 && glslangOp == glslang::EOpHitObjectRecordHitWithIndexNV) || + (arg == 12 && glslangOp == glslang::EOpHitObjectRecordHitWithIndexMotionNV) || + (arg == 1 && glslangOp == glslang::EOpHitObjectGetAttributesNV)) { + const int location = glslangOperands[arg]->getAsConstantUnion()->getConstArray()[0].getUConst(); + const int set = 2; auto itNode = locationToSymbol[set].find(location); visitSymbol(itNode->second); spv::Id symId = getSymbolId(itNode->second); operands.push_back(symId); -#ifndef GLSLANG_WEB } else if (glslangOperands[arg]->getAsTyped()->getQualifier().isSpirvLiteral()) { // Will be translated to a literal value, make a placeholder here operands.push_back(spv::NoResult); -#endif } else { operands.push_back(accessChainLoad(glslangOperands[arg]->getAsTyped()->getType())); } @@ -3498,42 +3649,97 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt } builder.setLine(node->getLoc().line, node->getLoc().getFilename()); -#ifndef GLSLANG_WEB - if (node->getOp() == glslang::EOpCooperativeMatrixLoad) { + if (node->getOp() == glslang::EOpCooperativeMatrixLoad || + node->getOp() == glslang::EOpCooperativeMatrixLoadNV) { std::vector idImmOps; idImmOps.push_back(spv::IdImmediate(true, operands[1])); // buf - idImmOps.push_back(spv::IdImmediate(true, operands[2])); // stride - idImmOps.push_back(spv::IdImmediate(true, operands[3])); // colMajor + if (node->getOp() == glslang::EOpCooperativeMatrixLoad) { + idImmOps.push_back(spv::IdImmediate(true, operands[3])); // matrixLayout + idImmOps.push_back(spv::IdImmediate(true, operands[2])); // stride + } else { + idImmOps.push_back(spv::IdImmediate(true, operands[2])); // stride + idImmOps.push_back(spv::IdImmediate(true, operands[3])); // colMajor + } idImmOps.insert(idImmOps.end(), memoryAccessOperands.begin(), memoryAccessOperands.end()); // get the pointee type spv::Id typeId = builder.getContainedTypeId(builder.getTypeId(operands[0])); assert(builder.isCooperativeMatrixType(typeId)); // do the op - spv::Id result = builder.createOp(spv::OpCooperativeMatrixLoadNV, typeId, idImmOps); + spv::Id result = node->getOp() == glslang::EOpCooperativeMatrixLoad + ? builder.createOp(spv::OpCooperativeMatrixLoadKHR, typeId, idImmOps) + : builder.createOp(spv::OpCooperativeMatrixLoadNV, typeId, idImmOps); // store the result to the pointer (out param 'm') builder.createStore(result, operands[0]); result = 0; - } else if (node->getOp() == glslang::EOpCooperativeMatrixStore) { + } else if (node->getOp() == glslang::EOpCooperativeMatrixStore || + node->getOp() == glslang::EOpCooperativeMatrixStoreNV) { std::vector idImmOps; idImmOps.push_back(spv::IdImmediate(true, operands[1])); // buf idImmOps.push_back(spv::IdImmediate(true, operands[0])); // object - idImmOps.push_back(spv::IdImmediate(true, operands[2])); // stride - idImmOps.push_back(spv::IdImmediate(true, operands[3])); // colMajor + if (node->getOp() == glslang::EOpCooperativeMatrixStore) { + idImmOps.push_back(spv::IdImmediate(true, operands[3])); // matrixLayout + idImmOps.push_back(spv::IdImmediate(true, operands[2])); // stride + } else { + idImmOps.push_back(spv::IdImmediate(true, operands[2])); // stride + idImmOps.push_back(spv::IdImmediate(true, operands[3])); // colMajor + } idImmOps.insert(idImmOps.end(), memoryAccessOperands.begin(), memoryAccessOperands.end()); - builder.createNoResultOp(spv::OpCooperativeMatrixStoreNV, idImmOps); + if (node->getOp() == glslang::EOpCooperativeMatrixStore) + builder.createNoResultOp(spv::OpCooperativeMatrixStoreKHR, idImmOps); + else + builder.createNoResultOp(spv::OpCooperativeMatrixStoreNV, idImmOps); result = 0; - } else -#endif - if (atomic) { + } else if (node->getOp() == glslang::EOpRayQueryGetIntersectionTriangleVertexPositionsEXT) { + std::vector idImmOps; + + idImmOps.push_back(spv::IdImmediate(true, operands[0])); // q + idImmOps.push_back(spv::IdImmediate(true, operands[1])); // committed + + spv::Id typeId = builder.makeArrayType(builder.makeVectorType(builder.makeFloatType(32), 3), + builder.makeUintConstant(3), 0); + // do the op + + spv::Op spvOp = spv::OpRayQueryGetIntersectionTriangleVertexPositionsKHR; + + spv::Id result = builder.createOp(spvOp, typeId, idImmOps); + // store the result to the pointer (out param 'm') + builder.createStore(result, operands[2]); + result = 0; + } else if (node->getOp() == glslang::EOpCooperativeMatrixMulAdd) { + uint32_t matrixOperands = 0; + + // If the optional operand is present, initialize matrixOperands to that value. + if (glslangOperands.size() == 4 && glslangOperands[3]->getAsConstantUnion()) { + matrixOperands = glslangOperands[3]->getAsConstantUnion()->getConstArray()[0].getIConst(); + } + + // Determine Cooperative Matrix Operands bits from the signedness of the types. + if (isTypeSignedInt(glslangOperands[0]->getAsTyped()->getBasicType())) + matrixOperands |= spv::CooperativeMatrixOperandsMatrixASignedComponentsKHRMask; + if (isTypeSignedInt(glslangOperands[1]->getAsTyped()->getBasicType())) + matrixOperands |= spv::CooperativeMatrixOperandsMatrixBSignedComponentsKHRMask; + if (isTypeSignedInt(glslangOperands[2]->getAsTyped()->getBasicType())) + matrixOperands |= spv::CooperativeMatrixOperandsMatrixCSignedComponentsKHRMask; + if (isTypeSignedInt(node->getBasicType())) + matrixOperands |= spv::CooperativeMatrixOperandsMatrixResultSignedComponentsKHRMask; + + std::vector idImmOps; + idImmOps.push_back(spv::IdImmediate(true, operands[0])); + idImmOps.push_back(spv::IdImmediate(true, operands[1])); + idImmOps.push_back(spv::IdImmediate(true, operands[2])); + if (matrixOperands != 0) + idImmOps.push_back(spv::IdImmediate(false, matrixOperands)); + + result = builder.createOp(spv::OpCooperativeMatrixMulAddKHR, resultType(), idImmOps); + } else if (atomic) { // Handle all atomics glslang::TBasicType typeProxy = (node->getOp() == glslang::EOpAtomicStore) ? node->getSequence()[0]->getAsTyped()->getBasicType() : node->getBasicType(); result = createAtomicOperation(node->getOp(), precision, resultType(), operands, typeProxy, lvalueCoherentFlags); -#ifndef GLSLANG_WEB } else if (node->getOp() == glslang::EOpSpirvInst) { const auto& spirvInst = node->getSpirvInstruction(); if (spirvInst.set == "") { @@ -3560,7 +3766,6 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt spirvInst.id, operands); } noReturnValue = node->getBasicType() == glslang::EbtVoid; -#endif } else if (node->getOp() == glslang::EOpDebugPrintf) { if (!nonSemanticDebugPrintf) { nonSemanticDebugPrintf = builder.import("NonSemantic.DebugPrintf"); @@ -3677,10 +3882,11 @@ bool TGlslangToSpvTraverser::visitSelection(glslang::TVisit /* visit */, glslang // Find a way of executing both sides and selecting the right result. const auto executeBothSides = [&]() -> void { // execute both sides + spv::Id resultType = convertGlslangToSpvType(node->getType()); node->getTrueBlock()->traverse(this); spv::Id trueValue = accessChainLoad(node->getTrueBlock()->getAsTyped()->getType()); node->getFalseBlock()->traverse(this); - spv::Id falseValue = accessChainLoad(node->getTrueBlock()->getAsTyped()->getType()); + spv::Id falseValue = accessChainLoad(node->getFalseBlock()->getAsTyped()->getType()); builder.setLine(node->getLoc().line, node->getLoc().getFilename()); @@ -3689,8 +3895,8 @@ bool TGlslangToSpvTraverser::visitSelection(glslang::TVisit /* visit */, glslang return; // emit code to select between trueValue and falseValue - - // see if OpSelect can handle it + // see if OpSelect can handle the result type, and that the SPIR-V types + // of the inputs match the result type. if (isOpSelectable()) { // Emit OpSelect for this selection. @@ -3702,10 +3908,18 @@ bool TGlslangToSpvTraverser::visitSelection(glslang::TVisit /* visit */, glslang builder.getNumComponents(trueValue))); } + // If the types do not match, it is because of mismatched decorations on aggregates. + // Since isOpSelectable only lets us get here for SPIR-V >= 1.4, we can use OpCopyObject + // to get matching types. + if (builder.getTypeId(trueValue) != resultType) { + trueValue = builder.createUnaryOp(spv::OpCopyLogical, resultType, trueValue); + } + if (builder.getTypeId(falseValue) != resultType) { + falseValue = builder.createUnaryOp(spv::OpCopyLogical, resultType, falseValue); + } + // OpSelect - result = builder.createTriOp(spv::OpSelect, - convertGlslangToSpvType(node->getType()), condition, - trueValue, falseValue); + result = builder.createTriOp(spv::OpSelect, resultType, condition, trueValue, falseValue); builder.clearAccessChain(); builder.setAccessChainRValue(result); @@ -3713,7 +3927,7 @@ bool TGlslangToSpvTraverser::visitSelection(glslang::TVisit /* visit */, glslang // We need control flow to select the result. // TODO: Once SPIR-V OpSelect allows arbitrary types, eliminate this path. result = builder.createVariable(TranslatePrecisionDecoration(node->getType()), - spv::StorageClassFunction, convertGlslangToSpvType(node->getType())); + spv::StorageClassFunction, resultType); // Selection control: const spv::SelectionControlMask control = TranslateSelectionControl(*node); @@ -3722,10 +3936,15 @@ bool TGlslangToSpvTraverser::visitSelection(glslang::TVisit /* visit */, glslang spv::Builder::If ifBuilder(condition, control, builder); // emit the "then" statement - builder.createStore(trueValue, result); + builder.clearAccessChain(); + builder.setAccessChainLValue(result); + multiTypeStore(node->getType(), trueValue); + ifBuilder.makeBeginElse(); // emit the "else" statement - builder.createStore(falseValue, result); + builder.clearAccessChain(); + builder.setAccessChainLValue(result); + multiTypeStore(node->getType(), falseValue); // finish off the control flow ifBuilder.makeEndIf(); @@ -3752,16 +3971,26 @@ bool TGlslangToSpvTraverser::visitSelection(glslang::TVisit /* visit */, glslang // emit the "then" statement if (node->getTrueBlock() != nullptr) { node->getTrueBlock()->traverse(this); - if (result != spv::NoResult) - builder.createStore(accessChainLoad(node->getTrueBlock()->getAsTyped()->getType()), result); + if (result != spv::NoResult) { + spv::Id load = accessChainLoad(node->getTrueBlock()->getAsTyped()->getType()); + + builder.clearAccessChain(); + builder.setAccessChainLValue(result); + multiTypeStore(node->getType(), load); + } } if (node->getFalseBlock() != nullptr) { ifBuilder.makeBeginElse(); // emit the "else" statement node->getFalseBlock()->traverse(this); - if (result != spv::NoResult) - builder.createStore(accessChainLoad(node->getFalseBlock()->getAsTyped()->getType()), result); + if (result != spv::NoResult) { + spv::Id load = accessChainLoad(node->getFalseBlock()->getAsTyped()->getType()); + + builder.clearAccessChain(); + builder.setAccessChainLValue(result); + multiTypeStore(node->getType(), load); + } } // finish off the control flow @@ -3841,10 +4070,8 @@ bool TGlslangToSpvTraverser::visitSwitch(glslang::TVisit /* visit */, glslang::T void TGlslangToSpvTraverser::visitConstantUnion(glslang::TIntermConstantUnion* node) { -#ifndef GLSLANG_WEB if (node->getQualifier().isSpirvLiteral()) return; // Translated to a literal value, skip further processing -#endif int nextConst = 0; spv::Id constant = createSpvConstantFromConstUnionArray(node->getType(), node->getConstArray(), nextConst, false); @@ -3975,7 +4202,6 @@ bool TGlslangToSpvTraverser::visitBranch(glslang::TVisit /* visit */, glslang::T builder.clearAccessChain(); break; -#ifndef GLSLANG_WEB case glslang::EOpDemote: builder.createNoResultOp(spv::OpDemoteToHelperInvocationEXT); builder.addExtension(spv::E_SPV_EXT_demote_to_helper_invocation); @@ -3987,7 +4213,6 @@ bool TGlslangToSpvTraverser::visitBranch(glslang::TVisit /* visit */, glslang::T case glslang::EOpIgnoreIntersectionKHR: builder.makeStatementTerminator(spv::OpIgnoreIntersectionKHR, "post-ignoreIntersectionKHR"); break; -#endif default: assert(0); @@ -4029,7 +4254,6 @@ spv::Id TGlslangToSpvTraverser::createSpvVariable(const glslang::TIntermSymbol* else builder.addCapability(spv::CapabilityStorageUniform16); break; -#ifndef GLSLANG_WEB case spv::StorageClassPushConstant: builder.addIncorporatedExtension(spv::E_SPV_KHR_16bit_storage, spv::Spv_1_3); builder.addCapability(spv::CapabilityStoragePushConstant16); @@ -4039,7 +4263,6 @@ spv::Id TGlslangToSpvTraverser::createSpvVariable(const glslang::TIntermSymbol* builder.addIncorporatedExtension(spv::E_SPV_KHR_16bit_storage, spv::Spv_1_3); builder.addCapability(spv::CapabilityStorageUniformBufferBlock16); break; -#endif default: if (storageClass == spv::StorageClassWorkgroup && node->getType().getBasicType() == glslang::EbtBlock) { @@ -4098,7 +4321,6 @@ spv::Id TGlslangToSpvTraverser::getSampledType(const glslang::TSampler& sampler) case glslang::EbtInt: return builder.makeIntType(32); case glslang::EbtUint: return builder.makeUintType(32); case glslang::EbtFloat: return builder.makeFloatType(32); -#ifndef GLSLANG_WEB case glslang::EbtFloat16: builder.addExtension(spv::E_SPV_AMD_gpu_shader_half_float_fetch); builder.addCapability(spv::CapabilityFloat16ImageAMD); @@ -4111,7 +4333,6 @@ spv::Id TGlslangToSpvTraverser::getSampledType(const glslang::TSampler& sampler) builder.addExtension(spv::E_SPV_EXT_shader_image_int64); builder.addCapability(spv::CapabilityInt64ImageEXT); return builder.makeUintType(64); -#endif default: assert(0); return builder.makeFloatType(32); @@ -4156,6 +4377,16 @@ spv::Id TGlslangToSpvTraverser::convertGlslangToSpvType(const glslang::TType& ty return convertGlslangToSpvType(type, getExplicitLayout(type), type.getQualifier(), false, forwardReferenceOnly); } +spv::LinkageType TGlslangToSpvTraverser::convertGlslangLinkageToSpv(glslang::TLinkType linkType) +{ + switch (linkType) { + case glslang::ELinkExport: + return spv::LinkageTypeExport; + default: + return spv::LinkageTypeMax; + } +} + // Do full recursive conversion of an arbitrary glslang type to a SPIR-V Id. // explicitLayout can be kept the same throughout the hierarchical recursive walk. // Mutually recursive with convertGlslangStructToSpvType(). @@ -4176,7 +4407,7 @@ spv::Id TGlslangToSpvTraverser::convertGlslangToSpvType(const glslang::TType& ty if (explicitLayout != glslang::ElpNone) spvType = builder.makeUintType(32); else - spvType = builder.makeBoolType(false); + spvType = builder.makeBoolType(); break; case glslang::EbtInt: spvType = builder.makeIntType(32); @@ -4187,7 +4418,6 @@ spv::Id TGlslangToSpvTraverser::convertGlslangToSpvType(const glslang::TType& ty case glslang::EbtFloat: spvType = builder.makeFloatType(32); break; -#ifndef GLSLANG_WEB case glslang::EbtDouble: spvType = builder.makeFloatType(64); break; @@ -4265,7 +4495,6 @@ spv::Id TGlslangToSpvTraverser::convertGlslangToSpvType(const glslang::TType& ty } } break; -#endif case glslang::EbtSampler: { const glslang::TSampler& sampler = type.getSampler(); @@ -4307,7 +4536,13 @@ spv::Id TGlslangToSpvTraverser::convertGlslangToSpvType(const glslang::TType& ty case glslang::EbtString: // no type used for OpString return 0; -#ifndef GLSLANG_WEB + + case glslang::EbtHitObjectNV: { + builder.addExtension(spv::E_SPV_NV_shader_invocation_reorder); + builder.addCapability(spv::CapabilityShaderInvocationReorderNV); + spvType = builder.makeHitObjectNVType(); + } + break; case glslang::EbtSpirvType: { // GL_EXT_spirv_intrinsics const auto& spirvType = type.getSpirvType(); @@ -4315,50 +4550,57 @@ spv::Id TGlslangToSpvTraverser::convertGlslangToSpvType(const glslang::TType& ty 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; - static_assert(sizeof(literal) == sizeof(floatValue), "sizeof(unsigned) != sizeof(float)"); - memcpy(&literal, &floatValue, sizeof(literal)); - 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); - - // Partial literal is padded with 0 - if (charCount > 0) { - for (; charCount < 4; ++charCount) - *(literalPtr++) = 0; + if (typeParam.getAsConstant() != nullptr) { + // Constant expression + auto constant = typeParam.getAsConstant(); + if (constant->isLiteral()) { + if (constant->getBasicType() == glslang::EbtFloat) { + float floatValue = static_cast(constant->getConstArray()[0].getDConst()); + unsigned literal; + static_assert(sizeof(literal) == sizeof(floatValue), "sizeof(unsigned) != sizeof(float)"); + memcpy(&literal, &floatValue, sizeof(literal)); operands.push_back({false, literal}); - } + } else if (constant->getBasicType() == glslang::EbtInt) { + unsigned literal = constant->getConstArray()[0].getIConst(); + operands.push_back({false, literal}); + } else if (constant->getBasicType() == glslang::EbtUint) { + unsigned literal = constant->getConstArray()[0].getUConst(); + operands.push_back({false, literal}); + } else if (constant->getBasicType() == glslang::EbtBool) { + unsigned literal = constant->getConstArray()[0].getBConst(); + operands.push_back({false, literal}); + } else if (constant->getBasicType() == glslang::EbtString) { + auto str = 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); + + // 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 - assert(0); // Unexpected type - } else - operands.push_back({true, createSpvConstant(*typeParam.constant)}); + operands.push_back({true, createSpvConstant(*constant)}); + } else { + // Type specifier + assert(typeParam.getAsType() != nullptr); + operands.push_back({true, convertGlslangToSpvType(*typeParam.getAsType())}); + } } assert(spirvInst.set == ""); // Currently, couldn't be extended instructions. @@ -4366,7 +4608,6 @@ spv::Id TGlslangToSpvTraverser::convertGlslangToSpvType(const glslang::TType& ty break; } -#endif default: assert(0); break; @@ -4380,9 +4621,10 @@ spv::Id TGlslangToSpvTraverser::convertGlslangToSpvType(const glslang::TType& ty spvType = builder.makeVectorType(spvType, type.getVectorSize()); } - if (type.isCoopMat()) { + if (type.isCoopMatNV()) { builder.addCapability(spv::CapabilityCooperativeMatrixNV); builder.addExtension(spv::E_SPV_NV_cooperative_matrix); + if (type.getBasicType() == glslang::EbtFloat16) builder.addCapability(spv::CapabilityFloat16); if (type.getBasicType() == glslang::EbtUint8 || @@ -4390,11 +4632,29 @@ spv::Id TGlslangToSpvTraverser::convertGlslangToSpvType(const glslang::TType& ty builder.addCapability(spv::CapabilityInt8); } - spv::Id scope = makeArraySizeId(*type.getTypeParameters(), 1); - spv::Id rows = makeArraySizeId(*type.getTypeParameters(), 2); - spv::Id cols = makeArraySizeId(*type.getTypeParameters(), 3); + spv::Id scope = makeArraySizeId(*type.getTypeParameters()->arraySizes, 1); + spv::Id rows = makeArraySizeId(*type.getTypeParameters()->arraySizes, 2); + spv::Id cols = makeArraySizeId(*type.getTypeParameters()->arraySizes, 3); - spvType = builder.makeCooperativeMatrixType(spvType, scope, rows, cols); + spvType = builder.makeCooperativeMatrixTypeNV(spvType, scope, rows, cols); + } + + if (type.isCoopMatKHR()) { + builder.addCapability(spv::CapabilityCooperativeMatrixKHR); + builder.addExtension(spv::E_SPV_KHR_cooperative_matrix); + + if (type.getBasicType() == glslang::EbtFloat16) + builder.addCapability(spv::CapabilityFloat16); + if (type.getBasicType() == glslang::EbtUint8 || type.getBasicType() == glslang::EbtInt8) { + builder.addCapability(spv::CapabilityInt8); + } + + spv::Id scope = makeArraySizeId(*type.getTypeParameters()->arraySizes, 0); + spv::Id rows = makeArraySizeId(*type.getTypeParameters()->arraySizes, 1); + spv::Id cols = makeArraySizeId(*type.getTypeParameters()->arraySizes, 2); + spv::Id use = builder.makeUintConstant(type.getCoopMatKHRuse()); + + spvType = builder.makeCooperativeMatrixTypeKHR(spvType, scope, rows, cols, use); } if (type.isArray()) { @@ -4435,12 +4695,10 @@ spv::Id TGlslangToSpvTraverser::convertGlslangToSpvType(const glslang::TType& ty if (type.isSizedArray()) spvType = builder.makeArrayType(spvType, makeArraySizeId(*type.getArraySizes(), 0), stride); else { -#ifndef GLSLANG_WEB if (!lastBufferBlockMember) { builder.addIncorporatedExtension("SPV_EXT_descriptor_indexing", spv::Spv_1_5); builder.addCapability(spv::CapabilityRuntimeDescriptorArrayEXT); } -#endif spvType = builder.makeRuntimeArray(spvType); } if (stride > 0) @@ -4450,13 +4708,70 @@ spv::Id TGlslangToSpvTraverser::convertGlslangToSpvType(const glslang::TType& ty return spvType; } +// Apply SPIR-V decorations to the SPIR-V object (provided by SPIR-V ID). If member index is provided, the +// decorations are applied to this member. +void TGlslangToSpvTraverser::applySpirvDecorate(const glslang::TType& type, spv::Id id, std::optional member) +{ + assert(type.getQualifier().hasSpirvDecorate()); + + const glslang::TSpirvDecorate& spirvDecorate = type.getQualifier().getSpirvDecorate(); + + // Add spirv_decorate + for (auto& decorate : spirvDecorate.decorates) { + if (!decorate.second.empty()) { + std::vector literals; + TranslateLiterals(decorate.second, literals); + if (member.has_value()) + builder.addMemberDecoration(id, *member, static_cast(decorate.first), literals); + else + builder.addDecoration(id, static_cast(decorate.first), literals); + } else { + if (member.has_value()) + builder.addMemberDecoration(id, *member, static_cast(decorate.first)); + else + builder.addDecoration(id, static_cast(decorate.first)); + } + } + + // Add spirv_decorate_id + if (member.has_value()) { + // spirv_decorate_id not applied to members + assert(spirvDecorate.decorateIds.empty()); + } else { + for (auto& decorateId : spirvDecorate.decorateIds) { + std::vector operandIds; + assert(!decorateId.second.empty()); + for (auto extraOperand : decorateId.second) { + if (extraOperand->getQualifier().isFrontEndConstant()) + operandIds.push_back(createSpvConstant(*extraOperand)); + else + operandIds.push_back(getSymbolId(extraOperand->getAsSymbolNode())); + } + builder.addDecorationId(id, static_cast(decorateId.first), operandIds); + } + } + + // Add spirv_decorate_string + for (auto& decorateString : spirvDecorate.decorateStrings) { + std::vector strings; + assert(!decorateString.second.empty()); + for (auto extraOperand : decorateString.second) { + const char* string = extraOperand->getConstArray()[0].getSConst()->c_str(); + strings.push_back(string); + } + if (member.has_value()) + builder.addMemberDecoration(id, *member, static_cast(decorateString.first), strings); + else + builder.addDecoration(id, static_cast(decorateString.first), strings); + } +} + // TODO: this functionality should exist at a higher level, in creating the AST // // Identify interface members that don't have their required extension turned on. // bool TGlslangToSpvTraverser::filterMember(const glslang::TType& member) { -#ifndef GLSLANG_WEB auto& extensions = glslangIntermediate->getRequestedExtensions(); if (member.getFieldName() == "gl_SecondaryViewportMaskNV" && @@ -4466,6 +4781,12 @@ bool TGlslangToSpvTraverser::filterMember(const glslang::TType& member) extensions.find("GL_NV_stereo_view_rendering") == extensions.end()) return true; + if (glslangIntermediate->getStage() == EShLangMesh) { + if (member.getFieldName() == "gl_PrimitiveShadingRateEXT" && + extensions.find("GL_EXT_fragment_shading_rate") == extensions.end()) + return true; + } + if (glslangIntermediate->getStage() != EShLangMesh) { if (member.getFieldName() == "gl_ViewportMask" && extensions.find("GL_NV_viewport_array2") == extensions.end()) @@ -4477,7 +4798,6 @@ bool TGlslangToSpvTraverser::filterMember(const glslang::TType& member) extensions.find("GL_NVX_multiview_per_view_attributes") == extensions.end()) return true; } -#endif return false; }; @@ -4558,7 +4878,7 @@ spv::Id TGlslangToSpvTraverser::convertGlslangStructToSpvType(const glslang::TTy structMap[explicitLayout][qualifier.layoutMatrix][glslangMembers] = spvType; // Decorate it - decorateStructType(type, glslangMembers, explicitLayout, qualifier, spvType); + decorateStructType(type, glslangMembers, explicitLayout, qualifier, spvType, spvMembers); for (int i = 0; i < (int)deferredForwardPointers.size(); ++i) { auto it = deferredForwardPointers[i]; @@ -4572,7 +4892,8 @@ void TGlslangToSpvTraverser::decorateStructType(const glslang::TType& type, const glslang::TTypeList* glslangMembers, glslang::TLayoutPacking explicitLayout, const glslang::TQualifier& qualifier, - spv::Id spvType) + spv::Id spvType, + const std::vector& spvMembers) { // Name and decorate the non-hidden members int offset = -1; @@ -4607,14 +4928,11 @@ void TGlslangToSpvTraverser::decorateStructType(const glslang::TType& type, glslangIntermediate->getSource() == glslang::EShSourceHlsl) { builder.addMemberDecoration(spvType, member, TranslateInterpolationDecoration(memberQualifier)); builder.addMemberDecoration(spvType, member, TranslateAuxiliaryStorageDecoration(memberQualifier)); -#ifndef GLSLANG_WEB addMeshNVDecoration(spvType, member, memberQualifier); -#endif } } builder.addMemberDecoration(spvType, member, TranslateInvariantDecoration(memberQualifier)); -#ifndef GLSLANG_WEB if (type.getBasicType() == glslang::EbtBlock && qualifier.storage == glslang::EvqBuffer) { // Add memory decorations only to top-level members of shader storage block @@ -4624,8 +4942,6 @@ void TGlslangToSpvTraverser::decorateStructType(const glslang::TType& type, builder.addMemberDecoration(spvType, member, memory[i]); } -#endif - // Location assignment was already completed correctly by the front end, // just track whether a member needs to be decorated. // Ignore member locations if the container is an array, as that's @@ -4658,7 +4974,6 @@ void TGlslangToSpvTraverser::decorateStructType(const glslang::TType& type, if (builtIn != spv::BuiltInMax) builder.addMemberDecoration(spvType, member, spv::DecorationBuiltIn, (int)builtIn); -#ifndef GLSLANG_WEB // nonuniform builder.addMemberDecoration(spvType, member, TranslateNonUniformDecoration(glslangMember.getQualifier())); @@ -4689,50 +5004,33 @@ void TGlslangToSpvTraverser::decorateStructType(const glslang::TType& type, builder.addExtension(spv::E_SPV_NV_geometry_shader_passthrough); } - // - // Add SPIR-V decorations for members (GL_EXT_spirv_intrinsics) - // - if (glslangMember.getQualifier().hasSprivDecorate()) { - const glslang::TSpirvDecorate& spirvDecorate = glslangMember.getQualifier().getSpirvDecorate(); - - // Add spirv_decorate - for (auto& decorate : spirvDecorate.decorates) { - if (!decorate.second.empty()) { - std::vector literals; - TranslateLiterals(decorate.second, literals); - builder.addMemberDecoration(spvType, member, static_cast(decorate.first), literals); - } - else - builder.addMemberDecoration(spvType, member, static_cast(decorate.first)); - } - - // spirv_decorate_id not applied to members - assert(spirvDecorate.decorateIds.empty()); - - // Add spirv_decorate_string - for (auto& decorateString : spirvDecorate.decorateStrings) { - std::vector strings; - assert(!decorateString.second.empty()); - for (auto extraOperand : decorateString.second) { - const char* string = extraOperand->getConstArray()[0].getSConst()->c_str(); - strings.push_back(string); - } - builder.addDecoration(spvType, static_cast(decorateString.first), strings); - } - } -#endif + // Add SPIR-V decorations (GL_EXT_spirv_intrinsics) + if (glslangMember.getQualifier().hasSpirvDecorate()) + applySpirvDecorate(glslangMember, spvType, member); } // Decorate the structure builder.addDecoration(spvType, TranslateLayoutDecoration(type, qualifier.layoutMatrix)); - builder.addDecoration(spvType, TranslateBlockDecoration(type, glslangIntermediate->usingStorageBuffer())); + const auto basicType = type.getBasicType(); + const auto typeStorageQualifier = type.getQualifier().storage; + if (basicType == glslang::EbtBlock) { + builder.addDecoration(spvType, TranslateBlockDecoration(typeStorageQualifier, glslangIntermediate->usingStorageBuffer())); + } else if (basicType == glslang::EbtStruct && glslangIntermediate->getSpv().vulkan > 0) { + const auto hasRuntimeArray = !spvMembers.empty() && builder.getOpCode(spvMembers.back()) == spv::OpTypeRuntimeArray; + if (hasRuntimeArray) { + builder.addDecoration(spvType, TranslateBlockDecoration(typeStorageQualifier, glslangIntermediate->usingStorageBuffer())); + } + } + + if (qualifier.hasHitObjectShaderRecordNV()) + builder.addDecoration(spvType, spv::DecorationHitObjectShaderRecordBufferNV); } // Turn the expression forming the array size into an id. // This is not quite trivial, because of specialization constants. // Sometimes, a raw constant is turned into an Id, and sometimes // a specialization constant expression is. -spv::Id TGlslangToSpvTraverser::makeArraySizeId(const glslang::TArraySizes& arraySizes, int dim) +spv::Id TGlslangToSpvTraverser::makeArraySizeId(const glslang::TArraySizes& arraySizes, int dim, bool allowZero) { // First, see if this is sized with a node, meaning a specialization constant: glslang::TIntermTyped* specNode = arraySizes.getDimNode(dim); @@ -4746,7 +5044,10 @@ spv::Id TGlslangToSpvTraverser::makeArraySizeId(const glslang::TArraySizes& arra // Otherwise, need a compile-time (front end) size, get it: int size = arraySizes.getDimSize(dim); - assert(size > 0); + + if (!allowZero) + assert(size > 0); + return builder.makeUintConstant(size); } @@ -5051,7 +5352,6 @@ void TGlslangToSpvTraverser::declareUseOfStructMember(const glslang::TTypeList& switch (glslangBuiltIn) { case glslang::EbvPointSize: -#ifndef GLSLANG_WEB case glslang::EbvClipDistance: case glslang::EbvCullDistance: case glslang::EbvViewportMaskNV: @@ -5067,7 +5367,6 @@ void TGlslangToSpvTraverser::declareUseOfStructMember(const glslang::TTypeList& case glslang::EbvLayerPerViewNV: case glslang::EbvMeshViewCountNV: case glslang::EbvMeshViewIndicesNV: -#endif // Generate the associated capability. Delegate to TranslateBuiltInDecoration. // Alternately, we could just call this for any glslang built-in, since the // capability already guards against duplicates. @@ -5106,10 +5405,8 @@ bool TGlslangToSpvTraverser::originalParam(glslang::TStorageQualifier qualifier, return true; if (glslangIntermediate->getSource() == glslang::EShSourceHlsl) return paramType.getBasicType() == glslang::EbtBlock; - return paramType.containsOpaque() || // sampler, etc. -#ifndef GLSLANG_WEB + return (paramType.containsOpaque() && !glslangIntermediate->getBindlessMode()) || // sampler, etc. paramType.getQualifier().isSpirvByReference() || // spirv_by_reference -#endif (paramType.getBasicType() == glslang::EbtBlock && qualifier == glslang::EvqBuffer); // SSBO } @@ -5139,9 +5436,17 @@ void TGlslangToSpvTraverser::makeFunctions(const glslang::TIntermSequence& glslF for (int f = 0; f < (int)glslFunctions.size(); ++f) { glslang::TIntermAggregate* glslFunction = glslFunctions[f]->getAsAggregate(); - if (! glslFunction || glslFunction->getOp() != glslang::EOpFunction || isShaderEntryPoint(glslFunction)) + if (! glslFunction || glslFunction->getOp() != glslang::EOpFunction) continue; - + if (isShaderEntryPoint(glslFunction)) { + if (glslangIntermediate->getSource() != glslang::EShSourceHlsl) { + builder.setupDebugFunctionEntry(shaderEntry, glslangIntermediate->getEntryPointMangledName().c_str(), + glslFunction->getLoc().line, + std::vector(), // main function has no param + std::vector()); + } + continue; + } // We're on a user function. Set up the basic interface for the function now, // so that it's available to call. Translating the body will happen later. // @@ -5187,10 +5492,12 @@ void TGlslangToSpvTraverser::makeFunctions(const glslang::TIntermSequence& glslF } spv::Block* functionBlock; - spv::Function *function = builder.makeFunctionEntry(TranslatePrecisionDecoration(glslFunction->getType()), - convertGlslangToSpvType(glslFunction->getType()), - glslFunction->getName().c_str(), paramTypes, paramNames, - paramDecorations, &functionBlock); + spv::Function* function = builder.makeFunctionEntry( + TranslatePrecisionDecoration(glslFunction->getType()), convertGlslangToSpvType(glslFunction->getType()), + glslFunction->getName().c_str(), convertGlslangLinkageToSpv(glslFunction->getLinkType()), paramTypes, + paramDecorations, &functionBlock); + builder.setupDebugFunctionEntry(function, glslFunction->getName().c_str(), glslFunction->getLoc().line, + paramTypes, paramNames); if (implicitThis) function->setImplicitThis(); @@ -5253,6 +5560,10 @@ void TGlslangToSpvTraverser::collectRayTracingLinkerObjects() set = 1; break; + case glslang::EvqHitObjectAttrNV: + set = 2; + break; + default: set = -1; } @@ -5289,23 +5600,18 @@ void TGlslangToSpvTraverser::translateArguments(const glslang::TIntermAggregate& glslang::TSampler sampler = {}; bool cubeCompare = false; -#ifndef GLSLANG_WEB bool f16ShadowCompare = false; -#endif if (node.isTexture() || node.isImage()) { sampler = glslangArguments[0]->getAsTyped()->getType().getSampler(); cubeCompare = sampler.dim == glslang::EsdCube && sampler.arrayed && sampler.shadow; -#ifndef GLSLANG_WEB f16ShadowCompare = sampler.shadow && glslangArguments[1]->getAsTyped()->getType().getBasicType() == glslang::EbtFloat16; -#endif } for (int i = 0; i < (int)glslangArguments.size(); ++i) { builder.clearAccessChain(); glslangArguments[i]->traverse(this); -#ifndef GLSLANG_WEB // Special case l-value operands bool lvalue = false; switch (node.getOp()) { @@ -5401,6 +5707,10 @@ void TGlslangToSpvTraverser::translateArguments(const glslang::TIntermAggregate& if (i == 7) lvalue = true; break; + case glslang::EOpRayQueryGetIntersectionTriangleVertexPositionsEXT: + if (i == 2) + lvalue = true; + break; default: break; } @@ -5412,7 +5722,6 @@ void TGlslangToSpvTraverser::translateArguments(const glslang::TIntermAggregate& builder.addDecoration(lvalue_id, TranslateNonUniformDecoration(lvalueCoherentFlags)); lvalueCoherentFlags |= TranslateCoherent(glslangArguments[i]->getAsTyped()->getType()); } else -#endif arguments.push_back(accessChainLoad(glslangArguments[i]->getAsTyped()->getType())); } } @@ -5437,13 +5746,9 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO ? node->getAsAggregate()->getSequence()[0]->getAsTyped()->getType() : node->getAsUnaryNode()->getOperand()->getAsTyped()->getType(); const glslang::TSampler sampler = imageType.getSampler(); -#ifdef GLSLANG_WEB - const bool f16ShadowCompare = false; -#else bool f16ShadowCompare = (sampler.shadow && node->getAsAggregate()) ? node->getAsAggregate()->getSequence()[1]->getAsTyped()->getType().getBasicType() == glslang::EbtFloat16 : false; -#endif const auto signExtensionMask = [&]() { if (builder.getSpvVersion() >= spv::Spv_1_4) { @@ -5489,7 +5794,6 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO return builder.createTextureQueryCall(spv::OpImageQuerySizeLod, params, isUnsignedResult); } else return builder.createTextureQueryCall(spv::OpImageQuerySize, params, isUnsignedResult); -#ifndef GLSLANG_WEB case glslang::EOpImageQuerySamples: case glslang::EOpTextureQuerySamples: return builder.createTextureQueryCall(spv::OpImageQuerySamples, params, isUnsignedResult); @@ -5500,7 +5804,6 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO return builder.createTextureQueryCall(spv::OpImageQueryLevels, params, isUnsignedResult); case glslang::EOpSparseTexelsResident: return builder.createUnaryOp(spv::OpImageSparseTexelsResident, builder.makeBoolType(), arguments[0]); -#endif default: assert(0); break; @@ -5560,6 +5863,17 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO return result; } + if (cracked.attachmentEXT) { + if (opIt != arguments.end()) { + spv::IdImmediate sample = { true, *opIt }; + operands.push_back(sample); + } + spv::Id result = builder.createOp(spv::OpColorAttachmentReadEXT, resultType(), operands); + builder.addExtension(spv::E_SPV_EXT_shader_tile_image); + builder.setPrecision(result, precision); + return result; + } + spv::IdImmediate coord = { true, *(opIt++) }; operands.push_back(coord); if (node->getOp() == glslang::EOpImageLoad || node->getOp() == glslang::EOpImageLoadLod) { @@ -5731,7 +6045,6 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO } } -#ifndef GLSLANG_WEB // Check for fragment mask functions other than queries if (cracked.fragMask) { assert(sampler.ms); @@ -5765,7 +6078,6 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO builder.addCapability(spv::CapabilityFragmentMaskAMD); return builder.createOp(fragMaskOp, resultType(), operands); } -#endif // Check for texture functions other than queries bool sparse = node->isSparseTexture(); @@ -5799,7 +6111,6 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO bias = true; } -#ifndef GLSLANG_WEB if (cracked.gather) { const auto& sourceExtensions = glslangIntermediate->getRequestedExtensions(); if (bias || cracked.lod || @@ -5808,7 +6119,6 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO builder.addCapability(spv::CapabilityImageGatherBiasLodAMD); } } -#endif // set the rest of the arguments @@ -5868,7 +6178,6 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO ++extraArgs; } -#ifndef GLSLANG_WEB // lod clamp if (cracked.lodClamp) { params.lodClamp = arguments[2 + extraArgs]; @@ -5897,14 +6206,13 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO resultStruct = arguments[4 + extraArgs]; extraArgs += 3; } -#endif + // bias if (bias) { params.bias = arguments[2 + extraArgs]; ++extraArgs; } -#ifndef GLSLANG_WEB if (imageFootprint) { builder.addExtension(spv::E_SPV_NV_shader_image_footprint); builder.addCapability(spv::CapabilityImageFootprintNV); @@ -5962,7 +6270,6 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO } return builder.createCompositeExtract(res, resultType(), 0); } -#endif // projective component (might not to move) // GLSL: "The texture coordinates consumed from P, not including the last component of P, @@ -5987,7 +6294,6 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO } } -#ifndef GLSLANG_WEB // nonprivate if (imageType.getQualifier().nonprivate) { params.nonprivate = true; @@ -5997,7 +6303,6 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO if (imageType.getQualifier().volatil) { params.volatil = true; } -#endif std::vector result( 1, builder.createTextureCall(precision, resultType(), sparse, cracked.fetch, cracked.proj, cracked.gather, @@ -6651,7 +6956,6 @@ spv::Id TGlslangToSpvTraverser::createUnaryOperation(glslang::TOperator op, OpDe case glslang::EOpUnpackHalf2x16: libCall = spv::GLSLstd450UnpackHalf2x16; break; -#ifndef GLSLANG_WEB case glslang::EOpPackSnorm4x8: libCall = spv::GLSLstd450PackSnorm4x8; break; @@ -6670,7 +6974,6 @@ spv::Id TGlslangToSpvTraverser::createUnaryOperation(glslang::TOperator op, OpDe case glslang::EOpUnpackDouble2x32: libCall = spv::GLSLstd450UnpackDouble2x32; break; -#endif case glslang::EOpPackInt2x32: case glslang::EOpUnpackInt2x32: @@ -6725,7 +7028,6 @@ spv::Id TGlslangToSpvTraverser::createUnaryOperation(glslang::TOperator op, OpDe libCall = spv::GLSLstd450SSign; break; -#ifndef GLSLANG_WEB case glslang::EOpDPdxFine: unaryOp = spv::OpDPdxFine; break; @@ -6897,12 +7199,108 @@ spv::Id TGlslangToSpvTraverser::createUnaryOperation(glslang::TOperator op, OpDe case glslang::EOpConvUvec2ToAccStruct: unaryOp = spv::OpConvertUToAccelerationStructureKHR; break; -#endif + + case glslang::EOpHitObjectIsEmptyNV: + unaryOp = spv::OpHitObjectIsEmptyNV; + break; + + case glslang::EOpHitObjectIsMissNV: + unaryOp = spv::OpHitObjectIsMissNV; + break; + + case glslang::EOpHitObjectIsHitNV: + unaryOp = spv::OpHitObjectIsHitNV; + break; + + case glslang::EOpHitObjectGetObjectRayOriginNV: + unaryOp = spv::OpHitObjectGetObjectRayOriginNV; + break; + + case glslang::EOpHitObjectGetObjectRayDirectionNV: + unaryOp = spv::OpHitObjectGetObjectRayDirectionNV; + break; + + case glslang::EOpHitObjectGetWorldRayOriginNV: + unaryOp = spv::OpHitObjectGetWorldRayOriginNV; + break; + + case glslang::EOpHitObjectGetWorldRayDirectionNV: + unaryOp = spv::OpHitObjectGetWorldRayDirectionNV; + break; + + case glslang::EOpHitObjectGetObjectToWorldNV: + unaryOp = spv::OpHitObjectGetObjectToWorldNV; + break; + + case glslang::EOpHitObjectGetWorldToObjectNV: + unaryOp = spv::OpHitObjectGetWorldToObjectNV; + break; + + case glslang::EOpHitObjectGetRayTMinNV: + unaryOp = spv::OpHitObjectGetRayTMinNV; + break; + + case glslang::EOpHitObjectGetRayTMaxNV: + unaryOp = spv::OpHitObjectGetRayTMaxNV; + break; + + case glslang::EOpHitObjectGetPrimitiveIndexNV: + unaryOp = spv::OpHitObjectGetPrimitiveIndexNV; + break; + + case glslang::EOpHitObjectGetInstanceIdNV: + unaryOp = spv::OpHitObjectGetInstanceIdNV; + break; + + case glslang::EOpHitObjectGetInstanceCustomIndexNV: + unaryOp = spv::OpHitObjectGetInstanceCustomIndexNV; + break; + + case glslang::EOpHitObjectGetGeometryIndexNV: + unaryOp = spv::OpHitObjectGetGeometryIndexNV; + break; + + case glslang::EOpHitObjectGetHitKindNV: + unaryOp = spv::OpHitObjectGetHitKindNV; + break; + + case glslang::EOpHitObjectGetCurrentTimeNV: + unaryOp = spv::OpHitObjectGetCurrentTimeNV; + break; + + case glslang::EOpHitObjectGetShaderBindingTableRecordIndexNV: + unaryOp = spv::OpHitObjectGetShaderBindingTableRecordIndexNV; + break; + + case glslang::EOpHitObjectGetShaderRecordBufferHandleNV: + unaryOp = spv::OpHitObjectGetShaderRecordBufferHandleNV; + break; + + case glslang::EOpFetchMicroTriangleVertexPositionNV: + unaryOp = spv::OpFetchMicroTriangleVertexPositionNV; + break; + + case glslang::EOpFetchMicroTriangleVertexBarycentricNV: + unaryOp = spv::OpFetchMicroTriangleVertexBarycentricNV; + break; case glslang::EOpCopyObject: unaryOp = spv::OpCopyObject; break; + case glslang::EOpDepthAttachmentReadEXT: + builder.addExtension(spv::E_SPV_EXT_shader_tile_image); + builder.addCapability(spv::CapabilityTileImageDepthReadAccessEXT); + unaryOp = spv::OpDepthAttachmentReadEXT; + decorations.precision = spv::NoPrecision; + break; + case glslang::EOpStencilAttachmentReadEXT: + builder.addExtension(spv::E_SPV_EXT_shader_tile_image); + builder.addCapability(spv::CapabilityTileImageStencilReadAccessEXT); + unaryOp = spv::OpStencilAttachmentReadEXT; + decorations.precision = spv::DecorationRelaxedPrecision; + break; + default: return 0; } @@ -6959,7 +7357,9 @@ spv::Id TGlslangToSpvTraverser::createUnaryMatrixOperation(spv::Op op, OpDecorat // For converting integers where both the bitwidth and the signedness could // change, but only do the width change here. The caller is still responsible // for the signedness conversion. -spv::Id TGlslangToSpvTraverser::createIntWidthConversion(glslang::TOperator op, spv::Id operand, int vectorSize) +// destType is the final type that will be converted to, but this function +// may only be doing part of that conversion. +spv::Id TGlslangToSpvTraverser::createIntWidthConversion(glslang::TOperator op, spv::Id operand, int vectorSize, spv::Id destType) { // Get the result type width, based on the type to convert to. int width = 32; @@ -7030,6 +7430,11 @@ spv::Id TGlslangToSpvTraverser::createIntWidthConversion(glslang::TOperator op, if (vectorSize > 0) type = builder.makeVectorType(type, vectorSize); + else if (builder.getOpCode(destType) == spv::OpTypeCooperativeMatrixKHR || + builder.getOpCode(destType) == spv::OpTypeCooperativeMatrixNV) { + + type = builder.makeCooperativeMatrixTypeWithSameShape(type, destType); + } return builder.createUnaryOp(convOp, type, operand); } @@ -7061,13 +7466,10 @@ spv::Id TGlslangToSpvTraverser::createConversion(glslang::TOperator op, OpDecora case glslang::EOpConvBoolToInt: case glslang::EOpConvBoolToInt64: -#ifndef GLSLANG_WEB if (op == glslang::EOpConvBoolToInt64) { zero = builder.makeInt64Constant(0); one = builder.makeInt64Constant(1); - } else -#endif - { + } else { zero = builder.makeIntConstant(0); one = builder.makeIntConstant(1); } @@ -7077,13 +7479,10 @@ spv::Id TGlslangToSpvTraverser::createConversion(glslang::TOperator op, OpDecora case glslang::EOpConvBoolToUint: case glslang::EOpConvBoolToUint64: -#ifndef GLSLANG_WEB if (op == glslang::EOpConvBoolToUint64) { zero = builder.makeUint64Constant(0); one = builder.makeUint64Constant(1); - } else -#endif - { + } else { zero = builder.makeUintConstant(0); one = builder.makeUintConstant(1); } @@ -7146,16 +7545,13 @@ spv::Id TGlslangToSpvTraverser::createConversion(glslang::TOperator op, OpDecora case glslang::EOpConvInt64ToUint64: if (builder.isInSpecConstCodeGenMode()) { // Build zero scalar or vector for OpIAdd. -#ifndef GLSLANG_WEB if(op == glslang::EOpConvUint8ToInt8 || op == glslang::EOpConvInt8ToUint8) { zero = builder.makeUint8Constant(0); } else if (op == glslang::EOpConvUint16ToInt16 || op == glslang::EOpConvInt16ToUint16) { zero = builder.makeUint16Constant(0); } else if (op == glslang::EOpConvUint64ToInt64 || op == glslang::EOpConvInt64ToUint64) { zero = builder.makeUint64Constant(0); - } else -#endif - { + } else { zero = builder.makeUintConstant(0); } zero = makeSmearedConstant(zero, vectorSize); @@ -7182,7 +7578,6 @@ spv::Id TGlslangToSpvTraverser::createConversion(glslang::TOperator op, OpDecora convOp = spv::OpConvertFToU; break; -#ifndef GLSLANG_WEB case glslang::EOpConvInt8ToBool: case glslang::EOpConvUint8ToBool: zero = builder.makeUint8Constant(0); @@ -7302,7 +7697,7 @@ spv::Id TGlslangToSpvTraverser::createConversion(glslang::TOperator op, OpDecora case glslang::EOpConvUint64ToInt16: case glslang::EOpConvUint64ToInt: // OpSConvert/OpUConvert + OpBitCast - operand = createIntWidthConversion(op, operand, vectorSize); + operand = createIntWidthConversion(op, operand, vectorSize, destType); if (builder.isInSpecConstCodeGenMode()) { // Build zero scalar or vector for OpIAdd. @@ -7361,7 +7756,6 @@ spv::Id TGlslangToSpvTraverser::createConversion(glslang::TOperator op, OpDecora case glslang::EOpConvUvec2ToPtr: convOp = spv::OpBitcast; break; -#endif default: break; @@ -8353,7 +8747,6 @@ spv::Id TGlslangToSpvTraverser::createMiscOperation(glslang::TOperator op, spv:: } break; -#ifndef GLSLANG_WEB case glslang::EOpInterpolateAtSample: if (typeProxy == glslang::EbtFloat16) builder.addExtension(spv::E_SPV_AMD_gpu_shader_half_float); @@ -8635,10 +9028,157 @@ spv::Id TGlslangToSpvTraverser::createMiscOperation(glslang::TOperator op, spv:: case glslang::EOpSetMeshOutputsEXT: builder.createNoResultOp(spv::OpSetMeshOutputsEXT, operands); return 0; - case glslang::EOpCooperativeMatrixMulAdd: + case glslang::EOpCooperativeMatrixMulAddNV: opCode = spv::OpCooperativeMatrixMulAddNV; break; -#endif // GLSLANG_WEB + case glslang::EOpHitObjectTraceRayNV: + builder.createNoResultOp(spv::OpHitObjectTraceRayNV, operands); + return 0; + case glslang::EOpHitObjectTraceRayMotionNV: + builder.createNoResultOp(spv::OpHitObjectTraceRayMotionNV, operands); + return 0; + case glslang::EOpHitObjectRecordHitNV: + builder.createNoResultOp(spv::OpHitObjectRecordHitNV, operands); + return 0; + case glslang::EOpHitObjectRecordHitMotionNV: + builder.createNoResultOp(spv::OpHitObjectRecordHitMotionNV, operands); + return 0; + case glslang::EOpHitObjectRecordHitWithIndexNV: + builder.createNoResultOp(spv::OpHitObjectRecordHitWithIndexNV, operands); + return 0; + case glslang::EOpHitObjectRecordHitWithIndexMotionNV: + builder.createNoResultOp(spv::OpHitObjectRecordHitWithIndexMotionNV, operands); + return 0; + case glslang::EOpHitObjectRecordMissNV: + builder.createNoResultOp(spv::OpHitObjectRecordMissNV, operands); + return 0; + case glslang::EOpHitObjectRecordMissMotionNV: + builder.createNoResultOp(spv::OpHitObjectRecordMissMotionNV, operands); + return 0; + case glslang::EOpHitObjectExecuteShaderNV: + builder.createNoResultOp(spv::OpHitObjectExecuteShaderNV, operands); + return 0; + case glslang::EOpHitObjectIsEmptyNV: + typeId = builder.makeBoolType(); + opCode = spv::OpHitObjectIsEmptyNV; + break; + case glslang::EOpHitObjectIsMissNV: + typeId = builder.makeBoolType(); + opCode = spv::OpHitObjectIsMissNV; + break; + case glslang::EOpHitObjectIsHitNV: + typeId = builder.makeBoolType(); + opCode = spv::OpHitObjectIsHitNV; + break; + case glslang::EOpHitObjectGetRayTMinNV: + typeId = builder.makeFloatType(32); + opCode = spv::OpHitObjectGetRayTMinNV; + break; + case glslang::EOpHitObjectGetRayTMaxNV: + typeId = builder.makeFloatType(32); + opCode = spv::OpHitObjectGetRayTMaxNV; + break; + case glslang::EOpHitObjectGetObjectRayOriginNV: + typeId = builder.makeVectorType(builder.makeFloatType(32), 3); + opCode = spv::OpHitObjectGetObjectRayOriginNV; + break; + case glslang::EOpHitObjectGetObjectRayDirectionNV: + typeId = builder.makeVectorType(builder.makeFloatType(32), 3); + opCode = spv::OpHitObjectGetObjectRayDirectionNV; + break; + case glslang::EOpHitObjectGetWorldRayOriginNV: + typeId = builder.makeVectorType(builder.makeFloatType(32), 3); + opCode = spv::OpHitObjectGetWorldRayOriginNV; + break; + case glslang::EOpHitObjectGetWorldRayDirectionNV: + typeId = builder.makeVectorType(builder.makeFloatType(32), 3); + opCode = spv::OpHitObjectGetWorldRayDirectionNV; + break; + case glslang::EOpHitObjectGetWorldToObjectNV: + typeId = builder.makeMatrixType(builder.makeFloatType(32), 4, 3); + opCode = spv::OpHitObjectGetWorldToObjectNV; + break; + case glslang::EOpHitObjectGetObjectToWorldNV: + typeId = builder.makeMatrixType(builder.makeFloatType(32), 4, 3); + opCode = spv::OpHitObjectGetObjectToWorldNV; + break; + case glslang::EOpHitObjectGetInstanceCustomIndexNV: + typeId = builder.makeIntegerType(32, 1); + opCode = spv::OpHitObjectGetInstanceCustomIndexNV; + break; + case glslang::EOpHitObjectGetInstanceIdNV: + typeId = builder.makeIntegerType(32, 1); + opCode = spv::OpHitObjectGetInstanceIdNV; + break; + case glslang::EOpHitObjectGetGeometryIndexNV: + typeId = builder.makeIntegerType(32, 1); + opCode = spv::OpHitObjectGetGeometryIndexNV; + break; + case glslang::EOpHitObjectGetPrimitiveIndexNV: + typeId = builder.makeIntegerType(32, 1); + opCode = spv::OpHitObjectGetPrimitiveIndexNV; + break; + case glslang::EOpHitObjectGetHitKindNV: + typeId = builder.makeIntegerType(32, 0); + opCode = spv::OpHitObjectGetHitKindNV; + break; + case glslang::EOpHitObjectGetCurrentTimeNV: + typeId = builder.makeFloatType(32); + opCode = spv::OpHitObjectGetCurrentTimeNV; + break; + case glslang::EOpHitObjectGetShaderBindingTableRecordIndexNV: + typeId = builder.makeIntegerType(32, 0); + opCode = spv::OpHitObjectGetShaderBindingTableRecordIndexNV; + return 0; + case glslang::EOpHitObjectGetAttributesNV: + builder.createNoResultOp(spv::OpHitObjectGetAttributesNV, operands); + return 0; + case glslang::EOpHitObjectGetShaderRecordBufferHandleNV: + typeId = builder.makeVectorType(builder.makeUintType(32), 2); + opCode = spv::OpHitObjectGetShaderRecordBufferHandleNV; + break; + case glslang::EOpReorderThreadNV: { + if (operands.size() == 2) { + builder.createNoResultOp(spv::OpReorderThreadWithHintNV, operands); + } else { + builder.createNoResultOp(spv::OpReorderThreadWithHitObjectNV, operands); + } + return 0; + + } + + case glslang::EOpImageSampleWeightedQCOM: + typeId = builder.makeVectorType(builder.makeFloatType(32), 4); + opCode = spv::OpImageSampleWeightedQCOM; + addImageProcessingQCOMDecoration(operands[2], spv::DecorationWeightTextureQCOM); + break; + case glslang::EOpImageBoxFilterQCOM: + typeId = builder.makeVectorType(builder.makeFloatType(32), 4); + opCode = spv::OpImageBoxFilterQCOM; + break; + case glslang::EOpImageBlockMatchSADQCOM: + typeId = builder.makeVectorType(builder.makeFloatType(32), 4); + opCode = spv::OpImageBlockMatchSADQCOM; + addImageProcessingQCOMDecoration(operands[0], spv::DecorationBlockMatchTextureQCOM); + addImageProcessingQCOMDecoration(operands[2], spv::DecorationBlockMatchTextureQCOM); + break; + case glslang::EOpImageBlockMatchSSDQCOM: + typeId = builder.makeVectorType(builder.makeFloatType(32), 4); + opCode = spv::OpImageBlockMatchSSDQCOM; + addImageProcessingQCOMDecoration(operands[0], spv::DecorationBlockMatchTextureQCOM); + addImageProcessingQCOMDecoration(operands[2], spv::DecorationBlockMatchTextureQCOM); + break; + + case glslang::EOpFetchMicroTriangleVertexBarycentricNV: + typeId = builder.makeVectorType(builder.makeFloatType(32), 2); + opCode = spv::OpFetchMicroTriangleVertexBarycentricNV; + break; + + case glslang::EOpFetchMicroTriangleVertexPositionNV: + typeId = builder.makeVectorType(builder.makeFloatType(32), 3); + opCode = spv::OpFetchMicroTriangleVertexPositionNV; + break; + default: return 0; } @@ -8682,7 +9222,6 @@ spv::Id TGlslangToSpvTraverser::createMiscOperation(glslang::TOperator op, spv:: } } -#ifndef GLSLANG_WEB // Decode the return types that were structures switch (op) { case glslang::EOpAddCarry: @@ -8712,7 +9251,6 @@ spv::Id TGlslangToSpvTraverser::createMiscOperation(glslang::TOperator op, spv:: default: break; } -#endif return builder.setPrecision(id, precision); } @@ -8757,7 +9295,6 @@ spv::Id TGlslangToSpvTraverser::createNoArgOperation(glslang::TOperator op, spv: builder.createMemoryBarrier(spv::ScopeWorkgroup, spv::MemorySemanticsAllMemory | spv::MemorySemanticsAcquireReleaseMask); return 0; -#ifndef GLSLANG_WEB case glslang::EOpMemoryBarrierAtomicCounter: builder.createMemoryBarrier(memoryBarrierScope, spv::MemorySemanticsAtomicCounterMemoryMask | spv::MemorySemanticsAcquireReleaseMask); @@ -8876,7 +9413,30 @@ spv::Id TGlslangToSpvTraverser::createNoArgOperation(glslang::TOperator op, spv: builder.addCapability(spv::CapabilityShaderClockKHR); return builder.createOp(spv::OpReadClockKHR, typeId, args); } -#endif + case glslang::EOpStencilAttachmentReadEXT: + case glslang::EOpDepthAttachmentReadEXT: + { + builder.addExtension(spv::E_SPV_EXT_shader_tile_image); + + spv::Decoration precision; + spv::Op spv_op; + if (op == glslang::EOpStencilAttachmentReadEXT) + { + precision = spv::DecorationRelaxedPrecision; + spv_op = spv::OpStencilAttachmentReadEXT; + builder.addCapability(spv::CapabilityTileImageStencilReadAccessEXT); + } + else + { + precision = spv::NoPrecision; + spv_op = spv::OpDepthAttachmentReadEXT; + builder.addCapability(spv::CapabilityTileImageDepthReadAccessEXT); + } + + std::vector args; // Dummy args + spv::Id result = builder.createOp(spv_op, typeId, args); + return builder.setPrecision(result, precision); + } default: break; } @@ -8932,13 +9492,11 @@ spv::Id TGlslangToSpvTraverser::getSymbolId(const glslang::TIntermSymbol* symbol builder.addDecoration(id, TranslatePrecisionDecoration(symbol->getType())); builder.addDecoration(id, TranslateInterpolationDecoration(symbol->getType().getQualifier())); builder.addDecoration(id, TranslateAuxiliaryStorageDecoration(symbol->getType().getQualifier())); -#ifndef GLSLANG_WEB addMeshNVDecoration(id, /*member*/ -1, symbol->getType().getQualifier()); if (symbol->getQualifier().hasComponent()) builder.addDecoration(id, spv::DecorationComponent, symbol->getQualifier().layoutComponent); if (symbol->getQualifier().hasIndex()) builder.addDecoration(id, spv::DecorationIndex, symbol->getQualifier().layoutIndex); -#endif if (symbol->getType().getQualifier().hasSpecConstantId()) builder.addDecoration(id, spv::DecorationSpecId, symbol->getType().getQualifier().layoutSpecConstantId); // atomic counters use this: @@ -8947,13 +9505,17 @@ spv::Id TGlslangToSpvTraverser::getSymbolId(const glslang::TIntermSymbol* symbol } if (symbol->getQualifier().hasLocation()) { - if (!(glslangIntermediate->isRayTracingStage() && glslangIntermediate->IsRequestedExtension(glslang::E_GL_EXT_ray_tracing) + if (!(glslangIntermediate->isRayTracingStage() && + (glslangIntermediate->IsRequestedExtension(glslang::E_GL_EXT_ray_tracing) || + glslangIntermediate->IsRequestedExtension(glslang::E_GL_NV_shader_invocation_reorder)) && (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.getStorageClass(id) == spv::StorageClassIncomingCallableDataKHR || + builder.getStorageClass(id) == spv::StorageClassHitObjectAttributeNV))) { + // Location values are used to link TraceRayKHR/ExecuteCallableKHR/HitObjectGetAttributesNV + // 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); } } @@ -9004,7 +9566,6 @@ spv::Id TGlslangToSpvTraverser::getSymbolId(const glslang::TIntermSymbol* symbol builder.addDecoration(id, spv::DecorationVolatile); } -#ifndef GLSLANG_WEB // Subgroup builtins which have input storage class are volatile for ray tracing stages. if (symbol->getType().isImage() || symbol->getQualifier().isPipeInput()) { std::vector memory; @@ -9070,53 +9631,13 @@ spv::Id TGlslangToSpvTraverser::getSymbolId(const glslang::TIntermSymbol* symbol spv::DecorationRestrictPointerEXT : spv::DecorationAliasedPointerEXT); } - // - // Add SPIR-V decorations for structure (GL_EXT_spirv_intrinsics) - // - if (symbol->getType().getQualifier().hasSprivDecorate()) { - const glslang::TSpirvDecorate& spirvDecorate = symbol->getType().getQualifier().getSpirvDecorate(); - - // Add spirv_decorate - for (auto& decorate : spirvDecorate.decorates) { - if (!decorate.second.empty()) { - std::vector literals; - TranslateLiterals(decorate.second, literals); - builder.addDecoration(id, static_cast(decorate.first), literals); - } - else - builder.addDecoration(id, static_cast(decorate.first)); - } - - // Add spirv_decorate_id - for (auto& decorateId : spirvDecorate.decorateIds) { - 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)); - } - builder.addDecorationId(id, static_cast(decorateId.first), operandIds); - } - - // Add spirv_decorate_string - for (auto& decorateString : spirvDecorate.decorateStrings) { - std::vector strings; - assert(!decorateString.second.empty()); - for (auto extraOperand : decorateString.second) { - const char* string = extraOperand->getConstArray()[0].getSConst()->c_str(); - strings.push_back(string); - } - builder.addDecoration(id, static_cast(decorateString.first), strings); - } - } -#endif + // Add SPIR-V decorations (GL_EXT_spirv_intrinsics) + if (symbol->getType().getQualifier().hasSpirvDecorate()) + applySpirvDecorate(symbol->getType(), id, {}); return id; } -#ifndef GLSLANG_WEB // add per-primitive, per-view. per-task decorations to a struct member (member >= 0) or an object void TGlslangToSpvTraverser::addMeshNVDecoration(spv::Id id, int member, const glslang::TQualifier& qualifier) { @@ -9163,7 +9684,20 @@ void TGlslangToSpvTraverser::addMeshNVDecoration(spv::Id id, int member, const g builder.addDecoration(id, spv::DecorationPerTaskNV); } } -#endif + +void TGlslangToSpvTraverser::addImageProcessingQCOMDecoration(spv::Id id, spv::Decoration decor) +{ + spv::Op opc = builder.getOpCode(id); + if (opc == spv::OpSampledImage) { + id = builder.getIdOperand(id, 0); + opc = builder.getOpCode(id); + } + + if (opc == spv::OpLoad) { + spv::Id texid = builder.getIdOperand(id, 0); + builder.addDecoration(texid, decor); + } +} // Make a full tree of instructions to build a SPIR-V specialization constant, // or regular constant if possible. @@ -9291,7 +9825,6 @@ spv::Id TGlslangToSpvTraverser::createSpvConstantFromConstUnionArray(const glsla case glslang::EbtBool: spvConsts.push_back(builder.makeBoolConstant(zero ? false : consts[nextConst].getBConst())); break; -#ifndef GLSLANG_WEB case glslang::EbtInt8: builder.addCapability(spv::CapabilityInt8); spvConsts.push_back(builder.makeInt8Constant(zero ? 0 : consts[nextConst].getI8Const())); @@ -9321,7 +9854,6 @@ spv::Id TGlslangToSpvTraverser::createSpvConstantFromConstUnionArray(const glsla builder.addCapability(spv::CapabilityFloat16); spvConsts.push_back(builder.makeFloat16Constant(zero ? 0.0F : (float)consts[nextConst].getDConst())); break; -#endif default: assert(0); break; @@ -9345,7 +9877,6 @@ spv::Id TGlslangToSpvTraverser::createSpvConstantFromConstUnionArray(const glsla case glslang::EbtBool: scalar = builder.makeBoolConstant(zero ? false : consts[nextConst].getBConst(), specConstant); break; -#ifndef GLSLANG_WEB case glslang::EbtInt8: builder.addCapability(spv::CapabilityInt8); scalar = builder.makeInt8Constant(zero ? 0 : consts[nextConst].getI8Const(), specConstant); @@ -9379,7 +9910,6 @@ spv::Id TGlslangToSpvTraverser::createSpvConstantFromConstUnionArray(const glsla scalar = builder.makeUint64Constant(zero ? 0 : consts[nextConst].getU64Const(), specConstant); scalar = builder.createUnaryOp(spv::OpBitcast, typeId, scalar); break; -#endif case glslang::EbtString: scalar = builder.getStringId(consts[nextConst].getSConst()->c_str()); break; @@ -9527,7 +10057,6 @@ spv::Id TGlslangToSpvTraverser::createShortCircuit(glslang::TOperator op, glslan return builder.createOp(spv::OpPhi, boolTypeId, phiOperands); } -#ifndef GLSLANG_WEB // Return type Id of the imported set of extended instructions corresponds to the name. // Import this set if it has not been imported yet. spv::Id TGlslangToSpvTraverser::getExtBuiltins(const char* name) @@ -9541,7 +10070,6 @@ spv::Id TGlslangToSpvTraverser::getExtBuiltins(const char* name) return extBuiltins; } } -#endif }; // end anonymous namespace @@ -9575,27 +10103,31 @@ int GetSpirvGeneratorVersion() } // Write SPIR-V out to a binary file -void OutputSpvBin(const std::vector& spirv, const char* baseName) +bool OutputSpvBin(const std::vector& spirv, const char* baseName) { std::ofstream out; out.open(baseName, std::ios::binary | std::ios::out); - if (out.fail()) + if (out.fail()) { printf("ERROR: Failed to open file: %s\n", baseName); + return false; + } for (int i = 0; i < (int)spirv.size(); ++i) { unsigned int word = spirv[i]; out.write((const char*)&word, 4); } out.close(); + return true; } // Write SPIR-V out to a text file with 32-bit hexadecimal words -void OutputSpvHex(const std::vector& spirv, const char* baseName, const char* varName) +bool OutputSpvHex(const std::vector& spirv, const char* baseName, const char* varName) { -#if !defined(GLSLANG_WEB) std::ofstream out; out.open(baseName, std::ios::binary | std::ios::out); - if (out.fail()) + if (out.fail()) { printf("ERROR: Failed to open file: %s\n", baseName); + return false; + } out << "\t// " << GetSpirvGeneratorVersion() << GLSLANG_VERSION_MAJOR << "." << GLSLANG_VERSION_MINOR << "." << GLSLANG_VERSION_PATCH << @@ -9621,7 +10153,7 @@ void OutputSpvHex(const std::vector& spirv, const char* baseName, out << std::endl; } out.close(); -#endif + return true; } // @@ -9649,7 +10181,7 @@ void GlslangToSpv(const TIntermediate& intermediate, std::vector& TGlslangToSpvTraverser it(intermediate.getSpv().spv, &intermediate, logger, *options); root->traverse(&it); - it.finishSpv(); + it.finishSpv(options->compileOnly); it.dumpSpv(spirv); #if ENABLE_OPT diff --git a/SPIRV/GlslangToSpv.h b/SPIRV/GlslangToSpv.h index 3907be43..1b9ef3c5 100755 --- a/SPIRV/GlslangToSpv.h +++ b/SPIRV/GlslangToSpv.h @@ -35,19 +35,25 @@ #pragma once -#if defined(_MSC_VER) && _MSC_VER >= 1900 - #pragma warning(disable : 4464) // relative include path contains '..' -#endif - -#include "SpvTools.h" -#include "glslang/Include/intermediate.h" - #include #include #include "Logger.h" namespace glslang { +class TIntermediate; + +struct SpvOptions { + bool generateDebugInfo {false}; + bool stripDebugInfo {false}; + bool disableOptimizer {true}; + bool optimizeSize {false}; + bool disassemble {false}; + bool validate {false}; + bool emitNonSemanticShaderDebugInfo {false}; + bool emitNonSemanticShaderDebugSource{ false }; + bool compileOnly{false}; +}; void GetSpirvVersion(std::string&); int GetSpirvGeneratorVersion(); @@ -55,7 +61,7 @@ void GlslangToSpv(const glslang::TIntermediate& intermediate, std::vector& spirv, spv::SpvBuildLogger* logger, SpvOptions* options = nullptr); -void OutputSpvBin(const std::vector& spirv, const char* baseName); -void OutputSpvHex(const std::vector& spirv, const char* baseName, const char* varName); +bool OutputSpvBin(const std::vector& spirv, const char* baseName); +bool OutputSpvHex(const std::vector& spirv, const char* baseName, const char* varName); } diff --git a/SPIRV/Logger.cpp b/SPIRV/Logger.cpp index cdc8469c..48bd4e3a 100755 --- a/SPIRV/Logger.cpp +++ b/SPIRV/Logger.cpp @@ -32,8 +32,6 @@ // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. -#ifndef GLSLANG_WEB - #include "Logger.h" #include @@ -68,5 +66,3 @@ std::string SpvBuildLogger::getAllMessages() const { } } // end spv namespace - -#endif diff --git a/SPIRV/Logger.h b/SPIRV/Logger.h index 411367c0..2e4ddaf5 100755 --- a/SPIRV/Logger.h +++ b/SPIRV/Logger.h @@ -46,14 +46,6 @@ class SpvBuildLogger { public: SpvBuildLogger() {} -#ifdef GLSLANG_WEB - void tbdFunctionality(const std::string& f) { } - void missingFunctionality(const std::string& f) { } - void warning(const std::string& w) { } - void error(const std::string& e) { errors.push_back(e); } - std::string getAllMessages() { return ""; } -#else - // Registers a TBD functionality. void tbdFunctionality(const std::string& f); // Registers a missing functionality. @@ -67,7 +59,6 @@ public: // Returns all messages accumulated in the order of: // TBD functionalities, missing functionalities, warnings, errors. std::string getAllMessages() const; -#endif private: SpvBuildLogger(const SpvBuildLogger&); diff --git a/SPIRV/NonSemanticDebugPrintf.h b/SPIRV/NonSemanticDebugPrintf.h index 83796d75..3ca7247f 100755 --- a/SPIRV/NonSemanticDebugPrintf.h +++ b/SPIRV/NonSemanticDebugPrintf.h @@ -1,5 +1,5 @@ // Copyright (c) 2020 The Khronos Group Inc. -// +// // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and/or associated documentation files (the // "Materials"), to deal in the Materials without restriction, including @@ -7,15 +7,15 @@ // 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. @@ -23,7 +23,7 @@ // CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE // MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. -// +// #ifndef SPIRV_UNIFIED1_NonSemanticDebugPrintf_H_ #define SPIRV_UNIFIED1_NonSemanticDebugPrintf_H_ diff --git a/SPIRV/NonSemanticShaderDebugInfo100.h b/SPIRV/NonSemanticShaderDebugInfo100.h index c52f32f8..f74abcb6 100755 --- a/SPIRV/NonSemanticShaderDebugInfo100.h +++ b/SPIRV/NonSemanticShaderDebugInfo100.h @@ -1,19 +1,19 @@ // Copyright (c) 2018 The Khronos Group Inc. -// +// // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and/or associated documentation files (the "Materials"), // to deal in the Materials without restriction, including without limitation // the rights to use, copy, modify, merge, publish, distribute, sublicense, // and/or sell copies of the Materials, and to permit persons to whom the // Materials are furnished to do so, subject to the following conditions: -// +// // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Materials. -// +// // MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS KHRONOS // STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND -// HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/ -// +// HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/ +// // THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL diff --git a/SPIRV/SPVRemapper.cpp b/SPIRV/SPVRemapper.cpp index 6aca8cbc..f8f50a95 100755 --- a/SPIRV/SPVRemapper.cpp +++ b/SPIRV/SPVRemapper.cpp @@ -36,10 +36,6 @@ #include "SPVRemapper.h" #include "doc.h" -#if !defined (use_cpp11) -// ... not supported before C++11 -#else // defined (use_cpp11) - #include #include #include "../glslang/Include/Common.h" @@ -684,6 +680,7 @@ namespace spv { case spv::OperandKernelEnqueueFlags: case spv::OperandKernelProfilingInfo: case spv::OperandCapability: + case spv::OperandCooperativeMatrixOperands: ++word; break; @@ -1528,5 +1525,3 @@ namespace spv { } // namespace SPV -#endif // defined (use_cpp11) - diff --git a/SPIRV/SPVRemapper.h b/SPIRV/SPVRemapper.h index d2169463..33efe331 100755 --- a/SPIRV/SPVRemapper.h +++ b/SPIRV/SPVRemapper.h @@ -43,12 +43,6 @@ namespace spv { -// MSVC defines __cplusplus as an older value, even when it supports almost all of 11. -// We handle that here by making our own symbol. -#if __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1700) -# define use_cpp11 1 -#endif - class spirvbin_base_t { public: @@ -74,27 +68,6 @@ public: } // namespace SPV -#if !defined (use_cpp11) -#include -#include - -namespace spv { -class spirvbin_t : public spirvbin_base_t -{ -public: - spirvbin_t(int /*verbose = 0*/) { } - - void remap(std::vector& /*spv*/, unsigned int /*opts = 0*/) - { - printf("Tool not compiled for C++11, which is required for SPIR-V remapping.\n"); - exit(5); - } -}; - -} // namespace SPV - -#else // defined (use_cpp11) - #include #include #include @@ -104,9 +77,9 @@ public: #include #include "spirv.hpp" -#include "spvIR.h" namespace spv { +const Id NoResult = 0; // class to hold SPIR-V binary data for remapping, DCE, and debug stripping class spirvbin_t : public spirvbin_base_t @@ -308,5 +281,4 @@ private: } // namespace SPV -#endif // defined (use_cpp11) #endif // SPIRVREMAPPER_H diff --git a/SPIRV/SpvBuilder.cpp b/SPIRV/SpvBuilder.cpp index 7b2d7036..9216817a 100755 --- a/SPIRV/SpvBuilder.cpp +++ b/SPIRV/SpvBuilder.cpp @@ -46,10 +46,7 @@ #include #include "SpvBuilder.h" - -#ifndef GLSLANG_WEB #include "hex_float.h" -#endif #ifndef _WIN32 #include @@ -144,6 +141,7 @@ void Builder::addLine(Id fileName, int lineNum, int column) void Builder::addDebugScopeAndLine(Id fileName, int lineNum, int column) { + assert(!currentDebugScopeId.empty()); if (currentDebugScopeId.top() != lastDebugScopeId) { spv::Id resultId = getUniqueId(); Instruction* scopeInst = new Instruction(resultId, makeVoidType(), OpExtInst); @@ -184,7 +182,7 @@ Id Builder::makeVoidType() return type->getResultId(); } -Id Builder::makeBoolType(bool const compilerGenerated) +Id Builder::makeBoolType() { Instruction* type; if (groupedTypes[OpTypeBool].size() == 0) { @@ -192,14 +190,15 @@ Id Builder::makeBoolType(bool const compilerGenerated) groupedTypes[OpTypeBool].push_back(type); constantsTypesGlobals.push_back(std::unique_ptr(type)); module.mapInstruction(type); + + if (emitNonSemanticShaderDebugInfo) { + auto const debugResultId = makeBoolDebugType(32); + debugId[type->getResultId()] = debugResultId; + } + } else type = groupedTypes[OpTypeBool].back(); - if (emitNonSemanticShaderDebugInfo && !compilerGenerated) - { - auto const debugResultId = makeBoolDebugType(32); - debugId[type->getResultId()] = debugResultId; - } return type->getResultId(); } @@ -282,11 +281,6 @@ Id Builder::makePointerFromForwardPointer(StorageClass storageClass, Id forwardP Id Builder::makeIntegerType(int width, bool hasSign) { -#ifdef GLSLANG_WEB - assert(width == 32); - width = 32; -#endif - // try to find it Instruction* type; for (int t = 0; t < (int)groupedTypes[OpTypeInt].size(); ++t) { @@ -328,11 +322,6 @@ Id Builder::makeIntegerType(int width, bool hasSign) Id Builder::makeFloatType(int width) { -#ifdef GLSLANG_WEB - assert(width == 32); - width = 32; -#endif - // try to find it Instruction* type; for (int t = 0; t < (int)groupedTypes[OpTypeFloat].size(); ++t) { @@ -480,15 +469,41 @@ Id Builder::makeMatrixType(Id component, int cols, int rows) return type->getResultId(); } -Id Builder::makeCooperativeMatrixType(Id component, Id scope, Id rows, Id cols) +Id Builder::makeCooperativeMatrixTypeKHR(Id component, Id scope, Id rows, Id cols, Id use) +{ + // try to find it + Instruction* type; + for (int t = 0; t < (int)groupedTypes[OpTypeCooperativeMatrixKHR].size(); ++t) { + type = groupedTypes[OpTypeCooperativeMatrixKHR][t]; + if (type->getIdOperand(0) == component && + type->getIdOperand(1) == scope && + type->getIdOperand(2) == rows && + type->getIdOperand(3) == cols && + type->getIdOperand(4) == use) + return type->getResultId(); + } + + // not found, make it + type = new Instruction(getUniqueId(), NoType, OpTypeCooperativeMatrixKHR); + type->addIdOperand(component); + type->addIdOperand(scope); + type->addIdOperand(rows); + type->addIdOperand(cols); + type->addIdOperand(use); + groupedTypes[OpTypeCooperativeMatrixKHR].push_back(type); + constantsTypesGlobals.push_back(std::unique_ptr(type)); + module.mapInstruction(type); + + return type->getResultId(); +} + +Id Builder::makeCooperativeMatrixTypeNV(Id component, Id scope, Id rows, Id cols) { // try to find it Instruction* type; for (int t = 0; t < (int)groupedTypes[OpTypeCooperativeMatrixNV].size(); ++t) { type = groupedTypes[OpTypeCooperativeMatrixNV][t]; - if (type->getIdOperand(0) == component && - type->getIdOperand(1) == scope && - type->getIdOperand(2) == rows && + if (type->getIdOperand(0) == component && type->getIdOperand(1) == scope && type->getIdOperand(2) == rows && type->getIdOperand(3) == cols) return type->getResultId(); } @@ -506,6 +521,17 @@ Id Builder::makeCooperativeMatrixType(Id component, Id scope, Id rows, Id cols) return type->getResultId(); } +Id Builder::makeCooperativeMatrixTypeWithSameShape(Id component, Id otherType) +{ + Instruction* instr = module.getInstruction(otherType); + if (instr->getOpCode() == OpTypeCooperativeMatrixNV) { + return makeCooperativeMatrixTypeNV(component, instr->getIdOperand(1), instr->getIdOperand(2), instr->getIdOperand(3)); + } else { + assert(instr->getOpCode() == OpTypeCooperativeMatrixKHR); + return makeCooperativeMatrixTypeKHR(component, instr->getIdOperand(1), instr->getIdOperand(2), instr->getIdOperand(3), instr->getIdOperand(4)); + } +} + Id Builder::makeGenericType(spv::Op opcode, std::vector& operands) { // try to find it @@ -650,8 +676,12 @@ Id Builder::makeDebugFunctionType(Id returnType, const std::vector& paramTyp type->addIdOperand(makeUintConstant(NonSemanticShaderDebugInfo100FlagIsPublic)); type->addIdOperand(debugId[returnType]); for (auto const paramType : paramTypes) { - assert(isPointerType(paramType) || isArrayType(paramType)); - type->addIdOperand(debugId[getContainedTypeId(paramType)]); + if (isPointerType(paramType) || isArrayType(paramType)) { + type->addIdOperand(debugId[getContainedTypeId(paramType)]); + } + else { + type->addIdOperand(debugId[paramType]); + } } constantsTypesGlobals.push_back(std::unique_ptr(type)); module.mapInstruction(type); @@ -691,7 +721,6 @@ Id Builder::makeImageType(Id sampledType, Dim dim, bool depth, bool arrayed, boo constantsTypesGlobals.push_back(std::unique_ptr(type)); module.mapInstruction(type); -#ifndef GLSLANG_WEB // deal with capabilities switch (dim) { case DimBuffer: @@ -737,7 +766,6 @@ Id Builder::makeImageType(Id sampledType, Dim dim, bool depth, bool arrayed, boo addCapability(CapabilityImageMSArray); } } -#endif if (emitNonSemanticShaderDebugInfo) { @@ -832,11 +860,19 @@ Id Builder::makeBoolDebugType(int const size) Id Builder::makeIntegerDebugType(int const width, bool const hasSign) { + const char* typeName = nullptr; + switch (width) { + case 8: typeName = hasSign ? "int8_t" : "uint8_t"; break; + case 16: typeName = hasSign ? "int16_t" : "uint16_t"; break; + case 64: typeName = hasSign ? "int64_t" : "uint64_t"; break; + default: typeName = hasSign ? "int" : "uint"; + } + auto nameId = getStringId(typeName); // try to find it Instruction* type; for (int t = 0; t < (int)groupedDebugTypes[NonSemanticShaderDebugInfo100DebugTypeBasic].size(); ++t) { type = groupedDebugTypes[NonSemanticShaderDebugInfo100DebugTypeBasic][t]; - if (type->getIdOperand(0) == (hasSign ? getStringId("int") : getStringId("uint")) && + if (type->getIdOperand(0) == nameId && type->getIdOperand(1) == static_cast(width) && type->getIdOperand(2) == (hasSign ? NonSemanticShaderDebugInfo100Signed : NonSemanticShaderDebugInfo100Unsigned)) return type->getResultId(); @@ -846,11 +882,7 @@ Id Builder::makeIntegerDebugType(int const width, bool const hasSign) type = new Instruction(getUniqueId(), makeVoidType(), OpExtInst); type->addIdOperand(nonSemanticShaderDebugInfo); type->addImmediateOperand(NonSemanticShaderDebugInfo100DebugTypeBasic); - if(hasSign == true) { - type->addIdOperand(getStringId("int")); // name id - } else { - type->addIdOperand(getStringId("uint")); // name id - } + type->addIdOperand(nameId); // name id type->addIdOperand(makeUintConstant(width)); // size id if(hasSign == true) { type->addIdOperand(makeUintConstant(NonSemanticShaderDebugInfo100Signed)); // encoding id @@ -868,11 +900,18 @@ Id Builder::makeIntegerDebugType(int const width, bool const hasSign) Id Builder::makeFloatDebugType(int const width) { + const char* typeName = nullptr; + switch (width) { + case 16: typeName = "float16_t"; break; + case 64: typeName = "double"; break; + default: typeName = "float"; break; + } + auto nameId = getStringId(typeName); // try to find it Instruction* type; for (int t = 0; t < (int)groupedDebugTypes[NonSemanticShaderDebugInfo100DebugTypeBasic].size(); ++t) { type = groupedDebugTypes[NonSemanticShaderDebugInfo100DebugTypeBasic][t]; - if (type->getIdOperand(0) == getStringId("float") && + if (type->getIdOperand(0) == nameId && type->getIdOperand(1) == static_cast(width) && type->getIdOperand(2) == NonSemanticShaderDebugInfo100Float) return type->getResultId(); @@ -882,7 +921,7 @@ Id Builder::makeFloatDebugType(int const width) type = new Instruction(getUniqueId(), makeVoidType(), OpExtInst); type->addIdOperand(nonSemanticShaderDebugInfo); type->addImmediateOperand(NonSemanticShaderDebugInfo100DebugTypeBasic); - type->addIdOperand(getStringId("float")); // name id + type->addIdOperand(nameId); // name id type->addIdOperand(makeUintConstant(width)); // size id type->addIdOperand(makeUintConstant(NonSemanticShaderDebugInfo100Float)); // encoding id type->addIdOperand(makeUintConstant(NonSemanticShaderDebugInfo100None)); // flags id @@ -929,7 +968,7 @@ Id Builder::makeArrayDebugType(Id const baseType, Id const componentCount) Id Builder::makeVectorDebugType(Id const baseType, int const componentCount) { - return makeSequentialDebugType(baseType, makeUintConstant(componentCount), NonSemanticShaderDebugInfo100DebugTypeVector);; + return makeSequentialDebugType(baseType, makeUintConstant(componentCount), NonSemanticShaderDebugInfo100DebugTypeVector); } Id Builder::makeMatrixDebugType(Id const vectorType, int const vectorCount, bool columnMajor) @@ -991,7 +1030,10 @@ Id Builder::makeCompositeDebugType(std::vector const& memberTypes, char cons for(auto const memberType : memberTypes) { assert(debugTypeLocs.find(memberType) != debugTypeLocs.end()); - memberDebugTypes.emplace_back(makeMemberDebugType(memberType, debugTypeLocs[memberType])); + // There _should_ be debug types for all the member types but currently buffer references + // do not have member debug info generated. + if (debugId[memberType]) + memberDebugTypes.emplace_back(makeMemberDebugType(memberType, debugTypeLocs[memberType])); // TODO: Need to rethink this method of passing location information. // debugTypeLocs.erase(memberType); @@ -1067,6 +1109,12 @@ Id Builder::makeDebugCompilationUnit() { constantsTypesGlobals.push_back(std::unique_ptr(sourceInst)); module.mapInstruction(sourceInst); nonSemanticShaderCompilationUnitId = resultId; + + // We can reasonably assume that makeDebugCompilationUnit will be called before any of + // debug-scope stack. Function scopes and lexical scopes will occur afterward. + assert(currentDebugScopeId.empty()); + currentDebugScopeId.push(nonSemanticShaderCompilationUnitId); + return resultId; } @@ -1096,6 +1144,8 @@ Id Builder::createDebugGlobalVariable(Id const type, char const*const name, Id c Id Builder::createDebugLocalVariable(Id type, char const*const name, size_t const argNumber) { assert(name != nullptr); + assert(!currentDebugScopeId.empty()); + Instruction* inst = new Instruction(getUniqueId(), makeVoidType(), OpExtInst); inst->addIdOperand(nonSemanticShaderDebugInfo); inst->addImmediateOperand(NonSemanticShaderDebugInfo100DebugLocalVariable); @@ -1133,20 +1183,32 @@ Id Builder::makeDebugExpression() return debugExpression; } -Id Builder::makeDebugDeclare(Id const debugLocalVariable, Id const localVariable) +Id Builder::makeDebugDeclare(Id const debugLocalVariable, Id const pointer) { Instruction* inst = new Instruction(getUniqueId(), makeVoidType(), OpExtInst); inst->addIdOperand(nonSemanticShaderDebugInfo); inst->addImmediateOperand(NonSemanticShaderDebugInfo100DebugDeclare); inst->addIdOperand(debugLocalVariable); // debug local variable id - inst->addIdOperand(localVariable); // local variable id + inst->addIdOperand(pointer); // pointer to local variable id + inst->addIdOperand(makeDebugExpression()); // expression id + buildPoint->addInstruction(std::unique_ptr(inst)); + + return inst->getResultId(); +} + +Id Builder::makeDebugValue(Id const debugLocalVariable, Id const value) +{ + Instruction* inst = new Instruction(getUniqueId(), makeVoidType(), OpExtInst); + inst->addIdOperand(nonSemanticShaderDebugInfo); + inst->addImmediateOperand(NonSemanticShaderDebugInfo100DebugValue); + inst->addIdOperand(debugLocalVariable); // debug local variable id + inst->addIdOperand(value); // value of local variable id inst->addIdOperand(makeDebugExpression()); // expression id buildPoint->addInstruction(std::unique_ptr(inst)); return inst->getResultId(); } -#ifndef GLSLANG_WEB Id Builder::makeAccelerationStructureType() { Instruction *type; @@ -1176,7 +1238,21 @@ Id Builder::makeRayQueryType() return type->getResultId(); } -#endif + +Id Builder::makeHitObjectNVType() +{ + Instruction *type; + if (groupedTypes[OpTypeHitObjectNV].size() == 0) { + type = new Instruction(getUniqueId(), NoType, OpTypeHitObjectNV); + groupedTypes[OpTypeHitObjectNV].push_back(type); + constantsTypesGlobals.push_back(std::unique_ptr(type)); + module.mapInstruction(type); + } else { + type = groupedTypes[OpTypeHitObjectNV].back(); + } + + return type->getResultId(); +} Id Builder::getDerefTypeId(Id resultId) const { @@ -1226,6 +1302,7 @@ int Builder::getNumTypeConstituents(Id typeId) const } case OpTypeStruct: return instr->getNumOperands(); + case OpTypeCooperativeMatrixKHR: case OpTypeCooperativeMatrixNV: // has only one constituent when used with OpCompositeConstruct. return 1; @@ -1275,6 +1352,7 @@ Id Builder::getContainedTypeId(Id typeId, int member) const case OpTypeMatrix: case OpTypeArray: case OpTypeRuntimeArray: + case OpTypeCooperativeMatrixKHR: case OpTypeCooperativeMatrixNV: return instr->getIdOperand(0); case OpTypePointer: @@ -1345,7 +1423,7 @@ bool Builder::containsType(Id typeId, spv::Op typeOp, unsigned int width) const } // return true if the type is a pointer to PhysicalStorageBufferEXT or an -// array of such pointers. These require restrict/aliased decorations. +// contains such a pointer. These require restrict/aliased decorations. bool Builder::containsPhysicalStorageBufferOrArray(Id typeId) const { const Instruction& instr = *module.getInstruction(typeId); @@ -1357,6 +1435,12 @@ bool Builder::containsPhysicalStorageBufferOrArray(Id typeId) const return getTypeStorageClass(typeId) == StorageClassPhysicalStorageBufferEXT; case OpTypeArray: return containsPhysicalStorageBufferOrArray(getContainedTypeId(typeId)); + case OpTypeStruct: + for (int m = 0; m < instr.getNumOperands(); ++m) { + if (containsPhysicalStorageBufferOrArray(instr.getIdOperand(m))) + return true; + } + return false; default: return false; } @@ -1570,10 +1654,6 @@ Id Builder::makeFloatConstant(float f, bool specConstant) Id Builder::makeDoubleConstant(double d, bool specConstant) { -#ifdef GLSLANG_WEB - assert(0); - return NoResult; -#else Op opcode = specConstant ? OpSpecConstant : OpConstant; Id typeId = makeFloatType(64); union { double db; unsigned long long ull; } u; @@ -1598,15 +1678,10 @@ Id Builder::makeDoubleConstant(double d, bool specConstant) module.mapInstruction(c); return c->getResultId(); -#endif } Id Builder::makeFloat16Constant(float f16, bool specConstant) { -#ifdef GLSLANG_WEB - assert(0); - return NoResult; -#else Op opcode = specConstant ? OpSpecConstant : OpConstant; Id typeId = makeFloatType(16); @@ -1631,17 +1706,11 @@ Id Builder::makeFloat16Constant(float f16, bool specConstant) module.mapInstruction(c); return c->getResultId(); -#endif } Id Builder::makeFpConstant(Id type, double d, bool specConstant) { -#ifdef GLSLANG_WEB - const int width = 32; - assert(width == getScalarTypeWidth(type)); -#else const int width = getScalarTypeWidth(type); -#endif assert(isFloatType(type)); @@ -1735,6 +1804,7 @@ Id Builder::makeCompositeConstant(Id typeId, const std::vector& members, boo case OpTypeVector: case OpTypeArray: case OpTypeMatrix: + case OpTypeCooperativeMatrixKHR: case OpTypeCooperativeMatrixNV: if (! specConstant) { Id existing = findCompositeConstant(typeClass, typeId, members); @@ -1782,6 +1852,10 @@ Instruction* Builder::addEntryPoint(ExecutionModel model, Function* function, co // Currently relying on the fact that all 'value' of interest are small non-negative values. void Builder::addExecutionMode(Function* entryPoint, ExecutionMode mode, int value1, int value2, int value3) { + // entryPoint can be null if we are in compile-only mode + if (!entryPoint) + return; + Instruction* instr = new Instruction(OpExecutionMode); instr->addIdOperand(entryPoint->getId()); instr->addImmediateOperand(mode); @@ -1797,6 +1871,10 @@ void Builder::addExecutionMode(Function* entryPoint, ExecutionMode mode, int val void Builder::addExecutionMode(Function* entryPoint, ExecutionMode mode, const std::vector& literals) { + // entryPoint can be null if we are in compile-only mode + if (!entryPoint) + return; + Instruction* instr = new Instruction(OpExecutionMode); instr->addIdOperand(entryPoint->getId()); instr->addImmediateOperand(mode); @@ -1808,6 +1886,10 @@ void Builder::addExecutionMode(Function* entryPoint, ExecutionMode mode, const s void Builder::addExecutionModeId(Function* entryPoint, ExecutionMode mode, const std::vector& operandIds) { + // entryPoint can be null if we are in compile-only mode + if (!entryPoint) + return; + Instruction* instr = new Instruction(OpExecutionModeId); instr->addIdOperand(entryPoint->getId()); instr->addImmediateOperand(mode); @@ -1891,6 +1973,16 @@ void Builder::addDecoration(Id id, Decoration decoration, const std::vector(dec)); } +void Builder::addLinkageDecoration(Id id, const char* name, spv::LinkageType linkType) { + Instruction* dec = new Instruction(OpDecorate); + dec->addIdOperand(id); + dec->addImmediateOperand(spv::DecorationLinkageAttributes); + dec->addStringOperand(name); + dec->addImmediateOperand(linkType); + + decorations.push_back(std::unique_ptr(dec)); +} + void Builder::addDecorationId(Id id, Decoration decoration, Id idDecoration) { if (decoration == spv::DecorationMax) @@ -1983,11 +2075,6 @@ Function* Builder::makeEntryPoint(const char* entryPoint) { assert(! entryPointFunction); - Block* entry; - std::vector paramsTypes; - std::vector paramNames; - std::vector> decorations; - auto const returnType = makeVoidType(); restoreNonSemanticShaderDebugInfo = emitNonSemanticShaderDebugInfo; @@ -1995,7 +2082,8 @@ Function* Builder::makeEntryPoint(const char* entryPoint) emitNonSemanticShaderDebugInfo = false; } - entryPointFunction = makeFunctionEntry(NoPrecision, returnType, entryPoint, paramsTypes, paramNames, decorations, &entry); + Block* entry = nullptr; + entryPointFunction = makeFunctionEntry(NoPrecision, returnType, entryPoint, LinkageTypeMax, {}, {}, &entry); emitNonSemanticShaderDebugInfo = restoreNonSemanticShaderDebugInfo; @@ -2003,15 +2091,15 @@ Function* Builder::makeEntryPoint(const char* entryPoint) } // Comments in header -Function* Builder::makeFunctionEntry(Decoration precision, Id returnType, const char* name, - const std::vector& paramTypes, const std::vector& paramNames, - const std::vector>& decorations, Block **entry) +Function* Builder::makeFunctionEntry(Decoration precision, Id returnType, const char* name, LinkageType linkType, + const std::vector& paramTypes, + const std::vector>& decorations, Block** entry) { // Make the function and initial instructions in it Id typeId = makeFunctionType(returnType, paramTypes); Id firstParamId = paramTypes.size() == 0 ? 0 : getUniqueIds((int)paramTypes.size()); Id funcId = getUniqueId(); - Function* function = new Function(funcId, returnType, typeId, firstParamId, module); + Function* function = new Function(funcId, returnType, typeId, firstParamId, linkType, name, module); // Set up the precisions setPrecision(function->getId(), precision); @@ -2023,12 +2111,8 @@ Function* Builder::makeFunctionEntry(Decoration precision, Id returnType, const } } - // Make the debug function instruction + // reset last debug scope if (emitNonSemanticShaderDebugInfo) { - Id nameId = getStringId(unmangleFunctionName(name)); - Id debugFuncId = makeDebugFunction(function, nameId, typeId); - debugId[funcId] = debugFuncId; - currentDebugScopeId.push(debugFuncId); lastDebugScopeId = NoResult; } @@ -2038,39 +2122,71 @@ Function* Builder::makeFunctionEntry(Decoration precision, Id returnType, const function->addBlock(*entry); setBuildPoint(*entry); - // DebugScope and DebugLine for parameter DebugDeclares - if (emitNonSemanticShaderDebugInfo && (int)paramTypes.size() > 0) { - addDebugScopeAndLine(currentFileId, currentLine, 0); - } - - if (emitNonSemanticShaderDebugInfo) { - assert(paramTypes.size() == paramNames.size()); - for(size_t p = 0; p < paramTypes.size(); ++p) - { - auto const& paramType = paramTypes[p]; - assert(isPointerType(paramType) || isArrayType(paramType)); - assert(debugId[getContainedTypeId(paramType)] != 0); - auto const& paramName = paramNames[p]; - auto const debugLocalVariableId = createDebugLocalVariable(debugId[getContainedTypeId(paramType)], paramName, p+1); - debugId[firstParamId + p] = debugLocalVariableId; - - makeDebugDeclare(debugLocalVariableId, firstParamId + p); - } - } - if (name) addName(function->getId(), name); functions.push_back(std::unique_ptr(function)); - // Clear debug scope stack - if (emitNonSemanticShaderDebugInfo) - currentDebugScopeId.pop(); - return function; } -Id Builder::makeDebugFunction(Function* function, Id nameId, Id funcTypeId) { +void Builder::setupDebugFunctionEntry(Function* function, const char* name, int line, const std::vector& paramTypes, + const std::vector& paramNames) +{ + + if (!emitNonSemanticShaderDebugInfo) + return; + + currentLine = line; + Id nameId = getStringId(unmangleFunctionName(name)); + Id funcTypeId = function->getFuncTypeId(); + assert(debugId[funcTypeId] != 0); + Id funcId = function->getId(); + + assert(funcId != 0); + + // Make the debug function instruction + Id debugFuncId = makeDebugFunction(function, nameId, funcTypeId); + debugId[funcId] = debugFuncId; + currentDebugScopeId.push(debugFuncId); + + // DebugScope and DebugLine for parameter DebugDeclares + assert(paramTypes.size() == paramNames.size()); + if ((int)paramTypes.size() > 0) { + addDebugScopeAndLine(currentFileId, currentLine, 0); + + Id firstParamId = function->getParamId(0); + + for (size_t p = 0; p < paramTypes.size(); ++p) { + bool passByRef = false; + Id paramTypeId = paramTypes[p]; + + // For pointer-typed parameters, they are actually passed by reference and we need unwrap the pointer to get the actual parameter type. + if (isPointerType(paramTypeId) || isArrayType(paramTypeId)) { + passByRef = true; + paramTypeId = getContainedTypeId(paramTypeId); + } + + auto const& paramName = paramNames[p]; + auto const debugLocalVariableId = createDebugLocalVariable(debugId[paramTypeId], paramName, p + 1); + auto const paramId = static_cast(firstParamId + p); + debugId[paramId] = debugLocalVariableId; + + if (passByRef) { + makeDebugDeclare(debugLocalVariableId, paramId); + } else { + makeDebugValue(debugLocalVariableId, paramId); + } + } + } + + // Clear debug scope stack + if (emitNonSemanticShaderDebugInfo) + currentDebugScopeId.pop(); +} + +Id Builder::makeDebugFunction([[maybe_unused]] Function* function, Id nameId, Id funcTypeId) +{ assert(function != nullptr); assert(nameId != 0); assert(funcTypeId != 0); @@ -2082,19 +2198,21 @@ Id Builder::makeDebugFunction(Function* function, Id nameId, Id funcTypeId) { type->addImmediateOperand(NonSemanticShaderDebugInfo100DebugFunction); type->addIdOperand(nameId); type->addIdOperand(debugId[funcTypeId]); - type->addIdOperand(makeDebugSource(currentFileId)); // Will be fixed later when true filename available - type->addIdOperand(makeUintConstant(currentLine)); // Will be fixed later when true line available + type->addIdOperand(makeDebugSource(currentFileId)); // TODO: This points to file of definition instead of declaration + type->addIdOperand(makeUintConstant(currentLine)); // TODO: This points to line of definition instead of declaration type->addIdOperand(makeUintConstant(0)); // column type->addIdOperand(makeDebugCompilationUnit()); // scope type->addIdOperand(nameId); // linkage name type->addIdOperand(makeUintConstant(NonSemanticShaderDebugInfo100FlagIsPublic)); - type->addIdOperand(makeUintConstant(currentLine)); // TODO(greg-lunarg): correct scope line + type->addIdOperand(makeUintConstant(currentLine)); constantsTypesGlobals.push_back(std::unique_ptr(type)); module.mapInstruction(type); return funcId; } Id Builder::makeDebugLexicalBlock(uint32_t line) { + assert(!currentDebugScopeId.empty()); + Id lexId = getUniqueId(); auto lex = new Instruction(lexId, makeVoidType(), OpExtInst); lex->addIdOperand(nonSemanticShaderDebugInfo); @@ -2173,6 +2291,12 @@ void Builder::enterFunction(Function const* function) defInst->addIdOperand(funcId); buildPoint->addInstruction(std::unique_ptr(defInst)); } + + if (auto linkType = function->getLinkType(); linkType != LinkageTypeMax) { + Id funcId = function->getFuncId(); + addCapability(CapabilityLinkage); + addLinkageDecoration(funcId, function->getExportName(), linkType); + } } // Comments in header @@ -2363,7 +2487,24 @@ Id Builder::createArrayLength(Id base, unsigned int member) return length->getResultId(); } -Id Builder::createCooperativeMatrixLength(Id type) +Id Builder::createCooperativeMatrixLengthKHR(Id type) +{ + spv::Id intType = makeUintType(32); + + // Generate code for spec constants if in spec constant operation + // generation mode. + if (generatingOpCodeForSpecConst) { + return createSpecConstantOp(OpCooperativeMatrixLengthKHR, intType, std::vector(1, type), std::vector()); + } + + Instruction* length = new Instruction(getUniqueId(), intType, OpCooperativeMatrixLengthKHR); + length->addIdOperand(type); + buildPoint->addInstruction(std::unique_ptr(length)); + + return length->getResultId(); +} + +Id Builder::createCooperativeMatrixLengthNV(Id type) { spv::Id intType = makeUintType(32); @@ -2600,6 +2741,14 @@ Id Builder::createSpecConstantOp(Op opCode, Id typeId, const std::vector& op module.mapInstruction(op); constantsTypesGlobals.push_back(std::unique_ptr(op)); + // OpSpecConstantOp's using 8 or 16 bit types require the associated capability + if (containsType(typeId, OpTypeInt, 8)) + addCapability(CapabilityInt8); + if (containsType(typeId, OpTypeInt, 16)) + addCapability(CapabilityInt16); + if (containsType(typeId, OpTypeFloat, 16)) + addCapability(CapabilityFloat16); + return op->getResultId(); } @@ -2734,52 +2883,47 @@ Id Builder::createBuiltinCall(Id resultType, Id builtins, int entryPoint, const Id Builder::createTextureCall(Decoration precision, Id resultType, bool sparse, bool fetch, bool proj, bool gather, bool noImplicitLod, const TextureParameters& parameters, ImageOperandsMask signExtensionMask) { - static const int maxTextureArgs = 10; - Id texArgs[maxTextureArgs] = {}; + std::vector texArgs; // // Set up the fixed arguments // - int numArgs = 0; bool explicitLod = false; - texArgs[numArgs++] = parameters.sampler; - texArgs[numArgs++] = parameters.coords; + texArgs.push_back(parameters.sampler); + texArgs.push_back(parameters.coords); if (parameters.Dref != NoResult) - texArgs[numArgs++] = parameters.Dref; + texArgs.push_back(parameters.Dref); if (parameters.component != NoResult) - texArgs[numArgs++] = parameters.component; + texArgs.push_back(parameters.component); -#ifndef GLSLANG_WEB if (parameters.granularity != NoResult) - texArgs[numArgs++] = parameters.granularity; + texArgs.push_back(parameters.granularity); if (parameters.coarse != NoResult) - texArgs[numArgs++] = parameters.coarse; -#endif + texArgs.push_back(parameters.coarse); // // Set up the optional arguments // - int optArgNum = numArgs; // track which operand, if it exists, is the mask of optional arguments - ++numArgs; // speculatively make room for the mask operand + size_t optArgNum = texArgs.size(); // the position of the mask for the optional arguments, if any. ImageOperandsMask mask = ImageOperandsMaskNone; // the mask operand if (parameters.bias) { mask = (ImageOperandsMask)(mask | ImageOperandsBiasMask); - texArgs[numArgs++] = parameters.bias; + texArgs.push_back(parameters.bias); } if (parameters.lod) { mask = (ImageOperandsMask)(mask | ImageOperandsLodMask); - texArgs[numArgs++] = parameters.lod; + texArgs.push_back(parameters.lod); explicitLod = true; } else if (parameters.gradX) { mask = (ImageOperandsMask)(mask | ImageOperandsGradMask); - texArgs[numArgs++] = parameters.gradX; - texArgs[numArgs++] = parameters.gradY; + texArgs.push_back(parameters.gradX); + texArgs.push_back(parameters.gradY); explicitLod = true; } else if (noImplicitLod && ! fetch && ! gather) { // have to explicitly use lod of 0 if not allowed to have them be implicit, and // we would otherwise be about to issue an implicit instruction mask = (ImageOperandsMask)(mask | ImageOperandsLodMask); - texArgs[numArgs++] = makeFloatConstant(0.0); + texArgs.push_back(makeFloatConstant(0.0)); explicitLod = true; } if (parameters.offset) { @@ -2789,24 +2933,23 @@ Id Builder::createTextureCall(Decoration precision, Id resultType, bool sparse, addCapability(CapabilityImageGatherExtended); mask = (ImageOperandsMask)(mask | ImageOperandsOffsetMask); } - texArgs[numArgs++] = parameters.offset; + texArgs.push_back(parameters.offset); } if (parameters.offsets) { addCapability(CapabilityImageGatherExtended); mask = (ImageOperandsMask)(mask | ImageOperandsConstOffsetsMask); - texArgs[numArgs++] = parameters.offsets; + texArgs.push_back(parameters.offsets); } -#ifndef GLSLANG_WEB if (parameters.sample) { mask = (ImageOperandsMask)(mask | ImageOperandsSampleMask); - texArgs[numArgs++] = parameters.sample; + texArgs.push_back(parameters.sample); } if (parameters.lodClamp) { // capability if this bit is used addCapability(CapabilityMinLod); mask = (ImageOperandsMask)(mask | ImageOperandsMinLodMask); - texArgs[numArgs++] = parameters.lodClamp; + texArgs.push_back(parameters.lodClamp); } if (parameters.nonprivate) { mask = mask | ImageOperandsNonPrivateTexelKHRMask; @@ -2814,12 +2957,10 @@ Id Builder::createTextureCall(Decoration precision, Id resultType, bool sparse, if (parameters.volatil) { mask = mask | ImageOperandsVolatileTexelKHRMask; } -#endif mask = mask | signExtensionMask; - if (mask == ImageOperandsMaskNone) - --numArgs; // undo speculative reservation for the mask argument - else - texArgs[optArgNum] = mask; + // insert the operand for the mask, if any bits were set. + if (mask != ImageOperandsMaskNone) + texArgs.insert(texArgs.begin() + optArgNum, mask); // // Set up the instruction @@ -2830,7 +2971,6 @@ Id Builder::createTextureCall(Decoration precision, Id resultType, bool sparse, opCode = OpImageSparseFetch; else opCode = OpImageFetch; -#ifndef GLSLANG_WEB } else if (parameters.granularity && parameters.coarse) { opCode = OpImageSampleFootprintNV; } else if (gather) { @@ -2844,7 +2984,6 @@ Id Builder::createTextureCall(Decoration precision, Id resultType, bool sparse, opCode = OpImageSparseGather; else opCode = OpImageGather; -#endif } else if (explicitLod) { if (parameters.Dref) { if (proj) @@ -2923,11 +3062,11 @@ Id Builder::createTextureCall(Decoration precision, Id resultType, bool sparse, // Build the SPIR-V instruction Instruction* textureInst = new Instruction(getUniqueId(), resultType, opCode); - for (int op = 0; op < optArgNum; ++op) + for (size_t op = 0; op < optArgNum; ++op) textureInst->addIdOperand(texArgs[op]); - if (optArgNum < numArgs) + if (optArgNum < texArgs.size()) textureInst->addImmediateOperand(texArgs[optArgNum]); - for (int op = optArgNum + 1; op < numArgs; ++op) + for (size_t op = optArgNum + 1; op < texArgs.size(); ++op) textureInst->addIdOperand(texArgs[op]); setPrecision(textureInst->getResultId(), precision); buildPoint->addInstruction(std::unique_ptr(textureInst)); @@ -3207,12 +3346,7 @@ Id Builder::createMatrixConstructor(Decoration precision, const std::vector& int numRows = getTypeNumRows(resultTypeId); Instruction* instr = module.getInstruction(componentTypeId); -#ifdef GLSLANG_WEB - const unsigned bitCount = 32; - assert(bitCount == instr->getImmediateOperand(0)); -#else const unsigned bitCount = instr->getImmediateOperand(0); -#endif // Optimize matrix constructed from a bigger matrix if (isMatrix(sources[0]) && getNumColumns(sources[0]) >= numCols && getNumRows(sources[0]) >= numRows) { @@ -4033,4 +4167,4 @@ void Builder::dumpModuleProcesses(std::vector& out) const } } -}; // end spv namespace +} // end spv namespace diff --git a/SPIRV/SpvBuilder.h b/SPIRV/SpvBuilder.h index b75eab89..b1ca6ce1 100755 --- a/SPIRV/SpvBuilder.h +++ b/SPIRV/SpvBuilder.h @@ -103,7 +103,7 @@ public: stringIds[file_c_str] = strId; return strId; } - spv::Id getSourceFile() const + spv::Id getSourceFile() const { return sourceFileStringId; } @@ -185,7 +185,7 @@ public: // For creating new types (will return old type if the requested one was already made). Id makeVoidType(); - Id makeBoolType(bool const compilerGenerated = true); + Id makeBoolType(); Id makePointer(StorageClass, Id pointee); Id makeForwardPointer(StorageClass); Id makePointerFromForwardPointer(StorageClass, Id forwardPointerType, Id pointee); @@ -203,7 +203,9 @@ public: Id makeImageType(Id sampledType, Dim, bool depth, bool arrayed, bool ms, unsigned sampled, ImageFormat format); Id makeSamplerType(); Id makeSampledImageType(Id imageType); - Id makeCooperativeMatrixType(Id component, Id scope, Id rows, Id cols); + Id makeCooperativeMatrixTypeKHR(Id component, Id scope, Id rows, Id cols, Id use); + Id makeCooperativeMatrixTypeNV(Id component, Id scope, Id rows, Id cols); + Id makeCooperativeMatrixTypeWithSameShape(Id component, Id otherType); Id makeGenericType(spv::Op opcode, std::vector& operands); // SPIR-V NonSemantic Shader DebugInfo Instructions @@ -229,17 +231,22 @@ public: Id createDebugGlobalVariable(Id const type, char const*const name, Id const variable); Id createDebugLocalVariable(Id type, char const*const name, size_t const argNumber = 0); Id makeDebugExpression(); - Id makeDebugDeclare(Id const debugLocalVariable, Id const localVariable); + Id makeDebugDeclare(Id const debugLocalVariable, Id const pointer); Id makeDebugValue(Id const debugLocalVariable, Id const value); Id makeDebugFunctionType(Id returnType, const std::vector& paramTypes); Id makeDebugFunction(Function* function, Id nameId, Id funcTypeId); Id makeDebugLexicalBlock(uint32_t line); std::string unmangleFunctionName(std::string const& name) const; + void setupDebugFunctionEntry(Function* function, const char* name, int line, + const std::vector& paramTypes, + const std::vector& paramNames); // accelerationStructureNV type Id makeAccelerationStructureType(); // rayQueryEXT type Id makeRayQueryType(); + // hitObjectNV type + Id makeHitObjectNVType(); // For querying about types. Id getTypeId(Id resultId) const { return module.getTypeId(resultId); } @@ -257,6 +264,7 @@ public: ImageFormat getImageTypeFormat(Id typeId) const { return (ImageFormat)module.getInstruction(typeId)->getImmediateOperand(6); } Id getResultingAccessChainType() const; + Id getIdOperand(Id resultId, int idx) { return module.getInstruction(resultId)->getIdOperand(idx); } bool isPointer(Id resultId) const { return isPointerType(getTypeId(resultId)); } bool isScalar(Id resultId) const { return isScalarType(getTypeId(resultId)); } @@ -281,11 +289,10 @@ public: bool isMatrixType(Id typeId) const { return getTypeClass(typeId) == OpTypeMatrix; } bool isStructType(Id typeId) const { return getTypeClass(typeId) == OpTypeStruct; } bool isArrayType(Id typeId) const { return getTypeClass(typeId) == OpTypeArray; } -#ifdef GLSLANG_WEB - bool isCooperativeMatrixType(Id typeId)const { return false; } -#else - bool isCooperativeMatrixType(Id typeId)const { return getTypeClass(typeId) == OpTypeCooperativeMatrixNV; } -#endif + bool isCooperativeMatrixType(Id typeId)const + { + return getTypeClass(typeId) == OpTypeCooperativeMatrixKHR || getTypeClass(typeId) == OpTypeCooperativeMatrixNV; + } bool isAggregateType(Id typeId) const { return isArrayType(typeId) || isStructType(typeId) || isCooperativeMatrixType(typeId); } bool isImageType(Id typeId) const { return getTypeClass(typeId) == OpTypeImage; } @@ -389,6 +396,7 @@ public: void addDecoration(Id, Decoration, const char*); void addDecoration(Id, Decoration, const std::vector& literals); void addDecoration(Id, Decoration, const std::vector& strings); + void addLinkageDecoration(Id id, const char* name, spv::LinkageType linkType); void addDecorationId(Id id, Decoration, Id idDecoration); void addDecorationId(Id id, Decoration, const std::vector& operandIds); void addMemberDecoration(Id, unsigned int member, Decoration, int num = -1); @@ -412,9 +420,9 @@ public: // Make a shader-style function, and create its entry block if entry is non-zero. // Return the function, pass back the entry. // The returned pointer is only valid for the lifetime of this builder. - Function* makeFunctionEntry(Decoration precision, Id returnType, const char* name, - const std::vector& paramTypes, const std::vector& paramNames, - const std::vector>& precisions, Block **entry = nullptr); + Function* makeFunctionEntry(Decoration precision, Id returnType, const char* name, LinkageType linkType, + const std::vector& paramTypes, + const std::vector>& precisions, Block** entry = nullptr); // Create a return. An 'implicit' return is one not appearing in the source // code. In the case of an implicit return, no post-return block is inserted. @@ -462,8 +470,10 @@ public: // Create an OpArrayLength instruction Id createArrayLength(Id base, unsigned int member); + // Create an OpCooperativeMatrixLengthKHR instruction + Id createCooperativeMatrixLengthKHR(Id type); // Create an OpCooperativeMatrixLengthNV instruction - Id createCooperativeMatrixLength(Id type); + Id createCooperativeMatrixLengthNV(Id type); // Create an OpCompositeExtract instruction Id createCompositeExtract(Id composite, Id typeId, unsigned index); @@ -698,11 +708,6 @@ public: // Accumulate whether anything in the chain of structures has coherent decorations. struct CoherentFlags { CoherentFlags() { clear(); } -#ifdef GLSLANG_WEB - void clear() { } - bool isVolatile() const { return false; } - CoherentFlags operator |=(const CoherentFlags &other) { return *this; } -#else bool isVolatile() const { return volatil; } bool isNonUniform() const { return nonUniform; } bool anyCoherent() const { @@ -747,7 +752,6 @@ public: nonUniform |= other.nonUniform; return *this; } -#endif }; CoherentFlags coherentFlags; }; @@ -828,19 +832,17 @@ public: // Add capabilities, extensions, remove unneeded decorations, etc., // based on the resulting SPIR-V. - void postProcess(); + void postProcess(bool compileOnly); // Prune unreachable blocks in the CFG and remove unneeded decorations. void postProcessCFG(); -#ifndef GLSLANG_WEB // Add capabilities, extensions based on instructions in the module. void postProcessFeatures(); // Hook to visit each instruction in a block in a function void postProcess(Instruction&); // Hook to visit each non-32-bit sized float/int operation in a block. void postProcessType(const Instruction&, spv::Id typeId); -#endif void dump(std::vector&) const; diff --git a/SPIRV/SpvPostProcess.cpp b/SPIRV/SpvPostProcess.cpp index b185f61b..13001a67 100755 --- a/SPIRV/SpvPostProcess.cpp +++ b/SPIRV/SpvPostProcess.cpp @@ -53,11 +53,11 @@ namespace spv { #include "GLSL.ext.AMD.h" #include "GLSL.ext.NV.h" #include "GLSL.ext.ARM.h" + #include "GLSL.ext.QCOM.h" } namespace spv { -#ifndef GLSLANG_WEB // Hook to visit each operand type and result type of an instruction. // Will be called multiple times for one instruction, once for each typed // operand and the result. @@ -334,7 +334,6 @@ void Builder::postProcess(Instruction& inst) } } } -#endif // comment in header void Builder::postProcessCFG() @@ -395,7 +394,6 @@ void Builder::postProcessCFG() decorations.end()); } -#ifndef GLSLANG_WEB // comment in header void Builder::postProcessFeatures() { // Add per-instruction capabilities, extensions, etc., @@ -483,14 +481,15 @@ void Builder::postProcessFeatures() { } } } -#endif // comment in header -void Builder::postProcess() { - postProcessCFG(); -#ifndef GLSLANG_WEB - postProcessFeatures(); -#endif +void Builder::postProcess(bool compileOnly) +{ + // postProcessCFG needs an entrypoint to determine what is reachable, but if we are not creating an "executable" shader, we don't have an entrypoint + if (!compileOnly) + postProcessCFG(); + + postProcessFeatures(); } }; // end spv namespace diff --git a/SPIRV/SpvTools.cpp b/SPIRV/SpvTools.cpp index 1b262800..ff04f4f9 100755 --- a/SPIRV/SpvTools.cpp +++ b/SPIRV/SpvTools.cpp @@ -226,7 +226,7 @@ void SpirvToolsTransform(const glslang::TIntermediate& intermediate, std::vector bool SpirvToolsAnalyzeDeadOutputStores(spv_target_env target_env, std::vector& spirv, std::unordered_set* live_locs, std::unordered_set* live_builtins, - spv::SpvBuildLogger* logger) + spv::SpvBuildLogger*) { spvtools::Optimizer optimizer(target_env); optimizer.SetMessageConsumer(OptimizerMesssageConsumer); @@ -242,7 +242,7 @@ bool SpirvToolsAnalyzeDeadOutputStores(spv_target_env target_env, std::vector& spirv, std::unordered_set* live_locs, std::unordered_set* live_builtins, - spv::SpvBuildLogger* logger) + spv::SpvBuildLogger*) { spvtools::Optimizer optimizer(target_env); optimizer.SetMessageConsumer(OptimizerMesssageConsumer); @@ -259,7 +259,7 @@ void SpirvToolsEliminateDeadOutputStores(spv_target_env target_env, std::vector< } void SpirvToolsEliminateDeadInputComponents(spv_target_env target_env, std::vector& spirv, - spv::SpvBuildLogger* logger) + spv::SpvBuildLogger*) { spvtools::Optimizer optimizer(target_env); optimizer.SetMessageConsumer(OptimizerMesssageConsumer); diff --git a/SPIRV/SpvTools.h b/SPIRV/SpvTools.h index 6fc4e40b..eabde466 100755 --- a/SPIRV/SpvTools.h +++ b/SPIRV/SpvTools.h @@ -48,21 +48,11 @@ #endif #include "glslang/MachineIndependent/localintermediate.h" +#include "GlslangToSpv.h" #include "Logger.h" namespace glslang { -struct SpvOptions { - bool generateDebugInfo {false}; - bool stripDebugInfo {false}; - bool disableOptimizer {true}; - bool optimizeSize {false}; - bool disassemble {false}; - bool validate {false}; - bool emitNonSemanticShaderDebugInfo {false}; - bool emitNonSemanticShaderDebugSource{ false }; -}; - #if ENABLE_OPT // Translate glslang's view of target versioning to what SPIRV-Tools uses. diff --git a/SPIRV/disassemble.cpp b/SPIRV/disassemble.cpp index 387376d8..c5e961cf 100755 --- a/SPIRV/disassemble.cpp +++ b/SPIRV/disassemble.cpp @@ -55,6 +55,8 @@ namespace spv { #include "GLSL.ext.AMD.h" #include "GLSL.ext.NV.h" #include "GLSL.ext.ARM.h" + #include "NonSemanticShaderDebugInfo100.h" + #include "GLSL.ext.QCOM.h" } } const char* GlslStd450DebugNames[spv::GLSLstd450Count]; @@ -63,6 +65,7 @@ namespace spv { static const char* GLSLextAMDGetDebugNames(const char*, unsigned); static const char* GLSLextNVGetDebugNames(const char*, unsigned); +static const char* NonSemanticShaderDebugInfo100GetDebugNames(unsigned); static void Kill(std::ostream& out, const char* message) { @@ -77,6 +80,7 @@ enum ExtInstSet { GLSLextNVInst, OpenCLExtInst, NonSemanticDebugPrintfExtInst, + NonSemanticShaderDebugInfo100 }; // Container class for a single instance of a SPIR-V stream, with methods for disassembly. @@ -502,6 +506,8 @@ void SpirvStream::disassembleInstruction(Id resultId, Id /*typeId*/, Op opCode, extInstSet = OpenCLExtInst; } else if (strcmp("NonSemantic.DebugPrintf", name) == 0) { extInstSet = NonSemanticDebugPrintfExtInst; + } else if (strcmp("NonSemantic.Shader.DebugInfo.100", name) == 0) { + extInstSet = NonSemanticShaderDebugInfo100; } else if (strcmp(spv::E_SPV_AMD_shader_ballot, name) == 0 || strcmp(spv::E_SPV_AMD_shader_trinary_minmax, name) == 0 || strcmp(spv::E_SPV_AMD_shader_explicit_vertex_parameter, name) == 0 || @@ -510,7 +516,7 @@ void SpirvStream::disassembleInstruction(Id resultId, Id /*typeId*/, Op opCode, } else if (strcmp(spv::E_SPV_NV_sample_mask_override_coverage, name) == 0 || strcmp(spv::E_SPV_NV_geometry_shader_passthrough, name) == 0 || strcmp(spv::E_SPV_NV_viewport_array2, name) == 0 || - strcmp(spv::E_SPV_NVX_multiview_per_view_attributes, name) == 0 || + strcmp(spv::E_SPV_NVX_multiview_per_view_attributes, name) == 0 || strcmp(spv::E_SPV_NV_fragment_shader_barycentric, name) == 0 || strcmp(spv::E_SPV_NV_mesh_shader, name) == 0) { extInstSet = GLSLextNVInst; @@ -527,6 +533,8 @@ void SpirvStream::disassembleInstruction(Id resultId, Id /*typeId*/, Op opCode, out << "(" << GLSLextNVGetDebugNames(name, entrypoint) << ")"; } else if (extInstSet == NonSemanticDebugPrintfExtInst) { out << "(DebugPrintf)"; + } else if (extInstSet == NonSemanticShaderDebugInfo100) { + out << "(" << NonSemanticShaderDebugInfo100GetDebugNames(entrypoint) << ")"; } } break; @@ -750,6 +758,59 @@ static const char* GLSLextNVGetDebugNames(const char* name, unsigned entrypoint) return "Bad"; } +static const char* NonSemanticShaderDebugInfo100GetDebugNames(unsigned entrypoint) +{ + switch (entrypoint) { + case NonSemanticShaderDebugInfo100DebugInfoNone: return "DebugInfoNone"; + case NonSemanticShaderDebugInfo100DebugCompilationUnit: return "DebugCompilationUnit"; + case NonSemanticShaderDebugInfo100DebugTypeBasic: return "DebugTypeBasic"; + case NonSemanticShaderDebugInfo100DebugTypePointer: return "DebugTypePointer"; + case NonSemanticShaderDebugInfo100DebugTypeQualifier: return "DebugTypeQualifier"; + case NonSemanticShaderDebugInfo100DebugTypeArray: return "DebugTypeArray"; + case NonSemanticShaderDebugInfo100DebugTypeVector: return "DebugTypeVector"; + case NonSemanticShaderDebugInfo100DebugTypedef: return "DebugTypedef"; + case NonSemanticShaderDebugInfo100DebugTypeFunction: return "DebugTypeFunction"; + case NonSemanticShaderDebugInfo100DebugTypeEnum: return "DebugTypeEnum"; + case NonSemanticShaderDebugInfo100DebugTypeComposite: return "DebugTypeComposite"; + case NonSemanticShaderDebugInfo100DebugTypeMember: return "DebugTypeMember"; + case NonSemanticShaderDebugInfo100DebugTypeInheritance: return "DebugTypeInheritance"; + case NonSemanticShaderDebugInfo100DebugTypePtrToMember: return "DebugTypePtrToMember"; + case NonSemanticShaderDebugInfo100DebugTypeTemplate: return "DebugTypeTemplate"; + case NonSemanticShaderDebugInfo100DebugTypeTemplateParameter: return "DebugTypeTemplateParameter"; + case NonSemanticShaderDebugInfo100DebugTypeTemplateTemplateParameter: return "DebugTypeTemplateTemplateParameter"; + case NonSemanticShaderDebugInfo100DebugTypeTemplateParameterPack: return "DebugTypeTemplateParameterPack"; + case NonSemanticShaderDebugInfo100DebugGlobalVariable: return "DebugGlobalVariable"; + case NonSemanticShaderDebugInfo100DebugFunctionDeclaration: return "DebugFunctionDeclaration"; + case NonSemanticShaderDebugInfo100DebugFunction: return "DebugFunction"; + case NonSemanticShaderDebugInfo100DebugLexicalBlock: return "DebugLexicalBlock"; + case NonSemanticShaderDebugInfo100DebugLexicalBlockDiscriminator: return "DebugLexicalBlockDiscriminator"; + case NonSemanticShaderDebugInfo100DebugScope: return "DebugScope"; + case NonSemanticShaderDebugInfo100DebugNoScope: return "DebugNoScope"; + case NonSemanticShaderDebugInfo100DebugInlinedAt: return "DebugInlinedAt"; + case NonSemanticShaderDebugInfo100DebugLocalVariable: return "DebugLocalVariable"; + case NonSemanticShaderDebugInfo100DebugInlinedVariable: return "DebugInlinedVariable"; + case NonSemanticShaderDebugInfo100DebugDeclare: return "DebugDeclare"; + case NonSemanticShaderDebugInfo100DebugValue: return "DebugValue"; + case NonSemanticShaderDebugInfo100DebugOperation: return "DebugOperation"; + case NonSemanticShaderDebugInfo100DebugExpression: return "DebugExpression"; + case NonSemanticShaderDebugInfo100DebugMacroDef: return "DebugMacroDef"; + case NonSemanticShaderDebugInfo100DebugMacroUndef: return "DebugMacroUndef"; + case NonSemanticShaderDebugInfo100DebugImportedEntity: return "DebugImportedEntity"; + case NonSemanticShaderDebugInfo100DebugSource: return "DebugSource"; + case NonSemanticShaderDebugInfo100DebugFunctionDefinition: return "DebugFunctionDefinition"; + case NonSemanticShaderDebugInfo100DebugSourceContinued: return "DebugSourceContinued"; + case NonSemanticShaderDebugInfo100DebugLine: return "DebugLine"; + case NonSemanticShaderDebugInfo100DebugNoLine: return "DebugNoLine"; + case NonSemanticShaderDebugInfo100DebugBuildIdentifier: return "DebugBuildIdentifier"; + case NonSemanticShaderDebugInfo100DebugStoragePath: return "DebugStoragePath"; + case NonSemanticShaderDebugInfo100DebugEntryPoint: return "DebugEntryPoint"; + case NonSemanticShaderDebugInfo100DebugTypeMatrix: return "DebugTypeMatrix"; + default: return "Bad"; + } + + return "Bad"; +} + void Disassemble(std::ostream& out, const std::vector& stream) { SpirvStream SpirvStream(out, stream); diff --git a/SPIRV/doc.cpp b/SPIRV/doc.cpp index 1534c689..1a05c673 100755 --- a/SPIRV/doc.cpp +++ b/SPIRV/doc.cpp @@ -45,6 +45,7 @@ #include #include #include +#include namespace spv { extern "C" { @@ -54,6 +55,7 @@ namespace spv { #include "GLSL.ext.AMD.h" #include "GLSL.ext.NV.h" #include "GLSL.ext.ARM.h" + #include "GLSL.ext.QCOM.h" } } @@ -215,6 +217,10 @@ const char* ExecutionModeString(int mode) case ExecutionModeNoGlobalOffsetINTEL: return "NoGlobalOffsetINTEL"; case ExecutionModeNumSIMDWorkitemsINTEL: return "NumSIMDWorkitemsINTEL"; + case ExecutionModeNonCoherentColorAttachmentReadEXT: return "NonCoherentColorAttachmentReadEXT"; + case ExecutionModeNonCoherentDepthAttachmentReadEXT: return "NonCoherentDepthAttachmentReadEXT"; + case ExecutionModeNonCoherentStencilAttachmentReadEXT: return "NonCoherentStencilAttachmentReadEXT"; + case ExecutionModeCeiling: default: return "Bad"; } @@ -246,6 +252,8 @@ const char* StorageClassString(int StorageClass) case StorageClassPhysicalStorageBufferEXT: return "PhysicalStorageBufferEXT"; case StorageClassTaskPayloadWorkgroupEXT: return "TaskPayloadWorkgroupEXT"; + case StorageClassHitObjectAttributeNV: return "HitObjectAttributeNV"; + case StorageClassTileImageEXT: return "TileImageEXT"; default: return "Bad"; } } @@ -304,7 +312,9 @@ const char* DecorationString(int decoration) case DecorationCeiling: default: return "Bad"; - case DecorationExplicitInterpAMD: return "ExplicitInterpAMD"; + case DecorationWeightTextureQCOM: return "DecorationWeightTextureQCOM"; + case DecorationBlockMatchTextureQCOM: return "DecorationBlockMatchTextureQCOM"; + case DecorationExplicitInterpAMD: return "ExplicitInterpAMD"; case DecorationOverrideCoverageNV: return "OverrideCoverageNV"; case DecorationPassthroughNV: return "PassthroughNV"; case DecorationViewportRelativeNV: return "ViewportRelativeNV"; @@ -312,7 +322,7 @@ const char* DecorationString(int decoration) case DecorationPerPrimitiveNV: return "PerPrimitiveNV"; case DecorationPerViewNV: return "PerViewNV"; case DecorationPerTaskNV: return "PerTaskNV"; - + case DecorationPerVertexKHR: return "PerVertexKHR"; case DecorationNonUniformEXT: return "DecorationNonUniformEXT"; @@ -320,6 +330,8 @@ const char* DecorationString(int decoration) case DecorationHlslSemanticGOOGLE: return "DecorationHlslSemanticGOOGLE"; case DecorationRestrictPointerEXT: return "DecorationRestrictPointerEXT"; case DecorationAliasedPointerEXT: return "DecorationAliasedPointerEXT"; + + case DecorationHitObjectShaderRecordBufferNV: return "DecorationHitObjectShaderRecordBufferNV"; } } @@ -401,6 +413,11 @@ const char* BuiltInString(int builtIn) case BuiltInRayTminKHR: return "RayTminKHR"; case BuiltInRayTmaxKHR: return "RayTmaxKHR"; case BuiltInCullMaskKHR: return "CullMaskKHR"; + case BuiltInHitTriangleVertexPositionsKHR: return "HitTriangleVertexPositionsKHR"; + case BuiltInHitMicroTriangleVertexPositionsNV: return "HitMicroTriangleVertexPositionsNV"; + case BuiltInHitMicroTriangleVertexBarycentricsNV: return "HitMicroTriangleVertexBarycentricsNV"; + case BuiltInHitKindFrontFacingMicroTriangleNV: return "HitKindFrontFacingMicroTriangleNV"; + case BuiltInHitKindBackFacingMicroTriangleNV: return "HitKindBackFacingMicroTriangleNV"; case BuiltInInstanceCustomIndexKHR: return "InstanceCustomIndexKHR"; case BuiltInRayGeometryIndexKHR: return "RayGeometryIndexKHR"; case BuiltInObjectToWorldKHR: return "ObjectToWorldKHR"; @@ -460,6 +477,7 @@ const char* DimensionString(int dim) case 4: return "Rect"; case 5: return "Buffer"; case 6: return "SubpassData"; + case DimTileImageDataEXT: return "TileImageDataEXT"; default: return "Bad"; } @@ -574,7 +592,7 @@ const char* ImageChannelOrderString(int format) case 17: return "sRGBA"; case 18: return "sBGRA"; - default: + default: return "Bad"; } } @@ -779,6 +797,21 @@ const char* MemoryAccessString(int mem) } } +const int CooperativeMatrixOperandsCeiling = 6; + +const char* CooperativeMatrixOperandsString(int op) +{ + switch (op) { + case CooperativeMatrixOperandsMatrixASignedComponentsKHRShift: return "ASignedComponentsKHR"; + case CooperativeMatrixOperandsMatrixBSignedComponentsKHRShift: return "BSignedComponentsKHR"; + case CooperativeMatrixOperandsMatrixCSignedComponentsKHRShift: return "CSignedComponentsKHR"; + case CooperativeMatrixOperandsMatrixResultSignedComponentsKHRShift: return "ResultSignedComponentsKHR"; + case CooperativeMatrixOperandsSaturatingAccumulationKHRShift: return "SaturatingAccumulationKHR"; + + default: return "Bad"; + } +} + const char* ScopeString(int mem) { switch (mem) { @@ -860,7 +893,7 @@ const char* CapabilityString(int info) case 22: return "Int16"; case 23: return "TessellationPointSize"; case 24: return "GeometryPointSize"; - case 25: return "ImageGatherExtended"; + case 25: return "ImageGatherExtended"; case 26: return "Bad"; case 27: return "StorageImageMultisample"; case 28: return "UniformBufferArrayDynamicIndexing"; @@ -947,6 +980,10 @@ const char* CapabilityString(int info) case CapabilityRayQueryKHR: return "RayQueryKHR"; case CapabilityRayTracingProvisionalKHR: return "RayTracingProvisionalKHR"; case CapabilityRayTraversalPrimitiveCullingKHR: return "RayTraversalPrimitiveCullingKHR"; + case CapabilityRayTracingPositionFetchKHR: return "RayTracingPositionFetchKHR"; + case CapabilityDisplacementMicromapNV: return "DisplacementMicromapNV"; + case CapabilityRayTracingDisplacementMicromapNV: return "CapabilityRayTracingDisplacementMicromapNV"; + case CapabilityRayQueryPositionFetchKHR: return "RayQueryPositionFetchKHR"; case CapabilityComputeDerivativeGroupQuadsNV: return "ComputeDerivativeGroupQuadsNV"; case CapabilityComputeDerivativeGroupLinearNV: return "ComputeDerivativeGroupLinearNV"; case CapabilityFragmentBarycentricKHR: return "FragmentBarycentricKHR"; @@ -980,12 +1017,17 @@ const char* CapabilityString(int info) case CapabilityVariablePointers: return "VariablePointers"; case CapabilityCooperativeMatrixNV: return "CooperativeMatrixNV"; + case CapabilityCooperativeMatrixKHR: return "CooperativeMatrixKHR"; case CapabilityShaderSMBuiltinsNV: return "ShaderSMBuiltinsNV"; case CapabilityFragmentShaderSampleInterlockEXT: return "CapabilityFragmentShaderSampleInterlockEXT"; case CapabilityFragmentShaderPixelInterlockEXT: return "CapabilityFragmentShaderPixelInterlockEXT"; case CapabilityFragmentShaderShadingRateInterlockEXT: return "CapabilityFragmentShaderShadingRateInterlockEXT"; + case CapabilityTileImageColorReadAccessEXT: return "TileImageColorReadAccessEXT"; + case CapabilityTileImageDepthReadAccessEXT: return "TileImageDepthReadAccessEXT"; + case CapabilityTileImageStencilReadAccessEXT: return "TileImageStencilReadAccessEXT"; + case CapabilityFragmentShadingRateKHR: return "FragmentShadingRateKHR"; case CapabilityDemoteToHelperInvocationEXT: return "DemoteToHelperInvocationEXT"; @@ -1006,6 +1048,12 @@ const char* CapabilityString(int info) case CapabilityWorkgroupMemoryExplicitLayout16BitAccessKHR: return "CapabilityWorkgroupMemoryExplicitLayout16BitAccessKHR"; case CapabilityCoreBuiltinsARM: return "CoreBuiltinsARM"; + case CapabilityShaderInvocationReorderNV: return "ShaderInvocationReorderNV"; + + case CapabilityTextureSampleWeightedQCOM: return "TextureSampleWeightedQCOM"; + case CapabilityTextureBoxFilterQCOM: return "TextureBoxFilterQCOM"; + case CapabilityTextureBlockMatchQCOM: return "TextureBlockMatchQCOM"; + default: return "Bad"; } } @@ -1448,18 +1496,70 @@ const char* OpcodeString(int op) case OpRayQueryGetWorldRayOriginKHR: return "OpRayQueryGetWorldRayOriginKHR"; case OpRayQueryGetIntersectionObjectToWorldKHR: return "OpRayQueryGetIntersectionObjectToWorldKHR"; case OpRayQueryGetIntersectionWorldToObjectKHR: return "OpRayQueryGetIntersectionWorldToObjectKHR"; + case OpRayQueryGetIntersectionTriangleVertexPositionsKHR: return "OpRayQueryGetIntersectionTriangleVertexPositionsKHR"; case OpTypeCooperativeMatrixNV: return "OpTypeCooperativeMatrixNV"; case OpCooperativeMatrixLoadNV: return "OpCooperativeMatrixLoadNV"; case OpCooperativeMatrixStoreNV: return "OpCooperativeMatrixStoreNV"; case OpCooperativeMatrixMulAddNV: return "OpCooperativeMatrixMulAddNV"; case OpCooperativeMatrixLengthNV: return "OpCooperativeMatrixLengthNV"; + case OpTypeCooperativeMatrixKHR: return "OpTypeCooperativeMatrixKHR"; + case OpCooperativeMatrixLoadKHR: return "OpCooperativeMatrixLoadKHR"; + case OpCooperativeMatrixStoreKHR: return "OpCooperativeMatrixStoreKHR"; + case OpCooperativeMatrixMulAddKHR: return "OpCooperativeMatrixMulAddKHR"; + case OpCooperativeMatrixLengthKHR: return "OpCooperativeMatrixLengthKHR"; case OpDemoteToHelperInvocationEXT: return "OpDemoteToHelperInvocationEXT"; case OpIsHelperInvocationEXT: return "OpIsHelperInvocationEXT"; case OpBeginInvocationInterlockEXT: return "OpBeginInvocationInterlockEXT"; case OpEndInvocationInterlockEXT: return "OpEndInvocationInterlockEXT"; + case OpTypeHitObjectNV: return "OpTypeHitObjectNV"; + case OpHitObjectTraceRayNV: return "OpHitObjectTraceRayNV"; + case OpHitObjectTraceRayMotionNV: return "OpHitObjectTraceRayMotionNV"; + case OpHitObjectRecordHitNV: return "OpHitObjectRecordHitNV"; + case OpHitObjectRecordHitMotionNV: return "OpHitObjectRecordHitMotionNV"; + case OpHitObjectRecordHitWithIndexNV: return "OpHitObjectRecordHitWithIndexNV"; + case OpHitObjectRecordHitWithIndexMotionNV: return "OpHitObjectRecordHitWithIndexMotionNV"; + case OpHitObjectRecordMissNV: return "OpHitObjectRecordMissNV"; + case OpHitObjectRecordMissMotionNV: return "OpHitObjectRecordMissMotionNV"; + case OpHitObjectRecordEmptyNV: return "OpHitObjectRecordEmptyNV"; + case OpHitObjectExecuteShaderNV: return "OpHitObjectExecuteShaderNV"; + case OpReorderThreadWithHintNV: return "OpReorderThreadWithHintNV"; + case OpReorderThreadWithHitObjectNV: return "OpReorderThreadWithHitObjectNV"; + case OpHitObjectGetCurrentTimeNV: return "OpHitObjectGetCurrentTimeNV"; + case OpHitObjectGetAttributesNV: return "OpHitObjectGetAttributesNV"; + case OpHitObjectGetHitKindNV: return "OpHitObjectGetFrontFaceNV"; + case OpHitObjectGetPrimitiveIndexNV: return "OpHitObjectGetPrimitiveIndexNV"; + case OpHitObjectGetGeometryIndexNV: return "OpHitObjectGetGeometryIndexNV"; + case OpHitObjectGetInstanceIdNV: return "OpHitObjectGetInstanceIdNV"; + case OpHitObjectGetInstanceCustomIndexNV: return "OpHitObjectGetInstanceCustomIndexNV"; + case OpHitObjectGetObjectRayDirectionNV: return "OpHitObjectGetObjectRayDirectionNV"; + case OpHitObjectGetObjectRayOriginNV: return "OpHitObjectGetObjectRayOriginNV"; + case OpHitObjectGetWorldRayDirectionNV: return "OpHitObjectGetWorldRayDirectionNV"; + case OpHitObjectGetWorldRayOriginNV: return "OpHitObjectGetWorldRayOriginNV"; + case OpHitObjectGetWorldToObjectNV: return "OpHitObjectGetWorldToObjectNV"; + case OpHitObjectGetObjectToWorldNV: return "OpHitObjectGetObjectToWorldNV"; + case OpHitObjectGetRayTMaxNV: return "OpHitObjectGetRayTMaxNV"; + case OpHitObjectGetRayTMinNV: return "OpHitObjectGetRayTMinNV"; + case OpHitObjectIsEmptyNV: return "OpHitObjectIsEmptyNV"; + case OpHitObjectIsHitNV: return "OpHitObjectIsHitNV"; + case OpHitObjectIsMissNV: return "OpHitObjectIsMissNV"; + case OpHitObjectGetShaderBindingTableRecordIndexNV: return "OpHitObjectGetShaderBindingTableRecordIndexNV"; + case OpHitObjectGetShaderRecordBufferHandleNV: return "OpHitObjectGetShaderRecordBufferHandleNV"; + + case OpFetchMicroTriangleVertexBarycentricNV: return "OpFetchMicroTriangleVertexBarycentricNV"; + case OpFetchMicroTriangleVertexPositionNV: return "OpFetchMicroTriangleVertexPositionNV"; + + case OpColorAttachmentReadEXT: return "OpColorAttachmentReadEXT"; + case OpDepthAttachmentReadEXT: return "OpDepthAttachmentReadEXT"; + case OpStencilAttachmentReadEXT: return "OpStencilAttachmentReadEXT"; + + case OpImageSampleWeightedQCOM: return "OpImageSampleWeightedQCOM"; + case OpImageBoxFilterQCOM: return "OpImageBoxFilterQCOM"; + case OpImageBlockMatchSADQCOM: return "OpImageBlockMatchSADQCOM"; + case OpImageBlockMatchSSDQCOM: return "OpImageBlockMatchSSDQCOM"; + default: return "Bad"; } @@ -1479,1564 +1579,1831 @@ EnumParameters LoopControlParams[FunctionControlCeiling]; EnumParameters SelectionControlParams[SelectControlCeiling]; EnumParameters FunctionControlParams[FunctionControlCeiling]; EnumParameters MemoryAccessParams[MemoryAccessCeiling]; +EnumParameters CooperativeMatrixOperandsParams[CooperativeMatrixOperandsCeiling]; // Set up all the parameterizing descriptions of the opcodes, operands, etc. void Parameterize() { // only do this once. - static bool initialized = false; - if (initialized) - return; - initialized = true; - - // Exceptions to having a result and a resulting type . - // (Everything is initialized to have both). - - InstructionDesc[OpNop].setResultAndType(false, false); - InstructionDesc[OpSource].setResultAndType(false, false); - InstructionDesc[OpSourceContinued].setResultAndType(false, false); - InstructionDesc[OpSourceExtension].setResultAndType(false, false); - InstructionDesc[OpExtension].setResultAndType(false, false); - InstructionDesc[OpExtInstImport].setResultAndType(true, false); - InstructionDesc[OpCapability].setResultAndType(false, false); - InstructionDesc[OpMemoryModel].setResultAndType(false, false); - InstructionDesc[OpEntryPoint].setResultAndType(false, false); - InstructionDesc[OpExecutionMode].setResultAndType(false, false); - InstructionDesc[OpExecutionModeId].setResultAndType(false, false); - InstructionDesc[OpTypeVoid].setResultAndType(true, false); - InstructionDesc[OpTypeBool].setResultAndType(true, false); - InstructionDesc[OpTypeInt].setResultAndType(true, false); - InstructionDesc[OpTypeFloat].setResultAndType(true, false); - InstructionDesc[OpTypeVector].setResultAndType(true, false); - InstructionDesc[OpTypeMatrix].setResultAndType(true, false); - InstructionDesc[OpTypeImage].setResultAndType(true, false); - InstructionDesc[OpTypeSampler].setResultAndType(true, false); - InstructionDesc[OpTypeSampledImage].setResultAndType(true, false); - InstructionDesc[OpTypeArray].setResultAndType(true, false); - InstructionDesc[OpTypeRuntimeArray].setResultAndType(true, false); - InstructionDesc[OpTypeStruct].setResultAndType(true, false); - InstructionDesc[OpTypeOpaque].setResultAndType(true, false); - InstructionDesc[OpTypePointer].setResultAndType(true, false); - InstructionDesc[OpTypeForwardPointer].setResultAndType(false, false); - InstructionDesc[OpTypeFunction].setResultAndType(true, false); - InstructionDesc[OpTypeEvent].setResultAndType(true, false); - InstructionDesc[OpTypeDeviceEvent].setResultAndType(true, false); - InstructionDesc[OpTypeReserveId].setResultAndType(true, false); - InstructionDesc[OpTypeQueue].setResultAndType(true, false); - InstructionDesc[OpTypePipe].setResultAndType(true, false); - InstructionDesc[OpFunctionEnd].setResultAndType(false, false); - InstructionDesc[OpStore].setResultAndType(false, false); - InstructionDesc[OpImageWrite].setResultAndType(false, false); - InstructionDesc[OpDecorationGroup].setResultAndType(true, false); - InstructionDesc[OpDecorate].setResultAndType(false, false); - InstructionDesc[OpDecorateId].setResultAndType(false, false); - InstructionDesc[OpDecorateStringGOOGLE].setResultAndType(false, false); - InstructionDesc[OpMemberDecorate].setResultAndType(false, false); - InstructionDesc[OpMemberDecorateStringGOOGLE].setResultAndType(false, false); - InstructionDesc[OpGroupDecorate].setResultAndType(false, false); - InstructionDesc[OpGroupMemberDecorate].setResultAndType(false, false); - InstructionDesc[OpName].setResultAndType(false, false); - InstructionDesc[OpMemberName].setResultAndType(false, false); - InstructionDesc[OpString].setResultAndType(true, false); - InstructionDesc[OpLine].setResultAndType(false, false); - InstructionDesc[OpNoLine].setResultAndType(false, false); - InstructionDesc[OpCopyMemory].setResultAndType(false, false); - InstructionDesc[OpCopyMemorySized].setResultAndType(false, false); - InstructionDesc[OpEmitVertex].setResultAndType(false, false); - InstructionDesc[OpEndPrimitive].setResultAndType(false, false); - InstructionDesc[OpEmitStreamVertex].setResultAndType(false, false); - InstructionDesc[OpEndStreamPrimitive].setResultAndType(false, false); - InstructionDesc[OpControlBarrier].setResultAndType(false, false); - InstructionDesc[OpMemoryBarrier].setResultAndType(false, false); - InstructionDesc[OpAtomicStore].setResultAndType(false, false); - InstructionDesc[OpLoopMerge].setResultAndType(false, false); - InstructionDesc[OpSelectionMerge].setResultAndType(false, false); - InstructionDesc[OpLabel].setResultAndType(true, false); - InstructionDesc[OpBranch].setResultAndType(false, false); - InstructionDesc[OpBranchConditional].setResultAndType(false, false); - InstructionDesc[OpSwitch].setResultAndType(false, false); - InstructionDesc[OpKill].setResultAndType(false, false); - InstructionDesc[OpTerminateInvocation].setResultAndType(false, false); - InstructionDesc[OpReturn].setResultAndType(false, false); - InstructionDesc[OpReturnValue].setResultAndType(false, false); - InstructionDesc[OpUnreachable].setResultAndType(false, false); - InstructionDesc[OpLifetimeStart].setResultAndType(false, false); - InstructionDesc[OpLifetimeStop].setResultAndType(false, false); - InstructionDesc[OpCommitReadPipe].setResultAndType(false, false); - InstructionDesc[OpCommitWritePipe].setResultAndType(false, false); - InstructionDesc[OpGroupCommitWritePipe].setResultAndType(false, false); - InstructionDesc[OpGroupCommitReadPipe].setResultAndType(false, false); - InstructionDesc[OpCaptureEventProfilingInfo].setResultAndType(false, false); - InstructionDesc[OpSetUserEventStatus].setResultAndType(false, false); - InstructionDesc[OpRetainEvent].setResultAndType(false, false); - InstructionDesc[OpReleaseEvent].setResultAndType(false, false); - InstructionDesc[OpGroupWaitEvents].setResultAndType(false, false); - InstructionDesc[OpAtomicFlagClear].setResultAndType(false, false); - InstructionDesc[OpModuleProcessed].setResultAndType(false, false); - InstructionDesc[OpTypeCooperativeMatrixNV].setResultAndType(true, false); - InstructionDesc[OpCooperativeMatrixStoreNV].setResultAndType(false, false); - InstructionDesc[OpBeginInvocationInterlockEXT].setResultAndType(false, false); - InstructionDesc[OpEndInvocationInterlockEXT].setResultAndType(false, false); - - // Specific additional context-dependent operands - - ExecutionModeOperands[ExecutionModeInvocations].push(OperandLiteralNumber, "'Number of <>'"); - - ExecutionModeOperands[ExecutionModeLocalSize].push(OperandLiteralNumber, "'x size'"); - ExecutionModeOperands[ExecutionModeLocalSize].push(OperandLiteralNumber, "'y size'"); - ExecutionModeOperands[ExecutionModeLocalSize].push(OperandLiteralNumber, "'z size'"); - - ExecutionModeOperands[ExecutionModeLocalSizeHint].push(OperandLiteralNumber, "'x size'"); - ExecutionModeOperands[ExecutionModeLocalSizeHint].push(OperandLiteralNumber, "'y size'"); - ExecutionModeOperands[ExecutionModeLocalSizeHint].push(OperandLiteralNumber, "'z size'"); - - ExecutionModeOperands[ExecutionModeOutputVertices].push(OperandLiteralNumber, "'Vertex count'"); - ExecutionModeOperands[ExecutionModeVecTypeHint].push(OperandLiteralNumber, "'Vector type'"); - - DecorationOperands[DecorationStream].push(OperandLiteralNumber, "'Stream Number'"); - DecorationOperands[DecorationLocation].push(OperandLiteralNumber, "'Location'"); - DecorationOperands[DecorationComponent].push(OperandLiteralNumber, "'Component'"); - DecorationOperands[DecorationIndex].push(OperandLiteralNumber, "'Index'"); - DecorationOperands[DecorationBinding].push(OperandLiteralNumber, "'Binding Point'"); - DecorationOperands[DecorationDescriptorSet].push(OperandLiteralNumber, "'Descriptor Set'"); - DecorationOperands[DecorationOffset].push(OperandLiteralNumber, "'Byte Offset'"); - DecorationOperands[DecorationXfbBuffer].push(OperandLiteralNumber, "'XFB Buffer Number'"); - DecorationOperands[DecorationXfbStride].push(OperandLiteralNumber, "'XFB Stride'"); - DecorationOperands[DecorationArrayStride].push(OperandLiteralNumber, "'Array Stride'"); - DecorationOperands[DecorationMatrixStride].push(OperandLiteralNumber, "'Matrix Stride'"); - DecorationOperands[DecorationBuiltIn].push(OperandLiteralNumber, "See <>"); - DecorationOperands[DecorationFPRoundingMode].push(OperandFPRoundingMode, "'Floating-Point Rounding Mode'"); - DecorationOperands[DecorationFPFastMathMode].push(OperandFPFastMath, "'Fast-Math Mode'"); - DecorationOperands[DecorationLinkageAttributes].push(OperandLiteralString, "'Name'"); - DecorationOperands[DecorationLinkageAttributes].push(OperandLinkageType, "'Linkage Type'"); - DecorationOperands[DecorationFuncParamAttr].push(OperandFuncParamAttr, "'Function Parameter Attribute'"); - DecorationOperands[DecorationSpecId].push(OperandLiteralNumber, "'Specialization Constant ID'"); - DecorationOperands[DecorationInputAttachmentIndex].push(OperandLiteralNumber, "'Attachment Index'"); - DecorationOperands[DecorationAlignment].push(OperandLiteralNumber, "'Alignment'"); - - OperandClassParams[OperandSource].set(0, SourceString, nullptr); - OperandClassParams[OperandExecutionModel].set(0, ExecutionModelString, nullptr); - OperandClassParams[OperandAddressing].set(0, AddressingString, nullptr); - OperandClassParams[OperandMemory].set(0, MemoryString, nullptr); - OperandClassParams[OperandExecutionMode].set(ExecutionModeCeiling, ExecutionModeString, ExecutionModeParams); - OperandClassParams[OperandExecutionMode].setOperands(ExecutionModeOperands); - OperandClassParams[OperandStorage].set(0, StorageClassString, nullptr); - OperandClassParams[OperandDimensionality].set(0, DimensionString, nullptr); - OperandClassParams[OperandSamplerAddressingMode].set(0, SamplerAddressingModeString, nullptr); - OperandClassParams[OperandSamplerFilterMode].set(0, SamplerFilterModeString, nullptr); - OperandClassParams[OperandSamplerImageFormat].set(0, ImageFormatString, nullptr); - OperandClassParams[OperandImageChannelOrder].set(0, ImageChannelOrderString, nullptr); - OperandClassParams[OperandImageChannelDataType].set(0, ImageChannelDataTypeString, nullptr); - OperandClassParams[OperandImageOperands].set(ImageOperandsCeiling, ImageOperandsString, ImageOperandsParams, true); - OperandClassParams[OperandFPFastMath].set(0, FPFastMathString, nullptr, true); - OperandClassParams[OperandFPRoundingMode].set(0, FPRoundingModeString, nullptr); - OperandClassParams[OperandLinkageType].set(0, LinkageTypeString, nullptr); - OperandClassParams[OperandFuncParamAttr].set(0, FuncParamAttrString, nullptr); - OperandClassParams[OperandAccessQualifier].set(0, AccessQualifierString, nullptr); - OperandClassParams[OperandDecoration].set(DecorationCeiling, DecorationString, DecorationParams); - OperandClassParams[OperandDecoration].setOperands(DecorationOperands); - OperandClassParams[OperandBuiltIn].set(0, BuiltInString, nullptr); - OperandClassParams[OperandSelect].set(SelectControlCeiling, SelectControlString, SelectionControlParams, true); - OperandClassParams[OperandLoop].set(LoopControlCeiling, LoopControlString, LoopControlParams, true); - OperandClassParams[OperandFunction].set(FunctionControlCeiling, FunctionControlString, FunctionControlParams, true); - OperandClassParams[OperandMemorySemantics].set(0, MemorySemanticsString, nullptr, true); - OperandClassParams[OperandMemoryAccess].set(MemoryAccessCeiling, MemoryAccessString, MemoryAccessParams, true); - OperandClassParams[OperandScope].set(0, ScopeString, nullptr); - OperandClassParams[OperandGroupOperation].set(0, GroupOperationString, nullptr); - OperandClassParams[OperandKernelEnqueueFlags].set(0, KernelEnqueueFlagsString, nullptr); - OperandClassParams[OperandKernelProfilingInfo].set(0, KernelProfilingInfoString, nullptr, true); - OperandClassParams[OperandCapability].set(0, CapabilityString, nullptr); - OperandClassParams[OperandOpcode].set(OpCodeMask + 1, OpcodeString, nullptr); - - // set name of operator, an initial set of style operands, and the description - - InstructionDesc[OpSource].operands.push(OperandSource, ""); - InstructionDesc[OpSource].operands.push(OperandLiteralNumber, "'Version'"); - InstructionDesc[OpSource].operands.push(OperandId, "'File'", true); - InstructionDesc[OpSource].operands.push(OperandLiteralString, "'Source'", true); - - InstructionDesc[OpSourceContinued].operands.push(OperandLiteralString, "'Continued Source'"); - - InstructionDesc[OpSourceExtension].operands.push(OperandLiteralString, "'Extension'"); - - InstructionDesc[OpName].operands.push(OperandId, "'Target'"); - InstructionDesc[OpName].operands.push(OperandLiteralString, "'Name'"); - - InstructionDesc[OpMemberName].operands.push(OperandId, "'Type'"); - InstructionDesc[OpMemberName].operands.push(OperandLiteralNumber, "'Member'"); - InstructionDesc[OpMemberName].operands.push(OperandLiteralString, "'Name'"); - - InstructionDesc[OpString].operands.push(OperandLiteralString, "'String'"); - - InstructionDesc[OpLine].operands.push(OperandId, "'File'"); - InstructionDesc[OpLine].operands.push(OperandLiteralNumber, "'Line'"); - InstructionDesc[OpLine].operands.push(OperandLiteralNumber, "'Column'"); - - InstructionDesc[OpExtension].operands.push(OperandLiteralString, "'Name'"); - - InstructionDesc[OpExtInstImport].operands.push(OperandLiteralString, "'Name'"); - - InstructionDesc[OpCapability].operands.push(OperandCapability, "'Capability'"); + static std::once_flag initialized; + std::call_once(initialized, [](){ + + // Exceptions to having a result and a resulting type . + // (Everything is initialized to have both). + + InstructionDesc[OpNop].setResultAndType(false, false); + InstructionDesc[OpSource].setResultAndType(false, false); + InstructionDesc[OpSourceContinued].setResultAndType(false, false); + InstructionDesc[OpSourceExtension].setResultAndType(false, false); + InstructionDesc[OpExtension].setResultAndType(false, false); + InstructionDesc[OpExtInstImport].setResultAndType(true, false); + InstructionDesc[OpCapability].setResultAndType(false, false); + InstructionDesc[OpMemoryModel].setResultAndType(false, false); + InstructionDesc[OpEntryPoint].setResultAndType(false, false); + InstructionDesc[OpExecutionMode].setResultAndType(false, false); + InstructionDesc[OpExecutionModeId].setResultAndType(false, false); + InstructionDesc[OpTypeVoid].setResultAndType(true, false); + InstructionDesc[OpTypeBool].setResultAndType(true, false); + InstructionDesc[OpTypeInt].setResultAndType(true, false); + InstructionDesc[OpTypeFloat].setResultAndType(true, false); + InstructionDesc[OpTypeVector].setResultAndType(true, false); + InstructionDesc[OpTypeMatrix].setResultAndType(true, false); + InstructionDesc[OpTypeImage].setResultAndType(true, false); + InstructionDesc[OpTypeSampler].setResultAndType(true, false); + InstructionDesc[OpTypeSampledImage].setResultAndType(true, false); + InstructionDesc[OpTypeArray].setResultAndType(true, false); + InstructionDesc[OpTypeRuntimeArray].setResultAndType(true, false); + InstructionDesc[OpTypeStruct].setResultAndType(true, false); + InstructionDesc[OpTypeOpaque].setResultAndType(true, false); + InstructionDesc[OpTypePointer].setResultAndType(true, false); + InstructionDesc[OpTypeForwardPointer].setResultAndType(false, false); + InstructionDesc[OpTypeFunction].setResultAndType(true, false); + InstructionDesc[OpTypeEvent].setResultAndType(true, false); + InstructionDesc[OpTypeDeviceEvent].setResultAndType(true, false); + InstructionDesc[OpTypeReserveId].setResultAndType(true, false); + InstructionDesc[OpTypeQueue].setResultAndType(true, false); + InstructionDesc[OpTypePipe].setResultAndType(true, false); + InstructionDesc[OpFunctionEnd].setResultAndType(false, false); + InstructionDesc[OpStore].setResultAndType(false, false); + InstructionDesc[OpImageWrite].setResultAndType(false, false); + InstructionDesc[OpDecorationGroup].setResultAndType(true, false); + InstructionDesc[OpDecorate].setResultAndType(false, false); + InstructionDesc[OpDecorateId].setResultAndType(false, false); + InstructionDesc[OpDecorateStringGOOGLE].setResultAndType(false, false); + InstructionDesc[OpMemberDecorate].setResultAndType(false, false); + InstructionDesc[OpMemberDecorateStringGOOGLE].setResultAndType(false, false); + InstructionDesc[OpGroupDecorate].setResultAndType(false, false); + InstructionDesc[OpGroupMemberDecorate].setResultAndType(false, false); + InstructionDesc[OpName].setResultAndType(false, false); + InstructionDesc[OpMemberName].setResultAndType(false, false); + InstructionDesc[OpString].setResultAndType(true, false); + InstructionDesc[OpLine].setResultAndType(false, false); + InstructionDesc[OpNoLine].setResultAndType(false, false); + InstructionDesc[OpCopyMemory].setResultAndType(false, false); + InstructionDesc[OpCopyMemorySized].setResultAndType(false, false); + InstructionDesc[OpEmitVertex].setResultAndType(false, false); + InstructionDesc[OpEndPrimitive].setResultAndType(false, false); + InstructionDesc[OpEmitStreamVertex].setResultAndType(false, false); + InstructionDesc[OpEndStreamPrimitive].setResultAndType(false, false); + InstructionDesc[OpControlBarrier].setResultAndType(false, false); + InstructionDesc[OpMemoryBarrier].setResultAndType(false, false); + InstructionDesc[OpAtomicStore].setResultAndType(false, false); + InstructionDesc[OpLoopMerge].setResultAndType(false, false); + InstructionDesc[OpSelectionMerge].setResultAndType(false, false); + InstructionDesc[OpLabel].setResultAndType(true, false); + InstructionDesc[OpBranch].setResultAndType(false, false); + InstructionDesc[OpBranchConditional].setResultAndType(false, false); + InstructionDesc[OpSwitch].setResultAndType(false, false); + InstructionDesc[OpKill].setResultAndType(false, false); + InstructionDesc[OpTerminateInvocation].setResultAndType(false, false); + InstructionDesc[OpReturn].setResultAndType(false, false); + InstructionDesc[OpReturnValue].setResultAndType(false, false); + InstructionDesc[OpUnreachable].setResultAndType(false, false); + InstructionDesc[OpLifetimeStart].setResultAndType(false, false); + InstructionDesc[OpLifetimeStop].setResultAndType(false, false); + InstructionDesc[OpCommitReadPipe].setResultAndType(false, false); + InstructionDesc[OpCommitWritePipe].setResultAndType(false, false); + InstructionDesc[OpGroupCommitWritePipe].setResultAndType(false, false); + InstructionDesc[OpGroupCommitReadPipe].setResultAndType(false, false); + InstructionDesc[OpCaptureEventProfilingInfo].setResultAndType(false, false); + InstructionDesc[OpSetUserEventStatus].setResultAndType(false, false); + InstructionDesc[OpRetainEvent].setResultAndType(false, false); + InstructionDesc[OpReleaseEvent].setResultAndType(false, false); + InstructionDesc[OpGroupWaitEvents].setResultAndType(false, false); + InstructionDesc[OpAtomicFlagClear].setResultAndType(false, false); + InstructionDesc[OpModuleProcessed].setResultAndType(false, false); + InstructionDesc[OpTypeCooperativeMatrixNV].setResultAndType(true, false); + InstructionDesc[OpCooperativeMatrixStoreNV].setResultAndType(false, false); + InstructionDesc[OpTypeCooperativeMatrixKHR].setResultAndType(true, false); + InstructionDesc[OpCooperativeMatrixStoreKHR].setResultAndType(false, false); + InstructionDesc[OpBeginInvocationInterlockEXT].setResultAndType(false, false); + InstructionDesc[OpEndInvocationInterlockEXT].setResultAndType(false, false); + + // Specific additional context-dependent operands + + ExecutionModeOperands[ExecutionModeInvocations].push(OperandLiteralNumber, "'Number of <>'"); + + ExecutionModeOperands[ExecutionModeLocalSize].push(OperandLiteralNumber, "'x size'"); + ExecutionModeOperands[ExecutionModeLocalSize].push(OperandLiteralNumber, "'y size'"); + ExecutionModeOperands[ExecutionModeLocalSize].push(OperandLiteralNumber, "'z size'"); + + ExecutionModeOperands[ExecutionModeLocalSizeHint].push(OperandLiteralNumber, "'x size'"); + ExecutionModeOperands[ExecutionModeLocalSizeHint].push(OperandLiteralNumber, "'y size'"); + ExecutionModeOperands[ExecutionModeLocalSizeHint].push(OperandLiteralNumber, "'z size'"); + + ExecutionModeOperands[ExecutionModeOutputVertices].push(OperandLiteralNumber, "'Vertex count'"); + ExecutionModeOperands[ExecutionModeVecTypeHint].push(OperandLiteralNumber, "'Vector type'"); + + DecorationOperands[DecorationStream].push(OperandLiteralNumber, "'Stream Number'"); + DecorationOperands[DecorationLocation].push(OperandLiteralNumber, "'Location'"); + DecorationOperands[DecorationComponent].push(OperandLiteralNumber, "'Component'"); + DecorationOperands[DecorationIndex].push(OperandLiteralNumber, "'Index'"); + DecorationOperands[DecorationBinding].push(OperandLiteralNumber, "'Binding Point'"); + DecorationOperands[DecorationDescriptorSet].push(OperandLiteralNumber, "'Descriptor Set'"); + DecorationOperands[DecorationOffset].push(OperandLiteralNumber, "'Byte Offset'"); + DecorationOperands[DecorationXfbBuffer].push(OperandLiteralNumber, "'XFB Buffer Number'"); + DecorationOperands[DecorationXfbStride].push(OperandLiteralNumber, "'XFB Stride'"); + DecorationOperands[DecorationArrayStride].push(OperandLiteralNumber, "'Array Stride'"); + DecorationOperands[DecorationMatrixStride].push(OperandLiteralNumber, "'Matrix Stride'"); + DecorationOperands[DecorationBuiltIn].push(OperandLiteralNumber, "See <>"); + DecorationOperands[DecorationFPRoundingMode].push(OperandFPRoundingMode, "'Floating-Point Rounding Mode'"); + DecorationOperands[DecorationFPFastMathMode].push(OperandFPFastMath, "'Fast-Math Mode'"); + DecorationOperands[DecorationLinkageAttributes].push(OperandLiteralString, "'Name'"); + DecorationOperands[DecorationLinkageAttributes].push(OperandLinkageType, "'Linkage Type'"); + DecorationOperands[DecorationFuncParamAttr].push(OperandFuncParamAttr, "'Function Parameter Attribute'"); + DecorationOperands[DecorationSpecId].push(OperandLiteralNumber, "'Specialization Constant ID'"); + DecorationOperands[DecorationInputAttachmentIndex].push(OperandLiteralNumber, "'Attachment Index'"); + DecorationOperands[DecorationAlignment].push(OperandLiteralNumber, "'Alignment'"); + + OperandClassParams[OperandSource].set(0, SourceString, nullptr); + OperandClassParams[OperandExecutionModel].set(0, ExecutionModelString, nullptr); + OperandClassParams[OperandAddressing].set(0, AddressingString, nullptr); + OperandClassParams[OperandMemory].set(0, MemoryString, nullptr); + OperandClassParams[OperandExecutionMode].set(ExecutionModeCeiling, ExecutionModeString, ExecutionModeParams); + OperandClassParams[OperandExecutionMode].setOperands(ExecutionModeOperands); + OperandClassParams[OperandStorage].set(0, StorageClassString, nullptr); + OperandClassParams[OperandDimensionality].set(0, DimensionString, nullptr); + OperandClassParams[OperandSamplerAddressingMode].set(0, SamplerAddressingModeString, nullptr); + OperandClassParams[OperandSamplerFilterMode].set(0, SamplerFilterModeString, nullptr); + OperandClassParams[OperandSamplerImageFormat].set(0, ImageFormatString, nullptr); + OperandClassParams[OperandImageChannelOrder].set(0, ImageChannelOrderString, nullptr); + OperandClassParams[OperandImageChannelDataType].set(0, ImageChannelDataTypeString, nullptr); + OperandClassParams[OperandImageOperands].set(ImageOperandsCeiling, ImageOperandsString, ImageOperandsParams, true); + OperandClassParams[OperandFPFastMath].set(0, FPFastMathString, nullptr, true); + OperandClassParams[OperandFPRoundingMode].set(0, FPRoundingModeString, nullptr); + OperandClassParams[OperandLinkageType].set(0, LinkageTypeString, nullptr); + OperandClassParams[OperandFuncParamAttr].set(0, FuncParamAttrString, nullptr); + OperandClassParams[OperandAccessQualifier].set(0, AccessQualifierString, nullptr); + OperandClassParams[OperandDecoration].set(DecorationCeiling, DecorationString, DecorationParams); + OperandClassParams[OperandDecoration].setOperands(DecorationOperands); + OperandClassParams[OperandBuiltIn].set(0, BuiltInString, nullptr); + OperandClassParams[OperandSelect].set(SelectControlCeiling, SelectControlString, SelectionControlParams, true); + OperandClassParams[OperandLoop].set(LoopControlCeiling, LoopControlString, LoopControlParams, true); + OperandClassParams[OperandFunction].set(FunctionControlCeiling, FunctionControlString, FunctionControlParams, true); + OperandClassParams[OperandMemorySemantics].set(0, MemorySemanticsString, nullptr, true); + OperandClassParams[OperandMemoryAccess].set(MemoryAccessCeiling, MemoryAccessString, MemoryAccessParams, true); + OperandClassParams[OperandScope].set(0, ScopeString, nullptr); + OperandClassParams[OperandGroupOperation].set(0, GroupOperationString, nullptr); + OperandClassParams[OperandKernelEnqueueFlags].set(0, KernelEnqueueFlagsString, nullptr); + OperandClassParams[OperandKernelProfilingInfo].set(0, KernelProfilingInfoString, nullptr, true); + OperandClassParams[OperandCapability].set(0, CapabilityString, nullptr); + OperandClassParams[OperandCooperativeMatrixOperands].set(CooperativeMatrixOperandsCeiling, CooperativeMatrixOperandsString, CooperativeMatrixOperandsParams, true); + OperandClassParams[OperandOpcode].set(OpCodeMask + 1, OpcodeString, nullptr); + + // set name of operator, an initial set of style operands, and the description + + InstructionDesc[OpSource].operands.push(OperandSource, ""); + InstructionDesc[OpSource].operands.push(OperandLiteralNumber, "'Version'"); + InstructionDesc[OpSource].operands.push(OperandId, "'File'", true); + InstructionDesc[OpSource].operands.push(OperandLiteralString, "'Source'", true); + + InstructionDesc[OpSourceContinued].operands.push(OperandLiteralString, "'Continued Source'"); + + InstructionDesc[OpSourceExtension].operands.push(OperandLiteralString, "'Extension'"); + + InstructionDesc[OpName].operands.push(OperandId, "'Target'"); + InstructionDesc[OpName].operands.push(OperandLiteralString, "'Name'"); + + InstructionDesc[OpMemberName].operands.push(OperandId, "'Type'"); + InstructionDesc[OpMemberName].operands.push(OperandLiteralNumber, "'Member'"); + InstructionDesc[OpMemberName].operands.push(OperandLiteralString, "'Name'"); + + InstructionDesc[OpString].operands.push(OperandLiteralString, "'String'"); + + InstructionDesc[OpLine].operands.push(OperandId, "'File'"); + InstructionDesc[OpLine].operands.push(OperandLiteralNumber, "'Line'"); + InstructionDesc[OpLine].operands.push(OperandLiteralNumber, "'Column'"); + + InstructionDesc[OpExtension].operands.push(OperandLiteralString, "'Name'"); + + InstructionDesc[OpExtInstImport].operands.push(OperandLiteralString, "'Name'"); + + InstructionDesc[OpCapability].operands.push(OperandCapability, "'Capability'"); + + InstructionDesc[OpMemoryModel].operands.push(OperandAddressing, ""); + InstructionDesc[OpMemoryModel].operands.push(OperandMemory, ""); + + InstructionDesc[OpEntryPoint].operands.push(OperandExecutionModel, ""); + InstructionDesc[OpEntryPoint].operands.push(OperandId, "'Entry Point'"); + InstructionDesc[OpEntryPoint].operands.push(OperandLiteralString, "'Name'"); + InstructionDesc[OpEntryPoint].operands.push(OperandVariableIds, "'Interface'"); + + InstructionDesc[OpExecutionMode].operands.push(OperandId, "'Entry Point'"); + InstructionDesc[OpExecutionMode].operands.push(OperandExecutionMode, "'Mode'"); + InstructionDesc[OpExecutionMode].operands.push(OperandOptionalLiteral, "See <>"); + + InstructionDesc[OpExecutionModeId].operands.push(OperandId, "'Entry Point'"); + InstructionDesc[OpExecutionModeId].operands.push(OperandExecutionMode, "'Mode'"); + InstructionDesc[OpExecutionModeId].operands.push(OperandVariableIds, "See <>"); + + InstructionDesc[OpTypeInt].operands.push(OperandLiteralNumber, "'Width'"); + InstructionDesc[OpTypeInt].operands.push(OperandLiteralNumber, "'Signedness'"); + + InstructionDesc[OpTypeFloat].operands.push(OperandLiteralNumber, "'Width'"); + + InstructionDesc[OpTypeVector].operands.push(OperandId, "'Component Type'"); + InstructionDesc[OpTypeVector].operands.push(OperandLiteralNumber, "'Component Count'"); - InstructionDesc[OpMemoryModel].operands.push(OperandAddressing, ""); - InstructionDesc[OpMemoryModel].operands.push(OperandMemory, ""); - - InstructionDesc[OpEntryPoint].operands.push(OperandExecutionModel, ""); - InstructionDesc[OpEntryPoint].operands.push(OperandId, "'Entry Point'"); - InstructionDesc[OpEntryPoint].operands.push(OperandLiteralString, "'Name'"); - InstructionDesc[OpEntryPoint].operands.push(OperandVariableIds, "'Interface'"); - - InstructionDesc[OpExecutionMode].operands.push(OperandId, "'Entry Point'"); - InstructionDesc[OpExecutionMode].operands.push(OperandExecutionMode, "'Mode'"); - InstructionDesc[OpExecutionMode].operands.push(OperandOptionalLiteral, "See <>"); - - InstructionDesc[OpExecutionModeId].operands.push(OperandId, "'Entry Point'"); - InstructionDesc[OpExecutionModeId].operands.push(OperandExecutionMode, "'Mode'"); - InstructionDesc[OpExecutionModeId].operands.push(OperandVariableIds, "See <>"); - - InstructionDesc[OpTypeInt].operands.push(OperandLiteralNumber, "'Width'"); - InstructionDesc[OpTypeInt].operands.push(OperandLiteralNumber, "'Signedness'"); - - InstructionDesc[OpTypeFloat].operands.push(OperandLiteralNumber, "'Width'"); - - InstructionDesc[OpTypeVector].operands.push(OperandId, "'Component Type'"); - InstructionDesc[OpTypeVector].operands.push(OperandLiteralNumber, "'Component Count'"); + InstructionDesc[OpTypeMatrix].operands.push(OperandId, "'Column Type'"); + InstructionDesc[OpTypeMatrix].operands.push(OperandLiteralNumber, "'Column Count'"); - InstructionDesc[OpTypeMatrix].operands.push(OperandId, "'Column Type'"); - InstructionDesc[OpTypeMatrix].operands.push(OperandLiteralNumber, "'Column Count'"); + InstructionDesc[OpTypeImage].operands.push(OperandId, "'Sampled Type'"); + InstructionDesc[OpTypeImage].operands.push(OperandDimensionality, ""); + InstructionDesc[OpTypeImage].operands.push(OperandLiteralNumber, "'Depth'"); + InstructionDesc[OpTypeImage].operands.push(OperandLiteralNumber, "'Arrayed'"); + InstructionDesc[OpTypeImage].operands.push(OperandLiteralNumber, "'MS'"); + InstructionDesc[OpTypeImage].operands.push(OperandLiteralNumber, "'Sampled'"); + InstructionDesc[OpTypeImage].operands.push(OperandSamplerImageFormat, ""); + InstructionDesc[OpTypeImage].operands.push(OperandAccessQualifier, "", true); - InstructionDesc[OpTypeImage].operands.push(OperandId, "'Sampled Type'"); - InstructionDesc[OpTypeImage].operands.push(OperandDimensionality, ""); - InstructionDesc[OpTypeImage].operands.push(OperandLiteralNumber, "'Depth'"); - InstructionDesc[OpTypeImage].operands.push(OperandLiteralNumber, "'Arrayed'"); - InstructionDesc[OpTypeImage].operands.push(OperandLiteralNumber, "'MS'"); - InstructionDesc[OpTypeImage].operands.push(OperandLiteralNumber, "'Sampled'"); - InstructionDesc[OpTypeImage].operands.push(OperandSamplerImageFormat, ""); - InstructionDesc[OpTypeImage].operands.push(OperandAccessQualifier, "", true); + InstructionDesc[OpTypeSampledImage].operands.push(OperandId, "'Image Type'"); - InstructionDesc[OpTypeSampledImage].operands.push(OperandId, "'Image Type'"); + InstructionDesc[OpTypeArray].operands.push(OperandId, "'Element Type'"); + InstructionDesc[OpTypeArray].operands.push(OperandId, "'Length'"); - InstructionDesc[OpTypeArray].operands.push(OperandId, "'Element Type'"); - InstructionDesc[OpTypeArray].operands.push(OperandId, "'Length'"); + InstructionDesc[OpTypeRuntimeArray].operands.push(OperandId, "'Element Type'"); - InstructionDesc[OpTypeRuntimeArray].operands.push(OperandId, "'Element Type'"); + InstructionDesc[OpTypeStruct].operands.push(OperandVariableIds, "'Member 0 type', +\n'member 1 type', +\n..."); - InstructionDesc[OpTypeStruct].operands.push(OperandVariableIds, "'Member 0 type', +\n'member 1 type', +\n..."); + InstructionDesc[OpTypeOpaque].operands.push(OperandLiteralString, "The name of the opaque type."); - InstructionDesc[OpTypeOpaque].operands.push(OperandLiteralString, "The name of the opaque type."); + InstructionDesc[OpTypePointer].operands.push(OperandStorage, ""); + InstructionDesc[OpTypePointer].operands.push(OperandId, "'Type'"); - InstructionDesc[OpTypePointer].operands.push(OperandStorage, ""); - InstructionDesc[OpTypePointer].operands.push(OperandId, "'Type'"); + InstructionDesc[OpTypeForwardPointer].operands.push(OperandId, "'Pointer Type'"); + InstructionDesc[OpTypeForwardPointer].operands.push(OperandStorage, ""); - InstructionDesc[OpTypeForwardPointer].operands.push(OperandId, "'Pointer Type'"); - InstructionDesc[OpTypeForwardPointer].operands.push(OperandStorage, ""); + InstructionDesc[OpTypePipe].operands.push(OperandAccessQualifier, "'Qualifier'"); - InstructionDesc[OpTypePipe].operands.push(OperandAccessQualifier, "'Qualifier'"); + InstructionDesc[OpTypeFunction].operands.push(OperandId, "'Return Type'"); + InstructionDesc[OpTypeFunction].operands.push(OperandVariableIds, "'Parameter 0 Type', +\n'Parameter 1 Type', +\n..."); - InstructionDesc[OpTypeFunction].operands.push(OperandId, "'Return Type'"); - InstructionDesc[OpTypeFunction].operands.push(OperandVariableIds, "'Parameter 0 Type', +\n'Parameter 1 Type', +\n..."); + InstructionDesc[OpConstant].operands.push(OperandVariableLiterals, "'Value'"); - InstructionDesc[OpConstant].operands.push(OperandVariableLiterals, "'Value'"); + InstructionDesc[OpConstantComposite].operands.push(OperandVariableIds, "'Constituents'"); - InstructionDesc[OpConstantComposite].operands.push(OperandVariableIds, "'Constituents'"); + InstructionDesc[OpConstantSampler].operands.push(OperandSamplerAddressingMode, ""); + InstructionDesc[OpConstantSampler].operands.push(OperandLiteralNumber, "'Param'"); + InstructionDesc[OpConstantSampler].operands.push(OperandSamplerFilterMode, ""); - InstructionDesc[OpConstantSampler].operands.push(OperandSamplerAddressingMode, ""); - InstructionDesc[OpConstantSampler].operands.push(OperandLiteralNumber, "'Param'"); - InstructionDesc[OpConstantSampler].operands.push(OperandSamplerFilterMode, ""); + InstructionDesc[OpSpecConstant].operands.push(OperandVariableLiterals, "'Value'"); - InstructionDesc[OpSpecConstant].operands.push(OperandVariableLiterals, "'Value'"); + InstructionDesc[OpSpecConstantComposite].operands.push(OperandVariableIds, "'Constituents'"); - InstructionDesc[OpSpecConstantComposite].operands.push(OperandVariableIds, "'Constituents'"); + InstructionDesc[OpSpecConstantOp].operands.push(OperandLiteralNumber, "'Opcode'"); + InstructionDesc[OpSpecConstantOp].operands.push(OperandVariableIds, "'Operands'"); - InstructionDesc[OpSpecConstantOp].operands.push(OperandLiteralNumber, "'Opcode'"); - InstructionDesc[OpSpecConstantOp].operands.push(OperandVariableIds, "'Operands'"); + InstructionDesc[OpVariable].operands.push(OperandStorage, ""); + InstructionDesc[OpVariable].operands.push(OperandId, "'Initializer'", true); - InstructionDesc[OpVariable].operands.push(OperandStorage, ""); - InstructionDesc[OpVariable].operands.push(OperandId, "'Initializer'", true); + InstructionDesc[OpFunction].operands.push(OperandFunction, ""); + InstructionDesc[OpFunction].operands.push(OperandId, "'Function Type'"); - InstructionDesc[OpFunction].operands.push(OperandFunction, ""); - InstructionDesc[OpFunction].operands.push(OperandId, "'Function Type'"); + InstructionDesc[OpFunctionCall].operands.push(OperandId, "'Function'"); + InstructionDesc[OpFunctionCall].operands.push(OperandVariableIds, "'Argument 0', +\n'Argument 1', +\n..."); - InstructionDesc[OpFunctionCall].operands.push(OperandId, "'Function'"); - InstructionDesc[OpFunctionCall].operands.push(OperandVariableIds, "'Argument 0', +\n'Argument 1', +\n..."); + InstructionDesc[OpExtInst].operands.push(OperandId, "'Set'"); + InstructionDesc[OpExtInst].operands.push(OperandLiteralNumber, "'Instruction'"); + InstructionDesc[OpExtInst].operands.push(OperandVariableIds, "'Operand 1', +\n'Operand 2', +\n..."); - InstructionDesc[OpExtInst].operands.push(OperandId, "'Set'"); - InstructionDesc[OpExtInst].operands.push(OperandLiteralNumber, "'Instruction'"); - InstructionDesc[OpExtInst].operands.push(OperandVariableIds, "'Operand 1', +\n'Operand 2', +\n..."); + InstructionDesc[OpLoad].operands.push(OperandId, "'Pointer'"); + InstructionDesc[OpLoad].operands.push(OperandMemoryAccess, "", true); + InstructionDesc[OpLoad].operands.push(OperandLiteralNumber, "", true); + InstructionDesc[OpLoad].operands.push(OperandId, "", true); - InstructionDesc[OpLoad].operands.push(OperandId, "'Pointer'"); - InstructionDesc[OpLoad].operands.push(OperandMemoryAccess, "", true); - InstructionDesc[OpLoad].operands.push(OperandLiteralNumber, "", true); - InstructionDesc[OpLoad].operands.push(OperandId, "", true); + InstructionDesc[OpStore].operands.push(OperandId, "'Pointer'"); + InstructionDesc[OpStore].operands.push(OperandId, "'Object'"); + InstructionDesc[OpStore].operands.push(OperandMemoryAccess, "", true); + InstructionDesc[OpStore].operands.push(OperandLiteralNumber, "", true); + InstructionDesc[OpStore].operands.push(OperandId, "", true); - InstructionDesc[OpStore].operands.push(OperandId, "'Pointer'"); - InstructionDesc[OpStore].operands.push(OperandId, "'Object'"); - InstructionDesc[OpStore].operands.push(OperandMemoryAccess, "", true); - InstructionDesc[OpStore].operands.push(OperandLiteralNumber, "", true); - InstructionDesc[OpStore].operands.push(OperandId, "", true); + InstructionDesc[OpPhi].operands.push(OperandVariableIds, "'Variable, Parent, ...'"); - InstructionDesc[OpPhi].operands.push(OperandVariableIds, "'Variable, Parent, ...'"); + InstructionDesc[OpDecorate].operands.push(OperandId, "'Target'"); + InstructionDesc[OpDecorate].operands.push(OperandDecoration, ""); + InstructionDesc[OpDecorate].operands.push(OperandVariableLiterals, "See <>."); - InstructionDesc[OpDecorate].operands.push(OperandId, "'Target'"); - InstructionDesc[OpDecorate].operands.push(OperandDecoration, ""); - InstructionDesc[OpDecorate].operands.push(OperandVariableLiterals, "See <>."); + InstructionDesc[OpDecorateId].operands.push(OperandId, "'Target'"); + InstructionDesc[OpDecorateId].operands.push(OperandDecoration, ""); + InstructionDesc[OpDecorateId].operands.push(OperandVariableIds, "See <>."); - InstructionDesc[OpDecorateId].operands.push(OperandId, "'Target'"); - InstructionDesc[OpDecorateId].operands.push(OperandDecoration, ""); - InstructionDesc[OpDecorateId].operands.push(OperandVariableIds, "See <>."); + InstructionDesc[OpDecorateStringGOOGLE].operands.push(OperandId, "'Target'"); + InstructionDesc[OpDecorateStringGOOGLE].operands.push(OperandDecoration, ""); + InstructionDesc[OpDecorateStringGOOGLE].operands.push(OperandVariableLiteralStrings, "'Literal Strings'"); - InstructionDesc[OpDecorateStringGOOGLE].operands.push(OperandId, "'Target'"); - InstructionDesc[OpDecorateStringGOOGLE].operands.push(OperandDecoration, ""); - InstructionDesc[OpDecorateStringGOOGLE].operands.push(OperandVariableLiteralStrings, "'Literal Strings'"); + InstructionDesc[OpMemberDecorate].operands.push(OperandId, "'Structure Type'"); + InstructionDesc[OpMemberDecorate].operands.push(OperandLiteralNumber, "'Member'"); + InstructionDesc[OpMemberDecorate].operands.push(OperandDecoration, ""); + InstructionDesc[OpMemberDecorate].operands.push(OperandVariableLiterals, "See <>."); - InstructionDesc[OpMemberDecorate].operands.push(OperandId, "'Structure Type'"); - InstructionDesc[OpMemberDecorate].operands.push(OperandLiteralNumber, "'Member'"); - InstructionDesc[OpMemberDecorate].operands.push(OperandDecoration, ""); - InstructionDesc[OpMemberDecorate].operands.push(OperandVariableLiterals, "See <>."); + InstructionDesc[OpMemberDecorateStringGOOGLE].operands.push(OperandId, "'Structure Type'"); + InstructionDesc[OpMemberDecorateStringGOOGLE].operands.push(OperandLiteralNumber, "'Member'"); + InstructionDesc[OpMemberDecorateStringGOOGLE].operands.push(OperandDecoration, ""); + InstructionDesc[OpMemberDecorateStringGOOGLE].operands.push(OperandVariableLiteralStrings, "'Literal Strings'"); - InstructionDesc[OpMemberDecorateStringGOOGLE].operands.push(OperandId, "'Structure Type'"); - InstructionDesc[OpMemberDecorateStringGOOGLE].operands.push(OperandLiteralNumber, "'Member'"); - InstructionDesc[OpMemberDecorateStringGOOGLE].operands.push(OperandDecoration, ""); - InstructionDesc[OpMemberDecorateStringGOOGLE].operands.push(OperandVariableLiteralStrings, "'Literal Strings'"); + InstructionDesc[OpGroupDecorate].operands.push(OperandId, "'Decoration Group'"); + InstructionDesc[OpGroupDecorate].operands.push(OperandVariableIds, "'Targets'"); - InstructionDesc[OpGroupDecorate].operands.push(OperandId, "'Decoration Group'"); - InstructionDesc[OpGroupDecorate].operands.push(OperandVariableIds, "'Targets'"); + InstructionDesc[OpGroupMemberDecorate].operands.push(OperandId, "'Decoration Group'"); + InstructionDesc[OpGroupMemberDecorate].operands.push(OperandVariableIdLiteral, "'Targets'"); - InstructionDesc[OpGroupMemberDecorate].operands.push(OperandId, "'Decoration Group'"); - InstructionDesc[OpGroupMemberDecorate].operands.push(OperandVariableIdLiteral, "'Targets'"); + InstructionDesc[OpVectorExtractDynamic].operands.push(OperandId, "'Vector'"); + InstructionDesc[OpVectorExtractDynamic].operands.push(OperandId, "'Index'"); - InstructionDesc[OpVectorExtractDynamic].operands.push(OperandId, "'Vector'"); - InstructionDesc[OpVectorExtractDynamic].operands.push(OperandId, "'Index'"); + InstructionDesc[OpVectorInsertDynamic].operands.push(OperandId, "'Vector'"); + InstructionDesc[OpVectorInsertDynamic].operands.push(OperandId, "'Component'"); + InstructionDesc[OpVectorInsertDynamic].operands.push(OperandId, "'Index'"); - InstructionDesc[OpVectorInsertDynamic].operands.push(OperandId, "'Vector'"); - InstructionDesc[OpVectorInsertDynamic].operands.push(OperandId, "'Component'"); - InstructionDesc[OpVectorInsertDynamic].operands.push(OperandId, "'Index'"); + InstructionDesc[OpVectorShuffle].operands.push(OperandId, "'Vector 1'"); + InstructionDesc[OpVectorShuffle].operands.push(OperandId, "'Vector 2'"); + InstructionDesc[OpVectorShuffle].operands.push(OperandVariableLiterals, "'Components'"); - InstructionDesc[OpVectorShuffle].operands.push(OperandId, "'Vector 1'"); - InstructionDesc[OpVectorShuffle].operands.push(OperandId, "'Vector 2'"); - InstructionDesc[OpVectorShuffle].operands.push(OperandVariableLiterals, "'Components'"); + InstructionDesc[OpCompositeConstruct].operands.push(OperandVariableIds, "'Constituents'"); - InstructionDesc[OpCompositeConstruct].operands.push(OperandVariableIds, "'Constituents'"); + InstructionDesc[OpCompositeExtract].operands.push(OperandId, "'Composite'"); + InstructionDesc[OpCompositeExtract].operands.push(OperandVariableLiterals, "'Indexes'"); - InstructionDesc[OpCompositeExtract].operands.push(OperandId, "'Composite'"); - InstructionDesc[OpCompositeExtract].operands.push(OperandVariableLiterals, "'Indexes'"); + InstructionDesc[OpCompositeInsert].operands.push(OperandId, "'Object'"); + InstructionDesc[OpCompositeInsert].operands.push(OperandId, "'Composite'"); + InstructionDesc[OpCompositeInsert].operands.push(OperandVariableLiterals, "'Indexes'"); - InstructionDesc[OpCompositeInsert].operands.push(OperandId, "'Object'"); - InstructionDesc[OpCompositeInsert].operands.push(OperandId, "'Composite'"); - InstructionDesc[OpCompositeInsert].operands.push(OperandVariableLiterals, "'Indexes'"); + InstructionDesc[OpCopyObject].operands.push(OperandId, "'Operand'"); - InstructionDesc[OpCopyObject].operands.push(OperandId, "'Operand'"); + InstructionDesc[OpCopyMemory].operands.push(OperandId, "'Target'"); + InstructionDesc[OpCopyMemory].operands.push(OperandId, "'Source'"); + InstructionDesc[OpCopyMemory].operands.push(OperandMemoryAccess, "", true); - InstructionDesc[OpCopyMemory].operands.push(OperandId, "'Target'"); - InstructionDesc[OpCopyMemory].operands.push(OperandId, "'Source'"); - InstructionDesc[OpCopyMemory].operands.push(OperandMemoryAccess, "", true); + InstructionDesc[OpCopyMemorySized].operands.push(OperandId, "'Target'"); + InstructionDesc[OpCopyMemorySized].operands.push(OperandId, "'Source'"); + InstructionDesc[OpCopyMemorySized].operands.push(OperandId, "'Size'"); + InstructionDesc[OpCopyMemorySized].operands.push(OperandMemoryAccess, "", true); + + InstructionDesc[OpSampledImage].operands.push(OperandId, "'Image'"); + InstructionDesc[OpSampledImage].operands.push(OperandId, "'Sampler'"); + + InstructionDesc[OpImage].operands.push(OperandId, "'Sampled Image'"); + + InstructionDesc[OpImageRead].operands.push(OperandId, "'Image'"); + InstructionDesc[OpImageRead].operands.push(OperandId, "'Coordinate'"); + InstructionDesc[OpImageRead].operands.push(OperandImageOperands, "", true); + InstructionDesc[OpImageRead].operands.push(OperandVariableIds, "", true); + + InstructionDesc[OpImageWrite].operands.push(OperandId, "'Image'"); + InstructionDesc[OpImageWrite].operands.push(OperandId, "'Coordinate'"); + InstructionDesc[OpImageWrite].operands.push(OperandId, "'Texel'"); + InstructionDesc[OpImageWrite].operands.push(OperandImageOperands, "", true); + InstructionDesc[OpImageWrite].operands.push(OperandVariableIds, "", true); + + InstructionDesc[OpImageSampleImplicitLod].operands.push(OperandId, "'Sampled Image'"); + InstructionDesc[OpImageSampleImplicitLod].operands.push(OperandId, "'Coordinate'"); + InstructionDesc[OpImageSampleImplicitLod].operands.push(OperandImageOperands, "", true); + InstructionDesc[OpImageSampleImplicitLod].operands.push(OperandVariableIds, "", true); + + InstructionDesc[OpImageSampleExplicitLod].operands.push(OperandId, "'Sampled Image'"); + InstructionDesc[OpImageSampleExplicitLod].operands.push(OperandId, "'Coordinate'"); + InstructionDesc[OpImageSampleExplicitLod].operands.push(OperandImageOperands, "", true); + InstructionDesc[OpImageSampleExplicitLod].operands.push(OperandVariableIds, "", true); + + InstructionDesc[OpImageSampleDrefImplicitLod].operands.push(OperandId, "'Sampled Image'"); + InstructionDesc[OpImageSampleDrefImplicitLod].operands.push(OperandId, "'Coordinate'"); + InstructionDesc[OpImageSampleDrefImplicitLod].operands.push(OperandId, "'D~ref~'"); + InstructionDesc[OpImageSampleDrefImplicitLod].operands.push(OperandImageOperands, "", true); + InstructionDesc[OpImageSampleDrefImplicitLod].operands.push(OperandVariableIds, "", true); + + InstructionDesc[OpImageSampleDrefExplicitLod].operands.push(OperandId, "'Sampled Image'"); + InstructionDesc[OpImageSampleDrefExplicitLod].operands.push(OperandId, "'Coordinate'"); + InstructionDesc[OpImageSampleDrefExplicitLod].operands.push(OperandId, "'D~ref~'"); + InstructionDesc[OpImageSampleDrefExplicitLod].operands.push(OperandImageOperands, "", true); + InstructionDesc[OpImageSampleDrefExplicitLod].operands.push(OperandVariableIds, "", true); + + InstructionDesc[OpImageSampleProjImplicitLod].operands.push(OperandId, "'Sampled Image'"); + InstructionDesc[OpImageSampleProjImplicitLod].operands.push(OperandId, "'Coordinate'"); + InstructionDesc[OpImageSampleProjImplicitLod].operands.push(OperandImageOperands, "", true); + InstructionDesc[OpImageSampleProjImplicitLod].operands.push(OperandVariableIds, "", true); + + InstructionDesc[OpImageSampleProjExplicitLod].operands.push(OperandId, "'Sampled Image'"); + InstructionDesc[OpImageSampleProjExplicitLod].operands.push(OperandId, "'Coordinate'"); + InstructionDesc[OpImageSampleProjExplicitLod].operands.push(OperandImageOperands, "", true); + InstructionDesc[OpImageSampleProjExplicitLod].operands.push(OperandVariableIds, "", true); + + InstructionDesc[OpImageSampleProjDrefImplicitLod].operands.push(OperandId, "'Sampled Image'"); + InstructionDesc[OpImageSampleProjDrefImplicitLod].operands.push(OperandId, "'Coordinate'"); + InstructionDesc[OpImageSampleProjDrefImplicitLod].operands.push(OperandId, "'D~ref~'"); + InstructionDesc[OpImageSampleProjDrefImplicitLod].operands.push(OperandImageOperands, "", true); + InstructionDesc[OpImageSampleProjDrefImplicitLod].operands.push(OperandVariableIds, "", true); + + InstructionDesc[OpImageSampleProjDrefExplicitLod].operands.push(OperandId, "'Sampled Image'"); + InstructionDesc[OpImageSampleProjDrefExplicitLod].operands.push(OperandId, "'Coordinate'"); + InstructionDesc[OpImageSampleProjDrefExplicitLod].operands.push(OperandId, "'D~ref~'"); + InstructionDesc[OpImageSampleProjDrefExplicitLod].operands.push(OperandImageOperands, "", true); + InstructionDesc[OpImageSampleProjDrefExplicitLod].operands.push(OperandVariableIds, "", true); + + InstructionDesc[OpImageFetch].operands.push(OperandId, "'Image'"); + InstructionDesc[OpImageFetch].operands.push(OperandId, "'Coordinate'"); + InstructionDesc[OpImageFetch].operands.push(OperandImageOperands, "", true); + InstructionDesc[OpImageFetch].operands.push(OperandVariableIds, "", true); + + InstructionDesc[OpImageGather].operands.push(OperandId, "'Sampled Image'"); + InstructionDesc[OpImageGather].operands.push(OperandId, "'Coordinate'"); + InstructionDesc[OpImageGather].operands.push(OperandId, "'Component'"); + InstructionDesc[OpImageGather].operands.push(OperandImageOperands, "", true); + InstructionDesc[OpImageGather].operands.push(OperandVariableIds, "", true); + + InstructionDesc[OpImageDrefGather].operands.push(OperandId, "'Sampled Image'"); + InstructionDesc[OpImageDrefGather].operands.push(OperandId, "'Coordinate'"); + InstructionDesc[OpImageDrefGather].operands.push(OperandId, "'D~ref~'"); + InstructionDesc[OpImageDrefGather].operands.push(OperandImageOperands, "", true); + InstructionDesc[OpImageDrefGather].operands.push(OperandVariableIds, "", true); + + InstructionDesc[OpImageSparseSampleImplicitLod].operands.push(OperandId, "'Sampled Image'"); + InstructionDesc[OpImageSparseSampleImplicitLod].operands.push(OperandId, "'Coordinate'"); + InstructionDesc[OpImageSparseSampleImplicitLod].operands.push(OperandImageOperands, "", true); + InstructionDesc[OpImageSparseSampleImplicitLod].operands.push(OperandVariableIds, "", true); + + InstructionDesc[OpImageSparseSampleExplicitLod].operands.push(OperandId, "'Sampled Image'"); + InstructionDesc[OpImageSparseSampleExplicitLod].operands.push(OperandId, "'Coordinate'"); + InstructionDesc[OpImageSparseSampleExplicitLod].operands.push(OperandImageOperands, "", true); + InstructionDesc[OpImageSparseSampleExplicitLod].operands.push(OperandVariableIds, "", true); + + InstructionDesc[OpImageSparseSampleDrefImplicitLod].operands.push(OperandId, "'Sampled Image'"); + InstructionDesc[OpImageSparseSampleDrefImplicitLod].operands.push(OperandId, "'Coordinate'"); + InstructionDesc[OpImageSparseSampleDrefImplicitLod].operands.push(OperandId, "'D~ref~'"); + InstructionDesc[OpImageSparseSampleDrefImplicitLod].operands.push(OperandImageOperands, "", true); + InstructionDesc[OpImageSparseSampleDrefImplicitLod].operands.push(OperandVariableIds, "", true); - InstructionDesc[OpCopyMemorySized].operands.push(OperandId, "'Target'"); - InstructionDesc[OpCopyMemorySized].operands.push(OperandId, "'Source'"); - InstructionDesc[OpCopyMemorySized].operands.push(OperandId, "'Size'"); - InstructionDesc[OpCopyMemorySized].operands.push(OperandMemoryAccess, "", true); - - InstructionDesc[OpSampledImage].operands.push(OperandId, "'Image'"); - InstructionDesc[OpSampledImage].operands.push(OperandId, "'Sampler'"); - - InstructionDesc[OpImage].operands.push(OperandId, "'Sampled Image'"); - - InstructionDesc[OpImageRead].operands.push(OperandId, "'Image'"); - InstructionDesc[OpImageRead].operands.push(OperandId, "'Coordinate'"); - InstructionDesc[OpImageRead].operands.push(OperandImageOperands, "", true); - InstructionDesc[OpImageRead].operands.push(OperandVariableIds, "", true); - - InstructionDesc[OpImageWrite].operands.push(OperandId, "'Image'"); - InstructionDesc[OpImageWrite].operands.push(OperandId, "'Coordinate'"); - InstructionDesc[OpImageWrite].operands.push(OperandId, "'Texel'"); - InstructionDesc[OpImageWrite].operands.push(OperandImageOperands, "", true); - InstructionDesc[OpImageWrite].operands.push(OperandVariableIds, "", true); - - InstructionDesc[OpImageSampleImplicitLod].operands.push(OperandId, "'Sampled Image'"); - InstructionDesc[OpImageSampleImplicitLod].operands.push(OperandId, "'Coordinate'"); - InstructionDesc[OpImageSampleImplicitLod].operands.push(OperandImageOperands, "", true); - InstructionDesc[OpImageSampleImplicitLod].operands.push(OperandVariableIds, "", true); - - InstructionDesc[OpImageSampleExplicitLod].operands.push(OperandId, "'Sampled Image'"); - InstructionDesc[OpImageSampleExplicitLod].operands.push(OperandId, "'Coordinate'"); - InstructionDesc[OpImageSampleExplicitLod].operands.push(OperandImageOperands, "", true); - InstructionDesc[OpImageSampleExplicitLod].operands.push(OperandVariableIds, "", true); - - InstructionDesc[OpImageSampleDrefImplicitLod].operands.push(OperandId, "'Sampled Image'"); - InstructionDesc[OpImageSampleDrefImplicitLod].operands.push(OperandId, "'Coordinate'"); - InstructionDesc[OpImageSampleDrefImplicitLod].operands.push(OperandId, "'D~ref~'"); - InstructionDesc[OpImageSampleDrefImplicitLod].operands.push(OperandImageOperands, "", true); - InstructionDesc[OpImageSampleDrefImplicitLod].operands.push(OperandVariableIds, "", true); - - InstructionDesc[OpImageSampleDrefExplicitLod].operands.push(OperandId, "'Sampled Image'"); - InstructionDesc[OpImageSampleDrefExplicitLod].operands.push(OperandId, "'Coordinate'"); - InstructionDesc[OpImageSampleDrefExplicitLod].operands.push(OperandId, "'D~ref~'"); - InstructionDesc[OpImageSampleDrefExplicitLod].operands.push(OperandImageOperands, "", true); - InstructionDesc[OpImageSampleDrefExplicitLod].operands.push(OperandVariableIds, "", true); - - InstructionDesc[OpImageSampleProjImplicitLod].operands.push(OperandId, "'Sampled Image'"); - InstructionDesc[OpImageSampleProjImplicitLod].operands.push(OperandId, "'Coordinate'"); - InstructionDesc[OpImageSampleProjImplicitLod].operands.push(OperandImageOperands, "", true); - InstructionDesc[OpImageSampleProjImplicitLod].operands.push(OperandVariableIds, "", true); - - InstructionDesc[OpImageSampleProjExplicitLod].operands.push(OperandId, "'Sampled Image'"); - InstructionDesc[OpImageSampleProjExplicitLod].operands.push(OperandId, "'Coordinate'"); - InstructionDesc[OpImageSampleProjExplicitLod].operands.push(OperandImageOperands, "", true); - InstructionDesc[OpImageSampleProjExplicitLod].operands.push(OperandVariableIds, "", true); - - InstructionDesc[OpImageSampleProjDrefImplicitLod].operands.push(OperandId, "'Sampled Image'"); - InstructionDesc[OpImageSampleProjDrefImplicitLod].operands.push(OperandId, "'Coordinate'"); - InstructionDesc[OpImageSampleProjDrefImplicitLod].operands.push(OperandId, "'D~ref~'"); - InstructionDesc[OpImageSampleProjDrefImplicitLod].operands.push(OperandImageOperands, "", true); - InstructionDesc[OpImageSampleProjDrefImplicitLod].operands.push(OperandVariableIds, "", true); - - InstructionDesc[OpImageSampleProjDrefExplicitLod].operands.push(OperandId, "'Sampled Image'"); - InstructionDesc[OpImageSampleProjDrefExplicitLod].operands.push(OperandId, "'Coordinate'"); - InstructionDesc[OpImageSampleProjDrefExplicitLod].operands.push(OperandId, "'D~ref~'"); - InstructionDesc[OpImageSampleProjDrefExplicitLod].operands.push(OperandImageOperands, "", true); - InstructionDesc[OpImageSampleProjDrefExplicitLod].operands.push(OperandVariableIds, "", true); - - InstructionDesc[OpImageFetch].operands.push(OperandId, "'Image'"); - InstructionDesc[OpImageFetch].operands.push(OperandId, "'Coordinate'"); - InstructionDesc[OpImageFetch].operands.push(OperandImageOperands, "", true); - InstructionDesc[OpImageFetch].operands.push(OperandVariableIds, "", true); - - InstructionDesc[OpImageGather].operands.push(OperandId, "'Sampled Image'"); - InstructionDesc[OpImageGather].operands.push(OperandId, "'Coordinate'"); - InstructionDesc[OpImageGather].operands.push(OperandId, "'Component'"); - InstructionDesc[OpImageGather].operands.push(OperandImageOperands, "", true); - InstructionDesc[OpImageGather].operands.push(OperandVariableIds, "", true); - - InstructionDesc[OpImageDrefGather].operands.push(OperandId, "'Sampled Image'"); - InstructionDesc[OpImageDrefGather].operands.push(OperandId, "'Coordinate'"); - InstructionDesc[OpImageDrefGather].operands.push(OperandId, "'D~ref~'"); - InstructionDesc[OpImageDrefGather].operands.push(OperandImageOperands, "", true); - InstructionDesc[OpImageDrefGather].operands.push(OperandVariableIds, "", true); - - InstructionDesc[OpImageSparseSampleImplicitLod].operands.push(OperandId, "'Sampled Image'"); - InstructionDesc[OpImageSparseSampleImplicitLod].operands.push(OperandId, "'Coordinate'"); - InstructionDesc[OpImageSparseSampleImplicitLod].operands.push(OperandImageOperands, "", true); - InstructionDesc[OpImageSparseSampleImplicitLod].operands.push(OperandVariableIds, "", true); - - InstructionDesc[OpImageSparseSampleExplicitLod].operands.push(OperandId, "'Sampled Image'"); - InstructionDesc[OpImageSparseSampleExplicitLod].operands.push(OperandId, "'Coordinate'"); - InstructionDesc[OpImageSparseSampleExplicitLod].operands.push(OperandImageOperands, "", true); - InstructionDesc[OpImageSparseSampleExplicitLod].operands.push(OperandVariableIds, "", true); - - InstructionDesc[OpImageSparseSampleDrefImplicitLod].operands.push(OperandId, "'Sampled Image'"); - InstructionDesc[OpImageSparseSampleDrefImplicitLod].operands.push(OperandId, "'Coordinate'"); - InstructionDesc[OpImageSparseSampleDrefImplicitLod].operands.push(OperandId, "'D~ref~'"); - InstructionDesc[OpImageSparseSampleDrefImplicitLod].operands.push(OperandImageOperands, "", true); - InstructionDesc[OpImageSparseSampleDrefImplicitLod].operands.push(OperandVariableIds, "", true); + InstructionDesc[OpImageSparseSampleDrefExplicitLod].operands.push(OperandId, "'Sampled Image'"); + InstructionDesc[OpImageSparseSampleDrefExplicitLod].operands.push(OperandId, "'Coordinate'"); + InstructionDesc[OpImageSparseSampleDrefExplicitLod].operands.push(OperandId, "'D~ref~'"); + InstructionDesc[OpImageSparseSampleDrefExplicitLod].operands.push(OperandImageOperands, "", true); + InstructionDesc[OpImageSparseSampleDrefExplicitLod].operands.push(OperandVariableIds, "", true); - InstructionDesc[OpImageSparseSampleDrefExplicitLod].operands.push(OperandId, "'Sampled Image'"); - InstructionDesc[OpImageSparseSampleDrefExplicitLod].operands.push(OperandId, "'Coordinate'"); - InstructionDesc[OpImageSparseSampleDrefExplicitLod].operands.push(OperandId, "'D~ref~'"); - InstructionDesc[OpImageSparseSampleDrefExplicitLod].operands.push(OperandImageOperands, "", true); - InstructionDesc[OpImageSparseSampleDrefExplicitLod].operands.push(OperandVariableIds, "", true); + InstructionDesc[OpImageSparseSampleProjImplicitLod].operands.push(OperandId, "'Sampled Image'"); + InstructionDesc[OpImageSparseSampleProjImplicitLod].operands.push(OperandId, "'Coordinate'"); + InstructionDesc[OpImageSparseSampleProjImplicitLod].operands.push(OperandImageOperands, "", true); + InstructionDesc[OpImageSparseSampleProjImplicitLod].operands.push(OperandVariableIds, "", true); - InstructionDesc[OpImageSparseSampleProjImplicitLod].operands.push(OperandId, "'Sampled Image'"); - InstructionDesc[OpImageSparseSampleProjImplicitLod].operands.push(OperandId, "'Coordinate'"); - InstructionDesc[OpImageSparseSampleProjImplicitLod].operands.push(OperandImageOperands, "", true); - InstructionDesc[OpImageSparseSampleProjImplicitLod].operands.push(OperandVariableIds, "", true); + InstructionDesc[OpImageSparseSampleProjExplicitLod].operands.push(OperandId, "'Sampled Image'"); + InstructionDesc[OpImageSparseSampleProjExplicitLod].operands.push(OperandId, "'Coordinate'"); + InstructionDesc[OpImageSparseSampleProjExplicitLod].operands.push(OperandImageOperands, "", true); + InstructionDesc[OpImageSparseSampleProjExplicitLod].operands.push(OperandVariableIds, "", true); - InstructionDesc[OpImageSparseSampleProjExplicitLod].operands.push(OperandId, "'Sampled Image'"); - InstructionDesc[OpImageSparseSampleProjExplicitLod].operands.push(OperandId, "'Coordinate'"); - InstructionDesc[OpImageSparseSampleProjExplicitLod].operands.push(OperandImageOperands, "", true); - InstructionDesc[OpImageSparseSampleProjExplicitLod].operands.push(OperandVariableIds, "", true); + InstructionDesc[OpImageSparseSampleProjDrefImplicitLod].operands.push(OperandId, "'Sampled Image'"); + InstructionDesc[OpImageSparseSampleProjDrefImplicitLod].operands.push(OperandId, "'Coordinate'"); + InstructionDesc[OpImageSparseSampleProjDrefImplicitLod].operands.push(OperandId, "'D~ref~'"); + InstructionDesc[OpImageSparseSampleProjDrefImplicitLod].operands.push(OperandImageOperands, "", true); + InstructionDesc[OpImageSparseSampleProjDrefImplicitLod].operands.push(OperandVariableIds, "", true); - InstructionDesc[OpImageSparseSampleProjDrefImplicitLod].operands.push(OperandId, "'Sampled Image'"); - InstructionDesc[OpImageSparseSampleProjDrefImplicitLod].operands.push(OperandId, "'Coordinate'"); - InstructionDesc[OpImageSparseSampleProjDrefImplicitLod].operands.push(OperandId, "'D~ref~'"); - InstructionDesc[OpImageSparseSampleProjDrefImplicitLod].operands.push(OperandImageOperands, "", true); - InstructionDesc[OpImageSparseSampleProjDrefImplicitLod].operands.push(OperandVariableIds, "", true); + InstructionDesc[OpImageSparseSampleProjDrefExplicitLod].operands.push(OperandId, "'Sampled Image'"); + InstructionDesc[OpImageSparseSampleProjDrefExplicitLod].operands.push(OperandId, "'Coordinate'"); + InstructionDesc[OpImageSparseSampleProjDrefExplicitLod].operands.push(OperandId, "'D~ref~'"); + InstructionDesc[OpImageSparseSampleProjDrefExplicitLod].operands.push(OperandImageOperands, "", true); + InstructionDesc[OpImageSparseSampleProjDrefExplicitLod].operands.push(OperandVariableIds, "", true); - InstructionDesc[OpImageSparseSampleProjDrefExplicitLod].operands.push(OperandId, "'Sampled Image'"); - InstructionDesc[OpImageSparseSampleProjDrefExplicitLod].operands.push(OperandId, "'Coordinate'"); - InstructionDesc[OpImageSparseSampleProjDrefExplicitLod].operands.push(OperandId, "'D~ref~'"); - InstructionDesc[OpImageSparseSampleProjDrefExplicitLod].operands.push(OperandImageOperands, "", true); - InstructionDesc[OpImageSparseSampleProjDrefExplicitLod].operands.push(OperandVariableIds, "", true); + InstructionDesc[OpImageSparseFetch].operands.push(OperandId, "'Image'"); + InstructionDesc[OpImageSparseFetch].operands.push(OperandId, "'Coordinate'"); + InstructionDesc[OpImageSparseFetch].operands.push(OperandImageOperands, "", true); + InstructionDesc[OpImageSparseFetch].operands.push(OperandVariableIds, "", true); - InstructionDesc[OpImageSparseFetch].operands.push(OperandId, "'Image'"); - InstructionDesc[OpImageSparseFetch].operands.push(OperandId, "'Coordinate'"); - InstructionDesc[OpImageSparseFetch].operands.push(OperandImageOperands, "", true); - InstructionDesc[OpImageSparseFetch].operands.push(OperandVariableIds, "", true); + InstructionDesc[OpImageSparseGather].operands.push(OperandId, "'Sampled Image'"); + InstructionDesc[OpImageSparseGather].operands.push(OperandId, "'Coordinate'"); + InstructionDesc[OpImageSparseGather].operands.push(OperandId, "'Component'"); + InstructionDesc[OpImageSparseGather].operands.push(OperandImageOperands, "", true); + InstructionDesc[OpImageSparseGather].operands.push(OperandVariableIds, "", true); - InstructionDesc[OpImageSparseGather].operands.push(OperandId, "'Sampled Image'"); - InstructionDesc[OpImageSparseGather].operands.push(OperandId, "'Coordinate'"); - InstructionDesc[OpImageSparseGather].operands.push(OperandId, "'Component'"); - InstructionDesc[OpImageSparseGather].operands.push(OperandImageOperands, "", true); - InstructionDesc[OpImageSparseGather].operands.push(OperandVariableIds, "", true); + InstructionDesc[OpImageSparseDrefGather].operands.push(OperandId, "'Sampled Image'"); + InstructionDesc[OpImageSparseDrefGather].operands.push(OperandId, "'Coordinate'"); + InstructionDesc[OpImageSparseDrefGather].operands.push(OperandId, "'D~ref~'"); + InstructionDesc[OpImageSparseDrefGather].operands.push(OperandImageOperands, "", true); + InstructionDesc[OpImageSparseDrefGather].operands.push(OperandVariableIds, "", true); - InstructionDesc[OpImageSparseDrefGather].operands.push(OperandId, "'Sampled Image'"); - InstructionDesc[OpImageSparseDrefGather].operands.push(OperandId, "'Coordinate'"); - InstructionDesc[OpImageSparseDrefGather].operands.push(OperandId, "'D~ref~'"); - InstructionDesc[OpImageSparseDrefGather].operands.push(OperandImageOperands, "", true); - InstructionDesc[OpImageSparseDrefGather].operands.push(OperandVariableIds, "", true); + InstructionDesc[OpImageSparseRead].operands.push(OperandId, "'Image'"); + InstructionDesc[OpImageSparseRead].operands.push(OperandId, "'Coordinate'"); + InstructionDesc[OpImageSparseRead].operands.push(OperandImageOperands, "", true); + InstructionDesc[OpImageSparseRead].operands.push(OperandVariableIds, "", true); - InstructionDesc[OpImageSparseRead].operands.push(OperandId, "'Image'"); - InstructionDesc[OpImageSparseRead].operands.push(OperandId, "'Coordinate'"); - InstructionDesc[OpImageSparseRead].operands.push(OperandImageOperands, "", true); - InstructionDesc[OpImageSparseRead].operands.push(OperandVariableIds, "", true); + InstructionDesc[OpImageSparseTexelsResident].operands.push(OperandId, "'Resident Code'"); - InstructionDesc[OpImageSparseTexelsResident].operands.push(OperandId, "'Resident Code'"); + InstructionDesc[OpImageQuerySizeLod].operands.push(OperandId, "'Image'"); + InstructionDesc[OpImageQuerySizeLod].operands.push(OperandId, "'Level of Detail'"); - InstructionDesc[OpImageQuerySizeLod].operands.push(OperandId, "'Image'"); - InstructionDesc[OpImageQuerySizeLod].operands.push(OperandId, "'Level of Detail'"); + InstructionDesc[OpImageQuerySize].operands.push(OperandId, "'Image'"); - InstructionDesc[OpImageQuerySize].operands.push(OperandId, "'Image'"); + InstructionDesc[OpImageQueryLod].operands.push(OperandId, "'Image'"); + InstructionDesc[OpImageQueryLod].operands.push(OperandId, "'Coordinate'"); - InstructionDesc[OpImageQueryLod].operands.push(OperandId, "'Image'"); - InstructionDesc[OpImageQueryLod].operands.push(OperandId, "'Coordinate'"); + InstructionDesc[OpImageQueryLevels].operands.push(OperandId, "'Image'"); - InstructionDesc[OpImageQueryLevels].operands.push(OperandId, "'Image'"); + InstructionDesc[OpImageQuerySamples].operands.push(OperandId, "'Image'"); - InstructionDesc[OpImageQuerySamples].operands.push(OperandId, "'Image'"); + InstructionDesc[OpImageQueryFormat].operands.push(OperandId, "'Image'"); - InstructionDesc[OpImageQueryFormat].operands.push(OperandId, "'Image'"); + InstructionDesc[OpImageQueryOrder].operands.push(OperandId, "'Image'"); - InstructionDesc[OpImageQueryOrder].operands.push(OperandId, "'Image'"); + InstructionDesc[OpAccessChain].operands.push(OperandId, "'Base'"); + InstructionDesc[OpAccessChain].operands.push(OperandVariableIds, "'Indexes'"); - InstructionDesc[OpAccessChain].operands.push(OperandId, "'Base'"); - InstructionDesc[OpAccessChain].operands.push(OperandVariableIds, "'Indexes'"); + InstructionDesc[OpInBoundsAccessChain].operands.push(OperandId, "'Base'"); + InstructionDesc[OpInBoundsAccessChain].operands.push(OperandVariableIds, "'Indexes'"); - InstructionDesc[OpInBoundsAccessChain].operands.push(OperandId, "'Base'"); - InstructionDesc[OpInBoundsAccessChain].operands.push(OperandVariableIds, "'Indexes'"); + InstructionDesc[OpPtrAccessChain].operands.push(OperandId, "'Base'"); + InstructionDesc[OpPtrAccessChain].operands.push(OperandId, "'Element'"); + InstructionDesc[OpPtrAccessChain].operands.push(OperandVariableIds, "'Indexes'"); - InstructionDesc[OpPtrAccessChain].operands.push(OperandId, "'Base'"); - InstructionDesc[OpPtrAccessChain].operands.push(OperandId, "'Element'"); - InstructionDesc[OpPtrAccessChain].operands.push(OperandVariableIds, "'Indexes'"); + InstructionDesc[OpInBoundsPtrAccessChain].operands.push(OperandId, "'Base'"); + InstructionDesc[OpInBoundsPtrAccessChain].operands.push(OperandId, "'Element'"); + InstructionDesc[OpInBoundsPtrAccessChain].operands.push(OperandVariableIds, "'Indexes'"); - InstructionDesc[OpInBoundsPtrAccessChain].operands.push(OperandId, "'Base'"); - InstructionDesc[OpInBoundsPtrAccessChain].operands.push(OperandId, "'Element'"); - InstructionDesc[OpInBoundsPtrAccessChain].operands.push(OperandVariableIds, "'Indexes'"); + InstructionDesc[OpSNegate].operands.push(OperandId, "'Operand'"); - InstructionDesc[OpSNegate].operands.push(OperandId, "'Operand'"); + InstructionDesc[OpFNegate].operands.push(OperandId, "'Operand'"); - InstructionDesc[OpFNegate].operands.push(OperandId, "'Operand'"); + InstructionDesc[OpNot].operands.push(OperandId, "'Operand'"); - InstructionDesc[OpNot].operands.push(OperandId, "'Operand'"); + InstructionDesc[OpAny].operands.push(OperandId, "'Vector'"); - InstructionDesc[OpAny].operands.push(OperandId, "'Vector'"); + InstructionDesc[OpAll].operands.push(OperandId, "'Vector'"); - InstructionDesc[OpAll].operands.push(OperandId, "'Vector'"); + InstructionDesc[OpConvertFToU].operands.push(OperandId, "'Float Value'"); - InstructionDesc[OpConvertFToU].operands.push(OperandId, "'Float Value'"); + InstructionDesc[OpConvertFToS].operands.push(OperandId, "'Float Value'"); - InstructionDesc[OpConvertFToS].operands.push(OperandId, "'Float Value'"); + InstructionDesc[OpConvertSToF].operands.push(OperandId, "'Signed Value'"); - InstructionDesc[OpConvertSToF].operands.push(OperandId, "'Signed Value'"); + InstructionDesc[OpConvertUToF].operands.push(OperandId, "'Unsigned Value'"); - InstructionDesc[OpConvertUToF].operands.push(OperandId, "'Unsigned Value'"); + InstructionDesc[OpUConvert].operands.push(OperandId, "'Unsigned Value'"); - InstructionDesc[OpUConvert].operands.push(OperandId, "'Unsigned Value'"); + InstructionDesc[OpSConvert].operands.push(OperandId, "'Signed Value'"); - InstructionDesc[OpSConvert].operands.push(OperandId, "'Signed Value'"); + InstructionDesc[OpFConvert].operands.push(OperandId, "'Float Value'"); - InstructionDesc[OpFConvert].operands.push(OperandId, "'Float Value'"); + InstructionDesc[OpSatConvertSToU].operands.push(OperandId, "'Signed Value'"); - InstructionDesc[OpSatConvertSToU].operands.push(OperandId, "'Signed Value'"); + InstructionDesc[OpSatConvertUToS].operands.push(OperandId, "'Unsigned Value'"); - InstructionDesc[OpSatConvertUToS].operands.push(OperandId, "'Unsigned Value'"); + InstructionDesc[OpConvertPtrToU].operands.push(OperandId, "'Pointer'"); - InstructionDesc[OpConvertPtrToU].operands.push(OperandId, "'Pointer'"); + InstructionDesc[OpConvertUToPtr].operands.push(OperandId, "'Integer Value'"); - InstructionDesc[OpConvertUToPtr].operands.push(OperandId, "'Integer Value'"); + InstructionDesc[OpPtrCastToGeneric].operands.push(OperandId, "'Pointer'"); - InstructionDesc[OpPtrCastToGeneric].operands.push(OperandId, "'Pointer'"); + InstructionDesc[OpGenericCastToPtr].operands.push(OperandId, "'Pointer'"); - InstructionDesc[OpGenericCastToPtr].operands.push(OperandId, "'Pointer'"); + InstructionDesc[OpGenericCastToPtrExplicit].operands.push(OperandId, "'Pointer'"); + InstructionDesc[OpGenericCastToPtrExplicit].operands.push(OperandStorage, "'Storage'"); - InstructionDesc[OpGenericCastToPtrExplicit].operands.push(OperandId, "'Pointer'"); - InstructionDesc[OpGenericCastToPtrExplicit].operands.push(OperandStorage, "'Storage'"); + InstructionDesc[OpGenericPtrMemSemantics].operands.push(OperandId, "'Pointer'"); - InstructionDesc[OpGenericPtrMemSemantics].operands.push(OperandId, "'Pointer'"); + InstructionDesc[OpBitcast].operands.push(OperandId, "'Operand'"); - InstructionDesc[OpBitcast].operands.push(OperandId, "'Operand'"); + InstructionDesc[OpQuantizeToF16].operands.push(OperandId, "'Value'"); - InstructionDesc[OpQuantizeToF16].operands.push(OperandId, "'Value'"); + InstructionDesc[OpTranspose].operands.push(OperandId, "'Matrix'"); - InstructionDesc[OpTranspose].operands.push(OperandId, "'Matrix'"); + InstructionDesc[OpCopyLogical].operands.push(OperandId, "'Operand'"); - InstructionDesc[OpCopyLogical].operands.push(OperandId, "'Operand'"); + InstructionDesc[OpIsNan].operands.push(OperandId, "'x'"); - InstructionDesc[OpIsNan].operands.push(OperandId, "'x'"); + InstructionDesc[OpIsInf].operands.push(OperandId, "'x'"); - InstructionDesc[OpIsInf].operands.push(OperandId, "'x'"); + InstructionDesc[OpIsFinite].operands.push(OperandId, "'x'"); - InstructionDesc[OpIsFinite].operands.push(OperandId, "'x'"); + InstructionDesc[OpIsNormal].operands.push(OperandId, "'x'"); - InstructionDesc[OpIsNormal].operands.push(OperandId, "'x'"); + InstructionDesc[OpSignBitSet].operands.push(OperandId, "'x'"); - InstructionDesc[OpSignBitSet].operands.push(OperandId, "'x'"); + InstructionDesc[OpLessOrGreater].operands.push(OperandId, "'x'"); + InstructionDesc[OpLessOrGreater].operands.push(OperandId, "'y'"); - InstructionDesc[OpLessOrGreater].operands.push(OperandId, "'x'"); - InstructionDesc[OpLessOrGreater].operands.push(OperandId, "'y'"); + InstructionDesc[OpOrdered].operands.push(OperandId, "'x'"); + InstructionDesc[OpOrdered].operands.push(OperandId, "'y'"); - InstructionDesc[OpOrdered].operands.push(OperandId, "'x'"); - InstructionDesc[OpOrdered].operands.push(OperandId, "'y'"); + InstructionDesc[OpUnordered].operands.push(OperandId, "'x'"); + InstructionDesc[OpUnordered].operands.push(OperandId, "'y'"); - InstructionDesc[OpUnordered].operands.push(OperandId, "'x'"); - InstructionDesc[OpUnordered].operands.push(OperandId, "'y'"); + InstructionDesc[OpArrayLength].operands.push(OperandId, "'Structure'"); + InstructionDesc[OpArrayLength].operands.push(OperandLiteralNumber, "'Array member'"); - InstructionDesc[OpArrayLength].operands.push(OperandId, "'Structure'"); - InstructionDesc[OpArrayLength].operands.push(OperandLiteralNumber, "'Array member'"); + InstructionDesc[OpIAdd].operands.push(OperandId, "'Operand 1'"); + InstructionDesc[OpIAdd].operands.push(OperandId, "'Operand 2'"); - InstructionDesc[OpIAdd].operands.push(OperandId, "'Operand 1'"); - InstructionDesc[OpIAdd].operands.push(OperandId, "'Operand 2'"); + InstructionDesc[OpFAdd].operands.push(OperandId, "'Operand 1'"); + InstructionDesc[OpFAdd].operands.push(OperandId, "'Operand 2'"); - InstructionDesc[OpFAdd].operands.push(OperandId, "'Operand 1'"); - InstructionDesc[OpFAdd].operands.push(OperandId, "'Operand 2'"); + InstructionDesc[OpISub].operands.push(OperandId, "'Operand 1'"); + InstructionDesc[OpISub].operands.push(OperandId, "'Operand 2'"); - InstructionDesc[OpISub].operands.push(OperandId, "'Operand 1'"); - InstructionDesc[OpISub].operands.push(OperandId, "'Operand 2'"); + InstructionDesc[OpFSub].operands.push(OperandId, "'Operand 1'"); + InstructionDesc[OpFSub].operands.push(OperandId, "'Operand 2'"); - InstructionDesc[OpFSub].operands.push(OperandId, "'Operand 1'"); - InstructionDesc[OpFSub].operands.push(OperandId, "'Operand 2'"); + InstructionDesc[OpIMul].operands.push(OperandId, "'Operand 1'"); + InstructionDesc[OpIMul].operands.push(OperandId, "'Operand 2'"); - InstructionDesc[OpIMul].operands.push(OperandId, "'Operand 1'"); - InstructionDesc[OpIMul].operands.push(OperandId, "'Operand 2'"); + InstructionDesc[OpFMul].operands.push(OperandId, "'Operand 1'"); + InstructionDesc[OpFMul].operands.push(OperandId, "'Operand 2'"); - InstructionDesc[OpFMul].operands.push(OperandId, "'Operand 1'"); - InstructionDesc[OpFMul].operands.push(OperandId, "'Operand 2'"); + InstructionDesc[OpUDiv].operands.push(OperandId, "'Operand 1'"); + InstructionDesc[OpUDiv].operands.push(OperandId, "'Operand 2'"); - InstructionDesc[OpUDiv].operands.push(OperandId, "'Operand 1'"); - InstructionDesc[OpUDiv].operands.push(OperandId, "'Operand 2'"); + InstructionDesc[OpSDiv].operands.push(OperandId, "'Operand 1'"); + InstructionDesc[OpSDiv].operands.push(OperandId, "'Operand 2'"); - InstructionDesc[OpSDiv].operands.push(OperandId, "'Operand 1'"); - InstructionDesc[OpSDiv].operands.push(OperandId, "'Operand 2'"); + InstructionDesc[OpFDiv].operands.push(OperandId, "'Operand 1'"); + InstructionDesc[OpFDiv].operands.push(OperandId, "'Operand 2'"); - InstructionDesc[OpFDiv].operands.push(OperandId, "'Operand 1'"); - InstructionDesc[OpFDiv].operands.push(OperandId, "'Operand 2'"); + InstructionDesc[OpUMod].operands.push(OperandId, "'Operand 1'"); + InstructionDesc[OpUMod].operands.push(OperandId, "'Operand 2'"); - InstructionDesc[OpUMod].operands.push(OperandId, "'Operand 1'"); - InstructionDesc[OpUMod].operands.push(OperandId, "'Operand 2'"); + InstructionDesc[OpSRem].operands.push(OperandId, "'Operand 1'"); + InstructionDesc[OpSRem].operands.push(OperandId, "'Operand 2'"); - InstructionDesc[OpSRem].operands.push(OperandId, "'Operand 1'"); - InstructionDesc[OpSRem].operands.push(OperandId, "'Operand 2'"); + InstructionDesc[OpSMod].operands.push(OperandId, "'Operand 1'"); + InstructionDesc[OpSMod].operands.push(OperandId, "'Operand 2'"); - InstructionDesc[OpSMod].operands.push(OperandId, "'Operand 1'"); - InstructionDesc[OpSMod].operands.push(OperandId, "'Operand 2'"); + InstructionDesc[OpFRem].operands.push(OperandId, "'Operand 1'"); + InstructionDesc[OpFRem].operands.push(OperandId, "'Operand 2'"); - InstructionDesc[OpFRem].operands.push(OperandId, "'Operand 1'"); - InstructionDesc[OpFRem].operands.push(OperandId, "'Operand 2'"); + InstructionDesc[OpFMod].operands.push(OperandId, "'Operand 1'"); + InstructionDesc[OpFMod].operands.push(OperandId, "'Operand 2'"); - InstructionDesc[OpFMod].operands.push(OperandId, "'Operand 1'"); - InstructionDesc[OpFMod].operands.push(OperandId, "'Operand 2'"); + InstructionDesc[OpVectorTimesScalar].operands.push(OperandId, "'Vector'"); + InstructionDesc[OpVectorTimesScalar].operands.push(OperandId, "'Scalar'"); - InstructionDesc[OpVectorTimesScalar].operands.push(OperandId, "'Vector'"); - InstructionDesc[OpVectorTimesScalar].operands.push(OperandId, "'Scalar'"); + InstructionDesc[OpMatrixTimesScalar].operands.push(OperandId, "'Matrix'"); + InstructionDesc[OpMatrixTimesScalar].operands.push(OperandId, "'Scalar'"); - InstructionDesc[OpMatrixTimesScalar].operands.push(OperandId, "'Matrix'"); - InstructionDesc[OpMatrixTimesScalar].operands.push(OperandId, "'Scalar'"); + InstructionDesc[OpVectorTimesMatrix].operands.push(OperandId, "'Vector'"); + InstructionDesc[OpVectorTimesMatrix].operands.push(OperandId, "'Matrix'"); - InstructionDesc[OpVectorTimesMatrix].operands.push(OperandId, "'Vector'"); - InstructionDesc[OpVectorTimesMatrix].operands.push(OperandId, "'Matrix'"); + InstructionDesc[OpMatrixTimesVector].operands.push(OperandId, "'Matrix'"); + InstructionDesc[OpMatrixTimesVector].operands.push(OperandId, "'Vector'"); - InstructionDesc[OpMatrixTimesVector].operands.push(OperandId, "'Matrix'"); - InstructionDesc[OpMatrixTimesVector].operands.push(OperandId, "'Vector'"); + InstructionDesc[OpMatrixTimesMatrix].operands.push(OperandId, "'LeftMatrix'"); + InstructionDesc[OpMatrixTimesMatrix].operands.push(OperandId, "'RightMatrix'"); - InstructionDesc[OpMatrixTimesMatrix].operands.push(OperandId, "'LeftMatrix'"); - InstructionDesc[OpMatrixTimesMatrix].operands.push(OperandId, "'RightMatrix'"); + InstructionDesc[OpOuterProduct].operands.push(OperandId, "'Vector 1'"); + InstructionDesc[OpOuterProduct].operands.push(OperandId, "'Vector 2'"); - InstructionDesc[OpOuterProduct].operands.push(OperandId, "'Vector 1'"); - InstructionDesc[OpOuterProduct].operands.push(OperandId, "'Vector 2'"); + InstructionDesc[OpDot].operands.push(OperandId, "'Vector 1'"); + InstructionDesc[OpDot].operands.push(OperandId, "'Vector 2'"); - InstructionDesc[OpDot].operands.push(OperandId, "'Vector 1'"); - InstructionDesc[OpDot].operands.push(OperandId, "'Vector 2'"); + InstructionDesc[OpIAddCarry].operands.push(OperandId, "'Operand 1'"); + InstructionDesc[OpIAddCarry].operands.push(OperandId, "'Operand 2'"); - InstructionDesc[OpIAddCarry].operands.push(OperandId, "'Operand 1'"); - InstructionDesc[OpIAddCarry].operands.push(OperandId, "'Operand 2'"); + InstructionDesc[OpISubBorrow].operands.push(OperandId, "'Operand 1'"); + InstructionDesc[OpISubBorrow].operands.push(OperandId, "'Operand 2'"); - InstructionDesc[OpISubBorrow].operands.push(OperandId, "'Operand 1'"); - InstructionDesc[OpISubBorrow].operands.push(OperandId, "'Operand 2'"); + InstructionDesc[OpUMulExtended].operands.push(OperandId, "'Operand 1'"); + InstructionDesc[OpUMulExtended].operands.push(OperandId, "'Operand 2'"); - InstructionDesc[OpUMulExtended].operands.push(OperandId, "'Operand 1'"); - InstructionDesc[OpUMulExtended].operands.push(OperandId, "'Operand 2'"); + InstructionDesc[OpSMulExtended].operands.push(OperandId, "'Operand 1'"); + InstructionDesc[OpSMulExtended].operands.push(OperandId, "'Operand 2'"); - InstructionDesc[OpSMulExtended].operands.push(OperandId, "'Operand 1'"); - InstructionDesc[OpSMulExtended].operands.push(OperandId, "'Operand 2'"); + InstructionDesc[OpShiftRightLogical].operands.push(OperandId, "'Base'"); + InstructionDesc[OpShiftRightLogical].operands.push(OperandId, "'Shift'"); - InstructionDesc[OpShiftRightLogical].operands.push(OperandId, "'Base'"); - InstructionDesc[OpShiftRightLogical].operands.push(OperandId, "'Shift'"); + InstructionDesc[OpShiftRightArithmetic].operands.push(OperandId, "'Base'"); + InstructionDesc[OpShiftRightArithmetic].operands.push(OperandId, "'Shift'"); - InstructionDesc[OpShiftRightArithmetic].operands.push(OperandId, "'Base'"); - InstructionDesc[OpShiftRightArithmetic].operands.push(OperandId, "'Shift'"); + InstructionDesc[OpShiftLeftLogical].operands.push(OperandId, "'Base'"); + InstructionDesc[OpShiftLeftLogical].operands.push(OperandId, "'Shift'"); - InstructionDesc[OpShiftLeftLogical].operands.push(OperandId, "'Base'"); - InstructionDesc[OpShiftLeftLogical].operands.push(OperandId, "'Shift'"); + InstructionDesc[OpLogicalOr].operands.push(OperandId, "'Operand 1'"); + InstructionDesc[OpLogicalOr].operands.push(OperandId, "'Operand 2'"); - InstructionDesc[OpLogicalOr].operands.push(OperandId, "'Operand 1'"); - InstructionDesc[OpLogicalOr].operands.push(OperandId, "'Operand 2'"); + InstructionDesc[OpLogicalAnd].operands.push(OperandId, "'Operand 1'"); + InstructionDesc[OpLogicalAnd].operands.push(OperandId, "'Operand 2'"); - InstructionDesc[OpLogicalAnd].operands.push(OperandId, "'Operand 1'"); - InstructionDesc[OpLogicalAnd].operands.push(OperandId, "'Operand 2'"); + InstructionDesc[OpLogicalEqual].operands.push(OperandId, "'Operand 1'"); + InstructionDesc[OpLogicalEqual].operands.push(OperandId, "'Operand 2'"); - InstructionDesc[OpLogicalEqual].operands.push(OperandId, "'Operand 1'"); - InstructionDesc[OpLogicalEqual].operands.push(OperandId, "'Operand 2'"); + InstructionDesc[OpLogicalNotEqual].operands.push(OperandId, "'Operand 1'"); + InstructionDesc[OpLogicalNotEqual].operands.push(OperandId, "'Operand 2'"); - InstructionDesc[OpLogicalNotEqual].operands.push(OperandId, "'Operand 1'"); - InstructionDesc[OpLogicalNotEqual].operands.push(OperandId, "'Operand 2'"); + InstructionDesc[OpLogicalNot].operands.push(OperandId, "'Operand'"); - InstructionDesc[OpLogicalNot].operands.push(OperandId, "'Operand'"); + InstructionDesc[OpBitwiseOr].operands.push(OperandId, "'Operand 1'"); + InstructionDesc[OpBitwiseOr].operands.push(OperandId, "'Operand 2'"); - InstructionDesc[OpBitwiseOr].operands.push(OperandId, "'Operand 1'"); - InstructionDesc[OpBitwiseOr].operands.push(OperandId, "'Operand 2'"); + InstructionDesc[OpBitwiseXor].operands.push(OperandId, "'Operand 1'"); + InstructionDesc[OpBitwiseXor].operands.push(OperandId, "'Operand 2'"); - InstructionDesc[OpBitwiseXor].operands.push(OperandId, "'Operand 1'"); - InstructionDesc[OpBitwiseXor].operands.push(OperandId, "'Operand 2'"); + InstructionDesc[OpBitwiseAnd].operands.push(OperandId, "'Operand 1'"); + InstructionDesc[OpBitwiseAnd].operands.push(OperandId, "'Operand 2'"); - InstructionDesc[OpBitwiseAnd].operands.push(OperandId, "'Operand 1'"); - InstructionDesc[OpBitwiseAnd].operands.push(OperandId, "'Operand 2'"); + InstructionDesc[OpBitFieldInsert].operands.push(OperandId, "'Base'"); + InstructionDesc[OpBitFieldInsert].operands.push(OperandId, "'Insert'"); + InstructionDesc[OpBitFieldInsert].operands.push(OperandId, "'Offset'"); + InstructionDesc[OpBitFieldInsert].operands.push(OperandId, "'Count'"); - InstructionDesc[OpBitFieldInsert].operands.push(OperandId, "'Base'"); - InstructionDesc[OpBitFieldInsert].operands.push(OperandId, "'Insert'"); - InstructionDesc[OpBitFieldInsert].operands.push(OperandId, "'Offset'"); - InstructionDesc[OpBitFieldInsert].operands.push(OperandId, "'Count'"); + InstructionDesc[OpBitFieldSExtract].operands.push(OperandId, "'Base'"); + InstructionDesc[OpBitFieldSExtract].operands.push(OperandId, "'Offset'"); + InstructionDesc[OpBitFieldSExtract].operands.push(OperandId, "'Count'"); - InstructionDesc[OpBitFieldSExtract].operands.push(OperandId, "'Base'"); - InstructionDesc[OpBitFieldSExtract].operands.push(OperandId, "'Offset'"); - InstructionDesc[OpBitFieldSExtract].operands.push(OperandId, "'Count'"); - - InstructionDesc[OpBitFieldUExtract].operands.push(OperandId, "'Base'"); - InstructionDesc[OpBitFieldUExtract].operands.push(OperandId, "'Offset'"); - InstructionDesc[OpBitFieldUExtract].operands.push(OperandId, "'Count'"); - - InstructionDesc[OpBitReverse].operands.push(OperandId, "'Base'"); + InstructionDesc[OpBitFieldUExtract].operands.push(OperandId, "'Base'"); + InstructionDesc[OpBitFieldUExtract].operands.push(OperandId, "'Offset'"); + InstructionDesc[OpBitFieldUExtract].operands.push(OperandId, "'Count'"); - InstructionDesc[OpBitCount].operands.push(OperandId, "'Base'"); + InstructionDesc[OpBitReverse].operands.push(OperandId, "'Base'"); - InstructionDesc[OpSelect].operands.push(OperandId, "'Condition'"); - InstructionDesc[OpSelect].operands.push(OperandId, "'Object 1'"); - InstructionDesc[OpSelect].operands.push(OperandId, "'Object 2'"); + InstructionDesc[OpBitCount].operands.push(OperandId, "'Base'"); - InstructionDesc[OpIEqual].operands.push(OperandId, "'Operand 1'"); - InstructionDesc[OpIEqual].operands.push(OperandId, "'Operand 2'"); + InstructionDesc[OpSelect].operands.push(OperandId, "'Condition'"); + InstructionDesc[OpSelect].operands.push(OperandId, "'Object 1'"); + InstructionDesc[OpSelect].operands.push(OperandId, "'Object 2'"); - InstructionDesc[OpFOrdEqual].operands.push(OperandId, "'Operand 1'"); - InstructionDesc[OpFOrdEqual].operands.push(OperandId, "'Operand 2'"); + InstructionDesc[OpIEqual].operands.push(OperandId, "'Operand 1'"); + InstructionDesc[OpIEqual].operands.push(OperandId, "'Operand 2'"); - InstructionDesc[OpFUnordEqual].operands.push(OperandId, "'Operand 1'"); - InstructionDesc[OpFUnordEqual].operands.push(OperandId, "'Operand 2'"); + InstructionDesc[OpFOrdEqual].operands.push(OperandId, "'Operand 1'"); + InstructionDesc[OpFOrdEqual].operands.push(OperandId, "'Operand 2'"); - InstructionDesc[OpINotEqual].operands.push(OperandId, "'Operand 1'"); - InstructionDesc[OpINotEqual].operands.push(OperandId, "'Operand 2'"); + InstructionDesc[OpFUnordEqual].operands.push(OperandId, "'Operand 1'"); + InstructionDesc[OpFUnordEqual].operands.push(OperandId, "'Operand 2'"); - InstructionDesc[OpFOrdNotEqual].operands.push(OperandId, "'Operand 1'"); - InstructionDesc[OpFOrdNotEqual].operands.push(OperandId, "'Operand 2'"); + InstructionDesc[OpINotEqual].operands.push(OperandId, "'Operand 1'"); + InstructionDesc[OpINotEqual].operands.push(OperandId, "'Operand 2'"); - InstructionDesc[OpFUnordNotEqual].operands.push(OperandId, "'Operand 1'"); - InstructionDesc[OpFUnordNotEqual].operands.push(OperandId, "'Operand 2'"); + InstructionDesc[OpFOrdNotEqual].operands.push(OperandId, "'Operand 1'"); + InstructionDesc[OpFOrdNotEqual].operands.push(OperandId, "'Operand 2'"); - InstructionDesc[OpULessThan].operands.push(OperandId, "'Operand 1'"); - InstructionDesc[OpULessThan].operands.push(OperandId, "'Operand 2'"); + InstructionDesc[OpFUnordNotEqual].operands.push(OperandId, "'Operand 1'"); + InstructionDesc[OpFUnordNotEqual].operands.push(OperandId, "'Operand 2'"); - InstructionDesc[OpSLessThan].operands.push(OperandId, "'Operand 1'"); - InstructionDesc[OpSLessThan].operands.push(OperandId, "'Operand 2'"); + InstructionDesc[OpULessThan].operands.push(OperandId, "'Operand 1'"); + InstructionDesc[OpULessThan].operands.push(OperandId, "'Operand 2'"); - InstructionDesc[OpFOrdLessThan].operands.push(OperandId, "'Operand 1'"); - InstructionDesc[OpFOrdLessThan].operands.push(OperandId, "'Operand 2'"); + InstructionDesc[OpSLessThan].operands.push(OperandId, "'Operand 1'"); + InstructionDesc[OpSLessThan].operands.push(OperandId, "'Operand 2'"); - InstructionDesc[OpFUnordLessThan].operands.push(OperandId, "'Operand 1'"); - InstructionDesc[OpFUnordLessThan].operands.push(OperandId, "'Operand 2'"); + InstructionDesc[OpFOrdLessThan].operands.push(OperandId, "'Operand 1'"); + InstructionDesc[OpFOrdLessThan].operands.push(OperandId, "'Operand 2'"); - InstructionDesc[OpUGreaterThan].operands.push(OperandId, "'Operand 1'"); - InstructionDesc[OpUGreaterThan].operands.push(OperandId, "'Operand 2'"); + InstructionDesc[OpFUnordLessThan].operands.push(OperandId, "'Operand 1'"); + InstructionDesc[OpFUnordLessThan].operands.push(OperandId, "'Operand 2'"); - InstructionDesc[OpSGreaterThan].operands.push(OperandId, "'Operand 1'"); - InstructionDesc[OpSGreaterThan].operands.push(OperandId, "'Operand 2'"); + InstructionDesc[OpUGreaterThan].operands.push(OperandId, "'Operand 1'"); + InstructionDesc[OpUGreaterThan].operands.push(OperandId, "'Operand 2'"); - InstructionDesc[OpFOrdGreaterThan].operands.push(OperandId, "'Operand 1'"); - InstructionDesc[OpFOrdGreaterThan].operands.push(OperandId, "'Operand 2'"); + InstructionDesc[OpSGreaterThan].operands.push(OperandId, "'Operand 1'"); + InstructionDesc[OpSGreaterThan].operands.push(OperandId, "'Operand 2'"); - InstructionDesc[OpFUnordGreaterThan].operands.push(OperandId, "'Operand 1'"); - InstructionDesc[OpFUnordGreaterThan].operands.push(OperandId, "'Operand 2'"); + InstructionDesc[OpFOrdGreaterThan].operands.push(OperandId, "'Operand 1'"); + InstructionDesc[OpFOrdGreaterThan].operands.push(OperandId, "'Operand 2'"); - InstructionDesc[OpULessThanEqual].operands.push(OperandId, "'Operand 1'"); - InstructionDesc[OpULessThanEqual].operands.push(OperandId, "'Operand 2'"); + InstructionDesc[OpFUnordGreaterThan].operands.push(OperandId, "'Operand 1'"); + InstructionDesc[OpFUnordGreaterThan].operands.push(OperandId, "'Operand 2'"); - InstructionDesc[OpSLessThanEqual].operands.push(OperandId, "'Operand 1'"); - InstructionDesc[OpSLessThanEqual].operands.push(OperandId, "'Operand 2'"); + InstructionDesc[OpULessThanEqual].operands.push(OperandId, "'Operand 1'"); + InstructionDesc[OpULessThanEqual].operands.push(OperandId, "'Operand 2'"); - InstructionDesc[OpFOrdLessThanEqual].operands.push(OperandId, "'Operand 1'"); - InstructionDesc[OpFOrdLessThanEqual].operands.push(OperandId, "'Operand 2'"); + InstructionDesc[OpSLessThanEqual].operands.push(OperandId, "'Operand 1'"); + InstructionDesc[OpSLessThanEqual].operands.push(OperandId, "'Operand 2'"); - InstructionDesc[OpFUnordLessThanEqual].operands.push(OperandId, "'Operand 1'"); - InstructionDesc[OpFUnordLessThanEqual].operands.push(OperandId, "'Operand 2'"); + InstructionDesc[OpFOrdLessThanEqual].operands.push(OperandId, "'Operand 1'"); + InstructionDesc[OpFOrdLessThanEqual].operands.push(OperandId, "'Operand 2'"); - InstructionDesc[OpUGreaterThanEqual].operands.push(OperandId, "'Operand 1'"); - InstructionDesc[OpUGreaterThanEqual].operands.push(OperandId, "'Operand 2'"); + InstructionDesc[OpFUnordLessThanEqual].operands.push(OperandId, "'Operand 1'"); + InstructionDesc[OpFUnordLessThanEqual].operands.push(OperandId, "'Operand 2'"); - InstructionDesc[OpSGreaterThanEqual].operands.push(OperandId, "'Operand 1'"); - InstructionDesc[OpSGreaterThanEqual].operands.push(OperandId, "'Operand 2'"); + InstructionDesc[OpUGreaterThanEqual].operands.push(OperandId, "'Operand 1'"); + InstructionDesc[OpUGreaterThanEqual].operands.push(OperandId, "'Operand 2'"); - InstructionDesc[OpFOrdGreaterThanEqual].operands.push(OperandId, "'Operand 1'"); - InstructionDesc[OpFOrdGreaterThanEqual].operands.push(OperandId, "'Operand 2'"); + InstructionDesc[OpSGreaterThanEqual].operands.push(OperandId, "'Operand 1'"); + InstructionDesc[OpSGreaterThanEqual].operands.push(OperandId, "'Operand 2'"); - InstructionDesc[OpFUnordGreaterThanEqual].operands.push(OperandId, "'Operand 1'"); - InstructionDesc[OpFUnordGreaterThanEqual].operands.push(OperandId, "'Operand 2'"); + InstructionDesc[OpFOrdGreaterThanEqual].operands.push(OperandId, "'Operand 1'"); + InstructionDesc[OpFOrdGreaterThanEqual].operands.push(OperandId, "'Operand 2'"); - InstructionDesc[OpDPdx].operands.push(OperandId, "'P'"); + InstructionDesc[OpFUnordGreaterThanEqual].operands.push(OperandId, "'Operand 1'"); + InstructionDesc[OpFUnordGreaterThanEqual].operands.push(OperandId, "'Operand 2'"); - InstructionDesc[OpDPdy].operands.push(OperandId, "'P'"); + InstructionDesc[OpDPdx].operands.push(OperandId, "'P'"); - InstructionDesc[OpFwidth].operands.push(OperandId, "'P'"); + InstructionDesc[OpDPdy].operands.push(OperandId, "'P'"); - InstructionDesc[OpDPdxFine].operands.push(OperandId, "'P'"); + InstructionDesc[OpFwidth].operands.push(OperandId, "'P'"); - InstructionDesc[OpDPdyFine].operands.push(OperandId, "'P'"); + InstructionDesc[OpDPdxFine].operands.push(OperandId, "'P'"); - InstructionDesc[OpFwidthFine].operands.push(OperandId, "'P'"); + InstructionDesc[OpDPdyFine].operands.push(OperandId, "'P'"); - InstructionDesc[OpDPdxCoarse].operands.push(OperandId, "'P'"); + InstructionDesc[OpFwidthFine].operands.push(OperandId, "'P'"); - InstructionDesc[OpDPdyCoarse].operands.push(OperandId, "'P'"); + InstructionDesc[OpDPdxCoarse].operands.push(OperandId, "'P'"); - InstructionDesc[OpFwidthCoarse].operands.push(OperandId, "'P'"); + InstructionDesc[OpDPdyCoarse].operands.push(OperandId, "'P'"); - InstructionDesc[OpEmitStreamVertex].operands.push(OperandId, "'Stream'"); + InstructionDesc[OpFwidthCoarse].operands.push(OperandId, "'P'"); - InstructionDesc[OpEndStreamPrimitive].operands.push(OperandId, "'Stream'"); + InstructionDesc[OpEmitStreamVertex].operands.push(OperandId, "'Stream'"); - InstructionDesc[OpControlBarrier].operands.push(OperandScope, "'Execution'"); - InstructionDesc[OpControlBarrier].operands.push(OperandScope, "'Memory'"); - InstructionDesc[OpControlBarrier].operands.push(OperandMemorySemantics, "'Semantics'"); + InstructionDesc[OpEndStreamPrimitive].operands.push(OperandId, "'Stream'"); - InstructionDesc[OpMemoryBarrier].operands.push(OperandScope, "'Memory'"); - InstructionDesc[OpMemoryBarrier].operands.push(OperandMemorySemantics, "'Semantics'"); + InstructionDesc[OpControlBarrier].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpControlBarrier].operands.push(OperandScope, "'Memory'"); + InstructionDesc[OpControlBarrier].operands.push(OperandMemorySemantics, "'Semantics'"); - InstructionDesc[OpImageTexelPointer].operands.push(OperandId, "'Image'"); - InstructionDesc[OpImageTexelPointer].operands.push(OperandId, "'Coordinate'"); - InstructionDesc[OpImageTexelPointer].operands.push(OperandId, "'Sample'"); + InstructionDesc[OpMemoryBarrier].operands.push(OperandScope, "'Memory'"); + InstructionDesc[OpMemoryBarrier].operands.push(OperandMemorySemantics, "'Semantics'"); - InstructionDesc[OpAtomicLoad].operands.push(OperandId, "'Pointer'"); - InstructionDesc[OpAtomicLoad].operands.push(OperandScope, "'Scope'"); - InstructionDesc[OpAtomicLoad].operands.push(OperandMemorySemantics, "'Semantics'"); + InstructionDesc[OpImageTexelPointer].operands.push(OperandId, "'Image'"); + InstructionDesc[OpImageTexelPointer].operands.push(OperandId, "'Coordinate'"); + InstructionDesc[OpImageTexelPointer].operands.push(OperandId, "'Sample'"); - InstructionDesc[OpAtomicStore].operands.push(OperandId, "'Pointer'"); - InstructionDesc[OpAtomicStore].operands.push(OperandScope, "'Scope'"); - InstructionDesc[OpAtomicStore].operands.push(OperandMemorySemantics, "'Semantics'"); - InstructionDesc[OpAtomicStore].operands.push(OperandId, "'Value'"); + InstructionDesc[OpAtomicLoad].operands.push(OperandId, "'Pointer'"); + InstructionDesc[OpAtomicLoad].operands.push(OperandScope, "'Scope'"); + InstructionDesc[OpAtomicLoad].operands.push(OperandMemorySemantics, "'Semantics'"); - InstructionDesc[OpAtomicExchange].operands.push(OperandId, "'Pointer'"); - InstructionDesc[OpAtomicExchange].operands.push(OperandScope, "'Scope'"); - InstructionDesc[OpAtomicExchange].operands.push(OperandMemorySemantics, "'Semantics'"); - InstructionDesc[OpAtomicExchange].operands.push(OperandId, "'Value'"); + InstructionDesc[OpAtomicStore].operands.push(OperandId, "'Pointer'"); + InstructionDesc[OpAtomicStore].operands.push(OperandScope, "'Scope'"); + InstructionDesc[OpAtomicStore].operands.push(OperandMemorySemantics, "'Semantics'"); + InstructionDesc[OpAtomicStore].operands.push(OperandId, "'Value'"); - InstructionDesc[OpAtomicCompareExchange].operands.push(OperandId, "'Pointer'"); - InstructionDesc[OpAtomicCompareExchange].operands.push(OperandScope, "'Scope'"); - InstructionDesc[OpAtomicCompareExchange].operands.push(OperandMemorySemantics, "'Equal'"); - InstructionDesc[OpAtomicCompareExchange].operands.push(OperandMemorySemantics, "'Unequal'"); - InstructionDesc[OpAtomicCompareExchange].operands.push(OperandId, "'Value'"); - InstructionDesc[OpAtomicCompareExchange].operands.push(OperandId, "'Comparator'"); + InstructionDesc[OpAtomicExchange].operands.push(OperandId, "'Pointer'"); + InstructionDesc[OpAtomicExchange].operands.push(OperandScope, "'Scope'"); + InstructionDesc[OpAtomicExchange].operands.push(OperandMemorySemantics, "'Semantics'"); + InstructionDesc[OpAtomicExchange].operands.push(OperandId, "'Value'"); - InstructionDesc[OpAtomicCompareExchangeWeak].operands.push(OperandId, "'Pointer'"); - InstructionDesc[OpAtomicCompareExchangeWeak].operands.push(OperandScope, "'Scope'"); - InstructionDesc[OpAtomicCompareExchangeWeak].operands.push(OperandMemorySemantics, "'Equal'"); - InstructionDesc[OpAtomicCompareExchangeWeak].operands.push(OperandMemorySemantics, "'Unequal'"); - InstructionDesc[OpAtomicCompareExchangeWeak].operands.push(OperandId, "'Value'"); - InstructionDesc[OpAtomicCompareExchangeWeak].operands.push(OperandId, "'Comparator'"); + InstructionDesc[OpAtomicCompareExchange].operands.push(OperandId, "'Pointer'"); + InstructionDesc[OpAtomicCompareExchange].operands.push(OperandScope, "'Scope'"); + InstructionDesc[OpAtomicCompareExchange].operands.push(OperandMemorySemantics, "'Equal'"); + InstructionDesc[OpAtomicCompareExchange].operands.push(OperandMemorySemantics, "'Unequal'"); + InstructionDesc[OpAtomicCompareExchange].operands.push(OperandId, "'Value'"); + InstructionDesc[OpAtomicCompareExchange].operands.push(OperandId, "'Comparator'"); - InstructionDesc[OpAtomicIIncrement].operands.push(OperandId, "'Pointer'"); - InstructionDesc[OpAtomicIIncrement].operands.push(OperandScope, "'Scope'"); - InstructionDesc[OpAtomicIIncrement].operands.push(OperandMemorySemantics, "'Semantics'"); + InstructionDesc[OpAtomicCompareExchangeWeak].operands.push(OperandId, "'Pointer'"); + InstructionDesc[OpAtomicCompareExchangeWeak].operands.push(OperandScope, "'Scope'"); + InstructionDesc[OpAtomicCompareExchangeWeak].operands.push(OperandMemorySemantics, "'Equal'"); + InstructionDesc[OpAtomicCompareExchangeWeak].operands.push(OperandMemorySemantics, "'Unequal'"); + InstructionDesc[OpAtomicCompareExchangeWeak].operands.push(OperandId, "'Value'"); + InstructionDesc[OpAtomicCompareExchangeWeak].operands.push(OperandId, "'Comparator'"); - InstructionDesc[OpAtomicIDecrement].operands.push(OperandId, "'Pointer'"); - InstructionDesc[OpAtomicIDecrement].operands.push(OperandScope, "'Scope'"); - InstructionDesc[OpAtomicIDecrement].operands.push(OperandMemorySemantics, "'Semantics'"); + InstructionDesc[OpAtomicIIncrement].operands.push(OperandId, "'Pointer'"); + InstructionDesc[OpAtomicIIncrement].operands.push(OperandScope, "'Scope'"); + InstructionDesc[OpAtomicIIncrement].operands.push(OperandMemorySemantics, "'Semantics'"); - InstructionDesc[OpAtomicIAdd].operands.push(OperandId, "'Pointer'"); - InstructionDesc[OpAtomicIAdd].operands.push(OperandScope, "'Scope'"); - InstructionDesc[OpAtomicIAdd].operands.push(OperandMemorySemantics, "'Semantics'"); - InstructionDesc[OpAtomicIAdd].operands.push(OperandId, "'Value'"); + InstructionDesc[OpAtomicIDecrement].operands.push(OperandId, "'Pointer'"); + InstructionDesc[OpAtomicIDecrement].operands.push(OperandScope, "'Scope'"); + InstructionDesc[OpAtomicIDecrement].operands.push(OperandMemorySemantics, "'Semantics'"); - InstructionDesc[OpAtomicFAddEXT].operands.push(OperandId, "'Pointer'"); - InstructionDesc[OpAtomicFAddEXT].operands.push(OperandScope, "'Scope'"); - InstructionDesc[OpAtomicFAddEXT].operands.push(OperandMemorySemantics, "'Semantics'"); - InstructionDesc[OpAtomicFAddEXT].operands.push(OperandId, "'Value'"); + InstructionDesc[OpAtomicIAdd].operands.push(OperandId, "'Pointer'"); + InstructionDesc[OpAtomicIAdd].operands.push(OperandScope, "'Scope'"); + InstructionDesc[OpAtomicIAdd].operands.push(OperandMemorySemantics, "'Semantics'"); + InstructionDesc[OpAtomicIAdd].operands.push(OperandId, "'Value'"); - InstructionDesc[OpAtomicISub].operands.push(OperandId, "'Pointer'"); - InstructionDesc[OpAtomicISub].operands.push(OperandScope, "'Scope'"); - InstructionDesc[OpAtomicISub].operands.push(OperandMemorySemantics, "'Semantics'"); - InstructionDesc[OpAtomicISub].operands.push(OperandId, "'Value'"); + InstructionDesc[OpAtomicFAddEXT].operands.push(OperandId, "'Pointer'"); + InstructionDesc[OpAtomicFAddEXT].operands.push(OperandScope, "'Scope'"); + InstructionDesc[OpAtomicFAddEXT].operands.push(OperandMemorySemantics, "'Semantics'"); + InstructionDesc[OpAtomicFAddEXT].operands.push(OperandId, "'Value'"); - InstructionDesc[OpAtomicUMin].operands.push(OperandId, "'Pointer'"); - InstructionDesc[OpAtomicUMin].operands.push(OperandScope, "'Scope'"); - InstructionDesc[OpAtomicUMin].operands.push(OperandMemorySemantics, "'Semantics'"); - InstructionDesc[OpAtomicUMin].operands.push(OperandId, "'Value'"); + InstructionDesc[OpAtomicISub].operands.push(OperandId, "'Pointer'"); + InstructionDesc[OpAtomicISub].operands.push(OperandScope, "'Scope'"); + InstructionDesc[OpAtomicISub].operands.push(OperandMemorySemantics, "'Semantics'"); + InstructionDesc[OpAtomicISub].operands.push(OperandId, "'Value'"); - InstructionDesc[OpAtomicUMax].operands.push(OperandId, "'Pointer'"); - InstructionDesc[OpAtomicUMax].operands.push(OperandScope, "'Scope'"); - InstructionDesc[OpAtomicUMax].operands.push(OperandMemorySemantics, "'Semantics'"); - InstructionDesc[OpAtomicUMax].operands.push(OperandId, "'Value'"); + InstructionDesc[OpAtomicUMin].operands.push(OperandId, "'Pointer'"); + InstructionDesc[OpAtomicUMin].operands.push(OperandScope, "'Scope'"); + InstructionDesc[OpAtomicUMin].operands.push(OperandMemorySemantics, "'Semantics'"); + InstructionDesc[OpAtomicUMin].operands.push(OperandId, "'Value'"); - InstructionDesc[OpAtomicSMin].operands.push(OperandId, "'Pointer'"); - InstructionDesc[OpAtomicSMin].operands.push(OperandScope, "'Scope'"); - InstructionDesc[OpAtomicSMin].operands.push(OperandMemorySemantics, "'Semantics'"); - InstructionDesc[OpAtomicSMin].operands.push(OperandId, "'Value'"); + InstructionDesc[OpAtomicUMax].operands.push(OperandId, "'Pointer'"); + InstructionDesc[OpAtomicUMax].operands.push(OperandScope, "'Scope'"); + InstructionDesc[OpAtomicUMax].operands.push(OperandMemorySemantics, "'Semantics'"); + InstructionDesc[OpAtomicUMax].operands.push(OperandId, "'Value'"); - InstructionDesc[OpAtomicSMax].operands.push(OperandId, "'Pointer'"); - InstructionDesc[OpAtomicSMax].operands.push(OperandScope, "'Scope'"); - InstructionDesc[OpAtomicSMax].operands.push(OperandMemorySemantics, "'Semantics'"); - InstructionDesc[OpAtomicSMax].operands.push(OperandId, "'Value'"); + InstructionDesc[OpAtomicSMin].operands.push(OperandId, "'Pointer'"); + InstructionDesc[OpAtomicSMin].operands.push(OperandScope, "'Scope'"); + InstructionDesc[OpAtomicSMin].operands.push(OperandMemorySemantics, "'Semantics'"); + InstructionDesc[OpAtomicSMin].operands.push(OperandId, "'Value'"); - InstructionDesc[OpAtomicFMinEXT].operands.push(OperandId, "'Pointer'"); - InstructionDesc[OpAtomicFMinEXT].operands.push(OperandScope, "'Scope'"); - InstructionDesc[OpAtomicFMinEXT].operands.push(OperandMemorySemantics, "'Semantics'"); - InstructionDesc[OpAtomicFMinEXT].operands.push(OperandId, "'Value'"); + InstructionDesc[OpAtomicSMax].operands.push(OperandId, "'Pointer'"); + InstructionDesc[OpAtomicSMax].operands.push(OperandScope, "'Scope'"); + InstructionDesc[OpAtomicSMax].operands.push(OperandMemorySemantics, "'Semantics'"); + InstructionDesc[OpAtomicSMax].operands.push(OperandId, "'Value'"); - InstructionDesc[OpAtomicFMaxEXT].operands.push(OperandId, "'Pointer'"); - InstructionDesc[OpAtomicFMaxEXT].operands.push(OperandScope, "'Scope'"); - InstructionDesc[OpAtomicFMaxEXT].operands.push(OperandMemorySemantics, "'Semantics'"); - InstructionDesc[OpAtomicFMaxEXT].operands.push(OperandId, "'Value'"); + InstructionDesc[OpAtomicFMinEXT].operands.push(OperandId, "'Pointer'"); + InstructionDesc[OpAtomicFMinEXT].operands.push(OperandScope, "'Scope'"); + InstructionDesc[OpAtomicFMinEXT].operands.push(OperandMemorySemantics, "'Semantics'"); + InstructionDesc[OpAtomicFMinEXT].operands.push(OperandId, "'Value'"); - InstructionDesc[OpAtomicAnd].operands.push(OperandId, "'Pointer'"); - InstructionDesc[OpAtomicAnd].operands.push(OperandScope, "'Scope'"); - InstructionDesc[OpAtomicAnd].operands.push(OperandMemorySemantics, "'Semantics'"); - InstructionDesc[OpAtomicAnd].operands.push(OperandId, "'Value'"); - - InstructionDesc[OpAtomicOr].operands.push(OperandId, "'Pointer'"); - InstructionDesc[OpAtomicOr].operands.push(OperandScope, "'Scope'"); - InstructionDesc[OpAtomicOr].operands.push(OperandMemorySemantics, "'Semantics'"); - InstructionDesc[OpAtomicOr].operands.push(OperandId, "'Value'"); - - InstructionDesc[OpAtomicXor].operands.push(OperandId, "'Pointer'"); - InstructionDesc[OpAtomicXor].operands.push(OperandScope, "'Scope'"); - InstructionDesc[OpAtomicXor].operands.push(OperandMemorySemantics, "'Semantics'"); - InstructionDesc[OpAtomicXor].operands.push(OperandId, "'Value'"); - - InstructionDesc[OpAtomicFlagTestAndSet].operands.push(OperandId, "'Pointer'"); - InstructionDesc[OpAtomicFlagTestAndSet].operands.push(OperandScope, "'Scope'"); - InstructionDesc[OpAtomicFlagTestAndSet].operands.push(OperandMemorySemantics, "'Semantics'"); - - InstructionDesc[OpAtomicFlagClear].operands.push(OperandId, "'Pointer'"); - InstructionDesc[OpAtomicFlagClear].operands.push(OperandScope, "'Scope'"); - InstructionDesc[OpAtomicFlagClear].operands.push(OperandMemorySemantics, "'Semantics'"); - - InstructionDesc[OpLoopMerge].operands.push(OperandId, "'Merge Block'"); - InstructionDesc[OpLoopMerge].operands.push(OperandId, "'Continue Target'"); - InstructionDesc[OpLoopMerge].operands.push(OperandLoop, ""); - InstructionDesc[OpLoopMerge].operands.push(OperandOptionalLiteral, ""); - - InstructionDesc[OpSelectionMerge].operands.push(OperandId, "'Merge Block'"); - InstructionDesc[OpSelectionMerge].operands.push(OperandSelect, ""); - - InstructionDesc[OpBranch].operands.push(OperandId, "'Target Label'"); - - InstructionDesc[OpBranchConditional].operands.push(OperandId, "'Condition'"); - InstructionDesc[OpBranchConditional].operands.push(OperandId, "'True Label'"); - InstructionDesc[OpBranchConditional].operands.push(OperandId, "'False Label'"); - InstructionDesc[OpBranchConditional].operands.push(OperandVariableLiterals, "'Branch weights'"); - - InstructionDesc[OpSwitch].operands.push(OperandId, "'Selector'"); - InstructionDesc[OpSwitch].operands.push(OperandId, "'Default'"); - InstructionDesc[OpSwitch].operands.push(OperandVariableLiteralId, "'Target'"); - - - InstructionDesc[OpReturnValue].operands.push(OperandId, "'Value'"); - - InstructionDesc[OpLifetimeStart].operands.push(OperandId, "'Pointer'"); - InstructionDesc[OpLifetimeStart].operands.push(OperandLiteralNumber, "'Size'"); - - InstructionDesc[OpLifetimeStop].operands.push(OperandId, "'Pointer'"); - InstructionDesc[OpLifetimeStop].operands.push(OperandLiteralNumber, "'Size'"); - - InstructionDesc[OpGroupAsyncCopy].operands.push(OperandScope, "'Execution'"); - InstructionDesc[OpGroupAsyncCopy].operands.push(OperandId, "'Destination'"); - InstructionDesc[OpGroupAsyncCopy].operands.push(OperandId, "'Source'"); - InstructionDesc[OpGroupAsyncCopy].operands.push(OperandId, "'Num Elements'"); - InstructionDesc[OpGroupAsyncCopy].operands.push(OperandId, "'Stride'"); - InstructionDesc[OpGroupAsyncCopy].operands.push(OperandId, "'Event'"); - - InstructionDesc[OpGroupWaitEvents].operands.push(OperandScope, "'Execution'"); - InstructionDesc[OpGroupWaitEvents].operands.push(OperandId, "'Num Events'"); - InstructionDesc[OpGroupWaitEvents].operands.push(OperandId, "'Events List'"); - - InstructionDesc[OpGroupAll].operands.push(OperandScope, "'Execution'"); - InstructionDesc[OpGroupAll].operands.push(OperandId, "'Predicate'"); - - InstructionDesc[OpGroupAny].operands.push(OperandScope, "'Execution'"); - InstructionDesc[OpGroupAny].operands.push(OperandId, "'Predicate'"); - - InstructionDesc[OpGroupBroadcast].operands.push(OperandScope, "'Execution'"); - InstructionDesc[OpGroupBroadcast].operands.push(OperandId, "'Value'"); - InstructionDesc[OpGroupBroadcast].operands.push(OperandId, "'LocalId'"); - - InstructionDesc[OpGroupIAdd].operands.push(OperandScope, "'Execution'"); - InstructionDesc[OpGroupIAdd].operands.push(OperandGroupOperation, "'Operation'"); - InstructionDesc[OpGroupIAdd].operands.push(OperandId, "'X'"); - - InstructionDesc[OpGroupFAdd].operands.push(OperandScope, "'Execution'"); - InstructionDesc[OpGroupFAdd].operands.push(OperandGroupOperation, "'Operation'"); - InstructionDesc[OpGroupFAdd].operands.push(OperandId, "'X'"); - - InstructionDesc[OpGroupUMin].operands.push(OperandScope, "'Execution'"); - InstructionDesc[OpGroupUMin].operands.push(OperandGroupOperation, "'Operation'"); - InstructionDesc[OpGroupUMin].operands.push(OperandId, "'X'"); - - InstructionDesc[OpGroupSMin].operands.push(OperandScope, "'Execution'"); - InstructionDesc[OpGroupSMin].operands.push(OperandGroupOperation, "'Operation'"); - InstructionDesc[OpGroupSMin].operands.push(OperandId, "X"); - - InstructionDesc[OpGroupFMin].operands.push(OperandScope, "'Execution'"); - InstructionDesc[OpGroupFMin].operands.push(OperandGroupOperation, "'Operation'"); - InstructionDesc[OpGroupFMin].operands.push(OperandId, "X"); - - InstructionDesc[OpGroupUMax].operands.push(OperandScope, "'Execution'"); - InstructionDesc[OpGroupUMax].operands.push(OperandGroupOperation, "'Operation'"); - InstructionDesc[OpGroupUMax].operands.push(OperandId, "X"); - - InstructionDesc[OpGroupSMax].operands.push(OperandScope, "'Execution'"); - InstructionDesc[OpGroupSMax].operands.push(OperandGroupOperation, "'Operation'"); - InstructionDesc[OpGroupSMax].operands.push(OperandId, "X"); - - InstructionDesc[OpGroupFMax].operands.push(OperandScope, "'Execution'"); - InstructionDesc[OpGroupFMax].operands.push(OperandGroupOperation, "'Operation'"); - InstructionDesc[OpGroupFMax].operands.push(OperandId, "X"); - - InstructionDesc[OpReadPipe].operands.push(OperandId, "'Pipe'"); - InstructionDesc[OpReadPipe].operands.push(OperandId, "'Pointer'"); - InstructionDesc[OpReadPipe].operands.push(OperandId, "'Packet Size'"); - InstructionDesc[OpReadPipe].operands.push(OperandId, "'Packet Alignment'"); - - InstructionDesc[OpWritePipe].operands.push(OperandId, "'Pipe'"); - InstructionDesc[OpWritePipe].operands.push(OperandId, "'Pointer'"); - InstructionDesc[OpWritePipe].operands.push(OperandId, "'Packet Size'"); - InstructionDesc[OpWritePipe].operands.push(OperandId, "'Packet Alignment'"); - - InstructionDesc[OpReservedReadPipe].operands.push(OperandId, "'Pipe'"); - InstructionDesc[OpReservedReadPipe].operands.push(OperandId, "'Reserve Id'"); - InstructionDesc[OpReservedReadPipe].operands.push(OperandId, "'Index'"); - InstructionDesc[OpReservedReadPipe].operands.push(OperandId, "'Pointer'"); - InstructionDesc[OpReservedReadPipe].operands.push(OperandId, "'Packet Size'"); - InstructionDesc[OpReservedReadPipe].operands.push(OperandId, "'Packet Alignment'"); - - InstructionDesc[OpReservedWritePipe].operands.push(OperandId, "'Pipe'"); - InstructionDesc[OpReservedWritePipe].operands.push(OperandId, "'Reserve Id'"); - InstructionDesc[OpReservedWritePipe].operands.push(OperandId, "'Index'"); - InstructionDesc[OpReservedWritePipe].operands.push(OperandId, "'Pointer'"); - InstructionDesc[OpReservedWritePipe].operands.push(OperandId, "'Packet Size'"); - InstructionDesc[OpReservedWritePipe].operands.push(OperandId, "'Packet Alignment'"); - - InstructionDesc[OpReserveReadPipePackets].operands.push(OperandId, "'Pipe'"); - InstructionDesc[OpReserveReadPipePackets].operands.push(OperandId, "'Num Packets'"); - InstructionDesc[OpReserveReadPipePackets].operands.push(OperandId, "'Packet Size'"); - InstructionDesc[OpReserveReadPipePackets].operands.push(OperandId, "'Packet Alignment'"); - - InstructionDesc[OpReserveWritePipePackets].operands.push(OperandId, "'Pipe'"); - InstructionDesc[OpReserveWritePipePackets].operands.push(OperandId, "'Num Packets'"); - InstructionDesc[OpReserveWritePipePackets].operands.push(OperandId, "'Packet Size'"); - InstructionDesc[OpReserveWritePipePackets].operands.push(OperandId, "'Packet Alignment'"); - - InstructionDesc[OpCommitReadPipe].operands.push(OperandId, "'Pipe'"); - InstructionDesc[OpCommitReadPipe].operands.push(OperandId, "'Reserve Id'"); - InstructionDesc[OpCommitReadPipe].operands.push(OperandId, "'Packet Size'"); - InstructionDesc[OpCommitReadPipe].operands.push(OperandId, "'Packet Alignment'"); - - InstructionDesc[OpCommitWritePipe].operands.push(OperandId, "'Pipe'"); - InstructionDesc[OpCommitWritePipe].operands.push(OperandId, "'Reserve Id'"); - InstructionDesc[OpCommitWritePipe].operands.push(OperandId, "'Packet Size'"); - InstructionDesc[OpCommitWritePipe].operands.push(OperandId, "'Packet Alignment'"); - - InstructionDesc[OpIsValidReserveId].operands.push(OperandId, "'Reserve Id'"); - - InstructionDesc[OpGetNumPipePackets].operands.push(OperandId, "'Pipe'"); - InstructionDesc[OpGetNumPipePackets].operands.push(OperandId, "'Packet Size'"); - InstructionDesc[OpGetNumPipePackets].operands.push(OperandId, "'Packet Alignment'"); - - InstructionDesc[OpGetMaxPipePackets].operands.push(OperandId, "'Pipe'"); - InstructionDesc[OpGetMaxPipePackets].operands.push(OperandId, "'Packet Size'"); - InstructionDesc[OpGetMaxPipePackets].operands.push(OperandId, "'Packet Alignment'"); - - InstructionDesc[OpGroupReserveReadPipePackets].operands.push(OperandScope, "'Execution'"); - InstructionDesc[OpGroupReserveReadPipePackets].operands.push(OperandId, "'Pipe'"); - InstructionDesc[OpGroupReserveReadPipePackets].operands.push(OperandId, "'Num Packets'"); - InstructionDesc[OpGroupReserveReadPipePackets].operands.push(OperandId, "'Packet Size'"); - InstructionDesc[OpGroupReserveReadPipePackets].operands.push(OperandId, "'Packet Alignment'"); - - InstructionDesc[OpGroupReserveWritePipePackets].operands.push(OperandScope, "'Execution'"); - InstructionDesc[OpGroupReserveWritePipePackets].operands.push(OperandId, "'Pipe'"); - InstructionDesc[OpGroupReserveWritePipePackets].operands.push(OperandId, "'Num Packets'"); - InstructionDesc[OpGroupReserveWritePipePackets].operands.push(OperandId, "'Packet Size'"); - InstructionDesc[OpGroupReserveWritePipePackets].operands.push(OperandId, "'Packet Alignment'"); - - InstructionDesc[OpGroupCommitReadPipe].operands.push(OperandScope, "'Execution'"); - InstructionDesc[OpGroupCommitReadPipe].operands.push(OperandId, "'Pipe'"); - InstructionDesc[OpGroupCommitReadPipe].operands.push(OperandId, "'Reserve Id'"); - InstructionDesc[OpGroupCommitReadPipe].operands.push(OperandId, "'Packet Size'"); - InstructionDesc[OpGroupCommitReadPipe].operands.push(OperandId, "'Packet Alignment'"); - - InstructionDesc[OpGroupCommitWritePipe].operands.push(OperandScope, "'Execution'"); - InstructionDesc[OpGroupCommitWritePipe].operands.push(OperandId, "'Pipe'"); - InstructionDesc[OpGroupCommitWritePipe].operands.push(OperandId, "'Reserve Id'"); - InstructionDesc[OpGroupCommitWritePipe].operands.push(OperandId, "'Packet Size'"); - InstructionDesc[OpGroupCommitWritePipe].operands.push(OperandId, "'Packet Alignment'"); - - InstructionDesc[OpBuildNDRange].operands.push(OperandId, "'GlobalWorkSize'"); - InstructionDesc[OpBuildNDRange].operands.push(OperandId, "'LocalWorkSize'"); - InstructionDesc[OpBuildNDRange].operands.push(OperandId, "'GlobalWorkOffset'"); - - InstructionDesc[OpCaptureEventProfilingInfo].operands.push(OperandId, "'Event'"); - InstructionDesc[OpCaptureEventProfilingInfo].operands.push(OperandId, "'Profiling Info'"); - InstructionDesc[OpCaptureEventProfilingInfo].operands.push(OperandId, "'Value'"); - - InstructionDesc[OpSetUserEventStatus].operands.push(OperandId, "'Event'"); - InstructionDesc[OpSetUserEventStatus].operands.push(OperandId, "'Status'"); - - InstructionDesc[OpIsValidEvent].operands.push(OperandId, "'Event'"); - - InstructionDesc[OpRetainEvent].operands.push(OperandId, "'Event'"); - - InstructionDesc[OpReleaseEvent].operands.push(OperandId, "'Event'"); - - InstructionDesc[OpGetKernelWorkGroupSize].operands.push(OperandId, "'Invoke'"); - InstructionDesc[OpGetKernelWorkGroupSize].operands.push(OperandId, "'Param'"); - InstructionDesc[OpGetKernelWorkGroupSize].operands.push(OperandId, "'Param Size'"); - InstructionDesc[OpGetKernelWorkGroupSize].operands.push(OperandId, "'Param Align'"); - - InstructionDesc[OpGetKernelPreferredWorkGroupSizeMultiple].operands.push(OperandId, "'Invoke'"); - InstructionDesc[OpGetKernelPreferredWorkGroupSizeMultiple].operands.push(OperandId, "'Param'"); - InstructionDesc[OpGetKernelPreferredWorkGroupSizeMultiple].operands.push(OperandId, "'Param Size'"); - InstructionDesc[OpGetKernelPreferredWorkGroupSizeMultiple].operands.push(OperandId, "'Param Align'"); - - InstructionDesc[OpGetKernelNDrangeSubGroupCount].operands.push(OperandId, "'ND Range'"); - InstructionDesc[OpGetKernelNDrangeSubGroupCount].operands.push(OperandId, "'Invoke'"); - InstructionDesc[OpGetKernelNDrangeSubGroupCount].operands.push(OperandId, "'Param'"); - InstructionDesc[OpGetKernelNDrangeSubGroupCount].operands.push(OperandId, "'Param Size'"); - InstructionDesc[OpGetKernelNDrangeSubGroupCount].operands.push(OperandId, "'Param Align'"); - - InstructionDesc[OpGetKernelNDrangeMaxSubGroupSize].operands.push(OperandId, "'ND Range'"); - InstructionDesc[OpGetKernelNDrangeMaxSubGroupSize].operands.push(OperandId, "'Invoke'"); - InstructionDesc[OpGetKernelNDrangeMaxSubGroupSize].operands.push(OperandId, "'Param'"); - InstructionDesc[OpGetKernelNDrangeMaxSubGroupSize].operands.push(OperandId, "'Param Size'"); - InstructionDesc[OpGetKernelNDrangeMaxSubGroupSize].operands.push(OperandId, "'Param Align'"); - - InstructionDesc[OpEnqueueKernel].operands.push(OperandId, "'Queue'"); - InstructionDesc[OpEnqueueKernel].operands.push(OperandId, "'Flags'"); - InstructionDesc[OpEnqueueKernel].operands.push(OperandId, "'ND Range'"); - InstructionDesc[OpEnqueueKernel].operands.push(OperandId, "'Num Events'"); - InstructionDesc[OpEnqueueKernel].operands.push(OperandId, "'Wait Events'"); - InstructionDesc[OpEnqueueKernel].operands.push(OperandId, "'Ret Event'"); - InstructionDesc[OpEnqueueKernel].operands.push(OperandId, "'Invoke'"); - InstructionDesc[OpEnqueueKernel].operands.push(OperandId, "'Param'"); - InstructionDesc[OpEnqueueKernel].operands.push(OperandId, "'Param Size'"); - InstructionDesc[OpEnqueueKernel].operands.push(OperandId, "'Param Align'"); - InstructionDesc[OpEnqueueKernel].operands.push(OperandVariableIds, "'Local Size'"); - - InstructionDesc[OpEnqueueMarker].operands.push(OperandId, "'Queue'"); - InstructionDesc[OpEnqueueMarker].operands.push(OperandId, "'Num Events'"); - InstructionDesc[OpEnqueueMarker].operands.push(OperandId, "'Wait Events'"); - InstructionDesc[OpEnqueueMarker].operands.push(OperandId, "'Ret Event'"); - - InstructionDesc[OpGroupNonUniformElect].operands.push(OperandScope, "'Execution'"); - - InstructionDesc[OpGroupNonUniformAll].operands.push(OperandScope, "'Execution'"); - InstructionDesc[OpGroupNonUniformAll].operands.push(OperandId, "X"); - - InstructionDesc[OpGroupNonUniformAny].operands.push(OperandScope, "'Execution'"); - InstructionDesc[OpGroupNonUniformAny].operands.push(OperandId, "X"); - - InstructionDesc[OpGroupNonUniformAllEqual].operands.push(OperandScope, "'Execution'"); - InstructionDesc[OpGroupNonUniformAllEqual].operands.push(OperandId, "X"); - - InstructionDesc[OpGroupNonUniformBroadcast].operands.push(OperandScope, "'Execution'"); - InstructionDesc[OpGroupNonUniformBroadcast].operands.push(OperandId, "X"); - InstructionDesc[OpGroupNonUniformBroadcast].operands.push(OperandId, "ID"); - - InstructionDesc[OpGroupNonUniformBroadcastFirst].operands.push(OperandScope, "'Execution'"); - InstructionDesc[OpGroupNonUniformBroadcastFirst].operands.push(OperandId, "X"); - - InstructionDesc[OpGroupNonUniformBallot].operands.push(OperandScope, "'Execution'"); - InstructionDesc[OpGroupNonUniformBallot].operands.push(OperandId, "X"); - - InstructionDesc[OpGroupNonUniformInverseBallot].operands.push(OperandScope, "'Execution'"); - InstructionDesc[OpGroupNonUniformInverseBallot].operands.push(OperandId, "X"); - - InstructionDesc[OpGroupNonUniformBallotBitExtract].operands.push(OperandScope, "'Execution'"); - InstructionDesc[OpGroupNonUniformBallotBitExtract].operands.push(OperandId, "X"); - InstructionDesc[OpGroupNonUniformBallotBitExtract].operands.push(OperandId, "Bit"); - - InstructionDesc[OpGroupNonUniformBallotBitCount].operands.push(OperandScope, "'Execution'"); - InstructionDesc[OpGroupNonUniformBallotBitCount].operands.push(OperandGroupOperation, "'Operation'"); - InstructionDesc[OpGroupNonUniformBallotBitCount].operands.push(OperandId, "X"); - - InstructionDesc[OpGroupNonUniformBallotFindLSB].operands.push(OperandScope, "'Execution'"); - InstructionDesc[OpGroupNonUniformBallotFindLSB].operands.push(OperandId, "X"); - - InstructionDesc[OpGroupNonUniformBallotFindMSB].operands.push(OperandScope, "'Execution'"); - InstructionDesc[OpGroupNonUniformBallotFindMSB].operands.push(OperandId, "X"); - - InstructionDesc[OpGroupNonUniformShuffle].operands.push(OperandScope, "'Execution'"); - InstructionDesc[OpGroupNonUniformShuffle].operands.push(OperandId, "X"); - InstructionDesc[OpGroupNonUniformShuffle].operands.push(OperandId, "'Id'"); - - InstructionDesc[OpGroupNonUniformShuffleXor].operands.push(OperandScope, "'Execution'"); - InstructionDesc[OpGroupNonUniformShuffleXor].operands.push(OperandId, "X"); - InstructionDesc[OpGroupNonUniformShuffleXor].operands.push(OperandId, "Mask"); - - InstructionDesc[OpGroupNonUniformShuffleUp].operands.push(OperandScope, "'Execution'"); - InstructionDesc[OpGroupNonUniformShuffleUp].operands.push(OperandId, "X"); - InstructionDesc[OpGroupNonUniformShuffleUp].operands.push(OperandId, "Offset"); - - InstructionDesc[OpGroupNonUniformShuffleDown].operands.push(OperandScope, "'Execution'"); - InstructionDesc[OpGroupNonUniformShuffleDown].operands.push(OperandId, "X"); - InstructionDesc[OpGroupNonUniformShuffleDown].operands.push(OperandId, "Offset"); - - InstructionDesc[OpGroupNonUniformIAdd].operands.push(OperandScope, "'Execution'"); - InstructionDesc[OpGroupNonUniformIAdd].operands.push(OperandGroupOperation, "'Operation'"); - InstructionDesc[OpGroupNonUniformIAdd].operands.push(OperandId, "X"); - InstructionDesc[OpGroupNonUniformIAdd].operands.push(OperandId, "'ClusterSize'", true); - - InstructionDesc[OpGroupNonUniformFAdd].operands.push(OperandScope, "'Execution'"); - InstructionDesc[OpGroupNonUniformFAdd].operands.push(OperandGroupOperation, "'Operation'"); - InstructionDesc[OpGroupNonUniformFAdd].operands.push(OperandId, "X"); - InstructionDesc[OpGroupNonUniformFAdd].operands.push(OperandId, "'ClusterSize'", true); - - InstructionDesc[OpGroupNonUniformIMul].operands.push(OperandScope, "'Execution'"); - InstructionDesc[OpGroupNonUniformIMul].operands.push(OperandGroupOperation, "'Operation'"); - InstructionDesc[OpGroupNonUniformIMul].operands.push(OperandId, "X"); - InstructionDesc[OpGroupNonUniformIMul].operands.push(OperandId, "'ClusterSize'", true); - - InstructionDesc[OpGroupNonUniformFMul].operands.push(OperandScope, "'Execution'"); - InstructionDesc[OpGroupNonUniformFMul].operands.push(OperandGroupOperation, "'Operation'"); - InstructionDesc[OpGroupNonUniformFMul].operands.push(OperandId, "X"); - InstructionDesc[OpGroupNonUniformFMul].operands.push(OperandId, "'ClusterSize'", true); - - InstructionDesc[OpGroupNonUniformSMin].operands.push(OperandScope, "'Execution'"); - InstructionDesc[OpGroupNonUniformSMin].operands.push(OperandGroupOperation, "'Operation'"); - InstructionDesc[OpGroupNonUniformSMin].operands.push(OperandId, "X"); - InstructionDesc[OpGroupNonUniformSMin].operands.push(OperandId, "'ClusterSize'", true); - - InstructionDesc[OpGroupNonUniformUMin].operands.push(OperandScope, "'Execution'"); - InstructionDesc[OpGroupNonUniformUMin].operands.push(OperandGroupOperation, "'Operation'"); - InstructionDesc[OpGroupNonUniformUMin].operands.push(OperandId, "X"); - InstructionDesc[OpGroupNonUniformUMin].operands.push(OperandId, "'ClusterSize'", true); - - InstructionDesc[OpGroupNonUniformFMin].operands.push(OperandScope, "'Execution'"); - InstructionDesc[OpGroupNonUniformFMin].operands.push(OperandGroupOperation, "'Operation'"); - InstructionDesc[OpGroupNonUniformFMin].operands.push(OperandId, "X"); - InstructionDesc[OpGroupNonUniformFMin].operands.push(OperandId, "'ClusterSize'", true); + InstructionDesc[OpAtomicFMaxEXT].operands.push(OperandId, "'Pointer'"); + InstructionDesc[OpAtomicFMaxEXT].operands.push(OperandScope, "'Scope'"); + InstructionDesc[OpAtomicFMaxEXT].operands.push(OperandMemorySemantics, "'Semantics'"); + InstructionDesc[OpAtomicFMaxEXT].operands.push(OperandId, "'Value'"); - InstructionDesc[OpGroupNonUniformSMax].operands.push(OperandScope, "'Execution'"); - InstructionDesc[OpGroupNonUniformSMax].operands.push(OperandGroupOperation, "'Operation'"); - InstructionDesc[OpGroupNonUniformSMax].operands.push(OperandId, "X"); - InstructionDesc[OpGroupNonUniformSMax].operands.push(OperandId, "'ClusterSize'", true); + InstructionDesc[OpAtomicAnd].operands.push(OperandId, "'Pointer'"); + InstructionDesc[OpAtomicAnd].operands.push(OperandScope, "'Scope'"); + InstructionDesc[OpAtomicAnd].operands.push(OperandMemorySemantics, "'Semantics'"); + InstructionDesc[OpAtomicAnd].operands.push(OperandId, "'Value'"); + + InstructionDesc[OpAtomicOr].operands.push(OperandId, "'Pointer'"); + InstructionDesc[OpAtomicOr].operands.push(OperandScope, "'Scope'"); + InstructionDesc[OpAtomicOr].operands.push(OperandMemorySemantics, "'Semantics'"); + InstructionDesc[OpAtomicOr].operands.push(OperandId, "'Value'"); + + InstructionDesc[OpAtomicXor].operands.push(OperandId, "'Pointer'"); + InstructionDesc[OpAtomicXor].operands.push(OperandScope, "'Scope'"); + InstructionDesc[OpAtomicXor].operands.push(OperandMemorySemantics, "'Semantics'"); + InstructionDesc[OpAtomicXor].operands.push(OperandId, "'Value'"); + + InstructionDesc[OpAtomicFlagTestAndSet].operands.push(OperandId, "'Pointer'"); + InstructionDesc[OpAtomicFlagTestAndSet].operands.push(OperandScope, "'Scope'"); + InstructionDesc[OpAtomicFlagTestAndSet].operands.push(OperandMemorySemantics, "'Semantics'"); + + InstructionDesc[OpAtomicFlagClear].operands.push(OperandId, "'Pointer'"); + InstructionDesc[OpAtomicFlagClear].operands.push(OperandScope, "'Scope'"); + InstructionDesc[OpAtomicFlagClear].operands.push(OperandMemorySemantics, "'Semantics'"); + + InstructionDesc[OpLoopMerge].operands.push(OperandId, "'Merge Block'"); + InstructionDesc[OpLoopMerge].operands.push(OperandId, "'Continue Target'"); + InstructionDesc[OpLoopMerge].operands.push(OperandLoop, ""); + InstructionDesc[OpLoopMerge].operands.push(OperandOptionalLiteral, ""); + + InstructionDesc[OpSelectionMerge].operands.push(OperandId, "'Merge Block'"); + InstructionDesc[OpSelectionMerge].operands.push(OperandSelect, ""); + + InstructionDesc[OpBranch].operands.push(OperandId, "'Target Label'"); + + InstructionDesc[OpBranchConditional].operands.push(OperandId, "'Condition'"); + InstructionDesc[OpBranchConditional].operands.push(OperandId, "'True Label'"); + InstructionDesc[OpBranchConditional].operands.push(OperandId, "'False Label'"); + InstructionDesc[OpBranchConditional].operands.push(OperandVariableLiterals, "'Branch weights'"); + + InstructionDesc[OpSwitch].operands.push(OperandId, "'Selector'"); + InstructionDesc[OpSwitch].operands.push(OperandId, "'Default'"); + InstructionDesc[OpSwitch].operands.push(OperandVariableLiteralId, "'Target'"); + + + InstructionDesc[OpReturnValue].operands.push(OperandId, "'Value'"); + + InstructionDesc[OpLifetimeStart].operands.push(OperandId, "'Pointer'"); + InstructionDesc[OpLifetimeStart].operands.push(OperandLiteralNumber, "'Size'"); + + InstructionDesc[OpLifetimeStop].operands.push(OperandId, "'Pointer'"); + InstructionDesc[OpLifetimeStop].operands.push(OperandLiteralNumber, "'Size'"); + + InstructionDesc[OpGroupAsyncCopy].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupAsyncCopy].operands.push(OperandId, "'Destination'"); + InstructionDesc[OpGroupAsyncCopy].operands.push(OperandId, "'Source'"); + InstructionDesc[OpGroupAsyncCopy].operands.push(OperandId, "'Num Elements'"); + InstructionDesc[OpGroupAsyncCopy].operands.push(OperandId, "'Stride'"); + InstructionDesc[OpGroupAsyncCopy].operands.push(OperandId, "'Event'"); + + InstructionDesc[OpGroupWaitEvents].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupWaitEvents].operands.push(OperandId, "'Num Events'"); + InstructionDesc[OpGroupWaitEvents].operands.push(OperandId, "'Events List'"); + + InstructionDesc[OpGroupAll].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupAll].operands.push(OperandId, "'Predicate'"); + + InstructionDesc[OpGroupAny].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupAny].operands.push(OperandId, "'Predicate'"); + + InstructionDesc[OpGroupBroadcast].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupBroadcast].operands.push(OperandId, "'Value'"); + InstructionDesc[OpGroupBroadcast].operands.push(OperandId, "'LocalId'"); + + InstructionDesc[OpGroupIAdd].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupIAdd].operands.push(OperandGroupOperation, "'Operation'"); + InstructionDesc[OpGroupIAdd].operands.push(OperandId, "'X'"); + + InstructionDesc[OpGroupFAdd].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupFAdd].operands.push(OperandGroupOperation, "'Operation'"); + InstructionDesc[OpGroupFAdd].operands.push(OperandId, "'X'"); + + InstructionDesc[OpGroupUMin].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupUMin].operands.push(OperandGroupOperation, "'Operation'"); + InstructionDesc[OpGroupUMin].operands.push(OperandId, "'X'"); + + InstructionDesc[OpGroupSMin].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupSMin].operands.push(OperandGroupOperation, "'Operation'"); + InstructionDesc[OpGroupSMin].operands.push(OperandId, "X"); + + InstructionDesc[OpGroupFMin].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupFMin].operands.push(OperandGroupOperation, "'Operation'"); + InstructionDesc[OpGroupFMin].operands.push(OperandId, "X"); + + InstructionDesc[OpGroupUMax].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupUMax].operands.push(OperandGroupOperation, "'Operation'"); + InstructionDesc[OpGroupUMax].operands.push(OperandId, "X"); + + InstructionDesc[OpGroupSMax].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupSMax].operands.push(OperandGroupOperation, "'Operation'"); + InstructionDesc[OpGroupSMax].operands.push(OperandId, "X"); + + InstructionDesc[OpGroupFMax].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupFMax].operands.push(OperandGroupOperation, "'Operation'"); + InstructionDesc[OpGroupFMax].operands.push(OperandId, "X"); + + InstructionDesc[OpReadPipe].operands.push(OperandId, "'Pipe'"); + InstructionDesc[OpReadPipe].operands.push(OperandId, "'Pointer'"); + InstructionDesc[OpReadPipe].operands.push(OperandId, "'Packet Size'"); + InstructionDesc[OpReadPipe].operands.push(OperandId, "'Packet Alignment'"); + + InstructionDesc[OpWritePipe].operands.push(OperandId, "'Pipe'"); + InstructionDesc[OpWritePipe].operands.push(OperandId, "'Pointer'"); + InstructionDesc[OpWritePipe].operands.push(OperandId, "'Packet Size'"); + InstructionDesc[OpWritePipe].operands.push(OperandId, "'Packet Alignment'"); + + InstructionDesc[OpReservedReadPipe].operands.push(OperandId, "'Pipe'"); + InstructionDesc[OpReservedReadPipe].operands.push(OperandId, "'Reserve Id'"); + InstructionDesc[OpReservedReadPipe].operands.push(OperandId, "'Index'"); + InstructionDesc[OpReservedReadPipe].operands.push(OperandId, "'Pointer'"); + InstructionDesc[OpReservedReadPipe].operands.push(OperandId, "'Packet Size'"); + InstructionDesc[OpReservedReadPipe].operands.push(OperandId, "'Packet Alignment'"); + + InstructionDesc[OpReservedWritePipe].operands.push(OperandId, "'Pipe'"); + InstructionDesc[OpReservedWritePipe].operands.push(OperandId, "'Reserve Id'"); + InstructionDesc[OpReservedWritePipe].operands.push(OperandId, "'Index'"); + InstructionDesc[OpReservedWritePipe].operands.push(OperandId, "'Pointer'"); + InstructionDesc[OpReservedWritePipe].operands.push(OperandId, "'Packet Size'"); + InstructionDesc[OpReservedWritePipe].operands.push(OperandId, "'Packet Alignment'"); + + InstructionDesc[OpReserveReadPipePackets].operands.push(OperandId, "'Pipe'"); + InstructionDesc[OpReserveReadPipePackets].operands.push(OperandId, "'Num Packets'"); + InstructionDesc[OpReserveReadPipePackets].operands.push(OperandId, "'Packet Size'"); + InstructionDesc[OpReserveReadPipePackets].operands.push(OperandId, "'Packet Alignment'"); + + InstructionDesc[OpReserveWritePipePackets].operands.push(OperandId, "'Pipe'"); + InstructionDesc[OpReserveWritePipePackets].operands.push(OperandId, "'Num Packets'"); + InstructionDesc[OpReserveWritePipePackets].operands.push(OperandId, "'Packet Size'"); + InstructionDesc[OpReserveWritePipePackets].operands.push(OperandId, "'Packet Alignment'"); + + InstructionDesc[OpCommitReadPipe].operands.push(OperandId, "'Pipe'"); + InstructionDesc[OpCommitReadPipe].operands.push(OperandId, "'Reserve Id'"); + InstructionDesc[OpCommitReadPipe].operands.push(OperandId, "'Packet Size'"); + InstructionDesc[OpCommitReadPipe].operands.push(OperandId, "'Packet Alignment'"); + + InstructionDesc[OpCommitWritePipe].operands.push(OperandId, "'Pipe'"); + InstructionDesc[OpCommitWritePipe].operands.push(OperandId, "'Reserve Id'"); + InstructionDesc[OpCommitWritePipe].operands.push(OperandId, "'Packet Size'"); + InstructionDesc[OpCommitWritePipe].operands.push(OperandId, "'Packet Alignment'"); + + InstructionDesc[OpIsValidReserveId].operands.push(OperandId, "'Reserve Id'"); + + InstructionDesc[OpGetNumPipePackets].operands.push(OperandId, "'Pipe'"); + InstructionDesc[OpGetNumPipePackets].operands.push(OperandId, "'Packet Size'"); + InstructionDesc[OpGetNumPipePackets].operands.push(OperandId, "'Packet Alignment'"); + + InstructionDesc[OpGetMaxPipePackets].operands.push(OperandId, "'Pipe'"); + InstructionDesc[OpGetMaxPipePackets].operands.push(OperandId, "'Packet Size'"); + InstructionDesc[OpGetMaxPipePackets].operands.push(OperandId, "'Packet Alignment'"); + + InstructionDesc[OpGroupReserveReadPipePackets].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupReserveReadPipePackets].operands.push(OperandId, "'Pipe'"); + InstructionDesc[OpGroupReserveReadPipePackets].operands.push(OperandId, "'Num Packets'"); + InstructionDesc[OpGroupReserveReadPipePackets].operands.push(OperandId, "'Packet Size'"); + InstructionDesc[OpGroupReserveReadPipePackets].operands.push(OperandId, "'Packet Alignment'"); + + InstructionDesc[OpGroupReserveWritePipePackets].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupReserveWritePipePackets].operands.push(OperandId, "'Pipe'"); + InstructionDesc[OpGroupReserveWritePipePackets].operands.push(OperandId, "'Num Packets'"); + InstructionDesc[OpGroupReserveWritePipePackets].operands.push(OperandId, "'Packet Size'"); + InstructionDesc[OpGroupReserveWritePipePackets].operands.push(OperandId, "'Packet Alignment'"); + + InstructionDesc[OpGroupCommitReadPipe].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupCommitReadPipe].operands.push(OperandId, "'Pipe'"); + InstructionDesc[OpGroupCommitReadPipe].operands.push(OperandId, "'Reserve Id'"); + InstructionDesc[OpGroupCommitReadPipe].operands.push(OperandId, "'Packet Size'"); + InstructionDesc[OpGroupCommitReadPipe].operands.push(OperandId, "'Packet Alignment'"); + + InstructionDesc[OpGroupCommitWritePipe].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupCommitWritePipe].operands.push(OperandId, "'Pipe'"); + InstructionDesc[OpGroupCommitWritePipe].operands.push(OperandId, "'Reserve Id'"); + InstructionDesc[OpGroupCommitWritePipe].operands.push(OperandId, "'Packet Size'"); + InstructionDesc[OpGroupCommitWritePipe].operands.push(OperandId, "'Packet Alignment'"); + + InstructionDesc[OpBuildNDRange].operands.push(OperandId, "'GlobalWorkSize'"); + InstructionDesc[OpBuildNDRange].operands.push(OperandId, "'LocalWorkSize'"); + InstructionDesc[OpBuildNDRange].operands.push(OperandId, "'GlobalWorkOffset'"); + + InstructionDesc[OpCaptureEventProfilingInfo].operands.push(OperandId, "'Event'"); + InstructionDesc[OpCaptureEventProfilingInfo].operands.push(OperandId, "'Profiling Info'"); + InstructionDesc[OpCaptureEventProfilingInfo].operands.push(OperandId, "'Value'"); + + InstructionDesc[OpSetUserEventStatus].operands.push(OperandId, "'Event'"); + InstructionDesc[OpSetUserEventStatus].operands.push(OperandId, "'Status'"); + + InstructionDesc[OpIsValidEvent].operands.push(OperandId, "'Event'"); + + InstructionDesc[OpRetainEvent].operands.push(OperandId, "'Event'"); + + InstructionDesc[OpReleaseEvent].operands.push(OperandId, "'Event'"); + + InstructionDesc[OpGetKernelWorkGroupSize].operands.push(OperandId, "'Invoke'"); + InstructionDesc[OpGetKernelWorkGroupSize].operands.push(OperandId, "'Param'"); + InstructionDesc[OpGetKernelWorkGroupSize].operands.push(OperandId, "'Param Size'"); + InstructionDesc[OpGetKernelWorkGroupSize].operands.push(OperandId, "'Param Align'"); + + InstructionDesc[OpGetKernelPreferredWorkGroupSizeMultiple].operands.push(OperandId, "'Invoke'"); + InstructionDesc[OpGetKernelPreferredWorkGroupSizeMultiple].operands.push(OperandId, "'Param'"); + InstructionDesc[OpGetKernelPreferredWorkGroupSizeMultiple].operands.push(OperandId, "'Param Size'"); + InstructionDesc[OpGetKernelPreferredWorkGroupSizeMultiple].operands.push(OperandId, "'Param Align'"); + + InstructionDesc[OpGetKernelNDrangeSubGroupCount].operands.push(OperandId, "'ND Range'"); + InstructionDesc[OpGetKernelNDrangeSubGroupCount].operands.push(OperandId, "'Invoke'"); + InstructionDesc[OpGetKernelNDrangeSubGroupCount].operands.push(OperandId, "'Param'"); + InstructionDesc[OpGetKernelNDrangeSubGroupCount].operands.push(OperandId, "'Param Size'"); + InstructionDesc[OpGetKernelNDrangeSubGroupCount].operands.push(OperandId, "'Param Align'"); + + InstructionDesc[OpGetKernelNDrangeMaxSubGroupSize].operands.push(OperandId, "'ND Range'"); + InstructionDesc[OpGetKernelNDrangeMaxSubGroupSize].operands.push(OperandId, "'Invoke'"); + InstructionDesc[OpGetKernelNDrangeMaxSubGroupSize].operands.push(OperandId, "'Param'"); + InstructionDesc[OpGetKernelNDrangeMaxSubGroupSize].operands.push(OperandId, "'Param Size'"); + InstructionDesc[OpGetKernelNDrangeMaxSubGroupSize].operands.push(OperandId, "'Param Align'"); + + InstructionDesc[OpEnqueueKernel].operands.push(OperandId, "'Queue'"); + InstructionDesc[OpEnqueueKernel].operands.push(OperandId, "'Flags'"); + InstructionDesc[OpEnqueueKernel].operands.push(OperandId, "'ND Range'"); + InstructionDesc[OpEnqueueKernel].operands.push(OperandId, "'Num Events'"); + InstructionDesc[OpEnqueueKernel].operands.push(OperandId, "'Wait Events'"); + InstructionDesc[OpEnqueueKernel].operands.push(OperandId, "'Ret Event'"); + InstructionDesc[OpEnqueueKernel].operands.push(OperandId, "'Invoke'"); + InstructionDesc[OpEnqueueKernel].operands.push(OperandId, "'Param'"); + InstructionDesc[OpEnqueueKernel].operands.push(OperandId, "'Param Size'"); + InstructionDesc[OpEnqueueKernel].operands.push(OperandId, "'Param Align'"); + InstructionDesc[OpEnqueueKernel].operands.push(OperandVariableIds, "'Local Size'"); + + InstructionDesc[OpEnqueueMarker].operands.push(OperandId, "'Queue'"); + InstructionDesc[OpEnqueueMarker].operands.push(OperandId, "'Num Events'"); + InstructionDesc[OpEnqueueMarker].operands.push(OperandId, "'Wait Events'"); + InstructionDesc[OpEnqueueMarker].operands.push(OperandId, "'Ret Event'"); + + InstructionDesc[OpGroupNonUniformElect].operands.push(OperandScope, "'Execution'"); + + InstructionDesc[OpGroupNonUniformAll].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupNonUniformAll].operands.push(OperandId, "X"); + + InstructionDesc[OpGroupNonUniformAny].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupNonUniformAny].operands.push(OperandId, "X"); + + InstructionDesc[OpGroupNonUniformAllEqual].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupNonUniformAllEqual].operands.push(OperandId, "X"); + + InstructionDesc[OpGroupNonUniformBroadcast].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupNonUniformBroadcast].operands.push(OperandId, "X"); + InstructionDesc[OpGroupNonUniformBroadcast].operands.push(OperandId, "ID"); + + InstructionDesc[OpGroupNonUniformBroadcastFirst].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupNonUniformBroadcastFirst].operands.push(OperandId, "X"); + + InstructionDesc[OpGroupNonUniformBallot].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupNonUniformBallot].operands.push(OperandId, "X"); + + InstructionDesc[OpGroupNonUniformInverseBallot].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupNonUniformInverseBallot].operands.push(OperandId, "X"); + + InstructionDesc[OpGroupNonUniformBallotBitExtract].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupNonUniformBallotBitExtract].operands.push(OperandId, "X"); + InstructionDesc[OpGroupNonUniformBallotBitExtract].operands.push(OperandId, "Bit"); + + InstructionDesc[OpGroupNonUniformBallotBitCount].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupNonUniformBallotBitCount].operands.push(OperandGroupOperation, "'Operation'"); + InstructionDesc[OpGroupNonUniformBallotBitCount].operands.push(OperandId, "X"); + + InstructionDesc[OpGroupNonUniformBallotFindLSB].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupNonUniformBallotFindLSB].operands.push(OperandId, "X"); + + InstructionDesc[OpGroupNonUniformBallotFindMSB].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupNonUniformBallotFindMSB].operands.push(OperandId, "X"); + + InstructionDesc[OpGroupNonUniformShuffle].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupNonUniformShuffle].operands.push(OperandId, "X"); + InstructionDesc[OpGroupNonUniformShuffle].operands.push(OperandId, "'Id'"); + + InstructionDesc[OpGroupNonUniformShuffleXor].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupNonUniformShuffleXor].operands.push(OperandId, "X"); + InstructionDesc[OpGroupNonUniformShuffleXor].operands.push(OperandId, "Mask"); + + InstructionDesc[OpGroupNonUniformShuffleUp].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupNonUniformShuffleUp].operands.push(OperandId, "X"); + InstructionDesc[OpGroupNonUniformShuffleUp].operands.push(OperandId, "Offset"); + + InstructionDesc[OpGroupNonUniformShuffleDown].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupNonUniformShuffleDown].operands.push(OperandId, "X"); + InstructionDesc[OpGroupNonUniformShuffleDown].operands.push(OperandId, "Offset"); + + InstructionDesc[OpGroupNonUniformIAdd].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupNonUniformIAdd].operands.push(OperandGroupOperation, "'Operation'"); + InstructionDesc[OpGroupNonUniformIAdd].operands.push(OperandId, "X"); + InstructionDesc[OpGroupNonUniformIAdd].operands.push(OperandId, "'ClusterSize'", true); + + InstructionDesc[OpGroupNonUniformFAdd].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupNonUniformFAdd].operands.push(OperandGroupOperation, "'Operation'"); + InstructionDesc[OpGroupNonUniformFAdd].operands.push(OperandId, "X"); + InstructionDesc[OpGroupNonUniformFAdd].operands.push(OperandId, "'ClusterSize'", true); + + InstructionDesc[OpGroupNonUniformIMul].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupNonUniformIMul].operands.push(OperandGroupOperation, "'Operation'"); + InstructionDesc[OpGroupNonUniformIMul].operands.push(OperandId, "X"); + InstructionDesc[OpGroupNonUniformIMul].operands.push(OperandId, "'ClusterSize'", true); + + InstructionDesc[OpGroupNonUniformFMul].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupNonUniformFMul].operands.push(OperandGroupOperation, "'Operation'"); + InstructionDesc[OpGroupNonUniformFMul].operands.push(OperandId, "X"); + InstructionDesc[OpGroupNonUniformFMul].operands.push(OperandId, "'ClusterSize'", true); + + InstructionDesc[OpGroupNonUniformSMin].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupNonUniformSMin].operands.push(OperandGroupOperation, "'Operation'"); + InstructionDesc[OpGroupNonUniformSMin].operands.push(OperandId, "X"); + InstructionDesc[OpGroupNonUniformSMin].operands.push(OperandId, "'ClusterSize'", true); + + InstructionDesc[OpGroupNonUniformUMin].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupNonUniformUMin].operands.push(OperandGroupOperation, "'Operation'"); + InstructionDesc[OpGroupNonUniformUMin].operands.push(OperandId, "X"); + InstructionDesc[OpGroupNonUniformUMin].operands.push(OperandId, "'ClusterSize'", true); + + InstructionDesc[OpGroupNonUniformFMin].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupNonUniformFMin].operands.push(OperandGroupOperation, "'Operation'"); + InstructionDesc[OpGroupNonUniformFMin].operands.push(OperandId, "X"); + InstructionDesc[OpGroupNonUniformFMin].operands.push(OperandId, "'ClusterSize'", true); - InstructionDesc[OpGroupNonUniformUMax].operands.push(OperandScope, "'Execution'"); - InstructionDesc[OpGroupNonUniformUMax].operands.push(OperandGroupOperation, "'Operation'"); - InstructionDesc[OpGroupNonUniformUMax].operands.push(OperandId, "X"); - InstructionDesc[OpGroupNonUniformUMax].operands.push(OperandId, "'ClusterSize'", true); + InstructionDesc[OpGroupNonUniformSMax].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupNonUniformSMax].operands.push(OperandGroupOperation, "'Operation'"); + InstructionDesc[OpGroupNonUniformSMax].operands.push(OperandId, "X"); + InstructionDesc[OpGroupNonUniformSMax].operands.push(OperandId, "'ClusterSize'", true); - InstructionDesc[OpGroupNonUniformFMax].operands.push(OperandScope, "'Execution'"); - InstructionDesc[OpGroupNonUniformFMax].operands.push(OperandGroupOperation, "'Operation'"); - InstructionDesc[OpGroupNonUniformFMax].operands.push(OperandId, "X"); - InstructionDesc[OpGroupNonUniformFMax].operands.push(OperandId, "'ClusterSize'", true); + InstructionDesc[OpGroupNonUniformUMax].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupNonUniformUMax].operands.push(OperandGroupOperation, "'Operation'"); + InstructionDesc[OpGroupNonUniformUMax].operands.push(OperandId, "X"); + InstructionDesc[OpGroupNonUniformUMax].operands.push(OperandId, "'ClusterSize'", true); - InstructionDesc[OpGroupNonUniformBitwiseAnd].operands.push(OperandScope, "'Execution'"); - InstructionDesc[OpGroupNonUniformBitwiseAnd].operands.push(OperandGroupOperation, "'Operation'"); - InstructionDesc[OpGroupNonUniformBitwiseAnd].operands.push(OperandId, "X"); - InstructionDesc[OpGroupNonUniformBitwiseAnd].operands.push(OperandId, "'ClusterSize'", true); + InstructionDesc[OpGroupNonUniformFMax].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupNonUniformFMax].operands.push(OperandGroupOperation, "'Operation'"); + InstructionDesc[OpGroupNonUniformFMax].operands.push(OperandId, "X"); + InstructionDesc[OpGroupNonUniformFMax].operands.push(OperandId, "'ClusterSize'", true); - InstructionDesc[OpGroupNonUniformBitwiseOr].operands.push(OperandScope, "'Execution'"); - InstructionDesc[OpGroupNonUniformBitwiseOr].operands.push(OperandGroupOperation, "'Operation'"); - InstructionDesc[OpGroupNonUniformBitwiseOr].operands.push(OperandId, "X"); - InstructionDesc[OpGroupNonUniformBitwiseOr].operands.push(OperandId, "'ClusterSize'", true); - - InstructionDesc[OpGroupNonUniformBitwiseXor].operands.push(OperandScope, "'Execution'"); - InstructionDesc[OpGroupNonUniformBitwiseXor].operands.push(OperandGroupOperation, "'Operation'"); - InstructionDesc[OpGroupNonUniformBitwiseXor].operands.push(OperandId, "X"); - InstructionDesc[OpGroupNonUniformBitwiseXor].operands.push(OperandId, "'ClusterSize'", true); - - InstructionDesc[OpGroupNonUniformLogicalAnd].operands.push(OperandScope, "'Execution'"); - InstructionDesc[OpGroupNonUniformLogicalAnd].operands.push(OperandGroupOperation, "'Operation'"); - InstructionDesc[OpGroupNonUniformLogicalAnd].operands.push(OperandId, "X"); - InstructionDesc[OpGroupNonUniformLogicalAnd].operands.push(OperandId, "'ClusterSize'", true); - - InstructionDesc[OpGroupNonUniformLogicalOr].operands.push(OperandScope, "'Execution'"); - InstructionDesc[OpGroupNonUniformLogicalOr].operands.push(OperandGroupOperation, "'Operation'"); - InstructionDesc[OpGroupNonUniformLogicalOr].operands.push(OperandId, "X"); - InstructionDesc[OpGroupNonUniformLogicalOr].operands.push(OperandId, "'ClusterSize'", true); - - InstructionDesc[OpGroupNonUniformLogicalXor].operands.push(OperandScope, "'Execution'"); - InstructionDesc[OpGroupNonUniformLogicalXor].operands.push(OperandGroupOperation, "'Operation'"); - InstructionDesc[OpGroupNonUniformLogicalXor].operands.push(OperandId, "X"); - InstructionDesc[OpGroupNonUniformLogicalXor].operands.push(OperandId, "'ClusterSize'", true); - - InstructionDesc[OpGroupNonUniformQuadBroadcast].operands.push(OperandScope, "'Execution'"); - InstructionDesc[OpGroupNonUniformQuadBroadcast].operands.push(OperandId, "X"); - InstructionDesc[OpGroupNonUniformQuadBroadcast].operands.push(OperandId, "'Id'"); - - InstructionDesc[OpGroupNonUniformQuadSwap].operands.push(OperandScope, "'Execution'"); - InstructionDesc[OpGroupNonUniformQuadSwap].operands.push(OperandId, "X"); - InstructionDesc[OpGroupNonUniformQuadSwap].operands.push(OperandId, "'Direction'"); - - InstructionDesc[OpSubgroupBallotKHR].operands.push(OperandId, "'Predicate'"); - - InstructionDesc[OpSubgroupFirstInvocationKHR].operands.push(OperandId, "'Value'"); - - InstructionDesc[OpSubgroupAnyKHR].operands.push(OperandScope, "'Execution'"); - InstructionDesc[OpSubgroupAnyKHR].operands.push(OperandId, "'Predicate'"); - - InstructionDesc[OpSubgroupAllKHR].operands.push(OperandScope, "'Execution'"); - InstructionDesc[OpSubgroupAllKHR].operands.push(OperandId, "'Predicate'"); - - InstructionDesc[OpSubgroupAllEqualKHR].operands.push(OperandScope, "'Execution'"); - InstructionDesc[OpSubgroupAllEqualKHR].operands.push(OperandId, "'Predicate'"); - - InstructionDesc[OpSubgroupReadInvocationKHR].operands.push(OperandId, "'Value'"); - InstructionDesc[OpSubgroupReadInvocationKHR].operands.push(OperandId, "'Index'"); - - InstructionDesc[OpModuleProcessed].operands.push(OperandLiteralString, "'process'"); - - InstructionDesc[OpGroupIAddNonUniformAMD].operands.push(OperandScope, "'Execution'"); - InstructionDesc[OpGroupIAddNonUniformAMD].operands.push(OperandGroupOperation, "'Operation'"); - InstructionDesc[OpGroupIAddNonUniformAMD].operands.push(OperandId, "'X'"); - - InstructionDesc[OpGroupFAddNonUniformAMD].operands.push(OperandScope, "'Execution'"); - InstructionDesc[OpGroupFAddNonUniformAMD].operands.push(OperandGroupOperation, "'Operation'"); - InstructionDesc[OpGroupFAddNonUniformAMD].operands.push(OperandId, "'X'"); - - InstructionDesc[OpGroupUMinNonUniformAMD].operands.push(OperandScope, "'Execution'"); - InstructionDesc[OpGroupUMinNonUniformAMD].operands.push(OperandGroupOperation, "'Operation'"); - InstructionDesc[OpGroupUMinNonUniformAMD].operands.push(OperandId, "'X'"); - - InstructionDesc[OpGroupSMinNonUniformAMD].operands.push(OperandScope, "'Execution'"); - InstructionDesc[OpGroupSMinNonUniformAMD].operands.push(OperandGroupOperation, "'Operation'"); - InstructionDesc[OpGroupSMinNonUniformAMD].operands.push(OperandId, "X"); - - InstructionDesc[OpGroupFMinNonUniformAMD].operands.push(OperandScope, "'Execution'"); - InstructionDesc[OpGroupFMinNonUniformAMD].operands.push(OperandGroupOperation, "'Operation'"); - InstructionDesc[OpGroupFMinNonUniformAMD].operands.push(OperandId, "X"); - - InstructionDesc[OpGroupUMaxNonUniformAMD].operands.push(OperandScope, "'Execution'"); - InstructionDesc[OpGroupUMaxNonUniformAMD].operands.push(OperandGroupOperation, "'Operation'"); - InstructionDesc[OpGroupUMaxNonUniformAMD].operands.push(OperandId, "X"); - - InstructionDesc[OpGroupSMaxNonUniformAMD].operands.push(OperandScope, "'Execution'"); - InstructionDesc[OpGroupSMaxNonUniformAMD].operands.push(OperandGroupOperation, "'Operation'"); - InstructionDesc[OpGroupSMaxNonUniformAMD].operands.push(OperandId, "X"); - - InstructionDesc[OpGroupFMaxNonUniformAMD].operands.push(OperandScope, "'Execution'"); - InstructionDesc[OpGroupFMaxNonUniformAMD].operands.push(OperandGroupOperation, "'Operation'"); - InstructionDesc[OpGroupFMaxNonUniformAMD].operands.push(OperandId, "X"); - - InstructionDesc[OpFragmentMaskFetchAMD].operands.push(OperandId, "'Image'"); - InstructionDesc[OpFragmentMaskFetchAMD].operands.push(OperandId, "'Coordinate'"); - - InstructionDesc[OpFragmentFetchAMD].operands.push(OperandId, "'Image'"); - InstructionDesc[OpFragmentFetchAMD].operands.push(OperandId, "'Coordinate'"); - InstructionDesc[OpFragmentFetchAMD].operands.push(OperandId, "'Fragment Index'"); - - InstructionDesc[OpGroupNonUniformPartitionNV].operands.push(OperandId, "X"); - - InstructionDesc[OpTypeAccelerationStructureKHR].setResultAndType(true, false); - - InstructionDesc[OpTraceNV].operands.push(OperandId, "'Acceleration Structure'"); - InstructionDesc[OpTraceNV].operands.push(OperandId, "'Ray Flags'"); - InstructionDesc[OpTraceNV].operands.push(OperandId, "'Cull Mask'"); - InstructionDesc[OpTraceNV].operands.push(OperandId, "'SBT Record Offset'"); - InstructionDesc[OpTraceNV].operands.push(OperandId, "'SBT Record Stride'"); - InstructionDesc[OpTraceNV].operands.push(OperandId, "'Miss Index'"); - InstructionDesc[OpTraceNV].operands.push(OperandId, "'Ray Origin'"); - InstructionDesc[OpTraceNV].operands.push(OperandId, "'TMin'"); - InstructionDesc[OpTraceNV].operands.push(OperandId, "'Ray Direction'"); - InstructionDesc[OpTraceNV].operands.push(OperandId, "'TMax'"); - InstructionDesc[OpTraceNV].operands.push(OperandId, "'Payload'"); - InstructionDesc[OpTraceNV].setResultAndType(false, false); - - InstructionDesc[OpTraceRayMotionNV].operands.push(OperandId, "'Acceleration Structure'"); - InstructionDesc[OpTraceRayMotionNV].operands.push(OperandId, "'Ray Flags'"); - InstructionDesc[OpTraceRayMotionNV].operands.push(OperandId, "'Cull Mask'"); - InstructionDesc[OpTraceRayMotionNV].operands.push(OperandId, "'SBT Record Offset'"); - InstructionDesc[OpTraceRayMotionNV].operands.push(OperandId, "'SBT Record Stride'"); - InstructionDesc[OpTraceRayMotionNV].operands.push(OperandId, "'Miss Index'"); - InstructionDesc[OpTraceRayMotionNV].operands.push(OperandId, "'Ray Origin'"); - InstructionDesc[OpTraceRayMotionNV].operands.push(OperandId, "'TMin'"); - InstructionDesc[OpTraceRayMotionNV].operands.push(OperandId, "'Ray Direction'"); - InstructionDesc[OpTraceRayMotionNV].operands.push(OperandId, "'TMax'"); - InstructionDesc[OpTraceRayMotionNV].operands.push(OperandId, "'Time'"); - InstructionDesc[OpTraceRayMotionNV].operands.push(OperandId, "'Payload'"); - InstructionDesc[OpTraceRayMotionNV].setResultAndType(false, false); - - InstructionDesc[OpTraceRayKHR].operands.push(OperandId, "'Acceleration Structure'"); - InstructionDesc[OpTraceRayKHR].operands.push(OperandId, "'Ray Flags'"); - InstructionDesc[OpTraceRayKHR].operands.push(OperandId, "'Cull Mask'"); - InstructionDesc[OpTraceRayKHR].operands.push(OperandId, "'SBT Record Offset'"); - InstructionDesc[OpTraceRayKHR].operands.push(OperandId, "'SBT Record Stride'"); - InstructionDesc[OpTraceRayKHR].operands.push(OperandId, "'Miss Index'"); - InstructionDesc[OpTraceRayKHR].operands.push(OperandId, "'Ray Origin'"); - InstructionDesc[OpTraceRayKHR].operands.push(OperandId, "'TMin'"); - InstructionDesc[OpTraceRayKHR].operands.push(OperandId, "'Ray Direction'"); - InstructionDesc[OpTraceRayKHR].operands.push(OperandId, "'TMax'"); - InstructionDesc[OpTraceRayKHR].operands.push(OperandId, "'Payload'"); - InstructionDesc[OpTraceRayKHR].setResultAndType(false, false); - - InstructionDesc[OpReportIntersectionKHR].operands.push(OperandId, "'Hit Parameter'"); - InstructionDesc[OpReportIntersectionKHR].operands.push(OperandId, "'Hit Kind'"); - - InstructionDesc[OpIgnoreIntersectionNV].setResultAndType(false, false); - - InstructionDesc[OpIgnoreIntersectionKHR].setResultAndType(false, false); - - InstructionDesc[OpTerminateRayNV].setResultAndType(false, false); - - InstructionDesc[OpTerminateRayKHR].setResultAndType(false, false); - - InstructionDesc[OpExecuteCallableNV].operands.push(OperandId, "SBT Record Index"); - InstructionDesc[OpExecuteCallableNV].operands.push(OperandId, "CallableData ID"); - InstructionDesc[OpExecuteCallableNV].setResultAndType(false, false); - - InstructionDesc[OpExecuteCallableKHR].operands.push(OperandId, "SBT Record Index"); - InstructionDesc[OpExecuteCallableKHR].operands.push(OperandId, "CallableData"); - InstructionDesc[OpExecuteCallableKHR].setResultAndType(false, false); - - InstructionDesc[OpConvertUToAccelerationStructureKHR].operands.push(OperandId, "Value"); - InstructionDesc[OpConvertUToAccelerationStructureKHR].setResultAndType(true, true); - - // Ray Query - InstructionDesc[OpTypeAccelerationStructureKHR].setResultAndType(true, false); - InstructionDesc[OpTypeRayQueryKHR].setResultAndType(true, false); - - InstructionDesc[OpRayQueryInitializeKHR].operands.push(OperandId, "'RayQuery'"); - InstructionDesc[OpRayQueryInitializeKHR].operands.push(OperandId, "'AccelerationS'"); - InstructionDesc[OpRayQueryInitializeKHR].operands.push(OperandId, "'RayFlags'"); - InstructionDesc[OpRayQueryInitializeKHR].operands.push(OperandId, "'CullMask'"); - InstructionDesc[OpRayQueryInitializeKHR].operands.push(OperandId, "'Origin'"); - InstructionDesc[OpRayQueryInitializeKHR].operands.push(OperandId, "'Tmin'"); - InstructionDesc[OpRayQueryInitializeKHR].operands.push(OperandId, "'Direction'"); - InstructionDesc[OpRayQueryInitializeKHR].operands.push(OperandId, "'Tmax'"); - InstructionDesc[OpRayQueryInitializeKHR].setResultAndType(false, false); - - InstructionDesc[OpRayQueryTerminateKHR].operands.push(OperandId, "'RayQuery'"); - InstructionDesc[OpRayQueryTerminateKHR].setResultAndType(false, false); - - InstructionDesc[OpRayQueryGenerateIntersectionKHR].operands.push(OperandId, "'RayQuery'"); - InstructionDesc[OpRayQueryGenerateIntersectionKHR].operands.push(OperandId, "'THit'"); - InstructionDesc[OpRayQueryGenerateIntersectionKHR].setResultAndType(false, false); - - InstructionDesc[OpRayQueryConfirmIntersectionKHR].operands.push(OperandId, "'RayQuery'"); - InstructionDesc[OpRayQueryConfirmIntersectionKHR].setResultAndType(false, false); - - InstructionDesc[OpRayQueryProceedKHR].operands.push(OperandId, "'RayQuery'"); - InstructionDesc[OpRayQueryProceedKHR].setResultAndType(true, true); - - InstructionDesc[OpRayQueryGetIntersectionTypeKHR].operands.push(OperandId, "'RayQuery'"); - InstructionDesc[OpRayQueryGetIntersectionTypeKHR].operands.push(OperandId, "'Committed'"); - InstructionDesc[OpRayQueryGetIntersectionTypeKHR].setResultAndType(true, true); - - InstructionDesc[OpRayQueryGetRayTMinKHR].operands.push(OperandId, "'RayQuery'"); - InstructionDesc[OpRayQueryGetRayTMinKHR].setResultAndType(true, true); - - InstructionDesc[OpRayQueryGetRayFlagsKHR].operands.push(OperandId, "'RayQuery'"); - InstructionDesc[OpRayQueryGetRayFlagsKHR].setResultAndType(true, true); - - InstructionDesc[OpRayQueryGetIntersectionTKHR].operands.push(OperandId, "'RayQuery'"); - InstructionDesc[OpRayQueryGetIntersectionTKHR].operands.push(OperandId, "'Committed'"); - InstructionDesc[OpRayQueryGetIntersectionTKHR].setResultAndType(true, true); - - InstructionDesc[OpRayQueryGetIntersectionInstanceCustomIndexKHR].operands.push(OperandId, "'RayQuery'"); - InstructionDesc[OpRayQueryGetIntersectionInstanceCustomIndexKHR].operands.push(OperandId, "'Committed'"); - InstructionDesc[OpRayQueryGetIntersectionInstanceCustomIndexKHR].setResultAndType(true, true); - - InstructionDesc[OpRayQueryGetIntersectionInstanceIdKHR].operands.push(OperandId, "'RayQuery'"); - InstructionDesc[OpRayQueryGetIntersectionInstanceIdKHR].operands.push(OperandId, "'Committed'"); - InstructionDesc[OpRayQueryGetIntersectionInstanceIdKHR].setResultAndType(true, true); - - InstructionDesc[OpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR].operands.push(OperandId, "'RayQuery'"); - InstructionDesc[OpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR].operands.push(OperandId, "'Committed'"); - InstructionDesc[OpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR].setResultAndType(true, true); - - InstructionDesc[OpRayQueryGetIntersectionGeometryIndexKHR].operands.push(OperandId, "'RayQuery'"); - InstructionDesc[OpRayQueryGetIntersectionGeometryIndexKHR].operands.push(OperandId, "'Committed'"); - InstructionDesc[OpRayQueryGetIntersectionGeometryIndexKHR].setResultAndType(true, true); - - InstructionDesc[OpRayQueryGetIntersectionPrimitiveIndexKHR].operands.push(OperandId, "'RayQuery'"); - InstructionDesc[OpRayQueryGetIntersectionPrimitiveIndexKHR].operands.push(OperandId, "'Committed'"); - InstructionDesc[OpRayQueryGetIntersectionPrimitiveIndexKHR].setResultAndType(true, true); - - InstructionDesc[OpRayQueryGetIntersectionBarycentricsKHR].operands.push(OperandId, "'RayQuery'"); - InstructionDesc[OpRayQueryGetIntersectionBarycentricsKHR].operands.push(OperandId, "'Committed'"); - InstructionDesc[OpRayQueryGetIntersectionBarycentricsKHR].setResultAndType(true, true); - - InstructionDesc[OpRayQueryGetIntersectionFrontFaceKHR].operands.push(OperandId, "'RayQuery'"); - InstructionDesc[OpRayQueryGetIntersectionFrontFaceKHR].operands.push(OperandId, "'Committed'"); - InstructionDesc[OpRayQueryGetIntersectionFrontFaceKHR].setResultAndType(true, true); - - InstructionDesc[OpRayQueryGetIntersectionCandidateAABBOpaqueKHR].operands.push(OperandId, "'RayQuery'"); - InstructionDesc[OpRayQueryGetIntersectionCandidateAABBOpaqueKHR].setResultAndType(true, true); - - InstructionDesc[OpRayQueryGetIntersectionObjectRayDirectionKHR].operands.push(OperandId, "'RayQuery'"); - InstructionDesc[OpRayQueryGetIntersectionObjectRayDirectionKHR].operands.push(OperandId, "'Committed'"); - InstructionDesc[OpRayQueryGetIntersectionObjectRayDirectionKHR].setResultAndType(true, true); + InstructionDesc[OpGroupNonUniformBitwiseAnd].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupNonUniformBitwiseAnd].operands.push(OperandGroupOperation, "'Operation'"); + InstructionDesc[OpGroupNonUniformBitwiseAnd].operands.push(OperandId, "X"); + InstructionDesc[OpGroupNonUniformBitwiseAnd].operands.push(OperandId, "'ClusterSize'", true); - InstructionDesc[OpRayQueryGetIntersectionObjectRayOriginKHR].operands.push(OperandId, "'RayQuery'"); - InstructionDesc[OpRayQueryGetIntersectionObjectRayOriginKHR].operands.push(OperandId, "'Committed'"); - InstructionDesc[OpRayQueryGetIntersectionObjectRayOriginKHR].setResultAndType(true, true); + InstructionDesc[OpGroupNonUniformBitwiseOr].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupNonUniformBitwiseOr].operands.push(OperandGroupOperation, "'Operation'"); + InstructionDesc[OpGroupNonUniformBitwiseOr].operands.push(OperandId, "X"); + InstructionDesc[OpGroupNonUniformBitwiseOr].operands.push(OperandId, "'ClusterSize'", true); + + InstructionDesc[OpGroupNonUniformBitwiseXor].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupNonUniformBitwiseXor].operands.push(OperandGroupOperation, "'Operation'"); + InstructionDesc[OpGroupNonUniformBitwiseXor].operands.push(OperandId, "X"); + InstructionDesc[OpGroupNonUniformBitwiseXor].operands.push(OperandId, "'ClusterSize'", true); + + InstructionDesc[OpGroupNonUniformLogicalAnd].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupNonUniformLogicalAnd].operands.push(OperandGroupOperation, "'Operation'"); + InstructionDesc[OpGroupNonUniformLogicalAnd].operands.push(OperandId, "X"); + InstructionDesc[OpGroupNonUniformLogicalAnd].operands.push(OperandId, "'ClusterSize'", true); + + InstructionDesc[OpGroupNonUniformLogicalOr].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupNonUniformLogicalOr].operands.push(OperandGroupOperation, "'Operation'"); + InstructionDesc[OpGroupNonUniformLogicalOr].operands.push(OperandId, "X"); + InstructionDesc[OpGroupNonUniformLogicalOr].operands.push(OperandId, "'ClusterSize'", true); + + InstructionDesc[OpGroupNonUniformLogicalXor].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupNonUniformLogicalXor].operands.push(OperandGroupOperation, "'Operation'"); + InstructionDesc[OpGroupNonUniformLogicalXor].operands.push(OperandId, "X"); + InstructionDesc[OpGroupNonUniformLogicalXor].operands.push(OperandId, "'ClusterSize'", true); + + InstructionDesc[OpGroupNonUniformQuadBroadcast].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupNonUniformQuadBroadcast].operands.push(OperandId, "X"); + InstructionDesc[OpGroupNonUniformQuadBroadcast].operands.push(OperandId, "'Id'"); + + InstructionDesc[OpGroupNonUniformQuadSwap].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupNonUniformQuadSwap].operands.push(OperandId, "X"); + InstructionDesc[OpGroupNonUniformQuadSwap].operands.push(OperandId, "'Direction'"); + + InstructionDesc[OpSubgroupBallotKHR].operands.push(OperandId, "'Predicate'"); + + InstructionDesc[OpSubgroupFirstInvocationKHR].operands.push(OperandId, "'Value'"); + + InstructionDesc[OpSubgroupAnyKHR].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpSubgroupAnyKHR].operands.push(OperandId, "'Predicate'"); + + InstructionDesc[OpSubgroupAllKHR].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpSubgroupAllKHR].operands.push(OperandId, "'Predicate'"); + + InstructionDesc[OpSubgroupAllEqualKHR].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpSubgroupAllEqualKHR].operands.push(OperandId, "'Predicate'"); + + InstructionDesc[OpSubgroupReadInvocationKHR].operands.push(OperandId, "'Value'"); + InstructionDesc[OpSubgroupReadInvocationKHR].operands.push(OperandId, "'Index'"); + + InstructionDesc[OpModuleProcessed].operands.push(OperandLiteralString, "'process'"); + + InstructionDesc[OpGroupIAddNonUniformAMD].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupIAddNonUniformAMD].operands.push(OperandGroupOperation, "'Operation'"); + InstructionDesc[OpGroupIAddNonUniformAMD].operands.push(OperandId, "'X'"); + + InstructionDesc[OpGroupFAddNonUniformAMD].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupFAddNonUniformAMD].operands.push(OperandGroupOperation, "'Operation'"); + InstructionDesc[OpGroupFAddNonUniformAMD].operands.push(OperandId, "'X'"); + + InstructionDesc[OpGroupUMinNonUniformAMD].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupUMinNonUniformAMD].operands.push(OperandGroupOperation, "'Operation'"); + InstructionDesc[OpGroupUMinNonUniformAMD].operands.push(OperandId, "'X'"); + + InstructionDesc[OpGroupSMinNonUniformAMD].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupSMinNonUniformAMD].operands.push(OperandGroupOperation, "'Operation'"); + InstructionDesc[OpGroupSMinNonUniformAMD].operands.push(OperandId, "X"); + + InstructionDesc[OpGroupFMinNonUniformAMD].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupFMinNonUniformAMD].operands.push(OperandGroupOperation, "'Operation'"); + InstructionDesc[OpGroupFMinNonUniformAMD].operands.push(OperandId, "X"); + + InstructionDesc[OpGroupUMaxNonUniformAMD].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupUMaxNonUniformAMD].operands.push(OperandGroupOperation, "'Operation'"); + InstructionDesc[OpGroupUMaxNonUniformAMD].operands.push(OperandId, "X"); + + InstructionDesc[OpGroupSMaxNonUniformAMD].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupSMaxNonUniformAMD].operands.push(OperandGroupOperation, "'Operation'"); + InstructionDesc[OpGroupSMaxNonUniformAMD].operands.push(OperandId, "X"); + + InstructionDesc[OpGroupFMaxNonUniformAMD].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupFMaxNonUniformAMD].operands.push(OperandGroupOperation, "'Operation'"); + InstructionDesc[OpGroupFMaxNonUniformAMD].operands.push(OperandId, "X"); + + InstructionDesc[OpFragmentMaskFetchAMD].operands.push(OperandId, "'Image'"); + InstructionDesc[OpFragmentMaskFetchAMD].operands.push(OperandId, "'Coordinate'"); + + InstructionDesc[OpFragmentFetchAMD].operands.push(OperandId, "'Image'"); + InstructionDesc[OpFragmentFetchAMD].operands.push(OperandId, "'Coordinate'"); + InstructionDesc[OpFragmentFetchAMD].operands.push(OperandId, "'Fragment Index'"); + + InstructionDesc[OpGroupNonUniformPartitionNV].operands.push(OperandId, "X"); + + InstructionDesc[OpTypeAccelerationStructureKHR].setResultAndType(true, false); + + InstructionDesc[OpTraceNV].operands.push(OperandId, "'Acceleration Structure'"); + InstructionDesc[OpTraceNV].operands.push(OperandId, "'Ray Flags'"); + InstructionDesc[OpTraceNV].operands.push(OperandId, "'Cull Mask'"); + InstructionDesc[OpTraceNV].operands.push(OperandId, "'SBT Record Offset'"); + InstructionDesc[OpTraceNV].operands.push(OperandId, "'SBT Record Stride'"); + InstructionDesc[OpTraceNV].operands.push(OperandId, "'Miss Index'"); + InstructionDesc[OpTraceNV].operands.push(OperandId, "'Ray Origin'"); + InstructionDesc[OpTraceNV].operands.push(OperandId, "'TMin'"); + InstructionDesc[OpTraceNV].operands.push(OperandId, "'Ray Direction'"); + InstructionDesc[OpTraceNV].operands.push(OperandId, "'TMax'"); + InstructionDesc[OpTraceNV].operands.push(OperandId, "'Payload'"); + InstructionDesc[OpTraceNV].setResultAndType(false, false); + + InstructionDesc[OpTraceRayMotionNV].operands.push(OperandId, "'Acceleration Structure'"); + InstructionDesc[OpTraceRayMotionNV].operands.push(OperandId, "'Ray Flags'"); + InstructionDesc[OpTraceRayMotionNV].operands.push(OperandId, "'Cull Mask'"); + InstructionDesc[OpTraceRayMotionNV].operands.push(OperandId, "'SBT Record Offset'"); + InstructionDesc[OpTraceRayMotionNV].operands.push(OperandId, "'SBT Record Stride'"); + InstructionDesc[OpTraceRayMotionNV].operands.push(OperandId, "'Miss Index'"); + InstructionDesc[OpTraceRayMotionNV].operands.push(OperandId, "'Ray Origin'"); + InstructionDesc[OpTraceRayMotionNV].operands.push(OperandId, "'TMin'"); + InstructionDesc[OpTraceRayMotionNV].operands.push(OperandId, "'Ray Direction'"); + InstructionDesc[OpTraceRayMotionNV].operands.push(OperandId, "'TMax'"); + InstructionDesc[OpTraceRayMotionNV].operands.push(OperandId, "'Time'"); + InstructionDesc[OpTraceRayMotionNV].operands.push(OperandId, "'Payload'"); + InstructionDesc[OpTraceRayMotionNV].setResultAndType(false, false); + + InstructionDesc[OpTraceRayKHR].operands.push(OperandId, "'Acceleration Structure'"); + InstructionDesc[OpTraceRayKHR].operands.push(OperandId, "'Ray Flags'"); + InstructionDesc[OpTraceRayKHR].operands.push(OperandId, "'Cull Mask'"); + InstructionDesc[OpTraceRayKHR].operands.push(OperandId, "'SBT Record Offset'"); + InstructionDesc[OpTraceRayKHR].operands.push(OperandId, "'SBT Record Stride'"); + InstructionDesc[OpTraceRayKHR].operands.push(OperandId, "'Miss Index'"); + InstructionDesc[OpTraceRayKHR].operands.push(OperandId, "'Ray Origin'"); + InstructionDesc[OpTraceRayKHR].operands.push(OperandId, "'TMin'"); + InstructionDesc[OpTraceRayKHR].operands.push(OperandId, "'Ray Direction'"); + InstructionDesc[OpTraceRayKHR].operands.push(OperandId, "'TMax'"); + InstructionDesc[OpTraceRayKHR].operands.push(OperandId, "'Payload'"); + InstructionDesc[OpTraceRayKHR].setResultAndType(false, false); + + InstructionDesc[OpReportIntersectionKHR].operands.push(OperandId, "'Hit Parameter'"); + InstructionDesc[OpReportIntersectionKHR].operands.push(OperandId, "'Hit Kind'"); + + InstructionDesc[OpIgnoreIntersectionNV].setResultAndType(false, false); + + InstructionDesc[OpIgnoreIntersectionKHR].setResultAndType(false, false); + + InstructionDesc[OpTerminateRayNV].setResultAndType(false, false); + + InstructionDesc[OpTerminateRayKHR].setResultAndType(false, false); + + InstructionDesc[OpExecuteCallableNV].operands.push(OperandId, "SBT Record Index"); + InstructionDesc[OpExecuteCallableNV].operands.push(OperandId, "CallableData ID"); + InstructionDesc[OpExecuteCallableNV].setResultAndType(false, false); + + InstructionDesc[OpExecuteCallableKHR].operands.push(OperandId, "SBT Record Index"); + InstructionDesc[OpExecuteCallableKHR].operands.push(OperandId, "CallableData"); + InstructionDesc[OpExecuteCallableKHR].setResultAndType(false, false); + + InstructionDesc[OpConvertUToAccelerationStructureKHR].operands.push(OperandId, "Value"); + InstructionDesc[OpConvertUToAccelerationStructureKHR].setResultAndType(true, true); + + // Ray Query + InstructionDesc[OpTypeAccelerationStructureKHR].setResultAndType(true, false); + InstructionDesc[OpTypeRayQueryKHR].setResultAndType(true, false); + + InstructionDesc[OpRayQueryInitializeKHR].operands.push(OperandId, "'RayQuery'"); + InstructionDesc[OpRayQueryInitializeKHR].operands.push(OperandId, "'AccelerationS'"); + InstructionDesc[OpRayQueryInitializeKHR].operands.push(OperandId, "'RayFlags'"); + InstructionDesc[OpRayQueryInitializeKHR].operands.push(OperandId, "'CullMask'"); + InstructionDesc[OpRayQueryInitializeKHR].operands.push(OperandId, "'Origin'"); + InstructionDesc[OpRayQueryInitializeKHR].operands.push(OperandId, "'Tmin'"); + InstructionDesc[OpRayQueryInitializeKHR].operands.push(OperandId, "'Direction'"); + InstructionDesc[OpRayQueryInitializeKHR].operands.push(OperandId, "'Tmax'"); + InstructionDesc[OpRayQueryInitializeKHR].setResultAndType(false, false); + + InstructionDesc[OpRayQueryTerminateKHR].operands.push(OperandId, "'RayQuery'"); + InstructionDesc[OpRayQueryTerminateKHR].setResultAndType(false, false); + + InstructionDesc[OpRayQueryGenerateIntersectionKHR].operands.push(OperandId, "'RayQuery'"); + InstructionDesc[OpRayQueryGenerateIntersectionKHR].operands.push(OperandId, "'THit'"); + InstructionDesc[OpRayQueryGenerateIntersectionKHR].setResultAndType(false, false); + + InstructionDesc[OpRayQueryConfirmIntersectionKHR].operands.push(OperandId, "'RayQuery'"); + InstructionDesc[OpRayQueryConfirmIntersectionKHR].setResultAndType(false, false); + + InstructionDesc[OpRayQueryProceedKHR].operands.push(OperandId, "'RayQuery'"); + InstructionDesc[OpRayQueryProceedKHR].setResultAndType(true, true); + + InstructionDesc[OpRayQueryGetIntersectionTypeKHR].operands.push(OperandId, "'RayQuery'"); + InstructionDesc[OpRayQueryGetIntersectionTypeKHR].operands.push(OperandId, "'Committed'"); + InstructionDesc[OpRayQueryGetIntersectionTypeKHR].setResultAndType(true, true); + + InstructionDesc[OpRayQueryGetRayTMinKHR].operands.push(OperandId, "'RayQuery'"); + InstructionDesc[OpRayQueryGetRayTMinKHR].setResultAndType(true, true); + + InstructionDesc[OpRayQueryGetRayFlagsKHR].operands.push(OperandId, "'RayQuery'"); + InstructionDesc[OpRayQueryGetRayFlagsKHR].setResultAndType(true, true); + + InstructionDesc[OpRayQueryGetIntersectionTKHR].operands.push(OperandId, "'RayQuery'"); + InstructionDesc[OpRayQueryGetIntersectionTKHR].operands.push(OperandId, "'Committed'"); + InstructionDesc[OpRayQueryGetIntersectionTKHR].setResultAndType(true, true); + + InstructionDesc[OpRayQueryGetIntersectionInstanceCustomIndexKHR].operands.push(OperandId, "'RayQuery'"); + InstructionDesc[OpRayQueryGetIntersectionInstanceCustomIndexKHR].operands.push(OperandId, "'Committed'"); + InstructionDesc[OpRayQueryGetIntersectionInstanceCustomIndexKHR].setResultAndType(true, true); + + InstructionDesc[OpRayQueryGetIntersectionInstanceIdKHR].operands.push(OperandId, "'RayQuery'"); + InstructionDesc[OpRayQueryGetIntersectionInstanceIdKHR].operands.push(OperandId, "'Committed'"); + InstructionDesc[OpRayQueryGetIntersectionInstanceIdKHR].setResultAndType(true, true); + + InstructionDesc[OpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR].operands.push(OperandId, "'RayQuery'"); + InstructionDesc[OpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR].operands.push(OperandId, "'Committed'"); + InstructionDesc[OpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR].setResultAndType(true, true); + + InstructionDesc[OpRayQueryGetIntersectionGeometryIndexKHR].operands.push(OperandId, "'RayQuery'"); + InstructionDesc[OpRayQueryGetIntersectionGeometryIndexKHR].operands.push(OperandId, "'Committed'"); + InstructionDesc[OpRayQueryGetIntersectionGeometryIndexKHR].setResultAndType(true, true); + + InstructionDesc[OpRayQueryGetIntersectionPrimitiveIndexKHR].operands.push(OperandId, "'RayQuery'"); + InstructionDesc[OpRayQueryGetIntersectionPrimitiveIndexKHR].operands.push(OperandId, "'Committed'"); + InstructionDesc[OpRayQueryGetIntersectionPrimitiveIndexKHR].setResultAndType(true, true); + + InstructionDesc[OpRayQueryGetIntersectionBarycentricsKHR].operands.push(OperandId, "'RayQuery'"); + InstructionDesc[OpRayQueryGetIntersectionBarycentricsKHR].operands.push(OperandId, "'Committed'"); + InstructionDesc[OpRayQueryGetIntersectionBarycentricsKHR].setResultAndType(true, true); + + InstructionDesc[OpRayQueryGetIntersectionFrontFaceKHR].operands.push(OperandId, "'RayQuery'"); + InstructionDesc[OpRayQueryGetIntersectionFrontFaceKHR].operands.push(OperandId, "'Committed'"); + InstructionDesc[OpRayQueryGetIntersectionFrontFaceKHR].setResultAndType(true, true); + + InstructionDesc[OpRayQueryGetIntersectionCandidateAABBOpaqueKHR].operands.push(OperandId, "'RayQuery'"); + InstructionDesc[OpRayQueryGetIntersectionCandidateAABBOpaqueKHR].setResultAndType(true, true); + + InstructionDesc[OpRayQueryGetIntersectionObjectRayDirectionKHR].operands.push(OperandId, "'RayQuery'"); + InstructionDesc[OpRayQueryGetIntersectionObjectRayDirectionKHR].operands.push(OperandId, "'Committed'"); + InstructionDesc[OpRayQueryGetIntersectionObjectRayDirectionKHR].setResultAndType(true, true); - InstructionDesc[OpRayQueryGetWorldRayDirectionKHR].operands.push(OperandId, "'RayQuery'"); - InstructionDesc[OpRayQueryGetWorldRayDirectionKHR].setResultAndType(true, true); + InstructionDesc[OpRayQueryGetIntersectionObjectRayOriginKHR].operands.push(OperandId, "'RayQuery'"); + InstructionDesc[OpRayQueryGetIntersectionObjectRayOriginKHR].operands.push(OperandId, "'Committed'"); + InstructionDesc[OpRayQueryGetIntersectionObjectRayOriginKHR].setResultAndType(true, true); - InstructionDesc[OpRayQueryGetWorldRayOriginKHR].operands.push(OperandId, "'RayQuery'"); - InstructionDesc[OpRayQueryGetWorldRayOriginKHR].setResultAndType(true, true); - - InstructionDesc[OpRayQueryGetIntersectionObjectToWorldKHR].operands.push(OperandId, "'RayQuery'"); - InstructionDesc[OpRayQueryGetIntersectionObjectToWorldKHR].operands.push(OperandId, "'Committed'"); - InstructionDesc[OpRayQueryGetIntersectionObjectToWorldKHR].setResultAndType(true, true); - - InstructionDesc[OpRayQueryGetIntersectionWorldToObjectKHR].operands.push(OperandId, "'RayQuery'"); - InstructionDesc[OpRayQueryGetIntersectionWorldToObjectKHR].operands.push(OperandId, "'Committed'"); - InstructionDesc[OpRayQueryGetIntersectionWorldToObjectKHR].setResultAndType(true, true); - - InstructionDesc[OpImageSampleFootprintNV].operands.push(OperandId, "'Sampled Image'"); - InstructionDesc[OpImageSampleFootprintNV].operands.push(OperandId, "'Coordinate'"); - InstructionDesc[OpImageSampleFootprintNV].operands.push(OperandId, "'Granularity'"); - InstructionDesc[OpImageSampleFootprintNV].operands.push(OperandId, "'Coarse'"); - InstructionDesc[OpImageSampleFootprintNV].operands.push(OperandImageOperands, "", true); - InstructionDesc[OpImageSampleFootprintNV].operands.push(OperandVariableIds, "", true); - - InstructionDesc[OpWritePackedPrimitiveIndices4x8NV].operands.push(OperandId, "'Index Offset'"); - InstructionDesc[OpWritePackedPrimitiveIndices4x8NV].operands.push(OperandId, "'Packed Indices'"); - - InstructionDesc[OpEmitMeshTasksEXT].operands.push(OperandId, "'groupCountX'"); - InstructionDesc[OpEmitMeshTasksEXT].operands.push(OperandId, "'groupCountY'"); - InstructionDesc[OpEmitMeshTasksEXT].operands.push(OperandId, "'groupCountZ'"); - InstructionDesc[OpEmitMeshTasksEXT].operands.push(OperandId, "'Payload'"); - InstructionDesc[OpEmitMeshTasksEXT].setResultAndType(false, false); + InstructionDesc[OpRayQueryGetWorldRayDirectionKHR].operands.push(OperandId, "'RayQuery'"); + InstructionDesc[OpRayQueryGetWorldRayDirectionKHR].setResultAndType(true, true); - InstructionDesc[OpSetMeshOutputsEXT].operands.push(OperandId, "'vertexCount'"); - InstructionDesc[OpSetMeshOutputsEXT].operands.push(OperandId, "'primitiveCount'"); - InstructionDesc[OpSetMeshOutputsEXT].setResultAndType(false, false); + InstructionDesc[OpRayQueryGetWorldRayOriginKHR].operands.push(OperandId, "'RayQuery'"); + InstructionDesc[OpRayQueryGetWorldRayOriginKHR].setResultAndType(true, true); + InstructionDesc[OpRayQueryGetIntersectionObjectToWorldKHR].operands.push(OperandId, "'RayQuery'"); + InstructionDesc[OpRayQueryGetIntersectionObjectToWorldKHR].operands.push(OperandId, "'Committed'"); + InstructionDesc[OpRayQueryGetIntersectionObjectToWorldKHR].setResultAndType(true, true); + + InstructionDesc[OpRayQueryGetIntersectionWorldToObjectKHR].operands.push(OperandId, "'RayQuery'"); + InstructionDesc[OpRayQueryGetIntersectionWorldToObjectKHR].operands.push(OperandId, "'Committed'"); + InstructionDesc[OpRayQueryGetIntersectionWorldToObjectKHR].setResultAndType(true, true); + + InstructionDesc[OpRayQueryGetIntersectionTriangleVertexPositionsKHR].operands.push(OperandId, "'RayQuery'"); + InstructionDesc[OpRayQueryGetIntersectionTriangleVertexPositionsKHR].operands.push(OperandId, "'Committed'"); + InstructionDesc[OpRayQueryGetIntersectionTriangleVertexPositionsKHR].setResultAndType(true, true); + + InstructionDesc[OpImageSampleFootprintNV].operands.push(OperandId, "'Sampled Image'"); + InstructionDesc[OpImageSampleFootprintNV].operands.push(OperandId, "'Coordinate'"); + InstructionDesc[OpImageSampleFootprintNV].operands.push(OperandId, "'Granularity'"); + InstructionDesc[OpImageSampleFootprintNV].operands.push(OperandId, "'Coarse'"); + InstructionDesc[OpImageSampleFootprintNV].operands.push(OperandImageOperands, "", true); + InstructionDesc[OpImageSampleFootprintNV].operands.push(OperandVariableIds, "", true); + + InstructionDesc[OpWritePackedPrimitiveIndices4x8NV].operands.push(OperandId, "'Index Offset'"); + InstructionDesc[OpWritePackedPrimitiveIndices4x8NV].operands.push(OperandId, "'Packed Indices'"); - InstructionDesc[OpTypeCooperativeMatrixNV].operands.push(OperandId, "'Component Type'"); - InstructionDesc[OpTypeCooperativeMatrixNV].operands.push(OperandId, "'Scope'"); - InstructionDesc[OpTypeCooperativeMatrixNV].operands.push(OperandId, "'Rows'"); - InstructionDesc[OpTypeCooperativeMatrixNV].operands.push(OperandId, "'Columns'"); + InstructionDesc[OpEmitMeshTasksEXT].operands.push(OperandId, "'groupCountX'"); + InstructionDesc[OpEmitMeshTasksEXT].operands.push(OperandId, "'groupCountY'"); + InstructionDesc[OpEmitMeshTasksEXT].operands.push(OperandId, "'groupCountZ'"); + InstructionDesc[OpEmitMeshTasksEXT].operands.push(OperandId, "'Payload'"); + InstructionDesc[OpEmitMeshTasksEXT].setResultAndType(false, false); - InstructionDesc[OpCooperativeMatrixLoadNV].operands.push(OperandId, "'Pointer'"); - InstructionDesc[OpCooperativeMatrixLoadNV].operands.push(OperandId, "'Stride'"); - InstructionDesc[OpCooperativeMatrixLoadNV].operands.push(OperandId, "'Column Major'"); - InstructionDesc[OpCooperativeMatrixLoadNV].operands.push(OperandMemoryAccess, "'Memory Access'"); - InstructionDesc[OpCooperativeMatrixLoadNV].operands.push(OperandLiteralNumber, "", true); - InstructionDesc[OpCooperativeMatrixLoadNV].operands.push(OperandId, "", true); + InstructionDesc[OpSetMeshOutputsEXT].operands.push(OperandId, "'vertexCount'"); + InstructionDesc[OpSetMeshOutputsEXT].operands.push(OperandId, "'primitiveCount'"); + InstructionDesc[OpSetMeshOutputsEXT].setResultAndType(false, false); - InstructionDesc[OpCooperativeMatrixStoreNV].operands.push(OperandId, "'Pointer'"); - InstructionDesc[OpCooperativeMatrixStoreNV].operands.push(OperandId, "'Object'"); - InstructionDesc[OpCooperativeMatrixStoreNV].operands.push(OperandId, "'Stride'"); - InstructionDesc[OpCooperativeMatrixStoreNV].operands.push(OperandId, "'Column Major'"); - InstructionDesc[OpCooperativeMatrixStoreNV].operands.push(OperandMemoryAccess, "'Memory Access'"); - InstructionDesc[OpCooperativeMatrixStoreNV].operands.push(OperandLiteralNumber, "", true); - InstructionDesc[OpCooperativeMatrixStoreNV].operands.push(OperandId, "", true); - - InstructionDesc[OpCooperativeMatrixMulAddNV].operands.push(OperandId, "'A'"); - InstructionDesc[OpCooperativeMatrixMulAddNV].operands.push(OperandId, "'B'"); - InstructionDesc[OpCooperativeMatrixMulAddNV].operands.push(OperandId, "'C'"); - - InstructionDesc[OpCooperativeMatrixLengthNV].operands.push(OperandId, "'Type'"); - - InstructionDesc[OpDemoteToHelperInvocationEXT].setResultAndType(false, false); - - InstructionDesc[OpReadClockKHR].operands.push(OperandScope, "'Scope'"); + + InstructionDesc[OpTypeCooperativeMatrixNV].operands.push(OperandId, "'Component Type'"); + InstructionDesc[OpTypeCooperativeMatrixNV].operands.push(OperandId, "'Scope'"); + InstructionDesc[OpTypeCooperativeMatrixNV].operands.push(OperandId, "'Rows'"); + InstructionDesc[OpTypeCooperativeMatrixNV].operands.push(OperandId, "'Columns'"); + + InstructionDesc[OpCooperativeMatrixLoadNV].operands.push(OperandId, "'Pointer'"); + InstructionDesc[OpCooperativeMatrixLoadNV].operands.push(OperandId, "'Stride'"); + InstructionDesc[OpCooperativeMatrixLoadNV].operands.push(OperandId, "'Column Major'"); + InstructionDesc[OpCooperativeMatrixLoadNV].operands.push(OperandMemoryAccess, "'Memory Access'"); + InstructionDesc[OpCooperativeMatrixLoadNV].operands.push(OperandLiteralNumber, "", true); + InstructionDesc[OpCooperativeMatrixLoadNV].operands.push(OperandId, "", true); + + InstructionDesc[OpCooperativeMatrixStoreNV].operands.push(OperandId, "'Pointer'"); + InstructionDesc[OpCooperativeMatrixStoreNV].operands.push(OperandId, "'Object'"); + InstructionDesc[OpCooperativeMatrixStoreNV].operands.push(OperandId, "'Stride'"); + InstructionDesc[OpCooperativeMatrixStoreNV].operands.push(OperandId, "'Column Major'"); + InstructionDesc[OpCooperativeMatrixStoreNV].operands.push(OperandMemoryAccess, "'Memory Access'"); + InstructionDesc[OpCooperativeMatrixStoreNV].operands.push(OperandLiteralNumber, "", true); + InstructionDesc[OpCooperativeMatrixStoreNV].operands.push(OperandId, "", true); + + InstructionDesc[OpCooperativeMatrixMulAddNV].operands.push(OperandId, "'A'"); + InstructionDesc[OpCooperativeMatrixMulAddNV].operands.push(OperandId, "'B'"); + InstructionDesc[OpCooperativeMatrixMulAddNV].operands.push(OperandId, "'C'"); + + InstructionDesc[OpCooperativeMatrixLengthNV].operands.push(OperandId, "'Type'"); + + InstructionDesc[OpTypeCooperativeMatrixKHR].operands.push(OperandId, "'Component Type'"); + InstructionDesc[OpTypeCooperativeMatrixKHR].operands.push(OperandId, "'Scope'"); + InstructionDesc[OpTypeCooperativeMatrixKHR].operands.push(OperandId, "'Rows'"); + InstructionDesc[OpTypeCooperativeMatrixKHR].operands.push(OperandId, "'Columns'"); + InstructionDesc[OpTypeCooperativeMatrixKHR].operands.push(OperandId, "'Use'"); + + InstructionDesc[OpCooperativeMatrixLoadKHR].operands.push(OperandId, "'Pointer'"); + InstructionDesc[OpCooperativeMatrixLoadKHR].operands.push(OperandId, "'Memory Layout'"); + InstructionDesc[OpCooperativeMatrixLoadKHR].operands.push(OperandId, "'Stride'"); + InstructionDesc[OpCooperativeMatrixLoadKHR].operands.push(OperandMemoryAccess, "'Memory Access'"); + InstructionDesc[OpCooperativeMatrixLoadKHR].operands.push(OperandLiteralNumber, "", true); + InstructionDesc[OpCooperativeMatrixLoadKHR].operands.push(OperandId, "", true); + + InstructionDesc[OpCooperativeMatrixStoreKHR].operands.push(OperandId, "'Pointer'"); + InstructionDesc[OpCooperativeMatrixStoreKHR].operands.push(OperandId, "'Object'"); + InstructionDesc[OpCooperativeMatrixStoreKHR].operands.push(OperandId, "'Memory Layout'"); + InstructionDesc[OpCooperativeMatrixStoreKHR].operands.push(OperandId, "'Stride'"); + InstructionDesc[OpCooperativeMatrixStoreKHR].operands.push(OperandMemoryAccess, "'Memory Access'"); + InstructionDesc[OpCooperativeMatrixStoreKHR].operands.push(OperandLiteralNumber, "", true); + InstructionDesc[OpCooperativeMatrixStoreKHR].operands.push(OperandId, "", true); + + InstructionDesc[OpCooperativeMatrixMulAddKHR].operands.push(OperandId, "'A'"); + InstructionDesc[OpCooperativeMatrixMulAddKHR].operands.push(OperandId, "'B'"); + InstructionDesc[OpCooperativeMatrixMulAddKHR].operands.push(OperandId, "'C'"); + InstructionDesc[OpCooperativeMatrixMulAddKHR].operands.push(OperandCooperativeMatrixOperands, "'Cooperative Matrix Operands'", true); + + InstructionDesc[OpCooperativeMatrixLengthKHR].operands.push(OperandId, "'Type'"); + + InstructionDesc[OpDemoteToHelperInvocationEXT].setResultAndType(false, false); + + InstructionDesc[OpReadClockKHR].operands.push(OperandScope, "'Scope'"); + + InstructionDesc[OpTypeHitObjectNV].setResultAndType(true, false); + + InstructionDesc[OpHitObjectGetShaderRecordBufferHandleNV].operands.push(OperandId, "'HitObject'"); + InstructionDesc[OpHitObjectGetShaderRecordBufferHandleNV].setResultAndType(true, true); + + InstructionDesc[OpReorderThreadWithHintNV].operands.push(OperandId, "'Hint'"); + InstructionDesc[OpReorderThreadWithHintNV].operands.push(OperandId, "'Bits'"); + InstructionDesc[OpReorderThreadWithHintNV].setResultAndType(false, false); + + InstructionDesc[OpReorderThreadWithHitObjectNV].operands.push(OperandId, "'HitObject'"); + InstructionDesc[OpReorderThreadWithHitObjectNV].operands.push(OperandId, "'Hint'"); + InstructionDesc[OpReorderThreadWithHitObjectNV].operands.push(OperandId, "'Bits'"); + InstructionDesc[OpReorderThreadWithHitObjectNV].setResultAndType(false, false); + + InstructionDesc[OpHitObjectGetCurrentTimeNV].operands.push(OperandId, "'HitObject'"); + InstructionDesc[OpHitObjectGetCurrentTimeNV].setResultAndType(true, true); + + InstructionDesc[OpHitObjectGetHitKindNV].operands.push(OperandId, "'HitObject'"); + InstructionDesc[OpHitObjectGetHitKindNV].setResultAndType(true, true); + + InstructionDesc[OpHitObjectGetPrimitiveIndexNV].operands.push(OperandId, "'HitObject'"); + InstructionDesc[OpHitObjectGetPrimitiveIndexNV].setResultAndType(true, true); + + InstructionDesc[OpHitObjectGetGeometryIndexNV].operands.push(OperandId, "'HitObject'"); + InstructionDesc[OpHitObjectGetGeometryIndexNV].setResultAndType(true, true); + + InstructionDesc[OpHitObjectGetInstanceIdNV].operands.push(OperandId, "'HitObject'"); + InstructionDesc[OpHitObjectGetInstanceIdNV].setResultAndType(true, true); + + InstructionDesc[OpHitObjectGetInstanceCustomIndexNV].operands.push(OperandId, "'HitObject'"); + InstructionDesc[OpHitObjectGetInstanceCustomIndexNV].setResultAndType(true, true); + + InstructionDesc[OpHitObjectGetObjectRayDirectionNV].operands.push(OperandId, "'HitObject'"); + InstructionDesc[OpHitObjectGetObjectRayDirectionNV].setResultAndType(true, true); + + InstructionDesc[OpHitObjectGetObjectRayOriginNV].operands.push(OperandId, "'HitObject'"); + InstructionDesc[OpHitObjectGetObjectRayOriginNV].setResultAndType(true, true); + + InstructionDesc[OpHitObjectGetWorldRayDirectionNV].operands.push(OperandId, "'HitObject'"); + InstructionDesc[OpHitObjectGetWorldRayDirectionNV].setResultAndType(true, true); + + InstructionDesc[OpHitObjectGetWorldRayOriginNV].operands.push(OperandId, "'HitObject'"); + InstructionDesc[OpHitObjectGetWorldRayOriginNV].setResultAndType(true, true); + + InstructionDesc[OpHitObjectGetWorldToObjectNV].operands.push(OperandId, "'HitObject'"); + InstructionDesc[OpHitObjectGetWorldToObjectNV].setResultAndType(true, true); + + InstructionDesc[OpHitObjectGetObjectToWorldNV].operands.push(OperandId, "'HitObject'"); + InstructionDesc[OpHitObjectGetObjectToWorldNV].setResultAndType(true, true); + + InstructionDesc[OpHitObjectGetRayTMaxNV].operands.push(OperandId, "'HitObject'"); + InstructionDesc[OpHitObjectGetRayTMaxNV].setResultAndType(true, true); + + InstructionDesc[OpHitObjectGetRayTMinNV].operands.push(OperandId, "'HitObject'"); + InstructionDesc[OpHitObjectGetRayTMinNV].setResultAndType(true, true); + + InstructionDesc[OpHitObjectGetShaderBindingTableRecordIndexNV].operands.push(OperandId, "'HitObject'"); + InstructionDesc[OpHitObjectGetShaderBindingTableRecordIndexNV].setResultAndType(true, true); + + InstructionDesc[OpHitObjectIsEmptyNV].operands.push(OperandId, "'HitObject'"); + InstructionDesc[OpHitObjectIsEmptyNV].setResultAndType(true, true); + + InstructionDesc[OpHitObjectIsHitNV].operands.push(OperandId, "'HitObject'"); + InstructionDesc[OpHitObjectIsHitNV].setResultAndType(true, true); + + InstructionDesc[OpHitObjectIsMissNV].operands.push(OperandId, "'HitObject'"); + InstructionDesc[OpHitObjectIsMissNV].setResultAndType(true, true); + + InstructionDesc[OpHitObjectGetAttributesNV].operands.push(OperandId, "'HitObject'"); + InstructionDesc[OpHitObjectGetAttributesNV].operands.push(OperandId, "'HitObjectAttribute'"); + InstructionDesc[OpHitObjectGetAttributesNV].setResultAndType(false, false); + + InstructionDesc[OpHitObjectExecuteShaderNV].operands.push(OperandId, "'HitObject'"); + InstructionDesc[OpHitObjectExecuteShaderNV].operands.push(OperandId, "'Payload'"); + InstructionDesc[OpHitObjectExecuteShaderNV].setResultAndType(false, false); + + InstructionDesc[OpHitObjectRecordHitNV].operands.push(OperandId, "'HitObject'"); + InstructionDesc[OpHitObjectRecordHitNV].operands.push(OperandId, "'Acceleration Structure'"); + InstructionDesc[OpHitObjectRecordHitNV].operands.push(OperandId, "'InstanceId'"); + InstructionDesc[OpHitObjectRecordHitNV].operands.push(OperandId, "'PrimitiveId'"); + InstructionDesc[OpHitObjectRecordHitNV].operands.push(OperandId, "'GeometryIndex'"); + InstructionDesc[OpHitObjectRecordHitNV].operands.push(OperandId, "'HitKind'"); + InstructionDesc[OpHitObjectRecordHitNV].operands.push(OperandId, "'SBT Record Offset'"); + InstructionDesc[OpHitObjectRecordHitNV].operands.push(OperandId, "'SBT Record Stride'"); + InstructionDesc[OpHitObjectRecordHitNV].operands.push(OperandId, "'Origin'"); + InstructionDesc[OpHitObjectRecordHitNV].operands.push(OperandId, "'TMin'"); + InstructionDesc[OpHitObjectRecordHitNV].operands.push(OperandId, "'Direction'"); + InstructionDesc[OpHitObjectRecordHitNV].operands.push(OperandId, "'TMax'"); + InstructionDesc[OpHitObjectRecordHitNV].operands.push(OperandId, "'HitObject Attribute'"); + InstructionDesc[OpHitObjectRecordHitNV].setResultAndType(false, false); + + InstructionDesc[OpHitObjectRecordHitMotionNV].operands.push(OperandId, "'HitObject'"); + InstructionDesc[OpHitObjectRecordHitMotionNV].operands.push(OperandId, "'Acceleration Structure'"); + InstructionDesc[OpHitObjectRecordHitMotionNV].operands.push(OperandId, "'InstanceId'"); + InstructionDesc[OpHitObjectRecordHitMotionNV].operands.push(OperandId, "'PrimitiveId'"); + InstructionDesc[OpHitObjectRecordHitMotionNV].operands.push(OperandId, "'GeometryIndex'"); + InstructionDesc[OpHitObjectRecordHitMotionNV].operands.push(OperandId, "'HitKind'"); + InstructionDesc[OpHitObjectRecordHitMotionNV].operands.push(OperandId, "'SBT Record Offset'"); + InstructionDesc[OpHitObjectRecordHitMotionNV].operands.push(OperandId, "'SBT Record Stride'"); + InstructionDesc[OpHitObjectRecordHitMotionNV].operands.push(OperandId, "'Origin'"); + InstructionDesc[OpHitObjectRecordHitMotionNV].operands.push(OperandId, "'TMin'"); + InstructionDesc[OpHitObjectRecordHitMotionNV].operands.push(OperandId, "'Direction'"); + InstructionDesc[OpHitObjectRecordHitMotionNV].operands.push(OperandId, "'TMax'"); + InstructionDesc[OpHitObjectRecordHitMotionNV].operands.push(OperandId, "'Current Time'"); + InstructionDesc[OpHitObjectRecordHitMotionNV].operands.push(OperandId, "'HitObject Attribute'"); + InstructionDesc[OpHitObjectRecordHitMotionNV].setResultAndType(false, false); + + InstructionDesc[OpHitObjectRecordHitWithIndexNV].operands.push(OperandId, "'HitObject'"); + InstructionDesc[OpHitObjectRecordHitWithIndexNV].operands.push(OperandId, "'Acceleration Structure'"); + InstructionDesc[OpHitObjectRecordHitWithIndexNV].operands.push(OperandId, "'InstanceId'"); + InstructionDesc[OpHitObjectRecordHitWithIndexNV].operands.push(OperandId, "'PrimitiveId'"); + InstructionDesc[OpHitObjectRecordHitWithIndexNV].operands.push(OperandId, "'GeometryIndex'"); + InstructionDesc[OpHitObjectRecordHitWithIndexNV].operands.push(OperandId, "'HitKind'"); + InstructionDesc[OpHitObjectRecordHitWithIndexNV].operands.push(OperandId, "'SBT Record Index'"); + InstructionDesc[OpHitObjectRecordHitWithIndexNV].operands.push(OperandId, "'Origin'"); + InstructionDesc[OpHitObjectRecordHitWithIndexNV].operands.push(OperandId, "'TMin'"); + InstructionDesc[OpHitObjectRecordHitWithIndexNV].operands.push(OperandId, "'Direction'"); + InstructionDesc[OpHitObjectRecordHitWithIndexNV].operands.push(OperandId, "'TMax'"); + InstructionDesc[OpHitObjectRecordHitWithIndexNV].operands.push(OperandId, "'HitObject Attribute'"); + InstructionDesc[OpHitObjectRecordHitWithIndexNV].setResultAndType(false, false); + + InstructionDesc[OpHitObjectRecordHitWithIndexMotionNV].operands.push(OperandId, "'HitObject'"); + InstructionDesc[OpHitObjectRecordHitWithIndexMotionNV].operands.push(OperandId, "'Acceleration Structure'"); + InstructionDesc[OpHitObjectRecordHitWithIndexMotionNV].operands.push(OperandId, "'InstanceId'"); + InstructionDesc[OpHitObjectRecordHitWithIndexMotionNV].operands.push(OperandId, "'PrimitiveId'"); + InstructionDesc[OpHitObjectRecordHitWithIndexMotionNV].operands.push(OperandId, "'GeometryIndex'"); + InstructionDesc[OpHitObjectRecordHitWithIndexMotionNV].operands.push(OperandId, "'HitKind'"); + InstructionDesc[OpHitObjectRecordHitWithIndexMotionNV].operands.push(OperandId, "'SBT Record Index'"); + InstructionDesc[OpHitObjectRecordHitWithIndexMotionNV].operands.push(OperandId, "'Origin'"); + InstructionDesc[OpHitObjectRecordHitWithIndexMotionNV].operands.push(OperandId, "'TMin'"); + InstructionDesc[OpHitObjectRecordHitWithIndexMotionNV].operands.push(OperandId, "'Direction'"); + InstructionDesc[OpHitObjectRecordHitWithIndexMotionNV].operands.push(OperandId, "'TMax'"); + InstructionDesc[OpHitObjectRecordHitWithIndexMotionNV].operands.push(OperandId, "'Current Time'"); + InstructionDesc[OpHitObjectRecordHitWithIndexMotionNV].operands.push(OperandId, "'HitObject Attribute'"); + InstructionDesc[OpHitObjectRecordHitWithIndexMotionNV].setResultAndType(false, false); + + InstructionDesc[OpHitObjectRecordMissNV].operands.push(OperandId, "'HitObject'"); + InstructionDesc[OpHitObjectRecordMissNV].operands.push(OperandId, "'SBT Index'"); + InstructionDesc[OpHitObjectRecordMissNV].operands.push(OperandId, "'Origin'"); + InstructionDesc[OpHitObjectRecordMissNV].operands.push(OperandId, "'TMin'"); + InstructionDesc[OpHitObjectRecordMissNV].operands.push(OperandId, "'Direction'"); + InstructionDesc[OpHitObjectRecordMissNV].operands.push(OperandId, "'TMax'"); + InstructionDesc[OpHitObjectRecordMissNV].setResultAndType(false, false); + + InstructionDesc[OpHitObjectRecordMissMotionNV].operands.push(OperandId, "'HitObject'"); + InstructionDesc[OpHitObjectRecordMissMotionNV].operands.push(OperandId, "'SBT Index'"); + InstructionDesc[OpHitObjectRecordMissMotionNV].operands.push(OperandId, "'Origin'"); + InstructionDesc[OpHitObjectRecordMissMotionNV].operands.push(OperandId, "'TMin'"); + InstructionDesc[OpHitObjectRecordMissMotionNV].operands.push(OperandId, "'Direction'"); + InstructionDesc[OpHitObjectRecordMissMotionNV].operands.push(OperandId, "'TMax'"); + InstructionDesc[OpHitObjectRecordMissMotionNV].operands.push(OperandId, "'Current Time'"); + InstructionDesc[OpHitObjectRecordMissMotionNV].setResultAndType(false, false); + + InstructionDesc[OpHitObjectRecordEmptyNV].operands.push(OperandId, "'HitObject'"); + InstructionDesc[OpHitObjectRecordEmptyNV].setResultAndType(false, false); + + InstructionDesc[OpHitObjectTraceRayNV].operands.push(OperandId, "'HitObject'"); + InstructionDesc[OpHitObjectTraceRayNV].operands.push(OperandId, "'Acceleration Structure'"); + InstructionDesc[OpHitObjectTraceRayNV].operands.push(OperandId, "'RayFlags'"); + InstructionDesc[OpHitObjectTraceRayNV].operands.push(OperandId, "'Cullmask'"); + InstructionDesc[OpHitObjectTraceRayNV].operands.push(OperandId, "'SBT Record Offset'"); + InstructionDesc[OpHitObjectTraceRayNV].operands.push(OperandId, "'SBT Record Stride'"); + InstructionDesc[OpHitObjectTraceRayNV].operands.push(OperandId, "'Miss Index'"); + InstructionDesc[OpHitObjectTraceRayNV].operands.push(OperandId, "'Origin'"); + InstructionDesc[OpHitObjectTraceRayNV].operands.push(OperandId, "'TMin'"); + InstructionDesc[OpHitObjectTraceRayNV].operands.push(OperandId, "'Direction'"); + InstructionDesc[OpHitObjectTraceRayNV].operands.push(OperandId, "'TMax'"); + InstructionDesc[OpHitObjectTraceRayNV].operands.push(OperandId, "'Payload'"); + InstructionDesc[OpHitObjectTraceRayNV].setResultAndType(false, false); + + InstructionDesc[OpHitObjectTraceRayMotionNV].operands.push(OperandId, "'HitObject'"); + InstructionDesc[OpHitObjectTraceRayMotionNV].operands.push(OperandId, "'Acceleration Structure'"); + InstructionDesc[OpHitObjectTraceRayMotionNV].operands.push(OperandId, "'RayFlags'"); + InstructionDesc[OpHitObjectTraceRayMotionNV].operands.push(OperandId, "'Cullmask'"); + InstructionDesc[OpHitObjectTraceRayMotionNV].operands.push(OperandId, "'SBT Record Offset'"); + InstructionDesc[OpHitObjectTraceRayMotionNV].operands.push(OperandId, "'SBT Record Stride'"); + InstructionDesc[OpHitObjectTraceRayMotionNV].operands.push(OperandId, "'Miss Index'"); + InstructionDesc[OpHitObjectTraceRayMotionNV].operands.push(OperandId, "'Origin'"); + InstructionDesc[OpHitObjectTraceRayMotionNV].operands.push(OperandId, "'TMin'"); + InstructionDesc[OpHitObjectTraceRayMotionNV].operands.push(OperandId, "'Direction'"); + InstructionDesc[OpHitObjectTraceRayMotionNV].operands.push(OperandId, "'TMax'"); + InstructionDesc[OpHitObjectTraceRayMotionNV].operands.push(OperandId, "'Time'"); + InstructionDesc[OpHitObjectTraceRayMotionNV].operands.push(OperandId, "'Payload'"); + InstructionDesc[OpHitObjectTraceRayMotionNV].setResultAndType(false, false); + + InstructionDesc[OpFetchMicroTriangleVertexBarycentricNV].operands.push(OperandId, "'Acceleration Structure'"); + InstructionDesc[OpFetchMicroTriangleVertexBarycentricNV].operands.push(OperandId, "'Instance ID'"); + InstructionDesc[OpFetchMicroTriangleVertexBarycentricNV].operands.push(OperandId, "'Geometry Index'"); + InstructionDesc[OpFetchMicroTriangleVertexBarycentricNV].operands.push(OperandId, "'Primitive Index'"); + InstructionDesc[OpFetchMicroTriangleVertexBarycentricNV].operands.push(OperandId, "'Barycentrics'"); + InstructionDesc[OpFetchMicroTriangleVertexBarycentricNV].setResultAndType(true, true); + + InstructionDesc[OpFetchMicroTriangleVertexPositionNV].operands.push(OperandId, "'Acceleration Structure'"); + InstructionDesc[OpFetchMicroTriangleVertexPositionNV].operands.push(OperandId, "'Instance ID'"); + InstructionDesc[OpFetchMicroTriangleVertexPositionNV].operands.push(OperandId, "'Geometry Index'"); + InstructionDesc[OpFetchMicroTriangleVertexPositionNV].operands.push(OperandId, "'Primitive Index'"); + InstructionDesc[OpFetchMicroTriangleVertexPositionNV].operands.push(OperandId, "'Barycentrics'"); + InstructionDesc[OpFetchMicroTriangleVertexPositionNV].setResultAndType(true, true); + + InstructionDesc[OpColorAttachmentReadEXT].operands.push(OperandId, "'Attachment'"); + InstructionDesc[OpColorAttachmentReadEXT].operands.push(OperandId, "'Sample'", true); + InstructionDesc[OpStencilAttachmentReadEXT].operands.push(OperandId, "'Sample'", true); + InstructionDesc[OpDepthAttachmentReadEXT].operands.push(OperandId, "'Sample'", true); + + InstructionDesc[OpImageSampleWeightedQCOM].operands.push(OperandId, "'source texture'"); + InstructionDesc[OpImageSampleWeightedQCOM].operands.push(OperandId, "'texture coordinates'"); + InstructionDesc[OpImageSampleWeightedQCOM].operands.push(OperandId, "'weights texture'"); + InstructionDesc[OpImageSampleWeightedQCOM].operands.push(OperandImageOperands, "", true); + InstructionDesc[OpImageSampleWeightedQCOM].setResultAndType(true, true); + + InstructionDesc[OpImageBoxFilterQCOM].operands.push(OperandId, "'source texture'"); + InstructionDesc[OpImageBoxFilterQCOM].operands.push(OperandId, "'texture coordinates'"); + InstructionDesc[OpImageBoxFilterQCOM].operands.push(OperandId, "'box size'"); + InstructionDesc[OpImageBoxFilterQCOM].operands.push(OperandImageOperands, "", true); + InstructionDesc[OpImageBoxFilterQCOM].setResultAndType(true, true); + + InstructionDesc[OpImageBlockMatchSADQCOM].operands.push(OperandId, "'target texture'"); + InstructionDesc[OpImageBlockMatchSADQCOM].operands.push(OperandId, "'target coordinates'"); + InstructionDesc[OpImageBlockMatchSADQCOM].operands.push(OperandId, "'reference texture'"); + InstructionDesc[OpImageBlockMatchSADQCOM].operands.push(OperandId, "'reference coordinates'"); + InstructionDesc[OpImageBlockMatchSADQCOM].operands.push(OperandId, "'block size'"); + InstructionDesc[OpImageBlockMatchSADQCOM].operands.push(OperandImageOperands, "", true); + InstructionDesc[OpImageBlockMatchSADQCOM].setResultAndType(true, true); + + InstructionDesc[OpImageBlockMatchSSDQCOM].operands.push(OperandId, "'target texture'"); + InstructionDesc[OpImageBlockMatchSSDQCOM].operands.push(OperandId, "'target coordinates'"); + InstructionDesc[OpImageBlockMatchSSDQCOM].operands.push(OperandId, "'reference texture'"); + InstructionDesc[OpImageBlockMatchSSDQCOM].operands.push(OperandId, "'reference coordinates'"); + InstructionDesc[OpImageBlockMatchSSDQCOM].operands.push(OperandId, "'block size'"); + InstructionDesc[OpImageBlockMatchSSDQCOM].operands.push(OperandImageOperands, "", true); + InstructionDesc[OpImageBlockMatchSSDQCOM].setResultAndType(true, true); + }); } }; // end spv namespace diff --git a/SPIRV/doc.h b/SPIRV/doc.h index 7e155995..52152991 100755 --- a/SPIRV/doc.h +++ b/SPIRV/doc.h @@ -156,6 +156,7 @@ enum OperandClass { OperandKernelEnqueueFlags, OperandKernelProfilingInfo, OperandCapability, + OperandCooperativeMatrixOperands, OperandOpcode, @@ -197,7 +198,7 @@ public: // Parameterize a set of enumerants that form an enum class EnumDefinition : public EnumParameters { public: - EnumDefinition() : + EnumDefinition() : ceiling(0), bitmask(false), getName(nullptr), enumParams(nullptr), operandParams(nullptr) { } void set(int ceil, const char* (*name)(int), EnumParameters* ep, bool mask = false) { @@ -239,8 +240,8 @@ public: OperandParameters operands; protected: - int typePresent : 1; - int resultPresent : 1; + bool typePresent : 1; + bool resultPresent : 1; }; // The set of objects that hold all the instruction/operand diff --git a/SPIRV/hex_float.h b/SPIRV/hex_float.h index 8be8e9f7..785e8af1 100755 --- a/SPIRV/hex_float.h +++ b/SPIRV/hex_float.h @@ -23,19 +23,6 @@ #include #include -#if defined(_MSC_VER) && _MSC_VER < 1800 -namespace std { -bool isnan(double f) -{ - return ::_isnan(f) != 0; -} -bool isinf(double f) -{ - return ::_finite(f) == 0; -} -} -#endif - #include "bitutils.h" namespace spvutils { diff --git a/SPIRV/spirv.hpp b/SPIRV/spirv.hpp index 73c372b2..5999aba9 100755 --- a/SPIRV/spirv.hpp +++ b/SPIRV/spirv.hpp @@ -26,7 +26,7 @@ // the Binary Section of the SPIR-V specification. // Enumeration tokens for SPIR-V, in various styles: -// C, C++, C++11, JSON, Lua, Python, C#, D +// C, C++, C++11, JSON, Lua, Python, C#, D, Beef // // - C will have tokens with a "Spv" prefix, e.g.: SpvSourceLanguageGLSL // - C++ will have tokens in the "spv" name space, e.g.: spv::SourceLanguageGLSL @@ -36,6 +36,8 @@ // - C# will use enum classes in the Specification class located in the "Spv" namespace, // e.g.: Spv.Specification.SourceLanguage.GLSL // - D will have tokens under the "spv" module, e.g: spv.SourceLanguage.GLSL +// - Beef will use enum classes in the Specification class located in the "Spv" namespace, +// e.g.: Spv.Specification.SourceLanguage.GLSL // // Some tokens act like mask values, which can be OR'd together, // while others are mutually exclusive. The mask-like ones have @@ -66,6 +68,7 @@ enum SourceLanguage { SourceLanguageOpenCL_CPP = 4, SourceLanguageHLSL = 5, SourceLanguageCPP_for_OpenCL = 6, + SourceLanguageSYCL = 7, SourceLanguageMax = 0x7fffffff, }; @@ -153,6 +156,9 @@ enum ExecutionMode { ExecutionModeSubgroupsPerWorkgroupId = 37, ExecutionModeLocalSizeId = 38, ExecutionModeLocalSizeHintId = 39, + ExecutionModeNonCoherentColorAttachmentReadEXT = 4169, + ExecutionModeNonCoherentDepthAttachmentReadEXT = 4170, + ExecutionModeNonCoherentStencilAttachmentReadEXT = 4171, ExecutionModeSubgroupUniformControlFlowKHR = 4421, ExecutionModePostDepthCoverage = 4446, ExecutionModeDenormPreserve = 4459, @@ -192,6 +198,8 @@ enum ExecutionMode { ExecutionModeNoGlobalOffsetINTEL = 5895, ExecutionModeNumSIMDWorkitemsINTEL = 5896, ExecutionModeSchedulerTargetFmaxMhzINTEL = 5903, + ExecutionModeStreamingInterfaceINTEL = 6154, + ExecutionModeNamedBarrierCountINTEL = 6417, ExecutionModeMax = 0x7fffffff, }; @@ -209,6 +217,7 @@ enum StorageClass { StorageClassAtomicCounter = 10, StorageClassImage = 11, StorageClassStorageBuffer = 12, + StorageClassTileImageEXT = 4172, StorageClassCallableDataKHR = 5328, StorageClassCallableDataNV = 5328, StorageClassIncomingCallableDataKHR = 5329, @@ -223,6 +232,7 @@ enum StorageClass { StorageClassShaderRecordBufferNV = 5343, StorageClassPhysicalStorageBuffer = 5349, StorageClassPhysicalStorageBufferEXT = 5349, + StorageClassHitObjectAttributeNV = 5385, StorageClassTaskPayloadWorkgroupEXT = 5402, StorageClassCodeSectionINTEL = 5605, StorageClassDeviceOnlyINTEL = 5936, @@ -238,6 +248,7 @@ enum Dim { DimRect = 4, DimBuffer = 5, DimSubpassData = 6, + DimTileImageDataEXT = 4173, DimMax = 0x7fffffff, }; @@ -448,6 +459,7 @@ enum FunctionParameterAttribute { FunctionParameterAttributeNoCapture = 5, FunctionParameterAttributeNoWrite = 6, FunctionParameterAttributeNoReadWrite = 7, + FunctionParameterAttributeRuntimeAlignedINTEL = 5940, FunctionParameterAttributeMax = 0x7fffffff, }; @@ -501,6 +513,8 @@ enum Decoration { DecorationMaxByteOffsetId = 47, DecorationNoSignedWrap = 4469, DecorationNoUnsignedWrap = 4470, + DecorationWeightTextureQCOM = 4487, + DecorationBlockMatchTextureQCOM = 4488, DecorationExplicitInterpAMD = 4999, DecorationOverrideCoverageNV = 5248, DecorationPassthroughNV = 5250, @@ -518,6 +532,7 @@ enum Decoration { DecorationRestrictPointerEXT = 5355, DecorationAliasedPointer = 5356, DecorationAliasedPointerEXT = 5356, + DecorationHitObjectShaderRecordBufferNV = 5386, DecorationBindlessSamplerNV = 5398, DecorationBindlessImageNV = 5399, DecorationBoundSamplerNV = 5400, @@ -556,12 +571,27 @@ enum Decoration { DecorationPrefetchINTEL = 5902, DecorationStallEnableINTEL = 5905, DecorationFuseLoopsInFunctionINTEL = 5907, + DecorationMathOpDSPModeINTEL = 5909, + DecorationAliasScopeINTEL = 5914, + DecorationNoAliasINTEL = 5915, + DecorationInitiationIntervalINTEL = 5917, + DecorationMaxConcurrencyINTEL = 5918, + DecorationPipelineEnableINTEL = 5919, DecorationBufferLocationINTEL = 5921, DecorationIOPipeStorageINTEL = 5944, DecorationFunctionFloatingPointModeINTEL = 6080, DecorationSingleElementVectorINTEL = 6085, DecorationVectorComputeCallableFunctionINTEL = 6087, DecorationMediaBlockIOINTEL = 6140, + DecorationConduitKernelArgumentINTEL = 6175, + DecorationRegisterMapKernelArgumentINTEL = 6176, + DecorationMMHostInterfaceAddressWidthINTEL = 6177, + DecorationMMHostInterfaceDataWidthINTEL = 6178, + DecorationMMHostInterfaceLatencyINTEL = 6179, + DecorationMMHostInterfaceReadWriteModeINTEL = 6180, + DecorationMMHostInterfaceMaxBurstINTEL = 6181, + DecorationMMHostInterfaceWaitRequestINTEL = 6182, + DecorationStableKernelArgumentINTEL = 6183, DecorationMax = 0x7fffffff, }; @@ -607,8 +637,8 @@ enum BuiltIn { BuiltInSubgroupLocalInvocationId = 41, BuiltInVertexIndex = 42, BuiltInInstanceIndex = 43, - BuiltInCoreCountARM = 4161, BuiltInCoreIDARM = 4160, + BuiltInCoreCountARM = 4161, BuiltInCoreMaxIDARM = 4162, BuiltInWarpIDARM = 4163, BuiltInWarpMaxIDARM = 4164, @@ -689,6 +719,11 @@ enum BuiltIn { BuiltInHitKindKHR = 5333, BuiltInHitKindNV = 5333, BuiltInCurrentRayTimeNV = 5334, + BuiltInHitTriangleVertexPositionsKHR = 5335, + BuiltInHitMicroTriangleVertexPositionsNV = 5337, + BuiltInHitMicroTriangleVertexBarycentricsNV = 5344, + BuiltInHitKindFrontFacingMicroTriangleNV = 5405, + BuiltInHitKindBackFacingMicroTriangleNV = 5406, BuiltInIncomingRayFlagsKHR = 5351, BuiltInIncomingRayFlagsNV = 5351, BuiltInRayGeometryIndexKHR = 5352, @@ -730,6 +765,8 @@ enum LoopControlShift { LoopControlMaxInterleavingINTELShift = 21, LoopControlSpeculatedIterationsINTELShift = 22, LoopControlNoFusionINTELShift = 23, + LoopControlLoopCountINTELShift = 24, + LoopControlMaxReinvocationDelayINTELShift = 25, LoopControlMax = 0x7fffffff, }; @@ -752,6 +789,8 @@ enum LoopControlMask { LoopControlMaxInterleavingINTELMask = 0x00200000, LoopControlSpeculatedIterationsINTELMask = 0x00400000, LoopControlNoFusionINTELMask = 0x00800000, + LoopControlLoopCountINTELMask = 0x01000000, + LoopControlMaxReinvocationDelayINTELMask = 0x02000000, }; enum FunctionControlShift { @@ -824,6 +863,8 @@ enum MemoryAccessShift { MemoryAccessMakePointerVisibleKHRShift = 4, MemoryAccessNonPrivatePointerShift = 5, MemoryAccessNonPrivatePointerKHRShift = 5, + MemoryAccessAliasScopeINTELMaskShift = 16, + MemoryAccessNoAliasINTELMaskShift = 17, MemoryAccessMax = 0x7fffffff, }; @@ -838,6 +879,8 @@ enum MemoryAccessMask { MemoryAccessMakePointerVisibleKHRMask = 0x00000010, MemoryAccessNonPrivatePointerMask = 0x00000020, MemoryAccessNonPrivatePointerKHRMask = 0x00000020, + MemoryAccessAliasScopeINTELMaskMask = 0x00010000, + MemoryAccessNoAliasINTELMaskMask = 0x00020000, }; enum Scope { @@ -952,6 +995,9 @@ enum Capability { CapabilityShaderViewportIndex = 70, CapabilityUniformDecoration = 71, CapabilityCoreBuiltinsARM = 4165, + CapabilityTileImageColorReadAccessEXT = 4166, + CapabilityTileImageDepthReadAccessEXT = 4167, + CapabilityTileImageStencilReadAccessEXT = 4168, CapabilityFragmentShadingRateKHR = 4422, CapabilitySubgroupBallotKHR = 4423, CapabilityDrawParameters = 4427, @@ -983,6 +1029,9 @@ enum Capability { CapabilityRayQueryKHR = 4472, CapabilityRayTraversalPrimitiveCullingKHR = 4478, CapabilityRayTracingKHR = 4479, + CapabilityTextureSampleWeightedQCOM = 4484, + CapabilityTextureBoxFilterQCOM = 4485, + CapabilityTextureBlockMatchQCOM = 4486, CapabilityFloat16ImageAMD = 5008, CapabilityImageGatherBiasLodAMD = 5009, CapabilityFragmentMaskAMD = 5010, @@ -1001,7 +1050,7 @@ enum Capability { CapabilityMeshShadingNV = 5266, CapabilityImageFootprintNV = 5282, CapabilityMeshShadingEXT = 5283, - CapabilityFragmentBarycentricKHR = 5284, + CapabilityFragmentBarycentricKHR = 5284, CapabilityFragmentBarycentricNV = 5284, CapabilityComputeDerivativeGroupQuadsNV = 5288, CapabilityFragmentDensityEXT = 5291, @@ -1031,6 +1080,7 @@ enum Capability { CapabilityUniformTexelBufferArrayNonUniformIndexingEXT = 5311, CapabilityStorageTexelBufferArrayNonUniformIndexing = 5312, CapabilityStorageTexelBufferArrayNonUniformIndexingEXT = 5312, + CapabilityRayTracingPositionFetchKHR = 5336, CapabilityRayTracingNV = 5340, CapabilityRayTracingMotionBlurNV = 5341, CapabilityVulkanMemoryModel = 5345, @@ -1048,7 +1098,12 @@ enum Capability { CapabilityFragmentShaderPixelInterlockEXT = 5378, CapabilityDemoteToHelperInvocation = 5379, CapabilityDemoteToHelperInvocationEXT = 5379, + CapabilityDisplacementMicromapNV = 5380, + CapabilityRayTracingDisplacementMicromapNV = 5409, + CapabilityRayTracingOpacityMicromapEXT = 5381, + CapabilityShaderInvocationReorderNV = 5383, CapabilityBindlessTextureNV = 5390, + CapabilityRayQueryPositionFetchKHR = 5391, CapabilitySubgroupShuffleINTEL = 5568, CapabilitySubgroupBufferBlockIOINTEL = 5569, CapabilitySubgroupImageBlockIOINTEL = 5570, @@ -1081,9 +1136,13 @@ enum Capability { CapabilityFPGAMemoryAccessesINTEL = 5898, CapabilityFPGAClusterAttributesINTEL = 5904, CapabilityLoopFuseINTEL = 5906, + CapabilityFPGADSPControlINTEL = 5908, + CapabilityMemoryAccessAliasingINTEL = 5910, + CapabilityFPGAInvocationPipeliningAttributesINTEL = 5916, CapabilityFPGABufferLocationINTEL = 5920, CapabilityArbitraryPrecisionFixedPointINTEL = 5922, CapabilityUSMStorageClassesINTEL = 5935, + CapabilityRuntimeAlignedAttributeINTEL = 5939, CapabilityIOPipesINTEL = 5943, CapabilityBlockingPipesINTEL = 5945, CapabilityFPGARegINTEL = 5948, @@ -1096,13 +1155,18 @@ enum Capability { CapabilityDotProduct = 6019, CapabilityDotProductKHR = 6019, CapabilityRayCullMaskKHR = 6020, + CapabilityCooperativeMatrixKHR = 6022, CapabilityBitInstructions = 6025, + CapabilityGroupNonUniformRotateKHR = 6026, CapabilityAtomicFloat32AddEXT = 6033, CapabilityAtomicFloat64AddEXT = 6034, CapabilityLongConstantCompositeINTEL = 6089, CapabilityOptNoneINTEL = 6094, CapabilityAtomicFloat16AddEXT = 6095, CapabilityDebugInfoModuleINTEL = 6114, + CapabilitySplitBarrierINTEL = 6141, + CapabilityFPGAArgumentInterfacesINTEL = 6174, + CapabilityGroupUniformArithmeticKHR = 6400, CapabilityMax = 0x7fffffff, }; @@ -1117,6 +1181,7 @@ enum RayFlagsShift { RayFlagsCullNoOpaqueKHRShift = 7, RayFlagsSkipTrianglesKHRShift = 8, RayFlagsSkipAABBsKHRShift = 9, + RayFlagsForceOpacityMicromap2StateEXTShift = 10, RayFlagsMax = 0x7fffffff, }; @@ -1132,6 +1197,7 @@ enum RayFlagsMask { RayFlagsCullNoOpaqueKHRMask = 0x00000080, RayFlagsSkipTrianglesKHRMask = 0x00000100, RayFlagsSkipAABBsKHRMask = 0x00000200, + RayFlagsForceOpacityMicromap2StateEXTMask = 0x00000400, }; enum RayQueryIntersection { @@ -1207,6 +1273,37 @@ enum PackedVectorFormat { PackedVectorFormatMax = 0x7fffffff, }; +enum CooperativeMatrixOperandsShift { + CooperativeMatrixOperandsMatrixASignedComponentsKHRShift = 0, + CooperativeMatrixOperandsMatrixBSignedComponentsKHRShift = 1, + CooperativeMatrixOperandsMatrixCSignedComponentsKHRShift = 2, + CooperativeMatrixOperandsMatrixResultSignedComponentsKHRShift = 3, + CooperativeMatrixOperandsSaturatingAccumulationKHRShift = 4, + CooperativeMatrixOperandsMax = 0x7fffffff, +}; + +enum CooperativeMatrixOperandsMask { + CooperativeMatrixOperandsMaskNone = 0, + CooperativeMatrixOperandsMatrixASignedComponentsKHRMask = 0x00000001, + CooperativeMatrixOperandsMatrixBSignedComponentsKHRMask = 0x00000002, + CooperativeMatrixOperandsMatrixCSignedComponentsKHRMask = 0x00000004, + CooperativeMatrixOperandsMatrixResultSignedComponentsKHRMask = 0x00000008, + CooperativeMatrixOperandsSaturatingAccumulationKHRMask = 0x00000010, +}; + +enum CooperativeMatrixLayout { + CooperativeMatrixLayoutRowMajorKHR = 0, + CooperativeMatrixLayoutColumnMajorKHR = 1, + CooperativeMatrixLayoutMax = 0x7fffffff, +}; + +enum CooperativeMatrixUse { + CooperativeMatrixUseMatrixAKHR = 0, + CooperativeMatrixUseMatrixBKHR = 1, + CooperativeMatrixUseMatrixAccumulatorKHR = 2, + CooperativeMatrixUseMax = 0x7fffffff, +}; + enum Op { OpNop = 0, OpUndef = 1, @@ -1552,12 +1649,16 @@ enum Op { OpPtrEqual = 401, OpPtrNotEqual = 402, OpPtrDiff = 403, + OpColorAttachmentReadEXT = 4160, + OpDepthAttachmentReadEXT = 4161, + OpStencilAttachmentReadEXT = 4162, OpTerminateInvocation = 4416, OpSubgroupBallotKHR = 4421, OpSubgroupFirstInvocationKHR = 4422, OpSubgroupAllKHR = 4428, OpSubgroupAnyKHR = 4429, OpSubgroupAllEqualKHR = 4430, + OpGroupNonUniformRotateKHR = 4431, OpSubgroupReadInvocationKHR = 4432, OpTraceRayKHR = 4445, OpExecuteCallableKHR = 4446, @@ -1576,6 +1677,11 @@ enum Op { OpUDotAccSatKHR = 4454, OpSUDotAccSat = 4455, OpSUDotAccSatKHR = 4455, + OpTypeCooperativeMatrixKHR = 4456, + OpCooperativeMatrixLoadKHR = 4457, + OpCooperativeMatrixStoreKHR = 4458, + OpCooperativeMatrixMulAddKHR = 4459, + OpCooperativeMatrixLengthKHR = 4460, OpTypeRayQueryKHR = 4472, OpRayQueryInitializeKHR = 4473, OpRayQueryTerminateKHR = 4474, @@ -1583,6 +1689,10 @@ enum Op { OpRayQueryConfirmIntersectionKHR = 4476, OpRayQueryProceedKHR = 4477, OpRayQueryGetIntersectionTypeKHR = 4479, + OpImageSampleWeightedQCOM = 4480, + OpImageBoxFilterQCOM = 4481, + OpImageBlockMatchSSDQCOM = 4482, + OpImageBlockMatchSADQCOM = 4483, OpGroupIAddNonUniformAMD = 5000, OpGroupFAddNonUniformAMD = 5001, OpGroupFMinNonUniformAMD = 5002, @@ -1594,11 +1704,46 @@ enum Op { OpFragmentMaskFetchAMD = 5011, OpFragmentFetchAMD = 5012, OpReadClockKHR = 5056, + OpHitObjectRecordHitMotionNV = 5249, + OpHitObjectRecordHitWithIndexMotionNV = 5250, + OpHitObjectRecordMissMotionNV = 5251, + OpHitObjectGetWorldToObjectNV = 5252, + OpHitObjectGetObjectToWorldNV = 5253, + OpHitObjectGetObjectRayDirectionNV = 5254, + OpHitObjectGetObjectRayOriginNV = 5255, + OpHitObjectTraceRayMotionNV = 5256, + OpHitObjectGetShaderRecordBufferHandleNV = 5257, + OpHitObjectGetShaderBindingTableRecordIndexNV = 5258, + OpHitObjectRecordEmptyNV = 5259, + OpHitObjectTraceRayNV = 5260, + OpHitObjectRecordHitNV = 5261, + OpHitObjectRecordHitWithIndexNV = 5262, + OpHitObjectRecordMissNV = 5263, + OpHitObjectExecuteShaderNV = 5264, + OpHitObjectGetCurrentTimeNV = 5265, + OpHitObjectGetAttributesNV = 5266, + OpHitObjectGetHitKindNV = 5267, + OpHitObjectGetPrimitiveIndexNV = 5268, + OpHitObjectGetGeometryIndexNV = 5269, + OpHitObjectGetInstanceIdNV = 5270, + OpHitObjectGetInstanceCustomIndexNV = 5271, + OpHitObjectGetWorldRayDirectionNV = 5272, + OpHitObjectGetWorldRayOriginNV = 5273, + OpHitObjectGetRayTMaxNV = 5274, + OpHitObjectGetRayTMinNV = 5275, + OpHitObjectIsEmptyNV = 5276, + OpHitObjectIsHitNV = 5277, + OpHitObjectIsMissNV = 5278, + OpReorderThreadWithHitObjectNV = 5279, + OpReorderThreadWithHintNV = 5280, + OpTypeHitObjectNV = 5281, OpImageSampleFootprintNV = 5283, OpEmitMeshTasksEXT = 5294, OpSetMeshOutputsEXT = 5295, OpGroupNonUniformPartitionNV = 5296, OpWritePackedPrimitiveIndices4x8NV = 5299, + OpFetchMicroTriangleVertexPositionNV = 5300, + OpFetchMicroTriangleVertexBarycentricNV = 5301, OpReportIntersectionKHR = 5334, OpReportIntersectionNV = 5334, OpIgnoreIntersectionNV = 5335, @@ -1606,6 +1751,7 @@ enum Op { OpTraceNV = 5337, OpTraceMotionNV = 5338, OpTraceRayMotionNV = 5339, + OpRayQueryGetIntersectionTriangleVertexPositionsKHR = 5340, OpTypeAccelerationStructureKHR = 5341, OpTypeAccelerationStructureNV = 5341, OpExecuteCallableNV = 5344, @@ -1826,6 +1972,9 @@ enum Op { OpArbitraryFloatPowRINTEL = 5881, OpArbitraryFloatPowNINTEL = 5882, OpLoopControlINTEL = 5887, + OpAliasDomainDeclINTEL = 5911, + OpAliasScopeDeclINTEL = 5912, + OpAliasScopeListDeclINTEL = 5913, OpFixedSqrtINTEL = 5923, OpFixedRecipINTEL = 5924, OpFixedRsqrtINTEL = 5925, @@ -1864,10 +2013,23 @@ enum Op { OpTypeStructContinuedINTEL = 6090, OpConstantCompositeContinuedINTEL = 6091, OpSpecConstantCompositeContinuedINTEL = 6092, + OpControlBarrierArriveINTEL = 6142, + OpControlBarrierWaitINTEL = 6143, + OpGroupIMulKHR = 6401, + OpGroupFMulKHR = 6402, + OpGroupBitwiseAndKHR = 6403, + OpGroupBitwiseOrKHR = 6404, + OpGroupBitwiseXorKHR = 6405, + OpGroupLogicalAndKHR = 6406, + OpGroupLogicalOrKHR = 6407, + OpGroupLogicalXorKHR = 6408, OpMax = 0x7fffffff, }; #ifdef SPV_ENABLE_UTILITY_CODE +#ifndef __cplusplus +#include +#endif inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) { *hasResult = *hasResultType = false; switch (opcode) { @@ -2216,12 +2378,16 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) { case OpPtrEqual: *hasResult = true; *hasResultType = true; break; case OpPtrNotEqual: *hasResult = true; *hasResultType = true; break; case OpPtrDiff: *hasResult = true; *hasResultType = true; break; + case OpColorAttachmentReadEXT: *hasResult = true; *hasResultType = true; break; + case OpDepthAttachmentReadEXT: *hasResult = true; *hasResultType = true; break; + case OpStencilAttachmentReadEXT: *hasResult = true; *hasResultType = true; break; case OpTerminateInvocation: *hasResult = false; *hasResultType = false; break; case OpSubgroupBallotKHR: *hasResult = true; *hasResultType = true; break; case OpSubgroupFirstInvocationKHR: *hasResult = true; *hasResultType = true; break; case OpSubgroupAllKHR: *hasResult = true; *hasResultType = true; break; case OpSubgroupAnyKHR: *hasResult = true; *hasResultType = true; break; case OpSubgroupAllEqualKHR: *hasResult = true; *hasResultType = true; break; + case OpGroupNonUniformRotateKHR: *hasResult = true; *hasResultType = true; break; case OpSubgroupReadInvocationKHR: *hasResult = true; *hasResultType = true; break; case OpTraceRayKHR: *hasResult = false; *hasResultType = false; break; case OpExecuteCallableKHR: *hasResult = false; *hasResultType = false; break; @@ -2234,6 +2400,11 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) { case OpSDotAccSat: *hasResult = true; *hasResultType = true; break; case OpUDotAccSat: *hasResult = true; *hasResultType = true; break; case OpSUDotAccSat: *hasResult = true; *hasResultType = true; break; + case OpTypeCooperativeMatrixKHR: *hasResult = true; *hasResultType = false; break; + case OpCooperativeMatrixLoadKHR: *hasResult = true; *hasResultType = true; break; + case OpCooperativeMatrixStoreKHR: *hasResult = false; *hasResultType = false; break; + case OpCooperativeMatrixMulAddKHR: *hasResult = true; *hasResultType = true; break; + case OpCooperativeMatrixLengthKHR: *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; @@ -2241,6 +2412,10 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) { case OpRayQueryConfirmIntersectionKHR: *hasResult = false; *hasResultType = false; break; case OpRayQueryProceedKHR: *hasResult = true; *hasResultType = true; break; case OpRayQueryGetIntersectionTypeKHR: *hasResult = true; *hasResultType = true; break; + case OpImageSampleWeightedQCOM: *hasResult = true; *hasResultType = true; break; + case OpImageBoxFilterQCOM: *hasResult = true; *hasResultType = true; break; + case OpImageBlockMatchSSDQCOM: *hasResult = true; *hasResultType = true; break; + case OpImageBlockMatchSADQCOM: *hasResult = true; *hasResultType = true; break; case OpGroupIAddNonUniformAMD: *hasResult = true; *hasResultType = true; break; case OpGroupFAddNonUniformAMD: *hasResult = true; *hasResultType = true; break; case OpGroupFMinNonUniformAMD: *hasResult = true; *hasResultType = true; break; @@ -2252,10 +2427,43 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) { case OpFragmentMaskFetchAMD: *hasResult = true; *hasResultType = true; break; case OpFragmentFetchAMD: *hasResult = true; *hasResultType = true; break; case OpReadClockKHR: *hasResult = true; *hasResultType = true; break; + case OpHitObjectRecordHitMotionNV: *hasResult = false; *hasResultType = false; break; + case OpHitObjectRecordHitWithIndexMotionNV: *hasResult = false; *hasResultType = false; break; + case OpHitObjectRecordMissMotionNV: *hasResult = false; *hasResultType = false; break; + case OpHitObjectGetWorldToObjectNV: *hasResult = true; *hasResultType = true; break; + case OpHitObjectGetObjectToWorldNV: *hasResult = true; *hasResultType = true; break; + case OpHitObjectGetObjectRayDirectionNV: *hasResult = true; *hasResultType = true; break; + case OpHitObjectGetObjectRayOriginNV: *hasResult = true; *hasResultType = true; break; + case OpHitObjectTraceRayMotionNV: *hasResult = false; *hasResultType = false; break; + case OpHitObjectGetShaderRecordBufferHandleNV: *hasResult = true; *hasResultType = true; break; + case OpHitObjectGetShaderBindingTableRecordIndexNV: *hasResult = true; *hasResultType = true; break; + case OpHitObjectRecordEmptyNV: *hasResult = false; *hasResultType = false; break; + case OpHitObjectTraceRayNV: *hasResult = false; *hasResultType = false; break; + case OpHitObjectRecordHitNV: *hasResult = false; *hasResultType = false; break; + case OpHitObjectRecordHitWithIndexNV: *hasResult = false; *hasResultType = false; break; + case OpHitObjectRecordMissNV: *hasResult = false; *hasResultType = false; break; + case OpHitObjectExecuteShaderNV: *hasResult = false; *hasResultType = false; break; + case OpHitObjectGetCurrentTimeNV: *hasResult = true; *hasResultType = true; break; + case OpHitObjectGetAttributesNV: *hasResult = false; *hasResultType = false; break; + case OpHitObjectGetHitKindNV: *hasResult = true; *hasResultType = true; break; + case OpHitObjectGetPrimitiveIndexNV: *hasResult = true; *hasResultType = true; break; + case OpHitObjectGetGeometryIndexNV: *hasResult = true; *hasResultType = true; break; + case OpHitObjectGetInstanceIdNV: *hasResult = true; *hasResultType = true; break; + case OpHitObjectGetInstanceCustomIndexNV: *hasResult = true; *hasResultType = true; break; + case OpHitObjectGetWorldRayDirectionNV: *hasResult = true; *hasResultType = true; break; + case OpHitObjectGetWorldRayOriginNV: *hasResult = true; *hasResultType = true; break; + case OpHitObjectGetRayTMaxNV: *hasResult = true; *hasResultType = true; break; + case OpHitObjectGetRayTMinNV: *hasResult = true; *hasResultType = true; break; + case OpHitObjectIsEmptyNV: *hasResult = true; *hasResultType = true; break; + case OpHitObjectIsHitNV: *hasResult = true; *hasResultType = true; break; + case OpHitObjectIsMissNV: *hasResult = true; *hasResultType = true; break; + case OpReorderThreadWithHitObjectNV: *hasResult = false; *hasResultType = false; break; + case OpReorderThreadWithHintNV: *hasResult = false; *hasResultType = false; break; + case OpTypeHitObjectNV: *hasResult = true; *hasResultType = false; break; case OpImageSampleFootprintNV: *hasResult = true; *hasResultType = true; break; - case OpGroupNonUniformPartitionNV: *hasResult = true; *hasResultType = true; break; case OpEmitMeshTasksEXT: *hasResult = false; *hasResultType = false; break; case OpSetMeshOutputsEXT: *hasResult = false; *hasResultType = false; break; + case OpGroupNonUniformPartitionNV: *hasResult = true; *hasResultType = true; break; case OpWritePackedPrimitiveIndices4x8NV: *hasResult = false; *hasResultType = false; break; case OpReportIntersectionNV: *hasResult = true; *hasResultType = true; break; case OpIgnoreIntersectionNV: *hasResult = false; *hasResultType = false; break; @@ -2263,6 +2471,7 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) { case OpTraceNV: *hasResult = false; *hasResultType = false; break; case OpTraceMotionNV: *hasResult = false; *hasResultType = false; break; case OpTraceRayMotionNV: *hasResult = false; *hasResultType = false; break; + case OpRayQueryGetIntersectionTriangleVertexPositionsKHR: *hasResult = true; *hasResultType = true; break; case OpTypeAccelerationStructureNV: *hasResult = true; *hasResultType = false; break; case OpExecuteCallableNV: *hasResult = false; *hasResultType = false; break; case OpTypeCooperativeMatrixNV: *hasResult = true; *hasResultType = false; break; @@ -2479,6 +2688,9 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) { case OpArbitraryFloatPowRINTEL: *hasResult = true; *hasResultType = true; break; case OpArbitraryFloatPowNINTEL: *hasResult = true; *hasResultType = true; break; case OpLoopControlINTEL: *hasResult = false; *hasResultType = false; break; + case OpAliasDomainDeclINTEL: *hasResult = true; *hasResultType = false; break; + case OpAliasScopeDeclINTEL: *hasResult = true; *hasResultType = false; break; + case OpAliasScopeListDeclINTEL: *hasResult = true; *hasResultType = false; break; case OpFixedSqrtINTEL: *hasResult = true; *hasResultType = true; break; case OpFixedRecipINTEL: *hasResult = true; *hasResultType = true; break; case OpFixedRsqrtINTEL: *hasResult = true; *hasResultType = true; break; @@ -2517,23 +2729,68 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) { case OpTypeStructContinuedINTEL: *hasResult = false; *hasResultType = false; break; case OpConstantCompositeContinuedINTEL: *hasResult = false; *hasResultType = false; break; case OpSpecConstantCompositeContinuedINTEL: *hasResult = false; *hasResultType = false; break; + case OpControlBarrierArriveINTEL: *hasResult = false; *hasResultType = false; break; + case OpControlBarrierWaitINTEL: *hasResult = false; *hasResultType = false; break; + case OpGroupIMulKHR: *hasResult = true; *hasResultType = true; break; + case OpGroupFMulKHR: *hasResult = true; *hasResultType = true; break; + case OpGroupBitwiseAndKHR: *hasResult = true; *hasResultType = true; break; + case OpGroupBitwiseOrKHR: *hasResult = true; *hasResultType = true; break; + case OpGroupBitwiseXorKHR: *hasResult = true; *hasResultType = true; break; + case OpGroupLogicalAndKHR: *hasResult = true; *hasResultType = true; break; + case OpGroupLogicalOrKHR: *hasResult = true; *hasResultType = true; break; + case OpGroupLogicalXorKHR: *hasResult = true; *hasResultType = true; break; } } #endif /* SPV_ENABLE_UTILITY_CODE */ -// Overload operator| for mask bit combining +// Overload bitwise operators for mask bit combining inline ImageOperandsMask operator|(ImageOperandsMask a, ImageOperandsMask b) { return ImageOperandsMask(unsigned(a) | unsigned(b)); } +inline ImageOperandsMask operator&(ImageOperandsMask a, ImageOperandsMask b) { return ImageOperandsMask(unsigned(a) & unsigned(b)); } +inline ImageOperandsMask operator^(ImageOperandsMask a, ImageOperandsMask b) { return ImageOperandsMask(unsigned(a) ^ unsigned(b)); } +inline ImageOperandsMask operator~(ImageOperandsMask a) { return ImageOperandsMask(~unsigned(a)); } inline FPFastMathModeMask operator|(FPFastMathModeMask a, FPFastMathModeMask b) { return FPFastMathModeMask(unsigned(a) | unsigned(b)); } +inline FPFastMathModeMask operator&(FPFastMathModeMask a, FPFastMathModeMask b) { return FPFastMathModeMask(unsigned(a) & unsigned(b)); } +inline FPFastMathModeMask operator^(FPFastMathModeMask a, FPFastMathModeMask b) { return FPFastMathModeMask(unsigned(a) ^ unsigned(b)); } +inline FPFastMathModeMask operator~(FPFastMathModeMask a) { return FPFastMathModeMask(~unsigned(a)); } inline SelectionControlMask operator|(SelectionControlMask a, SelectionControlMask b) { return SelectionControlMask(unsigned(a) | unsigned(b)); } +inline SelectionControlMask operator&(SelectionControlMask a, SelectionControlMask b) { return SelectionControlMask(unsigned(a) & unsigned(b)); } +inline SelectionControlMask operator^(SelectionControlMask a, SelectionControlMask b) { return SelectionControlMask(unsigned(a) ^ unsigned(b)); } +inline SelectionControlMask operator~(SelectionControlMask a) { return SelectionControlMask(~unsigned(a)); } inline LoopControlMask operator|(LoopControlMask a, LoopControlMask b) { return LoopControlMask(unsigned(a) | unsigned(b)); } +inline LoopControlMask operator&(LoopControlMask a, LoopControlMask b) { return LoopControlMask(unsigned(a) & unsigned(b)); } +inline LoopControlMask operator^(LoopControlMask a, LoopControlMask b) { return LoopControlMask(unsigned(a) ^ unsigned(b)); } +inline LoopControlMask operator~(LoopControlMask a) { return LoopControlMask(~unsigned(a)); } inline FunctionControlMask operator|(FunctionControlMask a, FunctionControlMask b) { return FunctionControlMask(unsigned(a) | unsigned(b)); } +inline FunctionControlMask operator&(FunctionControlMask a, FunctionControlMask b) { return FunctionControlMask(unsigned(a) & unsigned(b)); } +inline FunctionControlMask operator^(FunctionControlMask a, FunctionControlMask b) { return FunctionControlMask(unsigned(a) ^ unsigned(b)); } +inline FunctionControlMask operator~(FunctionControlMask a) { return FunctionControlMask(~unsigned(a)); } inline MemorySemanticsMask operator|(MemorySemanticsMask a, MemorySemanticsMask b) { return MemorySemanticsMask(unsigned(a) | unsigned(b)); } +inline MemorySemanticsMask operator&(MemorySemanticsMask a, MemorySemanticsMask b) { return MemorySemanticsMask(unsigned(a) & unsigned(b)); } +inline MemorySemanticsMask operator^(MemorySemanticsMask a, MemorySemanticsMask b) { return MemorySemanticsMask(unsigned(a) ^ unsigned(b)); } +inline MemorySemanticsMask operator~(MemorySemanticsMask a) { return MemorySemanticsMask(~unsigned(a)); } inline MemoryAccessMask operator|(MemoryAccessMask a, MemoryAccessMask b) { return MemoryAccessMask(unsigned(a) | unsigned(b)); } +inline MemoryAccessMask operator&(MemoryAccessMask a, MemoryAccessMask b) { return MemoryAccessMask(unsigned(a) & unsigned(b)); } +inline MemoryAccessMask operator^(MemoryAccessMask a, MemoryAccessMask b) { return MemoryAccessMask(unsigned(a) ^ unsigned(b)); } +inline MemoryAccessMask operator~(MemoryAccessMask a) { return MemoryAccessMask(~unsigned(a)); } inline KernelProfilingInfoMask operator|(KernelProfilingInfoMask a, KernelProfilingInfoMask b) { return KernelProfilingInfoMask(unsigned(a) | unsigned(b)); } +inline KernelProfilingInfoMask operator&(KernelProfilingInfoMask a, KernelProfilingInfoMask b) { return KernelProfilingInfoMask(unsigned(a) & unsigned(b)); } +inline KernelProfilingInfoMask operator^(KernelProfilingInfoMask a, KernelProfilingInfoMask b) { return KernelProfilingInfoMask(unsigned(a) ^ unsigned(b)); } +inline KernelProfilingInfoMask operator~(KernelProfilingInfoMask a) { return KernelProfilingInfoMask(~unsigned(a)); } inline RayFlagsMask operator|(RayFlagsMask a, RayFlagsMask b) { return RayFlagsMask(unsigned(a) | unsigned(b)); } +inline RayFlagsMask operator&(RayFlagsMask a, RayFlagsMask b) { return RayFlagsMask(unsigned(a) & unsigned(b)); } +inline RayFlagsMask operator^(RayFlagsMask a, RayFlagsMask b) { return RayFlagsMask(unsigned(a) ^ unsigned(b)); } +inline RayFlagsMask operator~(RayFlagsMask a) { return RayFlagsMask(~unsigned(a)); } inline FragmentShadingRateMask operator|(FragmentShadingRateMask a, FragmentShadingRateMask b) { return FragmentShadingRateMask(unsigned(a) | unsigned(b)); } +inline FragmentShadingRateMask operator&(FragmentShadingRateMask a, FragmentShadingRateMask b) { return FragmentShadingRateMask(unsigned(a) & unsigned(b)); } +inline FragmentShadingRateMask operator^(FragmentShadingRateMask a, FragmentShadingRateMask b) { return FragmentShadingRateMask(unsigned(a) ^ unsigned(b)); } +inline FragmentShadingRateMask operator~(FragmentShadingRateMask a) { return FragmentShadingRateMask(~unsigned(a)); } +inline CooperativeMatrixOperandsMask operator|(CooperativeMatrixOperandsMask a, CooperativeMatrixOperandsMask b) { return CooperativeMatrixOperandsMask(unsigned(a) | unsigned(b)); } +inline CooperativeMatrixOperandsMask operator&(CooperativeMatrixOperandsMask a, CooperativeMatrixOperandsMask b) { return CooperativeMatrixOperandsMask(unsigned(a) & unsigned(b)); } +inline CooperativeMatrixOperandsMask operator^(CooperativeMatrixOperandsMask a, CooperativeMatrixOperandsMask b) { return CooperativeMatrixOperandsMask(unsigned(a) ^ unsigned(b)); } +inline CooperativeMatrixOperandsMask operator~(CooperativeMatrixOperandsMask a) { return CooperativeMatrixOperandsMask(~unsigned(a)); } } // end namespace spv #endif // #ifndef spirv_HPP + diff --git a/SPIRV/spvIR.h b/SPIRV/spvIR.h index 09691273..8849f42e 100755 --- a/SPIRV/spvIR.h +++ b/SPIRV/spvIR.h @@ -97,6 +97,8 @@ public: explicit Instruction(Op opCode) : resultId(NoResult), typeId(NoType), opCode(opCode), block(nullptr) { } virtual ~Instruction() {} void addIdOperand(Id id) { + // ids can't be 0 + assert(id); operands.push_back(id); idOperand.push_back(true); } @@ -321,7 +323,7 @@ void inReadableOrder(Block* root, std::function inst); Id getReturnType() const { return functionInstruction.getTypeId(); } Id getFuncId() const { return functionInstruction.getResultId(); } + Id getFuncTypeId() const { return functionInstruction.getIdOperand(1); } void setReturnPrecision(Decoration precision) { if (precision == DecorationRelaxedPrecision) @@ -386,7 +389,7 @@ public: if (lineInstruction != nullptr) { lineInstruction->dump(out); } - + // OpFunction functionInstruction.dump(out); @@ -400,6 +403,9 @@ public: end.dump(out); } + LinkageType getLinkType() const { return linkType; } + const char* getExportName() const { return exportName.c_str(); } + protected: Function(const Function&); Function& operator=(Function&); @@ -412,6 +418,8 @@ protected: bool implicitThis; // true if this is a member function expecting to be passed a 'this' as the first argument bool reducedPrecisionReturn; std::set reducedPrecisionParams; // list of parameter indexes that need a relaxed precision arg + LinkageType linkType; + std::string exportName; }; // @@ -471,10 +479,11 @@ protected: // Add both // - the OpFunction instruction // - all the OpFunctionParameter instructions -__inline Function::Function(Id id, Id resultType, Id functionType, Id firstParamId, Module& parent) +__inline Function::Function(Id id, Id resultType, Id functionType, Id firstParamId, LinkageType linkage, const std::string& name, Module& parent) : parent(parent), lineInstruction(nullptr), functionInstruction(id, resultType, OpFunction), implicitThis(false), - reducedPrecisionReturn(false) + reducedPrecisionReturn(false), + linkType(linkage) { // OpFunction functionInstruction.addImmediateOperand(FunctionControlMaskNone); @@ -490,6 +499,11 @@ __inline Function::Function(Id id, Id resultType, Id functionType, Id firstParam parent.mapInstruction(param); parameterInstructions.push_back(param); } + + // If importing/exporting, save the function name (without the mangled parameters) for the linkage decoration + if (linkType != LinkageTypeMax) { + exportName = name.substr(0, name.find_first_of('(')); + } } __inline void Function::addLocalVariable(std::unique_ptr inst) diff --git a/StandAlone/CMakeLists.txt b/StandAlone/CMakeLists.txt index b9bac802..459657ab 100755 --- a/StandAlone/CMakeLists.txt +++ b/StandAlone/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2020 The Khronos Group Inc. +# Copyright (C) 2020-2023 The Khronos Group Inc. # # All rights reserved. # @@ -31,7 +31,7 @@ # ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGE. -find_host_package(PythonInterp 3 REQUIRED) +find_package(Python3 REQUIRED) set(GLSLANG_INTRINSIC_H "${GLSLANG_GENERATED_INCLUDEDIR}/glslang/glsl_intrinsic_header.h") set(GLSLANG_INTRINSIC_PY "${CMAKE_CURRENT_SOURCE_DIR}/../gen_extension_headers.py") @@ -39,84 +39,84 @@ set(GLSLANG_INTRINSIC_HEADER_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../glslang/Extensi add_custom_command( OUTPUT ${GLSLANG_INTRINSIC_H} - COMMAND ${PYTHON_EXECUTABLE} "${GLSLANG_INTRINSIC_PY}" + COMMAND Python3::Interpreter "${GLSLANG_INTRINSIC_PY}" "-i" ${GLSLANG_INTRINSIC_HEADER_DIR} "-o" ${GLSLANG_INTRINSIC_H} DEPENDS ${GLSLANG_INTRINSIC_PY} COMMENT "Generating ${GLSLANG_INTRINSIC_H}") -#add_custom_target(glslangValidator DEPENDS ${GLSLANG_INTRINSIC_H}) - -add_library(glslang-default-resource-limits - ${CMAKE_CURRENT_SOURCE_DIR}/ResourceLimits.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/resource_limits_c.cpp) -set_property(TARGET glslang-default-resource-limits PROPERTY FOLDER glslang) -set_property(TARGET glslang-default-resource-limits PROPERTY POSITION_INDEPENDENT_CODE ON) - -target_include_directories(glslang-default-resource-limits - PUBLIC $ - PUBLIC $) - set(SOURCES StandAlone.cpp DirStackFileIncluder.h ${GLSLANG_INTRINSIC_H}) -add_executable(glslangValidator ${SOURCES}) -set_property(TARGET glslangValidator PROPERTY FOLDER tools) -glslang_set_link_args(glslangValidator) +add_executable(glslang-standalone ${SOURCES}) +if(${CMAKE_CXX_COMPILER_ID} MATCHES "GNU") + target_compile_options(glslang-standalone PRIVATE -Wconversion) +elseif(${CMAKE_CXX_COMPILER_ID} MATCHES "Clang" AND NOT MSVC) + target_compile_options(glslang-standalone PRIVATE -Wshorten-64-to-32) +endif() +set_property(TARGET glslang-standalone PROPERTY FOLDER tools) +set_property(TARGET glslang-standalone PROPERTY OUTPUT_NAME glslang) +glslang_set_link_args(glslang-standalone) set(LIBRARIES glslang + OSDependent SPIRV glslang-default-resource-limits) -if(ENABLE_SPVREMAPPER) - set(LIBRARIES ${LIBRARIES} SPVRemapper) -endif() - if(WIN32) set(LIBRARIES ${LIBRARIES} psapi) elseif(UNIX) - if(NOT ANDROID) + if(NOT ANDROID AND NOT QNX) set(LIBRARIES ${LIBRARIES} pthread) endif() endif() -target_link_libraries(glslangValidator ${LIBRARIES}) -target_include_directories(glslangValidator PUBLIC - $ - $) - -if(ENABLE_OPT) - target_include_directories(glslangValidator - PRIVATE ${spirv-tools_SOURCE_DIR}/include - ) -endif() +target_link_libraries(glslang-standalone ${LIBRARIES}) +target_include_directories(glslang-standalone PUBLIC + $) if(ENABLE_SPVREMAPPER) set(REMAPPER_SOURCES spirv-remap.cpp) add_executable(spirv-remap ${REMAPPER_SOURCES}) set_property(TARGET spirv-remap PROPERTY FOLDER tools) glslang_set_link_args(spirv-remap) - target_link_libraries(spirv-remap ${LIBRARIES}) + target_link_libraries(spirv-remap SPVRemapper ${LIBRARIES}) endif() if(WIN32) source_group("Source" FILES ${SOURCES}) endif() -if(ENABLE_GLSLANG_INSTALL) - install(TARGETS glslangValidator EXPORT glslang-targets) +if(PROJECT_IS_TOP_LEVEL) + install(TARGETS glslang-standalone EXPORT glslang-targets) # Backward compatibility - file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/glslangValidatorTargets.cmake" " - message(WARNING \"Using `glslangValidatorTargets.cmake` is deprecated: use `find_package(glslang)` to find glslang CMake targets.\") + file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/glslang-standaloneTargets.cmake" " + message(WARNING \"Using `glslang-standaloneTargets.cmake` is deprecated: use `find_package(glslang)` to find glslang CMake targets.\") - if (NOT TARGET glslang::glslangValidator) - include(\"\${CMAKE_CURRENT_LIST_DIR}/../../${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}/glslang-targets.cmake\") + if (NOT TARGET glslang::glslang-standalone) + include(\"${CMAKE_INSTALL_FULL_LIBDIR}/cmake/${PROJECT_NAME}/glslang-targets.cmake\") endif() - add_library(glslangValidator ALIAS glslang::glslangValidator) + add_library(glslang-standalone ALIAS glslang::glslang-standalone) ") - install(FILES "${CMAKE_CURRENT_BINARY_DIR}/glslangValidatorTargets.cmake" DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake) + install(FILES "${CMAKE_CURRENT_BINARY_DIR}/glslang-standaloneTargets.cmake" DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake) + + # Create a symbolic link to glslang named glslangValidator for backwards compatibility + set(legacy_glslang_name "glslangValidator${CMAKE_EXECUTABLE_SUFFIX}") + set(link_method create_symlink) + if (WIN32 OR MINGW) + set(link_method copy_if_different) + endif() + add_custom_command(TARGET glslang-standalone + POST_BUILD + COMMAND ${CMAKE_COMMAND} -E ${link_method} $ ${legacy_glslang_name} + WORKING_DIRECTORY $) + + # Create the same symlink at install time + install(CODE "execute_process( \ + COMMAND ${CMAKE_COMMAND} -E ${link_method} $ ${legacy_glslang_name} \ + WORKING_DIRECTORY \$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR})") if(ENABLE_SPVREMAPPER) install(TARGETS spirv-remap EXPORT glslang-targets) @@ -126,7 +126,7 @@ if(ENABLE_GLSLANG_INSTALL) message(WARNING \"Using `spirv-remapTargets.cmake` is deprecated: use `find_package(glslang)` to find glslang CMake targets.\") if (NOT TARGET glslang::spirv-remap) - include(\"\${CMAKE_CURRENT_LIST_DIR}/../../${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}/glslang-targets.cmake\") + include(\"${CMAKE_INSTALL_FULL_LIBDIR}/cmake/${PROJECT_NAME}/glslang-targets.cmake\") endif() add_library(spirv-remap ALIAS glslang::spirv-remap) @@ -134,18 +134,4 @@ if(ENABLE_GLSLANG_INSTALL) install(FILES "${CMAKE_CURRENT_BINARY_DIR}/spirv-remapTargets.cmake" DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake) endif() - install(TARGETS glslang-default-resource-limits EXPORT glslang-targets) - - # Backward compatibility - file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/glslang-default-resource-limitsTargets.cmake" " - message(WARNING \"Using `glslang-default-resource-limitsTargets.cmake` is deprecated: use `find_package(glslang)` to find glslang CMake targets.\") - - if (NOT TARGET glslang::glslang-default-resource-limits) - include(\"\${CMAKE_CURRENT_LIST_DIR}/../../${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}/glslang-targets.cmake\") - endif() - - add_library(glslang-default-resource-limits ALIAS glslang::glslang-default-resource-limits) - ") - install(FILES "${CMAKE_CURRENT_BINARY_DIR}/glslang-default-resource-limitsTargets.cmake" DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake) - endif() diff --git a/StandAlone/ResourceLimits.h b/StandAlone/ResourceLimits.h deleted file mode 100755 index 736248eb..00000000 --- a/StandAlone/ResourceLimits.h +++ /dev/null @@ -1,57 +0,0 @@ -// -// Copyright (C) 2016 Google, Inc. -// -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions -// are met: -// -// Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// -// Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following -// disclaimer in the documentation and/or other materials provided -// with the distribution. -// -// Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -// COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. - -#ifndef _STAND_ALONE_RESOURCE_LIMITS_INCLUDED_ -#define _STAND_ALONE_RESOURCE_LIMITS_INCLUDED_ - -#include - -#include "../glslang/Include/ResourceLimits.h" - -namespace glslang { - -// These are the default resources for TBuiltInResources, used for both -// - parsing this string for the case where the user didn't supply one, -// - dumping out a template for user construction of a config file. -extern const TBuiltInResource DefaultTBuiltInResource; - -// Returns the DefaultTBuiltInResource as a human-readable string. -std::string GetDefaultTBuiltInResourceString(); - -// Decodes the resource limits from |config| to |resources|. -void DecodeResourceLimits(TBuiltInResource* resources, char* config); - -} // end namespace glslang - -#endif // _STAND_ALONE_RESOURCE_LIMITS_INCLUDED_ diff --git a/StandAlone/StandAlone.cpp b/StandAlone/StandAlone.cpp index e0262856..ed3deccd 100755 --- a/StandAlone/StandAlone.cpp +++ b/StandAlone/StandAlone.cpp @@ -46,20 +46,22 @@ #include "DirStackFileIncluder.h" #include "./../glslang/Include/ShHandle.h" #include "./../glslang/Public/ShaderLang.h" +#include "../glslang/MachineIndependent/localintermediate.h" #include "../SPIRV/GlslangToSpv.h" #include "../SPIRV/GLSL.std.450.h" #include "../SPIRV/doc.h" #include "../SPIRV/disassemble.h" -#include -#include +#include +#include #include #include -#include +#include +#include #include #include -#include #include +#include #include "../glslang/OSDependent/osinclude.h" @@ -73,40 +75,41 @@ extern "C" { } // Command-line options -enum TOptions { - EOptionNone = 0, - EOptionIntermediate = (1 << 0), - EOptionSuppressInfolog = (1 << 1), - EOptionMemoryLeakMode = (1 << 2), - EOptionRelaxedErrors = (1 << 3), - EOptionGiveWarnings = (1 << 4), - EOptionLinkProgram = (1 << 5), - EOptionMultiThreaded = (1 << 6), - EOptionDumpConfig = (1 << 7), - EOptionDumpReflection = (1 << 8), - EOptionSuppressWarnings = (1 << 9), - EOptionDumpVersions = (1 << 10), - EOptionSpv = (1 << 11), - EOptionHumanReadableSpv = (1 << 12), - EOptionVulkanRules = (1 << 13), - EOptionDefaultDesktop = (1 << 14), - EOptionOutputPreprocessed = (1 << 15), - EOptionOutputHexadecimal = (1 << 16), - EOptionReadHlsl = (1 << 17), - EOptionCascadingErrors = (1 << 18), - EOptionAutoMapBindings = (1 << 19), - EOptionFlattenUniformArrays = (1 << 20), - EOptionNoStorageFormat = (1 << 21), - EOptionKeepUncalled = (1 << 22), - EOptionHlslOffsets = (1 << 23), - EOptionHlslIoMapping = (1 << 24), - EOptionAutoMapLocations = (1 << 25), - EOptionDebug = (1 << 26), - EOptionStdin = (1 << 27), - EOptionOptimizeDisable = (1 << 28), - EOptionOptimizeSize = (1 << 29), - EOptionInvertY = (1 << 30), - EOptionDumpBareVersion = (1 << 31), +enum TOptions : uint64_t { + EOptionNone = 0, + EOptionIntermediate = (1ull << 0), + EOptionSuppressInfolog = (1ull << 1), + EOptionMemoryLeakMode = (1ull << 2), + EOptionRelaxedErrors = (1ull << 3), + EOptionGiveWarnings = (1ull << 4), + EOptionLinkProgram = (1ull << 5), + EOptionMultiThreaded = (1ull << 6), + EOptionDumpConfig = (1ull << 7), + EOptionDumpReflection = (1ull << 8), + EOptionSuppressWarnings = (1ull << 9), + EOptionDumpVersions = (1ull << 10), + EOptionSpv = (1ull << 11), + EOptionHumanReadableSpv = (1ull << 12), + EOptionVulkanRules = (1ull << 13), + EOptionDefaultDesktop = (1ull << 14), + EOptionOutputPreprocessed = (1ull << 15), + EOptionOutputHexadecimal = (1ull << 16), + EOptionReadHlsl = (1ull << 17), + EOptionCascadingErrors = (1ull << 18), + EOptionAutoMapBindings = (1ull << 19), + EOptionFlattenUniformArrays = (1ull << 20), + EOptionNoStorageFormat = (1ull << 21), + EOptionKeepUncalled = (1ull << 22), + EOptionHlslOffsets = (1ull << 23), + EOptionHlslIoMapping = (1ull << 24), + EOptionAutoMapLocations = (1ull << 25), + EOptionDebug = (1ull << 26), + EOptionStdin = (1ull << 27), + EOptionOptimizeDisable = (1ull << 28), + EOptionOptimizeSize = (1ull << 29), + EOptionInvertY = (1ull << 30), + EOptionDumpBareVersion = (1ull << 31), + EOptionCompileOnly = (1ull << 32), }; bool targetHlslFunctionality1 = false; bool SpvToolsDisassembler = false; @@ -143,8 +146,9 @@ void FreeFileData(char* data); void InfoLogMsg(const char* msg, const char* name, const int num); // Globally track if any compile or link failure. -bool CompileFailed = false; -bool LinkFailed = false; +std::atomic CompileFailed{0}; +std::atomic LinkFailed{0}; +std::atomic CompileOrLinkFailed{0}; // array of unique places to leave the shader names and infologs for the asynchronous compiles std::vector> WorkItems; @@ -158,17 +162,15 @@ void ProcessConfigFile() { if (ConfigFile.size() == 0) *GetResources() = *GetDefaultResources(); -#ifndef GLSLANG_WEB else { char* configString = ReadFileData(ConfigFile.c_str()); DecodeResourceLimits(GetResources(), configString); FreeFileData(configString); } -#endif } int ReflectOptions = EShReflectionDefault; -int Options = 0; +std::underlying_type_t Options = EOptionNone; const char* ExecutableName = nullptr; const char* binaryFileName = nullptr; const char* depencyFileName = nullptr; @@ -258,6 +260,17 @@ public: text.append("\n"); } + void addText(std::string preambleText) + { + fixLine(preambleText); + + Processes.push_back("preamble-text"); + Processes.back().append(preambleText); + + text.append(preambleText); + text.append("\n"); + } + protected: void fixLine(std::string& line) { @@ -504,7 +517,7 @@ void ProcessGlobalBlockSettings(int& argc, char**& argv, std::string* name, unsi if (set) { errno = 0; - int setVal = ::strtol(argv[curArg], nullptr, 10); + int setVal = static_cast(::strtol(argv[curArg], nullptr, 10)); if (errno || setVal < 0) { printf("%s: invalid set\n", argv[curArg]); usage(); @@ -516,7 +529,7 @@ void ProcessGlobalBlockSettings(int& argc, char**& argv, std::string* name, unsi if (binding) { errno = 0; - int bindingVal = ::strtol(argv[curArg], nullptr, 10); + int bindingVal = static_cast(::strtol(argv[curArg], nullptr, 10)); if (errno || bindingVal < 0) { printf("%s: invalid binding\n", argv[curArg]); usage(); @@ -599,7 +612,7 @@ void ProcessArguments(std::vector>& workItem exit(EFailUsage); } errno = 0; - int location = ::strtol(split + 1, nullptr, 10); + int location = static_cast(::strtol(split + 1, nullptr, 10)); if (errno) { printf("%s: invalid location\n", arg); exit(EFailUsage); @@ -626,7 +639,7 @@ void ProcessArguments(std::vector>& workItem } else if (lowerword == "uniform-base") { if (argc <= 1) Error("no provided", lowerword.c_str()); - uniformBase = ::strtol(argv[1], nullptr, 10); + uniformBase = static_cast(::strtol(argv[1], nullptr, 10)); bumpArg(); break; } else if (lowerword == "client") { @@ -714,7 +727,7 @@ void ProcessArguments(std::vector>& workItem HlslDxPositionW = true; } else if (lowerword == "enhanced-msgs") { EnhancedMsgs = true; - } else if (lowerword == "auto-sampled-textures") { + } else if (lowerword == "auto-sampled-textures") { autoSampledTextures = true; } else if (lowerword == "invert-y" || // synonyms lowerword == "iy") { @@ -727,6 +740,13 @@ void ProcessArguments(std::vector>& workItem } else if (lowerword == "no-storage-format" || // synonyms lowerword == "nsf") { Options |= EOptionNoStorageFormat; + } else if (lowerword == "preamble-text" || + lowerword == "p") { + if (argc > 1) + UserPreamble.addText(argv[1]); + else + Error("expects ", argv[0]); + bumpArg(); } else if (lowerword == "relaxed-errors") { Options |= EOptionRelaxedErrors; } else if (lowerword == "reflect-strict-array-suffix") { @@ -873,6 +893,8 @@ void ProcessArguments(std::vector>& workItem bumpArg(); } else if (lowerword == "version") { Options |= EOptionDumpVersions; + } else if (lowerword == "no-link") { + Options |= EOptionCompileOnly; } else if (lowerword == "help") { usage(); break; @@ -926,6 +948,9 @@ void ProcessArguments(std::vector>& workItem else Error("unknown -O option"); break; + case 'P': + UserPreamble.addText(getStringOperand("-P")); + break; case 'R': VulkanRulesRelaxed = true; break; @@ -1144,10 +1169,11 @@ void CompileShaders(glslang::TWorklist& worklist) if (Options & EOptionDebug) Error("cannot generate debug information unless linking to generate code"); + // NOTE: TWorkList::remove is thread-safe glslang::TWorkItem* workItem; if (Options & EOptionStdin) { if (worklist.remove(workItem)) { - ShHandle compiler = ShConstructCompiler(FindLanguage("stdin"), Options); + ShHandle compiler = ShConstructCompiler(FindLanguage("stdin"), 0); if (compiler == nullptr) return; @@ -1160,7 +1186,7 @@ void CompileShaders(glslang::TWorklist& worklist) } } else { while (worklist.remove(workItem)) { - ShHandle compiler = ShConstructCompiler(FindLanguage(workItem->name), Options); + ShHandle compiler = ShConstructCompiler(FindLanguage(workItem->name), 0); if (compiler == nullptr) return; @@ -1291,6 +1317,7 @@ void CompileAndLinkShaderUnits(std::vector compUnits) // glslang::TProgram& program = *new glslang::TProgram; + const bool compileOnly = (Options & EOptionCompileOnly) != 0; for (auto it = compUnits.cbegin(); it != compUnits.cend(); ++it) { const auto &compUnit = *it; for (int i = 0; i < compUnit.count; i++) { @@ -1307,6 +1334,9 @@ void CompileAndLinkShaderUnits(std::vector compUnits) shader->setSourceEntryPoint(sourceEntryPointName); } + if (compileOnly) + shader->setCompileOnly(); + shader->setOverrideVersion(GlslVersion); std::string intrinsicString = getIntrinsic(compUnit.text, compUnit.count); @@ -1321,7 +1351,6 @@ void CompileAndLinkShaderUnits(std::vector compUnits) shader->setPreamble(PreambleString.c_str()); shader->addProcesses(Processes); -#ifndef GLSLANG_WEB // Set IO mapper binding shift values for (int r = 0; r < glslang::EResCount; ++r) { const glslang::TResourceType res = glslang::TResourceType(r); @@ -1353,7 +1382,6 @@ void CompileAndLinkShaderUnits(std::vector compUnits) } shader->setUniformLocationBase(uniformBase); -#endif if (VulkanRulesRelaxed) { for (auto& storageOverride : blockStorageOverrides) { @@ -1413,24 +1441,23 @@ void CompileAndLinkShaderUnits(std::vector compUnits) const int defaultVersion = Options & EOptionDefaultDesktop ? 110 : 100; -#ifndef GLSLANG_WEB if (Options & EOptionOutputPreprocessed) { std::string str; if (shader->preprocess(GetResources(), defaultVersion, ENoProfile, false, false, messages, &str, includer)) { PutsIfNonEmpty(str.c_str()); } else { - CompileFailed = true; + CompileFailed = 1; } StderrIfNonEmpty(shader->getInfoLog()); StderrIfNonEmpty(shader->getInfoDebugLog()); continue; } -#endif if (! shader->parse(GetResources(), defaultVersion, false, messages, includer)) - CompileFailed = true; + CompileFailed = 1; - program.addShader(shader); + if (!compileOnly) + program.addShader(shader); if (! (Options & EOptionSuppressInfolog) && ! (Options & EOptionMemoryLeakMode)) { @@ -1445,83 +1472,98 @@ void CompileAndLinkShaderUnits(std::vector compUnits) // Program-level processing... // - // Link - if (! (Options & EOptionOutputPreprocessed) && ! program.link(messages)) - LinkFailed = true; - -#ifndef GLSLANG_WEB - // Map IO - if (Options & EOptionSpv) { - if (!program.mapIO()) + if (!compileOnly) { + // Link + if (!(Options & EOptionOutputPreprocessed) && !program.link(messages)) LinkFailed = true; - } -#endif - // Report - if (! (Options & EOptionSuppressInfolog) && - ! (Options & EOptionMemoryLeakMode)) { - PutsIfNonEmpty(program.getInfoLog()); - PutsIfNonEmpty(program.getInfoDebugLog()); - } + // Map IO + if (Options & EOptionSpv) { + if (!program.mapIO()) + LinkFailed = true; + } -#ifndef GLSLANG_WEB - // Reflect - if (Options & EOptionDumpReflection) { - program.buildReflection(ReflectOptions); - program.dumpReflection(); + // Report + if (!(Options & EOptionSuppressInfolog) && !(Options & EOptionMemoryLeakMode)) { + PutsIfNonEmpty(program.getInfoLog()); + PutsIfNonEmpty(program.getInfoDebugLog()); + } + + // Reflect + if (Options & EOptionDumpReflection) { + program.buildReflection(ReflectOptions); + program.dumpReflection(); + } } -#endif std::vector outputFiles; // Dump SPIR-V if (Options & EOptionSpv) { - if (CompileFailed || LinkFailed) + CompileOrLinkFailed.fetch_or(CompileFailed); + CompileOrLinkFailed.fetch_or(LinkFailed); + if (static_cast(CompileOrLinkFailed.load())) printf("SPIR-V is not generated for failed compile or link\n"); else { - for (int stage = 0; stage < EShLangCount; ++stage) { - if (program.getIntermediate((EShLanguage)stage)) { - std::vector spirv; - spv::SpvBuildLogger logger; - glslang::SpvOptions spvOptions; - if (Options & EOptionDebug) { - spvOptions.generateDebugInfo = true; - if (emitNonSemanticShaderDebugInfo) { - spvOptions.emitNonSemanticShaderDebugInfo = true; - if (emitNonSemanticShaderDebugSource) { - spvOptions.emitNonSemanticShaderDebugSource = true; - } - } - } else if (stripDebugInfo) - spvOptions.stripDebugInfo = true; - spvOptions.disableOptimizer = (Options & EOptionOptimizeDisable) != 0; - spvOptions.optimizeSize = (Options & EOptionOptimizeSize) != 0; - spvOptions.disassemble = SpvToolsDisassembler; - spvOptions.validate = SpvToolsValidate; - glslang::GlslangToSpv(*program.getIntermediate((EShLanguage)stage), spirv, &logger, &spvOptions); - - // Dump the spv to a file or stdout, etc., but only if not doing - // memory/perf testing, as it's not internal to programmatic use. - if (! (Options & EOptionMemoryLeakMode)) { - printf("%s", logger.getAllMessages().c_str()); - if (Options & EOptionOutputHexadecimal) { - glslang::OutputSpvHex(spirv, GetBinaryName((EShLanguage)stage), variableName); - } else { - glslang::OutputSpvBin(spirv, GetBinaryName((EShLanguage)stage)); - } - - outputFiles.push_back(GetBinaryName((EShLanguage)stage)); -#ifndef GLSLANG_WEB - if (!SpvToolsDisassembler && (Options & EOptionHumanReadableSpv)) - spv::Disassemble(std::cout, spirv); -#endif + std::vector intermediates; + if (!compileOnly) { + for (int stage = 0; stage < EShLangCount; ++stage) { + if (auto* i = program.getIntermediate((EShLanguage)stage)) { + intermediates.emplace_back(i); } } + } else { + for (const auto* shader : shaders) { + if (auto* i = shader->getIntermediate()) { + intermediates.emplace_back(i); + } + } + } + for (auto* intermediate : intermediates) { + std::vector spirv; + spv::SpvBuildLogger logger; + glslang::SpvOptions spvOptions; + if (Options & EOptionDebug) { + spvOptions.generateDebugInfo = true; + if (emitNonSemanticShaderDebugInfo) { + spvOptions.emitNonSemanticShaderDebugInfo = true; + if (emitNonSemanticShaderDebugSource) { + spvOptions.emitNonSemanticShaderDebugSource = true; + } + } + } else if (stripDebugInfo) + spvOptions.stripDebugInfo = true; + spvOptions.disableOptimizer = (Options & EOptionOptimizeDisable) != 0; + spvOptions.optimizeSize = (Options & EOptionOptimizeSize) != 0; + spvOptions.disassemble = SpvToolsDisassembler; + spvOptions.validate = SpvToolsValidate; + spvOptions.compileOnly = compileOnly; + glslang::GlslangToSpv(*intermediate, spirv, &logger, &spvOptions); + + // Dump the spv to a file or stdout, etc., but only if not doing + // memory/perf testing, as it's not internal to programmatic use. + if (!(Options & EOptionMemoryLeakMode)) { + printf("%s", logger.getAllMessages().c_str()); + const auto filename = GetBinaryName(intermediate->getStage()); + if (Options & EOptionOutputHexadecimal) { + if (!glslang::OutputSpvHex(spirv, filename, variableName)) + exit(EFailUsage); + } else { + if (!glslang::OutputSpvBin(spirv, filename)) + exit(EFailUsage); + } + + outputFiles.push_back(filename); + if (!SpvToolsDisassembler && (Options & EOptionHumanReadableSpv)) + spv::Disassemble(std::cout, spirv); + } } } } - if (depencyFileName && !(CompileFailed || LinkFailed)) { + CompileOrLinkFailed.fetch_or(CompileFailed); + CompileOrLinkFailed.fetch_or(LinkFailed); + if (depencyFileName && !static_cast(CompileOrLinkFailed.load())) { std::set includedFiles = includer.getIncludedFiles(); sources.insert(sources.end(), includedFiles.begin(), includedFiles.end()); @@ -1609,13 +1651,11 @@ int singleMain() workList.add(item.get()); }); -#ifndef GLSLANG_WEB if (Options & EOptionDumpConfig) { printf("%s", GetDefaultTBuiltInResourceString().c_str()); if (workList.empty()) return ESuccess; } -#endif if (Options & EOptionDumpBareVersion) { printf("%d:%d.%d.%d%s\n", glslang::GetSpirvGeneratorVersion(), GLSLANG_VERSION_MAJOR, GLSLANG_VERSION_MINOR, @@ -1699,9 +1739,9 @@ int singleMain() ShFinalize(); } - if (CompileFailed) + if (CompileFailed.load()) return EFailCompile; - if (LinkFailed) + if (LinkFailed.load()) return EFailLink; return 0; @@ -1832,12 +1872,13 @@ void CompileFile(const char* fileName, ShHandle compiler) SetMessageOptions(messages); if (UserPreamble.isSet()) - Error("-D and -U options require -l (linking)\n"); + Error("-D, -U and -P options require -l (linking)\n"); for (int i = 0; i < ((Options & EOptionMemoryLeakMode) ? 100 : 1); ++i) { for (int j = 0; j < ((Options & EOptionMemoryLeakMode) ? 100 : 1); ++j) { // ret = ShCompile(compiler, shaderStrings, NumShaderStrings, lengths, EShOptNone, &Resources, Options, (Options & EOptionDefaultDesktop) ? 110 : 100, false, messages); - ret = ShCompile(compiler, &shaderString, 1, nullptr, EShOptNone, GetResources(), Options, (Options & EOptionDefaultDesktop) ? 110 : 100, false, messages); + ret = ShCompile(compiler, &shaderString, 1, nullptr, EShOptNone, GetResources(), 0, + (Options & EOptionDefaultDesktop) ? 110 : 100, false, messages); // const char* multi[12] = { "# ve", "rsion", " 300 e", "s", "\n#err", // "or should be l", "ine 1", "string 5\n", "float glo", "bal", // ";\n#error should be line 2\n void main() {", "global = 2.3;}" }; @@ -1861,7 +1902,7 @@ void CompileFile(const char* fileName, ShHandle compiler) // void usage() { - printf("Usage: glslangValidator [option]... [file]...\n" + printf("Usage: glslang [option]... [file]...\n" "\n" "'file' can end in . for auto-stage classification, where is:\n" " .conf to provide a config file that replaces the default configuration\n" @@ -1902,6 +1943,9 @@ void usage() " is searched first, followed by left-to-right order of -I\n" " -Od disables optimization; may cause illegal SPIR-V for HLSL\n" " -Os optimizes SPIR-V to minimize size\n" + " -P | --preamble-text | --P \n" + " inject custom preamble text, which is treated as if it\n" + " appeared immediately after the version declaration (if any).\n" " -R use relaxed verification rules for generating Vulkan SPIR-V,\n" " allowing the use of default uniforms, atomic_uints, and\n" " gl_VertexID and gl_InstanceID keywords.\n" @@ -1949,7 +1993,7 @@ void usage() " without explicit bindings\n" " --auto-map-locations | --aml automatically locate input/output lacking\n" " 'location' (fragile, not cross stage)\n" - " --auto-sampled-textures Removes sampler variables and converts\n" + " --auto-sampled-textures Removes sampler variables and converts\n" " existing textures to sampled textures\n" " --client {vulkan|opengl} see -V and -G\n" " --depfile writes depfile for build systems\n" @@ -2064,7 +2108,9 @@ void usage() " --vn creates a C header file that contains a\n" " uint32_t array named \n" " initialized with the shader binary code\n" - ); + " --no-link Only compile shader; do not link (GLSL-only)\n" + " NOTE: this option will set the export linkage\n" + " attribute on all functions\n"); exit(EFailUsage); } diff --git a/StandAlone/resource_limits_c.h b/StandAlone/resource_limits_c.h deleted file mode 100755 index 108fd5e2..00000000 --- a/StandAlone/resource_limits_c.h +++ /dev/null @@ -1,54 +0,0 @@ -/** -BSD 2-Clause License - -Copyright (c) 2020, Travis Fort -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -**/ - -#ifndef _STAND_ALONE_RESOURCE_LIMITS_C_INCLUDED_ -#define _STAND_ALONE_RESOURCE_LIMITS_C_INCLUDED_ - -#include "../glslang/Include/glslang_c_interface.h" - -#ifdef __cplusplus -extern "C" { -#endif - -// These are the default resources for TBuiltInResources, used for both -// - parsing this string for the case where the user didn't supply one, -// - dumping out a template for user construction of a config file. -const glslang_resource_t* glslang_default_resource(void); - -// Returns the DefaultTBuiltInResource as a human-readable string. -// NOTE: User is responsible for freeing this string. -const char* glslang_default_resource_string(); - -// Decodes the resource limits from |config| to |resources|. -void glslang_decode_resource_limits(glslang_resource_t* resources, char* config); - -#ifdef __cplusplus -} -#endif - -#endif // _STAND_ALONE_RESOURCE_LIMITS_C_INCLUDED_ diff --git a/StandAlone/spirv-remap.cpp b/StandAlone/spirv-remap.cpp index 301bb0cb..1bd4a2d6 100755 --- a/StandAlone/spirv-remap.cpp +++ b/StandAlone/spirv-remap.cpp @@ -37,7 +37,11 @@ #include #include #include +#include +// +// Include remapper +// #include "../SPIRV/SPVRemapper.h" namespace { @@ -172,7 +176,7 @@ namespace { << " [--strip-all | --strip all | -s]" << " [--strip-white-list]" << " [--do-everything]" - << " --input | -i file1 [file2...] --output|-o DESTDIR" + << " --input | -i file1 [file2...] --output|-o DESTDIR | destfile1 [destfile2...]" << std::endl; std::cout << " " << basename(name) << " [--version | -V]" << std::endl; @@ -182,32 +186,45 @@ namespace { } // grind through each SPIR in turn - void execute(const std::vector& inputFile, const std::string& outputDir, - const std::string& whiteListFile, int opts, int verbosity) + void execute(const std::vector& inputFiles, + const std::vector& outputDirOrFiles, + const bool isSingleOutputDir, + const std::string& whiteListFile, + int opts, + int verbosity) { std::vector whiteListStrings; - if(!whiteListFile.empty()) + if (!whiteListFile.empty()) read(whiteListStrings, whiteListFile, verbosity); - for (auto it = inputFile.cbegin(); it != inputFile.cend(); ++it) { - const std::string &filename = *it; + for (std::size_t ii=0; ii spv; - read(spv, filename, verbosity); + read(spv, inputFiles[ii], verbosity); + spv::spirvbin_t(verbosity).remap(spv, whiteListStrings, opts); - const std::string outfile = outputDir + path_sep_char() + basename(filename); - write(spv, outfile, verbosity); + + if (isSingleOutputDir) { + // write all outputs to same directory + const std::string outFile = outputDirOrFiles[0] + path_sep_char() + basename(inputFiles[ii]); + write(spv, outFile, verbosity); + } else { + // write each input to its associated output + write(spv, outputDirOrFiles[ii], verbosity); + } } if (verbosity > 0) - std::cout << "Done: " << inputFile.size() << " file(s) processed" << std::endl; + std::cout << "Done: " << inputFiles.size() << " file(s) processed" << std::endl; } // Parse command line options - void parseCmdLine(int argc, char** argv, std::vector& inputFile, - std::string& outputDir, - std::string& stripWhiteListFile, - int& options, - int& verbosity) + void parseCmdLine(int argc, + char** argv, + std::vector& inputFiles, + std::vector& outputDirOrFiles, + std::string& stripWhiteListFile, + int& options, + int& verbosity) { if (argc < 2) usage(argv[0]); @@ -222,18 +239,19 @@ namespace { const std::string arg = argv[a]; if (arg == "--output" || arg == "-o") { - // Output directory - if (++a >= argc) + // Collect output dirs or files + for (++a; a < argc && argv[a][0] != '-'; ++a) + outputDirOrFiles.push_back(argv[a]); + + if (outputDirOrFiles.size() == 0) usage(argv[0], "--output requires an argument"); - if (!outputDir.empty()) - usage(argv[0], "--output can be provided only once"); - - outputDir = argv[a++]; - - // Remove trailing directory separator characters - while (!outputDir.empty() && outputDir.back() == path_sep_char()) - outputDir.pop_back(); + // Remove trailing directory separator characters from all paths + for (std::size_t ii=0; ii inputFile; - std::string outputDir; + std::vector inputFiles; + std::vector outputDirOrFiles; std::string whiteListFile; int opts; int verbosity; -#ifdef use_cpp11 // handle errors by exiting spv::spirvbin_t::registerErrorHandler(errHandler); // Log messages to std::cout spv::spirvbin_t::registerLogHandler(logHandler); -#endif if (argc < 2) usage(argv[0]); - parseCmdLine(argc, argv, inputFile, outputDir, whiteListFile, opts, verbosity); + parseCmdLine(argc, argv, inputFiles, outputDirOrFiles, whiteListFile, opts, verbosity); - if (outputDir.empty()) - usage(argv[0], "Output directory required"); + if (outputDirOrFiles.empty()) + usage(argv[0], "Output directory or file(s) required."); + + const bool isMultiInput = inputFiles.size() > 1; + const bool isMultiOutput = outputDirOrFiles.size() > 1; + const bool isSingleOutputDir = !isMultiOutput && std::filesystem::is_directory(outputDirOrFiles[0]); + + if (isMultiInput && !isMultiOutput && !isSingleOutputDir) + usage(argv[0], "Output is not a directory."); + + + if (isMultiInput && isMultiOutput && (outputDirOrFiles.size() != inputFiles.size())) + usage(argv[0], "Output must be either a single directory or one output file per input."); // Main operations: read, remap, and write. - execute(inputFile, outputDir, whiteListFile, opts, verbosity); + execute(inputFiles, outputDirOrFiles, isSingleOutputDir, whiteListFile, opts, verbosity); // If we get here, everything went OK! Nothing more to be done. } diff --git a/Test/400.frag b/Test/400.frag index 039d4809..b9bc17aa 100755 --- a/Test/400.frag +++ b/Test/400.frag @@ -7,6 +7,39 @@ uniform sampler2D arrayedSampler[5]; uniform usampler2DRect samp2dr; uniform isampler2DArray isamp2DA; +#extension GL_ARB_shader_storage_buffer_object : enable + +buffer Buffer +{ + int atomi; + uint atomu; +}; + +void atomicOpPass() +{ + int origi = atomicAdd(atomi, 3); + uint origu = atomicAnd(atomu, 7u); + origi = atomicExchange(atomi, 4); + origu = atomicCompSwap(atomu, 10u, 8u); +} + +buffer ssboElem01 +{ + int member01; + int memberArr01[2]; + int memberUnsizedArr01[]; +} ssboStd430Arr[2]; + +// if turns on EShReflectionSharedStd140SSBO, SPIR-V would be different +buffer ssboElem02 +{ + int member02; + int memberArr02[2]; + int memberUnsizedArr02[]; +} ssboSharedArr[2]; + +#extension GL_ARB_shader_storage_buffer_object : disable + void main() { vec4 v; diff --git a/Test/GL_ARB_bindless_texture.frag b/Test/GL_ARB_bindless_texture.frag new file mode 100755 index 00000000..58c8359e --- /dev/null +++ b/Test/GL_ARB_bindless_texture.frag @@ -0,0 +1,50 @@ +#version 460 compatibility + +#extension GL_ARB_bindless_texture: require + +#if !defined GL_ARB_bindless_texture +# error GL_ARB_bindless_texture is not defined +#elif GL_ARB_bindless_texture != 1 +# error GL_ARB_bindless_texture is not equal to 1 +#endif + +// Valid usage cases +layout(bindless_sampler) uniform sampler2D s0; // case0: bindless layout +in sampler2D s1; // case1: sampler as an input +uniform uvec2 s2; // case2: uvec2 as sampler constructor +uniform ivec2 s3; // case3: ivec2 as sampler constructor +uniform int index; +in sampler2D s4[2][3]; // case4: sampler arrays of arrays +uniform BB {sampler2D s5;} bbs5[2]; // case5: uniform block member as a sampler +in samplerBuffer s6; // case6: samplerBuffer input +uniform UBO9 {samplerBuffer s7;}; // case7: samplerBuffer as an uniform block member +buffer SSBO10 {samplerBuffer s8;}; // case8: samplerBuffer as an ssbo member +layout(rgba8, bindless_image) in image2D i9; // case9: bindless image as an input + + +uniform vec2 coord; // bindless coord 2-D +uniform int icoord; // bindless coord 1-D +out vec4 color0; +out vec4 color1; +out vec4 color2; +out vec4 color3; +out vec4 color4; +out vec4 color5; +out vec4 color6; +out vec4 color7; +out vec4 color8; +out vec4 color9; + +void main() +{ + color0 = texture(s0, coord); + color1 = texture(s1, coord); + color2 = texture(sampler2D(s2), coord); + color3 = texture(sampler2D(s3), coord); + color4 = texture(s4[index][index], coord); + color5 = texture(bbs5[index].s5, coord); + color6 = texelFetch(s6, icoord); + color7 = texelFetch(s7, icoord); + color8 = texelFetch(s8, icoord); + color9 = imageLoad(i9, ivec2(0,0)); +} \ No newline at end of file diff --git a/Test/GL_EXT_draw_instanced.vert b/Test/GL_EXT_draw_instanced.vert new file mode 100755 index 00000000..601e3d7f --- /dev/null +++ b/Test/GL_EXT_draw_instanced.vert @@ -0,0 +1,18 @@ +#version 120 +#extension GL_EXT_draw_instanced : require +#define ID gl_InstanceID + +uniform mat4 gtf_ModelViewProjectionMatrix; +uniform vec3 instanceOffsets[3]; +uniform vec4 va[gl_MaxVertexAttribs]; +vec4 color; + +void main (void) +{ + vec4 vertex = vec4(va[0].xy / 3.0, va[0].zw) + vec4(instanceOffsets[ID], 1.0); + color = vec4(0, 0, 0, 0); + for (int i = 1; i < gl_MaxVertexAttribs; i++) + color += va[i]; + gl_Position = gtf_ModelViewProjectionMatrix * vertex; + gl_PointSize = 1.0; +} \ No newline at end of file diff --git a/Test/GL_EXT_texture_array.frag b/Test/GL_EXT_texture_array.frag new file mode 100755 index 00000000..50a40a01 --- /dev/null +++ b/Test/GL_EXT_texture_array.frag @@ -0,0 +1,34 @@ +#version 110 + +#extension GL_EXT_texture_array : enable + +uniform sampler1DArray s1DA; +uniform sampler2DArray s2DA; +uniform sampler1DArrayShadow s1DAS; +uniform sampler2DArrayShadow s2DAS; + +void foo() +{ + float f; + vec2 v2; + vec3 v3; + vec4 v4; + + v4 = texture1DArray(s1DA, v2); + v4 = texture2DArray(s2DA, v3); + v4 = shadow1DArray(s1DAS, v3); + v4 = shadow2DArray(s2DAS, v4); + + v4 = texture1DArray(s1DA, v2, f); + v4 = texture2DArray(s2DA, v3, f); + v4 = shadow1DArray(s1DAS, v3, f); + + v4 = texture1DArrayLod(s1DA, v2, f); + v4 = texture2DArrayLod(s2DA, v3, f); + v4 = shadow1DArrayLod(s1DAS, v3, f); +} + +void main() +{ + foo(); +} diff --git a/Test/baseResults/120.vert.out b/Test/baseResults/120.vert.out index 6c42b75e..fcfffe9b 100755 --- a/Test/baseResults/120.vert.out +++ b/Test/baseResults/120.vert.out @@ -46,6 +46,7 @@ ERROR: 0:108: 'overloadE' : no matching overloaded function found ERROR: 0:111: 'overloadE' : no matching overloaded function found ERROR: 0:117: 'overloadF' : no matching overloaded function found ERROR: 0:121: 'gl_TexCoord array size' : must be less than or equal to gl_MaxTextureCoords (32) +ERROR: 0:154: 'non-float shader input/output' : not supported for this version or the enabled extensions ERROR: 0:165: 'switch' : Reserved word. ERROR: 0:171: 'default' : Reserved word. ERROR: 0:165: 'switch statements' : not supported for this version or the enabled extensions @@ -80,7 +81,7 @@ ERROR: 0:195: 'gl_ModelViewMatrix' : identifiers starting with "gl_" are reserve ERROR: 0:200: 'token pasting (##)' : not supported for this version or the enabled extensions ERROR: 0:203: 'token pasting (##)' : not supported for this version or the enabled extensions ERROR: 0:205: '' : syntax error, unexpected IDENTIFIER -ERROR: 81 compilation errors. No code generated. +ERROR: 82 compilation errors. No code generated. Shader version: 120 diff --git a/Test/baseResults/130.vert.out b/Test/baseResults/130.vert.out index e38043c6..ee7fddef 100755 --- a/Test/baseResults/130.vert.out +++ b/Test/baseResults/130.vert.out @@ -1,9 +1,8 @@ 130.vert -ERROR: 0:59: 'gl_InstanceID' : undeclared identifier -ERROR: 0:59: '=' : cannot convert from ' temp float' to ' temp int' +ERROR: 0:59: 'gl_InstanceID' : required extension not requested: GL_EXT_draw_instanced ERROR: 0:61: 'texelFetch' : no matching overloaded function found ERROR: 0:61: 'assign' : cannot convert from ' const float' to ' temp int' -ERROR: 4 compilation errors. No code generated. +ERROR: 3 compilation errors. No code generated. Shader version: 130 @@ -120,7 +119,11 @@ ERROR: node is still EOpNull! 0:46 0.300000 0:57 Function Definition: foo88( ( global void) 0:57 Function Parameters: -0:? Sequence +0:59 Sequence +0:59 Sequence +0:59 move second child to first child ( temp int) +0:59 'id' ( temp int) +0:59 'gl_InstanceID' ( gl_InstanceId int InstanceId) 0:61 'id' ( temp int) 0:63 'gl_ClipVertex' ( gl_ClipVertex 4-component vector of float ClipVertex) 0:64 'gl_Color' ( in 4-component vector of float Color) diff --git a/Test/baseResults/300layout.vert.out b/Test/baseResults/300layout.vert.out index 527425b3..e1ec4524 100755 --- a/Test/baseResults/300layout.vert.out +++ b/Test/baseResults/300layout.vert.out @@ -1,6 +1,6 @@ 300layout.vert ERROR: 0:7: 'vertex input arrays' : not supported with this profile: es -ERROR: 0:8: 'in' : cannot be a structure or array +ERROR: 0:8: 'in' : cannot be a structure ERROR: 0:8: 's' : A structure containing an array is not allowed as input in ES ERROR: 0:8: 'vertex input arrays' : not supported with this profile: es ERROR: 0:8: 'location' : overlapping use of location 10 diff --git a/Test/baseResults/400.frag.out b/Test/baseResults/400.frag.out index db3cd243..a148ae5f 100755 --- a/Test/baseResults/400.frag.out +++ b/Test/baseResults/400.frag.out @@ -1,510 +1,554 @@ 400.frag -ERROR: 0:18: 'textureGatherOffsets(...)' : must be a compile-time constant: offsets argument -ERROR: 0:22: 'textureGatherOffset(...)' : must be a compile-time constant: component argument -ERROR: 0:23: 'textureGatherOffset(...)' : must be 0, 1, 2, or 3: component argument -ERROR: 0:30: 'location qualifier on input' : not supported for this version or the enabled extensions -ERROR: 0:38: 'location qualifier on uniform or buffer' : not supported for this version or the enabled extensions -ERROR: 0:40: 'gl_Color' : identifiers starting with "gl_" are reserved -ERROR: 0:41: 'redeclaration' : cannot change qualification of gl_ClipDistance -ERROR: 0:43: 'gl_FragCoord' : cannot redeclare after use -ERROR: 0:51: 'texel offset' : argument must be compile-time constant -ERROR: 0:53: 'texel offset' : value is out of range: [gl_MinProgramTexelOffset, gl_MaxProgramTexelOffset] -ERROR: 0:53: 'texel offset' : value is out of range: [gl_MinProgramTexelOffset, gl_MaxProgramTexelOffset] -ERROR: 0:54: 'texel offset' : value is out of range: [gl_MinProgramTexelOffset, gl_MaxProgramTexelOffset] -ERROR: 0:54: 'texel offset' : value is out of range: [gl_MinProgramTexelOffset, gl_MaxProgramTexelOffset] -ERROR: 0:57: 'patch' : not supported in this stage: fragment -ERROR: 0:58: 'patch' : not supported in this stage: fragment -ERROR: 0:58: 'centroid/sample/patch' : can't use auxiliary qualifier on a fragment output -ERROR: 0:73: 'dFdxFine' : required extension not requested: GL_ARB_derivative_control -ERROR: 0:74: 'dFdyCoarse' : required extension not requested: GL_ARB_derivative_control -ERROR: 0:75: 'fwidthCoarse' : required extension not requested: GL_ARB_derivative_control -ERROR: 0:75: 'fwidthFine' : required extension not requested: GL_ARB_derivative_control -ERROR: 0:104: 'centroid/sample/patch' : can't use auxiliary qualifier on a fragment output -ERROR: 0:123: 'interpolateAtCentroid' : no matching overloaded function found -ERROR: 0:125: 'interpolateAtCentroid' : first argument must be an interpolant, or interpolant-array element -ERROR: 0:127: 'interpolateAtSample' : no matching overloaded function found -ERROR: 0:132: 'interpolateAtOffset' : no matching overloaded function found -ERROR: 0:134: 'interpolateAtOffset' : first argument must be an interpolant, or interpolant-array element -ERROR: 0:135: 'interpolateAtOffset' : first argument must be an interpolant, or interpolant-array element -ERROR: 0:136: 'interpolateAtOffset' : first argument must be an interpolant, or interpolant-array element -ERROR: 0:139: 'interpolateAtCentroid' : first argument must be an interpolant, or interpolant-array element -ERROR: 0:140: 'interpolateAtSample' : first argument must be an interpolant, or interpolant-array element -ERROR: 0:183: 'textureQueryLod' : no matching overloaded function found -ERROR: 0:183: 'assign' : cannot convert from ' const float' to ' temp 2-component vector of float' -ERROR: 0:184: 'textureQueryLod' : no matching overloaded function found -ERROR: 0:184: 'assign' : cannot convert from ' const float' to ' temp 2-component vector of float' -ERROR: 0:197: 'subroutine' : feature not yet implemented -ERROR: 0:197: '' : default qualifier requires 'uniform', 'buffer', 'in', 'out' or 'shared' storage qualification -ERROR: 0:198: 'subroutine' : feature not yet implemented -ERROR: 0:199: 'subroutine' : feature not yet implemented -ERROR: 0:201: '' : syntax error, unexpected PRECISE, expecting IDENTIFIER +ERROR: 0:51: 'textureGatherOffsets(...)' : must be a compile-time constant: offsets argument +ERROR: 0:55: 'textureGatherOffset(...)' : must be a compile-time constant: component argument +ERROR: 0:56: 'textureGatherOffset(...)' : must be 0, 1, 2, or 3: component argument +ERROR: 0:63: 'location qualifier on input' : not supported for this version or the enabled extensions +ERROR: 0:71: 'location qualifier on uniform or buffer' : not supported for this version or the enabled extensions +ERROR: 0:73: 'gl_Color' : identifiers starting with "gl_" are reserved +ERROR: 0:74: 'redeclaration' : cannot change qualification of gl_ClipDistance +ERROR: 0:76: 'gl_FragCoord' : cannot redeclare after use +ERROR: 0:84: 'texel offset' : argument must be compile-time constant +ERROR: 0:86: 'texel offset' : value is out of range: [gl_MinProgramTexelOffset, gl_MaxProgramTexelOffset] +ERROR: 0:86: 'texel offset' : value is out of range: [gl_MinProgramTexelOffset, gl_MaxProgramTexelOffset] +ERROR: 0:87: 'texel offset' : value is out of range: [gl_MinProgramTexelOffset, gl_MaxProgramTexelOffset] +ERROR: 0:87: 'texel offset' : value is out of range: [gl_MinProgramTexelOffset, gl_MaxProgramTexelOffset] +ERROR: 0:90: 'patch' : not supported in this stage: fragment +ERROR: 0:91: 'patch' : not supported in this stage: fragment +ERROR: 0:91: 'centroid/sample/patch' : can't use auxiliary qualifier on a fragment output +ERROR: 0:106: 'dFdxFine' : required extension not requested: GL_ARB_derivative_control +ERROR: 0:107: 'dFdyCoarse' : required extension not requested: GL_ARB_derivative_control +ERROR: 0:108: 'fwidthCoarse' : required extension not requested: GL_ARB_derivative_control +ERROR: 0:108: 'fwidthFine' : required extension not requested: GL_ARB_derivative_control +ERROR: 0:137: 'centroid/sample/patch' : can't use auxiliary qualifier on a fragment output +ERROR: 0:156: 'interpolateAtCentroid' : no matching overloaded function found +ERROR: 0:158: 'interpolateAtCentroid' : first argument must be an interpolant, or interpolant-array element +ERROR: 0:160: 'interpolateAtSample' : no matching overloaded function found +ERROR: 0:165: 'interpolateAtOffset' : no matching overloaded function found +ERROR: 0:167: 'interpolateAtOffset' : first argument must be an interpolant, or interpolant-array element +ERROR: 0:168: 'interpolateAtOffset' : first argument must be an interpolant, or interpolant-array element +ERROR: 0:169: 'interpolateAtOffset' : first argument must be an interpolant, or interpolant-array element +ERROR: 0:172: 'interpolateAtCentroid' : first argument must be an interpolant, or interpolant-array element +ERROR: 0:173: 'interpolateAtSample' : first argument must be an interpolant, or interpolant-array element +ERROR: 0:216: 'textureQueryLod' : no matching overloaded function found +ERROR: 0:216: 'assign' : cannot convert from ' const float' to ' temp 2-component vector of float' +ERROR: 0:217: 'textureQueryLod' : no matching overloaded function found +ERROR: 0:217: 'assign' : cannot convert from ' const float' to ' temp 2-component vector of float' +ERROR: 0:230: 'subroutine' : feature not yet implemented +ERROR: 0:230: '' : default qualifier requires 'uniform', 'buffer', 'in', 'out' or 'shared' storage qualification +ERROR: 0:231: 'subroutine' : feature not yet implemented +ERROR: 0:232: 'subroutine' : feature not yet implemented +ERROR: 0:234: '' : syntax error, unexpected PRECISE, expecting IDENTIFIER ERROR: 39 compilation errors. No code generated. Shader version: 400 Requested GL_ARB_derivative_control Requested GL_ARB_separate_shader_objects +Requested GL_ARB_shader_storage_buffer_object gl_FragCoord pixel center is integer gl_FragCoord origin is upper left ERROR: node is still EOpNull! -0:10 Function Definition: main( ( global void) -0:10 Function Parameters: -0:? Sequence -0:13 move second child to first child ( temp 4-component vector of float) -0:13 'v' ( temp 4-component vector of float) -0:13 texture ( global 4-component vector of float) -0:13 indirect index ( temp sampler2D) -0:13 'arrayedSampler' ( uniform 5-element array of sampler2D) -0:13 'i' ( flat in int) -0:13 'c2D' ( smooth in 2-component vector of float) -0:14 move second child to first child ( temp float) -0:14 direct index ( temp float) -0:14 'outp' ( out 4-component vector of float) -0:14 Constant: -0:14 0 (const int) -0:14 direct index ( smooth temp float ClipDistance) -0:14 'gl_ClipDistance' ( smooth in 4-element array of float ClipDistance) -0:14 Constant: -0:14 1 (const int) -0:18 Sequence -0:18 move second child to first child ( temp 4-component vector of uint) -0:18 'uv4' ( temp 4-component vector of uint) -0:18 textureGatherOffsets ( global 4-component vector of uint) -0:18 'samp2dr' ( uniform usampler2DRect) -0:18 'c2D' ( smooth in 2-component vector of float) -0:18 'offsets' ( temp 4-element array of 2-component vector of int) -0:18 Constant: -0:18 2 (const int) -0:19 move second child to first child ( temp 4-component vector of uint) -0:19 'uv4' ( temp 4-component vector of uint) -0:19 textureGatherOffsets ( global 4-component vector of uint) -0:19 'samp2dr' ( uniform usampler2DRect) -0:19 'c2D' ( smooth in 2-component vector of float) -0:19 Constant: -0:19 1 (const int) -0:19 2 (const int) -0:19 3 (const int) -0:19 4 (const int) -0:19 15 (const int) -0:19 16 (const int) -0:19 -2 (const int) -0:19 0 (const int) -0:19 Constant: -0:19 2 (const int) +0:18 Function Definition: atomicOpPass( ( global void) +0:18 Function Parameters: +0:20 Sequence 0:20 Sequence -0:20 move second child to first child ( temp 4-component vector of float) -0:20 'v4' ( temp 4-component vector of float) -0:20 textureGather ( global 4-component vector of float) -0:20 direct index ( temp sampler2D) -0:20 'arrayedSampler' ( uniform 5-element array of sampler2D) +0:20 move second child to first child ( temp int) +0:20 'origi' ( temp int) +0:20 AtomicAdd ( global int) +0:20 atomi: direct index for structure (layout( column_major shared) buffer int) +0:20 'anon@0' (layout( column_major shared) buffer block{layout( column_major shared) buffer int atomi, layout( column_major shared) buffer uint atomu}) 0:20 Constant: -0:20 0 (const int) -0:20 'c2D' ( smooth in 2-component vector of float) +0:20 0 (const uint) +0:20 Constant: +0:20 3 (const int) 0:21 Sequence -0:21 move second child to first child ( temp 4-component vector of int) -0:21 'iv4' ( temp 4-component vector of int) -0:21 textureGatherOffset ( global 4-component vector of int) -0:21 'isamp2DA' ( uniform isampler2DArray) +0:21 move second child to first child ( temp uint) +0:21 'origu' ( temp uint) +0:21 AtomicAnd ( global uint) +0:21 atomu: direct index for structure (layout( column_major shared) buffer uint) +0:21 'anon@0' (layout( column_major shared) buffer block{layout( column_major shared) buffer int atomi, layout( column_major shared) buffer uint atomu}) +0:21 Constant: +0:21 1 (const uint) 0:21 Constant: -0:21 0.100000 -0:21 0.100000 -0:21 0.100000 -0:21 Constant: -0:21 1 (const int) -0:21 1 (const int) -0:21 Constant: -0:21 3 (const int) -0:22 move second child to first child ( temp 4-component vector of int) -0:22 'iv4' ( temp 4-component vector of int) -0:22 textureGatherOffset ( global 4-component vector of int) -0:22 'isamp2DA' ( uniform isampler2DArray) +0:21 7 (const uint) +0:22 move second child to first child ( temp int) +0:22 'origi' ( temp int) +0:22 AtomicExchange ( global int) +0:22 atomi: direct index for structure (layout( column_major shared) buffer int) +0:22 'anon@0' (layout( column_major shared) buffer block{layout( column_major shared) buffer int atomi, layout( column_major shared) buffer uint atomu}) +0:22 Constant: +0:22 0 (const uint) 0:22 Constant: -0:22 0.100000 -0:22 0.100000 -0:22 0.100000 -0:22 Constant: -0:22 1 (const int) -0:22 1 (const int) -0:22 'i' ( flat in int) -0:23 move second child to first child ( temp 4-component vector of int) -0:23 'iv4' ( temp 4-component vector of int) -0:23 textureGatherOffset ( global 4-component vector of int) -0:23 'isamp2DA' ( uniform isampler2DArray) +0:22 4 (const int) +0:23 move second child to first child ( temp uint) +0:23 'origu' ( temp uint) +0:23 AtomicCompSwap ( global uint) +0:23 atomu: direct index for structure (layout( column_major shared) buffer uint) +0:23 'anon@0' (layout( column_major shared) buffer block{layout( column_major shared) buffer int atomi, layout( column_major shared) buffer uint atomu}) +0:23 Constant: +0:23 1 (const uint) 0:23 Constant: -0:23 0.100000 -0:23 0.100000 -0:23 0.100000 +0:23 10 (const uint) 0:23 Constant: -0:23 1 (const int) -0:23 1 (const int) -0:23 Constant: -0:23 4 (const int) -0:24 move second child to first child ( temp 4-component vector of int) -0:24 'iv4' ( temp 4-component vector of int) -0:24 textureGatherOffset ( global 4-component vector of int) -0:24 'isamp2DA' ( uniform isampler2DArray) -0:24 Constant: -0:24 0.100000 -0:24 0.100000 -0:24 0.100000 -0:24 Constant: -0:24 1 (const int) -0:24 1 (const int) -0:24 Constant: -0:24 3 (const int) -0:25 move second child to first child ( temp 4-component vector of int) -0:25 'iv4' ( temp 4-component vector of int) -0:25 textureGatherOffset ( global 4-component vector of int) -0:25 'isamp2DA' ( uniform isampler2DArray) -0:25 Constant: -0:25 0.100000 -0:25 0.100000 -0:25 0.100000 -0:25 Construct ivec2 ( temp 2-component vector of int) -0:25 'i' ( flat in int) -0:27 Sequence -0:27 move second child to first child ( temp 4-component vector of float) -0:27 'c' ( temp 4-component vector of float) -0:27 'gl_FragCoord' ( gl_FragCoord 4-component vector of float FragCoord) -0:47 Function Definition: foo23( ( global void) -0:47 Function Parameters: +0:23 8 (const uint) +0:43 Function Definition: main( ( global void) +0:43 Function Parameters: 0:? Sequence -0:51 textureProjGradOffset ( global float) -0:51 'u2drs' ( uniform sampler2DRectShadow) -0:51 'outp' ( out 4-component vector of float) -0:51 Constant: -0:51 0.000000 -0:51 0.000000 -0:51 Constant: -0:51 0.000000 -0:51 0.000000 -0:51 Convert float to int ( temp 2-component vector of int) -0:51 'c2D' ( smooth in 2-component vector of float) -0:52 textureProjGradOffset ( global float) -0:52 'u2drs' ( uniform sampler2DRectShadow) -0:52 'outp' ( out 4-component vector of float) -0:52 Constant: -0:52 0.000000 -0:52 0.000000 -0:52 Constant: -0:52 0.000000 -0:52 0.000000 -0:52 Constant: -0:52 3 (const int) -0:52 4 (const int) -0:53 textureProjGradOffset ( global float) -0:53 'u2drs' ( uniform sampler2DRectShadow) -0:53 'outp' ( out 4-component vector of float) -0:53 Constant: -0:53 0.000000 -0:53 0.000000 -0:53 Constant: -0:53 0.000000 -0:53 0.000000 -0:53 Constant: -0:53 15 (const int) -0:53 16 (const int) -0:54 textureProjGradOffset ( global float) -0:54 'u2drs' ( uniform sampler2DRectShadow) -0:54 'outp' ( out 4-component vector of float) -0:54 Constant: -0:54 0.000000 -0:54 0.000000 -0:54 Constant: -0:54 0.000000 -0:54 0.000000 -0:54 Constant: -0:54 -10 (const int) -0:54 20 (const int) -0:60 Function Definition: foo24( ( global void) -0:60 Function Parameters: -0:? Sequence -0:63 move second child to first child ( temp 3-component vector of double) -0:63 'df' ( temp 3-component vector of double) -0:63 modf ( global 3-component vector of double) -0:63 Convert float to double ( temp 3-component vector of double) -0:63 vector swizzle ( temp 3-component vector of float) -0:63 'outp' ( out 4-component vector of float) -0:63 Sequence -0:63 Constant: -0:63 0 (const int) -0:63 Constant: -0:63 1 (const int) -0:63 Constant: -0:63 2 (const int) -0:63 'di' ( temp 3-component vector of double) -0:71 Function Definition: foodc1( ( global void) -0:71 Function Parameters: -0:73 Sequence -0:73 Sequence -0:73 move second child to first child ( temp 2-component vector of float) -0:73 'v2' ( temp 2-component vector of float) -0:73 dPdxFine ( global 2-component vector of float) -0:73 'in2' ( smooth in 2-component vector of float) -0:74 Sequence -0:74 move second child to first child ( temp 3-component vector of float) -0:74 'v3' ( temp 3-component vector of float) -0:74 dPdyCoarse ( global 3-component vector of float) -0:74 'in3' ( smooth in 3-component vector of float) -0:75 Sequence -0:75 move second child to first child ( temp 4-component vector of float) -0:75 'v4' ( temp 4-component vector of float) -0:75 add ( temp 4-component vector of float) -0:75 fwidthCoarse ( global 4-component vector of float) -0:75 'in4' ( smooth in 4-component vector of float) -0:75 fwidthFine ( global 4-component vector of float) -0:75 'in4' ( smooth in 4-component vector of float) -0:80 Function Definition: foodc2( ( global void) +0:46 move second child to first child ( temp 4-component vector of float) +0:46 'v' ( temp 4-component vector of float) +0:46 texture ( global 4-component vector of float) +0:46 indirect index ( temp sampler2D) +0:46 'arrayedSampler' ( uniform 5-element array of sampler2D) +0:46 'i' ( flat in int) +0:46 'c2D' ( smooth in 2-component vector of float) +0:47 move second child to first child ( temp float) +0:47 direct index ( temp float) +0:47 'outp' ( out 4-component vector of float) +0:47 Constant: +0:47 0 (const int) +0:47 direct index ( smooth temp float ClipDistance) +0:47 'gl_ClipDistance' ( smooth in 4-element array of float ClipDistance) +0:47 Constant: +0:47 1 (const int) +0:51 Sequence +0:51 move second child to first child ( temp 4-component vector of uint) +0:51 'uv4' ( temp 4-component vector of uint) +0:51 textureGatherOffsets ( global 4-component vector of uint) +0:51 'samp2dr' ( uniform usampler2DRect) +0:51 'c2D' ( smooth in 2-component vector of float) +0:51 'offsets' ( temp 4-element array of 2-component vector of int) +0:51 Constant: +0:51 2 (const int) +0:52 move second child to first child ( temp 4-component vector of uint) +0:52 'uv4' ( temp 4-component vector of uint) +0:52 textureGatherOffsets ( global 4-component vector of uint) +0:52 'samp2dr' ( uniform usampler2DRect) +0:52 'c2D' ( smooth in 2-component vector of float) +0:52 Constant: +0:52 1 (const int) +0:52 2 (const int) +0:52 3 (const int) +0:52 4 (const int) +0:52 15 (const int) +0:52 16 (const int) +0:52 -2 (const int) +0:52 0 (const int) +0:52 Constant: +0:52 2 (const int) +0:53 Sequence +0:53 move second child to first child ( temp 4-component vector of float) +0:53 'v4' ( temp 4-component vector of float) +0:53 textureGather ( global 4-component vector of float) +0:53 direct index ( temp sampler2D) +0:53 'arrayedSampler' ( uniform 5-element array of sampler2D) +0:53 Constant: +0:53 0 (const int) +0:53 'c2D' ( smooth in 2-component vector of float) +0:54 Sequence +0:54 move second child to first child ( temp 4-component vector of int) +0:54 'iv4' ( temp 4-component vector of int) +0:54 textureGatherOffset ( global 4-component vector of int) +0:54 'isamp2DA' ( uniform isampler2DArray) +0:54 Constant: +0:54 0.100000 +0:54 0.100000 +0:54 0.100000 +0:54 Constant: +0:54 1 (const int) +0:54 1 (const int) +0:54 Constant: +0:54 3 (const int) +0:55 move second child to first child ( temp 4-component vector of int) +0:55 'iv4' ( temp 4-component vector of int) +0:55 textureGatherOffset ( global 4-component vector of int) +0:55 'isamp2DA' ( uniform isampler2DArray) +0:55 Constant: +0:55 0.100000 +0:55 0.100000 +0:55 0.100000 +0:55 Constant: +0:55 1 (const int) +0:55 1 (const int) +0:55 'i' ( flat in int) +0:56 move second child to first child ( temp 4-component vector of int) +0:56 'iv4' ( temp 4-component vector of int) +0:56 textureGatherOffset ( global 4-component vector of int) +0:56 'isamp2DA' ( uniform isampler2DArray) +0:56 Constant: +0:56 0.100000 +0:56 0.100000 +0:56 0.100000 +0:56 Constant: +0:56 1 (const int) +0:56 1 (const int) +0:56 Constant: +0:56 4 (const int) +0:57 move second child to first child ( temp 4-component vector of int) +0:57 'iv4' ( temp 4-component vector of int) +0:57 textureGatherOffset ( global 4-component vector of int) +0:57 'isamp2DA' ( uniform isampler2DArray) +0:57 Constant: +0:57 0.100000 +0:57 0.100000 +0:57 0.100000 +0:57 Constant: +0:57 1 (const int) +0:57 1 (const int) +0:57 Constant: +0:57 3 (const int) +0:58 move second child to first child ( temp 4-component vector of int) +0:58 'iv4' ( temp 4-component vector of int) +0:58 textureGatherOffset ( global 4-component vector of int) +0:58 'isamp2DA' ( uniform isampler2DArray) +0:58 Constant: +0:58 0.100000 +0:58 0.100000 +0:58 0.100000 +0:58 Construct ivec2 ( temp 2-component vector of int) +0:58 'i' ( flat in int) +0:60 Sequence +0:60 move second child to first child ( temp 4-component vector of float) +0:60 'c' ( temp 4-component vector of float) +0:60 'gl_FragCoord' ( gl_FragCoord 4-component vector of float FragCoord) +0:80 Function Definition: foo23( ( global void) 0:80 Function Parameters: -0:82 Sequence -0:82 Sequence -0:82 move second child to first child ( temp 2-component vector of float) -0:82 'v2' ( temp 2-component vector of float) -0:82 dPdxFine ( global 2-component vector of float) -0:82 'in2' ( smooth in 2-component vector of float) -0:83 Sequence -0:83 move second child to first child ( temp 3-component vector of float) -0:83 'v3' ( temp 3-component vector of float) -0:83 dPdyCoarse ( global 3-component vector of float) -0:83 'in3' ( smooth in 3-component vector of float) -0:84 Sequence -0:84 move second child to first child ( temp 4-component vector of float) -0:84 'v4' ( temp 4-component vector of float) -0:84 add ( temp 4-component vector of float) -0:84 fwidthCoarse ( global 4-component vector of float) -0:84 'in4' ( smooth in 4-component vector of float) -0:84 fwidthFine ( global 4-component vector of float) -0:84 'in4' ( smooth in 4-component vector of float) -0:89 move second child to first child ( temp 2-component vector of float) -0:89 'v2' ( temp 2-component vector of float) -0:89 frexp ( global 2-component vector of float) -0:89 'v2' ( temp 2-component vector of float) -0:89 'i2' ( temp 2-component vector of int) -0:90 move second child to first child ( temp 3-component vector of float) -0:90 'v3' ( temp 3-component vector of float) -0:90 ldexp ( global 3-component vector of float) -0:90 'v3' ( temp 3-component vector of float) -0:90 'i3' ( temp 3-component vector of int) -0:92 move second child to first child ( temp uint) -0:92 'u1' ( temp uint) -0:92 PackUnorm4x8 ( global uint) -0:92 'v4' ( temp 4-component vector of float) -0:93 move second child to first child ( temp uint) -0:93 'u1' ( temp uint) -0:93 PackSnorm4x8 ( global uint) -0:93 'v4' ( temp 4-component vector of float) -0:94 move second child to first child ( temp 4-component vector of float) -0:94 'v4' ( temp 4-component vector of float) -0:94 UnpackUnorm4x8 ( global 4-component vector of float) -0:94 'u1' ( temp uint) -0:95 move second child to first child ( temp 4-component vector of float) -0:95 'v4' ( temp 4-component vector of float) -0:95 UnpackSnorm4x8 ( global 4-component vector of float) -0:95 'u1' ( temp uint) -0:99 move second child to first child ( temp double) -0:99 'd' ( temp double) -0:99 PackDouble2x32 ( global double) -0:99 'u2' ( temp 2-component vector of uint) -0:100 move second child to first child ( temp 2-component vector of uint) -0:100 'u2' ( temp 2-component vector of uint) -0:100 UnpackDouble2x32 ( global 2-component vector of uint) -0:100 'd' ( temp double) -0:117 Function Definition: interp( ( global void) -0:117 Function Parameters: -0:119 Sequence -0:119 interpolateAtCentroid ( global 2-component vector of float) -0:119 'colorfc' ( centroid flat in 2-component vector of float) -0:120 interpolateAtCentroid ( global 4-component vector of float) -0:120 'colorSampIn' ( smooth sample in 4-component vector of float) -0:121 interpolateAtCentroid ( global 4-component vector of float) -0:121 'colorfsi' ( noperspective in 4-component vector of float) -0:122 interpolateAtCentroid ( global float) -0:122 'scalarIn' ( smooth in float) -0:123 Constant: -0:123 0.000000 -0:124 interpolateAtCentroid ( global 3-component vector of float) -0:124 direct index ( smooth sample temp 3-component vector of float) -0:124 'sampInArray' ( smooth sample in 4-element array of 3-component vector of float) -0:124 Constant: -0:124 2 (const int) -0:125 interpolateAtCentroid ( global 2-component vector of float) -0:125 vector swizzle ( temp 2-component vector of float) -0:125 direct index ( smooth sample temp 3-component vector of float) -0:125 'sampInArray' ( smooth sample in 4-element array of 3-component vector of float) -0:125 Constant: -0:125 2 (const int) -0:125 Sequence -0:125 Constant: -0:125 0 (const int) -0:125 Constant: -0:125 1 (const int) -0:127 Constant: -0:127 0.000000 -0:128 interpolateAtSample ( global 3-component vector of float) -0:128 indirect index ( smooth sample temp 3-component vector of float) -0:128 'sampInArray' ( smooth sample in 4-element array of 3-component vector of float) -0:128 'i' ( flat in int) -0:128 Constant: -0:128 0 (const int) -0:129 interpolateAtSample ( global float) -0:129 x: direct index for structure ( global float) -0:129 's1' ( smooth in structure{ global float x}) -0:129 Constant: -0:129 0 (const int) -0:129 Constant: -0:129 2 (const int) -0:130 interpolateAtSample ( global float) -0:130 'scalarIn' ( smooth in float) -0:130 Constant: -0:130 1 (const int) -0:132 Constant: -0:132 0.000000 -0:133 interpolateAtOffset ( global 3-component vector of float) -0:133 direct index ( smooth sample temp 3-component vector of float) -0:133 'sampInArray' ( smooth sample in 4-element array of 3-component vector of float) -0:133 Constant: -0:133 2 (const int) -0:133 Constant: -0:133 0.200000 -0:133 0.200000 -0:134 interpolateAtOffset ( global 2-component vector of float) -0:134 vector swizzle ( temp 2-component vector of float) -0:134 direct index ( smooth sample temp 3-component vector of float) -0:134 'sampInArray' ( smooth sample in 4-element array of 3-component vector of float) -0:134 Constant: -0:134 2 (const int) -0:134 Sequence -0:134 Constant: -0:134 0 (const int) -0:134 Constant: -0:134 1 (const int) -0:134 Constant: -0:134 0.200000 -0:134 0.200000 -0:135 interpolateAtOffset ( global float) -0:135 add ( temp float) -0:135 'scalarIn' ( smooth in float) -0:135 'scalarIn' ( smooth in float) -0:135 Constant: -0:135 0.200000 -0:135 0.200000 -0:136 interpolateAtOffset ( global float) -0:136 x: direct index for structure ( global float) -0:136 's2' ( sample temp structure{ global float x}) -0:136 Constant: -0:136 0 (const int) -0:136 Constant: -0:136 0.200000 -0:136 0.200000 -0:139 interpolateAtCentroid ( global float) -0:139 'f' ( temp float) -0:140 interpolateAtSample ( global 4-component vector of float) -0:140 'outp' ( out 4-component vector of float) -0:140 Constant: -0:140 0 (const int) -0:161 Function Definition: qlod( ( global void) -0:161 Function Parameters: 0:? Sequence -0:168 move second child to first child ( temp 2-component vector of float) -0:168 'lod' ( temp 2-component vector of float) -0:168 textureQueryLod ( global 2-component vector of float) -0:168 'samp1D' ( uniform sampler1D) -0:168 'pf' ( temp float) -0:169 move second child to first child ( temp 2-component vector of float) -0:169 'lod' ( temp 2-component vector of float) -0:169 textureQueryLod ( global 2-component vector of float) -0:169 'isamp2D' ( uniform isampler2D) -0:169 'pf2' ( temp 2-component vector of float) -0:170 move second child to first child ( temp 2-component vector of float) -0:170 'lod' ( temp 2-component vector of float) -0:170 textureQueryLod ( global 2-component vector of float) -0:170 'usamp3D' ( uniform usampler3D) -0:170 'pf3' ( temp 3-component vector of float) -0:171 move second child to first child ( temp 2-component vector of float) -0:171 'lod' ( temp 2-component vector of float) -0:171 textureQueryLod ( global 2-component vector of float) -0:171 'sampCube' ( uniform samplerCube) -0:171 'pf3' ( temp 3-component vector of float) -0:172 move second child to first child ( temp 2-component vector of float) -0:172 'lod' ( temp 2-component vector of float) -0:172 textureQueryLod ( global 2-component vector of float) -0:172 'isamp1DA' ( uniform isampler1DArray) -0:172 'pf' ( temp float) -0:173 move second child to first child ( temp 2-component vector of float) -0:173 'lod' ( temp 2-component vector of float) -0:173 textureQueryLod ( global 2-component vector of float) -0:173 'usamp2DA' ( uniform usampler2DArray) -0:173 'pf2' ( temp 2-component vector of float) -0:174 move second child to first child ( temp 2-component vector of float) -0:174 'lod' ( temp 2-component vector of float) -0:174 textureQueryLod ( global 2-component vector of float) -0:174 'isampCubeA' ( uniform isamplerCubeArray) -0:174 'pf3' ( temp 3-component vector of float) -0:176 move second child to first child ( temp 2-component vector of float) -0:176 'lod' ( temp 2-component vector of float) -0:176 textureQueryLod ( global 2-component vector of float) -0:176 'samp1Ds' ( uniform sampler1DShadow) -0:176 'pf' ( temp float) -0:177 move second child to first child ( temp 2-component vector of float) -0:177 'lod' ( temp 2-component vector of float) -0:177 textureQueryLod ( global 2-component vector of float) -0:177 'samp2Ds' ( uniform sampler2DShadow) -0:177 'pf2' ( temp 2-component vector of float) -0:178 move second child to first child ( temp 2-component vector of float) -0:178 'lod' ( temp 2-component vector of float) -0:178 textureQueryLod ( global 2-component vector of float) -0:178 'sampCubes' ( uniform samplerCubeShadow) -0:178 'pf3' ( temp 3-component vector of float) -0:179 move second child to first child ( temp 2-component vector of float) -0:179 'lod' ( temp 2-component vector of float) -0:179 textureQueryLod ( global 2-component vector of float) -0:179 'samp1DAs' ( uniform sampler1DArrayShadow) -0:179 'pf' ( temp float) -0:180 move second child to first child ( temp 2-component vector of float) -0:180 'lod' ( temp 2-component vector of float) -0:180 textureQueryLod ( global 2-component vector of float) -0:180 'samp2DAs' ( uniform sampler2DArrayShadow) -0:180 'pf2' ( temp 2-component vector of float) -0:181 move second child to first child ( temp 2-component vector of float) -0:181 'lod' ( temp 2-component vector of float) -0:181 textureQueryLod ( global 2-component vector of float) -0:181 'sampCubeAs' ( uniform samplerCubeArrayShadow) -0:181 'pf3' ( temp 3-component vector of float) -0:183 'lod' ( temp 2-component vector of float) -0:184 'lod' ( temp 2-component vector of float) -0:190 Function Definition: bitwiseConv( ( global void) -0:190 Function Parameters: -0:192 Sequence -0:192 move second child to first child ( temp uint) -0:192 'iout' ( out uint) -0:192 bitwise and ( temp uint) -0:192 'uu' ( uniform uint) -0:192 Convert int to uint ( temp uint) -0:192 'i' ( flat in int) -0:193 add second child into first child ( temp uint) -0:193 'iout' ( out uint) -0:193 exclusive-or ( temp uint) -0:193 'uu' ( uniform uint) -0:193 Convert int to uint ( temp uint) -0:193 'i' ( flat in int) -0:194 add second child into first child ( temp uint) -0:194 'iout' ( out uint) -0:194 inclusive-or ( temp uint) -0:194 Convert int to uint ( temp uint) -0:194 'i' ( flat in int) -0:194 'uu' ( uniform uint) -0:198 Function Definition: subT1( ( temp float) -0:198 Function Parameters: -0:198 Sequence -0:198 Branch: Return with expression -0:198 Constant: -0:198 1.000000 -0:199 Function Definition: subT2( ( temp float) -0:199 Function Parameters: -0:199 Sequence -0:199 Branch: Return with expression -0:199 Constant: -0:199 1.000000 +0:84 textureProjGradOffset ( global float) +0:84 'u2drs' ( uniform sampler2DRectShadow) +0:84 'outp' ( out 4-component vector of float) +0:84 Constant: +0:84 0.000000 +0:84 0.000000 +0:84 Constant: +0:84 0.000000 +0:84 0.000000 +0:84 Convert float to int ( temp 2-component vector of int) +0:84 'c2D' ( smooth in 2-component vector of float) +0:85 textureProjGradOffset ( global float) +0:85 'u2drs' ( uniform sampler2DRectShadow) +0:85 'outp' ( out 4-component vector of float) +0:85 Constant: +0:85 0.000000 +0:85 0.000000 +0:85 Constant: +0:85 0.000000 +0:85 0.000000 +0:85 Constant: +0:85 3 (const int) +0:85 4 (const int) +0:86 textureProjGradOffset ( global float) +0:86 'u2drs' ( uniform sampler2DRectShadow) +0:86 'outp' ( out 4-component vector of float) +0:86 Constant: +0:86 0.000000 +0:86 0.000000 +0:86 Constant: +0:86 0.000000 +0:86 0.000000 +0:86 Constant: +0:86 15 (const int) +0:86 16 (const int) +0:87 textureProjGradOffset ( global float) +0:87 'u2drs' ( uniform sampler2DRectShadow) +0:87 'outp' ( out 4-component vector of float) +0:87 Constant: +0:87 0.000000 +0:87 0.000000 +0:87 Constant: +0:87 0.000000 +0:87 0.000000 +0:87 Constant: +0:87 -10 (const int) +0:87 20 (const int) +0:93 Function Definition: foo24( ( global void) +0:93 Function Parameters: +0:? Sequence +0:96 move second child to first child ( temp 3-component vector of double) +0:96 'df' ( temp 3-component vector of double) +0:96 modf ( global 3-component vector of double) +0:96 Convert float to double ( temp 3-component vector of double) +0:96 vector swizzle ( temp 3-component vector of float) +0:96 'outp' ( out 4-component vector of float) +0:96 Sequence +0:96 Constant: +0:96 0 (const int) +0:96 Constant: +0:96 1 (const int) +0:96 Constant: +0:96 2 (const int) +0:96 'di' ( temp 3-component vector of double) +0:104 Function Definition: foodc1( ( global void) +0:104 Function Parameters: +0:106 Sequence +0:106 Sequence +0:106 move second child to first child ( temp 2-component vector of float) +0:106 'v2' ( temp 2-component vector of float) +0:106 dPdxFine ( global 2-component vector of float) +0:106 'in2' ( smooth in 2-component vector of float) +0:107 Sequence +0:107 move second child to first child ( temp 3-component vector of float) +0:107 'v3' ( temp 3-component vector of float) +0:107 dPdyCoarse ( global 3-component vector of float) +0:107 'in3' ( smooth in 3-component vector of float) +0:108 Sequence +0:108 move second child to first child ( temp 4-component vector of float) +0:108 'v4' ( temp 4-component vector of float) +0:108 add ( temp 4-component vector of float) +0:108 fwidthCoarse ( global 4-component vector of float) +0:108 'in4' ( smooth in 4-component vector of float) +0:108 fwidthFine ( global 4-component vector of float) +0:108 'in4' ( smooth in 4-component vector of float) +0:113 Function Definition: foodc2( ( global void) +0:113 Function Parameters: +0:115 Sequence +0:115 Sequence +0:115 move second child to first child ( temp 2-component vector of float) +0:115 'v2' ( temp 2-component vector of float) +0:115 dPdxFine ( global 2-component vector of float) +0:115 'in2' ( smooth in 2-component vector of float) +0:116 Sequence +0:116 move second child to first child ( temp 3-component vector of float) +0:116 'v3' ( temp 3-component vector of float) +0:116 dPdyCoarse ( global 3-component vector of float) +0:116 'in3' ( smooth in 3-component vector of float) +0:117 Sequence +0:117 move second child to first child ( temp 4-component vector of float) +0:117 'v4' ( temp 4-component vector of float) +0:117 add ( temp 4-component vector of float) +0:117 fwidthCoarse ( global 4-component vector of float) +0:117 'in4' ( smooth in 4-component vector of float) +0:117 fwidthFine ( global 4-component vector of float) +0:117 'in4' ( smooth in 4-component vector of float) +0:122 move second child to first child ( temp 2-component vector of float) +0:122 'v2' ( temp 2-component vector of float) +0:122 frexp ( global 2-component vector of float) +0:122 'v2' ( temp 2-component vector of float) +0:122 'i2' ( temp 2-component vector of int) +0:123 move second child to first child ( temp 3-component vector of float) +0:123 'v3' ( temp 3-component vector of float) +0:123 ldexp ( global 3-component vector of float) +0:123 'v3' ( temp 3-component vector of float) +0:123 'i3' ( temp 3-component vector of int) +0:125 move second child to first child ( temp uint) +0:125 'u1' ( temp uint) +0:125 PackUnorm4x8 ( global uint) +0:125 'v4' ( temp 4-component vector of float) +0:126 move second child to first child ( temp uint) +0:126 'u1' ( temp uint) +0:126 PackSnorm4x8 ( global uint) +0:126 'v4' ( temp 4-component vector of float) +0:127 move second child to first child ( temp 4-component vector of float) +0:127 'v4' ( temp 4-component vector of float) +0:127 UnpackUnorm4x8 ( global 4-component vector of float) +0:127 'u1' ( temp uint) +0:128 move second child to first child ( temp 4-component vector of float) +0:128 'v4' ( temp 4-component vector of float) +0:128 UnpackSnorm4x8 ( global 4-component vector of float) +0:128 'u1' ( temp uint) +0:132 move second child to first child ( temp double) +0:132 'd' ( temp double) +0:132 PackDouble2x32 ( global double) +0:132 'u2' ( temp 2-component vector of uint) +0:133 move second child to first child ( temp 2-component vector of uint) +0:133 'u2' ( temp 2-component vector of uint) +0:133 UnpackDouble2x32 ( global 2-component vector of uint) +0:133 'd' ( temp double) +0:150 Function Definition: interp( ( global void) +0:150 Function Parameters: +0:152 Sequence +0:152 interpolateAtCentroid ( global 2-component vector of float) +0:152 'colorfc' ( centroid flat in 2-component vector of float) +0:153 interpolateAtCentroid ( global 4-component vector of float) +0:153 'colorSampIn' ( smooth sample in 4-component vector of float) +0:154 interpolateAtCentroid ( global 4-component vector of float) +0:154 'colorfsi' ( noperspective in 4-component vector of float) +0:155 interpolateAtCentroid ( global float) +0:155 'scalarIn' ( smooth in float) +0:156 Constant: +0:156 0.000000 +0:157 interpolateAtCentroid ( global 3-component vector of float) +0:157 direct index ( smooth sample temp 3-component vector of float) +0:157 'sampInArray' ( smooth sample in 4-element array of 3-component vector of float) +0:157 Constant: +0:157 2 (const int) +0:158 interpolateAtCentroid ( global 2-component vector of float) +0:158 vector swizzle ( temp 2-component vector of float) +0:158 direct index ( smooth sample temp 3-component vector of float) +0:158 'sampInArray' ( smooth sample in 4-element array of 3-component vector of float) +0:158 Constant: +0:158 2 (const int) +0:158 Sequence +0:158 Constant: +0:158 0 (const int) +0:158 Constant: +0:158 1 (const int) +0:160 Constant: +0:160 0.000000 +0:161 interpolateAtSample ( global 3-component vector of float) +0:161 indirect index ( smooth sample temp 3-component vector of float) +0:161 'sampInArray' ( smooth sample in 4-element array of 3-component vector of float) +0:161 'i' ( flat in int) +0:161 Constant: +0:161 0 (const int) +0:162 interpolateAtSample ( global float) +0:162 x: direct index for structure ( global float) +0:162 's1' ( smooth in structure{ global float x}) +0:162 Constant: +0:162 0 (const int) +0:162 Constant: +0:162 2 (const int) +0:163 interpolateAtSample ( global float) +0:163 'scalarIn' ( smooth in float) +0:163 Constant: +0:163 1 (const int) +0:165 Constant: +0:165 0.000000 +0:166 interpolateAtOffset ( global 3-component vector of float) +0:166 direct index ( smooth sample temp 3-component vector of float) +0:166 'sampInArray' ( smooth sample in 4-element array of 3-component vector of float) +0:166 Constant: +0:166 2 (const int) +0:166 Constant: +0:166 0.200000 +0:166 0.200000 +0:167 interpolateAtOffset ( global 2-component vector of float) +0:167 vector swizzle ( temp 2-component vector of float) +0:167 direct index ( smooth sample temp 3-component vector of float) +0:167 'sampInArray' ( smooth sample in 4-element array of 3-component vector of float) +0:167 Constant: +0:167 2 (const int) +0:167 Sequence +0:167 Constant: +0:167 0 (const int) +0:167 Constant: +0:167 1 (const int) +0:167 Constant: +0:167 0.200000 +0:167 0.200000 +0:168 interpolateAtOffset ( global float) +0:168 add ( temp float) +0:168 'scalarIn' ( smooth in float) +0:168 'scalarIn' ( smooth in float) +0:168 Constant: +0:168 0.200000 +0:168 0.200000 +0:169 interpolateAtOffset ( global float) +0:169 x: direct index for structure ( global float) +0:169 's2' ( sample temp structure{ global float x}) +0:169 Constant: +0:169 0 (const int) +0:169 Constant: +0:169 0.200000 +0:169 0.200000 +0:172 interpolateAtCentroid ( global float) +0:172 'f' ( temp float) +0:173 interpolateAtSample ( global 4-component vector of float) +0:173 'outp' ( out 4-component vector of float) +0:173 Constant: +0:173 0 (const int) +0:194 Function Definition: qlod( ( global void) +0:194 Function Parameters: +0:? Sequence +0:201 move second child to first child ( temp 2-component vector of float) +0:201 'lod' ( temp 2-component vector of float) +0:201 textureQueryLod ( global 2-component vector of float) +0:201 'samp1D' ( uniform sampler1D) +0:201 'pf' ( temp float) +0:202 move second child to first child ( temp 2-component vector of float) +0:202 'lod' ( temp 2-component vector of float) +0:202 textureQueryLod ( global 2-component vector of float) +0:202 'isamp2D' ( uniform isampler2D) +0:202 'pf2' ( temp 2-component vector of float) +0:203 move second child to first child ( temp 2-component vector of float) +0:203 'lod' ( temp 2-component vector of float) +0:203 textureQueryLod ( global 2-component vector of float) +0:203 'usamp3D' ( uniform usampler3D) +0:203 'pf3' ( temp 3-component vector of float) +0:204 move second child to first child ( temp 2-component vector of float) +0:204 'lod' ( temp 2-component vector of float) +0:204 textureQueryLod ( global 2-component vector of float) +0:204 'sampCube' ( uniform samplerCube) +0:204 'pf3' ( temp 3-component vector of float) +0:205 move second child to first child ( temp 2-component vector of float) +0:205 'lod' ( temp 2-component vector of float) +0:205 textureQueryLod ( global 2-component vector of float) +0:205 'isamp1DA' ( uniform isampler1DArray) +0:205 'pf' ( temp float) +0:206 move second child to first child ( temp 2-component vector of float) +0:206 'lod' ( temp 2-component vector of float) +0:206 textureQueryLod ( global 2-component vector of float) +0:206 'usamp2DA' ( uniform usampler2DArray) +0:206 'pf2' ( temp 2-component vector of float) +0:207 move second child to first child ( temp 2-component vector of float) +0:207 'lod' ( temp 2-component vector of float) +0:207 textureQueryLod ( global 2-component vector of float) +0:207 'isampCubeA' ( uniform isamplerCubeArray) +0:207 'pf3' ( temp 3-component vector of float) +0:209 move second child to first child ( temp 2-component vector of float) +0:209 'lod' ( temp 2-component vector of float) +0:209 textureQueryLod ( global 2-component vector of float) +0:209 'samp1Ds' ( uniform sampler1DShadow) +0:209 'pf' ( temp float) +0:210 move second child to first child ( temp 2-component vector of float) +0:210 'lod' ( temp 2-component vector of float) +0:210 textureQueryLod ( global 2-component vector of float) +0:210 'samp2Ds' ( uniform sampler2DShadow) +0:210 'pf2' ( temp 2-component vector of float) +0:211 move second child to first child ( temp 2-component vector of float) +0:211 'lod' ( temp 2-component vector of float) +0:211 textureQueryLod ( global 2-component vector of float) +0:211 'sampCubes' ( uniform samplerCubeShadow) +0:211 'pf3' ( temp 3-component vector of float) +0:212 move second child to first child ( temp 2-component vector of float) +0:212 'lod' ( temp 2-component vector of float) +0:212 textureQueryLod ( global 2-component vector of float) +0:212 'samp1DAs' ( uniform sampler1DArrayShadow) +0:212 'pf' ( temp float) +0:213 move second child to first child ( temp 2-component vector of float) +0:213 'lod' ( temp 2-component vector of float) +0:213 textureQueryLod ( global 2-component vector of float) +0:213 'samp2DAs' ( uniform sampler2DArrayShadow) +0:213 'pf2' ( temp 2-component vector of float) +0:214 move second child to first child ( temp 2-component vector of float) +0:214 'lod' ( temp 2-component vector of float) +0:214 textureQueryLod ( global 2-component vector of float) +0:214 'sampCubeAs' ( uniform samplerCubeArrayShadow) +0:214 'pf3' ( temp 3-component vector of float) +0:216 'lod' ( temp 2-component vector of float) +0:217 'lod' ( temp 2-component vector of float) +0:223 Function Definition: bitwiseConv( ( global void) +0:223 Function Parameters: +0:225 Sequence +0:225 move second child to first child ( temp uint) +0:225 'iout' ( out uint) +0:225 bitwise and ( temp uint) +0:225 'uu' ( uniform uint) +0:225 Convert int to uint ( temp uint) +0:225 'i' ( flat in int) +0:226 add second child into first child ( temp uint) +0:226 'iout' ( out uint) +0:226 exclusive-or ( temp uint) +0:226 'uu' ( uniform uint) +0:226 Convert int to uint ( temp uint) +0:226 'i' ( flat in int) +0:227 add second child into first child ( temp uint) +0:227 'iout' ( out uint) +0:227 inclusive-or ( temp uint) +0:227 Convert int to uint ( temp uint) +0:227 'i' ( flat in int) +0:227 'uu' ( uniform uint) +0:231 Function Definition: subT1( ( temp float) +0:231 Function Parameters: +0:231 Sequence +0:231 Branch: Return with expression +0:231 Constant: +0:231 1.000000 +0:232 Function Definition: subT2( ( temp float) +0:232 Function Parameters: +0:232 Sequence +0:232 Branch: Return with expression +0:232 Constant: +0:232 1.000000 0:? Linker Objects 0:? 'c2D' ( smooth in 2-component vector of float) 0:? 'i' ( flat in int) @@ -512,6 +556,9 @@ ERROR: node is still EOpNull! 0:? 'arrayedSampler' ( uniform 5-element array of sampler2D) 0:? 'samp2dr' ( uniform usampler2DRect) 0:? 'isamp2DA' ( uniform isampler2DArray) +0:? 'anon@0' (layout( column_major shared) buffer block{layout( column_major shared) buffer int atomi, layout( column_major shared) buffer uint atomu}) +0:? 'ssboStd430Arr' (layout( column_major shared) buffer 2-element array of block{layout( column_major shared) buffer int member01, layout( column_major shared) buffer 2-element array of int memberArr01, layout( column_major shared) buffer unsized 1-element array of int memberUnsizedArr01}) +0:? 'ssboSharedArr' (layout( column_major shared) buffer 2-element array of block{layout( column_major shared) buffer int member02, layout( column_major shared) buffer 2-element array of int memberArr02, layout( column_major shared) buffer unsized 1-element array of int memberUnsizedArr02}) 0:? 'gl_ClipDistance' ( smooth in 4-element array of float ClipDistance) 0:? 'vl' (layout( location=4) smooth in 4-component vector of float) 0:? 'vl2' (layout( location=6) smooth in 4-component vector of float) @@ -558,128 +605,129 @@ Linked fragment stage: Shader version: 400 Requested GL_ARB_derivative_control Requested GL_ARB_separate_shader_objects +Requested GL_ARB_shader_storage_buffer_object gl_FragCoord pixel center is integer gl_FragCoord origin is upper left ERROR: node is still EOpNull! -0:10 Function Definition: main( ( global void) -0:10 Function Parameters: +0:43 Function Definition: main( ( global void) +0:43 Function Parameters: 0:? Sequence -0:13 move second child to first child ( temp 4-component vector of float) -0:13 'v' ( temp 4-component vector of float) -0:13 texture ( global 4-component vector of float) -0:13 indirect index ( temp sampler2D) -0:13 'arrayedSampler' ( uniform 5-element array of sampler2D) -0:13 'i' ( flat in int) -0:13 'c2D' ( smooth in 2-component vector of float) -0:14 move second child to first child ( temp float) -0:14 direct index ( temp float) -0:14 'outp' ( out 4-component vector of float) -0:14 Constant: -0:14 0 (const int) -0:14 direct index ( smooth temp float ClipDistance) -0:14 'gl_ClipDistance' ( smooth in 4-element array of float ClipDistance) -0:14 Constant: -0:14 1 (const int) -0:18 Sequence -0:18 move second child to first child ( temp 4-component vector of uint) -0:18 'uv4' ( temp 4-component vector of uint) -0:18 textureGatherOffsets ( global 4-component vector of uint) -0:18 'samp2dr' ( uniform usampler2DRect) -0:18 'c2D' ( smooth in 2-component vector of float) -0:18 'offsets' ( temp 4-element array of 2-component vector of int) -0:18 Constant: -0:18 2 (const int) -0:19 move second child to first child ( temp 4-component vector of uint) -0:19 'uv4' ( temp 4-component vector of uint) -0:19 textureGatherOffsets ( global 4-component vector of uint) -0:19 'samp2dr' ( uniform usampler2DRect) -0:19 'c2D' ( smooth in 2-component vector of float) -0:19 Constant: -0:19 1 (const int) -0:19 2 (const int) -0:19 3 (const int) -0:19 4 (const int) -0:19 15 (const int) -0:19 16 (const int) -0:19 -2 (const int) -0:19 0 (const int) -0:19 Constant: -0:19 2 (const int) -0:20 Sequence -0:20 move second child to first child ( temp 4-component vector of float) -0:20 'v4' ( temp 4-component vector of float) -0:20 textureGather ( global 4-component vector of float) -0:20 direct index ( temp sampler2D) -0:20 'arrayedSampler' ( uniform 5-element array of sampler2D) -0:20 Constant: -0:20 0 (const int) -0:20 'c2D' ( smooth in 2-component vector of float) -0:21 Sequence -0:21 move second child to first child ( temp 4-component vector of int) -0:21 'iv4' ( temp 4-component vector of int) -0:21 textureGatherOffset ( global 4-component vector of int) -0:21 'isamp2DA' ( uniform isampler2DArray) -0:21 Constant: -0:21 0.100000 -0:21 0.100000 -0:21 0.100000 -0:21 Constant: -0:21 1 (const int) -0:21 1 (const int) -0:21 Constant: -0:21 3 (const int) -0:22 move second child to first child ( temp 4-component vector of int) -0:22 'iv4' ( temp 4-component vector of int) -0:22 textureGatherOffset ( global 4-component vector of int) -0:22 'isamp2DA' ( uniform isampler2DArray) -0:22 Constant: -0:22 0.100000 -0:22 0.100000 -0:22 0.100000 -0:22 Constant: -0:22 1 (const int) -0:22 1 (const int) -0:22 'i' ( flat in int) -0:23 move second child to first child ( temp 4-component vector of int) -0:23 'iv4' ( temp 4-component vector of int) -0:23 textureGatherOffset ( global 4-component vector of int) -0:23 'isamp2DA' ( uniform isampler2DArray) -0:23 Constant: -0:23 0.100000 -0:23 0.100000 -0:23 0.100000 -0:23 Constant: -0:23 1 (const int) -0:23 1 (const int) -0:23 Constant: -0:23 4 (const int) -0:24 move second child to first child ( temp 4-component vector of int) -0:24 'iv4' ( temp 4-component vector of int) -0:24 textureGatherOffset ( global 4-component vector of int) -0:24 'isamp2DA' ( uniform isampler2DArray) -0:24 Constant: -0:24 0.100000 -0:24 0.100000 -0:24 0.100000 -0:24 Constant: -0:24 1 (const int) -0:24 1 (const int) -0:24 Constant: -0:24 3 (const int) -0:25 move second child to first child ( temp 4-component vector of int) -0:25 'iv4' ( temp 4-component vector of int) -0:25 textureGatherOffset ( global 4-component vector of int) -0:25 'isamp2DA' ( uniform isampler2DArray) -0:25 Constant: -0:25 0.100000 -0:25 0.100000 -0:25 0.100000 -0:25 Construct ivec2 ( temp 2-component vector of int) -0:25 'i' ( flat in int) -0:27 Sequence -0:27 move second child to first child ( temp 4-component vector of float) -0:27 'c' ( temp 4-component vector of float) -0:27 'gl_FragCoord' ( gl_FragCoord 4-component vector of float FragCoord) +0:46 move second child to first child ( temp 4-component vector of float) +0:46 'v' ( temp 4-component vector of float) +0:46 texture ( global 4-component vector of float) +0:46 indirect index ( temp sampler2D) +0:46 'arrayedSampler' ( uniform 5-element array of sampler2D) +0:46 'i' ( flat in int) +0:46 'c2D' ( smooth in 2-component vector of float) +0:47 move second child to first child ( temp float) +0:47 direct index ( temp float) +0:47 'outp' ( out 4-component vector of float) +0:47 Constant: +0:47 0 (const int) +0:47 direct index ( smooth temp float ClipDistance) +0:47 'gl_ClipDistance' ( smooth in 4-element array of float ClipDistance) +0:47 Constant: +0:47 1 (const int) +0:51 Sequence +0:51 move second child to first child ( temp 4-component vector of uint) +0:51 'uv4' ( temp 4-component vector of uint) +0:51 textureGatherOffsets ( global 4-component vector of uint) +0:51 'samp2dr' ( uniform usampler2DRect) +0:51 'c2D' ( smooth in 2-component vector of float) +0:51 'offsets' ( temp 4-element array of 2-component vector of int) +0:51 Constant: +0:51 2 (const int) +0:52 move second child to first child ( temp 4-component vector of uint) +0:52 'uv4' ( temp 4-component vector of uint) +0:52 textureGatherOffsets ( global 4-component vector of uint) +0:52 'samp2dr' ( uniform usampler2DRect) +0:52 'c2D' ( smooth in 2-component vector of float) +0:52 Constant: +0:52 1 (const int) +0:52 2 (const int) +0:52 3 (const int) +0:52 4 (const int) +0:52 15 (const int) +0:52 16 (const int) +0:52 -2 (const int) +0:52 0 (const int) +0:52 Constant: +0:52 2 (const int) +0:53 Sequence +0:53 move second child to first child ( temp 4-component vector of float) +0:53 'v4' ( temp 4-component vector of float) +0:53 textureGather ( global 4-component vector of float) +0:53 direct index ( temp sampler2D) +0:53 'arrayedSampler' ( uniform 5-element array of sampler2D) +0:53 Constant: +0:53 0 (const int) +0:53 'c2D' ( smooth in 2-component vector of float) +0:54 Sequence +0:54 move second child to first child ( temp 4-component vector of int) +0:54 'iv4' ( temp 4-component vector of int) +0:54 textureGatherOffset ( global 4-component vector of int) +0:54 'isamp2DA' ( uniform isampler2DArray) +0:54 Constant: +0:54 0.100000 +0:54 0.100000 +0:54 0.100000 +0:54 Constant: +0:54 1 (const int) +0:54 1 (const int) +0:54 Constant: +0:54 3 (const int) +0:55 move second child to first child ( temp 4-component vector of int) +0:55 'iv4' ( temp 4-component vector of int) +0:55 textureGatherOffset ( global 4-component vector of int) +0:55 'isamp2DA' ( uniform isampler2DArray) +0:55 Constant: +0:55 0.100000 +0:55 0.100000 +0:55 0.100000 +0:55 Constant: +0:55 1 (const int) +0:55 1 (const int) +0:55 'i' ( flat in int) +0:56 move second child to first child ( temp 4-component vector of int) +0:56 'iv4' ( temp 4-component vector of int) +0:56 textureGatherOffset ( global 4-component vector of int) +0:56 'isamp2DA' ( uniform isampler2DArray) +0:56 Constant: +0:56 0.100000 +0:56 0.100000 +0:56 0.100000 +0:56 Constant: +0:56 1 (const int) +0:56 1 (const int) +0:56 Constant: +0:56 4 (const int) +0:57 move second child to first child ( temp 4-component vector of int) +0:57 'iv4' ( temp 4-component vector of int) +0:57 textureGatherOffset ( global 4-component vector of int) +0:57 'isamp2DA' ( uniform isampler2DArray) +0:57 Constant: +0:57 0.100000 +0:57 0.100000 +0:57 0.100000 +0:57 Constant: +0:57 1 (const int) +0:57 1 (const int) +0:57 Constant: +0:57 3 (const int) +0:58 move second child to first child ( temp 4-component vector of int) +0:58 'iv4' ( temp 4-component vector of int) +0:58 textureGatherOffset ( global 4-component vector of int) +0:58 'isamp2DA' ( uniform isampler2DArray) +0:58 Constant: +0:58 0.100000 +0:58 0.100000 +0:58 0.100000 +0:58 Construct ivec2 ( temp 2-component vector of int) +0:58 'i' ( flat in int) +0:60 Sequence +0:60 move second child to first child ( temp 4-component vector of float) +0:60 'c' ( temp 4-component vector of float) +0:60 'gl_FragCoord' ( gl_FragCoord 4-component vector of float FragCoord) 0:? Linker Objects 0:? 'c2D' ( smooth in 2-component vector of float) 0:? 'i' ( flat in int) @@ -687,6 +735,9 @@ ERROR: node is still EOpNull! 0:? 'arrayedSampler' ( uniform 5-element array of sampler2D) 0:? 'samp2dr' ( uniform usampler2DRect) 0:? 'isamp2DA' ( uniform isampler2DArray) +0:? 'anon@0' (layout( column_major shared) buffer block{layout( column_major shared) buffer int atomi, layout( column_major shared) buffer uint atomu}) +0:? 'ssboStd430Arr' (layout( column_major shared) buffer 2-element array of block{layout( column_major shared) buffer int member01, layout( column_major shared) buffer 2-element array of int memberArr01, layout( column_major shared) buffer unsized 1-element array of int memberUnsizedArr01}) +0:? 'ssboSharedArr' (layout( column_major shared) buffer 2-element array of block{layout( column_major shared) buffer int member02, layout( column_major shared) buffer 2-element array of int memberArr02, layout( column_major shared) buffer unsized 1-element array of int memberUnsizedArr02}) 0:? 'gl_ClipDistance' ( smooth in 4-element array of float ClipDistance) 0:? 'vl' (layout( location=4) smooth in 4-component vector of float) 0:? 'vl2' (layout( location=6) smooth in 4-component vector of float) diff --git a/Test/baseResults/440.frag.out b/Test/baseResults/440.frag.out index c7ff7284..7ea19262 100755 --- a/Test/baseResults/440.frag.out +++ b/Test/baseResults/440.frag.out @@ -1,7 +1,7 @@ 440.frag ERROR: 0:11: 'location' : overlapping use of location 4 ERROR: 0:13: 'component' : type overflows the available 4 components -ERROR: 0:22: 'location' : fragment outputs sharing the same location must be the same basic type 30 +ERROR: 0:22: 'location' : fragment outputs or tileImageEXTs sharing the same location 30 must be the same basic type ERROR: 0:24: 'qualifier' : cannot use auxiliary, memory, interpolation, or precision qualifier in a default qualifier declaration (declaration with no type) ERROR: 0:25: 'qualifier' : cannot use auxiliary, memory, interpolation, or precision qualifier in a default qualifier declaration (declaration with no type) ERROR: 0:26: 'qualifier' : cannot use auxiliary, memory, interpolation, or precision qualifier in a default qualifier declaration (declaration with no type) @@ -43,11 +43,11 @@ ERROR: 0:62: 'layout' : offset/align can only be used on a uniform or buffer ERROR: 0:63: 'layout' : offset/align can only be used on a uniform or buffer ERROR: 0:84: 'align' : must be a power of 2 ERROR: 0:83: 'offset' : cannot lie in previous members -ERROR: 0:85: 'offset' : must be a multiple of the member's alignment +ERROR: 0:85: 'offset' : must be a multiple of the member's alignment (layout offset = 68 | member alignment = 8) ERROR: 0:103: 'align' : must be a power of 2 ERROR: 0:105: 'align' : must be a power of 2 ERROR: 0:102: 'offset' : cannot lie in previous members -ERROR: 0:104: 'offset' : must be a multiple of the member's alignment +ERROR: 0:104: 'offset' : must be a multiple of the member's alignment (layout offset = 68 | member alignment = 8) ERROR: 49 compilation errors. No code generated. diff --git a/Test/baseResults/GL_ARB_bindless_texture.frag.out b/Test/baseResults/GL_ARB_bindless_texture.frag.out new file mode 100755 index 00000000..3f902c99 --- /dev/null +++ b/Test/baseResults/GL_ARB_bindless_texture.frag.out @@ -0,0 +1,205 @@ +GL_ARB_bindless_texture.frag +Shader version: 460 +Requested GL_ARB_bindless_texture +0:? Sequence +0:38 Function Definition: main( ( global void) +0:38 Function Parameters: +0:40 Sequence +0:40 move second child to first child ( temp 4-component vector of float) +0:40 'color0' ( out 4-component vector of float) +0:40 texture ( global 4-component vector of float) +0:40 's0' ( uniform sampler2D) +0:40 'coord' ( uniform 2-component vector of float) +0:41 move second child to first child ( temp 4-component vector of float) +0:41 'color1' ( out 4-component vector of float) +0:41 texture ( global 4-component vector of float) +0:41 's1' ( smooth in sampler2D) +0:41 'coord' ( uniform 2-component vector of float) +0:42 move second child to first child ( temp 4-component vector of float) +0:42 'color2' ( out 4-component vector of float) +0:42 texture ( global 4-component vector of float) +0:42 packUint2x32 ( temp sampler2D) +0:42 's2' ( uniform 2-component vector of uint) +0:42 'coord' ( uniform 2-component vector of float) +0:43 move second child to first child ( temp 4-component vector of float) +0:43 'color3' ( out 4-component vector of float) +0:43 texture ( global 4-component vector of float) +0:43 packUint2x32 ( temp sampler2D) +0:43 's3' ( uniform 2-component vector of int) +0:43 'coord' ( uniform 2-component vector of float) +0:44 move second child to first child ( temp 4-component vector of float) +0:44 'color4' ( out 4-component vector of float) +0:44 texture ( global 4-component vector of float) +0:44 indirect index ( smooth temp sampler2D) +0:44 indirect index ( smooth temp 3-element array of sampler2D) +0:44 's4' ( smooth in 2-element array of 3-element array of sampler2D) +0:44 'index' ( uniform int) +0:44 'index' ( uniform int) +0:44 'coord' ( uniform 2-component vector of float) +0:45 move second child to first child ( temp 4-component vector of float) +0:45 'color5' ( out 4-component vector of float) +0:45 texture ( global 4-component vector of float) +0:45 s5: direct index for structure (layout( column_major shared layoutBindlessSampler) uniform sampler2D) +0:45 indirect index (layout( column_major shared) temp block{layout( column_major shared layoutBindlessSampler) uniform sampler2D s5}) +0:45 'bbs5' (layout( column_major shared) uniform 2-element array of block{layout( column_major shared layoutBindlessSampler) uniform sampler2D s5}) +0:45 'index' ( uniform int) +0:45 Constant: +0:45 0 (const int) +0:45 'coord' ( uniform 2-component vector of float) +0:46 move second child to first child ( temp 4-component vector of float) +0:46 'color6' ( out 4-component vector of float) +0:46 textureFetch ( global 4-component vector of float) +0:46 's6' ( smooth in samplerBuffer) +0:46 'icoord' ( uniform int) +0:47 move second child to first child ( temp 4-component vector of float) +0:47 'color7' ( out 4-component vector of float) +0:47 textureFetch ( global 4-component vector of float) +0:47 s7: direct index for structure (layout( column_major shared layoutBindlessSampler) uniform samplerBuffer) +0:47 'anon@0' (layout( column_major shared) uniform block{layout( column_major shared layoutBindlessSampler) uniform samplerBuffer s7}) +0:47 Constant: +0:47 0 (const uint) +0:47 'icoord' ( uniform int) +0:48 move second child to first child ( temp 4-component vector of float) +0:48 'color8' ( out 4-component vector of float) +0:48 textureFetch ( global 4-component vector of float) +0:48 s8: direct index for structure (layout( column_major shared layoutBindlessSampler) buffer samplerBuffer) +0:48 'anon@1' (layout( column_major shared) buffer block{layout( column_major shared layoutBindlessSampler) buffer samplerBuffer s8}) +0:48 Constant: +0:48 0 (const uint) +0:48 'icoord' ( uniform int) +0:49 move second child to first child ( temp 4-component vector of float) +0:49 'color9' ( out 4-component vector of float) +0:49 imageLoad ( global 4-component vector of float) +0:49 'i9' (layout( rgba8 layoutBindlessImage) smooth in image2D) +0:49 Constant: +0:49 0 (const int) +0:49 0 (const int) +0:? Linker Objects +0:? 's0' ( uniform sampler2D) +0:? 's1' ( smooth in sampler2D) +0:? 's2' ( uniform 2-component vector of uint) +0:? 's3' ( uniform 2-component vector of int) +0:? 'index' ( uniform int) +0:? 's4' ( smooth in 2-element array of 3-element array of sampler2D) +0:? 'bbs5' (layout( column_major shared) uniform 2-element array of block{layout( column_major shared layoutBindlessSampler) uniform sampler2D s5}) +0:? 's6' ( smooth in samplerBuffer) +0:? 'anon@0' (layout( column_major shared) uniform block{layout( column_major shared layoutBindlessSampler) uniform samplerBuffer s7}) +0:? 'anon@1' (layout( column_major shared) buffer block{layout( column_major shared layoutBindlessSampler) buffer samplerBuffer s8}) +0:? 'i9' (layout( rgba8 layoutBindlessImage) smooth in image2D) +0:? 'coord' ( uniform 2-component vector of float) +0:? 'icoord' ( uniform int) +0:? 'color0' ( out 4-component vector of float) +0:? 'color1' ( out 4-component vector of float) +0:? 'color2' ( out 4-component vector of float) +0:? 'color3' ( out 4-component vector of float) +0:? 'color4' ( out 4-component vector of float) +0:? 'color5' ( out 4-component vector of float) +0:? 'color6' ( out 4-component vector of float) +0:? 'color7' ( out 4-component vector of float) +0:? 'color8' ( out 4-component vector of float) +0:? 'color9' ( out 4-component vector of float) + + +Linked fragment stage: + + +Shader version: 460 +Requested GL_ARB_bindless_texture +0:? Sequence +0:38 Function Definition: main( ( global void) +0:38 Function Parameters: +0:40 Sequence +0:40 move second child to first child ( temp 4-component vector of float) +0:40 'color0' ( out 4-component vector of float) +0:40 texture ( global 4-component vector of float) +0:40 's0' ( uniform sampler2D) +0:40 'coord' ( uniform 2-component vector of float) +0:41 move second child to first child ( temp 4-component vector of float) +0:41 'color1' ( out 4-component vector of float) +0:41 texture ( global 4-component vector of float) +0:41 's1' ( smooth in sampler2D) +0:41 'coord' ( uniform 2-component vector of float) +0:42 move second child to first child ( temp 4-component vector of float) +0:42 'color2' ( out 4-component vector of float) +0:42 texture ( global 4-component vector of float) +0:42 packUint2x32 ( temp sampler2D) +0:42 's2' ( uniform 2-component vector of uint) +0:42 'coord' ( uniform 2-component vector of float) +0:43 move second child to first child ( temp 4-component vector of float) +0:43 'color3' ( out 4-component vector of float) +0:43 texture ( global 4-component vector of float) +0:43 packUint2x32 ( temp sampler2D) +0:43 's3' ( uniform 2-component vector of int) +0:43 'coord' ( uniform 2-component vector of float) +0:44 move second child to first child ( temp 4-component vector of float) +0:44 'color4' ( out 4-component vector of float) +0:44 texture ( global 4-component vector of float) +0:44 indirect index ( smooth temp sampler2D) +0:44 indirect index ( smooth temp 3-element array of sampler2D) +0:44 's4' ( smooth in 2-element array of 3-element array of sampler2D) +0:44 'index' ( uniform int) +0:44 'index' ( uniform int) +0:44 'coord' ( uniform 2-component vector of float) +0:45 move second child to first child ( temp 4-component vector of float) +0:45 'color5' ( out 4-component vector of float) +0:45 texture ( global 4-component vector of float) +0:45 s5: direct index for structure (layout( column_major shared layoutBindlessSampler) uniform sampler2D) +0:45 indirect index (layout( column_major shared) temp block{layout( column_major shared layoutBindlessSampler) uniform sampler2D s5}) +0:45 'bbs5' (layout( column_major shared) uniform 2-element array of block{layout( column_major shared layoutBindlessSampler) uniform sampler2D s5}) +0:45 'index' ( uniform int) +0:45 Constant: +0:45 0 (const int) +0:45 'coord' ( uniform 2-component vector of float) +0:46 move second child to first child ( temp 4-component vector of float) +0:46 'color6' ( out 4-component vector of float) +0:46 textureFetch ( global 4-component vector of float) +0:46 's6' ( smooth in samplerBuffer) +0:46 'icoord' ( uniform int) +0:47 move second child to first child ( temp 4-component vector of float) +0:47 'color7' ( out 4-component vector of float) +0:47 textureFetch ( global 4-component vector of float) +0:47 s7: direct index for structure (layout( column_major shared layoutBindlessSampler) uniform samplerBuffer) +0:47 'anon@0' (layout( column_major shared) uniform block{layout( column_major shared layoutBindlessSampler) uniform samplerBuffer s7}) +0:47 Constant: +0:47 0 (const uint) +0:47 'icoord' ( uniform int) +0:48 move second child to first child ( temp 4-component vector of float) +0:48 'color8' ( out 4-component vector of float) +0:48 textureFetch ( global 4-component vector of float) +0:48 s8: direct index for structure (layout( column_major shared layoutBindlessSampler) buffer samplerBuffer) +0:48 'anon@1' (layout( column_major shared) buffer block{layout( column_major shared layoutBindlessSampler) buffer samplerBuffer s8}) +0:48 Constant: +0:48 0 (const uint) +0:48 'icoord' ( uniform int) +0:49 move second child to first child ( temp 4-component vector of float) +0:49 'color9' ( out 4-component vector of float) +0:49 imageLoad ( global 4-component vector of float) +0:49 'i9' (layout( rgba8 layoutBindlessImage) smooth in image2D) +0:49 Constant: +0:49 0 (const int) +0:49 0 (const int) +0:? Linker Objects +0:? 's0' ( uniform sampler2D) +0:? 's1' ( smooth in sampler2D) +0:? 's2' ( uniform 2-component vector of uint) +0:? 's3' ( uniform 2-component vector of int) +0:? 'index' ( uniform int) +0:? 's4' ( smooth in 2-element array of 3-element array of sampler2D) +0:? 'bbs5' (layout( column_major shared) uniform 2-element array of block{layout( column_major shared layoutBindlessSampler) uniform sampler2D s5}) +0:? 's6' ( smooth in samplerBuffer) +0:? 'anon@0' (layout( column_major shared) uniform block{layout( column_major shared layoutBindlessSampler) uniform samplerBuffer s7}) +0:? 'anon@1' (layout( column_major shared) buffer block{layout( column_major shared layoutBindlessSampler) buffer samplerBuffer s8}) +0:? 'i9' (layout( rgba8 layoutBindlessImage) smooth in image2D) +0:? 'coord' ( uniform 2-component vector of float) +0:? 'icoord' ( uniform int) +0:? 'color0' ( out 4-component vector of float) +0:? 'color1' ( out 4-component vector of float) +0:? 'color2' ( out 4-component vector of float) +0:? 'color3' ( out 4-component vector of float) +0:? 'color4' ( out 4-component vector of float) +0:? 'color5' ( out 4-component vector of float) +0:? 'color6' ( out 4-component vector of float) +0:? 'color7' ( out 4-component vector of float) +0:? 'color8' ( out 4-component vector of float) +0:? 'color9' ( out 4-component vector of float) + diff --git a/Test/baseResults/GL_EXT_draw_instanced.vert.out b/Test/baseResults/GL_EXT_draw_instanced.vert.out new file mode 100755 index 00000000..cce01a17 --- /dev/null +++ b/Test/baseResults/GL_EXT_draw_instanced.vert.out @@ -0,0 +1,173 @@ +GL_EXT_draw_instanced.vert +Shader version: 120 +Requested GL_EXT_draw_instanced +0:? Sequence +0:10 Function Definition: main( ( global void) +0:10 Function Parameters: +0:12 Sequence +0:12 Sequence +0:12 move second child to first child ( temp 4-component vector of float) +0:12 'vertex' ( temp 4-component vector of float) +0:12 add ( temp 4-component vector of float) +0:12 Construct vec4 ( temp 4-component vector of float) +0:12 divide ( temp 2-component vector of float) +0:12 vector swizzle ( temp 2-component vector of float) +0:12 direct index ( temp 4-component vector of float) +0:12 'va' ( uniform 64-element array of 4-component vector of float) +0:12 Constant: +0:12 0 (const int) +0:12 Sequence +0:12 Constant: +0:12 0 (const int) +0:12 Constant: +0:12 1 (const int) +0:12 Constant: +0:12 3.000000 +0:12 vector swizzle ( temp 2-component vector of float) +0:12 direct index ( temp 4-component vector of float) +0:12 'va' ( uniform 64-element array of 4-component vector of float) +0:12 Constant: +0:12 0 (const int) +0:12 Sequence +0:12 Constant: +0:12 2 (const int) +0:12 Constant: +0:12 3 (const int) +0:12 Construct vec4 ( temp 4-component vector of float) +0:12 indirect index ( temp 3-component vector of float) +0:12 'instanceOffsets' ( uniform 3-element array of 3-component vector of float) +0:12 'gl_InstanceID' ( gl_InstanceId int InstanceId) +0:12 Constant: +0:12 1.000000 +0:13 move second child to first child ( temp 4-component vector of float) +0:13 'color' ( global 4-component vector of float) +0:13 Constant: +0:13 0.000000 +0:13 0.000000 +0:13 0.000000 +0:13 0.000000 +0:14 Sequence +0:14 Sequence +0:14 move second child to first child ( temp int) +0:14 'i' ( temp int) +0:14 Constant: +0:14 1 (const int) +0:14 Loop with condition tested first +0:14 Loop Condition +0:14 Compare Less Than ( temp bool) +0:14 'i' ( temp int) +0:14 Constant: +0:14 64 (const int) +0:14 Loop Body +0:15 add second child into first child ( temp 4-component vector of float) +0:15 'color' ( global 4-component vector of float) +0:15 indirect index ( temp 4-component vector of float) +0:15 'va' ( uniform 64-element array of 4-component vector of float) +0:15 'i' ( temp int) +0:14 Loop Terminal Expression +0:14 Post-Increment ( temp int) +0:14 'i' ( temp int) +0:16 move second child to first child ( temp 4-component vector of float) +0:16 'gl_Position' ( gl_Position 4-component vector of float Position) +0:16 matrix-times-vector ( temp 4-component vector of float) +0:16 'gtf_ModelViewProjectionMatrix' ( uniform 4X4 matrix of float) +0:16 'vertex' ( temp 4-component vector of float) +0:17 move second child to first child ( temp float) +0:17 'gl_PointSize' ( gl_PointSize float PointSize) +0:17 Constant: +0:17 1.000000 +0:? Linker Objects +0:? 'gtf_ModelViewProjectionMatrix' ( uniform 4X4 matrix of float) +0:? 'instanceOffsets' ( uniform 3-element array of 3-component vector of float) +0:? 'va' ( uniform 64-element array of 4-component vector of float) +0:? 'color' ( global 4-component vector of float) +0:? 'gl_InstanceID' ( gl_InstanceId int InstanceId) + + +Linked vertex stage: + + +Shader version: 120 +Requested GL_EXT_draw_instanced +0:? Sequence +0:10 Function Definition: main( ( global void) +0:10 Function Parameters: +0:12 Sequence +0:12 Sequence +0:12 move second child to first child ( temp 4-component vector of float) +0:12 'vertex' ( temp 4-component vector of float) +0:12 add ( temp 4-component vector of float) +0:12 Construct vec4 ( temp 4-component vector of float) +0:12 divide ( temp 2-component vector of float) +0:12 vector swizzle ( temp 2-component vector of float) +0:12 direct index ( temp 4-component vector of float) +0:12 'va' ( uniform 64-element array of 4-component vector of float) +0:12 Constant: +0:12 0 (const int) +0:12 Sequence +0:12 Constant: +0:12 0 (const int) +0:12 Constant: +0:12 1 (const int) +0:12 Constant: +0:12 3.000000 +0:12 vector swizzle ( temp 2-component vector of float) +0:12 direct index ( temp 4-component vector of float) +0:12 'va' ( uniform 64-element array of 4-component vector of float) +0:12 Constant: +0:12 0 (const int) +0:12 Sequence +0:12 Constant: +0:12 2 (const int) +0:12 Constant: +0:12 3 (const int) +0:12 Construct vec4 ( temp 4-component vector of float) +0:12 indirect index ( temp 3-component vector of float) +0:12 'instanceOffsets' ( uniform 3-element array of 3-component vector of float) +0:12 'gl_InstanceID' ( gl_InstanceId int InstanceId) +0:12 Constant: +0:12 1.000000 +0:13 move second child to first child ( temp 4-component vector of float) +0:13 'color' ( global 4-component vector of float) +0:13 Constant: +0:13 0.000000 +0:13 0.000000 +0:13 0.000000 +0:13 0.000000 +0:14 Sequence +0:14 Sequence +0:14 move second child to first child ( temp int) +0:14 'i' ( temp int) +0:14 Constant: +0:14 1 (const int) +0:14 Loop with condition tested first +0:14 Loop Condition +0:14 Compare Less Than ( temp bool) +0:14 'i' ( temp int) +0:14 Constant: +0:14 64 (const int) +0:14 Loop Body +0:15 add second child into first child ( temp 4-component vector of float) +0:15 'color' ( global 4-component vector of float) +0:15 indirect index ( temp 4-component vector of float) +0:15 'va' ( uniform 64-element array of 4-component vector of float) +0:15 'i' ( temp int) +0:14 Loop Terminal Expression +0:14 Post-Increment ( temp int) +0:14 'i' ( temp int) +0:16 move second child to first child ( temp 4-component vector of float) +0:16 'gl_Position' ( gl_Position 4-component vector of float Position) +0:16 matrix-times-vector ( temp 4-component vector of float) +0:16 'gtf_ModelViewProjectionMatrix' ( uniform 4X4 matrix of float) +0:16 'vertex' ( temp 4-component vector of float) +0:17 move second child to first child ( temp float) +0:17 'gl_PointSize' ( gl_PointSize float PointSize) +0:17 Constant: +0:17 1.000000 +0:? Linker Objects +0:? 'gtf_ModelViewProjectionMatrix' ( uniform 4X4 matrix of float) +0:? 'instanceOffsets' ( uniform 3-element array of 3-component vector of float) +0:? 'va' ( uniform 64-element array of 4-component vector of float) +0:? 'color' ( global 4-component vector of float) +0:? 'gl_InstanceID' ( gl_InstanceId int InstanceId) + diff --git a/Test/baseResults/GL_EXT_texture_array.frag.out b/Test/baseResults/GL_EXT_texture_array.frag.out new file mode 100755 index 00000000..977d932d --- /dev/null +++ b/Test/baseResults/GL_EXT_texture_array.frag.out @@ -0,0 +1,149 @@ +GL_EXT_texture_array.frag +Shader version: 110 +Requested GL_EXT_texture_array +0:? Sequence +0:10 Function Definition: foo( ( global void) +0:10 Function Parameters: +0:? Sequence +0:17 move second child to first child ( temp 4-component vector of float) +0:17 'v4' ( temp 4-component vector of float) +0:17 texture ( global 4-component vector of float) +0:17 's1DA' ( uniform sampler1DArray) +0:17 'v2' ( temp 2-component vector of float) +0:18 move second child to first child ( temp 4-component vector of float) +0:18 'v4' ( temp 4-component vector of float) +0:18 texture ( global 4-component vector of float) +0:18 's2DA' ( uniform sampler2DArray) +0:18 'v3' ( temp 3-component vector of float) +0:19 move second child to first child ( temp 4-component vector of float) +0:19 'v4' ( temp 4-component vector of float) +0:19 texture ( global 4-component vector of float) +0:19 's1DAS' ( uniform sampler1DArrayShadow) +0:19 'v3' ( temp 3-component vector of float) +0:20 move second child to first child ( temp 4-component vector of float) +0:20 'v4' ( temp 4-component vector of float) +0:20 texture ( global 4-component vector of float) +0:20 's2DAS' ( uniform sampler2DArrayShadow) +0:20 'v4' ( temp 4-component vector of float) +0:22 move second child to first child ( temp 4-component vector of float) +0:22 'v4' ( temp 4-component vector of float) +0:22 texture ( global 4-component vector of float) +0:22 's1DA' ( uniform sampler1DArray) +0:22 'v2' ( temp 2-component vector of float) +0:22 'f' ( temp float) +0:23 move second child to first child ( temp 4-component vector of float) +0:23 'v4' ( temp 4-component vector of float) +0:23 texture ( global 4-component vector of float) +0:23 's2DA' ( uniform sampler2DArray) +0:23 'v3' ( temp 3-component vector of float) +0:23 'f' ( temp float) +0:24 move second child to first child ( temp 4-component vector of float) +0:24 'v4' ( temp 4-component vector of float) +0:24 texture ( global 4-component vector of float) +0:24 's1DAS' ( uniform sampler1DArrayShadow) +0:24 'v3' ( temp 3-component vector of float) +0:24 'f' ( temp float) +0:26 move second child to first child ( temp 4-component vector of float) +0:26 'v4' ( temp 4-component vector of float) +0:26 textureLod ( global 4-component vector of float) +0:26 's1DA' ( uniform sampler1DArray) +0:26 'v2' ( temp 2-component vector of float) +0:26 'f' ( temp float) +0:27 move second child to first child ( temp 4-component vector of float) +0:27 'v4' ( temp 4-component vector of float) +0:27 textureLod ( global 4-component vector of float) +0:27 's2DA' ( uniform sampler2DArray) +0:27 'v3' ( temp 3-component vector of float) +0:27 'f' ( temp float) +0:28 move second child to first child ( temp 4-component vector of float) +0:28 'v4' ( temp 4-component vector of float) +0:28 textureLod ( global 4-component vector of float) +0:28 's1DAS' ( uniform sampler1DArrayShadow) +0:28 'v3' ( temp 3-component vector of float) +0:28 'f' ( temp float) +0:31 Function Definition: main( ( global void) +0:31 Function Parameters: +0:33 Sequence +0:33 Function Call: foo( ( global void) +0:? Linker Objects +0:? 's1DA' ( uniform sampler1DArray) +0:? 's2DA' ( uniform sampler2DArray) +0:? 's1DAS' ( uniform sampler1DArrayShadow) +0:? 's2DAS' ( uniform sampler2DArrayShadow) + + +Linked fragment stage: + + +Shader version: 110 +Requested GL_EXT_texture_array +0:? Sequence +0:10 Function Definition: foo( ( global void) +0:10 Function Parameters: +0:? Sequence +0:17 move second child to first child ( temp 4-component vector of float) +0:17 'v4' ( temp 4-component vector of float) +0:17 texture ( global 4-component vector of float) +0:17 's1DA' ( uniform sampler1DArray) +0:17 'v2' ( temp 2-component vector of float) +0:18 move second child to first child ( temp 4-component vector of float) +0:18 'v4' ( temp 4-component vector of float) +0:18 texture ( global 4-component vector of float) +0:18 's2DA' ( uniform sampler2DArray) +0:18 'v3' ( temp 3-component vector of float) +0:19 move second child to first child ( temp 4-component vector of float) +0:19 'v4' ( temp 4-component vector of float) +0:19 texture ( global 4-component vector of float) +0:19 's1DAS' ( uniform sampler1DArrayShadow) +0:19 'v3' ( temp 3-component vector of float) +0:20 move second child to first child ( temp 4-component vector of float) +0:20 'v4' ( temp 4-component vector of float) +0:20 texture ( global 4-component vector of float) +0:20 's2DAS' ( uniform sampler2DArrayShadow) +0:20 'v4' ( temp 4-component vector of float) +0:22 move second child to first child ( temp 4-component vector of float) +0:22 'v4' ( temp 4-component vector of float) +0:22 texture ( global 4-component vector of float) +0:22 's1DA' ( uniform sampler1DArray) +0:22 'v2' ( temp 2-component vector of float) +0:22 'f' ( temp float) +0:23 move second child to first child ( temp 4-component vector of float) +0:23 'v4' ( temp 4-component vector of float) +0:23 texture ( global 4-component vector of float) +0:23 's2DA' ( uniform sampler2DArray) +0:23 'v3' ( temp 3-component vector of float) +0:23 'f' ( temp float) +0:24 move second child to first child ( temp 4-component vector of float) +0:24 'v4' ( temp 4-component vector of float) +0:24 texture ( global 4-component vector of float) +0:24 's1DAS' ( uniform sampler1DArrayShadow) +0:24 'v3' ( temp 3-component vector of float) +0:24 'f' ( temp float) +0:26 move second child to first child ( temp 4-component vector of float) +0:26 'v4' ( temp 4-component vector of float) +0:26 textureLod ( global 4-component vector of float) +0:26 's1DA' ( uniform sampler1DArray) +0:26 'v2' ( temp 2-component vector of float) +0:26 'f' ( temp float) +0:27 move second child to first child ( temp 4-component vector of float) +0:27 'v4' ( temp 4-component vector of float) +0:27 textureLod ( global 4-component vector of float) +0:27 's2DA' ( uniform sampler2DArray) +0:27 'v3' ( temp 3-component vector of float) +0:27 'f' ( temp float) +0:28 move second child to first child ( temp 4-component vector of float) +0:28 'v4' ( temp 4-component vector of float) +0:28 textureLod ( global 4-component vector of float) +0:28 's1DAS' ( uniform sampler1DArrayShadow) +0:28 'v3' ( temp 3-component vector of float) +0:28 'f' ( temp float) +0:31 Function Definition: main( ( global void) +0:31 Function Parameters: +0:33 Sequence +0:33 Function Call: foo( ( global void) +0:? Linker Objects +0:? 's1DA' ( uniform sampler1DArray) +0:? 's2DA' ( uniform sampler2DArray) +0:? 's1DAS' ( uniform sampler1DArrayShadow) +0:? 's2DAS' ( uniform sampler2DArrayShadow) + diff --git a/Test/baseResults/atomicAdd.comp.out b/Test/baseResults/atomicAdd.comp.out index 6752a713..5c9afc89 100755 --- a/Test/baseResults/atomicAdd.comp.out +++ b/Test/baseResults/atomicAdd.comp.out @@ -1,5 +1,5 @@ atomicAdd.comp -ERROR: 0:18: 'atomicAdd' : Atomic memory function can only be used for shader storage block member or shared variable. +ERROR: 0:18: 'atomicAdd' : Only l-values corresponding to shader block storage or shared variables can be used with atomic memory functions. ERROR: 1 compilation errors. No code generated. diff --git a/Test/baseResults/constFoldIntMin.frag.out b/Test/baseResults/constFoldIntMin.frag.out index 2c45ca80..e7dd3532 100755 --- a/Test/baseResults/constFoldIntMin.frag.out +++ b/Test/baseResults/constFoldIntMin.frag.out @@ -25,7 +25,7 @@ Requested GL_ARB_gpu_shader_int64 0:9 move second child to first child ( temp int16_t) 0:9 'x' ( temp int16_t) 0:9 Constant: -0:9 0 (const int8_t) +0:9 0 (const int16_t) 0:10 Sequence 0:10 move second child to first child ( temp int) 0:10 'y' ( temp int) diff --git a/Test/baseResults/cppBad.vert.out b/Test/baseResults/cppBad.vert.out index 8ab04bc0..e0a1504a 100755 --- a/Test/baseResults/cppBad.vert.out +++ b/Test/baseResults/cppBad.vert.out @@ -1,5 +1,7 @@ cppBad.vert WARNING: 0:1: '#define' : missing space after macro name +ERROR: 0:1: '#' : (#) can be preceded in its line only by spaces or horizontal tabs +ERROR: 0:2: '#' : (#) can be preceded in its line only by spaces or horizontal tabs ERROR: 0:3: 'preprocessor evaluation' : bad expression ERROR: 0:3: '#if' : unexpected tokens following directive ERROR: 0:6: 'string' : End of line in string @@ -7,7 +9,7 @@ ERROR: 0:6: 'string literal' : required extension not requested: Possible extens GL_EXT_debug_printf GL_EXT_spirv_intrinsics ERROR: 0:6: '' : syntax error, unexpected INT, expecting COMMA or SEMICOLON -ERROR: 5 compilation errors. No code generated. +ERROR: 7 compilation errors. No code generated. Shader version: 100 diff --git a/Test/baseResults/cppBad4.vert.out b/Test/baseResults/cppBad4.vert.out index 693ea8e8..23f149db 100755 --- a/Test/baseResults/cppBad4.vert.out +++ b/Test/baseResults/cppBad4.vert.out @@ -1,7 +1,8 @@ cppBad4.vert +ERROR: 0:2: '#' : (#) can be preceded in its line only by spaces or horizontal tabs ERROR: 0:4: 'macro expansion' : unexpected '#' g ERROR: 0:5: '' : syntax error, unexpected SEMICOLON, expecting LEFT_PAREN -ERROR: 2 compilation errors. No code generated. +ERROR: 3 compilation errors. No code generated. Shader version: 100 diff --git a/Test/baseResults/glsl.-P.frag.out b/Test/baseResults/glsl.-P.frag.out new file mode 100755 index 00000000..27d89654 --- /dev/null +++ b/Test/baseResults/glsl.-P.frag.out @@ -0,0 +1,35 @@ +glsl.-P.frag +Shader version: 450 +0:? Sequence +0:5 Function Definition: main( ( global void) +0:5 Function Parameters: +0:19 Sequence +0:19 move second child to first child ( temp 4-component vector of float) +0:19 'color' (layout( location=0) out 4-component vector of float) +0:19 Constant: +0:19 1.000000 +0:19 1.000000 +0:19 1.000000 +0:19 1.000000 +0:? Linker Objects +0:? 'color' (layout( location=0) out 4-component vector of float) + + +Linked fragment stage: + + +Shader version: 450 +0:? Sequence +0:5 Function Definition: main( ( global void) +0:5 Function Parameters: +0:19 Sequence +0:19 move second child to first child ( temp 4-component vector of float) +0:19 'color' (layout( location=0) out 4-component vector of float) +0:19 Constant: +0:19 1.000000 +0:19 1.000000 +0:19 1.000000 +0:19 1.000000 +0:? Linker Objects +0:? 'color' (layout( location=0) out 4-component vector of float) + diff --git a/Test/baseResults/glsl.-P.function.frag.out b/Test/baseResults/glsl.-P.function.frag.out new file mode 100755 index 00000000..b753cd1f --- /dev/null +++ b/Test/baseResults/glsl.-P.function.frag.out @@ -0,0 +1,45 @@ +glsl.-P.function.frag +Shader version: 450 +0:? Sequence +-1:1 Function Definition: getColor( ( global 4-component vector of float) +-1:1 Function Parameters: +-1:1 Sequence +-1:1 Branch: Return with expression +-1:1 Constant: +-1:1 1.000000 +-1:1 1.000000 +-1:1 1.000000 +-1:1 1.000000 +0:5 Function Definition: main( ( global void) +0:5 Function Parameters: +0:7 Sequence +0:7 move second child to first child ( temp 4-component vector of float) +0:7 'color' (layout( location=0) out 4-component vector of float) +0:7 Function Call: getColor( ( global 4-component vector of float) +0:? Linker Objects +0:? 'color' (layout( location=0) out 4-component vector of float) + + +Linked fragment stage: + + +Shader version: 450 +0:? Sequence +-1:1 Function Definition: getColor( ( global 4-component vector of float) +-1:1 Function Parameters: +-1:1 Sequence +-1:1 Branch: Return with expression +-1:1 Constant: +-1:1 1.000000 +-1:1 1.000000 +-1:1 1.000000 +-1:1 1.000000 +0:5 Function Definition: main( ( global void) +0:5 Function Parameters: +0:7 Sequence +0:7 move second child to first child ( temp 4-component vector of float) +0:7 'color' (layout( location=0) out 4-component vector of float) +0:7 Function Call: getColor( ( global 4-component vector of float) +0:? Linker Objects +0:? 'color' (layout( location=0) out 4-component vector of float) + diff --git a/Test/baseResults/glsl.-P.include.frag.out b/Test/baseResults/glsl.-P.include.frag.out new file mode 100755 index 00000000..1ac63f5e --- /dev/null +++ b/Test/baseResults/glsl.-P.include.frag.out @@ -0,0 +1,49 @@ +glsl.-P.include.frag +Shader version: 450 +Requested GL_GOOGLE_cpp_style_line_directive +Requested GL_GOOGLE_include_directive +0:? Sequence +0:1 Function Definition: getColor( ( global 4-component vector of float) +0:1 Function Parameters: +0:3 Sequence +0:3 Branch: Return with expression +0:3 Constant: +0:3 1.000000 +0:3 1.000000 +0:3 1.000000 +0:3 1.000000 +0:7 Function Definition: main( ( global void) +0:7 Function Parameters: +0:9 Sequence +0:9 move second child to first child ( temp 4-component vector of float) +0:9 'color' (layout( location=0) out 4-component vector of float) +0:9 Function Call: getColor( ( global 4-component vector of float) +0:? Linker Objects +0:? 'color' (layout( location=0) out 4-component vector of float) + + +Linked fragment stage: + + +Shader version: 450 +Requested GL_GOOGLE_cpp_style_line_directive +Requested GL_GOOGLE_include_directive +0:? Sequence +0:1 Function Definition: getColor( ( global 4-component vector of float) +0:1 Function Parameters: +0:3 Sequence +0:3 Branch: Return with expression +0:3 Constant: +0:3 1.000000 +0:3 1.000000 +0:3 1.000000 +0:3 1.000000 +0:7 Function Definition: main( ( global void) +0:7 Function Parameters: +0:9 Sequence +0:9 move second child to first child ( temp 4-component vector of float) +0:9 'color' (layout( location=0) out 4-component vector of float) +0:9 Function Call: getColor( ( global 4-component vector of float) +0:? Linker Objects +0:? 'color' (layout( location=0) out 4-component vector of float) + diff --git a/Test/baseResults/glsl.es320.extTextureShadowLod.frag.out b/Test/baseResults/glsl.es320.extTextureShadowLod.frag.out new file mode 100755 index 00000000..ae385ae1 --- /dev/null +++ b/Test/baseResults/glsl.es320.extTextureShadowLod.frag.out @@ -0,0 +1,149 @@ +glsl.es320.extTextureShadowLod.frag +Shader version: 320 +Requested GL_EXT_texture_shadow_lod +0:? Sequence +0:12 Function Definition: main( ( global void) +0:12 Function Parameters: +0:14 Sequence +0:14 move second child to first child ( temp lowp float) +0:14 'c' ( out lowp float) +0:14 texture ( global lowp float) +0:14 's2da' ( uniform lowp sampler2DArrayShadow) +0:14 'tc' ( smooth in lowp 4-component vector of float) +0:14 Constant: +0:14 0.000000 +0:15 move second child to first child ( temp lowp float) +0:15 'c' ( out lowp float) +0:15 texture ( global lowp float) +0:15 'sca' ( uniform lowp samplerCubeArrayShadow) +0:15 'tc' ( smooth in lowp 4-component vector of float) +0:15 Constant: +0:15 0.000000 +0:15 Constant: +0:15 0.000000 +0:16 move second child to first child ( temp lowp float) +0:16 'c' ( out lowp float) +0:16 textureOffset ( global lowp float) +0:16 's2da' ( uniform lowp sampler2DArrayShadow) +0:16 'tc' ( smooth in lowp 4-component vector of float) +0:16 Constant: +0:16 0 (const int) +0:16 0 (const int) +0:16 Constant: +0:16 0.000000 +0:17 move second child to first child ( temp lowp float) +0:17 'c' ( out lowp float) +0:17 textureLod ( global lowp float) +0:17 's2da' ( uniform lowp sampler2DArrayShadow) +0:17 'tc' ( smooth in lowp 4-component vector of float) +0:17 Constant: +0:17 0.000000 +0:18 move second child to first child ( temp lowp float) +0:18 'c' ( out lowp float) +0:18 textureLod ( global lowp float) +0:18 'sc' ( uniform lowp samplerCubeShadow) +0:18 'tc' ( smooth in lowp 4-component vector of float) +0:18 Constant: +0:18 0.000000 +0:19 move second child to first child ( temp lowp float) +0:19 'c' ( out lowp float) +0:19 textureLod ( global lowp float) +0:19 'sca' ( uniform lowp samplerCubeArrayShadow) +0:19 'tc' ( smooth in lowp 4-component vector of float) +0:19 Constant: +0:19 0.000000 +0:19 Constant: +0:19 0.000000 +0:20 move second child to first child ( temp lowp float) +0:20 'c' ( out lowp float) +0:20 textureLodOffset ( global lowp float) +0:20 's2da' ( uniform lowp sampler2DArrayShadow) +0:20 'tc' ( smooth in lowp 4-component vector of float) +0:20 Constant: +0:20 0.000000 +0:20 Constant: +0:20 0 (const int) +0:20 0 (const int) +0:? Linker Objects +0:? 's2da' ( uniform lowp sampler2DArrayShadow) +0:? 'sca' ( uniform lowp samplerCubeArrayShadow) +0:? 'sc' ( uniform lowp samplerCubeShadow) +0:? 'tc' ( smooth in lowp 4-component vector of float) +0:? 'c' ( out lowp float) + + +Linked fragment stage: + + +Shader version: 320 +Requested GL_EXT_texture_shadow_lod +0:? Sequence +0:12 Function Definition: main( ( global void) +0:12 Function Parameters: +0:14 Sequence +0:14 move second child to first child ( temp lowp float) +0:14 'c' ( out lowp float) +0:14 texture ( global lowp float) +0:14 's2da' ( uniform lowp sampler2DArrayShadow) +0:14 'tc' ( smooth in lowp 4-component vector of float) +0:14 Constant: +0:14 0.000000 +0:15 move second child to first child ( temp lowp float) +0:15 'c' ( out lowp float) +0:15 texture ( global lowp float) +0:15 'sca' ( uniform lowp samplerCubeArrayShadow) +0:15 'tc' ( smooth in lowp 4-component vector of float) +0:15 Constant: +0:15 0.000000 +0:15 Constant: +0:15 0.000000 +0:16 move second child to first child ( temp lowp float) +0:16 'c' ( out lowp float) +0:16 textureOffset ( global lowp float) +0:16 's2da' ( uniform lowp sampler2DArrayShadow) +0:16 'tc' ( smooth in lowp 4-component vector of float) +0:16 Constant: +0:16 0 (const int) +0:16 0 (const int) +0:16 Constant: +0:16 0.000000 +0:17 move second child to first child ( temp lowp float) +0:17 'c' ( out lowp float) +0:17 textureLod ( global lowp float) +0:17 's2da' ( uniform lowp sampler2DArrayShadow) +0:17 'tc' ( smooth in lowp 4-component vector of float) +0:17 Constant: +0:17 0.000000 +0:18 move second child to first child ( temp lowp float) +0:18 'c' ( out lowp float) +0:18 textureLod ( global lowp float) +0:18 'sc' ( uniform lowp samplerCubeShadow) +0:18 'tc' ( smooth in lowp 4-component vector of float) +0:18 Constant: +0:18 0.000000 +0:19 move second child to first child ( temp lowp float) +0:19 'c' ( out lowp float) +0:19 textureLod ( global lowp float) +0:19 'sca' ( uniform lowp samplerCubeArrayShadow) +0:19 'tc' ( smooth in lowp 4-component vector of float) +0:19 Constant: +0:19 0.000000 +0:19 Constant: +0:19 0.000000 +0:20 move second child to first child ( temp lowp float) +0:20 'c' ( out lowp float) +0:20 textureLodOffset ( global lowp float) +0:20 's2da' ( uniform lowp sampler2DArrayShadow) +0:20 'tc' ( smooth in lowp 4-component vector of float) +0:20 Constant: +0:20 0.000000 +0:20 Constant: +0:20 0 (const int) +0:20 0 (const int) +0:? Linker Objects +0:? 's2da' ( uniform lowp sampler2DArrayShadow) +0:? 'sca' ( uniform lowp samplerCubeArrayShadow) +0:? 'sc' ( uniform lowp samplerCubeShadow) +0:? 'tc' ( smooth in lowp 4-component vector of float) +0:? 'c' ( out lowp float) + diff --git a/Test/baseResults/glsl.ext.textureShadowLod.frag.out b/Test/baseResults/glsl.ext.textureShadowLod.frag.out new file mode 100755 index 00000000..b84183f8 --- /dev/null +++ b/Test/baseResults/glsl.ext.textureShadowLod.frag.out @@ -0,0 +1,160 @@ +glsl.ext.textureShadowLod.frag +ERROR: 0:24: 'texture(..., float bias)' : required extension not requested: GL_EXT_texture_shadow_lod +ERROR: 0:25: 'texture(..., float bias)' : required extension not requested: GL_EXT_texture_shadow_lod +ERROR: 0:26: 'textureOffset for sampler2DArrayShadow' : required extension not requested: GL_EXT_texture_shadow_lod +ERROR: 0:27: 'textureLod(..., float lod)' : required extension not requested: GL_EXT_texture_shadow_lod +ERROR: 0:28: 'textureLod(..., float lod)' : required extension not requested: GL_EXT_texture_shadow_lod +ERROR: 0:29: 'textureLod(..., float lod)' : required extension not requested: GL_EXT_texture_shadow_lod +ERROR: 0:30: 'textureLodOffset for sampler2DArrayShadow' : required extension not requested: GL_EXT_texture_shadow_lod +ERROR: 7 compilation errors. No code generated. + + +Shader version: 450 +Requested GL_EXT_texture_shadow_lod +ERROR: node is still EOpNull! +0:11 Function Definition: pass( ( global void) +0:11 Function Parameters: +0:12 Sequence +0:12 move second child to first child ( temp float) +0:12 'c' ( out float) +0:12 texture ( global float) +0:12 's2da' ( uniform sampler2DArrayShadow) +0:12 'tc' ( smooth in 4-component vector of float) +0:12 Constant: +0:12 0.000000 +0:13 move second child to first child ( temp float) +0:13 'c' ( out float) +0:13 texture ( global float) +0:13 'sca' ( uniform samplerCubeArrayShadow) +0:13 'tc' ( smooth in 4-component vector of float) +0:13 Constant: +0:13 0.000000 +0:13 Constant: +0:13 0.000000 +0:14 move second child to first child ( temp float) +0:14 'c' ( out float) +0:14 textureOffset ( global float) +0:14 's2da' ( uniform sampler2DArrayShadow) +0:14 'tc' ( smooth in 4-component vector of float) +0:14 Constant: +0:14 0 (const int) +0:14 0 (const int) +0:14 Constant: +0:14 0.000000 +0:15 move second child to first child ( temp float) +0:15 'c' ( out float) +0:15 textureLod ( global float) +0:15 's2da' ( uniform sampler2DArrayShadow) +0:15 'tc' ( smooth in 4-component vector of float) +0:15 Constant: +0:15 0.000000 +0:16 move second child to first child ( temp float) +0:16 'c' ( out float) +0:16 textureLod ( global float) +0:16 'sc' ( uniform samplerCubeShadow) +0:16 'tc' ( smooth in 4-component vector of float) +0:16 Constant: +0:16 0.000000 +0:17 move second child to first child ( temp float) +0:17 'c' ( out float) +0:17 textureLod ( global float) +0:17 'sca' ( uniform samplerCubeArrayShadow) +0:17 'tc' ( smooth in 4-component vector of float) +0:17 Constant: +0:17 0.000000 +0:17 Constant: +0:17 0.000000 +0:18 move second child to first child ( temp float) +0:18 'c' ( out float) +0:18 textureLodOffset ( global float) +0:18 's2da' ( uniform sampler2DArrayShadow) +0:18 'tc' ( smooth in 4-component vector of float) +0:18 Constant: +0:18 0.000000 +0:18 Constant: +0:18 0 (const int) +0:18 0 (const int) +0:22 Function Definition: fail( ( global void) +0:22 Function Parameters: +0:24 Sequence +0:24 move second child to first child ( temp float) +0:24 'c' ( out float) +0:24 texture ( global float) +0:24 's2da' ( uniform sampler2DArrayShadow) +0:24 'tc' ( smooth in 4-component vector of float) +0:24 Constant: +0:24 0.000000 +0:25 move second child to first child ( temp float) +0:25 'c' ( out float) +0:25 texture ( global float) +0:25 'sca' ( uniform samplerCubeArrayShadow) +0:25 'tc' ( smooth in 4-component vector of float) +0:25 Constant: +0:25 0.000000 +0:25 Constant: +0:25 0.000000 +0:26 move second child to first child ( temp float) +0:26 'c' ( out float) +0:26 textureOffset ( global float) +0:26 's2da' ( uniform sampler2DArrayShadow) +0:26 'tc' ( smooth in 4-component vector of float) +0:26 Constant: +0:26 0 (const int) +0:26 0 (const int) +0:26 Constant: +0:26 0.000000 +0:27 move second child to first child ( temp float) +0:27 'c' ( out float) +0:27 textureLod ( global float) +0:27 's2da' ( uniform sampler2DArrayShadow) +0:27 'tc' ( smooth in 4-component vector of float) +0:27 Constant: +0:27 0.000000 +0:28 move second child to first child ( temp float) +0:28 'c' ( out float) +0:28 textureLod ( global float) +0:28 'sc' ( uniform samplerCubeShadow) +0:28 'tc' ( smooth in 4-component vector of float) +0:28 Constant: +0:28 0.000000 +0:29 move second child to first child ( temp float) +0:29 'c' ( out float) +0:29 textureLod ( global float) +0:29 'sca' ( uniform samplerCubeArrayShadow) +0:29 'tc' ( smooth in 4-component vector of float) +0:29 Constant: +0:29 0.000000 +0:29 Constant: +0:29 0.000000 +0:30 move second child to first child ( temp float) +0:30 'c' ( out float) +0:30 textureLodOffset ( global float) +0:30 's2da' ( uniform sampler2DArrayShadow) +0:30 'tc' ( smooth in 4-component vector of float) +0:30 Constant: +0:30 0.000000 +0:30 Constant: +0:30 0 (const int) +0:30 0 (const int) +0:? Linker Objects +0:? 's2da' ( uniform sampler2DArrayShadow) +0:? 'sca' ( uniform samplerCubeArrayShadow) +0:? 'sc' ( uniform samplerCubeShadow) +0:? 'c' ( out float) +0:? 'tc' ( smooth in 4-component vector of float) + + +Linked fragment stage: + +ERROR: Linking fragment stage: Missing entry point: Each stage requires one entry point + +Shader version: 450 +Requested GL_EXT_texture_shadow_lod +ERROR: node is still EOpNull! +0:? Linker Objects +0:? 's2da' ( uniform sampler2DArrayShadow) +0:? 'sca' ( uniform samplerCubeArrayShadow) +0:? 'sc' ( uniform samplerCubeShadow) +0:? 'c' ( out float) +0:? 'tc' ( smooth in 4-component vector of float) + diff --git a/Test/baseResults/glsl.interpOp.error.frag.out b/Test/baseResults/glsl.interpOp.error.frag.out new file mode 100755 index 00000000..36b66aeb --- /dev/null +++ b/Test/baseResults/glsl.interpOp.error.frag.out @@ -0,0 +1,501 @@ +glsl.interpOp.error.frag +ERROR: 0:39: 'interpolateAtCentroid' : first argument must be an interpolant, or interpolant-array element. Using the field of a named struct as an interpolant argument is not allowed (ES-only). +ERROR: 0:40: 'interpolateAtCentroid' : first argument must be an interpolant, or interpolant-array element +ERROR: 0:41: 'interpolateAtCentroid' : first argument must be an interpolant, or interpolant-array element. Using the field of a named struct as an interpolant argument is not allowed (ES-only). +ERROR: 0:54: 'interpolateAtSample' : first argument must be an interpolant, or interpolant-array element. Using the field of a named struct as an interpolant argument is not allowed (ES-only). +ERROR: 0:55: 'interpolateAtSample' : first argument must be an interpolant, or interpolant-array element +ERROR: 0:56: 'interpolateAtSample' : first argument must be an interpolant, or interpolant-array element. Using the field of a named struct as an interpolant argument is not allowed (ES-only). +ERROR: 0:69: 'interpolateAtOffset' : first argument must be an interpolant, or interpolant-array element. Using the field of a named struct as an interpolant argument is not allowed (ES-only). +ERROR: 0:70: 'interpolateAtOffset' : first argument must be an interpolant, or interpolant-array element +ERROR: 0:71: 'interpolateAtOffset' : first argument must be an interpolant, or interpolant-array element. Using the field of a named struct as an interpolant argument is not allowed (ES-only). +ERROR: 9 compilation errors. No code generated. + + +Shader version: 320 +ERROR: node is still EOpNull! +0:27 Function Definition: main( ( global void) +0:27 Function Parameters: +0:32 Sequence +0:32 Sequence +0:32 move second child to first child ( temp mediump 4-component vector of float) +0:32 'fragColor' (layout( location=0) out mediump 4-component vector of float) +0:32 Construct vec4 ( temp mediump 4-component vector of float) +0:32 interpolateAtCentroid ( global highp float) +0:32 'v' (layout( location=2) smooth in highp float) +0:33 move second child to first child ( temp mediump 4-component vector of float) +0:33 'fragColor' (layout( location=0) out mediump 4-component vector of float) +0:33 Construct vec4 ( temp mediump 4-component vector of float) +0:33 interpolateAtCentroid ( global highp float) +0:33 x: direct index for structure ( in highp float) +0:33 'anon@0' (layout( location=3) in block{ in highp float x, in 1-element array of highp 4-component vector of float xyz, in structure{ global highp 4-component vector of float s_v} s0}) +0:33 Constant: +0:33 0 (const uint) +0:34 move second child to first child ( temp mediump 4-component vector of float) +0:34 'fragColor' (layout( location=0) out mediump 4-component vector of float) +0:34 Construct vec4 ( temp mediump 4-component vector of float) +0:34 interpolateAtCentroid ( global highp float) +0:34 direct index (layout( location=7) smooth temp highp float) +0:34 'z' (layout( location=7) smooth in 1-element array of highp float) +0:34 Constant: +0:34 0 (const int) +0:35 move second child to first child ( temp highp 4-component vector of float) +0:35 'fragColor' (layout( location=0) out mediump 4-component vector of float) +0:35 interpolateAtCentroid ( global highp 4-component vector of float) +0:35 'w' (layout( location=8) smooth in highp 4-component vector of float) +0:36 move second child to first child ( temp highp 4-component vector of float) +0:36 'fragColor' (layout( location=0) out mediump 4-component vector of float) +0:36 interpolateAtCentroid ( global highp 4-component vector of float) +0:36 direct index ( temp highp 4-component vector of float) +0:36 xyz: direct index for structure ( in 1-element array of highp 4-component vector of float) +0:36 'anon@0' (layout( location=3) in block{ in highp float x, in 1-element array of highp 4-component vector of float xyz, in structure{ global highp 4-component vector of float s_v} s0}) +0:36 Constant: +0:36 1 (const uint) +0:36 Constant: +0:36 0 (const int) +0:39 move second child to first child ( temp mediump 4-component vector of float) +0:39 'fragColor' (layout( location=0) out mediump 4-component vector of float) +0:39 Construct vec4 ( temp mediump 4-component vector of float) +0:39 interpolateAtCentroid ( global highp float) +0:39 a: direct index for structure ( global highp float) +0:39 'v_var' (layout( location=0) smooth in structure{ global highp float a, global highp float b}) +0:39 Constant: +0:39 0 (const int) +0:40 move second child to first child ( temp mediump 4-component vector of float) +0:40 'fragColor' (layout( location=0) out mediump 4-component vector of float) +0:40 Construct vec4 ( temp mediump 4-component vector of float) +0:40 interpolateAtCentroid ( global highp float) +0:40 direct index ( temp highp float) +0:40 'w' (layout( location=8) smooth in highp 4-component vector of float) +0:40 Constant: +0:40 0 (const int) +0:41 move second child to first child ( temp mediump 4-component vector of float) +0:41 'fragColor' (layout( location=0) out mediump 4-component vector of float) +0:41 Construct vec4 ( temp mediump 4-component vector of float) +0:41 interpolateAtCentroid ( global highp 4-component vector of float) +0:41 s_v: direct index for structure ( global highp 4-component vector of float) +0:41 s0: direct index for structure ( in structure{ global highp 4-component vector of float s_v}) +0:41 'anon@0' (layout( location=3) in block{ in highp float x, in 1-element array of highp 4-component vector of float xyz, in structure{ global highp 4-component vector of float s_v} s0}) +0:41 Constant: +0:41 2 (const uint) +0:41 Constant: +0:41 0 (const int) +0:47 Sequence +0:47 move second child to first child ( temp mediump 4-component vector of float) +0:47 'fragColor' (layout( location=0) out mediump 4-component vector of float) +0:47 Construct vec4 ( temp mediump 4-component vector of float) +0:47 interpolateAtSample ( global highp float) +0:47 'v' (layout( location=2) smooth in highp float) +0:47 Constant: +0:47 0 (const int) +0:48 move second child to first child ( temp mediump 4-component vector of float) +0:48 'fragColor' (layout( location=0) out mediump 4-component vector of float) +0:48 Construct vec4 ( temp mediump 4-component vector of float) +0:48 interpolateAtSample ( global highp float) +0:48 x: direct index for structure ( in highp float) +0:48 'anon@0' (layout( location=3) in block{ in highp float x, in 1-element array of highp 4-component vector of float xyz, in structure{ global highp 4-component vector of float s_v} s0}) +0:48 Constant: +0:48 0 (const uint) +0:48 Constant: +0:48 0 (const int) +0:49 move second child to first child ( temp mediump 4-component vector of float) +0:49 'fragColor' (layout( location=0) out mediump 4-component vector of float) +0:49 Construct vec4 ( temp mediump 4-component vector of float) +0:49 interpolateAtSample ( global highp float) +0:49 direct index (layout( location=7) smooth temp highp float) +0:49 'z' (layout( location=7) smooth in 1-element array of highp float) +0:49 Constant: +0:49 0 (const int) +0:49 Constant: +0:49 0 (const int) +0:50 move second child to first child ( temp highp 4-component vector of float) +0:50 'fragColor' (layout( location=0) out mediump 4-component vector of float) +0:50 interpolateAtSample ( global highp 4-component vector of float) +0:50 'w' (layout( location=8) smooth in highp 4-component vector of float) +0:50 Constant: +0:50 0 (const int) +0:51 move second child to first child ( temp highp 4-component vector of float) +0:51 'fragColor' (layout( location=0) out mediump 4-component vector of float) +0:51 interpolateAtSample ( global highp 4-component vector of float) +0:51 direct index ( temp highp 4-component vector of float) +0:51 xyz: direct index for structure ( in 1-element array of highp 4-component vector of float) +0:51 'anon@0' (layout( location=3) in block{ in highp float x, in 1-element array of highp 4-component vector of float xyz, in structure{ global highp 4-component vector of float s_v} s0}) +0:51 Constant: +0:51 1 (const uint) +0:51 Constant: +0:51 0 (const int) +0:51 Constant: +0:51 0 (const int) +0:54 move second child to first child ( temp mediump 4-component vector of float) +0:54 'fragColor' (layout( location=0) out mediump 4-component vector of float) +0:54 Construct vec4 ( temp mediump 4-component vector of float) +0:54 interpolateAtSample ( global highp float) +0:54 a: direct index for structure ( global highp float) +0:54 'v_var' (layout( location=0) smooth in structure{ global highp float a, global highp float b}) +0:54 Constant: +0:54 0 (const int) +0:54 Constant: +0:54 0 (const int) +0:55 move second child to first child ( temp mediump 4-component vector of float) +0:55 'fragColor' (layout( location=0) out mediump 4-component vector of float) +0:55 Construct vec4 ( temp mediump 4-component vector of float) +0:55 interpolateAtSample ( global highp float) +0:55 direct index ( temp highp float) +0:55 'w' (layout( location=8) smooth in highp 4-component vector of float) +0:55 Constant: +0:55 0 (const int) +0:55 Constant: +0:55 0 (const int) +0:56 move second child to first child ( temp mediump 4-component vector of float) +0:56 'fragColor' (layout( location=0) out mediump 4-component vector of float) +0:56 Construct vec4 ( temp mediump 4-component vector of float) +0:56 interpolateAtSample ( global highp 4-component vector of float) +0:56 s_v: direct index for structure ( global highp 4-component vector of float) +0:56 s0: direct index for structure ( in structure{ global highp 4-component vector of float s_v}) +0:56 'anon@0' (layout( location=3) in block{ in highp float x, in 1-element array of highp 4-component vector of float xyz, in structure{ global highp 4-component vector of float s_v} s0}) +0:56 Constant: +0:56 2 (const uint) +0:56 Constant: +0:56 0 (const int) +0:56 Constant: +0:56 0 (const int) +0:62 Sequence +0:62 move second child to first child ( temp mediump 4-component vector of float) +0:62 'fragColor' (layout( location=0) out mediump 4-component vector of float) +0:62 Construct vec4 ( temp mediump 4-component vector of float) +0:62 interpolateAtOffset ( global highp float) +0:62 'v' (layout( location=2) smooth in highp float) +0:62 Constant: +0:62 0.000000 +0:62 0.000000 +0:63 move second child to first child ( temp mediump 4-component vector of float) +0:63 'fragColor' (layout( location=0) out mediump 4-component vector of float) +0:63 Construct vec4 ( temp mediump 4-component vector of float) +0:63 interpolateAtOffset ( global highp float) +0:63 x: direct index for structure ( in highp float) +0:63 'anon@0' (layout( location=3) in block{ in highp float x, in 1-element array of highp 4-component vector of float xyz, in structure{ global highp 4-component vector of float s_v} s0}) +0:63 Constant: +0:63 0 (const uint) +0:63 Constant: +0:63 0.000000 +0:63 0.000000 +0:64 move second child to first child ( temp mediump 4-component vector of float) +0:64 'fragColor' (layout( location=0) out mediump 4-component vector of float) +0:64 Construct vec4 ( temp mediump 4-component vector of float) +0:64 interpolateAtOffset ( global highp float) +0:64 direct index (layout( location=7) smooth temp highp float) +0:64 'z' (layout( location=7) smooth in 1-element array of highp float) +0:64 Constant: +0:64 0 (const int) +0:64 Constant: +0:64 0.000000 +0:64 0.000000 +0:65 move second child to first child ( temp highp 4-component vector of float) +0:65 'fragColor' (layout( location=0) out mediump 4-component vector of float) +0:65 interpolateAtOffset ( global highp 4-component vector of float) +0:65 'w' (layout( location=8) smooth in highp 4-component vector of float) +0:65 Constant: +0:65 0.000000 +0:65 0.000000 +0:66 move second child to first child ( temp highp 4-component vector of float) +0:66 'fragColor' (layout( location=0) out mediump 4-component vector of float) +0:66 interpolateAtOffset ( global highp 4-component vector of float) +0:66 direct index ( temp highp 4-component vector of float) +0:66 xyz: direct index for structure ( in 1-element array of highp 4-component vector of float) +0:66 'anon@0' (layout( location=3) in block{ in highp float x, in 1-element array of highp 4-component vector of float xyz, in structure{ global highp 4-component vector of float s_v} s0}) +0:66 Constant: +0:66 1 (const uint) +0:66 Constant: +0:66 0 (const int) +0:66 Constant: +0:66 0.000000 +0:66 0.000000 +0:69 move second child to first child ( temp mediump 4-component vector of float) +0:69 'fragColor' (layout( location=0) out mediump 4-component vector of float) +0:69 Construct vec4 ( temp mediump 4-component vector of float) +0:69 interpolateAtOffset ( global highp float) +0:69 a: direct index for structure ( global highp float) +0:69 'v_var' (layout( location=0) smooth in structure{ global highp float a, global highp float b}) +0:69 Constant: +0:69 0 (const int) +0:69 Constant: +0:69 0.000000 +0:69 0.000000 +0:70 move second child to first child ( temp mediump 4-component vector of float) +0:70 'fragColor' (layout( location=0) out mediump 4-component vector of float) +0:70 Construct vec4 ( temp mediump 4-component vector of float) +0:70 interpolateAtOffset ( global highp float) +0:70 direct index ( temp highp float) +0:70 'w' (layout( location=8) smooth in highp 4-component vector of float) +0:70 Constant: +0:70 0 (const int) +0:70 Constant: +0:70 0.000000 +0:70 0.000000 +0:71 move second child to first child ( temp mediump 4-component vector of float) +0:71 'fragColor' (layout( location=0) out mediump 4-component vector of float) +0:71 Construct vec4 ( temp mediump 4-component vector of float) +0:71 interpolateAtOffset ( global highp 4-component vector of float) +0:71 s_v: direct index for structure ( global highp 4-component vector of float) +0:71 s0: direct index for structure ( in structure{ global highp 4-component vector of float s_v}) +0:71 'anon@0' (layout( location=3) in block{ in highp float x, in 1-element array of highp 4-component vector of float xyz, in structure{ global highp 4-component vector of float s_v} s0}) +0:71 Constant: +0:71 2 (const uint) +0:71 Constant: +0:71 0 (const int) +0:71 Constant: +0:71 0.000000 +0:71 0.000000 +0:? Linker Objects +0:? 'v_var' (layout( location=0) smooth in structure{ global highp float a, global highp float b}) +0:? 'v' (layout( location=2) smooth in highp float) +0:? 'anon@0' (layout( location=3) in block{ in highp float x, in 1-element array of highp 4-component vector of float xyz, in structure{ global highp 4-component vector of float s_v} s0}) +0:? 'z' (layout( location=7) smooth in 1-element array of highp float) +0:? 'w' (layout( location=8) smooth in highp 4-component vector of float) +0:? 'fragColor' (layout( location=0) out mediump 4-component vector of float) + + +Linked fragment stage: + + +Shader version: 320 +ERROR: node is still EOpNull! +0:27 Function Definition: main( ( global void) +0:27 Function Parameters: +0:32 Sequence +0:32 Sequence +0:32 move second child to first child ( temp mediump 4-component vector of float) +0:32 'fragColor' (layout( location=0) out mediump 4-component vector of float) +0:32 Construct vec4 ( temp mediump 4-component vector of float) +0:32 interpolateAtCentroid ( global highp float) +0:32 'v' (layout( location=2) smooth in highp float) +0:33 move second child to first child ( temp mediump 4-component vector of float) +0:33 'fragColor' (layout( location=0) out mediump 4-component vector of float) +0:33 Construct vec4 ( temp mediump 4-component vector of float) +0:33 interpolateAtCentroid ( global highp float) +0:33 x: direct index for structure ( in highp float) +0:33 'anon@0' (layout( location=3) in block{ in highp float x, in 1-element array of highp 4-component vector of float xyz, in structure{ global highp 4-component vector of float s_v} s0}) +0:33 Constant: +0:33 0 (const uint) +0:34 move second child to first child ( temp mediump 4-component vector of float) +0:34 'fragColor' (layout( location=0) out mediump 4-component vector of float) +0:34 Construct vec4 ( temp mediump 4-component vector of float) +0:34 interpolateAtCentroid ( global highp float) +0:34 direct index (layout( location=7) smooth temp highp float) +0:34 'z' (layout( location=7) smooth in 1-element array of highp float) +0:34 Constant: +0:34 0 (const int) +0:35 move second child to first child ( temp highp 4-component vector of float) +0:35 'fragColor' (layout( location=0) out mediump 4-component vector of float) +0:35 interpolateAtCentroid ( global highp 4-component vector of float) +0:35 'w' (layout( location=8) smooth in highp 4-component vector of float) +0:36 move second child to first child ( temp highp 4-component vector of float) +0:36 'fragColor' (layout( location=0) out mediump 4-component vector of float) +0:36 interpolateAtCentroid ( global highp 4-component vector of float) +0:36 direct index ( temp highp 4-component vector of float) +0:36 xyz: direct index for structure ( in 1-element array of highp 4-component vector of float) +0:36 'anon@0' (layout( location=3) in block{ in highp float x, in 1-element array of highp 4-component vector of float xyz, in structure{ global highp 4-component vector of float s_v} s0}) +0:36 Constant: +0:36 1 (const uint) +0:36 Constant: +0:36 0 (const int) +0:39 move second child to first child ( temp mediump 4-component vector of float) +0:39 'fragColor' (layout( location=0) out mediump 4-component vector of float) +0:39 Construct vec4 ( temp mediump 4-component vector of float) +0:39 interpolateAtCentroid ( global highp float) +0:39 a: direct index for structure ( global highp float) +0:39 'v_var' (layout( location=0) smooth in structure{ global highp float a, global highp float b}) +0:39 Constant: +0:39 0 (const int) +0:40 move second child to first child ( temp mediump 4-component vector of float) +0:40 'fragColor' (layout( location=0) out mediump 4-component vector of float) +0:40 Construct vec4 ( temp mediump 4-component vector of float) +0:40 interpolateAtCentroid ( global highp float) +0:40 direct index ( temp highp float) +0:40 'w' (layout( location=8) smooth in highp 4-component vector of float) +0:40 Constant: +0:40 0 (const int) +0:41 move second child to first child ( temp mediump 4-component vector of float) +0:41 'fragColor' (layout( location=0) out mediump 4-component vector of float) +0:41 Construct vec4 ( temp mediump 4-component vector of float) +0:41 interpolateAtCentroid ( global highp 4-component vector of float) +0:41 s_v: direct index for structure ( global highp 4-component vector of float) +0:41 s0: direct index for structure ( in structure{ global highp 4-component vector of float s_v}) +0:41 'anon@0' (layout( location=3) in block{ in highp float x, in 1-element array of highp 4-component vector of float xyz, in structure{ global highp 4-component vector of float s_v} s0}) +0:41 Constant: +0:41 2 (const uint) +0:41 Constant: +0:41 0 (const int) +0:47 Sequence +0:47 move second child to first child ( temp mediump 4-component vector of float) +0:47 'fragColor' (layout( location=0) out mediump 4-component vector of float) +0:47 Construct vec4 ( temp mediump 4-component vector of float) +0:47 interpolateAtSample ( global highp float) +0:47 'v' (layout( location=2) smooth in highp float) +0:47 Constant: +0:47 0 (const int) +0:48 move second child to first child ( temp mediump 4-component vector of float) +0:48 'fragColor' (layout( location=0) out mediump 4-component vector of float) +0:48 Construct vec4 ( temp mediump 4-component vector of float) +0:48 interpolateAtSample ( global highp float) +0:48 x: direct index for structure ( in highp float) +0:48 'anon@0' (layout( location=3) in block{ in highp float x, in 1-element array of highp 4-component vector of float xyz, in structure{ global highp 4-component vector of float s_v} s0}) +0:48 Constant: +0:48 0 (const uint) +0:48 Constant: +0:48 0 (const int) +0:49 move second child to first child ( temp mediump 4-component vector of float) +0:49 'fragColor' (layout( location=0) out mediump 4-component vector of float) +0:49 Construct vec4 ( temp mediump 4-component vector of float) +0:49 interpolateAtSample ( global highp float) +0:49 direct index (layout( location=7) smooth temp highp float) +0:49 'z' (layout( location=7) smooth in 1-element array of highp float) +0:49 Constant: +0:49 0 (const int) +0:49 Constant: +0:49 0 (const int) +0:50 move second child to first child ( temp highp 4-component vector of float) +0:50 'fragColor' (layout( location=0) out mediump 4-component vector of float) +0:50 interpolateAtSample ( global highp 4-component vector of float) +0:50 'w' (layout( location=8) smooth in highp 4-component vector of float) +0:50 Constant: +0:50 0 (const int) +0:51 move second child to first child ( temp highp 4-component vector of float) +0:51 'fragColor' (layout( location=0) out mediump 4-component vector of float) +0:51 interpolateAtSample ( global highp 4-component vector of float) +0:51 direct index ( temp highp 4-component vector of float) +0:51 xyz: direct index for structure ( in 1-element array of highp 4-component vector of float) +0:51 'anon@0' (layout( location=3) in block{ in highp float x, in 1-element array of highp 4-component vector of float xyz, in structure{ global highp 4-component vector of float s_v} s0}) +0:51 Constant: +0:51 1 (const uint) +0:51 Constant: +0:51 0 (const int) +0:51 Constant: +0:51 0 (const int) +0:54 move second child to first child ( temp mediump 4-component vector of float) +0:54 'fragColor' (layout( location=0) out mediump 4-component vector of float) +0:54 Construct vec4 ( temp mediump 4-component vector of float) +0:54 interpolateAtSample ( global highp float) +0:54 a: direct index for structure ( global highp float) +0:54 'v_var' (layout( location=0) smooth in structure{ global highp float a, global highp float b}) +0:54 Constant: +0:54 0 (const int) +0:54 Constant: +0:54 0 (const int) +0:55 move second child to first child ( temp mediump 4-component vector of float) +0:55 'fragColor' (layout( location=0) out mediump 4-component vector of float) +0:55 Construct vec4 ( temp mediump 4-component vector of float) +0:55 interpolateAtSample ( global highp float) +0:55 direct index ( temp highp float) +0:55 'w' (layout( location=8) smooth in highp 4-component vector of float) +0:55 Constant: +0:55 0 (const int) +0:55 Constant: +0:55 0 (const int) +0:56 move second child to first child ( temp mediump 4-component vector of float) +0:56 'fragColor' (layout( location=0) out mediump 4-component vector of float) +0:56 Construct vec4 ( temp mediump 4-component vector of float) +0:56 interpolateAtSample ( global highp 4-component vector of float) +0:56 s_v: direct index for structure ( global highp 4-component vector of float) +0:56 s0: direct index for structure ( in structure{ global highp 4-component vector of float s_v}) +0:56 'anon@0' (layout( location=3) in block{ in highp float x, in 1-element array of highp 4-component vector of float xyz, in structure{ global highp 4-component vector of float s_v} s0}) +0:56 Constant: +0:56 2 (const uint) +0:56 Constant: +0:56 0 (const int) +0:56 Constant: +0:56 0 (const int) +0:62 Sequence +0:62 move second child to first child ( temp mediump 4-component vector of float) +0:62 'fragColor' (layout( location=0) out mediump 4-component vector of float) +0:62 Construct vec4 ( temp mediump 4-component vector of float) +0:62 interpolateAtOffset ( global highp float) +0:62 'v' (layout( location=2) smooth in highp float) +0:62 Constant: +0:62 0.000000 +0:62 0.000000 +0:63 move second child to first child ( temp mediump 4-component vector of float) +0:63 'fragColor' (layout( location=0) out mediump 4-component vector of float) +0:63 Construct vec4 ( temp mediump 4-component vector of float) +0:63 interpolateAtOffset ( global highp float) +0:63 x: direct index for structure ( in highp float) +0:63 'anon@0' (layout( location=3) in block{ in highp float x, in 1-element array of highp 4-component vector of float xyz, in structure{ global highp 4-component vector of float s_v} s0}) +0:63 Constant: +0:63 0 (const uint) +0:63 Constant: +0:63 0.000000 +0:63 0.000000 +0:64 move second child to first child ( temp mediump 4-component vector of float) +0:64 'fragColor' (layout( location=0) out mediump 4-component vector of float) +0:64 Construct vec4 ( temp mediump 4-component vector of float) +0:64 interpolateAtOffset ( global highp float) +0:64 direct index (layout( location=7) smooth temp highp float) +0:64 'z' (layout( location=7) smooth in 1-element array of highp float) +0:64 Constant: +0:64 0 (const int) +0:64 Constant: +0:64 0.000000 +0:64 0.000000 +0:65 move second child to first child ( temp highp 4-component vector of float) +0:65 'fragColor' (layout( location=0) out mediump 4-component vector of float) +0:65 interpolateAtOffset ( global highp 4-component vector of float) +0:65 'w' (layout( location=8) smooth in highp 4-component vector of float) +0:65 Constant: +0:65 0.000000 +0:65 0.000000 +0:66 move second child to first child ( temp highp 4-component vector of float) +0:66 'fragColor' (layout( location=0) out mediump 4-component vector of float) +0:66 interpolateAtOffset ( global highp 4-component vector of float) +0:66 direct index ( temp highp 4-component vector of float) +0:66 xyz: direct index for structure ( in 1-element array of highp 4-component vector of float) +0:66 'anon@0' (layout( location=3) in block{ in highp float x, in 1-element array of highp 4-component vector of float xyz, in structure{ global highp 4-component vector of float s_v} s0}) +0:66 Constant: +0:66 1 (const uint) +0:66 Constant: +0:66 0 (const int) +0:66 Constant: +0:66 0.000000 +0:66 0.000000 +0:69 move second child to first child ( temp mediump 4-component vector of float) +0:69 'fragColor' (layout( location=0) out mediump 4-component vector of float) +0:69 Construct vec4 ( temp mediump 4-component vector of float) +0:69 interpolateAtOffset ( global highp float) +0:69 a: direct index for structure ( global highp float) +0:69 'v_var' (layout( location=0) smooth in structure{ global highp float a, global highp float b}) +0:69 Constant: +0:69 0 (const int) +0:69 Constant: +0:69 0.000000 +0:69 0.000000 +0:70 move second child to first child ( temp mediump 4-component vector of float) +0:70 'fragColor' (layout( location=0) out mediump 4-component vector of float) +0:70 Construct vec4 ( temp mediump 4-component vector of float) +0:70 interpolateAtOffset ( global highp float) +0:70 direct index ( temp highp float) +0:70 'w' (layout( location=8) smooth in highp 4-component vector of float) +0:70 Constant: +0:70 0 (const int) +0:70 Constant: +0:70 0.000000 +0:70 0.000000 +0:71 move second child to first child ( temp mediump 4-component vector of float) +0:71 'fragColor' (layout( location=0) out mediump 4-component vector of float) +0:71 Construct vec4 ( temp mediump 4-component vector of float) +0:71 interpolateAtOffset ( global highp 4-component vector of float) +0:71 s_v: direct index for structure ( global highp 4-component vector of float) +0:71 s0: direct index for structure ( in structure{ global highp 4-component vector of float s_v}) +0:71 'anon@0' (layout( location=3) in block{ in highp float x, in 1-element array of highp 4-component vector of float xyz, in structure{ global highp 4-component vector of float s_v} s0}) +0:71 Constant: +0:71 2 (const uint) +0:71 Constant: +0:71 0 (const int) +0:71 Constant: +0:71 0.000000 +0:71 0.000000 +0:? Linker Objects +0:? 'v_var' (layout( location=0) smooth in structure{ global highp float a, global highp float b}) +0:? 'v' (layout( location=2) smooth in highp float) +0:? 'anon@0' (layout( location=3) in block{ in highp float x, in 1-element array of highp 4-component vector of float xyz, in structure{ global highp 4-component vector of float s_v} s0}) +0:? 'z' (layout( location=7) smooth in 1-element array of highp float) +0:? 'w' (layout( location=8) smooth in highp 4-component vector of float) +0:? 'fragColor' (layout( location=0) out mediump 4-component vector of float) + diff --git a/Test/baseResults/hlsl.buffer_ref_parameter.comp.out b/Test/baseResults/hlsl.buffer_ref_parameter.comp.out new file mode 100755 index 00000000..4ddf6f70 --- /dev/null +++ b/Test/baseResults/hlsl.buffer_ref_parameter.comp.out @@ -0,0 +1,390 @@ +hlsl.buffer_ref_parameter.comp +Shader version: 500 +local_size = (64, 1, 1) +0:? Sequence +0:4 Function Definition: pull_position(block--u1[0]1;u1; ( temp 3-component vector of float) +0:4 Function Parameters: +0:4 'buffer_position' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of uint @data}) +0:4 'vertex_id' ( in uint) +0:? Sequence +0:5 Branch: Return with expression +0:? intBitsToFloat ( temp 3-component vector of float) +0:? Sequence +0:5 move second child to first child ( temp int) +0:5 'byteAddrTemp' ( temp int) +0:5 right-shift ( temp int) +0:5 component-wise multiply ( temp uint) +0:5 component-wise multiply ( temp uint) +0:5 'vertex_id' ( in uint) +0:5 Constant: +0:5 3 (const uint) +0:5 Constant: +0:5 4 (const uint) +0:5 Constant: +0:5 2 (const int) +0:? Construct vec3 ( temp 3-component vector of uint) +0:5 indirect index ( temp uint) +0:5 @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of uint) +0:5 'buffer_position' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of uint @data}) +0:5 Constant: +0:5 0 (const uint) +0:5 'byteAddrTemp' ( temp int) +0:5 indirect index ( temp uint) +0:5 @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of uint) +0:5 'buffer_position' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of uint @data}) +0:5 Constant: +0:5 0 (const uint) +0:5 add ( temp int) +0:5 'byteAddrTemp' ( temp int) +0:5 Constant: +0:5 1 (const int) +0:5 indirect index ( temp uint) +0:5 @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of uint) +0:5 'buffer_position' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of uint @data}) +0:5 Constant: +0:5 0 (const uint) +0:5 add ( temp int) +0:5 'byteAddrTemp' ( temp int) +0:5 Constant: +0:5 2 (const int) +0:9 Function Definition: @main(u1; ( temp void) +0:9 Function Parameters: +0:9 'gi' ( in uint) +0:? Sequence +0:10 Sequence +0:10 move second child to first child ( temp 3-component vector of float) +0:10 'position_ms' ( temp 3-component vector of float) +0:10 Function Call: pull_position(block--u1[0]1;u1; ( temp 3-component vector of float) +0:10 'buffer_position_ms' (layout( set=0 binding=0 row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of uint @data}) +0:10 'gi' ( in uint) +0:? Sequence +0:12 move second child to first child ( temp int) +0:12 'byteAddrTemp' ( temp int) +0:12 right-shift ( temp int) +0:12 Constant: +0:12 0 (const int) +0:12 Constant: +0:12 2 (const int) +0:12 move second child to first child ( temp uint) +0:12 indirect index (layout( row_major std430) buffer uint) +0:12 @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of uint) +0:12 'r' (layout( set=0 binding=1 row_major std430) buffer block{layout( row_major std430) buffer unsized 1-element array of uint @data}) +0:12 Constant: +0:12 0 (const uint) +0:12 'byteAddrTemp' ( temp int) +0:12 direct index ( temp uint) +0:12 floatBitsToUint ( temp 3-component vector of uint) +0:12 'position_ms' ( temp 3-component vector of float) +0:12 Constant: +0:12 0 (const int) +0:12 move second child to first child ( temp uint) +0:12 indirect index (layout( row_major std430) buffer uint) +0:12 @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of uint) +0:12 'r' (layout( set=0 binding=1 row_major std430) buffer block{layout( row_major std430) buffer unsized 1-element array of uint @data}) +0:12 Constant: +0:12 0 (const uint) +0:12 add ( temp int) +0:12 'byteAddrTemp' ( temp int) +0:12 Constant: +0:12 1 (const int) +0:12 direct index ( temp uint) +0:12 floatBitsToUint ( temp 3-component vector of uint) +0:12 'position_ms' ( temp 3-component vector of float) +0:12 Constant: +0:12 1 (const int) +0:12 move second child to first child ( temp uint) +0:12 indirect index (layout( row_major std430) buffer uint) +0:12 @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of uint) +0:12 'r' (layout( set=0 binding=1 row_major std430) buffer block{layout( row_major std430) buffer unsized 1-element array of uint @data}) +0:12 Constant: +0:12 0 (const uint) +0:12 add ( temp int) +0:12 'byteAddrTemp' ( temp int) +0:12 Constant: +0:12 2 (const int) +0:12 direct index ( temp uint) +0:12 floatBitsToUint ( temp 3-component vector of uint) +0:12 'position_ms' ( temp 3-component vector of float) +0:12 Constant: +0:12 2 (const int) +0:9 Function Definition: main( ( temp void) +0:9 Function Parameters: +0:? Sequence +0:9 move second child to first child ( temp uint) +0:? 'gi' ( temp uint) +0:? 'gi' ( in uint LocalInvocationIndex) +0:9 Function Call: @main(u1; ( temp void) +0:? 'gi' ( temp uint) +0:? Linker Objects +0:? 'buffer_position_ms' (layout( set=0 binding=0 row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of uint @data}) +0:? 'r' (layout( set=0 binding=1 row_major std430) buffer block{layout( row_major std430) buffer unsized 1-element array of uint @data}) +0:? 'gi' ( in uint LocalInvocationIndex) + + +Linked compute stage: + + +Shader version: 500 +local_size = (64, 1, 1) +0:? Sequence +0:4 Function Definition: pull_position(block--u1[0]1;u1; ( temp 3-component vector of float) +0:4 Function Parameters: +0:4 'buffer_position' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of uint @data}) +0:4 'vertex_id' ( in uint) +0:? Sequence +0:5 Branch: Return with expression +0:? intBitsToFloat ( temp 3-component vector of float) +0:? Sequence +0:5 move second child to first child ( temp int) +0:5 'byteAddrTemp' ( temp int) +0:5 right-shift ( temp int) +0:5 component-wise multiply ( temp uint) +0:5 component-wise multiply ( temp uint) +0:5 'vertex_id' ( in uint) +0:5 Constant: +0:5 3 (const uint) +0:5 Constant: +0:5 4 (const uint) +0:5 Constant: +0:5 2 (const int) +0:? Construct vec3 ( temp 3-component vector of uint) +0:5 indirect index ( temp uint) +0:5 @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of uint) +0:5 'buffer_position' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of uint @data}) +0:5 Constant: +0:5 0 (const uint) +0:5 'byteAddrTemp' ( temp int) +0:5 indirect index ( temp uint) +0:5 @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of uint) +0:5 'buffer_position' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of uint @data}) +0:5 Constant: +0:5 0 (const uint) +0:5 add ( temp int) +0:5 'byteAddrTemp' ( temp int) +0:5 Constant: +0:5 1 (const int) +0:5 indirect index ( temp uint) +0:5 @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of uint) +0:5 'buffer_position' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of uint @data}) +0:5 Constant: +0:5 0 (const uint) +0:5 add ( temp int) +0:5 'byteAddrTemp' ( temp int) +0:5 Constant: +0:5 2 (const int) +0:9 Function Definition: @main(u1; ( temp void) +0:9 Function Parameters: +0:9 'gi' ( in uint) +0:? Sequence +0:10 Sequence +0:10 move second child to first child ( temp 3-component vector of float) +0:10 'position_ms' ( temp 3-component vector of float) +0:10 Function Call: pull_position(block--u1[0]1;u1; ( temp 3-component vector of float) +0:10 'buffer_position_ms' (layout( set=0 binding=0 row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of uint @data}) +0:10 'gi' ( in uint) +0:? Sequence +0:12 move second child to first child ( temp int) +0:12 'byteAddrTemp' ( temp int) +0:12 right-shift ( temp int) +0:12 Constant: +0:12 0 (const int) +0:12 Constant: +0:12 2 (const int) +0:12 move second child to first child ( temp uint) +0:12 indirect index (layout( row_major std430) buffer uint) +0:12 @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of uint) +0:12 'r' (layout( set=0 binding=1 row_major std430) buffer block{layout( row_major std430) buffer unsized 1-element array of uint @data}) +0:12 Constant: +0:12 0 (const uint) +0:12 'byteAddrTemp' ( temp int) +0:12 direct index ( temp uint) +0:12 floatBitsToUint ( temp 3-component vector of uint) +0:12 'position_ms' ( temp 3-component vector of float) +0:12 Constant: +0:12 0 (const int) +0:12 move second child to first child ( temp uint) +0:12 indirect index (layout( row_major std430) buffer uint) +0:12 @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of uint) +0:12 'r' (layout( set=0 binding=1 row_major std430) buffer block{layout( row_major std430) buffer unsized 1-element array of uint @data}) +0:12 Constant: +0:12 0 (const uint) +0:12 add ( temp int) +0:12 'byteAddrTemp' ( temp int) +0:12 Constant: +0:12 1 (const int) +0:12 direct index ( temp uint) +0:12 floatBitsToUint ( temp 3-component vector of uint) +0:12 'position_ms' ( temp 3-component vector of float) +0:12 Constant: +0:12 1 (const int) +0:12 move second child to first child ( temp uint) +0:12 indirect index (layout( row_major std430) buffer uint) +0:12 @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of uint) +0:12 'r' (layout( set=0 binding=1 row_major std430) buffer block{layout( row_major std430) buffer unsized 1-element array of uint @data}) +0:12 Constant: +0:12 0 (const uint) +0:12 add ( temp int) +0:12 'byteAddrTemp' ( temp int) +0:12 Constant: +0:12 2 (const int) +0:12 direct index ( temp uint) +0:12 floatBitsToUint ( temp 3-component vector of uint) +0:12 'position_ms' ( temp 3-component vector of float) +0:12 Constant: +0:12 2 (const int) +0:9 Function Definition: main( ( temp void) +0:9 Function Parameters: +0:? Sequence +0:9 move second child to first child ( temp uint) +0:? 'gi' ( temp uint) +0:? 'gi' ( in uint LocalInvocationIndex) +0:9 Function Call: @main(u1; ( temp void) +0:? 'gi' ( temp uint) +0:? Linker Objects +0:? 'buffer_position_ms' (layout( set=0 binding=0 row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of uint @data}) +0:? 'r' (layout( set=0 binding=1 row_major std430) buffer block{layout( row_major std430) buffer unsized 1-element array of uint @data}) +0:? 'gi' ( in uint LocalInvocationIndex) + +// Module Version 10400 +// Generated by (magic number): 8000b +// Id's are bound by 90 + + Capability Shader + 1: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint GLCompute 4 "main" 53 62 85 + ExecutionMode 4 LocalSize 64 1 1 + Source HLSL 500 + Name 4 "main" + Name 8 "" + MemberName 8 0 "@data" + Name 16 "pull_position(block--u1[0]1;u1;" + Name 14 "buffer_position" + Name 15 "vertex_id" + Name 20 "@main(u1;" + Name 19 "gi" + Name 24 "byteAddrTemp" + Name 52 "position_ms" + Name 53 "buffer_position_ms" + Name 54 "param" + Name 57 "byteAddrTemp" + Name 60 "r" + MemberName 60(r) 0 "@data" + Name 62 "r" + Name 83 "gi" + Name 85 "gi" + Name 87 "param" + Decorate 7 ArrayStride 4 + MemberDecorate 8 0 NonWritable + MemberDecorate 8 0 Offset 0 + Decorate 8 Block + Decorate 14(buffer_position) NonWritable + Decorate 53(buffer_position_ms) DescriptorSet 0 + Decorate 53(buffer_position_ms) Binding 0 + Decorate 59 ArrayStride 4 + MemberDecorate 60(r) 0 Offset 0 + Decorate 60(r) Block + Decorate 62(r) DescriptorSet 0 + Decorate 62(r) Binding 1 + Decorate 85(gi) BuiltIn LocalInvocationIndex + 2: TypeVoid + 3: TypeFunction 2 + 6: TypeInt 32 0 + 7: TypeRuntimeArray 6(int) + 8: TypeStruct 7 + 9: TypePointer StorageBuffer 8(struct) + 10: TypePointer Function 6(int) + 11: TypeFloat 32 + 12: TypeVector 11(float) 3 + 13: TypeFunction 12(fvec3) 9(ptr) 10(ptr) + 18: TypeFunction 2 10(ptr) + 22: TypeInt 32 1 + 23: TypePointer Function 22(int) + 26: 6(int) Constant 3 + 28: 6(int) Constant 4 + 30: 22(int) Constant 2 + 32: 22(int) Constant 0 + 34: TypePointer StorageBuffer 6(int) + 38: 22(int) Constant 1 + 46: TypeVector 6(int) 3 + 51: TypePointer Function 12(fvec3) +53(buffer_position_ms): 9(ptr) Variable StorageBuffer + 59: TypeRuntimeArray 6(int) + 60(r): TypeStruct 59 + 61: TypePointer StorageBuffer 60(r) + 62(r): 61(ptr) Variable StorageBuffer + 66: 6(int) Constant 0 + 73: 6(int) Constant 1 + 80: 6(int) Constant 2 + 84: TypePointer Input 6(int) + 85(gi): 84(ptr) Variable Input + 4(main): 2 Function None 3 + 5: Label + 83(gi): 10(ptr) Variable Function + 87(param): 10(ptr) Variable Function + 86: 6(int) Load 85(gi) + Store 83(gi) 86 + 88: 6(int) Load 83(gi) + Store 87(param) 88 + 89: 2 FunctionCall 20(@main(u1;) 87(param) + Return + FunctionEnd +16(pull_position(block--u1[0]1;u1;): 12(fvec3) Function None 13 +14(buffer_position): 9(ptr) FunctionParameter + 15(vertex_id): 10(ptr) FunctionParameter + 17: Label +24(byteAddrTemp): 23(ptr) Variable Function + 25: 6(int) Load 15(vertex_id) + 27: 6(int) IMul 25 26 + 29: 6(int) IMul 27 28 + 31: 22(int) ShiftRightLogical 29 30 + Store 24(byteAddrTemp) 31 + 33: 22(int) Load 24(byteAddrTemp) + 35: 34(ptr) AccessChain 14(buffer_position) 32 33 + 36: 6(int) Load 35 + 37: 22(int) Load 24(byteAddrTemp) + 39: 22(int) IAdd 37 38 + 40: 34(ptr) AccessChain 14(buffer_position) 32 39 + 41: 6(int) Load 40 + 42: 22(int) Load 24(byteAddrTemp) + 43: 22(int) IAdd 42 30 + 44: 34(ptr) AccessChain 14(buffer_position) 32 43 + 45: 6(int) Load 44 + 47: 46(ivec3) CompositeConstruct 36 41 45 + 48: 12(fvec3) Bitcast 47 + ReturnValue 48 + FunctionEnd + 20(@main(u1;): 2 Function None 18 + 19(gi): 10(ptr) FunctionParameter + 21: Label + 52(position_ms): 51(ptr) Variable Function + 54(param): 10(ptr) Variable Function +57(byteAddrTemp): 23(ptr) Variable Function + 55: 6(int) Load 19(gi) + Store 54(param) 55 + 56: 12(fvec3) FunctionCall 16(pull_position(block--u1[0]1;u1;) 53(buffer_position_ms) 54(param) + Store 52(position_ms) 56 + 58: 22(int) ShiftRightArithmetic 32 30 + Store 57(byteAddrTemp) 58 + 63: 22(int) Load 57(byteAddrTemp) + 64: 12(fvec3) Load 52(position_ms) + 65: 46(ivec3) Bitcast 64 + 67: 6(int) CompositeExtract 65 0 + 68: 34(ptr) AccessChain 62(r) 32 63 + Store 68 67 + 69: 22(int) Load 57(byteAddrTemp) + 70: 22(int) IAdd 69 38 + 71: 12(fvec3) Load 52(position_ms) + 72: 46(ivec3) Bitcast 71 + 74: 6(int) CompositeExtract 72 1 + 75: 34(ptr) AccessChain 62(r) 32 70 + Store 75 74 + 76: 22(int) Load 57(byteAddrTemp) + 77: 22(int) IAdd 76 30 + 78: 12(fvec3) Load 52(position_ms) + 79: 46(ivec3) Bitcast 78 + 81: 6(int) CompositeExtract 79 2 + 82: 34(ptr) AccessChain 62(r) 32 77 + Store 82 81 + Return + FunctionEnd diff --git a/Test/baseResults/hlsl.conditional.frag.out b/Test/baseResults/hlsl.conditional.frag.out index e1606817..47c7877a 100755 --- a/Test/baseResults/hlsl.conditional.frag.out +++ b/Test/baseResults/hlsl.conditional.frag.out @@ -216,33 +216,98 @@ gl_FragCoord origin is upper left 0:39 Convert int to float ( temp float) 0:39 'd' ( temp int) 0:39 'input' ( in 4-component vector of float) -0:41 Branch: Return with expression -0:40 add ( temp 4-component vector of float) -0:40 add ( temp 4-component vector of float) -0:40 add ( temp 4-component vector of float) -0:40 add ( temp 4-component vector of float) -0:40 vector-scale ( temp 4-component vector of float) -0:40 Convert int to float ( temp float) -0:40 'e' ( temp int) -0:40 'ret' ( temp 4-component vector of float) -0:40 'f' ( temp 4-component vector of float) -0:40 Function Call: vectorCond( ( temp 4-component vector of float) -0:40 Function Call: scalarCond( ( temp 4-component vector of float) -0:41 Construct vec4 ( temp 4-component vector of float) -0:41 Function Call: fbSelect(vb2;vf2;vf2; ( temp 2-component vector of float) +0:40 Sequence +0:40 move second child to first child ( temp uint) +0:40 'g' ( temp uint) +0:40 Test condition and select ( temp uint): no shortcircuit +0:40 Condition +0:40 Compare Greater Than ( temp bool) +0:40 Convert int to float ( temp float) +0:40 'd' ( temp int) +0:40 Constant: +0:40 0.000000 +0:40 true case +0:40 Constant: +0:40 21 (const uint) +0:40 false case +0:40 Constant: +0:40 0 (const uint) +0:41 Sequence +0:41 move second child to first child ( temp uint) +0:41 'h' ( temp uint) +0:41 Test condition and select ( temp uint): no shortcircuit +0:41 Condition +0:41 Compare Greater Than ( temp bool) +0:41 Convert uint to float ( temp float) +0:41 'g' ( temp uint) 0:41 Constant: -0:41 true (const bool) -0:41 false (const bool) -0:41 Constant: -0:41 1.000000 -0:41 2.000000 -0:41 Constant: -0:41 3.000000 -0:41 4.000000 +0:41 0.000000 +0:41 true case 0:41 Constant: -0:41 10.000000 +0:41 63 (const uint) +0:41 false case 0:41 Constant: -0:41 10.000000 +0:41 0 (const uint) +0:42 Sequence +0:42 move second child to first child ( temp uint) +0:42 'i' ( temp uint) +0:42 Test condition and select ( temp uint): no shortcircuit +0:42 Condition +0:42 Compare Greater Than ( temp bool) +0:42 Convert uint to float ( temp float) +0:42 'h' ( temp uint) +0:42 Constant: +0:42 0.000000 +0:42 true case +0:42 Constant: +0:42 5 (const uint) +0:42 false case +0:42 Constant: +0:42 1 (const uint) +0:43 Sequence +0:43 move second child to first child ( temp uint) +0:43 'j' ( temp uint) +0:43 Convert int to uint ( temp uint) +0:43 Test condition and select ( temp int): no shortcircuit +0:43 Condition +0:43 Compare Greater Than ( temp bool) +0:43 Convert uint to float ( temp float) +0:43 'i' ( temp uint) +0:43 Constant: +0:43 0.000000 +0:43 true case +0:43 Constant: +0:43 43981 (const int) +0:43 false case +0:43 Constant: +0:43 48346 (const int) +0:45 Branch: Return with expression +0:44 add ( temp 4-component vector of float) +0:44 add ( temp 4-component vector of float) +0:44 add ( temp 4-component vector of float) +0:44 add ( temp 4-component vector of float) +0:44 vector-scale ( temp 4-component vector of float) +0:44 Convert int to float ( temp float) +0:44 'e' ( temp int) +0:44 'ret' ( temp 4-component vector of float) +0:44 'f' ( temp 4-component vector of float) +0:44 Function Call: vectorCond( ( temp 4-component vector of float) +0:44 Function Call: scalarCond( ( temp 4-component vector of float) +0:45 Construct vec4 ( temp 4-component vector of float) +0:45 Function Call: fbSelect(vb2;vf2;vf2; ( temp 2-component vector of float) +0:45 Constant: +0:45 true (const bool) +0:45 false (const bool) +0:45 Constant: +0:45 1.000000 +0:45 2.000000 +0:45 Constant: +0:45 3.000000 +0:45 4.000000 +0:45 Constant: +0:45 10.000000 +0:45 Constant: +0:45 10.000000 0:27 Function Definition: PixelShaderFunction( ( temp void) 0:27 Function Parameters: 0:? Sequence @@ -479,33 +544,98 @@ gl_FragCoord origin is upper left 0:39 Convert int to float ( temp float) 0:39 'd' ( temp int) 0:39 'input' ( in 4-component vector of float) -0:41 Branch: Return with expression -0:40 add ( temp 4-component vector of float) -0:40 add ( temp 4-component vector of float) -0:40 add ( temp 4-component vector of float) -0:40 add ( temp 4-component vector of float) -0:40 vector-scale ( temp 4-component vector of float) -0:40 Convert int to float ( temp float) -0:40 'e' ( temp int) -0:40 'ret' ( temp 4-component vector of float) -0:40 'f' ( temp 4-component vector of float) -0:40 Function Call: vectorCond( ( temp 4-component vector of float) -0:40 Function Call: scalarCond( ( temp 4-component vector of float) -0:41 Construct vec4 ( temp 4-component vector of float) -0:41 Function Call: fbSelect(vb2;vf2;vf2; ( temp 2-component vector of float) +0:40 Sequence +0:40 move second child to first child ( temp uint) +0:40 'g' ( temp uint) +0:40 Test condition and select ( temp uint): no shortcircuit +0:40 Condition +0:40 Compare Greater Than ( temp bool) +0:40 Convert int to float ( temp float) +0:40 'd' ( temp int) +0:40 Constant: +0:40 0.000000 +0:40 true case +0:40 Constant: +0:40 21 (const uint) +0:40 false case +0:40 Constant: +0:40 0 (const uint) +0:41 Sequence +0:41 move second child to first child ( temp uint) +0:41 'h' ( temp uint) +0:41 Test condition and select ( temp uint): no shortcircuit +0:41 Condition +0:41 Compare Greater Than ( temp bool) +0:41 Convert uint to float ( temp float) +0:41 'g' ( temp uint) 0:41 Constant: -0:41 true (const bool) -0:41 false (const bool) -0:41 Constant: -0:41 1.000000 -0:41 2.000000 -0:41 Constant: -0:41 3.000000 -0:41 4.000000 +0:41 0.000000 +0:41 true case 0:41 Constant: -0:41 10.000000 +0:41 63 (const uint) +0:41 false case 0:41 Constant: -0:41 10.000000 +0:41 0 (const uint) +0:42 Sequence +0:42 move second child to first child ( temp uint) +0:42 'i' ( temp uint) +0:42 Test condition and select ( temp uint): no shortcircuit +0:42 Condition +0:42 Compare Greater Than ( temp bool) +0:42 Convert uint to float ( temp float) +0:42 'h' ( temp uint) +0:42 Constant: +0:42 0.000000 +0:42 true case +0:42 Constant: +0:42 5 (const uint) +0:42 false case +0:42 Constant: +0:42 1 (const uint) +0:43 Sequence +0:43 move second child to first child ( temp uint) +0:43 'j' ( temp uint) +0:43 Convert int to uint ( temp uint) +0:43 Test condition and select ( temp int): no shortcircuit +0:43 Condition +0:43 Compare Greater Than ( temp bool) +0:43 Convert uint to float ( temp float) +0:43 'i' ( temp uint) +0:43 Constant: +0:43 0.000000 +0:43 true case +0:43 Constant: +0:43 43981 (const int) +0:43 false case +0:43 Constant: +0:43 48346 (const int) +0:45 Branch: Return with expression +0:44 add ( temp 4-component vector of float) +0:44 add ( temp 4-component vector of float) +0:44 add ( temp 4-component vector of float) +0:44 add ( temp 4-component vector of float) +0:44 vector-scale ( temp 4-component vector of float) +0:44 Convert int to float ( temp float) +0:44 'e' ( temp int) +0:44 'ret' ( temp 4-component vector of float) +0:44 'f' ( temp 4-component vector of float) +0:44 Function Call: vectorCond( ( temp 4-component vector of float) +0:44 Function Call: scalarCond( ( temp 4-component vector of float) +0:45 Construct vec4 ( temp 4-component vector of float) +0:45 Function Call: fbSelect(vb2;vf2;vf2; ( temp 2-component vector of float) +0:45 Constant: +0:45 true (const bool) +0:45 false (const bool) +0:45 Constant: +0:45 1.000000 +0:45 2.000000 +0:45 Constant: +0:45 3.000000 +0:45 4.000000 +0:45 Constant: +0:45 10.000000 +0:45 Constant: +0:45 10.000000 0:27 Function Definition: PixelShaderFunction( ( temp void) 0:27 Function Parameters: 0:? Sequence @@ -523,12 +653,12 @@ gl_FragCoord origin is upper left // Module Version 10000 // Generated by (magic number): 8000b -// Id's are bound by 206 +// Id's are bound by 233 Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Fragment 4 "PixelShaderFunction" 199 202 + EntryPoint Fragment 4 "PixelShaderFunction" 226 229 ExecutionMode 4 OriginUpperLeft Source HLSL 500 Name 4 "PixelShaderFunction" @@ -555,13 +685,17 @@ gl_FragCoord origin is upper left Name 117 "ret" Name 137 "e" Name 150 "f" - Name 186 "param" - Name 187 "param" - Name 188 "param" - Name 197 "input" - Name 199 "input" - Name 202 "@entryPointOutput" - Name 203 "param" + Name 169 "g" + Name 175 "h" + Name 181 "i" + Name 187 "j" + Name 213 "param" + Name 214 "param" + Name 215 "param" + Name 224 "input" + Name 226 "input" + Name 229 "@entryPointOutput" + Name 230 "param" MemberDecorate 29($Global) 0 Offset 0 MemberDecorate 29($Global) 1 Offset 16 MemberDecorate 29($Global) 2 Offset 32 @@ -570,8 +704,8 @@ gl_FragCoord origin is upper left Decorate 29($Global) Block Decorate 31 DescriptorSet 0 Decorate 31 Binding 0 - Decorate 199(input) Location 0 - Decorate 202(@entryPointOutput) Location 0 + Decorate 226(input) Location 0 + Decorate 229(@entryPointOutput) Location 0 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -611,29 +745,35 @@ gl_FragCoord origin is upper left 148: 32(int) Constant 11 151: TypePointer Function 6(float) 154: 139(int) Constant 1 - 178: 13(bool) ConstantTrue - 179: 13(bool) ConstantFalse - 180: 14(bvec2) ConstantComposite 178 179 - 181: 6(float) Constant 1073741824 - 182: 16(fvec2) ConstantComposite 96 181 - 183: 6(float) Constant 1077936128 - 184: 6(float) Constant 1082130432 - 185: 16(fvec2) ConstantComposite 183 184 - 190: 6(float) Constant 1092616192 - 198: TypePointer Input 7(fvec4) - 199(input): 198(ptr) Variable Input - 201: TypePointer Output 7(fvec4) -202(@entryPointOutput): 201(ptr) Variable Output + 168: TypePointer Function 139(int) + 173: 139(int) Constant 21 + 179: 139(int) Constant 63 + 185: 139(int) Constant 5 + 191: 32(int) Constant 43981 + 192: 32(int) Constant 48346 + 205: 13(bool) ConstantTrue + 206: 13(bool) ConstantFalse + 207: 14(bvec2) ConstantComposite 205 206 + 208: 6(float) Constant 1073741824 + 209: 16(fvec2) ConstantComposite 96 208 + 210: 6(float) Constant 1077936128 + 211: 6(float) Constant 1082130432 + 212: 16(fvec2) ConstantComposite 210 211 + 217: 6(float) Constant 1092616192 + 225: TypePointer Input 7(fvec4) + 226(input): 225(ptr) Variable Input + 228: TypePointer Output 7(fvec4) +229(@entryPointOutput): 228(ptr) Variable Output 4(PixelShaderFunction): 2 Function None 3 5: Label - 197(input): 24(ptr) Variable Function - 203(param): 24(ptr) Variable Function - 200: 7(fvec4) Load 199(input) - Store 197(input) 200 - 204: 7(fvec4) Load 197(input) - Store 203(param) 204 - 205: 7(fvec4) FunctionCall 27(@PixelShaderFunction(vf4;) 203(param) - Store 202(@entryPointOutput) 205 + 224(input): 24(ptr) Variable Function + 230(param): 24(ptr) Variable Function + 227: 7(fvec4) Load 226(input) + Store 224(input) 227 + 231: 7(fvec4) Load 224(input) + Store 230(param) 231 + 232: 7(fvec4) FunctionCall 27(@PixelShaderFunction(vf4;) 230(param) + Store 229(@entryPointOutput) 232 Return FunctionEnd 9(vectorCond(): 7(fvec4) Function None 8 @@ -720,9 +860,13 @@ gl_FragCoord origin is upper left 117(ret): 24(ptr) Variable Function 137(e): 109(ptr) Variable Function 150(f): 24(ptr) Variable Function - 186(param): 15(ptr) Variable Function - 187(param): 17(ptr) Variable Function - 188(param): 17(ptr) Variable Function + 169(g): 168(ptr) Variable Function + 175(h): 168(ptr) Variable Function + 181(i): 168(ptr) Variable Function + 187(j): 168(ptr) Variable Function + 213(param): 15(ptr) Variable Function + 214(param): 17(ptr) Variable Function + 215(param): 17(ptr) Variable Function Store 110(a) 111 Store 112(b) 113 Store 114(c) 115 @@ -776,23 +920,44 @@ gl_FragCoord origin is upper left 166: 43(bvec4) CompositeConstruct 157 157 157 157 167: 7(fvec4) Select 166 161 165 Store 150(f) 167 - 168: 32(int) Load 137(e) - 169: 6(float) ConvertSToF 168 - 170: 7(fvec4) Load 117(ret) - 171: 7(fvec4) VectorTimesScalar 170 169 - 172: 7(fvec4) Load 150(f) - 173: 7(fvec4) FAdd 171 172 - 174: 7(fvec4) FunctionCall 9(vectorCond() - 175: 7(fvec4) FAdd 173 174 - 176: 7(fvec4) FunctionCall 11(scalarCond() - 177: 7(fvec4) FAdd 175 176 - Store 186(param) 180 - Store 187(param) 182 - Store 188(param) 185 - 189: 16(fvec2) FunctionCall 22(fbSelect(vb2;vf2;vf2;) 186(param) 187(param) 188(param) - 191: 6(float) CompositeExtract 189 0 - 192: 6(float) CompositeExtract 189 1 - 193: 7(fvec4) CompositeConstruct 191 192 190 190 - 194: 7(fvec4) FAdd 177 193 - ReturnValue 194 + 170: 32(int) Load 116(d) + 171: 6(float) ConvertSToF 170 + 172: 13(bool) FOrdGreaterThan 171 44 + 174: 139(int) Select 172 173 140 + Store 169(g) 174 + 176: 139(int) Load 169(g) + 177: 6(float) ConvertUToF 176 + 178: 13(bool) FOrdGreaterThan 177 44 + 180: 139(int) Select 178 179 140 + Store 175(h) 180 + 182: 139(int) Load 175(h) + 183: 6(float) ConvertUToF 182 + 184: 13(bool) FOrdGreaterThan 183 44 + 186: 139(int) Select 184 185 154 + Store 181(i) 186 + 188: 139(int) Load 181(i) + 189: 6(float) ConvertUToF 188 + 190: 13(bool) FOrdGreaterThan 189 44 + 193: 32(int) Select 190 191 192 + 194: 139(int) Bitcast 193 + Store 187(j) 194 + 195: 32(int) Load 137(e) + 196: 6(float) ConvertSToF 195 + 197: 7(fvec4) Load 117(ret) + 198: 7(fvec4) VectorTimesScalar 197 196 + 199: 7(fvec4) Load 150(f) + 200: 7(fvec4) FAdd 198 199 + 201: 7(fvec4) FunctionCall 9(vectorCond() + 202: 7(fvec4) FAdd 200 201 + 203: 7(fvec4) FunctionCall 11(scalarCond() + 204: 7(fvec4) FAdd 202 203 + Store 213(param) 207 + Store 214(param) 209 + Store 215(param) 212 + 216: 16(fvec2) FunctionCall 22(fbSelect(vb2;vf2;vf2;) 213(param) 214(param) 215(param) + 218: 6(float) CompositeExtract 216 0 + 219: 6(float) CompositeExtract 216 1 + 220: 7(fvec4) CompositeConstruct 218 219 217 217 + 221: 7(fvec4) FAdd 204 220 + ReturnValue 221 FunctionEnd diff --git a/Test/baseResults/hlsl.emptystructreturn.tesc.out b/Test/baseResults/hlsl.emptystructreturn.tesc.out new file mode 100755 index 00000000..ffdbb02d --- /dev/null +++ b/Test/baseResults/hlsl.emptystructreturn.tesc.out @@ -0,0 +1,606 @@ +hlsl.emptystructreturn.tesc +Shader version: 500 +vertices = 3 +vertex spacing = equal_spacing +triangle order = cw +0:? Sequence +0:16 Function Definition: blob(struct-HullInputType-vf41[3]; ( temp void) +0:16 Function Parameters: +0:16 'patch' ( in 3-element array of structure{ temp 4-component vector of float position}) +0:20 Function Definition: ColorPatchConstantFunction(struct-HullInputType-vf41[3];u1; ( temp structure{ temp 3-element array of float edges, temp float inside}) +0:20 Function Parameters: +0:20 'inputPatch' ( in 3-element array of structure{ temp 4-component vector of float position}) +0:20 'patchId' ( in uint) +0:? Sequence +0:24 move second child to first child ( temp float) +0:24 direct index ( temp float) +0:24 edges: direct index for structure ( temp 3-element array of float) +0:24 'output' ( temp structure{ temp 3-element array of float edges, temp float inside}) +0:24 Constant: +0:24 0 (const int) +0:24 Constant: +0:24 0 (const int) +0:24 Constant: +0:24 2.000000 +0:25 move second child to first child ( temp float) +0:25 direct index ( temp float) +0:25 edges: direct index for structure ( temp 3-element array of float) +0:25 'output' ( temp structure{ temp 3-element array of float edges, temp float inside}) +0:25 Constant: +0:25 0 (const int) +0:25 Constant: +0:25 1 (const int) +0:25 Constant: +0:25 2.000000 +0:26 move second child to first child ( temp float) +0:26 direct index ( temp float) +0:26 edges: direct index for structure ( temp 3-element array of float) +0:26 'output' ( temp structure{ temp 3-element array of float edges, temp float inside}) +0:26 Constant: +0:26 0 (const int) +0:26 Constant: +0:26 2 (const int) +0:26 Constant: +0:26 2.000000 +0:29 move second child to first child ( temp float) +0:29 inside: direct index for structure ( temp float) +0:29 'output' ( temp structure{ temp 3-element array of float edges, temp float inside}) +0:29 Constant: +0:29 1 (const int) +0:29 Constant: +0:29 2.000000 +0:31 Branch: Return with expression +0:31 'output' ( temp structure{ temp 3-element array of float edges, temp float inside}) +0:42 Function Definition: @main(struct-EmptyStruct1;struct-HullInputType-vf41[3];u1;u1; ( temp structure{}) +0:42 Function Parameters: +0:42 'stage_input' ( in structure{}) +0:42 'patch' ( in 3-element array of structure{ temp 4-component vector of float position}) +0:42 'pointId' ( in uint) +0:42 'patchId' ( in uint) +0:? Sequence +0:44 Function Call: blob(struct-HullInputType-vf41[3]; ( temp void) +0:44 'patch' ( in 3-element array of structure{ temp 4-component vector of float position}) +0:46 Branch: Return with expression +0:46 'output' ( temp structure{}) +0:42 Function Definition: main( ( temp void) +0:42 Function Parameters: +0:? Sequence +0:42 Sequence +0:42 move second child to first child ( temp structure{}) +0:? 'stage_input' ( temp structure{}) +0:? 'stage_input' ( in structure{}) +0:42 Sequence +0:42 move second child to first child ( temp 4-component vector of float) +0:42 position: direct index for structure ( temp 4-component vector of float) +0:42 direct index ( temp structure{ temp 4-component vector of float position}) +0:? 'patch' ( temp 3-element array of structure{ temp 4-component vector of float position}) +0:42 Constant: +0:42 0 (const int) +0:42 Constant: +0:42 0 (const int) +0:42 direct index ( in 4-component vector of float Position) +0:? 'patch.position' ( in 3-element array of 4-component vector of float Position) +0:42 Constant: +0:42 0 (const int) +0:42 move second child to first child ( temp 4-component vector of float) +0:42 position: direct index for structure ( temp 4-component vector of float) +0:42 direct index ( temp structure{ temp 4-component vector of float position}) +0:? 'patch' ( temp 3-element array of structure{ temp 4-component vector of float position}) +0:42 Constant: +0:42 1 (const int) +0:42 Constant: +0:42 0 (const int) +0:42 direct index ( in 4-component vector of float Position) +0:? 'patch.position' ( in 3-element array of 4-component vector of float Position) +0:42 Constant: +0:42 1 (const int) +0:42 move second child to first child ( temp 4-component vector of float) +0:42 position: direct index for structure ( temp 4-component vector of float) +0:42 direct index ( temp structure{ temp 4-component vector of float position}) +0:? 'patch' ( temp 3-element array of structure{ temp 4-component vector of float position}) +0:42 Constant: +0:42 2 (const int) +0:42 Constant: +0:42 0 (const int) +0:42 direct index ( in 4-component vector of float Position) +0:? 'patch.position' ( in 3-element array of 4-component vector of float Position) +0:42 Constant: +0:42 2 (const int) +0:42 move second child to first child ( temp uint) +0:? 'pointId' ( temp uint) +0:? 'pointId' ( in uint InvocationID) +0:42 move second child to first child ( temp uint) +0:? 'patchId' ( temp uint) +0:? 'patchId' ( in uint PrimitiveID) +0:42 Sequence +0:42 move second child to first child ( temp structure{}) +0:42 indirect index ( out structure{}) +0:? '@entryPointOutput' ( out 3-element array of structure{}) +0:? 'pointId' ( in uint InvocationID) +0:42 Function Call: @main(struct-EmptyStruct1;struct-HullInputType-vf41[3];u1;u1; ( temp structure{}) +0:? 'stage_input' ( temp structure{}) +0:? 'patch' ( temp 3-element array of structure{ temp 4-component vector of float position}) +0:? 'pointId' ( temp uint) +0:? 'patchId' ( temp uint) +0:? Barrier ( temp void) +0:? Test condition and select ( temp void) +0:? Condition +0:? Compare Equal ( temp bool) +0:? 'pointId' ( in uint InvocationID) +0:? Constant: +0:? 0 (const int) +0:? true case +0:? Sequence +0:? move second child to first child ( temp structure{ temp 3-element array of float edges, temp float inside}) +0:? '@patchConstantResult' ( temp structure{ temp 3-element array of float edges, temp float inside}) +0:? Function Call: ColorPatchConstantFunction(struct-HullInputType-vf41[3];u1; ( temp structure{ temp 3-element array of float edges, temp float inside}) +0:? 'patch' ( temp 3-element array of structure{ temp 4-component vector of float position}) +0:? 'patchId' ( in uint PrimitiveID) +0:? Sequence +0:? move second child to first child ( temp float) +0:? direct index ( patch out float TessLevelOuter) +0:? '@patchConstantOutput.edges' ( patch out 4-element array of float TessLevelOuter) +0:? Constant: +0:? 0 (const int) +0:? direct index ( temp float) +0:? edges: direct index for structure ( temp 3-element array of float) +0:? '@patchConstantResult' ( temp structure{ temp 3-element array of float edges, temp float inside}) +0:? Constant: +0:? 0 (const int) +0:? Constant: +0:? 0 (const int) +0:? move second child to first child ( temp float) +0:? direct index ( patch out float TessLevelOuter) +0:? '@patchConstantOutput.edges' ( patch out 4-element array of float TessLevelOuter) +0:? Constant: +0:? 1 (const int) +0:? direct index ( temp float) +0:? edges: direct index for structure ( temp 3-element array of float) +0:? '@patchConstantResult' ( temp structure{ temp 3-element array of float edges, temp float inside}) +0:? Constant: +0:? 0 (const int) +0:? Constant: +0:? 1 (const int) +0:? move second child to first child ( temp float) +0:? direct index ( patch out float TessLevelOuter) +0:? '@patchConstantOutput.edges' ( patch out 4-element array of float TessLevelOuter) +0:? Constant: +0:? 2 (const int) +0:? direct index ( temp float) +0:? edges: direct index for structure ( temp 3-element array of float) +0:? '@patchConstantResult' ( temp structure{ temp 3-element array of float edges, temp float inside}) +0:? Constant: +0:? 0 (const int) +0:? Constant: +0:? 2 (const int) +0:? move second child to first child ( temp float) +0:? direct index ( patch out float TessLevelInner) +0:? '@patchConstantOutput.inside' ( patch out 2-element array of float TessLevelInner) +0:? Constant: +0:? 0 (const int) +0:? inside: direct index for structure ( temp float) +0:? '@patchConstantResult' ( temp structure{ temp 3-element array of float edges, temp float inside}) +0:? Constant: +0:? 1 (const int) +0:? Linker Objects +0:? 'patch.position' ( in 3-element array of 4-component vector of float Position) +0:? 'pointId' ( in uint InvocationID) +0:? 'patchId' ( in uint PrimitiveID) +0:? '@patchConstantOutput.edges' ( patch out 4-element array of float TessLevelOuter) +0:? '@patchConstantOutput.inside' ( patch out 2-element array of float TessLevelInner) + + +Linked tessellation control stage: + + +Shader version: 500 +vertices = 3 +vertex spacing = equal_spacing +triangle order = cw +0:? Sequence +0:16 Function Definition: blob(struct-HullInputType-vf41[3]; ( temp void) +0:16 Function Parameters: +0:16 'patch' ( in 3-element array of structure{ temp 4-component vector of float position}) +0:20 Function Definition: ColorPatchConstantFunction(struct-HullInputType-vf41[3];u1; ( temp structure{ temp 3-element array of float edges, temp float inside}) +0:20 Function Parameters: +0:20 'inputPatch' ( in 3-element array of structure{ temp 4-component vector of float position}) +0:20 'patchId' ( in uint) +0:? Sequence +0:24 move second child to first child ( temp float) +0:24 direct index ( temp float) +0:24 edges: direct index for structure ( temp 3-element array of float) +0:24 'output' ( temp structure{ temp 3-element array of float edges, temp float inside}) +0:24 Constant: +0:24 0 (const int) +0:24 Constant: +0:24 0 (const int) +0:24 Constant: +0:24 2.000000 +0:25 move second child to first child ( temp float) +0:25 direct index ( temp float) +0:25 edges: direct index for structure ( temp 3-element array of float) +0:25 'output' ( temp structure{ temp 3-element array of float edges, temp float inside}) +0:25 Constant: +0:25 0 (const int) +0:25 Constant: +0:25 1 (const int) +0:25 Constant: +0:25 2.000000 +0:26 move second child to first child ( temp float) +0:26 direct index ( temp float) +0:26 edges: direct index for structure ( temp 3-element array of float) +0:26 'output' ( temp structure{ temp 3-element array of float edges, temp float inside}) +0:26 Constant: +0:26 0 (const int) +0:26 Constant: +0:26 2 (const int) +0:26 Constant: +0:26 2.000000 +0:29 move second child to first child ( temp float) +0:29 inside: direct index for structure ( temp float) +0:29 'output' ( temp structure{ temp 3-element array of float edges, temp float inside}) +0:29 Constant: +0:29 1 (const int) +0:29 Constant: +0:29 2.000000 +0:31 Branch: Return with expression +0:31 'output' ( temp structure{ temp 3-element array of float edges, temp float inside}) +0:42 Function Definition: @main(struct-EmptyStruct1;struct-HullInputType-vf41[3];u1;u1; ( temp structure{}) +0:42 Function Parameters: +0:42 'stage_input' ( in structure{}) +0:42 'patch' ( in 3-element array of structure{ temp 4-component vector of float position}) +0:42 'pointId' ( in uint) +0:42 'patchId' ( in uint) +0:? Sequence +0:44 Function Call: blob(struct-HullInputType-vf41[3]; ( temp void) +0:44 'patch' ( in 3-element array of structure{ temp 4-component vector of float position}) +0:46 Branch: Return with expression +0:46 'output' ( temp structure{}) +0:42 Function Definition: main( ( temp void) +0:42 Function Parameters: +0:? Sequence +0:42 Sequence +0:42 move second child to first child ( temp structure{}) +0:? 'stage_input' ( temp structure{}) +0:? 'stage_input' ( in structure{}) +0:42 Sequence +0:42 move second child to first child ( temp 4-component vector of float) +0:42 position: direct index for structure ( temp 4-component vector of float) +0:42 direct index ( temp structure{ temp 4-component vector of float position}) +0:? 'patch' ( temp 3-element array of structure{ temp 4-component vector of float position}) +0:42 Constant: +0:42 0 (const int) +0:42 Constant: +0:42 0 (const int) +0:42 direct index ( in 4-component vector of float Position) +0:? 'patch.position' ( in 3-element array of 4-component vector of float Position) +0:42 Constant: +0:42 0 (const int) +0:42 move second child to first child ( temp 4-component vector of float) +0:42 position: direct index for structure ( temp 4-component vector of float) +0:42 direct index ( temp structure{ temp 4-component vector of float position}) +0:? 'patch' ( temp 3-element array of structure{ temp 4-component vector of float position}) +0:42 Constant: +0:42 1 (const int) +0:42 Constant: +0:42 0 (const int) +0:42 direct index ( in 4-component vector of float Position) +0:? 'patch.position' ( in 3-element array of 4-component vector of float Position) +0:42 Constant: +0:42 1 (const int) +0:42 move second child to first child ( temp 4-component vector of float) +0:42 position: direct index for structure ( temp 4-component vector of float) +0:42 direct index ( temp structure{ temp 4-component vector of float position}) +0:? 'patch' ( temp 3-element array of structure{ temp 4-component vector of float position}) +0:42 Constant: +0:42 2 (const int) +0:42 Constant: +0:42 0 (const int) +0:42 direct index ( in 4-component vector of float Position) +0:? 'patch.position' ( in 3-element array of 4-component vector of float Position) +0:42 Constant: +0:42 2 (const int) +0:42 move second child to first child ( temp uint) +0:? 'pointId' ( temp uint) +0:? 'pointId' ( in uint InvocationID) +0:42 move second child to first child ( temp uint) +0:? 'patchId' ( temp uint) +0:? 'patchId' ( in uint PrimitiveID) +0:42 Sequence +0:42 move second child to first child ( temp structure{}) +0:42 indirect index ( out structure{}) +0:? '@entryPointOutput' ( out 3-element array of structure{}) +0:? 'pointId' ( in uint InvocationID) +0:42 Function Call: @main(struct-EmptyStruct1;struct-HullInputType-vf41[3];u1;u1; ( temp structure{}) +0:? 'stage_input' ( temp structure{}) +0:? 'patch' ( temp 3-element array of structure{ temp 4-component vector of float position}) +0:? 'pointId' ( temp uint) +0:? 'patchId' ( temp uint) +0:? Barrier ( temp void) +0:? Test condition and select ( temp void) +0:? Condition +0:? Compare Equal ( temp bool) +0:? 'pointId' ( in uint InvocationID) +0:? Constant: +0:? 0 (const int) +0:? true case +0:? Sequence +0:? move second child to first child ( temp structure{ temp 3-element array of float edges, temp float inside}) +0:? '@patchConstantResult' ( temp structure{ temp 3-element array of float edges, temp float inside}) +0:? Function Call: ColorPatchConstantFunction(struct-HullInputType-vf41[3];u1; ( temp structure{ temp 3-element array of float edges, temp float inside}) +0:? 'patch' ( temp 3-element array of structure{ temp 4-component vector of float position}) +0:? 'patchId' ( in uint PrimitiveID) +0:? Sequence +0:? move second child to first child ( temp float) +0:? direct index ( patch out float TessLevelOuter) +0:? '@patchConstantOutput.edges' ( patch out 4-element array of float TessLevelOuter) +0:? Constant: +0:? 0 (const int) +0:? direct index ( temp float) +0:? edges: direct index for structure ( temp 3-element array of float) +0:? '@patchConstantResult' ( temp structure{ temp 3-element array of float edges, temp float inside}) +0:? Constant: +0:? 0 (const int) +0:? Constant: +0:? 0 (const int) +0:? move second child to first child ( temp float) +0:? direct index ( patch out float TessLevelOuter) +0:? '@patchConstantOutput.edges' ( patch out 4-element array of float TessLevelOuter) +0:? Constant: +0:? 1 (const int) +0:? direct index ( temp float) +0:? edges: direct index for structure ( temp 3-element array of float) +0:? '@patchConstantResult' ( temp structure{ temp 3-element array of float edges, temp float inside}) +0:? Constant: +0:? 0 (const int) +0:? Constant: +0:? 1 (const int) +0:? move second child to first child ( temp float) +0:? direct index ( patch out float TessLevelOuter) +0:? '@patchConstantOutput.edges' ( patch out 4-element array of float TessLevelOuter) +0:? Constant: +0:? 2 (const int) +0:? direct index ( temp float) +0:? edges: direct index for structure ( temp 3-element array of float) +0:? '@patchConstantResult' ( temp structure{ temp 3-element array of float edges, temp float inside}) +0:? Constant: +0:? 0 (const int) +0:? Constant: +0:? 2 (const int) +0:? move second child to first child ( temp float) +0:? direct index ( patch out float TessLevelInner) +0:? '@patchConstantOutput.inside' ( patch out 2-element array of float TessLevelInner) +0:? Constant: +0:? 0 (const int) +0:? inside: direct index for structure ( temp float) +0:? '@patchConstantResult' ( temp structure{ temp 3-element array of float edges, temp float inside}) +0:? Constant: +0:? 1 (const int) +0:? Linker Objects +0:? 'patch.position' ( in 3-element array of 4-component vector of float Position) +0:? 'pointId' ( in uint InvocationID) +0:? 'patchId' ( in uint PrimitiveID) +0:? '@patchConstantOutput.edges' ( patch out 4-element array of float TessLevelOuter) +0:? '@patchConstantOutput.inside' ( patch out 2-element array of float TessLevelInner) + +Validation failed +// Module Version 10000 +// Generated by (magic number): 8000b +// Id's are bound by 132 + + Capability Tessellation + 1: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint TessellationControl 4 "main" 65 79 82 115 128 + ExecutionMode 4 OutputVertices 3 + ExecutionMode 4 Triangles + ExecutionMode 4 SpacingEqual + ExecutionMode 4 VertexOrderCw + Source HLSL 500 + Name 4 "main" + Name 8 "HullInputType" + MemberName 8(HullInputType) 0 "position" + Name 15 "blob(struct-HullInputType-vf41[3];" + Name 14 "patch" + Name 19 "ConstantOutputType" + MemberName 19(ConstantOutputType) 0 "edges" + MemberName 19(ConstantOutputType) 1 "inside" + Name 23 "ColorPatchConstantFunction(struct-HullInputType-vf41[3];u1;" + Name 21 "inputPatch" + Name 22 "patchId" + Name 25 "EmptyStruct" + Name 27 "HullOutputType" + Name 33 "@main(struct-EmptyStruct1;struct-HullInputType-vf41[3];u1;u1;" + Name 29 "stage_input" + Name 30 "patch" + Name 31 "pointId" + Name 32 "patchId" + Name 36 "output" + Name 50 "param" + Name 54 "output" + Name 58 "stage_input" + Name 60 "stage_input" + Name 62 "patch" + Name 65 "patch.position" + Name 77 "pointId" + Name 79 "pointId" + Name 81 "patchId" + Name 82 "patchId" + Name 86 "@entryPointOutput" + Name 88 "param" + Name 90 "param" + Name 92 "param" + Name 94 "param" + Name 107 "@patchConstantResult" + Name 108 "param" + Name 110 "param" + Name 115 "@patchConstantOutput.edges" + Name 128 "@patchConstantOutput.inside" + Decorate 65(patch.position) BuiltIn Position + Decorate 79(pointId) BuiltIn InvocationId + Decorate 82(patchId) BuiltIn PrimitiveId + Decorate 115(@patchConstantOutput.edges) Patch + Decorate 115(@patchConstantOutput.edges) BuiltIn TessLevelOuter + Decorate 128(@patchConstantOutput.inside) Patch + Decorate 128(@patchConstantOutput.inside) BuiltIn TessLevelInner + 2: TypeVoid + 3: TypeFunction 2 + 6: TypeFloat 32 + 7: TypeVector 6(float) 4 +8(HullInputType): TypeStruct 7(fvec4) + 9: TypeInt 32 0 + 10: 9(int) Constant 3 + 11: TypeArray 8(HullInputType) 10 + 12: TypePointer Function 11 + 13: TypeFunction 2 12(ptr) + 17: TypePointer Function 9(int) + 18: TypeArray 6(float) 10 +19(ConstantOutputType): TypeStruct 18 6(float) + 20: TypeFunction 19(ConstantOutputType) 12(ptr) 17(ptr) + 25(EmptyStruct): TypeStruct + 26: TypePointer Function 25(EmptyStruct) +27(HullOutputType): TypeStruct + 28: TypeFunction 27(HullOutputType) 26(ptr) 12(ptr) 17(ptr) 17(ptr) + 35: TypePointer Function 19(ConstantOutputType) + 37: TypeInt 32 1 + 38: 37(int) Constant 0 + 39: 6(float) Constant 1073741824 + 40: TypePointer Function 6(float) + 42: 37(int) Constant 1 + 44: 37(int) Constant 2 + 53: TypePointer Function 27(HullOutputType) + 59: TypePointer Input 25(EmptyStruct) + 60(stage_input): 59(ptr) Variable Input + 63: TypeArray 7(fvec4) 10 + 64: TypePointer Input 63 +65(patch.position): 64(ptr) Variable Input + 66: TypePointer Input 7(fvec4) + 69: TypePointer Function 7(fvec4) + 78: TypePointer Input 9(int) + 79(pointId): 78(ptr) Variable Input + 82(patchId): 78(ptr) Variable Input + 84: TypeArray 27(HullOutputType) 10 + 85: TypePointer Output 84 +86(@entryPointOutput): 85(ptr) Variable Output + 97: TypePointer Output 27(HullOutputType) + 99: 9(int) Constant 2 + 100: 9(int) Constant 4 + 101: 9(int) Constant 0 + 103: TypeBool + 113: TypeArray 6(float) 100 + 114: TypePointer Output 113 +115(@patchConstantOutput.edges): 114(ptr) Variable Output + 118: TypePointer Output 6(float) + 126: TypeArray 6(float) 99 + 127: TypePointer Output 126 +128(@patchConstantOutput.inside): 127(ptr) Variable Output + 4(main): 2 Function None 3 + 5: Label + 58(stage_input): 26(ptr) Variable Function + 62(patch): 12(ptr) Variable Function + 77(pointId): 17(ptr) Variable Function + 81(patchId): 17(ptr) Variable Function + 88(param): 26(ptr) Variable Function + 90(param): 12(ptr) Variable Function + 92(param): 17(ptr) Variable Function + 94(param): 17(ptr) Variable Function +107(@patchConstantResult): 35(ptr) Variable Function + 108(param): 12(ptr) Variable Function + 110(param): 17(ptr) Variable Function + 61:25(EmptyStruct) Load 60(stage_input) + Store 58(stage_input) 61 + 67: 66(ptr) AccessChain 65(patch.position) 38 + 68: 7(fvec4) Load 67 + 70: 69(ptr) AccessChain 62(patch) 38 38 + Store 70 68 + 71: 66(ptr) AccessChain 65(patch.position) 42 + 72: 7(fvec4) Load 71 + 73: 69(ptr) AccessChain 62(patch) 42 38 + Store 73 72 + 74: 66(ptr) AccessChain 65(patch.position) 44 + 75: 7(fvec4) Load 74 + 76: 69(ptr) AccessChain 62(patch) 44 38 + Store 76 75 + 80: 9(int) Load 79(pointId) + Store 77(pointId) 80 + 83: 9(int) Load 82(patchId) + Store 81(patchId) 83 + 87: 9(int) Load 79(pointId) + 89:25(EmptyStruct) Load 58(stage_input) + Store 88(param) 89 + 91: 11 Load 62(patch) + Store 90(param) 91 + 93: 9(int) Load 77(pointId) + Store 92(param) 93 + 95: 9(int) Load 81(patchId) + Store 94(param) 95 + 96:27(HullOutputType) FunctionCall 33(@main(struct-EmptyStruct1;struct-HullInputType-vf41[3];u1;u1;) 88(param) 90(param) 92(param) 94(param) + 98: 97(ptr) AccessChain 86(@entryPointOutput) 87 + Store 98 96 + ControlBarrier 99 100 101 + 102: 9(int) Load 79(pointId) + 104: 103(bool) IEqual 102 38 + SelectionMerge 106 None + BranchConditional 104 105 106 + 105: Label + 109: 11 Load 62(patch) + Store 108(param) 109 + 111: 9(int) Load 82(patchId) + Store 110(param) 111 + 112:19(ConstantOutputType) FunctionCall 23(ColorPatchConstantFunction(struct-HullInputType-vf41[3];u1;) 108(param) 110(param) + Store 107(@patchConstantResult) 112 + 116: 40(ptr) AccessChain 107(@patchConstantResult) 38 38 + 117: 6(float) Load 116 + 119: 118(ptr) AccessChain 115(@patchConstantOutput.edges) 38 + Store 119 117 + 120: 40(ptr) AccessChain 107(@patchConstantResult) 38 42 + 121: 6(float) Load 120 + 122: 118(ptr) AccessChain 115(@patchConstantOutput.edges) 42 + Store 122 121 + 123: 40(ptr) AccessChain 107(@patchConstantResult) 38 44 + 124: 6(float) Load 123 + 125: 118(ptr) AccessChain 115(@patchConstantOutput.edges) 44 + Store 125 124 + 129: 40(ptr) AccessChain 107(@patchConstantResult) 42 + 130: 6(float) Load 129 + 131: 118(ptr) AccessChain 128(@patchConstantOutput.inside) 38 + Store 131 130 + Branch 106 + 106: Label + Return + FunctionEnd +15(blob(struct-HullInputType-vf41[3];): 2 Function None 13 + 14(patch): 12(ptr) FunctionParameter + 16: Label + Return + FunctionEnd +23(ColorPatchConstantFunction(struct-HullInputType-vf41[3];u1;):19(ConstantOutputType) Function None 20 + 21(inputPatch): 12(ptr) FunctionParameter + 22(patchId): 17(ptr) FunctionParameter + 24: Label + 36(output): 35(ptr) Variable Function + 41: 40(ptr) AccessChain 36(output) 38 38 + Store 41 39 + 43: 40(ptr) AccessChain 36(output) 38 42 + Store 43 39 + 45: 40(ptr) AccessChain 36(output) 38 44 + Store 45 39 + 46: 40(ptr) AccessChain 36(output) 42 + Store 46 39 + 47:19(ConstantOutputType) Load 36(output) + ReturnValue 47 + FunctionEnd +33(@main(struct-EmptyStruct1;struct-HullInputType-vf41[3];u1;u1;):27(HullOutputType) Function None 28 + 29(stage_input): 26(ptr) FunctionParameter + 30(patch): 12(ptr) FunctionParameter + 31(pointId): 17(ptr) FunctionParameter + 32(patchId): 17(ptr) FunctionParameter + 34: Label + 50(param): 12(ptr) Variable Function + 54(output): 53(ptr) Variable Function + 51: 11 Load 30(patch) + Store 50(param) 51 + 52: 2 FunctionCall 15(blob(struct-HullInputType-vf41[3];) 50(param) + 55:27(HullOutputType) Load 54(output) + ReturnValue 55 + FunctionEnd diff --git a/Test/baseResults/hlsl.function.frag.out b/Test/baseResults/hlsl.function.frag.out index faa31479..ebf20fec 100755 --- a/Test/baseResults/hlsl.function.frag.out +++ b/Test/baseResults/hlsl.function.frag.out @@ -1,6 +1,6 @@ hlsl.function.frag -ERROR: 0:24: 'fun1' : unknown variable -ERROR: 0:24: 'return' : type does not match, or is not convertible to, the function's return type +ERROR: 0:29: 'fun1' : unknown variable +ERROR: 0:29: 'return' : type does not match, or is not convertible to, the function's return type ERROR: 2 compilation errors. No code generated. @@ -16,45 +16,63 @@ ERROR: node is still EOpNull! 0:3 1.000000 0:3 1.000000 0:3 1.000000 -0:7 Function Definition: fun2(vf4; ( temp uint) +0:7 Function Definition: fun2(vf4; ( temp 4-component vector of float) 0:7 Function Parameters: -0:7 'col' ( in 4-component vector of float) +0:7 'col' ( const (read only) 4-component vector of float) 0:? Sequence 0:8 Branch: Return with expression -0:8 Constant: -0:8 7 (const uint) -0:12 Function Definition: fun4(u1;u1; ( temp 4-component vector of float) +0:8 Construct vec4 ( temp 4-component vector of float) +0:8 Comma ( temp float) +0:8 Comma ( temp float) +0:8 Comma ( temp float) +0:8 Constant: +0:8 1.000000 +0:8 Constant: +0:8 2.000000 +0:8 Constant: +0:8 3.000000 +0:8 Constant: +0:8 4.000000 +0:12 Function Definition: fun3(vf4; ( temp uint) 0:12 Function Parameters: -0:12 'id1' ( in uint) -0:12 'id2' ( uniform uint) +0:12 'col' ( const (read only) 4-component vector of float) 0:? Sequence 0:13 Branch: Return with expression -0:13 Construct vec4 ( temp 4-component vector of float) -0:13 Convert uint to float ( temp float) -0:13 component-wise multiply ( temp uint) -0:13 'id1' ( in uint) -0:13 'id2' ( uniform uint) -0:17 Function Definition: fun1(i1; ( temp 4-component vector of float) +0:13 Constant: +0:13 7 (const uint) +0:17 Function Definition: fun4(u1;u1; ( temp 4-component vector of float) 0:17 Function Parameters: -0:17 'index' ( in int) +0:17 'id1' ( in uint) +0:17 'id2' ( uniform uint) 0:? Sequence -0:18 Sequence -0:18 move second child to first child ( temp uint) -0:18 'entityId' ( temp uint) -0:18 Function Call: fun2(vf4; ( temp uint) -0:18 Function Call: fun0( ( temp 4-component vector of float) -0:19 Branch: Return with expression -0:19 Function Call: fun4(u1;u1; ( temp 4-component vector of float) -0:19 'entityId' ( temp uint) -0:19 'entityId' ( temp uint) -0:23 Function Definition: @main( ( temp int) -0:23 Function Parameters: -0:23 Function Definition: main( ( temp void) -0:23 Function Parameters: +0:18 Branch: Return with expression +0:18 Construct vec4 ( temp 4-component vector of float) +0:18 Convert uint to float ( temp float) +0:18 component-wise multiply ( temp uint) +0:18 'id1' ( in uint) +0:18 'id2' ( uniform uint) +0:22 Function Definition: fun1(i1; ( temp 4-component vector of float) +0:22 Function Parameters: +0:22 'index' ( in int) 0:? Sequence -0:23 move second child to first child ( temp int) +0:23 Sequence +0:23 move second child to first child ( temp uint) +0:23 'entityId' ( temp uint) +0:23 Function Call: fun3(vf4; ( temp uint) +0:23 Function Call: fun2(vf4; ( temp 4-component vector of float) +0:23 Function Call: fun0( ( temp 4-component vector of float) +0:24 Branch: Return with expression +0:24 Function Call: fun4(u1;u1; ( temp 4-component vector of float) +0:24 'entityId' ( temp uint) +0:24 'entityId' ( temp uint) +0:28 Function Definition: @main( ( temp int) +0:28 Function Parameters: +0:28 Function Definition: main( ( temp void) +0:28 Function Parameters: +0:? Sequence +0:28 move second child to first child ( temp int) 0:? '@entryPointOutput' (layout( location=0) out int) -0:23 Function Call: @main( ( temp int) +0:28 Function Call: @main( ( temp int) 0:? Linker Objects 0:? '@entryPointOutput' (layout( location=0) out int) @@ -74,45 +92,63 @@ ERROR: node is still EOpNull! 0:3 1.000000 0:3 1.000000 0:3 1.000000 -0:7 Function Definition: fun2(vf4; ( temp uint) +0:7 Function Definition: fun2(vf4; ( temp 4-component vector of float) 0:7 Function Parameters: -0:7 'col' ( in 4-component vector of float) +0:7 'col' ( const (read only) 4-component vector of float) 0:? Sequence 0:8 Branch: Return with expression -0:8 Constant: -0:8 7 (const uint) -0:12 Function Definition: fun4(u1;u1; ( temp 4-component vector of float) +0:8 Construct vec4 ( temp 4-component vector of float) +0:8 Comma ( temp float) +0:8 Comma ( temp float) +0:8 Comma ( temp float) +0:8 Constant: +0:8 1.000000 +0:8 Constant: +0:8 2.000000 +0:8 Constant: +0:8 3.000000 +0:8 Constant: +0:8 4.000000 +0:12 Function Definition: fun3(vf4; ( temp uint) 0:12 Function Parameters: -0:12 'id1' ( in uint) -0:12 'id2' ( uniform uint) +0:12 'col' ( const (read only) 4-component vector of float) 0:? Sequence 0:13 Branch: Return with expression -0:13 Construct vec4 ( temp 4-component vector of float) -0:13 Convert uint to float ( temp float) -0:13 component-wise multiply ( temp uint) -0:13 'id1' ( in uint) -0:13 'id2' ( uniform uint) -0:17 Function Definition: fun1(i1; ( temp 4-component vector of float) +0:13 Constant: +0:13 7 (const uint) +0:17 Function Definition: fun4(u1;u1; ( temp 4-component vector of float) 0:17 Function Parameters: -0:17 'index' ( in int) +0:17 'id1' ( in uint) +0:17 'id2' ( uniform uint) 0:? Sequence -0:18 Sequence -0:18 move second child to first child ( temp uint) -0:18 'entityId' ( temp uint) -0:18 Function Call: fun2(vf4; ( temp uint) -0:18 Function Call: fun0( ( temp 4-component vector of float) -0:19 Branch: Return with expression -0:19 Function Call: fun4(u1;u1; ( temp 4-component vector of float) -0:19 'entityId' ( temp uint) -0:19 'entityId' ( temp uint) -0:23 Function Definition: @main( ( temp int) -0:23 Function Parameters: -0:23 Function Definition: main( ( temp void) -0:23 Function Parameters: +0:18 Branch: Return with expression +0:18 Construct vec4 ( temp 4-component vector of float) +0:18 Convert uint to float ( temp float) +0:18 component-wise multiply ( temp uint) +0:18 'id1' ( in uint) +0:18 'id2' ( uniform uint) +0:22 Function Definition: fun1(i1; ( temp 4-component vector of float) +0:22 Function Parameters: +0:22 'index' ( in int) 0:? Sequence -0:23 move second child to first child ( temp int) +0:23 Sequence +0:23 move second child to first child ( temp uint) +0:23 'entityId' ( temp uint) +0:23 Function Call: fun3(vf4; ( temp uint) +0:23 Function Call: fun2(vf4; ( temp 4-component vector of float) +0:23 Function Call: fun0( ( temp 4-component vector of float) +0:24 Branch: Return with expression +0:24 Function Call: fun4(u1;u1; ( temp 4-component vector of float) +0:24 'entityId' ( temp uint) +0:24 'entityId' ( temp uint) +0:28 Function Definition: @main( ( temp int) +0:28 Function Parameters: +0:28 Function Definition: main( ( temp void) +0:28 Function Parameters: +0:? Sequence +0:28 move second child to first child ( temp int) 0:? '@entryPointOutput' (layout( location=0) out int) -0:23 Function Call: @main( ( temp int) +0:28 Function Call: @main( ( temp int) 0:? Linker Objects 0:? '@entryPointOutput' (layout( location=0) out int) diff --git a/Test/baseResults/hlsl.init2.frag.out b/Test/baseResults/hlsl.init2.frag.out index b8b7afcd..bf6d6461 100755 --- a/Test/baseResults/hlsl.init2.frag.out +++ b/Test/baseResults/hlsl.init2.frag.out @@ -31,29 +31,20 @@ gl_FragCoord origin is upper left 0:20 10.000000 0:22 Constant: 0:22 10.000000 -0:25 Sequence -0:25 move second child to first child ( temp float) -0:25 'n' ( temp float) -0:25 Constant: -0:25 0.000000 0:26 Sequence -0:26 move second child to first child ( temp 8-element array of 3-component vector of float) -0:26 'a' ( const (read only) 8-element array of 3-component vector of float) -0:26 Construct vec3 ( temp 8-element array of 3-component vector of float) -0:27 vector-scale ( temp 3-component vector of float) -0:27 Constant: -0:27 0.577350 -0:27 0.577350 -0:27 0.577350 -0:27 add second child into first child ( temp float) -0:27 'n' ( temp float) -0:27 Constant: -0:27 1.000000 +0:26 move second child to first child ( temp float) +0:26 'n' ( temp float) +0:26 Constant: +0:26 0.000000 +0:27 Sequence +0:27 move second child to first child ( temp 8-element array of 3-component vector of float) +0:27 'a' ( const (read only) 8-element array of 3-component vector of float) +0:27 Construct vec3 ( temp 8-element array of 3-component vector of float) 0:28 vector-scale ( temp 3-component vector of float) 0:28 Constant: -0:28 -0.577350 -0:28 -0.577350 -0:28 -0.577350 +0:28 0.577350 +0:28 0.577350 +0:28 0.577350 0:28 add second child into first child ( temp float) 0:28 'n' ( temp float) 0:28 Constant: @@ -62,7 +53,7 @@ gl_FragCoord origin is upper left 0:29 Constant: 0:29 -0.577350 0:29 -0.577350 -0:29 0.577350 +0:29 -0.577350 0:29 add second child into first child ( temp float) 0:29 'n' ( temp float) 0:29 Constant: @@ -70,8 +61,8 @@ gl_FragCoord origin is upper left 0:30 vector-scale ( temp 3-component vector of float) 0:30 Constant: 0:30 -0.577350 -0:30 0.577350 0:30 -0.577350 +0:30 0.577350 0:30 add second child into first child ( temp float) 0:30 'n' ( temp float) 0:30 Constant: @@ -80,16 +71,16 @@ gl_FragCoord origin is upper left 0:31 Constant: 0:31 -0.577350 0:31 0.577350 -0:31 0.577350 +0:31 -0.577350 0:31 add second child into first child ( temp float) 0:31 'n' ( temp float) 0:31 Constant: 0:31 1.000000 0:32 vector-scale ( temp 3-component vector of float) 0:32 Constant: +0:32 -0.577350 +0:32 0.577350 0:32 0.577350 -0:32 -0.577350 -0:32 -0.577350 0:32 add second child into first child ( temp float) 0:32 'n' ( temp float) 0:32 Constant: @@ -98,7 +89,7 @@ gl_FragCoord origin is upper left 0:33 Constant: 0:33 0.577350 0:33 -0.577350 -0:33 0.577350 +0:33 -0.577350 0:33 add second child into first child ( temp float) 0:33 'n' ( temp float) 0:33 Constant: @@ -106,38 +97,38 @@ gl_FragCoord origin is upper left 0:34 vector-scale ( temp 3-component vector of float) 0:34 Constant: 0:34 0.577350 -0:34 0.577350 0:34 -0.577350 +0:34 0.577350 0:34 add second child into first child ( temp float) 0:34 'n' ( temp float) 0:34 Constant: 0:34 1.000000 -0:36 Sequence -0:36 move second child to first child ( temp structure{ temp 3-component vector of float a}) -0:36 'oneNonConst' ( const (read only) structure{ temp 3-component vector of float a}) -0:36 Construct structure ( temp structure{ temp 3-component vector of float a}) -0:36 vector-scale ( temp 3-component vector of float) -0:36 Constant: -0:36 -0.577350 -0:36 0.577350 -0:36 0.577350 -0:36 add second child into first child ( temp float) -0:36 'n' ( temp float) -0:36 Constant: -0:36 1.000000 -0:38 Sequence -0:38 move second child to first child ( temp structure{ temp 3-component vector of float a, temp 3-component vector of float b}) -0:38 'twoNonConst' ( const (read only) structure{ temp 3-component vector of float a, temp 3-component vector of float b}) -0:38 Construct structure ( temp structure{ temp 3-component vector of float a, temp 3-component vector of float b}) -0:38 vector-scale ( temp 3-component vector of float) -0:38 Constant: -0:38 -0.577350 -0:38 0.577350 -0:38 0.577350 -0:38 add second child into first child ( temp float) -0:38 'n' ( temp float) -0:38 Constant: -0:38 1.000000 +0:35 vector-scale ( temp 3-component vector of float) +0:35 Constant: +0:35 0.577350 +0:35 0.577350 +0:35 -0.577350 +0:35 add second child into first child ( temp float) +0:35 'n' ( temp float) +0:35 Constant: +0:35 1.000000 +0:37 Sequence +0:37 move second child to first child ( temp structure{ temp 3-component vector of float a}) +0:37 'oneNonConst' ( const (read only) structure{ temp 3-component vector of float a}) +0:37 Construct structure ( temp structure{ temp 3-component vector of float a}) +0:37 vector-scale ( temp 3-component vector of float) +0:37 Constant: +0:37 -0.577350 +0:37 0.577350 +0:37 0.577350 +0:37 add second child into first child ( temp float) +0:37 'n' ( temp float) +0:37 Constant: +0:37 1.000000 +0:39 Sequence +0:39 move second child to first child ( temp structure{ temp 3-component vector of float a, temp 3-component vector of float b}) +0:39 'twoNonConst' ( const (read only) structure{ temp 3-component vector of float a, temp 3-component vector of float b}) +0:39 Construct structure ( temp structure{ temp 3-component vector of float a, temp 3-component vector of float b}) 0:39 vector-scale ( temp 3-component vector of float) 0:39 Constant: 0:39 -0.577350 @@ -147,32 +138,41 @@ gl_FragCoord origin is upper left 0:39 'n' ( temp float) 0:39 Constant: 0:39 1.000000 -0:45 Function Definition: @main( ( temp structure{ temp 4-component vector of float color}) -0:45 Function Parameters: +0:40 vector-scale ( temp 3-component vector of float) +0:40 Constant: +0:40 -0.577350 +0:40 0.577350 +0:40 0.577350 +0:40 add second child into first child ( temp float) +0:40 'n' ( temp float) +0:40 Constant: +0:40 1.000000 +0:46 Function Definition: @main( ( temp structure{ temp 4-component vector of float color}) +0:46 Function Parameters: 0:? Sequence -0:46 Function Call: Test1( ( temp void) -0:49 move second child to first child ( temp 4-component vector of float) -0:49 color: direct index for structure ( temp 4-component vector of float) -0:49 'ps_output' ( temp structure{ temp 4-component vector of float color}) -0:49 Constant: -0:49 0 (const int) -0:49 Constant: -0:49 1.000000 -0:49 1.000000 -0:49 1.000000 -0:49 1.000000 -0:50 Branch: Return with expression -0:50 'ps_output' ( temp structure{ temp 4-component vector of float color}) -0:45 Function Definition: main( ( temp void) -0:45 Function Parameters: +0:47 Function Call: Test1( ( temp void) +0:50 move second child to first child ( temp 4-component vector of float) +0:50 color: direct index for structure ( temp 4-component vector of float) +0:50 'ps_output' ( temp structure{ temp 4-component vector of float color}) +0:50 Constant: +0:50 0 (const int) +0:50 Constant: +0:50 1.000000 +0:50 1.000000 +0:50 1.000000 +0:50 1.000000 +0:51 Branch: Return with expression +0:51 'ps_output' ( temp structure{ temp 4-component vector of float color}) +0:46 Function Definition: main( ( temp void) +0:46 Function Parameters: 0:? Sequence -0:45 Sequence -0:45 move second child to first child ( temp 4-component vector of float) +0:46 Sequence +0:46 move second child to first child ( temp 4-component vector of float) 0:? '@entryPointOutput.color' (layout( location=0) out 4-component vector of float) -0:45 color: direct index for structure ( temp 4-component vector of float) -0:45 Function Call: @main( ( temp structure{ temp 4-component vector of float color}) -0:45 Constant: -0:45 0 (const int) +0:46 color: direct index for structure ( temp 4-component vector of float) +0:46 Function Call: @main( ( temp structure{ temp 4-component vector of float color}) +0:46 Constant: +0:46 0 (const int) 0:? Linker Objects 0:? '@entryPointOutput.color' (layout( location=0) out 4-component vector of float) @@ -212,29 +212,20 @@ gl_FragCoord origin is upper left 0:20 10.000000 0:22 Constant: 0:22 10.000000 -0:25 Sequence -0:25 move second child to first child ( temp float) -0:25 'n' ( temp float) -0:25 Constant: -0:25 0.000000 0:26 Sequence -0:26 move second child to first child ( temp 8-element array of 3-component vector of float) -0:26 'a' ( const (read only) 8-element array of 3-component vector of float) -0:26 Construct vec3 ( temp 8-element array of 3-component vector of float) -0:27 vector-scale ( temp 3-component vector of float) -0:27 Constant: -0:27 0.577350 -0:27 0.577350 -0:27 0.577350 -0:27 add second child into first child ( temp float) -0:27 'n' ( temp float) -0:27 Constant: -0:27 1.000000 +0:26 move second child to first child ( temp float) +0:26 'n' ( temp float) +0:26 Constant: +0:26 0.000000 +0:27 Sequence +0:27 move second child to first child ( temp 8-element array of 3-component vector of float) +0:27 'a' ( const (read only) 8-element array of 3-component vector of float) +0:27 Construct vec3 ( temp 8-element array of 3-component vector of float) 0:28 vector-scale ( temp 3-component vector of float) 0:28 Constant: -0:28 -0.577350 -0:28 -0.577350 -0:28 -0.577350 +0:28 0.577350 +0:28 0.577350 +0:28 0.577350 0:28 add second child into first child ( temp float) 0:28 'n' ( temp float) 0:28 Constant: @@ -243,7 +234,7 @@ gl_FragCoord origin is upper left 0:29 Constant: 0:29 -0.577350 0:29 -0.577350 -0:29 0.577350 +0:29 -0.577350 0:29 add second child into first child ( temp float) 0:29 'n' ( temp float) 0:29 Constant: @@ -251,8 +242,8 @@ gl_FragCoord origin is upper left 0:30 vector-scale ( temp 3-component vector of float) 0:30 Constant: 0:30 -0.577350 -0:30 0.577350 0:30 -0.577350 +0:30 0.577350 0:30 add second child into first child ( temp float) 0:30 'n' ( temp float) 0:30 Constant: @@ -261,16 +252,16 @@ gl_FragCoord origin is upper left 0:31 Constant: 0:31 -0.577350 0:31 0.577350 -0:31 0.577350 +0:31 -0.577350 0:31 add second child into first child ( temp float) 0:31 'n' ( temp float) 0:31 Constant: 0:31 1.000000 0:32 vector-scale ( temp 3-component vector of float) 0:32 Constant: +0:32 -0.577350 +0:32 0.577350 0:32 0.577350 -0:32 -0.577350 -0:32 -0.577350 0:32 add second child into first child ( temp float) 0:32 'n' ( temp float) 0:32 Constant: @@ -279,7 +270,7 @@ gl_FragCoord origin is upper left 0:33 Constant: 0:33 0.577350 0:33 -0.577350 -0:33 0.577350 +0:33 -0.577350 0:33 add second child into first child ( temp float) 0:33 'n' ( temp float) 0:33 Constant: @@ -287,38 +278,38 @@ gl_FragCoord origin is upper left 0:34 vector-scale ( temp 3-component vector of float) 0:34 Constant: 0:34 0.577350 -0:34 0.577350 0:34 -0.577350 +0:34 0.577350 0:34 add second child into first child ( temp float) 0:34 'n' ( temp float) 0:34 Constant: 0:34 1.000000 -0:36 Sequence -0:36 move second child to first child ( temp structure{ temp 3-component vector of float a}) -0:36 'oneNonConst' ( const (read only) structure{ temp 3-component vector of float a}) -0:36 Construct structure ( temp structure{ temp 3-component vector of float a}) -0:36 vector-scale ( temp 3-component vector of float) -0:36 Constant: -0:36 -0.577350 -0:36 0.577350 -0:36 0.577350 -0:36 add second child into first child ( temp float) -0:36 'n' ( temp float) -0:36 Constant: -0:36 1.000000 -0:38 Sequence -0:38 move second child to first child ( temp structure{ temp 3-component vector of float a, temp 3-component vector of float b}) -0:38 'twoNonConst' ( const (read only) structure{ temp 3-component vector of float a, temp 3-component vector of float b}) -0:38 Construct structure ( temp structure{ temp 3-component vector of float a, temp 3-component vector of float b}) -0:38 vector-scale ( temp 3-component vector of float) -0:38 Constant: -0:38 -0.577350 -0:38 0.577350 -0:38 0.577350 -0:38 add second child into first child ( temp float) -0:38 'n' ( temp float) -0:38 Constant: -0:38 1.000000 +0:35 vector-scale ( temp 3-component vector of float) +0:35 Constant: +0:35 0.577350 +0:35 0.577350 +0:35 -0.577350 +0:35 add second child into first child ( temp float) +0:35 'n' ( temp float) +0:35 Constant: +0:35 1.000000 +0:37 Sequence +0:37 move second child to first child ( temp structure{ temp 3-component vector of float a}) +0:37 'oneNonConst' ( const (read only) structure{ temp 3-component vector of float a}) +0:37 Construct structure ( temp structure{ temp 3-component vector of float a}) +0:37 vector-scale ( temp 3-component vector of float) +0:37 Constant: +0:37 -0.577350 +0:37 0.577350 +0:37 0.577350 +0:37 add second child into first child ( temp float) +0:37 'n' ( temp float) +0:37 Constant: +0:37 1.000000 +0:39 Sequence +0:39 move second child to first child ( temp structure{ temp 3-component vector of float a, temp 3-component vector of float b}) +0:39 'twoNonConst' ( const (read only) structure{ temp 3-component vector of float a, temp 3-component vector of float b}) +0:39 Construct structure ( temp structure{ temp 3-component vector of float a, temp 3-component vector of float b}) 0:39 vector-scale ( temp 3-component vector of float) 0:39 Constant: 0:39 -0.577350 @@ -328,32 +319,41 @@ gl_FragCoord origin is upper left 0:39 'n' ( temp float) 0:39 Constant: 0:39 1.000000 -0:45 Function Definition: @main( ( temp structure{ temp 4-component vector of float color}) -0:45 Function Parameters: +0:40 vector-scale ( temp 3-component vector of float) +0:40 Constant: +0:40 -0.577350 +0:40 0.577350 +0:40 0.577350 +0:40 add second child into first child ( temp float) +0:40 'n' ( temp float) +0:40 Constant: +0:40 1.000000 +0:46 Function Definition: @main( ( temp structure{ temp 4-component vector of float color}) +0:46 Function Parameters: 0:? Sequence -0:46 Function Call: Test1( ( temp void) -0:49 move second child to first child ( temp 4-component vector of float) -0:49 color: direct index for structure ( temp 4-component vector of float) -0:49 'ps_output' ( temp structure{ temp 4-component vector of float color}) -0:49 Constant: -0:49 0 (const int) -0:49 Constant: -0:49 1.000000 -0:49 1.000000 -0:49 1.000000 -0:49 1.000000 -0:50 Branch: Return with expression -0:50 'ps_output' ( temp structure{ temp 4-component vector of float color}) -0:45 Function Definition: main( ( temp void) -0:45 Function Parameters: +0:47 Function Call: Test1( ( temp void) +0:50 move second child to first child ( temp 4-component vector of float) +0:50 color: direct index for structure ( temp 4-component vector of float) +0:50 'ps_output' ( temp structure{ temp 4-component vector of float color}) +0:50 Constant: +0:50 0 (const int) +0:50 Constant: +0:50 1.000000 +0:50 1.000000 +0:50 1.000000 +0:50 1.000000 +0:51 Branch: Return with expression +0:51 'ps_output' ( temp structure{ temp 4-component vector of float color}) +0:46 Function Definition: main( ( temp void) +0:46 Function Parameters: 0:? Sequence -0:45 Sequence -0:45 move second child to first child ( temp 4-component vector of float) +0:46 Sequence +0:46 move second child to first child ( temp 4-component vector of float) 0:? '@entryPointOutput.color' (layout( location=0) out 4-component vector of float) -0:45 color: direct index for structure ( temp 4-component vector of float) -0:45 Function Call: @main( ( temp structure{ temp 4-component vector of float color}) -0:45 Constant: -0:45 0 (const int) +0:46 color: direct index for structure ( temp 4-component vector of float) +0:46 Function Call: @main( ( temp structure{ temp 4-component vector of float color}) +0:46 Constant: +0:46 0 (const int) 0:? Linker Objects 0:? '@entryPointOutput.color' (layout( location=0) out 4-component vector of float) diff --git a/Test/baseResults/hlsl.intrinsics.comp.out b/Test/baseResults/hlsl.intrinsics.comp.out index 56752afb..c02e58ee 100755 --- a/Test/baseResults/hlsl.intrinsics.comp.out +++ b/Test/baseResults/hlsl.intrinsics.comp.out @@ -2,334 +2,337 @@ hlsl.intrinsics.comp Shader version: 500 local_size = (1, 1, 1) 0:? Sequence -0:17 Function Definition: ComputeShaderFunctionS(f1;f1;f1;u1;u1; ( temp float) -0:17 Function Parameters: -0:17 'inF0' ( in float) -0:17 'inF1' ( in float) -0:17 'inF2' ( in float) -0:17 'inU0' ( in uint) -0:17 'inU1' ( in uint) +0:19 Function Definition: ComputeShaderFunctionS(f1;f1;f1;u1;u1; ( temp float) +0:19 Function Parameters: +0:19 'inF0' ( in float) +0:19 'inF1' ( in float) +0:19 'inF2' ( in float) +0:19 'inU0' ( in uint) +0:19 'inU1' ( in uint) 0:? Sequence -0:21 all ( temp bool) -0:21 Convert float to bool ( temp bool) -0:21 'inF0' ( in float) -0:24 AtomicAdd ( temp uint) -0:24 'gs_ua' ( shared uint) -0:24 'gs_ub' ( shared uint) -0:25 move second child to first child ( temp uint) -0:25 'out_u1' ( temp uint) -0:25 AtomicAdd ( temp uint) -0:25 'gs_ua' ( shared uint) -0:25 'gs_ub' ( shared uint) -0:26 AtomicAnd ( temp uint) +0:23 all ( temp bool) +0:23 Convert float to bool ( temp bool) +0:23 'inF0' ( in float) +0:26 AtomicAdd ( temp uint) 0:26 'gs_ua' ( shared uint) 0:26 'gs_ub' ( shared uint) 0:27 move second child to first child ( temp uint) 0:27 'out_u1' ( temp uint) -0:27 AtomicAnd ( temp uint) +0:27 AtomicAdd ( temp uint) 0:27 'gs_ua' ( shared uint) 0:27 'gs_ub' ( shared uint) -0:28 move second child to first child ( temp uint) -0:28 'out_u1' ( temp uint) -0:28 AtomicCompSwap ( temp uint) -0:28 'gs_ua' ( shared uint) -0:28 'gs_ub' ( shared uint) -0:28 'gs_uc' ( shared uint) +0:28 AtomicAnd ( temp uint) +0:28 'gs_ua' ( shared uint) +0:28 'gs_ub' ( shared uint) 0:29 move second child to first child ( temp uint) 0:29 'out_u1' ( temp uint) -0:29 AtomicExchange ( temp uint) +0:29 AtomicAnd ( temp uint) 0:29 'gs_ua' ( shared uint) 0:29 'gs_ub' ( shared uint) -0:30 AtomicMax ( temp uint) -0:30 'gs_ua' ( shared uint) -0:30 'gs_ub' ( shared uint) +0:30 move second child to first child ( temp uint) +0:30 'out_u1' ( temp uint) +0:30 AtomicCompSwap ( temp uint) +0:30 'gs_ua' ( shared uint) +0:30 'gs_ub' ( shared uint) +0:30 'gs_uc' ( shared uint) 0:31 move second child to first child ( temp uint) 0:31 'out_u1' ( temp uint) -0:31 AtomicMax ( temp uint) +0:31 AtomicExchange ( temp uint) 0:31 'gs_ua' ( shared uint) 0:31 'gs_ub' ( shared uint) -0:32 AtomicMin ( temp uint) +0:32 AtomicMax ( temp uint) 0:32 'gs_ua' ( shared uint) 0:32 'gs_ub' ( shared uint) 0:33 move second child to first child ( temp uint) 0:33 'out_u1' ( temp uint) -0:33 AtomicMin ( temp uint) +0:33 AtomicMax ( temp uint) 0:33 'gs_ua' ( shared uint) 0:33 'gs_ub' ( shared uint) -0:34 AtomicOr ( temp uint) +0:34 AtomicMin ( temp uint) 0:34 'gs_ua' ( shared uint) 0:34 'gs_ub' ( shared uint) 0:35 move second child to first child ( temp uint) 0:35 'out_u1' ( temp uint) -0:35 AtomicOr ( temp uint) +0:35 AtomicMin ( temp uint) 0:35 'gs_ua' ( shared uint) 0:35 'gs_ub' ( shared uint) -0:36 AtomicXor ( temp uint) +0:36 AtomicOr ( temp uint) 0:36 'gs_ua' ( shared uint) 0:36 'gs_ub' ( shared uint) 0:37 move second child to first child ( temp uint) 0:37 'out_u1' ( temp uint) -0:37 AtomicXor ( temp uint) +0:37 AtomicOr ( temp uint) 0:37 'gs_ua' ( shared uint) 0:37 'gs_ub' ( shared uint) -0:41 Branch: Return with expression -0:41 Constant: -0:41 0.000000 -0:45 Function Definition: ComputeShaderFunction1(vf1;vf1;vf1; ( temp 1-component vector of float) -0:45 Function Parameters: -0:45 'inF0' ( in 1-component vector of float) -0:45 'inF1' ( in 1-component vector of float) -0:45 'inF2' ( in 1-component vector of float) +0:38 AtomicXor ( temp uint) +0:38 'gs_ua' ( shared uint) +0:38 'gs_ub' ( shared uint) +0:39 move second child to first child ( temp uint) +0:39 'out_u1' ( temp uint) +0:39 AtomicXor ( temp uint) +0:39 'gs_ua' ( shared uint) +0:39 'gs_ub' ( shared uint) +0:41 AtomicAdd ( temp float) +0:41 'gs_fa' ( shared float) +0:41 'gs_fb' ( shared float) +0:45 Branch: Return with expression +0:45 Constant: +0:45 0.000000 +0:49 Function Definition: ComputeShaderFunction1(vf1;vf1;vf1; ( temp 1-component vector of float) +0:49 Function Parameters: +0:49 'inF0' ( in 1-component vector of float) +0:49 'inF1' ( in 1-component vector of float) +0:49 'inF2' ( in 1-component vector of float) 0:? Sequence -0:47 Branch: Return with expression -0:47 Constant: -0:47 0.000000 -0:51 Function Definition: ComputeShaderFunction2(vf2;vf2;vf2;vu2;vu2; ( temp 2-component vector of float) -0:51 Function Parameters: -0:51 'inF0' ( in 2-component vector of float) -0:51 'inF1' ( in 2-component vector of float) -0:51 'inF2' ( in 2-component vector of float) -0:51 'inU0' ( in 2-component vector of uint) -0:51 'inU1' ( in 2-component vector of uint) +0:51 Branch: Return with expression +0:51 Constant: +0:51 0.000000 +0:55 Function Definition: ComputeShaderFunction2(vf2;vf2;vf2;vu2;vu2; ( temp 2-component vector of float) +0:55 Function Parameters: +0:55 'inF0' ( in 2-component vector of float) +0:55 'inF1' ( in 2-component vector of float) +0:55 'inF2' ( in 2-component vector of float) +0:55 'inU0' ( in 2-component vector of uint) +0:55 'inU1' ( in 2-component vector of uint) 0:? Sequence -0:55 all ( temp bool) -0:55 Convert float to bool ( temp 2-component vector of bool) -0:55 'inF0' ( in 2-component vector of float) -0:58 AtomicAdd ( temp 2-component vector of uint) -0:58 'gs_ua2' ( shared 2-component vector of uint) -0:58 'gs_ub2' ( shared 2-component vector of uint) -0:59 move second child to first child ( temp 2-component vector of uint) -0:59 'out_u2' ( temp 2-component vector of uint) -0:59 AtomicAdd ( temp 2-component vector of uint) -0:59 'gs_ua2' ( shared 2-component vector of uint) -0:59 'gs_ub2' ( shared 2-component vector of uint) -0:60 AtomicAnd ( temp 2-component vector of uint) -0:60 'gs_ua2' ( shared 2-component vector of uint) -0:60 'gs_ub2' ( shared 2-component vector of uint) -0:61 move second child to first child ( temp 2-component vector of uint) -0:61 'out_u2' ( temp 2-component vector of uint) -0:61 AtomicAnd ( temp 2-component vector of uint) -0:61 'gs_ua2' ( shared 2-component vector of uint) -0:61 'gs_ub2' ( shared 2-component vector of uint) -0:62 move second child to first child ( temp 2-component vector of uint) -0:62 'out_u2' ( temp 2-component vector of uint) -0:62 AtomicCompSwap ( temp 2-component vector of uint) -0:62 'gs_ua2' ( shared 2-component vector of uint) -0:62 'gs_ub2' ( shared 2-component vector of uint) -0:62 'gs_uc2' ( shared 2-component vector of uint) +0:59 all ( temp bool) +0:59 Convert float to bool ( temp 2-component vector of bool) +0:59 'inF0' ( in 2-component vector of float) +0:62 AtomicAdd ( temp 2-component vector of uint) +0:62 'gs_ua2' ( shared 2-component vector of uint) +0:62 'gs_ub2' ( shared 2-component vector of uint) 0:63 move second child to first child ( temp 2-component vector of uint) 0:63 'out_u2' ( temp 2-component vector of uint) -0:63 AtomicExchange ( temp 2-component vector of uint) +0:63 AtomicAdd ( temp 2-component vector of uint) 0:63 'gs_ua2' ( shared 2-component vector of uint) 0:63 'gs_ub2' ( shared 2-component vector of uint) -0:64 AtomicMax ( temp 2-component vector of uint) +0:64 AtomicAnd ( temp 2-component vector of uint) 0:64 'gs_ua2' ( shared 2-component vector of uint) 0:64 'gs_ub2' ( shared 2-component vector of uint) 0:65 move second child to first child ( temp 2-component vector of uint) 0:65 'out_u2' ( temp 2-component vector of uint) -0:65 AtomicMax ( temp 2-component vector of uint) +0:65 AtomicAnd ( temp 2-component vector of uint) 0:65 'gs_ua2' ( shared 2-component vector of uint) 0:65 'gs_ub2' ( shared 2-component vector of uint) -0:66 AtomicMin ( temp 2-component vector of uint) -0:66 'gs_ua2' ( shared 2-component vector of uint) -0:66 'gs_ub2' ( shared 2-component vector of uint) +0:66 move second child to first child ( temp 2-component vector of uint) +0:66 'out_u2' ( temp 2-component vector of uint) +0:66 AtomicCompSwap ( temp 2-component vector of uint) +0:66 'gs_ua2' ( shared 2-component vector of uint) +0:66 'gs_ub2' ( shared 2-component vector of uint) +0:66 'gs_uc2' ( shared 2-component vector of uint) 0:67 move second child to first child ( temp 2-component vector of uint) 0:67 'out_u2' ( temp 2-component vector of uint) -0:67 AtomicMin ( temp 2-component vector of uint) +0:67 AtomicExchange ( temp 2-component vector of uint) 0:67 'gs_ua2' ( shared 2-component vector of uint) 0:67 'gs_ub2' ( shared 2-component vector of uint) -0:68 AtomicOr ( temp 2-component vector of uint) +0:68 AtomicMax ( temp 2-component vector of uint) 0:68 'gs_ua2' ( shared 2-component vector of uint) 0:68 'gs_ub2' ( shared 2-component vector of uint) 0:69 move second child to first child ( temp 2-component vector of uint) 0:69 'out_u2' ( temp 2-component vector of uint) -0:69 AtomicOr ( temp 2-component vector of uint) +0:69 AtomicMax ( temp 2-component vector of uint) 0:69 'gs_ua2' ( shared 2-component vector of uint) 0:69 'gs_ub2' ( shared 2-component vector of uint) -0:70 AtomicXor ( temp 2-component vector of uint) +0:70 AtomicMin ( temp 2-component vector of uint) 0:70 'gs_ua2' ( shared 2-component vector of uint) 0:70 'gs_ub2' ( shared 2-component vector of uint) 0:71 move second child to first child ( temp 2-component vector of uint) 0:71 'out_u2' ( temp 2-component vector of uint) -0:71 AtomicXor ( temp 2-component vector of uint) +0:71 AtomicMin ( temp 2-component vector of uint) 0:71 'gs_ua2' ( shared 2-component vector of uint) 0:71 'gs_ub2' ( shared 2-component vector of uint) -0:74 Branch: Return with expression -0:74 Constant: -0:74 1.000000 -0:74 2.000000 -0:78 Function Definition: ComputeShaderFunction3(vf3;vf3;vf3;vu3;vu3; ( temp 3-component vector of float) -0:78 Function Parameters: -0:78 'inF0' ( in 3-component vector of float) -0:78 'inF1' ( in 3-component vector of float) -0:78 'inF2' ( in 3-component vector of float) -0:78 'inU0' ( in 3-component vector of uint) -0:78 'inU1' ( in 3-component vector of uint) +0:72 AtomicOr ( temp 2-component vector of uint) +0:72 'gs_ua2' ( shared 2-component vector of uint) +0:72 'gs_ub2' ( shared 2-component vector of uint) +0:73 move second child to first child ( temp 2-component vector of uint) +0:73 'out_u2' ( temp 2-component vector of uint) +0:73 AtomicOr ( temp 2-component vector of uint) +0:73 'gs_ua2' ( shared 2-component vector of uint) +0:73 'gs_ub2' ( shared 2-component vector of uint) +0:74 AtomicXor ( temp 2-component vector of uint) +0:74 'gs_ua2' ( shared 2-component vector of uint) +0:74 'gs_ub2' ( shared 2-component vector of uint) +0:75 move second child to first child ( temp 2-component vector of uint) +0:75 'out_u2' ( temp 2-component vector of uint) +0:75 AtomicXor ( temp 2-component vector of uint) +0:75 'gs_ua2' ( shared 2-component vector of uint) +0:75 'gs_ub2' ( shared 2-component vector of uint) +0:78 Branch: Return with expression +0:78 Constant: +0:78 1.000000 +0:78 2.000000 +0:82 Function Definition: ComputeShaderFunction3(vf3;vf3;vf3;vu3;vu3; ( temp 3-component vector of float) +0:82 Function Parameters: +0:82 'inF0' ( in 3-component vector of float) +0:82 'inF1' ( in 3-component vector of float) +0:82 'inF2' ( in 3-component vector of float) +0:82 'inU0' ( in 3-component vector of uint) +0:82 'inU1' ( in 3-component vector of uint) 0:? Sequence -0:82 all ( temp bool) -0:82 Convert float to bool ( temp 3-component vector of bool) -0:82 'inF0' ( in 3-component vector of float) -0:85 AtomicAdd ( temp 3-component vector of uint) -0:85 'gs_ua3' ( shared 3-component vector of uint) -0:85 'gs_ub3' ( shared 3-component vector of uint) -0:86 move second child to first child ( temp 3-component vector of uint) -0:86 'out_u3' ( temp 3-component vector of uint) -0:86 AtomicAdd ( temp 3-component vector of uint) -0:86 'gs_ua3' ( shared 3-component vector of uint) -0:86 'gs_ub3' ( shared 3-component vector of uint) -0:87 AtomicAnd ( temp 3-component vector of uint) -0:87 'gs_ua3' ( shared 3-component vector of uint) -0:87 'gs_ub3' ( shared 3-component vector of uint) -0:88 move second child to first child ( temp 3-component vector of uint) -0:88 'out_u3' ( temp 3-component vector of uint) -0:88 AtomicAnd ( temp 3-component vector of uint) -0:88 'gs_ua3' ( shared 3-component vector of uint) -0:88 'gs_ub3' ( shared 3-component vector of uint) -0:89 move second child to first child ( temp 3-component vector of uint) -0:89 'out_u3' ( temp 3-component vector of uint) -0:89 AtomicCompSwap ( temp 3-component vector of uint) -0:89 'gs_ua3' ( shared 3-component vector of uint) -0:89 'gs_ub3' ( shared 3-component vector of uint) -0:89 'gs_uc3' ( shared 3-component vector of uint) +0:86 all ( temp bool) +0:86 Convert float to bool ( temp 3-component vector of bool) +0:86 'inF0' ( in 3-component vector of float) +0:89 AtomicAdd ( temp 3-component vector of uint) +0:89 'gs_ua3' ( shared 3-component vector of uint) +0:89 'gs_ub3' ( shared 3-component vector of uint) 0:90 move second child to first child ( temp 3-component vector of uint) 0:90 'out_u3' ( temp 3-component vector of uint) -0:90 AtomicExchange ( temp 3-component vector of uint) +0:90 AtomicAdd ( temp 3-component vector of uint) 0:90 'gs_ua3' ( shared 3-component vector of uint) 0:90 'gs_ub3' ( shared 3-component vector of uint) -0:91 AtomicMax ( temp 3-component vector of uint) +0:91 AtomicAnd ( temp 3-component vector of uint) 0:91 'gs_ua3' ( shared 3-component vector of uint) 0:91 'gs_ub3' ( shared 3-component vector of uint) 0:92 move second child to first child ( temp 3-component vector of uint) 0:92 'out_u3' ( temp 3-component vector of uint) -0:92 AtomicMax ( temp 3-component vector of uint) +0:92 AtomicAnd ( temp 3-component vector of uint) 0:92 'gs_ua3' ( shared 3-component vector of uint) 0:92 'gs_ub3' ( shared 3-component vector of uint) -0:93 AtomicMin ( temp 3-component vector of uint) -0:93 'gs_ua3' ( shared 3-component vector of uint) -0:93 'gs_ub3' ( shared 3-component vector of uint) +0:93 move second child to first child ( temp 3-component vector of uint) +0:93 'out_u3' ( temp 3-component vector of uint) +0:93 AtomicCompSwap ( temp 3-component vector of uint) +0:93 'gs_ua3' ( shared 3-component vector of uint) +0:93 'gs_ub3' ( shared 3-component vector of uint) +0:93 'gs_uc3' ( shared 3-component vector of uint) 0:94 move second child to first child ( temp 3-component vector of uint) 0:94 'out_u3' ( temp 3-component vector of uint) -0:94 AtomicMin ( temp 3-component vector of uint) +0:94 AtomicExchange ( temp 3-component vector of uint) 0:94 'gs_ua3' ( shared 3-component vector of uint) 0:94 'gs_ub3' ( shared 3-component vector of uint) -0:95 AtomicOr ( temp 3-component vector of uint) +0:95 AtomicMax ( temp 3-component vector of uint) 0:95 'gs_ua3' ( shared 3-component vector of uint) 0:95 'gs_ub3' ( shared 3-component vector of uint) 0:96 move second child to first child ( temp 3-component vector of uint) 0:96 'out_u3' ( temp 3-component vector of uint) -0:96 AtomicOr ( temp 3-component vector of uint) +0:96 AtomicMax ( temp 3-component vector of uint) 0:96 'gs_ua3' ( shared 3-component vector of uint) 0:96 'gs_ub3' ( shared 3-component vector of uint) -0:97 AtomicXor ( temp 3-component vector of uint) +0:97 AtomicMin ( temp 3-component vector of uint) 0:97 'gs_ua3' ( shared 3-component vector of uint) 0:97 'gs_ub3' ( shared 3-component vector of uint) 0:98 move second child to first child ( temp 3-component vector of uint) 0:98 'out_u3' ( temp 3-component vector of uint) -0:98 AtomicXor ( temp 3-component vector of uint) +0:98 AtomicMin ( temp 3-component vector of uint) 0:98 'gs_ua3' ( shared 3-component vector of uint) 0:98 'gs_ub3' ( shared 3-component vector of uint) -0:101 Branch: Return with expression -0:101 Constant: -0:101 1.000000 -0:101 2.000000 -0:101 3.000000 -0:105 Function Definition: @ComputeShaderFunction(vf4;vf4;vf4;vu4;vu4; ( temp 4-component vector of float) -0:105 Function Parameters: -0:105 'inF0' ( in 4-component vector of float) -0:105 'inF1' ( in 4-component vector of float) -0:105 'inF2' ( in 4-component vector of float) -0:105 'inU0' ( in 4-component vector of uint) -0:105 'inU1' ( in 4-component vector of uint) +0:99 AtomicOr ( temp 3-component vector of uint) +0:99 'gs_ua3' ( shared 3-component vector of uint) +0:99 'gs_ub3' ( shared 3-component vector of uint) +0:100 move second child to first child ( temp 3-component vector of uint) +0:100 'out_u3' ( temp 3-component vector of uint) +0:100 AtomicOr ( temp 3-component vector of uint) +0:100 'gs_ua3' ( shared 3-component vector of uint) +0:100 'gs_ub3' ( shared 3-component vector of uint) +0:101 AtomicXor ( temp 3-component vector of uint) +0:101 'gs_ua3' ( shared 3-component vector of uint) +0:101 'gs_ub3' ( shared 3-component vector of uint) +0:102 move second child to first child ( temp 3-component vector of uint) +0:102 'out_u3' ( temp 3-component vector of uint) +0:102 AtomicXor ( temp 3-component vector of uint) +0:102 'gs_ua3' ( shared 3-component vector of uint) +0:102 'gs_ub3' ( shared 3-component vector of uint) +0:105 Branch: Return with expression +0:105 Constant: +0:105 1.000000 +0:105 2.000000 +0:105 3.000000 +0:109 Function Definition: @ComputeShaderFunction(vf4;vf4;vf4;vu4;vu4; ( temp 4-component vector of float) +0:109 Function Parameters: +0:109 'inF0' ( in 4-component vector of float) +0:109 'inF1' ( in 4-component vector of float) +0:109 'inF2' ( in 4-component vector of float) +0:109 'inU0' ( in 4-component vector of uint) +0:109 'inU1' ( in 4-component vector of uint) 0:? Sequence -0:109 all ( temp bool) -0:109 Convert float to bool ( temp 4-component vector of bool) -0:109 'inF0' ( in 4-component vector of float) -0:112 AtomicAdd ( temp 4-component vector of uint) -0:112 'gs_ua4' ( shared 4-component vector of uint) -0:112 'gs_ub4' ( shared 4-component vector of uint) -0:113 move second child to first child ( temp 4-component vector of uint) -0:113 'out_u4' ( temp 4-component vector of uint) -0:113 AtomicAdd ( temp 4-component vector of uint) -0:113 'gs_ua4' ( shared 4-component vector of uint) -0:113 'gs_ub4' ( shared 4-component vector of uint) -0:114 AtomicAnd ( temp 4-component vector of uint) -0:114 'gs_ua4' ( shared 4-component vector of uint) -0:114 'gs_ub4' ( shared 4-component vector of uint) -0:115 move second child to first child ( temp 4-component vector of uint) -0:115 'out_u4' ( temp 4-component vector of uint) -0:115 AtomicAnd ( temp 4-component vector of uint) -0:115 'gs_ua4' ( shared 4-component vector of uint) -0:115 'gs_ub4' ( shared 4-component vector of uint) -0:116 move second child to first child ( temp 4-component vector of uint) -0:116 'out_u4' ( temp 4-component vector of uint) -0:116 AtomicCompSwap ( temp 4-component vector of uint) -0:116 'gs_ua4' ( shared 4-component vector of uint) -0:116 'gs_ub4' ( shared 4-component vector of uint) -0:116 'gs_uc4' ( shared 4-component vector of uint) +0:113 all ( temp bool) +0:113 Convert float to bool ( temp 4-component vector of bool) +0:113 'inF0' ( in 4-component vector of float) +0:116 AtomicAdd ( temp 4-component vector of uint) +0:116 'gs_ua4' ( shared 4-component vector of uint) +0:116 'gs_ub4' ( shared 4-component vector of uint) 0:117 move second child to first child ( temp 4-component vector of uint) 0:117 'out_u4' ( temp 4-component vector of uint) -0:117 AtomicExchange ( temp 4-component vector of uint) +0:117 AtomicAdd ( temp 4-component vector of uint) 0:117 'gs_ua4' ( shared 4-component vector of uint) 0:117 'gs_ub4' ( shared 4-component vector of uint) -0:118 AtomicMax ( temp 4-component vector of uint) +0:118 AtomicAnd ( temp 4-component vector of uint) 0:118 'gs_ua4' ( shared 4-component vector of uint) 0:118 'gs_ub4' ( shared 4-component vector of uint) 0:119 move second child to first child ( temp 4-component vector of uint) 0:119 'out_u4' ( temp 4-component vector of uint) -0:119 AtomicMax ( temp 4-component vector of uint) +0:119 AtomicAnd ( temp 4-component vector of uint) 0:119 'gs_ua4' ( shared 4-component vector of uint) 0:119 'gs_ub4' ( shared 4-component vector of uint) -0:120 AtomicMin ( temp 4-component vector of uint) -0:120 'gs_ua4' ( shared 4-component vector of uint) -0:120 'gs_ub4' ( shared 4-component vector of uint) +0:120 move second child to first child ( temp 4-component vector of uint) +0:120 'out_u4' ( temp 4-component vector of uint) +0:120 AtomicCompSwap ( temp 4-component vector of uint) +0:120 'gs_ua4' ( shared 4-component vector of uint) +0:120 'gs_ub4' ( shared 4-component vector of uint) +0:120 'gs_uc4' ( shared 4-component vector of uint) 0:121 move second child to first child ( temp 4-component vector of uint) 0:121 'out_u4' ( temp 4-component vector of uint) -0:121 AtomicMin ( temp 4-component vector of uint) +0:121 AtomicExchange ( temp 4-component vector of uint) 0:121 'gs_ua4' ( shared 4-component vector of uint) 0:121 'gs_ub4' ( shared 4-component vector of uint) -0:122 AtomicOr ( temp 4-component vector of uint) +0:122 AtomicMax ( temp 4-component vector of uint) 0:122 'gs_ua4' ( shared 4-component vector of uint) 0:122 'gs_ub4' ( shared 4-component vector of uint) 0:123 move second child to first child ( temp 4-component vector of uint) 0:123 'out_u4' ( temp 4-component vector of uint) -0:123 AtomicOr ( temp 4-component vector of uint) +0:123 AtomicMax ( temp 4-component vector of uint) 0:123 'gs_ua4' ( shared 4-component vector of uint) 0:123 'gs_ub4' ( shared 4-component vector of uint) -0:124 AtomicXor ( temp 4-component vector of uint) +0:124 AtomicMin ( temp 4-component vector of uint) 0:124 'gs_ua4' ( shared 4-component vector of uint) 0:124 'gs_ub4' ( shared 4-component vector of uint) 0:125 move second child to first child ( temp 4-component vector of uint) 0:125 'out_u4' ( temp 4-component vector of uint) -0:125 AtomicXor ( temp 4-component vector of uint) +0:125 AtomicMin ( temp 4-component vector of uint) 0:125 'gs_ua4' ( shared 4-component vector of uint) 0:125 'gs_ub4' ( shared 4-component vector of uint) -0:128 Branch: Return with expression -0:128 Constant: -0:128 1.000000 -0:128 2.000000 -0:128 3.000000 -0:128 4.000000 -0:105 Function Definition: ComputeShaderFunction( ( temp void) -0:105 Function Parameters: +0:126 AtomicOr ( temp 4-component vector of uint) +0:126 'gs_ua4' ( shared 4-component vector of uint) +0:126 'gs_ub4' ( shared 4-component vector of uint) +0:127 move second child to first child ( temp 4-component vector of uint) +0:127 'out_u4' ( temp 4-component vector of uint) +0:127 AtomicOr ( temp 4-component vector of uint) +0:127 'gs_ua4' ( shared 4-component vector of uint) +0:127 'gs_ub4' ( shared 4-component vector of uint) +0:128 AtomicXor ( temp 4-component vector of uint) +0:128 'gs_ua4' ( shared 4-component vector of uint) +0:128 'gs_ub4' ( shared 4-component vector of uint) +0:129 move second child to first child ( temp 4-component vector of uint) +0:129 'out_u4' ( temp 4-component vector of uint) +0:129 AtomicXor ( temp 4-component vector of uint) +0:129 'gs_ua4' ( shared 4-component vector of uint) +0:129 'gs_ub4' ( shared 4-component vector of uint) +0:132 Branch: Return with expression +0:132 Constant: +0:132 1.000000 +0:132 2.000000 +0:132 3.000000 +0:132 4.000000 +0:109 Function Definition: ComputeShaderFunction( ( temp void) +0:109 Function Parameters: 0:? Sequence -0:105 move second child to first child ( temp 4-component vector of float) +0:109 move second child to first child ( temp 4-component vector of float) 0:? 'inF0' ( temp 4-component vector of float) 0:? 'inF0' (layout( location=0) in 4-component vector of float) -0:105 move second child to first child ( temp 4-component vector of float) +0:109 move second child to first child ( temp 4-component vector of float) 0:? 'inF1' ( temp 4-component vector of float) 0:? 'inF1' (layout( location=1) in 4-component vector of float) -0:105 move second child to first child ( temp 4-component vector of float) +0:109 move second child to first child ( temp 4-component vector of float) 0:? 'inF2' ( temp 4-component vector of float) 0:? 'inF2' (layout( location=2) in 4-component vector of float) -0:105 move second child to first child ( temp 4-component vector of uint) +0:109 move second child to first child ( temp 4-component vector of uint) 0:? 'inU0' ( temp 4-component vector of uint) 0:? 'inU0' (layout( location=3) in 4-component vector of uint) -0:105 move second child to first child ( temp 4-component vector of uint) +0:109 move second child to first child ( temp 4-component vector of uint) 0:? 'inU1' ( temp 4-component vector of uint) 0:? 'inU1' (layout( location=4) in 4-component vector of uint) -0:105 move second child to first child ( temp 4-component vector of float) +0:109 move second child to first child ( temp 4-component vector of float) 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) -0:105 Function Call: @ComputeShaderFunction(vf4;vf4;vf4;vu4;vu4; ( temp 4-component vector of float) +0:109 Function Call: @ComputeShaderFunction(vf4;vf4;vf4;vu4;vu4; ( temp 4-component vector of float) 0:? 'inF0' ( temp 4-component vector of float) 0:? 'inF1' ( temp 4-component vector of float) 0:? 'inF2' ( temp 4-component vector of float) @@ -348,6 +351,8 @@ local_size = (1, 1, 1) 0:? 'gs_ua4' ( shared 4-component vector of uint) 0:? 'gs_ub4' ( shared 4-component vector of uint) 0:? 'gs_uc4' ( shared 4-component vector of uint) +0:? 'gs_fa' ( shared float) +0:? 'gs_fb' ( shared float) 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) 0:? 'inF0' (layout( location=0) in 4-component vector of float) 0:? 'inF1' (layout( location=1) in 4-component vector of float) @@ -362,334 +367,337 @@ Linked compute stage: Shader version: 500 local_size = (1, 1, 1) 0:? Sequence -0:17 Function Definition: ComputeShaderFunctionS(f1;f1;f1;u1;u1; ( temp float) -0:17 Function Parameters: -0:17 'inF0' ( in float) -0:17 'inF1' ( in float) -0:17 'inF2' ( in float) -0:17 'inU0' ( in uint) -0:17 'inU1' ( in uint) +0:19 Function Definition: ComputeShaderFunctionS(f1;f1;f1;u1;u1; ( temp float) +0:19 Function Parameters: +0:19 'inF0' ( in float) +0:19 'inF1' ( in float) +0:19 'inF2' ( in float) +0:19 'inU0' ( in uint) +0:19 'inU1' ( in uint) 0:? Sequence -0:21 all ( temp bool) -0:21 Convert float to bool ( temp bool) -0:21 'inF0' ( in float) -0:24 AtomicAdd ( temp uint) -0:24 'gs_ua' ( shared uint) -0:24 'gs_ub' ( shared uint) -0:25 move second child to first child ( temp uint) -0:25 'out_u1' ( temp uint) -0:25 AtomicAdd ( temp uint) -0:25 'gs_ua' ( shared uint) -0:25 'gs_ub' ( shared uint) -0:26 AtomicAnd ( temp uint) +0:23 all ( temp bool) +0:23 Convert float to bool ( temp bool) +0:23 'inF0' ( in float) +0:26 AtomicAdd ( temp uint) 0:26 'gs_ua' ( shared uint) 0:26 'gs_ub' ( shared uint) 0:27 move second child to first child ( temp uint) 0:27 'out_u1' ( temp uint) -0:27 AtomicAnd ( temp uint) +0:27 AtomicAdd ( temp uint) 0:27 'gs_ua' ( shared uint) 0:27 'gs_ub' ( shared uint) -0:28 move second child to first child ( temp uint) -0:28 'out_u1' ( temp uint) -0:28 AtomicCompSwap ( temp uint) -0:28 'gs_ua' ( shared uint) -0:28 'gs_ub' ( shared uint) -0:28 'gs_uc' ( shared uint) +0:28 AtomicAnd ( temp uint) +0:28 'gs_ua' ( shared uint) +0:28 'gs_ub' ( shared uint) 0:29 move second child to first child ( temp uint) 0:29 'out_u1' ( temp uint) -0:29 AtomicExchange ( temp uint) +0:29 AtomicAnd ( temp uint) 0:29 'gs_ua' ( shared uint) 0:29 'gs_ub' ( shared uint) -0:30 AtomicMax ( temp uint) -0:30 'gs_ua' ( shared uint) -0:30 'gs_ub' ( shared uint) +0:30 move second child to first child ( temp uint) +0:30 'out_u1' ( temp uint) +0:30 AtomicCompSwap ( temp uint) +0:30 'gs_ua' ( shared uint) +0:30 'gs_ub' ( shared uint) +0:30 'gs_uc' ( shared uint) 0:31 move second child to first child ( temp uint) 0:31 'out_u1' ( temp uint) -0:31 AtomicMax ( temp uint) +0:31 AtomicExchange ( temp uint) 0:31 'gs_ua' ( shared uint) 0:31 'gs_ub' ( shared uint) -0:32 AtomicMin ( temp uint) +0:32 AtomicMax ( temp uint) 0:32 'gs_ua' ( shared uint) 0:32 'gs_ub' ( shared uint) 0:33 move second child to first child ( temp uint) 0:33 'out_u1' ( temp uint) -0:33 AtomicMin ( temp uint) +0:33 AtomicMax ( temp uint) 0:33 'gs_ua' ( shared uint) 0:33 'gs_ub' ( shared uint) -0:34 AtomicOr ( temp uint) +0:34 AtomicMin ( temp uint) 0:34 'gs_ua' ( shared uint) 0:34 'gs_ub' ( shared uint) 0:35 move second child to first child ( temp uint) 0:35 'out_u1' ( temp uint) -0:35 AtomicOr ( temp uint) +0:35 AtomicMin ( temp uint) 0:35 'gs_ua' ( shared uint) 0:35 'gs_ub' ( shared uint) -0:36 AtomicXor ( temp uint) +0:36 AtomicOr ( temp uint) 0:36 'gs_ua' ( shared uint) 0:36 'gs_ub' ( shared uint) 0:37 move second child to first child ( temp uint) 0:37 'out_u1' ( temp uint) -0:37 AtomicXor ( temp uint) +0:37 AtomicOr ( temp uint) 0:37 'gs_ua' ( shared uint) 0:37 'gs_ub' ( shared uint) -0:41 Branch: Return with expression -0:41 Constant: -0:41 0.000000 -0:45 Function Definition: ComputeShaderFunction1(vf1;vf1;vf1; ( temp 1-component vector of float) -0:45 Function Parameters: -0:45 'inF0' ( in 1-component vector of float) -0:45 'inF1' ( in 1-component vector of float) -0:45 'inF2' ( in 1-component vector of float) +0:38 AtomicXor ( temp uint) +0:38 'gs_ua' ( shared uint) +0:38 'gs_ub' ( shared uint) +0:39 move second child to first child ( temp uint) +0:39 'out_u1' ( temp uint) +0:39 AtomicXor ( temp uint) +0:39 'gs_ua' ( shared uint) +0:39 'gs_ub' ( shared uint) +0:41 AtomicAdd ( temp float) +0:41 'gs_fa' ( shared float) +0:41 'gs_fb' ( shared float) +0:45 Branch: Return with expression +0:45 Constant: +0:45 0.000000 +0:49 Function Definition: ComputeShaderFunction1(vf1;vf1;vf1; ( temp 1-component vector of float) +0:49 Function Parameters: +0:49 'inF0' ( in 1-component vector of float) +0:49 'inF1' ( in 1-component vector of float) +0:49 'inF2' ( in 1-component vector of float) 0:? Sequence -0:47 Branch: Return with expression -0:47 Constant: -0:47 0.000000 -0:51 Function Definition: ComputeShaderFunction2(vf2;vf2;vf2;vu2;vu2; ( temp 2-component vector of float) -0:51 Function Parameters: -0:51 'inF0' ( in 2-component vector of float) -0:51 'inF1' ( in 2-component vector of float) -0:51 'inF2' ( in 2-component vector of float) -0:51 'inU0' ( in 2-component vector of uint) -0:51 'inU1' ( in 2-component vector of uint) +0:51 Branch: Return with expression +0:51 Constant: +0:51 0.000000 +0:55 Function Definition: ComputeShaderFunction2(vf2;vf2;vf2;vu2;vu2; ( temp 2-component vector of float) +0:55 Function Parameters: +0:55 'inF0' ( in 2-component vector of float) +0:55 'inF1' ( in 2-component vector of float) +0:55 'inF2' ( in 2-component vector of float) +0:55 'inU0' ( in 2-component vector of uint) +0:55 'inU1' ( in 2-component vector of uint) 0:? Sequence -0:55 all ( temp bool) -0:55 Convert float to bool ( temp 2-component vector of bool) -0:55 'inF0' ( in 2-component vector of float) -0:58 AtomicAdd ( temp 2-component vector of uint) -0:58 'gs_ua2' ( shared 2-component vector of uint) -0:58 'gs_ub2' ( shared 2-component vector of uint) -0:59 move second child to first child ( temp 2-component vector of uint) -0:59 'out_u2' ( temp 2-component vector of uint) -0:59 AtomicAdd ( temp 2-component vector of uint) -0:59 'gs_ua2' ( shared 2-component vector of uint) -0:59 'gs_ub2' ( shared 2-component vector of uint) -0:60 AtomicAnd ( temp 2-component vector of uint) -0:60 'gs_ua2' ( shared 2-component vector of uint) -0:60 'gs_ub2' ( shared 2-component vector of uint) -0:61 move second child to first child ( temp 2-component vector of uint) -0:61 'out_u2' ( temp 2-component vector of uint) -0:61 AtomicAnd ( temp 2-component vector of uint) -0:61 'gs_ua2' ( shared 2-component vector of uint) -0:61 'gs_ub2' ( shared 2-component vector of uint) -0:62 move second child to first child ( temp 2-component vector of uint) -0:62 'out_u2' ( temp 2-component vector of uint) -0:62 AtomicCompSwap ( temp 2-component vector of uint) -0:62 'gs_ua2' ( shared 2-component vector of uint) -0:62 'gs_ub2' ( shared 2-component vector of uint) -0:62 'gs_uc2' ( shared 2-component vector of uint) +0:59 all ( temp bool) +0:59 Convert float to bool ( temp 2-component vector of bool) +0:59 'inF0' ( in 2-component vector of float) +0:62 AtomicAdd ( temp 2-component vector of uint) +0:62 'gs_ua2' ( shared 2-component vector of uint) +0:62 'gs_ub2' ( shared 2-component vector of uint) 0:63 move second child to first child ( temp 2-component vector of uint) 0:63 'out_u2' ( temp 2-component vector of uint) -0:63 AtomicExchange ( temp 2-component vector of uint) +0:63 AtomicAdd ( temp 2-component vector of uint) 0:63 'gs_ua2' ( shared 2-component vector of uint) 0:63 'gs_ub2' ( shared 2-component vector of uint) -0:64 AtomicMax ( temp 2-component vector of uint) +0:64 AtomicAnd ( temp 2-component vector of uint) 0:64 'gs_ua2' ( shared 2-component vector of uint) 0:64 'gs_ub2' ( shared 2-component vector of uint) 0:65 move second child to first child ( temp 2-component vector of uint) 0:65 'out_u2' ( temp 2-component vector of uint) -0:65 AtomicMax ( temp 2-component vector of uint) +0:65 AtomicAnd ( temp 2-component vector of uint) 0:65 'gs_ua2' ( shared 2-component vector of uint) 0:65 'gs_ub2' ( shared 2-component vector of uint) -0:66 AtomicMin ( temp 2-component vector of uint) -0:66 'gs_ua2' ( shared 2-component vector of uint) -0:66 'gs_ub2' ( shared 2-component vector of uint) +0:66 move second child to first child ( temp 2-component vector of uint) +0:66 'out_u2' ( temp 2-component vector of uint) +0:66 AtomicCompSwap ( temp 2-component vector of uint) +0:66 'gs_ua2' ( shared 2-component vector of uint) +0:66 'gs_ub2' ( shared 2-component vector of uint) +0:66 'gs_uc2' ( shared 2-component vector of uint) 0:67 move second child to first child ( temp 2-component vector of uint) 0:67 'out_u2' ( temp 2-component vector of uint) -0:67 AtomicMin ( temp 2-component vector of uint) +0:67 AtomicExchange ( temp 2-component vector of uint) 0:67 'gs_ua2' ( shared 2-component vector of uint) 0:67 'gs_ub2' ( shared 2-component vector of uint) -0:68 AtomicOr ( temp 2-component vector of uint) +0:68 AtomicMax ( temp 2-component vector of uint) 0:68 'gs_ua2' ( shared 2-component vector of uint) 0:68 'gs_ub2' ( shared 2-component vector of uint) 0:69 move second child to first child ( temp 2-component vector of uint) 0:69 'out_u2' ( temp 2-component vector of uint) -0:69 AtomicOr ( temp 2-component vector of uint) +0:69 AtomicMax ( temp 2-component vector of uint) 0:69 'gs_ua2' ( shared 2-component vector of uint) 0:69 'gs_ub2' ( shared 2-component vector of uint) -0:70 AtomicXor ( temp 2-component vector of uint) +0:70 AtomicMin ( temp 2-component vector of uint) 0:70 'gs_ua2' ( shared 2-component vector of uint) 0:70 'gs_ub2' ( shared 2-component vector of uint) 0:71 move second child to first child ( temp 2-component vector of uint) 0:71 'out_u2' ( temp 2-component vector of uint) -0:71 AtomicXor ( temp 2-component vector of uint) +0:71 AtomicMin ( temp 2-component vector of uint) 0:71 'gs_ua2' ( shared 2-component vector of uint) 0:71 'gs_ub2' ( shared 2-component vector of uint) -0:74 Branch: Return with expression -0:74 Constant: -0:74 1.000000 -0:74 2.000000 -0:78 Function Definition: ComputeShaderFunction3(vf3;vf3;vf3;vu3;vu3; ( temp 3-component vector of float) -0:78 Function Parameters: -0:78 'inF0' ( in 3-component vector of float) -0:78 'inF1' ( in 3-component vector of float) -0:78 'inF2' ( in 3-component vector of float) -0:78 'inU0' ( in 3-component vector of uint) -0:78 'inU1' ( in 3-component vector of uint) +0:72 AtomicOr ( temp 2-component vector of uint) +0:72 'gs_ua2' ( shared 2-component vector of uint) +0:72 'gs_ub2' ( shared 2-component vector of uint) +0:73 move second child to first child ( temp 2-component vector of uint) +0:73 'out_u2' ( temp 2-component vector of uint) +0:73 AtomicOr ( temp 2-component vector of uint) +0:73 'gs_ua2' ( shared 2-component vector of uint) +0:73 'gs_ub2' ( shared 2-component vector of uint) +0:74 AtomicXor ( temp 2-component vector of uint) +0:74 'gs_ua2' ( shared 2-component vector of uint) +0:74 'gs_ub2' ( shared 2-component vector of uint) +0:75 move second child to first child ( temp 2-component vector of uint) +0:75 'out_u2' ( temp 2-component vector of uint) +0:75 AtomicXor ( temp 2-component vector of uint) +0:75 'gs_ua2' ( shared 2-component vector of uint) +0:75 'gs_ub2' ( shared 2-component vector of uint) +0:78 Branch: Return with expression +0:78 Constant: +0:78 1.000000 +0:78 2.000000 +0:82 Function Definition: ComputeShaderFunction3(vf3;vf3;vf3;vu3;vu3; ( temp 3-component vector of float) +0:82 Function Parameters: +0:82 'inF0' ( in 3-component vector of float) +0:82 'inF1' ( in 3-component vector of float) +0:82 'inF2' ( in 3-component vector of float) +0:82 'inU0' ( in 3-component vector of uint) +0:82 'inU1' ( in 3-component vector of uint) 0:? Sequence -0:82 all ( temp bool) -0:82 Convert float to bool ( temp 3-component vector of bool) -0:82 'inF0' ( in 3-component vector of float) -0:85 AtomicAdd ( temp 3-component vector of uint) -0:85 'gs_ua3' ( shared 3-component vector of uint) -0:85 'gs_ub3' ( shared 3-component vector of uint) -0:86 move second child to first child ( temp 3-component vector of uint) -0:86 'out_u3' ( temp 3-component vector of uint) -0:86 AtomicAdd ( temp 3-component vector of uint) -0:86 'gs_ua3' ( shared 3-component vector of uint) -0:86 'gs_ub3' ( shared 3-component vector of uint) -0:87 AtomicAnd ( temp 3-component vector of uint) -0:87 'gs_ua3' ( shared 3-component vector of uint) -0:87 'gs_ub3' ( shared 3-component vector of uint) -0:88 move second child to first child ( temp 3-component vector of uint) -0:88 'out_u3' ( temp 3-component vector of uint) -0:88 AtomicAnd ( temp 3-component vector of uint) -0:88 'gs_ua3' ( shared 3-component vector of uint) -0:88 'gs_ub3' ( shared 3-component vector of uint) -0:89 move second child to first child ( temp 3-component vector of uint) -0:89 'out_u3' ( temp 3-component vector of uint) -0:89 AtomicCompSwap ( temp 3-component vector of uint) -0:89 'gs_ua3' ( shared 3-component vector of uint) -0:89 'gs_ub3' ( shared 3-component vector of uint) -0:89 'gs_uc3' ( shared 3-component vector of uint) +0:86 all ( temp bool) +0:86 Convert float to bool ( temp 3-component vector of bool) +0:86 'inF0' ( in 3-component vector of float) +0:89 AtomicAdd ( temp 3-component vector of uint) +0:89 'gs_ua3' ( shared 3-component vector of uint) +0:89 'gs_ub3' ( shared 3-component vector of uint) 0:90 move second child to first child ( temp 3-component vector of uint) 0:90 'out_u3' ( temp 3-component vector of uint) -0:90 AtomicExchange ( temp 3-component vector of uint) +0:90 AtomicAdd ( temp 3-component vector of uint) 0:90 'gs_ua3' ( shared 3-component vector of uint) 0:90 'gs_ub3' ( shared 3-component vector of uint) -0:91 AtomicMax ( temp 3-component vector of uint) +0:91 AtomicAnd ( temp 3-component vector of uint) 0:91 'gs_ua3' ( shared 3-component vector of uint) 0:91 'gs_ub3' ( shared 3-component vector of uint) 0:92 move second child to first child ( temp 3-component vector of uint) 0:92 'out_u3' ( temp 3-component vector of uint) -0:92 AtomicMax ( temp 3-component vector of uint) +0:92 AtomicAnd ( temp 3-component vector of uint) 0:92 'gs_ua3' ( shared 3-component vector of uint) 0:92 'gs_ub3' ( shared 3-component vector of uint) -0:93 AtomicMin ( temp 3-component vector of uint) -0:93 'gs_ua3' ( shared 3-component vector of uint) -0:93 'gs_ub3' ( shared 3-component vector of uint) +0:93 move second child to first child ( temp 3-component vector of uint) +0:93 'out_u3' ( temp 3-component vector of uint) +0:93 AtomicCompSwap ( temp 3-component vector of uint) +0:93 'gs_ua3' ( shared 3-component vector of uint) +0:93 'gs_ub3' ( shared 3-component vector of uint) +0:93 'gs_uc3' ( shared 3-component vector of uint) 0:94 move second child to first child ( temp 3-component vector of uint) 0:94 'out_u3' ( temp 3-component vector of uint) -0:94 AtomicMin ( temp 3-component vector of uint) +0:94 AtomicExchange ( temp 3-component vector of uint) 0:94 'gs_ua3' ( shared 3-component vector of uint) 0:94 'gs_ub3' ( shared 3-component vector of uint) -0:95 AtomicOr ( temp 3-component vector of uint) +0:95 AtomicMax ( temp 3-component vector of uint) 0:95 'gs_ua3' ( shared 3-component vector of uint) 0:95 'gs_ub3' ( shared 3-component vector of uint) 0:96 move second child to first child ( temp 3-component vector of uint) 0:96 'out_u3' ( temp 3-component vector of uint) -0:96 AtomicOr ( temp 3-component vector of uint) +0:96 AtomicMax ( temp 3-component vector of uint) 0:96 'gs_ua3' ( shared 3-component vector of uint) 0:96 'gs_ub3' ( shared 3-component vector of uint) -0:97 AtomicXor ( temp 3-component vector of uint) +0:97 AtomicMin ( temp 3-component vector of uint) 0:97 'gs_ua3' ( shared 3-component vector of uint) 0:97 'gs_ub3' ( shared 3-component vector of uint) 0:98 move second child to first child ( temp 3-component vector of uint) 0:98 'out_u3' ( temp 3-component vector of uint) -0:98 AtomicXor ( temp 3-component vector of uint) +0:98 AtomicMin ( temp 3-component vector of uint) 0:98 'gs_ua3' ( shared 3-component vector of uint) 0:98 'gs_ub3' ( shared 3-component vector of uint) -0:101 Branch: Return with expression -0:101 Constant: -0:101 1.000000 -0:101 2.000000 -0:101 3.000000 -0:105 Function Definition: @ComputeShaderFunction(vf4;vf4;vf4;vu4;vu4; ( temp 4-component vector of float) -0:105 Function Parameters: -0:105 'inF0' ( in 4-component vector of float) -0:105 'inF1' ( in 4-component vector of float) -0:105 'inF2' ( in 4-component vector of float) -0:105 'inU0' ( in 4-component vector of uint) -0:105 'inU1' ( in 4-component vector of uint) +0:99 AtomicOr ( temp 3-component vector of uint) +0:99 'gs_ua3' ( shared 3-component vector of uint) +0:99 'gs_ub3' ( shared 3-component vector of uint) +0:100 move second child to first child ( temp 3-component vector of uint) +0:100 'out_u3' ( temp 3-component vector of uint) +0:100 AtomicOr ( temp 3-component vector of uint) +0:100 'gs_ua3' ( shared 3-component vector of uint) +0:100 'gs_ub3' ( shared 3-component vector of uint) +0:101 AtomicXor ( temp 3-component vector of uint) +0:101 'gs_ua3' ( shared 3-component vector of uint) +0:101 'gs_ub3' ( shared 3-component vector of uint) +0:102 move second child to first child ( temp 3-component vector of uint) +0:102 'out_u3' ( temp 3-component vector of uint) +0:102 AtomicXor ( temp 3-component vector of uint) +0:102 'gs_ua3' ( shared 3-component vector of uint) +0:102 'gs_ub3' ( shared 3-component vector of uint) +0:105 Branch: Return with expression +0:105 Constant: +0:105 1.000000 +0:105 2.000000 +0:105 3.000000 +0:109 Function Definition: @ComputeShaderFunction(vf4;vf4;vf4;vu4;vu4; ( temp 4-component vector of float) +0:109 Function Parameters: +0:109 'inF0' ( in 4-component vector of float) +0:109 'inF1' ( in 4-component vector of float) +0:109 'inF2' ( in 4-component vector of float) +0:109 'inU0' ( in 4-component vector of uint) +0:109 'inU1' ( in 4-component vector of uint) 0:? Sequence -0:109 all ( temp bool) -0:109 Convert float to bool ( temp 4-component vector of bool) -0:109 'inF0' ( in 4-component vector of float) -0:112 AtomicAdd ( temp 4-component vector of uint) -0:112 'gs_ua4' ( shared 4-component vector of uint) -0:112 'gs_ub4' ( shared 4-component vector of uint) -0:113 move second child to first child ( temp 4-component vector of uint) -0:113 'out_u4' ( temp 4-component vector of uint) -0:113 AtomicAdd ( temp 4-component vector of uint) -0:113 'gs_ua4' ( shared 4-component vector of uint) -0:113 'gs_ub4' ( shared 4-component vector of uint) -0:114 AtomicAnd ( temp 4-component vector of uint) -0:114 'gs_ua4' ( shared 4-component vector of uint) -0:114 'gs_ub4' ( shared 4-component vector of uint) -0:115 move second child to first child ( temp 4-component vector of uint) -0:115 'out_u4' ( temp 4-component vector of uint) -0:115 AtomicAnd ( temp 4-component vector of uint) -0:115 'gs_ua4' ( shared 4-component vector of uint) -0:115 'gs_ub4' ( shared 4-component vector of uint) -0:116 move second child to first child ( temp 4-component vector of uint) -0:116 'out_u4' ( temp 4-component vector of uint) -0:116 AtomicCompSwap ( temp 4-component vector of uint) -0:116 'gs_ua4' ( shared 4-component vector of uint) -0:116 'gs_ub4' ( shared 4-component vector of uint) -0:116 'gs_uc4' ( shared 4-component vector of uint) +0:113 all ( temp bool) +0:113 Convert float to bool ( temp 4-component vector of bool) +0:113 'inF0' ( in 4-component vector of float) +0:116 AtomicAdd ( temp 4-component vector of uint) +0:116 'gs_ua4' ( shared 4-component vector of uint) +0:116 'gs_ub4' ( shared 4-component vector of uint) 0:117 move second child to first child ( temp 4-component vector of uint) 0:117 'out_u4' ( temp 4-component vector of uint) -0:117 AtomicExchange ( temp 4-component vector of uint) +0:117 AtomicAdd ( temp 4-component vector of uint) 0:117 'gs_ua4' ( shared 4-component vector of uint) 0:117 'gs_ub4' ( shared 4-component vector of uint) -0:118 AtomicMax ( temp 4-component vector of uint) +0:118 AtomicAnd ( temp 4-component vector of uint) 0:118 'gs_ua4' ( shared 4-component vector of uint) 0:118 'gs_ub4' ( shared 4-component vector of uint) 0:119 move second child to first child ( temp 4-component vector of uint) 0:119 'out_u4' ( temp 4-component vector of uint) -0:119 AtomicMax ( temp 4-component vector of uint) +0:119 AtomicAnd ( temp 4-component vector of uint) 0:119 'gs_ua4' ( shared 4-component vector of uint) 0:119 'gs_ub4' ( shared 4-component vector of uint) -0:120 AtomicMin ( temp 4-component vector of uint) -0:120 'gs_ua4' ( shared 4-component vector of uint) -0:120 'gs_ub4' ( shared 4-component vector of uint) +0:120 move second child to first child ( temp 4-component vector of uint) +0:120 'out_u4' ( temp 4-component vector of uint) +0:120 AtomicCompSwap ( temp 4-component vector of uint) +0:120 'gs_ua4' ( shared 4-component vector of uint) +0:120 'gs_ub4' ( shared 4-component vector of uint) +0:120 'gs_uc4' ( shared 4-component vector of uint) 0:121 move second child to first child ( temp 4-component vector of uint) 0:121 'out_u4' ( temp 4-component vector of uint) -0:121 AtomicMin ( temp 4-component vector of uint) +0:121 AtomicExchange ( temp 4-component vector of uint) 0:121 'gs_ua4' ( shared 4-component vector of uint) 0:121 'gs_ub4' ( shared 4-component vector of uint) -0:122 AtomicOr ( temp 4-component vector of uint) +0:122 AtomicMax ( temp 4-component vector of uint) 0:122 'gs_ua4' ( shared 4-component vector of uint) 0:122 'gs_ub4' ( shared 4-component vector of uint) 0:123 move second child to first child ( temp 4-component vector of uint) 0:123 'out_u4' ( temp 4-component vector of uint) -0:123 AtomicOr ( temp 4-component vector of uint) +0:123 AtomicMax ( temp 4-component vector of uint) 0:123 'gs_ua4' ( shared 4-component vector of uint) 0:123 'gs_ub4' ( shared 4-component vector of uint) -0:124 AtomicXor ( temp 4-component vector of uint) +0:124 AtomicMin ( temp 4-component vector of uint) 0:124 'gs_ua4' ( shared 4-component vector of uint) 0:124 'gs_ub4' ( shared 4-component vector of uint) 0:125 move second child to first child ( temp 4-component vector of uint) 0:125 'out_u4' ( temp 4-component vector of uint) -0:125 AtomicXor ( temp 4-component vector of uint) +0:125 AtomicMin ( temp 4-component vector of uint) 0:125 'gs_ua4' ( shared 4-component vector of uint) 0:125 'gs_ub4' ( shared 4-component vector of uint) -0:128 Branch: Return with expression -0:128 Constant: -0:128 1.000000 -0:128 2.000000 -0:128 3.000000 -0:128 4.000000 -0:105 Function Definition: ComputeShaderFunction( ( temp void) -0:105 Function Parameters: +0:126 AtomicOr ( temp 4-component vector of uint) +0:126 'gs_ua4' ( shared 4-component vector of uint) +0:126 'gs_ub4' ( shared 4-component vector of uint) +0:127 move second child to first child ( temp 4-component vector of uint) +0:127 'out_u4' ( temp 4-component vector of uint) +0:127 AtomicOr ( temp 4-component vector of uint) +0:127 'gs_ua4' ( shared 4-component vector of uint) +0:127 'gs_ub4' ( shared 4-component vector of uint) +0:128 AtomicXor ( temp 4-component vector of uint) +0:128 'gs_ua4' ( shared 4-component vector of uint) +0:128 'gs_ub4' ( shared 4-component vector of uint) +0:129 move second child to first child ( temp 4-component vector of uint) +0:129 'out_u4' ( temp 4-component vector of uint) +0:129 AtomicXor ( temp 4-component vector of uint) +0:129 'gs_ua4' ( shared 4-component vector of uint) +0:129 'gs_ub4' ( shared 4-component vector of uint) +0:132 Branch: Return with expression +0:132 Constant: +0:132 1.000000 +0:132 2.000000 +0:132 3.000000 +0:132 4.000000 +0:109 Function Definition: ComputeShaderFunction( ( temp void) +0:109 Function Parameters: 0:? Sequence -0:105 move second child to first child ( temp 4-component vector of float) +0:109 move second child to first child ( temp 4-component vector of float) 0:? 'inF0' ( temp 4-component vector of float) 0:? 'inF0' (layout( location=0) in 4-component vector of float) -0:105 move second child to first child ( temp 4-component vector of float) +0:109 move second child to first child ( temp 4-component vector of float) 0:? 'inF1' ( temp 4-component vector of float) 0:? 'inF1' (layout( location=1) in 4-component vector of float) -0:105 move second child to first child ( temp 4-component vector of float) +0:109 move second child to first child ( temp 4-component vector of float) 0:? 'inF2' ( temp 4-component vector of float) 0:? 'inF2' (layout( location=2) in 4-component vector of float) -0:105 move second child to first child ( temp 4-component vector of uint) +0:109 move second child to first child ( temp 4-component vector of uint) 0:? 'inU0' ( temp 4-component vector of uint) 0:? 'inU0' (layout( location=3) in 4-component vector of uint) -0:105 move second child to first child ( temp 4-component vector of uint) +0:109 move second child to first child ( temp 4-component vector of uint) 0:? 'inU1' ( temp 4-component vector of uint) 0:? 'inU1' (layout( location=4) in 4-component vector of uint) -0:105 move second child to first child ( temp 4-component vector of float) +0:109 move second child to first child ( temp 4-component vector of float) 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) -0:105 Function Call: @ComputeShaderFunction(vf4;vf4;vf4;vu4;vu4; ( temp 4-component vector of float) +0:109 Function Call: @ComputeShaderFunction(vf4;vf4;vf4;vu4;vu4; ( temp 4-component vector of float) 0:? 'inF0' ( temp 4-component vector of float) 0:? 'inF1' ( temp 4-component vector of float) 0:? 'inF2' ( temp 4-component vector of float) @@ -708,6 +716,8 @@ local_size = (1, 1, 1) 0:? 'gs_ua4' ( shared 4-component vector of uint) 0:? 'gs_ub4' ( shared 4-component vector of uint) 0:? 'gs_uc4' ( shared 4-component vector of uint) +0:? 'gs_fa' ( shared float) +0:? 'gs_fb' ( shared float) 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) 0:? 'inF0' (layout( location=0) in 4-component vector of float) 0:? 'inF1' (layout( location=1) in 4-component vector of float) @@ -718,12 +728,14 @@ local_size = (1, 1, 1) Validation failed // Module Version 10000 // Generated by (magic number): 8000b -// Id's are bound by 265 +// Id's are bound by 270 Capability Shader + Capability AtomicFloat32AddEXT + Extension "SPV_EXT_shader_atomic_float_add" 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint GLCompute 4 "ComputeShaderFunction" 237 240 243 247 250 253 + EntryPoint GLCompute 4 "ComputeShaderFunction" 242 245 248 252 255 258 ExecutionMode 4 LocalSize 1 1 1 Source HLSL 500 Name 4 "ComputeShaderFunction" @@ -759,40 +771,42 @@ Validation failed Name 67 "gs_ub" Name 72 "out_u1" Name 80 "gs_uc" - Name 111 "gs_ua2" - Name 112 "gs_ub2" - Name 115 "out_u2" - Name 123 "gs_uc2" - Name 155 "gs_ua3" - Name 156 "gs_ub3" - Name 159 "out_u3" - Name 167 "gs_uc3" - Name 198 "gs_ua4" - Name 199 "gs_ub4" - Name 202 "out_u4" - Name 210 "gs_uc4" - Name 235 "inF0" - Name 237 "inF0" - Name 239 "inF1" - Name 240 "inF1" - Name 242 "inF2" - Name 243 "inF2" - Name 245 "inU0" - Name 247 "inU0" - Name 249 "inU1" - Name 250 "inU1" - Name 253 "@entryPointOutput" - Name 254 "param" - Name 256 "param" - Name 258 "param" - Name 260 "param" - Name 262 "param" - Decorate 237(inF0) Location 0 - Decorate 240(inF1) Location 1 - Decorate 243(inF2) Location 2 - Decorate 247(inU0) Location 3 - Decorate 250(inU1) Location 4 - Decorate 253(@entryPointOutput) Location 0 + Name 102 "gs_fa" + Name 103 "gs_fb" + Name 116 "gs_ua2" + Name 117 "gs_ub2" + Name 120 "out_u2" + Name 128 "gs_uc2" + Name 160 "gs_ua3" + Name 161 "gs_ub3" + Name 164 "out_u3" + Name 172 "gs_uc3" + Name 203 "gs_ua4" + Name 204 "gs_ub4" + Name 207 "out_u4" + Name 215 "gs_uc4" + Name 240 "inF0" + Name 242 "inF0" + Name 244 "inF1" + Name 245 "inF1" + Name 247 "inF2" + Name 248 "inF2" + Name 250 "inU0" + Name 252 "inU0" + Name 254 "inU1" + Name 255 "inU1" + Name 258 "@entryPointOutput" + Name 259 "param" + Name 261 "param" + Name 263 "param" + Name 265 "param" + Name 267 "param" + Decorate 242(inF0) Location 0 + Decorate 245(inF1) Location 1 + Decorate 248(inF2) Location 2 + Decorate 252(inU0) Location 3 + Decorate 255(inU1) Location 4 + Decorate 258(@entryPointOutput) Location 0 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -824,74 +838,77 @@ Validation failed 69: 8(int) Constant 1 70: 8(int) Constant 0 80(gs_uc): 65(ptr) Variable Workgroup - 106: TypeVector 61(bool) 2 - 107: 24(fvec2) ConstantComposite 62 62 - 110: TypePointer Workgroup 26(ivec2) - 111(gs_ua2): 110(ptr) Variable Workgroup - 112(gs_ub2): 110(ptr) Variable Workgroup - 123(gs_uc2): 110(ptr) Variable Workgroup - 144: 6(float) Constant 1065353216 - 145: 6(float) Constant 1073741824 - 146: 24(fvec2) ConstantComposite 144 145 - 150: TypeVector 61(bool) 3 - 151: 36(fvec3) ConstantComposite 62 62 62 - 154: TypePointer Workgroup 38(ivec3) - 155(gs_ua3): 154(ptr) Variable Workgroup - 156(gs_ub3): 154(ptr) Variable Workgroup - 167(gs_uc3): 154(ptr) Variable Workgroup - 188: 6(float) Constant 1077936128 - 189: 36(fvec3) ConstantComposite 144 145 188 - 193: TypeVector 61(bool) 4 - 194: 48(fvec4) ConstantComposite 62 62 62 62 - 197: TypePointer Workgroup 50(ivec4) - 198(gs_ua4): 197(ptr) Variable Workgroup - 199(gs_ub4): 197(ptr) Variable Workgroup - 210(gs_uc4): 197(ptr) Variable Workgroup - 231: 6(float) Constant 1082130432 - 232: 48(fvec4) ConstantComposite 144 145 188 231 - 236: TypePointer Input 48(fvec4) - 237(inF0): 236(ptr) Variable Input - 240(inF1): 236(ptr) Variable Input - 243(inF2): 236(ptr) Variable Input - 246: TypePointer Input 50(ivec4) - 247(inU0): 246(ptr) Variable Input - 250(inU1): 246(ptr) Variable Input - 252: TypePointer Output 48(fvec4) -253(@entryPointOutput): 252(ptr) Variable Output + 101: TypePointer Workgroup 6(float) + 102(gs_fa): 101(ptr) Variable Workgroup + 103(gs_fb): 101(ptr) Variable Workgroup + 111: TypeVector 61(bool) 2 + 112: 24(fvec2) ConstantComposite 62 62 + 115: TypePointer Workgroup 26(ivec2) + 116(gs_ua2): 115(ptr) Variable Workgroup + 117(gs_ub2): 115(ptr) Variable Workgroup + 128(gs_uc2): 115(ptr) Variable Workgroup + 149: 6(float) Constant 1065353216 + 150: 6(float) Constant 1073741824 + 151: 24(fvec2) ConstantComposite 149 150 + 155: TypeVector 61(bool) 3 + 156: 36(fvec3) ConstantComposite 62 62 62 + 159: TypePointer Workgroup 38(ivec3) + 160(gs_ua3): 159(ptr) Variable Workgroup + 161(gs_ub3): 159(ptr) Variable Workgroup + 172(gs_uc3): 159(ptr) Variable Workgroup + 193: 6(float) Constant 1077936128 + 194: 36(fvec3) ConstantComposite 149 150 193 + 198: TypeVector 61(bool) 4 + 199: 48(fvec4) ConstantComposite 62 62 62 62 + 202: TypePointer Workgroup 50(ivec4) + 203(gs_ua4): 202(ptr) Variable Workgroup + 204(gs_ub4): 202(ptr) Variable Workgroup + 215(gs_uc4): 202(ptr) Variable Workgroup + 236: 6(float) Constant 1082130432 + 237: 48(fvec4) ConstantComposite 149 150 193 236 + 241: TypePointer Input 48(fvec4) + 242(inF0): 241(ptr) Variable Input + 245(inF1): 241(ptr) Variable Input + 248(inF2): 241(ptr) Variable Input + 251: TypePointer Input 50(ivec4) + 252(inU0): 251(ptr) Variable Input + 255(inU1): 251(ptr) Variable Input + 257: TypePointer Output 48(fvec4) +258(@entryPointOutput): 257(ptr) Variable Output 4(ComputeShaderFunction): 2 Function None 3 5: Label - 235(inF0): 49(ptr) Variable Function - 239(inF1): 49(ptr) Variable Function - 242(inF2): 49(ptr) Variable Function - 245(inU0): 51(ptr) Variable Function - 249(inU1): 51(ptr) Variable Function - 254(param): 49(ptr) Variable Function - 256(param): 49(ptr) Variable Function - 258(param): 49(ptr) Variable Function - 260(param): 51(ptr) Variable Function - 262(param): 51(ptr) Variable Function - 238: 48(fvec4) Load 237(inF0) - Store 235(inF0) 238 - 241: 48(fvec4) Load 240(inF1) - Store 239(inF1) 241 - 244: 48(fvec4) Load 243(inF2) - Store 242(inF2) 244 - 248: 50(ivec4) Load 247(inU0) - Store 245(inU0) 248 - 251: 50(ivec4) Load 250(inU1) - Store 249(inU1) 251 - 255: 48(fvec4) Load 235(inF0) - Store 254(param) 255 - 257: 48(fvec4) Load 239(inF1) - Store 256(param) 257 - 259: 48(fvec4) Load 242(inF2) - Store 258(param) 259 - 261: 50(ivec4) Load 245(inU0) - Store 260(param) 261 - 263: 50(ivec4) Load 249(inU1) - Store 262(param) 263 - 264: 48(fvec4) FunctionCall 58(@ComputeShaderFunction(vf4;vf4;vf4;vu4;vu4;) 254(param) 256(param) 258(param) 260(param) 262(param) - Store 253(@entryPointOutput) 264 + 240(inF0): 49(ptr) Variable Function + 244(inF1): 49(ptr) Variable Function + 247(inF2): 49(ptr) Variable Function + 250(inU0): 51(ptr) Variable Function + 254(inU1): 51(ptr) Variable Function + 259(param): 49(ptr) Variable Function + 261(param): 49(ptr) Variable Function + 263(param): 49(ptr) Variable Function + 265(param): 51(ptr) Variable Function + 267(param): 51(ptr) Variable Function + 243: 48(fvec4) Load 242(inF0) + Store 240(inF0) 243 + 246: 48(fvec4) Load 245(inF1) + Store 244(inF1) 246 + 249: 48(fvec4) Load 248(inF2) + Store 247(inF2) 249 + 253: 50(ivec4) Load 252(inU0) + Store 250(inU0) 253 + 256: 50(ivec4) Load 255(inU1) + Store 254(inU1) 256 + 260: 48(fvec4) Load 240(inF0) + Store 259(param) 260 + 262: 48(fvec4) Load 244(inF1) + Store 261(param) 262 + 264: 48(fvec4) Load 247(inF2) + Store 263(param) 264 + 266: 50(ivec4) Load 250(inU0) + Store 265(param) 266 + 268: 50(ivec4) Load 254(inU1) + Store 267(param) 268 + 269: 48(fvec4) FunctionCall 58(@ComputeShaderFunction(vf4;vf4;vf4;vu4;vu4;) 259(param) 261(param) 263(param) 265(param) 267(param) + Store 258(@entryPointOutput) 269 Return FunctionEnd 16(ComputeShaderFunctionS(f1;f1;f1;u1;u1;): 6(float) Function None 10 @@ -942,6 +959,8 @@ Validation failed 99: 8(int) Load 67(gs_ub) 100: 8(int) AtomicXor 66(gs_ua) 69 70 99 Store 72(out_u1) 100 + 104: 6(float) Load 103(gs_fb) + 105: 6(float) AtomicFAddEXT 102(gs_fa) 69 70 104 ReturnValue 62 FunctionEnd 22(ComputeShaderFunction1(vf1;vf1;vf1;): 6(float) Function None 18 @@ -958,48 +977,48 @@ Validation failed 32(inU0): 27(ptr) FunctionParameter 33(inU1): 27(ptr) FunctionParameter 35: Label - 115(out_u2): 27(ptr) Variable Function - 105: 24(fvec2) Load 29(inF0) - 108: 106(bvec2) FUnordNotEqual 105 107 - 109: 61(bool) All 108 - 113: 26(ivec2) Load 112(gs_ub2) - 114: 26(ivec2) AtomicIAdd 111(gs_ua2) 69 70 113 - 116: 26(ivec2) Load 112(gs_ub2) - 117: 26(ivec2) AtomicIAdd 111(gs_ua2) 69 70 116 - Store 115(out_u2) 117 - 118: 26(ivec2) Load 112(gs_ub2) - 119: 26(ivec2) AtomicAnd 111(gs_ua2) 69 70 118 - 120: 26(ivec2) Load 112(gs_ub2) - 121: 26(ivec2) AtomicAnd 111(gs_ua2) 69 70 120 - Store 115(out_u2) 121 - 122: 26(ivec2) Load 112(gs_ub2) - 124: 26(ivec2) Load 123(gs_uc2) - 125: 26(ivec2) AtomicCompareExchange 111(gs_ua2) 69 70 70 124 122 - Store 115(out_u2) 125 - 126: 26(ivec2) Load 112(gs_ub2) - 127: 26(ivec2) AtomicExchange 111(gs_ua2) 69 70 126 - Store 115(out_u2) 127 - 128: 26(ivec2) Load 112(gs_ub2) - 129: 26(ivec2) AtomicUMax 111(gs_ua2) 69 70 128 - 130: 26(ivec2) Load 112(gs_ub2) - 131: 26(ivec2) AtomicUMax 111(gs_ua2) 69 70 130 - Store 115(out_u2) 131 - 132: 26(ivec2) Load 112(gs_ub2) - 133: 26(ivec2) AtomicUMin 111(gs_ua2) 69 70 132 - 134: 26(ivec2) Load 112(gs_ub2) - 135: 26(ivec2) AtomicUMin 111(gs_ua2) 69 70 134 - Store 115(out_u2) 135 - 136: 26(ivec2) Load 112(gs_ub2) - 137: 26(ivec2) AtomicOr 111(gs_ua2) 69 70 136 - 138: 26(ivec2) Load 112(gs_ub2) - 139: 26(ivec2) AtomicOr 111(gs_ua2) 69 70 138 - Store 115(out_u2) 139 - 140: 26(ivec2) Load 112(gs_ub2) - 141: 26(ivec2) AtomicXor 111(gs_ua2) 69 70 140 - 142: 26(ivec2) Load 112(gs_ub2) - 143: 26(ivec2) AtomicXor 111(gs_ua2) 69 70 142 - Store 115(out_u2) 143 - ReturnValue 146 + 120(out_u2): 27(ptr) Variable Function + 110: 24(fvec2) Load 29(inF0) + 113: 111(bvec2) FUnordNotEqual 110 112 + 114: 61(bool) All 113 + 118: 26(ivec2) Load 117(gs_ub2) + 119: 26(ivec2) AtomicIAdd 116(gs_ua2) 69 70 118 + 121: 26(ivec2) Load 117(gs_ub2) + 122: 26(ivec2) AtomicIAdd 116(gs_ua2) 69 70 121 + Store 120(out_u2) 122 + 123: 26(ivec2) Load 117(gs_ub2) + 124: 26(ivec2) AtomicAnd 116(gs_ua2) 69 70 123 + 125: 26(ivec2) Load 117(gs_ub2) + 126: 26(ivec2) AtomicAnd 116(gs_ua2) 69 70 125 + Store 120(out_u2) 126 + 127: 26(ivec2) Load 117(gs_ub2) + 129: 26(ivec2) Load 128(gs_uc2) + 130: 26(ivec2) AtomicCompareExchange 116(gs_ua2) 69 70 70 129 127 + Store 120(out_u2) 130 + 131: 26(ivec2) Load 117(gs_ub2) + 132: 26(ivec2) AtomicExchange 116(gs_ua2) 69 70 131 + Store 120(out_u2) 132 + 133: 26(ivec2) Load 117(gs_ub2) + 134: 26(ivec2) AtomicUMax 116(gs_ua2) 69 70 133 + 135: 26(ivec2) Load 117(gs_ub2) + 136: 26(ivec2) AtomicUMax 116(gs_ua2) 69 70 135 + Store 120(out_u2) 136 + 137: 26(ivec2) Load 117(gs_ub2) + 138: 26(ivec2) AtomicUMin 116(gs_ua2) 69 70 137 + 139: 26(ivec2) Load 117(gs_ub2) + 140: 26(ivec2) AtomicUMin 116(gs_ua2) 69 70 139 + Store 120(out_u2) 140 + 141: 26(ivec2) Load 117(gs_ub2) + 142: 26(ivec2) AtomicOr 116(gs_ua2) 69 70 141 + 143: 26(ivec2) Load 117(gs_ub2) + 144: 26(ivec2) AtomicOr 116(gs_ua2) 69 70 143 + Store 120(out_u2) 144 + 145: 26(ivec2) Load 117(gs_ub2) + 146: 26(ivec2) AtomicXor 116(gs_ua2) 69 70 145 + 147: 26(ivec2) Load 117(gs_ub2) + 148: 26(ivec2) AtomicXor 116(gs_ua2) 69 70 147 + Store 120(out_u2) 148 + ReturnValue 151 FunctionEnd 46(ComputeShaderFunction3(vf3;vf3;vf3;vu3;vu3;): 36(fvec3) Function None 40 41(inF0): 37(ptr) FunctionParameter @@ -1008,48 +1027,48 @@ Validation failed 44(inU0): 39(ptr) FunctionParameter 45(inU1): 39(ptr) FunctionParameter 47: Label - 159(out_u3): 39(ptr) Variable Function - 149: 36(fvec3) Load 41(inF0) - 152: 150(bvec3) FUnordNotEqual 149 151 - 153: 61(bool) All 152 - 157: 38(ivec3) Load 156(gs_ub3) - 158: 38(ivec3) AtomicIAdd 155(gs_ua3) 69 70 157 - 160: 38(ivec3) Load 156(gs_ub3) - 161: 38(ivec3) AtomicIAdd 155(gs_ua3) 69 70 160 - Store 159(out_u3) 161 - 162: 38(ivec3) Load 156(gs_ub3) - 163: 38(ivec3) AtomicAnd 155(gs_ua3) 69 70 162 - 164: 38(ivec3) Load 156(gs_ub3) - 165: 38(ivec3) AtomicAnd 155(gs_ua3) 69 70 164 - Store 159(out_u3) 165 - 166: 38(ivec3) Load 156(gs_ub3) - 168: 38(ivec3) Load 167(gs_uc3) - 169: 38(ivec3) AtomicCompareExchange 155(gs_ua3) 69 70 70 168 166 - Store 159(out_u3) 169 - 170: 38(ivec3) Load 156(gs_ub3) - 171: 38(ivec3) AtomicExchange 155(gs_ua3) 69 70 170 - Store 159(out_u3) 171 - 172: 38(ivec3) Load 156(gs_ub3) - 173: 38(ivec3) AtomicUMax 155(gs_ua3) 69 70 172 - 174: 38(ivec3) Load 156(gs_ub3) - 175: 38(ivec3) AtomicUMax 155(gs_ua3) 69 70 174 - Store 159(out_u3) 175 - 176: 38(ivec3) Load 156(gs_ub3) - 177: 38(ivec3) AtomicUMin 155(gs_ua3) 69 70 176 - 178: 38(ivec3) Load 156(gs_ub3) - 179: 38(ivec3) AtomicUMin 155(gs_ua3) 69 70 178 - Store 159(out_u3) 179 - 180: 38(ivec3) Load 156(gs_ub3) - 181: 38(ivec3) AtomicOr 155(gs_ua3) 69 70 180 - 182: 38(ivec3) Load 156(gs_ub3) - 183: 38(ivec3) AtomicOr 155(gs_ua3) 69 70 182 - Store 159(out_u3) 183 - 184: 38(ivec3) Load 156(gs_ub3) - 185: 38(ivec3) AtomicXor 155(gs_ua3) 69 70 184 - 186: 38(ivec3) Load 156(gs_ub3) - 187: 38(ivec3) AtomicXor 155(gs_ua3) 69 70 186 - Store 159(out_u3) 187 - ReturnValue 189 + 164(out_u3): 39(ptr) Variable Function + 154: 36(fvec3) Load 41(inF0) + 157: 155(bvec3) FUnordNotEqual 154 156 + 158: 61(bool) All 157 + 162: 38(ivec3) Load 161(gs_ub3) + 163: 38(ivec3) AtomicIAdd 160(gs_ua3) 69 70 162 + 165: 38(ivec3) Load 161(gs_ub3) + 166: 38(ivec3) AtomicIAdd 160(gs_ua3) 69 70 165 + Store 164(out_u3) 166 + 167: 38(ivec3) Load 161(gs_ub3) + 168: 38(ivec3) AtomicAnd 160(gs_ua3) 69 70 167 + 169: 38(ivec3) Load 161(gs_ub3) + 170: 38(ivec3) AtomicAnd 160(gs_ua3) 69 70 169 + Store 164(out_u3) 170 + 171: 38(ivec3) Load 161(gs_ub3) + 173: 38(ivec3) Load 172(gs_uc3) + 174: 38(ivec3) AtomicCompareExchange 160(gs_ua3) 69 70 70 173 171 + Store 164(out_u3) 174 + 175: 38(ivec3) Load 161(gs_ub3) + 176: 38(ivec3) AtomicExchange 160(gs_ua3) 69 70 175 + Store 164(out_u3) 176 + 177: 38(ivec3) Load 161(gs_ub3) + 178: 38(ivec3) AtomicUMax 160(gs_ua3) 69 70 177 + 179: 38(ivec3) Load 161(gs_ub3) + 180: 38(ivec3) AtomicUMax 160(gs_ua3) 69 70 179 + Store 164(out_u3) 180 + 181: 38(ivec3) Load 161(gs_ub3) + 182: 38(ivec3) AtomicUMin 160(gs_ua3) 69 70 181 + 183: 38(ivec3) Load 161(gs_ub3) + 184: 38(ivec3) AtomicUMin 160(gs_ua3) 69 70 183 + Store 164(out_u3) 184 + 185: 38(ivec3) Load 161(gs_ub3) + 186: 38(ivec3) AtomicOr 160(gs_ua3) 69 70 185 + 187: 38(ivec3) Load 161(gs_ub3) + 188: 38(ivec3) AtomicOr 160(gs_ua3) 69 70 187 + Store 164(out_u3) 188 + 189: 38(ivec3) Load 161(gs_ub3) + 190: 38(ivec3) AtomicXor 160(gs_ua3) 69 70 189 + 191: 38(ivec3) Load 161(gs_ub3) + 192: 38(ivec3) AtomicXor 160(gs_ua3) 69 70 191 + Store 164(out_u3) 192 + ReturnValue 194 FunctionEnd 58(@ComputeShaderFunction(vf4;vf4;vf4;vu4;vu4;): 48(fvec4) Function None 52 53(inF0): 49(ptr) FunctionParameter @@ -1058,46 +1077,46 @@ Validation failed 56(inU0): 51(ptr) FunctionParameter 57(inU1): 51(ptr) FunctionParameter 59: Label - 202(out_u4): 51(ptr) Variable Function - 192: 48(fvec4) Load 53(inF0) - 195: 193(bvec4) FUnordNotEqual 192 194 - 196: 61(bool) All 195 - 200: 50(ivec4) Load 199(gs_ub4) - 201: 50(ivec4) AtomicIAdd 198(gs_ua4) 69 70 200 - 203: 50(ivec4) Load 199(gs_ub4) - 204: 50(ivec4) AtomicIAdd 198(gs_ua4) 69 70 203 - Store 202(out_u4) 204 - 205: 50(ivec4) Load 199(gs_ub4) - 206: 50(ivec4) AtomicAnd 198(gs_ua4) 69 70 205 - 207: 50(ivec4) Load 199(gs_ub4) - 208: 50(ivec4) AtomicAnd 198(gs_ua4) 69 70 207 - Store 202(out_u4) 208 - 209: 50(ivec4) Load 199(gs_ub4) - 211: 50(ivec4) Load 210(gs_uc4) - 212: 50(ivec4) AtomicCompareExchange 198(gs_ua4) 69 70 70 211 209 - Store 202(out_u4) 212 - 213: 50(ivec4) Load 199(gs_ub4) - 214: 50(ivec4) AtomicExchange 198(gs_ua4) 69 70 213 - Store 202(out_u4) 214 - 215: 50(ivec4) Load 199(gs_ub4) - 216: 50(ivec4) AtomicUMax 198(gs_ua4) 69 70 215 - 217: 50(ivec4) Load 199(gs_ub4) - 218: 50(ivec4) AtomicUMax 198(gs_ua4) 69 70 217 - Store 202(out_u4) 218 - 219: 50(ivec4) Load 199(gs_ub4) - 220: 50(ivec4) AtomicUMin 198(gs_ua4) 69 70 219 - 221: 50(ivec4) Load 199(gs_ub4) - 222: 50(ivec4) AtomicUMin 198(gs_ua4) 69 70 221 - Store 202(out_u4) 222 - 223: 50(ivec4) Load 199(gs_ub4) - 224: 50(ivec4) AtomicOr 198(gs_ua4) 69 70 223 - 225: 50(ivec4) Load 199(gs_ub4) - 226: 50(ivec4) AtomicOr 198(gs_ua4) 69 70 225 - Store 202(out_u4) 226 - 227: 50(ivec4) Load 199(gs_ub4) - 228: 50(ivec4) AtomicXor 198(gs_ua4) 69 70 227 - 229: 50(ivec4) Load 199(gs_ub4) - 230: 50(ivec4) AtomicXor 198(gs_ua4) 69 70 229 - Store 202(out_u4) 230 - ReturnValue 232 + 207(out_u4): 51(ptr) Variable Function + 197: 48(fvec4) Load 53(inF0) + 200: 198(bvec4) FUnordNotEqual 197 199 + 201: 61(bool) All 200 + 205: 50(ivec4) Load 204(gs_ub4) + 206: 50(ivec4) AtomicIAdd 203(gs_ua4) 69 70 205 + 208: 50(ivec4) Load 204(gs_ub4) + 209: 50(ivec4) AtomicIAdd 203(gs_ua4) 69 70 208 + Store 207(out_u4) 209 + 210: 50(ivec4) Load 204(gs_ub4) + 211: 50(ivec4) AtomicAnd 203(gs_ua4) 69 70 210 + 212: 50(ivec4) Load 204(gs_ub4) + 213: 50(ivec4) AtomicAnd 203(gs_ua4) 69 70 212 + Store 207(out_u4) 213 + 214: 50(ivec4) Load 204(gs_ub4) + 216: 50(ivec4) Load 215(gs_uc4) + 217: 50(ivec4) AtomicCompareExchange 203(gs_ua4) 69 70 70 216 214 + Store 207(out_u4) 217 + 218: 50(ivec4) Load 204(gs_ub4) + 219: 50(ivec4) AtomicExchange 203(gs_ua4) 69 70 218 + Store 207(out_u4) 219 + 220: 50(ivec4) Load 204(gs_ub4) + 221: 50(ivec4) AtomicUMax 203(gs_ua4) 69 70 220 + 222: 50(ivec4) Load 204(gs_ub4) + 223: 50(ivec4) AtomicUMax 203(gs_ua4) 69 70 222 + Store 207(out_u4) 223 + 224: 50(ivec4) Load 204(gs_ub4) + 225: 50(ivec4) AtomicUMin 203(gs_ua4) 69 70 224 + 226: 50(ivec4) Load 204(gs_ub4) + 227: 50(ivec4) AtomicUMin 203(gs_ua4) 69 70 226 + Store 207(out_u4) 227 + 228: 50(ivec4) Load 204(gs_ub4) + 229: 50(ivec4) AtomicOr 203(gs_ua4) 69 70 228 + 230: 50(ivec4) Load 204(gs_ub4) + 231: 50(ivec4) AtomicOr 203(gs_ua4) 69 70 230 + Store 207(out_u4) 231 + 232: 50(ivec4) Load 204(gs_ub4) + 233: 50(ivec4) AtomicXor 203(gs_ua4) 69 70 232 + 234: 50(ivec4) Load 204(gs_ub4) + 235: 50(ivec4) AtomicXor 203(gs_ua4) 69 70 234 + Store 207(out_u4) 235 + ReturnValue 237 FunctionEnd diff --git a/Test/baseResults/hlsl.intrinsics.evalfns.frag.out b/Test/baseResults/hlsl.intrinsics.evalfns.frag.out deleted file mode 100755 index 502ad0f0..00000000 --- a/Test/baseResults/hlsl.intrinsics.evalfns.frag.out +++ /dev/null @@ -1,287 +0,0 @@ -hlsl.intrinsics.evalfns.frag -Shader version: 500 -gl_FragCoord origin is upper left -0:? Sequence -0:3 Function Definition: @main(f1;vf2;vf3;vf4;vi2; ( temp void) -0:3 Function Parameters: -0:3 'inF1' ( in float) -0:3 'inF2' ( in 2-component vector of float) -0:3 'inF3' ( in 3-component vector of float) -0:3 'inF4' ( in 4-component vector of float) -0:3 'inI2' ( in 2-component vector of int) -0:? Sequence -0:4 interpolateAtOffset ( temp float) -0:4 'inF1' ( in float) -0:? Constant: -0:? -0.500000 -0:? -0.062500 -0:5 interpolateAtOffset ( temp 2-component vector of float) -0:5 'inF2' ( in 2-component vector of float) -0:? Constant: -0:? 0.000000 -0:? 0.062500 -0:6 interpolateAtOffset ( temp 3-component vector of float) -0:6 'inF3' ( in 3-component vector of float) -0:? Constant: -0:? 0.187500 -0:? -0.375000 -0:7 interpolateAtOffset ( temp 4-component vector of float) -0:7 'inF4' ( in 4-component vector of float) -0:? Constant: -0:? 0.437500 -0:? -0.500000 -0:9 interpolateAtOffset ( temp float) -0:9 'inF1' ( in float) -0:9 vector-scale ( temp 2-component vector of float) -0:9 Convert int to float ( temp 2-component vector of float) -0:9 right-shift ( temp 2-component vector of int) -0:9 left-shift ( temp 2-component vector of int) -0:9 'inI2' ( in 2-component vector of int) -0:9 Constant: -0:9 28 (const int) -0:9 Constant: -0:9 28 (const int) -0:9 Constant: -0:9 0.062500 -0:3 Function Definition: main( ( temp void) -0:3 Function Parameters: -0:? Sequence -0:3 move second child to first child ( temp float) -0:? 'inF1' ( temp float) -0:? 'inF1' (layout( location=0) in float) -0:3 move second child to first child ( temp 2-component vector of float) -0:? 'inF2' ( temp 2-component vector of float) -0:? 'inF2' (layout( location=1) in 2-component vector of float) -0:3 move second child to first child ( temp 3-component vector of float) -0:? 'inF3' ( temp 3-component vector of float) -0:? 'inF3' (layout( location=2) in 3-component vector of float) -0:3 move second child to first child ( temp 4-component vector of float) -0:? 'inF4' ( temp 4-component vector of float) -0:? 'inF4' (layout( location=3) in 4-component vector of float) -0:3 move second child to first child ( temp 2-component vector of int) -0:? 'inI2' ( temp 2-component vector of int) -0:? 'inI2' (layout( location=4) flat in 2-component vector of int) -0:3 Function Call: @main(f1;vf2;vf3;vf4;vi2; ( temp void) -0:? 'inF1' ( temp float) -0:? 'inF2' ( temp 2-component vector of float) -0:? 'inF3' ( temp 3-component vector of float) -0:? 'inF4' ( temp 4-component vector of float) -0:? 'inI2' ( temp 2-component vector of int) -0:? Linker Objects -0:? 'inF1' (layout( location=0) in float) -0:? 'inF2' (layout( location=1) in 2-component vector of float) -0:? 'inF3' (layout( location=2) in 3-component vector of float) -0:? 'inF4' (layout( location=3) in 4-component vector of float) -0:? 'inI2' (layout( location=4) flat in 2-component vector of int) - - -Linked fragment stage: - - -Shader version: 500 -gl_FragCoord origin is upper left -0:? Sequence -0:3 Function Definition: @main(f1;vf2;vf3;vf4;vi2; ( temp void) -0:3 Function Parameters: -0:3 'inF1' ( in float) -0:3 'inF2' ( in 2-component vector of float) -0:3 'inF3' ( in 3-component vector of float) -0:3 'inF4' ( in 4-component vector of float) -0:3 'inI2' ( in 2-component vector of int) -0:? Sequence -0:4 interpolateAtOffset ( temp float) -0:4 'inF1' ( in float) -0:? Constant: -0:? -0.500000 -0:? -0.062500 -0:5 interpolateAtOffset ( temp 2-component vector of float) -0:5 'inF2' ( in 2-component vector of float) -0:? Constant: -0:? 0.000000 -0:? 0.062500 -0:6 interpolateAtOffset ( temp 3-component vector of float) -0:6 'inF3' ( in 3-component vector of float) -0:? Constant: -0:? 0.187500 -0:? -0.375000 -0:7 interpolateAtOffset ( temp 4-component vector of float) -0:7 'inF4' ( in 4-component vector of float) -0:? Constant: -0:? 0.437500 -0:? -0.500000 -0:9 interpolateAtOffset ( temp float) -0:9 'inF1' ( in float) -0:9 vector-scale ( temp 2-component vector of float) -0:9 Convert int to float ( temp 2-component vector of float) -0:9 right-shift ( temp 2-component vector of int) -0:9 left-shift ( temp 2-component vector of int) -0:9 'inI2' ( in 2-component vector of int) -0:9 Constant: -0:9 28 (const int) -0:9 Constant: -0:9 28 (const int) -0:9 Constant: -0:9 0.062500 -0:3 Function Definition: main( ( temp void) -0:3 Function Parameters: -0:? Sequence -0:3 move second child to first child ( temp float) -0:? 'inF1' ( temp float) -0:? 'inF1' (layout( location=0) in float) -0:3 move second child to first child ( temp 2-component vector of float) -0:? 'inF2' ( temp 2-component vector of float) -0:? 'inF2' (layout( location=1) in 2-component vector of float) -0:3 move second child to first child ( temp 3-component vector of float) -0:? 'inF3' ( temp 3-component vector of float) -0:? 'inF3' (layout( location=2) in 3-component vector of float) -0:3 move second child to first child ( temp 4-component vector of float) -0:? 'inF4' ( temp 4-component vector of float) -0:? 'inF4' (layout( location=3) in 4-component vector of float) -0:3 move second child to first child ( temp 2-component vector of int) -0:? 'inI2' ( temp 2-component vector of int) -0:? 'inI2' (layout( location=4) flat in 2-component vector of int) -0:3 Function Call: @main(f1;vf2;vf3;vf4;vi2; ( temp void) -0:? 'inF1' ( temp float) -0:? 'inF2' ( temp 2-component vector of float) -0:? 'inF3' ( temp 3-component vector of float) -0:? 'inF4' ( temp 4-component vector of float) -0:? 'inI2' ( temp 2-component vector of int) -0:? Linker Objects -0:? 'inF1' (layout( location=0) in float) -0:? 'inF2' (layout( location=1) in 2-component vector of float) -0:? 'inF3' (layout( location=2) in 3-component vector of float) -0:? 'inF4' (layout( location=3) in 4-component vector of float) -0:? 'inI2' (layout( location=4) flat in 2-component vector of int) - -Validation failed -// Module Version 10000 -// Generated by (magic number): 8000a -// Id's are bound by 80 - - Capability Shader - Capability InterpolationFunction - 1: ExtInstImport "GLSL.std.450" - MemoryModel Logical GLSL450 - EntryPoint Fragment 4 "main" 51 55 59 63 67 - ExecutionMode 4 OriginUpperLeft - Source HLSL 500 - Name 4 "main" - Name 23 "@main(f1;vf2;vf3;vf4;vi2;" - Name 18 "inF1" - Name 19 "inF2" - Name 20 "inF3" - Name 21 "inF4" - Name 22 "inI2" - Name 49 "inF1" - Name 51 "inF1" - Name 53 "inF2" - Name 55 "inF2" - Name 57 "inF3" - Name 59 "inF3" - Name 61 "inF4" - Name 63 "inF4" - Name 65 "inI2" - Name 67 "inI2" - Name 69 "param" - Name 71 "param" - Name 73 "param" - Name 75 "param" - Name 77 "param" - Decorate 51(inF1) Location 0 - Decorate 55(inF2) Location 1 - Decorate 59(inF3) Location 2 - Decorate 63(inF4) Location 3 - Decorate 67(inI2) Flat - Decorate 67(inI2) Location 4 - 2: TypeVoid - 3: TypeFunction 2 - 6: TypeFloat 32 - 7: TypePointer Function 6(float) - 8: TypeVector 6(float) 2 - 9: TypePointer Function 8(fvec2) - 10: TypeVector 6(float) 3 - 11: TypePointer Function 10(fvec3) - 12: TypeVector 6(float) 4 - 13: TypePointer Function 12(fvec4) - 14: TypeInt 32 1 - 15: TypeVector 14(int) 2 - 16: TypePointer Function 15(ivec2) - 17: TypeFunction 2 7(ptr) 9(ptr) 11(ptr) 13(ptr) 16(ptr) - 25: 6(float) Constant 3204448256 - 26: 6(float) Constant 3179282432 - 27: 8(fvec2) ConstantComposite 25 26 - 29: 6(float) Constant 0 - 30: 6(float) Constant 1031798784 - 31: 8(fvec2) ConstantComposite 29 30 - 33: 6(float) Constant 1044381696 - 34: 6(float) Constant 3200253952 - 35: 8(fvec2) ConstantComposite 33 34 - 37: 6(float) Constant 1054867456 - 38: 8(fvec2) ConstantComposite 37 25 - 41: 14(int) Constant 28 - 50: TypePointer Input 6(float) - 51(inF1): 50(ptr) Variable Input - 54: TypePointer Input 8(fvec2) - 55(inF2): 54(ptr) Variable Input - 58: TypePointer Input 10(fvec3) - 59(inF3): 58(ptr) Variable Input - 62: TypePointer Input 12(fvec4) - 63(inF4): 62(ptr) Variable Input - 66: TypePointer Input 15(ivec2) - 67(inI2): 66(ptr) Variable Input - 4(main): 2 Function None 3 - 5: Label - 49(inF1): 7(ptr) Variable Function - 53(inF2): 9(ptr) Variable Function - 57(inF3): 11(ptr) Variable Function - 61(inF4): 13(ptr) Variable Function - 65(inI2): 16(ptr) Variable Function - 69(param): 7(ptr) Variable Function - 71(param): 9(ptr) Variable Function - 73(param): 11(ptr) Variable Function - 75(param): 13(ptr) Variable Function - 77(param): 16(ptr) Variable Function - 52: 6(float) Load 51(inF1) - Store 49(inF1) 52 - 56: 8(fvec2) Load 55(inF2) - Store 53(inF2) 56 - 60: 10(fvec3) Load 59(inF3) - Store 57(inF3) 60 - 64: 12(fvec4) Load 63(inF4) - Store 61(inF4) 64 - 68: 15(ivec2) Load 67(inI2) - Store 65(inI2) 68 - 70: 6(float) Load 49(inF1) - Store 69(param) 70 - 72: 8(fvec2) Load 53(inF2) - Store 71(param) 72 - 74: 10(fvec3) Load 57(inF3) - Store 73(param) 74 - 76: 12(fvec4) Load 61(inF4) - Store 75(param) 76 - 78: 15(ivec2) Load 65(inI2) - Store 77(param) 78 - 79: 2 FunctionCall 23(@main(f1;vf2;vf3;vf4;vi2;) 69(param) 71(param) 73(param) 75(param) 77(param) - Return - FunctionEnd -23(@main(f1;vf2;vf3;vf4;vi2;): 2 Function None 17 - 18(inF1): 7(ptr) FunctionParameter - 19(inF2): 9(ptr) FunctionParameter - 20(inF3): 11(ptr) FunctionParameter - 21(inF4): 13(ptr) FunctionParameter - 22(inI2): 16(ptr) FunctionParameter - 24: Label - 28: 6(float) ExtInst 1(GLSL.std.450) 78(InterpolateAtOffset) 18(inF1) 27 - 32: 8(fvec2) ExtInst 1(GLSL.std.450) 78(InterpolateAtOffset) 19(inF2) 31 - 36: 10(fvec3) ExtInst 1(GLSL.std.450) 78(InterpolateAtOffset) 20(inF3) 35 - 39: 12(fvec4) ExtInst 1(GLSL.std.450) 78(InterpolateAtOffset) 21(inF4) 38 - 40: 15(ivec2) Load 22(inI2) - 42: 15(ivec2) CompositeConstruct 41 41 - 43: 15(ivec2) ShiftLeftLogical 40 42 - 44: 15(ivec2) CompositeConstruct 41 41 - 45: 15(ivec2) ShiftRightArithmetic 43 44 - 46: 8(fvec2) ConvertSToF 45 - 47: 8(fvec2) VectorTimesScalar 46 30 - 48: 6(float) ExtInst 1(GLSL.std.450) 78(InterpolateAtOffset) 18(inF1) 47 - Return - FunctionEnd diff --git a/Test/baseResults/hlsl.mintypes.frag.out b/Test/baseResults/hlsl.mintypes.frag.out index 07f28c3d..2b51d12c 100755 --- a/Test/baseResults/hlsl.mintypes.frag.out +++ b/Test/baseResults/hlsl.mintypes.frag.out @@ -5,33 +5,69 @@ gl_FragCoord origin is upper left 0:9 Function Definition: @main( ( temp structure{ temp 4-component vector of float Color}) 0:9 Function Parameters: 0:? Sequence -0:40 add ( temp mediump 2-component vector of float) -0:40 'mf16_2' ( temp mediump 2-component vector of float) -0:40 'mf16' ( temp mediump float) -0:41 add ( temp mediump 2-component vector of float) -0:41 'mf10_2' ( temp mediump 2-component vector of float) -0:41 'mf10' ( temp mediump float) -0:42 add ( temp mediump 2-component vector of int) -0:42 'mi16_2' ( temp mediump 2-component vector of int) -0:42 'mi16' ( temp mediump int) -0:43 add ( temp mediump 2-component vector of int) -0:43 'mi12_2' ( temp mediump 2-component vector of int) -0:43 'mi12' ( temp mediump int) -0:44 add ( temp mediump 2-component vector of uint) -0:44 'mu16_2' ( temp mediump 2-component vector of uint) -0:44 'mu16' ( temp mediump uint) -0:47 move second child to first child ( temp 4-component vector of float) -0:47 Color: direct index for structure ( temp 4-component vector of float) -0:47 'psout' ( temp structure{ temp 4-component vector of float Color}) -0:47 Constant: -0:47 0 (const int) -0:47 Constant: -0:47 0.000000 -0:47 0.000000 -0:47 0.000000 -0:47 0.000000 -0:48 Branch: Return with expression -0:48 'psout' ( temp structure{ temp 4-component vector of float Color}) +0:85 add ( temp mediump 2-component vector of float) +0:85 'mf16_2' ( temp mediump 2-component vector of float) +0:85 'mf16' ( temp mediump float) +0:86 add ( temp mediump 2-component vector of float) +0:86 'mf10_2' ( temp mediump 2-component vector of float) +0:86 'mf10' ( temp mediump float) +0:87 add ( temp mediump 2-component vector of int) +0:87 'mi16_2' ( temp mediump 2-component vector of int) +0:87 'mi16' ( temp mediump int) +0:88 add ( temp mediump 2-component vector of int) +0:88 'mi12_2' ( temp mediump 2-component vector of int) +0:88 'mi12' ( temp mediump int) +0:89 add ( temp mediump 2-component vector of uint) +0:89 'mu16_2' ( temp mediump 2-component vector of uint) +0:89 'mu16' ( temp mediump uint) +0:91 matrix-times-vector ( temp mediump 4-component vector of float) +0:91 'mf16_2x4' ( temp mediump 2X4 matrix of float) +0:91 'mf16_2' ( temp mediump 2-component vector of float) +0:92 matrix-times-vector ( temp mediump 4-component vector of float) +0:92 'mf16_3x4' ( temp mediump 3X4 matrix of float) +0:92 'mf16_3' ( temp mediump 3-component vector of float) +0:93 matrix-times-vector ( temp mediump 4-component vector of float) +0:93 'mf16_4x4' ( temp mediump 4X4 matrix of float) +0:93 'mf16_4' ( temp mediump 4-component vector of float) +0:94 vector-times-matrix ( temp mediump 4-component vector of float) +0:94 'mf16_2' ( temp mediump 2-component vector of float) +0:94 'mf16_4x2' ( temp mediump 4X2 matrix of float) +0:95 vector-times-matrix ( temp mediump 4-component vector of float) +0:95 'mf16_3' ( temp mediump 3-component vector of float) +0:95 'mf16_4x3' ( temp mediump 4X3 matrix of float) +0:96 vector-times-matrix ( temp mediump 4-component vector of float) +0:96 'mf16_4' ( temp mediump 4-component vector of float) +0:96 'mf16_4x4' ( temp mediump 4X4 matrix of float) +0:98 matrix-times-vector ( temp mediump 4-component vector of float) +0:98 'mf10_2x4' ( temp mediump 2X4 matrix of float) +0:98 'mf10_2' ( temp mediump 2-component vector of float) +0:99 matrix-times-vector ( temp mediump 4-component vector of float) +0:99 'mf10_3x4' ( temp mediump 3X4 matrix of float) +0:99 'mf10_3' ( temp mediump 3-component vector of float) +0:100 matrix-times-vector ( temp mediump 4-component vector of float) +0:100 'mf10_4x4' ( temp mediump 4X4 matrix of float) +0:100 'mf10_4' ( temp mediump 4-component vector of float) +0:101 vector-times-matrix ( temp mediump 4-component vector of float) +0:101 'mf10_2' ( temp mediump 2-component vector of float) +0:101 'mf10_4x2' ( temp mediump 4X2 matrix of float) +0:102 vector-times-matrix ( temp mediump 4-component vector of float) +0:102 'mf10_3' ( temp mediump 3-component vector of float) +0:102 'mf10_4x3' ( temp mediump 4X3 matrix of float) +0:103 vector-times-matrix ( temp mediump 4-component vector of float) +0:103 'mf10_4' ( temp mediump 4-component vector of float) +0:103 'mf10_4x4' ( temp mediump 4X4 matrix of float) +0:106 move second child to first child ( temp 4-component vector of float) +0:106 Color: direct index for structure ( temp 4-component vector of float) +0:106 'psout' ( temp structure{ temp 4-component vector of float Color}) +0:106 Constant: +0:106 0 (const int) +0:106 Constant: +0:106 0.000000 +0:106 0.000000 +0:106 0.000000 +0:106 0.000000 +0:107 Branch: Return with expression +0:107 'psout' ( temp structure{ temp 4-component vector of float Color}) 0:9 Function Definition: main( ( temp void) 0:9 Function Parameters: 0:? Sequence @@ -56,33 +92,69 @@ gl_FragCoord origin is upper left 0:9 Function Definition: @main( ( temp structure{ temp 4-component vector of float Color}) 0:9 Function Parameters: 0:? Sequence -0:40 add ( temp mediump 2-component vector of float) -0:40 'mf16_2' ( temp mediump 2-component vector of float) -0:40 'mf16' ( temp mediump float) -0:41 add ( temp mediump 2-component vector of float) -0:41 'mf10_2' ( temp mediump 2-component vector of float) -0:41 'mf10' ( temp mediump float) -0:42 add ( temp mediump 2-component vector of int) -0:42 'mi16_2' ( temp mediump 2-component vector of int) -0:42 'mi16' ( temp mediump int) -0:43 add ( temp mediump 2-component vector of int) -0:43 'mi12_2' ( temp mediump 2-component vector of int) -0:43 'mi12' ( temp mediump int) -0:44 add ( temp mediump 2-component vector of uint) -0:44 'mu16_2' ( temp mediump 2-component vector of uint) -0:44 'mu16' ( temp mediump uint) -0:47 move second child to first child ( temp 4-component vector of float) -0:47 Color: direct index for structure ( temp 4-component vector of float) -0:47 'psout' ( temp structure{ temp 4-component vector of float Color}) -0:47 Constant: -0:47 0 (const int) -0:47 Constant: -0:47 0.000000 -0:47 0.000000 -0:47 0.000000 -0:47 0.000000 -0:48 Branch: Return with expression -0:48 'psout' ( temp structure{ temp 4-component vector of float Color}) +0:85 add ( temp mediump 2-component vector of float) +0:85 'mf16_2' ( temp mediump 2-component vector of float) +0:85 'mf16' ( temp mediump float) +0:86 add ( temp mediump 2-component vector of float) +0:86 'mf10_2' ( temp mediump 2-component vector of float) +0:86 'mf10' ( temp mediump float) +0:87 add ( temp mediump 2-component vector of int) +0:87 'mi16_2' ( temp mediump 2-component vector of int) +0:87 'mi16' ( temp mediump int) +0:88 add ( temp mediump 2-component vector of int) +0:88 'mi12_2' ( temp mediump 2-component vector of int) +0:88 'mi12' ( temp mediump int) +0:89 add ( temp mediump 2-component vector of uint) +0:89 'mu16_2' ( temp mediump 2-component vector of uint) +0:89 'mu16' ( temp mediump uint) +0:91 matrix-times-vector ( temp mediump 4-component vector of float) +0:91 'mf16_2x4' ( temp mediump 2X4 matrix of float) +0:91 'mf16_2' ( temp mediump 2-component vector of float) +0:92 matrix-times-vector ( temp mediump 4-component vector of float) +0:92 'mf16_3x4' ( temp mediump 3X4 matrix of float) +0:92 'mf16_3' ( temp mediump 3-component vector of float) +0:93 matrix-times-vector ( temp mediump 4-component vector of float) +0:93 'mf16_4x4' ( temp mediump 4X4 matrix of float) +0:93 'mf16_4' ( temp mediump 4-component vector of float) +0:94 vector-times-matrix ( temp mediump 4-component vector of float) +0:94 'mf16_2' ( temp mediump 2-component vector of float) +0:94 'mf16_4x2' ( temp mediump 4X2 matrix of float) +0:95 vector-times-matrix ( temp mediump 4-component vector of float) +0:95 'mf16_3' ( temp mediump 3-component vector of float) +0:95 'mf16_4x3' ( temp mediump 4X3 matrix of float) +0:96 vector-times-matrix ( temp mediump 4-component vector of float) +0:96 'mf16_4' ( temp mediump 4-component vector of float) +0:96 'mf16_4x4' ( temp mediump 4X4 matrix of float) +0:98 matrix-times-vector ( temp mediump 4-component vector of float) +0:98 'mf10_2x4' ( temp mediump 2X4 matrix of float) +0:98 'mf10_2' ( temp mediump 2-component vector of float) +0:99 matrix-times-vector ( temp mediump 4-component vector of float) +0:99 'mf10_3x4' ( temp mediump 3X4 matrix of float) +0:99 'mf10_3' ( temp mediump 3-component vector of float) +0:100 matrix-times-vector ( temp mediump 4-component vector of float) +0:100 'mf10_4x4' ( temp mediump 4X4 matrix of float) +0:100 'mf10_4' ( temp mediump 4-component vector of float) +0:101 vector-times-matrix ( temp mediump 4-component vector of float) +0:101 'mf10_2' ( temp mediump 2-component vector of float) +0:101 'mf10_4x2' ( temp mediump 4X2 matrix of float) +0:102 vector-times-matrix ( temp mediump 4-component vector of float) +0:102 'mf10_3' ( temp mediump 3-component vector of float) +0:102 'mf10_4x3' ( temp mediump 4X3 matrix of float) +0:103 vector-times-matrix ( temp mediump 4-component vector of float) +0:103 'mf10_4' ( temp mediump 4-component vector of float) +0:103 'mf10_4x4' ( temp mediump 4X4 matrix of float) +0:106 move second child to first child ( temp 4-component vector of float) +0:106 Color: direct index for structure ( temp 4-component vector of float) +0:106 'psout' ( temp structure{ temp 4-component vector of float Color}) +0:106 Constant: +0:106 0 (const int) +0:106 Constant: +0:106 0.000000 +0:106 0.000000 +0:106 0.000000 +0:106 0.000000 +0:107 Branch: Return with expression +0:107 'psout' ( temp structure{ temp 4-component vector of float Color}) 0:9 Function Definition: main( ( temp void) 0:9 Function Parameters: 0:? Sequence @@ -99,12 +171,12 @@ gl_FragCoord origin is upper left // Module Version 10000 // Generated by (magic number): 8000b -// Id's are bound by 70 +// Id's are bound by 132 Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Fragment 4 "main" 64 + EntryPoint Fragment 4 "main" 126 ExecutionMode 4 OriginUpperLeft Source HLSL 500 Name 4 "main" @@ -121,12 +193,26 @@ gl_FragCoord origin is upper left Name 39 "mi12" Name 46 "mu16_2" Name 49 "mu16" - Name 54 "psout" - Name 64 "@entryPointOutput.Color" - Name 67 "$Global" - MemberName 67($Global) 0 "b1a" - MemberName 67($Global) 1 "b1b" - Name 69 "" + Name 55 "mf16_2x4" + Name 61 "mf16_3x4" + Name 65 "mf16_3" + Name 70 "mf16_4x4" + Name 73 "mf16_4" + Name 79 "mf16_4x2" + Name 85 "mf16_4x3" + Name 91 "mf10_2x4" + Name 95 "mf10_3x4" + Name 97 "mf10_3" + Name 100 "mf10_4x4" + Name 102 "mf10_4" + Name 106 "mf10_4x2" + Name 110 "mf10_4x3" + Name 117 "psout" + Name 126 "@entryPointOutput.Color" + Name 129 "$Global" + MemberName 129($Global) 0 "b1a" + MemberName 129($Global) 1 "b1b" + Name 131 "" Decorate 14(mf16_2) RelaxedPrecision Decorate 15 RelaxedPrecision Decorate 17(mf16) RelaxedPrecision @@ -157,14 +243,64 @@ gl_FragCoord origin is upper left Decorate 50 RelaxedPrecision Decorate 51 RelaxedPrecision Decorate 52 RelaxedPrecision - Decorate 64(@entryPointOutput.Color) Location 0 - MemberDecorate 67($Global) 0 RelaxedPrecision - MemberDecorate 67($Global) 0 Offset 0 - MemberDecorate 67($Global) 1 RelaxedPrecision - MemberDecorate 67($Global) 1 Offset 4 - Decorate 67($Global) Block - Decorate 69 DescriptorSet 0 - Decorate 69 Binding 0 + Decorate 55(mf16_2x4) RelaxedPrecision + Decorate 56 RelaxedPrecision + Decorate 57 RelaxedPrecision + Decorate 58 RelaxedPrecision + Decorate 61(mf16_3x4) RelaxedPrecision + Decorate 62 RelaxedPrecision + Decorate 65(mf16_3) RelaxedPrecision + Decorate 66 RelaxedPrecision + Decorate 67 RelaxedPrecision + Decorate 70(mf16_4x4) RelaxedPrecision + Decorate 71 RelaxedPrecision + Decorate 73(mf16_4) RelaxedPrecision + Decorate 74 RelaxedPrecision + Decorate 75 RelaxedPrecision + Decorate 76 RelaxedPrecision + Decorate 79(mf16_4x2) RelaxedPrecision + Decorate 80 RelaxedPrecision + Decorate 81 RelaxedPrecision + Decorate 82 RelaxedPrecision + Decorate 85(mf16_4x3) RelaxedPrecision + Decorate 86 RelaxedPrecision + Decorate 87 RelaxedPrecision + Decorate 88 RelaxedPrecision + Decorate 89 RelaxedPrecision + Decorate 90 RelaxedPrecision + Decorate 91(mf10_2x4) RelaxedPrecision + Decorate 92 RelaxedPrecision + Decorate 93 RelaxedPrecision + Decorate 94 RelaxedPrecision + Decorate 95(mf10_3x4) RelaxedPrecision + Decorate 96 RelaxedPrecision + Decorate 97(mf10_3) RelaxedPrecision + Decorate 98 RelaxedPrecision + Decorate 99 RelaxedPrecision + Decorate 100(mf10_4x4) RelaxedPrecision + Decorate 101 RelaxedPrecision + Decorate 102(mf10_4) RelaxedPrecision + Decorate 103 RelaxedPrecision + Decorate 104 RelaxedPrecision + Decorate 105 RelaxedPrecision + Decorate 106(mf10_4x2) RelaxedPrecision + Decorate 107 RelaxedPrecision + Decorate 108 RelaxedPrecision + Decorate 109 RelaxedPrecision + Decorate 110(mf10_4x3) RelaxedPrecision + Decorate 111 RelaxedPrecision + Decorate 112 RelaxedPrecision + Decorate 113 RelaxedPrecision + Decorate 114 RelaxedPrecision + Decorate 115 RelaxedPrecision + Decorate 126(@entryPointOutput.Color) Location 0 + MemberDecorate 129($Global) 0 RelaxedPrecision + MemberDecorate 129($Global) 0 Offset 0 + MemberDecorate 129($Global) 1 RelaxedPrecision + MemberDecorate 129($Global) 1 Offset 4 + Decorate 129($Global) Block + Decorate 131 DescriptorSet 0 + Decorate 131 Binding 0 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -182,21 +318,33 @@ gl_FragCoord origin is upper left 44: TypeVector 43(int) 2 45: TypePointer Function 44(ivec2) 48: TypePointer Function 43(int) - 53: TypePointer Function 8(PS_OUTPUT) - 55: 27(int) Constant 0 - 56: 6(float) Constant 0 - 57: 7(fvec4) ConstantComposite 56 56 56 56 - 58: TypePointer Function 7(fvec4) - 63: TypePointer Output 7(fvec4) -64(@entryPointOutput.Color): 63(ptr) Variable Output - 67($Global): TypeStruct 6(float) 6(float) - 68: TypePointer Uniform 67($Global) - 69: 68(ptr) Variable Uniform + 53: TypeMatrix 7(fvec4) 2 + 54: TypePointer Function 53 + 59: TypeMatrix 7(fvec4) 3 + 60: TypePointer Function 59 + 63: TypeVector 6(float) 3 + 64: TypePointer Function 63(fvec3) + 68: TypeMatrix 7(fvec4) 4 + 69: TypePointer Function 68 + 72: TypePointer Function 7(fvec4) + 77: TypeMatrix 12(fvec2) 4 + 78: TypePointer Function 77 + 83: TypeMatrix 63(fvec3) 4 + 84: TypePointer Function 83 + 116: TypePointer Function 8(PS_OUTPUT) + 118: 27(int) Constant 0 + 119: 6(float) Constant 0 + 120: 7(fvec4) ConstantComposite 119 119 119 119 + 125: TypePointer Output 7(fvec4) +126(@entryPointOutput.Color): 125(ptr) Variable Output + 129($Global): TypeStruct 6(float) 6(float) + 130: TypePointer Uniform 129($Global) + 131: 130(ptr) Variable Uniform 4(main): 2 Function None 3 5: Label - 65:8(PS_OUTPUT) FunctionCall 10(@main() - 66: 7(fvec4) CompositeExtract 65 0 - Store 64(@entryPointOutput.Color) 66 + 127:8(PS_OUTPUT) FunctionCall 10(@main() + 128: 7(fvec4) CompositeExtract 127 0 + Store 126(@entryPointOutput.Color) 128 Return FunctionEnd 10(@main():8(PS_OUTPUT) Function None 9 @@ -211,7 +359,21 @@ gl_FragCoord origin is upper left 39(mi12): 32(ptr) Variable Function 46(mu16_2): 45(ptr) Variable Function 49(mu16): 48(ptr) Variable Function - 54(psout): 53(ptr) Variable Function + 55(mf16_2x4): 54(ptr) Variable Function + 61(mf16_3x4): 60(ptr) Variable Function + 65(mf16_3): 64(ptr) Variable Function + 70(mf16_4x4): 69(ptr) Variable Function + 73(mf16_4): 72(ptr) Variable Function + 79(mf16_4x2): 78(ptr) Variable Function + 85(mf16_4x3): 84(ptr) Variable Function + 91(mf10_2x4): 54(ptr) Variable Function + 95(mf10_3x4): 60(ptr) Variable Function + 97(mf10_3): 64(ptr) Variable Function + 100(mf10_4x4): 69(ptr) Variable Function + 102(mf10_4): 72(ptr) Variable Function + 106(mf10_4x2): 78(ptr) Variable Function + 110(mf10_4x3): 84(ptr) Variable Function + 117(psout): 116(ptr) Variable Function 15: 12(fvec2) Load 14(mf16_2) 18: 6(float) Load 17(mf16) 19: 12(fvec2) CompositeConstruct 18 18 @@ -232,8 +394,44 @@ gl_FragCoord origin is upper left 50: 43(int) Load 49(mu16) 51: 44(ivec2) CompositeConstruct 50 50 52: 44(ivec2) IAdd 47 51 - 59: 58(ptr) AccessChain 54(psout) 55 - Store 59 57 - 60:8(PS_OUTPUT) Load 54(psout) - ReturnValue 60 + 56: 53 Load 55(mf16_2x4) + 57: 12(fvec2) Load 14(mf16_2) + 58: 7(fvec4) MatrixTimesVector 56 57 + 62: 59 Load 61(mf16_3x4) + 66: 63(fvec3) Load 65(mf16_3) + 67: 7(fvec4) MatrixTimesVector 62 66 + 71: 68 Load 70(mf16_4x4) + 74: 7(fvec4) Load 73(mf16_4) + 75: 7(fvec4) MatrixTimesVector 71 74 + 76: 12(fvec2) Load 14(mf16_2) + 80: 77 Load 79(mf16_4x2) + 81: 7(fvec4) VectorTimesMatrix 76 80 + 82: 63(fvec3) Load 65(mf16_3) + 86: 83 Load 85(mf16_4x3) + 87: 7(fvec4) VectorTimesMatrix 82 86 + 88: 7(fvec4) Load 73(mf16_4) + 89: 68 Load 70(mf16_4x4) + 90: 7(fvec4) VectorTimesMatrix 88 89 + 92: 53 Load 91(mf10_2x4) + 93: 12(fvec2) Load 21(mf10_2) + 94: 7(fvec4) MatrixTimesVector 92 93 + 96: 59 Load 95(mf10_3x4) + 98: 63(fvec3) Load 97(mf10_3) + 99: 7(fvec4) MatrixTimesVector 96 98 + 101: 68 Load 100(mf10_4x4) + 103: 7(fvec4) Load 102(mf10_4) + 104: 7(fvec4) MatrixTimesVector 101 103 + 105: 12(fvec2) Load 21(mf10_2) + 107: 77 Load 106(mf10_4x2) + 108: 7(fvec4) VectorTimesMatrix 105 107 + 109: 63(fvec3) Load 97(mf10_3) + 111: 83 Load 110(mf10_4x3) + 112: 7(fvec4) VectorTimesMatrix 109 111 + 113: 7(fvec4) Load 102(mf10_4) + 114: 68 Load 100(mf10_4x4) + 115: 7(fvec4) VectorTimesMatrix 113 114 + 121: 72(ptr) AccessChain 117(psout) 118 + Store 121 120 + 122:8(PS_OUTPUT) Load 117(psout) + ReturnValue 122 FunctionEnd diff --git a/Test/baseResults/hlsl.multiView.frag.out b/Test/baseResults/hlsl.multiView.frag.out new file mode 100755 index 00000000..32e669ca --- /dev/null +++ b/Test/baseResults/hlsl.multiView.frag.out @@ -0,0 +1,121 @@ +hlsl.multiView.frag +Shader version: 500 +gl_FragCoord origin is upper left +0:? Sequence +0:3 Function Definition: @main(u1; ( temp 4-component vector of float) +0:3 Function Parameters: +0:3 'ViewIndex' ( in uint) +0:? Sequence +0:4 Branch: Return with expression +0:4 Construct vec4 ( temp 4-component vector of float) +0:4 Convert uint to float ( temp float) +0:4 'ViewIndex' ( in uint) +0:4 Constant: +0:4 0.000000 +0:4 Constant: +0:4 0.000000 +0:4 Constant: +0:4 0.000000 +0:3 Function Definition: main( ( temp void) +0:3 Function Parameters: +0:? Sequence +0:3 move second child to first child ( temp uint) +0:? 'ViewIndex' ( temp uint) +0:? 'ViewIndex' ( flat in uint ViewIndex) +0:3 move second child to first child ( temp 4-component vector of float) +0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) +0:3 Function Call: @main(u1; ( temp 4-component vector of float) +0:? 'ViewIndex' ( temp uint) +0:? Linker Objects +0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) +0:? 'ViewIndex' ( flat in uint ViewIndex) + + +Linked fragment stage: + + +Shader version: 500 +gl_FragCoord origin is upper left +0:? Sequence +0:3 Function Definition: @main(u1; ( temp 4-component vector of float) +0:3 Function Parameters: +0:3 'ViewIndex' ( in uint) +0:? Sequence +0:4 Branch: Return with expression +0:4 Construct vec4 ( temp 4-component vector of float) +0:4 Convert uint to float ( temp float) +0:4 'ViewIndex' ( in uint) +0:4 Constant: +0:4 0.000000 +0:4 Constant: +0:4 0.000000 +0:4 Constant: +0:4 0.000000 +0:3 Function Definition: main( ( temp void) +0:3 Function Parameters: +0:? Sequence +0:3 move second child to first child ( temp uint) +0:? 'ViewIndex' ( temp uint) +0:? 'ViewIndex' ( flat in uint ViewIndex) +0:3 move second child to first child ( temp 4-component vector of float) +0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) +0:3 Function Call: @main(u1; ( temp 4-component vector of float) +0:? 'ViewIndex' ( temp uint) +0:? Linker Objects +0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) +0:? 'ViewIndex' ( flat in uint ViewIndex) + +// Module Version 10000 +// Generated by (magic number): 8000b +// Id's are bound by 29 + + Capability Shader + Capability MultiView + Extension "SPV_KHR_multiview" + 1: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint Fragment 4 "main" 22 25 + ExecutionMode 4 OriginUpperLeft + Source HLSL 500 + Name 4 "main" + Name 12 "@main(u1;" + Name 11 "ViewIndex" + Name 20 "ViewIndex" + Name 22 "ViewIndex" + Name 25 "@entryPointOutput" + Name 26 "param" + Decorate 22(ViewIndex) Flat + Decorate 22(ViewIndex) BuiltIn ViewIndex + Decorate 25(@entryPointOutput) Location 0 + 2: TypeVoid + 3: TypeFunction 2 + 6: TypeInt 32 0 + 7: TypePointer Function 6(int) + 8: TypeFloat 32 + 9: TypeVector 8(float) 4 + 10: TypeFunction 9(fvec4) 7(ptr) + 16: 8(float) Constant 0 + 21: TypePointer Input 6(int) + 22(ViewIndex): 21(ptr) Variable Input + 24: TypePointer Output 9(fvec4) +25(@entryPointOutput): 24(ptr) Variable Output + 4(main): 2 Function None 3 + 5: Label + 20(ViewIndex): 7(ptr) Variable Function + 26(param): 7(ptr) Variable Function + 23: 6(int) Load 22(ViewIndex) + Store 20(ViewIndex) 23 + 27: 6(int) Load 20(ViewIndex) + Store 26(param) 27 + 28: 9(fvec4) FunctionCall 12(@main(u1;) 26(param) + Store 25(@entryPointOutput) 28 + Return + FunctionEnd + 12(@main(u1;): 9(fvec4) Function None 10 + 11(ViewIndex): 7(ptr) FunctionParameter + 13: Label + 14: 6(int) Load 11(ViewIndex) + 15: 8(float) ConvertUToF 14 + 17: 9(fvec4) CompositeConstruct 15 16 16 16 + ReturnValue 17 + FunctionEnd diff --git a/Test/baseResults/hlsl.nested-runtimeArray.frag.out b/Test/baseResults/hlsl.nested-runtimeArray.frag.out new file mode 100755 index 00000000..f019290c --- /dev/null +++ b/Test/baseResults/hlsl.nested-runtimeArray.frag.out @@ -0,0 +1,119 @@ +hlsl.nested-runtimeArray.frag +Shader version: 500 +gl_FragCoord origin is upper left +0:? Sequence +0:7 Function Definition: @main( ( temp float) +0:7 Function Parameters: +0:? Sequence +0:8 Branch: Return with expression +0:8 direct index ( temp float) +0:8 a: direct index for structure ( temp unsized 1-element array of float) +0:8 direct index (layout( row_major std430) buffer structure{ temp unsized 1-element array of float a}) +0:8 @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of structure{ temp unsized 1-element array of float a}) +0:8 'B' (layout( row_major std430) buffer block{layout( row_major std430) buffer unsized 1-element array of structure{ temp unsized 1-element array of float a} @data}) +0:8 Constant: +0:8 0 (const uint) +0:8 Constant: +0:8 0 (const int) +0:8 Constant: +0:8 0 (const int) +0:8 Constant: +0:8 0 (const int) +0:7 Function Definition: main( ( temp void) +0:7 Function Parameters: +0:? Sequence +0:7 move second child to first child ( temp float) +0:? '@entryPointOutput' (layout( location=0) out float) +0:7 Function Call: @main( ( temp float) +0:? Linker Objects +0:? 'B' (layout( row_major std430) buffer block{layout( row_major std430) buffer unsized 1-element array of structure{ temp unsized 1-element array of float a} @data}) +0:? '@entryPointOutput' (layout( location=0) out float) + + +Linked fragment stage: + + +Shader version: 500 +gl_FragCoord origin is upper left +0:? Sequence +0:7 Function Definition: @main( ( temp float) +0:7 Function Parameters: +0:? Sequence +0:8 Branch: Return with expression +0:8 direct index ( temp float) +0:8 a: direct index for structure ( temp unsized 1-element array of float) +0:8 direct index (layout( row_major std430) buffer structure{ temp unsized 1-element array of float a}) +0:8 @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of structure{ temp unsized 1-element array of float a}) +0:8 'B' (layout( row_major std430) buffer block{layout( row_major std430) buffer unsized 1-element array of structure{ temp unsized 1-element array of float a} @data}) +0:8 Constant: +0:8 0 (const uint) +0:8 Constant: +0:8 0 (const int) +0:8 Constant: +0:8 0 (const int) +0:8 Constant: +0:8 0 (const int) +0:7 Function Definition: main( ( temp void) +0:7 Function Parameters: +0:? Sequence +0:7 move second child to first child ( temp float) +0:? '@entryPointOutput' (layout( location=0) out float) +0:7 Function Call: @main( ( temp float) +0:? Linker Objects +0:? 'B' (layout( row_major std430) buffer block{layout( row_major std430) buffer unsized 1-element array of structure{ temp unsized 1-element array of float a} @data}) +0:? '@entryPointOutput' (layout( location=0) out float) + +// Module Version 10000 +// Generated by (magic number): 8000b +// Id's are bound by 26 + + Capability Shader + 1: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint Fragment 4 "main" 24 + ExecutionMode 4 OriginUpperLeft + Source HLSL 500 + Name 4 "main" + Name 8 "@main(" + Name 11 "A" + MemberName 11(A) 0 "a" + Name 13 "B" + MemberName 13(B) 0 "@data" + Name 15 "B" + Name 24 "@entryPointOutput" + Decorate 10 ArrayStride 4 + MemberDecorate 11(A) 0 Offset 0 + Decorate 11(A) BufferBlock + Decorate 12 ArrayStride 4 + MemberDecorate 13(B) 0 Offset 0 + Decorate 13(B) BufferBlock + Decorate 15(B) DescriptorSet 0 + Decorate 15(B) Binding 0 + Decorate 24(@entryPointOutput) Location 0 + 2: TypeVoid + 3: TypeFunction 2 + 6: TypeFloat 32 + 7: TypeFunction 6(float) + 10: TypeRuntimeArray 6(float) + 11(A): TypeStruct 10 + 12: TypeRuntimeArray 11(A) + 13(B): TypeStruct 12 + 14: TypePointer Uniform 13(B) + 15(B): 14(ptr) Variable Uniform + 16: TypeInt 32 1 + 17: 16(int) Constant 0 + 18: TypePointer Uniform 6(float) + 23: TypePointer Output 6(float) +24(@entryPointOutput): 23(ptr) Variable Output + 4(main): 2 Function None 3 + 5: Label + 25: 6(float) FunctionCall 8(@main() + Store 24(@entryPointOutput) 25 + Return + FunctionEnd + 8(@main(): 6(float) Function None 7 + 9: Label + 19: 18(ptr) AccessChain 15(B) 17 17 17 17 + 20: 6(float) Load 19 + ReturnValue 20 + FunctionEnd diff --git a/Test/baseResults/hlsl.numericsuffixes.frag.out b/Test/baseResults/hlsl.numericsuffixes.frag.out index 02f7d2a1..05be4230 100755 --- a/Test/baseResults/hlsl.numericsuffixes.frag.out +++ b/Test/baseResults/hlsl.numericsuffixes.frag.out @@ -2,94 +2,124 @@ hlsl.numericsuffixes.frag Shader version: 500 gl_FragCoord origin is upper left 0:? Sequence -0:5 Function Definition: @main( ( temp structure{ temp 4-component vector of float color}) -0:5 Function Parameters: +0:8 Function Definition: @main( ( temp structure{ temp 4-component vector of float color}) +0:8 Function Parameters: 0:? Sequence -0:7 Sequence -0:7 move second child to first child ( temp float) -0:7 'r00' ( temp float) -0:7 Constant: -0:7 1.000000 -0:8 Sequence -0:8 move second child to first child ( temp uint) -0:8 'r01' ( temp uint) -0:8 Constant: -0:8 1 (const uint) -0:9 Sequence -0:9 move second child to first child ( temp uint) -0:9 'r02' ( temp uint) -0:9 Constant: -0:9 2 (const uint) 0:10 Sequence -0:10 move second child to first child ( temp uint) -0:10 'r03' ( temp uint) +0:10 move second child to first child ( temp float) +0:10 'r00' ( temp float) 0:10 Constant: -0:10 2748 (const uint) +0:10 1.000000 0:11 Sequence 0:11 move second child to first child ( temp uint) -0:11 'r04' ( temp uint) +0:11 'r01' ( temp uint) 0:11 Constant: -0:11 2748 (const uint) +0:11 1 (const uint) 0:12 Sequence -0:12 move second child to first child ( temp int) -0:12 'r05' ( temp int) +0:12 move second child to first child ( temp uint) +0:12 'r02' ( temp uint) 0:12 Constant: -0:12 5 (const int) +0:12 2 (const uint) 0:13 Sequence -0:13 move second child to first child ( temp int) -0:13 'r06' ( temp int) +0:13 move second child to first child ( temp uint) +0:13 'r03' ( temp uint) 0:13 Constant: -0:13 6 (const int) +0:13 2748 (const uint) 0:14 Sequence -0:14 move second child to first child ( temp int) -0:14 'r07' ( temp int) +0:14 move second child to first child ( temp uint) +0:14 'r04' ( temp uint) 0:14 Constant: -0:14 57 (const int) +0:14 2748 (const uint) 0:15 Sequence -0:15 move second child to first child ( temp uint) -0:15 'r08' ( temp uint) +0:15 move second child to first child ( temp int) +0:15 'r05' ( temp int) 0:15 Constant: -0:15 58 (const uint) +0:15 5 (const int) 0:16 Sequence -0:16 move second child to first child ( temp float) -0:16 'r09' ( temp float) +0:16 move second child to first child ( temp int) +0:16 'r06' ( temp int) 0:16 Constant: -0:16 1.000000 +0:16 6 (const int) 0:17 Sequence -0:17 move second child to first child ( temp float) -0:17 'r10' ( temp float) +0:17 move second child to first child ( temp int) +0:17 'r07' ( temp int) 0:17 Constant: -0:17 1.000000 +0:17 57 (const int) 0:18 Sequence -0:18 move second child to first child ( temp float) -0:18 'r11' ( temp float) +0:18 move second child to first child ( temp uint) +0:18 'r08' ( temp uint) 0:18 Constant: -0:18 1.100000 +0:18 58 (const uint) 0:19 Sequence 0:19 move second child to first child ( temp float) -0:19 'r12' ( temp float) +0:19 'r09' ( temp float) 0:19 Constant: -0:19 1.100000 -0:22 move second child to first child ( temp 4-component vector of float) -0:22 color: direct index for structure ( temp 4-component vector of float) -0:22 'ps_output' ( temp structure{ temp 4-component vector of float color}) +0:19 1.000000 +0:20 Sequence +0:20 move second child to first child ( temp float) +0:20 'r10' ( temp float) +0:20 Constant: +0:20 1.000000 +0:21 Sequence +0:21 move second child to first child ( temp float) +0:21 'r11' ( temp float) +0:21 Constant: +0:21 1.100000 +0:22 Sequence +0:22 move second child to first child ( temp float) +0:22 'r12' ( temp float) 0:22 Constant: -0:22 0 (const int) -0:22 Construct vec4 ( temp 4-component vector of float) -0:22 Convert int to float ( temp float) -0:22 'r07' ( temp int) -0:23 Branch: Return with expression -0:23 'ps_output' ( temp structure{ temp 4-component vector of float color}) -0:5 Function Definition: main( ( temp void) -0:5 Function Parameters: +0:22 1.100000 +0:23 Sequence +0:23 move second child to first child ( temp uint) +0:23 'r13' ( temp uint) +0:23 Constant: +0:23 1 (const uint) +0:24 Sequence +0:24 move second child to first child ( temp uint) +0:24 'r14' ( temp uint) +0:24 Constant: +0:24 2 (const uint) +0:25 Sequence +0:25 move second child to first child ( temp int) +0:25 'r15' ( temp int) +0:25 Constant: +0:25 3 (const int) +0:26 Sequence +0:26 move second child to first child ( temp int) +0:26 'r16' ( temp int) +0:26 Constant: +0:26 4 (const int) +0:27 Sequence +0:27 move second child to first child ( temp uint) +0:27 'r17' ( temp uint) +0:27 Constant: +0:27 1 (const uint) +0:28 Sequence +0:28 move second child to first child ( temp int) +0:28 'r18' ( temp int) +0:28 Constant: +0:28 3 (const int) +0:31 move second child to first child ( temp 4-component vector of float) +0:31 color: direct index for structure ( temp 4-component vector of float) +0:31 'ps_output' ( temp structure{ temp 4-component vector of float color}) +0:31 Constant: +0:31 0 (const int) +0:31 Construct vec4 ( temp 4-component vector of float) +0:31 Convert int to float ( temp float) +0:31 'r07' ( temp int) +0:32 Branch: Return with expression +0:32 'ps_output' ( temp structure{ temp 4-component vector of float color}) +0:8 Function Definition: main( ( temp void) +0:8 Function Parameters: 0:? Sequence -0:5 Sequence -0:5 move second child to first child ( temp 4-component vector of float) +0:8 Sequence +0:8 move second child to first child ( temp 4-component vector of float) 0:? '@entryPointOutput.color' (layout( location=0) out 4-component vector of float) -0:5 color: direct index for structure ( temp 4-component vector of float) -0:5 Function Call: @main( ( temp structure{ temp 4-component vector of float color}) -0:5 Constant: -0:5 0 (const int) +0:8 color: direct index for structure ( temp 4-component vector of float) +0:8 Function Call: @main( ( temp structure{ temp 4-component vector of float color}) +0:8 Constant: +0:8 0 (const int) 0:? Linker Objects 0:? '@entryPointOutput.color' (layout( location=0) out 4-component vector of float) @@ -100,105 +130,135 @@ Linked fragment stage: Shader version: 500 gl_FragCoord origin is upper left 0:? Sequence -0:5 Function Definition: @main( ( temp structure{ temp 4-component vector of float color}) -0:5 Function Parameters: +0:8 Function Definition: @main( ( temp structure{ temp 4-component vector of float color}) +0:8 Function Parameters: 0:? Sequence -0:7 Sequence -0:7 move second child to first child ( temp float) -0:7 'r00' ( temp float) -0:7 Constant: -0:7 1.000000 -0:8 Sequence -0:8 move second child to first child ( temp uint) -0:8 'r01' ( temp uint) -0:8 Constant: -0:8 1 (const uint) -0:9 Sequence -0:9 move second child to first child ( temp uint) -0:9 'r02' ( temp uint) -0:9 Constant: -0:9 2 (const uint) 0:10 Sequence -0:10 move second child to first child ( temp uint) -0:10 'r03' ( temp uint) +0:10 move second child to first child ( temp float) +0:10 'r00' ( temp float) 0:10 Constant: -0:10 2748 (const uint) +0:10 1.000000 0:11 Sequence 0:11 move second child to first child ( temp uint) -0:11 'r04' ( temp uint) +0:11 'r01' ( temp uint) 0:11 Constant: -0:11 2748 (const uint) +0:11 1 (const uint) 0:12 Sequence -0:12 move second child to first child ( temp int) -0:12 'r05' ( temp int) +0:12 move second child to first child ( temp uint) +0:12 'r02' ( temp uint) 0:12 Constant: -0:12 5 (const int) +0:12 2 (const uint) 0:13 Sequence -0:13 move second child to first child ( temp int) -0:13 'r06' ( temp int) +0:13 move second child to first child ( temp uint) +0:13 'r03' ( temp uint) 0:13 Constant: -0:13 6 (const int) +0:13 2748 (const uint) 0:14 Sequence -0:14 move second child to first child ( temp int) -0:14 'r07' ( temp int) +0:14 move second child to first child ( temp uint) +0:14 'r04' ( temp uint) 0:14 Constant: -0:14 57 (const int) +0:14 2748 (const uint) 0:15 Sequence -0:15 move second child to first child ( temp uint) -0:15 'r08' ( temp uint) +0:15 move second child to first child ( temp int) +0:15 'r05' ( temp int) 0:15 Constant: -0:15 58 (const uint) +0:15 5 (const int) 0:16 Sequence -0:16 move second child to first child ( temp float) -0:16 'r09' ( temp float) +0:16 move second child to first child ( temp int) +0:16 'r06' ( temp int) 0:16 Constant: -0:16 1.000000 +0:16 6 (const int) 0:17 Sequence -0:17 move second child to first child ( temp float) -0:17 'r10' ( temp float) +0:17 move second child to first child ( temp int) +0:17 'r07' ( temp int) 0:17 Constant: -0:17 1.000000 +0:17 57 (const int) 0:18 Sequence -0:18 move second child to first child ( temp float) -0:18 'r11' ( temp float) +0:18 move second child to first child ( temp uint) +0:18 'r08' ( temp uint) 0:18 Constant: -0:18 1.100000 +0:18 58 (const uint) 0:19 Sequence 0:19 move second child to first child ( temp float) -0:19 'r12' ( temp float) +0:19 'r09' ( temp float) 0:19 Constant: -0:19 1.100000 -0:22 move second child to first child ( temp 4-component vector of float) -0:22 color: direct index for structure ( temp 4-component vector of float) -0:22 'ps_output' ( temp structure{ temp 4-component vector of float color}) +0:19 1.000000 +0:20 Sequence +0:20 move second child to first child ( temp float) +0:20 'r10' ( temp float) +0:20 Constant: +0:20 1.000000 +0:21 Sequence +0:21 move second child to first child ( temp float) +0:21 'r11' ( temp float) +0:21 Constant: +0:21 1.100000 +0:22 Sequence +0:22 move second child to first child ( temp float) +0:22 'r12' ( temp float) 0:22 Constant: -0:22 0 (const int) -0:22 Construct vec4 ( temp 4-component vector of float) -0:22 Convert int to float ( temp float) -0:22 'r07' ( temp int) -0:23 Branch: Return with expression -0:23 'ps_output' ( temp structure{ temp 4-component vector of float color}) -0:5 Function Definition: main( ( temp void) -0:5 Function Parameters: +0:22 1.100000 +0:23 Sequence +0:23 move second child to first child ( temp uint) +0:23 'r13' ( temp uint) +0:23 Constant: +0:23 1 (const uint) +0:24 Sequence +0:24 move second child to first child ( temp uint) +0:24 'r14' ( temp uint) +0:24 Constant: +0:24 2 (const uint) +0:25 Sequence +0:25 move second child to first child ( temp int) +0:25 'r15' ( temp int) +0:25 Constant: +0:25 3 (const int) +0:26 Sequence +0:26 move second child to first child ( temp int) +0:26 'r16' ( temp int) +0:26 Constant: +0:26 4 (const int) +0:27 Sequence +0:27 move second child to first child ( temp uint) +0:27 'r17' ( temp uint) +0:27 Constant: +0:27 1 (const uint) +0:28 Sequence +0:28 move second child to first child ( temp int) +0:28 'r18' ( temp int) +0:28 Constant: +0:28 3 (const int) +0:31 move second child to first child ( temp 4-component vector of float) +0:31 color: direct index for structure ( temp 4-component vector of float) +0:31 'ps_output' ( temp structure{ temp 4-component vector of float color}) +0:31 Constant: +0:31 0 (const int) +0:31 Construct vec4 ( temp 4-component vector of float) +0:31 Convert int to float ( temp float) +0:31 'r07' ( temp int) +0:32 Branch: Return with expression +0:32 'ps_output' ( temp structure{ temp 4-component vector of float color}) +0:8 Function Definition: main( ( temp void) +0:8 Function Parameters: 0:? Sequence -0:5 Sequence -0:5 move second child to first child ( temp 4-component vector of float) +0:8 Sequence +0:8 move second child to first child ( temp 4-component vector of float) 0:? '@entryPointOutput.color' (layout( location=0) out 4-component vector of float) -0:5 color: direct index for structure ( temp 4-component vector of float) -0:5 Function Call: @main( ( temp structure{ temp 4-component vector of float color}) -0:5 Constant: -0:5 0 (const int) +0:8 color: direct index for structure ( temp 4-component vector of float) +0:8 Function Call: @main( ( temp structure{ temp 4-component vector of float color}) +0:8 Constant: +0:8 0 (const int) 0:? Linker Objects 0:? '@entryPointOutput.color' (layout( location=0) out 4-component vector of float) // Module Version 10000 // Generated by (magic number): 8000b -// Id's are bound by 54 +// Id's are bound by 62 Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Fragment 4 "main" 51 + EntryPoint Fragment 4 "main" 59 ExecutionMode 4 OriginUpperLeft Source HLSL 500 Name 4 "main" @@ -218,9 +278,15 @@ gl_FragCoord origin is upper left Name 35 "r10" Name 36 "r11" Name 38 "r12" - Name 40 "ps_output" - Name 51 "@entryPointOutput.color" - Decorate 51(@entryPointOutput.color) Location 0 + Name 39 "r13" + Name 40 "r14" + Name 41 "r15" + Name 43 "r16" + Name 45 "r17" + Name 46 "r18" + Name 48 "ps_output" + Name 59 "@entryPointOutput.color" + Decorate 59(@entryPointOutput.color) Location 0 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -241,16 +307,18 @@ gl_FragCoord origin is upper left 31: 24(int) Constant 57 33: 15(int) Constant 58 37: 6(float) Constant 1066192077 - 39: TypePointer Function 8(PS_OUTPUT) - 41: 24(int) Constant 0 - 45: TypePointer Function 7(fvec4) - 50: TypePointer Output 7(fvec4) -51(@entryPointOutput.color): 50(ptr) Variable Output + 42: 24(int) Constant 3 + 44: 24(int) Constant 4 + 47: TypePointer Function 8(PS_OUTPUT) + 49: 24(int) Constant 0 + 53: TypePointer Function 7(fvec4) + 58: TypePointer Output 7(fvec4) +59(@entryPointOutput.color): 58(ptr) Variable Output 4(main): 2 Function None 3 5: Label - 52:8(PS_OUTPUT) FunctionCall 10(@main() - 53: 7(fvec4) CompositeExtract 52 0 - Store 51(@entryPointOutput.color) 53 + 60:8(PS_OUTPUT) FunctionCall 10(@main() + 61: 7(fvec4) CompositeExtract 60 0 + Store 59(@entryPointOutput.color) 61 Return FunctionEnd 10(@main():8(PS_OUTPUT) Function None 9 @@ -268,7 +336,13 @@ gl_FragCoord origin is upper left 35(r10): 12(ptr) Variable Function 36(r11): 12(ptr) Variable Function 38(r12): 12(ptr) Variable Function - 40(ps_output): 39(ptr) Variable Function + 39(r13): 16(ptr) Variable Function + 40(r14): 16(ptr) Variable Function + 41(r15): 25(ptr) Variable Function + 43(r16): 25(ptr) Variable Function + 45(r17): 16(ptr) Variable Function + 46(r18): 25(ptr) Variable Function + 48(ps_output): 47(ptr) Variable Function Store 13(r00) 14 Store 17(r01) 18 Store 19(r02) 20 @@ -282,11 +356,17 @@ gl_FragCoord origin is upper left Store 35(r10) 14 Store 36(r11) 37 Store 38(r12) 37 - 42: 24(int) Load 30(r07) - 43: 6(float) ConvertSToF 42 - 44: 7(fvec4) CompositeConstruct 43 43 43 43 - 46: 45(ptr) AccessChain 40(ps_output) 41 - Store 46 44 - 47:8(PS_OUTPUT) Load 40(ps_output) - ReturnValue 47 + Store 39(r13) 18 + Store 40(r14) 20 + Store 41(r15) 42 + Store 43(r16) 44 + Store 45(r17) 18 + Store 46(r18) 42 + 50: 24(int) Load 30(r07) + 51: 6(float) ConvertSToF 50 + 52: 7(fvec4) CompositeConstruct 51 51 51 51 + 54: 53(ptr) AccessChain 48(ps_output) 49 + Store 54 52 + 55:8(PS_OUTPUT) Load 48(ps_output) + ReturnValue 55 FunctionEnd diff --git a/Test/baseResults/hlsl.numericsuffixes.negative.frag.out b/Test/baseResults/hlsl.numericsuffixes.negative.frag.out new file mode 100755 index 00000000..60d63e9f --- /dev/null +++ b/Test/baseResults/hlsl.numericsuffixes.negative.frag.out @@ -0,0 +1,109 @@ +hlsl.numericsuffixes.negative.frag +ERROR: 0:7: '' : bad digit in binary literal +ERROR: 0:8: '' : binary literal too big +ERROR: 0:9: '' : bad digit in hexadecimal literal +ERROR: 0:10: '' : hexadecimal literal too big +ERROR: 4 compilation errors. No code generated. + + +Shader version: 500 +gl_FragCoord origin is upper left +ERROR: node is still EOpNull! +0:5 Function Definition: @main( ( temp structure{ temp 4-component vector of float color}) +0:5 Function Parameters: +0:? Sequence +0:7 Sequence +0:7 move second child to first child ( temp uint) +0:7 'r01' ( temp uint) +0:7 Constant: +0:7 0 (const uint) +0:8 Sequence +0:8 move second child to first child ( temp uint) +0:8 'r02' ( temp uint) +0:8 Constant: +0:8 4294967295 (const uint) +0:10 Sequence +0:9 move second child to first child ( temp uint) +0:9 'r03' ( temp uint) +0:9 Constant: +0:9 0 (const uint) +0:10 move second child to first child ( temp uint) +0:10 'r04' ( temp uint) +0:10 Constant: +0:10 4294967295 (const uint) +0:13 move second child to first child ( temp 4-component vector of float) +0:13 color: direct index for structure ( temp 4-component vector of float) +0:13 'ps_output' ( temp structure{ temp 4-component vector of float color}) +0:13 Constant: +0:13 0 (const int) +0:13 Construct vec4 ( temp 4-component vector of float) +0:13 Convert uint to float ( temp float) +0:13 'r01' ( temp uint) +0:14 Branch: Return with expression +0:14 'ps_output' ( temp structure{ temp 4-component vector of float color}) +0:5 Function Definition: main( ( temp void) +0:5 Function Parameters: +0:? Sequence +0:5 Sequence +0:5 move second child to first child ( temp 4-component vector of float) +0:? '@entryPointOutput.color' (layout( location=0) out 4-component vector of float) +0:5 color: direct index for structure ( temp 4-component vector of float) +0:5 Function Call: @main( ( temp structure{ temp 4-component vector of float color}) +0:5 Constant: +0:5 0 (const int) +0:? Linker Objects +0:? '@entryPointOutput.color' (layout( location=0) out 4-component vector of float) + + +Linked fragment stage: + + +Shader version: 500 +gl_FragCoord origin is upper left +ERROR: node is still EOpNull! +0:5 Function Definition: @main( ( temp structure{ temp 4-component vector of float color}) +0:5 Function Parameters: +0:? Sequence +0:7 Sequence +0:7 move second child to first child ( temp uint) +0:7 'r01' ( temp uint) +0:7 Constant: +0:7 0 (const uint) +0:8 Sequence +0:8 move second child to first child ( temp uint) +0:8 'r02' ( temp uint) +0:8 Constant: +0:8 4294967295 (const uint) +0:10 Sequence +0:9 move second child to first child ( temp uint) +0:9 'r03' ( temp uint) +0:9 Constant: +0:9 0 (const uint) +0:10 move second child to first child ( temp uint) +0:10 'r04' ( temp uint) +0:10 Constant: +0:10 4294967295 (const uint) +0:13 move second child to first child ( temp 4-component vector of float) +0:13 color: direct index for structure ( temp 4-component vector of float) +0:13 'ps_output' ( temp structure{ temp 4-component vector of float color}) +0:13 Constant: +0:13 0 (const int) +0:13 Construct vec4 ( temp 4-component vector of float) +0:13 Convert uint to float ( temp float) +0:13 'r01' ( temp uint) +0:14 Branch: Return with expression +0:14 'ps_output' ( temp structure{ temp 4-component vector of float color}) +0:5 Function Definition: main( ( temp void) +0:5 Function Parameters: +0:? Sequence +0:5 Sequence +0:5 move second child to first child ( temp 4-component vector of float) +0:? '@entryPointOutput.color' (layout( location=0) out 4-component vector of float) +0:5 color: direct index for structure ( temp 4-component vector of float) +0:5 Function Call: @main( ( temp structure{ temp 4-component vector of float color}) +0:5 Constant: +0:5 0 (const int) +0:? Linker Objects +0:? '@entryPointOutput.color' (layout( location=0) out 4-component vector of float) + +SPIR-V is not generated for failed compile or link diff --git a/Test/baseResults/hlsl.pp.expand.frag.out b/Test/baseResults/hlsl.pp.expand.frag.out index adfe02c1..97df910a 100755 --- a/Test/baseResults/hlsl.pp.expand.frag.out +++ b/Test/baseResults/hlsl.pp.expand.frag.out @@ -9,7 +9,7 @@ struct A float4 a; float4 b; float4 c = { 1, 2, 3, 4 }; - float4 d = {({ {(({ 1, 2, 3, 4 }))} })}, { { 1, 2, 3, 4 } }; + float4 d = { ({ { ( ({ 1, 2, 3, 4 })) } }) }, { { 1, 2, 3, 4 } }; }; void main() diff --git a/Test/baseResults/hlsl.structcopy.comp.out b/Test/baseResults/hlsl.structcopy.comp.out new file mode 100755 index 00000000..afc03e09 --- /dev/null +++ b/Test/baseResults/hlsl.structcopy.comp.out @@ -0,0 +1,402 @@ +hlsl.structcopy.comp +Shader version: 500 +local_size = (128, 1, 1) +0:? Sequence +0:20 Function Definition: @main(u1; ( temp void) +0:20 Function Parameters: +0:20 'id' ( in uint) +0:? Sequence +0:21 move second child to first child ( temp structure{ temp uint a, temp uint b, temp uint c}) +0:21 direct index ( temp structure{ temp uint a, temp uint b, temp uint c}) +0:21 's' ( shared 128-element array of structure{ temp uint a, temp uint b, temp uint c}) +0:21 Constant: +0:21 0 (const int) +0:21 Constant: +0:21 1 (const uint) +0:21 2 (const uint) +0:21 3 (const uint) +0:22 Sequence +0:22 move second child to first child ( temp uint) +0:22 'count' ( temp uint) +0:22 count: direct index for structure ( temp uint) +0:22 direct index (layout( row_major std430) buffer structure{ temp uint count, temp unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} data}) +0:22 @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of structure{ temp uint count, temp unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} data}) +0:22 'sb' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of structure{ temp uint count, temp unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} data} @data}) +0:22 Constant: +0:22 0 (const uint) +0:22 Constant: +0:22 0 (const int) +0:22 Constant: +0:22 0 (const int) +0:23 Sequence +0:23 move second child to first child ( temp structure{ temp uint a, temp uint b, temp uint c}) +0:23 'ms' ( temp structure{ temp uint a, temp uint b, temp uint c}) +0:23 Test condition and select ( temp structure{ temp uint a, temp uint b, temp uint c}): no shortcircuit +0:23 Condition +0:23 Compare Greater Than ( temp bool) +0:23 'id' ( in uint) +0:23 'count' ( temp uint) +0:23 true case +0:23 indirect index ( temp structure{ temp uint a, temp uint b, temp uint c}) +0:23 's' ( shared 128-element array of structure{ temp uint a, temp uint b, temp uint c}) +0:23 subtract ( temp uint) +0:23 'id' ( in uint) +0:23 'count' ( temp uint) +0:23 false case +0:23 indirect index ( temp structure{ temp uint a, temp uint b, temp uint c}) +0:23 data: direct index for structure ( temp unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c}) +0:23 direct index (layout( row_major std430) buffer structure{ temp uint count, temp unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} data}) +0:23 @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of structure{ temp uint count, temp unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} data}) +0:23 'sb' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of structure{ temp uint count, temp unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} data} @data}) +0:23 Constant: +0:23 0 (const uint) +0:23 Constant: +0:23 0 (const int) +0:23 Constant: +0:23 1 (const int) +0:23 'id' ( in uint) +0:25 AtomicAdd ( temp uint) +0:25 a: direct index for structure ( temp uint) +0:25 direct index (layout( row_major std430) buffer structure{ temp uint a, temp uint b, temp uint c}) +0:25 @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c}) +0:25 'o' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} @data}) +0:25 Constant: +0:25 0 (const uint) +0:25 Constant: +0:25 0 (const int) +0:25 Constant: +0:25 0 (const int) +0:25 a: direct index for structure ( temp uint) +0:25 'ms' ( temp structure{ temp uint a, temp uint b, temp uint c}) +0:25 Constant: +0:25 0 (const int) +0:26 AtomicAdd ( temp uint) +0:26 b: direct index for structure ( temp uint) +0:26 direct index (layout( row_major std430) buffer structure{ temp uint a, temp uint b, temp uint c}) +0:26 @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c}) +0:26 'o' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} @data}) +0:26 Constant: +0:26 0 (const uint) +0:26 Constant: +0:26 0 (const int) +0:26 Constant: +0:26 1 (const int) +0:26 b: direct index for structure ( temp uint) +0:26 'ms' ( temp structure{ temp uint a, temp uint b, temp uint c}) +0:26 Constant: +0:26 1 (const int) +0:27 AtomicAdd ( temp uint) +0:27 c: direct index for structure ( temp uint) +0:27 direct index (layout( row_major std430) buffer structure{ temp uint a, temp uint b, temp uint c}) +0:27 @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c}) +0:27 'o' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} @data}) +0:27 Constant: +0:27 0 (const uint) +0:27 Constant: +0:27 0 (const int) +0:27 Constant: +0:27 2 (const int) +0:27 c: direct index for structure ( temp uint) +0:27 'ms' ( temp structure{ temp uint a, temp uint b, temp uint c}) +0:27 Constant: +0:27 2 (const int) +0:20 Function Definition: main( ( temp void) +0:20 Function Parameters: +0:? Sequence +0:20 move second child to first child ( temp uint) +0:? 'id' ( temp uint) +0:? 'id' ( in uint LocalInvocationIndex) +0:20 Function Call: @main(u1; ( temp void) +0:? 'id' ( temp uint) +0:? Linker Objects +0:? 'sb' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of structure{ temp uint count, temp unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} data} @data}) +0:? 'o' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} @data}) +0:? 's' ( shared 128-element array of structure{ temp uint a, temp uint b, temp uint c}) +0:? 'deflt' ( const structure{ temp uint a, temp uint b, temp uint c}) +0:? 1 (const uint) +0:? 2 (const uint) +0:? 3 (const uint) +0:? 'id' ( in uint LocalInvocationIndex) + + +Linked compute stage: + + +Shader version: 500 +local_size = (128, 1, 1) +0:? Sequence +0:20 Function Definition: @main(u1; ( temp void) +0:20 Function Parameters: +0:20 'id' ( in uint) +0:? Sequence +0:21 move second child to first child ( temp structure{ temp uint a, temp uint b, temp uint c}) +0:21 direct index ( temp structure{ temp uint a, temp uint b, temp uint c}) +0:21 's' ( shared 128-element array of structure{ temp uint a, temp uint b, temp uint c}) +0:21 Constant: +0:21 0 (const int) +0:21 Constant: +0:21 1 (const uint) +0:21 2 (const uint) +0:21 3 (const uint) +0:22 Sequence +0:22 move second child to first child ( temp uint) +0:22 'count' ( temp uint) +0:22 count: direct index for structure ( temp uint) +0:22 direct index (layout( row_major std430) buffer structure{ temp uint count, temp unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} data}) +0:22 @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of structure{ temp uint count, temp unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} data}) +0:22 'sb' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of structure{ temp uint count, temp unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} data} @data}) +0:22 Constant: +0:22 0 (const uint) +0:22 Constant: +0:22 0 (const int) +0:22 Constant: +0:22 0 (const int) +0:23 Sequence +0:23 move second child to first child ( temp structure{ temp uint a, temp uint b, temp uint c}) +0:23 'ms' ( temp structure{ temp uint a, temp uint b, temp uint c}) +0:23 Test condition and select ( temp structure{ temp uint a, temp uint b, temp uint c}): no shortcircuit +0:23 Condition +0:23 Compare Greater Than ( temp bool) +0:23 'id' ( in uint) +0:23 'count' ( temp uint) +0:23 true case +0:23 indirect index ( temp structure{ temp uint a, temp uint b, temp uint c}) +0:23 's' ( shared 128-element array of structure{ temp uint a, temp uint b, temp uint c}) +0:23 subtract ( temp uint) +0:23 'id' ( in uint) +0:23 'count' ( temp uint) +0:23 false case +0:23 indirect index ( temp structure{ temp uint a, temp uint b, temp uint c}) +0:23 data: direct index for structure ( temp unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c}) +0:23 direct index (layout( row_major std430) buffer structure{ temp uint count, temp unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} data}) +0:23 @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of structure{ temp uint count, temp unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} data}) +0:23 'sb' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of structure{ temp uint count, temp unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} data} @data}) +0:23 Constant: +0:23 0 (const uint) +0:23 Constant: +0:23 0 (const int) +0:23 Constant: +0:23 1 (const int) +0:23 'id' ( in uint) +0:25 AtomicAdd ( temp uint) +0:25 a: direct index for structure ( temp uint) +0:25 direct index (layout( row_major std430) buffer structure{ temp uint a, temp uint b, temp uint c}) +0:25 @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c}) +0:25 'o' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} @data}) +0:25 Constant: +0:25 0 (const uint) +0:25 Constant: +0:25 0 (const int) +0:25 Constant: +0:25 0 (const int) +0:25 a: direct index for structure ( temp uint) +0:25 'ms' ( temp structure{ temp uint a, temp uint b, temp uint c}) +0:25 Constant: +0:25 0 (const int) +0:26 AtomicAdd ( temp uint) +0:26 b: direct index for structure ( temp uint) +0:26 direct index (layout( row_major std430) buffer structure{ temp uint a, temp uint b, temp uint c}) +0:26 @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c}) +0:26 'o' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} @data}) +0:26 Constant: +0:26 0 (const uint) +0:26 Constant: +0:26 0 (const int) +0:26 Constant: +0:26 1 (const int) +0:26 b: direct index for structure ( temp uint) +0:26 'ms' ( temp structure{ temp uint a, temp uint b, temp uint c}) +0:26 Constant: +0:26 1 (const int) +0:27 AtomicAdd ( temp uint) +0:27 c: direct index for structure ( temp uint) +0:27 direct index (layout( row_major std430) buffer structure{ temp uint a, temp uint b, temp uint c}) +0:27 @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c}) +0:27 'o' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} @data}) +0:27 Constant: +0:27 0 (const uint) +0:27 Constant: +0:27 0 (const int) +0:27 Constant: +0:27 2 (const int) +0:27 c: direct index for structure ( temp uint) +0:27 'ms' ( temp structure{ temp uint a, temp uint b, temp uint c}) +0:27 Constant: +0:27 2 (const int) +0:20 Function Definition: main( ( temp void) +0:20 Function Parameters: +0:? Sequence +0:20 move second child to first child ( temp uint) +0:? 'id' ( temp uint) +0:? 'id' ( in uint LocalInvocationIndex) +0:20 Function Call: @main(u1; ( temp void) +0:? 'id' ( temp uint) +0:? Linker Objects +0:? 'sb' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of structure{ temp uint count, temp unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} data} @data}) +0:? 'o' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} @data}) +0:? 's' ( shared 128-element array of structure{ temp uint a, temp uint b, temp uint c}) +0:? 'deflt' ( const structure{ temp uint a, temp uint b, temp uint c}) +0:? 1 (const uint) +0:? 2 (const uint) +0:? 3 (const uint) +0:? 'id' ( in uint LocalInvocationIndex) + +// Module Version 10000 +// Generated by (magic number): 8000b +// Id's are bound by 88 + + Capability Shader + 1: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint GLCompute 4 "main" 83 + ExecutionMode 4 LocalSize 128 1 1 + Source HLSL 500 + Name 4 "main" + Name 10 "@main(u1;" + Name 9 "id" + Name 12 "MyStruct" + MemberName 12(MyStruct) 0 "a" + MemberName 12(MyStruct) 1 "b" + MemberName 12(MyStruct) 2 "c" + Name 16 "s" + Name 25 "count" + Name 26 "MyStruct" + MemberName 26(MyStruct) 0 "a" + MemberName 26(MyStruct) 1 "b" + MemberName 26(MyStruct) 2 "c" + Name 28 "MyStructs" + MemberName 28(MyStructs) 0 "count" + MemberName 28(MyStructs) 1 "data" + Name 30 "sb" + MemberName 30(sb) 0 "@data" + Name 32 "sb" + Name 37 "ms" + Name 65 "o" + MemberName 65(o) 0 "@data" + Name 67 "o" + Name 81 "id" + Name 83 "id" + Name 85 "param" + MemberDecorate 26(MyStruct) 0 Offset 0 + MemberDecorate 26(MyStruct) 1 Offset 4 + MemberDecorate 26(MyStruct) 2 Offset 8 + Decorate 27 ArrayStride 12 + MemberDecorate 28(MyStructs) 0 Offset 0 + MemberDecorate 28(MyStructs) 1 Offset 4 + Decorate 28(MyStructs) BufferBlock + Decorate 29 ArrayStride 16 + MemberDecorate 30(sb) 0 NonWritable + MemberDecorate 30(sb) 0 Offset 0 + Decorate 30(sb) BufferBlock + Decorate 32(sb) DescriptorSet 0 + Decorate 32(sb) Binding 0 + Decorate 64 ArrayStride 12 + MemberDecorate 65(o) 0 NonWritable + MemberDecorate 65(o) 0 Offset 0 + Decorate 65(o) BufferBlock + Decorate 67(o) DescriptorSet 0 + Decorate 67(o) Binding 1 + Decorate 83(id) BuiltIn LocalInvocationIndex + 2: TypeVoid + 3: TypeFunction 2 + 6: TypeInt 32 0 + 7: TypePointer Function 6(int) + 8: TypeFunction 2 7(ptr) + 12(MyStruct): TypeStruct 6(int) 6(int) 6(int) + 13: 6(int) Constant 128 + 14: TypeArray 12(MyStruct) 13 + 15: TypePointer Workgroup 14 + 16(s): 15(ptr) Variable Workgroup + 17: TypeInt 32 1 + 18: 17(int) Constant 0 + 19: 6(int) Constant 1 + 20: 6(int) Constant 2 + 21: 6(int) Constant 3 + 22:12(MyStruct) ConstantComposite 19 20 21 + 23: TypePointer Workgroup 12(MyStruct) + 26(MyStruct): TypeStruct 6(int) 6(int) 6(int) + 27: TypeRuntimeArray 26(MyStruct) + 28(MyStructs): TypeStruct 6(int) 27 + 29: TypeRuntimeArray 28(MyStructs) + 30(sb): TypeStruct 29 + 31: TypePointer Uniform 30(sb) + 32(sb): 31(ptr) Variable Uniform + 33: TypePointer Uniform 6(int) + 36: TypePointer Function 12(MyStruct) + 40: TypeBool + 47: 17(int) Constant 1 + 49: TypePointer Uniform 26(MyStruct) + 61: 17(int) Constant 2 + 64: TypeRuntimeArray 26(MyStruct) + 65(o): TypeStruct 64 + 66: TypePointer Uniform 65(o) + 67(o): 66(ptr) Variable Uniform + 71: 6(int) Constant 0 + 82: TypePointer Input 6(int) + 83(id): 82(ptr) Variable Input + 4(main): 2 Function None 3 + 5: Label + 81(id): 7(ptr) Variable Function + 85(param): 7(ptr) Variable Function + 84: 6(int) Load 83(id) + Store 81(id) 84 + 86: 6(int) Load 81(id) + Store 85(param) 86 + 87: 2 FunctionCall 10(@main(u1;) 85(param) + Return + FunctionEnd + 10(@main(u1;): 2 Function None 8 + 9(id): 7(ptr) FunctionParameter + 11: Label + 25(count): 7(ptr) Variable Function + 37(ms): 36(ptr) Variable Function + 52: 36(ptr) Variable Function + 24: 23(ptr) AccessChain 16(s) 18 + Store 24 22 + 34: 33(ptr) AccessChain 32(sb) 18 18 18 + 35: 6(int) Load 34 + Store 25(count) 35 + 38: 6(int) Load 9(id) + 39: 6(int) Load 25(count) + 41: 40(bool) UGreaterThan 38 39 + 42: 6(int) Load 9(id) + 43: 6(int) Load 25(count) + 44: 6(int) ISub 42 43 + 45: 23(ptr) AccessChain 16(s) 44 + 46:12(MyStruct) Load 45 + 48: 6(int) Load 9(id) + 50: 49(ptr) AccessChain 32(sb) 18 18 47 48 + 51:26(MyStruct) Load 50 + SelectionMerge 54 None + BranchConditional 41 53 55 + 53: Label + Store 52 46 + Branch 54 + 55: Label + 56: 6(int) CompositeExtract 51 0 + 57: 7(ptr) AccessChain 52 18 + Store 57 56 + 58: 6(int) CompositeExtract 51 1 + 59: 7(ptr) AccessChain 52 47 + Store 59 58 + 60: 6(int) CompositeExtract 51 2 + 62: 7(ptr) AccessChain 52 61 + Store 62 60 + Branch 54 + 54: Label + 63:12(MyStruct) Load 52 + Store 37(ms) 63 + 68: 33(ptr) AccessChain 67(o) 18 18 18 + 69: 7(ptr) AccessChain 37(ms) 18 + 70: 6(int) Load 69 + 72: 6(int) AtomicIAdd 68 19 71 70 + 73: 33(ptr) AccessChain 67(o) 18 18 47 + 74: 7(ptr) AccessChain 37(ms) 47 + 75: 6(int) Load 74 + 76: 6(int) AtomicIAdd 73 19 71 75 + 77: 33(ptr) AccessChain 67(o) 18 18 61 + 78: 7(ptr) AccessChain 37(ms) 61 + 79: 6(int) Load 78 + 80: 6(int) AtomicIAdd 77 19 71 79 + Return + FunctionEnd diff --git a/Test/baseResults/hlsl.structcopylogical.comp.out b/Test/baseResults/hlsl.structcopylogical.comp.out new file mode 100755 index 00000000..a9b849be --- /dev/null +++ b/Test/baseResults/hlsl.structcopylogical.comp.out @@ -0,0 +1,385 @@ +hlsl.structcopylogical.comp +Shader version: 500 +local_size = (128, 1, 1) +0:? Sequence +0:20 Function Definition: @main(u1; ( temp void) +0:20 Function Parameters: +0:20 'id' ( in uint) +0:? Sequence +0:21 move second child to first child ( temp structure{ temp uint a, temp uint b, temp uint c}) +0:21 direct index ( temp structure{ temp uint a, temp uint b, temp uint c}) +0:21 's' ( shared 128-element array of structure{ temp uint a, temp uint b, temp uint c}) +0:21 Constant: +0:21 0 (const int) +0:21 Constant: +0:21 1 (const uint) +0:21 2 (const uint) +0:21 3 (const uint) +0:22 Sequence +0:22 move second child to first child ( temp uint) +0:22 'count' ( temp uint) +0:22 count: direct index for structure ( temp uint) +0:22 direct index (layout( row_major std430) buffer structure{ temp uint count, temp unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} data}) +0:22 @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of structure{ temp uint count, temp unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} data}) +0:22 'sb' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of structure{ temp uint count, temp unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} data} @data}) +0:22 Constant: +0:22 0 (const uint) +0:22 Constant: +0:22 0 (const int) +0:22 Constant: +0:22 0 (const int) +0:23 Sequence +0:23 move second child to first child ( temp structure{ temp uint a, temp uint b, temp uint c}) +0:23 'ms' ( temp structure{ temp uint a, temp uint b, temp uint c}) +0:23 Test condition and select ( temp structure{ temp uint a, temp uint b, temp uint c}): no shortcircuit +0:23 Condition +0:23 Compare Greater Than ( temp bool) +0:23 'id' ( in uint) +0:23 'count' ( temp uint) +0:23 true case +0:23 indirect index ( temp structure{ temp uint a, temp uint b, temp uint c}) +0:23 's' ( shared 128-element array of structure{ temp uint a, temp uint b, temp uint c}) +0:23 subtract ( temp uint) +0:23 'id' ( in uint) +0:23 'count' ( temp uint) +0:23 false case +0:23 indirect index ( temp structure{ temp uint a, temp uint b, temp uint c}) +0:23 data: direct index for structure ( temp unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c}) +0:23 direct index (layout( row_major std430) buffer structure{ temp uint count, temp unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} data}) +0:23 @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of structure{ temp uint count, temp unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} data}) +0:23 'sb' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of structure{ temp uint count, temp unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} data} @data}) +0:23 Constant: +0:23 0 (const uint) +0:23 Constant: +0:23 0 (const int) +0:23 Constant: +0:23 1 (const int) +0:23 'id' ( in uint) +0:25 AtomicAdd ( temp uint) +0:25 a: direct index for structure ( temp uint) +0:25 direct index (layout( row_major std430) buffer structure{ temp uint a, temp uint b, temp uint c}) +0:25 @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c}) +0:25 'o' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} @data}) +0:25 Constant: +0:25 0 (const uint) +0:25 Constant: +0:25 0 (const int) +0:25 Constant: +0:25 0 (const int) +0:25 a: direct index for structure ( temp uint) +0:25 'ms' ( temp structure{ temp uint a, temp uint b, temp uint c}) +0:25 Constant: +0:25 0 (const int) +0:26 AtomicAdd ( temp uint) +0:26 b: direct index for structure ( temp uint) +0:26 direct index (layout( row_major std430) buffer structure{ temp uint a, temp uint b, temp uint c}) +0:26 @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c}) +0:26 'o' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} @data}) +0:26 Constant: +0:26 0 (const uint) +0:26 Constant: +0:26 0 (const int) +0:26 Constant: +0:26 1 (const int) +0:26 b: direct index for structure ( temp uint) +0:26 'ms' ( temp structure{ temp uint a, temp uint b, temp uint c}) +0:26 Constant: +0:26 1 (const int) +0:27 AtomicAdd ( temp uint) +0:27 c: direct index for structure ( temp uint) +0:27 direct index (layout( row_major std430) buffer structure{ temp uint a, temp uint b, temp uint c}) +0:27 @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c}) +0:27 'o' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} @data}) +0:27 Constant: +0:27 0 (const uint) +0:27 Constant: +0:27 0 (const int) +0:27 Constant: +0:27 2 (const int) +0:27 c: direct index for structure ( temp uint) +0:27 'ms' ( temp structure{ temp uint a, temp uint b, temp uint c}) +0:27 Constant: +0:27 2 (const int) +0:20 Function Definition: main( ( temp void) +0:20 Function Parameters: +0:? Sequence +0:20 move second child to first child ( temp uint) +0:? 'id' ( temp uint) +0:? 'id' ( in uint LocalInvocationIndex) +0:20 Function Call: @main(u1; ( temp void) +0:? 'id' ( temp uint) +0:? Linker Objects +0:? 'sb' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of structure{ temp uint count, temp unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} data} @data}) +0:? 'o' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} @data}) +0:? 's' ( shared 128-element array of structure{ temp uint a, temp uint b, temp uint c}) +0:? 'deflt' ( const structure{ temp uint a, temp uint b, temp uint c}) +0:? 1 (const uint) +0:? 2 (const uint) +0:? 3 (const uint) +0:? 'id' ( in uint LocalInvocationIndex) + + +Linked compute stage: + + +Shader version: 500 +local_size = (128, 1, 1) +0:? Sequence +0:20 Function Definition: @main(u1; ( temp void) +0:20 Function Parameters: +0:20 'id' ( in uint) +0:? Sequence +0:21 move second child to first child ( temp structure{ temp uint a, temp uint b, temp uint c}) +0:21 direct index ( temp structure{ temp uint a, temp uint b, temp uint c}) +0:21 's' ( shared 128-element array of structure{ temp uint a, temp uint b, temp uint c}) +0:21 Constant: +0:21 0 (const int) +0:21 Constant: +0:21 1 (const uint) +0:21 2 (const uint) +0:21 3 (const uint) +0:22 Sequence +0:22 move second child to first child ( temp uint) +0:22 'count' ( temp uint) +0:22 count: direct index for structure ( temp uint) +0:22 direct index (layout( row_major std430) buffer structure{ temp uint count, temp unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} data}) +0:22 @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of structure{ temp uint count, temp unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} data}) +0:22 'sb' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of structure{ temp uint count, temp unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} data} @data}) +0:22 Constant: +0:22 0 (const uint) +0:22 Constant: +0:22 0 (const int) +0:22 Constant: +0:22 0 (const int) +0:23 Sequence +0:23 move second child to first child ( temp structure{ temp uint a, temp uint b, temp uint c}) +0:23 'ms' ( temp structure{ temp uint a, temp uint b, temp uint c}) +0:23 Test condition and select ( temp structure{ temp uint a, temp uint b, temp uint c}): no shortcircuit +0:23 Condition +0:23 Compare Greater Than ( temp bool) +0:23 'id' ( in uint) +0:23 'count' ( temp uint) +0:23 true case +0:23 indirect index ( temp structure{ temp uint a, temp uint b, temp uint c}) +0:23 's' ( shared 128-element array of structure{ temp uint a, temp uint b, temp uint c}) +0:23 subtract ( temp uint) +0:23 'id' ( in uint) +0:23 'count' ( temp uint) +0:23 false case +0:23 indirect index ( temp structure{ temp uint a, temp uint b, temp uint c}) +0:23 data: direct index for structure ( temp unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c}) +0:23 direct index (layout( row_major std430) buffer structure{ temp uint count, temp unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} data}) +0:23 @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of structure{ temp uint count, temp unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} data}) +0:23 'sb' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of structure{ temp uint count, temp unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} data} @data}) +0:23 Constant: +0:23 0 (const uint) +0:23 Constant: +0:23 0 (const int) +0:23 Constant: +0:23 1 (const int) +0:23 'id' ( in uint) +0:25 AtomicAdd ( temp uint) +0:25 a: direct index for structure ( temp uint) +0:25 direct index (layout( row_major std430) buffer structure{ temp uint a, temp uint b, temp uint c}) +0:25 @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c}) +0:25 'o' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} @data}) +0:25 Constant: +0:25 0 (const uint) +0:25 Constant: +0:25 0 (const int) +0:25 Constant: +0:25 0 (const int) +0:25 a: direct index for structure ( temp uint) +0:25 'ms' ( temp structure{ temp uint a, temp uint b, temp uint c}) +0:25 Constant: +0:25 0 (const int) +0:26 AtomicAdd ( temp uint) +0:26 b: direct index for structure ( temp uint) +0:26 direct index (layout( row_major std430) buffer structure{ temp uint a, temp uint b, temp uint c}) +0:26 @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c}) +0:26 'o' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} @data}) +0:26 Constant: +0:26 0 (const uint) +0:26 Constant: +0:26 0 (const int) +0:26 Constant: +0:26 1 (const int) +0:26 b: direct index for structure ( temp uint) +0:26 'ms' ( temp structure{ temp uint a, temp uint b, temp uint c}) +0:26 Constant: +0:26 1 (const int) +0:27 AtomicAdd ( temp uint) +0:27 c: direct index for structure ( temp uint) +0:27 direct index (layout( row_major std430) buffer structure{ temp uint a, temp uint b, temp uint c}) +0:27 @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c}) +0:27 'o' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} @data}) +0:27 Constant: +0:27 0 (const uint) +0:27 Constant: +0:27 0 (const int) +0:27 Constant: +0:27 2 (const int) +0:27 c: direct index for structure ( temp uint) +0:27 'ms' ( temp structure{ temp uint a, temp uint b, temp uint c}) +0:27 Constant: +0:27 2 (const int) +0:20 Function Definition: main( ( temp void) +0:20 Function Parameters: +0:? Sequence +0:20 move second child to first child ( temp uint) +0:? 'id' ( temp uint) +0:? 'id' ( in uint LocalInvocationIndex) +0:20 Function Call: @main(u1; ( temp void) +0:? 'id' ( temp uint) +0:? Linker Objects +0:? 'sb' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of structure{ temp uint count, temp unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} data} @data}) +0:? 'o' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} @data}) +0:? 's' ( shared 128-element array of structure{ temp uint a, temp uint b, temp uint c}) +0:? 'deflt' ( const structure{ temp uint a, temp uint b, temp uint c}) +0:? 1 (const uint) +0:? 2 (const uint) +0:? 3 (const uint) +0:? 'id' ( in uint LocalInvocationIndex) + +// Module Version 10600 +// Generated by (magic number): 8000b +// Id's are bound by 79 + + Capability Shader + 1: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint GLCompute 4 "main" 16 32 57 74 + ExecutionMode 4 LocalSize 128 1 1 + Source HLSL 500 + Name 4 "main" + Name 10 "@main(u1;" + Name 9 "id" + Name 12 "MyStruct" + MemberName 12(MyStruct) 0 "a" + MemberName 12(MyStruct) 1 "b" + MemberName 12(MyStruct) 2 "c" + Name 16 "s" + Name 25 "count" + Name 26 "MyStruct" + MemberName 26(MyStruct) 0 "a" + MemberName 26(MyStruct) 1 "b" + MemberName 26(MyStruct) 2 "c" + Name 28 "MyStructs" + MemberName 28(MyStructs) 0 "count" + MemberName 28(MyStructs) 1 "data" + Name 30 "sb" + MemberName 30(sb) 0 "@data" + Name 32 "sb" + Name 37 "ms" + Name 55 "o" + MemberName 55(o) 0 "@data" + Name 57 "o" + Name 72 "id" + Name 74 "id" + Name 76 "param" + MemberDecorate 26(MyStruct) 0 Offset 0 + MemberDecorate 26(MyStruct) 1 Offset 4 + MemberDecorate 26(MyStruct) 2 Offset 8 + Decorate 27 ArrayStride 12 + MemberDecorate 28(MyStructs) 0 Offset 0 + MemberDecorate 28(MyStructs) 1 Offset 4 + Decorate 28(MyStructs) Block + Decorate 29 ArrayStride 16 + MemberDecorate 30(sb) 0 NonWritable + MemberDecorate 30(sb) 0 Offset 0 + Decorate 30(sb) Block + Decorate 32(sb) DescriptorSet 0 + Decorate 32(sb) Binding 0 + Decorate 54 ArrayStride 12 + MemberDecorate 55(o) 0 NonWritable + MemberDecorate 55(o) 0 Offset 0 + Decorate 55(o) Block + Decorate 57(o) DescriptorSet 0 + Decorate 57(o) Binding 1 + Decorate 74(id) BuiltIn LocalInvocationIndex + 2: TypeVoid + 3: TypeFunction 2 + 6: TypeInt 32 0 + 7: TypePointer Function 6(int) + 8: TypeFunction 2 7(ptr) + 12(MyStruct): TypeStruct 6(int) 6(int) 6(int) + 13: 6(int) Constant 128 + 14: TypeArray 12(MyStruct) 13 + 15: TypePointer Workgroup 14 + 16(s): 15(ptr) Variable Workgroup + 17: TypeInt 32 1 + 18: 17(int) Constant 0 + 19: 6(int) Constant 1 + 20: 6(int) Constant 2 + 21: 6(int) Constant 3 + 22:12(MyStruct) ConstantComposite 19 20 21 + 23: TypePointer Workgroup 12(MyStruct) + 26(MyStruct): TypeStruct 6(int) 6(int) 6(int) + 27: TypeRuntimeArray 26(MyStruct) + 28(MyStructs): TypeStruct 6(int) 27 + 29: TypeRuntimeArray 28(MyStructs) + 30(sb): TypeStruct 29 + 31: TypePointer StorageBuffer 30(sb) + 32(sb): 31(ptr) Variable StorageBuffer + 33: TypePointer StorageBuffer 6(int) + 36: TypePointer Function 12(MyStruct) + 40: TypeBool + 47: 17(int) Constant 1 + 49: TypePointer StorageBuffer 26(MyStruct) + 54: TypeRuntimeArray 26(MyStruct) + 55(o): TypeStruct 54 + 56: TypePointer StorageBuffer 55(o) + 57(o): 56(ptr) Variable StorageBuffer + 61: 6(int) Constant 0 + 67: 17(int) Constant 2 + 73: TypePointer Input 6(int) + 74(id): 73(ptr) Variable Input + 4(main): 2 Function None 3 + 5: Label + 72(id): 7(ptr) Variable Function + 76(param): 7(ptr) Variable Function + 75: 6(int) Load 74(id) + Store 72(id) 75 + 77: 6(int) Load 72(id) + Store 76(param) 77 + 78: 2 FunctionCall 10(@main(u1;) 76(param) + Return + FunctionEnd + 10(@main(u1;): 2 Function None 8 + 9(id): 7(ptr) FunctionParameter + 11: Label + 25(count): 7(ptr) Variable Function + 37(ms): 36(ptr) Variable Function + 24: 23(ptr) AccessChain 16(s) 18 + Store 24 22 + 34: 33(ptr) AccessChain 32(sb) 18 18 18 + 35: 6(int) Load 34 + Store 25(count) 35 + 38: 6(int) Load 9(id) + 39: 6(int) Load 25(count) + 41: 40(bool) UGreaterThan 38 39 + 42: 6(int) Load 9(id) + 43: 6(int) Load 25(count) + 44: 6(int) ISub 42 43 + 45: 23(ptr) AccessChain 16(s) 44 + 46:12(MyStruct) Load 45 + 48: 6(int) Load 9(id) + 50: 49(ptr) AccessChain 32(sb) 18 18 47 48 + 51:26(MyStruct) Load 50 + 52:12(MyStruct) CopyLogical 51 + 53:12(MyStruct) Select 41 46 52 + Store 37(ms) 53 + 58: 33(ptr) AccessChain 57(o) 18 18 18 + 59: 7(ptr) AccessChain 37(ms) 18 + 60: 6(int) Load 59 + 62: 6(int) AtomicIAdd 58 19 61 60 + 63: 33(ptr) AccessChain 57(o) 18 18 47 + 64: 7(ptr) AccessChain 37(ms) 47 + 65: 6(int) Load 64 + 66: 6(int) AtomicIAdd 63 19 61 65 + 68: 33(ptr) AccessChain 57(o) 18 18 67 + 69: 7(ptr) AccessChain 37(ms) 67 + 70: 6(int) Load 69 + 71: 6(int) AtomicIAdd 68 19 61 70 + Return + FunctionEnd diff --git a/Test/baseResults/hlsl.wavebroadcast.comp.out b/Test/baseResults/hlsl.wavebroadcast.comp.out index 49d3b871..ed35cba3 100755 --- a/Test/baseResults/hlsl.wavebroadcast.comp.out +++ b/Test/baseResults/hlsl.wavebroadcast.comp.out @@ -2331,7 +2331,7 @@ local_size = (32, 16, 1) MemberDecorate 20(Types) 3 Offset 64 Decorate 21 ArrayStride 96 MemberDecorate 22(data) 0 Offset 0 - Decorate 22(data) BufferBlock + Decorate 22(data) Block Decorate 24(data) DescriptorSet 0 Decorate 24(data) Binding 0 Decorate 388(dti) BuiltIn GlobalInvocationId @@ -2351,31 +2351,31 @@ local_size = (32, 16, 1) 20(Types): TypeStruct 13(ivec4) 15(ivec4) 17(fvec4) 19(f64vec4) 21: TypeRuntimeArray 20(Types) 22(data): TypeStruct 21 - 23: TypePointer Uniform 22(data) - 24(data): 23(ptr) Variable Uniform + 23: TypePointer StorageBuffer 22(data) + 24(data): 23(ptr) Variable StorageBuffer 25: 14(int) Constant 0 26: 6(int) Constant 0 27: TypePointer Function 6(int) - 32: TypePointer Uniform 13(ivec4) + 32: TypePointer StorageBuffer 13(ivec4) 35: 6(int) Constant 13 36: 6(int) Constant 3 - 43: TypePointer Uniform 6(int) + 43: TypePointer StorageBuffer 6(int) 52: TypeVector 6(int) 2 59: 6(int) Constant 1 74: 6(int) Constant 2 79: 14(int) Constant 1 - 82: TypePointer Uniform 15(ivec4) - 91: TypePointer Uniform 14(int) + 82: TypePointer StorageBuffer 15(ivec4) + 91: TypePointer StorageBuffer 14(int) 100: TypeVector 14(int) 2 113: TypeVector 14(int) 3 126: 14(int) Constant 2 - 129: TypePointer Uniform 17(fvec4) - 138: TypePointer Uniform 16(float) + 129: TypePointer StorageBuffer 17(fvec4) + 138: TypePointer StorageBuffer 16(float) 147: TypeVector 16(float) 2 160: TypeVector 16(float) 3 173: 14(int) Constant 3 - 176: TypePointer Uniform 19(f64vec4) - 185: TypePointer Uniform 18(float64_t) + 176: TypePointer StorageBuffer 19(f64vec4) + 185: TypePointer StorageBuffer 18(float64_t) 194: TypeVector 18(float64_t) 2 207: TypeVector 18(float64_t) 3 387: TypePointer Input 7(ivec3) diff --git a/Test/baseResults/hlsl.waveprefix.comp.out b/Test/baseResults/hlsl.waveprefix.comp.out index e2991bf6..ecc1b3eb 100755 --- a/Test/baseResults/hlsl.waveprefix.comp.out +++ b/Test/baseResults/hlsl.waveprefix.comp.out @@ -2355,7 +2355,7 @@ local_size = (32, 16, 1) MemberDecorate 20(Types) 3 Offset 64 Decorate 21 ArrayStride 96 MemberDecorate 22(data) 0 Offset 0 - Decorate 22(data) BufferBlock + Decorate 22(data) Block Decorate 24(data) DescriptorSet 0 Decorate 24(data) Binding 0 Decorate 398(dti) BuiltIn GlobalInvocationId @@ -2375,30 +2375,30 @@ local_size = (32, 16, 1) 20(Types): TypeStruct 13(ivec4) 15(ivec4) 17(fvec4) 19(f64vec4) 21: TypeRuntimeArray 20(Types) 22(data): TypeStruct 21 - 23: TypePointer Uniform 22(data) - 24(data): 23(ptr) Variable Uniform + 23: TypePointer StorageBuffer 22(data) + 24(data): 23(ptr) Variable StorageBuffer 25: 14(int) Constant 0 26: 6(int) Constant 0 27: TypePointer Function 6(int) - 32: TypePointer Uniform 13(ivec4) + 32: TypePointer StorageBuffer 13(ivec4) 35: 6(int) Constant 3 - 42: TypePointer Uniform 6(int) + 42: TypePointer StorageBuffer 6(int) 51: TypeVector 6(int) 2 58: 6(int) Constant 1 73: 6(int) Constant 2 78: 14(int) Constant 1 - 81: TypePointer Uniform 15(ivec4) - 90: TypePointer Uniform 14(int) + 81: TypePointer StorageBuffer 15(ivec4) + 90: TypePointer StorageBuffer 14(int) 99: TypeVector 14(int) 2 112: TypeVector 14(int) 3 125: 14(int) Constant 2 - 128: TypePointer Uniform 17(fvec4) - 137: TypePointer Uniform 16(float) + 128: TypePointer StorageBuffer 17(fvec4) + 137: TypePointer StorageBuffer 16(float) 146: TypeVector 16(float) 2 159: TypeVector 16(float) 3 172: 14(int) Constant 3 - 175: TypePointer Uniform 19(f64vec4) - 184: TypePointer Uniform 18(float64_t) + 175: TypePointer StorageBuffer 19(f64vec4) + 184: TypePointer StorageBuffer 18(float64_t) 193: TypeVector 18(float64_t) 2 206: TypeVector 18(float64_t) 3 391: TypeBool diff --git a/Test/baseResults/hlsl.wavequad.comp.out b/Test/baseResults/hlsl.wavequad.comp.out index 6d4ab5b7..7deb7c7e 100755 --- a/Test/baseResults/hlsl.wavequad.comp.out +++ b/Test/baseResults/hlsl.wavequad.comp.out @@ -8058,7 +8058,7 @@ local_size = (32, 16, 1) MemberDecorate 20(Types) 3 Offset 64 Decorate 21 ArrayStride 96 MemberDecorate 22(data) 0 Offset 0 - Decorate 22(data) BufferBlock + Decorate 22(data) Block Decorate 24(data) DescriptorSet 0 Decorate 24(data) Binding 0 Decorate 1227(dti) BuiltIn GlobalInvocationId @@ -8078,30 +8078,30 @@ local_size = (32, 16, 1) 20(Types): TypeStruct 13(ivec4) 15(ivec4) 17(fvec4) 19(f64vec4) 21: TypeRuntimeArray 20(Types) 22(data): TypeStruct 21 - 23: TypePointer Uniform 22(data) - 24(data): 23(ptr) Variable Uniform + 23: TypePointer StorageBuffer 22(data) + 24(data): 23(ptr) Variable StorageBuffer 25: 14(int) Constant 0 26: 6(int) Constant 0 27: TypePointer Function 6(int) - 32: TypePointer Uniform 13(ivec4) + 32: TypePointer StorageBuffer 13(ivec4) 35: 6(int) Constant 3 - 42: TypePointer Uniform 6(int) + 42: TypePointer StorageBuffer 6(int) 51: TypeVector 6(int) 2 58: 6(int) Constant 1 73: 6(int) Constant 2 78: 14(int) Constant 1 - 81: TypePointer Uniform 15(ivec4) - 90: TypePointer Uniform 14(int) + 81: TypePointer StorageBuffer 15(ivec4) + 90: TypePointer StorageBuffer 14(int) 99: TypeVector 14(int) 2 112: TypeVector 14(int) 3 125: 14(int) Constant 2 - 128: TypePointer Uniform 17(fvec4) - 137: TypePointer Uniform 16(float) + 128: TypePointer StorageBuffer 17(fvec4) + 137: TypePointer StorageBuffer 16(float) 146: TypeVector 16(float) 2 159: TypeVector 16(float) 3 172: 14(int) Constant 3 - 175: TypePointer Uniform 19(f64vec4) - 184: TypePointer Uniform 18(float64_t) + 175: TypePointer StorageBuffer 19(f64vec4) + 184: TypePointer StorageBuffer 18(float64_t) 193: TypeVector 18(float64_t) 2 206: TypeVector 18(float64_t) 3 1226: TypePointer Input 7(ivec3) diff --git a/Test/baseResults/hlsl.wavequery.comp.out b/Test/baseResults/hlsl.wavequery.comp.out index a380808c..8e08b09e 100755 --- a/Test/baseResults/hlsl.wavequery.comp.out +++ b/Test/baseResults/hlsl.wavequery.comp.out @@ -79,7 +79,7 @@ local_size = (32, 16, 1) Name 21 "@gl_SubgroupSize" Decorate 9 ArrayStride 4 MemberDecorate 10(data) 0 Offset 0 - Decorate 10(data) BufferBlock + Decorate 10(data) Block Decorate 12(data) DescriptorSet 0 Decorate 12(data) Binding 0 Decorate 16(@gl_SubgroupInvocationID) BuiltIn SubgroupLocalInvocationId @@ -89,8 +89,8 @@ local_size = (32, 16, 1) 8: TypeInt 32 0 9: TypeRuntimeArray 8(int) 10(data): TypeStruct 9 - 11: TypePointer Uniform 10(data) - 12(data): 11(ptr) Variable Uniform + 11: TypePointer StorageBuffer 10(data) + 12(data): 11(ptr) Variable StorageBuffer 13: TypeInt 32 1 14: 13(int) Constant 0 15: TypePointer Input 8(int) @@ -99,7 +99,7 @@ local_size = (32, 16, 1) 19: 8(int) Constant 3 21(@gl_SubgroupSize): 15(ptr) Variable Input 23: 8(int) Constant 0 - 25: TypePointer Uniform 8(int) + 25: TypePointer StorageBuffer 8(int) 4(CSMain): 2 Function None 3 5: Label 27: 2 FunctionCall 6(@CSMain() diff --git a/Test/baseResults/hlsl.wavereduction.comp.out b/Test/baseResults/hlsl.wavereduction.comp.out index a4393fe9..9a636f5a 100755 --- a/Test/baseResults/hlsl.wavereduction.comp.out +++ b/Test/baseResults/hlsl.wavereduction.comp.out @@ -6219,7 +6219,7 @@ local_size = (32, 16, 1) MemberDecorate 20(Types) 3 Offset 64 Decorate 21 ArrayStride 96 MemberDecorate 22(data) 0 Offset 0 - Decorate 22(data) BufferBlock + Decorate 22(data) Block Decorate 24(data) DescriptorSet 0 Decorate 24(data) Binding 0 Decorate 986(dti) BuiltIn GlobalInvocationId @@ -6239,30 +6239,30 @@ local_size = (32, 16, 1) 20(Types): TypeStruct 13(ivec4) 15(ivec4) 17(fvec4) 19(f64vec4) 21: TypeRuntimeArray 20(Types) 22(data): TypeStruct 21 - 23: TypePointer Uniform 22(data) - 24(data): 23(ptr) Variable Uniform + 23: TypePointer StorageBuffer 22(data) + 24(data): 23(ptr) Variable StorageBuffer 25: 14(int) Constant 0 26: 6(int) Constant 0 27: TypePointer Function 6(int) - 32: TypePointer Uniform 13(ivec4) + 32: TypePointer StorageBuffer 13(ivec4) 35: 6(int) Constant 3 - 42: TypePointer Uniform 6(int) + 42: TypePointer StorageBuffer 6(int) 51: TypeVector 6(int) 2 58: 6(int) Constant 1 73: 6(int) Constant 2 78: 14(int) Constant 1 - 81: TypePointer Uniform 15(ivec4) - 90: TypePointer Uniform 14(int) + 81: TypePointer StorageBuffer 15(ivec4) + 90: TypePointer StorageBuffer 14(int) 99: TypeVector 14(int) 2 112: TypeVector 14(int) 3 125: 14(int) Constant 2 - 128: TypePointer Uniform 17(fvec4) - 137: TypePointer Uniform 16(float) + 128: TypePointer StorageBuffer 17(fvec4) + 137: TypePointer StorageBuffer 16(float) 146: TypeVector 16(float) 2 159: TypeVector 16(float) 3 172: 14(int) Constant 3 - 175: TypePointer Uniform 19(f64vec4) - 184: TypePointer Uniform 18(float64_t) + 175: TypePointer StorageBuffer 19(f64vec4) + 184: TypePointer StorageBuffer 18(float64_t) 193: TypeVector 18(float64_t) 2 206: TypeVector 18(float64_t) 3 979: TypeBool diff --git a/Test/baseResults/hlsl.wavevote.comp.out b/Test/baseResults/hlsl.wavevote.comp.out index f9382b71..382f504f 100755 --- a/Test/baseResults/hlsl.wavevote.comp.out +++ b/Test/baseResults/hlsl.wavevote.comp.out @@ -228,7 +228,7 @@ local_size = (32, 16, 1) Name 72 "param" Decorate 14 ArrayStride 8 MemberDecorate 15(data) 0 Offset 0 - Decorate 15(data) BufferBlock + Decorate 15(data) Block Decorate 17(data) DescriptorSet 0 Decorate 17(data) Binding 0 Decorate 70(dti) BuiltIn GlobalInvocationId @@ -241,8 +241,8 @@ local_size = (32, 16, 1) 13: TypeInt 64 0 14: TypeRuntimeArray 13(int64_t) 15(data): TypeStruct 14 - 16: TypePointer Uniform 15(data) - 17(data): 16(ptr) Variable Uniform + 16: TypePointer StorageBuffer 15(data) + 17(data): 16(ptr) Variable StorageBuffer 18: TypeInt 32 1 19: 18(int) Constant 0 20: 6(int) Constant 0 @@ -251,7 +251,7 @@ local_size = (32, 16, 1) 28: 6(int) Constant 3 30: TypeVector 6(int) 4 32: TypeVector 13(int64_t) 4 - 35: TypePointer Uniform 13(int64_t) + 35: TypePointer StorageBuffer 13(int64_t) 37: 6(int) Constant 1 48: 6(int) Constant 2 69: TypePointer Input 7(ivec3) diff --git a/Test/baseResults/implicitArraySize.vert.out b/Test/baseResults/implicitArraySize.vert.out new file mode 100755 index 00000000..9a71b87b --- /dev/null +++ b/Test/baseResults/implicitArraySize.vert.out @@ -0,0 +1,115 @@ +implicitArraySize.vert +Shader version: 460 +0:? Sequence +0:5 Function Definition: main( ( global void) +0:5 Function Parameters: +0:6 Sequence +0:6 move second child to first child ( temp float) +0:6 direct index ( smooth temp float) +0:6 'a' ( smooth out unsized 1-element array of float) +0:6 Constant: +0:6 0 (const int) +0:6 Constant: +0:6 0.100000 +0:7 move second child to first child ( temp float) +0:7 direct index ( smooth temp float) +0:7 'c' ( smooth out unsized 6-element array of float) +0:7 Constant: +0:7 5 (const int) +0:7 Constant: +0:7 0.100000 +0:? Linker Objects +0:? 'a' ( smooth out unsized 1-element array of float) +0:? 'c' ( smooth out unsized 6-element array of float) +0:? 'gl_VertexID' ( gl_VertexId int VertexId) +0:? 'gl_InstanceID' ( gl_InstanceId int InstanceId) + +implicitArraySize.frag +Shader version: 460 +0:? Sequence +0:6 Function Definition: main( ( global void) +0:6 Function Parameters: +0:7 Sequence +0:7 move second child to first child ( temp float) +0:7 direct index ( temp float) +0:7 'b' ( out 5-element array of float) +0:7 Constant: +0:7 0 (const int) +0:7 direct index ( smooth temp float) +0:7 'a' ( smooth in unsized 2-element array of float) +0:7 Constant: +0:7 1 (const int) +0:8 move second child to first child ( temp float) +0:8 direct index ( temp float) +0:8 'b' ( out 5-element array of float) +0:8 Constant: +0:8 1 (const int) +0:8 direct index ( smooth temp float) +0:8 'c' ( smooth in 3-element array of float) +0:8 Constant: +0:8 1 (const int) +0:? Linker Objects +0:? 'a' ( smooth in unsized 2-element array of float) +0:? 'c' ( smooth in 3-element array of float) +0:? 'b' ( out 5-element array of float) + + +Linked vertex stage: + + +Linked fragment stage: + +ERROR: Linking vertex stage: Implicit size of unsized array doesn't match same symbol among multiple shaders. + +Shader version: 460 +0:? Sequence +0:5 Function Definition: main( ( global void) +0:5 Function Parameters: +0:6 Sequence +0:6 move second child to first child ( temp float) +0:6 direct index ( smooth temp float) +0:6 'a' ( smooth out 1-element array of float) +0:6 Constant: +0:6 0 (const int) +0:6 Constant: +0:6 0.100000 +0:7 move second child to first child ( temp float) +0:7 direct index ( smooth temp float) +0:7 'c' ( smooth out 6-element array of float) +0:7 Constant: +0:7 5 (const int) +0:7 Constant: +0:7 0.100000 +0:? Linker Objects +0:? 'a' ( smooth out 1-element array of float) +0:? 'c' ( smooth out 6-element array of float) +0:? 'gl_VertexID' ( gl_VertexId int VertexId) +0:? 'gl_InstanceID' ( gl_InstanceId int InstanceId) +Shader version: 460 +0:? Sequence +0:6 Function Definition: main( ( global void) +0:6 Function Parameters: +0:7 Sequence +0:7 move second child to first child ( temp float) +0:7 direct index ( temp float) +0:7 'b' ( out 5-element array of float) +0:7 Constant: +0:7 0 (const int) +0:7 direct index ( smooth temp float) +0:7 'a' ( smooth in 2-element array of float) +0:7 Constant: +0:7 1 (const int) +0:8 move second child to first child ( temp float) +0:8 direct index ( temp float) +0:8 'b' ( out 5-element array of float) +0:8 Constant: +0:8 1 (const int) +0:8 direct index ( smooth temp float) +0:8 'c' ( smooth in 3-element array of float) +0:8 Constant: +0:8 1 (const int) +0:? Linker Objects +0:? 'a' ( smooth in 2-element array of float) +0:? 'c' ( smooth in 3-element array of float) +0:? 'b' ( out 5-element array of float) + diff --git a/Test/baseResults/implicitArraySize1.geom.out b/Test/baseResults/implicitArraySize1.geom.out new file mode 100755 index 00000000..d9c2f8ba --- /dev/null +++ b/Test/baseResults/implicitArraySize1.geom.out @@ -0,0 +1,99 @@ +implicitArraySize1.geom +Shader version: 460 +invocations = -1 +max_vertices = 204 +input primitive = triangles +output primitive = line_strip +0:? Sequence +0:11 Function Definition: main( ( global void) +0:11 Function Parameters: +0:12 Sequence +0:12 Function Call: f( ( global void) +0:13 move second child to first child ( temp float) +0:13 direct index (layout( stream=0) temp float) +0:13 'o' (layout( stream=0) out 3-element array of float) +0:13 Constant: +0:13 1 (const int) +0:13 direct index ( temp float) +0:13 direct index ( temp 3-element array of float) +0:13 'g' ( in 3-element array of 3-element array of float) +0:13 Constant: +0:13 2 (const int) +0:13 Constant: +0:13 1 (const int) +0:? Linker Objects +0:? 'g' ( in 3-element array of 3-element array of float) +0:? 'o' (layout( stream=0) out 3-element array of float) + +implicitArraySize2.geom +Shader version: 460 +invocations = -1 +max_vertices = -1 +input primitive = none +output primitive = none +0:? Sequence +0:6 Function Definition: f( ( global void) +0:6 Function Parameters: +0:7 Sequence +0:7 move second child to first child ( temp float) +0:7 direct index (layout( stream=0) temp float) +0:7 'o' (layout( stream=0) out unsized 2-element array of float) +0:7 Constant: +0:7 1 (const int) +0:7 direct index ( temp float) +0:7 direct index ( temp 3-element array of float) +0:7 'g' ( in unsized 2-element array of 3-element array of float) +0:7 Constant: +0:7 1 (const int) +0:7 Constant: +0:7 1 (const int) +0:? Linker Objects +0:? 'g' ( in unsized 2-element array of 3-element array of float) +0:? 'o' (layout( stream=0) out unsized 2-element array of float) + + +Linked geometry stage: + +ERROR: Linking geometry stage: Not all array sizes match across all geometry shaders in the program + +Shader version: 460 +invocations = 1 +max_vertices = 204 +input primitive = triangles +output primitive = line_strip +0:? Sequence +0:11 Function Definition: main( ( global void) +0:11 Function Parameters: +0:12 Sequence +0:12 Function Call: f( ( global void) +0:13 move second child to first child ( temp float) +0:13 direct index (layout( stream=0) temp float) +0:13 'o' (layout( stream=0) out 3-element array of float) +0:13 Constant: +0:13 1 (const int) +0:13 direct index ( temp float) +0:13 direct index ( temp 3-element array of float) +0:13 'g' ( in 3-element array of 3-element array of float) +0:13 Constant: +0:13 2 (const int) +0:13 Constant: +0:13 1 (const int) +0:6 Function Definition: f( ( global void) +0:6 Function Parameters: +0:7 Sequence +0:7 move second child to first child ( temp float) +0:7 direct index (layout( stream=0) temp float) +0:7 'o' (layout( stream=0) out 2-element array of float) +0:7 Constant: +0:7 1 (const int) +0:7 direct index ( temp float) +0:7 direct index ( temp 3-element array of float) +0:7 'g' ( in 2-element array of 3-element array of float) +0:7 Constant: +0:7 1 (const int) +0:7 Constant: +0:7 1 (const int) +0:? Linker Objects +0:? 'g' ( in 3-element array of 3-element array of float) +0:? 'o' (layout( stream=0) out 3-element array of float) + diff --git a/Test/baseResults/implicitArraySizeBuiltin.vert.out b/Test/baseResults/implicitArraySizeBuiltin.vert.out new file mode 100755 index 00000000..77b41aa6 --- /dev/null +++ b/Test/baseResults/implicitArraySizeBuiltin.vert.out @@ -0,0 +1,176 @@ +implicitArraySizeBuiltin.vert +Shader version: 460 +0:? Sequence +0:3 Function Definition: f1(f1; ( global void) +0:3 Function Parameters: +0:3 'x' ( in float) +0:5 Sequence +0:5 move second child to first child ( temp float) +0:5 direct index ( temp float ClipDistance) +0:5 gl_ClipDistance: direct index for structure ( out unsized 7-element array of float ClipDistance) +0:5 'anon@0' ( out block{ gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out unsized 7-element array of float ClipDistance gl_ClipDistance, out unsized 2-element array of float CullDistance gl_CullDistance}) +0:5 Constant: +0:5 2 (const uint) +0:5 Constant: +0:5 6 (const int) +0:5 'x' ( in float) +0:6 move second child to first child ( temp float) +0:6 direct index ( temp float CullDistance) +0:6 gl_CullDistance: direct index for structure ( out unsized 2-element array of float CullDistance) +0:6 'anon@0' ( out block{ gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out unsized 7-element array of float ClipDistance gl_ClipDistance, out unsized 2-element array of float CullDistance gl_CullDistance}) +0:6 Constant: +0:6 3 (const uint) +0:6 Constant: +0:6 1 (const int) +0:6 'x' ( in float) +0:9 Function Definition: main( ( global void) +0:9 Function Parameters: +0:10 Sequence +0:10 Function Call: f1(f1; ( global void) +0:10 Constant: +0:10 0.100000 +0:? Linker Objects +0:? 'anon@0' ( out block{ gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out unsized 7-element array of float ClipDistance gl_ClipDistance, out unsized 2-element array of float CullDistance gl_CullDistance}) +0:? 'gl_VertexID' ( gl_VertexId int VertexId) +0:? 'gl_InstanceID' ( gl_InstanceId int InstanceId) + +implicitArraySizeBuiltin.geom +Shader version: 460 +invocations = -1 +max_vertices = 204 +input primitive = triangles +output primitive = line_strip +0:? Sequence +0:6 Function Definition: f2(f1; ( global void) +0:6 Function Parameters: +0:6 'x' ( in float) +0:8 Sequence +0:8 move second child to first child ( temp float) +0:8 direct index (layout( stream=0) temp float ClipDistance) +0:8 gl_ClipDistance: direct index for structure (layout( stream=0) out unsized 7-element array of float ClipDistance) +0:8 'anon@0' (layout( stream=0) out block{layout( stream=0) gl_Position 4-component vector of float Position gl_Position, layout( stream=0) gl_PointSize float PointSize gl_PointSize, layout( stream=0) out unsized 7-element array of float ClipDistance gl_ClipDistance, layout( stream=0) out unsized 2-element array of float CullDistance gl_CullDistance}) +0:8 Constant: +0:8 2 (const uint) +0:8 Constant: +0:8 6 (const int) +0:8 direct index ( temp float ClipDistance) +0:8 gl_ClipDistance: direct index for structure ( in unsized 7-element array of float ClipDistance) +0:8 direct index ( temp block{ in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in unsized 7-element array of float ClipDistance gl_ClipDistance, in unsized 2-element array of float CullDistance gl_CullDistance, in 4-component vector of float SecondaryPositionNV gl_SecondaryPositionNV, in unsized 1-element array of 4-component vector of float PositionPerViewNV gl_PositionPerViewNV}) +0:8 'gl_in' ( in 3-element array of block{ in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in unsized 7-element array of float ClipDistance gl_ClipDistance, in unsized 2-element array of float CullDistance gl_CullDistance, in 4-component vector of float SecondaryPositionNV gl_SecondaryPositionNV, in unsized 1-element array of 4-component vector of float PositionPerViewNV gl_PositionPerViewNV}) +0:8 Constant: +0:8 0 (const int) +0:8 Constant: +0:8 2 (const int) +0:8 Constant: +0:8 6 (const int) +0:10 Function Definition: f3(f1; ( global void) +0:10 Function Parameters: +0:10 'x' ( in float) +0:12 Sequence +0:12 move second child to first child ( temp float) +0:12 direct index (layout( stream=0) temp float CullDistance) +0:12 gl_CullDistance: direct index for structure (layout( stream=0) out unsized 2-element array of float CullDistance) +0:12 'anon@0' (layout( stream=0) out block{layout( stream=0) gl_Position 4-component vector of float Position gl_Position, layout( stream=0) gl_PointSize float PointSize gl_PointSize, layout( stream=0) out unsized 7-element array of float ClipDistance gl_ClipDistance, layout( stream=0) out unsized 2-element array of float CullDistance gl_CullDistance}) +0:12 Constant: +0:12 3 (const uint) +0:12 Constant: +0:12 1 (const int) +0:12 direct index ( temp float CullDistance) +0:12 gl_CullDistance: direct index for structure ( in unsized 2-element array of float CullDistance) +0:12 direct index ( temp block{ in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in unsized 7-element array of float ClipDistance gl_ClipDistance, in unsized 2-element array of float CullDistance gl_CullDistance, in 4-component vector of float SecondaryPositionNV gl_SecondaryPositionNV, in unsized 1-element array of 4-component vector of float PositionPerViewNV gl_PositionPerViewNV}) +0:12 'gl_in' ( in 3-element array of block{ in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in unsized 7-element array of float ClipDistance gl_ClipDistance, in unsized 2-element array of float CullDistance gl_CullDistance, in 4-component vector of float SecondaryPositionNV gl_SecondaryPositionNV, in unsized 1-element array of 4-component vector of float PositionPerViewNV gl_PositionPerViewNV}) +0:12 Constant: +0:12 0 (const int) +0:12 Constant: +0:12 3 (const int) +0:12 Constant: +0:12 1 (const int) +0:15 Function Definition: main( ( global void) +0:15 Function Parameters: +0:19 Sequence +0:19 Function Call: f3(f1; ( global void) +0:19 Constant: +0:19 0.100000 +0:? Linker Objects +0:? 'anon@0' (layout( stream=0) out block{layout( stream=0) gl_Position 4-component vector of float Position gl_Position, layout( stream=0) gl_PointSize float PointSize gl_PointSize, layout( stream=0) out unsized 7-element array of float ClipDistance gl_ClipDistance, layout( stream=0) out unsized 2-element array of float CullDistance gl_CullDistance}) +0:? 'gl_in' ( in 3-element array of block{ in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in unsized 7-element array of float ClipDistance gl_ClipDistance, in unsized 2-element array of float CullDistance gl_CullDistance, in 4-component vector of float SecondaryPositionNV gl_SecondaryPositionNV, in unsized 1-element array of 4-component vector of float PositionPerViewNV gl_PositionPerViewNV}) + + +Linked vertex stage: + + +Linked geometry stage: + + +Shader version: 460 +0:? Sequence +0:3 Function Definition: f1(f1; ( global void) +0:3 Function Parameters: +0:3 'x' ( in float) +0:5 Sequence +0:5 move second child to first child ( temp float) +0:5 direct index ( temp float ClipDistance) +0:5 gl_ClipDistance: direct index for structure ( out 7-element array of float ClipDistance) +0:5 'anon@0' ( out block{ gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 7-element array of float ClipDistance gl_ClipDistance, out 2-element array of float CullDistance gl_CullDistance}) +0:5 Constant: +0:5 2 (const uint) +0:5 Constant: +0:5 6 (const int) +0:5 'x' ( in float) +0:6 move second child to first child ( temp float) +0:6 direct index ( temp float CullDistance) +0:6 gl_CullDistance: direct index for structure ( out 2-element array of float CullDistance) +0:6 'anon@0' ( out block{ gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 7-element array of float ClipDistance gl_ClipDistance, out 2-element array of float CullDistance gl_CullDistance}) +0:6 Constant: +0:6 3 (const uint) +0:6 Constant: +0:6 1 (const int) +0:6 'x' ( in float) +0:9 Function Definition: main( ( global void) +0:9 Function Parameters: +0:10 Sequence +0:10 Function Call: f1(f1; ( global void) +0:10 Constant: +0:10 0.100000 +0:? Linker Objects +0:? 'anon@0' ( out block{ gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 7-element array of float ClipDistance gl_ClipDistance, out 2-element array of float CullDistance gl_CullDistance}) +0:? 'gl_VertexID' ( gl_VertexId int VertexId) +0:? 'gl_InstanceID' ( gl_InstanceId int InstanceId) +Shader version: 460 +invocations = 1 +max_vertices = 204 +input primitive = triangles +output primitive = line_strip +0:? Sequence +0:10 Function Definition: f3(f1; ( global void) +0:10 Function Parameters: +0:10 'x' ( in float) +0:12 Sequence +0:12 move second child to first child ( temp float) +0:12 direct index (layout( stream=0) temp float CullDistance) +0:12 gl_CullDistance: direct index for structure (layout( stream=0) out 2-element array of float CullDistance) +0:12 'anon@0' (layout( stream=0) out block{layout( stream=0) gl_Position 4-component vector of float Position gl_Position, layout( stream=0) gl_PointSize float PointSize gl_PointSize, layout( stream=0) out 7-element array of float ClipDistance gl_ClipDistance, layout( stream=0) out 2-element array of float CullDistance gl_CullDistance}) +0:12 Constant: +0:12 3 (const uint) +0:12 Constant: +0:12 1 (const int) +0:12 direct index ( temp float CullDistance) +0:12 gl_CullDistance: direct index for structure ( in 2-element array of float CullDistance) +0:12 direct index ( temp block{ in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in 7-element array of float ClipDistance gl_ClipDistance, in 2-element array of float CullDistance gl_CullDistance, in 4-component vector of float SecondaryPositionNV gl_SecondaryPositionNV, in 1-element array of 4-component vector of float PositionPerViewNV gl_PositionPerViewNV}) +0:12 'gl_in' ( in 3-element array of block{ in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in 7-element array of float ClipDistance gl_ClipDistance, in 2-element array of float CullDistance gl_CullDistance, in 4-component vector of float SecondaryPositionNV gl_SecondaryPositionNV, in 1-element array of 4-component vector of float PositionPerViewNV gl_PositionPerViewNV}) +0:12 Constant: +0:12 0 (const int) +0:12 Constant: +0:12 3 (const int) +0:12 Constant: +0:12 1 (const int) +0:15 Function Definition: main( ( global void) +0:15 Function Parameters: +0:19 Sequence +0:19 Function Call: f3(f1; ( global void) +0:19 Constant: +0:19 0.100000 +0:? Linker Objects +0:? 'anon@0' (layout( stream=0) out block{layout( stream=0) gl_Position 4-component vector of float Position gl_Position, layout( stream=0) gl_PointSize float PointSize gl_PointSize, layout( stream=0) out 7-element array of float ClipDistance gl_ClipDistance, layout( stream=0) out 2-element array of float CullDistance gl_CullDistance}) +0:? 'gl_in' ( in 3-element array of block{ in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in 7-element array of float ClipDistance gl_ClipDistance, in 2-element array of float CullDistance gl_CullDistance, in 4-component vector of float SecondaryPositionNV gl_SecondaryPositionNV, in 1-element array of 4-component vector of float PositionPerViewNV gl_PositionPerViewNV}) + diff --git a/Test/baseResults/overflow_underflow_toinf_0.frag.out b/Test/baseResults/overflow_underflow_toinf_0.frag.out new file mode 100755 index 00000000..621d1978 --- /dev/null +++ b/Test/baseResults/overflow_underflow_toinf_0.frag.out @@ -0,0 +1,75 @@ +overflow_underflow_toinf_0.frag +Shader version: 320 +0:? Sequence +0:4 Function Definition: main( ( global void) +0:4 Function Parameters: +0:9 Sequence +0:9 Sequence +0:9 move second child to first child ( temp highp float) +0:9 'correct' ( temp highp float) +0:9 Constant: +0:9 1.000000 +0:10 Sequence +0:10 move second child to first child ( temp highp float) +0:10 'correct1' ( temp highp float) +0:10 Constant: +0:10 1.000000 +0:11 Sequence +0:11 move second child to first child ( temp highp 4-component vector of float) +0:11 'foo' ( temp highp 4-component vector of float) +0:11 Constant: +0:11 0.000000 +0:11 -0.000000 +0:11 +1.#INF +0:11 -1.#INF +0:12 move second child to first child ( temp highp 4-component vector of float) +0:12 'my_FragColor' ( out highp 4-component vector of float) +0:12 Construct vec4 ( temp highp 4-component vector of float) +0:12 Constant: +0:12 0.000000 +0:12 'correct' ( temp highp float) +0:12 'correct1' ( temp highp float) +0:12 Constant: +0:12 1.000000 +0:? Linker Objects +0:? 'my_FragColor' ( out highp 4-component vector of float) + + +Linked fragment stage: + + +Shader version: 320 +0:? Sequence +0:4 Function Definition: main( ( global void) +0:4 Function Parameters: +0:9 Sequence +0:9 Sequence +0:9 move second child to first child ( temp highp float) +0:9 'correct' ( temp highp float) +0:9 Constant: +0:9 1.000000 +0:10 Sequence +0:10 move second child to first child ( temp highp float) +0:10 'correct1' ( temp highp float) +0:10 Constant: +0:10 1.000000 +0:11 Sequence +0:11 move second child to first child ( temp highp 4-component vector of float) +0:11 'foo' ( temp highp 4-component vector of float) +0:11 Constant: +0:11 0.000000 +0:11 -0.000000 +0:11 +1.#INF +0:11 -1.#INF +0:12 move second child to first child ( temp highp 4-component vector of float) +0:12 'my_FragColor' ( out highp 4-component vector of float) +0:12 Construct vec4 ( temp highp 4-component vector of float) +0:12 Constant: +0:12 0.000000 +0:12 'correct' ( temp highp float) +0:12 'correct1' ( temp highp float) +0:12 Constant: +0:12 1.000000 +0:? Linker Objects +0:? 'my_FragColor' ( out highp 4-component vector of float) + diff --git a/Test/baseResults/preprocessor.edge_cases.vert.out b/Test/baseResults/preprocessor.edge_cases.vert.out index 17d9049b..6a4ad4a7 100755 --- a/Test/baseResults/preprocessor.edge_cases.vert.out +++ b/Test/baseResults/preprocessor.edge_cases.vert.out @@ -10,7 +10,7 @@ -void main(){ +void main() { gl_Position = vec4(3 + 2 + 2 * 4 + 2 + 3 * 2); } diff --git a/Test/baseResults/preprocessor.extensions.vert.out b/Test/baseResults/preprocessor.extensions.vert.out index 57d2e199..59c6e856 100755 --- a/Test/baseResults/preprocessor.extensions.vert.out +++ b/Test/baseResults/preprocessor.extensions.vert.out @@ -7,6 +7,6 @@ #extension unknown_extension : require -int main(){ +int main() { } diff --git a/Test/baseResults/preprocessor.function_macro.vert.out b/Test/baseResults/preprocessor.function_macro.vert.out index 1280ddf6..84b0a872 100755 --- a/Test/baseResults/preprocessor.function_macro.vert.out +++ b/Test/baseResults/preprocessor.function_macro.vert.out @@ -13,9 +13,12 @@ -int main(){ + + +int main() { gl_Position = vec4(3 + 1, 3 + 4, 3 + 1); gl_Position = vec4(1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12); gl_Position = vec4(4 + 3 + 3); + gl_Position = 4 + 3 + F.a; } diff --git a/Test/baseResults/preprocessor.line.frag.out b/Test/baseResults/preprocessor.line.frag.out index 3e2206f8..76877943 100755 --- a/Test/baseResults/preprocessor.line.frag.out +++ b/Test/baseResults/preprocessor.line.frag.out @@ -1,5 +1,5 @@ #version 310 es #line 1 2 #pragma something -void main(){ } +void main() { } diff --git a/Test/baseResults/preprocessor.line.vert.out b/Test/baseResults/preprocessor.line.vert.out index 2bf09032..fbd851cb 100755 --- a/Test/baseResults/preprocessor.line.vert.out +++ b/Test/baseResults/preprocessor.line.vert.out @@ -23,7 +23,7 @@ #line 8 -void main(){ +void main() { gl_Position = vec4(10); } diff --git a/Test/baseResults/preprocessor.pragma.vert.out b/Test/baseResults/preprocessor.pragma.vert.out index ebe1e4a7..8fa3d338 100755 --- a/Test/baseResults/preprocessor.pragma.vert.out +++ b/Test/baseResults/preprocessor.pragma.vert.out @@ -9,6 +9,6 @@ #pragma once -int main(){ +int main() { } diff --git a/Test/baseResults/preprocessor.simple.vert.out b/Test/baseResults/preprocessor.simple.vert.out index 57b020c6..b54e0a00 100755 --- a/Test/baseResults/preprocessor.simple.vert.out +++ b/Test/baseResults/preprocessor.simple.vert.out @@ -11,15 +11,15 @@ - float fn(float x){ return x + 4.0;} + float fn(float x) { return x + 4.0; } -int main(){ +int main() { gl_Position = vec4(1); gl_Position = clamp(1, 2, 3); gl_Position = vec4(1); gl_Position = vec4(1, 2); gl_Position = vec4(fn(3)); - []. ++ -- + [].++ -- + - * % / - ! ~ << >> < > <= >= == != @@ -46,16 +46,21 @@ struct S { +void bar(int x) { } + void foo() { S s; - s . member2 + s . member1; - s . member3 . zyx; - s . member2 . xxyz; - s . member2 . yyz; - s . member2 . xxyz(); - s . member2 . yzy; - vec3 a = vec3(0);vec3 b = a . zxyz;vec3 b = a . xxyz;vec3 b = a . yyz;vec3 b = a . xxyz();vec3 b = a . yzy;vec3 b = a . z; + s.member2 + s.member1; + s.member3.zyx; + s.member2.xxyz; + s.member2.yyz; + s.member2.xxyz(); + s.member2.yzy; + for (int i = 0; i < 100; i = i + 1) { + bar(i) + } + vec3 a = vec3(0); vec3 b = a.zxyz; vec3 b = a.xxyz; vec3 b = a.yyz; vec3 b = a.xxyz(); vec3 b = a.yzy; vec3 b = a.z; yyz; diff --git a/Test/baseResults/preprocessor.success_if_parse_would_fail.vert.out b/Test/baseResults/preprocessor.success_if_parse_would_fail.vert.out index 624813a0..ed1ad0c0 100755 --- a/Test/baseResults/preprocessor.success_if_parse_would_fail.vert.out +++ b/Test/baseResults/preprocessor.success_if_parse_would_fail.vert.out @@ -1,4 +1,4 @@ -int x(){ +int x() { something that shouldnt compile; } diff --git a/Test/baseResults/rayQuery-allOps.comp.out b/Test/baseResults/rayQuery-allOps.comp.out index 05936bb2..a84d9196 100755 --- a/Test/baseResults/rayQuery-allOps.comp.out +++ b/Test/baseResults/rayQuery-allOps.comp.out @@ -1,12 +1,14 @@ rayQuery-allOps.comp // Module Version 10000 // Generated by (magic number): 8000b -// Id's are bound by 258 +// Id's are bound by 275 Capability Shader Capability RayQueryKHR Capability RayTraversalPrimitiveCullingKHR + Capability RayQueryPositionFetchKHR Extension "SPV_KHR_ray_query" + Extension "SPV_KHR_ray_tracing_position_fetch" 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 EntryPoint GLCompute 4 "main" @@ -14,6 +16,7 @@ rayQuery-allOps.comp Source GLSL 460 SourceExtension "GL_EXT_ray_flags_primitive_culling" SourceExtension "GL_EXT_ray_query" + SourceExtension "GL_EXT_ray_tracing_position_fetch" Name 4 "main" Name 6 "doSomething(" Name 10 "Ray" @@ -35,16 +38,17 @@ rayQuery-allOps.comp Name 83 "_mat3x4" Name 143 "t" Name 156 "committedStatus" - Name 241 "o" - Name 243 "d" - Name 253 "Ray" - MemberName 253(Ray) 0 "pos" - MemberName 253(Ray) 1 "tmin" - MemberName 253(Ray) 2 "dir" - MemberName 253(Ray) 3 "tmax" - Name 255 "Rays" - MemberName 255(Rays) 0 "rays" - Name 257 "" + Name 184 "positions" + Name 258 "o" + Name 260 "d" + Name 270 "Ray" + MemberName 270(Ray) 0 "pos" + MemberName 270(Ray) 1 "tmin" + MemberName 270(Ray) 2 "dir" + MemberName 270(Ray) 3 "tmax" + Name 272 "Rays" + MemberName 272(Rays) 0 "rays" + Name 274 "" MemberDecorate 15(Log) 0 Offset 0 MemberDecorate 15(Log) 1 Offset 4 Decorate 15(Log) BufferBlock @@ -52,15 +56,15 @@ rayQuery-allOps.comp Decorate 17 Binding 0 Decorate 50(rtas) DescriptorSet 0 Decorate 50(rtas) Binding 1 - MemberDecorate 253(Ray) 0 Offset 0 - MemberDecorate 253(Ray) 1 Offset 12 - MemberDecorate 253(Ray) 2 Offset 16 - MemberDecorate 253(Ray) 3 Offset 28 - Decorate 254 ArrayStride 32 - MemberDecorate 255(Rays) 0 Offset 0 - Decorate 255(Rays) BufferBlock - Decorate 257 DescriptorSet 0 - Decorate 257 Binding 2 + MemberDecorate 270(Ray) 0 Offset 0 + MemberDecorate 270(Ray) 1 Offset 12 + MemberDecorate 270(Ray) 2 Offset 16 + MemberDecorate 270(Ray) 3 Offset 28 + Decorate 271 ArrayStride 32 + MemberDecorate 272(Rays) 0 Offset 0 + Decorate 272(Rays) BufferBlock + Decorate 274 DescriptorSet 0 + Decorate 274 Binding 2 2: TypeVoid 3: TypeFunction 2 8: TypeFloat 32 @@ -105,13 +109,16 @@ rayQuery-allOps.comp 91: TypeVector 8(float) 2 144: 8(float) Constant 1056964608 175: 14(int) Constant 1 - 198: 14(int) Constant 2 - 231: 14(int) Constant 256 - 253(Ray): TypeStruct 9(fvec3) 8(float) 9(fvec3) 8(float) - 254: TypeRuntimeArray 253(Ray) - 255(Rays): TypeStruct 254 - 256: TypePointer Uniform 255(Rays) - 257: 256(ptr) Variable Uniform + 181: 14(int) Constant 3 + 182: TypeArray 9(fvec3) 181 + 183: TypePointer Function 182 + 215: 14(int) Constant 2 + 248: 14(int) Constant 256 + 270(Ray): TypeStruct 9(fvec3) 8(float) 9(fvec3) 8(float) + 271: TypeRuntimeArray 270(Ray) + 272(Rays): TypeStruct 271 + 273: TypePointer Uniform 272(Rays) + 274: 273(ptr) Variable Uniform 4(main): 2 Function None 3 5: Label 43(ray): 25(ptr) Variable Function @@ -120,8 +127,9 @@ rayQuery-allOps.comp 83(_mat3x4): 82(ptr) Variable Function 143(t): 35(ptr) Variable Function 156(committedStatus): 68(ptr) Variable Function - 241(o): 29(ptr) Variable Function - 243(d): 29(ptr) Variable Function + 184(positions): 183(ptr) Variable Function + 258(o): 29(ptr) Variable Function + 260(d): 29(ptr) Variable Function 44: 10(Ray) FunctionCall 12(makeRayDesc() Store 43(ray) 44 51: 48 Load 50(rtas) @@ -303,110 +311,130 @@ rayQuery-allOps.comp 180: 2 FunctionCall 6(doSomething() Branch 179 179: Label - Branch 162 - 161: Label - 182: 18(int) RayQueryGetIntersectionGeometryIndexKHR 47(rayQuery) 23 - 183: 66(bool) SGreaterThan 182 19 - SelectionMerge 185 None - BranchConditional 183 184 185 - 184: Label - 186: 2 FunctionCall 6(doSomething() - Branch 185 - 185: Label - 187: 18(int) RayQueryGetIntersectionInstanceIdKHR 47(rayQuery) 23 - 188: 66(bool) SGreaterThan 187 19 + 185: 182 RayQueryGetIntersectionTriangleVertexPositionsKHR 47(rayQuery) 23 + Store 184(positions) 185 + 186: 35(ptr) AccessChain 184(positions) 19 20 + 187: 8(float) Load 186 + 188: 66(bool) FOrdLessThan 187 27 SelectionMerge 190 None BranchConditional 188 189 190 189: Label - 191: 2 FunctionCall 6(doSomething() + 191: 35(ptr) AccessChain 184(positions) 31 175 + 192: 8(float) Load 191 + 193: 66(bool) FOrdGreaterThan 192 27 Branch 190 190: Label - 192: 18(int) RayQueryGetIntersectionInstanceCustomIndexKHR 47(rayQuery) 23 - 193: 66(bool) SGreaterThan 192 19 - SelectionMerge 195 None - BranchConditional 193 194 195 - 194: Label - 196: 2 FunctionCall 6(doSomething() - Branch 195 - 195: Label - 197: 9(fvec3) RayQueryGetIntersectionObjectRayDirectionKHR 47(rayQuery) 23 - 199: 8(float) CompositeExtract 197 2 - 200: 66(bool) FOrdGreaterThan 199 27 + 194: 66(bool) Phi 188 179 193 189 + SelectionMerge 196 None + BranchConditional 194 195 196 + 195: Label + 197: 2 FunctionCall 6(doSomething() + Branch 196 + 196: Label + Branch 162 + 161: Label + 199: 18(int) RayQueryGetIntersectionGeometryIndexKHR 47(rayQuery) 23 + 200: 66(bool) SGreaterThan 199 19 SelectionMerge 202 None BranchConditional 200 201 202 201: Label 203: 2 FunctionCall 6(doSomething() Branch 202 202: Label - 204: 9(fvec3) RayQueryGetIntersectionObjectRayOriginKHR 47(rayQuery) 23 - 205: 8(float) CompositeExtract 204 0 - 206: 66(bool) FOrdGreaterThan 205 27 - SelectionMerge 208 None - BranchConditional 206 207 208 - 207: Label - 209: 2 FunctionCall 6(doSomething() - Branch 208 - 208: Label - 210: 18(int) RayQueryGetIntersectionPrimitiveIndexKHR 47(rayQuery) 23 - 211: 66(bool) SGreaterThan 210 19 - SelectionMerge 213 None - BranchConditional 211 212 213 - 212: Label - 214: 2 FunctionCall 6(doSomething() - Branch 213 - 213: Label - 215: 8(float) RayQueryGetIntersectionTKHR 47(rayQuery) 23 - 216: 66(bool) FOrdGreaterThan 215 27 - SelectionMerge 218 None - BranchConditional 216 217 218 - 217: Label - 219: 2 FunctionCall 6(doSomething() - Branch 218 - 218: Label + 204: 18(int) RayQueryGetIntersectionInstanceIdKHR 47(rayQuery) 23 + 205: 66(bool) SGreaterThan 204 19 + SelectionMerge 207 None + BranchConditional 205 206 207 + 206: Label + 208: 2 FunctionCall 6(doSomething() + Branch 207 + 207: Label + 209: 18(int) RayQueryGetIntersectionInstanceCustomIndexKHR 47(rayQuery) 23 + 210: 66(bool) SGreaterThan 209 19 + SelectionMerge 212 None + BranchConditional 210 211 212 + 211: Label + 213: 2 FunctionCall 6(doSomething() + Branch 212 + 212: Label + 214: 9(fvec3) RayQueryGetIntersectionObjectRayDirectionKHR 47(rayQuery) 23 + 216: 8(float) CompositeExtract 214 2 + 217: 66(bool) FOrdGreaterThan 216 27 + SelectionMerge 219 None + BranchConditional 217 218 219 + 218: Label + 220: 2 FunctionCall 6(doSomething() + Branch 219 + 219: Label + 221: 9(fvec3) RayQueryGetIntersectionObjectRayOriginKHR 47(rayQuery) 23 + 222: 8(float) CompositeExtract 221 0 + 223: 66(bool) FOrdGreaterThan 222 27 + SelectionMerge 225 None + BranchConditional 223 224 225 + 224: Label + 226: 2 FunctionCall 6(doSomething() + Branch 225 + 225: Label + 227: 18(int) RayQueryGetIntersectionPrimitiveIndexKHR 47(rayQuery) 23 + 228: 66(bool) SGreaterThan 227 19 + SelectionMerge 230 None + BranchConditional 228 229 230 + 229: Label + 231: 2 FunctionCall 6(doSomething() + Branch 230 + 230: Label + 232: 8(float) RayQueryGetIntersectionTKHR 47(rayQuery) 23 + 233: 66(bool) FOrdGreaterThan 232 27 + SelectionMerge 235 None + BranchConditional 233 234 235 + 234: Label + 236: 2 FunctionCall 6(doSomething() + Branch 235 + 235: Label Branch 162 162: Label - 222: 35(ptr) AccessChain 83(_mat3x4) 19 20 - 223: 8(float) Load 222 - 224: 35(ptr) AccessChain 78(_mat4x3) 19 20 - 225: 8(float) Load 224 - 226: 66(bool) FOrdEqual 223 225 - SelectionMerge 228 None - BranchConditional 226 227 228 - 227: Label - 229: 2 FunctionCall 6(doSomething() - Branch 228 - 228: Label - 230: 14(int) RayQueryGetRayFlagsKHR 47(rayQuery) - 232: 66(bool) UGreaterThan 230 231 - SelectionMerge 234 None - BranchConditional 232 233 234 - 233: Label - 235: 2 FunctionCall 6(doSomething() - Branch 234 - 234: Label - 236: 8(float) RayQueryGetRayTMinKHR 47(rayQuery) - 237: 66(bool) FOrdGreaterThan 236 27 - SelectionMerge 239 None - BranchConditional 237 238 239 - 238: Label - 240: 2 FunctionCall 6(doSomething() - Branch 239 - 239: Label - 242: 9(fvec3) RayQueryGetWorldRayOriginKHR 47(rayQuery) - Store 241(o) 242 - 244: 9(fvec3) RayQueryGetWorldRayDirectionKHR 47(rayQuery) - Store 243(d) 244 - 245: 35(ptr) AccessChain 241(o) 20 - 246: 8(float) Load 245 - 247: 35(ptr) AccessChain 243(d) 198 - 248: 8(float) Load 247 - 249: 66(bool) FOrdEqual 246 248 + 239: 35(ptr) AccessChain 83(_mat3x4) 19 20 + 240: 8(float) Load 239 + 241: 35(ptr) AccessChain 78(_mat4x3) 19 20 + 242: 8(float) Load 241 + 243: 66(bool) FOrdEqual 240 242 + SelectionMerge 245 None + BranchConditional 243 244 245 + 244: Label + 246: 2 FunctionCall 6(doSomething() + Branch 245 + 245: Label + 247: 14(int) RayQueryGetRayFlagsKHR 47(rayQuery) + 249: 66(bool) UGreaterThan 247 248 SelectionMerge 251 None BranchConditional 249 250 251 250: Label 252: 2 FunctionCall 6(doSomething() Branch 251 251: Label + 253: 8(float) RayQueryGetRayTMinKHR 47(rayQuery) + 254: 66(bool) FOrdGreaterThan 253 27 + SelectionMerge 256 None + BranchConditional 254 255 256 + 255: Label + 257: 2 FunctionCall 6(doSomething() + Branch 256 + 256: Label + 259: 9(fvec3) RayQueryGetWorldRayOriginKHR 47(rayQuery) + Store 258(o) 259 + 261: 9(fvec3) RayQueryGetWorldRayDirectionKHR 47(rayQuery) + Store 260(d) 261 + 262: 35(ptr) AccessChain 258(o) 20 + 263: 8(float) Load 262 + 264: 35(ptr) AccessChain 260(d) 215 + 265: 8(float) Load 264 + 266: 66(bool) FOrdEqual 263 265 + SelectionMerge 268 None + BranchConditional 266 267 268 + 267: Label + 269: 2 FunctionCall 6(doSomething() + Branch 268 + 268: Label Return FunctionEnd 6(doSomething(): 2 Function None 3 diff --git a/Test/baseResults/size b/Test/baseResults/size index a7b99b96..747b1e71 100755 --- a/Test/baseResults/size +++ b/Test/baseResults/size @@ -1 +1 @@ -399360 ../build/install/bin/glslangValidator.exe +399360 ../build/install/bin/glslang.exe diff --git a/Test/baseResults/spv.460.subgroupEXT.mesh.out b/Test/baseResults/spv.460.subgroupEXT.mesh.out index dd3de814..f41895fd 100755 --- a/Test/baseResults/spv.460.subgroupEXT.mesh.out +++ b/Test/baseResults/spv.460.subgroupEXT.mesh.out @@ -13,10 +13,8 @@ spv.460.subgroupEXT.mesh Capability GroupNonUniformShuffleRelative Capability GroupNonUniformClustered Capability GroupNonUniformQuad - Capability FragmentShadingRateKHR Capability MeshShadingEXT Extension "SPV_EXT_mesh_shader" - Extension "SPV_KHR_fragment_shading_rate" 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 EntryPoint MeshEXT 4 "main" 35 41 57 109 147 161 162 167 168 171 172 173 174 175 @@ -65,7 +63,6 @@ spv.460.subgroupEXT.mesh MemberName 106(gl_MeshPerPrimitiveEXT) 1 "gl_Layer" MemberName 106(gl_MeshPerPrimitiveEXT) 2 "gl_ViewportIndex" MemberName 106(gl_MeshPerPrimitiveEXT) 3 "gl_CullPrimitiveEXT" - MemberName 106(gl_MeshPerPrimitiveEXT) 4 "gl_PrimitiveShadingRateEXT" Name 109 "gl_MeshPrimitivesEXT" Name 147 "gl_PrimitiveTriangleIndicesEXT" Name 161 "gl_SubgroupSize" @@ -95,8 +92,6 @@ spv.460.subgroupEXT.mesh MemberDecorate 106(gl_MeshPerPrimitiveEXT) 2 BuiltIn ViewportIndex MemberDecorate 106(gl_MeshPerPrimitiveEXT) 3 PerPrimitiveNV MemberDecorate 106(gl_MeshPerPrimitiveEXT) 3 BuiltIn CullPrimitiveEXT - MemberDecorate 106(gl_MeshPerPrimitiveEXT) 4 PerPrimitiveNV - MemberDecorate 106(gl_MeshPerPrimitiveEXT) 4 BuiltIn PrimitiveShadingRateKHR Decorate 106(gl_MeshPerPrimitiveEXT) Block Decorate 147(gl_PrimitiveTriangleIndicesEXT) BuiltIn PrimitiveTriangleIndicesEXT Decorate 161(gl_SubgroupSize) RelaxedPrecision @@ -151,7 +146,7 @@ spv.460.subgroupEXT.mesh 79: 30(int) Constant 264 80: 30(int) Constant 2 105: TypeBool -106(gl_MeshPerPrimitiveEXT): TypeStruct 59(int) 59(int) 59(int) 105(bool) 59(int) +106(gl_MeshPerPrimitiveEXT): TypeStruct 59(int) 59(int) 59(int) 105(bool) 107: TypeArray 106(gl_MeshPerPrimitiveEXT) 47 108: TypePointer Output 107 109(gl_MeshPrimitivesEXT): 108(ptr) Variable Output diff --git a/Test/baseResults/spv.atomicRvalue.error.vert.out b/Test/baseResults/spv.atomicRvalue.error.vert.out new file mode 100755 index 00000000..a340141e --- /dev/null +++ b/Test/baseResults/spv.atomicRvalue.error.vert.out @@ -0,0 +1,9 @@ +spv.atomicRvalue.error.vert +ERROR: 0:5: 'assign' : l-value required +ERROR: 0:5: 'out' : Non-L-value cannot be passed for 'out' or 'inout' parameters. +ERROR: 0:5: 'atomicAdd' : Only l-values corresponding to shader block storage or shared variables can be used with atomic memory functions. +ERROR: 0:6: 'atomicAdd' : Only l-values corresponding to shader block storage or shared variables can be used with atomic memory functions. +ERROR: 4 compilation errors. No code generated. + + +SPIR-V is not generated for failed compile or link diff --git a/Test/baseResults/spv.bufferhandle8.frag.out b/Test/baseResults/spv.bufferhandle8.frag.out index 49601449..52eec110 100755 --- a/Test/baseResults/spv.bufferhandle8.frag.out +++ b/Test/baseResults/spv.bufferhandle8.frag.out @@ -1,7 +1,7 @@ spv.bufferhandle8.frag // Module Version 10000 // Generated by (magic number): 8000b -// Id's are bound by 27 +// Id's are bound by 39 Capability Shader Capability PhysicalStorageBufferAddressesEXT @@ -21,41 +21,46 @@ spv.bufferhandle8.frag MemberName 10(T1) 0 "x" Name 11 "T2" MemberName 11(T2) 0 "x" - Name 13 "T3" - MemberName 13(T3) 0 "Bindings" - Name 15 "t3" - Name 23 "t2" - MemberName 23(t2) 0 "f" - MemberName 23(t2) 1 "g" - Name 24 "blockType" - MemberName 24(blockType) 0 "a" - MemberName 24(blockType) 1 "b" - MemberName 24(blockType) 2 "c" - MemberName 24(blockType) 3 "d" - MemberName 24(blockType) 4 "e" - Name 26 "t" - MemberDecorate 8(Blah) 0 Offset 0 - MemberDecorate 8(Blah) 1 Offset 8 + Name 13 "x" + Name 14 "Blah" + MemberName 14(Blah) 0 "t1" + MemberName 14(Blah) 1 "t2" + Name 16 "T3" + MemberName 16(T3) 0 "Bindings" + Name 18 "t3" + Name 35 "t2" + MemberName 35(t2) 0 "f" + MemberName 35(t2) 1 "g" + Name 36 "blockType" + MemberName 36(blockType) 0 "a" + MemberName 36(blockType) 1 "b" + MemberName 36(blockType) 2 "c" + MemberName 36(blockType) 3 "d" + MemberName 36(blockType) 4 "e" + Name 38 "t" MemberDecorate 10(T1) 0 Offset 0 Decorate 10(T1) Block MemberDecorate 11(T2) 0 Offset 0 Decorate 11(T2) Block - Decorate 12 ArrayStride 16 - MemberDecorate 13(T3) 0 Offset 0 - Decorate 13(T3) Block - Decorate 15(t3) DescriptorSet 0 - Decorate 15(t3) Binding 0 - MemberDecorate 23(t2) 0 Offset 0 - MemberDecorate 23(t2) 1 Offset 8 - Decorate 23(t2) Block - MemberDecorate 24(blockType) 0 Offset 0 - MemberDecorate 24(blockType) 1 Offset 4 - MemberDecorate 24(blockType) 2 Offset 8 - MemberDecorate 24(blockType) 3 Offset 12 - MemberDecorate 24(blockType) 4 Offset 16 - Decorate 24(blockType) Block - Decorate 26(t) DescriptorSet 0 - Decorate 26(t) Binding 0 + MemberDecorate 14(Blah) 0 Offset 0 + MemberDecorate 14(Blah) 1 Offset 8 + Decorate 15 ArrayStride 16 + MemberDecorate 16(T3) 0 Offset 0 + Decorate 16(T3) Block + Decorate 18(t3) DescriptorSet 0 + Decorate 18(t3) Binding 0 + MemberDecorate 35(t2) 0 Offset 0 + MemberDecorate 35(t2) 1 Offset 8 + Decorate 35(t2) Block + MemberDecorate 36(blockType) 0 Offset 0 + MemberDecorate 36(blockType) 1 Offset 4 + MemberDecorate 36(blockType) 2 Offset 8 + MemberDecorate 36(blockType) 3 Offset 12 + MemberDecorate 36(blockType) 4 Offset 16 + Decorate 36(blockType) Block + Decorate 38(t) DescriptorSet 0 + Decorate 38(t) Binding 0 + Decorate 13(x) DecorationAliasedPointerEXT 2: TypeVoid 3: TypeFunction 2 TypeForwardPointer 6 PhysicalStorageBufferEXT @@ -66,24 +71,38 @@ spv.bufferhandle8.frag 6: TypePointer PhysicalStorageBufferEXT 10(T1) 11(T2): TypeStruct 9(int) 7: TypePointer PhysicalStorageBufferEXT 11(T2) - 12: TypeRuntimeArray 8(Blah) - 13(T3): TypeStruct 12 - 14: TypePointer StorageBuffer 13(T3) - 15(t3): 14(ptr) Variable StorageBuffer - 16: 9(int) Constant 0 - 17: 9(int) Constant 1 - 18: TypePointer StorageBuffer 8(Blah) - TypeForwardPointer 22 PhysicalStorageBufferEXT - 23(t2): TypeStruct 22 22 - 24(blockType): TypeStruct 9(int) 9(int) 9(int) 9(int) 9(int) - 22: TypePointer PhysicalStorageBufferEXT 24(blockType) - 25: TypePointer StorageBuffer 23(t2) - 26(t): 25(ptr) Variable StorageBuffer + 12: TypePointer Function 8(Blah) + 14(Blah): TypeStruct 6(ptr) 7(ptr) + 15: TypeRuntimeArray 14(Blah) + 16(T3): TypeStruct 15 + 17: TypePointer StorageBuffer 16(T3) + 18(t3): 17(ptr) Variable StorageBuffer + 19: 9(int) Constant 0 + 20: 9(int) Constant 2 + 21: TypePointer StorageBuffer 14(Blah) + 25: TypePointer Function 6(ptr) + 28: 9(int) Constant 1 + 29: TypePointer Function 7(ptr) + TypeForwardPointer 34 PhysicalStorageBufferEXT + 35(t2): TypeStruct 34 34 + 36(blockType): TypeStruct 9(int) 9(int) 9(int) 9(int) 9(int) + 34: TypePointer PhysicalStorageBufferEXT 36(blockType) + 37: TypePointer StorageBuffer 35(t2) + 38(t): 37(ptr) Variable StorageBuffer 4(main): 2 Function None 3 5: Label - 19: 18(ptr) AccessChain 15(t3) 16 17 - 20: 8(Blah) Load 19 - 21: 18(ptr) AccessChain 15(t3) 16 16 - Store 21 20 + 13(x): 12(ptr) Variable Function + 22: 21(ptr) AccessChain 18(t3) 19 20 + 23: 14(Blah) Load 22 + 24: 6(ptr) CompositeExtract 23 0 + 26: 25(ptr) AccessChain 13(x) 19 + Store 26 24 + 27: 7(ptr) CompositeExtract 23 1 + 30: 29(ptr) AccessChain 13(x) 28 + Store 30 27 + 31: 21(ptr) AccessChain 18(t3) 19 28 + 32: 14(Blah) Load 31 + 33: 21(ptr) AccessChain 18(t3) 19 19 + Store 33 32 Return FunctionEnd diff --git a/Test/baseResults/spv.coopmatKHR.comp.out b/Test/baseResults/spv.coopmatKHR.comp.out new file mode 100755 index 00000000..60a45400 --- /dev/null +++ b/Test/baseResults/spv.coopmatKHR.comp.out @@ -0,0 +1,402 @@ +spv.coopmatKHR.comp +// Module Version 10000 +// Generated by (magic number): 8000b +// Id's are bound by 250 + + Capability Shader + Capability Float16 + Capability Int16 + Capability Int8 + Capability StorageUniformBufferBlock16 + Capability VulkanMemoryModelKHR + Capability PhysicalStorageBufferAddressesEXT + Capability CooperativeMatrixKHR + Extension "SPV_KHR_16bit_storage" + Extension "SPV_KHR_cooperative_matrix" + Extension "SPV_KHR_physical_storage_buffer" + Extension "SPV_KHR_storage_buffer_storage_class" + Extension "SPV_KHR_vulkan_memory_model" + 1: ExtInstImport "GLSL.std.450" + MemoryModel PhysicalStorageBuffer64EXT VulkanKHR + EntryPoint GLCompute 4 "main" + ExecutionMode 4 LocalSize 64 1 1 + Source GLSL 450 + SourceExtension "GL_EXT_buffer_reference" + SourceExtension "GL_EXT_shader_explicit_arithmetic_types" + SourceExtension "GL_KHR_cooperative_matrix" + SourceExtension "GL_KHR_memory_scope_semantics" + Name 4 "main" + Name 15 "f16(f161;" + Name 14 "m" + Name 22 "f32(f1;" + Name 21 "m" + Name 35 "m" + Name 53 "m2" + Name 57 "x" + Name 65 "tempArg" + Name 69 "Block" + MemberName 69(Block) 0 "y" + MemberName 69(Block) 1 "x" + Name 71 "block" + Name 80 "tempArg" + Name 85 "Block16" + MemberName 85(Block16) 0 "y" + MemberName 85(Block16) 1 "x" + MemberName 85(Block16) 2 "b" + Name 88 "Block" + MemberName 88(Block) 0 "y" + MemberName 88(Block) 1 "x" + Name 90 "block16" + Name 97 "tempArg" + Name 110 "D" + Name 114 "A" + Name 118 "B" + Name 120 "C" + Name 124 "l" + Name 128 "Y" + Name 129 "Z" + Name 132 "F" + Name 137 "a" + Name 141 "md1" + Name 152 "mC2" + Name 157 "tempArg" + Name 163 "tempArg" + Name 169 "p1" + Name 170 "param" + Name 173 "p2" + Name 174 "param" + Name 188 "tempArg" + Name 193 "shmatrix" + Name 197 "ms" + Name 204 "ms8A" + Name 208 "ms8B" + Name 212 "ms8C" + Name 227 "m16" + Name 233 "mC" + Name 234 "F" + Name 239 "S" + MemberName 239(S) 0 "a" + MemberName 239(S) 1 "b" + MemberName 239(S) 2 "c" + Name 244 "SC" + Name 249 "scm" + Decorate 67 ArrayStride 4 + Decorate 68 ArrayStride 4 + MemberDecorate 69(Block) 0 Offset 0 + MemberDecorate 69(Block) 1 Offset 4194304 + Decorate 69(Block) Block + Decorate 71(block) DescriptorSet 0 + Decorate 71(block) Binding 0 + Decorate 81 ArrayStride 2 + Decorate 83 ArrayStride 2 + MemberDecorate 85(Block16) 0 Offset 0 + MemberDecorate 85(Block16) 1 Offset 2097152 + MemberDecorate 85(Block16) 2 Offset 2097160 + Decorate 85(Block16) Block + Decorate 86 ArrayStride 4 + Decorate 87 ArrayStride 4 + MemberDecorate 88(Block) 0 Offset 0 + MemberDecorate 88(Block) 1 Offset 4194304 + Decorate 88(Block) Block + Decorate 90(block16) DescriptorSet 0 + Decorate 90(block16) Binding 0 + Decorate 128(Y) SpecId 0 + Decorate 232 BuiltIn WorkgroupSize + Decorate 234(F) SpecId 1 + Decorate 244(SC) SpecId 2 + 2: TypeVoid + 3: TypeFunction 2 + 6: TypeFloat 16 + 7: TypeInt 32 0 + 8: 7(int) Constant 3 + 9: 7(int) Constant 8 + 10: 7(int) Constant 2 + 11: TypeCooperativeMatrixKHR 6(float16_t) 8 9 9 10 + 12: TypePointer Function 11 + 13: TypeFunction 11 12(ptr) + 17: TypeFloat 32 + 18: TypeCooperativeMatrixKHR 17(float) 8 9 9 10 + 19: TypePointer Function 18 + 20: TypeFunction 18 19(ptr) + 32: 7(int) Constant 16 + 33: TypeCooperativeMatrixKHR 17(float) 8 32 9 10 + 34: TypePointer Function 33 + 36: 17(float) Constant 0 + 37: 33 ConstantComposite 36 + 46: 17(float) Constant 1073741824 + 51: TypeCooperativeMatrixKHR 6(float16_t) 8 32 9 10 + 52: TypePointer Function 51 + 56: TypePointer Function 17(float) + 58: TypeInt 32 1 + 59: 58(int) Constant 1 + 62: 58(int) Constant 0 + 66: 7(int) Constant 1048576 + 67: TypeArray 17(float) 66 + 68: TypeRuntimeArray 17(float) + 69(Block): TypeStruct 67 68 + 70: TypePointer StorageBuffer 69(Block) + 71(block): 70(ptr) Variable StorageBuffer + 72: 7(int) Constant 5 + 73: TypePointer StorageBuffer 17(float) + 75: 7(int) Constant 128 + 81: TypeArray 6(float16_t) 66 + 82: 7(int) Constant 1 + 83: TypeArray 6(float16_t) 82 + TypeForwardPointer 84 PhysicalStorageBufferEXT + 85(Block16): TypeStruct 81 83 84 + 86: TypeArray 17(float) 66 + 87: TypeRuntimeArray 17(float) + 88(Block): TypeStruct 86 87 + 84: TypePointer PhysicalStorageBufferEXT 88(Block) + 89: TypePointer StorageBuffer 85(Block16) + 90(block16): 89(ptr) Variable StorageBuffer + 91: TypePointer StorageBuffer 6(float16_t) + 98: 58(int) Constant 2 + 99: TypePointer StorageBuffer 84(ptr) + 102: TypePointer PhysicalStorageBufferEXT 17(float) + 111: 7(int) Constant 0 + 112: TypeCooperativeMatrixKHR 6(float16_t) 8 32 9 111 + 113: TypePointer Function 112 + 116: TypeCooperativeMatrixKHR 6(float16_t) 8 9 9 82 + 117: TypePointer Function 116 + 123: TypePointer Function 58(int) + 127: 58(int) Constant 8 + 128(Y): 58(int) SpecConstant 2 + 129(Z): 58(int) SpecConstantOp 132 127 128(Y) + 130: TypeCooperativeMatrixKHR 6(float16_t) 8 129(Z) 129(Z) 10 + 131: TypePointer Function 130 + 133:6(float16_t) Constant 0 + 134: 130 ConstantComposite 133 + 135: TypeArray 33 72 + 136: TypePointer Function 135 + 138: 58(int) Constant 3 + 139: 17(float) Constant 1065353216 + 145: 58(int) Constant 1234 + 149: TypeCooperativeMatrixKHR 6(float16_t) 8 129(Z) 9 10 + 150: TypeArray 149 8 + 151: TypePointer Private 150 + 152(mC2): 151(ptr) Variable Private + 153: TypePointer Private 149 + 177: 11 ConstantComposite 133 + 178: 18 ConstantComposite 36 + 182:6(float16_t) Constant 16384 + 185: 17(float) Constant 1082130432 + 189: TypeVector 7(int) 4 + 190: 7(int) Constant 32 + 191: TypeArray 189(ivec4) 190 + 192: TypePointer Workgroup 191 + 193(shmatrix): 192(ptr) Variable Workgroup + 194: TypePointer Workgroup 189(ivec4) + 201: TypeInt 8 1 + 202: TypeCooperativeMatrixKHR 201(int8_t) 8 9 9 111 + 203: TypePointer Function 202 + 206: TypeCooperativeMatrixKHR 201(int8_t) 8 9 9 82 + 207: TypePointer Function 206 + 210: TypeCooperativeMatrixKHR 201(int8_t) 8 9 9 10 + 211: TypePointer Function 210 + 222: 58(int) Constant 16 + 224: TypeInt 16 1 + 225: TypeCooperativeMatrixKHR 224(int16_t) 8 9 9 111 + 226: TypePointer Function 225 + 230: TypeVector 7(int) 3 + 231: 7(int) Constant 64 + 232: 230(ivec3) ConstantComposite 231 82 82 + 233(mC): 153(ptr) Variable Private + 234(F): 17(float) SpecConstant 1077936128 + 235: TypeCooperativeMatrixKHR 17(float) 8 129(Z) 9 10 + 236: 235 ConstantComposite 36 + 237:6(float16_t) Constant 15360 + 238: 11 ConstantComposite 237 + 239(S): TypeStruct 58(int) 58(int) 58(int) + 240: 58(int) Constant 12 + 241: 58(int) Constant 23 + 242: 58(int) Constant 34 + 243: 239(S) ConstantComposite 240 241 242 + 244(SC): 58(int) SpecConstant 1 + 245: TypeCooperativeMatrixKHR 6(float16_t) 8 244(SC) 244(SC) 10 + 246: TypeArray 245 244(SC) + 247: TypeArray 246 244(SC) + 248: TypePointer Private 247 + 249(scm): 248(ptr) Variable Private + 4(main): 2 Function None 3 + 5: Label + 35(m): 34(ptr) Variable Function + 53(m2): 52(ptr) Variable Function + 57(x): 56(ptr) Variable Function + 65(tempArg): 34(ptr) Variable Function + 80(tempArg): 52(ptr) Variable Function + 97(tempArg): 34(ptr) Variable Function + 110(D): 34(ptr) Variable Function + 114(A): 113(ptr) Variable Function + 118(B): 117(ptr) Variable Function + 120(C): 34(ptr) Variable Function + 124(l): 123(ptr) Variable Function + 132(F): 131(ptr) Variable Function + 137(a): 136(ptr) Variable Function + 141(md1): 56(ptr) Variable Function + 157(tempArg): 34(ptr) Variable Function + 163(tempArg): 52(ptr) Variable Function + 169(p1): 12(ptr) Variable Function + 170(param): 12(ptr) Variable Function + 173(p2): 19(ptr) Variable Function + 174(param): 19(ptr) Variable Function + 188(tempArg): 52(ptr) Variable Function + 197(ms): 52(ptr) Variable Function + 204(ms8A): 203(ptr) Variable Function + 208(ms8B): 207(ptr) Variable Function + 212(ms8C): 211(ptr) Variable Function + 227(m16): 226(ptr) Variable Function + Store 35(m) 37 + 38: 33 Load 35(m) + 39: 33 Load 35(m) + 40: 33 FAdd 38 39 + Store 35(m) 40 + 41: 33 Load 35(m) + 42: 33 Load 35(m) + 43: 33 FSub 41 42 + Store 35(m) 43 + 44: 33 Load 35(m) + 45: 33 FNegate 44 + Store 35(m) 45 + 47: 33 Load 35(m) + 48: 33 MatrixTimesScalar 47 46 + Store 35(m) 48 + 49: 33 Load 35(m) + 50: 33 MatrixTimesScalar 49 46 + Store 35(m) 50 + 54: 33 Load 35(m) + 55: 51 FConvert 54 + Store 53(m2) 55 + 60: 56(ptr) AccessChain 35(m) 59 + 61: 17(float) Load 60 + Store 57(x) 61 + 63: 17(float) Load 57(x) + 64: 56(ptr) AccessChain 35(m) 62 + Store 64 63 + 74: 73(ptr) AccessChain 71(block) 59 32 + 76: 33 CooperativeMatrixLoadKHR 74 62 75 MakePointerVisibleKHR NonPrivatePointerKHR 72 + Store 65(tempArg) 76 + 77: 33 Load 65(tempArg) + Store 35(m) 77 + 78: 33 Load 35(m) + 79: 73(ptr) AccessChain 71(block) 59 32 + CooperativeMatrixStoreKHR 79 78 62 75 MakePointerAvailableKHR NonPrivatePointerKHR 72 + 92: 91(ptr) AccessChain 90(block16) 59 32 + 93: 51 CooperativeMatrixLoadKHR 92 62 75 MakePointerVisibleKHR NonPrivatePointerKHR 72 + Store 80(tempArg) 93 + 94: 51 Load 80(tempArg) + Store 53(m2) 94 + 95: 51 Load 53(m2) + 96: 91(ptr) AccessChain 90(block16) 59 32 + CooperativeMatrixStoreKHR 96 95 62 75 MakePointerAvailableKHR NonPrivatePointerKHR 72 + 100: 99(ptr) AccessChain 90(block16) 98 + 101: 84(ptr) Load 100 MakePointerVisibleKHR NonPrivatePointerKHR 72 + 103: 102(ptr) AccessChain 101 59 32 + 104: 33 CooperativeMatrixLoadKHR 103 62 75 Aligned MakePointerVisibleKHR NonPrivatePointerKHR 16 72 + Store 97(tempArg) 104 + 105: 33 Load 97(tempArg) + Store 35(m) 105 + 106: 33 Load 35(m) + 107: 99(ptr) AccessChain 90(block16) 98 + 108: 84(ptr) Load 107 MakePointerVisibleKHR NonPrivatePointerKHR 72 + 109: 102(ptr) AccessChain 108 59 32 + CooperativeMatrixStoreKHR 109 106 62 75 Aligned MakePointerAvailableKHR NonPrivatePointerKHR 16 72 + 115: 112 Load 114(A) + 119: 116 Load 118(B) + 121: 33 Load 120(C) + 122: 33 CooperativeMatrixMulAddKHR 115 119 121 + Store 110(D) 122 + 125: 7(int) CooperativeMatrixLengthKHR 33 + 126: 58(int) Bitcast 125 + Store 124(l) 126 + Store 132(F) 134 + 140: 56(ptr) AccessChain 137(a) 138 62 + Store 140 139 + Store 141(md1) 36 + 142: 33 Load 35(m) + 143: 33 Load 35(m) + 144: 33 FAdd 143 142 + Store 35(m) 144 + 146: 17(float) CompositeExtract 144 1234 + 147: 17(float) Load 141(md1) + 148: 17(float) FAdd 147 146 + Store 141(md1) 148 + 154: 153(ptr) AccessChain 152(mC2) 98 + 155: 149 Load 154 + 156: 153(ptr) AccessChain 152(mC2) 59 + Store 156 155 + 158: 73(ptr) AccessChain 71(block) 62 32 + 159: 33 CooperativeMatrixLoadKHR 158 62 75 MakePointerVisibleKHR NonPrivatePointerKHR 72 + Store 157(tempArg) 159 + 160: 33 Load 157(tempArg) + Store 35(m) 160 + 161: 33 Load 35(m) + 162: 73(ptr) AccessChain 71(block) 62 32 + CooperativeMatrixStoreKHR 162 161 62 75 MakePointerAvailableKHR NonPrivatePointerKHR 72 + 164: 91(ptr) AccessChain 90(block16) 62 32 + 165: 51 CooperativeMatrixLoadKHR 164 62 75 MakePointerVisibleKHR NonPrivatePointerKHR 72 + Store 163(tempArg) 165 + 166: 51 Load 163(tempArg) + Store 53(m2) 166 + 167: 51 Load 53(m2) + 168: 91(ptr) AccessChain 90(block16) 62 32 + CooperativeMatrixStoreKHR 168 167 62 75 MakePointerAvailableKHR NonPrivatePointerKHR 72 + 171: 11 Load 169(p1) + Store 170(param) 171 + 172: 11 FunctionCall 15(f16(f161;) 170(param) + Store 169(p1) 172 + 175: 18 Load 173(p2) + Store 174(param) 175 + 176: 18 FunctionCall 22(f32(f1;) 174(param) + Store 173(p2) 176 + Store 169(p1) 177 + Store 173(p2) 178 + 179: 11 Load 169(p1) + 180: 11 Load 169(p1) + 181: 11 FDiv 180 179 + Store 169(p1) 181 + 183: 11 Load 169(p1) + 184: 11 MatrixTimesScalar 183 182 + Store 169(p1) 184 + 186: 18 Load 173(p2) + 187: 18 MatrixTimesScalar 186 185 + Store 173(p2) 187 + 195: 194(ptr) AccessChain 193(shmatrix) 82 + 196: 51 CooperativeMatrixLoadKHR 195 62 10 MakePointerVisibleKHR NonPrivatePointerKHR 10 + Store 188(tempArg) 196 + 198: 51 Load 188(tempArg) + Store 197(ms) 198 + 199: 51 Load 197(ms) + 200: 194(ptr) AccessChain 193(shmatrix) 82 + CooperativeMatrixStoreKHR 200 199 62 10 MakePointerAvailableKHR NonPrivatePointerKHR 10 + 205: 202 Load 204(ms8A) + 209: 206 Load 208(ms8B) + 213: 210 Load 212(ms8C) + 214: 210 CooperativeMatrixMulAddKHR 205 209 213 ASignedComponentsKHR BSignedComponentsKHR CSignedComponentsKHR ResultSignedComponentsKHR + 215: 202 Load 204(ms8A) + 216: 206 Load 208(ms8B) + 217: 210 Load 212(ms8C) + 218: 210 CooperativeMatrixMulAddKHR 215 216 217 ASignedComponentsKHR BSignedComponentsKHR CSignedComponentsKHR ResultSignedComponentsKHR + 219: 202 Load 204(ms8A) + 220: 206 Load 208(ms8B) + 221: 210 Load 212(ms8C) + 223: 210 CooperativeMatrixMulAddKHR 219 220 221 ASignedComponentsKHR BSignedComponentsKHR CSignedComponentsKHR ResultSignedComponentsKHR SaturatingAccumulationKHR + 228: 225 Load 227(m16) + 229: 194(ptr) AccessChain 193(shmatrix) 82 + CooperativeMatrixStoreKHR 229 228 62 10 MakePointerAvailableKHR NonPrivatePointerKHR 10 + Return + FunctionEnd + 15(f16(f161;): 11 Function None 13 + 14(m): 12(ptr) FunctionParameter + 16: Label + 24: 11 Load 14(m) + 25: 11 FNegate 24 + ReturnValue 25 + FunctionEnd + 22(f32(f1;): 18 Function None 20 + 21(m): 19(ptr) FunctionParameter + 23: Label + 28: 18 Load 21(m) + 29: 18 FNegate 28 + ReturnValue 29 + FunctionEnd diff --git a/Test/baseResults/spv.coopmatKHR_Error.comp.out b/Test/baseResults/spv.coopmatKHR_Error.comp.out new file mode 100755 index 00000000..82c302bf --- /dev/null +++ b/Test/baseResults/spv.coopmatKHR_Error.comp.out @@ -0,0 +1,38 @@ +spv.coopmatKHR_Error.comp +ERROR: 0:8: 'ftemplate16' : unexpected type parameters +ERROR: 0:10: '' : coopmat missing type parameters +ERROR: 0:10: 'fnoparams' : unexpected number type parameters +ERROR: 0:17: 'void' : coopmat invalid basic type +ERROR: 0:17: 'fbadtype' : expected 8, 16, 32, or 64 bit signed or unsigned integer or 16, 32, or 64 bit float type +ERROR: 0:17: 'fbadtype' : illegal use of type 'void' +ERROR: 0:18: '' : type parameter must be a constant integer expression +ERROR: 0:18: 'void' : coopmat invalid basic type +ERROR: 0:18: '' : coopmat incorrect number of type parameters +ERROR: 0:18: 'fbadtype2' : unexpected number type parameters +ERROR: 0:18: 'fbadtype2' : expected 8, 16, 32, or 64 bit signed or unsigned integer or 16, 32, or 64 bit float type +ERROR: 0:18: 'fbadtype2' : illegal use of type 'void' +ERROR: 0:19: 'void' : coopmat invalid basic type +ERROR: 0:19: '' : coopmat incorrect number of type parameters +ERROR: 0:19: 'fbadtype3' : unexpected number type parameters +ERROR: 0:19: 'fbadtype3' : expected 8, 16, 32, or 64 bit signed or unsigned integer or 16, 32, or 64 bit float type +ERROR: 0:19: 'fbadtype3' : illegal use of type 'void' +ERROR: 0:21: '' : coopmat incorrect number of type parameters +ERROR: 0:25: '' : type parameter must be a constant integer expression +ERROR: 0:29: '' : coopmat incorrect number of type parameters +ERROR: 0:29: 'Cooperative matrix types must not be used in shared memory' : qualifier +ERROR: 0:32: 'bufmat' : member of block cannot be or contain a cooperative matrix type +ERROR: 0:41: 'assign' : cannot convert from ' temp coopmat<3, 16, 8, 0> float16_t' to ' temp coopmat<3, 16, 8, 0> float' +ERROR: 0:42: 'assign' : cannot convert from ' temp coopmat<3, 16, 8, 0> float16_t' to ' temp coopmat<3, 16, 8, 0> float' +ERROR: 0:47: 'assign' : cannot convert from ' temp coopmat<3, 8, 8, 0> float16_t' to ' temp coopmat<3, 16, 8, 0> float16_t' +ERROR: 0:53: 'assign' : cannot convert from ' temp coopmat<3, 8, 1, 0> float16_t' to ' temp coopmat<3, 8, 1, 0> float16_t' +ERROR: 0:56: 'constructor' : too many arguments +ERROR: 0:56: 'assign' : cannot convert from ' const float' to ' temp coopmat<3, 8, 8, 0> float16_t' +ERROR: 0:60: 'constructor' : Cooperative matrix constructor argument must be scalar or cooperative matrix +ERROR: 0:60: '=' : cannot convert from ' const float' to ' temp coopmat<3, 4, 4, 0> float' +ERROR: 0:63: 'expression' : left of '[' is not of type array, matrix, or vector +ERROR: 0:66: '.' : cannot apply to a cooperative matrix type: x +ERROR: 0:68: 'transpose' : no matching overloaded function found +ERROR: 33 compilation errors. No code generated. + + +SPIR-V is not generated for failed compile or link diff --git a/Test/baseResults/spv.coopmatKHR_arithmetic.comp.out b/Test/baseResults/spv.coopmatKHR_arithmetic.comp.out new file mode 100755 index 00000000..2acc002d --- /dev/null +++ b/Test/baseResults/spv.coopmatKHR_arithmetic.comp.out @@ -0,0 +1,248 @@ +spv.coopmatKHR_arithmetic.comp +// Module Version 10000 +// Generated by (magic number): 8000b +// Id's are bound by 196 + + Capability Shader + Capability Float16 + Capability Int8 + Capability VulkanMemoryModelKHR + Capability CooperativeMatrixKHR + Extension "SPV_KHR_cooperative_matrix" + Extension "SPV_KHR_vulkan_memory_model" + 1: ExtInstImport "GLSL.std.450" + MemoryModel Logical VulkanKHR + EntryPoint GLCompute 4 "main" + ExecutionMode 4 LocalSize 64 1 1 + Source GLSL 450 + SourceExtension "GL_EXT_shader_explicit_arithmetic_types" + SourceExtension "GL_KHR_cooperative_matrix" + SourceExtension "GL_KHR_memory_scope_semantics" + Name 4 "main" + Name 13 "f" + Name 48 "f16" + Name 82 "u32" + Name 117 "u8" + Name 152 "i8" + Decorate 195 BuiltIn WorkgroupSize + 2: TypeVoid + 3: TypeFunction 2 + 6: TypeFloat 32 + 7: TypeInt 32 0 + 8: 7(int) Constant 3 + 9: 7(int) Constant 8 + 10: 7(int) Constant 0 + 11: TypeCooperativeMatrixKHR 6(float) 8 9 9 10 + 12: TypePointer Function 11 + 39: 6(float) Constant 1073741824 + 45: TypeFloat 16 + 46: TypeCooperativeMatrixKHR 45(float16_t) 8 9 9 10 + 47: TypePointer Function 46 + 74:45(float16_t) Constant 16384 + 80: TypeCooperativeMatrixKHR 7(int) 8 9 9 10 + 81: TypePointer Function 80 + 108: 7(int) Constant 2 + 114: TypeInt 8 0 + 115: TypeCooperativeMatrixKHR 114(int8_t) 8 9 9 10 + 116: TypePointer Function 115 + 143: 114(int8_t) Constant 2 + 149: TypeInt 8 1 + 150: TypeCooperativeMatrixKHR 149(int8_t) 8 9 9 10 + 151: TypePointer Function 150 + 178: 149(int8_t) Constant 2 + 192: TypeVector 7(int) 3 + 193: 7(int) Constant 64 + 194: 7(int) Constant 1 + 195: 192(ivec3) ConstantComposite 193 194 194 + 4(main): 2 Function None 3 + 5: Label + 13(f): 12(ptr) Variable Function + 48(f16): 47(ptr) Variable Function + 82(u32): 81(ptr) Variable Function + 117(u8): 116(ptr) Variable Function + 152(i8): 151(ptr) Variable Function + 14: 11 Load 13(f) + 15: 11 Load 13(f) + 16: 11 FAdd 14 15 + 17: 11 Load 13(f) + 18: 11 Load 13(f) + 19: 11 FSub 17 18 + 20: 11 Load 13(f) + 21: 11 Load 13(f) + 22: 11 FMul 20 21 + 23: 11 Load 13(f) + 24: 11 Load 13(f) + 25: 11 FDiv 23 24 + 26: 11 Load 13(f) + 27: 11 Load 13(f) + 28: 11 FAdd 27 26 + Store 13(f) 28 + 29: 11 Load 13(f) + 30: 11 Load 13(f) + 31: 11 FSub 30 29 + Store 13(f) 31 + 32: 11 Load 13(f) + 33: 11 Load 13(f) + 34: 11 FMul 33 32 + Store 13(f) 34 + 35: 11 Load 13(f) + 36: 11 Load 13(f) + 37: 11 FDiv 36 35 + Store 13(f) 37 + 38: 11 Load 13(f) + 40: 11 MatrixTimesScalar 38 39 + 41: 11 Load 13(f) + 42: 11 MatrixTimesScalar 41 39 + 43: 11 Load 13(f) + 44: 11 MatrixTimesScalar 43 39 + Store 13(f) 44 + 49: 46 Load 48(f16) + 50: 46 Load 48(f16) + 51: 46 FAdd 49 50 + 52: 46 Load 48(f16) + 53: 46 Load 48(f16) + 54: 46 FSub 52 53 + 55: 46 Load 48(f16) + 56: 46 Load 48(f16) + 57: 46 FMul 55 56 + 58: 46 Load 48(f16) + 59: 46 Load 48(f16) + 60: 46 FDiv 58 59 + 61: 46 Load 48(f16) + 62: 46 Load 48(f16) + 63: 46 FAdd 62 61 + Store 48(f16) 63 + 64: 46 Load 48(f16) + 65: 46 Load 48(f16) + 66: 46 FSub 65 64 + Store 48(f16) 66 + 67: 46 Load 48(f16) + 68: 46 Load 48(f16) + 69: 46 FMul 68 67 + Store 48(f16) 69 + 70: 46 Load 48(f16) + 71: 46 Load 48(f16) + 72: 46 FDiv 71 70 + Store 48(f16) 72 + 73: 46 Load 48(f16) + 75: 46 MatrixTimesScalar 73 74 + 76: 46 Load 48(f16) + 77: 46 MatrixTimesScalar 76 74 + 78: 46 Load 48(f16) + 79: 46 MatrixTimesScalar 78 74 + Store 48(f16) 79 + 83: 80 Load 82(u32) + 84: 80 Load 82(u32) + 85: 80 IAdd 83 84 + 86: 80 Load 82(u32) + 87: 80 Load 82(u32) + 88: 80 ISub 86 87 + 89: 80 Load 82(u32) + 90: 80 Load 82(u32) + 91: 80 IMul 89 90 + 92: 80 Load 82(u32) + 93: 80 Load 82(u32) + 94: 80 UDiv 92 93 + 95: 80 Load 82(u32) + 96: 80 Load 82(u32) + 97: 80 IAdd 96 95 + Store 82(u32) 97 + 98: 80 Load 82(u32) + 99: 80 Load 82(u32) + 100: 80 ISub 99 98 + Store 82(u32) 100 + 101: 80 Load 82(u32) + 102: 80 Load 82(u32) + 103: 80 IMul 102 101 + Store 82(u32) 103 + 104: 80 Load 82(u32) + 105: 80 Load 82(u32) + 106: 80 UDiv 105 104 + Store 82(u32) 106 + 107: 80 Load 82(u32) + 109: 80 MatrixTimesScalar 107 108 + 110: 80 Load 82(u32) + 111: 80 MatrixTimesScalar 110 108 + 112: 80 Load 82(u32) + 113: 80 MatrixTimesScalar 112 108 + Store 82(u32) 113 + 118: 115 Load 117(u8) + 119: 115 Load 117(u8) + 120: 115 IAdd 118 119 + 121: 115 Load 117(u8) + 122: 115 Load 117(u8) + 123: 115 ISub 121 122 + 124: 115 Load 117(u8) + 125: 115 Load 117(u8) + 126: 115 IMul 124 125 + 127: 115 Load 117(u8) + 128: 115 Load 117(u8) + 129: 115 UDiv 127 128 + 130: 115 Load 117(u8) + 131: 115 Load 117(u8) + 132: 115 IAdd 131 130 + Store 117(u8) 132 + 133: 115 Load 117(u8) + 134: 115 Load 117(u8) + 135: 115 ISub 134 133 + Store 117(u8) 135 + 136: 115 Load 117(u8) + 137: 115 Load 117(u8) + 138: 115 IMul 137 136 + Store 117(u8) 138 + 139: 115 Load 117(u8) + 140: 115 Load 117(u8) + 141: 115 UDiv 140 139 + Store 117(u8) 141 + 142: 115 Load 117(u8) + 144: 115 MatrixTimesScalar 142 143 + 145: 115 Load 117(u8) + 146: 115 MatrixTimesScalar 145 143 + 147: 115 Load 117(u8) + 148: 115 MatrixTimesScalar 147 143 + Store 117(u8) 148 + 153: 150 Load 152(i8) + 154: 150 Load 152(i8) + 155: 150 IAdd 153 154 + 156: 150 Load 152(i8) + 157: 150 Load 152(i8) + 158: 150 ISub 156 157 + 159: 150 Load 152(i8) + 160: 150 Load 152(i8) + 161: 150 IMul 159 160 + 162: 150 Load 152(i8) + 163: 150 Load 152(i8) + 164: 150 SDiv 162 163 + 165: 150 Load 152(i8) + 166: 150 Load 152(i8) + 167: 150 IAdd 166 165 + Store 152(i8) 167 + 168: 150 Load 152(i8) + 169: 150 Load 152(i8) + 170: 150 ISub 169 168 + Store 152(i8) 170 + 171: 150 Load 152(i8) + 172: 150 Load 152(i8) + 173: 150 IMul 172 171 + Store 152(i8) 173 + 174: 150 Load 152(i8) + 175: 150 Load 152(i8) + 176: 150 SDiv 175 174 + Store 152(i8) 176 + 177: 150 Load 152(i8) + 179: 150 MatrixTimesScalar 177 178 + 180: 150 Load 152(i8) + 181: 150 MatrixTimesScalar 180 178 + 182: 150 Load 152(i8) + 183: 150 MatrixTimesScalar 182 178 + Store 152(i8) 183 + 184: 11 Load 13(f) + 185: 11 FNegate 184 + 186: 46 Load 48(f16) + 187: 46 FNegate 186 + 188: 150 Load 152(i8) + 189: 150 SNegate 188 + 190: 115 Load 117(u8) + 191: 115 SNegate 190 + Return + FunctionEnd diff --git a/Test/baseResults/spv.coopmatKHR_arithmeticError.comp.out b/Test/baseResults/spv.coopmatKHR_arithmeticError.comp.out new file mode 100755 index 00000000..9bcdfb35 --- /dev/null +++ b/Test/baseResults/spv.coopmatKHR_arithmeticError.comp.out @@ -0,0 +1,64 @@ +spv.coopmatKHR_arithmeticError.comp +ERROR: 0:21: '+' : wrong operand types: no operation '+' exists that takes a left-hand operand of type ' temp coopmat<3, 8, 8, 0> float' and a right operand of type ' const float' (or there is no acceptable conversion) +ERROR: 0:22: '-' : wrong operand types: no operation '-' exists that takes a left-hand operand of type ' temp coopmat<3, 8, 8, 0> float' and a right operand of type ' const float' (or there is no acceptable conversion) +ERROR: 0:23: '/' : wrong operand types: no operation '/' exists that takes a left-hand operand of type ' temp coopmat<3, 8, 8, 0> float' and a right operand of type ' const float' (or there is no acceptable conversion) +ERROR: 0:24: '+' : wrong operand types: no operation '+' exists that takes a left-hand operand of type ' const float' and a right operand of type ' temp coopmat<3, 8, 8, 0> float' (or there is no acceptable conversion) +ERROR: 0:25: '-' : wrong operand types: no operation '-' exists that takes a left-hand operand of type ' const float' and a right operand of type ' temp coopmat<3, 8, 8, 0> float' (or there is no acceptable conversion) +ERROR: 0:26: '/' : wrong operand types: no operation '/' exists that takes a left-hand operand of type ' const float' and a right operand of type ' temp coopmat<3, 8, 8, 0> float' (or there is no acceptable conversion) +ERROR: 0:27: 'assign' : cannot convert from ' const float' to ' temp coopmat<3, 8, 8, 0> float' +ERROR: 0:28: 'assign' : cannot convert from ' const float' to ' temp coopmat<3, 8, 8, 0> float' +ERROR: 0:29: 'assign' : cannot convert from ' const float' to ' temp coopmat<3, 8, 8, 0> float' +ERROR: 0:31: '+' : wrong operand types: no operation '+' exists that takes a left-hand operand of type ' temp coopmat<3, 8, 8, 0> float' and a right operand of type ' temp coopmat<3, 8, 8, 0> float16_t' (or there is no acceptable conversion) +ERROR: 0:32: '-' : wrong operand types: no operation '-' exists that takes a left-hand operand of type ' temp coopmat<3, 8, 8, 0> float' and a right operand of type ' temp coopmat<3, 8, 8, 0> float16_t' (or there is no acceptable conversion) +ERROR: 0:33: '*' : wrong operand types: no operation '*' exists that takes a left-hand operand of type ' temp coopmat<3, 8, 8, 0> float' and a right operand of type ' temp coopmat<3, 8, 8, 0> float16_t' (or there is no acceptable conversion) +ERROR: 0:34: '/' : wrong operand types: no operation '/' exists that takes a left-hand operand of type ' temp coopmat<3, 8, 8, 0> float' and a right operand of type ' temp coopmat<3, 8, 8, 0> float16_t' (or there is no acceptable conversion) +ERROR: 0:35: 'assign' : cannot convert from ' temp coopmat<3, 8, 8, 0> float16_t' to ' temp coopmat<3, 8, 8, 0> float' +ERROR: 0:36: 'assign' : cannot convert from ' temp coopmat<3, 8, 8, 0> float16_t' to ' temp coopmat<3, 8, 8, 0> float' +ERROR: 0:37: 'assign' : cannot convert from ' temp coopmat<3, 8, 8, 0> float16_t' to ' temp coopmat<3, 8, 8, 0> float' +ERROR: 0:38: 'assign' : cannot convert from ' temp coopmat<3, 8, 8, 0> float16_t' to ' temp coopmat<3, 8, 8, 0> float' +ERROR: 0:40: '+' : wrong operand types: no operation '+' exists that takes a left-hand operand of type ' temp coopmat<3, 8, 8, 0> float' and a right operand of type ' temp coopmat<3, 8, 8, 1> float' (or there is no acceptable conversion) +ERROR: 0:41: '-' : wrong operand types: no operation '-' exists that takes a left-hand operand of type ' temp coopmat<3, 8, 8, 0> float' and a right operand of type ' temp coopmat<3, 8, 8, 1> float' (or there is no acceptable conversion) +ERROR: 0:42: '*' : wrong operand types: no operation '*' exists that takes a left-hand operand of type ' temp coopmat<3, 8, 8, 0> float' and a right operand of type ' temp coopmat<3, 8, 8, 1> float' (or there is no acceptable conversion) +ERROR: 0:43: '/' : wrong operand types: no operation '/' exists that takes a left-hand operand of type ' temp coopmat<3, 8, 8, 0> float' and a right operand of type ' temp coopmat<3, 8, 8, 1> float' (or there is no acceptable conversion) +ERROR: 0:44: 'assign' : cannot convert from ' temp coopmat<3, 8, 8, 1> float' to ' temp coopmat<3, 8, 8, 0> float' +ERROR: 0:45: 'assign' : cannot convert from ' temp coopmat<3, 8, 8, 1> float' to ' temp coopmat<3, 8, 8, 0> float' +ERROR: 0:46: 'assign' : cannot convert from ' temp coopmat<3, 8, 8, 1> float' to ' temp coopmat<3, 8, 8, 0> float' +ERROR: 0:47: 'assign' : cannot convert from ' temp coopmat<3, 8, 8, 1> float' to ' temp coopmat<3, 8, 8, 0> float' +ERROR: 0:49: '+' : wrong operand types: no operation '+' exists that takes a left-hand operand of type ' temp coopmat<3, 8, 8, 0> float' and a right operand of type ' temp coopmat<3, 16, 8, 0> float' (or there is no acceptable conversion) +ERROR: 0:50: '-' : wrong operand types: no operation '-' exists that takes a left-hand operand of type ' temp coopmat<3, 8, 8, 0> float' and a right operand of type ' temp coopmat<3, 16, 8, 0> float' (or there is no acceptable conversion) +ERROR: 0:51: '*' : wrong operand types: no operation '*' exists that takes a left-hand operand of type ' temp coopmat<3, 8, 8, 0> float' and a right operand of type ' temp coopmat<3, 16, 8, 0> float' (or there is no acceptable conversion) +ERROR: 0:52: '/' : wrong operand types: no operation '/' exists that takes a left-hand operand of type ' temp coopmat<3, 8, 8, 0> float' and a right operand of type ' temp coopmat<3, 16, 8, 0> float' (or there is no acceptable conversion) +ERROR: 0:53: 'assign' : cannot convert from ' temp coopmat<3, 16, 8, 0> float' to ' temp coopmat<3, 8, 8, 0> float' +ERROR: 0:54: 'assign' : cannot convert from ' temp coopmat<3, 16, 8, 0> float' to ' temp coopmat<3, 8, 8, 0> float' +ERROR: 0:55: 'assign' : cannot convert from ' temp coopmat<3, 16, 8, 0> float' to ' temp coopmat<3, 8, 8, 0> float' +ERROR: 0:56: 'assign' : cannot convert from ' temp coopmat<3, 16, 8, 0> float' to ' temp coopmat<3, 8, 8, 0> float' +ERROR: 0:58: '+' : wrong operand types: no operation '+' exists that takes a left-hand operand of type ' temp coopmat<3, 8, 8, 0> uint8_t' and a right operand of type ' temp coopmat<3, 8, 8, 0> int8_t' (or there is no acceptable conversion) +ERROR: 0:59: '-' : wrong operand types: no operation '-' exists that takes a left-hand operand of type ' temp coopmat<3, 8, 8, 0> uint8_t' and a right operand of type ' temp coopmat<3, 8, 8, 0> int8_t' (or there is no acceptable conversion) +ERROR: 0:60: '*' : wrong operand types: no operation '*' exists that takes a left-hand operand of type ' temp coopmat<3, 8, 8, 0> uint8_t' and a right operand of type ' temp coopmat<3, 8, 8, 0> int8_t' (or there is no acceptable conversion) +ERROR: 0:61: '/' : wrong operand types: no operation '/' exists that takes a left-hand operand of type ' temp coopmat<3, 8, 8, 0> uint8_t' and a right operand of type ' temp coopmat<3, 8, 8, 0> int8_t' (or there is no acceptable conversion) +ERROR: 0:62: 'assign' : cannot convert from ' temp coopmat<3, 8, 8, 0> int8_t' to ' temp coopmat<3, 8, 8, 0> uint8_t' +ERROR: 0:63: 'assign' : cannot convert from ' temp coopmat<3, 8, 8, 0> int8_t' to ' temp coopmat<3, 8, 8, 0> uint8_t' +ERROR: 0:64: 'assign' : cannot convert from ' temp coopmat<3, 8, 8, 0> int8_t' to ' temp coopmat<3, 8, 8, 0> uint8_t' +ERROR: 0:65: 'assign' : cannot convert from ' temp coopmat<3, 8, 8, 0> int8_t' to ' temp coopmat<3, 8, 8, 0> uint8_t' +ERROR: 0:67: '+' : wrong operand types: no operation '+' exists that takes a left-hand operand of type ' temp coopmat<3, 8, 8, 0> uint8_t' and a right operand of type ' const uint8_t' (or there is no acceptable conversion) +ERROR: 0:68: '-' : wrong operand types: no operation '-' exists that takes a left-hand operand of type ' temp coopmat<3, 8, 8, 0> uint8_t' and a right operand of type ' const uint8_t' (or there is no acceptable conversion) +ERROR: 0:69: '/' : wrong operand types: no operation '/' exists that takes a left-hand operand of type ' temp coopmat<3, 8, 8, 0> uint8_t' and a right operand of type ' const uint8_t' (or there is no acceptable conversion) +ERROR: 0:70: 'assign' : cannot convert from ' const uint8_t' to ' temp coopmat<3, 8, 8, 0> uint8_t' +ERROR: 0:71: 'assign' : cannot convert from ' const uint8_t' to ' temp coopmat<3, 8, 8, 0> uint8_t' +ERROR: 0:72: 'assign' : cannot convert from ' const uint8_t' to ' temp coopmat<3, 8, 8, 0> uint8_t' +ERROR: 0:74: '+' : wrong operand types: no operation '+' exists that takes a left-hand operand of type ' temp coopmat<3, 8, 8, 0> int8_t' and a right operand of type ' const int8_t' (or there is no acceptable conversion) +ERROR: 0:75: '-' : wrong operand types: no operation '-' exists that takes a left-hand operand of type ' temp coopmat<3, 8, 8, 0> int8_t' and a right operand of type ' const int8_t' (or there is no acceptable conversion) +ERROR: 0:76: '/' : wrong operand types: no operation '/' exists that takes a left-hand operand of type ' temp coopmat<3, 8, 8, 0> int8_t' and a right operand of type ' const int8_t' (or there is no acceptable conversion) +ERROR: 0:77: 'assign' : cannot convert from ' const int8_t' to ' temp coopmat<3, 8, 8, 0> int8_t' +ERROR: 0:78: 'assign' : cannot convert from ' const int8_t' to ' temp coopmat<3, 8, 8, 0> int8_t' +ERROR: 0:79: 'assign' : cannot convert from ' const int8_t' to ' temp coopmat<3, 8, 8, 0> int8_t' +ERROR: 0:81: '+' : wrong operand types: no operation '+' exists that takes a left-hand operand of type ' temp coopmat<3, 8, 8, 0> int' and a right operand of type ' const int' (or there is no acceptable conversion) +ERROR: 0:82: '-' : wrong operand types: no operation '-' exists that takes a left-hand operand of type ' temp coopmat<3, 8, 8, 0> int' and a right operand of type ' const int' (or there is no acceptable conversion) +ERROR: 0:83: '/' : wrong operand types: no operation '/' exists that takes a left-hand operand of type ' temp coopmat<3, 8, 8, 0> int' and a right operand of type ' const int' (or there is no acceptable conversion) +ERROR: 0:84: 'assign' : cannot convert from ' const int' to ' temp coopmat<3, 8, 8, 0> int' +ERROR: 0:85: 'assign' : cannot convert from ' const int' to ' temp coopmat<3, 8, 8, 0> int' +ERROR: 0:86: 'assign' : cannot convert from ' const int' to ' temp coopmat<3, 8, 8, 0> int' +ERROR: 59 compilation errors. No code generated. + + +SPIR-V is not generated for failed compile or link diff --git a/Test/baseResults/spv.coopmatKHR_constructor.comp.out b/Test/baseResults/spv.coopmatKHR_constructor.comp.out new file mode 100755 index 00000000..0c9923b9 --- /dev/null +++ b/Test/baseResults/spv.coopmatKHR_constructor.comp.out @@ -0,0 +1,632 @@ +spv.coopmatKHR_constructor.comp +// Module Version 10000 +// Generated by (magic number): 8000b +// Id's are bound by 481 + + Capability Shader + Capability Float16 + Capability Int16 + Capability Int8 + Capability VulkanMemoryModelKHR + Capability CooperativeMatrixKHR + Extension "SPV_KHR_cooperative_matrix" + Extension "SPV_KHR_vulkan_memory_model" + 1: ExtInstImport "GLSL.std.450" + MemoryModel Logical VulkanKHR + EntryPoint GLCompute 4 "main" + ExecutionMode 4 LocalSize 64 1 1 + Source GLSL 450 + SourceExtension "GL_EXT_shader_explicit_arithmetic_types" + SourceExtension "GL_KHR_cooperative_matrix" + SourceExtension "GL_KHR_memory_scope_semantics" + Name 4 "main" + Name 154 "v" + Name 158 "v" + Name 164 "v" + Name 170 "v" + Name 176 "v" + Name 182 "v" + Name 188 "v" + Name 194 "v" + Name 199 "v" + Name 204 "v" + Name 207 "v" + Name 212 "v" + Name 217 "v" + Name 222 "v" + Name 227 "v" + Name 232 "v" + Name 237 "v" + Name 242 "v" + Name 247 "v" + Name 250 "v" + Name 255 "v" + Name 260 "v" + Name 265 "v" + Name 271 "v" + Name 277 "v" + Name 282 "v" + Name 287 "v" + Name 292 "v" + Name 295 "v" + Name 300 "v" + Name 306 "v" + Name 311 "v" + Name 317 "v" + Name 322 "v" + Name 327 "v" + Name 332 "v" + Name 337 "v" + Name 340 "v" + Name 346 "v" + Name 352 "v" + Name 357 "v" + Name 362 "v" + Name 367 "v" + Name 372 "v" + Name 378 "v" + Name 384 "v" + Name 387 "v" + Name 392 "v" + Name 397 "v" + Name 402 "v" + Name 407 "v" + Name 413 "v" + Name 418 "v" + Name 424 "v" + Name 429 "v" + Name 432 "v" + Name 437 "v" + Name 442 "v" + Name 447 "v" + Name 453 "v" + Name 459 "v" + Name 464 "v" + Name 469 "v" + Name 474 "v" + Decorate 480 BuiltIn WorkgroupSize + 2: TypeVoid + 3: TypeFunction 2 + 6: TypeFloat 32 + 7: TypeInt 32 0 + 8: 7(int) Constant 3 + 9: 7(int) Constant 8 + 10: 7(int) Constant 0 + 11: TypeCooperativeMatrixKHR 6(float) 8 9 9 10 + 12: 6(float) Constant 1065353216 + 13: 11 ConstantComposite 12 + 14: 6(float) Constant 1073741824 + 15: 11 ConstantComposite 14 + 16: 6(float) Constant 1077936128 + 17: 11 ConstantComposite 16 + 18: 6(float) Constant 1082130432 + 19: 11 ConstantComposite 18 + 20: 6(float) Constant 1084227584 + 21: 11 ConstantComposite 20 + 22: 6(float) Constant 1086324736 + 23: 11 ConstantComposite 22 + 24: 6(float) Constant 1088421888 + 25: 11 ConstantComposite 24 + 26: 6(float) Constant 1090519040 + 27: 11 ConstantComposite 26 + 28: TypeFloat 16 + 29: TypeCooperativeMatrixKHR 28(float16_t) 8 9 9 10 + 30:28(float16_t) Constant 18816 + 31: 29 ConstantComposite 30 + 32:28(float16_t) Constant 18944 + 33: 29 ConstantComposite 32 + 34:28(float16_t) Constant 19072 + 35: 29 ConstantComposite 34 + 36:28(float16_t) Constant 19200 + 37: 29 ConstantComposite 36 + 38:28(float16_t) Constant 19328 + 39: 29 ConstantComposite 38 + 40:28(float16_t) Constant 19456 + 41: 29 ConstantComposite 40 + 42:28(float16_t) Constant 19520 + 43: 29 ConstantComposite 42 + 44:28(float16_t) Constant 19584 + 45: 29 ConstantComposite 44 + 46: TypeCooperativeMatrixKHR 7(int) 8 9 9 10 + 47: 7(int) Constant 21 + 48: 46 ConstantComposite 47 + 49: 7(int) Constant 22 + 50: 46 ConstantComposite 49 + 51: 7(int) Constant 23 + 52: 46 ConstantComposite 51 + 53: 7(int) Constant 24 + 54: 46 ConstantComposite 53 + 55: 7(int) Constant 25 + 56: 46 ConstantComposite 55 + 57: 7(int) Constant 26 + 58: 46 ConstantComposite 57 + 59: 7(int) Constant 27 + 60: 46 ConstantComposite 59 + 61: 7(int) Constant 28 + 62: 46 ConstantComposite 61 + 63: TypeInt 16 0 + 64: TypeCooperativeMatrixKHR 63(int16_t) 8 9 9 10 + 65: 63(int16_t) Constant 31 + 66: 64 ConstantComposite 65 + 67: 63(int16_t) Constant 32 + 68: 64 ConstantComposite 67 + 69: 63(int16_t) Constant 33 + 70: 64 ConstantComposite 69 + 71: 63(int16_t) Constant 34 + 72: 64 ConstantComposite 71 + 73: 63(int16_t) Constant 35 + 74: 64 ConstantComposite 73 + 75: 63(int16_t) Constant 36 + 76: 64 ConstantComposite 75 + 77: 63(int16_t) Constant 37 + 78: 64 ConstantComposite 77 + 79: 63(int16_t) Constant 38 + 80: 64 ConstantComposite 79 + 81: TypeInt 8 0 + 82: TypeCooperativeMatrixKHR 81(int8_t) 8 9 9 10 + 83: 81(int8_t) Constant 41 + 84: 82 ConstantComposite 83 + 85: 81(int8_t) Constant 42 + 86: 82 ConstantComposite 85 + 87: 81(int8_t) Constant 43 + 88: 82 ConstantComposite 87 + 89: 81(int8_t) Constant 44 + 90: 82 ConstantComposite 89 + 91: 81(int8_t) Constant 45 + 92: 82 ConstantComposite 91 + 93: 81(int8_t) Constant 46 + 94: 82 ConstantComposite 93 + 95: 81(int8_t) Constant 47 + 96: 82 ConstantComposite 95 + 97: 81(int8_t) Constant 48 + 98: 82 ConstantComposite 97 + 99: TypeInt 32 1 + 100: TypeCooperativeMatrixKHR 99(int) 8 9 9 10 + 101: 99(int) Constant 51 + 102: 100 ConstantComposite 101 + 103: 99(int) Constant 52 + 104: 100 ConstantComposite 103 + 105: 99(int) Constant 53 + 106: 100 ConstantComposite 105 + 107: 99(int) Constant 54 + 108: 100 ConstantComposite 107 + 109: 99(int) Constant 55 + 110: 100 ConstantComposite 109 + 111: 99(int) Constant 56 + 112: 100 ConstantComposite 111 + 113: 99(int) Constant 57 + 114: 100 ConstantComposite 113 + 115: 99(int) Constant 58 + 116: 100 ConstantComposite 115 + 117: TypeInt 16 1 + 118: TypeCooperativeMatrixKHR 117(int16_t) 8 9 9 10 + 119:117(int16_t) Constant 61 + 120: 118 ConstantComposite 119 + 121:117(int16_t) Constant 62 + 122: 118 ConstantComposite 121 + 123:117(int16_t) Constant 63 + 124: 118 ConstantComposite 123 + 125:117(int16_t) Constant 64 + 126: 118 ConstantComposite 125 + 127:117(int16_t) Constant 65 + 128: 118 ConstantComposite 127 + 129:117(int16_t) Constant 66 + 130: 118 ConstantComposite 129 + 131:117(int16_t) Constant 67 + 132: 118 ConstantComposite 131 + 133:117(int16_t) Constant 68 + 134: 118 ConstantComposite 133 + 135: TypeInt 8 1 + 136: TypeCooperativeMatrixKHR 135(int8_t) 8 9 9 10 + 137: 135(int8_t) Constant 71 + 138: 136 ConstantComposite 137 + 139: 135(int8_t) Constant 72 + 140: 136 ConstantComposite 139 + 141: 135(int8_t) Constant 73 + 142: 136 ConstantComposite 141 + 143: 135(int8_t) Constant 74 + 144: 136 ConstantComposite 143 + 145: 135(int8_t) Constant 75 + 146: 136 ConstantComposite 145 + 147: 135(int8_t) Constant 76 + 148: 136 ConstantComposite 147 + 149: 135(int8_t) Constant 77 + 150: 136 ConstantComposite 149 + 151: 135(int8_t) Constant 78 + 152: 136 ConstantComposite 151 + 153: TypePointer Function 11 + 155: 6(float) Constant 1120534528 + 156: 11 ConstantComposite 155 + 157: TypePointer Function 29 + 159:28(float16_t) Constant 22112 + 160: 29 ConstantComposite 159 + 163: TypePointer Function 46 + 165: 7(int) Constant 103 + 166: 46 ConstantComposite 165 + 169: TypePointer Function 64 + 171: 63(int16_t) Constant 104 + 172: 64 ConstantComposite 171 + 175: TypePointer Function 82 + 177: 81(int8_t) Constant 105 + 178: 82 ConstantComposite 177 + 181: TypePointer Function 100 + 183: 99(int) Constant 106 + 184: 100 ConstantComposite 183 + 187: TypePointer Function 118 + 189:117(int16_t) Constant 107 + 190: 118 ConstantComposite 189 + 193: TypePointer Function 136 + 195: 135(int8_t) Constant 108 + 196: 136 ConstantComposite 195 + 200: 6(float) Constant 1121845248 + 201: 11 ConstantComposite 200 + 205:28(float16_t) Constant 22272 + 206: 29 ConstantComposite 205 + 208: 7(int) Constant 113 + 209: 46 ConstantComposite 208 + 213: 63(int16_t) Constant 114 + 214: 64 ConstantComposite 213 + 218: 81(int8_t) Constant 115 + 219: 82 ConstantComposite 218 + 223: 99(int) Constant 116 + 224: 100 ConstantComposite 223 + 228:117(int16_t) Constant 117 + 229: 118 ConstantComposite 228 + 233: 135(int8_t) Constant 118 + 234: 136 ConstantComposite 233 + 238: 6(float) Constant 1123155968 + 239: 11 ConstantComposite 238 + 243:28(float16_t) Constant 22432 + 244: 29 ConstantComposite 243 + 248: 7(int) Constant 123 + 249: 46 ConstantComposite 248 + 251: 63(int16_t) Constant 124 + 252: 64 ConstantComposite 251 + 256: 81(int8_t) Constant 125 + 257: 82 ConstantComposite 256 + 261: 99(int) Constant 126 + 262: 100 ConstantComposite 261 + 266:117(int16_t) Constant 127 + 267: 118 ConstantComposite 266 + 272: 135(int8_t) Constant 4294967168 + 273: 136 ConstantComposite 272 + 278: 6(float) Constant 1124270080 + 279: 11 ConstantComposite 278 + 283:28(float16_t) Constant 22560 + 284: 29 ConstantComposite 283 + 288: 7(int) Constant 133 + 289: 46 ConstantComposite 288 + 293: 63(int16_t) Constant 134 + 294: 64 ConstantComposite 293 + 296: 81(int8_t) Constant 135 + 297: 82 ConstantComposite 296 + 301: 99(int) Constant 136 + 302: 100 ConstantComposite 301 + 307:117(int16_t) Constant 137 + 308: 118 ConstantComposite 307 + 312: 135(int8_t) Constant 4294967178 + 313: 136 ConstantComposite 312 + 318: 6(float) Constant 1124925440 + 319: 11 ConstantComposite 318 + 323:28(float16_t) Constant 22640 + 324: 29 ConstantComposite 323 + 328: 7(int) Constant 143 + 329: 46 ConstantComposite 328 + 333: 63(int16_t) Constant 144 + 334: 64 ConstantComposite 333 + 338: 81(int8_t) Constant 145 + 339: 82 ConstantComposite 338 + 341: 99(int) Constant 146 + 342: 100 ConstantComposite 341 + 347:117(int16_t) Constant 147 + 348: 118 ConstantComposite 347 + 353: 135(int8_t) Constant 4294967188 + 354: 136 ConstantComposite 353 + 358: 6(float) Constant 1125580800 + 359: 11 ConstantComposite 358 + 363:28(float16_t) Constant 22720 + 364: 29 ConstantComposite 363 + 368: 7(int) Constant 153 + 369: 46 ConstantComposite 368 + 373: 63(int16_t) Constant 154 + 374: 64 ConstantComposite 373 + 379: 81(int8_t) Constant 155 + 380: 82 ConstantComposite 379 + 385: 99(int) Constant 156 + 386: 100 ConstantComposite 385 + 388:117(int16_t) Constant 157 + 389: 118 ConstantComposite 388 + 393: 135(int8_t) Constant 4294967198 + 394: 136 ConstantComposite 393 + 398: 6(float) Constant 1126236160 + 399: 11 ConstantComposite 398 + 403:28(float16_t) Constant 22800 + 404: 29 ConstantComposite 403 + 408: 7(int) Constant 163 + 409: 46 ConstantComposite 408 + 414: 63(int16_t) Constant 164 + 415: 64 ConstantComposite 414 + 419: 81(int8_t) Constant 165 + 420: 82 ConstantComposite 419 + 425: 99(int) Constant 166 + 426: 100 ConstantComposite 425 + 430:117(int16_t) Constant 167 + 431: 118 ConstantComposite 430 + 433: 135(int8_t) Constant 4294967208 + 434: 136 ConstantComposite 433 + 438: 6(float) Constant 1126891520 + 439: 11 ConstantComposite 438 + 443:28(float16_t) Constant 22880 + 444: 29 ConstantComposite 443 + 448: 7(int) Constant 173 + 449: 46 ConstantComposite 448 + 454: 63(int16_t) Constant 174 + 455: 64 ConstantComposite 454 + 460: 81(int8_t) Constant 175 + 461: 82 ConstantComposite 460 + 465: 99(int) Constant 176 + 466: 100 ConstantComposite 465 + 470:117(int16_t) Constant 177 + 471: 118 ConstantComposite 470 + 475: 135(int8_t) Constant 4294967218 + 476: 136 ConstantComposite 475 + 477: TypeVector 7(int) 3 + 478: 7(int) Constant 64 + 479: 7(int) Constant 1 + 480: 477(ivec3) ConstantComposite 478 479 479 + 4(main): 2 Function None 3 + 5: Label + 154(v): 153(ptr) Variable Function + 158(v): 157(ptr) Variable Function + 164(v): 163(ptr) Variable Function + 170(v): 169(ptr) Variable Function + 176(v): 175(ptr) Variable Function + 182(v): 181(ptr) Variable Function + 188(v): 187(ptr) Variable Function + 194(v): 193(ptr) Variable Function + 199(v): 153(ptr) Variable Function + 204(v): 157(ptr) Variable Function + 207(v): 163(ptr) Variable Function + 212(v): 169(ptr) Variable Function + 217(v): 175(ptr) Variable Function + 222(v): 181(ptr) Variable Function + 227(v): 187(ptr) Variable Function + 232(v): 193(ptr) Variable Function + 237(v): 153(ptr) Variable Function + 242(v): 157(ptr) Variable Function + 247(v): 163(ptr) Variable Function + 250(v): 169(ptr) Variable Function + 255(v): 175(ptr) Variable Function + 260(v): 181(ptr) Variable Function + 265(v): 187(ptr) Variable Function + 271(v): 193(ptr) Variable Function + 277(v): 153(ptr) Variable Function + 282(v): 157(ptr) Variable Function + 287(v): 163(ptr) Variable Function + 292(v): 169(ptr) Variable Function + 295(v): 175(ptr) Variable Function + 300(v): 181(ptr) Variable Function + 306(v): 187(ptr) Variable Function + 311(v): 193(ptr) Variable Function + 317(v): 153(ptr) Variable Function + 322(v): 157(ptr) Variable Function + 327(v): 163(ptr) Variable Function + 332(v): 169(ptr) Variable Function + 337(v): 175(ptr) Variable Function + 340(v): 181(ptr) Variable Function + 346(v): 187(ptr) Variable Function + 352(v): 193(ptr) Variable Function + 357(v): 153(ptr) Variable Function + 362(v): 157(ptr) Variable Function + 367(v): 163(ptr) Variable Function + 372(v): 169(ptr) Variable Function + 378(v): 175(ptr) Variable Function + 384(v): 181(ptr) Variable Function + 387(v): 187(ptr) Variable Function + 392(v): 193(ptr) Variable Function + 397(v): 153(ptr) Variable Function + 402(v): 157(ptr) Variable Function + 407(v): 163(ptr) Variable Function + 413(v): 169(ptr) Variable Function + 418(v): 175(ptr) Variable Function + 424(v): 181(ptr) Variable Function + 429(v): 187(ptr) Variable Function + 432(v): 193(ptr) Variable Function + 437(v): 153(ptr) Variable Function + 442(v): 157(ptr) Variable Function + 447(v): 163(ptr) Variable Function + 453(v): 169(ptr) Variable Function + 459(v): 175(ptr) Variable Function + 464(v): 181(ptr) Variable Function + 469(v): 187(ptr) Variable Function + 474(v): 193(ptr) Variable Function + Store 154(v) 156 + Store 158(v) 160 + 161: 29 Load 158(v) + 162: 11 FConvert 161 + Store 164(v) 166 + 167: 46 Load 164(v) + 168: 11 ConvertUToF 167 + Store 170(v) 172 + 173: 64 Load 170(v) + 174: 11 ConvertUToF 173 + Store 176(v) 178 + 179: 82 Load 176(v) + 180: 11 ConvertUToF 179 + Store 182(v) 184 + 185: 100 Load 182(v) + 186: 11 ConvertSToF 185 + Store 188(v) 190 + 191: 118 Load 188(v) + 192: 11 ConvertSToF 191 + Store 194(v) 196 + 197: 136 Load 194(v) + 198: 11 ConvertSToF 197 + Store 199(v) 201 + 202: 11 Load 199(v) + 203: 29 FConvert 202 + Store 204(v) 206 + Store 207(v) 209 + 210: 46 Load 207(v) + 211: 29 ConvertUToF 210 + Store 212(v) 214 + 215: 64 Load 212(v) + 216: 29 ConvertUToF 215 + Store 217(v) 219 + 220: 82 Load 217(v) + 221: 29 ConvertUToF 220 + Store 222(v) 224 + 225: 100 Load 222(v) + 226: 29 ConvertSToF 225 + Store 227(v) 229 + 230: 118 Load 227(v) + 231: 29 ConvertSToF 230 + Store 232(v) 234 + 235: 136 Load 232(v) + 236: 29 ConvertSToF 235 + Store 237(v) 239 + 240: 11 Load 237(v) + 241: 46 ConvertFToU 240 + Store 242(v) 244 + 245: 29 Load 242(v) + 246: 46 ConvertFToU 245 + Store 247(v) 249 + Store 250(v) 252 + 253: 64 Load 250(v) + 254: 46 UConvert 253 + Store 255(v) 257 + 258: 82 Load 255(v) + 259: 46 UConvert 258 + Store 260(v) 262 + 263: 100 Load 260(v) + 264: 46 Bitcast 263 + Store 265(v) 267 + 268: 118 Load 265(v) + 269: 100 SConvert 268 + 270: 46 Bitcast 269 + Store 271(v) 273 + 274: 136 Load 271(v) + 275: 100 SConvert 274 + 276: 46 Bitcast 275 + Store 277(v) 279 + 280: 11 Load 277(v) + 281: 64 ConvertFToU 280 + Store 282(v) 284 + 285: 29 Load 282(v) + 286: 64 ConvertFToU 285 + Store 287(v) 289 + 290: 46 Load 287(v) + 291: 64 UConvert 290 + Store 292(v) 294 + Store 295(v) 297 + 298: 82 Load 295(v) + 299: 64 UConvert 298 + Store 300(v) 302 + 303: 100 Load 300(v) + 304: 118 SConvert 303 + 305: 64 Bitcast 304 + Store 306(v) 308 + 309: 118 Load 306(v) + 310: 64 Bitcast 309 + Store 311(v) 313 + 314: 136 Load 311(v) + 315: 118 SConvert 314 + 316: 64 Bitcast 315 + Store 317(v) 319 + 320: 11 Load 317(v) + 321: 82 ConvertFToU 320 + Store 322(v) 324 + 325: 29 Load 322(v) + 326: 82 ConvertFToU 325 + Store 327(v) 329 + 330: 46 Load 327(v) + 331: 82 UConvert 330 + Store 332(v) 334 + 335: 64 Load 332(v) + 336: 82 UConvert 335 + Store 337(v) 339 + Store 340(v) 342 + 343: 100 Load 340(v) + 344: 136 SConvert 343 + 345: 82 Bitcast 344 + Store 346(v) 348 + 349: 118 Load 346(v) + 350: 136 SConvert 349 + 351: 82 Bitcast 350 + Store 352(v) 354 + 355: 136 Load 352(v) + 356: 82 Bitcast 355 + Store 357(v) 359 + 360: 11 Load 357(v) + 361: 100 ConvertFToS 360 + Store 362(v) 364 + 365: 29 Load 362(v) + 366: 100 ConvertFToS 365 + Store 367(v) 369 + 370: 46 Load 367(v) + 371: 100 Bitcast 370 + Store 372(v) 374 + 375: 64 Load 372(v) + 376: 46 UConvert 375 + 377: 100 Bitcast 376 + Store 378(v) 380 + 381: 82 Load 378(v) + 382: 46 UConvert 381 + 383: 100 Bitcast 382 + Store 384(v) 386 + Store 387(v) 389 + 390: 118 Load 387(v) + 391: 100 SConvert 390 + Store 392(v) 394 + 395: 136 Load 392(v) + 396: 100 SConvert 395 + Store 397(v) 399 + 400: 11 Load 397(v) + 401: 118 ConvertFToS 400 + Store 402(v) 404 + 405: 29 Load 402(v) + 406: 118 ConvertFToS 405 + Store 407(v) 409 + 410: 46 Load 407(v) + 411: 64 UConvert 410 + 412: 118 Bitcast 411 + Store 413(v) 415 + 416: 64 Load 413(v) + 417: 118 Bitcast 416 + Store 418(v) 420 + 421: 82 Load 418(v) + 422: 64 UConvert 421 + 423: 118 Bitcast 422 + Store 424(v) 426 + 427: 100 Load 424(v) + 428: 118 SConvert 427 + Store 429(v) 431 + Store 432(v) 434 + 435: 136 Load 432(v) + 436: 118 SConvert 435 + Store 437(v) 439 + 440: 11 Load 437(v) + 441: 136 ConvertFToS 440 + Store 442(v) 444 + 445: 29 Load 442(v) + 446: 136 ConvertFToS 445 + Store 447(v) 449 + 450: 46 Load 447(v) + 451: 82 UConvert 450 + 452: 136 Bitcast 451 + Store 453(v) 455 + 456: 64 Load 453(v) + 457: 82 UConvert 456 + 458: 136 Bitcast 457 + Store 459(v) 461 + 462: 82 Load 459(v) + 463: 136 Bitcast 462 + Store 464(v) 466 + 467: 100 Load 464(v) + 468: 136 SConvert 467 + Store 469(v) 471 + 472: 118 Load 469(v) + 473: 136 SConvert 472 + Store 474(v) 476 + Return + FunctionEnd diff --git a/Test/baseResults/spv.coopmatKHR_constructorError.comp.out b/Test/baseResults/spv.coopmatKHR_constructorError.comp.out new file mode 100755 index 00000000..040e7620 --- /dev/null +++ b/Test/baseResults/spv.coopmatKHR_constructorError.comp.out @@ -0,0 +1,9 @@ +spv.coopmatKHR_constructorError.comp +ERROR: 0:12: 'constructor' : Cooperative matrix type parameters mismatch +ERROR: 0:13: 'constructor' : Cooperative matrix type parameters mismatch +ERROR: 0:14: 'constructor' : Cooperative matrix type parameters mismatch +ERROR: 0:15: 'constructor' : Cooperative matrix type parameters mismatch +ERROR: 4 compilation errors. No code generated. + + +SPIR-V is not generated for failed compile or link diff --git a/Test/baseResults/spv.debugInfo.1.1.frag.out b/Test/baseResults/spv.debugInfo.1.1.frag.out index 67175de9..12726756 100755 --- a/Test/baseResults/spv.debugInfo.1.1.frag.out +++ b/Test/baseResults/spv.debugInfo.1.1.frag.out @@ -1,12 +1,12 @@ spv.debugInfo.frag // Module Version 10300 // Generated by (magic number): 8000b -// Id's are bound by 124 +// Id's are bound by 187 Capability Shader 2: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Fragment 5 "main" 24 52 + EntryPoint Fragment 5 "main" 30 104 ExecutionMode 5 OriginUpperLeft 1: String "spv.debugInfo.frag" Source GLSL 450 1 "#version 450 @@ -36,9 +36,40 @@ vec4 foo(S s) return r; } +float testBranch(float x, float y) +{ + float result = 0; + bool b = x > 0; + + // branch with load + if (b) { + result += 1; + } + else { + result -= 1; + } + + // branch with expression + if (x > y) { + result += x - y; + } + + // selection with load + result += b ? + 1 : -1; + + // selection with expression + result += x < y ? + y : + float(b); + + return result; +} + void main() { outv = foo(s); + outv += testBranch(inv.x, inv.y); outv += texture(s2d, vec2(0.5)); switch (s.a) { @@ -66,17 +97,24 @@ void main() MemberName 8(S) 0 "a" Name 14 "foo(struct-S-i11;" Name 13 "s" - Name 17 "r" - Name 24 "inv" - Name 52 "outv" - Name 53 "S" - MemberName 53(S) 0 "a" - Name 54 "ubuf" - MemberName 54(ubuf) 0 "s" - Name 56 "" - Name 57 "param" - Name 67 "s2d" - Name 97 "i" + Name 20 "testBranch(f1;f1;" + Name 18 "x" + Name 19 "y" + Name 23 "r" + Name 30 "inv" + Name 56 "result" + Name 59 "b" + Name 104 "outv" + Name 105 "S" + MemberName 105(S) 0 "a" + Name 106 "ubuf" + MemberName 106(ubuf) 0 "s" + Name 108 "" + Name 109 "param" + Name 116 "param" + Name 120 "param" + Name 131 "s2d" + Name 161 "i" ModuleProcessed "no-storage-format" ModuleProcessed "resource-set-binding 3" ModuleProcessed "auto-map-bindings" @@ -88,15 +126,15 @@ void main() ModuleProcessed "suppress-warnings" ModuleProcessed "hlsl-offsets" ModuleProcessed "entry-point main" - Decorate 24(inv) Location 0 - Decorate 52(outv) Location 0 - MemberDecorate 53(S) 0 Offset 0 - MemberDecorate 54(ubuf) 0 Offset 0 - Decorate 54(ubuf) Block - Decorate 56 DescriptorSet 3 - Decorate 56 Binding 0 - Decorate 67(s2d) DescriptorSet 3 - Decorate 67(s2d) Binding 1 + Decorate 30(inv) Location 0 + Decorate 104(outv) Location 0 + MemberDecorate 105(S) 0 Offset 0 + MemberDecorate 106(ubuf) 0 Offset 0 + Decorate 106(ubuf) Block + Decorate 108 DescriptorSet 3 + Decorate 108 Binding 0 + Decorate 131(s2d) DescriptorSet 3 + Decorate 131(s2d) Binding 1 3: TypeVoid 4: TypeFunction 3 7: TypeInt 32 1 @@ -105,179 +143,280 @@ void main() 10: TypeFloat 32 11: TypeVector 10(float) 4 12: TypeFunction 11(fvec4) 9(ptr) - 16: TypePointer Function 11(fvec4) - 18: 7(int) Constant 0 - 19: TypePointer Function 7(int) - 23: TypePointer Input 11(fvec4) - 24(inv): 23(ptr) Variable Input - 28: 10(float) Constant 1065353216 - 31: TypeInt 32 0 - 32: 31(int) Constant 0 - 33: TypePointer Function 10(float) - 36: 10(float) Constant 1077936128 - 37: TypeBool - 45: 10(float) Constant 1073741824 - 51: TypePointer Output 11(fvec4) - 52(outv): 51(ptr) Variable Output - 53(S): TypeStruct 7(int) - 54(ubuf): TypeStruct 53(S) - 55: TypePointer Uniform 54(ubuf) - 56: 55(ptr) Variable Uniform - 58: TypePointer Uniform 53(S) - 64: TypeImage 10(float) 2D sampled format:Unknown - 65: TypeSampledImage 64 - 66: TypePointer UniformConstant 65 - 67(s2d): 66(ptr) Variable UniformConstant - 69: TypeVector 10(float) 2 - 70: 10(float) Constant 1056964608 - 71: 69(fvec2) ConstantComposite 70 70 - 75: TypePointer Uniform 7(int) - 104: 7(int) Constant 10 - 109: 7(int) Constant 1 - 111: TypePointer Output 10(float) - 114: 10(float) Constant 1092616192 - Line 1 28 11 + 16: TypePointer Function 10(float) + 17: TypeFunction 10(float) 16(ptr) 16(ptr) + 22: TypePointer Function 11(fvec4) + 24: 7(int) Constant 0 + 25: TypePointer Function 7(int) + 29: TypePointer Input 11(fvec4) + 30(inv): 29(ptr) Variable Input + 34: 10(float) Constant 1065353216 + 37: TypeInt 32 0 + 38: 37(int) Constant 0 + 41: 10(float) Constant 1077936128 + 42: TypeBool + 50: 10(float) Constant 1073741824 + 57: 10(float) Constant 0 + 58: TypePointer Function 42(bool) + 81: 7(int) Constant 1 + 82: 7(int) Constant 4294967295 + 103: TypePointer Output 11(fvec4) + 104(outv): 103(ptr) Variable Output + 105(S): TypeStruct 7(int) + 106(ubuf): TypeStruct 105(S) + 107: TypePointer Uniform 106(ubuf) + 108: 107(ptr) Variable Uniform + 110: TypePointer Uniform 105(S) + 117: TypePointer Input 10(float) + 121: 37(int) Constant 1 + 128: TypeImage 10(float) 2D sampled format:Unknown + 129: TypeSampledImage 128 + 130: TypePointer UniformConstant 129 + 131(s2d): 130(ptr) Variable UniformConstant + 133: TypeVector 10(float) 2 + 134: 10(float) Constant 1056964608 + 135: 133(fvec2) ConstantComposite 134 134 + 139: TypePointer Uniform 7(int) + 168: 7(int) Constant 10 + 174: TypePointer Output 10(float) + 177: 10(float) Constant 1092616192 + Line 1 58 11 5(main): 3 Function None 4 6: Label - 57(param): 9(ptr) Variable Function - 97(i): 19(ptr) Variable Function - 116: 16(ptr) Variable Function - Line 1 30 0 - 59: 58(ptr) AccessChain 56 18 - 60: 53(S) Load 59 - 61: 7(int) CompositeExtract 60 0 - 62: 19(ptr) AccessChain 57(param) 18 - Store 62 61 - 63: 11(fvec4) FunctionCall 14(foo(struct-S-i11;) 57(param) - Store 52(outv) 63 - Line 1 31 0 - 68: 65 Load 67(s2d) - 72: 11(fvec4) ImageSampleImplicitLod 68 71 - 73: 11(fvec4) Load 52(outv) - 74: 11(fvec4) FAdd 73 72 - Store 52(outv) 74 - Line 1 33 0 - 76: 75(ptr) AccessChain 56 18 18 - 77: 7(int) Load 76 - SelectionMerge 81 None - Switch 77 80 - case 10: 78 - case 20: 79 - 80: Label - Line 1 42 0 - 92: 11(fvec4) Load 52(outv) - 93: 11(fvec4) CompositeConstruct 28 28 28 28 - 94: 11(fvec4) FSub 92 93 - Store 52(outv) 94 - Line 1 43 0 - Branch 81 - 78: Label - Line 1 35 0 - 82: 11(fvec4) Load 52(outv) - 83: 11(fvec4) CompositeConstruct 28 28 28 28 - 84: 11(fvec4) FAdd 82 83 - Store 52(outv) 84 - Line 1 36 0 - Branch 81 - 79: Label - Line 1 38 0 - 86: 11(fvec4) Load 52(outv) - 87: 11(fvec4) VectorTimesScalar 86 45 - Store 52(outv) 87 - Line 1 39 0 - 88: 11(fvec4) Load 52(outv) - 89: 11(fvec4) CompositeConstruct 28 28 28 28 - 90: 11(fvec4) FAdd 88 89 - Store 52(outv) 90 - Line 1 40 0 - Branch 81 - 81: Label - Line 1 46 0 - Store 97(i) 18 - Branch 98 - 98: Label - Line 1 46 0 - LoopMerge 100 101 None - Branch 102 - 102: Label - Line 1 46 0 - 103: 7(int) Load 97(i) - 105: 37(bool) SLessThan 103 104 - BranchConditional 105 99 100 - 99: Label - Line 1 47 0 - 106: 11(fvec4) Load 52(outv) - 107: 11(fvec4) VectorTimesScalar 106 36 - Store 52(outv) 107 - Branch 101 - 101: Label - Line 1 46 0 - 108: 7(int) Load 97(i) - 110: 7(int) IAdd 108 109 - Store 97(i) 110 - Branch 98 - 100: Label - Line 1 49 0 - 112: 111(ptr) AccessChain 52(outv) 32 - 113: 10(float) Load 112 - 115: 37(bool) FOrdLessThan 113 114 - SelectionMerge 118 None - BranchConditional 115 117 121 - 117: Label - Line 1 50 0 - 119: 11(fvec4) Load 52(outv) - 120: 11(fvec4) ExtInst 2(GLSL.std.450) 13(Sin) 119 - Store 52(outv) 120 - Store 116 120 - Branch 118 - 121: Label - Line 1 51 0 - 122: 11(fvec4) Load 52(outv) - 123: 11(fvec4) ExtInst 2(GLSL.std.450) 14(Cos) 122 - Store 52(outv) 123 - Store 116 123 - Branch 118 - 118: Label + 109(param): 9(ptr) Variable Function + 116(param): 16(ptr) Variable Function + 120(param): 16(ptr) Variable Function + 161(i): 25(ptr) Variable Function + 179: 22(ptr) Variable Function + Line 1 60 0 + 111: 110(ptr) AccessChain 108 24 + 112: 105(S) Load 111 + 113: 7(int) CompositeExtract 112 0 + 114: 25(ptr) AccessChain 109(param) 24 + Store 114 113 + 115: 11(fvec4) FunctionCall 14(foo(struct-S-i11;) 109(param) + Store 104(outv) 115 + Line 1 61 0 + 118: 117(ptr) AccessChain 30(inv) 38 + 119: 10(float) Load 118 + Store 116(param) 119 + 122: 117(ptr) AccessChain 30(inv) 121 + 123: 10(float) Load 122 + Store 120(param) 123 + 124: 10(float) FunctionCall 20(testBranch(f1;f1;) 116(param) 120(param) + 125: 11(fvec4) Load 104(outv) + 126: 11(fvec4) CompositeConstruct 124 124 124 124 + 127: 11(fvec4) FAdd 125 126 + Store 104(outv) 127 + Line 1 62 0 + 132: 129 Load 131(s2d) + 136: 11(fvec4) ImageSampleImplicitLod 132 135 + 137: 11(fvec4) Load 104(outv) + 138: 11(fvec4) FAdd 137 136 + Store 104(outv) 138 + Line 1 64 0 + 140: 139(ptr) AccessChain 108 24 24 + 141: 7(int) Load 140 + SelectionMerge 145 None + Switch 141 144 + case 10: 142 + case 20: 143 + 144: Label + Line 1 73 0 + 156: 11(fvec4) Load 104(outv) + 157: 11(fvec4) CompositeConstruct 34 34 34 34 + 158: 11(fvec4) FSub 156 157 + Store 104(outv) 158 + Line 1 74 0 + Branch 145 + 142: Label + Line 1 66 0 + 146: 11(fvec4) Load 104(outv) + 147: 11(fvec4) CompositeConstruct 34 34 34 34 + 148: 11(fvec4) FAdd 146 147 + Store 104(outv) 148 + Line 1 67 0 + Branch 145 + 143: Label + Line 1 69 0 + 150: 11(fvec4) Load 104(outv) + 151: 11(fvec4) VectorTimesScalar 150 50 + Store 104(outv) 151 + Line 1 70 0 + 152: 11(fvec4) Load 104(outv) + 153: 11(fvec4) CompositeConstruct 34 34 34 34 + 154: 11(fvec4) FAdd 152 153 + Store 104(outv) 154 + Line 1 71 0 + Branch 145 + 145: Label + Line 1 77 0 + Store 161(i) 24 + Branch 162 + 162: Label + Line 1 77 0 + LoopMerge 164 165 None + Branch 166 + 166: Label + Line 1 77 0 + 167: 7(int) Load 161(i) + 169: 42(bool) SLessThan 167 168 + BranchConditional 169 163 164 + 163: Label + Line 1 78 0 + 170: 11(fvec4) Load 104(outv) + 171: 11(fvec4) VectorTimesScalar 170 41 + Store 104(outv) 171 + Branch 165 + 165: Label + Line 1 77 0 + 172: 7(int) Load 161(i) + 173: 7(int) IAdd 172 81 + Store 161(i) 173 + Branch 162 + 164: Label + Line 1 80 0 + 175: 174(ptr) AccessChain 104(outv) 38 + 176: 10(float) Load 175 + 178: 42(bool) FOrdLessThan 176 177 + SelectionMerge 181 None + BranchConditional 178 180 184 + 180: Label + Line 1 81 0 + 182: 11(fvec4) Load 104(outv) + 183: 11(fvec4) ExtInst 2(GLSL.std.450) 13(Sin) 182 + Store 104(outv) 183 + Store 179 183 + Branch 181 + 184: Label + Line 1 82 0 + 185: 11(fvec4) Load 104(outv) + 186: 11(fvec4) ExtInst 2(GLSL.std.450) 14(Cos) 185 + Store 104(outv) 186 + Store 179 186 + Branch 181 + 181: Label Return FunctionEnd Line 1 16 13 14(foo(struct-S-i11;): 11(fvec4) Function None 12 13(s): 9(ptr) FunctionParameter 15: Label - 17(r): 16(ptr) Variable Function + 23(r): 22(ptr) Variable Function Line 1 18 0 - 20: 19(ptr) AccessChain 13(s) 18 - 21: 7(int) Load 20 - 22: 10(float) ConvertSToF 21 - 25: 11(fvec4) Load 24(inv) - 26: 11(fvec4) VectorTimesScalar 25 22 - Store 17(r) 26 + 26: 25(ptr) AccessChain 13(s) 24 + 27: 7(int) Load 26 + 28: 10(float) ConvertSToF 27 + 31: 11(fvec4) Load 30(inv) + 32: 11(fvec4) VectorTimesScalar 31 28 + Store 23(r) 32 Line 1 19 0 - 27: 11(fvec4) Load 17(r) - 29: 11(fvec4) CompositeConstruct 28 28 28 28 - 30: 11(fvec4) FAdd 27 29 - Store 17(r) 30 + 33: 11(fvec4) Load 23(r) + 35: 11(fvec4) CompositeConstruct 34 34 34 34 + 36: 11(fvec4) FAdd 33 35 + Store 23(r) 36 Line 1 20 0 - 34: 33(ptr) AccessChain 17(r) 32 - 35: 10(float) Load 34 - 38: 37(bool) FOrdGreaterThan 35 36 - SelectionMerge 40 None - BranchConditional 38 39 44 - 39: Label - Line 1 21 0 - 41: 11(fvec4) Load 17(r) - 42: 11(fvec4) CompositeConstruct 28 28 28 28 - 43: 11(fvec4) FSub 41 42 - Store 17(r) 43 - Branch 40 + 39: 16(ptr) AccessChain 23(r) 38 + 40: 10(float) Load 39 + 43: 42(bool) FOrdGreaterThan 40 41 + SelectionMerge 45 None + BranchConditional 43 44 49 44: Label + Line 1 21 0 + 46: 11(fvec4) Load 23(r) + 47: 11(fvec4) CompositeConstruct 34 34 34 34 + 48: 11(fvec4) FSub 46 47 + Store 23(r) 48 + Branch 45 + 49: Label Line 1 23 0 - 46: 11(fvec4) Load 17(r) - 47: 11(fvec4) VectorTimesScalar 46 45 - Store 17(r) 47 - Branch 40 - 40: Label + 51: 11(fvec4) Load 23(r) + 52: 11(fvec4) VectorTimesScalar 51 50 + Store 23(r) 52 + Branch 45 + 45: Label Line 1 25 0 - 48: 11(fvec4) Load 17(r) - ReturnValue 48 + 53: 11(fvec4) Load 23(r) + ReturnValue 53 + FunctionEnd + Line 1 28 34 +20(testBranch(f1;f1;): 10(float) Function None 17 + 18(x): 16(ptr) FunctionParameter + 19(y): 16(ptr) FunctionParameter + 21: Label + 56(result): 16(ptr) Variable Function + 59(b): 58(ptr) Variable Function + 90: 16(ptr) Variable Function + Line 1 30 0 + Store 56(result) 57 + Line 1 31 0 + 60: 10(float) Load 18(x) + 61: 42(bool) FOrdGreaterThan 60 57 + Store 59(b) 61 + Line 1 34 0 + 62: 42(bool) Load 59(b) + SelectionMerge 64 None + BranchConditional 62 63 67 + 63: Label + Line 1 35 0 + 65: 10(float) Load 56(result) + 66: 10(float) FAdd 65 34 + Store 56(result) 66 + Branch 64 + 67: Label + Line 1 38 0 + 68: 10(float) Load 56(result) + 69: 10(float) FSub 68 34 + Store 56(result) 69 + Branch 64 + 64: Label + Line 1 42 0 + 70: 10(float) Load 18(x) + 71: 10(float) Load 19(y) + 72: 42(bool) FOrdGreaterThan 70 71 + SelectionMerge 74 None + BranchConditional 72 73 74 + 73: Label + Line 1 43 0 + 75: 10(float) Load 18(x) + 76: 10(float) Load 19(y) + 77: 10(float) FSub 75 76 + 78: 10(float) Load 56(result) + 79: 10(float) FAdd 78 77 + Store 56(result) 79 + Branch 74 + 74: Label + Line 1 47 0 + 80: 42(bool) Load 59(b) + 83: 7(int) Select 80 81 82 + 84: 10(float) ConvertSToF 83 + 85: 10(float) Load 56(result) + 86: 10(float) FAdd 85 84 + Store 56(result) 86 + Line 1 51 0 + 87: 10(float) Load 18(x) + 88: 10(float) Load 19(y) + 89: 42(bool) FOrdLessThan 87 88 + SelectionMerge 92 None + BranchConditional 89 91 94 + 91: Label + Line 1 52 0 + 93: 10(float) Load 19(y) + Store 90 93 + Branch 92 + 94: Label + Line 1 53 0 + 95: 42(bool) Load 59(b) + 96: 10(float) Select 95 34 57 + Store 90 96 + Branch 92 + 92: Label + 97: 10(float) Load 90 + Line 1 51 0 + 98: 10(float) Load 56(result) + 99: 10(float) FAdd 98 97 + Store 56(result) 99 + Line 1 55 0 + 100: 10(float) Load 56(result) + ReturnValue 100 FunctionEnd diff --git a/Test/baseResults/spv.debugInfo.frag.out b/Test/baseResults/spv.debugInfo.frag.out index b9eb496a..8bacd74d 100755 --- a/Test/baseResults/spv.debugInfo.frag.out +++ b/Test/baseResults/spv.debugInfo.frag.out @@ -1,12 +1,12 @@ spv.debugInfo.frag // Module Version 10000 // Generated by (magic number): 8000b -// Id's are bound by 124 +// Id's are bound by 187 Capability Shader 2: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Fragment 5 "main" 24 52 + EntryPoint Fragment 5 "main" 30 104 ExecutionMode 5 OriginLowerLeft 1: String "spv.debugInfo.frag" Source GLSL 450 1 "// OpModuleProcessed no-storage-format @@ -47,9 +47,40 @@ vec4 foo(S s) return r; } +float testBranch(float x, float y) +{ + float result = 0; + bool b = x > 0; + + // branch with load + if (b) { + result += 1; + } + else { + result -= 1; + } + + // branch with expression + if (x > y) { + result += x - y; + } + + // selection with load + result += b ? + 1 : -1; + + // selection with expression + result += x < y ? + y : + float(b); + + return result; +} + void main() { outv = foo(s); + outv += testBranch(inv.x, inv.y); outv += texture(s2d, vec2(0.5)); switch (s.a) { @@ -77,27 +108,34 @@ void main() MemberName 8(S) 0 "a" Name 14 "foo(struct-S-i11;" Name 13 "s" - Name 17 "r" - Name 24 "inv" - Name 52 "outv" - Name 53 "S" - MemberName 53(S) 0 "a" - Name 54 "ubuf" - MemberName 54(ubuf) 0 "s" - Name 56 "" - Name 57 "param" - Name 67 "s2d" - Name 97 "i" - Decorate 24(inv) Location 0 - Decorate 52(outv) Location 0 - MemberDecorate 53(S) 0 Offset 0 - MemberDecorate 54(ubuf) 0 Offset 0 - Decorate 54(ubuf) Block - Decorate 56 DescriptorSet 3 - Decorate 56 Binding 0 - Decorate 67(s2d) Location 0 - Decorate 67(s2d) DescriptorSet 3 - Decorate 67(s2d) Binding 1 + Name 20 "testBranch(f1;f1;" + Name 18 "x" + Name 19 "y" + Name 23 "r" + Name 30 "inv" + Name 56 "result" + Name 59 "b" + Name 104 "outv" + Name 105 "S" + MemberName 105(S) 0 "a" + Name 106 "ubuf" + MemberName 106(ubuf) 0 "s" + Name 108 "" + Name 109 "param" + Name 116 "param" + Name 120 "param" + Name 131 "s2d" + Name 161 "i" + Decorate 30(inv) Location 0 + Decorate 104(outv) Location 0 + MemberDecorate 105(S) 0 Offset 0 + MemberDecorate 106(ubuf) 0 Offset 0 + Decorate 106(ubuf) Block + Decorate 108 DescriptorSet 3 + Decorate 108 Binding 0 + Decorate 131(s2d) Location 0 + Decorate 131(s2d) DescriptorSet 3 + Decorate 131(s2d) Binding 1 3: TypeVoid 4: TypeFunction 3 7: TypeInt 32 1 @@ -106,179 +144,280 @@ void main() 10: TypeFloat 32 11: TypeVector 10(float) 4 12: TypeFunction 11(fvec4) 9(ptr) - 16: TypePointer Function 11(fvec4) - 18: 7(int) Constant 0 - 19: TypePointer Function 7(int) - 23: TypePointer Input 11(fvec4) - 24(inv): 23(ptr) Variable Input - 28: 10(float) Constant 1065353216 - 31: TypeInt 32 0 - 32: 31(int) Constant 0 - 33: TypePointer Function 10(float) - 36: 10(float) Constant 1077936128 - 37: TypeBool - 45: 10(float) Constant 1073741824 - 51: TypePointer Output 11(fvec4) - 52(outv): 51(ptr) Variable Output - 53(S): TypeStruct 7(int) - 54(ubuf): TypeStruct 53(S) - 55: TypePointer Uniform 54(ubuf) - 56: 55(ptr) Variable Uniform - 58: TypePointer Uniform 53(S) - 64: TypeImage 10(float) 2D sampled format:Unknown - 65: TypeSampledImage 64 - 66: TypePointer UniformConstant 65 - 67(s2d): 66(ptr) Variable UniformConstant - 69: TypeVector 10(float) 2 - 70: 10(float) Constant 1056964608 - 71: 69(fvec2) ConstantComposite 70 70 - 75: TypePointer Uniform 7(int) - 104: 7(int) Constant 10 - 109: 7(int) Constant 1 - 111: TypePointer Output 10(float) - 114: 10(float) Constant 1092616192 - Line 1 28 11 + 16: TypePointer Function 10(float) + 17: TypeFunction 10(float) 16(ptr) 16(ptr) + 22: TypePointer Function 11(fvec4) + 24: 7(int) Constant 0 + 25: TypePointer Function 7(int) + 29: TypePointer Input 11(fvec4) + 30(inv): 29(ptr) Variable Input + 34: 10(float) Constant 1065353216 + 37: TypeInt 32 0 + 38: 37(int) Constant 0 + 41: 10(float) Constant 1077936128 + 42: TypeBool + 50: 10(float) Constant 1073741824 + 57: 10(float) Constant 0 + 58: TypePointer Function 42(bool) + 81: 7(int) Constant 1 + 82: 7(int) Constant 4294967295 + 103: TypePointer Output 11(fvec4) + 104(outv): 103(ptr) Variable Output + 105(S): TypeStruct 7(int) + 106(ubuf): TypeStruct 105(S) + 107: TypePointer Uniform 106(ubuf) + 108: 107(ptr) Variable Uniform + 110: TypePointer Uniform 105(S) + 117: TypePointer Input 10(float) + 121: 37(int) Constant 1 + 128: TypeImage 10(float) 2D sampled format:Unknown + 129: TypeSampledImage 128 + 130: TypePointer UniformConstant 129 + 131(s2d): 130(ptr) Variable UniformConstant + 133: TypeVector 10(float) 2 + 134: 10(float) Constant 1056964608 + 135: 133(fvec2) ConstantComposite 134 134 + 139: TypePointer Uniform 7(int) + 168: 7(int) Constant 10 + 174: TypePointer Output 10(float) + 177: 10(float) Constant 1092616192 + Line 1 58 11 5(main): 3 Function None 4 6: Label - 57(param): 9(ptr) Variable Function - 97(i): 19(ptr) Variable Function - 116: 16(ptr) Variable Function - Line 1 30 0 - 59: 58(ptr) AccessChain 56 18 - 60: 53(S) Load 59 - 61: 7(int) CompositeExtract 60 0 - 62: 19(ptr) AccessChain 57(param) 18 - Store 62 61 - 63: 11(fvec4) FunctionCall 14(foo(struct-S-i11;) 57(param) - Store 52(outv) 63 - Line 1 31 0 - 68: 65 Load 67(s2d) - 72: 11(fvec4) ImageSampleImplicitLod 68 71 - 73: 11(fvec4) Load 52(outv) - 74: 11(fvec4) FAdd 73 72 - Store 52(outv) 74 - Line 1 33 0 - 76: 75(ptr) AccessChain 56 18 18 - 77: 7(int) Load 76 - SelectionMerge 81 None - Switch 77 80 - case 10: 78 - case 20: 79 - 80: Label - Line 1 42 0 - 92: 11(fvec4) Load 52(outv) - 93: 11(fvec4) CompositeConstruct 28 28 28 28 - 94: 11(fvec4) FSub 92 93 - Store 52(outv) 94 - Line 1 43 0 - Branch 81 - 78: Label - Line 1 35 0 - 82: 11(fvec4) Load 52(outv) - 83: 11(fvec4) CompositeConstruct 28 28 28 28 - 84: 11(fvec4) FAdd 82 83 - Store 52(outv) 84 - Line 1 36 0 - Branch 81 - 79: Label - Line 1 38 0 - 86: 11(fvec4) Load 52(outv) - 87: 11(fvec4) VectorTimesScalar 86 45 - Store 52(outv) 87 - Line 1 39 0 - 88: 11(fvec4) Load 52(outv) - 89: 11(fvec4) CompositeConstruct 28 28 28 28 - 90: 11(fvec4) FAdd 88 89 - Store 52(outv) 90 - Line 1 40 0 - Branch 81 - 81: Label - Line 1 46 0 - Store 97(i) 18 - Branch 98 - 98: Label - Line 1 46 0 - LoopMerge 100 101 None - Branch 102 - 102: Label - Line 1 46 0 - 103: 7(int) Load 97(i) - 105: 37(bool) SLessThan 103 104 - BranchConditional 105 99 100 - 99: Label - Line 1 47 0 - 106: 11(fvec4) Load 52(outv) - 107: 11(fvec4) VectorTimesScalar 106 36 - Store 52(outv) 107 - Branch 101 - 101: Label - Line 1 46 0 - 108: 7(int) Load 97(i) - 110: 7(int) IAdd 108 109 - Store 97(i) 110 - Branch 98 - 100: Label - Line 1 49 0 - 112: 111(ptr) AccessChain 52(outv) 32 - 113: 10(float) Load 112 - 115: 37(bool) FOrdLessThan 113 114 - SelectionMerge 118 None - BranchConditional 115 117 121 - 117: Label - Line 1 50 0 - 119: 11(fvec4) Load 52(outv) - 120: 11(fvec4) ExtInst 2(GLSL.std.450) 13(Sin) 119 - Store 52(outv) 120 - Store 116 120 - Branch 118 - 121: Label - Line 1 51 0 - 122: 11(fvec4) Load 52(outv) - 123: 11(fvec4) ExtInst 2(GLSL.std.450) 14(Cos) 122 - Store 52(outv) 123 - Store 116 123 - Branch 118 - 118: Label + 109(param): 9(ptr) Variable Function + 116(param): 16(ptr) Variable Function + 120(param): 16(ptr) Variable Function + 161(i): 25(ptr) Variable Function + 179: 22(ptr) Variable Function + Line 1 60 0 + 111: 110(ptr) AccessChain 108 24 + 112: 105(S) Load 111 + 113: 7(int) CompositeExtract 112 0 + 114: 25(ptr) AccessChain 109(param) 24 + Store 114 113 + 115: 11(fvec4) FunctionCall 14(foo(struct-S-i11;) 109(param) + Store 104(outv) 115 + Line 1 61 0 + 118: 117(ptr) AccessChain 30(inv) 38 + 119: 10(float) Load 118 + Store 116(param) 119 + 122: 117(ptr) AccessChain 30(inv) 121 + 123: 10(float) Load 122 + Store 120(param) 123 + 124: 10(float) FunctionCall 20(testBranch(f1;f1;) 116(param) 120(param) + 125: 11(fvec4) Load 104(outv) + 126: 11(fvec4) CompositeConstruct 124 124 124 124 + 127: 11(fvec4) FAdd 125 126 + Store 104(outv) 127 + Line 1 62 0 + 132: 129 Load 131(s2d) + 136: 11(fvec4) ImageSampleImplicitLod 132 135 + 137: 11(fvec4) Load 104(outv) + 138: 11(fvec4) FAdd 137 136 + Store 104(outv) 138 + Line 1 64 0 + 140: 139(ptr) AccessChain 108 24 24 + 141: 7(int) Load 140 + SelectionMerge 145 None + Switch 141 144 + case 10: 142 + case 20: 143 + 144: Label + Line 1 73 0 + 156: 11(fvec4) Load 104(outv) + 157: 11(fvec4) CompositeConstruct 34 34 34 34 + 158: 11(fvec4) FSub 156 157 + Store 104(outv) 158 + Line 1 74 0 + Branch 145 + 142: Label + Line 1 66 0 + 146: 11(fvec4) Load 104(outv) + 147: 11(fvec4) CompositeConstruct 34 34 34 34 + 148: 11(fvec4) FAdd 146 147 + Store 104(outv) 148 + Line 1 67 0 + Branch 145 + 143: Label + Line 1 69 0 + 150: 11(fvec4) Load 104(outv) + 151: 11(fvec4) VectorTimesScalar 150 50 + Store 104(outv) 151 + Line 1 70 0 + 152: 11(fvec4) Load 104(outv) + 153: 11(fvec4) CompositeConstruct 34 34 34 34 + 154: 11(fvec4) FAdd 152 153 + Store 104(outv) 154 + Line 1 71 0 + Branch 145 + 145: Label + Line 1 77 0 + Store 161(i) 24 + Branch 162 + 162: Label + Line 1 77 0 + LoopMerge 164 165 None + Branch 166 + 166: Label + Line 1 77 0 + 167: 7(int) Load 161(i) + 169: 42(bool) SLessThan 167 168 + BranchConditional 169 163 164 + 163: Label + Line 1 78 0 + 170: 11(fvec4) Load 104(outv) + 171: 11(fvec4) VectorTimesScalar 170 41 + Store 104(outv) 171 + Branch 165 + 165: Label + Line 1 77 0 + 172: 7(int) Load 161(i) + 173: 7(int) IAdd 172 81 + Store 161(i) 173 + Branch 162 + 164: Label + Line 1 80 0 + 175: 174(ptr) AccessChain 104(outv) 38 + 176: 10(float) Load 175 + 178: 42(bool) FOrdLessThan 176 177 + SelectionMerge 181 None + BranchConditional 178 180 184 + 180: Label + Line 1 81 0 + 182: 11(fvec4) Load 104(outv) + 183: 11(fvec4) ExtInst 2(GLSL.std.450) 13(Sin) 182 + Store 104(outv) 183 + Store 179 183 + Branch 181 + 184: Label + Line 1 82 0 + 185: 11(fvec4) Load 104(outv) + 186: 11(fvec4) ExtInst 2(GLSL.std.450) 14(Cos) 185 + Store 104(outv) 186 + Store 179 186 + Branch 181 + 181: Label Return FunctionEnd Line 1 16 13 14(foo(struct-S-i11;): 11(fvec4) Function None 12 13(s): 9(ptr) FunctionParameter 15: Label - 17(r): 16(ptr) Variable Function + 23(r): 22(ptr) Variable Function Line 1 18 0 - 20: 19(ptr) AccessChain 13(s) 18 - 21: 7(int) Load 20 - 22: 10(float) ConvertSToF 21 - 25: 11(fvec4) Load 24(inv) - 26: 11(fvec4) VectorTimesScalar 25 22 - Store 17(r) 26 + 26: 25(ptr) AccessChain 13(s) 24 + 27: 7(int) Load 26 + 28: 10(float) ConvertSToF 27 + 31: 11(fvec4) Load 30(inv) + 32: 11(fvec4) VectorTimesScalar 31 28 + Store 23(r) 32 Line 1 19 0 - 27: 11(fvec4) Load 17(r) - 29: 11(fvec4) CompositeConstruct 28 28 28 28 - 30: 11(fvec4) FAdd 27 29 - Store 17(r) 30 + 33: 11(fvec4) Load 23(r) + 35: 11(fvec4) CompositeConstruct 34 34 34 34 + 36: 11(fvec4) FAdd 33 35 + Store 23(r) 36 Line 1 20 0 - 34: 33(ptr) AccessChain 17(r) 32 - 35: 10(float) Load 34 - 38: 37(bool) FOrdGreaterThan 35 36 - SelectionMerge 40 None - BranchConditional 38 39 44 - 39: Label - Line 1 21 0 - 41: 11(fvec4) Load 17(r) - 42: 11(fvec4) CompositeConstruct 28 28 28 28 - 43: 11(fvec4) FSub 41 42 - Store 17(r) 43 - Branch 40 + 39: 16(ptr) AccessChain 23(r) 38 + 40: 10(float) Load 39 + 43: 42(bool) FOrdGreaterThan 40 41 + SelectionMerge 45 None + BranchConditional 43 44 49 44: Label + Line 1 21 0 + 46: 11(fvec4) Load 23(r) + 47: 11(fvec4) CompositeConstruct 34 34 34 34 + 48: 11(fvec4) FSub 46 47 + Store 23(r) 48 + Branch 45 + 49: Label Line 1 23 0 - 46: 11(fvec4) Load 17(r) - 47: 11(fvec4) VectorTimesScalar 46 45 - Store 17(r) 47 - Branch 40 - 40: Label + 51: 11(fvec4) Load 23(r) + 52: 11(fvec4) VectorTimesScalar 51 50 + Store 23(r) 52 + Branch 45 + 45: Label Line 1 25 0 - 48: 11(fvec4) Load 17(r) - ReturnValue 48 + 53: 11(fvec4) Load 23(r) + ReturnValue 53 + FunctionEnd + Line 1 28 34 +20(testBranch(f1;f1;): 10(float) Function None 17 + 18(x): 16(ptr) FunctionParameter + 19(y): 16(ptr) FunctionParameter + 21: Label + 56(result): 16(ptr) Variable Function + 59(b): 58(ptr) Variable Function + 90: 16(ptr) Variable Function + Line 1 30 0 + Store 56(result) 57 + Line 1 31 0 + 60: 10(float) Load 18(x) + 61: 42(bool) FOrdGreaterThan 60 57 + Store 59(b) 61 + Line 1 34 0 + 62: 42(bool) Load 59(b) + SelectionMerge 64 None + BranchConditional 62 63 67 + 63: Label + Line 1 35 0 + 65: 10(float) Load 56(result) + 66: 10(float) FAdd 65 34 + Store 56(result) 66 + Branch 64 + 67: Label + Line 1 38 0 + 68: 10(float) Load 56(result) + 69: 10(float) FSub 68 34 + Store 56(result) 69 + Branch 64 + 64: Label + Line 1 42 0 + 70: 10(float) Load 18(x) + 71: 10(float) Load 19(y) + 72: 42(bool) FOrdGreaterThan 70 71 + SelectionMerge 74 None + BranchConditional 72 73 74 + 73: Label + Line 1 43 0 + 75: 10(float) Load 18(x) + 76: 10(float) Load 19(y) + 77: 10(float) FSub 75 76 + 78: 10(float) Load 56(result) + 79: 10(float) FAdd 78 77 + Store 56(result) 79 + Branch 74 + 74: Label + Line 1 47 0 + 80: 42(bool) Load 59(b) + 83: 7(int) Select 80 81 82 + 84: 10(float) ConvertSToF 83 + 85: 10(float) Load 56(result) + 86: 10(float) FAdd 85 84 + Store 56(result) 86 + Line 1 51 0 + 87: 10(float) Load 18(x) + 88: 10(float) Load 19(y) + 89: 42(bool) FOrdLessThan 87 88 + SelectionMerge 92 None + BranchConditional 89 91 94 + 91: Label + Line 1 52 0 + 93: 10(float) Load 19(y) + Store 90 93 + Branch 92 + 94: Label + Line 1 53 0 + 95: 42(bool) Load 59(b) + 96: 10(float) Select 95 34 57 + Store 90 96 + Branch 92 + 92: Label + 97: 10(float) Load 90 + Line 1 51 0 + 98: 10(float) Load 56(result) + 99: 10(float) FAdd 98 97 + Store 56(result) 99 + Line 1 55 0 + 100: 10(float) Load 56(result) + ReturnValue 100 FunctionEnd diff --git a/Test/baseResults/spv.debuginfo.bufferref.glsl.frag.out b/Test/baseResults/spv.debuginfo.bufferref.glsl.frag.out new file mode 100755 index 00000000..f196fb0b --- /dev/null +++ b/Test/baseResults/spv.debuginfo.bufferref.glsl.frag.out @@ -0,0 +1,187 @@ +spv.debuginfo.bufferref.glsl.frag +// Module Version 10000 +// Generated by (magic number): 8000b +// Id's are bound by 132 + + Capability Shader + Capability PhysicalStorageBufferAddressesEXT + Extension "SPV_KHR_non_semantic_info" + Extension "SPV_KHR_physical_storage_buffer" + Extension "SPV_KHR_storage_buffer_storage_class" + 2: ExtInstImport "NonSemantic.Shader.DebugInfo.100" + 3: ExtInstImport "GLSL.std.450" + MemoryModel PhysicalStorageBuffer64EXT GLSL450 + EntryPoint Fragment 14 "main" 70 123 + ExecutionMode 14 OriginUpperLeft + 1: String "" + 8: String "uint" + 16: String "main" + 19: String "// OpModuleProcessed auto-map-locations +// OpModuleProcessed auto-map-bindings +// OpModuleProcessed client vulkan100 +// OpModuleProcessed target-env vulkan1.0 +// OpModuleProcessed keep-uncalled +// OpModuleProcessed entry-point main +#line 1 +" + 32: String "Mesh" + 34: String "float" + 40: String "data" + 44: String "MeshVertexPositions" + 48: String "meshData" + 60: String "PerPass_meshes" + 64: String "perPass_meshes" + 66: String "int" + 72: String "tri_idx0" + 87: String "vertex_pos0" + 125: String "out_fragColor" + SourceExtension "GL_EXT_buffer_reference" + Name 14 "main" + Name 30 "Mesh" + MemberName 30(Mesh) 0 "positions" + Name 38 "MeshVertexPositions" + MemberName 38(MeshVertexPositions) 0 "data" + Name 46 "meshData" + Name 51 "Mesh" + MemberName 51(Mesh) 0 "positions" + Name 55 "PerPass_meshes" + MemberName 55(PerPass_meshes) 0 "data" + Name 62 "perPass_meshes" + Name 70 "tri_idx0" + Name 85 "vertex_pos0" + Name 123 "out_fragColor" + Decorate 36 ArrayStride 4 + MemberDecorate 38(MeshVertexPositions) 0 Offset 0 + Decorate 38(MeshVertexPositions) Block + MemberDecorate 51(Mesh) 0 Offset 0 + Decorate 53 ArrayStride 8 + MemberDecorate 55(PerPass_meshes) 0 NonWritable + MemberDecorate 55(PerPass_meshes) 0 Offset 0 + Decorate 55(PerPass_meshes) Block + Decorate 62(perPass_meshes) DescriptorSet 0 + Decorate 62(perPass_meshes) Binding 0 + Decorate 70(tri_idx0) Flat + Decorate 70(tri_idx0) Location 0 + Decorate 123(out_fragColor) Location 0 + Decorate 46(meshData) DecorationAliasedPointerEXT + 4: TypeVoid + 5: TypeFunction 4 + 7: TypeInt 32 0 + 10: 7(int) Constant 32 + 11: 7(int) Constant 6 + 12: 7(int) Constant 0 + 9: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 8 10 11 12 + 13: 7(int) Constant 3 + 6: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 8(DebugTypeFunction) 13 4 + 18: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 35(DebugSource) 1 19 + 20: 7(int) Constant 20 + 22: 7(int) Constant 1 + 23: 7(int) Constant 4 + 24: 7(int) Constant 2 + 21: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 1(DebugCompilationUnit) 22 23 18 24 + 17: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 20(DebugFunction) 16 6 18 20 12 21 16 13 20 + 28: 7(int) Constant 21 + TypeForwardPointer 29 PhysicalStorageBufferEXT + 30(Mesh): TypeStruct 29 + 31: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 32 22 18 28 12 21 32 12 13 + 33: TypeFloat 32 + 35: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 34 10 13 12 + 36: TypeRuntimeArray 33(float) + 37: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 35 12 +38(MeshVertexPositions): TypeStruct 36 + 41: 7(int) Constant 5 + 42: 7(int) Constant 9 + 39: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 40 37 18 41 42 12 12 13 + 43: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 44 22 18 28 12 21 44 12 13 39 + 29: TypePointer PhysicalStorageBufferEXT 38(MeshVertexPositions) + 45: TypePointer Function 30(Mesh) + 47: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 48 31 18 28 12 17 23 + 50: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 31(DebugExpression) + 51(Mesh): TypeStruct 29(ptr) + 52: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 32 22 18 28 12 21 32 12 13 + 53: TypeRuntimeArray 51(Mesh) + 54: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 52 12 +55(PerPass_meshes): TypeStruct 53 + 57: 7(int) Constant 13 + 58: 7(int) Constant 8 + 56: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 40 54 18 57 58 12 12 13 + 59: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 60 22 18 28 12 21 60 12 13 56 + 61: TypePointer StorageBuffer 55(PerPass_meshes) +62(perPass_meshes): 61(ptr) Variable StorageBuffer + 63: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 64 59 18 28 12 21 64 62(perPass_meshes) 58 + 65: TypeInt 32 1 + 67: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 66 10 23 12 + 68: 65(int) Constant 0 + 69: TypePointer Input 7(int) + 70(tri_idx0): 69(ptr) Variable Input + 71: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 72 9 18 28 12 21 72 70(tri_idx0) 58 + 74: TypePointer StorageBuffer 51(Mesh) + 78: TypePointer Function 29(ptr) + 81: 7(int) Constant 23 + 82: TypeVector 33(float) 3 + 83: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 35 13 + 84: TypePointer Function 82(fvec3) + 86: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 87 83 18 81 12 17 23 + 90: 7(int) Constant 25 + 96: TypePointer PhysicalStorageBufferEXT 33(float) + 100: 7(int) Constant 24 + 119: 7(int) Constant 27 + 120: TypeVector 33(float) 4 + 121: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 35 23 + 122: TypePointer Output 120(fvec4) +123(out_fragColor): 122(ptr) Variable Output + 124: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 125 121 18 119 12 21 125 123(out_fragColor) 58 + 127: 33(float) Constant 1065353216 + Line 1 20 11 + 14(main): 4 Function None 5 + 15: Label + 46(meshData): 45(ptr) Variable Function + 85(vertex_pos0): 84(ptr) Variable Function + 25: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 101(DebugFunctionDefinition) 17 14(main) + 26: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 17 + 27: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 28 28 12 12 + 49: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 47 46(meshData) 50 + 73: 7(int) Load 70(tri_idx0) + 75: 74(ptr) AccessChain 62(perPass_meshes) 68 73 + 76: 51(Mesh) Load 75 + 77: 29(ptr) CompositeExtract 76 0 + 79: 78(ptr) AccessChain 46(meshData) 68 + Store 79 77 + 80: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 81 81 12 12 + 88: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 86 85(vertex_pos0) 50 + 89: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 90 90 12 12 + 91: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 81 81 12 12 + 92: 78(ptr) AccessChain 46(meshData) 68 + 93: 29(ptr) Load 92 + 94: 7(int) Load 70(tri_idx0) + 95: 7(int) IMul 13 94 + 97: 96(ptr) AccessChain 93 68 95 + 98: 33(float) Load 97 Aligned 4 + 99: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 100 100 12 12 + 101: 78(ptr) AccessChain 46(meshData) 68 + 102: 29(ptr) Load 101 + 103: 7(int) Load 70(tri_idx0) + 104: 7(int) IMul 13 103 + 105: 7(int) IAdd 104 22 + 106: 96(ptr) AccessChain 102 68 105 + 107: 33(float) Load 106 Aligned 4 + 108: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 90 90 12 12 + 109: 78(ptr) AccessChain 46(meshData) 68 + 110: 29(ptr) Load 109 + 111: 7(int) Load 70(tri_idx0) + 112: 7(int) IMul 13 111 + 113: 7(int) IAdd 112 24 + 114: 96(ptr) AccessChain 110 68 113 + 115: 33(float) Load 114 Aligned 4 + 116: 82(fvec3) CompositeConstruct 98 107 115 + 117: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 81 81 12 12 + Store 85(vertex_pos0) 116 + 118: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 119 119 12 12 + 126: 82(fvec3) Load 85(vertex_pos0) + 128: 33(float) CompositeExtract 126 0 + 129: 33(float) CompositeExtract 126 1 + 130: 33(float) CompositeExtract 126 2 + 131: 120(fvec4) CompositeConstruct 128 129 130 127 + Store 123(out_fragColor) 131 + Return + FunctionEnd diff --git a/Test/baseResults/spv.debuginfo.const_params.glsl.comp.out b/Test/baseResults/spv.debuginfo.const_params.glsl.comp.out new file mode 100755 index 00000000..398fd86d --- /dev/null +++ b/Test/baseResults/spv.debuginfo.const_params.glsl.comp.out @@ -0,0 +1,98 @@ +spv.debuginfo.const_params.glsl.comp +// Module Version 10000 +// Generated by (magic number): 8000b +// Id's are bound by 70 + + Capability Shader + Extension "SPV_KHR_non_semantic_info" + 2: ExtInstImport "NonSemantic.Shader.DebugInfo.100" + 3: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint GLCompute 14 "main" + ExecutionMode 14 LocalSize 1 1 1 + 1: String "" + 8: String "uint" + 17: String "float" + 35: String "function" + 38: String "// OpModuleProcessed auto-map-locations +// OpModuleProcessed auto-map-bindings +// OpModuleProcessed client vulkan100 +// OpModuleProcessed target-env vulkan1.0 +// OpModuleProcessed keep-uncalled +// OpModuleProcessed entry-point main +#line 1 +" + 45: String "f" + 49: String "f2" + 52: String "f3" + 55: String "f4" + 57: String "main" + Name 14 "main" + Name 33 "function(f1;vf2;vf3;vf4;" + Name 29 "f" + Name 30 "f2" + Name 31 "f3" + Name 32 "f4" + 4: TypeVoid + 5: TypeFunction 4 + 7: TypeInt 32 0 + 10: 7(int) Constant 32 + 11: 7(int) Constant 6 + 12: 7(int) Constant 0 + 9: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 8 10 11 12 + 13: 7(int) Constant 3 + 6: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 8(DebugTypeFunction) 13 4 + 16: TypeFloat 32 + 18: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 17 10 13 12 + 19: TypeVector 16(float) 2 + 20: 7(int) Constant 2 + 21: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 18 20 + 22: TypeVector 16(float) 3 + 23: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 18 13 + 24: TypeVector 16(float) 4 + 25: 7(int) Constant 4 + 26: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 18 25 + 27: TypeFunction 4 16(float) 19(fvec2) 22(fvec3) 24(fvec4) + 28: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 8(DebugTypeFunction) 13 4 18 21 23 26 + 37: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 35(DebugSource) 1 38 + 39: 7(int) Constant 7 + 41: 7(int) Constant 1 + 40: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 1(DebugCompilationUnit) 41 25 37 20 + 36: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 20(DebugFunction) 35 28 37 39 12 40 35 13 39 + 44: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 45 18 37 39 12 36 25 41 + 47: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 31(DebugExpression) + 48: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 49 21 37 39 12 36 25 20 + 51: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 52 23 37 39 12 36 25 13 + 54: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 55 26 37 39 12 36 25 25 + 59: 7(int) Constant 11 + 58: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 20(DebugFunction) 57 6 37 59 12 40 57 13 59 + 64: 7(int) Constant 13 + 65: 16(float) Constant 0 + 66: 19(fvec2) ConstantComposite 65 65 + 67: 22(fvec3) ConstantComposite 65 65 65 + 68: 24(fvec4) ConstantComposite 65 65 65 65 + Line 1 11 11 + 14(main): 4 Function None 5 + 15: Label + 61: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 101(DebugFunctionDefinition) 58 14(main) + 62: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 58 + 63: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 37 64 64 12 12 + 69: 4 FunctionCall 33(function(f1;vf2;vf3;vf4;) 65 66 67 68 + Return + FunctionEnd + Line 1 7 18 +33(function(f1;vf2;vf3;vf4;): 4 Function None 27 + 29(f): 16(float) FunctionParameter + 30(f2): 19(fvec2) FunctionParameter + 31(f3): 22(fvec3) FunctionParameter + 32(f4): 24(fvec4) FunctionParameter + 34: Label + 42: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 36 + 43: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 37 39 39 12 12 + 46: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 29(DebugValue) 44 29(f) 47 + 50: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 29(DebugValue) 48 30(f2) 47 + 53: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 29(DebugValue) 51 31(f3) 47 + 56: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 29(DebugValue) 54 32(f4) 47 + 60: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 101(DebugFunctionDefinition) 36 33(function(f1;vf2;vf3;vf4;) + Return + FunctionEnd diff --git a/Test/baseResults/spv.debuginfo.glsl.comp.out b/Test/baseResults/spv.debuginfo.glsl.comp.out index 9e464501..ab5d8397 100755 --- a/Test/baseResults/spv.debuginfo.glsl.comp.out +++ b/Test/baseResults/spv.debuginfo.glsl.comp.out @@ -1,1063 +1,1204 @@ spv.debuginfo.glsl.comp -Validation failed // Module Version 10000 // Generated by (magic number): 8000b -// Id's are bound by 817 +// Id's are bound by 950 Capability Shader Extension "SPV_KHR_non_semantic_info" - 1: ExtInstImport "NonSemantic.Shader.DebugInfo.100" - 2: ExtInstImport "GLSL.std.450" + 2: ExtInstImport "NonSemantic.Shader.DebugInfo.100" + 3: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint GLCompute 13 "main" 118 - ExecutionMode 13 LocalSize 10 10 1 + EntryPoint GLCompute 14 "main" 126 + ExecutionMode 14 LocalSize 10 10 1 + 1: String "" 8: String "uint" - 14: String "main" - 17: String "" - 24: String "float" - 36: String "springForce" + 17: String "float" + 30: String "springForce" + 33: String "// OpModuleProcessed auto-map-locations +// OpModuleProcessed auto-map-bindings +// OpModuleProcessed client vulkan100 +// OpModuleProcessed target-env vulkan1.0 +// OpModuleProcessed keep-uncalled +// OpModuleProcessed entry-point main +#line 1 +" 42: String "p0" 46: String "p1" 49: String "restDist" - 54: String "dist" - 65: String "int" - 71: String "sphereRadius" - 82: String "gravity" - 87: String "particleCount" - 90: String "UBO" - 95: String "params" - 114: String "id" - 120: String "gl_GlobalInvocationID" - 125: String "index" - 147: String "bool" - 155: String "normal" - 161: String "pinned" - 163: String "Particle" - 169: String "particleIn" - 173: String "ParticleIn" - 191: String "particleOut" - 194: String "ParticleOut" - 213: String "force" - 225: String "pos" - 234: String "vel" - 487: String "f" - 531: String "sphereDist" - 575: String "calculateNormals" - 578: String "PushConsts" - 583: String "pushConsts" - 610: String "a" - 622: String "b" - 638: String "c" - Name 13 "main" - Name 35 "springForce(vf3;vf3;f1;" - Name 32 "p0" - Name 33 "p1" - Name 34 "restDist" - Name 52 "dist" - Name 69 "UBO" - MemberName 69(UBO) 0 "deltaT" - MemberName 69(UBO) 1 "particleMass" - MemberName 69(UBO) 2 "springStiffness" - MemberName 69(UBO) 3 "damping" - MemberName 69(UBO) 4 "restDistH" - MemberName 69(UBO) 5 "restDistV" - MemberName 69(UBO) 6 "restDistD" - MemberName 69(UBO) 7 "sphereRadius" - MemberName 69(UBO) 8 "spherePos" - MemberName 69(UBO) 9 "gravity" - MemberName 69(UBO) 10 "particleCount" - Name 93 "params" - Name 112 "id" - Name 118 "gl_GlobalInvocationID" - Name 123 "index" - Name 153 "Particle" - MemberName 153(Particle) 0 "pos" - MemberName 153(Particle) 1 "vel" - MemberName 153(Particle) 2 "uv" - MemberName 153(Particle) 3 "normal" - MemberName 153(Particle) 4 "pinned" - Name 167 "ParticleIn" - MemberName 167(ParticleIn) 0 "particleIn" - Name 175 "" - Name 189 "ParticleOut" - MemberName 189(ParticleOut) 0 "particleOut" - Name 197 "" - Name 211 "force" - Name 223 "pos" - Name 232 "vel" - Name 249 "param" - Name 253 "param" - Name 255 "param" - Name 273 "param" - Name 277 "param" - Name 279 "param" - Name 301 "param" - Name 305 "param" + 51: String "main" + 60: String "dist" + 72: String "int" + 78: String "sphereRadius" + 89: String "gravity" + 94: String "particleCount" + 97: String "UBO" + 101: String "params" + 123: String "id" + 128: String "gl_GlobalInvocationID" + 135: String "index" + 158: String "bool" + 172: String "normal" + 178: String "pinned" + 180: String "Particle" + 185: String "particleIn" + 189: String "ParticleIn" + 209: String "particleOut" + 212: String "ParticleOut" + 237: String "force" + 250: String "pos" + 260: String "vel" + 560: String "f" + 609: String "sphereDist" + 661: String "calculateNormals" + 664: String "PushConsts" + 668: String "pushConsts" + 702: String "a" + 715: String "b" + 732: String "c" + Name 14 "main" + Name 28 "springForce(vf3;vf3;f1;" + Name 25 "p0" + Name 26 "p1" + Name 27 "restDist" + Name 58 "dist" + Name 76 "UBO" + MemberName 76(UBO) 0 "deltaT" + MemberName 76(UBO) 1 "particleMass" + MemberName 76(UBO) 2 "springStiffness" + MemberName 76(UBO) 3 "damping" + MemberName 76(UBO) 4 "restDistH" + MemberName 76(UBO) 5 "restDistV" + MemberName 76(UBO) 6 "restDistD" + MemberName 76(UBO) 7 "sphereRadius" + MemberName 76(UBO) 8 "spherePos" + MemberName 76(UBO) 9 "gravity" + MemberName 76(UBO) 10 "particleCount" + Name 99 "params" + Name 121 "id" + Name 126 "gl_GlobalInvocationID" + Name 133 "index" + Name 170 "Particle" + MemberName 170(Particle) 0 "pos" + MemberName 170(Particle) 1 "vel" + MemberName 170(Particle) 2 "uv" + MemberName 170(Particle) 3 "normal" + MemberName 170(Particle) 4 "pinned" + Name 183 "ParticleIn" + MemberName 183(ParticleIn) 0 "particleIn" + Name 191 "" + Name 207 "ParticleOut" + MemberName 207(ParticleOut) 0 "particleOut" + Name 214 "" + Name 235 "force" + Name 248 "pos" + Name 258 "vel" + Name 278 "param" + Name 282 "param" + Name 284 "param" Name 307 "param" - Name 324 "param" - Name 328 "param" - Name 330 "param" - Name 360 "param" - Name 364 "param" - Name 366 "param" - Name 391 "param" - Name 395 "param" - Name 397 "param" - Name 430 "param" - Name 434 "param" - Name 436 "param" - Name 465 "param" - Name 469 "param" - Name 471 "param" - Name 485 "f" - Name 529 "sphereDist" - Name 573 "PushConsts" - MemberName 573(PushConsts) 0 "calculateNormals" - Name 581 "pushConsts" - Name 591 "normal" - Name 608 "a" - Name 620 "b" - Name 636 "c" - MemberDecorate 69(UBO) 0 Offset 0 - MemberDecorate 69(UBO) 1 Offset 4 - MemberDecorate 69(UBO) 2 Offset 8 - MemberDecorate 69(UBO) 3 Offset 12 - MemberDecorate 69(UBO) 4 Offset 16 - MemberDecorate 69(UBO) 5 Offset 20 - MemberDecorate 69(UBO) 6 Offset 24 - MemberDecorate 69(UBO) 7 Offset 28 - MemberDecorate 69(UBO) 8 Offset 32 - MemberDecorate 69(UBO) 9 Offset 48 - MemberDecorate 69(UBO) 10 Offset 64 - Decorate 69(UBO) Block - Decorate 93(params) DescriptorSet 0 - Decorate 93(params) Binding 2 - Decorate 118(gl_GlobalInvocationID) BuiltIn GlobalInvocationId - MemberDecorate 153(Particle) 0 Offset 0 - MemberDecorate 153(Particle) 1 Offset 16 - MemberDecorate 153(Particle) 2 Offset 32 - MemberDecorate 153(Particle) 3 Offset 48 - MemberDecorate 153(Particle) 4 Offset 64 - Decorate 165 ArrayStride 80 - MemberDecorate 167(ParticleIn) 0 Offset 0 - Decorate 167(ParticleIn) BufferBlock - Decorate 175 DescriptorSet 0 - Decorate 175 Binding 0 - Decorate 187 ArrayStride 80 - MemberDecorate 189(ParticleOut) 0 Offset 0 - Decorate 189(ParticleOut) BufferBlock - Decorate 197 DescriptorSet 0 - Decorate 197 Binding 1 - MemberDecorate 573(PushConsts) 0 Offset 0 - Decorate 573(PushConsts) Block - Decorate 816 BuiltIn WorkgroupSize - 3: TypeVoid - 4: TypeFunction 3 - 6: TypeInt 32 0 - 9: 6(int) Constant 32 - 10: 6(int) Constant 6 - 11: 6(int) Constant 0 - 7: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 8 9 10 11 - 12: 6(int) Constant 3 - 5: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 8(Floor) 12 3 - 16: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 35(Modf) 0 17 - 19: 6(int) Constant 1 - 20: 6(int) Constant 4 - 21: 6(int) Constant 2 - 18: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 1(Round) 19 20 16 21 - 15: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 20(Cosh) 14 5 16 11 11 18 14 12 11 - 23: TypeFloat 32 - 25: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 24 9 12 11 - 26: TypeVector 23(float) 3 - 27: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 6(FSign) 25 12 - 28: TypePointer Function 26(fvec3) - 29: TypePointer Function 23(float) - 30: TypeFunction 26(fvec3) 28(ptr) 28(ptr) 29(ptr) - 31: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 8(Floor) 12 27 27 27 25 - 37: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 20(Cosh) 36 31 16 11 11 18 36 12 11 - 41: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 42 27 16 11 11 37 20 19 - 44: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 31(Sqrt) - 45: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 46 27 16 11 11 37 20 21 - 48: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 49 25 16 11 11 37 20 12 - 55: 6(int) Constant 68 - 53: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 54 27 16 55 11 37 20 - 62: TypeVector 23(float) 4 - 63: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 6(FSign) 25 20 - 64: TypeInt 32 1 - 66: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 65 9 20 11 - 67: TypeVector 64(int) 2 - 68: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 6(FSign) 66 21 - 69(UBO): TypeStruct 23(float) 23(float) 23(float) 23(float) 23(float) 23(float) 23(float) 23(float) 62(fvec4) 62(fvec4) 67(ivec2) - 72: 6(int) Constant 56 - 73: 6(int) Constant 8 - 70: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 71 25 16 72 73 11 11 12 - 74: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 71 25 16 72 73 11 11 12 - 75: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 71 25 16 72 73 11 11 12 - 76: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 71 25 16 72 73 11 11 12 - 77: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 71 25 16 72 73 11 11 12 - 78: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 71 25 16 72 73 11 11 12 - 79: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 71 25 16 72 73 11 11 12 - 80: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 71 25 16 72 73 11 11 12 - 83: 6(int) Constant 58 - 84: 6(int) Constant 7 - 81: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 82 63 16 83 84 11 11 12 - 85: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 82 63 16 83 84 11 11 12 - 88: 6(int) Constant 59 - 86: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 87 68 16 88 73 11 11 12 - 91: 6(int) Constant 69 - 89: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(Fract) 90 19 16 91 11 18 90 11 12 70 74 75 76 77 78 79 80 81 85 86 - 92: TypePointer Uniform 69(UBO) - 93(params): 92(ptr) Variable Uniform - 94: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(Atan) 95 89 16 91 11 18 95 93(params) 73 - 96: 64(int) Constant 2 - 97: TypePointer Uniform 23(float) - 109: TypeVector 6(int) 3 - 110: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 6(FSign) 7 12 - 111: TypePointer Function 109(ivec3) - 115: 6(int) Constant 74 - 113: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 114 110 16 115 11 15 20 - 117: TypePointer Input 109(ivec3) -118(gl_GlobalInvocationID): 117(ptr) Variable Input - 119: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(Atan) 120 110 16 115 11 18 120 118(gl_GlobalInvocationID) 73 - 122: TypePointer Function 6(int) - 126: 6(int) Constant 76 - 124: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 125 7 16 126 11 15 20 - 130: 64(int) Constant 10 - 131: TypePointer Uniform 64(int) - 146: TypeBool - 148: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 147 9 21 11 - 153(Particle): TypeStruct 62(fvec4) 62(fvec4) 62(fvec4) 62(fvec4) 23(float) - 156: 6(int) Constant 31 - 154: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 155 63 16 156 84 11 11 12 - 157: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 155 63 16 156 84 11 11 12 - 158: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 155 63 16 156 84 11 11 12 - 159: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 155 63 16 156 84 11 11 12 - 160: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 161 25 16 9 73 11 11 12 - 164: 6(int) Constant 81 - 162: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(Fract) 163 19 16 164 11 18 163 11 12 154 157 158 159 160 - 165: TypeRuntimeArray 153(Particle) - 166: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 5(SAbs) 162 11 - 167(ParticleIn): TypeStruct 165 - 170: 6(int) Constant 36 - 171: 6(int) Constant 11 - 168: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 169 166 16 170 171 11 11 12 - 172: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(Fract) 173 19 16 164 11 18 173 11 12 168 - 174: TypePointer Uniform 167(ParticleIn) - 175: 174(ptr) Variable Uniform - 176: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(Atan) 17 172 16 164 11 18 17 175 73 - 177: 64(int) Constant 0 - 179: 64(int) Constant 4 - 182: 23(float) Constant 1065353216 - 183: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 147 9 21 11 - 187: TypeRuntimeArray 153(Particle) - 188: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 5(SAbs) 162 11 -189(ParticleOut): TypeStruct 187 - 192: 6(int) Constant 40 - 190: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 191 188 16 192 171 11 11 12 - 195: 6(int) Constant 82 - 193: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(Fract) 194 19 16 195 11 18 194 11 12 190 - 196: TypePointer Uniform 189(ParticleOut) - 197: 196(ptr) Variable Uniform - 198: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(Atan) 17 193 16 195 11 18 17 197 73 - 201: TypePointer Uniform 62(fvec4) - 206: 64(int) Constant 1 - 207: 23(float) Constant 0 - 208: 62(fvec4) ConstantComposite 207 207 207 207 - 214: 6(int) Constant 88 - 212: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 213 27 16 214 11 15 20 - 216: 64(int) Constant 9 - 226: 6(int) Constant 90 - 224: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 225 27 16 226 11 15 20 - 235: 6(int) Constant 91 - 233: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 234 27 16 235 11 15 20 - 243: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 147 9 21 11 - 267: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 147 9 21 11 - 291: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 147 9 21 11 - 300: 64(int) Constant 5 - 315: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 147 9 21 11 - 338: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 147 9 21 11 - 348: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 147 9 21 11 - 359: 64(int) Constant 6 - 374: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 147 9 21 11 - 380: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 147 9 21 11 - 409: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 147 9 21 11 - 419: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 147 9 21 11 - 448: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 147 9 21 11 - 454: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 147 9 21 11 - 477: 64(int) Constant 3 - 488: 6(int) Constant 130 - 486: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 487 27 16 488 11 15 20 - 502: 23(float) Constant 1056964608 - 532: 6(int) Constant 135 - 530: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 531 27 16 532 11 15 20 - 538: 64(int) Constant 8 - 545: 64(int) Constant 7 - 548: 23(float) Constant 1008981770 - 550: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 147 9 21 11 - 573(PushConsts): TypeStruct 6(int) - 576: 6(int) Constant 63 - 574: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 575 7 16 576 84 11 11 12 - 579: 6(int) Constant 144 - 577: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(Fract) 578 19 16 579 11 18 578 11 12 574 - 580: TypePointer PushConstant 573(PushConsts) - 581(pushConsts): 580(ptr) Variable PushConstant - 582: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(Atan) 583 577 16 579 11 18 583 581(pushConsts) 73 - 584: TypePointer PushConstant 6(int) - 587: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 147 9 21 11 - 593: 6(int) Constant 145 - 592: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 155 27 16 593 11 15 20 - 595: 26(fvec3) ConstantComposite 207 207 207 - 598: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 147 9 21 11 - 604: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 147 9 21 11 - 611: 6(int) Constant 149 - 609: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 610 27 16 611 11 15 20 - 623: 6(int) Constant 150 - 621: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 622 27 16 623 11 15 20 - 639: 6(int) Constant 151 - 637: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 638 27 16 639 11 15 20 - 666: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 147 9 21 11 - 713: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 147 9 21 11 - 719: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 147 9 21 11 - 766: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 147 9 21 11 - 815: 6(int) Constant 10 - 816: 109(ivec3) ConstantComposite 815 815 19 - 13(main): 3 Function None 4 - 22: Label - 112(id): 111(ptr) Variable Function - 123(index): 122(ptr) Variable Function - 211(force): 28(ptr) Variable Function - 223(pos): 28(ptr) Variable Function - 232(vel): 28(ptr) Variable Function - 249(param): 28(ptr) Variable Function - 253(param): 28(ptr) Variable Function - 255(param): 29(ptr) Variable Function - 273(param): 28(ptr) Variable Function - 277(param): 28(ptr) Variable Function - 279(param): 29(ptr) Variable Function - 301(param): 28(ptr) Variable Function - 305(param): 28(ptr) Variable Function - 307(param): 29(ptr) Variable Function - 324(param): 28(ptr) Variable Function - 328(param): 28(ptr) Variable Function - 330(param): 29(ptr) Variable Function - 360(param): 28(ptr) Variable Function - 364(param): 28(ptr) Variable Function - 366(param): 29(ptr) Variable Function - 391(param): 28(ptr) Variable Function - 395(param): 28(ptr) Variable Function - 397(param): 29(ptr) Variable Function - 430(param): 28(ptr) Variable Function - 434(param): 28(ptr) Variable Function - 436(param): 29(ptr) Variable Function - 465(param): 28(ptr) Variable Function - 469(param): 28(ptr) Variable Function - 471(param): 29(ptr) Variable Function - 485(f): 28(ptr) Variable Function - 529(sphereDist): 28(ptr) Variable Function - 591(normal): 28(ptr) Variable Function - 608(a): 28(ptr) Variable Function - 620(b): 28(ptr) Variable Function - 636(c): 28(ptr) Variable Function - 108: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 101 15 13(main) - 116: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 113 112(id) 44 - 121: 109(ivec3) Load 118(gl_GlobalInvocationID) - Store 112(id) 121 - 127: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 124 123(index) 44 - 128: 122(ptr) AccessChain 112(id) 19 - 129: 6(int) Load 128 - 132: 131(ptr) AccessChain 93(params) 130 11 - 133: 64(int) Load 132 - 134: 6(int) Bitcast 133 - 135: 6(int) IMul 129 134 - 136: 122(ptr) AccessChain 112(id) 11 - 137: 6(int) Load 136 - 138: 6(int) IAdd 135 137 - Store 123(index) 138 - 139: 6(int) Load 123(index) - 140: 131(ptr) AccessChain 93(params) 130 11 - 141: 64(int) Load 140 - 142: 131(ptr) AccessChain 93(params) 130 19 - 143: 64(int) Load 142 - 144: 64(int) IMul 141 143 - 145: 6(int) Bitcast 144 - 149: 146(bool) UGreaterThan 139 145 - SelectionMerge 151 None - BranchConditional 149 150 151 - 150: Label + Name 311 "param" + Name 313 "param" + Name 340 "param" + Name 344 "param" + Name 346 "param" + Name 368 "param" + Name 372 "param" + Name 374 "param" + Name 410 "param" + Name 414 "param" + Name 416 "param" + Name 447 "param" + Name 451 "param" + Name 453 "param" + Name 492 "param" + Name 496 "param" + Name 498 "param" + Name 533 "param" + Name 537 "param" + Name 539 "param" + Name 558 "f" + Name 607 "sphereDist" + Name 659 "PushConsts" + MemberName 659(PushConsts) 0 "calculateNormals" + Name 666 "pushConsts" + Name 678 "normal" + Name 700 "a" + Name 713 "b" + Name 730 "c" + MemberDecorate 76(UBO) 0 Offset 0 + MemberDecorate 76(UBO) 1 Offset 4 + MemberDecorate 76(UBO) 2 Offset 8 + MemberDecorate 76(UBO) 3 Offset 12 + MemberDecorate 76(UBO) 4 Offset 16 + MemberDecorate 76(UBO) 5 Offset 20 + MemberDecorate 76(UBO) 6 Offset 24 + MemberDecorate 76(UBO) 7 Offset 28 + MemberDecorate 76(UBO) 8 Offset 32 + MemberDecorate 76(UBO) 9 Offset 48 + MemberDecorate 76(UBO) 10 Offset 64 + Decorate 76(UBO) Block + Decorate 99(params) DescriptorSet 0 + Decorate 99(params) Binding 2 + Decorate 126(gl_GlobalInvocationID) BuiltIn GlobalInvocationId + MemberDecorate 170(Particle) 0 Offset 0 + MemberDecorate 170(Particle) 1 Offset 16 + MemberDecorate 170(Particle) 2 Offset 32 + MemberDecorate 170(Particle) 3 Offset 48 + MemberDecorate 170(Particle) 4 Offset 64 + Decorate 181 ArrayStride 80 + MemberDecorate 183(ParticleIn) 0 Offset 0 + Decorate 183(ParticleIn) BufferBlock + Decorate 191 DescriptorSet 0 + Decorate 191 Binding 0 + Decorate 205 ArrayStride 80 + MemberDecorate 207(ParticleOut) 0 Offset 0 + Decorate 207(ParticleOut) BufferBlock + Decorate 214 DescriptorSet 0 + Decorate 214 Binding 1 + MemberDecorate 659(PushConsts) 0 Offset 0 + Decorate 659(PushConsts) Block + Decorate 949 BuiltIn WorkgroupSize + 4: TypeVoid + 5: TypeFunction 4 + 7: TypeInt 32 0 + 10: 7(int) Constant 32 + 11: 7(int) Constant 6 + 12: 7(int) Constant 0 + 9: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 8 10 11 12 + 13: 7(int) Constant 3 + 6: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 8(DebugTypeFunction) 13 4 + 16: TypeFloat 32 + 18: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 17 10 13 12 + 19: TypeVector 16(float) 3 + 20: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 18 13 + 21: TypePointer Function 19(fvec3) + 22: TypePointer Function 16(float) + 23: TypeFunction 19(fvec3) 21(ptr) 21(ptr) 22(ptr) + 24: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 8(DebugTypeFunction) 13 20 20 20 18 + 32: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 35(DebugSource) 1 33 + 34: 7(int) Constant 66 + 36: 7(int) Constant 1 + 37: 7(int) Constant 4 + 38: 7(int) Constant 2 + 35: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 1(DebugCompilationUnit) 36 37 32 38 + 31: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 20(DebugFunction) 30 24 32 34 12 35 30 13 34 + 41: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 42 20 32 34 12 31 37 36 + 44: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 31(DebugExpression) + 45: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 46 20 32 34 12 31 37 38 + 48: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 49 18 32 34 12 31 37 13 + 53: 7(int) Constant 72 + 52: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 20(DebugFunction) 51 6 32 53 12 35 51 13 53 + 57: 7(int) Constant 68 + 59: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 60 20 32 57 12 31 37 + 66: 7(int) Constant 69 + 69: TypeVector 16(float) 4 + 70: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 18 37 + 71: TypeInt 32 1 + 73: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 72 10 37 12 + 74: TypeVector 71(int) 2 + 75: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 73 38 + 76(UBO): TypeStruct 16(float) 16(float) 16(float) 16(float) 16(float) 16(float) 16(float) 16(float) 69(fvec4) 69(fvec4) 74(ivec2) + 79: 7(int) Constant 56 + 80: 7(int) Constant 8 + 77: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 78 18 32 79 80 12 12 13 + 81: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 78 18 32 79 80 12 12 13 + 82: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 78 18 32 79 80 12 12 13 + 83: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 78 18 32 79 80 12 12 13 + 84: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 78 18 32 79 80 12 12 13 + 85: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 78 18 32 79 80 12 12 13 + 86: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 78 18 32 79 80 12 12 13 + 87: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 78 18 32 79 80 12 12 13 + 90: 7(int) Constant 58 + 91: 7(int) Constant 7 + 88: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 89 70 32 90 91 12 12 13 + 92: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 89 70 32 90 91 12 12 13 + 95: 7(int) Constant 59 + 93: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 94 75 32 95 80 12 12 13 + 96: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 97 36 32 66 12 35 97 12 13 77 81 82 83 84 85 86 87 88 92 93 + 98: TypePointer Uniform 76(UBO) + 99(params): 98(ptr) Variable Uniform + 100: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 101 96 32 66 12 35 101 99(params) 80 + 102: 71(int) Constant 2 + 103: TypePointer Uniform 16(float) + 117: 7(int) Constant 74 + 118: TypeVector 7(int) 3 + 119: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 9 13 + 120: TypePointer Function 118(ivec3) + 122: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 123 119 32 117 12 52 37 + 125: TypePointer Input 118(ivec3) +126(gl_GlobalInvocationID): 125(ptr) Variable Input + 127: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 128 119 32 117 12 35 128 126(gl_GlobalInvocationID) 80 + 131: 7(int) Constant 76 + 132: TypePointer Function 7(int) + 134: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 135 9 32 131 12 52 37 + 139: 71(int) Constant 10 + 140: TypePointer Uniform 71(int) + 149: 7(int) Constant 77 + 157: TypeBool + 159: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 158 10 38 12 + 165: 7(int) Constant 78 + 169: 7(int) Constant 81 + 170(Particle): TypeStruct 69(fvec4) 69(fvec4) 69(fvec4) 69(fvec4) 16(float) + 173: 7(int) Constant 31 + 171: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 172 70 32 173 91 12 12 13 + 174: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 172 70 32 173 91 12 12 13 + 175: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 172 70 32 173 91 12 12 13 + 176: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 172 70 32 173 91 12 12 13 + 177: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 178 18 32 10 80 12 12 13 + 179: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 180 36 32 169 12 35 180 12 13 171 174 175 176 177 + 181: TypeRuntimeArray 170(Particle) + 182: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 179 12 + 183(ParticleIn): TypeStruct 181 + 186: 7(int) Constant 36 + 187: 7(int) Constant 11 + 184: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 185 182 32 186 187 12 12 13 + 188: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 189 36 32 169 12 35 189 12 13 184 + 190: TypePointer Uniform 183(ParticleIn) + 191: 190(ptr) Variable Uniform + 192: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 1 188 32 169 12 35 1 191 80 + 193: 71(int) Constant 0 + 195: 71(int) Constant 4 + 198: 16(float) Constant 1065353216 + 204: 7(int) Constant 82 + 205: TypeRuntimeArray 170(Particle) + 206: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 179 12 +207(ParticleOut): TypeStruct 205 + 210: 7(int) Constant 40 + 208: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 209 206 32 210 187 12 12 13 + 211: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 212 36 32 204 12 35 212 12 13 208 + 213: TypePointer Uniform 207(ParticleOut) + 214: 213(ptr) Variable Uniform + 215: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 1 211 32 204 12 35 1 214 80 + 218: TypePointer Uniform 69(fvec4) + 223: 7(int) Constant 83 + 225: 71(int) Constant 1 + 226: 16(float) Constant 0 + 227: 69(fvec4) ConstantComposite 226 226 226 226 + 230: 7(int) Constant 84 + 234: 7(int) Constant 88 + 236: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 237 20 32 234 12 52 37 + 239: 71(int) Constant 9 + 247: 7(int) Constant 90 + 249: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 250 20 32 247 12 52 37 + 257: 7(int) Constant 91 + 259: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 260 20 32 257 12 52 37 + 267: 7(int) Constant 95 + 275: 7(int) Constant 96 + 292: 7(int) Constant 99 + 304: 7(int) Constant 100 + 321: 7(int) Constant 103 + 333: 7(int) Constant 104 + 339: 71(int) Constant 5 + 354: 7(int) Constant 107 + 362: 7(int) Constant 108 + 382: 7(int) Constant 111 + 402: 7(int) Constant 112 + 409: 71(int) Constant 6 + 424: 7(int) Constant 115 + 440: 7(int) Constant 116 + 461: 7(int) Constant 119 + 485: 7(int) Constant 120 + 506: 7(int) Constant 123 + 526: 7(int) Constant 124 + 547: 7(int) Constant 127 + 548: 71(int) Constant 3 + 557: 7(int) Constant 130 + 559: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 560 20 32 557 12 52 37 + 568: 7(int) Constant 131 + 576: 16(float) Constant 1056964608 + 592: 7(int) Constant 132 + 606: 7(int) Constant 135 + 608: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 609 20 32 606 12 52 37 + 615: 71(int) Constant 8 + 621: 7(int) Constant 136 + 624: 71(int) Constant 7 + 627: 16(float) Constant 1008981770 + 634: 7(int) Constant 138 + 653: 7(int) Constant 140 + 658: 7(int) Constant 144 + 659(PushConsts): TypeStruct 7(int) + 662: 7(int) Constant 63 + 660: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 661 9 32 662 91 12 12 13 + 663: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 664 36 32 658 12 35 664 12 13 660 + 665: TypePointer PushConstant 659(PushConsts) + 666(pushConsts): 665(ptr) Variable PushConstant + 667: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 668 663 32 658 12 35 668 666(pushConsts) 80 + 669: TypePointer PushConstant 7(int) + 677: 7(int) Constant 145 + 679: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 172 20 32 677 12 52 37 + 681: 19(fvec3) ConstantComposite 226 226 226 + 683: 7(int) Constant 147 + 691: 7(int) Constant 148 + 699: 7(int) Constant 149 + 701: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 702 20 32 699 12 52 37 + 712: 7(int) Constant 150 + 714: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 715 20 32 712 12 52 37 + 729: 7(int) Constant 151 + 731: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 732 20 32 729 12 52 37 + 745: 7(int) Constant 152 + 757: 7(int) Constant 154 + 769: 7(int) Constant 155 + 781: 7(int) Constant 156 + 794: 7(int) Constant 157 + 803: 7(int) Constant 158 + 815: 7(int) Constant 161 + 827: 7(int) Constant 162 + 835: 7(int) Constant 163 + 847: 7(int) Constant 164 + 860: 7(int) Constant 165 + 869: 7(int) Constant 166 + 881: 7(int) Constant 168 + 893: 7(int) Constant 169 + 902: 7(int) Constant 170 + 915: 7(int) Constant 171 + 927: 7(int) Constant 172 + 939: 7(int) Constant 175 + 948: 7(int) Constant 10 + 949: 118(ivec3) ConstantComposite 948 948 36 + Line 1 72 11 + 14(main): 4 Function None 5 + 15: Label + 121(id): 120(ptr) Variable Function + 133(index): 132(ptr) Variable Function + 235(force): 21(ptr) Variable Function + 248(pos): 21(ptr) Variable Function + 258(vel): 21(ptr) Variable Function + 278(param): 21(ptr) Variable Function + 282(param): 21(ptr) Variable Function + 284(param): 22(ptr) Variable Function + 307(param): 21(ptr) Variable Function + 311(param): 21(ptr) Variable Function + 313(param): 22(ptr) Variable Function + 340(param): 21(ptr) Variable Function + 344(param): 21(ptr) Variable Function + 346(param): 22(ptr) Variable Function + 368(param): 21(ptr) Variable Function + 372(param): 21(ptr) Variable Function + 374(param): 22(ptr) Variable Function + 410(param): 21(ptr) Variable Function + 414(param): 21(ptr) Variable Function + 416(param): 22(ptr) Variable Function + 447(param): 21(ptr) Variable Function + 451(param): 21(ptr) Variable Function + 453(param): 22(ptr) Variable Function + 492(param): 21(ptr) Variable Function + 496(param): 21(ptr) Variable Function + 498(param): 22(ptr) Variable Function + 533(param): 21(ptr) Variable Function + 537(param): 21(ptr) Variable Function + 539(param): 22(ptr) Variable Function + 558(f): 21(ptr) Variable Function + 607(sphereDist): 21(ptr) Variable Function + 678(normal): 21(ptr) Variable Function + 700(a): 21(ptr) Variable Function + 713(b): 21(ptr) Variable Function + 730(c): 21(ptr) Variable Function + 114: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 101(DebugFunctionDefinition) 52 14(main) + 115: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 52 + 116: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 32 117 117 12 12 + 124: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 122 121(id) 44 + 129: 118(ivec3) Load 126(gl_GlobalInvocationID) + Store 121(id) 129 + 130: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 32 131 131 12 12 + 136: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 134 133(index) 44 + 137: 132(ptr) AccessChain 121(id) 36 + 138: 7(int) Load 137 + 141: 140(ptr) AccessChain 99(params) 139 12 + 142: 71(int) Load 141 + 143: 7(int) Bitcast 142 + 144: 7(int) IMul 138 143 + 145: 132(ptr) AccessChain 121(id) 12 + 146: 7(int) Load 145 + 147: 7(int) IAdd 144 146 + Store 133(index) 147 + 148: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 32 149 149 12 12 + 150: 7(int) Load 133(index) + 151: 140(ptr) AccessChain 99(params) 139 12 + 152: 71(int) Load 151 + 153: 140(ptr) AccessChain 99(params) 139 36 + 154: 71(int) Load 153 + 155: 71(int) IMul 152 154 + 156: 7(int) Bitcast 155 + 160: 157(bool) UGreaterThan 150 156 + SelectionMerge 162 None + BranchConditional 160 161 162 + 161: Label + 163: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 52 + 164: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 32 165 165 12 12 Return - 151: Label - 178: 6(int) Load 123(index) - 180: 97(ptr) AccessChain 175 177 178 179 - 181: 23(float) Load 180 - 184: 146(bool) FOrdEqual 181 182 - SelectionMerge 186 None - BranchConditional 184 185 186 - 185: Label - 199: 6(int) Load 123(index) - 200: 6(int) Load 123(index) - 202: 201(ptr) AccessChain 197 177 200 177 - 203: 62(fvec4) Load 202 - 204: 201(ptr) AccessChain 197 177 199 177 - Store 204 203 - 205: 6(int) Load 123(index) - 209: 201(ptr) AccessChain 197 177 205 206 - Store 209 208 + 162: Label + 167: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 52 + 168: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 32 169 169 12 12 + 194: 7(int) Load 133(index) + 196: 103(ptr) AccessChain 191 193 194 195 + 197: 16(float) Load 196 + 199: 157(bool) FOrdEqual 197 198 + SelectionMerge 201 None + BranchConditional 199 200 201 + 200: Label + 202: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 52 + 203: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 32 204 204 12 12 + 216: 7(int) Load 133(index) + 217: 7(int) Load 133(index) + 219: 218(ptr) AccessChain 214 193 217 193 + 220: 69(fvec4) Load 219 + 221: 218(ptr) AccessChain 214 193 216 193 + Store 221 220 + 222: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 32 223 223 12 12 + 224: 7(int) Load 133(index) + 228: 218(ptr) AccessChain 214 193 224 225 + Store 228 227 + 229: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 32 230 230 12 12 Return - 186: Label - 215: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 212 211(force) 44 - 217: 201(ptr) AccessChain 93(params) 216 - 218: 62(fvec4) Load 217 - 219: 26(fvec3) VectorShuffle 218 218 0 1 2 - 220: 97(ptr) AccessChain 93(params) 206 - 221: 23(float) Load 220 - 222: 26(fvec3) VectorTimesScalar 219 221 - Store 211(force) 222 - 227: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 224 223(pos) 44 - 228: 6(int) Load 123(index) - 229: 201(ptr) AccessChain 175 177 228 177 - 230: 62(fvec4) Load 229 - 231: 26(fvec3) VectorShuffle 230 230 0 1 2 - Store 223(pos) 231 - 236: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 233 232(vel) 44 - 237: 6(int) Load 123(index) - 238: 201(ptr) AccessChain 175 177 237 206 - 239: 62(fvec4) Load 238 - 240: 26(fvec3) VectorShuffle 239 239 0 1 2 - Store 232(vel) 240 - 241: 122(ptr) AccessChain 112(id) 11 - 242: 6(int) Load 241 - 244: 146(bool) UGreaterThan 242 11 - SelectionMerge 246 None - BranchConditional 244 245 246 - 245: Label - 247: 6(int) Load 123(index) - 248: 6(int) ISub 247 19 - 250: 201(ptr) AccessChain 175 177 248 177 - 251: 62(fvec4) Load 250 - 252: 26(fvec3) VectorShuffle 251 251 0 1 2 - Store 249(param) 252 - 254: 26(fvec3) Load 223(pos) - Store 253(param) 254 - 256: 97(ptr) AccessChain 93(params) 179 - 257: 23(float) Load 256 - Store 255(param) 257 - 258: 26(fvec3) FunctionCall 35(springForce(vf3;vf3;f1;) 249(param) 253(param) 255(param) - 259: 26(fvec3) Load 211(force) - 260: 26(fvec3) FAdd 259 258 - Store 211(force) 260 - Branch 246 - 246: Label - 261: 122(ptr) AccessChain 112(id) 11 - 262: 6(int) Load 261 - 263: 131(ptr) AccessChain 93(params) 130 11 - 264: 64(int) Load 263 - 265: 64(int) ISub 264 206 - 266: 6(int) Bitcast 265 - 268: 146(bool) ULessThan 262 266 - SelectionMerge 270 None - BranchConditional 268 269 270 - 269: Label - 271: 6(int) Load 123(index) - 272: 6(int) IAdd 271 19 - 274: 201(ptr) AccessChain 175 177 272 177 - 275: 62(fvec4) Load 274 - 276: 26(fvec3) VectorShuffle 275 275 0 1 2 - Store 273(param) 276 - 278: 26(fvec3) Load 223(pos) - Store 277(param) 278 - 280: 97(ptr) AccessChain 93(params) 179 - 281: 23(float) Load 280 - Store 279(param) 281 - 282: 26(fvec3) FunctionCall 35(springForce(vf3;vf3;f1;) 273(param) 277(param) 279(param) - 283: 26(fvec3) Load 211(force) - 284: 26(fvec3) FAdd 283 282 - Store 211(force) 284 - Branch 270 - 270: Label - 285: 122(ptr) AccessChain 112(id) 19 - 286: 6(int) Load 285 - 287: 131(ptr) AccessChain 93(params) 130 19 - 288: 64(int) Load 287 - 289: 64(int) ISub 288 206 - 290: 6(int) Bitcast 289 - 292: 146(bool) ULessThan 286 290 - SelectionMerge 294 None - BranchConditional 292 293 294 - 293: Label - 295: 6(int) Load 123(index) - 296: 131(ptr) AccessChain 93(params) 130 11 - 297: 64(int) Load 296 - 298: 6(int) Bitcast 297 - 299: 6(int) IAdd 295 298 - 302: 201(ptr) AccessChain 175 177 299 177 - 303: 62(fvec4) Load 302 - 304: 26(fvec3) VectorShuffle 303 303 0 1 2 - Store 301(param) 304 - 306: 26(fvec3) Load 223(pos) - Store 305(param) 306 - 308: 97(ptr) AccessChain 93(params) 300 - 309: 23(float) Load 308 - Store 307(param) 309 - 310: 26(fvec3) FunctionCall 35(springForce(vf3;vf3;f1;) 301(param) 305(param) 307(param) - 311: 26(fvec3) Load 211(force) - 312: 26(fvec3) FAdd 311 310 - Store 211(force) 312 - Branch 294 - 294: Label - 313: 122(ptr) AccessChain 112(id) 19 - 314: 6(int) Load 313 - 316: 146(bool) UGreaterThan 314 11 - SelectionMerge 318 None - BranchConditional 316 317 318 - 317: Label - 319: 6(int) Load 123(index) - 320: 131(ptr) AccessChain 93(params) 130 11 - 321: 64(int) Load 320 - 322: 6(int) Bitcast 321 - 323: 6(int) ISub 319 322 - 325: 201(ptr) AccessChain 175 177 323 177 - 326: 62(fvec4) Load 325 - 327: 26(fvec3) VectorShuffle 326 326 0 1 2 - Store 324(param) 327 - 329: 26(fvec3) Load 223(pos) - Store 328(param) 329 - 331: 97(ptr) AccessChain 93(params) 300 - 332: 23(float) Load 331 - Store 330(param) 332 - 333: 26(fvec3) FunctionCall 35(springForce(vf3;vf3;f1;) 324(param) 328(param) 330(param) - 334: 26(fvec3) Load 211(force) - 335: 26(fvec3) FAdd 334 333 - Store 211(force) 335 - Branch 318 - 318: Label - 336: 122(ptr) AccessChain 112(id) 11 - 337: 6(int) Load 336 - 339: 146(bool) UGreaterThan 337 11 - SelectionMerge 341 None - BranchConditional 339 340 341 - 340: Label - 342: 122(ptr) AccessChain 112(id) 19 - 343: 6(int) Load 342 - 344: 131(ptr) AccessChain 93(params) 130 19 - 345: 64(int) Load 344 - 346: 64(int) ISub 345 206 - 347: 6(int) Bitcast 346 - 349: 146(bool) ULessThan 343 347 - Branch 341 - 341: Label - 350: 146(bool) Phi 339 318 349 340 - SelectionMerge 352 None - BranchConditional 350 351 352 - 351: Label - 353: 6(int) Load 123(index) - 354: 131(ptr) AccessChain 93(params) 130 11 - 355: 64(int) Load 354 - 356: 6(int) Bitcast 355 - 357: 6(int) IAdd 353 356 - 358: 6(int) ISub 357 19 - 361: 201(ptr) AccessChain 175 177 358 177 - 362: 62(fvec4) Load 361 - 363: 26(fvec3) VectorShuffle 362 362 0 1 2 - Store 360(param) 363 - 365: 26(fvec3) Load 223(pos) - Store 364(param) 365 - 367: 97(ptr) AccessChain 93(params) 359 - 368: 23(float) Load 367 - Store 366(param) 368 - 369: 26(fvec3) FunctionCall 35(springForce(vf3;vf3;f1;) 360(param) 364(param) 366(param) - 370: 26(fvec3) Load 211(force) - 371: 26(fvec3) FAdd 370 369 - Store 211(force) 371 - Branch 352 - 352: Label - 372: 122(ptr) AccessChain 112(id) 11 - 373: 6(int) Load 372 - 375: 146(bool) UGreaterThan 373 11 - SelectionMerge 377 None - BranchConditional 375 376 377 - 376: Label - 378: 122(ptr) AccessChain 112(id) 19 - 379: 6(int) Load 378 - 381: 146(bool) UGreaterThan 379 11 - Branch 377 - 377: Label - 382: 146(bool) Phi 375 352 381 376 - SelectionMerge 384 None - BranchConditional 382 383 384 - 383: Label - 385: 6(int) Load 123(index) - 386: 131(ptr) AccessChain 93(params) 130 11 - 387: 64(int) Load 386 - 388: 6(int) Bitcast 387 - 389: 6(int) ISub 385 388 - 390: 6(int) ISub 389 19 - 392: 201(ptr) AccessChain 175 177 390 177 - 393: 62(fvec4) Load 392 - 394: 26(fvec3) VectorShuffle 393 393 0 1 2 - Store 391(param) 394 - 396: 26(fvec3) Load 223(pos) - Store 395(param) 396 - 398: 97(ptr) AccessChain 93(params) 359 - 399: 23(float) Load 398 - Store 397(param) 399 - 400: 26(fvec3) FunctionCall 35(springForce(vf3;vf3;f1;) 391(param) 395(param) 397(param) - 401: 26(fvec3) Load 211(force) - 402: 26(fvec3) FAdd 401 400 - Store 211(force) 402 - Branch 384 - 384: Label - 403: 122(ptr) AccessChain 112(id) 11 - 404: 6(int) Load 403 - 405: 131(ptr) AccessChain 93(params) 130 11 - 406: 64(int) Load 405 - 407: 64(int) ISub 406 206 - 408: 6(int) Bitcast 407 - 410: 146(bool) ULessThan 404 408 - SelectionMerge 412 None - BranchConditional 410 411 412 - 411: Label - 413: 122(ptr) AccessChain 112(id) 19 - 414: 6(int) Load 413 - 415: 131(ptr) AccessChain 93(params) 130 19 - 416: 64(int) Load 415 - 417: 64(int) ISub 416 206 - 418: 6(int) Bitcast 417 - 420: 146(bool) ULessThan 414 418 - Branch 412 - 412: Label - 421: 146(bool) Phi 410 384 420 411 - SelectionMerge 423 None - BranchConditional 421 422 423 - 422: Label - 424: 6(int) Load 123(index) - 425: 131(ptr) AccessChain 93(params) 130 11 - 426: 64(int) Load 425 - 427: 6(int) Bitcast 426 - 428: 6(int) IAdd 424 427 - 429: 6(int) IAdd 428 19 - 431: 201(ptr) AccessChain 175 177 429 177 - 432: 62(fvec4) Load 431 - 433: 26(fvec3) VectorShuffle 432 432 0 1 2 - Store 430(param) 433 - 435: 26(fvec3) Load 223(pos) - Store 434(param) 435 - 437: 97(ptr) AccessChain 93(params) 359 - 438: 23(float) Load 437 - Store 436(param) 438 - 439: 26(fvec3) FunctionCall 35(springForce(vf3;vf3;f1;) 430(param) 434(param) 436(param) - 440: 26(fvec3) Load 211(force) - 441: 26(fvec3) FAdd 440 439 - Store 211(force) 441 - Branch 423 - 423: Label - 442: 122(ptr) AccessChain 112(id) 11 - 443: 6(int) Load 442 - 444: 131(ptr) AccessChain 93(params) 130 11 - 445: 64(int) Load 444 - 446: 64(int) ISub 445 206 - 447: 6(int) Bitcast 446 - 449: 146(bool) ULessThan 443 447 - SelectionMerge 451 None - BranchConditional 449 450 451 - 450: Label - 452: 122(ptr) AccessChain 112(id) 19 - 453: 6(int) Load 452 - 455: 146(bool) UGreaterThan 453 11 - Branch 451 - 451: Label - 456: 146(bool) Phi 449 423 455 450 - SelectionMerge 458 None - BranchConditional 456 457 458 - 457: Label - 459: 6(int) Load 123(index) - 460: 131(ptr) AccessChain 93(params) 130 11 - 461: 64(int) Load 460 - 462: 6(int) Bitcast 461 - 463: 6(int) ISub 459 462 - 464: 6(int) IAdd 463 19 - 466: 201(ptr) AccessChain 175 177 464 177 - 467: 62(fvec4) Load 466 - 468: 26(fvec3) VectorShuffle 467 467 0 1 2 - Store 465(param) 468 - 470: 26(fvec3) Load 223(pos) - Store 469(param) 470 - 472: 97(ptr) AccessChain 93(params) 359 - 473: 23(float) Load 472 - Store 471(param) 473 - 474: 26(fvec3) FunctionCall 35(springForce(vf3;vf3;f1;) 465(param) 469(param) 471(param) - 475: 26(fvec3) Load 211(force) - 476: 26(fvec3) FAdd 475 474 - Store 211(force) 476 - Branch 458 - 458: Label - 478: 97(ptr) AccessChain 93(params) 477 - 479: 23(float) Load 478 - 480: 23(float) FNegate 479 - 481: 26(fvec3) Load 232(vel) - 482: 26(fvec3) VectorTimesScalar 481 480 - 483: 26(fvec3) Load 211(force) - 484: 26(fvec3) FAdd 483 482 - Store 211(force) 484 - 489: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 486 485(f) 44 - 490: 26(fvec3) Load 211(force) - 491: 97(ptr) AccessChain 93(params) 206 - 492: 23(float) Load 491 - 493: 23(float) FDiv 182 492 - 494: 26(fvec3) VectorTimesScalar 490 493 - Store 485(f) 494 - 495: 6(int) Load 123(index) - 496: 26(fvec3) Load 223(pos) - 497: 26(fvec3) Load 232(vel) - 498: 97(ptr) AccessChain 93(params) 177 - 499: 23(float) Load 498 - 500: 26(fvec3) VectorTimesScalar 497 499 - 501: 26(fvec3) FAdd 496 500 - 503: 26(fvec3) Load 485(f) - 504: 26(fvec3) VectorTimesScalar 503 502 - 505: 97(ptr) AccessChain 93(params) 177 - 506: 23(float) Load 505 - 507: 26(fvec3) VectorTimesScalar 504 506 - 508: 97(ptr) AccessChain 93(params) 177 - 509: 23(float) Load 508 - 510: 26(fvec3) VectorTimesScalar 507 509 - 511: 26(fvec3) FAdd 501 510 - 512: 23(float) CompositeExtract 511 0 - 513: 23(float) CompositeExtract 511 1 - 514: 23(float) CompositeExtract 511 2 - 515: 62(fvec4) CompositeConstruct 512 513 514 182 - 516: 201(ptr) AccessChain 197 177 495 177 - Store 516 515 - 517: 6(int) Load 123(index) - 518: 26(fvec3) Load 232(vel) - 519: 26(fvec3) Load 485(f) - 520: 97(ptr) AccessChain 93(params) 177 - 521: 23(float) Load 520 - 522: 26(fvec3) VectorTimesScalar 519 521 - 523: 26(fvec3) FAdd 518 522 - 524: 23(float) CompositeExtract 523 0 - 525: 23(float) CompositeExtract 523 1 - 526: 23(float) CompositeExtract 523 2 - 527: 62(fvec4) CompositeConstruct 524 525 526 207 - 528: 201(ptr) AccessChain 197 177 517 206 - Store 528 527 - 533: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 530 529(sphereDist) 44 - 534: 6(int) Load 123(index) - 535: 201(ptr) AccessChain 197 177 534 177 - 536: 62(fvec4) Load 535 - 537: 26(fvec3) VectorShuffle 536 536 0 1 2 - 539: 201(ptr) AccessChain 93(params) 538 - 540: 62(fvec4) Load 539 - 541: 26(fvec3) VectorShuffle 540 540 0 1 2 - 542: 26(fvec3) FSub 537 541 - Store 529(sphereDist) 542 - 543: 26(fvec3) Load 529(sphereDist) - 544: 23(float) ExtInst 2(GLSL.std.450) 66(Length) 543 - 546: 97(ptr) AccessChain 93(params) 545 - 547: 23(float) Load 546 - 549: 23(float) FAdd 547 548 - 551: 146(bool) FOrdLessThan 544 549 - SelectionMerge 553 None - BranchConditional 551 552 553 - 552: Label - 554: 6(int) Load 123(index) - 555: 201(ptr) AccessChain 93(params) 538 - 556: 62(fvec4) Load 555 - 557: 26(fvec3) VectorShuffle 556 556 0 1 2 - 558: 26(fvec3) Load 529(sphereDist) - 559: 26(fvec3) ExtInst 2(GLSL.std.450) 69(Normalize) 558 - 560: 97(ptr) AccessChain 93(params) 545 - 561: 23(float) Load 560 - 562: 23(float) FAdd 561 548 - 563: 26(fvec3) VectorTimesScalar 559 562 - 564: 26(fvec3) FAdd 557 563 - 565: 97(ptr) AccessChain 197 177 554 177 11 - 566: 23(float) CompositeExtract 564 0 - Store 565 566 - 567: 97(ptr) AccessChain 197 177 554 177 19 - 568: 23(float) CompositeExtract 564 1 - Store 567 568 - 569: 97(ptr) AccessChain 197 177 554 177 21 - 570: 23(float) CompositeExtract 564 2 - Store 569 570 - 571: 6(int) Load 123(index) - 572: 201(ptr) AccessChain 197 177 571 206 - Store 572 208 - Branch 553 - 553: Label - 585: 584(ptr) AccessChain 581(pushConsts) 177 - 586: 6(int) Load 585 - 588: 146(bool) IEqual 586 19 - SelectionMerge 590 None - BranchConditional 588 589 590 - 589: Label - 594: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 592 591(normal) 44 - Store 591(normal) 595 - 596: 122(ptr) AccessChain 112(id) 19 - 597: 6(int) Load 596 - 599: 146(bool) UGreaterThan 597 11 - SelectionMerge 601 None - BranchConditional 599 600 601 - 600: Label - 602: 122(ptr) AccessChain 112(id) 11 - 603: 6(int) Load 602 - 605: 146(bool) UGreaterThan 603 11 - SelectionMerge 607 None - BranchConditional 605 606 607 - 606: Label - 612: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 609 608(a) 44 - 613: 6(int) Load 123(index) - 614: 6(int) ISub 613 19 - 615: 201(ptr) AccessChain 175 177 614 177 - 616: 62(fvec4) Load 615 - 617: 26(fvec3) VectorShuffle 616 616 0 1 2 - 618: 26(fvec3) Load 223(pos) - 619: 26(fvec3) FSub 617 618 - Store 608(a) 619 - 624: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 621 620(b) 44 - 625: 6(int) Load 123(index) - 626: 131(ptr) AccessChain 93(params) 130 11 - 627: 64(int) Load 626 - 628: 6(int) Bitcast 627 - 629: 6(int) ISub 625 628 - 630: 6(int) ISub 629 19 - 631: 201(ptr) AccessChain 175 177 630 177 - 632: 62(fvec4) Load 631 - 633: 26(fvec3) VectorShuffle 632 632 0 1 2 - 634: 26(fvec3) Load 223(pos) - 635: 26(fvec3) FSub 633 634 - Store 620(b) 635 - 640: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 637 636(c) 44 - 641: 6(int) Load 123(index) - 642: 131(ptr) AccessChain 93(params) 130 11 - 643: 64(int) Load 642 - 644: 6(int) Bitcast 643 - 645: 6(int) ISub 641 644 - 646: 201(ptr) AccessChain 175 177 645 177 - 647: 62(fvec4) Load 646 - 648: 26(fvec3) VectorShuffle 647 647 0 1 2 - 649: 26(fvec3) Load 223(pos) - 650: 26(fvec3) FSub 648 649 - Store 636(c) 650 - 651: 26(fvec3) Load 608(a) - 652: 26(fvec3) Load 620(b) - 653: 26(fvec3) ExtInst 2(GLSL.std.450) 68(Cross) 651 652 - 654: 26(fvec3) Load 620(b) - 655: 26(fvec3) Load 636(c) - 656: 26(fvec3) ExtInst 2(GLSL.std.450) 68(Cross) 654 655 - 657: 26(fvec3) FAdd 653 656 - 658: 26(fvec3) Load 591(normal) - 659: 26(fvec3) FAdd 658 657 - Store 591(normal) 659 - Branch 607 - 607: Label - 660: 122(ptr) AccessChain 112(id) 11 - 661: 6(int) Load 660 - 662: 131(ptr) AccessChain 93(params) 130 11 - 663: 64(int) Load 662 - 664: 64(int) ISub 663 206 - 665: 6(int) Bitcast 664 - 667: 146(bool) ULessThan 661 665 - SelectionMerge 669 None - BranchConditional 667 668 669 - 668: Label - 670: 6(int) Load 123(index) - 671: 131(ptr) AccessChain 93(params) 130 11 - 672: 64(int) Load 671 - 673: 6(int) Bitcast 672 - 674: 6(int) ISub 670 673 - 675: 201(ptr) AccessChain 175 177 674 177 - 676: 62(fvec4) Load 675 - 677: 26(fvec3) VectorShuffle 676 676 0 1 2 - 678: 26(fvec3) Load 223(pos) - 679: 26(fvec3) FSub 677 678 - Store 608(a) 679 - 680: 6(int) Load 123(index) - 681: 131(ptr) AccessChain 93(params) 130 11 - 682: 64(int) Load 681 - 683: 6(int) Bitcast 682 - 684: 6(int) ISub 680 683 - 685: 6(int) IAdd 684 19 - 686: 201(ptr) AccessChain 175 177 685 177 - 687: 62(fvec4) Load 686 - 688: 26(fvec3) VectorShuffle 687 687 0 1 2 - 689: 26(fvec3) Load 223(pos) - 690: 26(fvec3) FSub 688 689 - Store 620(b) 690 - 691: 6(int) Load 123(index) - 692: 6(int) IAdd 691 19 - 693: 201(ptr) AccessChain 175 177 692 177 - 694: 62(fvec4) Load 693 - 695: 26(fvec3) VectorShuffle 694 694 0 1 2 - 696: 26(fvec3) Load 223(pos) - 697: 26(fvec3) FSub 695 696 - Store 636(c) 697 - 698: 26(fvec3) Load 608(a) - 699: 26(fvec3) Load 620(b) - 700: 26(fvec3) ExtInst 2(GLSL.std.450) 68(Cross) 698 699 - 701: 26(fvec3) Load 620(b) - 702: 26(fvec3) Load 636(c) - 703: 26(fvec3) ExtInst 2(GLSL.std.450) 68(Cross) 701 702 - 704: 26(fvec3) FAdd 700 703 - 705: 26(fvec3) Load 591(normal) - 706: 26(fvec3) FAdd 705 704 - Store 591(normal) 706 - Branch 669 - 669: Label - Branch 601 - 601: Label - 707: 122(ptr) AccessChain 112(id) 19 - 708: 6(int) Load 707 - 709: 131(ptr) AccessChain 93(params) 130 19 - 710: 64(int) Load 709 - 711: 64(int) ISub 710 206 - 712: 6(int) Bitcast 711 - 714: 146(bool) ULessThan 708 712 - SelectionMerge 716 None - BranchConditional 714 715 716 - 715: Label - 717: 122(ptr) AccessChain 112(id) 11 - 718: 6(int) Load 717 - 720: 146(bool) UGreaterThan 718 11 - SelectionMerge 722 None - BranchConditional 720 721 722 - 721: Label - 723: 6(int) Load 123(index) - 724: 131(ptr) AccessChain 93(params) 130 11 - 725: 64(int) Load 724 - 726: 6(int) Bitcast 725 - 727: 6(int) IAdd 723 726 - 728: 201(ptr) AccessChain 175 177 727 177 - 729: 62(fvec4) Load 728 - 730: 26(fvec3) VectorShuffle 729 729 0 1 2 - 731: 26(fvec3) Load 223(pos) - 732: 26(fvec3) FSub 730 731 - Store 608(a) 732 - 733: 6(int) Load 123(index) - 734: 131(ptr) AccessChain 93(params) 130 11 - 735: 64(int) Load 734 - 736: 6(int) Bitcast 735 - 737: 6(int) IAdd 733 736 - 738: 6(int) ISub 737 19 - 739: 201(ptr) AccessChain 175 177 738 177 - 740: 62(fvec4) Load 739 - 741: 26(fvec3) VectorShuffle 740 740 0 1 2 - 742: 26(fvec3) Load 223(pos) - 743: 26(fvec3) FSub 741 742 - Store 620(b) 743 - 744: 6(int) Load 123(index) - 745: 6(int) ISub 744 19 - 746: 201(ptr) AccessChain 175 177 745 177 - 747: 62(fvec4) Load 746 - 748: 26(fvec3) VectorShuffle 747 747 0 1 2 - 749: 26(fvec3) Load 223(pos) - 750: 26(fvec3) FSub 748 749 - Store 636(c) 750 - 751: 26(fvec3) Load 608(a) - 752: 26(fvec3) Load 620(b) - 753: 26(fvec3) ExtInst 2(GLSL.std.450) 68(Cross) 751 752 - 754: 26(fvec3) Load 620(b) - 755: 26(fvec3) Load 636(c) - 756: 26(fvec3) ExtInst 2(GLSL.std.450) 68(Cross) 754 755 - 757: 26(fvec3) FAdd 753 756 - 758: 26(fvec3) Load 591(normal) - 759: 26(fvec3) FAdd 758 757 - Store 591(normal) 759 - Branch 722 - 722: Label - 760: 122(ptr) AccessChain 112(id) 11 - 761: 6(int) Load 760 - 762: 131(ptr) AccessChain 93(params) 130 11 - 763: 64(int) Load 762 - 764: 64(int) ISub 763 206 - 765: 6(int) Bitcast 764 - 767: 146(bool) ULessThan 761 765 - SelectionMerge 769 None - BranchConditional 767 768 769 - 768: Label - 770: 6(int) Load 123(index) - 771: 6(int) IAdd 770 19 - 772: 201(ptr) AccessChain 175 177 771 177 - 773: 62(fvec4) Load 772 - 774: 26(fvec3) VectorShuffle 773 773 0 1 2 - 775: 26(fvec3) Load 223(pos) - 776: 26(fvec3) FSub 774 775 - Store 608(a) 776 - 777: 6(int) Load 123(index) - 778: 131(ptr) AccessChain 93(params) 130 11 - 779: 64(int) Load 778 - 780: 6(int) Bitcast 779 - 781: 6(int) IAdd 777 780 - 782: 6(int) IAdd 781 19 - 783: 201(ptr) AccessChain 175 177 782 177 - 784: 62(fvec4) Load 783 - 785: 26(fvec3) VectorShuffle 784 784 0 1 2 - 786: 26(fvec3) Load 223(pos) - 787: 26(fvec3) FSub 785 786 - Store 620(b) 787 - 788: 6(int) Load 123(index) - 789: 131(ptr) AccessChain 93(params) 130 11 - 790: 64(int) Load 789 - 791: 6(int) Bitcast 790 - 792: 6(int) IAdd 788 791 - 793: 201(ptr) AccessChain 175 177 792 177 - 794: 62(fvec4) Load 793 - 795: 26(fvec3) VectorShuffle 794 794 0 1 2 - 796: 26(fvec3) Load 223(pos) - 797: 26(fvec3) FSub 795 796 - Store 636(c) 797 - 798: 26(fvec3) Load 608(a) - 799: 26(fvec3) Load 620(b) - 800: 26(fvec3) ExtInst 2(GLSL.std.450) 68(Cross) 798 799 - 801: 26(fvec3) Load 620(b) - 802: 26(fvec3) Load 636(c) - 803: 26(fvec3) ExtInst 2(GLSL.std.450) 68(Cross) 801 802 - 804: 26(fvec3) FAdd 800 803 - 805: 26(fvec3) Load 591(normal) - 806: 26(fvec3) FAdd 805 804 - Store 591(normal) 806 - Branch 769 - 769: Label - Branch 716 - 716: Label - 807: 6(int) Load 123(index) - 808: 26(fvec3) Load 591(normal) - 809: 26(fvec3) ExtInst 2(GLSL.std.450) 69(Normalize) 808 - 810: 23(float) CompositeExtract 809 0 - 811: 23(float) CompositeExtract 809 1 - 812: 23(float) CompositeExtract 809 2 - 813: 62(fvec4) CompositeConstruct 810 811 812 207 - 814: 201(ptr) AccessChain 197 177 807 477 - Store 814 813 - Branch 590 - 590: Label + 201: Label + 232: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 52 + 233: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 32 234 234 12 12 + 238: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 236 235(force) 44 + 240: 218(ptr) AccessChain 99(params) 239 + 241: 69(fvec4) Load 240 + 242: 19(fvec3) VectorShuffle 241 241 0 1 2 + 243: 103(ptr) AccessChain 99(params) 225 + 244: 16(float) Load 243 + 245: 19(fvec3) VectorTimesScalar 242 244 + Store 235(force) 245 + 246: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 32 247 247 12 12 + 251: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 249 248(pos) 44 + 252: 7(int) Load 133(index) + 253: 218(ptr) AccessChain 191 193 252 193 + 254: 69(fvec4) Load 253 + 255: 19(fvec3) VectorShuffle 254 254 0 1 2 + Store 248(pos) 255 + 256: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 32 257 257 12 12 + 261: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 259 258(vel) 44 + 262: 7(int) Load 133(index) + 263: 218(ptr) AccessChain 191 193 262 225 + 264: 69(fvec4) Load 263 + 265: 19(fvec3) VectorShuffle 264 264 0 1 2 + Store 258(vel) 265 + 266: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 32 267 267 12 12 + 268: 132(ptr) AccessChain 121(id) 12 + 269: 7(int) Load 268 + 270: 157(bool) UGreaterThan 269 12 + SelectionMerge 272 None + BranchConditional 270 271 272 + 271: Label + 273: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 52 + 274: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 32 275 275 12 12 + 276: 7(int) Load 133(index) + 277: 7(int) ISub 276 36 + 279: 218(ptr) AccessChain 191 193 277 193 + 280: 69(fvec4) Load 279 + 281: 19(fvec3) VectorShuffle 280 280 0 1 2 + Store 278(param) 281 + 283: 19(fvec3) Load 248(pos) + Store 282(param) 283 + 285: 103(ptr) AccessChain 99(params) 195 + 286: 16(float) Load 285 + Store 284(param) 286 + 287: 19(fvec3) FunctionCall 28(springForce(vf3;vf3;f1;) 278(param) 282(param) 284(param) + 288: 19(fvec3) Load 235(force) + 289: 19(fvec3) FAdd 288 287 + Store 235(force) 289 + Branch 272 + 272: Label + 290: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 52 + 291: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 32 292 292 12 12 + 293: 132(ptr) AccessChain 121(id) 12 + 294: 7(int) Load 293 + 295: 140(ptr) AccessChain 99(params) 139 12 + 296: 71(int) Load 295 + 297: 71(int) ISub 296 225 + 298: 7(int) Bitcast 297 + 299: 157(bool) ULessThan 294 298 + SelectionMerge 301 None + BranchConditional 299 300 301 + 300: Label + 302: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 52 + 303: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 32 304 304 12 12 + 305: 7(int) Load 133(index) + 306: 7(int) IAdd 305 36 + 308: 218(ptr) AccessChain 191 193 306 193 + 309: 69(fvec4) Load 308 + 310: 19(fvec3) VectorShuffle 309 309 0 1 2 + Store 307(param) 310 + 312: 19(fvec3) Load 248(pos) + Store 311(param) 312 + 314: 103(ptr) AccessChain 99(params) 195 + 315: 16(float) Load 314 + Store 313(param) 315 + 316: 19(fvec3) FunctionCall 28(springForce(vf3;vf3;f1;) 307(param) 311(param) 313(param) + 317: 19(fvec3) Load 235(force) + 318: 19(fvec3) FAdd 317 316 + Store 235(force) 318 + Branch 301 + 301: Label + 319: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 52 + 320: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 32 321 321 12 12 + 322: 132(ptr) AccessChain 121(id) 36 + 323: 7(int) Load 322 + 324: 140(ptr) AccessChain 99(params) 139 36 + 325: 71(int) Load 324 + 326: 71(int) ISub 325 225 + 327: 7(int) Bitcast 326 + 328: 157(bool) ULessThan 323 327 + SelectionMerge 330 None + BranchConditional 328 329 330 + 329: Label + 331: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 52 + 332: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 32 333 333 12 12 + 334: 7(int) Load 133(index) + 335: 140(ptr) AccessChain 99(params) 139 12 + 336: 71(int) Load 335 + 337: 7(int) Bitcast 336 + 338: 7(int) IAdd 334 337 + 341: 218(ptr) AccessChain 191 193 338 193 + 342: 69(fvec4) Load 341 + 343: 19(fvec3) VectorShuffle 342 342 0 1 2 + Store 340(param) 343 + 345: 19(fvec3) Load 248(pos) + Store 344(param) 345 + 347: 103(ptr) AccessChain 99(params) 339 + 348: 16(float) Load 347 + Store 346(param) 348 + 349: 19(fvec3) FunctionCall 28(springForce(vf3;vf3;f1;) 340(param) 344(param) 346(param) + 350: 19(fvec3) Load 235(force) + 351: 19(fvec3) FAdd 350 349 + Store 235(force) 351 + Branch 330 + 330: Label + 352: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 52 + 353: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 32 354 354 12 12 + 355: 132(ptr) AccessChain 121(id) 36 + 356: 7(int) Load 355 + 357: 157(bool) UGreaterThan 356 12 + SelectionMerge 359 None + BranchConditional 357 358 359 + 358: Label + 360: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 52 + 361: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 32 362 362 12 12 + 363: 7(int) Load 133(index) + 364: 140(ptr) AccessChain 99(params) 139 12 + 365: 71(int) Load 364 + 366: 7(int) Bitcast 365 + 367: 7(int) ISub 363 366 + 369: 218(ptr) AccessChain 191 193 367 193 + 370: 69(fvec4) Load 369 + 371: 19(fvec3) VectorShuffle 370 370 0 1 2 + Store 368(param) 371 + 373: 19(fvec3) Load 248(pos) + Store 372(param) 373 + 375: 103(ptr) AccessChain 99(params) 339 + 376: 16(float) Load 375 + Store 374(param) 376 + 377: 19(fvec3) FunctionCall 28(springForce(vf3;vf3;f1;) 368(param) 372(param) 374(param) + 378: 19(fvec3) Load 235(force) + 379: 19(fvec3) FAdd 378 377 + Store 235(force) 379 + Branch 359 + 359: Label + 380: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 52 + 381: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 32 382 382 12 12 + 383: 132(ptr) AccessChain 121(id) 12 + 384: 7(int) Load 383 + 385: 157(bool) UGreaterThan 384 12 + SelectionMerge 387 None + BranchConditional 385 386 387 + 386: Label + 388: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 52 + 389: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 32 382 382 12 12 + 390: 132(ptr) AccessChain 121(id) 36 + 391: 7(int) Load 390 + 392: 140(ptr) AccessChain 99(params) 139 36 + 393: 71(int) Load 392 + 394: 71(int) ISub 393 225 + 395: 7(int) Bitcast 394 + 396: 157(bool) ULessThan 391 395 + Branch 387 + 387: Label + 397: 157(bool) Phi 385 359 396 386 + SelectionMerge 399 None + BranchConditional 397 398 399 + 398: Label + 400: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 52 + 401: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 32 402 402 12 12 + 403: 7(int) Load 133(index) + 404: 140(ptr) AccessChain 99(params) 139 12 + 405: 71(int) Load 404 + 406: 7(int) Bitcast 405 + 407: 7(int) IAdd 403 406 + 408: 7(int) ISub 407 36 + 411: 218(ptr) AccessChain 191 193 408 193 + 412: 69(fvec4) Load 411 + 413: 19(fvec3) VectorShuffle 412 412 0 1 2 + Store 410(param) 413 + 415: 19(fvec3) Load 248(pos) + Store 414(param) 415 + 417: 103(ptr) AccessChain 99(params) 409 + 418: 16(float) Load 417 + Store 416(param) 418 + 419: 19(fvec3) FunctionCall 28(springForce(vf3;vf3;f1;) 410(param) 414(param) 416(param) + 420: 19(fvec3) Load 235(force) + 421: 19(fvec3) FAdd 420 419 + Store 235(force) 421 + Branch 399 + 399: Label + 422: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 52 + 423: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 32 424 424 12 12 + 425: 132(ptr) AccessChain 121(id) 12 + 426: 7(int) Load 425 + 427: 157(bool) UGreaterThan 426 12 + SelectionMerge 429 None + BranchConditional 427 428 429 + 428: Label + 430: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 52 + 431: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 32 424 424 12 12 + 432: 132(ptr) AccessChain 121(id) 36 + 433: 7(int) Load 432 + 434: 157(bool) UGreaterThan 433 12 + Branch 429 + 429: Label + 435: 157(bool) Phi 427 399 434 428 + SelectionMerge 437 None + BranchConditional 435 436 437 + 436: Label + 438: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 52 + 439: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 32 440 440 12 12 + 441: 7(int) Load 133(index) + 442: 140(ptr) AccessChain 99(params) 139 12 + 443: 71(int) Load 442 + 444: 7(int) Bitcast 443 + 445: 7(int) ISub 441 444 + 446: 7(int) ISub 445 36 + 448: 218(ptr) AccessChain 191 193 446 193 + 449: 69(fvec4) Load 448 + 450: 19(fvec3) VectorShuffle 449 449 0 1 2 + Store 447(param) 450 + 452: 19(fvec3) Load 248(pos) + Store 451(param) 452 + 454: 103(ptr) AccessChain 99(params) 409 + 455: 16(float) Load 454 + Store 453(param) 455 + 456: 19(fvec3) FunctionCall 28(springForce(vf3;vf3;f1;) 447(param) 451(param) 453(param) + 457: 19(fvec3) Load 235(force) + 458: 19(fvec3) FAdd 457 456 + Store 235(force) 458 + Branch 437 + 437: Label + 459: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 52 + 460: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 32 461 461 12 12 + 462: 132(ptr) AccessChain 121(id) 12 + 463: 7(int) Load 462 + 464: 140(ptr) AccessChain 99(params) 139 12 + 465: 71(int) Load 464 + 466: 71(int) ISub 465 225 + 467: 7(int) Bitcast 466 + 468: 157(bool) ULessThan 463 467 + SelectionMerge 470 None + BranchConditional 468 469 470 + 469: Label + 471: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 52 + 472: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 32 461 461 12 12 + 473: 132(ptr) AccessChain 121(id) 36 + 474: 7(int) Load 473 + 475: 140(ptr) AccessChain 99(params) 139 36 + 476: 71(int) Load 475 + 477: 71(int) ISub 476 225 + 478: 7(int) Bitcast 477 + 479: 157(bool) ULessThan 474 478 + Branch 470 + 470: Label + 480: 157(bool) Phi 468 437 479 469 + SelectionMerge 482 None + BranchConditional 480 481 482 + 481: Label + 483: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 52 + 484: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 32 485 485 12 12 + 486: 7(int) Load 133(index) + 487: 140(ptr) AccessChain 99(params) 139 12 + 488: 71(int) Load 487 + 489: 7(int) Bitcast 488 + 490: 7(int) IAdd 486 489 + 491: 7(int) IAdd 490 36 + 493: 218(ptr) AccessChain 191 193 491 193 + 494: 69(fvec4) Load 493 + 495: 19(fvec3) VectorShuffle 494 494 0 1 2 + Store 492(param) 495 + 497: 19(fvec3) Load 248(pos) + Store 496(param) 497 + 499: 103(ptr) AccessChain 99(params) 409 + 500: 16(float) Load 499 + Store 498(param) 500 + 501: 19(fvec3) FunctionCall 28(springForce(vf3;vf3;f1;) 492(param) 496(param) 498(param) + 502: 19(fvec3) Load 235(force) + 503: 19(fvec3) FAdd 502 501 + Store 235(force) 503 + Branch 482 + 482: Label + 504: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 52 + 505: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 32 506 506 12 12 + 507: 132(ptr) AccessChain 121(id) 12 + 508: 7(int) Load 507 + 509: 140(ptr) AccessChain 99(params) 139 12 + 510: 71(int) Load 509 + 511: 71(int) ISub 510 225 + 512: 7(int) Bitcast 511 + 513: 157(bool) ULessThan 508 512 + SelectionMerge 515 None + BranchConditional 513 514 515 + 514: Label + 516: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 52 + 517: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 32 506 506 12 12 + 518: 132(ptr) AccessChain 121(id) 36 + 519: 7(int) Load 518 + 520: 157(bool) UGreaterThan 519 12 + Branch 515 + 515: Label + 521: 157(bool) Phi 513 482 520 514 + SelectionMerge 523 None + BranchConditional 521 522 523 + 522: Label + 524: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 52 + 525: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 32 526 526 12 12 + 527: 7(int) Load 133(index) + 528: 140(ptr) AccessChain 99(params) 139 12 + 529: 71(int) Load 528 + 530: 7(int) Bitcast 529 + 531: 7(int) ISub 527 530 + 532: 7(int) IAdd 531 36 + 534: 218(ptr) AccessChain 191 193 532 193 + 535: 69(fvec4) Load 534 + 536: 19(fvec3) VectorShuffle 535 535 0 1 2 + Store 533(param) 536 + 538: 19(fvec3) Load 248(pos) + Store 537(param) 538 + 540: 103(ptr) AccessChain 99(params) 409 + 541: 16(float) Load 540 + Store 539(param) 541 + 542: 19(fvec3) FunctionCall 28(springForce(vf3;vf3;f1;) 533(param) 537(param) 539(param) + 543: 19(fvec3) Load 235(force) + 544: 19(fvec3) FAdd 543 542 + Store 235(force) 544 + Branch 523 + 523: Label + 545: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 52 + 546: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 32 547 547 12 12 + 549: 103(ptr) AccessChain 99(params) 548 + 550: 16(float) Load 549 + 551: 16(float) FNegate 550 + 552: 19(fvec3) Load 258(vel) + 553: 19(fvec3) VectorTimesScalar 552 551 + 554: 19(fvec3) Load 235(force) + 555: 19(fvec3) FAdd 554 553 + Store 235(force) 555 + 556: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 32 557 557 12 12 + 561: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 559 558(f) 44 + 562: 19(fvec3) Load 235(force) + 563: 103(ptr) AccessChain 99(params) 225 + 564: 16(float) Load 563 + 565: 16(float) FDiv 198 564 + 566: 19(fvec3) VectorTimesScalar 562 565 + Store 558(f) 566 + 567: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 32 568 568 12 12 + 569: 7(int) Load 133(index) + 570: 19(fvec3) Load 248(pos) + 571: 19(fvec3) Load 258(vel) + 572: 103(ptr) AccessChain 99(params) 193 + 573: 16(float) Load 572 + 574: 19(fvec3) VectorTimesScalar 571 573 + 575: 19(fvec3) FAdd 570 574 + 577: 19(fvec3) Load 558(f) + 578: 19(fvec3) VectorTimesScalar 577 576 + 579: 103(ptr) AccessChain 99(params) 193 + 580: 16(float) Load 579 + 581: 19(fvec3) VectorTimesScalar 578 580 + 582: 103(ptr) AccessChain 99(params) 193 + 583: 16(float) Load 582 + 584: 19(fvec3) VectorTimesScalar 581 583 + 585: 19(fvec3) FAdd 575 584 + 586: 16(float) CompositeExtract 585 0 + 587: 16(float) CompositeExtract 585 1 + 588: 16(float) CompositeExtract 585 2 + 589: 69(fvec4) CompositeConstruct 586 587 588 198 + 590: 218(ptr) AccessChain 214 193 569 193 + Store 590 589 + 591: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 32 592 592 12 12 + 593: 7(int) Load 133(index) + 594: 19(fvec3) Load 258(vel) + 595: 19(fvec3) Load 558(f) + 596: 103(ptr) AccessChain 99(params) 193 + 597: 16(float) Load 596 + 598: 19(fvec3) VectorTimesScalar 595 597 + 599: 19(fvec3) FAdd 594 598 + 600: 16(float) CompositeExtract 599 0 + 601: 16(float) CompositeExtract 599 1 + 602: 16(float) CompositeExtract 599 2 + 603: 69(fvec4) CompositeConstruct 600 601 602 226 + 604: 218(ptr) AccessChain 214 193 593 225 + Store 604 603 + 605: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 32 606 606 12 12 + 610: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 608 607(sphereDist) 44 + 611: 7(int) Load 133(index) + 612: 218(ptr) AccessChain 214 193 611 193 + 613: 69(fvec4) Load 612 + 614: 19(fvec3) VectorShuffle 613 613 0 1 2 + 616: 218(ptr) AccessChain 99(params) 615 + 617: 69(fvec4) Load 616 + 618: 19(fvec3) VectorShuffle 617 617 0 1 2 + 619: 19(fvec3) FSub 614 618 + Store 607(sphereDist) 619 + 620: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 32 621 621 12 12 + 622: 19(fvec3) Load 607(sphereDist) + 623: 16(float) ExtInst 3(GLSL.std.450) 66(Length) 622 + 625: 103(ptr) AccessChain 99(params) 624 + 626: 16(float) Load 625 + 628: 16(float) FAdd 626 627 + 629: 157(bool) FOrdLessThan 623 628 + SelectionMerge 631 None + BranchConditional 629 630 631 + 630: Label + 632: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 52 + 633: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 32 634 634 12 12 + 635: 7(int) Load 133(index) + 636: 218(ptr) AccessChain 99(params) 615 + 637: 69(fvec4) Load 636 + 638: 19(fvec3) VectorShuffle 637 637 0 1 2 + 639: 19(fvec3) Load 607(sphereDist) + 640: 19(fvec3) ExtInst 3(GLSL.std.450) 69(Normalize) 639 + 641: 103(ptr) AccessChain 99(params) 624 + 642: 16(float) Load 641 + 643: 16(float) FAdd 642 627 + 644: 19(fvec3) VectorTimesScalar 640 643 + 645: 19(fvec3) FAdd 638 644 + 646: 103(ptr) AccessChain 214 193 635 193 12 + 647: 16(float) CompositeExtract 645 0 + Store 646 647 + 648: 103(ptr) AccessChain 214 193 635 193 36 + 649: 16(float) CompositeExtract 645 1 + Store 648 649 + 650: 103(ptr) AccessChain 214 193 635 193 38 + 651: 16(float) CompositeExtract 645 2 + Store 650 651 + 652: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 32 653 653 12 12 + 654: 7(int) Load 133(index) + 655: 218(ptr) AccessChain 214 193 654 225 + Store 655 227 + Branch 631 + 631: Label + 656: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 52 + 657: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 32 658 658 12 12 + 670: 669(ptr) AccessChain 666(pushConsts) 193 + 671: 7(int) Load 670 + 672: 157(bool) IEqual 671 36 + SelectionMerge 674 None + BranchConditional 672 673 674 + 673: Label + 675: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 52 + 676: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 32 677 677 12 12 + 680: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 679 678(normal) 44 + Store 678(normal) 681 + 682: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 32 683 683 12 12 + 684: 132(ptr) AccessChain 121(id) 36 + 685: 7(int) Load 684 + 686: 157(bool) UGreaterThan 685 12 + SelectionMerge 688 None + BranchConditional 686 687 688 + 687: Label + 689: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 52 + 690: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 32 691 691 12 12 + 692: 132(ptr) AccessChain 121(id) 12 + 693: 7(int) Load 692 + 694: 157(bool) UGreaterThan 693 12 + SelectionMerge 696 None + BranchConditional 694 695 696 + 695: Label + 697: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 52 + 698: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 32 699 699 12 12 + 703: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 701 700(a) 44 + 704: 7(int) Load 133(index) + 705: 7(int) ISub 704 36 + 706: 218(ptr) AccessChain 191 193 705 193 + 707: 69(fvec4) Load 706 + 708: 19(fvec3) VectorShuffle 707 707 0 1 2 + 709: 19(fvec3) Load 248(pos) + 710: 19(fvec3) FSub 708 709 + Store 700(a) 710 + 711: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 32 712 712 12 12 + 716: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 714 713(b) 44 + 717: 7(int) Load 133(index) + 718: 140(ptr) AccessChain 99(params) 139 12 + 719: 71(int) Load 718 + 720: 7(int) Bitcast 719 + 721: 7(int) ISub 717 720 + 722: 7(int) ISub 721 36 + 723: 218(ptr) AccessChain 191 193 722 193 + 724: 69(fvec4) Load 723 + 725: 19(fvec3) VectorShuffle 724 724 0 1 2 + 726: 19(fvec3) Load 248(pos) + 727: 19(fvec3) FSub 725 726 + Store 713(b) 727 + 728: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 32 729 729 12 12 + 733: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 731 730(c) 44 + 734: 7(int) Load 133(index) + 735: 140(ptr) AccessChain 99(params) 139 12 + 736: 71(int) Load 735 + 737: 7(int) Bitcast 736 + 738: 7(int) ISub 734 737 + 739: 218(ptr) AccessChain 191 193 738 193 + 740: 69(fvec4) Load 739 + 741: 19(fvec3) VectorShuffle 740 740 0 1 2 + 742: 19(fvec3) Load 248(pos) + 743: 19(fvec3) FSub 741 742 + Store 730(c) 743 + 744: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 32 745 745 12 12 + 746: 19(fvec3) Load 700(a) + 747: 19(fvec3) Load 713(b) + 748: 19(fvec3) ExtInst 3(GLSL.std.450) 68(Cross) 746 747 + 749: 19(fvec3) Load 713(b) + 750: 19(fvec3) Load 730(c) + 751: 19(fvec3) ExtInst 3(GLSL.std.450) 68(Cross) 749 750 + 752: 19(fvec3) FAdd 748 751 + 753: 19(fvec3) Load 678(normal) + 754: 19(fvec3) FAdd 753 752 + Store 678(normal) 754 + Branch 696 + 696: Label + 755: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 52 + 756: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 32 757 757 12 12 + 758: 132(ptr) AccessChain 121(id) 12 + 759: 7(int) Load 758 + 760: 140(ptr) AccessChain 99(params) 139 12 + 761: 71(int) Load 760 + 762: 71(int) ISub 761 225 + 763: 7(int) Bitcast 762 + 764: 157(bool) ULessThan 759 763 + SelectionMerge 766 None + BranchConditional 764 765 766 + 765: Label + 767: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 52 + 768: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 32 769 769 12 12 + 770: 7(int) Load 133(index) + 771: 140(ptr) AccessChain 99(params) 139 12 + 772: 71(int) Load 771 + 773: 7(int) Bitcast 772 + 774: 7(int) ISub 770 773 + 775: 218(ptr) AccessChain 191 193 774 193 + 776: 69(fvec4) Load 775 + 777: 19(fvec3) VectorShuffle 776 776 0 1 2 + 778: 19(fvec3) Load 248(pos) + 779: 19(fvec3) FSub 777 778 + Store 700(a) 779 + 780: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 32 781 781 12 12 + 782: 7(int) Load 133(index) + 783: 140(ptr) AccessChain 99(params) 139 12 + 784: 71(int) Load 783 + 785: 7(int) Bitcast 784 + 786: 7(int) ISub 782 785 + 787: 7(int) IAdd 786 36 + 788: 218(ptr) AccessChain 191 193 787 193 + 789: 69(fvec4) Load 788 + 790: 19(fvec3) VectorShuffle 789 789 0 1 2 + 791: 19(fvec3) Load 248(pos) + 792: 19(fvec3) FSub 790 791 + Store 713(b) 792 + 793: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 32 794 794 12 12 + 795: 7(int) Load 133(index) + 796: 7(int) IAdd 795 36 + 797: 218(ptr) AccessChain 191 193 796 193 + 798: 69(fvec4) Load 797 + 799: 19(fvec3) VectorShuffle 798 798 0 1 2 + 800: 19(fvec3) Load 248(pos) + 801: 19(fvec3) FSub 799 800 + Store 730(c) 801 + 802: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 32 803 803 12 12 + 804: 19(fvec3) Load 700(a) + 805: 19(fvec3) Load 713(b) + 806: 19(fvec3) ExtInst 3(GLSL.std.450) 68(Cross) 804 805 + 807: 19(fvec3) Load 713(b) + 808: 19(fvec3) Load 730(c) + 809: 19(fvec3) ExtInst 3(GLSL.std.450) 68(Cross) 807 808 + 810: 19(fvec3) FAdd 806 809 + 811: 19(fvec3) Load 678(normal) + 812: 19(fvec3) FAdd 811 810 + Store 678(normal) 812 + Branch 766 + 766: Label + Branch 688 + 688: Label + 813: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 52 + 814: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 32 815 815 12 12 + 816: 132(ptr) AccessChain 121(id) 36 + 817: 7(int) Load 816 + 818: 140(ptr) AccessChain 99(params) 139 36 + 819: 71(int) Load 818 + 820: 71(int) ISub 819 225 + 821: 7(int) Bitcast 820 + 822: 157(bool) ULessThan 817 821 + SelectionMerge 824 None + BranchConditional 822 823 824 + 823: Label + 825: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 52 + 826: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 32 827 827 12 12 + 828: 132(ptr) AccessChain 121(id) 12 + 829: 7(int) Load 828 + 830: 157(bool) UGreaterThan 829 12 + SelectionMerge 832 None + BranchConditional 830 831 832 + 831: Label + 833: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 52 + 834: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 32 835 835 12 12 + 836: 7(int) Load 133(index) + 837: 140(ptr) AccessChain 99(params) 139 12 + 838: 71(int) Load 837 + 839: 7(int) Bitcast 838 + 840: 7(int) IAdd 836 839 + 841: 218(ptr) AccessChain 191 193 840 193 + 842: 69(fvec4) Load 841 + 843: 19(fvec3) VectorShuffle 842 842 0 1 2 + 844: 19(fvec3) Load 248(pos) + 845: 19(fvec3) FSub 843 844 + Store 700(a) 845 + 846: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 32 847 847 12 12 + 848: 7(int) Load 133(index) + 849: 140(ptr) AccessChain 99(params) 139 12 + 850: 71(int) Load 849 + 851: 7(int) Bitcast 850 + 852: 7(int) IAdd 848 851 + 853: 7(int) ISub 852 36 + 854: 218(ptr) AccessChain 191 193 853 193 + 855: 69(fvec4) Load 854 + 856: 19(fvec3) VectorShuffle 855 855 0 1 2 + 857: 19(fvec3) Load 248(pos) + 858: 19(fvec3) FSub 856 857 + Store 713(b) 858 + 859: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 32 860 860 12 12 + 861: 7(int) Load 133(index) + 862: 7(int) ISub 861 36 + 863: 218(ptr) AccessChain 191 193 862 193 + 864: 69(fvec4) Load 863 + 865: 19(fvec3) VectorShuffle 864 864 0 1 2 + 866: 19(fvec3) Load 248(pos) + 867: 19(fvec3) FSub 865 866 + Store 730(c) 867 + 868: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 32 869 869 12 12 + 870: 19(fvec3) Load 700(a) + 871: 19(fvec3) Load 713(b) + 872: 19(fvec3) ExtInst 3(GLSL.std.450) 68(Cross) 870 871 + 873: 19(fvec3) Load 713(b) + 874: 19(fvec3) Load 730(c) + 875: 19(fvec3) ExtInst 3(GLSL.std.450) 68(Cross) 873 874 + 876: 19(fvec3) FAdd 872 875 + 877: 19(fvec3) Load 678(normal) + 878: 19(fvec3) FAdd 877 876 + Store 678(normal) 878 + Branch 832 + 832: Label + 879: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 52 + 880: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 32 881 881 12 12 + 882: 132(ptr) AccessChain 121(id) 12 + 883: 7(int) Load 882 + 884: 140(ptr) AccessChain 99(params) 139 12 + 885: 71(int) Load 884 + 886: 71(int) ISub 885 225 + 887: 7(int) Bitcast 886 + 888: 157(bool) ULessThan 883 887 + SelectionMerge 890 None + BranchConditional 888 889 890 + 889: Label + 891: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 52 + 892: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 32 893 893 12 12 + 894: 7(int) Load 133(index) + 895: 7(int) IAdd 894 36 + 896: 218(ptr) AccessChain 191 193 895 193 + 897: 69(fvec4) Load 896 + 898: 19(fvec3) VectorShuffle 897 897 0 1 2 + 899: 19(fvec3) Load 248(pos) + 900: 19(fvec3) FSub 898 899 + Store 700(a) 900 + 901: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 32 902 902 12 12 + 903: 7(int) Load 133(index) + 904: 140(ptr) AccessChain 99(params) 139 12 + 905: 71(int) Load 904 + 906: 7(int) Bitcast 905 + 907: 7(int) IAdd 903 906 + 908: 7(int) IAdd 907 36 + 909: 218(ptr) AccessChain 191 193 908 193 + 910: 69(fvec4) Load 909 + 911: 19(fvec3) VectorShuffle 910 910 0 1 2 + 912: 19(fvec3) Load 248(pos) + 913: 19(fvec3) FSub 911 912 + Store 713(b) 913 + 914: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 32 915 915 12 12 + 916: 7(int) Load 133(index) + 917: 140(ptr) AccessChain 99(params) 139 12 + 918: 71(int) Load 917 + 919: 7(int) Bitcast 918 + 920: 7(int) IAdd 916 919 + 921: 218(ptr) AccessChain 191 193 920 193 + 922: 69(fvec4) Load 921 + 923: 19(fvec3) VectorShuffle 922 922 0 1 2 + 924: 19(fvec3) Load 248(pos) + 925: 19(fvec3) FSub 923 924 + Store 730(c) 925 + 926: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 32 927 927 12 12 + 928: 19(fvec3) Load 700(a) + 929: 19(fvec3) Load 713(b) + 930: 19(fvec3) ExtInst 3(GLSL.std.450) 68(Cross) 928 929 + 931: 19(fvec3) Load 713(b) + 932: 19(fvec3) Load 730(c) + 933: 19(fvec3) ExtInst 3(GLSL.std.450) 68(Cross) 931 932 + 934: 19(fvec3) FAdd 930 933 + 935: 19(fvec3) Load 678(normal) + 936: 19(fvec3) FAdd 935 934 + Store 678(normal) 936 + Branch 890 + 890: Label + Branch 824 + 824: Label + 937: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 52 + 938: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 32 939 939 12 12 + 940: 7(int) Load 133(index) + 941: 19(fvec3) Load 678(normal) + 942: 19(fvec3) ExtInst 3(GLSL.std.450) 69(Normalize) 941 + 943: 16(float) CompositeExtract 942 0 + 944: 16(float) CompositeExtract 942 1 + 945: 16(float) CompositeExtract 942 2 + 946: 69(fvec4) CompositeConstruct 943 944 945 226 + 947: 218(ptr) AccessChain 214 193 940 548 + Store 947 946 + Branch 674 + 674: Label Return FunctionEnd -35(springForce(vf3;vf3;f1;): 26(fvec3) Function None 30 - 32(p0): 28(ptr) FunctionParameter - 33(p1): 28(ptr) FunctionParameter - 34(restDist): 29(ptr) FunctionParameter - 38: Label - 52(dist): 28(ptr) Variable Function - 39: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(Acosh) 37 - 40: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103 16 11 11 11 11 - 43: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 41 32(p0) 44 - 47: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 45 33(p1) 44 - 50: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 48 34(restDist) 44 - 51: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 101 37 35(springForce(vf3;vf3;f1;) - 56: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 53 52(dist) 44 - 57: 26(fvec3) Load 32(p0) - 58: 26(fvec3) Load 33(p1) - 59: 26(fvec3) FSub 57 58 - Store 52(dist) 59 - 60: 26(fvec3) Load 52(dist) - 61: 26(fvec3) ExtInst 2(GLSL.std.450) 69(Normalize) 60 - 98: 97(ptr) AccessChain 93(params) 96 - 99: 23(float) Load 98 - 100: 26(fvec3) VectorTimesScalar 61 99 - 101: 26(fvec3) Load 52(dist) - 102: 23(float) ExtInst 2(GLSL.std.450) 66(Length) 101 - 103: 23(float) Load 34(restDist) - 104: 23(float) FSub 102 103 - 105: 26(fvec3) VectorTimesScalar 100 104 - ReturnValue 105 + Line 1 66 50 +28(springForce(vf3;vf3;f1;): 19(fvec3) Function None 23 + 25(p0): 21(ptr) FunctionParameter + 26(p1): 21(ptr) FunctionParameter + 27(restDist): 22(ptr) FunctionParameter + 29: Label + 58(dist): 21(ptr) Variable Function + 39: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 31 + 40: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 32 34 34 12 12 + 43: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 41 25(p0) 44 + 47: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 45 26(p1) 44 + 50: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 48 27(restDist) 44 + 54: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 101(DebugFunctionDefinition) 31 28(springForce(vf3;vf3;f1;) + 55: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 31 + 56: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 32 57 57 12 12 + 61: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 59 58(dist) 44 + 62: 19(fvec3) Load 25(p0) + 63: 19(fvec3) Load 26(p1) + 64: 19(fvec3) FSub 62 63 + Store 58(dist) 64 + 65: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 32 66 66 12 12 + 67: 19(fvec3) Load 58(dist) + 68: 19(fvec3) ExtInst 3(GLSL.std.450) 69(Normalize) 67 + 104: 103(ptr) AccessChain 99(params) 102 + 105: 16(float) Load 104 + 106: 19(fvec3) VectorTimesScalar 68 105 + 107: 19(fvec3) Load 58(dist) + 108: 16(float) ExtInst 3(GLSL.std.450) 66(Length) 107 + 109: 16(float) Load 27(restDist) + 110: 16(float) FSub 108 109 + 111: 19(fvec3) VectorTimesScalar 106 110 + ReturnValue 111 FunctionEnd diff --git a/Test/baseResults/spv.debuginfo.glsl.frag.out b/Test/baseResults/spv.debuginfo.glsl.frag.out index 22b17314..dda34650 100755 --- a/Test/baseResults/spv.debuginfo.glsl.frag.out +++ b/Test/baseResults/spv.debuginfo.glsl.frag.out @@ -1,937 +1,1099 @@ spv.debuginfo.glsl.frag -Validation failed // Module Version 10000 // Generated by (magic number): 8000b -// Id's are bound by 704 +// Id's are bound by 854 Capability Shader Capability ImageQuery Extension "SPV_KHR_non_semantic_info" - 1: ExtInstImport "NonSemantic.Shader.DebugInfo.100" - 2: ExtInstImport "GLSL.std.450" + 2: ExtInstImport "NonSemantic.Shader.DebugInfo.100" + 3: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Fragment 13 "main" 400 445 - ExecutionMode 13 OriginUpperLeft + EntryPoint Fragment 14 "main" 476 530 + ExecutionMode 14 OriginUpperLeft + 1: String "" 8: String "uint" - 14: String "main" - 17: String "" - 24: String "float" - 39: String "textureProj" + 17: String "float" + 35: String "textureProj" + 38: String "// OpModuleProcessed auto-map-locations +// OpModuleProcessed auto-map-bindings +// OpModuleProcessed client vulkan100 +// OpModuleProcessed target-env vulkan1.0 +// OpModuleProcessed keep-uncalled +// OpModuleProcessed entry-point main +#line 1 +" 45: String "P" 49: String "layer" 52: String "offset" - 59: String "filterPCF" - 65: String "sc" - 77: String "shadow" - 83: String "fragcolor" - 86: String "fragpos" - 96: String "shadowCoord" - 118: String "bool" - 132: String "dist" - 137: String "type.2d.image" - 138: String "@type.2d.image" - 142: String "type.sampled.image" - 143: String "@type.sampled.image" - 147: String "samplerShadowMap" - 181: String "int" - 188: String "texDim" - 200: String "scale" - 206: String "dx" - 218: String "dy" - 229: String "shadowFactor" - 234: String "count" - 239: String "range" - 245: String "x" - 261: String "y" - 307: String "i" - 321: String "shadowClip" - 329: String "color" - 335: String "viewMatrix" - 338: String "Light" - 344: String "lights" - 347: String "debugDisplayTarget" - 351: String "UBO" - 355: String "ubo" - 387: String "fragPos" - 397: String "samplerposition" - 402: String "inUV" - 408: String "normal" - 413: String "samplerNormal" - 420: String "albedo" - 425: String "samplerAlbedo" - 447: String "outFragColor" - 509: String "N" - 528: String "L" - 548: String "V" - 560: String "lightCosInnerAngle" - 566: String "lightCosOuterAngle" - 572: String "lightRange" - 578: String "dir" - 593: String "cosDir" - 601: String "spotEffect" - 610: String "heightAttenuation" - 618: String "NdotL" - 627: String "diff" - 634: String "R" - 643: String "NdotR" - 652: String "spec" - Name 13 "main" - Name 38 "textureProj(vf4;f1;vf2;" - Name 35 "P" - Name 36 "layer" - Name 37 "offset" + 60: String "filterPCF" + 66: String "sc" + 79: String "shadow" + 85: String "fragcolor" + 88: String "fragpos" + 90: String "main" + 97: String "int" + 102: String "global_var" + 117: String "shadowCoord" + 139: String "bool" + 160: String "dist" + 164: String "type.2d.image" + 165: String "@type.2d.image" + 169: String "type.sampled.image" + 170: String "@type.sampled.image" + 174: String "samplerShadowMap" + 222: String "texDim" + 234: String "scale" + 241: String "dx" + 254: String "dy" + 266: String "shadowFactor" + 272: String "count" + 278: String "range" + 285: String "x" + 306: String "y" + 369: String "i" + 388: String "shadowClip" + 395: String "color" + 401: String "viewMatrix" + 404: String "Light" + 410: String "lights" + 413: String "debugDisplayTarget" + 417: String "UBO" + 421: String "ubo" + 464: String "fragPos" + 473: String "samplerposition" + 478: String "inUV" + 486: String "normal" + 490: String "samplerNormal" + 499: String "albedo" + 503: String "samplerAlbedo" + 532: String "outFragColor" + 624: String "N" + 649: String "L" + 673: String "V" + 688: String "lightCosInnerAngle" + 695: String "lightCosOuterAngle" + 702: String "lightRange" + 709: String "dir" + 725: String "cosDir" + 734: String "spotEffect" + 744: String "heightAttenuation" + 753: String "NdotL" + 763: String "diff" + 771: String "R" + 781: String "NdotR" + 791: String "spec" + Name 14 "main" + Name 33 "textureProj(vf4;f1;vf2;" + Name 30 "P" + Name 31 "layer" + Name 32 "offset" Name 58 "filterPCF(vf4;f1;" Name 56 "sc" Name 57 "layer" - Name 76 "shadow(vf3;vf3;" - Name 74 "fragcolor" - Name 75 "fragpos" - Name 89 "shadow" - Name 94 "shadowCoord" - Name 130 "dist" - Name 145 "samplerShadowMap" - Name 186 "texDim" - Name 198 "scale" - Name 204 "dx" - Name 216 "dy" - Name 227 "shadowFactor" - Name 232 "count" - Name 237 "range" - Name 243 "x" - Name 259 "y" - Name 284 "param" - Name 286 "param" - Name 288 "param" - Name 305 "i" - Name 319 "shadowClip" - Name 327 "Light" - MemberName 327(Light) 0 "position" - MemberName 327(Light) 1 "target" - MemberName 327(Light) 2 "color" - MemberName 327(Light) 3 "viewMatrix" - Name 341 "UBO" - MemberName 341(UBO) 0 "viewPos" - MemberName 341(UBO) 1 "lights" - MemberName 341(UBO) 2 "useShadows" - MemberName 341(UBO) 3 "debugDisplayTarget" - Name 353 "ubo" - Name 366 "shadowFactor" - Name 372 "param" - Name 374 "param" - Name 385 "fragPos" - Name 395 "samplerposition" - Name 400 "inUV" - Name 406 "normal" - Name 411 "samplerNormal" - Name 418 "albedo" - Name 423 "samplerAlbedo" - Name 445 "outFragColor" - Name 450 "param" - Name 451 "param" - Name 499 "fragcolor" - Name 507 "N" - Name 514 "i" - Name 526 "L" - Name 538 "dist" - Name 546 "V" - Name 558 "lightCosInnerAngle" - Name 564 "lightCosOuterAngle" - Name 570 "lightRange" - Name 576 "dir" - Name 591 "cosDir" - Name 599 "spotEffect" - Name 608 "heightAttenuation" - Name 616 "NdotL" - Name 625 "diff" - Name 632 "R" - Name 641 "NdotR" - Name 650 "spec" - Name 694 "param" - Name 696 "param" - Decorate 145(samplerShadowMap) DescriptorSet 0 - Decorate 145(samplerShadowMap) Binding 5 - MemberDecorate 327(Light) 0 Offset 0 - MemberDecorate 327(Light) 1 Offset 16 - MemberDecorate 327(Light) 2 Offset 32 - MemberDecorate 327(Light) 3 ColMajor - MemberDecorate 327(Light) 3 Offset 48 - MemberDecorate 327(Light) 3 MatrixStride 16 - Decorate 339 ArrayStride 112 - MemberDecorate 341(UBO) 0 Offset 0 - MemberDecorate 341(UBO) 1 Offset 16 - MemberDecorate 341(UBO) 2 Offset 352 - MemberDecorate 341(UBO) 3 Offset 356 - Decorate 341(UBO) Block - Decorate 353(ubo) DescriptorSet 0 - Decorate 353(ubo) Binding 4 - Decorate 395(samplerposition) DescriptorSet 0 - Decorate 395(samplerposition) Binding 1 - Decorate 400(inUV) Location 0 - Decorate 411(samplerNormal) DescriptorSet 0 - Decorate 411(samplerNormal) Binding 2 - Decorate 423(samplerAlbedo) DescriptorSet 0 - Decorate 423(samplerAlbedo) Binding 3 - Decorate 445(outFragColor) Location 0 - 3: TypeVoid - 4: TypeFunction 3 - 6: TypeInt 32 0 - 9: 6(int) Constant 32 - 10: 6(int) Constant 6 - 11: 6(int) Constant 0 - 7: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 8 9 10 11 - 12: 6(int) Constant 3 - 5: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 8(Floor) 12 3 - 16: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 35(Modf) 0 17 - 19: 6(int) Constant 1 - 20: 6(int) Constant 4 - 21: 6(int) Constant 2 - 18: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 1(Round) 19 20 16 21 - 15: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 20(Cosh) 14 5 16 11 11 18 14 12 11 - 23: TypeFloat 32 - 25: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 24 9 12 11 - 26: TypeVector 23(float) 4 - 27: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 6(FSign) 25 20 - 28: TypePointer Function 26(fvec4) - 29: TypePointer Function 23(float) - 30: TypeVector 23(float) 2 - 31: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 6(FSign) 25 21 - 32: TypePointer Function 30(fvec2) - 33: TypeFunction 23(float) 28(ptr) 29(ptr) 32(ptr) - 34: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 8(Floor) 12 25 27 25 31 - 40: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 20(Cosh) 39 34 16 11 11 18 39 12 11 - 44: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 45 27 16 11 11 40 20 19 - 47: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 31(Sqrt) - 48: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 49 25 16 11 11 40 20 21 - 51: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 52 31 16 11 11 40 20 12 - 54: TypeFunction 23(float) 28(ptr) 29(ptr) - 55: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 8(Floor) 12 25 27 25 - 60: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 20(Cosh) 59 55 16 11 11 18 59 12 11 - 64: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 65 27 16 11 11 60 20 19 - 67: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 49 25 16 11 11 60 20 21 - 69: TypeVector 23(float) 3 - 70: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 6(FSign) 25 12 - 71: TypePointer Function 69(fvec3) - 72: TypeFunction 69(fvec3) 71(ptr) 71(ptr) - 73: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 8(Floor) 12 70 70 70 - 78: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 20(Cosh) 77 73 16 11 11 18 77 12 11 - 82: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 83 70 16 11 11 78 20 19 - 85: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 86 70 16 11 11 78 20 21 - 91: 6(int) Constant 59 - 90: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 77 25 16 91 11 40 20 - 93: 23(float) Constant 1065353216 - 97: 6(int) Constant 60 - 95: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 96 27 16 97 11 40 20 - 106: 23(float) Constant 1056964608 - 114: TypeBool - 117: 23(float) Constant 3212836864 - 119: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 118 9 21 11 - 125: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 118 9 21 11 - 133: 6(int) Constant 65 - 131: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 132 25 16 133 11 40 20 - 135: TypeImage 23(float) 2D array sampled format:Unknown - 139: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 0(Unknown) - 136: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(Fract) 137 11 16 133 11 18 138 139 12 - 140: TypeSampledImage 135 - 141: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(Fract) 142 11 16 133 11 18 143 139 12 - 144: TypePointer UniformConstant 140 -145(samplerShadowMap): 144(ptr) Variable UniformConstant - 148: 6(int) Constant 8 - 146: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(Atan) 147 141 16 133 11 18 147 145(samplerShadowMap) 148 - 162: 23(float) Constant 0 - 163: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 118 9 21 11 - 170: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 118 9 21 11 - 175: 23(float) Constant 1048576000 - 180: TypeInt 32 1 - 182: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 181 9 20 11 - 183: TypeVector 180(int) 2 - 184: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 6(FSign) 182 21 - 185: TypePointer Function 183(ivec2) - 189: 6(int) Constant 76 - 187: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 188 184 16 189 11 60 20 - 192: 180(int) Constant 0 - 194: TypeVector 180(int) 3 - 195: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 6(FSign) 182 12 - 201: 6(int) Constant 77 - 199: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 200 25 16 201 11 60 20 - 203: 23(float) Constant 1069547520 - 207: 6(int) Constant 78 - 205: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 206 25 16 207 11 60 20 - 211: TypePointer Function 180(int) - 219: 6(int) Constant 79 - 217: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 218 25 16 219 11 60 20 - 230: 6(int) Constant 81 - 228: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 229 25 16 230 11 60 20 - 235: 6(int) Constant 82 - 233: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 234 182 16 235 11 60 20 - 240: 6(int) Constant 83 - 238: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 239 182 16 240 11 60 20 - 242: 180(int) Constant 1 - 246: 6(int) Constant 85 - 244: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 245 182 16 246 11 60 20 - 257: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 118 9 21 11 - 262: 6(int) Constant 87 - 260: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 261 182 16 262 11 60 20 - 273: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 118 9 21 11 - 308: 6(int) Constant 98 - 306: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 307 182 16 308 11 78 20 - 316: 180(int) Constant 3 - 317: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 118 9 21 11 - 322: 6(int) Constant 100 - 320: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 321 27 16 322 11 78 20 - 324: TypeMatrix 26(fvec4) 4 - 326: 114(bool) ConstantTrue - 325: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 108 27 20 326 - 327(Light): TypeStruct 26(fvec4) 26(fvec4) 26(fvec4) 324 - 330: 6(int) Constant 45 - 331: 6(int) Constant 7 - 328: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 329 27 16 330 331 11 11 12 - 332: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 329 27 16 330 331 11 11 12 - 333: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 329 27 16 330 331 11 11 12 - 336: 6(int) Constant 46 - 334: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 335 325 16 336 331 11 11 12 - 337: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(Fract) 338 19 16 322 11 18 338 11 12 328 332 333 334 - 339: TypeArray 327(Light) 12 - 340: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 5(SAbs) 337 12 - 341(UBO): TypeStruct 26(fvec4) 339 180(int) 180(int) - 342: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 329 27 16 330 331 11 11 12 - 345: 6(int) Constant 52 - 343: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 344 340 16 345 148 11 11 12 - 348: 6(int) Constant 54 - 346: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 347 182 16 348 10 11 11 12 - 349: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 347 182 16 348 10 11 11 12 - 350: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(Fract) 351 19 16 322 11 18 351 11 12 342 343 346 349 - 352: TypePointer Uniform 341(UBO) - 353(ubo): 352(ptr) Variable Uniform - 354: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(Atan) 355 350 16 322 11 18 355 353(ubo) 148 - 357: TypePointer Uniform 324 - 368: 6(int) Constant 104 - 367: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 229 25 16 368 11 78 20 - 388: 6(int) Constant 117 - 386: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 387 70 16 388 11 15 20 - 390: TypeImage 23(float) 2D sampled format:Unknown - 391: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(Fract) 137 11 16 388 11 18 138 139 12 - 392: TypeSampledImage 390 - 393: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(Fract) 142 11 16 388 11 18 143 139 12 - 394: TypePointer UniformConstant 392 -395(samplerposition): 394(ptr) Variable UniformConstant - 396: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(Atan) 397 393 16 388 11 18 397 395(samplerposition) 148 - 399: TypePointer Input 30(fvec2) - 400(inUV): 399(ptr) Variable Input - 401: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(Atan) 402 31 16 388 11 18 402 400(inUV) 148 - 409: 6(int) Constant 118 - 407: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 408 70 16 409 11 15 20 -411(samplerNormal): 394(ptr) Variable UniformConstant - 412: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(Atan) 413 393 16 409 11 18 413 411(samplerNormal) 148 - 421: 6(int) Constant 119 - 419: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 420 27 16 421 11 15 20 -423(samplerAlbedo): 394(ptr) Variable UniformConstant - 424: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(Atan) 425 393 16 421 11 18 425 423(samplerAlbedo) 148 - 429: TypePointer Uniform 180(int) - 432: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 118 9 21 11 - 444: TypePointer Output 26(fvec4) -445(outFragColor): 444(ptr) Variable Output - 448: 6(int) Constant 125 - 446: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(Atan) 447 27 16 448 11 18 447 445(outFragColor) 148 - 449: 69(fvec3) ConstantComposite 93 93 93 - 454: TypePointer Output 23(float) - 501: 6(int) Constant 145 - 500: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 83 70 16 501 11 15 20 - 505: 23(float) Constant 1036831949 - 510: 6(int) Constant 147 - 508: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 509 70 16 510 11 15 20 - 516: 6(int) Constant 149 - 515: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 307 182 16 516 11 15 20 - 524: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 118 9 21 11 - 529: 6(int) Constant 152 - 527: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 528 70 16 529 11 15 20 - 532: TypePointer Uniform 26(fvec4) - 540: 6(int) Constant 154 - 539: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 132 25 16 540 11 15 20 - 549: 6(int) Constant 158 - 547: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 548 70 16 549 11 15 20 - 561: 6(int) Constant 161 - 559: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 560 25 16 561 11 15 20 - 563: 23(float) Constant 1064781546 - 567: 6(int) Constant 162 - 565: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 566 25 16 567 11 15 20 - 569: 23(float) Constant 1063781322 - 573: 6(int) Constant 163 - 571: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 572 25 16 573 11 15 20 - 575: 23(float) Constant 1120403456 - 579: 6(int) Constant 166 - 577: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 578 70 16 579 11 15 20 - 594: 6(int) Constant 169 - 592: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 593 25 16 594 11 15 20 - 602: 6(int) Constant 170 - 600: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 601 25 16 602 11 15 20 - 611: 6(int) Constant 171 - 609: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 610 25 16 611 11 15 20 - 619: 6(int) Constant 174 - 617: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 618 25 16 619 11 15 20 - 628: 6(int) Constant 175 - 626: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 627 70 16 628 11 15 20 - 635: 6(int) Constant 178 - 633: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 634 70 16 635 11 15 20 - 644: 6(int) Constant 179 - 642: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 643 25 16 644 11 15 20 - 653: 6(int) Constant 180 - 651: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 652 70 16 653 11 15 20 - 656: 23(float) Constant 1098907648 - 661: 23(float) Constant 1075838976 - 676: 180(int) Constant 2 - 690: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 118 9 21 11 - 13(main): 3 Function None 4 - 22: Label - 385(fragPos): 71(ptr) Variable Function - 406(normal): 71(ptr) Variable Function - 418(albedo): 28(ptr) Variable Function - 450(param): 71(ptr) Variable Function - 451(param): 71(ptr) Variable Function - 499(fragcolor): 71(ptr) Variable Function - 507(N): 71(ptr) Variable Function - 514(i): 211(ptr) Variable Function - 526(L): 71(ptr) Variable Function - 538(dist): 29(ptr) Variable Function - 546(V): 71(ptr) Variable Function -558(lightCosInnerAngle): 29(ptr) Variable Function -564(lightCosOuterAngle): 29(ptr) Variable Function - 570(lightRange): 29(ptr) Variable Function - 576(dir): 71(ptr) Variable Function - 591(cosDir): 29(ptr) Variable Function - 599(spotEffect): 29(ptr) Variable Function -608(heightAttenuation): 29(ptr) Variable Function - 616(NdotL): 29(ptr) Variable Function - 625(diff): 71(ptr) Variable Function - 632(R): 71(ptr) Variable Function - 641(NdotR): 29(ptr) Variable Function - 650(spec): 71(ptr) Variable Function - 694(param): 71(ptr) Variable Function - 696(param): 71(ptr) Variable Function - 384: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 101 15 13(main) - 389: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 386 385(fragPos) 47 - 398: 392 Load 395(samplerposition) - 403: 30(fvec2) Load 400(inUV) - 404: 26(fvec4) ImageSampleImplicitLod 398 403 - 405: 69(fvec3) VectorShuffle 404 404 0 1 2 - Store 385(fragPos) 405 - 410: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 407 406(normal) 47 - 414: 392 Load 411(samplerNormal) - 415: 30(fvec2) Load 400(inUV) - 416: 26(fvec4) ImageSampleImplicitLod 414 415 - 417: 69(fvec3) VectorShuffle 416 416 0 1 2 - Store 406(normal) 417 - 422: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 419 418(albedo) 47 - 426: 392 Load 423(samplerAlbedo) - 427: 30(fvec2) Load 400(inUV) - 428: 26(fvec4) ImageSampleImplicitLod 426 427 - Store 418(albedo) 428 - 430: 429(ptr) AccessChain 353(ubo) 316 - 431: 180(int) Load 430 - 433: 114(bool) SGreaterThan 431 192 - SelectionMerge 435 None - BranchConditional 433 434 435 - 434: Label - 436: 429(ptr) AccessChain 353(ubo) 316 - 437: 180(int) Load 436 - SelectionMerge 443 None - Switch 437 443 - case 1: 438 - case 2: 439 - case 3: 440 - case 4: 441 - case 5: 442 - 438: Label - Store 450(param) 449 - 452: 69(fvec3) Load 385(fragPos) - Store 451(param) 452 - 453: 69(fvec3) FunctionCall 76(shadow(vf3;vf3;) 450(param) 451(param) - 455: 454(ptr) AccessChain 445(outFragColor) 11 - 456: 23(float) CompositeExtract 453 0 - Store 455 456 - 457: 454(ptr) AccessChain 445(outFragColor) 19 - 458: 23(float) CompositeExtract 453 1 - Store 457 458 - 459: 454(ptr) AccessChain 445(outFragColor) 21 - 460: 23(float) CompositeExtract 453 2 - Store 459 460 - Branch 443 - 439: Label - 462: 69(fvec3) Load 385(fragPos) - 463: 454(ptr) AccessChain 445(outFragColor) 11 - 464: 23(float) CompositeExtract 462 0 - Store 463 464 - 465: 454(ptr) AccessChain 445(outFragColor) 19 - 466: 23(float) CompositeExtract 462 1 - Store 465 466 - 467: 454(ptr) AccessChain 445(outFragColor) 21 - 468: 23(float) CompositeExtract 462 2 - Store 467 468 - Branch 443 - 440: Label - 470: 69(fvec3) Load 406(normal) - 471: 454(ptr) AccessChain 445(outFragColor) 11 - 472: 23(float) CompositeExtract 470 0 - Store 471 472 - 473: 454(ptr) AccessChain 445(outFragColor) 19 - 474: 23(float) CompositeExtract 470 1 - Store 473 474 - 475: 454(ptr) AccessChain 445(outFragColor) 21 - 476: 23(float) CompositeExtract 470 2 - Store 475 476 - Branch 443 - 441: Label - 478: 26(fvec4) Load 418(albedo) - 479: 69(fvec3) VectorShuffle 478 478 0 1 2 - 480: 454(ptr) AccessChain 445(outFragColor) 11 - 481: 23(float) CompositeExtract 479 0 - Store 480 481 - 482: 454(ptr) AccessChain 445(outFragColor) 19 - 483: 23(float) CompositeExtract 479 1 - Store 482 483 - 484: 454(ptr) AccessChain 445(outFragColor) 21 - 485: 23(float) CompositeExtract 479 2 - Store 484 485 - Branch 443 - 442: Label - 487: 26(fvec4) Load 418(albedo) - 488: 69(fvec3) VectorShuffle 487 487 3 3 3 - 489: 454(ptr) AccessChain 445(outFragColor) 11 - 490: 23(float) CompositeExtract 488 0 - Store 489 490 - 491: 454(ptr) AccessChain 445(outFragColor) 19 - 492: 23(float) CompositeExtract 488 1 - Store 491 492 - 493: 454(ptr) AccessChain 445(outFragColor) 21 - 494: 23(float) CompositeExtract 488 2 - Store 493 494 - Branch 443 - 443: Label - 497: 454(ptr) AccessChain 445(outFragColor) 12 - Store 497 93 + Name 77 "shadow(vf3;vf3;" + Name 75 "fragcolor" + Name 76 "fragpos" + Name 100 "global_var" + Name 109 "shadow" + Name 115 "shadowCoord" + Name 158 "dist" + Name 172 "samplerShadowMap" + Name 220 "texDim" + Name 232 "scale" + Name 239 "dx" + Name 252 "dy" + Name 264 "shadowFactor" + Name 270 "count" + Name 276 "range" + Name 283 "x" + Name 304 "y" + Name 334 "param" + Name 336 "param" + Name 338 "param" + Name 367 "i" + Name 386 "shadowClip" + Name 393 "Light" + MemberName 393(Light) 0 "position" + MemberName 393(Light) 1 "target" + MemberName 393(Light) 2 "color" + MemberName 393(Light) 3 "viewMatrix" + Name 407 "UBO" + MemberName 407(UBO) 0 "viewPos" + MemberName 407(UBO) 1 "lights" + MemberName 407(UBO) 2 "useShadows" + MemberName 407(UBO) 3 "debugDisplayTarget" + Name 419 "ubo" + Name 434 "shadowFactor" + Name 439 "param" + Name 441 "param" + Name 462 "fragPos" + Name 471 "samplerposition" + Name 476 "inUV" + Name 484 "normal" + Name 488 "samplerNormal" + Name 497 "albedo" + Name 501 "samplerAlbedo" + Name 530 "outFragColor" + Name 534 "param" + Name 535 "param" + Name 613 "fragcolor" + Name 622 "N" + Name 630 "i" + Name 647 "L" + Name 660 "dist" + Name 671 "V" + Name 686 "lightCosInnerAngle" + Name 693 "lightCosOuterAngle" + Name 700 "lightRange" + Name 707 "dir" + Name 723 "cosDir" + Name 732 "spotEffect" + Name 742 "heightAttenuation" + Name 751 "NdotL" + Name 761 "diff" + Name 769 "R" + Name 779 "NdotR" + Name 789 "spec" + Name 841 "param" + Name 843 "param" + Decorate 172(samplerShadowMap) DescriptorSet 0 + Decorate 172(samplerShadowMap) Binding 5 + MemberDecorate 393(Light) 0 Offset 0 + MemberDecorate 393(Light) 1 Offset 16 + MemberDecorate 393(Light) 2 Offset 32 + MemberDecorate 393(Light) 3 ColMajor + MemberDecorate 393(Light) 3 Offset 48 + MemberDecorate 393(Light) 3 MatrixStride 16 + Decorate 405 ArrayStride 112 + MemberDecorate 407(UBO) 0 Offset 0 + MemberDecorate 407(UBO) 1 Offset 16 + MemberDecorate 407(UBO) 2 Offset 352 + MemberDecorate 407(UBO) 3 Offset 356 + Decorate 407(UBO) Block + Decorate 419(ubo) DescriptorSet 0 + Decorate 419(ubo) Binding 4 + Decorate 471(samplerposition) DescriptorSet 0 + Decorate 471(samplerposition) Binding 1 + Decorate 476(inUV) Location 0 + Decorate 488(samplerNormal) DescriptorSet 0 + Decorate 488(samplerNormal) Binding 2 + Decorate 501(samplerAlbedo) DescriptorSet 0 + Decorate 501(samplerAlbedo) Binding 3 + Decorate 530(outFragColor) Location 0 + 4: TypeVoid + 5: TypeFunction 4 + 7: TypeInt 32 0 + 10: 7(int) Constant 32 + 11: 7(int) Constant 6 + 12: 7(int) Constant 0 + 9: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 8 10 11 12 + 13: 7(int) Constant 3 + 6: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 8(DebugTypeFunction) 13 4 + 16: TypeFloat 32 + 18: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 17 10 13 12 + 19: TypeVector 16(float) 4 + 20: 7(int) Constant 4 + 21: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 18 20 + 22: TypePointer Function 19(fvec4) + 23: TypePointer Function 16(float) + 24: TypeVector 16(float) 2 + 25: 7(int) Constant 2 + 26: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 18 25 + 27: TypePointer Function 24(fvec2) + 28: TypeFunction 16(float) 22(ptr) 23(ptr) 27(ptr) + 29: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 8(DebugTypeFunction) 13 18 21 18 26 + 37: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 35(DebugSource) 1 38 + 39: 7(int) Constant 59 + 41: 7(int) Constant 1 + 40: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 1(DebugCompilationUnit) 41 20 37 25 + 36: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 20(DebugFunction) 35 29 37 39 12 40 35 13 39 + 44: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 45 21 37 39 12 36 20 41 + 47: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 31(DebugExpression) + 48: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 49 18 37 39 12 36 20 25 + 51: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 52 26 37 39 12 36 20 13 + 54: TypeFunction 16(float) 22(ptr) 23(ptr) + 55: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 8(DebugTypeFunction) 13 18 21 18 + 62: 7(int) Constant 76 + 61: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 20(DebugFunction) 60 55 37 62 12 40 60 13 62 + 65: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 66 21 37 62 12 61 20 41 + 68: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 49 18 37 62 12 61 20 25 + 70: TypeVector 16(float) 3 + 71: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 18 13 + 72: TypePointer Function 70(fvec3) + 73: TypeFunction 70(fvec3) 72(ptr) 72(ptr) + 74: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 8(DebugTypeFunction) 13 71 71 71 + 81: 7(int) Constant 99 + 80: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 20(DebugFunction) 79 74 37 81 12 40 79 13 81 + 84: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 85 71 37 81 12 80 20 41 + 87: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 88 71 37 81 12 80 20 25 + 92: 7(int) Constant 116 + 91: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 20(DebugFunction) 90 6 37 92 12 40 90 13 92 + 95: 7(int) Constant 41 + 96: TypeInt 32 1 + 98: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 97 10 20 12 + 99: TypePointer Private 96(int) + 100(global_var): 99(ptr) Variable Private + 103: 7(int) Constant 8 + 101: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 102 98 37 95 12 40 102 100(global_var) 103 + 104: 96(int) Constant 0 + 108: 7(int) Constant 61 + 110: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 79 18 37 108 12 36 20 + 112: 16(float) Constant 1065353216 + 114: 7(int) Constant 62 + 116: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 117 21 37 114 12 36 20 + 125: 7(int) Constant 63 + 128: 16(float) Constant 1056964608 + 137: 7(int) Constant 65 + 138: TypeBool + 140: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 139 10 25 12 + 143: 16(float) Constant 3212836864 + 157: 7(int) Constant 67 + 159: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 160 18 37 157 12 36 20 + 162: TypeImage 16(float) 2D array sampled format:Unknown + 166: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 0(DebugInfoNone) + 163: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 164 12 37 157 12 40 165 166 13 + 167: TypeSampledImage 162 + 168: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 169 12 37 157 12 40 170 166 13 + 171: TypePointer UniformConstant 167 +172(samplerShadowMap): 171(ptr) Variable UniformConstant + 173: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 174 168 37 157 12 40 174 172(samplerShadowMap) 103 + 187: 7(int) Constant 68 + 190: 16(float) Constant 0 + 205: 7(int) Constant 70 + 206: 16(float) Constant 1048576000 + 209: 7(int) Constant 73 + 216: 7(int) Constant 78 + 217: TypeVector 96(int) 2 + 218: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 98 25 + 219: TypePointer Function 217(ivec2) + 221: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 222 218 37 216 12 61 20 + 226: TypeVector 96(int) 3 + 227: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 98 13 + 231: 7(int) Constant 79 + 233: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 234 18 37 231 12 61 20 + 236: 16(float) Constant 1069547520 + 238: 7(int) Constant 80 + 240: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 241 18 37 238 12 61 20 + 245: TypePointer Function 96(int) + 251: 7(int) Constant 81 + 253: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 254 18 37 251 12 61 20 + 263: 7(int) Constant 83 + 265: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 266 18 37 263 12 61 20 + 269: 7(int) Constant 84 + 271: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 272 98 37 269 12 61 20 + 275: 7(int) Constant 85 + 277: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 278 98 37 275 12 61 20 + 280: 96(int) Constant 1 + 282: 7(int) Constant 87 + 284: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 285 98 37 282 12 61 20 + 303: 7(int) Constant 89 + 305: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 306 98 37 303 12 61 20 + 324: 7(int) Constant 91 + 343: 7(int) Constant 92 + 356: 7(int) Constant 96 + 366: 7(int) Constant 100 + 368: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 369 98 37 366 12 80 20 + 381: 96(int) Constant 3 + 385: 7(int) Constant 102 + 387: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 388 21 37 385 12 80 20 + 390: TypeMatrix 19(fvec4) 4 + 392: 138(bool) ConstantTrue + 391: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 108(DebugTypeMatrix) 21 20 392 + 393(Light): TypeStruct 19(fvec4) 19(fvec4) 19(fvec4) 390 + 396: 7(int) Constant 47 + 397: 7(int) Constant 7 + 394: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 395 21 37 396 397 12 12 13 + 398: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 395 21 37 396 397 12 12 13 + 399: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 395 21 37 396 397 12 12 13 + 402: 7(int) Constant 48 + 400: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 401 391 37 402 397 12 12 13 + 403: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 404 41 37 385 12 40 404 12 13 394 398 399 400 + 405: TypeArray 393(Light) 13 + 406: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 403 13 + 407(UBO): TypeStruct 19(fvec4) 405 96(int) 96(int) + 408: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 395 21 37 396 397 12 12 13 + 411: 7(int) Constant 54 + 409: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 410 406 37 411 103 12 12 13 + 414: 7(int) Constant 56 + 412: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 413 98 37 414 11 12 12 13 + 415: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 413 98 37 414 11 12 12 13 + 416: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 417 41 37 385 12 40 417 12 13 408 409 412 415 + 418: TypePointer Uniform 407(UBO) + 419(ubo): 418(ptr) Variable Uniform + 420: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 421 416 37 385 12 40 421 419(ubo) 103 + 423: TypePointer Uniform 390 + 433: 7(int) Constant 106 + 435: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 266 18 37 433 12 80 20 + 444: 7(int) Constant 111 + 454: 7(int) Constant 113 + 461: 7(int) Constant 119 + 463: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 464 71 37 461 12 91 20 + 466: TypeImage 16(float) 2D sampled format:Unknown + 467: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 164 12 37 461 12 40 165 166 13 + 468: TypeSampledImage 466 + 469: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 169 12 37 461 12 40 170 166 13 + 470: TypePointer UniformConstant 468 +471(samplerposition): 470(ptr) Variable UniformConstant + 472: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 473 469 37 461 12 40 473 471(samplerposition) 103 + 475: TypePointer Input 24(fvec2) + 476(inUV): 475(ptr) Variable Input + 477: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 478 26 37 461 12 40 478 476(inUV) 103 + 483: 7(int) Constant 120 + 485: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 486 71 37 483 12 91 20 +488(samplerNormal): 470(ptr) Variable UniformConstant + 489: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 490 469 37 483 12 40 490 488(samplerNormal) 103 + 496: 7(int) Constant 121 + 498: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 499 21 37 496 12 91 20 +501(samplerAlbedo): 470(ptr) Variable UniformConstant + 502: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 503 469 37 496 12 40 503 501(samplerAlbedo) 103 + 508: 7(int) Constant 124 + 509: TypePointer Uniform 96(int) + 517: 7(int) Constant 125 + 528: 7(int) Constant 127 + 529: TypePointer Output 19(fvec4) +530(outFragColor): 529(ptr) Variable Output + 531: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 532 21 37 528 12 40 532 530(outFragColor) 103 + 533: 70(fvec3) ConstantComposite 112 112 112 + 538: TypePointer Output 16(float) + 546: 7(int) Constant 128 + 550: 7(int) Constant 130 + 559: 7(int) Constant 131 + 563: 7(int) Constant 133 + 572: 7(int) Constant 134 + 576: 7(int) Constant 136 + 586: 7(int) Constant 137 + 590: 7(int) Constant 139 + 600: 7(int) Constant 140 + 605: 7(int) Constant 142 + 608: 7(int) Constant 143 + 612: 7(int) Constant 147 + 614: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 85 71 37 612 12 91 20 + 618: 16(float) Constant 1036831949 + 621: 7(int) Constant 149 + 623: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 624 71 37 621 12 91 20 + 629: 7(int) Constant 151 + 631: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 369 98 37 629 12 91 20 + 646: 7(int) Constant 154 + 648: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 649 71 37 646 12 91 20 + 652: TypePointer Uniform 19(fvec4) + 659: 7(int) Constant 156 + 661: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 160 18 37 659 12 91 20 + 666: 7(int) Constant 157 + 670: 7(int) Constant 160 + 672: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 673 71 37 670 12 91 20 + 681: 7(int) Constant 161 + 685: 7(int) Constant 163 + 687: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 688 18 37 685 12 91 20 + 690: 16(float) Constant 1064781546 + 692: 7(int) Constant 164 + 694: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 695 18 37 692 12 91 20 + 697: 16(float) Constant 1063781322 + 699: 7(int) Constant 165 + 701: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 702 18 37 699 12 91 20 + 704: 16(float) Constant 1120403456 + 706: 7(int) Constant 168 + 708: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 709 71 37 706 12 91 20 + 722: 7(int) Constant 171 + 724: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 725 18 37 722 12 91 20 + 731: 7(int) Constant 172 + 733: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 734 18 37 731 12 91 20 + 741: 7(int) Constant 173 + 743: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 744 18 37 741 12 91 20 + 750: 7(int) Constant 176 + 752: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 753 18 37 750 12 91 20 + 760: 7(int) Constant 177 + 762: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 763 71 37 760 12 91 20 + 768: 7(int) Constant 180 + 770: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 771 71 37 768 12 91 20 + 778: 7(int) Constant 181 + 780: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 781 18 37 778 12 91 20 + 788: 7(int) Constant 182 + 790: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 791 71 37 788 12 91 20 + 794: 16(float) Constant 1098907648 + 799: 16(float) Constant 1075838976 + 803: 7(int) Constant 184 + 816: 96(int) Constant 2 + 832: 7(int) Constant 188 + 840: 7(int) Constant 190 + 848: 7(int) Constant 193 + Line 1 116 11 + 14(main): 4 Function None 5 + 15: Label + 462(fragPos): 72(ptr) Variable Function + 484(normal): 72(ptr) Variable Function + 497(albedo): 22(ptr) Variable Function + 534(param): 72(ptr) Variable Function + 535(param): 72(ptr) Variable Function + 613(fragcolor): 72(ptr) Variable Function + 622(N): 72(ptr) Variable Function + 630(i): 245(ptr) Variable Function + 647(L): 72(ptr) Variable Function + 660(dist): 23(ptr) Variable Function + 671(V): 72(ptr) Variable Function +686(lightCosInnerAngle): 23(ptr) Variable Function +693(lightCosOuterAngle): 23(ptr) Variable Function + 700(lightRange): 23(ptr) Variable Function + 707(dir): 72(ptr) Variable Function + 723(cosDir): 23(ptr) Variable Function + 732(spotEffect): 23(ptr) Variable Function +742(heightAttenuation): 23(ptr) Variable Function + 751(NdotL): 23(ptr) Variable Function + 761(diff): 72(ptr) Variable Function + 769(R): 72(ptr) Variable Function + 779(NdotR): 23(ptr) Variable Function + 789(spec): 72(ptr) Variable Function + 841(param): 72(ptr) Variable Function + 843(param): 72(ptr) Variable Function + 93: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 40 + 94: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 37 95 95 12 12 + Store 100(global_var) 104 + 458: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 101(DebugFunctionDefinition) 91 14(main) + 459: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 91 + 460: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 37 461 461 12 12 + 465: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 463 462(fragPos) 47 + 474: 468 Load 471(samplerposition) + 479: 24(fvec2) Load 476(inUV) + 480: 19(fvec4) ImageSampleImplicitLod 474 479 + 481: 70(fvec3) VectorShuffle 480 480 0 1 2 + Store 462(fragPos) 481 + 482: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 37 483 483 12 12 + 487: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 485 484(normal) 47 + 491: 468 Load 488(samplerNormal) + 492: 24(fvec2) Load 476(inUV) + 493: 19(fvec4) ImageSampleImplicitLod 491 492 + 494: 70(fvec3) VectorShuffle 493 493 0 1 2 + Store 484(normal) 494 + 495: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 37 496 496 12 12 + 500: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 498 497(albedo) 47 + 504: 468 Load 501(samplerAlbedo) + 505: 24(fvec2) Load 476(inUV) + 506: 19(fvec4) ImageSampleImplicitLod 504 505 + Store 497(albedo) 506 + 507: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 37 508 508 12 12 + 510: 509(ptr) AccessChain 419(ubo) 381 + 511: 96(int) Load 510 + 512: 138(bool) SGreaterThan 511 104 + SelectionMerge 514 None + BranchConditional 512 513 514 + 513: Label + 515: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 91 + 516: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 37 517 517 12 12 + 518: 509(ptr) AccessChain 419(ubo) 381 + 519: 96(int) Load 518 + SelectionMerge 525 None + Switch 519 525 + case 1: 520 + case 2: 521 + case 3: 522 + case 4: 523 + case 5: 524 + 520: Label + 526: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 91 + 527: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 37 528 528 12 12 + Store 534(param) 533 + 536: 70(fvec3) Load 462(fragPos) + Store 535(param) 536 + 537: 70(fvec3) FunctionCall 77(shadow(vf3;vf3;) 534(param) 535(param) + 539: 538(ptr) AccessChain 530(outFragColor) 12 + 540: 16(float) CompositeExtract 537 0 + Store 539 540 + 541: 538(ptr) AccessChain 530(outFragColor) 41 + 542: 16(float) CompositeExtract 537 1 + Store 541 542 + 543: 538(ptr) AccessChain 530(outFragColor) 25 + 544: 16(float) CompositeExtract 537 2 + Store 543 544 + 545: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 37 546 546 12 12 + Branch 525 + 521: Label + 548: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 91 + 549: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 37 550 550 12 12 + 551: 70(fvec3) Load 462(fragPos) + 552: 538(ptr) AccessChain 530(outFragColor) 12 + 553: 16(float) CompositeExtract 551 0 + Store 552 553 + 554: 538(ptr) AccessChain 530(outFragColor) 41 + 555: 16(float) CompositeExtract 551 1 + Store 554 555 + 556: 538(ptr) AccessChain 530(outFragColor) 25 + 557: 16(float) CompositeExtract 551 2 + Store 556 557 + 558: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 37 559 559 12 12 + Branch 525 + 522: Label + 561: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 91 + 562: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 37 563 563 12 12 + 564: 70(fvec3) Load 484(normal) + 565: 538(ptr) AccessChain 530(outFragColor) 12 + 566: 16(float) CompositeExtract 564 0 + Store 565 566 + 567: 538(ptr) AccessChain 530(outFragColor) 41 + 568: 16(float) CompositeExtract 564 1 + Store 567 568 + 569: 538(ptr) AccessChain 530(outFragColor) 25 + 570: 16(float) CompositeExtract 564 2 + Store 569 570 + 571: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 37 572 572 12 12 + Branch 525 + 523: Label + 574: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 91 + 575: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 37 576 576 12 12 + 577: 19(fvec4) Load 497(albedo) + 578: 70(fvec3) VectorShuffle 577 577 0 1 2 + 579: 538(ptr) AccessChain 530(outFragColor) 12 + 580: 16(float) CompositeExtract 578 0 + Store 579 580 + 581: 538(ptr) AccessChain 530(outFragColor) 41 + 582: 16(float) CompositeExtract 578 1 + Store 581 582 + 583: 538(ptr) AccessChain 530(outFragColor) 25 + 584: 16(float) CompositeExtract 578 2 + Store 583 584 + 585: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 37 586 586 12 12 + Branch 525 + 524: Label + 588: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 91 + 589: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 37 590 590 12 12 + 591: 19(fvec4) Load 497(albedo) + 592: 70(fvec3) VectorShuffle 591 591 3 3 3 + 593: 538(ptr) AccessChain 530(outFragColor) 12 + 594: 16(float) CompositeExtract 592 0 + Store 593 594 + 595: 538(ptr) AccessChain 530(outFragColor) 41 + 596: 16(float) CompositeExtract 592 1 + Store 595 596 + 597: 538(ptr) AccessChain 530(outFragColor) 25 + 598: 16(float) CompositeExtract 592 2 + Store 597 598 + 599: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 37 600 600 12 12 + Branch 525 + 525: Label + 603: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 91 + 604: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 37 605 605 12 12 + 606: 538(ptr) AccessChain 530(outFragColor) 13 + Store 606 112 + 607: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 37 608 608 12 12 Return - 435: Label - 502: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 500 499(fragcolor) 47 - 503: 26(fvec4) Load 418(albedo) - 504: 69(fvec3) VectorShuffle 503 503 0 1 2 - 506: 69(fvec3) VectorTimesScalar 504 505 - Store 499(fragcolor) 506 - 511: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 508 507(N) 47 - 512: 69(fvec3) Load 406(normal) - 513: 69(fvec3) ExtInst 2(GLSL.std.450) 69(Normalize) 512 - Store 507(N) 513 - 517: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 515 514(i) 47 - Store 514(i) 192 - Branch 518 - 518: Label - LoopMerge 520 521 None - Branch 522 - 522: Label - 523: 180(int) Load 514(i) - 525: 114(bool) SLessThan 523 316 - BranchConditional 525 519 520 - 519: Label - 530: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 527 526(L) 47 - 531: 180(int) Load 514(i) - 533: 532(ptr) AccessChain 353(ubo) 242 531 192 - 534: 26(fvec4) Load 533 - 535: 69(fvec3) VectorShuffle 534 534 0 1 2 - 536: 69(fvec3) Load 385(fragPos) - 537: 69(fvec3) FSub 535 536 - Store 526(L) 537 - 541: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 539 538(dist) 47 - 542: 69(fvec3) Load 526(L) - 543: 23(float) ExtInst 2(GLSL.std.450) 66(Length) 542 - Store 538(dist) 543 - 544: 69(fvec3) Load 526(L) - 545: 69(fvec3) ExtInst 2(GLSL.std.450) 69(Normalize) 544 - Store 526(L) 545 - 550: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 547 546(V) 47 - 551: 532(ptr) AccessChain 353(ubo) 192 - 552: 26(fvec4) Load 551 - 553: 69(fvec3) VectorShuffle 552 552 0 1 2 - 554: 69(fvec3) Load 385(fragPos) - 555: 69(fvec3) FSub 553 554 - Store 546(V) 555 - 556: 69(fvec3) Load 546(V) - 557: 69(fvec3) ExtInst 2(GLSL.std.450) 69(Normalize) 556 - Store 546(V) 557 - 562: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 559 558(lightCosInnerAngle) 47 - Store 558(lightCosInnerAngle) 563 - 568: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 565 564(lightCosOuterAngle) 47 - Store 564(lightCosOuterAngle) 569 - 574: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 571 570(lightRange) 47 - Store 570(lightRange) 575 - 580: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 577 576(dir) 47 - 581: 180(int) Load 514(i) - 582: 532(ptr) AccessChain 353(ubo) 242 581 192 - 583: 26(fvec4) Load 582 - 584: 69(fvec3) VectorShuffle 583 583 0 1 2 - 585: 180(int) Load 514(i) - 586: 532(ptr) AccessChain 353(ubo) 242 585 242 - 587: 26(fvec4) Load 586 - 588: 69(fvec3) VectorShuffle 587 587 0 1 2 - 589: 69(fvec3) FSub 584 588 - 590: 69(fvec3) ExtInst 2(GLSL.std.450) 69(Normalize) 589 - Store 576(dir) 590 - 595: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 592 591(cosDir) 47 - 596: 69(fvec3) Load 526(L) - 597: 69(fvec3) Load 576(dir) - 598: 23(float) Dot 596 597 - Store 591(cosDir) 598 - 603: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 600 599(spotEffect) 47 - 604: 23(float) Load 564(lightCosOuterAngle) - 605: 23(float) Load 558(lightCosInnerAngle) - 606: 23(float) Load 591(cosDir) - 607: 23(float) ExtInst 2(GLSL.std.450) 49(SmoothStep) 604 605 606 - Store 599(spotEffect) 607 - 612: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 609 608(heightAttenuation) 47 - 613: 23(float) Load 570(lightRange) - 614: 23(float) Load 538(dist) - 615: 23(float) ExtInst 2(GLSL.std.450) 49(SmoothStep) 613 162 614 - Store 608(heightAttenuation) 615 - 620: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 617 616(NdotL) 47 - 621: 69(fvec3) Load 507(N) - 622: 69(fvec3) Load 526(L) - 623: 23(float) Dot 621 622 - 624: 23(float) ExtInst 2(GLSL.std.450) 40(FMax) 162 623 - Store 616(NdotL) 624 - 629: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 626 625(diff) 47 - 630: 23(float) Load 616(NdotL) - 631: 69(fvec3) CompositeConstruct 630 630 630 - Store 625(diff) 631 - 636: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 633 632(R) 47 - 637: 69(fvec3) Load 526(L) - 638: 69(fvec3) FNegate 637 - 639: 69(fvec3) Load 507(N) - 640: 69(fvec3) ExtInst 2(GLSL.std.450) 71(Reflect) 638 639 - Store 632(R) 640 - 645: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 642 641(NdotR) 47 - 646: 69(fvec3) Load 632(R) - 647: 69(fvec3) Load 546(V) - 648: 23(float) Dot 646 647 - 649: 23(float) ExtInst 2(GLSL.std.450) 40(FMax) 162 648 - Store 641(NdotR) 649 - 654: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 651 650(spec) 47 - 655: 23(float) Load 641(NdotR) - 657: 23(float) ExtInst 2(GLSL.std.450) 26(Pow) 655 656 - 658: 29(ptr) AccessChain 418(albedo) 12 - 659: 23(float) Load 658 - 660: 23(float) FMul 657 659 - 662: 23(float) FMul 660 661 - 663: 69(fvec3) CompositeConstruct 662 662 662 - Store 650(spec) 663 - 664: 69(fvec3) Load 625(diff) - 665: 69(fvec3) Load 650(spec) - 666: 69(fvec3) FAdd 664 665 - 667: 23(float) Load 599(spotEffect) - 668: 69(fvec3) VectorTimesScalar 666 667 - 669: 23(float) Load 608(heightAttenuation) - 670: 69(fvec3) VectorTimesScalar 668 669 - 671: 23(float) CompositeExtract 670 0 - 672: 23(float) CompositeExtract 670 1 - 673: 23(float) CompositeExtract 670 2 - 674: 69(fvec3) CompositeConstruct 671 672 673 - 675: 180(int) Load 514(i) - 677: 532(ptr) AccessChain 353(ubo) 242 675 676 - 678: 26(fvec4) Load 677 - 679: 69(fvec3) VectorShuffle 678 678 0 1 2 - 680: 69(fvec3) FMul 674 679 - 681: 26(fvec4) Load 418(albedo) - 682: 69(fvec3) VectorShuffle 681 681 0 1 2 - 683: 69(fvec3) FMul 680 682 - 684: 69(fvec3) Load 499(fragcolor) - 685: 69(fvec3) FAdd 684 683 - Store 499(fragcolor) 685 - Branch 521 - 521: Label - 686: 180(int) Load 514(i) - 687: 180(int) IAdd 686 242 - Store 514(i) 687 - Branch 518 - 520: Label - 688: 429(ptr) AccessChain 353(ubo) 676 - 689: 180(int) Load 688 - 691: 114(bool) SGreaterThan 689 192 - SelectionMerge 693 None - BranchConditional 691 692 693 - 692: Label - 695: 69(fvec3) Load 499(fragcolor) - Store 694(param) 695 - 697: 69(fvec3) Load 385(fragPos) - Store 696(param) 697 - 698: 69(fvec3) FunctionCall 76(shadow(vf3;vf3;) 694(param) 696(param) - Store 499(fragcolor) 698 - Branch 693 - 693: Label - 699: 69(fvec3) Load 499(fragcolor) - 700: 23(float) CompositeExtract 699 0 - 701: 23(float) CompositeExtract 699 1 - 702: 23(float) CompositeExtract 699 2 - 703: 26(fvec4) CompositeConstruct 700 701 702 93 - Store 445(outFragColor) 703 + 514: Label + 610: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 91 + 611: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 37 612 612 12 12 + 615: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 614 613(fragcolor) 47 + 616: 19(fvec4) Load 497(albedo) + 617: 70(fvec3) VectorShuffle 616 616 0 1 2 + 619: 70(fvec3) VectorTimesScalar 617 618 + Store 613(fragcolor) 619 + 620: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 37 621 621 12 12 + 625: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 623 622(N) 47 + 626: 70(fvec3) Load 484(normal) + 627: 70(fvec3) ExtInst 3(GLSL.std.450) 69(Normalize) 626 + Store 622(N) 627 + 628: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 37 629 629 12 12 + 632: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 631 630(i) 47 + Store 630(i) 104 + Branch 633 + 633: Label + 637: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 91 + 638: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 37 629 629 12 12 + LoopMerge 635 636 None + Branch 639 + 639: Label + 640: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 91 + 641: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 37 629 629 12 12 + 642: 96(int) Load 630(i) + 643: 138(bool) SLessThan 642 381 + BranchConditional 643 634 635 + 634: Label + 644: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 91 + 645: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 37 646 646 12 12 + 650: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 648 647(L) 47 + 651: 96(int) Load 630(i) + 653: 652(ptr) AccessChain 419(ubo) 280 651 104 + 654: 19(fvec4) Load 653 + 655: 70(fvec3) VectorShuffle 654 654 0 1 2 + 656: 70(fvec3) Load 462(fragPos) + 657: 70(fvec3) FSub 655 656 + Store 647(L) 657 + 658: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 37 659 659 12 12 + 662: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 661 660(dist) 47 + 663: 70(fvec3) Load 647(L) + 664: 16(float) ExtInst 3(GLSL.std.450) 66(Length) 663 + Store 660(dist) 664 + 665: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 37 666 666 12 12 + 667: 70(fvec3) Load 647(L) + 668: 70(fvec3) ExtInst 3(GLSL.std.450) 69(Normalize) 667 + Store 647(L) 668 + 669: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 37 670 670 12 12 + 674: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 672 671(V) 47 + 675: 652(ptr) AccessChain 419(ubo) 104 + 676: 19(fvec4) Load 675 + 677: 70(fvec3) VectorShuffle 676 676 0 1 2 + 678: 70(fvec3) Load 462(fragPos) + 679: 70(fvec3) FSub 677 678 + Store 671(V) 679 + 680: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 37 681 681 12 12 + 682: 70(fvec3) Load 671(V) + 683: 70(fvec3) ExtInst 3(GLSL.std.450) 69(Normalize) 682 + Store 671(V) 683 + 684: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 37 685 685 12 12 + 689: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 687 686(lightCosInnerAngle) 47 + Store 686(lightCosInnerAngle) 690 + 691: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 37 692 692 12 12 + 696: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 694 693(lightCosOuterAngle) 47 + Store 693(lightCosOuterAngle) 697 + 698: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 37 699 699 12 12 + 703: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 701 700(lightRange) 47 + Store 700(lightRange) 704 + 705: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 37 706 706 12 12 + 710: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 708 707(dir) 47 + 711: 96(int) Load 630(i) + 712: 652(ptr) AccessChain 419(ubo) 280 711 104 + 713: 19(fvec4) Load 712 + 714: 70(fvec3) VectorShuffle 713 713 0 1 2 + 715: 96(int) Load 630(i) + 716: 652(ptr) AccessChain 419(ubo) 280 715 280 + 717: 19(fvec4) Load 716 + 718: 70(fvec3) VectorShuffle 717 717 0 1 2 + 719: 70(fvec3) FSub 714 718 + 720: 70(fvec3) ExtInst 3(GLSL.std.450) 69(Normalize) 719 + Store 707(dir) 720 + 721: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 37 722 722 12 12 + 726: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 724 723(cosDir) 47 + 727: 70(fvec3) Load 647(L) + 728: 70(fvec3) Load 707(dir) + 729: 16(float) Dot 727 728 + Store 723(cosDir) 729 + 730: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 37 731 731 12 12 + 735: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 733 732(spotEffect) 47 + 736: 16(float) Load 693(lightCosOuterAngle) + 737: 16(float) Load 686(lightCosInnerAngle) + 738: 16(float) Load 723(cosDir) + 739: 16(float) ExtInst 3(GLSL.std.450) 49(SmoothStep) 736 737 738 + Store 732(spotEffect) 739 + 740: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 37 741 741 12 12 + 745: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 743 742(heightAttenuation) 47 + 746: 16(float) Load 700(lightRange) + 747: 16(float) Load 660(dist) + 748: 16(float) ExtInst 3(GLSL.std.450) 49(SmoothStep) 746 190 747 + Store 742(heightAttenuation) 748 + 749: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 37 750 750 12 12 + 754: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 752 751(NdotL) 47 + 755: 70(fvec3) Load 622(N) + 756: 70(fvec3) Load 647(L) + 757: 16(float) Dot 755 756 + 758: 16(float) ExtInst 3(GLSL.std.450) 40(FMax) 190 757 + Store 751(NdotL) 758 + 759: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 37 760 760 12 12 + 764: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 762 761(diff) 47 + 765: 16(float) Load 751(NdotL) + 766: 70(fvec3) CompositeConstruct 765 765 765 + Store 761(diff) 766 + 767: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 37 768 768 12 12 + 772: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 770 769(R) 47 + 773: 70(fvec3) Load 647(L) + 774: 70(fvec3) FNegate 773 + 775: 70(fvec3) Load 622(N) + 776: 70(fvec3) ExtInst 3(GLSL.std.450) 71(Reflect) 774 775 + Store 769(R) 776 + 777: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 37 778 778 12 12 + 782: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 780 779(NdotR) 47 + 783: 70(fvec3) Load 769(R) + 784: 70(fvec3) Load 671(V) + 785: 16(float) Dot 783 784 + 786: 16(float) ExtInst 3(GLSL.std.450) 40(FMax) 190 785 + Store 779(NdotR) 786 + 787: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 37 788 788 12 12 + 792: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 790 789(spec) 47 + 793: 16(float) Load 779(NdotR) + 795: 16(float) ExtInst 3(GLSL.std.450) 26(Pow) 793 794 + 796: 23(ptr) AccessChain 497(albedo) 13 + 797: 16(float) Load 796 + 798: 16(float) FMul 795 797 + 800: 16(float) FMul 798 799 + 801: 70(fvec3) CompositeConstruct 800 800 800 + Store 789(spec) 801 + 802: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 37 803 803 12 12 + 804: 70(fvec3) Load 761(diff) + 805: 70(fvec3) Load 789(spec) + 806: 70(fvec3) FAdd 804 805 + 807: 16(float) Load 732(spotEffect) + 808: 70(fvec3) VectorTimesScalar 806 807 + 809: 16(float) Load 742(heightAttenuation) + 810: 70(fvec3) VectorTimesScalar 808 809 + 811: 16(float) CompositeExtract 810 0 + 812: 16(float) CompositeExtract 810 1 + 813: 16(float) CompositeExtract 810 2 + 814: 70(fvec3) CompositeConstruct 811 812 813 + 815: 96(int) Load 630(i) + 817: 652(ptr) AccessChain 419(ubo) 280 815 816 + 818: 19(fvec4) Load 817 + 819: 70(fvec3) VectorShuffle 818 818 0 1 2 + 820: 70(fvec3) FMul 814 819 + 821: 19(fvec4) Load 497(albedo) + 822: 70(fvec3) VectorShuffle 821 821 0 1 2 + 823: 70(fvec3) FMul 820 822 + 824: 70(fvec3) Load 613(fragcolor) + 825: 70(fvec3) FAdd 824 823 + Store 613(fragcolor) 825 + Branch 636 + 636: Label + 826: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 91 + 827: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 37 629 629 12 12 + 828: 96(int) Load 630(i) + 829: 96(int) IAdd 828 280 + Store 630(i) 829 + Branch 633 + 635: Label + 830: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 91 + 831: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 37 832 832 12 12 + 833: 509(ptr) AccessChain 419(ubo) 816 + 834: 96(int) Load 833 + 835: 138(bool) SGreaterThan 834 104 + SelectionMerge 837 None + BranchConditional 835 836 837 + 836: Label + 838: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 91 + 839: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 37 840 840 12 12 + 842: 70(fvec3) Load 613(fragcolor) + Store 841(param) 842 + 844: 70(fvec3) Load 462(fragPos) + Store 843(param) 844 + 845: 70(fvec3) FunctionCall 77(shadow(vf3;vf3;) 841(param) 843(param) + Store 613(fragcolor) 845 + Branch 837 + 837: Label + 846: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 91 + 847: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 37 848 848 12 12 + 849: 70(fvec3) Load 613(fragcolor) + 850: 16(float) CompositeExtract 849 0 + 851: 16(float) CompositeExtract 849 1 + 852: 16(float) CompositeExtract 849 2 + 853: 19(fvec4) CompositeConstruct 850 851 852 112 + Store 530(outFragColor) 853 Return FunctionEnd -38(textureProj(vf4;f1;vf2;): 23(float) Function None 33 - 35(P): 28(ptr) FunctionParameter - 36(layer): 29(ptr) FunctionParameter - 37(offset): 32(ptr) FunctionParameter - 41: Label - 89(shadow): 29(ptr) Variable Function - 94(shadowCoord): 28(ptr) Variable Function - 130(dist): 29(ptr) Variable Function - 42: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(Acosh) 40 - 43: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103 16 11 11 11 11 - 46: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 44 35(P) 47 - 50: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 48 36(layer) 47 - 53: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 51 37(offset) 47 - 88: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 101 40 38(textureProj(vf4;f1;vf2;) - 92: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 90 89(shadow) 47 - Store 89(shadow) 93 - 98: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 95 94(shadowCoord) 47 - 99: 26(fvec4) Load 35(P) - 100: 29(ptr) AccessChain 35(P) 12 - 101: 23(float) Load 100 - 102: 26(fvec4) CompositeConstruct 101 101 101 101 - 103: 26(fvec4) FDiv 99 102 - Store 94(shadowCoord) 103 - 104: 26(fvec4) Load 94(shadowCoord) - 105: 30(fvec2) VectorShuffle 104 104 0 1 - 107: 30(fvec2) VectorTimesScalar 105 106 - 108: 30(fvec2) CompositeConstruct 106 106 - 109: 30(fvec2) FAdd 107 108 - 110: 29(ptr) AccessChain 94(shadowCoord) 11 - 111: 23(float) CompositeExtract 109 0 - Store 110 111 - 112: 29(ptr) AccessChain 94(shadowCoord) 19 - 113: 23(float) CompositeExtract 109 1 - Store 112 113 - 115: 29(ptr) AccessChain 94(shadowCoord) 21 - 116: 23(float) Load 115 - 120: 114(bool) FOrdGreaterThan 116 117 - SelectionMerge 122 None - BranchConditional 120 121 122 - 121: Label - 123: 29(ptr) AccessChain 94(shadowCoord) 21 - 124: 23(float) Load 123 - 126: 114(bool) FOrdLessThan 124 93 - Branch 122 - 122: Label - 127: 114(bool) Phi 120 41 126 121 - SelectionMerge 129 None - BranchConditional 127 128 129 - 128: Label - 134: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 131 130(dist) 47 - 149: 140 Load 145(samplerShadowMap) - 150: 26(fvec4) Load 94(shadowCoord) - 151: 30(fvec2) VectorShuffle 150 150 0 1 - 152: 30(fvec2) Load 37(offset) - 153: 30(fvec2) FAdd 151 152 - 154: 23(float) Load 36(layer) - 155: 23(float) CompositeExtract 153 0 - 156: 23(float) CompositeExtract 153 1 - 157: 69(fvec3) CompositeConstruct 155 156 154 - 158: 26(fvec4) ImageSampleImplicitLod 149 157 - 159: 23(float) CompositeExtract 158 0 - Store 130(dist) 159 - 160: 29(ptr) AccessChain 94(shadowCoord) 12 - 161: 23(float) Load 160 - 164: 114(bool) FOrdGreaterThan 161 162 - SelectionMerge 166 None - BranchConditional 164 165 166 - 165: Label - 167: 23(float) Load 130(dist) - 168: 29(ptr) AccessChain 94(shadowCoord) 21 - 169: 23(float) Load 168 - 171: 114(bool) FOrdLessThan 167 169 - Branch 166 - 166: Label - 172: 114(bool) Phi 164 128 171 165 - SelectionMerge 174 None - BranchConditional 172 173 174 - 173: Label - Store 89(shadow) 175 - Branch 174 - 174: Label - Branch 129 - 129: Label - 176: 23(float) Load 89(shadow) - ReturnValue 176 + Line 1 59 51 +33(textureProj(vf4;f1;vf2;): 16(float) Function None 28 + 30(P): 22(ptr) FunctionParameter + 31(layer): 23(ptr) FunctionParameter + 32(offset): 27(ptr) FunctionParameter + 34: Label + 109(shadow): 23(ptr) Variable Function +115(shadowCoord): 22(ptr) Variable Function + 158(dist): 23(ptr) Variable Function + 42: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 36 + 43: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 37 39 39 12 12 + 46: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 44 30(P) 47 + 50: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 48 31(layer) 47 + 53: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 51 32(offset) 47 + 105: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 101(DebugFunctionDefinition) 36 33(textureProj(vf4;f1;vf2;) + 106: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 36 + 107: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 37 108 108 12 12 + 111: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 110 109(shadow) 47 + Store 109(shadow) 112 + 113: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 37 114 114 12 12 + 118: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 116 115(shadowCoord) 47 + 119: 19(fvec4) Load 30(P) + 120: 23(ptr) AccessChain 30(P) 13 + 121: 16(float) Load 120 + 122: 19(fvec4) CompositeConstruct 121 121 121 121 + 123: 19(fvec4) FDiv 119 122 + Store 115(shadowCoord) 123 + 124: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 37 125 125 12 12 + 126: 19(fvec4) Load 115(shadowCoord) + 127: 24(fvec2) VectorShuffle 126 126 0 1 + 129: 24(fvec2) VectorTimesScalar 127 128 + 130: 24(fvec2) CompositeConstruct 128 128 + 131: 24(fvec2) FAdd 129 130 + 132: 23(ptr) AccessChain 115(shadowCoord) 12 + 133: 16(float) CompositeExtract 131 0 + Store 132 133 + 134: 23(ptr) AccessChain 115(shadowCoord) 41 + 135: 16(float) CompositeExtract 131 1 + Store 134 135 + 136: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 37 137 137 12 12 + 141: 23(ptr) AccessChain 115(shadowCoord) 25 + 142: 16(float) Load 141 + 144: 138(bool) FOrdGreaterThan 142 143 + SelectionMerge 146 None + BranchConditional 144 145 146 + 145: Label + 147: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 36 + 148: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 37 137 137 12 12 + 149: 23(ptr) AccessChain 115(shadowCoord) 25 + 150: 16(float) Load 149 + 151: 138(bool) FOrdLessThan 150 112 + Branch 146 + 146: Label + 152: 138(bool) Phi 144 34 151 145 + SelectionMerge 154 None + BranchConditional 152 153 154 + 153: Label + 155: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 36 + 156: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 37 157 157 12 12 + 161: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 159 158(dist) 47 + 175: 167 Load 172(samplerShadowMap) + 176: 19(fvec4) Load 115(shadowCoord) + 177: 24(fvec2) VectorShuffle 176 176 0 1 + 178: 24(fvec2) Load 32(offset) + 179: 24(fvec2) FAdd 177 178 + 180: 16(float) Load 31(layer) + 181: 16(float) CompositeExtract 179 0 + 182: 16(float) CompositeExtract 179 1 + 183: 70(fvec3) CompositeConstruct 181 182 180 + 184: 19(fvec4) ImageSampleImplicitLod 175 183 + 185: 16(float) CompositeExtract 184 0 + Store 158(dist) 185 + 186: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 37 187 187 12 12 + 188: 23(ptr) AccessChain 115(shadowCoord) 13 + 189: 16(float) Load 188 + 191: 138(bool) FOrdGreaterThan 189 190 + SelectionMerge 193 None + BranchConditional 191 192 193 + 192: Label + 194: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 36 + 195: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 37 187 187 12 12 + 196: 16(float) Load 158(dist) + 197: 23(ptr) AccessChain 115(shadowCoord) 25 + 198: 16(float) Load 197 + 199: 138(bool) FOrdLessThan 196 198 + Branch 193 + 193: Label + 200: 138(bool) Phi 191 153 199 192 + SelectionMerge 202 None + BranchConditional 200 201 202 + 201: Label + 203: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 36 + 204: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 37 205 205 12 12 + Store 109(shadow) 206 + Branch 202 + 202: Label + Branch 154 + 154: Label + 207: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 36 + 208: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 37 209 209 12 12 + 210: 16(float) Load 109(shadow) + ReturnValue 210 FunctionEnd -58(filterPCF(vf4;f1;): 23(float) Function None 54 - 56(sc): 28(ptr) FunctionParameter - 57(layer): 29(ptr) FunctionParameter - 61: Label - 186(texDim): 185(ptr) Variable Function - 198(scale): 29(ptr) Variable Function - 204(dx): 29(ptr) Variable Function - 216(dy): 29(ptr) Variable Function -227(shadowFactor): 29(ptr) Variable Function - 232(count): 211(ptr) Variable Function - 237(range): 211(ptr) Variable Function - 243(x): 211(ptr) Variable Function - 259(y): 211(ptr) Variable Function - 284(param): 28(ptr) Variable Function - 286(param): 29(ptr) Variable Function - 288(param): 32(ptr) Variable Function - 62: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(Acosh) 60 - 63: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103 16 11 11 11 11 - 66: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 64 56(sc) 47 - 68: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 67 57(layer) 47 - 179: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 101 60 58(filterPCF(vf4;f1;) - 190: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 187 186(texDim) 47 - 191: 140 Load 145(samplerShadowMap) - 193: 135 Image 191 - 196: 194(ivec3) ImageQuerySizeLod 193 192 - 197: 183(ivec2) VectorShuffle 196 196 0 1 - Store 186(texDim) 197 - 202: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 199 198(scale) 47 - Store 198(scale) 203 - 208: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 205 204(dx) 47 - 209: 23(float) Load 198(scale) - 210: 23(float) FMul 209 93 - 212: 211(ptr) AccessChain 186(texDim) 11 - 213: 180(int) Load 212 - 214: 23(float) ConvertSToF 213 - 215: 23(float) FDiv 210 214 - Store 204(dx) 215 - 220: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 217 216(dy) 47 - 221: 23(float) Load 198(scale) - 222: 23(float) FMul 221 93 - 223: 211(ptr) AccessChain 186(texDim) 19 - 224: 180(int) Load 223 - 225: 23(float) ConvertSToF 224 - 226: 23(float) FDiv 222 225 - Store 216(dy) 226 - 231: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 228 227(shadowFactor) 47 - Store 227(shadowFactor) 162 - 236: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 233 232(count) 47 - Store 232(count) 192 - 241: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 238 237(range) 47 - Store 237(range) 242 - 247: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 244 243(x) 47 - 248: 180(int) Load 237(range) - 249: 180(int) SNegate 248 - Store 243(x) 249 - Branch 250 - 250: Label - LoopMerge 252 253 None - Branch 254 - 254: Label - 255: 180(int) Load 243(x) - 256: 180(int) Load 237(range) - 258: 114(bool) SLessThanEqual 255 256 - BranchConditional 258 251 252 - 251: Label - 263: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 260 259(y) 47 - 264: 180(int) Load 237(range) - 265: 180(int) SNegate 264 - Store 259(y) 265 - Branch 266 - 266: Label - LoopMerge 268 269 None - Branch 270 - 270: Label - 271: 180(int) Load 259(y) - 272: 180(int) Load 237(range) - 274: 114(bool) SLessThanEqual 271 272 - BranchConditional 274 267 268 - 267: Label - 275: 23(float) Load 204(dx) - 276: 180(int) Load 243(x) - 277: 23(float) ConvertSToF 276 - 278: 23(float) FMul 275 277 - 279: 23(float) Load 216(dy) - 280: 180(int) Load 259(y) - 281: 23(float) ConvertSToF 280 - 282: 23(float) FMul 279 281 - 283: 30(fvec2) CompositeConstruct 278 282 - 285: 26(fvec4) Load 56(sc) - Store 284(param) 285 - 287: 23(float) Load 57(layer) - Store 286(param) 287 - Store 288(param) 283 - 289: 23(float) FunctionCall 38(textureProj(vf4;f1;vf2;) 284(param) 286(param) 288(param) - 290: 23(float) Load 227(shadowFactor) - 291: 23(float) FAdd 290 289 - Store 227(shadowFactor) 291 - 292: 180(int) Load 232(count) - 293: 180(int) IAdd 292 242 - Store 232(count) 293 - Branch 269 - 269: Label - 294: 180(int) Load 259(y) - 295: 180(int) IAdd 294 242 - Store 259(y) 295 - Branch 266 - 268: Label - Branch 253 - 253: Label - 296: 180(int) Load 243(x) - 297: 180(int) IAdd 296 242 - Store 243(x) 297 - Branch 250 - 252: Label - 298: 23(float) Load 227(shadowFactor) - 299: 180(int) Load 232(count) - 300: 23(float) ConvertSToF 299 - 301: 23(float) FDiv 298 300 - ReturnValue 301 - FunctionEnd -76(shadow(vf3;vf3;): 69(fvec3) Function None 72 - 74(fragcolor): 71(ptr) FunctionParameter - 75(fragpos): 71(ptr) FunctionParameter - 79: Label - 305(i): 211(ptr) Variable Function - 319(shadowClip): 28(ptr) Variable Function -366(shadowFactor): 29(ptr) Variable Function - 372(param): 28(ptr) Variable Function - 374(param): 29(ptr) Variable Function - 80: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(Acosh) 78 - 81: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103 16 11 11 11 11 - 84: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 82 74(fragcolor) 47 - 87: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 85 75(fragpos) 47 - 304: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 101 78 76(shadow(vf3;vf3;) - 309: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 306 305(i) 47 - Store 305(i) 192 - Branch 310 - 310: Label - LoopMerge 312 313 None - Branch 314 - 314: Label - 315: 180(int) Load 305(i) - 318: 114(bool) SLessThan 315 316 - BranchConditional 318 311 312 - 311: Label - 323: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 320 319(shadowClip) 47 - 356: 180(int) Load 305(i) - 358: 357(ptr) AccessChain 353(ubo) 242 356 316 - 359: 324 Load 358 - 360: 69(fvec3) Load 75(fragpos) - 361: 23(float) CompositeExtract 360 0 - 362: 23(float) CompositeExtract 360 1 - 363: 23(float) CompositeExtract 360 2 - 364: 26(fvec4) CompositeConstruct 361 362 363 93 - 365: 26(fvec4) MatrixTimesVector 359 364 - Store 319(shadowClip) 365 - 369: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 367 366(shadowFactor) 47 - 370: 180(int) Load 305(i) - 371: 23(float) ConvertSToF 370 - 373: 26(fvec4) Load 319(shadowClip) - Store 372(param) 373 - Store 374(param) 371 - 375: 23(float) FunctionCall 58(filterPCF(vf4;f1;) 372(param) 374(param) - Store 366(shadowFactor) 375 - 376: 23(float) Load 366(shadowFactor) - 377: 69(fvec3) Load 74(fragcolor) - 378: 69(fvec3) VectorTimesScalar 377 376 - Store 74(fragcolor) 378 - Branch 313 - 313: Label - 379: 180(int) Load 305(i) - 380: 180(int) IAdd 379 242 - Store 305(i) 380 + Line 1 76 37 +58(filterPCF(vf4;f1;): 16(float) Function None 54 + 56(sc): 22(ptr) FunctionParameter + 57(layer): 23(ptr) FunctionParameter + 59: Label + 220(texDim): 219(ptr) Variable Function + 232(scale): 23(ptr) Variable Function + 239(dx): 23(ptr) Variable Function + 252(dy): 23(ptr) Variable Function +264(shadowFactor): 23(ptr) Variable Function + 270(count): 245(ptr) Variable Function + 276(range): 245(ptr) Variable Function + 283(x): 245(ptr) Variable Function + 304(y): 245(ptr) Variable Function + 334(param): 22(ptr) Variable Function + 336(param): 23(ptr) Variable Function + 338(param): 27(ptr) Variable Function + 63: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 61 + 64: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 37 62 62 12 12 + 67: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 65 56(sc) 47 + 69: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 68 57(layer) 47 + 213: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 101(DebugFunctionDefinition) 61 58(filterPCF(vf4;f1;) + 214: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 61 + 215: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 37 216 216 12 12 + 223: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 221 220(texDim) 47 + 224: 167 Load 172(samplerShadowMap) + 225: 162 Image 224 + 228: 226(ivec3) ImageQuerySizeLod 225 104 + 229: 217(ivec2) VectorShuffle 228 228 0 1 + Store 220(texDim) 229 + 230: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 37 231 231 12 12 + 235: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 233 232(scale) 47 + Store 232(scale) 236 + 237: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 37 238 238 12 12 + 242: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 240 239(dx) 47 + 243: 16(float) Load 232(scale) + 244: 16(float) FMul 243 112 + 246: 245(ptr) AccessChain 220(texDim) 12 + 247: 96(int) Load 246 + 248: 16(float) ConvertSToF 247 + 249: 16(float) FDiv 244 248 + Store 239(dx) 249 + 250: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 37 251 251 12 12 + 255: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 253 252(dy) 47 + 256: 16(float) Load 232(scale) + 257: 16(float) FMul 256 112 + 258: 245(ptr) AccessChain 220(texDim) 41 + 259: 96(int) Load 258 + 260: 16(float) ConvertSToF 259 + 261: 16(float) FDiv 257 260 + Store 252(dy) 261 + 262: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 37 263 263 12 12 + 267: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 265 264(shadowFactor) 47 + Store 264(shadowFactor) 190 + 268: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 37 269 269 12 12 + 273: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 271 270(count) 47 + Store 270(count) 104 + 274: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 37 275 275 12 12 + 279: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 277 276(range) 47 + Store 276(range) 280 + 281: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 37 282 282 12 12 + 286: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 284 283(x) 47 + 287: 96(int) Load 276(range) + 288: 96(int) SNegate 287 + Store 283(x) 288 + Branch 289 + 289: Label + 293: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 61 + 294: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 37 282 282 12 12 + LoopMerge 291 292 None + Branch 295 + 295: Label + 296: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 61 + 297: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 37 282 282 12 12 + 298: 96(int) Load 283(x) + 299: 96(int) Load 276(range) + 300: 138(bool) SLessThanEqual 298 299 + BranchConditional 300 290 291 + 290: Label + 301: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 61 + 302: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 37 303 303 12 12 + 307: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 305 304(y) 47 + 308: 96(int) Load 276(range) + 309: 96(int) SNegate 308 + Store 304(y) 309 Branch 310 - 312: Label - 381: 69(fvec3) Load 74(fragcolor) - ReturnValue 381 + 310: Label + 314: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 61 + 315: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 37 303 303 12 12 + LoopMerge 312 313 None + Branch 316 + 316: Label + 317: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 61 + 318: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 37 303 303 12 12 + 319: 96(int) Load 304(y) + 320: 96(int) Load 276(range) + 321: 138(bool) SLessThanEqual 319 320 + BranchConditional 321 311 312 + 311: Label + 322: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 61 + 323: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 37 324 324 12 12 + 325: 16(float) Load 239(dx) + 326: 96(int) Load 283(x) + 327: 16(float) ConvertSToF 326 + 328: 16(float) FMul 325 327 + 329: 16(float) Load 252(dy) + 330: 96(int) Load 304(y) + 331: 16(float) ConvertSToF 330 + 332: 16(float) FMul 329 331 + 333: 24(fvec2) CompositeConstruct 328 332 + 335: 19(fvec4) Load 56(sc) + Store 334(param) 335 + 337: 16(float) Load 57(layer) + Store 336(param) 337 + Store 338(param) 333 + 339: 16(float) FunctionCall 33(textureProj(vf4;f1;vf2;) 334(param) 336(param) 338(param) + 340: 16(float) Load 264(shadowFactor) + 341: 16(float) FAdd 340 339 + Store 264(shadowFactor) 341 + 342: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 37 343 343 12 12 + 344: 96(int) Load 270(count) + 345: 96(int) IAdd 344 280 + Store 270(count) 345 + Branch 313 + 313: Label + 346: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 61 + 347: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 37 303 303 12 12 + 348: 96(int) Load 304(y) + 349: 96(int) IAdd 348 280 + Store 304(y) 349 + Branch 310 + 312: Label + Branch 292 + 292: Label + 350: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 61 + 351: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 37 282 282 12 12 + 352: 96(int) Load 283(x) + 353: 96(int) IAdd 352 280 + Store 283(x) 353 + Branch 289 + 291: Label + 354: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 61 + 355: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 37 356 356 12 12 + 357: 16(float) Load 264(shadowFactor) + 358: 96(int) Load 270(count) + 359: 16(float) ConvertSToF 358 + 360: 16(float) FDiv 357 359 + ReturnValue 360 + FunctionEnd + Line 1 99 41 +77(shadow(vf3;vf3;): 70(fvec3) Function None 73 + 75(fragcolor): 72(ptr) FunctionParameter + 76(fragpos): 72(ptr) FunctionParameter + 78: Label + 367(i): 245(ptr) Variable Function + 386(shadowClip): 22(ptr) Variable Function +434(shadowFactor): 23(ptr) Variable Function + 439(param): 22(ptr) Variable Function + 441(param): 23(ptr) Variable Function + 82: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 80 + 83: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 37 81 81 12 12 + 86: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 84 75(fragcolor) 47 + 89: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 87 76(fragpos) 47 + 363: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 101(DebugFunctionDefinition) 80 77(shadow(vf3;vf3;) + 364: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 80 + 365: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 37 366 366 12 12 + 370: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 368 367(i) 47 + Store 367(i) 104 + Branch 371 + 371: Label + 375: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 80 + 376: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 37 366 366 12 12 + LoopMerge 373 374 None + Branch 377 + 377: Label + 378: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 80 + 379: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 37 366 366 12 12 + 380: 96(int) Load 367(i) + 382: 138(bool) SLessThan 380 381 + BranchConditional 382 372 373 + 372: Label + 383: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 80 + 384: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 37 385 385 12 12 + 389: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 387 386(shadowClip) 47 + 422: 96(int) Load 367(i) + 424: 423(ptr) AccessChain 419(ubo) 280 422 381 + 425: 390 Load 424 + 426: 70(fvec3) Load 76(fragpos) + 427: 16(float) CompositeExtract 426 0 + 428: 16(float) CompositeExtract 426 1 + 429: 16(float) CompositeExtract 426 2 + 430: 19(fvec4) CompositeConstruct 427 428 429 112 + 431: 19(fvec4) MatrixTimesVector 425 430 + Store 386(shadowClip) 431 + 432: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 37 433 433 12 12 + 436: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 435 434(shadowFactor) 47 + 437: 96(int) Load 367(i) + 438: 16(float) ConvertSToF 437 + 440: 19(fvec4) Load 386(shadowClip) + Store 439(param) 440 + Store 441(param) 438 + 442: 16(float) FunctionCall 58(filterPCF(vf4;f1;) 439(param) 441(param) + Store 434(shadowFactor) 442 + 443: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 37 444 444 12 12 + 445: 16(float) Load 434(shadowFactor) + 446: 70(fvec3) Load 75(fragcolor) + 447: 70(fvec3) VectorTimesScalar 446 445 + Store 75(fragcolor) 447 + Branch 374 + 374: Label + 448: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 80 + 449: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 37 366 366 12 12 + 450: 96(int) Load 367(i) + 451: 96(int) IAdd 450 280 + Store 367(i) 451 + Branch 371 + 373: Label + 452: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 80 + 453: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 37 454 454 12 12 + 455: 70(fvec3) Load 75(fragcolor) + ReturnValue 455 FunctionEnd diff --git a/Test/baseResults/spv.debuginfo.glsl.geom.out b/Test/baseResults/spv.debuginfo.glsl.geom.out index 07f8f520..51a67155 100755 --- a/Test/baseResults/spv.debuginfo.glsl.geom.out +++ b/Test/baseResults/spv.debuginfo.glsl.geom.out @@ -1,332 +1,365 @@ spv.debuginfo.glsl.geom -Validation failed // Module Version 10000 // Generated by (magic number): 8000b -// Id's are bound by 231 +// Id's are bound by 257 Capability Geometry Capability MultiViewport Extension "SPV_KHR_non_semantic_info" - 1: ExtInstImport "NonSemantic.Shader.DebugInfo.100" - 2: ExtInstImport "GLSL.std.450" + 2: ExtInstImport "NonSemantic.Shader.DebugInfo.100" + 3: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Geometry 13 "main" 52 85 104 112 116 146 181 189 206 216 221 225 - ExecutionMode 13 Triangles - ExecutionMode 13 Invocations 2 - ExecutionMode 13 OutputTriangleStrip - ExecutionMode 13 OutputVertices 3 + EntryPoint Geometry 14 "main" 63 95 114 124 127 158 197 206 223 235 241 244 + ExecutionMode 14 Triangles + ExecutionMode 14 Invocations 2 + ExecutionMode 14 OutputTriangleStrip + ExecutionMode 14 OutputVertices 3 + 1: String "" 8: String "uint" - 14: String "main" - 17: String "" - 25: String "int" - 30: String "i" - 43: String "bool" - 47: String "float" - 54: String "outNormal" - 68: String "projection" - 72: String "modelview" - 75: String "lightPos" - 78: String "UBO" - 82: String "ubo" - 87: String "gl_InvocationID" - 106: String "inNormal" - 114: String "outColor" - 118: String "inColor" - 125: String "pos" - 132: String "gl_Position" - 135: String "gl_PointSize" - 138: String "gl_CullDistance" - 142: String "gl_PerVertex" - 148: String "gl_in" - 155: String "worldPos" - 166: String "lPos" - 183: String "outLightVec" - 191: String "outViewVec" - 218: String "gl_ViewportIndex" - 223: String "gl_PrimitiveID" - 227: String "gl_PrimitiveIDIn" + 16: String "main" + 19: String "// OpModuleProcessed auto-map-locations +// OpModuleProcessed auto-map-bindings +// OpModuleProcessed client vulkan100 +// OpModuleProcessed target-env vulkan1.0 +// OpModuleProcessed keep-uncalled +// OpModuleProcessed entry-point main +#line 1 +" + 30: String "int" + 35: String "i" + 51: String "bool" + 58: String "float" + 65: String "outNormal" + 78: String "projection" + 82: String "modelview" + 85: String "lightPos" + 88: String "UBO" + 92: String "ubo" + 97: String "gl_InvocationID" + 116: String "inNormal" + 126: String "outColor" + 129: String "inColor" + 138: String "pos" + 144: String "gl_Position" + 147: String "gl_PointSize" + 150: String "gl_CullDistance" + 154: String "gl_PerVertex" + 160: String "gl_in" + 169: String "worldPos" + 181: String "lPos" + 199: String "outLightVec" + 208: String "outViewVec" + 237: String "gl_ViewportIndex" + 243: String "gl_PrimitiveID" + 246: String "gl_PrimitiveIDIn" SourceExtension "GL_ARB_viewport_array" - Name 13 "main" - Name 28 "i" - Name 52 "outNormal" - Name 66 "UBO" - MemberName 66(UBO) 0 "projection" - MemberName 66(UBO) 1 "modelview" - MemberName 66(UBO) 2 "lightPos" - Name 80 "ubo" - Name 85 "gl_InvocationID" - Name 104 "inNormal" - Name 112 "outColor" - Name 116 "inColor" - Name 123 "pos" - Name 130 "gl_PerVertex" - MemberName 130(gl_PerVertex) 0 "gl_Position" - MemberName 130(gl_PerVertex) 1 "gl_PointSize" - MemberName 130(gl_PerVertex) 2 "gl_ClipDistance" - MemberName 130(gl_PerVertex) 3 "gl_CullDistance" - Name 146 "gl_in" - Name 153 "worldPos" - Name 164 "lPos" - Name 181 "outLightVec" - Name 189 "outViewVec" - Name 196 "gl_PerVertex" - MemberName 196(gl_PerVertex) 0 "gl_Position" - MemberName 196(gl_PerVertex) 1 "gl_PointSize" - MemberName 196(gl_PerVertex) 2 "gl_ClipDistance" - MemberName 196(gl_PerVertex) 3 "gl_CullDistance" - Name 206 "" - Name 216 "gl_ViewportIndex" - Name 221 "gl_PrimitiveID" - Name 225 "gl_PrimitiveIDIn" - Decorate 52(outNormal) Location 0 - Decorate 62 ArrayStride 64 - Decorate 64 ArrayStride 64 - MemberDecorate 66(UBO) 0 ColMajor - MemberDecorate 66(UBO) 0 Offset 0 - MemberDecorate 66(UBO) 0 MatrixStride 16 - MemberDecorate 66(UBO) 1 ColMajor - MemberDecorate 66(UBO) 1 Offset 128 - MemberDecorate 66(UBO) 1 MatrixStride 16 - MemberDecorate 66(UBO) 2 Offset 256 - Decorate 66(UBO) Block - Decorate 80(ubo) DescriptorSet 0 - Decorate 80(ubo) Binding 0 - Decorate 85(gl_InvocationID) BuiltIn InvocationId - Decorate 104(inNormal) Location 0 - Decorate 112(outColor) Location 1 - Decorate 116(inColor) Location 1 - MemberDecorate 130(gl_PerVertex) 0 BuiltIn Position - MemberDecorate 130(gl_PerVertex) 1 BuiltIn PointSize - MemberDecorate 130(gl_PerVertex) 2 BuiltIn ClipDistance - MemberDecorate 130(gl_PerVertex) 3 BuiltIn CullDistance - Decorate 130(gl_PerVertex) Block - Decorate 181(outLightVec) Location 3 - Decorate 189(outViewVec) Location 2 - MemberDecorate 196(gl_PerVertex) 0 BuiltIn Position - MemberDecorate 196(gl_PerVertex) 1 BuiltIn PointSize - MemberDecorate 196(gl_PerVertex) 2 BuiltIn ClipDistance - MemberDecorate 196(gl_PerVertex) 3 BuiltIn CullDistance - Decorate 196(gl_PerVertex) Block - Decorate 216(gl_ViewportIndex) BuiltIn ViewportIndex - Decorate 221(gl_PrimitiveID) BuiltIn PrimitiveId - Decorate 225(gl_PrimitiveIDIn) BuiltIn PrimitiveId - 3: TypeVoid - 4: TypeFunction 3 - 6: TypeInt 32 0 - 9: 6(int) Constant 32 - 10: 6(int) Constant 6 - 11: 6(int) Constant 0 - 7: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 8 9 10 11 - 12: 6(int) Constant 3 - 5: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 8(Floor) 12 3 - 16: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 35(Modf) 0 17 - 19: 6(int) Constant 1 - 20: 6(int) Constant 4 - 21: 6(int) Constant 2 - 18: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 1(Round) 19 20 16 21 - 15: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 20(Cosh) 14 5 16 11 11 18 14 12 11 - 24: TypeInt 32 1 - 26: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 25 9 20 11 - 27: TypePointer Function 24(int) - 31: 6(int) Constant 49 - 29: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 30 26 16 31 11 15 20 - 33: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 31(Sqrt) - 34: 24(int) Constant 0 - 41: 24(int) Constant 3 - 42: TypeBool - 44: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 43 9 21 11 - 46: TypeFloat 32 - 48: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 47 9 12 11 - 49: TypeVector 46(float) 3 - 50: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 6(FSign) 48 12 - 51: TypePointer Output 49(fvec3) - 52(outNormal): 51(ptr) Variable Output - 55: 6(int) Constant 51 - 56: 6(int) Constant 8 - 53: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(Atan) 54 50 16 55 11 18 54 52(outNormal) 56 - 57: TypeVector 46(float) 4 - 58: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 6(FSign) 48 20 - 59: TypeMatrix 57(fvec4) 4 - 61: 42(bool) ConstantTrue - 60: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 108 58 20 61 - 62: TypeArray 59 21 - 63: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 5(SAbs) 60 21 - 64: TypeArray 59 21 - 65: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 5(SAbs) 60 21 - 66(UBO): TypeStruct 62 64 57(fvec4) - 69: 6(int) Constant 34 - 70: 6(int) Constant 7 - 67: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 68 63 16 69 70 11 11 12 - 73: 6(int) Constant 35 - 71: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 72 65 16 73 70 11 11 12 - 76: 6(int) Constant 36 - 74: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 75 58 16 76 70 11 11 12 - 77: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(Fract) 78 19 16 55 11 18 78 11 12 67 71 74 - 79: TypePointer Uniform 66(UBO) - 80(ubo): 79(ptr) Variable Uniform - 81: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(Atan) 82 77 16 55 11 18 82 80(ubo) 56 - 83: 24(int) Constant 1 - 84: TypePointer Input 24(int) -85(gl_InvocationID): 84(ptr) Variable Input - 86: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(Atan) 87 26 16 55 11 18 87 85(gl_InvocationID) 56 - 89: TypePointer Uniform 59 - 92: TypeMatrix 49(fvec3) 3 - 93: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 108 50 12 61 - 101: TypeArray 49(fvec3) 12 - 102: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 5(SAbs) 50 12 - 103: TypePointer Input 101 - 104(inNormal): 103(ptr) Variable Input - 105: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(Atan) 106 102 16 55 11 18 106 104(inNormal) 56 - 108: TypePointer Input 49(fvec3) - 112(outColor): 51(ptr) Variable Output - 115: 6(int) Constant 52 - 113: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(Atan) 114 50 16 115 11 18 114 112(outColor) 56 - 116(inColor): 103(ptr) Variable Input - 117: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(Atan) 118 102 16 115 11 18 118 116(inColor) 56 - 122: TypePointer Function 57(fvec4) - 126: 6(int) Constant 54 - 124: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 125 58 16 126 11 15 20 - 128: TypeArray 46(float) 19 - 129: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 5(SAbs) 48 19 -130(gl_PerVertex): TypeStruct 57(fvec4) 46(float) 128 128 - 133: 6(int) Constant 23 - 131: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 132 58 16 21 133 11 11 12 - 136: 6(int) Constant 41 - 134: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 135 48 16 21 136 11 11 12 - 139: 6(int) Constant 84 - 137: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 138 129 16 21 139 11 11 12 - 140: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 138 129 16 21 139 11 11 12 - 141: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(Fract) 142 19 16 126 11 18 142 11 12 131 134 137 140 - 143: TypeArray 130(gl_PerVertex) 12 - 144: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 5(SAbs) 141 12 - 145: TypePointer Input 143 - 146(gl_in): 145(ptr) Variable Input - 147: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(Atan) 148 144 16 126 11 18 148 146(gl_in) 56 - 150: TypePointer Input 57(fvec4) - 156: 6(int) Constant 55 - 154: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 155 58 16 156 11 15 20 - 163: TypePointer Function 49(fvec3) - 167: 6(int) Constant 57 - 165: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 166 50 16 167 11 15 20 - 172: 24(int) Constant 2 - 173: TypePointer Uniform 57(fvec4) -181(outLightVec): 51(ptr) Variable Output - 184: 6(int) Constant 58 - 182: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(Atan) 183 50 16 184 11 18 183 181(outLightVec) 56 - 189(outViewVec): 51(ptr) Variable Output - 192: 6(int) Constant 59 - 190: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(Atan) 191 50 16 192 11 18 191 189(outViewVec) 56 -196(gl_PerVertex): TypeStruct 57(fvec4) 46(float) 128 128 - 198: 6(int) Constant 215 - 197: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 132 58 16 21 198 11 11 12 - 200: 6(int) Constant 233 - 199: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 135 48 16 21 200 11 11 12 - 201: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 138 129 16 12 70 11 11 12 - 202: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 138 129 16 12 70 11 11 12 - 204: 6(int) Constant 61 - 203: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(Fract) 142 19 16 204 11 18 142 11 12 197 199 201 202 - 205: TypePointer Output 196(gl_PerVertex) - 206: 205(ptr) Variable Output - 207: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(Atan) 17 203 16 204 11 18 17 206 56 - 213: TypePointer Output 57(fvec4) - 215: TypePointer Output 24(int) -216(gl_ViewportIndex): 215(ptr) Variable Output - 219: 6(int) Constant 64 - 217: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(Atan) 218 26 16 219 11 18 218 216(gl_ViewportIndex) 56 -221(gl_PrimitiveID): 215(ptr) Variable Output - 224: 6(int) Constant 65 - 222: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(Atan) 223 26 16 224 11 18 223 221(gl_PrimitiveID) 56 -225(gl_PrimitiveIDIn): 84(ptr) Variable Input - 226: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(Atan) 227 26 16 224 11 18 227 225(gl_PrimitiveIDIn) 56 - 13(main): 3 Function None 4 - 22: Label - 28(i): 27(ptr) Variable Function - 123(pos): 122(ptr) Variable Function - 153(worldPos): 122(ptr) Variable Function - 164(lPos): 163(ptr) Variable Function - 23: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 101 15 13(main) - 32: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 29 28(i) 33 - Store 28(i) 34 - Branch 35 - 35: Label - LoopMerge 37 38 None + Name 14 "main" + Name 33 "i" + Name 63 "outNormal" + Name 76 "UBO" + MemberName 76(UBO) 0 "projection" + MemberName 76(UBO) 1 "modelview" + MemberName 76(UBO) 2 "lightPos" + Name 90 "ubo" + Name 95 "gl_InvocationID" + Name 114 "inNormal" + Name 124 "outColor" + Name 127 "inColor" + Name 136 "pos" + Name 142 "gl_PerVertex" + MemberName 142(gl_PerVertex) 0 "gl_Position" + MemberName 142(gl_PerVertex) 1 "gl_PointSize" + MemberName 142(gl_PerVertex) 2 "gl_ClipDistance" + MemberName 142(gl_PerVertex) 3 "gl_CullDistance" + Name 158 "gl_in" + Name 167 "worldPos" + Name 179 "lPos" + Name 197 "outLightVec" + Name 206 "outViewVec" + Name 214 "gl_PerVertex" + MemberName 214(gl_PerVertex) 0 "gl_Position" + MemberName 214(gl_PerVertex) 1 "gl_PointSize" + MemberName 214(gl_PerVertex) 2 "gl_ClipDistance" + MemberName 214(gl_PerVertex) 3 "gl_CullDistance" + Name 223 "" + Name 235 "gl_ViewportIndex" + Name 241 "gl_PrimitiveID" + Name 244 "gl_PrimitiveIDIn" + Decorate 63(outNormal) Location 0 + Decorate 72 ArrayStride 64 + Decorate 74 ArrayStride 64 + MemberDecorate 76(UBO) 0 ColMajor + MemberDecorate 76(UBO) 0 Offset 0 + MemberDecorate 76(UBO) 0 MatrixStride 16 + MemberDecorate 76(UBO) 1 ColMajor + MemberDecorate 76(UBO) 1 Offset 128 + MemberDecorate 76(UBO) 1 MatrixStride 16 + MemberDecorate 76(UBO) 2 Offset 256 + Decorate 76(UBO) Block + Decorate 90(ubo) DescriptorSet 0 + Decorate 90(ubo) Binding 0 + Decorate 95(gl_InvocationID) BuiltIn InvocationId + Decorate 114(inNormal) Location 0 + Decorate 124(outColor) Location 1 + Decorate 127(inColor) Location 1 + MemberDecorate 142(gl_PerVertex) 0 BuiltIn Position + MemberDecorate 142(gl_PerVertex) 1 BuiltIn PointSize + MemberDecorate 142(gl_PerVertex) 2 BuiltIn ClipDistance + MemberDecorate 142(gl_PerVertex) 3 BuiltIn CullDistance + Decorate 142(gl_PerVertex) Block + Decorate 197(outLightVec) Location 3 + Decorate 206(outViewVec) Location 2 + MemberDecorate 214(gl_PerVertex) 0 BuiltIn Position + MemberDecorate 214(gl_PerVertex) 1 BuiltIn PointSize + MemberDecorate 214(gl_PerVertex) 2 BuiltIn ClipDistance + MemberDecorate 214(gl_PerVertex) 3 BuiltIn CullDistance + Decorate 214(gl_PerVertex) Block + Decorate 235(gl_ViewportIndex) BuiltIn ViewportIndex + Decorate 241(gl_PrimitiveID) BuiltIn PrimitiveId + Decorate 244(gl_PrimitiveIDIn) BuiltIn PrimitiveId + 4: TypeVoid + 5: TypeFunction 4 + 7: TypeInt 32 0 + 10: 7(int) Constant 32 + 11: 7(int) Constant 6 + 12: 7(int) Constant 0 + 9: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 8 10 11 12 + 13: 7(int) Constant 3 + 6: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 8(DebugTypeFunction) 13 4 + 18: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 35(DebugSource) 1 19 + 20: 7(int) Constant 47 + 22: 7(int) Constant 1 + 23: 7(int) Constant 4 + 24: 7(int) Constant 2 + 21: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 1(DebugCompilationUnit) 22 23 18 24 + 17: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 20(DebugFunction) 16 6 18 20 12 21 16 13 20 + 28: 7(int) Constant 49 + 29: TypeInt 32 1 + 31: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 30 10 23 12 + 32: TypePointer Function 29(int) + 34: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 35 31 18 28 12 17 23 + 37: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 31(DebugExpression) + 38: 29(int) Constant 0 + 49: 29(int) Constant 3 + 50: TypeBool + 52: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 51 10 24 12 + 56: 7(int) Constant 51 + 57: TypeFloat 32 + 59: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 58 10 13 12 + 60: TypeVector 57(float) 3 + 61: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 59 13 + 62: TypePointer Output 60(fvec3) + 63(outNormal): 62(ptr) Variable Output + 66: 7(int) Constant 8 + 64: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 65 61 18 56 12 21 65 63(outNormal) 66 + 67: TypeVector 57(float) 4 + 68: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 59 23 + 69: TypeMatrix 67(fvec4) 4 + 71: 50(bool) ConstantTrue + 70: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 108(DebugTypeMatrix) 68 23 71 + 72: TypeArray 69 24 + 73: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 70 24 + 74: TypeArray 69 24 + 75: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 70 24 + 76(UBO): TypeStruct 72 74 67(fvec4) + 79: 7(int) Constant 34 + 80: 7(int) Constant 7 + 77: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 78 73 18 79 80 12 12 13 + 83: 7(int) Constant 35 + 81: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 82 75 18 83 80 12 12 13 + 86: 7(int) Constant 36 + 84: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 85 68 18 86 80 12 12 13 + 87: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 88 22 18 56 12 21 88 12 13 77 81 84 + 89: TypePointer Uniform 76(UBO) + 90(ubo): 89(ptr) Variable Uniform + 91: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 92 87 18 56 12 21 92 90(ubo) 66 + 93: 29(int) Constant 1 + 94: TypePointer Input 29(int) +95(gl_InvocationID): 94(ptr) Variable Input + 96: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 97 31 18 56 12 21 97 95(gl_InvocationID) 66 + 99: TypePointer Uniform 69 + 102: TypeMatrix 60(fvec3) 3 + 103: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 108(DebugTypeMatrix) 61 13 71 + 111: TypeArray 60(fvec3) 13 + 112: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 61 13 + 113: TypePointer Input 111 + 114(inNormal): 113(ptr) Variable Input + 115: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 116 112 18 56 12 21 116 114(inNormal) 66 + 118: TypePointer Input 60(fvec3) + 123: 7(int) Constant 52 + 124(outColor): 62(ptr) Variable Output + 125: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 126 61 18 123 12 21 126 124(outColor) 66 + 127(inColor): 113(ptr) Variable Input + 128: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 129 112 18 123 12 21 129 127(inColor) 66 + 134: 7(int) Constant 54 + 135: TypePointer Function 67(fvec4) + 137: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 138 68 18 134 12 17 23 + 140: TypeArray 57(float) 22 + 141: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 59 22 +142(gl_PerVertex): TypeStruct 67(fvec4) 57(float) 140 140 + 145: 7(int) Constant 23 + 143: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 144 68 18 24 145 12 12 13 + 148: 7(int) Constant 41 + 146: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 147 59 18 24 148 12 12 13 + 151: 7(int) Constant 84 + 149: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 150 141 18 24 151 12 12 13 + 152: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 150 141 18 24 151 12 12 13 + 153: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 154 22 18 134 12 21 154 12 13 143 146 149 152 + 155: TypeArray 142(gl_PerVertex) 13 + 156: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 153 13 + 157: TypePointer Input 155 + 158(gl_in): 157(ptr) Variable Input + 159: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 160 156 18 134 12 21 160 158(gl_in) 66 + 162: TypePointer Input 67(fvec4) + 166: 7(int) Constant 55 + 168: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 169 68 18 166 12 17 23 + 177: 7(int) Constant 57 + 178: TypePointer Function 60(fvec3) + 180: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 181 61 18 177 12 17 23 + 186: 29(int) Constant 2 + 187: TypePointer Uniform 67(fvec4) + 196: 7(int) Constant 58 +197(outLightVec): 62(ptr) Variable Output + 198: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 199 61 18 196 12 21 199 197(outLightVec) 66 + 205: 7(int) Constant 59 + 206(outViewVec): 62(ptr) Variable Output + 207: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 208 61 18 205 12 21 208 206(outViewVec) 66 + 213: 7(int) Constant 61 +214(gl_PerVertex): TypeStruct 67(fvec4) 57(float) 140 140 + 216: 7(int) Constant 215 + 215: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 144 68 18 24 216 12 12 13 + 218: 7(int) Constant 233 + 217: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 147 59 18 24 218 12 12 13 + 219: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 150 141 18 13 80 12 12 13 + 220: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 150 141 18 13 80 12 12 13 + 221: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 154 22 18 213 12 21 154 12 13 215 217 219 220 + 222: TypePointer Output 214(gl_PerVertex) + 223: 222(ptr) Variable Output + 224: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 1 221 18 213 12 21 1 223 66 + 230: TypePointer Output 67(fvec4) + 233: 7(int) Constant 64 + 234: TypePointer Output 29(int) +235(gl_ViewportIndex): 234(ptr) Variable Output + 236: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 237 31 18 233 12 21 237 235(gl_ViewportIndex) 66 + 240: 7(int) Constant 65 +241(gl_PrimitiveID): 234(ptr) Variable Output + 242: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 243 31 18 240 12 21 243 241(gl_PrimitiveID) 66 +244(gl_PrimitiveIDIn): 94(ptr) Variable Input + 245: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 246 31 18 240 12 21 246 244(gl_PrimitiveIDIn) 66 + 249: 7(int) Constant 66 + 256: 7(int) Constant 68 + Line 1 47 15 + 14(main): 4 Function None 5 + 15: Label + 33(i): 32(ptr) Variable Function + 136(pos): 135(ptr) Variable Function + 167(worldPos): 135(ptr) Variable Function + 179(lPos): 178(ptr) Variable Function + 25: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 101(DebugFunctionDefinition) 17 14(main) + 26: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 17 + 27: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 28 28 12 12 + 36: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 34 33(i) 37 + Store 33(i) 38 Branch 39 39: Label - 40: 24(int) Load 28(i) - 45: 42(bool) SLessThan 40 41 - BranchConditional 45 36 37 - 36: Label - 88: 24(int) Load 85(gl_InvocationID) - 90: 89(ptr) AccessChain 80(ubo) 83 88 - 91: 59 Load 90 - 94: 57(fvec4) CompositeExtract 91 0 - 95: 49(fvec3) VectorShuffle 94 94 0 1 2 - 96: 57(fvec4) CompositeExtract 91 1 - 97: 49(fvec3) VectorShuffle 96 96 0 1 2 - 98: 57(fvec4) CompositeExtract 91 2 - 99: 49(fvec3) VectorShuffle 98 98 0 1 2 - 100: 92 CompositeConstruct 95 97 99 - 107: 24(int) Load 28(i) - 109: 108(ptr) AccessChain 104(inNormal) 107 - 110: 49(fvec3) Load 109 - 111: 49(fvec3) MatrixTimesVector 100 110 - Store 52(outNormal) 111 - 119: 24(int) Load 28(i) - 120: 108(ptr) AccessChain 116(inColor) 119 - 121: 49(fvec3) Load 120 - Store 112(outColor) 121 - 127: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 124 123(pos) 33 - 149: 24(int) Load 28(i) - 151: 150(ptr) AccessChain 146(gl_in) 149 34 - 152: 57(fvec4) Load 151 - Store 123(pos) 152 - 157: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 154 153(worldPos) 33 - 158: 24(int) Load 85(gl_InvocationID) - 159: 89(ptr) AccessChain 80(ubo) 83 158 - 160: 59 Load 159 - 161: 57(fvec4) Load 123(pos) - 162: 57(fvec4) MatrixTimesVector 160 161 - Store 153(worldPos) 162 - 168: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 165 164(lPos) 33 - 169: 24(int) Load 85(gl_InvocationID) - 170: 89(ptr) AccessChain 80(ubo) 83 169 - 171: 59 Load 170 - 174: 173(ptr) AccessChain 80(ubo) 172 - 175: 57(fvec4) Load 174 - 176: 57(fvec4) MatrixTimesVector 171 175 - 177: 46(float) CompositeExtract 176 0 - 178: 46(float) CompositeExtract 176 1 - 179: 46(float) CompositeExtract 176 2 - 180: 49(fvec3) CompositeConstruct 177 178 179 - Store 164(lPos) 180 - 185: 49(fvec3) Load 164(lPos) - 186: 57(fvec4) Load 153(worldPos) - 187: 49(fvec3) VectorShuffle 186 186 0 1 2 - 188: 49(fvec3) FSub 185 187 - Store 181(outLightVec) 188 - 193: 57(fvec4) Load 153(worldPos) - 194: 49(fvec3) VectorShuffle 193 193 0 1 2 - 195: 49(fvec3) FNegate 194 - Store 189(outViewVec) 195 - 208: 24(int) Load 85(gl_InvocationID) - 209: 89(ptr) AccessChain 80(ubo) 34 208 - 210: 59 Load 209 - 211: 57(fvec4) Load 153(worldPos) - 212: 57(fvec4) MatrixTimesVector 210 211 - 214: 213(ptr) AccessChain 206 34 - Store 214 212 - 220: 24(int) Load 85(gl_InvocationID) - Store 216(gl_ViewportIndex) 220 - 228: 24(int) Load 225(gl_PrimitiveIDIn) - Store 221(gl_PrimitiveID) 228 + 43: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 17 + 44: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 28 28 12 12 + LoopMerge 41 42 None + Branch 45 + 45: Label + 46: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 17 + 47: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 28 28 12 12 + 48: 29(int) Load 33(i) + 53: 50(bool) SLessThan 48 49 + BranchConditional 53 40 41 + 40: Label + 54: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 17 + 55: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 56 56 12 12 + 98: 29(int) Load 95(gl_InvocationID) + 100: 99(ptr) AccessChain 90(ubo) 93 98 + 101: 69 Load 100 + 104: 67(fvec4) CompositeExtract 101 0 + 105: 60(fvec3) VectorShuffle 104 104 0 1 2 + 106: 67(fvec4) CompositeExtract 101 1 + 107: 60(fvec3) VectorShuffle 106 106 0 1 2 + 108: 67(fvec4) CompositeExtract 101 2 + 109: 60(fvec3) VectorShuffle 108 108 0 1 2 + 110: 102 CompositeConstruct 105 107 109 + 117: 29(int) Load 33(i) + 119: 118(ptr) AccessChain 114(inNormal) 117 + 120: 60(fvec3) Load 119 + 121: 60(fvec3) MatrixTimesVector 110 120 + Store 63(outNormal) 121 + 122: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 123 123 12 12 + 130: 29(int) Load 33(i) + 131: 118(ptr) AccessChain 127(inColor) 130 + 132: 60(fvec3) Load 131 + Store 124(outColor) 132 + 133: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 134 134 12 12 + 139: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 137 136(pos) 37 + 161: 29(int) Load 33(i) + 163: 162(ptr) AccessChain 158(gl_in) 161 38 + 164: 67(fvec4) Load 163 + Store 136(pos) 164 + 165: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 166 166 12 12 + 170: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 168 167(worldPos) 37 + 171: 29(int) Load 95(gl_InvocationID) + 172: 99(ptr) AccessChain 90(ubo) 93 171 + 173: 69 Load 172 + 174: 67(fvec4) Load 136(pos) + 175: 67(fvec4) MatrixTimesVector 173 174 + Store 167(worldPos) 175 + 176: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 177 177 12 12 + 182: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 180 179(lPos) 37 + 183: 29(int) Load 95(gl_InvocationID) + 184: 99(ptr) AccessChain 90(ubo) 93 183 + 185: 69 Load 184 + 188: 187(ptr) AccessChain 90(ubo) 186 + 189: 67(fvec4) Load 188 + 190: 67(fvec4) MatrixTimesVector 185 189 + 191: 57(float) CompositeExtract 190 0 + 192: 57(float) CompositeExtract 190 1 + 193: 57(float) CompositeExtract 190 2 + 194: 60(fvec3) CompositeConstruct 191 192 193 + Store 179(lPos) 194 + 195: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 196 196 12 12 + 200: 60(fvec3) Load 179(lPos) + 201: 67(fvec4) Load 167(worldPos) + 202: 60(fvec3) VectorShuffle 201 201 0 1 2 + 203: 60(fvec3) FSub 200 202 + Store 197(outLightVec) 203 + 204: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 205 205 12 12 + 209: 67(fvec4) Load 167(worldPos) + 210: 60(fvec3) VectorShuffle 209 209 0 1 2 + 211: 60(fvec3) FNegate 210 + Store 206(outViewVec) 211 + 212: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 213 213 12 12 + 225: 29(int) Load 95(gl_InvocationID) + 226: 99(ptr) AccessChain 90(ubo) 38 225 + 227: 69 Load 226 + 228: 67(fvec4) Load 167(worldPos) + 229: 67(fvec4) MatrixTimesVector 227 228 + 231: 230(ptr) AccessChain 223 38 + Store 231 229 + 232: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 233 233 12 12 + 238: 29(int) Load 95(gl_InvocationID) + Store 235(gl_ViewportIndex) 238 + 239: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 240 240 12 12 + 247: 29(int) Load 244(gl_PrimitiveIDIn) + Store 241(gl_PrimitiveID) 247 + 248: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 249 249 12 12 EmitVertex - Branch 38 - 38: Label - 229: 24(int) Load 28(i) - 230: 24(int) IAdd 229 83 - Store 28(i) 230 - Branch 35 - 37: Label + Branch 42 + 42: Label + 250: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 17 + 251: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 28 28 12 12 + 252: 29(int) Load 33(i) + 253: 29(int) IAdd 252 93 + Store 33(i) 253 + Branch 39 + 41: Label + 254: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 17 + 255: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 256 256 12 12 EndPrimitive Return FunctionEnd diff --git a/Test/baseResults/spv.debuginfo.glsl.tesc.out b/Test/baseResults/spv.debuginfo.glsl.tesc.out index ae9bfad1..13eca5f2 100755 --- a/Test/baseResults/spv.debuginfo.glsl.tesc.out +++ b/Test/baseResults/spv.debuginfo.glsl.tesc.out @@ -1,619 +1,708 @@ spv.debuginfo.glsl.tesc -Validation failed // Module Version 10000 // Generated by (magic number): 8000b -// Id's are bound by 457 +// Id's are bound by 537 Capability Tessellation Extension "SPV_KHR_non_semantic_info" - 1: ExtInstImport "NonSemantic.Shader.DebugInfo.100" - 2: ExtInstImport "GLSL.std.450" + 2: ExtInstImport "NonSemantic.Shader.DebugInfo.100" + 3: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint TessellationControl 13 "main" 230 234 259 325 335 415 427 435 447 - ExecutionMode 13 OutputVertices 4 + EntryPoint TessellationControl 14 "main" 252 256 282 366 379 493 507 514 528 + ExecutionMode 14 OutputVertices 4 + 1: String "" 8: String "uint" - 14: String "main" - 17: String "" - 24: String "float" - 34: String "screenSpaceTessFactor" + 17: String "float" + 29: String "screenSpaceTessFactor" + 32: String "// OpModuleProcessed auto-map-locations +// OpModuleProcessed auto-map-bindings +// OpModuleProcessed client vulkan100 +// OpModuleProcessed target-env vulkan1.0 +// OpModuleProcessed keep-uncalled +// OpModuleProcessed entry-point main +#line 1 +" 40: String "p0" 44: String "p1" 47: String "bool" - 52: String "frustumCheck" - 58: String "midPoint" - 69: String "radius" - 79: String "v0" - 91: String "modelview" - 96: String "lightPos" - 99: String "frustumPlanes" - 101: String "tessellatedEdgeSize" - 106: String "viewportDim" - 110: String "UBO" - 114: String "ubo" - 116: String "int" - 126: String "clip0" - 146: String "clip1" - 209: String "pos" - 216: String "gl_Position" - 219: String "gl_PointSize" - 222: String "gl_CullDistance" - 226: String "gl_PerVertex" - 232: String "gl_in" - 236: String "gl_InvocationID" - 243: String "type.2d.image" - 245: String "@type.2d.image" - 249: String "type.sampled.image" - 250: String "@type.sampled.image" - 254: String "samplerHeight" - 261: String "inUV" - 278: String "i" - 327: String "gl_TessLevelInner" - 337: String "gl_TessLevelOuter" - 417: String "gl_out" - 429: String "outNormal" - 437: String "inNormal" - 449: String "outUV" - Name 13 "main" - Name 33 "screenSpaceTessFactor(vf4;vf4;" - Name 31 "p0" - Name 32 "p1" + 53: String "frustumCheck" + 56: String "main" + 65: String "midPoint" + 77: String "radius" + 88: String "v0" + 99: String "modelview" + 104: String "lightPos" + 107: String "frustumPlanes" + 109: String "tessellatedEdgeSize" + 114: String "viewportDim" + 118: String "UBO" + 122: String "ubo" + 124: String "int" + 136: String "clip0" + 157: String "clip1" + 232: String "pos" + 238: String "gl_Position" + 241: String "gl_PointSize" + 244: String "gl_CullDistance" + 248: String "gl_PerVertex" + 254: String "gl_in" + 258: String "gl_InvocationID" + 267: String "type.2d.image" + 268: String "@type.2d.image" + 272: String "type.sampled.image" + 273: String "@type.sampled.image" + 277: String "samplerHeight" + 284: String "inUV" + 303: String "i" + 368: String "gl_TessLevelInner" + 381: String "gl_TessLevelOuter" + 495: String "gl_out" + 509: String "outNormal" + 516: String "inNormal" + 530: String "outUV" + Name 14 "main" + Name 27 "screenSpaceTessFactor(vf4;vf4;" + Name 25 "p0" + Name 26 "p1" Name 51 "frustumCheck(" - Name 56 "midPoint" - Name 67 "radius" - Name 77 "v0" - Name 89 "UBO" - MemberName 89(UBO) 0 "projection" - MemberName 89(UBO) 1 "modelview" - MemberName 89(UBO) 2 "lightPos" - MemberName 89(UBO) 3 "frustumPlanes" - MemberName 89(UBO) 4 "displacementFactor" - MemberName 89(UBO) 5 "tessellationFactor" - MemberName 89(UBO) 6 "viewportDim" - MemberName 89(UBO) 7 "tessellatedEdgeSize" - Name 112 "ubo" - Name 124 "clip0" - Name 144 "clip1" - Name 207 "pos" - Name 214 "gl_PerVertex" - MemberName 214(gl_PerVertex) 0 "gl_Position" - MemberName 214(gl_PerVertex) 1 "gl_PointSize" - MemberName 214(gl_PerVertex) 2 "gl_ClipDistance" - MemberName 214(gl_PerVertex) 3 "gl_CullDistance" - Name 230 "gl_in" - Name 234 "gl_InvocationID" - Name 252 "samplerHeight" - Name 259 "inUV" - Name 276 "i" - Name 325 "gl_TessLevelInner" - Name 335 "gl_TessLevelOuter" - Name 351 "param" - Name 354 "param" - Name 359 "param" - Name 362 "param" - Name 367 "param" - Name 370 "param" - Name 375 "param" - Name 378 "param" - Name 402 "gl_PerVertex" - MemberName 402(gl_PerVertex) 0 "gl_Position" - MemberName 402(gl_PerVertex) 1 "gl_PointSize" - MemberName 402(gl_PerVertex) 2 "gl_ClipDistance" - MemberName 402(gl_PerVertex) 3 "gl_CullDistance" - Name 415 "gl_out" - Name 427 "outNormal" - Name 435 "inNormal" - Name 447 "outUV" - Decorate 85 ArrayStride 16 - MemberDecorate 89(UBO) 0 ColMajor - MemberDecorate 89(UBO) 0 Offset 0 - MemberDecorate 89(UBO) 0 MatrixStride 16 - MemberDecorate 89(UBO) 1 ColMajor - MemberDecorate 89(UBO) 1 Offset 64 - MemberDecorate 89(UBO) 1 MatrixStride 16 - MemberDecorate 89(UBO) 2 Offset 128 - MemberDecorate 89(UBO) 3 Offset 144 - MemberDecorate 89(UBO) 4 Offset 240 - MemberDecorate 89(UBO) 5 Offset 244 - MemberDecorate 89(UBO) 6 Offset 248 - MemberDecorate 89(UBO) 7 Offset 256 - Decorate 89(UBO) Block - Decorate 112(ubo) DescriptorSet 0 - Decorate 112(ubo) Binding 0 - MemberDecorate 214(gl_PerVertex) 0 BuiltIn Position - MemberDecorate 214(gl_PerVertex) 1 BuiltIn PointSize - MemberDecorate 214(gl_PerVertex) 2 BuiltIn ClipDistance - MemberDecorate 214(gl_PerVertex) 3 BuiltIn CullDistance - Decorate 214(gl_PerVertex) Block - Decorate 234(gl_InvocationID) BuiltIn InvocationId - Decorate 252(samplerHeight) DescriptorSet 0 - Decorate 252(samplerHeight) Binding 1 - Decorate 259(inUV) Location 1 - Decorate 325(gl_TessLevelInner) Patch - Decorate 325(gl_TessLevelInner) BuiltIn TessLevelInner - Decorate 335(gl_TessLevelOuter) Patch - Decorate 335(gl_TessLevelOuter) BuiltIn TessLevelOuter - MemberDecorate 402(gl_PerVertex) 0 BuiltIn Position - MemberDecorate 402(gl_PerVertex) 1 BuiltIn PointSize - MemberDecorate 402(gl_PerVertex) 2 BuiltIn ClipDistance - MemberDecorate 402(gl_PerVertex) 3 BuiltIn CullDistance - Decorate 402(gl_PerVertex) Block - Decorate 427(outNormal) Location 0 - Decorate 435(inNormal) Location 0 - Decorate 447(outUV) Location 1 - 3: TypeVoid - 4: TypeFunction 3 - 6: TypeInt 32 0 - 9: 6(int) Constant 32 - 10: 6(int) Constant 6 - 11: 6(int) Constant 0 - 7: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 8 9 10 11 - 12: 6(int) Constant 3 - 5: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 8(Floor) 12 3 - 16: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 35(Modf) 0 17 - 19: 6(int) Constant 1 - 20: 6(int) Constant 4 - 21: 6(int) Constant 2 - 18: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 1(Round) 19 20 16 21 - 15: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 20(Cosh) 14 5 16 11 11 18 14 12 11 - 23: TypeFloat 32 - 25: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 24 9 12 11 - 26: TypeVector 23(float) 4 - 27: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 6(FSign) 25 20 - 28: TypePointer Function 26(fvec4) - 29: TypeFunction 23(float) 28(ptr) 28(ptr) - 30: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 8(Floor) 12 25 27 27 - 35: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 20(Cosh) 34 30 16 11 11 18 34 12 11 - 39: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 40 27 16 11 11 35 20 19 - 42: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 31(Sqrt) - 43: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 44 27 16 11 11 35 20 21 + Name 63 "midPoint" + Name 75 "radius" + Name 86 "v0" + Name 97 "UBO" + MemberName 97(UBO) 0 "projection" + MemberName 97(UBO) 1 "modelview" + MemberName 97(UBO) 2 "lightPos" + MemberName 97(UBO) 3 "frustumPlanes" + MemberName 97(UBO) 4 "displacementFactor" + MemberName 97(UBO) 5 "tessellationFactor" + MemberName 97(UBO) 6 "viewportDim" + MemberName 97(UBO) 7 "tessellatedEdgeSize" + Name 120 "ubo" + Name 134 "clip0" + Name 155 "clip1" + Name 230 "pos" + Name 236 "gl_PerVertex" + MemberName 236(gl_PerVertex) 0 "gl_Position" + MemberName 236(gl_PerVertex) 1 "gl_PointSize" + MemberName 236(gl_PerVertex) 2 "gl_ClipDistance" + MemberName 236(gl_PerVertex) 3 "gl_CullDistance" + Name 252 "gl_in" + Name 256 "gl_InvocationID" + Name 275 "samplerHeight" + Name 282 "inUV" + Name 301 "i" + Name 366 "gl_TessLevelInner" + Name 379 "gl_TessLevelOuter" + Name 405 "param" + Name 408 "param" + Name 415 "param" + Name 418 "param" + Name 425 "param" + Name 428 "param" + Name 435 "param" + Name 438 "param" + Name 482 "gl_PerVertex" + MemberName 482(gl_PerVertex) 0 "gl_Position" + MemberName 482(gl_PerVertex) 1 "gl_PointSize" + MemberName 482(gl_PerVertex) 2 "gl_ClipDistance" + MemberName 482(gl_PerVertex) 3 "gl_CullDistance" + Name 493 "gl_out" + Name 507 "outNormal" + Name 514 "inNormal" + Name 528 "outUV" + Decorate 93 ArrayStride 16 + MemberDecorate 97(UBO) 0 ColMajor + MemberDecorate 97(UBO) 0 Offset 0 + MemberDecorate 97(UBO) 0 MatrixStride 16 + MemberDecorate 97(UBO) 1 ColMajor + MemberDecorate 97(UBO) 1 Offset 64 + MemberDecorate 97(UBO) 1 MatrixStride 16 + MemberDecorate 97(UBO) 2 Offset 128 + MemberDecorate 97(UBO) 3 Offset 144 + MemberDecorate 97(UBO) 4 Offset 240 + MemberDecorate 97(UBO) 5 Offset 244 + MemberDecorate 97(UBO) 6 Offset 248 + MemberDecorate 97(UBO) 7 Offset 256 + Decorate 97(UBO) Block + Decorate 120(ubo) DescriptorSet 0 + Decorate 120(ubo) Binding 0 + MemberDecorate 236(gl_PerVertex) 0 BuiltIn Position + MemberDecorate 236(gl_PerVertex) 1 BuiltIn PointSize + MemberDecorate 236(gl_PerVertex) 2 BuiltIn ClipDistance + MemberDecorate 236(gl_PerVertex) 3 BuiltIn CullDistance + Decorate 236(gl_PerVertex) Block + Decorate 256(gl_InvocationID) BuiltIn InvocationId + Decorate 275(samplerHeight) DescriptorSet 0 + Decorate 275(samplerHeight) Binding 1 + Decorate 282(inUV) Location 1 + Decorate 366(gl_TessLevelInner) Patch + Decorate 366(gl_TessLevelInner) BuiltIn TessLevelInner + Decorate 379(gl_TessLevelOuter) Patch + Decorate 379(gl_TessLevelOuter) BuiltIn TessLevelOuter + MemberDecorate 482(gl_PerVertex) 0 BuiltIn Position + MemberDecorate 482(gl_PerVertex) 1 BuiltIn PointSize + MemberDecorate 482(gl_PerVertex) 2 BuiltIn ClipDistance + MemberDecorate 482(gl_PerVertex) 3 BuiltIn CullDistance + Decorate 482(gl_PerVertex) Block + Decorate 507(outNormal) Location 0 + Decorate 514(inNormal) Location 0 + Decorate 528(outUV) Location 1 + 4: TypeVoid + 5: TypeFunction 4 + 7: TypeInt 32 0 + 10: 7(int) Constant 32 + 11: 7(int) Constant 6 + 12: 7(int) Constant 0 + 9: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 8 10 11 12 + 13: 7(int) Constant 3 + 6: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 8(DebugTypeFunction) 13 4 + 16: TypeFloat 32 + 18: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 17 10 13 12 + 19: TypeVector 16(float) 4 + 20: 7(int) Constant 4 + 21: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 18 20 + 22: TypePointer Function 19(fvec4) + 23: TypeFunction 16(float) 22(ptr) 22(ptr) + 24: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 8(DebugTypeFunction) 13 18 21 21 + 31: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 35(DebugSource) 1 32 + 33: 7(int) Constant 51 + 35: 7(int) Constant 1 + 36: 7(int) Constant 2 + 34: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 1(DebugCompilationUnit) 35 20 31 36 + 30: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 20(DebugFunction) 29 24 31 33 12 34 29 13 33 + 39: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 40 21 31 33 12 30 20 35 + 42: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 31(DebugExpression) + 43: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 44 21 31 33 12 30 20 36 46: TypeBool - 48: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 47 9 21 11 + 48: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 47 10 36 12 49: TypeFunction 46(bool) - 50: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 8(Floor) 12 48 - 53: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 20(Cosh) 52 50 16 11 11 18 52 12 11 - 59: 6(int) Constant 54 - 57: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 58 27 16 59 11 35 20 - 61: 23(float) Constant 1056964608 - 66: TypePointer Function 23(float) - 70: 6(int) Constant 56 - 68: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 69 25 16 70 11 35 20 - 75: 23(float) Constant 1073741824 - 80: 6(int) Constant 59 - 78: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 79 27 16 80 11 35 20 - 82: TypeMatrix 26(fvec4) 4 - 84: 46(bool) ConstantTrue - 83: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 108 27 20 84 - 85: TypeArray 26(fvec4) 10 - 86: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 5(SAbs) 27 10 - 87: TypeVector 23(float) 2 - 88: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 6(FSign) 25 21 - 89(UBO): TypeStruct 82 82 26(fvec4) 85 23(float) 23(float) 87(fvec2) 23(float) - 92: 6(int) Constant 30 - 93: 6(int) Constant 7 - 90: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 91 83 16 92 93 11 11 12 - 94: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 91 83 16 92 93 11 11 12 - 97: 6(int) Constant 31 - 95: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 96 27 16 97 93 11 11 12 - 98: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 99 86 16 9 93 11 11 12 - 102: 6(int) Constant 36 - 103: 6(int) Constant 8 - 100: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 101 25 16 102 103 11 11 12 - 104: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 101 25 16 102 103 11 11 12 - 107: 6(int) Constant 35 - 105: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 106 88 16 107 93 11 11 12 - 108: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 101 25 16 102 103 11 11 12 - 109: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(Fract) 110 19 16 80 11 18 110 11 12 90 94 95 98 100 104 105 108 - 111: TypePointer Uniform 89(UBO) - 112(ubo): 111(ptr) Variable Uniform - 113: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(Atan) 114 109 16 80 11 18 114 112(ubo) 103 - 115: TypeInt 32 1 - 117: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 116 9 20 11 - 118: 115(int) Constant 1 - 119: TypePointer Uniform 82 - 127: 6(int) Constant 62 - 125: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 126 27 16 127 11 35 20 - 129: 115(int) Constant 0 - 134: TypeVector 23(float) 3 - 135: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 6(FSign) 25 12 - 136: 23(float) Constant 0 - 137: 134(fvec3) ConstantComposite 136 136 136 - 147: 6(int) Constant 63 - 145: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 146 27 16 147 11 35 20 - 169: 115(int) Constant 6 - 170: TypePointer Uniform 87(fvec2) - 192: 115(int) Constant 7 - 193: TypePointer Uniform 23(float) - 197: 115(int) Constant 5 - 201: 23(float) Constant 1065353216 - 202: 23(float) Constant 1115684864 - 210: 6(int) Constant 85 - 208: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 209 27 16 210 11 53 20 - 212: TypeArray 23(float) 19 - 213: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 5(SAbs) 25 19 -214(gl_PerVertex): TypeStruct 26(fvec4) 23(float) 212 212 - 217: 6(int) Constant 1756 - 215: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 216 27 16 19 217 11 11 12 - 220: 6(int) Constant 1774 - 218: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 219 25 16 19 220 11 11 12 - 223: 6(int) Constant 1817 - 221: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 222 213 16 19 223 11 11 12 - 224: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 222 213 16 19 223 11 11 12 - 225: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(Fract) 226 19 16 210 11 18 226 11 12 215 218 221 224 - 227: TypeArray 214(gl_PerVertex) 9 - 228: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 5(SAbs) 225 9 - 229: TypePointer Input 227 - 230(gl_in): 229(ptr) Variable Input - 231: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(Atan) 232 228 16 210 11 18 232 230(gl_in) 103 - 233: TypePointer Input 115(int) -234(gl_InvocationID): 233(ptr) Variable Input - 235: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(Atan) 236 117 16 210 11 18 236 234(gl_InvocationID) 103 - 238: TypePointer Input 26(fvec4) - 241: TypeImage 23(float) 2D sampled format:Unknown - 244: 6(int) Constant 86 - 246: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 0(Unknown) - 242: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(Fract) 243 11 16 244 11 18 245 246 12 - 247: TypeSampledImage 241 - 248: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(Fract) 249 11 16 244 11 18 250 246 12 - 251: TypePointer UniformConstant 247 -252(samplerHeight): 251(ptr) Variable UniformConstant - 253: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(Atan) 254 248 16 244 11 18 254 252(samplerHeight) 103 - 256: TypeArray 87(fvec2) 9 - 257: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 5(SAbs) 88 9 - 258: TypePointer Input 256 - 259(inUV): 258(ptr) Variable Input - 260: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(Atan) 261 257 16 244 11 18 261 259(inUV) 103 - 262: TypePointer Input 87(fvec2) - 267: 115(int) Constant 4 - 275: TypePointer Function 115(int) - 279: 6(int) Constant 89 - 277: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 278 117 16 279 11 53 20 - 287: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 47 9 21 11 - 290: 115(int) Constant 3 - 292: TypePointer Uniform 26(fvec4) - 296: 23(float) Constant 1090519040 - 298: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 47 9 21 11 - 302: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 47 9 21 11 - 303: 46(bool) ConstantFalse - 307: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 47 9 21 11 - 312: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 47 9 21 11 - 317: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 47 9 21 11 - 318: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 47 9 21 11 - 322: TypeArray 23(float) 21 - 323: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 5(SAbs) 25 21 - 324: TypePointer Output 322 -325(gl_TessLevelInner): 324(ptr) Variable Output - 328: 6(int) Constant 104 - 326: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(Atan) 327 323 16 328 11 18 327 325(gl_TessLevelInner) 103 - 329: TypePointer Output 23(float) - 332: TypeArray 23(float) 20 - 333: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 5(SAbs) 25 20 - 334: TypePointer Output 332 -335(gl_TessLevelOuter): 334(ptr) Variable Output - 338: 6(int) Constant 106 - 336: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(Atan) 337 333 16 338 11 18 337 335(gl_TessLevelOuter) 103 - 341: 115(int) Constant 2 - 347: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 47 9 21 11 -402(gl_PerVertex): TypeStruct 26(fvec4) 23(float) 212 212 - 404: 6(int) Constant 110 - 403: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 216 27 16 19 404 11 11 12 - 406: 6(int) Constant 128 - 405: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 219 25 16 19 406 11 11 12 - 408: 6(int) Constant 171 - 407: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 222 213 16 19 408 11 11 12 - 409: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 222 213 16 19 408 11 11 12 - 411: 6(int) Constant 137 - 410: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(Fract) 226 19 16 411 11 18 226 11 12 403 405 407 409 - 412: TypeArray 402(gl_PerVertex) 20 - 413: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 5(SAbs) 410 20 - 414: TypePointer Output 412 - 415(gl_out): 414(ptr) Variable Output - 416: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(Atan) 417 413 16 411 11 18 417 415(gl_out) 103 - 422: TypePointer Output 26(fvec4) - 424: TypeArray 134(fvec3) 20 - 425: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 5(SAbs) 135 20 - 426: TypePointer Output 424 - 427(outNormal): 426(ptr) Variable Output - 430: 6(int) Constant 138 - 428: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(Atan) 429 425 16 430 11 18 429 427(outNormal) 103 - 432: TypeArray 134(fvec3) 9 - 433: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 5(SAbs) 135 9 - 434: TypePointer Input 432 - 435(inNormal): 434(ptr) Variable Input - 436: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(Atan) 437 433 16 430 11 18 437 435(inNormal) 103 - 439: TypePointer Input 134(fvec3) - 442: TypePointer Output 134(fvec3) - 444: TypeArray 87(fvec2) 20 - 445: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 5(SAbs) 88 20 - 446: TypePointer Output 444 - 447(outUV): 446(ptr) Variable Output - 450: 6(int) Constant 139 - 448: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(Atan) 449 445 16 450 11 18 449 447(outUV) 103 - 455: TypePointer Output 87(fvec2) - 13(main): 3 Function None 4 - 22: Label - 351(param): 28(ptr) Variable Function - 354(param): 28(ptr) Variable Function - 359(param): 28(ptr) Variable Function - 362(param): 28(ptr) Variable Function - 367(param): 28(ptr) Variable Function - 370(param): 28(ptr) Variable Function - 375(param): 28(ptr) Variable Function - 378(param): 28(ptr) Variable Function - 310: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 101 15 13(main) - 311: 115(int) Load 234(gl_InvocationID) - 313: 46(bool) IEqual 311 129 - SelectionMerge 315 None - BranchConditional 313 314 315 - 314: Label - 316: 46(bool) FunctionCall 51(frustumCheck() - 319: 46(bool) LogicalNot 316 - SelectionMerge 321 None - BranchConditional 319 320 344 - 320: Label - 330: 329(ptr) AccessChain 325(gl_TessLevelInner) 129 - Store 330 136 - 331: 329(ptr) AccessChain 325(gl_TessLevelInner) 118 - Store 331 136 - 339: 329(ptr) AccessChain 335(gl_TessLevelOuter) 129 - Store 339 136 - 340: 329(ptr) AccessChain 335(gl_TessLevelOuter) 118 - Store 340 136 - 342: 329(ptr) AccessChain 335(gl_TessLevelOuter) 341 - Store 342 136 - 343: 329(ptr) AccessChain 335(gl_TessLevelOuter) 290 - Store 343 136 - Branch 321 - 344: Label - 345: 193(ptr) AccessChain 112(ubo) 197 - 346: 23(float) Load 345 - 348: 46(bool) FOrdGreaterThan 346 136 - SelectionMerge 350 None - BranchConditional 348 349 395 - 349: Label - 352: 238(ptr) AccessChain 230(gl_in) 290 129 - 353: 26(fvec4) Load 352 - Store 351(param) 353 - 355: 238(ptr) AccessChain 230(gl_in) 129 129 - 356: 26(fvec4) Load 355 - Store 354(param) 356 - 357: 23(float) FunctionCall 33(screenSpaceTessFactor(vf4;vf4;) 351(param) 354(param) - 358: 329(ptr) AccessChain 335(gl_TessLevelOuter) 129 - Store 358 357 - 360: 238(ptr) AccessChain 230(gl_in) 129 129 - 361: 26(fvec4) Load 360 - Store 359(param) 361 - 363: 238(ptr) AccessChain 230(gl_in) 118 129 - 364: 26(fvec4) Load 363 - Store 362(param) 364 - 365: 23(float) FunctionCall 33(screenSpaceTessFactor(vf4;vf4;) 359(param) 362(param) - 366: 329(ptr) AccessChain 335(gl_TessLevelOuter) 118 - Store 366 365 - 368: 238(ptr) AccessChain 230(gl_in) 118 129 - 369: 26(fvec4) Load 368 - Store 367(param) 369 - 371: 238(ptr) AccessChain 230(gl_in) 341 129 - 372: 26(fvec4) Load 371 - Store 370(param) 372 - 373: 23(float) FunctionCall 33(screenSpaceTessFactor(vf4;vf4;) 367(param) 370(param) - 374: 329(ptr) AccessChain 335(gl_TessLevelOuter) 341 - Store 374 373 - 376: 238(ptr) AccessChain 230(gl_in) 341 129 - 377: 26(fvec4) Load 376 - Store 375(param) 377 - 379: 238(ptr) AccessChain 230(gl_in) 290 129 - 380: 26(fvec4) Load 379 - Store 378(param) 380 - 381: 23(float) FunctionCall 33(screenSpaceTessFactor(vf4;vf4;) 375(param) 378(param) - 382: 329(ptr) AccessChain 335(gl_TessLevelOuter) 290 - Store 382 381 - 383: 329(ptr) AccessChain 335(gl_TessLevelOuter) 129 - 384: 23(float) Load 383 - 385: 329(ptr) AccessChain 335(gl_TessLevelOuter) 290 - 386: 23(float) Load 385 - 387: 23(float) ExtInst 2(GLSL.std.450) 46(FMix) 384 386 61 - 388: 329(ptr) AccessChain 325(gl_TessLevelInner) 129 - Store 388 387 - 389: 329(ptr) AccessChain 335(gl_TessLevelOuter) 341 - 390: 23(float) Load 389 - 391: 329(ptr) AccessChain 335(gl_TessLevelOuter) 118 - 392: 23(float) Load 391 - 393: 23(float) ExtInst 2(GLSL.std.450) 46(FMix) 390 392 61 - 394: 329(ptr) AccessChain 325(gl_TessLevelInner) 118 - Store 394 393 - Branch 350 - 395: Label - 396: 329(ptr) AccessChain 325(gl_TessLevelInner) 129 - Store 396 201 - 397: 329(ptr) AccessChain 325(gl_TessLevelInner) 118 - Store 397 201 - 398: 329(ptr) AccessChain 335(gl_TessLevelOuter) 129 - Store 398 201 - 399: 329(ptr) AccessChain 335(gl_TessLevelOuter) 118 - Store 399 201 - 400: 329(ptr) AccessChain 335(gl_TessLevelOuter) 341 - Store 400 201 - 401: 329(ptr) AccessChain 335(gl_TessLevelOuter) 290 - Store 401 201 - Branch 350 - 350: Label - Branch 321 - 321: Label - Branch 315 - 315: Label - 418: 115(int) Load 234(gl_InvocationID) - 419: 115(int) Load 234(gl_InvocationID) - 420: 238(ptr) AccessChain 230(gl_in) 419 129 - 421: 26(fvec4) Load 420 - 423: 422(ptr) AccessChain 415(gl_out) 418 129 - Store 423 421 - 431: 115(int) Load 234(gl_InvocationID) - 438: 115(int) Load 234(gl_InvocationID) - 440: 439(ptr) AccessChain 435(inNormal) 438 - 441: 134(fvec3) Load 440 - 443: 442(ptr) AccessChain 427(outNormal) 431 - Store 443 441 - 451: 115(int) Load 234(gl_InvocationID) - 452: 115(int) Load 234(gl_InvocationID) - 453: 262(ptr) AccessChain 259(inUV) 452 - 454: 87(fvec2) Load 453 - 456: 455(ptr) AccessChain 447(outUV) 451 - Store 456 454 + 50: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 8(DebugTypeFunction) 13 48 + 55: 7(int) Constant 81 + 54: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 20(DebugFunction) 53 50 31 55 12 34 53 13 55 + 58: 7(int) Constant 98 + 57: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 20(DebugFunction) 56 6 31 58 12 34 56 13 58 + 62: 7(int) Constant 54 + 64: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 65 21 31 62 12 30 20 + 67: 16(float) Constant 1056964608 + 73: 7(int) Constant 56 + 74: TypePointer Function 16(float) + 76: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 77 18 31 73 12 30 20 + 82: 16(float) Constant 1073741824 + 85: 7(int) Constant 59 + 87: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 88 21 31 85 12 30 20 + 90: TypeMatrix 19(fvec4) 4 + 92: 46(bool) ConstantTrue + 91: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 108(DebugTypeMatrix) 21 20 92 + 93: TypeArray 19(fvec4) 11 + 94: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 21 11 + 95: TypeVector 16(float) 2 + 96: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 18 36 + 97(UBO): TypeStruct 90 90 19(fvec4) 93 16(float) 16(float) 95(fvec2) 16(float) + 100: 7(int) Constant 30 + 101: 7(int) Constant 7 + 98: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 99 91 31 100 101 12 12 13 + 102: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 99 91 31 100 101 12 12 13 + 105: 7(int) Constant 31 + 103: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 104 21 31 105 101 12 12 13 + 106: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 107 94 31 10 101 12 12 13 + 110: 7(int) Constant 36 + 111: 7(int) Constant 8 + 108: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 109 18 31 110 111 12 12 13 + 112: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 109 18 31 110 111 12 12 13 + 115: 7(int) Constant 35 + 113: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 114 96 31 115 101 12 12 13 + 116: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 109 18 31 110 111 12 12 13 + 117: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 118 35 31 85 12 34 118 12 13 98 102 103 106 108 112 113 116 + 119: TypePointer Uniform 97(UBO) + 120(ubo): 119(ptr) Variable Uniform + 121: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 122 117 31 85 12 34 122 120(ubo) 111 + 123: TypeInt 32 1 + 125: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 124 10 20 12 + 126: 123(int) Constant 1 + 127: TypePointer Uniform 90 + 133: 7(int) Constant 62 + 135: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 136 21 31 133 12 30 20 + 138: 123(int) Constant 0 + 143: TypeVector 16(float) 3 + 144: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 18 13 + 145: 16(float) Constant 0 + 146: 143(fvec3) ConstantComposite 145 145 145 + 154: 7(int) Constant 63 + 156: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 157 21 31 154 12 30 20 + 170: 7(int) Constant 66 + 177: 7(int) Constant 67 + 184: 7(int) Constant 70 + 185: 123(int) Constant 6 + 186: TypePointer Uniform 95(fvec2) + 197: 7(int) Constant 71 + 208: 7(int) Constant 76 + 212: 123(int) Constant 7 + 213: TypePointer Uniform 16(float) + 217: 123(int) Constant 5 + 221: 16(float) Constant 1065353216 + 222: 16(float) Constant 1115684864 + 229: 7(int) Constant 85 + 231: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 232 21 31 229 12 54 20 + 234: TypeArray 16(float) 35 + 235: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 18 35 +236(gl_PerVertex): TypeStruct 19(fvec4) 16(float) 234 234 + 239: 7(int) Constant 1756 + 237: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 238 21 31 35 239 12 12 13 + 242: 7(int) Constant 1774 + 240: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 241 18 31 35 242 12 12 13 + 245: 7(int) Constant 1817 + 243: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 244 235 31 35 245 12 12 13 + 246: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 244 235 31 35 245 12 12 13 + 247: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 248 35 31 229 12 34 248 12 13 237 240 243 246 + 249: TypeArray 236(gl_PerVertex) 10 + 250: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 247 10 + 251: TypePointer Input 249 + 252(gl_in): 251(ptr) Variable Input + 253: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 254 250 31 229 12 34 254 252(gl_in) 111 + 255: TypePointer Input 123(int) +256(gl_InvocationID): 255(ptr) Variable Input + 257: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 258 125 31 229 12 34 258 256(gl_InvocationID) 111 + 260: TypePointer Input 19(fvec4) + 264: 7(int) Constant 86 + 265: TypeImage 16(float) 2D sampled format:Unknown + 269: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 0(DebugInfoNone) + 266: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 267 12 31 264 12 34 268 269 13 + 270: TypeSampledImage 265 + 271: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 272 12 31 264 12 34 273 269 13 + 274: TypePointer UniformConstant 270 +275(samplerHeight): 274(ptr) Variable UniformConstant + 276: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 277 271 31 264 12 34 277 275(samplerHeight) 111 + 279: TypeArray 95(fvec2) 10 + 280: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 96 10 + 281: TypePointer Input 279 + 282(inUV): 281(ptr) Variable Input + 283: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 284 280 31 264 12 34 284 282(inUV) 111 + 285: TypePointer Input 95(fvec2) + 290: 123(int) Constant 4 + 299: 7(int) Constant 89 + 300: TypePointer Function 123(int) + 302: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 303 125 31 299 12 54 20 + 318: 7(int) Constant 90 + 320: 123(int) Constant 3 + 322: TypePointer Uniform 19(fvec4) + 326: 16(float) Constant 1090519040 + 331: 46(bool) ConstantFalse + 334: 7(int) Constant 92 + 342: 7(int) Constant 95 + 348: 7(int) Constant 100 + 355: 7(int) Constant 102 + 362: 7(int) Constant 104 + 363: TypeArray 16(float) 36 + 364: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 18 36 + 365: TypePointer Output 363 +366(gl_TessLevelInner): 365(ptr) Variable Output + 367: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 368 364 31 362 12 34 368 366(gl_TessLevelInner) 111 + 369: TypePointer Output 16(float) + 372: 7(int) Constant 105 + 375: 7(int) Constant 106 + 376: TypeArray 16(float) 20 + 377: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 18 20 + 378: TypePointer Output 376 +379(gl_TessLevelOuter): 378(ptr) Variable Output + 380: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 381 377 31 375 12 34 381 379(gl_TessLevelOuter) 111 + 384: 7(int) Constant 107 + 387: 7(int) Constant 108 + 388: 123(int) Constant 2 + 391: 7(int) Constant 109 + 396: 7(int) Constant 113 + 404: 7(int) Constant 115 + 414: 7(int) Constant 116 + 424: 7(int) Constant 117 + 434: 7(int) Constant 118 + 444: 7(int) Constant 119 + 452: 7(int) Constant 120 + 462: 7(int) Constant 126 + 465: 7(int) Constant 127 + 468: 7(int) Constant 128 + 471: 7(int) Constant 129 + 474: 7(int) Constant 130 + 477: 7(int) Constant 131 + 481: 7(int) Constant 137 +482(gl_PerVertex): TypeStruct 19(fvec4) 16(float) 234 234 + 484: 7(int) Constant 110 + 483: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 238 21 31 35 484 12 12 13 + 485: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 241 18 31 35 468 12 12 13 + 487: 7(int) Constant 171 + 486: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 244 235 31 35 487 12 12 13 + 488: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 244 235 31 35 487 12 12 13 + 489: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 248 35 31 481 12 34 248 12 13 483 485 486 488 + 490: TypeArray 482(gl_PerVertex) 20 + 491: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 489 20 + 492: TypePointer Output 490 + 493(gl_out): 492(ptr) Variable Output + 494: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 495 491 31 481 12 34 495 493(gl_out) 111 + 500: TypePointer Output 19(fvec4) + 503: 7(int) Constant 138 + 504: TypeArray 143(fvec3) 20 + 505: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 144 20 + 506: TypePointer Output 504 + 507(outNormal): 506(ptr) Variable Output + 508: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 509 505 31 503 12 34 509 507(outNormal) 111 + 511: TypeArray 143(fvec3) 10 + 512: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 144 10 + 513: TypePointer Input 511 + 514(inNormal): 513(ptr) Variable Input + 515: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 516 512 31 503 12 34 516 514(inNormal) 111 + 518: TypePointer Input 143(fvec3) + 521: TypePointer Output 143(fvec3) + 524: 7(int) Constant 139 + 525: TypeArray 95(fvec2) 20 + 526: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 96 20 + 527: TypePointer Output 525 + 528(outUV): 527(ptr) Variable Output + 529: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 530 526 31 524 12 34 530 528(outUV) 111 + 535: TypePointer Output 95(fvec2) + Line 1 98 11 + 14(main): 4 Function None 5 + 15: Label + 405(param): 22(ptr) Variable Function + 408(param): 22(ptr) Variable Function + 415(param): 22(ptr) Variable Function + 418(param): 22(ptr) Variable Function + 425(param): 22(ptr) Variable Function + 428(param): 22(ptr) Variable Function + 435(param): 22(ptr) Variable Function + 438(param): 22(ptr) Variable Function + 345: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 101(DebugFunctionDefinition) 57 14(main) + 346: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 57 + 347: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 31 348 348 12 12 + 349: 123(int) Load 256(gl_InvocationID) + 350: 46(bool) IEqual 349 138 + SelectionMerge 352 None + BranchConditional 350 351 352 + 351: Label + 353: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 57 + 354: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 31 355 355 12 12 + 356: 46(bool) FunctionCall 51(frustumCheck() + 357: 46(bool) LogicalNot 356 + SelectionMerge 359 None + BranchConditional 357 358 393 + 358: Label + 360: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 57 + 361: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 31 362 362 12 12 + 370: 369(ptr) AccessChain 366(gl_TessLevelInner) 138 + Store 370 145 + 371: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 31 372 372 12 12 + 373: 369(ptr) AccessChain 366(gl_TessLevelInner) 126 + Store 373 145 + 374: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 31 375 375 12 12 + 382: 369(ptr) AccessChain 379(gl_TessLevelOuter) 138 + Store 382 145 + 383: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 31 384 384 12 12 + 385: 369(ptr) AccessChain 379(gl_TessLevelOuter) 126 + Store 385 145 + 386: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 31 387 387 12 12 + 389: 369(ptr) AccessChain 379(gl_TessLevelOuter) 388 + Store 389 145 + 390: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 31 391 391 12 12 + 392: 369(ptr) AccessChain 379(gl_TessLevelOuter) 320 + Store 392 145 + Branch 359 + 393: Label + 394: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 57 + 395: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 31 396 396 12 12 + 397: 213(ptr) AccessChain 120(ubo) 217 + 398: 16(float) Load 397 + 399: 46(bool) FOrdGreaterThan 398 145 + SelectionMerge 401 None + BranchConditional 399 400 459 + 400: Label + 402: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 57 + 403: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 31 404 404 12 12 + 406: 260(ptr) AccessChain 252(gl_in) 320 138 + 407: 19(fvec4) Load 406 + Store 405(param) 407 + 409: 260(ptr) AccessChain 252(gl_in) 138 138 + 410: 19(fvec4) Load 409 + Store 408(param) 410 + 411: 16(float) FunctionCall 27(screenSpaceTessFactor(vf4;vf4;) 405(param) 408(param) + 412: 369(ptr) AccessChain 379(gl_TessLevelOuter) 138 + Store 412 411 + 413: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 31 414 414 12 12 + 416: 260(ptr) AccessChain 252(gl_in) 138 138 + 417: 19(fvec4) Load 416 + Store 415(param) 417 + 419: 260(ptr) AccessChain 252(gl_in) 126 138 + 420: 19(fvec4) Load 419 + Store 418(param) 420 + 421: 16(float) FunctionCall 27(screenSpaceTessFactor(vf4;vf4;) 415(param) 418(param) + 422: 369(ptr) AccessChain 379(gl_TessLevelOuter) 126 + Store 422 421 + 423: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 31 424 424 12 12 + 426: 260(ptr) AccessChain 252(gl_in) 126 138 + 427: 19(fvec4) Load 426 + Store 425(param) 427 + 429: 260(ptr) AccessChain 252(gl_in) 388 138 + 430: 19(fvec4) Load 429 + Store 428(param) 430 + 431: 16(float) FunctionCall 27(screenSpaceTessFactor(vf4;vf4;) 425(param) 428(param) + 432: 369(ptr) AccessChain 379(gl_TessLevelOuter) 388 + Store 432 431 + 433: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 31 434 434 12 12 + 436: 260(ptr) AccessChain 252(gl_in) 388 138 + 437: 19(fvec4) Load 436 + Store 435(param) 437 + 439: 260(ptr) AccessChain 252(gl_in) 320 138 + 440: 19(fvec4) Load 439 + Store 438(param) 440 + 441: 16(float) FunctionCall 27(screenSpaceTessFactor(vf4;vf4;) 435(param) 438(param) + 442: 369(ptr) AccessChain 379(gl_TessLevelOuter) 320 + Store 442 441 + 443: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 31 444 444 12 12 + 445: 369(ptr) AccessChain 379(gl_TessLevelOuter) 138 + 446: 16(float) Load 445 + 447: 369(ptr) AccessChain 379(gl_TessLevelOuter) 320 + 448: 16(float) Load 447 + 449: 16(float) ExtInst 3(GLSL.std.450) 46(FMix) 446 448 67 + 450: 369(ptr) AccessChain 366(gl_TessLevelInner) 138 + Store 450 449 + 451: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 31 452 452 12 12 + 453: 369(ptr) AccessChain 379(gl_TessLevelOuter) 388 + 454: 16(float) Load 453 + 455: 369(ptr) AccessChain 379(gl_TessLevelOuter) 126 + 456: 16(float) Load 455 + 457: 16(float) ExtInst 3(GLSL.std.450) 46(FMix) 454 456 67 + 458: 369(ptr) AccessChain 366(gl_TessLevelInner) 126 + Store 458 457 + Branch 401 + 459: Label + 460: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 57 + 461: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 31 462 462 12 12 + 463: 369(ptr) AccessChain 366(gl_TessLevelInner) 138 + Store 463 221 + 464: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 31 465 465 12 12 + 466: 369(ptr) AccessChain 366(gl_TessLevelInner) 126 + Store 466 221 + 467: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 31 468 468 12 12 + 469: 369(ptr) AccessChain 379(gl_TessLevelOuter) 138 + Store 469 221 + 470: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 31 471 471 12 12 + 472: 369(ptr) AccessChain 379(gl_TessLevelOuter) 126 + Store 472 221 + 473: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 31 474 474 12 12 + 475: 369(ptr) AccessChain 379(gl_TessLevelOuter) 388 + Store 475 221 + 476: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 31 477 477 12 12 + 478: 369(ptr) AccessChain 379(gl_TessLevelOuter) 320 + Store 478 221 + Branch 401 + 401: Label + Branch 359 + 359: Label + Branch 352 + 352: Label + 479: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 57 + 480: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 31 481 481 12 12 + 496: 123(int) Load 256(gl_InvocationID) + 497: 123(int) Load 256(gl_InvocationID) + 498: 260(ptr) AccessChain 252(gl_in) 497 138 + 499: 19(fvec4) Load 498 + 501: 500(ptr) AccessChain 493(gl_out) 496 138 + Store 501 499 + 502: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 31 503 503 12 12 + 510: 123(int) Load 256(gl_InvocationID) + 517: 123(int) Load 256(gl_InvocationID) + 519: 518(ptr) AccessChain 514(inNormal) 517 + 520: 143(fvec3) Load 519 + 522: 521(ptr) AccessChain 507(outNormal) 510 + Store 522 520 + 523: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 31 524 524 12 12 + 531: 123(int) Load 256(gl_InvocationID) + 532: 123(int) Load 256(gl_InvocationID) + 533: 285(ptr) AccessChain 282(inUV) 532 + 534: 95(fvec2) Load 533 + 536: 535(ptr) AccessChain 528(outUV) 531 + Store 536 534 Return FunctionEnd -33(screenSpaceTessFactor(vf4;vf4;): 23(float) Function None 29 - 31(p0): 28(ptr) FunctionParameter - 32(p1): 28(ptr) FunctionParameter - 36: Label - 56(midPoint): 28(ptr) Variable Function - 67(radius): 66(ptr) Variable Function - 77(v0): 28(ptr) Variable Function - 124(clip0): 28(ptr) Variable Function - 144(clip1): 28(ptr) Variable Function - 37: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(Acosh) 35 - 38: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103 16 11 11 11 11 - 41: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 39 31(p0) 42 - 45: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 43 32(p1) 42 - 55: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 101 35 33(screenSpaceTessFactor(vf4;vf4;) - 60: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 57 56(midPoint) 42 - 62: 26(fvec4) Load 31(p0) - 63: 26(fvec4) Load 32(p1) - 64: 26(fvec4) FAdd 62 63 - 65: 26(fvec4) VectorTimesScalar 64 61 - Store 56(midPoint) 65 - 71: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 68 67(radius) 42 - 72: 26(fvec4) Load 31(p0) - 73: 26(fvec4) Load 32(p1) - 74: 23(float) ExtInst 2(GLSL.std.450) 67(Distance) 72 73 - 76: 23(float) FDiv 74 75 - Store 67(radius) 76 - 81: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 78 77(v0) 42 - 120: 119(ptr) AccessChain 112(ubo) 118 - 121: 82 Load 120 - 122: 26(fvec4) Load 56(midPoint) - 123: 26(fvec4) MatrixTimesVector 121 122 - Store 77(v0) 123 - 128: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 125 124(clip0) 42 - 130: 119(ptr) AccessChain 112(ubo) 129 - 131: 82 Load 130 - 132: 26(fvec4) Load 77(v0) - 133: 23(float) Load 67(radius) - 138: 23(float) CompositeExtract 137 0 - 139: 23(float) CompositeExtract 137 1 - 140: 23(float) CompositeExtract 137 2 - 141: 26(fvec4) CompositeConstruct 133 138 139 140 - 142: 26(fvec4) FSub 132 141 - 143: 26(fvec4) MatrixTimesVector 131 142 - Store 124(clip0) 143 - 148: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 145 144(clip1) 42 - 149: 119(ptr) AccessChain 112(ubo) 129 - 150: 82 Load 149 - 151: 26(fvec4) Load 77(v0) - 152: 23(float) Load 67(radius) - 153: 23(float) CompositeExtract 137 0 - 154: 23(float) CompositeExtract 137 1 - 155: 23(float) CompositeExtract 137 2 - 156: 26(fvec4) CompositeConstruct 152 153 154 155 - 157: 26(fvec4) FAdd 151 156 - 158: 26(fvec4) MatrixTimesVector 150 157 - Store 144(clip1) 158 - 159: 66(ptr) AccessChain 124(clip0) 12 - 160: 23(float) Load 159 - 161: 26(fvec4) Load 124(clip0) - 162: 26(fvec4) CompositeConstruct 160 160 160 160 - 163: 26(fvec4) FDiv 161 162 - Store 124(clip0) 163 - 164: 66(ptr) AccessChain 144(clip1) 12 - 165: 23(float) Load 164 - 166: 26(fvec4) Load 144(clip1) - 167: 26(fvec4) CompositeConstruct 165 165 165 165 - 168: 26(fvec4) FDiv 166 167 - Store 144(clip1) 168 - 171: 170(ptr) AccessChain 112(ubo) 169 - 172: 87(fvec2) Load 171 - 173: 26(fvec4) Load 124(clip0) - 174: 87(fvec2) VectorShuffle 173 173 0 1 - 175: 87(fvec2) FMul 174 172 - 176: 66(ptr) AccessChain 124(clip0) 11 - 177: 23(float) CompositeExtract 175 0 - Store 176 177 - 178: 66(ptr) AccessChain 124(clip0) 19 - 179: 23(float) CompositeExtract 175 1 - Store 178 179 - 180: 170(ptr) AccessChain 112(ubo) 169 - 181: 87(fvec2) Load 180 - 182: 26(fvec4) Load 144(clip1) - 183: 87(fvec2) VectorShuffle 182 182 0 1 - 184: 87(fvec2) FMul 183 181 - 185: 66(ptr) AccessChain 144(clip1) 11 - 186: 23(float) CompositeExtract 184 0 - Store 185 186 - 187: 66(ptr) AccessChain 144(clip1) 19 - 188: 23(float) CompositeExtract 184 1 - Store 187 188 - 189: 26(fvec4) Load 124(clip0) - 190: 26(fvec4) Load 144(clip1) - 191: 23(float) ExtInst 2(GLSL.std.450) 67(Distance) 189 190 - 194: 193(ptr) AccessChain 112(ubo) 192 - 195: 23(float) Load 194 - 196: 23(float) FDiv 191 195 - 198: 193(ptr) AccessChain 112(ubo) 197 - 199: 23(float) Load 198 - 200: 23(float) FMul 196 199 - 203: 23(float) ExtInst 2(GLSL.std.450) 43(FClamp) 200 201 202 - ReturnValue 203 + Line 1 51 45 +27(screenSpaceTessFactor(vf4;vf4;): 16(float) Function None 23 + 25(p0): 22(ptr) FunctionParameter + 26(p1): 22(ptr) FunctionParameter + 28: Label + 63(midPoint): 22(ptr) Variable Function + 75(radius): 74(ptr) Variable Function + 86(v0): 22(ptr) Variable Function + 134(clip0): 22(ptr) Variable Function + 155(clip1): 22(ptr) Variable Function + 37: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 30 + 38: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 31 33 33 12 12 + 41: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 39 25(p0) 42 + 45: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 43 26(p1) 42 + 59: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 101(DebugFunctionDefinition) 30 27(screenSpaceTessFactor(vf4;vf4;) + 60: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 30 + 61: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 31 62 62 12 12 + 66: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 64 63(midPoint) 42 + 68: 19(fvec4) Load 25(p0) + 69: 19(fvec4) Load 26(p1) + 70: 19(fvec4) FAdd 68 69 + 71: 19(fvec4) VectorTimesScalar 70 67 + Store 63(midPoint) 71 + 72: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 31 73 73 12 12 + 78: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 76 75(radius) 42 + 79: 19(fvec4) Load 25(p0) + 80: 19(fvec4) Load 26(p1) + 81: 16(float) ExtInst 3(GLSL.std.450) 67(Distance) 79 80 + 83: 16(float) FDiv 81 82 + Store 75(radius) 83 + 84: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 31 85 85 12 12 + 89: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 87 86(v0) 42 + 128: 127(ptr) AccessChain 120(ubo) 126 + 129: 90 Load 128 + 130: 19(fvec4) Load 63(midPoint) + 131: 19(fvec4) MatrixTimesVector 129 130 + Store 86(v0) 131 + 132: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 31 133 133 12 12 + 137: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 135 134(clip0) 42 + 139: 127(ptr) AccessChain 120(ubo) 138 + 140: 90 Load 139 + 141: 19(fvec4) Load 86(v0) + 142: 16(float) Load 75(radius) + 147: 16(float) CompositeExtract 146 0 + 148: 16(float) CompositeExtract 146 1 + 149: 16(float) CompositeExtract 146 2 + 150: 19(fvec4) CompositeConstruct 142 147 148 149 + 151: 19(fvec4) FSub 141 150 + 152: 19(fvec4) MatrixTimesVector 140 151 + Store 134(clip0) 152 + 153: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 31 154 154 12 12 + 158: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 156 155(clip1) 42 + 159: 127(ptr) AccessChain 120(ubo) 138 + 160: 90 Load 159 + 161: 19(fvec4) Load 86(v0) + 162: 16(float) Load 75(radius) + 163: 16(float) CompositeExtract 146 0 + 164: 16(float) CompositeExtract 146 1 + 165: 16(float) CompositeExtract 146 2 + 166: 19(fvec4) CompositeConstruct 162 163 164 165 + 167: 19(fvec4) FAdd 161 166 + 168: 19(fvec4) MatrixTimesVector 160 167 + Store 155(clip1) 168 + 169: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 31 170 170 12 12 + 171: 74(ptr) AccessChain 134(clip0) 13 + 172: 16(float) Load 171 + 173: 19(fvec4) Load 134(clip0) + 174: 19(fvec4) CompositeConstruct 172 172 172 172 + 175: 19(fvec4) FDiv 173 174 + Store 134(clip0) 175 + 176: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 31 177 177 12 12 + 178: 74(ptr) AccessChain 155(clip1) 13 + 179: 16(float) Load 178 + 180: 19(fvec4) Load 155(clip1) + 181: 19(fvec4) CompositeConstruct 179 179 179 179 + 182: 19(fvec4) FDiv 180 181 + Store 155(clip1) 182 + 183: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 31 184 184 12 12 + 187: 186(ptr) AccessChain 120(ubo) 185 + 188: 95(fvec2) Load 187 + 189: 19(fvec4) Load 134(clip0) + 190: 95(fvec2) VectorShuffle 189 189 0 1 + 191: 95(fvec2) FMul 190 188 + 192: 74(ptr) AccessChain 134(clip0) 12 + 193: 16(float) CompositeExtract 191 0 + Store 192 193 + 194: 74(ptr) AccessChain 134(clip0) 35 + 195: 16(float) CompositeExtract 191 1 + Store 194 195 + 196: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 31 197 197 12 12 + 198: 186(ptr) AccessChain 120(ubo) 185 + 199: 95(fvec2) Load 198 + 200: 19(fvec4) Load 155(clip1) + 201: 95(fvec2) VectorShuffle 200 200 0 1 + 202: 95(fvec2) FMul 201 199 + 203: 74(ptr) AccessChain 155(clip1) 12 + 204: 16(float) CompositeExtract 202 0 + Store 203 204 + 205: 74(ptr) AccessChain 155(clip1) 35 + 206: 16(float) CompositeExtract 202 1 + Store 205 206 + 207: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 31 208 208 12 12 + 209: 19(fvec4) Load 134(clip0) + 210: 19(fvec4) Load 155(clip1) + 211: 16(float) ExtInst 3(GLSL.std.450) 67(Distance) 209 210 + 214: 213(ptr) AccessChain 120(ubo) 212 + 215: 16(float) Load 214 + 216: 16(float) FDiv 211 215 + 218: 213(ptr) AccessChain 120(ubo) 217 + 219: 16(float) Load 218 + 220: 16(float) FMul 216 219 + 223: 16(float) ExtInst 3(GLSL.std.450) 43(FClamp) 220 221 222 + ReturnValue 223 FunctionEnd + Line 1 81 19 51(frustumCheck(): 46(bool) Function None 49 - 54: Label - 207(pos): 28(ptr) Variable Function - 276(i): 275(ptr) Variable Function - 206: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 101 53 51(frustumCheck() - 211: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 208 207(pos) 42 - 237: 115(int) Load 234(gl_InvocationID) - 239: 238(ptr) AccessChain 230(gl_in) 237 129 - 240: 26(fvec4) Load 239 - Store 207(pos) 240 - 255: 247 Load 252(samplerHeight) - 263: 262(ptr) AccessChain 259(inUV) 129 - 264: 87(fvec2) Load 263 - 265: 26(fvec4) ImageSampleExplicitLod 255 264 Lod 136 - 266: 23(float) CompositeExtract 265 0 - 268: 193(ptr) AccessChain 112(ubo) 267 - 269: 23(float) Load 268 - 270: 23(float) FMul 266 269 - 271: 66(ptr) AccessChain 207(pos) 19 - 272: 23(float) Load 271 - 273: 23(float) FSub 272 270 - 274: 66(ptr) AccessChain 207(pos) 19 - Store 274 273 - 280: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 277 276(i) 42 - Store 276(i) 129 - Branch 281 - 281: Label - LoopMerge 283 284 None - Branch 285 - 285: Label - 286: 115(int) Load 276(i) - 288: 46(bool) SLessThan 286 169 - BranchConditional 288 282 283 - 282: Label - 289: 26(fvec4) Load 207(pos) - 291: 115(int) Load 276(i) - 293: 292(ptr) AccessChain 112(ubo) 290 291 - 294: 26(fvec4) Load 293 - 295: 23(float) Dot 289 294 - 297: 23(float) FAdd 295 296 - 299: 46(bool) FOrdLessThan 297 136 - SelectionMerge 301 None - BranchConditional 299 300 301 - 300: Label - ReturnValue 303 - 301: Label - Branch 284 - 284: Label - 305: 115(int) Load 276(i) - 306: 115(int) IAdd 305 118 - Store 276(i) 306 - Branch 281 - 283: Label - ReturnValue 84 + 52: Label + 230(pos): 22(ptr) Variable Function + 301(i): 300(ptr) Variable Function + 226: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 101(DebugFunctionDefinition) 54 51(frustumCheck() + 227: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 54 + 228: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 31 229 229 12 12 + 233: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 231 230(pos) 42 + 259: 123(int) Load 256(gl_InvocationID) + 261: 260(ptr) AccessChain 252(gl_in) 259 138 + 262: 19(fvec4) Load 261 + Store 230(pos) 262 + 263: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 31 264 264 12 12 + 278: 270 Load 275(samplerHeight) + 286: 285(ptr) AccessChain 282(inUV) 138 + 287: 95(fvec2) Load 286 + 288: 19(fvec4) ImageSampleExplicitLod 278 287 Lod 145 + 289: 16(float) CompositeExtract 288 0 + 291: 213(ptr) AccessChain 120(ubo) 290 + 292: 16(float) Load 291 + 293: 16(float) FMul 289 292 + 294: 74(ptr) AccessChain 230(pos) 35 + 295: 16(float) Load 294 + 296: 16(float) FSub 295 293 + 297: 74(ptr) AccessChain 230(pos) 35 + Store 297 296 + 298: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 31 299 299 12 12 + 304: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 302 301(i) 42 + Store 301(i) 138 + Branch 305 + 305: Label + 309: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 54 + 310: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 31 299 299 12 12 + LoopMerge 307 308 None + Branch 311 + 311: Label + 312: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 54 + 313: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 31 299 299 12 12 + 314: 123(int) Load 301(i) + 315: 46(bool) SLessThan 314 185 + BranchConditional 315 306 307 + 306: Label + 316: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 54 + 317: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 31 318 318 12 12 + 319: 19(fvec4) Load 230(pos) + 321: 123(int) Load 301(i) + 323: 322(ptr) AccessChain 120(ubo) 320 321 + 324: 19(fvec4) Load 323 + 325: 16(float) Dot 319 324 + 327: 16(float) FAdd 325 326 + 328: 46(bool) FOrdLessThan 327 145 + SelectionMerge 330 None + BranchConditional 328 329 330 + 329: Label + 332: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 54 + 333: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 31 334 334 12 12 + ReturnValue 331 + 330: Label + Branch 308 + 308: Label + 336: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 54 + 337: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 31 299 299 12 12 + 338: 123(int) Load 301(i) + 339: 123(int) IAdd 338 126 + Store 301(i) 339 + Branch 305 + 307: Label + 340: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 54 + 341: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 31 342 342 12 12 + ReturnValue 92 FunctionEnd diff --git a/Test/baseResults/spv.debuginfo.glsl.tese.out b/Test/baseResults/spv.debuginfo.glsl.tese.out index d9d96811..1eec2ff6 100755 --- a/Test/baseResults/spv.debuginfo.glsl.tese.out +++ b/Test/baseResults/spv.debuginfo.glsl.tese.out @@ -1,421 +1,448 @@ spv.debuginfo.glsl.tese -Validation failed // Module Version 10000 // Generated by (magic number): 8000b -// Id's are bound by 315 +// Id's are bound by 335 Capability Tessellation Extension "SPV_KHR_non_semantic_info" - 1: ExtInstImport "NonSemantic.Shader.DebugInfo.100" - 2: ExtInstImport "GLSL.std.450" + 2: ExtInstImport "NonSemantic.Shader.DebugInfo.100" + 3: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint TessellationEvaluation 13 "main" 39 56 80 99 124 160 267 279 286 297 303 - ExecutionMode 13 Quads - ExecutionMode 13 SpacingEqual - ExecutionMode 13 VertexOrderCw + EntryPoint TessellationEvaluation 14 "main" 43 60 87 106 134 170 283 297 305 317 324 + ExecutionMode 14 Quads + ExecutionMode 14 SpacingEqual + ExecutionMode 14 VertexOrderCw + 1: String "" 8: String "uint" - 14: String "main" - 17: String "" - 25: String "float" - 32: String "uv1" - 41: String "inUV" - 44: String "int" - 58: String "gl_TessCoord" - 66: String "uv2" - 82: String "outUV" - 93: String "n1" - 101: String "inNormal" - 112: String "n2" - 126: String "outNormal" - 139: String "pos1" - 146: String "gl_Position" - 149: String "gl_PointSize" - 152: String "gl_CullDistance" - 156: String "gl_PerVertex" - 162: String "gl_in" - 174: String "pos2" - 187: String "pos" - 198: String "type.2d.image" - 200: String "@type.2d.image" - 204: String "type.sampled.image" - 205: String "@type.sampled.image" - 209: String "displacementMap" - 223: String "modelview" - 228: String "lightPos" - 231: String "frustumPlanes" - 233: String "tessellatedEdgeSize" - 237: String "viewportDim" - 241: String "UBO" - 245: String "ubo" - 281: String "outViewVec" - 288: String "outLightVec" - 299: String "outWorldPos" - 305: String "outEyePos" - Name 13 "main" - Name 30 "uv1" - Name 39 "inUV" - Name 56 "gl_TessCoord" - Name 64 "uv2" - Name 80 "outUV" - Name 91 "n1" - Name 99 "inNormal" - Name 110 "n2" - Name 124 "outNormal" - Name 137 "pos1" - Name 144 "gl_PerVertex" - MemberName 144(gl_PerVertex) 0 "gl_Position" - MemberName 144(gl_PerVertex) 1 "gl_PointSize" - MemberName 144(gl_PerVertex) 2 "gl_ClipDistance" - MemberName 144(gl_PerVertex) 3 "gl_CullDistance" - Name 160 "gl_in" - Name 172 "pos2" - Name 185 "pos" - Name 207 "displacementMap" - Name 221 "UBO" - MemberName 221(UBO) 0 "projection" - MemberName 221(UBO) 1 "modelview" - MemberName 221(UBO) 2 "lightPos" - MemberName 221(UBO) 3 "frustumPlanes" - MemberName 221(UBO) 4 "displacementFactor" - MemberName 221(UBO) 5 "tessellationFactor" - MemberName 221(UBO) 6 "viewportDim" - MemberName 221(UBO) 7 "tessellatedEdgeSize" - Name 243 "ubo" - Name 256 "gl_PerVertex" - MemberName 256(gl_PerVertex) 0 "gl_Position" - MemberName 256(gl_PerVertex) 1 "gl_PointSize" - MemberName 256(gl_PerVertex) 2 "gl_ClipDistance" - MemberName 256(gl_PerVertex) 3 "gl_CullDistance" - Name 267 "" - Name 279 "outViewVec" - Name 286 "outLightVec" - Name 297 "outWorldPos" - Name 303 "outEyePos" - Decorate 39(inUV) Location 1 - Decorate 56(gl_TessCoord) BuiltIn TessCoord - Decorate 80(outUV) Location 1 - Decorate 99(inNormal) Location 0 - Decorate 124(outNormal) Location 0 - MemberDecorate 144(gl_PerVertex) 0 BuiltIn Position - MemberDecorate 144(gl_PerVertex) 1 BuiltIn PointSize - MemberDecorate 144(gl_PerVertex) 2 BuiltIn ClipDistance - MemberDecorate 144(gl_PerVertex) 3 BuiltIn CullDistance - Decorate 144(gl_PerVertex) Block - Decorate 207(displacementMap) DescriptorSet 0 - Decorate 207(displacementMap) Binding 1 - Decorate 219 ArrayStride 16 - MemberDecorate 221(UBO) 0 ColMajor - MemberDecorate 221(UBO) 0 Offset 0 - MemberDecorate 221(UBO) 0 MatrixStride 16 - MemberDecorate 221(UBO) 1 ColMajor - MemberDecorate 221(UBO) 1 Offset 64 - MemberDecorate 221(UBO) 1 MatrixStride 16 - MemberDecorate 221(UBO) 2 Offset 128 - MemberDecorate 221(UBO) 3 Offset 144 - MemberDecorate 221(UBO) 4 Offset 240 - MemberDecorate 221(UBO) 5 Offset 244 - MemberDecorate 221(UBO) 6 Offset 248 - MemberDecorate 221(UBO) 7 Offset 256 - Decorate 221(UBO) Block - Decorate 243(ubo) DescriptorSet 0 - Decorate 243(ubo) Binding 0 - MemberDecorate 256(gl_PerVertex) 0 BuiltIn Position - MemberDecorate 256(gl_PerVertex) 1 BuiltIn PointSize - MemberDecorate 256(gl_PerVertex) 2 BuiltIn ClipDistance - MemberDecorate 256(gl_PerVertex) 3 BuiltIn CullDistance - Decorate 256(gl_PerVertex) Block - Decorate 279(outViewVec) Location 2 - Decorate 286(outLightVec) Location 3 - Decorate 297(outWorldPos) Location 5 - Decorate 303(outEyePos) Location 4 - 3: TypeVoid - 4: TypeFunction 3 - 6: TypeInt 32 0 - 9: 6(int) Constant 32 - 10: 6(int) Constant 6 - 11: 6(int) Constant 0 - 7: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 8 9 10 11 - 12: 6(int) Constant 3 - 5: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 8(Floor) 12 3 - 16: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 35(Modf) 0 17 - 19: 6(int) Constant 1 - 20: 6(int) Constant 4 - 21: 6(int) Constant 2 - 18: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 1(Round) 19 20 16 21 - 15: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 20(Cosh) 14 5 16 11 11 18 14 12 11 - 24: TypeFloat 32 - 26: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 25 9 12 11 - 27: TypeVector 24(float) 2 - 28: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 6(FSign) 26 21 - 29: TypePointer Function 27(fvec2) - 33: 6(int) Constant 56 - 31: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 32 28 16 33 11 15 20 - 35: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 31(Sqrt) - 36: TypeArray 27(fvec2) 9 - 37: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 5(SAbs) 28 9 - 38: TypePointer Input 36 - 39(inUV): 38(ptr) Variable Input - 42: 6(int) Constant 8 - 40: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(Atan) 41 37 16 33 11 18 41 39(inUV) 42 - 43: TypeInt 32 1 - 45: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 44 9 20 11 - 46: 43(int) Constant 0 - 47: TypePointer Input 27(fvec2) - 50: 43(int) Constant 1 - 53: TypeVector 24(float) 3 - 54: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 6(FSign) 26 12 - 55: TypePointer Input 53(fvec3) -56(gl_TessCoord): 55(ptr) Variable Input - 57: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(Atan) 58 54 16 33 11 18 58 56(gl_TessCoord) 42 - 59: TypePointer Input 24(float) - 67: 6(int) Constant 57 - 65: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 66 28 16 67 11 15 20 - 69: 43(int) Constant 3 - 72: 43(int) Constant 2 - 79: TypePointer Output 27(fvec2) - 80(outUV): 79(ptr) Variable Output - 83: 6(int) Constant 58 - 81: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(Atan) 82 28 16 83 11 18 82 80(outUV) 42 - 90: TypePointer Function 53(fvec3) - 94: 6(int) Constant 60 - 92: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 93 54 16 94 11 15 20 - 96: TypeArray 53(fvec3) 9 - 97: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 5(SAbs) 54 9 - 98: TypePointer Input 96 - 99(inNormal): 98(ptr) Variable Input - 100: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(Atan) 101 97 16 94 11 18 101 99(inNormal) 42 - 113: 6(int) Constant 61 - 111: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 112 54 16 113 11 15 20 - 123: TypePointer Output 53(fvec3) - 124(outNormal): 123(ptr) Variable Output - 127: 6(int) Constant 62 - 125: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(Atan) 126 54 16 127 11 18 126 124(outNormal) 42 - 134: TypeVector 24(float) 4 - 135: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 6(FSign) 26 20 - 136: TypePointer Function 134(fvec4) - 140: 6(int) Constant 65 - 138: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 139 135 16 140 11 15 20 - 142: TypeArray 24(float) 19 - 143: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 5(SAbs) 26 19 -144(gl_PerVertex): TypeStruct 134(fvec4) 24(float) 142 142 - 147: 6(int) Constant 1756 - 145: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 146 135 16 19 147 11 11 12 - 150: 6(int) Constant 1774 - 148: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 149 26 16 19 150 11 11 12 - 153: 6(int) Constant 1817 - 151: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 152 143 16 19 153 11 11 12 - 154: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 152 143 16 19 153 11 11 12 - 155: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(Fract) 156 19 16 140 11 18 156 11 12 145 148 151 154 - 157: TypeArray 144(gl_PerVertex) 9 - 158: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 5(SAbs) 155 9 - 159: TypePointer Input 157 - 160(gl_in): 159(ptr) Variable Input - 161: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(Atan) 162 158 16 140 11 18 162 160(gl_in) 42 - 163: TypePointer Input 134(fvec4) - 175: 6(int) Constant 66 - 173: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 174 135 16 175 11 15 20 - 188: 6(int) Constant 67 - 186: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 187 135 16 188 11 15 20 - 196: TypeImage 24(float) 2D sampled format:Unknown - 199: 6(int) Constant 69 - 201: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 0(Unknown) - 197: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(Fract) 198 11 16 199 11 18 200 201 12 - 202: TypeSampledImage 196 - 203: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(Fract) 204 11 16 199 11 18 205 201 12 - 206: TypePointer UniformConstant 202 -207(displacementMap): 206(ptr) Variable UniformConstant - 208: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(Atan) 209 203 16 199 11 18 209 207(displacementMap) 42 - 212: 24(float) Constant 0 - 215: TypeMatrix 134(fvec4) 4 - 217: TypeBool - 218: 217(bool) ConstantTrue - 216: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 108 135 20 218 - 219: TypeArray 134(fvec4) 10 - 220: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 5(SAbs) 135 10 - 221(UBO): TypeStruct 215 215 134(fvec4) 219 24(float) 24(float) 27(fvec2) 24(float) - 224: 6(int) Constant 30 - 225: 6(int) Constant 7 - 222: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 223 216 16 224 225 11 11 12 - 226: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 223 216 16 224 225 11 11 12 - 229: 6(int) Constant 31 - 227: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 228 135 16 229 225 11 11 12 - 230: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 231 220 16 9 225 11 11 12 - 234: 6(int) Constant 36 - 232: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 233 26 16 234 42 11 11 12 - 235: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 233 26 16 234 42 11 11 12 - 238: 6(int) Constant 35 - 236: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 237 28 16 238 225 11 11 12 - 239: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 233 26 16 234 42 11 11 12 - 240: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(Fract) 241 19 16 199 11 18 241 11 12 222 226 227 230 232 235 236 239 - 242: TypePointer Uniform 221(UBO) - 243(ubo): 242(ptr) Variable Uniform - 244: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(Atan) 245 240 16 199 11 18 245 243(ubo) 42 - 246: 43(int) Constant 4 - 247: TypePointer Uniform 24(float) - 251: TypePointer Function 24(float) -256(gl_PerVertex): TypeStruct 134(fvec4) 24(float) 142 142 - 258: 6(int) Constant 165 - 257: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 146 135 16 19 258 11 11 12 - 260: 6(int) Constant 183 - 259: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 149 26 16 19 260 11 11 12 - 262: 6(int) Constant 226 - 261: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 152 143 16 19 262 11 11 12 - 263: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 152 143 16 19 262 11 11 12 - 265: 6(int) Constant 71 - 264: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(Fract) 156 19 16 265 11 18 156 11 12 257 259 261 263 - 266: TypePointer Output 256(gl_PerVertex) - 267: 266(ptr) Variable Output - 268: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(Atan) 17 264 16 265 11 18 17 267 42 - 269: TypePointer Uniform 215 - 277: TypePointer Output 134(fvec4) - 279(outViewVec): 123(ptr) Variable Output - 282: 6(int) Constant 74 - 280: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(Atan) 281 54 16 282 11 18 281 279(outViewVec) 42 -286(outLightVec): 123(ptr) Variable Output - 289: 6(int) Constant 75 - 287: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(Atan) 288 54 16 289 11 18 288 286(outLightVec) 42 - 290: TypePointer Uniform 134(fvec4) -297(outWorldPos): 123(ptr) Variable Output - 300: 6(int) Constant 76 - 298: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(Atan) 299 54 16 300 11 18 299 297(outWorldPos) 42 - 303(outEyePos): 123(ptr) Variable Output - 306: 6(int) Constant 77 - 304: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(Atan) 305 54 16 306 11 18 305 303(outEyePos) 42 - 13(main): 3 Function None 4 - 22: Label - 30(uv1): 29(ptr) Variable Function - 64(uv2): 29(ptr) Variable Function - 91(n1): 90(ptr) Variable Function - 110(n2): 90(ptr) Variable Function - 137(pos1): 136(ptr) Variable Function - 172(pos2): 136(ptr) Variable Function - 185(pos): 136(ptr) Variable Function - 23: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 101 15 13(main) - 34: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 31 30(uv1) 35 - 48: 47(ptr) AccessChain 39(inUV) 46 - 49: 27(fvec2) Load 48 - 51: 47(ptr) AccessChain 39(inUV) 50 - 52: 27(fvec2) Load 51 - 60: 59(ptr) AccessChain 56(gl_TessCoord) 11 - 61: 24(float) Load 60 - 62: 27(fvec2) CompositeConstruct 61 61 - 63: 27(fvec2) ExtInst 2(GLSL.std.450) 46(FMix) 49 52 62 - Store 30(uv1) 63 - 68: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 65 64(uv2) 35 - 70: 47(ptr) AccessChain 39(inUV) 69 - 71: 27(fvec2) Load 70 - 73: 47(ptr) AccessChain 39(inUV) 72 - 74: 27(fvec2) Load 73 - 75: 59(ptr) AccessChain 56(gl_TessCoord) 11 - 76: 24(float) Load 75 - 77: 27(fvec2) CompositeConstruct 76 76 - 78: 27(fvec2) ExtInst 2(GLSL.std.450) 46(FMix) 71 74 77 - Store 64(uv2) 78 - 84: 27(fvec2) Load 30(uv1) - 85: 27(fvec2) Load 64(uv2) - 86: 59(ptr) AccessChain 56(gl_TessCoord) 19 - 87: 24(float) Load 86 - 88: 27(fvec2) CompositeConstruct 87 87 - 89: 27(fvec2) ExtInst 2(GLSL.std.450) 46(FMix) 84 85 88 - Store 80(outUV) 89 - 95: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 92 91(n1) 35 - 102: 55(ptr) AccessChain 99(inNormal) 46 - 103: 53(fvec3) Load 102 - 104: 55(ptr) AccessChain 99(inNormal) 50 - 105: 53(fvec3) Load 104 - 106: 59(ptr) AccessChain 56(gl_TessCoord) 11 - 107: 24(float) Load 106 - 108: 53(fvec3) CompositeConstruct 107 107 107 - 109: 53(fvec3) ExtInst 2(GLSL.std.450) 46(FMix) 103 105 108 - Store 91(n1) 109 - 114: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 111 110(n2) 35 - 115: 55(ptr) AccessChain 99(inNormal) 69 - 116: 53(fvec3) Load 115 - 117: 55(ptr) AccessChain 99(inNormal) 72 - 118: 53(fvec3) Load 117 - 119: 59(ptr) AccessChain 56(gl_TessCoord) 11 - 120: 24(float) Load 119 - 121: 53(fvec3) CompositeConstruct 120 120 120 - 122: 53(fvec3) ExtInst 2(GLSL.std.450) 46(FMix) 116 118 121 - Store 110(n2) 122 - 128: 53(fvec3) Load 91(n1) - 129: 53(fvec3) Load 110(n2) - 130: 59(ptr) AccessChain 56(gl_TessCoord) 19 - 131: 24(float) Load 130 - 132: 53(fvec3) CompositeConstruct 131 131 131 - 133: 53(fvec3) ExtInst 2(GLSL.std.450) 46(FMix) 128 129 132 - Store 124(outNormal) 133 - 141: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 138 137(pos1) 35 - 164: 163(ptr) AccessChain 160(gl_in) 46 46 - 165: 134(fvec4) Load 164 - 166: 163(ptr) AccessChain 160(gl_in) 50 46 - 167: 134(fvec4) Load 166 - 168: 59(ptr) AccessChain 56(gl_TessCoord) 11 - 169: 24(float) Load 168 - 170: 134(fvec4) CompositeConstruct 169 169 169 169 - 171: 134(fvec4) ExtInst 2(GLSL.std.450) 46(FMix) 165 167 170 - Store 137(pos1) 171 - 176: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 173 172(pos2) 35 - 177: 163(ptr) AccessChain 160(gl_in) 69 46 - 178: 134(fvec4) Load 177 - 179: 163(ptr) AccessChain 160(gl_in) 72 46 - 180: 134(fvec4) Load 179 - 181: 59(ptr) AccessChain 56(gl_TessCoord) 11 - 182: 24(float) Load 181 - 183: 134(fvec4) CompositeConstruct 182 182 182 182 - 184: 134(fvec4) ExtInst 2(GLSL.std.450) 46(FMix) 178 180 183 - Store 172(pos2) 184 - 189: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 186 185(pos) 35 - 190: 134(fvec4) Load 137(pos1) - 191: 134(fvec4) Load 172(pos2) - 192: 59(ptr) AccessChain 56(gl_TessCoord) 19 - 193: 24(float) Load 192 - 194: 134(fvec4) CompositeConstruct 193 193 193 193 - 195: 134(fvec4) ExtInst 2(GLSL.std.450) 46(FMix) 190 191 194 - Store 185(pos) 195 - 210: 202 Load 207(displacementMap) - 211: 27(fvec2) Load 80(outUV) - 213: 134(fvec4) ImageSampleExplicitLod 210 211 Lod 212 - 214: 24(float) CompositeExtract 213 0 - 248: 247(ptr) AccessChain 243(ubo) 246 - 249: 24(float) Load 248 - 250: 24(float) FMul 214 249 - 252: 251(ptr) AccessChain 185(pos) 19 - 253: 24(float) Load 252 - 254: 24(float) FSub 253 250 - 255: 251(ptr) AccessChain 185(pos) 19 - Store 255 254 - 270: 269(ptr) AccessChain 243(ubo) 46 - 271: 215 Load 270 - 272: 269(ptr) AccessChain 243(ubo) 50 - 273: 215 Load 272 - 274: 215 MatrixTimesMatrix 271 273 - 275: 134(fvec4) Load 185(pos) - 276: 134(fvec4) MatrixTimesVector 274 275 - 278: 277(ptr) AccessChain 267 46 - Store 278 276 - 283: 134(fvec4) Load 185(pos) - 284: 53(fvec3) VectorShuffle 283 283 0 1 2 - 285: 53(fvec3) FNegate 284 - Store 279(outViewVec) 285 - 291: 290(ptr) AccessChain 243(ubo) 72 - 292: 134(fvec4) Load 291 - 293: 53(fvec3) VectorShuffle 292 292 0 1 2 - 294: 53(fvec3) Load 279(outViewVec) - 295: 53(fvec3) FAdd 293 294 - 296: 53(fvec3) ExtInst 2(GLSL.std.450) 69(Normalize) 295 - Store 286(outLightVec) 296 - 301: 134(fvec4) Load 185(pos) - 302: 53(fvec3) VectorShuffle 301 301 0 1 2 - Store 297(outWorldPos) 302 - 307: 269(ptr) AccessChain 243(ubo) 50 - 308: 215 Load 307 - 309: 134(fvec4) Load 185(pos) - 310: 134(fvec4) MatrixTimesVector 308 309 - 311: 24(float) CompositeExtract 310 0 - 312: 24(float) CompositeExtract 310 1 - 313: 24(float) CompositeExtract 310 2 - 314: 53(fvec3) CompositeConstruct 311 312 313 - Store 303(outEyePos) 314 + 16: String "main" + 19: String "// OpModuleProcessed auto-map-locations +// OpModuleProcessed auto-map-bindings +// OpModuleProcessed client vulkan100 +// OpModuleProcessed target-env vulkan1.0 +// OpModuleProcessed keep-uncalled +// OpModuleProcessed entry-point main +#line 1 +" + 30: String "float" + 37: String "uv1" + 45: String "inUV" + 48: String "int" + 62: String "gl_TessCoord" + 72: String "uv2" + 89: String "outUV" + 101: String "n1" + 108: String "inNormal" + 121: String "n2" + 136: String "outNormal" + 150: String "pos1" + 156: String "gl_Position" + 159: String "gl_PointSize" + 162: String "gl_CullDistance" + 166: String "gl_PerVertex" + 172: String "gl_in" + 186: String "pos2" + 200: String "pos" + 212: String "type.2d.image" + 213: String "@type.2d.image" + 217: String "type.sampled.image" + 218: String "@type.sampled.image" + 222: String "displacementMap" + 231: String "bool" + 238: String "modelview" + 243: String "lightPos" + 246: String "frustumPlanes" + 248: String "tessellatedEdgeSize" + 252: String "viewportDim" + 256: String "UBO" + 260: String "ubo" + 299: String "outViewVec" + 307: String "outLightVec" + 319: String "outWorldPos" + 326: String "outEyePos" + Name 14 "main" + Name 35 "uv1" + Name 43 "inUV" + Name 60 "gl_TessCoord" + Name 70 "uv2" + Name 87 "outUV" + Name 99 "n1" + Name 106 "inNormal" + Name 119 "n2" + Name 134 "outNormal" + Name 148 "pos1" + Name 154 "gl_PerVertex" + MemberName 154(gl_PerVertex) 0 "gl_Position" + MemberName 154(gl_PerVertex) 1 "gl_PointSize" + MemberName 154(gl_PerVertex) 2 "gl_ClipDistance" + MemberName 154(gl_PerVertex) 3 "gl_CullDistance" + Name 170 "gl_in" + Name 184 "pos2" + Name 198 "pos" + Name 220 "displacementMap" + Name 236 "UBO" + MemberName 236(UBO) 0 "projection" + MemberName 236(UBO) 1 "modelview" + MemberName 236(UBO) 2 "lightPos" + MemberName 236(UBO) 3 "frustumPlanes" + MemberName 236(UBO) 4 "displacementFactor" + MemberName 236(UBO) 5 "tessellationFactor" + MemberName 236(UBO) 6 "viewportDim" + MemberName 236(UBO) 7 "tessellatedEdgeSize" + Name 258 "ubo" + Name 273 "gl_PerVertex" + MemberName 273(gl_PerVertex) 0 "gl_Position" + MemberName 273(gl_PerVertex) 1 "gl_PointSize" + MemberName 273(gl_PerVertex) 2 "gl_ClipDistance" + MemberName 273(gl_PerVertex) 3 "gl_CullDistance" + Name 283 "" + Name 297 "outViewVec" + Name 305 "outLightVec" + Name 317 "outWorldPos" + Name 324 "outEyePos" + Decorate 43(inUV) Location 1 + Decorate 60(gl_TessCoord) BuiltIn TessCoord + Decorate 87(outUV) Location 1 + Decorate 106(inNormal) Location 0 + Decorate 134(outNormal) Location 0 + MemberDecorate 154(gl_PerVertex) 0 BuiltIn Position + MemberDecorate 154(gl_PerVertex) 1 BuiltIn PointSize + MemberDecorate 154(gl_PerVertex) 2 BuiltIn ClipDistance + MemberDecorate 154(gl_PerVertex) 3 BuiltIn CullDistance + Decorate 154(gl_PerVertex) Block + Decorate 220(displacementMap) DescriptorSet 0 + Decorate 220(displacementMap) Binding 1 + Decorate 234 ArrayStride 16 + MemberDecorate 236(UBO) 0 ColMajor + MemberDecorate 236(UBO) 0 Offset 0 + MemberDecorate 236(UBO) 0 MatrixStride 16 + MemberDecorate 236(UBO) 1 ColMajor + MemberDecorate 236(UBO) 1 Offset 64 + MemberDecorate 236(UBO) 1 MatrixStride 16 + MemberDecorate 236(UBO) 2 Offset 128 + MemberDecorate 236(UBO) 3 Offset 144 + MemberDecorate 236(UBO) 4 Offset 240 + MemberDecorate 236(UBO) 5 Offset 244 + MemberDecorate 236(UBO) 6 Offset 248 + MemberDecorate 236(UBO) 7 Offset 256 + Decorate 236(UBO) Block + Decorate 258(ubo) DescriptorSet 0 + Decorate 258(ubo) Binding 0 + MemberDecorate 273(gl_PerVertex) 0 BuiltIn Position + MemberDecorate 273(gl_PerVertex) 1 BuiltIn PointSize + MemberDecorate 273(gl_PerVertex) 2 BuiltIn ClipDistance + MemberDecorate 273(gl_PerVertex) 3 BuiltIn CullDistance + Decorate 273(gl_PerVertex) Block + Decorate 297(outViewVec) Location 2 + Decorate 305(outLightVec) Location 3 + Decorate 317(outWorldPos) Location 5 + Decorate 324(outEyePos) Location 4 + 4: TypeVoid + 5: TypeFunction 4 + 7: TypeInt 32 0 + 10: 7(int) Constant 32 + 11: 7(int) Constant 6 + 12: 7(int) Constant 0 + 9: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 8 10 11 12 + 13: 7(int) Constant 3 + 6: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 8(DebugTypeFunction) 13 4 + 18: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 35(DebugSource) 1 19 + 20: 7(int) Constant 53 + 22: 7(int) Constant 1 + 23: 7(int) Constant 4 + 24: 7(int) Constant 2 + 21: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 1(DebugCompilationUnit) 22 23 18 24 + 17: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 20(DebugFunction) 16 6 18 20 12 21 16 13 20 + 28: 7(int) Constant 56 + 29: TypeFloat 32 + 31: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 30 10 13 12 + 32: TypeVector 29(float) 2 + 33: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 31 24 + 34: TypePointer Function 32(fvec2) + 36: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 37 33 18 28 12 17 23 + 39: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 31(DebugExpression) + 40: TypeArray 32(fvec2) 10 + 41: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 33 10 + 42: TypePointer Input 40 + 43(inUV): 42(ptr) Variable Input + 46: 7(int) Constant 8 + 44: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 45 41 18 28 12 21 45 43(inUV) 46 + 47: TypeInt 32 1 + 49: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 48 10 23 12 + 50: 47(int) Constant 0 + 51: TypePointer Input 32(fvec2) + 54: 47(int) Constant 1 + 57: TypeVector 29(float) 3 + 58: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 31 13 + 59: TypePointer Input 57(fvec3) +60(gl_TessCoord): 59(ptr) Variable Input + 61: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 62 58 18 28 12 21 62 60(gl_TessCoord) 46 + 63: TypePointer Input 29(float) + 69: 7(int) Constant 57 + 71: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 72 33 18 69 12 17 23 + 74: 47(int) Constant 3 + 77: 47(int) Constant 2 + 85: 7(int) Constant 58 + 86: TypePointer Output 32(fvec2) + 87(outUV): 86(ptr) Variable Output + 88: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 89 33 18 85 12 21 89 87(outUV) 46 + 97: 7(int) Constant 60 + 98: TypePointer Function 57(fvec3) + 100: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 101 58 18 97 12 17 23 + 103: TypeArray 57(fvec3) 10 + 104: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 58 10 + 105: TypePointer Input 103 + 106(inNormal): 105(ptr) Variable Input + 107: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 108 104 18 97 12 21 108 106(inNormal) 46 + 118: 7(int) Constant 61 + 120: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 121 58 18 118 12 17 23 + 132: 7(int) Constant 62 + 133: TypePointer Output 57(fvec3) + 134(outNormal): 133(ptr) Variable Output + 135: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 136 58 18 132 12 21 136 134(outNormal) 46 + 144: 7(int) Constant 65 + 145: TypeVector 29(float) 4 + 146: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 31 23 + 147: TypePointer Function 145(fvec4) + 149: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 150 146 18 144 12 17 23 + 152: TypeArray 29(float) 22 + 153: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 31 22 +154(gl_PerVertex): TypeStruct 145(fvec4) 29(float) 152 152 + 157: 7(int) Constant 1756 + 155: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 156 146 18 22 157 12 12 13 + 160: 7(int) Constant 1774 + 158: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 159 31 18 22 160 12 12 13 + 163: 7(int) Constant 1817 + 161: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 162 153 18 22 163 12 12 13 + 164: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 162 153 18 22 163 12 12 13 + 165: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 166 22 18 144 12 21 166 12 13 155 158 161 164 + 167: TypeArray 154(gl_PerVertex) 10 + 168: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 165 10 + 169: TypePointer Input 167 + 170(gl_in): 169(ptr) Variable Input + 171: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 172 168 18 144 12 21 172 170(gl_in) 46 + 173: TypePointer Input 145(fvec4) + 183: 7(int) Constant 66 + 185: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 186 146 18 183 12 17 23 + 197: 7(int) Constant 67 + 199: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 200 146 18 197 12 17 23 + 209: 7(int) Constant 69 + 210: TypeImage 29(float) 2D sampled format:Unknown + 214: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 0(DebugInfoNone) + 211: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 212 12 18 209 12 21 213 214 13 + 215: TypeSampledImage 210 + 216: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 217 12 18 209 12 21 218 214 13 + 219: TypePointer UniformConstant 215 +220(displacementMap): 219(ptr) Variable UniformConstant + 221: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 222 216 18 209 12 21 222 220(displacementMap) 46 + 225: 29(float) Constant 0 + 228: TypeMatrix 145(fvec4) 4 + 230: TypeBool + 232: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 231 10 24 12 + 233: 230(bool) ConstantTrue + 229: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 108(DebugTypeMatrix) 146 23 233 + 234: TypeArray 145(fvec4) 11 + 235: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 146 11 + 236(UBO): TypeStruct 228 228 145(fvec4) 234 29(float) 29(float) 32(fvec2) 29(float) + 239: 7(int) Constant 30 + 240: 7(int) Constant 7 + 237: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 238 229 18 239 240 12 12 13 + 241: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 238 229 18 239 240 12 12 13 + 244: 7(int) Constant 31 + 242: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 243 146 18 244 240 12 12 13 + 245: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 246 235 18 10 240 12 12 13 + 249: 7(int) Constant 36 + 247: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 248 31 18 249 46 12 12 13 + 250: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 248 31 18 249 46 12 12 13 + 253: 7(int) Constant 35 + 251: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 252 33 18 253 240 12 12 13 + 254: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 248 31 18 249 46 12 12 13 + 255: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 256 22 18 209 12 21 256 12 13 237 241 242 245 247 250 251 254 + 257: TypePointer Uniform 236(UBO) + 258(ubo): 257(ptr) Variable Uniform + 259: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 260 255 18 209 12 21 260 258(ubo) 46 + 261: 47(int) Constant 4 + 262: TypePointer Uniform 29(float) + 266: TypePointer Function 29(float) + 272: 7(int) Constant 71 +273(gl_PerVertex): TypeStruct 145(fvec4) 29(float) 152 152 + 275: 7(int) Constant 165 + 274: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 156 146 18 22 275 12 12 13 + 277: 7(int) Constant 183 + 276: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 159 31 18 22 277 12 12 13 + 279: 7(int) Constant 226 + 278: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 162 153 18 22 279 12 12 13 + 280: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 162 153 18 22 279 12 12 13 + 281: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 166 22 18 272 12 21 166 12 13 274 276 278 280 + 282: TypePointer Output 273(gl_PerVertex) + 283: 282(ptr) Variable Output + 284: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 1 281 18 272 12 21 1 283 46 + 285: TypePointer Uniform 228 + 293: TypePointer Output 145(fvec4) + 296: 7(int) Constant 74 + 297(outViewVec): 133(ptr) Variable Output + 298: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 299 58 18 296 12 21 299 297(outViewVec) 46 + 304: 7(int) Constant 75 +305(outLightVec): 133(ptr) Variable Output + 306: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 307 58 18 304 12 21 307 305(outLightVec) 46 + 308: TypePointer Uniform 145(fvec4) + 316: 7(int) Constant 76 +317(outWorldPos): 133(ptr) Variable Output + 318: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 319 58 18 316 12 21 319 317(outWorldPos) 46 + 323: 7(int) Constant 77 + 324(outEyePos): 133(ptr) Variable Output + 325: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 326 58 18 323 12 21 326 324(outEyePos) 46 + Line 1 53 11 + 14(main): 4 Function None 5 + 15: Label + 35(uv1): 34(ptr) Variable Function + 70(uv2): 34(ptr) Variable Function + 99(n1): 98(ptr) Variable Function + 119(n2): 98(ptr) Variable Function + 148(pos1): 147(ptr) Variable Function + 184(pos2): 147(ptr) Variable Function + 198(pos): 147(ptr) Variable Function + 25: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 101(DebugFunctionDefinition) 17 14(main) + 26: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 17 + 27: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 28 28 12 12 + 38: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 36 35(uv1) 39 + 52: 51(ptr) AccessChain 43(inUV) 50 + 53: 32(fvec2) Load 52 + 55: 51(ptr) AccessChain 43(inUV) 54 + 56: 32(fvec2) Load 55 + 64: 63(ptr) AccessChain 60(gl_TessCoord) 12 + 65: 29(float) Load 64 + 66: 32(fvec2) CompositeConstruct 65 65 + 67: 32(fvec2) ExtInst 3(GLSL.std.450) 46(FMix) 53 56 66 + Store 35(uv1) 67 + 68: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 69 69 12 12 + 73: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 71 70(uv2) 39 + 75: 51(ptr) AccessChain 43(inUV) 74 + 76: 32(fvec2) Load 75 + 78: 51(ptr) AccessChain 43(inUV) 77 + 79: 32(fvec2) Load 78 + 80: 63(ptr) AccessChain 60(gl_TessCoord) 12 + 81: 29(float) Load 80 + 82: 32(fvec2) CompositeConstruct 81 81 + 83: 32(fvec2) ExtInst 3(GLSL.std.450) 46(FMix) 76 79 82 + Store 70(uv2) 83 + 84: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 85 85 12 12 + 90: 32(fvec2) Load 35(uv1) + 91: 32(fvec2) Load 70(uv2) + 92: 63(ptr) AccessChain 60(gl_TessCoord) 22 + 93: 29(float) Load 92 + 94: 32(fvec2) CompositeConstruct 93 93 + 95: 32(fvec2) ExtInst 3(GLSL.std.450) 46(FMix) 90 91 94 + Store 87(outUV) 95 + 96: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 97 97 12 12 + 102: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 100 99(n1) 39 + 109: 59(ptr) AccessChain 106(inNormal) 50 + 110: 57(fvec3) Load 109 + 111: 59(ptr) AccessChain 106(inNormal) 54 + 112: 57(fvec3) Load 111 + 113: 63(ptr) AccessChain 60(gl_TessCoord) 12 + 114: 29(float) Load 113 + 115: 57(fvec3) CompositeConstruct 114 114 114 + 116: 57(fvec3) ExtInst 3(GLSL.std.450) 46(FMix) 110 112 115 + Store 99(n1) 116 + 117: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 118 118 12 12 + 122: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 120 119(n2) 39 + 123: 59(ptr) AccessChain 106(inNormal) 74 + 124: 57(fvec3) Load 123 + 125: 59(ptr) AccessChain 106(inNormal) 77 + 126: 57(fvec3) Load 125 + 127: 63(ptr) AccessChain 60(gl_TessCoord) 12 + 128: 29(float) Load 127 + 129: 57(fvec3) CompositeConstruct 128 128 128 + 130: 57(fvec3) ExtInst 3(GLSL.std.450) 46(FMix) 124 126 129 + Store 119(n2) 130 + 131: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 132 132 12 12 + 137: 57(fvec3) Load 99(n1) + 138: 57(fvec3) Load 119(n2) + 139: 63(ptr) AccessChain 60(gl_TessCoord) 22 + 140: 29(float) Load 139 + 141: 57(fvec3) CompositeConstruct 140 140 140 + 142: 57(fvec3) ExtInst 3(GLSL.std.450) 46(FMix) 137 138 141 + Store 134(outNormal) 142 + 143: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 144 144 12 12 + 151: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 149 148(pos1) 39 + 174: 173(ptr) AccessChain 170(gl_in) 50 50 + 175: 145(fvec4) Load 174 + 176: 173(ptr) AccessChain 170(gl_in) 54 50 + 177: 145(fvec4) Load 176 + 178: 63(ptr) AccessChain 60(gl_TessCoord) 12 + 179: 29(float) Load 178 + 180: 145(fvec4) CompositeConstruct 179 179 179 179 + 181: 145(fvec4) ExtInst 3(GLSL.std.450) 46(FMix) 175 177 180 + Store 148(pos1) 181 + 182: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 183 183 12 12 + 187: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 185 184(pos2) 39 + 188: 173(ptr) AccessChain 170(gl_in) 74 50 + 189: 145(fvec4) Load 188 + 190: 173(ptr) AccessChain 170(gl_in) 77 50 + 191: 145(fvec4) Load 190 + 192: 63(ptr) AccessChain 60(gl_TessCoord) 12 + 193: 29(float) Load 192 + 194: 145(fvec4) CompositeConstruct 193 193 193 193 + 195: 145(fvec4) ExtInst 3(GLSL.std.450) 46(FMix) 189 191 194 + Store 184(pos2) 195 + 196: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 197 197 12 12 + 201: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 199 198(pos) 39 + 202: 145(fvec4) Load 148(pos1) + 203: 145(fvec4) Load 184(pos2) + 204: 63(ptr) AccessChain 60(gl_TessCoord) 22 + 205: 29(float) Load 204 + 206: 145(fvec4) CompositeConstruct 205 205 205 205 + 207: 145(fvec4) ExtInst 3(GLSL.std.450) 46(FMix) 202 203 206 + Store 198(pos) 207 + 208: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 209 209 12 12 + 223: 215 Load 220(displacementMap) + 224: 32(fvec2) Load 87(outUV) + 226: 145(fvec4) ImageSampleExplicitLod 223 224 Lod 225 + 227: 29(float) CompositeExtract 226 0 + 263: 262(ptr) AccessChain 258(ubo) 261 + 264: 29(float) Load 263 + 265: 29(float) FMul 227 264 + 267: 266(ptr) AccessChain 198(pos) 22 + 268: 29(float) Load 267 + 269: 29(float) FSub 268 265 + 270: 266(ptr) AccessChain 198(pos) 22 + Store 270 269 + 271: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 272 272 12 12 + 286: 285(ptr) AccessChain 258(ubo) 50 + 287: 228 Load 286 + 288: 285(ptr) AccessChain 258(ubo) 54 + 289: 228 Load 288 + 290: 228 MatrixTimesMatrix 287 289 + 291: 145(fvec4) Load 198(pos) + 292: 145(fvec4) MatrixTimesVector 290 291 + 294: 293(ptr) AccessChain 283 50 + Store 294 292 + 295: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 296 296 12 12 + 300: 145(fvec4) Load 198(pos) + 301: 57(fvec3) VectorShuffle 300 300 0 1 2 + 302: 57(fvec3) FNegate 301 + Store 297(outViewVec) 302 + 303: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 304 304 12 12 + 309: 308(ptr) AccessChain 258(ubo) 77 + 310: 145(fvec4) Load 309 + 311: 57(fvec3) VectorShuffle 310 310 0 1 2 + 312: 57(fvec3) Load 297(outViewVec) + 313: 57(fvec3) FAdd 311 312 + 314: 57(fvec3) ExtInst 3(GLSL.std.450) 69(Normalize) 313 + Store 305(outLightVec) 314 + 315: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 316 316 12 12 + 320: 145(fvec4) Load 198(pos) + 321: 57(fvec3) VectorShuffle 320 320 0 1 2 + Store 317(outWorldPos) 321 + 322: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 323 323 12 12 + 327: 285(ptr) AccessChain 258(ubo) 54 + 328: 228 Load 327 + 329: 145(fvec4) Load 198(pos) + 330: 145(fvec4) MatrixTimesVector 328 329 + 331: 29(float) CompositeExtract 330 0 + 332: 29(float) CompositeExtract 330 1 + 333: 29(float) CompositeExtract 330 2 + 334: 57(fvec3) CompositeConstruct 331 332 333 + Store 324(outEyePos) 334 Return FunctionEnd diff --git a/Test/baseResults/spv.debuginfo.glsl.vert.out b/Test/baseResults/spv.debuginfo.glsl.vert.out index 3d5352fd..16858f3f 100755 --- a/Test/baseResults/spv.debuginfo.glsl.vert.out +++ b/Test/baseResults/spv.debuginfo.glsl.vert.out @@ -1,484 +1,544 @@ spv.debuginfo.glsl.vert -Validation failed // Module Version 10000 // Generated by (magic number): 8000b -// Id's are bound by 374 +// Id's are bound by 427 Capability Shader Extension "SPV_KHR_non_semantic_info" - 1: ExtInstImport "NonSemantic.Shader.DebugInfo.100" - 2: ExtInstImport "GLSL.std.450" + 2: ExtInstImport "NonSemantic.Shader.DebugInfo.100" + 3: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Vertex 13 "main" 30 36 40 47 55 70 247 264 269 293 307 325 359 367 + EntryPoint Vertex 14 "main" 35 40 46 52 60 76 292 310 315 340 356 373 412 421 + 1: String "" 8: String "uint" - 14: String "main" - 17: String "" - 25: String "float" - 32: String "outColor" - 38: String "inColor" - 42: String "outUV" - 49: String "inUV" - 52: String "int" - 57: String "instanceTexIndex" - 66: String "s" - 72: String "instanceRot" - 84: String "modelview" - 89: String "lightPos" - 92: String "globSpeed" - 96: String "UBO" - 100: String "ubo" - 109: String "c" - 123: String "mx" - 157: String "my" - 185: String "mz" - 201: String "rotMat" - 225: String "gRotMat" - 244: String "locPos" - 249: String "inPos" - 259: String "pos" - 266: String "instanceScale" - 271: String "instancePos" - 282: String "gl_Position" - 285: String "gl_PointSize" - 287: String "gl_CullDistance" - 290: String "gl_PerVertex" - 309: String "outNormal" - 327: String "inNormal" - 342: String "lPos" - 361: String "outLightVec" - 369: String "outViewVec" - Name 13 "main" - Name 30 "outColor" - Name 36 "inColor" - Name 40 "outUV" - Name 47 "inUV" - Name 55 "instanceTexIndex" - Name 64 "s" - Name 70 "instanceRot" - Name 82 "UBO" - MemberName 82(UBO) 0 "projection" - MemberName 82(UBO) 1 "modelview" - MemberName 82(UBO) 2 "lightPos" - MemberName 82(UBO) 3 "locSpeed" - MemberName 82(UBO) 4 "globSpeed" - Name 98 "ubo" - Name 107 "c" - Name 121 "mx" - Name 155 "my" - Name 183 "mz" - Name 199 "rotMat" - Name 223 "gRotMat" - Name 242 "locPos" - Name 247 "inPos" - Name 257 "pos" - Name 264 "instanceScale" - Name 269 "instancePos" - Name 280 "gl_PerVertex" - MemberName 280(gl_PerVertex) 0 "gl_Position" - MemberName 280(gl_PerVertex) 1 "gl_PointSize" - MemberName 280(gl_PerVertex) 2 "gl_ClipDistance" - MemberName 280(gl_PerVertex) 3 "gl_CullDistance" - Name 293 "" - Name 307 "outNormal" - Name 325 "inNormal" - Name 340 "lPos" - Name 359 "outLightVec" - Name 367 "outViewVec" - Decorate 30(outColor) Location 1 - Decorate 36(inColor) Location 3 - Decorate 40(outUV) Location 2 - Decorate 47(inUV) Location 2 - Decorate 55(instanceTexIndex) Location 7 - Decorate 70(instanceRot) Location 5 - MemberDecorate 82(UBO) 0 ColMajor - MemberDecorate 82(UBO) 0 Offset 0 - MemberDecorate 82(UBO) 0 MatrixStride 16 - MemberDecorate 82(UBO) 1 ColMajor - MemberDecorate 82(UBO) 1 Offset 64 - MemberDecorate 82(UBO) 1 MatrixStride 16 - MemberDecorate 82(UBO) 2 Offset 128 - MemberDecorate 82(UBO) 3 Offset 144 - MemberDecorate 82(UBO) 4 Offset 148 - Decorate 82(UBO) Block - Decorate 98(ubo) DescriptorSet 0 - Decorate 98(ubo) Binding 0 - Decorate 247(inPos) Location 0 - Decorate 264(instanceScale) Location 6 - Decorate 269(instancePos) Location 4 - MemberDecorate 280(gl_PerVertex) 0 BuiltIn Position - MemberDecorate 280(gl_PerVertex) 1 BuiltIn PointSize - MemberDecorate 280(gl_PerVertex) 2 BuiltIn ClipDistance - MemberDecorate 280(gl_PerVertex) 3 BuiltIn CullDistance - Decorate 280(gl_PerVertex) Block - Decorate 307(outNormal) Location 0 - Decorate 325(inNormal) Location 1 - Decorate 359(outLightVec) Location 4 - Decorate 367(outViewVec) Location 3 - 3: TypeVoid - 4: TypeFunction 3 - 6: TypeInt 32 0 - 9: 6(int) Constant 32 - 10: 6(int) Constant 6 - 11: 6(int) Constant 0 - 7: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 8 9 10 11 - 12: 6(int) Constant 3 - 5: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 8(Floor) 12 3 - 16: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 35(Modf) 0 17 - 19: 6(int) Constant 1 - 20: 6(int) Constant 4 - 21: 6(int) Constant 2 - 18: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 1(Round) 19 20 16 21 - 15: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 20(Cosh) 14 5 16 11 11 18 14 12 11 - 24: TypeFloat 32 - 26: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 25 9 12 11 - 27: TypeVector 24(float) 3 - 28: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 6(FSign) 26 12 - 29: TypePointer Output 27(fvec3) - 30(outColor): 29(ptr) Variable Output - 33: 6(int) Constant 56 - 34: 6(int) Constant 8 - 31: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(Atan) 32 28 16 33 11 18 32 30(outColor) 34 - 35: TypePointer Input 27(fvec3) - 36(inColor): 35(ptr) Variable Input - 37: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(Atan) 38 28 16 33 11 18 38 36(inColor) 34 - 40(outUV): 29(ptr) Variable Output - 43: 6(int) Constant 57 - 41: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(Atan) 42 28 16 43 11 18 42 40(outUV) 34 - 44: TypeVector 24(float) 2 - 45: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 6(FSign) 26 21 - 46: TypePointer Input 44(fvec2) - 47(inUV): 46(ptr) Variable Input - 48: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(Atan) 49 45 16 43 11 18 49 47(inUV) 34 - 51: TypeInt 32 1 - 53: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 52 9 20 11 - 54: TypePointer Input 51(int) -55(instanceTexIndex): 54(ptr) Variable Input - 56: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(Atan) 57 53 16 43 11 18 57 55(instanceTexIndex) 34 - 63: TypePointer Function 24(float) - 67: 6(int) Constant 62 - 65: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 66 26 16 67 11 15 20 - 69: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 31(Sqrt) - 70(instanceRot): 35(ptr) Variable Input - 71: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(Atan) 72 28 16 67 11 18 72 70(instanceRot) 34 - 73: TypePointer Input 24(float) - 76: TypeVector 24(float) 4 - 77: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 6(FSign) 26 20 - 78: TypeMatrix 76(fvec4) 4 - 80: TypeBool - 81: 80(bool) ConstantTrue - 79: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 108 77 20 81 - 82(UBO): TypeStruct 78 78 76(fvec4) 24(float) 24(float) - 85: 6(int) Constant 42 - 86: 6(int) Constant 7 - 83: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 84 79 16 85 86 11 11 12 - 87: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 84 79 16 85 86 11 11 12 - 90: 6(int) Constant 43 - 88: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 89 77 16 90 86 11 11 12 - 93: 6(int) Constant 45 - 91: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 92 26 16 93 34 11 11 12 - 94: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 92 26 16 93 34 11 11 12 - 95: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(Fract) 96 19 16 67 11 18 96 11 12 83 87 88 91 94 - 97: TypePointer Uniform 82(UBO) - 98(ubo): 97(ptr) Variable Uniform - 99: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(Atan) 100 95 16 67 11 18 100 98(ubo) 34 - 101: 51(int) Constant 3 - 102: TypePointer Uniform 24(float) - 110: 6(int) Constant 63 - 108: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 109 26 16 110 11 15 20 - 118: TypeMatrix 27(fvec3) 3 - 119: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 108 28 12 81 - 120: TypePointer Function 118 - 124: 6(int) Constant 65 - 122: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 123 119 16 124 11 15 20 - 126: 51(int) Constant 0 - 129: 24(float) Constant 0 - 131: TypePointer Function 27(fvec3) - 133: 51(int) Constant 1 - 139: 51(int) Constant 2 - 140: 24(float) Constant 1065353216 - 141: 27(fvec3) ConstantComposite 129 129 140 - 158: 6(int) Constant 73 - 156: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 157 119 16 158 11 15 20 - 164: 27(fvec3) ConstantComposite 129 140 129 - 186: 6(int) Constant 81 - 184: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 185 119 16 186 11 15 20 - 188: 27(fvec3) ConstantComposite 140 129 129 - 202: 6(int) Constant 85 - 200: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 201 119 16 202 11 15 20 - 211: 51(int) Constant 4 - 222: TypePointer Function 78 - 226: 6(int) Constant 90 - 224: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 225 79 16 226 11 15 20 - 231: TypePointer Function 76(fvec4) - 233: 76(fvec4) ConstantComposite 129 140 129 129 - 240: 76(fvec4) ConstantComposite 129 129 129 140 - 245: 6(int) Constant 95 - 243: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 244 77 16 245 11 15 20 - 247(inPos): 35(ptr) Variable Input - 248: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(Atan) 249 28 16 245 11 18 249 247(inPos) 34 - 260: 6(int) Constant 96 - 258: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 259 77 16 260 11 15 20 -264(instanceScale): 73(ptr) Variable Input - 265: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(Atan) 266 26 16 260 11 18 266 264(instanceScale) 34 -269(instancePos): 35(ptr) Variable Input - 270: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(Atan) 271 28 16 260 11 18 271 269(instancePos) 34 - 278: TypeArray 24(float) 19 - 279: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 5(SAbs) 26 19 -280(gl_PerVertex): TypeStruct 76(fvec4) 24(float) 278 278 - 283: 6(int) Constant 24 - 281: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 282 77 16 19 283 11 11 12 - 284: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 285 26 16 19 85 11 11 12 - 286: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 287 279 16 19 202 11 11 12 - 288: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 287 279 16 19 202 11 11 12 - 291: 6(int) Constant 98 - 289: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(Fract) 290 19 16 291 11 18 290 11 12 281 284 286 288 - 292: TypePointer Output 280(gl_PerVertex) - 293: 292(ptr) Variable Output - 294: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(Atan) 17 289 16 291 11 18 17 293 34 - 295: TypePointer Uniform 78 - 305: TypePointer Output 76(fvec4) - 307(outNormal): 29(ptr) Variable Output - 310: 6(int) Constant 99 - 308: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(Atan) 309 28 16 310 11 18 309 307(outNormal) 34 - 325(inNormal): 35(ptr) Variable Input - 326: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(Atan) 327 28 16 310 11 18 327 325(inNormal) 34 - 343: 6(int) Constant 102 - 341: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 342 28 16 343 11 15 20 - 354: TypePointer Uniform 76(fvec4) -359(outLightVec): 29(ptr) Variable Output - 362: 6(int) Constant 103 - 360: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(Atan) 361 28 16 362 11 18 361 359(outLightVec) 34 - 367(outViewVec): 29(ptr) Variable Output - 370: 6(int) Constant 104 - 368: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(Atan) 369 28 16 370 11 18 369 367(outViewVec) 34 - 13(main): 3 Function None 4 - 22: Label - 64(s): 63(ptr) Variable Function - 107(c): 63(ptr) Variable Function - 121(mx): 120(ptr) Variable Function - 155(my): 120(ptr) Variable Function - 183(mz): 120(ptr) Variable Function - 199(rotMat): 120(ptr) Variable Function - 223(gRotMat): 222(ptr) Variable Function - 242(locPos): 231(ptr) Variable Function - 257(pos): 231(ptr) Variable Function - 340(lPos): 131(ptr) Variable Function - 23: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 101 15 13(main) - 39: 27(fvec3) Load 36(inColor) - Store 30(outColor) 39 - 50: 44(fvec2) Load 47(inUV) - 58: 51(int) Load 55(instanceTexIndex) - 59: 24(float) ConvertSToF 58 - 60: 24(float) CompositeExtract 50 0 - 61: 24(float) CompositeExtract 50 1 - 62: 27(fvec3) CompositeConstruct 60 61 59 - Store 40(outUV) 62 - 68: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 65 64(s) 69 - 74: 73(ptr) AccessChain 70(instanceRot) 11 - 75: 24(float) Load 74 - 103: 102(ptr) AccessChain 98(ubo) 101 - 104: 24(float) Load 103 - 105: 24(float) FAdd 75 104 - 106: 24(float) ExtInst 2(GLSL.std.450) 13(Sin) 105 - Store 64(s) 106 - 111: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 108 107(c) 69 - 112: 73(ptr) AccessChain 70(instanceRot) 11 - 113: 24(float) Load 112 - 114: 102(ptr) AccessChain 98(ubo) 101 - 115: 24(float) Load 114 - 116: 24(float) FAdd 113 115 - 117: 24(float) ExtInst 2(GLSL.std.450) 14(Cos) 116 - Store 107(c) 117 - 125: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 122 121(mx) 69 - 127: 24(float) Load 107(c) - 128: 24(float) Load 64(s) - 130: 27(fvec3) CompositeConstruct 127 128 129 - 132: 131(ptr) AccessChain 121(mx) 126 - Store 132 130 - 134: 24(float) Load 64(s) - 135: 24(float) FNegate 134 - 136: 24(float) Load 107(c) - 137: 27(fvec3) CompositeConstruct 135 136 129 - 138: 131(ptr) AccessChain 121(mx) 133 - Store 138 137 - 142: 131(ptr) AccessChain 121(mx) 139 - Store 142 141 - 143: 73(ptr) AccessChain 70(instanceRot) 19 - 144: 24(float) Load 143 - 145: 102(ptr) AccessChain 98(ubo) 101 - 146: 24(float) Load 145 - 147: 24(float) FAdd 144 146 - 148: 24(float) ExtInst 2(GLSL.std.450) 13(Sin) 147 - Store 64(s) 148 - 149: 73(ptr) AccessChain 70(instanceRot) 19 - 150: 24(float) Load 149 - 151: 102(ptr) AccessChain 98(ubo) 101 - 152: 24(float) Load 151 - 153: 24(float) FAdd 150 152 - 154: 24(float) ExtInst 2(GLSL.std.450) 14(Cos) 153 - Store 107(c) 154 - 159: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 156 155(my) 69 - 160: 24(float) Load 107(c) - 161: 24(float) Load 64(s) - 162: 27(fvec3) CompositeConstruct 160 129 161 - 163: 131(ptr) AccessChain 155(my) 126 - Store 163 162 - 165: 131(ptr) AccessChain 155(my) 133 - Store 165 164 - 166: 24(float) Load 64(s) - 167: 24(float) FNegate 166 - 168: 24(float) Load 107(c) - 169: 27(fvec3) CompositeConstruct 167 129 168 - 170: 131(ptr) AccessChain 155(my) 139 - Store 170 169 - 171: 73(ptr) AccessChain 70(instanceRot) 21 - 172: 24(float) Load 171 - 173: 102(ptr) AccessChain 98(ubo) 101 - 174: 24(float) Load 173 - 175: 24(float) FAdd 172 174 - 176: 24(float) ExtInst 2(GLSL.std.450) 13(Sin) 175 - Store 64(s) 176 - 177: 73(ptr) AccessChain 70(instanceRot) 21 - 178: 24(float) Load 177 - 179: 102(ptr) AccessChain 98(ubo) 101 - 180: 24(float) Load 179 - 181: 24(float) FAdd 178 180 - 182: 24(float) ExtInst 2(GLSL.std.450) 14(Cos) 181 - Store 107(c) 182 - 187: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 184 183(mz) 69 - 189: 131(ptr) AccessChain 183(mz) 126 - Store 189 188 - 190: 24(float) Load 107(c) - 191: 24(float) Load 64(s) - 192: 27(fvec3) CompositeConstruct 129 190 191 - 193: 131(ptr) AccessChain 183(mz) 133 + 16: String "main" + 19: String "// OpModuleProcessed auto-map-locations +// OpModuleProcessed auto-map-bindings +// OpModuleProcessed client vulkan100 +// OpModuleProcessed target-env vulkan1.0 +// OpModuleProcessed keep-uncalled +// OpModuleProcessed entry-point main +#line 1 +" + 30: String "float" + 37: String "outColor" + 42: String "inColor" + 48: String "outUV" + 54: String "inUV" + 57: String "int" + 62: String "instanceTexIndex" + 73: String "s" + 78: String "instanceRot" + 87: String "bool" + 92: String "modelview" + 97: String "lightPos" + 100: String "globSpeed" + 104: String "UBO" + 108: String "ubo" + 119: String "c" + 134: String "mx" + 177: String "my" + 214: String "mz" + 235: String "rotMat" + 264: String "gRotMat" + 290: String "locPos" + 294: String "inPos" + 306: String "pos" + 312: String "instanceScale" + 317: String "instancePos" + 330: String "gl_Position" + 333: String "gl_PointSize" + 335: String "gl_CullDistance" + 338: String "gl_PerVertex" + 358: String "outNormal" + 375: String "inNormal" + 394: String "lPos" + 414: String "outLightVec" + 423: String "outViewVec" + Name 14 "main" + Name 35 "outColor" + Name 40 "inColor" + Name 46 "outUV" + Name 52 "inUV" + Name 60 "instanceTexIndex" + Name 71 "s" + Name 76 "instanceRot" + Name 90 "UBO" + MemberName 90(UBO) 0 "projection" + MemberName 90(UBO) 1 "modelview" + MemberName 90(UBO) 2 "lightPos" + MemberName 90(UBO) 3 "locSpeed" + MemberName 90(UBO) 4 "globSpeed" + Name 106 "ubo" + Name 117 "c" + Name 132 "mx" + Name 175 "my" + Name 212 "mz" + Name 233 "rotMat" + Name 262 "gRotMat" + Name 288 "locPos" + Name 292 "inPos" + Name 304 "pos" + Name 310 "instanceScale" + Name 315 "instancePos" + Name 328 "gl_PerVertex" + MemberName 328(gl_PerVertex) 0 "gl_Position" + MemberName 328(gl_PerVertex) 1 "gl_PointSize" + MemberName 328(gl_PerVertex) 2 "gl_ClipDistance" + MemberName 328(gl_PerVertex) 3 "gl_CullDistance" + Name 340 "" + Name 356 "outNormal" + Name 373 "inNormal" + Name 392 "lPos" + Name 412 "outLightVec" + Name 421 "outViewVec" + Decorate 35(outColor) Location 1 + Decorate 40(inColor) Location 3 + Decorate 46(outUV) Location 2 + Decorate 52(inUV) Location 2 + Decorate 60(instanceTexIndex) Location 7 + Decorate 76(instanceRot) Location 5 + MemberDecorate 90(UBO) 0 ColMajor + MemberDecorate 90(UBO) 0 Offset 0 + MemberDecorate 90(UBO) 0 MatrixStride 16 + MemberDecorate 90(UBO) 1 ColMajor + MemberDecorate 90(UBO) 1 Offset 64 + MemberDecorate 90(UBO) 1 MatrixStride 16 + MemberDecorate 90(UBO) 2 Offset 128 + MemberDecorate 90(UBO) 3 Offset 144 + MemberDecorate 90(UBO) 4 Offset 148 + Decorate 90(UBO) Block + Decorate 106(ubo) DescriptorSet 0 + Decorate 106(ubo) Binding 0 + Decorate 292(inPos) Location 0 + Decorate 310(instanceScale) Location 6 + Decorate 315(instancePos) Location 4 + MemberDecorate 328(gl_PerVertex) 0 BuiltIn Position + MemberDecorate 328(gl_PerVertex) 1 BuiltIn PointSize + MemberDecorate 328(gl_PerVertex) 2 BuiltIn ClipDistance + MemberDecorate 328(gl_PerVertex) 3 BuiltIn CullDistance + Decorate 328(gl_PerVertex) Block + Decorate 356(outNormal) Location 0 + Decorate 373(inNormal) Location 1 + Decorate 412(outLightVec) Location 4 + Decorate 421(outViewVec) Location 3 + 4: TypeVoid + 5: TypeFunction 4 + 7: TypeInt 32 0 + 10: 7(int) Constant 32 + 11: 7(int) Constant 6 + 12: 7(int) Constant 0 + 9: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 8 10 11 12 + 13: 7(int) Constant 3 + 6: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 8(DebugTypeFunction) 13 4 + 18: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 35(DebugSource) 1 19 + 20: 7(int) Constant 54 + 22: 7(int) Constant 1 + 23: 7(int) Constant 4 + 24: 7(int) Constant 2 + 21: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 1(DebugCompilationUnit) 22 23 18 24 + 17: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 20(DebugFunction) 16 6 18 20 12 21 16 13 20 + 28: 7(int) Constant 56 + 29: TypeFloat 32 + 31: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 30 10 13 12 + 32: TypeVector 29(float) 3 + 33: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 31 13 + 34: TypePointer Output 32(fvec3) + 35(outColor): 34(ptr) Variable Output + 38: 7(int) Constant 8 + 36: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 37 33 18 28 12 21 37 35(outColor) 38 + 39: TypePointer Input 32(fvec3) + 40(inColor): 39(ptr) Variable Input + 41: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 42 33 18 28 12 21 42 40(inColor) 38 + 45: 7(int) Constant 57 + 46(outUV): 34(ptr) Variable Output + 47: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 48 33 18 45 12 21 48 46(outUV) 38 + 49: TypeVector 29(float) 2 + 50: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 31 24 + 51: TypePointer Input 49(fvec2) + 52(inUV): 51(ptr) Variable Input + 53: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 54 50 18 45 12 21 54 52(inUV) 38 + 56: TypeInt 32 1 + 58: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 57 10 23 12 + 59: TypePointer Input 56(int) +60(instanceTexIndex): 59(ptr) Variable Input + 61: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 62 58 18 45 12 21 62 60(instanceTexIndex) 38 + 69: 7(int) Constant 62 + 70: TypePointer Function 29(float) + 72: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 73 31 18 69 12 17 23 + 75: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 31(DebugExpression) + 76(instanceRot): 39(ptr) Variable Input + 77: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 78 33 18 69 12 21 78 76(instanceRot) 38 + 79: TypePointer Input 29(float) + 82: TypeVector 29(float) 4 + 83: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 31 23 + 84: TypeMatrix 82(fvec4) 4 + 86: TypeBool + 88: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 87 10 24 12 + 89: 86(bool) ConstantTrue + 85: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 108(DebugTypeMatrix) 83 23 89 + 90(UBO): TypeStruct 84 84 82(fvec4) 29(float) 29(float) + 93: 7(int) Constant 42 + 94: 7(int) Constant 7 + 91: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 92 85 18 93 94 12 12 13 + 95: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 92 85 18 93 94 12 12 13 + 98: 7(int) Constant 43 + 96: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 97 83 18 98 94 12 12 13 + 101: 7(int) Constant 45 + 99: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 100 31 18 101 38 12 12 13 + 102: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 100 31 18 101 38 12 12 13 + 103: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 104 22 18 69 12 21 104 12 13 91 95 96 99 102 + 105: TypePointer Uniform 90(UBO) + 106(ubo): 105(ptr) Variable Uniform + 107: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 108 103 18 69 12 21 108 106(ubo) 38 + 109: 56(int) Constant 3 + 110: TypePointer Uniform 29(float) + 116: 7(int) Constant 63 + 118: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 119 31 18 116 12 17 23 + 128: 7(int) Constant 65 + 129: TypeMatrix 32(fvec3) 3 + 130: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 108(DebugTypeMatrix) 33 13 89 + 131: TypePointer Function 129 + 133: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 134 130 18 128 12 17 23 + 136: 56(int) Constant 0 + 139: 29(float) Constant 0 + 141: TypePointer Function 32(fvec3) + 144: 7(int) Constant 66 + 145: 56(int) Constant 1 + 152: 7(int) Constant 67 + 153: 56(int) Constant 2 + 154: 29(float) Constant 1065353216 + 155: 32(fvec3) ConstantComposite 139 139 154 + 158: 7(int) Constant 70 + 166: 7(int) Constant 71 + 174: 7(int) Constant 73 + 176: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 177 130 18 174 12 17 23 + 184: 7(int) Constant 74 + 185: 32(fvec3) ConstantComposite 139 154 139 + 188: 7(int) Constant 75 + 195: 7(int) Constant 78 + 203: 7(int) Constant 79 + 211: 7(int) Constant 81 + 213: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 214 130 18 211 12 17 23 + 216: 32(fvec3) ConstantComposite 154 139 139 + 219: 7(int) Constant 82 + 225: 7(int) Constant 83 + 232: 7(int) Constant 85 + 234: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 235 130 18 232 12 17 23 + 243: 7(int) Constant 88 + 246: 56(int) Constant 4 + 252: 7(int) Constant 89 + 260: 7(int) Constant 90 + 261: TypePointer Function 84 + 263: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 264 85 18 260 12 17 23 + 269: TypePointer Function 82(fvec4) + 272: 7(int) Constant 91 + 273: 82(fvec4) ConstantComposite 139 154 139 139 + 276: 7(int) Constant 92 + 283: 7(int) Constant 93 + 284: 82(fvec4) ConstantComposite 139 139 139 154 + 287: 7(int) Constant 95 + 289: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 290 83 18 287 12 17 23 + 292(inPos): 39(ptr) Variable Input + 293: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 294 33 18 287 12 21 294 292(inPos) 38 + 303: 7(int) Constant 96 + 305: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 306 83 18 303 12 17 23 +310(instanceScale): 79(ptr) Variable Input + 311: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 312 31 18 303 12 21 312 310(instanceScale) 38 +315(instancePos): 39(ptr) Variable Input + 316: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 317 33 18 303 12 21 317 315(instancePos) 38 + 325: 7(int) Constant 98 + 326: TypeArray 29(float) 22 + 327: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 31 22 +328(gl_PerVertex): TypeStruct 82(fvec4) 29(float) 326 326 + 331: 7(int) Constant 24 + 329: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 330 83 18 22 331 12 12 13 + 332: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 333 31 18 22 93 12 12 13 + 334: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 335 327 18 22 232 12 12 13 + 336: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 335 327 18 22 232 12 12 13 + 337: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 338 22 18 325 12 21 338 12 13 329 332 334 336 + 339: TypePointer Output 328(gl_PerVertex) + 340: 339(ptr) Variable Output + 341: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 1 337 18 325 12 21 1 340 38 + 342: TypePointer Uniform 84 + 352: TypePointer Output 82(fvec4) + 355: 7(int) Constant 99 + 356(outNormal): 34(ptr) Variable Output + 357: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 358 33 18 355 12 21 358 356(outNormal) 38 + 373(inNormal): 39(ptr) Variable Input + 374: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 375 33 18 355 12 21 375 373(inNormal) 38 + 379: 7(int) Constant 101 + 391: 7(int) Constant 102 + 393: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 394 33 18 391 12 17 23 + 405: TypePointer Uniform 82(fvec4) + 411: 7(int) Constant 103 +412(outLightVec): 34(ptr) Variable Output + 413: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 414 33 18 411 12 21 414 412(outLightVec) 38 + 420: 7(int) Constant 104 + 421(outViewVec): 34(ptr) Variable Output + 422: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 423 33 18 420 12 21 423 421(outViewVec) 38 + Line 1 54 11 + 14(main): 4 Function None 5 + 15: Label + 71(s): 70(ptr) Variable Function + 117(c): 70(ptr) Variable Function + 132(mx): 131(ptr) Variable Function + 175(my): 131(ptr) Variable Function + 212(mz): 131(ptr) Variable Function + 233(rotMat): 131(ptr) Variable Function + 262(gRotMat): 261(ptr) Variable Function + 288(locPos): 269(ptr) Variable Function + 304(pos): 269(ptr) Variable Function + 392(lPos): 141(ptr) Variable Function + 25: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 101(DebugFunctionDefinition) 17 14(main) + 26: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 17 + 27: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 28 28 12 12 + 43: 32(fvec3) Load 40(inColor) + Store 35(outColor) 43 + 44: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 45 45 12 12 + 55: 49(fvec2) Load 52(inUV) + 63: 56(int) Load 60(instanceTexIndex) + 64: 29(float) ConvertSToF 63 + 65: 29(float) CompositeExtract 55 0 + 66: 29(float) CompositeExtract 55 1 + 67: 32(fvec3) CompositeConstruct 65 66 64 + Store 46(outUV) 67 + 68: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 69 69 12 12 + 74: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 72 71(s) 75 + 80: 79(ptr) AccessChain 76(instanceRot) 12 + 81: 29(float) Load 80 + 111: 110(ptr) AccessChain 106(ubo) 109 + 112: 29(float) Load 111 + 113: 29(float) FAdd 81 112 + 114: 29(float) ExtInst 3(GLSL.std.450) 13(Sin) 113 + Store 71(s) 114 + 115: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 116 116 12 12 + 120: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 118 117(c) 75 + 121: 79(ptr) AccessChain 76(instanceRot) 12 + 122: 29(float) Load 121 + 123: 110(ptr) AccessChain 106(ubo) 109 + 124: 29(float) Load 123 + 125: 29(float) FAdd 122 124 + 126: 29(float) ExtInst 3(GLSL.std.450) 14(Cos) 125 + Store 117(c) 126 + 127: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 128 128 12 12 + 135: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 133 132(mx) 75 + 137: 29(float) Load 117(c) + 138: 29(float) Load 71(s) + 140: 32(fvec3) CompositeConstruct 137 138 139 + 142: 141(ptr) AccessChain 132(mx) 136 + Store 142 140 + 143: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 144 144 12 12 + 146: 29(float) Load 71(s) + 147: 29(float) FNegate 146 + 148: 29(float) Load 117(c) + 149: 32(fvec3) CompositeConstruct 147 148 139 + 150: 141(ptr) AccessChain 132(mx) 145 + Store 150 149 + 151: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 152 152 12 12 + 156: 141(ptr) AccessChain 132(mx) 153 + Store 156 155 + 157: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 158 158 12 12 + 159: 79(ptr) AccessChain 76(instanceRot) 22 + 160: 29(float) Load 159 + 161: 110(ptr) AccessChain 106(ubo) 109 + 162: 29(float) Load 161 + 163: 29(float) FAdd 160 162 + 164: 29(float) ExtInst 3(GLSL.std.450) 13(Sin) 163 + Store 71(s) 164 + 165: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 166 166 12 12 + 167: 79(ptr) AccessChain 76(instanceRot) 22 + 168: 29(float) Load 167 + 169: 110(ptr) AccessChain 106(ubo) 109 + 170: 29(float) Load 169 + 171: 29(float) FAdd 168 170 + 172: 29(float) ExtInst 3(GLSL.std.450) 14(Cos) 171 + Store 117(c) 172 + 173: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 174 174 12 12 + 178: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 176 175(my) 75 + 179: 29(float) Load 117(c) + 180: 29(float) Load 71(s) + 181: 32(fvec3) CompositeConstruct 179 139 180 + 182: 141(ptr) AccessChain 175(my) 136 + Store 182 181 + 183: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 184 184 12 12 + 186: 141(ptr) AccessChain 175(my) 145 + Store 186 185 + 187: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 188 188 12 12 + 189: 29(float) Load 71(s) + 190: 29(float) FNegate 189 + 191: 29(float) Load 117(c) + 192: 32(fvec3) CompositeConstruct 190 139 191 + 193: 141(ptr) AccessChain 175(my) 153 Store 193 192 - 194: 24(float) Load 64(s) - 195: 24(float) FNegate 194 - 196: 24(float) Load 107(c) - 197: 27(fvec3) CompositeConstruct 129 195 196 - 198: 131(ptr) AccessChain 183(mz) 139 - Store 198 197 - 203: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 200 199(rotMat) 69 - 204: 118 Load 183(mz) - 205: 118 Load 155(my) - 206: 118 MatrixTimesMatrix 204 205 - 207: 118 Load 121(mx) - 208: 118 MatrixTimesMatrix 206 207 - Store 199(rotMat) 208 - 209: 73(ptr) AccessChain 70(instanceRot) 19 - 210: 24(float) Load 209 - 212: 102(ptr) AccessChain 98(ubo) 211 - 213: 24(float) Load 212 - 214: 24(float) FAdd 210 213 - 215: 24(float) ExtInst 2(GLSL.std.450) 13(Sin) 214 - Store 64(s) 215 - 216: 73(ptr) AccessChain 70(instanceRot) 19 - 217: 24(float) Load 216 - 218: 102(ptr) AccessChain 98(ubo) 211 - 219: 24(float) Load 218 - 220: 24(float) FAdd 217 219 - 221: 24(float) ExtInst 2(GLSL.std.450) 14(Cos) 220 - Store 107(c) 221 - 227: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 224 223(gRotMat) 69 - 228: 24(float) Load 107(c) - 229: 24(float) Load 64(s) - 230: 76(fvec4) CompositeConstruct 228 129 229 129 - 232: 231(ptr) AccessChain 223(gRotMat) 126 - Store 232 230 - 234: 231(ptr) AccessChain 223(gRotMat) 133 - Store 234 233 - 235: 24(float) Load 64(s) - 236: 24(float) FNegate 235 - 237: 24(float) Load 107(c) - 238: 76(fvec4) CompositeConstruct 236 129 237 129 - 239: 231(ptr) AccessChain 223(gRotMat) 139 - Store 239 238 - 241: 231(ptr) AccessChain 223(gRotMat) 101 - Store 241 240 - 246: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 243 242(locPos) 69 - 250: 27(fvec3) Load 247(inPos) - 251: 118 Load 199(rotMat) - 252: 27(fvec3) VectorTimesMatrix 250 251 - 253: 24(float) CompositeExtract 252 0 - 254: 24(float) CompositeExtract 252 1 - 255: 24(float) CompositeExtract 252 2 - 256: 76(fvec4) CompositeConstruct 253 254 255 140 - Store 242(locPos) 256 - 261: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 258 257(pos) 69 - 262: 76(fvec4) Load 242(locPos) - 263: 27(fvec3) VectorShuffle 262 262 0 1 2 - 267: 24(float) Load 264(instanceScale) - 268: 27(fvec3) VectorTimesScalar 263 267 - 272: 27(fvec3) Load 269(instancePos) - 273: 27(fvec3) FAdd 268 272 - 274: 24(float) CompositeExtract 273 0 - 275: 24(float) CompositeExtract 273 1 - 276: 24(float) CompositeExtract 273 2 - 277: 76(fvec4) CompositeConstruct 274 275 276 140 - Store 257(pos) 277 - 296: 295(ptr) AccessChain 98(ubo) 126 - 297: 78 Load 296 - 298: 295(ptr) AccessChain 98(ubo) 133 - 299: 78 Load 298 - 300: 78 MatrixTimesMatrix 297 299 - 301: 78 Load 223(gRotMat) - 302: 78 MatrixTimesMatrix 300 301 - 303: 76(fvec4) Load 257(pos) - 304: 76(fvec4) MatrixTimesVector 302 303 - 306: 305(ptr) AccessChain 293 126 - Store 306 304 - 311: 295(ptr) AccessChain 98(ubo) 133 - 312: 78 Load 311 - 313: 78 Load 223(gRotMat) - 314: 78 MatrixTimesMatrix 312 313 - 315: 76(fvec4) CompositeExtract 314 0 - 316: 27(fvec3) VectorShuffle 315 315 0 1 2 - 317: 76(fvec4) CompositeExtract 314 1 - 318: 27(fvec3) VectorShuffle 317 317 0 1 2 - 319: 76(fvec4) CompositeExtract 314 2 - 320: 27(fvec3) VectorShuffle 319 319 0 1 2 - 321: 118 CompositeConstruct 316 318 320 - 322: 118 Load 199(rotMat) - 323: 118 ExtInst 2(GLSL.std.450) 34(MatrixInverse) 322 - 324: 118 MatrixTimesMatrix 321 323 - 328: 27(fvec3) Load 325(inNormal) - 329: 27(fvec3) MatrixTimesVector 324 328 - Store 307(outNormal) 329 - 330: 295(ptr) AccessChain 98(ubo) 133 - 331: 78 Load 330 - 332: 27(fvec3) Load 247(inPos) - 333: 27(fvec3) Load 269(instancePos) - 334: 27(fvec3) FAdd 332 333 - 335: 24(float) CompositeExtract 334 0 - 336: 24(float) CompositeExtract 334 1 - 337: 24(float) CompositeExtract 334 2 - 338: 76(fvec4) CompositeConstruct 335 336 337 140 - 339: 76(fvec4) MatrixTimesVector 331 338 - Store 257(pos) 339 - 344: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 341 340(lPos) 69 - 345: 295(ptr) AccessChain 98(ubo) 133 - 346: 78 Load 345 - 347: 76(fvec4) CompositeExtract 346 0 - 348: 27(fvec3) VectorShuffle 347 347 0 1 2 - 349: 76(fvec4) CompositeExtract 346 1 - 350: 27(fvec3) VectorShuffle 349 349 0 1 2 - 351: 76(fvec4) CompositeExtract 346 2 - 352: 27(fvec3) VectorShuffle 351 351 0 1 2 - 353: 118 CompositeConstruct 348 350 352 - 355: 354(ptr) AccessChain 98(ubo) 139 - 356: 76(fvec4) Load 355 - 357: 27(fvec3) VectorShuffle 356 356 0 1 2 - 358: 27(fvec3) MatrixTimesVector 353 357 - Store 340(lPos) 358 - 363: 27(fvec3) Load 340(lPos) - 364: 76(fvec4) Load 257(pos) - 365: 27(fvec3) VectorShuffle 364 364 0 1 2 - 366: 27(fvec3) FSub 363 365 - Store 359(outLightVec) 366 - 371: 76(fvec4) Load 257(pos) - 372: 27(fvec3) VectorShuffle 371 371 0 1 2 - 373: 27(fvec3) FNegate 372 - Store 367(outViewVec) 373 + 194: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 195 195 12 12 + 196: 79(ptr) AccessChain 76(instanceRot) 24 + 197: 29(float) Load 196 + 198: 110(ptr) AccessChain 106(ubo) 109 + 199: 29(float) Load 198 + 200: 29(float) FAdd 197 199 + 201: 29(float) ExtInst 3(GLSL.std.450) 13(Sin) 200 + Store 71(s) 201 + 202: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 203 203 12 12 + 204: 79(ptr) AccessChain 76(instanceRot) 24 + 205: 29(float) Load 204 + 206: 110(ptr) AccessChain 106(ubo) 109 + 207: 29(float) Load 206 + 208: 29(float) FAdd 205 207 + 209: 29(float) ExtInst 3(GLSL.std.450) 14(Cos) 208 + Store 117(c) 209 + 210: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 211 211 12 12 + 215: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 213 212(mz) 75 + 217: 141(ptr) AccessChain 212(mz) 136 + Store 217 216 + 218: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 219 219 12 12 + 220: 29(float) Load 117(c) + 221: 29(float) Load 71(s) + 222: 32(fvec3) CompositeConstruct 139 220 221 + 223: 141(ptr) AccessChain 212(mz) 145 + Store 223 222 + 224: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 225 225 12 12 + 226: 29(float) Load 71(s) + 227: 29(float) FNegate 226 + 228: 29(float) Load 117(c) + 229: 32(fvec3) CompositeConstruct 139 227 228 + 230: 141(ptr) AccessChain 212(mz) 153 + Store 230 229 + 231: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 232 232 12 12 + 236: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 234 233(rotMat) 75 + 237: 129 Load 212(mz) + 238: 129 Load 175(my) + 239: 129 MatrixTimesMatrix 237 238 + 240: 129 Load 132(mx) + 241: 129 MatrixTimesMatrix 239 240 + Store 233(rotMat) 241 + 242: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 243 243 12 12 + 244: 79(ptr) AccessChain 76(instanceRot) 22 + 245: 29(float) Load 244 + 247: 110(ptr) AccessChain 106(ubo) 246 + 248: 29(float) Load 247 + 249: 29(float) FAdd 245 248 + 250: 29(float) ExtInst 3(GLSL.std.450) 13(Sin) 249 + Store 71(s) 250 + 251: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 252 252 12 12 + 253: 79(ptr) AccessChain 76(instanceRot) 22 + 254: 29(float) Load 253 + 255: 110(ptr) AccessChain 106(ubo) 246 + 256: 29(float) Load 255 + 257: 29(float) FAdd 254 256 + 258: 29(float) ExtInst 3(GLSL.std.450) 14(Cos) 257 + Store 117(c) 258 + 259: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 260 260 12 12 + 265: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 263 262(gRotMat) 75 + 266: 29(float) Load 117(c) + 267: 29(float) Load 71(s) + 268: 82(fvec4) CompositeConstruct 266 139 267 139 + 270: 269(ptr) AccessChain 262(gRotMat) 136 + Store 270 268 + 271: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 272 272 12 12 + 274: 269(ptr) AccessChain 262(gRotMat) 145 + Store 274 273 + 275: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 276 276 12 12 + 277: 29(float) Load 71(s) + 278: 29(float) FNegate 277 + 279: 29(float) Load 117(c) + 280: 82(fvec4) CompositeConstruct 278 139 279 139 + 281: 269(ptr) AccessChain 262(gRotMat) 153 + Store 281 280 + 282: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 283 283 12 12 + 285: 269(ptr) AccessChain 262(gRotMat) 109 + Store 285 284 + 286: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 287 287 12 12 + 291: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 289 288(locPos) 75 + 295: 32(fvec3) Load 292(inPos) + 296: 129 Load 233(rotMat) + 297: 32(fvec3) VectorTimesMatrix 295 296 + 298: 29(float) CompositeExtract 297 0 + 299: 29(float) CompositeExtract 297 1 + 300: 29(float) CompositeExtract 297 2 + 301: 82(fvec4) CompositeConstruct 298 299 300 154 + Store 288(locPos) 301 + 302: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 303 303 12 12 + 307: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 305 304(pos) 75 + 308: 82(fvec4) Load 288(locPos) + 309: 32(fvec3) VectorShuffle 308 308 0 1 2 + 313: 29(float) Load 310(instanceScale) + 314: 32(fvec3) VectorTimesScalar 309 313 + 318: 32(fvec3) Load 315(instancePos) + 319: 32(fvec3) FAdd 314 318 + 320: 29(float) CompositeExtract 319 0 + 321: 29(float) CompositeExtract 319 1 + 322: 29(float) CompositeExtract 319 2 + 323: 82(fvec4) CompositeConstruct 320 321 322 154 + Store 304(pos) 323 + 324: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 325 325 12 12 + 343: 342(ptr) AccessChain 106(ubo) 136 + 344: 84 Load 343 + 345: 342(ptr) AccessChain 106(ubo) 145 + 346: 84 Load 345 + 347: 84 MatrixTimesMatrix 344 346 + 348: 84 Load 262(gRotMat) + 349: 84 MatrixTimesMatrix 347 348 + 350: 82(fvec4) Load 304(pos) + 351: 82(fvec4) MatrixTimesVector 349 350 + 353: 352(ptr) AccessChain 340 136 + Store 353 351 + 354: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 355 355 12 12 + 359: 342(ptr) AccessChain 106(ubo) 145 + 360: 84 Load 359 + 361: 84 Load 262(gRotMat) + 362: 84 MatrixTimesMatrix 360 361 + 363: 82(fvec4) CompositeExtract 362 0 + 364: 32(fvec3) VectorShuffle 363 363 0 1 2 + 365: 82(fvec4) CompositeExtract 362 1 + 366: 32(fvec3) VectorShuffle 365 365 0 1 2 + 367: 82(fvec4) CompositeExtract 362 2 + 368: 32(fvec3) VectorShuffle 367 367 0 1 2 + 369: 129 CompositeConstruct 364 366 368 + 370: 129 Load 233(rotMat) + 371: 129 ExtInst 3(GLSL.std.450) 34(MatrixInverse) 370 + 372: 129 MatrixTimesMatrix 369 371 + 376: 32(fvec3) Load 373(inNormal) + 377: 32(fvec3) MatrixTimesVector 372 376 + Store 356(outNormal) 377 + 378: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 379 379 12 12 + 380: 342(ptr) AccessChain 106(ubo) 145 + 381: 84 Load 380 + 382: 32(fvec3) Load 292(inPos) + 383: 32(fvec3) Load 315(instancePos) + 384: 32(fvec3) FAdd 382 383 + 385: 29(float) CompositeExtract 384 0 + 386: 29(float) CompositeExtract 384 1 + 387: 29(float) CompositeExtract 384 2 + 388: 82(fvec4) CompositeConstruct 385 386 387 154 + 389: 82(fvec4) MatrixTimesVector 381 388 + Store 304(pos) 389 + 390: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 391 391 12 12 + 395: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 393 392(lPos) 75 + 396: 342(ptr) AccessChain 106(ubo) 145 + 397: 84 Load 396 + 398: 82(fvec4) CompositeExtract 397 0 + 399: 32(fvec3) VectorShuffle 398 398 0 1 2 + 400: 82(fvec4) CompositeExtract 397 1 + 401: 32(fvec3) VectorShuffle 400 400 0 1 2 + 402: 82(fvec4) CompositeExtract 397 2 + 403: 32(fvec3) VectorShuffle 402 402 0 1 2 + 404: 129 CompositeConstruct 399 401 403 + 406: 405(ptr) AccessChain 106(ubo) 153 + 407: 82(fvec4) Load 406 + 408: 32(fvec3) VectorShuffle 407 407 0 1 2 + 409: 32(fvec3) MatrixTimesVector 404 408 + Store 392(lPos) 409 + 410: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 411 411 12 12 + 415: 32(fvec3) Load 392(lPos) + 416: 82(fvec4) Load 304(pos) + 417: 32(fvec3) VectorShuffle 416 416 0 1 2 + 418: 32(fvec3) FSub 415 417 + Store 412(outLightVec) 418 + 419: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 420 420 12 12 + 424: 82(fvec4) Load 304(pos) + 425: 32(fvec3) VectorShuffle 424 424 0 1 2 + 426: 32(fvec3) FNegate 425 + Store 421(outViewVec) 426 Return FunctionEnd diff --git a/Test/baseResults/spv.debuginfo.hlsl.comp.out b/Test/baseResults/spv.debuginfo.hlsl.comp.out index 44bf1a7f..65bd8a17 100755 --- a/Test/baseResults/spv.debuginfo.hlsl.comp.out +++ b/Test/baseResults/spv.debuginfo.hlsl.comp.out @@ -1,1081 +1,1212 @@ spv.debuginfo.hlsl.comp -Validation failed // Module Version 10000 // Generated by (magic number): 8000b -// Id's are bound by 833 +// Id's are bound by 953 Capability Shader Extension "SPV_KHR_non_semantic_info" - 1: ExtInstImport "NonSemantic.Shader.DebugInfo.100" - 2: ExtInstImport "GLSL.std.450" + 2: ExtInstImport "NonSemantic.Shader.DebugInfo.100" + 3: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint GLCompute 5 "main" 828 - ExecutionMode 5 LocalSize 10 10 1 + EntryPoint GLCompute 6 "main" 948 + ExecutionMode 6 LocalSize 10 10 1 + 1: String "" 9: String "float" 12: String "uint" - 27: String "springForce" - 30: String "" - 39: String "p0" - 43: String "p1" - 47: String "restDist" - 56: String "@main" - 62: String "id" - 67: String "dist" - 78: String "int" - 84: String "sphereRadius" - 95: String "gravity" - 100: String "particleCount" - 103: String "UBO" - 107: String "params" - 111: String "ubo" - 133: String "index" - 155: String "bool" - 163: String "normal" - 170: String "pinned" - 174: String "Particle" - 180: String "@data" - 184: String "particleIn" - 203: String "particleOut" - 222: String "force" - 234: String "pos" - 243: String "vel" - 492: String "f" - 536: String "sphereDist" - 580: String "calculateNormals" - 584: String "PushConstants" - 588: String "pushConstants" - 591: String "$Global" - 621: String "a" - 633: String "b" - 649: String "c" - Name 5 "main" - Name 26 "springForce(vf3;vf3;f1;" - Name 23 "p0" - Name 24 "p1" - Name 25 "restDist" - Name 55 "@main(vu3;" - Name 54 "id" - Name 65 "dist" - Name 82 "UBO" - MemberName 82(UBO) 0 "deltaT" - MemberName 82(UBO) 1 "particleMass" - MemberName 82(UBO) 2 "springStiffness" - MemberName 82(UBO) 3 "damping" - MemberName 82(UBO) 4 "restDistH" - MemberName 82(UBO) 5 "restDistV" - MemberName 82(UBO) 6 "restDistD" - MemberName 82(UBO) 7 "sphereRadius" - MemberName 82(UBO) 8 "spherePos" - MemberName 82(UBO) 9 "gravity" - MemberName 82(UBO) 10 "particleCount" - Name 105 "ubo" - MemberName 105(ubo) 0 "params" - Name 113 "" - Name 131 "index" - Name 161 "Particle" - MemberName 161(Particle) 0 "pos" - MemberName 161(Particle) 1 "vel" - MemberName 161(Particle) 2 "uv" - MemberName 161(Particle) 3 "normal" - MemberName 161(Particle) 4 "pinned" - Name 178 "particleIn" - MemberName 178(particleIn) 0 "@data" - Name 186 "particleIn" - Name 199 "particleOut" - MemberName 199(particleOut) 0 "@data" - Name 206 "particleOut" - Name 220 "force" - Name 232 "pos" - Name 241 "vel" - Name 258 "param" - Name 262 "param" - Name 264 "param" - Name 282 "param" + 29: String "springForce" + 32: String "// OpModuleProcessed auto-map-locations +// OpModuleProcessed auto-map-bindings +// OpModuleProcessed entry-point main +// OpModuleProcessed client vulkan100 +// OpModuleProcessed target-env vulkan1.0 +// OpModuleProcessed keep-uncalled +// OpModuleProcessed hlsl-offsets +#line 1 +" + 41: String "p0" + 45: String "p1" + 49: String "restDist" + 59: String "@main" + 65: String "id" + 73: String "dist" + 85: String "int" + 91: String "sphereRadius" + 102: String "gravity" + 107: String "particleCount" + 110: String "UBO" + 113: String "params" + 117: String "ubo" + 142: String "index" + 165: String "bool" + 179: String "normal" + 186: String "pinned" + 190: String "Particle" + 195: String "@data" + 199: String "particleIn" + 220: String "particleOut" + 245: String "force" + 258: String "pos" + 268: String "vel" + 552: String "f" + 601: String "sphereDist" + 653: String "calculateNormals" + 657: String "PushConstants" + 660: String "pushConstants" + 663: String "$Global" + 700: String "a" + 713: String "b" + 730: String "c" + Name 6 "main" + Name 27 "springForce(vf3;vf3;f1;" + Name 24 "p0" + Name 25 "p1" + Name 26 "restDist" + Name 57 "@main(vu3;" + Name 56 "id" + Name 71 "dist" + Name 89 "UBO" + MemberName 89(UBO) 0 "deltaT" + MemberName 89(UBO) 1 "particleMass" + MemberName 89(UBO) 2 "springStiffness" + MemberName 89(UBO) 3 "damping" + MemberName 89(UBO) 4 "restDistH" + MemberName 89(UBO) 5 "restDistV" + MemberName 89(UBO) 6 "restDistD" + MemberName 89(UBO) 7 "sphereRadius" + MemberName 89(UBO) 8 "spherePos" + MemberName 89(UBO) 9 "gravity" + MemberName 89(UBO) 10 "particleCount" + Name 111 "ubo" + MemberName 111(ubo) 0 "params" + Name 119 "" + Name 140 "index" + Name 177 "Particle" + MemberName 177(Particle) 0 "pos" + MemberName 177(Particle) 1 "vel" + MemberName 177(Particle) 2 "uv" + MemberName 177(Particle) 3 "normal" + MemberName 177(Particle) 4 "pinned" + Name 193 "particleIn" + MemberName 193(particleIn) 0 "@data" + Name 201 "particleIn" + Name 216 "particleOut" + MemberName 216(particleOut) 0 "@data" + Name 222 "particleOut" + Name 243 "force" + Name 256 "pos" + Name 266 "vel" Name 286 "param" - Name 288 "param" - Name 310 "param" - Name 314 "param" - Name 316 "param" - Name 333 "param" - Name 337 "param" - Name 339 "param" - Name 368 "param" - Name 372 "param" - Name 374 "param" - Name 398 "param" - Name 402 "param" - Name 404 "param" - Name 436 "param" - Name 440 "param" - Name 442 "param" - Name 470 "param" - Name 474 "param" - Name 476 "param" - Name 490 "f" - Name 534 "sphereDist" - Name 578 "PushConstants" - MemberName 578(PushConstants) 0 "calculateNormals" - Name 586 "$Global" - MemberName 586($Global) 0 "pushConstants" - Name 593 "" - Name 602 "normal" - Name 619 "a" - Name 631 "b" - Name 647 "c" - Name 826 "id" - Name 828 "id" - Name 830 "param" - MemberDecorate 82(UBO) 0 Offset 0 - MemberDecorate 82(UBO) 1 Offset 4 - MemberDecorate 82(UBO) 2 Offset 8 - MemberDecorate 82(UBO) 3 Offset 12 - MemberDecorate 82(UBO) 4 Offset 16 - MemberDecorate 82(UBO) 5 Offset 20 - MemberDecorate 82(UBO) 6 Offset 24 - MemberDecorate 82(UBO) 7 Offset 28 - MemberDecorate 82(UBO) 8 Offset 32 - MemberDecorate 82(UBO) 9 Offset 48 - MemberDecorate 82(UBO) 10 Offset 64 - MemberDecorate 105(ubo) 0 Offset 0 - Decorate 105(ubo) Block - Decorate 113 DescriptorSet 0 - Decorate 113 Binding 2 - MemberDecorate 161(Particle) 0 Offset 0 - MemberDecorate 161(Particle) 1 Offset 16 - MemberDecorate 161(Particle) 2 Offset 32 - MemberDecorate 161(Particle) 3 Offset 48 - MemberDecorate 161(Particle) 4 Offset 64 - Decorate 176 ArrayStride 80 - MemberDecorate 178(particleIn) 0 NonWritable - MemberDecorate 178(particleIn) 0 Offset 0 - Decorate 178(particleIn) BufferBlock - Decorate 186(particleIn) DescriptorSet 0 - Decorate 186(particleIn) Binding 0 - Decorate 197 ArrayStride 80 - MemberDecorate 199(particleOut) 0 Offset 0 - Decorate 199(particleOut) BufferBlock - Decorate 206(particleOut) DescriptorSet 0 - Decorate 206(particleOut) Binding 1 - MemberDecorate 578(PushConstants) 0 Offset 0 - MemberDecorate 586($Global) 0 Offset 0 - Decorate 586($Global) Block - Decorate 593 DescriptorSet 0 - Decorate 593 Binding 3 - Decorate 828(id) BuiltIn GlobalInvocationId - 3: TypeVoid - 4: TypeFunction 3 - 7: TypeFloat 32 - 10: TypeInt 32 0 - 13: 10(int) Constant 32 - 14: 10(int) Constant 6 - 15: 10(int) Constant 0 - 11: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 12 13 14 15 - 16: 10(int) Constant 3 - 8: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 9 13 16 15 - 17: TypeVector 7(float) 3 - 18: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 6(FSign) 8 16 - 19: TypePointer Function 17(fvec3) - 20: TypePointer Function 7(float) - 21: TypeFunction 17(fvec3) 19(ptr) 19(ptr) 20(ptr) - 22: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 8(Floor) 16 18 18 18 8 - 29: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 35(Modf) 0 30 - 32: 10(int) Constant 1 - 33: 10(int) Constant 4 - 34: 10(int) Constant 5 - 31: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 1(Round) 32 33 29 34 - 28: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 20(Cosh) 27 22 29 15 15 31 27 16 15 - 38: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 39 18 29 15 15 28 33 32 - 41: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 31(Sqrt) - 44: 10(int) Constant 2 - 42: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 43 18 29 15 15 28 33 44 - 46: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 47 8 29 15 15 28 33 16 - 49: TypeVector 10(int) 3 - 50: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 6(FSign) 11 16 - 51: TypePointer Function 49(ivec3) - 52: TypeFunction 3 51(ptr) - 53: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 8(Floor) 16 3 50 - 57: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 20(Cosh) 56 53 29 15 15 31 56 16 15 - 61: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 62 50 29 15 15 57 33 32 - 68: 10(int) Constant 76 - 66: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 67 18 29 68 15 28 33 - 75: TypeVector 7(float) 4 - 76: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 6(FSign) 8 33 - 77: TypeInt 32 1 - 79: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 78 13 33 15 - 80: TypeVector 77(int) 2 - 81: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 6(FSign) 79 44 - 82(UBO): TypeStruct 7(float) 7(float) 7(float) 7(float) 7(float) 7(float) 7(float) 7(float) 75(fvec4) 75(fvec4) 80(ivec2) - 85: 10(int) Constant 48 - 86: 10(int) Constant 20 - 83: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 84 8 29 85 86 15 15 16 - 87: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 84 8 29 85 86 15 15 16 - 88: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 84 8 29 85 86 15 15 16 - 89: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 84 8 29 85 86 15 15 16 - 90: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 84 8 29 85 86 15 15 16 - 91: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 84 8 29 85 86 15 15 16 - 92: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 84 8 29 85 86 15 15 16 - 93: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 84 8 29 85 86 15 15 16 - 96: 10(int) Constant 50 - 97: 10(int) Constant 16 - 94: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 95 76 29 96 97 15 15 16 - 98: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 95 76 29 96 97 15 15 16 - 101: 10(int) Constant 51 - 99: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 100 81 29 101 86 15 15 16 - 104: 10(int) Constant 77 - 102: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(Fract) 103 32 29 104 15 31 103 15 16 83 87 88 89 90 91 92 93 94 98 99 - 105(ubo): TypeStruct 82(UBO) - 108: 10(int) Constant 56 - 109: 10(int) Constant 12 - 106: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 107 102 29 108 109 15 15 16 - 110: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(Fract) 111 32 29 104 15 31 111 15 16 106 - 112: TypePointer Uniform 105(ubo) - 113: 112(ptr) Variable Uniform - 115: 10(int) Constant 8 - 114: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(Atan) 30 110 29 104 15 31 30 113 115 - 116: 77(int) Constant 0 - 117: 77(int) Constant 2 - 118: TypePointer Uniform 7(float) - 130: TypePointer Function 10(int) - 134: 10(int) Constant 83 - 132: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 133 11 29 134 15 57 33 - 138: 77(int) Constant 10 - 139: TypePointer Uniform 77(int) - 154: TypeBool - 156: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 155 13 44 15 - 161(Particle): TypeStruct 75(fvec4) 75(fvec4) 75(fvec4) 75(fvec4) 7(float) - 164: 10(int) Constant 30 - 165: 10(int) Constant 15 - 162: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 163 76 29 164 165 15 15 16 - 166: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 163 76 29 164 165 15 15 16 - 167: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 163 76 29 164 165 15 15 16 - 168: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 163 76 29 164 165 15 15 16 - 171: 10(int) Constant 31 - 172: 10(int) Constant 14 - 169: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 170 8 29 171 172 15 15 16 - 175: 10(int) Constant 88 - 173: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(Fract) 174 32 29 175 15 31 174 15 16 162 166 167 168 169 - 176: TypeRuntimeArray 161(Particle) - 177: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 5(SAbs) 173 15 - 178(particleIn): TypeStruct 176 - 181: 10(int) Constant 35 - 182: 10(int) Constant 28 - 179: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 180 177 29 181 182 15 15 16 - 183: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(Fract) 184 32 29 175 15 31 184 15 16 179 - 185: TypePointer Uniform 178(particleIn) - 186(particleIn): 185(ptr) Variable Uniform - 187: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(Atan) 184 183 29 175 15 31 184 186(particleIn) 115 - 189: 77(int) Constant 4 - 192: 7(float) Constant 1065353216 - 193: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 155 13 44 15 - 197: TypeRuntimeArray 161(Particle) - 198: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 5(SAbs) 173 15 -199(particleOut): TypeStruct 197 - 201: 10(int) Constant 37 - 200: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 180 198 29 201 164 15 15 16 - 204: 10(int) Constant 89 - 202: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(Fract) 203 32 29 204 15 31 203 15 16 200 - 205: TypePointer Uniform 199(particleOut) -206(particleOut): 205(ptr) Variable Uniform - 207: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(Atan) 203 202 29 204 15 31 203 206(particleOut) 115 - 210: TypePointer Uniform 75(fvec4) - 215: 77(int) Constant 1 - 216: 7(float) Constant 0 - 217: 75(fvec4) ConstantComposite 216 216 216 216 - 223: 10(int) Constant 95 - 221: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 222 18 29 223 15 57 33 - 225: 77(int) Constant 9 - 235: 10(int) Constant 97 - 233: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 234 18 29 235 15 57 33 - 244: 10(int) Constant 98 - 242: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 243 18 29 244 15 57 33 - 252: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 155 13 44 15 - 276: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 155 13 44 15 - 300: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 155 13 44 15 - 309: 77(int) Constant 5 - 324: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 155 13 44 15 - 347: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 155 13 44 15 - 355: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 155 13 44 15 - 357: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 155 13 44 15 - 367: 77(int) Constant 6 - 382: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 155 13 44 15 - 386: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 155 13 44 15 - 388: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 155 13 44 15 - 416: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 155 13 44 15 - 424: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 155 13 44 15 - 426: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 155 13 44 15 - 454: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 155 13 44 15 - 458: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 155 13 44 15 - 460: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 155 13 44 15 - 482: 77(int) Constant 3 - 493: 10(int) Constant 137 - 491: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 492 18 29 493 15 57 33 - 507: 7(float) Constant 1056964608 - 537: 10(int) Constant 142 - 535: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 536 18 29 537 15 57 33 - 543: 77(int) Constant 8 - 550: 77(int) Constant 7 - 553: 7(float) Constant 1008981770 - 555: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 155 13 44 15 -578(PushConstants): TypeStruct 10(int) - 581: 10(int) Constant 67 - 582: 10(int) Constant 23 - 579: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 580 11 29 581 582 15 15 16 - 585: 10(int) Constant 151 - 583: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(Fract) 584 32 29 585 15 31 584 15 16 579 - 586($Global): TypeStruct 578(PushConstants) - 589: 10(int) Constant 71 - 587: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 588 583 29 589 165 15 15 16 - 590: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(Fract) 591 32 29 585 15 31 591 15 16 587 - 592: TypePointer Uniform 586($Global) - 593: 592(ptr) Variable Uniform - 594: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(Atan) 30 590 29 585 15 31 30 593 115 - 595: TypePointer Uniform 10(int) - 598: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 155 13 44 15 - 604: 10(int) Constant 152 - 603: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 163 18 29 604 15 57 33 - 606: 17(fvec3) ConstantComposite 216 216 216 - 609: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 155 13 44 15 - 615: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 155 13 44 15 - 622: 10(int) Constant 156 - 620: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 621 18 29 622 15 57 33 - 634: 10(int) Constant 157 - 632: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 633 18 29 634 15 57 33 - 650: 10(int) Constant 158 - 648: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 649 18 29 650 15 57 33 - 677: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 155 13 44 15 - 724: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 155 13 44 15 - 730: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 155 13 44 15 - 777: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 155 13 44 15 - 827: TypePointer Input 49(ivec3) - 828(id): 827(ptr) Variable Input - 5(main): 3 Function None 4 - 6: Label - 826(id): 51(ptr) Variable Function - 830(param): 51(ptr) Variable Function - 829: 49(ivec3) Load 828(id) - Store 826(id) 829 - 831: 49(ivec3) Load 826(id) - Store 830(param) 831 - 832: 3 FunctionCall 55(@main(vu3;) 830(param) + Name 290 "param" + Name 292 "param" + Name 315 "param" + Name 319 "param" + Name 321 "param" + Name 348 "param" + Name 352 "param" + Name 354 "param" + Name 376 "param" + Name 380 "param" + Name 382 "param" + Name 414 "param" + Name 418 "param" + Name 420 "param" + Name 447 "param" + Name 451 "param" + Name 453 "param" + Name 488 "param" + Name 492 "param" + Name 494 "param" + Name 525 "param" + Name 529 "param" + Name 531 "param" + Name 550 "f" + Name 599 "sphereDist" + Name 651 "PushConstants" + MemberName 651(PushConstants) 0 "calculateNormals" + Name 658 "$Global" + MemberName 658($Global) 0 "pushConstants" + Name 665 "" + Name 676 "normal" + Name 698 "a" + Name 711 "b" + Name 728 "c" + Name 946 "id" + Name 948 "id" + Name 950 "param" + MemberDecorate 89(UBO) 0 Offset 0 + MemberDecorate 89(UBO) 1 Offset 4 + MemberDecorate 89(UBO) 2 Offset 8 + MemberDecorate 89(UBO) 3 Offset 12 + MemberDecorate 89(UBO) 4 Offset 16 + MemberDecorate 89(UBO) 5 Offset 20 + MemberDecorate 89(UBO) 6 Offset 24 + MemberDecorate 89(UBO) 7 Offset 28 + MemberDecorate 89(UBO) 8 Offset 32 + MemberDecorate 89(UBO) 9 Offset 48 + MemberDecorate 89(UBO) 10 Offset 64 + MemberDecorate 111(ubo) 0 Offset 0 + Decorate 111(ubo) Block + Decorate 119 DescriptorSet 0 + Decorate 119 Binding 2 + MemberDecorate 177(Particle) 0 Offset 0 + MemberDecorate 177(Particle) 1 Offset 16 + MemberDecorate 177(Particle) 2 Offset 32 + MemberDecorate 177(Particle) 3 Offset 48 + MemberDecorate 177(Particle) 4 Offset 64 + Decorate 191 ArrayStride 80 + MemberDecorate 193(particleIn) 0 NonWritable + MemberDecorate 193(particleIn) 0 Offset 0 + Decorate 193(particleIn) BufferBlock + Decorate 201(particleIn) DescriptorSet 0 + Decorate 201(particleIn) Binding 0 + Decorate 214 ArrayStride 80 + MemberDecorate 216(particleOut) 0 Offset 0 + Decorate 216(particleOut) BufferBlock + Decorate 222(particleOut) DescriptorSet 0 + Decorate 222(particleOut) Binding 1 + MemberDecorate 651(PushConstants) 0 Offset 0 + MemberDecorate 658($Global) 0 Offset 0 + Decorate 658($Global) Block + Decorate 665 DescriptorSet 0 + Decorate 665 Binding 3 + Decorate 948(id) BuiltIn GlobalInvocationId + 4: TypeVoid + 5: TypeFunction 4 + 8: TypeFloat 32 + 11: TypeInt 32 0 + 14: 11(int) Constant 32 + 15: 11(int) Constant 6 + 16: 11(int) Constant 0 + 13: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 12 14 15 16 + 17: 11(int) Constant 3 + 10: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 9 14 17 16 + 18: TypeVector 8(float) 3 + 19: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 10 17 + 20: TypePointer Function 18(fvec3) + 21: TypePointer Function 8(float) + 22: TypeFunction 18(fvec3) 20(ptr) 20(ptr) 21(ptr) + 23: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 8(DebugTypeFunction) 17 19 19 19 10 + 31: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 35(DebugSource) 1 32 + 33: 11(int) Constant 75 + 35: 11(int) Constant 1 + 36: 11(int) Constant 4 + 37: 11(int) Constant 5 + 34: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 1(DebugCompilationUnit) 35 36 31 37 + 30: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 20(DebugFunction) 29 23 31 33 16 34 29 17 33 + 40: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 41 19 31 33 16 30 36 35 + 43: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 31(DebugExpression) + 46: 11(int) Constant 2 + 44: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 45 19 31 33 16 30 36 46 + 48: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 49 10 31 33 16 30 36 17 + 51: TypeVector 11(int) 3 + 52: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 13 17 + 53: TypePointer Function 51(ivec3) + 54: TypeFunction 4 53(ptr) + 55: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 8(DebugTypeFunction) 17 4 52 + 61: 11(int) Constant 82 + 60: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 20(DebugFunction) 59 55 31 61 16 34 59 17 61 + 64: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 65 52 31 61 16 60 36 35 + 70: 11(int) Constant 76 + 72: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 73 19 31 70 16 30 36 + 79: 11(int) Constant 77 + 82: TypeVector 8(float) 4 + 83: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 10 36 + 84: TypeInt 32 1 + 86: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 85 14 36 16 + 87: TypeVector 84(int) 2 + 88: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 86 46 + 89(UBO): TypeStruct 8(float) 8(float) 8(float) 8(float) 8(float) 8(float) 8(float) 8(float) 82(fvec4) 82(fvec4) 87(ivec2) + 92: 11(int) Constant 48 + 93: 11(int) Constant 20 + 90: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 91 10 31 92 93 16 16 17 + 94: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 91 10 31 92 93 16 16 17 + 95: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 91 10 31 92 93 16 16 17 + 96: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 91 10 31 92 93 16 16 17 + 97: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 91 10 31 92 93 16 16 17 + 98: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 91 10 31 92 93 16 16 17 + 99: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 91 10 31 92 93 16 16 17 + 100: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 91 10 31 92 93 16 16 17 + 103: 11(int) Constant 50 + 104: 11(int) Constant 16 + 101: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 102 83 31 103 104 16 16 17 + 105: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 102 83 31 103 104 16 16 17 + 108: 11(int) Constant 51 + 106: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 107 88 31 108 93 16 16 17 + 109: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 110 35 31 79 16 34 110 16 17 90 94 95 96 97 98 99 100 101 105 106 + 111(ubo): TypeStruct 89(UBO) + 114: 11(int) Constant 56 + 115: 11(int) Constant 12 + 112: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 113 109 31 114 115 16 16 17 + 116: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 117 35 31 79 16 34 117 16 17 112 + 118: TypePointer Uniform 111(ubo) + 119: 118(ptr) Variable Uniform + 121: 11(int) Constant 8 + 120: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 1 116 31 79 16 34 1 119 121 + 122: 84(int) Constant 0 + 123: 84(int) Constant 2 + 124: TypePointer Uniform 8(float) + 138: 11(int) Constant 83 + 139: TypePointer Function 11(int) + 141: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 142 13 31 138 16 60 36 + 146: 84(int) Constant 10 + 147: TypePointer Uniform 84(int) + 156: 11(int) Constant 84 + 164: TypeBool + 166: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 165 14 46 16 + 172: 11(int) Constant 85 + 176: 11(int) Constant 88 + 177(Particle): TypeStruct 82(fvec4) 82(fvec4) 82(fvec4) 82(fvec4) 8(float) + 180: 11(int) Constant 30 + 181: 11(int) Constant 15 + 178: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 179 83 31 180 181 16 16 17 + 182: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 179 83 31 180 181 16 16 17 + 183: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 179 83 31 180 181 16 16 17 + 184: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 179 83 31 180 181 16 16 17 + 187: 11(int) Constant 31 + 188: 11(int) Constant 14 + 185: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 186 10 31 187 188 16 16 17 + 189: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 190 35 31 176 16 34 190 16 17 178 182 183 184 185 + 191: TypeRuntimeArray 177(Particle) + 192: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 189 16 + 193(particleIn): TypeStruct 191 + 196: 11(int) Constant 35 + 197: 11(int) Constant 28 + 194: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 195 192 31 196 197 16 16 17 + 198: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 199 35 31 176 16 34 199 16 17 194 + 200: TypePointer Uniform 193(particleIn) + 201(particleIn): 200(ptr) Variable Uniform + 202: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 199 198 31 176 16 34 199 201(particleIn) 121 + 204: 84(int) Constant 4 + 207: 8(float) Constant 1065353216 + 213: 11(int) Constant 89 + 214: TypeRuntimeArray 177(Particle) + 215: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 189 16 +216(particleOut): TypeStruct 214 + 218: 11(int) Constant 37 + 217: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 195 215 31 218 180 16 16 17 + 219: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 220 35 31 213 16 34 220 16 17 217 + 221: TypePointer Uniform 216(particleOut) +222(particleOut): 221(ptr) Variable Uniform + 223: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 220 219 31 213 16 34 220 222(particleOut) 121 + 226: TypePointer Uniform 82(fvec4) + 231: 11(int) Constant 90 + 233: 84(int) Constant 1 + 234: 8(float) Constant 0 + 235: 82(fvec4) ConstantComposite 234 234 234 234 + 238: 11(int) Constant 91 + 242: 11(int) Constant 95 + 244: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 245 19 31 242 16 60 36 + 247: 84(int) Constant 9 + 255: 11(int) Constant 97 + 257: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 258 19 31 255 16 60 36 + 265: 11(int) Constant 98 + 267: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 268 19 31 265 16 60 36 + 275: 11(int) Constant 102 + 283: 11(int) Constant 103 + 300: 11(int) Constant 106 + 312: 11(int) Constant 107 + 329: 11(int) Constant 110 + 341: 11(int) Constant 111 + 347: 84(int) Constant 5 + 362: 11(int) Constant 114 + 370: 11(int) Constant 115 + 390: 11(int) Constant 118 + 406: 11(int) Constant 119 + 413: 84(int) Constant 6 + 428: 11(int) Constant 122 + 440: 11(int) Constant 123 + 461: 11(int) Constant 126 + 481: 11(int) Constant 127 + 502: 11(int) Constant 130 + 518: 11(int) Constant 131 + 539: 11(int) Constant 134 + 540: 84(int) Constant 3 + 549: 11(int) Constant 137 + 551: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 552 19 31 549 16 60 36 + 560: 11(int) Constant 138 + 568: 8(float) Constant 1056964608 + 584: 11(int) Constant 139 + 598: 11(int) Constant 142 + 600: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 601 19 31 598 16 60 36 + 607: 84(int) Constant 8 + 613: 11(int) Constant 143 + 616: 84(int) Constant 7 + 619: 8(float) Constant 1008981770 + 626: 11(int) Constant 145 + 645: 11(int) Constant 147 + 650: 11(int) Constant 151 +651(PushConstants): TypeStruct 11(int) + 654: 11(int) Constant 67 + 655: 11(int) Constant 23 + 652: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 653 13 31 654 655 16 16 17 + 656: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 657 35 31 650 16 34 657 16 17 652 + 658($Global): TypeStruct 651(PushConstants) + 661: 11(int) Constant 71 + 659: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 660 656 31 661 181 16 16 17 + 662: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 663 35 31 650 16 34 663 16 17 659 + 664: TypePointer Uniform 658($Global) + 665: 664(ptr) Variable Uniform + 666: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 1 662 31 650 16 34 1 665 121 + 667: TypePointer Uniform 11(int) + 675: 11(int) Constant 152 + 677: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 179 19 31 675 16 60 36 + 679: 18(fvec3) ConstantComposite 234 234 234 + 681: 11(int) Constant 154 + 689: 11(int) Constant 155 + 697: 11(int) Constant 156 + 699: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 700 19 31 697 16 60 36 + 710: 11(int) Constant 157 + 712: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 713 19 31 710 16 60 36 + 727: 11(int) Constant 158 + 729: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 730 19 31 727 16 60 36 + 743: 11(int) Constant 159 + 755: 11(int) Constant 161 + 767: 11(int) Constant 162 + 779: 11(int) Constant 163 + 792: 11(int) Constant 164 + 801: 11(int) Constant 165 + 813: 11(int) Constant 168 + 825: 11(int) Constant 169 + 833: 11(int) Constant 170 + 845: 11(int) Constant 171 + 858: 11(int) Constant 172 + 867: 11(int) Constant 173 + 879: 11(int) Constant 175 + 891: 11(int) Constant 176 + 900: 11(int) Constant 177 + 913: 11(int) Constant 178 + 925: 11(int) Constant 179 + 937: 11(int) Constant 182 + 947: TypePointer Input 51(ivec3) + 948(id): 947(ptr) Variable Input + Line 1 82 1 + 6(main): 4 Function None 5 + 7: Label + 946(id): 53(ptr) Variable Function + 950(param): 53(ptr) Variable Function + Line 1 82 0 + 949: 51(ivec3) Load 948(id) + Store 946(id) 949 + 951: 51(ivec3) Load 946(id) + Store 950(param) 951 + 952: 4 FunctionCall 57(@main(vu3;) 950(param) Return FunctionEnd -26(springForce(vf3;vf3;f1;): 17(fvec3) Function None 21 - 23(p0): 19(ptr) FunctionParameter - 24(p1): 19(ptr) FunctionParameter - 25(restDist): 20(ptr) FunctionParameter - 35: Label - 65(dist): 19(ptr) Variable Function - 36: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(Acosh) 28 - 37: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103 29 15 15 15 15 - 40: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 38 23(p0) 41 - 45: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 42 24(p1) 41 - 48: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 46 25(restDist) 41 - 64: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 101 28 26(springForce(vf3;vf3;f1;) - 69: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 66 65(dist) 41 - 70: 17(fvec3) Load 23(p0) - 71: 17(fvec3) Load 24(p1) - 72: 17(fvec3) FSub 70 71 - Store 65(dist) 72 - 73: 17(fvec3) Load 65(dist) - 74: 17(fvec3) ExtInst 2(GLSL.std.450) 69(Normalize) 73 - 119: 118(ptr) AccessChain 113 116 117 - 120: 7(float) Load 119 - 121: 17(fvec3) VectorTimesScalar 74 120 - 122: 17(fvec3) Load 65(dist) - 123: 7(float) ExtInst 2(GLSL.std.450) 66(Length) 122 - 124: 7(float) Load 25(restDist) - 125: 7(float) FSub 123 124 - 126: 17(fvec3) VectorTimesScalar 121 125 - ReturnValue 126 + Line 1 75 1 +27(springForce(vf3;vf3;f1;): 18(fvec3) Function None 22 + 24(p0): 20(ptr) FunctionParameter + 25(p1): 20(ptr) FunctionParameter + 26(restDist): 21(ptr) FunctionParameter + 28: Label + 71(dist): 20(ptr) Variable Function + 38: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 30 + 39: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 31 33 33 16 16 + 42: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 40 24(p0) 43 + 47: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 44 25(p1) 43 + 50: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 48 26(restDist) 43 + 67: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 101(DebugFunctionDefinition) 30 27(springForce(vf3;vf3;f1;) + 68: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 30 + 69: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 31 70 70 16 16 + 74: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 72 71(dist) 43 + 75: 18(fvec3) Load 24(p0) + 76: 18(fvec3) Load 25(p1) + 77: 18(fvec3) FSub 75 76 + Store 71(dist) 77 + 78: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 31 79 79 16 16 + 80: 18(fvec3) Load 71(dist) + 81: 18(fvec3) ExtInst 3(GLSL.std.450) 69(Normalize) 80 + 125: 124(ptr) AccessChain 119 122 123 + 126: 8(float) Load 125 + 127: 18(fvec3) VectorTimesScalar 81 126 + 128: 18(fvec3) Load 71(dist) + 129: 8(float) ExtInst 3(GLSL.std.450) 66(Length) 128 + 130: 8(float) Load 26(restDist) + 131: 8(float) FSub 129 130 + 132: 18(fvec3) VectorTimesScalar 127 131 + ReturnValue 132 FunctionEnd - 55(@main(vu3;): 3 Function None 52 - 54(id): 51(ptr) FunctionParameter + Line 1 82 1 + 57(@main(vu3;): 4 Function None 54 + 56(id): 53(ptr) FunctionParameter 58: Label - 131(index): 130(ptr) Variable Function - 220(force): 19(ptr) Variable Function - 232(pos): 19(ptr) Variable Function - 241(vel): 19(ptr) Variable Function - 258(param): 19(ptr) Variable Function - 262(param): 19(ptr) Variable Function - 264(param): 20(ptr) Variable Function - 282(param): 19(ptr) Variable Function - 286(param): 19(ptr) Variable Function - 288(param): 20(ptr) Variable Function - 310(param): 19(ptr) Variable Function - 314(param): 19(ptr) Variable Function - 316(param): 20(ptr) Variable Function - 333(param): 19(ptr) Variable Function - 337(param): 19(ptr) Variable Function - 339(param): 20(ptr) Variable Function - 368(param): 19(ptr) Variable Function - 372(param): 19(ptr) Variable Function - 374(param): 20(ptr) Variable Function - 398(param): 19(ptr) Variable Function - 402(param): 19(ptr) Variable Function - 404(param): 20(ptr) Variable Function - 436(param): 19(ptr) Variable Function - 440(param): 19(ptr) Variable Function - 442(param): 20(ptr) Variable Function - 470(param): 19(ptr) Variable Function - 474(param): 19(ptr) Variable Function - 476(param): 20(ptr) Variable Function - 490(f): 19(ptr) Variable Function - 534(sphereDist): 19(ptr) Variable Function - 602(normal): 19(ptr) Variable Function - 619(a): 19(ptr) Variable Function - 631(b): 19(ptr) Variable Function - 647(c): 19(ptr) Variable Function - 59: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(Acosh) 57 - 60: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103 29 15 15 15 15 - 63: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 61 54(id) 41 - 129: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 101 57 55(@main(vu3;) - 135: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 132 131(index) 41 - 136: 130(ptr) AccessChain 54(id) 32 - 137: 10(int) Load 136 - 140: 139(ptr) AccessChain 113 116 138 15 - 141: 77(int) Load 140 - 142: 10(int) Bitcast 141 - 143: 10(int) IMul 137 142 - 144: 130(ptr) AccessChain 54(id) 15 - 145: 10(int) Load 144 - 146: 10(int) IAdd 143 145 - Store 131(index) 146 - 147: 10(int) Load 131(index) - 148: 139(ptr) AccessChain 113 116 138 15 - 149: 77(int) Load 148 - 150: 139(ptr) AccessChain 113 116 138 32 - 151: 77(int) Load 150 - 152: 77(int) IMul 149 151 - 153: 10(int) Bitcast 152 - 157: 154(bool) UGreaterThan 147 153 - SelectionMerge 159 None - BranchConditional 157 158 159 - 158: Label + 140(index): 139(ptr) Variable Function + 243(force): 20(ptr) Variable Function + 256(pos): 20(ptr) Variable Function + 266(vel): 20(ptr) Variable Function + 286(param): 20(ptr) Variable Function + 290(param): 20(ptr) Variable Function + 292(param): 21(ptr) Variable Function + 315(param): 20(ptr) Variable Function + 319(param): 20(ptr) Variable Function + 321(param): 21(ptr) Variable Function + 348(param): 20(ptr) Variable Function + 352(param): 20(ptr) Variable Function + 354(param): 21(ptr) Variable Function + 376(param): 20(ptr) Variable Function + 380(param): 20(ptr) Variable Function + 382(param): 21(ptr) Variable Function + 414(param): 20(ptr) Variable Function + 418(param): 20(ptr) Variable Function + 420(param): 21(ptr) Variable Function + 447(param): 20(ptr) Variable Function + 451(param): 20(ptr) Variable Function + 453(param): 21(ptr) Variable Function + 488(param): 20(ptr) Variable Function + 492(param): 20(ptr) Variable Function + 494(param): 21(ptr) Variable Function + 525(param): 20(ptr) Variable Function + 529(param): 20(ptr) Variable Function + 531(param): 21(ptr) Variable Function + 550(f): 20(ptr) Variable Function + 599(sphereDist): 20(ptr) Variable Function + 676(normal): 20(ptr) Variable Function + 698(a): 20(ptr) Variable Function + 711(b): 20(ptr) Variable Function + 728(c): 20(ptr) Variable Function + 62: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 60 + 63: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 31 61 61 16 16 + 66: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 64 56(id) 43 + 135: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 101(DebugFunctionDefinition) 60 57(@main(vu3;) + 136: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 60 + 137: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 31 138 138 16 16 + 143: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 141 140(index) 43 + 144: 139(ptr) AccessChain 56(id) 35 + 145: 11(int) Load 144 + 148: 147(ptr) AccessChain 119 122 146 16 + 149: 84(int) Load 148 + 150: 11(int) Bitcast 149 + 151: 11(int) IMul 145 150 + 152: 139(ptr) AccessChain 56(id) 16 + 153: 11(int) Load 152 + 154: 11(int) IAdd 151 153 + Store 140(index) 154 + 155: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 31 156 156 16 16 + 157: 11(int) Load 140(index) + 158: 147(ptr) AccessChain 119 122 146 16 + 159: 84(int) Load 158 + 160: 147(ptr) AccessChain 119 122 146 35 + 161: 84(int) Load 160 + 162: 84(int) IMul 159 161 + 163: 11(int) Bitcast 162 + 167: 164(bool) UGreaterThan 157 163 + SelectionMerge 169 None + BranchConditional 167 168 169 + 168: Label + 170: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 60 + 171: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 31 172 172 16 16 Return - 159: Label - 188: 10(int) Load 131(index) - 190: 118(ptr) AccessChain 186(particleIn) 116 188 189 - 191: 7(float) Load 190 - 194: 154(bool) FOrdEqual 191 192 - SelectionMerge 196 None - BranchConditional 194 195 196 - 195: Label - 208: 10(int) Load 131(index) - 209: 10(int) Load 131(index) - 211: 210(ptr) AccessChain 206(particleOut) 116 209 116 - 212: 75(fvec4) Load 211 - 213: 210(ptr) AccessChain 206(particleOut) 116 208 116 - Store 213 212 - 214: 10(int) Load 131(index) - 218: 210(ptr) AccessChain 206(particleOut) 116 214 215 - Store 218 217 + 169: Label + 174: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 60 + 175: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 31 176 176 16 16 + 203: 11(int) Load 140(index) + 205: 124(ptr) AccessChain 201(particleIn) 122 203 204 + 206: 8(float) Load 205 + 208: 164(bool) FOrdEqual 206 207 + SelectionMerge 210 None + BranchConditional 208 209 210 + 209: Label + 211: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 60 + 212: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 31 213 213 16 16 + 224: 11(int) Load 140(index) + 225: 11(int) Load 140(index) + 227: 226(ptr) AccessChain 222(particleOut) 122 225 122 + 228: 82(fvec4) Load 227 + 229: 226(ptr) AccessChain 222(particleOut) 122 224 122 + Store 229 228 + 230: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 31 231 231 16 16 + 232: 11(int) Load 140(index) + 236: 226(ptr) AccessChain 222(particleOut) 122 232 233 + Store 236 235 + 237: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 31 238 238 16 16 Return - 196: Label - 224: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 221 220(force) 41 - 226: 210(ptr) AccessChain 113 116 225 - 227: 75(fvec4) Load 226 - 228: 17(fvec3) VectorShuffle 227 227 0 1 2 - 229: 118(ptr) AccessChain 113 116 215 - 230: 7(float) Load 229 - 231: 17(fvec3) VectorTimesScalar 228 230 - Store 220(force) 231 - 236: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 233 232(pos) 41 - 237: 10(int) Load 131(index) - 238: 210(ptr) AccessChain 186(particleIn) 116 237 116 - 239: 75(fvec4) Load 238 - 240: 17(fvec3) VectorShuffle 239 239 0 1 2 - Store 232(pos) 240 - 245: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 242 241(vel) 41 - 246: 10(int) Load 131(index) - 247: 210(ptr) AccessChain 186(particleIn) 116 246 215 - 248: 75(fvec4) Load 247 - 249: 17(fvec3) VectorShuffle 248 248 0 1 2 - Store 241(vel) 249 - 250: 130(ptr) AccessChain 54(id) 15 - 251: 10(int) Load 250 - 253: 154(bool) UGreaterThan 251 15 - SelectionMerge 255 None - BranchConditional 253 254 255 - 254: Label - 256: 10(int) Load 131(index) - 257: 10(int) ISub 256 32 - 259: 210(ptr) AccessChain 186(particleIn) 116 257 116 - 260: 75(fvec4) Load 259 - 261: 17(fvec3) VectorShuffle 260 260 0 1 2 - Store 258(param) 261 - 263: 17(fvec3) Load 232(pos) - Store 262(param) 263 - 265: 118(ptr) AccessChain 113 116 189 - 266: 7(float) Load 265 - Store 264(param) 266 - 267: 17(fvec3) FunctionCall 26(springForce(vf3;vf3;f1;) 258(param) 262(param) 264(param) - 268: 17(fvec3) Load 220(force) - 269: 17(fvec3) FAdd 268 267 - Store 220(force) 269 - Branch 255 - 255: Label - 270: 130(ptr) AccessChain 54(id) 15 - 271: 10(int) Load 270 - 272: 139(ptr) AccessChain 113 116 138 15 - 273: 77(int) Load 272 - 274: 77(int) ISub 273 215 - 275: 10(int) Bitcast 274 - 277: 154(bool) ULessThan 271 275 - SelectionMerge 279 None - BranchConditional 277 278 279 - 278: Label - 280: 10(int) Load 131(index) - 281: 10(int) IAdd 280 32 - 283: 210(ptr) AccessChain 186(particleIn) 116 281 116 - 284: 75(fvec4) Load 283 - 285: 17(fvec3) VectorShuffle 284 284 0 1 2 - Store 282(param) 285 - 287: 17(fvec3) Load 232(pos) - Store 286(param) 287 - 289: 118(ptr) AccessChain 113 116 189 - 290: 7(float) Load 289 - Store 288(param) 290 - 291: 17(fvec3) FunctionCall 26(springForce(vf3;vf3;f1;) 282(param) 286(param) 288(param) - 292: 17(fvec3) Load 220(force) - 293: 17(fvec3) FAdd 292 291 - Store 220(force) 293 - Branch 279 - 279: Label - 294: 130(ptr) AccessChain 54(id) 32 - 295: 10(int) Load 294 - 296: 139(ptr) AccessChain 113 116 138 32 - 297: 77(int) Load 296 - 298: 77(int) ISub 297 215 - 299: 10(int) Bitcast 298 - 301: 154(bool) ULessThan 295 299 - SelectionMerge 303 None - BranchConditional 301 302 303 - 302: Label - 304: 10(int) Load 131(index) - 305: 139(ptr) AccessChain 113 116 138 15 - 306: 77(int) Load 305 - 307: 10(int) Bitcast 306 - 308: 10(int) IAdd 304 307 - 311: 210(ptr) AccessChain 186(particleIn) 116 308 116 - 312: 75(fvec4) Load 311 - 313: 17(fvec3) VectorShuffle 312 312 0 1 2 - Store 310(param) 313 - 315: 17(fvec3) Load 232(pos) - Store 314(param) 315 - 317: 118(ptr) AccessChain 113 116 309 - 318: 7(float) Load 317 - Store 316(param) 318 - 319: 17(fvec3) FunctionCall 26(springForce(vf3;vf3;f1;) 310(param) 314(param) 316(param) - 320: 17(fvec3) Load 220(force) - 321: 17(fvec3) FAdd 320 319 - Store 220(force) 321 - Branch 303 - 303: Label - 322: 130(ptr) AccessChain 54(id) 32 - 323: 10(int) Load 322 - 325: 154(bool) UGreaterThan 323 15 - SelectionMerge 327 None - BranchConditional 325 326 327 - 326: Label - 328: 10(int) Load 131(index) - 329: 139(ptr) AccessChain 113 116 138 15 - 330: 77(int) Load 329 - 331: 10(int) Bitcast 330 - 332: 10(int) ISub 328 331 - 334: 210(ptr) AccessChain 186(particleIn) 116 332 116 - 335: 75(fvec4) Load 334 - 336: 17(fvec3) VectorShuffle 335 335 0 1 2 - Store 333(param) 336 - 338: 17(fvec3) Load 232(pos) - Store 337(param) 338 - 340: 118(ptr) AccessChain 113 116 309 - 341: 7(float) Load 340 - Store 339(param) 341 - 342: 17(fvec3) FunctionCall 26(springForce(vf3;vf3;f1;) 333(param) 337(param) 339(param) - 343: 17(fvec3) Load 220(force) - 344: 17(fvec3) FAdd 343 342 - Store 220(force) 344 - Branch 327 - 327: Label - 345: 130(ptr) AccessChain 54(id) 15 - 346: 10(int) Load 345 - 348: 154(bool) UGreaterThan 346 15 - 349: 130(ptr) AccessChain 54(id) 32 - 350: 10(int) Load 349 - 351: 139(ptr) AccessChain 113 116 138 32 - 352: 77(int) Load 351 - 353: 77(int) ISub 352 215 - 354: 10(int) Bitcast 353 - 356: 154(bool) ULessThan 350 354 - 358: 154(bool) LogicalAnd 348 356 - SelectionMerge 360 None - BranchConditional 358 359 360 - 359: Label - 361: 10(int) Load 131(index) - 362: 139(ptr) AccessChain 113 116 138 15 - 363: 77(int) Load 362 - 364: 10(int) Bitcast 363 - 365: 10(int) IAdd 361 364 - 366: 10(int) ISub 365 32 - 369: 210(ptr) AccessChain 186(particleIn) 116 366 116 - 370: 75(fvec4) Load 369 - 371: 17(fvec3) VectorShuffle 370 370 0 1 2 - Store 368(param) 371 - 373: 17(fvec3) Load 232(pos) - Store 372(param) 373 - 375: 118(ptr) AccessChain 113 116 367 - 376: 7(float) Load 375 - Store 374(param) 376 - 377: 17(fvec3) FunctionCall 26(springForce(vf3;vf3;f1;) 368(param) 372(param) 374(param) - 378: 17(fvec3) Load 220(force) - 379: 17(fvec3) FAdd 378 377 - Store 220(force) 379 - Branch 360 - 360: Label - 380: 130(ptr) AccessChain 54(id) 15 - 381: 10(int) Load 380 - 383: 154(bool) UGreaterThan 381 15 - 384: 130(ptr) AccessChain 54(id) 32 - 385: 10(int) Load 384 - 387: 154(bool) UGreaterThan 385 15 - 389: 154(bool) LogicalAnd 383 387 - SelectionMerge 391 None - BranchConditional 389 390 391 - 390: Label - 392: 10(int) Load 131(index) - 393: 139(ptr) AccessChain 113 116 138 15 - 394: 77(int) Load 393 - 395: 10(int) Bitcast 394 - 396: 10(int) ISub 392 395 - 397: 10(int) ISub 396 32 - 399: 210(ptr) AccessChain 186(particleIn) 116 397 116 - 400: 75(fvec4) Load 399 - 401: 17(fvec3) VectorShuffle 400 400 0 1 2 - Store 398(param) 401 - 403: 17(fvec3) Load 232(pos) - Store 402(param) 403 - 405: 118(ptr) AccessChain 113 116 367 - 406: 7(float) Load 405 - Store 404(param) 406 - 407: 17(fvec3) FunctionCall 26(springForce(vf3;vf3;f1;) 398(param) 402(param) 404(param) - 408: 17(fvec3) Load 220(force) - 409: 17(fvec3) FAdd 408 407 - Store 220(force) 409 - Branch 391 - 391: Label - 410: 130(ptr) AccessChain 54(id) 15 - 411: 10(int) Load 410 - 412: 139(ptr) AccessChain 113 116 138 15 - 413: 77(int) Load 412 - 414: 77(int) ISub 413 215 - 415: 10(int) Bitcast 414 - 417: 154(bool) ULessThan 411 415 - 418: 130(ptr) AccessChain 54(id) 32 - 419: 10(int) Load 418 - 420: 139(ptr) AccessChain 113 116 138 32 - 421: 77(int) Load 420 - 422: 77(int) ISub 421 215 - 423: 10(int) Bitcast 422 - 425: 154(bool) ULessThan 419 423 - 427: 154(bool) LogicalAnd 417 425 - SelectionMerge 429 None - BranchConditional 427 428 429 - 428: Label - 430: 10(int) Load 131(index) - 431: 139(ptr) AccessChain 113 116 138 15 - 432: 77(int) Load 431 - 433: 10(int) Bitcast 432 - 434: 10(int) IAdd 430 433 - 435: 10(int) IAdd 434 32 - 437: 210(ptr) AccessChain 186(particleIn) 116 435 116 - 438: 75(fvec4) Load 437 - 439: 17(fvec3) VectorShuffle 438 438 0 1 2 - Store 436(param) 439 - 441: 17(fvec3) Load 232(pos) - Store 440(param) 441 - 443: 118(ptr) AccessChain 113 116 367 - 444: 7(float) Load 443 - Store 442(param) 444 - 445: 17(fvec3) FunctionCall 26(springForce(vf3;vf3;f1;) 436(param) 440(param) 442(param) - 446: 17(fvec3) Load 220(force) - 447: 17(fvec3) FAdd 446 445 - Store 220(force) 447 - Branch 429 - 429: Label - 448: 130(ptr) AccessChain 54(id) 15 - 449: 10(int) Load 448 - 450: 139(ptr) AccessChain 113 116 138 15 - 451: 77(int) Load 450 - 452: 77(int) ISub 451 215 - 453: 10(int) Bitcast 452 - 455: 154(bool) ULessThan 449 453 - 456: 130(ptr) AccessChain 54(id) 32 - 457: 10(int) Load 456 - 459: 154(bool) UGreaterThan 457 15 - 461: 154(bool) LogicalAnd 455 459 - SelectionMerge 463 None - BranchConditional 461 462 463 - 462: Label - 464: 10(int) Load 131(index) - 465: 139(ptr) AccessChain 113 116 138 15 - 466: 77(int) Load 465 - 467: 10(int) Bitcast 466 - 468: 10(int) ISub 464 467 - 469: 10(int) IAdd 468 32 - 471: 210(ptr) AccessChain 186(particleIn) 116 469 116 - 472: 75(fvec4) Load 471 - 473: 17(fvec3) VectorShuffle 472 472 0 1 2 - Store 470(param) 473 - 475: 17(fvec3) Load 232(pos) - Store 474(param) 475 - 477: 118(ptr) AccessChain 113 116 367 - 478: 7(float) Load 477 - Store 476(param) 478 - 479: 17(fvec3) FunctionCall 26(springForce(vf3;vf3;f1;) 470(param) 474(param) 476(param) - 480: 17(fvec3) Load 220(force) - 481: 17(fvec3) FAdd 480 479 - Store 220(force) 481 - Branch 463 - 463: Label - 483: 118(ptr) AccessChain 113 116 482 - 484: 7(float) Load 483 - 485: 7(float) FNegate 484 - 486: 17(fvec3) Load 241(vel) - 487: 17(fvec3) VectorTimesScalar 486 485 - 488: 17(fvec3) Load 220(force) - 489: 17(fvec3) FAdd 488 487 - Store 220(force) 489 - 494: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 491 490(f) 41 - 495: 17(fvec3) Load 220(force) - 496: 118(ptr) AccessChain 113 116 215 - 497: 7(float) Load 496 - 498: 7(float) FDiv 192 497 - 499: 17(fvec3) VectorTimesScalar 495 498 - Store 490(f) 499 - 500: 10(int) Load 131(index) - 501: 17(fvec3) Load 232(pos) - 502: 17(fvec3) Load 241(vel) - 503: 118(ptr) AccessChain 113 116 116 - 504: 7(float) Load 503 - 505: 17(fvec3) VectorTimesScalar 502 504 - 506: 17(fvec3) FAdd 501 505 - 508: 17(fvec3) Load 490(f) - 509: 17(fvec3) VectorTimesScalar 508 507 - 510: 118(ptr) AccessChain 113 116 116 - 511: 7(float) Load 510 - 512: 17(fvec3) VectorTimesScalar 509 511 - 513: 118(ptr) AccessChain 113 116 116 - 514: 7(float) Load 513 - 515: 17(fvec3) VectorTimesScalar 512 514 - 516: 17(fvec3) FAdd 506 515 - 517: 7(float) CompositeExtract 516 0 - 518: 7(float) CompositeExtract 516 1 - 519: 7(float) CompositeExtract 516 2 - 520: 75(fvec4) CompositeConstruct 517 518 519 192 - 521: 210(ptr) AccessChain 206(particleOut) 116 500 116 - Store 521 520 - 522: 10(int) Load 131(index) - 523: 17(fvec3) Load 241(vel) - 524: 17(fvec3) Load 490(f) - 525: 118(ptr) AccessChain 113 116 116 - 526: 7(float) Load 525 - 527: 17(fvec3) VectorTimesScalar 524 526 - 528: 17(fvec3) FAdd 523 527 - 529: 7(float) CompositeExtract 528 0 - 530: 7(float) CompositeExtract 528 1 - 531: 7(float) CompositeExtract 528 2 - 532: 75(fvec4) CompositeConstruct 529 530 531 216 - 533: 210(ptr) AccessChain 206(particleOut) 116 522 215 - Store 533 532 - 538: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 535 534(sphereDist) 41 - 539: 10(int) Load 131(index) - 540: 210(ptr) AccessChain 206(particleOut) 116 539 116 - 541: 75(fvec4) Load 540 - 542: 17(fvec3) VectorShuffle 541 541 0 1 2 - 544: 210(ptr) AccessChain 113 116 543 - 545: 75(fvec4) Load 544 - 546: 17(fvec3) VectorShuffle 545 545 0 1 2 - 547: 17(fvec3) FSub 542 546 - Store 534(sphereDist) 547 - 548: 17(fvec3) Load 534(sphereDist) - 549: 7(float) ExtInst 2(GLSL.std.450) 66(Length) 548 - 551: 118(ptr) AccessChain 113 116 550 - 552: 7(float) Load 551 - 554: 7(float) FAdd 552 553 - 556: 154(bool) FOrdLessThan 549 554 - SelectionMerge 558 None - BranchConditional 556 557 558 - 557: Label - 559: 10(int) Load 131(index) - 560: 210(ptr) AccessChain 113 116 543 - 561: 75(fvec4) Load 560 - 562: 17(fvec3) VectorShuffle 561 561 0 1 2 - 563: 17(fvec3) Load 534(sphereDist) - 564: 17(fvec3) ExtInst 2(GLSL.std.450) 69(Normalize) 563 - 565: 118(ptr) AccessChain 113 116 550 - 566: 7(float) Load 565 - 567: 7(float) FAdd 566 553 - 568: 17(fvec3) VectorTimesScalar 564 567 - 569: 17(fvec3) FAdd 562 568 - 570: 118(ptr) AccessChain 206(particleOut) 116 559 116 15 - 571: 7(float) CompositeExtract 569 0 - Store 570 571 - 572: 118(ptr) AccessChain 206(particleOut) 116 559 116 32 - 573: 7(float) CompositeExtract 569 1 - Store 572 573 - 574: 118(ptr) AccessChain 206(particleOut) 116 559 116 44 - 575: 7(float) CompositeExtract 569 2 - Store 574 575 - 576: 10(int) Load 131(index) - 577: 210(ptr) AccessChain 206(particleOut) 116 576 215 - Store 577 217 - Branch 558 - 558: Label - 596: 595(ptr) AccessChain 593 116 116 - 597: 10(int) Load 596 - 599: 154(bool) IEqual 597 32 - SelectionMerge 601 None - BranchConditional 599 600 601 - 600: Label - 605: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 603 602(normal) 41 - Store 602(normal) 606 - 607: 130(ptr) AccessChain 54(id) 32 - 608: 10(int) Load 607 - 610: 154(bool) UGreaterThan 608 15 - SelectionMerge 612 None - BranchConditional 610 611 612 - 611: Label - 613: 130(ptr) AccessChain 54(id) 15 - 614: 10(int) Load 613 - 616: 154(bool) UGreaterThan 614 15 - SelectionMerge 618 None - BranchConditional 616 617 618 - 617: Label - 623: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 620 619(a) 41 - 624: 10(int) Load 131(index) - 625: 10(int) ISub 624 32 - 626: 210(ptr) AccessChain 186(particleIn) 116 625 116 - 627: 75(fvec4) Load 626 - 628: 17(fvec3) VectorShuffle 627 627 0 1 2 - 629: 17(fvec3) Load 232(pos) - 630: 17(fvec3) FSub 628 629 - Store 619(a) 630 - 635: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 632 631(b) 41 - 636: 10(int) Load 131(index) - 637: 139(ptr) AccessChain 113 116 138 15 - 638: 77(int) Load 637 - 639: 10(int) Bitcast 638 - 640: 10(int) ISub 636 639 - 641: 10(int) ISub 640 32 - 642: 210(ptr) AccessChain 186(particleIn) 116 641 116 - 643: 75(fvec4) Load 642 - 644: 17(fvec3) VectorShuffle 643 643 0 1 2 - 645: 17(fvec3) Load 232(pos) - 646: 17(fvec3) FSub 644 645 - Store 631(b) 646 - 651: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 648 647(c) 41 - 652: 10(int) Load 131(index) - 653: 139(ptr) AccessChain 113 116 138 15 - 654: 77(int) Load 653 - 655: 10(int) Bitcast 654 - 656: 10(int) ISub 652 655 - 657: 210(ptr) AccessChain 186(particleIn) 116 656 116 - 658: 75(fvec4) Load 657 - 659: 17(fvec3) VectorShuffle 658 658 0 1 2 - 660: 17(fvec3) Load 232(pos) - 661: 17(fvec3) FSub 659 660 - Store 647(c) 661 - 662: 17(fvec3) Load 619(a) - 663: 17(fvec3) Load 631(b) - 664: 17(fvec3) ExtInst 2(GLSL.std.450) 68(Cross) 662 663 - 665: 17(fvec3) Load 631(b) - 666: 17(fvec3) Load 647(c) - 667: 17(fvec3) ExtInst 2(GLSL.std.450) 68(Cross) 665 666 - 668: 17(fvec3) FAdd 664 667 - 669: 17(fvec3) Load 602(normal) - 670: 17(fvec3) FAdd 669 668 - Store 602(normal) 670 - Branch 618 - 618: Label - 671: 130(ptr) AccessChain 54(id) 15 - 672: 10(int) Load 671 - 673: 139(ptr) AccessChain 113 116 138 15 - 674: 77(int) Load 673 - 675: 77(int) ISub 674 215 - 676: 10(int) Bitcast 675 - 678: 154(bool) ULessThan 672 676 - SelectionMerge 680 None - BranchConditional 678 679 680 - 679: Label - 681: 10(int) Load 131(index) - 682: 139(ptr) AccessChain 113 116 138 15 - 683: 77(int) Load 682 - 684: 10(int) Bitcast 683 - 685: 10(int) ISub 681 684 - 686: 210(ptr) AccessChain 186(particleIn) 116 685 116 - 687: 75(fvec4) Load 686 - 688: 17(fvec3) VectorShuffle 687 687 0 1 2 - 689: 17(fvec3) Load 232(pos) - 690: 17(fvec3) FSub 688 689 - Store 619(a) 690 - 691: 10(int) Load 131(index) - 692: 139(ptr) AccessChain 113 116 138 15 - 693: 77(int) Load 692 - 694: 10(int) Bitcast 693 - 695: 10(int) ISub 691 694 - 696: 10(int) IAdd 695 32 - 697: 210(ptr) AccessChain 186(particleIn) 116 696 116 - 698: 75(fvec4) Load 697 - 699: 17(fvec3) VectorShuffle 698 698 0 1 2 - 700: 17(fvec3) Load 232(pos) - 701: 17(fvec3) FSub 699 700 - Store 631(b) 701 - 702: 10(int) Load 131(index) - 703: 10(int) IAdd 702 32 - 704: 210(ptr) AccessChain 186(particleIn) 116 703 116 - 705: 75(fvec4) Load 704 - 706: 17(fvec3) VectorShuffle 705 705 0 1 2 - 707: 17(fvec3) Load 232(pos) - 708: 17(fvec3) FSub 706 707 - Store 647(c) 708 - 709: 17(fvec3) Load 619(a) - 710: 17(fvec3) Load 631(b) - 711: 17(fvec3) ExtInst 2(GLSL.std.450) 68(Cross) 709 710 - 712: 17(fvec3) Load 631(b) - 713: 17(fvec3) Load 647(c) - 714: 17(fvec3) ExtInst 2(GLSL.std.450) 68(Cross) 712 713 - 715: 17(fvec3) FAdd 711 714 - 716: 17(fvec3) Load 602(normal) - 717: 17(fvec3) FAdd 716 715 - Store 602(normal) 717 - Branch 680 - 680: Label - Branch 612 - 612: Label - 718: 130(ptr) AccessChain 54(id) 32 - 719: 10(int) Load 718 - 720: 139(ptr) AccessChain 113 116 138 32 - 721: 77(int) Load 720 - 722: 77(int) ISub 721 215 - 723: 10(int) Bitcast 722 - 725: 154(bool) ULessThan 719 723 - SelectionMerge 727 None - BranchConditional 725 726 727 - 726: Label - 728: 130(ptr) AccessChain 54(id) 15 - 729: 10(int) Load 728 - 731: 154(bool) UGreaterThan 729 15 - SelectionMerge 733 None - BranchConditional 731 732 733 - 732: Label - 734: 10(int) Load 131(index) - 735: 139(ptr) AccessChain 113 116 138 15 - 736: 77(int) Load 735 - 737: 10(int) Bitcast 736 - 738: 10(int) IAdd 734 737 - 739: 210(ptr) AccessChain 186(particleIn) 116 738 116 - 740: 75(fvec4) Load 739 - 741: 17(fvec3) VectorShuffle 740 740 0 1 2 - 742: 17(fvec3) Load 232(pos) - 743: 17(fvec3) FSub 741 742 - Store 619(a) 743 - 744: 10(int) Load 131(index) - 745: 139(ptr) AccessChain 113 116 138 15 - 746: 77(int) Load 745 - 747: 10(int) Bitcast 746 - 748: 10(int) IAdd 744 747 - 749: 10(int) ISub 748 32 - 750: 210(ptr) AccessChain 186(particleIn) 116 749 116 - 751: 75(fvec4) Load 750 - 752: 17(fvec3) VectorShuffle 751 751 0 1 2 - 753: 17(fvec3) Load 232(pos) - 754: 17(fvec3) FSub 752 753 - Store 631(b) 754 - 755: 10(int) Load 131(index) - 756: 10(int) ISub 755 32 - 757: 210(ptr) AccessChain 186(particleIn) 116 756 116 - 758: 75(fvec4) Load 757 - 759: 17(fvec3) VectorShuffle 758 758 0 1 2 - 760: 17(fvec3) Load 232(pos) - 761: 17(fvec3) FSub 759 760 - Store 647(c) 761 - 762: 17(fvec3) Load 619(a) - 763: 17(fvec3) Load 631(b) - 764: 17(fvec3) ExtInst 2(GLSL.std.450) 68(Cross) 762 763 - 765: 17(fvec3) Load 631(b) - 766: 17(fvec3) Load 647(c) - 767: 17(fvec3) ExtInst 2(GLSL.std.450) 68(Cross) 765 766 - 768: 17(fvec3) FAdd 764 767 - 769: 17(fvec3) Load 602(normal) - 770: 17(fvec3) FAdd 769 768 - Store 602(normal) 770 - Branch 733 - 733: Label - 771: 130(ptr) AccessChain 54(id) 15 - 772: 10(int) Load 771 - 773: 139(ptr) AccessChain 113 116 138 15 - 774: 77(int) Load 773 - 775: 77(int) ISub 774 215 - 776: 10(int) Bitcast 775 - 778: 154(bool) ULessThan 772 776 - SelectionMerge 780 None - BranchConditional 778 779 780 - 779: Label - 781: 10(int) Load 131(index) - 782: 10(int) IAdd 781 32 - 783: 210(ptr) AccessChain 186(particleIn) 116 782 116 - 784: 75(fvec4) Load 783 - 785: 17(fvec3) VectorShuffle 784 784 0 1 2 - 786: 17(fvec3) Load 232(pos) - 787: 17(fvec3) FSub 785 786 - Store 619(a) 787 - 788: 10(int) Load 131(index) - 789: 139(ptr) AccessChain 113 116 138 15 - 790: 77(int) Load 789 - 791: 10(int) Bitcast 790 - 792: 10(int) IAdd 788 791 - 793: 10(int) IAdd 792 32 - 794: 210(ptr) AccessChain 186(particleIn) 116 793 116 - 795: 75(fvec4) Load 794 - 796: 17(fvec3) VectorShuffle 795 795 0 1 2 - 797: 17(fvec3) Load 232(pos) - 798: 17(fvec3) FSub 796 797 - Store 631(b) 798 - 799: 10(int) Load 131(index) - 800: 139(ptr) AccessChain 113 116 138 15 - 801: 77(int) Load 800 - 802: 10(int) Bitcast 801 - 803: 10(int) IAdd 799 802 - 804: 210(ptr) AccessChain 186(particleIn) 116 803 116 - 805: 75(fvec4) Load 804 - 806: 17(fvec3) VectorShuffle 805 805 0 1 2 - 807: 17(fvec3) Load 232(pos) - 808: 17(fvec3) FSub 806 807 - Store 647(c) 808 - 809: 17(fvec3) Load 619(a) - 810: 17(fvec3) Load 631(b) - 811: 17(fvec3) ExtInst 2(GLSL.std.450) 68(Cross) 809 810 - 812: 17(fvec3) Load 631(b) - 813: 17(fvec3) Load 647(c) - 814: 17(fvec3) ExtInst 2(GLSL.std.450) 68(Cross) 812 813 - 815: 17(fvec3) FAdd 811 814 - 816: 17(fvec3) Load 602(normal) - 817: 17(fvec3) FAdd 816 815 - Store 602(normal) 817 - Branch 780 - 780: Label - Branch 727 - 727: Label - 818: 10(int) Load 131(index) - 819: 17(fvec3) Load 602(normal) - 820: 17(fvec3) ExtInst 2(GLSL.std.450) 69(Normalize) 819 - 821: 7(float) CompositeExtract 820 0 - 822: 7(float) CompositeExtract 820 1 - 823: 7(float) CompositeExtract 820 2 - 824: 75(fvec4) CompositeConstruct 821 822 823 216 - 825: 210(ptr) AccessChain 206(particleOut) 116 818 482 - Store 825 824 - Branch 601 - 601: Label + 210: Label + 240: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 60 + 241: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 31 242 242 16 16 + 246: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 244 243(force) 43 + 248: 226(ptr) AccessChain 119 122 247 + 249: 82(fvec4) Load 248 + 250: 18(fvec3) VectorShuffle 249 249 0 1 2 + 251: 124(ptr) AccessChain 119 122 233 + 252: 8(float) Load 251 + 253: 18(fvec3) VectorTimesScalar 250 252 + Store 243(force) 253 + 254: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 31 255 255 16 16 + 259: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 257 256(pos) 43 + 260: 11(int) Load 140(index) + 261: 226(ptr) AccessChain 201(particleIn) 122 260 122 + 262: 82(fvec4) Load 261 + 263: 18(fvec3) VectorShuffle 262 262 0 1 2 + Store 256(pos) 263 + 264: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 31 265 265 16 16 + 269: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 267 266(vel) 43 + 270: 11(int) Load 140(index) + 271: 226(ptr) AccessChain 201(particleIn) 122 270 233 + 272: 82(fvec4) Load 271 + 273: 18(fvec3) VectorShuffle 272 272 0 1 2 + Store 266(vel) 273 + 274: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 31 275 275 16 16 + 276: 139(ptr) AccessChain 56(id) 16 + 277: 11(int) Load 276 + 278: 164(bool) UGreaterThan 277 16 + SelectionMerge 280 None + BranchConditional 278 279 280 + 279: Label + 281: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 60 + 282: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 31 283 283 16 16 + 284: 11(int) Load 140(index) + 285: 11(int) ISub 284 35 + 287: 226(ptr) AccessChain 201(particleIn) 122 285 122 + 288: 82(fvec4) Load 287 + 289: 18(fvec3) VectorShuffle 288 288 0 1 2 + Store 286(param) 289 + 291: 18(fvec3) Load 256(pos) + Store 290(param) 291 + 293: 124(ptr) AccessChain 119 122 204 + 294: 8(float) Load 293 + Store 292(param) 294 + 295: 18(fvec3) FunctionCall 27(springForce(vf3;vf3;f1;) 286(param) 290(param) 292(param) + 296: 18(fvec3) Load 243(force) + 297: 18(fvec3) FAdd 296 295 + Store 243(force) 297 + Branch 280 + 280: Label + 298: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 60 + 299: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 31 300 300 16 16 + 301: 139(ptr) AccessChain 56(id) 16 + 302: 11(int) Load 301 + 303: 147(ptr) AccessChain 119 122 146 16 + 304: 84(int) Load 303 + 305: 84(int) ISub 304 233 + 306: 11(int) Bitcast 305 + 307: 164(bool) ULessThan 302 306 + SelectionMerge 309 None + BranchConditional 307 308 309 + 308: Label + 310: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 60 + 311: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 31 312 312 16 16 + 313: 11(int) Load 140(index) + 314: 11(int) IAdd 313 35 + 316: 226(ptr) AccessChain 201(particleIn) 122 314 122 + 317: 82(fvec4) Load 316 + 318: 18(fvec3) VectorShuffle 317 317 0 1 2 + Store 315(param) 318 + 320: 18(fvec3) Load 256(pos) + Store 319(param) 320 + 322: 124(ptr) AccessChain 119 122 204 + 323: 8(float) Load 322 + Store 321(param) 323 + 324: 18(fvec3) FunctionCall 27(springForce(vf3;vf3;f1;) 315(param) 319(param) 321(param) + 325: 18(fvec3) Load 243(force) + 326: 18(fvec3) FAdd 325 324 + Store 243(force) 326 + Branch 309 + 309: Label + 327: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 60 + 328: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 31 329 329 16 16 + 330: 139(ptr) AccessChain 56(id) 35 + 331: 11(int) Load 330 + 332: 147(ptr) AccessChain 119 122 146 35 + 333: 84(int) Load 332 + 334: 84(int) ISub 333 233 + 335: 11(int) Bitcast 334 + 336: 164(bool) ULessThan 331 335 + SelectionMerge 338 None + BranchConditional 336 337 338 + 337: Label + 339: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 60 + 340: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 31 341 341 16 16 + 342: 11(int) Load 140(index) + 343: 147(ptr) AccessChain 119 122 146 16 + 344: 84(int) Load 343 + 345: 11(int) Bitcast 344 + 346: 11(int) IAdd 342 345 + 349: 226(ptr) AccessChain 201(particleIn) 122 346 122 + 350: 82(fvec4) Load 349 + 351: 18(fvec3) VectorShuffle 350 350 0 1 2 + Store 348(param) 351 + 353: 18(fvec3) Load 256(pos) + Store 352(param) 353 + 355: 124(ptr) AccessChain 119 122 347 + 356: 8(float) Load 355 + Store 354(param) 356 + 357: 18(fvec3) FunctionCall 27(springForce(vf3;vf3;f1;) 348(param) 352(param) 354(param) + 358: 18(fvec3) Load 243(force) + 359: 18(fvec3) FAdd 358 357 + Store 243(force) 359 + Branch 338 + 338: Label + 360: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 60 + 361: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 31 362 362 16 16 + 363: 139(ptr) AccessChain 56(id) 35 + 364: 11(int) Load 363 + 365: 164(bool) UGreaterThan 364 16 + SelectionMerge 367 None + BranchConditional 365 366 367 + 366: Label + 368: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 60 + 369: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 31 370 370 16 16 + 371: 11(int) Load 140(index) + 372: 147(ptr) AccessChain 119 122 146 16 + 373: 84(int) Load 372 + 374: 11(int) Bitcast 373 + 375: 11(int) ISub 371 374 + 377: 226(ptr) AccessChain 201(particleIn) 122 375 122 + 378: 82(fvec4) Load 377 + 379: 18(fvec3) VectorShuffle 378 378 0 1 2 + Store 376(param) 379 + 381: 18(fvec3) Load 256(pos) + Store 380(param) 381 + 383: 124(ptr) AccessChain 119 122 347 + 384: 8(float) Load 383 + Store 382(param) 384 + 385: 18(fvec3) FunctionCall 27(springForce(vf3;vf3;f1;) 376(param) 380(param) 382(param) + 386: 18(fvec3) Load 243(force) + 387: 18(fvec3) FAdd 386 385 + Store 243(force) 387 + Branch 367 + 367: Label + 388: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 60 + 389: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 31 390 390 16 16 + 391: 139(ptr) AccessChain 56(id) 16 + 392: 11(int) Load 391 + 393: 164(bool) UGreaterThan 392 16 + 394: 139(ptr) AccessChain 56(id) 35 + 395: 11(int) Load 394 + 396: 147(ptr) AccessChain 119 122 146 35 + 397: 84(int) Load 396 + 398: 84(int) ISub 397 233 + 399: 11(int) Bitcast 398 + 400: 164(bool) ULessThan 395 399 + 401: 164(bool) LogicalAnd 393 400 + SelectionMerge 403 None + BranchConditional 401 402 403 + 402: Label + 404: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 60 + 405: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 31 406 406 16 16 + 407: 11(int) Load 140(index) + 408: 147(ptr) AccessChain 119 122 146 16 + 409: 84(int) Load 408 + 410: 11(int) Bitcast 409 + 411: 11(int) IAdd 407 410 + 412: 11(int) ISub 411 35 + 415: 226(ptr) AccessChain 201(particleIn) 122 412 122 + 416: 82(fvec4) Load 415 + 417: 18(fvec3) VectorShuffle 416 416 0 1 2 + Store 414(param) 417 + 419: 18(fvec3) Load 256(pos) + Store 418(param) 419 + 421: 124(ptr) AccessChain 119 122 413 + 422: 8(float) Load 421 + Store 420(param) 422 + 423: 18(fvec3) FunctionCall 27(springForce(vf3;vf3;f1;) 414(param) 418(param) 420(param) + 424: 18(fvec3) Load 243(force) + 425: 18(fvec3) FAdd 424 423 + Store 243(force) 425 + Branch 403 + 403: Label + 426: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 60 + 427: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 31 428 428 16 16 + 429: 139(ptr) AccessChain 56(id) 16 + 430: 11(int) Load 429 + 431: 164(bool) UGreaterThan 430 16 + 432: 139(ptr) AccessChain 56(id) 35 + 433: 11(int) Load 432 + 434: 164(bool) UGreaterThan 433 16 + 435: 164(bool) LogicalAnd 431 434 + SelectionMerge 437 None + BranchConditional 435 436 437 + 436: Label + 438: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 60 + 439: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 31 440 440 16 16 + 441: 11(int) Load 140(index) + 442: 147(ptr) AccessChain 119 122 146 16 + 443: 84(int) Load 442 + 444: 11(int) Bitcast 443 + 445: 11(int) ISub 441 444 + 446: 11(int) ISub 445 35 + 448: 226(ptr) AccessChain 201(particleIn) 122 446 122 + 449: 82(fvec4) Load 448 + 450: 18(fvec3) VectorShuffle 449 449 0 1 2 + Store 447(param) 450 + 452: 18(fvec3) Load 256(pos) + Store 451(param) 452 + 454: 124(ptr) AccessChain 119 122 413 + 455: 8(float) Load 454 + Store 453(param) 455 + 456: 18(fvec3) FunctionCall 27(springForce(vf3;vf3;f1;) 447(param) 451(param) 453(param) + 457: 18(fvec3) Load 243(force) + 458: 18(fvec3) FAdd 457 456 + Store 243(force) 458 + Branch 437 + 437: Label + 459: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 60 + 460: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 31 461 461 16 16 + 462: 139(ptr) AccessChain 56(id) 16 + 463: 11(int) Load 462 + 464: 147(ptr) AccessChain 119 122 146 16 + 465: 84(int) Load 464 + 466: 84(int) ISub 465 233 + 467: 11(int) Bitcast 466 + 468: 164(bool) ULessThan 463 467 + 469: 139(ptr) AccessChain 56(id) 35 + 470: 11(int) Load 469 + 471: 147(ptr) AccessChain 119 122 146 35 + 472: 84(int) Load 471 + 473: 84(int) ISub 472 233 + 474: 11(int) Bitcast 473 + 475: 164(bool) ULessThan 470 474 + 476: 164(bool) LogicalAnd 468 475 + SelectionMerge 478 None + BranchConditional 476 477 478 + 477: Label + 479: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 60 + 480: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 31 481 481 16 16 + 482: 11(int) Load 140(index) + 483: 147(ptr) AccessChain 119 122 146 16 + 484: 84(int) Load 483 + 485: 11(int) Bitcast 484 + 486: 11(int) IAdd 482 485 + 487: 11(int) IAdd 486 35 + 489: 226(ptr) AccessChain 201(particleIn) 122 487 122 + 490: 82(fvec4) Load 489 + 491: 18(fvec3) VectorShuffle 490 490 0 1 2 + Store 488(param) 491 + 493: 18(fvec3) Load 256(pos) + Store 492(param) 493 + 495: 124(ptr) AccessChain 119 122 413 + 496: 8(float) Load 495 + Store 494(param) 496 + 497: 18(fvec3) FunctionCall 27(springForce(vf3;vf3;f1;) 488(param) 492(param) 494(param) + 498: 18(fvec3) Load 243(force) + 499: 18(fvec3) FAdd 498 497 + Store 243(force) 499 + Branch 478 + 478: Label + 500: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 60 + 501: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 31 502 502 16 16 + 503: 139(ptr) AccessChain 56(id) 16 + 504: 11(int) Load 503 + 505: 147(ptr) AccessChain 119 122 146 16 + 506: 84(int) Load 505 + 507: 84(int) ISub 506 233 + 508: 11(int) Bitcast 507 + 509: 164(bool) ULessThan 504 508 + 510: 139(ptr) AccessChain 56(id) 35 + 511: 11(int) Load 510 + 512: 164(bool) UGreaterThan 511 16 + 513: 164(bool) LogicalAnd 509 512 + SelectionMerge 515 None + BranchConditional 513 514 515 + 514: Label + 516: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 60 + 517: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 31 518 518 16 16 + 519: 11(int) Load 140(index) + 520: 147(ptr) AccessChain 119 122 146 16 + 521: 84(int) Load 520 + 522: 11(int) Bitcast 521 + 523: 11(int) ISub 519 522 + 524: 11(int) IAdd 523 35 + 526: 226(ptr) AccessChain 201(particleIn) 122 524 122 + 527: 82(fvec4) Load 526 + 528: 18(fvec3) VectorShuffle 527 527 0 1 2 + Store 525(param) 528 + 530: 18(fvec3) Load 256(pos) + Store 529(param) 530 + 532: 124(ptr) AccessChain 119 122 413 + 533: 8(float) Load 532 + Store 531(param) 533 + 534: 18(fvec3) FunctionCall 27(springForce(vf3;vf3;f1;) 525(param) 529(param) 531(param) + 535: 18(fvec3) Load 243(force) + 536: 18(fvec3) FAdd 535 534 + Store 243(force) 536 + Branch 515 + 515: Label + 537: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 60 + 538: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 31 539 539 16 16 + 541: 124(ptr) AccessChain 119 122 540 + 542: 8(float) Load 541 + 543: 8(float) FNegate 542 + 544: 18(fvec3) Load 266(vel) + 545: 18(fvec3) VectorTimesScalar 544 543 + 546: 18(fvec3) Load 243(force) + 547: 18(fvec3) FAdd 546 545 + Store 243(force) 547 + 548: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 31 549 549 16 16 + 553: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 551 550(f) 43 + 554: 18(fvec3) Load 243(force) + 555: 124(ptr) AccessChain 119 122 233 + 556: 8(float) Load 555 + 557: 8(float) FDiv 207 556 + 558: 18(fvec3) VectorTimesScalar 554 557 + Store 550(f) 558 + 559: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 31 560 560 16 16 + 561: 11(int) Load 140(index) + 562: 18(fvec3) Load 256(pos) + 563: 18(fvec3) Load 266(vel) + 564: 124(ptr) AccessChain 119 122 122 + 565: 8(float) Load 564 + 566: 18(fvec3) VectorTimesScalar 563 565 + 567: 18(fvec3) FAdd 562 566 + 569: 18(fvec3) Load 550(f) + 570: 18(fvec3) VectorTimesScalar 569 568 + 571: 124(ptr) AccessChain 119 122 122 + 572: 8(float) Load 571 + 573: 18(fvec3) VectorTimesScalar 570 572 + 574: 124(ptr) AccessChain 119 122 122 + 575: 8(float) Load 574 + 576: 18(fvec3) VectorTimesScalar 573 575 + 577: 18(fvec3) FAdd 567 576 + 578: 8(float) CompositeExtract 577 0 + 579: 8(float) CompositeExtract 577 1 + 580: 8(float) CompositeExtract 577 2 + 581: 82(fvec4) CompositeConstruct 578 579 580 207 + 582: 226(ptr) AccessChain 222(particleOut) 122 561 122 + Store 582 581 + 583: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 31 584 584 16 16 + 585: 11(int) Load 140(index) + 586: 18(fvec3) Load 266(vel) + 587: 18(fvec3) Load 550(f) + 588: 124(ptr) AccessChain 119 122 122 + 589: 8(float) Load 588 + 590: 18(fvec3) VectorTimesScalar 587 589 + 591: 18(fvec3) FAdd 586 590 + 592: 8(float) CompositeExtract 591 0 + 593: 8(float) CompositeExtract 591 1 + 594: 8(float) CompositeExtract 591 2 + 595: 82(fvec4) CompositeConstruct 592 593 594 234 + 596: 226(ptr) AccessChain 222(particleOut) 122 585 233 + Store 596 595 + 597: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 31 598 598 16 16 + 602: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 600 599(sphereDist) 43 + 603: 11(int) Load 140(index) + 604: 226(ptr) AccessChain 222(particleOut) 122 603 122 + 605: 82(fvec4) Load 604 + 606: 18(fvec3) VectorShuffle 605 605 0 1 2 + 608: 226(ptr) AccessChain 119 122 607 + 609: 82(fvec4) Load 608 + 610: 18(fvec3) VectorShuffle 609 609 0 1 2 + 611: 18(fvec3) FSub 606 610 + Store 599(sphereDist) 611 + 612: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 31 613 613 16 16 + 614: 18(fvec3) Load 599(sphereDist) + 615: 8(float) ExtInst 3(GLSL.std.450) 66(Length) 614 + 617: 124(ptr) AccessChain 119 122 616 + 618: 8(float) Load 617 + 620: 8(float) FAdd 618 619 + 621: 164(bool) FOrdLessThan 615 620 + SelectionMerge 623 None + BranchConditional 621 622 623 + 622: Label + 624: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 60 + 625: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 31 626 626 16 16 + 627: 11(int) Load 140(index) + 628: 226(ptr) AccessChain 119 122 607 + 629: 82(fvec4) Load 628 + 630: 18(fvec3) VectorShuffle 629 629 0 1 2 + 631: 18(fvec3) Load 599(sphereDist) + 632: 18(fvec3) ExtInst 3(GLSL.std.450) 69(Normalize) 631 + 633: 124(ptr) AccessChain 119 122 616 + 634: 8(float) Load 633 + 635: 8(float) FAdd 634 619 + 636: 18(fvec3) VectorTimesScalar 632 635 + 637: 18(fvec3) FAdd 630 636 + 638: 124(ptr) AccessChain 222(particleOut) 122 627 122 16 + 639: 8(float) CompositeExtract 637 0 + Store 638 639 + 640: 124(ptr) AccessChain 222(particleOut) 122 627 122 35 + 641: 8(float) CompositeExtract 637 1 + Store 640 641 + 642: 124(ptr) AccessChain 222(particleOut) 122 627 122 46 + 643: 8(float) CompositeExtract 637 2 + Store 642 643 + 644: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 31 645 645 16 16 + 646: 11(int) Load 140(index) + 647: 226(ptr) AccessChain 222(particleOut) 122 646 233 + Store 647 235 + Branch 623 + 623: Label + 648: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 60 + 649: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 31 650 650 16 16 + 668: 667(ptr) AccessChain 665 122 122 + 669: 11(int) Load 668 + 670: 164(bool) IEqual 669 35 + SelectionMerge 672 None + BranchConditional 670 671 672 + 671: Label + 673: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 60 + 674: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 31 675 675 16 16 + 678: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 677 676(normal) 43 + Store 676(normal) 679 + 680: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 31 681 681 16 16 + 682: 139(ptr) AccessChain 56(id) 35 + 683: 11(int) Load 682 + 684: 164(bool) UGreaterThan 683 16 + SelectionMerge 686 None + BranchConditional 684 685 686 + 685: Label + 687: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 60 + 688: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 31 689 689 16 16 + 690: 139(ptr) AccessChain 56(id) 16 + 691: 11(int) Load 690 + 692: 164(bool) UGreaterThan 691 16 + SelectionMerge 694 None + BranchConditional 692 693 694 + 693: Label + 695: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 60 + 696: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 31 697 697 16 16 + 701: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 699 698(a) 43 + 702: 11(int) Load 140(index) + 703: 11(int) ISub 702 35 + 704: 226(ptr) AccessChain 201(particleIn) 122 703 122 + 705: 82(fvec4) Load 704 + 706: 18(fvec3) VectorShuffle 705 705 0 1 2 + 707: 18(fvec3) Load 256(pos) + 708: 18(fvec3) FSub 706 707 + Store 698(a) 708 + 709: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 31 710 710 16 16 + 714: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 712 711(b) 43 + 715: 11(int) Load 140(index) + 716: 147(ptr) AccessChain 119 122 146 16 + 717: 84(int) Load 716 + 718: 11(int) Bitcast 717 + 719: 11(int) ISub 715 718 + 720: 11(int) ISub 719 35 + 721: 226(ptr) AccessChain 201(particleIn) 122 720 122 + 722: 82(fvec4) Load 721 + 723: 18(fvec3) VectorShuffle 722 722 0 1 2 + 724: 18(fvec3) Load 256(pos) + 725: 18(fvec3) FSub 723 724 + Store 711(b) 725 + 726: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 31 727 727 16 16 + 731: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 729 728(c) 43 + 732: 11(int) Load 140(index) + 733: 147(ptr) AccessChain 119 122 146 16 + 734: 84(int) Load 733 + 735: 11(int) Bitcast 734 + 736: 11(int) ISub 732 735 + 737: 226(ptr) AccessChain 201(particleIn) 122 736 122 + 738: 82(fvec4) Load 737 + 739: 18(fvec3) VectorShuffle 738 738 0 1 2 + 740: 18(fvec3) Load 256(pos) + 741: 18(fvec3) FSub 739 740 + Store 728(c) 741 + 742: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 31 743 743 16 16 + 744: 18(fvec3) Load 698(a) + 745: 18(fvec3) Load 711(b) + 746: 18(fvec3) ExtInst 3(GLSL.std.450) 68(Cross) 744 745 + 747: 18(fvec3) Load 711(b) + 748: 18(fvec3) Load 728(c) + 749: 18(fvec3) ExtInst 3(GLSL.std.450) 68(Cross) 747 748 + 750: 18(fvec3) FAdd 746 749 + 751: 18(fvec3) Load 676(normal) + 752: 18(fvec3) FAdd 751 750 + Store 676(normal) 752 + Branch 694 + 694: Label + 753: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 60 + 754: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 31 755 755 16 16 + 756: 139(ptr) AccessChain 56(id) 16 + 757: 11(int) Load 756 + 758: 147(ptr) AccessChain 119 122 146 16 + 759: 84(int) Load 758 + 760: 84(int) ISub 759 233 + 761: 11(int) Bitcast 760 + 762: 164(bool) ULessThan 757 761 + SelectionMerge 764 None + BranchConditional 762 763 764 + 763: Label + 765: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 60 + 766: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 31 767 767 16 16 + 768: 11(int) Load 140(index) + 769: 147(ptr) AccessChain 119 122 146 16 + 770: 84(int) Load 769 + 771: 11(int) Bitcast 770 + 772: 11(int) ISub 768 771 + 773: 226(ptr) AccessChain 201(particleIn) 122 772 122 + 774: 82(fvec4) Load 773 + 775: 18(fvec3) VectorShuffle 774 774 0 1 2 + 776: 18(fvec3) Load 256(pos) + 777: 18(fvec3) FSub 775 776 + Store 698(a) 777 + 778: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 31 779 779 16 16 + 780: 11(int) Load 140(index) + 781: 147(ptr) AccessChain 119 122 146 16 + 782: 84(int) Load 781 + 783: 11(int) Bitcast 782 + 784: 11(int) ISub 780 783 + 785: 11(int) IAdd 784 35 + 786: 226(ptr) AccessChain 201(particleIn) 122 785 122 + 787: 82(fvec4) Load 786 + 788: 18(fvec3) VectorShuffle 787 787 0 1 2 + 789: 18(fvec3) Load 256(pos) + 790: 18(fvec3) FSub 788 789 + Store 711(b) 790 + 791: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 31 792 792 16 16 + 793: 11(int) Load 140(index) + 794: 11(int) IAdd 793 35 + 795: 226(ptr) AccessChain 201(particleIn) 122 794 122 + 796: 82(fvec4) Load 795 + 797: 18(fvec3) VectorShuffle 796 796 0 1 2 + 798: 18(fvec3) Load 256(pos) + 799: 18(fvec3) FSub 797 798 + Store 728(c) 799 + 800: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 31 801 801 16 16 + 802: 18(fvec3) Load 698(a) + 803: 18(fvec3) Load 711(b) + 804: 18(fvec3) ExtInst 3(GLSL.std.450) 68(Cross) 802 803 + 805: 18(fvec3) Load 711(b) + 806: 18(fvec3) Load 728(c) + 807: 18(fvec3) ExtInst 3(GLSL.std.450) 68(Cross) 805 806 + 808: 18(fvec3) FAdd 804 807 + 809: 18(fvec3) Load 676(normal) + 810: 18(fvec3) FAdd 809 808 + Store 676(normal) 810 + Branch 764 + 764: Label + Branch 686 + 686: Label + 811: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 60 + 812: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 31 813 813 16 16 + 814: 139(ptr) AccessChain 56(id) 35 + 815: 11(int) Load 814 + 816: 147(ptr) AccessChain 119 122 146 35 + 817: 84(int) Load 816 + 818: 84(int) ISub 817 233 + 819: 11(int) Bitcast 818 + 820: 164(bool) ULessThan 815 819 + SelectionMerge 822 None + BranchConditional 820 821 822 + 821: Label + 823: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 60 + 824: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 31 825 825 16 16 + 826: 139(ptr) AccessChain 56(id) 16 + 827: 11(int) Load 826 + 828: 164(bool) UGreaterThan 827 16 + SelectionMerge 830 None + BranchConditional 828 829 830 + 829: Label + 831: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 60 + 832: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 31 833 833 16 16 + 834: 11(int) Load 140(index) + 835: 147(ptr) AccessChain 119 122 146 16 + 836: 84(int) Load 835 + 837: 11(int) Bitcast 836 + 838: 11(int) IAdd 834 837 + 839: 226(ptr) AccessChain 201(particleIn) 122 838 122 + 840: 82(fvec4) Load 839 + 841: 18(fvec3) VectorShuffle 840 840 0 1 2 + 842: 18(fvec3) Load 256(pos) + 843: 18(fvec3) FSub 841 842 + Store 698(a) 843 + 844: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 31 845 845 16 16 + 846: 11(int) Load 140(index) + 847: 147(ptr) AccessChain 119 122 146 16 + 848: 84(int) Load 847 + 849: 11(int) Bitcast 848 + 850: 11(int) IAdd 846 849 + 851: 11(int) ISub 850 35 + 852: 226(ptr) AccessChain 201(particleIn) 122 851 122 + 853: 82(fvec4) Load 852 + 854: 18(fvec3) VectorShuffle 853 853 0 1 2 + 855: 18(fvec3) Load 256(pos) + 856: 18(fvec3) FSub 854 855 + Store 711(b) 856 + 857: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 31 858 858 16 16 + 859: 11(int) Load 140(index) + 860: 11(int) ISub 859 35 + 861: 226(ptr) AccessChain 201(particleIn) 122 860 122 + 862: 82(fvec4) Load 861 + 863: 18(fvec3) VectorShuffle 862 862 0 1 2 + 864: 18(fvec3) Load 256(pos) + 865: 18(fvec3) FSub 863 864 + Store 728(c) 865 + 866: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 31 867 867 16 16 + 868: 18(fvec3) Load 698(a) + 869: 18(fvec3) Load 711(b) + 870: 18(fvec3) ExtInst 3(GLSL.std.450) 68(Cross) 868 869 + 871: 18(fvec3) Load 711(b) + 872: 18(fvec3) Load 728(c) + 873: 18(fvec3) ExtInst 3(GLSL.std.450) 68(Cross) 871 872 + 874: 18(fvec3) FAdd 870 873 + 875: 18(fvec3) Load 676(normal) + 876: 18(fvec3) FAdd 875 874 + Store 676(normal) 876 + Branch 830 + 830: Label + 877: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 60 + 878: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 31 879 879 16 16 + 880: 139(ptr) AccessChain 56(id) 16 + 881: 11(int) Load 880 + 882: 147(ptr) AccessChain 119 122 146 16 + 883: 84(int) Load 882 + 884: 84(int) ISub 883 233 + 885: 11(int) Bitcast 884 + 886: 164(bool) ULessThan 881 885 + SelectionMerge 888 None + BranchConditional 886 887 888 + 887: Label + 889: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 60 + 890: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 31 891 891 16 16 + 892: 11(int) Load 140(index) + 893: 11(int) IAdd 892 35 + 894: 226(ptr) AccessChain 201(particleIn) 122 893 122 + 895: 82(fvec4) Load 894 + 896: 18(fvec3) VectorShuffle 895 895 0 1 2 + 897: 18(fvec3) Load 256(pos) + 898: 18(fvec3) FSub 896 897 + Store 698(a) 898 + 899: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 31 900 900 16 16 + 901: 11(int) Load 140(index) + 902: 147(ptr) AccessChain 119 122 146 16 + 903: 84(int) Load 902 + 904: 11(int) Bitcast 903 + 905: 11(int) IAdd 901 904 + 906: 11(int) IAdd 905 35 + 907: 226(ptr) AccessChain 201(particleIn) 122 906 122 + 908: 82(fvec4) Load 907 + 909: 18(fvec3) VectorShuffle 908 908 0 1 2 + 910: 18(fvec3) Load 256(pos) + 911: 18(fvec3) FSub 909 910 + Store 711(b) 911 + 912: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 31 913 913 16 16 + 914: 11(int) Load 140(index) + 915: 147(ptr) AccessChain 119 122 146 16 + 916: 84(int) Load 915 + 917: 11(int) Bitcast 916 + 918: 11(int) IAdd 914 917 + 919: 226(ptr) AccessChain 201(particleIn) 122 918 122 + 920: 82(fvec4) Load 919 + 921: 18(fvec3) VectorShuffle 920 920 0 1 2 + 922: 18(fvec3) Load 256(pos) + 923: 18(fvec3) FSub 921 922 + Store 728(c) 923 + 924: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 31 925 925 16 16 + 926: 18(fvec3) Load 698(a) + 927: 18(fvec3) Load 711(b) + 928: 18(fvec3) ExtInst 3(GLSL.std.450) 68(Cross) 926 927 + 929: 18(fvec3) Load 711(b) + 930: 18(fvec3) Load 728(c) + 931: 18(fvec3) ExtInst 3(GLSL.std.450) 68(Cross) 929 930 + 932: 18(fvec3) FAdd 928 931 + 933: 18(fvec3) Load 676(normal) + 934: 18(fvec3) FAdd 933 932 + Store 676(normal) 934 + Branch 888 + 888: Label + Branch 822 + 822: Label + 935: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 60 + 936: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 31 937 937 16 16 + 938: 11(int) Load 140(index) + 939: 18(fvec3) Load 676(normal) + 940: 18(fvec3) ExtInst 3(GLSL.std.450) 69(Normalize) 939 + 941: 8(float) CompositeExtract 940 0 + 942: 8(float) CompositeExtract 940 1 + 943: 8(float) CompositeExtract 940 2 + 944: 82(fvec4) CompositeConstruct 941 942 943 234 + 945: 226(ptr) AccessChain 222(particleOut) 122 938 540 + Store 945 944 + Branch 672 + 672: Label Return FunctionEnd diff --git a/Test/baseResults/spv.debuginfo.hlsl.frag.out b/Test/baseResults/spv.debuginfo.hlsl.frag.out index 3c206a08..9fa17ff1 100755 --- a/Test/baseResults/spv.debuginfo.hlsl.frag.out +++ b/Test/baseResults/spv.debuginfo.hlsl.frag.out @@ -1,987 +1,1136 @@ spv.debuginfo.hlsl.frag -Validation failed // Module Version 10000 // Generated by (magic number): 8000b -// Id's are bound by 743 +// Id's are bound by 879 Capability Shader Capability ImageQuery Extension "SPV_KHR_non_semantic_info" - 1: ExtInstImport "NonSemantic.Shader.DebugInfo.100" - 2: ExtInstImport "GLSL.std.450" + 2: ExtInstImport "NonSemantic.Shader.DebugInfo.100" + 3: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Fragment 5 "main" 736 739 - ExecutionMode 5 OriginUpperLeft + EntryPoint Fragment 6 "main" 872 875 + ExecutionMode 6 OriginUpperLeft + 1: String "" 9: String "float" 12: String "uint" - 32: String "textureProj" - 35: String "" - 43: String "P" - 47: String "layer" - 50: String "offset" - 57: String "filterPCF" - 63: String "sc" - 75: String "shadow" - 81: String "fragcolor" - 84: String "fragPos" - 90: String "@main" - 96: String "inUV" - 106: String "shadowCoord" - 128: String "bool" - 141: String "dist" - 146: String "type.2d.image" - 147: String "@type.2d.image" - 152: String "textureShadowMap" - 157: String "type.sampler" - 158: String "@type.sampler" - 162: String "samplerShadowMap" - 166: String "type.sampled.image" - 167: String "@type.sampled.image" - 203: String "sizeQueryTemp" - 209: String "int" - 216: String "texDim" - 230: String "elements" - 237: String "levels" - 244: String "scale" - 250: String "dx" - 261: String "dy" - 272: String "shadowFactor" - 277: String "count" - 283: String "range" - 289: String "x" - 305: String "y" - 351: String "i" - 365: String "shadowClip" - 378: String "color" - 384: String "viewMatrix" - 388: String "Light" - 394: String "lights" - 397: String "displayDebugTarget" - 402: String "UBO" - 405: String "ubo" - 445: String "textureposition" - 450: String "samplerposition" - 460: String "normal" - 465: String "textureNormal" - 470: String "samplerNormal" - 478: String "albedo" - 483: String "textureAlbedo" - 488: String "samplerAlbedo" - 541: String "N" - 560: String "L" - 580: String "V" - 592: String "lightCosInnerAngle" - 598: String "lightCosOuterAngle" - 604: String "lightRange" - 610: String "dir" - 625: String "cosDir" - 633: String "spotEffect" - 642: String "heightAttenuation" - 650: String "NdotL" - 659: String "diff" - 666: String "R" - 675: String "NdotR" - 684: String "spec" - Name 5 "main" - Name 31 "textureProj(vf4;f1;vf2;" - Name 28 "P" - Name 29 "layer" - Name 30 "offset" - Name 56 "filterPCF(vf4;f1;" - Name 54 "sc" - Name 55 "layer" - Name 74 "shadow(vf3;vf3;" - Name 72 "fragcolor" - Name 73 "fragPos" - Name 89 "@main(vf2;" - Name 88 "inUV" - Name 99 "shadow" - Name 104 "shadowCoord" - Name 139 "dist" - Name 150 "textureShadowMap" - Name 160 "samplerShadowMap" - Name 201 "sizeQueryTemp" - Name 214 "texDim" - Name 228 "elements" - Name 235 "levels" - Name 242 "scale" - Name 248 "dx" - Name 259 "dy" - Name 270 "shadowFactor" - Name 275 "count" - Name 281 "range" - Name 287 "x" - Name 303 "y" - Name 328 "param" - Name 330 "param" - Name 332 "param" - Name 349 "i" - Name 363 "shadowClip" - Name 376 "Light" - MemberName 376(Light) 0 "position" - MemberName 376(Light) 1 "target" - MemberName 376(Light) 2 "color" - MemberName 376(Light) 3 "viewMatrix" - Name 391 "UBO" - MemberName 391(UBO) 0 "viewPos" - MemberName 391(UBO) 1 "lights" - MemberName 391(UBO) 2 "useShadows" - MemberName 391(UBO) 3 "displayDebugTarget" - Name 403 "ubo" - MemberName 403(ubo) 0 "ubo" - Name 410 "" - Name 417 "shadowFactor" - Name 423 "param" - Name 425 "param" - Name 436 "fragPos" - Name 443 "textureposition" - Name 448 "samplerposition" - Name 458 "normal" - Name 463 "textureNormal" - Name 468 "samplerNormal" - Name 476 "albedo" - Name 481 "textureAlbedo" - Name 486 "samplerAlbedo" - Name 508 "fragcolor" - Name 513 "param" - Name 514 "param" - Name 539 "N" - Name 546 "i" - Name 558 "L" - Name 570 "dist" - Name 578 "V" - Name 590 "lightCosInnerAngle" - Name 596 "lightCosOuterAngle" - Name 602 "lightRange" - Name 608 "dir" - Name 623 "cosDir" - Name 631 "spotEffect" - Name 640 "heightAttenuation" - Name 648 "NdotL" - Name 657 "diff" - Name 664 "R" - Name 673 "NdotR" - Name 682 "spec" - Name 722 "param" - Name 724 "param" - Name 734 "inUV" - Name 736 "inUV" - Name 739 "@entryPointOutput" - Name 740 "param" - Decorate 150(textureShadowMap) DescriptorSet 0 - Decorate 150(textureShadowMap) Binding 5 - Decorate 160(samplerShadowMap) DescriptorSet 0 - Decorate 160(samplerShadowMap) Binding 5 - MemberDecorate 376(Light) 0 Offset 0 - MemberDecorate 376(Light) 1 Offset 16 - MemberDecorate 376(Light) 2 Offset 32 - MemberDecorate 376(Light) 3 RowMajor - MemberDecorate 376(Light) 3 Offset 48 - MemberDecorate 376(Light) 3 MatrixStride 16 - Decorate 389 ArrayStride 112 - MemberDecorate 391(UBO) 0 Offset 0 - MemberDecorate 391(UBO) 1 Offset 16 - MemberDecorate 391(UBO) 2 Offset 352 - MemberDecorate 391(UBO) 3 Offset 356 - MemberDecorate 403(ubo) 0 Offset 0 - Decorate 403(ubo) Block - Decorate 410 DescriptorSet 0 - Decorate 410 Binding 4 - Decorate 443(textureposition) DescriptorSet 0 - Decorate 443(textureposition) Binding 1 - Decorate 448(samplerposition) DescriptorSet 0 - Decorate 448(samplerposition) Binding 1 - Decorate 463(textureNormal) DescriptorSet 0 - Decorate 463(textureNormal) Binding 2 - Decorate 468(samplerNormal) DescriptorSet 0 - Decorate 468(samplerNormal) Binding 2 - Decorate 481(textureAlbedo) DescriptorSet 0 - Decorate 481(textureAlbedo) Binding 3 - Decorate 486(samplerAlbedo) DescriptorSet 0 - Decorate 486(samplerAlbedo) Binding 3 - Decorate 736(inUV) Location 0 - Decorate 739(@entryPointOutput) Location 0 - 3: TypeVoid - 4: TypeFunction 3 - 7: TypeFloat 32 - 10: TypeInt 32 0 - 13: 10(int) Constant 32 - 14: 10(int) Constant 6 - 15: 10(int) Constant 0 - 11: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 12 13 14 15 - 16: 10(int) Constant 3 - 8: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 9 13 16 15 - 17: TypeVector 7(float) 4 - 18: 10(int) Constant 4 - 19: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 6(FSign) 8 18 - 20: TypePointer Function 17(fvec4) - 21: TypePointer Function 7(float) - 22: TypeVector 7(float) 2 - 23: 10(int) Constant 2 - 24: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 6(FSign) 8 23 - 25: TypePointer Function 22(fvec2) - 26: TypeFunction 7(float) 20(ptr) 21(ptr) 25(ptr) - 27: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 8(Floor) 16 8 19 8 24 - 34: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 35(Modf) 0 35 - 37: 10(int) Constant 1 - 38: 10(int) Constant 5 - 36: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 1(Round) 37 18 34 38 - 33: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 20(Cosh) 32 27 34 15 15 36 32 16 15 - 42: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 43 19 34 15 15 33 18 37 - 45: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 31(Sqrt) - 46: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 47 8 34 15 15 33 18 23 - 49: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 50 24 34 15 15 33 18 16 - 52: TypeFunction 7(float) 20(ptr) 21(ptr) - 53: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 8(Floor) 16 8 19 8 - 58: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 20(Cosh) 57 53 34 15 15 36 57 16 15 - 62: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 63 19 34 15 15 58 18 37 - 65: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 47 8 34 15 15 58 18 23 - 67: TypeVector 7(float) 3 - 68: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 6(FSign) 8 16 - 69: TypePointer Function 67(fvec3) - 70: TypeFunction 67(fvec3) 69(ptr) 69(ptr) - 71: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 8(Floor) 16 68 68 68 - 76: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 20(Cosh) 75 71 34 15 15 36 75 16 15 - 80: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 81 68 34 15 15 76 18 37 - 83: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 84 68 34 15 15 76 18 23 - 86: TypeFunction 17(fvec4) 25(ptr) - 87: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 8(Floor) 16 19 24 - 91: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 20(Cosh) 90 87 34 15 15 36 90 16 15 - 95: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 96 24 34 15 15 91 18 37 - 101: 10(int) Constant 62 - 100: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 75 8 34 101 15 33 18 - 103: 7(float) Constant 1065353216 - 107: 10(int) Constant 63 - 105: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 106 19 34 107 15 33 18 - 116: 7(float) Constant 1056964608 - 126: 7(float) Constant 3212836864 - 127: TypeBool - 129: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 128 13 23 15 - 133: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 128 13 23 15 - 135: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 128 13 23 15 - 142: 10(int) Constant 68 - 140: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 141 8 34 142 15 33 18 - 144: TypeImage 7(float) 2D array sampled format:Unknown - 148: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 0(Unknown) - 145: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(Fract) 146 15 34 142 15 36 147 148 16 - 149: TypePointer UniformConstant 144 -150(textureShadowMap): 149(ptr) Variable UniformConstant - 153: 10(int) Constant 8 - 151: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(Atan) 152 145 34 142 15 36 152 150(textureShadowMap) 153 - 155: TypeSampler - 156: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(Fract) 157 37 34 142 15 36 158 148 16 - 159: TypePointer UniformConstant 155 -160(samplerShadowMap): 159(ptr) Variable UniformConstant - 161: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(Atan) 162 156 34 142 15 36 162 160(samplerShadowMap) 153 - 164: TypeSampledImage 144 - 165: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(Fract) 166 15 34 142 15 36 167 148 16 - 181: 7(float) Constant 0 - 182: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 128 13 23 15 - 187: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 128 13 23 15 - 189: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 128 13 23 15 - 193: 7(float) Constant 1048576000 - 198: TypeVector 10(int) 3 - 199: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 6(FSign) 11 16 - 200: TypePointer Function 198(ivec3) - 204: 10(int) Constant 80 - 202: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 203 199 34 204 15 58 18 - 208: TypeInt 32 1 - 210: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 209 13 18 15 - 211: TypeVector 208(int) 2 - 212: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 6(FSign) 210 23 - 213: TypePointer Function 211(ivec2) - 215: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 216 212 34 204 15 58 18 - 218: TypePointer Function 10(int) - 222: TypePointer Function 208(int) - 229: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 230 210 34 204 15 58 18 - 236: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 237 210 34 204 15 58 18 - 245: 10(int) Constant 81 - 243: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 244 8 34 245 15 58 18 - 247: 7(float) Constant 1069547520 - 251: 10(int) Constant 82 - 249: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 250 8 34 251 15 58 18 - 262: 10(int) Constant 83 - 260: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 261 8 34 262 15 58 18 - 273: 10(int) Constant 85 - 271: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 272 8 34 273 15 58 18 - 278: 10(int) Constant 86 - 276: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 277 210 34 278 15 58 18 - 280: 208(int) Constant 0 - 284: 10(int) Constant 87 - 282: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 283 210 34 284 15 58 18 - 286: 208(int) Constant 1 - 290: 10(int) Constant 89 - 288: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 289 210 34 290 15 58 18 - 301: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 128 13 23 15 - 306: 10(int) Constant 91 - 304: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 305 210 34 306 15 58 18 - 317: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 128 13 23 15 - 352: 10(int) Constant 102 - 350: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 351 210 34 352 15 76 18 - 360: 208(int) Constant 3 - 361: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 128 13 23 15 - 366: 10(int) Constant 104 - 364: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 365 19 34 366 15 76 18 - 373: TypeMatrix 17(fvec4) 4 - 375: 127(bool) ConstantTrue - 374: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 108 19 18 375 - 376(Light): TypeStruct 17(fvec4) 17(fvec4) 17(fvec4) 373 - 379: 10(int) Constant 46 - 380: 10(int) Constant 14 - 377: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 378 19 34 379 380 15 15 16 - 381: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 378 19 34 379 380 15 15 16 - 382: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 378 19 34 379 380 15 15 16 - 385: 10(int) Constant 47 - 386: 10(int) Constant 21 - 383: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 384 374 34 385 386 15 15 16 - 387: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(Fract) 388 37 34 366 15 36 388 15 16 377 381 382 383 - 389: TypeArray 376(Light) 16 - 390: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 5(SAbs) 387 16 - 391(UBO): TypeStruct 17(fvec4) 389 208(int) 208(int) - 392: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 378 19 34 379 380 15 15 16 - 395: 10(int) Constant 53 - 393: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 394 390 34 395 380 15 15 16 - 398: 10(int) Constant 55 - 399: 10(int) Constant 24 - 396: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 397 210 34 398 399 15 15 16 - 400: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 397 210 34 398 399 15 15 16 - 401: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(Fract) 402 37 34 366 15 36 402 15 16 392 393 396 400 - 403(ubo): TypeStruct 391(UBO) - 406: 10(int) Constant 58 - 407: 10(int) Constant 37 - 404: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 405 401 34 406 407 15 15 16 - 408: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(Fract) 405 37 34 366 15 36 405 15 16 404 - 409: TypePointer Uniform 403(ubo) - 410: 409(ptr) Variable Uniform - 411: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(Atan) 35 408 34 366 15 36 35 410 153 - 413: TypePointer Uniform 373 - 419: 10(int) Constant 108 - 418: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 272 8 34 419 15 76 18 - 438: 10(int) Constant 121 - 437: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 84 68 34 438 15 91 18 - 440: TypeImage 7(float) 2D sampled format:Unknown - 441: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(Fract) 146 15 34 438 15 36 147 148 16 - 442: TypePointer UniformConstant 440 -443(textureposition): 442(ptr) Variable UniformConstant - 444: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(Atan) 445 441 34 438 15 36 445 443(textureposition) 153 - 447: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(Fract) 157 37 34 438 15 36 158 148 16 -448(samplerposition): 159(ptr) Variable UniformConstant - 449: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(Atan) 450 447 34 438 15 36 450 448(samplerposition) 153 - 452: TypeSampledImage 440 - 453: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(Fract) 166 15 34 438 15 36 167 148 16 - 461: 10(int) Constant 122 - 459: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 460 68 34 461 15 91 18 -463(textureNormal): 442(ptr) Variable UniformConstant - 464: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(Atan) 465 441 34 461 15 36 465 463(textureNormal) 153 - 467: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(Fract) 157 37 34 461 15 36 158 148 16 -468(samplerNormal): 159(ptr) Variable UniformConstant - 469: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(Atan) 470 467 34 461 15 36 470 468(samplerNormal) 153 - 479: 10(int) Constant 123 - 477: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 478 19 34 479 15 91 18 -481(textureAlbedo): 442(ptr) Variable UniformConstant - 482: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(Atan) 483 441 34 479 15 36 483 481(textureAlbedo) 153 - 485: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(Fract) 157 37 34 479 15 36 158 148 16 -486(samplerAlbedo): 159(ptr) Variable UniformConstant - 487: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(Atan) 488 485 34 479 15 36 488 486(samplerAlbedo) 153 - 493: TypePointer Uniform 208(int) - 496: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 128 13 23 15 - 510: 10(int) Constant 131 - 509: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 81 68 34 510 15 91 18 - 512: 67(fvec3) ConstantComposite 103 103 103 - 537: 7(float) Constant 1036831949 - 542: 10(int) Constant 152 - 540: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 541 68 34 542 15 91 18 - 548: 10(int) Constant 154 - 547: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 351 210 34 548 15 91 18 - 556: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 128 13 23 15 - 561: 10(int) Constant 157 - 559: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 560 68 34 561 15 91 18 - 564: TypePointer Uniform 17(fvec4) - 572: 10(int) Constant 159 - 571: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 141 8 34 572 15 91 18 - 581: 10(int) Constant 163 - 579: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 580 68 34 581 15 91 18 - 593: 10(int) Constant 166 - 591: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 592 8 34 593 15 91 18 - 595: 7(float) Constant 1064781546 - 599: 10(int) Constant 167 - 597: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 598 8 34 599 15 91 18 - 601: 7(float) Constant 1063781322 - 605: 10(int) Constant 168 - 603: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 604 8 34 605 15 91 18 - 607: 7(float) Constant 1120403456 - 611: 10(int) Constant 171 - 609: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 610 68 34 611 15 91 18 - 626: 10(int) Constant 174 - 624: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 625 8 34 626 15 91 18 - 634: 10(int) Constant 175 - 632: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 633 8 34 634 15 91 18 - 643: 10(int) Constant 176 - 641: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 642 8 34 643 15 91 18 - 651: 10(int) Constant 179 - 649: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 650 8 34 651 15 91 18 - 660: 10(int) Constant 180 - 658: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 659 68 34 660 15 91 18 - 667: 10(int) Constant 183 - 665: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 666 68 34 667 15 91 18 - 676: 10(int) Constant 184 - 674: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 675 8 34 676 15 91 18 - 685: 10(int) Constant 185 - 683: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 684 68 34 685 15 91 18 - 688: 7(float) Constant 1098907648 - 693: 7(float) Constant 1075838976 - 704: 208(int) Constant 2 - 718: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 128 13 23 15 - 735: TypePointer Input 22(fvec2) - 736(inUV): 735(ptr) Variable Input - 738: TypePointer Output 17(fvec4) -739(@entryPointOutput): 738(ptr) Variable Output - 5(main): 3 Function None 4 - 6: Label - 734(inUV): 25(ptr) Variable Function - 740(param): 25(ptr) Variable Function - 737: 22(fvec2) Load 736(inUV) - Store 734(inUV) 737 - 741: 22(fvec2) Load 734(inUV) - Store 740(param) 741 - 742: 17(fvec4) FunctionCall 89(@main(vf2;) 740(param) - Store 739(@entryPointOutput) 742 + 34: String "textureProj" + 37: String "// OpModuleProcessed auto-map-locations +// OpModuleProcessed auto-map-bindings +// OpModuleProcessed entry-point main +// OpModuleProcessed client vulkan100 +// OpModuleProcessed target-env vulkan1.0 +// OpModuleProcessed keep-uncalled +// OpModuleProcessed hlsl-offsets +#line 1 +" + 45: String "P" + 49: String "layer" + 52: String "offset" + 60: String "filterPCF" + 66: String "sc" + 79: String "shadow" + 85: String "fragcolor" + 88: String "fragPos" + 95: String "@main" + 101: String "inUV" + 115: String "shadowCoord" + 140: String "bool" + 154: String "dist" + 158: String "type.2d.image" + 159: String "@type.2d.image" + 164: String "textureShadowMap" + 169: String "type.sampler" + 170: String "@type.sampler" + 174: String "samplerShadowMap" + 178: String "type.sampled.image" + 179: String "@type.sampled.image" + 223: String "sizeQueryTemp" + 228: String "int" + 235: String "texDim" + 249: String "elements" + 256: String "levels" + 265: String "scale" + 272: String "dx" + 284: String "dy" + 296: String "shadowFactor" + 302: String "count" + 309: String "range" + 316: String "x" + 337: String "y" + 400: String "i" + 419: String "shadowClip" + 431: String "color" + 437: String "viewMatrix" + 441: String "Light" + 447: String "lights" + 450: String "displayDebugTarget" + 455: String "UBO" + 458: String "ubo" + 508: String "textureposition" + 513: String "samplerposition" + 525: String "normal" + 529: String "textureNormal" + 534: String "samplerNormal" + 544: String "albedo" + 548: String "textureAlbedo" + 553: String "samplerAlbedo" + 642: String "N" + 667: String "L" + 691: String "V" + 706: String "lightCosInnerAngle" + 713: String "lightCosOuterAngle" + 720: String "lightRange" + 727: String "dir" + 743: String "cosDir" + 752: String "spotEffect" + 762: String "heightAttenuation" + 771: String "NdotL" + 781: String "diff" + 789: String "R" + 799: String "NdotR" + 809: String "spec" + Name 6 "main" + Name 32 "textureProj(vf4;f1;vf2;" + Name 29 "P" + Name 30 "layer" + Name 31 "offset" + Name 58 "filterPCF(vf4;f1;" + Name 56 "sc" + Name 57 "layer" + Name 77 "shadow(vf3;vf3;" + Name 75 "fragcolor" + Name 76 "fragPos" + Name 93 "@main(vf2;" + Name 92 "inUV" + Name 107 "shadow" + Name 113 "shadowCoord" + Name 152 "dist" + Name 162 "textureShadowMap" + Name 172 "samplerShadowMap" + Name 221 "sizeQueryTemp" + Name 233 "texDim" + Name 247 "elements" + Name 254 "levels" + Name 263 "scale" + Name 270 "dx" + Name 282 "dy" + Name 294 "shadowFactor" + Name 300 "count" + Name 307 "range" + Name 314 "x" + Name 335 "y" + Name 365 "param" + Name 367 "param" + Name 369 "param" + Name 398 "i" + Name 417 "shadowClip" + Name 429 "Light" + MemberName 429(Light) 0 "position" + MemberName 429(Light) 1 "target" + MemberName 429(Light) 2 "color" + MemberName 429(Light) 3 "viewMatrix" + Name 444 "UBO" + MemberName 444(UBO) 0 "viewPos" + MemberName 444(UBO) 1 "lights" + MemberName 444(UBO) 2 "useShadows" + MemberName 444(UBO) 3 "displayDebugTarget" + Name 456 "ubo" + MemberName 456(ubo) 0 "ubo" + Name 463 "" + Name 472 "shadowFactor" + Name 477 "param" + Name 479 "param" + Name 500 "fragPos" + Name 506 "textureposition" + Name 511 "samplerposition" + Name 523 "normal" + Name 527 "textureNormal" + Name 532 "samplerNormal" + Name 542 "albedo" + Name 546 "textureAlbedo" + Name 551 "samplerAlbedo" + Name 580 "fragcolor" + Name 584 "param" + Name 585 "param" + Name 640 "N" + Name 648 "i" + Name 665 "L" + Name 678 "dist" + Name 689 "V" + Name 704 "lightCosInnerAngle" + Name 711 "lightCosOuterAngle" + Name 718 "lightRange" + Name 725 "dir" + Name 741 "cosDir" + Name 750 "spotEffect" + Name 760 "heightAttenuation" + Name 769 "NdotL" + Name 779 "diff" + Name 787 "R" + Name 797 "NdotR" + Name 807 "spec" + Name 855 "param" + Name 857 "param" + Name 870 "inUV" + Name 872 "inUV" + Name 875 "@entryPointOutput" + Name 876 "param" + Decorate 162(textureShadowMap) DescriptorSet 0 + Decorate 162(textureShadowMap) Binding 5 + Decorate 172(samplerShadowMap) DescriptorSet 0 + Decorate 172(samplerShadowMap) Binding 5 + MemberDecorate 429(Light) 0 Offset 0 + MemberDecorate 429(Light) 1 Offset 16 + MemberDecorate 429(Light) 2 Offset 32 + MemberDecorate 429(Light) 3 RowMajor + MemberDecorate 429(Light) 3 Offset 48 + MemberDecorate 429(Light) 3 MatrixStride 16 + Decorate 442 ArrayStride 112 + MemberDecorate 444(UBO) 0 Offset 0 + MemberDecorate 444(UBO) 1 Offset 16 + MemberDecorate 444(UBO) 2 Offset 352 + MemberDecorate 444(UBO) 3 Offset 356 + MemberDecorate 456(ubo) 0 Offset 0 + Decorate 456(ubo) Block + Decorate 463 DescriptorSet 0 + Decorate 463 Binding 4 + Decorate 506(textureposition) DescriptorSet 0 + Decorate 506(textureposition) Binding 1 + Decorate 511(samplerposition) DescriptorSet 0 + Decorate 511(samplerposition) Binding 1 + Decorate 527(textureNormal) DescriptorSet 0 + Decorate 527(textureNormal) Binding 2 + Decorate 532(samplerNormal) DescriptorSet 0 + Decorate 532(samplerNormal) Binding 2 + Decorate 546(textureAlbedo) DescriptorSet 0 + Decorate 546(textureAlbedo) Binding 3 + Decorate 551(samplerAlbedo) DescriptorSet 0 + Decorate 551(samplerAlbedo) Binding 3 + Decorate 872(inUV) Location 0 + Decorate 875(@entryPointOutput) Location 0 + 4: TypeVoid + 5: TypeFunction 4 + 8: TypeFloat 32 + 11: TypeInt 32 0 + 14: 11(int) Constant 32 + 15: 11(int) Constant 6 + 16: 11(int) Constant 0 + 13: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 12 14 15 16 + 17: 11(int) Constant 3 + 10: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 9 14 17 16 + 18: TypeVector 8(float) 4 + 19: 11(int) Constant 4 + 20: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 10 19 + 21: TypePointer Function 18(fvec4) + 22: TypePointer Function 8(float) + 23: TypeVector 8(float) 2 + 24: 11(int) Constant 2 + 25: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 10 24 + 26: TypePointer Function 23(fvec2) + 27: TypeFunction 8(float) 21(ptr) 22(ptr) 26(ptr) + 28: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 8(DebugTypeFunction) 17 10 20 10 25 + 36: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 35(DebugSource) 1 37 + 38: 11(int) Constant 61 + 40: 11(int) Constant 1 + 41: 11(int) Constant 5 + 39: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 1(DebugCompilationUnit) 40 19 36 41 + 35: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 20(DebugFunction) 34 28 36 38 16 39 34 17 38 + 44: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 45 20 36 38 16 35 19 40 + 47: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 31(DebugExpression) + 48: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 49 10 36 38 16 35 19 24 + 51: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 52 25 36 38 16 35 19 17 + 54: TypeFunction 8(float) 21(ptr) 22(ptr) + 55: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 8(DebugTypeFunction) 17 10 20 10 + 62: 11(int) Constant 78 + 61: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 20(DebugFunction) 60 55 36 62 16 39 60 17 62 + 65: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 66 20 36 62 16 61 19 40 + 68: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 49 10 36 62 16 61 19 24 + 70: TypeVector 8(float) 3 + 71: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 10 17 + 72: TypePointer Function 70(fvec3) + 73: TypeFunction 70(fvec3) 72(ptr) 72(ptr) + 74: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 8(DebugTypeFunction) 17 71 71 71 + 81: 11(int) Constant 101 + 80: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 20(DebugFunction) 79 74 36 81 16 39 79 17 81 + 84: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 85 71 36 81 16 80 19 40 + 87: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 88 71 36 81 16 80 19 24 + 90: TypeFunction 18(fvec4) 26(ptr) + 91: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 8(DebugTypeFunction) 17 20 25 + 97: 11(int) Constant 119 + 96: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 20(DebugFunction) 95 91 36 97 16 39 95 17 97 + 100: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 101 25 36 97 16 96 19 40 + 106: 11(int) Constant 62 + 108: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 79 10 36 106 16 35 19 + 110: 8(float) Constant 1065353216 + 112: 11(int) Constant 63 + 114: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 115 20 36 112 16 35 19 + 123: 11(int) Constant 64 + 126: 8(float) Constant 1056964608 + 135: 11(int) Constant 66 + 138: 8(float) Constant 3212836864 + 139: TypeBool + 141: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 140 14 24 16 + 151: 11(int) Constant 68 + 153: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 154 10 36 151 16 35 19 + 156: TypeImage 8(float) 2D array sampled format:Unknown + 160: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 0(DebugInfoNone) + 157: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 158 16 36 151 16 39 159 160 17 + 161: TypePointer UniformConstant 156 +162(textureShadowMap): 161(ptr) Variable UniformConstant + 165: 11(int) Constant 8 + 163: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 164 157 36 151 16 39 164 162(textureShadowMap) 165 + 167: TypeSampler + 168: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 169 40 36 151 16 39 170 160 17 + 171: TypePointer UniformConstant 167 +172(samplerShadowMap): 171(ptr) Variable UniformConstant + 173: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 174 168 36 151 16 39 174 172(samplerShadowMap) 165 + 176: TypeSampledImage 156 + 177: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 178 16 36 151 16 39 179 160 17 + 192: 11(int) Constant 69 + 195: 8(float) Constant 0 + 206: 11(int) Constant 71 + 207: 8(float) Constant 1048576000 + 210: 11(int) Constant 74 + 217: 11(int) Constant 80 + 218: TypeVector 11(int) 3 + 219: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 13 17 + 220: TypePointer Function 218(ivec3) + 222: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 223 219 36 217 16 61 19 + 227: TypeInt 32 1 + 229: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 228 14 19 16 + 230: TypeVector 227(int) 2 + 231: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 229 24 + 232: TypePointer Function 230(ivec2) + 234: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 235 231 36 217 16 61 19 + 237: TypePointer Function 11(int) + 241: TypePointer Function 227(int) + 248: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 249 229 36 217 16 61 19 + 255: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 256 229 36 217 16 61 19 + 262: 11(int) Constant 81 + 264: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 265 10 36 262 16 61 19 + 267: 8(float) Constant 1069547520 + 269: 11(int) Constant 82 + 271: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 272 10 36 269 16 61 19 + 281: 11(int) Constant 83 + 283: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 284 10 36 281 16 61 19 + 293: 11(int) Constant 85 + 295: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 296 10 36 293 16 61 19 + 299: 11(int) Constant 86 + 301: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 302 229 36 299 16 61 19 + 304: 227(int) Constant 0 + 306: 11(int) Constant 87 + 308: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 309 229 36 306 16 61 19 + 311: 227(int) Constant 1 + 313: 11(int) Constant 89 + 315: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 316 229 36 313 16 61 19 + 334: 11(int) Constant 91 + 336: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 337 229 36 334 16 61 19 + 355: 11(int) Constant 93 + 374: 11(int) Constant 94 + 387: 11(int) Constant 98 + 397: 11(int) Constant 102 + 399: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 400 229 36 397 16 80 19 + 412: 227(int) Constant 3 + 416: 11(int) Constant 104 + 418: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 419 20 36 416 16 80 19 + 426: TypeMatrix 18(fvec4) 4 + 428: 139(bool) ConstantTrue + 427: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 108(DebugTypeMatrix) 20 19 428 + 429(Light): TypeStruct 18(fvec4) 18(fvec4) 18(fvec4) 426 + 432: 11(int) Constant 46 + 433: 11(int) Constant 14 + 430: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 431 20 36 432 433 16 16 17 + 434: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 431 20 36 432 433 16 16 17 + 435: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 431 20 36 432 433 16 16 17 + 438: 11(int) Constant 47 + 439: 11(int) Constant 21 + 436: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 437 427 36 438 439 16 16 17 + 440: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 441 40 36 416 16 39 441 16 17 430 434 435 436 + 442: TypeArray 429(Light) 17 + 443: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 440 17 + 444(UBO): TypeStruct 18(fvec4) 442 227(int) 227(int) + 445: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 431 20 36 432 433 16 16 17 + 448: 11(int) Constant 53 + 446: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 447 443 36 448 433 16 16 17 + 451: 11(int) Constant 55 + 452: 11(int) Constant 24 + 449: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 450 229 36 451 452 16 16 17 + 453: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 450 229 36 451 452 16 16 17 + 454: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 455 40 36 416 16 39 455 16 17 445 446 449 453 + 456(ubo): TypeStruct 444(UBO) + 459: 11(int) Constant 58 + 460: 11(int) Constant 37 + 457: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 458 454 36 459 460 16 16 17 + 461: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 458 40 36 416 16 39 458 16 17 457 + 462: TypePointer Uniform 456(ubo) + 463: 462(ptr) Variable Uniform + 464: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 1 461 36 416 16 39 1 463 165 + 466: TypePointer Uniform 426 + 471: 11(int) Constant 108 + 473: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 296 10 36 471 16 80 19 + 482: 11(int) Constant 113 + 492: 11(int) Constant 115 + 499: 11(int) Constant 121 + 501: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 88 71 36 499 16 96 19 + 503: TypeImage 8(float) 2D sampled format:Unknown + 504: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 158 16 36 499 16 39 159 160 17 + 505: TypePointer UniformConstant 503 +506(textureposition): 505(ptr) Variable UniformConstant + 507: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 508 504 36 499 16 39 508 506(textureposition) 165 + 510: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 169 40 36 499 16 39 170 160 17 +511(samplerposition): 171(ptr) Variable UniformConstant + 512: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 513 510 36 499 16 39 513 511(samplerposition) 165 + 515: TypeSampledImage 503 + 516: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 178 16 36 499 16 39 179 160 17 + 522: 11(int) Constant 122 + 524: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 525 71 36 522 16 96 19 +527(textureNormal): 505(ptr) Variable UniformConstant + 528: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 529 504 36 522 16 39 529 527(textureNormal) 165 + 531: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 169 40 36 522 16 39 170 160 17 +532(samplerNormal): 171(ptr) Variable UniformConstant + 533: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 534 531 36 522 16 39 534 532(samplerNormal) 165 + 541: 11(int) Constant 123 + 543: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 544 20 36 541 16 96 19 +546(textureAlbedo): 505(ptr) Variable UniformConstant + 547: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 548 504 36 541 16 39 548 546(textureAlbedo) 165 + 550: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 169 40 36 541 16 39 170 160 17 +551(samplerAlbedo): 171(ptr) Variable UniformConstant + 552: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 553 550 36 541 16 39 553 551(samplerAlbedo) 165 + 559: 11(int) Constant 128 + 560: TypePointer Uniform 227(int) + 568: 11(int) Constant 129 + 579: 11(int) Constant 131 + 581: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 85 71 36 579 16 96 19 + 583: 70(fvec3) ConstantComposite 110 110 110 + 589: 11(int) Constant 132 + 593: 11(int) Constant 134 + 596: 11(int) Constant 135 + 600: 11(int) Constant 137 + 603: 11(int) Constant 138 + 607: 11(int) Constant 140 + 611: 11(int) Constant 141 + 615: 11(int) Constant 143 + 619: 11(int) Constant 144 + 624: 11(int) Constant 146 + 633: 11(int) Constant 150 + 636: 8(float) Constant 1036831949 + 639: 11(int) Constant 152 + 641: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 642 71 36 639 16 96 19 + 647: 11(int) Constant 154 + 649: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 400 229 36 647 16 96 19 + 664: 11(int) Constant 157 + 666: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 667 71 36 664 16 96 19 + 670: TypePointer Uniform 18(fvec4) + 677: 11(int) Constant 159 + 679: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 154 10 36 677 16 96 19 + 684: 11(int) Constant 160 + 688: 11(int) Constant 163 + 690: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 691 71 36 688 16 96 19 + 699: 11(int) Constant 164 + 703: 11(int) Constant 166 + 705: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 706 10 36 703 16 96 19 + 708: 8(float) Constant 1064781546 + 710: 11(int) Constant 167 + 712: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 713 10 36 710 16 96 19 + 715: 8(float) Constant 1063781322 + 717: 11(int) Constant 168 + 719: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 720 10 36 717 16 96 19 + 722: 8(float) Constant 1120403456 + 724: 11(int) Constant 171 + 726: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 727 71 36 724 16 96 19 + 740: 11(int) Constant 174 + 742: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 743 10 36 740 16 96 19 + 749: 11(int) Constant 175 + 751: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 752 10 36 749 16 96 19 + 759: 11(int) Constant 176 + 761: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 762 10 36 759 16 96 19 + 768: 11(int) Constant 179 + 770: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 771 10 36 768 16 96 19 + 778: 11(int) Constant 180 + 780: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 781 71 36 778 16 96 19 + 786: 11(int) Constant 183 + 788: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 789 71 36 786 16 96 19 + 796: 11(int) Constant 184 + 798: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 799 10 36 796 16 96 19 + 806: 11(int) Constant 185 + 808: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 809 71 36 806 16 96 19 + 812: 8(float) Constant 1098907648 + 817: 8(float) Constant 1075838976 + 821: 11(int) Constant 187 + 830: 227(int) Constant 2 + 846: 11(int) Constant 191 + 854: 11(int) Constant 193 + 862: 11(int) Constant 196 + 871: TypePointer Input 23(fvec2) + 872(inUV): 871(ptr) Variable Input + 874: TypePointer Output 18(fvec4) +875(@entryPointOutput): 874(ptr) Variable Output + Line 1 119 1 + 6(main): 4 Function None 5 + 7: Label + 870(inUV): 26(ptr) Variable Function + 876(param): 26(ptr) Variable Function + Line 1 119 0 + 873: 23(fvec2) Load 872(inUV) + Store 870(inUV) 873 + 877: 23(fvec2) Load 870(inUV) + Store 876(param) 877 + 878: 18(fvec4) FunctionCall 93(@main(vf2;) 876(param) + Store 875(@entryPointOutput) 878 Return FunctionEnd -31(textureProj(vf4;f1;vf2;): 7(float) Function None 26 - 28(P): 20(ptr) FunctionParameter - 29(layer): 21(ptr) FunctionParameter - 30(offset): 25(ptr) FunctionParameter - 39: Label - 99(shadow): 21(ptr) Variable Function -104(shadowCoord): 20(ptr) Variable Function - 139(dist): 21(ptr) Variable Function - 40: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(Acosh) 33 - 41: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103 34 15 15 15 15 - 44: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 42 28(P) 45 - 48: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 46 29(layer) 45 - 51: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 49 30(offset) 45 - 98: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 101 33 31(textureProj(vf4;f1;vf2;) - 102: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 100 99(shadow) 45 - Store 99(shadow) 103 - 108: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 105 104(shadowCoord) 45 - 109: 17(fvec4) Load 28(P) - 110: 21(ptr) AccessChain 28(P) 16 - 111: 7(float) Load 110 - 112: 17(fvec4) CompositeConstruct 111 111 111 111 - 113: 17(fvec4) FDiv 109 112 - Store 104(shadowCoord) 113 - 114: 17(fvec4) Load 104(shadowCoord) - 115: 22(fvec2) VectorShuffle 114 114 0 1 - 117: 22(fvec2) VectorTimesScalar 115 116 - 118: 22(fvec2) CompositeConstruct 116 116 - 119: 22(fvec2) FAdd 117 118 - 120: 21(ptr) AccessChain 104(shadowCoord) 15 - 121: 7(float) CompositeExtract 119 0 - Store 120 121 - 122: 21(ptr) AccessChain 104(shadowCoord) 37 - 123: 7(float) CompositeExtract 119 1 - Store 122 123 - 124: 21(ptr) AccessChain 104(shadowCoord) 23 - 125: 7(float) Load 124 - 130: 127(bool) FOrdGreaterThan 125 126 - 131: 21(ptr) AccessChain 104(shadowCoord) 23 - 132: 7(float) Load 131 - 134: 127(bool) FOrdLessThan 132 103 - 136: 127(bool) LogicalAnd 130 134 - SelectionMerge 138 None - BranchConditional 136 137 138 - 137: Label - 143: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 140 139(dist) 45 - 154: 144 Load 150(textureShadowMap) - 163: 155 Load 160(samplerShadowMap) - 168: 164 SampledImage 154 163 - 169: 17(fvec4) Load 104(shadowCoord) - 170: 22(fvec2) VectorShuffle 169 169 0 1 - 171: 22(fvec2) Load 30(offset) - 172: 22(fvec2) FAdd 170 171 - 173: 7(float) Load 29(layer) - 174: 7(float) CompositeExtract 172 0 - 175: 7(float) CompositeExtract 172 1 - 176: 67(fvec3) CompositeConstruct 174 175 173 - 177: 17(fvec4) ImageSampleImplicitLod 168 176 - 178: 7(float) CompositeExtract 177 0 - Store 139(dist) 178 - 179: 21(ptr) AccessChain 104(shadowCoord) 16 - 180: 7(float) Load 179 - 183: 127(bool) FOrdGreaterThan 180 181 - 184: 7(float) Load 139(dist) - 185: 21(ptr) AccessChain 104(shadowCoord) 23 - 186: 7(float) Load 185 - 188: 127(bool) FOrdLessThan 184 186 - 190: 127(bool) LogicalAnd 183 188 - SelectionMerge 192 None - BranchConditional 190 191 192 - 191: Label - Store 99(shadow) 193 - Branch 192 - 192: Label - Branch 138 - 138: Label - 194: 7(float) Load 99(shadow) - ReturnValue 194 + Line 1 61 1 +32(textureProj(vf4;f1;vf2;): 8(float) Function None 27 + 29(P): 21(ptr) FunctionParameter + 30(layer): 22(ptr) FunctionParameter + 31(offset): 26(ptr) FunctionParameter + 33: Label + 107(shadow): 22(ptr) Variable Function +113(shadowCoord): 21(ptr) Variable Function + 152(dist): 22(ptr) Variable Function + 42: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 35 + 43: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 36 38 38 16 16 + 46: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 44 29(P) 47 + 50: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 48 30(layer) 47 + 53: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 51 31(offset) 47 + 103: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 101(DebugFunctionDefinition) 35 32(textureProj(vf4;f1;vf2;) + 104: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 35 + 105: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 36 106 106 16 16 + 109: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 108 107(shadow) 47 + Store 107(shadow) 110 + 111: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 36 112 112 16 16 + 116: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 114 113(shadowCoord) 47 + 117: 18(fvec4) Load 29(P) + 118: 22(ptr) AccessChain 29(P) 17 + 119: 8(float) Load 118 + 120: 18(fvec4) CompositeConstruct 119 119 119 119 + 121: 18(fvec4) FDiv 117 120 + Store 113(shadowCoord) 121 + 122: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 36 123 123 16 16 + 124: 18(fvec4) Load 113(shadowCoord) + 125: 23(fvec2) VectorShuffle 124 124 0 1 + 127: 23(fvec2) VectorTimesScalar 125 126 + 128: 23(fvec2) CompositeConstruct 126 126 + 129: 23(fvec2) FAdd 127 128 + 130: 22(ptr) AccessChain 113(shadowCoord) 16 + 131: 8(float) CompositeExtract 129 0 + Store 130 131 + 132: 22(ptr) AccessChain 113(shadowCoord) 40 + 133: 8(float) CompositeExtract 129 1 + Store 132 133 + 134: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 36 135 135 16 16 + 136: 22(ptr) AccessChain 113(shadowCoord) 24 + 137: 8(float) Load 136 + 142: 139(bool) FOrdGreaterThan 137 138 + 143: 22(ptr) AccessChain 113(shadowCoord) 24 + 144: 8(float) Load 143 + 145: 139(bool) FOrdLessThan 144 110 + 146: 139(bool) LogicalAnd 142 145 + SelectionMerge 148 None + BranchConditional 146 147 148 + 147: Label + 149: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 35 + 150: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 36 151 151 16 16 + 155: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 153 152(dist) 47 + 166: 156 Load 162(textureShadowMap) + 175: 167 Load 172(samplerShadowMap) + 180: 176 SampledImage 166 175 + 181: 18(fvec4) Load 113(shadowCoord) + 182: 23(fvec2) VectorShuffle 181 181 0 1 + 183: 23(fvec2) Load 31(offset) + 184: 23(fvec2) FAdd 182 183 + 185: 8(float) Load 30(layer) + 186: 8(float) CompositeExtract 184 0 + 187: 8(float) CompositeExtract 184 1 + 188: 70(fvec3) CompositeConstruct 186 187 185 + 189: 18(fvec4) ImageSampleImplicitLod 180 188 + 190: 8(float) CompositeExtract 189 0 + Store 152(dist) 190 + 191: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 36 192 192 16 16 + 193: 22(ptr) AccessChain 113(shadowCoord) 17 + 194: 8(float) Load 193 + 196: 139(bool) FOrdGreaterThan 194 195 + 197: 8(float) Load 152(dist) + 198: 22(ptr) AccessChain 113(shadowCoord) 24 + 199: 8(float) Load 198 + 200: 139(bool) FOrdLessThan 197 199 + 201: 139(bool) LogicalAnd 196 200 + SelectionMerge 203 None + BranchConditional 201 202 203 + 202: Label + 204: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 35 + 205: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 36 206 206 16 16 + Store 107(shadow) 207 + Branch 203 + 203: Label + Branch 148 + 148: Label + 208: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 35 + 209: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 36 210 210 16 16 + 211: 8(float) Load 107(shadow) + ReturnValue 211 FunctionEnd -56(filterPCF(vf4;f1;): 7(float) Function None 52 - 54(sc): 20(ptr) FunctionParameter - 55(layer): 21(ptr) FunctionParameter + Line 1 78 1 +58(filterPCF(vf4;f1;): 8(float) Function None 54 + 56(sc): 21(ptr) FunctionParameter + 57(layer): 22(ptr) FunctionParameter 59: Label -201(sizeQueryTemp): 200(ptr) Variable Function - 214(texDim): 213(ptr) Variable Function - 228(elements): 222(ptr) Variable Function - 235(levels): 222(ptr) Variable Function - 242(scale): 21(ptr) Variable Function - 248(dx): 21(ptr) Variable Function - 259(dy): 21(ptr) Variable Function -270(shadowFactor): 21(ptr) Variable Function - 275(count): 222(ptr) Variable Function - 281(range): 222(ptr) Variable Function - 287(x): 222(ptr) Variable Function - 303(y): 222(ptr) Variable Function - 328(param): 20(ptr) Variable Function - 330(param): 21(ptr) Variable Function - 332(param): 25(ptr) Variable Function - 60: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(Acosh) 58 - 61: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103 34 15 15 15 15 - 64: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 62 54(sc) 45 - 66: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 65 55(layer) 45 - 197: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 101 58 56(filterPCF(vf4;f1;) - 205: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 202 201(sizeQueryTemp) 45 - 206: 144 Load 150(textureShadowMap) - 207: 198(ivec3) ImageQuerySizeLod 206 15 - Store 201(sizeQueryTemp) 207 - 217: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 215 214(texDim) 45 - 219: 218(ptr) AccessChain 201(sizeQueryTemp) 15 - 220: 10(int) Load 219 - 221: 208(int) Bitcast 220 - 223: 222(ptr) AccessChain 214(texDim) 15 - Store 223 221 - 224: 218(ptr) AccessChain 201(sizeQueryTemp) 37 - 225: 10(int) Load 224 - 226: 208(int) Bitcast 225 - 227: 222(ptr) AccessChain 214(texDim) 37 - Store 227 226 - 231: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 229 228(elements) 45 - 232: 218(ptr) AccessChain 201(sizeQueryTemp) 23 - 233: 10(int) Load 232 - 234: 208(int) Bitcast 233 - Store 228(elements) 234 - 238: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 236 235(levels) 45 - 239: 144 Load 150(textureShadowMap) - 240: 10(int) ImageQueryLevels 239 - 241: 208(int) Bitcast 240 - Store 235(levels) 241 - 246: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 243 242(scale) 45 - Store 242(scale) 247 - 252: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 249 248(dx) 45 - 253: 7(float) Load 242(scale) - 254: 7(float) FMul 253 103 - 255: 222(ptr) AccessChain 214(texDim) 15 - 256: 208(int) Load 255 - 257: 7(float) ConvertSToF 256 - 258: 7(float) FDiv 254 257 - Store 248(dx) 258 - 263: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 260 259(dy) 45 - 264: 7(float) Load 242(scale) - 265: 7(float) FMul 264 103 - 266: 222(ptr) AccessChain 214(texDim) 37 - 267: 208(int) Load 266 - 268: 7(float) ConvertSToF 267 - 269: 7(float) FDiv 265 268 - Store 259(dy) 269 - 274: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 271 270(shadowFactor) 45 - Store 270(shadowFactor) 181 - 279: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 276 275(count) 45 - Store 275(count) 280 - 285: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 282 281(range) 45 - Store 281(range) 286 - 291: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 288 287(x) 45 - 292: 208(int) Load 281(range) - 293: 208(int) SNegate 292 - Store 287(x) 293 - Branch 294 - 294: Label - LoopMerge 296 297 None - Branch 298 - 298: Label - 299: 208(int) Load 287(x) - 300: 208(int) Load 281(range) - 302: 127(bool) SLessThanEqual 299 300 - BranchConditional 302 295 296 - 295: Label - 307: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 304 303(y) 45 - 308: 208(int) Load 281(range) - 309: 208(int) SNegate 308 - Store 303(y) 309 - Branch 310 - 310: Label - LoopMerge 312 313 None - Branch 314 - 314: Label - 315: 208(int) Load 303(y) - 316: 208(int) Load 281(range) - 318: 127(bool) SLessThanEqual 315 316 - BranchConditional 318 311 312 - 311: Label - 319: 7(float) Load 248(dx) - 320: 208(int) Load 287(x) - 321: 7(float) ConvertSToF 320 - 322: 7(float) FMul 319 321 - 323: 7(float) Load 259(dy) - 324: 208(int) Load 303(y) - 325: 7(float) ConvertSToF 324 - 326: 7(float) FMul 323 325 - 327: 22(fvec2) CompositeConstruct 322 326 - 329: 17(fvec4) Load 54(sc) - Store 328(param) 329 - 331: 7(float) Load 55(layer) - Store 330(param) 331 - Store 332(param) 327 - 333: 7(float) FunctionCall 31(textureProj(vf4;f1;vf2;) 328(param) 330(param) 332(param) - 334: 7(float) Load 270(shadowFactor) - 335: 7(float) FAdd 334 333 - Store 270(shadowFactor) 335 - 336: 208(int) Load 275(count) - 337: 208(int) IAdd 336 286 - Store 275(count) 337 - Branch 313 - 313: Label - 338: 208(int) Load 303(y) - 339: 208(int) IAdd 338 286 - Store 303(y) 339 - Branch 310 - 312: Label - Branch 297 - 297: Label - 340: 208(int) Load 287(x) - 341: 208(int) IAdd 340 286 - Store 287(x) 341 - Branch 294 - 296: Label - 342: 7(float) Load 270(shadowFactor) - 343: 208(int) Load 275(count) - 344: 7(float) ConvertSToF 343 - 345: 7(float) FDiv 342 344 - ReturnValue 345 +221(sizeQueryTemp): 220(ptr) Variable Function + 233(texDim): 232(ptr) Variable Function + 247(elements): 241(ptr) Variable Function + 254(levels): 241(ptr) Variable Function + 263(scale): 22(ptr) Variable Function + 270(dx): 22(ptr) Variable Function + 282(dy): 22(ptr) Variable Function +294(shadowFactor): 22(ptr) Variable Function + 300(count): 241(ptr) Variable Function + 307(range): 241(ptr) Variable Function + 314(x): 241(ptr) Variable Function + 335(y): 241(ptr) Variable Function + 365(param): 21(ptr) Variable Function + 367(param): 22(ptr) Variable Function + 369(param): 26(ptr) Variable Function + 63: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 61 + 64: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 36 62 62 16 16 + 67: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 65 56(sc) 47 + 69: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 68 57(layer) 47 + 214: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 101(DebugFunctionDefinition) 61 58(filterPCF(vf4;f1;) + 215: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 61 + 216: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 36 217 217 16 16 + 224: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 222 221(sizeQueryTemp) 47 + 225: 156 Load 162(textureShadowMap) + 226: 218(ivec3) ImageQuerySizeLod 225 16 + Store 221(sizeQueryTemp) 226 + 236: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 234 233(texDim) 47 + 238: 237(ptr) AccessChain 221(sizeQueryTemp) 16 + 239: 11(int) Load 238 + 240: 227(int) Bitcast 239 + 242: 241(ptr) AccessChain 233(texDim) 16 + Store 242 240 + 243: 237(ptr) AccessChain 221(sizeQueryTemp) 40 + 244: 11(int) Load 243 + 245: 227(int) Bitcast 244 + 246: 241(ptr) AccessChain 233(texDim) 40 + Store 246 245 + 250: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 248 247(elements) 47 + 251: 237(ptr) AccessChain 221(sizeQueryTemp) 24 + 252: 11(int) Load 251 + 253: 227(int) Bitcast 252 + Store 247(elements) 253 + 257: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 255 254(levels) 47 + 258: 156 Load 162(textureShadowMap) + 259: 11(int) ImageQueryLevels 258 + 260: 227(int) Bitcast 259 + Store 254(levels) 260 + 261: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 36 262 262 16 16 + 266: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 264 263(scale) 47 + Store 263(scale) 267 + 268: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 36 269 269 16 16 + 273: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 271 270(dx) 47 + 274: 8(float) Load 263(scale) + 275: 8(float) FMul 274 110 + 276: 241(ptr) AccessChain 233(texDim) 16 + 277: 227(int) Load 276 + 278: 8(float) ConvertSToF 277 + 279: 8(float) FDiv 275 278 + Store 270(dx) 279 + 280: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 36 281 281 16 16 + 285: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 283 282(dy) 47 + 286: 8(float) Load 263(scale) + 287: 8(float) FMul 286 110 + 288: 241(ptr) AccessChain 233(texDim) 40 + 289: 227(int) Load 288 + 290: 8(float) ConvertSToF 289 + 291: 8(float) FDiv 287 290 + Store 282(dy) 291 + 292: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 36 293 293 16 16 + 297: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 295 294(shadowFactor) 47 + Store 294(shadowFactor) 195 + 298: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 36 299 299 16 16 + 303: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 301 300(count) 47 + Store 300(count) 304 + 305: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 36 306 306 16 16 + 310: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 308 307(range) 47 + Store 307(range) 311 + 312: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 36 313 313 16 16 + 317: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 315 314(x) 47 + 318: 227(int) Load 307(range) + 319: 227(int) SNegate 318 + Store 314(x) 319 + Branch 320 + 320: Label + 324: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 61 + 325: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 36 313 313 16 16 + LoopMerge 322 323 None + Branch 326 + 326: Label + 327: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 61 + 328: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 36 313 313 16 16 + 329: 227(int) Load 314(x) + 330: 227(int) Load 307(range) + 331: 139(bool) SLessThanEqual 329 330 + BranchConditional 331 321 322 + 321: Label + 332: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 61 + 333: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 36 334 334 16 16 + 338: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 336 335(y) 47 + 339: 227(int) Load 307(range) + 340: 227(int) SNegate 339 + Store 335(y) 340 + Branch 341 + 341: Label + 345: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 61 + 346: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 36 334 334 16 16 + LoopMerge 343 344 None + Branch 347 + 347: Label + 348: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 61 + 349: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 36 334 334 16 16 + 350: 227(int) Load 335(y) + 351: 227(int) Load 307(range) + 352: 139(bool) SLessThanEqual 350 351 + BranchConditional 352 342 343 + 342: Label + 353: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 61 + 354: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 36 355 355 16 16 + 356: 8(float) Load 270(dx) + 357: 227(int) Load 314(x) + 358: 8(float) ConvertSToF 357 + 359: 8(float) FMul 356 358 + 360: 8(float) Load 282(dy) + 361: 227(int) Load 335(y) + 362: 8(float) ConvertSToF 361 + 363: 8(float) FMul 360 362 + 364: 23(fvec2) CompositeConstruct 359 363 + 366: 18(fvec4) Load 56(sc) + Store 365(param) 366 + 368: 8(float) Load 57(layer) + Store 367(param) 368 + Store 369(param) 364 + 370: 8(float) FunctionCall 32(textureProj(vf4;f1;vf2;) 365(param) 367(param) 369(param) + 371: 8(float) Load 294(shadowFactor) + 372: 8(float) FAdd 371 370 + Store 294(shadowFactor) 372 + 373: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 36 374 374 16 16 + 375: 227(int) Load 300(count) + 376: 227(int) IAdd 375 311 + Store 300(count) 376 + Branch 344 + 344: Label + 377: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 61 + 378: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 36 334 334 16 16 + 379: 227(int) Load 335(y) + 380: 227(int) IAdd 379 311 + Store 335(y) 380 + Branch 341 + 343: Label + Branch 323 + 323: Label + 381: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 61 + 382: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 36 313 313 16 16 + 383: 227(int) Load 314(x) + 384: 227(int) IAdd 383 311 + Store 314(x) 384 + Branch 320 + 322: Label + 385: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 61 + 386: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 36 387 387 16 16 + 388: 8(float) Load 294(shadowFactor) + 389: 227(int) Load 300(count) + 390: 8(float) ConvertSToF 389 + 391: 8(float) FDiv 388 390 + ReturnValue 391 FunctionEnd -74(shadow(vf3;vf3;): 67(fvec3) Function None 70 - 72(fragcolor): 69(ptr) FunctionParameter - 73(fragPos): 69(ptr) FunctionParameter - 77: Label - 349(i): 222(ptr) Variable Function - 363(shadowClip): 20(ptr) Variable Function -417(shadowFactor): 21(ptr) Variable Function - 423(param): 20(ptr) Variable Function - 425(param): 21(ptr) Variable Function - 78: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(Acosh) 76 - 79: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103 34 15 15 15 15 - 82: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 80 72(fragcolor) 45 - 85: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 83 73(fragPos) 45 - 348: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 101 76 74(shadow(vf3;vf3;) - 353: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 350 349(i) 45 - Store 349(i) 280 - Branch 354 - 354: Label - LoopMerge 356 357 None - Branch 358 - 358: Label - 359: 208(int) Load 349(i) - 362: 127(bool) SLessThan 359 360 - BranchConditional 362 355 356 - 355: Label - 367: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 364 363(shadowClip) 45 - 368: 67(fvec3) Load 73(fragPos) - 369: 7(float) CompositeExtract 368 0 - 370: 7(float) CompositeExtract 368 1 - 371: 7(float) CompositeExtract 368 2 - 372: 17(fvec4) CompositeConstruct 369 370 371 103 - 412: 208(int) Load 349(i) - 414: 413(ptr) AccessChain 410 280 286 412 360 - 415: 373 Load 414 - 416: 17(fvec4) VectorTimesMatrix 372 415 - Store 363(shadowClip) 416 - 420: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 418 417(shadowFactor) 45 - 421: 208(int) Load 349(i) - 422: 7(float) ConvertSToF 421 - 424: 17(fvec4) Load 363(shadowClip) - Store 423(param) 424 - Store 425(param) 422 - 426: 7(float) FunctionCall 56(filterPCF(vf4;f1;) 423(param) 425(param) - Store 417(shadowFactor) 426 - 427: 7(float) Load 417(shadowFactor) - 428: 67(fvec3) Load 72(fragcolor) - 429: 67(fvec3) VectorTimesScalar 428 427 - Store 72(fragcolor) 429 - Branch 357 - 357: Label - 430: 208(int) Load 349(i) - 431: 208(int) IAdd 430 286 - Store 349(i) 431 - Branch 354 - 356: Label - 432: 67(fvec3) Load 72(fragcolor) - ReturnValue 432 + Line 1 101 49 +77(shadow(vf3;vf3;): 70(fvec3) Function None 73 + 75(fragcolor): 72(ptr) FunctionParameter + 76(fragPos): 72(ptr) FunctionParameter + 78: Label + 398(i): 241(ptr) Variable Function + 417(shadowClip): 21(ptr) Variable Function +472(shadowFactor): 22(ptr) Variable Function + 477(param): 21(ptr) Variable Function + 479(param): 22(ptr) Variable Function + 82: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 80 + 83: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 36 81 81 16 16 + 86: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 84 75(fragcolor) 47 + 89: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 87 76(fragPos) 47 + 394: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 101(DebugFunctionDefinition) 80 77(shadow(vf3;vf3;) + 395: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 80 + 396: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 36 397 397 16 16 + 401: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 399 398(i) 47 + Store 398(i) 304 + Branch 402 + 402: Label + 406: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 80 + 407: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 36 397 397 16 16 + LoopMerge 404 405 None + Branch 408 + 408: Label + 409: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 80 + 410: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 36 397 397 16 16 + 411: 227(int) Load 398(i) + 413: 139(bool) SLessThan 411 412 + BranchConditional 413 403 404 + 403: Label + 414: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 80 + 415: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 36 416 416 16 16 + 420: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 418 417(shadowClip) 47 + 421: 70(fvec3) Load 76(fragPos) + 422: 8(float) CompositeExtract 421 0 + 423: 8(float) CompositeExtract 421 1 + 424: 8(float) CompositeExtract 421 2 + 425: 18(fvec4) CompositeConstruct 422 423 424 110 + 465: 227(int) Load 398(i) + 467: 466(ptr) AccessChain 463 304 311 465 412 + 468: 426 Load 467 + 469: 18(fvec4) VectorTimesMatrix 425 468 + Store 417(shadowClip) 469 + 470: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 36 471 471 16 16 + 474: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 473 472(shadowFactor) 47 + 475: 227(int) Load 398(i) + 476: 8(float) ConvertSToF 475 + 478: 18(fvec4) Load 417(shadowClip) + Store 477(param) 478 + Store 479(param) 476 + 480: 8(float) FunctionCall 58(filterPCF(vf4;f1;) 477(param) 479(param) + Store 472(shadowFactor) 480 + 481: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 36 482 482 16 16 + 483: 8(float) Load 472(shadowFactor) + 484: 70(fvec3) Load 75(fragcolor) + 485: 70(fvec3) VectorTimesScalar 484 483 + Store 75(fragcolor) 485 + Branch 405 + 405: Label + 486: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 80 + 487: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 36 397 397 16 16 + 488: 227(int) Load 398(i) + 489: 227(int) IAdd 488 311 + Store 398(i) 489 + Branch 402 + 404: Label + 490: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 80 + 491: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 36 492 492 16 16 + 493: 70(fvec3) Load 75(fragcolor) + ReturnValue 493 FunctionEnd - 89(@main(vf2;): 17(fvec4) Function None 86 - 88(inUV): 25(ptr) FunctionParameter - 92: Label - 436(fragPos): 69(ptr) Variable Function - 458(normal): 69(ptr) Variable Function - 476(albedo): 20(ptr) Variable Function - 508(fragcolor): 69(ptr) Variable Function - 513(param): 69(ptr) Variable Function - 514(param): 69(ptr) Variable Function - 539(N): 69(ptr) Variable Function - 546(i): 222(ptr) Variable Function - 558(L): 69(ptr) Variable Function - 570(dist): 21(ptr) Variable Function - 578(V): 69(ptr) Variable Function -590(lightCosInnerAngle): 21(ptr) Variable Function -596(lightCosOuterAngle): 21(ptr) Variable Function - 602(lightRange): 21(ptr) Variable Function - 608(dir): 69(ptr) Variable Function - 623(cosDir): 21(ptr) Variable Function - 631(spotEffect): 21(ptr) Variable Function -640(heightAttenuation): 21(ptr) Variable Function - 648(NdotL): 21(ptr) Variable Function - 657(diff): 69(ptr) Variable Function - 664(R): 69(ptr) Variable Function - 673(NdotR): 21(ptr) Variable Function - 682(spec): 69(ptr) Variable Function - 722(param): 69(ptr) Variable Function - 724(param): 69(ptr) Variable Function - 93: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(Acosh) 91 - 94: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103 34 15 15 15 15 - 97: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 95 88(inUV) 45 - 435: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 101 91 89(@main(vf2;) - 439: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 437 436(fragPos) 45 - 446: 440 Load 443(textureposition) - 451: 155 Load 448(samplerposition) - 454: 452 SampledImage 446 451 - 455: 22(fvec2) Load 88(inUV) - 456: 17(fvec4) ImageSampleImplicitLod 454 455 - 457: 67(fvec3) VectorShuffle 456 456 0 1 2 - Store 436(fragPos) 457 - 462: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 459 458(normal) 45 - 466: 440 Load 463(textureNormal) - 471: 155 Load 468(samplerNormal) - 472: 452 SampledImage 466 471 - 473: 22(fvec2) Load 88(inUV) - 474: 17(fvec4) ImageSampleImplicitLod 472 473 - 475: 67(fvec3) VectorShuffle 474 474 0 1 2 - Store 458(normal) 475 - 480: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 477 476(albedo) 45 - 484: 440 Load 481(textureAlbedo) - 489: 155 Load 486(samplerAlbedo) - 490: 452 SampledImage 484 489 - 491: 22(fvec2) Load 88(inUV) - 492: 17(fvec4) ImageSampleImplicitLod 490 491 - Store 476(albedo) 492 - 494: 493(ptr) AccessChain 410 280 360 - 495: 208(int) Load 494 - 497: 127(bool) SGreaterThan 495 280 - SelectionMerge 499 None - BranchConditional 497 498 499 - 498: Label - 500: 493(ptr) AccessChain 410 280 360 - 501: 208(int) Load 500 - SelectionMerge 507 None - Switch 501 507 - case 1: 502 - case 2: 503 - case 3: 504 - case 4: 505 - case 5: 506 - 502: Label - 511: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 509 508(fragcolor) 45 - Store 513(param) 512 - 515: 67(fvec3) Load 436(fragPos) - Store 514(param) 515 - 516: 67(fvec3) FunctionCall 74(shadow(vf3;vf3;) 513(param) 514(param) - Store 508(fragcolor) 516 - Branch 507 - 503: Label - 518: 67(fvec3) Load 436(fragPos) - Store 508(fragcolor) 518 - Branch 507 - 504: Label - 520: 67(fvec3) Load 458(normal) - Store 508(fragcolor) 520 - Branch 507 - 505: Label - 522: 17(fvec4) Load 476(albedo) - 523: 67(fvec3) VectorShuffle 522 522 0 1 2 - Store 508(fragcolor) 523 - Branch 507 - 506: Label - 525: 17(fvec4) Load 476(albedo) - 526: 67(fvec3) VectorShuffle 525 525 3 3 3 - Store 508(fragcolor) 526 - Branch 507 - 507: Label - 529: 67(fvec3) Load 508(fragcolor) - 530: 7(float) CompositeExtract 529 0 - 531: 7(float) CompositeExtract 529 1 - 532: 7(float) CompositeExtract 529 2 - 533: 17(fvec4) CompositeConstruct 530 531 532 103 - ReturnValue 533 - 499: Label - 535: 17(fvec4) Load 476(albedo) - 536: 67(fvec3) VectorShuffle 535 535 0 1 2 - 538: 67(fvec3) VectorTimesScalar 536 537 - Store 508(fragcolor) 538 - 543: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 540 539(N) 45 - 544: 67(fvec3) Load 458(normal) - 545: 67(fvec3) ExtInst 2(GLSL.std.450) 69(Normalize) 544 - Store 539(N) 545 - 549: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 547 546(i) 45 - Store 546(i) 280 - Branch 550 - 550: Label - LoopMerge 552 553 None - Branch 554 - 554: Label - 555: 208(int) Load 546(i) - 557: 127(bool) SLessThan 555 360 - BranchConditional 557 551 552 - 551: Label - 562: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 559 558(L) 45 - 563: 208(int) Load 546(i) - 565: 564(ptr) AccessChain 410 280 286 563 280 - 566: 17(fvec4) Load 565 - 567: 67(fvec3) VectorShuffle 566 566 0 1 2 - 568: 67(fvec3) Load 436(fragPos) - 569: 67(fvec3) FSub 567 568 - Store 558(L) 569 - 573: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 571 570(dist) 45 - 574: 67(fvec3) Load 558(L) - 575: 7(float) ExtInst 2(GLSL.std.450) 66(Length) 574 - Store 570(dist) 575 - 576: 67(fvec3) Load 558(L) - 577: 67(fvec3) ExtInst 2(GLSL.std.450) 69(Normalize) 576 - Store 558(L) 577 - 582: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 579 578(V) 45 - 583: 564(ptr) AccessChain 410 280 280 - 584: 17(fvec4) Load 583 - 585: 67(fvec3) VectorShuffle 584 584 0 1 2 - 586: 67(fvec3) Load 436(fragPos) - 587: 67(fvec3) FSub 585 586 - Store 578(V) 587 - 588: 67(fvec3) Load 578(V) - 589: 67(fvec3) ExtInst 2(GLSL.std.450) 69(Normalize) 588 - Store 578(V) 589 - 594: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 591 590(lightCosInnerAngle) 45 - Store 590(lightCosInnerAngle) 595 - 600: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 597 596(lightCosOuterAngle) 45 - Store 596(lightCosOuterAngle) 601 - 606: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 603 602(lightRange) 45 - Store 602(lightRange) 607 - 612: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 609 608(dir) 45 - 613: 208(int) Load 546(i) - 614: 564(ptr) AccessChain 410 280 286 613 280 - 615: 17(fvec4) Load 614 - 616: 67(fvec3) VectorShuffle 615 615 0 1 2 - 617: 208(int) Load 546(i) - 618: 564(ptr) AccessChain 410 280 286 617 286 - 619: 17(fvec4) Load 618 - 620: 67(fvec3) VectorShuffle 619 619 0 1 2 - 621: 67(fvec3) FSub 616 620 - 622: 67(fvec3) ExtInst 2(GLSL.std.450) 69(Normalize) 621 - Store 608(dir) 622 - 627: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 624 623(cosDir) 45 - 628: 67(fvec3) Load 558(L) - 629: 67(fvec3) Load 608(dir) - 630: 7(float) Dot 628 629 - Store 623(cosDir) 630 - 635: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 632 631(spotEffect) 45 - 636: 7(float) Load 596(lightCosOuterAngle) - 637: 7(float) Load 590(lightCosInnerAngle) - 638: 7(float) Load 623(cosDir) - 639: 7(float) ExtInst 2(GLSL.std.450) 49(SmoothStep) 636 637 638 - Store 631(spotEffect) 639 - 644: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 641 640(heightAttenuation) 45 - 645: 7(float) Load 602(lightRange) - 646: 7(float) Load 570(dist) - 647: 7(float) ExtInst 2(GLSL.std.450) 49(SmoothStep) 645 181 646 - Store 640(heightAttenuation) 647 - 652: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 649 648(NdotL) 45 - 653: 67(fvec3) Load 539(N) - 654: 67(fvec3) Load 558(L) - 655: 7(float) Dot 653 654 - 656: 7(float) ExtInst 2(GLSL.std.450) 40(FMax) 181 655 - Store 648(NdotL) 656 - 661: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 658 657(diff) 45 - 662: 7(float) Load 648(NdotL) - 663: 67(fvec3) CompositeConstruct 662 662 662 - Store 657(diff) 663 - 668: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 665 664(R) 45 - 669: 67(fvec3) Load 558(L) - 670: 67(fvec3) FNegate 669 - 671: 67(fvec3) Load 539(N) - 672: 67(fvec3) ExtInst 2(GLSL.std.450) 71(Reflect) 670 671 - Store 664(R) 672 - 677: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 674 673(NdotR) 45 - 678: 67(fvec3) Load 664(R) - 679: 67(fvec3) Load 578(V) - 680: 7(float) Dot 678 679 - 681: 7(float) ExtInst 2(GLSL.std.450) 40(FMax) 181 680 - Store 673(NdotR) 681 - 686: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 683 682(spec) 45 - 687: 7(float) Load 673(NdotR) - 689: 7(float) ExtInst 2(GLSL.std.450) 26(Pow) 687 688 - 690: 21(ptr) AccessChain 476(albedo) 16 - 691: 7(float) Load 690 - 692: 7(float) FMul 689 691 - 694: 7(float) FMul 692 693 - 695: 67(fvec3) CompositeConstruct 694 694 694 - Store 682(spec) 695 - 696: 67(fvec3) Load 657(diff) - 697: 67(fvec3) Load 682(spec) - 698: 67(fvec3) FAdd 696 697 - 699: 7(float) Load 631(spotEffect) - 700: 67(fvec3) VectorTimesScalar 698 699 - 701: 7(float) Load 640(heightAttenuation) - 702: 67(fvec3) VectorTimesScalar 700 701 - 703: 208(int) Load 546(i) - 705: 564(ptr) AccessChain 410 280 286 703 704 - 706: 17(fvec4) Load 705 - 707: 67(fvec3) VectorShuffle 706 706 0 1 2 - 708: 67(fvec3) FMul 702 707 - 709: 17(fvec4) Load 476(albedo) - 710: 67(fvec3) VectorShuffle 709 709 0 1 2 - 711: 67(fvec3) FMul 708 710 - 712: 67(fvec3) Load 508(fragcolor) - 713: 67(fvec3) FAdd 712 711 - Store 508(fragcolor) 713 - Branch 553 - 553: Label - 714: 208(int) Load 546(i) - 715: 208(int) IAdd 714 286 - Store 546(i) 715 - Branch 550 - 552: Label - 716: 493(ptr) AccessChain 410 280 704 - 717: 208(int) Load 716 - 719: 127(bool) SGreaterThan 717 280 - SelectionMerge 721 None - BranchConditional 719 720 721 - 720: Label - 723: 67(fvec3) Load 508(fragcolor) - Store 722(param) 723 - 725: 67(fvec3) Load 436(fragPos) - Store 724(param) 725 - 726: 67(fvec3) FunctionCall 74(shadow(vf3;vf3;) 722(param) 724(param) - Store 508(fragcolor) 726 - Branch 721 - 721: Label - 727: 67(fvec3) Load 508(fragcolor) - 728: 7(float) CompositeExtract 727 0 - 729: 7(float) CompositeExtract 727 1 - 730: 7(float) CompositeExtract 727 2 - 731: 17(fvec4) CompositeConstruct 728 729 730 103 - ReturnValue 731 + Line 1 119 1 + 93(@main(vf2;): 18(fvec4) Function None 90 + 92(inUV): 26(ptr) FunctionParameter + 94: Label + 500(fragPos): 72(ptr) Variable Function + 523(normal): 72(ptr) Variable Function + 542(albedo): 21(ptr) Variable Function + 580(fragcolor): 72(ptr) Variable Function + 584(param): 72(ptr) Variable Function + 585(param): 72(ptr) Variable Function + 640(N): 72(ptr) Variable Function + 648(i): 241(ptr) Variable Function + 665(L): 72(ptr) Variable Function + 678(dist): 22(ptr) Variable Function + 689(V): 72(ptr) Variable Function +704(lightCosInnerAngle): 22(ptr) Variable Function +711(lightCosOuterAngle): 22(ptr) Variable Function + 718(lightRange): 22(ptr) Variable Function + 725(dir): 72(ptr) Variable Function + 741(cosDir): 22(ptr) Variable Function + 750(spotEffect): 22(ptr) Variable Function +760(heightAttenuation): 22(ptr) Variable Function + 769(NdotL): 22(ptr) Variable Function + 779(diff): 72(ptr) Variable Function + 787(R): 72(ptr) Variable Function + 797(NdotR): 22(ptr) Variable Function + 807(spec): 72(ptr) Variable Function + 855(param): 72(ptr) Variable Function + 857(param): 72(ptr) Variable Function + 98: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 96 + 99: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 36 97 97 16 16 + 102: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 100 92(inUV) 47 + 496: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 101(DebugFunctionDefinition) 96 93(@main(vf2;) + 497: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 96 + 498: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 36 499 499 16 16 + 502: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 501 500(fragPos) 47 + 509: 503 Load 506(textureposition) + 514: 167 Load 511(samplerposition) + 517: 515 SampledImage 509 514 + 518: 23(fvec2) Load 92(inUV) + 519: 18(fvec4) ImageSampleImplicitLod 517 518 + 520: 70(fvec3) VectorShuffle 519 519 0 1 2 + Store 500(fragPos) 520 + 521: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 36 522 522 16 16 + 526: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 524 523(normal) 47 + 530: 503 Load 527(textureNormal) + 535: 167 Load 532(samplerNormal) + 536: 515 SampledImage 530 535 + 537: 23(fvec2) Load 92(inUV) + 538: 18(fvec4) ImageSampleImplicitLod 536 537 + 539: 70(fvec3) VectorShuffle 538 538 0 1 2 + Store 523(normal) 539 + 540: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 36 541 541 16 16 + 545: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 543 542(albedo) 47 + 549: 503 Load 546(textureAlbedo) + 554: 167 Load 551(samplerAlbedo) + 555: 515 SampledImage 549 554 + 556: 23(fvec2) Load 92(inUV) + 557: 18(fvec4) ImageSampleImplicitLod 555 556 + Store 542(albedo) 557 + 558: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 36 559 559 16 16 + 561: 560(ptr) AccessChain 463 304 412 + 562: 227(int) Load 561 + 563: 139(bool) SGreaterThan 562 304 + SelectionMerge 565 None + BranchConditional 563 564 565 + 564: Label + 566: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 96 + 567: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 36 568 568 16 16 + 569: 560(ptr) AccessChain 463 304 412 + 570: 227(int) Load 569 + SelectionMerge 576 None + Switch 570 576 + case 1: 571 + case 2: 572 + case 3: 573 + case 4: 574 + case 5: 575 + 571: Label + 577: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 96 + 578: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 36 579 579 16 16 + 582: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 581 580(fragcolor) 47 + Store 584(param) 583 + 586: 70(fvec3) Load 500(fragPos) + Store 585(param) 586 + 587: 70(fvec3) FunctionCall 77(shadow(vf3;vf3;) 584(param) 585(param) + Store 580(fragcolor) 587 + 588: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 36 589 589 16 16 + Branch 576 + 572: Label + 591: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 96 + 592: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 36 593 593 16 16 + 594: 70(fvec3) Load 500(fragPos) + Store 580(fragcolor) 594 + 595: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 36 596 596 16 16 + Branch 576 + 573: Label + 598: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 96 + 599: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 36 600 600 16 16 + 601: 70(fvec3) Load 523(normal) + Store 580(fragcolor) 601 + 602: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 36 603 603 16 16 + Branch 576 + 574: Label + 605: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 96 + 606: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 36 607 607 16 16 + 608: 18(fvec4) Load 542(albedo) + 609: 70(fvec3) VectorShuffle 608 608 0 1 2 + Store 580(fragcolor) 609 + 610: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 36 611 611 16 16 + Branch 576 + 575: Label + 613: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 96 + 614: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 36 615 615 16 16 + 616: 18(fvec4) Load 542(albedo) + 617: 70(fvec3) VectorShuffle 616 616 3 3 3 + Store 580(fragcolor) 617 + 618: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 36 619 619 16 16 + Branch 576 + 576: Label + 622: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 96 + 623: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 36 624 624 16 16 + 625: 70(fvec3) Load 580(fragcolor) + 626: 8(float) CompositeExtract 625 0 + 627: 8(float) CompositeExtract 625 1 + 628: 8(float) CompositeExtract 625 2 + 629: 18(fvec4) CompositeConstruct 626 627 628 110 + ReturnValue 629 + 565: Label + 631: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 96 + 632: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 36 633 633 16 16 + 634: 18(fvec4) Load 542(albedo) + 635: 70(fvec3) VectorShuffle 634 634 0 1 2 + 637: 70(fvec3) VectorTimesScalar 635 636 + Store 580(fragcolor) 637 + 638: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 36 639 639 16 16 + 643: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 641 640(N) 47 + 644: 70(fvec3) Load 523(normal) + 645: 70(fvec3) ExtInst 3(GLSL.std.450) 69(Normalize) 644 + Store 640(N) 645 + 646: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 36 647 647 16 16 + 650: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 649 648(i) 47 + Store 648(i) 304 + Branch 651 + 651: Label + 655: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 96 + 656: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 36 647 647 16 16 + LoopMerge 653 654 None + Branch 657 + 657: Label + 658: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 96 + 659: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 36 647 647 16 16 + 660: 227(int) Load 648(i) + 661: 139(bool) SLessThan 660 412 + BranchConditional 661 652 653 + 652: Label + 662: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 96 + 663: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 36 664 664 16 16 + 668: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 666 665(L) 47 + 669: 227(int) Load 648(i) + 671: 670(ptr) AccessChain 463 304 311 669 304 + 672: 18(fvec4) Load 671 + 673: 70(fvec3) VectorShuffle 672 672 0 1 2 + 674: 70(fvec3) Load 500(fragPos) + 675: 70(fvec3) FSub 673 674 + Store 665(L) 675 + 676: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 36 677 677 16 16 + 680: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 679 678(dist) 47 + 681: 70(fvec3) Load 665(L) + 682: 8(float) ExtInst 3(GLSL.std.450) 66(Length) 681 + Store 678(dist) 682 + 683: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 36 684 684 16 16 + 685: 70(fvec3) Load 665(L) + 686: 70(fvec3) ExtInst 3(GLSL.std.450) 69(Normalize) 685 + Store 665(L) 686 + 687: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 36 688 688 16 16 + 692: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 690 689(V) 47 + 693: 670(ptr) AccessChain 463 304 304 + 694: 18(fvec4) Load 693 + 695: 70(fvec3) VectorShuffle 694 694 0 1 2 + 696: 70(fvec3) Load 500(fragPos) + 697: 70(fvec3) FSub 695 696 + Store 689(V) 697 + 698: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 36 699 699 16 16 + 700: 70(fvec3) Load 689(V) + 701: 70(fvec3) ExtInst 3(GLSL.std.450) 69(Normalize) 700 + Store 689(V) 701 + 702: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 36 703 703 16 16 + 707: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 705 704(lightCosInnerAngle) 47 + Store 704(lightCosInnerAngle) 708 + 709: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 36 710 710 16 16 + 714: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 712 711(lightCosOuterAngle) 47 + Store 711(lightCosOuterAngle) 715 + 716: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 36 717 717 16 16 + 721: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 719 718(lightRange) 47 + Store 718(lightRange) 722 + 723: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 36 724 724 16 16 + 728: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 726 725(dir) 47 + 729: 227(int) Load 648(i) + 730: 670(ptr) AccessChain 463 304 311 729 304 + 731: 18(fvec4) Load 730 + 732: 70(fvec3) VectorShuffle 731 731 0 1 2 + 733: 227(int) Load 648(i) + 734: 670(ptr) AccessChain 463 304 311 733 311 + 735: 18(fvec4) Load 734 + 736: 70(fvec3) VectorShuffle 735 735 0 1 2 + 737: 70(fvec3) FSub 732 736 + 738: 70(fvec3) ExtInst 3(GLSL.std.450) 69(Normalize) 737 + Store 725(dir) 738 + 739: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 36 740 740 16 16 + 744: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 742 741(cosDir) 47 + 745: 70(fvec3) Load 665(L) + 746: 70(fvec3) Load 725(dir) + 747: 8(float) Dot 745 746 + Store 741(cosDir) 747 + 748: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 36 749 749 16 16 + 753: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 751 750(spotEffect) 47 + 754: 8(float) Load 711(lightCosOuterAngle) + 755: 8(float) Load 704(lightCosInnerAngle) + 756: 8(float) Load 741(cosDir) + 757: 8(float) ExtInst 3(GLSL.std.450) 49(SmoothStep) 754 755 756 + Store 750(spotEffect) 757 + 758: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 36 759 759 16 16 + 763: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 761 760(heightAttenuation) 47 + 764: 8(float) Load 718(lightRange) + 765: 8(float) Load 678(dist) + 766: 8(float) ExtInst 3(GLSL.std.450) 49(SmoothStep) 764 195 765 + Store 760(heightAttenuation) 766 + 767: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 36 768 768 16 16 + 772: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 770 769(NdotL) 47 + 773: 70(fvec3) Load 640(N) + 774: 70(fvec3) Load 665(L) + 775: 8(float) Dot 773 774 + 776: 8(float) ExtInst 3(GLSL.std.450) 40(FMax) 195 775 + Store 769(NdotL) 776 + 777: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 36 778 778 16 16 + 782: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 780 779(diff) 47 + 783: 8(float) Load 769(NdotL) + 784: 70(fvec3) CompositeConstruct 783 783 783 + Store 779(diff) 784 + 785: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 36 786 786 16 16 + 790: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 788 787(R) 47 + 791: 70(fvec3) Load 665(L) + 792: 70(fvec3) FNegate 791 + 793: 70(fvec3) Load 640(N) + 794: 70(fvec3) ExtInst 3(GLSL.std.450) 71(Reflect) 792 793 + Store 787(R) 794 + 795: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 36 796 796 16 16 + 800: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 798 797(NdotR) 47 + 801: 70(fvec3) Load 787(R) + 802: 70(fvec3) Load 689(V) + 803: 8(float) Dot 801 802 + 804: 8(float) ExtInst 3(GLSL.std.450) 40(FMax) 195 803 + Store 797(NdotR) 804 + 805: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 36 806 806 16 16 + 810: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 808 807(spec) 47 + 811: 8(float) Load 797(NdotR) + 813: 8(float) ExtInst 3(GLSL.std.450) 26(Pow) 811 812 + 814: 22(ptr) AccessChain 542(albedo) 17 + 815: 8(float) Load 814 + 816: 8(float) FMul 813 815 + 818: 8(float) FMul 816 817 + 819: 70(fvec3) CompositeConstruct 818 818 818 + Store 807(spec) 819 + 820: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 36 821 821 16 16 + 822: 70(fvec3) Load 779(diff) + 823: 70(fvec3) Load 807(spec) + 824: 70(fvec3) FAdd 822 823 + 825: 8(float) Load 750(spotEffect) + 826: 70(fvec3) VectorTimesScalar 824 825 + 827: 8(float) Load 760(heightAttenuation) + 828: 70(fvec3) VectorTimesScalar 826 827 + 829: 227(int) Load 648(i) + 831: 670(ptr) AccessChain 463 304 311 829 830 + 832: 18(fvec4) Load 831 + 833: 70(fvec3) VectorShuffle 832 832 0 1 2 + 834: 70(fvec3) FMul 828 833 + 835: 18(fvec4) Load 542(albedo) + 836: 70(fvec3) VectorShuffle 835 835 0 1 2 + 837: 70(fvec3) FMul 834 836 + 838: 70(fvec3) Load 580(fragcolor) + 839: 70(fvec3) FAdd 838 837 + Store 580(fragcolor) 839 + Branch 654 + 654: Label + 840: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 96 + 841: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 36 647 647 16 16 + 842: 227(int) Load 648(i) + 843: 227(int) IAdd 842 311 + Store 648(i) 843 + Branch 651 + 653: Label + 844: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 96 + 845: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 36 846 846 16 16 + 847: 560(ptr) AccessChain 463 304 830 + 848: 227(int) Load 847 + 849: 139(bool) SGreaterThan 848 304 + SelectionMerge 851 None + BranchConditional 849 850 851 + 850: Label + 852: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 96 + 853: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 36 854 854 16 16 + 856: 70(fvec3) Load 580(fragcolor) + Store 855(param) 856 + 858: 70(fvec3) Load 500(fragPos) + Store 857(param) 858 + 859: 70(fvec3) FunctionCall 77(shadow(vf3;vf3;) 855(param) 857(param) + Store 580(fragcolor) 859 + Branch 851 + 851: Label + 860: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 96 + 861: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 36 862 862 16 16 + 863: 70(fvec3) Load 580(fragcolor) + 864: 8(float) CompositeExtract 863 0 + 865: 8(float) CompositeExtract 863 1 + 866: 8(float) CompositeExtract 863 2 + 867: 18(fvec4) CompositeConstruct 864 865 866 110 + ReturnValue 867 FunctionEnd diff --git a/Test/baseResults/spv.debuginfo.hlsl.geom.out b/Test/baseResults/spv.debuginfo.hlsl.geom.out index c747d3a1..07acacc1 100755 --- a/Test/baseResults/spv.debuginfo.hlsl.geom.out +++ b/Test/baseResults/spv.debuginfo.hlsl.geom.out @@ -1,458 +1,500 @@ spv.debuginfo.hlsl.geom -Validation failed // Module Version 10000 // Generated by (magic number): 8000b -// Id's are bound by 322 +// Id's are bound by 354 Capability Geometry Capability MultiViewport Extension "SPV_KHR_non_semantic_info" - 1: ExtInstImport "NonSemantic.Shader.DebugInfo.100" - 2: ExtInstImport "GLSL.std.450" + 2: ExtInstImport "NonSemantic.Shader.DebugInfo.100" + 3: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Geometry 5 "main" 228 235 240 246 251 256 261 271 278 283 307 310 - ExecutionMode 5 Triangles - ExecutionMode 5 Invocations 2 - ExecutionMode 5 OutputTriangleStrip - ExecutionMode 5 OutputVertices 3 + EntryPoint Geometry 6 "main" 256 262 267 273 278 283 288 303 310 315 339 342 + ExecutionMode 6 Triangles + ExecutionMode 6 Invocations 2 + ExecutionMode 6 OutputTriangleStrip + ExecutionMode 6 OutputVertices 3 + 1: String "" 9: String "float" 12: String "uint" - 24: String "Pos" - 26: String "" - 30: String "Color" - 35: String "VSOutput" - 46: String "PrimitiveID" - 51: String "LightVec" - 57: String "GSOutput" - 67: String "@main" - 73: String "input" - 77: String "outStream" - 81: String "InvocationID" - 87: String "int" - 92: String "i" - 104: String "bool" - 109: String "output" - 130: String "projection" - 134: String "modelview" - 138: String "lightPos" - 142: String "UBO" - 146: String "ubo" - 177: String "pos" - 185: String "worldPos" - 195: String "lPos" - 230: String "outStream.Pos" - 237: String "outStream.ViewportIndex" - 242: String "outStream.PrimitiveID" - 248: String "outStream.Normal" - 253: String "outStream.Color" - 258: String "outStream.ViewVec" - 263: String "outStream.LightVec" - Name 5 "main" - Name 22 "VSOutput" - MemberName 22(VSOutput) 0 "Pos" - MemberName 22(VSOutput) 1 "Normal" - MemberName 22(VSOutput) 2 "Color" - Name 42 "GSOutput" - MemberName 42(GSOutput) 0 "Pos" - MemberName 42(GSOutput) 1 "ViewportIndex" - MemberName 42(GSOutput) 2 "PrimitiveID" - MemberName 42(GSOutput) 3 "Normal" - MemberName 42(GSOutput) 4 "Color" - MemberName 42(GSOutput) 5 "ViewVec" - MemberName 42(GSOutput) 6 "LightVec" - Name 66 "@main(struct-VSOutput-vf4-vf3-vf31[3];struct-GSOutput-vf4-u1-u1-vf3-vf3-vf3-vf31;u1;u1;" - Name 62 "input" - Name 63 "outStream" - Name 64 "InvocationID" - Name 65 "PrimitiveID" - Name 90 "i" - Name 107 "output" - Name 128 "UBO" - MemberName 128(UBO) 0 "projection" - MemberName 128(UBO) 1 "modelview" - MemberName 128(UBO) 2 "lightPos" - Name 144 "ubo" - MemberName 144(ubo) 0 "ubo" - Name 150 "" - Name 175 "pos" - Name 183 "worldPos" - Name 193 "lPos" - Name 228 "outStream.Pos" - Name 235 "outStream.ViewportIndex" - Name 240 "outStream.PrimitiveID" - Name 246 "outStream.Normal" - Name 251 "outStream.Color" - Name 256 "outStream.ViewVec" - Name 261 "outStream.LightVec" - Name 268 "input" - Name 271 "input.Pos" - Name 278 "input.Normal" - Name 283 "input.Color" - Name 305 "InvocationID" - Name 307 "InvocationID" - Name 309 "PrimitiveID" - Name 310 "PrimitiveID" - Name 312 "outStream" - Name 313 "param" - Name 315 "param" - Name 316 "param" - Name 318 "param" - Decorate 124 ArrayStride 64 - Decorate 126 ArrayStride 64 - MemberDecorate 128(UBO) 0 RowMajor - MemberDecorate 128(UBO) 0 Offset 0 - MemberDecorate 128(UBO) 0 MatrixStride 16 - MemberDecorate 128(UBO) 1 RowMajor - MemberDecorate 128(UBO) 1 Offset 128 - MemberDecorate 128(UBO) 1 MatrixStride 16 - MemberDecorate 128(UBO) 2 Offset 256 - MemberDecorate 144(ubo) 0 Offset 0 - Decorate 144(ubo) Block - Decorate 150 DescriptorSet 0 - Decorate 150 Binding 0 - Decorate 228(outStream.Pos) BuiltIn Position - Decorate 235(outStream.ViewportIndex) BuiltIn ViewportIndex - Decorate 240(outStream.PrimitiveID) BuiltIn PrimitiveId - Decorate 246(outStream.Normal) Location 0 - Decorate 251(outStream.Color) Location 1 - Decorate 256(outStream.ViewVec) Location 2 - Decorate 261(outStream.LightVec) Location 3 - Decorate 271(input.Pos) BuiltIn Position - Decorate 278(input.Normal) Location 0 - Decorate 283(input.Color) Location 1 - Decorate 307(InvocationID) BuiltIn InvocationId - Decorate 310(PrimitiveID) BuiltIn PrimitiveId - 3: TypeVoid - 4: TypeFunction 3 - 7: TypeFloat 32 - 10: TypeInt 32 0 - 13: 10(int) Constant 32 - 14: 10(int) Constant 6 - 15: 10(int) Constant 0 - 11: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 12 13 14 15 - 16: 10(int) Constant 3 - 8: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 9 13 16 15 - 17: TypeVector 7(float) 4 - 18: 10(int) Constant 4 - 19: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 6(FSign) 8 18 - 20: TypeVector 7(float) 3 - 21: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 6(FSign) 8 16 - 22(VSOutput): TypeStruct 17(fvec4) 20(fvec3) 20(fvec3) - 25: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 35(Modf) 0 26 - 27: 10(int) Constant 37 - 28: 10(int) Constant 13 - 23: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 24 19 25 27 28 15 15 16 - 31: 10(int) Constant 39 - 32: 10(int) Constant 34 - 29: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 30 21 25 31 32 15 15 16 - 33: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 30 21 25 31 32 15 15 16 - 36: 10(int) Constant 1 - 38: 10(int) Constant 5 - 37: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 1(Round) 36 18 25 38 - 34: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(Fract) 35 36 25 15 15 37 35 15 16 23 29 33 - 39: TypeArray 22(VSOutput) 16 - 40: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 5(SAbs) 34 16 - 41: TypePointer Function 39 - 42(GSOutput): TypeStruct 17(fvec4) 10(int) 10(int) 20(fvec3) 20(fvec3) 20(fvec3) 20(fvec3) - 44: 10(int) Constant 44 - 43: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 24 19 25 44 28 15 15 16 - 47: 10(int) Constant 46 - 48: 10(int) Constant 19 - 45: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 46 11 25 47 48 15 15 16 - 49: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 46 11 25 47 48 15 15 16 - 52: 10(int) Constant 50 - 50: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 51 21 25 52 27 15 15 16 - 53: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 51 21 25 52 27 15 15 16 - 54: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 51 21 25 52 27 15 15 16 - 55: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 51 21 25 52 27 15 15 16 - 56: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(Fract) 57 36 25 15 15 37 57 15 16 43 45 49 50 53 54 55 - 58: TypePointer Function 42(GSOutput) - 59: TypePointer Function 10(int) - 60: TypeFunction 3 41(ptr) 58(ptr) 59(ptr) 59(ptr) - 61: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 8(Floor) 16 3 40 56 11 11 - 68: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 20(Cosh) 67 61 25 15 15 37 67 16 15 - 72: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 73 40 25 15 15 68 18 36 - 75: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 31(Sqrt) - 78: 10(int) Constant 2 - 76: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 77 56 25 15 15 68 18 78 - 80: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 81 11 25 15 15 68 18 16 - 83: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 46 11 25 15 15 68 18 18 - 86: TypeInt 32 1 - 88: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 87 13 18 15 - 89: TypePointer Function 86(int) - 93: 10(int) Constant 57 - 91: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 92 88 25 93 15 68 18 - 95: 86(int) Constant 0 - 102: 86(int) Constant 3 - 103: TypeBool - 105: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 104 13 78 15 - 110: 10(int) Constant 59 - 108: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 109 56 25 110 15 68 18 - 112: 7(float) Constant 0 - 113: 17(fvec4) ConstantComposite 112 112 112 112 - 114: 20(fvec3) ConstantComposite 112 112 112 - 115:42(GSOutput) ConstantComposite 113 15 15 114 114 114 114 - 117: 86(int) Constant 1 - 118: TypePointer Function 20(fvec3) - 121: TypeMatrix 17(fvec4) 4 - 123: 103(bool) ConstantTrue - 122: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 108 19 18 123 - 124: TypeArray 121 78 - 125: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 5(SAbs) 122 78 - 126: TypeArray 121 78 - 127: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 5(SAbs) 122 78 - 128(UBO): TypeStruct 124 126 17(fvec4) - 131: 10(int) Constant 28 - 132: 10(int) Constant 21 - 129: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 130 125 25 131 132 15 15 16 - 135: 10(int) Constant 29 - 136: 10(int) Constant 20 - 133: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 134 127 25 135 136 15 15 16 - 139: 10(int) Constant 30 - 140: 10(int) Constant 17 - 137: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 138 19 25 139 140 15 15 16 - 143: 10(int) Constant 60 - 141: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(Fract) 142 36 25 143 15 37 142 15 16 129 133 137 - 144(ubo): TypeStruct 128(UBO) - 147: 10(int) Constant 33 - 145: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 146 141 25 147 27 15 15 16 - 148: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(Fract) 146 36 25 143 15 37 146 15 16 145 - 149: TypePointer Uniform 144(ubo) - 150: 149(ptr) Variable Uniform - 152: 10(int) Constant 8 - 151: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(Atan) 26 148 25 143 15 37 26 150 152 - 154: TypePointer Uniform 121 - 157: TypeMatrix 20(fvec3) 3 - 158: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 108 21 16 123 - 168: 86(int) Constant 4 - 170: 86(int) Constant 2 - 174: TypePointer Function 17(fvec4) - 178: 10(int) Constant 63 - 176: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 177 19 25 178 15 68 18 - 186: 10(int) Constant 64 - 184: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 185 19 25 186 15 68 18 - 196: 10(int) Constant 66 - 194: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 195 21 25 196 15 68 18 - 198: TypePointer Uniform 17(fvec4) - 206: 86(int) Constant 6 - 212: 86(int) Constant 5 - 227: TypePointer Output 17(fvec4) -228(outStream.Pos): 227(ptr) Variable Output - 231: 10(int) Constant 75 - 229: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(Atan) 230 19 25 231 15 37 230 228(outStream.Pos) 152 - 234: TypePointer Output 10(int) -235(outStream.ViewportIndex): 234(ptr) Variable Output - 236: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(Atan) 237 11 25 231 15 37 237 235(outStream.ViewportIndex) 152 -240(outStream.PrimitiveID): 234(ptr) Variable Output - 241: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(Atan) 242 11 25 231 15 37 242 240(outStream.PrimitiveID) 152 - 245: TypePointer Output 20(fvec3) -246(outStream.Normal): 245(ptr) Variable Output - 247: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(Atan) 248 21 25 231 15 37 248 246(outStream.Normal) 152 -251(outStream.Color): 245(ptr) Variable Output - 252: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(Atan) 253 21 25 231 15 37 253 251(outStream.Color) 152 -256(outStream.ViewVec): 245(ptr) Variable Output - 257: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(Atan) 258 21 25 231 15 37 258 256(outStream.ViewVec) 152 -261(outStream.LightVec): 245(ptr) Variable Output - 262: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(Atan) 263 21 25 231 15 37 263 261(outStream.LightVec) 152 - 269: TypeArray 17(fvec4) 16 - 270: TypePointer Input 269 - 271(input.Pos): 270(ptr) Variable Input - 272: TypePointer Input 17(fvec4) - 276: TypeArray 20(fvec3) 16 - 277: TypePointer Input 276 -278(input.Normal): 277(ptr) Variable Input - 279: TypePointer Input 20(fvec3) -283(input.Color): 277(ptr) Variable Input - 306: TypePointer Input 10(int) -307(InvocationID): 306(ptr) Variable Input -310(PrimitiveID): 306(ptr) Variable Input - 5(main): 3 Function None 4 - 6: Label - 268(input): 41(ptr) Variable Function -305(InvocationID): 59(ptr) Variable Function -309(PrimitiveID): 59(ptr) Variable Function - 312(outStream): 58(ptr) Variable Function - 313(param): 41(ptr) Variable Function - 315(param): 58(ptr) Variable Function - 316(param): 59(ptr) Variable Function - 318(param): 59(ptr) Variable Function - 273: 272(ptr) AccessChain 271(input.Pos) 95 - 274: 17(fvec4) Load 273 - 275: 174(ptr) AccessChain 268(input) 95 95 - Store 275 274 - 280: 279(ptr) AccessChain 278(input.Normal) 95 - 281: 20(fvec3) Load 280 - 282: 118(ptr) AccessChain 268(input) 95 117 - Store 282 281 - 284: 279(ptr) AccessChain 283(input.Color) 95 - 285: 20(fvec3) Load 284 - 286: 118(ptr) AccessChain 268(input) 95 170 - Store 286 285 - 287: 272(ptr) AccessChain 271(input.Pos) 117 - 288: 17(fvec4) Load 287 - 289: 174(ptr) AccessChain 268(input) 117 95 - Store 289 288 - 290: 279(ptr) AccessChain 278(input.Normal) 117 - 291: 20(fvec3) Load 290 - 292: 118(ptr) AccessChain 268(input) 117 117 - Store 292 291 - 293: 279(ptr) AccessChain 283(input.Color) 117 - 294: 20(fvec3) Load 293 - 295: 118(ptr) AccessChain 268(input) 117 170 - Store 295 294 - 296: 272(ptr) AccessChain 271(input.Pos) 170 - 297: 17(fvec4) Load 296 - 298: 174(ptr) AccessChain 268(input) 170 95 - Store 298 297 - 299: 279(ptr) AccessChain 278(input.Normal) 170 - 300: 20(fvec3) Load 299 - 301: 118(ptr) AccessChain 268(input) 170 117 - Store 301 300 - 302: 279(ptr) AccessChain 283(input.Color) 170 - 303: 20(fvec3) Load 302 - 304: 118(ptr) AccessChain 268(input) 170 170 - Store 304 303 - 308: 10(int) Load 307(InvocationID) - Store 305(InvocationID) 308 - 311: 10(int) Load 310(PrimitiveID) - Store 309(PrimitiveID) 311 - 314: 39 Load 268(input) - Store 313(param) 314 - 317: 10(int) Load 305(InvocationID) - Store 316(param) 317 - 319: 10(int) Load 309(PrimitiveID) - Store 318(param) 319 - 320: 3 FunctionCall 66(@main(struct-VSOutput-vf4-vf3-vf31[3];struct-GSOutput-vf4-u1-u1-vf3-vf3-vf3-vf31;u1;u1;) 313(param) 315(param) 316(param) 318(param) - 321:42(GSOutput) Load 315(param) - Store 312(outStream) 321 + 25: String "Pos" + 27: String "// OpModuleProcessed auto-map-locations +// OpModuleProcessed auto-map-bindings +// OpModuleProcessed entry-point main +// OpModuleProcessed client vulkan100 +// OpModuleProcessed target-env vulkan1.0 +// OpModuleProcessed keep-uncalled +// OpModuleProcessed hlsl-offsets +#line 1 +" + 31: String "Color" + 36: String "VSOutput" + 47: String "PrimitiveID" + 52: String "LightVec" + 58: String "GSOutput" + 69: String "@main" + 75: String "input" + 79: String "outStream" + 83: String "InvocationID" + 92: String "int" + 97: String "i" + 112: String "bool" + 120: String "output" + 142: String "projection" + 146: String "modelview" + 150: String "lightPos" + 154: String "UBO" + 157: String "ubo" + 192: String "pos" + 201: String "worldPos" + 212: String "lPos" + 258: String "outStream.Pos" + 264: String "outStream.ViewportIndex" + 269: String "outStream.PrimitiveID" + 275: String "outStream.Normal" + 280: String "outStream.Color" + 285: String "outStream.ViewVec" + 290: String "outStream.LightVec" + Name 6 "main" + Name 23 "VSOutput" + MemberName 23(VSOutput) 0 "Pos" + MemberName 23(VSOutput) 1 "Normal" + MemberName 23(VSOutput) 2 "Color" + Name 43 "GSOutput" + MemberName 43(GSOutput) 0 "Pos" + MemberName 43(GSOutput) 1 "ViewportIndex" + MemberName 43(GSOutput) 2 "PrimitiveID" + MemberName 43(GSOutput) 3 "Normal" + MemberName 43(GSOutput) 4 "Color" + MemberName 43(GSOutput) 5 "ViewVec" + MemberName 43(GSOutput) 6 "LightVec" + Name 67 "@main(struct-VSOutput-vf4-vf3-vf31[3];struct-GSOutput-vf4-u1-u1-vf3-vf3-vf3-vf31;u1;u1;" + Name 63 "input" + Name 64 "outStream" + Name 65 "InvocationID" + Name 66 "PrimitiveID" + Name 95 "i" + Name 118 "output" + Name 140 "UBO" + MemberName 140(UBO) 0 "projection" + MemberName 140(UBO) 1 "modelview" + MemberName 140(UBO) 2 "lightPos" + Name 155 "ubo" + MemberName 155(ubo) 0 "ubo" + Name 161 "" + Name 190 "pos" + Name 199 "worldPos" + Name 210 "lPos" + Name 256 "outStream.Pos" + Name 262 "outStream.ViewportIndex" + Name 267 "outStream.PrimitiveID" + Name 273 "outStream.Normal" + Name 278 "outStream.Color" + Name 283 "outStream.ViewVec" + Name 288 "outStream.LightVec" + Name 300 "input" + Name 303 "input.Pos" + Name 310 "input.Normal" + Name 315 "input.Color" + Name 337 "InvocationID" + Name 339 "InvocationID" + Name 341 "PrimitiveID" + Name 342 "PrimitiveID" + Name 344 "outStream" + Name 345 "param" + Name 347 "param" + Name 348 "param" + Name 350 "param" + Decorate 136 ArrayStride 64 + Decorate 138 ArrayStride 64 + MemberDecorate 140(UBO) 0 RowMajor + MemberDecorate 140(UBO) 0 Offset 0 + MemberDecorate 140(UBO) 0 MatrixStride 16 + MemberDecorate 140(UBO) 1 RowMajor + MemberDecorate 140(UBO) 1 Offset 128 + MemberDecorate 140(UBO) 1 MatrixStride 16 + MemberDecorate 140(UBO) 2 Offset 256 + MemberDecorate 155(ubo) 0 Offset 0 + Decorate 155(ubo) Block + Decorate 161 DescriptorSet 0 + Decorate 161 Binding 0 + Decorate 256(outStream.Pos) BuiltIn Position + Decorate 262(outStream.ViewportIndex) BuiltIn ViewportIndex + Decorate 267(outStream.PrimitiveID) BuiltIn PrimitiveId + Decorate 273(outStream.Normal) Location 0 + Decorate 278(outStream.Color) Location 1 + Decorate 283(outStream.ViewVec) Location 2 + Decorate 288(outStream.LightVec) Location 3 + Decorate 303(input.Pos) BuiltIn Position + Decorate 310(input.Normal) Location 0 + Decorate 315(input.Color) Location 1 + Decorate 339(InvocationID) BuiltIn InvocationId + Decorate 342(PrimitiveID) BuiltIn PrimitiveId + 4: TypeVoid + 5: TypeFunction 4 + 8: TypeFloat 32 + 11: TypeInt 32 0 + 14: 11(int) Constant 32 + 15: 11(int) Constant 6 + 16: 11(int) Constant 0 + 13: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 12 14 15 16 + 17: 11(int) Constant 3 + 10: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 9 14 17 16 + 18: TypeVector 8(float) 4 + 19: 11(int) Constant 4 + 20: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 10 19 + 21: TypeVector 8(float) 3 + 22: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 10 17 + 23(VSOutput): TypeStruct 18(fvec4) 21(fvec3) 21(fvec3) + 26: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 35(DebugSource) 1 27 + 28: 11(int) Constant 37 + 29: 11(int) Constant 13 + 24: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 25 20 26 28 29 16 16 17 + 32: 11(int) Constant 39 + 33: 11(int) Constant 34 + 30: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 31 22 26 32 33 16 16 17 + 34: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 31 22 26 32 33 16 16 17 + 37: 11(int) Constant 1 + 39: 11(int) Constant 5 + 38: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 1(DebugCompilationUnit) 37 19 26 39 + 35: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 36 37 26 16 16 38 36 16 17 24 30 34 + 40: TypeArray 23(VSOutput) 17 + 41: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 35 17 + 42: TypePointer Function 40 + 43(GSOutput): TypeStruct 18(fvec4) 11(int) 11(int) 21(fvec3) 21(fvec3) 21(fvec3) 21(fvec3) + 45: 11(int) Constant 44 + 44: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 25 20 26 45 29 16 16 17 + 48: 11(int) Constant 46 + 49: 11(int) Constant 19 + 46: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 47 13 26 48 49 16 16 17 + 50: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 47 13 26 48 49 16 16 17 + 53: 11(int) Constant 50 + 51: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 52 22 26 53 28 16 16 17 + 54: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 52 22 26 53 28 16 16 17 + 55: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 52 22 26 53 28 16 16 17 + 56: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 52 22 26 53 28 16 16 17 + 57: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 58 37 26 16 16 38 58 16 17 44 46 50 51 54 55 56 + 59: TypePointer Function 43(GSOutput) + 60: TypePointer Function 11(int) + 61: TypeFunction 4 42(ptr) 59(ptr) 60(ptr) 60(ptr) + 62: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 8(DebugTypeFunction) 17 4 41 57 13 13 + 71: 11(int) Constant 56 + 70: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 20(DebugFunction) 69 62 26 71 16 38 69 17 71 + 74: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 75 41 26 71 16 70 19 37 + 77: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 31(DebugExpression) + 80: 11(int) Constant 2 + 78: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 79 57 26 71 16 70 19 80 + 82: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 83 13 26 71 16 70 19 17 + 85: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 47 13 26 71 16 70 19 19 + 90: 11(int) Constant 57 + 91: TypeInt 32 1 + 93: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 92 14 19 16 + 94: TypePointer Function 91(int) + 96: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 97 93 26 90 16 70 19 + 99: 91(int) Constant 0 + 110: 91(int) Constant 3 + 111: TypeBool + 113: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 112 14 80 16 + 117: 11(int) Constant 59 + 119: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 120 57 26 117 16 70 19 + 122: 8(float) Constant 0 + 123: 18(fvec4) ConstantComposite 122 122 122 122 + 124: 21(fvec3) ConstantComposite 122 122 122 + 125:43(GSOutput) ConstantComposite 123 16 16 124 124 124 124 + 127: 11(int) Constant 60 + 129: 91(int) Constant 1 + 130: TypePointer Function 21(fvec3) + 133: TypeMatrix 18(fvec4) 4 + 135: 111(bool) ConstantTrue + 134: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 108(DebugTypeMatrix) 20 19 135 + 136: TypeArray 133 80 + 137: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 134 80 + 138: TypeArray 133 80 + 139: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 134 80 + 140(UBO): TypeStruct 136 138 18(fvec4) + 143: 11(int) Constant 28 + 144: 11(int) Constant 21 + 141: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 142 137 26 143 144 16 16 17 + 147: 11(int) Constant 29 + 148: 11(int) Constant 20 + 145: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 146 139 26 147 148 16 16 17 + 151: 11(int) Constant 30 + 152: 11(int) Constant 17 + 149: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 150 20 26 151 152 16 16 17 + 153: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 154 37 26 127 16 38 154 16 17 141 145 149 + 155(ubo): TypeStruct 140(UBO) + 158: 11(int) Constant 33 + 156: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 157 153 26 158 28 16 16 17 + 159: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 157 37 26 127 16 38 157 16 17 156 + 160: TypePointer Uniform 155(ubo) + 161: 160(ptr) Variable Uniform + 163: 11(int) Constant 8 + 162: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 1 159 26 127 16 38 1 161 163 + 165: TypePointer Uniform 133 + 168: TypeMatrix 21(fvec3) 3 + 169: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 108(DebugTypeMatrix) 22 17 135 + 180: 11(int) Constant 61 + 181: 91(int) Constant 4 + 183: 91(int) Constant 2 + 188: 11(int) Constant 63 + 189: TypePointer Function 18(fvec4) + 191: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 192 20 26 188 16 70 19 + 198: 11(int) Constant 64 + 200: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 201 20 26 198 16 70 19 + 209: 11(int) Constant 66 + 211: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 212 22 26 209 16 70 19 + 214: TypePointer Uniform 18(fvec4) + 223: 11(int) Constant 67 + 224: 91(int) Constant 6 + 231: 11(int) Constant 68 + 232: 91(int) Constant 5 + 238: 11(int) Constant 70 + 246: 11(int) Constant 73 + 250: 11(int) Constant 74 + 254: 11(int) Constant 75 + 255: TypePointer Output 18(fvec4) +256(outStream.Pos): 255(ptr) Variable Output + 257: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 258 20 26 254 16 38 258 256(outStream.Pos) 163 + 261: TypePointer Output 11(int) +262(outStream.ViewportIndex): 261(ptr) Variable Output + 263: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 264 13 26 254 16 38 264 262(outStream.ViewportIndex) 163 +267(outStream.PrimitiveID): 261(ptr) Variable Output + 268: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 269 13 26 254 16 38 269 267(outStream.PrimitiveID) 163 + 272: TypePointer Output 21(fvec3) +273(outStream.Normal): 272(ptr) Variable Output + 274: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 275 22 26 254 16 38 275 273(outStream.Normal) 163 +278(outStream.Color): 272(ptr) Variable Output + 279: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 280 22 26 254 16 38 280 278(outStream.Color) 163 +283(outStream.ViewVec): 272(ptr) Variable Output + 284: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 285 22 26 254 16 38 285 283(outStream.ViewVec) 163 +288(outStream.LightVec): 272(ptr) Variable Output + 289: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 290 22 26 254 16 38 290 288(outStream.LightVec) 163 + 299: 11(int) Constant 78 + 301: TypeArray 18(fvec4) 17 + 302: TypePointer Input 301 + 303(input.Pos): 302(ptr) Variable Input + 304: TypePointer Input 18(fvec4) + 308: TypeArray 21(fvec3) 17 + 309: TypePointer Input 308 +310(input.Normal): 309(ptr) Variable Input + 311: TypePointer Input 21(fvec3) +315(input.Color): 309(ptr) Variable Input + 338: TypePointer Input 11(int) +339(InvocationID): 338(ptr) Variable Input +342(PrimitiveID): 338(ptr) Variable Input + Line 1 56 1 + 6(main): 4 Function None 5 + 7: Label + 300(input): 42(ptr) Variable Function +337(InvocationID): 60(ptr) Variable Function +341(PrimitiveID): 60(ptr) Variable Function + 344(outStream): 59(ptr) Variable Function + 345(param): 42(ptr) Variable Function + 347(param): 59(ptr) Variable Function + 348(param): 60(ptr) Variable Function + 350(param): 60(ptr) Variable Function + Line 1 56 0 + 305: 304(ptr) AccessChain 303(input.Pos) 99 + 306: 18(fvec4) Load 305 + 307: 189(ptr) AccessChain 300(input) 99 99 + Store 307 306 + 312: 311(ptr) AccessChain 310(input.Normal) 99 + 313: 21(fvec3) Load 312 + 314: 130(ptr) AccessChain 300(input) 99 129 + Store 314 313 + 316: 311(ptr) AccessChain 315(input.Color) 99 + 317: 21(fvec3) Load 316 + 318: 130(ptr) AccessChain 300(input) 99 183 + Store 318 317 + 319: 304(ptr) AccessChain 303(input.Pos) 129 + 320: 18(fvec4) Load 319 + 321: 189(ptr) AccessChain 300(input) 129 99 + Store 321 320 + 322: 311(ptr) AccessChain 310(input.Normal) 129 + 323: 21(fvec3) Load 322 + 324: 130(ptr) AccessChain 300(input) 129 129 + Store 324 323 + 325: 311(ptr) AccessChain 315(input.Color) 129 + 326: 21(fvec3) Load 325 + 327: 130(ptr) AccessChain 300(input) 129 183 + Store 327 326 + 328: 304(ptr) AccessChain 303(input.Pos) 183 + 329: 18(fvec4) Load 328 + 330: 189(ptr) AccessChain 300(input) 183 99 + Store 330 329 + 331: 311(ptr) AccessChain 310(input.Normal) 183 + 332: 21(fvec3) Load 331 + 333: 130(ptr) AccessChain 300(input) 183 129 + Store 333 332 + 334: 311(ptr) AccessChain 315(input.Color) 183 + 335: 21(fvec3) Load 334 + 336: 130(ptr) AccessChain 300(input) 183 183 + Store 336 335 + 340: 11(int) Load 339(InvocationID) + Store 337(InvocationID) 340 + 343: 11(int) Load 342(PrimitiveID) + Store 341(PrimitiveID) 343 + 346: 40 Load 300(input) + Store 345(param) 346 + 349: 11(int) Load 337(InvocationID) + Store 348(param) 349 + 351: 11(int) Load 341(PrimitiveID) + Store 350(param) 351 + 352: 4 FunctionCall 67(@main(struct-VSOutput-vf4-vf3-vf31[3];struct-GSOutput-vf4-u1-u1-vf3-vf3-vf3-vf31;u1;u1;) 345(param) 347(param) 348(param) 350(param) + 353:43(GSOutput) Load 347(param) + Store 344(outStream) 353 Return FunctionEnd -66(@main(struct-VSOutput-vf4-vf3-vf31[3];struct-GSOutput-vf4-u1-u1-vf3-vf3-vf3-vf31;u1;u1;): 3 Function None 60 - 62(input): 41(ptr) FunctionParameter - 63(outStream): 58(ptr) FunctionParameter -64(InvocationID): 59(ptr) FunctionParameter - 65(PrimitiveID): 59(ptr) FunctionParameter - 69: Label - 90(i): 89(ptr) Variable Function - 107(output): 58(ptr) Variable Function - 175(pos): 174(ptr) Variable Function - 183(worldPos): 174(ptr) Variable Function - 193(lPos): 118(ptr) Variable Function - 70: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(Acosh) 68 - 71: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103 25 15 15 15 15 - 74: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 72 62(input) 75 - 79: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 76 63(outStream) 75 - 82: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 80 64(InvocationID) 75 - 84: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 83 65(PrimitiveID) 75 - 85: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 101 68 66(@main(struct-VSOutput-vf4-vf3-vf31[3];struct-GSOutput-vf4-u1-u1-vf3-vf3-vf3-vf31;u1;u1;) - 94: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 91 90(i) 75 - Store 90(i) 95 - Branch 96 - 96: Label - LoopMerge 98 99 None + Line 1 56 1 +67(@main(struct-VSOutput-vf4-vf3-vf31[3];struct-GSOutput-vf4-u1-u1-vf3-vf3-vf3-vf31;u1;u1;): 4 Function None 61 + 63(input): 42(ptr) FunctionParameter + 64(outStream): 59(ptr) FunctionParameter +65(InvocationID): 60(ptr) FunctionParameter + 66(PrimitiveID): 60(ptr) FunctionParameter + 68: Label + 95(i): 94(ptr) Variable Function + 118(output): 59(ptr) Variable Function + 190(pos): 189(ptr) Variable Function + 199(worldPos): 189(ptr) Variable Function + 210(lPos): 130(ptr) Variable Function + 72: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 70 + 73: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 26 71 71 16 16 + 76: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 74 63(input) 77 + 81: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 78 64(outStream) 77 + 84: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 82 65(InvocationID) 77 + 86: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 85 66(PrimitiveID) 77 + 87: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 101(DebugFunctionDefinition) 70 67(@main(struct-VSOutput-vf4-vf3-vf31[3];struct-GSOutput-vf4-u1-u1-vf3-vf3-vf3-vf31;u1;u1;) + 88: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 70 + 89: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 26 90 90 16 16 + 98: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 96 95(i) 77 + Store 95(i) 99 Branch 100 100: Label - 101: 86(int) Load 90(i) - 106: 103(bool) SLessThan 101 102 - BranchConditional 106 97 98 - 97: Label - 111: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 108 107(output) 75 - Store 107(output) 115 - 116: 86(int) Load 90(i) - 119: 118(ptr) AccessChain 62(input) 116 117 - 120: 20(fvec3) Load 119 - 153: 10(int) Load 64(InvocationID) - 155: 154(ptr) AccessChain 150 95 117 153 - 156: 121 Load 155 - 159: 17(fvec4) CompositeExtract 156 0 - 160: 20(fvec3) VectorShuffle 159 159 0 1 2 - 161: 17(fvec4) CompositeExtract 156 1 - 162: 20(fvec3) VectorShuffle 161 161 0 1 2 - 163: 17(fvec4) CompositeExtract 156 2 - 164: 20(fvec3) VectorShuffle 163 163 0 1 2 - 165: 157 CompositeConstruct 160 162 164 - 166: 20(fvec3) VectorTimesMatrix 120 165 - 167: 118(ptr) AccessChain 107(output) 102 - Store 167 166 - 169: 86(int) Load 90(i) - 171: 118(ptr) AccessChain 62(input) 169 170 - 172: 20(fvec3) Load 171 - 173: 118(ptr) AccessChain 107(output) 168 - Store 173 172 - 179: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 176 175(pos) 75 - 180: 86(int) Load 90(i) - 181: 174(ptr) AccessChain 62(input) 180 95 - 182: 17(fvec4) Load 181 - Store 175(pos) 182 - 187: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 184 183(worldPos) 75 - 188: 17(fvec4) Load 175(pos) - 189: 10(int) Load 64(InvocationID) - 190: 154(ptr) AccessChain 150 95 117 189 - 191: 121 Load 190 - 192: 17(fvec4) VectorTimesMatrix 188 191 - Store 183(worldPos) 192 - 197: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 194 193(lPos) 75 - 199: 198(ptr) AccessChain 150 95 170 - 200: 17(fvec4) Load 199 - 201: 10(int) Load 64(InvocationID) - 202: 154(ptr) AccessChain 150 95 117 201 - 203: 121 Load 202 - 204: 17(fvec4) VectorTimesMatrix 200 203 - 205: 20(fvec3) VectorShuffle 204 204 0 1 2 - Store 193(lPos) 205 - 207: 20(fvec3) Load 193(lPos) - 208: 17(fvec4) Load 183(worldPos) - 209: 20(fvec3) VectorShuffle 208 208 0 1 2 - 210: 20(fvec3) FSub 207 209 - 211: 118(ptr) AccessChain 107(output) 206 - Store 211 210 - 213: 17(fvec4) Load 183(worldPos) - 214: 20(fvec3) VectorShuffle 213 213 0 1 2 - 215: 20(fvec3) FNegate 214 - 216: 118(ptr) AccessChain 107(output) 212 - Store 216 215 - 217: 17(fvec4) Load 183(worldPos) - 218: 10(int) Load 64(InvocationID) - 219: 154(ptr) AccessChain 150 95 95 218 - 220: 121 Load 219 - 221: 17(fvec4) VectorTimesMatrix 217 220 - 222: 174(ptr) AccessChain 107(output) 95 - Store 222 221 - 223: 10(int) Load 64(InvocationID) - 224: 59(ptr) AccessChain 107(output) 117 - Store 224 223 - 225: 10(int) Load 65(PrimitiveID) - 226: 59(ptr) AccessChain 107(output) 170 - Store 226 225 - 232: 174(ptr) AccessChain 107(output) 95 - 233: 17(fvec4) Load 232 - Store 228(outStream.Pos) 233 - 238: 59(ptr) AccessChain 107(output) 117 - 239: 10(int) Load 238 - Store 235(outStream.ViewportIndex) 239 - 243: 59(ptr) AccessChain 107(output) 170 - 244: 10(int) Load 243 - Store 240(outStream.PrimitiveID) 244 - 249: 118(ptr) AccessChain 107(output) 102 - 250: 20(fvec3) Load 249 - Store 246(outStream.Normal) 250 - 254: 118(ptr) AccessChain 107(output) 168 - 255: 20(fvec3) Load 254 - Store 251(outStream.Color) 255 - 259: 118(ptr) AccessChain 107(output) 212 - 260: 20(fvec3) Load 259 - Store 256(outStream.ViewVec) 260 - 264: 118(ptr) AccessChain 107(output) 206 - 265: 20(fvec3) Load 264 - Store 261(outStream.LightVec) 265 + 104: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 70 + 105: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 26 90 90 16 16 + LoopMerge 102 103 None + Branch 106 + 106: Label + 107: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 70 + 108: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 26 90 90 16 16 + 109: 91(int) Load 95(i) + 114: 111(bool) SLessThan 109 110 + BranchConditional 114 101 102 + 101: Label + 115: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 70 + 116: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 26 117 117 16 16 + 121: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 119 118(output) 77 + Store 118(output) 125 + 126: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 26 127 127 16 16 + 128: 91(int) Load 95(i) + 131: 130(ptr) AccessChain 63(input) 128 129 + 132: 21(fvec3) Load 131 + 164: 11(int) Load 65(InvocationID) + 166: 165(ptr) AccessChain 161 99 129 164 + 167: 133 Load 166 + 170: 18(fvec4) CompositeExtract 167 0 + 171: 21(fvec3) VectorShuffle 170 170 0 1 2 + 172: 18(fvec4) CompositeExtract 167 1 + 173: 21(fvec3) VectorShuffle 172 172 0 1 2 + 174: 18(fvec4) CompositeExtract 167 2 + 175: 21(fvec3) VectorShuffle 174 174 0 1 2 + 176: 168 CompositeConstruct 171 173 175 + 177: 21(fvec3) VectorTimesMatrix 132 176 + 178: 130(ptr) AccessChain 118(output) 110 + Store 178 177 + 179: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 26 180 180 16 16 + 182: 91(int) Load 95(i) + 184: 130(ptr) AccessChain 63(input) 182 183 + 185: 21(fvec3) Load 184 + 186: 130(ptr) AccessChain 118(output) 181 + Store 186 185 + 187: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 26 188 188 16 16 + 193: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 191 190(pos) 77 + 194: 91(int) Load 95(i) + 195: 189(ptr) AccessChain 63(input) 194 99 + 196: 18(fvec4) Load 195 + Store 190(pos) 196 + 197: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 26 198 198 16 16 + 202: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 200 199(worldPos) 77 + 203: 18(fvec4) Load 190(pos) + 204: 11(int) Load 65(InvocationID) + 205: 165(ptr) AccessChain 161 99 129 204 + 206: 133 Load 205 + 207: 18(fvec4) VectorTimesMatrix 203 206 + Store 199(worldPos) 207 + 208: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 26 209 209 16 16 + 213: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 211 210(lPos) 77 + 215: 214(ptr) AccessChain 161 99 183 + 216: 18(fvec4) Load 215 + 217: 11(int) Load 65(InvocationID) + 218: 165(ptr) AccessChain 161 99 129 217 + 219: 133 Load 218 + 220: 18(fvec4) VectorTimesMatrix 216 219 + 221: 21(fvec3) VectorShuffle 220 220 0 1 2 + Store 210(lPos) 221 + 222: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 26 223 223 16 16 + 225: 21(fvec3) Load 210(lPos) + 226: 18(fvec4) Load 199(worldPos) + 227: 21(fvec3) VectorShuffle 226 226 0 1 2 + 228: 21(fvec3) FSub 225 227 + 229: 130(ptr) AccessChain 118(output) 224 + Store 229 228 + 230: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 26 231 231 16 16 + 233: 18(fvec4) Load 199(worldPos) + 234: 21(fvec3) VectorShuffle 233 233 0 1 2 + 235: 21(fvec3) FNegate 234 + 236: 130(ptr) AccessChain 118(output) 232 + Store 236 235 + 237: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 26 238 238 16 16 + 239: 18(fvec4) Load 199(worldPos) + 240: 11(int) Load 65(InvocationID) + 241: 165(ptr) AccessChain 161 99 99 240 + 242: 133 Load 241 + 243: 18(fvec4) VectorTimesMatrix 239 242 + 244: 189(ptr) AccessChain 118(output) 99 + Store 244 243 + 245: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 26 246 246 16 16 + 247: 11(int) Load 65(InvocationID) + 248: 60(ptr) AccessChain 118(output) 129 + Store 248 247 + 249: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 26 250 250 16 16 + 251: 11(int) Load 66(PrimitiveID) + 252: 60(ptr) AccessChain 118(output) 183 + Store 252 251 + 253: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 26 254 254 16 16 + 259: 189(ptr) AccessChain 118(output) 99 + 260: 18(fvec4) Load 259 + Store 256(outStream.Pos) 260 + 265: 60(ptr) AccessChain 118(output) 129 + 266: 11(int) Load 265 + Store 262(outStream.ViewportIndex) 266 + 270: 60(ptr) AccessChain 118(output) 183 + 271: 11(int) Load 270 + Store 267(outStream.PrimitiveID) 271 + 276: 130(ptr) AccessChain 118(output) 110 + 277: 21(fvec3) Load 276 + Store 273(outStream.Normal) 277 + 281: 130(ptr) AccessChain 118(output) 181 + 282: 21(fvec3) Load 281 + Store 278(outStream.Color) 282 + 286: 130(ptr) AccessChain 118(output) 232 + 287: 21(fvec3) Load 286 + Store 283(outStream.ViewVec) 287 + 291: 130(ptr) AccessChain 118(output) 224 + 292: 21(fvec3) Load 291 + Store 288(outStream.LightVec) 292 EmitVertex - Branch 99 - 99: Label - 266: 86(int) Load 90(i) - 267: 86(int) IAdd 266 117 - Store 90(i) 267 - Branch 96 - 98: Label + Branch 103 + 103: Label + 293: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 70 + 294: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 26 90 90 16 16 + 295: 91(int) Load 95(i) + 296: 91(int) IAdd 295 129 + Store 95(i) 296 + Branch 100 + 102: Label + 297: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 70 + 298: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 26 299 299 16 16 EndPrimitive Return FunctionEnd diff --git a/Test/baseResults/spv.debuginfo.hlsl.tesc.out b/Test/baseResults/spv.debuginfo.hlsl.tesc.out index a389bba1..772aea29 100755 --- a/Test/baseResults/spv.debuginfo.hlsl.tesc.out +++ b/Test/baseResults/spv.debuginfo.hlsl.tesc.out @@ -1,809 +1,914 @@ spv.debuginfo.hlsl.tesc WARNING: 0:158: '' : attribute does not apply to entry point -Validation failed // Module Version 10000 // Generated by (magic number): 8000b -// Id's are bound by 593 +// Id's are bound by 685 Capability Tessellation Extension "SPV_KHR_non_semantic_info" - 1: ExtInstImport "NonSemantic.Shader.DebugInfo.100" - 2: ExtInstImport "GLSL.std.450" + 2: ExtInstImport "NonSemantic.Shader.DebugInfo.100" + 3: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint TessellationControl 5 "main" 485 492 499 533 542 549 556 571 586 - ExecutionMode 5 OutputVertices 4 - ExecutionMode 5 Quads - ExecutionMode 5 SpacingEqual - ExecutionMode 5 VertexOrderCw + EntryPoint TessellationControl 6 "main" 577 584 591 625 634 641 648 663 678 + ExecutionMode 6 OutputVertices 4 + ExecutionMode 6 Quads + ExecutionMode 6 SpacingEqual + ExecutionMode 6 VertexOrderCw + 1: String "" 9: String "float" 12: String "uint" - 26: String "screenSpaceTessFactor" - 29: String "" - 37: String "p0" - 41: String "p1" - 48: String "bool" - 55: String "frustumCheck" - 61: String "Pos" - 64: String "inUV" - 73: String "Normal" - 77: String "UV" - 81: String "VSOutput" - 91: String "TessLevelOuter" - 95: String "TessLevelInner" - 98: String "ConstantsHSOutput" - 103: String "ConstantsHS" - 109: String "patch" - 120: String "HSOutput" - 126: String "@main" - 134: String "InvocationID" - 139: String "midPoint" - 150: String "radius" - 160: String "v0" - 171: String "modelview" - 176: String "lightPos" - 180: String "frustumPlanes" - 183: String "tessellatedEdgeSize" - 187: String "viewportDim" - 191: String "UBO" - 194: String "ubo" - 202: String "int" - 212: String "clip0" - 229: String "clip1" - 292: String "pos" - 298: String "type.2d.image" - 300: String "@type.2d.image" - 305: String "textureHeight" - 309: String "type.sampler" - 310: String "@type.sampler" - 314: String "samplerHeight" - 318: String "type.sampled.image" - 319: String "@type.sampled.image" - 335: String "i" - 371: String "output" - Name 5 "main" - Name 25 "screenSpaceTessFactor(vf4;vf4;" - Name 23 "p0" - Name 24 "p1" - Name 54 "frustumCheck(vf4;vf2;" - Name 52 "Pos" - Name 53 "inUV" - Name 68 "VSOutput" - MemberName 68(VSOutput) 0 "Pos" - MemberName 68(VSOutput) 1 "Normal" - MemberName 68(VSOutput) 2 "UV" - Name 89 "ConstantsHSOutput" - MemberName 89(ConstantsHSOutput) 0 "TessLevelOuter" - MemberName 89(ConstantsHSOutput) 1 "TessLevelInner" - Name 102 "ConstantsHS(struct-VSOutput-vf4-vf3-vf21[4];" - Name 101 "patch" - Name 112 "HSOutput" - MemberName 112(HSOutput) 0 "Pos" - MemberName 112(HSOutput) 1 "Normal" - MemberName 112(HSOutput) 2 "UV" - Name 125 "@main(struct-VSOutput-vf4-vf3-vf21[4];u1;" - Name 123 "patch" - Name 124 "InvocationID" - Name 137 "midPoint" - Name 148 "radius" - Name 158 "v0" - Name 169 "UBO" - MemberName 169(UBO) 0 "projection" - MemberName 169(UBO) 1 "modelview" - MemberName 169(UBO) 2 "lightPos" - MemberName 169(UBO) 3 "frustumPlanes" - MemberName 169(UBO) 4 "displacementFactor" - MemberName 169(UBO) 5 "tessellationFactor" - MemberName 169(UBO) 6 "viewportDim" - MemberName 169(UBO) 7 "tessellatedEdgeSize" - Name 192 "ubo" - MemberName 192(ubo) 0 "ubo" - Name 198 "" - Name 210 "clip0" - Name 227 "clip1" - Name 290 "pos" - Name 303 "textureHeight" - Name 312 "samplerHeight" - Name 333 "i" - Name 369 "output" - Name 378 "param" - Name 381 "param" - Name 403 "param" - Name 406 "param" - Name 411 "param" - Name 414 "param" - Name 419 "param" - Name 422 "param" - Name 427 "param" - Name 430 "param" - Name 459 "output" - Name 482 "patch" - Name 485 "patch.Pos" - Name 492 "patch.Normal" - Name 499 "patch.UV" - Name 531 "InvocationID" - Name 533 "InvocationID" - Name 535 "flattenTemp" - Name 536 "param" - Name 538 "param" - Name 542 "@entryPointOutput.Pos" - Name 549 "@entryPointOutput.Normal" - Name 556 "@entryPointOutput.UV" - Name 566 "@patchConstantResult" - Name 567 "param" - Name 571 "@patchConstantOutput.TessLevelOuter" - Name 586 "@patchConstantOutput.TessLevelInner" - Decorate 167 ArrayStride 16 - MemberDecorate 169(UBO) 0 RowMajor - MemberDecorate 169(UBO) 0 Offset 0 - MemberDecorate 169(UBO) 0 MatrixStride 16 - MemberDecorate 169(UBO) 1 RowMajor - MemberDecorate 169(UBO) 1 Offset 64 - MemberDecorate 169(UBO) 1 MatrixStride 16 - MemberDecorate 169(UBO) 2 Offset 128 - MemberDecorate 169(UBO) 3 Offset 144 - MemberDecorate 169(UBO) 4 Offset 240 - MemberDecorate 169(UBO) 5 Offset 244 - MemberDecorate 169(UBO) 6 Offset 248 - MemberDecorate 169(UBO) 7 Offset 256 - MemberDecorate 192(ubo) 0 Offset 0 - Decorate 192(ubo) Block - Decorate 198 DescriptorSet 0 - Decorate 198 Binding 0 - Decorate 303(textureHeight) DescriptorSet 0 - Decorate 303(textureHeight) Binding 1 - Decorate 312(samplerHeight) DescriptorSet 0 - Decorate 312(samplerHeight) Binding 1 - Decorate 485(patch.Pos) BuiltIn Position - Decorate 492(patch.Normal) Location 0 - Decorate 499(patch.UV) Location 1 - Decorate 533(InvocationID) BuiltIn InvocationId - Decorate 542(@entryPointOutput.Pos) BuiltIn Position - Decorate 549(@entryPointOutput.Normal) Location 0 - Decorate 556(@entryPointOutput.UV) Location 1 - Decorate 571(@patchConstantOutput.TessLevelOuter) Patch - Decorate 571(@patchConstantOutput.TessLevelOuter) BuiltIn TessLevelOuter - Decorate 586(@patchConstantOutput.TessLevelInner) Patch - Decorate 586(@patchConstantOutput.TessLevelInner) BuiltIn TessLevelInner - 3: TypeVoid - 4: TypeFunction 3 - 7: TypeFloat 32 - 10: TypeInt 32 0 - 13: 10(int) Constant 32 - 14: 10(int) Constant 6 - 15: 10(int) Constant 0 - 11: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 12 13 14 15 - 16: 10(int) Constant 3 - 8: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 9 13 16 15 - 17: TypeVector 7(float) 4 - 18: 10(int) Constant 4 - 19: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 6(FSign) 8 18 - 20: TypePointer Function 17(fvec4) - 21: TypeFunction 7(float) 20(ptr) 20(ptr) - 22: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 8(Floor) 16 8 19 19 - 28: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 35(Modf) 0 29 - 31: 10(int) Constant 1 - 32: 10(int) Constant 5 - 30: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 1(Round) 31 18 28 32 - 27: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 20(Cosh) 26 22 28 15 15 30 26 16 15 - 36: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 37 19 28 15 15 27 18 31 - 39: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 31(Sqrt) - 42: 10(int) Constant 2 - 40: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 41 19 28 15 15 27 18 42 - 44: TypeVector 7(float) 2 - 45: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 6(FSign) 8 42 - 46: TypePointer Function 44(fvec2) - 47: TypeBool - 49: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 48 13 42 15 - 50: TypeFunction 47(bool) 20(ptr) 46(ptr) - 51: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 8(Floor) 16 49 19 45 - 56: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 20(Cosh) 55 51 28 15 15 30 55 16 15 - 60: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 61 19 28 15 15 56 18 31 - 63: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 64 45 28 15 15 56 18 42 - 66: TypeVector 7(float) 3 - 67: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 6(FSign) 8 16 - 68(VSOutput): TypeStruct 17(fvec4) 66(fvec3) 44(fvec2) - 70: 10(int) Constant 44 - 71: 10(int) Constant 13 - 69: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 61 19 28 70 71 15 15 16 - 74: 10(int) Constant 45 - 75: 10(int) Constant 35 - 72: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 73 67 28 74 75 15 15 16 - 78: 10(int) Constant 46 - 79: 10(int) Constant 31 - 76: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 77 45 28 78 79 15 15 16 - 80: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(Fract) 81 31 28 15 15 30 81 15 16 69 72 76 - 82: TypeArray 68(VSOutput) 18 - 83: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 5(SAbs) 80 18 - 84: TypePointer Function 82 - 85: TypeArray 7(float) 18 - 86: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 5(SAbs) 8 18 - 87: TypeArray 7(float) 42 - 88: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 5(SAbs) 8 42 -89(ConstantsHSOutput): TypeStruct 85 87 - 92: 10(int) Constant 58 - 93: 10(int) Constant 25 - 90: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 91 86 28 92 93 15 15 16 - 96: 10(int) Constant 59 - 94: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 95 88 28 96 93 15 15 16 - 97: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(Fract) 98 31 28 15 15 30 98 15 16 90 94 - 99: TypeFunction 89(ConstantsHSOutput) 84(ptr) - 100: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 8(Floor) 16 97 83 - 104: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 20(Cosh) 103 100 28 15 15 30 103 16 15 - 108: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 109 83 28 15 15 104 18 31 - 111: TypePointer Function 10(int) - 112(HSOutput): TypeStruct 17(fvec4) 66(fvec3) 44(fvec2) - 114: 10(int) Constant 51 - 113: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 61 19 28 114 13 15 15 16 - 116: 10(int) Constant 52 - 115: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 73 67 28 116 75 15 15 16 - 118: 10(int) Constant 53 - 117: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 77 45 28 118 79 15 15 16 - 119: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(Fract) 120 31 28 15 15 30 120 15 16 113 115 117 - 121: TypeFunction 112(HSOutput) 84(ptr) 111(ptr) - 122: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 8(Floor) 16 119 83 11 - 127: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 20(Cosh) 126 122 28 15 15 30 126 16 15 - 131: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 109 83 28 15 15 127 18 31 - 133: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 134 11 28 15 15 127 18 42 - 140: 10(int) Constant 67 - 138: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 139 19 28 140 15 27 18 - 142: 7(float) Constant 1056964608 - 147: TypePointer Function 7(float) - 151: 10(int) Constant 69 - 149: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 150 8 28 151 15 27 18 - 156: 7(float) Constant 1073741824 - 161: 10(int) Constant 72 - 159: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 160 19 28 161 15 27 18 - 164: TypeMatrix 17(fvec4) 4 - 166: 47(bool) ConstantTrue - 165: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 108 19 18 166 - 167: TypeArray 17(fvec4) 14 - 168: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 5(SAbs) 19 14 - 169(UBO): TypeStruct 164 164 17(fvec4) 167 7(float) 7(float) 44(fvec2) 7(float) - 172: 10(int) Constant 29 - 173: 10(int) Constant 20 - 170: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 171 165 28 172 173 15 15 16 - 174: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 171 165 28 172 173 15 15 16 - 177: 10(int) Constant 30 - 178: 10(int) Constant 17 - 175: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 176 19 28 177 178 15 15 16 - 181: 10(int) Constant 22 - 179: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 180 168 28 79 181 15 15 16 - 184: 10(int) Constant 27 - 182: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 183 8 28 75 184 15 15 16 - 185: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 183 8 28 75 184 15 15 16 - 188: 10(int) Constant 34 - 186: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 187 45 28 188 173 15 15 16 - 189: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 183 8 28 75 184 15 15 16 - 190: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(Fract) 191 31 28 161 15 30 191 15 16 170 174 175 179 182 185 186 189 - 192(ubo): TypeStruct 169(UBO) - 195: 10(int) Constant 37 - 193: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 194 190 28 195 195 15 15 16 - 196: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(Fract) 194 31 28 161 15 30 194 15 16 193 - 197: TypePointer Uniform 192(ubo) - 198: 197(ptr) Variable Uniform - 200: 10(int) Constant 8 - 199: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(Atan) 29 196 28 161 15 30 29 198 200 - 201: TypeInt 32 1 - 203: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 202 13 18 15 - 204: 201(int) Constant 0 - 205: 201(int) Constant 1 - 206: TypePointer Uniform 164 - 213: 10(int) Constant 75 - 211: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 212 19 28 213 15 27 18 - 217: 7(float) Constant 0 - 218: 66(fvec3) ConstantComposite 217 217 217 - 230: 10(int) Constant 76 - 228: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 229 19 28 230 15 27 18 - 252: 201(int) Constant 6 - 253: TypePointer Uniform 44(fvec2) - 275: 201(int) Constant 7 - 276: TypePointer Uniform 7(float) - 280: 201(int) Constant 5 - 284: 7(float) Constant 1065353216 - 285: 7(float) Constant 1115684864 - 293: 10(int) Constant 98 - 291: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 292 19 28 293 15 56 18 - 296: TypeImage 7(float) 2D sampled format:Unknown - 299: 10(int) Constant 99 - 301: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 0(Unknown) - 297: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(Fract) 298 15 28 299 15 30 300 301 16 - 302: TypePointer UniformConstant 296 -303(textureHeight): 302(ptr) Variable UniformConstant - 304: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(Atan) 305 297 28 299 15 30 305 303(textureHeight) 200 - 307: TypeSampler - 308: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(Fract) 309 31 28 299 15 30 310 301 16 - 311: TypePointer UniformConstant 307 -312(samplerHeight): 311(ptr) Variable UniformConstant - 313: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(Atan) 314 308 28 299 15 30 314 312(samplerHeight) 200 - 316: TypeSampledImage 296 - 317: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(Fract) 318 15 28 299 15 30 319 301 16 - 324: 201(int) Constant 4 - 332: TypePointer Function 201(int) - 336: 10(int) Constant 102 - 334: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 335 203 28 336 15 56 18 - 344: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 48 13 42 15 - 347: 201(int) Constant 3 - 349: TypePointer Uniform 17(fvec4) - 353: 7(float) Constant 1090519040 - 355: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 48 13 42 15 - 359: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 48 13 42 15 - 360: 47(bool) ConstantFalse - 364: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 48 13 42 15 - 368: TypePointer Function 89(ConstantsHSOutput) - 372: 10(int) Constant 113 - 370: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 371 97 28 372 15 104 18 - 374: 85 ConstantComposite 217 217 217 217 - 375: 87 ConstantComposite 217 217 - 376:89(ConstantsHSOutput) ConstantComposite 374 375 - 377: 201(int) Constant 2 - 385: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 48 13 42 15 - 386: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 48 13 42 15 - 399: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 48 13 42 15 - 458: TypePointer Function 112(HSOutput) - 461: 10(int) Constant 159 - 460: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 371 119 28 461 15 127 18 - 463: 17(fvec4) ConstantComposite 217 217 217 217 - 464: 44(fvec2) ConstantComposite 217 217 - 465:112(HSOutput) ConstantComposite 463 218 464 - 471: TypePointer Function 66(fvec3) - 483: TypeArray 17(fvec4) 18 - 484: TypePointer Input 483 - 485(patch.Pos): 484(ptr) Variable Input - 486: TypePointer Input 17(fvec4) - 490: TypeArray 66(fvec3) 18 - 491: TypePointer Input 490 -492(patch.Normal): 491(ptr) Variable Input - 493: TypePointer Input 66(fvec3) - 497: TypeArray 44(fvec2) 18 - 498: TypePointer Input 497 - 499(patch.UV): 498(ptr) Variable Input - 500: TypePointer Input 44(fvec2) - 532: TypePointer Input 10(int) -533(InvocationID): 532(ptr) Variable Input - 541: TypePointer Output 483 -542(@entryPointOutput.Pos): 541(ptr) Variable Output - 546: TypePointer Output 17(fvec4) - 548: TypePointer Output 490 -549(@entryPointOutput.Normal): 548(ptr) Variable Output - 553: TypePointer Output 66(fvec3) - 555: TypePointer Output 497 -556(@entryPointOutput.UV): 555(ptr) Variable Output - 560: TypePointer Output 44(fvec2) - 570: TypePointer Output 85 -571(@patchConstantOutput.TessLevelOuter): 570(ptr) Variable Output - 574: TypePointer Output 7(float) - 585: TypePointer Output 87 -586(@patchConstantOutput.TessLevelInner): 585(ptr) Variable Output - 5(main): 3 Function None 4 - 6: Label - 482(patch): 84(ptr) Variable Function -531(InvocationID): 111(ptr) Variable Function -535(flattenTemp): 458(ptr) Variable Function - 536(param): 84(ptr) Variable Function - 538(param): 111(ptr) Variable Function -566(@patchConstantResult): 368(ptr) Variable Function - 567(param): 84(ptr) Variable Function - 487: 486(ptr) AccessChain 485(patch.Pos) 204 - 488: 17(fvec4) Load 487 - 489: 20(ptr) AccessChain 482(patch) 204 204 - Store 489 488 - 494: 493(ptr) AccessChain 492(patch.Normal) 204 - 495: 66(fvec3) Load 494 - 496: 471(ptr) AccessChain 482(patch) 204 205 - Store 496 495 - 501: 500(ptr) AccessChain 499(patch.UV) 204 - 502: 44(fvec2) Load 501 - 503: 46(ptr) AccessChain 482(patch) 204 377 - Store 503 502 - 504: 486(ptr) AccessChain 485(patch.Pos) 205 - 505: 17(fvec4) Load 504 - 506: 20(ptr) AccessChain 482(patch) 205 204 - Store 506 505 - 507: 493(ptr) AccessChain 492(patch.Normal) 205 - 508: 66(fvec3) Load 507 - 509: 471(ptr) AccessChain 482(patch) 205 205 - Store 509 508 - 510: 500(ptr) AccessChain 499(patch.UV) 205 - 511: 44(fvec2) Load 510 - 512: 46(ptr) AccessChain 482(patch) 205 377 - Store 512 511 - 513: 486(ptr) AccessChain 485(patch.Pos) 377 - 514: 17(fvec4) Load 513 - 515: 20(ptr) AccessChain 482(patch) 377 204 - Store 515 514 - 516: 493(ptr) AccessChain 492(patch.Normal) 377 - 517: 66(fvec3) Load 516 - 518: 471(ptr) AccessChain 482(patch) 377 205 - Store 518 517 - 519: 500(ptr) AccessChain 499(patch.UV) 377 - 520: 44(fvec2) Load 519 - 521: 46(ptr) AccessChain 482(patch) 377 377 - Store 521 520 - 522: 486(ptr) AccessChain 485(patch.Pos) 347 - 523: 17(fvec4) Load 522 - 524: 20(ptr) AccessChain 482(patch) 347 204 - Store 524 523 - 525: 493(ptr) AccessChain 492(patch.Normal) 347 - 526: 66(fvec3) Load 525 - 527: 471(ptr) AccessChain 482(patch) 347 205 - Store 527 526 - 528: 500(ptr) AccessChain 499(patch.UV) 347 - 529: 44(fvec2) Load 528 - 530: 46(ptr) AccessChain 482(patch) 347 377 - Store 530 529 - 534: 10(int) Load 533(InvocationID) - Store 531(InvocationID) 534 - 537: 82 Load 482(patch) - Store 536(param) 537 - 539: 10(int) Load 531(InvocationID) - Store 538(param) 539 - 540:112(HSOutput) FunctionCall 125(@main(struct-VSOutput-vf4-vf3-vf21[4];u1;) 536(param) 538(param) - Store 535(flattenTemp) 540 - 543: 10(int) Load 533(InvocationID) - 544: 20(ptr) AccessChain 535(flattenTemp) 204 - 545: 17(fvec4) Load 544 - 547: 546(ptr) AccessChain 542(@entryPointOutput.Pos) 543 - Store 547 545 - 550: 10(int) Load 533(InvocationID) - 551: 471(ptr) AccessChain 535(flattenTemp) 205 - 552: 66(fvec3) Load 551 - 554: 553(ptr) AccessChain 549(@entryPointOutput.Normal) 550 - Store 554 552 - 557: 10(int) Load 533(InvocationID) - 558: 46(ptr) AccessChain 535(flattenTemp) 377 - 559: 44(fvec2) Load 558 - 561: 560(ptr) AccessChain 556(@entryPointOutput.UV) 557 - Store 561 559 - ControlBarrier 42 18 15 - 562: 10(int) Load 533(InvocationID) - 563: 47(bool) IEqual 562 204 - SelectionMerge 565 None - BranchConditional 563 564 565 - 564: Label - 568: 82 Load 482(patch) - Store 567(param) 568 - 569:89(ConstantsHSOutput) FunctionCall 102(ConstantsHS(struct-VSOutput-vf4-vf3-vf21[4];) 567(param) - Store 566(@patchConstantResult) 569 - 572: 147(ptr) AccessChain 566(@patchConstantResult) 204 204 - 573: 7(float) Load 572 - 575: 574(ptr) AccessChain 571(@patchConstantOutput.TessLevelOuter) 204 - Store 575 573 - 576: 147(ptr) AccessChain 566(@patchConstantResult) 204 205 - 577: 7(float) Load 576 - 578: 574(ptr) AccessChain 571(@patchConstantOutput.TessLevelOuter) 205 - Store 578 577 - 579: 147(ptr) AccessChain 566(@patchConstantResult) 204 377 - 580: 7(float) Load 579 - 581: 574(ptr) AccessChain 571(@patchConstantOutput.TessLevelOuter) 377 - Store 581 580 - 582: 147(ptr) AccessChain 566(@patchConstantResult) 204 347 - 583: 7(float) Load 582 - 584: 574(ptr) AccessChain 571(@patchConstantOutput.TessLevelOuter) 347 - Store 584 583 - 587: 147(ptr) AccessChain 566(@patchConstantResult) 205 204 - 588: 7(float) Load 587 - 589: 574(ptr) AccessChain 586(@patchConstantOutput.TessLevelInner) 204 - Store 589 588 - 590: 147(ptr) AccessChain 566(@patchConstantResult) 205 205 - 591: 7(float) Load 590 - 592: 574(ptr) AccessChain 586(@patchConstantOutput.TessLevelInner) 205 - Store 592 591 - Branch 565 - 565: Label + 28: String "screenSpaceTessFactor" + 31: String "// OpModuleProcessed auto-map-locations +// OpModuleProcessed auto-map-bindings +// OpModuleProcessed entry-point main +// OpModuleProcessed client vulkan100 +// OpModuleProcessed target-env vulkan1.0 +// OpModuleProcessed keep-uncalled +// OpModuleProcessed hlsl-offsets +#line 1 +" + 39: String "p0" + 43: String "p1" + 50: String "bool" + 58: String "frustumCheck" + 64: String "Pos" + 67: String "inUV" + 76: String "Normal" + 80: String "UV" + 84: String "VSOutput" + 94: String "TessLevelOuter" + 98: String "TessLevelInner" + 101: String "ConstantsHSOutput" + 107: String "ConstantsHS" + 113: String "patch" + 124: String "HSOutput" + 131: String "@main" + 139: String "InvocationID" + 147: String "midPoint" + 159: String "radius" + 170: String "v0" + 180: String "modelview" + 185: String "lightPos" + 189: String "frustumPlanes" + 192: String "tessellatedEdgeSize" + 196: String "viewportDim" + 200: String "UBO" + 203: String "ubo" + 211: String "int" + 223: String "clip0" + 241: String "clip1" + 316: String "pos" + 323: String "type.2d.image" + 324: String "@type.2d.image" + 329: String "textureHeight" + 333: String "type.sampler" + 334: String "@type.sampler" + 338: String "samplerHeight" + 342: String "type.sampled.image" + 343: String "@type.sampled.image" + 361: String "i" + 410: String "output" + Name 6 "main" + Name 26 "screenSpaceTessFactor(vf4;vf4;" + Name 24 "p0" + Name 25 "p1" + Name 56 "frustumCheck(vf4;vf2;" + Name 54 "Pos" + Name 55 "inUV" + Name 71 "VSOutput" + MemberName 71(VSOutput) 0 "Pos" + MemberName 71(VSOutput) 1 "Normal" + MemberName 71(VSOutput) 2 "UV" + Name 92 "ConstantsHSOutput" + MemberName 92(ConstantsHSOutput) 0 "TessLevelOuter" + MemberName 92(ConstantsHSOutput) 1 "TessLevelInner" + Name 105 "ConstantsHS(struct-VSOutput-vf4-vf3-vf21[4];" + Name 104 "patch" + Name 116 "HSOutput" + MemberName 116(HSOutput) 0 "Pos" + MemberName 116(HSOutput) 1 "Normal" + MemberName 116(HSOutput) 2 "UV" + Name 129 "@main(struct-VSOutput-vf4-vf3-vf21[4];u1;" + Name 127 "patch" + Name 128 "InvocationID" + Name 145 "midPoint" + Name 157 "radius" + Name 168 "v0" + Name 178 "UBO" + MemberName 178(UBO) 0 "projection" + MemberName 178(UBO) 1 "modelview" + MemberName 178(UBO) 2 "lightPos" + MemberName 178(UBO) 3 "frustumPlanes" + MemberName 178(UBO) 4 "displacementFactor" + MemberName 178(UBO) 5 "tessellationFactor" + MemberName 178(UBO) 6 "viewportDim" + MemberName 178(UBO) 7 "tessellatedEdgeSize" + Name 201 "ubo" + MemberName 201(ubo) 0 "ubo" + Name 207 "" + Name 221 "clip0" + Name 239 "clip1" + Name 314 "pos" + Name 327 "textureHeight" + Name 336 "samplerHeight" + Name 359 "i" + Name 408 "output" + Name 418 "param" + Name 421 "param" + Name 459 "param" + Name 462 "param" + Name 469 "param" + Name 472 "param" + Name 479 "param" + Name 482 "param" + Name 489 "param" + Name 492 "param" + Name 544 "output" + Name 574 "patch" + Name 577 "patch.Pos" + Name 584 "patch.Normal" + Name 591 "patch.UV" + Name 623 "InvocationID" + Name 625 "InvocationID" + Name 627 "flattenTemp" + Name 628 "param" + Name 630 "param" + Name 634 "@entryPointOutput.Pos" + Name 641 "@entryPointOutput.Normal" + Name 648 "@entryPointOutput.UV" + Name 658 "@patchConstantResult" + Name 659 "param" + Name 663 "@patchConstantOutput.TessLevelOuter" + Name 678 "@patchConstantOutput.TessLevelInner" + Decorate 176 ArrayStride 16 + MemberDecorate 178(UBO) 0 RowMajor + MemberDecorate 178(UBO) 0 Offset 0 + MemberDecorate 178(UBO) 0 MatrixStride 16 + MemberDecorate 178(UBO) 1 RowMajor + MemberDecorate 178(UBO) 1 Offset 64 + MemberDecorate 178(UBO) 1 MatrixStride 16 + MemberDecorate 178(UBO) 2 Offset 128 + MemberDecorate 178(UBO) 3 Offset 144 + MemberDecorate 178(UBO) 4 Offset 240 + MemberDecorate 178(UBO) 5 Offset 244 + MemberDecorate 178(UBO) 6 Offset 248 + MemberDecorate 178(UBO) 7 Offset 256 + MemberDecorate 201(ubo) 0 Offset 0 + Decorate 201(ubo) Block + Decorate 207 DescriptorSet 0 + Decorate 207 Binding 0 + Decorate 327(textureHeight) DescriptorSet 0 + Decorate 327(textureHeight) Binding 1 + Decorate 336(samplerHeight) DescriptorSet 0 + Decorate 336(samplerHeight) Binding 1 + Decorate 577(patch.Pos) BuiltIn Position + Decorate 584(patch.Normal) Location 0 + Decorate 591(patch.UV) Location 1 + Decorate 625(InvocationID) BuiltIn InvocationId + Decorate 634(@entryPointOutput.Pos) BuiltIn Position + Decorate 641(@entryPointOutput.Normal) Location 0 + Decorate 648(@entryPointOutput.UV) Location 1 + Decorate 663(@patchConstantOutput.TessLevelOuter) Patch + Decorate 663(@patchConstantOutput.TessLevelOuter) BuiltIn TessLevelOuter + Decorate 678(@patchConstantOutput.TessLevelInner) Patch + Decorate 678(@patchConstantOutput.TessLevelInner) BuiltIn TessLevelInner + 4: TypeVoid + 5: TypeFunction 4 + 8: TypeFloat 32 + 11: TypeInt 32 0 + 14: 11(int) Constant 32 + 15: 11(int) Constant 6 + 16: 11(int) Constant 0 + 13: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 12 14 15 16 + 17: 11(int) Constant 3 + 10: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 9 14 17 16 + 18: TypeVector 8(float) 4 + 19: 11(int) Constant 4 + 20: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 10 19 + 21: TypePointer Function 18(fvec4) + 22: TypeFunction 8(float) 21(ptr) 21(ptr) + 23: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 8(DebugTypeFunction) 17 10 20 20 + 30: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 35(DebugSource) 1 31 + 32: 11(int) Constant 65 + 34: 11(int) Constant 1 + 35: 11(int) Constant 5 + 33: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 1(DebugCompilationUnit) 34 19 30 35 + 29: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 20(DebugFunction) 28 23 30 32 16 33 28 17 32 + 38: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 39 20 30 32 16 29 19 34 + 41: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 31(DebugExpression) + 44: 11(int) Constant 2 + 42: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 43 20 30 32 16 29 19 44 + 46: TypeVector 8(float) 2 + 47: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 10 44 + 48: TypePointer Function 46(fvec2) + 49: TypeBool + 51: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 50 14 44 16 + 52: TypeFunction 49(bool) 21(ptr) 48(ptr) + 53: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 8(DebugTypeFunction) 17 51 20 47 + 60: 11(int) Constant 95 + 59: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 20(DebugFunction) 58 53 30 60 16 33 58 17 60 + 63: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 64 20 30 60 16 59 19 34 + 66: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 67 47 30 60 16 59 19 44 + 69: TypeVector 8(float) 3 + 70: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 10 17 + 71(VSOutput): TypeStruct 18(fvec4) 69(fvec3) 46(fvec2) + 73: 11(int) Constant 44 + 74: 11(int) Constant 13 + 72: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 64 20 30 73 74 16 16 17 + 77: 11(int) Constant 45 + 78: 11(int) Constant 35 + 75: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 76 70 30 77 78 16 16 17 + 81: 11(int) Constant 46 + 82: 11(int) Constant 31 + 79: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 80 47 30 81 82 16 16 17 + 83: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 84 34 30 60 16 33 84 16 17 72 75 79 + 85: TypeArray 71(VSOutput) 19 + 86: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 83 19 + 87: TypePointer Function 85 + 88: TypeArray 8(float) 19 + 89: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 10 19 + 90: TypeArray 8(float) 44 + 91: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 10 44 +92(ConstantsHSOutput): TypeStruct 88 90 + 95: 11(int) Constant 58 + 96: 11(int) Constant 25 + 93: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 94 89 30 95 96 16 16 17 + 99: 11(int) Constant 59 + 97: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 98 91 30 99 96 16 16 17 + 100: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 101 34 30 60 16 33 101 16 17 93 97 + 102: TypeFunction 92(ConstantsHSOutput) 87(ptr) + 103: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 8(DebugTypeFunction) 17 100 86 + 109: 11(int) Constant 112 + 108: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 20(DebugFunction) 107 103 30 109 16 33 107 17 109 + 112: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 113 86 30 109 16 108 19 34 + 115: TypePointer Function 11(int) + 116(HSOutput): TypeStruct 18(fvec4) 69(fvec3) 46(fvec2) + 118: 11(int) Constant 51 + 117: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 64 20 30 118 14 16 16 17 + 120: 11(int) Constant 52 + 119: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 76 70 30 120 78 16 16 17 + 122: 11(int) Constant 53 + 121: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 80 47 30 122 82 16 16 17 + 123: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 124 34 30 109 16 33 124 16 17 117 119 121 + 125: TypeFunction 116(HSOutput) 87(ptr) 115(ptr) + 126: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 8(DebugTypeFunction) 17 123 86 13 + 133: 11(int) Constant 158 + 132: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 20(DebugFunction) 131 126 30 133 16 33 131 17 133 + 136: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 113 86 30 133 16 132 19 34 + 138: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 139 13 30 133 16 132 19 44 + 144: 11(int) Constant 67 + 146: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 147 20 30 144 16 29 19 + 149: 8(float) Constant 1056964608 + 155: 11(int) Constant 69 + 156: TypePointer Function 8(float) + 158: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 159 10 30 155 16 29 19 + 164: 8(float) Constant 1073741824 + 167: 11(int) Constant 72 + 169: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 170 20 30 167 16 29 19 + 173: TypeMatrix 18(fvec4) 4 + 175: 49(bool) ConstantTrue + 174: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 108(DebugTypeMatrix) 20 19 175 + 176: TypeArray 18(fvec4) 15 + 177: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 20 15 + 178(UBO): TypeStruct 173 173 18(fvec4) 176 8(float) 8(float) 46(fvec2) 8(float) + 181: 11(int) Constant 29 + 182: 11(int) Constant 20 + 179: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 180 174 30 181 182 16 16 17 + 183: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 180 174 30 181 182 16 16 17 + 186: 11(int) Constant 30 + 187: 11(int) Constant 17 + 184: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 185 20 30 186 187 16 16 17 + 190: 11(int) Constant 22 + 188: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 189 177 30 82 190 16 16 17 + 193: 11(int) Constant 27 + 191: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 192 10 30 78 193 16 16 17 + 194: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 192 10 30 78 193 16 16 17 + 197: 11(int) Constant 34 + 195: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 196 47 30 197 182 16 16 17 + 198: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 192 10 30 78 193 16 16 17 + 199: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 200 34 30 167 16 33 200 16 17 179 183 184 188 191 194 195 198 + 201(ubo): TypeStruct 178(UBO) + 204: 11(int) Constant 37 + 202: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 203 199 30 204 204 16 16 17 + 205: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 203 34 30 167 16 33 203 16 17 202 + 206: TypePointer Uniform 201(ubo) + 207: 206(ptr) Variable Uniform + 209: 11(int) Constant 8 + 208: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 1 205 30 167 16 33 1 207 209 + 210: TypeInt 32 1 + 212: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 211 14 19 16 + 213: 210(int) Constant 0 + 214: 210(int) Constant 1 + 215: TypePointer Uniform 173 + 220: 11(int) Constant 75 + 222: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 223 20 30 220 16 29 19 + 227: 8(float) Constant 0 + 228: 69(fvec3) ConstantComposite 227 227 227 + 238: 11(int) Constant 76 + 240: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 241 20 30 238 16 29 19 + 254: 11(int) Constant 79 + 261: 11(int) Constant 80 + 268: 11(int) Constant 83 + 269: 210(int) Constant 6 + 270: TypePointer Uniform 46(fvec2) + 281: 11(int) Constant 84 + 292: 11(int) Constant 89 + 296: 210(int) Constant 7 + 297: TypePointer Uniform 8(float) + 301: 210(int) Constant 5 + 305: 8(float) Constant 1065353216 + 306: 8(float) Constant 1115684864 + 313: 11(int) Constant 98 + 315: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 316 20 30 313 16 59 19 + 320: 11(int) Constant 99 + 321: TypeImage 8(float) 2D sampled format:Unknown + 325: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 0(DebugInfoNone) + 322: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 323 16 30 320 16 33 324 325 17 + 326: TypePointer UniformConstant 321 +327(textureHeight): 326(ptr) Variable UniformConstant + 328: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 329 322 30 320 16 33 329 327(textureHeight) 209 + 331: TypeSampler + 332: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 333 34 30 320 16 33 334 325 17 + 335: TypePointer UniformConstant 331 +336(samplerHeight): 335(ptr) Variable UniformConstant + 337: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 338 332 30 320 16 33 338 336(samplerHeight) 209 + 340: TypeSampledImage 321 + 341: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 342 16 30 320 16 33 343 325 17 + 348: 210(int) Constant 4 + 357: 11(int) Constant 102 + 358: TypePointer Function 210(int) + 360: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 361 212 30 357 16 59 19 + 376: 11(int) Constant 103 + 378: 210(int) Constant 3 + 380: TypePointer Uniform 18(fvec4) + 384: 8(float) Constant 1090519040 + 389: 49(bool) ConstantFalse + 392: 11(int) Constant 105 + 400: 11(int) Constant 108 + 406: 11(int) Constant 113 + 407: TypePointer Function 92(ConstantsHSOutput) + 409: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 410 100 30 406 16 108 19 + 412: 88 ConstantComposite 227 227 227 227 + 413: 90 ConstantComposite 227 227 + 414:92(ConstantsHSOutput) ConstantComposite 412 413 + 416: 11(int) Constant 115 + 417: 210(int) Constant 2 + 430: 11(int) Constant 117 + 433: 11(int) Constant 118 + 436: 11(int) Constant 119 + 439: 11(int) Constant 120 + 442: 11(int) Constant 121 + 445: 11(int) Constant 122 + 450: 11(int) Constant 126 + 458: 11(int) Constant 128 + 468: 11(int) Constant 129 + 478: 11(int) Constant 130 + 488: 11(int) Constant 131 + 498: 11(int) Constant 132 + 506: 11(int) Constant 133 + 516: 11(int) Constant 139 + 519: 11(int) Constant 140 + 522: 11(int) Constant 141 + 525: 11(int) Constant 142 + 528: 11(int) Constant 143 + 531: 11(int) Constant 144 + 535: 11(int) Constant 148 + 542: 11(int) Constant 159 + 543: TypePointer Function 116(HSOutput) + 545: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 410 123 30 542 16 132 19 + 547: 18(fvec4) ConstantComposite 227 227 227 227 + 548: 46(fvec2) ConstantComposite 227 227 + 549:116(HSOutput) ConstantComposite 547 228 548 + 551: 11(int) Constant 160 + 557: 11(int) Constant 161 + 559: TypePointer Function 69(fvec3) + 564: 11(int) Constant 162 + 570: 11(int) Constant 163 + 575: TypeArray 18(fvec4) 19 + 576: TypePointer Input 575 + 577(patch.Pos): 576(ptr) Variable Input + 578: TypePointer Input 18(fvec4) + 582: TypeArray 69(fvec3) 19 + 583: TypePointer Input 582 +584(patch.Normal): 583(ptr) Variable Input + 585: TypePointer Input 69(fvec3) + 589: TypeArray 46(fvec2) 19 + 590: TypePointer Input 589 + 591(patch.UV): 590(ptr) Variable Input + 592: TypePointer Input 46(fvec2) + 624: TypePointer Input 11(int) +625(InvocationID): 624(ptr) Variable Input + 633: TypePointer Output 575 +634(@entryPointOutput.Pos): 633(ptr) Variable Output + 638: TypePointer Output 18(fvec4) + 640: TypePointer Output 582 +641(@entryPointOutput.Normal): 640(ptr) Variable Output + 645: TypePointer Output 69(fvec3) + 647: TypePointer Output 589 +648(@entryPointOutput.UV): 647(ptr) Variable Output + 652: TypePointer Output 46(fvec2) + 662: TypePointer Output 88 +663(@patchConstantOutput.TessLevelOuter): 662(ptr) Variable Output + 666: TypePointer Output 8(float) + 677: TypePointer Output 90 +678(@patchConstantOutput.TessLevelInner): 677(ptr) Variable Output + Line 1 158 1 + 6(main): 4 Function None 5 + 7: Label + 574(patch): 87(ptr) Variable Function +623(InvocationID): 115(ptr) Variable Function +627(flattenTemp): 543(ptr) Variable Function + 628(param): 87(ptr) Variable Function + 630(param): 115(ptr) Variable Function +658(@patchConstantResult): 407(ptr) Variable Function + 659(param): 87(ptr) Variable Function + Line 1 158 0 + 579: 578(ptr) AccessChain 577(patch.Pos) 213 + 580: 18(fvec4) Load 579 + 581: 21(ptr) AccessChain 574(patch) 213 213 + Store 581 580 + 586: 585(ptr) AccessChain 584(patch.Normal) 213 + 587: 69(fvec3) Load 586 + 588: 559(ptr) AccessChain 574(patch) 213 214 + Store 588 587 + 593: 592(ptr) AccessChain 591(patch.UV) 213 + 594: 46(fvec2) Load 593 + 595: 48(ptr) AccessChain 574(patch) 213 417 + Store 595 594 + 596: 578(ptr) AccessChain 577(patch.Pos) 214 + 597: 18(fvec4) Load 596 + 598: 21(ptr) AccessChain 574(patch) 214 213 + Store 598 597 + 599: 585(ptr) AccessChain 584(patch.Normal) 214 + 600: 69(fvec3) Load 599 + 601: 559(ptr) AccessChain 574(patch) 214 214 + Store 601 600 + 602: 592(ptr) AccessChain 591(patch.UV) 214 + 603: 46(fvec2) Load 602 + 604: 48(ptr) AccessChain 574(patch) 214 417 + Store 604 603 + 605: 578(ptr) AccessChain 577(patch.Pos) 417 + 606: 18(fvec4) Load 605 + 607: 21(ptr) AccessChain 574(patch) 417 213 + Store 607 606 + 608: 585(ptr) AccessChain 584(patch.Normal) 417 + 609: 69(fvec3) Load 608 + 610: 559(ptr) AccessChain 574(patch) 417 214 + Store 610 609 + 611: 592(ptr) AccessChain 591(patch.UV) 417 + 612: 46(fvec2) Load 611 + 613: 48(ptr) AccessChain 574(patch) 417 417 + Store 613 612 + 614: 578(ptr) AccessChain 577(patch.Pos) 378 + 615: 18(fvec4) Load 614 + 616: 21(ptr) AccessChain 574(patch) 378 213 + Store 616 615 + 617: 585(ptr) AccessChain 584(patch.Normal) 378 + 618: 69(fvec3) Load 617 + 619: 559(ptr) AccessChain 574(patch) 378 214 + Store 619 618 + 620: 592(ptr) AccessChain 591(patch.UV) 378 + 621: 46(fvec2) Load 620 + 622: 48(ptr) AccessChain 574(patch) 378 417 + Store 622 621 + 626: 11(int) Load 625(InvocationID) + Store 623(InvocationID) 626 + 629: 85 Load 574(patch) + Store 628(param) 629 + 631: 11(int) Load 623(InvocationID) + Store 630(param) 631 + 632:116(HSOutput) FunctionCall 129(@main(struct-VSOutput-vf4-vf3-vf21[4];u1;) 628(param) 630(param) + Store 627(flattenTemp) 632 + 635: 11(int) Load 625(InvocationID) + 636: 21(ptr) AccessChain 627(flattenTemp) 213 + 637: 18(fvec4) Load 636 + 639: 638(ptr) AccessChain 634(@entryPointOutput.Pos) 635 + Store 639 637 + 642: 11(int) Load 625(InvocationID) + 643: 559(ptr) AccessChain 627(flattenTemp) 214 + 644: 69(fvec3) Load 643 + 646: 645(ptr) AccessChain 641(@entryPointOutput.Normal) 642 + Store 646 644 + 649: 11(int) Load 625(InvocationID) + 650: 48(ptr) AccessChain 627(flattenTemp) 417 + 651: 46(fvec2) Load 650 + 653: 652(ptr) AccessChain 648(@entryPointOutput.UV) 649 + Store 653 651 + ControlBarrier 44 19 16 + 654: 11(int) Load 625(InvocationID) + 655: 49(bool) IEqual 654 213 + SelectionMerge 657 None + BranchConditional 655 656 657 + 656: Label + 660: 85 Load 574(patch) + Store 659(param) 660 + 661:92(ConstantsHSOutput) FunctionCall 105(ConstantsHS(struct-VSOutput-vf4-vf3-vf21[4];) 659(param) + Store 658(@patchConstantResult) 661 + 664: 156(ptr) AccessChain 658(@patchConstantResult) 213 213 + 665: 8(float) Load 664 + 667: 666(ptr) AccessChain 663(@patchConstantOutput.TessLevelOuter) 213 + Store 667 665 + 668: 156(ptr) AccessChain 658(@patchConstantResult) 213 214 + 669: 8(float) Load 668 + 670: 666(ptr) AccessChain 663(@patchConstantOutput.TessLevelOuter) 214 + Store 670 669 + 671: 156(ptr) AccessChain 658(@patchConstantResult) 213 417 + 672: 8(float) Load 671 + 673: 666(ptr) AccessChain 663(@patchConstantOutput.TessLevelOuter) 417 + Store 673 672 + 674: 156(ptr) AccessChain 658(@patchConstantResult) 213 378 + 675: 8(float) Load 674 + 676: 666(ptr) AccessChain 663(@patchConstantOutput.TessLevelOuter) 378 + Store 676 675 + 679: 156(ptr) AccessChain 658(@patchConstantResult) 214 213 + 680: 8(float) Load 679 + 681: 666(ptr) AccessChain 678(@patchConstantOutput.TessLevelInner) 213 + Store 681 680 + 682: 156(ptr) AccessChain 658(@patchConstantResult) 214 214 + 683: 8(float) Load 682 + 684: 666(ptr) AccessChain 678(@patchConstantOutput.TessLevelInner) 214 + Store 684 683 + Branch 657 + 657: Label Return FunctionEnd -25(screenSpaceTessFactor(vf4;vf4;): 7(float) Function None 21 - 23(p0): 20(ptr) FunctionParameter - 24(p1): 20(ptr) FunctionParameter - 33: Label - 137(midPoint): 20(ptr) Variable Function - 148(radius): 147(ptr) Variable Function - 158(v0): 20(ptr) Variable Function - 210(clip0): 20(ptr) Variable Function - 227(clip1): 20(ptr) Variable Function - 34: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(Acosh) 27 - 35: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103 28 15 15 15 15 - 38: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 36 23(p0) 39 - 43: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 40 24(p1) 39 - 136: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 101 27 25(screenSpaceTessFactor(vf4;vf4;) - 141: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 138 137(midPoint) 39 - 143: 17(fvec4) Load 23(p0) - 144: 17(fvec4) Load 24(p1) - 145: 17(fvec4) FAdd 143 144 - 146: 17(fvec4) VectorTimesScalar 145 142 - Store 137(midPoint) 146 - 152: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 149 148(radius) 39 - 153: 17(fvec4) Load 23(p0) - 154: 17(fvec4) Load 24(p1) - 155: 7(float) ExtInst 2(GLSL.std.450) 67(Distance) 153 154 - 157: 7(float) FDiv 155 156 - Store 148(radius) 157 - 162: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 159 158(v0) 39 - 163: 17(fvec4) Load 137(midPoint) - 207: 206(ptr) AccessChain 198 204 205 - 208: 164 Load 207 - 209: 17(fvec4) VectorTimesMatrix 163 208 - Store 158(v0) 209 - 214: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 211 210(clip0) 39 - 215: 17(fvec4) Load 158(v0) - 216: 7(float) Load 148(radius) - 219: 7(float) CompositeExtract 218 0 - 220: 7(float) CompositeExtract 218 1 - 221: 7(float) CompositeExtract 218 2 - 222: 17(fvec4) CompositeConstruct 216 219 220 221 - 223: 17(fvec4) FSub 215 222 - 224: 206(ptr) AccessChain 198 204 204 - 225: 164 Load 224 - 226: 17(fvec4) VectorTimesMatrix 223 225 - Store 210(clip0) 226 - 231: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 228 227(clip1) 39 - 232: 17(fvec4) Load 158(v0) - 233: 7(float) Load 148(radius) - 234: 7(float) CompositeExtract 218 0 - 235: 7(float) CompositeExtract 218 1 - 236: 7(float) CompositeExtract 218 2 - 237: 17(fvec4) CompositeConstruct 233 234 235 236 - 238: 17(fvec4) FAdd 232 237 - 239: 206(ptr) AccessChain 198 204 204 - 240: 164 Load 239 - 241: 17(fvec4) VectorTimesMatrix 238 240 - Store 227(clip1) 241 - 242: 147(ptr) AccessChain 210(clip0) 16 - 243: 7(float) Load 242 - 244: 17(fvec4) Load 210(clip0) - 245: 17(fvec4) CompositeConstruct 243 243 243 243 - 246: 17(fvec4) FDiv 244 245 - Store 210(clip0) 246 - 247: 147(ptr) AccessChain 227(clip1) 16 - 248: 7(float) Load 247 - 249: 17(fvec4) Load 227(clip1) - 250: 17(fvec4) CompositeConstruct 248 248 248 248 - 251: 17(fvec4) FDiv 249 250 - Store 227(clip1) 251 - 254: 253(ptr) AccessChain 198 204 252 - 255: 44(fvec2) Load 254 - 256: 17(fvec4) Load 210(clip0) - 257: 44(fvec2) VectorShuffle 256 256 0 1 - 258: 44(fvec2) FMul 257 255 - 259: 147(ptr) AccessChain 210(clip0) 15 - 260: 7(float) CompositeExtract 258 0 - Store 259 260 - 261: 147(ptr) AccessChain 210(clip0) 31 - 262: 7(float) CompositeExtract 258 1 - Store 261 262 - 263: 253(ptr) AccessChain 198 204 252 - 264: 44(fvec2) Load 263 - 265: 17(fvec4) Load 227(clip1) - 266: 44(fvec2) VectorShuffle 265 265 0 1 - 267: 44(fvec2) FMul 266 264 - 268: 147(ptr) AccessChain 227(clip1) 15 - 269: 7(float) CompositeExtract 267 0 - Store 268 269 - 270: 147(ptr) AccessChain 227(clip1) 31 - 271: 7(float) CompositeExtract 267 1 - Store 270 271 - 272: 17(fvec4) Load 210(clip0) - 273: 17(fvec4) Load 227(clip1) - 274: 7(float) ExtInst 2(GLSL.std.450) 67(Distance) 272 273 - 277: 276(ptr) AccessChain 198 204 275 - 278: 7(float) Load 277 - 279: 7(float) FDiv 274 278 - 281: 276(ptr) AccessChain 198 204 280 - 282: 7(float) Load 281 - 283: 7(float) FMul 279 282 - 286: 7(float) ExtInst 2(GLSL.std.450) 43(FClamp) 283 284 285 - ReturnValue 286 + Line 1 65 1 +26(screenSpaceTessFactor(vf4;vf4;): 8(float) Function None 22 + 24(p0): 21(ptr) FunctionParameter + 25(p1): 21(ptr) FunctionParameter + 27: Label + 145(midPoint): 21(ptr) Variable Function + 157(radius): 156(ptr) Variable Function + 168(v0): 21(ptr) Variable Function + 221(clip0): 21(ptr) Variable Function + 239(clip1): 21(ptr) Variable Function + 36: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 29 + 37: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 32 32 16 16 + 40: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 38 24(p0) 41 + 45: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 42 25(p1) 41 + 141: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 101(DebugFunctionDefinition) 29 26(screenSpaceTessFactor(vf4;vf4;) + 142: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 29 + 143: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 144 144 16 16 + 148: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 146 145(midPoint) 41 + 150: 18(fvec4) Load 24(p0) + 151: 18(fvec4) Load 25(p1) + 152: 18(fvec4) FAdd 150 151 + 153: 18(fvec4) VectorTimesScalar 152 149 + Store 145(midPoint) 153 + 154: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 155 155 16 16 + 160: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 158 157(radius) 41 + 161: 18(fvec4) Load 24(p0) + 162: 18(fvec4) Load 25(p1) + 163: 8(float) ExtInst 3(GLSL.std.450) 67(Distance) 161 162 + 165: 8(float) FDiv 163 164 + Store 157(radius) 165 + 166: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 167 167 16 16 + 171: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 169 168(v0) 41 + 172: 18(fvec4) Load 145(midPoint) + 216: 215(ptr) AccessChain 207 213 214 + 217: 173 Load 216 + 218: 18(fvec4) VectorTimesMatrix 172 217 + Store 168(v0) 218 + 219: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 220 220 16 16 + 224: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 222 221(clip0) 41 + 225: 18(fvec4) Load 168(v0) + 226: 8(float) Load 157(radius) + 229: 8(float) CompositeExtract 228 0 + 230: 8(float) CompositeExtract 228 1 + 231: 8(float) CompositeExtract 228 2 + 232: 18(fvec4) CompositeConstruct 226 229 230 231 + 233: 18(fvec4) FSub 225 232 + 234: 215(ptr) AccessChain 207 213 213 + 235: 173 Load 234 + 236: 18(fvec4) VectorTimesMatrix 233 235 + Store 221(clip0) 236 + 237: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 238 238 16 16 + 242: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 240 239(clip1) 41 + 243: 18(fvec4) Load 168(v0) + 244: 8(float) Load 157(radius) + 245: 8(float) CompositeExtract 228 0 + 246: 8(float) CompositeExtract 228 1 + 247: 8(float) CompositeExtract 228 2 + 248: 18(fvec4) CompositeConstruct 244 245 246 247 + 249: 18(fvec4) FAdd 243 248 + 250: 215(ptr) AccessChain 207 213 213 + 251: 173 Load 250 + 252: 18(fvec4) VectorTimesMatrix 249 251 + Store 239(clip1) 252 + 253: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 254 254 16 16 + 255: 156(ptr) AccessChain 221(clip0) 17 + 256: 8(float) Load 255 + 257: 18(fvec4) Load 221(clip0) + 258: 18(fvec4) CompositeConstruct 256 256 256 256 + 259: 18(fvec4) FDiv 257 258 + Store 221(clip0) 259 + 260: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 261 261 16 16 + 262: 156(ptr) AccessChain 239(clip1) 17 + 263: 8(float) Load 262 + 264: 18(fvec4) Load 239(clip1) + 265: 18(fvec4) CompositeConstruct 263 263 263 263 + 266: 18(fvec4) FDiv 264 265 + Store 239(clip1) 266 + 267: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 268 268 16 16 + 271: 270(ptr) AccessChain 207 213 269 + 272: 46(fvec2) Load 271 + 273: 18(fvec4) Load 221(clip0) + 274: 46(fvec2) VectorShuffle 273 273 0 1 + 275: 46(fvec2) FMul 274 272 + 276: 156(ptr) AccessChain 221(clip0) 16 + 277: 8(float) CompositeExtract 275 0 + Store 276 277 + 278: 156(ptr) AccessChain 221(clip0) 34 + 279: 8(float) CompositeExtract 275 1 + Store 278 279 + 280: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 281 281 16 16 + 282: 270(ptr) AccessChain 207 213 269 + 283: 46(fvec2) Load 282 + 284: 18(fvec4) Load 239(clip1) + 285: 46(fvec2) VectorShuffle 284 284 0 1 + 286: 46(fvec2) FMul 285 283 + 287: 156(ptr) AccessChain 239(clip1) 16 + 288: 8(float) CompositeExtract 286 0 + Store 287 288 + 289: 156(ptr) AccessChain 239(clip1) 34 + 290: 8(float) CompositeExtract 286 1 + Store 289 290 + 291: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 292 292 16 16 + 293: 18(fvec4) Load 221(clip0) + 294: 18(fvec4) Load 239(clip1) + 295: 8(float) ExtInst 3(GLSL.std.450) 67(Distance) 293 294 + 298: 297(ptr) AccessChain 207 213 296 + 299: 8(float) Load 298 + 300: 8(float) FDiv 295 299 + 302: 297(ptr) AccessChain 207 213 301 + 303: 8(float) Load 302 + 304: 8(float) FMul 300 303 + 307: 8(float) ExtInst 3(GLSL.std.450) 43(FClamp) 304 305 306 + ReturnValue 307 FunctionEnd -54(frustumCheck(vf4;vf2;): 47(bool) Function None 50 - 52(Pos): 20(ptr) FunctionParameter - 53(inUV): 46(ptr) FunctionParameter + Line 1 95 1 +56(frustumCheck(vf4;vf2;): 49(bool) Function None 52 + 54(Pos): 21(ptr) FunctionParameter + 55(inUV): 48(ptr) FunctionParameter 57: Label - 290(pos): 20(ptr) Variable Function - 333(i): 332(ptr) Variable Function - 58: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(Acosh) 56 - 59: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103 28 15 15 15 15 - 62: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 60 52(Pos) 39 - 65: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 63 53(inUV) 39 - 289: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 101 56 54(frustumCheck(vf4;vf2;) - 294: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 291 290(pos) 39 - 295: 17(fvec4) Load 52(Pos) - Store 290(pos) 295 - 306: 296 Load 303(textureHeight) - 315: 307 Load 312(samplerHeight) - 320: 316 SampledImage 306 315 - 321: 44(fvec2) Load 53(inUV) - 322: 17(fvec4) ImageSampleExplicitLod 320 321 Lod 217 - 323: 7(float) CompositeExtract 322 0 - 325: 276(ptr) AccessChain 198 204 324 - 326: 7(float) Load 325 - 327: 7(float) FMul 323 326 - 328: 147(ptr) AccessChain 290(pos) 31 - 329: 7(float) Load 328 - 330: 7(float) FSub 329 327 - 331: 147(ptr) AccessChain 290(pos) 31 - Store 331 330 - 337: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 334 333(i) 39 - Store 333(i) 204 - Branch 338 - 338: Label - LoopMerge 340 341 None - Branch 342 - 342: Label - 343: 201(int) Load 333(i) - 345: 47(bool) SLessThan 343 252 - BranchConditional 345 339 340 - 339: Label - 346: 17(fvec4) Load 290(pos) - 348: 201(int) Load 333(i) - 350: 349(ptr) AccessChain 198 204 347 348 - 351: 17(fvec4) Load 350 - 352: 7(float) Dot 346 351 - 354: 7(float) FAdd 352 353 - 356: 47(bool) FOrdLessThan 354 217 - SelectionMerge 358 None - BranchConditional 356 357 358 - 357: Label - ReturnValue 360 - 358: Label - Branch 341 - 341: Label - 362: 201(int) Load 333(i) - 363: 201(int) IAdd 362 205 - Store 333(i) 363 - Branch 338 - 340: Label - ReturnValue 166 - FunctionEnd -102(ConstantsHS(struct-VSOutput-vf4-vf3-vf21[4];):89(ConstantsHSOutput) Function None 99 - 101(patch): 84(ptr) FunctionParameter - 105: Label - 369(output): 368(ptr) Variable Function - 378(param): 20(ptr) Variable Function - 381(param): 46(ptr) Variable Function - 403(param): 20(ptr) Variable Function - 406(param): 20(ptr) Variable Function - 411(param): 20(ptr) Variable Function - 414(param): 20(ptr) Variable Function - 419(param): 20(ptr) Variable Function - 422(param): 20(ptr) Variable Function - 427(param): 20(ptr) Variable Function - 430(param): 20(ptr) Variable Function - 106: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(Acosh) 104 - 107: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103 28 15 15 15 15 - 110: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 108 101(patch) 39 - 367: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 101 104 102(ConstantsHS(struct-VSOutput-vf4-vf3-vf21[4];) - 373: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 370 369(output) 39 - Store 369(output) 376 - 379: 20(ptr) AccessChain 101(patch) 204 204 - 380: 17(fvec4) Load 379 - Store 378(param) 380 - 382: 46(ptr) AccessChain 101(patch) 204 377 - 383: 44(fvec2) Load 382 - Store 381(param) 383 - 384: 47(bool) FunctionCall 54(frustumCheck(vf4;vf2;) 378(param) 381(param) - 387: 47(bool) LogicalNot 384 - SelectionMerge 389 None - BranchConditional 387 388 396 + 314(pos): 21(ptr) Variable Function + 359(i): 358(ptr) Variable Function + 61: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 59 + 62: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 60 60 16 16 + 65: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 63 54(Pos) 41 + 68: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 66 55(inUV) 41 + 310: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 101(DebugFunctionDefinition) 59 56(frustumCheck(vf4;vf2;) + 311: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 59 + 312: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 313 313 16 16 + 317: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 315 314(pos) 41 + 318: 18(fvec4) Load 54(Pos) + Store 314(pos) 318 + 319: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 320 320 16 16 + 330: 321 Load 327(textureHeight) + 339: 331 Load 336(samplerHeight) + 344: 340 SampledImage 330 339 + 345: 46(fvec2) Load 55(inUV) + 346: 18(fvec4) ImageSampleExplicitLod 344 345 Lod 227 + 347: 8(float) CompositeExtract 346 0 + 349: 297(ptr) AccessChain 207 213 348 + 350: 8(float) Load 349 + 351: 8(float) FMul 347 350 + 352: 156(ptr) AccessChain 314(pos) 34 + 353: 8(float) Load 352 + 354: 8(float) FSub 353 351 + 355: 156(ptr) AccessChain 314(pos) 34 + Store 355 354 + 356: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 357 357 16 16 + 362: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 360 359(i) 41 + Store 359(i) 213 + Branch 363 + 363: Label + 367: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 59 + 368: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 357 357 16 16 + LoopMerge 365 366 None + Branch 369 + 369: Label + 370: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 59 + 371: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 357 357 16 16 + 372: 210(int) Load 359(i) + 373: 49(bool) SLessThan 372 269 + BranchConditional 373 364 365 + 364: Label + 374: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 59 + 375: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 376 376 16 16 + 377: 18(fvec4) Load 314(pos) + 379: 210(int) Load 359(i) + 381: 380(ptr) AccessChain 207 213 378 379 + 382: 18(fvec4) Load 381 + 383: 8(float) Dot 377 382 + 385: 8(float) FAdd 383 384 + 386: 49(bool) FOrdLessThan 385 227 + SelectionMerge 388 None + BranchConditional 386 387 388 + 387: Label + 390: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 59 + 391: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 392 392 16 16 + ReturnValue 389 388: Label - 390: 147(ptr) AccessChain 369(output) 205 204 - Store 390 217 - 391: 147(ptr) AccessChain 369(output) 205 205 - Store 391 217 - 392: 147(ptr) AccessChain 369(output) 204 204 - Store 392 217 - 393: 147(ptr) AccessChain 369(output) 204 205 - Store 393 217 - 394: 147(ptr) AccessChain 369(output) 204 377 - Store 394 217 - 395: 147(ptr) AccessChain 369(output) 204 347 - Store 395 217 - Branch 389 - 396: Label - 397: 276(ptr) AccessChain 198 204 280 - 398: 7(float) Load 397 - 400: 47(bool) FOrdGreaterThan 398 217 - SelectionMerge 402 None - BranchConditional 400 401 447 - 401: Label - 404: 20(ptr) AccessChain 101(patch) 347 204 - 405: 17(fvec4) Load 404 - Store 403(param) 405 - 407: 20(ptr) AccessChain 101(patch) 204 204 - 408: 17(fvec4) Load 407 - Store 406(param) 408 - 409: 7(float) FunctionCall 25(screenSpaceTessFactor(vf4;vf4;) 403(param) 406(param) - 410: 147(ptr) AccessChain 369(output) 204 204 - Store 410 409 - 412: 20(ptr) AccessChain 101(patch) 204 204 - 413: 17(fvec4) Load 412 - Store 411(param) 413 - 415: 20(ptr) AccessChain 101(patch) 205 204 - 416: 17(fvec4) Load 415 - Store 414(param) 416 - 417: 7(float) FunctionCall 25(screenSpaceTessFactor(vf4;vf4;) 411(param) 414(param) - 418: 147(ptr) AccessChain 369(output) 204 205 - Store 418 417 - 420: 20(ptr) AccessChain 101(patch) 205 204 - 421: 17(fvec4) Load 420 - Store 419(param) 421 - 423: 20(ptr) AccessChain 101(patch) 377 204 - 424: 17(fvec4) Load 423 - Store 422(param) 424 - 425: 7(float) FunctionCall 25(screenSpaceTessFactor(vf4;vf4;) 419(param) 422(param) - 426: 147(ptr) AccessChain 369(output) 204 377 - Store 426 425 - 428: 20(ptr) AccessChain 101(patch) 377 204 - 429: 17(fvec4) Load 428 - Store 427(param) 429 - 431: 20(ptr) AccessChain 101(patch) 347 204 - 432: 17(fvec4) Load 431 - Store 430(param) 432 - 433: 7(float) FunctionCall 25(screenSpaceTessFactor(vf4;vf4;) 427(param) 430(param) - 434: 147(ptr) AccessChain 369(output) 204 347 - Store 434 433 - 435: 147(ptr) AccessChain 369(output) 204 204 - 436: 7(float) Load 435 - 437: 147(ptr) AccessChain 369(output) 204 347 - 438: 7(float) Load 437 - 439: 7(float) ExtInst 2(GLSL.std.450) 46(FMix) 436 438 142 - 440: 147(ptr) AccessChain 369(output) 205 204 - Store 440 439 - 441: 147(ptr) AccessChain 369(output) 204 377 - 442: 7(float) Load 441 - 443: 147(ptr) AccessChain 369(output) 204 205 - 444: 7(float) Load 443 - 445: 7(float) ExtInst 2(GLSL.std.450) 46(FMix) 442 444 142 - 446: 147(ptr) AccessChain 369(output) 205 205 - Store 446 445 - Branch 402 - 447: Label - 448: 147(ptr) AccessChain 369(output) 205 204 - Store 448 284 - 449: 147(ptr) AccessChain 369(output) 205 205 - Store 449 284 - 450: 147(ptr) AccessChain 369(output) 204 204 - Store 450 284 - 451: 147(ptr) AccessChain 369(output) 204 205 - Store 451 284 - 452: 147(ptr) AccessChain 369(output) 204 377 - Store 452 284 - 453: 147(ptr) AccessChain 369(output) 204 347 - Store 453 284 - Branch 402 - 402: Label - Branch 389 - 389: Label - 454:89(ConstantsHSOutput) Load 369(output) - ReturnValue 454 + Branch 366 + 366: Label + 394: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 59 + 395: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 357 357 16 16 + 396: 210(int) Load 359(i) + 397: 210(int) IAdd 396 214 + Store 359(i) 397 + Branch 363 + 365: Label + 398: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 59 + 399: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 400 400 16 16 + ReturnValue 175 FunctionEnd -125(@main(struct-VSOutput-vf4-vf3-vf21[4];u1;):112(HSOutput) Function None 121 - 123(patch): 84(ptr) FunctionParameter -124(InvocationID): 111(ptr) FunctionParameter - 128: Label - 459(output): 458(ptr) Variable Function - 129: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(Acosh) 127 - 130: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103 28 15 15 15 15 - 132: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 131 123(patch) 39 - 135: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 133 124(InvocationID) 39 - 457: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 101 127 125(@main(struct-VSOutput-vf4-vf3-vf21[4];u1;) - 462: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 460 459(output) 39 - Store 459(output) 465 - 466: 10(int) Load 124(InvocationID) - 467: 20(ptr) AccessChain 123(patch) 466 204 - 468: 17(fvec4) Load 467 - 469: 20(ptr) AccessChain 459(output) 204 - Store 469 468 - 470: 10(int) Load 124(InvocationID) - 472: 471(ptr) AccessChain 123(patch) 470 205 - 473: 66(fvec3) Load 472 - 474: 471(ptr) AccessChain 459(output) 205 - Store 474 473 - 475: 10(int) Load 124(InvocationID) - 476: 46(ptr) AccessChain 123(patch) 475 377 - 477: 44(fvec2) Load 476 - 478: 46(ptr) AccessChain 459(output) 377 - Store 478 477 - 479:112(HSOutput) Load 459(output) - ReturnValue 479 + Line 1 112 1 +105(ConstantsHS(struct-VSOutput-vf4-vf3-vf21[4];):92(ConstantsHSOutput) Function None 102 + 104(patch): 87(ptr) FunctionParameter + 106: Label + 408(output): 407(ptr) Variable Function + 418(param): 21(ptr) Variable Function + 421(param): 48(ptr) Variable Function + 459(param): 21(ptr) Variable Function + 462(param): 21(ptr) Variable Function + 469(param): 21(ptr) Variable Function + 472(param): 21(ptr) Variable Function + 479(param): 21(ptr) Variable Function + 482(param): 21(ptr) Variable Function + 489(param): 21(ptr) Variable Function + 492(param): 21(ptr) Variable Function + 110: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 108 + 111: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 109 109 16 16 + 114: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 112 104(patch) 41 + 403: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 101(DebugFunctionDefinition) 108 105(ConstantsHS(struct-VSOutput-vf4-vf3-vf21[4];) + 404: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 108 + 405: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 406 406 16 16 + 411: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 409 408(output) 41 + Store 408(output) 414 + 415: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 416 416 16 16 + 419: 21(ptr) AccessChain 104(patch) 213 213 + 420: 18(fvec4) Load 419 + Store 418(param) 420 + 422: 48(ptr) AccessChain 104(patch) 213 417 + 423: 46(fvec2) Load 422 + Store 421(param) 423 + 424: 49(bool) FunctionCall 56(frustumCheck(vf4;vf2;) 418(param) 421(param) + 425: 49(bool) LogicalNot 424 + SelectionMerge 427 None + BranchConditional 425 426 447 + 426: Label + 428: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 108 + 429: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 430 430 16 16 + 431: 156(ptr) AccessChain 408(output) 214 213 + Store 431 227 + 432: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 433 433 16 16 + 434: 156(ptr) AccessChain 408(output) 214 214 + Store 434 227 + 435: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 436 436 16 16 + 437: 156(ptr) AccessChain 408(output) 213 213 + Store 437 227 + 438: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 439 439 16 16 + 440: 156(ptr) AccessChain 408(output) 213 214 + Store 440 227 + 441: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 442 442 16 16 + 443: 156(ptr) AccessChain 408(output) 213 417 + Store 443 227 + 444: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 445 445 16 16 + 446: 156(ptr) AccessChain 408(output) 213 378 + Store 446 227 + Branch 427 + 447: Label + 448: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 108 + 449: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 450 450 16 16 + 451: 297(ptr) AccessChain 207 213 301 + 452: 8(float) Load 451 + 453: 49(bool) FOrdGreaterThan 452 227 + SelectionMerge 455 None + BranchConditional 453 454 513 + 454: Label + 456: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 108 + 457: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 458 458 16 16 + 460: 21(ptr) AccessChain 104(patch) 378 213 + 461: 18(fvec4) Load 460 + Store 459(param) 461 + 463: 21(ptr) AccessChain 104(patch) 213 213 + 464: 18(fvec4) Load 463 + Store 462(param) 464 + 465: 8(float) FunctionCall 26(screenSpaceTessFactor(vf4;vf4;) 459(param) 462(param) + 466: 156(ptr) AccessChain 408(output) 213 213 + Store 466 465 + 467: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 468 468 16 16 + 470: 21(ptr) AccessChain 104(patch) 213 213 + 471: 18(fvec4) Load 470 + Store 469(param) 471 + 473: 21(ptr) AccessChain 104(patch) 214 213 + 474: 18(fvec4) Load 473 + Store 472(param) 474 + 475: 8(float) FunctionCall 26(screenSpaceTessFactor(vf4;vf4;) 469(param) 472(param) + 476: 156(ptr) AccessChain 408(output) 213 214 + Store 476 475 + 477: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 478 478 16 16 + 480: 21(ptr) AccessChain 104(patch) 214 213 + 481: 18(fvec4) Load 480 + Store 479(param) 481 + 483: 21(ptr) AccessChain 104(patch) 417 213 + 484: 18(fvec4) Load 483 + Store 482(param) 484 + 485: 8(float) FunctionCall 26(screenSpaceTessFactor(vf4;vf4;) 479(param) 482(param) + 486: 156(ptr) AccessChain 408(output) 213 417 + Store 486 485 + 487: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 488 488 16 16 + 490: 21(ptr) AccessChain 104(patch) 417 213 + 491: 18(fvec4) Load 490 + Store 489(param) 491 + 493: 21(ptr) AccessChain 104(patch) 378 213 + 494: 18(fvec4) Load 493 + Store 492(param) 494 + 495: 8(float) FunctionCall 26(screenSpaceTessFactor(vf4;vf4;) 489(param) 492(param) + 496: 156(ptr) AccessChain 408(output) 213 378 + Store 496 495 + 497: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 498 498 16 16 + 499: 156(ptr) AccessChain 408(output) 213 213 + 500: 8(float) Load 499 + 501: 156(ptr) AccessChain 408(output) 213 378 + 502: 8(float) Load 501 + 503: 8(float) ExtInst 3(GLSL.std.450) 46(FMix) 500 502 149 + 504: 156(ptr) AccessChain 408(output) 214 213 + Store 504 503 + 505: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 506 506 16 16 + 507: 156(ptr) AccessChain 408(output) 213 417 + 508: 8(float) Load 507 + 509: 156(ptr) AccessChain 408(output) 213 214 + 510: 8(float) Load 509 + 511: 8(float) ExtInst 3(GLSL.std.450) 46(FMix) 508 510 149 + 512: 156(ptr) AccessChain 408(output) 214 214 + Store 512 511 + Branch 455 + 513: Label + 514: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 108 + 515: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 516 516 16 16 + 517: 156(ptr) AccessChain 408(output) 214 213 + Store 517 305 + 518: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 519 519 16 16 + 520: 156(ptr) AccessChain 408(output) 214 214 + Store 520 305 + 521: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 522 522 16 16 + 523: 156(ptr) AccessChain 408(output) 213 213 + Store 523 305 + 524: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 525 525 16 16 + 526: 156(ptr) AccessChain 408(output) 213 214 + Store 526 305 + 527: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 528 528 16 16 + 529: 156(ptr) AccessChain 408(output) 213 417 + Store 529 305 + 530: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 531 531 16 16 + 532: 156(ptr) AccessChain 408(output) 213 378 + Store 532 305 + Branch 455 + 455: Label + Branch 427 + 427: Label + 533: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 108 + 534: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 535 535 16 16 + 536:92(ConstantsHSOutput) Load 408(output) + ReturnValue 536 + FunctionEnd + Line 1 158 1 +129(@main(struct-VSOutput-vf4-vf3-vf21[4];u1;):116(HSOutput) Function None 125 + 127(patch): 87(ptr) FunctionParameter +128(InvocationID): 115(ptr) FunctionParameter + 130: Label + 544(output): 543(ptr) Variable Function + 134: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 132 + 135: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 133 133 16 16 + 137: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 136 127(patch) 41 + 140: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 138 128(InvocationID) 41 + 539: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 101(DebugFunctionDefinition) 132 129(@main(struct-VSOutput-vf4-vf3-vf21[4];u1;) + 540: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 132 + 541: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 542 542 16 16 + 546: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 545 544(output) 41 + Store 544(output) 549 + 550: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 551 551 16 16 + 552: 11(int) Load 128(InvocationID) + 553: 21(ptr) AccessChain 127(patch) 552 213 + 554: 18(fvec4) Load 553 + 555: 21(ptr) AccessChain 544(output) 213 + Store 555 554 + 556: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 557 557 16 16 + 558: 11(int) Load 128(InvocationID) + 560: 559(ptr) AccessChain 127(patch) 558 214 + 561: 69(fvec3) Load 560 + 562: 559(ptr) AccessChain 544(output) 214 + Store 562 561 + 563: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 564 564 16 16 + 565: 11(int) Load 128(InvocationID) + 566: 48(ptr) AccessChain 127(patch) 565 417 + 567: 46(fvec2) Load 566 + 568: 48(ptr) AccessChain 544(output) 417 + Store 568 567 + 569: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 570 570 16 16 + 571:116(HSOutput) Load 544(output) + ReturnValue 571 FunctionEnd diff --git a/Test/baseResults/spv.debuginfo.hlsl.tese.out b/Test/baseResults/spv.debuginfo.hlsl.tese.out index 939f64ad..cbe38a34 100755 --- a/Test/baseResults/spv.debuginfo.hlsl.tese.out +++ b/Test/baseResults/spv.debuginfo.hlsl.tese.out @@ -1,589 +1,629 @@ spv.debuginfo.hlsl.tese -Validation failed // Module Version 10000 // Generated by (magic number): 8000b -// Id's are bound by 434 +// Id's are bound by 464 Capability Tessellation Extension "SPV_KHR_non_semantic_info" - 1: ExtInstImport "NonSemantic.Shader.DebugInfo.100" - 2: ExtInstImport "GLSL.std.450" + 2: ExtInstImport "NonSemantic.Shader.DebugInfo.100" + 3: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint TessellationEvaluation 5 "main" 325 340 349 358 365 371 411 415 419 422 425 428 431 - ExecutionMode 5 Quads + EntryPoint TessellationEvaluation 6 "main" 355 370 379 388 395 401 441 445 449 452 455 458 461 + ExecutionMode 6 Quads + 1: String "" 9: String "float" 12: String "uint" - 25: String "TessLevelOuter" - 27: String "" - 31: String "TessLevelInner" - 34: String "ConstantsHSOutput" - 48: String "Pos" - 51: String "Normal" - 55: String "UV" - 59: String "HSOutput" - 67: String "WorldPos" - 77: String "DSOutput" - 84: String "@main" - 90: String "input" - 94: String "TessCoord" - 97: String "patch" - 103: String "output" - 113: String "uv1" - 117: String "int" - 131: String "uv2" - 151: String "n1" - 162: String "n2" - 181: String "pos1" - 192: String "pos2" - 203: String "pos" - 214: String "type.2d.image" - 216: String "@type.2d.image" - 221: String "displacementMapTexture" - 226: String "type.sampler" - 227: String "@type.sampler" - 231: String "displacementMapSampler" - 235: String "type.sampled.image" - 236: String "@type.sampled.image" - 250: String "modelview" - 255: String "lightPos" - 259: String "frustumPlanes" - 262: String "tessellatedEdgeSize" - 266: String "viewportDim" - 270: String "UBO" - 273: String "ubo" - Name 5 "main" - Name 23 "ConstantsHSOutput" - MemberName 23(ConstantsHSOutput) 0 "TessLevelOuter" - MemberName 23(ConstantsHSOutput) 1 "TessLevelInner" - Name 46 "HSOutput" - MemberName 46(HSOutput) 0 "Pos" - MemberName 46(HSOutput) 1 "Normal" - MemberName 46(HSOutput) 2 "UV" - Name 62 "DSOutput" - MemberName 62(DSOutput) 0 "Pos" - MemberName 62(DSOutput) 1 "Normal" - MemberName 62(DSOutput) 2 "UV" - MemberName 62(DSOutput) 3 "ViewVec" - MemberName 62(DSOutput) 4 "LightVec" - MemberName 62(DSOutput) 5 "EyePos" - MemberName 62(DSOutput) 6 "WorldPos" - Name 83 "@main(struct-ConstantsHSOutput-f1[4]-f1[2]1;vf2;struct-HSOutput-vf4-vf3-vf21[4];" - Name 80 "input" - Name 81 "TessCoord" - Name 82 "patch" - Name 101 "output" - Name 111 "uv1" - Name 129 "uv2" - Name 149 "n1" - Name 160 "n2" - Name 179 "pos1" - Name 190 "pos2" - Name 201 "pos" - Name 219 "displacementMapTexture" - Name 229 "displacementMapSampler" - Name 248 "UBO" - MemberName 248(UBO) 0 "projection" - MemberName 248(UBO) 1 "modelview" - MemberName 248(UBO) 2 "lightPos" - MemberName 248(UBO) 3 "frustumPlanes" - MemberName 248(UBO) 4 "displacementFactor" - MemberName 248(UBO) 5 "tessellationFactor" - MemberName 248(UBO) 6 "viewportDim" - MemberName 248(UBO) 7 "tessellatedEdgeSize" - Name 271 "ubo" - MemberName 271(ubo) 0 "ubo" - Name 276 "" - Name 323 "input" - Name 325 "input.TessLevelOuter" - Name 340 "input.TessLevelInner" - Name 347 "TessCoord" - Name 349 "TessCoord" - Name 355 "patch" - Name 358 "patch.Pos" - Name 365 "patch.Normal" - Name 371 "patch.UV" - Name 403 "flattenTemp" - Name 405 "param" - Name 407 "param" - Name 411 "@entryPointOutput.Pos" - Name 415 "@entryPointOutput.Normal" - Name 419 "@entryPointOutput.UV" - Name 422 "@entryPointOutput.ViewVec" - Name 425 "@entryPointOutput.LightVec" - Name 428 "@entryPointOutput.EyePos" - Name 431 "@entryPointOutput.WorldPos" - Decorate 219(displacementMapTexture) DescriptorSet 0 - Decorate 219(displacementMapTexture) Binding 1 - Decorate 229(displacementMapSampler) DescriptorSet 0 - Decorate 229(displacementMapSampler) Binding 1 - Decorate 246 ArrayStride 16 - MemberDecorate 248(UBO) 0 RowMajor - MemberDecorate 248(UBO) 0 Offset 0 - MemberDecorate 248(UBO) 0 MatrixStride 16 - MemberDecorate 248(UBO) 1 RowMajor - MemberDecorate 248(UBO) 1 Offset 64 - MemberDecorate 248(UBO) 1 MatrixStride 16 - MemberDecorate 248(UBO) 2 Offset 128 - MemberDecorate 248(UBO) 3 Offset 144 - MemberDecorate 248(UBO) 4 Offset 240 - MemberDecorate 248(UBO) 5 Offset 244 - MemberDecorate 248(UBO) 6 Offset 248 - MemberDecorate 248(UBO) 7 Offset 256 - MemberDecorate 271(ubo) 0 Offset 0 - Decorate 271(ubo) Block - Decorate 276 DescriptorSet 0 - Decorate 276 Binding 0 - Decorate 325(input.TessLevelOuter) Patch - Decorate 325(input.TessLevelOuter) BuiltIn TessLevelOuter - Decorate 340(input.TessLevelInner) Patch - Decorate 340(input.TessLevelInner) BuiltIn TessLevelInner - Decorate 349(TessCoord) Patch - Decorate 349(TessCoord) BuiltIn TessCoord - Decorate 358(patch.Pos) BuiltIn Position - Decorate 365(patch.Normal) Location 0 - Decorate 371(patch.UV) Location 1 - Decorate 411(@entryPointOutput.Pos) BuiltIn Position - Decorate 415(@entryPointOutput.Normal) Location 0 - Decorate 419(@entryPointOutput.UV) Location 1 - Decorate 422(@entryPointOutput.ViewVec) Location 2 - Decorate 425(@entryPointOutput.LightVec) Location 3 - Decorate 428(@entryPointOutput.EyePos) Location 4 - Decorate 431(@entryPointOutput.WorldPos) Location 5 - 3: TypeVoid - 4: TypeFunction 3 - 7: TypeFloat 32 - 10: TypeInt 32 0 - 13: 10(int) Constant 32 - 14: 10(int) Constant 6 - 15: 10(int) Constant 0 - 11: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 12 13 14 15 - 16: 10(int) Constant 3 - 8: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 9 13 16 15 - 17: 10(int) Constant 4 - 18: TypeArray 7(float) 17 - 19: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 5(SAbs) 8 17 - 20: 10(int) Constant 2 - 21: TypeArray 7(float) 20 - 22: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 5(SAbs) 8 20 -23(ConstantsHSOutput): TypeStruct 18 21 - 26: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 35(Modf) 0 27 - 28: 10(int) Constant 51 - 29: 10(int) Constant 25 - 24: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 25 19 26 28 29 15 15 16 - 32: 10(int) Constant 52 - 30: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 31 22 26 32 29 15 15 16 - 35: 10(int) Constant 1 - 37: 10(int) Constant 5 - 36: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 1(Round) 35 17 26 37 - 33: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(Fract) 34 35 26 15 15 36 34 15 16 24 30 - 38: TypePointer Function 23(ConstantsHSOutput) - 39: TypeVector 7(float) 2 - 40: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 6(FSign) 8 20 - 41: TypePointer Function 39(fvec2) - 42: TypeVector 7(float) 4 - 43: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 6(FSign) 8 17 - 44: TypeVector 7(float) 3 - 45: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 6(FSign) 8 16 - 46(HSOutput): TypeStruct 42(fvec4) 44(fvec3) 39(fvec2) - 49: 10(int) Constant 44 - 47: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 48 43 26 49 13 15 15 16 - 52: 10(int) Constant 45 - 53: 10(int) Constant 35 - 50: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 51 45 26 52 53 15 15 16 - 56: 10(int) Constant 46 - 57: 10(int) Constant 31 - 54: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 55 40 26 56 57 15 15 16 - 58: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(Fract) 59 35 26 15 15 36 59 15 16 47 50 54 - 60: TypeArray 46(HSOutput) 17 - 61: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 5(SAbs) 58 17 - 62(DSOutput): TypeStruct 42(fvec4) 44(fvec3) 39(fvec2) 44(fvec3) 44(fvec3) 44(fvec3) 44(fvec3) - 64: 10(int) Constant 57 - 65: 10(int) Constant 13 - 63: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 48 43 26 64 65 15 15 16 - 68: 10(int) Constant 63 - 69: 10(int) Constant 37 - 66: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 67 45 26 68 69 15 15 16 - 71: 10(int) Constant 59 - 70: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 55 40 26 71 57 15 15 16 - 72: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 67 45 26 68 69 15 15 16 - 73: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 67 45 26 68 69 15 15 16 - 74: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 67 45 26 68 69 15 15 16 - 75: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 67 45 26 68 69 15 15 16 - 76: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(Fract) 77 35 26 15 15 36 77 15 16 63 66 70 72 73 74 75 - 78: TypeFunction 62(DSOutput) 38(ptr) 41(ptr) 60 - 79: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 8(Floor) 16 76 33 40 58 - 85: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 20(Cosh) 84 79 26 15 15 36 84 16 15 - 89: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 90 33 26 15 15 85 17 35 - 92: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 31(Sqrt) - 93: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 94 40 26 15 15 85 17 20 - 96: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 97 58 26 15 15 85 17 16 - 100: TypePointer Function 62(DSOutput) - 104: 10(int) Constant 70 - 102: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 103 76 26 104 15 85 17 - 106: 7(float) Constant 0 - 107: 42(fvec4) ConstantComposite 106 106 106 106 - 108: 44(fvec3) ConstantComposite 106 106 106 - 109: 39(fvec2) ConstantComposite 106 106 - 110:62(DSOutput) ConstantComposite 107 108 109 108 108 108 108 - 114: 10(int) Constant 71 - 112: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 113 40 26 114 15 85 17 - 116: TypeInt 32 1 - 118: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 117 13 17 15 - 119: 116(int) Constant 0 - 120: 116(int) Constant 2 - 122: 116(int) Constant 1 - 124: TypePointer Function 7(float) - 132: 10(int) Constant 72 - 130: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 131 40 26 132 15 85 17 - 134: 116(int) Constant 3 - 148: TypePointer Function 44(fvec3) - 152: 10(int) Constant 75 - 150: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 151 45 26 152 15 85 17 - 163: 10(int) Constant 76 - 161: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 162 45 26 163 15 85 17 - 178: TypePointer Function 42(fvec4) - 182: 10(int) Constant 80 - 180: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 181 43 26 182 15 85 17 - 193: 10(int) Constant 81 - 191: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 192 43 26 193 15 85 17 - 204: 10(int) Constant 82 - 202: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 203 43 26 204 15 85 17 - 212: TypeImage 7(float) 2D sampled format:Unknown - 215: 10(int) Constant 84 - 217: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 0(Unknown) - 213: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(Fract) 214 15 26 215 15 36 216 217 16 - 218: TypePointer UniformConstant 212 -219(displacementMapTexture): 218(ptr) Variable UniformConstant - 222: 10(int) Constant 8 - 220: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(Atan) 221 213 26 215 15 36 221 219(displacementMapTexture) 222 - 224: TypeSampler - 225: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(Fract) 226 35 26 215 15 36 227 217 16 - 228: TypePointer UniformConstant 224 -229(displacementMapSampler): 228(ptr) Variable UniformConstant - 230: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(Atan) 231 225 26 215 15 36 231 229(displacementMapSampler) 222 - 233: TypeSampledImage 212 - 234: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(Fract) 235 15 26 215 15 36 236 217 16 - 242: TypeMatrix 42(fvec4) 4 - 244: TypeBool - 245: 244(bool) ConstantTrue - 243: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 108 43 17 245 - 246: TypeArray 42(fvec4) 14 - 247: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 5(SAbs) 43 14 - 248(UBO): TypeStruct 242 242 42(fvec4) 246 7(float) 7(float) 39(fvec2) 7(float) - 251: 10(int) Constant 29 - 252: 10(int) Constant 20 - 249: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 250 243 26 251 252 15 15 16 - 253: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 250 243 26 251 252 15 15 16 - 256: 10(int) Constant 30 - 257: 10(int) Constant 17 - 254: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 255 43 26 256 257 15 15 16 - 260: 10(int) Constant 22 - 258: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 259 247 26 57 260 15 15 16 - 263: 10(int) Constant 27 - 261: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 262 8 26 53 263 15 15 16 - 264: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 262 8 26 53 263 15 15 16 - 267: 10(int) Constant 34 - 265: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 266 40 26 267 252 15 15 16 - 268: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 262 8 26 53 263 15 15 16 - 269: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(Fract) 270 35 26 215 15 36 270 15 16 249 253 254 258 261 264 265 268 - 271(ubo): TypeStruct 248(UBO) - 272: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 273 269 26 69 69 15 15 16 - 274: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(Fract) 273 35 26 215 15 36 273 15 16 272 - 275: TypePointer Uniform 271(ubo) - 276: 275(ptr) Variable Uniform - 277: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(Atan) 27 274 26 215 15 36 27 276 222 - 278: 116(int) Constant 4 - 279: TypePointer Uniform 7(float) - 288: TypePointer Uniform 242 - 300: TypePointer Uniform 42(fvec4) - 309: 116(int) Constant 6 - 313: 116(int) Constant 5 - 324: TypePointer Input 18 -325(input.TessLevelOuter): 324(ptr) Variable Input - 326: TypePointer Input 7(float) - 339: TypePointer Input 21 -340(input.TessLevelInner): 339(ptr) Variable Input - 348: TypePointer Input 44(fvec3) - 349(TessCoord): 348(ptr) Variable Input - 354: TypePointer Function 60 - 356: TypeArray 42(fvec4) 17 - 357: TypePointer Input 356 - 358(patch.Pos): 357(ptr) Variable Input - 359: TypePointer Input 42(fvec4) - 363: TypeArray 44(fvec3) 17 - 364: TypePointer Input 363 -365(patch.Normal): 364(ptr) Variable Input - 369: TypeArray 39(fvec2) 17 - 370: TypePointer Input 369 - 371(patch.UV): 370(ptr) Variable Input - 372: TypePointer Input 39(fvec2) - 410: TypePointer Output 42(fvec4) -411(@entryPointOutput.Pos): 410(ptr) Variable Output - 414: TypePointer Output 44(fvec3) -415(@entryPointOutput.Normal): 414(ptr) Variable Output - 418: TypePointer Output 39(fvec2) -419(@entryPointOutput.UV): 418(ptr) Variable Output -422(@entryPointOutput.ViewVec): 414(ptr) Variable Output -425(@entryPointOutput.LightVec): 414(ptr) Variable Output -428(@entryPointOutput.EyePos): 414(ptr) Variable Output -431(@entryPointOutput.WorldPos): 414(ptr) Variable Output - 5(main): 3 Function None 4 - 6: Label - 323(input): 38(ptr) Variable Function - 347(TessCoord): 41(ptr) Variable Function - 355(patch): 354(ptr) Variable Function -403(flattenTemp): 100(ptr) Variable Function - 405(param): 38(ptr) Variable Function - 407(param): 41(ptr) Variable Function - 327: 326(ptr) AccessChain 325(input.TessLevelOuter) 119 - 328: 7(float) Load 327 - 329: 124(ptr) AccessChain 323(input) 119 119 - Store 329 328 - 330: 326(ptr) AccessChain 325(input.TessLevelOuter) 122 - 331: 7(float) Load 330 - 332: 124(ptr) AccessChain 323(input) 119 122 - Store 332 331 - 333: 326(ptr) AccessChain 325(input.TessLevelOuter) 120 - 334: 7(float) Load 333 - 335: 124(ptr) AccessChain 323(input) 119 120 - Store 335 334 - 336: 326(ptr) AccessChain 325(input.TessLevelOuter) 134 - 337: 7(float) Load 336 - 338: 124(ptr) AccessChain 323(input) 119 134 - Store 338 337 - 341: 326(ptr) AccessChain 340(input.TessLevelInner) 119 - 342: 7(float) Load 341 - 343: 124(ptr) AccessChain 323(input) 122 119 - Store 343 342 - 344: 326(ptr) AccessChain 340(input.TessLevelInner) 122 - 345: 7(float) Load 344 - 346: 124(ptr) AccessChain 323(input) 122 122 - Store 346 345 - 350: 44(fvec3) Load 349(TessCoord) - 351: 7(float) CompositeExtract 350 0 - 352: 7(float) CompositeExtract 350 1 - 353: 39(fvec2) CompositeConstruct 351 352 - Store 347(TessCoord) 353 - 360: 359(ptr) AccessChain 358(patch.Pos) 119 - 361: 42(fvec4) Load 360 - 362: 178(ptr) AccessChain 355(patch) 119 119 + 26: String "TessLevelOuter" + 28: String "// OpModuleProcessed auto-map-locations +// OpModuleProcessed auto-map-bindings +// OpModuleProcessed entry-point main +// OpModuleProcessed client vulkan100 +// OpModuleProcessed target-env vulkan1.0 +// OpModuleProcessed keep-uncalled +// OpModuleProcessed hlsl-offsets +#line 1 +" + 32: String "TessLevelInner" + 35: String "ConstantsHSOutput" + 49: String "Pos" + 52: String "Normal" + 56: String "UV" + 60: String "HSOutput" + 68: String "WorldPos" + 78: String "DSOutput" + 86: String "@main" + 92: String "input" + 96: String "TessCoord" + 99: String "patch" + 108: String "output" + 119: String "uv1" + 122: String "int" + 138: String "uv2" + 161: String "n1" + 173: String "n2" + 195: String "pos1" + 207: String "pos2" + 219: String "pos" + 231: String "type.2d.image" + 232: String "@type.2d.image" + 237: String "displacementMapTexture" + 242: String "type.sampler" + 243: String "@type.sampler" + 247: String "displacementMapSampler" + 251: String "type.sampled.image" + 252: String "@type.sampled.image" + 261: String "bool" + 268: String "modelview" + 273: String "lightPos" + 277: String "frustumPlanes" + 280: String "tessellatedEdgeSize" + 284: String "viewportDim" + 288: String "UBO" + 291: String "ubo" + Name 6 "main" + Name 24 "ConstantsHSOutput" + MemberName 24(ConstantsHSOutput) 0 "TessLevelOuter" + MemberName 24(ConstantsHSOutput) 1 "TessLevelInner" + Name 47 "HSOutput" + MemberName 47(HSOutput) 0 "Pos" + MemberName 47(HSOutput) 1 "Normal" + MemberName 47(HSOutput) 2 "UV" + Name 63 "DSOutput" + MemberName 63(DSOutput) 0 "Pos" + MemberName 63(DSOutput) 1 "Normal" + MemberName 63(DSOutput) 2 "UV" + MemberName 63(DSOutput) 3 "ViewVec" + MemberName 63(DSOutput) 4 "LightVec" + MemberName 63(DSOutput) 5 "EyePos" + MemberName 63(DSOutput) 6 "WorldPos" + Name 84 "@main(struct-ConstantsHSOutput-f1[4]-f1[2]1;vf2;struct-HSOutput-vf4-vf3-vf21[4];" + Name 81 "input" + Name 82 "TessCoord" + Name 83 "patch" + Name 106 "output" + Name 117 "uv1" + Name 136 "uv2" + Name 159 "n1" + Name 171 "n2" + Name 193 "pos1" + Name 205 "pos2" + Name 217 "pos" + Name 235 "displacementMapTexture" + Name 245 "displacementMapSampler" + Name 266 "UBO" + MemberName 266(UBO) 0 "projection" + MemberName 266(UBO) 1 "modelview" + MemberName 266(UBO) 2 "lightPos" + MemberName 266(UBO) 3 "frustumPlanes" + MemberName 266(UBO) 4 "displacementFactor" + MemberName 266(UBO) 5 "tessellationFactor" + MemberName 266(UBO) 6 "viewportDim" + MemberName 266(UBO) 7 "tessellatedEdgeSize" + Name 289 "ubo" + MemberName 289(ubo) 0 "ubo" + Name 294 "" + Name 353 "input" + Name 355 "input.TessLevelOuter" + Name 370 "input.TessLevelInner" + Name 377 "TessCoord" + Name 379 "TessCoord" + Name 385 "patch" + Name 388 "patch.Pos" + Name 395 "patch.Normal" + Name 401 "patch.UV" + Name 433 "flattenTemp" + Name 435 "param" + Name 437 "param" + Name 441 "@entryPointOutput.Pos" + Name 445 "@entryPointOutput.Normal" + Name 449 "@entryPointOutput.UV" + Name 452 "@entryPointOutput.ViewVec" + Name 455 "@entryPointOutput.LightVec" + Name 458 "@entryPointOutput.EyePos" + Name 461 "@entryPointOutput.WorldPos" + Decorate 235(displacementMapTexture) DescriptorSet 0 + Decorate 235(displacementMapTexture) Binding 1 + Decorate 245(displacementMapSampler) DescriptorSet 0 + Decorate 245(displacementMapSampler) Binding 1 + Decorate 264 ArrayStride 16 + MemberDecorate 266(UBO) 0 RowMajor + MemberDecorate 266(UBO) 0 Offset 0 + MemberDecorate 266(UBO) 0 MatrixStride 16 + MemberDecorate 266(UBO) 1 RowMajor + MemberDecorate 266(UBO) 1 Offset 64 + MemberDecorate 266(UBO) 1 MatrixStride 16 + MemberDecorate 266(UBO) 2 Offset 128 + MemberDecorate 266(UBO) 3 Offset 144 + MemberDecorate 266(UBO) 4 Offset 240 + MemberDecorate 266(UBO) 5 Offset 244 + MemberDecorate 266(UBO) 6 Offset 248 + MemberDecorate 266(UBO) 7 Offset 256 + MemberDecorate 289(ubo) 0 Offset 0 + Decorate 289(ubo) Block + Decorate 294 DescriptorSet 0 + Decorate 294 Binding 0 + Decorate 355(input.TessLevelOuter) Patch + Decorate 355(input.TessLevelOuter) BuiltIn TessLevelOuter + Decorate 370(input.TessLevelInner) Patch + Decorate 370(input.TessLevelInner) BuiltIn TessLevelInner + Decorate 379(TessCoord) Patch + Decorate 379(TessCoord) BuiltIn TessCoord + Decorate 388(patch.Pos) BuiltIn Position + Decorate 395(patch.Normal) Location 0 + Decorate 401(patch.UV) Location 1 + Decorate 441(@entryPointOutput.Pos) BuiltIn Position + Decorate 445(@entryPointOutput.Normal) Location 0 + Decorate 449(@entryPointOutput.UV) Location 1 + Decorate 452(@entryPointOutput.ViewVec) Location 2 + Decorate 455(@entryPointOutput.LightVec) Location 3 + Decorate 458(@entryPointOutput.EyePos) Location 4 + Decorate 461(@entryPointOutput.WorldPos) Location 5 + 4: TypeVoid + 5: TypeFunction 4 + 8: TypeFloat 32 + 11: TypeInt 32 0 + 14: 11(int) Constant 32 + 15: 11(int) Constant 6 + 16: 11(int) Constant 0 + 13: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 12 14 15 16 + 17: 11(int) Constant 3 + 10: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 9 14 17 16 + 18: 11(int) Constant 4 + 19: TypeArray 8(float) 18 + 20: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 10 18 + 21: 11(int) Constant 2 + 22: TypeArray 8(float) 21 + 23: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 10 21 +24(ConstantsHSOutput): TypeStruct 19 22 + 27: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 35(DebugSource) 1 28 + 29: 11(int) Constant 51 + 30: 11(int) Constant 25 + 25: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 26 20 27 29 30 16 16 17 + 33: 11(int) Constant 52 + 31: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 32 23 27 33 30 16 16 17 + 36: 11(int) Constant 1 + 38: 11(int) Constant 5 + 37: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 1(DebugCompilationUnit) 36 18 27 38 + 34: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 35 36 27 16 16 37 35 16 17 25 31 + 39: TypePointer Function 24(ConstantsHSOutput) + 40: TypeVector 8(float) 2 + 41: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 10 21 + 42: TypePointer Function 40(fvec2) + 43: TypeVector 8(float) 4 + 44: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 10 18 + 45: TypeVector 8(float) 3 + 46: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 10 17 + 47(HSOutput): TypeStruct 43(fvec4) 45(fvec3) 40(fvec2) + 50: 11(int) Constant 44 + 48: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 49 44 27 50 14 16 16 17 + 53: 11(int) Constant 45 + 54: 11(int) Constant 35 + 51: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 52 46 27 53 54 16 16 17 + 57: 11(int) Constant 46 + 58: 11(int) Constant 31 + 55: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 56 41 27 57 58 16 16 17 + 59: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 60 36 27 16 16 37 60 16 17 48 51 55 + 61: TypeArray 47(HSOutput) 18 + 62: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 59 18 + 63(DSOutput): TypeStruct 43(fvec4) 45(fvec3) 40(fvec2) 45(fvec3) 45(fvec3) 45(fvec3) 45(fvec3) + 65: 11(int) Constant 57 + 66: 11(int) Constant 13 + 64: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 49 44 27 65 66 16 16 17 + 69: 11(int) Constant 63 + 70: 11(int) Constant 37 + 67: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 68 46 27 69 70 16 16 17 + 72: 11(int) Constant 59 + 71: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 56 41 27 72 58 16 16 17 + 73: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 68 46 27 69 70 16 16 17 + 74: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 68 46 27 69 70 16 16 17 + 75: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 68 46 27 69 70 16 16 17 + 76: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 68 46 27 69 70 16 16 17 + 77: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 78 36 27 16 16 37 78 16 17 64 67 71 73 74 75 76 + 79: TypeFunction 63(DSOutput) 39(ptr) 42(ptr) 61 + 80: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 8(DebugTypeFunction) 17 77 34 41 59 + 88: 11(int) Constant 68 + 87: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 20(DebugFunction) 86 80 27 88 16 37 86 17 88 + 91: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 92 34 27 88 16 87 18 36 + 94: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 31(DebugExpression) + 95: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 96 41 27 88 16 87 18 21 + 98: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 99 59 27 88 16 87 18 17 + 104: 11(int) Constant 70 + 105: TypePointer Function 63(DSOutput) + 107: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 108 77 27 104 16 87 18 + 110: 8(float) Constant 0 + 111: 43(fvec4) ConstantComposite 110 110 110 110 + 112: 45(fvec3) ConstantComposite 110 110 110 + 113: 40(fvec2) ConstantComposite 110 110 + 114:63(DSOutput) ConstantComposite 111 112 113 112 112 112 112 + 116: 11(int) Constant 71 + 118: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 119 41 27 116 16 87 18 + 121: TypeInt 32 1 + 123: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 122 14 18 16 + 124: 121(int) Constant 0 + 125: 121(int) Constant 2 + 127: 121(int) Constant 1 + 129: TypePointer Function 8(float) + 135: 11(int) Constant 72 + 137: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 138 41 27 135 16 87 18 + 140: 121(int) Constant 3 + 148: 11(int) Constant 73 + 157: 11(int) Constant 75 + 158: TypePointer Function 45(fvec3) + 160: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 161 46 27 157 16 87 18 + 170: 11(int) Constant 76 + 172: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 173 46 27 170 16 87 18 + 182: 11(int) Constant 77 + 191: 11(int) Constant 80 + 192: TypePointer Function 43(fvec4) + 194: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 195 44 27 191 16 87 18 + 204: 11(int) Constant 81 + 206: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 207 44 27 204 16 87 18 + 216: 11(int) Constant 82 + 218: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 219 44 27 216 16 87 18 + 228: 11(int) Constant 84 + 229: TypeImage 8(float) 2D sampled format:Unknown + 233: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 0(DebugInfoNone) + 230: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 231 16 27 228 16 37 232 233 17 + 234: TypePointer UniformConstant 229 +235(displacementMapTexture): 234(ptr) Variable UniformConstant + 238: 11(int) Constant 8 + 236: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 237 230 27 228 16 37 237 235(displacementMapTexture) 238 + 240: TypeSampler + 241: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 242 36 27 228 16 37 243 233 17 + 244: TypePointer UniformConstant 240 +245(displacementMapSampler): 244(ptr) Variable UniformConstant + 246: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 247 241 27 228 16 37 247 245(displacementMapSampler) 238 + 249: TypeSampledImage 229 + 250: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 251 16 27 228 16 37 252 233 17 + 258: TypeMatrix 43(fvec4) 4 + 260: TypeBool + 262: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 261 14 21 16 + 263: 260(bool) ConstantTrue + 259: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 108(DebugTypeMatrix) 44 18 263 + 264: TypeArray 43(fvec4) 15 + 265: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 44 15 + 266(UBO): TypeStruct 258 258 43(fvec4) 264 8(float) 8(float) 40(fvec2) 8(float) + 269: 11(int) Constant 29 + 270: 11(int) Constant 20 + 267: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 268 259 27 269 270 16 16 17 + 271: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 268 259 27 269 270 16 16 17 + 274: 11(int) Constant 30 + 275: 11(int) Constant 17 + 272: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 273 44 27 274 275 16 16 17 + 278: 11(int) Constant 22 + 276: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 277 265 27 58 278 16 16 17 + 281: 11(int) Constant 27 + 279: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 280 10 27 54 281 16 16 17 + 282: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 280 10 27 54 281 16 16 17 + 285: 11(int) Constant 34 + 283: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 284 41 27 285 270 16 16 17 + 286: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 280 10 27 54 281 16 16 17 + 287: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 288 36 27 228 16 37 288 16 17 267 271 272 276 279 282 283 286 + 289(ubo): TypeStruct 266(UBO) + 290: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 291 287 27 70 70 16 16 17 + 292: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 291 36 27 228 16 37 291 16 17 290 + 293: TypePointer Uniform 289(ubo) + 294: 293(ptr) Variable Uniform + 295: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 1 292 27 228 16 37 1 294 238 + 296: 121(int) Constant 4 + 297: TypePointer Uniform 8(float) + 306: 11(int) Constant 86 + 308: TypePointer Uniform 258 + 317: 11(int) Constant 89 + 323: 11(int) Constant 90 + 324: TypePointer Uniform 43(fvec4) + 334: 11(int) Constant 91 + 335: 121(int) Constant 6 + 340: 11(int) Constant 92 + 341: 121(int) Constant 5 + 349: 11(int) Constant 93 + 354: TypePointer Input 19 +355(input.TessLevelOuter): 354(ptr) Variable Input + 356: TypePointer Input 8(float) + 369: TypePointer Input 22 +370(input.TessLevelInner): 369(ptr) Variable Input + 378: TypePointer Input 45(fvec3) + 379(TessCoord): 378(ptr) Variable Input + 384: TypePointer Function 61 + 386: TypeArray 43(fvec4) 18 + 387: TypePointer Input 386 + 388(patch.Pos): 387(ptr) Variable Input + 389: TypePointer Input 43(fvec4) + 393: TypeArray 45(fvec3) 18 + 394: TypePointer Input 393 +395(patch.Normal): 394(ptr) Variable Input + 399: TypeArray 40(fvec2) 18 + 400: TypePointer Input 399 + 401(patch.UV): 400(ptr) Variable Input + 402: TypePointer Input 40(fvec2) + 440: TypePointer Output 43(fvec4) +441(@entryPointOutput.Pos): 440(ptr) Variable Output + 444: TypePointer Output 45(fvec3) +445(@entryPointOutput.Normal): 444(ptr) Variable Output + 448: TypePointer Output 40(fvec2) +449(@entryPointOutput.UV): 448(ptr) Variable Output +452(@entryPointOutput.ViewVec): 444(ptr) Variable Output +455(@entryPointOutput.LightVec): 444(ptr) Variable Output +458(@entryPointOutput.EyePos): 444(ptr) Variable Output +461(@entryPointOutput.WorldPos): 444(ptr) Variable Output + Line 1 68 1 + 6(main): 4 Function None 5 + 7: Label + 353(input): 39(ptr) Variable Function + 377(TessCoord): 42(ptr) Variable Function + 385(patch): 384(ptr) Variable Function +433(flattenTemp): 105(ptr) Variable Function + 435(param): 39(ptr) Variable Function + 437(param): 42(ptr) Variable Function + Line 1 68 0 + 357: 356(ptr) AccessChain 355(input.TessLevelOuter) 124 + 358: 8(float) Load 357 + 359: 129(ptr) AccessChain 353(input) 124 124 + Store 359 358 + 360: 356(ptr) AccessChain 355(input.TessLevelOuter) 127 + 361: 8(float) Load 360 + 362: 129(ptr) AccessChain 353(input) 124 127 Store 362 361 - 366: 348(ptr) AccessChain 365(patch.Normal) 119 - 367: 44(fvec3) Load 366 - 368: 148(ptr) AccessChain 355(patch) 119 122 + 363: 356(ptr) AccessChain 355(input.TessLevelOuter) 125 + 364: 8(float) Load 363 + 365: 129(ptr) AccessChain 353(input) 124 125 + Store 365 364 + 366: 356(ptr) AccessChain 355(input.TessLevelOuter) 140 + 367: 8(float) Load 366 + 368: 129(ptr) AccessChain 353(input) 124 140 Store 368 367 - 373: 372(ptr) AccessChain 371(patch.UV) 119 - 374: 39(fvec2) Load 373 - 375: 41(ptr) AccessChain 355(patch) 119 120 - Store 375 374 - 376: 359(ptr) AccessChain 358(patch.Pos) 122 - 377: 42(fvec4) Load 376 - 378: 178(ptr) AccessChain 355(patch) 122 119 - Store 378 377 - 379: 348(ptr) AccessChain 365(patch.Normal) 122 - 380: 44(fvec3) Load 379 - 381: 148(ptr) AccessChain 355(patch) 122 122 - Store 381 380 - 382: 372(ptr) AccessChain 371(patch.UV) 122 - 383: 39(fvec2) Load 382 - 384: 41(ptr) AccessChain 355(patch) 122 120 - Store 384 383 - 385: 359(ptr) AccessChain 358(patch.Pos) 120 - 386: 42(fvec4) Load 385 - 387: 178(ptr) AccessChain 355(patch) 120 119 - Store 387 386 - 388: 348(ptr) AccessChain 365(patch.Normal) 120 - 389: 44(fvec3) Load 388 - 390: 148(ptr) AccessChain 355(patch) 120 122 - Store 390 389 - 391: 372(ptr) AccessChain 371(patch.UV) 120 - 392: 39(fvec2) Load 391 - 393: 41(ptr) AccessChain 355(patch) 120 120 - Store 393 392 - 394: 359(ptr) AccessChain 358(patch.Pos) 134 - 395: 42(fvec4) Load 394 - 396: 178(ptr) AccessChain 355(patch) 134 119 - Store 396 395 - 397: 348(ptr) AccessChain 365(patch.Normal) 134 - 398: 44(fvec3) Load 397 - 399: 148(ptr) AccessChain 355(patch) 134 122 - Store 399 398 - 400: 372(ptr) AccessChain 371(patch.UV) 134 - 401: 39(fvec2) Load 400 - 402: 41(ptr) AccessChain 355(patch) 134 120 - Store 402 401 - 404: 60 Load 355(patch) - 406:23(ConstantsHSOutput) Load 323(input) - Store 405(param) 406 - 408: 39(fvec2) Load 347(TessCoord) - Store 407(param) 408 - 409:62(DSOutput) FunctionCall 83(@main(struct-ConstantsHSOutput-f1[4]-f1[2]1;vf2;struct-HSOutput-vf4-vf3-vf21[4];) 405(param) 407(param) 404 - Store 403(flattenTemp) 409 - 412: 178(ptr) AccessChain 403(flattenTemp) 119 - 413: 42(fvec4) Load 412 - Store 411(@entryPointOutput.Pos) 413 - 416: 148(ptr) AccessChain 403(flattenTemp) 122 - 417: 44(fvec3) Load 416 - Store 415(@entryPointOutput.Normal) 417 - 420: 41(ptr) AccessChain 403(flattenTemp) 120 - 421: 39(fvec2) Load 420 - Store 419(@entryPointOutput.UV) 421 - 423: 148(ptr) AccessChain 403(flattenTemp) 134 - 424: 44(fvec3) Load 423 - Store 422(@entryPointOutput.ViewVec) 424 - 426: 148(ptr) AccessChain 403(flattenTemp) 278 - 427: 44(fvec3) Load 426 - Store 425(@entryPointOutput.LightVec) 427 - 429: 148(ptr) AccessChain 403(flattenTemp) 313 - 430: 44(fvec3) Load 429 - Store 428(@entryPointOutput.EyePos) 430 - 432: 148(ptr) AccessChain 403(flattenTemp) 309 - 433: 44(fvec3) Load 432 - Store 431(@entryPointOutput.WorldPos) 433 + 371: 356(ptr) AccessChain 370(input.TessLevelInner) 124 + 372: 8(float) Load 371 + 373: 129(ptr) AccessChain 353(input) 127 124 + Store 373 372 + 374: 356(ptr) AccessChain 370(input.TessLevelInner) 127 + 375: 8(float) Load 374 + 376: 129(ptr) AccessChain 353(input) 127 127 + Store 376 375 + 380: 45(fvec3) Load 379(TessCoord) + 381: 8(float) CompositeExtract 380 0 + 382: 8(float) CompositeExtract 380 1 + 383: 40(fvec2) CompositeConstruct 381 382 + Store 377(TessCoord) 383 + 390: 389(ptr) AccessChain 388(patch.Pos) 124 + 391: 43(fvec4) Load 390 + 392: 192(ptr) AccessChain 385(patch) 124 124 + Store 392 391 + 396: 378(ptr) AccessChain 395(patch.Normal) 124 + 397: 45(fvec3) Load 396 + 398: 158(ptr) AccessChain 385(patch) 124 127 + Store 398 397 + 403: 402(ptr) AccessChain 401(patch.UV) 124 + 404: 40(fvec2) Load 403 + 405: 42(ptr) AccessChain 385(patch) 124 125 + Store 405 404 + 406: 389(ptr) AccessChain 388(patch.Pos) 127 + 407: 43(fvec4) Load 406 + 408: 192(ptr) AccessChain 385(patch) 127 124 + Store 408 407 + 409: 378(ptr) AccessChain 395(patch.Normal) 127 + 410: 45(fvec3) Load 409 + 411: 158(ptr) AccessChain 385(patch) 127 127 + Store 411 410 + 412: 402(ptr) AccessChain 401(patch.UV) 127 + 413: 40(fvec2) Load 412 + 414: 42(ptr) AccessChain 385(patch) 127 125 + Store 414 413 + 415: 389(ptr) AccessChain 388(patch.Pos) 125 + 416: 43(fvec4) Load 415 + 417: 192(ptr) AccessChain 385(patch) 125 124 + Store 417 416 + 418: 378(ptr) AccessChain 395(patch.Normal) 125 + 419: 45(fvec3) Load 418 + 420: 158(ptr) AccessChain 385(patch) 125 127 + Store 420 419 + 421: 402(ptr) AccessChain 401(patch.UV) 125 + 422: 40(fvec2) Load 421 + 423: 42(ptr) AccessChain 385(patch) 125 125 + Store 423 422 + 424: 389(ptr) AccessChain 388(patch.Pos) 140 + 425: 43(fvec4) Load 424 + 426: 192(ptr) AccessChain 385(patch) 140 124 + Store 426 425 + 427: 378(ptr) AccessChain 395(patch.Normal) 140 + 428: 45(fvec3) Load 427 + 429: 158(ptr) AccessChain 385(patch) 140 127 + Store 429 428 + 430: 402(ptr) AccessChain 401(patch.UV) 140 + 431: 40(fvec2) Load 430 + 432: 42(ptr) AccessChain 385(patch) 140 125 + Store 432 431 + 434: 61 Load 385(patch) + 436:24(ConstantsHSOutput) Load 353(input) + Store 435(param) 436 + 438: 40(fvec2) Load 377(TessCoord) + Store 437(param) 438 + 439:63(DSOutput) FunctionCall 84(@main(struct-ConstantsHSOutput-f1[4]-f1[2]1;vf2;struct-HSOutput-vf4-vf3-vf21[4];) 435(param) 437(param) 434 + Store 433(flattenTemp) 439 + 442: 192(ptr) AccessChain 433(flattenTemp) 124 + 443: 43(fvec4) Load 442 + Store 441(@entryPointOutput.Pos) 443 + 446: 158(ptr) AccessChain 433(flattenTemp) 127 + 447: 45(fvec3) Load 446 + Store 445(@entryPointOutput.Normal) 447 + 450: 42(ptr) AccessChain 433(flattenTemp) 125 + 451: 40(fvec2) Load 450 + Store 449(@entryPointOutput.UV) 451 + 453: 158(ptr) AccessChain 433(flattenTemp) 140 + 454: 45(fvec3) Load 453 + Store 452(@entryPointOutput.ViewVec) 454 + 456: 158(ptr) AccessChain 433(flattenTemp) 296 + 457: 45(fvec3) Load 456 + Store 455(@entryPointOutput.LightVec) 457 + 459: 158(ptr) AccessChain 433(flattenTemp) 341 + 460: 45(fvec3) Load 459 + Store 458(@entryPointOutput.EyePos) 460 + 462: 158(ptr) AccessChain 433(flattenTemp) 335 + 463: 45(fvec3) Load 462 + Store 461(@entryPointOutput.WorldPos) 463 Return FunctionEnd -83(@main(struct-ConstantsHSOutput-f1[4]-f1[2]1;vf2;struct-HSOutput-vf4-vf3-vf21[4];):62(DSOutput) Function None 78 - 80(input): 38(ptr) FunctionParameter - 81(TessCoord): 41(ptr) FunctionParameter - 82(patch): 60 FunctionParameter - 86: Label - 101(output): 100(ptr) Variable Function - 111(uv1): 41(ptr) Variable Function - 129(uv2): 41(ptr) Variable Function - 149(n1): 148(ptr) Variable Function - 160(n2): 148(ptr) Variable Function - 179(pos1): 178(ptr) Variable Function - 190(pos2): 178(ptr) Variable Function - 201(pos): 178(ptr) Variable Function - 87: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(Acosh) 85 - 88: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103 26 15 15 15 15 - 91: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 89 80(input) 92 - 95: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 93 81(TessCoord) 92 - 98: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 96 82(patch) 92 - 99: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 101 85 83(@main(struct-ConstantsHSOutput-f1[4]-f1[2]1;vf2;struct-HSOutput-vf4-vf3-vf21[4];) - 105: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 102 101(output) 92 - Store 101(output) 110 - 115: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 112 111(uv1) 92 - 121: 39(fvec2) CompositeExtract 82(patch) 0 2 - 123: 39(fvec2) CompositeExtract 82(patch) 1 2 - 125: 124(ptr) AccessChain 81(TessCoord) 15 - 126: 7(float) Load 125 - 127: 39(fvec2) CompositeConstruct 126 126 - 128: 39(fvec2) ExtInst 2(GLSL.std.450) 46(FMix) 121 123 127 - Store 111(uv1) 128 - 133: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 130 129(uv2) 92 - 135: 39(fvec2) CompositeExtract 82(patch) 3 2 - 136: 39(fvec2) CompositeExtract 82(patch) 2 2 - 137: 124(ptr) AccessChain 81(TessCoord) 15 - 138: 7(float) Load 137 - 139: 39(fvec2) CompositeConstruct 138 138 - 140: 39(fvec2) ExtInst 2(GLSL.std.450) 46(FMix) 135 136 139 - Store 129(uv2) 140 - 141: 39(fvec2) Load 111(uv1) - 142: 39(fvec2) Load 129(uv2) - 143: 124(ptr) AccessChain 81(TessCoord) 35 - 144: 7(float) Load 143 - 145: 39(fvec2) CompositeConstruct 144 144 - 146: 39(fvec2) ExtInst 2(GLSL.std.450) 46(FMix) 141 142 145 - 147: 41(ptr) AccessChain 101(output) 120 - Store 147 146 - 153: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 150 149(n1) 92 - 154: 44(fvec3) CompositeExtract 82(patch) 0 1 - 155: 44(fvec3) CompositeExtract 82(patch) 1 1 - 156: 124(ptr) AccessChain 81(TessCoord) 15 - 157: 7(float) Load 156 - 158: 44(fvec3) CompositeConstruct 157 157 157 - 159: 44(fvec3) ExtInst 2(GLSL.std.450) 46(FMix) 154 155 158 - Store 149(n1) 159 - 164: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 161 160(n2) 92 - 165: 44(fvec3) CompositeExtract 82(patch) 3 1 - 166: 44(fvec3) CompositeExtract 82(patch) 2 1 - 167: 124(ptr) AccessChain 81(TessCoord) 15 - 168: 7(float) Load 167 - 169: 44(fvec3) CompositeConstruct 168 168 168 - 170: 44(fvec3) ExtInst 2(GLSL.std.450) 46(FMix) 165 166 169 - Store 160(n2) 170 - 171: 44(fvec3) Load 149(n1) - 172: 44(fvec3) Load 160(n2) - 173: 124(ptr) AccessChain 81(TessCoord) 35 - 174: 7(float) Load 173 - 175: 44(fvec3) CompositeConstruct 174 174 174 - 176: 44(fvec3) ExtInst 2(GLSL.std.450) 46(FMix) 171 172 175 - 177: 148(ptr) AccessChain 101(output) 122 - Store 177 176 - 183: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 180 179(pos1) 92 - 184: 42(fvec4) CompositeExtract 82(patch) 0 0 - 185: 42(fvec4) CompositeExtract 82(patch) 1 0 - 186: 124(ptr) AccessChain 81(TessCoord) 15 - 187: 7(float) Load 186 - 188: 42(fvec4) CompositeConstruct 187 187 187 187 - 189: 42(fvec4) ExtInst 2(GLSL.std.450) 46(FMix) 184 185 188 - Store 179(pos1) 189 - 194: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 191 190(pos2) 92 - 195: 42(fvec4) CompositeExtract 82(patch) 3 0 - 196: 42(fvec4) CompositeExtract 82(patch) 2 0 - 197: 124(ptr) AccessChain 81(TessCoord) 15 - 198: 7(float) Load 197 - 199: 42(fvec4) CompositeConstruct 198 198 198 198 - 200: 42(fvec4) ExtInst 2(GLSL.std.450) 46(FMix) 195 196 199 - Store 190(pos2) 200 - 205: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 202 201(pos) 92 - 206: 42(fvec4) Load 179(pos1) - 207: 42(fvec4) Load 190(pos2) - 208: 124(ptr) AccessChain 81(TessCoord) 35 - 209: 7(float) Load 208 - 210: 42(fvec4) CompositeConstruct 209 209 209 209 - 211: 42(fvec4) ExtInst 2(GLSL.std.450) 46(FMix) 206 207 210 - Store 201(pos) 211 - 223: 212 Load 219(displacementMapTexture) - 232: 224 Load 229(displacementMapSampler) - 237: 233 SampledImage 223 232 - 238: 41(ptr) AccessChain 101(output) 120 - 239: 39(fvec2) Load 238 - 240: 42(fvec4) ImageSampleExplicitLod 237 239 Lod 106 - 241: 7(float) CompositeExtract 240 0 - 280: 279(ptr) AccessChain 276 119 278 - 281: 7(float) Load 280 - 282: 7(float) FMul 241 281 - 283: 124(ptr) AccessChain 201(pos) 35 - 284: 7(float) Load 283 - 285: 7(float) FSub 284 282 - 286: 124(ptr) AccessChain 201(pos) 35 - Store 286 285 - 287: 42(fvec4) Load 201(pos) - 289: 288(ptr) AccessChain 276 119 122 - 290: 242 Load 289 - 291: 42(fvec4) VectorTimesMatrix 287 290 - 292: 288(ptr) AccessChain 276 119 119 - 293: 242 Load 292 - 294: 42(fvec4) VectorTimesMatrix 291 293 - 295: 178(ptr) AccessChain 101(output) 119 - Store 295 294 - 296: 42(fvec4) Load 201(pos) - 297: 44(fvec3) VectorShuffle 296 296 0 1 2 - 298: 44(fvec3) FNegate 297 - 299: 148(ptr) AccessChain 101(output) 134 - Store 299 298 - 301: 300(ptr) AccessChain 276 119 120 - 302: 42(fvec4) Load 301 - 303: 44(fvec3) VectorShuffle 302 302 0 1 2 - 304: 148(ptr) AccessChain 101(output) 134 - 305: 44(fvec3) Load 304 - 306: 44(fvec3) FAdd 303 305 - 307: 44(fvec3) ExtInst 2(GLSL.std.450) 69(Normalize) 306 - 308: 148(ptr) AccessChain 101(output) 278 - Store 308 307 - 310: 42(fvec4) Load 201(pos) - 311: 44(fvec3) VectorShuffle 310 310 0 1 2 - 312: 148(ptr) AccessChain 101(output) 309 - Store 312 311 - 314: 42(fvec4) Load 201(pos) - 315: 288(ptr) AccessChain 276 119 122 - 316: 242 Load 315 - 317: 42(fvec4) VectorTimesMatrix 314 316 - 318: 44(fvec3) VectorShuffle 317 317 0 1 2 - 319: 148(ptr) AccessChain 101(output) 313 - Store 319 318 - 320:62(DSOutput) Load 101(output) - ReturnValue 320 + Line 1 68 1 +84(@main(struct-ConstantsHSOutput-f1[4]-f1[2]1;vf2;struct-HSOutput-vf4-vf3-vf21[4];):63(DSOutput) Function None 79 + 81(input): 39(ptr) FunctionParameter + 82(TessCoord): 42(ptr) FunctionParameter + 83(patch): 61 FunctionParameter + 85: Label + 106(output): 105(ptr) Variable Function + 117(uv1): 42(ptr) Variable Function + 136(uv2): 42(ptr) Variable Function + 159(n1): 158(ptr) Variable Function + 171(n2): 158(ptr) Variable Function + 193(pos1): 192(ptr) Variable Function + 205(pos2): 192(ptr) Variable Function + 217(pos): 192(ptr) Variable Function + 89: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 87 + 90: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 27 88 88 16 16 + 93: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 91 81(input) 94 + 97: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 95 82(TessCoord) 94 + 100: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 98 83(patch) 94 + 101: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 101(DebugFunctionDefinition) 87 84(@main(struct-ConstantsHSOutput-f1[4]-f1[2]1;vf2;struct-HSOutput-vf4-vf3-vf21[4];) + 102: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 87 + 103: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 27 104 104 16 16 + 109: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 107 106(output) 94 + Store 106(output) 114 + 115: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 27 116 116 16 16 + 120: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 118 117(uv1) 94 + 126: 40(fvec2) CompositeExtract 83(patch) 0 2 + 128: 40(fvec2) CompositeExtract 83(patch) 1 2 + 130: 129(ptr) AccessChain 82(TessCoord) 16 + 131: 8(float) Load 130 + 132: 40(fvec2) CompositeConstruct 131 131 + 133: 40(fvec2) ExtInst 3(GLSL.std.450) 46(FMix) 126 128 132 + Store 117(uv1) 133 + 134: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 27 135 135 16 16 + 139: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 137 136(uv2) 94 + 141: 40(fvec2) CompositeExtract 83(patch) 3 2 + 142: 40(fvec2) CompositeExtract 83(patch) 2 2 + 143: 129(ptr) AccessChain 82(TessCoord) 16 + 144: 8(float) Load 143 + 145: 40(fvec2) CompositeConstruct 144 144 + 146: 40(fvec2) ExtInst 3(GLSL.std.450) 46(FMix) 141 142 145 + Store 136(uv2) 146 + 147: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 27 148 148 16 16 + 149: 40(fvec2) Load 117(uv1) + 150: 40(fvec2) Load 136(uv2) + 151: 129(ptr) AccessChain 82(TessCoord) 36 + 152: 8(float) Load 151 + 153: 40(fvec2) CompositeConstruct 152 152 + 154: 40(fvec2) ExtInst 3(GLSL.std.450) 46(FMix) 149 150 153 + 155: 42(ptr) AccessChain 106(output) 125 + Store 155 154 + 156: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 27 157 157 16 16 + 162: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 160 159(n1) 94 + 163: 45(fvec3) CompositeExtract 83(patch) 0 1 + 164: 45(fvec3) CompositeExtract 83(patch) 1 1 + 165: 129(ptr) AccessChain 82(TessCoord) 16 + 166: 8(float) Load 165 + 167: 45(fvec3) CompositeConstruct 166 166 166 + 168: 45(fvec3) ExtInst 3(GLSL.std.450) 46(FMix) 163 164 167 + Store 159(n1) 168 + 169: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 27 170 170 16 16 + 174: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 172 171(n2) 94 + 175: 45(fvec3) CompositeExtract 83(patch) 3 1 + 176: 45(fvec3) CompositeExtract 83(patch) 2 1 + 177: 129(ptr) AccessChain 82(TessCoord) 16 + 178: 8(float) Load 177 + 179: 45(fvec3) CompositeConstruct 178 178 178 + 180: 45(fvec3) ExtInst 3(GLSL.std.450) 46(FMix) 175 176 179 + Store 171(n2) 180 + 181: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 27 182 182 16 16 + 183: 45(fvec3) Load 159(n1) + 184: 45(fvec3) Load 171(n2) + 185: 129(ptr) AccessChain 82(TessCoord) 36 + 186: 8(float) Load 185 + 187: 45(fvec3) CompositeConstruct 186 186 186 + 188: 45(fvec3) ExtInst 3(GLSL.std.450) 46(FMix) 183 184 187 + 189: 158(ptr) AccessChain 106(output) 127 + Store 189 188 + 190: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 27 191 191 16 16 + 196: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 194 193(pos1) 94 + 197: 43(fvec4) CompositeExtract 83(patch) 0 0 + 198: 43(fvec4) CompositeExtract 83(patch) 1 0 + 199: 129(ptr) AccessChain 82(TessCoord) 16 + 200: 8(float) Load 199 + 201: 43(fvec4) CompositeConstruct 200 200 200 200 + 202: 43(fvec4) ExtInst 3(GLSL.std.450) 46(FMix) 197 198 201 + Store 193(pos1) 202 + 203: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 27 204 204 16 16 + 208: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 206 205(pos2) 94 + 209: 43(fvec4) CompositeExtract 83(patch) 3 0 + 210: 43(fvec4) CompositeExtract 83(patch) 2 0 + 211: 129(ptr) AccessChain 82(TessCoord) 16 + 212: 8(float) Load 211 + 213: 43(fvec4) CompositeConstruct 212 212 212 212 + 214: 43(fvec4) ExtInst 3(GLSL.std.450) 46(FMix) 209 210 213 + Store 205(pos2) 214 + 215: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 27 216 216 16 16 + 220: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 218 217(pos) 94 + 221: 43(fvec4) Load 193(pos1) + 222: 43(fvec4) Load 205(pos2) + 223: 129(ptr) AccessChain 82(TessCoord) 36 + 224: 8(float) Load 223 + 225: 43(fvec4) CompositeConstruct 224 224 224 224 + 226: 43(fvec4) ExtInst 3(GLSL.std.450) 46(FMix) 221 222 225 + Store 217(pos) 226 + 227: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 27 228 228 16 16 + 239: 229 Load 235(displacementMapTexture) + 248: 240 Load 245(displacementMapSampler) + 253: 249 SampledImage 239 248 + 254: 42(ptr) AccessChain 106(output) 125 + 255: 40(fvec2) Load 254 + 256: 43(fvec4) ImageSampleExplicitLod 253 255 Lod 110 + 257: 8(float) CompositeExtract 256 0 + 298: 297(ptr) AccessChain 294 124 296 + 299: 8(float) Load 298 + 300: 8(float) FMul 257 299 + 301: 129(ptr) AccessChain 217(pos) 36 + 302: 8(float) Load 301 + 303: 8(float) FSub 302 300 + 304: 129(ptr) AccessChain 217(pos) 36 + Store 304 303 + 305: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 27 306 306 16 16 + 307: 43(fvec4) Load 217(pos) + 309: 308(ptr) AccessChain 294 124 127 + 310: 258 Load 309 + 311: 43(fvec4) VectorTimesMatrix 307 310 + 312: 308(ptr) AccessChain 294 124 124 + 313: 258 Load 312 + 314: 43(fvec4) VectorTimesMatrix 311 313 + 315: 192(ptr) AccessChain 106(output) 124 + Store 315 314 + 316: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 27 317 317 16 16 + 318: 43(fvec4) Load 217(pos) + 319: 45(fvec3) VectorShuffle 318 318 0 1 2 + 320: 45(fvec3) FNegate 319 + 321: 158(ptr) AccessChain 106(output) 140 + Store 321 320 + 322: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 27 323 323 16 16 + 325: 324(ptr) AccessChain 294 124 125 + 326: 43(fvec4) Load 325 + 327: 45(fvec3) VectorShuffle 326 326 0 1 2 + 328: 158(ptr) AccessChain 106(output) 140 + 329: 45(fvec3) Load 328 + 330: 45(fvec3) FAdd 327 329 + 331: 45(fvec3) ExtInst 3(GLSL.std.450) 69(Normalize) 330 + 332: 158(ptr) AccessChain 106(output) 296 + Store 332 331 + 333: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 27 334 334 16 16 + 336: 43(fvec4) Load 217(pos) + 337: 45(fvec3) VectorShuffle 336 336 0 1 2 + 338: 158(ptr) AccessChain 106(output) 335 + Store 338 337 + 339: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 27 340 340 16 16 + 342: 43(fvec4) Load 217(pos) + 343: 308(ptr) AccessChain 294 124 127 + 344: 258 Load 343 + 345: 43(fvec4) VectorTimesMatrix 342 344 + 346: 45(fvec3) VectorShuffle 345 345 0 1 2 + 347: 158(ptr) AccessChain 106(output) 341 + Store 347 346 + 348: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 27 349 349 16 16 + 350:63(DSOutput) Load 106(output) + ReturnValue 350 FunctionEnd diff --git a/Test/baseResults/spv.debuginfo.hlsl.vert.out b/Test/baseResults/spv.debuginfo.hlsl.vert.out index a7af4326..8ccd18e6 100755 --- a/Test/baseResults/spv.debuginfo.hlsl.vert.out +++ b/Test/baseResults/spv.debuginfo.hlsl.vert.out @@ -1,574 +1,645 @@ spv.debuginfo.hlsl.vert -Validation failed // Module Version 10000 // Generated by (magic number): 8000b -// Id's are bound by 437 +// Id's are bound by 498 Capability Shader Extension "SPV_KHR_non_semantic_info" - 1: ExtInstImport "NonSemantic.Shader.DebugInfo.100" - 2: ExtInstImport "GLSL.std.450" + 2: ExtInstImport "NonSemantic.Shader.DebugInfo.100" + 3: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Vertex 5 "main" 386 389 393 396 399 402 406 410 418 422 425 428 431 434 + EntryPoint Vertex 6 "main" 447 450 454 457 460 463 467 471 479 483 486 489 492 495 + 1: String "" 9: String "float" 12: String "uint" - 23: String "int" - 28: String "instanceRot" - 30: String "" - 35: String "UV" - 42: String "instanceScale" - 46: String "instanceTexIndex" - 50: String "VSInput" - 59: String "Pos" - 63: String "LightVec" - 70: String "VSOutput" - 75: String "@main" - 81: String "input" - 88: String "output" - 116: String "s" - 128: String "modelview" - 133: String "lightPos" - 137: String "globSpeed" - 141: String "UBO" - 144: String "ubo" - 159: String "c" - 173: String "mx" - 200: String "my" - 226: String "mz" - 240: String "rotMat" - 264: String "gRotMat" - 284: String "locPos" - 297: String "pos" - 355: String "lPos" - Name 5 "main" - Name 26 "VSInput" - MemberName 26(VSInput) 0 "Pos" - MemberName 26(VSInput) 1 "Normal" - MemberName 26(VSInput) 2 "UV" - MemberName 26(VSInput) 3 "Color" - MemberName 26(VSInput) 4 "instancePos" - MemberName 26(VSInput) 5 "instanceRot" - MemberName 26(VSInput) 6 "instanceScale" - MemberName 26(VSInput) 7 "instanceTexIndex" - Name 57 "VSOutput" - MemberName 57(VSOutput) 0 "Pos" - MemberName 57(VSOutput) 1 "Normal" - MemberName 57(VSOutput) 2 "Color" - MemberName 57(VSOutput) 3 "UV" - MemberName 57(VSOutput) 4 "ViewVec" - MemberName 57(VSOutput) 5 "LightVec" - Name 74 "@main(struct-VSInput-vf3-vf3-vf2-vf3-vf3-vf3-f1-i11;" - Name 73 "input" - Name 86 "output" - Name 114 "s" - Name 126 "UBO" - MemberName 126(UBO) 0 "projection" - MemberName 126(UBO) 1 "modelview" - MemberName 126(UBO) 2 "lightPos" - MemberName 126(UBO) 3 "locSpeed" - MemberName 126(UBO) 4 "globSpeed" - Name 142 "ubo" - MemberName 142(ubo) 0 "ubo" - Name 148 "" - Name 157 "c" - Name 171 "mx" - Name 198 "my" - Name 224 "mz" - Name 238 "rotMat" - Name 262 "gRotMat" - Name 282 "locPos" - Name 295 "pos" - Name 353 "lPos" - Name 384 "input" - Name 386 "input.Pos" - Name 389 "input.Normal" - Name 393 "input.UV" - Name 396 "input.Color" - Name 399 "input.instancePos" - Name 402 "input.instanceRot" - Name 406 "input.instanceScale" - Name 410 "input.instanceTexIndex" - Name 413 "flattenTemp" - Name 414 "param" - Name 418 "@entryPointOutput.Pos" - Name 422 "@entryPointOutput.Normal" - Name 425 "@entryPointOutput.Color" - Name 428 "@entryPointOutput.UV" - Name 431 "@entryPointOutput.ViewVec" - Name 434 "@entryPointOutput.LightVec" - MemberDecorate 126(UBO) 0 RowMajor - MemberDecorate 126(UBO) 0 Offset 0 - MemberDecorate 126(UBO) 0 MatrixStride 16 - MemberDecorate 126(UBO) 1 RowMajor - MemberDecorate 126(UBO) 1 Offset 64 - MemberDecorate 126(UBO) 1 MatrixStride 16 - MemberDecorate 126(UBO) 2 Offset 128 - MemberDecorate 126(UBO) 3 Offset 144 - MemberDecorate 126(UBO) 4 Offset 148 - MemberDecorate 142(ubo) 0 Offset 0 - Decorate 142(ubo) Block - Decorate 148 DescriptorSet 0 - Decorate 148 Binding 0 - Decorate 386(input.Pos) Location 0 - Decorate 389(input.Normal) Location 1 - Decorate 393(input.UV) Location 2 - Decorate 396(input.Color) Location 3 - Decorate 399(input.instancePos) Location 4 - Decorate 402(input.instanceRot) Location 5 - Decorate 406(input.instanceScale) Location 6 - Decorate 410(input.instanceTexIndex) Location 7 - Decorate 418(@entryPointOutput.Pos) BuiltIn Position - Decorate 422(@entryPointOutput.Normal) Location 0 - Decorate 425(@entryPointOutput.Color) Location 1 - Decorate 428(@entryPointOutput.UV) Location 2 - Decorate 431(@entryPointOutput.ViewVec) Location 3 - Decorate 434(@entryPointOutput.LightVec) Location 4 - 3: TypeVoid - 4: TypeFunction 3 - 7: TypeFloat 32 - 10: TypeInt 32 0 - 13: 10(int) Constant 32 - 14: 10(int) Constant 6 - 15: 10(int) Constant 0 - 11: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 12 13 14 15 - 16: 10(int) Constant 3 - 8: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 9 13 16 15 - 17: TypeVector 7(float) 3 - 18: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 6(FSign) 8 16 - 19: TypeVector 7(float) 2 - 20: 10(int) Constant 2 - 21: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 6(FSign) 8 20 - 22: TypeInt 32 1 - 25: 10(int) Constant 4 - 24: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 23 13 25 15 - 26(VSInput): TypeStruct 17(fvec3) 17(fvec3) 19(fvec2) 17(fvec3) 17(fvec3) 17(fvec3) 7(float) 22(int) - 29: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 35(Modf) 0 30 - 31: 10(int) Constant 35 - 32: 10(int) Constant 40 - 27: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 28 18 29 31 32 15 15 16 - 33: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 28 18 29 31 32 15 15 16 - 36: 10(int) Constant 30 - 37: 10(int) Constant 31 - 34: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 35 21 29 36 37 15 15 16 - 38: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 28 18 29 31 32 15 15 16 - 39: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 28 18 29 31 32 15 15 16 - 40: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 28 18 29 31 32 15 15 16 - 43: 10(int) Constant 36 - 44: 10(int) Constant 41 - 41: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 42 8 29 43 44 15 15 16 - 47: 10(int) Constant 37 - 48: 10(int) Constant 42 - 45: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 46 24 29 47 48 15 15 16 - 51: 10(int) Constant 1 - 53: 10(int) Constant 5 - 52: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 1(Round) 51 25 29 53 - 49: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(Fract) 50 51 29 15 15 52 50 15 16 27 33 34 38 39 40 41 45 - 54: TypePointer Function 26(VSInput) - 55: TypeVector 7(float) 4 - 56: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 6(FSign) 8 25 - 57(VSOutput): TypeStruct 55(fvec4) 17(fvec3) 17(fvec3) 17(fvec3) 17(fvec3) 17(fvec3) - 60: 10(int) Constant 53 - 61: 10(int) Constant 13 - 58: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 59 56 29 60 61 15 15 16 - 64: 10(int) Constant 58 - 62: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 63 18 29 64 47 15 15 16 - 65: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 63 18 29 64 47 15 15 16 - 66: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 63 18 29 64 47 15 15 16 - 67: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 63 18 29 64 47 15 15 16 - 68: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 63 18 29 64 47 15 15 16 - 69: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(Fract) 70 51 29 15 15 52 70 15 16 58 62 65 66 67 68 - 71: TypeFunction 57(VSOutput) 54(ptr) - 72: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 8(Floor) 16 69 49 - 76: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 20(Cosh) 75 72 29 15 15 52 75 16 15 - 80: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 81 49 29 15 15 76 25 51 - 83: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 31(Sqrt) - 85: TypePointer Function 57(VSOutput) - 89: 10(int) Constant 63 - 87: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 88 69 29 89 15 76 25 - 91: 7(float) Constant 0 - 92: 55(fvec4) ConstantComposite 91 91 91 91 - 93: 17(fvec3) ConstantComposite 91 91 91 - 94:57(VSOutput) ConstantComposite 92 93 93 93 93 93 - 95: 22(int) Constant 2 - 96: 22(int) Constant 3 - 97: TypePointer Function 17(fvec3) - 101: TypePointer Function 19(fvec2) - 104: 22(int) Constant 7 - 105: TypePointer Function 22(int) - 113: TypePointer Function 7(float) - 117: 10(int) Constant 68 - 115: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 116 8 29 117 15 76 25 - 119: 22(int) Constant 5 - 122: TypeMatrix 55(fvec4) 4 - 124: TypeBool - 125: 124(bool) ConstantTrue - 123: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 108 56 25 125 - 126(UBO): TypeStruct 122 122 55(fvec4) 7(float) 7(float) - 129: 10(int) Constant 43 - 130: 10(int) Constant 20 - 127: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 128 123 29 129 130 15 15 16 - 131: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 128 123 29 129 130 15 15 16 - 134: 10(int) Constant 44 - 135: 10(int) Constant 17 - 132: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 133 56 29 134 135 15 15 16 - 138: 10(int) Constant 46 - 136: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 137 8 29 138 135 15 15 16 - 139: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 137 8 29 138 135 15 15 16 - 140: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(Fract) 141 51 29 117 15 52 141 15 16 127 131 132 136 139 - 142(ubo): TypeStruct 126(UBO) - 145: 10(int) Constant 49 - 143: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 144 140 29 145 47 15 15 16 - 146: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(Fract) 144 51 29 117 15 52 144 15 16 143 - 147: TypePointer Uniform 142(ubo) - 148: 147(ptr) Variable Uniform - 150: 10(int) Constant 8 - 149: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(Atan) 30 146 29 117 15 52 30 148 150 - 151: 22(int) Constant 0 - 152: TypePointer Uniform 7(float) - 160: 10(int) Constant 69 - 158: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 159 8 29 160 15 76 25 - 168: TypeMatrix 17(fvec3) 3 - 169: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 108 18 16 125 - 170: TypePointer Function 168 - 174: 10(int) Constant 71 - 172: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 173 169 29 174 15 76 25 - 181: 7(float) Constant 1065353216 - 201: 10(int) Constant 79 - 199: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 200 169 29 201 15 76 25 - 227: 10(int) Constant 87 - 225: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 226 169 29 227 15 76 25 - 241: 10(int) Constant 91 - 239: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 240 169 29 241 15 76 25 - 250: 22(int) Constant 4 - 261: TypePointer Function 122 - 265: 10(int) Constant 96 - 263: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 264 123 29 265 15 76 25 - 271: TypePointer Function 55(fvec4) - 273: 22(int) Constant 1 - 274: 55(fvec4) ConstantComposite 91 181 91 91 - 280: 55(fvec4) ConstantComposite 91 91 91 181 - 285: 10(int) Constant 101 - 283: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 284 56 29 285 15 76 25 - 298: 10(int) Constant 102 - 296: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 297 56 29 298 15 76 25 - 302: 22(int) Constant 6 - 316: TypePointer Uniform 122 - 356: 10(int) Constant 108 - 354: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 355 18 29 356 15 76 25 - 358: TypePointer Uniform 55(fvec4) - 385: TypePointer Input 17(fvec3) - 386(input.Pos): 385(ptr) Variable Input -389(input.Normal): 385(ptr) Variable Input - 392: TypePointer Input 19(fvec2) - 393(input.UV): 392(ptr) Variable Input -396(input.Color): 385(ptr) Variable Input -399(input.instancePos): 385(ptr) Variable Input -402(input.instanceRot): 385(ptr) Variable Input - 405: TypePointer Input 7(float) -406(input.instanceScale): 405(ptr) Variable Input - 409: TypePointer Input 22(int) -410(input.instanceTexIndex): 409(ptr) Variable Input - 417: TypePointer Output 55(fvec4) -418(@entryPointOutput.Pos): 417(ptr) Variable Output - 421: TypePointer Output 17(fvec3) -422(@entryPointOutput.Normal): 421(ptr) Variable Output -425(@entryPointOutput.Color): 421(ptr) Variable Output -428(@entryPointOutput.UV): 421(ptr) Variable Output -431(@entryPointOutput.ViewVec): 421(ptr) Variable Output -434(@entryPointOutput.LightVec): 421(ptr) Variable Output - 5(main): 3 Function None 4 - 6: Label - 384(input): 54(ptr) Variable Function -413(flattenTemp): 85(ptr) Variable Function - 414(param): 54(ptr) Variable Function - 387: 17(fvec3) Load 386(input.Pos) - 388: 97(ptr) AccessChain 384(input) 151 - Store 388 387 - 390: 17(fvec3) Load 389(input.Normal) - 391: 97(ptr) AccessChain 384(input) 273 - Store 391 390 - 394: 19(fvec2) Load 393(input.UV) - 395: 101(ptr) AccessChain 384(input) 95 - Store 395 394 - 397: 17(fvec3) Load 396(input.Color) - 398: 97(ptr) AccessChain 384(input) 96 - Store 398 397 - 400: 17(fvec3) Load 399(input.instancePos) - 401: 97(ptr) AccessChain 384(input) 250 - Store 401 400 - 403: 17(fvec3) Load 402(input.instanceRot) - 404: 97(ptr) AccessChain 384(input) 119 - Store 404 403 - 407: 7(float) Load 406(input.instanceScale) - 408: 113(ptr) AccessChain 384(input) 302 - Store 408 407 - 411: 22(int) Load 410(input.instanceTexIndex) - 412: 105(ptr) AccessChain 384(input) 104 - Store 412 411 - 415: 26(VSInput) Load 384(input) - Store 414(param) 415 - 416:57(VSOutput) FunctionCall 74(@main(struct-VSInput-vf3-vf3-vf2-vf3-vf3-vf3-f1-i11;) 414(param) - Store 413(flattenTemp) 416 - 419: 271(ptr) AccessChain 413(flattenTemp) 151 - 420: 55(fvec4) Load 419 - Store 418(@entryPointOutput.Pos) 420 - 423: 97(ptr) AccessChain 413(flattenTemp) 273 - 424: 17(fvec3) Load 423 - Store 422(@entryPointOutput.Normal) 424 - 426: 97(ptr) AccessChain 413(flattenTemp) 95 - 427: 17(fvec3) Load 426 - Store 425(@entryPointOutput.Color) 427 - 429: 97(ptr) AccessChain 413(flattenTemp) 96 - 430: 17(fvec3) Load 429 - Store 428(@entryPointOutput.UV) 430 - 432: 97(ptr) AccessChain 413(flattenTemp) 250 - 433: 17(fvec3) Load 432 - Store 431(@entryPointOutput.ViewVec) 433 - 435: 97(ptr) AccessChain 413(flattenTemp) 119 - 436: 17(fvec3) Load 435 - Store 434(@entryPointOutput.LightVec) 436 + 24: String "int" + 29: String "instanceRot" + 31: String "// OpModuleProcessed auto-map-locations +// OpModuleProcessed auto-map-bindings +// OpModuleProcessed entry-point main +// OpModuleProcessed client vulkan100 +// OpModuleProcessed target-env vulkan1.0 +// OpModuleProcessed keep-uncalled +// OpModuleProcessed hlsl-offsets +#line 1 +" + 36: String "UV" + 43: String "instanceScale" + 47: String "instanceTexIndex" + 51: String "VSInput" + 60: String "Pos" + 64: String "LightVec" + 71: String "VSOutput" + 77: String "@main" + 83: String "input" + 93: String "output" + 126: String "s" + 134: String "bool" + 139: String "modelview" + 144: String "lightPos" + 148: String "globSpeed" + 152: String "UBO" + 155: String "ubo" + 172: String "c" + 187: String "mx" + 222: String "my" + 256: String "mz" + 276: String "rotMat" + 305: String "gRotMat" + 332: String "locPos" + 346: String "pos" + 411: String "lPos" + Name 6 "main" + Name 27 "VSInput" + MemberName 27(VSInput) 0 "Pos" + MemberName 27(VSInput) 1 "Normal" + MemberName 27(VSInput) 2 "UV" + MemberName 27(VSInput) 3 "Color" + MemberName 27(VSInput) 4 "instancePos" + MemberName 27(VSInput) 5 "instanceRot" + MemberName 27(VSInput) 6 "instanceScale" + MemberName 27(VSInput) 7 "instanceTexIndex" + Name 58 "VSOutput" + MemberName 58(VSOutput) 0 "Pos" + MemberName 58(VSOutput) 1 "Normal" + MemberName 58(VSOutput) 2 "Color" + MemberName 58(VSOutput) 3 "UV" + MemberName 58(VSOutput) 4 "ViewVec" + MemberName 58(VSOutput) 5 "LightVec" + Name 75 "@main(struct-VSInput-vf3-vf3-vf2-vf3-vf3-vf3-f1-i11;" + Name 74 "input" + Name 91 "output" + Name 124 "s" + Name 137 "UBO" + MemberName 137(UBO) 0 "projection" + MemberName 137(UBO) 1 "modelview" + MemberName 137(UBO) 2 "lightPos" + MemberName 137(UBO) 3 "locSpeed" + MemberName 137(UBO) 4 "globSpeed" + Name 153 "ubo" + MemberName 153(ubo) 0 "ubo" + Name 159 "" + Name 170 "c" + Name 185 "mx" + Name 220 "my" + Name 254 "mz" + Name 274 "rotMat" + Name 303 "gRotMat" + Name 330 "locPos" + Name 344 "pos" + Name 409 "lPos" + Name 445 "input" + Name 447 "input.Pos" + Name 450 "input.Normal" + Name 454 "input.UV" + Name 457 "input.Color" + Name 460 "input.instancePos" + Name 463 "input.instanceRot" + Name 467 "input.instanceScale" + Name 471 "input.instanceTexIndex" + Name 474 "flattenTemp" + Name 475 "param" + Name 479 "@entryPointOutput.Pos" + Name 483 "@entryPointOutput.Normal" + Name 486 "@entryPointOutput.Color" + Name 489 "@entryPointOutput.UV" + Name 492 "@entryPointOutput.ViewVec" + Name 495 "@entryPointOutput.LightVec" + MemberDecorate 137(UBO) 0 RowMajor + MemberDecorate 137(UBO) 0 Offset 0 + MemberDecorate 137(UBO) 0 MatrixStride 16 + MemberDecorate 137(UBO) 1 RowMajor + MemberDecorate 137(UBO) 1 Offset 64 + MemberDecorate 137(UBO) 1 MatrixStride 16 + MemberDecorate 137(UBO) 2 Offset 128 + MemberDecorate 137(UBO) 3 Offset 144 + MemberDecorate 137(UBO) 4 Offset 148 + MemberDecorate 153(ubo) 0 Offset 0 + Decorate 153(ubo) Block + Decorate 159 DescriptorSet 0 + Decorate 159 Binding 0 + Decorate 447(input.Pos) Location 0 + Decorate 450(input.Normal) Location 1 + Decorate 454(input.UV) Location 2 + Decorate 457(input.Color) Location 3 + Decorate 460(input.instancePos) Location 4 + Decorate 463(input.instanceRot) Location 5 + Decorate 467(input.instanceScale) Location 6 + Decorate 471(input.instanceTexIndex) Location 7 + Decorate 479(@entryPointOutput.Pos) BuiltIn Position + Decorate 483(@entryPointOutput.Normal) Location 0 + Decorate 486(@entryPointOutput.Color) Location 1 + Decorate 489(@entryPointOutput.UV) Location 2 + Decorate 492(@entryPointOutput.ViewVec) Location 3 + Decorate 495(@entryPointOutput.LightVec) Location 4 + 4: TypeVoid + 5: TypeFunction 4 + 8: TypeFloat 32 + 11: TypeInt 32 0 + 14: 11(int) Constant 32 + 15: 11(int) Constant 6 + 16: 11(int) Constant 0 + 13: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 12 14 15 16 + 17: 11(int) Constant 3 + 10: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 9 14 17 16 + 18: TypeVector 8(float) 3 + 19: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 10 17 + 20: TypeVector 8(float) 2 + 21: 11(int) Constant 2 + 22: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 10 21 + 23: TypeInt 32 1 + 26: 11(int) Constant 4 + 25: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 24 14 26 16 + 27(VSInput): TypeStruct 18(fvec3) 18(fvec3) 20(fvec2) 18(fvec3) 18(fvec3) 18(fvec3) 8(float) 23(int) + 30: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 35(DebugSource) 1 31 + 32: 11(int) Constant 35 + 33: 11(int) Constant 40 + 28: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 29 19 30 32 33 16 16 17 + 34: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 29 19 30 32 33 16 16 17 + 37: 11(int) Constant 30 + 38: 11(int) Constant 31 + 35: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 36 22 30 37 38 16 16 17 + 39: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 29 19 30 32 33 16 16 17 + 40: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 29 19 30 32 33 16 16 17 + 41: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 29 19 30 32 33 16 16 17 + 44: 11(int) Constant 36 + 45: 11(int) Constant 41 + 42: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 43 10 30 44 45 16 16 17 + 48: 11(int) Constant 37 + 49: 11(int) Constant 42 + 46: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 47 25 30 48 49 16 16 17 + 52: 11(int) Constant 1 + 54: 11(int) Constant 5 + 53: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 1(DebugCompilationUnit) 52 26 30 54 + 50: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 51 52 30 16 16 53 51 16 17 28 34 35 39 40 41 42 46 + 55: TypePointer Function 27(VSInput) + 56: TypeVector 8(float) 4 + 57: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 10 26 + 58(VSOutput): TypeStruct 56(fvec4) 18(fvec3) 18(fvec3) 18(fvec3) 18(fvec3) 18(fvec3) + 61: 11(int) Constant 53 + 62: 11(int) Constant 13 + 59: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 60 57 30 61 62 16 16 17 + 65: 11(int) Constant 58 + 63: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 64 19 30 65 48 16 16 17 + 66: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 64 19 30 65 48 16 16 17 + 67: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 64 19 30 65 48 16 16 17 + 68: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 64 19 30 65 48 16 16 17 + 69: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 64 19 30 65 48 16 16 17 + 70: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 71 52 30 16 16 53 71 16 17 59 63 66 67 68 69 + 72: TypeFunction 58(VSOutput) 55(ptr) + 73: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 8(DebugTypeFunction) 17 70 50 + 79: 11(int) Constant 62 + 78: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 20(DebugFunction) 77 73 30 79 16 53 77 17 79 + 82: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 83 50 30 79 16 78 26 52 + 85: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 31(DebugExpression) + 89: 11(int) Constant 63 + 90: TypePointer Function 58(VSOutput) + 92: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 93 70 30 89 16 78 26 + 95: 8(float) Constant 0 + 96: 56(fvec4) ConstantComposite 95 95 95 95 + 97: 18(fvec3) ConstantComposite 95 95 95 + 98:58(VSOutput) ConstantComposite 96 97 97 97 97 97 + 100: 11(int) Constant 64 + 101: 23(int) Constant 2 + 102: 23(int) Constant 3 + 103: TypePointer Function 18(fvec3) + 108: 11(int) Constant 65 + 109: TypePointer Function 20(fvec2) + 112: 23(int) Constant 7 + 113: TypePointer Function 23(int) + 122: 11(int) Constant 68 + 123: TypePointer Function 8(float) + 125: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 126 10 30 122 16 78 26 + 128: 23(int) Constant 5 + 131: TypeMatrix 56(fvec4) 4 + 133: TypeBool + 135: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 134 14 21 16 + 136: 133(bool) ConstantTrue + 132: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 108(DebugTypeMatrix) 57 26 136 + 137(UBO): TypeStruct 131 131 56(fvec4) 8(float) 8(float) + 140: 11(int) Constant 43 + 141: 11(int) Constant 20 + 138: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 139 132 30 140 141 16 16 17 + 142: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 139 132 30 140 141 16 16 17 + 145: 11(int) Constant 44 + 146: 11(int) Constant 17 + 143: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 144 57 30 145 146 16 16 17 + 149: 11(int) Constant 46 + 147: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 148 10 30 149 146 16 16 17 + 150: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 148 10 30 149 146 16 16 17 + 151: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 152 52 30 122 16 53 152 16 17 138 142 143 147 150 + 153(ubo): TypeStruct 137(UBO) + 156: 11(int) Constant 49 + 154: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 155 151 30 156 48 16 16 17 + 157: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 155 52 30 122 16 53 155 16 17 154 + 158: TypePointer Uniform 153(ubo) + 159: 158(ptr) Variable Uniform + 161: 11(int) Constant 8 + 160: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 1 157 30 122 16 53 1 159 161 + 162: 23(int) Constant 0 + 163: TypePointer Uniform 8(float) + 169: 11(int) Constant 69 + 171: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 172 10 30 169 16 78 26 + 181: 11(int) Constant 71 + 182: TypeMatrix 18(fvec3) 3 + 183: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 108(DebugTypeMatrix) 19 17 136 + 184: TypePointer Function 182 + 186: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 187 183 30 181 16 78 26 + 193: 11(int) Constant 72 + 196: 8(float) Constant 1065353216 + 203: 11(int) Constant 76 + 211: 11(int) Constant 77 + 219: 11(int) Constant 79 + 221: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 222 183 30 219 16 78 26 + 228: 11(int) Constant 81 + 237: 11(int) Constant 84 + 245: 11(int) Constant 85 + 253: 11(int) Constant 87 + 255: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 256 183 30 253 16 78 26 + 259: 11(int) Constant 88 + 264: 11(int) Constant 89 + 273: 11(int) Constant 91 + 275: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 276 183 30 273 16 78 26 + 284: 11(int) Constant 94 + 287: 23(int) Constant 4 + 293: 11(int) Constant 95 + 301: 11(int) Constant 96 + 302: TypePointer Function 131 + 304: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 305 132 30 301 16 78 26 + 311: TypePointer Function 56(fvec4) + 314: 11(int) Constant 97 + 315: 23(int) Constant 1 + 316: 56(fvec4) ConstantComposite 95 196 95 95 + 319: 11(int) Constant 98 + 325: 11(int) Constant 99 + 326: 56(fvec4) ConstantComposite 95 95 95 196 + 329: 11(int) Constant 101 + 331: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 332 57 30 329 16 78 26 + 343: 11(int) Constant 102 + 345: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 346 57 30 343 16 78 26 + 350: 23(int) Constant 6 + 362: 11(int) Constant 104 + 366: TypePointer Uniform 131 + 375: 11(int) Constant 105 + 394: 11(int) Constant 107 + 408: 11(int) Constant 108 + 410: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 411 19 30 408 16 78 26 + 413: TypePointer Uniform 56(fvec4) + 428: 11(int) Constant 109 + 435: 11(int) Constant 110 + 441: 11(int) Constant 111 + 446: TypePointer Input 18(fvec3) + 447(input.Pos): 446(ptr) Variable Input +450(input.Normal): 446(ptr) Variable Input + 453: TypePointer Input 20(fvec2) + 454(input.UV): 453(ptr) Variable Input +457(input.Color): 446(ptr) Variable Input +460(input.instancePos): 446(ptr) Variable Input +463(input.instanceRot): 446(ptr) Variable Input + 466: TypePointer Input 8(float) +467(input.instanceScale): 466(ptr) Variable Input + 470: TypePointer Input 23(int) +471(input.instanceTexIndex): 470(ptr) Variable Input + 478: TypePointer Output 56(fvec4) +479(@entryPointOutput.Pos): 478(ptr) Variable Output + 482: TypePointer Output 18(fvec3) +483(@entryPointOutput.Normal): 482(ptr) Variable Output +486(@entryPointOutput.Color): 482(ptr) Variable Output +489(@entryPointOutput.UV): 482(ptr) Variable Output +492(@entryPointOutput.ViewVec): 482(ptr) Variable Output +495(@entryPointOutput.LightVec): 482(ptr) Variable Output + Line 1 62 1 + 6(main): 4 Function None 5 + 7: Label + 445(input): 55(ptr) Variable Function +474(flattenTemp): 90(ptr) Variable Function + 475(param): 55(ptr) Variable Function + Line 1 62 0 + 448: 18(fvec3) Load 447(input.Pos) + 449: 103(ptr) AccessChain 445(input) 162 + Store 449 448 + 451: 18(fvec3) Load 450(input.Normal) + 452: 103(ptr) AccessChain 445(input) 315 + Store 452 451 + 455: 20(fvec2) Load 454(input.UV) + 456: 109(ptr) AccessChain 445(input) 101 + Store 456 455 + 458: 18(fvec3) Load 457(input.Color) + 459: 103(ptr) AccessChain 445(input) 102 + Store 459 458 + 461: 18(fvec3) Load 460(input.instancePos) + 462: 103(ptr) AccessChain 445(input) 287 + Store 462 461 + 464: 18(fvec3) Load 463(input.instanceRot) + 465: 103(ptr) AccessChain 445(input) 128 + Store 465 464 + 468: 8(float) Load 467(input.instanceScale) + 469: 123(ptr) AccessChain 445(input) 350 + Store 469 468 + 472: 23(int) Load 471(input.instanceTexIndex) + 473: 113(ptr) AccessChain 445(input) 112 + Store 473 472 + 476: 27(VSInput) Load 445(input) + Store 475(param) 476 + 477:58(VSOutput) FunctionCall 75(@main(struct-VSInput-vf3-vf3-vf2-vf3-vf3-vf3-f1-i11;) 475(param) + Store 474(flattenTemp) 477 + 480: 311(ptr) AccessChain 474(flattenTemp) 162 + 481: 56(fvec4) Load 480 + Store 479(@entryPointOutput.Pos) 481 + 484: 103(ptr) AccessChain 474(flattenTemp) 315 + 485: 18(fvec3) Load 484 + Store 483(@entryPointOutput.Normal) 485 + 487: 103(ptr) AccessChain 474(flattenTemp) 101 + 488: 18(fvec3) Load 487 + Store 486(@entryPointOutput.Color) 488 + 490: 103(ptr) AccessChain 474(flattenTemp) 102 + 491: 18(fvec3) Load 490 + Store 489(@entryPointOutput.UV) 491 + 493: 103(ptr) AccessChain 474(flattenTemp) 287 + 494: 18(fvec3) Load 493 + Store 492(@entryPointOutput.ViewVec) 494 + 496: 103(ptr) AccessChain 474(flattenTemp) 128 + 497: 18(fvec3) Load 496 + Store 495(@entryPointOutput.LightVec) 497 Return FunctionEnd -74(@main(struct-VSInput-vf3-vf3-vf2-vf3-vf3-vf3-f1-i11;):57(VSOutput) Function None 71 - 73(input): 54(ptr) FunctionParameter - 77: Label - 86(output): 85(ptr) Variable Function - 114(s): 113(ptr) Variable Function - 157(c): 113(ptr) Variable Function - 171(mx): 170(ptr) Variable Function - 198(my): 170(ptr) Variable Function - 224(mz): 170(ptr) Variable Function - 238(rotMat): 170(ptr) Variable Function - 262(gRotMat): 261(ptr) Variable Function - 282(locPos): 271(ptr) Variable Function - 295(pos): 271(ptr) Variable Function - 353(lPos): 97(ptr) Variable Function - 78: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(Acosh) 76 - 79: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103 29 15 15 15 15 - 82: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 80 73(input) 83 - 84: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 101 76 74(@main(struct-VSInput-vf3-vf3-vf2-vf3-vf3-vf3-f1-i11;) - 90: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 87 86(output) 83 - Store 86(output) 94 - 98: 97(ptr) AccessChain 73(input) 96 - 99: 17(fvec3) Load 98 - 100: 97(ptr) AccessChain 86(output) 95 - Store 100 99 - 102: 101(ptr) AccessChain 73(input) 95 - 103: 19(fvec2) Load 102 - 106: 105(ptr) AccessChain 73(input) 104 - 107: 22(int) Load 106 - 108: 7(float) ConvertSToF 107 - 109: 7(float) CompositeExtract 103 0 - 110: 7(float) CompositeExtract 103 1 - 111: 17(fvec3) CompositeConstruct 109 110 108 - 112: 97(ptr) AccessChain 86(output) 96 - Store 112 111 - 118: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 115 114(s) 83 - 120: 113(ptr) AccessChain 73(input) 119 15 - 121: 7(float) Load 120 - 153: 152(ptr) AccessChain 148 151 96 - 154: 7(float) Load 153 - 155: 7(float) FAdd 121 154 - 156: 7(float) ExtInst 2(GLSL.std.450) 13(Sin) 155 - Store 114(s) 156 - 161: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 158 157(c) 83 - 162: 113(ptr) AccessChain 73(input) 119 15 - 163: 7(float) Load 162 - 164: 152(ptr) AccessChain 148 151 96 - 165: 7(float) Load 164 - 166: 7(float) FAdd 163 165 - 167: 7(float) ExtInst 2(GLSL.std.450) 14(Cos) 166 - Store 157(c) 167 - 175: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 172 171(mx) 83 - 176: 7(float) Load 157(c) - 177: 7(float) Load 114(s) - 178: 7(float) FNegate 177 - 179: 7(float) Load 114(s) - 180: 7(float) Load 157(c) - 182: 17(fvec3) CompositeConstruct 176 178 91 - 183: 17(fvec3) CompositeConstruct 179 180 91 - 184: 17(fvec3) CompositeConstruct 91 91 181 - 185: 168 CompositeConstruct 182 183 184 - Store 171(mx) 185 - 186: 113(ptr) AccessChain 73(input) 119 51 - 187: 7(float) Load 186 - 188: 152(ptr) AccessChain 148 151 96 - 189: 7(float) Load 188 - 190: 7(float) FAdd 187 189 - 191: 7(float) ExtInst 2(GLSL.std.450) 13(Sin) 190 - Store 114(s) 191 - 192: 113(ptr) AccessChain 73(input) 119 51 - 193: 7(float) Load 192 - 194: 152(ptr) AccessChain 148 151 96 - 195: 7(float) Load 194 - 196: 7(float) FAdd 193 195 - 197: 7(float) ExtInst 2(GLSL.std.450) 14(Cos) 196 - Store 157(c) 197 - 202: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 199 198(my) 83 - 203: 7(float) Load 157(c) - 204: 7(float) Load 114(s) - 205: 7(float) FNegate 204 - 206: 7(float) Load 114(s) - 207: 7(float) Load 157(c) - 208: 17(fvec3) CompositeConstruct 203 91 205 - 209: 17(fvec3) CompositeConstruct 91 181 91 - 210: 17(fvec3) CompositeConstruct 206 91 207 - 211: 168 CompositeConstruct 208 209 210 - Store 198(my) 211 - 212: 113(ptr) AccessChain 73(input) 119 20 - 213: 7(float) Load 212 - 214: 152(ptr) AccessChain 148 151 96 - 215: 7(float) Load 214 - 216: 7(float) FAdd 213 215 - 217: 7(float) ExtInst 2(GLSL.std.450) 13(Sin) 216 - Store 114(s) 217 - 218: 113(ptr) AccessChain 73(input) 119 20 - 219: 7(float) Load 218 - 220: 152(ptr) AccessChain 148 151 96 - 221: 7(float) Load 220 - 222: 7(float) FAdd 219 221 - 223: 7(float) ExtInst 2(GLSL.std.450) 14(Cos) 222 - Store 157(c) 223 - 228: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 225 224(mz) 83 - 229: 7(float) Load 157(c) - 230: 7(float) Load 114(s) - 231: 7(float) FNegate 230 - 232: 7(float) Load 114(s) - 233: 7(float) Load 157(c) - 234: 17(fvec3) CompositeConstruct 181 91 91 - 235: 17(fvec3) CompositeConstruct 91 229 231 - 236: 17(fvec3) CompositeConstruct 91 232 233 - 237: 168 CompositeConstruct 234 235 236 - Store 224(mz) 237 - 242: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 239 238(rotMat) 83 - 243: 168 Load 171(mx) - 244: 168 Load 198(my) - 245: 168 MatrixTimesMatrix 243 244 - 246: 168 Load 224(mz) - 247: 168 MatrixTimesMatrix 245 246 - Store 238(rotMat) 247 - 248: 113(ptr) AccessChain 73(input) 119 51 - 249: 7(float) Load 248 - 251: 152(ptr) AccessChain 148 151 250 - 252: 7(float) Load 251 - 253: 7(float) FAdd 249 252 - 254: 7(float) ExtInst 2(GLSL.std.450) 13(Sin) 253 - Store 114(s) 254 - 255: 113(ptr) AccessChain 73(input) 119 51 - 256: 7(float) Load 255 - 257: 152(ptr) AccessChain 148 151 250 - 258: 7(float) Load 257 - 259: 7(float) FAdd 256 258 - 260: 7(float) ExtInst 2(GLSL.std.450) 14(Cos) 259 - Store 157(c) 260 - 266: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 263 262(gRotMat) 83 - 267: 7(float) Load 157(c) - 268: 7(float) Load 114(s) - 269: 7(float) FNegate 268 - 270: 55(fvec4) CompositeConstruct 267 91 269 91 - 272: 271(ptr) AccessChain 262(gRotMat) 151 - Store 272 270 - 275: 271(ptr) AccessChain 262(gRotMat) 273 - Store 275 274 - 276: 7(float) Load 114(s) - 277: 7(float) Load 157(c) - 278: 55(fvec4) CompositeConstruct 276 91 277 91 - 279: 271(ptr) AccessChain 262(gRotMat) 95 - Store 279 278 - 281: 271(ptr) AccessChain 262(gRotMat) 96 - Store 281 280 - 286: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 283 282(locPos) 83 - 287: 97(ptr) AccessChain 73(input) 151 - 288: 17(fvec3) Load 287 - 289: 168 Load 238(rotMat) - 290: 17(fvec3) VectorTimesMatrix 288 289 - 291: 7(float) CompositeExtract 290 0 - 292: 7(float) CompositeExtract 290 1 - 293: 7(float) CompositeExtract 290 2 - 294: 55(fvec4) CompositeConstruct 291 292 293 181 - Store 282(locPos) 294 - 299: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 296 295(pos) 83 - 300: 55(fvec4) Load 282(locPos) - 301: 17(fvec3) VectorShuffle 300 300 0 1 2 - 303: 113(ptr) AccessChain 73(input) 302 - 304: 7(float) Load 303 - 305: 17(fvec3) VectorTimesScalar 301 304 - 306: 97(ptr) AccessChain 73(input) 250 - 307: 17(fvec3) Load 306 - 308: 17(fvec3) FAdd 305 307 - 309: 7(float) CompositeExtract 308 0 - 310: 7(float) CompositeExtract 308 1 - 311: 7(float) CompositeExtract 308 2 - 312: 55(fvec4) CompositeConstruct 309 310 311 181 - Store 295(pos) 312 - 313: 55(fvec4) Load 295(pos) - 314: 122 Load 262(gRotMat) - 315: 55(fvec4) VectorTimesMatrix 313 314 - 317: 316(ptr) AccessChain 148 151 273 - 318: 122 Load 317 - 319: 55(fvec4) VectorTimesMatrix 315 318 - 320: 316(ptr) AccessChain 148 151 151 - 321: 122 Load 320 - 322: 55(fvec4) VectorTimesMatrix 319 321 - 323: 271(ptr) AccessChain 86(output) 151 + Line 1 62 1 +75(@main(struct-VSInput-vf3-vf3-vf2-vf3-vf3-vf3-f1-i11;):58(VSOutput) Function None 72 + 74(input): 55(ptr) FunctionParameter + 76: Label + 91(output): 90(ptr) Variable Function + 124(s): 123(ptr) Variable Function + 170(c): 123(ptr) Variable Function + 185(mx): 184(ptr) Variable Function + 220(my): 184(ptr) Variable Function + 254(mz): 184(ptr) Variable Function + 274(rotMat): 184(ptr) Variable Function + 303(gRotMat): 302(ptr) Variable Function + 330(locPos): 311(ptr) Variable Function + 344(pos): 311(ptr) Variable Function + 409(lPos): 103(ptr) Variable Function + 80: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 78 + 81: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 79 79 16 16 + 84: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 82 74(input) 85 + 86: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 101(DebugFunctionDefinition) 78 75(@main(struct-VSInput-vf3-vf3-vf2-vf3-vf3-vf3-f1-i11;) + 87: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 78 + 88: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 89 89 16 16 + 94: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 92 91(output) 85 + Store 91(output) 98 + 99: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 100 100 16 16 + 104: 103(ptr) AccessChain 74(input) 102 + 105: 18(fvec3) Load 104 + 106: 103(ptr) AccessChain 91(output) 101 + Store 106 105 + 107: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 108 108 16 16 + 110: 109(ptr) AccessChain 74(input) 101 + 111: 20(fvec2) Load 110 + 114: 113(ptr) AccessChain 74(input) 112 + 115: 23(int) Load 114 + 116: 8(float) ConvertSToF 115 + 117: 8(float) CompositeExtract 111 0 + 118: 8(float) CompositeExtract 111 1 + 119: 18(fvec3) CompositeConstruct 117 118 116 + 120: 103(ptr) AccessChain 91(output) 102 + Store 120 119 + 121: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 122 122 16 16 + 127: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 125 124(s) 85 + 129: 123(ptr) AccessChain 74(input) 128 16 + 130: 8(float) Load 129 + 164: 163(ptr) AccessChain 159 162 102 + 165: 8(float) Load 164 + 166: 8(float) FAdd 130 165 + 167: 8(float) ExtInst 3(GLSL.std.450) 13(Sin) 166 + Store 124(s) 167 + 168: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 169 169 16 16 + 173: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 171 170(c) 85 + 174: 123(ptr) AccessChain 74(input) 128 16 + 175: 8(float) Load 174 + 176: 163(ptr) AccessChain 159 162 102 + 177: 8(float) Load 176 + 178: 8(float) FAdd 175 177 + 179: 8(float) ExtInst 3(GLSL.std.450) 14(Cos) 178 + Store 170(c) 179 + 180: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 181 181 16 16 + 188: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 186 185(mx) 85 + 189: 8(float) Load 170(c) + 190: 8(float) Load 124(s) + 191: 8(float) FNegate 190 + 192: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 193 193 16 16 + 194: 8(float) Load 124(s) + 195: 8(float) Load 170(c) + 197: 18(fvec3) CompositeConstruct 189 191 95 + 198: 18(fvec3) CompositeConstruct 194 195 95 + 199: 18(fvec3) CompositeConstruct 95 95 196 + 200: 182 CompositeConstruct 197 198 199 + 201: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 181 181 16 16 + Store 185(mx) 200 + 202: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 203 203 16 16 + 204: 123(ptr) AccessChain 74(input) 128 52 + 205: 8(float) Load 204 + 206: 163(ptr) AccessChain 159 162 102 + 207: 8(float) Load 206 + 208: 8(float) FAdd 205 207 + 209: 8(float) ExtInst 3(GLSL.std.450) 13(Sin) 208 + Store 124(s) 209 + 210: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 211 211 16 16 + 212: 123(ptr) AccessChain 74(input) 128 52 + 213: 8(float) Load 212 + 214: 163(ptr) AccessChain 159 162 102 + 215: 8(float) Load 214 + 216: 8(float) FAdd 213 215 + 217: 8(float) ExtInst 3(GLSL.std.450) 14(Cos) 216 + Store 170(c) 217 + 218: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 219 219 16 16 + 223: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 221 220(my) 85 + 224: 8(float) Load 170(c) + 225: 8(float) Load 124(s) + 226: 8(float) FNegate 225 + 227: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 228 228 16 16 + 229: 8(float) Load 124(s) + 230: 8(float) Load 170(c) + 231: 18(fvec3) CompositeConstruct 224 95 226 + 232: 18(fvec3) CompositeConstruct 95 196 95 + 233: 18(fvec3) CompositeConstruct 229 95 230 + 234: 182 CompositeConstruct 231 232 233 + 235: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 219 219 16 16 + Store 220(my) 234 + 236: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 237 237 16 16 + 238: 123(ptr) AccessChain 74(input) 128 21 + 239: 8(float) Load 238 + 240: 163(ptr) AccessChain 159 162 102 + 241: 8(float) Load 240 + 242: 8(float) FAdd 239 241 + 243: 8(float) ExtInst 3(GLSL.std.450) 13(Sin) 242 + Store 124(s) 243 + 244: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 245 245 16 16 + 246: 123(ptr) AccessChain 74(input) 128 21 + 247: 8(float) Load 246 + 248: 163(ptr) AccessChain 159 162 102 + 249: 8(float) Load 248 + 250: 8(float) FAdd 247 249 + 251: 8(float) ExtInst 3(GLSL.std.450) 14(Cos) 250 + Store 170(c) 251 + 252: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 253 253 16 16 + 257: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 255 254(mz) 85 + 258: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 259 259 16 16 + 260: 8(float) Load 170(c) + 261: 8(float) Load 124(s) + 262: 8(float) FNegate 261 + 263: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 264 264 16 16 + 265: 8(float) Load 124(s) + 266: 8(float) Load 170(c) + 267: 18(fvec3) CompositeConstruct 196 95 95 + 268: 18(fvec3) CompositeConstruct 95 260 262 + 269: 18(fvec3) CompositeConstruct 95 265 266 + 270: 182 CompositeConstruct 267 268 269 + 271: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 253 253 16 16 + Store 254(mz) 270 + 272: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 273 273 16 16 + 277: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 275 274(rotMat) 85 + 278: 182 Load 185(mx) + 279: 182 Load 220(my) + 280: 182 MatrixTimesMatrix 278 279 + 281: 182 Load 254(mz) + 282: 182 MatrixTimesMatrix 280 281 + Store 274(rotMat) 282 + 283: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 284 284 16 16 + 285: 123(ptr) AccessChain 74(input) 128 52 + 286: 8(float) Load 285 + 288: 163(ptr) AccessChain 159 162 287 + 289: 8(float) Load 288 + 290: 8(float) FAdd 286 289 + 291: 8(float) ExtInst 3(GLSL.std.450) 13(Sin) 290 + Store 124(s) 291 + 292: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 293 293 16 16 + 294: 123(ptr) AccessChain 74(input) 128 52 + 295: 8(float) Load 294 + 296: 163(ptr) AccessChain 159 162 287 + 297: 8(float) Load 296 + 298: 8(float) FAdd 295 297 + 299: 8(float) ExtInst 3(GLSL.std.450) 14(Cos) 298 + Store 170(c) 299 + 300: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 301 301 16 16 + 306: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 304 303(gRotMat) 85 + 307: 8(float) Load 170(c) + 308: 8(float) Load 124(s) + 309: 8(float) FNegate 308 + 310: 56(fvec4) CompositeConstruct 307 95 309 95 + 312: 311(ptr) AccessChain 303(gRotMat) 162 + Store 312 310 + 313: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 314 314 16 16 + 317: 311(ptr) AccessChain 303(gRotMat) 315 + Store 317 316 + 318: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 319 319 16 16 + 320: 8(float) Load 124(s) + 321: 8(float) Load 170(c) + 322: 56(fvec4) CompositeConstruct 320 95 321 95 + 323: 311(ptr) AccessChain 303(gRotMat) 101 Store 323 322 - 324: 97(ptr) AccessChain 73(input) 273 - 325: 17(fvec3) Load 324 - 326: 168 Load 238(rotMat) - 327: 17(fvec3) VectorTimesMatrix 325 326 - 328: 122 Load 262(gRotMat) - 329: 316(ptr) AccessChain 148 151 273 - 330: 122 Load 329 - 331: 122 MatrixTimesMatrix 328 330 - 332: 55(fvec4) CompositeExtract 331 0 - 333: 17(fvec3) VectorShuffle 332 332 0 1 2 - 334: 55(fvec4) CompositeExtract 331 1 - 335: 17(fvec3) VectorShuffle 334 334 0 1 2 - 336: 55(fvec4) CompositeExtract 331 2 - 337: 17(fvec3) VectorShuffle 336 336 0 1 2 - 338: 168 CompositeConstruct 333 335 337 - 339: 17(fvec3) VectorTimesMatrix 327 338 - 340: 97(ptr) AccessChain 86(output) 273 - Store 340 339 - 341: 97(ptr) AccessChain 73(input) 151 - 342: 17(fvec3) Load 341 - 343: 97(ptr) AccessChain 73(input) 250 - 344: 17(fvec3) Load 343 - 345: 17(fvec3) FAdd 342 344 - 346: 7(float) CompositeExtract 345 0 - 347: 7(float) CompositeExtract 345 1 - 348: 7(float) CompositeExtract 345 2 - 349: 55(fvec4) CompositeConstruct 346 347 348 181 - 350: 316(ptr) AccessChain 148 151 273 - 351: 122 Load 350 - 352: 55(fvec4) VectorTimesMatrix 349 351 - Store 295(pos) 352 - 357: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 354 353(lPos) 83 - 359: 358(ptr) AccessChain 148 151 95 - 360: 55(fvec4) Load 359 - 361: 17(fvec3) VectorShuffle 360 360 0 1 2 - 362: 316(ptr) AccessChain 148 151 273 - 363: 122 Load 362 - 364: 55(fvec4) CompositeExtract 363 0 - 365: 17(fvec3) VectorShuffle 364 364 0 1 2 - 366: 55(fvec4) CompositeExtract 363 1 - 367: 17(fvec3) VectorShuffle 366 366 0 1 2 - 368: 55(fvec4) CompositeExtract 363 2 - 369: 17(fvec3) VectorShuffle 368 368 0 1 2 - 370: 168 CompositeConstruct 365 367 369 - 371: 17(fvec3) VectorTimesMatrix 361 370 - Store 353(lPos) 371 - 372: 17(fvec3) Load 353(lPos) - 373: 55(fvec4) Load 295(pos) - 374: 17(fvec3) VectorShuffle 373 373 0 1 2 - 375: 17(fvec3) FSub 372 374 - 376: 97(ptr) AccessChain 86(output) 119 - Store 376 375 - 377: 55(fvec4) Load 295(pos) - 378: 17(fvec3) VectorShuffle 377 377 0 1 2 - 379: 17(fvec3) FNegate 378 - 380: 97(ptr) AccessChain 86(output) 250 - Store 380 379 - 381:57(VSOutput) Load 86(output) - ReturnValue 381 + 324: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 325 325 16 16 + 327: 311(ptr) AccessChain 303(gRotMat) 102 + Store 327 326 + 328: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 329 329 16 16 + 333: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 331 330(locPos) 85 + 334: 103(ptr) AccessChain 74(input) 162 + 335: 18(fvec3) Load 334 + 336: 182 Load 274(rotMat) + 337: 18(fvec3) VectorTimesMatrix 335 336 + 338: 8(float) CompositeExtract 337 0 + 339: 8(float) CompositeExtract 337 1 + 340: 8(float) CompositeExtract 337 2 + 341: 56(fvec4) CompositeConstruct 338 339 340 196 + Store 330(locPos) 341 + 342: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 343 343 16 16 + 347: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 345 344(pos) 85 + 348: 56(fvec4) Load 330(locPos) + 349: 18(fvec3) VectorShuffle 348 348 0 1 2 + 351: 123(ptr) AccessChain 74(input) 350 + 352: 8(float) Load 351 + 353: 18(fvec3) VectorTimesScalar 349 352 + 354: 103(ptr) AccessChain 74(input) 287 + 355: 18(fvec3) Load 354 + 356: 18(fvec3) FAdd 353 355 + 357: 8(float) CompositeExtract 356 0 + 358: 8(float) CompositeExtract 356 1 + 359: 8(float) CompositeExtract 356 2 + 360: 56(fvec4) CompositeConstruct 357 358 359 196 + Store 344(pos) 360 + 361: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 362 362 16 16 + 363: 56(fvec4) Load 344(pos) + 364: 131 Load 303(gRotMat) + 365: 56(fvec4) VectorTimesMatrix 363 364 + 367: 366(ptr) AccessChain 159 162 315 + 368: 131 Load 367 + 369: 56(fvec4) VectorTimesMatrix 365 368 + 370: 366(ptr) AccessChain 159 162 162 + 371: 131 Load 370 + 372: 56(fvec4) VectorTimesMatrix 369 371 + 373: 311(ptr) AccessChain 91(output) 162 + Store 373 372 + 374: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 375 375 16 16 + 376: 103(ptr) AccessChain 74(input) 315 + 377: 18(fvec3) Load 376 + 378: 182 Load 274(rotMat) + 379: 18(fvec3) VectorTimesMatrix 377 378 + 380: 131 Load 303(gRotMat) + 381: 366(ptr) AccessChain 159 162 315 + 382: 131 Load 381 + 383: 131 MatrixTimesMatrix 380 382 + 384: 56(fvec4) CompositeExtract 383 0 + 385: 18(fvec3) VectorShuffle 384 384 0 1 2 + 386: 56(fvec4) CompositeExtract 383 1 + 387: 18(fvec3) VectorShuffle 386 386 0 1 2 + 388: 56(fvec4) CompositeExtract 383 2 + 389: 18(fvec3) VectorShuffle 388 388 0 1 2 + 390: 182 CompositeConstruct 385 387 389 + 391: 18(fvec3) VectorTimesMatrix 379 390 + 392: 103(ptr) AccessChain 91(output) 315 + Store 392 391 + 393: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 394 394 16 16 + 395: 103(ptr) AccessChain 74(input) 162 + 396: 18(fvec3) Load 395 + 397: 103(ptr) AccessChain 74(input) 287 + 398: 18(fvec3) Load 397 + 399: 18(fvec3) FAdd 396 398 + 400: 8(float) CompositeExtract 399 0 + 401: 8(float) CompositeExtract 399 1 + 402: 8(float) CompositeExtract 399 2 + 403: 56(fvec4) CompositeConstruct 400 401 402 196 + 404: 366(ptr) AccessChain 159 162 315 + 405: 131 Load 404 + 406: 56(fvec4) VectorTimesMatrix 403 405 + Store 344(pos) 406 + 407: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 408 408 16 16 + 412: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 410 409(lPos) 85 + 414: 413(ptr) AccessChain 159 162 101 + 415: 56(fvec4) Load 414 + 416: 18(fvec3) VectorShuffle 415 415 0 1 2 + 417: 366(ptr) AccessChain 159 162 315 + 418: 131 Load 417 + 419: 56(fvec4) CompositeExtract 418 0 + 420: 18(fvec3) VectorShuffle 419 419 0 1 2 + 421: 56(fvec4) CompositeExtract 418 1 + 422: 18(fvec3) VectorShuffle 421 421 0 1 2 + 423: 56(fvec4) CompositeExtract 418 2 + 424: 18(fvec3) VectorShuffle 423 423 0 1 2 + 425: 182 CompositeConstruct 420 422 424 + 426: 18(fvec3) VectorTimesMatrix 416 425 + Store 409(lPos) 426 + 427: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 428 428 16 16 + 429: 18(fvec3) Load 409(lPos) + 430: 56(fvec4) Load 344(pos) + 431: 18(fvec3) VectorShuffle 430 430 0 1 2 + 432: 18(fvec3) FSub 429 431 + 433: 103(ptr) AccessChain 91(output) 128 + Store 433 432 + 434: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 435 435 16 16 + 436: 56(fvec4) Load 344(pos) + 437: 18(fvec3) VectorShuffle 436 436 0 1 2 + 438: 18(fvec3) FNegate 437 + 439: 103(ptr) AccessChain 91(output) 287 + Store 439 438 + 440: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 441 441 16 16 + 442:58(VSOutput) Load 91(output) + ReturnValue 442 FunctionEnd diff --git a/Test/baseResults/spv.debuginfo.scalar_types.glsl.frag.out b/Test/baseResults/spv.debuginfo.scalar_types.glsl.frag.out new file mode 100755 index 00000000..d244fd15 --- /dev/null +++ b/Test/baseResults/spv.debuginfo.scalar_types.glsl.frag.out @@ -0,0 +1,196 @@ +spv.debuginfo.scalar_types.glsl.frag +// Module Version 10000 +// Generated by (magic number): 8000b +// Id's are bound by 146 + + Capability Shader + Capability Float16 + Capability Float64 + Capability Int64 + Capability Int16 + Capability Int8 + Extension "SPV_KHR_non_semantic_info" + 2: ExtInstImport "NonSemantic.Shader.DebugInfo.100" + 3: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint Fragment 14 "main" + ExecutionMode 14 OriginUpperLeft + 1: String "" + 8: String "uint" + 16: String "main" + 19: String "// OpModuleProcessed auto-map-locations +// OpModuleProcessed auto-map-bindings +// OpModuleProcessed client vulkan100 +// OpModuleProcessed target-env vulkan1.0 +// OpModuleProcessed keep-uncalled +// OpModuleProcessed entry-point main +#line 1 +" + 30: String "bool" + 35: String "VAR_bool" + 41: String "int" + 46: String "VAR_int" + 53: String "VAR_uint" + 57: String "float" + 62: String "VAR_float" + 67: String "double" + 73: String "VAR_double" + 78: String "int8_t" + 83: String "VAR_int8_t" + 88: String "uint8_t" + 93: String "VAR_uint8_t" + 98: String "int16_t" + 104: String "VAR_int16_t" + 109: String "uint16_t" + 114: String "VAR_uint16_t" + 119: String "int64_t" + 124: String "VAR_int64_t" + 129: String "uint64_t" + 134: String "VAR_uint64_t" + 139: String "float16_t" + 144: String "VAR_float16_t" + SourceExtension "GL_EXT_shader_explicit_arithmetic_types" + Name 14 "main" + Name 33 "VAR_bool" + Name 44 "VAR_int" + Name 51 "VAR_uint" + Name 60 "VAR_float" + Name 71 "VAR_double" + Name 81 "VAR_int8_t" + Name 91 "VAR_uint8_t" + Name 102 "VAR_int16_t" + Name 112 "VAR_uint16_t" + Name 122 "VAR_int64_t" + Name 132 "VAR_uint64_t" + Name 142 "VAR_float16_t" + 4: TypeVoid + 5: TypeFunction 4 + 7: TypeInt 32 0 + 10: 7(int) Constant 32 + 11: 7(int) Constant 6 + 12: 7(int) Constant 0 + 9: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 8 10 11 12 + 13: 7(int) Constant 3 + 6: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 8(DebugTypeFunction) 13 4 + 18: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 35(DebugSource) 1 19 + 20: 7(int) Constant 42 + 22: 7(int) Constant 1 + 23: 7(int) Constant 4 + 24: 7(int) Constant 2 + 21: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 1(DebugCompilationUnit) 22 23 18 24 + 17: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 20(DebugFunction) 16 6 18 20 12 21 16 13 20 + 28: 7(int) Constant 43 + 29: TypeBool + 31: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 30 10 24 12 + 32: TypePointer Private 29(bool) + 33(VAR_bool): 32(ptr) Variable Private + 36: 7(int) Constant 8 + 34: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 35 31 18 28 12 21 35 33(VAR_bool) 36 + 37: 29(bool) ConstantFalse + 39: 7(int) Constant 44 + 40: TypeInt 32 1 + 42: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 41 10 23 12 + 43: TypePointer Private 40(int) + 44(VAR_int): 43(ptr) Variable Private + 45: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 46 42 18 39 12 21 46 44(VAR_int) 36 + 47: 40(int) Constant 0 + 49: 7(int) Constant 45 + 50: TypePointer Private 7(int) + 51(VAR_uint): 50(ptr) Variable Private + 52: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 53 9 18 49 12 21 53 51(VAR_uint) 36 + 55: 7(int) Constant 46 + 56: TypeFloat 32 + 58: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 57 10 13 12 + 59: TypePointer Private 56(float) + 60(VAR_float): 59(ptr) Variable Private + 61: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 62 58 18 55 12 21 62 60(VAR_float) 36 + 63: 56(float) Constant 0 + 65: 7(int) Constant 47 + 66: TypeFloat 64 + 69: 7(int) Constant 64 + 68: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 67 69 13 12 + 70: TypePointer Private 66(float64_t) + 71(VAR_double): 70(ptr) Variable Private + 72: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 73 68 18 65 12 21 73 71(VAR_double) 36 + 74:66(float64_t) Constant 0 0 + 76: 7(int) Constant 48 + 77: TypeInt 8 1 + 79: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 78 36 23 12 + 80: TypePointer Private 77(int8_t) + 81(VAR_int8_t): 80(ptr) Variable Private + 82: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 83 79 18 76 12 21 83 81(VAR_int8_t) 36 + 84: 77(int8_t) Constant 0 + 86: 7(int) Constant 49 + 87: TypeInt 8 0 + 89: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 88 36 11 12 + 90: TypePointer Private 87(int8_t) + 91(VAR_uint8_t): 90(ptr) Variable Private + 92: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 93 89 18 86 12 21 93 91(VAR_uint8_t) 36 + 94: 87(int8_t) Constant 0 + 96: 7(int) Constant 50 + 97: TypeInt 16 1 + 100: 7(int) Constant 16 + 99: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 98 100 23 12 + 101: TypePointer Private 97(int16_t) +102(VAR_int16_t): 101(ptr) Variable Private + 103: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 104 99 18 96 12 21 104 102(VAR_int16_t) 36 + 105: 97(int16_t) Constant 0 + 107: 7(int) Constant 51 + 108: TypeInt 16 0 + 110: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 109 100 11 12 + 111: TypePointer Private 108(int16_t) +112(VAR_uint16_t): 111(ptr) Variable Private + 113: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 114 110 18 107 12 21 114 112(VAR_uint16_t) 36 + 115:108(int16_t) Constant 0 + 117: 7(int) Constant 52 + 118: TypeInt 64 1 + 120: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 119 69 23 12 + 121: TypePointer Private 118(int64_t) +122(VAR_int64_t): 121(ptr) Variable Private + 123: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 124 120 18 117 12 21 124 122(VAR_int64_t) 36 + 125:118(int64_t) Constant 0 0 + 127: 7(int) Constant 53 + 128: TypeInt 64 0 + 130: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 129 69 11 12 + 131: TypePointer Private 128(int64_t) +132(VAR_uint64_t): 131(ptr) Variable Private + 133: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 134 130 18 127 12 21 134 132(VAR_uint64_t) 36 + 135:128(int64_t) Constant 0 0 + 137: 7(int) Constant 54 + 138: TypeFloat 16 + 140: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 139 100 13 12 + 141: TypePointer Private 138(float16_t) +142(VAR_float16_t): 141(ptr) Variable Private + 143: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 144 140 18 137 12 21 144 142(VAR_float16_t) 36 + 145:138(float16_t) Constant 0 + Line 1 42 11 + 14(main): 4 Function None 5 + 15: Label + 25: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 101(DebugFunctionDefinition) 17 14(main) + 26: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 17 + 27: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 28 28 12 12 + Store 33(VAR_bool) 37 + 38: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 39 39 12 12 + Store 44(VAR_int) 47 + 48: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 49 49 12 12 + Store 51(VAR_uint) 12 + 54: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 55 55 12 12 + Store 60(VAR_float) 63 + 64: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 65 65 12 12 + Store 71(VAR_double) 74 + 75: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 76 76 12 12 + Store 81(VAR_int8_t) 84 + 85: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 86 86 12 12 + Store 91(VAR_uint8_t) 94 + 95: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 96 96 12 12 + Store 102(VAR_int16_t) 105 + 106: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 107 107 12 12 + Store 112(VAR_uint16_t) 115 + 116: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 117 117 12 12 + Store 122(VAR_int64_t) 125 + 126: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 127 127 12 12 + Store 132(VAR_uint64_t) 135 + 136: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 137 137 12 12 + Store 142(VAR_float16_t) 145 + Return + FunctionEnd diff --git a/Test/baseResults/spv.exportFunctions.comp.out b/Test/baseResults/spv.exportFunctions.comp.out new file mode 100755 index 00000000..958cf680 --- /dev/null +++ b/Test/baseResults/spv.exportFunctions.comp.out @@ -0,0 +1,36 @@ +spv.exportFunctions.comp +// Module Version 10000 +// Generated by (magic number): 8000b +// Id's are bound by 22 + + Capability Shader + Capability Linkage + 1: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + Source GLSL 450 + Name 7 "add(f1;f1;" + Name 5 "a" + Name 6 "b" + Name 11 "foo(" + Decorate 7(add(f1;f1;) Linkage Attributes 6579297 0 + Decorate 11(foo() Linkage Attributes 7303014 0 + 2: TypeFloat 32 + 3: TypePointer Function 2(float) + 4: TypeFunction 2(float) 3(ptr) 3(ptr) + 9: TypeInt 32 1 + 10: TypeFunction 9(int) + 17: TypeVoid + 19: 9(int) Constant 0 + 7(add(f1;f1;): 2(float) Function None 4 + 5(a): 3(ptr) FunctionParameter + 6(b): 3(ptr) FunctionParameter + 8: Label + 13: 2(float) Load 5(a) + 14: 2(float) Load 6(b) + 15: 2(float) FAdd 13 14 + ReturnValue 15 + FunctionEnd + 11(foo(): 9(int) Function None 10 + 12: Label + ReturnValue 19 + FunctionEnd diff --git a/Test/baseResults/spv.ext.AnyHitShader.rahit.out b/Test/baseResults/spv.ext.AnyHitShader.rahit.out index 1d1d14a7..02803ad6 100755 --- a/Test/baseResults/spv.ext.AnyHitShader.rahit.out +++ b/Test/baseResults/spv.ext.AnyHitShader.rahit.out @@ -1,19 +1,22 @@ spv.ext.AnyHitShader.rahit // Module Version 10400 // Generated by (magic number): 8000b -// Id's are bound by 108 +// Id's are bound by 116 Capability GroupNonUniform Capability RayTracingKHR + Capability RayTracingPositionFetchKHR Capability RayCullMaskKHR Extension "SPV_KHR_ray_cull_mask" Extension "SPV_KHR_ray_tracing" + Extension "SPV_KHR_ray_tracing_position_fetch" 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint AnyHitKHR 4 "main" 11 14 20 23 26 33 36 39 42 47 50 53 58 64 67 70 82 85 99 + EntryPoint AnyHitKHR 4 "main" 11 14 20 23 26 33 36 39 42 47 50 53 58 64 67 70 82 88 93 107 Source GLSL 460 SourceExtension "GL_EXT_ray_cull_mask" SourceExtension "GL_EXT_ray_tracing" + SourceExtension "GL_EXT_ray_tracing_position_fetch" SourceExtension "GL_KHR_shader_subgroup_basic" Name 4 "main" Name 9 "v0" @@ -52,8 +55,10 @@ spv.ext.AnyHitShader.rahit Name 78 "v17" Name 81 "v18" Name 82 "gl_CullMaskEXT" - Name 85 "incomingPayload" - Name 99 "gl_SubgroupSize" + Name 84 "v19" + Name 88 "gl_HitTriangleVertexPositionsEXT" + Name 93 "incomingPayload" + Name 107 "gl_SubgroupSize" Decorate 11(gl_LaunchIDEXT) BuiltIn LaunchIdKHR Decorate 14(gl_LaunchSizeEXT) BuiltIn LaunchSizeKHR Decorate 20(gl_PrimitiveID) BuiltIn PrimitiveId @@ -71,10 +76,11 @@ spv.ext.AnyHitShader.rahit Decorate 67(gl_WorldToObjectEXT) BuiltIn WorldToObjectKHR Decorate 70(gl_GeometryIndexEXT) BuiltIn RayGeometryIndexKHR Decorate 82(gl_CullMaskEXT) BuiltIn CullMaskKHR - Decorate 99(gl_SubgroupSize) RelaxedPrecision - Decorate 99(gl_SubgroupSize) BuiltIn SubgroupSize - Decorate 100 RelaxedPrecision - Decorate 101 RelaxedPrecision + Decorate 88(gl_HitTriangleVertexPositionsEXT) BuiltIn HitTriangleVertexPositionsKHR + Decorate 107(gl_SubgroupSize) RelaxedPrecision + Decorate 107(gl_SubgroupSize) BuiltIn SubgroupSize + Decorate 108 RelaxedPrecision + Decorate 109 RelaxedPrecision 2: TypeVoid 3: TypeFunction 2 6: TypeInt 32 0 @@ -115,15 +121,20 @@ spv.ext.AnyHitShader.rahit 73: TypeMatrix 72(fvec4) 3 74: TypePointer Function 73 82(gl_CullMaskEXT): 57(ptr) Variable Input - 84: TypePointer IncomingRayPayloadKHR 72(fvec4) -85(incomingPayload): 84(ptr) Variable IncomingRayPayloadKHR - 86: 28(float) Constant 1056964608 - 87: 72(fvec4) ConstantComposite 86 86 86 86 - 89: 16(int) Constant 1 - 90: TypeBool - 95: 6(int) Constant 0 -99(gl_SubgroupSize): 57(ptr) Variable Input - 102: TypePointer IncomingRayPayloadKHR 28(float) + 85: 6(int) Constant 3 + 86: TypeArray 29(fvec3) 85 + 87: TypePointer Input 86 +88(gl_HitTriangleVertexPositionsEXT): 87(ptr) Variable Input + 89: 16(int) Constant 0 + 92: TypePointer IncomingRayPayloadKHR 72(fvec4) +93(incomingPayload): 92(ptr) Variable IncomingRayPayloadKHR + 94: 28(float) Constant 1056964608 + 95: 72(fvec4) ConstantComposite 94 94 94 94 + 97: 16(int) Constant 1 + 98: TypeBool + 103: 6(int) Constant 0 +107(gl_SubgroupSize): 57(ptr) Variable Input + 110: TypePointer IncomingRayPayloadKHR 28(float) 4(main): 2 Function None 3 5: Label 9(v0): 8(ptr) Variable Function @@ -145,6 +156,7 @@ spv.ext.AnyHitShader.rahit 75(v16): 74(ptr) Variable Function 78(v17): 74(ptr) Variable Function 81(v18): 55(ptr) Variable Function + 84(v19): 30(ptr) Variable Function 12: 7(ivec3) Load 11(gl_LaunchIDEXT) Store 9(v0) 12 15: 7(ivec3) Load 14(gl_LaunchSizeEXT) @@ -185,20 +197,23 @@ spv.ext.AnyHitShader.rahit Store 78(v17) 80 83: 6(int) Load 82(gl_CullMaskEXT) Store 81(v18) 83 - Store 85(incomingPayload) 87 - 88: 16(int) Load 18(v2) - 91: 90(bool) IEqual 88 89 - SelectionMerge 93 None - BranchConditional 91 92 93 - 92: Label + 90: 32(ptr) AccessChain 88(gl_HitTriangleVertexPositionsEXT) 89 + 91: 29(fvec3) Load 90 + Store 84(v19) 91 + Store 93(incomingPayload) 95 + 96: 16(int) Load 18(v2) + 99: 98(bool) IEqual 96 97 + SelectionMerge 101 None + BranchConditional 99 100 101 + 100: Label IgnoreIntersectionKHR - 93: Label - 100: 6(int) Load 99(gl_SubgroupSize) - 101: 28(float) ConvertUToF 100 - 103: 102(ptr) AccessChain 85(incomingPayload) 95 - 104: 28(float) Load 103 - 105: 28(float) FAdd 104 101 - 106: 102(ptr) AccessChain 85(incomingPayload) 95 - Store 106 105 + 101: Label + 108: 6(int) Load 107(gl_SubgroupSize) + 109: 28(float) ConvertUToF 108 + 111: 110(ptr) AccessChain 93(incomingPayload) 103 + 112: 28(float) Load 111 + 113: 28(float) FAdd 112 109 + 114: 110(ptr) AccessChain 93(incomingPayload) 103 + Store 114 113 TerminateRayKHR FunctionEnd diff --git a/Test/baseResults/spv.ext.ClosestHitShader.rchit.out b/Test/baseResults/spv.ext.ClosestHitShader.rchit.out index 73a23811..5cfc8a25 100755 --- a/Test/baseResults/spv.ext.ClosestHitShader.rchit.out +++ b/Test/baseResults/spv.ext.ClosestHitShader.rchit.out @@ -1,18 +1,21 @@ spv.ext.ClosestHitShader.rchit // Module Version 10400 // Generated by (magic number): 8000b -// Id's are bound by 102 +// Id's are bound by 109 Capability RayTracingKHR + Capability RayTracingPositionFetchKHR Capability RayCullMaskKHR Extension "SPV_KHR_ray_cull_mask" Extension "SPV_KHR_ray_tracing" + Extension "SPV_KHR_ray_tracing_position_fetch" 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint ClosestHitKHR 4 "main" 11 14 20 23 26 33 36 39 42 47 50 53 58 64 67 70 82 86 99 101 + EntryPoint ClosestHitKHR 4 "main" 11 14 20 23 26 33 36 39 42 47 50 53 58 64 67 70 82 88 94 106 108 Source GLSL 460 SourceExtension "GL_EXT_ray_cull_mask" SourceExtension "GL_EXT_ray_tracing" + SourceExtension "GL_EXT_ray_tracing_position_fetch" Name 4 "main" Name 9 "v0" Name 11 "gl_LaunchIDEXT" @@ -50,9 +53,11 @@ spv.ext.ClosestHitShader.rchit Name 78 "v17" Name 81 "v18" Name 82 "gl_CullMaskEXT" - Name 86 "accEXT" - Name 99 "incomingPayload" - Name 101 "localPayload" + Name 84 "v19" + Name 88 "gl_HitTriangleVertexPositionsEXT" + Name 94 "accEXT" + Name 106 "incomingPayload" + Name 108 "localPayload" Decorate 11(gl_LaunchIDEXT) BuiltIn LaunchIdKHR Decorate 14(gl_LaunchSizeEXT) BuiltIn LaunchSizeKHR Decorate 20(gl_PrimitiveID) BuiltIn PrimitiveId @@ -70,8 +75,9 @@ spv.ext.ClosestHitShader.rchit Decorate 67(gl_WorldToObjectEXT) BuiltIn WorldToObjectKHR Decorate 70(gl_GeometryIndexEXT) BuiltIn RayGeometryIndexKHR Decorate 82(gl_CullMaskEXT) BuiltIn CullMaskKHR - Decorate 86(accEXT) DescriptorSet 0 - Decorate 86(accEXT) Binding 0 + Decorate 88(gl_HitTriangleVertexPositionsEXT) BuiltIn HitTriangleVertexPositionsKHR + Decorate 94(accEXT) DescriptorSet 0 + Decorate 94(accEXT) Binding 0 2: TypeVoid 3: TypeFunction 2 6: TypeInt 32 0 @@ -112,23 +118,27 @@ spv.ext.ClosestHitShader.rchit 73: TypeMatrix 72(fvec4) 3 74: TypePointer Function 73 82(gl_CullMaskEXT): 57(ptr) Variable Input - 84: TypeAccelerationStructureKHR - 85: TypePointer UniformConstant 84 - 86(accEXT): 85(ptr) Variable UniformConstant - 88: 6(int) Constant 0 - 89: 6(int) Constant 1 - 90: 6(int) Constant 2 - 91: 6(int) Constant 3 - 92: 28(float) Constant 1056964608 - 93: 29(fvec3) ConstantComposite 92 92 92 - 94: 28(float) Constant 1065353216 - 95: 29(fvec3) ConstantComposite 94 94 94 - 96: 28(float) Constant 1061158912 - 97: 16(int) Constant 1 - 98: TypePointer IncomingRayPayloadKHR 72(fvec4) -99(incomingPayload): 98(ptr) Variable IncomingRayPayloadKHR - 100: TypePointer RayPayloadKHR 72(fvec4) -101(localPayload): 100(ptr) Variable RayPayloadKHR + 85: 6(int) Constant 3 + 86: TypeArray 29(fvec3) 85 + 87: TypePointer Input 86 +88(gl_HitTriangleVertexPositionsEXT): 87(ptr) Variable Input + 89: 16(int) Constant 0 + 92: TypeAccelerationStructureKHR + 93: TypePointer UniformConstant 92 + 94(accEXT): 93(ptr) Variable UniformConstant + 96: 6(int) Constant 0 + 97: 6(int) Constant 1 + 98: 6(int) Constant 2 + 99: 28(float) Constant 1056964608 + 100: 29(fvec3) ConstantComposite 99 99 99 + 101: 28(float) Constant 1065353216 + 102: 29(fvec3) ConstantComposite 101 101 101 + 103: 28(float) Constant 1061158912 + 104: 16(int) Constant 1 + 105: TypePointer IncomingRayPayloadKHR 72(fvec4) +106(incomingPayload): 105(ptr) Variable IncomingRayPayloadKHR + 107: TypePointer RayPayloadKHR 72(fvec4) +108(localPayload): 107(ptr) Variable RayPayloadKHR 4(main): 2 Function None 3 5: Label 9(v0): 8(ptr) Variable Function @@ -150,6 +160,7 @@ spv.ext.ClosestHitShader.rchit 75(v16): 74(ptr) Variable Function 78(v17): 74(ptr) Variable Function 81(v18): 55(ptr) Variable Function + 84(v19): 30(ptr) Variable Function 12: 7(ivec3) Load 11(gl_LaunchIDEXT) Store 9(v0) 12 15: 7(ivec3) Load 14(gl_LaunchSizeEXT) @@ -190,7 +201,10 @@ spv.ext.ClosestHitShader.rchit Store 78(v17) 80 83: 6(int) Load 82(gl_CullMaskEXT) Store 81(v18) 83 - 87: 84 Load 86(accEXT) - TraceRayKHR 87 88 89 90 91 88 93 92 95 96 99(incomingPayload) + 90: 32(ptr) AccessChain 88(gl_HitTriangleVertexPositionsEXT) 89 + 91: 29(fvec3) Load 90 + Store 84(v19) 91 + 95: 92 Load 94(accEXT) + TraceRayKHR 95 96 97 98 85 96 100 99 102 103 106(incomingPayload) Return FunctionEnd diff --git a/Test/baseResults/spv.ext.ShaderTileImage.color.frag.out b/Test/baseResults/spv.ext.ShaderTileImage.color.frag.out new file mode 100755 index 00000000..942a850c --- /dev/null +++ b/Test/baseResults/spv.ext.ShaderTileImage.color.frag.out @@ -0,0 +1,38 @@ +spv.ext.ShaderTileImage.color.frag +WARNING: 0:6: '' : all default precisions are highp; use precision statements to quiet warning, e.g.: + "precision mediump int; precision highp float;" + +// Module Version 10000 +// Generated by (magic number): 8000b +// Id's are bound by 15 + + Capability Shader + Capability TileImageColorReadAccessEXT + Extension "SPV_EXT_shader_tile_image" + 1: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint Fragment 4 "main" 9 + ExecutionMode 4 OriginUpperLeft + Source GLSL 460 + SourceExtension "GL_EXT_shader_tile_image" + Name 4 "main" + Name 9 "out_color" + Name 12 "in_color" + Decorate 9(out_color) Location 0 + Decorate 12(in_color) Location 1 + 2: TypeVoid + 3: TypeFunction 2 + 6: TypeFloat 32 + 7: TypeVector 6(float) 4 + 8: TypePointer Output 7(fvec4) + 9(out_color): 8(ptr) Variable Output + 10: TypeImage 6(float) TileImageDataEXT nonsampled format:Unknown + 11: TypePointer TileImageEXT 10 + 12(in_color): 11(ptr) Variable TileImageEXT + 4(main): 2 Function None 3 + 5: Label + 13: 10 Load 12(in_color) + 14: 7(fvec4) ColorAttachmentReadEXT 13 + Store 9(out_color) 14 + Return + FunctionEnd diff --git a/Test/baseResults/spv.ext.ShaderTileImage.depth_stencil.frag.out b/Test/baseResults/spv.ext.ShaderTileImage.depth_stencil.frag.out new file mode 100755 index 00000000..0dcf0148 --- /dev/null +++ b/Test/baseResults/spv.ext.ShaderTileImage.depth_stencil.frag.out @@ -0,0 +1,56 @@ +spv.ext.ShaderTileImage.depth_stencil.frag +WARNING: 0:6: '' : all default precisions are highp; use precision statements to quiet warning, e.g.: + "precision mediump int; precision highp float;" + +// Module Version 10000 +// Generated by (magic number): 8000b +// Id's are bound by 26 + + Capability Shader + Capability TileImageDepthReadAccessEXT + Capability TileImageStencilReadAccessEXT + Extension "SPV_EXT_shader_tile_image" + 1: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint Fragment 4 "main" 16 22 + ExecutionMode 4 OriginUpperLeft + Source GLSL 460 + SourceExtension "GL_EXT_shader_tile_image" + Name 4 "main" + Name 8 "depth" + Name 12 "stencil_value" + Name 16 "stencil_out" + Name 22 "depth_out" + Decorate 13 RelaxedPrecision + Decorate 16(stencil_out) Location 0 + Decorate 22(depth_out) Location 1 + 2: TypeVoid + 3: TypeFunction 2 + 6: TypeFloat 32 + 7: TypePointer Function 6(float) + 10: TypeInt 32 0 + 11: TypePointer Function 10(int) + 14: TypeVector 10(int) 4 + 15: TypePointer Output 14(ivec4) + 16(stencil_out): 15(ptr) Variable Output + 18: 10(int) Constant 0 + 20: TypeVector 6(float) 4 + 21: TypePointer Output 20(fvec4) + 22(depth_out): 21(ptr) Variable Output + 24: 6(float) Constant 0 + 4(main): 2 Function None 3 + 5: Label + 8(depth): 7(ptr) Variable Function +12(stencil_value): 11(ptr) Variable Function + 9: 6(float) DepthAttachmentReadEXT + Store 8(depth) 9 + 13: 10(int) StencilAttachmentReadEXT + Store 12(stencil_value) 13 + 17: 10(int) Load 12(stencil_value) + 19: 14(ivec4) CompositeConstruct 17 18 18 18 + Store 16(stencil_out) 19 + 23: 6(float) Load 8(depth) + 25: 20(fvec4) CompositeConstruct 23 24 24 24 + Store 22(depth_out) 25 + Return + FunctionEnd diff --git a/Test/baseResults/spv.ext.ShaderTileImage.overlap.frag.out b/Test/baseResults/spv.ext.ShaderTileImage.overlap.frag.out new file mode 100755 index 00000000..e7af4213 --- /dev/null +++ b/Test/baseResults/spv.ext.ShaderTileImage.overlap.frag.out @@ -0,0 +1,6 @@ +spv.ext.ShaderTileImage.overlap.frag +ERROR: 0:8: 'location' : overlapping use of location 1 +ERROR: 1 compilation errors. No code generated. + + +SPIR-V is not generated for failed compile or link diff --git a/Test/baseResults/spv.ext.ShaderTileImage.subpassinput.frag.out b/Test/baseResults/spv.ext.ShaderTileImage.subpassinput.frag.out new file mode 100755 index 00000000..0f08f492 --- /dev/null +++ b/Test/baseResults/spv.ext.ShaderTileImage.subpassinput.frag.out @@ -0,0 +1,6 @@ +spv.ext.ShaderTileImage.subpassinput.frag +ERROR: 0:6: 'subpassInput' : can not be used with GL_EXT_shader_tile_image enabled +ERROR: 1 compilation errors. No code generated. + + +SPIR-V is not generated for failed compile or link diff --git a/Test/baseResults/spv.ext.ShaderTileImage.typemismatch.frag.out b/Test/baseResults/spv.ext.ShaderTileImage.typemismatch.frag.out new file mode 100755 index 00000000..e91ffb73 --- /dev/null +++ b/Test/baseResults/spv.ext.ShaderTileImage.typemismatch.frag.out @@ -0,0 +1,6 @@ +spv.ext.ShaderTileImage.typemismatch.frag +ERROR: 0:7: 'location' : fragment outputs or tileImageEXTs sharing the same location 0 must be the same basic type +ERROR: 1 compilation errors. No code generated. + + +SPIR-V is not generated for failed compile or link diff --git a/Test/baseResults/spv.ext.ShaderTileImage.wronglayout.frag.out b/Test/baseResults/spv.ext.ShaderTileImage.wronglayout.frag.out new file mode 100755 index 00000000..aa3a1982 --- /dev/null +++ b/Test/baseResults/spv.ext.ShaderTileImage.wronglayout.frag.out @@ -0,0 +1,9 @@ +spv.ext.ShaderTileImage.wronglayout.frag +ERROR: 0:7: 'binding' : requires uniform or buffer storage qualifier +ERROR: 0:7: 'set' : cannot be used with tileImageEXT +ERROR: 0:7: 'tileImageEXT' : can only be used with an explicit location +ERROR: 0:7: 'input_attachment_index' : can only be used with a subpass +ERROR: 4 compilation errors. No code generated. + + +SPIR-V is not generated for failed compile or link diff --git a/Test/baseResults/spv.ext.meshShaderBuiltins.mesh.out b/Test/baseResults/spv.ext.meshShaderBuiltins.mesh.out index 4db61129..a1d71a5b 100755 --- a/Test/baseResults/spv.ext.meshShaderBuiltins.mesh.out +++ b/Test/baseResults/spv.ext.meshShaderBuiltins.mesh.out @@ -5,12 +5,10 @@ spv.ext.meshShaderBuiltins.mesh Capability ClipDistance Capability CullDistance - Capability FragmentShadingRateKHR Capability DrawParameters Capability MultiView Capability MeshShadingEXT Extension "SPV_EXT_mesh_shader" - Extension "SPV_KHR_fragment_shading_rate" 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 EntryPoint MeshEXT 4 "main" 13 19 24 41 93 134 152 155 @@ -43,7 +41,6 @@ spv.ext.meshShaderBuiltins.mesh MemberName 90(gl_MeshPerPrimitiveEXT) 1 "gl_Layer" MemberName 90(gl_MeshPerPrimitiveEXT) 2 "gl_ViewportIndex" MemberName 90(gl_MeshPerPrimitiveEXT) 3 "gl_CullPrimitiveEXT" - MemberName 90(gl_MeshPerPrimitiveEXT) 4 "gl_PrimitiveShadingRateEXT" Name 93 "gl_MeshPrimitivesEXT" Name 134 "gl_PrimitiveTriangleIndicesEXT" Name 150 "id" @@ -66,8 +63,6 @@ spv.ext.meshShaderBuiltins.mesh MemberDecorate 90(gl_MeshPerPrimitiveEXT) 2 BuiltIn ViewportIndex MemberDecorate 90(gl_MeshPerPrimitiveEXT) 3 PerPrimitiveNV MemberDecorate 90(gl_MeshPerPrimitiveEXT) 3 BuiltIn CullPrimitiveEXT - MemberDecorate 90(gl_MeshPerPrimitiveEXT) 4 PerPrimitiveNV - MemberDecorate 90(gl_MeshPerPrimitiveEXT) 4 BuiltIn PrimitiveShadingRateKHR Decorate 90(gl_MeshPerPrimitiveEXT) Block Decorate 134(gl_PrimitiveTriangleIndicesEXT) BuiltIn PrimitiveTriangleIndicesEXT Decorate 152(gl_DrawIDARB) BuiltIn DrawIndex @@ -113,7 +108,7 @@ spv.ext.meshShaderBuiltins.mesh 63: 8(int) Constant 264 64: 8(int) Constant 2 89: TypeBool -90(gl_MeshPerPrimitiveEXT): TypeStruct 43(int) 43(int) 43(int) 89(bool) 43(int) +90(gl_MeshPerPrimitiveEXT): TypeStruct 43(int) 43(int) 43(int) 89(bool) 91: TypeArray 90(gl_MeshPerPrimitiveEXT) 29 92: TypePointer Output 91 93(gl_MeshPrimitivesEXT): 92(ptr) Variable Output diff --git a/Test/baseResults/spv.ext.meshShaderBuiltinsShadingRate.mesh.out b/Test/baseResults/spv.ext.meshShaderBuiltinsShadingRate.mesh.out new file mode 100755 index 00000000..65bd740d --- /dev/null +++ b/Test/baseResults/spv.ext.meshShaderBuiltinsShadingRate.mesh.out @@ -0,0 +1,281 @@ +spv.ext.meshShaderBuiltinsShadingRate.mesh +// Module Version 10400 +// Generated by (magic number): 8000b +// Id's are bound by 164 + + Capability ClipDistance + Capability CullDistance + Capability FragmentShadingRateKHR + Capability DrawParameters + Capability MultiView + Capability MeshShadingEXT + Extension "SPV_EXT_mesh_shader" + Extension "SPV_KHR_fragment_shading_rate" + 1: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint MeshEXT 4 "main" 13 19 24 41 93 140 158 161 + ExecutionMode 4 LocalSize 32 1 1 + ExecutionMode 4 OutputVertices 81 + ExecutionMode 4 OutputPrimitivesNV 32 + ExecutionMode 4 OutputTrianglesNV + Source GLSL 460 + SourceExtension "GL_ARB_shader_draw_parameters" + SourceExtension "GL_EXT_fragment_shading_rate" + SourceExtension "GL_EXT_mesh_shader" + SourceExtension "GL_EXT_multiview" + Name 4 "main" + Name 6 "testAdditionalBuiltins(" + Name 10 "iid" + Name 13 "gl_LocalInvocationID" + Name 18 "gid" + Name 19 "gl_WorkGroupID" + Name 23 "numWorkGrous" + Name 24 "gl_NumWorkGroups" + Name 26 "vertexCount" + Name 28 "primitiveCount" + Name 38 "gl_MeshPerVertexEXT" + MemberName 38(gl_MeshPerVertexEXT) 0 "gl_Position" + MemberName 38(gl_MeshPerVertexEXT) 1 "gl_PointSize" + MemberName 38(gl_MeshPerVertexEXT) 2 "gl_ClipDistance" + MemberName 38(gl_MeshPerVertexEXT) 3 "gl_CullDistance" + Name 41 "gl_MeshVerticesEXT" + Name 90 "gl_MeshPerPrimitiveEXT" + MemberName 90(gl_MeshPerPrimitiveEXT) 0 "gl_PrimitiveID" + MemberName 90(gl_MeshPerPrimitiveEXT) 1 "gl_Layer" + MemberName 90(gl_MeshPerPrimitiveEXT) 2 "gl_ViewportIndex" + MemberName 90(gl_MeshPerPrimitiveEXT) 3 "gl_CullPrimitiveEXT" + MemberName 90(gl_MeshPerPrimitiveEXT) 4 "gl_PrimitiveShadingRateEXT" + Name 93 "gl_MeshPrimitivesEXT" + Name 140 "gl_PrimitiveTriangleIndicesEXT" + Name 156 "id" + Name 158 "gl_DrawIDARB" + Name 160 "viewIdx" + Name 161 "gl_ViewIndex" + Decorate 13(gl_LocalInvocationID) BuiltIn LocalInvocationId + Decorate 19(gl_WorkGroupID) BuiltIn WorkgroupId + Decorate 24(gl_NumWorkGroups) BuiltIn NumWorkgroups + MemberDecorate 38(gl_MeshPerVertexEXT) 0 BuiltIn Position + MemberDecorate 38(gl_MeshPerVertexEXT) 1 BuiltIn PointSize + MemberDecorate 38(gl_MeshPerVertexEXT) 2 BuiltIn ClipDistance + MemberDecorate 38(gl_MeshPerVertexEXT) 3 BuiltIn CullDistance + Decorate 38(gl_MeshPerVertexEXT) Block + MemberDecorate 90(gl_MeshPerPrimitiveEXT) 0 PerPrimitiveNV + MemberDecorate 90(gl_MeshPerPrimitiveEXT) 0 BuiltIn PrimitiveId + MemberDecorate 90(gl_MeshPerPrimitiveEXT) 1 PerPrimitiveNV + MemberDecorate 90(gl_MeshPerPrimitiveEXT) 1 BuiltIn Layer + MemberDecorate 90(gl_MeshPerPrimitiveEXT) 2 PerPrimitiveNV + MemberDecorate 90(gl_MeshPerPrimitiveEXT) 2 BuiltIn ViewportIndex + MemberDecorate 90(gl_MeshPerPrimitiveEXT) 3 PerPrimitiveNV + MemberDecorate 90(gl_MeshPerPrimitiveEXT) 3 BuiltIn CullPrimitiveEXT + MemberDecorate 90(gl_MeshPerPrimitiveEXT) 4 PerPrimitiveNV + MemberDecorate 90(gl_MeshPerPrimitiveEXT) 4 BuiltIn PrimitiveShadingRateKHR + Decorate 90(gl_MeshPerPrimitiveEXT) Block + Decorate 140(gl_PrimitiveTriangleIndicesEXT) BuiltIn PrimitiveTriangleIndicesEXT + Decorate 158(gl_DrawIDARB) BuiltIn DrawIndex + Decorate 161(gl_ViewIndex) BuiltIn ViewIndex + Decorate 163 BuiltIn WorkgroupSize + 2: TypeVoid + 3: TypeFunction 2 + 8: TypeInt 32 0 + 9: TypePointer Function 8(int) + 11: TypeVector 8(int) 3 + 12: TypePointer Input 11(ivec3) +13(gl_LocalInvocationID): 12(ptr) Variable Input + 14: 8(int) Constant 0 + 15: TypePointer Input 8(int) +19(gl_WorkGroupID): 12(ptr) Variable Input + 22: TypePointer Function 11(ivec3) +24(gl_NumWorkGroups): 12(ptr) Variable Input + 27: 8(int) Constant 81 + 29: 8(int) Constant 32 + 32: TypeFloat 32 + 33: TypeVector 32(float) 4 + 34: 8(int) Constant 4 + 35: TypeArray 32(float) 34 + 36: 8(int) Constant 3 + 37: TypeArray 32(float) 36 +38(gl_MeshPerVertexEXT): TypeStruct 33(fvec4) 32(float) 35 37 + 39: TypeArray 38(gl_MeshPerVertexEXT) 27 + 40: TypePointer Output 39 +41(gl_MeshVerticesEXT): 40(ptr) Variable Output + 43: TypeInt 32 1 + 44: 43(int) Constant 0 + 45: 32(float) Constant 1065353216 + 46: 33(fvec4) ConstantComposite 45 45 45 45 + 47: TypePointer Output 33(fvec4) + 50: 43(int) Constant 1 + 51: 32(float) Constant 1073741824 + 52: TypePointer Output 32(float) + 55: 43(int) Constant 2 + 56: 43(int) Constant 3 + 57: 32(float) Constant 1077936128 + 60: 32(float) Constant 1082130432 + 62: 8(int) Constant 1 + 63: 8(int) Constant 264 + 64: 8(int) Constant 2 + 89: TypeBool +90(gl_MeshPerPrimitiveEXT): TypeStruct 43(int) 43(int) 43(int) 89(bool) 43(int) + 91: TypeArray 90(gl_MeshPerPrimitiveEXT) 29 + 92: TypePointer Output 91 +93(gl_MeshPrimitivesEXT): 92(ptr) Variable Output + 95: 43(int) Constant 6 + 96: TypePointer Output 43(int) + 99: 43(int) Constant 7 + 102: 43(int) Constant 8 + 105: 89(bool) ConstantFalse + 106: TypePointer Output 89(bool) + 109: 43(int) Constant 4 + 138: TypeArray 11(ivec3) 29 + 139: TypePointer Output 138 +140(gl_PrimitiveTriangleIndicesEXT): 139(ptr) Variable Output + 141: 8(int) Constant 257 + 142: 11(ivec3) ConstantComposite 141 141 141 + 143: TypePointer Output 11(ivec3) + 147: 11(ivec3) ConstantComposite 64 64 64 + 155: TypePointer Function 43(int) + 157: TypePointer Input 43(int) +158(gl_DrawIDARB): 157(ptr) Variable Input +161(gl_ViewIndex): 157(ptr) Variable Input + 163: 11(ivec3) ConstantComposite 29 62 62 + 4(main): 2 Function None 3 + 5: Label + 10(iid): 9(ptr) Variable Function + 18(gid): 9(ptr) Variable Function +23(numWorkGrous): 22(ptr) Variable Function + 26(vertexCount): 9(ptr) Variable Function +28(primitiveCount): 9(ptr) Variable Function + 16: 15(ptr) AccessChain 13(gl_LocalInvocationID) 14 + 17: 8(int) Load 16 + Store 10(iid) 17 + 20: 15(ptr) AccessChain 19(gl_WorkGroupID) 14 + 21: 8(int) Load 20 + Store 18(gid) 21 + 25: 11(ivec3) Load 24(gl_NumWorkGroups) + Store 23(numWorkGrous) 25 + Store 26(vertexCount) 27 + Store 28(primitiveCount) 29 + 30: 8(int) Load 26(vertexCount) + 31: 8(int) Load 28(primitiveCount) + SetMeshOutputsEXT 30 31 + 42: 8(int) Load 10(iid) + 48: 47(ptr) AccessChain 41(gl_MeshVerticesEXT) 42 44 + Store 48 46 + 49: 8(int) Load 10(iid) + 53: 52(ptr) AccessChain 41(gl_MeshVerticesEXT) 49 50 + Store 53 51 + 54: 8(int) Load 10(iid) + 58: 52(ptr) AccessChain 41(gl_MeshVerticesEXT) 54 55 56 + Store 58 57 + 59: 8(int) Load 10(iid) + 61: 52(ptr) AccessChain 41(gl_MeshVerticesEXT) 59 56 55 + Store 61 60 + MemoryBarrier 62 63 + ControlBarrier 64 64 63 + 65: 8(int) Load 10(iid) + 66: 8(int) IAdd 65 62 + 67: 8(int) Load 10(iid) + 68: 47(ptr) AccessChain 41(gl_MeshVerticesEXT) 67 44 + 69: 33(fvec4) Load 68 + 70: 47(ptr) AccessChain 41(gl_MeshVerticesEXT) 66 44 + Store 70 69 + 71: 8(int) Load 10(iid) + 72: 8(int) IAdd 71 62 + 73: 8(int) Load 10(iid) + 74: 52(ptr) AccessChain 41(gl_MeshVerticesEXT) 73 50 + 75: 32(float) Load 74 + 76: 52(ptr) AccessChain 41(gl_MeshVerticesEXT) 72 50 + Store 76 75 + 77: 8(int) Load 10(iid) + 78: 8(int) IAdd 77 62 + 79: 8(int) Load 10(iid) + 80: 52(ptr) AccessChain 41(gl_MeshVerticesEXT) 79 55 56 + 81: 32(float) Load 80 + 82: 52(ptr) AccessChain 41(gl_MeshVerticesEXT) 78 55 56 + Store 82 81 + 83: 8(int) Load 10(iid) + 84: 8(int) IAdd 83 62 + 85: 8(int) Load 10(iid) + 86: 52(ptr) AccessChain 41(gl_MeshVerticesEXT) 85 56 55 + 87: 32(float) Load 86 + 88: 52(ptr) AccessChain 41(gl_MeshVerticesEXT) 84 56 55 + Store 88 87 + MemoryBarrier 62 63 + ControlBarrier 64 64 63 + 94: 8(int) Load 10(iid) + 97: 96(ptr) AccessChain 93(gl_MeshPrimitivesEXT) 94 44 + Store 97 95 + 98: 8(int) Load 10(iid) + 100: 96(ptr) AccessChain 93(gl_MeshPrimitivesEXT) 98 50 + Store 100 99 + 101: 8(int) Load 10(iid) + 103: 96(ptr) AccessChain 93(gl_MeshPrimitivesEXT) 101 55 + Store 103 102 + 104: 8(int) Load 10(iid) + 107: 106(ptr) AccessChain 93(gl_MeshPrimitivesEXT) 104 56 + Store 107 105 + 108: 8(int) Load 10(iid) + 110: 96(ptr) AccessChain 93(gl_MeshPrimitivesEXT) 108 109 + Store 110 44 + MemoryBarrier 62 63 + ControlBarrier 64 64 63 + 111: 8(int) Load 10(iid) + 112: 8(int) IAdd 111 62 + 113: 8(int) Load 10(iid) + 114: 96(ptr) AccessChain 93(gl_MeshPrimitivesEXT) 113 44 + 115: 43(int) Load 114 + 116: 96(ptr) AccessChain 93(gl_MeshPrimitivesEXT) 112 44 + Store 116 115 + 117: 8(int) Load 10(iid) + 118: 8(int) IAdd 117 62 + 119: 8(int) Load 10(iid) + 120: 96(ptr) AccessChain 93(gl_MeshPrimitivesEXT) 119 50 + 121: 43(int) Load 120 + 122: 96(ptr) AccessChain 93(gl_MeshPrimitivesEXT) 118 50 + Store 122 121 + 123: 8(int) Load 10(iid) + 124: 8(int) IAdd 123 62 + 125: 8(int) Load 10(iid) + 126: 96(ptr) AccessChain 93(gl_MeshPrimitivesEXT) 125 55 + 127: 43(int) Load 126 + 128: 96(ptr) AccessChain 93(gl_MeshPrimitivesEXT) 124 55 + Store 128 127 + 129: 8(int) Load 10(iid) + 130: 8(int) IAdd 129 62 + 131: 8(int) Load 10(iid) + 132: 106(ptr) AccessChain 93(gl_MeshPrimitivesEXT) 131 56 + 133: 89(bool) Load 132 + 134: 106(ptr) AccessChain 93(gl_MeshPrimitivesEXT) 130 56 + Store 134 133 + 135: 8(int) Load 10(iid) + 136: 8(int) IAdd 135 62 + 137: 96(ptr) AccessChain 93(gl_MeshPrimitivesEXT) 136 109 + Store 137 44 + MemoryBarrier 62 63 + ControlBarrier 64 64 63 + 144: 143(ptr) AccessChain 140(gl_PrimitiveTriangleIndicesEXT) 44 + Store 144 142 + 145: 8(int) Load 28(primitiveCount) + 146: 8(int) ISub 145 62 + 148: 143(ptr) AccessChain 140(gl_PrimitiveTriangleIndicesEXT) 146 + Store 148 147 + 149: 8(int) Load 18(gid) + 150: 8(int) Load 18(gid) + 151: 8(int) ISub 150 62 + 152: 143(ptr) AccessChain 140(gl_PrimitiveTriangleIndicesEXT) 151 + 153: 11(ivec3) Load 152 + 154: 143(ptr) AccessChain 140(gl_PrimitiveTriangleIndicesEXT) 149 + Store 154 153 + MemoryBarrier 62 63 + ControlBarrier 64 64 63 + Return + FunctionEnd +6(testAdditionalBuiltins(): 2 Function None 3 + 7: Label + 156(id): 155(ptr) Variable Function + 160(viewIdx): 155(ptr) Variable Function + 159: 43(int) Load 158(gl_DrawIDARB) + Store 156(id) 159 + 162: 43(int) Load 161(gl_ViewIndex) + Store 160(viewIdx) 162 + Return + FunctionEnd diff --git a/Test/baseResults/spv.ext.meshShaderRedeclBuiltins.mesh.out b/Test/baseResults/spv.ext.meshShaderRedeclBuiltins.mesh.out index a331a471..35773007 100755 --- a/Test/baseResults/spv.ext.meshShaderRedeclBuiltins.mesh.out +++ b/Test/baseResults/spv.ext.meshShaderRedeclBuiltins.mesh.out @@ -5,10 +5,8 @@ spv.ext.meshShaderRedeclBuiltins.mesh Capability ClipDistance Capability CullDistance - Capability FragmentShadingRateKHR Capability MeshShadingEXT Extension "SPV_EXT_mesh_shader" - Extension "SPV_KHR_fragment_shading_rate" 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 EntryPoint MeshEXT 4 "main" 11 17 29 81 122 @@ -34,7 +32,6 @@ spv.ext.meshShaderRedeclBuiltins.mesh MemberName 78(gl_MeshPerPrimitiveEXT) 1 "gl_Layer" MemberName 78(gl_MeshPerPrimitiveEXT) 2 "gl_ViewportIndex" MemberName 78(gl_MeshPerPrimitiveEXT) 3 "gl_CullPrimitiveEXT" - MemberName 78(gl_MeshPerPrimitiveEXT) 4 "gl_PrimitiveShadingRateEXT" Name 81 "gl_MeshPrimitivesEXT" Name 122 "gl_PrimitivePointIndicesEXT" Decorate 11(gl_LocalInvocationID) BuiltIn LocalInvocationId @@ -52,8 +49,6 @@ spv.ext.meshShaderRedeclBuiltins.mesh MemberDecorate 78(gl_MeshPerPrimitiveEXT) 2 BuiltIn ViewportIndex MemberDecorate 78(gl_MeshPerPrimitiveEXT) 3 PerPrimitiveNV MemberDecorate 78(gl_MeshPerPrimitiveEXT) 3 BuiltIn CullPrimitiveEXT - MemberDecorate 78(gl_MeshPerPrimitiveEXT) 4 PerPrimitiveNV - MemberDecorate 78(gl_MeshPerPrimitiveEXT) 4 BuiltIn PrimitiveShadingRateKHR Decorate 78(gl_MeshPerPrimitiveEXT) Block Decorate 122(gl_PrimitivePointIndicesEXT) BuiltIn PrimitivePointIndicesEXT Decorate 127 BuiltIn WorkgroupSize @@ -93,7 +88,7 @@ spv.ext.meshShaderRedeclBuiltins.mesh 51: 6(int) Constant 264 52: 6(int) Constant 2 77: TypeBool -78(gl_MeshPerPrimitiveEXT): TypeStruct 31(int) 31(int) 31(int) 77(bool) 31(int) +78(gl_MeshPerPrimitiveEXT): TypeStruct 31(int) 31(int) 31(int) 77(bool) 79: TypeArray 78(gl_MeshPerPrimitiveEXT) 21 80: TypePointer Output 79 81(gl_MeshPrimitivesEXT): 80(ptr) Variable Output diff --git a/Test/baseResults/spv.ext.textureShadowLod.error.frag.out b/Test/baseResults/spv.ext.textureShadowLod.error.frag.out new file mode 100755 index 00000000..18adb059 --- /dev/null +++ b/Test/baseResults/spv.ext.textureShadowLod.error.frag.out @@ -0,0 +1,6 @@ +spv.ext.textureShadowLod.error.frag +ERROR: 0:11: 'textureLod(..., float lod)' : required extension not requested: GL_EXT_texture_shadow_lod +ERROR: 1 compilation errors. No code generated. + + +SPIR-V is not generated for failed compile or link diff --git a/Test/baseResults/spv.ext.textureShadowLod.frag.out b/Test/baseResults/spv.ext.textureShadowLod.frag.out new file mode 100755 index 00000000..ca4a8727 --- /dev/null +++ b/Test/baseResults/spv.ext.textureShadowLod.frag.out @@ -0,0 +1,89 @@ +spv.ext.textureShadowLod.frag +// Module Version 10000 +// Generated by (magic number): 8000b +// Id's are bound by 55 + + Capability Shader + Capability SampledCubeArray + 1: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint Fragment 4 "main" 8 16 + ExecutionMode 4 OriginUpperLeft + Source GLSL 450 + SourceExtension "GL_EXT_texture_shadow_lod" + Name 4 "main" + Name 8 "c" + Name 12 "s2da" + Name 16 "tc" + Name 24 "sca" + Name 43 "sc" + Decorate 8(c) Location 0 + Decorate 12(s2da) DescriptorSet 0 + Decorate 12(s2da) Binding 0 + Decorate 16(tc) Location 0 + Decorate 24(sca) DescriptorSet 0 + Decorate 24(sca) Binding 1 + Decorate 43(sc) DescriptorSet 0 + Decorate 43(sc) Binding 2 + 2: TypeVoid + 3: TypeFunction 2 + 6: TypeFloat 32 + 7: TypePointer Output 6(float) + 8(c): 7(ptr) Variable Output + 9: TypeImage 6(float) 2D depth array sampled format:Unknown + 10: TypeSampledImage 9 + 11: TypePointer UniformConstant 10 + 12(s2da): 11(ptr) Variable UniformConstant + 14: TypeVector 6(float) 4 + 15: TypePointer Input 14(fvec4) + 16(tc): 15(ptr) Variable Input + 18: 6(float) Constant 0 + 21: TypeImage 6(float) Cube depth array sampled format:Unknown + 22: TypeSampledImage 21 + 23: TypePointer UniformConstant 22 + 24(sca): 23(ptr) Variable UniformConstant + 30: TypeInt 32 1 + 31: TypeVector 30(int) 2 + 32: 30(int) Constant 0 + 33: 31(ivec2) ConstantComposite 32 32 + 40: TypeImage 6(float) Cube depth sampled format:Unknown + 41: TypeSampledImage 40 + 42: TypePointer UniformConstant 41 + 43(sc): 42(ptr) Variable UniformConstant + 4(main): 2 Function None 3 + 5: Label + 13: 10 Load 12(s2da) + 17: 14(fvec4) Load 16(tc) + 19: 6(float) CompositeExtract 17 3 + 20: 6(float) ImageSampleDrefImplicitLod 13 17 19 Bias 18 + Store 8(c) 20 + 25: 22 Load 24(sca) + 26: 14(fvec4) Load 16(tc) + 27: 6(float) ImageSampleDrefImplicitLod 25 26 18 + Store 8(c) 27 + 28: 10 Load 12(s2da) + 29: 14(fvec4) Load 16(tc) + 34: 6(float) CompositeExtract 29 3 + 35: 6(float) ImageSampleDrefImplicitLod 28 29 34 Bias ConstOffset 18 33 + Store 8(c) 35 + 36: 10 Load 12(s2da) + 37: 14(fvec4) Load 16(tc) + 38: 6(float) CompositeExtract 37 3 + 39: 6(float) ImageSampleDrefExplicitLod 36 37 38 Lod 18 + Store 8(c) 39 + 44: 41 Load 43(sc) + 45: 14(fvec4) Load 16(tc) + 46: 6(float) CompositeExtract 45 3 + 47: 6(float) ImageSampleDrefExplicitLod 44 45 46 Lod 18 + Store 8(c) 47 + 48: 22 Load 24(sca) + 49: 14(fvec4) Load 16(tc) + 50: 6(float) ImageSampleDrefExplicitLod 48 49 18 Lod 18 + Store 8(c) 50 + 51: 10 Load 12(s2da) + 52: 14(fvec4) Load 16(tc) + 53: 6(float) CompositeExtract 52 3 + 54: 6(float) ImageSampleDrefExplicitLod 51 52 53 Lod ConstOffset 18 33 + Store 8(c) 54 + Return + FunctionEnd diff --git a/Test/baseResults/spv.floatFetch.frag.out b/Test/baseResults/spv.floatFetch.frag.out new file mode 100755 index 00000000..8b9fc729 --- /dev/null +++ b/Test/baseResults/spv.floatFetch.frag.out @@ -0,0 +1,4423 @@ +spv.floatFetch.frag +Validation failed +// Module Version 10000 +// Generated by (magic number): 8000b +// Id's are bound by 3599 + + Capability Shader + Capability ImageGatherExtended + Capability StorageImageMultisample + Capability ImageCubeArray + Capability ImageRect + Capability SampledRect + Capability InputAttachment + Capability SparseResidency + Capability MinLod + Capability Sampled1D + Capability Image1D + Capability SampledCubeArray + Capability SampledBuffer + Capability ImageBuffer + Capability ImageMSArray + Capability ImageQuery + Capability ImageGatherBiasLodAMD + Extension "SPV_AMD_texture_gather_bias_lod" + 1: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint Fragment 4 "main" 127 138 150 197 283 371 866 874 882 2665 3590 3598 + ExecutionMode 4 OriginUpperLeft + Source GLSL 450 + SourceExtension "GL_AMD_texture_gather_bias_lod" + SourceExtension "GL_ARB_sparse_texture2" + SourceExtension "GL_ARB_sparse_texture_clamp" + Name 4 "main" + Name 9 "testTexture(" + Name 11 "testTextureProj(" + Name 13 "testTextureLod(" + Name 15 "testTextureOffset(" + Name 17 "testTextureProjOffset(" + Name 19 "testTextureLodOffset(" + Name 21 "testTextureProjLodOffset(" + Name 23 "testTexelFetch(" + Name 25 "testTexelFetchOffset(" + Name 27 "testTextureGrad(" + Name 29 "testTextureGradOffset(" + Name 31 "testTextureProjGrad(" + Name 33 "testTextureProjGradoffset(" + Name 35 "testTextureGather(" + Name 37 "testTextureGatherOffset(" + Name 39 "testTextureGatherOffsets(" + Name 41 "testTextureGatherLod(" + Name 43 "testTextureGatherLodOffset(" + Name 45 "testTextureGatherLodOffsets(" + Name 50 "testTextureSize(" + Name 54 "testTextureQueryLod(" + Name 57 "testTextureQueryLevels(" + Name 59 "testTextureSamples(" + Name 61 "testImageLoad(" + Name 66 "testImageStore(vf4;" + Name 65 "data" + Name 68 "testSparseTexture(" + Name 70 "testSparseTextureLod(" + Name 72 "testSparseTextureOffset(" + Name 74 "testSparseTextureLodOffset(" + Name 76 "testSparseTextureGrad(" + Name 78 "testSparseTextureGradOffset(" + Name 80 "testSparseTexelFetch(" + Name 82 "testSparseTexelFetchOffset(" + Name 84 "testSparseTextureGather(" + Name 86 "testSparseTextureGatherOffset(" + Name 88 "testSparseTextureGatherOffsets(" + Name 90 "testSparseTextureGatherLod(" + Name 92 "testSparseTextureGatherLodOffset(" + Name 94 "testSparseTextureGatherLodOffsets(" + Name 96 "testSparseImageLoad(" + Name 98 "testSparseTextureClamp(" + Name 100 "testTextureClamp(" + Name 102 "testSparseTextureOffsetClamp(" + Name 104 "testTextureOffsetClamp(" + Name 106 "testSparseTextureGradClamp(" + Name 108 "testTextureGradClamp(" + Name 110 "testSparseTextureGradOffsetClamp(" + Name 112 "testTextureGradOffsetClamp(" + Name 114 "testCombinedTextureSampler(" + Name 116 "testSubpassLoad(" + Name 118 "texel" + Name 124 "s1D" + Name 127 "c1" + Name 135 "s2D" + Name 138 "c2" + Name 146 "s3D" + Name 150 "c3" + Name 158 "sCube" + Name 167 "s1DShadow" + Name 182 "s2DShadow" + Name 194 "sCubeShadow" + Name 197 "c4" + Name 208 "s1DArray" + Name 217 "s2DArray" + Name 226 "sCubeArray" + Name 235 "s1DArrayShadow" + Name 247 "s2DArrayShadow" + Name 259 "s2DRect" + Name 268 "s2DRectShadow" + Name 280 "sCubeArrayShadow" + Name 283 "compare" + Name 293 "texel" + Name 368 "texel" + Name 371 "lod" + Name 442 "texel" + Name 521 "texel" + Name 596 "texel" + Name 657 "texel" + Name 717 "texel" + Name 773 "sBuffer" + Name 784 "s2DMS" + Name 795 "s2DMSArray" + Name 807 "texel" + Name 863 "texel" + Name 866 "dPdxy1" + Name 874 "dPdxy2" + Name 882 "dPdxy3" + Name 986 "texel" + Name 1082 "texel" + Name 1177 "texel" + Name 1272 "texel" + Name 1332 "texel" + Name 1369 "texel" + Name 1409 "texel" + Name 1437 "texel" + Name 1453 "texel" + Name 1470 "size" + Name 1688 "lod" + Name 1758 "levels" + Name 1827 "samples" + Name 1841 "texel" + Name 1844 "i1D" + Name 1853 "i2D" + Name 1862 "i3D" + Name 1871 "i2DRect" + Name 1880 "iCube" + Name 1889 "iBuffer" + Name 1898 "i1DArray" + Name 1907 "i2DArray" + Name 1916 "iCubeArray" + Name 1925 "i2DMS" + Name 1934 "i2DMSArray" + Name 1988 "texel" + Name 1991 "ResType" + Name 2009 "ResType" + Name 2059 "texel" + Name 2101 "texel" + Name 2146 "texel" + Name 2176 "texel" + Name 2258 "texel" + Name 2317 "texel" + Name 2369 "texel" + Name 2407 "texel" + Name 2466 "texel" + Name 2503 "texel" + Name 2550 "texel" + Name 2578 "texel" + Name 2594 "texel" + Name 2610 "texel" + Name 2662 "texel" + Name 2665 "lodClamp" + Name 2729 "texel" + Name 2829 "texel" + Name 2867 "texel" + Name 2937 "texel" + Name 3011 "texel" + Name 3126 "texel" + Name 3174 "texel" + Name 3262 "texel" + Name 3264 "t1D" + Name 3268 "s" + Name 3276 "t2D" + Name 3285 "t3D" + Name 3294 "tCube" + Name 3303 "sShadow" + Name 3334 "t1DArray" + Name 3343 "t2DArray" + Name 3352 "tCubeArray" + Name 3381 "t2DRect" + Name 3414 "subpass" + Name 3420 "subpassMS" + Name 3426 "result" + Name 3511 "param" + Name 3590 "fragColor" + Name 3593 "tBuffer" + Name 3595 "t2DMS" + Name 3597 "t2DMSArray" + Name 3598 "bias" + Decorate 124(s1D) DescriptorSet 0 + Decorate 124(s1D) Binding 0 + Decorate 127(c1) Location 0 + Decorate 135(s2D) DescriptorSet 0 + Decorate 135(s2D) Binding 1 + Decorate 138(c2) Location 1 + Decorate 146(s3D) DescriptorSet 0 + Decorate 146(s3D) Binding 2 + Decorate 150(c3) Location 2 + Decorate 158(sCube) DescriptorSet 0 + Decorate 158(sCube) Binding 4 + Decorate 167(s1DShadow) DescriptorSet 0 + Decorate 167(s1DShadow) Binding 11 + Decorate 182(s2DShadow) DescriptorSet 0 + Decorate 182(s2DShadow) Binding 12 + Decorate 194(sCubeShadow) DescriptorSet 0 + Decorate 194(sCubeShadow) Binding 14 + Decorate 197(c4) Location 3 + Decorate 208(s1DArray) DescriptorSet 0 + Decorate 208(s1DArray) Binding 7 + Decorate 217(s2DArray) DescriptorSet 0 + Decorate 217(s2DArray) Binding 8 + Decorate 226(sCubeArray) DescriptorSet 0 + Decorate 226(sCubeArray) Binding 9 + Decorate 235(s1DArrayShadow) DescriptorSet 0 + Decorate 235(s1DArrayShadow) Binding 15 + Decorate 247(s2DArrayShadow) DescriptorSet 0 + Decorate 247(s2DArrayShadow) Binding 16 + Decorate 259(s2DRect) DescriptorSet 0 + Decorate 259(s2DRect) Binding 3 + Decorate 268(s2DRectShadow) DescriptorSet 0 + Decorate 268(s2DRectShadow) Binding 13 + Decorate 280(sCubeArrayShadow) DescriptorSet 0 + Decorate 280(sCubeArrayShadow) Binding 17 + Decorate 283(compare) Location 4 + Decorate 371(lod) Location 5 + Decorate 773(sBuffer) DescriptorSet 0 + Decorate 773(sBuffer) Binding 5 + Decorate 784(s2DMS) DescriptorSet 0 + Decorate 784(s2DMS) Binding 6 + Decorate 795(s2DMSArray) DescriptorSet 0 + Decorate 795(s2DMSArray) Binding 10 + Decorate 866(dPdxy1) Location 8 + Decorate 874(dPdxy2) Location 9 + Decorate 882(dPdxy3) Location 10 + Decorate 1844(i1D) DescriptorSet 1 + Decorate 1844(i1D) Binding 0 + Decorate 1853(i2D) DescriptorSet 1 + Decorate 1853(i2D) Binding 1 + Decorate 1862(i3D) DescriptorSet 1 + Decorate 1862(i3D) Binding 2 + Decorate 1871(i2DRect) DescriptorSet 1 + Decorate 1871(i2DRect) Binding 3 + Decorate 1880(iCube) DescriptorSet 1 + Decorate 1880(iCube) Binding 4 + Decorate 1889(iBuffer) DescriptorSet 1 + Decorate 1889(iBuffer) Binding 8 + Decorate 1898(i1DArray) DescriptorSet 1 + Decorate 1898(i1DArray) Binding 5 + Decorate 1907(i2DArray) DescriptorSet 1 + Decorate 1907(i2DArray) Binding 6 + Decorate 1916(iCubeArray) DescriptorSet 1 + Decorate 1916(iCubeArray) Binding 7 + Decorate 1925(i2DMS) DescriptorSet 1 + Decorate 1925(i2DMS) Binding 9 + Decorate 1934(i2DMSArray) DescriptorSet 1 + Decorate 1934(i2DMSArray) Binding 10 + Decorate 2665(lodClamp) Location 7 + Decorate 3264(t1D) DescriptorSet 2 + Decorate 3264(t1D) Binding 0 + Decorate 3268(s) DescriptorSet 2 + Decorate 3268(s) Binding 11 + Decorate 3276(t2D) DescriptorSet 2 + Decorate 3276(t2D) Binding 1 + Decorate 3285(t3D) DescriptorSet 2 + Decorate 3285(t3D) Binding 2 + Decorate 3294(tCube) DescriptorSet 2 + Decorate 3294(tCube) Binding 4 + Decorate 3303(sShadow) DescriptorSet 2 + Decorate 3303(sShadow) Binding 12 + Decorate 3334(t1DArray) DescriptorSet 2 + Decorate 3334(t1DArray) Binding 5 + Decorate 3343(t2DArray) DescriptorSet 2 + Decorate 3343(t2DArray) Binding 6 + Decorate 3352(tCubeArray) DescriptorSet 2 + Decorate 3352(tCubeArray) Binding 7 + Decorate 3381(t2DRect) DescriptorSet 2 + Decorate 3381(t2DRect) Binding 3 + Decorate 3414(subpass) DescriptorSet 3 + Decorate 3414(subpass) Binding 0 + Decorate 3414(subpass) InputAttachmentIndex 0 + Decorate 3420(subpassMS) DescriptorSet 3 + Decorate 3420(subpassMS) Binding 1 + Decorate 3420(subpassMS) InputAttachmentIndex 0 + Decorate 3590(fragColor) Location 0 + Decorate 3593(tBuffer) DescriptorSet 2 + Decorate 3593(tBuffer) Binding 8 + Decorate 3595(t2DMS) DescriptorSet 2 + Decorate 3595(t2DMS) Binding 9 + Decorate 3597(t2DMSArray) DescriptorSet 2 + Decorate 3597(t2DMSArray) Binding 10 + Decorate 3598(bias) Location 6 + 2: TypeVoid + 3: TypeFunction 2 + 6: TypeFloat 32 + 7: TypeVector 6(float) 4 + 8: TypeFunction 7(fvec4) + 47: TypeInt 32 1 + 48: TypeVector 47(int) 4 + 49: TypeFunction 48(ivec4) + 52: TypeVector 6(float) 2 + 53: TypeFunction 52(fvec2) + 56: TypeFunction 47(int) + 63: TypePointer Function 7(fvec4) + 64: TypeFunction 2 63(ptr) + 119: 6(float) Constant 0 + 120: 7(fvec4) ConstantComposite 119 119 119 119 + 121: TypeImage 6(float) 1D sampled format:Unknown + 122: TypeSampledImage 121 + 123: TypePointer UniformConstant 122 + 124(s1D): 123(ptr) Variable UniformConstant + 126: TypePointer Input 6(float) + 127(c1): 126(ptr) Variable Input + 132: TypeImage 6(float) 2D sampled format:Unknown + 133: TypeSampledImage 132 + 134: TypePointer UniformConstant 133 + 135(s2D): 134(ptr) Variable UniformConstant + 137: TypePointer Input 52(fvec2) + 138(c2): 137(ptr) Variable Input + 143: TypeImage 6(float) 3D sampled format:Unknown + 144: TypeSampledImage 143 + 145: TypePointer UniformConstant 144 + 146(s3D): 145(ptr) Variable UniformConstant + 148: TypeVector 6(float) 3 + 149: TypePointer Input 148(fvec3) + 150(c3): 149(ptr) Variable Input + 155: TypeImage 6(float) Cube sampled format:Unknown + 156: TypeSampledImage 155 + 157: TypePointer UniformConstant 156 + 158(sCube): 157(ptr) Variable UniformConstant + 164: TypeImage 6(float) 1D depth sampled format:Unknown + 165: TypeSampledImage 164 + 166: TypePointer UniformConstant 165 + 167(s1DShadow): 166(ptr) Variable UniformConstant + 172: TypeInt 32 0 + 173: 172(int) Constant 0 + 174: TypePointer Function 6(float) + 179: TypeImage 6(float) 2D depth sampled format:Unknown + 180: TypeSampledImage 179 + 181: TypePointer UniformConstant 180 + 182(s2DShadow): 181(ptr) Variable UniformConstant + 191: TypeImage 6(float) Cube depth sampled format:Unknown + 192: TypeSampledImage 191 + 193: TypePointer UniformConstant 192 +194(sCubeShadow): 193(ptr) Variable UniformConstant + 196: TypePointer Input 7(fvec4) + 197(c4): 196(ptr) Variable Input + 205: TypeImage 6(float) 1D array sampled format:Unknown + 206: TypeSampledImage 205 + 207: TypePointer UniformConstant 206 + 208(s1DArray): 207(ptr) Variable UniformConstant + 214: TypeImage 6(float) 2D array sampled format:Unknown + 215: TypeSampledImage 214 + 216: TypePointer UniformConstant 215 + 217(s2DArray): 216(ptr) Variable UniformConstant + 223: TypeImage 6(float) Cube array sampled format:Unknown + 224: TypeSampledImage 223 + 225: TypePointer UniformConstant 224 + 226(sCubeArray): 225(ptr) Variable UniformConstant + 232: TypeImage 6(float) 1D depth array sampled format:Unknown + 233: TypeSampledImage 232 + 234: TypePointer UniformConstant 233 +235(s1DArrayShadow): 234(ptr) Variable UniformConstant + 244: TypeImage 6(float) 2D depth array sampled format:Unknown + 245: TypeSampledImage 244 + 246: TypePointer UniformConstant 245 +247(s2DArrayShadow): 246(ptr) Variable UniformConstant + 256: TypeImage 6(float) Rect sampled format:Unknown + 257: TypeSampledImage 256 + 258: TypePointer UniformConstant 257 + 259(s2DRect): 258(ptr) Variable UniformConstant + 265: TypeImage 6(float) Rect depth sampled format:Unknown + 266: TypeSampledImage 265 + 267: TypePointer UniformConstant 266 +268(s2DRectShadow): 267(ptr) Variable UniformConstant + 277: TypeImage 6(float) Cube depth array sampled format:Unknown + 278: TypeSampledImage 277 + 279: TypePointer UniformConstant 278 +280(sCubeArrayShadow): 279(ptr) Variable UniformConstant + 283(compare): 126(ptr) Variable Input + 371(lod): 126(ptr) Variable Input + 445: 47(int) Constant 1 + 451: TypeVector 47(int) 2 + 452: 451(ivec2) ConstantComposite 445 445 + 458: TypeVector 47(int) 3 + 459: 458(ivec3) ConstantComposite 445 445 445 + 770: TypeImage 6(float) Buffer sampled format:Unknown + 771: TypeSampledImage 770 + 772: TypePointer UniformConstant 771 + 773(sBuffer): 772(ptr) Variable UniformConstant + 781: TypeImage 6(float) 2D multi-sampled sampled format:Unknown + 782: TypeSampledImage 781 + 783: TypePointer UniformConstant 782 + 784(s2DMS): 783(ptr) Variable UniformConstant + 792: TypeImage 6(float) 2D array multi-sampled sampled format:Unknown + 793: TypeSampledImage 792 + 794: TypePointer UniformConstant 793 + 795(s2DMSArray): 794(ptr) Variable UniformConstant + 799: 47(int) Constant 2 + 866(dPdxy1): 126(ptr) Variable Input + 874(dPdxy2): 137(ptr) Variable Input + 882(dPdxy3): 149(ptr) Variable Input + 1275: 47(int) Constant 0 + 1372: 172(int) Constant 4 + 1373: TypeArray 451(ivec2) 1372 + 1374: 1373 ConstantComposite 452 452 452 452 + 1469: TypePointer Function 48(ivec4) + 1471: 48(ivec4) ConstantComposite 1275 1275 1275 1275 + 1477: TypePointer Function 47(int) + 1492: 172(int) Constant 1 + 1507: 172(int) Constant 2 + 1687: TypePointer Function 52(fvec2) + 1689: 52(fvec2) ConstantComposite 119 119 + 1842: TypeImage 6(float) 1D nonsampled format:Rgba16f + 1843: TypePointer UniformConstant 1842 + 1844(i1D): 1843(ptr) Variable UniformConstant + 1851: TypeImage 6(float) 2D nonsampled format:Rgba16f + 1852: TypePointer UniformConstant 1851 + 1853(i2D): 1852(ptr) Variable UniformConstant + 1860: TypeImage 6(float) 3D nonsampled format:Rgba16f + 1861: TypePointer UniformConstant 1860 + 1862(i3D): 1861(ptr) Variable UniformConstant + 1869: TypeImage 6(float) Rect nonsampled format:Rgba16f + 1870: TypePointer UniformConstant 1869 + 1871(i2DRect): 1870(ptr) Variable UniformConstant + 1878: TypeImage 6(float) Cube nonsampled format:Rgba16f + 1879: TypePointer UniformConstant 1878 + 1880(iCube): 1879(ptr) Variable UniformConstant + 1887: TypeImage 6(float) Buffer nonsampled format:Rgba16f + 1888: TypePointer UniformConstant 1887 + 1889(iBuffer): 1888(ptr) Variable UniformConstant + 1896: TypeImage 6(float) 1D array nonsampled format:Rgba16f + 1897: TypePointer UniformConstant 1896 + 1898(i1DArray): 1897(ptr) Variable UniformConstant + 1905: TypeImage 6(float) 2D array nonsampled format:Rgba16f + 1906: TypePointer UniformConstant 1905 + 1907(i2DArray): 1906(ptr) Variable UniformConstant + 1914: TypeImage 6(float) Cube array nonsampled format:Rgba16f + 1915: TypePointer UniformConstant 1914 +1916(iCubeArray): 1915(ptr) Variable UniformConstant + 1923: TypeImage 6(float) 2D multi-sampled nonsampled format:Rgba16f + 1924: TypePointer UniformConstant 1923 + 1925(i2DMS): 1924(ptr) Variable UniformConstant + 1932: TypeImage 6(float) 2D array multi-sampled nonsampled format:Rgba16f + 1933: TypePointer UniformConstant 1932 +1934(i2DMSArray): 1933(ptr) Variable UniformConstant + 1991(ResType): TypeStruct 47(int) 7(fvec4) + 2009(ResType): TypeStruct 47(int) 6(float) + 2506: 451(ivec2) ConstantComposite 445 799 + 2507: 47(int) Constant 3 + 2508: 47(int) Constant 4 + 2509: 451(ivec2) ConstantComposite 2507 2508 + 2510: 47(int) Constant 15 + 2511: 47(int) Constant 16 + 2512: 451(ivec2) ConstantComposite 2510 2511 + 2513: 47(int) Constant 4294967294 + 2514: 451(ivec2) ConstantComposite 2513 1275 + 2515: 1373 ConstantComposite 2506 2509 2512 2514 + 2665(lodClamp): 126(ptr) Variable Input + 3263: TypePointer UniformConstant 121 + 3264(t1D): 3263(ptr) Variable UniformConstant + 3266: TypeSampler + 3267: TypePointer UniformConstant 3266 + 3268(s): 3267(ptr) Variable UniformConstant + 3275: TypePointer UniformConstant 132 + 3276(t2D): 3275(ptr) Variable UniformConstant + 3284: TypePointer UniformConstant 143 + 3285(t3D): 3284(ptr) Variable UniformConstant + 3293: TypePointer UniformConstant 155 + 3294(tCube): 3293(ptr) Variable UniformConstant + 3303(sShadow): 3267(ptr) Variable UniformConstant + 3333: TypePointer UniformConstant 205 + 3334(t1DArray): 3333(ptr) Variable UniformConstant + 3342: TypePointer UniformConstant 214 + 3343(t2DArray): 3342(ptr) Variable UniformConstant + 3351: TypePointer UniformConstant 223 +3352(tCubeArray): 3351(ptr) Variable UniformConstant + 3380: TypePointer UniformConstant 256 + 3381(t2DRect): 3380(ptr) Variable UniformConstant + 3412: TypeImage 6(float) SubpassData nonsampled format:Unknown + 3413: TypePointer UniformConstant 3412 + 3414(subpass): 3413(ptr) Variable UniformConstant + 3416: 451(ivec2) ConstantComposite 1275 1275 + 3418: TypeImage 6(float) SubpassData multi-sampled nonsampled format:Unknown + 3419: TypePointer UniformConstant 3418 + 3420(subpassMS): 3419(ptr) Variable UniformConstant + 3589: TypePointer Output 7(fvec4) + 3590(fragColor): 3589(ptr) Variable Output + 3592: TypePointer UniformConstant 770 + 3593(tBuffer): 3592(ptr) Variable UniformConstant + 3594: TypePointer UniformConstant 781 + 3595(t2DMS): 3594(ptr) Variable UniformConstant + 3596: TypePointer UniformConstant 792 +3597(t2DMSArray): 3596(ptr) Variable UniformConstant + 3598(bias): 126(ptr) Variable Input + 4(main): 2 Function None 3 + 5: Label + 3426(result): 63(ptr) Variable Function + 3511(param): 63(ptr) Variable Function + Store 3426(result) 120 + 3427: 7(fvec4) FunctionCall 9(testTexture() + 3428: 7(fvec4) Load 3426(result) + 3429: 7(fvec4) FAdd 3428 3427 + Store 3426(result) 3429 + 3430: 7(fvec4) FunctionCall 11(testTextureProj() + 3431: 7(fvec4) Load 3426(result) + 3432: 7(fvec4) FAdd 3431 3430 + Store 3426(result) 3432 + 3433: 7(fvec4) FunctionCall 13(testTextureLod() + 3434: 7(fvec4) Load 3426(result) + 3435: 7(fvec4) FAdd 3434 3433 + Store 3426(result) 3435 + 3436: 7(fvec4) FunctionCall 15(testTextureOffset() + 3437: 7(fvec4) Load 3426(result) + 3438: 7(fvec4) FAdd 3437 3436 + Store 3426(result) 3438 + 3439: 7(fvec4) FunctionCall 19(testTextureLodOffset() + 3440: 7(fvec4) Load 3426(result) + 3441: 7(fvec4) FAdd 3440 3439 + Store 3426(result) 3441 + 3442: 7(fvec4) FunctionCall 21(testTextureProjLodOffset() + 3443: 7(fvec4) Load 3426(result) + 3444: 7(fvec4) FAdd 3443 3442 + Store 3426(result) 3444 + 3445: 7(fvec4) FunctionCall 23(testTexelFetch() + 3446: 7(fvec4) Load 3426(result) + 3447: 7(fvec4) FAdd 3446 3445 + Store 3426(result) 3447 + 3448: 7(fvec4) FunctionCall 25(testTexelFetchOffset() + 3449: 7(fvec4) Load 3426(result) + 3450: 7(fvec4) FAdd 3449 3448 + Store 3426(result) 3450 + 3451: 7(fvec4) FunctionCall 27(testTextureGrad() + 3452: 7(fvec4) Load 3426(result) + 3453: 7(fvec4) FAdd 3452 3451 + Store 3426(result) 3453 + 3454: 7(fvec4) FunctionCall 29(testTextureGradOffset() + 3455: 7(fvec4) Load 3426(result) + 3456: 7(fvec4) FAdd 3455 3454 + Store 3426(result) 3456 + 3457: 7(fvec4) FunctionCall 31(testTextureProjGrad() + 3458: 7(fvec4) Load 3426(result) + 3459: 7(fvec4) FAdd 3458 3457 + Store 3426(result) 3459 + 3460: 7(fvec4) FunctionCall 33(testTextureProjGradoffset() + 3461: 7(fvec4) Load 3426(result) + 3462: 7(fvec4) FAdd 3461 3460 + Store 3426(result) 3462 + 3463: 7(fvec4) FunctionCall 35(testTextureGather() + 3464: 7(fvec4) Load 3426(result) + 3465: 7(fvec4) FAdd 3464 3463 + Store 3426(result) 3465 + 3466: 7(fvec4) FunctionCall 37(testTextureGatherOffset() + 3467: 7(fvec4) Load 3426(result) + 3468: 7(fvec4) FAdd 3467 3466 + Store 3426(result) 3468 + 3469: 7(fvec4) FunctionCall 39(testTextureGatherOffsets() + 3470: 7(fvec4) Load 3426(result) + 3471: 7(fvec4) FAdd 3470 3469 + Store 3426(result) 3471 + 3472: 7(fvec4) FunctionCall 41(testTextureGatherLod() + 3473: 7(fvec4) Load 3426(result) + 3474: 7(fvec4) FAdd 3473 3472 + Store 3426(result) 3474 + 3475: 7(fvec4) FunctionCall 43(testTextureGatherLodOffset() + 3476: 7(fvec4) Load 3426(result) + 3477: 7(fvec4) FAdd 3476 3475 + Store 3426(result) 3477 + 3478: 7(fvec4) FunctionCall 45(testTextureGatherLodOffsets() + 3479: 7(fvec4) Load 3426(result) + 3480: 7(fvec4) FAdd 3479 3478 + Store 3426(result) 3480 + 3481: 48(ivec4) FunctionCall 50(testTextureSize() + 3482: 7(fvec4) ConvertSToF 3481 + 3483: 7(fvec4) Load 3426(result) + 3484: 7(fvec4) FAdd 3483 3482 + Store 3426(result) 3484 + 3485: 52(fvec2) FunctionCall 54(testTextureQueryLod() + 3486: 6(float) CompositeExtract 3485 0 + 3487: 6(float) CompositeExtract 3485 1 + 3488: 52(fvec2) CompositeConstruct 3486 3487 + 3489: 7(fvec4) Load 3426(result) + 3490: 52(fvec2) VectorShuffle 3489 3489 0 1 + 3491: 52(fvec2) FAdd 3490 3488 + 3492: 174(ptr) AccessChain 3426(result) 173 + 3493: 6(float) CompositeExtract 3491 0 + Store 3492 3493 + 3494: 174(ptr) AccessChain 3426(result) 1492 + 3495: 6(float) CompositeExtract 3491 1 + Store 3494 3495 + 3496: 47(int) FunctionCall 57(testTextureQueryLevels() + 3497: 6(float) ConvertSToF 3496 + 3498: 174(ptr) AccessChain 3426(result) 173 + 3499: 6(float) Load 3498 + 3500: 6(float) FAdd 3499 3497 + 3501: 174(ptr) AccessChain 3426(result) 173 + Store 3501 3500 + 3502: 47(int) FunctionCall 59(testTextureSamples() + 3503: 6(float) ConvertSToF 3502 + 3504: 174(ptr) AccessChain 3426(result) 173 + 3505: 6(float) Load 3504 + 3506: 6(float) FAdd 3505 3503 + 3507: 174(ptr) AccessChain 3426(result) 173 + Store 3507 3506 + 3508: 7(fvec4) FunctionCall 61(testImageLoad() + 3509: 7(fvec4) Load 3426(result) + 3510: 7(fvec4) FAdd 3509 3508 + Store 3426(result) 3510 + 3512: 7(fvec4) Load 3426(result) + Store 3511(param) 3512 + 3513: 2 FunctionCall 66(testImageStore(vf4;) 3511(param) + 3514: 7(fvec4) FunctionCall 68(testSparseTexture() + 3515: 7(fvec4) Load 3426(result) + 3516: 7(fvec4) FAdd 3515 3514 + Store 3426(result) 3516 + 3517: 7(fvec4) FunctionCall 70(testSparseTextureLod() + 3518: 7(fvec4) Load 3426(result) + 3519: 7(fvec4) FAdd 3518 3517 + Store 3426(result) 3519 + 3520: 7(fvec4) FunctionCall 72(testSparseTextureOffset() + 3521: 7(fvec4) Load 3426(result) + 3522: 7(fvec4) FAdd 3521 3520 + Store 3426(result) 3522 + 3523: 7(fvec4) FunctionCall 74(testSparseTextureLodOffset() + 3524: 7(fvec4) Load 3426(result) + 3525: 7(fvec4) FAdd 3524 3523 + Store 3426(result) 3525 + 3526: 7(fvec4) FunctionCall 76(testSparseTextureGrad() + 3527: 7(fvec4) Load 3426(result) + 3528: 7(fvec4) FAdd 3527 3526 + Store 3426(result) 3528 + 3529: 7(fvec4) FunctionCall 78(testSparseTextureGradOffset() + 3530: 7(fvec4) Load 3426(result) + 3531: 7(fvec4) FAdd 3530 3529 + Store 3426(result) 3531 + 3532: 7(fvec4) FunctionCall 80(testSparseTexelFetch() + 3533: 7(fvec4) Load 3426(result) + 3534: 7(fvec4) FAdd 3533 3532 + Store 3426(result) 3534 + 3535: 7(fvec4) FunctionCall 82(testSparseTexelFetchOffset() + 3536: 7(fvec4) Load 3426(result) + 3537: 7(fvec4) FAdd 3536 3535 + Store 3426(result) 3537 + 3538: 7(fvec4) FunctionCall 84(testSparseTextureGather() + 3539: 7(fvec4) Load 3426(result) + 3540: 7(fvec4) FAdd 3539 3538 + Store 3426(result) 3540 + 3541: 7(fvec4) FunctionCall 86(testSparseTextureGatherOffset() + 3542: 7(fvec4) Load 3426(result) + 3543: 7(fvec4) FAdd 3542 3541 + Store 3426(result) 3543 + 3544: 7(fvec4) FunctionCall 88(testSparseTextureGatherOffsets() + 3545: 7(fvec4) Load 3426(result) + 3546: 7(fvec4) FAdd 3545 3544 + Store 3426(result) 3546 + 3547: 7(fvec4) FunctionCall 90(testSparseTextureGatherLod() + 3548: 7(fvec4) Load 3426(result) + 3549: 7(fvec4) FAdd 3548 3547 + Store 3426(result) 3549 + 3550: 7(fvec4) FunctionCall 92(testSparseTextureGatherLodOffset() + 3551: 7(fvec4) Load 3426(result) + 3552: 7(fvec4) FAdd 3551 3550 + Store 3426(result) 3552 + 3553: 7(fvec4) FunctionCall 94(testSparseTextureGatherLodOffsets() + 3554: 7(fvec4) Load 3426(result) + 3555: 7(fvec4) FAdd 3554 3553 + Store 3426(result) 3555 + 3556: 7(fvec4) FunctionCall 96(testSparseImageLoad() + 3557: 7(fvec4) Load 3426(result) + 3558: 7(fvec4) FAdd 3557 3556 + Store 3426(result) 3558 + 3559: 7(fvec4) FunctionCall 98(testSparseTextureClamp() + 3560: 7(fvec4) Load 3426(result) + 3561: 7(fvec4) FAdd 3560 3559 + Store 3426(result) 3561 + 3562: 7(fvec4) FunctionCall 100(testTextureClamp() + 3563: 7(fvec4) Load 3426(result) + 3564: 7(fvec4) FAdd 3563 3562 + Store 3426(result) 3564 + 3565: 7(fvec4) FunctionCall 102(testSparseTextureOffsetClamp() + 3566: 7(fvec4) Load 3426(result) + 3567: 7(fvec4) FAdd 3566 3565 + Store 3426(result) 3567 + 3568: 7(fvec4) FunctionCall 104(testTextureOffsetClamp() + 3569: 7(fvec4) Load 3426(result) + 3570: 7(fvec4) FAdd 3569 3568 + Store 3426(result) 3570 + 3571: 7(fvec4) FunctionCall 76(testSparseTextureGrad() + 3572: 7(fvec4) Load 3426(result) + 3573: 7(fvec4) FAdd 3572 3571 + Store 3426(result) 3573 + 3574: 7(fvec4) FunctionCall 27(testTextureGrad() + 3575: 7(fvec4) Load 3426(result) + 3576: 7(fvec4) FAdd 3575 3574 + Store 3426(result) 3576 + 3577: 7(fvec4) FunctionCall 110(testSparseTextureGradOffsetClamp() + 3578: 7(fvec4) Load 3426(result) + 3579: 7(fvec4) FAdd 3578 3577 + Store 3426(result) 3579 + 3580: 7(fvec4) FunctionCall 112(testTextureGradOffsetClamp() + 3581: 7(fvec4) Load 3426(result) + 3582: 7(fvec4) FAdd 3581 3580 + Store 3426(result) 3582 + 3583: 7(fvec4) FunctionCall 114(testCombinedTextureSampler() + 3584: 7(fvec4) Load 3426(result) + 3585: 7(fvec4) FAdd 3584 3583 + Store 3426(result) 3585 + 3586: 7(fvec4) FunctionCall 116(testSubpassLoad() + 3587: 7(fvec4) Load 3426(result) + 3588: 7(fvec4) FAdd 3587 3586 + Store 3426(result) 3588 + 3591: 7(fvec4) Load 3426(result) + Store 3590(fragColor) 3591 + Return + FunctionEnd + 9(testTexture(): 7(fvec4) Function None 8 + 10: Label + 118(texel): 63(ptr) Variable Function + Store 118(texel) 120 + 125: 122 Load 124(s1D) + 128: 6(float) Load 127(c1) + 129: 7(fvec4) ImageSampleImplicitLod 125 128 + 130: 7(fvec4) Load 118(texel) + 131: 7(fvec4) FAdd 130 129 + Store 118(texel) 131 + 136: 133 Load 135(s2D) + 139: 52(fvec2) Load 138(c2) + 140: 7(fvec4) ImageSampleImplicitLod 136 139 + 141: 7(fvec4) Load 118(texel) + 142: 7(fvec4) FAdd 141 140 + Store 118(texel) 142 + 147: 144 Load 146(s3D) + 151: 148(fvec3) Load 150(c3) + 152: 7(fvec4) ImageSampleImplicitLod 147 151 + 153: 7(fvec4) Load 118(texel) + 154: 7(fvec4) FAdd 153 152 + Store 118(texel) 154 + 159: 156 Load 158(sCube) + 160: 148(fvec3) Load 150(c3) + 161: 7(fvec4) ImageSampleImplicitLod 159 160 + 162: 7(fvec4) Load 118(texel) + 163: 7(fvec4) FAdd 162 161 + Store 118(texel) 163 + 168: 165 Load 167(s1DShadow) + 169: 148(fvec3) Load 150(c3) + 170: 6(float) CompositeExtract 169 2 + 171: 6(float) ImageSampleDrefImplicitLod 168 169 170 + 175: 174(ptr) AccessChain 118(texel) 173 + 176: 6(float) Load 175 + 177: 6(float) FAdd 176 171 + 178: 174(ptr) AccessChain 118(texel) 173 + Store 178 177 + 183: 180 Load 182(s2DShadow) + 184: 148(fvec3) Load 150(c3) + 185: 6(float) CompositeExtract 184 2 + 186: 6(float) ImageSampleDrefImplicitLod 183 184 185 + 187: 174(ptr) AccessChain 118(texel) 173 + 188: 6(float) Load 187 + 189: 6(float) FAdd 188 186 + 190: 174(ptr) AccessChain 118(texel) 173 + Store 190 189 + 195: 192 Load 194(sCubeShadow) + 198: 7(fvec4) Load 197(c4) + 199: 6(float) CompositeExtract 198 3 + 200: 6(float) ImageSampleDrefImplicitLod 195 198 199 + 201: 174(ptr) AccessChain 118(texel) 173 + 202: 6(float) Load 201 + 203: 6(float) FAdd 202 200 + 204: 174(ptr) AccessChain 118(texel) 173 + Store 204 203 + 209: 206 Load 208(s1DArray) + 210: 52(fvec2) Load 138(c2) + 211: 7(fvec4) ImageSampleImplicitLod 209 210 + 212: 7(fvec4) Load 118(texel) + 213: 7(fvec4) FAdd 212 211 + Store 118(texel) 213 + 218: 215 Load 217(s2DArray) + 219: 148(fvec3) Load 150(c3) + 220: 7(fvec4) ImageSampleImplicitLod 218 219 + 221: 7(fvec4) Load 118(texel) + 222: 7(fvec4) FAdd 221 220 + Store 118(texel) 222 + 227: 224 Load 226(sCubeArray) + 228: 7(fvec4) Load 197(c4) + 229: 7(fvec4) ImageSampleImplicitLod 227 228 + 230: 7(fvec4) Load 118(texel) + 231: 7(fvec4) FAdd 230 229 + Store 118(texel) 231 + 236: 233 Load 235(s1DArrayShadow) + 237: 148(fvec3) Load 150(c3) + 238: 6(float) CompositeExtract 237 2 + 239: 6(float) ImageSampleDrefImplicitLod 236 237 238 + 240: 174(ptr) AccessChain 118(texel) 173 + 241: 6(float) Load 240 + 242: 6(float) FAdd 241 239 + 243: 174(ptr) AccessChain 118(texel) 173 + Store 243 242 + 248: 245 Load 247(s2DArrayShadow) + 249: 7(fvec4) Load 197(c4) + 250: 6(float) CompositeExtract 249 3 + 251: 6(float) ImageSampleDrefImplicitLod 248 249 250 + 252: 174(ptr) AccessChain 118(texel) 173 + 253: 6(float) Load 252 + 254: 6(float) FAdd 253 251 + 255: 174(ptr) AccessChain 118(texel) 173 + Store 255 254 + 260: 257 Load 259(s2DRect) + 261: 52(fvec2) Load 138(c2) + 262: 7(fvec4) ImageSampleImplicitLod 260 261 + 263: 7(fvec4) Load 118(texel) + 264: 7(fvec4) FAdd 263 262 + Store 118(texel) 264 + 269: 266 Load 268(s2DRectShadow) + 270: 148(fvec3) Load 150(c3) + 271: 6(float) CompositeExtract 270 2 + 272: 6(float) ImageSampleDrefImplicitLod 269 270 271 + 273: 174(ptr) AccessChain 118(texel) 173 + 274: 6(float) Load 273 + 275: 6(float) FAdd 274 272 + 276: 174(ptr) AccessChain 118(texel) 173 + Store 276 275 + 281: 278 Load 280(sCubeArrayShadow) + 282: 7(fvec4) Load 197(c4) + 284: 6(float) Load 283(compare) + 285: 6(float) ImageSampleDrefImplicitLod 281 282 284 + 286: 174(ptr) AccessChain 118(texel) 173 + 287: 6(float) Load 286 + 288: 6(float) FAdd 287 285 + 289: 174(ptr) AccessChain 118(texel) 173 + Store 289 288 + 290: 7(fvec4) Load 118(texel) + ReturnValue 290 + FunctionEnd +11(testTextureProj(): 7(fvec4) Function None 8 + 12: Label + 293(texel): 63(ptr) Variable Function + Store 293(texel) 120 + 294: 122 Load 124(s1D) + 295: 52(fvec2) Load 138(c2) + 296: 7(fvec4) ImageSampleProjImplicitLod 294 295 + 297: 7(fvec4) Load 293(texel) + 298: 7(fvec4) FAdd 297 296 + Store 293(texel) 298 + 299: 122 Load 124(s1D) + 300: 7(fvec4) Load 197(c4) + 301: 6(float) CompositeExtract 300 3 + 302: 7(fvec4) CompositeInsert 301 300 1 + 303: 7(fvec4) ImageSampleProjImplicitLod 299 302 + 304: 7(fvec4) Load 293(texel) + 305: 7(fvec4) FAdd 304 303 + Store 293(texel) 305 + 306: 133 Load 135(s2D) + 307: 148(fvec3) Load 150(c3) + 308: 7(fvec4) ImageSampleProjImplicitLod 306 307 + 309: 7(fvec4) Load 293(texel) + 310: 7(fvec4) FAdd 309 308 + Store 293(texel) 310 + 311: 133 Load 135(s2D) + 312: 7(fvec4) Load 197(c4) + 313: 6(float) CompositeExtract 312 3 + 314: 7(fvec4) CompositeInsert 313 312 2 + 315: 7(fvec4) ImageSampleProjImplicitLod 311 314 + 316: 7(fvec4) Load 293(texel) + 317: 7(fvec4) FAdd 316 315 + Store 293(texel) 317 + 318: 144 Load 146(s3D) + 319: 7(fvec4) Load 197(c4) + 320: 7(fvec4) ImageSampleProjImplicitLod 318 319 + 321: 7(fvec4) Load 293(texel) + 322: 7(fvec4) FAdd 321 320 + Store 293(texel) 322 + 323: 165 Load 167(s1DShadow) + 324: 7(fvec4) Load 197(c4) + 325: 6(float) CompositeExtract 324 2 + 326: 6(float) CompositeExtract 324 3 + 327: 7(fvec4) CompositeInsert 326 324 1 + 328: 6(float) ImageSampleProjDrefImplicitLod 323 327 325 + 329: 174(ptr) AccessChain 293(texel) 173 + 330: 6(float) Load 329 + 331: 6(float) FAdd 330 328 + 332: 174(ptr) AccessChain 293(texel) 173 + Store 332 331 + 333: 180 Load 182(s2DShadow) + 334: 7(fvec4) Load 197(c4) + 335: 6(float) CompositeExtract 334 2 + 336: 6(float) CompositeExtract 334 3 + 337: 7(fvec4) CompositeInsert 336 334 2 + 338: 6(float) ImageSampleProjDrefImplicitLod 333 337 335 + 339: 174(ptr) AccessChain 293(texel) 173 + 340: 6(float) Load 339 + 341: 6(float) FAdd 340 338 + 342: 174(ptr) AccessChain 293(texel) 173 + Store 342 341 + 343: 257 Load 259(s2DRect) + 344: 148(fvec3) Load 150(c3) + 345: 7(fvec4) ImageSampleProjImplicitLod 343 344 + 346: 7(fvec4) Load 293(texel) + 347: 7(fvec4) FAdd 346 345 + Store 293(texel) 347 + 348: 257 Load 259(s2DRect) + 349: 7(fvec4) Load 197(c4) + 350: 6(float) CompositeExtract 349 3 + 351: 7(fvec4) CompositeInsert 350 349 2 + 352: 7(fvec4) ImageSampleProjImplicitLod 348 351 + 353: 7(fvec4) Load 293(texel) + 354: 7(fvec4) FAdd 353 352 + Store 293(texel) 354 + 355: 266 Load 268(s2DRectShadow) + 356: 7(fvec4) Load 197(c4) + 357: 6(float) CompositeExtract 356 2 + 358: 6(float) CompositeExtract 356 3 + 359: 7(fvec4) CompositeInsert 358 356 2 + 360: 6(float) ImageSampleProjDrefImplicitLod 355 359 357 + 361: 174(ptr) AccessChain 293(texel) 173 + 362: 6(float) Load 361 + 363: 6(float) FAdd 362 360 + 364: 174(ptr) AccessChain 293(texel) 173 + Store 364 363 + 365: 7(fvec4) Load 293(texel) + ReturnValue 365 + FunctionEnd +13(testTextureLod(): 7(fvec4) Function None 8 + 14: Label + 368(texel): 63(ptr) Variable Function + Store 368(texel) 120 + 369: 122 Load 124(s1D) + 370: 6(float) Load 127(c1) + 372: 6(float) Load 371(lod) + 373: 7(fvec4) ImageSampleExplicitLod 369 370 Lod 372 + 374: 7(fvec4) Load 368(texel) + 375: 7(fvec4) FAdd 374 373 + Store 368(texel) 375 + 376: 133 Load 135(s2D) + 377: 52(fvec2) Load 138(c2) + 378: 6(float) Load 371(lod) + 379: 7(fvec4) ImageSampleExplicitLod 376 377 Lod 378 + 380: 7(fvec4) Load 368(texel) + 381: 7(fvec4) FAdd 380 379 + Store 368(texel) 381 + 382: 144 Load 146(s3D) + 383: 148(fvec3) Load 150(c3) + 384: 6(float) Load 371(lod) + 385: 7(fvec4) ImageSampleExplicitLod 382 383 Lod 384 + 386: 7(fvec4) Load 368(texel) + 387: 7(fvec4) FAdd 386 385 + Store 368(texel) 387 + 388: 156 Load 158(sCube) + 389: 148(fvec3) Load 150(c3) + 390: 6(float) Load 371(lod) + 391: 7(fvec4) ImageSampleExplicitLod 388 389 Lod 390 + 392: 7(fvec4) Load 368(texel) + 393: 7(fvec4) FAdd 392 391 + Store 368(texel) 393 + 394: 165 Load 167(s1DShadow) + 395: 148(fvec3) Load 150(c3) + 396: 6(float) Load 371(lod) + 397: 6(float) CompositeExtract 395 2 + 398: 6(float) ImageSampleDrefExplicitLod 394 395 397 Lod 396 + 399: 174(ptr) AccessChain 368(texel) 173 + 400: 6(float) Load 399 + 401: 6(float) FAdd 400 398 + 402: 174(ptr) AccessChain 368(texel) 173 + Store 402 401 + 403: 180 Load 182(s2DShadow) + 404: 148(fvec3) Load 150(c3) + 405: 6(float) Load 371(lod) + 406: 6(float) CompositeExtract 404 2 + 407: 6(float) ImageSampleDrefExplicitLod 403 404 406 Lod 405 + 408: 174(ptr) AccessChain 368(texel) 173 + 409: 6(float) Load 408 + 410: 6(float) FAdd 409 407 + 411: 174(ptr) AccessChain 368(texel) 173 + Store 411 410 + 412: 206 Load 208(s1DArray) + 413: 52(fvec2) Load 138(c2) + 414: 6(float) Load 371(lod) + 415: 7(fvec4) ImageSampleExplicitLod 412 413 Lod 414 + 416: 7(fvec4) Load 368(texel) + 417: 7(fvec4) FAdd 416 415 + Store 368(texel) 417 + 418: 215 Load 217(s2DArray) + 419: 148(fvec3) Load 150(c3) + 420: 6(float) Load 371(lod) + 421: 7(fvec4) ImageSampleExplicitLod 418 419 Lod 420 + 422: 7(fvec4) Load 368(texel) + 423: 7(fvec4) FAdd 422 421 + Store 368(texel) 423 + 424: 233 Load 235(s1DArrayShadow) + 425: 148(fvec3) Load 150(c3) + 426: 6(float) Load 371(lod) + 427: 6(float) CompositeExtract 425 2 + 428: 6(float) ImageSampleDrefExplicitLod 424 425 427 Lod 426 + 429: 174(ptr) AccessChain 368(texel) 173 + 430: 6(float) Load 429 + 431: 6(float) FAdd 430 428 + 432: 174(ptr) AccessChain 368(texel) 173 + Store 432 431 + 433: 224 Load 226(sCubeArray) + 434: 7(fvec4) Load 197(c4) + 435: 6(float) Load 371(lod) + 436: 7(fvec4) ImageSampleExplicitLod 433 434 Lod 435 + 437: 7(fvec4) Load 368(texel) + 438: 7(fvec4) FAdd 437 436 + Store 368(texel) 438 + 439: 7(fvec4) Load 368(texel) + ReturnValue 439 + FunctionEnd +15(testTextureOffset(): 7(fvec4) Function None 8 + 16: Label + 442(texel): 63(ptr) Variable Function + Store 442(texel) 120 + 443: 122 Load 124(s1D) + 444: 6(float) Load 127(c1) + 446: 7(fvec4) ImageSampleImplicitLod 443 444 ConstOffset 445 + 447: 7(fvec4) Load 442(texel) + 448: 7(fvec4) FAdd 447 446 + Store 442(texel) 448 + 449: 133 Load 135(s2D) + 450: 52(fvec2) Load 138(c2) + 453: 7(fvec4) ImageSampleImplicitLod 449 450 ConstOffset 452 + 454: 7(fvec4) Load 442(texel) + 455: 7(fvec4) FAdd 454 453 + Store 442(texel) 455 + 456: 144 Load 146(s3D) + 457: 148(fvec3) Load 150(c3) + 460: 7(fvec4) ImageSampleImplicitLod 456 457 ConstOffset 459 + 461: 7(fvec4) Load 442(texel) + 462: 7(fvec4) FAdd 461 460 + Store 442(texel) 462 + 463: 257 Load 259(s2DRect) + 464: 52(fvec2) Load 138(c2) + 465: 7(fvec4) ImageSampleImplicitLod 463 464 ConstOffset 452 + 466: 7(fvec4) Load 442(texel) + 467: 7(fvec4) FAdd 466 465 + Store 442(texel) 467 + 468: 266 Load 268(s2DRectShadow) + 469: 148(fvec3) Load 150(c3) + 470: 6(float) CompositeExtract 469 2 + 471: 6(float) ImageSampleDrefImplicitLod 468 469 470 ConstOffset 452 + 472: 174(ptr) AccessChain 442(texel) 173 + 473: 6(float) Load 472 + 474: 6(float) FAdd 473 471 + 475: 174(ptr) AccessChain 442(texel) 173 + Store 475 474 + 476: 165 Load 167(s1DShadow) + 477: 148(fvec3) Load 150(c3) + 478: 6(float) CompositeExtract 477 2 + 479: 6(float) ImageSampleDrefImplicitLod 476 477 478 ConstOffset 445 + 480: 174(ptr) AccessChain 442(texel) 173 + 481: 6(float) Load 480 + 482: 6(float) FAdd 481 479 + 483: 174(ptr) AccessChain 442(texel) 173 + Store 483 482 + 484: 180 Load 182(s2DShadow) + 485: 148(fvec3) Load 150(c3) + 486: 6(float) CompositeExtract 485 2 + 487: 6(float) ImageSampleDrefImplicitLod 484 485 486 ConstOffset 452 + 488: 174(ptr) AccessChain 442(texel) 173 + 489: 6(float) Load 488 + 490: 6(float) FAdd 489 487 + 491: 174(ptr) AccessChain 442(texel) 173 + Store 491 490 + 492: 206 Load 208(s1DArray) + 493: 52(fvec2) Load 138(c2) + 494: 7(fvec4) ImageSampleImplicitLod 492 493 ConstOffset 445 + 495: 7(fvec4) Load 442(texel) + 496: 7(fvec4) FAdd 495 494 + Store 442(texel) 496 + 497: 215 Load 217(s2DArray) + 498: 148(fvec3) Load 150(c3) + 499: 7(fvec4) ImageSampleImplicitLod 497 498 ConstOffset 452 + 500: 7(fvec4) Load 442(texel) + 501: 7(fvec4) FAdd 500 499 + Store 442(texel) 501 + 502: 233 Load 235(s1DArrayShadow) + 503: 148(fvec3) Load 150(c3) + 504: 6(float) CompositeExtract 503 2 + 505: 6(float) ImageSampleDrefImplicitLod 502 503 504 ConstOffset 445 + 506: 174(ptr) AccessChain 442(texel) 173 + 507: 6(float) Load 506 + 508: 6(float) FAdd 507 505 + 509: 174(ptr) AccessChain 442(texel) 173 + Store 509 508 + 510: 245 Load 247(s2DArrayShadow) + 511: 7(fvec4) Load 197(c4) + 512: 6(float) CompositeExtract 511 3 + 513: 6(float) ImageSampleDrefImplicitLod 510 511 512 ConstOffset 452 + 514: 174(ptr) AccessChain 442(texel) 173 + 515: 6(float) Load 514 + 516: 6(float) FAdd 515 513 + 517: 174(ptr) AccessChain 442(texel) 173 + Store 517 516 + 518: 7(fvec4) Load 442(texel) + ReturnValue 518 + FunctionEnd +17(testTextureProjOffset(): 7(fvec4) Function None 8 + 18: Label + 521(texel): 63(ptr) Variable Function + Store 521(texel) 120 + 522: 122 Load 124(s1D) + 523: 52(fvec2) Load 138(c2) + 524: 7(fvec4) ImageSampleProjImplicitLod 522 523 ConstOffset 445 + 525: 7(fvec4) Load 521(texel) + 526: 7(fvec4) FAdd 525 524 + Store 521(texel) 526 + 527: 122 Load 124(s1D) + 528: 7(fvec4) Load 197(c4) + 529: 6(float) CompositeExtract 528 3 + 530: 7(fvec4) CompositeInsert 529 528 1 + 531: 7(fvec4) ImageSampleProjImplicitLod 527 530 ConstOffset 445 + 532: 7(fvec4) Load 521(texel) + 533: 7(fvec4) FAdd 532 531 + Store 521(texel) 533 + 534: 133 Load 135(s2D) + 535: 148(fvec3) Load 150(c3) + 536: 7(fvec4) ImageSampleProjImplicitLod 534 535 ConstOffset 452 + 537: 7(fvec4) Load 521(texel) + 538: 7(fvec4) FAdd 537 536 + Store 521(texel) 538 + 539: 133 Load 135(s2D) + 540: 7(fvec4) Load 197(c4) + 541: 6(float) CompositeExtract 540 3 + 542: 7(fvec4) CompositeInsert 541 540 2 + 543: 7(fvec4) ImageSampleProjImplicitLod 539 542 ConstOffset 452 + 544: 7(fvec4) Load 521(texel) + 545: 7(fvec4) FAdd 544 543 + Store 521(texel) 545 + 546: 144 Load 146(s3D) + 547: 7(fvec4) Load 197(c4) + 548: 7(fvec4) ImageSampleProjImplicitLod 546 547 ConstOffset 459 + 549: 7(fvec4) Load 521(texel) + 550: 7(fvec4) FAdd 549 548 + Store 521(texel) 550 + 551: 257 Load 259(s2DRect) + 552: 148(fvec3) Load 150(c3) + 553: 7(fvec4) ImageSampleProjImplicitLod 551 552 ConstOffset 452 + 554: 7(fvec4) Load 521(texel) + 555: 7(fvec4) FAdd 554 553 + Store 521(texel) 555 + 556: 257 Load 259(s2DRect) + 557: 7(fvec4) Load 197(c4) + 558: 6(float) CompositeExtract 557 3 + 559: 7(fvec4) CompositeInsert 558 557 2 + 560: 7(fvec4) ImageSampleProjImplicitLod 556 559 ConstOffset 452 + 561: 7(fvec4) Load 521(texel) + 562: 7(fvec4) FAdd 561 560 + Store 521(texel) 562 + 563: 266 Load 268(s2DRectShadow) + 564: 7(fvec4) Load 197(c4) + 565: 6(float) CompositeExtract 564 2 + 566: 6(float) CompositeExtract 564 3 + 567: 7(fvec4) CompositeInsert 566 564 2 + 568: 6(float) ImageSampleProjDrefImplicitLod 563 567 565 ConstOffset 452 + 569: 174(ptr) AccessChain 521(texel) 173 + 570: 6(float) Load 569 + 571: 6(float) FAdd 570 568 + 572: 174(ptr) AccessChain 521(texel) 173 + Store 572 571 + 573: 165 Load 167(s1DShadow) + 574: 7(fvec4) Load 197(c4) + 575: 6(float) CompositeExtract 574 2 + 576: 6(float) CompositeExtract 574 3 + 577: 7(fvec4) CompositeInsert 576 574 1 + 578: 6(float) ImageSampleProjDrefImplicitLod 573 577 575 ConstOffset 445 + 579: 174(ptr) AccessChain 521(texel) 173 + 580: 6(float) Load 579 + 581: 6(float) FAdd 580 578 + 582: 174(ptr) AccessChain 521(texel) 173 + Store 582 581 + 583: 180 Load 182(s2DShadow) + 584: 7(fvec4) Load 197(c4) + 585: 6(float) CompositeExtract 584 2 + 586: 6(float) CompositeExtract 584 3 + 587: 7(fvec4) CompositeInsert 586 584 2 + 588: 6(float) ImageSampleProjDrefImplicitLod 583 587 585 ConstOffset 452 + 589: 174(ptr) AccessChain 521(texel) 173 + 590: 6(float) Load 589 + 591: 6(float) FAdd 590 588 + 592: 174(ptr) AccessChain 521(texel) 173 + Store 592 591 + 593: 7(fvec4) Load 521(texel) + ReturnValue 593 + FunctionEnd +19(testTextureLodOffset(): 7(fvec4) Function None 8 + 20: Label + 596(texel): 63(ptr) Variable Function + Store 596(texel) 120 + 597: 122 Load 124(s1D) + 598: 6(float) Load 127(c1) + 599: 6(float) Load 371(lod) + 600: 7(fvec4) ImageSampleExplicitLod 597 598 Lod ConstOffset 599 445 + 601: 7(fvec4) Load 596(texel) + 602: 7(fvec4) FAdd 601 600 + Store 596(texel) 602 + 603: 133 Load 135(s2D) + 604: 52(fvec2) Load 138(c2) + 605: 6(float) Load 371(lod) + 606: 7(fvec4) ImageSampleExplicitLod 603 604 Lod ConstOffset 605 452 + 607: 7(fvec4) Load 596(texel) + 608: 7(fvec4) FAdd 607 606 + Store 596(texel) 608 + 609: 144 Load 146(s3D) + 610: 148(fvec3) Load 150(c3) + 611: 6(float) Load 371(lod) + 612: 7(fvec4) ImageSampleExplicitLod 609 610 Lod ConstOffset 611 459 + 613: 7(fvec4) Load 596(texel) + 614: 7(fvec4) FAdd 613 612 + Store 596(texel) 614 + 615: 165 Load 167(s1DShadow) + 616: 148(fvec3) Load 150(c3) + 617: 6(float) Load 371(lod) + 618: 6(float) CompositeExtract 616 2 + 619: 6(float) ImageSampleDrefExplicitLod 615 616 618 Lod ConstOffset 617 445 + 620: 174(ptr) AccessChain 596(texel) 173 + 621: 6(float) Load 620 + 622: 6(float) FAdd 621 619 + 623: 174(ptr) AccessChain 596(texel) 173 + Store 623 622 + 624: 180 Load 182(s2DShadow) + 625: 148(fvec3) Load 150(c3) + 626: 6(float) Load 371(lod) + 627: 6(float) CompositeExtract 625 2 + 628: 6(float) ImageSampleDrefExplicitLod 624 625 627 Lod ConstOffset 626 452 + 629: 174(ptr) AccessChain 596(texel) 173 + 630: 6(float) Load 629 + 631: 6(float) FAdd 630 628 + 632: 174(ptr) AccessChain 596(texel) 173 + Store 632 631 + 633: 206 Load 208(s1DArray) + 634: 52(fvec2) Load 138(c2) + 635: 6(float) Load 371(lod) + 636: 7(fvec4) ImageSampleExplicitLod 633 634 Lod ConstOffset 635 445 + 637: 7(fvec4) Load 596(texel) + 638: 7(fvec4) FAdd 637 636 + Store 596(texel) 638 + 639: 215 Load 217(s2DArray) + 640: 148(fvec3) Load 150(c3) + 641: 6(float) Load 371(lod) + 642: 7(fvec4) ImageSampleExplicitLod 639 640 Lod ConstOffset 641 452 + 643: 7(fvec4) Load 596(texel) + 644: 7(fvec4) FAdd 643 642 + Store 596(texel) 644 + 645: 233 Load 235(s1DArrayShadow) + 646: 148(fvec3) Load 150(c3) + 647: 6(float) Load 371(lod) + 648: 6(float) CompositeExtract 646 2 + 649: 6(float) ImageSampleDrefExplicitLod 645 646 648 Lod ConstOffset 647 445 + 650: 174(ptr) AccessChain 596(texel) 173 + 651: 6(float) Load 650 + 652: 6(float) FAdd 651 649 + 653: 174(ptr) AccessChain 596(texel) 173 + Store 653 652 + 654: 7(fvec4) Load 596(texel) + ReturnValue 654 + FunctionEnd +21(testTextureProjLodOffset(): 7(fvec4) Function None 8 + 22: Label + 657(texel): 63(ptr) Variable Function + Store 657(texel) 120 + 658: 122 Load 124(s1D) + 659: 52(fvec2) Load 138(c2) + 660: 6(float) Load 371(lod) + 661: 7(fvec4) ImageSampleProjExplicitLod 658 659 Lod ConstOffset 660 445 + 662: 7(fvec4) Load 657(texel) + 663: 7(fvec4) FAdd 662 661 + Store 657(texel) 663 + 664: 122 Load 124(s1D) + 665: 7(fvec4) Load 197(c4) + 666: 6(float) Load 371(lod) + 667: 6(float) CompositeExtract 665 3 + 668: 7(fvec4) CompositeInsert 667 665 1 + 669: 7(fvec4) ImageSampleProjExplicitLod 664 668 Lod ConstOffset 666 445 + 670: 7(fvec4) Load 657(texel) + 671: 7(fvec4) FAdd 670 669 + Store 657(texel) 671 + 672: 133 Load 135(s2D) + 673: 148(fvec3) Load 150(c3) + 674: 6(float) Load 371(lod) + 675: 7(fvec4) ImageSampleProjExplicitLod 672 673 Lod ConstOffset 674 452 + 676: 7(fvec4) Load 657(texel) + 677: 7(fvec4) FAdd 676 675 + Store 657(texel) 677 + 678: 133 Load 135(s2D) + 679: 7(fvec4) Load 197(c4) + 680: 6(float) Load 371(lod) + 681: 6(float) CompositeExtract 679 3 + 682: 7(fvec4) CompositeInsert 681 679 2 + 683: 7(fvec4) ImageSampleProjExplicitLod 678 682 Lod ConstOffset 680 452 + 684: 7(fvec4) Load 657(texel) + 685: 7(fvec4) FAdd 684 683 + Store 657(texel) 685 + 686: 144 Load 146(s3D) + 687: 7(fvec4) Load 197(c4) + 688: 6(float) Load 371(lod) + 689: 7(fvec4) ImageSampleProjExplicitLod 686 687 Lod ConstOffset 688 459 + 690: 7(fvec4) Load 657(texel) + 691: 7(fvec4) FAdd 690 689 + Store 657(texel) 691 + 692: 165 Load 167(s1DShadow) + 693: 7(fvec4) Load 197(c4) + 694: 6(float) Load 371(lod) + 695: 6(float) CompositeExtract 693 2 + 696: 6(float) CompositeExtract 693 3 + 697: 7(fvec4) CompositeInsert 696 693 1 + 698: 6(float) ImageSampleProjDrefExplicitLod 692 697 695 Lod ConstOffset 694 445 + 699: 174(ptr) AccessChain 657(texel) 173 + 700: 6(float) Load 699 + 701: 6(float) FAdd 700 698 + 702: 174(ptr) AccessChain 657(texel) 173 + Store 702 701 + 703: 180 Load 182(s2DShadow) + 704: 7(fvec4) Load 197(c4) + 705: 6(float) Load 371(lod) + 706: 6(float) CompositeExtract 704 2 + 707: 6(float) CompositeExtract 704 3 + 708: 7(fvec4) CompositeInsert 707 704 2 + 709: 6(float) ImageSampleProjDrefExplicitLod 703 708 706 Lod ConstOffset 705 452 + 710: 174(ptr) AccessChain 657(texel) 173 + 711: 6(float) Load 710 + 712: 6(float) FAdd 711 709 + 713: 174(ptr) AccessChain 657(texel) 173 + Store 713 712 + 714: 7(fvec4) Load 657(texel) + ReturnValue 714 + FunctionEnd +23(testTexelFetch(): 7(fvec4) Function None 8 + 24: Label + 717(texel): 63(ptr) Variable Function + Store 717(texel) 120 + 718: 122 Load 124(s1D) + 719: 6(float) Load 127(c1) + 720: 47(int) ConvertFToS 719 + 721: 6(float) Load 371(lod) + 722: 47(int) ConvertFToS 721 + 723: 121 Image 718 + 724: 7(fvec4) ImageFetch 723 720 Lod 722 + 725: 7(fvec4) Load 717(texel) + 726: 7(fvec4) FAdd 725 724 + Store 717(texel) 726 + 727: 133 Load 135(s2D) + 728: 52(fvec2) Load 138(c2) + 729: 451(ivec2) ConvertFToS 728 + 730: 6(float) Load 371(lod) + 731: 47(int) ConvertFToS 730 + 732: 132 Image 727 + 733: 7(fvec4) ImageFetch 732 729 Lod 731 + 734: 7(fvec4) Load 717(texel) + 735: 7(fvec4) FAdd 734 733 + Store 717(texel) 735 + 736: 144 Load 146(s3D) + 737: 148(fvec3) Load 150(c3) + 738: 458(ivec3) ConvertFToS 737 + 739: 6(float) Load 371(lod) + 740: 47(int) ConvertFToS 739 + 741: 143 Image 736 + 742: 7(fvec4) ImageFetch 741 738 Lod 740 + 743: 7(fvec4) Load 717(texel) + 744: 7(fvec4) FAdd 743 742 + Store 717(texel) 744 + 745: 257 Load 259(s2DRect) + 746: 52(fvec2) Load 138(c2) + 747: 451(ivec2) ConvertFToS 746 + 748: 256 Image 745 + 749: 7(fvec4) ImageFetch 748 747 + 750: 7(fvec4) Load 717(texel) + 751: 7(fvec4) FAdd 750 749 + Store 717(texel) 751 + 752: 206 Load 208(s1DArray) + 753: 52(fvec2) Load 138(c2) + 754: 451(ivec2) ConvertFToS 753 + 755: 6(float) Load 371(lod) + 756: 47(int) ConvertFToS 755 + 757: 205 Image 752 + 758: 7(fvec4) ImageFetch 757 754 Lod 756 + 759: 7(fvec4) Load 717(texel) + 760: 7(fvec4) FAdd 759 758 + Store 717(texel) 760 + 761: 215 Load 217(s2DArray) + 762: 148(fvec3) Load 150(c3) + 763: 458(ivec3) ConvertFToS 762 + 764: 6(float) Load 371(lod) + 765: 47(int) ConvertFToS 764 + 766: 214 Image 761 + 767: 7(fvec4) ImageFetch 766 763 Lod 765 + 768: 7(fvec4) Load 717(texel) + 769: 7(fvec4) FAdd 768 767 + Store 717(texel) 769 + 774: 771 Load 773(sBuffer) + 775: 6(float) Load 127(c1) + 776: 47(int) ConvertFToS 775 + 777: 770 Image 774 + 778: 7(fvec4) ImageFetch 777 776 + 779: 7(fvec4) Load 717(texel) + 780: 7(fvec4) FAdd 779 778 + Store 717(texel) 780 + 785: 782 Load 784(s2DMS) + 786: 52(fvec2) Load 138(c2) + 787: 451(ivec2) ConvertFToS 786 + 788: 781 Image 785 + 789: 7(fvec4) ImageFetch 788 787 Sample 445 + 790: 7(fvec4) Load 717(texel) + 791: 7(fvec4) FAdd 790 789 + Store 717(texel) 791 + 796: 793 Load 795(s2DMSArray) + 797: 148(fvec3) Load 150(c3) + 798: 458(ivec3) ConvertFToS 797 + 800: 792 Image 796 + 801: 7(fvec4) ImageFetch 800 798 Sample 799 + 802: 7(fvec4) Load 717(texel) + 803: 7(fvec4) FAdd 802 801 + Store 717(texel) 803 + 804: 7(fvec4) Load 717(texel) + ReturnValue 804 + FunctionEnd +25(testTexelFetchOffset(): 7(fvec4) Function None 8 + 26: Label + 807(texel): 63(ptr) Variable Function + Store 807(texel) 120 + 808: 122 Load 124(s1D) + 809: 6(float) Load 127(c1) + 810: 47(int) ConvertFToS 809 + 811: 6(float) Load 371(lod) + 812: 47(int) ConvertFToS 811 + 813: 121 Image 808 + 814: 7(fvec4) ImageFetch 813 810 Lod ConstOffset 812 445 + 815: 7(fvec4) Load 807(texel) + 816: 7(fvec4) FAdd 815 814 + Store 807(texel) 816 + 817: 133 Load 135(s2D) + 818: 52(fvec2) Load 138(c2) + 819: 451(ivec2) ConvertFToS 818 + 820: 6(float) Load 371(lod) + 821: 47(int) ConvertFToS 820 + 822: 132 Image 817 + 823: 7(fvec4) ImageFetch 822 819 Lod ConstOffset 821 452 + 824: 7(fvec4) Load 807(texel) + 825: 7(fvec4) FAdd 824 823 + Store 807(texel) 825 + 826: 144 Load 146(s3D) + 827: 148(fvec3) Load 150(c3) + 828: 458(ivec3) ConvertFToS 827 + 829: 6(float) Load 371(lod) + 830: 47(int) ConvertFToS 829 + 831: 143 Image 826 + 832: 7(fvec4) ImageFetch 831 828 Lod ConstOffset 830 459 + 833: 7(fvec4) Load 807(texel) + 834: 7(fvec4) FAdd 833 832 + Store 807(texel) 834 + 835: 257 Load 259(s2DRect) + 836: 52(fvec2) Load 138(c2) + 837: 451(ivec2) ConvertFToS 836 + 838: 256 Image 835 + 839: 7(fvec4) ImageFetch 838 837 ConstOffset 452 + 840: 7(fvec4) Load 807(texel) + 841: 7(fvec4) FAdd 840 839 + Store 807(texel) 841 + 842: 206 Load 208(s1DArray) + 843: 52(fvec2) Load 138(c2) + 844: 451(ivec2) ConvertFToS 843 + 845: 6(float) Load 371(lod) + 846: 47(int) ConvertFToS 845 + 847: 205 Image 842 + 848: 7(fvec4) ImageFetch 847 844 Lod ConstOffset 846 445 + 849: 7(fvec4) Load 807(texel) + 850: 7(fvec4) FAdd 849 848 + Store 807(texel) 850 + 851: 215 Load 217(s2DArray) + 852: 148(fvec3) Load 150(c3) + 853: 458(ivec3) ConvertFToS 852 + 854: 6(float) Load 371(lod) + 855: 47(int) ConvertFToS 854 + 856: 214 Image 851 + 857: 7(fvec4) ImageFetch 856 853 Lod ConstOffset 855 452 + 858: 7(fvec4) Load 807(texel) + 859: 7(fvec4) FAdd 858 857 + Store 807(texel) 859 + 860: 7(fvec4) Load 807(texel) + ReturnValue 860 + FunctionEnd +27(testTextureGrad(): 7(fvec4) Function None 8 + 28: Label + 863(texel): 63(ptr) Variable Function + Store 863(texel) 120 + 864: 122 Load 124(s1D) + 865: 6(float) Load 127(c1) + 867: 6(float) Load 866(dPdxy1) + 868: 6(float) Load 866(dPdxy1) + 869: 7(fvec4) ImageSampleExplicitLod 864 865 Grad 867 868 + 870: 7(fvec4) Load 863(texel) + 871: 7(fvec4) FAdd 870 869 + Store 863(texel) 871 + 872: 133 Load 135(s2D) + 873: 52(fvec2) Load 138(c2) + 875: 52(fvec2) Load 874(dPdxy2) + 876: 52(fvec2) Load 874(dPdxy2) + 877: 7(fvec4) ImageSampleExplicitLod 872 873 Grad 875 876 + 878: 7(fvec4) Load 863(texel) + 879: 7(fvec4) FAdd 878 877 + Store 863(texel) 879 + 880: 144 Load 146(s3D) + 881: 148(fvec3) Load 150(c3) + 883: 148(fvec3) Load 882(dPdxy3) + 884: 148(fvec3) Load 882(dPdxy3) + 885: 7(fvec4) ImageSampleExplicitLod 880 881 Grad 883 884 + 886: 7(fvec4) Load 863(texel) + 887: 7(fvec4) FAdd 886 885 + Store 863(texel) 887 + 888: 156 Load 158(sCube) + 889: 148(fvec3) Load 150(c3) + 890: 148(fvec3) Load 882(dPdxy3) + 891: 148(fvec3) Load 882(dPdxy3) + 892: 7(fvec4) ImageSampleExplicitLod 888 889 Grad 890 891 + 893: 7(fvec4) Load 863(texel) + 894: 7(fvec4) FAdd 893 892 + Store 863(texel) 894 + 895: 257 Load 259(s2DRect) + 896: 52(fvec2) Load 138(c2) + 897: 52(fvec2) Load 874(dPdxy2) + 898: 52(fvec2) Load 874(dPdxy2) + 899: 7(fvec4) ImageSampleExplicitLod 895 896 Grad 897 898 + 900: 7(fvec4) Load 863(texel) + 901: 7(fvec4) FAdd 900 899 + Store 863(texel) 901 + 902: 266 Load 268(s2DRectShadow) + 903: 148(fvec3) Load 150(c3) + 904: 52(fvec2) Load 874(dPdxy2) + 905: 52(fvec2) Load 874(dPdxy2) + 906: 6(float) CompositeExtract 903 2 + 907: 6(float) ImageSampleDrefExplicitLod 902 903 906 Grad 904 905 + 908: 174(ptr) AccessChain 863(texel) 173 + 909: 6(float) Load 908 + 910: 6(float) FAdd 909 907 + 911: 174(ptr) AccessChain 863(texel) 173 + Store 911 910 + 912: 165 Load 167(s1DShadow) + 913: 148(fvec3) Load 150(c3) + 914: 6(float) Load 866(dPdxy1) + 915: 6(float) Load 866(dPdxy1) + 916: 6(float) CompositeExtract 913 2 + 917: 6(float) ImageSampleDrefExplicitLod 912 913 916 Grad 914 915 + 918: 174(ptr) AccessChain 863(texel) 173 + 919: 6(float) Load 918 + 920: 6(float) FAdd 919 917 + 921: 174(ptr) AccessChain 863(texel) 173 + Store 921 920 + 922: 180 Load 182(s2DShadow) + 923: 148(fvec3) Load 150(c3) + 924: 52(fvec2) Load 874(dPdxy2) + 925: 52(fvec2) Load 874(dPdxy2) + 926: 6(float) CompositeExtract 923 2 + 927: 6(float) ImageSampleDrefExplicitLod 922 923 926 Grad 924 925 + 928: 174(ptr) AccessChain 863(texel) 173 + 929: 6(float) Load 928 + 930: 6(float) FAdd 929 927 + 931: 174(ptr) AccessChain 863(texel) 173 + Store 931 930 + 932: 192 Load 194(sCubeShadow) + 933: 7(fvec4) Load 197(c4) + 934: 148(fvec3) Load 882(dPdxy3) + 935: 148(fvec3) Load 882(dPdxy3) + 936: 6(float) CompositeExtract 933 3 + 937: 6(float) ImageSampleDrefExplicitLod 932 933 936 Grad 934 935 + 938: 174(ptr) AccessChain 863(texel) 173 + 939: 6(float) Load 938 + 940: 6(float) FAdd 939 937 + 941: 174(ptr) AccessChain 863(texel) 173 + Store 941 940 + 942: 206 Load 208(s1DArray) + 943: 52(fvec2) Load 138(c2) + 944: 6(float) Load 866(dPdxy1) + 945: 6(float) Load 866(dPdxy1) + 946: 7(fvec4) ImageSampleExplicitLod 942 943 Grad 944 945 + 947: 7(fvec4) Load 863(texel) + 948: 7(fvec4) FAdd 947 946 + Store 863(texel) 948 + 949: 215 Load 217(s2DArray) + 950: 148(fvec3) Load 150(c3) + 951: 52(fvec2) Load 874(dPdxy2) + 952: 52(fvec2) Load 874(dPdxy2) + 953: 7(fvec4) ImageSampleExplicitLod 949 950 Grad 951 952 + 954: 7(fvec4) Load 863(texel) + 955: 7(fvec4) FAdd 954 953 + Store 863(texel) 955 + 956: 233 Load 235(s1DArrayShadow) + 957: 148(fvec3) Load 150(c3) + 958: 6(float) Load 866(dPdxy1) + 959: 6(float) Load 866(dPdxy1) + 960: 6(float) CompositeExtract 957 2 + 961: 6(float) ImageSampleDrefExplicitLod 956 957 960 Grad 958 959 + 962: 174(ptr) AccessChain 863(texel) 173 + 963: 6(float) Load 962 + 964: 6(float) FAdd 963 961 + 965: 174(ptr) AccessChain 863(texel) 173 + Store 965 964 + 966: 245 Load 247(s2DArrayShadow) + 967: 7(fvec4) Load 197(c4) + 968: 52(fvec2) Load 874(dPdxy2) + 969: 52(fvec2) Load 874(dPdxy2) + 970: 6(float) CompositeExtract 967 3 + 971: 6(float) ImageSampleDrefExplicitLod 966 967 970 Grad 968 969 + 972: 174(ptr) AccessChain 863(texel) 173 + 973: 6(float) Load 972 + 974: 6(float) FAdd 973 971 + 975: 174(ptr) AccessChain 863(texel) 173 + Store 975 974 + 976: 224 Load 226(sCubeArray) + 977: 7(fvec4) Load 197(c4) + 978: 148(fvec3) Load 882(dPdxy3) + 979: 148(fvec3) Load 882(dPdxy3) + 980: 7(fvec4) ImageSampleExplicitLod 976 977 Grad 978 979 + 981: 7(fvec4) Load 863(texel) + 982: 7(fvec4) FAdd 981 980 + Store 863(texel) 982 + 983: 7(fvec4) Load 863(texel) + ReturnValue 983 + FunctionEnd +29(testTextureGradOffset(): 7(fvec4) Function None 8 + 30: Label + 986(texel): 63(ptr) Variable Function + Store 986(texel) 120 + 987: 122 Load 124(s1D) + 988: 6(float) Load 127(c1) + 989: 6(float) Load 866(dPdxy1) + 990: 6(float) Load 866(dPdxy1) + 991: 7(fvec4) ImageSampleExplicitLod 987 988 Grad ConstOffset 989 990 445 + 992: 7(fvec4) Load 986(texel) + 993: 7(fvec4) FAdd 992 991 + Store 986(texel) 993 + 994: 133 Load 135(s2D) + 995: 52(fvec2) Load 138(c2) + 996: 52(fvec2) Load 874(dPdxy2) + 997: 52(fvec2) Load 874(dPdxy2) + 998: 7(fvec4) ImageSampleExplicitLod 994 995 Grad ConstOffset 996 997 452 + 999: 7(fvec4) Load 986(texel) + 1000: 7(fvec4) FAdd 999 998 + Store 986(texel) 1000 + 1001: 144 Load 146(s3D) + 1002: 148(fvec3) Load 150(c3) + 1003: 148(fvec3) Load 882(dPdxy3) + 1004: 148(fvec3) Load 882(dPdxy3) + 1005: 7(fvec4) ImageSampleExplicitLod 1001 1002 Grad ConstOffset 1003 1004 459 + 1006: 7(fvec4) Load 986(texel) + 1007: 7(fvec4) FAdd 1006 1005 + Store 986(texel) 1007 + 1008: 257 Load 259(s2DRect) + 1009: 52(fvec2) Load 138(c2) + 1010: 52(fvec2) Load 874(dPdxy2) + 1011: 52(fvec2) Load 874(dPdxy2) + 1012: 7(fvec4) ImageSampleExplicitLod 1008 1009 Grad ConstOffset 1010 1011 452 + 1013: 7(fvec4) Load 986(texel) + 1014: 7(fvec4) FAdd 1013 1012 + Store 986(texel) 1014 + 1015: 266 Load 268(s2DRectShadow) + 1016: 148(fvec3) Load 150(c3) + 1017: 52(fvec2) Load 874(dPdxy2) + 1018: 52(fvec2) Load 874(dPdxy2) + 1019: 6(float) CompositeExtract 1016 2 + 1020: 6(float) ImageSampleDrefExplicitLod 1015 1016 1019 Grad ConstOffset 1017 1018 452 + 1021: 174(ptr) AccessChain 986(texel) 173 + 1022: 6(float) Load 1021 + 1023: 6(float) FAdd 1022 1020 + 1024: 174(ptr) AccessChain 986(texel) 173 + Store 1024 1023 + 1025: 165 Load 167(s1DShadow) + 1026: 148(fvec3) Load 150(c3) + 1027: 6(float) Load 866(dPdxy1) + 1028: 6(float) Load 866(dPdxy1) + 1029: 6(float) CompositeExtract 1026 2 + 1030: 6(float) ImageSampleDrefExplicitLod 1025 1026 1029 Grad ConstOffset 1027 1028 445 + 1031: 174(ptr) AccessChain 986(texel) 173 + 1032: 6(float) Load 1031 + 1033: 6(float) FAdd 1032 1030 + 1034: 174(ptr) AccessChain 986(texel) 173 + Store 1034 1033 + 1035: 180 Load 182(s2DShadow) + 1036: 148(fvec3) Load 150(c3) + 1037: 52(fvec2) Load 874(dPdxy2) + 1038: 52(fvec2) Load 874(dPdxy2) + 1039: 6(float) CompositeExtract 1036 2 + 1040: 6(float) ImageSampleDrefExplicitLod 1035 1036 1039 Grad ConstOffset 1037 1038 452 + 1041: 174(ptr) AccessChain 986(texel) 173 + 1042: 6(float) Load 1041 + 1043: 6(float) FAdd 1042 1040 + 1044: 174(ptr) AccessChain 986(texel) 173 + Store 1044 1043 + 1045: 206 Load 208(s1DArray) + 1046: 52(fvec2) Load 138(c2) + 1047: 6(float) Load 866(dPdxy1) + 1048: 6(float) Load 866(dPdxy1) + 1049: 7(fvec4) ImageSampleExplicitLod 1045 1046 Grad ConstOffset 1047 1048 445 + 1050: 7(fvec4) Load 986(texel) + 1051: 7(fvec4) FAdd 1050 1049 + Store 986(texel) 1051 + 1052: 215 Load 217(s2DArray) + 1053: 148(fvec3) Load 150(c3) + 1054: 52(fvec2) Load 874(dPdxy2) + 1055: 52(fvec2) Load 874(dPdxy2) + 1056: 7(fvec4) ImageSampleExplicitLod 1052 1053 Grad ConstOffset 1054 1055 452 + 1057: 7(fvec4) Load 986(texel) + 1058: 7(fvec4) FAdd 1057 1056 + Store 986(texel) 1058 + 1059: 233 Load 235(s1DArrayShadow) + 1060: 148(fvec3) Load 150(c3) + 1061: 6(float) Load 866(dPdxy1) + 1062: 6(float) Load 866(dPdxy1) + 1063: 6(float) CompositeExtract 1060 2 + 1064: 6(float) ImageSampleDrefExplicitLod 1059 1060 1063 Grad ConstOffset 1061 1062 445 + 1065: 174(ptr) AccessChain 986(texel) 173 + 1066: 6(float) Load 1065 + 1067: 6(float) FAdd 1066 1064 + 1068: 174(ptr) AccessChain 986(texel) 173 + Store 1068 1067 + 1069: 245 Load 247(s2DArrayShadow) + 1070: 7(fvec4) Load 197(c4) + 1071: 52(fvec2) Load 874(dPdxy2) + 1072: 52(fvec2) Load 874(dPdxy2) + 1073: 6(float) CompositeExtract 1070 3 + 1074: 6(float) ImageSampleDrefExplicitLod 1069 1070 1073 Grad ConstOffset 1071 1072 452 + 1075: 174(ptr) AccessChain 986(texel) 173 + 1076: 6(float) Load 1075 + 1077: 6(float) FAdd 1076 1074 + 1078: 174(ptr) AccessChain 986(texel) 173 + Store 1078 1077 + 1079: 7(fvec4) Load 986(texel) + ReturnValue 1079 + FunctionEnd +31(testTextureProjGrad(): 7(fvec4) Function None 8 + 32: Label + 1082(texel): 63(ptr) Variable Function + Store 1082(texel) 120 + 1083: 122 Load 124(s1D) + 1084: 52(fvec2) Load 138(c2) + 1085: 6(float) Load 866(dPdxy1) + 1086: 6(float) Load 866(dPdxy1) + 1087: 7(fvec4) ImageSampleProjExplicitLod 1083 1084 Grad 1085 1086 + 1088: 7(fvec4) Load 1082(texel) + 1089: 7(fvec4) FAdd 1088 1087 + Store 1082(texel) 1089 + 1090: 122 Load 124(s1D) + 1091: 7(fvec4) Load 197(c4) + 1092: 6(float) Load 866(dPdxy1) + 1093: 6(float) Load 866(dPdxy1) + 1094: 6(float) CompositeExtract 1091 3 + 1095: 7(fvec4) CompositeInsert 1094 1091 1 + 1096: 7(fvec4) ImageSampleProjExplicitLod 1090 1095 Grad 1092 1093 + 1097: 7(fvec4) Load 1082(texel) + 1098: 7(fvec4) FAdd 1097 1096 + Store 1082(texel) 1098 + 1099: 133 Load 135(s2D) + 1100: 148(fvec3) Load 150(c3) + 1101: 52(fvec2) Load 874(dPdxy2) + 1102: 52(fvec2) Load 874(dPdxy2) + 1103: 7(fvec4) ImageSampleProjExplicitLod 1099 1100 Grad 1101 1102 + 1104: 7(fvec4) Load 1082(texel) + 1105: 7(fvec4) FAdd 1104 1103 + Store 1082(texel) 1105 + 1106: 133 Load 135(s2D) + 1107: 7(fvec4) Load 197(c4) + 1108: 52(fvec2) Load 874(dPdxy2) + 1109: 52(fvec2) Load 874(dPdxy2) + 1110: 6(float) CompositeExtract 1107 3 + 1111: 7(fvec4) CompositeInsert 1110 1107 2 + 1112: 7(fvec4) ImageSampleProjExplicitLod 1106 1111 Grad 1108 1109 + 1113: 7(fvec4) Load 1082(texel) + 1114: 7(fvec4) FAdd 1113 1112 + Store 1082(texel) 1114 + 1115: 144 Load 146(s3D) + 1116: 7(fvec4) Load 197(c4) + 1117: 148(fvec3) Load 882(dPdxy3) + 1118: 148(fvec3) Load 882(dPdxy3) + 1119: 7(fvec4) ImageSampleProjExplicitLod 1115 1116 Grad 1117 1118 + 1120: 7(fvec4) Load 1082(texel) + 1121: 7(fvec4) FAdd 1120 1119 + Store 1082(texel) 1121 + 1122: 257 Load 259(s2DRect) + 1123: 148(fvec3) Load 150(c3) + 1124: 52(fvec2) Load 874(dPdxy2) + 1125: 52(fvec2) Load 874(dPdxy2) + 1126: 7(fvec4) ImageSampleProjExplicitLod 1122 1123 Grad 1124 1125 + 1127: 7(fvec4) Load 1082(texel) + 1128: 7(fvec4) FAdd 1127 1126 + Store 1082(texel) 1128 + 1129: 257 Load 259(s2DRect) + 1130: 7(fvec4) Load 197(c4) + 1131: 52(fvec2) Load 874(dPdxy2) + 1132: 52(fvec2) Load 874(dPdxy2) + 1133: 6(float) CompositeExtract 1130 3 + 1134: 7(fvec4) CompositeInsert 1133 1130 2 + 1135: 7(fvec4) ImageSampleProjExplicitLod 1129 1134 Grad 1131 1132 + 1136: 7(fvec4) Load 1082(texel) + 1137: 7(fvec4) FAdd 1136 1135 + Store 1082(texel) 1137 + 1138: 266 Load 268(s2DRectShadow) + 1139: 7(fvec4) Load 197(c4) + 1140: 52(fvec2) Load 874(dPdxy2) + 1141: 52(fvec2) Load 874(dPdxy2) + 1142: 6(float) CompositeExtract 1139 2 + 1143: 6(float) CompositeExtract 1139 3 + 1144: 7(fvec4) CompositeInsert 1143 1139 2 + 1145: 6(float) ImageSampleProjDrefExplicitLod 1138 1144 1142 Grad 1140 1141 + 1146: 174(ptr) AccessChain 1082(texel) 173 + 1147: 6(float) Load 1146 + 1148: 6(float) FAdd 1147 1145 + 1149: 174(ptr) AccessChain 1082(texel) 173 + Store 1149 1148 + 1150: 165 Load 167(s1DShadow) + 1151: 7(fvec4) Load 197(c4) + 1152: 6(float) Load 866(dPdxy1) + 1153: 6(float) Load 866(dPdxy1) + 1154: 6(float) CompositeExtract 1151 2 + 1155: 6(float) CompositeExtract 1151 3 + 1156: 7(fvec4) CompositeInsert 1155 1151 1 + 1157: 6(float) ImageSampleProjDrefExplicitLod 1150 1156 1154 Grad 1152 1153 + 1158: 174(ptr) AccessChain 1082(texel) 173 + 1159: 6(float) Load 1158 + 1160: 6(float) FAdd 1159 1157 + 1161: 174(ptr) AccessChain 1082(texel) 173 + Store 1161 1160 + 1162: 180 Load 182(s2DShadow) + 1163: 7(fvec4) Load 197(c4) + 1164: 52(fvec2) Load 874(dPdxy2) + 1165: 52(fvec2) Load 874(dPdxy2) + 1166: 6(float) CompositeExtract 1163 2 + 1167: 6(float) CompositeExtract 1163 3 + 1168: 7(fvec4) CompositeInsert 1167 1163 2 + 1169: 6(float) ImageSampleProjDrefExplicitLod 1162 1168 1166 Grad 1164 1165 + 1170: 174(ptr) AccessChain 1082(texel) 173 + 1171: 6(float) Load 1170 + 1172: 6(float) FAdd 1171 1169 + 1173: 174(ptr) AccessChain 1082(texel) 173 + Store 1173 1172 + 1174: 7(fvec4) Load 1082(texel) + ReturnValue 1174 + FunctionEnd +33(testTextureProjGradoffset(): 7(fvec4) Function None 8 + 34: Label + 1177(texel): 63(ptr) Variable Function + Store 1177(texel) 120 + 1178: 122 Load 124(s1D) + 1179: 52(fvec2) Load 138(c2) + 1180: 6(float) Load 866(dPdxy1) + 1181: 6(float) Load 866(dPdxy1) + 1182: 7(fvec4) ImageSampleProjExplicitLod 1178 1179 Grad ConstOffset 1180 1181 445 + 1183: 7(fvec4) Load 1177(texel) + 1184: 7(fvec4) FAdd 1183 1182 + Store 1177(texel) 1184 + 1185: 122 Load 124(s1D) + 1186: 7(fvec4) Load 197(c4) + 1187: 6(float) Load 866(dPdxy1) + 1188: 6(float) Load 866(dPdxy1) + 1189: 6(float) CompositeExtract 1186 3 + 1190: 7(fvec4) CompositeInsert 1189 1186 1 + 1191: 7(fvec4) ImageSampleProjExplicitLod 1185 1190 Grad ConstOffset 1187 1188 445 + 1192: 7(fvec4) Load 1177(texel) + 1193: 7(fvec4) FAdd 1192 1191 + Store 1177(texel) 1193 + 1194: 133 Load 135(s2D) + 1195: 148(fvec3) Load 150(c3) + 1196: 52(fvec2) Load 874(dPdxy2) + 1197: 52(fvec2) Load 874(dPdxy2) + 1198: 7(fvec4) ImageSampleProjExplicitLod 1194 1195 Grad ConstOffset 1196 1197 452 + 1199: 7(fvec4) Load 1177(texel) + 1200: 7(fvec4) FAdd 1199 1198 + Store 1177(texel) 1200 + 1201: 133 Load 135(s2D) + 1202: 7(fvec4) Load 197(c4) + 1203: 52(fvec2) Load 874(dPdxy2) + 1204: 52(fvec2) Load 874(dPdxy2) + 1205: 6(float) CompositeExtract 1202 3 + 1206: 7(fvec4) CompositeInsert 1205 1202 2 + 1207: 7(fvec4) ImageSampleProjExplicitLod 1201 1206 Grad ConstOffset 1203 1204 452 + 1208: 7(fvec4) Load 1177(texel) + 1209: 7(fvec4) FAdd 1208 1207 + Store 1177(texel) 1209 + 1210: 257 Load 259(s2DRect) + 1211: 148(fvec3) Load 150(c3) + 1212: 52(fvec2) Load 874(dPdxy2) + 1213: 52(fvec2) Load 874(dPdxy2) + 1214: 7(fvec4) ImageSampleProjExplicitLod 1210 1211 Grad ConstOffset 1212 1213 452 + 1215: 7(fvec4) Load 1177(texel) + 1216: 7(fvec4) FAdd 1215 1214 + Store 1177(texel) 1216 + 1217: 257 Load 259(s2DRect) + 1218: 7(fvec4) Load 197(c4) + 1219: 52(fvec2) Load 874(dPdxy2) + 1220: 52(fvec2) Load 874(dPdxy2) + 1221: 6(float) CompositeExtract 1218 3 + 1222: 7(fvec4) CompositeInsert 1221 1218 2 + 1223: 7(fvec4) ImageSampleProjExplicitLod 1217 1222 Grad ConstOffset 1219 1220 452 + 1224: 7(fvec4) Load 1177(texel) + 1225: 7(fvec4) FAdd 1224 1223 + Store 1177(texel) 1225 + 1226: 266 Load 268(s2DRectShadow) + 1227: 7(fvec4) Load 197(c4) + 1228: 52(fvec2) Load 874(dPdxy2) + 1229: 52(fvec2) Load 874(dPdxy2) + 1230: 6(float) CompositeExtract 1227 2 + 1231: 6(float) CompositeExtract 1227 3 + 1232: 7(fvec4) CompositeInsert 1231 1227 2 + 1233: 6(float) ImageSampleProjDrefExplicitLod 1226 1232 1230 Grad ConstOffset 1228 1229 452 + 1234: 174(ptr) AccessChain 1177(texel) 173 + 1235: 6(float) Load 1234 + 1236: 6(float) FAdd 1235 1233 + 1237: 174(ptr) AccessChain 1177(texel) 173 + Store 1237 1236 + 1238: 144 Load 146(s3D) + 1239: 7(fvec4) Load 197(c4) + 1240: 148(fvec3) Load 882(dPdxy3) + 1241: 148(fvec3) Load 882(dPdxy3) + 1242: 7(fvec4) ImageSampleProjExplicitLod 1238 1239 Grad ConstOffset 1240 1241 459 + 1243: 7(fvec4) Load 1177(texel) + 1244: 7(fvec4) FAdd 1243 1242 + Store 1177(texel) 1244 + 1245: 165 Load 167(s1DShadow) + 1246: 7(fvec4) Load 197(c4) + 1247: 6(float) Load 866(dPdxy1) + 1248: 6(float) Load 866(dPdxy1) + 1249: 6(float) CompositeExtract 1246 2 + 1250: 6(float) CompositeExtract 1246 3 + 1251: 7(fvec4) CompositeInsert 1250 1246 1 + 1252: 6(float) ImageSampleProjDrefExplicitLod 1245 1251 1249 Grad ConstOffset 1247 1248 445 + 1253: 174(ptr) AccessChain 1177(texel) 173 + 1254: 6(float) Load 1253 + 1255: 6(float) FAdd 1254 1252 + 1256: 174(ptr) AccessChain 1177(texel) 173 + Store 1256 1255 + 1257: 180 Load 182(s2DShadow) + 1258: 7(fvec4) Load 197(c4) + 1259: 52(fvec2) Load 874(dPdxy2) + 1260: 52(fvec2) Load 874(dPdxy2) + 1261: 6(float) CompositeExtract 1258 2 + 1262: 6(float) CompositeExtract 1258 3 + 1263: 7(fvec4) CompositeInsert 1262 1258 2 + 1264: 6(float) ImageSampleProjDrefExplicitLod 1257 1263 1261 Grad ConstOffset 1259 1260 452 + 1265: 174(ptr) AccessChain 1177(texel) 173 + 1266: 6(float) Load 1265 + 1267: 6(float) FAdd 1266 1264 + 1268: 174(ptr) AccessChain 1177(texel) 173 + Store 1268 1267 + 1269: 7(fvec4) Load 1177(texel) + ReturnValue 1269 + FunctionEnd +35(testTextureGather(): 7(fvec4) Function None 8 + 36: Label + 1272(texel): 63(ptr) Variable Function + Store 1272(texel) 120 + 1273: 133 Load 135(s2D) + 1274: 52(fvec2) Load 138(c2) + 1276: 7(fvec4) ImageGather 1273 1274 1275 + 1277: 7(fvec4) Load 1272(texel) + 1278: 7(fvec4) FAdd 1277 1276 + Store 1272(texel) 1278 + 1279: 215 Load 217(s2DArray) + 1280: 148(fvec3) Load 150(c3) + 1281: 7(fvec4) ImageGather 1279 1280 1275 + 1282: 7(fvec4) Load 1272(texel) + 1283: 7(fvec4) FAdd 1282 1281 + Store 1272(texel) 1283 + 1284: 156 Load 158(sCube) + 1285: 148(fvec3) Load 150(c3) + 1286: 7(fvec4) ImageGather 1284 1285 1275 + 1287: 7(fvec4) Load 1272(texel) + 1288: 7(fvec4) FAdd 1287 1286 + Store 1272(texel) 1288 + 1289: 224 Load 226(sCubeArray) + 1290: 7(fvec4) Load 197(c4) + 1291: 7(fvec4) ImageGather 1289 1290 1275 + 1292: 7(fvec4) Load 1272(texel) + 1293: 7(fvec4) FAdd 1292 1291 + Store 1272(texel) 1293 + 1294: 257 Load 259(s2DRect) + 1295: 52(fvec2) Load 138(c2) + 1296: 7(fvec4) ImageGather 1294 1295 1275 + 1297: 7(fvec4) Load 1272(texel) + 1298: 7(fvec4) FAdd 1297 1296 + Store 1272(texel) 1298 + 1299: 180 Load 182(s2DShadow) + 1300: 52(fvec2) Load 138(c2) + 1301: 6(float) Load 283(compare) + 1302: 7(fvec4) ImageDrefGather 1299 1300 1301 + 1303: 7(fvec4) Load 1272(texel) + 1304: 7(fvec4) FAdd 1303 1302 + Store 1272(texel) 1304 + 1305: 245 Load 247(s2DArrayShadow) + 1306: 148(fvec3) Load 150(c3) + 1307: 6(float) Load 283(compare) + 1308: 7(fvec4) ImageDrefGather 1305 1306 1307 + 1309: 7(fvec4) Load 1272(texel) + 1310: 7(fvec4) FAdd 1309 1308 + Store 1272(texel) 1310 + 1311: 192 Load 194(sCubeShadow) + 1312: 148(fvec3) Load 150(c3) + 1313: 6(float) Load 283(compare) + 1314: 7(fvec4) ImageDrefGather 1311 1312 1313 + 1315: 7(fvec4) Load 1272(texel) + 1316: 7(fvec4) FAdd 1315 1314 + Store 1272(texel) 1316 + 1317: 278 Load 280(sCubeArrayShadow) + 1318: 7(fvec4) Load 197(c4) + 1319: 6(float) Load 283(compare) + 1320: 7(fvec4) ImageDrefGather 1317 1318 1319 + 1321: 7(fvec4) Load 1272(texel) + 1322: 7(fvec4) FAdd 1321 1320 + Store 1272(texel) 1322 + 1323: 266 Load 268(s2DRectShadow) + 1324: 52(fvec2) Load 138(c2) + 1325: 6(float) Load 283(compare) + 1326: 7(fvec4) ImageDrefGather 1323 1324 1325 + 1327: 7(fvec4) Load 1272(texel) + 1328: 7(fvec4) FAdd 1327 1326 + Store 1272(texel) 1328 + 1329: 7(fvec4) Load 1272(texel) + ReturnValue 1329 + FunctionEnd +37(testTextureGatherOffset(): 7(fvec4) Function None 8 + 38: Label + 1332(texel): 63(ptr) Variable Function + Store 1332(texel) 120 + 1333: 133 Load 135(s2D) + 1334: 52(fvec2) Load 138(c2) + 1335: 7(fvec4) ImageGather 1333 1334 1275 ConstOffset 452 + 1336: 7(fvec4) Load 1332(texel) + 1337: 7(fvec4) FAdd 1336 1335 + Store 1332(texel) 1337 + 1338: 215 Load 217(s2DArray) + 1339: 148(fvec3) Load 150(c3) + 1340: 7(fvec4) ImageGather 1338 1339 1275 ConstOffset 452 + 1341: 7(fvec4) Load 1332(texel) + 1342: 7(fvec4) FAdd 1341 1340 + Store 1332(texel) 1342 + 1343: 257 Load 259(s2DRect) + 1344: 52(fvec2) Load 138(c2) + 1345: 7(fvec4) ImageGather 1343 1344 1275 ConstOffset 452 + 1346: 7(fvec4) Load 1332(texel) + 1347: 7(fvec4) FAdd 1346 1345 + Store 1332(texel) 1347 + 1348: 180 Load 182(s2DShadow) + 1349: 52(fvec2) Load 138(c2) + 1350: 6(float) Load 283(compare) + 1351: 7(fvec4) ImageDrefGather 1348 1349 1350 ConstOffset 452 + 1352: 7(fvec4) Load 1332(texel) + 1353: 7(fvec4) FAdd 1352 1351 + Store 1332(texel) 1353 + 1354: 245 Load 247(s2DArrayShadow) + 1355: 148(fvec3) Load 150(c3) + 1356: 6(float) Load 283(compare) + 1357: 7(fvec4) ImageDrefGather 1354 1355 1356 ConstOffset 452 + 1358: 7(fvec4) Load 1332(texel) + 1359: 7(fvec4) FAdd 1358 1357 + Store 1332(texel) 1359 + 1360: 266 Load 268(s2DRectShadow) + 1361: 52(fvec2) Load 138(c2) + 1362: 6(float) Load 283(compare) + 1363: 7(fvec4) ImageDrefGather 1360 1361 1362 ConstOffset 452 + 1364: 7(fvec4) Load 1332(texel) + 1365: 7(fvec4) FAdd 1364 1363 + Store 1332(texel) 1365 + 1366: 7(fvec4) Load 1332(texel) + ReturnValue 1366 + FunctionEnd +39(testTextureGatherOffsets(): 7(fvec4) Function None 8 + 40: Label + 1369(texel): 63(ptr) Variable Function + Store 1369(texel) 120 + 1370: 133 Load 135(s2D) + 1371: 52(fvec2) Load 138(c2) + 1375: 7(fvec4) ImageGather 1370 1371 1275 ConstOffsets 1374 + 1376: 7(fvec4) Load 1369(texel) + 1377: 7(fvec4) FAdd 1376 1375 + Store 1369(texel) 1377 + 1378: 215 Load 217(s2DArray) + 1379: 148(fvec3) Load 150(c3) + 1380: 7(fvec4) ImageGather 1378 1379 1275 ConstOffsets 1374 + 1381: 7(fvec4) Load 1369(texel) + 1382: 7(fvec4) FAdd 1381 1380 + Store 1369(texel) 1382 + 1383: 257 Load 259(s2DRect) + 1384: 52(fvec2) Load 138(c2) + 1385: 7(fvec4) ImageGather 1383 1384 1275 ConstOffsets 1374 + 1386: 7(fvec4) Load 1369(texel) + 1387: 7(fvec4) FAdd 1386 1385 + Store 1369(texel) 1387 + 1388: 180 Load 182(s2DShadow) + 1389: 52(fvec2) Load 138(c2) + 1390: 6(float) Load 283(compare) + 1391: 7(fvec4) ImageDrefGather 1388 1389 1390 ConstOffsets 1374 + 1392: 7(fvec4) Load 1369(texel) + 1393: 7(fvec4) FAdd 1392 1391 + Store 1369(texel) 1393 + 1394: 245 Load 247(s2DArrayShadow) + 1395: 148(fvec3) Load 150(c3) + 1396: 6(float) Load 283(compare) + 1397: 7(fvec4) ImageDrefGather 1394 1395 1396 ConstOffsets 1374 + 1398: 7(fvec4) Load 1369(texel) + 1399: 7(fvec4) FAdd 1398 1397 + Store 1369(texel) 1399 + 1400: 266 Load 268(s2DRectShadow) + 1401: 52(fvec2) Load 138(c2) + 1402: 6(float) Load 283(compare) + 1403: 7(fvec4) ImageDrefGather 1400 1401 1402 ConstOffsets 1374 + 1404: 7(fvec4) Load 1369(texel) + 1405: 7(fvec4) FAdd 1404 1403 + Store 1369(texel) 1405 + 1406: 7(fvec4) Load 1369(texel) + ReturnValue 1406 + FunctionEnd +41(testTextureGatherLod(): 7(fvec4) Function None 8 + 42: Label + 1409(texel): 63(ptr) Variable Function + Store 1409(texel) 120 + 1410: 133 Load 135(s2D) + 1411: 52(fvec2) Load 138(c2) + 1412: 6(float) Load 371(lod) + 1413: 7(fvec4) ImageGather 1410 1411 1275 Lod 1412 + 1414: 7(fvec4) Load 1409(texel) + 1415: 7(fvec4) FAdd 1414 1413 + Store 1409(texel) 1415 + 1416: 215 Load 217(s2DArray) + 1417: 148(fvec3) Load 150(c3) + 1418: 6(float) Load 371(lod) + 1419: 7(fvec4) ImageGather 1416 1417 1275 Lod 1418 + 1420: 7(fvec4) Load 1409(texel) + 1421: 7(fvec4) FAdd 1420 1419 + Store 1409(texel) 1421 + 1422: 156 Load 158(sCube) + 1423: 148(fvec3) Load 150(c3) + 1424: 6(float) Load 371(lod) + 1425: 7(fvec4) ImageGather 1422 1423 1275 Lod 1424 + 1426: 7(fvec4) Load 1409(texel) + 1427: 7(fvec4) FAdd 1426 1425 + Store 1409(texel) 1427 + 1428: 224 Load 226(sCubeArray) + 1429: 7(fvec4) Load 197(c4) + 1430: 6(float) Load 371(lod) + 1431: 7(fvec4) ImageGather 1428 1429 1275 Lod 1430 + 1432: 7(fvec4) Load 1409(texel) + 1433: 7(fvec4) FAdd 1432 1431 + Store 1409(texel) 1433 + 1434: 7(fvec4) Load 1409(texel) + ReturnValue 1434 + FunctionEnd +43(testTextureGatherLodOffset(): 7(fvec4) Function None 8 + 44: Label + 1437(texel): 63(ptr) Variable Function + Store 1437(texel) 120 + 1438: 133 Load 135(s2D) + 1439: 52(fvec2) Load 138(c2) + 1440: 6(float) Load 371(lod) + 1441: 7(fvec4) ImageGather 1438 1439 1275 Lod ConstOffset 1440 452 + 1442: 7(fvec4) Load 1437(texel) + 1443: 7(fvec4) FAdd 1442 1441 + Store 1437(texel) 1443 + 1444: 215 Load 217(s2DArray) + 1445: 148(fvec3) Load 150(c3) + 1446: 6(float) Load 371(lod) + 1447: 7(fvec4) ImageGather 1444 1445 1275 Lod ConstOffset 1446 452 + 1448: 7(fvec4) Load 1437(texel) + 1449: 7(fvec4) FAdd 1448 1447 + Store 1437(texel) 1449 + 1450: 7(fvec4) Load 1437(texel) + ReturnValue 1450 + FunctionEnd +45(testTextureGatherLodOffsets(): 7(fvec4) Function None 8 + 46: Label + 1453(texel): 63(ptr) Variable Function + Store 1453(texel) 120 + 1454: 133 Load 135(s2D) + 1455: 52(fvec2) Load 138(c2) + 1456: 6(float) Load 371(lod) + 1457: 7(fvec4) ImageGather 1454 1455 1275 Lod ConstOffsets 1456 1374 + 1458: 7(fvec4) Load 1453(texel) + 1459: 7(fvec4) FAdd 1458 1457 + Store 1453(texel) 1459 + 1460: 215 Load 217(s2DArray) + 1461: 148(fvec3) Load 150(c3) + 1462: 6(float) Load 371(lod) + 1463: 7(fvec4) ImageGather 1460 1461 1275 Lod ConstOffsets 1462 1374 + 1464: 7(fvec4) Load 1453(texel) + 1465: 7(fvec4) FAdd 1464 1463 + Store 1453(texel) 1465 + 1466: 7(fvec4) Load 1453(texel) + ReturnValue 1466 + FunctionEnd +50(testTextureSize(): 48(ivec4) Function None 49 + 51: Label + 1470(size): 1469(ptr) Variable Function + Store 1470(size) 1471 + 1472: 122 Load 124(s1D) + 1473: 6(float) Load 371(lod) + 1474: 47(int) ConvertFToS 1473 + 1475: 121 Image 1472 + 1476: 47(int) ImageQuerySizeLod 1475 1474 + 1478: 1477(ptr) AccessChain 1470(size) 173 + 1479: 47(int) Load 1478 + 1480: 47(int) IAdd 1479 1476 + 1481: 1477(ptr) AccessChain 1470(size) 173 + Store 1481 1480 + 1482: 133 Load 135(s2D) + 1483: 6(float) Load 371(lod) + 1484: 47(int) ConvertFToS 1483 + 1485: 132 Image 1482 + 1486: 451(ivec2) ImageQuerySizeLod 1485 1484 + 1487: 48(ivec4) Load 1470(size) + 1488: 451(ivec2) VectorShuffle 1487 1487 0 1 + 1489: 451(ivec2) IAdd 1488 1486 + 1490: 1477(ptr) AccessChain 1470(size) 173 + 1491: 47(int) CompositeExtract 1489 0 + Store 1490 1491 + 1493: 1477(ptr) AccessChain 1470(size) 1492 + 1494: 47(int) CompositeExtract 1489 1 + Store 1493 1494 + 1495: 144 Load 146(s3D) + 1496: 6(float) Load 371(lod) + 1497: 47(int) ConvertFToS 1496 + 1498: 143 Image 1495 + 1499: 458(ivec3) ImageQuerySizeLod 1498 1497 + 1500: 48(ivec4) Load 1470(size) + 1501: 458(ivec3) VectorShuffle 1500 1500 0 1 2 + 1502: 458(ivec3) IAdd 1501 1499 + 1503: 1477(ptr) AccessChain 1470(size) 173 + 1504: 47(int) CompositeExtract 1502 0 + Store 1503 1504 + 1505: 1477(ptr) AccessChain 1470(size) 1492 + 1506: 47(int) CompositeExtract 1502 1 + Store 1505 1506 + 1508: 1477(ptr) AccessChain 1470(size) 1507 + 1509: 47(int) CompositeExtract 1502 2 + Store 1508 1509 + 1510: 156 Load 158(sCube) + 1511: 6(float) Load 371(lod) + 1512: 47(int) ConvertFToS 1511 + 1513: 155 Image 1510 + 1514: 451(ivec2) ImageQuerySizeLod 1513 1512 + 1515: 48(ivec4) Load 1470(size) + 1516: 451(ivec2) VectorShuffle 1515 1515 0 1 + 1517: 451(ivec2) IAdd 1516 1514 + 1518: 1477(ptr) AccessChain 1470(size) 173 + 1519: 47(int) CompositeExtract 1517 0 + Store 1518 1519 + 1520: 1477(ptr) AccessChain 1470(size) 1492 + 1521: 47(int) CompositeExtract 1517 1 + Store 1520 1521 + 1522: 165 Load 167(s1DShadow) + 1523: 6(float) Load 371(lod) + 1524: 47(int) ConvertFToS 1523 + 1525: 164 Image 1522 + 1526: 47(int) ImageQuerySizeLod 1525 1524 + 1527: 1477(ptr) AccessChain 1470(size) 173 + 1528: 47(int) Load 1527 + 1529: 47(int) IAdd 1528 1526 + 1530: 1477(ptr) AccessChain 1470(size) 173 + Store 1530 1529 + 1531: 180 Load 182(s2DShadow) + 1532: 6(float) Load 371(lod) + 1533: 47(int) ConvertFToS 1532 + 1534: 179 Image 1531 + 1535: 451(ivec2) ImageQuerySizeLod 1534 1533 + 1536: 48(ivec4) Load 1470(size) + 1537: 451(ivec2) VectorShuffle 1536 1536 0 1 + 1538: 451(ivec2) IAdd 1537 1535 + 1539: 1477(ptr) AccessChain 1470(size) 173 + 1540: 47(int) CompositeExtract 1538 0 + Store 1539 1540 + 1541: 1477(ptr) AccessChain 1470(size) 1492 + 1542: 47(int) CompositeExtract 1538 1 + Store 1541 1542 + 1543: 192 Load 194(sCubeShadow) + 1544: 6(float) Load 371(lod) + 1545: 47(int) ConvertFToS 1544 + 1546: 191 Image 1543 + 1547: 451(ivec2) ImageQuerySizeLod 1546 1545 + 1548: 48(ivec4) Load 1470(size) + 1549: 451(ivec2) VectorShuffle 1548 1548 0 1 + 1550: 451(ivec2) IAdd 1549 1547 + 1551: 1477(ptr) AccessChain 1470(size) 173 + 1552: 47(int) CompositeExtract 1550 0 + Store 1551 1552 + 1553: 1477(ptr) AccessChain 1470(size) 1492 + 1554: 47(int) CompositeExtract 1550 1 + Store 1553 1554 + 1555: 224 Load 226(sCubeArray) + 1556: 6(float) Load 371(lod) + 1557: 47(int) ConvertFToS 1556 + 1558: 223 Image 1555 + 1559: 458(ivec3) ImageQuerySizeLod 1558 1557 + 1560: 48(ivec4) Load 1470(size) + 1561: 458(ivec3) VectorShuffle 1560 1560 0 1 2 + 1562: 458(ivec3) IAdd 1561 1559 + 1563: 1477(ptr) AccessChain 1470(size) 173 + 1564: 47(int) CompositeExtract 1562 0 + Store 1563 1564 + 1565: 1477(ptr) AccessChain 1470(size) 1492 + 1566: 47(int) CompositeExtract 1562 1 + Store 1565 1566 + 1567: 1477(ptr) AccessChain 1470(size) 1507 + 1568: 47(int) CompositeExtract 1562 2 + Store 1567 1568 + 1569: 278 Load 280(sCubeArrayShadow) + 1570: 6(float) Load 371(lod) + 1571: 47(int) ConvertFToS 1570 + 1572: 277 Image 1569 + 1573: 458(ivec3) ImageQuerySizeLod 1572 1571 + 1574: 48(ivec4) Load 1470(size) + 1575: 458(ivec3) VectorShuffle 1574 1574 0 1 2 + 1576: 458(ivec3) IAdd 1575 1573 + 1577: 1477(ptr) AccessChain 1470(size) 173 + 1578: 47(int) CompositeExtract 1576 0 + Store 1577 1578 + 1579: 1477(ptr) AccessChain 1470(size) 1492 + 1580: 47(int) CompositeExtract 1576 1 + Store 1579 1580 + 1581: 1477(ptr) AccessChain 1470(size) 1507 + 1582: 47(int) CompositeExtract 1576 2 + Store 1581 1582 + 1583: 257 Load 259(s2DRect) + 1584: 256 Image 1583 + 1585: 451(ivec2) ImageQuerySize 1584 + 1586: 48(ivec4) Load 1470(size) + 1587: 451(ivec2) VectorShuffle 1586 1586 0 1 + 1588: 451(ivec2) IAdd 1587 1585 + 1589: 1477(ptr) AccessChain 1470(size) 173 + 1590: 47(int) CompositeExtract 1588 0 + Store 1589 1590 + 1591: 1477(ptr) AccessChain 1470(size) 1492 + 1592: 47(int) CompositeExtract 1588 1 + Store 1591 1592 + 1593: 266 Load 268(s2DRectShadow) + 1594: 265 Image 1593 + 1595: 451(ivec2) ImageQuerySize 1594 + 1596: 48(ivec4) Load 1470(size) + 1597: 451(ivec2) VectorShuffle 1596 1596 0 1 + 1598: 451(ivec2) IAdd 1597 1595 + 1599: 1477(ptr) AccessChain 1470(size) 173 + 1600: 47(int) CompositeExtract 1598 0 + Store 1599 1600 + 1601: 1477(ptr) AccessChain 1470(size) 1492 + 1602: 47(int) CompositeExtract 1598 1 + Store 1601 1602 + 1603: 206 Load 208(s1DArray) + 1604: 6(float) Load 371(lod) + 1605: 47(int) ConvertFToS 1604 + 1606: 205 Image 1603 + 1607: 451(ivec2) ImageQuerySizeLod 1606 1605 + 1608: 48(ivec4) Load 1470(size) + 1609: 451(ivec2) VectorShuffle 1608 1608 0 1 + 1610: 451(ivec2) IAdd 1609 1607 + 1611: 1477(ptr) AccessChain 1470(size) 173 + 1612: 47(int) CompositeExtract 1610 0 + Store 1611 1612 + 1613: 1477(ptr) AccessChain 1470(size) 1492 + 1614: 47(int) CompositeExtract 1610 1 + Store 1613 1614 + 1615: 215 Load 217(s2DArray) + 1616: 6(float) Load 371(lod) + 1617: 47(int) ConvertFToS 1616 + 1618: 214 Image 1615 + 1619: 458(ivec3) ImageQuerySizeLod 1618 1617 + 1620: 48(ivec4) Load 1470(size) + 1621: 458(ivec3) VectorShuffle 1620 1620 0 1 2 + 1622: 458(ivec3) IAdd 1621 1619 + 1623: 1477(ptr) AccessChain 1470(size) 173 + 1624: 47(int) CompositeExtract 1622 0 + Store 1623 1624 + 1625: 1477(ptr) AccessChain 1470(size) 1492 + 1626: 47(int) CompositeExtract 1622 1 + Store 1625 1626 + 1627: 1477(ptr) AccessChain 1470(size) 1507 + 1628: 47(int) CompositeExtract 1622 2 + Store 1627 1628 + 1629: 233 Load 235(s1DArrayShadow) + 1630: 6(float) Load 371(lod) + 1631: 47(int) ConvertFToS 1630 + 1632: 232 Image 1629 + 1633: 451(ivec2) ImageQuerySizeLod 1632 1631 + 1634: 48(ivec4) Load 1470(size) + 1635: 451(ivec2) VectorShuffle 1634 1634 0 1 + 1636: 451(ivec2) IAdd 1635 1633 + 1637: 1477(ptr) AccessChain 1470(size) 173 + 1638: 47(int) CompositeExtract 1636 0 + Store 1637 1638 + 1639: 1477(ptr) AccessChain 1470(size) 1492 + 1640: 47(int) CompositeExtract 1636 1 + Store 1639 1640 + 1641: 245 Load 247(s2DArrayShadow) + 1642: 6(float) Load 371(lod) + 1643: 47(int) ConvertFToS 1642 + 1644: 244 Image 1641 + 1645: 458(ivec3) ImageQuerySizeLod 1644 1643 + 1646: 48(ivec4) Load 1470(size) + 1647: 458(ivec3) VectorShuffle 1646 1646 0 1 2 + 1648: 458(ivec3) IAdd 1647 1645 + 1649: 1477(ptr) AccessChain 1470(size) 173 + 1650: 47(int) CompositeExtract 1648 0 + Store 1649 1650 + 1651: 1477(ptr) AccessChain 1470(size) 1492 + 1652: 47(int) CompositeExtract 1648 1 + Store 1651 1652 + 1653: 1477(ptr) AccessChain 1470(size) 1507 + 1654: 47(int) CompositeExtract 1648 2 + Store 1653 1654 + 1655: 771 Load 773(sBuffer) + 1656: 770 Image 1655 + 1657: 47(int) ImageQuerySize 1656 + 1658: 1477(ptr) AccessChain 1470(size) 173 + 1659: 47(int) Load 1658 + 1660: 47(int) IAdd 1659 1657 + 1661: 1477(ptr) AccessChain 1470(size) 173 + Store 1661 1660 + 1662: 782 Load 784(s2DMS) + 1663: 781 Image 1662 + 1664: 451(ivec2) ImageQuerySize 1663 + 1665: 48(ivec4) Load 1470(size) + 1666: 451(ivec2) VectorShuffle 1665 1665 0 1 + 1667: 451(ivec2) IAdd 1666 1664 + 1668: 1477(ptr) AccessChain 1470(size) 173 + 1669: 47(int) CompositeExtract 1667 0 + Store 1668 1669 + 1670: 1477(ptr) AccessChain 1470(size) 1492 + 1671: 47(int) CompositeExtract 1667 1 + Store 1670 1671 + 1672: 793 Load 795(s2DMSArray) + 1673: 792 Image 1672 + 1674: 458(ivec3) ImageQuerySize 1673 + 1675: 48(ivec4) Load 1470(size) + 1676: 458(ivec3) VectorShuffle 1675 1675 0 1 2 + 1677: 458(ivec3) IAdd 1676 1674 + 1678: 1477(ptr) AccessChain 1470(size) 173 + 1679: 47(int) CompositeExtract 1677 0 + Store 1678 1679 + 1680: 1477(ptr) AccessChain 1470(size) 1492 + 1681: 47(int) CompositeExtract 1677 1 + Store 1680 1681 + 1682: 1477(ptr) AccessChain 1470(size) 1507 + 1683: 47(int) CompositeExtract 1677 2 + Store 1682 1683 + 1684: 48(ivec4) Load 1470(size) + ReturnValue 1684 + FunctionEnd +54(testTextureQueryLod(): 52(fvec2) Function None 53 + 55: Label + 1688(lod): 1687(ptr) Variable Function + Store 1688(lod) 1689 + 1690: 122 Load 124(s1D) + 1691: 6(float) Load 127(c1) + 1692: 52(fvec2) ImageQueryLod 1690 1691 + 1693: 52(fvec2) Load 1688(lod) + 1694: 52(fvec2) FAdd 1693 1692 + Store 1688(lod) 1694 + 1695: 133 Load 135(s2D) + 1696: 52(fvec2) Load 138(c2) + 1697: 52(fvec2) ImageQueryLod 1695 1696 + 1698: 52(fvec2) Load 1688(lod) + 1699: 52(fvec2) FAdd 1698 1697 + Store 1688(lod) 1699 + 1700: 144 Load 146(s3D) + 1701: 148(fvec3) Load 150(c3) + 1702: 52(fvec2) ImageQueryLod 1700 1701 + 1703: 52(fvec2) Load 1688(lod) + 1704: 52(fvec2) FAdd 1703 1702 + Store 1688(lod) 1704 + 1705: 156 Load 158(sCube) + 1706: 148(fvec3) Load 150(c3) + 1707: 52(fvec2) ImageQueryLod 1705 1706 + 1708: 52(fvec2) Load 1688(lod) + 1709: 52(fvec2) FAdd 1708 1707 + Store 1688(lod) 1709 + 1710: 206 Load 208(s1DArray) + 1711: 6(float) Load 127(c1) + 1712: 52(fvec2) ImageQueryLod 1710 1711 + 1713: 52(fvec2) Load 1688(lod) + 1714: 52(fvec2) FAdd 1713 1712 + Store 1688(lod) 1714 + 1715: 215 Load 217(s2DArray) + 1716: 52(fvec2) Load 138(c2) + 1717: 52(fvec2) ImageQueryLod 1715 1716 + 1718: 52(fvec2) Load 1688(lod) + 1719: 52(fvec2) FAdd 1718 1717 + Store 1688(lod) 1719 + 1720: 224 Load 226(sCubeArray) + 1721: 148(fvec3) Load 150(c3) + 1722: 52(fvec2) ImageQueryLod 1720 1721 + 1723: 52(fvec2) Load 1688(lod) + 1724: 52(fvec2) FAdd 1723 1722 + Store 1688(lod) 1724 + 1725: 165 Load 167(s1DShadow) + 1726: 6(float) Load 127(c1) + 1727: 52(fvec2) ImageQueryLod 1725 1726 + 1728: 52(fvec2) Load 1688(lod) + 1729: 52(fvec2) FAdd 1728 1727 + Store 1688(lod) 1729 + 1730: 180 Load 182(s2DShadow) + 1731: 52(fvec2) Load 138(c2) + 1732: 52(fvec2) ImageQueryLod 1730 1731 + 1733: 52(fvec2) Load 1688(lod) + 1734: 52(fvec2) FAdd 1733 1732 + Store 1688(lod) 1734 + 1735: 278 Load 280(sCubeArrayShadow) + 1736: 148(fvec3) Load 150(c3) + 1737: 52(fvec2) ImageQueryLod 1735 1736 + 1738: 52(fvec2) Load 1688(lod) + 1739: 52(fvec2) FAdd 1738 1737 + Store 1688(lod) 1739 + 1740: 233 Load 235(s1DArrayShadow) + 1741: 6(float) Load 127(c1) + 1742: 52(fvec2) ImageQueryLod 1740 1741 + 1743: 52(fvec2) Load 1688(lod) + 1744: 52(fvec2) FAdd 1743 1742 + Store 1688(lod) 1744 + 1745: 245 Load 247(s2DArrayShadow) + 1746: 52(fvec2) Load 138(c2) + 1747: 52(fvec2) ImageQueryLod 1745 1746 + 1748: 52(fvec2) Load 1688(lod) + 1749: 52(fvec2) FAdd 1748 1747 + Store 1688(lod) 1749 + 1750: 278 Load 280(sCubeArrayShadow) + 1751: 148(fvec3) Load 150(c3) + 1752: 52(fvec2) ImageQueryLod 1750 1751 + 1753: 52(fvec2) Load 1688(lod) + 1754: 52(fvec2) FAdd 1753 1752 + Store 1688(lod) 1754 + 1755: 52(fvec2) Load 1688(lod) + ReturnValue 1755 + FunctionEnd +57(testTextureQueryLevels(): 47(int) Function None 56 + 58: Label + 1758(levels): 1477(ptr) Variable Function + Store 1758(levels) 1275 + 1759: 122 Load 124(s1D) + 1760: 121 Image 1759 + 1761: 47(int) ImageQueryLevels 1760 + 1762: 47(int) Load 1758(levels) + 1763: 47(int) IAdd 1762 1761 + Store 1758(levels) 1763 + 1764: 133 Load 135(s2D) + 1765: 132 Image 1764 + 1766: 47(int) ImageQueryLevels 1765 + 1767: 47(int) Load 1758(levels) + 1768: 47(int) IAdd 1767 1766 + Store 1758(levels) 1768 + 1769: 144 Load 146(s3D) + 1770: 143 Image 1769 + 1771: 47(int) ImageQueryLevels 1770 + 1772: 47(int) Load 1758(levels) + 1773: 47(int) IAdd 1772 1771 + Store 1758(levels) 1773 + 1774: 156 Load 158(sCube) + 1775: 155 Image 1774 + 1776: 47(int) ImageQueryLevels 1775 + 1777: 47(int) Load 1758(levels) + 1778: 47(int) IAdd 1777 1776 + Store 1758(levels) 1778 + 1779: 165 Load 167(s1DShadow) + 1780: 164 Image 1779 + 1781: 47(int) ImageQueryLevels 1780 + 1782: 47(int) Load 1758(levels) + 1783: 47(int) IAdd 1782 1781 + Store 1758(levels) 1783 + 1784: 180 Load 182(s2DShadow) + 1785: 179 Image 1784 + 1786: 47(int) ImageQueryLevels 1785 + 1787: 47(int) Load 1758(levels) + 1788: 47(int) IAdd 1787 1786 + Store 1758(levels) 1788 + 1789: 192 Load 194(sCubeShadow) + 1790: 191 Image 1789 + 1791: 47(int) ImageQueryLevels 1790 + 1792: 47(int) Load 1758(levels) + 1793: 47(int) IAdd 1792 1791 + Store 1758(levels) 1793 + 1794: 224 Load 226(sCubeArray) + 1795: 223 Image 1794 + 1796: 47(int) ImageQueryLevels 1795 + 1797: 47(int) Load 1758(levels) + 1798: 47(int) IAdd 1797 1796 + Store 1758(levels) 1798 + 1799: 278 Load 280(sCubeArrayShadow) + 1800: 277 Image 1799 + 1801: 47(int) ImageQueryLevels 1800 + 1802: 47(int) Load 1758(levels) + 1803: 47(int) IAdd 1802 1801 + Store 1758(levels) 1803 + 1804: 206 Load 208(s1DArray) + 1805: 205 Image 1804 + 1806: 47(int) ImageQueryLevels 1805 + 1807: 47(int) Load 1758(levels) + 1808: 47(int) IAdd 1807 1806 + Store 1758(levels) 1808 + 1809: 215 Load 217(s2DArray) + 1810: 214 Image 1809 + 1811: 47(int) ImageQueryLevels 1810 + 1812: 47(int) Load 1758(levels) + 1813: 47(int) IAdd 1812 1811 + Store 1758(levels) 1813 + 1814: 233 Load 235(s1DArrayShadow) + 1815: 232 Image 1814 + 1816: 47(int) ImageQueryLevels 1815 + 1817: 47(int) Load 1758(levels) + 1818: 47(int) IAdd 1817 1816 + Store 1758(levels) 1818 + 1819: 245 Load 247(s2DArrayShadow) + 1820: 244 Image 1819 + 1821: 47(int) ImageQueryLevels 1820 + 1822: 47(int) Load 1758(levels) + 1823: 47(int) IAdd 1822 1821 + Store 1758(levels) 1823 + 1824: 47(int) Load 1758(levels) + ReturnValue 1824 + FunctionEnd +59(testTextureSamples(): 47(int) Function None 56 + 60: Label + 1827(samples): 1477(ptr) Variable Function + Store 1827(samples) 1275 + 1828: 782 Load 784(s2DMS) + 1829: 781 Image 1828 + 1830: 47(int) ImageQuerySamples 1829 + 1831: 47(int) Load 1827(samples) + 1832: 47(int) IAdd 1831 1830 + Store 1827(samples) 1832 + 1833: 793 Load 795(s2DMSArray) + 1834: 792 Image 1833 + 1835: 47(int) ImageQuerySamples 1834 + 1836: 47(int) Load 1827(samples) + 1837: 47(int) IAdd 1836 1835 + Store 1827(samples) 1837 + 1838: 47(int) Load 1827(samples) + ReturnValue 1838 + FunctionEnd +61(testImageLoad(): 7(fvec4) Function None 8 + 62: Label + 1841(texel): 63(ptr) Variable Function + Store 1841(texel) 120 + 1845: 1842 Load 1844(i1D) + 1846: 6(float) Load 127(c1) + 1847: 47(int) ConvertFToS 1846 + 1848: 7(fvec4) ImageRead 1845 1847 + 1849: 7(fvec4) Load 1841(texel) + 1850: 7(fvec4) FAdd 1849 1848 + Store 1841(texel) 1850 + 1854: 1851 Load 1853(i2D) + 1855: 52(fvec2) Load 138(c2) + 1856: 451(ivec2) ConvertFToS 1855 + 1857: 7(fvec4) ImageRead 1854 1856 + 1858: 7(fvec4) Load 1841(texel) + 1859: 7(fvec4) FAdd 1858 1857 + Store 1841(texel) 1859 + 1863: 1860 Load 1862(i3D) + 1864: 148(fvec3) Load 150(c3) + 1865: 458(ivec3) ConvertFToS 1864 + 1866: 7(fvec4) ImageRead 1863 1865 + 1867: 7(fvec4) Load 1841(texel) + 1868: 7(fvec4) FAdd 1867 1866 + Store 1841(texel) 1868 + 1872: 1869 Load 1871(i2DRect) + 1873: 52(fvec2) Load 138(c2) + 1874: 451(ivec2) ConvertFToS 1873 + 1875: 7(fvec4) ImageRead 1872 1874 + 1876: 7(fvec4) Load 1841(texel) + 1877: 7(fvec4) FAdd 1876 1875 + Store 1841(texel) 1877 + 1881: 1878 Load 1880(iCube) + 1882: 148(fvec3) Load 150(c3) + 1883: 458(ivec3) ConvertFToS 1882 + 1884: 7(fvec4) ImageRead 1881 1883 + 1885: 7(fvec4) Load 1841(texel) + 1886: 7(fvec4) FAdd 1885 1884 + Store 1841(texel) 1886 + 1890: 1887 Load 1889(iBuffer) + 1891: 6(float) Load 127(c1) + 1892: 47(int) ConvertFToS 1891 + 1893: 7(fvec4) ImageRead 1890 1892 + 1894: 7(fvec4) Load 1841(texel) + 1895: 7(fvec4) FAdd 1894 1893 + Store 1841(texel) 1895 + 1899: 1896 Load 1898(i1DArray) + 1900: 52(fvec2) Load 138(c2) + 1901: 451(ivec2) ConvertFToS 1900 + 1902: 7(fvec4) ImageRead 1899 1901 + 1903: 7(fvec4) Load 1841(texel) + 1904: 7(fvec4) FAdd 1903 1902 + Store 1841(texel) 1904 + 1908: 1905 Load 1907(i2DArray) + 1909: 148(fvec3) Load 150(c3) + 1910: 458(ivec3) ConvertFToS 1909 + 1911: 7(fvec4) ImageRead 1908 1910 + 1912: 7(fvec4) Load 1841(texel) + 1913: 7(fvec4) FAdd 1912 1911 + Store 1841(texel) 1913 + 1917: 1914 Load 1916(iCubeArray) + 1918: 148(fvec3) Load 150(c3) + 1919: 458(ivec3) ConvertFToS 1918 + 1920: 7(fvec4) ImageRead 1917 1919 + 1921: 7(fvec4) Load 1841(texel) + 1922: 7(fvec4) FAdd 1921 1920 + Store 1841(texel) 1922 + 1926: 1923 Load 1925(i2DMS) + 1927: 52(fvec2) Load 138(c2) + 1928: 451(ivec2) ConvertFToS 1927 + 1929: 7(fvec4) ImageRead 1926 1928 Sample 445 + 1930: 7(fvec4) Load 1841(texel) + 1931: 7(fvec4) FAdd 1930 1929 + Store 1841(texel) 1931 + 1935: 1932 Load 1934(i2DMSArray) + 1936: 148(fvec3) Load 150(c3) + 1937: 458(ivec3) ConvertFToS 1936 + 1938: 7(fvec4) ImageRead 1935 1937 Sample 445 + 1939: 7(fvec4) Load 1841(texel) + 1940: 7(fvec4) FAdd 1939 1938 + Store 1841(texel) 1940 + 1941: 7(fvec4) Load 1841(texel) + ReturnValue 1941 + FunctionEnd +66(testImageStore(vf4;): 2 Function None 64 + 65(data): 63(ptr) FunctionParameter + 67: Label + 1944: 1842 Load 1844(i1D) + 1945: 6(float) Load 127(c1) + 1946: 47(int) ConvertFToS 1945 + 1947: 7(fvec4) Load 65(data) + ImageWrite 1944 1946 1947 + 1948: 1851 Load 1853(i2D) + 1949: 52(fvec2) Load 138(c2) + 1950: 451(ivec2) ConvertFToS 1949 + 1951: 7(fvec4) Load 65(data) + ImageWrite 1948 1950 1951 + 1952: 1860 Load 1862(i3D) + 1953: 148(fvec3) Load 150(c3) + 1954: 458(ivec3) ConvertFToS 1953 + 1955: 7(fvec4) Load 65(data) + ImageWrite 1952 1954 1955 + 1956: 1869 Load 1871(i2DRect) + 1957: 52(fvec2) Load 138(c2) + 1958: 451(ivec2) ConvertFToS 1957 + 1959: 7(fvec4) Load 65(data) + ImageWrite 1956 1958 1959 + 1960: 1878 Load 1880(iCube) + 1961: 148(fvec3) Load 150(c3) + 1962: 458(ivec3) ConvertFToS 1961 + 1963: 7(fvec4) Load 65(data) + ImageWrite 1960 1962 1963 + 1964: 1887 Load 1889(iBuffer) + 1965: 6(float) Load 127(c1) + 1966: 47(int) ConvertFToS 1965 + 1967: 7(fvec4) Load 65(data) + ImageWrite 1964 1966 1967 + 1968: 1896 Load 1898(i1DArray) + 1969: 52(fvec2) Load 138(c2) + 1970: 451(ivec2) ConvertFToS 1969 + 1971: 7(fvec4) Load 65(data) + ImageWrite 1968 1970 1971 + 1972: 1905 Load 1907(i2DArray) + 1973: 148(fvec3) Load 150(c3) + 1974: 458(ivec3) ConvertFToS 1973 + 1975: 7(fvec4) Load 65(data) + ImageWrite 1972 1974 1975 + 1976: 1914 Load 1916(iCubeArray) + 1977: 148(fvec3) Load 150(c3) + 1978: 458(ivec3) ConvertFToS 1977 + 1979: 7(fvec4) Load 65(data) + ImageWrite 1976 1978 1979 + 1980: 1923 Load 1925(i2DMS) + 1981: 52(fvec2) Load 138(c2) + 1982: 451(ivec2) ConvertFToS 1981 + 1983: 7(fvec4) Load 65(data) + ImageWrite 1980 1982 1983 Sample 445 + 1984: 1932 Load 1934(i2DMSArray) + 1985: 148(fvec3) Load 150(c3) + 1986: 458(ivec3) ConvertFToS 1985 + 1987: 7(fvec4) Load 65(data) + ImageWrite 1984 1986 1987 Sample 445 + Return + FunctionEnd +68(testSparseTexture(): 7(fvec4) Function None 8 + 69: Label + 1988(texel): 63(ptr) Variable Function + Store 1988(texel) 120 + 1989: 133 Load 135(s2D) + 1990: 52(fvec2) Load 138(c2) + 1992:1991(ResType) ImageSparseSampleImplicitLod 1989 1990 + 1993: 7(fvec4) CompositeExtract 1992 1 + Store 1988(texel) 1993 + 1994: 47(int) CompositeExtract 1992 0 + 1995: 144 Load 146(s3D) + 1996: 148(fvec3) Load 150(c3) + 1997:1991(ResType) ImageSparseSampleImplicitLod 1995 1996 + 1998: 7(fvec4) CompositeExtract 1997 1 + Store 1988(texel) 1998 + 1999: 47(int) CompositeExtract 1997 0 + 2000: 156 Load 158(sCube) + 2001: 148(fvec3) Load 150(c3) + 2002:1991(ResType) ImageSparseSampleImplicitLod 2000 2001 + 2003: 7(fvec4) CompositeExtract 2002 1 + Store 1988(texel) 2003 + 2004: 47(int) CompositeExtract 2002 0 + 2005: 180 Load 182(s2DShadow) + 2006: 148(fvec3) Load 150(c3) + 2007: 174(ptr) AccessChain 1988(texel) 173 + 2008: 6(float) CompositeExtract 2006 2 + 2010:2009(ResType) ImageSparseSampleDrefImplicitLod 2005 2006 2008 + 2011: 6(float) CompositeExtract 2010 1 + Store 2007 2011 + 2012: 47(int) CompositeExtract 2010 0 + 2013: 192 Load 194(sCubeShadow) + 2014: 7(fvec4) Load 197(c4) + 2015: 174(ptr) AccessChain 1988(texel) 173 + 2016: 6(float) CompositeExtract 2014 3 + 2017:2009(ResType) ImageSparseSampleDrefImplicitLod 2013 2014 2016 + 2018: 6(float) CompositeExtract 2017 1 + Store 2015 2018 + 2019: 47(int) CompositeExtract 2017 0 + 2020: 215 Load 217(s2DArray) + 2021: 148(fvec3) Load 150(c3) + 2022:1991(ResType) ImageSparseSampleImplicitLod 2020 2021 + 2023: 7(fvec4) CompositeExtract 2022 1 + Store 1988(texel) 2023 + 2024: 47(int) CompositeExtract 2022 0 + 2025: 224 Load 226(sCubeArray) + 2026: 7(fvec4) Load 197(c4) + 2027:1991(ResType) ImageSparseSampleImplicitLod 2025 2026 + 2028: 7(fvec4) CompositeExtract 2027 1 + Store 1988(texel) 2028 + 2029: 47(int) CompositeExtract 2027 0 + 2030: 245 Load 247(s2DArrayShadow) + 2031: 7(fvec4) Load 197(c4) + 2032: 174(ptr) AccessChain 1988(texel) 173 + 2033: 6(float) CompositeExtract 2031 3 + 2034:2009(ResType) ImageSparseSampleDrefImplicitLod 2030 2031 2033 + 2035: 6(float) CompositeExtract 2034 1 + Store 2032 2035 + 2036: 47(int) CompositeExtract 2034 0 + 2037: 257 Load 259(s2DRect) + 2038: 52(fvec2) Load 138(c2) + 2039:1991(ResType) ImageSparseSampleImplicitLod 2037 2038 + 2040: 7(fvec4) CompositeExtract 2039 1 + Store 1988(texel) 2040 + 2041: 47(int) CompositeExtract 2039 0 + 2042: 266 Load 268(s2DRectShadow) + 2043: 148(fvec3) Load 150(c3) + 2044: 174(ptr) AccessChain 1988(texel) 173 + 2045: 6(float) CompositeExtract 2043 2 + 2046:2009(ResType) ImageSparseSampleDrefImplicitLod 2042 2043 2045 + 2047: 6(float) CompositeExtract 2046 1 + Store 2044 2047 + 2048: 47(int) CompositeExtract 2046 0 + 2049: 278 Load 280(sCubeArrayShadow) + 2050: 7(fvec4) Load 197(c4) + 2051: 6(float) Load 283(compare) + 2052: 174(ptr) AccessChain 1988(texel) 173 + 2053:2009(ResType) ImageSparseSampleDrefImplicitLod 2049 2050 2051 + 2054: 6(float) CompositeExtract 2053 1 + Store 2052 2054 + 2055: 47(int) CompositeExtract 2053 0 + 2056: 7(fvec4) Load 1988(texel) + ReturnValue 2056 + FunctionEnd +70(testSparseTextureLod(): 7(fvec4) Function None 8 + 71: Label + 2059(texel): 63(ptr) Variable Function + Store 2059(texel) 120 + 2060: 133 Load 135(s2D) + 2061: 52(fvec2) Load 138(c2) + 2062: 6(float) Load 371(lod) + 2063:1991(ResType) ImageSparseSampleExplicitLod 2060 2061 Lod 2062 + 2064: 7(fvec4) CompositeExtract 2063 1 + Store 2059(texel) 2064 + 2065: 47(int) CompositeExtract 2063 0 + 2066: 144 Load 146(s3D) + 2067: 148(fvec3) Load 150(c3) + 2068: 6(float) Load 371(lod) + 2069:1991(ResType) ImageSparseSampleExplicitLod 2066 2067 Lod 2068 + 2070: 7(fvec4) CompositeExtract 2069 1 + Store 2059(texel) 2070 + 2071: 47(int) CompositeExtract 2069 0 + 2072: 156 Load 158(sCube) + 2073: 148(fvec3) Load 150(c3) + 2074: 6(float) Load 371(lod) + 2075:1991(ResType) ImageSparseSampleExplicitLod 2072 2073 Lod 2074 + 2076: 7(fvec4) CompositeExtract 2075 1 + Store 2059(texel) 2076 + 2077: 47(int) CompositeExtract 2075 0 + 2078: 180 Load 182(s2DShadow) + 2079: 148(fvec3) Load 150(c3) + 2080: 6(float) Load 371(lod) + 2081: 174(ptr) AccessChain 2059(texel) 173 + 2082: 6(float) CompositeExtract 2079 2 + 2083:2009(ResType) ImageSparseSampleDrefExplicitLod 2078 2079 2082 Lod 2080 + 2084: 6(float) CompositeExtract 2083 1 + Store 2081 2084 + 2085: 47(int) CompositeExtract 2083 0 + 2086: 215 Load 217(s2DArray) + 2087: 148(fvec3) Load 150(c3) + 2088: 6(float) Load 371(lod) + 2089:1991(ResType) ImageSparseSampleExplicitLod 2086 2087 Lod 2088 + 2090: 7(fvec4) CompositeExtract 2089 1 + Store 2059(texel) 2090 + 2091: 47(int) CompositeExtract 2089 0 + 2092: 224 Load 226(sCubeArray) + 2093: 7(fvec4) Load 197(c4) + 2094: 6(float) Load 371(lod) + 2095:1991(ResType) ImageSparseSampleExplicitLod 2092 2093 Lod 2094 + 2096: 7(fvec4) CompositeExtract 2095 1 + Store 2059(texel) 2096 + 2097: 47(int) CompositeExtract 2095 0 + 2098: 7(fvec4) Load 2059(texel) + ReturnValue 2098 + FunctionEnd +72(testSparseTextureOffset(): 7(fvec4) Function None 8 + 73: Label + 2101(texel): 63(ptr) Variable Function + Store 2101(texel) 120 + 2102: 133 Load 135(s2D) + 2103: 52(fvec2) Load 138(c2) + 2104:1991(ResType) ImageSparseSampleImplicitLod 2102 2103 ConstOffset 452 + 2105: 7(fvec4) CompositeExtract 2104 1 + Store 2101(texel) 2105 + 2106: 47(int) CompositeExtract 2104 0 + 2107: 144 Load 146(s3D) + 2108: 148(fvec3) Load 150(c3) + 2109:1991(ResType) ImageSparseSampleImplicitLod 2107 2108 ConstOffset 459 + 2110: 7(fvec4) CompositeExtract 2109 1 + Store 2101(texel) 2110 + 2111: 47(int) CompositeExtract 2109 0 + 2112: 257 Load 259(s2DRect) + 2113: 52(fvec2) Load 138(c2) + 2114:1991(ResType) ImageSparseSampleImplicitLod 2112 2113 ConstOffset 452 + 2115: 7(fvec4) CompositeExtract 2114 1 + Store 2101(texel) 2115 + 2116: 47(int) CompositeExtract 2114 0 + 2117: 266 Load 268(s2DRectShadow) + 2118: 148(fvec3) Load 150(c3) + 2119: 174(ptr) AccessChain 2101(texel) 173 + 2120: 6(float) CompositeExtract 2118 2 + 2121:2009(ResType) ImageSparseSampleDrefImplicitLod 2117 2118 2120 ConstOffset 452 + 2122: 6(float) CompositeExtract 2121 1 + Store 2119 2122 + 2123: 47(int) CompositeExtract 2121 0 + 2124: 180 Load 182(s2DShadow) + 2125: 148(fvec3) Load 150(c3) + 2126: 174(ptr) AccessChain 2101(texel) 173 + 2127: 6(float) CompositeExtract 2125 2 + 2128:2009(ResType) ImageSparseSampleDrefImplicitLod 2124 2125 2127 ConstOffset 452 + 2129: 6(float) CompositeExtract 2128 1 + Store 2126 2129 + 2130: 47(int) CompositeExtract 2128 0 + 2131: 215 Load 217(s2DArray) + 2132: 148(fvec3) Load 150(c3) + 2133:1991(ResType) ImageSparseSampleImplicitLod 2131 2132 ConstOffset 452 + 2134: 7(fvec4) CompositeExtract 2133 1 + Store 2101(texel) 2134 + 2135: 47(int) CompositeExtract 2133 0 + 2136: 245 Load 247(s2DArrayShadow) + 2137: 7(fvec4) Load 197(c4) + 2138: 174(ptr) AccessChain 2101(texel) 173 + 2139: 6(float) CompositeExtract 2137 3 + 2140:2009(ResType) ImageSparseSampleDrefImplicitLod 2136 2137 2139 ConstOffset 452 + 2141: 6(float) CompositeExtract 2140 1 + Store 2138 2141 + 2142: 47(int) CompositeExtract 2140 0 + 2143: 7(fvec4) Load 2101(texel) + ReturnValue 2143 + FunctionEnd +74(testSparseTextureLodOffset(): 7(fvec4) Function None 8 + 75: Label + 2146(texel): 63(ptr) Variable Function + Store 2146(texel) 120 + 2147: 133 Load 135(s2D) + 2148: 52(fvec2) Load 138(c2) + 2149: 6(float) Load 371(lod) + 2150:1991(ResType) ImageSparseSampleExplicitLod 2147 2148 Lod ConstOffset 2149 452 + 2151: 7(fvec4) CompositeExtract 2150 1 + Store 2146(texel) 2151 + 2152: 47(int) CompositeExtract 2150 0 + 2153: 144 Load 146(s3D) + 2154: 148(fvec3) Load 150(c3) + 2155: 6(float) Load 371(lod) + 2156:1991(ResType) ImageSparseSampleExplicitLod 2153 2154 Lod ConstOffset 2155 459 + 2157: 7(fvec4) CompositeExtract 2156 1 + Store 2146(texel) 2157 + 2158: 47(int) CompositeExtract 2156 0 + 2159: 180 Load 182(s2DShadow) + 2160: 148(fvec3) Load 150(c3) + 2161: 6(float) Load 371(lod) + 2162: 174(ptr) AccessChain 2146(texel) 173 + 2163: 6(float) CompositeExtract 2160 2 + 2164:2009(ResType) ImageSparseSampleDrefExplicitLod 2159 2160 2163 Lod ConstOffset 2161 452 + 2165: 6(float) CompositeExtract 2164 1 + Store 2162 2165 + 2166: 47(int) CompositeExtract 2164 0 + 2167: 215 Load 217(s2DArray) + 2168: 148(fvec3) Load 150(c3) + 2169: 6(float) Load 371(lod) + 2170:1991(ResType) ImageSparseSampleExplicitLod 2167 2168 Lod ConstOffset 2169 452 + 2171: 7(fvec4) CompositeExtract 2170 1 + Store 2146(texel) 2171 + 2172: 47(int) CompositeExtract 2170 0 + 2173: 7(fvec4) Load 2146(texel) + ReturnValue 2173 + FunctionEnd +76(testSparseTextureGrad(): 7(fvec4) Function None 8 + 77: Label + 2176(texel): 63(ptr) Variable Function + Store 2176(texel) 120 + 2177: 133 Load 135(s2D) + 2178: 52(fvec2) Load 138(c2) + 2179: 52(fvec2) Load 874(dPdxy2) + 2180: 52(fvec2) Load 874(dPdxy2) + 2181:1991(ResType) ImageSparseSampleExplicitLod 2177 2178 Grad 2179 2180 + 2182: 7(fvec4) CompositeExtract 2181 1 + Store 2176(texel) 2182 + 2183: 47(int) CompositeExtract 2181 0 + 2184: 144 Load 146(s3D) + 2185: 148(fvec3) Load 150(c3) + 2186: 148(fvec3) Load 882(dPdxy3) + 2187: 148(fvec3) Load 882(dPdxy3) + 2188:1991(ResType) ImageSparseSampleExplicitLod 2184 2185 Grad 2186 2187 + 2189: 7(fvec4) CompositeExtract 2188 1 + Store 2176(texel) 2189 + 2190: 47(int) CompositeExtract 2188 0 + 2191: 156 Load 158(sCube) + 2192: 148(fvec3) Load 150(c3) + 2193: 148(fvec3) Load 882(dPdxy3) + 2194: 148(fvec3) Load 882(dPdxy3) + 2195:1991(ResType) ImageSparseSampleExplicitLod 2191 2192 Grad 2193 2194 + 2196: 7(fvec4) CompositeExtract 2195 1 + Store 2176(texel) 2196 + 2197: 47(int) CompositeExtract 2195 0 + 2198: 257 Load 259(s2DRect) + 2199: 52(fvec2) Load 138(c2) + 2200: 52(fvec2) Load 874(dPdxy2) + 2201: 52(fvec2) Load 874(dPdxy2) + 2202:1991(ResType) ImageSparseSampleExplicitLod 2198 2199 Grad 2200 2201 + 2203: 7(fvec4) CompositeExtract 2202 1 + Store 2176(texel) 2203 + 2204: 47(int) CompositeExtract 2202 0 + 2205: 266 Load 268(s2DRectShadow) + 2206: 148(fvec3) Load 150(c3) + 2207: 52(fvec2) Load 874(dPdxy2) + 2208: 52(fvec2) Load 874(dPdxy2) + 2209: 174(ptr) AccessChain 2176(texel) 173 + 2210: 6(float) CompositeExtract 2206 2 + 2211:2009(ResType) ImageSparseSampleDrefExplicitLod 2205 2206 2210 Grad 2207 2208 + 2212: 6(float) CompositeExtract 2211 1 + Store 2209 2212 + 2213: 47(int) CompositeExtract 2211 0 + 2214: 180 Load 182(s2DShadow) + 2215: 148(fvec3) Load 150(c3) + 2216: 52(fvec2) Load 874(dPdxy2) + 2217: 52(fvec2) Load 874(dPdxy2) + 2218: 174(ptr) AccessChain 2176(texel) 173 + 2219: 6(float) CompositeExtract 2215 2 + 2220:2009(ResType) ImageSparseSampleDrefExplicitLod 2214 2215 2219 Grad 2216 2217 + 2221: 6(float) CompositeExtract 2220 1 + Store 2218 2221 + 2222: 47(int) CompositeExtract 2220 0 + 2223: 192 Load 194(sCubeShadow) + 2224: 7(fvec4) Load 197(c4) + 2225: 148(fvec3) Load 882(dPdxy3) + 2226: 148(fvec3) Load 882(dPdxy3) + 2227: 174(ptr) AccessChain 2176(texel) 173 + 2228: 6(float) CompositeExtract 2224 3 + 2229:2009(ResType) ImageSparseSampleDrefExplicitLod 2223 2224 2228 Grad 2225 2226 + 2230: 6(float) CompositeExtract 2229 1 + Store 2227 2230 + 2231: 47(int) CompositeExtract 2229 0 + 2232: 215 Load 217(s2DArray) + 2233: 148(fvec3) Load 150(c3) + 2234: 52(fvec2) Load 874(dPdxy2) + 2235: 52(fvec2) Load 874(dPdxy2) + 2236:1991(ResType) ImageSparseSampleExplicitLod 2232 2233 Grad 2234 2235 + 2237: 7(fvec4) CompositeExtract 2236 1 + Store 2176(texel) 2237 + 2238: 47(int) CompositeExtract 2236 0 + 2239: 245 Load 247(s2DArrayShadow) + 2240: 7(fvec4) Load 197(c4) + 2241: 52(fvec2) Load 874(dPdxy2) + 2242: 52(fvec2) Load 874(dPdxy2) + 2243: 174(ptr) AccessChain 2176(texel) 173 + 2244: 6(float) CompositeExtract 2240 3 + 2245:2009(ResType) ImageSparseSampleDrefExplicitLod 2239 2240 2244 Grad 2241 2242 + 2246: 6(float) CompositeExtract 2245 1 + Store 2243 2246 + 2247: 47(int) CompositeExtract 2245 0 + 2248: 224 Load 226(sCubeArray) + 2249: 7(fvec4) Load 197(c4) + 2250: 148(fvec3) Load 882(dPdxy3) + 2251: 148(fvec3) Load 882(dPdxy3) + 2252:1991(ResType) ImageSparseSampleExplicitLod 2248 2249 Grad 2250 2251 + 2253: 7(fvec4) CompositeExtract 2252 1 + Store 2176(texel) 2253 + 2254: 47(int) CompositeExtract 2252 0 + 2255: 7(fvec4) Load 2176(texel) + ReturnValue 2255 + FunctionEnd +78(testSparseTextureGradOffset(): 7(fvec4) Function None 8 + 79: Label + 2258(texel): 63(ptr) Variable Function + Store 2258(texel) 120 + 2259: 133 Load 135(s2D) + 2260: 52(fvec2) Load 138(c2) + 2261: 52(fvec2) Load 874(dPdxy2) + 2262: 52(fvec2) Load 874(dPdxy2) + 2263:1991(ResType) ImageSparseSampleExplicitLod 2259 2260 Grad ConstOffset 2261 2262 452 + 2264: 7(fvec4) CompositeExtract 2263 1 + Store 2258(texel) 2264 + 2265: 47(int) CompositeExtract 2263 0 + 2266: 144 Load 146(s3D) + 2267: 148(fvec3) Load 150(c3) + 2268: 148(fvec3) Load 882(dPdxy3) + 2269: 148(fvec3) Load 882(dPdxy3) + 2270:1991(ResType) ImageSparseSampleExplicitLod 2266 2267 Grad ConstOffset 2268 2269 459 + 2271: 7(fvec4) CompositeExtract 2270 1 + Store 2258(texel) 2271 + 2272: 47(int) CompositeExtract 2270 0 + 2273: 257 Load 259(s2DRect) + 2274: 52(fvec2) Load 138(c2) + 2275: 52(fvec2) Load 874(dPdxy2) + 2276: 52(fvec2) Load 874(dPdxy2) + 2277:1991(ResType) ImageSparseSampleExplicitLod 2273 2274 Grad ConstOffset 2275 2276 452 + 2278: 7(fvec4) CompositeExtract 2277 1 + Store 2258(texel) 2278 + 2279: 47(int) CompositeExtract 2277 0 + 2280: 266 Load 268(s2DRectShadow) + 2281: 148(fvec3) Load 150(c3) + 2282: 52(fvec2) Load 874(dPdxy2) + 2283: 52(fvec2) Load 874(dPdxy2) + 2284: 174(ptr) AccessChain 2258(texel) 173 + 2285: 6(float) CompositeExtract 2281 2 + 2286:2009(ResType) ImageSparseSampleDrefExplicitLod 2280 2281 2285 Grad ConstOffset 2282 2283 452 + 2287: 6(float) CompositeExtract 2286 1 + Store 2284 2287 + 2288: 47(int) CompositeExtract 2286 0 + 2289: 180 Load 182(s2DShadow) + 2290: 148(fvec3) Load 150(c3) + 2291: 52(fvec2) Load 874(dPdxy2) + 2292: 52(fvec2) Load 874(dPdxy2) + 2293: 174(ptr) AccessChain 2258(texel) 173 + 2294: 6(float) CompositeExtract 2290 2 + 2295:2009(ResType) ImageSparseSampleDrefExplicitLod 2289 2290 2294 Grad ConstOffset 2291 2292 452 + 2296: 6(float) CompositeExtract 2295 1 + Store 2293 2296 + 2297: 47(int) CompositeExtract 2295 0 + 2298: 215 Load 217(s2DArray) + 2299: 148(fvec3) Load 150(c3) + 2300: 52(fvec2) Load 874(dPdxy2) + 2301: 52(fvec2) Load 874(dPdxy2) + 2302:1991(ResType) ImageSparseSampleExplicitLod 2298 2299 Grad ConstOffset 2300 2301 452 + 2303: 7(fvec4) CompositeExtract 2302 1 + Store 2258(texel) 2303 + 2304: 47(int) CompositeExtract 2302 0 + 2305: 245 Load 247(s2DArrayShadow) + 2306: 7(fvec4) Load 197(c4) + 2307: 52(fvec2) Load 874(dPdxy2) + 2308: 52(fvec2) Load 874(dPdxy2) + 2309: 174(ptr) AccessChain 2258(texel) 173 + 2310: 6(float) CompositeExtract 2306 3 + 2311:2009(ResType) ImageSparseSampleDrefExplicitLod 2305 2306 2310 Grad ConstOffset 2307 2308 452 + 2312: 6(float) CompositeExtract 2311 1 + Store 2309 2312 + 2313: 47(int) CompositeExtract 2311 0 + 2314: 7(fvec4) Load 2258(texel) + ReturnValue 2314 + FunctionEnd +80(testSparseTexelFetch(): 7(fvec4) Function None 8 + 81: Label + 2317(texel): 63(ptr) Variable Function + Store 2317(texel) 120 + 2318: 133 Load 135(s2D) + 2319: 52(fvec2) Load 138(c2) + 2320: 451(ivec2) ConvertFToS 2319 + 2321: 6(float) Load 371(lod) + 2322: 47(int) ConvertFToS 2321 + 2323: 132 Image 2318 + 2324:1991(ResType) ImageSparseFetch 2323 2320 Lod 2322 + 2325: 7(fvec4) CompositeExtract 2324 1 + Store 2317(texel) 2325 + 2326: 47(int) CompositeExtract 2324 0 + 2327: 144 Load 146(s3D) + 2328: 148(fvec3) Load 150(c3) + 2329: 458(ivec3) ConvertFToS 2328 + 2330: 6(float) Load 371(lod) + 2331: 47(int) ConvertFToS 2330 + 2332: 143 Image 2327 + 2333:1991(ResType) ImageSparseFetch 2332 2329 Lod 2331 + 2334: 7(fvec4) CompositeExtract 2333 1 + Store 2317(texel) 2334 + 2335: 47(int) CompositeExtract 2333 0 + 2336: 257 Load 259(s2DRect) + 2337: 52(fvec2) Load 138(c2) + 2338: 451(ivec2) ConvertFToS 2337 + 2339: 256 Image 2336 + 2340:1991(ResType) ImageSparseFetch 2339 2338 + 2341: 7(fvec4) CompositeExtract 2340 1 + Store 2317(texel) 2341 + 2342: 47(int) CompositeExtract 2340 0 + 2343: 215 Load 217(s2DArray) + 2344: 148(fvec3) Load 150(c3) + 2345: 458(ivec3) ConvertFToS 2344 + 2346: 6(float) Load 371(lod) + 2347: 47(int) ConvertFToS 2346 + 2348: 214 Image 2343 + 2349:1991(ResType) ImageSparseFetch 2348 2345 Lod 2347 + 2350: 7(fvec4) CompositeExtract 2349 1 + Store 2317(texel) 2350 + 2351: 47(int) CompositeExtract 2349 0 + 2352: 782 Load 784(s2DMS) + 2353: 52(fvec2) Load 138(c2) + 2354: 451(ivec2) ConvertFToS 2353 + 2355: 781 Image 2352 + 2356:1991(ResType) ImageSparseFetch 2355 2354 Sample 445 + 2357: 7(fvec4) CompositeExtract 2356 1 + Store 2317(texel) 2357 + 2358: 47(int) CompositeExtract 2356 0 + 2359: 793 Load 795(s2DMSArray) + 2360: 148(fvec3) Load 150(c3) + 2361: 458(ivec3) ConvertFToS 2360 + 2362: 792 Image 2359 + 2363:1991(ResType) ImageSparseFetch 2362 2361 Sample 799 + 2364: 7(fvec4) CompositeExtract 2363 1 + Store 2317(texel) 2364 + 2365: 47(int) CompositeExtract 2363 0 + 2366: 7(fvec4) Load 2317(texel) + ReturnValue 2366 + FunctionEnd +82(testSparseTexelFetchOffset(): 7(fvec4) Function None 8 + 83: Label + 2369(texel): 63(ptr) Variable Function + Store 2369(texel) 120 + 2370: 133 Load 135(s2D) + 2371: 52(fvec2) Load 138(c2) + 2372: 451(ivec2) ConvertFToS 2371 + 2373: 6(float) Load 371(lod) + 2374: 47(int) ConvertFToS 2373 + 2375: 132 Image 2370 + 2376:1991(ResType) ImageSparseFetch 2375 2372 Lod ConstOffset 2374 452 + 2377: 7(fvec4) CompositeExtract 2376 1 + Store 2369(texel) 2377 + 2378: 47(int) CompositeExtract 2376 0 + 2379: 144 Load 146(s3D) + 2380: 148(fvec3) Load 150(c3) + 2381: 458(ivec3) ConvertFToS 2380 + 2382: 6(float) Load 371(lod) + 2383: 47(int) ConvertFToS 2382 + 2384: 143 Image 2379 + 2385:1991(ResType) ImageSparseFetch 2384 2381 Lod ConstOffset 2383 459 + 2386: 7(fvec4) CompositeExtract 2385 1 + Store 2369(texel) 2386 + 2387: 47(int) CompositeExtract 2385 0 + 2388: 257 Load 259(s2DRect) + 2389: 52(fvec2) Load 138(c2) + 2390: 451(ivec2) ConvertFToS 2389 + 2391: 256 Image 2388 + 2392:1991(ResType) ImageSparseFetch 2391 2390 ConstOffset 452 + 2393: 7(fvec4) CompositeExtract 2392 1 + Store 2369(texel) 2393 + 2394: 47(int) CompositeExtract 2392 0 + 2395: 215 Load 217(s2DArray) + 2396: 148(fvec3) Load 150(c3) + 2397: 458(ivec3) ConvertFToS 2396 + 2398: 6(float) Load 371(lod) + 2399: 47(int) ConvertFToS 2398 + 2400: 214 Image 2395 + 2401:1991(ResType) ImageSparseFetch 2400 2397 Lod ConstOffset 2399 452 + 2402: 7(fvec4) CompositeExtract 2401 1 + Store 2369(texel) 2402 + 2403: 47(int) CompositeExtract 2401 0 + 2404: 7(fvec4) Load 2369(texel) + ReturnValue 2404 + FunctionEnd +84(testSparseTextureGather(): 7(fvec4) Function None 8 + 85: Label + 2407(texel): 63(ptr) Variable Function + Store 2407(texel) 120 + 2408: 133 Load 135(s2D) + 2409: 52(fvec2) Load 138(c2) + 2410:1991(ResType) ImageSparseGather 2408 2409 1275 + 2411: 7(fvec4) CompositeExtract 2410 1 + Store 2407(texel) 2411 + 2412: 47(int) CompositeExtract 2410 0 + 2413: 215 Load 217(s2DArray) + 2414: 148(fvec3) Load 150(c3) + 2415:1991(ResType) ImageSparseGather 2413 2414 1275 + 2416: 7(fvec4) CompositeExtract 2415 1 + Store 2407(texel) 2416 + 2417: 47(int) CompositeExtract 2415 0 + 2418: 156 Load 158(sCube) + 2419: 148(fvec3) Load 150(c3) + 2420:1991(ResType) ImageSparseGather 2418 2419 1275 + 2421: 7(fvec4) CompositeExtract 2420 1 + Store 2407(texel) 2421 + 2422: 47(int) CompositeExtract 2420 0 + 2423: 224 Load 226(sCubeArray) + 2424: 7(fvec4) Load 197(c4) + 2425:1991(ResType) ImageSparseGather 2423 2424 1275 + 2426: 7(fvec4) CompositeExtract 2425 1 + Store 2407(texel) 2426 + 2427: 47(int) CompositeExtract 2425 0 + 2428: 257 Load 259(s2DRect) + 2429: 52(fvec2) Load 138(c2) + 2430:1991(ResType) ImageSparseGather 2428 2429 1275 + 2431: 7(fvec4) CompositeExtract 2430 1 + Store 2407(texel) 2431 + 2432: 47(int) CompositeExtract 2430 0 + 2433: 180 Load 182(s2DShadow) + 2434: 52(fvec2) Load 138(c2) + 2435: 6(float) Load 283(compare) + 2436:1991(ResType) ImageSparseDrefGather 2433 2434 2435 + 2437: 7(fvec4) CompositeExtract 2436 1 + Store 2407(texel) 2437 + 2438: 47(int) CompositeExtract 2436 0 + 2439: 245 Load 247(s2DArrayShadow) + 2440: 148(fvec3) Load 150(c3) + 2441: 6(float) Load 283(compare) + 2442:1991(ResType) ImageSparseDrefGather 2439 2440 2441 + 2443: 7(fvec4) CompositeExtract 2442 1 + Store 2407(texel) 2443 + 2444: 47(int) CompositeExtract 2442 0 + 2445: 192 Load 194(sCubeShadow) + 2446: 148(fvec3) Load 150(c3) + 2447: 6(float) Load 283(compare) + 2448:1991(ResType) ImageSparseDrefGather 2445 2446 2447 + 2449: 7(fvec4) CompositeExtract 2448 1 + Store 2407(texel) 2449 + 2450: 47(int) CompositeExtract 2448 0 + 2451: 278 Load 280(sCubeArrayShadow) + 2452: 7(fvec4) Load 197(c4) + 2453: 6(float) Load 283(compare) + 2454:1991(ResType) ImageSparseDrefGather 2451 2452 2453 + 2455: 7(fvec4) CompositeExtract 2454 1 + Store 2407(texel) 2455 + 2456: 47(int) CompositeExtract 2454 0 + 2457: 266 Load 268(s2DRectShadow) + 2458: 52(fvec2) Load 138(c2) + 2459: 6(float) Load 283(compare) + 2460:1991(ResType) ImageSparseDrefGather 2457 2458 2459 + 2461: 7(fvec4) CompositeExtract 2460 1 + Store 2407(texel) 2461 + 2462: 47(int) CompositeExtract 2460 0 + 2463: 7(fvec4) Load 2407(texel) + ReturnValue 2463 + FunctionEnd +86(testSparseTextureGatherOffset(): 7(fvec4) Function None 8 + 87: Label + 2466(texel): 63(ptr) Variable Function + Store 2466(texel) 120 + 2467: 133 Load 135(s2D) + 2468: 52(fvec2) Load 138(c2) + 2469:1991(ResType) ImageSparseGather 2467 2468 1275 ConstOffset 452 + 2470: 7(fvec4) CompositeExtract 2469 1 + Store 2466(texel) 2470 + 2471: 47(int) CompositeExtract 2469 0 + 2472: 215 Load 217(s2DArray) + 2473: 148(fvec3) Load 150(c3) + 2474:1991(ResType) ImageSparseGather 2472 2473 1275 ConstOffset 452 + 2475: 7(fvec4) CompositeExtract 2474 1 + Store 2466(texel) 2475 + 2476: 47(int) CompositeExtract 2474 0 + 2477: 257 Load 259(s2DRect) + 2478: 52(fvec2) Load 138(c2) + 2479:1991(ResType) ImageSparseGather 2477 2478 1275 ConstOffset 452 + 2480: 7(fvec4) CompositeExtract 2479 1 + Store 2466(texel) 2480 + 2481: 47(int) CompositeExtract 2479 0 + 2482: 180 Load 182(s2DShadow) + 2483: 52(fvec2) Load 138(c2) + 2484: 6(float) Load 283(compare) + 2485:1991(ResType) ImageSparseDrefGather 2482 2483 2484 ConstOffset 452 + 2486: 7(fvec4) CompositeExtract 2485 1 + Store 2466(texel) 2486 + 2487: 47(int) CompositeExtract 2485 0 + 2488: 245 Load 247(s2DArrayShadow) + 2489: 148(fvec3) Load 150(c3) + 2490: 6(float) Load 283(compare) + 2491:1991(ResType) ImageSparseDrefGather 2488 2489 2490 ConstOffset 452 + 2492: 7(fvec4) CompositeExtract 2491 1 + Store 2466(texel) 2492 + 2493: 47(int) CompositeExtract 2491 0 + 2494: 266 Load 268(s2DRectShadow) + 2495: 52(fvec2) Load 138(c2) + 2496: 6(float) Load 283(compare) + 2497:1991(ResType) ImageSparseDrefGather 2494 2495 2496 ConstOffset 452 + 2498: 7(fvec4) CompositeExtract 2497 1 + Store 2466(texel) 2498 + 2499: 47(int) CompositeExtract 2497 0 + 2500: 7(fvec4) Load 2466(texel) + ReturnValue 2500 + FunctionEnd +88(testSparseTextureGatherOffsets(): 7(fvec4) Function None 8 + 89: Label + 2503(texel): 63(ptr) Variable Function + Store 2503(texel) 120 + 2504: 133 Load 135(s2D) + 2505: 52(fvec2) Load 138(c2) + 2516:1991(ResType) ImageSparseGather 2504 2505 1275 ConstOffsets 2515 + 2517: 7(fvec4) CompositeExtract 2516 1 + Store 2503(texel) 2517 + 2518: 47(int) CompositeExtract 2516 0 + 2519: 215 Load 217(s2DArray) + 2520: 148(fvec3) Load 150(c3) + 2521:1991(ResType) ImageSparseGather 2519 2520 1275 ConstOffsets 2515 + 2522: 7(fvec4) CompositeExtract 2521 1 + Store 2503(texel) 2522 + 2523: 47(int) CompositeExtract 2521 0 + 2524: 257 Load 259(s2DRect) + 2525: 52(fvec2) Load 138(c2) + 2526:1991(ResType) ImageSparseGather 2524 2525 1275 ConstOffsets 2515 + 2527: 7(fvec4) CompositeExtract 2526 1 + Store 2503(texel) 2527 + 2528: 47(int) CompositeExtract 2526 0 + 2529: 180 Load 182(s2DShadow) + 2530: 52(fvec2) Load 138(c2) + 2531: 6(float) Load 283(compare) + 2532:1991(ResType) ImageSparseDrefGather 2529 2530 2531 ConstOffsets 2515 + 2533: 7(fvec4) CompositeExtract 2532 1 + Store 2503(texel) 2533 + 2534: 47(int) CompositeExtract 2532 0 + 2535: 245 Load 247(s2DArrayShadow) + 2536: 148(fvec3) Load 150(c3) + 2537: 6(float) Load 283(compare) + 2538:1991(ResType) ImageSparseDrefGather 2535 2536 2537 ConstOffsets 2515 + 2539: 7(fvec4) CompositeExtract 2538 1 + Store 2503(texel) 2539 + 2540: 47(int) CompositeExtract 2538 0 + 2541: 266 Load 268(s2DRectShadow) + 2542: 52(fvec2) Load 138(c2) + 2543: 6(float) Load 283(compare) + 2544:1991(ResType) ImageSparseDrefGather 2541 2542 2543 ConstOffsets 2515 + 2545: 7(fvec4) CompositeExtract 2544 1 + Store 2503(texel) 2545 + 2546: 47(int) CompositeExtract 2544 0 + 2547: 7(fvec4) Load 2503(texel) + ReturnValue 2547 + FunctionEnd +90(testSparseTextureGatherLod(): 7(fvec4) Function None 8 + 91: Label + 2550(texel): 63(ptr) Variable Function + Store 2550(texel) 120 + 2551: 133 Load 135(s2D) + 2552: 52(fvec2) Load 138(c2) + 2553: 6(float) Load 371(lod) + 2554:1991(ResType) ImageSparseGather 2551 2552 1275 Lod 2553 + 2555: 7(fvec4) CompositeExtract 2554 1 + Store 2550(texel) 2555 + 2556: 47(int) CompositeExtract 2554 0 + 2557: 215 Load 217(s2DArray) + 2558: 148(fvec3) Load 150(c3) + 2559: 6(float) Load 371(lod) + 2560:1991(ResType) ImageSparseGather 2557 2558 1275 Lod 2559 + 2561: 7(fvec4) CompositeExtract 2560 1 + Store 2550(texel) 2561 + 2562: 47(int) CompositeExtract 2560 0 + 2563: 156 Load 158(sCube) + 2564: 148(fvec3) Load 150(c3) + 2565: 6(float) Load 371(lod) + 2566:1991(ResType) ImageSparseGather 2563 2564 1275 Lod 2565 + 2567: 7(fvec4) CompositeExtract 2566 1 + Store 2550(texel) 2567 + 2568: 47(int) CompositeExtract 2566 0 + 2569: 224 Load 226(sCubeArray) + 2570: 7(fvec4) Load 197(c4) + 2571: 6(float) Load 371(lod) + 2572:1991(ResType) ImageSparseGather 2569 2570 1275 Lod 2571 + 2573: 7(fvec4) CompositeExtract 2572 1 + Store 2550(texel) 2573 + 2574: 47(int) CompositeExtract 2572 0 + 2575: 7(fvec4) Load 2550(texel) + ReturnValue 2575 + FunctionEnd +92(testSparseTextureGatherLodOffset(): 7(fvec4) Function None 8 + 93: Label + 2578(texel): 63(ptr) Variable Function + Store 2578(texel) 120 + 2579: 133 Load 135(s2D) + 2580: 52(fvec2) Load 138(c2) + 2581: 6(float) Load 371(lod) + 2582:1991(ResType) ImageSparseGather 2579 2580 1275 Lod ConstOffset 2581 452 + 2583: 7(fvec4) CompositeExtract 2582 1 + Store 2578(texel) 2583 + 2584: 47(int) CompositeExtract 2582 0 + 2585: 215 Load 217(s2DArray) + 2586: 148(fvec3) Load 150(c3) + 2587: 6(float) Load 371(lod) + 2588:1991(ResType) ImageSparseGather 2585 2586 1275 Lod ConstOffset 2587 452 + 2589: 7(fvec4) CompositeExtract 2588 1 + Store 2578(texel) 2589 + 2590: 47(int) CompositeExtract 2588 0 + 2591: 7(fvec4) Load 2578(texel) + ReturnValue 2591 + FunctionEnd +94(testSparseTextureGatherLodOffsets(): 7(fvec4) Function None 8 + 95: Label + 2594(texel): 63(ptr) Variable Function + Store 2594(texel) 120 + 2595: 133 Load 135(s2D) + 2596: 52(fvec2) Load 138(c2) + 2597: 6(float) Load 371(lod) + 2598:1991(ResType) ImageSparseGather 2595 2596 1275 Lod ConstOffsets 2597 1374 + 2599: 7(fvec4) CompositeExtract 2598 1 + Store 2594(texel) 2599 + 2600: 47(int) CompositeExtract 2598 0 + 2601: 215 Load 217(s2DArray) + 2602: 148(fvec3) Load 150(c3) + 2603: 6(float) Load 371(lod) + 2604:1991(ResType) ImageSparseGather 2601 2602 1275 Lod ConstOffsets 2603 1374 + 2605: 7(fvec4) CompositeExtract 2604 1 + Store 2594(texel) 2605 + 2606: 47(int) CompositeExtract 2604 0 + 2607: 7(fvec4) Load 2594(texel) + ReturnValue 2607 + FunctionEnd +96(testSparseImageLoad(): 7(fvec4) Function None 8 + 97: Label + 2610(texel): 63(ptr) Variable Function + Store 2610(texel) 120 + 2611: 1851 Load 1853(i2D) + 2612: 52(fvec2) Load 138(c2) + 2613: 451(ivec2) ConvertFToS 2612 + 2614:1991(ResType) ImageSparseRead 2611 2613 + 2615: 7(fvec4) CompositeExtract 2614 1 + Store 2610(texel) 2615 + 2616: 47(int) CompositeExtract 2614 0 + 2617: 1860 Load 1862(i3D) + 2618: 148(fvec3) Load 150(c3) + 2619: 458(ivec3) ConvertFToS 2618 + 2620:1991(ResType) ImageSparseRead 2617 2619 + 2621: 7(fvec4) CompositeExtract 2620 1 + Store 2610(texel) 2621 + 2622: 47(int) CompositeExtract 2620 0 + 2623: 1869 Load 1871(i2DRect) + 2624: 52(fvec2) Load 138(c2) + 2625: 451(ivec2) ConvertFToS 2624 + 2626:1991(ResType) ImageSparseRead 2623 2625 + 2627: 7(fvec4) CompositeExtract 2626 1 + Store 2610(texel) 2627 + 2628: 47(int) CompositeExtract 2626 0 + 2629: 1878 Load 1880(iCube) + 2630: 148(fvec3) Load 150(c3) + 2631: 458(ivec3) ConvertFToS 2630 + 2632:1991(ResType) ImageSparseRead 2629 2631 + 2633: 7(fvec4) CompositeExtract 2632 1 + Store 2610(texel) 2633 + 2634: 47(int) CompositeExtract 2632 0 + 2635: 1905 Load 1907(i2DArray) + 2636: 148(fvec3) Load 150(c3) + 2637: 458(ivec3) ConvertFToS 2636 + 2638:1991(ResType) ImageSparseRead 2635 2637 + 2639: 7(fvec4) CompositeExtract 2638 1 + Store 2610(texel) 2639 + 2640: 47(int) CompositeExtract 2638 0 + 2641: 1914 Load 1916(iCubeArray) + 2642: 148(fvec3) Load 150(c3) + 2643: 458(ivec3) ConvertFToS 2642 + 2644:1991(ResType) ImageSparseRead 2641 2643 + 2645: 7(fvec4) CompositeExtract 2644 1 + Store 2610(texel) 2645 + 2646: 47(int) CompositeExtract 2644 0 + 2647: 1923 Load 1925(i2DMS) + 2648: 52(fvec2) Load 138(c2) + 2649: 451(ivec2) ConvertFToS 2648 + 2650:1991(ResType) ImageSparseRead 2647 2649 Sample 445 + 2651: 7(fvec4) CompositeExtract 2650 1 + Store 2610(texel) 2651 + 2652: 47(int) CompositeExtract 2650 0 + 2653: 1932 Load 1934(i2DMSArray) + 2654: 148(fvec3) Load 150(c3) + 2655: 458(ivec3) ConvertFToS 2654 + 2656:1991(ResType) ImageSparseRead 2653 2655 Sample 799 + 2657: 7(fvec4) CompositeExtract 2656 1 + Store 2610(texel) 2657 + 2658: 47(int) CompositeExtract 2656 0 + 2659: 7(fvec4) Load 2610(texel) + ReturnValue 2659 + FunctionEnd +98(testSparseTextureClamp(): 7(fvec4) Function None 8 + 99: Label + 2662(texel): 63(ptr) Variable Function + Store 2662(texel) 120 + 2663: 133 Load 135(s2D) + 2664: 52(fvec2) Load 138(c2) + 2666: 6(float) Load 2665(lodClamp) + 2667:1991(ResType) ImageSparseSampleImplicitLod 2663 2664 MinLod 2666 + 2668: 7(fvec4) CompositeExtract 2667 1 + Store 2662(texel) 2668 + 2669: 47(int) CompositeExtract 2667 0 + 2670: 144 Load 146(s3D) + 2671: 148(fvec3) Load 150(c3) + 2672: 6(float) Load 2665(lodClamp) + 2673:1991(ResType) ImageSparseSampleImplicitLod 2670 2671 MinLod 2672 + 2674: 7(fvec4) CompositeExtract 2673 1 + Store 2662(texel) 2674 + 2675: 47(int) CompositeExtract 2673 0 + 2676: 156 Load 158(sCube) + 2677: 148(fvec3) Load 150(c3) + 2678: 6(float) Load 2665(lodClamp) + 2679:1991(ResType) ImageSparseSampleImplicitLod 2676 2677 MinLod 2678 + 2680: 7(fvec4) CompositeExtract 2679 1 + Store 2662(texel) 2680 + 2681: 47(int) CompositeExtract 2679 0 + 2682: 180 Load 182(s2DShadow) + 2683: 148(fvec3) Load 150(c3) + 2684: 6(float) Load 2665(lodClamp) + 2685: 174(ptr) AccessChain 2662(texel) 173 + 2686: 6(float) CompositeExtract 2683 2 + 2687:2009(ResType) ImageSparseSampleDrefImplicitLod 2682 2683 2686 MinLod 2684 + 2688: 6(float) CompositeExtract 2687 1 + Store 2685 2688 + 2689: 47(int) CompositeExtract 2687 0 + 2690: 192 Load 194(sCubeShadow) + 2691: 7(fvec4) Load 197(c4) + 2692: 6(float) Load 2665(lodClamp) + 2693: 174(ptr) AccessChain 2662(texel) 173 + 2694: 6(float) CompositeExtract 2691 3 + 2695:2009(ResType) ImageSparseSampleDrefImplicitLod 2690 2691 2694 MinLod 2692 + 2696: 6(float) CompositeExtract 2695 1 + Store 2693 2696 + 2697: 47(int) CompositeExtract 2695 0 + 2698: 215 Load 217(s2DArray) + 2699: 148(fvec3) Load 150(c3) + 2700: 6(float) Load 2665(lodClamp) + 2701:1991(ResType) ImageSparseSampleImplicitLod 2698 2699 MinLod 2700 + 2702: 7(fvec4) CompositeExtract 2701 1 + Store 2662(texel) 2702 + 2703: 47(int) CompositeExtract 2701 0 + 2704: 224 Load 226(sCubeArray) + 2705: 7(fvec4) Load 197(c4) + 2706: 6(float) Load 2665(lodClamp) + 2707:1991(ResType) ImageSparseSampleImplicitLod 2704 2705 MinLod 2706 + 2708: 7(fvec4) CompositeExtract 2707 1 + Store 2662(texel) 2708 + 2709: 47(int) CompositeExtract 2707 0 + 2710: 245 Load 247(s2DArrayShadow) + 2711: 7(fvec4) Load 197(c4) + 2712: 6(float) Load 2665(lodClamp) + 2713: 174(ptr) AccessChain 2662(texel) 173 + 2714: 6(float) CompositeExtract 2711 3 + 2715:2009(ResType) ImageSparseSampleDrefImplicitLod 2710 2711 2714 MinLod 2712 + 2716: 6(float) CompositeExtract 2715 1 + Store 2713 2716 + 2717: 47(int) CompositeExtract 2715 0 + 2718: 278 Load 280(sCubeArrayShadow) + 2719: 7(fvec4) Load 197(c4) + 2720: 6(float) Load 283(compare) + 2721: 6(float) Load 2665(lodClamp) + 2722: 174(ptr) AccessChain 2662(texel) 173 + 2723:2009(ResType) ImageSparseSampleDrefImplicitLod 2718 2719 2720 MinLod 2721 + 2724: 6(float) CompositeExtract 2723 1 + Store 2722 2724 + 2725: 47(int) CompositeExtract 2723 0 + 2726: 7(fvec4) Load 2662(texel) + ReturnValue 2726 + FunctionEnd +100(testTextureClamp(): 7(fvec4) Function None 8 + 101: Label + 2729(texel): 63(ptr) Variable Function + Store 2729(texel) 120 + 2730: 122 Load 124(s1D) + 2731: 6(float) Load 127(c1) + 2732: 6(float) Load 2665(lodClamp) + 2733: 7(fvec4) ImageSampleImplicitLod 2730 2731 MinLod 2732 + 2734: 7(fvec4) Load 2729(texel) + 2735: 7(fvec4) FAdd 2734 2733 + Store 2729(texel) 2735 + 2736: 133 Load 135(s2D) + 2737: 52(fvec2) Load 138(c2) + 2738: 6(float) Load 2665(lodClamp) + 2739: 7(fvec4) ImageSampleImplicitLod 2736 2737 MinLod 2738 + 2740: 7(fvec4) Load 2729(texel) + 2741: 7(fvec4) FAdd 2740 2739 + Store 2729(texel) 2741 + 2742: 144 Load 146(s3D) + 2743: 148(fvec3) Load 150(c3) + 2744: 6(float) Load 2665(lodClamp) + 2745: 7(fvec4) ImageSampleImplicitLod 2742 2743 MinLod 2744 + 2746: 7(fvec4) Load 2729(texel) + 2747: 7(fvec4) FAdd 2746 2745 + Store 2729(texel) 2747 + 2748: 156 Load 158(sCube) + 2749: 148(fvec3) Load 150(c3) + 2750: 6(float) Load 2665(lodClamp) + 2751: 7(fvec4) ImageSampleImplicitLod 2748 2749 MinLod 2750 + 2752: 7(fvec4) Load 2729(texel) + 2753: 7(fvec4) FAdd 2752 2751 + Store 2729(texel) 2753 + 2754: 165 Load 167(s1DShadow) + 2755: 148(fvec3) Load 150(c3) + 2756: 6(float) Load 2665(lodClamp) + 2757: 6(float) CompositeExtract 2755 2 + 2758: 6(float) ImageSampleDrefImplicitLod 2754 2755 2757 MinLod 2756 + 2759: 174(ptr) AccessChain 2729(texel) 173 + 2760: 6(float) Load 2759 + 2761: 6(float) FAdd 2760 2758 + 2762: 174(ptr) AccessChain 2729(texel) 173 + Store 2762 2761 + 2763: 180 Load 182(s2DShadow) + 2764: 148(fvec3) Load 150(c3) + 2765: 6(float) Load 2665(lodClamp) + 2766: 6(float) CompositeExtract 2764 2 + 2767: 6(float) ImageSampleDrefImplicitLod 2763 2764 2766 MinLod 2765 + 2768: 174(ptr) AccessChain 2729(texel) 173 + 2769: 6(float) Load 2768 + 2770: 6(float) FAdd 2769 2767 + 2771: 174(ptr) AccessChain 2729(texel) 173 + Store 2771 2770 + 2772: 192 Load 194(sCubeShadow) + 2773: 7(fvec4) Load 197(c4) + 2774: 6(float) Load 2665(lodClamp) + 2775: 6(float) CompositeExtract 2773 3 + 2776: 6(float) ImageSampleDrefImplicitLod 2772 2773 2775 MinLod 2774 + 2777: 174(ptr) AccessChain 2729(texel) 173 + 2778: 6(float) Load 2777 + 2779: 6(float) FAdd 2778 2776 + 2780: 174(ptr) AccessChain 2729(texel) 173 + Store 2780 2779 + 2781: 206 Load 208(s1DArray) + 2782: 52(fvec2) Load 138(c2) + 2783: 6(float) Load 2665(lodClamp) + 2784: 7(fvec4) ImageSampleImplicitLod 2781 2782 MinLod 2783 + 2785: 7(fvec4) Load 2729(texel) + 2786: 7(fvec4) FAdd 2785 2784 + Store 2729(texel) 2786 + 2787: 215 Load 217(s2DArray) + 2788: 148(fvec3) Load 150(c3) + 2789: 6(float) Load 2665(lodClamp) + 2790: 7(fvec4) ImageSampleImplicitLod 2787 2788 MinLod 2789 + 2791: 7(fvec4) Load 2729(texel) + 2792: 7(fvec4) FAdd 2791 2790 + Store 2729(texel) 2792 + 2793: 224 Load 226(sCubeArray) + 2794: 7(fvec4) Load 197(c4) + 2795: 6(float) Load 2665(lodClamp) + 2796: 7(fvec4) ImageSampleImplicitLod 2793 2794 MinLod 2795 + 2797: 7(fvec4) Load 2729(texel) + 2798: 7(fvec4) FAdd 2797 2796 + Store 2729(texel) 2798 + 2799: 233 Load 235(s1DArrayShadow) + 2800: 148(fvec3) Load 150(c3) + 2801: 6(float) Load 2665(lodClamp) + 2802: 6(float) CompositeExtract 2800 2 + 2803: 6(float) ImageSampleDrefImplicitLod 2799 2800 2802 MinLod 2801 + 2804: 174(ptr) AccessChain 2729(texel) 173 + 2805: 6(float) Load 2804 + 2806: 6(float) FAdd 2805 2803 + 2807: 174(ptr) AccessChain 2729(texel) 173 + Store 2807 2806 + 2808: 245 Load 247(s2DArrayShadow) + 2809: 7(fvec4) Load 197(c4) + 2810: 6(float) Load 2665(lodClamp) + 2811: 6(float) CompositeExtract 2809 3 + 2812: 6(float) ImageSampleDrefImplicitLod 2808 2809 2811 MinLod 2810 + 2813: 174(ptr) AccessChain 2729(texel) 173 + 2814: 6(float) Load 2813 + 2815: 6(float) FAdd 2814 2812 + 2816: 174(ptr) AccessChain 2729(texel) 173 + Store 2816 2815 + 2817: 278 Load 280(sCubeArrayShadow) + 2818: 7(fvec4) Load 197(c4) + 2819: 6(float) Load 283(compare) + 2820: 6(float) Load 2665(lodClamp) + 2821: 6(float) ImageSampleDrefImplicitLod 2817 2818 2819 MinLod 2820 + 2822: 174(ptr) AccessChain 2729(texel) 173 + 2823: 6(float) Load 2822 + 2824: 6(float) FAdd 2823 2821 + 2825: 174(ptr) AccessChain 2729(texel) 173 + Store 2825 2824 + 2826: 7(fvec4) Load 2729(texel) + ReturnValue 2826 + FunctionEnd +102(testSparseTextureOffsetClamp(): 7(fvec4) Function None 8 + 103: Label + 2829(texel): 63(ptr) Variable Function + Store 2829(texel) 120 + 2830: 133 Load 135(s2D) + 2831: 52(fvec2) Load 138(c2) + 2832: 6(float) Load 2665(lodClamp) + 2833:1991(ResType) ImageSparseSampleImplicitLod 2830 2831 ConstOffset MinLod 452 2832 + 2834: 7(fvec4) CompositeExtract 2833 1 + Store 2829(texel) 2834 + 2835: 47(int) CompositeExtract 2833 0 + 2836: 144 Load 146(s3D) + 2837: 148(fvec3) Load 150(c3) + 2838: 6(float) Load 2665(lodClamp) + 2839:1991(ResType) ImageSparseSampleImplicitLod 2836 2837 ConstOffset MinLod 459 2838 + 2840: 7(fvec4) CompositeExtract 2839 1 + Store 2829(texel) 2840 + 2841: 47(int) CompositeExtract 2839 0 + 2842: 180 Load 182(s2DShadow) + 2843: 148(fvec3) Load 150(c3) + 2844: 6(float) Load 2665(lodClamp) + 2845: 174(ptr) AccessChain 2829(texel) 173 + 2846: 6(float) CompositeExtract 2843 2 + 2847:2009(ResType) ImageSparseSampleDrefImplicitLod 2842 2843 2846 ConstOffset MinLod 452 2844 + 2848: 6(float) CompositeExtract 2847 1 + Store 2845 2848 + 2849: 47(int) CompositeExtract 2847 0 + 2850: 215 Load 217(s2DArray) + 2851: 148(fvec3) Load 150(c3) + 2852: 6(float) Load 2665(lodClamp) + 2853:1991(ResType) ImageSparseSampleImplicitLod 2850 2851 ConstOffset MinLod 452 2852 + 2854: 7(fvec4) CompositeExtract 2853 1 + Store 2829(texel) 2854 + 2855: 47(int) CompositeExtract 2853 0 + 2856: 245 Load 247(s2DArrayShadow) + 2857: 7(fvec4) Load 197(c4) + 2858: 6(float) Load 2665(lodClamp) + 2859: 174(ptr) AccessChain 2829(texel) 173 + 2860: 6(float) CompositeExtract 2857 3 + 2861:2009(ResType) ImageSparseSampleDrefImplicitLod 2856 2857 2860 ConstOffset MinLod 452 2858 + 2862: 6(float) CompositeExtract 2861 1 + Store 2859 2862 + 2863: 47(int) CompositeExtract 2861 0 + 2864: 7(fvec4) Load 2829(texel) + ReturnValue 2864 + FunctionEnd +104(testTextureOffsetClamp(): 7(fvec4) Function None 8 + 105: Label + 2867(texel): 63(ptr) Variable Function + Store 2867(texel) 120 + 2868: 122 Load 124(s1D) + 2869: 6(float) Load 127(c1) + 2870: 6(float) Load 2665(lodClamp) + 2871: 7(fvec4) ImageSampleImplicitLod 2868 2869 ConstOffset MinLod 445 2870 + 2872: 7(fvec4) Load 2867(texel) + 2873: 7(fvec4) FAdd 2872 2871 + Store 2867(texel) 2873 + 2874: 133 Load 135(s2D) + 2875: 52(fvec2) Load 138(c2) + 2876: 6(float) Load 2665(lodClamp) + 2877: 7(fvec4) ImageSampleImplicitLod 2874 2875 ConstOffset MinLod 452 2876 + 2878: 7(fvec4) Load 2867(texel) + 2879: 7(fvec4) FAdd 2878 2877 + Store 2867(texel) 2879 + 2880: 144 Load 146(s3D) + 2881: 148(fvec3) Load 150(c3) + 2882: 6(float) Load 2665(lodClamp) + 2883: 7(fvec4) ImageSampleImplicitLod 2880 2881 ConstOffset MinLod 459 2882 + 2884: 7(fvec4) Load 2867(texel) + 2885: 7(fvec4) FAdd 2884 2883 + Store 2867(texel) 2885 + 2886: 165 Load 167(s1DShadow) + 2887: 148(fvec3) Load 150(c3) + 2888: 6(float) Load 2665(lodClamp) + 2889: 6(float) CompositeExtract 2887 2 + 2890: 6(float) ImageSampleDrefImplicitLod 2886 2887 2889 ConstOffset MinLod 445 2888 + 2891: 174(ptr) AccessChain 2867(texel) 173 + 2892: 6(float) Load 2891 + 2893: 6(float) FAdd 2892 2890 + 2894: 174(ptr) AccessChain 2867(texel) 173 + Store 2894 2893 + 2895: 180 Load 182(s2DShadow) + 2896: 148(fvec3) Load 150(c3) + 2897: 6(float) Load 2665(lodClamp) + 2898: 6(float) CompositeExtract 2896 2 + 2899: 6(float) ImageSampleDrefImplicitLod 2895 2896 2898 ConstOffset MinLod 452 2897 + 2900: 174(ptr) AccessChain 2867(texel) 173 + 2901: 6(float) Load 2900 + 2902: 6(float) FAdd 2901 2899 + 2903: 174(ptr) AccessChain 2867(texel) 173 + Store 2903 2902 + 2904: 206 Load 208(s1DArray) + 2905: 52(fvec2) Load 138(c2) + 2906: 6(float) Load 2665(lodClamp) + 2907: 7(fvec4) ImageSampleImplicitLod 2904 2905 ConstOffset MinLod 445 2906 + 2908: 7(fvec4) Load 2867(texel) + 2909: 7(fvec4) FAdd 2908 2907 + Store 2867(texel) 2909 + 2910: 215 Load 217(s2DArray) + 2911: 148(fvec3) Load 150(c3) + 2912: 6(float) Load 2665(lodClamp) + 2913: 7(fvec4) ImageSampleImplicitLod 2910 2911 ConstOffset MinLod 452 2912 + 2914: 7(fvec4) Load 2867(texel) + 2915: 7(fvec4) FAdd 2914 2913 + Store 2867(texel) 2915 + 2916: 233 Load 235(s1DArrayShadow) + 2917: 148(fvec3) Load 150(c3) + 2918: 6(float) Load 2665(lodClamp) + 2919: 6(float) CompositeExtract 2917 2 + 2920: 6(float) ImageSampleDrefImplicitLod 2916 2917 2919 ConstOffset MinLod 445 2918 + 2921: 174(ptr) AccessChain 2867(texel) 173 + 2922: 6(float) Load 2921 + 2923: 6(float) FAdd 2922 2920 + 2924: 174(ptr) AccessChain 2867(texel) 173 + Store 2924 2923 + 2925: 245 Load 247(s2DArrayShadow) + 2926: 7(fvec4) Load 197(c4) + 2927: 6(float) Load 2665(lodClamp) + 2928: 6(float) CompositeExtract 2926 3 + 2929: 6(float) ImageSampleDrefImplicitLod 2925 2926 2928 ConstOffset MinLod 452 2927 + 2930: 174(ptr) AccessChain 2867(texel) 173 + 2931: 6(float) Load 2930 + 2932: 6(float) FAdd 2931 2929 + 2933: 174(ptr) AccessChain 2867(texel) 173 + Store 2933 2932 + 2934: 7(fvec4) Load 2867(texel) + ReturnValue 2934 + FunctionEnd +106(testSparseTextureGradClamp(): 7(fvec4) Function None 8 + 107: Label + 2937(texel): 63(ptr) Variable Function + Store 2937(texel) 120 + 2938: 133 Load 135(s2D) + 2939: 52(fvec2) Load 138(c2) + 2940: 52(fvec2) Load 874(dPdxy2) + 2941: 52(fvec2) Load 874(dPdxy2) + 2942: 6(float) Load 2665(lodClamp) + 2943:1991(ResType) ImageSparseSampleExplicitLod 2938 2939 Grad MinLod 2940 2941 2942 + 2944: 7(fvec4) CompositeExtract 2943 1 + Store 2937(texel) 2944 + 2945: 47(int) CompositeExtract 2943 0 + 2946: 144 Load 146(s3D) + 2947: 148(fvec3) Load 150(c3) + 2948: 148(fvec3) Load 882(dPdxy3) + 2949: 148(fvec3) Load 882(dPdxy3) + 2950: 6(float) Load 2665(lodClamp) + 2951:1991(ResType) ImageSparseSampleExplicitLod 2946 2947 Grad MinLod 2948 2949 2950 + 2952: 7(fvec4) CompositeExtract 2951 1 + Store 2937(texel) 2952 + 2953: 47(int) CompositeExtract 2951 0 + 2954: 156 Load 158(sCube) + 2955: 148(fvec3) Load 150(c3) + 2956: 148(fvec3) Load 882(dPdxy3) + 2957: 148(fvec3) Load 882(dPdxy3) + 2958: 6(float) Load 2665(lodClamp) + 2959:1991(ResType) ImageSparseSampleExplicitLod 2954 2955 Grad MinLod 2956 2957 2958 + 2960: 7(fvec4) CompositeExtract 2959 1 + Store 2937(texel) 2960 + 2961: 47(int) CompositeExtract 2959 0 + 2962: 180 Load 182(s2DShadow) + 2963: 148(fvec3) Load 150(c3) + 2964: 52(fvec2) Load 874(dPdxy2) + 2965: 52(fvec2) Load 874(dPdxy2) + 2966: 6(float) Load 2665(lodClamp) + 2967: 174(ptr) AccessChain 2937(texel) 173 + 2968: 6(float) CompositeExtract 2963 2 + 2969:2009(ResType) ImageSparseSampleDrefExplicitLod 2962 2963 2968 Grad MinLod 2964 2965 2966 + 2970: 6(float) CompositeExtract 2969 1 + Store 2967 2970 + 2971: 47(int) CompositeExtract 2969 0 + 2972: 192 Load 194(sCubeShadow) + 2973: 7(fvec4) Load 197(c4) + 2974: 148(fvec3) Load 882(dPdxy3) + 2975: 148(fvec3) Load 882(dPdxy3) + 2976: 6(float) Load 2665(lodClamp) + 2977: 174(ptr) AccessChain 2937(texel) 173 + 2978: 6(float) CompositeExtract 2973 3 + 2979:2009(ResType) ImageSparseSampleDrefExplicitLod 2972 2973 2978 Grad MinLod 2974 2975 2976 + 2980: 6(float) CompositeExtract 2979 1 + Store 2977 2980 + 2981: 47(int) CompositeExtract 2979 0 + 2982: 215 Load 217(s2DArray) + 2983: 148(fvec3) Load 150(c3) + 2984: 52(fvec2) Load 874(dPdxy2) + 2985: 52(fvec2) Load 874(dPdxy2) + 2986: 6(float) Load 2665(lodClamp) + 2987:1991(ResType) ImageSparseSampleExplicitLod 2982 2983 Grad MinLod 2984 2985 2986 + 2988: 7(fvec4) CompositeExtract 2987 1 + Store 2937(texel) 2988 + 2989: 47(int) CompositeExtract 2987 0 + 2990: 245 Load 247(s2DArrayShadow) + 2991: 7(fvec4) Load 197(c4) + 2992: 52(fvec2) Load 874(dPdxy2) + 2993: 52(fvec2) Load 874(dPdxy2) + 2994: 6(float) Load 2665(lodClamp) + 2995: 174(ptr) AccessChain 2937(texel) 173 + 2996: 6(float) CompositeExtract 2991 3 + 2997:2009(ResType) ImageSparseSampleDrefExplicitLod 2990 2991 2996 Grad MinLod 2992 2993 2994 + 2998: 6(float) CompositeExtract 2997 1 + Store 2995 2998 + 2999: 47(int) CompositeExtract 2997 0 + 3000: 224 Load 226(sCubeArray) + 3001: 7(fvec4) Load 197(c4) + 3002: 148(fvec3) Load 882(dPdxy3) + 3003: 148(fvec3) Load 882(dPdxy3) + 3004: 6(float) Load 2665(lodClamp) + 3005:1991(ResType) ImageSparseSampleExplicitLod 3000 3001 Grad MinLod 3002 3003 3004 + 3006: 7(fvec4) CompositeExtract 3005 1 + Store 2937(texel) 3006 + 3007: 47(int) CompositeExtract 3005 0 + 3008: 7(fvec4) Load 2937(texel) + ReturnValue 3008 + FunctionEnd +108(testTextureGradClamp(): 7(fvec4) Function None 8 + 109: Label + 3011(texel): 63(ptr) Variable Function + Store 3011(texel) 120 + 3012: 122 Load 124(s1D) + 3013: 6(float) Load 127(c1) + 3014: 6(float) Load 866(dPdxy1) + 3015: 6(float) Load 866(dPdxy1) + 3016: 6(float) Load 2665(lodClamp) + 3017: 7(fvec4) ImageSampleExplicitLod 3012 3013 Grad MinLod 3014 3015 3016 + 3018: 7(fvec4) Load 3011(texel) + 3019: 7(fvec4) FAdd 3018 3017 + Store 3011(texel) 3019 + 3020: 133 Load 135(s2D) + 3021: 52(fvec2) Load 138(c2) + 3022: 52(fvec2) Load 874(dPdxy2) + 3023: 52(fvec2) Load 874(dPdxy2) + 3024: 6(float) Load 2665(lodClamp) + 3025: 7(fvec4) ImageSampleExplicitLod 3020 3021 Grad MinLod 3022 3023 3024 + 3026: 7(fvec4) Load 3011(texel) + 3027: 7(fvec4) FAdd 3026 3025 + Store 3011(texel) 3027 + 3028: 144 Load 146(s3D) + 3029: 148(fvec3) Load 150(c3) + 3030: 148(fvec3) Load 882(dPdxy3) + 3031: 148(fvec3) Load 882(dPdxy3) + 3032: 6(float) Load 2665(lodClamp) + 3033: 7(fvec4) ImageSampleExplicitLod 3028 3029 Grad MinLod 3030 3031 3032 + 3034: 7(fvec4) Load 3011(texel) + 3035: 7(fvec4) FAdd 3034 3033 + Store 3011(texel) 3035 + 3036: 156 Load 158(sCube) + 3037: 148(fvec3) Load 150(c3) + 3038: 148(fvec3) Load 882(dPdxy3) + 3039: 148(fvec3) Load 882(dPdxy3) + 3040: 6(float) Load 2665(lodClamp) + 3041: 7(fvec4) ImageSampleExplicitLod 3036 3037 Grad MinLod 3038 3039 3040 + 3042: 7(fvec4) Load 3011(texel) + 3043: 7(fvec4) FAdd 3042 3041 + Store 3011(texel) 3043 + 3044: 165 Load 167(s1DShadow) + 3045: 148(fvec3) Load 150(c3) + 3046: 6(float) Load 866(dPdxy1) + 3047: 6(float) Load 866(dPdxy1) + 3048: 6(float) Load 2665(lodClamp) + 3049: 6(float) CompositeExtract 3045 2 + 3050: 6(float) ImageSampleDrefExplicitLod 3044 3045 3049 Grad MinLod 3046 3047 3048 + 3051: 174(ptr) AccessChain 3011(texel) 173 + 3052: 6(float) Load 3051 + 3053: 6(float) FAdd 3052 3050 + 3054: 174(ptr) AccessChain 3011(texel) 173 + Store 3054 3053 + 3055: 180 Load 182(s2DShadow) + 3056: 148(fvec3) Load 150(c3) + 3057: 52(fvec2) Load 874(dPdxy2) + 3058: 52(fvec2) Load 874(dPdxy2) + 3059: 6(float) Load 2665(lodClamp) + 3060: 6(float) CompositeExtract 3056 2 + 3061: 6(float) ImageSampleDrefExplicitLod 3055 3056 3060 Grad MinLod 3057 3058 3059 + 3062: 174(ptr) AccessChain 3011(texel) 173 + 3063: 6(float) Load 3062 + 3064: 6(float) FAdd 3063 3061 + 3065: 174(ptr) AccessChain 3011(texel) 173 + Store 3065 3064 + 3066: 192 Load 194(sCubeShadow) + 3067: 7(fvec4) Load 197(c4) + 3068: 148(fvec3) Load 882(dPdxy3) + 3069: 148(fvec3) Load 882(dPdxy3) + 3070: 6(float) Load 2665(lodClamp) + 3071: 6(float) CompositeExtract 3067 3 + 3072: 6(float) ImageSampleDrefExplicitLod 3066 3067 3071 Grad MinLod 3068 3069 3070 + 3073: 174(ptr) AccessChain 3011(texel) 173 + 3074: 6(float) Load 3073 + 3075: 6(float) FAdd 3074 3072 + 3076: 174(ptr) AccessChain 3011(texel) 173 + Store 3076 3075 + 3077: 206 Load 208(s1DArray) + 3078: 52(fvec2) Load 138(c2) + 3079: 6(float) Load 866(dPdxy1) + 3080: 6(float) Load 866(dPdxy1) + 3081: 6(float) Load 2665(lodClamp) + 3082: 7(fvec4) ImageSampleExplicitLod 3077 3078 Grad MinLod 3079 3080 3081 + 3083: 7(fvec4) Load 3011(texel) + 3084: 7(fvec4) FAdd 3083 3082 + Store 3011(texel) 3084 + 3085: 215 Load 217(s2DArray) + 3086: 148(fvec3) Load 150(c3) + 3087: 52(fvec2) Load 874(dPdxy2) + 3088: 52(fvec2) Load 874(dPdxy2) + 3089: 6(float) Load 2665(lodClamp) + 3090: 7(fvec4) ImageSampleExplicitLod 3085 3086 Grad MinLod 3087 3088 3089 + 3091: 7(fvec4) Load 3011(texel) + 3092: 7(fvec4) FAdd 3091 3090 + Store 3011(texel) 3092 + 3093: 233 Load 235(s1DArrayShadow) + 3094: 148(fvec3) Load 150(c3) + 3095: 6(float) Load 866(dPdxy1) + 3096: 6(float) Load 866(dPdxy1) + 3097: 6(float) Load 2665(lodClamp) + 3098: 6(float) CompositeExtract 3094 2 + 3099: 6(float) ImageSampleDrefExplicitLod 3093 3094 3098 Grad MinLod 3095 3096 3097 + 3100: 174(ptr) AccessChain 3011(texel) 173 + 3101: 6(float) Load 3100 + 3102: 6(float) FAdd 3101 3099 + 3103: 174(ptr) AccessChain 3011(texel) 173 + Store 3103 3102 + 3104: 245 Load 247(s2DArrayShadow) + 3105: 7(fvec4) Load 197(c4) + 3106: 52(fvec2) Load 874(dPdxy2) + 3107: 52(fvec2) Load 874(dPdxy2) + 3108: 6(float) Load 2665(lodClamp) + 3109: 6(float) CompositeExtract 3105 3 + 3110: 6(float) ImageSampleDrefExplicitLod 3104 3105 3109 Grad MinLod 3106 3107 3108 + 3111: 174(ptr) AccessChain 3011(texel) 173 + 3112: 6(float) Load 3111 + 3113: 6(float) FAdd 3112 3110 + 3114: 174(ptr) AccessChain 3011(texel) 173 + Store 3114 3113 + 3115: 224 Load 226(sCubeArray) + 3116: 7(fvec4) Load 197(c4) + 3117: 148(fvec3) Load 882(dPdxy3) + 3118: 148(fvec3) Load 882(dPdxy3) + 3119: 6(float) Load 2665(lodClamp) + 3120: 7(fvec4) ImageSampleExplicitLod 3115 3116 Grad MinLod 3117 3118 3119 + 3121: 7(fvec4) Load 3011(texel) + 3122: 7(fvec4) FAdd 3121 3120 + Store 3011(texel) 3122 + 3123: 7(fvec4) Load 3011(texel) + ReturnValue 3123 + FunctionEnd +110(testSparseTextureGradOffsetClamp(): 7(fvec4) Function None 8 + 111: Label + 3126(texel): 63(ptr) Variable Function + Store 3126(texel) 120 + 3127: 133 Load 135(s2D) + 3128: 52(fvec2) Load 138(c2) + 3129: 52(fvec2) Load 874(dPdxy2) + 3130: 52(fvec2) Load 874(dPdxy2) + 3131: 6(float) Load 2665(lodClamp) + 3132:1991(ResType) ImageSparseSampleExplicitLod 3127 3128 Grad ConstOffset MinLod 3129 3130 452 3131 + 3133: 7(fvec4) CompositeExtract 3132 1 + Store 3126(texel) 3133 + 3134: 47(int) CompositeExtract 3132 0 + 3135: 144 Load 146(s3D) + 3136: 148(fvec3) Load 150(c3) + 3137: 148(fvec3) Load 882(dPdxy3) + 3138: 148(fvec3) Load 882(dPdxy3) + 3139: 6(float) Load 2665(lodClamp) + 3140:1991(ResType) ImageSparseSampleExplicitLod 3135 3136 Grad ConstOffset MinLod 3137 3138 459 3139 + 3141: 7(fvec4) CompositeExtract 3140 1 + Store 3126(texel) 3141 + 3142: 47(int) CompositeExtract 3140 0 + 3143: 180 Load 182(s2DShadow) + 3144: 148(fvec3) Load 150(c3) + 3145: 52(fvec2) Load 874(dPdxy2) + 3146: 52(fvec2) Load 874(dPdxy2) + 3147: 6(float) Load 2665(lodClamp) + 3148: 174(ptr) AccessChain 3126(texel) 173 + 3149: 6(float) CompositeExtract 3144 2 + 3150:2009(ResType) ImageSparseSampleDrefExplicitLod 3143 3144 3149 Grad ConstOffset MinLod 3145 3146 452 3147 + 3151: 6(float) CompositeExtract 3150 1 + Store 3148 3151 + 3152: 47(int) CompositeExtract 3150 0 + 3153: 215 Load 217(s2DArray) + 3154: 148(fvec3) Load 150(c3) + 3155: 52(fvec2) Load 874(dPdxy2) + 3156: 52(fvec2) Load 874(dPdxy2) + 3157: 6(float) Load 2665(lodClamp) + 3158:1991(ResType) ImageSparseSampleExplicitLod 3153 3154 Grad ConstOffset MinLod 3155 3156 452 3157 + 3159: 7(fvec4) CompositeExtract 3158 1 + Store 3126(texel) 3159 + 3160: 47(int) CompositeExtract 3158 0 + 3161: 245 Load 247(s2DArrayShadow) + 3162: 7(fvec4) Load 197(c4) + 3163: 52(fvec2) Load 874(dPdxy2) + 3164: 52(fvec2) Load 874(dPdxy2) + 3165: 6(float) Load 2665(lodClamp) + 3166: 174(ptr) AccessChain 3126(texel) 173 + 3167: 6(float) CompositeExtract 3162 3 + 3168:2009(ResType) ImageSparseSampleDrefExplicitLod 3161 3162 3167 Grad ConstOffset MinLod 3163 3164 452 3165 + 3169: 6(float) CompositeExtract 3168 1 + Store 3166 3169 + 3170: 47(int) CompositeExtract 3168 0 + 3171: 7(fvec4) Load 3126(texel) + ReturnValue 3171 + FunctionEnd +112(testTextureGradOffsetClamp(): 7(fvec4) Function None 8 + 113: Label + 3174(texel): 63(ptr) Variable Function + Store 3174(texel) 120 + 3175: 122 Load 124(s1D) + 3176: 6(float) Load 127(c1) + 3177: 6(float) Load 866(dPdxy1) + 3178: 6(float) Load 866(dPdxy1) + 3179: 6(float) Load 2665(lodClamp) + 3180: 7(fvec4) ImageSampleExplicitLod 3175 3176 Grad ConstOffset MinLod 3177 3178 445 3179 + 3181: 7(fvec4) Load 3174(texel) + 3182: 7(fvec4) FAdd 3181 3180 + Store 3174(texel) 3182 + 3183: 133 Load 135(s2D) + 3184: 52(fvec2) Load 138(c2) + 3185: 52(fvec2) Load 874(dPdxy2) + 3186: 52(fvec2) Load 874(dPdxy2) + 3187: 6(float) Load 2665(lodClamp) + 3188: 7(fvec4) ImageSampleExplicitLod 3183 3184 Grad ConstOffset MinLod 3185 3186 452 3187 + 3189: 7(fvec4) Load 3174(texel) + 3190: 7(fvec4) FAdd 3189 3188 + Store 3174(texel) 3190 + 3191: 144 Load 146(s3D) + 3192: 148(fvec3) Load 150(c3) + 3193: 148(fvec3) Load 882(dPdxy3) + 3194: 148(fvec3) Load 882(dPdxy3) + 3195: 6(float) Load 2665(lodClamp) + 3196: 7(fvec4) ImageSampleExplicitLod 3191 3192 Grad ConstOffset MinLod 3193 3194 459 3195 + 3197: 7(fvec4) Load 3174(texel) + 3198: 7(fvec4) FAdd 3197 3196 + Store 3174(texel) 3198 + 3199: 165 Load 167(s1DShadow) + 3200: 148(fvec3) Load 150(c3) + 3201: 6(float) Load 866(dPdxy1) + 3202: 6(float) Load 866(dPdxy1) + 3203: 6(float) Load 2665(lodClamp) + 3204: 6(float) CompositeExtract 3200 2 + 3205: 6(float) ImageSampleDrefExplicitLod 3199 3200 3204 Grad ConstOffset MinLod 3201 3202 445 3203 + 3206: 174(ptr) AccessChain 3174(texel) 173 + 3207: 6(float) Load 3206 + 3208: 6(float) FAdd 3207 3205 + 3209: 174(ptr) AccessChain 3174(texel) 173 + Store 3209 3208 + 3210: 180 Load 182(s2DShadow) + 3211: 148(fvec3) Load 150(c3) + 3212: 52(fvec2) Load 874(dPdxy2) + 3213: 52(fvec2) Load 874(dPdxy2) + 3214: 6(float) Load 2665(lodClamp) + 3215: 6(float) CompositeExtract 3211 2 + 3216: 6(float) ImageSampleDrefExplicitLod 3210 3211 3215 Grad ConstOffset MinLod 3212 3213 452 3214 + 3217: 174(ptr) AccessChain 3174(texel) 173 + 3218: 6(float) Load 3217 + 3219: 6(float) FAdd 3218 3216 + 3220: 174(ptr) AccessChain 3174(texel) 173 + Store 3220 3219 + 3221: 206 Load 208(s1DArray) + 3222: 52(fvec2) Load 138(c2) + 3223: 6(float) Load 866(dPdxy1) + 3224: 6(float) Load 866(dPdxy1) + 3225: 6(float) Load 2665(lodClamp) + 3226: 7(fvec4) ImageSampleExplicitLod 3221 3222 Grad ConstOffset MinLod 3223 3224 445 3225 + 3227: 7(fvec4) Load 3174(texel) + 3228: 7(fvec4) FAdd 3227 3226 + Store 3174(texel) 3228 + 3229: 215 Load 217(s2DArray) + 3230: 148(fvec3) Load 150(c3) + 3231: 52(fvec2) Load 874(dPdxy2) + 3232: 52(fvec2) Load 874(dPdxy2) + 3233: 6(float) Load 2665(lodClamp) + 3234: 7(fvec4) ImageSampleExplicitLod 3229 3230 Grad ConstOffset MinLod 3231 3232 452 3233 + 3235: 7(fvec4) Load 3174(texel) + 3236: 7(fvec4) FAdd 3235 3234 + Store 3174(texel) 3236 + 3237: 233 Load 235(s1DArrayShadow) + 3238: 148(fvec3) Load 150(c3) + 3239: 6(float) Load 866(dPdxy1) + 3240: 6(float) Load 866(dPdxy1) + 3241: 6(float) Load 2665(lodClamp) + 3242: 6(float) CompositeExtract 3238 2 + 3243: 6(float) ImageSampleDrefExplicitLod 3237 3238 3242 Grad ConstOffset MinLod 3239 3240 445 3241 + 3244: 174(ptr) AccessChain 3174(texel) 173 + 3245: 6(float) Load 3244 + 3246: 6(float) FAdd 3245 3243 + 3247: 174(ptr) AccessChain 3174(texel) 173 + Store 3247 3246 + 3248: 245 Load 247(s2DArrayShadow) + 3249: 7(fvec4) Load 197(c4) + 3250: 52(fvec2) Load 874(dPdxy2) + 3251: 52(fvec2) Load 874(dPdxy2) + 3252: 6(float) Load 2665(lodClamp) + 3253: 6(float) CompositeExtract 3249 3 + 3254: 6(float) ImageSampleDrefExplicitLod 3248 3249 3253 Grad ConstOffset MinLod 3250 3251 452 3252 + 3255: 174(ptr) AccessChain 3174(texel) 173 + 3256: 6(float) Load 3255 + 3257: 6(float) FAdd 3256 3254 + 3258: 174(ptr) AccessChain 3174(texel) 173 + Store 3258 3257 + 3259: 7(fvec4) Load 3174(texel) + ReturnValue 3259 + FunctionEnd +114(testCombinedTextureSampler(): 7(fvec4) Function None 8 + 115: Label + 3262(texel): 63(ptr) Variable Function + Store 3262(texel) 120 + 3265: 121 Load 3264(t1D) + 3269: 3266 Load 3268(s) + 3270: 122 SampledImage 3265 3269 + 3271: 6(float) Load 127(c1) + 3272: 7(fvec4) ImageSampleImplicitLod 3270 3271 + 3273: 7(fvec4) Load 3262(texel) + 3274: 7(fvec4) FAdd 3273 3272 + Store 3262(texel) 3274 + 3277: 132 Load 3276(t2D) + 3278: 3266 Load 3268(s) + 3279: 133 SampledImage 3277 3278 + 3280: 52(fvec2) Load 138(c2) + 3281: 7(fvec4) ImageSampleImplicitLod 3279 3280 + 3282: 7(fvec4) Load 3262(texel) + 3283: 7(fvec4) FAdd 3282 3281 + Store 3262(texel) 3283 + 3286: 143 Load 3285(t3D) + 3287: 3266 Load 3268(s) + 3288: 144 SampledImage 3286 3287 + 3289: 148(fvec3) Load 150(c3) + 3290: 7(fvec4) ImageSampleImplicitLod 3288 3289 + 3291: 7(fvec4) Load 3262(texel) + 3292: 7(fvec4) FAdd 3291 3290 + Store 3262(texel) 3292 + 3295: 155 Load 3294(tCube) + 3296: 3266 Load 3268(s) + 3297: 156 SampledImage 3295 3296 + 3298: 148(fvec3) Load 150(c3) + 3299: 7(fvec4) ImageSampleImplicitLod 3297 3298 + 3300: 7(fvec4) Load 3262(texel) + 3301: 7(fvec4) FAdd 3300 3299 + Store 3262(texel) 3301 + 3302: 121 Load 3264(t1D) + 3304: 3266 Load 3303(sShadow) + 3305: 165 SampledImage 3302 3304 + 3306: 148(fvec3) Load 150(c3) + 3307: 6(float) CompositeExtract 3306 2 + 3308: 6(float) ImageSampleDrefImplicitLod 3305 3306 3307 + 3309: 174(ptr) AccessChain 3262(texel) 173 + 3310: 6(float) Load 3309 + 3311: 6(float) FAdd 3310 3308 + 3312: 174(ptr) AccessChain 3262(texel) 173 + Store 3312 3311 + 3313: 132 Load 3276(t2D) + 3314: 3266 Load 3303(sShadow) + 3315: 180 SampledImage 3313 3314 + 3316: 148(fvec3) Load 150(c3) + 3317: 6(float) CompositeExtract 3316 2 + 3318: 6(float) ImageSampleDrefImplicitLod 3315 3316 3317 + 3319: 174(ptr) AccessChain 3262(texel) 173 + 3320: 6(float) Load 3319 + 3321: 6(float) FAdd 3320 3318 + 3322: 174(ptr) AccessChain 3262(texel) 173 + Store 3322 3321 + 3323: 155 Load 3294(tCube) + 3324: 3266 Load 3303(sShadow) + 3325: 192 SampledImage 3323 3324 + 3326: 7(fvec4) Load 197(c4) + 3327: 6(float) CompositeExtract 3326 3 + 3328: 6(float) ImageSampleDrefImplicitLod 3325 3326 3327 + 3329: 174(ptr) AccessChain 3262(texel) 173 + 3330: 6(float) Load 3329 + 3331: 6(float) FAdd 3330 3328 + 3332: 174(ptr) AccessChain 3262(texel) 173 + Store 3332 3331 + 3335: 205 Load 3334(t1DArray) + 3336: 3266 Load 3268(s) + 3337: 206 SampledImage 3335 3336 + 3338: 52(fvec2) Load 138(c2) + 3339: 7(fvec4) ImageSampleImplicitLod 3337 3338 + 3340: 7(fvec4) Load 3262(texel) + 3341: 7(fvec4) FAdd 3340 3339 + Store 3262(texel) 3341 + 3344: 214 Load 3343(t2DArray) + 3345: 3266 Load 3268(s) + 3346: 215 SampledImage 3344 3345 + 3347: 148(fvec3) Load 150(c3) + 3348: 7(fvec4) ImageSampleImplicitLod 3346 3347 + 3349: 7(fvec4) Load 3262(texel) + 3350: 7(fvec4) FAdd 3349 3348 + Store 3262(texel) 3350 + 3353: 223 Load 3352(tCubeArray) + 3354: 3266 Load 3268(s) + 3355: 224 SampledImage 3353 3354 + 3356: 7(fvec4) Load 197(c4) + 3357: 7(fvec4) ImageSampleImplicitLod 3355 3356 + 3358: 7(fvec4) Load 3262(texel) + 3359: 7(fvec4) FAdd 3358 3357 + Store 3262(texel) 3359 + 3360: 205 Load 3334(t1DArray) + 3361: 3266 Load 3303(sShadow) + 3362: 233 SampledImage 3360 3361 + 3363: 148(fvec3) Load 150(c3) + 3364: 6(float) CompositeExtract 3363 2 + 3365: 6(float) ImageSampleDrefImplicitLod 3362 3363 3364 + 3366: 174(ptr) AccessChain 3262(texel) 173 + 3367: 6(float) Load 3366 + 3368: 6(float) FAdd 3367 3365 + 3369: 174(ptr) AccessChain 3262(texel) 173 + Store 3369 3368 + 3370: 214 Load 3343(t2DArray) + 3371: 3266 Load 3303(sShadow) + 3372: 245 SampledImage 3370 3371 + 3373: 7(fvec4) Load 197(c4) + 3374: 6(float) CompositeExtract 3373 3 + 3375: 6(float) ImageSampleDrefImplicitLod 3372 3373 3374 + 3376: 174(ptr) AccessChain 3262(texel) 173 + 3377: 6(float) Load 3376 + 3378: 6(float) FAdd 3377 3375 + 3379: 174(ptr) AccessChain 3262(texel) 173 + Store 3379 3378 + 3382: 256 Load 3381(t2DRect) + 3383: 3266 Load 3268(s) + 3384: 257 SampledImage 3382 3383 + 3385: 52(fvec2) Load 138(c2) + 3386: 7(fvec4) ImageSampleImplicitLod 3384 3385 + 3387: 7(fvec4) Load 3262(texel) + 3388: 7(fvec4) FAdd 3387 3386 + Store 3262(texel) 3388 + 3389: 256 Load 3381(t2DRect) + 3390: 3266 Load 3303(sShadow) + 3391: 266 SampledImage 3389 3390 + 3392: 148(fvec3) Load 150(c3) + 3393: 6(float) CompositeExtract 3392 2 + 3394: 6(float) ImageSampleDrefImplicitLod 3391 3392 3393 + 3395: 174(ptr) AccessChain 3262(texel) 173 + 3396: 6(float) Load 3395 + 3397: 6(float) FAdd 3396 3394 + 3398: 174(ptr) AccessChain 3262(texel) 173 + Store 3398 3397 + 3399: 223 Load 3352(tCubeArray) + 3400: 3266 Load 3303(sShadow) + 3401: 278 SampledImage 3399 3400 + 3402: 7(fvec4) Load 197(c4) + 3403: 6(float) Load 283(compare) + 3404: 6(float) ImageSampleDrefImplicitLod 3401 3402 3403 + 3405: 174(ptr) AccessChain 3262(texel) 173 + 3406: 6(float) Load 3405 + 3407: 6(float) FAdd 3406 3404 + 3408: 174(ptr) AccessChain 3262(texel) 173 + Store 3408 3407 + 3409: 7(fvec4) Load 3262(texel) + ReturnValue 3409 + FunctionEnd +116(testSubpassLoad(): 7(fvec4) Function None 8 + 117: Label + 3415: 3412 Load 3414(subpass) + 3417: 7(fvec4) ImageRead 3415 3416 + 3421: 3418 Load 3420(subpassMS) + 3422: 7(fvec4) ImageRead 3421 3416 Sample 799 + 3423: 7(fvec4) FAdd 3417 3422 + ReturnValue 3423 + FunctionEnd diff --git a/Test/baseResults/spv.intcoopmat.comp.out b/Test/baseResults/spv.intcoopmat.comp.out index bc502552..24289a9f 100755 --- a/Test/baseResults/spv.intcoopmat.comp.out +++ b/Test/baseResults/spv.intcoopmat.comp.out @@ -1,10 +1,11 @@ spv.intcoopmat.comp // Module Version 10000 // Generated by (magic number): 8000b -// Id's are bound by 262 +// Id's are bound by 286 Capability Shader Capability Float16 + Capability Int16 Capability Int8 Capability StorageBuffer8BitAccess Capability VulkanMemoryModelKHR @@ -72,18 +73,22 @@ spv.intcoopmat.comp Name 207 "tempArg" Name 212 "shmatrix" Name 217 "ms" - Name 225 "miC" - Name 226 "muC" - Name 231 "iarr" - Name 236 "iarr2" - Name 241 "uarr" - Name 246 "uarr2" - Name 251 "S" - MemberName 251(S) 0 "a" - MemberName 251(S) 1 "b" - MemberName 251(S) 2 "c" - Name 256 "SC" - Name 261 "scm" + Name 224 "i16" + Name 230 "u16" + Name 233 "tempArg" + Name 239 "tempArg" + Name 249 "miC" + Name 250 "muC" + Name 255 "iarr" + Name 260 "iarr2" + Name 265 "uarr" + Name 270 "uarr2" + Name 275 "S" + MemberName 275(S) 0 "a" + MemberName 275(S) 1 "b" + MemberName 275(S) 2 "c" + Name 280 "SC" + Name 285 "scm" Decorate 83 ArrayStride 4 Decorate 84 ArrayStride 4 MemberDecorate 85(Block) 0 Offset 0 @@ -105,8 +110,8 @@ spv.intcoopmat.comp Decorate 108(block8) DescriptorSet 0 Decorate 108(block8) Binding 0 Decorate 156(Y) SpecId 0 - Decorate 223 BuiltIn WorkgroupSize - Decorate 256(SC) SpecId 2 + Decorate 247 BuiltIn WorkgroupSize + Decorate 280(SC) SpecId 2 2: TypeVoid 3: TypeFunction 2 6: TypeInt 8 1 @@ -196,47 +201,57 @@ spv.intcoopmat.comp 212(shmatrix): 211(ptr) Variable Workgroup 213: 7(int) Constant 2 214: TypePointer Workgroup 208(ivec4) - 221: TypeVector 7(int) 3 - 222: 7(int) Constant 64 - 223: 221(ivec3) ConstantComposite 222 100 100 - 224: TypePointer Private 166 - 225(miC): 224(ptr) Variable Private - 226(muC): 162(ptr) Variable Private - 227: 7(int) SpecConstantOp 5362 166 - 228: 72(int) SpecConstantOp 128 227 76 - 229: TypeArray 72(int) 228 - 230: TypePointer Private 229 - 231(iarr): 230(ptr) Variable Private - 232: 7(int) SpecConstantOp 5362 166 - 233: 72(int) SpecConstantOp 128 232 76 - 234: TypeArray 72(int) 233 - 235: TypePointer Private 234 - 236(iarr2): 235(ptr) Variable Private - 237: 7(int) SpecConstantOp 5362 158 - 238: 72(int) SpecConstantOp 128 237 76 - 239: TypeArray 72(int) 238 - 240: TypePointer Private 239 - 241(uarr): 240(ptr) Variable Private - 242: 7(int) SpecConstantOp 5362 158 - 243: 72(int) SpecConstantOp 128 242 76 - 244: TypeArray 72(int) 243 - 245: TypePointer Private 244 - 246(uarr2): 245(ptr) Variable Private - 247: TypeCooperativeMatrixNV 72(int) 8 157(Z) 9 - 248: 247 ConstantComposite 73 - 249: 16(int8_t) Constant 1 - 250: 17 ConstantComposite 249 - 251(S): TypeStruct 72(int) 72(int) 72(int) - 252: 72(int) Constant 12 - 253: 72(int) Constant 23 - 254: 72(int) Constant 34 - 255: 251(S) ConstantComposite 252 253 254 - 256(SC): 72(int) SpecConstant 1 - 257: TypeCooperativeMatrixNV 7(int) 8 256(SC) 256(SC) - 258: TypeArray 257 256(SC) - 259: TypeArray 258 256(SC) - 260: TypePointer Private 259 - 261(scm): 260(ptr) Variable Private + 221: TypeInt 16 1 + 222: TypeCooperativeMatrixNV 221(int16_t) 8 32 9 + 223: TypePointer Function 222 + 225:221(int16_t) Constant 0 + 226: 222 ConstantComposite 225 + 227: TypeInt 16 0 + 228: TypeCooperativeMatrixNV 227(int16_t) 8 32 9 + 229: TypePointer Function 228 + 231:227(int16_t) Constant 0 + 232: 228 ConstantComposite 231 + 245: TypeVector 7(int) 3 + 246: 7(int) Constant 64 + 247: 245(ivec3) ConstantComposite 246 100 100 + 248: TypePointer Private 166 + 249(miC): 248(ptr) Variable Private + 250(muC): 162(ptr) Variable Private + 251: 7(int) SpecConstantOp 5362 166 + 252: 72(int) SpecConstantOp 128 251 76 + 253: TypeArray 72(int) 252 + 254: TypePointer Private 253 + 255(iarr): 254(ptr) Variable Private + 256: 7(int) SpecConstantOp 5362 166 + 257: 72(int) SpecConstantOp 128 256 76 + 258: TypeArray 72(int) 257 + 259: TypePointer Private 258 + 260(iarr2): 259(ptr) Variable Private + 261: 7(int) SpecConstantOp 5362 158 + 262: 72(int) SpecConstantOp 128 261 76 + 263: TypeArray 72(int) 262 + 264: TypePointer Private 263 + 265(uarr): 264(ptr) Variable Private + 266: 7(int) SpecConstantOp 5362 158 + 267: 72(int) SpecConstantOp 128 266 76 + 268: TypeArray 72(int) 267 + 269: TypePointer Private 268 + 270(uarr2): 269(ptr) Variable Private + 271: TypeCooperativeMatrixNV 72(int) 8 157(Z) 9 + 272: 271 ConstantComposite 73 + 273: 16(int8_t) Constant 1 + 274: 17 ConstantComposite 273 + 275(S): TypeStruct 72(int) 72(int) 72(int) + 276: 72(int) Constant 12 + 277: 72(int) Constant 23 + 278: 72(int) Constant 34 + 279: 275(S) ConstantComposite 276 277 278 + 280(SC): 72(int) SpecConstant 1 + 281: TypeCooperativeMatrixNV 7(int) 8 280(SC) 280(SC) + 282: TypeArray 281 280(SC) + 283: TypeArray 282 280(SC) + 284: TypePointer Private 283 + 285(scm): 284(ptr) Variable Private 4(main): 2 Function None 3 5: Label 35(mu): 34(ptr) Variable Function @@ -264,6 +279,10 @@ spv.intcoopmat.comp 193(param): 18(ptr) Variable Function 207(tempArg): 38(ptr) Variable Function 217(ms): 38(ptr) Variable Function + 224(i16): 223(ptr) Variable Function + 230(u16): 229(ptr) Variable Function + 233(tempArg): 223(ptr) Variable Function + 239(tempArg): 229(ptr) Variable Function Store 35(mu) 36 Store 39(mi) 41 42: 33 Load 35(mu) @@ -400,6 +419,24 @@ spv.intcoopmat.comp 219: 37 Load 217(ms) 220: 214(ptr) AccessChain 212(shmatrix) 100 CooperativeMatrixStoreNV 220 219 213 93 MakePointerAvailableKHR NonPrivatePointerKHR 213 + Store 224(i16) 226 + Store 230(u16) 232 + 234: 214(ptr) AccessChain 212(shmatrix) 100 + 235: 222 CooperativeMatrixLoadNV 234 213 93 MakePointerVisibleKHR NonPrivatePointerKHR 213 + Store 233(tempArg) 235 + 236: 222 Load 233(tempArg) + Store 224(i16) 236 + 237: 222 Load 224(i16) + 238: 214(ptr) AccessChain 212(shmatrix) 100 + CooperativeMatrixStoreNV 238 237 213 93 MakePointerAvailableKHR NonPrivatePointerKHR 213 + 240: 214(ptr) AccessChain 212(shmatrix) 100 + 241: 228 CooperativeMatrixLoadNV 240 213 93 MakePointerVisibleKHR NonPrivatePointerKHR 213 + Store 239(tempArg) 241 + 242: 228 Load 239(tempArg) + Store 230(u16) 242 + 243: 228 Load 230(u16) + 244: 214(ptr) AccessChain 212(shmatrix) 100 + CooperativeMatrixStoreNV 244 243 213 93 MakePointerAvailableKHR NonPrivatePointerKHR 213 Return FunctionEnd 14(ineg(i81;): 10 Function None 12 diff --git a/Test/baseResults/spv.intrinsicsFakeEnable.vert.out b/Test/baseResults/spv.intrinsicsFakeEnable.vert.out new file mode 100755 index 00000000..da1cbf76 --- /dev/null +++ b/Test/baseResults/spv.intrinsicsFakeEnable.vert.out @@ -0,0 +1,6 @@ +spv.intrinsicsFakeEnable.vert +ERROR: 0:7: 'location' : overlapping use of location 0 +ERROR: 1 compilation errors. No code generated. + + +SPIR-V is not generated for failed compile or link diff --git a/Test/baseResults/spv.intrinsicsSpirvDecorateId.comp.out b/Test/baseResults/spv.intrinsicsSpirvDecorateId.comp.out new file mode 100755 index 00000000..c454dc60 --- /dev/null +++ b/Test/baseResults/spv.intrinsicsSpirvDecorateId.comp.out @@ -0,0 +1,46 @@ +spv.intrinsicsSpirvDecorateId.comp +// Module Version 10000 +// Generated by (magic number): 8000b +// Id's are bound by 16 + + Capability Shader + Extension "SPV_GOOGLE_hlsl_functionality1" + 1: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint GLCompute 4 "main" + ExecutionMode 4 LocalSize 1 1 1 + Source GLSL 460 + SourceExtension "GL_EXT_spirv_intrinsics" + Name 4 "main" + Name 10 "CounterBuffer" + MemberName 10(CounterBuffer) 0 "counter" + Name 12 "x" + Name 13 "Uniform" + MemberName 13(Uniform) 0 "y" + Name 15 "" + Decorate 9 BuiltIn WorkgroupSize + MemberDecorate 10(CounterBuffer) 0 Offset 0 + Decorate 10(CounterBuffer) Block + Decorate 12(x) DescriptorSet 0 + Decorate 12(x) Binding 1 + MemberDecorate 13(Uniform) 0 Offset 0 + Decorate 13(Uniform) Block + Decorate 15 DescriptorSet 0 + Decorate 15 Binding 0 + DecorateId 15 DecorationHlslCounterBufferGOOGLE 12(x) + 2: TypeVoid + 3: TypeFunction 2 + 6: TypeInt 32 0 + 7: TypeVector 6(int) 3 + 8: 6(int) Constant 1 + 9: 7(ivec3) ConstantComposite 8 8 8 +10(CounterBuffer): TypeStruct 6(int) + 11: TypePointer Uniform 10(CounterBuffer) + 12(x): 11(ptr) Variable Uniform + 13(Uniform): TypeStruct 6(int) + 14: TypePointer Uniform 13(Uniform) + 15: 14(ptr) Variable Uniform + 4(main): 2 Function None 3 + 5: Label + Return + FunctionEnd diff --git a/Test/baseResults/spv.intrinsicsSpirvDecorateString.comp.out b/Test/baseResults/spv.intrinsicsSpirvDecorateString.comp.out new file mode 100755 index 00000000..87225b87 --- /dev/null +++ b/Test/baseResults/spv.intrinsicsSpirvDecorateString.comp.out @@ -0,0 +1,39 @@ +spv.intrinsicsSpirvDecorateString.comp +// Module Version 10000 +// Generated by (magic number): 8000b +// Id's are bound by 16 + + Capability Shader + Extension "SPV_GOOGLE_hlsl_functionality1" + 1: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint GLCompute 4 "main" + ExecutionMode 4 LocalSize 1 1 1 + Source GLSL 460 + SourceExtension "GL_EXT_spirv_intrinsics" + Name 4 "main" + Name 8 "x" + Name 10 "y" + Decorate 8(x) RelaxedPrecision + DecorateStringGOOGLE 8(x) DecorationHlslSemanticGOOGLE "foobar" + Decorate 10(y) RelaxedPrecision + DecorateStringGOOGLE 10(y) DecorationHlslSemanticGOOGLE "foobar" + Decorate 15 BuiltIn WorkgroupSize + 2: TypeVoid + 3: TypeFunction 2 + 6: TypeFloat 32 + 7: TypePointer Function 6(float) + 9: 6(float) Constant 1056964608 + 11: 6(float) Constant 1065353216 + 12: TypeInt 32 0 + 13: TypeVector 12(int) 3 + 14: 12(int) Constant 1 + 15: 13(ivec3) ConstantComposite 14 14 14 + 4(main): 2 Function None 3 + 5: Label + 8(x): 7(ptr) Variable Function + 10(y): 7(ptr) Variable Function + Store 8(x) 9 + Store 10(y) 11 + Return + FunctionEnd diff --git a/Test/baseResults/spv.intrinsicsSpirvTypeWithTypeSpecifier.vert.out b/Test/baseResults/spv.intrinsicsSpirvTypeWithTypeSpecifier.vert.out new file mode 100755 index 00000000..580c704d --- /dev/null +++ b/Test/baseResults/spv.intrinsicsSpirvTypeWithTypeSpecifier.vert.out @@ -0,0 +1,35 @@ +spv.intrinsicsSpirvTypeWithTypeSpecifier.vert +// Module Version 10000 +// Generated by (magic number): 8000b +// Id's are bound by 14 + + Capability Shader + Capability Int64 + Capability PhysicalStorageBufferAddressesEXT + Extension "SPV_EXT_physical_storage_buffer" + Extension "SPV_KHR_physical_storage_buffer" + Extension "SPV_KHR_variable_pointers" + 1: ExtInstImport "GLSL.std.450" + MemoryModel PhysicalStorageBuffer64EXT GLSL450 + EntryPoint Vertex 4 "main" + Source GLSL 450 + SourceExtension "GL_ARB_gpu_shader_int64" + SourceExtension "GL_EXT_buffer_reference" + SourceExtension "GL_EXT_spirv_intrinsics" + Name 4 "main" + Name 8 "value" + 2: TypeVoid + 3: TypeFunction 2 + 6: TypeInt 32 0 + 7: TypePointer Function 6(int) + 9: TypeInt 64 0 + 10: 9(int64_t) Constant 1 0 + 11: TypePointer PhysicalStorageBufferEXT 6(int) + 4(main): 2 Function None 3 + 5: Label + 8(value): 7(ptr) Variable Function + 12: 11(ptr) ConvertUToPtr 10 + 13: 6(int) Load 12 Aligned 32 + Store 8(value) 13 + Return + FunctionEnd diff --git a/Test/baseResults/spv.nv.dmm-allops.comp.out b/Test/baseResults/spv.nv.dmm-allops.comp.out new file mode 100755 index 00000000..b9807142 --- /dev/null +++ b/Test/baseResults/spv.nv.dmm-allops.comp.out @@ -0,0 +1,96 @@ +spv.nv.dmm-allops.comp +// Module Version 10400 +// Generated by (magic number): 8000b +// Id's are bound by 59 + + Capability Shader + Capability RayQueryKHR + Capability DisplacementMicromapNV + Extension "SPV_KHR_ray_query" + Extension "SPV_NV_displacement_micromap" + 1: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint GLCompute 4 "main" 11 16 + ExecutionMode 4 LocalSize 16 1 1 + Source GLSL 460 + SourceExtension "GL_EXT_ray_query" + SourceExtension "GL_NV_displacement_micromap" + Name 4 "main" + Name 9 "block" + MemberName 9(block) 0 "op_pos" + MemberName 9(block) 1 "op_bary" + Name 11 "" + Name 16 "as" + MemberDecorate 9(block) 0 Offset 0 + MemberDecorate 9(block) 1 Offset 16 + Decorate 9(block) Block + Decorate 11 DescriptorSet 0 + Decorate 11 Binding 0 + Decorate 16(as) DescriptorSet 0 + Decorate 16(as) Binding 1 + Decorate 58 BuiltIn WorkgroupSize + 2: TypeVoid + 3: TypeFunction 2 + 6: TypeFloat 32 + 7: TypeVector 6(float) 3 + 8: TypeVector 6(float) 2 + 9(block): TypeStruct 7(fvec3) 8(fvec2) + 10: TypePointer StorageBuffer 9(block) + 11: 10(ptr) Variable StorageBuffer + 12: TypeInt 32 1 + 13: 12(int) Constant 0 + 14: TypeAccelerationStructureKHR + 15: TypePointer UniformConstant 14 + 16(as): 15(ptr) Variable UniformConstant + 18: 12(int) Constant 1 + 19: TypeVector 12(int) 2 + 20: 19(ivec2) ConstantComposite 13 13 + 22: TypePointer StorageBuffer 7(fvec3) + 25: 19(ivec2) ConstantComposite 13 18 + 32: 19(ivec2) ConstantComposite 18 13 + 40: TypePointer StorageBuffer 8(fvec2) + 54: TypeInt 32 0 + 55: TypeVector 54(int) 3 + 56: 54(int) Constant 16 + 57: 54(int) Constant 1 + 58: 55(ivec3) ConstantComposite 56 57 57 + 4(main): 2 Function None 3 + 5: Label + 17: 14 Load 16(as) + 21: 7(fvec3) FetchMicroTriangleVertexPositionNV 17 18 18 18 20 + 23: 22(ptr) AccessChain 11 13 + Store 23 21 + 24: 14 Load 16(as) + 26: 7(fvec3) FetchMicroTriangleVertexPositionNV 24 18 18 18 25 + 27: 22(ptr) AccessChain 11 13 + 28: 7(fvec3) Load 27 + 29: 7(fvec3) FAdd 28 26 + 30: 22(ptr) AccessChain 11 13 + Store 30 29 + 31: 14 Load 16(as) + 33: 7(fvec3) FetchMicroTriangleVertexPositionNV 31 18 18 18 32 + 34: 22(ptr) AccessChain 11 13 + 35: 7(fvec3) Load 34 + 36: 7(fvec3) FAdd 35 33 + 37: 22(ptr) AccessChain 11 13 + Store 37 36 + 38: 14 Load 16(as) + 39: 8(fvec2) FetchMicroTriangleVertexBarycentricNV 38 18 18 18 20 + 41: 40(ptr) AccessChain 11 18 + Store 41 39 + 42: 14 Load 16(as) + 43: 8(fvec2) FetchMicroTriangleVertexBarycentricNV 42 18 18 18 25 + 44: 40(ptr) AccessChain 11 18 + 45: 8(fvec2) Load 44 + 46: 8(fvec2) FAdd 45 43 + 47: 40(ptr) AccessChain 11 18 + Store 47 46 + 48: 14 Load 16(as) + 49: 8(fvec2) FetchMicroTriangleVertexBarycentricNV 48 18 18 18 32 + 50: 40(ptr) AccessChain 11 18 + 51: 8(fvec2) Load 50 + 52: 8(fvec2) FAdd 51 49 + 53: 40(ptr) AccessChain 11 18 + Store 53 52 + Return + FunctionEnd diff --git a/Test/baseResults/spv.nv.dmm-allops.mesh.out b/Test/baseResults/spv.nv.dmm-allops.mesh.out new file mode 100755 index 00000000..9f626c21 --- /dev/null +++ b/Test/baseResults/spv.nv.dmm-allops.mesh.out @@ -0,0 +1,95 @@ +spv.nv.dmm-allops.mesh +// Module Version 10400 +// Generated by (magic number): 8000b +// Id's are bound by 54 + + Capability RayQueryKHR + Capability MeshShadingNV + Capability DisplacementMicromapNV + Extension "SPV_KHR_ray_query" + Extension "SPV_NV_displacement_micromap" + Extension "SPV_NV_mesh_shader" + 1: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint MeshNV 4 "main" 11 16 + ExecutionMode 4 LocalSize 1 1 1 + ExecutionMode 4 OutputVertices 8 + ExecutionMode 4 OutputPrimitivesNV 16 + ExecutionMode 4 OutputTrianglesNV + Source GLSL 460 + SourceExtension "GL_EXT_ray_query" + SourceExtension "GL_NV_displacement_micromap" + SourceExtension "GL_NV_mesh_shader" + Name 4 "main" + Name 9 "block" + MemberName 9(block) 0 "op_pos" + MemberName 9(block) 1 "op_bary" + Name 11 "" + Name 16 "as" + MemberDecorate 9(block) 0 Offset 0 + MemberDecorate 9(block) 1 Offset 16 + Decorate 9(block) Block + Decorate 11 DescriptorSet 0 + Decorate 11 Binding 0 + Decorate 16(as) DescriptorSet 0 + Decorate 16(as) Binding 1 + 2: TypeVoid + 3: TypeFunction 2 + 6: TypeFloat 32 + 7: TypeVector 6(float) 3 + 8: TypeVector 6(float) 2 + 9(block): TypeStruct 7(fvec3) 8(fvec2) + 10: TypePointer StorageBuffer 9(block) + 11: 10(ptr) Variable StorageBuffer + 12: TypeInt 32 1 + 13: 12(int) Constant 0 + 14: TypeAccelerationStructureKHR + 15: TypePointer UniformConstant 14 + 16(as): 15(ptr) Variable UniformConstant + 18: 12(int) Constant 1 + 19: TypeVector 12(int) 2 + 20: 19(ivec2) ConstantComposite 13 13 + 22: TypePointer StorageBuffer 7(fvec3) + 25: 19(ivec2) ConstantComposite 13 18 + 32: 19(ivec2) ConstantComposite 18 13 + 40: TypePointer StorageBuffer 8(fvec2) + 4(main): 2 Function None 3 + 5: Label + 17: 14 Load 16(as) + 21: 7(fvec3) FetchMicroTriangleVertexPositionNV 17 18 18 18 20 + 23: 22(ptr) AccessChain 11 13 + Store 23 21 + 24: 14 Load 16(as) + 26: 7(fvec3) FetchMicroTriangleVertexPositionNV 24 18 18 18 25 + 27: 22(ptr) AccessChain 11 13 + 28: 7(fvec3) Load 27 + 29: 7(fvec3) FAdd 28 26 + 30: 22(ptr) AccessChain 11 13 + Store 30 29 + 31: 14 Load 16(as) + 33: 7(fvec3) FetchMicroTriangleVertexPositionNV 31 18 18 18 32 + 34: 22(ptr) AccessChain 11 13 + 35: 7(fvec3) Load 34 + 36: 7(fvec3) FAdd 35 33 + 37: 22(ptr) AccessChain 11 13 + Store 37 36 + 38: 14 Load 16(as) + 39: 8(fvec2) FetchMicroTriangleVertexBarycentricNV 38 18 18 18 20 + 41: 40(ptr) AccessChain 11 18 + Store 41 39 + 42: 14 Load 16(as) + 43: 8(fvec2) FetchMicroTriangleVertexBarycentricNV 42 18 18 18 25 + 44: 40(ptr) AccessChain 11 18 + 45: 8(fvec2) Load 44 + 46: 8(fvec2) FAdd 45 43 + 47: 40(ptr) AccessChain 11 18 + Store 47 46 + 48: 14 Load 16(as) + 49: 8(fvec2) FetchMicroTriangleVertexBarycentricNV 48 18 18 18 32 + 50: 40(ptr) AccessChain 11 18 + 51: 8(fvec2) Load 50 + 52: 8(fvec2) FAdd 51 49 + 53: 40(ptr) AccessChain 11 18 + Store 53 52 + Return + FunctionEnd diff --git a/Test/baseResults/spv.nv.dmm-allops.rahit.out b/Test/baseResults/spv.nv.dmm-allops.rahit.out new file mode 100755 index 00000000..388ab04e --- /dev/null +++ b/Test/baseResults/spv.nv.dmm-allops.rahit.out @@ -0,0 +1,126 @@ +spv.nv.dmm-allops.rahit +// Module Version 10400 +// Generated by (magic number): 8000b +// Id's are bound by 77 + + Capability RayTracingKHR + Capability CapabilityRayTracingDisplacementMicromapNV + Extension "SPV_KHR_ray_tracing" + Extension "SPV_NV_displacement_micromap" + 1: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint AnyHitKHR 4 "main" 12 18 40 59 64 67 76 + Source GLSL 460 + SourceExtension "GL_EXT_ray_query" + SourceExtension "GL_EXT_ray_tracing" + SourceExtension "GL_NV_displacement_micromap" + Name 4 "main" + Name 10 "block" + MemberName 10(block) 0 "op_pos" + MemberName 10(block) 1 "op_bary" + MemberName 10(block) 2 "op_hit" + Name 12 "" + Name 18 "gl_HitMicroTriangleVertexPositionsNV" + Name 40 "gl_HitMicroTriangleVertexBarycentricsNV" + Name 59 "gl_HitKindEXT" + Name 64 "gl_HitKindFrontFacingMicroTriangleNV" + Name 67 "gl_HitKindBackFacingMicroTriangleNV" + Name 76 "as" + MemberDecorate 10(block) 0 Offset 0 + MemberDecorate 10(block) 1 Offset 16 + MemberDecorate 10(block) 2 Offset 24 + Decorate 10(block) Block + Decorate 12 DescriptorSet 0 + Decorate 12 Binding 0 + Decorate 18(gl_HitMicroTriangleVertexPositionsNV) BuiltIn HitMicroTriangleVertexPositionsNV + Decorate 40(gl_HitMicroTriangleVertexBarycentricsNV) BuiltIn HitMicroTriangleVertexBarycentricsNV + Decorate 59(gl_HitKindEXT) BuiltIn HitKindKHR + Decorate 64(gl_HitKindFrontFacingMicroTriangleNV) BuiltIn HitKindFrontFacingMicroTriangleNV + Decorate 67(gl_HitKindBackFacingMicroTriangleNV) BuiltIn HitKindBackFacingMicroTriangleNV + Decorate 76(as) DescriptorSet 0 + Decorate 76(as) Binding 1 + 2: TypeVoid + 3: TypeFunction 2 + 6: TypeFloat 32 + 7: TypeVector 6(float) 3 + 8: TypeVector 6(float) 2 + 9: TypeInt 32 0 + 10(block): TypeStruct 7(fvec3) 8(fvec2) 9(int) + 11: TypePointer StorageBuffer 10(block) + 12: 11(ptr) Variable StorageBuffer + 13: TypeInt 32 1 + 14: 13(int) Constant 0 + 15: 9(int) Constant 3 + 16: TypeArray 7(fvec3) 15 + 17: TypePointer Input 16 +18(gl_HitMicroTriangleVertexPositionsNV): 17(ptr) Variable Input + 19: TypePointer Input 7(fvec3) + 22: TypePointer StorageBuffer 7(fvec3) + 24: 13(int) Constant 1 + 31: 13(int) Constant 2 + 38: TypeArray 8(fvec2) 15 + 39: TypePointer Input 38 +40(gl_HitMicroTriangleVertexBarycentricsNV): 39(ptr) Variable Input + 41: TypePointer Input 8(fvec2) + 44: TypePointer StorageBuffer 8(fvec2) + 58: TypePointer Input 9(int) +59(gl_HitKindEXT): 58(ptr) Variable Input + 61: TypePointer StorageBuffer 9(int) + 63: 9(int) Constant 255 +64(gl_HitKindFrontFacingMicroTriangleNV): 58(ptr) Variable Input +67(gl_HitKindBackFacingMicroTriangleNV): 58(ptr) Variable Input + 74: TypeAccelerationStructureKHR + 75: TypePointer UniformConstant 74 + 76(as): 75(ptr) Variable UniformConstant + 4(main): 2 Function None 3 + 5: Label + 20: 19(ptr) AccessChain 18(gl_HitMicroTriangleVertexPositionsNV) 14 + 21: 7(fvec3) Load 20 + 23: 22(ptr) AccessChain 12 14 + Store 23 21 + 25: 19(ptr) AccessChain 18(gl_HitMicroTriangleVertexPositionsNV) 24 + 26: 7(fvec3) Load 25 + 27: 22(ptr) AccessChain 12 14 + 28: 7(fvec3) Load 27 + 29: 7(fvec3) FAdd 28 26 + 30: 22(ptr) AccessChain 12 14 + Store 30 29 + 32: 19(ptr) AccessChain 18(gl_HitMicroTriangleVertexPositionsNV) 31 + 33: 7(fvec3) Load 32 + 34: 22(ptr) AccessChain 12 14 + 35: 7(fvec3) Load 34 + 36: 7(fvec3) FAdd 35 33 + 37: 22(ptr) AccessChain 12 14 + Store 37 36 + 42: 41(ptr) AccessChain 40(gl_HitMicroTriangleVertexBarycentricsNV) 14 + 43: 8(fvec2) Load 42 + 45: 44(ptr) AccessChain 12 24 + Store 45 43 + 46: 41(ptr) AccessChain 40(gl_HitMicroTriangleVertexBarycentricsNV) 24 + 47: 8(fvec2) Load 46 + 48: 44(ptr) AccessChain 12 24 + 49: 8(fvec2) Load 48 + 50: 8(fvec2) FAdd 49 47 + 51: 44(ptr) AccessChain 12 24 + Store 51 50 + 52: 41(ptr) AccessChain 40(gl_HitMicroTriangleVertexBarycentricsNV) 31 + 53: 8(fvec2) Load 52 + 54: 44(ptr) AccessChain 12 24 + 55: 8(fvec2) Load 54 + 56: 8(fvec2) FAdd 55 53 + 57: 44(ptr) AccessChain 12 24 + Store 57 56 + 60: 9(int) Load 59(gl_HitKindEXT) + 62: 61(ptr) AccessChain 12 31 + Store 62 60 + 65: 9(int) Load 64(gl_HitKindFrontFacingMicroTriangleNV) + 66: 9(int) BitwiseOr 63 65 + 68: 9(int) Load 67(gl_HitKindBackFacingMicroTriangleNV) + 69: 9(int) BitwiseOr 66 68 + 70: 61(ptr) AccessChain 12 31 + 71: 9(int) Load 70 + 72: 9(int) BitwiseAnd 71 69 + 73: 61(ptr) AccessChain 12 31 + Store 73 72 + Return + FunctionEnd diff --git a/Test/baseResults/spv.nv.dmm-allops.rchit.out b/Test/baseResults/spv.nv.dmm-allops.rchit.out new file mode 100755 index 00000000..c53bc8c1 --- /dev/null +++ b/Test/baseResults/spv.nv.dmm-allops.rchit.out @@ -0,0 +1,126 @@ +spv.nv.dmm-allops.rchit +// Module Version 10400 +// Generated by (magic number): 8000b +// Id's are bound by 77 + + Capability RayTracingKHR + Capability CapabilityRayTracingDisplacementMicromapNV + Extension "SPV_KHR_ray_tracing" + Extension "SPV_NV_displacement_micromap" + 1: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint ClosestHitKHR 4 "main" 12 18 40 59 64 67 76 + Source GLSL 460 + SourceExtension "GL_EXT_ray_query" + SourceExtension "GL_EXT_ray_tracing" + SourceExtension "GL_NV_displacement_micromap" + Name 4 "main" + Name 10 "block" + MemberName 10(block) 0 "op_pos" + MemberName 10(block) 1 "op_bary" + MemberName 10(block) 2 "op_hit" + Name 12 "" + Name 18 "gl_HitMicroTriangleVertexPositionsNV" + Name 40 "gl_HitMicroTriangleVertexBarycentricsNV" + Name 59 "gl_HitKindEXT" + Name 64 "gl_HitKindFrontFacingMicroTriangleNV" + Name 67 "gl_HitKindBackFacingMicroTriangleNV" + Name 76 "as" + MemberDecorate 10(block) 0 Offset 0 + MemberDecorate 10(block) 1 Offset 16 + MemberDecorate 10(block) 2 Offset 24 + Decorate 10(block) Block + Decorate 12 DescriptorSet 0 + Decorate 12 Binding 0 + Decorate 18(gl_HitMicroTriangleVertexPositionsNV) BuiltIn HitMicroTriangleVertexPositionsNV + Decorate 40(gl_HitMicroTriangleVertexBarycentricsNV) BuiltIn HitMicroTriangleVertexBarycentricsNV + Decorate 59(gl_HitKindEXT) BuiltIn HitKindKHR + Decorate 64(gl_HitKindFrontFacingMicroTriangleNV) BuiltIn HitKindFrontFacingMicroTriangleNV + Decorate 67(gl_HitKindBackFacingMicroTriangleNV) BuiltIn HitKindBackFacingMicroTriangleNV + Decorate 76(as) DescriptorSet 0 + Decorate 76(as) Binding 1 + 2: TypeVoid + 3: TypeFunction 2 + 6: TypeFloat 32 + 7: TypeVector 6(float) 3 + 8: TypeVector 6(float) 2 + 9: TypeInt 32 0 + 10(block): TypeStruct 7(fvec3) 8(fvec2) 9(int) + 11: TypePointer StorageBuffer 10(block) + 12: 11(ptr) Variable StorageBuffer + 13: TypeInt 32 1 + 14: 13(int) Constant 0 + 15: 9(int) Constant 3 + 16: TypeArray 7(fvec3) 15 + 17: TypePointer Input 16 +18(gl_HitMicroTriangleVertexPositionsNV): 17(ptr) Variable Input + 19: TypePointer Input 7(fvec3) + 22: TypePointer StorageBuffer 7(fvec3) + 24: 13(int) Constant 1 + 31: 13(int) Constant 2 + 38: TypeArray 8(fvec2) 15 + 39: TypePointer Input 38 +40(gl_HitMicroTriangleVertexBarycentricsNV): 39(ptr) Variable Input + 41: TypePointer Input 8(fvec2) + 44: TypePointer StorageBuffer 8(fvec2) + 58: TypePointer Input 9(int) +59(gl_HitKindEXT): 58(ptr) Variable Input + 61: TypePointer StorageBuffer 9(int) + 63: 9(int) Constant 255 +64(gl_HitKindFrontFacingMicroTriangleNV): 58(ptr) Variable Input +67(gl_HitKindBackFacingMicroTriangleNV): 58(ptr) Variable Input + 74: TypeAccelerationStructureKHR + 75: TypePointer UniformConstant 74 + 76(as): 75(ptr) Variable UniformConstant + 4(main): 2 Function None 3 + 5: Label + 20: 19(ptr) AccessChain 18(gl_HitMicroTriangleVertexPositionsNV) 14 + 21: 7(fvec3) Load 20 + 23: 22(ptr) AccessChain 12 14 + Store 23 21 + 25: 19(ptr) AccessChain 18(gl_HitMicroTriangleVertexPositionsNV) 24 + 26: 7(fvec3) Load 25 + 27: 22(ptr) AccessChain 12 14 + 28: 7(fvec3) Load 27 + 29: 7(fvec3) FAdd 28 26 + 30: 22(ptr) AccessChain 12 14 + Store 30 29 + 32: 19(ptr) AccessChain 18(gl_HitMicroTriangleVertexPositionsNV) 31 + 33: 7(fvec3) Load 32 + 34: 22(ptr) AccessChain 12 14 + 35: 7(fvec3) Load 34 + 36: 7(fvec3) FAdd 35 33 + 37: 22(ptr) AccessChain 12 14 + Store 37 36 + 42: 41(ptr) AccessChain 40(gl_HitMicroTriangleVertexBarycentricsNV) 14 + 43: 8(fvec2) Load 42 + 45: 44(ptr) AccessChain 12 24 + Store 45 43 + 46: 41(ptr) AccessChain 40(gl_HitMicroTriangleVertexBarycentricsNV) 24 + 47: 8(fvec2) Load 46 + 48: 44(ptr) AccessChain 12 24 + 49: 8(fvec2) Load 48 + 50: 8(fvec2) FAdd 49 47 + 51: 44(ptr) AccessChain 12 24 + Store 51 50 + 52: 41(ptr) AccessChain 40(gl_HitMicroTriangleVertexBarycentricsNV) 31 + 53: 8(fvec2) Load 52 + 54: 44(ptr) AccessChain 12 24 + 55: 8(fvec2) Load 54 + 56: 8(fvec2) FAdd 55 53 + 57: 44(ptr) AccessChain 12 24 + Store 57 56 + 60: 9(int) Load 59(gl_HitKindEXT) + 62: 61(ptr) AccessChain 12 31 + Store 62 60 + 65: 9(int) Load 64(gl_HitKindFrontFacingMicroTriangleNV) + 66: 9(int) BitwiseOr 63 65 + 68: 9(int) Load 67(gl_HitKindBackFacingMicroTriangleNV) + 69: 9(int) BitwiseOr 66 68 + 70: 61(ptr) AccessChain 12 31 + 71: 9(int) Load 70 + 72: 9(int) BitwiseAnd 71 69 + 73: 61(ptr) AccessChain 12 31 + Store 73 72 + Return + FunctionEnd diff --git a/Test/baseResults/spv.nv.dmm-allops.rgen.out b/Test/baseResults/spv.nv.dmm-allops.rgen.out new file mode 100755 index 00000000..78001e1f --- /dev/null +++ b/Test/baseResults/spv.nv.dmm-allops.rgen.out @@ -0,0 +1,108 @@ +spv.nv.dmm-allops.rgen +// Module Version 10400 +// Generated by (magic number): 8000b +// Id's are bound by 66 + + Capability RayTracingKHR + Capability DisplacementMicromapNV + Capability CapabilityRayTracingDisplacementMicromapNV + Extension "SPV_KHR_ray_tracing" + Extension "SPV_NV_displacement_micromap" + 1: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint RayGenerationKHR 4 "main" 12 17 58 61 + Source GLSL 460 + SourceExtension "GL_EXT_ray_query" + SourceExtension "GL_NV_displacement_micromap" + Name 4 "main" + Name 10 "block" + MemberName 10(block) 0 "op_pos" + MemberName 10(block) 1 "op_bary" + MemberName 10(block) 2 "op_hitmask" + Name 12 "" + Name 17 "as" + Name 58 "gl_HitKindFrontFacingMicroTriangleNV" + Name 61 "gl_HitKindBackFacingMicroTriangleNV" + MemberDecorate 10(block) 0 Offset 0 + MemberDecorate 10(block) 1 Offset 16 + MemberDecorate 10(block) 2 Offset 24 + Decorate 10(block) Block + Decorate 12 DescriptorSet 0 + Decorate 12 Binding 0 + Decorate 17(as) DescriptorSet 0 + Decorate 17(as) Binding 1 + Decorate 58(gl_HitKindFrontFacingMicroTriangleNV) BuiltIn HitKindFrontFacingMicroTriangleNV + Decorate 61(gl_HitKindBackFacingMicroTriangleNV) BuiltIn HitKindBackFacingMicroTriangleNV + 2: TypeVoid + 3: TypeFunction 2 + 6: TypeFloat 32 + 7: TypeVector 6(float) 3 + 8: TypeVector 6(float) 2 + 9: TypeInt 32 0 + 10(block): TypeStruct 7(fvec3) 8(fvec2) 9(int) + 11: TypePointer StorageBuffer 10(block) + 12: 11(ptr) Variable StorageBuffer + 13: TypeInt 32 1 + 14: 13(int) Constant 0 + 15: TypeAccelerationStructureKHR + 16: TypePointer UniformConstant 15 + 17(as): 16(ptr) Variable UniformConstant + 19: 13(int) Constant 1 + 20: TypeVector 13(int) 2 + 21: 20(ivec2) ConstantComposite 14 14 + 23: TypePointer StorageBuffer 7(fvec3) + 26: 20(ivec2) ConstantComposite 14 19 + 33: 20(ivec2) ConstantComposite 19 14 + 41: TypePointer StorageBuffer 8(fvec2) + 55: 13(int) Constant 2 + 56: 9(int) Constant 255 + 57: TypePointer Input 9(int) +58(gl_HitKindFrontFacingMicroTriangleNV): 57(ptr) Variable Input +61(gl_HitKindBackFacingMicroTriangleNV): 57(ptr) Variable Input + 64: TypePointer StorageBuffer 9(int) + 4(main): 2 Function None 3 + 5: Label + 18: 15 Load 17(as) + 22: 7(fvec3) FetchMicroTriangleVertexPositionNV 18 19 19 19 21 + 24: 23(ptr) AccessChain 12 14 + Store 24 22 + 25: 15 Load 17(as) + 27: 7(fvec3) FetchMicroTriangleVertexPositionNV 25 19 19 19 26 + 28: 23(ptr) AccessChain 12 14 + 29: 7(fvec3) Load 28 + 30: 7(fvec3) FAdd 29 27 + 31: 23(ptr) AccessChain 12 14 + Store 31 30 + 32: 15 Load 17(as) + 34: 7(fvec3) FetchMicroTriangleVertexPositionNV 32 19 19 19 33 + 35: 23(ptr) AccessChain 12 14 + 36: 7(fvec3) Load 35 + 37: 7(fvec3) FAdd 36 34 + 38: 23(ptr) AccessChain 12 14 + Store 38 37 + 39: 15 Load 17(as) + 40: 8(fvec2) FetchMicroTriangleVertexBarycentricNV 39 19 19 19 21 + 42: 41(ptr) AccessChain 12 19 + Store 42 40 + 43: 15 Load 17(as) + 44: 8(fvec2) FetchMicroTriangleVertexBarycentricNV 43 19 19 19 26 + 45: 41(ptr) AccessChain 12 19 + 46: 8(fvec2) Load 45 + 47: 8(fvec2) FAdd 46 44 + 48: 41(ptr) AccessChain 12 19 + Store 48 47 + 49: 15 Load 17(as) + 50: 8(fvec2) FetchMicroTriangleVertexBarycentricNV 49 19 19 19 33 + 51: 41(ptr) AccessChain 12 19 + 52: 8(fvec2) Load 51 + 53: 8(fvec2) FAdd 52 50 + 54: 41(ptr) AccessChain 12 19 + Store 54 53 + 59: 9(int) Load 58(gl_HitKindFrontFacingMicroTriangleNV) + 60: 9(int) BitwiseOr 56 59 + 62: 9(int) Load 61(gl_HitKindBackFacingMicroTriangleNV) + 63: 9(int) BitwiseOr 60 62 + 65: 64(ptr) AccessChain 12 55 + Store 65 63 + Return + FunctionEnd diff --git a/Test/baseResults/spv.nv.hitobject-allops.rchit.out b/Test/baseResults/spv.nv.hitobject-allops.rchit.out new file mode 100755 index 00000000..15e6d416 --- /dev/null +++ b/Test/baseResults/spv.nv.hitobject-allops.rchit.out @@ -0,0 +1,215 @@ +spv.nv.hitobject-allops.rchit +// Module Version 10400 +// Generated by (magic number): 8000b +// Id's are bound by 116 + + Capability RayTracingKHR + Capability ShaderInvocationReorderNV + Extension "SPV_KHR_ray_tracing" + Extension "SPV_NV_shader_invocation_reorder" + 1: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint ClosestHitKHR 4 "main" 9 14 22 25 36 42 48 52 53 64 + Source GLSL 460 + SourceExtension "GL_EXT_ray_tracing" + SourceExtension "GL_NV_ray_tracing_motion_blur" + SourceExtension "GL_NV_shader_invocation_reorder" + Name 4 "main" + Name 9 "attr" + Name 12 "hBlock" + MemberName 12(hBlock) 0 "attrval" + Name 14 "" + Name 22 "hObj" + Name 25 "as" + Name 36 "payload" + Name 40 "pBlock" + MemberName 40(pBlock) 0 "val1" + MemberName 40(pBlock) 1 "val2" + Name 42 "" + Name 48 "hObjHit" + Name 52 "hObjNop" + Name 53 "hObjMiss" + Name 62 "block" + MemberName 62(block) 0 "op" + Name 64 "" + Name 79 "tmin" + Name 81 "tmax" + Name 84 "orig" + Name 86 "dir" + Name 88 "oorig" + Name 90 "odir" + Name 94 "otw" + Name 96 "wto" + Name 99 "cid" + Name 101 "iid" + Name 103 "pid" + Name 105 "gid" + Name 108 "hkind" + Name 112 "handle" + Name 114 "rid" + Decorate 12(hBlock) Block + Decorate 25(as) DescriptorSet 0 + Decorate 25(as) Binding 0 + Decorate 40(pBlock) Block + MemberDecorate 62(block) 0 Offset 0 + Decorate 62(block) Block + Decorate 64 DescriptorSet 0 + Decorate 64 Binding 1 + 2: TypeVoid + 3: TypeFunction 2 + 6: TypeFloat 32 + 7: TypeVector 6(float) 2 + 8: TypePointer HitObjectAttributeNV 7(fvec2) + 9(attr): 8(ptr) Variable HitObjectAttributeNV + 10: 6(float) Constant 1065353216 + 11: 7(fvec2) ConstantComposite 10 10 + 12(hBlock): TypeStruct 6(float) + 13: TypePointer HitObjectAttributeNV 12(hBlock) + 14: 13(ptr) Variable HitObjectAttributeNV + 15: TypeInt 32 1 + 16: 15(int) Constant 0 + 17: 6(float) Constant 1073741824 + 18: TypePointer HitObjectAttributeNV 6(float) + 20: TypeHitObjectNV + 21: TypePointer Private 20 + 22(hObj): 21(ptr) Variable Private + 23: TypeAccelerationStructureKHR + 24: TypePointer UniformConstant 23 + 25(as): 24(ptr) Variable UniformConstant + 27: TypeInt 32 0 + 28: 27(int) Constant 1 + 29: TypeVector 6(float) 3 + 30: 6(float) Constant 1056964608 + 31: 29(fvec3) ConstantComposite 30 30 30 + 32: 29(fvec3) ConstantComposite 10 10 10 + 33: 15(int) Constant 1 + 34: TypeVector 6(float) 4 + 35: TypePointer RayPayloadKHR 34(fvec4) + 36(payload): 35(ptr) Variable RayPayloadKHR + 38: 6(float) Constant 1092616192 + 39: 15(int) Constant 2 + 40(pBlock): TypeStruct 7(fvec2) 7(fvec2) + 41: TypePointer RayPayloadKHR 40(pBlock) + 42: 41(ptr) Variable RayPayloadKHR + 44: 27(int) Constant 2 + 45: 29(fvec3) ConstantComposite 17 17 17 + 47: 6(float) Constant 1082130432 + 48(hObjHit): 21(ptr) Variable Private + 50: 15(int) Constant 3 + 52(hObjNop): 21(ptr) Variable Private + 53(hObjMiss): 21(ptr) Variable Private + 54: 6(float) Constant 1069547520 + 55: 29(fvec3) ConstantComposite 54 54 54 + 56: 6(float) Constant 1084227584 + 57: 6(float) Constant 1090519040 + 58: TypeBool + 62(block): TypeStruct 6(float) + 63: TypePointer StorageBuffer 62(block) + 64: 63(ptr) Variable StorageBuffer + 65: TypePointer StorageBuffer 6(float) + 76: 6(float) Constant 1077936128 + 78: TypePointer Function 6(float) + 83: TypePointer Function 29(fvec3) + 92: TypeMatrix 29(fvec3) 4 + 93: TypePointer Function 92 + 98: TypePointer Function 15(int) + 107: TypePointer Function 27(int) + 110: TypeVector 27(int) 2 + 111: TypePointer Function 110(ivec2) + 4(main): 2 Function None 3 + 5: Label + 79(tmin): 78(ptr) Variable Function + 81(tmax): 78(ptr) Variable Function + 84(orig): 83(ptr) Variable Function + 86(dir): 83(ptr) Variable Function + 88(oorig): 83(ptr) Variable Function + 90(odir): 83(ptr) Variable Function + 94(otw): 93(ptr) Variable Function + 96(wto): 93(ptr) Variable Function + 99(cid): 98(ptr) Variable Function + 101(iid): 98(ptr) Variable Function + 103(pid): 98(ptr) Variable Function + 105(gid): 98(ptr) Variable Function + 108(hkind): 107(ptr) Variable Function + 112(handle): 111(ptr) Variable Function + 114(rid): 107(ptr) Variable Function + Store 9(attr) 11 + 19: 18(ptr) AccessChain 14 16 + Store 19 17 + 26: 23 Load 25(as) + HitObjectTraceRayNV 22(hObj) 26 28 28 28 28 28 31 30 32 10 36(payload) + 37: 23 Load 25(as) + HitObjectTraceRayMotionNV 22(hObj) 37 28 28 28 28 28 31 30 32 10 38 42 + 43: 23 Load 25(as) + HitObjectRecordHitNV 22(hObj) 43 33 33 33 44 44 44 32 10 45 17 9(attr) + 46: 23 Load 25(as) + HitObjectRecordHitMotionNV 22(hObj) 46 33 33 33 44 44 44 32 10 45 17 47 9(attr) + 49: 23 Load 25(as) + HitObjectRecordHitWithIndexNV 48(hObjHit) 49 33 33 33 44 44 32 10 45 17 14 + 51: 23 Load 25(as) + HitObjectRecordHitWithIndexMotionNV 48(hObjHit) 51 33 33 33 44 44 32 10 45 17 47 14 + HitObjectRecordEmptyNV 52(hObjNop) + HitObjectRecordMissNV 53(hObjMiss) 28 31 17 55 56 + HitObjectRecordMissMotionNV 53(hObjMiss) 28 31 17 55 56 57 + HitObjectExecuteShaderNV 48(hObjHit) 42 + 59: 58(bool) HitObjectIsHitNV 22(hObj) + SelectionMerge 61 None + BranchConditional 59 60 67 + 60: Label + 66: 65(ptr) AccessChain 64 16 + Store 66 10 + Branch 61 + 67: Label + 68: 58(bool) HitObjectIsMissNV 22(hObj) + SelectionMerge 70 None + BranchConditional 68 69 72 + 69: Label + 71: 65(ptr) AccessChain 64 16 + Store 71 17 + Branch 70 + 72: Label + 73: 58(bool) HitObjectIsEmptyNV 22(hObj) + SelectionMerge 75 None + BranchConditional 73 74 75 + 74: Label + 77: 65(ptr) AccessChain 64 16 + Store 77 76 + Branch 75 + 75: Label + Branch 70 + 70: Label + Branch 61 + 61: Label + 80: 6(float) HitObjectGetRayTMinNV 48(hObjHit) + Store 79(tmin) 80 + 82: 6(float) HitObjectGetRayTMaxNV 48(hObjHit) + Store 81(tmax) 82 + 85: 29(fvec3) HitObjectGetWorldRayOriginNV 48(hObjHit) + Store 84(orig) 85 + 87: 29(fvec3) HitObjectGetWorldRayDirectionNV 48(hObjHit) + Store 86(dir) 87 + 89: 29(fvec3) HitObjectGetObjectRayOriginNV 48(hObjHit) + Store 88(oorig) 89 + 91: 29(fvec3) HitObjectGetObjectRayDirectionNV 48(hObjHit) + Store 90(odir) 91 + 95: 92 HitObjectGetObjectToWorldNV 48(hObjHit) + Store 94(otw) 95 + 97: 92 HitObjectGetWorldToObjectNV 48(hObjHit) + Store 96(wto) 97 + 100: 15(int) HitObjectGetInstanceCustomIndexNV 53(hObjMiss) + Store 99(cid) 100 + 102: 15(int) HitObjectGetInstanceIdNV 52(hObjNop) + Store 101(iid) 102 + 104: 15(int) HitObjectGetPrimitiveIndexNV 22(hObj) + Store 103(pid) 104 + 106: 15(int) HitObjectGetGeometryIndexNV 22(hObj) + Store 105(gid) 106 + 109: 27(int) HitObjectGetFrontFaceNV 22(hObj) + Store 108(hkind) 109 + HitObjectGetAttributesNV 22(hObj) 9(attr) + 113: 110(ivec2) HitObjectGetShaderRecordBufferHandleNV 22(hObj) + Store 112(handle) 113 + 115: 27(int) HitObjectGetShaderBindingTableRecordIndexNV 22(hObj) + Store 114(rid) 115 + Return + FunctionEnd diff --git a/Test/baseResults/spv.nv.hitobject-allops.rgen.out b/Test/baseResults/spv.nv.hitobject-allops.rgen.out new file mode 100755 index 00000000..d395500a --- /dev/null +++ b/Test/baseResults/spv.nv.hitobject-allops.rgen.out @@ -0,0 +1,219 @@ +spv.nv.hitobject-allops.rgen +// Module Version 10400 +// Generated by (magic number): 8000b +// Id's are bound by 117 + + Capability RayTracingKHR + Capability ShaderInvocationReorderNV + Extension "SPV_KHR_ray_tracing" + Extension "SPV_NV_shader_invocation_reorder" + 1: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint RayGenerationKHR 4 "main" 9 14 22 25 36 42 48 52 53 64 + Source GLSL 460 + SourceExtension "GL_EXT_ray_tracing" + SourceExtension "GL_NV_ray_tracing_motion_blur" + SourceExtension "GL_NV_shader_invocation_reorder" + Name 4 "main" + Name 9 "attr" + Name 12 "hBlock" + MemberName 12(hBlock) 0 "attrval" + Name 14 "" + Name 22 "hObj" + Name 25 "as" + Name 36 "payload" + Name 40 "pBlock" + MemberName 40(pBlock) 0 "val1" + MemberName 40(pBlock) 1 "val2" + Name 42 "" + Name 48 "hObjHit" + Name 52 "hObjNop" + Name 53 "hObjMiss" + Name 62 "block" + MemberName 62(block) 0 "op" + Name 64 "" + Name 79 "tmin" + Name 81 "tmax" + Name 84 "orig" + Name 86 "dir" + Name 88 "oorig" + Name 90 "odir" + Name 94 "otw" + Name 96 "wto" + Name 99 "cid" + Name 101 "iid" + Name 103 "pid" + Name 105 "gid" + Name 108 "hkind" + Name 112 "handle" + Name 114 "rid" + Decorate 12(hBlock) Block + Decorate 25(as) DescriptorSet 0 + Decorate 25(as) Binding 0 + Decorate 40(pBlock) Block + MemberDecorate 62(block) 0 Offset 0 + Decorate 62(block) Block + Decorate 64 DescriptorSet 0 + Decorate 64 Binding 1 + 2: TypeVoid + 3: TypeFunction 2 + 6: TypeFloat 32 + 7: TypeVector 6(float) 2 + 8: TypePointer HitObjectAttributeNV 7(fvec2) + 9(attr): 8(ptr) Variable HitObjectAttributeNV + 10: 6(float) Constant 1065353216 + 11: 7(fvec2) ConstantComposite 10 10 + 12(hBlock): TypeStruct 6(float) + 13: TypePointer HitObjectAttributeNV 12(hBlock) + 14: 13(ptr) Variable HitObjectAttributeNV + 15: TypeInt 32 1 + 16: 15(int) Constant 0 + 17: 6(float) Constant 1073741824 + 18: TypePointer HitObjectAttributeNV 6(float) + 20: TypeHitObjectNV + 21: TypePointer Private 20 + 22(hObj): 21(ptr) Variable Private + 23: TypeAccelerationStructureKHR + 24: TypePointer UniformConstant 23 + 25(as): 24(ptr) Variable UniformConstant + 27: TypeInt 32 0 + 28: 27(int) Constant 1 + 29: TypeVector 6(float) 3 + 30: 6(float) Constant 1056964608 + 31: 29(fvec3) ConstantComposite 30 30 30 + 32: 29(fvec3) ConstantComposite 10 10 10 + 33: 15(int) Constant 1 + 34: TypeVector 6(float) 4 + 35: TypePointer RayPayloadKHR 34(fvec4) + 36(payload): 35(ptr) Variable RayPayloadKHR + 38: 6(float) Constant 1092616192 + 39: 15(int) Constant 2 + 40(pBlock): TypeStruct 7(fvec2) 7(fvec2) + 41: TypePointer RayPayloadKHR 40(pBlock) + 42: 41(ptr) Variable RayPayloadKHR + 44: 27(int) Constant 2 + 45: 29(fvec3) ConstantComposite 17 17 17 + 47: 6(float) Constant 1082130432 + 48(hObjHit): 21(ptr) Variable Private + 50: 15(int) Constant 3 + 52(hObjNop): 21(ptr) Variable Private + 53(hObjMiss): 21(ptr) Variable Private + 54: 6(float) Constant 1069547520 + 55: 29(fvec3) ConstantComposite 54 54 54 + 56: 6(float) Constant 1084227584 + 57: 6(float) Constant 1090519040 + 58: TypeBool + 62(block): TypeStruct 6(float) + 63: TypePointer StorageBuffer 62(block) + 64: 63(ptr) Variable StorageBuffer + 65: TypePointer StorageBuffer 6(float) + 76: 6(float) Constant 1077936128 + 78: TypePointer Function 6(float) + 83: TypePointer Function 29(fvec3) + 92: TypeMatrix 29(fvec3) 4 + 93: TypePointer Function 92 + 98: TypePointer Function 15(int) + 107: TypePointer Function 27(int) + 110: TypeVector 27(int) 2 + 111: TypePointer Function 110(ivec2) + 116: 27(int) Constant 4 + 4(main): 2 Function None 3 + 5: Label + 79(tmin): 78(ptr) Variable Function + 81(tmax): 78(ptr) Variable Function + 84(orig): 83(ptr) Variable Function + 86(dir): 83(ptr) Variable Function + 88(oorig): 83(ptr) Variable Function + 90(odir): 83(ptr) Variable Function + 94(otw): 93(ptr) Variable Function + 96(wto): 93(ptr) Variable Function + 99(cid): 98(ptr) Variable Function + 101(iid): 98(ptr) Variable Function + 103(pid): 98(ptr) Variable Function + 105(gid): 98(ptr) Variable Function + 108(hkind): 107(ptr) Variable Function + 112(handle): 111(ptr) Variable Function + 114(rid): 107(ptr) Variable Function + Store 9(attr) 11 + 19: 18(ptr) AccessChain 14 16 + Store 19 17 + 26: 23 Load 25(as) + HitObjectTraceRayNV 22(hObj) 26 28 28 28 28 28 31 30 32 10 36(payload) + 37: 23 Load 25(as) + HitObjectTraceRayMotionNV 22(hObj) 37 28 28 28 28 28 31 30 32 10 38 42 + 43: 23 Load 25(as) + HitObjectRecordHitNV 22(hObj) 43 33 33 33 44 44 44 32 10 45 17 9(attr) + 46: 23 Load 25(as) + HitObjectRecordHitMotionNV 22(hObj) 46 33 33 33 44 44 44 32 10 45 17 47 9(attr) + 49: 23 Load 25(as) + HitObjectRecordHitWithIndexNV 48(hObjHit) 49 33 33 33 44 44 32 10 45 17 14 + 51: 23 Load 25(as) + HitObjectRecordHitWithIndexMotionNV 48(hObjHit) 51 33 33 33 44 44 32 10 45 17 47 14 + HitObjectRecordEmptyNV 52(hObjNop) + HitObjectRecordMissNV 53(hObjMiss) 28 31 17 55 56 + HitObjectRecordMissMotionNV 53(hObjMiss) 28 31 17 55 56 57 + HitObjectExecuteShaderNV 48(hObjHit) 36(payload) + 59: 58(bool) HitObjectIsHitNV 22(hObj) + SelectionMerge 61 None + BranchConditional 59 60 67 + 60: Label + 66: 65(ptr) AccessChain 64 16 + Store 66 10 + Branch 61 + 67: Label + 68: 58(bool) HitObjectIsMissNV 22(hObj) + SelectionMerge 70 None + BranchConditional 68 69 72 + 69: Label + 71: 65(ptr) AccessChain 64 16 + Store 71 17 + Branch 70 + 72: Label + 73: 58(bool) HitObjectIsEmptyNV 22(hObj) + SelectionMerge 75 None + BranchConditional 73 74 75 + 74: Label + 77: 65(ptr) AccessChain 64 16 + Store 77 76 + Branch 75 + 75: Label + Branch 70 + 70: Label + Branch 61 + 61: Label + 80: 6(float) HitObjectGetRayTMinNV 48(hObjHit) + Store 79(tmin) 80 + 82: 6(float) HitObjectGetRayTMaxNV 48(hObjHit) + Store 81(tmax) 82 + 85: 29(fvec3) HitObjectGetWorldRayOriginNV 48(hObjHit) + Store 84(orig) 85 + 87: 29(fvec3) HitObjectGetWorldRayDirectionNV 48(hObjHit) + Store 86(dir) 87 + 89: 29(fvec3) HitObjectGetObjectRayOriginNV 48(hObjHit) + Store 88(oorig) 89 + 91: 29(fvec3) HitObjectGetObjectRayDirectionNV 48(hObjHit) + Store 90(odir) 91 + 95: 92 HitObjectGetObjectToWorldNV 48(hObjHit) + Store 94(otw) 95 + 97: 92 HitObjectGetWorldToObjectNV 48(hObjHit) + Store 96(wto) 97 + 100: 15(int) HitObjectGetInstanceCustomIndexNV 53(hObjMiss) + Store 99(cid) 100 + 102: 15(int) HitObjectGetInstanceIdNV 52(hObjNop) + Store 101(iid) 102 + 104: 15(int) HitObjectGetPrimitiveIndexNV 22(hObj) + Store 103(pid) 104 + 106: 15(int) HitObjectGetGeometryIndexNV 22(hObj) + Store 105(gid) 106 + 109: 27(int) HitObjectGetFrontFaceNV 22(hObj) + Store 108(hkind) 109 + HitObjectGetAttributesNV 22(hObj) 9(attr) + 113: 110(ivec2) HitObjectGetShaderRecordBufferHandleNV 22(hObj) + Store 112(handle) 113 + 115: 27(int) HitObjectGetShaderBindingTableRecordIndexNV 22(hObj) + Store 114(rid) 115 + ReorderThreadWithHintNV 116 116 + ReorderThreadWithHitObjectNV 48(hObjHit) + ReorderThreadWithHitObjectNV 48(hObjHit) 116 44 + Return + FunctionEnd diff --git a/Test/baseResults/spv.nv.hitobject-allops.rmiss.out b/Test/baseResults/spv.nv.hitobject-allops.rmiss.out new file mode 100755 index 00000000..970d08a1 --- /dev/null +++ b/Test/baseResults/spv.nv.hitobject-allops.rmiss.out @@ -0,0 +1,215 @@ +spv.nv.hitobject-allops.rmiss +// Module Version 10400 +// Generated by (magic number): 8000b +// Id's are bound by 116 + + Capability RayTracingKHR + Capability ShaderInvocationReorderNV + Extension "SPV_KHR_ray_tracing" + Extension "SPV_NV_shader_invocation_reorder" + 1: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint MissKHR 4 "main" 9 14 22 25 36 42 48 52 53 64 + Source GLSL 460 + SourceExtension "GL_EXT_ray_tracing" + SourceExtension "GL_NV_ray_tracing_motion_blur" + SourceExtension "GL_NV_shader_invocation_reorder" + Name 4 "main" + Name 9 "attr" + Name 12 "hBlock" + MemberName 12(hBlock) 0 "attrval" + Name 14 "" + Name 22 "hObj" + Name 25 "as" + Name 36 "payload" + Name 40 "pBlock" + MemberName 40(pBlock) 0 "val1" + MemberName 40(pBlock) 1 "val2" + Name 42 "" + Name 48 "hObjHit" + Name 52 "hObjNop" + Name 53 "hObjMiss" + Name 62 "block" + MemberName 62(block) 0 "op" + Name 64 "" + Name 79 "tmin" + Name 81 "tmax" + Name 84 "orig" + Name 86 "dir" + Name 88 "oorig" + Name 90 "odir" + Name 94 "otw" + Name 96 "wto" + Name 99 "cid" + Name 101 "iid" + Name 103 "pid" + Name 105 "gid" + Name 108 "hkind" + Name 112 "handle" + Name 114 "rid" + Decorate 12(hBlock) Block + Decorate 25(as) DescriptorSet 0 + Decorate 25(as) Binding 0 + Decorate 40(pBlock) Block + MemberDecorate 62(block) 0 Offset 0 + Decorate 62(block) Block + Decorate 64 DescriptorSet 0 + Decorate 64 Binding 1 + 2: TypeVoid + 3: TypeFunction 2 + 6: TypeFloat 32 + 7: TypeVector 6(float) 2 + 8: TypePointer HitObjectAttributeNV 7(fvec2) + 9(attr): 8(ptr) Variable HitObjectAttributeNV + 10: 6(float) Constant 1065353216 + 11: 7(fvec2) ConstantComposite 10 10 + 12(hBlock): TypeStruct 6(float) + 13: TypePointer HitObjectAttributeNV 12(hBlock) + 14: 13(ptr) Variable HitObjectAttributeNV + 15: TypeInt 32 1 + 16: 15(int) Constant 0 + 17: 6(float) Constant 1073741824 + 18: TypePointer HitObjectAttributeNV 6(float) + 20: TypeHitObjectNV + 21: TypePointer Private 20 + 22(hObj): 21(ptr) Variable Private + 23: TypeAccelerationStructureKHR + 24: TypePointer UniformConstant 23 + 25(as): 24(ptr) Variable UniformConstant + 27: TypeInt 32 0 + 28: 27(int) Constant 1 + 29: TypeVector 6(float) 3 + 30: 6(float) Constant 1056964608 + 31: 29(fvec3) ConstantComposite 30 30 30 + 32: 29(fvec3) ConstantComposite 10 10 10 + 33: 15(int) Constant 1 + 34: TypeVector 6(float) 4 + 35: TypePointer RayPayloadKHR 34(fvec4) + 36(payload): 35(ptr) Variable RayPayloadKHR + 38: 6(float) Constant 1092616192 + 39: 15(int) Constant 2 + 40(pBlock): TypeStruct 7(fvec2) 7(fvec2) + 41: TypePointer RayPayloadKHR 40(pBlock) + 42: 41(ptr) Variable RayPayloadKHR + 44: 27(int) Constant 2 + 45: 29(fvec3) ConstantComposite 17 17 17 + 47: 6(float) Constant 1082130432 + 48(hObjHit): 21(ptr) Variable Private + 50: 15(int) Constant 3 + 52(hObjNop): 21(ptr) Variable Private + 53(hObjMiss): 21(ptr) Variable Private + 54: 6(float) Constant 1069547520 + 55: 29(fvec3) ConstantComposite 54 54 54 + 56: 6(float) Constant 1084227584 + 57: 6(float) Constant 1090519040 + 58: TypeBool + 62(block): TypeStruct 6(float) + 63: TypePointer StorageBuffer 62(block) + 64: 63(ptr) Variable StorageBuffer + 65: TypePointer StorageBuffer 6(float) + 76: 6(float) Constant 1077936128 + 78: TypePointer Function 6(float) + 83: TypePointer Function 29(fvec3) + 92: TypeMatrix 29(fvec3) 4 + 93: TypePointer Function 92 + 98: TypePointer Function 15(int) + 107: TypePointer Function 27(int) + 110: TypeVector 27(int) 2 + 111: TypePointer Function 110(ivec2) + 4(main): 2 Function None 3 + 5: Label + 79(tmin): 78(ptr) Variable Function + 81(tmax): 78(ptr) Variable Function + 84(orig): 83(ptr) Variable Function + 86(dir): 83(ptr) Variable Function + 88(oorig): 83(ptr) Variable Function + 90(odir): 83(ptr) Variable Function + 94(otw): 93(ptr) Variable Function + 96(wto): 93(ptr) Variable Function + 99(cid): 98(ptr) Variable Function + 101(iid): 98(ptr) Variable Function + 103(pid): 98(ptr) Variable Function + 105(gid): 98(ptr) Variable Function + 108(hkind): 107(ptr) Variable Function + 112(handle): 111(ptr) Variable Function + 114(rid): 107(ptr) Variable Function + Store 9(attr) 11 + 19: 18(ptr) AccessChain 14 16 + Store 19 17 + 26: 23 Load 25(as) + HitObjectTraceRayNV 22(hObj) 26 28 28 28 28 28 31 30 32 10 36(payload) + 37: 23 Load 25(as) + HitObjectTraceRayMotionNV 22(hObj) 37 28 28 28 28 28 31 30 32 10 38 42 + 43: 23 Load 25(as) + HitObjectRecordHitNV 22(hObj) 43 33 33 33 44 44 44 32 10 45 17 9(attr) + 46: 23 Load 25(as) + HitObjectRecordHitMotionNV 22(hObj) 46 33 33 33 44 44 44 32 10 45 17 47 9(attr) + 49: 23 Load 25(as) + HitObjectRecordHitWithIndexNV 48(hObjHit) 49 33 33 33 44 44 32 10 45 17 14 + 51: 23 Load 25(as) + HitObjectRecordHitWithIndexMotionNV 48(hObjHit) 51 33 33 33 44 44 32 10 45 17 47 14 + HitObjectRecordEmptyNV 52(hObjNop) + HitObjectRecordMissNV 53(hObjMiss) 28 31 17 55 56 + HitObjectRecordMissMotionNV 53(hObjMiss) 28 31 17 55 56 57 + HitObjectExecuteShaderNV 48(hObjHit) 42 + 59: 58(bool) HitObjectIsHitNV 22(hObj) + SelectionMerge 61 None + BranchConditional 59 60 67 + 60: Label + 66: 65(ptr) AccessChain 64 16 + Store 66 10 + Branch 61 + 67: Label + 68: 58(bool) HitObjectIsMissNV 22(hObj) + SelectionMerge 70 None + BranchConditional 68 69 72 + 69: Label + 71: 65(ptr) AccessChain 64 16 + Store 71 17 + Branch 70 + 72: Label + 73: 58(bool) HitObjectIsEmptyNV 22(hObj) + SelectionMerge 75 None + BranchConditional 73 74 75 + 74: Label + 77: 65(ptr) AccessChain 64 16 + Store 77 76 + Branch 75 + 75: Label + Branch 70 + 70: Label + Branch 61 + 61: Label + 80: 6(float) HitObjectGetRayTMinNV 48(hObjHit) + Store 79(tmin) 80 + 82: 6(float) HitObjectGetRayTMaxNV 48(hObjHit) + Store 81(tmax) 82 + 85: 29(fvec3) HitObjectGetWorldRayOriginNV 48(hObjHit) + Store 84(orig) 85 + 87: 29(fvec3) HitObjectGetWorldRayDirectionNV 48(hObjHit) + Store 86(dir) 87 + 89: 29(fvec3) HitObjectGetObjectRayOriginNV 48(hObjHit) + Store 88(oorig) 89 + 91: 29(fvec3) HitObjectGetObjectRayDirectionNV 48(hObjHit) + Store 90(odir) 91 + 95: 92 HitObjectGetObjectToWorldNV 48(hObjHit) + Store 94(otw) 95 + 97: 92 HitObjectGetWorldToObjectNV 48(hObjHit) + Store 96(wto) 97 + 100: 15(int) HitObjectGetInstanceCustomIndexNV 53(hObjMiss) + Store 99(cid) 100 + 102: 15(int) HitObjectGetInstanceIdNV 52(hObjNop) + Store 101(iid) 102 + 104: 15(int) HitObjectGetPrimitiveIndexNV 22(hObj) + Store 103(pid) 104 + 106: 15(int) HitObjectGetGeometryIndexNV 22(hObj) + Store 105(gid) 106 + 109: 27(int) HitObjectGetFrontFaceNV 22(hObj) + Store 108(hkind) 109 + HitObjectGetAttributesNV 22(hObj) 9(attr) + 113: 110(ivec2) HitObjectGetShaderRecordBufferHandleNV 22(hObj) + Store 112(handle) 113 + 115: 27(int) HitObjectGetShaderBindingTableRecordIndexNV 22(hObj) + Store 114(rid) 115 + Return + FunctionEnd diff --git a/Test/baseResults/spv.specConstantOp.float16.comp.out b/Test/baseResults/spv.specConstantOp.float16.comp.out new file mode 100755 index 00000000..97631f14 --- /dev/null +++ b/Test/baseResults/spv.specConstantOp.float16.comp.out @@ -0,0 +1,47 @@ +spv.specConstantOp.float16.comp +// Module Version 10000 +// Generated by (magic number): 8000b +// Id's are bound by 18 + + Capability Shader + Capability Float16 + Capability StorageUniformBufferBlock16 + Extension "SPV_KHR_16bit_storage" + 1: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint GLCompute 4 "main" + ExecutionMode 4 LocalSize 1 1 1 + Source GLSL 450 + SourceExtension "GL_EXT_shader_explicit_arithmetic_types_float16" + Name 4 "main" + Name 8 "S" + MemberName 8(S) 0 "p_out" + Name 10 "" + Name 14 "c" + Decorate 7 ArrayStride 2 + MemberDecorate 8(S) 0 Restrict + MemberDecorate 8(S) 0 NonReadable + MemberDecorate 8(S) 0 Offset 0 + Decorate 8(S) BufferBlock + Decorate 10 DescriptorSet 0 + Decorate 10 Binding 0 + Decorate 14(c) SpecId 0 + 2: TypeVoid + 3: TypeFunction 2 + 6: TypeFloat 16 + 7: TypeRuntimeArray 6(float16_t) + 8(S): TypeStruct 7 + 9: TypePointer Uniform 8(S) + 10: 9(ptr) Variable Uniform + 11: TypeInt 32 1 + 12: 11(int) Constant 0 + 13: TypeFloat 32 + 14(c): 13(float) SpecConstant 1090519040 + 15:6(float16_t) SpecConstantOp 115 14(c) + 16: TypePointer Uniform 6(float16_t) + 4(main): 2 Function None 3 + 5: Label + 17: 16(ptr) AccessChain 10 12 12 + Store 17 15 + Return + FunctionEnd diff --git a/Test/baseResults/spv.specConstantOp.int16.comp.out b/Test/baseResults/spv.specConstantOp.int16.comp.out new file mode 100755 index 00000000..13049bed --- /dev/null +++ b/Test/baseResults/spv.specConstantOp.int16.comp.out @@ -0,0 +1,49 @@ +spv.specConstantOp.int16.comp +// Module Version 10000 +// Generated by (magic number): 8000b +// Id's are bound by 20 + + Capability Shader + Capability Int16 + Capability StorageUniformBufferBlock16 + Extension "SPV_KHR_16bit_storage" + 1: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint GLCompute 4 "main" + ExecutionMode 4 LocalSize 1 1 1 + Source GLSL 450 + SourceExtension "GL_EXT_shader_explicit_arithmetic_types_int16" + Name 4 "main" + Name 8 "S" + MemberName 8(S) 0 "p_out" + Name 10 "" + Name 13 "c" + Decorate 7 ArrayStride 2 + MemberDecorate 8(S) 0 Restrict + MemberDecorate 8(S) 0 NonReadable + MemberDecorate 8(S) 0 Offset 0 + Decorate 8(S) BufferBlock + Decorate 10 DescriptorSet 0 + Decorate 10 Binding 0 + Decorate 13(c) SpecId 0 + 2: TypeVoid + 3: TypeFunction 2 + 6: TypeInt 16 0 + 7: TypeRuntimeArray 6(int16_t) + 8(S): TypeStruct 7 + 9: TypePointer Uniform 8(S) + 10: 9(ptr) Variable Uniform + 11: TypeInt 32 1 + 12: 11(int) Constant 0 + 13(c): 11(int) SpecConstant 8 + 14: TypeInt 16 1 + 15: 14(int16_t) SpecConstantOp 114 13(c) + 16: 6(int16_t) Constant 0 + 17: 6(int16_t) SpecConstantOp 128 15 16 + 18: TypePointer Uniform 6(int16_t) + 4(main): 2 Function None 3 + 5: Label + 19: 18(ptr) AccessChain 10 12 12 + Store 19 17 + Return + FunctionEnd diff --git a/Test/baseResults/spv.specConstantOp.int8.comp.out b/Test/baseResults/spv.specConstantOp.int8.comp.out new file mode 100755 index 00000000..1cf53014 --- /dev/null +++ b/Test/baseResults/spv.specConstantOp.int8.comp.out @@ -0,0 +1,49 @@ +spv.specConstantOp.int8.comp +// Module Version 10000 +// Generated by (magic number): 8000b +// Id's are bound by 20 + + Capability Shader + Capability Int8 + Capability UniformAndStorageBuffer8BitAccess + Extension "SPV_KHR_8bit_storage" + 1: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint GLCompute 4 "main" + ExecutionMode 4 LocalSize 1 1 1 + Source GLSL 450 + SourceExtension "GL_EXT_shader_explicit_arithmetic_types_int8" + Name 4 "main" + Name 8 "S" + MemberName 8(S) 0 "p_out" + Name 10 "" + Name 13 "c" + Decorate 7 ArrayStride 1 + MemberDecorate 8(S) 0 Restrict + MemberDecorate 8(S) 0 NonReadable + MemberDecorate 8(S) 0 Offset 0 + Decorate 8(S) BufferBlock + Decorate 10 DescriptorSet 0 + Decorate 10 Binding 0 + Decorate 13(c) SpecId 0 + 2: TypeVoid + 3: TypeFunction 2 + 6: TypeInt 8 0 + 7: TypeRuntimeArray 6(int8_t) + 8(S): TypeStruct 7 + 9: TypePointer Uniform 8(S) + 10: 9(ptr) Variable Uniform + 11: TypeInt 32 1 + 12: 11(int) Constant 0 + 13(c): 11(int) SpecConstant 8 + 14: TypeInt 8 1 + 15: 14(int8_t) SpecConstantOp 114 13(c) + 16: 6(int8_t) Constant 0 + 17: 6(int8_t) SpecConstantOp 128 15 16 + 18: TypePointer Uniform 6(int8_t) + 4(main): 2 Function None 3 + 5: Label + 19: 18(ptr) AccessChain 10 12 12 + Store 19 17 + Return + FunctionEnd diff --git a/Test/baseResults/spv.structCopy.comp.out b/Test/baseResults/spv.structCopy.comp.out new file mode 100755 index 00000000..38c7c092 --- /dev/null +++ b/Test/baseResults/spv.structCopy.comp.out @@ -0,0 +1,142 @@ +spv.structCopy.comp +// Module Version 10000 +// Generated by (magic number): 8000b +// Id's are bound by 81 + + Capability Shader + 1: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint GLCompute 4 "main" 24 + ExecutionMode 4 LocalSize 512 1 1 + Source GLSL 460 + Name 4 "main" + Name 7 "MyStruct" + MemberName 7(MyStruct) 0 "a" + MemberName 7(MyStruct) 1 "b" + MemberName 7(MyStruct) 2 "c" + Name 11 "s" + Name 21 "id" + Name 24 "gl_GlobalInvocationID" + Name 30 "ms" + Name 32 "MyStruct" + MemberName 32(MyStruct) 0 "a" + MemberName 32(MyStruct) 1 "b" + MemberName 32(MyStruct) 2 "c" + Name 34 "MyStructs" + MemberName 34(MyStructs) 0 "count" + MemberName 34(MyStructs) 1 "data" + Name 36 "my_structs" + Name 65 "Output" + MemberName 65(Output) 0 "a" + MemberName 65(Output) 1 "b" + MemberName 65(Output) 2 "c" + Name 67 "o" + Decorate 24(gl_GlobalInvocationID) BuiltIn GlobalInvocationId + MemberDecorate 32(MyStruct) 0 Offset 0 + MemberDecorate 32(MyStruct) 1 Offset 4 + MemberDecorate 32(MyStruct) 2 Offset 8 + Decorate 33 ArrayStride 12 + MemberDecorate 34(MyStructs) 0 Offset 0 + MemberDecorate 34(MyStructs) 1 Offset 4 + Decorate 34(MyStructs) BufferBlock + Decorate 36(my_structs) DescriptorSet 0 + Decorate 36(my_structs) Binding 0 + MemberDecorate 65(Output) 0 Offset 0 + MemberDecorate 65(Output) 1 Offset 4 + MemberDecorate 65(Output) 2 Offset 8 + Decorate 65(Output) BufferBlock + Decorate 67(o) DescriptorSet 0 + Decorate 67(o) Binding 1 + Decorate 80 BuiltIn WorkgroupSize + 2: TypeVoid + 3: TypeFunction 2 + 6: TypeInt 32 0 + 7(MyStruct): TypeStruct 6(int) 6(int) 6(int) + 8: 6(int) Constant 512 + 9: TypeArray 7(MyStruct) 8 + 10: TypePointer Workgroup 9 + 11(s): 10(ptr) Variable Workgroup + 12: TypeInt 32 1 + 13: 12(int) Constant 0 + 14: 6(int) Constant 1 + 15: 6(int) Constant 2 + 16: 6(int) Constant 3 + 17: 7(MyStruct) ConstantComposite 14 15 16 + 18: TypePointer Workgroup 7(MyStruct) + 20: TypePointer Function 6(int) + 22: TypeVector 6(int) 3 + 23: TypePointer Input 22(ivec3) +24(gl_GlobalInvocationID): 23(ptr) Variable Input + 25: 6(int) Constant 0 + 26: TypePointer Input 6(int) + 29: TypePointer Function 7(MyStruct) + 32(MyStruct): TypeStruct 6(int) 6(int) 6(int) + 33: TypeRuntimeArray 32(MyStruct) + 34(MyStructs): TypeStruct 6(int) 33 + 35: TypePointer Uniform 34(MyStructs) + 36(my_structs): 35(ptr) Variable Uniform + 37: TypePointer Uniform 6(int) + 40: TypeBool + 52: 12(int) Constant 1 + 54: TypePointer Uniform 32(MyStruct) + 62: 12(int) Constant 2 + 65(Output): TypeStruct 6(int) 6(int) 6(int) + 66: TypePointer Uniform 65(Output) + 67(o): 66(ptr) Variable Uniform + 80: 22(ivec3) ConstantComposite 8 14 14 + 4(main): 2 Function None 3 + 5: Label + 21(id): 20(ptr) Variable Function + 30(ms): 29(ptr) Variable Function + 42: 29(ptr) Variable Function + 19: 18(ptr) AccessChain 11(s) 13 + Store 19 17 + 27: 26(ptr) AccessChain 24(gl_GlobalInvocationID) 25 + 28: 6(int) Load 27 + Store 21(id) 28 + 31: 6(int) Load 21(id) + 38: 37(ptr) AccessChain 36(my_structs) 13 + 39: 6(int) Load 38 + 41: 40(bool) UGreaterThan 31 39 + SelectionMerge 44 None + BranchConditional 41 43 51 + 43: Label + 45: 6(int) Load 21(id) + 46: 37(ptr) AccessChain 36(my_structs) 13 + 47: 6(int) Load 46 + 48: 6(int) ISub 45 47 + 49: 18(ptr) AccessChain 11(s) 48 + 50: 7(MyStruct) Load 49 + Store 42 50 + Branch 44 + 51: Label + 53: 6(int) Load 21(id) + 55: 54(ptr) AccessChain 36(my_structs) 52 53 + 56:32(MyStruct) Load 55 + 57: 6(int) CompositeExtract 56 0 + 58: 20(ptr) AccessChain 42 13 + Store 58 57 + 59: 6(int) CompositeExtract 56 1 + 60: 20(ptr) AccessChain 42 52 + Store 60 59 + 61: 6(int) CompositeExtract 56 2 + 63: 20(ptr) AccessChain 42 62 + Store 63 61 + Branch 44 + 44: Label + 64: 7(MyStruct) Load 42 + Store 30(ms) 64 + 68: 37(ptr) AccessChain 67(o) 13 + 69: 20(ptr) AccessChain 30(ms) 13 + 70: 6(int) Load 69 + 71: 6(int) AtomicIAdd 68 14 25 70 + 72: 37(ptr) AccessChain 67(o) 52 + 73: 20(ptr) AccessChain 30(ms) 52 + 74: 6(int) Load 73 + 75: 6(int) AtomicIAdd 72 14 25 74 + 76: 37(ptr) AccessChain 67(o) 62 + 77: 20(ptr) AccessChain 30(ms) 62 + 78: 6(int) Load 77 + 79: 6(int) AtomicIAdd 76 14 25 78 + Return + FunctionEnd diff --git a/Test/baseResults/spv.tpipBlockMatchSAD.frag.out b/Test/baseResults/spv.tpipBlockMatchSAD.frag.out new file mode 100755 index 00000000..a807d923 --- /dev/null +++ b/Test/baseResults/spv.tpipBlockMatchSAD.frag.out @@ -0,0 +1,123 @@ +spv.tpipBlockMatchSAD.frag +// Module Version 10000 +// Generated by (magic number): 8000b +// Id's are bound by 72 + + Capability Shader + Capability TextureBlockMatchQCOM + Extension "SPV_QCOM_image_processing" + 1: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint Fragment 4 "main" 13 41 + ExecutionMode 4 OriginUpperLeft + Source GLSL 450 + SourceExtension "GL_QCOM_image_processing" + Name 4 "main" + Name 9 "tgt_coords" + Name 13 "v_texcoord" + Name 26 "ref_coords" + Name 37 "blockSize" + Name 41 "fragColor" + Name 44 "tex2D_src1" + Name 48 "samp" + Name 53 "tex2D_src2" + Name 61 "target_samp" + Name 64 "ref_samp" + Name 71 "tex2DArray_weights" + Decorate 13(v_texcoord) Location 0 + Decorate 41(fragColor) Location 0 + Decorate 44(tex2D_src1) DescriptorSet 0 + Decorate 44(tex2D_src1) Binding 1 + Decorate 48(samp) DescriptorSet 0 + Decorate 48(samp) Binding 3 + Decorate 53(tex2D_src2) DescriptorSet 0 + Decorate 53(tex2D_src2) Binding 2 + Decorate 44(tex2D_src1) DecorationBlockMatchTextureQCOM + Decorate 53(tex2D_src2) DecorationBlockMatchTextureQCOM + Decorate 61(target_samp) DescriptorSet 0 + Decorate 61(target_samp) Binding 4 + Decorate 64(ref_samp) DescriptorSet 0 + Decorate 64(ref_samp) Binding 5 + Decorate 61(target_samp) DecorationBlockMatchTextureQCOM + Decorate 64(ref_samp) DecorationBlockMatchTextureQCOM + Decorate 71(tex2DArray_weights) DescriptorSet 0 + Decorate 71(tex2DArray_weights) Binding 0 + 2: TypeVoid + 3: TypeFunction 2 + 6: TypeInt 32 0 + 7: TypeVector 6(int) 2 + 8: TypePointer Function 7(ivec2) + 10: TypeFloat 32 + 11: TypeVector 10(float) 4 + 12: TypePointer Input 11(fvec4) + 13(v_texcoord): 12(ptr) Variable Input + 14: 6(int) Constant 0 + 15: TypePointer Input 10(float) + 19: TypePointer Function 6(int) + 21: 6(int) Constant 1 + 27: 6(int) Constant 2 + 32: 6(int) Constant 3 + 38: 6(int) Constant 4 + 39: 7(ivec2) ConstantComposite 38 38 + 40: TypePointer Output 11(fvec4) + 41(fragColor): 40(ptr) Variable Output + 42: TypeImage 10(float) 2D sampled format:Unknown + 43: TypePointer UniformConstant 42 + 44(tex2D_src1): 43(ptr) Variable UniformConstant + 46: TypeSampler + 47: TypePointer UniformConstant 46 + 48(samp): 47(ptr) Variable UniformConstant + 50: TypeSampledImage 42 + 53(tex2D_src2): 43(ptr) Variable UniformConstant + 60: TypePointer UniformConstant 50 + 61(target_samp): 60(ptr) Variable UniformConstant + 64(ref_samp): 60(ptr) Variable UniformConstant + 69: TypeImage 10(float) 2D array sampled format:Unknown + 70: TypePointer UniformConstant 69 +71(tex2DArray_weights): 70(ptr) Variable UniformConstant + 4(main): 2 Function None 3 + 5: Label + 9(tgt_coords): 8(ptr) Variable Function + 26(ref_coords): 8(ptr) Variable Function + 37(blockSize): 8(ptr) Variable Function + 16: 15(ptr) AccessChain 13(v_texcoord) 14 + 17: 10(float) Load 16 + 18: 6(int) ConvertFToU 17 + 20: 19(ptr) AccessChain 9(tgt_coords) 14 + Store 20 18 + 22: 15(ptr) AccessChain 13(v_texcoord) 21 + 23: 10(float) Load 22 + 24: 6(int) ConvertFToU 23 + 25: 19(ptr) AccessChain 9(tgt_coords) 14 + Store 25 24 + 28: 15(ptr) AccessChain 13(v_texcoord) 27 + 29: 10(float) Load 28 + 30: 6(int) ConvertFToU 29 + 31: 19(ptr) AccessChain 26(ref_coords) 14 + Store 31 30 + 33: 15(ptr) AccessChain 13(v_texcoord) 32 + 34: 10(float) Load 33 + 35: 6(int) ConvertFToU 34 + 36: 19(ptr) AccessChain 26(ref_coords) 21 + Store 36 35 + Store 37(blockSize) 39 + 45: 42 Load 44(tex2D_src1) + 49: 46 Load 48(samp) + 51: 50 SampledImage 45 49 + 52: 7(ivec2) Load 9(tgt_coords) + 54: 42 Load 53(tex2D_src2) + 55: 46 Load 48(samp) + 56: 50 SampledImage 54 55 + 57: 7(ivec2) Load 26(ref_coords) + 58: 7(ivec2) Load 37(blockSize) + 59: 11(fvec4) ImageBlockMatchSADQCOM 51 52 56 57 58 + Store 41(fragColor) 59 + 62: 50 Load 61(target_samp) + 63: 7(ivec2) Load 9(tgt_coords) + 65: 50 Load 64(ref_samp) + 66: 7(ivec2) Load 26(ref_coords) + 67: 7(ivec2) Load 37(blockSize) + 68: 11(fvec4) ImageBlockMatchSADQCOM 62 63 65 66 67 + Store 41(fragColor) 68 + Return + FunctionEnd diff --git a/Test/baseResults/spv.tpipBlockMatchSSD.frag.out b/Test/baseResults/spv.tpipBlockMatchSSD.frag.out new file mode 100755 index 00000000..e7ac73b6 --- /dev/null +++ b/Test/baseResults/spv.tpipBlockMatchSSD.frag.out @@ -0,0 +1,123 @@ +spv.tpipBlockMatchSSD.frag +// Module Version 10000 +// Generated by (magic number): 8000b +// Id's are bound by 72 + + Capability Shader + Capability TextureBlockMatchQCOM + Extension "SPV_QCOM_image_processing" + 1: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint Fragment 4 "main" 13 41 + ExecutionMode 4 OriginUpperLeft + Source GLSL 450 + SourceExtension "GL_QCOM_image_processing" + Name 4 "main" + Name 9 "tgt_coords" + Name 13 "v_texcoord" + Name 26 "ref_coords" + Name 37 "blockSize" + Name 41 "fragColor" + Name 44 "tex2D_src1" + Name 48 "samp" + Name 53 "tex2D_src2" + Name 61 "target_samp" + Name 64 "ref_samp" + Name 71 "tex2DArray_weights" + Decorate 13(v_texcoord) Location 0 + Decorate 41(fragColor) Location 0 + Decorate 44(tex2D_src1) DescriptorSet 0 + Decorate 44(tex2D_src1) Binding 1 + Decorate 48(samp) DescriptorSet 0 + Decorate 48(samp) Binding 3 + Decorate 53(tex2D_src2) DescriptorSet 0 + Decorate 53(tex2D_src2) Binding 2 + Decorate 44(tex2D_src1) DecorationBlockMatchTextureQCOM + Decorate 53(tex2D_src2) DecorationBlockMatchTextureQCOM + Decorate 61(target_samp) DescriptorSet 0 + Decorate 61(target_samp) Binding 4 + Decorate 64(ref_samp) DescriptorSet 0 + Decorate 64(ref_samp) Binding 5 + Decorate 61(target_samp) DecorationBlockMatchTextureQCOM + Decorate 64(ref_samp) DecorationBlockMatchTextureQCOM + Decorate 71(tex2DArray_weights) DescriptorSet 0 + Decorate 71(tex2DArray_weights) Binding 0 + 2: TypeVoid + 3: TypeFunction 2 + 6: TypeInt 32 0 + 7: TypeVector 6(int) 2 + 8: TypePointer Function 7(ivec2) + 10: TypeFloat 32 + 11: TypeVector 10(float) 4 + 12: TypePointer Input 11(fvec4) + 13(v_texcoord): 12(ptr) Variable Input + 14: 6(int) Constant 0 + 15: TypePointer Input 10(float) + 19: TypePointer Function 6(int) + 21: 6(int) Constant 1 + 27: 6(int) Constant 2 + 32: 6(int) Constant 3 + 38: 6(int) Constant 4 + 39: 7(ivec2) ConstantComposite 38 38 + 40: TypePointer Output 11(fvec4) + 41(fragColor): 40(ptr) Variable Output + 42: TypeImage 10(float) 2D sampled format:Unknown + 43: TypePointer UniformConstant 42 + 44(tex2D_src1): 43(ptr) Variable UniformConstant + 46: TypeSampler + 47: TypePointer UniformConstant 46 + 48(samp): 47(ptr) Variable UniformConstant + 50: TypeSampledImage 42 + 53(tex2D_src2): 43(ptr) Variable UniformConstant + 60: TypePointer UniformConstant 50 + 61(target_samp): 60(ptr) Variable UniformConstant + 64(ref_samp): 60(ptr) Variable UniformConstant + 69: TypeImage 10(float) 2D array sampled format:Unknown + 70: TypePointer UniformConstant 69 +71(tex2DArray_weights): 70(ptr) Variable UniformConstant + 4(main): 2 Function None 3 + 5: Label + 9(tgt_coords): 8(ptr) Variable Function + 26(ref_coords): 8(ptr) Variable Function + 37(blockSize): 8(ptr) Variable Function + 16: 15(ptr) AccessChain 13(v_texcoord) 14 + 17: 10(float) Load 16 + 18: 6(int) ConvertFToU 17 + 20: 19(ptr) AccessChain 9(tgt_coords) 14 + Store 20 18 + 22: 15(ptr) AccessChain 13(v_texcoord) 21 + 23: 10(float) Load 22 + 24: 6(int) ConvertFToU 23 + 25: 19(ptr) AccessChain 9(tgt_coords) 14 + Store 25 24 + 28: 15(ptr) AccessChain 13(v_texcoord) 27 + 29: 10(float) Load 28 + 30: 6(int) ConvertFToU 29 + 31: 19(ptr) AccessChain 26(ref_coords) 14 + Store 31 30 + 33: 15(ptr) AccessChain 13(v_texcoord) 32 + 34: 10(float) Load 33 + 35: 6(int) ConvertFToU 34 + 36: 19(ptr) AccessChain 26(ref_coords) 21 + Store 36 35 + Store 37(blockSize) 39 + 45: 42 Load 44(tex2D_src1) + 49: 46 Load 48(samp) + 51: 50 SampledImage 45 49 + 52: 7(ivec2) Load 9(tgt_coords) + 54: 42 Load 53(tex2D_src2) + 55: 46 Load 48(samp) + 56: 50 SampledImage 54 55 + 57: 7(ivec2) Load 26(ref_coords) + 58: 7(ivec2) Load 37(blockSize) + 59: 11(fvec4) ImageBlockMatchSSDQCOM 51 52 56 57 58 + Store 41(fragColor) 59 + 62: 50 Load 61(target_samp) + 63: 7(ivec2) Load 9(tgt_coords) + 65: 50 Load 64(ref_samp) + 66: 7(ivec2) Load 26(ref_coords) + 67: 7(ivec2) Load 37(blockSize) + 68: 11(fvec4) ImageBlockMatchSSDQCOM 62 63 65 66 67 + Store 41(fragColor) 68 + Return + FunctionEnd diff --git a/Test/baseResults/spv.tpipBoxFilter.frag.out b/Test/baseResults/spv.tpipBoxFilter.frag.out new file mode 100755 index 00000000..5620a816 --- /dev/null +++ b/Test/baseResults/spv.tpipBoxFilter.frag.out @@ -0,0 +1,81 @@ +spv.tpipBoxFilter.frag +// Module Version 10000 +// Generated by (magic number): 8000b +// Id's are bound by 43 + + Capability Shader + Capability TextureBoxFilterQCOM + Extension "SPV_QCOM_image_processing" + 1: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint Fragment 4 "main" 15 27 + ExecutionMode 4 OriginUpperLeft + Source GLSL 450 + SourceExtension "GL_QCOM_image_processing" + Name 4 "main" + Name 9 "boxSize" + Name 15 "fragColor" + Name 18 "tex2D_src1" + Name 22 "samp" + Name 27 "v_texcoord" + Name 33 "tex_samp" + Name 41 "tex2DArray_weights" + Name 42 "tex2D_src2" + Decorate 15(fragColor) Location 0 + Decorate 18(tex2D_src1) DescriptorSet 0 + Decorate 18(tex2D_src1) Binding 1 + Decorate 22(samp) DescriptorSet 0 + Decorate 22(samp) Binding 3 + Decorate 27(v_texcoord) Location 0 + Decorate 33(tex_samp) DescriptorSet 0 + Decorate 33(tex_samp) Binding 4 + Decorate 41(tex2DArray_weights) DescriptorSet 0 + Decorate 41(tex2DArray_weights) Binding 0 + Decorate 42(tex2D_src2) DescriptorSet 0 + Decorate 42(tex2D_src2) Binding 2 + 2: TypeVoid + 3: TypeFunction 2 + 6: TypeFloat 32 + 7: TypeVector 6(float) 2 + 8: TypePointer Function 7(fvec2) + 10: 6(float) Constant 1075838976 + 11: 6(float) Constant 1083179008 + 12: 7(fvec2) ConstantComposite 10 11 + 13: TypeVector 6(float) 4 + 14: TypePointer Output 13(fvec4) + 15(fragColor): 14(ptr) Variable Output + 16: TypeImage 6(float) 2D sampled format:Unknown + 17: TypePointer UniformConstant 16 + 18(tex2D_src1): 17(ptr) Variable UniformConstant + 20: TypeSampler + 21: TypePointer UniformConstant 20 + 22(samp): 21(ptr) Variable UniformConstant + 24: TypeSampledImage 16 + 26: TypePointer Input 13(fvec4) + 27(v_texcoord): 26(ptr) Variable Input + 32: TypePointer UniformConstant 24 + 33(tex_samp): 32(ptr) Variable UniformConstant + 39: TypeImage 6(float) 2D array sampled format:Unknown + 40: TypePointer UniformConstant 39 +41(tex2DArray_weights): 40(ptr) Variable UniformConstant + 42(tex2D_src2): 17(ptr) Variable UniformConstant + 4(main): 2 Function None 3 + 5: Label + 9(boxSize): 8(ptr) Variable Function + Store 9(boxSize) 12 + 19: 16 Load 18(tex2D_src1) + 23: 20 Load 22(samp) + 25: 24 SampledImage 19 23 + 28: 13(fvec4) Load 27(v_texcoord) + 29: 7(fvec2) VectorShuffle 28 28 0 1 + 30: 7(fvec2) Load 9(boxSize) + 31: 13(fvec4) ImageBoxFilterQCOM 25 29 30 + Store 15(fragColor) 31 + 34: 24 Load 33(tex_samp) + 35: 13(fvec4) Load 27(v_texcoord) + 36: 7(fvec2) VectorShuffle 35 35 0 1 + 37: 7(fvec2) Load 9(boxSize) + 38: 13(fvec4) ImageBoxFilterQCOM 34 36 37 + Store 15(fragColor) 38 + Return + FunctionEnd diff --git a/Test/baseResults/spv.tpipSampleWeighted.frag.out b/Test/baseResults/spv.tpipSampleWeighted.frag.out new file mode 100755 index 00000000..bf108742 --- /dev/null +++ b/Test/baseResults/spv.tpipSampleWeighted.frag.out @@ -0,0 +1,84 @@ +spv.tpipSampleWeighted.frag +// Module Version 10000 +// Generated by (magic number): 8000b +// Id's are bound by 43 + + Capability Shader + Capability TextureSampleWeightedQCOM + Extension "SPV_QCOM_image_processing" + 1: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint Fragment 4 "main" 9 21 + ExecutionMode 4 OriginUpperLeft + Source GLSL 450 + SourceExtension "GL_QCOM_image_processing" + Name 4 "main" + Name 9 "fragColor" + Name 12 "tex2D_src1" + Name 16 "samp" + Name 21 "v_texcoord" + Name 27 "tex2DArray_weights" + Name 34 "tex_samp" + Name 39 "tex_samp_array" + Name 42 "tex2D_src2" + Decorate 9(fragColor) Location 0 + Decorate 12(tex2D_src1) DescriptorSet 0 + Decorate 12(tex2D_src1) Binding 1 + Decorate 16(samp) DescriptorSet 0 + Decorate 16(samp) Binding 3 + Decorate 21(v_texcoord) Location 0 + Decorate 27(tex2DArray_weights) DescriptorSet 0 + Decorate 27(tex2DArray_weights) Binding 0 + Decorate 27(tex2DArray_weights) DecorationWeightTextureQCOM + Decorate 34(tex_samp) DescriptorSet 0 + Decorate 34(tex_samp) Binding 4 + Decorate 39(tex_samp_array) DescriptorSet 0 + Decorate 39(tex_samp_array) Binding 5 + Decorate 39(tex_samp_array) DecorationWeightTextureQCOM + Decorate 42(tex2D_src2) DescriptorSet 0 + Decorate 42(tex2D_src2) Binding 2 + 2: TypeVoid + 3: TypeFunction 2 + 6: TypeFloat 32 + 7: TypeVector 6(float) 4 + 8: TypePointer Output 7(fvec4) + 9(fragColor): 8(ptr) Variable Output + 10: TypeImage 6(float) 2D sampled format:Unknown + 11: TypePointer UniformConstant 10 + 12(tex2D_src1): 11(ptr) Variable UniformConstant + 14: TypeSampler + 15: TypePointer UniformConstant 14 + 16(samp): 15(ptr) Variable UniformConstant + 18: TypeSampledImage 10 + 20: TypePointer Input 7(fvec4) + 21(v_texcoord): 20(ptr) Variable Input + 22: TypeVector 6(float) 2 + 25: TypeImage 6(float) 2D array sampled format:Unknown + 26: TypePointer UniformConstant 25 +27(tex2DArray_weights): 26(ptr) Variable UniformConstant + 30: TypeSampledImage 25 + 33: TypePointer UniformConstant 18 + 34(tex_samp): 33(ptr) Variable UniformConstant + 38: TypePointer UniformConstant 30 +39(tex_samp_array): 38(ptr) Variable UniformConstant + 42(tex2D_src2): 11(ptr) Variable UniformConstant + 4(main): 2 Function None 3 + 5: Label + 13: 10 Load 12(tex2D_src1) + 17: 14 Load 16(samp) + 19: 18 SampledImage 13 17 + 23: 7(fvec4) Load 21(v_texcoord) + 24: 22(fvec2) VectorShuffle 23 23 0 1 + 28: 25 Load 27(tex2DArray_weights) + 29: 14 Load 16(samp) + 31: 30 SampledImage 28 29 + 32: 7(fvec4) ImageSampleWeightedQCOM 19 24 31 + Store 9(fragColor) 32 + 35: 18 Load 34(tex_samp) + 36: 7(fvec4) Load 21(v_texcoord) + 37: 22(fvec2) VectorShuffle 36 36 0 1 + 40: 30 Load 39(tex_samp_array) + 41: 7(fvec4) ImageSampleWeightedQCOM 35 37 40 + Store 9(fragColor) 41 + Return + FunctionEnd diff --git a/Test/baseResults/spv.tpipTextureArrays.frag.out b/Test/baseResults/spv.tpipTextureArrays.frag.out new file mode 100755 index 00000000..28b63f57 --- /dev/null +++ b/Test/baseResults/spv.tpipTextureArrays.frag.out @@ -0,0 +1,128 @@ +spv.tpipTextureArrays.frag +// Module Version 10000 +// Generated by (magic number): 8000b +// Id's are bound by 84 + + Capability Shader + Capability TextureBlockMatchQCOM + Extension "SPV_QCOM_image_processing" + 1: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint Fragment 4 "main" 13 46 + ExecutionMode 4 OriginUpperLeft + Source GLSL 450 + SourceExtension "GL_QCOM_image_processing" + Name 4 "main" + Name 9 "tgt_coords" + Name 13 "v_texcoord" + Name 26 "ref_coords" + Name 37 "blockSize" + Name 40 "ii" + Name 46 "fragColor" + Name 51 "samplers" + Name 60 "tex2D_srcs" + Name 67 "samp" + Decorate 13(v_texcoord) Location 0 + Decorate 46(fragColor) Location 0 + Decorate 51(samplers) DescriptorSet 0 + Decorate 51(samplers) Binding 5 + Decorate 60(tex2D_srcs) DescriptorSet 0 + Decorate 60(tex2D_srcs) Binding 4 + Decorate 67(samp) DescriptorSet 0 + Decorate 67(samp) Binding 3 + Decorate 55 DecorationBlockMatchTextureQCOM + Decorate 63 DecorationBlockMatchTextureQCOM + Decorate 74 DecorationBlockMatchTextureQCOM + Decorate 79 DecorationBlockMatchTextureQCOM + 2: TypeVoid + 3: TypeFunction 2 + 6: TypeInt 32 0 + 7: TypeVector 6(int) 2 + 8: TypePointer Function 7(ivec2) + 10: TypeFloat 32 + 11: TypeVector 10(float) 4 + 12: TypePointer Input 11(fvec4) + 13(v_texcoord): 12(ptr) Variable Input + 14: 6(int) Constant 0 + 15: TypePointer Input 10(float) + 19: TypePointer Function 6(int) + 21: 6(int) Constant 1 + 27: 6(int) Constant 2 + 32: 6(int) Constant 3 + 38: 6(int) Constant 4 + 39: 7(ivec2) ConstantComposite 38 38 + 43: 6(int) Constant 8 + 45: TypePointer Output 11(fvec4) + 46(fragColor): 45(ptr) Variable Output + 47: TypeImage 10(float) 2D sampled format:Unknown + 48: TypeSampledImage 47 + 49: TypeArray 48 32 + 50: TypePointer UniformConstant 49 + 51(samplers): 50(ptr) Variable UniformConstant + 52: TypeInt 32 1 + 53: 52(int) Constant 0 + 54: TypePointer UniformConstant 48 + 58: TypeArray 47 43 + 59: TypePointer UniformConstant 58 + 60(tex2D_srcs): 59(ptr) Variable UniformConstant + 62: TypePointer UniformConstant 47 + 65: TypeSampler + 66: TypePointer UniformConstant 65 + 67(samp): 66(ptr) Variable UniformConstant + 73: 52(int) Constant 1 + 4(main): 2 Function None 3 + 5: Label + 9(tgt_coords): 8(ptr) Variable Function + 26(ref_coords): 8(ptr) Variable Function + 37(blockSize): 8(ptr) Variable Function + 40(ii): 19(ptr) Variable Function + 16: 15(ptr) AccessChain 13(v_texcoord) 14 + 17: 10(float) Load 16 + 18: 6(int) ConvertFToU 17 + 20: 19(ptr) AccessChain 9(tgt_coords) 14 + Store 20 18 + 22: 15(ptr) AccessChain 13(v_texcoord) 21 + 23: 10(float) Load 22 + 24: 6(int) ConvertFToU 23 + 25: 19(ptr) AccessChain 9(tgt_coords) 14 + Store 25 24 + 28: 15(ptr) AccessChain 13(v_texcoord) 27 + 29: 10(float) Load 28 + 30: 6(int) ConvertFToU 29 + 31: 19(ptr) AccessChain 26(ref_coords) 14 + Store 31 30 + 33: 15(ptr) AccessChain 13(v_texcoord) 32 + 34: 10(float) Load 33 + 35: 6(int) ConvertFToU 34 + 36: 19(ptr) AccessChain 26(ref_coords) 21 + Store 36 35 + Store 37(blockSize) 39 + 41: 19(ptr) AccessChain 9(tgt_coords) 14 + 42: 6(int) Load 41 + 44: 6(int) UMod 42 43 + Store 40(ii) 44 + 55: 54(ptr) AccessChain 51(samplers) 53 + 56: 48 Load 55 + 57: 7(ivec2) Load 9(tgt_coords) + 61: 6(int) Load 40(ii) + 63: 62(ptr) AccessChain 60(tex2D_srcs) 61 + 64: 47 Load 63 + 68: 65 Load 67(samp) + 69: 48 SampledImage 64 68 + 70: 7(ivec2) Load 26(ref_coords) + 71: 7(ivec2) Load 37(blockSize) + 72: 11(fvec4) ImageBlockMatchSSDQCOM 56 57 69 70 71 + Store 46(fragColor) 72 + 74: 62(ptr) AccessChain 60(tex2D_srcs) 73 + 75: 47 Load 74 + 76: 65 Load 67(samp) + 77: 48 SampledImage 75 76 + 78: 7(ivec2) Load 9(tgt_coords) + 79: 54(ptr) AccessChain 51(samplers) 73 + 80: 48 Load 79 + 81: 7(ivec2) Load 26(ref_coords) + 82: 7(ivec2) Load 37(blockSize) + 83: 11(fvec4) ImageBlockMatchSADQCOM 77 78 80 81 82 + Store 46(fragColor) 83 + Return + FunctionEnd diff --git a/Test/baseResults/struct.error.frag.out b/Test/baseResults/struct.error.frag.out new file mode 100755 index 00000000..5b0993a1 --- /dev/null +++ b/Test/baseResults/struct.error.frag.out @@ -0,0 +1,37 @@ +struct.error.frag +ERROR: 0:12: 'z' : no such field in structure +ERROR: 1 compilation errors. No code generated. + + +Shader version: 460 +ERROR: node is still EOpNull! +0:7 Function Definition: test( ( global structure{ global float x}) +0:7 Function Parameters: +0:8 Sequence +0:8 Branch: Return with expression +0:8 Constant: +0:8 1.000000 +0:11 Function Definition: main( ( global void) +0:11 Function Parameters: +0:12 Sequence +0:12 Function Call: test( ( global structure{ global float x}) +0:? Linker Objects + + +Linked fragment stage: + + +Shader version: 460 +ERROR: node is still EOpNull! +0:7 Function Definition: test( ( global structure{ global float x}) +0:7 Function Parameters: +0:8 Sequence +0:8 Branch: Return with expression +0:8 Constant: +0:8 1.000000 +0:11 Function Definition: main( ( global void) +0:11 Function Parameters: +0:12 Sequence +0:12 Function Call: test( ( global structure{ global float x}) +0:? Linker Objects + diff --git a/Test/baseResults/tokenLength.vert.out b/Test/baseResults/tokenLength.vert.out index 8c31da92..43f3534c 100755 --- a/Test/baseResults/tokenLength.vert.out +++ b/Test/baseResults/tokenLength.vert.out @@ -16,10 +16,10 @@ ERROR: 0:40: '' : name too long WARNING: 0:40: '#extension' : extension not supported: a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhooooooooooooooooooooooooooooooohhhhhhhhhhhhhhhhh01234 ERROR: 0:43: '' : name too long ERROR: 0:44: '#extension' : ':' missing after extension name -ERROR: 0:47: '#error' : in long non - zero # if -ERROR: 0:50: '#error' : in long zero # if +ERROR: 0:47: '#error' : in long non - zero if +ERROR: 0:50: '#error' : in long zero if ERROR: 0:52: '' : numeric literal too long -ERROR: 0:53: '#error' : in too long # if +ERROR: 0:53: '#error' : in too long if ERROR: 0:56: 'preprocessor evaluation' : undefined macro in expression not allowed in es profile A000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001 ERROR: 0:59: 'preprocessor evaluation' : undefined macro in expression not allowed in es profile A000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 ERROR: 0:62: '' : name too long @@ -27,7 +27,8 @@ ERROR: 0:62: 'preprocessor evaluation' : undefined macro in expression not allow ERROR: 0:67: '' : numeric literal too long ERROR: 0:70: '' : name too long ERROR: 0:70: 'preprocessor evaluation' : undefined macro in expression not allowed in es profile A000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -ERROR: 26 compilation errors. No code generated. +ERROR: 0:74: '' : syntax error, unexpected IDENTIFIER, expecting COMMA or SEMICOLON +ERROR: 27 compilation errors. No code generated. Shader version: 300 @@ -56,7 +57,7 @@ ERROR: node is still EOpNull! 0:14 move second child to first child ( temp highp int) 0:14 'HE' ( global highp int) 0:14 Constant: -0:14 -1 (const int) +0:14 180150000 (const int) 0:17 Sequence 0:17 move second child to first child ( temp highp float) 0:17 'F' ( global highp float) @@ -119,6 +120,7 @@ ERROR: node is still EOpNull! 0:? 'superO' ( global highp int) 0:? 'superI' ( global highp int) 0:? 'superF' ( global highp float) +0:? 'BE' ( global highp int) 0:? 'gl_VertexID' ( gl_VertexId highp int VertexId) 0:? 'gl_InstanceID' ( gl_InstanceId highp int InstanceId) @@ -152,7 +154,7 @@ ERROR: node is still EOpNull! 0:14 move second child to first child ( temp highp int) 0:14 'HE' ( global highp int) 0:14 Constant: -0:14 -1 (const int) +0:14 180150000 (const int) 0:17 Sequence 0:17 move second child to first child ( temp highp float) 0:17 'F' ( global highp float) @@ -215,6 +217,7 @@ ERROR: node is still EOpNull! 0:? 'superO' ( global highp int) 0:? 'superI' ( global highp int) 0:? 'superF' ( global highp float) +0:? 'BE' ( global highp int) 0:? 'gl_VertexID' ( gl_VertexId highp int VertexId) 0:? 'gl_InstanceID' ( gl_InstanceId highp int InstanceId) diff --git a/Test/baseResults/vk.relaxed.errorcheck.vert.out b/Test/baseResults/vk.relaxed.errorcheck.vert.out index 5c6ecf92..24cf3efe 100755 --- a/Test/baseResults/vk.relaxed.errorcheck.vert.out +++ b/Test/baseResults/vk.relaxed.errorcheck.vert.out @@ -32,29 +32,39 @@ Shader version: 460 0:? 'gl_InstanceIndex' ( in int InstanceIndex) vk.relaxed.errorcheck.frag +ERROR: 0:11: 'test' : Redeclaration: already declared as " uniform highp float" +ERROR: 1 compilation errors. No code generated. + + Shader version: 460 gl_FragCoord origin is upper left -0:? Sequence -0:10 Function Definition: foo( ( global highp 4-component vector of float) -0:10 Function Parameters: -0:11 Sequence -0:11 Branch: Return with expression -0:11 a: direct index for structure ( uniform highp 4-component vector of float) -0:11 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a}) -0:11 Constant: -0:11 0 (const uint) -0:14 Function Definition: main( ( global void) -0:14 Function Parameters: -0:15 Sequence -0:15 move second child to first child ( temp highp 4-component vector of float) -0:15 'o' ( out highp 4-component vector of float) -0:15 add ( temp highp 4-component vector of float) -0:15 'io' (layout( location=0) smooth in highp 4-component vector of float) -0:15 Function Call: foo( ( global highp 4-component vector of float) +ERROR: node is still EOpNull! +0:13 Function Definition: foo( ( global highp 4-component vector of float) +0:13 Function Parameters: +0:14 Sequence +0:14 Branch: Return with expression +0:14 add ( temp highp 4-component vector of float) +0:14 a: direct index for structure ( uniform highp 4-component vector of float) +0:14 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp float test}) +0:14 Constant: +0:14 0 (const uint) +0:14 Construct vec4 ( temp highp 4-component vector of float) +0:14 test: direct index for structure ( uniform highp float) +0:14 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp float test}) +0:14 Constant: +0:14 1 (const uint) +0:17 Function Definition: main( ( global void) +0:17 Function Parameters: +0:18 Sequence +0:18 move second child to first child ( temp highp 4-component vector of float) +0:18 'o' ( out highp 4-component vector of float) +0:18 add ( temp highp 4-component vector of float) +0:18 'io' (layout( location=0) smooth in highp 4-component vector of float) +0:18 Function Call: foo( ( global highp 4-component vector of float) 0:? Linker Objects 0:? 'io' (layout( location=0) smooth in highp 4-component vector of float) 0:? 'o' ( out highp 4-component vector of float) -0:? 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a}) +0:? 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp float test}) Linked vertex stage: @@ -98,27 +108,33 @@ Shader version: 460 0:? 'gl_InstanceIndex' ( in int InstanceIndex) Shader version: 460 gl_FragCoord origin is upper left -0:? Sequence -0:10 Function Definition: foo( ( global highp 4-component vector of float) -0:10 Function Parameters: -0:11 Sequence -0:11 Branch: Return with expression -0:11 a: direct index for structure ( uniform highp 4-component vector of float) -0:11 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a}) -0:11 Constant: -0:11 0 (const uint) -0:14 Function Definition: main( ( global void) -0:14 Function Parameters: -0:15 Sequence -0:15 move second child to first child ( temp highp 4-component vector of float) -0:15 'o' ( out highp 4-component vector of float) -0:15 add ( temp highp 4-component vector of float) -0:15 'io' (layout( location=0) smooth in highp 4-component vector of float) -0:15 Function Call: foo( ( global highp 4-component vector of float) +ERROR: node is still EOpNull! +0:13 Function Definition: foo( ( global highp 4-component vector of float) +0:13 Function Parameters: +0:14 Sequence +0:14 Branch: Return with expression +0:14 add ( temp highp 4-component vector of float) +0:14 a: direct index for structure ( uniform highp 4-component vector of float) +0:14 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp float test}) +0:14 Constant: +0:14 0 (const uint) +0:14 Construct vec4 ( temp highp 4-component vector of float) +0:14 test: direct index for structure ( uniform highp float) +0:14 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp float test}) +0:14 Constant: +0:14 1 (const uint) +0:17 Function Definition: main( ( global void) +0:17 Function Parameters: +0:18 Sequence +0:18 move second child to first child ( temp highp 4-component vector of float) +0:18 'o' ( out highp 4-component vector of float) +0:18 add ( temp highp 4-component vector of float) +0:18 'io' (layout( location=0) smooth in highp 4-component vector of float) +0:18 Function Call: foo( ( global highp 4-component vector of float) 0:? Linker Objects 0:? 'io' (layout( location=0) smooth in highp 4-component vector of float) 0:? 'o' ( out highp 4-component vector of float) -0:? 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a}) +0:? 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp float test}) Validation failed SPIR-V is not generated for failed compile or link diff --git a/Test/baseResults/vk.relaxed.frag.out b/Test/baseResults/vk.relaxed.frag.out index c88782f3..078dec20 100755 --- a/Test/baseResults/vk.relaxed.frag.out +++ b/Test/baseResults/vk.relaxed.frag.out @@ -5,111 +5,71 @@ WARNING: 0:8: 'c' : ignoring layout qualifier for uniform location Shader version: 460 gl_FragCoord origin is upper left 0:? Sequence -0:36 Function Definition: bar( ( global highp uint) -0:36 Function Parameters: -0:37 Sequence -0:37 Sequence -0:37 move second child to first child ( temp highp uint) -0:37 'j' ( temp highp uint) -0:37 Constant: -0:37 0 (const uint) -0:38 move second child to first child ( temp highp uint) -0:38 'j' ( temp highp uint) -0:38 AtomicAdd ( global highp uint) -0:38 counter1: direct index for structure ( coherent volatile buffer highp uint) -0:38 'anon@2' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1, coherent volatile buffer highp uint counter2}) -0:38 Constant: -0:38 0 (const uint) -0:38 Constant: -0:38 1 (const uint) -0:39 move second child to first child ( temp highp uint) -0:39 'j' ( temp highp uint) -0:39 subtract ( temp highp uint) -0:39 AtomicAdd ( global highp uint) -0:39 counter1: direct index for structure ( coherent volatile buffer highp uint) -0:39 'anon@2' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1, coherent volatile buffer highp uint counter2}) -0:39 Constant: -0:39 0 (const uint) -0:39 Constant: -0:39 4294967295 (const uint) -0:39 Constant: -0:39 1 (const uint) -0:40 move second child to first child ( temp highp uint) -0:40 'j' ( temp highp uint) -0:40 counter1: direct index for structure ( coherent volatile buffer highp uint) -0:40 'anon@2' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1, coherent volatile buffer highp uint counter2}) -0:40 Constant: -0:40 0 (const uint) -0:42 move second child to first child ( temp highp uint) -0:42 'j' ( temp highp uint) -0:42 AtomicAdd ( global highp uint) -0:42 counter1: direct index for structure ( coherent volatile buffer highp uint) -0:42 'anon@2' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1, coherent volatile buffer highp uint counter2}) -0:42 Constant: -0:42 0 (const uint) -0:42 Constant: -0:42 1 (const uint) -0:43 move second child to first child ( temp highp uint) -0:43 'j' ( temp highp uint) -0:43 AtomicAdd ( global highp uint) -0:43 counter1: direct index for structure ( coherent volatile buffer highp uint) -0:43 'anon@2' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1, coherent volatile buffer highp uint counter2}) -0:43 Constant: -0:43 0 (const uint) -0:43 Constant: -0:43 4294967295 (const uint) -0:44 move second child to first child ( temp highp uint) -0:44 'j' ( temp highp uint) -0:44 AtomicSubtract ( global highp uint) -0:44 counter1: direct index for structure ( coherent volatile buffer highp uint) -0:44 'anon@2' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1, coherent volatile buffer highp uint counter2}) -0:44 Constant: -0:44 0 (const uint) +0:43 Function Definition: bar( ( global highp uint) +0:43 Function Parameters: +0:44 Sequence +0:44 Sequence +0:44 move second child to first child ( temp highp uint) +0:44 'j' ( temp highp uint) 0:44 Constant: -0:44 1 (const uint) +0:44 0 (const uint) +0:45 move second child to first child ( temp highp uint) +0:45 'j' ( temp highp uint) +0:45 AtomicAdd ( global highp uint) +0:45 counter1: direct index for structure ( coherent volatile buffer highp uint) +0:45 'anon@2' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1, coherent volatile buffer highp uint counter2}) +0:45 Constant: +0:45 0 (const uint) +0:45 Constant: +0:45 1 (const uint) 0:46 move second child to first child ( temp highp uint) 0:46 'j' ( temp highp uint) -0:46 AtomicMin ( global highp uint) -0:46 counter1: direct index for structure ( coherent volatile buffer highp uint) -0:46 'anon@2' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1, coherent volatile buffer highp uint counter2}) +0:46 subtract ( temp highp uint) +0:46 AtomicAdd ( global highp uint) +0:46 counter1: direct index for structure ( coherent volatile buffer highp uint) +0:46 'anon@2' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1, coherent volatile buffer highp uint counter2}) +0:46 Constant: +0:46 0 (const uint) 0:46 Constant: -0:46 0 (const uint) -0:46 'j' ( temp highp uint) +0:46 4294967295 (const uint) +0:46 Constant: +0:46 1 (const uint) 0:47 move second child to first child ( temp highp uint) 0:47 'j' ( temp highp uint) -0:47 AtomicMax ( global highp uint) -0:47 counter1: direct index for structure ( coherent volatile buffer highp uint) -0:47 'anon@2' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1, coherent volatile buffer highp uint counter2}) -0:47 Constant: -0:47 0 (const uint) -0:47 'j' ( temp highp uint) -0:48 move second child to first child ( temp highp uint) -0:48 'j' ( temp highp uint) -0:48 AtomicAnd ( global highp uint) -0:48 counter1: direct index for structure ( coherent volatile buffer highp uint) -0:48 'anon@2' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1, coherent volatile buffer highp uint counter2}) -0:48 Constant: -0:48 0 (const uint) -0:48 'j' ( temp highp uint) +0:47 counter1: direct index for structure ( coherent volatile buffer highp uint) +0:47 'anon@2' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1, coherent volatile buffer highp uint counter2}) +0:47 Constant: +0:47 0 (const uint) +0:49 move second child to first child ( temp highp uint) +0:49 'j' ( temp highp uint) +0:49 AtomicAdd ( global highp uint) +0:49 counter1: direct index for structure ( coherent volatile buffer highp uint) +0:49 'anon@2' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1, coherent volatile buffer highp uint counter2}) +0:49 Constant: +0:49 0 (const uint) +0:49 Constant: +0:49 1 (const uint) 0:50 move second child to first child ( temp highp uint) 0:50 'j' ( temp highp uint) -0:50 AtomicOr ( global highp uint) +0:50 AtomicAdd ( global highp uint) 0:50 counter1: direct index for structure ( coherent volatile buffer highp uint) 0:50 'anon@2' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1, coherent volatile buffer highp uint counter2}) 0:50 Constant: 0:50 0 (const uint) -0:50 'j' ( temp highp uint) +0:50 Constant: +0:50 4294967295 (const uint) 0:51 move second child to first child ( temp highp uint) 0:51 'j' ( temp highp uint) -0:51 AtomicXor ( global highp uint) +0:51 AtomicSubtract ( global highp uint) 0:51 counter1: direct index for structure ( coherent volatile buffer highp uint) 0:51 'anon@2' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1, coherent volatile buffer highp uint counter2}) 0:51 Constant: 0:51 0 (const uint) -0:51 'j' ( temp highp uint) +0:51 Constant: +0:51 1 (const uint) 0:53 move second child to first child ( temp highp uint) 0:53 'j' ( temp highp uint) -0:53 AtomicExchange ( global highp uint) +0:53 AtomicMin ( global highp uint) 0:53 counter1: direct index for structure ( coherent volatile buffer highp uint) 0:53 'anon@2' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1, coherent volatile buffer highp uint counter2}) 0:53 Constant: @@ -117,158 +77,254 @@ gl_FragCoord origin is upper left 0:53 'j' ( temp highp uint) 0:54 move second child to first child ( temp highp uint) 0:54 'j' ( temp highp uint) -0:54 AtomicCompSwap ( global highp uint) +0:54 AtomicMax ( global highp uint) 0:54 counter1: direct index for structure ( coherent volatile buffer highp uint) 0:54 'anon@2' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1, coherent volatile buffer highp uint counter2}) 0:54 Constant: 0:54 0 (const uint) -0:54 Constant: -0:54 0 (const uint) 0:54 'j' ( temp highp uint) -0:56 AtomicAdd ( global highp uint) -0:56 counter2: direct index for structure ( coherent volatile buffer highp uint) -0:56 'anon@2' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1, coherent volatile buffer highp uint counter2}) -0:56 Constant: -0:56 1 (const uint) -0:56 Constant: -0:56 1 (const uint) -0:57 AtomicAdd ( global highp uint) -0:57 counter3: direct index for structure ( coherent volatile buffer highp uint) -0:57 'anon@3' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter3}) -0:57 Constant: -0:57 0 (const uint) -0:57 Constant: -0:57 1 (const uint) -0:59 MemoryBarrierBuffer ( global void) -0:61 Branch: Return with expression +0:55 move second child to first child ( temp highp uint) +0:55 'j' ( temp highp uint) +0:55 AtomicAnd ( global highp uint) +0:55 counter1: direct index for structure ( coherent volatile buffer highp uint) +0:55 'anon@2' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1, coherent volatile buffer highp uint counter2}) +0:55 Constant: +0:55 0 (const uint) +0:55 'j' ( temp highp uint) +0:57 move second child to first child ( temp highp uint) +0:57 'j' ( temp highp uint) +0:57 AtomicOr ( global highp uint) +0:57 counter1: direct index for structure ( coherent volatile buffer highp uint) +0:57 'anon@2' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1, coherent volatile buffer highp uint counter2}) +0:57 Constant: +0:57 0 (const uint) +0:57 'j' ( temp highp uint) +0:58 move second child to first child ( temp highp uint) +0:58 'j' ( temp highp uint) +0:58 AtomicXor ( global highp uint) +0:58 counter1: direct index for structure ( coherent volatile buffer highp uint) +0:58 'anon@2' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1, coherent volatile buffer highp uint counter2}) +0:58 Constant: +0:58 0 (const uint) +0:58 'j' ( temp highp uint) +0:60 move second child to first child ( temp highp uint) +0:60 'j' ( temp highp uint) +0:60 AtomicExchange ( global highp uint) +0:60 counter1: direct index for structure ( coherent volatile buffer highp uint) +0:60 'anon@2' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1, coherent volatile buffer highp uint counter2}) +0:60 Constant: +0:60 0 (const uint) +0:60 'j' ( temp highp uint) +0:61 move second child to first child ( temp highp uint) 0:61 'j' ( temp highp uint) -0:64 Function Definition: foo( ( global highp 4-component vector of float) -0:64 Function Parameters: -0:65 Sequence -0:65 Sequence -0:65 move second child to first child ( temp highp float) -0:65 'f' ( temp highp float) -0:65 add ( temp highp float) -0:65 add ( temp highp float) -0:65 add ( temp highp float) -0:65 j: direct index for structure (layout( column_major std140) uniform highp float) -0:65 'anon@1' (layout( column_major std140) uniform block{layout( column_major std140) uniform highp float j, layout( column_major std140) uniform highp 4-component vector of float k}) -0:65 Constant: -0:65 0 (const uint) -0:65 j: direct index for structure (layout( column_major std430) buffer highp float) -0:65 'bufferInstance' (layout( column_major std430) buffer block{layout( column_major std430) buffer highp float j, layout( column_major std430) buffer highp 4-component vector of float k}) -0:65 Constant: -0:65 0 (const int) -0:65 y: direct index for structure ( global highp float) -0:65 structUniform: direct index for structure ( uniform structure{ global highp 2-component vector of float x, global highp float y, global highp uint z}) -0:65 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp 2-component vector of float b, uniform highp 2-component vector of float c, uniform 10-element array of highp 4-component vector of float d, uniform structure{ global highp 2-component vector of float x, global highp float y, global highp uint z} structUniform}) -0:65 Constant: -0:65 4 (const uint) -0:65 Constant: -0:65 1 (const int) -0:65 Convert uint to float ( temp highp float) -0:65 z: direct index for structure ( global highp uint) -0:65 structUniform: direct index for structure ( uniform structure{ global highp 2-component vector of float x, global highp float y, global highp uint z}) -0:65 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp 2-component vector of float b, uniform highp 2-component vector of float c, uniform 10-element array of highp 4-component vector of float d, uniform structure{ global highp 2-component vector of float x, global highp float y, global highp uint z} structUniform}) -0:65 Constant: -0:65 4 (const uint) -0:65 Constant: -0:65 2 (const int) -0:66 Sequence -0:66 move second child to first child ( temp highp 2-component vector of float) -0:66 'v2' ( temp highp 2-component vector of float) -0:66 add ( temp highp 2-component vector of float) -0:66 add ( temp highp 2-component vector of float) -0:66 b: direct index for structure ( uniform highp 2-component vector of float) -0:66 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp 2-component vector of float b, uniform highp 2-component vector of float c, uniform 10-element array of highp 4-component vector of float d, uniform structure{ global highp 2-component vector of float x, global highp float y, global highp uint z} structUniform}) -0:66 Constant: -0:66 1 (const uint) -0:66 c: direct index for structure ( uniform highp 2-component vector of float) -0:66 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp 2-component vector of float b, uniform highp 2-component vector of float c, uniform 10-element array of highp 4-component vector of float d, uniform structure{ global highp 2-component vector of float x, global highp float y, global highp uint z} structUniform}) -0:66 Constant: -0:66 2 (const uint) -0:66 x: direct index for structure ( global highp 2-component vector of float) -0:66 structUniform: direct index for structure ( uniform structure{ global highp 2-component vector of float x, global highp float y, global highp uint z}) -0:66 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp 2-component vector of float b, uniform highp 2-component vector of float c, uniform 10-element array of highp 4-component vector of float d, uniform structure{ global highp 2-component vector of float x, global highp float y, global highp uint z} structUniform}) -0:66 Constant: -0:66 4 (const uint) -0:66 Constant: -0:66 0 (const int) -0:67 Sequence -0:67 move second child to first child ( temp highp 4-component vector of float) -0:67 'v4' ( temp highp 4-component vector of float) -0:67 add ( temp highp 4-component vector of float) -0:67 add ( temp highp 4-component vector of float) -0:67 add ( temp highp 4-component vector of float) -0:67 add ( temp highp 4-component vector of float) -0:67 add ( temp highp 4-component vector of float) -0:67 add ( temp highp 4-component vector of float) -0:67 a: direct index for structure ( uniform highp 4-component vector of float) -0:67 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp 2-component vector of float b, uniform highp 2-component vector of float c, uniform 10-element array of highp 4-component vector of float d, uniform structure{ global highp 2-component vector of float x, global highp float y, global highp uint z} structUniform}) -0:67 Constant: -0:67 0 (const uint) -0:67 direct index ( temp highp 4-component vector of float) -0:67 d: direct index for structure ( uniform 10-element array of highp 4-component vector of float) -0:67 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp 2-component vector of float b, uniform highp 2-component vector of float c, uniform 10-element array of highp 4-component vector of float d, uniform structure{ global highp 2-component vector of float x, global highp float y, global highp uint z} structUniform}) -0:67 Constant: -0:67 3 (const uint) -0:67 Constant: -0:67 0 (const int) -0:67 direct index ( temp highp 4-component vector of float) -0:67 d: direct index for structure ( uniform 10-element array of highp 4-component vector of float) -0:67 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp 2-component vector of float b, uniform highp 2-component vector of float c, uniform 10-element array of highp 4-component vector of float d, uniform structure{ global highp 2-component vector of float x, global highp float y, global highp uint z} structUniform}) -0:67 Constant: -0:67 3 (const uint) -0:67 Constant: -0:67 1 (const int) -0:67 direct index ( temp highp 4-component vector of float) -0:67 d: direct index for structure ( uniform 10-element array of highp 4-component vector of float) -0:67 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp 2-component vector of float b, uniform highp 2-component vector of float c, uniform 10-element array of highp 4-component vector of float d, uniform structure{ global highp 2-component vector of float x, global highp float y, global highp uint z} structUniform}) -0:67 Constant: -0:67 3 (const uint) -0:67 Constant: -0:67 2 (const int) -0:67 k: direct index for structure (layout( column_major std140) uniform highp 4-component vector of float) -0:67 'anon@1' (layout( column_major std140) uniform block{layout( column_major std140) uniform highp float j, layout( column_major std140) uniform highp 4-component vector of float k}) -0:67 Constant: -0:67 1 (const uint) -0:67 k: direct index for structure (layout( column_major std430) buffer highp 4-component vector of float) -0:67 'bufferInstance' (layout( column_major std430) buffer block{layout( column_major std430) buffer highp float j, layout( column_major std430) buffer highp 4-component vector of float k}) -0:67 Constant: -0:67 1 (const int) -0:67 texture ( global highp 4-component vector of float) -0:67 't1' ( uniform highp sampler2D) -0:67 Constant: -0:67 0.000000 -0:67 0.000000 +0:61 AtomicCompSwap ( global highp uint) +0:61 counter1: direct index for structure ( coherent volatile buffer highp uint) +0:61 'anon@2' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1, coherent volatile buffer highp uint counter2}) +0:61 Constant: +0:61 0 (const uint) +0:61 Constant: +0:61 0 (const uint) +0:61 'j' ( temp highp uint) +0:63 AtomicAdd ( global highp uint) +0:63 counter2: direct index for structure ( coherent volatile buffer highp uint) +0:63 'anon@2' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1, coherent volatile buffer highp uint counter2}) +0:63 Constant: +0:63 1 (const uint) +0:63 Constant: +0:63 1 (const uint) +0:64 AtomicAdd ( global highp uint) +0:64 counter3: direct index for structure ( coherent volatile buffer highp uint) +0:64 'anon@3' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter3}) +0:64 Constant: +0:64 0 (const uint) +0:64 Constant: +0:64 1 (const uint) +0:66 MemoryBarrierBuffer ( global void) 0:68 Branch: Return with expression -0:68 component-wise multiply ( temp highp 4-component vector of float) -0:68 component-wise multiply ( temp highp 4-component vector of float) -0:68 Construct vec4 ( temp highp 4-component vector of float) -0:68 'f' ( temp highp float) -0:68 Construct vec4 ( temp highp 4-component vector of float) -0:68 'v2' ( temp highp 2-component vector of float) -0:68 Constant: -0:68 1.000000 -0:68 Constant: -0:68 1.000000 -0:68 'v4' ( temp highp 4-component vector of float) -0:71 Function Definition: main( ( global void) +0:68 'j' ( temp highp uint) +0:71 Function Definition: foo( ( global highp 4-component vector of float) 0:71 Function Parameters: 0:72 Sequence 0:72 Sequence 0:72 move second child to first child ( temp highp float) -0:72 'j' ( temp highp float) -0:72 Convert uint to float ( temp highp float) -0:72 Function Call: bar( ( global highp uint) -0:73 move second child to first child ( temp highp 4-component vector of float) -0:73 'o' ( out highp 4-component vector of float) -0:73 vector-scale ( temp highp 4-component vector of float) -0:73 'j' ( temp highp float) -0:73 Function Call: foo( ( global highp 4-component vector of float) +0:72 'f' ( temp highp float) +0:72 add ( temp highp float) +0:72 add ( temp highp float) +0:72 add ( temp highp float) +0:72 j: direct index for structure (layout( column_major std140) uniform highp float) +0:72 'anon@1' (layout( column_major std140) uniform block{layout( column_major std140) uniform highp float j, layout( column_major std140) uniform highp 4-component vector of float k}) +0:72 Constant: +0:72 0 (const uint) +0:72 j: direct index for structure (layout( column_major std430) buffer highp float) +0:72 'bufferInstance' (layout( column_major std430) buffer block{layout( column_major std430) buffer highp float j, layout( column_major std430) buffer highp 4-component vector of float k}) +0:72 Constant: +0:72 0 (const int) +0:72 y: direct index for structure ( global highp float) +0:72 structUniform: direct index for structure ( uniform structure{ global highp 2-component vector of float x, global highp float y, global highp uint z, global highp int /*t0*/, global structure{ global 4-element array of highp int /*tn*/} samplers}) +0:72 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp 2-component vector of float b, uniform highp 2-component vector of float c, uniform 10-element array of highp 4-component vector of float d, uniform structure{ global highp 2-component vector of float x, global highp float y, global highp uint z, global highp int /*t0*/, global structure{ global 4-element array of highp int /*tn*/} samplers} structUniform}) +0:72 Constant: +0:72 4 (const uint) +0:72 Constant: +0:72 1 (const int) +0:72 Convert uint to float ( temp highp float) +0:72 z: direct index for structure ( global highp uint) +0:72 structUniform: direct index for structure ( uniform structure{ global highp 2-component vector of float x, global highp float y, global highp uint z, global highp int /*t0*/, global structure{ global 4-element array of highp int /*tn*/} samplers}) +0:72 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp 2-component vector of float b, uniform highp 2-component vector of float c, uniform 10-element array of highp 4-component vector of float d, uniform structure{ global highp 2-component vector of float x, global highp float y, global highp uint z, global highp int /*t0*/, global structure{ global 4-element array of highp int /*tn*/} samplers} structUniform}) +0:72 Constant: +0:72 4 (const uint) +0:72 Constant: +0:72 2 (const int) +0:73 Sequence +0:73 move second child to first child ( temp highp 2-component vector of float) +0:73 'v2' ( temp highp 2-component vector of float) +0:73 add ( temp highp 2-component vector of float) +0:73 add ( temp highp 2-component vector of float) +0:73 b: direct index for structure ( uniform highp 2-component vector of float) +0:73 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp 2-component vector of float b, uniform highp 2-component vector of float c, uniform 10-element array of highp 4-component vector of float d, uniform structure{ global highp 2-component vector of float x, global highp float y, global highp uint z, global highp int /*t0*/, global structure{ global 4-element array of highp int /*tn*/} samplers} structUniform}) +0:73 Constant: +0:73 1 (const uint) +0:73 c: direct index for structure ( uniform highp 2-component vector of float) +0:73 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp 2-component vector of float b, uniform highp 2-component vector of float c, uniform 10-element array of highp 4-component vector of float d, uniform structure{ global highp 2-component vector of float x, global highp float y, global highp uint z, global highp int /*t0*/, global structure{ global 4-element array of highp int /*tn*/} samplers} structUniform}) +0:73 Constant: +0:73 2 (const uint) +0:73 x: direct index for structure ( global highp 2-component vector of float) +0:73 structUniform: direct index for structure ( uniform structure{ global highp 2-component vector of float x, global highp float y, global highp uint z, global highp int /*t0*/, global structure{ global 4-element array of highp int /*tn*/} samplers}) +0:73 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp 2-component vector of float b, uniform highp 2-component vector of float c, uniform 10-element array of highp 4-component vector of float d, uniform structure{ global highp 2-component vector of float x, global highp float y, global highp uint z, global highp int /*t0*/, global structure{ global 4-element array of highp int /*tn*/} samplers} structUniform}) +0:73 Constant: +0:73 4 (const uint) +0:73 Constant: +0:73 0 (const int) +0:74 Sequence +0:74 move second child to first child ( temp highp 4-component vector of float) +0:74 'v4' ( temp highp 4-component vector of float) +0:74 add ( temp highp 4-component vector of float) +0:74 add ( temp highp 4-component vector of float) +0:74 add ( temp highp 4-component vector of float) +0:74 add ( temp highp 4-component vector of float) +0:74 add ( temp highp 4-component vector of float) +0:74 add ( temp highp 4-component vector of float) +0:74 add ( temp highp 4-component vector of float) +0:74 a: direct index for structure ( uniform highp 4-component vector of float) +0:74 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp 2-component vector of float b, uniform highp 2-component vector of float c, uniform 10-element array of highp 4-component vector of float d, uniform structure{ global highp 2-component vector of float x, global highp float y, global highp uint z, global highp int /*t0*/, global structure{ global 4-element array of highp int /*tn*/} samplers} structUniform}) +0:74 Constant: +0:74 0 (const uint) +0:74 direct index ( temp highp 4-component vector of float) +0:74 d: direct index for structure ( uniform 10-element array of highp 4-component vector of float) +0:74 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp 2-component vector of float b, uniform highp 2-component vector of float c, uniform 10-element array of highp 4-component vector of float d, uniform structure{ global highp 2-component vector of float x, global highp float y, global highp uint z, global highp int /*t0*/, global structure{ global 4-element array of highp int /*tn*/} samplers} structUniform}) +0:74 Constant: +0:74 3 (const uint) +0:74 Constant: +0:74 0 (const int) +0:74 direct index ( temp highp 4-component vector of float) +0:74 d: direct index for structure ( uniform 10-element array of highp 4-component vector of float) +0:74 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp 2-component vector of float b, uniform highp 2-component vector of float c, uniform 10-element array of highp 4-component vector of float d, uniform structure{ global highp 2-component vector of float x, global highp float y, global highp uint z, global highp int /*t0*/, global structure{ global 4-element array of highp int /*tn*/} samplers} structUniform}) +0:74 Constant: +0:74 3 (const uint) +0:74 Constant: +0:74 1 (const int) +0:74 direct index ( temp highp 4-component vector of float) +0:74 d: direct index for structure ( uniform 10-element array of highp 4-component vector of float) +0:74 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp 2-component vector of float b, uniform highp 2-component vector of float c, uniform 10-element array of highp 4-component vector of float d, uniform structure{ global highp 2-component vector of float x, global highp float y, global highp uint z, global highp int /*t0*/, global structure{ global 4-element array of highp int /*tn*/} samplers} structUniform}) +0:74 Constant: +0:74 3 (const uint) +0:74 Constant: +0:74 2 (const int) +0:74 k: direct index for structure (layout( column_major std140) uniform highp 4-component vector of float) +0:74 'anon@1' (layout( column_major std140) uniform block{layout( column_major std140) uniform highp float j, layout( column_major std140) uniform highp 4-component vector of float k}) +0:74 Constant: +0:74 1 (const uint) +0:74 k: direct index for structure (layout( column_major std430) buffer highp 4-component vector of float) +0:74 'bufferInstance' (layout( column_major std430) buffer block{layout( column_major std430) buffer highp float j, layout( column_major std430) buffer highp 4-component vector of float k}) +0:74 Constant: +0:74 1 (const int) +0:74 texture ( global highp 4-component vector of float) +0:74 't1' ( uniform highp sampler2D) +0:74 Constant: +0:74 0.000000 +0:74 0.000000 +0:74 texture ( global highp 4-component vector of float) +0:74 'structUniform.t0' ( uniform highp sampler2D) +0:74 Constant: +0:74 0.000000 +0:74 0.000000 +0:75 Branch: Return with expression +0:75 component-wise multiply ( temp highp 4-component vector of float) +0:75 component-wise multiply ( temp highp 4-component vector of float) +0:75 Construct vec4 ( temp highp 4-component vector of float) +0:75 'f' ( temp highp float) +0:75 Construct vec4 ( temp highp 4-component vector of float) +0:75 'v2' ( temp highp 2-component vector of float) +0:75 Constant: +0:75 1.000000 +0:75 Constant: +0:75 1.000000 +0:75 'v4' ( temp highp 4-component vector of float) +0:78 Function Definition: baz(struct-SamplerArray-s21[4]1;s21;s21;s21;s21; ( global highp 4-component vector of float) +0:78 Function Parameters: +0:78 'samplers' ( in structure{ global 4-element array of highp int /*tn*/}) +0:78 'samplers.tn[0]' ( in highp sampler2D) +0:78 'samplers.tn[1]' ( in highp sampler2D) +0:78 'samplers.tn[2]' ( in highp sampler2D) +0:78 'samplers.tn[3]' ( in highp sampler2D) +0:79 Sequence +0:79 Branch: Return with expression +0:79 add ( temp highp 4-component vector of float) +0:79 add ( temp highp 4-component vector of float) +0:79 add ( temp highp 4-component vector of float) +0:79 texture ( global highp 4-component vector of float) +0:79 'samplers.tn[0]' ( in highp sampler2D) +0:79 Constant: +0:79 0.000000 +0:79 0.000000 +0:79 texture ( global highp 4-component vector of float) +0:79 'samplers.tn[1]' ( in highp sampler2D) +0:79 Constant: +0:79 0.000000 +0:79 0.000000 +0:79 texture ( global highp 4-component vector of float) +0:79 'samplers.tn[2]' ( in highp sampler2D) +0:79 Constant: +0:79 0.000000 +0:79 0.000000 +0:79 texture ( global highp 4-component vector of float) +0:79 'samplers.tn[3]' ( in highp sampler2D) +0:79 Constant: +0:79 0.000000 +0:79 0.000000 +0:82 Function Definition: main( ( global void) +0:82 Function Parameters: +0:83 Sequence +0:83 Sequence +0:83 move second child to first child ( temp highp float) +0:83 'j' ( temp highp float) +0:83 Convert uint to float ( temp highp float) +0:83 Function Call: bar( ( global highp uint) +0:84 move second child to first child ( temp highp 4-component vector of float) +0:84 'o' ( out highp 4-component vector of float) +0:84 add ( temp highp 4-component vector of float) +0:84 vector-scale ( temp highp 4-component vector of float) +0:84 'j' ( temp highp float) +0:84 Function Call: foo( ( global highp 4-component vector of float) +0:84 Function Call: baz(struct-SamplerArray-s21[4]1;s21;s21;s21;s21; ( global highp 4-component vector of float) +0:84 samplers: direct index for structure ( global structure{ global 4-element array of highp int /*tn*/}) +0:84 structUniform: direct index for structure ( uniform structure{ global highp 2-component vector of float x, global highp float y, global highp uint z, global highp int /*t0*/, global structure{ global 4-element array of highp int /*tn*/} samplers}) +0:84 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp 2-component vector of float b, uniform highp 2-component vector of float c, uniform 10-element array of highp 4-component vector of float d, uniform structure{ global highp 2-component vector of float x, global highp float y, global highp uint z, global highp int /*t0*/, global structure{ global 4-element array of highp int /*tn*/} samplers} structUniform}) +0:84 Constant: +0:84 4 (const uint) +0:84 Constant: +0:84 4 (const int) +0:84 'structUniform.samplers.tn[0]' ( uniform highp sampler2D) +0:84 'structUniform.samplers.tn[1]' ( uniform highp sampler2D) +0:84 'structUniform.samplers.tn[2]' ( uniform highp sampler2D) +0:84 'structUniform.samplers.tn[3]' ( uniform highp sampler2D) 0:? Linker Objects 0:? 'o' ( out highp 4-component vector of float) -0:? 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp 2-component vector of float b, uniform highp 2-component vector of float c, uniform 10-element array of highp 4-component vector of float d, uniform structure{ global highp 2-component vector of float x, global highp float y, global highp uint z} structUniform}) +0:? 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp 2-component vector of float b, uniform highp 2-component vector of float c, uniform 10-element array of highp 4-component vector of float d, uniform structure{ global highp 2-component vector of float x, global highp float y, global highp uint z, global highp int /*t0*/, global structure{ global 4-element array of highp int /*tn*/} samplers} structUniform}) +0:? 'structUniform.t0' ( uniform highp sampler2D) +0:? 'structUniform.samplers.tn[0]' ( uniform highp sampler2D) +0:? 'structUniform.samplers.tn[1]' ( uniform highp sampler2D) +0:? 'structUniform.samplers.tn[2]' ( uniform highp sampler2D) +0:? 'structUniform.samplers.tn[3]' ( uniform highp sampler2D) 0:? 't1' ( uniform highp sampler2D) 0:? 'anon@1' (layout( column_major std140) uniform block{layout( column_major std140) uniform highp float j, layout( column_major std140) uniform highp 4-component vector of float k}) 0:? 'bufferInstance' (layout( column_major std430) buffer block{layout( column_major std430) buffer highp float j, layout( column_major std430) buffer highp 4-component vector of float k}) @@ -282,111 +338,71 @@ Linked fragment stage: Shader version: 460 gl_FragCoord origin is upper left 0:? Sequence -0:36 Function Definition: bar( ( global highp uint) -0:36 Function Parameters: -0:37 Sequence -0:37 Sequence -0:37 move second child to first child ( temp highp uint) -0:37 'j' ( temp highp uint) -0:37 Constant: -0:37 0 (const uint) -0:38 move second child to first child ( temp highp uint) -0:38 'j' ( temp highp uint) -0:38 AtomicAdd ( global highp uint) -0:38 counter1: direct index for structure ( coherent volatile buffer highp uint) -0:38 'anon@2' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1, coherent volatile buffer highp uint counter2}) -0:38 Constant: -0:38 0 (const uint) -0:38 Constant: -0:38 1 (const uint) -0:39 move second child to first child ( temp highp uint) -0:39 'j' ( temp highp uint) -0:39 subtract ( temp highp uint) -0:39 AtomicAdd ( global highp uint) -0:39 counter1: direct index for structure ( coherent volatile buffer highp uint) -0:39 'anon@2' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1, coherent volatile buffer highp uint counter2}) -0:39 Constant: -0:39 0 (const uint) -0:39 Constant: -0:39 4294967295 (const uint) -0:39 Constant: -0:39 1 (const uint) -0:40 move second child to first child ( temp highp uint) -0:40 'j' ( temp highp uint) -0:40 counter1: direct index for structure ( coherent volatile buffer highp uint) -0:40 'anon@2' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1, coherent volatile buffer highp uint counter2}) -0:40 Constant: -0:40 0 (const uint) -0:42 move second child to first child ( temp highp uint) -0:42 'j' ( temp highp uint) -0:42 AtomicAdd ( global highp uint) -0:42 counter1: direct index for structure ( coherent volatile buffer highp uint) -0:42 'anon@2' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1, coherent volatile buffer highp uint counter2}) -0:42 Constant: -0:42 0 (const uint) -0:42 Constant: -0:42 1 (const uint) -0:43 move second child to first child ( temp highp uint) -0:43 'j' ( temp highp uint) -0:43 AtomicAdd ( global highp uint) -0:43 counter1: direct index for structure ( coherent volatile buffer highp uint) -0:43 'anon@2' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1, coherent volatile buffer highp uint counter2}) -0:43 Constant: -0:43 0 (const uint) -0:43 Constant: -0:43 4294967295 (const uint) -0:44 move second child to first child ( temp highp uint) -0:44 'j' ( temp highp uint) -0:44 AtomicSubtract ( global highp uint) -0:44 counter1: direct index for structure ( coherent volatile buffer highp uint) -0:44 'anon@2' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1, coherent volatile buffer highp uint counter2}) -0:44 Constant: -0:44 0 (const uint) +0:43 Function Definition: bar( ( global highp uint) +0:43 Function Parameters: +0:44 Sequence +0:44 Sequence +0:44 move second child to first child ( temp highp uint) +0:44 'j' ( temp highp uint) 0:44 Constant: -0:44 1 (const uint) +0:44 0 (const uint) +0:45 move second child to first child ( temp highp uint) +0:45 'j' ( temp highp uint) +0:45 AtomicAdd ( global highp uint) +0:45 counter1: direct index for structure ( coherent volatile buffer highp uint) +0:45 'anon@2' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1, coherent volatile buffer highp uint counter2}) +0:45 Constant: +0:45 0 (const uint) +0:45 Constant: +0:45 1 (const uint) 0:46 move second child to first child ( temp highp uint) 0:46 'j' ( temp highp uint) -0:46 AtomicMin ( global highp uint) -0:46 counter1: direct index for structure ( coherent volatile buffer highp uint) -0:46 'anon@2' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1, coherent volatile buffer highp uint counter2}) +0:46 subtract ( temp highp uint) +0:46 AtomicAdd ( global highp uint) +0:46 counter1: direct index for structure ( coherent volatile buffer highp uint) +0:46 'anon@2' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1, coherent volatile buffer highp uint counter2}) +0:46 Constant: +0:46 0 (const uint) 0:46 Constant: -0:46 0 (const uint) -0:46 'j' ( temp highp uint) +0:46 4294967295 (const uint) +0:46 Constant: +0:46 1 (const uint) 0:47 move second child to first child ( temp highp uint) 0:47 'j' ( temp highp uint) -0:47 AtomicMax ( global highp uint) -0:47 counter1: direct index for structure ( coherent volatile buffer highp uint) -0:47 'anon@2' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1, coherent volatile buffer highp uint counter2}) -0:47 Constant: -0:47 0 (const uint) -0:47 'j' ( temp highp uint) -0:48 move second child to first child ( temp highp uint) -0:48 'j' ( temp highp uint) -0:48 AtomicAnd ( global highp uint) -0:48 counter1: direct index for structure ( coherent volatile buffer highp uint) -0:48 'anon@2' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1, coherent volatile buffer highp uint counter2}) -0:48 Constant: -0:48 0 (const uint) -0:48 'j' ( temp highp uint) +0:47 counter1: direct index for structure ( coherent volatile buffer highp uint) +0:47 'anon@2' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1, coherent volatile buffer highp uint counter2}) +0:47 Constant: +0:47 0 (const uint) +0:49 move second child to first child ( temp highp uint) +0:49 'j' ( temp highp uint) +0:49 AtomicAdd ( global highp uint) +0:49 counter1: direct index for structure ( coherent volatile buffer highp uint) +0:49 'anon@2' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1, coherent volatile buffer highp uint counter2}) +0:49 Constant: +0:49 0 (const uint) +0:49 Constant: +0:49 1 (const uint) 0:50 move second child to first child ( temp highp uint) 0:50 'j' ( temp highp uint) -0:50 AtomicOr ( global highp uint) +0:50 AtomicAdd ( global highp uint) 0:50 counter1: direct index for structure ( coherent volatile buffer highp uint) 0:50 'anon@2' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1, coherent volatile buffer highp uint counter2}) 0:50 Constant: 0:50 0 (const uint) -0:50 'j' ( temp highp uint) +0:50 Constant: +0:50 4294967295 (const uint) 0:51 move second child to first child ( temp highp uint) 0:51 'j' ( temp highp uint) -0:51 AtomicXor ( global highp uint) +0:51 AtomicSubtract ( global highp uint) 0:51 counter1: direct index for structure ( coherent volatile buffer highp uint) 0:51 'anon@2' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1, coherent volatile buffer highp uint counter2}) 0:51 Constant: 0:51 0 (const uint) -0:51 'j' ( temp highp uint) +0:51 Constant: +0:51 1 (const uint) 0:53 move second child to first child ( temp highp uint) 0:53 'j' ( temp highp uint) -0:53 AtomicExchange ( global highp uint) +0:53 AtomicMin ( global highp uint) 0:53 counter1: direct index for structure ( coherent volatile buffer highp uint) 0:53 'anon@2' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1, coherent volatile buffer highp uint counter2}) 0:53 Constant: @@ -394,158 +410,254 @@ gl_FragCoord origin is upper left 0:53 'j' ( temp highp uint) 0:54 move second child to first child ( temp highp uint) 0:54 'j' ( temp highp uint) -0:54 AtomicCompSwap ( global highp uint) +0:54 AtomicMax ( global highp uint) 0:54 counter1: direct index for structure ( coherent volatile buffer highp uint) 0:54 'anon@2' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1, coherent volatile buffer highp uint counter2}) 0:54 Constant: 0:54 0 (const uint) -0:54 Constant: -0:54 0 (const uint) 0:54 'j' ( temp highp uint) -0:56 AtomicAdd ( global highp uint) -0:56 counter2: direct index for structure ( coherent volatile buffer highp uint) -0:56 'anon@2' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1, coherent volatile buffer highp uint counter2}) -0:56 Constant: -0:56 1 (const uint) -0:56 Constant: -0:56 1 (const uint) -0:57 AtomicAdd ( global highp uint) -0:57 counter3: direct index for structure ( coherent volatile buffer highp uint) -0:57 'anon@3' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter3}) -0:57 Constant: -0:57 0 (const uint) -0:57 Constant: -0:57 1 (const uint) -0:59 MemoryBarrierBuffer ( global void) -0:61 Branch: Return with expression +0:55 move second child to first child ( temp highp uint) +0:55 'j' ( temp highp uint) +0:55 AtomicAnd ( global highp uint) +0:55 counter1: direct index for structure ( coherent volatile buffer highp uint) +0:55 'anon@2' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1, coherent volatile buffer highp uint counter2}) +0:55 Constant: +0:55 0 (const uint) +0:55 'j' ( temp highp uint) +0:57 move second child to first child ( temp highp uint) +0:57 'j' ( temp highp uint) +0:57 AtomicOr ( global highp uint) +0:57 counter1: direct index for structure ( coherent volatile buffer highp uint) +0:57 'anon@2' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1, coherent volatile buffer highp uint counter2}) +0:57 Constant: +0:57 0 (const uint) +0:57 'j' ( temp highp uint) +0:58 move second child to first child ( temp highp uint) +0:58 'j' ( temp highp uint) +0:58 AtomicXor ( global highp uint) +0:58 counter1: direct index for structure ( coherent volatile buffer highp uint) +0:58 'anon@2' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1, coherent volatile buffer highp uint counter2}) +0:58 Constant: +0:58 0 (const uint) +0:58 'j' ( temp highp uint) +0:60 move second child to first child ( temp highp uint) +0:60 'j' ( temp highp uint) +0:60 AtomicExchange ( global highp uint) +0:60 counter1: direct index for structure ( coherent volatile buffer highp uint) +0:60 'anon@2' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1, coherent volatile buffer highp uint counter2}) +0:60 Constant: +0:60 0 (const uint) +0:60 'j' ( temp highp uint) +0:61 move second child to first child ( temp highp uint) 0:61 'j' ( temp highp uint) -0:64 Function Definition: foo( ( global highp 4-component vector of float) -0:64 Function Parameters: -0:65 Sequence -0:65 Sequence -0:65 move second child to first child ( temp highp float) -0:65 'f' ( temp highp float) -0:65 add ( temp highp float) -0:65 add ( temp highp float) -0:65 add ( temp highp float) -0:65 j: direct index for structure (layout( column_major std140) uniform highp float) -0:65 'anon@1' (layout( column_major std140) uniform block{layout( column_major std140) uniform highp float j, layout( column_major std140) uniform highp 4-component vector of float k}) -0:65 Constant: -0:65 0 (const uint) -0:65 j: direct index for structure (layout( column_major std430) buffer highp float) -0:65 'bufferInstance' (layout( column_major std430) buffer block{layout( column_major std430) buffer highp float j, layout( column_major std430) buffer highp 4-component vector of float k}) -0:65 Constant: -0:65 0 (const int) -0:65 y: direct index for structure ( global highp float) -0:65 structUniform: direct index for structure ( uniform structure{ global highp 2-component vector of float x, global highp float y, global highp uint z}) -0:65 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp 2-component vector of float b, uniform highp 2-component vector of float c, uniform 10-element array of highp 4-component vector of float d, uniform structure{ global highp 2-component vector of float x, global highp float y, global highp uint z} structUniform}) -0:65 Constant: -0:65 4 (const uint) -0:65 Constant: -0:65 1 (const int) -0:65 Convert uint to float ( temp highp float) -0:65 z: direct index for structure ( global highp uint) -0:65 structUniform: direct index for structure ( uniform structure{ global highp 2-component vector of float x, global highp float y, global highp uint z}) -0:65 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp 2-component vector of float b, uniform highp 2-component vector of float c, uniform 10-element array of highp 4-component vector of float d, uniform structure{ global highp 2-component vector of float x, global highp float y, global highp uint z} structUniform}) -0:65 Constant: -0:65 4 (const uint) -0:65 Constant: -0:65 2 (const int) -0:66 Sequence -0:66 move second child to first child ( temp highp 2-component vector of float) -0:66 'v2' ( temp highp 2-component vector of float) -0:66 add ( temp highp 2-component vector of float) -0:66 add ( temp highp 2-component vector of float) -0:66 b: direct index for structure ( uniform highp 2-component vector of float) -0:66 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp 2-component vector of float b, uniform highp 2-component vector of float c, uniform 10-element array of highp 4-component vector of float d, uniform structure{ global highp 2-component vector of float x, global highp float y, global highp uint z} structUniform}) -0:66 Constant: -0:66 1 (const uint) -0:66 c: direct index for structure ( uniform highp 2-component vector of float) -0:66 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp 2-component vector of float b, uniform highp 2-component vector of float c, uniform 10-element array of highp 4-component vector of float d, uniform structure{ global highp 2-component vector of float x, global highp float y, global highp uint z} structUniform}) -0:66 Constant: -0:66 2 (const uint) -0:66 x: direct index for structure ( global highp 2-component vector of float) -0:66 structUniform: direct index for structure ( uniform structure{ global highp 2-component vector of float x, global highp float y, global highp uint z}) -0:66 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp 2-component vector of float b, uniform highp 2-component vector of float c, uniform 10-element array of highp 4-component vector of float d, uniform structure{ global highp 2-component vector of float x, global highp float y, global highp uint z} structUniform}) -0:66 Constant: -0:66 4 (const uint) -0:66 Constant: -0:66 0 (const int) -0:67 Sequence -0:67 move second child to first child ( temp highp 4-component vector of float) -0:67 'v4' ( temp highp 4-component vector of float) -0:67 add ( temp highp 4-component vector of float) -0:67 add ( temp highp 4-component vector of float) -0:67 add ( temp highp 4-component vector of float) -0:67 add ( temp highp 4-component vector of float) -0:67 add ( temp highp 4-component vector of float) -0:67 add ( temp highp 4-component vector of float) -0:67 a: direct index for structure ( uniform highp 4-component vector of float) -0:67 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp 2-component vector of float b, uniform highp 2-component vector of float c, uniform 10-element array of highp 4-component vector of float d, uniform structure{ global highp 2-component vector of float x, global highp float y, global highp uint z} structUniform}) -0:67 Constant: -0:67 0 (const uint) -0:67 direct index ( temp highp 4-component vector of float) -0:67 d: direct index for structure ( uniform 10-element array of highp 4-component vector of float) -0:67 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp 2-component vector of float b, uniform highp 2-component vector of float c, uniform 10-element array of highp 4-component vector of float d, uniform structure{ global highp 2-component vector of float x, global highp float y, global highp uint z} structUniform}) -0:67 Constant: -0:67 3 (const uint) -0:67 Constant: -0:67 0 (const int) -0:67 direct index ( temp highp 4-component vector of float) -0:67 d: direct index for structure ( uniform 10-element array of highp 4-component vector of float) -0:67 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp 2-component vector of float b, uniform highp 2-component vector of float c, uniform 10-element array of highp 4-component vector of float d, uniform structure{ global highp 2-component vector of float x, global highp float y, global highp uint z} structUniform}) -0:67 Constant: -0:67 3 (const uint) -0:67 Constant: -0:67 1 (const int) -0:67 direct index ( temp highp 4-component vector of float) -0:67 d: direct index for structure ( uniform 10-element array of highp 4-component vector of float) -0:67 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp 2-component vector of float b, uniform highp 2-component vector of float c, uniform 10-element array of highp 4-component vector of float d, uniform structure{ global highp 2-component vector of float x, global highp float y, global highp uint z} structUniform}) -0:67 Constant: -0:67 3 (const uint) -0:67 Constant: -0:67 2 (const int) -0:67 k: direct index for structure (layout( column_major std140) uniform highp 4-component vector of float) -0:67 'anon@1' (layout( column_major std140) uniform block{layout( column_major std140) uniform highp float j, layout( column_major std140) uniform highp 4-component vector of float k}) -0:67 Constant: -0:67 1 (const uint) -0:67 k: direct index for structure (layout( column_major std430) buffer highp 4-component vector of float) -0:67 'bufferInstance' (layout( column_major std430) buffer block{layout( column_major std430) buffer highp float j, layout( column_major std430) buffer highp 4-component vector of float k}) -0:67 Constant: -0:67 1 (const int) -0:67 texture ( global highp 4-component vector of float) -0:67 't1' ( uniform highp sampler2D) -0:67 Constant: -0:67 0.000000 -0:67 0.000000 +0:61 AtomicCompSwap ( global highp uint) +0:61 counter1: direct index for structure ( coherent volatile buffer highp uint) +0:61 'anon@2' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1, coherent volatile buffer highp uint counter2}) +0:61 Constant: +0:61 0 (const uint) +0:61 Constant: +0:61 0 (const uint) +0:61 'j' ( temp highp uint) +0:63 AtomicAdd ( global highp uint) +0:63 counter2: direct index for structure ( coherent volatile buffer highp uint) +0:63 'anon@2' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1, coherent volatile buffer highp uint counter2}) +0:63 Constant: +0:63 1 (const uint) +0:63 Constant: +0:63 1 (const uint) +0:64 AtomicAdd ( global highp uint) +0:64 counter3: direct index for structure ( coherent volatile buffer highp uint) +0:64 'anon@3' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter3}) +0:64 Constant: +0:64 0 (const uint) +0:64 Constant: +0:64 1 (const uint) +0:66 MemoryBarrierBuffer ( global void) 0:68 Branch: Return with expression -0:68 component-wise multiply ( temp highp 4-component vector of float) -0:68 component-wise multiply ( temp highp 4-component vector of float) -0:68 Construct vec4 ( temp highp 4-component vector of float) -0:68 'f' ( temp highp float) -0:68 Construct vec4 ( temp highp 4-component vector of float) -0:68 'v2' ( temp highp 2-component vector of float) -0:68 Constant: -0:68 1.000000 -0:68 Constant: -0:68 1.000000 -0:68 'v4' ( temp highp 4-component vector of float) -0:71 Function Definition: main( ( global void) +0:68 'j' ( temp highp uint) +0:71 Function Definition: foo( ( global highp 4-component vector of float) 0:71 Function Parameters: 0:72 Sequence 0:72 Sequence 0:72 move second child to first child ( temp highp float) -0:72 'j' ( temp highp float) -0:72 Convert uint to float ( temp highp float) -0:72 Function Call: bar( ( global highp uint) -0:73 move second child to first child ( temp highp 4-component vector of float) -0:73 'o' ( out highp 4-component vector of float) -0:73 vector-scale ( temp highp 4-component vector of float) -0:73 'j' ( temp highp float) -0:73 Function Call: foo( ( global highp 4-component vector of float) +0:72 'f' ( temp highp float) +0:72 add ( temp highp float) +0:72 add ( temp highp float) +0:72 add ( temp highp float) +0:72 j: direct index for structure (layout( column_major std140) uniform highp float) +0:72 'anon@1' (layout( column_major std140) uniform block{layout( column_major std140) uniform highp float j, layout( column_major std140) uniform highp 4-component vector of float k}) +0:72 Constant: +0:72 0 (const uint) +0:72 j: direct index for structure (layout( column_major std430) buffer highp float) +0:72 'bufferInstance' (layout( column_major std430) buffer block{layout( column_major std430) buffer highp float j, layout( column_major std430) buffer highp 4-component vector of float k}) +0:72 Constant: +0:72 0 (const int) +0:72 y: direct index for structure ( global highp float) +0:72 structUniform: direct index for structure ( uniform structure{ global highp 2-component vector of float x, global highp float y, global highp uint z, global highp int /*t0*/, global structure{ global 4-element array of highp int /*tn*/} samplers}) +0:72 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp 2-component vector of float b, uniform highp 2-component vector of float c, uniform 10-element array of highp 4-component vector of float d, uniform structure{ global highp 2-component vector of float x, global highp float y, global highp uint z, global highp int /*t0*/, global structure{ global 4-element array of highp int /*tn*/} samplers} structUniform}) +0:72 Constant: +0:72 4 (const uint) +0:72 Constant: +0:72 1 (const int) +0:72 Convert uint to float ( temp highp float) +0:72 z: direct index for structure ( global highp uint) +0:72 structUniform: direct index for structure ( uniform structure{ global highp 2-component vector of float x, global highp float y, global highp uint z, global highp int /*t0*/, global structure{ global 4-element array of highp int /*tn*/} samplers}) +0:72 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp 2-component vector of float b, uniform highp 2-component vector of float c, uniform 10-element array of highp 4-component vector of float d, uniform structure{ global highp 2-component vector of float x, global highp float y, global highp uint z, global highp int /*t0*/, global structure{ global 4-element array of highp int /*tn*/} samplers} structUniform}) +0:72 Constant: +0:72 4 (const uint) +0:72 Constant: +0:72 2 (const int) +0:73 Sequence +0:73 move second child to first child ( temp highp 2-component vector of float) +0:73 'v2' ( temp highp 2-component vector of float) +0:73 add ( temp highp 2-component vector of float) +0:73 add ( temp highp 2-component vector of float) +0:73 b: direct index for structure ( uniform highp 2-component vector of float) +0:73 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp 2-component vector of float b, uniform highp 2-component vector of float c, uniform 10-element array of highp 4-component vector of float d, uniform structure{ global highp 2-component vector of float x, global highp float y, global highp uint z, global highp int /*t0*/, global structure{ global 4-element array of highp int /*tn*/} samplers} structUniform}) +0:73 Constant: +0:73 1 (const uint) +0:73 c: direct index for structure ( uniform highp 2-component vector of float) +0:73 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp 2-component vector of float b, uniform highp 2-component vector of float c, uniform 10-element array of highp 4-component vector of float d, uniform structure{ global highp 2-component vector of float x, global highp float y, global highp uint z, global highp int /*t0*/, global structure{ global 4-element array of highp int /*tn*/} samplers} structUniform}) +0:73 Constant: +0:73 2 (const uint) +0:73 x: direct index for structure ( global highp 2-component vector of float) +0:73 structUniform: direct index for structure ( uniform structure{ global highp 2-component vector of float x, global highp float y, global highp uint z, global highp int /*t0*/, global structure{ global 4-element array of highp int /*tn*/} samplers}) +0:73 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp 2-component vector of float b, uniform highp 2-component vector of float c, uniform 10-element array of highp 4-component vector of float d, uniform structure{ global highp 2-component vector of float x, global highp float y, global highp uint z, global highp int /*t0*/, global structure{ global 4-element array of highp int /*tn*/} samplers} structUniform}) +0:73 Constant: +0:73 4 (const uint) +0:73 Constant: +0:73 0 (const int) +0:74 Sequence +0:74 move second child to first child ( temp highp 4-component vector of float) +0:74 'v4' ( temp highp 4-component vector of float) +0:74 add ( temp highp 4-component vector of float) +0:74 add ( temp highp 4-component vector of float) +0:74 add ( temp highp 4-component vector of float) +0:74 add ( temp highp 4-component vector of float) +0:74 add ( temp highp 4-component vector of float) +0:74 add ( temp highp 4-component vector of float) +0:74 add ( temp highp 4-component vector of float) +0:74 a: direct index for structure ( uniform highp 4-component vector of float) +0:74 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp 2-component vector of float b, uniform highp 2-component vector of float c, uniform 10-element array of highp 4-component vector of float d, uniform structure{ global highp 2-component vector of float x, global highp float y, global highp uint z, global highp int /*t0*/, global structure{ global 4-element array of highp int /*tn*/} samplers} structUniform}) +0:74 Constant: +0:74 0 (const uint) +0:74 direct index ( temp highp 4-component vector of float) +0:74 d: direct index for structure ( uniform 10-element array of highp 4-component vector of float) +0:74 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp 2-component vector of float b, uniform highp 2-component vector of float c, uniform 10-element array of highp 4-component vector of float d, uniform structure{ global highp 2-component vector of float x, global highp float y, global highp uint z, global highp int /*t0*/, global structure{ global 4-element array of highp int /*tn*/} samplers} structUniform}) +0:74 Constant: +0:74 3 (const uint) +0:74 Constant: +0:74 0 (const int) +0:74 direct index ( temp highp 4-component vector of float) +0:74 d: direct index for structure ( uniform 10-element array of highp 4-component vector of float) +0:74 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp 2-component vector of float b, uniform highp 2-component vector of float c, uniform 10-element array of highp 4-component vector of float d, uniform structure{ global highp 2-component vector of float x, global highp float y, global highp uint z, global highp int /*t0*/, global structure{ global 4-element array of highp int /*tn*/} samplers} structUniform}) +0:74 Constant: +0:74 3 (const uint) +0:74 Constant: +0:74 1 (const int) +0:74 direct index ( temp highp 4-component vector of float) +0:74 d: direct index for structure ( uniform 10-element array of highp 4-component vector of float) +0:74 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp 2-component vector of float b, uniform highp 2-component vector of float c, uniform 10-element array of highp 4-component vector of float d, uniform structure{ global highp 2-component vector of float x, global highp float y, global highp uint z, global highp int /*t0*/, global structure{ global 4-element array of highp int /*tn*/} samplers} structUniform}) +0:74 Constant: +0:74 3 (const uint) +0:74 Constant: +0:74 2 (const int) +0:74 k: direct index for structure (layout( column_major std140) uniform highp 4-component vector of float) +0:74 'anon@1' (layout( column_major std140) uniform block{layout( column_major std140) uniform highp float j, layout( column_major std140) uniform highp 4-component vector of float k}) +0:74 Constant: +0:74 1 (const uint) +0:74 k: direct index for structure (layout( column_major std430) buffer highp 4-component vector of float) +0:74 'bufferInstance' (layout( column_major std430) buffer block{layout( column_major std430) buffer highp float j, layout( column_major std430) buffer highp 4-component vector of float k}) +0:74 Constant: +0:74 1 (const int) +0:74 texture ( global highp 4-component vector of float) +0:74 't1' ( uniform highp sampler2D) +0:74 Constant: +0:74 0.000000 +0:74 0.000000 +0:74 texture ( global highp 4-component vector of float) +0:74 'structUniform.t0' ( uniform highp sampler2D) +0:74 Constant: +0:74 0.000000 +0:74 0.000000 +0:75 Branch: Return with expression +0:75 component-wise multiply ( temp highp 4-component vector of float) +0:75 component-wise multiply ( temp highp 4-component vector of float) +0:75 Construct vec4 ( temp highp 4-component vector of float) +0:75 'f' ( temp highp float) +0:75 Construct vec4 ( temp highp 4-component vector of float) +0:75 'v2' ( temp highp 2-component vector of float) +0:75 Constant: +0:75 1.000000 +0:75 Constant: +0:75 1.000000 +0:75 'v4' ( temp highp 4-component vector of float) +0:78 Function Definition: baz(struct-SamplerArray-s21[4]1;s21;s21;s21;s21; ( global highp 4-component vector of float) +0:78 Function Parameters: +0:78 'samplers' ( in structure{ global 4-element array of highp int /*tn*/}) +0:78 'samplers.tn[0]' ( in highp sampler2D) +0:78 'samplers.tn[1]' ( in highp sampler2D) +0:78 'samplers.tn[2]' ( in highp sampler2D) +0:78 'samplers.tn[3]' ( in highp sampler2D) +0:79 Sequence +0:79 Branch: Return with expression +0:79 add ( temp highp 4-component vector of float) +0:79 add ( temp highp 4-component vector of float) +0:79 add ( temp highp 4-component vector of float) +0:79 texture ( global highp 4-component vector of float) +0:79 'samplers.tn[0]' ( in highp sampler2D) +0:79 Constant: +0:79 0.000000 +0:79 0.000000 +0:79 texture ( global highp 4-component vector of float) +0:79 'samplers.tn[1]' ( in highp sampler2D) +0:79 Constant: +0:79 0.000000 +0:79 0.000000 +0:79 texture ( global highp 4-component vector of float) +0:79 'samplers.tn[2]' ( in highp sampler2D) +0:79 Constant: +0:79 0.000000 +0:79 0.000000 +0:79 texture ( global highp 4-component vector of float) +0:79 'samplers.tn[3]' ( in highp sampler2D) +0:79 Constant: +0:79 0.000000 +0:79 0.000000 +0:82 Function Definition: main( ( global void) +0:82 Function Parameters: +0:83 Sequence +0:83 Sequence +0:83 move second child to first child ( temp highp float) +0:83 'j' ( temp highp float) +0:83 Convert uint to float ( temp highp float) +0:83 Function Call: bar( ( global highp uint) +0:84 move second child to first child ( temp highp 4-component vector of float) +0:84 'o' ( out highp 4-component vector of float) +0:84 add ( temp highp 4-component vector of float) +0:84 vector-scale ( temp highp 4-component vector of float) +0:84 'j' ( temp highp float) +0:84 Function Call: foo( ( global highp 4-component vector of float) +0:84 Function Call: baz(struct-SamplerArray-s21[4]1;s21;s21;s21;s21; ( global highp 4-component vector of float) +0:84 samplers: direct index for structure ( global structure{ global 4-element array of highp int /*tn*/}) +0:84 structUniform: direct index for structure ( uniform structure{ global highp 2-component vector of float x, global highp float y, global highp uint z, global highp int /*t0*/, global structure{ global 4-element array of highp int /*tn*/} samplers}) +0:84 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp 2-component vector of float b, uniform highp 2-component vector of float c, uniform 10-element array of highp 4-component vector of float d, uniform structure{ global highp 2-component vector of float x, global highp float y, global highp uint z, global highp int /*t0*/, global structure{ global 4-element array of highp int /*tn*/} samplers} structUniform}) +0:84 Constant: +0:84 4 (const uint) +0:84 Constant: +0:84 4 (const int) +0:84 'structUniform.samplers.tn[0]' ( uniform highp sampler2D) +0:84 'structUniform.samplers.tn[1]' ( uniform highp sampler2D) +0:84 'structUniform.samplers.tn[2]' ( uniform highp sampler2D) +0:84 'structUniform.samplers.tn[3]' ( uniform highp sampler2D) 0:? Linker Objects 0:? 'o' ( out highp 4-component vector of float) -0:? 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp 2-component vector of float b, uniform highp 2-component vector of float c, uniform 10-element array of highp 4-component vector of float d, uniform structure{ global highp 2-component vector of float x, global highp float y, global highp uint z} structUniform}) +0:? 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp 2-component vector of float b, uniform highp 2-component vector of float c, uniform 10-element array of highp 4-component vector of float d, uniform structure{ global highp 2-component vector of float x, global highp float y, global highp uint z, global highp int /*t0*/, global structure{ global 4-element array of highp int /*tn*/} samplers} structUniform}) +0:? 'structUniform.t0' ( uniform highp sampler2D) +0:? 'structUniform.samplers.tn[0]' ( uniform highp sampler2D) +0:? 'structUniform.samplers.tn[1]' ( uniform highp sampler2D) +0:? 'structUniform.samplers.tn[2]' ( uniform highp sampler2D) +0:? 'structUniform.samplers.tn[3]' ( uniform highp sampler2D) 0:? 't1' ( uniform highp sampler2D) 0:? 'anon@1' (layout( column_major std140) uniform block{layout( column_major std140) uniform highp float j, layout( column_major std140) uniform highp 4-component vector of float k}) 0:? 'bufferInstance' (layout( column_major std430) buffer block{layout( column_major std430) buffer highp float j, layout( column_major std430) buffer highp 4-component vector of float k}) @@ -554,93 +666,125 @@ gl_FragCoord origin is upper left // Module Version 10000 // Generated by (magic number): 8000b -// Id's are bound by 163 +// Id's are bound by 216 Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Fragment 4 "main" 159 + EntryPoint Fragment 4 "main" 190 ExecutionMode 4 OriginUpperLeft Source GLSL 460 Name 4 "main" Name 8 "bar(" Name 13 "foo(" - Name 16 "j" - Name 18 "gl_AtomicCounterBlock_0" - MemberName 18(gl_AtomicCounterBlock_0) 0 "counter1" - MemberName 18(gl_AtomicCounterBlock_0) 1 "counter2" - Name 20 "" - Name 63 "gl_AtomicCounterBlock_1" - MemberName 63(gl_AtomicCounterBlock_1) 0 "counter3" - Name 65 "" - Name 73 "f" - Name 74 "UniformBlock" - MemberName 74(UniformBlock) 0 "j" - MemberName 74(UniformBlock) 1 "k" - Name 76 "" - Name 80 "BufferBlock" - MemberName 80(BufferBlock) 0 "j" - MemberName 80(BufferBlock) 1 "k" - Name 82 "bufferInstance" - Name 89 "e" - MemberName 89(e) 0 "x" - MemberName 89(e) 1 "y" - MemberName 89(e) 2 "z" - Name 90 "gl_DefaultUniformBlock" - MemberName 90(gl_DefaultUniformBlock) 0 "a" - MemberName 90(gl_DefaultUniformBlock) 1 "b" - MemberName 90(gl_DefaultUniformBlock) 2 "c" - MemberName 90(gl_DefaultUniformBlock) 3 "d" - MemberName 90(gl_DefaultUniformBlock) 4 "structUniform" - Name 92 "" - Name 103 "v2" - Name 114 "v4" - Name 137 "t1" - Name 155 "j" - Name 159 "o" - MemberDecorate 18(gl_AtomicCounterBlock_0) 0 Coherent - MemberDecorate 18(gl_AtomicCounterBlock_0) 0 Volatile - MemberDecorate 18(gl_AtomicCounterBlock_0) 0 Coherent - MemberDecorate 18(gl_AtomicCounterBlock_0) 0 Offset 0 - MemberDecorate 18(gl_AtomicCounterBlock_0) 1 Coherent - MemberDecorate 18(gl_AtomicCounterBlock_0) 1 Volatile - MemberDecorate 18(gl_AtomicCounterBlock_0) 1 Coherent - MemberDecorate 18(gl_AtomicCounterBlock_0) 1 Offset 4 - Decorate 18(gl_AtomicCounterBlock_0) BufferBlock - Decorate 20 DescriptorSet 0 - Decorate 20 Binding 4 - MemberDecorate 63(gl_AtomicCounterBlock_1) 0 Coherent - MemberDecorate 63(gl_AtomicCounterBlock_1) 0 Volatile - MemberDecorate 63(gl_AtomicCounterBlock_1) 0 Coherent - MemberDecorate 63(gl_AtomicCounterBlock_1) 0 Offset 0 - Decorate 63(gl_AtomicCounterBlock_1) BufferBlock - Decorate 65 DescriptorSet 0 - Decorate 65 Binding 5 - MemberDecorate 74(UniformBlock) 0 Offset 0 - MemberDecorate 74(UniformBlock) 1 Offset 16 - Decorate 74(UniformBlock) Block - Decorate 76 DescriptorSet 0 - Decorate 76 Binding 2 - MemberDecorate 80(BufferBlock) 0 Offset 0 - MemberDecorate 80(BufferBlock) 1 Offset 16 - Decorate 80(BufferBlock) BufferBlock - Decorate 82(bufferInstance) DescriptorSet 0 - Decorate 82(bufferInstance) Binding 3 - Decorate 88 ArrayStride 16 - MemberDecorate 89(e) 0 Offset 0 - MemberDecorate 89(e) 1 Offset 8 - MemberDecorate 89(e) 2 Offset 12 - MemberDecorate 90(gl_DefaultUniformBlock) 0 Offset 0 - MemberDecorate 90(gl_DefaultUniformBlock) 1 Offset 16 - MemberDecorate 90(gl_DefaultUniformBlock) 2 Offset 24 - MemberDecorate 90(gl_DefaultUniformBlock) 3 Offset 32 - MemberDecorate 90(gl_DefaultUniformBlock) 4 Offset 192 - Decorate 90(gl_DefaultUniformBlock) Block - Decorate 92 DescriptorSet 0 - Decorate 92 Binding 0 - Decorate 137(t1) DescriptorSet 0 - Decorate 137(t1) Binding 1 - Decorate 159(o) Location 0 + Name 18 "SamplerArray" + MemberName 18(SamplerArray) 0 "/*tn*/" + Name 29 "baz(struct-SamplerArray-s21[4]1;s21;s21;s21;s21;" + Name 24 "samplers" + Name 25 "samplers.tn[0]" + Name 26 "samplers.tn[1]" + Name 27 "samplers.tn[2]" + Name 28 "samplers.tn[3]" + Name 32 "j" + Name 34 "gl_AtomicCounterBlock_0" + MemberName 34(gl_AtomicCounterBlock_0) 0 "counter1" + MemberName 34(gl_AtomicCounterBlock_0) 1 "counter2" + Name 36 "" + Name 78 "gl_AtomicCounterBlock_1" + MemberName 78(gl_AtomicCounterBlock_1) 0 "counter3" + Name 80 "" + Name 88 "f" + Name 89 "UniformBlock" + MemberName 89(UniformBlock) 0 "j" + MemberName 89(UniformBlock) 1 "k" + Name 91 "" + Name 95 "BufferBlock" + MemberName 95(BufferBlock) 0 "j" + MemberName 95(BufferBlock) 1 "k" + Name 97 "bufferInstance" + Name 105 "SamplerArray" + MemberName 105(SamplerArray) 0 "/*tn*/" + Name 106 "e" + MemberName 106(e) 0 "x" + MemberName 106(e) 1 "y" + MemberName 106(e) 2 "z" + MemberName 106(e) 3 "/*t0*/" + MemberName 106(e) 4 "samplers" + Name 107 "gl_DefaultUniformBlock" + MemberName 107(gl_DefaultUniformBlock) 0 "a" + MemberName 107(gl_DefaultUniformBlock) 1 "b" + MemberName 107(gl_DefaultUniformBlock) 2 "c" + MemberName 107(gl_DefaultUniformBlock) 3 "d" + MemberName 107(gl_DefaultUniformBlock) 4 "structUniform" + Name 109 "" + Name 120 "v2" + Name 131 "v4" + Name 151 "t1" + Name 157 "structUniform.t0" + Name 186 "j" + Name 190 "o" + Name 194 "structUniform.samplers.tn[0]" + Name 195 "structUniform.samplers.tn[1]" + Name 196 "structUniform.samplers.tn[2]" + Name 197 "structUniform.samplers.tn[3]" + Name 198 "param" + MemberDecorate 34(gl_AtomicCounterBlock_0) 0 Coherent + MemberDecorate 34(gl_AtomicCounterBlock_0) 0 Volatile + MemberDecorate 34(gl_AtomicCounterBlock_0) 0 Coherent + MemberDecorate 34(gl_AtomicCounterBlock_0) 0 Offset 0 + MemberDecorate 34(gl_AtomicCounterBlock_0) 1 Coherent + MemberDecorate 34(gl_AtomicCounterBlock_0) 1 Volatile + MemberDecorate 34(gl_AtomicCounterBlock_0) 1 Coherent + MemberDecorate 34(gl_AtomicCounterBlock_0) 1 Offset 4 + Decorate 34(gl_AtomicCounterBlock_0) BufferBlock + Decorate 36 DescriptorSet 0 + Decorate 36 Binding 9 + MemberDecorate 78(gl_AtomicCounterBlock_1) 0 Coherent + MemberDecorate 78(gl_AtomicCounterBlock_1) 0 Volatile + MemberDecorate 78(gl_AtomicCounterBlock_1) 0 Coherent + MemberDecorate 78(gl_AtomicCounterBlock_1) 0 Offset 0 + Decorate 78(gl_AtomicCounterBlock_1) BufferBlock + Decorate 80 DescriptorSet 0 + Decorate 80 Binding 10 + MemberDecorate 89(UniformBlock) 0 Offset 0 + MemberDecorate 89(UniformBlock) 1 Offset 16 + Decorate 89(UniformBlock) Block + Decorate 91 DescriptorSet 0 + Decorate 91 Binding 7 + MemberDecorate 95(BufferBlock) 0 Offset 0 + MemberDecorate 95(BufferBlock) 1 Offset 16 + Decorate 95(BufferBlock) BufferBlock + Decorate 97(bufferInstance) DescriptorSet 0 + Decorate 97(bufferInstance) Binding 8 + Decorate 103 ArrayStride 16 + Decorate 104 ArrayStride 16 + MemberDecorate 105(SamplerArray) 0 Offset 0 + MemberDecorate 106(e) 0 Offset 0 + MemberDecorate 106(e) 1 Offset 8 + MemberDecorate 106(e) 2 Offset 12 + MemberDecorate 106(e) 3 Offset 16 + MemberDecorate 106(e) 4 Offset 32 + MemberDecorate 107(gl_DefaultUniformBlock) 0 Offset 0 + MemberDecorate 107(gl_DefaultUniformBlock) 1 Offset 16 + MemberDecorate 107(gl_DefaultUniformBlock) 2 Offset 24 + MemberDecorate 107(gl_DefaultUniformBlock) 3 Offset 32 + MemberDecorate 107(gl_DefaultUniformBlock) 4 Offset 192 + Decorate 107(gl_DefaultUniformBlock) Block + Decorate 109 DescriptorSet 0 + Decorate 109 Binding 0 + Decorate 151(t1) DescriptorSet 0 + Decorate 151(t1) Binding 6 + Decorate 157(structUniform.t0) DescriptorSet 0 + Decorate 157(structUniform.t0) Binding 1 + Decorate 190(o) Location 0 + Decorate 194(structUniform.samplers.tn[0]) DescriptorSet 0 + Decorate 194(structUniform.samplers.tn[0]) Binding 2 + Decorate 195(structUniform.samplers.tn[1]) DescriptorSet 0 + Decorate 195(structUniform.samplers.tn[1]) Binding 3 + Decorate 196(structUniform.samplers.tn[2]) DescriptorSet 0 + Decorate 196(structUniform.samplers.tn[2]) Binding 4 + Decorate 197(structUniform.samplers.tn[3]) DescriptorSet 0 + Decorate 197(structUniform.samplers.tn[3]) Binding 5 2: TypeVoid 3: TypeFunction 2 6: TypeInt 32 0 @@ -648,179 +792,236 @@ gl_FragCoord origin is upper left 10: TypeFloat 32 11: TypeVector 10(float) 4 12: TypeFunction 11(fvec4) - 15: TypePointer Function 6(int) - 17: 6(int) Constant 0 -18(gl_AtomicCounterBlock_0): TypeStruct 6(int) 6(int) - 19: TypePointer Uniform 18(gl_AtomicCounterBlock_0) - 20: 19(ptr) Variable Uniform - 21: TypeInt 32 1 - 22: 21(int) Constant 0 - 23: TypePointer Uniform 6(int) - 25: 6(int) Constant 1 - 28: 6(int) Constant 4294967295 - 60: 21(int) Constant 1 -63(gl_AtomicCounterBlock_1): TypeStruct 6(int) - 64: TypePointer Uniform 63(gl_AtomicCounterBlock_1) - 65: 64(ptr) Variable Uniform - 68: 6(int) Constant 72 - 72: TypePointer Function 10(float) -74(UniformBlock): TypeStruct 10(float) 11(fvec4) - 75: TypePointer Uniform 74(UniformBlock) - 76: 75(ptr) Variable Uniform - 77: TypePointer Uniform 10(float) - 80(BufferBlock): TypeStruct 10(float) 11(fvec4) - 81: TypePointer Uniform 80(BufferBlock) -82(bufferInstance): 81(ptr) Variable Uniform - 86: TypeVector 10(float) 2 - 87: 6(int) Constant 10 - 88: TypeArray 11(fvec4) 87 - 89(e): TypeStruct 86(fvec2) 10(float) 6(int) -90(gl_DefaultUniformBlock): TypeStruct 11(fvec4) 86(fvec2) 86(fvec2) 88 89(e) - 91: TypePointer Uniform 90(gl_DefaultUniformBlock) - 92: 91(ptr) Variable Uniform - 93: 21(int) Constant 4 - 97: 21(int) Constant 2 - 102: TypePointer Function 86(fvec2) - 104: TypePointer Uniform 86(fvec2) - 113: TypePointer Function 11(fvec4) - 115: TypePointer Uniform 11(fvec4) - 118: 21(int) Constant 3 - 134: TypeImage 10(float) 2D sampled format:Unknown - 135: TypeSampledImage 134 - 136: TypePointer UniformConstant 135 - 137(t1): 136(ptr) Variable UniformConstant - 139: 10(float) Constant 0 - 140: 86(fvec2) ConstantComposite 139 139 - 146: 10(float) Constant 1065353216 - 158: TypePointer Output 11(fvec4) - 159(o): 158(ptr) Variable Output + 15: TypeInt 32 1 + 16: 6(int) Constant 4 + 17: TypeArray 15(int) 16 +18(SamplerArray): TypeStruct 17 + 19: TypePointer Function 18(SamplerArray) + 20: TypeImage 10(float) 2D sampled format:Unknown + 21: TypeSampledImage 20 + 22: TypePointer UniformConstant 21 + 23: TypeFunction 11(fvec4) 19(ptr) 22(ptr) 22(ptr) 22(ptr) 22(ptr) + 31: TypePointer Function 6(int) + 33: 6(int) Constant 0 +34(gl_AtomicCounterBlock_0): TypeStruct 6(int) 6(int) + 35: TypePointer Uniform 34(gl_AtomicCounterBlock_0) + 36: 35(ptr) Variable Uniform + 37: 15(int) Constant 0 + 38: TypePointer Uniform 6(int) + 40: 6(int) Constant 1 + 43: 6(int) Constant 4294967295 + 75: 15(int) Constant 1 +78(gl_AtomicCounterBlock_1): TypeStruct 6(int) + 79: TypePointer Uniform 78(gl_AtomicCounterBlock_1) + 80: 79(ptr) Variable Uniform + 83: 6(int) Constant 72 + 87: TypePointer Function 10(float) +89(UniformBlock): TypeStruct 10(float) 11(fvec4) + 90: TypePointer Uniform 89(UniformBlock) + 91: 90(ptr) Variable Uniform + 92: TypePointer Uniform 10(float) + 95(BufferBlock): TypeStruct 10(float) 11(fvec4) + 96: TypePointer Uniform 95(BufferBlock) +97(bufferInstance): 96(ptr) Variable Uniform + 101: TypeVector 10(float) 2 + 102: 6(int) Constant 10 + 103: TypeArray 11(fvec4) 102 + 104: TypeArray 15(int) 16 +105(SamplerArray): TypeStruct 104 + 106(e): TypeStruct 101(fvec2) 10(float) 6(int) 15(int) 105(SamplerArray) +107(gl_DefaultUniformBlock): TypeStruct 11(fvec4) 101(fvec2) 101(fvec2) 103 106(e) + 108: TypePointer Uniform 107(gl_DefaultUniformBlock) + 109: 108(ptr) Variable Uniform + 110: 15(int) Constant 4 + 114: 15(int) Constant 2 + 119: TypePointer Function 101(fvec2) + 121: TypePointer Uniform 101(fvec2) + 130: TypePointer Function 11(fvec4) + 132: TypePointer Uniform 11(fvec4) + 135: 15(int) Constant 3 + 151(t1): 22(ptr) Variable UniformConstant + 153: 10(float) Constant 0 + 154: 101(fvec2) ConstantComposite 153 153 +157(structUniform.t0): 22(ptr) Variable UniformConstant + 164: 10(float) Constant 1065353216 + 189: TypePointer Output 11(fvec4) + 190(o): 189(ptr) Variable Output +194(structUniform.samplers.tn[0]): 22(ptr) Variable UniformConstant +195(structUniform.samplers.tn[1]): 22(ptr) Variable UniformConstant +196(structUniform.samplers.tn[2]): 22(ptr) Variable UniformConstant +197(structUniform.samplers.tn[3]): 22(ptr) Variable UniformConstant + 199: TypePointer Uniform 105(SamplerArray) + 203: TypePointer Function 17 + 206: TypePointer Function 15(int) 4(main): 2 Function None 3 5: Label - 155(j): 72(ptr) Variable Function - 156: 6(int) FunctionCall 8(bar() - 157: 10(float) ConvertUToF 156 - Store 155(j) 157 - 160: 10(float) Load 155(j) - 161: 11(fvec4) FunctionCall 13(foo() - 162: 11(fvec4) VectorTimesScalar 161 160 - Store 159(o) 162 + 186(j): 87(ptr) Variable Function + 198(param): 19(ptr) Variable Function + 187: 6(int) FunctionCall 8(bar() + 188: 10(float) ConvertUToF 187 + Store 186(j) 188 + 191: 10(float) Load 186(j) + 192: 11(fvec4) FunctionCall 13(foo() + 193: 11(fvec4) VectorTimesScalar 192 191 + 200: 199(ptr) AccessChain 109 110 110 + 201:105(SamplerArray) Load 200 + 202: 104 CompositeExtract 201 0 + 204: 203(ptr) AccessChain 198(param) 37 + 205: 15(int) CompositeExtract 202 0 + 207: 206(ptr) AccessChain 204 37 + Store 207 205 + 208: 15(int) CompositeExtract 202 1 + 209: 206(ptr) AccessChain 204 75 + Store 209 208 + 210: 15(int) CompositeExtract 202 2 + 211: 206(ptr) AccessChain 204 114 + Store 211 210 + 212: 15(int) CompositeExtract 202 3 + 213: 206(ptr) AccessChain 204 135 + Store 213 212 + 214: 11(fvec4) FunctionCall 29(baz(struct-SamplerArray-s21[4]1;s21;s21;s21;s21;) 198(param) 194(structUniform.samplers.tn[0]) 195(structUniform.samplers.tn[1]) 196(structUniform.samplers.tn[2]) 197(structUniform.samplers.tn[3]) + 215: 11(fvec4) FAdd 193 214 + Store 190(o) 215 Return FunctionEnd 8(bar(): 6(int) Function None 7 9: Label - 16(j): 15(ptr) Variable Function - Store 16(j) 17 - 24: 23(ptr) AccessChain 20 22 - 26: 6(int) AtomicIAdd 24 25 17 25 - Store 16(j) 26 - 27: 23(ptr) AccessChain 20 22 - 29: 6(int) AtomicIAdd 27 25 17 28 - 30: 6(int) ISub 29 25 - Store 16(j) 30 - 31: 23(ptr) AccessChain 20 22 - 32: 6(int) Load 31 - Store 16(j) 32 - 33: 23(ptr) AccessChain 20 22 - 34: 6(int) AtomicIAdd 33 25 17 25 - Store 16(j) 34 - 35: 23(ptr) AccessChain 20 22 - 36: 6(int) AtomicIAdd 35 25 17 28 - Store 16(j) 36 - 37: 23(ptr) AccessChain 20 22 - 38: 6(int) AtomicISub 37 25 17 25 - Store 16(j) 38 - 39: 23(ptr) AccessChain 20 22 - 40: 6(int) Load 16(j) - 41: 6(int) AtomicUMin 39 25 17 40 - Store 16(j) 41 - 42: 23(ptr) AccessChain 20 22 - 43: 6(int) Load 16(j) - 44: 6(int) AtomicUMax 42 25 17 43 - Store 16(j) 44 - 45: 23(ptr) AccessChain 20 22 - 46: 6(int) Load 16(j) - 47: 6(int) AtomicAnd 45 25 17 46 - Store 16(j) 47 - 48: 23(ptr) AccessChain 20 22 - 49: 6(int) Load 16(j) - 50: 6(int) AtomicOr 48 25 17 49 - Store 16(j) 50 - 51: 23(ptr) AccessChain 20 22 - 52: 6(int) Load 16(j) - 53: 6(int) AtomicXor 51 25 17 52 - Store 16(j) 53 - 54: 23(ptr) AccessChain 20 22 - 55: 6(int) Load 16(j) - 56: 6(int) AtomicExchange 54 25 17 55 - Store 16(j) 56 - 57: 23(ptr) AccessChain 20 22 - 58: 6(int) Load 16(j) - 59: 6(int) AtomicCompareExchange 57 25 17 17 58 17 - Store 16(j) 59 - 61: 23(ptr) AccessChain 20 60 - 62: 6(int) AtomicIAdd 61 25 17 25 - 66: 23(ptr) AccessChain 65 22 - 67: 6(int) AtomicIAdd 66 25 17 25 - MemoryBarrier 25 68 - 69: 6(int) Load 16(j) - ReturnValue 69 + 32(j): 31(ptr) Variable Function + Store 32(j) 33 + 39: 38(ptr) AccessChain 36 37 + 41: 6(int) AtomicIAdd 39 40 33 40 + Store 32(j) 41 + 42: 38(ptr) AccessChain 36 37 + 44: 6(int) AtomicIAdd 42 40 33 43 + 45: 6(int) ISub 44 40 + Store 32(j) 45 + 46: 38(ptr) AccessChain 36 37 + 47: 6(int) Load 46 + Store 32(j) 47 + 48: 38(ptr) AccessChain 36 37 + 49: 6(int) AtomicIAdd 48 40 33 40 + Store 32(j) 49 + 50: 38(ptr) AccessChain 36 37 + 51: 6(int) AtomicIAdd 50 40 33 43 + Store 32(j) 51 + 52: 38(ptr) AccessChain 36 37 + 53: 6(int) AtomicISub 52 40 33 40 + Store 32(j) 53 + 54: 38(ptr) AccessChain 36 37 + 55: 6(int) Load 32(j) + 56: 6(int) AtomicUMin 54 40 33 55 + Store 32(j) 56 + 57: 38(ptr) AccessChain 36 37 + 58: 6(int) Load 32(j) + 59: 6(int) AtomicUMax 57 40 33 58 + Store 32(j) 59 + 60: 38(ptr) AccessChain 36 37 + 61: 6(int) Load 32(j) + 62: 6(int) AtomicAnd 60 40 33 61 + Store 32(j) 62 + 63: 38(ptr) AccessChain 36 37 + 64: 6(int) Load 32(j) + 65: 6(int) AtomicOr 63 40 33 64 + Store 32(j) 65 + 66: 38(ptr) AccessChain 36 37 + 67: 6(int) Load 32(j) + 68: 6(int) AtomicXor 66 40 33 67 + Store 32(j) 68 + 69: 38(ptr) AccessChain 36 37 + 70: 6(int) Load 32(j) + 71: 6(int) AtomicExchange 69 40 33 70 + Store 32(j) 71 + 72: 38(ptr) AccessChain 36 37 + 73: 6(int) Load 32(j) + 74: 6(int) AtomicCompareExchange 72 40 33 33 73 33 + Store 32(j) 74 + 76: 38(ptr) AccessChain 36 75 + 77: 6(int) AtomicIAdd 76 40 33 40 + 81: 38(ptr) AccessChain 80 37 + 82: 6(int) AtomicIAdd 81 40 33 40 + MemoryBarrier 40 83 + 84: 6(int) Load 32(j) + ReturnValue 84 FunctionEnd 13(foo(): 11(fvec4) Function None 12 14: Label - 73(f): 72(ptr) Variable Function - 103(v2): 102(ptr) Variable Function - 114(v4): 113(ptr) Variable Function - 78: 77(ptr) AccessChain 76 22 - 79: 10(float) Load 78 - 83: 77(ptr) AccessChain 82(bufferInstance) 22 - 84: 10(float) Load 83 - 85: 10(float) FAdd 79 84 - 94: 77(ptr) AccessChain 92 93 60 - 95: 10(float) Load 94 - 96: 10(float) FAdd 85 95 - 98: 23(ptr) AccessChain 92 93 97 - 99: 6(int) Load 98 - 100: 10(float) ConvertUToF 99 - 101: 10(float) FAdd 96 100 - Store 73(f) 101 - 105: 104(ptr) AccessChain 92 60 - 106: 86(fvec2) Load 105 - 107: 104(ptr) AccessChain 92 97 - 108: 86(fvec2) Load 107 - 109: 86(fvec2) FAdd 106 108 - 110: 104(ptr) AccessChain 92 93 22 - 111: 86(fvec2) Load 110 - 112: 86(fvec2) FAdd 109 111 - Store 103(v2) 112 - 116: 115(ptr) AccessChain 92 22 - 117: 11(fvec4) Load 116 - 119: 115(ptr) AccessChain 92 118 22 - 120: 11(fvec4) Load 119 - 121: 11(fvec4) FAdd 117 120 - 122: 115(ptr) AccessChain 92 118 60 - 123: 11(fvec4) Load 122 - 124: 11(fvec4) FAdd 121 123 - 125: 115(ptr) AccessChain 92 118 97 - 126: 11(fvec4) Load 125 - 127: 11(fvec4) FAdd 124 126 - 128: 115(ptr) AccessChain 76 60 - 129: 11(fvec4) Load 128 - 130: 11(fvec4) FAdd 127 129 - 131: 115(ptr) AccessChain 82(bufferInstance) 60 - 132: 11(fvec4) Load 131 - 133: 11(fvec4) FAdd 130 132 - 138: 135 Load 137(t1) - 141: 11(fvec4) ImageSampleImplicitLod 138 140 - 142: 11(fvec4) FAdd 133 141 - Store 114(v4) 142 - 143: 10(float) Load 73(f) - 144: 11(fvec4) CompositeConstruct 143 143 143 143 - 145: 86(fvec2) Load 103(v2) - 147: 10(float) CompositeExtract 145 0 - 148: 10(float) CompositeExtract 145 1 - 149: 11(fvec4) CompositeConstruct 147 148 146 146 - 150: 11(fvec4) FMul 144 149 - 151: 11(fvec4) Load 114(v4) - 152: 11(fvec4) FMul 150 151 - ReturnValue 152 + 88(f): 87(ptr) Variable Function + 120(v2): 119(ptr) Variable Function + 131(v4): 130(ptr) Variable Function + 93: 92(ptr) AccessChain 91 37 + 94: 10(float) Load 93 + 98: 92(ptr) AccessChain 97(bufferInstance) 37 + 99: 10(float) Load 98 + 100: 10(float) FAdd 94 99 + 111: 92(ptr) AccessChain 109 110 75 + 112: 10(float) Load 111 + 113: 10(float) FAdd 100 112 + 115: 38(ptr) AccessChain 109 110 114 + 116: 6(int) Load 115 + 117: 10(float) ConvertUToF 116 + 118: 10(float) FAdd 113 117 + Store 88(f) 118 + 122: 121(ptr) AccessChain 109 75 + 123: 101(fvec2) Load 122 + 124: 121(ptr) AccessChain 109 114 + 125: 101(fvec2) Load 124 + 126: 101(fvec2) FAdd 123 125 + 127: 121(ptr) AccessChain 109 110 37 + 128: 101(fvec2) Load 127 + 129: 101(fvec2) FAdd 126 128 + Store 120(v2) 129 + 133: 132(ptr) AccessChain 109 37 + 134: 11(fvec4) Load 133 + 136: 132(ptr) AccessChain 109 135 37 + 137: 11(fvec4) Load 136 + 138: 11(fvec4) FAdd 134 137 + 139: 132(ptr) AccessChain 109 135 75 + 140: 11(fvec4) Load 139 + 141: 11(fvec4) FAdd 138 140 + 142: 132(ptr) AccessChain 109 135 114 + 143: 11(fvec4) Load 142 + 144: 11(fvec4) FAdd 141 143 + 145: 132(ptr) AccessChain 91 75 + 146: 11(fvec4) Load 145 + 147: 11(fvec4) FAdd 144 146 + 148: 132(ptr) AccessChain 97(bufferInstance) 75 + 149: 11(fvec4) Load 148 + 150: 11(fvec4) FAdd 147 149 + 152: 21 Load 151(t1) + 155: 11(fvec4) ImageSampleImplicitLod 152 154 + 156: 11(fvec4) FAdd 150 155 + 158: 21 Load 157(structUniform.t0) + 159: 11(fvec4) ImageSampleImplicitLod 158 154 + 160: 11(fvec4) FAdd 156 159 + Store 131(v4) 160 + 161: 10(float) Load 88(f) + 162: 11(fvec4) CompositeConstruct 161 161 161 161 + 163: 101(fvec2) Load 120(v2) + 165: 10(float) CompositeExtract 163 0 + 166: 10(float) CompositeExtract 163 1 + 167: 11(fvec4) CompositeConstruct 165 166 164 164 + 168: 11(fvec4) FMul 162 167 + 169: 11(fvec4) Load 131(v4) + 170: 11(fvec4) FMul 168 169 + ReturnValue 170 + FunctionEnd +29(baz(struct-SamplerArray-s21[4]1;s21;s21;s21;s21;): 11(fvec4) Function None 23 + 24(samplers): 19(ptr) FunctionParameter +25(samplers.tn[0]): 22(ptr) FunctionParameter +26(samplers.tn[1]): 22(ptr) FunctionParameter +27(samplers.tn[2]): 22(ptr) FunctionParameter +28(samplers.tn[3]): 22(ptr) FunctionParameter + 30: Label + 173: 21 Load 25(samplers.tn[0]) + 174: 11(fvec4) ImageSampleImplicitLod 173 154 + 175: 21 Load 26(samplers.tn[1]) + 176: 11(fvec4) ImageSampleImplicitLod 175 154 + 177: 11(fvec4) FAdd 174 176 + 178: 21 Load 27(samplers.tn[2]) + 179: 11(fvec4) ImageSampleImplicitLod 178 154 + 180: 11(fvec4) FAdd 177 179 + 181: 21 Load 28(samplers.tn[3]) + 182: 11(fvec4) ImageSampleImplicitLod 181 154 + 183: 11(fvec4) FAdd 180 182 + ReturnValue 183 FunctionEnd diff --git a/Test/baseResults/vulkan.frag.out b/Test/baseResults/vulkan.frag.out index 78aea821..8e6bfcc9 100755 --- a/Test/baseResults/vulkan.frag.out +++ b/Test/baseResults/vulkan.frag.out @@ -6,7 +6,7 @@ ERROR: 0:6: 'binding' : sampler/texture/image requires layout(binding=X) ERROR: 0:8: 'binding' : sampler/texture/image requires layout(binding=X) ERROR: 0:9: 'binding' : sampler/texture/image requires layout(binding=X) ERROR: 0:10: 'binding' : sampler/texture/image requires layout(binding=X) -ERROR: 0:14: 'sampler2D' : sampler-constructor requires two arguments +ERROR: 0:14: 'sampler2D' : sampler-constructor requires the extension GL_ARB_bindless_texture enabled ERROR: 0:15: 'sampler2D' : sampler-constructor first argument must be a scalar *texture* type ERROR: 0:16: 'sampler2D' : sampler-constructor first argument must be a scalar *texture* type ERROR: 0:17: 'sampler2D' : sampler-constructor second argument must be a scalar sampler or samplerShadow diff --git a/Test/glsl.-P.frag b/Test/glsl.-P.frag new file mode 100755 index 00000000..72df8ded --- /dev/null +++ b/Test/glsl.-P.frag @@ -0,0 +1,20 @@ +#version 450 + +layout(location=0) out vec4 color; + +void main() +{ + #ifndef TEST1 + #error TEST1 is not defined + #endif + + #ifndef TEST2 + #error TEST2 is not defined + #endif + + #ifndef TEST3 + #error TEST3 is not defined + #endif + + color = vec4(1.0); +} diff --git a/Test/glsl.-P.function.frag b/Test/glsl.-P.function.frag new file mode 100755 index 00000000..086bb4dc --- /dev/null +++ b/Test/glsl.-P.function.frag @@ -0,0 +1,8 @@ +#version 450 + +layout(location=0) out vec4 color; + +void main() +{ + color = getColor(); +} diff --git a/Test/glsl.-P.include.frag b/Test/glsl.-P.include.frag new file mode 100755 index 00000000..fdadc717 --- /dev/null +++ b/Test/glsl.-P.include.frag @@ -0,0 +1,10 @@ +#version 450 + +#include "glsl.-P.included.glsl" + +layout(location=0) out vec4 color; + +void main() +{ + color = getColor(); +} diff --git a/Test/glsl.-P.included.glsl b/Test/glsl.-P.included.glsl new file mode 100755 index 00000000..d870f9f9 --- /dev/null +++ b/Test/glsl.-P.included.glsl @@ -0,0 +1,4 @@ +vec4 getColor() +{ + return vec4(1.0); +} diff --git a/Test/glsl.es320.extTextureShadowLod.frag b/Test/glsl.es320.extTextureShadowLod.frag new file mode 100755 index 00000000..49125633 --- /dev/null +++ b/Test/glsl.es320.extTextureShadowLod.frag @@ -0,0 +1,22 @@ +#version 320 es + +#extension GL_EXT_texture_shadow_lod : enable + + +uniform lowp sampler2DArrayShadow s2da; +uniform lowp samplerCubeArrayShadow sca; +uniform lowp samplerCubeShadow sc; + +in lowp vec4 tc; +out lowp float c; +void main() +{ + c = texture(s2da, tc, 0.0); + c = texture(sca, tc, 0.0, 0.0); + c = textureOffset(s2da, tc, ivec2(0.0), 0.0); + c = textureLod(s2da, tc, 0.0); + c = textureLod(sc, tc, 0.0); + c = textureLod(sca, tc, 0.0, 0.0); + c = textureLodOffset(s2da, tc, 0.0, ivec2(0.0)); + +} diff --git a/Test/glsl.ext.textureShadowLod.frag b/Test/glsl.ext.textureShadowLod.frag new file mode 100755 index 00000000..79c22ff0 --- /dev/null +++ b/Test/glsl.ext.textureShadowLod.frag @@ -0,0 +1,32 @@ +#version 450 +#extension GL_EXT_texture_shadow_lod : enable + +uniform sampler2DArrayShadow s2da; +uniform samplerCubeArrayShadow sca; +uniform samplerCubeShadow sc; + +out float c; +in vec4 tc; + +void pass() { + c = texture(s2da, tc, 0.0); + c = texture(sca, tc, 0.0, 0.0); + c = textureOffset(s2da, tc, ivec2(0.0), 0.0); + c = textureLod(s2da, tc, 0.0); + c = textureLod(sc, tc, 0.0); + c = textureLod(sca, tc, 0.0, 0.0); + c = textureLodOffset(s2da, tc, 0.0, ivec2(0.0)); +} + +#extension GL_EXT_texture_shadow_lod : disable +void fail() { + // All these builtins should fail to compile + c = texture(s2da, tc, 0.0); + c = texture(sca, tc, 0.0, 0.0); + c = textureOffset(s2da, tc, ivec2(0.0), 0.0); + c = textureLod(s2da, tc, 0.0); + c = textureLod(sc, tc, 0.0); + c = textureLod(sca, tc, 0.0, 0.0); + c = textureLodOffset(s2da, tc, 0.0, ivec2(0.0)); +} + diff --git a/Test/glsl.interpOp.error.frag b/Test/glsl.interpOp.error.frag new file mode 100755 index 00000000..7d46f2e6 --- /dev/null +++ b/Test/glsl.interpOp.error.frag @@ -0,0 +1,73 @@ +#version 320 es + +struct S +{ + highp float a; + highp float b; +}; +layout(location = 0) in S v_var; + +layout(location = 2) in highp float v; + +struct S0 { + highp vec4 s_v; +}; + +layout(location = 3) in FIn { + highp float x; + highp vec4 xyz[1]; + S0 s0; +}; + +layout(location = 7) in highp float z[1]; + +layout(location = 8) in highp vec4 w; + +layout(location = 0) out mediump vec4 fragColor; +void main (void) +{ + // Centroid + { + // valid + fragColor = vec4(interpolateAtCentroid(v)); + fragColor = vec4(interpolateAtCentroid(x)); + fragColor = vec4(interpolateAtCentroid(z[0])); + fragColor = interpolateAtCentroid(w); + fragColor = interpolateAtCentroid(xyz[0]); + + //// invalid + fragColor = vec4(interpolateAtCentroid(v_var.a)); + fragColor = vec4(interpolateAtCentroid(w.x)); + fragColor = vec4(interpolateAtCentroid(s0.s_v)); + } + + // Sample + { + // valid + fragColor = vec4(interpolateAtSample(v, 0)); + fragColor = vec4(interpolateAtSample(x, 0)); + fragColor = vec4(interpolateAtSample(z[0], 0)); + fragColor = interpolateAtSample(w, 0); + fragColor = interpolateAtSample(xyz[0], 0); + + // invalid + fragColor = vec4(interpolateAtSample(v_var.a, 0)); + fragColor = vec4(interpolateAtSample(w.x, 0)); + fragColor = vec4(interpolateAtSample(s0.s_v, 0)); + } + + // Offset + { + // valid + fragColor = vec4(interpolateAtOffset(v, vec2(0))); + fragColor = vec4(interpolateAtOffset(x, vec2(0))); + fragColor = vec4(interpolateAtOffset(z[0], vec2(0))); + fragColor = interpolateAtOffset(w, vec2(0)); + fragColor = interpolateAtOffset(xyz[0], vec2(0)); + + // invalid + fragColor = vec4(interpolateAtOffset(v_var.a, vec2(0))); + fragColor = vec4(interpolateAtOffset(w.x, vec2(0))); + fragColor = vec4(interpolateAtOffset(s0.s_v, vec2(0))); + } +} diff --git a/Test/glsl.versionOverride.geom b/Test/glsl.versionOverride.geom index bcfc2f22..691c9912 100755 --- a/Test/glsl.versionOverride.geom +++ b/Test/glsl.versionOverride.geom @@ -1,6 +1,6 @@ /* -glslangValidator.exe --glsl-version 430 -V -S geom -o glsl.versionOverride.geom.out glsl.versionOverride.geom +glslang.exe --glsl-version 430 -V -S geom -o glsl.versionOverride.geom.out glsl.versionOverride.geom */ diff --git a/Test/glsl.versionOverride.tesc b/Test/glsl.versionOverride.tesc index 3b7b1e3c..a3bd7ed6 100755 --- a/Test/glsl.versionOverride.tesc +++ b/Test/glsl.versionOverride.tesc @@ -1,6 +1,6 @@ /* -glslangValidator.exe --glsl-version 440 -V -S tesc -o glsl.versionOverride.tesc.out glsl.versionOverride.tesc +glslang.exe --glsl-version 440 -V -S tesc -o glsl.versionOverride.tesc.out glsl.versionOverride.tesc */ diff --git a/Test/glsl.versionOverride.tese b/Test/glsl.versionOverride.tese index e92d5a98..bbb42d2f 100755 --- a/Test/glsl.versionOverride.tese +++ b/Test/glsl.versionOverride.tese @@ -1,6 +1,6 @@ /* -glslangValidator.exe --glsl-version 450 -V -S tese -o glsl.versionOverride.tese.out glsl.versionOverride.tese +glslang.exe --glsl-version 450 -V -S tese -o glsl.versionOverride.tese.out glsl.versionOverride.tese */ diff --git a/Test/glslangValidator b/Test/glslangValidator index 856aa1a9..f6b26b43 100755 --- a/Test/glslangValidator +++ b/Test/glslangValidator @@ -1,2 +1,2 @@ #!/usr/bin/env bash -../build/install/bin/glslangValidator $* +../build/install/bin/glslang $* diff --git a/Test/hlsl.buffer_ref_parameter.comp b/Test/hlsl.buffer_ref_parameter.comp new file mode 100755 index 00000000..acd08b37 --- /dev/null +++ b/Test/hlsl.buffer_ref_parameter.comp @@ -0,0 +1,13 @@ +[[vk::binding(0, 0)]] ByteAddressBuffer buffer_position_ms; +[[vk::binding(1, 0)]] RWByteAddressBuffer r; + +float3 pull_position(ByteAddressBuffer buffer_position, uint vertex_id) { + return asfloat(buffer_position.Load3(vertex_id * 3 * 4)); +} + +[numthreads(64, 1, 1)] +void main(uint gi : SV_GroupIndex) { + float3 position_ms = pull_position(buffer_position_ms, gi); + + r.Store3(0, asuint(position_ms)); +} \ No newline at end of file diff --git a/Test/hlsl.conditional.frag b/Test/hlsl.conditional.frag index 91f75eec..7b6eb7bd 100755 --- a/Test/hlsl.conditional.frag +++ b/Test/hlsl.conditional.frag @@ -37,6 +37,10 @@ float4 PixelShaderFunction(float4 input) : COLOR0 e = a = b ? c = d : 10, b = a ? d = c : 11; float4 f; f = ret.x < input.y ? c * input : d * input; + uint g = d > 0.0 ? 0b010101u : 0u; + uint h = g > 0.0 ? 0B111111u : 0u; + uint i = h > 0.0 ? 0b0101u : 0B01; + uint j = i > 0.0 ? 0xabcd : 0xbcda; return e * ret + f + vectorCond() + scalarCond() + float4(fbSelect(bool2(true, false), float2(1.0, 2.0), float2(3.0, 4.0)), 10.0, 10.0); } diff --git a/Test/hlsl.emptystructreturn.tesc b/Test/hlsl.emptystructreturn.tesc new file mode 100755 index 00000000..bc848930 --- /dev/null +++ b/Test/hlsl.emptystructreturn.tesc @@ -0,0 +1,48 @@ +struct HullInputType +{ + float4 position : SV_Position; +}; + +struct ConstantOutputType +{ + float edges[3] : SV_TessFactor; + float inside : SV_InsideTessFactor; +}; +struct EmptyStruct {}; + +struct HullOutputType {}; + +void blob(InputPatch patch) +{ +} + +ConstantOutputType ColorPatchConstantFunction(InputPatch inputPatch, uint patchId : SV_PrimitiveID) +{ + ConstantOutputType output; + + // Set the tessellation factors for the three edges of the triangle. + output.edges[0] = 2; + output.edges[1] = 2; + output.edges[2] = 2; + + // Set the tessellation factor for tessallating inside the triangle. + output.inside = 2; + + return output; +} + + +// Hull Shader +[domain("tri")] +[partitioning("integer")] +[outputtopology("triangle_cw")] +[outputcontrolpoints(3)] +[patchconstantfunc("ColorPatchConstantFunction")] +HullOutputType main(EmptyStruct stage_input, InputPatch patch, uint pointId : SV_OutputControlPointID, uint patchId : SV_PrimitiveID) +{ + HullOutputType output; + blob(patch); + + return output; +} + diff --git a/Test/hlsl.function.frag b/Test/hlsl.function.frag index 5834b319..6fb44a9a 100755 --- a/Test/hlsl.function.frag +++ b/Test/hlsl.function.frag @@ -3,9 +3,14 @@ float4 fun0() return 1.0f; } -uint fun2(float4 col) +float4 fun2(float4 const col) { - return 7; + return (1.0f, 2.0f, 3.0f, 4.0f); +} + +uint fun3(const float4 col) +{ + return 7; } float4 fun4(uint id1, uniform uint id2) @@ -15,7 +20,7 @@ float4 fun4(uint id1, uniform uint id2) float4 fun1(int index) { - uint entityId = fun2(fun0()); + uint entityId = fun3(fun2(fun0())); return fun4(entityId, entityId); } diff --git a/Test/hlsl.init2.frag b/Test/hlsl.init2.frag index 2b9b7e68..6dcb6cb7 100755 --- a/Test/hlsl.init2.frag +++ b/Test/hlsl.init2.frag @@ -21,16 +21,17 @@ void Test1() const mystruct2 constTest5 = { {8,}, {9,}, {10}, }; constTest5.c; - const float step = 1.f; - float n = 0; - const float3 a[8] = { - normalize(float3(1, 1, 1)) * (n += step), - normalize(float3(-1, -1, -1)) * (n += step), - normalize(float3(-1, -1, 1)) * (n += step), - normalize(float3(-1, 1, -1)) * (n += step), - normalize(float3(-1, 1, 1)) * (n += step), - normalize(float3(1, -1, -1)) * (n += step), - normalize(float3(1, -1, 1)) * (n += step), + float const origStep = 1.0f; + const float step = origStep; + float n = 0; + const float3 a[8] = { + normalize(float3(1, 1, 1)) * (n += step), + normalize(float3(-1, -1, -1)) * (n += step), + normalize(float3(-1, -1, 1)) * (n += step), + normalize(float3(-1, 1, -1)) * (n += step), + normalize(float3(-1, 1, 1)) * (n += step), + normalize(float3(1, -1, -1)) * (n += step), + normalize(float3(1, -1, 1)) * (n += step), normalize(float3(1, 1, -1)) * (n += step) }; const struct one { float3 a; } oneNonConst = { normalize(float3(-1, 1, 1)) * (n += step) }; diff --git a/Test/hlsl.intrinsics.comp b/Test/hlsl.intrinsics.comp index bce2d27d..78f42471 100755 --- a/Test/hlsl.intrinsics.comp +++ b/Test/hlsl.intrinsics.comp @@ -12,6 +12,8 @@ groupshared uint3 gs_uc3; groupshared uint4 gs_ua4; groupshared uint4 gs_ub4; groupshared uint4 gs_uc4; +groupshared float gs_fa; +groupshared float gs_fb; float ComputeShaderFunctionS(float inF0, float inF1, float inF2, uint inU0, uint inU1) { @@ -36,6 +38,8 @@ float ComputeShaderFunctionS(float inF0, float inF1, float inF2, uint inU0, uint InterlockedXor(gs_ua, gs_ub); InterlockedXor(gs_ua, gs_ub, out_u1); + InterlockedAdd(gs_fa, gs_fb); + // CheckAccessFullyMapped(3); // TODO: ... return 0.0; diff --git a/Test/hlsl.mintypes.frag b/Test/hlsl.mintypes.frag index ad47e68e..a887562b 100755 --- a/Test/hlsl.mintypes.frag +++ b/Test/hlsl.mintypes.frag @@ -12,30 +12,75 @@ PS_OUTPUT main() min16float2 mf16_2; min16float3 mf16_3; min16float4 mf16_4; + min16float2x2 mf16_2x2; + min16float2x3 mf16_2x3; + min16float2x4 mf16_2x4; + min16float3x2 mf16_3x2; + min16float3x3 mf16_3x3; + min16float3x4 mf16_3x4; + min16float4x2 mf16_4x2; + min16float4x3 mf16_4x3; + min16float4x4 mf16_4x4; min10float mf10; min10float1 mf10_1; min10float2 mf10_2; min10float3 mf10_3; - min10float4 mf12_4; + min10float4 mf10_4; + min10float2x2 mf10_2x2; + min10float2x3 mf10_2x3; + min10float2x4 mf10_2x4; + min10float3x2 mf10_3x2; + min10float3x3 mf10_3x3; + min10float3x4 mf10_3x4; + min10float4x2 mf10_4x2; + min10float4x3 mf10_4x3; + min10float4x4 mf10_4x4; min16int mi16; min16int1 mi16_1; min16int2 mi16_2; min16int3 mi16_3; min16int4 mi16_4; + min16int2x2 mi16_2x2; + min16int2x3 mi16_2x3; + min16int2x4 mi16_2x4; + min16int3x2 mi16_3x2; + min16int3x3 mi16_3x3; + min16int3x4 mi16_3x4; + min16int4x2 mi16_4x2; + min16int4x3 mi16_4x3; + min16int4x4 mi16_4x4; min12int mi12; min12int1 mi12_1; min12int2 mi12_2; min12int3 mi12_3; min12int4 mi12_4; + min12int2x2 mi12_2x2; + min12int2x3 mi12_2x3; + min12int2x4 mi12_2x4; + min12int3x2 mi12_3x2; + min12int3x3 mi12_3x3; + min12int3x4 mi12_3x4; + min12int4x2 mi12_4x2; + min12int4x3 mi12_4x3; + min12int4x4 mi12_4x4; min16uint mu16; min16uint1 mu16_1; min16uint2 mu16_2; min16uint3 mu16_3; min16uint4 mu16_4; + min16uint2x2 mu16_2x2; + min16uint2x3 mu16_2x3; + min16uint2x4 mu16_2x4; + min16uint3x2 mu16_3x2; + min16uint3x3 mu16_3x3; + min16uint3x4 mu16_3x4; + min16uint4x2 mu16_4x2; + min16uint4x3 mu16_4x3; + min16uint4x4 mu16_4x4; mf16_2 + mf16; mf10_2 + mf10; @@ -43,6 +88,20 @@ PS_OUTPUT main() mi12_2 + mi12; mu16_2 + mu16; + mul(mf16_2, mf16_2x4); + mul(mf16_3, mf16_3x4); + mul(mf16_4, mf16_4x4); + mul(mf16_4x2, mf16_2); + mul(mf16_4x3, mf16_3); + mul(mf16_4x4, mf16_4); + + mul(mf10_2, mf10_2x4); + mul(mf10_3, mf10_3x4); + mul(mf10_4, mf10_4x4); + mul(mf10_4x2, mf10_2); + mul(mf10_4x3, mf10_3); + mul(mf10_4x4, mf10_4); + PS_OUTPUT psout; psout.Color = 0; return psout; diff --git a/Test/hlsl.multiView.frag b/Test/hlsl.multiView.frag new file mode 100755 index 00000000..79e388d6 --- /dev/null +++ b/Test/hlsl.multiView.frag @@ -0,0 +1,5 @@ + +float4 main(uint ViewIndex : SV_ViewID) +{ + return float4(ViewIndex, 0.0f, 0.0f, 0.0f); +} diff --git a/Test/hlsl.nested-runtimeArray.frag b/Test/hlsl.nested-runtimeArray.frag new file mode 100755 index 00000000..3606adac --- /dev/null +++ b/Test/hlsl.nested-runtimeArray.frag @@ -0,0 +1,9 @@ +struct A { + float a[]; +}; + +RWStructuredBuffer B; + +float main() { + return B[0].a[0]; +} diff --git a/Test/hlsl.numericsuffixes.frag b/Test/hlsl.numericsuffixes.frag index bccb786d..e16d374d 100755 --- a/Test/hlsl.numericsuffixes.frag +++ b/Test/hlsl.numericsuffixes.frag @@ -1,6 +1,9 @@ struct PS_OUTPUT { float4 color : SV_Target0; }; +#define BIN_UINT 0b00001u +#define BIN_INT 0b00011 + PS_OUTPUT main() { // Test numeric suffixes @@ -8,7 +11,7 @@ PS_OUTPUT main() uint r01 = 1u; // lower uint uint r02 = 2U; // upper uint uint r03 = 0xabcu; // lower hex uint - uint r04 = 0xABCU; // upper hex uint (upper 0X is not accepted) + uint r04 = 0XABCU; // upper hex uint int r05 = 5l; // lower long int int r06 = 6L; // upper long int int r07 = 071; // octal @@ -17,6 +20,12 @@ PS_OUTPUT main() float r10 = 1.H; // half float r11 = 1.1h; // half float r12 = 1.1H; // half + uint r13 = 0b00001u;// lower binary uint + uint r14 = 0B00010U;// upper binary uint + int r15 = 0b00011; // lower binary int + int r16 = 0B00100; // upper binary int + uint r17 = BIN_UINT;// lower binart define uint + int r18 = BIN_INT; // lower binart define int PS_OUTPUT ps_output; ps_output.color = r07; // gets 71 octal = 57 decimal diff --git a/Test/hlsl.numericsuffixes.negative.frag b/Test/hlsl.numericsuffixes.negative.frag new file mode 100755 index 00000000..ce512fd0 --- /dev/null +++ b/Test/hlsl.numericsuffixes.negative.frag @@ -0,0 +1,15 @@ + +struct PS_OUTPUT { float4 color : SV_Target0; }; + +PS_OUTPUT main() +{ + // Test numeric suffixes + uint r01 = 0bERROR321u; // Bad digit + uint r02 = 0b11111111111111111111111111111111111111111111111111111111111111111u; // To big + uint r03 = 0xTESTu // Bad digit + uint r04 = 0xFFFFFFFFFFFFFFFFFFu; // To big + + PS_OUTPUT ps_output; + ps_output.color = r01; + return ps_output; +} diff --git a/Test/hlsl.structcopy.comp b/Test/hlsl.structcopy.comp new file mode 100755 index 00000000..37898847 --- /dev/null +++ b/Test/hlsl.structcopy.comp @@ -0,0 +1,28 @@ +struct MyStruct { + uint a; + uint b; + uint c; +}; + +struct MyStructs { + uint count; + MyStruct data[]; +}; + +StructuredBuffer sb; +StructuredBuffer o; + +groupshared MyStruct s[128]; +static const MyStruct deflt = { 1u, 2u, 3u }; + +[numthreads(128, 1, 1)] +void main(uint id : SV_GroupIndex) +{ + s[0] = deflt; + uint count = sb.Load(0).count; + MyStruct ms = id > count ? s[id - count] : sb.Load(0).data[id]; + + InterlockedAdd(o[0].a, ms.a); + InterlockedAdd(o[0].b, ms.b); + InterlockedAdd(o[0].c, ms.c); +} diff --git a/Test/hlsl.structcopylogical.comp b/Test/hlsl.structcopylogical.comp new file mode 100755 index 00000000..37898847 --- /dev/null +++ b/Test/hlsl.structcopylogical.comp @@ -0,0 +1,28 @@ +struct MyStruct { + uint a; + uint b; + uint c; +}; + +struct MyStructs { + uint count; + MyStruct data[]; +}; + +StructuredBuffer sb; +StructuredBuffer o; + +groupshared MyStruct s[128]; +static const MyStruct deflt = { 1u, 2u, 3u }; + +[numthreads(128, 1, 1)] +void main(uint id : SV_GroupIndex) +{ + s[0] = deflt; + uint count = sb.Load(0).count; + MyStruct ms = id > count ? s[id - count] : sb.Load(0).data[id]; + + InterlockedAdd(o[0].a, ms.a); + InterlockedAdd(o[0].b, ms.b); + InterlockedAdd(o[0].c, ms.c); +} diff --git a/Test/implicitArraySize.frag b/Test/implicitArraySize.frag new file mode 100755 index 00000000..ca3eeb3f --- /dev/null +++ b/Test/implicitArraySize.frag @@ -0,0 +1,9 @@ +#version 460 core +in float a[]; +in float c[3]; +out float b[5]; + +void main(){ + b[0] = a[1]; + b[1] = c[1]; +} \ No newline at end of file diff --git a/Test/implicitArraySize.vert b/Test/implicitArraySize.vert new file mode 100755 index 00000000..93e7495b --- /dev/null +++ b/Test/implicitArraySize.vert @@ -0,0 +1,8 @@ +#version 460 core +out float a[]; +out float c[]; + +void main(){ + a[0] = 0.1; + c[5] = 0.1; +} \ No newline at end of file diff --git a/Test/implicitArraySize1.geom b/Test/implicitArraySize1.geom new file mode 100755 index 00000000..b3b52ead --- /dev/null +++ b/Test/implicitArraySize1.geom @@ -0,0 +1,14 @@ +#version 460 core + +layout(triangles) in; +layout(line_strip, max_vertices = 204) out; + +void f(); + +in float g[][3]; +out float o[3]; + +void main(){ + f(); + o[1] = g[2][1]; +} \ No newline at end of file diff --git a/Test/implicitArraySize2.geom b/Test/implicitArraySize2.geom new file mode 100755 index 00000000..0bb65cd4 --- /dev/null +++ b/Test/implicitArraySize2.geom @@ -0,0 +1,8 @@ +#version 460 core + +in float g[][3]; +out float o[]; + +void f(){ + o[1] = g[1][1]; +} \ No newline at end of file diff --git a/Test/implicitArraySizeBuiltin.geom b/Test/implicitArraySizeBuiltin.geom new file mode 100755 index 00000000..419b6331 --- /dev/null +++ b/Test/implicitArraySizeBuiltin.geom @@ -0,0 +1,20 @@ +#version 460 core + +layout(triangles) in; +layout(line_strip, max_vertices = 204) out; + +void f2(float x) +{ + gl_ClipDistance[6] = gl_in[0].gl_ClipDistance[6]; +} +void f3(float x) +{ + gl_CullDistance[1] = gl_in[0].gl_CullDistance[1]; +} + +void main(){ + #if defined(CLIP) + f2(0.1); + #endif + f3(0.1); +} \ No newline at end of file diff --git a/Test/implicitArraySizeBuiltin.vert b/Test/implicitArraySizeBuiltin.vert new file mode 100755 index 00000000..251e9756 --- /dev/null +++ b/Test/implicitArraySizeBuiltin.vert @@ -0,0 +1,11 @@ +#version 460 core + +void f1(float x) +{ + gl_ClipDistance[6] = x; + gl_CullDistance[1] = x; +} + +void main(){ + f1(0.1); +} \ No newline at end of file diff --git a/Test/makeDoc b/Test/makeDoc deleted file mode 100755 index c9d598ec..00000000 --- a/Test/makeDoc +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env bash -./glslangValidator -p > instDesc -asciidoc --backend=html5 instDesc diff --git a/Test/overflow_underflow_toinf_0.frag b/Test/overflow_underflow_toinf_0.frag new file mode 100755 index 00000000..0b1d1b99 --- /dev/null +++ b/Test/overflow_underflow_toinf_0.frag @@ -0,0 +1,13 @@ +#version 320 es +precision highp float; +out vec4 my_FragColor; +void main() +{ + // GLSL ES 3.00.6 section 4.1.4 Floats: + // "A value with a magnitude too small to be represented as a mantissa and exponent is converted to zero." + // 1.0e-50 is small enough that it can't even be stored as subnormal. + float correct = (1.0e-50 == 0.0) ? 1.0 : 0.0; + float correct1 = isinf(1.0e40) ? 1.0 : 0.0; + vec4 foo = vec4(1.0e-50, -1.0e-50, 1.0e50, -1.0e50); + my_FragColor = vec4(0.0, correct, correct1, 1.0); +} diff --git a/Test/preprocessor.function_macro.vert b/Test/preprocessor.function_macro.vert index 577ea7e3..9f437867 100755 --- a/Test/preprocessor.function_macro.vert +++ b/Test/preprocessor.function_macro.vert @@ -13,8 +13,11 @@ )\ 4 + 3 + Y +#define F F.a + int main() { gl_Position = vec4(X(3), Y(3, 4), Z(3)); gl_Position = vec4(REALLY_LONG_MACRO_NAME_WITH_MANY_PARAMETERS(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12)); gl_Position = vec4(A(3)); + gl_Position = A(F); } diff --git a/Test/preprocessor.simple.vert b/Test/preprocessor.simple.vert index 788df76c..6c448500 100755 --- a/Test/preprocessor.simple.vert +++ b/Test/preprocessor.simple.vert @@ -46,6 +46,8 @@ struct S { vec3 b = a.yzy; \ vec3 b = a.z; +void bar(int x) {} + void foo() { S s; @@ -55,6 +57,9 @@ void foo() s.member2.yzy(); s.member2.xyz(); s.member2.yzy; + for(int i = 0;i < 100; i = i + 1) { + bar (i) + } FUN_MAC() yzy diff --git a/Test/rayQuery-allOps.comp b/Test/rayQuery-allOps.comp index 3a2a8d0d..6f041758 100755 --- a/Test/rayQuery-allOps.comp +++ b/Test/rayQuery-allOps.comp @@ -1,6 +1,7 @@ #version 460 #extension GL_EXT_ray_query : enable #extension GL_EXT_ray_flags_primitive_culling : enable +#extension GL_EXT_ray_tracing_position_fetch : enable layout(primitive_culling); struct Ray @@ -147,6 +148,14 @@ void main() { doSomething(); } + { + vec3 positions[3]; + rayQueryGetIntersectionTriangleVertexPositionsEXT(rayQuery, true, positions); + if (positions[0].x < 0 && positions[2].y > 0) + { + doSomething(); + } + } break; case gl_RayQueryCommittedIntersectionGeneratedEXT : diff --git a/Test/runtests b/Test/runtests index 2ee0db0d..e7e1d33f 100755 --- a/Test/runtests +++ b/Test/runtests @@ -2,12 +2,12 @@ # Arguments: # 1- TargetDirectory, where to write test results and intermediary files -# 2- Path to glslangValidator +# 2- Path to glslang # 3- Path to spirv-remap TARGETDIR=${1:-localResults} BASEDIR=baseResults -EXE=${2:-../build/install/bin/glslangValidator} +EXE=${2:-../build/install/bin/glslang} REMAPEXE=${3:-../build/install/bin/spirv-remap} HASERROR=0 mkdir -p $TARGETDIR @@ -18,7 +18,7 @@ if [ -d "${LIBPATH}" ]; then fi function run { - $EXE $@ + $EXE "$@" result=$? case "$result" in [0-6]) # Valid success and error codes @@ -201,13 +201,19 @@ run -D -Od -e main -H --depfile $TARGETDIR/hlsl.dashI.vert.d.out -Od -Iinc1/path diff -b $BASEDIR/hlsl.dashI.vert.d.out $TARGETDIR/hlsl.dashI.vert.d.out || HASERROR=1 # -# Testing -D and -U +# Testing -D, -U and -P # -echo "Testing -D and -U" +echo "Testing -D, -U and -P" run -DUNDEFED -UIN_SHADER -DFOO=200 -i -l --U UNDEFED --define-macro MUL=FOO*2 glsl.-D-U.frag > $TARGETDIR/glsl.-D-U.frag.out diff -b $BASEDIR/glsl.-D-U.frag.out $TARGETDIR/glsl.-D-U.frag.out || HASERROR=1 run -D -Od -e main -V -i -DUNDEFED -UIN_SHADER --D FOO=200 --undef-macro UNDEFED -Od hlsl.-D-U.frag > $TARGETDIR/hlsl.-D-U.frag.out diff -b $BASEDIR/hlsl.-D-U.frag.out $TARGETDIR/hlsl.-D-U.frag.out || HASERROR=1 +run -P"#define TEST1" -i -l --preamble-text "#define TEST2" --p "#define TEST3" glsl.-P.frag > $TARGETDIR/glsl.-P.frag.out +diff -b $BASEDIR/glsl.-P.frag.out $TARGETDIR/glsl.-P.frag.out || HASERROR=1 +run -i -l --preamble-text "vec4 getColor() { return vec4(1.0); }" glsl.-P.function.frag > $TARGETDIR/glsl.-P.function.frag.out +diff -b $BASEDIR/glsl.-P.function.frag.out $TARGETDIR/glsl.-P.function.frag.out || HASERROR=1 +run -i -l --preamble-text "#extension GL_GOOGLE_include_directive : require" -I. glsl.-P.include.frag > $TARGETDIR/glsl.-P.include.frag.out +diff -b $BASEDIR/glsl.-P.include.frag.out $TARGETDIR/glsl.-P.include.frag.out || HASERROR=1 # # Test --client and --target-env diff --git a/Test/spv.atomicRvalue.error.vert b/Test/spv.atomicRvalue.error.vert new file mode 100755 index 00000000..74b7c3bd --- /dev/null +++ b/Test/spv.atomicRvalue.error.vert @@ -0,0 +1,7 @@ +#version 440 + +void main() { + uint a = 5; + atomicAdd(a * 2, 0); + atomicAdd(a, 0); +} diff --git a/Test/spv.bufferhandle8.frag b/Test/spv.bufferhandle8.frag index 1bc13c3c..92651355 100755 --- a/Test/spv.bufferhandle8.frag +++ b/Test/spv.bufferhandle8.frag @@ -27,6 +27,8 @@ layout(set=0, binding=0) buffer T3 { Blah Bindings[]; } t3; + void main() { + Blah x = t3.Bindings[2]; t3.Bindings[0] = t3.Bindings[1]; } diff --git a/Test/spv.coopmatKHR.comp b/Test/spv.coopmatKHR.comp new file mode 100755 index 00000000..3bcee7f5 --- /dev/null +++ b/Test/spv.coopmatKHR.comp @@ -0,0 +1,121 @@ +#version 450 core +#extension GL_KHR_memory_scope_semantics : enable +#extension GL_KHR_cooperative_matrix : enable +#extension GL_EXT_shader_explicit_arithmetic_types : enable +#extension GL_EXT_buffer_reference : enable + +layout (local_size_x = 64, local_size_y = 1, local_size_z = 1) in; + +const int X = 8; +layout(constant_id = 0) const int Y = 2; +const int Z = X*Y; + +coopmat mC; +coopmat mC2[3]; + +layout(constant_id = 1) const float F = 3.0; + +const coopmat mD = coopmat(0.0); +const coopmat mD2 = coopmat(1); + +struct S { int a; int b; int c; }; + +const S s = S(12, 23, 34); + +layout(set = 0, binding = 0, buffer_reference) coherent buffer Block { + float y[1024*1024]; + float x[]; +} block; + +layout(set = 0, binding = 0) coherent buffer Block16 { + float16_t y[1024*1024]; + float16_t x[]; + + Block b; +} block16; + +coopmat f16(coopmat m) { return -m; } +coopmat f32(coopmat m) { return -m; } + +layout(constant_id = 2) const int SC = 1; +coopmat scm[SC][SC]; + +// sized for coopmat +shared uvec4 shmatrix[16*16*2/16]; + +void main() +{ + coopmat1?8:4), gl_MatrixUseAccumulator> m = coopmat1?8:4), gl_MatrixUseAccumulator>(0.0); + + m = m + m; + m = m - m; + m = -m; + m = 2.0*m; + m = m*2.0; + + coopmat m2 = coopmat(m); + + float x = m[1]; + m[0] = x; + + coopMatLoad(m, block.x, 16, 128, gl_CooperativeMatrixLayoutRowMajor); + coopMatStore(m, block.x, 16, 128, gl_CooperativeMatrixLayoutRowMajor); + coopMatLoad(m2, block16.x, 16, 128, gl_CooperativeMatrixLayoutRowMajor); + coopMatStore(m2, block16.x, 16, 128, gl_CooperativeMatrixLayoutRowMajor); + coopMatLoad(m, block16.b.x, 16, 128, gl_CooperativeMatrixLayoutRowMajor); + coopMatStore(m, block16.b.x, 16, 128, gl_CooperativeMatrixLayoutRowMajor); + + coopmat A; + coopmat B; + coopmat C; + coopmat D; + D = coopMatMulAdd(A, B, C); + + int l = D.length(); + + coopmat E; + + coopmat F = coopmat(0.0); + + coopmat1?8:4), gl_MatrixUseAccumulator> a[5]; + a[3][0] = 1.0; + + float md1 = mD[1]; + + md1 += (m += m)[1234]; + + mC2[1] = mC2[2]; + + coopMatLoad(m, block.y, 16, 128, gl_CooperativeMatrixLayoutRowMajor); + coopMatStore(m, block.y, 16, 128, gl_CooperativeMatrixLayoutRowMajor); + coopMatLoad(m2, block16.y, 16, 128, gl_CooperativeMatrixLayoutRowMajor); + coopMatStore(m2, block16.y, 16, 128, gl_CooperativeMatrixLayoutRowMajor); + + coopmat p1; + coopmat p2; + + p1 = f16(p1); + p2 = f32(p2); + + p1 = coopmat(0.0); + p2 = coopmat(0.0); + + p1 /= p1; + + p1 *= float16_t(2.0); + p2 *= 4.0; + + coopmat ms; + coopMatLoad(ms, shmatrix, 1, 2, gl_CooperativeMatrixLayoutRowMajor); + coopMatStore(ms, shmatrix, 1, 2, gl_CooperativeMatrixLayoutRowMajor); + + coopmat ms8A; + coopmat ms8B; + coopmat ms8C; + coopMatMulAdd(ms8A, ms8B, ms8C); + coopMatMulAdd(ms8A, ms8B, ms8C, 0); + coopMatMulAdd(ms8A, ms8B, ms8C, gl_MatrixOperandsSaturatingAccumulation); + + coopmat m16; + coopMatStore(m16, shmatrix, 1, 2, gl_CooperativeMatrixLayoutRowMajor); +} diff --git a/Test/spv.coopmatKHR_Error.comp b/Test/spv.coopmatKHR_Error.comp new file mode 100755 index 00000000..f2e5a526 --- /dev/null +++ b/Test/spv.coopmatKHR_Error.comp @@ -0,0 +1,69 @@ +#version 450 core +#extension GL_KHR_memory_scope_semantics : enable +#extension GL_KHR_cooperative_matrix : enable +#extension GL_EXT_shader_explicit_arithmetic_types : enable + +layout (local_size_x = 64, local_size_y = 1, local_size_z = 1) in; + +float<16> ftemplate16; + +coopmat fnoparams; + +struct S +{ + int s; +}; + +coopmat fbadtype; +coopmat fbadtype2; +coopmat<16, gl_ScopeSubgroup, 8, 8, gl_MatrixUseA> fbadtype3; + +coopmat fbadnumparams; + +int X = 8; + +coopmat fbadparam; + +layout(constant_id = 0) const int Y = 1; + +shared coopmat sharedmat; + +layout(set = 0, binding = 0) buffer InvBlock { + coopmat bufmat; +} invblock; + +void main() +{ + coopmat f32_16_8; + coopmat f16_16_8; + + // invalid implicit conversions + f32_16_8 = f16_16_8; + f32_16_8 = f16_16_8 + f16_16_8; + + coopmat f16_8_8; + + // mismatching dimensions + f16_16_8 = f16_8_8; + + coopmat f16_8_Y; + coopmat f16_8_Y1; + + // mismatching dimensions with specialization constants + f16_8_Y = f16_8_Y1; + + // wrong arguments for constructor + f16_8_8 = coopmat(1, 1); + + // can't construct from a builtin type + mat4 m4; + coopmat f32_4_4 = coopmat(m4); + + // only support a single array subscript + f16_16_8[0][0]; + + // don't support scalar component selection + f16_16_8.x; + + transpose(f16_8_8); +} diff --git a/Test/spv.coopmatKHR_arithmetic.comp b/Test/spv.coopmatKHR_arithmetic.comp new file mode 100755 index 00000000..611de24d --- /dev/null +++ b/Test/spv.coopmatKHR_arithmetic.comp @@ -0,0 +1,85 @@ +#version 450 core +#extension GL_KHR_memory_scope_semantics : enable +#extension GL_KHR_cooperative_matrix : enable +#extension GL_EXT_shader_explicit_arithmetic_types : enable + +layout (local_size_x = 64, local_size_y = 1, local_size_z = 1) in; + + +void main() +{ + coopmat f; + coopmat f2; + coopmat f3; + + coopmat f16; + + coopmat u8; + coopmat i8; + coopmat u32; + + f+f; + f-f; + f*f; + f/f; + f+=f; + f-=f; + f*=f; + f/=f; + f*2.0; + 2.0*f; + f*=2.0; + + f16+f16; + f16-f16; + f16*f16; + f16/f16; + f16+=f16; + f16-=f16; + f16*=f16; + f16/=f16; + f16*float16_t(2.0); + float16_t(2.0)*f16; + f16*=float16_t(2.0); + + u32+u32; + u32-u32; + u32*u32; + u32/u32; + u32+=u32; + u32-=u32; + u32*=u32; + u32/=u32; + u32*uint32_t(2); + uint32_t(2)*u32; + u32*=uint32_t(2); + + u8+u8; + u8-u8; + u8*u8; + u8/u8; + u8+=u8; + u8-=u8; + u8*=u8; + u8/=u8; + u8*uint8_t(2); + uint8_t(2)*u8; + u8*=uint8_t(2); + + i8+i8; + i8-i8; + i8*i8; + i8/i8; + i8+=i8; + i8-=i8; + i8*=i8; + i8/=i8; + i8*int8_t(2); + int8_t(2)*i8; + i8*=int8_t(2); + + -f; + -f16; + -i8; + -u8; +} diff --git a/Test/spv.coopmatKHR_arithmeticError.comp b/Test/spv.coopmatKHR_arithmeticError.comp new file mode 100755 index 00000000..57381cd8 --- /dev/null +++ b/Test/spv.coopmatKHR_arithmeticError.comp @@ -0,0 +1,87 @@ +#version 450 core +#extension GL_KHR_memory_scope_semantics : enable +#extension GL_KHR_cooperative_matrix : enable +#extension GL_EXT_shader_explicit_arithmetic_types : enable + +layout (local_size_x = 64, local_size_y = 1, local_size_z = 1) in; + + +void main() +{ + coopmat f; + coopmat f2; + coopmat f3; + + coopmat f16; + + coopmat u8; + coopmat i8; + coopmat i32; + + f+1.0; + f-1.0; + f/1.0; + 1.0+f; + 1.0-f; + 1.0/f; + f+=1.0; + f-=1.0; + f/=1.0; + + f+f16; + f-f16; + f*f16; + f/f16; + f+=f16; + f-=f16; + f*=f16; + f/=f16; + + f+f2; + f-f2; + f*f2; + f/f2; + f+=f2; + f-=f2; + f*=f2; + f/=f2; + + f+f3; + f-f3; + f*f3; + f/f3; + f+=f3; + f-=f3; + f*=f3; + f/=f3; + + u8+i8; + u8-i8; + u8*i8; + u8/i8; + u8+=i8; + u8-=i8; + u8*=i8; + u8/=i8; + + u8+uint8_t(1); + u8-uint8_t(1); + u8/uint8_t(1); + u8+=uint8_t(1); + u8-=uint8_t(1); + u8/=uint8_t(1); + + i8+int8_t(1); + i8-int8_t(1); + i8/int8_t(1); + i8+=int8_t(1); + i8-=int8_t(1); + i8/=int8_t(1); + + i32+1; + i32-1; + i32/1; + i32+=1; + i32-=1; + i32/=1; +} diff --git a/Test/spv.coopmatKHR_constructor.comp b/Test/spv.coopmatKHR_constructor.comp new file mode 100755 index 00000000..b0f19bea --- /dev/null +++ b/Test/spv.coopmatKHR_constructor.comp @@ -0,0 +1,49 @@ +#version 450 core +#extension GL_KHR_memory_scope_semantics : enable +#extension GL_KHR_cooperative_matrix : enable +#extension GL_EXT_shader_explicit_arithmetic_types : enable + +layout (local_size_x = 64, local_size_y = 1, local_size_z = 1) in; + + +void main() +{ + +#define TESTCONST(T, BASE) \ + coopmat(coopmat(BASE+1.0)); \ + coopmat(coopmat(BASE+2.0)); \ + coopmat(coopmat(BASE+3)); \ + coopmat(coopmat(BASE+4)); \ + coopmat(coopmat(BASE+5)); \ + coopmat(coopmat(BASE+6)); \ + coopmat(coopmat(BASE+7)); \ + coopmat(coopmat(BASE+8)); + + TESTCONST(float, 0) + TESTCONST(float16_t, 10) + TESTCONST(uint32_t, 20) + TESTCONST(uint16_t, 30) + TESTCONST(uint8_t, 40) + TESTCONST(int32_t, 50) + TESTCONST(int16_t, 60) + TESTCONST(int8_t, 70) + +#define TESTVAR(T, BASE) \ + { coopmat v = coopmat(BASE+1.0); coopmat(v); } \ + { coopmat v = coopmat(BASE+2.0); coopmat(v); } \ + { coopmat v = coopmat(BASE+3); coopmat(v); } \ + { coopmat v = coopmat(BASE+4); coopmat(v); } \ + { coopmat v = coopmat(BASE+5); coopmat(v); } \ + { coopmat v = coopmat(BASE+6); coopmat(v); } \ + { coopmat v = coopmat(BASE+7); coopmat(v); } \ + { coopmat v = coopmat(BASE+8); coopmat(v); } + + TESTVAR(float, 100) + TESTVAR(float16_t, 110) + TESTVAR(uint32_t, 120) + TESTVAR(uint16_t, 130) + TESTVAR(uint8_t, 140) + TESTVAR(int32_t, 150) + TESTVAR(int16_t, 160) + TESTVAR(int8_t, 170) +} diff --git a/Test/spv.coopmatKHR_constructorError.comp b/Test/spv.coopmatKHR_constructorError.comp new file mode 100755 index 00000000..7f00eb16 --- /dev/null +++ b/Test/spv.coopmatKHR_constructorError.comp @@ -0,0 +1,16 @@ +#version 450 core +#extension GL_KHR_memory_scope_semantics : enable +#extension GL_KHR_cooperative_matrix : enable +#extension GL_EXT_shader_explicit_arithmetic_types : enable + +layout (local_size_x = 64, local_size_y = 1, local_size_z = 1) in; + + +void main() +{ + // Test each kind of shape mismatch + coopmat(coopmat(0.0)); + coopmat(coopmat(0.0)); + coopmat(coopmat(0.0)); + coopmat(coopmat(0.0)); +} diff --git a/Test/spv.debugInfo.frag b/Test/spv.debugInfo.frag index 3b6cd27f..31b63341 100755 --- a/Test/spv.debugInfo.frag +++ b/Test/spv.debugInfo.frag @@ -25,9 +25,40 @@ vec4 foo(S s) return r; } +float testBranch(float x, float y) +{ + float result = 0; + bool b = x > 0; + + // branch with load + if (b) { + result += 1; + } + else { + result -= 1; + } + + // branch with expression + if (x > y) { + result += x - y; + } + + // selection with load + result += b ? + 1 : -1; + + // selection with expression + result += x < y ? + y : + float(b); + + return result; +} + void main() { outv = foo(s); + outv += testBranch(inv.x, inv.y); outv += texture(s2d, vec2(0.5)); switch (s.a) { diff --git a/Test/spv.debuginfo.bufferref.glsl.frag b/Test/spv.debuginfo.bufferref.glsl.frag new file mode 100755 index 00000000..c2002fa2 --- /dev/null +++ b/Test/spv.debuginfo.bufferref.glsl.frag @@ -0,0 +1,28 @@ +#version 450 core +#extension GL_EXT_buffer_reference : enable + +layout(buffer_reference, std430) buffer MeshVertexPositions { + float data[]; +}; + +struct Mesh { + MeshVertexPositions positions; +}; + +layout(set = 0, binding = 0) readonly buffer PerPass_meshes { + Mesh data[]; +} perPass_meshes; + +layout(location = 0) out vec4 out_fragColor; + +layout(location = 0) in flat uint tri_idx0; + +void main() { + Mesh meshData = perPass_meshes.data[tri_idx0]; + + vec3 vertex_pos0 = vec3(meshData.positions.data[3 * tri_idx0], + meshData.positions.data[3 * tri_idx0 + 1], + meshData.positions.data[3 * tri_idx0 + 2]); + + out_fragColor = vec4(vertex_pos0, 1.0); +} diff --git a/Test/spv.debuginfo.const_params.glsl.comp b/Test/spv.debuginfo.const_params.glsl.comp new file mode 100755 index 00000000..112628fe --- /dev/null +++ b/Test/spv.debuginfo.const_params.glsl.comp @@ -0,0 +1,14 @@ +#version 450 + +void function( + const float f, + const vec2 f2, + const vec3 f3, + const vec4 f4) +{ +} + +void main() +{ + function(0, vec2(0), vec3(0), vec4(0)); +} diff --git a/Test/spv.debuginfo.glsl.frag b/Test/spv.debuginfo.glsl.frag index bf5f622d..86316af2 100755 --- a/Test/spv.debuginfo.glsl.frag +++ b/Test/spv.debuginfo.glsl.frag @@ -38,6 +38,8 @@ layout (location = 0) out vec4 outFragColor; #define AMBIENT_LIGHT 0.1 #define USE_PCF +int global_var = 0; + struct Light { vec4 position; diff --git a/Test/spv.debuginfo.scalar_types.glsl.frag b/Test/spv.debuginfo.scalar_types.glsl.frag new file mode 100755 index 00000000..36595ea7 --- /dev/null +++ b/Test/spv.debuginfo.scalar_types.glsl.frag @@ -0,0 +1,55 @@ +/* +The MIT License (MIT) + +Copyright (c) 2023 NVIDIA CORPORATION. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 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. +*/ + +#version 460 + +#extension GL_EXT_shader_explicit_arithmetic_types : require + +bool VAR_bool; +int VAR_int; +uint VAR_uint; +float VAR_float; +double VAR_double; +int8_t VAR_int8_t; +uint8_t VAR_uint8_t; +int16_t VAR_int16_t; +uint16_t VAR_uint16_t; +int64_t VAR_int64_t; +uint64_t VAR_uint64_t; +float16_t VAR_float16_t; + +void main() { + VAR_bool = bool(0); + VAR_int = int(0); + VAR_uint = uint(0); + VAR_float = float(0); + VAR_double = double(0); + VAR_int8_t = int8_t(0); + VAR_uint8_t = uint8_t(0); + VAR_int16_t = int16_t(0); + VAR_uint16_t = uint16_t(0); + VAR_int64_t = int64_t(0); + VAR_uint64_t = uint64_t(0); + VAR_float16_t = float16_t(0); +} \ No newline at end of file diff --git a/Test/spv.exportFunctions.comp b/Test/spv.exportFunctions.comp new file mode 100755 index 00000000..9332c65b --- /dev/null +++ b/Test/spv.exportFunctions.comp @@ -0,0 +1,9 @@ +#version 450 + +float add(float a, float b) { + return a + b; +} + +int foo() { + return 0; +} diff --git a/Test/spv.ext.AnyHitShader.rahit b/Test/spv.ext.AnyHitShader.rahit index 44c32d91..2d33a000 100755 --- a/Test/spv.ext.AnyHitShader.rahit +++ b/Test/spv.ext.AnyHitShader.rahit @@ -2,6 +2,7 @@ #extension GL_EXT_ray_tracing : enable #extension GL_KHR_shader_subgroup_basic : enable #extension GL_EXT_ray_cull_mask : enable +#extension GL_EXT_ray_tracing_position_fetch : enable layout(location = 1) rayPayloadInEXT vec4 incomingPayload; void main() @@ -25,6 +26,7 @@ void main() mat3x4 v16 = gl_ObjectToWorld3x4EXT; mat3x4 v17 = gl_WorldToObject3x4EXT; uint v18 = gl_CullMaskEXT; + vec3 v19 = gl_HitTriangleVertexPositionsEXT[0]; incomingPayload = vec4(0.5f); if (v2 == 1) { ignoreIntersectionEXT; diff --git a/Test/spv.ext.ClosestHitShader.rchit b/Test/spv.ext.ClosestHitShader.rchit index 8b5f848f..09496295 100755 --- a/Test/spv.ext.ClosestHitShader.rchit +++ b/Test/spv.ext.ClosestHitShader.rchit @@ -1,6 +1,7 @@ #version 460 #extension GL_EXT_ray_tracing : enable #extension GL_EXT_ray_cull_mask : enable +#extension GL_EXT_ray_tracing_position_fetch : enable layout(binding = 0, set = 0) uniform accelerationStructureEXT accEXT; layout(location = 0) rayPayloadEXT vec4 localPayload; @@ -26,5 +27,6 @@ void main() mat3x4 v16 = gl_ObjectToWorld3x4EXT; mat3x4 v17 = gl_WorldToObject3x4EXT; uint v18 = gl_CullMaskEXT; + vec3 v19 = gl_HitTriangleVertexPositionsEXT[0]; traceRayEXT(accEXT, 0u, 1u, 2u, 3u, 0u, vec3(0.5f), 0.5f, vec3(1.0f), 0.75f, 1); } diff --git a/Test/spv.ext.ShaderTileImage.color.frag b/Test/spv.ext.ShaderTileImage.color.frag new file mode 100755 index 00000000..f3b55308 --- /dev/null +++ b/Test/spv.ext.ShaderTileImage.color.frag @@ -0,0 +1,12 @@ +#version 460 +#extension GL_EXT_shader_tile_image : require + +precision highp float; + +layout(location=1) tileImageEXT highp attachmentEXT in_color; +layout(location=0) out highp vec4 out_color; + +void main(void) +{ + out_color = colorAttachmentReadEXT(in_color); +} diff --git a/Test/spv.ext.ShaderTileImage.depth_stencil.frag b/Test/spv.ext.ShaderTileImage.depth_stencil.frag new file mode 100755 index 00000000..faf9d932 --- /dev/null +++ b/Test/spv.ext.ShaderTileImage.depth_stencil.frag @@ -0,0 +1,16 @@ +#version 460 +#extension GL_EXT_shader_tile_image : require + +precision highp float; + +layout(location=0) out highp uvec4 stencil_out; +layout(location=1) out highp vec4 depth_out; + + +void main(void) +{ + float depth = depthAttachmentReadEXT(); + uint stencil_value = stencilAttachmentReadEXT(); + stencil_out = uvec4(stencil_value,0,0,0); + depth_out = vec4(depth,0.0,0.0,0.0); +} diff --git a/Test/spv.ext.ShaderTileImage.overlap.frag b/Test/spv.ext.ShaderTileImage.overlap.frag new file mode 100755 index 00000000..98a44e4f --- /dev/null +++ b/Test/spv.ext.ShaderTileImage.overlap.frag @@ -0,0 +1,15 @@ +#version 460 +#extension GL_EXT_shader_tile_image : require + +precision mediump int; +precision highp float; + +layout(location=0) tileImageEXT highp attachmentEXT in_color[2]; +layout(location=1) tileImageEXT highp attachmentEXT in_color_1; +layout(location=1) out highp vec4 out_color; + +void main(void) +{ + out_color = colorAttachmentReadEXT(in_color[0]); + out_color += colorAttachmentReadEXT(in_color_1); +} diff --git a/Test/spv.ext.ShaderTileImage.subpassinput.frag b/Test/spv.ext.ShaderTileImage.subpassinput.frag new file mode 100755 index 00000000..ec0e85ea --- /dev/null +++ b/Test/spv.ext.ShaderTileImage.subpassinput.frag @@ -0,0 +1,13 @@ +#version 450 +#extension GL_EXT_shader_tile_image : require + +precision highp float; + +layout(set = 0, binding = 0, input_attachment_index = 0) uniform subpassInput i; + +layout(location = 0) out vec4 fragColor; + +void main() +{ + fragColor = subpassLoad(i); +} diff --git a/Test/spv.ext.ShaderTileImage.typemismatch.frag b/Test/spv.ext.ShaderTileImage.typemismatch.frag new file mode 100755 index 00000000..170bfaba --- /dev/null +++ b/Test/spv.ext.ShaderTileImage.typemismatch.frag @@ -0,0 +1,13 @@ +#version 320 es +#extension GL_EXT_shader_tile_image : require + +layout(non_coherent_color_attachment_readEXT) in; + +layout(location=0) tileImageEXT highp iattachmentEXT in_color_i; +layout(location=0) out highp vec4 out_color_f; + +void main(void) +{ + highp ivec4 read = colorAttachmentReadEXT(in_color_i); + out_color_f = vec4(read); +} diff --git a/Test/spv.ext.ShaderTileImage.wronglayout.frag b/Test/spv.ext.ShaderTileImage.wronglayout.frag new file mode 100755 index 00000000..7cc06edf --- /dev/null +++ b/Test/spv.ext.ShaderTileImage.wronglayout.frag @@ -0,0 +1,13 @@ +#version 460 +#extension GL_EXT_shader_tile_image : require + +precision highp float; +precision mediump int; + +layout(binding=0, set=0, input_attachment_index=0) tileImageEXT highp attachmentEXT in_color; +layout(location=0) out highp vec4 out_color; + +void main(void) +{ + out_color = colorAttachmentReadEXT(in_color); +} diff --git a/Test/spv.ext.meshShaderBuiltinsShadingRate.mesh b/Test/spv.ext.meshShaderBuiltinsShadingRate.mesh new file mode 100755 index 00000000..b99125dc --- /dev/null +++ b/Test/spv.ext.meshShaderBuiltinsShadingRate.mesh @@ -0,0 +1,77 @@ +#version 460 + +#define MAX_VER 81 +#define MAX_PRIM 32 + +#define BARRIER() \ + memoryBarrierShared(); \ + barrier(); + +#extension GL_EXT_mesh_shader : enable +#extension GL_EXT_fragment_shading_rate : enable + +layout(local_size_x = 32, local_size_y=1, local_size_z=1) in; + +layout(max_vertices=MAX_VER) out; +layout(max_primitives=MAX_PRIM) out; +layout(triangles) out; + +// test use of builtins in mesh shaders: + +void main() +{ + uint iid = gl_LocalInvocationID.x; + uint gid = gl_WorkGroupID.x; + uvec3 numWorkGrous = gl_NumWorkGroups; + uint vertexCount = MAX_VER; // vertexCount <= max_vertices + uint primitiveCount = MAX_PRIM; // primitiveCount <= max_primtives + SetMeshOutputsEXT(vertexCount, primitiveCount); + + gl_MeshVerticesEXT[iid].gl_Position = vec4(1.0); + gl_MeshVerticesEXT[iid].gl_PointSize = 2.0; + gl_MeshVerticesEXT[iid].gl_ClipDistance[3] = 3.0; + gl_MeshVerticesEXT[iid].gl_CullDistance[2] = 4.0; + + BARRIER(); + + gl_MeshVerticesEXT[iid+1].gl_Position = gl_MeshVerticesEXT[iid].gl_Position; + gl_MeshVerticesEXT[iid+1].gl_PointSize = gl_MeshVerticesEXT[iid].gl_PointSize; + gl_MeshVerticesEXT[iid+1].gl_ClipDistance[3] = gl_MeshVerticesEXT[iid].gl_ClipDistance[3]; + gl_MeshVerticesEXT[iid+1].gl_CullDistance[2] = gl_MeshVerticesEXT[iid].gl_CullDistance[2]; + + BARRIER(); + + gl_MeshPrimitivesEXT[iid].gl_PrimitiveID = 6; + gl_MeshPrimitivesEXT[iid].gl_Layer = 7; + gl_MeshPrimitivesEXT[iid].gl_ViewportIndex = 8; + gl_MeshPrimitivesEXT[iid].gl_CullPrimitiveEXT = false; + gl_MeshPrimitivesEXT[iid].gl_PrimitiveShadingRateEXT = 0; + + BARRIER(); + + gl_MeshPrimitivesEXT[iid+1].gl_PrimitiveID = gl_MeshPrimitivesEXT[iid].gl_PrimitiveID; + gl_MeshPrimitivesEXT[iid+1].gl_Layer = gl_MeshPrimitivesEXT[iid].gl_Layer; + gl_MeshPrimitivesEXT[iid+1].gl_ViewportIndex = gl_MeshPrimitivesEXT[iid].gl_ViewportIndex; + gl_MeshPrimitivesEXT[iid+1].gl_CullPrimitiveEXT = gl_MeshPrimitivesEXT[iid].gl_CullPrimitiveEXT; + gl_MeshPrimitivesEXT[iid+1].gl_PrimitiveShadingRateEXT = 0; + + BARRIER(); + + // check bound limits + gl_PrimitiveTriangleIndicesEXT[0] = uvec3(257); // should truncate 257 -> 1, range is between [0, vertexCount-1] + gl_PrimitiveTriangleIndicesEXT[primitiveCount - 1] = uvec3(2); // array size is primitiveCount*3 for triangle + gl_PrimitiveTriangleIndicesEXT[gid] = gl_PrimitiveTriangleIndicesEXT[gid-1]; + + BARRIER(); +} + +// test use of builtins enabled by other extensions +#extension GL_ARB_shader_draw_parameters : enable +#extension GL_EXT_multiview : enable + +void testAdditionalBuiltins() +{ + int id = gl_DrawIDARB; // GL_ARB_shader_draw_parameters + int viewIdx = gl_ViewIndex; // GL_EXT_multiview + +} \ No newline at end of file diff --git a/Test/spv.ext.textureShadowLod.error.frag b/Test/spv.ext.textureShadowLod.error.frag new file mode 100755 index 00000000..ef6ec21d --- /dev/null +++ b/Test/spv.ext.textureShadowLod.error.frag @@ -0,0 +1,13 @@ +#version 450 + +layout(binding = 0) uniform sampler2DArrayShadow s2da; + +layout(location = 0) out vec4 c_out; + +layout(location = 0) in vec4 tc; + +void main() +{ + float c = textureLod(s2da, tc, 0); + c_out = vec4(c); +} diff --git a/Test/spv.ext.textureShadowLod.frag b/Test/spv.ext.textureShadowLod.frag new file mode 100755 index 00000000..8c879d9b --- /dev/null +++ b/Test/spv.ext.textureShadowLod.frag @@ -0,0 +1,20 @@ +#version 450 +#extension GL_EXT_texture_shadow_lod : enable + +layout(binding = 0) uniform sampler2DArrayShadow s2da; +layout(binding = 1) uniform samplerCubeArrayShadow sca; +layout(binding = 2) uniform samplerCubeShadow sc; + +layout(location = 0) out float c; + +layout(location = 0) in vec4 tc; + +void main() { + c = texture(s2da, tc, 0.0); + c = texture(sca, tc, 0.0, 0.0); + c = textureOffset(s2da, tc, ivec2(0.0), 0.0); + c = textureLod(s2da, tc, 0.0); + c = textureLod(sc, tc, 0.0); + c = textureLod(sca, tc, 0.0, 0.0); + c = textureLodOffset(s2da, tc, 0.0, ivec2(0.0)); +} diff --git a/Test/spv.floatFetch.frag b/Test/spv.floatFetch.frag new file mode 100755 index 00000000..c02ddf35 --- /dev/null +++ b/Test/spv.floatFetch.frag @@ -0,0 +1,941 @@ +#version 450 core + +#extension GL_ARB_sparse_texture2: enable +#extension GL_ARB_sparse_texture_clamp: enable +#extension GL_AMD_texture_gather_bias_lod: enable + +layout(set = 0, binding = 0) uniform sampler1D s1D; +layout(set = 0, binding = 1) uniform sampler2D s2D; +layout(set = 0, binding = 2) uniform sampler3D s3D; +layout(set = 0, binding = 3) uniform sampler2DRect s2DRect; +layout(set = 0, binding = 4) uniform samplerCube sCube; +layout(set = 0, binding = 5) uniform samplerBuffer sBuffer; +layout(set = 0, binding = 6) uniform sampler2DMS s2DMS; +layout(set = 0, binding = 7) uniform sampler1DArray s1DArray; +layout(set = 0, binding = 8) uniform sampler2DArray s2DArray; +layout(set = 0, binding = 9) uniform samplerCubeArray sCubeArray; +layout(set = 0, binding = 10) uniform sampler2DMSArray s2DMSArray; + +layout(set = 0, binding = 11) uniform sampler1DShadow s1DShadow; +layout(set = 0, binding = 12) uniform sampler2DShadow s2DShadow; +layout(set = 0, binding = 13) uniform sampler2DRectShadow s2DRectShadow; +layout(set = 0, binding = 14) uniform samplerCubeShadow sCubeShadow; +layout(set = 0, binding = 15) uniform sampler1DArrayShadow s1DArrayShadow; +layout(set = 0, binding = 16) uniform sampler2DArrayShadow s2DArrayShadow; +layout(set = 0, binding = 17) uniform samplerCubeArrayShadow sCubeArrayShadow; + +layout(set = 1, binding = 0) layout(rgba16f) uniform image1D i1D; +layout(set = 1, binding = 1) layout(rgba16f) uniform image2D i2D; +layout(set = 1, binding = 2) layout(rgba16f) uniform image3D i3D; +layout(set = 1, binding = 3) layout(rgba16f) uniform image2DRect i2DRect; +layout(set = 1, binding = 4) layout(rgba16f) uniform imageCube iCube; +layout(set = 1, binding = 5) layout(rgba16f) uniform image1DArray i1DArray; +layout(set = 1, binding = 6) layout(rgba16f) uniform image2DArray i2DArray; +layout(set = 1, binding = 7) layout(rgba16f) uniform imageCubeArray iCubeArray; +layout(set = 1, binding = 8) layout(rgba16f) uniform imageBuffer iBuffer; +layout(set = 1, binding = 9) layout(rgba16f) uniform image2DMS i2DMS; +layout(set = 1, binding = 10) layout(rgba16f) uniform image2DMSArray i2DMSArray; + +layout(set = 2, binding = 0) uniform texture1D t1D; +layout(set = 2, binding = 1) uniform texture2D t2D; +layout(set = 2, binding = 2) uniform texture3D t3D; +layout(set = 2, binding = 3) uniform texture2DRect t2DRect; +layout(set = 2, binding = 4) uniform textureCube tCube; +layout(set = 2, binding = 5) uniform texture1DArray t1DArray; +layout(set = 2, binding = 6) uniform texture2DArray t2DArray; +layout(set = 2, binding = 7) uniform textureCubeArray tCubeArray; +layout(set = 2, binding = 8) uniform textureBuffer tBuffer; +layout(set = 2, binding = 9) uniform texture2DMS t2DMS; +layout(set = 2, binding = 10) uniform texture2DMSArray t2DMSArray; + +layout(set = 2, binding = 11) uniform sampler s; +layout(set = 2, binding = 12) uniform samplerShadow sShadow; + +layout(set = 3, binding = 0, input_attachment_index = 0) uniform subpassInput subpass; +layout(set = 3, binding = 1, input_attachment_index = 0) uniform subpassInputMS subpassMS; + +layout(location = 0) in float c1; +layout(location = 1) in vec2 c2; +layout(location = 2) in vec3 c3; +layout(location = 3) in vec4 c4; + +layout(location = 4) in float compare; +layout(location = 5) in float lod; +layout(location = 6) in float bias; +layout(location = 7) in float lodClamp; + +layout(location = 8) in float dPdxy1; +layout(location = 9) in vec2 dPdxy2; +layout(location = 10) in vec3 dPdxy3; + +const int offset1 = 1; +const ivec2 offset2 = ivec2(1); +const ivec3 offset3 = ivec3(1); +const ivec2 offsets[4] = { offset2, offset2, offset2, offset2 }; + +layout(location = 0) out vec4 fragColor; + +vec4 testTexture() +{ + vec4 texel = vec4(0.0); + + texel += texture(s1D, c1); + texel += texture(s2D, c2); + texel += texture(s3D, c3); + texel += texture(sCube, c3); + texel.x += texture(s1DShadow, c3); + texel.x += texture(s2DShadow, c3); + texel.x += texture(sCubeShadow, c4); + texel += texture(s1DArray, c2); + texel += texture(s2DArray, c3); + texel += texture(sCubeArray, c4); + texel.x += texture(s1DArrayShadow, c3); + texel.x += texture(s2DArrayShadow, c4); + texel += texture(s2DRect, c2); + texel.x += texture(s2DRectShadow, c3); + texel.x += texture(sCubeArrayShadow, c4, compare); + + return texel; +} + +vec4 testTextureProj() +{ + vec4 texel = vec4(0.0); + + texel += textureProj(s1D, c2); + texel += textureProj(s1D, c4); + texel += textureProj(s2D, c3); + texel += textureProj(s2D, c4); + texel += textureProj(s3D, c4); + texel.x += textureProj(s1DShadow, c4); + texel.x += textureProj(s2DShadow, c4); + texel += textureProj(s2DRect, c3); + texel += textureProj(s2DRect, c4); + texel.x += textureProj(s2DRectShadow, c4); + + return texel; +} + +vec4 testTextureLod() +{ + vec4 texel = vec4(0.0); + + texel += textureLod(s1D, c1, lod); + texel += textureLod(s2D, c2, lod); + texel += textureLod(s3D, c3, lod); + texel += textureLod(sCube, c3, lod); + texel.x += textureLod(s1DShadow, c3, lod); + texel.x += textureLod(s2DShadow, c3, lod); + texel += textureLod(s1DArray, c2, lod); + texel += textureLod(s2DArray, c3, lod); + texel.x += textureLod(s1DArrayShadow, c3, lod); + texel += textureLod(sCubeArray, c4, lod); + + return texel; +} + +vec4 testTextureOffset() +{ + vec4 texel = vec4(0.0); + + texel += textureOffset(s1D, c1, offset1); + texel += textureOffset(s2D, c2, offset2); + texel += textureOffset(s3D, c3, offset3); + texel += textureOffset(s2DRect, c2, offset2); + texel.x += textureOffset(s2DRectShadow, c3, offset2); + texel.x += textureOffset(s1DShadow, c3, offset1); + texel.x += textureOffset(s2DShadow, c3, offset2); + texel += textureOffset(s1DArray, c2, offset1); + texel += textureOffset(s2DArray, c3, offset2); + texel.x += textureOffset(s1DArrayShadow, c3, offset1); + texel.x += textureOffset(s2DArrayShadow, c4, offset2); + + return texel; +} + +vec4 testTextureProjOffset() +{ + vec4 texel = vec4(0.0); + + texel += textureProjOffset(s1D, c2, offset1); + texel += textureProjOffset(s1D, c4, offset1); + texel += textureProjOffset(s2D, c3, offset2); + texel += textureProjOffset(s2D, c4, offset2); + texel += textureProjOffset(s3D, c4, offset3); + texel += textureProjOffset(s2DRect, c3, offset2); + texel += textureProjOffset(s2DRect, c4, offset2); + texel.x += textureProjOffset(s2DRectShadow, c4, offset2); + texel.x += textureProjOffset(s1DShadow, c4, offset1); + texel.x += textureProjOffset(s2DShadow, c4, offset2); + + return texel; +} + +vec4 testTextureLodOffset() +{ + vec4 texel = vec4(0.0); + + texel += textureLodOffset(s1D, c1, lod, offset1); + texel += textureLodOffset(s2D, c2, lod, offset2); + texel += textureLodOffset(s3D, c3, lod, offset3); + texel.x += textureLodOffset(s1DShadow, c3, lod, offset1); + texel.x += textureLodOffset(s2DShadow, c3, lod, offset2); + texel += textureLodOffset(s1DArray, c2, lod, offset1); + texel += textureLodOffset(s2DArray, c3, lod, offset2); + texel.x += textureLodOffset(s1DArrayShadow, c3, lod, offset1); + + return texel; +} + +vec4 testTextureProjLodOffset() +{ + vec4 texel = vec4(0.0); + + texel += textureProjLodOffset(s1D, c2, lod, offset1); + texel += textureProjLodOffset(s1D, c4, lod, offset1); + texel += textureProjLodOffset(s2D, c3, lod, offset2); + texel += textureProjLodOffset(s2D, c4, lod, offset2); + texel += textureProjLodOffset(s3D, c4, lod, offset3); + texel.x += textureProjLodOffset(s1DShadow, c4, lod, offset1); + texel.x += textureProjLodOffset(s2DShadow, c4, lod, offset2); + + return texel; +} + +vec4 testTexelFetch() +{ + vec4 texel = vec4(0.0); + + texel += texelFetch(s1D, int(c1), int(lod)); + texel += texelFetch(s2D, ivec2(c2), int(lod)); + texel += texelFetch(s3D, ivec3(c3), int(lod)); + texel += texelFetch(s2DRect, ivec2(c2)); + texel += texelFetch(s1DArray, ivec2(c2), int(lod)); + texel += texelFetch(s2DArray, ivec3(c3), int(lod)); + texel += texelFetch(sBuffer, int(c1)); + texel += texelFetch(s2DMS, ivec2(c2), 1); + texel += texelFetch(s2DMSArray, ivec3(c3), 2); + + return texel; +} + +vec4 testTexelFetchOffset() +{ + vec4 texel = vec4(0.0); + + texel += texelFetchOffset(s1D, int(c1), int(lod), offset1); + texel += texelFetchOffset(s2D, ivec2(c2), int(lod), offset2); + texel += texelFetchOffset(s3D, ivec3(c3), int(lod), offset3); + texel += texelFetchOffset(s2DRect, ivec2(c2), offset2); + texel += texelFetchOffset(s1DArray, ivec2(c2), int(lod), offset1); + texel += texelFetchOffset(s2DArray, ivec3(c3), int(lod), offset2); + + return texel; +} + +vec4 testTextureGrad() +{ + vec4 texel = vec4(0.0); + + texel += textureGrad(s1D, c1, dPdxy1, dPdxy1); + texel += textureGrad(s2D, c2, dPdxy2, dPdxy2); + texel += textureGrad(s3D, c3, dPdxy3, dPdxy3); + texel += textureGrad(sCube, c3, dPdxy3, dPdxy3); + texel += textureGrad(s2DRect, c2, dPdxy2, dPdxy2); + texel.x += textureGrad(s2DRectShadow, c3, dPdxy2, dPdxy2); + texel.x += textureGrad(s1DShadow, c3, dPdxy1, dPdxy1); + texel.x += textureGrad(s2DShadow, c3, dPdxy2, dPdxy2); + texel.x += textureGrad(sCubeShadow, c4, dPdxy3, dPdxy3); + texel += textureGrad(s1DArray, c2, dPdxy1, dPdxy1); + texel += textureGrad(s2DArray, c3, dPdxy2, dPdxy2); + texel.x += textureGrad(s1DArrayShadow, c3, dPdxy1, dPdxy1); + texel.x += textureGrad(s2DArrayShadow, c4, dPdxy2, dPdxy2); + texel += textureGrad(sCubeArray, c4, dPdxy3, dPdxy3); + + return texel; +} + +vec4 testTextureGradOffset() +{ + vec4 texel = vec4(0.0); + + texel += textureGradOffset(s1D, c1, dPdxy1, dPdxy1, offset1); + texel += textureGradOffset(s2D, c2, dPdxy2, dPdxy2, offset2); + texel += textureGradOffset(s3D, c3, dPdxy3, dPdxy3, offset3); + texel += textureGradOffset(s2DRect, c2, dPdxy2, dPdxy2, offset2); + texel.x += textureGradOffset(s2DRectShadow, c3, dPdxy2, dPdxy2, offset2); + texel.x += textureGradOffset(s1DShadow, c3, dPdxy1, dPdxy1, offset1); + texel.x += textureGradOffset(s2DShadow, c3, dPdxy2, dPdxy2, offset2); + texel += textureGradOffset(s1DArray, c2, dPdxy1, dPdxy1, offset1); + texel += textureGradOffset(s2DArray, c3, dPdxy2, dPdxy2, offset2); + texel.x += textureGradOffset(s1DArrayShadow, c3, dPdxy1, dPdxy1, offset1); + texel.x += textureGradOffset(s2DArrayShadow, c4, dPdxy2, dPdxy2, offset2); + + return texel; +} + +vec4 testTextureProjGrad() +{ + vec4 texel = vec4(0.0); + + texel += textureProjGrad(s1D, c2, dPdxy1, dPdxy1); + texel += textureProjGrad(s1D, c4, dPdxy1, dPdxy1); + texel += textureProjGrad(s2D, c3, dPdxy2, dPdxy2); + texel += textureProjGrad(s2D, c4, dPdxy2, dPdxy2); + texel += textureProjGrad(s3D, c4, dPdxy3, dPdxy3); + texel += textureProjGrad(s2DRect, c3, dPdxy2, dPdxy2); + texel += textureProjGrad(s2DRect, c4, dPdxy2, dPdxy2); + texel.x += textureProjGrad(s2DRectShadow, c4, dPdxy2, dPdxy2); + texel.x += textureProjGrad(s1DShadow, c4, dPdxy1, dPdxy1); + texel.x += textureProjGrad(s2DShadow, c4, dPdxy2, dPdxy2); + + return texel; +} + +vec4 testTextureProjGradoffset() +{ + vec4 texel = vec4(0.0); + + texel += textureProjGradOffset(s1D, c2, dPdxy1, dPdxy1, offset1); + texel += textureProjGradOffset(s1D, c4, dPdxy1, dPdxy1, offset1); + texel += textureProjGradOffset(s2D, c3, dPdxy2, dPdxy2, offset2); + texel += textureProjGradOffset(s2D, c4, dPdxy2, dPdxy2, offset2); + texel += textureProjGradOffset(s2DRect, c3, dPdxy2, dPdxy2, offset2); + texel += textureProjGradOffset(s2DRect, c4, dPdxy2, dPdxy2, offset2); + texel.x += textureProjGradOffset(s2DRectShadow, c4, dPdxy2, dPdxy2, offset2); + texel += textureProjGradOffset(s3D, c4, dPdxy3, dPdxy3, offset3); + texel.x += textureProjGradOffset(s1DShadow, c4, dPdxy1, dPdxy1, offset1); + texel.x += textureProjGradOffset(s2DShadow, c4, dPdxy2, dPdxy2, offset2); + + return texel; +} + +vec4 testTextureGather() +{ + vec4 texel = vec4(0.0); + + texel += textureGather(s2D, c2, 0); + texel += textureGather(s2DArray, c3, 0); + texel += textureGather(sCube, c3, 0); + texel += textureGather(sCubeArray, c4, 0); + texel += textureGather(s2DRect, c2, 0); + texel += textureGather(s2DShadow, c2, compare); + texel += textureGather(s2DArrayShadow, c3, compare); + texel += textureGather(sCubeShadow, c3, compare); + texel += textureGather(sCubeArrayShadow, c4, compare); + texel += textureGather(s2DRectShadow, c2, compare); + + return texel; +} + +vec4 testTextureGatherOffset() +{ + vec4 texel = vec4(0.0); + + texel += textureGatherOffset(s2D, c2, offset2, 0); + texel += textureGatherOffset(s2DArray, c3, offset2, 0); + texel += textureGatherOffset(s2DRect, c2, offset2, 0); + texel += textureGatherOffset(s2DShadow, c2, compare, offset2); + texel += textureGatherOffset(s2DArrayShadow, c3, compare, offset2); + texel += textureGatherOffset(s2DRectShadow, c2, compare, offset2); + + return texel; +} + +vec4 testTextureGatherOffsets() +{ + vec4 texel = vec4(0.0); + + texel += textureGatherOffsets(s2D, c2, offsets, 0); + texel += textureGatherOffsets(s2DArray, c3, offsets, 0); + texel += textureGatherOffsets(s2DRect, c2, offsets, 0); + texel += textureGatherOffsets(s2DShadow, c2, compare, offsets); + texel += textureGatherOffsets(s2DArrayShadow, c3, compare, offsets); + texel += textureGatherOffsets(s2DRectShadow, c2, compare, offsets); + + return texel; +} + +vec4 testTextureGatherLod() +{ + vec4 texel = vec4(0.0); + + texel += textureGatherLodAMD(s2D, c2, lod, 0); + texel += textureGatherLodAMD(s2DArray, c3, lod, 0); + texel += textureGatherLodAMD(sCube, c3, lod, 0); + texel += textureGatherLodAMD(sCubeArray, c4, lod, 0); + + return texel; +} + +vec4 testTextureGatherLodOffset() +{ + vec4 texel = vec4(0.0); + + texel += textureGatherLodOffsetAMD(s2D, c2, lod, offset2, 0); + texel += textureGatherLodOffsetAMD(s2DArray, c3, lod, offset2, 0); + + return texel; +} + +vec4 testTextureGatherLodOffsets() +{ + vec4 texel = vec4(0.0); + + texel += textureGatherLodOffsetsAMD(s2D, c2, lod, offsets, 0); + texel += textureGatherLodOffsetsAMD(s2DArray, c3, lod, offsets, 0); + + return texel; +} + +ivec4 testTextureSize() +{ + ivec4 size = ivec4(0); + + size.x += textureSize(s1D, int(lod)); + size.xy += textureSize(s2D, int(lod)); + size.xyz += textureSize(s3D, int(lod)); + size.xy += textureSize(sCube, int(lod)); + size.x += textureSize(s1DShadow, int(lod)); + size.xy += textureSize(s2DShadow, int(lod)); + size.xy += textureSize(sCubeShadow, int(lod)); + size.xyz += textureSize(sCubeArray, int(lod)); + size.xyz += textureSize(sCubeArrayShadow, int(lod)); + size.xy += textureSize(s2DRect); + size.xy += textureSize(s2DRectShadow); + size.xy += textureSize(s1DArray, int(lod)); + size.xyz += textureSize(s2DArray, int(lod)); + size.xy += textureSize(s1DArrayShadow, int(lod)); + size.xyz += textureSize(s2DArrayShadow, int(lod)); + size.x += textureSize(sBuffer); + size.xy += textureSize(s2DMS); + size.xyz += textureSize(s2DMSArray); + + return size; +} + +vec2 testTextureQueryLod() +{ + vec2 lod = vec2(0.0); + + lod += textureQueryLod(s1D, c1); + lod += textureQueryLod(s2D, c2); + lod += textureQueryLod(s3D, c3); + lod += textureQueryLod(sCube, c3); + lod += textureQueryLod(s1DArray, c1); + lod += textureQueryLod(s2DArray, c2); + lod += textureQueryLod(sCubeArray, c3); + lod += textureQueryLod(s1DShadow, c1); + lod += textureQueryLod(s2DShadow, c2); + lod += textureQueryLod(sCubeArrayShadow, c3); + lod += textureQueryLod(s1DArrayShadow, c1); + lod += textureQueryLod(s2DArrayShadow, c2); + lod += textureQueryLod(sCubeArrayShadow, c3); + + return lod; +} + +int testTextureQueryLevels() +{ + int levels = 0; + + levels += textureQueryLevels(s1D); + levels += textureQueryLevels(s2D); + levels += textureQueryLevels(s3D); + levels += textureQueryLevels(sCube); + levels += textureQueryLevels(s1DShadow); + levels += textureQueryLevels(s2DShadow); + levels += textureQueryLevels(sCubeShadow); + levels += textureQueryLevels(sCubeArray); + levels += textureQueryLevels(sCubeArrayShadow); + levels += textureQueryLevels(s1DArray); + levels += textureQueryLevels(s2DArray); + levels += textureQueryLevels(s1DArrayShadow); + levels += textureQueryLevels(s2DArrayShadow); + + return levels; +} + +int testTextureSamples() +{ + int samples = 0; + + samples += textureSamples(s2DMS); + samples += textureSamples(s2DMSArray); + + return samples; +} + +vec4 testImageLoad() +{ + vec4 texel = vec4(0.0); + + texel += imageLoad(i1D, int(c1)); + texel += imageLoad(i2D, ivec2(c2)); + texel += imageLoad(i3D, ivec3(c3)); + texel += imageLoad(i2DRect, ivec2(c2)); + texel += imageLoad(iCube, ivec3(c3)); + texel += imageLoad(iBuffer, int(c1)); + texel += imageLoad(i1DArray, ivec2(c2)); + texel += imageLoad(i2DArray, ivec3(c3)); + texel += imageLoad(iCubeArray, ivec3(c3)); + texel += imageLoad(i2DMS, ivec2(c2), 1); + texel += imageLoad(i2DMSArray, ivec3(c3), 1); + + return texel; +} + +void testImageStore(vec4 data) +{ + imageStore(i1D, int(c1), data); + imageStore(i2D, ivec2(c2), data); + imageStore(i3D, ivec3(c3), data); + imageStore(i2DRect, ivec2(c2), data); + imageStore(iCube, ivec3(c3), data); + imageStore(iBuffer, int(c1), data); + imageStore(i1DArray, ivec2(c2), data); + imageStore(i2DArray, ivec3(c3), data); + imageStore(iCubeArray, ivec3(c3), data); + imageStore(i2DMS, ivec2(c2), 1, data); + imageStore(i2DMSArray, ivec3(c3), 1, data); +} + +vec4 testSparseTexture() +{ + vec4 texel = vec4(0.0); + + sparseTextureARB(s2D, c2, texel); + sparseTextureARB(s3D, c3, texel); + sparseTextureARB(sCube, c3, texel); + sparseTextureARB(s2DShadow, c3, texel.x); + sparseTextureARB(sCubeShadow, c4, texel.x); + sparseTextureARB(s2DArray, c3, texel); + sparseTextureARB(sCubeArray, c4, texel); + sparseTextureARB(s2DArrayShadow, c4, texel.x); + sparseTextureARB(s2DRect, c2, texel); + sparseTextureARB(s2DRectShadow, c3, texel.x); + sparseTextureARB(sCubeArrayShadow, c4, compare, texel.x); + + return texel; +} + +vec4 testSparseTextureLod() +{ + vec4 texel = vec4(0.0); + + sparseTextureLodARB(s2D, c2, lod, texel); + sparseTextureLodARB(s3D, c3, lod, texel); + sparseTextureLodARB(sCube, c3, lod, texel); + sparseTextureLodARB(s2DShadow, c3, lod, texel.x); + sparseTextureLodARB(s2DArray, c3, lod, texel); + sparseTextureLodARB(sCubeArray, c4, lod, texel); + + return texel; +} + +vec4 testSparseTextureOffset() +{ + vec4 texel = vec4(0.0); + + sparseTextureOffsetARB(s2D, c2, offset2, texel); + sparseTextureOffsetARB(s3D, c3, offset3, texel); + sparseTextureOffsetARB(s2DRect, c2, offset2, texel); + sparseTextureOffsetARB(s2DRectShadow, c3, offset2, texel.x); + sparseTextureOffsetARB(s2DShadow, c3, offset2, texel.x); + sparseTextureOffsetARB(s2DArray, c3, offset2, texel); + sparseTextureOffsetARB(s2DArrayShadow, c4, offset2, texel.x); + + return texel; +} + +vec4 testSparseTextureLodOffset() +{ + vec4 texel = vec4(0.0); + + sparseTextureLodOffsetARB(s2D, c2, lod, offset2, texel); + sparseTextureLodOffsetARB(s3D, c3, lod, offset3, texel); + sparseTextureLodOffsetARB(s2DShadow, c3, lod, offset2, texel.x); + sparseTextureLodOffsetARB(s2DArray, c3, lod, offset2, texel); + + return texel; +} + +vec4 testSparseTextureGrad() +{ + vec4 texel = vec4(0.0); + + sparseTextureGradARB(s2D, c2, dPdxy2, dPdxy2, texel); + sparseTextureGradARB(s3D, c3, dPdxy3, dPdxy3, texel); + sparseTextureGradARB(sCube, c3, dPdxy3, dPdxy3, texel); + sparseTextureGradARB(s2DRect, c2, dPdxy2, dPdxy2, texel); + sparseTextureGradARB(s2DRectShadow, c3, dPdxy2, dPdxy2, texel.x); + sparseTextureGradARB(s2DShadow, c3, dPdxy2, dPdxy2, texel.x); + sparseTextureGradARB(sCubeShadow, c4, dPdxy3, dPdxy3, texel.x); + sparseTextureGradARB(s2DArray, c3, dPdxy2, dPdxy2, texel); + sparseTextureGradARB(s2DArrayShadow, c4, dPdxy2, dPdxy2, texel.x); + sparseTextureGradARB(sCubeArray, c4, dPdxy3, dPdxy3, texel); + + return texel; +} + +vec4 testSparseTextureGradOffset() +{ + vec4 texel = vec4(0.0); + + sparseTextureGradOffsetARB(s2D, c2, dPdxy2, dPdxy2, offset2, texel); + sparseTextureGradOffsetARB(s3D, c3, dPdxy3, dPdxy3, offset3, texel); + sparseTextureGradOffsetARB(s2DRect, c2, dPdxy2, dPdxy2, offset2, texel); + sparseTextureGradOffsetARB(s2DRectShadow, c3, dPdxy2, dPdxy2, offset2, texel.x); + sparseTextureGradOffsetARB(s2DShadow, c3, dPdxy2, dPdxy2, offset2, texel.x); + sparseTextureGradOffsetARB(s2DArray, c3, dPdxy2, dPdxy2, offset2, texel); + sparseTextureGradOffsetARB(s2DArrayShadow, c4, dPdxy2, dPdxy2, offset2, texel.x); + + return texel; +} + +vec4 testSparseTexelFetch() +{ + vec4 texel = vec4(0.0); + + sparseTexelFetchARB(s2D, ivec2(c2), int(lod), texel); + sparseTexelFetchARB(s3D, ivec3(c3), int(lod), texel); + sparseTexelFetchARB(s2DRect, ivec2(c2), texel); + sparseTexelFetchARB(s2DArray, ivec3(c3), int(lod), texel); + sparseTexelFetchARB(s2DMS, ivec2(c2), 1, texel); + sparseTexelFetchARB(s2DMSArray, ivec3(c3), 2, texel); + + return texel; +} + +vec4 testSparseTexelFetchOffset() +{ + vec4 texel = vec4(0.0); + + sparseTexelFetchOffsetARB(s2D, ivec2(c2), int(lod), offset2, texel); + sparseTexelFetchOffsetARB(s3D, ivec3(c3), int(lod), offset3, texel); + sparseTexelFetchOffsetARB(s2DRect, ivec2(c2), offset2, texel); + sparseTexelFetchOffsetARB(s2DArray, ivec3(c3), int(lod), offset2, texel); + + return texel; +} + +vec4 testSparseTextureGather() +{ + vec4 texel = vec4(0.0); + + sparseTextureGatherARB(s2D, c2, texel, 0); + sparseTextureGatherARB(s2DArray, c3, texel, 0); + sparseTextureGatherARB(sCube, c3, texel, 0); + sparseTextureGatherARB(sCubeArray, c4, texel, 0); + sparseTextureGatherARB(s2DRect, c2, texel, 0); + sparseTextureGatherARB(s2DShadow, c2, compare, texel); + sparseTextureGatherARB(s2DArrayShadow, c3, compare, texel); + sparseTextureGatherARB(sCubeShadow, c3, compare, texel); + sparseTextureGatherARB(sCubeArrayShadow, c4, compare, texel); + sparseTextureGatherARB(s2DRectShadow, c2, compare, texel); + + return texel; +} + +vec4 testSparseTextureGatherOffset() +{ + vec4 texel = vec4(0.0); + + sparseTextureGatherOffsetARB(s2D, c2, offset2, texel, 0); + sparseTextureGatherOffsetARB(s2DArray, c3, offset2, texel, 0); + sparseTextureGatherOffsetARB(s2DRect, c2, offset2, texel, 0); + sparseTextureGatherOffsetARB(s2DShadow, c2, compare, offset2, texel); + sparseTextureGatherOffsetARB(s2DArrayShadow, c3, compare, offset2, texel); + sparseTextureGatherOffsetARB(s2DRectShadow, c2, compare, offset2, texel); + + return texel; +} + +vec4 testSparseTextureGatherOffsets() +{ + vec4 texel = vec4(0.0); + const ivec2 constOffsets[4] = ivec2[4](ivec2(1,2), ivec2(3,4), ivec2(15,16), ivec2(-2,0)); + + sparseTextureGatherOffsetsARB(s2D, c2, constOffsets, texel, 0); + sparseTextureGatherOffsetsARB(s2DArray, c3, constOffsets, texel, 0); + sparseTextureGatherOffsetsARB(s2DRect, c2, constOffsets, texel, 0); + sparseTextureGatherOffsetsARB(s2DShadow, c2, compare, constOffsets, texel); + sparseTextureGatherOffsetsARB(s2DArrayShadow, c3, compare, constOffsets, texel); + sparseTextureGatherOffsetsARB(s2DRectShadow, c2, compare, constOffsets, texel); + + return texel; +} + +vec4 testSparseTextureGatherLod() +{ + vec4 texel = vec4(0.0); + + sparseTextureGatherLodAMD(s2D, c2, lod, texel, 0); + sparseTextureGatherLodAMD(s2DArray, c3, lod, texel, 0); + sparseTextureGatherLodAMD(sCube, c3, lod, texel, 0); + sparseTextureGatherLodAMD(sCubeArray, c4, lod, texel, 0); + + return texel; +} + +vec4 testSparseTextureGatherLodOffset() +{ + vec4 texel = vec4(0.0); + + sparseTextureGatherLodOffsetAMD(s2D, c2, lod, offset2, texel, 0); + sparseTextureGatherLodOffsetAMD(s2DArray, c3, lod, offset2, texel, 0); + + return texel; +} + +vec4 testSparseTextureGatherLodOffsets() +{ + vec4 texel = vec4(0.0); + + sparseTextureGatherLodOffsetsAMD(s2D, c2, lod, offsets, texel, 0); + sparseTextureGatherLodOffsetsAMD(s2DArray, c3, lod, offsets, texel, 0); + + return texel; +} + +vec4 testSparseImageLoad() +{ + vec4 texel = vec4(0.0); + + sparseImageLoadARB(i2D, ivec2(c2), texel); + sparseImageLoadARB(i3D, ivec3(c3), texel); + sparseImageLoadARB(i2DRect, ivec2(c2), texel); + sparseImageLoadARB(iCube, ivec3(c3), texel); + sparseImageLoadARB(i2DArray, ivec3(c3), texel); + sparseImageLoadARB(iCubeArray, ivec3(c3), texel); + sparseImageLoadARB(i2DMS, ivec2(c2), 1, texel); + sparseImageLoadARB(i2DMSArray, ivec3(c3), 2, texel); + + return texel; +} + +vec4 testSparseTextureClamp() +{ + vec4 texel = vec4(0.0); + + sparseTextureClampARB(s2D, c2, lodClamp, texel); + sparseTextureClampARB(s3D, c3, lodClamp, texel); + sparseTextureClampARB(sCube, c3, lodClamp, texel); + sparseTextureClampARB(s2DShadow, c3, lodClamp, texel.x); + sparseTextureClampARB(sCubeShadow, c4, lodClamp, texel.x); + sparseTextureClampARB(s2DArray, c3, lodClamp, texel); + sparseTextureClampARB(sCubeArray, c4, lodClamp, texel); + sparseTextureClampARB(s2DArrayShadow, c4, lodClamp, texel.x); + sparseTextureClampARB(sCubeArrayShadow, c4, compare, lodClamp, texel.x); + + return texel; +} + +vec4 testTextureClamp() +{ + vec4 texel = vec4(0.0); + + texel += textureClampARB(s1D, c1, lodClamp); + texel += textureClampARB(s2D, c2, lodClamp); + texel += textureClampARB(s3D, c3, lodClamp); + texel += textureClampARB(sCube, c3, lodClamp); + texel.x += textureClampARB(s1DShadow, c3, lodClamp); + texel.x += textureClampARB(s2DShadow, c3, lodClamp); + texel.x += textureClampARB(sCubeShadow, c4, lodClamp); + texel += textureClampARB(s1DArray, c2, lodClamp); + texel += textureClampARB(s2DArray, c3, lodClamp); + texel += textureClampARB(sCubeArray, c4, lodClamp); + texel.x += textureClampARB(s1DArrayShadow, c3, lodClamp); + texel.x += textureClampARB(s2DArrayShadow, c4, lodClamp); + texel.x += textureClampARB(sCubeArrayShadow, c4, compare, lodClamp); + + return texel; +} + +vec4 testSparseTextureOffsetClamp() +{ + vec4 texel = vec4(0.0); + + sparseTextureOffsetClampARB(s2D, c2, offset2, lodClamp, texel); + sparseTextureOffsetClampARB(s3D, c3, offset3, lodClamp, texel); + sparseTextureOffsetClampARB(s2DShadow, c3, offset2, lodClamp, texel.x); + sparseTextureOffsetClampARB(s2DArray, c3, offset2, lodClamp, texel); + sparseTextureOffsetClampARB(s2DArrayShadow, c4, offset2, lodClamp, texel.x); + + return texel; +} + +vec4 testTextureOffsetClamp() +{ + vec4 texel = vec4(0.0); + + texel += textureOffsetClampARB(s1D, c1, offset1, lodClamp); + texel += textureOffsetClampARB(s2D, c2, offset2, lodClamp); + texel += textureOffsetClampARB(s3D, c3, offset3, lodClamp); + texel.x += textureOffsetClampARB(s1DShadow, c3, offset1, lodClamp); + texel.x += textureOffsetClampARB(s2DShadow, c3, offset2, lodClamp); + texel += textureOffsetClampARB(s1DArray, c2, offset1, lodClamp); + texel += textureOffsetClampARB(s2DArray, c3, offset2, lodClamp); + texel.x += textureOffsetClampARB(s1DArrayShadow, c3, offset1, lodClamp); + texel.x += textureOffsetClampARB(s2DArrayShadow, c4, offset2, lodClamp); + + return texel; +} + +vec4 testSparseTextureGradClamp() +{ + vec4 texel = vec4(0.0); + + sparseTextureGradClampARB(s2D, c2, dPdxy2, dPdxy2, lodClamp, texel); + sparseTextureGradClampARB(s3D, c3, dPdxy3, dPdxy3, lodClamp, texel); + sparseTextureGradClampARB(sCube, c3, dPdxy3, dPdxy3, lodClamp, texel); + sparseTextureGradClampARB(s2DShadow, c3, dPdxy2, dPdxy2, lodClamp, texel.x); + sparseTextureGradClampARB(sCubeShadow, c4, dPdxy3, dPdxy3, lodClamp, texel.x); + sparseTextureGradClampARB(s2DArray, c3, dPdxy2, dPdxy2, lodClamp, texel); + sparseTextureGradClampARB(s2DArrayShadow, c4, dPdxy2, dPdxy2, lodClamp, texel.x); + sparseTextureGradClampARB(sCubeArray, c4, dPdxy3, dPdxy3, lodClamp, texel); + + return texel; +} + +vec4 testTextureGradClamp() +{ + vec4 texel = vec4(0.0); + + texel += textureGradClampARB(s1D, c1, dPdxy1, dPdxy1, lodClamp); + texel += textureGradClampARB(s2D, c2, dPdxy2, dPdxy2, lodClamp); + texel += textureGradClampARB(s3D, c3, dPdxy3, dPdxy3, lodClamp); + texel += textureGradClampARB(sCube, c3, dPdxy3, dPdxy3, lodClamp); + texel.x += textureGradClampARB(s1DShadow, c3, dPdxy1, dPdxy1, lodClamp); + texel.x += textureGradClampARB(s2DShadow, c3, dPdxy2, dPdxy2, lodClamp); + texel.x += textureGradClampARB(sCubeShadow, c4, dPdxy3, dPdxy3, lodClamp); + texel += textureGradClampARB(s1DArray, c2, dPdxy1, dPdxy1, lodClamp); + texel += textureGradClampARB(s2DArray, c3, dPdxy2, dPdxy2, lodClamp); + texel.x += textureGradClampARB(s1DArrayShadow, c3, dPdxy1, dPdxy1, lodClamp); + texel.x += textureGradClampARB(s2DArrayShadow, c4, dPdxy2, dPdxy2, lodClamp); + texel += textureGradClampARB(sCubeArray, c4, dPdxy3, dPdxy3, lodClamp); + + return texel; +} + +vec4 testSparseTextureGradOffsetClamp() +{ + vec4 texel = vec4(0.0); + + sparseTextureGradOffsetClampARB(s2D, c2, dPdxy2, dPdxy2, offset2, lodClamp, texel); + sparseTextureGradOffsetClampARB(s3D, c3, dPdxy3, dPdxy3, offset3, lodClamp, texel); + sparseTextureGradOffsetClampARB(s2DShadow, c3, dPdxy2, dPdxy2, offset2, lodClamp, texel.x); + sparseTextureGradOffsetClampARB(s2DArray, c3, dPdxy2, dPdxy2, offset2, lodClamp, texel); + sparseTextureGradOffsetClampARB(s2DArrayShadow, c4, dPdxy2, dPdxy2, offset2, lodClamp, texel.x); + + return texel; +} + +vec4 testTextureGradOffsetClamp() +{ + vec4 texel = vec4(0.0); + + texel += textureGradOffsetClampARB(s1D, c1, dPdxy1, dPdxy1, offset1, lodClamp); + texel += textureGradOffsetClampARB(s2D, c2, dPdxy2, dPdxy2, offset2, lodClamp); + texel += textureGradOffsetClampARB(s3D, c3, dPdxy3, dPdxy3, offset3, lodClamp); + texel.x += textureGradOffsetClampARB(s1DShadow, c3, dPdxy1, dPdxy1, offset1, lodClamp); + texel.x += textureGradOffsetClampARB(s2DShadow, c3, dPdxy2, dPdxy2, offset2, lodClamp); + texel += textureGradOffsetClampARB(s1DArray, c2, dPdxy1, dPdxy1, offset1, lodClamp); + texel += textureGradOffsetClampARB(s2DArray, c3, dPdxy2, dPdxy2, offset2, lodClamp); + texel.x += textureGradOffsetClampARB(s1DArrayShadow, c3, dPdxy1, dPdxy1, offset1, lodClamp); + texel.x += textureGradOffsetClampARB(s2DArrayShadow, c4, dPdxy2, dPdxy2, offset2, lodClamp); + + return texel; +} + +vec4 testCombinedTextureSampler() +{ + vec4 texel = vec4(0.0); + + texel += texture(sampler1D(t1D, s), c1); + texel += texture(sampler2D(t2D, s), c2); + texel += texture(sampler3D(t3D, s), c3); + texel += texture(samplerCube(tCube, s), c3); + texel.x += texture(sampler1DShadow(t1D, sShadow), c3); + texel.x += texture(sampler2DShadow(t2D, sShadow), c3); + texel.x += texture(samplerCubeShadow(tCube, sShadow), c4); + texel += texture(sampler1DArray(t1DArray, s), c2); + texel += texture(sampler2DArray(t2DArray, s), c3); + texel += texture(samplerCubeArray(tCubeArray, s), c4); + texel.x += texture(sampler1DArrayShadow(t1DArray, sShadow), c3); + texel.x += texture(sampler2DArrayShadow(t2DArray, sShadow), c4); + texel += texture(sampler2DRect(t2DRect, s), c2); + texel.x += texture(sampler2DRectShadow(t2DRect, sShadow), c3); + texel.x += texture(samplerCubeArrayShadow(tCubeArray, sShadow), c4, compare); + + return texel; +} + +vec4 testSubpassLoad() +{ + return subpassLoad(subpass) + subpassLoad(subpassMS, 2); +} + +void main() +{ + vec4 result = vec4(0.0); + + result += testTexture(); + result += testTextureProj(); + result += testTextureLod(); + result += testTextureOffset(); + result += testTextureLodOffset(); + result += testTextureProjLodOffset(); + result += testTexelFetch(); + result += testTexelFetchOffset(); + result += testTextureGrad(); + result += testTextureGradOffset(); + result += testTextureProjGrad(); + result += testTextureProjGradoffset(); + result += testTextureGather(); + result += testTextureGatherOffset(); + result += testTextureGatherOffsets(); + result += testTextureGatherLod(); + result += testTextureGatherLodOffset(); + result += testTextureGatherLodOffsets(); + + result += vec4(testTextureSize()); + result.xy += vec2(testTextureQueryLod()); + result.x += testTextureQueryLevels(); + result.x += testTextureSamples(); + + result += testImageLoad(); + testImageStore(result); + + result += testSparseTexture(); + result += testSparseTextureLod(); + result += testSparseTextureOffset(); + result += testSparseTextureLodOffset(); + result += testSparseTextureGrad(); + result += testSparseTextureGradOffset(); + result += testSparseTexelFetch(); + result += testSparseTexelFetchOffset(); + result += testSparseTextureGather(); + result += testSparseTextureGatherOffset(); + result += testSparseTextureGatherOffsets(); + result += testSparseTextureGatherLod(); + result += testSparseTextureGatherLodOffset(); + result += testSparseTextureGatherLodOffsets(); + + result += testSparseImageLoad(); + + result += testSparseTextureClamp(); + result += testTextureClamp(); + result += testSparseTextureOffsetClamp(); + result += testTextureOffsetClamp(); + result += testSparseTextureGrad(); + result += testTextureGrad(); + result += testSparseTextureGradOffsetClamp(); + result += testTextureGradOffsetClamp(); + + result += testCombinedTextureSampler(); + result += testSubpassLoad(); + + fragColor = result; +} + diff --git a/Test/spv.intcoopmat.comp b/Test/spv.intcoopmat.comp index 235aa16b..65aa27a8 100755 --- a/Test/spv.intcoopmat.comp +++ b/Test/spv.intcoopmat.comp @@ -1,117 +1,123 @@ #version 450 core -#extension GL_KHR_memory_scope_semantics : enable -#extension GL_NV_cooperative_matrix : enable -#extension GL_NV_integer_cooperative_matrix : enable -#extension GL_EXT_shader_explicit_arithmetic_types : enable -#extension GL_EXT_buffer_reference : enable - +#extension GL_KHR_memory_scope_semantics : enable +#extension GL_NV_cooperative_matrix : enable +#extension GL_NV_integer_cooperative_matrix : enable +#extension GL_EXT_shader_explicit_arithmetic_types : enable +#extension GL_EXT_buffer_reference : enable + layout (local_size_x = 64, local_size_y = 1, local_size_z = 1) in; - -const int X = 8; -layout(constant_id = 0) const int Y = 2; -const int Z = X*Y; - -icoopmatNV<8, gl_ScopeSubgroup, Z, 8> miC; -icoopmatNV<8, gl_ScopeSubgroup, Z, 8> miC2[3]; -ucoopmatNV<8, gl_ScopeSubgroup, Z, 8> muC; -ucoopmatNV<8, gl_ScopeSubgroup, Z, 8> muC2[3]; - -int iarr[miC.length()]; -int iarr2[miC2[1].length()]; -int uarr[muC.length()]; -int uarr2[muC2[1].length()]; - -const icoopmatNV<32, gl_ScopeSubgroup, Z, 8> mD = icoopmatNV<32, gl_ScopeSubgroup, Z, 8>(1); -const ucoopmatNV<8, gl_ScopeSubgroup, 8, 8> mD2 = ucoopmatNV<8, gl_ScopeSubgroup, 8, 8>(1); - -struct S { int a; int b; int c; }; - -const S s = S(12, 23, 34); - -layout(set = 0, binding = 0, buffer_reference) coherent buffer Block { - uint y[1024*1024]; - uint x[]; -} block; - -layout(set = 0, binding = 0) coherent buffer Block16 { - int8_t y[1024*1024]; - int8_t x[]; - - Block b; -} block8; - -icoopmatNV<8, gl_ScopeSubgroup, 8, 8> ineg(icoopmatNV<8, gl_ScopeSubgroup, 8, 8> m) { return -m; } -ucoopmatNV<8, gl_ScopeSubgroup, 8, 8> umul(ucoopmatNV<8, gl_ScopeSubgroup, 8, 8> m) { return m * uint8_t(2); } - -layout(constant_id = 2) const int SC = 1; -ucoopmatNV<32, gl_ScopeSubgroup, SC, SC> scm[SC][SC]; - -// sized for icoopmatNV<8, gl_ScopeSubgroup, 16, 16> -shared uvec4 shmatrix[16*16*2/16]; - + +const int X = 8; +layout(constant_id = 0) const int Y = 2; +const int Z = X*Y; + +icoopmatNV<8, gl_ScopeSubgroup, Z, 8> miC; +icoopmatNV<8, gl_ScopeSubgroup, Z, 8> miC2[3]; +ucoopmatNV<8, gl_ScopeSubgroup, Z, 8> muC; +ucoopmatNV<8, gl_ScopeSubgroup, Z, 8> muC2[3]; + +int iarr[miC.length()]; +int iarr2[miC2[1].length()]; +int uarr[muC.length()]; +int uarr2[muC2[1].length()]; + +const icoopmatNV<32, gl_ScopeSubgroup, Z, 8> mD = icoopmatNV<32, gl_ScopeSubgroup, Z, 8>(1); +const ucoopmatNV<8, gl_ScopeSubgroup, 8, 8> mD2 = ucoopmatNV<8, gl_ScopeSubgroup, 8, 8>(1); + +struct S { int a; int b; int c; }; + +const S s = S(12, 23, 34); + +layout(set = 0, binding = 0, buffer_reference) coherent buffer Block { + uint y[1024*1024]; + uint x[]; +} block; + +layout(set = 0, binding = 0) coherent buffer Block16 { + int8_t y[1024*1024]; + int8_t x[]; + + Block b; +} block8; + +icoopmatNV<8, gl_ScopeSubgroup, 8, 8> ineg(icoopmatNV<8, gl_ScopeSubgroup, 8, 8> m) { return -m; } +ucoopmatNV<8, gl_ScopeSubgroup, 8, 8> umul(ucoopmatNV<8, gl_ScopeSubgroup, 8, 8> m) { return m * uint8_t(2); } + +layout(constant_id = 2) const int SC = 1; +ucoopmatNV<32, gl_ScopeSubgroup, SC, SC> scm[SC][SC]; + +// sized for icoopmatNV<8, gl_ScopeSubgroup, 16, 16> +shared uvec4 shmatrix[16*16*2/16]; + void main() { - ucoopmatNV<8, gl_ScopeSubgroup, 16, (2>1?8:4)> mu = ucoopmatNV<8, gl_ScopeSubgroup, 16, (2>1?8:4)>(2); - icoopmatNV<8, gl_ScopeSubgroup, 16, (2>1?8:4)> mi = icoopmatNV<8, gl_ScopeSubgroup, 16, (2>1?8:4)>(2); - - mu = mu + mu; - mu = mu - mu; - mi = -mi; - mi = mi * int8_t(2); - - fcoopmatNV<16, gl_ScopeSubgroup, 16, 8> mf16_0 = fcoopmatNV<16, gl_ScopeSubgroup, 16, 8>(mu); - fcoopmatNV<32, gl_ScopeSubgroup, 16, 8> mf32_0 = fcoopmatNV<32, gl_ScopeSubgroup, 16, 8>(mu); - fcoopmatNV<16, gl_ScopeSubgroup, 16, 8> mf16_1 = fcoopmatNV<16, gl_ScopeSubgroup, 16, 8>(mi); - fcoopmatNV<32, gl_ScopeSubgroup, 16, 8> mf32_1 = fcoopmatNV<32, gl_ScopeSubgroup, 16, 8>(mi); - - uint8_t x = mu[1]; - mi[0] = int8_t(x); - - coopMatLoadNV(mi, block.x, 16, 128, false); - coopMatStoreNV(mi, block.x, 16, 128, false); - coopMatLoadNV(mu, block8.x, 16, 128, false); - coopMatStoreNV(mu, block8.x, 16, 128, false); - coopMatLoadNV(mi, block8.b.x, 16, 128, false); - coopMatStoreNV(mi, block8.b.x, 16, 128, false); - - ucoopmatNV<8, gl_ScopeSubgroup, 16, 8> A; - ucoopmatNV<8, gl_ScopeSubgroup, 8, 8> B; - ucoopmatNV<8, gl_ScopeSubgroup, 16, 8> C; - ucoopmatNV<8, gl_ScopeSubgroup, 16, 8> D; - D = coopMatMulAddNV(A, B, C); - - int l = D.length(); - - - icoopmatNV<8, gl_ScopeSubgroup, 16, (2>1?8:4)> a[5]; - a[3][0] = int8_t(1); - - int md1 = mD[1]; - - md1 += (mi += mi)[1234]; - + ucoopmatNV<8, gl_ScopeSubgroup, 16, (2>1?8:4)> mu = ucoopmatNV<8, gl_ScopeSubgroup, 16, (2>1?8:4)>(2); + icoopmatNV<8, gl_ScopeSubgroup, 16, (2>1?8:4)> mi = icoopmatNV<8, gl_ScopeSubgroup, 16, (2>1?8:4)>(2); + + mu = mu + mu; + mu = mu - mu; + mi = -mi; + mi = mi * int8_t(2); + + fcoopmatNV<16, gl_ScopeSubgroup, 16, 8> mf16_0 = fcoopmatNV<16, gl_ScopeSubgroup, 16, 8>(mu); + fcoopmatNV<32, gl_ScopeSubgroup, 16, 8> mf32_0 = fcoopmatNV<32, gl_ScopeSubgroup, 16, 8>(mu); + fcoopmatNV<16, gl_ScopeSubgroup, 16, 8> mf16_1 = fcoopmatNV<16, gl_ScopeSubgroup, 16, 8>(mi); + fcoopmatNV<32, gl_ScopeSubgroup, 16, 8> mf32_1 = fcoopmatNV<32, gl_ScopeSubgroup, 16, 8>(mi); + + uint8_t x = mu[1]; + mi[0] = int8_t(x); + + coopMatLoadNV(mi, block.x, 16, 128, false); + coopMatStoreNV(mi, block.x, 16, 128, false); + coopMatLoadNV(mu, block8.x, 16, 128, false); + coopMatStoreNV(mu, block8.x, 16, 128, false); + coopMatLoadNV(mi, block8.b.x, 16, 128, false); + coopMatStoreNV(mi, block8.b.x, 16, 128, false); + + ucoopmatNV<8, gl_ScopeSubgroup, 16, 8> A; + ucoopmatNV<8, gl_ScopeSubgroup, 8, 8> B; + ucoopmatNV<8, gl_ScopeSubgroup, 16, 8> C; + ucoopmatNV<8, gl_ScopeSubgroup, 16, 8> D; + D = coopMatMulAddNV(A, B, C); + + int l = D.length(); + + + icoopmatNV<8, gl_ScopeSubgroup, 16, (2>1?8:4)> a[5]; + a[3][0] = int8_t(1); + + int md1 = mD[1]; + + md1 += (mi += mi)[1234]; + muC2[0] = muC2[1]; - muC2[1][0] = (miC2[2][0]); - - coopMatLoadNV(mi, block.y, 16, 128, false); - coopMatStoreNV(mi, block.y, 16, 128, false); - coopMatLoadNV(mu, block8.y, 16, 128, false); - coopMatStoreNV(mu, block8.y, 16, 128, false); - - icoopmatNV<8, gl_ScopeSubgroup, 8, 8> p1; - ucoopmatNV<8, gl_ScopeSubgroup, 8, 8> p2; - - p1 = ineg(p1); - p2 = umul(p2); - - p1 /= p1; + muC2[1][0] = (miC2[2][0]); + + coopMatLoadNV(mi, block.y, 16, 128, false); + coopMatStoreNV(mi, block.y, 16, 128, false); + coopMatLoadNV(mu, block8.y, 16, 128, false); + coopMatStoreNV(mu, block8.y, 16, 128, false); + + icoopmatNV<8, gl_ScopeSubgroup, 8, 8> p1; + ucoopmatNV<8, gl_ScopeSubgroup, 8, 8> p2; + + p1 = ineg(p1); + p2 = umul(p2); + + p1 /= p1; p2 /= p2; - - p1 *= int8_t(2); - p2 *= uint8_t(4); - - icoopmatNV<8, gl_ScopeSubgroup, 16, 8> ms; - coopMatLoadNV(ms, shmatrix, 1, 2, false); - coopMatStoreNV(ms, shmatrix, 1, 2, false); - + + p1 *= int8_t(2); + p2 *= uint8_t(4); + + icoopmatNV<8, gl_ScopeSubgroup, 16, 8> ms; + coopMatLoadNV(ms, shmatrix, 1, 2, false); + coopMatStoreNV(ms, shmatrix, 1, 2, false); + + icoopmatNV<16, gl_ScopeSubgroup, 16, 8> i16 = icoopmatNV<16, gl_ScopeSubgroup, 16, 8>(0); + ucoopmatNV<16, gl_ScopeSubgroup, 16, 8> u16 = ucoopmatNV<16, gl_ScopeSubgroup, 16, 8>(0); + coopMatLoadNV(i16, shmatrix, 1, 2, false); + coopMatStoreNV(i16, shmatrix, 1, 2, false); + coopMatLoadNV(u16, shmatrix, 1, 2, false); + coopMatStoreNV(u16, shmatrix, 1, 2, false); } diff --git a/Test/spv.intrinsicsFakeEnable.vert b/Test/spv.intrinsicsFakeEnable.vert new file mode 100755 index 00000000..a6d6a312 --- /dev/null +++ b/Test/spv.intrinsicsFakeEnable.vert @@ -0,0 +1,10 @@ +#version 460 core +#extension GL_EXT_spirv_intrinsics : enable + +// ERROR: Overlapped input location. Make sure it could be detected even +// if GL_EXT_spirv_intrinsics is enabled. +layout(location = 0) in vec4 v4; +layout(location = 0) in vec3 v3; + +void main() { +} diff --git a/Test/spv.intrinsicsSpirvDecorateId.comp b/Test/spv.intrinsicsSpirvDecorateId.comp new file mode 100755 index 00000000..58a35d61 --- /dev/null +++ b/Test/spv.intrinsicsSpirvDecorateId.comp @@ -0,0 +1,16 @@ +#version 460 core +#extension GL_EXT_spirv_intrinsics: enable + +layout(local_size_x = 1) in; + +layout(binding = 1) uniform CounterBuffer { + uint counter; +} x; + +layout(binding = 0) spirv_decorate_id(extensions = ["SPV_GOOGLE_hlsl_functionality1"], 5634, x) uniform Uniform { + uint y; +}; + +void main() +{ +} diff --git a/Test/spv.intrinsicsSpirvDecorateString.comp b/Test/spv.intrinsicsSpirvDecorateString.comp new file mode 100755 index 00000000..7de65fce --- /dev/null +++ b/Test/spv.intrinsicsSpirvDecorateString.comp @@ -0,0 +1,15 @@ +#version 460 core +#extension GL_EXT_spirv_intrinsics : require + +spirv_decorate_string(extensions = ["SPV_GOOGLE_hlsl_functionality1"], 5635, "foobar") // UserSemantic +spirv_decorate(0) // RelaxedPrecision +float x = 0.5; + +spirv_decorate(0) // RelaxedPrecision +spirv_decorate_string(extensions = ["SPV_GOOGLE_hlsl_functionality1"], 5635, "foobar") // UserSemantic +float y = 1.0; + +layout(local_size_x = 1) in; +void main() +{ +} diff --git a/Test/spv.intrinsicsSpirvTypeWithTypeSpecifier.vert b/Test/spv.intrinsicsSpirvTypeWithTypeSpecifier.vert new file mode 100755 index 00000000..f17da98e --- /dev/null +++ b/Test/spv.intrinsicsSpirvTypeWithTypeSpecifier.vert @@ -0,0 +1,25 @@ +#version 450 core + +#extension GL_ARB_gpu_shader_int64: enable +#extension GL_EXT_buffer_reference: enable +#extension GL_EXT_spirv_intrinsics: enable + +#define CapabilityPhysicalStorageBufferAddresses 5347 +#define StorageClassPhysicalStorageBuffer 5349 +#define OpTypePointer 32 +#define OpLoad 61 +#define OpConvertUToPtr 120 + +#define uintStoragePtr spirv_type(extensions = ["SPV_EXT_physical_storage_buffer", "SPV_KHR_variable_pointers"], capabilities = [CapabilityPhysicalStorageBufferAddresses], id = OpTypePointer, StorageClassPhysicalStorageBuffer, uint) + +// Just to enable the memory model of physical storage buffer +layout(buffer_reference, std430) buffer Dummy { + uint dummy; +}; + +spirv_instruction(id = OpLoad) uint loadUint(uintStoragePtr pointer, spirv_literal uint memoryOperands, spirv_literal uint alignment); +spirv_instruction(id = OpConvertUToPtr) uintStoragePtr convertToPtr(uint64_t value); + +void main() { + uint value = loadUint(convertToPtr(1), 0x2, 32); +} diff --git a/Test/spv.nv.dmm-allops.comp b/Test/spv.nv.dmm-allops.comp new file mode 100755 index 00000000..5c6ed360 --- /dev/null +++ b/Test/spv.nv.dmm-allops.comp @@ -0,0 +1,19 @@ +#version 460 +#extension GL_NV_displacement_micromap : enable +#extension GL_EXT_ray_query : enable +layout(local_size_x = 16) in; +layout(binding = 1) uniform accelerationStructureEXT as; +layout(binding = 0) buffer block { + vec3 op_pos; + vec2 op_bary; +}; +void main() +{ + op_pos = fetchMicroTriangleVertexPositionNV(as, 1, 1, 1, ivec2(0,0)); + op_pos += fetchMicroTriangleVertexPositionNV(as, 1, 1, 1, ivec2(0,1)); + op_pos += fetchMicroTriangleVertexPositionNV(as, 1, 1, 1, ivec2(1,0)); + + op_bary = fetchMicroTriangleVertexBarycentricNV(as, 1, 1, 1, ivec2(0,0)); + op_bary += fetchMicroTriangleVertexBarycentricNV(as, 1, 1, 1, ivec2(0,1)); + op_bary += fetchMicroTriangleVertexBarycentricNV(as, 1, 1, 1, ivec2(1,0)); +} diff --git a/Test/spv.nv.dmm-allops.mesh b/Test/spv.nv.dmm-allops.mesh new file mode 100755 index 00000000..6cb945b8 --- /dev/null +++ b/Test/spv.nv.dmm-allops.mesh @@ -0,0 +1,20 @@ +#version 460 +#extension GL_NV_displacement_micromap : enable +#extension GL_NV_mesh_shader : enable +#extension GL_EXT_ray_query : enable +layout(max_vertices = 8, max_primitives = 16, triangles) out; +layout(binding = 1) uniform accelerationStructureEXT as; +layout(binding = 0) buffer block { + vec3 op_pos; + vec2 op_bary; +}; +void main() +{ + op_pos = fetchMicroTriangleVertexPositionNV(as, 1, 1, 1, ivec2(0,0)); + op_pos += fetchMicroTriangleVertexPositionNV(as, 1, 1, 1, ivec2(0,1)); + op_pos += fetchMicroTriangleVertexPositionNV(as, 1, 1, 1, ivec2(1,0)); + + op_bary = fetchMicroTriangleVertexBarycentricNV(as, 1, 1, 1, ivec2(0,0)); + op_bary += fetchMicroTriangleVertexBarycentricNV(as, 1, 1, 1, ivec2(0,1)); + op_bary += fetchMicroTriangleVertexBarycentricNV(as, 1, 1, 1, ivec2(1,0)); +} diff --git a/Test/spv.nv.dmm-allops.rahit b/Test/spv.nv.dmm-allops.rahit new file mode 100755 index 00000000..3edb676f --- /dev/null +++ b/Test/spv.nv.dmm-allops.rahit @@ -0,0 +1,26 @@ +#version 460 +#extension GL_EXT_ray_tracing : enable +#extension GL_EXT_ray_query : enable +#extension GL_NV_displacement_micromap : enable +layout(binding = 1) uniform accelerationStructureEXT as; +layout(binding = 0) buffer block { + vec3 op_pos; + vec2 op_bary; + uint op_hit; +}; +void main() +{ + op_pos = gl_HitMicroTriangleVertexPositionsNV[0]; + op_pos += gl_HitMicroTriangleVertexPositionsNV[1]; + op_pos += gl_HitMicroTriangleVertexPositionsNV[2]; + + op_bary = gl_HitMicroTriangleVertexBarycentricsNV[0]; + op_bary += gl_HitMicroTriangleVertexBarycentricsNV[1]; + op_bary += gl_HitMicroTriangleVertexBarycentricsNV[2]; + + op_hit = gl_HitKindEXT; + op_hit &= gl_HitKindFrontFacingTriangleEXT | + gl_HitKindBackFacingTriangleEXT | + gl_HitKindFrontFacingMicroTriangleNV | + gl_HitKindBackFacingMicroTriangleNV; +} diff --git a/Test/spv.nv.dmm-allops.rchit b/Test/spv.nv.dmm-allops.rchit new file mode 100755 index 00000000..3edb676f --- /dev/null +++ b/Test/spv.nv.dmm-allops.rchit @@ -0,0 +1,26 @@ +#version 460 +#extension GL_EXT_ray_tracing : enable +#extension GL_EXT_ray_query : enable +#extension GL_NV_displacement_micromap : enable +layout(binding = 1) uniform accelerationStructureEXT as; +layout(binding = 0) buffer block { + vec3 op_pos; + vec2 op_bary; + uint op_hit; +}; +void main() +{ + op_pos = gl_HitMicroTriangleVertexPositionsNV[0]; + op_pos += gl_HitMicroTriangleVertexPositionsNV[1]; + op_pos += gl_HitMicroTriangleVertexPositionsNV[2]; + + op_bary = gl_HitMicroTriangleVertexBarycentricsNV[0]; + op_bary += gl_HitMicroTriangleVertexBarycentricsNV[1]; + op_bary += gl_HitMicroTriangleVertexBarycentricsNV[2]; + + op_hit = gl_HitKindEXT; + op_hit &= gl_HitKindFrontFacingTriangleEXT | + gl_HitKindBackFacingTriangleEXT | + gl_HitKindFrontFacingMicroTriangleNV | + gl_HitKindBackFacingMicroTriangleNV; +} diff --git a/Test/spv.nv.dmm-allops.rgen b/Test/spv.nv.dmm-allops.rgen new file mode 100755 index 00000000..447df68a --- /dev/null +++ b/Test/spv.nv.dmm-allops.rgen @@ -0,0 +1,24 @@ +#version 460 +#extension GL_NV_displacement_micromap : enable +#extension GL_EXT_ray_query : enable +layout(binding = 1) uniform accelerationStructureEXT as; +layout(binding = 0) buffer block { + vec3 op_pos; + vec2 op_bary; + uint op_hitmask; +}; +void main() +{ + op_pos = fetchMicroTriangleVertexPositionNV(as, 1, 1, 1, ivec2(0,0)); + op_pos += fetchMicroTriangleVertexPositionNV(as, 1, 1, 1, ivec2(0,1)); + op_pos += fetchMicroTriangleVertexPositionNV(as, 1, 1, 1, ivec2(1,0)); + + op_bary = fetchMicroTriangleVertexBarycentricNV(as, 1, 1, 1, ivec2(0,0)); + op_bary += fetchMicroTriangleVertexBarycentricNV(as, 1, 1, 1, ivec2(0,1)); + op_bary += fetchMicroTriangleVertexBarycentricNV(as, 1, 1, 1, ivec2(1,0)); + + op_hitmask = gl_HitKindFrontFacingTriangleEXT | + gl_HitKindBackFacingTriangleEXT | + gl_HitKindFrontFacingMicroTriangleNV | + gl_HitKindBackFacingMicroTriangleNV; +} diff --git a/Test/spv.nv.hitobject-allops.rchit b/Test/spv.nv.hitobject-allops.rchit new file mode 100755 index 00000000..e7db3593 --- /dev/null +++ b/Test/spv.nv.hitobject-allops.rchit @@ -0,0 +1,55 @@ +#version 460 +#extension GL_EXT_ray_tracing : enable +#extension GL_NV_shader_invocation_reorder : enable +#extension GL_NV_ray_tracing_motion_blur : enable +layout(location = 1) rayPayloadEXT vec4 payload; +layout(location = 2) rayPayloadEXT pBlock { vec2 val1; vec2 val2; }; +layout(location = 2) hitObjectAttributeNV vec2 attr; +layout(location = 3) hitObjectAttributeNV hBlock { float attrval;}; +layout(binding = 0) uniform accelerationStructureEXT as; +layout(binding = 1) buffer block { + float op; +}; +void main() +{ + hitObjectNV hObj; + hitObjectNV hObjHit, hObjMiss, hObjNop; + attr = vec2(1.0); + attrval = 2.0; + hitObjectTraceRayNV(hObj, as, 1U, 1U, 1U, 1U, 1U, vec3(0.5), 0.5, vec3(1), 1.0, 1); + hitObjectTraceRayMotionNV(hObj, as, 1U, 1U, 1U, 1U, 1U, vec3(0.5), 0.5, vec3(1), 1.0, 10.0, 2); + hitObjectRecordHitNV(hObj, as, 1, 1, 1, 2U, 2U, 2U, vec3(1), 1.0f, vec3(2), 2.0f, 2); + hitObjectRecordHitMotionNV(hObj, as, 1, 1, 1, 2U, 2U, 2U, vec3(1), 1.0f, vec3(2), 2.0f, 4.0f, 2); + hitObjectRecordHitWithIndexNV(hObjHit, as, 1, 1, 1, 2U, 2U, vec3(1), 1.0f, vec3(2), 2.0f, 3); + hitObjectRecordHitWithIndexMotionNV(hObjHit, as, 1, 1, 1, 2U, 2U, vec3(1), 1.0f, vec3(2), 2.0f, 4.0f, 3); + hitObjectRecordEmptyNV(hObjNop); + hitObjectRecordMissNV(hObjMiss, 1U, vec3(0.5), 2.0, vec3(1.5), 5.0); + hitObjectRecordMissMotionNV(hObjMiss, 1U, vec3(0.5), 2.0, vec3(1.5), 5.0, 8.0f); + hitObjectExecuteShaderNV(hObjHit, 2); + if (hitObjectIsHitNV(hObj)) { + op = 1.0f; + } else if (hitObjectIsMissNV(hObj)) { + op = 2.0f; + } else if (hitObjectIsEmptyNV(hObj)) { + op = 3.0f; + } + + + float tmin = hitObjectGetRayTMinNV(hObjHit); + float tmax = hitObjectGetRayTMaxNV(hObjHit); + vec3 orig = hitObjectGetWorldRayOriginNV(hObjHit); + vec3 dir = hitObjectGetWorldRayDirectionNV(hObjHit); + vec3 oorig = hitObjectGetObjectRayOriginNV(hObjHit); + vec3 odir = hitObjectGetObjectRayDirectionNV(hObjHit); + mat4x3 otw = hitObjectGetObjectToWorldNV(hObjHit); + mat4x3 wto = hitObjectGetWorldToObjectNV(hObjHit); + int cid = hitObjectGetInstanceCustomIndexNV(hObjMiss); + int iid = hitObjectGetInstanceIdNV(hObjNop); + int pid = hitObjectGetPrimitiveIndexNV(hObj); + int gid = hitObjectGetGeometryIndexNV(hObj); + uint hkind = hitObjectGetHitKindNV(hObj); + hitObjectGetAttributesNV(hObj, 2); + uvec2 handle = hitObjectGetShaderRecordBufferHandleNV(hObj); + uint rid = hitObjectGetShaderBindingTableRecordIndexNV(hObj); + +} diff --git a/Test/spv.nv.hitobject-allops.rgen b/Test/spv.nv.hitobject-allops.rgen new file mode 100755 index 00000000..f2f37f74 --- /dev/null +++ b/Test/spv.nv.hitobject-allops.rgen @@ -0,0 +1,61 @@ +#version 460 +#extension GL_EXT_ray_tracing : enable +#extension GL_NV_shader_invocation_reorder : enable +#extension GL_NV_ray_tracing_motion_blur : enable +layout(location = 1) rayPayloadEXT vec4 payload; +layout(location = 2) rayPayloadEXT pBlock { vec2 val1; vec2 val2; }; +layout(location = 2) hitObjectAttributeNV vec2 attr; +layout(location = 3) hitObjectAttributeNV hBlock { float attrval;}; +layout(binding = 0) uniform accelerationStructureEXT as; +layout(binding = 1) buffer block { + float op; +}; +void main() +{ + hitObjectNV hObj; + hitObjectNV hObjHit, hObjMiss, hObjNop; + attr = vec2(1.0); + attrval = 2.0; + hitObjectTraceRayNV(hObj, as, 1U, 1U, 1U, 1U, 1U, vec3(0.5), 0.5, vec3(1), 1.0, 1); + hitObjectTraceRayMotionNV(hObj, as, 1U, 1U, 1U, 1U, 1U, vec3(0.5), 0.5, vec3(1), 1.0, 10.0, 2); + hitObjectRecordHitNV(hObj, as, 1, 1, 1, 2U, 2U, 2U, vec3(1), 1.0f, vec3(2), 2.0f, 2); + hitObjectRecordHitMotionNV(hObj, as, 1, 1, 1, 2U, 2U, 2U, vec3(1), 1.0f, vec3(2), 2.0f, 4.0f, 2); + hitObjectRecordHitWithIndexNV(hObjHit, as, 1, 1, 1, 2U, 2U, vec3(1), 1.0f, vec3(2), 2.0f, 3); + hitObjectRecordHitWithIndexMotionNV(hObjHit, as, 1, 1, 1, 2U, 2U, vec3(1), 1.0f, vec3(2), 2.0f, 4.0f, 3); + hitObjectRecordEmptyNV(hObjNop); + hitObjectRecordMissNV(hObjMiss, 1U, vec3(0.5), 2.0, vec3(1.5), 5.0); + hitObjectRecordMissMotionNV(hObjMiss, 1U, vec3(0.5), 2.0, vec3(1.5), 5.0, 8.0f); + hitObjectExecuteShaderNV(hObjHit, 1); + if (hitObjectIsHitNV(hObj)) { + op = 1.0f; + } else if (hitObjectIsMissNV(hObj)) { + op = 2.0f; + } else if (hitObjectIsEmptyNV(hObj)) { + op = 3.0f; + } + + + float tmin = hitObjectGetRayTMinNV(hObjHit); + float tmax = hitObjectGetRayTMaxNV(hObjHit); + vec3 orig = hitObjectGetWorldRayOriginNV(hObjHit); + vec3 dir = hitObjectGetWorldRayDirectionNV(hObjHit); + vec3 oorig = hitObjectGetObjectRayOriginNV(hObjHit); + vec3 odir = hitObjectGetObjectRayDirectionNV(hObjHit); + mat4x3 otw = hitObjectGetObjectToWorldNV(hObjHit); + mat4x3 wto = hitObjectGetWorldToObjectNV(hObjHit); + int cid = hitObjectGetInstanceCustomIndexNV(hObjMiss); + int iid = hitObjectGetInstanceIdNV(hObjNop); + int pid = hitObjectGetPrimitiveIndexNV(hObj); + int gid = hitObjectGetGeometryIndexNV(hObj); + uint hkind = hitObjectGetHitKindNV(hObj); + hitObjectGetAttributesNV(hObj, 2); + uvec2 handle = hitObjectGetShaderRecordBufferHandleNV(hObj); + uint rid = hitObjectGetShaderBindingTableRecordIndexNV(hObj); + reorderThreadNV(4,4); + reorderThreadNV(hObjHit); + reorderThreadNV(hObjHit, 4, 2); + + + + +} diff --git a/Test/spv.nv.hitobject-allops.rmiss b/Test/spv.nv.hitobject-allops.rmiss new file mode 100755 index 00000000..045e4a5a --- /dev/null +++ b/Test/spv.nv.hitobject-allops.rmiss @@ -0,0 +1,58 @@ +#version 460 +#extension GL_EXT_ray_tracing : enable +#extension GL_NV_shader_invocation_reorder : enable +#extension GL_NV_ray_tracing_motion_blur : enable +layout(location = 1) rayPayloadEXT vec4 payload; +layout(location = 2) rayPayloadEXT pBlock { vec2 val1; vec2 val2; }; +layout(location = 2) hitObjectAttributeNV vec2 attr; +layout(location = 3) hitObjectAttributeNV hBlock { float attrval;}; +layout(binding = 0) uniform accelerationStructureEXT as; +layout(binding = 1) buffer block { + float op; +}; +void main() +{ + hitObjectNV hObj; + hitObjectNV hObjHit, hObjMiss, hObjNop; + attr = vec2(1.0); + attrval = 2.0; + hitObjectTraceRayNV(hObj, as, 1U, 1U, 1U, 1U, 1U, vec3(0.5), 0.5, vec3(1), 1.0, 1); + hitObjectTraceRayMotionNV(hObj, as, 1U, 1U, 1U, 1U, 1U, vec3(0.5), 0.5, vec3(1), 1.0, 10.0, 2); + hitObjectRecordHitNV(hObj, as, 1, 1, 1, 2U, 2U, 2U, vec3(1), 1.0f, vec3(2), 2.0f, 2); + hitObjectRecordHitMotionNV(hObj, as, 1, 1, 1, 2U, 2U, 2U, vec3(1), 1.0f, vec3(2), 2.0f, 4.0f, 2); + hitObjectRecordHitWithIndexNV(hObjHit, as, 1, 1, 1, 2U, 2U, vec3(1), 1.0f, vec3(2), 2.0f, 3); + hitObjectRecordHitWithIndexMotionNV(hObjHit, as, 1, 1, 1, 2U, 2U, vec3(1), 1.0f, vec3(2), 2.0f, 4.0f, 3); + hitObjectRecordEmptyNV(hObjNop); + hitObjectRecordMissNV(hObjMiss, 1U, vec3(0.5), 2.0, vec3(1.5), 5.0); + hitObjectRecordMissMotionNV(hObjMiss, 1U, vec3(0.5), 2.0, vec3(1.5), 5.0, 8.0f); + hitObjectExecuteShaderNV(hObjHit, 2); + if (hitObjectIsHitNV(hObj)) { + op = 1.0f; + } else if (hitObjectIsMissNV(hObj)) { + op = 2.0f; + } else if (hitObjectIsEmptyNV(hObj)) { + op = 3.0f; + } + + + float tmin = hitObjectGetRayTMinNV(hObjHit); + float tmax = hitObjectGetRayTMaxNV(hObjHit); + vec3 orig = hitObjectGetWorldRayOriginNV(hObjHit); + vec3 dir = hitObjectGetWorldRayDirectionNV(hObjHit); + vec3 oorig = hitObjectGetObjectRayOriginNV(hObjHit); + vec3 odir = hitObjectGetObjectRayDirectionNV(hObjHit); + mat4x3 otw = hitObjectGetObjectToWorldNV(hObjHit); + mat4x3 wto = hitObjectGetWorldToObjectNV(hObjHit); + int cid = hitObjectGetInstanceCustomIndexNV(hObjMiss); + int iid = hitObjectGetInstanceIdNV(hObjNop); + int pid = hitObjectGetPrimitiveIndexNV(hObj); + int gid = hitObjectGetGeometryIndexNV(hObj); + uint hkind = hitObjectGetHitKindNV(hObj); + hitObjectGetAttributesNV(hObj, 2); + uvec2 handle = hitObjectGetShaderRecordBufferHandleNV(hObj); + uint rid = hitObjectGetShaderBindingTableRecordIndexNV(hObj); + + + + +} diff --git a/Test/spv.specConstantOp.float16.comp b/Test/spv.specConstantOp.float16.comp new file mode 100755 index 00000000..c3db60c2 --- /dev/null +++ b/Test/spv.specConstantOp.float16.comp @@ -0,0 +1,18 @@ +#version 450 +#extension GL_EXT_shader_explicit_arithmetic_types_float16 : require + +// Produce an OpSpecConstantOp with 8 bit integer type + +layout(constant_id = 0) const float c = 8; + +layout(binding=0) writeonly restrict buffer S { + float16_t p_out[]; +}; + +void main() +{ + p_out[0] = float16_t(c); +} + + + diff --git a/Test/spv.specConstantOp.int16.comp b/Test/spv.specConstantOp.int16.comp new file mode 100755 index 00000000..c5078436 --- /dev/null +++ b/Test/spv.specConstantOp.int16.comp @@ -0,0 +1,16 @@ +#version 450 +#extension GL_EXT_shader_explicit_arithmetic_types_int16 : require + +// Produce an OpSpecConstantOp with 16 bit integer type + +layout(constant_id = 0) const int c = 8; + +layout(binding=0) writeonly restrict buffer S { + uint16_t p_out[]; +}; + +void main() +{ + p_out[0] = uint16_t(c); +} + diff --git a/Test/spv.specConstantOp.int8.comp b/Test/spv.specConstantOp.int8.comp new file mode 100755 index 00000000..59882107 --- /dev/null +++ b/Test/spv.specConstantOp.int8.comp @@ -0,0 +1,17 @@ +#version 450 +#extension GL_EXT_shader_explicit_arithmetic_types_int8 : require + +// Produce an OpSpecConstantOp with 8 bit integer type + +layout(constant_id = 0) const int c = 8; + +layout(binding=0) writeonly restrict buffer S { + uint8_t p_out[]; +}; + +void main() +{ + p_out[0] = uint8_t(c); +} + + diff --git a/Test/spv.structCopy.comp b/Test/spv.structCopy.comp new file mode 100755 index 00000000..f915f544 --- /dev/null +++ b/Test/spv.structCopy.comp @@ -0,0 +1,37 @@ +#version 460 +layout(local_size_x = 512, local_size_y = 1) in; +layout(std430) buffer; + +struct MyStruct { + uint a; + uint b; + uint c; +}; + +layout(binding = 0) buffer MyStructs { + uint count; + MyStruct data[]; +} +my_structs; + +layout(binding = 1) buffer Output { + uint a; + uint b; + uint c; +} +o; + +shared MyStruct s[512]; + +void main() { + s[0] = MyStruct(1, 2, 3); + + uint id = gl_GlobalInvocationID.x; + MyStruct ms = + id > my_structs.count ? s[id - my_structs.count] : my_structs.data[id]; + + atomicAdd(o.a, ms.a); + atomicAdd(o.b, ms.b); + atomicAdd(o.c, ms.c); +} + diff --git a/Test/spv.tpipBlockMatchSAD.frag b/Test/spv.tpipBlockMatchSAD.frag new file mode 100755 index 00000000..832f59d4 --- /dev/null +++ b/Test/spv.tpipBlockMatchSAD.frag @@ -0,0 +1,38 @@ +#version 450 +#extension GL_QCOM_image_processing : require + +precision highp float; + +// fragment shader inputs and outputs +layout (location = 0) in vec4 v_texcoord; + +layout (location = 0) out vec4 fragColor; + +// fragment shader resources +layout(set = 0, binding = 0) uniform texture2DArray tex2DArray_weights; +layout(set = 0, binding = 1) uniform texture2D tex2D_src1; +layout(set = 0, binding = 2) uniform texture2D tex2D_src2; +layout(set = 0, binding = 3) uniform sampler samp; +layout(set = 0, binding = 4) uniform sampler2D target_samp; +layout(set = 0, binding = 5) uniform sampler2D ref_samp; + +void main() +{ + + uvec2 tgt_coords; tgt_coords.x = uint(v_texcoord.x); tgt_coords.x = uint(v_texcoord.y); + uvec2 ref_coords; ref_coords.x = uint(v_texcoord.z); ref_coords.y = uint(v_texcoord.w); + uvec2 blockSize = uvec2(4, 4); + fragColor = textureBlockMatchSADQCOM( + sampler2D(tex2D_src1, samp), // target texture + tgt_coords, // target coords + sampler2D(tex2D_src2, samp), // reference texture + ref_coords, // reference coords + blockSize); // block size + fragColor = textureBlockMatchSADQCOM( + target_samp, // target texture + tgt_coords, // target coords + ref_samp, // reference texture + ref_coords, // reference coords + blockSize); // block size +} + diff --git a/Test/spv.tpipBlockMatchSSD.frag b/Test/spv.tpipBlockMatchSSD.frag new file mode 100755 index 00000000..aa3ff2a9 --- /dev/null +++ b/Test/spv.tpipBlockMatchSSD.frag @@ -0,0 +1,38 @@ +#version 450 +#extension GL_QCOM_image_processing : require + +precision highp float; + +// fragment shader inputs and outputs +layout (location = 0) in vec4 v_texcoord; + +layout (location = 0) out vec4 fragColor; + +// fragment shader resources +layout(set = 0, binding = 0) uniform texture2DArray tex2DArray_weights; +layout(set = 0, binding = 1) uniform texture2D tex2D_src1; +layout(set = 0, binding = 2) uniform texture2D tex2D_src2; +layout(set = 0, binding = 3) uniform sampler samp; +layout(set = 0, binding = 4) uniform sampler2D target_samp; +layout(set = 0, binding = 5) uniform sampler2D ref_samp; + +void main() +{ + + uvec2 tgt_coords; tgt_coords.x = uint(v_texcoord.x); tgt_coords.x = uint(v_texcoord.y); + uvec2 ref_coords; ref_coords.x = uint(v_texcoord.z); ref_coords.y = uint(v_texcoord.w); + uvec2 blockSize = uvec2(4, 4); + fragColor = textureBlockMatchSSDQCOM( + sampler2D(tex2D_src1, samp), // target texture + tgt_coords, // target coords + sampler2D(tex2D_src2, samp), // reference texture + ref_coords, // reference coords + blockSize); // block size + fragColor = textureBlockMatchSSDQCOM( + target_samp, // target texture + tgt_coords, // target coords + ref_samp, // reference texture + ref_coords, // reference coords + blockSize); // block size +} + diff --git a/Test/spv.tpipBoxFilter.frag b/Test/spv.tpipBoxFilter.frag new file mode 100755 index 00000000..d86d531e --- /dev/null +++ b/Test/spv.tpipBoxFilter.frag @@ -0,0 +1,32 @@ +#version 450 +#extension GL_QCOM_image_processing : require + +precision highp float; + +// fragment shader inputs and outputs +layout (location = 0) in vec4 v_texcoord; + +layout (location = 0) out vec4 fragColor; + +// fragment shader resources +layout(set = 0, binding = 0) uniform texture2DArray tex2DArray_weights; +layout(set = 0, binding = 1) uniform texture2D tex2D_src1; +layout(set = 0, binding = 2) uniform texture2D tex2D_src2; +layout(set = 0, binding = 3) uniform sampler samp; +layout(set = 0, binding = 4) uniform sampler2D tex_samp; + +void main() +{ + + vec2 boxSize = vec2(2.5, 4.5); + fragColor = textureBoxFilterQCOM( + sampler2D(tex2D_src1, samp), // source texture + v_texcoord.xy, // tex coords + boxSize); // box size + fragColor = textureBoxFilterQCOM( + tex_samp, // combined source texture + v_texcoord.xy, // tex coords + boxSize); // box size + +} + diff --git a/Test/spv.tpipSampleWeighted.frag b/Test/spv.tpipSampleWeighted.frag new file mode 100755 index 00000000..0d100289 --- /dev/null +++ b/Test/spv.tpipSampleWeighted.frag @@ -0,0 +1,32 @@ +#version 450 +#extension GL_QCOM_image_processing : require + +precision highp float; + +// fragment shader inputs and outputs +layout (location = 0) in vec4 v_texcoord; + +layout (location = 0) out vec4 fragColor; + +// fragment shader resources +layout(set = 0, binding = 0) uniform texture2DArray tex2DArray_weights; +layout(set = 0, binding = 1) uniform texture2D tex2D_src1; +layout(set = 0, binding = 2) uniform texture2D tex2D_src2; +layout(set = 0, binding = 3) uniform sampler samp; +layout(set = 0, binding = 4) uniform sampler2D tex_samp; +layout(set = 0, binding = 5) uniform sampler2DArray tex_samp_array; + +void main() +{ + + fragColor = textureWeightedQCOM( + sampler2D(tex2D_src1, samp), // source texture + v_texcoord.xy, // tex coords + sampler2DArray(tex2DArray_weights, samp)); // weight texture + fragColor = textureWeightedQCOM( + tex_samp, // combined source texture + v_texcoord.xy, // tex coords + tex_samp_array); // combined weight texture + +} + diff --git a/Test/spv.tpipTextureArrays.frag b/Test/spv.tpipTextureArrays.frag new file mode 100755 index 00000000..332acb31 --- /dev/null +++ b/Test/spv.tpipTextureArrays.frag @@ -0,0 +1,40 @@ +#version 450 +#extension GL_QCOM_image_processing : require + +precision highp float; + +// fragment shader inputs and outputs +layout (location = 0) in vec4 v_texcoord; + +layout (location = 0) out vec4 fragColor; + +// fragment shader resources +layout(set = 0, binding = 3) uniform sampler samp; + + +layout(set = 0, binding = 4) uniform texture2D tex2D_srcs[8]; +layout(set = 0, binding = 5) uniform sampler2D samplers[3]; + +void main() +{ + + uvec2 tgt_coords; tgt_coords.x = uint(v_texcoord.x); tgt_coords.x = uint(v_texcoord.y); + uvec2 ref_coords; ref_coords.x = uint(v_texcoord.z); ref_coords.y = uint(v_texcoord.w); + uvec2 blockSize = uvec2(4, 4); + uint ii = tgt_coords.x % 8; + fragColor = textureBlockMatchSSDQCOM( + samplers[0], // target texture + tgt_coords, // target coords + sampler2D(tex2D_srcs[ii], samp), // reference texture + ref_coords, // reference coords + blockSize); // block size + + fragColor = textureBlockMatchSADQCOM( + sampler2D(tex2D_srcs[1], samp), // target texture + tgt_coords, // target coords + samplers[1], // reference texture + ref_coords, // reference coords + blockSize); // block size + +} + diff --git a/Test/struct.error.frag b/Test/struct.error.frag new file mode 100755 index 00000000..29aba00b --- /dev/null +++ b/Test/struct.error.frag @@ -0,0 +1,14 @@ +#version 460 + +struct A { + float x; +}; + +A test() { + return A(1.0); +} + +void main() { + test().z; // A.z does not exist, causes a crash +} + diff --git a/Test/tokenLength.vert b/Test/tokenLength.vert index 21d446fa..2907b327 100755 --- a/Test/tokenLength.vert +++ b/Test/tokenLength.vert @@ -44,29 +44,31 @@ float superF = 1.012345678901234567890123456789012345678901234567890123456789012 // Boundary cases #if 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001 -#error in long non-zero #if +#error in long non-zero "if" #endif #if 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 == 0 -#error in long zero #if +#error in long zero "if" #endif #if 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 == 0 -#error in too long #if +#error in too long "if" #endif #if A000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001 -#error in long macro #if +#error in long macro "if" #endif #if A000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -#error in long macro #if +#error in long macro "if" #endif #if A0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -#error in too long macro #if +#error in too long macro "if" #endif // Super long #if 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -#error in super long #if +#error in super long "if" #endif #if A000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -#error in super long macro #if +#error in super long macro "if" #endif + +int BE = 0b01u; // ERROR (not supported by GLSL) diff --git a/Test/validate-shaders.sh b/Test/validate-shaders.sh index 89dc9556..c841969c 100755 --- a/Test/validate-shaders.sh +++ b/Test/validate-shaders.sh @@ -4,7 +4,7 @@ # It is not meant to preclude the possible addition of the validator to # glslang. -declare -r EXE='../build/install/bin/glslangValidator' +declare -r EXE='../build/install/bin/glslang' # search common locations for spirv-tools: keep first one for toolsdir in '../External/spirv-tools/build/tools' '../../SPIRV-Tools/build/tools/bin' '/usr/local/bin'; do diff --git a/Test/vk.relaxed.errorcheck.frag b/Test/vk.relaxed.errorcheck.frag index b75b50b7..086c1d07 100755 --- a/Test/vk.relaxed.errorcheck.frag +++ b/Test/vk.relaxed.errorcheck.frag @@ -7,10 +7,13 @@ out vec4 o; // default uniforms will be gathered into a uniform block uniform vec4 a; // declared in both stages with different types +uniform float test; // declared twice in this compilation unit +uniform vec2 test; + vec4 foo() { - return a; + return a + vec4(test); } void main() { o = io + foo(); -} \ No newline at end of file +} diff --git a/Test/vk.relaxed.frag b/Test/vk.relaxed.frag index d43416e0..3dd3c172 100755 --- a/Test/vk.relaxed.frag +++ b/Test/vk.relaxed.frag @@ -7,10 +7,17 @@ uniform vec4 a; uniform vec2 b = vec2(0, 0); // initializer will be ignored layout(location = 0) uniform vec2 c; // location qualifier will be ignored uniform vec4 d[10]; + +struct SamplerArray{ + sampler2D tn[4]; +}; + uniform struct e { vec2 x; float y; uint z; + sampler2D t0; + SamplerArray samplers; } structUniform; // opaque types will not be grouped into uniform block @@ -64,11 +71,15 @@ uint bar() { vec4 foo() { float f = j + bufferInstance.j + structUniform.y + structUniform.z; vec2 v2 = b + c + structUniform.x; - vec4 v4 = a + d[0] + d[1] + d[2] + k + bufferInstance.k + texture(t1, vec2(0, 0)); + vec4 v4 = a + d[0] + d[1] + d[2] + k + bufferInstance.k + texture(t1, vec2(0, 0)) + texture(structUniform.t0, vec2(0, 0)); return vec4(f) * vec4(v2, 1, 1) * v4; } +vec4 baz(SamplerArray samplers) { + return texture(samplers.tn[0], vec2(0, 0)) + texture(samplers.tn[1], vec2(0, 0)) + texture(samplers.tn[2], vec2(0, 0)) + texture(samplers.tn[3], vec2(0, 0)); +} + void main() { float j = float(bar()); - o = j * foo(); -} \ No newline at end of file + o = j * foo() + baz(structUniform.samplers); +} diff --git a/Test/web.runtests b/Test/web.runtests index 3283dd83..584b6c51 100755 --- a/Test/web.runtests +++ b/Test/web.runtests @@ -3,7 +3,7 @@ TESTLIST=web.testlist TARGETDIR=localResults BASEDIR=baseResults -EXE=../build/install/bin/glslangValidator.exe +EXE=../build/install/bin/glslang.exe HASERROR=0 mkdir -p $TARGETDIR diff --git a/glslang/BUILD.gn b/glslang/BUILD.gn index 7440ee36..e6b0c172 100755 --- a/glslang/BUILD.gn +++ b/glslang/BUILD.gn @@ -25,6 +25,7 @@ config("src_glslang_config") { ] cflags_cc += [ "-fPIC", + "-std=c++17", "-Wno-reorder", "-fno-rtti", "-fno-exceptions", @@ -144,7 +145,7 @@ ohos_source_set("MachineIndependent_source") { deps = [ ":libdeqp_GenericCodeGen", ":libdeqp_OSDependent", - "//third_party/glslang/OGLCompilersDLL:libdeqp_OGLCompiler", + #"//third_party/glslang/OGLCompilersDLL:libdeqp_OGLCompiler", ] configs = [ ":src_glslang_config" ] @@ -173,7 +174,7 @@ ohos_source_set("glslang_source") { ":libdeqp_GenericCodeGen", ":libdeqp_MachineIndependent", ":libdeqp_OSDependent", - "//third_party/glslang/OGLCompilersDLL:libdeqp_OGLCompiler", + #"//third_party/glslang/OGLCompilersDLL:libdeqp_OGLCompiler", ] configs = [ ":src_glslang_config" ] } diff --git a/glslang/CInterface/glslang_c_interface.cpp b/glslang/CInterface/glslang_c_interface.cpp index 1465ce17..870698f2 100755 --- a/glslang/CInterface/glslang_c_interface.cpp +++ b/glslang/CInterface/glslang_c_interface.cpp @@ -80,25 +80,6 @@ typedef struct glslang_program_s { (CallbackIncluder::callbacks::free_include_result) */ class CallbackIncluder : public glslang::TShader::Includer { -public: - /* Wrapper of IncludeResult which stores a glsl_include_result object internally */ - class CallbackIncludeResult : public glslang::TShader::Includer::IncludeResult { - public: - CallbackIncludeResult(const std::string& headerName, const char* const headerData, const size_t headerLength, - void* userData, glsl_include_result_t* includeResult) - : glslang::TShader::Includer::IncludeResult(headerName, headerData, headerLength, userData), - includeResult(includeResult) - { - } - - virtual ~CallbackIncludeResult() {} - - protected: - friend class CallbackIncluder; - - glsl_include_result_t* includeResult; - }; - public: CallbackIncluder(glsl_include_callbacks_t _callbacks, void* _context) : callbacks(_callbacks), context(_context) {} @@ -110,9 +91,7 @@ public: if (this->callbacks.include_system) { glsl_include_result_t* result = this->callbacks.include_system(this->context, headerName, includerName, inclusionDepth); - - return new CallbackIncludeResult(std::string(headerName), result->header_data, result->header_length, - nullptr, result); + return makeIncludeResult(result); } return glslang::TShader::Includer::includeSystem(headerName, includerName, inclusionDepth); @@ -124,9 +103,7 @@ public: if (this->callbacks.include_local) { glsl_include_result_t* result = this->callbacks.include_local(this->context, headerName, includerName, inclusionDepth); - - return new CallbackIncludeResult(std::string(headerName), result->header_data, result->header_length, - nullptr, result); + return makeIncludeResult(result); } return glslang::TShader::Includer::includeLocal(headerName, includerName, inclusionDepth); @@ -139,22 +116,25 @@ public: if (result == nullptr) return; - if (this->callbacks.free_include_result && (result->userData == nullptr)) { - CallbackIncludeResult* innerResult = static_cast(result); - /* use internal free() function */ - this->callbacks.free_include_result(this->context, innerResult->includeResult); - /* ignore internal fields of TShader::Includer::IncludeResult */ - delete result; - return; + if (this->callbacks.free_include_result) { + this->callbacks.free_include_result(this->context, static_cast(result->userData)); } - delete[] static_cast(result->userData); delete result; } private: CallbackIncluder() {} + IncludeResult* makeIncludeResult(glsl_include_result_t* result) { + if (!result) { + return nullptr; + } + + return new glslang::TShader::Includer::IncludeResult( + std::string(result->header_name), result->header_data, result->header_length, result); + } + /* C callback pointers */ glsl_include_callbacks_t callbacks; /* User-defined context */ @@ -394,8 +374,11 @@ GLSLANG_EXPORT const char* glslang_shader_get_preprocessed_code(glslang_shader_t GLSLANG_EXPORT int glslang_shader_preprocess(glslang_shader_t* shader, const glslang_input_t* input) { - DirStackFileIncluder Includer; - /* TODO: use custom callbacks if they are available in 'i->callbacks' */ + DirStackFileIncluder dirStackFileIncluder; + CallbackIncluder callbackIncluder(input->callbacks, input->callbacks_ctx); + glslang::TShader::Includer& Includer = (input->callbacks.include_local||input->callbacks.include_system) + ? static_cast(callbackIncluder) + : static_cast(dirStackFileIncluder); return shader->shader->preprocess( reinterpret_cast(input->resource), input->default_version, diff --git a/glslang/CMakeLists.txt b/glslang/CMakeLists.txt index 7709f098..37eecaad 100755 --- a/glslang/CMakeLists.txt +++ b/glslang/CMakeLists.txt @@ -33,7 +33,7 @@ if(WIN32) add_subdirectory(OSDependent/Windows) -elseif(UNIX OR "${CMAKE_SYSTEM_NAME}" STREQUAL "Fuchsia") +elseif(UNIX OR "${CMAKE_SYSTEM_NAME}" STREQUAL "Fuchsia" OR ANDROID) add_subdirectory(OSDependent/Unix) else() message("unknown platform") @@ -57,7 +57,6 @@ set_property(TARGET GenericCodeGen PROPERTY FOLDER glslang) # MachineIndependent ################################################################################ set(MACHINEINDEPENDENT_SOURCES - MachineIndependent/glslang.m4 MachineIndependent/glslang.y MachineIndependent/glslang_tab.cpp MachineIndependent/attribute.cpp @@ -135,11 +134,16 @@ add_library(MachineIndependent STATIC ${MACHINEINDEPENDENT_SOURCES} ${MACHINEIND set_property(TARGET MachineIndependent PROPERTY POSITION_INDEPENDENT_CODE ON) set_property(TARGET MachineIndependent PROPERTY FOLDER glslang) +if (NOT MSVC) + # -Wunused-but-set-variable is triggered in code generated by bison that we do not control. Turn this warning off, but only for the generated. + set_source_files_properties(MachineIndependent/glslang_tab.cpp PROPERTIES COMPILE_FLAGS -Wno-unused-but-set-variable) +endif() + glslang_add_build_info_dependency(MachineIndependent) glslang_pch(MachineIndependent MachineIndependent/pch.h) -target_link_libraries(MachineIndependent PRIVATE OGLCompiler OSDependent GenericCodeGen) +target_link_libraries(MachineIndependent PRIVATE OSDependent GenericCodeGen) ################################################################################ # glslang @@ -149,8 +153,6 @@ set(GLSLANG_SOURCES set(GLSLANG_HEADERS Public/ShaderLang.h - Public/ResourceLimits.h - Public/resource_limits_c.h Include/arrays.h Include/BaseTypes.h Include/Common.h @@ -166,13 +168,13 @@ set(GLSLANG_HEADERS Include/SpirvIntrinsics.h Include/Types.h) -add_library(glslang ${LIB_TYPE} ${BISON_GLSLParser_OUTPUT_SOURCE} ${GLSLANG_SOURCES} ${GLSLANG_HEADERS}) +add_library(glslang ${LIB_TYPE} ${GLSLANG_SOURCES} ${GLSLANG_HEADERS}) set_target_properties(glslang PROPERTIES FOLDER glslang POSITION_INDEPENDENT_CODE ON VERSION "${GLSLANG_VERSION}" SOVERSION "${GLSLANG_VERSION_MAJOR}") -target_link_libraries(glslang PRIVATE OGLCompiler OSDependent MachineIndependent) +target_link_libraries(glslang PRIVATE OSDependent MachineIndependent) target_include_directories(glslang PUBLIC $ $) @@ -185,6 +187,30 @@ if(WIN32 AND BUILD_SHARED_LIBS) set_target_properties(glslang PROPERTIES PREFIX "") endif() +################################################################################ +# ResourceLimits +################################################################################ +set(RESOURCELIMITS_SOURCES + ResourceLimits/ResourceLimits.cpp + ResourceLimits/resource_limits_c.cpp +) + +set(RESOURCELIMITS_HEADERS + Public/ResourceLimits.h + Public/resource_limits_c.h +) + +add_library(glslang-default-resource-limits ${RESOURCELIMITS_SOURCES} ${RESOURCELIMITS_HEADERS}) +set_target_properties(glslang-default-resource-limits PROPERTIES + VERSION "${GLSLANG_VERSION}" + SOVERSION "${GLSLANG_VERSION_MAJOR}" + FOLDER glslang + POSITION_INDEPENDENT_CODE ON) + +target_include_directories(glslang-default-resource-limits PUBLIC + $ + $) + ################################################################################ # source_groups ################################################################################ @@ -201,7 +227,7 @@ endif() ################################################################################ # install ################################################################################ -if(ENABLE_GLSLANG_INSTALL) +if(PROJECT_IS_TOP_LEVEL) install(TARGETS glslang EXPORT glslang-targets) if(NOT BUILD_SHARED_LIBS) install(TARGETS MachineIndependent EXPORT glslang-targets) @@ -212,7 +238,7 @@ if(ENABLE_GLSLANG_INSTALL) message(WARNING \"Using `glslangTargets.cmake` is deprecated: use `find_package(glslang)` to find glslang CMake targets.\") if (NOT TARGET glslang::glslang) - include(\"\${CMAKE_CURRENT_LIST_DIR}/../../${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}/glslang-targets.cmake\") + include(\"${CMAKE_INSTALL_FULL_LIBDIR}/cmake/${PROJECT_NAME}/glslang-targets.cmake\") endif() if(${BUILD_SHARED_LIBS}) @@ -226,15 +252,34 @@ if(ENABLE_GLSLANG_INSTALL) install(FILES "${CMAKE_CURRENT_BINARY_DIR}/glslangTargets.cmake" DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake) endif() - set(ALL_HEADERS - ${GLSLANG_HEADERS} - ${MACHINEINDEPENDENT_HEADERS}) + set(PUBLIC_HEADERS + Public/ResourceLimits.h + Public/ShaderLang.h + Public/resource_limits_c.h + Include/glslang_c_interface.h + Include/glslang_c_shader_types.h + Include/ResourceLimits.h + MachineIndependent/Versions.h) - foreach(file ${ALL_HEADERS}) + foreach(file ${PUBLIC_HEADERS}) get_filename_component(dir ${file} DIRECTORY) install(FILES ${file} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/glslang/${dir}) endforeach() install(FILES ${GLSLANG_BUILD_INFO_H} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/glslang) + install(TARGETS glslang-default-resource-limits EXPORT glslang-targets) + + # Backward compatibility + file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/glslang-default-resource-limitsTargets.cmake" " + message(WARNING \"Using `glslang-default-resource-limitsTargets.cmake` is deprecated: use `find_package(glslang)` to find glslang CMake targets.\") + + if (NOT TARGET glslang::glslang-default-resource-limits) + include(\"\${CMAKE_INSTALL_FULL_LIBDIR}/cmake/${PROJECT_NAME}/glslang-targets.cmake\") + endif() + + add_library(glslang-default-resource-limits ALIAS glslang::glslang-default-resource-limits) + ") + install(FILES "${CMAKE_CURRENT_BINARY_DIR}/glslang-default-resource-limitsTargets.cmake" DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake) + endif() diff --git a/glslang/GenericCodeGen/CodeGen.cpp b/glslang/GenericCodeGen/CodeGen.cpp index b3c7226d..4c1b5fed 100755 --- a/glslang/GenericCodeGen/CodeGen.cpp +++ b/glslang/GenericCodeGen/CodeGen.cpp @@ -41,10 +41,9 @@ // class TGenericCompiler : public TCompiler { public: - TGenericCompiler(EShLanguage l, int dOptions) : TCompiler(l, infoSink), debugOptions(dOptions) { } + TGenericCompiler(EShLanguage l) : TCompiler(l, infoSink) {} virtual bool compile(TIntermNode* root, int version = 0, EProfile profile = ENoProfile); TInfoSink infoSink; - int debugOptions; }; // @@ -52,9 +51,9 @@ public: // compile object used by higher level code. It returns // a subclass of TCompiler. // -TCompiler* ConstructCompiler(EShLanguage language, int debugOptions) -{ - return new TGenericCompiler(language, debugOptions); +TCompiler* ConstructCompiler(EShLanguage language, int) +{ + return new TGenericCompiler(language); } // diff --git a/glslang/GenericCodeGen/Link.cpp b/glslang/GenericCodeGen/Link.cpp index 5e28405f..33b3dfcf 100755 --- a/glslang/GenericCodeGen/Link.cpp +++ b/glslang/GenericCodeGen/Link.cpp @@ -44,11 +44,10 @@ // class TGenericLinker : public TLinker { public: - TGenericLinker(EShExecutable e, int dOptions) : TLinker(e, infoSink), debugOptions(dOptions) { } + TGenericLinker(EShExecutable e) : TLinker(e, infoSink) {} bool link(TCompilerList&, TUniformMap*) { return true; } void getAttributeBindings(ShBindingTable const **) const { } TInfoSink infoSink; - int debugOptions; }; // @@ -60,9 +59,9 @@ public: virtual int getLocation(const char*) { return 0; } }; -TShHandleBase* ConstructLinker(EShExecutable executable, int debugOptions) -{ - return new TGenericLinker(executable, debugOptions); +TShHandleBase* ConstructLinker(EShExecutable executable, int) +{ + return new TGenericLinker(executable); } void DeleteLinker(TShHandleBase* linker) diff --git a/glslang/HLSL/hlslAttributes.cpp b/glslang/HLSL/hlslAttributes.cpp index 0cc0d3f4..97305493 100755 --- a/glslang/HLSL/hlslAttributes.cpp +++ b/glslang/HLSL/hlslAttributes.cpp @@ -101,6 +101,8 @@ namespace glslang { if (name == "nonwritable") return EatNonWritable; if (name == "nonreadable") return EatNonReadable; + + if (name == "export") return EatExport; } else if (nameSpace.size() > 0) return EatNone; diff --git a/glslang/HLSL/hlslGrammar.cpp b/glslang/HLSL/hlslGrammar.cpp index 19a792b9..11c0e45e 100755 --- a/glslang/HLSL/hlslGrammar.cpp +++ b/glslang/HLSL/hlslGrammar.cpp @@ -1,6 +1,7 @@ // // Copyright (C) 2016-2018 Google, Inc. // Copyright (C) 2016 LunarG, Inc. +// Copyright (C) 2023 Mobica Limited. // // All rights reserved. // @@ -594,6 +595,7 @@ bool HlslGrammar::acceptControlDeclaration(TIntermNode*& node) // fully_specified_type // : type_specifier // | type_qualifier type_specifier +// | type_specifier type_qualifier // bool HlslGrammar::acceptFullySpecifiedType(TType& type, const TAttributes& attributes) { @@ -605,7 +607,7 @@ bool HlslGrammar::acceptFullySpecifiedType(TType& type, TIntermNode*& nodeList, // type_qualifier TQualifier qualifier; qualifier.clear(); - if (! acceptQualifier(qualifier)) + if (! acceptPreQualifier(qualifier)) return false; TSourceLoc loc = token.loc; @@ -620,6 +622,10 @@ bool HlslGrammar::acceptFullySpecifiedType(TType& type, TIntermNode*& nodeList, return false; } + // type_qualifier + if (! acceptPostQualifier(qualifier)) + return false; + if (type.getBasicType() == EbtBlock) { // the type was a block, which set some parts of the qualifier parseContext.mergeQualifiers(type.getQualifier(), qualifier); @@ -634,7 +640,7 @@ bool HlslGrammar::acceptFullySpecifiedType(TType& type, TIntermNode*& nodeList, parseContext.declareBlock(loc, type); } else { // Some qualifiers are set when parsing the type. Merge those with - // whatever comes from acceptQualifier. + // whatever comes from acceptPreQualifier and acceptPostQualifier. assert(qualifier.layoutFormat == ElfNone); qualifier.layoutFormat = type.getQualifier().layoutFormat; @@ -660,7 +666,7 @@ bool HlslGrammar::acceptFullySpecifiedType(TType& type, TIntermNode*& nodeList, // // Zero or more of these, so this can't return false. // -bool HlslGrammar::acceptQualifier(TQualifier& qualifier) +bool HlslGrammar::acceptPreQualifier(TQualifier& qualifier) { do { switch (peek()) { @@ -766,6 +772,25 @@ bool HlslGrammar::acceptQualifier(TQualifier& qualifier) } while (true); } +// type_qualifier +// : qualifier qualifier ... +// +// Zero or more of these, so this can't return false. +// +bool HlslGrammar::acceptPostQualifier(TQualifier& qualifier) +{ + do { + switch (peek()) { + case EHTokConst: + qualifier.storage = EvqConst; + break; + default: + return true; + } + advanceToken(); + } while (true); +} + // layout_qualifier_list // : LAYOUT LEFT_PAREN layout_qualifier COMMA layout_qualifier ... RIGHT_PAREN // @@ -823,8 +848,10 @@ bool HlslGrammar::acceptLayoutQualifierList(TQualifier& qualifier) // | UINT // | BOOL // -bool HlslGrammar::acceptTemplateVecMatBasicType(TBasicType& basicType) +bool HlslGrammar::acceptTemplateVecMatBasicType(TBasicType& basicType, + TPrecisionQualifier& precision) { + precision = EpqNone; switch (peek()) { case EHTokFloat: basicType = EbtFloat; @@ -842,6 +869,23 @@ bool HlslGrammar::acceptTemplateVecMatBasicType(TBasicType& basicType) case EHTokBool: basicType = EbtBool; break; + case EHTokHalf: + basicType = parseContext.hlslEnable16BitTypes() ? EbtFloat16 : EbtFloat; + break; + case EHTokMin16float: + case EHTokMin10float: + basicType = parseContext.hlslEnable16BitTypes() ? EbtFloat16 : EbtFloat; + precision = EpqMedium; + break; + case EHTokMin16int: + case EHTokMin12int: + basicType = parseContext.hlslEnable16BitTypes() ? EbtInt16 : EbtInt; + precision = EpqMedium; + break; + case EHTokMin16uint: + basicType = parseContext.hlslEnable16BitTypes() ? EbtUint16 : EbtUint; + precision = EpqMedium; + break; default: return false; } @@ -867,7 +911,8 @@ bool HlslGrammar::acceptVectorTemplateType(TType& type) } TBasicType basicType; - if (! acceptTemplateVecMatBasicType(basicType)) { + TPrecisionQualifier precision; + if (! acceptTemplateVecMatBasicType(basicType, precision)) { expected("scalar type"); return false; } @@ -890,7 +935,7 @@ bool HlslGrammar::acceptVectorTemplateType(TType& type) const int vecSizeI = vecSize->getAsConstantUnion()->getConstArray()[0].getIConst(); - new(&type) TType(basicType, EvqTemporary, vecSizeI); + new(&type) TType(basicType, EvqTemporary, precision, vecSizeI); if (vecSizeI == 1) type.makeVector(); @@ -919,7 +964,8 @@ bool HlslGrammar::acceptMatrixTemplateType(TType& type) } TBasicType basicType; - if (! acceptTemplateVecMatBasicType(basicType)) { + TPrecisionQualifier precision; + if (! acceptTemplateVecMatBasicType(basicType, precision)) { expected("scalar type"); return false; } @@ -956,7 +1002,7 @@ bool HlslGrammar::acceptMatrixTemplateType(TType& type) if (! acceptLiteral(cols)) return false; - new(&type) TType(basicType, EvqTemporary, 0, + new(&type) TType(basicType, EvqTemporary, precision, 0, rows->getAsConstantUnion()->getConstArray()[0].getIConst(), cols->getAsConstantUnion()->getConstArray()[0].getIConst()); @@ -2064,6 +2110,251 @@ bool HlslGrammar::acceptType(TType& type, TIntermNode*& nodeList) new(&type) TType(EbtDouble, EvqTemporary, 0, 4, 4); break; + case EHTokMin16float1x1: + new(&type) TType(min16float_bt, EvqTemporary, EpqMedium, 0, 1, 1); + break; + case EHTokMin16float1x2: + new(&type) TType(min16float_bt, EvqTemporary, EpqMedium, 0, 1, 2); + break; + case EHTokMin16float1x3: + new(&type) TType(min16float_bt, EvqTemporary, EpqMedium, 0, 1, 3); + break; + case EHTokMin16float1x4: + new(&type) TType(min16float_bt, EvqTemporary, EpqMedium, 0, 1, 4); + break; + case EHTokMin16float2x1: + new(&type) TType(min16float_bt, EvqTemporary, EpqMedium, 0, 2, 1); + break; + case EHTokMin16float2x2: + new(&type) TType(min16float_bt, EvqTemporary, EpqMedium, 0, 2, 2); + break; + case EHTokMin16float2x3: + new(&type) TType(min16float_bt, EvqTemporary, EpqMedium, 0, 2, 3); + break; + case EHTokMin16float2x4: + new(&type) TType(min16float_bt, EvqTemporary, EpqMedium, 0, 2, 4); + break; + case EHTokMin16float3x1: + new(&type) TType(min16float_bt, EvqTemporary, EpqMedium, 0, 3, 1); + break; + case EHTokMin16float3x2: + new(&type) TType(min16float_bt, EvqTemporary, EpqMedium, 0, 3, 2); + break; + case EHTokMin16float3x3: + new(&type) TType(min16float_bt, EvqTemporary, EpqMedium, 0, 3, 3); + break; + case EHTokMin16float3x4: + new(&type) TType(min16float_bt, EvqTemporary, EpqMedium, 0, 3, 4); + break; + case EHTokMin16float4x1: + new(&type) TType(min16float_bt, EvqTemporary, EpqMedium, 0, 4, 1); + break; + case EHTokMin16float4x2: + new(&type) TType(min16float_bt, EvqTemporary, EpqMedium, 0, 4, 2); + break; + case EHTokMin16float4x3: + new(&type) TType(min16float_bt, EvqTemporary, EpqMedium, 0, 4, 3); + break; + case EHTokMin16float4x4: + new(&type) TType(min16float_bt, EvqTemporary, EpqMedium, 0, 4, 4); + break; + + case EHTokMin10float1x1: + new(&type) TType(min10float_bt, EvqTemporary, EpqMedium, 0, 1, 1); + break; + case EHTokMin10float1x2: + new(&type) TType(min10float_bt, EvqTemporary, EpqMedium, 0, 1, 2); + break; + case EHTokMin10float1x3: + new(&type) TType(min10float_bt, EvqTemporary, EpqMedium, 0, 1, 3); + break; + case EHTokMin10float1x4: + new(&type) TType(min10float_bt, EvqTemporary, EpqMedium, 0, 1, 4); + break; + case EHTokMin10float2x1: + new(&type) TType(min10float_bt, EvqTemporary, EpqMedium, 0, 2, 1); + break; + case EHTokMin10float2x2: + new(&type) TType(min10float_bt, EvqTemporary, EpqMedium, 0, 2, 2); + break; + case EHTokMin10float2x3: + new(&type) TType(min10float_bt, EvqTemporary, EpqMedium, 0, 2, 3); + break; + case EHTokMin10float2x4: + new(&type) TType(min10float_bt, EvqTemporary, EpqMedium, 0, 2, 4); + break; + case EHTokMin10float3x1: + new(&type) TType(min10float_bt, EvqTemporary, EpqMedium, 0, 3, 1); + break; + case EHTokMin10float3x2: + new(&type) TType(min10float_bt, EvqTemporary, EpqMedium, 0, 3, 2); + break; + case EHTokMin10float3x3: + new(&type) TType(min10float_bt, EvqTemporary, EpqMedium, 0, 3, 3); + break; + case EHTokMin10float3x4: + new(&type) TType(min10float_bt, EvqTemporary, EpqMedium, 0, 3, 4); + break; + case EHTokMin10float4x1: + new(&type) TType(min10float_bt, EvqTemporary, EpqMedium, 0, 4, 1); + break; + case EHTokMin10float4x2: + new(&type) TType(min10float_bt, EvqTemporary, EpqMedium, 0, 4, 2); + break; + case EHTokMin10float4x3: + new(&type) TType(min10float_bt, EvqTemporary, EpqMedium, 0, 4, 3); + break; + case EHTokMin10float4x4: + new(&type) TType(min10float_bt, EvqTemporary, EpqMedium, 0, 4, 4); + break; + + case EHTokMin16int1x1: + new(&type) TType(min16int_bt, EvqTemporary, EpqMedium, 0, 1, 1); + break; + case EHTokMin16int1x2: + new(&type) TType(min16int_bt, EvqTemporary, EpqMedium, 0, 1, 2); + break; + case EHTokMin16int1x3: + new(&type) TType(min16int_bt, EvqTemporary, EpqMedium, 0, 1, 3); + break; + case EHTokMin16int1x4: + new(&type) TType(min16int_bt, EvqTemporary, EpqMedium, 0, 1, 4); + break; + case EHTokMin16int2x1: + new(&type) TType(min16int_bt, EvqTemporary, EpqMedium, 0, 2, 1); + break; + case EHTokMin16int2x2: + new(&type) TType(min16int_bt, EvqTemporary, EpqMedium, 0, 2, 2); + break; + case EHTokMin16int2x3: + new(&type) TType(min16int_bt, EvqTemporary, EpqMedium, 0, 2, 3); + break; + case EHTokMin16int2x4: + new(&type) TType(min16int_bt, EvqTemporary, EpqMedium, 0, 2, 4); + break; + case EHTokMin16int3x1: + new(&type) TType(min16int_bt, EvqTemporary, EpqMedium, 0, 3, 1); + break; + case EHTokMin16int3x2: + new(&type) TType(min16int_bt, EvqTemporary, EpqMedium, 0, 3, 2); + break; + case EHTokMin16int3x3: + new(&type) TType(min16int_bt, EvqTemporary, EpqMedium, 0, 3, 3); + break; + case EHTokMin16int3x4: + new(&type) TType(min16int_bt, EvqTemporary, EpqMedium, 0, 3, 4); + break; + case EHTokMin16int4x1: + new(&type) TType(min16int_bt, EvqTemporary, EpqMedium, 0, 4, 1); + break; + case EHTokMin16int4x2: + new(&type) TType(min16int_bt, EvqTemporary, EpqMedium, 0, 4, 2); + break; + case EHTokMin16int4x3: + new(&type) TType(min16int_bt, EvqTemporary, EpqMedium, 0, 4, 3); + break; + case EHTokMin16int4x4: + new(&type) TType(min16int_bt, EvqTemporary, EpqMedium, 0, 4, 4); + break; + + case EHTokMin12int1x1: + new(&type) TType(min12int_bt, EvqTemporary, EpqMedium, 0, 1, 1); + break; + case EHTokMin12int1x2: + new(&type) TType(min12int_bt, EvqTemporary, EpqMedium, 0, 1, 2); + break; + case EHTokMin12int1x3: + new(&type) TType(min12int_bt, EvqTemporary, EpqMedium, 0, 1, 3); + break; + case EHTokMin12int1x4: + new(&type) TType(min12int_bt, EvqTemporary, EpqMedium, 0, 1, 4); + break; + case EHTokMin12int2x1: + new(&type) TType(min12int_bt, EvqTemporary, EpqMedium, 0, 2, 1); + break; + case EHTokMin12int2x2: + new(&type) TType(min12int_bt, EvqTemporary, EpqMedium, 0, 2, 2); + break; + case EHTokMin12int2x3: + new(&type) TType(min12int_bt, EvqTemporary, EpqMedium, 0, 2, 3); + break; + case EHTokMin12int2x4: + new(&type) TType(min12int_bt, EvqTemporary, EpqMedium, 0, 2, 4); + break; + case EHTokMin12int3x1: + new(&type) TType(min12int_bt, EvqTemporary, EpqMedium, 0, 3, 1); + break; + case EHTokMin12int3x2: + new(&type) TType(min12int_bt, EvqTemporary, EpqMedium, 0, 3, 2); + break; + case EHTokMin12int3x3: + new(&type) TType(min12int_bt, EvqTemporary, EpqMedium, 0, 3, 3); + break; + case EHTokMin12int3x4: + new(&type) TType(min12int_bt, EvqTemporary, EpqMedium, 0, 3, 4); + break; + case EHTokMin12int4x1: + new(&type) TType(min12int_bt, EvqTemporary, EpqMedium, 0, 4, 1); + break; + case EHTokMin12int4x2: + new(&type) TType(min12int_bt, EvqTemporary, EpqMedium, 0, 4, 2); + break; + case EHTokMin12int4x3: + new(&type) TType(min12int_bt, EvqTemporary, EpqMedium, 0, 4, 3); + break; + case EHTokMin12int4x4: + new(&type) TType(min12int_bt, EvqTemporary, EpqMedium, 0, 4, 4); + break; + + case EHTokMin16uint1x1: + new(&type) TType(min16uint_bt, EvqTemporary, EpqMedium, 0, 1, 1); + break; + case EHTokMin16uint1x2: + new(&type) TType(min16uint_bt, EvqTemporary, EpqMedium, 0, 1, 2); + break; + case EHTokMin16uint1x3: + new(&type) TType(min16uint_bt, EvqTemporary, EpqMedium, 0, 1, 3); + break; + case EHTokMin16uint1x4: + new(&type) TType(min16uint_bt, EvqTemporary, EpqMedium, 0, 1, 4); + break; + case EHTokMin16uint2x1: + new(&type) TType(min16uint_bt, EvqTemporary, EpqMedium, 0, 2, 1); + break; + case EHTokMin16uint2x2: + new(&type) TType(min16uint_bt, EvqTemporary, EpqMedium, 0, 2, 2); + break; + case EHTokMin16uint2x3: + new(&type) TType(min16uint_bt, EvqTemporary, EpqMedium, 0, 2, 3); + break; + case EHTokMin16uint2x4: + new(&type) TType(min16uint_bt, EvqTemporary, EpqMedium, 0, 2, 4); + break; + case EHTokMin16uint3x1: + new(&type) TType(min16uint_bt, EvqTemporary, EpqMedium, 0, 3, 1); + break; + case EHTokMin16uint3x2: + new(&type) TType(min16uint_bt, EvqTemporary, EpqMedium, 0, 3, 2); + break; + case EHTokMin16uint3x3: + new(&type) TType(min16uint_bt, EvqTemporary, EpqMedium, 0, 3, 3); + break; + case EHTokMin16uint3x4: + new(&type) TType(min16uint_bt, EvqTemporary, EpqMedium, 0, 3, 4); + break; + case EHTokMin16uint4x1: + new(&type) TType(min16uint_bt, EvqTemporary, EpqMedium, 0, 4, 1); + break; + case EHTokMin16uint4x2: + new(&type) TType(min16uint_bt, EvqTemporary, EpqMedium, 0, 4, 2); + break; + case EHTokMin16uint4x3: + new(&type) TType(min16uint_bt, EvqTemporary, EpqMedium, 0, 4, 3); + break; + case EHTokMin16uint4x4: + new(&type) TType(min16uint_bt, EvqTemporary, EpqMedium, 0, 4, 4); + break; + default: return false; } diff --git a/glslang/HLSL/hlslGrammar.h b/glslang/HLSL/hlslGrammar.h index 27706b2b..cfe294bc 100755 --- a/glslang/HLSL/hlslGrammar.h +++ b/glslang/HLSL/hlslGrammar.h @@ -1,6 +1,7 @@ // // Copyright (C) 2016-2018 Google, Inc. // Copyright (C) 2016 LunarG, Inc. +// Copyright (C) 2023 Mobica Limited. // // All rights reserved. // @@ -72,11 +73,12 @@ namespace glslang { bool acceptSamplerState(); bool acceptFullySpecifiedType(TType&, const TAttributes&); bool acceptFullySpecifiedType(TType&, TIntermNode*& nodeList, const TAttributes&, bool forbidDeclarators = false); - bool acceptQualifier(TQualifier&); + bool acceptPreQualifier(TQualifier&); + bool acceptPostQualifier(TQualifier&); bool acceptLayoutQualifierList(TQualifier&); bool acceptType(TType&); bool acceptType(TType&, TIntermNode*& nodeList); - bool acceptTemplateVecMatBasicType(TBasicType&); + bool acceptTemplateVecMatBasicType(TBasicType&, TPrecisionQualifier&); bool acceptVectorTemplateType(TType&); bool acceptMatrixTemplateType(TType&); bool acceptTessellationDeclType(TBuiltInVariable&); diff --git a/glslang/HLSL/hlslParseHelper.cpp b/glslang/HLSL/hlslParseHelper.cpp index 6e0d314a..b0fb5f46 100755 --- a/glslang/HLSL/hlslParseHelper.cpp +++ b/glslang/HLSL/hlslParseHelper.cpp @@ -1177,10 +1177,13 @@ void HlslParseContext::flatten(const TVariable& variable, bool linkage, bool arr if (type.isBuiltIn() && !type.isStruct()) return; + auto entry = flattenMap.insert(std::make_pair(variable.getUniqueId(), TFlattenData(type.getQualifier().layoutBinding, type.getQualifier().layoutLocation))); + if (type.isStruct() && type.getStruct()->size()==0) + return; // if flattening arrayed io struct, array each member of dereferenced type if (arrayed) { const TType dereferencedType(type, 0); @@ -7565,7 +7568,6 @@ const TFunction* HlslParseContext::findFunction(const TSourceLoc& loc, TFunction candidateList[0]->getBuiltInOp() == EOpMethodRestartStrip || candidateList[0]->getBuiltInOp() == EOpMethodIncrementCounter || candidateList[0]->getBuiltInOp() == EOpMethodDecrementCounter || - candidateList[0]->getBuiltInOp() == EOpMethodAppend || candidateList[0]->getBuiltInOp() == EOpMethodConsume)) { return candidateList[0]; } @@ -9046,7 +9048,8 @@ void HlslParseContext::fixBlockUniformOffsets(const TQualifier& qualifier, TType // "The specified offset must be a multiple // of the base alignment of the type of the block member it qualifies, or a compile-time error results." if (! IsMultipleOfPow2(memberQualifier.layoutOffset, memberAlignment)) - error(memberLoc, "must be a multiple of the member's alignment", "offset", ""); + error(memberLoc, "must be a multiple of the member's alignment", "offset", + "(layout offset = %d | member alignment = %d)", memberQualifier.layoutOffset, memberAlignment); // "The offset qualifier forces the qualified member to start at or after the specified // integral-constant expression, which will be its byte offset from the beginning of the buffer. @@ -9548,6 +9551,8 @@ bool HlslParseContext::isInputBuiltIn(const TQualifier& qualifier) const return language == EShLangTessEvaluation; case EbvTessCoord: return language == EShLangTessEvaluation; + case EbvViewIndex: + return language != EShLangCompute; default: return false; } diff --git a/glslang/HLSL/hlslParseables.cpp b/glslang/HLSL/hlslParseables.cpp index 15918dc3..8fb1d290 100755 --- a/glslang/HLSL/hlslParseables.cpp +++ b/glslang/HLSL/hlslParseables.cpp @@ -564,8 +564,8 @@ void TBuiltInParseablesHlsl::initialize(int /*version*/, EProfile /*profile*/, c { "GetRenderTargetSamplePosition", "V2", "F", "V1", "I", EShLangAll, false }, { "GroupMemoryBarrier", nullptr, nullptr, "-", "-", EShLangCS, false }, { "GroupMemoryBarrierWithGroupSync", nullptr, nullptr, "-", "-", EShLangCS, false }, - { "InterlockedAdd", "-", "-", "SVM,,>", "UI,,", EShLangPSCS, false }, - { "InterlockedAdd", "-", "-", "SVM,", "UI,", EShLangPSCS, false }, + { "InterlockedAdd", "-", "-", "SVM,,>", "FUI,,", EShLangPSCS, false }, + { "InterlockedAdd", "-", "-", "SVM,", "FUI,", EShLangPSCS, false }, { "InterlockedAnd", "-", "-", "SVM,,>", "UI,,", EShLangPSCS, false }, { "InterlockedAnd", "-", "-", "SVM,", "UI,", EShLangPSCS, false }, { "InterlockedCompareExchange", "-", "-", "SVM,,,>", "UI,,,", EShLangPSCS, false }, diff --git a/glslang/HLSL/hlslScanContext.cpp b/glslang/HLSL/hlslScanContext.cpp index fc62672f..e9edb619 100755 --- a/glslang/HLSL/hlslScanContext.cpp +++ b/glslang/HLSL/hlslScanContext.cpp @@ -312,6 +312,86 @@ void HlslScanContext::fillInKeywordMap() (*KeywordMap)["double4x2"] = EHTokDouble4x2; (*KeywordMap)["double4x3"] = EHTokDouble4x3; (*KeywordMap)["double4x4"] = EHTokDouble4x4; + (*KeywordMap)["min16float1x1"] = EHTokMin16float1x1; + (*KeywordMap)["min16float1x2"] = EHTokMin16float1x2; + (*KeywordMap)["min16float1x3"] = EHTokMin16float1x3; + (*KeywordMap)["min16float1x4"] = EHTokMin16float1x4; + (*KeywordMap)["min16float2x1"] = EHTokMin16float2x1; + (*KeywordMap)["min16float2x2"] = EHTokMin16float2x2; + (*KeywordMap)["min16float2x3"] = EHTokMin16float2x3; + (*KeywordMap)["min16float2x4"] = EHTokMin16float2x4; + (*KeywordMap)["min16float3x1"] = EHTokMin16float3x1; + (*KeywordMap)["min16float3x2"] = EHTokMin16float3x2; + (*KeywordMap)["min16float3x3"] = EHTokMin16float3x3; + (*KeywordMap)["min16float3x4"] = EHTokMin16float3x4; + (*KeywordMap)["min16float4x1"] = EHTokMin16float4x1; + (*KeywordMap)["min16float4x2"] = EHTokMin16float4x2; + (*KeywordMap)["min16float4x3"] = EHTokMin16float4x3; + (*KeywordMap)["min16float4x4"] = EHTokMin16float4x4; + (*KeywordMap)["min10float1x1"] = EHTokMin10float1x1; + (*KeywordMap)["min10float1x2"] = EHTokMin10float1x2; + (*KeywordMap)["min10float1x3"] = EHTokMin10float1x3; + (*KeywordMap)["min10float1x4"] = EHTokMin10float1x4; + (*KeywordMap)["min10float2x1"] = EHTokMin10float2x1; + (*KeywordMap)["min10float2x2"] = EHTokMin10float2x2; + (*KeywordMap)["min10float2x3"] = EHTokMin10float2x3; + (*KeywordMap)["min10float2x4"] = EHTokMin10float2x4; + (*KeywordMap)["min10float3x1"] = EHTokMin10float3x1; + (*KeywordMap)["min10float3x2"] = EHTokMin10float3x2; + (*KeywordMap)["min10float3x3"] = EHTokMin10float3x3; + (*KeywordMap)["min10float3x4"] = EHTokMin10float3x4; + (*KeywordMap)["min10float4x1"] = EHTokMin10float4x1; + (*KeywordMap)["min10float4x2"] = EHTokMin10float4x2; + (*KeywordMap)["min10float4x3"] = EHTokMin10float4x3; + (*KeywordMap)["min10float4x4"] = EHTokMin10float4x4; + (*KeywordMap)["min16int1x1"] = EHTokMin16int1x1; + (*KeywordMap)["min16int1x2"] = EHTokMin16int1x2; + (*KeywordMap)["min16int1x3"] = EHTokMin16int1x3; + (*KeywordMap)["min16int1x4"] = EHTokMin16int1x4; + (*KeywordMap)["min16int2x1"] = EHTokMin16int2x1; + (*KeywordMap)["min16int2x2"] = EHTokMin16int2x2; + (*KeywordMap)["min16int2x3"] = EHTokMin16int2x3; + (*KeywordMap)["min16int2x4"] = EHTokMin16int2x4; + (*KeywordMap)["min16int3x1"] = EHTokMin16int3x1; + (*KeywordMap)["min16int3x2"] = EHTokMin16int3x2; + (*KeywordMap)["min16int3x3"] = EHTokMin16int3x3; + (*KeywordMap)["min16int3x4"] = EHTokMin16int3x4; + (*KeywordMap)["min16int4x1"] = EHTokMin16int4x1; + (*KeywordMap)["min16int4x2"] = EHTokMin16int4x2; + (*KeywordMap)["min16int4x3"] = EHTokMin16int4x3; + (*KeywordMap)["min16int4x4"] = EHTokMin16int4x4; + (*KeywordMap)["min12int1x1"] = EHTokMin12int1x1; + (*KeywordMap)["min12int1x2"] = EHTokMin12int1x2; + (*KeywordMap)["min12int1x3"] = EHTokMin12int1x3; + (*KeywordMap)["min12int1x4"] = EHTokMin12int1x4; + (*KeywordMap)["min12int2x1"] = EHTokMin12int2x1; + (*KeywordMap)["min12int2x2"] = EHTokMin12int2x2; + (*KeywordMap)["min12int2x3"] = EHTokMin12int2x3; + (*KeywordMap)["min12int2x4"] = EHTokMin12int2x4; + (*KeywordMap)["min12int3x1"] = EHTokMin12int3x1; + (*KeywordMap)["min12int3x2"] = EHTokMin12int3x2; + (*KeywordMap)["min12int3x3"] = EHTokMin12int3x3; + (*KeywordMap)["min12int3x4"] = EHTokMin12int3x4; + (*KeywordMap)["min12int4x1"] = EHTokMin12int4x1; + (*KeywordMap)["min12int4x2"] = EHTokMin12int4x2; + (*KeywordMap)["min12int4x3"] = EHTokMin12int4x3; + (*KeywordMap)["min12int4x4"] = EHTokMin12int4x4; + (*KeywordMap)["min16uint1x1"] = EHTokMin16uint1x1; + (*KeywordMap)["min16uint1x2"] = EHTokMin16uint1x2; + (*KeywordMap)["min16uint1x3"] = EHTokMin16uint1x3; + (*KeywordMap)["min16uint1x4"] = EHTokMin16uint1x4; + (*KeywordMap)["min16uint2x1"] = EHTokMin16uint2x1; + (*KeywordMap)["min16uint2x2"] = EHTokMin16uint2x2; + (*KeywordMap)["min16uint2x3"] = EHTokMin16uint2x3; + (*KeywordMap)["min16uint2x4"] = EHTokMin16uint2x4; + (*KeywordMap)["min16uint3x1"] = EHTokMin16uint3x1; + (*KeywordMap)["min16uint3x2"] = EHTokMin16uint3x2; + (*KeywordMap)["min16uint3x3"] = EHTokMin16uint3x3; + (*KeywordMap)["min16uint3x4"] = EHTokMin16uint3x4; + (*KeywordMap)["min16uint4x1"] = EHTokMin16uint4x1; + (*KeywordMap)["min16uint4x2"] = EHTokMin16uint4x2; + (*KeywordMap)["min16uint4x3"] = EHTokMin16uint4x3; + (*KeywordMap)["min16uint4x4"] = EHTokMin16uint4x4; (*KeywordMap)["sampler"] = EHTokSampler; (*KeywordMap)["sampler1D"] = EHTokSampler1d; @@ -432,6 +512,7 @@ void HlslScanContext::fillInKeywordMap() (*SemanticMap)["SV_PRIMITIVEID"] = EbvPrimitiveId; (*SemanticMap)["SV_OUTPUTCONTROLPOINTID"] = EbvInvocationId; (*SemanticMap)["SV_ISFRONTFACE"] = EbvFace; + (*SemanticMap)["SV_VIEWID"] = EbvViewIndex; (*SemanticMap)["SV_INSTANCEID"] = EbvInstanceIndex; (*SemanticMap)["SV_INSIDETESSFACTOR"] = EbvTessLevelInner; (*SemanticMap)["SV_GSINSTANCEID"] = EbvInvocationId; @@ -806,6 +887,86 @@ EHlslTokenClass HlslScanContext::tokenizeIdentifier() case EHTokDouble4x2: case EHTokDouble4x3: case EHTokDouble4x4: + case EHTokMin16float1x1: + case EHTokMin16float1x2: + case EHTokMin16float1x3: + case EHTokMin16float1x4: + case EHTokMin16float2x1: + case EHTokMin16float2x2: + case EHTokMin16float2x3: + case EHTokMin16float2x4: + case EHTokMin16float3x1: + case EHTokMin16float3x2: + case EHTokMin16float3x3: + case EHTokMin16float3x4: + case EHTokMin16float4x1: + case EHTokMin16float4x2: + case EHTokMin16float4x3: + case EHTokMin16float4x4: + case EHTokMin10float1x1: + case EHTokMin10float1x2: + case EHTokMin10float1x3: + case EHTokMin10float1x4: + case EHTokMin10float2x1: + case EHTokMin10float2x2: + case EHTokMin10float2x3: + case EHTokMin10float2x4: + case EHTokMin10float3x1: + case EHTokMin10float3x2: + case EHTokMin10float3x3: + case EHTokMin10float3x4: + case EHTokMin10float4x1: + case EHTokMin10float4x2: + case EHTokMin10float4x3: + case EHTokMin10float4x4: + case EHTokMin16int1x1: + case EHTokMin16int1x2: + case EHTokMin16int1x3: + case EHTokMin16int1x4: + case EHTokMin16int2x1: + case EHTokMin16int2x2: + case EHTokMin16int2x3: + case EHTokMin16int2x4: + case EHTokMin16int3x1: + case EHTokMin16int3x2: + case EHTokMin16int3x3: + case EHTokMin16int3x4: + case EHTokMin16int4x1: + case EHTokMin16int4x2: + case EHTokMin16int4x3: + case EHTokMin16int4x4: + case EHTokMin12int1x1: + case EHTokMin12int1x2: + case EHTokMin12int1x3: + case EHTokMin12int1x4: + case EHTokMin12int2x1: + case EHTokMin12int2x2: + case EHTokMin12int2x3: + case EHTokMin12int2x4: + case EHTokMin12int3x1: + case EHTokMin12int3x2: + case EHTokMin12int3x3: + case EHTokMin12int3x4: + case EHTokMin12int4x1: + case EHTokMin12int4x2: + case EHTokMin12int4x3: + case EHTokMin12int4x4: + case EHTokMin16uint1x1: + case EHTokMin16uint1x2: + case EHTokMin16uint1x3: + case EHTokMin16uint1x4: + case EHTokMin16uint2x1: + case EHTokMin16uint2x2: + case EHTokMin16uint2x3: + case EHTokMin16uint2x4: + case EHTokMin16uint3x1: + case EHTokMin16uint3x2: + case EHTokMin16uint3x3: + case EHTokMin16uint3x4: + case EHTokMin16uint4x1: + case EHTokMin16uint4x2: + case EHTokMin16uint4x3: + case EHTokMin16uint4x4: return keyword; // texturing types diff --git a/glslang/HLSL/hlslTokens.h b/glslang/HLSL/hlslTokens.h index 4426bcce..a7c12990 100755 --- a/glslang/HLSL/hlslTokens.h +++ b/glslang/HLSL/hlslTokens.h @@ -249,6 +249,86 @@ enum EHlslTokenClass { EHTokDouble4x2, EHTokDouble4x3, EHTokDouble4x4, + EHTokMin16float1x1, + EHTokMin16float1x2, + EHTokMin16float1x3, + EHTokMin16float1x4, + EHTokMin16float2x1, + EHTokMin16float2x2, + EHTokMin16float2x3, + EHTokMin16float2x4, + EHTokMin16float3x1, + EHTokMin16float3x2, + EHTokMin16float3x3, + EHTokMin16float3x4, + EHTokMin16float4x1, + EHTokMin16float4x2, + EHTokMin16float4x3, + EHTokMin16float4x4, + EHTokMin10float1x1, + EHTokMin10float1x2, + EHTokMin10float1x3, + EHTokMin10float1x4, + EHTokMin10float2x1, + EHTokMin10float2x2, + EHTokMin10float2x3, + EHTokMin10float2x4, + EHTokMin10float3x1, + EHTokMin10float3x2, + EHTokMin10float3x3, + EHTokMin10float3x4, + EHTokMin10float4x1, + EHTokMin10float4x2, + EHTokMin10float4x3, + EHTokMin10float4x4, + EHTokMin16int1x1, + EHTokMin16int1x2, + EHTokMin16int1x3, + EHTokMin16int1x4, + EHTokMin16int2x1, + EHTokMin16int2x2, + EHTokMin16int2x3, + EHTokMin16int2x4, + EHTokMin16int3x1, + EHTokMin16int3x2, + EHTokMin16int3x3, + EHTokMin16int3x4, + EHTokMin16int4x1, + EHTokMin16int4x2, + EHTokMin16int4x3, + EHTokMin16int4x4, + EHTokMin12int1x1, + EHTokMin12int1x2, + EHTokMin12int1x3, + EHTokMin12int1x4, + EHTokMin12int2x1, + EHTokMin12int2x2, + EHTokMin12int2x3, + EHTokMin12int2x4, + EHTokMin12int3x1, + EHTokMin12int3x2, + EHTokMin12int3x3, + EHTokMin12int3x4, + EHTokMin12int4x1, + EHTokMin12int4x2, + EHTokMin12int4x3, + EHTokMin12int4x4, + EHTokMin16uint1x1, + EHTokMin16uint1x2, + EHTokMin16uint1x3, + EHTokMin16uint1x4, + EHTokMin16uint2x1, + EHTokMin16uint2x2, + EHTokMin16uint2x3, + EHTokMin16uint2x4, + EHTokMin16uint3x1, + EHTokMin16uint3x2, + EHTokMin16uint3x3, + EHTokMin16uint3x4, + EHTokMin16uint4x1, + EHTokMin16uint4x2, + EHTokMin16uint4x3, + EHTokMin16uint4x4, // texturing types EHTokSampler, diff --git a/glslang/Include/BaseTypes.h b/glslang/Include/BaseTypes.h index e2186566..64bffa89 100755 --- a/glslang/Include/BaseTypes.h +++ b/glslang/Include/BaseTypes.h @@ -65,10 +65,10 @@ enum TBasicType { EbtAccStruct, EbtReference, EbtRayQuery, -#ifndef GLSLANG_WEB + EbtHitObjectNV, + EbtCoopmat, // SPIR-V type defined by spirv_type EbtSpirvType, -#endif // HLSL types that live only temporarily. EbtString, @@ -95,15 +95,14 @@ enum TStorageQualifier { EvqUniform, // read only, shared with app EvqBuffer, // read/write, shared with app EvqShared, // compute shader's read/write 'shared' qualifier -#ifndef GLSLANG_WEB EvqSpirvStorageClass, // spirv_storage_class -#endif EvqPayload, EvqPayloadIn, EvqHitAttr, EvqCallableData, EvqCallableDataIn, + EvqHitObjectAttrNV, EvqtaskPayloadSharedEXT, @@ -132,6 +131,8 @@ enum TStorageQualifier { EvqFragDepth, EvqFragStencil, + EvqTileImageEXT, + // end of list EvqLast }; @@ -289,6 +290,12 @@ enum TBuiltInVariable { EbvLayerPerViewNV, EbvMeshViewCountNV, EbvMeshViewIndicesNV, + + EbvMicroTrianglePositionNV, + EbvMicroTriangleBaryNV, + EbvHitKindFrontFacingMicroTriangleNV, + EbvHitKindBackFacingMicroTriangleNV, + //GL_EXT_mesh_shader EbvPrimitivePointIndicesEXT, EbvPrimitiveLineIndicesEXT, @@ -323,6 +330,8 @@ enum TBuiltInVariable { EbvWarpIDARM, EbvWarpMaxIDARM, + EbvPositionFetch, + EbvLast }; @@ -335,10 +344,6 @@ enum TPrecisionQualifier { EpqHigh }; -#ifdef GLSLANG_WEB -__inline const char* GetStorageQualifierString(TStorageQualifier q) { return ""; } -__inline const char* GetPrecisionQualifierString(TPrecisionQualifier p) { return ""; } -#else // These will show up in error messages __inline const char* GetStorageQualifierString(TStorageQualifier q) { @@ -347,9 +352,7 @@ __inline const char* GetStorageQualifierString(TStorageQualifier q) case EvqGlobal: return "global"; break; case EvqConst: return "const"; break; case EvqConstReadOnly: return "const (read only)"; break; -#ifndef GLSLANG_WEB case EvqSpirvStorageClass: return "spirv_storage_class"; break; -#endif case EvqVaryingIn: return "in"; break; case EvqVaryingOut: return "out"; break; case EvqUniform: return "uniform"; break; @@ -375,6 +378,7 @@ __inline const char* GetStorageQualifierString(TStorageQualifier q) case EvqCallableData: return "callableDataNV"; break; case EvqCallableDataIn: return "callableDataInNV"; break; case EvqtaskPayloadSharedEXT: return "taskPayloadSharedEXT"; break; + case EvqHitObjectAttrNV:return "hitObjectAttributeNV"; break; default: return "unknown qualifier"; } } @@ -525,6 +529,9 @@ __inline const char* GetBuiltInVariableString(TBuiltInVariable v) case EbvShadingRateKHR: return "ShadingRateKHR"; case EbvPrimitiveShadingRateKHR: return "PrimitiveShadingRateKHR"; + case EbvHitKindFrontFacingMicroTriangleNV: return "HitKindFrontFacingMicroTriangleNV"; + case EbvHitKindBackFacingMicroTriangleNV: return "HitKindBackFacingMicroTriangleNV"; + default: return "unknown built-in variable"; } } @@ -539,7 +546,6 @@ __inline const char* GetPrecisionQualifierString(TPrecisionQualifier p) default: return "unknown precision qualifier"; } } -#endif __inline bool isTypeSignedInt(TBasicType type) { diff --git a/glslang/Include/Common.h b/glslang/Include/Common.h index a5b41cb3..af7dfe62 100755 --- a/glslang/Include/Common.h +++ b/glslang/Include/Common.h @@ -44,6 +44,7 @@ #else #include #endif +#include #include #include #include @@ -54,7 +55,7 @@ #include #include -#if defined(__ANDROID__) || (defined(_MSC_VER) && _MSC_VER < 1700) +#if defined(__ANDROID__) #include namespace std { template @@ -66,7 +67,7 @@ std::string to_string(const T& val) { } #endif -#if (defined(_MSC_VER) && _MSC_VER < 1900 /*vs2015*/) || (defined(MINGW_HAS_SECURE_API) && MINGW_HAS_SECURE_API) +#if defined(MINGW_HAS_SECURE_API) && MINGW_HAS_SECURE_API #include #ifndef snprintf #define snprintf sprintf_s @@ -82,22 +83,6 @@ std::string to_string(const T& val) { #define UINT_PTR uintptr_t #endif -#if defined(_MSC_VER) && _MSC_VER < 1800 - #include - inline long long int strtoll (const char* str, char** endptr, int base) - { - return _strtoi64(str, endptr, base); - } - inline unsigned long long int strtoull (const char* str, char** endptr, int base) - { - return _strtoui64(str, endptr, base); - } - inline long long int atoll (const char* str) - { - return strtoll(str, NULL, 10); - } -#endif - #if defined(_MSC_VER) #define strdup _strdup #endif @@ -307,34 +292,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/glslang/Include/ConstantUnion.h b/glslang/Include/ConstantUnion.h index c4ffb857..da4737b6 100755 --- a/glslang/Include/ConstantUnion.h +++ b/glslang/Include/ConstantUnion.h @@ -234,7 +234,6 @@ public: break; -#ifndef GLSLANG_WEB case EbtInt16: if (constant.i16Const == i16Const) return true; @@ -265,7 +264,6 @@ public: return true; break; -#endif default: assert(false && "Default missing"); } @@ -347,7 +345,6 @@ public: return true; return false; -#ifndef GLSLANG_WEB case EbtInt8: if (i8Const > constant.i8Const) return true; @@ -378,7 +375,6 @@ public: return true; return false; -#endif default: assert(false && "Default missing"); return false; @@ -389,7 +385,6 @@ public: { assert(type == constant.type); switch (type) { -#ifndef GLSLANG_WEB case EbtInt8: if (i8Const < constant.i8Const) return true; @@ -419,7 +414,6 @@ public: return true; return false; -#endif case EbtDouble: if (dConst < constant.dConst) return true; @@ -449,14 +443,12 @@ public: case EbtInt: returnValue.setIConst(iConst + constant.iConst); break; case EbtUint: returnValue.setUConst(uConst + constant.uConst); break; case EbtDouble: returnValue.setDConst(dConst + constant.dConst); break; -#ifndef GLSLANG_WEB case EbtInt8: returnValue.setI8Const(i8Const + constant.i8Const); break; case EbtInt16: returnValue.setI16Const(i16Const + constant.i16Const); break; case EbtInt64: returnValue.setI64Const(i64Const + constant.i64Const); break; case EbtUint8: returnValue.setU8Const(u8Const + constant.u8Const); break; case EbtUint16: returnValue.setU16Const(u16Const + constant.u16Const); break; case EbtUint64: returnValue.setU64Const(u64Const + constant.u64Const); break; -#endif default: assert(false && "Default missing"); } @@ -471,14 +463,12 @@ public: case EbtInt: returnValue.setIConst(iConst - constant.iConst); break; case EbtUint: returnValue.setUConst(uConst - constant.uConst); break; case EbtDouble: returnValue.setDConst(dConst - constant.dConst); break; -#ifndef GLSLANG_WEB case EbtInt8: returnValue.setI8Const(i8Const - constant.i8Const); break; case EbtInt16: returnValue.setI16Const(i16Const - constant.i16Const); break; case EbtInt64: returnValue.setI64Const(i64Const - constant.i64Const); break; case EbtUint8: returnValue.setU8Const(u8Const - constant.u8Const); break; case EbtUint16: returnValue.setU16Const(u16Const - constant.u16Const); break; case EbtUint64: returnValue.setU64Const(u64Const - constant.u64Const); break; -#endif default: assert(false && "Default missing"); } @@ -493,14 +483,12 @@ public: case EbtInt: returnValue.setIConst(iConst * constant.iConst); break; case EbtUint: returnValue.setUConst(uConst * constant.uConst); break; case EbtDouble: returnValue.setDConst(dConst * constant.dConst); break; -#ifndef GLSLANG_WEB case EbtInt8: returnValue.setI8Const(i8Const * constant.i8Const); break; case EbtInt16: returnValue.setI16Const(i16Const * constant.i16Const); break; case EbtInt64: returnValue.setI64Const(i64Const * constant.i64Const); break; case EbtUint8: returnValue.setU8Const(u8Const * constant.u8Const); break; case EbtUint16: returnValue.setU16Const(u16Const * constant.u16Const); break; case EbtUint64: returnValue.setU64Const(u64Const * constant.u64Const); break; -#endif default: assert(false && "Default missing"); } @@ -514,14 +502,12 @@ public: switch (type) { case EbtInt: returnValue.setIConst(iConst % constant.iConst); break; case EbtUint: returnValue.setUConst(uConst % constant.uConst); break; -#ifndef GLSLANG_WEB case EbtInt8: returnValue.setI8Const(i8Const % constant.i8Const); break; - case EbtInt16: returnValue.setI8Const(i8Const % constant.i16Const); break; + case EbtInt16: returnValue.setI16Const(i16Const % constant.i16Const); break; case EbtInt64: returnValue.setI64Const(i64Const % constant.i64Const); break; case EbtUint8: returnValue.setU8Const(u8Const % constant.u8Const); break; case EbtUint16: returnValue.setU16Const(u16Const % constant.u16Const); break; case EbtUint64: returnValue.setU64Const(u64Const % constant.u64Const); break; -#endif default: assert(false && "Default missing"); } @@ -532,7 +518,6 @@ public: { TConstUnion returnValue; switch (type) { -#ifndef GLSLANG_WEB case EbtInt8: switch (constant.type) { case EbtInt8: returnValue.setI8Const(i8Const >> constant.i8Const); break; @@ -585,19 +570,16 @@ public: default: assert(false && "Default missing"); } break; -#endif case EbtInt: switch (constant.type) { case EbtInt: returnValue.setIConst(iConst >> constant.iConst); break; case EbtUint: returnValue.setIConst(iConst >> constant.uConst); break; -#ifndef GLSLANG_WEB case EbtInt8: returnValue.setIConst(iConst >> constant.i8Const); break; case EbtUint8: returnValue.setIConst(iConst >> constant.u8Const); break; case EbtInt16: returnValue.setIConst(iConst >> constant.i16Const); break; case EbtUint16: returnValue.setIConst(iConst >> constant.u16Const); break; case EbtInt64: returnValue.setIConst(iConst >> constant.i64Const); break; case EbtUint64: returnValue.setIConst(iConst >> constant.u64Const); break; -#endif default: assert(false && "Default missing"); } break; @@ -605,18 +587,15 @@ public: switch (constant.type) { case EbtInt: returnValue.setUConst(uConst >> constant.iConst); break; case EbtUint: returnValue.setUConst(uConst >> constant.uConst); break; -#ifndef GLSLANG_WEB case EbtInt8: returnValue.setUConst(uConst >> constant.i8Const); break; case EbtUint8: returnValue.setUConst(uConst >> constant.u8Const); break; case EbtInt16: returnValue.setUConst(uConst >> constant.i16Const); break; case EbtUint16: returnValue.setUConst(uConst >> constant.u16Const); break; case EbtInt64: returnValue.setUConst(uConst >> constant.i64Const); break; case EbtUint64: returnValue.setUConst(uConst >> constant.u64Const); break; -#endif default: assert(false && "Default missing"); } break; -#ifndef GLSLANG_WEB case EbtInt64: switch (constant.type) { case EbtInt8: returnValue.setI64Const(i64Const >> constant.i8Const); break; @@ -643,7 +622,6 @@ public: default: assert(false && "Default missing"); } break; -#endif default: assert(false && "Default missing"); } @@ -654,7 +632,6 @@ public: { TConstUnion returnValue; switch (type) { -#ifndef GLSLANG_WEB case EbtInt8: switch (constant.type) { case EbtInt8: returnValue.setI8Const(i8Const << constant.i8Const); break; @@ -733,19 +710,16 @@ public: default: assert(false && "Default missing"); } break; -#endif case EbtInt: switch (constant.type) { case EbtInt: returnValue.setIConst(iConst << constant.iConst); break; case EbtUint: returnValue.setIConst(iConst << constant.uConst); break; -#ifndef GLSLANG_WEB case EbtInt8: returnValue.setIConst(iConst << constant.i8Const); break; case EbtUint8: returnValue.setIConst(iConst << constant.u8Const); break; case EbtInt16: returnValue.setIConst(iConst << constant.i16Const); break; case EbtUint16: returnValue.setIConst(iConst << constant.u16Const); break; case EbtInt64: returnValue.setIConst(iConst << constant.i64Const); break; case EbtUint64: returnValue.setIConst(iConst << constant.u64Const); break; -#endif default: assert(false && "Default missing"); } break; @@ -753,14 +727,12 @@ public: switch (constant.type) { case EbtInt: returnValue.setUConst(uConst << constant.iConst); break; case EbtUint: returnValue.setUConst(uConst << constant.uConst); break; -#ifndef GLSLANG_WEB case EbtInt8: returnValue.setUConst(uConst << constant.i8Const); break; case EbtUint8: returnValue.setUConst(uConst << constant.u8Const); break; case EbtInt16: returnValue.setUConst(uConst << constant.i16Const); break; case EbtUint16: returnValue.setUConst(uConst << constant.u16Const); break; case EbtInt64: returnValue.setUConst(uConst << constant.i64Const); break; case EbtUint64: returnValue.setUConst(uConst << constant.u64Const); break; -#endif default: assert(false && "Default missing"); } break; @@ -777,14 +749,12 @@ public: switch (type) { case EbtInt: returnValue.setIConst(iConst & constant.iConst); break; case EbtUint: returnValue.setUConst(uConst & constant.uConst); break; -#ifndef GLSLANG_WEB case EbtInt8: returnValue.setI8Const(i8Const & constant.i8Const); break; case EbtUint8: returnValue.setU8Const(u8Const & constant.u8Const); break; case EbtInt16: returnValue.setI16Const(i16Const & constant.i16Const); break; case EbtUint16: returnValue.setU16Const(u16Const & constant.u16Const); break; case EbtInt64: returnValue.setI64Const(i64Const & constant.i64Const); break; case EbtUint64: returnValue.setU64Const(u64Const & constant.u64Const); break; -#endif default: assert(false && "Default missing"); } @@ -798,14 +768,12 @@ public: switch (type) { case EbtInt: returnValue.setIConst(iConst | constant.iConst); break; case EbtUint: returnValue.setUConst(uConst | constant.uConst); break; -#ifndef GLSLANG_WEB case EbtInt8: returnValue.setI8Const(i8Const | constant.i8Const); break; case EbtUint8: returnValue.setU8Const(u8Const | constant.u8Const); break; case EbtInt16: returnValue.setI16Const(i16Const | constant.i16Const); break; case EbtUint16: returnValue.setU16Const(u16Const | constant.u16Const); break; case EbtInt64: returnValue.setI64Const(i64Const | constant.i64Const); break; case EbtUint64: returnValue.setU64Const(u64Const | constant.u64Const); break; -#endif default: assert(false && "Default missing"); } @@ -819,14 +787,12 @@ public: switch (type) { case EbtInt: returnValue.setIConst(iConst ^ constant.iConst); break; case EbtUint: returnValue.setUConst(uConst ^ constant.uConst); break; -#ifndef GLSLANG_WEB case EbtInt8: returnValue.setI8Const(i8Const ^ constant.i8Const); break; case EbtUint8: returnValue.setU8Const(u8Const ^ constant.u8Const); break; case EbtInt16: returnValue.setI16Const(i16Const ^ constant.i16Const); break; case EbtUint16: returnValue.setU16Const(u16Const ^ constant.u16Const); break; case EbtInt64: returnValue.setI64Const(i64Const ^ constant.i64Const); break; case EbtUint64: returnValue.setU64Const(u64Const ^ constant.u64Const); break; -#endif default: assert(false && "Default missing"); } @@ -839,14 +805,12 @@ public: switch (type) { case EbtInt: returnValue.setIConst(~iConst); break; case EbtUint: returnValue.setUConst(~uConst); break; -#ifndef GLSLANG_WEB case EbtInt8: returnValue.setI8Const(~i8Const); break; case EbtUint8: returnValue.setU8Const(~u8Const); break; case EbtInt16: returnValue.setI16Const(~i16Const); break; case EbtUint16: returnValue.setU16Const(~u16Const); break; case EbtInt64: returnValue.setI64Const(~i64Const); break; case EbtUint64: returnValue.setU64Const(~u64Const); break; -#endif default: assert(false && "Default missing"); } diff --git a/glslang/Include/InitializeGlobals.h b/glslang/Include/InitializeGlobals.h index 95d0a40e..b7fdd7aa 100755 --- a/glslang/Include/InitializeGlobals.h +++ b/glslang/Include/InitializeGlobals.h @@ -37,7 +37,7 @@ namespace glslang { -bool InitializePoolIndex(); +inline bool InitializePoolIndex() { return true; } // DEPRECATED: No need to call } // end namespace glslang diff --git a/glslang/Include/PoolAlloc.h b/glslang/Include/PoolAlloc.h index 3e67d6ed..e84ac52c 100755 --- a/glslang/Include/PoolAlloc.h +++ b/glslang/Include/PoolAlloc.h @@ -118,11 +118,16 @@ private: unsigned char* mem; // beginning of our allocation (pts to header) TAllocation* prevAlloc; // prior allocation in the chain - const static unsigned char guardBlockBeginVal; - const static unsigned char guardBlockEndVal; - const static unsigned char userDataFill; + static inline constexpr unsigned char guardBlockBeginVal = 0xfb; + static inline constexpr unsigned char guardBlockEndVal = 0xfe; + static inline constexpr unsigned char userDataFill = 0xcd; + +# ifdef GUARD_BLOCKS + static inline constexpr size_t guardBlockSize = 16; +# else + static inline constexpr size_t guardBlockSize = 0; +# endif - const static size_t guardBlockSize; # ifdef GUARD_BLOCKS inline static size_t headerSize() { return sizeof(TAllocation); } # else diff --git a/glslang/Include/SpirvIntrinsics.h b/glslang/Include/SpirvIntrinsics.h index 3c7d72ce..0082a4d4 100755 --- a/glslang/Include/SpirvIntrinsics.h +++ b/glslang/Include/SpirvIntrinsics.h @@ -35,12 +35,11 @@ #pragma once -#ifndef GLSLANG_WEB - // // GL_EXT_spirv_intrinsics // #include "Common.h" +#include namespace glslang { @@ -98,12 +97,27 @@ struct TSpirvInstruction { struct TSpirvTypeParameter { POOL_ALLOCATOR_NEW_DELETE(GetThreadPoolAllocator()) - TSpirvTypeParameter(const TIntermConstantUnion* arg) { constant = arg; } + TSpirvTypeParameter(const TIntermConstantUnion* arg) { value = arg; } + TSpirvTypeParameter(const TType* arg) { value = arg; } - bool operator==(const TSpirvTypeParameter& rhs) const { return constant == rhs.constant; } + const TIntermConstantUnion* getAsConstant() const + { + if (value.index() == 0) + return std::get(value); + return nullptr; + } + const TType* getAsType() const + { + if (value.index() == 1) + return std::get(value); + return nullptr; + } + + bool operator==(const TSpirvTypeParameter& rhs) const; bool operator!=(const TSpirvTypeParameter& rhs) const { return !operator==(rhs); } - const TIntermConstantUnion* constant; + // Parameter value: constant expression or type specifier + std::variant value; }; typedef TVector TSpirvTypeParameters; @@ -124,5 +138,3 @@ struct TSpirvType { }; } // end namespace glslang - -#endif // GLSLANG_WEB diff --git a/glslang/Include/Types.h b/glslang/Include/Types.h index a6f47e84..1fb59e5b 100755 --- a/glslang/Include/Types.h +++ b/glslang/Include/Types.h @@ -72,6 +72,7 @@ enum TSamplerDim { EsdRect, EsdBuffer, EsdSubpass, // goes only with non-sampled image (image is true) + EsdAttachmentEXT, EsdNumDims }; @@ -85,19 +86,6 @@ struct TSampler { // misnomer now; includes images, textures without sampler, bool combined : 1; // true means texture is combined with a sampler, false means texture with no sampler bool sampler : 1; // true means a pure sampler, other fields should be clear() -#ifdef GLSLANG_WEB - bool is1D() const { return false; } - bool isBuffer() const { return false; } - bool isRect() const { return false; } - bool isSubpass() const { return false; } - bool isCombined() const { return true; } - bool isImage() const { return false; } - bool isImageClass() const { return false; } - bool isMultiSample() const { return false; } - bool isExternal() const { return false; } - void setExternal(bool e) { } - bool isYuv() const { return false; } -#else unsigned int vectorSize : 3; // vector return type size. // Some languages support structures as sample results. Storing the whole structure in the // TSampler is too large, so there is an index to a separate table. @@ -122,14 +110,14 @@ struct TSampler { // misnomer now; includes images, textures without sampler, bool isBuffer() const { return dim == EsdBuffer; } bool isRect() const { return dim == EsdRect; } bool isSubpass() const { return dim == EsdSubpass; } + bool isAttachmentEXT() const { return dim == EsdAttachmentEXT; } bool isCombined() const { return combined; } - bool isImage() const { return image && !isSubpass(); } + bool isImage() const { return image && !isSubpass() && !isAttachmentEXT();} bool isImageClass() const { return image; } bool isMultiSample() const { return ms; } bool isExternal() const { return external; } void setExternal(bool e) { external = e; } bool isYuv() const { return yuv; } -#endif bool isTexture() const { return !sampler && !image; } bool isPureSampler() const { return sampler; } @@ -149,10 +137,8 @@ struct TSampler { // misnomer now; includes images, textures without sampler, image = false; combined = false; sampler = false; -#ifndef GLSLANG_WEB external = false; yuv = false; -#endif #ifdef ENABLE_HLSL clearReturnStruct(); @@ -204,7 +190,6 @@ struct TSampler { // misnomer now; includes images, textures without sampler, shadow = s; } -#ifndef GLSLANG_WEB // make a subpass input attachment void setSubpass(TBasicType t, bool m = false) { @@ -214,7 +199,15 @@ struct TSampler { // misnomer now; includes images, textures without sampler, dim = EsdSubpass; ms = m; } -#endif + + // make an AttachmentEXT + void setAttachmentEXT(TBasicType t) + { + clear(); + type = t; + image = true; + dim = EsdAttachmentEXT; + } bool operator==(const TSampler& right) const { @@ -252,7 +245,6 @@ struct TSampler { // misnomer now; includes images, textures without sampler, switch (type) { case EbtInt: s.append("i"); break; case EbtUint: s.append("u"); break; -#ifndef GLSLANG_WEB case EbtFloat16: s.append("f16"); break; case EbtInt8: s.append("i8"); break; case EbtUint16: s.append("u8"); break; @@ -260,11 +252,12 @@ struct TSampler { // misnomer now; includes images, textures without sampler, case EbtUint8: s.append("u16"); break; case EbtInt64: s.append("i64"); break; case EbtUint64: s.append("u64"); break; -#endif default: break; } if (isImageClass()) { - if (isSubpass()) + if (isAttachmentEXT()) + s.append("attachmentEXT"); + else if (isSubpass()) s.append("subpass"); else s.append("image"); @@ -284,12 +277,11 @@ struct TSampler { // misnomer now; includes images, textures without sampler, case Esd2D: s.append("2D"); break; case Esd3D: s.append("3D"); break; case EsdCube: s.append("Cube"); break; -#ifndef GLSLANG_WEB - case Esd1D: s.append("1D"); break; - case EsdRect: s.append("2DRect"); break; - case EsdBuffer: s.append("Buffer"); break; - case EsdSubpass: s.append("Input"); break; -#endif + case Esd1D: s.append("1D"); break; + case EsdRect: s.append("2DRect"); break; + case EsdBuffer: s.append("Buffer"); break; + case EsdSubpass: s.append("Input"); break; + case EsdAttachmentEXT: s.append(""); break; default: break; // some compilers want this } if (isMultiSample()) @@ -429,6 +421,12 @@ enum TLayoutFormat { ElfR16ui, ElfR8ui, ElfR64ui, + ElfExtSizeGuard, // to help with comparisons + ElfSize1x8, + ElfSize1x16, + ElfSize1x32, + ElfSize2x32, + ElfSize4x32, ElfCount }; @@ -512,12 +510,10 @@ public: invariant = false; makeTemporary(); declaredBuiltIn = EbvNone; -#ifndef GLSLANG_WEB noContraction = false; nullInit = false; spirvByReference = false; spirvLiteral = false; -#endif defaultBlock = false; } @@ -534,21 +530,17 @@ public: nullInit = false; defaultBlock = false; clearLayout(); -#ifndef GLSLANG_WEB spirvStorageClass = -1; spirvDecorate = nullptr; spirvByReference = false; spirvLiteral = false; -#endif } void clearInterstage() { clearInterpolation(); -#ifndef GLSLANG_WEB patch = false; sample = false; -#endif } void clearInterpolation() @@ -556,20 +548,17 @@ public: centroid = false; smooth = false; flat = false; -#ifndef GLSLANG_WEB nopersp = false; explicitInterp = false; pervertexNV = false; perPrimitiveNV = false; perViewNV = false; perTaskNV = false; -#endif pervertexEXT = false; } void clearMemory() { -#ifndef GLSLANG_WEB coherent = false; devicecoherent = false; queuefamilycoherent = false; @@ -581,7 +570,6 @@ public: restrict = false; readonly = false; writeonly = false; -#endif } const char* semanticName; @@ -600,31 +588,6 @@ public: bool explicitOffset : 1; bool defaultBlock : 1; // default blocks with matching names have structures merged when linking -#ifdef GLSLANG_WEB - bool isWriteOnly() const { return false; } - bool isReadOnly() const { return false; } - bool isRestrict() const { return false; } - bool isCoherent() const { return false; } - bool isVolatile() const { return false; } - bool isSample() const { return false; } - bool isMemory() const { return false; } - bool isMemoryQualifierImageAndSSBOOnly() const { return false; } - bool bufferReferenceNeedsVulkanMemoryModel() const { return false; } - bool isInterpolation() const { return flat || smooth; } - bool isExplicitInterpolation() const { return false; } - bool isAuxiliary() const { return centroid; } - bool isPatch() const { return false; } - bool isNoContraction() const { return false; } - void setNoContraction() { } - bool isPervertexNV() const { return false; } - bool isPervertexEXT() const { return pervertexEXT; } - void setNullInit() {} - bool isNullInit() const { return false; } - void setSpirvByReference() { } - bool isSpirvByReference() { return false; } - void setSpirvLiteral() { } - bool isSpirvLiteral() { return false; } -#else bool noContraction: 1; // prevent contraction and reassociation, e.g., for 'precise' keyword, and expressions it affects bool nopersp : 1; bool explicitInterp : 1; @@ -691,7 +654,6 @@ public: bool isSpirvByReference() const { return spirvByReference; } void setSpirvLiteral() { spirvLiteral = true; } bool isSpirvLiteral() const { return spirvLiteral; } -#endif bool isPipeInput() const { @@ -822,9 +784,7 @@ public: } void setBlockStorage(TBlockStorageClass newBacking) { -#ifndef GLSLANG_WEB layoutPushConstant = (newBacking == EbsPushConstant); -#endif switch (newBacking) { case EbsUniform : if (layoutPacking == ElpStd430) { @@ -836,23 +796,16 @@ public: case EbsStorageBuffer : storage = EvqBuffer; break; -#ifndef GLSLANG_WEB case EbsPushConstant : storage = EvqUniform; layoutSet = TQualifier::layoutSetEnd; layoutBinding = TQualifier::layoutBindingEnd; break; -#endif default: break; } } -#ifdef GLSLANG_WEB - bool isPerView() const { return false; } - bool isTaskMemory() const { return false; } - bool isArrayedIo(EShLanguage language) const { return false; } -#else bool isPerPrimitive() const { return perPrimitiveNV; } bool isPerView() const { return perViewNV; } bool isTaskMemory() const { return perTaskNV; } @@ -863,6 +816,9 @@ public: bool isAnyCallable() const { return storage == EvqCallableData || storage == EvqCallableDataIn; } + bool isHitObjectAttrNV() const { + return storage == EvqHitObjectAttrNV; + } // True if this type of IO is supposed to be arrayed with extra level for per-vertex data bool isArrayedIo(EShLanguage language) const @@ -883,14 +839,12 @@ public: return false; } } -#endif // Implementing an embedded layout-qualifier class here, since C++ can't have a real class bitfield void clearLayout() // all layout { clearUniformLayout(); -#ifndef GLSLANG_WEB layoutPushConstant = false; layoutBufferReference = false; layoutPassthrough = false; @@ -898,9 +852,11 @@ public: // -2048 as the default value indicating layoutSecondaryViewportRelative is not set layoutSecondaryViewportRelativeOffset = -2048; layoutShaderRecord = false; + layoutHitObjectShaderRecordNV = false; + layoutBindlessSampler = false; + layoutBindlessImage = false; layoutBufferReferenceAlign = layoutBufferReferenceAlignEnd; layoutFormat = ElfNone; -#endif clearInterstageLayout(); @@ -910,14 +866,11 @@ public: { layoutLocation = layoutLocationEnd; layoutComponent = layoutComponentEnd; -#ifndef GLSLANG_WEB layoutIndex = layoutIndexEnd; clearStreamLayout(); clearXfbLayout(); -#endif } -#ifndef GLSLANG_WEB void clearStreamLayout() { layoutStream = layoutStreamEnd; @@ -928,7 +881,6 @@ public: layoutXfbStride = layoutXfbStrideEnd; layoutXfbOffset = layoutXfbOffsetEnd; } -#endif bool hasNonXfbLayout() const { @@ -984,7 +936,6 @@ public: unsigned int layoutSpecConstantId : 11; static const unsigned int layoutSpecConstantIdEnd = 0x7FF; -#ifndef GLSLANG_WEB // stored as log2 of the actual alignment value unsigned int layoutBufferReferenceAlign : 6; static const unsigned int layoutBufferReferenceAlignEnd = 0x3F; @@ -997,11 +948,14 @@ public: bool layoutViewportRelative; int layoutSecondaryViewportRelativeOffset; bool layoutShaderRecord; + bool layoutHitObjectShaderRecordNV; // GL_EXT_spirv_intrinsics int spirvStorageClass; TSpirvDecorate* spirvDecorate; -#endif + + bool layoutBindlessSampler; + bool layoutBindlessImage; bool hasUniformLayout() const { @@ -1021,9 +975,7 @@ public: layoutSet = layoutSetEnd; layoutBinding = layoutBindingEnd; -#ifndef GLSLANG_WEB layoutAttachment = layoutAttachmentEnd; -#endif } bool hasMatrix() const @@ -1056,26 +1008,6 @@ public: { return layoutBinding != layoutBindingEnd; } -#ifdef GLSLANG_WEB - bool hasOffset() const { return false; } - bool isNonPerspective() const { return false; } - bool hasIndex() const { return false; } - unsigned getIndex() const { return 0; } - bool hasComponent() const { return false; } - bool hasStream() const { return false; } - bool hasFormat() const { return false; } - bool hasXfb() const { return false; } - bool hasXfbBuffer() const { return false; } - bool hasXfbStride() const { return false; } - bool hasXfbOffset() const { return false; } - bool hasAttachment() const { return false; } - TLayoutFormat getFormat() const { return ElfNone; } - bool isPushConstant() const { return false; } - bool isShaderRecord() const { return false; } - bool hasBufferReference() const { return false; } - bool hasBufferReferenceAlign() const { return false; } - bool isNonUniform() const { return false; } -#else bool hasOffset() const { return layoutOffset != layoutNotSet; @@ -1123,6 +1055,7 @@ public: TLayoutFormat getFormat() const { return layoutFormat; } bool isPushConstant() const { return layoutPushConstant; } bool isShaderRecord() const { return layoutShaderRecord; } + bool hasHitObjectShaderRecordNV() const { return layoutHitObjectShaderRecordNV; } bool hasBufferReference() const { return layoutBufferReference; } bool hasBufferReferenceAlign() const { @@ -1132,16 +1065,24 @@ public: { return nonUniform; } + bool isBindlessSampler() const + { + return layoutBindlessSampler; + } + bool isBindlessImage() const + { + return layoutBindlessImage; + } // GL_EXT_spirv_intrinsics - bool hasSprivDecorate() const { return spirvDecorate != nullptr; } + bool hasSpirvDecorate() const { return spirvDecorate != nullptr; } void setSpirvDecorate(int decoration, const TIntermAggregate* args = nullptr); void setSpirvDecorateId(int decoration, const TIntermAggregate* args); void setSpirvDecorateString(int decoration, const TIntermAggregate* args); const TSpirvDecorate& getSpirvDecorate() const { assert(spirvDecorate); return *spirvDecorate; } TSpirvDecorate& getSpirvDecorate() { assert(spirvDecorate); return *spirvDecorate; } TString getSpirvDecorateQualifierString() const; -#endif + bool hasSpecConstantId() const { // Not the same thing as being a specialization constant, this @@ -1175,12 +1116,10 @@ public: { switch (packing) { case ElpStd140: return "std140"; -#ifndef GLSLANG_WEB case ElpPacked: return "packed"; case ElpShared: return "shared"; case ElpStd430: return "std430"; case ElpScalar: return "scalar"; -#endif default: return "none"; } } @@ -1192,9 +1131,6 @@ public: default: return "none"; } } -#ifdef GLSLANG_WEB - static const char* getLayoutFormatString(TLayoutFormat f) { return "none"; } -#else static const char* getLayoutFormatString(TLayoutFormat f) { switch (f) { @@ -1241,6 +1177,11 @@ public: case ElfR8ui: return "r8ui"; case ElfR64ui: return "r64ui"; case ElfR64i: return "r64i"; + case ElfSize1x8: return "size1x8"; + case ElfSize1x16: return "size1x16"; + case ElfSize1x32: return "size1x32"; + case ElfSize2x32: return "size2x32"; + case ElfSize4x32: return "size4x32"; default: return "none"; } } @@ -1343,7 +1284,6 @@ public: default: return "none"; } } -#endif }; // Qualifiers that don't need to be keep per object. They have shader scope, not object scope. @@ -1360,10 +1300,12 @@ struct TShaderQualifiers { int localSize[3]; // compute shader bool localSizeNotDefault[3]; // compute shader int localSizeSpecId[3]; // compute shader specialization id for gl_WorkGroupSize -#ifndef GLSLANG_WEB bool earlyFragmentTests; // fragment input bool postDepthCoverage; // fragment input bool earlyAndLateFragmentTestsAMD; //fragment input + bool nonCoherentColorAttachmentReadEXT; // fragment input + bool nonCoherentDepthAttachmentReadEXT; // fragment input + bool nonCoherentStencilAttachmentReadEXT; // fragment input TLayoutDepth layoutDepth; TLayoutStencil layoutStencil; bool blendEquation; // true if any blend equation was specified @@ -1376,9 +1318,6 @@ struct TShaderQualifiers { bool layoutPrimitiveCulling; // true if layout primitive_culling set TLayoutDepth getDepth() const { return layoutDepth; } TLayoutStencil getStencil() const { return layoutStencil; } -#else - TLayoutDepth getDepth() const { return EldNone; } -#endif void init() { @@ -1399,10 +1338,12 @@ struct TShaderQualifiers { localSizeSpecId[0] = TQualifier::layoutNotSet; localSizeSpecId[1] = TQualifier::layoutNotSet; localSizeSpecId[2] = TQualifier::layoutNotSet; -#ifndef GLSLANG_WEB earlyFragmentTests = false; earlyAndLateFragmentTestsAMD = false; postDepthCoverage = false; + nonCoherentColorAttachmentReadEXT = false; + nonCoherentDepthAttachmentReadEXT = false; + nonCoherentStencilAttachmentReadEXT = false; layoutDepth = EldNone; layoutStencil = ElsNone; blendEquation = false; @@ -1413,14 +1354,9 @@ struct TShaderQualifiers { layoutPrimitiveCulling = false; primitives = TQualifier::layoutNotSet; interlockOrdering = EioNone; -#endif } -#ifdef GLSLANG_WEB - bool hasBlendEquation() const { return false; } -#else bool hasBlendEquation() const { return blendEquation; } -#endif // Merge in characteristics from the 'src' qualifier. They can override when // set, but never erase when not set. @@ -1453,13 +1389,18 @@ struct TShaderQualifiers { if (src.localSizeSpecId[i] != TQualifier::layoutNotSet) localSizeSpecId[i] = src.localSizeSpecId[i]; } -#ifndef GLSLANG_WEB if (src.earlyFragmentTests) earlyFragmentTests = true; if (src.earlyAndLateFragmentTestsAMD) earlyAndLateFragmentTestsAMD = true; if (src.postDepthCoverage) postDepthCoverage = true; + if (src.nonCoherentColorAttachmentReadEXT) + nonCoherentColorAttachmentReadEXT = true; + if (src.nonCoherentDepthAttachmentReadEXT) + nonCoherentDepthAttachmentReadEXT = true; + if (src.nonCoherentStencilAttachmentReadEXT) + nonCoherentStencilAttachmentReadEXT = true; if (src.layoutDepth) layoutDepth = src.layoutDepth; if (src.layoutStencil) @@ -1480,10 +1421,22 @@ struct TShaderQualifiers { interlockOrdering = src.interlockOrdering; if (src.layoutPrimitiveCulling) layoutPrimitiveCulling = src.layoutPrimitiveCulling; -#endif } }; +class TTypeParameters { +public: + POOL_ALLOCATOR_NEW_DELETE(GetThreadPoolAllocator()) + + TTypeParameters() : basicType(EbtVoid), arraySizes(nullptr) {} + + TBasicType basicType; + TArraySizes *arraySizes; + + bool operator==(const TTypeParameters& rhs) const { return basicType == rhs.basicType && *arraySizes == *rhs.arraySizes; } + bool operator!=(const TTypeParameters& rhs) const { return basicType != rhs.basicType || *arraySizes != *rhs.arraySizes; } +}; + // // TPublicType is just temporarily used while parsing and not quite the same // information kept per node in TType. Due to the bison stack, it can't have @@ -1498,39 +1451,35 @@ public: TSampler sampler; TQualifier qualifier; TShaderQualifiers shaderQualifiers; - int vectorSize : 4; - int matrixCols : 4; - int matrixRows : 4; - bool coopmat : 1; + uint32_t vectorSize : 4; + uint32_t matrixCols : 4; + uint32_t matrixRows : 4; + bool coopmatNV : 1; + bool coopmatKHR : 1; TArraySizes* arraySizes; const TType* userDef; TSourceLoc loc; - TArraySizes* typeParameters; -#ifndef GLSLANG_WEB + TTypeParameters* typeParameters; // SPIR-V type defined by spirv_type directive TSpirvType* spirvType; -#endif -#ifdef GLSLANG_WEB - bool isCoopmat() const { return false; } -#else - bool isCoopmat() const { return coopmat; } -#endif + bool isCoopmat() const { return coopmatNV || coopmatKHR; } + bool isCoopmatNV() const { return coopmatNV; } + bool isCoopmatKHR() const { return coopmatKHR; } void initType(const TSourceLoc& l) { basicType = EbtVoid; - vectorSize = 1; + vectorSize = 1u; matrixRows = 0; matrixCols = 0; arraySizes = nullptr; userDef = nullptr; loc = l; typeParameters = nullptr; - coopmat = false; -#ifndef GLSLANG_WEB + coopmatNV = false; + coopmatKHR = false; spirvType = nullptr; -#endif } void initQualifiers(bool global = false) @@ -1552,29 +1501,31 @@ public: { matrixRows = 0; matrixCols = 0; - vectorSize = s; + assert(s >= 0); + vectorSize = static_cast(s) & 0b1111; } void setMatrix(int c, int r) { - matrixRows = r; - matrixCols = c; + assert(r >= 0); + matrixRows = static_cast(r) & 0b1111; + assert(c >= 0); + matrixCols = static_cast(c) & 0b1111; vectorSize = 0; } bool isScalar() const { - return matrixCols == 0 && vectorSize == 1 && arraySizes == nullptr && userDef == nullptr; + return matrixCols == 0u && vectorSize == 1u && arraySizes == nullptr && userDef == nullptr; } -#ifndef GLSLANG_WEB // GL_EXT_spirv_intrinsics void setSpirvType(const TSpirvInstruction& spirvInst, const TSpirvTypeParameters* typeParams = nullptr); -#endif // "Image" is a superset of "Subpass" - bool isImage() const { return basicType == EbtSampler && sampler.isImage(); } - bool isSubpass() const { return basicType == EbtSampler && sampler.isSubpass(); } + bool isImage() const { return basicType == EbtSampler && sampler.isImage(); } + bool isSubpass() const { return basicType == EbtSampler && sampler.isSubpass(); } + bool isAttachmentEXT() const { return basicType == EbtSampler && sampler.isAttachmentEXT(); } }; // @@ -1587,12 +1538,14 @@ public: // for "empty" type (no args) or simple scalar/vector/matrix explicit TType(TBasicType t = EbtVoid, TStorageQualifier q = EvqTemporary, int vs = 1, int mc = 0, int mr = 0, bool isVector = false) : - basicType(t), vectorSize(vs), matrixCols(mc), matrixRows(mr), vector1(isVector && vs == 1), coopmat(false), - arraySizes(nullptr), structure(nullptr), fieldName(nullptr), typeName(nullptr), typeParameters(nullptr) -#ifndef GLSLANG_WEB - , spirvType(nullptr) -#endif + basicType(t), vectorSize(static_cast(vs) & 0b1111), matrixCols(static_cast(mc) & 0b1111), matrixRows(static_cast(mr) & 0b1111), vector1(isVector && vs == 1), coopmatNV(false), coopmatKHR(false), coopmatKHRuse(0), coopmatKHRUseValid(false), + arraySizes(nullptr), structure(nullptr), fieldName(nullptr), typeName(nullptr), typeParameters(nullptr), + spirvType(nullptr) { + assert(vs >= 0); + assert(mc >= 0); + assert(mr >= 0); + sampler.clear(); qualifier.clear(); qualifier.storage = q; @@ -1601,12 +1554,14 @@ public: // for explicit precision qualifier TType(TBasicType t, TStorageQualifier q, TPrecisionQualifier p, int vs = 1, int mc = 0, int mr = 0, bool isVector = false) : - basicType(t), vectorSize(vs), matrixCols(mc), matrixRows(mr), vector1(isVector && vs == 1), coopmat(false), - arraySizes(nullptr), structure(nullptr), fieldName(nullptr), typeName(nullptr), typeParameters(nullptr) -#ifndef GLSLANG_WEB - , spirvType(nullptr) -#endif + basicType(t), vectorSize(static_cast(vs) & 0b1111), matrixCols(static_cast(mc) & 0b1111), matrixRows(static_cast(mr) & 0b1111), vector1(isVector && vs == 1), coopmatNV(false), coopmatKHR(false), coopmatKHRuse(0), coopmatKHRUseValid(false), + arraySizes(nullptr), structure(nullptr), fieldName(nullptr), typeName(nullptr), typeParameters(nullptr), + spirvType(nullptr) { + assert(vs >= 0); + assert(mc >= 0); + assert(mr >= 0); + sampler.clear(); qualifier.clear(); qualifier.storage = q; @@ -1617,11 +1572,9 @@ public: // for turning a TPublicType into a TType, using a shallow copy explicit TType(const TPublicType& p) : basicType(p.basicType), - vectorSize(p.vectorSize), matrixCols(p.matrixCols), matrixRows(p.matrixRows), vector1(false), coopmat(p.coopmat), - arraySizes(p.arraySizes), structure(nullptr), fieldName(nullptr), typeName(nullptr), typeParameters(p.typeParameters) -#ifndef GLSLANG_WEB - , spirvType(p.spirvType) -#endif + vectorSize(p.vectorSize), matrixCols(p.matrixCols), matrixRows(p.matrixRows), vector1(false), coopmatNV(p.coopmatNV), coopmatKHR(p.coopmatKHR), coopmatKHRuse(0), coopmatKHRUseValid(false), + arraySizes(p.arraySizes), structure(nullptr), fieldName(nullptr), typeName(nullptr), typeParameters(p.typeParameters), + spirvType(p.spirvType) { if (basicType == EbtSampler) sampler = p.sampler; @@ -1637,28 +1590,42 @@ public: } typeName = NewPoolTString(p.userDef->getTypeName().c_str()); } - if (p.isCoopmat() && p.typeParameters && p.typeParameters->getNumDims() > 0) { - int numBits = p.typeParameters->getDimSize(0); + if (p.isCoopmatNV() && p.typeParameters && p.typeParameters->arraySizes->getNumDims() > 0) { + int numBits = p.typeParameters->arraySizes->getDimSize(0); if (p.basicType == EbtFloat && numBits == 16) { basicType = EbtFloat16; qualifier.precision = EpqNone; } else if (p.basicType == EbtUint && numBits == 8) { basicType = EbtUint8; qualifier.precision = EpqNone; + } else if (p.basicType == EbtUint && numBits == 16) { + basicType = EbtUint16; + qualifier.precision = EpqNone; } else if (p.basicType == EbtInt && numBits == 8) { basicType = EbtInt8; qualifier.precision = EpqNone; + } else if (p.basicType == EbtInt && numBits == 16) { + basicType = EbtInt16; + qualifier.precision = EpqNone; + } + } + if (p.isCoopmatKHR() && p.typeParameters && p.typeParameters->arraySizes->getNumDims() > 0) { + basicType = p.typeParameters->basicType; + + if (p.typeParameters->arraySizes->getNumDims() == 4) { + const int dimSize = p.typeParameters->arraySizes->getDimSize(3); + assert(dimSize >= 0); + coopmatKHRuse = static_cast(dimSize) & 0b111; + coopmatKHRUseValid = true; + p.typeParameters->arraySizes->removeLastSize(); } } } // for construction of sampler types TType(const TSampler& sampler, TStorageQualifier q = EvqUniform, TArraySizes* as = nullptr) : - basicType(EbtSampler), vectorSize(1), matrixCols(0), matrixRows(0), vector1(false), coopmat(false), + basicType(EbtSampler), vectorSize(1u), matrixCols(0u), matrixRows(0u), vector1(false), coopmatNV(false), coopmatKHR(false), coopmatKHRuse(0), coopmatKHRUseValid(false), arraySizes(as), structure(nullptr), fieldName(nullptr), typeName(nullptr), - sampler(sampler), typeParameters(nullptr) -#ifndef GLSLANG_WEB - , spirvType(nullptr) -#endif + sampler(sampler), typeParameters(nullptr), spirvType(nullptr) { qualifier.clear(); qualifier.storage = q; @@ -1700,18 +1667,19 @@ public: vectorSize = 1; vector1 = false; } else if (isCoopMat()) { - coopmat = false; + coopmatNV = false; + coopmatKHR = false; + coopmatKHRuse = 0; + coopmatKHRUseValid = false; typeParameters = nullptr; } } } // for making structures, ... TType(TTypeList* userDef, const TString& n) : - basicType(EbtStruct), vectorSize(1), matrixCols(0), matrixRows(0), vector1(false), coopmat(false), - arraySizes(nullptr), structure(userDef), fieldName(nullptr), typeParameters(nullptr) -#ifndef GLSLANG_WEB - , spirvType(nullptr) -#endif + basicType(EbtStruct), vectorSize(1), matrixCols(0), matrixRows(0), vector1(false), coopmatNV(false), coopmatKHR(false), coopmatKHRuse(0), coopmatKHRUseValid(false), + arraySizes(nullptr), structure(userDef), fieldName(nullptr), typeParameters(nullptr), + spirvType(nullptr) { sampler.clear(); qualifier.clear(); @@ -1719,25 +1687,22 @@ public: } // For interface blocks TType(TTypeList* userDef, const TString& n, const TQualifier& q) : - basicType(EbtBlock), vectorSize(1), matrixCols(0), matrixRows(0), vector1(false), coopmat(false), - qualifier(q), arraySizes(nullptr), structure(userDef), fieldName(nullptr), typeParameters(nullptr) -#ifndef GLSLANG_WEB - , spirvType(nullptr) -#endif + basicType(EbtBlock), vectorSize(1), matrixCols(0), matrixRows(0), vector1(false), coopmatNV(false), coopmatKHR(false), coopmatKHRuse(0), coopmatKHRUseValid(false), + qualifier(q), arraySizes(nullptr), structure(userDef), fieldName(nullptr), typeParameters(nullptr), + spirvType(nullptr) { sampler.clear(); typeName = NewPoolTString(n.c_str()); } // for block reference (first parameter must be EbtReference) explicit TType(TBasicType t, const TType &p, const TString& n) : - basicType(t), vectorSize(1), matrixCols(0), matrixRows(0), vector1(false), - arraySizes(nullptr), structure(nullptr), fieldName(nullptr), typeName(nullptr) -#ifndef GLSLANG_WEB - , spirvType(nullptr) -#endif + basicType(t), vectorSize(1), matrixCols(0), matrixRows(0), vector1(false), coopmatNV(false), coopmatKHR(false), coopmatKHRuse(0), coopmatKHRUseValid(false), + arraySizes(nullptr), structure(nullptr), fieldName(nullptr), typeName(nullptr), typeParameters(nullptr), + spirvType(nullptr) { assert(t == EbtReference); typeName = NewPoolTString(n.c_str()); + sampler.clear(); qualifier.clear(); qualifier.storage = p.qualifier.storage; referentType = p.clone(); @@ -1765,10 +1730,11 @@ public: referentType = copyOf.referentType; } typeParameters = copyOf.typeParameters; -#ifndef GLSLANG_WEB spirvType = copyOf.spirvType; -#endif - coopmat = copyOf.isCoopMat(); + coopmatNV = copyOf.isCoopMatNV(); + coopmatKHR = copyOf.isCoopMatKHR(); + coopmatKHRuse = copyOf.coopmatKHRuse; + coopmatKHRUseValid = copyOf.coopmatKHRUseValid; } // Make complete copy of the whole type graph rooted at 'copyOf'. @@ -1798,7 +1764,7 @@ public: void makeVector() { vector1 = true; } - virtual void hideMember() { basicType = EbtVoid; vectorSize = 1; } + virtual void hideMember() { basicType = EbtVoid; vectorSize = 1u; } virtual bool hiddenMember() const { return basicType == EbtVoid; } virtual void setFieldName(const TString& n) { fieldName = NewPoolTString(n.c_str()); } @@ -1838,35 +1804,33 @@ public: virtual TQualifier& getQualifier() { return qualifier; } virtual const TQualifier& getQualifier() const { return qualifier; } - virtual int getVectorSize() const { return vectorSize; } // returns 1 for either scalar or vector of size 1, valid for both - virtual int getMatrixCols() const { return matrixCols; } - virtual int getMatrixRows() const { return matrixRows; } + virtual int getVectorSize() const { return static_cast(vectorSize); } // returns 1 for either scalar or vector of size 1, valid for both + virtual int getMatrixCols() const { return static_cast(matrixCols); } + virtual int getMatrixRows() const { return static_cast(matrixRows); } virtual int getOuterArraySize() const { return arraySizes->getOuterSize(); } virtual TIntermTyped* getOuterArrayNode() const { return arraySizes->getOuterNode(); } virtual int getCumulativeArraySize() const { return arraySizes->getCumulativeSize(); } -#ifdef GLSLANG_WEB - bool isArrayOfArrays() const { return false; } -#else bool isArrayOfArrays() const { return arraySizes != nullptr && arraySizes->getNumDims() > 1; } -#endif virtual int getImplicitArraySize() const { return arraySizes->getImplicitSize(); } virtual const TArraySizes* getArraySizes() const { return arraySizes; } virtual TArraySizes* getArraySizes() { return arraySizes; } virtual TType* getReferentType() const { return referentType; } - virtual const TArraySizes* getTypeParameters() const { return typeParameters; } - virtual TArraySizes* getTypeParameters() { return typeParameters; } + virtual const TTypeParameters* getTypeParameters() const { return typeParameters; } + virtual TTypeParameters* getTypeParameters() { return typeParameters; } virtual bool isScalar() const { return ! isVector() && ! isMatrix() && ! isStruct() && ! isArray(); } virtual bool isScalarOrVec1() const { return isScalar() || vector1; } virtual bool isScalarOrVector() const { return !isMatrix() && !isStruct() && !isArray(); } - virtual bool isVector() const { return vectorSize > 1 || vector1; } + virtual bool isVector() const { return vectorSize > 1u || vector1; } virtual bool isMatrix() const { return matrixCols ? true : false; } virtual bool isArray() const { return arraySizes != nullptr; } virtual bool isSizedArray() const { return isArray() && arraySizes->isSized(); } virtual bool isUnsizedArray() const { return isArray() && !arraySizes->isSized(); } + virtual bool isImplicitlySizedArray() const { return isArray() && arraySizes->isImplicitlySized(); } virtual bool isArrayVariablyIndexed() const { assert(isArray()); return arraySizes->isVariablyIndexed(); } virtual void setArrayVariablyIndexed() { assert(isArray()); arraySizes->setVariablyIndexed(); } virtual void updateImplicitArraySize(int size) { assert(isArray()); arraySizes->updateImplicitSize(size); } + virtual void setImplicitlySized(bool isImplicitSized) { arraySizes->setImplicitlySized(isImplicitSized); } virtual bool isStruct() const { return basicType == EbtStruct || basicType == EbtBlock; } virtual bool isFloatingDomain() const { return basicType == EbtFloat || basicType == EbtDouble || basicType == EbtFloat16; } virtual bool isIntegerDomain() const @@ -1888,30 +1852,26 @@ public: return false; } virtual bool isOpaque() const { return basicType == EbtSampler -#ifndef GLSLANG_WEB || basicType == EbtAtomicUint || basicType == EbtAccStruct || basicType == EbtRayQuery -#endif - ; } + || basicType == EbtHitObjectNV; } virtual bool isBuiltIn() const { return getQualifier().builtIn != EbvNone; } - // "Image" is a superset of "Subpass" - virtual bool isImage() const { return basicType == EbtSampler && getSampler().isImage(); } + virtual bool isAttachmentEXT() const { return basicType == EbtSampler && getSampler().isAttachmentEXT(); } + virtual bool isImage() const { return basicType == EbtSampler && getSampler().isImage(); } virtual bool isSubpass() const { return basicType == EbtSampler && getSampler().isSubpass(); } virtual bool isTexture() const { return basicType == EbtSampler && getSampler().isTexture(); } + virtual bool isBindlessImage() const { return isImage() && qualifier.layoutBindlessImage; } + virtual bool isBindlessTexture() const { return isTexture() && qualifier.layoutBindlessSampler; } // Check the block-name convention of creating a block without populating it's members: virtual bool isUnusableName() const { return isStruct() && structure == nullptr; } virtual bool isParameterized() const { return typeParameters != nullptr; } -#ifdef GLSLANG_WEB - 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 isCoopMat() const { return coopmatNV || coopmatKHR; } + bool isCoopMatNV() const { return coopmatNV; } + bool isCoopMatKHR() const { return coopmatKHR; } bool isReference() const { return getBasicType() == EbtReference; } bool isSpirvType() const { return getBasicType() == EbtSpirvType; } -#endif + int getCoopMatKHRuse() const { return static_cast(coopmatKHRuse); } // return true if this type contains any subtype which satisfies the given predicate. template @@ -1954,6 +1914,11 @@ public: return contains([](const TType* t) { return t->isOpaque(); } ); } + virtual bool containsSampler() const + { + return contains([](const TType* t) { return t->isTexture() || t->isImage(); }); + } + // Recursively checks if the type contains a built-in variable virtual bool containsBuiltIn() const { @@ -1992,15 +1957,6 @@ public: return contains([](const TType* t) { return t->isArray() && t->arraySizes->isOuterSpecialization(); } ); } -#ifdef GLSLANG_WEB - bool containsDouble() const { return false; } - bool contains16BitFloat() const { return false; } - bool contains64BitInt() const { return false; } - bool contains16BitInt() const { return false; } - bool contains8BitInt() const { return false; } - bool containsCoopMat() const { return false; } - bool containsReference() const { return false; } -#else bool containsDouble() const { return containsBasicType(EbtDouble); @@ -2023,13 +1979,12 @@ public: } bool containsCoopMat() const { - return contains([](const TType* t) { return t->coopmat; } ); + return contains([](const TType* t) { return t->coopmatNV || t->coopmatKHR; } ); } bool containsReference() const { return containsBasicType(EbtReference); } -#endif // Array editing methods. Array descriptors can be shared across // type instances. This allows all uses of the same array @@ -2087,8 +2042,12 @@ public: // an explicit array. void adoptImplicitArraySizes(bool skipNonvariablyIndexed) { - if (isUnsizedArray() && !(skipNonvariablyIndexed || isArrayVariablyIndexed())) + if (isUnsizedArray() && + (qualifier.builtIn == EbvSampleMask || + !(skipNonvariablyIndexed || isArrayVariablyIndexed()))) { changeOuterArraySize(getImplicitArraySize()); + setImplicitlySized(true); + } // For multi-dim per-view arrays, set unsized inner dimension size to 1 if (qualifier.isPerView() && arraySizes && arraySizes->isInnerUnsized()) arraySizes->clearInnerUnsized(); @@ -2101,43 +2060,12 @@ public: } } - - void updateTypeParameters(const TType& type) - { - // For when we may already be sharing existing array descriptors, - // keeping the pointers the same, just updating the contents. - assert(typeParameters != nullptr); - assert(type.typeParameters != nullptr); - *typeParameters = *type.typeParameters; - } - void copyTypeParameters(const TArraySizes& s) + void copyTypeParameters(const TTypeParameters& s) { // For setting a fresh new set of type parameters, not yet worrying about sharing. - typeParameters = new TArraySizes; + typeParameters = new TTypeParameters; *typeParameters = s; } - void transferTypeParameters(TArraySizes* s) - { - // For setting an already allocated set of sizes that this type can use - // (no copy made). - typeParameters = s; - } - void clearTypeParameters() - { - typeParameters = nullptr; - } - - // Add inner array sizes, to any existing sizes, via copy; the - // sizes passed in can still be reused for other purposes. - void copyTypeParametersInnerSizes(const TArraySizes* s) - { - if (s != nullptr) { - if (typeParameters == nullptr) - copyTypeParameters(*s); - else - typeParameters->addInnerSizes(*s); - } - } const char* getBasicString() const { @@ -2151,7 +2079,6 @@ public: case EbtInt: return "int"; case EbtUint: return "uint"; case EbtSampler: return "sampler/image"; -#ifndef GLSLANG_WEB case EbtVoid: return "void"; case EbtDouble: return "double"; case EbtFloat16: return "float16_t"; @@ -2170,18 +2097,11 @@ public: case EbtReference: return "reference"; case EbtString: return "string"; case EbtSpirvType: return "spirv_type"; -#endif + case EbtCoopmat: return "coopmat"; default: return "unknown type"; } } -#ifdef GLSLANG_WEB - TString getCompleteString() const { return ""; } - const char* getStorageQualifierString() const { return ""; } - const char* getBuiltInVariableString() const { return ""; } - 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 { @@ -2192,7 +2112,7 @@ public: const auto appendInt = [&](int i) { typeString.append(std::to_string(i).c_str()); }; if (getQualifiers) { - if (qualifier.hasSprivDecorate()) + if (qualifier.hasSpirvDecorate()) appendStr(qualifier.getSpirvDecorateQualifierString().c_str()); if (qualifier.hasLayout()) { @@ -2283,8 +2203,16 @@ public: appendStr(" layoutSecondaryViewportRelativeOffset="); appendInt(qualifier.layoutSecondaryViewportRelativeOffset); } + if (qualifier.layoutShaderRecord) appendStr(" shaderRecordNV"); + if (qualifier.layoutHitObjectShaderRecordNV) + appendStr(" hitobjectshaderrecordnv"); + + if (qualifier.layoutBindlessSampler) + appendStr(" layoutBindlessSampler"); + if (qualifier.layoutBindlessImage) + appendStr(" layoutBindlessImage"); appendStr(")"); } @@ -2472,12 +2400,21 @@ public: } } if (isParameterized()) { + if (isCoopMatKHR()) { + appendStr(" "); + appendStr("coopmat"); + } + appendStr("<"); - for (int i = 0; i < (int)typeParameters->getNumDims(); ++i) { - appendInt(typeParameters->getDimSize(i)); - if (i != (int)typeParameters->getNumDims() - 1) + for (int i = 0; i < (int)typeParameters->arraySizes->getNumDims(); ++i) { + appendInt(typeParameters->arraySizes->getDimSize(i)); + if (i != (int)typeParameters->arraySizes->getNumDims() - 1) appendStr(", "); } + if (coopmatKHRUseValid) { + appendStr(", "); + appendInt(coopmatKHRuse); + } appendStr(">"); } if (getPrecision && qualifier.precision != EpqNone) { @@ -2538,16 +2475,19 @@ public: const char* getStorageQualifierString() const { return GetStorageQualifierString(qualifier.storage); } const char* getBuiltInVariableString() const { return GetBuiltInVariableString(qualifier.builtIn); } const char* getPrecisionQualifierString() const { return GetPrecisionQualifierString(qualifier.precision); } -#endif const TTypeList* getStruct() const { assert(isStruct()); return structure; } void setStruct(TTypeList* s) { assert(isStruct()); structure = s; } TTypeList* getWritableStruct() const { assert(isStruct()); return structure; } // This should only be used when known to not be sharing with other threads void setBasicType(const TBasicType& t) { basicType = t; } + void setVectorSize(int s) { + assert(s >= 0); + vectorSize = static_cast(s) & 0b1111; + } int computeNumComponents() const { - int components = 0; + uint32_t components = 0; if (getBasicType() == EbtStruct || getBasicType() == EbtBlock) { for (TTypeList::const_iterator tl = getStruct()->begin(); tl != getStruct()->end(); tl++) @@ -2561,7 +2501,7 @@ public: components *= arraySizes->getCumulativeSize(); } - return components; + return static_cast(components); } // append this type's mangled name to the passed in 'name' @@ -2711,7 +2651,10 @@ public: bool sameArrayness(const TType& right) const { return ((arraySizes == nullptr && right.arraySizes == nullptr) || - (arraySizes != nullptr && right.arraySizes != nullptr && *arraySizes == *right.arraySizes)); + (arraySizes != nullptr && right.arraySizes != nullptr && + (*arraySizes == *right.arraySizes || + (arraySizes->isImplicitlySized() && right.arraySizes->isDefaultImplicitlySized()) || + (right.arraySizes->isImplicitlySized() && arraySizes->isDefaultImplicitlySized())))); } // See if two type's arrayness match in everything except their outer dimension @@ -2728,14 +2671,12 @@ public: (typeParameters != nullptr && right.typeParameters != nullptr && *typeParameters == *right.typeParameters)); } -#ifndef GLSLANG_WEB // See if two type's SPIR-V type contents match bool sameSpirvType(const TType& right) const { return ((spirvType == nullptr && right.spirvType == nullptr) || (spirvType != nullptr && right.spirvType != nullptr && *spirvType == *right.spirvType)); } -#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. @@ -2750,7 +2691,8 @@ public: matrixCols == right.matrixCols && matrixRows == right.matrixRows && vector1 == right.vector1 && - isCoopMat() == right.isCoopMat() && + isCoopMatNV() == right.isCoopMatNV() && + isCoopMatKHR() == right.isCoopMatKHR() && sameStructType(right, lpidx, rpidx) && sameReferenceType(right); } @@ -2759,32 +2701,69 @@ public: // an OK function parameter bool coopMatParameterOK(const TType& right) const { - return isCoopMat() && right.isCoopMat() && (getBasicType() == right.getBasicType()) && - typeParameters == nullptr && right.typeParameters != nullptr; + if (isCoopMatNV()) { + return right.isCoopMatNV() && (getBasicType() == right.getBasicType()) && typeParameters == nullptr && + right.typeParameters != nullptr; + } + if (isCoopMatKHR() && right.isCoopMatKHR()) { + return ((getBasicType() == right.getBasicType()) || (getBasicType() == EbtCoopmat) || + (right.getBasicType() == EbtCoopmat)) && + typeParameters == nullptr && right.typeParameters != nullptr; + } + return false; } bool sameCoopMatBaseType(const TType &right) const { - bool rv = coopmat && right.coopmat; - if (getBasicType() == EbtFloat || getBasicType() == EbtFloat16) - rv = right.getBasicType() == EbtFloat || right.getBasicType() == EbtFloat16; - else if (getBasicType() == EbtUint || getBasicType() == EbtUint8) - rv = right.getBasicType() == EbtUint || right.getBasicType() == EbtUint8; - else if (getBasicType() == EbtInt || getBasicType() == EbtInt8) - rv = right.getBasicType() == EbtInt || right.getBasicType() == EbtInt8; - else - rv = false; + bool rv = false; + + if (isCoopMatNV()) { + rv = isCoopMatNV() && right.isCoopMatNV(); + if (getBasicType() == EbtFloat || getBasicType() == EbtFloat16) + rv = right.getBasicType() == EbtFloat || right.getBasicType() == EbtFloat16; + else if (getBasicType() == EbtUint || getBasicType() == EbtUint8 || getBasicType() == EbtUint16) + rv = right.getBasicType() == EbtUint || right.getBasicType() == EbtUint8 || right.getBasicType() == EbtUint16; + else if (getBasicType() == EbtInt || getBasicType() == EbtInt8 || getBasicType() == EbtInt16) + rv = right.getBasicType() == EbtInt || right.getBasicType() == EbtInt8 || right.getBasicType() == EbtInt16; + else + rv = false; + } else if (isCoopMatKHR() && right.isCoopMatKHR()) { + if (getBasicType() == EbtFloat || getBasicType() == EbtFloat16) + rv = right.getBasicType() == EbtFloat || right.getBasicType() == EbtFloat16 || right.getBasicType() == EbtCoopmat; + else if (getBasicType() == EbtUint || getBasicType() == EbtUint8 || getBasicType() == EbtUint16) + rv = right.getBasicType() == EbtUint || right.getBasicType() == EbtUint8 || right.getBasicType() == EbtUint16 || right.getBasicType() == EbtCoopmat; + else if (getBasicType() == EbtInt || getBasicType() == EbtInt8 || getBasicType() == EbtInt16) + rv = right.getBasicType() == EbtInt || right.getBasicType() == EbtInt8 || right.getBasicType() == EbtInt16 || right.getBasicType() == EbtCoopmat; + else + rv = false; + } return rv; } + bool sameCoopMatUse(const TType &right) const { + return coopmatKHRuse == right.coopmatKHRuse; + } + + bool sameCoopMatShapeAndUse(const TType &right) const + { + if (!isCoopMat() || !right.isCoopMat() || isCoopMatKHR() != right.isCoopMatKHR()) + return false; + + if (coopmatKHRuse != right.coopmatKHRuse) + return false; + + // Skip bit width type parameter (first array size) for coopmatNV + int firstArrayDimToCompare = isCoopMatNV() ? 1 : 0; + for (int i = firstArrayDimToCompare; i < typeParameters->arraySizes->getNumDims(); ++i) { + if (typeParameters->arraySizes->getDimSize(i) != right.typeParameters->arraySizes->getDimSize(i)) + return false; + } + return true; + } // See if two types match in all ways (just the actual type, not qualification) bool operator==(const TType& right) const { -#ifndef GLSLANG_WEB - return sameElementType(right) && sameArrayness(right) && sameTypeParameters(right) && sameSpirvType(right); -#else - return sameElementType(right) && sameArrayness(right) && sameTypeParameters(right); -#endif + return sameElementType(right) && sameArrayness(right) && sameTypeParameters(right) && sameCoopMatUse(right) && sameSpirvType(right); } bool operator!=(const TType& right) const @@ -2794,18 +2773,14 @@ public: unsigned int getBufferReferenceAlignment() const { -#ifndef GLSLANG_WEB if (getBasicType() == glslang::EbtReference) { return getReferentType()->getQualifier().hasBufferReferenceAlign() ? (1u << getReferentType()->getQualifier().layoutBufferReferenceAlign) : 16u; } -#endif return 0; } -#ifndef GLSLANG_WEB const TSpirvType& getSpirvType() const { assert(spirvType); return *spirvType; } -#endif protected: // Require consumer to pick between deep copy and shallow copy. @@ -2819,7 +2794,6 @@ protected: { shallowCopy(copyOf); -#ifndef GLSLANG_WEB // GL_EXT_spirv_intrinsics if (copyOf.qualifier.spirvDecorate) { qualifier.spirvDecorate = new TSpirvDecorate; @@ -2830,7 +2804,6 @@ protected: spirvType = new TSpirvType; *spirvType = *copyOf.spirvType; } -#endif if (copyOf.arraySizes) { arraySizes = new TArraySizes; @@ -2838,8 +2811,10 @@ protected: } if (copyOf.typeParameters) { - typeParameters = new TArraySizes; - *typeParameters = *copyOf.typeParameters; + typeParameters = new TTypeParameters; + typeParameters->arraySizes = new TArraySizes; + *typeParameters->arraySizes = *copyOf.typeParameters->arraySizes; + typeParameters->basicType = copyOf.basicType; } if (copyOf.isStruct() && copyOf.structure) { @@ -2869,15 +2844,18 @@ protected: void buildMangledName(TString&) const; TBasicType basicType : 8; - int vectorSize : 4; // 1 means either scalar or 1-component vector; see vector1 to disambiguate. - int matrixCols : 4; - int matrixRows : 4; + uint32_t vectorSize : 4; // 1 means either scalar or 1-component vector; see vector1 to disambiguate. + uint32_t matrixCols : 4; + uint32_t matrixRows : 4; bool vector1 : 1; // Backward-compatible tracking of a 1-component vector distinguished from a scalar. // GLSL 4.5 never has a 1-component vector; so this will always be false until such // functionality is added. // HLSL does have a 1-component vectors, so this will be true to disambiguate // from a scalar. - bool coopmat : 1; + bool coopmatNV : 1; + bool coopmatKHR : 1; + uint32_t coopmatKHRuse : 3; // Accepts one of three values: 0, 1, 2 (gl_MatrixUseA, gl_MatrixUseB, gl_MatrixUseAccumulator) + bool coopmatKHRUseValid : 1; // True if coopmatKHRuse has been set TQualifier qualifier; TArraySizes* arraySizes; // nullptr unless an array; can be shared across types @@ -2890,10 +2868,8 @@ protected: TString *fieldName; // for structure field names TString *typeName; // for structure type name TSampler sampler; - TArraySizes* typeParameters;// nullptr unless a parameterized type; can be shared across types -#ifndef GLSLANG_WEB + TTypeParameters *typeParameters;// nullptr unless a parameterized type; can be shared across types TSpirvType* spirvType; // SPIR-V type defined by spirv_type directive -#endif }; } // end namespace glslang diff --git a/glslang/Include/arrays.h b/glslang/Include/arrays.h index 7f047d9f..91e19083 100755 --- a/glslang/Include/arrays.h +++ b/glslang/Include/arrays.h @@ -147,6 +147,15 @@ struct TSmallArrayVector { sizes->erase(sizes->begin()); } + void pop_back() + { + assert(sizes != nullptr && sizes->size() > 0); + if (sizes->size() == 1) + dealloc(); + else + sizes->resize(sizes->size() - 1); + } + // 'this' should currently not be holding anything, and copyNonFront // will make it hold a copy of all but the first element of rhs. // (This would be useful for making a type that is dereferenced by @@ -222,7 +231,7 @@ protected: struct TArraySizes { POOL_ALLOCATOR_NEW_DELETE(GetThreadPoolAllocator()) - TArraySizes() : implicitArraySize(1), variablyIndexed(false) { } + TArraySizes() : implicitArraySize(0), implicitlySized(true), variablyIndexed(false){ } // For breaking into two non-shared copies, independently modifiable. TArraySizes& operator=(const TArraySizes& from) @@ -230,6 +239,7 @@ struct TArraySizes { implicitArraySize = from.implicitArraySize; variablyIndexed = from.variablyIndexed; sizes = from.sizes; + implicitlySized = from.implicitlySized; return *this; } @@ -256,11 +266,17 @@ struct TArraySizes { void addInnerSize(int s, TIntermTyped* n) { sizes.push_back((unsigned)s, n); } void addInnerSize(TArraySize pair) { sizes.push_back(pair.size, pair.node); + implicitlySized = false; } void addInnerSizes(const TArraySizes& s) { sizes.push_back(s.sizes); } - void changeOuterSize(int s) { sizes.changeFront((unsigned)s); } - int getImplicitSize() const { return implicitArraySize; } - void updateImplicitSize(int s) { implicitArraySize = std::max(implicitArraySize, s); } + void changeOuterSize(int s) { + sizes.changeFront((unsigned)s); + implicitlySized = false; + } + int getImplicitSize() const { return implicitArraySize > 0 ? implicitArraySize : 1; } + void updateImplicitSize(int s) { + implicitArraySize = (std::max)(implicitArraySize, s); + } bool isInnerUnsized() const { for (int d = 1; d < sizes.size(); ++d) { @@ -295,7 +311,11 @@ struct TArraySizes { bool hasUnsized() const { return getOuterSize() == UnsizedArraySize || isInnerUnsized(); } bool isSized() const { return getOuterSize() != UnsizedArraySize; } + bool isImplicitlySized() const { return implicitlySized; } + bool isDefaultImplicitlySized() const { return implicitlySized && implicitArraySize == 0; } + void setImplicitlySized(bool isImplicitSizing) { implicitlySized = isImplicitSizing; } void dereference() { sizes.pop_front(); } + void removeLastSize() { sizes.pop_back(); } void copyDereferenced(const TArraySizes& rhs) { assert(sizes.size() == 0); @@ -333,6 +353,7 @@ protected: // the implicit size of the array, if not variably indexed and // otherwise legal. int implicitArraySize; + bool implicitlySized; bool variablyIndexed; // true if array is indexed with a non compile-time constant }; diff --git a/glslang/Include/glslang_c_interface.h b/glslang/Include/glslang_c_interface.h index f540f26d..7fa1a05d 100755 --- a/glslang/Include/glslang_c_interface.h +++ b/glslang/Include/glslang_c_interface.h @@ -157,28 +157,17 @@ typedef struct glslang_resource_s { int max_task_work_group_size_y_ext; int max_task_work_group_size_z_ext; int max_mesh_view_count_ext; - int maxDualSourceDrawBuffersEXT; + union + { + int max_dual_source_draw_buffers_ext; + + /* Incorrectly capitalized name retained for backward compatibility */ + int maxDualSourceDrawBuffersEXT; + }; glslang_limits_t limits; } glslang_resource_t; -typedef struct glslang_input_s { - glslang_source_t language; - glslang_stage_t stage; - glslang_client_t client; - glslang_target_client_version_t client_version; - glslang_target_language_t target_language; - glslang_target_language_version_t target_language_version; - /** Shader source code */ - const char* code; - int default_version; - glslang_profile_t default_profile; - int force_default_version_and_profile; - int forward_compatible; - glslang_messages_t messages; - const glslang_resource_t* resource; -} glslang_input_t; - /* Inclusion result structure allocated by C include_local/include_system callbacks */ typedef struct glsl_include_result_s { /* Header file name or NULL if inclusion failed */ @@ -208,6 +197,25 @@ typedef struct glsl_include_callbacks_s { glsl_free_include_result_func free_include_result; } glsl_include_callbacks_t; +typedef struct glslang_input_s { + glslang_source_t language; + glslang_stage_t stage; + glslang_client_t client; + glslang_target_client_version_t client_version; + glslang_target_language_t target_language; + glslang_target_language_version_t target_language_version; + /** Shader source code */ + const char* code; + int default_version; + glslang_profile_t default_profile; + int force_default_version_and_profile; + int forward_compatible; + glslang_messages_t messages; + const glslang_resource_t* resource; + glsl_include_callbacks_t callbacks; + void* callbacks_ctx; +} glslang_input_t; + /* SpvOptions counterpart */ typedef struct glslang_spv_options_s { bool generate_debug_info; @@ -218,6 +226,7 @@ typedef struct glslang_spv_options_s { bool validate; bool emit_nonsemantic_shader_debug_info; bool emit_nonsemantic_shader_debug_source; + bool compile_only; } glslang_spv_options_t; #ifdef __cplusplus @@ -240,8 +249,8 @@ extern "C" { #define GLSLANG_EXPORT #endif -GLSLANG_EXPORT int glslang_initialize_process(); -GLSLANG_EXPORT void glslang_finalize_process(); +GLSLANG_EXPORT int glslang_initialize_process(void); +GLSLANG_EXPORT void glslang_finalize_process(void); GLSLANG_EXPORT glslang_shader_t* glslang_shader_create(const glslang_input_t* input); GLSLANG_EXPORT void glslang_shader_delete(glslang_shader_t* shader); @@ -256,7 +265,7 @@ GLSLANG_EXPORT const char* glslang_shader_get_preprocessed_code(glslang_shader_t GLSLANG_EXPORT const char* glslang_shader_get_info_log(glslang_shader_t* shader); GLSLANG_EXPORT const char* glslang_shader_get_info_debug_log(glslang_shader_t* shader); -GLSLANG_EXPORT glslang_program_t* glslang_program_create(); +GLSLANG_EXPORT glslang_program_t* glslang_program_create(void); GLSLANG_EXPORT void glslang_program_delete(glslang_program_t* program); GLSLANG_EXPORT void glslang_program_add_shader(glslang_program_t* program, glslang_shader_t* shader); GLSLANG_EXPORT int glslang_program_link(glslang_program_t* program, int messages); // glslang_messages_t diff --git a/glslang/Include/intermediate.h b/glslang/Include/intermediate.h index 2b81a22f..b0e154e9 100755 --- a/glslang/Include/intermediate.h +++ b/glslang/Include/intermediate.h @@ -48,14 +48,9 @@ #ifndef __INTERMEDIATE_H #define __INTERMEDIATE_H -#if defined(_MSC_VER) && _MSC_VER >= 1900 - #pragma warning(disable : 4464) // relative include path contains '..' - #pragma warning(disable : 5026) // 'glslang::TIntermUnary': move constructor was implicitly defined as deleted -#endif - -#include "../Include/Common.h" -#include "../Include/Types.h" -#include "../Include/ConstantUnion.h" +#include "Common.h" +#include "Types.h" +#include "ConstantUnion.h" namespace glslang { @@ -72,9 +67,7 @@ enum TOperator { EOpFunctionCall, EOpFunction, // For function definition EOpParameters, // an aggregate listing the parameters to a function -#ifndef GLSLANG_WEB EOpSpirvInst, -#endif // // Unary operators @@ -629,6 +622,9 @@ enum TOperator { EOpCooperativeMatrixLoad, EOpCooperativeMatrixStore, EOpCooperativeMatrixMulAdd, + EOpCooperativeMatrixLoadNV, + EOpCooperativeMatrixStoreNV, + EOpCooperativeMatrixMulAddNV, EOpBeginInvocationInterlock, // Fragment only EOpEndInvocationInterlock, // Fragment only @@ -766,7 +762,8 @@ enum TOperator { EOpConstructTextureSampler, EOpConstructNonuniform, // expected to be transformed away, not present in final AST EOpConstructReference, - EOpConstructCooperativeMatrix, + EOpConstructCooperativeMatrixNV, + EOpConstructCooperativeMatrixKHR, EOpConstructAccStruct, EOpConstructGuardEnd, @@ -827,6 +824,7 @@ enum TOperator { EOpSubpassLoadMS, EOpSparseImageLoad, EOpSparseImageLoadLod, + EOpColorAttachmentReadEXT, // Fragment only EOpImageGuardEnd, @@ -968,7 +966,44 @@ enum TOperator { EOpRayQueryGetIntersectionObjectToWorld, EOpRayQueryGetIntersectionWorldToObject, + // + // GL_NV_shader_invocation_reorder // + + EOpHitObjectTraceRayNV, + EOpHitObjectTraceRayMotionNV, + EOpHitObjectRecordHitNV, + EOpHitObjectRecordHitMotionNV, + EOpHitObjectRecordHitWithIndexNV, + EOpHitObjectRecordHitWithIndexMotionNV, + EOpHitObjectRecordMissNV, + EOpHitObjectRecordMissMotionNV, + EOpHitObjectRecordEmptyNV, + EOpHitObjectExecuteShaderNV, + EOpHitObjectIsEmptyNV, + EOpHitObjectIsMissNV, + EOpHitObjectIsHitNV, + EOpHitObjectGetRayTMinNV, + EOpHitObjectGetRayTMaxNV, + EOpHitObjectGetObjectRayOriginNV, + EOpHitObjectGetObjectRayDirectionNV, + EOpHitObjectGetWorldRayOriginNV, + EOpHitObjectGetWorldRayDirectionNV, + EOpHitObjectGetWorldToObjectNV, + EOpHitObjectGetObjectToWorldNV, + EOpHitObjectGetInstanceCustomIndexNV, + EOpHitObjectGetInstanceIdNV, + EOpHitObjectGetGeometryIndexNV, + EOpHitObjectGetPrimitiveIndexNV, + EOpHitObjectGetHitKindNV, + EOpHitObjectGetShaderBindingTableRecordIndexNV, + EOpHitObjectGetShaderRecordBufferHandleNV, + EOpHitObjectGetAttributesNV, + EOpHitObjectGetCurrentTimeNV, + EOpReorderThreadNV, + EOpFetchMicroTriangleVertexPositionNV, + EOpFetchMicroTriangleVertexBarycentricNV, + // HLSL operations // @@ -1055,6 +1090,24 @@ enum TOperator { // Shader Clock Ops EOpReadClockSubgroupKHR, EOpReadClockDeviceKHR, + + // GL_EXT_ray_tracing_position_fetch + EOpRayQueryGetIntersectionTriangleVertexPositionsEXT, + + // Shader tile image ops + EOpStencilAttachmentReadEXT, // Fragment only + EOpDepthAttachmentReadEXT, // Fragment only + + // Image processing + EOpImageSampleWeightedQCOM, + EOpImageBoxFilterQCOM, + EOpImageBlockMatchSADQCOM, + EOpImageBlockMatchSSDQCOM, +}; + +enum TLinkType { + ELinkNone, + ELinkExport, }; class TIntermTraverser; @@ -1274,9 +1327,11 @@ public: virtual const TString& getMethodName() const { return method; } virtual TIntermTyped* getObject() const { return object; } virtual void traverse(TIntermTraverser*); + void setExport() { linkType = ELinkExport; } protected: TIntermTyped* object; TString method; + TLinkType linkType; }; // @@ -1288,12 +1343,7 @@ public: // per process threadPoolAllocator, then it causes increased memory usage per compile // it is essential to use "symbol = sym" to assign to symbol TIntermSymbol(long long i, const TString& n, const TType& t) - : TIntermTyped(t), id(i), -#ifndef GLSLANG_WEB - flattenSubset(-1), -#endif - constSubtree(nullptr) - { name = n; } + : TIntermTyped(t), id(i), flattenSubset(-1), constSubtree(nullptr) { name = n; } virtual long long getId() const { return id; } virtual void changeId(long long i) { id = i; } virtual const TString& getName() const { return name; } @@ -1304,12 +1354,10 @@ public: const TConstUnionArray& getConstArray() const { return constArray; } void setConstSubtree(TIntermTyped* subtree) { constSubtree = subtree; } TIntermTyped* getConstSubtree() const { return constSubtree; } -#ifndef GLSLANG_WEB void setFlattenSubset(int subset) { flattenSubset = subset; } virtual const TString& getAccessName() const; int getFlattenSubset() const { return flattenSubset; } // -1 means full object -#endif // This is meant for cases where a node has already been constructed, and // later on, it becomes necessary to switch to a different symbol. @@ -1317,9 +1365,7 @@ public: protected: long long id; // the unique id of the symbol this node represents -#ifndef GLSLANG_WEB int flattenSubset; // how deeply the flattened object rooted at id has been dereferenced -#endif TString name; // the name of the symbol this node represents TConstUnionArray constArray; // if the symbol is a front-end compile-time constant, this is its value TIntermTyped* constSubtree; @@ -1358,6 +1404,7 @@ struct TCrackedTextureOp { bool subpass; bool lodClamp; bool fragMask; + bool attachmentEXT; }; // @@ -1373,19 +1420,11 @@ public: bool isConstructor() const; bool isTexture() const { return op > EOpTextureGuardBegin && op < EOpTextureGuardEnd; } bool isSampling() const { return op > EOpSamplingGuardBegin && op < EOpSamplingGuardEnd; } -#ifdef GLSLANG_WEB - bool isImage() const { return false; } - bool isSparseTexture() const { return false; } - bool isImageFootprint() const { return false; } - bool isSparseImage() const { return false; } - bool isSubgroup() const { return false; } -#else bool isImage() const { return op > EOpImageGuardBegin && op < EOpImageGuardEnd; } bool isSparseTexture() const { return op > EOpSparseTextureGuardBegin && op < EOpSparseTextureGuardEnd; } bool isImageFootprint() const { return op > EOpImageFootprintGuardBegin && op < EOpImageFootprintGuardEnd; } bool isSparseImage() const { return op == EOpSparseImageLoad; } bool isSubgroup() const { return op > EOpSubgroupGuardStart && op < EOpSubgroupGuardStop; } -#endif void setOperationPrecision(TPrecisionQualifier p) { operationPrecision = p; } TPrecisionQualifier getOperationPrecision() const { return operationPrecision != EpqNone ? @@ -1414,6 +1453,7 @@ public: cracked.gather = false; cracked.grad = false; cracked.subpass = false; + cracked.attachmentEXT = false; cracked.lodClamp = false; cracked.fragMask = false; @@ -1490,7 +1530,6 @@ public: cracked.offset = true; cracked.proj = true; break; -#ifndef GLSLANG_WEB case EOpTextureClamp: case EOpSparseTextureClamp: cracked.lodClamp = true; @@ -1574,7 +1613,9 @@ public: case EOpSubpassLoadMS: cracked.subpass = true; break; -#endif + case EOpColorAttachmentReadEXT: + cracked.attachmentEXT = true; + break; default: break; } @@ -1625,15 +1666,11 @@ public: virtual TIntermUnary* getAsUnaryNode() { return this; } virtual const TIntermUnary* getAsUnaryNode() const { return this; } virtual void updatePrecision(); -#ifndef GLSLANG_WEB void setSpirvInstruction(const TSpirvInstruction& inst) { spirvInst = inst; } const TSpirvInstruction& getSpirvInstruction() const { return spirvInst; } -#endif protected: TIntermTyped* operand; -#ifndef GLSLANG_WEB TSpirvInstruction spirvInst; -#endif }; typedef TVector TIntermSequence; @@ -1665,10 +1702,11 @@ public: bool getDebug() const { return debug; } void setPragmaTable(const TPragmaTable& pTable); const TPragmaTable& getPragmaTable() const { return *pragmaTable; } -#ifndef GLSLANG_WEB void setSpirvInstruction(const TSpirvInstruction& inst) { spirvInst = inst; } const TSpirvInstruction& getSpirvInstruction() const { return spirvInst; } -#endif + + void setLinkType(TLinkType l) { linkType = l; } + TLinkType getLinkType() const { return linkType; } protected: TIntermAggregate(const TIntermAggregate&); // disallow copy constructor TIntermAggregate& operator=(const TIntermAggregate&); // disallow assignment operator @@ -1679,9 +1717,8 @@ protected: bool optimize; bool debug; TPragmaTable* pragmaTable; -#ifndef GLSLANG_WEB TSpirvInstruction spirvInst; -#endif + TLinkType linkType = ELinkNone; }; // diff --git a/glslang/MachineIndependent/Constant.cpp b/glslang/MachineIndependent/Constant.cpp index 40f53bbc..ac7fc8cd 100755 --- a/glslang/MachineIndependent/Constant.cpp +++ b/glslang/MachineIndependent/Constant.cpp @@ -177,7 +177,6 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, const TIntermTyped* right newConstArray[i].setUConst(leftUnionArray[i].getUConst() / rightUnionArray[i].getUConst()); break; -#ifndef GLSLANG_WEB case EbtInt8: if (rightUnionArray[i] == (signed char)0) newConstArray[i].setI8Const((signed char)0x7F); @@ -212,9 +211,9 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, const TIntermTyped* right case EbtInt64: if (rightUnionArray[i] == 0ll) - newConstArray[i].setI64Const(0x7FFFFFFFFFFFFFFFll); - else if (rightUnionArray[i].getI64Const() == -1 && leftUnionArray[i].getI64Const() == (long long)-0x8000000000000000ll) - newConstArray[i].setI64Const((long long)-0x8000000000000000ll); + newConstArray[i].setI64Const(LLONG_MAX); + else if (rightUnionArray[i].getI64Const() == -1 && leftUnionArray[i].getI64Const() == LLONG_MIN) + newConstArray[i].setI64Const(LLONG_MIN); else newConstArray[i].setI64Const(leftUnionArray[i].getI64Const() / rightUnionArray[i].getI64Const()); break; @@ -227,7 +226,6 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, const TIntermTyped* right break; default: return nullptr; -#endif } } break; @@ -266,7 +264,6 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, const TIntermTyped* right newConstArray[i].setIConst(0); break; } else goto modulo_default; -#ifndef GLSLANG_WEB case EbtInt64: if (rightUnionArray[i].getI64Const() == -1 && leftUnionArray[i].getI64Const() == LLONG_MIN) { newConstArray[i].setI64Const(0); @@ -277,7 +274,6 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, const TIntermTyped* right newConstArray[i].setIConst(0); break; } else goto modulo_default; -#endif default: modulo_default: newConstArray[i] = leftUnionArray[i] % rightUnionArray[i]; @@ -507,14 +503,12 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, const TType& returnType) : -unionArray[i].getIConst()); break; case EbtUint: newConstArray[i].setUConst(static_cast(-static_cast(unionArray[i].getUConst()))); break; -#ifndef GLSLANG_WEB case EbtInt8: newConstArray[i].setI8Const(-unionArray[i].getI8Const()); break; case EbtUint8: newConstArray[i].setU8Const(static_cast(-static_cast(unionArray[i].getU8Const()))); break; case EbtInt16: newConstArray[i].setI16Const(-unionArray[i].getI16Const()); break; case EbtUint16:newConstArray[i].setU16Const(static_cast(-static_cast(unionArray[i].getU16Const()))); break; case EbtInt64: newConstArray[i].setI64Const(-unionArray[i].getI64Const()); break; case EbtUint64: newConstArray[i].setU64Const(static_cast(-static_cast(unionArray[i].getU64Const()))); break; -#endif default: return nullptr; } @@ -634,12 +628,12 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, const TType& returnType) case EOpIsNan: { - newConstArray[i].setBConst(IsNan(unionArray[i].getDConst())); + newConstArray[i].setBConst(std::isnan(unionArray[i].getDConst())); break; } case EOpIsInf: { - newConstArray[i].setBConst(IsInfinity(unionArray[i].getDConst())); + newConstArray[i].setBConst(std::isinf(unionArray[i].getDConst())); break; } @@ -684,7 +678,6 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, const TType& returnType) case EOpConvDoubleToInt: newConstArray[i].setIConst(static_cast(unionArray[i].getDConst())); break; -#ifndef GLSLANG_WEB case EOpConvInt8ToBool: newConstArray[i].setBConst(unionArray[i].getI8Const() != 0); break; case EOpConvUint8ToBool: @@ -696,7 +689,7 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, const TType& returnType) case EOpConvInt64ToBool: newConstArray[i].setBConst(unionArray[i].getI64Const() != 0); break; case EOpConvUint64ToBool: - newConstArray[i].setBConst(unionArray[i].getI64Const() != 0); break; + newConstArray[i].setBConst(unionArray[i].getU64Const() != 0); break; case EOpConvFloat16ToBool: newConstArray[i].setBConst(unionArray[i].getDConst() != 0); break; @@ -919,7 +912,6 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, const TType& returnType) case EOpConvUint64ToPtr: case EOpConstructReference: newConstArray[i].setU64Const(unionArray[i].getU64Const()); break; -#endif // TODO: 3.0 Functionality: unary constant folding: the rest of the ops have to be fleshed out @@ -1066,7 +1058,6 @@ TIntermTyped* TIntermediate::fold(TIntermAggregate* aggrNode) case EbtUint: newConstArray[comp].setUConst(std::min(childConstUnions[0][arg0comp].getUConst(), childConstUnions[1][arg1comp].getUConst())); break; -#ifndef GLSLANG_WEB case EbtInt8: newConstArray[comp].setI8Const(std::min(childConstUnions[0][arg0comp].getI8Const(), childConstUnions[1][arg1comp].getI8Const())); break; @@ -1085,7 +1076,6 @@ TIntermTyped* TIntermediate::fold(TIntermAggregate* aggrNode) case EbtUint64: newConstArray[comp].setU64Const(std::min(childConstUnions[0][arg0comp].getU64Const(), childConstUnions[1][arg1comp].getU64Const())); break; -#endif default: assert(false && "Default missing"); } break; @@ -1102,7 +1092,6 @@ TIntermTyped* TIntermediate::fold(TIntermAggregate* aggrNode) case EbtUint: newConstArray[comp].setUConst(std::max(childConstUnions[0][arg0comp].getUConst(), childConstUnions[1][arg1comp].getUConst())); break; -#ifndef GLSLANG_WEB case EbtInt8: newConstArray[comp].setI8Const(std::max(childConstUnions[0][arg0comp].getI8Const(), childConstUnions[1][arg1comp].getI8Const())); break; @@ -1121,7 +1110,6 @@ TIntermTyped* TIntermediate::fold(TIntermAggregate* aggrNode) case EbtUint64: newConstArray[comp].setU64Const(std::max(childConstUnions[0][arg0comp].getU64Const(), childConstUnions[1][arg1comp].getU64Const())); break; -#endif default: assert(false && "Default missing"); } break; @@ -1137,7 +1125,6 @@ TIntermTyped* TIntermediate::fold(TIntermAggregate* aggrNode) newConstArray[comp].setUConst(std::min(std::max(childConstUnions[0][arg0comp].getUConst(), childConstUnions[1][arg1comp].getUConst()), childConstUnions[2][arg2comp].getUConst())); break; -#ifndef GLSLANG_WEB case EbtInt8: newConstArray[comp].setI8Const(std::min(std::max(childConstUnions[0][arg0comp].getI8Const(), childConstUnions[1][arg1comp].getI8Const()), childConstUnions[2][arg2comp].getI8Const())); @@ -1166,7 +1153,6 @@ TIntermTyped* TIntermediate::fold(TIntermAggregate* aggrNode) newConstArray[comp].setU64Const(std::min(std::max(childConstUnions[0][arg0comp].getU64Const(), childConstUnions[1][arg1comp].getU64Const()), childConstUnions[2][arg2comp].getU64Const())); break; -#endif default: assert(false && "Default missing"); } break; diff --git a/glslang/MachineIndependent/Initialize.cpp b/glslang/MachineIndependent/Initialize.cpp index 53078ec7..af333f3f 100755 --- a/glslang/MachineIndependent/Initialize.cpp +++ b/glslang/MachineIndependent/Initialize.cpp @@ -51,7 +51,6 @@ // including identifying what extensions are needed if a version does not allow a symbol // -#include "../Include/intermediate.h" #include "Initialize.h" namespace glslang { @@ -61,10 +60,6 @@ const bool ARBCompatibility = true; const bool ForwardCompatibility = false; -// change this back to false if depending on textual spellings of texturing calls when consuming the AST -// Using PureOperatorBuiltins=false is deprecated. -bool PureOperatorBuiltins = true; - namespace { // @@ -144,25 +139,20 @@ struct Versioning { EProfile EDesktopProfile = static_cast(ENoProfile | ECoreProfile | ECompatibilityProfile); // Declare pointers to put into the table for versioning. -#ifdef GLSLANG_WEB - const Versioning* Es300Desktop130 = nullptr; - const Versioning* Es310Desktop420 = nullptr; -#else const Versioning Es300Desktop130Version[] = { { EEsProfile, 0, 300, 0, nullptr }, { EDesktopProfile, 0, 130, 0, nullptr }, { EBadProfile } }; const Versioning* Es300Desktop130 = &Es300Desktop130Version[0]; - const Versioning Es310Desktop420Version[] = { { EEsProfile, 0, 310, 0, nullptr }, - { EDesktopProfile, 0, 420, 0, nullptr }, + const Versioning Es310Desktop400Version[] = { { EEsProfile, 0, 310, 0, nullptr }, + { EDesktopProfile, 0, 400, 0, nullptr }, { EBadProfile } }; - const Versioning* Es310Desktop420 = &Es310Desktop420Version[0]; + const Versioning* Es310Desktop400 = &Es310Desktop400Version[0]; const Versioning Es310Desktop450Version[] = { { EEsProfile, 0, 310, 0, nullptr }, { EDesktopProfile, 0, 450, 0, nullptr }, { EBadProfile } }; const Versioning* Es310Desktop450 = &Es310Desktop450Version[0]; -#endif // The main descriptor of what a set of function prototypes can look like, and // a pointer to extra versioning information, when needed. @@ -256,18 +246,16 @@ const BuiltInFunction BaseFunctions[] = { { EOpGreaterThanEqual, "greaterThanEqual", 2, TypeU, ClassBNS, Es300Desktop130 }, { EOpVectorEqual, "equal", 2, TypeU, ClassBNS, Es300Desktop130 }, { EOpVectorNotEqual, "notEqual", 2, TypeU, ClassBNS, Es300Desktop130 }, - { EOpAtomicAdd, "atomicAdd", 2, TypeIU, ClassV1FIOCV, Es310Desktop420 }, - { EOpAtomicMin, "atomicMin", 2, TypeIU, ClassV1FIOCV, Es310Desktop420 }, - { EOpAtomicMax, "atomicMax", 2, TypeIU, ClassV1FIOCV, Es310Desktop420 }, - { EOpAtomicAnd, "atomicAnd", 2, TypeIU, ClassV1FIOCV, Es310Desktop420 }, - { EOpAtomicOr, "atomicOr", 2, TypeIU, ClassV1FIOCV, Es310Desktop420 }, - { EOpAtomicXor, "atomicXor", 2, TypeIU, ClassV1FIOCV, Es310Desktop420 }, - { EOpAtomicExchange, "atomicExchange", 2, TypeIU, ClassV1FIOCV, Es310Desktop420 }, - { EOpAtomicCompSwap, "atomicCompSwap", 3, TypeIU, ClassV1FIOCV, Es310Desktop420 }, -#ifndef GLSLANG_WEB + { EOpAtomicAdd, "atomicAdd", 2, TypeIU, ClassV1FIOCV, Es310Desktop400 }, + { EOpAtomicMin, "atomicMin", 2, TypeIU, ClassV1FIOCV, Es310Desktop400 }, + { EOpAtomicMax, "atomicMax", 2, TypeIU, ClassV1FIOCV, Es310Desktop400 }, + { EOpAtomicAnd, "atomicAnd", 2, TypeIU, ClassV1FIOCV, Es310Desktop400 }, + { EOpAtomicOr, "atomicOr", 2, TypeIU, ClassV1FIOCV, Es310Desktop400 }, + { EOpAtomicXor, "atomicXor", 2, TypeIU, ClassV1FIOCV, Es310Desktop400 }, + { EOpAtomicExchange, "atomicExchange", 2, TypeIU, ClassV1FIOCV, Es310Desktop400 }, + { EOpAtomicCompSwap, "atomicCompSwap", 3, TypeIU, ClassV1FIOCV, Es310Desktop400 }, { EOpMix, "mix", 3, TypeB, ClassRegular, Es310Desktop450 }, { EOpMix, "mix", 3, TypeIU, ClassLB, Es310Desktop450 }, -#endif { EOpNull } }; @@ -386,10 +374,8 @@ void AddTabledBuiltin(TString& decls, const BuiltInFunction& function) if (arg == function.numArguments - 1 && (function.classes & ClassLO)) decls.append("out "); if (arg == 0) { -#ifndef GLSLANG_WEB if (function.classes & ClassCV) decls.append("coherent volatile "); -#endif if (function.classes & ClassFIO) decls.append("inout "); if (function.classes & ClassFO) @@ -416,11 +402,6 @@ void AddTabledBuiltin(TString& decls, const BuiltInFunction& function) // See if the tabled versioning information allows the current version. bool ValidVersion(const BuiltInFunction& function, int version, EProfile profile, const SpvVersion& /* spVersion */) { -#if defined(GLSLANG_WEB) - // all entries in table are valid - return true; -#endif - // nullptr means always valid if (function.versioning == nullptr) return true; @@ -501,7 +482,6 @@ TBuiltIns::TBuiltIns() prefixes[EbtFloat] = ""; prefixes[EbtInt] = "i"; prefixes[EbtUint] = "u"; -#if !defined(GLSLANG_WEB) prefixes[EbtFloat16] = "f16"; prefixes[EbtInt8] = "i8"; prefixes[EbtUint8] = "u8"; @@ -509,7 +489,6 @@ TBuiltIns::TBuiltIns() prefixes[EbtUint16] = "u16"; prefixes[EbtInt64] = "i64"; prefixes[EbtUint64] = "u64"; -#endif postfixes[2] = "2"; postfixes[3] = "3"; @@ -519,12 +498,11 @@ TBuiltIns::TBuiltIns() dimMap[Esd2D] = 2; dimMap[Esd3D] = 3; dimMap[EsdCube] = 3; -#ifndef GLSLANG_WEB dimMap[Esd1D] = 1; dimMap[EsdRect] = 2; dimMap[EsdBuffer] = 1; dimMap[EsdSubpass] = 2; // potentially unused for now -#endif + dimMap[EsdAttachmentEXT] = 2; // potentially unused for now } TBuiltIns::~TBuiltIns() @@ -542,10 +520,6 @@ TBuiltIns::~TBuiltIns() // void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvVersion) { -#ifdef GLSLANG_WEB - version = 310; - profile = EEsProfile; -#endif addTabledBuiltins(version, profile, spvVersion); //============================================================================ @@ -554,7 +528,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV // //============================================================================ -#ifndef GLSLANG_WEB // // Derivatives Functions. // @@ -1499,7 +1472,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "void atomicStore(coherent volatile out double, double, int, int, int);" "\n"); } -#endif // !GLSLANG_WEB if ((profile == EEsProfile && version >= 300) || (profile != EEsProfile && version >= 150)) { // GL_ARB_shader_bit_encoding @@ -1527,7 +1499,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "\n"); } -#ifndef GLSLANG_WEB if ((profile != EEsProfile && version >= 400) || (profile == EEsProfile && version >= 310)) { // GL_OES_gpu_shader5 @@ -1605,7 +1576,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "\n"); } -#endif if ((profile == EEsProfile && version >= 300) || (profile != EEsProfile && version >= 150)) { @@ -1634,7 +1604,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "\n"); } -#ifndef GLSLANG_WEB if ((profile == EEsProfile && version >= 310) || (profile != EEsProfile && version >= 150)) { commonBuiltins.append( @@ -1654,7 +1623,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "vec4 unpackUnorm4x8(highp uint);" "\n"); } -#endif // // Matrix Functions. @@ -1713,7 +1681,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV } } -#ifndef GLSLANG_WEB // // Original-style texture functions existing in all stages. // (Per-stage functions below.) @@ -1759,6 +1726,16 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "vec4 shadow2DRect(sampler2DRectShadow, vec3);" // GL_ARB_texture_rectangle, caught by keyword check "vec4 shadow2DRectProj(sampler2DRectShadow, vec4);" // GL_ARB_texture_rectangle, caught by keyword check + "vec4 texture1DArray(sampler1DArray, vec2);" // GL_EXT_texture_array + "vec4 texture2DArray(sampler2DArray, vec3);" // GL_EXT_texture_array + "vec4 shadow1DArray(sampler1DArrayShadow, vec3);" // GL_EXT_texture_array + "vec4 shadow2DArray(sampler2DArrayShadow, vec4);" // GL_EXT_texture_array + "vec4 texture1DArray(sampler1DArray, vec2, float);" // GL_EXT_texture_array + "vec4 texture2DArray(sampler2DArray, vec3, float);" // GL_EXT_texture_array + "vec4 shadow1DArray(sampler1DArrayShadow, vec3, float);" // GL_EXT_texture_array + "vec4 texture1DArrayLod(sampler1DArray, vec2, float);" // GL_EXT_texture_array + "vec4 texture2DArrayLod(sampler2DArray, vec3, float);" // GL_EXT_texture_array + "vec4 shadow1DArrayLod(sampler1DArrayShadow, vec3, float);" // GL_EXT_texture_array "\n"); } } @@ -4141,6 +4118,19 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "\n"); } + // Builtins for GL_EXT_texture_shadow_lod + if ((profile == EEsProfile && version >= 300) || ((profile != EEsProfile && version >= 130))) { + commonBuiltins.append( + "float texture(sampler2DArrayShadow, vec4, float);" + "float texture(samplerCubeArrayShadow, vec4, float, float);" + "float textureLod(sampler2DArrayShadow, vec4, float);" + "float textureLod(samplerCubeShadow, vec4, float);" + "float textureLod(samplerCubeArrayShadow, vec4, float, float);" + "float textureLodOffset(sampler2DArrayShadow, vec4, float, ivec2);" + "float textureOffset(sampler2DArrayShadow, vec4 , ivec2, float);" + "\n"); + } + if (profile != EEsProfile && version >= 450) { stageBuiltins[EShLangFragment].append(derivativesAndControl64bits); stageBuiltins[EShLangFragment].append( @@ -4163,6 +4153,18 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV } + // QCOM_image_processing + if ((profile == EEsProfile && version >= 310) || + (profile != EEsProfile && version >= 140)) { + commonBuiltins.append( + "vec4 textureWeightedQCOM(sampler2D, vec2, sampler2DArray);" + "vec4 textureWeightedQCOM(sampler2D, vec2, sampler1DArray);" + "vec4 textureBoxFilterQCOM(sampler2D, vec2, vec2);" + "vec4 textureBlockMatchSADQCOM(sampler2D, uvec2, sampler2D, uvec2, uvec2);" + "vec4 textureBlockMatchSSDQCOM(sampler2D, uvec2, sampler2D, uvec2, uvec2);" + "\n"); + } + //============================================================================ // // Prototypes for built-in functions seen by vertex shaders only. @@ -4256,7 +4258,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "void EndPrimitive();" "\n"); } -#endif // !GLSLANG_WEB //============================================================================ // @@ -4293,7 +4294,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "void groupMemoryBarrier();" ); } -#ifndef GLSLANG_WEB if ((profile != EEsProfile && version >= 420) || esBarrier) { if (spvVersion.vulkan == 0 || spvVersion.vulkanRelaxed) { commonBuiltins.append("void memoryBarrierAtomicCounter();"); @@ -4396,6 +4396,94 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "icoopmatNV coopMatMulAddNV(icoopmatNV A, icoopmatNV B, icoopmatNV C);\n" "ucoopmatNV coopMatMulAddNV(ucoopmatNV A, ucoopmatNV B, ucoopmatNV C);\n" ); + + std::string cooperativeMatrixFuncs = + "void coopMatLoad(out coopmat m, volatile coherent int8_t[] buf, uint element, uint stride, int matrixLayout);\n" + "void coopMatLoad(out coopmat m, volatile coherent int16_t[] buf, uint element, uint stride, int matrixLayout);\n" + "void coopMatLoad(out coopmat m, volatile coherent int32_t[] buf, uint element, uint stride, int matrixLayout);\n" + "void coopMatLoad(out coopmat m, volatile coherent int64_t[] buf, uint element, uint stride, int matrixLayout);\n" + "void coopMatLoad(out coopmat m, volatile coherent uint8_t[] buf, uint element, uint stride, int matrixLayout);\n" + "void coopMatLoad(out coopmat m, volatile coherent uint16_t[] buf, uint element, uint stride, int matrixLayout);\n" + "void coopMatLoad(out coopmat m, volatile coherent uint32_t[] buf, uint element, uint stride, int matrixLayout);\n" + "void coopMatLoad(out coopmat m, volatile coherent uint64_t[] buf, uint element, uint stride, int matrixLayout);\n" + "void coopMatLoad(out coopmat m, volatile coherent float16_t[] buf, uint element, uint stride, int matrixLayout);\n" + "void coopMatLoad(out coopmat m, volatile coherent float[] buf, uint element, uint stride, int matrixLayout);\n" + "void coopMatLoad(out coopmat m, volatile coherent float64_t[] buf, uint element, uint stride, int matrixLayout);\n" + + "void coopMatLoad(out coopmat m, volatile coherent i8vec2[] buf, uint element, uint stride, int matrixLayout);\n" + "void coopMatLoad(out coopmat m, volatile coherent i16vec2[] buf, uint element, uint stride, int matrixLayout);\n" + "void coopMatLoad(out coopmat m, volatile coherent i32vec2[] buf, uint element, uint stride, int matrixLayout);\n" + "void coopMatLoad(out coopmat m, volatile coherent i64vec2[] buf, uint element, uint stride, int matrixLayout);\n" + "void coopMatLoad(out coopmat m, volatile coherent u8vec2[] buf, uint element, uint stride, int matrixLayout);\n" + "void coopMatLoad(out coopmat m, volatile coherent u16vec2[] buf, uint element, uint stride, int matrixLayout);\n" + "void coopMatLoad(out coopmat m, volatile coherent u32vec2[] buf, uint element, uint stride, int matrixLayout);\n" + "void coopMatLoad(out coopmat m, volatile coherent u64vec2[] buf, uint element, uint stride, int matrixLayout);\n" + "void coopMatLoad(out coopmat m, volatile coherent f16vec2[] buf, uint element, uint stride, int matrixLayout);\n" + "void coopMatLoad(out coopmat m, volatile coherent f32vec2[] buf, uint element, uint stride, int matrixLayout);\n" + "void coopMatLoad(out coopmat m, volatile coherent f64vec2[] buf, uint element, uint stride, int matrixLayout);\n" + + "void coopMatLoad(out coopmat m, volatile coherent i8vec4[] buf, uint element, uint stride, int matrixLayout);\n" + "void coopMatLoad(out coopmat m, volatile coherent i16vec4[] buf, uint element, uint stride, int matrixLayout);\n" + "void coopMatLoad(out coopmat m, volatile coherent i32vec4[] buf, uint element, uint stride, int matrixLayout);\n" + "void coopMatLoad(out coopmat m, volatile coherent i64vec4[] buf, uint element, uint stride, int matrixLayout);\n" + "void coopMatLoad(out coopmat m, volatile coherent u8vec4[] buf, uint element, uint stride, int matrixLayout);\n" + "void coopMatLoad(out coopmat m, volatile coherent u16vec4[] buf, uint element, uint stride, int matrixLayout);\n" + "void coopMatLoad(out coopmat m, volatile coherent u32vec4[] buf, uint element, uint stride, int matrixLayout);\n" + "void coopMatLoad(out coopmat m, volatile coherent u64vec4[] buf, uint element, uint stride, int matrixLayout);\n" + "void coopMatLoad(out coopmat m, volatile coherent f16vec4[] buf, uint element, uint stride, int matrixLayout);\n" + "void coopMatLoad(out coopmat m, volatile coherent f32vec4[] buf, uint element, uint stride, int matrixLayout);\n" + "void coopMatLoad(out coopmat m, volatile coherent f64vec4[] buf, uint element, uint stride, int matrixLayout);\n" + + "void coopMatStore(coopmat m, volatile coherent int8_t[] buf, uint element, uint stride, int matrixLayout);\n" + "void coopMatStore(coopmat m, volatile coherent int16_t[] buf, uint element, uint stride, int matrixLayout);\n" + "void coopMatStore(coopmat m, volatile coherent int32_t[] buf, uint element, uint stride, int matrixLayout);\n" + "void coopMatStore(coopmat m, volatile coherent int64_t[] buf, uint element, uint stride, int matrixLayout);\n" + "void coopMatStore(coopmat m, volatile coherent uint8_t[] buf, uint element, uint stride, int matrixLayout);\n" + "void coopMatStore(coopmat m, volatile coherent uint16_t[] buf, uint element, uint stride, int matrixLayout);\n" + "void coopMatStore(coopmat m, volatile coherent uint32_t[] buf, uint element, uint stride, int matrixLayout);\n" + "void coopMatStore(coopmat m, volatile coherent uint64_t[] buf, uint element, uint stride, int matrixLayout);\n" + "void coopMatStore(coopmat m, volatile coherent float16_t[] buf, uint element, uint stride, int matrixLayout);\n" + "void coopMatStore(coopmat m, volatile coherent float[] buf, uint element, uint stride, int matrixLayout);\n" + "void coopMatStore(coopmat m, volatile coherent float64_t[] buf, uint element, uint stride, int matrixLayout);\n" + + "void coopMatStore(coopmat m, volatile coherent i8vec2[] buf, uint element, uint stride, int matrixLayout);\n" + "void coopMatStore(coopmat m, volatile coherent i16vec2[] buf, uint element, uint stride, int matrixLayout);\n" + "void coopMatStore(coopmat m, volatile coherent i32vec2[] buf, uint element, uint stride, int matrixLayout);\n" + "void coopMatStore(coopmat m, volatile coherent i64vec2[] buf, uint element, uint stride, int matrixLayout);\n" + "void coopMatStore(coopmat m, volatile coherent u8vec2[] buf, uint element, uint stride, int matrixLayout);\n" + "void coopMatStore(coopmat m, volatile coherent u16vec2[] buf, uint element, uint stride, int matrixLayout);\n" + "void coopMatStore(coopmat m, volatile coherent u32vec2[] buf, uint element, uint stride, int matrixLayout);\n" + "void coopMatStore(coopmat m, volatile coherent u64vec2[] buf, uint element, uint stride, int matrixLayout);\n" + "void coopMatStore(coopmat m, volatile coherent f16vec2[] buf, uint element, uint stride, int matrixLayout);\n" + "void coopMatStore(coopmat m, volatile coherent f32vec2[] buf, uint element, uint stride, int matrixLayout);\n" + "void coopMatStore(coopmat m, volatile coherent f64vec2[] buf, uint element, uint stride, int matrixLayout);\n" + + "void coopMatStore(coopmat m, volatile coherent i8vec4[] buf, uint element, uint stride, int matrixLayout);\n" + "void coopMatStore(coopmat m, volatile coherent i16vec4[] buf, uint element, uint stride, int matrixLayout);\n" + "void coopMatStore(coopmat m, volatile coherent i32vec4[] buf, uint element, uint stride, int matrixLayout);\n" + "void coopMatStore(coopmat m, volatile coherent i64vec4[] buf, uint element, uint stride, int matrixLayout);\n" + "void coopMatStore(coopmat m, volatile coherent u8vec4[] buf, uint element, uint stride, int matrixLayout);\n" + "void coopMatStore(coopmat m, volatile coherent u16vec4[] buf, uint element, uint stride, int matrixLayout);\n" + "void coopMatStore(coopmat m, volatile coherent u32vec4[] buf, uint element, uint stride, int matrixLayout);\n" + "void coopMatStore(coopmat m, volatile coherent u64vec4[] buf, uint element, uint stride, int matrixLayout);\n" + "void coopMatStore(coopmat m, volatile coherent f16vec4[] buf, uint element, uint stride, int matrixLayout);\n" + "void coopMatStore(coopmat m, volatile coherent f32vec4[] buf, uint element, uint stride, int matrixLayout);\n" + "void coopMatStore(coopmat m, volatile coherent f64vec4[] buf, uint element, uint stride, int matrixLayout);\n" + + "coopmat coopMatMulAdd(coopmat A, coopmat B, coopmat C);\n" + "coopmat coopMatMulAdd(coopmat A, coopmat B, coopmat C, int matrixOperands);\n"; + + commonBuiltins.append(cooperativeMatrixFuncs.c_str()); + + commonBuiltins.append( + "const int gl_MatrixUseA = 0;\n" + "const int gl_MatrixUseB = 1;\n" + "const int gl_MatrixUseAccumulator = 2;\n" + "const int gl_MatrixOperandsSaturatingAccumulation = 0x10;\n" + "const int gl_CooperativeMatrixLayoutRowMajor = 0;\n" + "const int gl_CooperativeMatrixLayoutColumnMajor = 1;\n" + "\n" + ); } //============================================================================ @@ -4440,6 +4528,24 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "\n"); } + // GL_EXT_shader_tile_image + if (spvVersion.vulkan > 0) { + stageBuiltins[EShLangFragment].append( + "lowp uint stencilAttachmentReadEXT();" + "lowp uint stencilAttachmentReadEXT(int);" + "highp float depthAttachmentReadEXT();" + "highp float depthAttachmentReadEXT(int);" + "\n"); + stageBuiltins[EShLangFragment].append( + "vec4 colorAttachmentReadEXT(attachmentEXT);" + "vec4 colorAttachmentReadEXT(attachmentEXT, int);" + "ivec4 colorAttachmentReadEXT(iattachmentEXT);" + "ivec4 colorAttachmentReadEXT(iattachmentEXT, int);" + "uvec4 colorAttachmentReadEXT(uattachmentEXT);" + "uvec4 colorAttachmentReadEXT(uattachmentEXT, int);" + "\n"); + } + // GL_ARB_derivative_control if (profile != EEsProfile && version >= 400) { stageBuiltins[EShLangFragment].append(derivativeControls); @@ -4548,9 +4654,10 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "uvec4 fragmentFetchAMD(usubpassInputMS, uint);" "\n"); - } + } - // Builtins for GL_NV_ray_tracing/GL_NV_ray_tracing_motion_blur/GL_EXT_ray_tracing/GL_EXT_ray_query + // Builtins for GL_NV_ray_tracing/GL_NV_ray_tracing_motion_blur/GL_EXT_ray_tracing/GL_EXT_ray_query/ + // GL_NV_shader_invocation_reorder/GL_KHR_ray_tracing_position_Fetch if (profile != EEsProfile && version >= 460) { commonBuiltins.append("void rayQueryInitializeEXT(rayQueryEXT, accelerationStructureEXT, uint, uint, vec3, float, vec3, float);" "void rayQueryTerminateEXT(rayQueryEXT);" @@ -4575,6 +4682,7 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "vec3 rayQueryGetIntersectionObjectRayOriginEXT(rayQueryEXT, bool);" "mat4x3 rayQueryGetIntersectionObjectToWorldEXT(rayQueryEXT, bool);" "mat4x3 rayQueryGetIntersectionWorldToObjectEXT(rayQueryEXT, bool);" + "void rayQueryGetIntersectionTriangleVertexPositionsEXT(rayQueryEXT, bool, out vec3[3]);" "\n"); stageBuiltins[EShLangRayGen].append( @@ -4583,6 +4691,41 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "void traceRayEXT(accelerationStructureEXT,uint,uint,uint,uint,uint,vec3,float,vec3,float,int);" "void executeCallableNV(uint, int);" "void executeCallableEXT(uint, int);" + "void hitObjectTraceRayNV(hitObjectNV,accelerationStructureEXT,uint,uint,uint,uint,uint,vec3,float,vec3,float,int);" + "void hitObjectTraceRayMotionNV(hitObjectNV,accelerationStructureEXT,uint,uint,uint,uint,uint,vec3,float,vec3,float,float,int);" + "void hitObjectRecordHitNV(hitObjectNV,accelerationStructureEXT,int,int,int,uint,uint,uint,vec3,float,vec3,float,int);" + "void hitObjectRecordHitMotionNV(hitObjectNV,accelerationStructureEXT,int,int,int,uint,uint,uint,vec3,float,vec3,float,float,int);" + "void hitObjectRecordHitWithIndexNV(hitObjectNV, accelerationStructureEXT,int,int,int,uint,uint,vec3,float,vec3,float,int);" + "void hitObjectRecordHitWithIndexMotionNV(hitObjectNV, accelerationStructureEXT,int,int,int,uint,uint,vec3,float,vec3,float,float,int);" + "void hitObjectRecordMissNV(hitObjectNV,uint,vec3,float,vec3,float);" + "void hitObjectRecordMissMotionNV(hitObjectNV,uint,vec3,float,vec3,float,float);" + "void hitObjectRecordEmptyNV(hitObjectNV);" + "void hitObjectExecuteShaderNV(hitObjectNV,int);" + "bool hitObjectIsEmptyNV(hitObjectNV);" + "bool hitObjectIsMissNV(hitObjectNV);" + "bool hitObjectIsHitNV(hitObjectNV);" + "float hitObjectGetRayTMinNV(hitObjectNV);" + "float hitObjectGetRayTMaxNV(hitObjectNV);" + "vec3 hitObjectGetWorldRayOriginNV(hitObjectNV);" + "vec3 hitObjectGetWorldRayDirectionNV(hitObjectNV);" + "vec3 hitObjectGetObjectRayOriginNV(hitObjectNV);" + "vec3 hitObjectGetObjectRayDirectionNV(hitObjectNV);" + "mat4x3 hitObjectGetWorldToObjectNV(hitObjectNV);" + "mat4x3 hitObjectGetObjectToWorldNV(hitObjectNV);" + "int hitObjectGetInstanceCustomIndexNV(hitObjectNV);" + "int hitObjectGetInstanceIdNV(hitObjectNV);" + "int hitObjectGetGeometryIndexNV(hitObjectNV);" + "int hitObjectGetPrimitiveIndexNV(hitObjectNV);" + "uint hitObjectGetHitKindNV(hitObjectNV);" + "void hitObjectGetAttributesNV(hitObjectNV,int);" + "float hitObjectGetCurrentTimeNV(hitObjectNV);" + "uint hitObjectGetShaderBindingTableRecordIndexNV(hitObjectNV);" + "uvec2 hitObjectGetShaderRecordBufferHandleNV(hitObjectNV);" + "void reorderThreadNV(uint, uint);" + "void reorderThreadNV(hitObjectNV);" + "void reorderThreadNV(hitObjectNV, uint, uint);" + "vec3 fetchMicroTriangleVertexPositionNV(accelerationStructureEXT, int, int, int, ivec2);" + "vec2 fetchMicroTriangleVertexBarycentricNV(accelerationStructureEXT, int, int, int, ivec2);" "\n"); stageBuiltins[EShLangIntersect].append( "bool reportIntersectionNV(float, uint);" @@ -4598,6 +4741,36 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "void traceRayEXT(accelerationStructureEXT,uint,uint,uint,uint,uint,vec3,float,vec3,float,int);" "void executeCallableNV(uint, int);" "void executeCallableEXT(uint, int);" + "void hitObjectTraceRayNV(hitObjectNV,accelerationStructureEXT,uint,uint,uint,uint,uint,vec3,float,vec3,float,int);" + "void hitObjectTraceRayMotionNV(hitObjectNV,accelerationStructureEXT,uint,uint,uint,uint,uint,vec3,float,vec3,float,float,int);" + "void hitObjectRecordHitNV(hitObjectNV,accelerationStructureEXT,int,int,int,uint,uint,uint,vec3,float,vec3,float,int);" + "void hitObjectRecordHitMotionNV(hitObjectNV,accelerationStructureEXT,int,int,int,uint,uint,uint,vec3,float,vec3,float,float,int);" + "void hitObjectRecordHitWithIndexNV(hitObjectNV,accelerationStructureEXT,int,int,int,uint,uint,vec3,float,vec3,float,int);" + "void hitObjectRecordHitWithIndexMotionNV(hitObjectNV, accelerationStructureEXT,int,int,int,uint,uint,vec3,float,vec3,float,float,int);" + "void hitObjectRecordMissNV(hitObjectNV, uint, vec3, float, vec3, float);" + "void hitObjectRecordMissMotionNV(hitObjectNV,uint,vec3,float,vec3,float,float);" + "void hitObjectRecordEmptyNV(hitObjectNV);" + "void hitObjectExecuteShaderNV(hitObjectNV, int);" + "bool hitObjectIsEmptyNV(hitObjectNV);" + "bool hitObjectIsMissNV(hitObjectNV);" + "bool hitObjectIsHitNV(hitObjectNV);" + "float hitObjectGetRayTMinNV(hitObjectNV);" + "float hitObjectGetRayTMaxNV(hitObjectNV);" + "vec3 hitObjectGetWorldRayOriginNV(hitObjectNV);" + "vec3 hitObjectGetWorldRayDirectionNV(hitObjectNV);" + "vec3 hitObjectGetObjectRayOriginNV(hitObjectNV);" + "vec3 hitObjectGetObjectRayDirectionNV(hitObjectNV);" + "mat4x3 hitObjectGetWorldToObjectNV(hitObjectNV);" + "mat4x3 hitObjectGetObjectToWorldNV(hitObjectNV);" + "int hitObjectGetInstanceCustomIndexNV(hitObjectNV);" + "int hitObjectGetInstanceIdNV(hitObjectNV);" + "int hitObjectGetGeometryIndexNV(hitObjectNV);" + "int hitObjectGetPrimitiveIndexNV(hitObjectNV);" + "uint hitObjectGetHitKindNV(hitObjectNV);" + "void hitObjectGetAttributesNV(hitObjectNV,int);" + "float hitObjectGetCurrentTimeNV(hitObjectNV);" + "uint hitObjectGetShaderBindingTableRecordIndexNV(hitObjectNV);" + "uvec2 hitObjectGetShaderRecordBufferHandleNV(hitObjectNV);" "\n"); stageBuiltins[EShLangMiss].append( "void traceNV(accelerationStructureNV,uint,uint,uint,uint,uint,vec3,float,vec3,float,int);" @@ -4605,6 +4778,36 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "void traceRayEXT(accelerationStructureEXT,uint,uint,uint,uint,uint,vec3,float,vec3,float,int);" "void executeCallableNV(uint, int);" "void executeCallableEXT(uint, int);" + "void hitObjectTraceRayNV(hitObjectNV,accelerationStructureEXT,uint,uint,uint,uint,uint,vec3,float,vec3,float,int);" + "void hitObjectTraceRayMotionNV(hitObjectNV,accelerationStructureEXT,uint,uint,uint,uint,uint,vec3,float,vec3,float,float,int);" + "void hitObjectRecordHitNV(hitObjectNV,accelerationStructureEXT,int,int,int,uint,uint,uint,vec3,float,vec3,float,int);" + "void hitObjectRecordHitMotionNV(hitObjectNV,accelerationStructureEXT,int,int,int,uint,uint,uint,vec3,float,vec3,float,float,int);" + "void hitObjectRecordHitWithIndexNV(hitObjectNV,accelerationStructureEXT,int,int,int,uint,uint,vec3,float,vec3,float,int);" + "void hitObjectRecordHitWithIndexMotionNV(hitObjectNV, accelerationStructureEXT,int,int,int,uint,uint,vec3,float,vec3,float,float,int);" + "void hitObjectRecordMissNV(hitObjectNV, uint, vec3, float, vec3, float);" + "void hitObjectRecordMissMotionNV(hitObjectNV,uint,vec3,float,vec3,float,float);" + "void hitObjectRecordEmptyNV(hitObjectNV);" + "void hitObjectExecuteShaderNV(hitObjectNV, int);" + "bool hitObjectIsEmptyNV(hitObjectNV);" + "bool hitObjectIsMissNV(hitObjectNV);" + "bool hitObjectIsHitNV(hitObjectNV);" + "float hitObjectGetRayTMinNV(hitObjectNV);" + "float hitObjectGetRayTMaxNV(hitObjectNV);" + "vec3 hitObjectGetWorldRayOriginNV(hitObjectNV);" + "vec3 hitObjectGetWorldRayDirectionNV(hitObjectNV);" + "vec3 hitObjectGetObjectRayOriginNV(hitObjectNV);" + "vec3 hitObjectGetObjectRayDirectionNV(hitObjectNV);" + "mat4x3 hitObjectGetWorldToObjectNV(hitObjectNV);" + "mat4x3 hitObjectGetObjectToWorldNV(hitObjectNV);" + "int hitObjectGetInstanceCustomIndexNV(hitObjectNV);" + "int hitObjectGetInstanceIdNV(hitObjectNV);" + "int hitObjectGetGeometryIndexNV(hitObjectNV);" + "int hitObjectGetPrimitiveIndexNV(hitObjectNV);" + "uint hitObjectGetHitKindNV(hitObjectNV);" + "void hitObjectGetAttributesNV(hitObjectNV,int);" + "float hitObjectGetCurrentTimeNV(hitObjectNV);" + "uint hitObjectGetShaderBindingTableRecordIndexNV(hitObjectNV);" + "uvec2 hitObjectGetShaderRecordBufferHandleNV(hitObjectNV);" "\n"); stageBuiltins[EShLangCallable].append( "void executeCallableNV(uint, int);" @@ -4640,7 +4843,20 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "void SetMeshOutputsEXT(uint, uint);" "\n"); } -#endif // !GLSLANG_WEB + // Builtins for GL_NV_displacement_micromap + if ((profile != EEsProfile && version >= 460) || (profile == EEsProfile && version >= 320)) { + stageBuiltins[EShLangMesh].append( + "vec3 fetchMicroTriangleVertexPositionNV(accelerationStructureEXT, int, int, int, ivec2);" + "vec2 fetchMicroTriangleVertexBarycentricNV(accelerationStructureEXT, int, int, int, ivec2);" + "\n"); + + stageBuiltins[EShLangCompute].append( + "vec3 fetchMicroTriangleVertexPositionNV(accelerationStructureEXT, int, int, int, ivec2);" + "vec2 fetchMicroTriangleVertexBarycentricNV(accelerationStructureEXT, int, int, int, ivec2);" + "\n"); + + } + //============================================================================ // @@ -4662,13 +4878,11 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "highp float diff;" // f - n ); } else { -#ifndef GLSLANG_WEB commonBuiltins.append( "float near;" // n "float far;" // f "float diff;" // f - n ); -#endif } commonBuiltins.append( @@ -4677,7 +4891,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "\n"); } -#if !defined(GLSLANG_WEB) if (spvVersion.spv == 0 && IncludeLegacy(version, profile, spvVersion)) { // // Matrix state. p. 31, 32, 37, 39, 40. @@ -4795,7 +5008,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "\n"); } -#endif // !GLSLANG_WEB //============================================================================ // @@ -4825,7 +5037,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "\n"); } -#ifndef GLSLANG_WEB //============================================================================ // // Define the interface to the mesh/task shader. @@ -5045,7 +5256,7 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV stageBuiltins[EShLangVertex].append( "int gl_VertexID;" // needs qualifier fixed later ); - if (version >= 140 && spvVersion.vulkan == 0) + if (spvVersion.vulkan == 0) stageBuiltins[EShLangVertex].append( "int gl_InstanceID;" // needs qualifier fixed later ); @@ -5100,6 +5311,7 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV stageBuiltins[EShLangVertex].append( "highp vec4 gl_Position;" // needs qualifier fixed later "mediump float gl_PointSize;" // needs qualifier fixed later + "highp int gl_InstanceID;" // needs qualifier fixed later ); } else { if (spvVersion.vulkan == 0 || spvVersion.vulkanRelaxed) @@ -5108,19 +5320,15 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "in highp int gl_InstanceID;" // needs qualifier fixed later ); if (spvVersion.vulkan > 0) -#endif stageBuiltins[EShLangVertex].append( "in highp int gl_VertexIndex;" "in highp int gl_InstanceIndex;" ); -#ifndef GLSLANG_WEB if (version < 310) -#endif stageBuiltins[EShLangVertex].append( "highp vec4 gl_Position;" // needs qualifier fixed later "highp float gl_PointSize;" // needs qualifier fixed later ); -#ifndef GLSLANG_WEB else stageBuiltins[EShLangVertex].append( "out gl_PerVertex {" @@ -5598,7 +5806,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "mediump vec2 gl_PointCoord;" // needs qualifier fixed later ); } -#endif if (version >= 300) { stageBuiltins[EShLangFragment].append( "highp vec4 gl_FragCoord;" // needs qualifier fixed later @@ -5607,7 +5814,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "highp float gl_FragDepth;" // needs qualifier fixed later ); } -#ifndef GLSLANG_WEB if (version >= 310) { stageBuiltins[EShLangFragment].append( "bool gl_HelperInvocation;" // needs qualifier fixed later @@ -5652,15 +5858,12 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "flat in highp int gl_ShadingRateEXT;" // GL_EXT_fragment_shading_rate ); } -#endif stageBuiltins[EShLangFragment].append("\n"); if (version >= 130) add2ndGenerationSamplingImaging(version, profile, spvVersion); -#ifndef GLSLANG_WEB - if ((profile != EEsProfile && version >= 140) || (profile == EEsProfile && version >= 310)) { stageBuiltins[EShLangFragment].append( @@ -5837,6 +6040,8 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "const uint gl_RayFlagsForceOpacityMicromap2StateEXT = 1024U;" "const uint gl_HitKindFrontFacingTriangleEXT = 254U;" "const uint gl_HitKindBackFacingTriangleEXT = 255U;" + "in uint gl_HitKindFrontFacingMicroTriangleNV;" + "in uint gl_HitKindBackFacingMicroTriangleNV;" "\n"; const char *constRayQueryIntersection = @@ -5924,7 +6129,11 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "in uint gl_IncomingRayFlagsEXT;" "in float gl_CurrentRayTimeNV;" "in uint gl_CullMaskEXT;" + "in vec3 gl_HitTriangleVertexPositionsEXT[3];" + "in vec3 gl_HitMicroTriangleVertexPositionsNV[3];" + "in vec2 gl_HitMicroTriangleVertexBarycentricsNV[3];" "\n"; + const char *missDecls = "in uvec3 gl_LaunchIDNV;" "in uvec3 gl_LaunchIDEXT;" @@ -6051,7 +6260,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV } } } -#endif // !GLSLANG_WEB // printf("%s\n", commonBuiltins.c_str()); // printf("%s\n", stageBuiltins[EShLangFragment].c_str()); @@ -6070,26 +6278,14 @@ void TBuiltIns::add2ndGenerationSamplingImaging(int version, EProfile profile, c // enumerate all the types const TBasicType bTypes[] = { EbtFloat, EbtInt, EbtUint, -#if !defined(GLSLANG_WEB) - EbtFloat16 -#endif + EbtFloat16 }; -#ifdef GLSLANG_WEB - bool skipBuffer = true; - bool skipCubeArrayed = true; - const int image = 0; -#else bool skipBuffer = (profile == EEsProfile && version < 310) || (profile != EEsProfile && version < 140); bool skipCubeArrayed = (profile == EEsProfile && version < 310) || (profile != EEsProfile && version < 130); for (int image = 0; image <= 1; ++image) // loop over "bool" image vs sampler -#endif { for (int shadow = 0; shadow <= 1; ++shadow) { // loop over "bool" shadow or not -#ifdef GLSLANG_WEB - const int ms = 0; -#else for (int ms = 0; ms <= 1; ++ms) // loop over "bool" multisample or not -#endif { if ((ms || image) && shadow) continue; @@ -6101,10 +6297,9 @@ void TBuiltIns::add2ndGenerationSamplingImaging(int version, EProfile profile, c continue; for (int arrayed = 0; arrayed <= 1; ++arrayed) { // loop over "bool" arrayed or not -#ifdef GLSLANG_WEB - for (int dim = Esd2D; dim <= EsdCube; ++dim) { // 2D, 3D, and Cube -#else for (int dim = Esd1D; dim < EsdNumDims; ++dim) { // 1D, ..., buffer, subpass + if (dim == EsdAttachmentEXT) + continue; if (dim == EsdSubpass && spvVersion.vulkan == 0) continue; if (dim == EsdSubpass && (image || shadow || arrayed)) @@ -6125,7 +6320,6 @@ void TBuiltIns::add2ndGenerationSamplingImaging(int version, EProfile profile, c continue; if (ms && arrayed && profile == EEsProfile && version < 310) continue; -#endif if (dim == Esd3D && shadow) continue; if (dim == EsdCube && arrayed && skipCubeArrayed) @@ -6135,23 +6329,21 @@ void TBuiltIns::add2ndGenerationSamplingImaging(int version, EProfile profile, c // Loop over the bTypes for (size_t bType = 0; bType < sizeof(bTypes)/sizeof(TBasicType); ++bType) { -#ifndef GLSLANG_WEB if (bTypes[bType] == EbtFloat16 && (profile == EEsProfile || version < 450)) continue; if (dim == EsdRect && version < 140 && bType > 0) continue; -#endif if (shadow && (bTypes[bType] == EbtInt || bTypes[bType] == EbtUint)) continue; // // Now, make all the function prototypes for the type we just built... // TSampler sampler; -#ifndef GLSLANG_WEB if (dim == EsdSubpass) { sampler.setSubpass(bTypes[bType], ms ? true : false); + } else if (dim == EsdAttachmentEXT) { + sampler.setAttachmentEXT(bTypes[bType]); } else -#endif if (image) { sampler.setImage(bTypes[bType], (TSamplerDim)dim, arrayed ? true : false, shadow ? true : false, @@ -6164,12 +6356,10 @@ void TBuiltIns::add2ndGenerationSamplingImaging(int version, EProfile profile, c TString typeName = sampler.getString(); -#ifndef GLSLANG_WEB if (dim == EsdSubpass) { addSubpassSampling(sampler, typeName, version, profile); continue; } -#endif addQueryFunctions(sampler, typeName, version, profile); @@ -6177,7 +6367,6 @@ void TBuiltIns::add2ndGenerationSamplingImaging(int version, EProfile profile, c addImageFunctions(sampler, typeName, version, profile); else { addSamplingFunctions(sampler, typeName, version, profile); -#ifndef GLSLANG_WEB addGatherFunctions(sampler, typeName, version, profile); if (spvVersion.vulkan > 0 && sampler.isCombined() && !sampler.shadow) { // Base Vulkan allows texelFetch() for @@ -6193,7 +6382,6 @@ void TBuiltIns::add2ndGenerationSamplingImaging(int version, EProfile profile, c addSamplingFunctions(sampler, textureTypeName, version, profile); addQueryFunctions(sampler, textureTypeName, version, profile); } -#endif } } } @@ -6224,16 +6412,6 @@ void TBuiltIns::addQueryFunctions(TSampler sampler, const TString& typeName, int int sizeDims = dimMap[sampler.dim] + (sampler.arrayed ? 1 : 0) - (sampler.dim == EsdCube ? 1 : 0); -#ifdef GLSLANG_WEB - commonBuiltins.append("highp "); - commonBuiltins.append("ivec"); - commonBuiltins.append(postfixes[sizeDims]); - commonBuiltins.append(" textureSize("); - commonBuiltins.append(typeName); - commonBuiltins.append(",int);\n"); - return; -#endif - if (sampler.isImage() && ((profile == EEsProfile && version < 310) || (profile != EEsProfile && version < 420))) return; @@ -6553,11 +6731,6 @@ void TBuiltIns::addSubpassSampling(TSampler sampler, const TString& typeName, in // void TBuiltIns::addSamplingFunctions(TSampler sampler, const TString& typeName, int version, EProfile profile) { -#ifdef GLSLANG_WEB - profile = EEsProfile; - version = 310; -#endif - // // texturing // @@ -6632,11 +6805,7 @@ void TBuiltIns::addSamplingFunctions(TSampler sampler, const TString& typeName, continue; // loop over 16-bit floating-point texel addressing -#if defined(GLSLANG_WEB) - const int f16TexAddr = 0; -#else for (int f16TexAddr = 0; f16TexAddr <= 1; ++f16TexAddr) -#endif { if (f16TexAddr && sampler.type != EbtFloat16) continue; @@ -6645,11 +6814,7 @@ void TBuiltIns::addSamplingFunctions(TSampler sampler, const TString& typeName, totalDims--; } // loop over "bool" lod clamp -#if defined(GLSLANG_WEB) - const int lodClamp = 0; -#else for (int lodClamp = 0; lodClamp <= 1 ;++lodClamp) -#endif { if (lodClamp && (profile == EEsProfile || version < 450)) continue; @@ -6657,11 +6822,7 @@ void TBuiltIns::addSamplingFunctions(TSampler sampler, const TString& typeName, continue; // loop over "bool" sparse or not -#if defined(GLSLANG_WEB) - const int sparse = 0; -#else for (int sparse = 0; sparse <= 1; ++sparse) -#endif { if (sparse && (profile == EEsProfile || version < 450)) continue; @@ -6838,11 +6999,6 @@ void TBuiltIns::addSamplingFunctions(TSampler sampler, const TString& typeName, // void TBuiltIns::addGatherFunctions(TSampler sampler, const TString& typeName, int version, EProfile profile) { -#ifdef GLSLANG_WEB - profile = EEsProfile; - version = 310; -#endif - switch (sampler.dim) { case Esd2D: case EsdRect: @@ -7081,11 +7237,6 @@ void TBuiltIns::addGatherFunctions(TSampler sampler, const TString& typeName, in // void TBuiltIns::initialize(const TBuiltInResource &resources, int version, EProfile profile, const SpvVersion& spvVersion, EShLanguage language) { -#ifdef GLSLANG_WEB - version = 310; - profile = EEsProfile; -#endif - // // Initialize the context-dependent (resource-dependent) built-in strings for parsing. // @@ -7143,7 +7294,6 @@ void TBuiltIns::initialize(const TBuiltInResource &resources, int version, EProf s.append(builtInConstant); } -#ifndef GLSLANG_WEB if (version >= 310) { // geometry @@ -7466,7 +7616,6 @@ void TBuiltIns::initialize(const TBuiltInResource &resources, int version, EProf snprintf(builtInConstant, maxSize, "const int gl_MaxTransformFeedbackInterleavedComponents = %d;", resources.maxTransformFeedbackInterleavedComponents); s.append(builtInConstant); } -#endif } // compute @@ -7488,7 +7637,6 @@ void TBuiltIns::initialize(const TBuiltInResource &resources, int version, EProf s.append("\n"); } -#ifndef GLSLANG_WEB // images (some in compute below) if ((profile == EEsProfile && version >= 310) || (profile != EEsProfile && version >= 130)) { @@ -7590,7 +7738,6 @@ void TBuiltIns::initialize(const TBuiltInResource &resources, int version, EProf s.append("\n"); } -#endif s.append("\n"); } @@ -7693,11 +7840,6 @@ static void BuiltInVariable(const char* blockName, const char* name, TBuiltInVar // void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion& spvVersion, EShLanguage language, TSymbolTable& symbolTable) { -#ifdef GLSLANG_WEB - version = 310; - profile = EEsProfile; -#endif - // // Tag built-in variables and functions with additional qualifier and extension information // that cannot be declared with the text strings. @@ -7717,10 +7859,11 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion BuiltInVariable("gl_InstanceIndex", EbvInstanceIndex, symbolTable); } -#ifndef GLSLANG_WEB if (spvVersion.vulkan == 0) { SpecialQualifier("gl_VertexID", EvqVertexId, EbvVertexId, symbolTable); SpecialQualifier("gl_InstanceID", EvqInstanceId, EbvInstanceId, symbolTable); + if (version < 140) + symbolTable.setVariableExtensions("gl_InstanceID", 1, &E_GL_EXT_draw_instanced); } if (spvVersion.vulkan > 0 && spvVersion.vulkanRelaxed) { @@ -7872,6 +8015,18 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion symbolTable.setFunctionExtensions("shadow2DEXT", 1, &E_GL_EXT_shadow_samplers); symbolTable.setFunctionExtensions("shadow2DProjEXT", 1, &E_GL_EXT_shadow_samplers); } + + // E_GL_EXT_texture_array + if (profile != EEsProfile && spvVersion.spv == 0) { + symbolTable.setFunctionExtensions("texture1DArray", 1, &E_GL_EXT_texture_array); + symbolTable.setFunctionExtensions("texture2DArray", 1, &E_GL_EXT_texture_array); + symbolTable.setFunctionExtensions("shadow1DArray", 1, &E_GL_EXT_texture_array); + symbolTable.setFunctionExtensions("shadow2DArray", 1, &E_GL_EXT_texture_array); + + symbolTable.setFunctionExtensions("texture1DArrayLod", 1, &E_GL_EXT_texture_array); + symbolTable.setFunctionExtensions("texture2DArrayLod", 1, &E_GL_EXT_texture_array); + symbolTable.setFunctionExtensions("shadow1DArrayLod", 1, &E_GL_EXT_texture_array); + } // Fall through case EShLangTessControl: @@ -7891,7 +8046,6 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion case EShLangTessEvaluation: case EShLangGeometry: -#endif // !GLSLANG_WEB SpecialQualifier("gl_Position", EvqPosition, EbvPosition, symbolTable); SpecialQualifier("gl_PointSize", EvqPointSize, EbvPointSize, symbolTable); @@ -7901,7 +8055,6 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion BuiltInVariable("gl_out", "gl_Position", EbvPosition, symbolTable); BuiltInVariable("gl_out", "gl_PointSize", EbvPointSize, symbolTable); -#ifndef GLSLANG_WEB SpecialQualifier("gl_ClipVertex", EvqClipVertex, EbvClipVertex, symbolTable); BuiltInVariable("gl_in", "gl_ClipDistance", EbvClipDistance, symbolTable); @@ -8008,7 +8161,7 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion BuiltInVariable("gl_ViewIndex", EbvViewIndex, symbolTable); } - if (profile != EEsProfile) { + if (profile != EEsProfile) { BuiltInVariable("gl_SubGroupInvocationARB", EbvSubGroupInvocation, symbolTable); BuiltInVariable("gl_SubGroupEqMaskARB", EbvSubGroupEqMask, symbolTable); BuiltInVariable("gl_SubGroupGeMaskARB", EbvSubGroupGeMask, symbolTable); @@ -8081,8 +8234,6 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion symbolTable.setVariableExtensions("gl_ShadingRateFlag4HorizontalPixelsEXT", 1, &E_GL_EXT_fragment_shading_rate); } } - -#endif // !GLSLANG_WEB break; case EShLangFragment: @@ -8099,7 +8250,6 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion } } SpecialQualifier("gl_FragDepth", EvqFragDepth, EbvFragDepth, symbolTable); -#ifndef GLSLANG_WEB SpecialQualifier("gl_FragDepthEXT", EvqFragDepth, EbvFragDepth, symbolTable); SpecialQualifier("gl_FragStencilRefARB", EvqFragStencil, EbvFragStencilRef, symbolTable); SpecialQualifier("gl_HelperInvocation", EvqVaryingIn, EbvHelperInvocation, symbolTable); @@ -8141,6 +8291,7 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion symbolTable.setFunctionExtensions("rayQueryGetIntersectionWorldToObjectEXT", 1, &E_GL_EXT_ray_query); symbolTable.setFunctionExtensions("rayQueryGetWorldRayOriginEXT", 1, &E_GL_EXT_ray_query); symbolTable.setFunctionExtensions("rayQueryGetWorldRayDirectionEXT", 1, &E_GL_EXT_ray_query); + symbolTable.setFunctionExtensions("rayQueryGetIntersectionTriangleVertexPositionsEXT", 1, &E_GL_EXT_ray_tracing_position_fetch); symbolTable.setVariableExtensions("gl_RayFlagsSkipAABBEXT", 1, &E_GL_EXT_ray_flags_primitive_culling); symbolTable.setVariableExtensions("gl_RayFlagsSkipTrianglesEXT", 1, &E_GL_EXT_ray_flags_primitive_culling); symbolTable.setVariableExtensions("gl_RayFlagsForceOpacityMicromap2StateEXT", 1, &E_GL_EXT_opacity_micromap); @@ -8635,7 +8786,19 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion symbolTable.setVariableExtensions("gl_ShadingRateFlag2HorizontalPixelsEXT", 1, &E_GL_EXT_fragment_shading_rate); symbolTable.setVariableExtensions("gl_ShadingRateFlag4HorizontalPixelsEXT", 1, &E_GL_EXT_fragment_shading_rate); } -#endif // !GLSLANG_WEB + + // GL_EXT_shader_tile_image + symbolTable.setFunctionExtensions("stencilAttachmentReadEXT", 1, &E_GL_EXT_shader_tile_image); + symbolTable.setFunctionExtensions("depthAttachmentReadEXT", 1, &E_GL_EXT_shader_tile_image); + symbolTable.setFunctionExtensions("colorAttachmentReadEXT", 1, &E_GL_EXT_shader_tile_image); + + if ((profile == EEsProfile && version >= 310) || + (profile != EEsProfile && version >= 140)) { + symbolTable.setFunctionExtensions("textureWeightedQCOM", 1, &E_GL_QCOM_image_processing); + symbolTable.setFunctionExtensions("textureBoxFilterQCOM", 1, &E_GL_QCOM_image_processing); + symbolTable.setFunctionExtensions("textureBlockMatchSADQCOM", 1, &E_GL_QCOM_image_processing); + symbolTable.setFunctionExtensions("textureBlockMatchSSDQCOM", 1, &E_GL_QCOM_image_processing); + } break; case EShLangCompute: @@ -8648,7 +8811,6 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion BuiltInVariable("gl_DeviceIndex", EbvDeviceIndex, symbolTable); BuiltInVariable("gl_ViewIndex", EbvViewIndex, symbolTable); -#ifndef GLSLANG_WEB if ((profile != EEsProfile && version >= 140) || (profile == EEsProfile && version >= 310)) { symbolTable.setVariableExtensions("gl_DeviceIndex", 1, &E_GL_EXT_device_group); @@ -8772,6 +8934,12 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion symbolTable.setFunctionExtensions("coopMatMulAddNV", 2, coopExt); } + { + symbolTable.setFunctionExtensions("coopMatLoad", 1, &E_GL_KHR_cooperative_matrix); + symbolTable.setFunctionExtensions("coopMatStore", 1, &E_GL_KHR_cooperative_matrix); + symbolTable.setFunctionExtensions("coopMatMulAdd", 1, &E_GL_KHR_cooperative_matrix); + } + if ((profile != EEsProfile && version >= 450) || (profile == EEsProfile && version >= 320)) { symbolTable.setFunctionExtensions("dFdx", 1, &E_GL_NV_compute_shader_derivatives); symbolTable.setFunctionExtensions("dFdy", 1, &E_GL_NV_compute_shader_derivatives); @@ -8791,10 +8959,13 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion symbolTable.setVariableExtensions("gl_ShadingRateFlag2HorizontalPixelsEXT", 1, &E_GL_EXT_fragment_shading_rate); symbolTable.setVariableExtensions("gl_ShadingRateFlag4HorizontalPixelsEXT", 1, &E_GL_EXT_fragment_shading_rate); } -#endif // !GLSLANG_WEB + + if ((profile != EEsProfile && version >= 460)) { + symbolTable.setFunctionExtensions("fetchMicroTriangleVertexPositionNV", 1, &E_GL_NV_displacement_micromap); + symbolTable.setFunctionExtensions("fetchMicroTriangleVertexBarycentricNV", 1, &E_GL_NV_displacement_micromap); + } break; -#if !defined(GLSLANG_WEB) case EShLangRayGen: case EShLangIntersect: case EShLangAnyHit: @@ -8838,6 +9009,9 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion symbolTable.setVariableExtensions("gl_IncomingRayFlagsNV", 1, &E_GL_NV_ray_tracing); symbolTable.setVariableExtensions("gl_IncomingRayFlagsEXT", 1, &E_GL_EXT_ray_tracing); symbolTable.setVariableExtensions("gl_CurrentRayTimeNV", 1, &E_GL_NV_ray_tracing_motion_blur); + symbolTable.setVariableExtensions("gl_HitTriangleVertexPositionsEXT", 1, &E_GL_EXT_ray_tracing_position_fetch); + symbolTable.setVariableExtensions("gl_HitMicroTriangleVertexPositionsNV", 1, &E_GL_NV_displacement_micromap); + symbolTable.setVariableExtensions("gl_HitMicroTriangleVertexBarycentricsNV", 1, &E_GL_NV_displacement_micromap); symbolTable.setVariableExtensions("gl_DeviceIndex", 1, &E_GL_EXT_device_group); @@ -8852,6 +9026,40 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion symbolTable.setFunctionExtensions("executeCallableNV", 1, &E_GL_NV_ray_tracing); symbolTable.setFunctionExtensions("executeCallableEXT", 1, &E_GL_EXT_ray_tracing); + symbolTable.setFunctionExtensions("hitObjectTraceRayNV", 1, &E_GL_NV_shader_invocation_reorder); + symbolTable.setFunctionExtensions("hitObjectTraceRayMotionNV", 1, &E_GL_NV_shader_invocation_reorder); + symbolTable.setFunctionExtensions("hitObjectRecordHitNV", 1, &E_GL_NV_shader_invocation_reorder); + symbolTable.setFunctionExtensions("hitObjectRecordHitMotionNV", 1, &E_GL_NV_shader_invocation_reorder); + symbolTable.setFunctionExtensions("hitObjectRecordHitWithIndexNV", 1, &E_GL_NV_shader_invocation_reorder); + symbolTable.setFunctionExtensions("hitObjectRecordHitWithIndexMotionNV", 1, &E_GL_NV_shader_invocation_reorder); + symbolTable.setFunctionExtensions("hitObjectRecordMissNV", 1, &E_GL_NV_shader_invocation_reorder); + symbolTable.setFunctionExtensions("hitObjectRecordMissMotionNV", 1, &E_GL_NV_shader_invocation_reorder); + symbolTable.setFunctionExtensions("hitObjectRecordEmptyNV", 1, &E_GL_NV_shader_invocation_reorder); + symbolTable.setFunctionExtensions("hitObjectExecuteShaderNV", 1, &E_GL_NV_shader_invocation_reorder); + symbolTable.setFunctionExtensions("hitObjectIsEmptyNV", 1, &E_GL_NV_shader_invocation_reorder); + symbolTable.setFunctionExtensions("hitObjectIsMissNV", 1, &E_GL_NV_shader_invocation_reorder); + symbolTable.setFunctionExtensions("hitObjectIsHitNV", 1, &E_GL_NV_shader_invocation_reorder); + symbolTable.setFunctionExtensions("hitObjectGetRayTMinNV", 1, &E_GL_NV_shader_invocation_reorder); + symbolTable.setFunctionExtensions("hitObjectGetRayTMaxNV", 1, &E_GL_NV_shader_invocation_reorder); + symbolTable.setFunctionExtensions("hitObjectGetObjectRayOriginNV", 1, &E_GL_NV_shader_invocation_reorder); + symbolTable.setFunctionExtensions("hitObjectGetObjectRayDirectionNV", 1, &E_GL_NV_shader_invocation_reorder); + symbolTable.setFunctionExtensions("hitObjectGetWorldRayOriginNV", 1, &E_GL_NV_shader_invocation_reorder); + symbolTable.setFunctionExtensions("hitObjectGetWorldRayDirectionNV", 1, &E_GL_NV_shader_invocation_reorder); + symbolTable.setFunctionExtensions("hitObjectGetWorldToObjectNV", 1, &E_GL_NV_shader_invocation_reorder); + symbolTable.setFunctionExtensions("hitObjectGetbjectToWorldNV", 1, &E_GL_NV_shader_invocation_reorder); + symbolTable.setFunctionExtensions("hitObjectGetInstanceCustomIndexNV", 1, &E_GL_NV_shader_invocation_reorder); + symbolTable.setFunctionExtensions("hitObjectGetInstanceIdNV", 1, &E_GL_NV_shader_invocation_reorder); + symbolTable.setFunctionExtensions("hitObjectGetGeometryIndexNV", 1, &E_GL_NV_shader_invocation_reorder); + symbolTable.setFunctionExtensions("hitObjectGetPrimitiveIndexNV", 1, &E_GL_NV_shader_invocation_reorder); + symbolTable.setFunctionExtensions("hitObjectGetHitKindNV", 1, &E_GL_NV_shader_invocation_reorder); + symbolTable.setFunctionExtensions("hitObjectGetAttributesNV", 1, &E_GL_NV_shader_invocation_reorder); + symbolTable.setFunctionExtensions("hitObjectGetCurrentTimeNV", 1, &E_GL_NV_shader_invocation_reorder); + symbolTable.setFunctionExtensions("hitObjectGetShaderBindingTableRecordIndexNV", 1, &E_GL_NV_shader_invocation_reorder); + symbolTable.setFunctionExtensions("hitObjectGetShaderRecordBufferHandleNV", 1, &E_GL_NV_shader_invocation_reorder); + symbolTable.setFunctionExtensions("reorderThreadNV", 1, &E_GL_NV_shader_invocation_reorder); + symbolTable.setFunctionExtensions("fetchMicroTriangleVertexPositionNV", 1, &E_GL_NV_displacement_micromap); + symbolTable.setFunctionExtensions("fetchMicroTriangleVertexBarycentricNV", 1, &E_GL_NV_displacement_micromap); + BuiltInVariable("gl_LaunchIDNV", EbvLaunchId, symbolTable); BuiltInVariable("gl_LaunchIDEXT", EbvLaunchId, symbolTable); @@ -8889,6 +9097,11 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion BuiltInVariable("gl_IncomingRayFlagsEXT", EbvIncomingRayFlags, symbolTable); BuiltInVariable("gl_DeviceIndex", EbvDeviceIndex, symbolTable); BuiltInVariable("gl_CurrentRayTimeNV", EbvCurrentRayTimeNV, symbolTable); + BuiltInVariable("gl_HitTriangleVertexPositionsEXT", EbvPositionFetch, symbolTable); + BuiltInVariable("gl_HitMicroTriangleVertexPositionsNV", EbvMicroTrianglePositionNV, symbolTable); + BuiltInVariable("gl_HitMicroTriangleVertexBarycentricsNV", EbvMicroTriangleBaryNV, symbolTable); + BuiltInVariable("gl_HitKindFrontFacingMicroTriangleNV", EbvHitKindFrontFacingMicroTriangleNV, symbolTable); + BuiltInVariable("gl_HitKindBackFacingMicroTriangleNV", EbvHitKindBackFacingMicroTriangleNV, symbolTable); // GL_ARB_shader_ballot symbolTable.setVariableExtensions("gl_SubGroupSizeARB", 1, &E_GL_ARB_shader_ballot); @@ -9080,7 +9293,11 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion symbolTable.setVariableExtensions("gl_MeshPrimitivesEXT", "gl_Layer", 1, &E_GL_EXT_mesh_shader); symbolTable.setVariableExtensions("gl_MeshPrimitivesEXT", "gl_ViewportIndex", 1, &E_GL_EXT_mesh_shader); symbolTable.setVariableExtensions("gl_MeshPrimitivesEXT", "gl_CullPrimitiveEXT", 1, &E_GL_EXT_mesh_shader); - symbolTable.setVariableExtensions("gl_MeshPrimitivesEXT", "gl_PrimitiveShadingRateEXT", 1, &E_GL_EXT_mesh_shader); + + // note: technically this member requires both GL_EXT_mesh_shader and GL_EXT_fragment_shading_rate + // since setVariableExtensions only needs *one of* the extensions to validate, it's more useful to specify EXT_fragment_shading_rate + // GL_EXT_mesh_shader will be required in practice by use of other fields of gl_MeshPrimitivesEXT + symbolTable.setVariableExtensions("gl_MeshPrimitivesEXT", "gl_PrimitiveShadingRateEXT", 1, &E_GL_EXT_fragment_shading_rate); BuiltInVariable("gl_MeshPrimitivesEXT", "gl_PrimitiveID", EbvPrimitiveId, symbolTable); BuiltInVariable("gl_MeshPrimitivesEXT", "gl_Layer", EbvLayer, symbolTable); @@ -9186,6 +9403,13 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion symbolTable.setVariableExtensions("gl_ShadingRateFlag2HorizontalPixelsEXT", 1, &E_GL_EXT_fragment_shading_rate); symbolTable.setVariableExtensions("gl_ShadingRateFlag4HorizontalPixelsEXT", 1, &E_GL_EXT_fragment_shading_rate); } + + // Builtins for GL_NV_displacment_micromap + if ((profile != EEsProfile && version >= 460)) { + symbolTable.setFunctionExtensions("fetchMicroTriangleVertexPositionNV", 1, &E_GL_NV_displacement_micromap); + symbolTable.setFunctionExtensions("fetchMicroTriangleVertexBarycentricNV", 1, &E_GL_NV_displacement_micromap); + } + break; case EShLangTask: @@ -9329,7 +9553,6 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion symbolTable.setVariableExtensions("gl_ShadingRateFlag4HorizontalPixelsEXT", 1, &E_GL_EXT_fragment_shading_rate); } break; -#endif default: assert(false && "Language not supported"); @@ -9345,7 +9568,6 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion relateTabledBuiltins(version, profile, spvVersion, language, symbolTable); -#ifndef GLSLANG_WEB symbolTable.relateToOperator("doubleBitsToInt64", EOpDoubleBitsToInt64); symbolTable.relateToOperator("doubleBitsToUint64", EOpDoubleBitsToUint64); symbolTable.relateToOperator("int64BitsToDouble", EOpInt64BitsToDouble); @@ -9762,6 +9984,25 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion symbolTable.relateToOperator("shadow2DEXT", EOpTexture); symbolTable.relateToOperator("shadow2DProjEXT", EOpTextureProj); } + + if ((profile == EEsProfile && version >= 310) || + (profile != EEsProfile && version >= 140)) { + symbolTable.relateToOperator("textureWeightedQCOM", EOpImageSampleWeightedQCOM); + symbolTable.relateToOperator("textureBoxFilterQCOM", EOpImageBoxFilterQCOM); + symbolTable.relateToOperator("textureBlockMatchSADQCOM", EOpImageBlockMatchSADQCOM); + symbolTable.relateToOperator("textureBlockMatchSSDQCOM", EOpImageBlockMatchSSDQCOM); + } + + if (profile != EEsProfile && spvVersion.spv == 0) { + symbolTable.relateToOperator("texture1DArray", EOpTexture); + symbolTable.relateToOperator("texture2DArray", EOpTexture); + symbolTable.relateToOperator("shadow1DArray", EOpTexture); + symbolTable.relateToOperator("shadow2DArray", EOpTexture); + + symbolTable.relateToOperator("texture1DArrayLod", EOpTextureLod); + symbolTable.relateToOperator("texture2DArrayLod", EOpTextureLod); + symbolTable.relateToOperator("shadow1DArrayLod", EOpTextureLod); + } } switch(language) { @@ -9813,6 +10054,7 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion symbolTable.relateToOperator("rayQueryGetWorldRayOriginEXT", EOpRayQueryGetWorldRayOrigin); symbolTable.relateToOperator("rayQueryGetIntersectionObjectToWorldEXT", EOpRayQueryGetIntersectionObjectToWorld); symbolTable.relateToOperator("rayQueryGetIntersectionWorldToObjectEXT", EOpRayQueryGetIntersectionWorldToObject); + symbolTable.relateToOperator("rayQueryGetIntersectionTriangleVertexPositionsEXT", EOpRayQueryGetIntersectionTriangleVertexPositionsEXT); } symbolTable.relateToOperator("interpolateAtCentroid", EOpInterpolateAtCentroid); @@ -9825,6 +10067,10 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion symbolTable.relateToOperator("beginInvocationInterlockARB", EOpBeginInvocationInterlock); symbolTable.relateToOperator("endInvocationInterlockARB", EOpEndInvocationInterlock); + symbolTable.relateToOperator("stencilAttachmentReadEXT", EOpStencilAttachmentReadEXT); + symbolTable.relateToOperator("depthAttachmentReadEXT", EOpDepthAttachmentReadEXT); + symbolTable.relateToOperator("colorAttachmentReadEXT", EOpColorAttachmentReadEXT); + break; case EShLangCompute: @@ -9841,12 +10087,25 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion symbolTable.relateToOperator("dFdyCoarse", EOpDPdyCoarse); symbolTable.relateToOperator("fwidthCoarse",EOpFwidthCoarse); } - symbolTable.relateToOperator("coopMatLoadNV", EOpCooperativeMatrixLoad); - symbolTable.relateToOperator("coopMatStoreNV", EOpCooperativeMatrixStore); - symbolTable.relateToOperator("coopMatMulAddNV", EOpCooperativeMatrixMulAdd); + symbolTable.relateToOperator("coopMatLoadNV", EOpCooperativeMatrixLoadNV); + symbolTable.relateToOperator("coopMatStoreNV", EOpCooperativeMatrixStoreNV); + symbolTable.relateToOperator("coopMatMulAddNV", EOpCooperativeMatrixMulAddNV); + + symbolTable.relateToOperator("coopMatLoad", EOpCooperativeMatrixLoad); + symbolTable.relateToOperator("coopMatStore", EOpCooperativeMatrixStore); + symbolTable.relateToOperator("coopMatMulAdd", EOpCooperativeMatrixMulAdd); + + if (profile != EEsProfile && version >= 460) { + symbolTable.relateToOperator("fetchMicroTriangleVertexPositionNV", EOpFetchMicroTriangleVertexPositionNV); + symbolTable.relateToOperator("fetchMicroTriangleVertexBarycentricNV", EOpFetchMicroTriangleVertexBarycentricNV); + } break; case EShLangRayGen: + if (profile != EEsProfile && version >= 460) { + symbolTable.relateToOperator("fetchMicroTriangleVertexPositionNV", EOpFetchMicroTriangleVertexPositionNV); + symbolTable.relateToOperator("fetchMicroTriangleVertexBarycentricNV", EOpFetchMicroTriangleVertexBarycentricNV); + } // fallthrough case EShLangClosestHit: case EShLangMiss: if (profile != EEsProfile && version >= 460) { @@ -9855,13 +10114,45 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion symbolTable.relateToOperator("traceRayEXT", EOpTraceKHR); symbolTable.relateToOperator("executeCallableNV", EOpExecuteCallableNV); symbolTable.relateToOperator("executeCallableEXT", EOpExecuteCallableKHR); + + symbolTable.relateToOperator("hitObjectTraceRayNV", EOpHitObjectTraceRayNV); + symbolTable.relateToOperator("hitObjectTraceRayMotionNV", EOpHitObjectTraceRayMotionNV); + symbolTable.relateToOperator("hitObjectRecordHitNV", EOpHitObjectRecordHitNV); + symbolTable.relateToOperator("hitObjectRecordHitMotionNV", EOpHitObjectRecordHitMotionNV); + symbolTable.relateToOperator("hitObjectRecordHitWithIndexNV", EOpHitObjectRecordHitWithIndexNV); + symbolTable.relateToOperator("hitObjectRecordHitWithIndexMotionNV", EOpHitObjectRecordHitWithIndexMotionNV); + symbolTable.relateToOperator("hitObjectRecordMissNV", EOpHitObjectRecordMissNV); + symbolTable.relateToOperator("hitObjectRecordMissMotionNV", EOpHitObjectRecordMissMotionNV); + symbolTable.relateToOperator("hitObjectRecordEmptyNV", EOpHitObjectRecordEmptyNV); + symbolTable.relateToOperator("hitObjectExecuteShaderNV", EOpHitObjectExecuteShaderNV); + symbolTable.relateToOperator("hitObjectIsEmptyNV", EOpHitObjectIsEmptyNV); + symbolTable.relateToOperator("hitObjectIsMissNV", EOpHitObjectIsMissNV); + symbolTable.relateToOperator("hitObjectIsHitNV", EOpHitObjectIsHitNV); + symbolTable.relateToOperator("hitObjectGetRayTMinNV", EOpHitObjectGetRayTMinNV); + symbolTable.relateToOperator("hitObjectGetRayTMaxNV", EOpHitObjectGetRayTMaxNV); + symbolTable.relateToOperator("hitObjectGetObjectRayOriginNV", EOpHitObjectGetObjectRayOriginNV); + symbolTable.relateToOperator("hitObjectGetObjectRayDirectionNV", EOpHitObjectGetObjectRayDirectionNV); + symbolTable.relateToOperator("hitObjectGetWorldRayOriginNV", EOpHitObjectGetWorldRayOriginNV); + symbolTable.relateToOperator("hitObjectGetWorldRayDirectionNV", EOpHitObjectGetWorldRayDirectionNV); + symbolTable.relateToOperator("hitObjectGetWorldToObjectNV", EOpHitObjectGetWorldToObjectNV); + symbolTable.relateToOperator("hitObjectGetObjectToWorldNV", EOpHitObjectGetObjectToWorldNV); + symbolTable.relateToOperator("hitObjectGetInstanceCustomIndexNV", EOpHitObjectGetInstanceCustomIndexNV); + symbolTable.relateToOperator("hitObjectGetInstanceIdNV", EOpHitObjectGetInstanceIdNV); + symbolTable.relateToOperator("hitObjectGetGeometryIndexNV", EOpHitObjectGetGeometryIndexNV); + symbolTable.relateToOperator("hitObjectGetPrimitiveIndexNV", EOpHitObjectGetPrimitiveIndexNV); + symbolTable.relateToOperator("hitObjectGetHitKindNV", EOpHitObjectGetHitKindNV); + symbolTable.relateToOperator("hitObjectGetAttributesNV", EOpHitObjectGetAttributesNV); + symbolTable.relateToOperator("hitObjectGetCurrentTimeNV", EOpHitObjectGetCurrentTimeNV); + symbolTable.relateToOperator("hitObjectGetShaderBindingTableRecordIndexNV", EOpHitObjectGetShaderBindingTableRecordIndexNV); + symbolTable.relateToOperator("hitObjectGetShaderRecordBufferHandleNV", EOpHitObjectGetShaderRecordBufferHandleNV); + symbolTable.relateToOperator("reorderThreadNV", EOpReorderThreadNV); } break; case EShLangIntersect: if (profile != EEsProfile && version >= 460) { symbolTable.relateToOperator("reportIntersectionNV", EOpReportIntersection); symbolTable.relateToOperator("reportIntersectionEXT", EOpReportIntersection); - } + } break; case EShLangAnyHit: if (profile != EEsProfile && version >= 460) { @@ -9886,6 +10177,12 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion if (profile != EEsProfile && version >= 450) { symbolTable.relateToOperator("SetMeshOutputsEXT", EOpSetMeshOutputsEXT); } + + if (profile != EEsProfile && version >= 460) { + // Builtins for GL_NV_displacement_micromap. + symbolTable.relateToOperator("fetchMicroTriangleVertexPositionNV", EOpFetchMicroTriangleVertexPositionNV); + symbolTable.relateToOperator("fetchMicroTriangleVertexBarycentricNV", EOpFetchMicroTriangleVertexBarycentricNV); + } break; case EShLangTask: if ((profile != EEsProfile && version >= 450) || (profile == EEsProfile && version >= 320)) { @@ -9901,7 +10198,6 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion default: assert(false && "Language not supported"); } -#endif // !GLSLANG_WEB } // @@ -9915,7 +10211,6 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion // void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion& spvVersion, EShLanguage language, TSymbolTable& symbolTable, const TBuiltInResource &resources) { -#ifndef GLSLANG_WEB if (profile != EEsProfile && version >= 430 && version < 440) { symbolTable.setVariableExtensions("gl_MaxTransformFeedbackBuffers", 1, &E_GL_ARB_enhanced_layouts); symbolTable.setVariableExtensions("gl_MaxTransformFeedbackInterleavedComponents", 1, &E_GL_ARB_enhanced_layouts); @@ -9987,7 +10282,6 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion default: break; } -#endif } } // end namespace glslang diff --git a/glslang/MachineIndependent/Initialize.h b/glslang/MachineIndependent/Initialize.h index ac8ec33e..42c32ddb 100755 --- a/glslang/MachineIndependent/Initialize.h +++ b/glslang/MachineIndependent/Initialize.h @@ -107,6 +107,9 @@ protected: int dimMap[EsdNumDims]; }; +// change this back to false if depending on textual spellings of texturing calls when consuming the AST +// Using PureOperatorBuiltins=false is deprecated. +constexpr bool PureOperatorBuiltins = true; } // end namespace glslang #endif // _INITIALIZE_INCLUDED_ diff --git a/glslang/MachineIndependent/Intermediate.cpp b/glslang/MachineIndependent/Intermediate.cpp index 5adf19d6..ae62f196 100755 --- a/glslang/MachineIndependent/Intermediate.cpp +++ b/glslang/MachineIndependent/Intermediate.cpp @@ -388,7 +388,6 @@ TIntermTyped* TIntermediate::addUnaryMath(TOperator op, TIntermTyped* child, case EOpConstructFloat: newType = EbtFloat; break; case EOpConstructInt: newType = EbtInt; break; case EOpConstructUint: newType = EbtUint; break; -#ifndef GLSLANG_WEB case EOpConstructInt8: newType = EbtInt8; break; case EOpConstructUint8: newType = EbtUint8; break; case EOpConstructInt16: newType = EbtInt16; break; @@ -397,7 +396,6 @@ TIntermTyped* TIntermediate::addUnaryMath(TOperator op, TIntermTyped* child, case EOpConstructUint64: newType = EbtUint64; break; case EOpConstructDouble: newType = EbtDouble; break; case EOpConstructFloat16: newType = EbtFloat16; break; -#endif default: break; // some compilers want this } @@ -569,7 +567,6 @@ bool TIntermediate::isConversionAllowed(TOperator op, TIntermTyped* node) const bool TIntermediate::buildConvertOp(TBasicType dst, TBasicType src, TOperator& newOp) const { switch (dst) { -#ifndef GLSLANG_WEB case EbtDouble: switch (src) { case EbtUint: newOp = EOpConvUintToDouble; break; @@ -587,13 +584,11 @@ bool TIntermediate::buildConvertOp(TBasicType dst, TBasicType src, TOperator& ne return false; } break; -#endif case EbtFloat: switch (src) { case EbtInt: newOp = EOpConvIntToFloat; break; case EbtUint: newOp = EOpConvUintToFloat; break; case EbtBool: newOp = EOpConvBoolToFloat; break; -#ifndef GLSLANG_WEB case EbtDouble: newOp = EOpConvDoubleToFloat; break; case EbtInt8: newOp = EOpConvInt8ToFloat; break; case EbtUint8: newOp = EOpConvUint8ToFloat; break; @@ -602,12 +597,10 @@ bool TIntermediate::buildConvertOp(TBasicType dst, TBasicType src, TOperator& ne case EbtFloat16: newOp = EOpConvFloat16ToFloat; break; case EbtInt64: newOp = EOpConvInt64ToFloat; break; case EbtUint64: newOp = EOpConvUint64ToFloat; break; -#endif default: return false; } break; -#ifndef GLSLANG_WEB case EbtFloat16: switch (src) { case EbtInt8: newOp = EOpConvInt8ToFloat16; break; @@ -625,13 +618,11 @@ bool TIntermediate::buildConvertOp(TBasicType dst, TBasicType src, TOperator& ne return false; } break; -#endif case EbtBool: switch (src) { case EbtInt: newOp = EOpConvIntToBool; break; case EbtUint: newOp = EOpConvUintToBool; break; case EbtFloat: newOp = EOpConvFloatToBool; break; -#ifndef GLSLANG_WEB case EbtDouble: newOp = EOpConvDoubleToBool; break; case EbtInt8: newOp = EOpConvInt8ToBool; break; case EbtUint8: newOp = EOpConvUint8ToBool; break; @@ -640,12 +631,10 @@ bool TIntermediate::buildConvertOp(TBasicType dst, TBasicType src, TOperator& ne case EbtFloat16: newOp = EOpConvFloat16ToBool; break; case EbtInt64: newOp = EOpConvInt64ToBool; break; case EbtUint64: newOp = EOpConvUint64ToBool; break; -#endif default: return false; } break; -#ifndef GLSLANG_WEB case EbtInt8: switch (src) { case EbtUint8: newOp = EOpConvUint8ToInt8; break; @@ -715,14 +704,12 @@ bool TIntermediate::buildConvertOp(TBasicType dst, TBasicType src, TOperator& ne return false; } break; -#endif case EbtInt: switch (src) { case EbtUint: newOp = EOpConvUintToInt; break; case EbtBool: newOp = EOpConvBoolToInt; break; case EbtFloat: newOp = EOpConvFloatToInt; break; -#ifndef GLSLANG_WEB case EbtInt8: newOp = EOpConvInt8ToInt; break; case EbtUint8: newOp = EOpConvUint8ToInt; break; case EbtInt16: newOp = EOpConvInt16ToInt; break; @@ -731,7 +718,6 @@ bool TIntermediate::buildConvertOp(TBasicType dst, TBasicType src, TOperator& ne case EbtFloat16: newOp = EOpConvFloat16ToInt; break; case EbtInt64: newOp = EOpConvInt64ToInt; break; case EbtUint64: newOp = EOpConvUint64ToInt; break; -#endif default: return false; } @@ -741,7 +727,6 @@ bool TIntermediate::buildConvertOp(TBasicType dst, TBasicType src, TOperator& ne case EbtInt: newOp = EOpConvIntToUint; break; case EbtBool: newOp = EOpConvBoolToUint; break; case EbtFloat: newOp = EOpConvFloatToUint; break; -#ifndef GLSLANG_WEB case EbtInt8: newOp = EOpConvInt8ToUint; break; case EbtUint8: newOp = EOpConvUint8ToUint; break; case EbtInt16: newOp = EOpConvInt16ToUint; break; @@ -750,12 +735,15 @@ bool TIntermediate::buildConvertOp(TBasicType dst, TBasicType src, TOperator& ne case EbtFloat16: newOp = EOpConvFloat16ToUint; break; case EbtInt64: newOp = EOpConvInt64ToUint; break; case EbtUint64: newOp = EOpConvUint64ToUint; break; -#endif + // For bindless texture type conversion, add a dummy convert op, just + // to generate a new TIntermTyped + // uvec2(any sampler type) + // uvec2(any image type) + case EbtSampler: newOp = EOpConvIntToUint; break; default: return false; } break; -#ifndef GLSLANG_WEB case EbtInt64: switch (src) { case EbtInt8: newOp = EOpConvInt8ToInt64; break; @@ -790,7 +778,6 @@ bool TIntermediate::buildConvertOp(TBasicType dst, TBasicType src, TOperator& ne return false; } break; -#endif default: return false; } @@ -806,7 +793,6 @@ TIntermTyped* TIntermediate::createConversion(TBasicType convertTo, TIntermTyped // Add a new newNode for the conversion. // -#ifndef GLSLANG_WEB bool convertToIntTypes = (convertTo == EbtInt8 || convertTo == EbtUint8 || convertTo == EbtInt16 || convertTo == EbtUint16 || convertTo == EbtInt || convertTo == EbtUint || @@ -843,7 +829,6 @@ TIntermTyped* TIntermediate::createConversion(TBasicType convertTo, TIntermTyped return nullptr; } } -#endif TIntermUnary* newNode = nullptr; TOperator newOp = EOpNull; @@ -855,13 +840,11 @@ TIntermTyped* TIntermediate::createConversion(TBasicType convertTo, TIntermTyped newNode = addUnaryNode(newOp, node, node->getLoc(), newType); if (node->getAsConstantUnion()) { -#ifndef GLSLANG_WEB // 8/16-bit storage extensions don't support 8/16-bit constants, so don't fold conversions // to those types if ((getArithemeticInt8Enabled() || !(convertTo == EbtInt8 || convertTo == EbtUint8)) && (getArithemeticInt16Enabled() || !(convertTo == EbtInt16 || convertTo == EbtUint16)) && (getArithemeticFloat16Enabled() || !(convertTo == EbtFloat16))) -#endif { TIntermTyped* folded = node->getAsConstantUnion()->fold(newOp, newType); if (folded) @@ -1044,6 +1027,12 @@ TIntermTyped* TIntermediate::addConversion(TOperator op, const TType& type, TInt if (type.isArray() || node->getType().isArray()) return nullptr; + // Reject implicit conversions to cooperative matrix types + if (node->getType().isCoopMat() && + op != EOpConstructCooperativeMatrixNV && + op != EOpConstructCooperativeMatrixKHR) + return nullptr; + // Note: callers are responsible for other aspects of shape, // like vector and matrix sizes. @@ -1055,7 +1044,6 @@ TIntermTyped* TIntermediate::addConversion(TOperator op, const TType& type, TInt case EOpConstructFloat: case EOpConstructInt: case EOpConstructUint: -#ifndef GLSLANG_WEB case EOpConstructDouble: case EOpConstructFloat16: case EOpConstructInt8: @@ -1066,8 +1054,6 @@ TIntermTyped* TIntermediate::addConversion(TOperator op, const TType& type, TInt case EOpConstructUint64: break; -#endif - // // Implicit conversions // @@ -1112,7 +1098,8 @@ TIntermTyped* TIntermediate::addConversion(TOperator op, const TType& type, TInt case EOpSequence: case EOpConstructStruct: - case EOpConstructCooperativeMatrix: + case EOpConstructCooperativeMatrixNV: + case EOpConstructCooperativeMatrixKHR: if (type.isReference() || node->getType().isReference()) { // types must match to assign a reference @@ -1154,7 +1141,6 @@ TIntermTyped* TIntermediate::addConversion(TOperator op, const TType& type, TInt } bool canPromoteConstant = true; -#ifndef GLSLANG_WEB // GL_EXT_shader_16bit_storage can't do OpConstantComposite with // 16-bit types, so disable promotion for those types. // Many issues with this, from JohnK: @@ -1182,7 +1168,6 @@ TIntermTyped* TIntermediate::addConversion(TOperator op, const TType& type, TInt default: break; } -#endif if (canPromoteConstant && node->getAsConstantUnion()) return promoteConstantUnion(type.getBasicType(), node->getAsConstantUnion()); @@ -1479,10 +1464,6 @@ bool TIntermediate::isFPPromotion(TBasicType from, TBasicType to) const bool TIntermediate::isIntegralConversion(TBasicType from, TBasicType to) const { -#ifdef GLSLANG_WEB - return false; -#endif - switch (from) { case EbtInt: switch(to) { @@ -1563,10 +1544,6 @@ bool TIntermediate::isIntegralConversion(TBasicType from, TBasicType to) const bool TIntermediate::isFPConversion(TBasicType from, TBasicType to) const { -#ifdef GLSLANG_WEB - return false; -#endif - if (to == EbtFloat && from == EbtFloat16) { return true; } else { @@ -1587,7 +1564,6 @@ bool TIntermediate::isFPIntegralConversion(TBasicType from, TBasicType to) const break; } break; -#ifndef GLSLANG_WEB case EbtInt8: case EbtUint8: case EbtInt16: @@ -1607,7 +1583,6 @@ bool TIntermediate::isFPIntegralConversion(TBasicType from, TBasicType to) const return true; } break; -#endif default: break; } @@ -1809,10 +1784,6 @@ bool TIntermediate::canImplicitlyPromote(TBasicType from, TBasicType to, TOperat static bool canSignedIntTypeRepresentAllUnsignedValues(TBasicType sintType, TBasicType uintType) { -#ifdef GLSLANG_WEB - return false; -#endif - switch(sintType) { case EbtInt8: switch(uintType) { @@ -1873,11 +1844,6 @@ static bool canSignedIntTypeRepresentAllUnsignedValues(TBasicType sintType, TBas static TBasicType getCorrespondingUnsignedType(TBasicType type) { -#ifdef GLSLANG_WEB - assert(type == EbtInt); - return EbtUint; -#endif - switch(type) { case EbtInt8: return EbtUint8; @@ -2003,8 +1969,11 @@ TOperator TIntermediate::mapTypeToConstructorOp(const TType& type) const if (type.getQualifier().isNonUniform()) return EOpConstructNonuniform; - if (type.isCoopMat()) - return EOpConstructCooperativeMatrix; + if (type.isCoopMatNV()) + return EOpConstructCooperativeMatrixNV; + + if (type.isCoopMatKHR()) + return EOpConstructCooperativeMatrixKHR; switch (type.getBasicType()) { case EbtStruct: @@ -2167,7 +2136,6 @@ TOperator TIntermediate::mapTypeToConstructorOp(const TType& type) const } } break; -#ifndef GLSLANG_WEB case EbtDouble: if (type.getMatrixCols()) { switch (type.getMatrixCols()) { @@ -2306,7 +2274,6 @@ TOperator TIntermediate::mapTypeToConstructorOp(const TType& type) const case EbtAccStruct: op = EOpConstructAccStruct; break; -#endif default: break; } @@ -2350,6 +2317,40 @@ TIntermAggregate* TIntermediate::growAggregate(TIntermNode* left, TIntermNode* r return aggNode; } +TIntermAggregate* TIntermediate::mergeAggregate(TIntermNode* left, TIntermNode* right) +{ + if (left == nullptr && right == nullptr) + return nullptr; + + TIntermAggregate* aggNode = nullptr; + if (left != nullptr) + aggNode = left->getAsAggregate(); + if (aggNode == nullptr || aggNode->getOp() != EOpNull) { + aggNode = new TIntermAggregate; + if (left != nullptr) + aggNode->getSequence().push_back(left); + } + + TIntermAggregate* rhsagg = right->getAsAggregate(); + if (rhsagg == nullptr || rhsagg->getOp() != EOpNull) + aggNode->getSequence().push_back(right); + else + aggNode->getSequence().insert(aggNode->getSequence().end(), + rhsagg->getSequence().begin(), + rhsagg->getSequence().end()); + + return aggNode; +} + +TIntermAggregate* TIntermediate::mergeAggregate(TIntermNode* left, TIntermNode* right, const TSourceLoc& loc) +{ + TIntermAggregate* aggNode = mergeAggregate(left, right); + if (aggNode) + aggNode->setLoc(loc); + + return aggNode; +} + // // Turn an existing node into an aggregate. // @@ -2623,6 +2624,18 @@ TIntermConstantUnion* TIntermediate::addConstantUnion(double d, TBasicType baseT { assert(baseType == EbtFloat || baseType == EbtDouble || baseType == EbtFloat16); + if (isEsProfile() && (baseType == EbtFloat || baseType == EbtFloat16)) { + int exponent = 0; + frexp(d, &exponent); + int minExp = baseType == EbtFloat ? -126 : -14; + int maxExp = baseType == EbtFloat ? 127 : 15; + if (exponent > maxExp) { //overflow, d = inf + d = std::numeric_limits::infinity(); + } else if (exponent < minExp) { //underflow, d = 0.0; + d = 0.0; + } + } + TConstUnionArray unionArray(1); unionArray[0].setDConst(d); @@ -2680,28 +2693,42 @@ TIntermTyped* TIntermediate::addSwizzle(TSwizzleSelectors& selecto // 'swizzleOkay' says whether or not it is okay to consider a swizzle // a valid part of the dereference chain. // -// 'BufferReferenceOk' says if type is buffer_reference, the routine stop to find the most left node. +// 'bufferReferenceOk' says if type is buffer_reference, the routine will stop to find the most left node. // +// 'proc' is an optional function to run on each node that is processed during the traversal. 'proc' must +// return true to continue the traversal, or false to end the traversal early. // -const TIntermTyped* TIntermediate::findLValueBase(const TIntermTyped* node, bool swizzleOkay , bool bufferReferenceOk) +const TIntermTyped* TIntermediate::traverseLValueBase(const TIntermTyped* node, bool swizzleOkay, + bool bufferReferenceOk, + std::function proc) { do { const TIntermBinary* binary = node->getAsBinaryNode(); - if (binary == nullptr) + if (binary == nullptr) { + if (proc) { + proc(*node); + } return node; + } TOperator op = binary->getOp(); - if (op != EOpIndexDirect && op != EOpIndexIndirect && op != EOpIndexDirectStruct && op != EOpVectorSwizzle && op != EOpMatrixSwizzle) + if (op != EOpIndexDirect && op != EOpIndexIndirect && op != EOpIndexDirectStruct && op != EOpVectorSwizzle && + op != EOpMatrixSwizzle) return nullptr; - if (! swizzleOkay) { + if (!swizzleOkay) { if (op == EOpVectorSwizzle || op == EOpMatrixSwizzle) return nullptr; if ((op == EOpIndexDirect || op == EOpIndexIndirect) && (binary->getLeft()->getType().isVector() || binary->getLeft()->getType().isScalar()) && - ! binary->getLeft()->getType().isArray()) + !binary->getLeft()->getType().isArray()) return nullptr; } - node = node->getAsBinaryNode()->getLeft(); + if (proc) { + if (!proc(*node)) { + return node; + } + } + node = binary->getLeft(); if (bufferReferenceOk && node->isReference()) return node; } while (true); @@ -2787,7 +2814,6 @@ bool TIntermediate::postProcess(TIntermNode* root, EShLanguage /*language*/) if (aggRoot && aggRoot->getOp() == EOpNull) aggRoot->setOperator(EOpSequence); -#ifndef GLSLANG_WEB // Propagate 'noContraction' label in backward from 'precise' variables. glslang::PropagateNoContraction(*this); @@ -2801,7 +2827,6 @@ bool TIntermediate::postProcess(TIntermNode* root, EShLanguage /*language*/) assert(0); break; } -#endif return true; } @@ -2830,10 +2855,9 @@ void TIntermediate::addSymbolLinkageNodes(TIntermAggregate*& linkage, EShLanguag //} if (language == EShLangVertex) { - // the names won't be found in the symbol table unless the versions are right, - // so version logic does not need to be repeated here addSymbolLinkageNode(linkage, symbolTable, "gl_VertexID"); - addSymbolLinkageNode(linkage, symbolTable, "gl_InstanceID"); + if ((version < 140 && requestedExtensions.find(E_GL_EXT_draw_instanced) != requestedExtensions.end()) || version >= 140) + addSymbolLinkageNode(linkage, symbolTable, "gl_InstanceID"); } // Add a child to the root node for the linker objects @@ -3521,20 +3545,28 @@ bool TIntermediate::promoteBinary(TIntermBinary& node) } if (left->getType().isCoopMat() || right->getType().isCoopMat()) { + // Operations on two cooperative matrices must have identical types if (left->getType().isCoopMat() && right->getType().isCoopMat() && - *left->getType().getTypeParameters() != *right->getType().getTypeParameters()) { + left->getType() != right->getType()) { return false; } switch (op) { case EOpMul: case EOpMulAssign: - if (left->getType().isCoopMat() && right->getType().isCoopMat()) { + // Mul not supported in NV_cooperative_matrix + if (left->getType().isCoopMatNV() && right->getType().isCoopMatNV()) { return false; } - if (op == EOpMulAssign && right->getType().isCoopMat()) { + // NV_cooperative_matrix supports MulAssign is for mat*=scalar only. + // KHR_cooperative_matrix supports it for mat*=mat as well. + if (op == EOpMulAssign && right->getType().isCoopMatNV()) { return false; } - node.setOp(op == EOpMulAssign ? EOpMatrixTimesScalarAssign : EOpMatrixTimesScalar); + // Use MatrixTimesScalar if either operand is not a matrix. Otherwise use Mul. + if (!left->getType().isCoopMat() || !right->getType().isCoopMat()) { + node.setOp(op == EOpMulAssign ? EOpMatrixTimesScalarAssign : EOpMatrixTimesScalar); + } + // In case of scalar*matrix, take the result type from the matrix. if (right->getType().isCoopMat()) { node.setType(right->getType()); } @@ -3887,16 +3919,6 @@ TIntermTyped* TIntermediate::promoteConstantUnion(TBasicType promoteTo, TIntermC #define PROMOTE(Set, CType, Get) leftUnionArray[i].Set(static_cast(rightUnionArray[i].Get())) #define PROMOTE_TO_BOOL(Get) leftUnionArray[i].setBConst(rightUnionArray[i].Get() != 0) -#ifdef GLSLANG_WEB -#define TO_ALL(Get) \ - switch (promoteTo) { \ - case EbtFloat: PROMOTE(setDConst, double, Get); break; \ - case EbtInt: PROMOTE(setIConst, int, Get); break; \ - case EbtUint: PROMOTE(setUConst, unsigned int, Get); break; \ - case EbtBool: PROMOTE_TO_BOOL(Get); break; \ - default: return node; \ - } -#else #define TO_ALL(Get) \ switch (promoteTo) { \ case EbtFloat16: PROMOTE(setDConst, double, Get); break; \ @@ -3913,14 +3935,12 @@ TIntermTyped* TIntermediate::promoteConstantUnion(TBasicType promoteTo, TIntermC case EbtBool: PROMOTE_TO_BOOL(Get); break; \ default: return node; \ } -#endif switch (node->getType().getBasicType()) { case EbtFloat: TO_ALL(getDConst); break; case EbtInt: TO_ALL(getIConst); break; case EbtUint: TO_ALL(getUConst); break; case EbtBool: TO_ALL(getBConst); break; -#ifndef GLSLANG_WEB case EbtFloat16: TO_ALL(getDConst); break; case EbtDouble: TO_ALL(getDConst); break; case EbtInt8: TO_ALL(getI8Const); break; @@ -3929,7 +3949,6 @@ TIntermTyped* TIntermediate::promoteConstantUnion(TBasicType promoteTo, TIntermC case EbtUint8: TO_ALL(getU8Const); break; case EbtUint16: TO_ALL(getU16Const); break; case EbtUint64: TO_ALL(getU64Const); break; -#endif default: return node; } } diff --git a/glslang/MachineIndependent/ParseContextBase.cpp b/glslang/MachineIndependent/ParseContextBase.cpp index 616580f9..8e8bcd88 100755 --- a/glslang/MachineIndependent/ParseContextBase.cpp +++ b/glslang/MachineIndependent/ParseContextBase.cpp @@ -67,8 +67,6 @@ void TParseContextBase::outputMessage(const TSourceLoc& loc, const char* szReaso } } -#if !defined(GLSLANG_WEB) || defined(GLSLANG_WEB_DEVEL) - void C_DECL TParseContextBase::error(const TSourceLoc& loc, const char* szReason, const char* szToken, const char* szExtraInfoFormat, ...) { @@ -118,8 +116,6 @@ void C_DECL TParseContextBase::ppWarn(const TSourceLoc& loc, const char* szReaso va_end(args); } -#endif - // // Both test and if necessary, spit out an error, to see if the node is really // an l-value that can be operated on this way. @@ -140,7 +136,6 @@ bool TParseContextBase::lValueErrorCheck(const TSourceLoc& loc, const char* op, case EvqConst: message = "can't modify a const"; break; case EvqConstReadOnly: message = "can't modify a const"; break; case EvqUniform: message = "can't modify a uniform"; break; -#ifndef GLSLANG_WEB case EvqBuffer: if (node->getQualifier().isReadOnly()) message = "can't modify a readonly buffer"; @@ -151,7 +146,6 @@ bool TParseContextBase::lValueErrorCheck(const TSourceLoc& loc, const char* op, if (language != EShLangIntersect) message = "cannot modify hitAttributeNV in this stage"; break; -#endif default: // @@ -159,12 +153,12 @@ bool TParseContextBase::lValueErrorCheck(const TSourceLoc& loc, const char* op, // switch (node->getBasicType()) { case EbtSampler: - message = "can't modify a sampler"; + if (extensionTurnedOn(E_GL_ARB_bindless_texture) == false) + message = "can't modify a sampler"; break; case EbtVoid: message = "can't modify void"; break; -#ifndef GLSLANG_WEB case EbtAtomicUint: message = "can't modify an atomic_uint"; break; @@ -174,7 +168,9 @@ bool TParseContextBase::lValueErrorCheck(const TSourceLoc& loc, const char* op, case EbtRayQuery: message = "can't modify rayQueryEXT"; break; -#endif + case EbtHitObjectNV: + message = "can't modify hitObjectNV"; + break; default: break; } @@ -212,7 +208,7 @@ bool TParseContextBase::lValueErrorCheck(const TSourceLoc& loc, const char* op, // // If we get here, we have an error and a message. // - const TIntermTyped* leftMostTypeNode = TIntermediate::findLValueBase(node, true); + const TIntermTyped* leftMostTypeNode = TIntermediate::traverseLValueBase(node, true); if (symNode) error(loc, " l-value required", op, "\"%s\" (%s)", symbol, message); @@ -231,14 +227,14 @@ bool TParseContextBase::lValueErrorCheck(const TSourceLoc& loc, const char* op, // Test for and give an error if the node can't be read from. void TParseContextBase::rValueErrorCheck(const TSourceLoc& loc, const char* op, TIntermTyped* node) { - TIntermBinary* binaryNode = node->getAsBinaryNode(); - const TIntermSymbol* symNode = node->getAsSymbolNode(); - if (! node) return; + TIntermBinary* binaryNode = node->getAsBinaryNode(); + const TIntermSymbol* symNode = node->getAsSymbolNode(); + if (node->getQualifier().isWriteOnly()) { - const TIntermTyped* leftMostTypeNode = TIntermediate::findLValueBase(node, true); + const TIntermTyped* leftMostTypeNode = TIntermediate::traverseLValueBase(node, true); if (symNode != nullptr) error(loc, "can't read from writeonly object: ", op, symNode->getName().c_str()); @@ -630,10 +626,8 @@ void TParseContextBase::growGlobalUniformBlock(const TSourceLoc& loc, TType& mem 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()); + err += "Redeclaration: already declared as \"" + symbol->getType().getCompleteString() + "\""; + error(loc, "", memberName.c_str(), err.c_str()); } return; } @@ -728,6 +722,24 @@ void TParseContextBase::finish() if (parsingBuiltins) return; + for (const TString& relaxedSymbol : relaxedSymbols) + { + TSymbol* symbol = symbolTable.find(relaxedSymbol); + TType& type = symbol->getWritableType(); + for (const TTypeLoc& typeLoc : *type.getStruct()) + { + if (typeLoc.type->isOpaque()) + { + typeLoc.type->getSampler() = TSampler{}; + typeLoc.type->setBasicType(EbtInt); + TString fieldName("/*"); + fieldName.append(typeLoc.type->getFieldName()); + fieldName.append("*/"); + typeLoc.type->setFieldName(fieldName); + } + } + } + // Transfer the linkage symbols to AST nodes, preserving order. TIntermAggregate* linkage = new TIntermAggregate; for (auto i = linkageSymbols.begin(); i != linkageSymbols.end(); ++i) diff --git a/glslang/MachineIndependent/ParseHelper.cpp b/glslang/MachineIndependent/ParseHelper.cpp index ff76cada..d9cb640b 100755 --- a/glslang/MachineIndependent/ParseHelper.cpp +++ b/glslang/MachineIndependent/ParseHelper.cpp @@ -38,6 +38,7 @@ // #include "ParseHelper.h" +#include "Initialize.h" #include "Scan.h" #include "../OSDependent/osinclude.h" @@ -57,11 +58,8 @@ TParseContext::TParseContext(TSymbolTable& symbolTable, TIntermediate& interm, b infoSink, forwardCompatible, messages, entryPoint), inMain(false), blockName(nullptr), - limits(resources.limits) -#ifndef GLSLANG_WEB - , + limits(resources.limits), atomicUintOffsets(nullptr), anyIndexLimits(false) -#endif { // decide whether precision qualifiers should be ignored or respected if (isEsProfile() || spvVersion.vulkan > 0) { @@ -80,10 +78,6 @@ TParseContext::TParseContext(TSymbolTable& symbolTable, TIntermediate& interm, b globalBufferDefaults.layoutMatrix = ElmColumnMajor; globalBufferDefaults.layoutPacking = spvVersion.spv != 0 ? ElpStd430 : ElpShared; - // use storage buffer on SPIR-V 1.3 and up - if (spvVersion.spv >= EShTargetSpv_1_3) - intermediate.setUseStorageBuffer(); - globalInputDefaults.clear(); globalOutputDefaults.clear(); @@ -91,7 +85,6 @@ TParseContext::TParseContext(TSymbolTable& symbolTable, TIntermediate& interm, b globalSharedDefaults.layoutMatrix = ElmColumnMajor; globalSharedDefaults.layoutPacking = ElpStd430; -#ifndef GLSLANG_WEB // "Shaders in the transform // feedback capturing mode have an initial global default of // layout(xfb_buffer = 0) out;" @@ -103,7 +96,6 @@ TParseContext::TParseContext(TSymbolTable& symbolTable, TIntermediate& interm, b if (language == EShLangGeometry) globalOutputDefaults.layoutStream = 0; -#endif if (entryPoint != nullptr && entryPoint->size() > 0 && *entryPoint != "main") infoSink.info.message(EPrefixError, "Source entry point must be \"main\""); @@ -111,9 +103,7 @@ TParseContext::TParseContext(TSymbolTable& symbolTable, TIntermediate& interm, b TParseContext::~TParseContext() { -#ifndef GLSLANG_WEB delete [] atomicUintOffsets; -#endif } // Set up all default precisions as needed by the current environment. @@ -177,7 +167,6 @@ void TParseContext::setLimits(const TBuiltInResource& r) resources = r; intermediate.setLimits(r); -#ifndef GLSLANG_WEB anyIndexLimits = ! limits.generalAttributeMatrixVectorIndexing || ! limits.generalConstantMatrixVectorIndexing || ! limits.generalSamplerIndexing || @@ -192,7 +181,6 @@ void TParseContext::setLimits(const TBuiltInResource& r) atomicUintOffsets = new int[resources.maxAtomicCounterBindings]; for (int b = 0; b < resources.maxAtomicCounterBindings; ++b) atomicUintOffsets[b] = 0; -#endif } // @@ -339,7 +327,6 @@ void TParseContext::setInvariant(const TSourceLoc& loc, const char* builtin) { void TParseContext::handlePragma(const TSourceLoc& loc, const TVector& tokens) { -#ifndef GLSLANG_WEB if (pragmaCallback) pragmaCallback(loc.line, tokens); @@ -441,7 +428,6 @@ void TParseContext::handlePragma(const TSourceLoc& loc, const TVector& setInvariant(loc, "gl_FragColor"); setInvariant(loc, "gl_FragData"); } -#endif } // @@ -455,7 +441,6 @@ TIntermTyped* TParseContext::handleVariable(const TSourceLoc& loc, TSymbol* symb if (symbol && symbol->getNumExtensions()) requireExtensions(loc, symbol->getNumExtensions(), symbol->getExtensions(), symbol->getName().c_str()); -#ifndef GLSLANG_WEB if (symbol && symbol->isReadOnly()) { // All shared things containing an unsized array must be copied up // on first use, so that all future references will share its array structure, @@ -475,7 +460,6 @@ TIntermTyped* TParseContext::handleVariable(const TSourceLoc& loc, TSymbol* symb makeEditable(symbol); } } -#endif const TVariable* variable; const TAnonMember* anon = symbol ? symbol->getAsAnonMember() : nullptr; @@ -580,7 +564,6 @@ TIntermTyped* TParseContext::handleBracketDereference(const TSourceLoc& loc, TIn // at least one of base and index is not a front-end constant variable... TIntermTyped* result = nullptr; -#ifndef GLSLANG_WEB if (base->isReference() && ! base->isArray()) { requireExtensions(loc, 1, &E_GL_EXT_buffer_reference2, "buffer reference indexing"); if (base->getType().getReferentType()->containsUnsizedArray()) { @@ -599,15 +582,22 @@ TIntermTyped* TParseContext::handleBracketDereference(const TSourceLoc& loc, TIn } if (base->getAsSymbolNode() && isIoResizeArray(base->getType())) handleIoResizeArrayAccess(loc, base); -#endif if (index->getQualifier().isFrontEndConstant()) checkIndex(loc, base->getType(), indexValue); if (index->getQualifier().isFrontEndConstant()) { -#ifndef GLSLANG_WEB if (base->getType().isUnsizedArray()) { base->getWritableType().updateImplicitArraySize(indexValue + 1); + base->getWritableType().setImplicitlySized(true); + if (base->getQualifier().builtIn == EbvClipDistance && + indexValue >= resources.maxClipDistances) { + error(loc, "gl_ClipDistance", "[", "array index out of range '%d'", indexValue); + } + else if (base->getQualifier().builtIn == EbvCullDistance && + indexValue >= resources.maxCullDistances) { + error(loc, "gl_CullDistance", "[", "array index out of range '%d'", indexValue); + } // For 2D per-view builtin arrays, update the inner dimension size in parent type if (base->getQualifier().isPerView() && base->getQualifier().builtIn != EbvNone) { TIntermBinary* binaryNode = base->getAsBinaryNode(); @@ -619,11 +609,9 @@ TIntermTyped* TParseContext::handleBracketDereference(const TSourceLoc& loc, TIn } } } else -#endif checkIndex(loc, base->getType(), indexValue); result = intermediate.addIndex(EOpIndexDirect, base, index, loc); } else { -#ifndef GLSLANG_WEB if (base->getType().isUnsizedArray()) { // we have a variable index into an unsized array, which is okay, // depending on the situation @@ -635,7 +623,6 @@ TIntermTyped* TParseContext::handleBracketDereference(const TSourceLoc& loc, TIn } base->getWritableType().setArrayVariablyIndexed(); } -#endif if (base->getBasicType() == EbtBlock) { if (base->getQualifier().storage == EvqBuffer) requireProfile(base->getLoc(), ~EEsProfile, "variable indexing buffer block array"); @@ -671,7 +658,6 @@ TIntermTyped* TParseContext::handleBracketDereference(const TSourceLoc& loc, TIn } result->setType(newType); -#ifndef GLSLANG_WEB inheritMemoryQualifiers(base->getQualifier(), result->getWritableType().getQualifier()); // Propagate nonuniform @@ -680,13 +666,10 @@ TIntermTyped* TParseContext::handleBracketDereference(const TSourceLoc& loc, TIn if (anyIndexLimits) handleIndexLimits(loc, base, index); -#endif return result; } -#ifndef GLSLANG_WEB - // for ES 2.0 (version 100) limitations for almost all index operations except vertex-shader uniforms void TParseContext::handleIndexLimits(const TSourceLoc& /*loc*/, TIntermTyped* base, TIntermTyped* index) { @@ -880,8 +863,6 @@ void TParseContext::checkIoArrayConsistency(const TSourceLoc& loc, int requiredS } } -#endif // GLSLANG_WEB - // Handle seeing a binary node with a math operation. // Returns nullptr if not semantically allowed. TIntermTyped* TParseContext::handleBinaryMath(const TSourceLoc& loc, const char* str, TOperator op, TIntermTyped* left, TIntermTyped* right) @@ -1012,28 +993,44 @@ TIntermTyped* TParseContext::handleDotDereference(const TSourceLoc& loc, TInterm break; } } + if (fieldFound) { - if (base->getType().getQualifier().isFrontEndConstant()) - result = intermediate.foldDereference(base, member, loc); - else { - blockMemberExtensionCheck(loc, base, member, field); - TIntermTyped* index = intermediate.addConstantUnion(member, loc); - result = intermediate.addIndex(EOpIndexDirectStruct, base, index, loc); - result->setType(*(*fields)[member].type); - if ((*fields)[member].type->getQualifier().isIo()) - intermediate.addIoAccessed(field); + if (spvVersion.vulkan != 0 && spvVersion.vulkanRelaxed) + result = vkRelaxedRemapDotDereference(loc, *base, *(*fields)[member].type, field); + + if (result == base) + { + if (base->getType().getQualifier().isFrontEndConstant()) + result = intermediate.foldDereference(base, member, loc); + else { + blockMemberExtensionCheck(loc, base, member, field); + TIntermTyped* index = intermediate.addConstantUnion(member, loc); + result = intermediate.addIndex(EOpIndexDirectStruct, base, index, loc); + result->setType(*(*fields)[member].type); + if ((*fields)[member].type->getQualifier().isIo()) + 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()); + while (baseSymbol->getAsSymbolNode() == nullptr) { + auto binaryNode = baseSymbol->getAsBinaryNode(); + if (binaryNode == nullptr) break; + baseSymbol = binaryNode->getLeft(); + } + if (baseSymbol->getAsSymbolNode() != nullptr) { + 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(intermediate.getEnhancedMsgs()).c_str()); // Propagate noContraction up the dereference chain if (base->getQualifier().isNoContraction()) @@ -1152,7 +1149,6 @@ TFunction* TParseContext::handleFunctionDeclarator(const TSourceLoc& loc, TFunct TSymbol* symbol = symbolTable.find(function.getMangledName(), &builtIn); if (symbol && symbol->getAsFunction() && builtIn) requireProfile(loc, ~EEsProfile, "redefinition of built-in function"); -#ifndef GLSLANG_WEB // Check the validity of using spirv_literal qualifier for (int i = 0; i < function.getParamCount(); ++i) { if (function[i].type->getQualifier().isSpirvLiteral() && function.getBuiltInOp() != EOpSpirvInst) @@ -1164,19 +1160,16 @@ TFunction* TParseContext::handleFunctionDeclarator(const TSourceLoc& loc, TFunct // respect this redeclared one. if (symbol && builtIn && function.getBuiltInOp() == EOpSpirvInst) symbol = nullptr; -#endif const TFunction* prevDec = symbol ? symbol->getAsFunction() : nullptr; if (prevDec) { if (prevDec->isPrototyped() && prototype) profileRequires(loc, EEsProfile, 300, nullptr, "multiple prototypes for same function"); if (prevDec->getType() != function.getType()) error(loc, "overloaded functions must have the same return type", function.getName().c_str(), ""); -#ifndef GLSLANG_WEB if (prevDec->getSpirvInstruction() != function.getSpirvInstruction()) { error(loc, "overloaded functions must have the same qualifiers", function.getName().c_str(), "spirv_instruction"); } -#endif for (int i = 0; i < prevDec->getParamCount(); ++i) { if ((*prevDec)[i].type->getQualifier().storage != function[i].type->getQualifier().storage) error(loc, "overloaded functions must have the same parameter storage qualifiers for argument", function[i].type->getStorageQualifierString(), "%d", i+1); @@ -1258,6 +1251,8 @@ TIntermAggregate* TParseContext::handleFunctionDefinition(const TSourceLoc& loc, error(loc, "function cannot take any parameter(s)", function.getName().c_str(), ""); if (function.getType().getBasicType() != EbtVoid) error(loc, "", function.getType().getBasicTypeString().c_str(), "entry point cannot return a value"); + if (function.getLinkType() != ELinkNone) + error(loc, "main function cannot be exported", "", ""); } // @@ -1294,6 +1289,7 @@ TIntermAggregate* TParseContext::handleFunctionDefinition(const TSourceLoc& loc, } else paramNodes = intermediate.growAggregate(paramNodes, intermediate.addSymbol(*param.type, loc), loc); } + paramNodes->setLinkType(function.getLinkType()); intermediate.setAggregateOperator(paramNodes, EOpParameters, TType(EbtVoid), loc); loopNestingLevel = 0; statementNestingLevel = 0; @@ -1378,7 +1374,6 @@ TIntermTyped* TParseContext::handleFunctionCall(const TSourceLoc& loc, TFunction if (lValueErrorCheck(arguments->getLoc(), "assign", arg->getAsTyped())) error(arguments->getLoc(), "Non-L-value cannot be passed for 'out' or 'inout' parameters.", "out", ""); } -#ifndef GLSLANG_WEB if (formalQualifier.isSpirvLiteral()) { if (!arg->getAsTyped()->getQualifier().isFrontEndConstant()) { error(arguments->getLoc(), @@ -1386,12 +1381,11 @@ TIntermTyped* TParseContext::handleFunctionCall(const TSourceLoc& loc, TFunction "spirv_literal", ""); } } -#endif const TType& argType = arg->getAsTyped()->getType(); const TQualifier& argQualifier = argType.getQualifier(); - if (argQualifier.isMemory() && (argType.containsOpaque() || argType.isReference())) { + bool containsBindlessSampler = intermediate.getBindlessMode() && argType.containsSampler(); + if (argQualifier.isMemory() && !containsBindlessSampler && (argType.containsOpaque() || argType.isReference())) { const char* message = "argument cannot drop memory qualifier when passed to formal parameter"; -#ifndef GLSLANG_WEB if (argQualifier.volatil && ! formalQualifier.volatil) error(arguments->getLoc(), message, "volatile", ""); if (argQualifier.coherent && ! (formalQualifier.devicecoherent || formalQualifier.coherent)) @@ -1411,7 +1405,6 @@ TIntermTyped* TParseContext::handleFunctionCall(const TSourceLoc& loc, TFunction // Don't check 'restrict', it is different than the rest: // "...but only restrict can be taken away from a calling argument, by a formal parameter that // lacks the restrict qualifier..." -#endif } if (!builtIn && argQualifier.getFormat() != formalQualifier.getFormat()) { // we have mismatched formats, which should only be allowed if writeonly @@ -1441,11 +1434,9 @@ TIntermTyped* TParseContext::handleFunctionCall(const TSourceLoc& loc, TFunction if (builtIn && fnCandidate->getBuiltInOp() != EOpNull) { // A function call mapped to a built-in operation. result = handleBuiltInFunctionCall(loc, arguments, *fnCandidate); -#ifndef GLSLANG_WEB } else if (fnCandidate->getBuiltInOp() == EOpSpirvInst) { // When SPIR-V instruction qualifier is specified, the function call is still mapped to a built-in operation. result = handleBuiltInFunctionCall(loc, arguments, *fnCandidate); -#endif } else { // This is a function call not mapped to built-in operator. // It could still be a built-in function, but only if PureOperatorBuiltins == false. @@ -1465,11 +1456,9 @@ TIntermTyped* TParseContext::handleFunctionCall(const TSourceLoc& loc, TFunction intermediate.addToCallGraph(infoSink, currentCaller, fnCandidate->getMangledName()); } -#ifndef GLSLANG_WEB if (builtIn) nonOpBuiltInCheck(loc, *fnCandidate, *call); else -#endif userFunctionCallCheck(loc, *call); } @@ -1487,7 +1476,8 @@ TIntermTyped* TParseContext::handleFunctionCall(const TSourceLoc& loc, TFunction if (result->getAsTyped()->getType().isCoopMat() && !result->getAsTyped()->getType().isParameterized()) { - assert(fnCandidate->getBuiltInOp() == EOpCooperativeMatrixMulAdd); + assert(fnCandidate->getBuiltInOp() == EOpCooperativeMatrixMulAdd || + fnCandidate->getBuiltInOp() == EOpCooperativeMatrixMulAddNV); result->setType(result->getAsAggregate()->getSequence()[2]->getAsTyped()->getType()); } @@ -1523,7 +1513,6 @@ TIntermTyped* TParseContext::handleBuiltInFunctionCall(TSourceLoc loc, TIntermNo } else if (result->getAsOperator()) builtInOpCheck(loc, function, *result->getAsOperator()); -#ifndef GLSLANG_WEB // Special handling for function call with SPIR-V instruction qualifier specified if (function.getBuiltInOp() == EOpSpirvInst) { if (auto agg = result->getAsAggregate()) { @@ -1550,7 +1539,6 @@ TIntermTyped* TParseContext::handleBuiltInFunctionCall(TSourceLoc loc, TIntermNo } else assert(0); } -#endif return result; } @@ -1653,9 +1641,7 @@ void TParseContext::computeBuiltinPrecisions(TIntermTyped& node, const TFunction TIntermNode* TParseContext::handleReturnValue(const TSourceLoc& loc, TIntermTyped* value) { -#ifndef GLSLANG_WEB storage16BitAssignmentCheck(loc, value->getType(), "return"); -#endif functionReturnsValue = true; TIntermBranch* branch = nullptr; @@ -1675,9 +1661,15 @@ TIntermNode* TParseContext::handleReturnValue(const TSourceLoc& loc, TIntermType error(loc, "type does not match, or is not convertible to, the function's return type", "return", ""); branch = intermediate.addBranch(EOpReturn, value, loc); } - } else + } else { + if (value->getType().isTexture() || value->getType().isImage()) { + if (spvVersion.spv != 0) + error(loc, "sampler or image cannot be used as return type when generating SPIR-V", "return", ""); + else if (!extensionTurnedOn(E_GL_ARB_bindless_texture)) + error(loc, "sampler or image can be used as return type only when the extension GL_ARB_bindless_texture enabled", "return", ""); + } branch = intermediate.addBranch(EOpReturn, value, loc); - + } branch->updatePrecision(currentFunctionType->getQualifier().precision); return branch; } @@ -1685,7 +1677,6 @@ TIntermNode* TParseContext::handleReturnValue(const TSourceLoc& loc, TIntermType // See if the operation is being done in an illegal location. void TParseContext::checkLocation(const TSourceLoc& loc, TOperator op) { -#ifndef GLSLANG_WEB switch (op) { case EOpBarrier: if (language == EShLangTessControl) { @@ -1738,7 +1729,6 @@ void TParseContext::checkLocation(const TSourceLoc& loc, TOperator op) default: break; } -#endif } // Finish processing object.length(). This started earlier in handleDotDereference(), where @@ -1756,7 +1746,6 @@ TIntermTyped* TParseContext::handleLengthMethod(const TSourceLoc& loc, TFunction const TType& type = intermNode->getAsTyped()->getType(); if (type.isArray()) { if (type.isUnsizedArray()) { -#ifndef GLSLANG_WEB if (intermNode->getAsSymbolNode() && isIoResizeArray(type)) { // We could be between a layout declaration that gives a built-in io array implicit size and // a user redeclaration of that array, meaning we have to substitute its implicit size here @@ -1768,16 +1757,13 @@ TIntermTyped* TParseContext::handleLengthMethod(const TSourceLoc& loc, TFunction length = getIoArrayImplicitSize(type.getQualifier()); } } -#endif if (length == 0) { -#ifndef GLSLANG_WEB if (intermNode->getAsSymbolNode() && isIoResizeArray(type)) error(loc, "", function->getName().c_str(), "array must first be sized by a redeclaration or layout qualifier"); else if (isRuntimeLength(*intermNode->getAsTyped())) { // Create a unary op and let the back end handle it return intermediate.addBuiltInFunctionCall(loc, EOpArrayLength, true, intermNode, TType(EbtInt)); } else -#endif error(loc, "", function->getName().c_str(), "array must be declared with a size before using this method"); } } else if (type.getOuterArrayNode()) { @@ -1810,7 +1796,6 @@ TIntermTyped* TParseContext::handleLengthMethod(const TSourceLoc& loc, TFunction // void TParseContext::addInputArgumentConversions(const TFunction& function, TIntermNode*& arguments) const { -#ifndef GLSLANG_WEB TIntermAggregate* aggregate = arguments->getAsAggregate(); // Process each argument's conversion @@ -1838,7 +1823,6 @@ void TParseContext::addInputArgumentConversions(const TFunction& function, TInte } } } -#endif } // @@ -1850,9 +1834,6 @@ void TParseContext::addInputArgumentConversions(const TFunction& function, TInte // TIntermTyped* TParseContext::addOutputArgumentConversions(const TFunction& function, TIntermAggregate& intermNode) const { -#ifdef GLSLANG_WEB - return &intermNode; -#else TIntermSequence& arguments = intermNode.getSequence(); // Will there be any output conversions? @@ -1920,7 +1901,6 @@ TIntermTyped* TParseContext::addOutputArgumentConversions(const TFunction& funct conversionTree = intermediate.setAggregateOperator(conversionTree, EOpComma, intermNode.getType(), intermNode.getLoc()); return conversionTree; -#endif } TIntermTyped* TParseContext::addAssign(const TSourceLoc& loc, TOperator op, TIntermTyped* left, TIntermTyped* right) @@ -1928,6 +1908,9 @@ TIntermTyped* TParseContext::addAssign(const TSourceLoc& loc, TOperator op, TInt if ((op == EOpAddAssign || op == EOpSubAssign) && left->isReference()) requireExtensions(loc, 1, &E_GL_EXT_buffer_reference2, "+= and -= on a buffer reference"); + if (op == EOpAssign && left->getBasicType() == EbtSampler && right->getBasicType() == EbtSampler) + requireExtensions(loc, 1, &E_GL_ARB_bindless_texture, "sampler assignment for bindless texture"); + return intermediate.addAssign(op, left, right, loc); } @@ -2127,7 +2110,6 @@ void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCan TString featureString; const char* feature = nullptr; switch (callNode.getOp()) { -#ifndef GLSLANG_WEB case EOpTextureGather: case EOpTextureGatherOffset: case EOpTextureGatherOffsets: @@ -2200,6 +2182,37 @@ void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCan } break; } + + case EOpTexture: + case EOpTextureLod: + { + if ((fnCandidate.getParamCount() > 2) && ((*argp)[1]->getAsTyped()->getType().getBasicType() == EbtFloat) && + ((*argp)[1]->getAsTyped()->getType().getVectorSize() == 4) && fnCandidate[0].type->getSampler().shadow) { + featureString = fnCandidate.getName(); + if (callNode.getOp() == EOpTexture) + featureString += "(..., float bias)"; + else + featureString += "(..., float lod)"; + feature = featureString.c_str(); + + if ((fnCandidate[0].type->getSampler().dim == Esd2D && fnCandidate[0].type->getSampler().arrayed) || //2D Array Shadow + (fnCandidate[0].type->getSampler().dim == EsdCube && fnCandidate[0].type->getSampler().arrayed && fnCandidate.getParamCount() > 3) || // Cube Array Shadow + (fnCandidate[0].type->getSampler().dim == EsdCube && callNode.getOp() == EOpTextureLod)) { // Cube Shadow + requireExtensions(loc, 1, &E_GL_EXT_texture_shadow_lod, feature); + if (isEsProfile()) { + if (version < 320 && + !extensionsTurnedOn(Num_AEP_texture_cube_map_array, AEP_texture_cube_map_array)) + error(loc, "GL_EXT_texture_shadow_lod not supported for this ES version", feature, ""); + else + profileRequires(loc, EEsProfile, 320, nullptr, feature); + } else { // Desktop + profileRequires(loc, ~EEsProfile, 130, nullptr, feature); + } + } + } + break; + } + case EOpSparseTextureGather: case EOpSparseTextureGatherOffset: case EOpSparseTextureGatherOffsets: @@ -2268,7 +2281,6 @@ void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCan break; } -#endif case EOpTextureOffset: case EOpTextureFetchOffset: @@ -2296,12 +2308,10 @@ void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCan if (arg > 0) { -#ifndef GLSLANG_WEB bool f16ShadowCompare = (*argp)[1]->getAsTyped()->getBasicType() == EbtFloat16 && arg0->getType().getSampler().shadow; if (f16ShadowCompare) ++arg; -#endif if (! (*argp)[arg]->getAsTyped()->getQualifier().isConstant()) error(loc, "argument must be compile-time constant", "texel offset", ""); else if ((*argp)[arg]->getAsConstantUnion()) { @@ -2317,18 +2327,41 @@ void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCan if (callNode.getOp() == EOpTextureOffset) { TSampler s = arg0->getType().getSampler(); if (s.is2D() && s.isArrayed() && s.isShadow()) { - if (isEsProfile()) + if ( + ((*argp)[1]->getAsTyped()->getType().getBasicType() == EbtFloat) && + ((*argp)[1]->getAsTyped()->getType().getVectorSize() == 4) && + (fnCandidate.getParamCount() == 4)) { + featureString = fnCandidate.getName() + " for sampler2DArrayShadow"; + feature = featureString.c_str(); + requireExtensions(loc, 1, &E_GL_EXT_texture_shadow_lod, feature); + profileRequires(loc, EEsProfile, 300, nullptr, feature); + profileRequires(loc, ~EEsProfile, 130, nullptr, feature); + } + else if (isEsProfile()) error(loc, "TextureOffset does not support sampler2DArrayShadow : ", "sampler", "ES Profile"); else if (version <= 420) error(loc, "TextureOffset does not support sampler2DArrayShadow : ", "sampler", "version <= 420"); } } + + if (callNode.getOp() == EOpTextureLodOffset) { + TSampler s = arg0->getType().getSampler(); + if (s.is2D() && s.isArrayed() && s.isShadow() && + ((*argp)[1]->getAsTyped()->getType().getBasicType() == EbtFloat) && + ((*argp)[1]->getAsTyped()->getType().getVectorSize() == 4) && + (fnCandidate.getParamCount() == 4)) { + featureString = fnCandidate.getName() + " for sampler2DArrayShadow"; + feature = featureString.c_str(); + profileRequires(loc, EEsProfile, 300, nullptr, feature); + profileRequires(loc, ~EEsProfile, 130, nullptr, feature); + requireExtensions(loc, 1, &E_GL_EXT_texture_shadow_lod, feature); + } + } } break; } -#ifndef GLSLANG_WEB case EOpTraceNV: if (!(*argp)[10]->getAsConstantUnion()) error(loc, "argument must be compile-time constant", "payload number", "a"); @@ -2360,6 +2393,79 @@ void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCan } break; + case EOpHitObjectTraceRayNV: + if (!(*argp)[11]->getAsConstantUnion()) + error(loc, "argument must be compile-time constant", "payload number", ""); + else { + unsigned int location = (*argp)[11]->getAsConstantUnion()->getAsConstantUnion()->getConstArray()[0].getUConst(); + if (!extensionTurnedOn(E_GL_EXT_spirv_intrinsics) && intermediate.checkLocationRT(0, location) < 0) + error(loc, "with layout(location =", "no rayPayloadEXT/rayPayloadInEXT declared", "%d)", location); + } + break; + case EOpHitObjectTraceRayMotionNV: + if (!(*argp)[12]->getAsConstantUnion()) + error(loc, "argument must be compile-time constant", "payload number", ""); + else { + unsigned int location = (*argp)[12]->getAsConstantUnion()->getAsConstantUnion()->getConstArray()[0].getUConst(); + if (!extensionTurnedOn(E_GL_EXT_spirv_intrinsics) && intermediate.checkLocationRT(0, location) < 0) + error(loc, "with layout(location =", "no rayPayloadEXT/rayPayloadInEXT declared", "%d)", location); + } + break; + case EOpHitObjectExecuteShaderNV: + if (!(*argp)[1]->getAsConstantUnion()) + error(loc, "argument must be compile-time constant", "payload number", ""); + else { + unsigned int location = (*argp)[1]->getAsConstantUnion()->getAsConstantUnion()->getConstArray()[0].getUConst(); + if (!extensionTurnedOn(E_GL_EXT_spirv_intrinsics) && intermediate.checkLocationRT(0, location) < 0) + error(loc, "with layout(location =", "no rayPayloadEXT/rayPayloadInEXT declared", "%d)", location); + } + break; + case EOpHitObjectRecordHitNV: + if (!(*argp)[12]->getAsConstantUnion()) + error(loc, "argument must be compile-time constant", "hitobjectattribute number", ""); + else { + unsigned int location = (*argp)[12]->getAsConstantUnion()->getAsConstantUnion()->getConstArray()[0].getUConst(); + if (!extensionTurnedOn(E_GL_EXT_spirv_intrinsics) && intermediate.checkLocationRT(2, location) < 0) + error(loc, "with layout(location =", "no hitObjectAttributeNV declared", "%d)", location); + } + break; + case EOpHitObjectRecordHitMotionNV: + if (!(*argp)[13]->getAsConstantUnion()) + error(loc, "argument must be compile-time constant", "hitobjectattribute number", ""); + else { + unsigned int location = (*argp)[13]->getAsConstantUnion()->getAsConstantUnion()->getConstArray()[0].getUConst(); + if (!extensionTurnedOn(E_GL_EXT_spirv_intrinsics) && intermediate.checkLocationRT(2, location) < 0) + error(loc, "with layout(location =", "no hitObjectAttributeNV declared", "%d)", location); + } + break; + case EOpHitObjectRecordHitWithIndexNV: + if (!(*argp)[11]->getAsConstantUnion()) + error(loc, "argument must be compile-time constant", "hitobjectattribute number", ""); + else { + unsigned int location = (*argp)[11]->getAsConstantUnion()->getAsConstantUnion()->getConstArray()[0].getUConst(); + if (!extensionTurnedOn(E_GL_EXT_spirv_intrinsics) && intermediate.checkLocationRT(2, location) < 0) + error(loc, "with layout(location =", "no hitObjectAttributeNV declared", "%d)", location); + } + break; + case EOpHitObjectRecordHitWithIndexMotionNV: + if (!(*argp)[12]->getAsConstantUnion()) + error(loc, "argument must be compile-time constant", "hitobjectattribute number", ""); + else { + unsigned int location = (*argp)[12]->getAsConstantUnion()->getAsConstantUnion()->getConstArray()[0].getUConst(); + if (!extensionTurnedOn(E_GL_EXT_spirv_intrinsics) && intermediate.checkLocationRT(2, location) < 0) + error(loc, "with layout(location =", "no hitObjectAttributeNV declared", "%d)", location); + } + break; + case EOpHitObjectGetAttributesNV: + if (!(*argp)[1]->getAsConstantUnion()) + error(loc, "argument must be compile-time constant", "hitobjectattribute number", ""); + else { + unsigned int location = (*argp)[1]->getAsConstantUnion()->getAsConstantUnion()->getConstArray()[0].getUConst(); + if (!extensionTurnedOn(E_GL_EXT_spirv_intrinsics) && intermediate.checkLocationRT(2, location) < 0) + error(loc, "with layout(location =", "no hitObjectAttributeNV declared", "%d)", location); + } + break; + case EOpRayQueryGetIntersectionType: case EOpRayQueryGetIntersectionT: case EOpRayQueryGetIntersectionInstanceCustomIndex: @@ -2373,6 +2479,7 @@ void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCan case EOpRayQueryGetIntersectionObjectRayOrigin: case EOpRayQueryGetIntersectionObjectToWorld: case EOpRayQueryGetIntersectionWorldToObject: + case EOpRayQueryGetIntersectionTriangleVertexPositionsEXT: if (!(*argp)[1]->getAsConstantUnion()) error(loc, "argument must be compile-time constant", "committed", ""); break; @@ -2474,12 +2581,19 @@ void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCan requireExtensions(loc, 1, &E_GL_EXT_shader_atomic_float2, fnCandidate.getName().c_str()); } - const TIntermTyped* base = TIntermediate::findLValueBase(arg0, true , true); - const TType* refType = (base->getType().isReference()) ? base->getType().getReferentType() : nullptr; - const TQualifier& qualifier = (refType != nullptr) ? refType->getQualifier() : base->getType().getQualifier(); - if (qualifier.storage != EvqShared && qualifier.storage != EvqBuffer && qualifier.storage != EvqtaskPayloadSharedEXT) - error(loc,"Atomic memory function can only be used for shader storage block member or shared variable.", - fnCandidate.getName().c_str(), ""); + const TIntermTyped* base = TIntermediate::traverseLValueBase(arg0, true, true); + const char* errMsg = "Only l-values corresponding to shader block storage or shared variables can be used with " + "atomic memory functions."; + if (base) { + const TType* refType = (base->getType().isReference()) ? base->getType().getReferentType() : nullptr; + const TQualifier& qualifier = + (refType != nullptr) ? refType->getQualifier() : base->getType().getQualifier(); + if (qualifier.storage != EvqShared && qualifier.storage != EvqBuffer && + qualifier.storage != EvqtaskPayloadSharedEXT) + error(loc, errMsg, fnCandidate.getName().c_str(), ""); + } else { + error(loc, errMsg, fnCandidate.getName().c_str(), ""); + } break; } @@ -2487,20 +2601,57 @@ void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCan case EOpInterpolateAtCentroid: case EOpInterpolateAtSample: case EOpInterpolateAtOffset: - case EOpInterpolateAtVertex: - // Make sure the first argument is an interpolant, or an array element of an interpolant + case EOpInterpolateAtVertex: { if (arg0->getType().getQualifier().storage != EvqVaryingIn) { - // It might still be an array element. + // Traverse down the left branch of arg0 to ensure this argument is a valid interpolant. // - // We could check more, but the semantics of the first argument are already met; the - // only way to turn an array into a float/vec* is array dereference and swizzle. + // For desktop GL >4.3 we effectively only need to ensure that arg0 represents an l-value from an + // input declaration. // - // ES and desktop 4.3 and earlier: swizzles may not be used - // desktop 4.4 and later: swizzles may be used - bool swizzleOkay = (!isEsProfile()) && (version >= 440); - const TIntermTyped* base = TIntermediate::findLValueBase(arg0, swizzleOkay); - if (base == nullptr || base->getType().getQualifier().storage != EvqVaryingIn) - error(loc, "first argument must be an interpolant, or interpolant-array element", fnCandidate.getName().c_str(), ""); + // For desktop GL <= 4.3 and ES, we must also ensure that swizzling is not used + // + // For ES, we must also ensure that a field selection operator (i.e., '.') is not used on a named + // struct. + + const bool esProfile = isEsProfile(); + const bool swizzleOkay = !esProfile && (version >= 440); + + std::string interpolantErrorMsg = "first argument must be an interpolant, or interpolant-array element"; + bool isValid = true; // Assume that the interpolant is valid until we find a condition making it invalid + bool isIn = false; // Checks whether or not the interpolant is a shader input + bool structAccessOp = false; // Whether or not the previous node in the chain is a struct accessor + TIntermediate::traverseLValueBase( + arg0, swizzleOkay, false, + [&isValid, &isIn, &interpolantErrorMsg, esProfile, &structAccessOp](const TIntermNode& n) -> bool { + auto* type = n.getAsTyped(); + if (type) { + if (type->getType().getQualifier().storage == EvqVaryingIn) { + isIn = true; + } + // If a field accessor was used, it can only be used to access a field with an input block, not a struct. + if (structAccessOp && (type->getType().getBasicType() != EbtBlock)) { + interpolantErrorMsg += + ". Using the field of a named struct as an interpolant argument is not " + "allowed (ES-only)."; + isValid = false; + } + } + + // ES has different requirements for interpolants than GL + if (esProfile) { + // Swizzling will be taken care of by the 'swizzleOkay' argument passsed to traverseLValueBase, + // so we only ned to check whether or not a field accessor has been used with a named struct. + auto* binary = n.getAsBinaryNode(); + if (binary && (binary->getOp() == EOpIndexDirectStruct)) { + structAccessOp = true; + } + } + // Don't continue traversing if we know we have an invalid interpolant at this point. + return isValid; + }); + if (!isIn || !isValid) { + error(loc, interpolantErrorMsg.c_str(), fnCandidate.getName().c_str(), ""); + } } if (callNode.getOp() == EOpInterpolateAtVertex) { @@ -2516,7 +2667,7 @@ void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCan } } } - break; + } break; case EOpEmitStreamVertex: case EOpEndStreamPrimitive: @@ -2585,7 +2736,6 @@ void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCan } break; -#endif default: break; @@ -2648,9 +2798,6 @@ void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCan } } -#ifndef GLSLANG_WEB - -extern bool PureOperatorBuiltins; // Deprecated! Use PureOperatorBuiltins == true instead, in which case this // functionality is handled in builtInOpCheck() instead of here. @@ -2776,8 +2923,6 @@ void TParseContext::nonOpBuiltInCheck(const TSourceLoc& loc, const TFunction& fn } } -#endif - // // Do any extra checking for a user function call. // @@ -2811,6 +2956,14 @@ TFunction* TParseContext::handleConstructorCall(const TSourceLoc& loc, const TPu profileRequires(loc, EEsProfile, 300, nullptr, "arrayed constructor"); } + // Reuse EOpConstructTextureSampler for bindless image constructor + // uvec2 imgHandle; + // imageLoad(image1D(imgHandle), 0); + if (type.isImage() && extensionTurnedOn(E_GL_ARB_bindless_texture)) + { + intermediate.setBindlessImageMode(currentCaller, AstRefTypeFunc); + } + TOperator op = intermediate.mapTypeToConstructorOp(type); if (op == EOpNull) { @@ -2928,7 +3081,6 @@ bool TParseContext::lValueErrorCheck(const TSourceLoc& loc, const char* op, TInt bool errorReturn = false; switch(binaryNode->getOp()) { -#ifndef GLSLANG_WEB case EOpIndexDirect: case EOpIndexIndirect: // ... tessellation control shader ... @@ -2945,7 +3097,6 @@ bool TParseContext::lValueErrorCheck(const TSourceLoc& loc, const char* op, TInt } } break; // left node is checked by base class -#endif case EOpVectorSwizzle: errorReturn = lValueErrorCheck(loc, op, binaryNode->getLeft()); if (!errorReturn) { @@ -3163,10 +3314,6 @@ void TParseContext::reservedPpErrorCheck(const TSourceLoc& loc, const char* iden // bool TParseContext::lineContinuationCheck(const TSourceLoc& loc, bool endOfComment) { -#ifdef GLSLANG_WEB - return true; -#endif - const char* message = "line continuation"; bool lineContinuationAllowed = (isEsProfile() && version >= 300) || @@ -3223,7 +3370,6 @@ bool TParseContext::constructorError(const TSourceLoc& loc, TIntermNode* node, T // it, in which case the type comes from the argument instead of from the // constructor function. switch (op) { -#ifndef GLSLANG_WEB case EOpConstructNonuniform: if (node != nullptr && node->getAsTyped() != nullptr) { type.shallowCopy(node->getAsTyped()->getType()); @@ -3231,7 +3377,6 @@ bool TParseContext::constructorError(const TSourceLoc& loc, TIntermNode* node, T type.getQualifier().nonUniform = true; } break; -#endif default: type.shallowCopy(function.getType()); break; @@ -3257,7 +3402,6 @@ bool TParseContext::constructorError(const TSourceLoc& loc, TIntermNode* node, T case EOpConstructMat4x2: case EOpConstructMat4x3: case EOpConstructMat4x4: -#ifndef GLSLANG_WEB case EOpConstructDMat2x2: case EOpConstructDMat2x3: case EOpConstructDMat2x4: @@ -3276,7 +3420,6 @@ bool TParseContext::constructorError(const TSourceLoc& loc, TIntermNode* node, T case EOpConstructF16Mat4x2: case EOpConstructF16Mat4x3: case EOpConstructF16Mat4x4: -#endif constructingMatrix = true; break; default: @@ -3343,7 +3486,6 @@ bool TParseContext::constructorError(const TSourceLoc& loc, TIntermNode* node, T if (op == EOpConstructNonuniform) constType = false; -#ifndef GLSLANG_WEB switch (op) { case EOpConstructFloat16: case EOpConstructF16Vec2: @@ -3383,7 +3525,6 @@ bool TParseContext::constructorError(const TSourceLoc& loc, TIntermNode* node, T default: break; } -#endif // inherit constness from children if (constType) { @@ -3404,7 +3545,6 @@ bool TParseContext::constructorError(const TSourceLoc& loc, TIntermNode* node, T case EOpConstructUVec2: case EOpConstructUVec3: case EOpConstructUVec4: -#ifndef GLSLANG_WEB case EOpConstructUint8: case EOpConstructInt16: case EOpConstructUint16: @@ -3428,7 +3568,6 @@ bool TParseContext::constructorError(const TSourceLoc& loc, TIntermNode* node, T case EOpConstructU64Vec2: case EOpConstructU64Vec3: case EOpConstructU64Vec4: -#endif // This was the list of valid ones, if they aren't converting from float // and aren't making an array. makeSpecConst = ! floatArgument && ! type.isArray(); @@ -3539,13 +3678,24 @@ bool TParseContext::constructorError(const TSourceLoc& loc, TIntermNode* node, T } TIntermTyped* typed = node->getAsTyped(); + if (type.isCoopMat() && typed->getType().isCoopMat() && + !type.sameCoopMatShapeAndUse(typed->getType())) { + error(loc, "Cooperative matrix type parameters mismatch", constructorString.c_str(), ""); + return true; + } + if (typed == nullptr) { error(loc, "constructor argument does not have a type", constructorString.c_str(), ""); return true; } if (op != EOpConstructStruct && op != EOpConstructNonuniform && typed->getBasicType() == EbtSampler) { - error(loc, "cannot convert a sampler", constructorString.c_str(), ""); - return true; + if (op == EOpConstructUVec2 && extensionTurnedOn(E_GL_ARB_bindless_texture)) { + intermediate.setBindlessTextureMode(currentCaller, AstRefTypeFunc); + } + else { + error(loc, "cannot convert a sampler", constructorString.c_str(), ""); + return true; + } } if (op != EOpConstructStruct && typed->isAtomic()) { error(loc, "cannot convert an atomic_uint", constructorString.c_str(), ""); @@ -3565,6 +3715,26 @@ bool TParseContext::constructorTextureSamplerError(const TSourceLoc& loc, const { TString constructorName = function.getType().getBasicTypeString(); // TODO: performance: should not be making copy; interface needs to change const char* token = constructorName.c_str(); + // verify the constructor for bindless texture, the input must be ivec2 or uvec2 + if (function.getParamCount() == 1) { + TType* pType = function[0].type; + TBasicType basicType = pType->getBasicType(); + bool isIntegerVec2 = ((basicType == EbtUint || basicType == EbtInt) && pType->getVectorSize() == 2); + bool bindlessMode = extensionTurnedOn(E_GL_ARB_bindless_texture); + if (isIntegerVec2 && bindlessMode) { + if (pType->getSampler().isImage()) + intermediate.setBindlessImageMode(currentCaller, AstRefTypeFunc); + else + intermediate.setBindlessTextureMode(currentCaller, AstRefTypeFunc); + return false; + } else { + if (!bindlessMode) + error(loc, "sampler-constructor requires the extension GL_ARB_bindless_texture enabled", token, ""); + else + error(loc, "sampler-constructor requires the input to be ivec2 or uvec2", token, ""); + return true; + } + } // exactly two arguments needed if (function.getParamCount() != 2) { @@ -3660,18 +3830,38 @@ void TParseContext::samplerCheck(const TSourceLoc& loc, const TType& type, const if (type.getQualifier().storage == EvqUniform) return; - if (type.getBasicType() == EbtStruct && containsFieldWithBasicType(type, EbtSampler)) - error(loc, "non-uniform struct contains a sampler or image:", type.getBasicTypeString().c_str(), identifier.c_str()); + if (type.getBasicType() == EbtStruct && containsFieldWithBasicType(type, EbtSampler)) { + // For bindless texture, sampler can be declared as an struct member + if (extensionTurnedOn(E_GL_ARB_bindless_texture)) { + if (type.getSampler().isImage()) + intermediate.setBindlessImageMode(currentCaller, AstRefTypeVar); + else + intermediate.setBindlessTextureMode(currentCaller, AstRefTypeVar); + } + else { + error(loc, "non-uniform struct contains a sampler or image:", type.getBasicTypeString().c_str(), identifier.c_str()); + } + } else if (type.getBasicType() == EbtSampler && type.getQualifier().storage != EvqUniform) { - // non-uniform sampler - // not yet: okay if it has an initializer - // if (! initializer) - error(loc, "sampler/image types can only be used in uniform variables or function parameters:", type.getBasicTypeString().c_str(), identifier.c_str()); + // For bindless texture, sampler can be declared as an input/output/block member + if (extensionTurnedOn(E_GL_ARB_bindless_texture)) { + if (type.getSampler().isImage()) + intermediate.setBindlessImageMode(currentCaller, AstRefTypeVar); + else + intermediate.setBindlessTextureMode(currentCaller, AstRefTypeVar); + } + else { + // non-uniform sampler + // not yet: okay if it has an initializer + // if (! initializer) + if (type.getSampler().isAttachmentEXT() && type.getQualifier().storage != EvqTileImageEXT) + error(loc, "can only be used in tileImageEXT variables or function parameters:", type.getBasicTypeString().c_str(), identifier.c_str()); + else if (type.getQualifier().storage != EvqTileImageEXT) + error(loc, "sampler/image types can only be used in uniform variables or function parameters:", type.getBasicTypeString().c_str(), identifier.c_str()); + } } } -#ifndef GLSLANG_WEB - void TParseContext::atomicUintCheck(const TSourceLoc& loc, const TType& type, const TString& identifier) { if (type.getQualifier().storage == EvqUniform) @@ -3696,8 +3886,6 @@ void TParseContext::accStructCheck(const TSourceLoc& loc, const TType& type, con } -#endif // GLSLANG_WEB - void TParseContext::transparentOpaqueCheck(const TSourceLoc& loc, const TType& type, const TString& identifier) { if (parsingBuiltins) @@ -3732,7 +3920,7 @@ void TParseContext::memberQualifierCheck(glslang::TPublicType& publicType) // // Check/fix just a full qualifier (no variables or types yet, but qualifier is complete) at global level. // -void TParseContext::globalQualifierFixCheck(const TSourceLoc& loc, TQualifier& qualifier, bool isMemberCheck) +void TParseContext::globalQualifierFixCheck(const TSourceLoc& loc, TQualifier& qualifier, bool isMemberCheck, const TPublicType* publicType) { bool nonuniformOkay = false; @@ -3768,6 +3956,11 @@ void TParseContext::globalQualifierFixCheck(const TSourceLoc& loc, TQualifier& q { requireExtensions(loc, 1, &E_GL_EXT_scalar_block_layout, "default std430 layout for uniform"); } + + if (publicType != nullptr && publicType->isImage() && + (qualifier.layoutFormat > ElfExtSizeGuard && qualifier.layoutFormat < ElfCount)) + qualifier.layoutFormat = mapLegacyLayoutFormat(qualifier.layoutFormat, publicType->sampler.getBasicType()); + break; default: break; @@ -3776,13 +3969,11 @@ void TParseContext::globalQualifierFixCheck(const TSourceLoc& loc, TQualifier& q if (!nonuniformOkay && qualifier.isNonUniform()) error(loc, "for non-parameter, can only apply to 'in' or no storage qualifier", "nonuniformEXT", ""); -#ifndef GLSLANG_WEB if (qualifier.isSpirvByReference()) error(loc, "can only apply to parameter", "spirv_by_reference", ""); if (qualifier.isSpirvLiteral()) error(loc, "can only apply to parameter", "spirv_literal", ""); -#endif // Storage qualifier isn't ready for memberQualifierCheck, we should skip invariantCheck for it. if (!isMemberCheck || structNestingLevel > 0) @@ -3828,8 +4019,10 @@ void TParseContext::globalQualifierTypeCheck(const TSourceLoc& loc, const TQuali return; } - if (isTypeInt(publicType.basicType) || publicType.basicType == EbtDouble) - profileRequires(loc, EEsProfile, 300, nullptr, "shader input/output"); + if (isTypeInt(publicType.basicType) || publicType.basicType == EbtDouble) { + profileRequires(loc, EEsProfile, 300, nullptr, "non-float shader input/output"); + profileRequires(loc, ~EEsProfile, 130, nullptr, "non-float shader input/output"); + } if (!qualifier.flat && !qualifier.isExplicitInterpolation() && !qualifier.isPervertexNV() && !qualifier.isPervertexEXT()) { if (isTypeInt(publicType.basicType) || @@ -3860,7 +4053,7 @@ void TParseContext::globalQualifierTypeCheck(const TSourceLoc& loc, const TQuali switch (language) { case EShLangVertex: if (publicType.basicType == EbtStruct) { - error(loc, "cannot be a structure or array", GetStorageQualifierString(qualifier.storage), ""); + error(loc, "cannot be a structure", GetStorageQualifierString(qualifier.storage), ""); return; } if (publicType.arraySizes) { @@ -3886,12 +4079,10 @@ void TParseContext::globalQualifierTypeCheck(const TSourceLoc& loc, const TQuali if (! symbolTable.atBuiltInLevel()) error(loc, "global storage input qualifier cannot be used in a compute shader", "in", ""); break; -#ifndef GLSLANG_WEB case EShLangTessControl: if (qualifier.patch) error(loc, "can only use on output in tessellation-control shader", "patch", ""); break; -#endif default: break; } @@ -3930,12 +4121,10 @@ void TParseContext::globalQualifierTypeCheck(const TSourceLoc& loc, const TQuali case EShLangCompute: error(loc, "global storage output qualifier cannot be used in a compute shader", "out", ""); break; -#ifndef GLSLANG_WEB case EShLangTessEvaluation: if (qualifier.patch) error(loc, "can only use on input in tessellation-evaluation shader", "patch", ""); break; -#endif default: break; } @@ -4003,7 +4192,6 @@ void TParseContext::mergeQualifiers(const TSourceLoc& loc, TQualifier& dst, cons if (dst.precision == EpqNone || (force && src.precision != EpqNone)) dst.precision = src.precision; -#ifndef GLSLANG_WEB if (!force && ((src.coherent && (dst.devicecoherent || dst.queuefamilycoherent || dst.workgroupcoherent || dst.subgroupcoherent || dst.shadercallcoherent)) || (src.devicecoherent && (dst.coherent || dst.queuefamilycoherent || dst.workgroupcoherent || dst.subgroupcoherent || dst.shadercallcoherent)) || (src.queuefamilycoherent && (dst.coherent || dst.devicecoherent || dst.workgroupcoherent || dst.subgroupcoherent || dst.shadercallcoherent)) || @@ -4013,7 +4201,7 @@ void TParseContext::mergeQualifiers(const TSourceLoc& loc, TQualifier& dst, cons error(loc, "only one coherent/devicecoherent/queuefamilycoherent/workgroupcoherent/subgroupcoherent/shadercallcoherent qualifier allowed", GetPrecisionQualifierString(src.precision), ""); } -#endif + // Layout qualifiers mergeObjectLayoutQualifiers(dst, src, false); @@ -4025,7 +4213,6 @@ void TParseContext::mergeQualifiers(const TSourceLoc& loc, TQualifier& dst, cons MERGE_SINGLETON(smooth); MERGE_SINGLETON(flat); MERGE_SINGLETON(specConstant); -#ifndef GLSLANG_WEB MERGE_SINGLETON(noContraction); MERGE_SINGLETON(nopersp); MERGE_SINGLETON(explicitInterp); @@ -4046,15 +4233,13 @@ void TParseContext::mergeQualifiers(const TSourceLoc& loc, TQualifier& dst, cons MERGE_SINGLETON(readonly); MERGE_SINGLETON(writeonly); MERGE_SINGLETON(nonUniform); -#endif -#ifndef GLSLANG_WEB // SPIR-V storage class qualifier (GL_EXT_spirv_intrinsics) dst.spirvStorageClass = src.spirvStorageClass; // SPIR-V decorate qualifiers (GL_EXT_spirv_intrinsics) - if (src.hasSprivDecorate()) { - if (dst.hasSprivDecorate()) { + if (src.hasSpirvDecorate()) { + if (dst.hasSpirvDecorate()) { const TSpirvDecorate& srcSpirvDecorate = src.getSpirvDecorate(); TSpirvDecorate& dstSpirvDecorate = dst.getSpirvDecorate(); for (auto& decorate : srcSpirvDecorate.decorates) { @@ -4075,13 +4260,12 @@ void TParseContext::mergeQualifiers(const TSourceLoc& loc, TQualifier& dst, cons if (dstSpirvDecorate.decorates.find(decorateString.first) != dstSpirvDecorate.decorates.end()) error(loc, "too many SPIR-V decorate qualifiers", "spirv_decorate_string", "(decoration=%u)", decorateString.first); else - dstSpirvDecorate.decorates.insert(decorateString); + dstSpirvDecorate.decorateStrings.insert(decorateString); } } else { dst.spirvDecorate = src.spirvDecorate; } } -#endif if (repeated) error(loc, "replicated qualifiers", "", ""); @@ -4145,17 +4329,18 @@ TPrecisionQualifier TParseContext::getDefaultPrecision(TPublicType& publicType) return defaultPrecision[publicType.basicType]; } -void TParseContext::precisionQualifierCheck(const TSourceLoc& loc, TBasicType baseType, TQualifier& qualifier) +void TParseContext::precisionQualifierCheck(const TSourceLoc& loc, TBasicType baseType, TQualifier& qualifier, bool isCoopMat) { // Built-in symbols are allowed some ambiguous precisions, to be pinned down // later by context. if (! obeyPrecisionQualifiers() || parsingBuiltins) return; -#ifndef GLSLANG_WEB if (baseType == EbtAtomicUint && qualifier.precision != EpqNone && qualifier.precision != EpqHigh) error(loc, "atomic counters can only be highp", "atomic_uint", ""); -#endif + + if (isCoopMat) + return; if (baseType == EbtFloat || baseType == EbtUint || baseType == EbtInt || baseType == EbtSampler || baseType == EbtAtomicUint) { if (qualifier.precision == EpqNone) { @@ -4172,7 +4357,7 @@ void TParseContext::precisionQualifierCheck(const TSourceLoc& loc, TBasicType ba void TParseContext::parameterTypeCheck(const TSourceLoc& loc, TStorageQualifier qualifier, const TType& type) { - if ((qualifier == EvqOut || qualifier == EvqInOut) && type.isOpaque()) + if ((qualifier == EvqOut || qualifier == EvqInOut) && type.isOpaque() && !intermediate.getBindlessMode()) error(loc, "samplers and atomic_uints cannot be output parameters", type.getBasicTypeString().c_str(), ""); if (!parsingBuiltins && type.contains16BitFloat()) requireFloat16Arithmetic(loc, type.getBasicTypeString().c_str(), "float16 types can only be in uniform block or buffer storage"); @@ -4201,7 +4386,8 @@ bool TParseContext::containsFieldWithBasicType(const TType& type, TBasicType bas // // Do size checking for an array type's size. // -void TParseContext::arraySizeCheck(const TSourceLoc& loc, TIntermTyped* expr, TArraySize& sizePair, const char *sizeType) +void TParseContext::arraySizeCheck(const TSourceLoc& loc, TIntermTyped* expr, TArraySize& sizePair, + const char* sizeType, const bool allowZero) { bool isConst = false; sizePair.node = nullptr; @@ -4221,9 +4407,8 @@ void TParseContext::arraySizeCheck(const TSourceLoc& loc, TIntermTyped* expr, TA TIntermSymbol* symbol = expr->getAsSymbolNode(); if (symbol && symbol->getConstArray().size() > 0) size = symbol->getConstArray()[0].getIConst(); - } else if (expr->getAsUnaryNode() && - expr->getAsUnaryNode()->getOp() == glslang::EOpArrayLength && - expr->getAsUnaryNode()->getOperand()->getType().isCoopMat()) { + } else if (expr->getAsUnaryNode() && expr->getAsUnaryNode()->getOp() == glslang::EOpArrayLength && + expr->getAsUnaryNode()->getOperand()->getType().isCoopMatNV()) { isConst = true; size = 1; sizePair.node = expr->getAsUnaryNode(); @@ -4237,9 +4422,16 @@ void TParseContext::arraySizeCheck(const TSourceLoc& loc, TIntermTyped* expr, TA return; } - if (size <= 0) { - error(loc, sizeType, "", "must be a positive integer"); - return; + if (allowZero) { + if (size < 0) { + error(loc, sizeType, "", "must be a non-negative integer"); + return; + } + } else { + if (size <= 0) { + error(loc, sizeType, "", "must be a positive integer"); + return; + } } } @@ -4337,8 +4529,6 @@ void TParseContext::arraySizesCheck(const TSourceLoc& loc, const TQualifier& qua (qualifier.storage != EvqTemporary && qualifier.storage != EvqGlobal && qualifier.storage != EvqShared && qualifier.storage != EvqConst)) error(loc, "only outermost dimension of an array of arrays can be a specialization constant", "[]", ""); -#ifndef GLSLANG_WEB - // desktop always allows outer-dimension-unsized variable arrays, if (!isEsProfile()) return; @@ -4378,8 +4568,6 @@ void TParseContext::arraySizesCheck(const TSourceLoc& loc, const TQualifier& qua break; } -#endif - // last member of ssbo block exception: if (qualifier.storage == EvqBuffer && lastMember) return; @@ -4424,7 +4612,6 @@ void TParseContext::declareArray(const TSourceLoc& loc, const TString& identifie if (symbolTable.atGlobalLevel()) trackLinkage(*symbol); -#ifndef GLSLANG_WEB if (! symbolTable.atBuiltInLevel()) { if (isIoResizeArray(type)) { ioArraySymbolResizeList.push_back(symbol); @@ -4432,7 +4619,6 @@ void TParseContext::declareArray(const TSourceLoc& loc, const TString& identifie } else fixIoArraySize(loc, symbol->getWritableType()); } -#endif return; } @@ -4470,7 +4656,6 @@ void TParseContext::declareArray(const TSourceLoc& loc, const TString& identifie return; } -#ifndef GLSLANG_WEB if (existingType.isSizedArray()) { // be more leniant for input arrays to geometry shaders and tessellation control outputs, where the redeclaration is the same size if (! (isIoResizeArray(type) && existingType.getOuterArraySize() == type.getOuterArraySize())) @@ -4484,11 +4669,8 @@ void TParseContext::declareArray(const TSourceLoc& loc, const TString& identifie if (isIoResizeArray(type)) checkIoArraysConsistency(loc); -#endif } -#ifndef GLSLANG_WEB - // Policy and error check for needing a runtime sized array. void TParseContext::checkRuntimeSizable(const TSourceLoc& loc, const TIntermTyped& base) { @@ -4516,7 +4698,7 @@ void TParseContext::checkRuntimeSizable(const TSourceLoc& loc, const TIntermType // check for additional things allowed by GL_EXT_nonuniform_qualifier if (base.getBasicType() == EbtSampler || base.getBasicType() == EbtAccStruct || base.getBasicType() == EbtRayQuery || - (base.getBasicType() == EbtBlock && base.getType().getQualifier().isUniformOrBuffer())) + base.getBasicType() == EbtHitObjectNV || (base.getBasicType() == EbtBlock && base.getType().getQualifier().isUniformOrBuffer())) requireExtensions(loc, 1, &E_GL_EXT_nonuniform_qualifier, "variable index"); else error(loc, "", "[", "array must be redeclared with a size before being indexed with a variable"); @@ -4571,8 +4753,6 @@ void TParseContext::checkAndResizeMeshViewDim(const TSourceLoc& loc, TType& type } } -#endif // GLSLANG_WEB - // Returns true if the first argument to the #line directive is the line number for the next line. // // Desktop, pre-version 3.30: "After processing this directive @@ -4615,7 +4795,6 @@ void TParseContext::nonInitConstCheck(const TSourceLoc& loc, TString& identifier TSymbol* TParseContext::redeclareBuiltinVariable(const TSourceLoc& loc, const TString& identifier, const TQualifier& qualifier, const TShaderQualifiers& publicType) { -#ifndef GLSLANG_WEB if (! builtInName(identifier) || symbolTable.atBuiltInLevel() || ! symbolTable.atGlobalLevel()) return nullptr; @@ -4778,7 +4957,6 @@ TSymbol* TParseContext::redeclareBuiltinVariable(const TSourceLoc& loc, const TS return symbol; } -#endif return nullptr; } @@ -4790,7 +4968,6 @@ TSymbol* TParseContext::redeclareBuiltinVariable(const TSourceLoc& loc, const TS void TParseContext::redeclareBuiltinBlock(const TSourceLoc& loc, TTypeList& newTypeList, const TString& blockName, const TString* instanceName, TArraySizes* arraySizes) { -#ifndef GLSLANG_WEB const char* feature = "built-in block redeclaration"; profileRequires(loc, EEsProfile, 320, Num_AEP_shader_io_blocks, AEP_shader_io_blocks, feature); profileRequires(loc, ~EEsProfile, 410, E_GL_ARB_separate_shader_objects, feature); @@ -5006,7 +5183,6 @@ void TParseContext::redeclareBuiltinBlock(const TSourceLoc& loc, TTypeList& newT // Save it in the AST for linker use. trackLinkage(*block); -#endif // GLSLANG_WEB } void TParseContext::paramCheckFixStorage(const TSourceLoc& loc, const TStorageQualifier& qualifier, TType& type) @@ -5019,6 +5195,7 @@ void TParseContext::paramCheckFixStorage(const TSourceLoc& loc, const TStorageQu case EvqIn: case EvqOut: case EvqInOut: + case EvqTileImageEXT: type.getQualifier().storage = qualifier; break; case EvqGlobal: @@ -5034,7 +5211,6 @@ void TParseContext::paramCheckFixStorage(const TSourceLoc& loc, const TStorageQu void TParseContext::paramCheckFix(const TSourceLoc& loc, const TQualifier& qualifier, TType& type) { -#ifndef GLSLANG_WEB if (qualifier.isMemory()) { type.getQualifier().volatil = qualifier.volatil; type.getQualifier().coherent = qualifier.coherent; @@ -5048,7 +5224,6 @@ void TParseContext::paramCheckFix(const TSourceLoc& loc, const TQualifier& quali type.getQualifier().writeonly = qualifier.writeonly; type.getQualifier().restrict = qualifier.restrict; } -#endif if (qualifier.isAuxiliary() || qualifier.isInterpolation()) @@ -5065,7 +5240,6 @@ void TParseContext::paramCheckFix(const TSourceLoc& loc, const TQualifier& quali } if (qualifier.isNonUniform()) type.getQualifier().nonUniform = qualifier.nonUniform; -#ifndef GLSLANG_WEB if (qualifier.isSpirvByReference()) type.getQualifier().setSpirvByReference(); if (qualifier.isSpirvLiteral()) { @@ -5074,7 +5248,6 @@ void TParseContext::paramCheckFix(const TSourceLoc& loc, const TQualifier& quali type.getQualifier().setSpirvLiteral(); else error(loc, "cannot use spirv_literal qualifier", type.getBasicTypeString().c_str(), ""); -#endif } paramCheckFixStorage(loc, qualifier.storage, type); @@ -5105,21 +5278,18 @@ void TParseContext::arrayObjectCheck(const TSourceLoc& loc, const TType& type, c void TParseContext::opaqueCheck(const TSourceLoc& loc, const TType& type, const char* op) { - if (containsFieldWithBasicType(type, EbtSampler)) + if (containsFieldWithBasicType(type, EbtSampler) && !extensionTurnedOn(E_GL_ARB_bindless_texture)) error(loc, "can't use with samplers or structs containing samplers", op, ""); } void TParseContext::referenceCheck(const TSourceLoc& loc, const TType& type, const char* op) { -#ifndef GLSLANG_WEB if (containsFieldWithBasicType(type, EbtReference)) error(loc, "can't use with reference types", op, ""); -#endif } void TParseContext::storage16BitAssignmentCheck(const TSourceLoc& loc, const TType& type, const char* op) { -#ifndef GLSLANG_WEB if (type.getBasicType() == EbtStruct && containsFieldWithBasicType(type, EbtFloat16)) requireFloat16Arithmetic(loc, op, "can't use with structs containing float16"); @@ -5149,7 +5319,6 @@ void TParseContext::storage16BitAssignmentCheck(const TSourceLoc& loc, const TTy if (type.isArray() && type.getBasicType() == EbtUint8) requireInt8Arithmetic(loc, op, "can't use with arrays containing uint8"); -#endif } void TParseContext::specializationCheck(const TSourceLoc& loc, const TType& type, const char* op) @@ -5201,7 +5370,6 @@ void TParseContext::structTypeCheck(const TSourceLoc& /*loc*/, TPublicType& publ // void TParseContext::inductiveLoopCheck(const TSourceLoc& loc, TIntermNode* init, TIntermLoop* loop) { -#ifndef GLSLANG_WEB // loop index init must exist and be a declaration, which shows up in the AST as an aggregate of size 1 of the declaration bool badInit = false; if (! init || ! init->getAsAggregate() || init->getAsAggregate()->getSequence().size() != 1) @@ -5297,10 +5465,8 @@ void TParseContext::inductiveLoopCheck(const TSourceLoc& loc, TIntermNode* init, // the body inductiveLoopBodyCheck(loop->getBody(), loopIndex, symbolTable); -#endif } -#ifndef GLSLANG_WEB // Do limit checks for built-in arrays. void TParseContext::arrayLimitCheck(const TSourceLoc& loc, const TString& identifier, int size) { @@ -5315,7 +5481,6 @@ void TParseContext::arrayLimitCheck(const TSourceLoc& loc, const TString& identi else if (identifier.compare("gl_CullDistancePerViewNV") == 0) limitCheck(loc, size, "gl_MaxCullDistances", "gl_CullDistancePerViewNV array size"); } -#endif // GLSLANG_WEB // See if the provided value is less than or equal to the symbol indicated by limit, // which should be a constant in the symbol table. @@ -5329,8 +5494,6 @@ void TParseContext::limitCheck(const TSourceLoc& loc, int value, const char* lim error(loc, "must be less than or equal to", feature, "%s (%d)", limit, constArray[0].getIConst()); } -#ifndef GLSLANG_WEB - // // Do any additional error checking, etc., once we know the parsing is done. // @@ -5396,7 +5559,6 @@ void TParseContext::finish() } } } -#endif // GLSLANG_WEB // // Layout qualifier stuff. @@ -5440,7 +5602,6 @@ void TParseContext::setLayoutQualifier(const TSourceLoc& loc, TPublicType& publi publicType.qualifier.layoutPacking = ElpStd140; return; } -#ifndef GLSLANG_WEB if (id == TQualifier::getLayoutPackingString(ElpStd430)) { requireProfile(loc, EEsProfile | ECoreProfile | ECompatibilityProfile, "std430"); profileRequires(loc, ECoreProfile | ECompatibilityProfile, 430, E_GL_ARB_shader_storage_buffer_object, "std430"); @@ -5480,6 +5641,28 @@ void TParseContext::setLayoutQualifier(const TSourceLoc& loc, TPublicType& publi intermediate.setUsePhysicalStorageBuffer(); return; } + if (id == "bindless_sampler") { + requireExtensions(loc, 1, &E_GL_ARB_bindless_texture, "bindless_sampler"); + publicType.qualifier.layoutBindlessSampler = true; + intermediate.setBindlessTextureMode(currentCaller, AstRefTypeLayout); + return; + } + if (id == "bindless_image") { + requireExtensions(loc, 1, &E_GL_ARB_bindless_texture, "bindless_image"); + publicType.qualifier.layoutBindlessImage = true; + intermediate.setBindlessImageMode(currentCaller, AstRefTypeLayout); + return; + } + if (id == "bound_sampler") { + requireExtensions(loc, 1, &E_GL_ARB_bindless_texture, "bound_sampler"); + publicType.qualifier.layoutBindlessSampler = false; + return; + } + if (id == "bound_image") { + requireExtensions(loc, 1, &E_GL_ARB_bindless_texture, "bound_image"); + publicType.qualifier.layoutBindlessImage = false; + return; + } if (language == EShLangGeometry || language == EShLangTessEvaluation || language == EShLangMesh) { if (id == TQualifier::getGeometryString(ElgTriangles)) { publicType.shaderQualifiers.geometry = ElgTriangles; @@ -5604,6 +5787,22 @@ void TParseContext::setLayoutQualifier(const TSourceLoc& loc, TPublicType& publi publicType.shaderQualifiers.postDepthCoverage = true; return; } + /* id is transformed into lower case in the beginning of this function. */ + if (id == "non_coherent_color_attachment_readext") { + requireExtensions(loc, 1, &E_GL_EXT_shader_tile_image, "non_coherent_color_attachment_readEXT"); + publicType.shaderQualifiers.nonCoherentColorAttachmentReadEXT = true; + return; + } + if (id == "non_coherent_depth_attachment_readext") { + requireExtensions(loc, 1, &E_GL_EXT_shader_tile_image, "non_coherent_depth_attachment_readEXT"); + publicType.shaderQualifiers.nonCoherentDepthAttachmentReadEXT = true; + return; + } + if (id == "non_coherent_stencil_attachment_readext") { + requireExtensions(loc, 1, &E_GL_EXT_shader_tile_image, "non_coherent_stencil_attachment_readEXT"); + publicType.shaderQualifiers.nonCoherentStencilAttachmentReadEXT = true; + return; + } for (TLayoutDepth depth = (TLayoutDepth)(EldNone + 1); depth < EldCount; depth = (TLayoutDepth)(depth+1)) { if (id == TQualifier::getLayoutDepthString(depth)) { requireProfile(loc, ECoreProfile | ECompatibilityProfile, "depth layout qualifier"); @@ -5674,6 +5873,10 @@ void TParseContext::setLayoutQualifier(const TSourceLoc& loc, TPublicType& publi } publicType.qualifier.layoutShaderRecord = true; return; + } else if (id == "hitobjectshaderrecordnv") { + requireExtensions(loc, 1, &E_GL_NV_shader_invocation_reorder, "hitobject shader record NV"); + publicType.qualifier.layoutHitObjectShaderRecordNV = true; + return; } } @@ -5696,7 +5899,6 @@ void TParseContext::setLayoutQualifier(const TSourceLoc& loc, TPublicType& publi publicType.shaderQualifiers.layoutPrimitiveCulling = true; return; } -#endif error(loc, "unrecognized layout identifier, or qualifier requires assignment (e.g., binding = 4)", id.c_str(), ""); } @@ -5784,10 +5986,8 @@ void TParseContext::setLayoutQualifier(const TSourceLoc& loc, TPublicType& publi error(loc, "needs a literal integer", "set", ""); return; } else if (id == "binding") { -#ifndef GLSLANG_WEB profileRequires(loc, ~EEsProfile, 420, E_GL_ARB_shading_language_420pack, "binding"); profileRequires(loc, EEsProfile, 310, nullptr, "binding"); -#endif if ((unsigned int)value >= TQualifier::layoutBindingEnd) error(loc, "binding is too large", id.c_str(), ""); else @@ -5810,7 +6010,6 @@ void TParseContext::setLayoutQualifier(const TSourceLoc& loc, TPublicType& publi error(loc, "needs a literal integer", "constant_id", ""); return; } -#ifndef GLSLANG_WEB if (id == "component") { requireProfile(loc, ECoreProfile | ECompatibilityProfile, "component"); profileRequires(loc, ECoreProfile | ECompatibilityProfile, 440, E_GL_ARB_enhanced_layouts, "component"); @@ -5908,10 +6107,8 @@ void TParseContext::setLayoutQualifier(const TSourceLoc& loc, TPublicType& publi error(loc, "needs a literal integer", "buffer_reference_align", ""); return; } -#endif switch (language) { -#ifndef GLSLANG_WEB case EShLangTessControl: if (id == "vertices") { if (value == 0) @@ -6008,17 +6205,14 @@ void TParseContext::setLayoutQualifier(const TSourceLoc& loc, TPublicType& publi case EShLangTask: // Fall through -#endif case EShLangCompute: if (id.compare(0, 11, "local_size_") == 0) { -#ifndef GLSLANG_WEB if (language == EShLangMesh || language == EShLangTask) { requireExtensions(loc, Num_AEP_mesh_shader, AEP_mesh_shader, "gl_WorkGroupSize"); } else { profileRequires(loc, EEsProfile, 310, nullptr, "gl_WorkGroupSize"); profileRequires(loc, ~EEsProfile, 430, E_GL_ARB_compute_shader, "gl_WorkGroupSize"); } -#endif if (nonLiteral) error(loc, "needs a literal integer", "local_size", ""); if (id.size() == 12 && value == 0) { @@ -6085,7 +6279,6 @@ void TParseContext::mergeObjectLayoutQualifiers(TQualifier& dst, const TQualifie if (src.hasPacking()) dst.layoutPacking = src.layoutPacking; -#ifndef GLSLANG_WEB if (src.hasStream()) dst.layoutStream = src.layoutStream; if (src.hasFormat()) @@ -6094,7 +6287,6 @@ void TParseContext::mergeObjectLayoutQualifiers(TQualifier& dst, const TQualifie dst.layoutXfbBuffer = src.layoutXfbBuffer; if (src.hasBufferReferenceAlign()) dst.layoutBufferReferenceAlign = src.layoutBufferReferenceAlign; -#endif if (src.hasAlign()) dst.layoutAlign = src.layoutAlign; @@ -6112,7 +6304,6 @@ void TParseContext::mergeObjectLayoutQualifiers(TQualifier& dst, const TQualifie if (src.hasSpecConstantId()) dst.layoutSpecConstantId = src.layoutSpecConstantId; -#ifndef GLSLANG_WEB if (src.hasComponent()) dst.layoutComponent = src.layoutComponent; if (src.hasIndex()) @@ -6137,11 +6328,16 @@ void TParseContext::mergeObjectLayoutQualifiers(TQualifier& dst, const TQualifie dst.layoutSecondaryViewportRelativeOffset = src.layoutSecondaryViewportRelativeOffset; if (src.layoutShaderRecord) dst.layoutShaderRecord = true; + if (src.layoutBindlessSampler) + dst.layoutBindlessSampler = true; + if (src.layoutBindlessImage) + dst.layoutBindlessImage = true; if (src.pervertexNV) dst.pervertexNV = true; if (src.pervertexEXT) dst.pervertexEXT = true; -#endif + if (src.layoutHitObjectShaderRecordNV) + dst.layoutHitObjectShaderRecordNV = true; } } @@ -6177,10 +6373,7 @@ void TParseContext::layoutObjectCheck(const TSourceLoc& loc, const TSymbol& symb switch (qualifier.storage) { case EvqVaryingIn: case EvqVaryingOut: - if (!type.getQualifier().isTaskMemory() && -#ifndef GLSLANG_WEB - !type.getQualifier().hasSprivDecorate() && -#endif + if (!type.getQualifier().isTaskMemory() && !type.getQualifier().hasSpirvDecorate() && (type.getBasicType() != EbtBlock || (!(*type.getStruct())[0].type->getQualifier().hasLocation() && (*type.getStruct())[0].type->getQualifier().builtIn == EbvNone))) @@ -6242,11 +6435,6 @@ void TParseContext::layoutMemberLocationArrayCheck(const TSourceLoc& loc, bool m // Do layout error checking with respect to a type. void TParseContext::layoutTypeCheck(const TSourceLoc& loc, const TType& type) { -#ifndef GLSLANG_WEB - if (extensionTurnedOn(E_GL_EXT_spirv_intrinsics)) - return; // Skip any check if GL_EXT_spirv_intrinsics is turned on -#endif - const TQualifier& qualifier = type.getQualifier(); // first, intra-layout qualifier-only error checking @@ -6288,18 +6476,22 @@ void TParseContext::layoutTypeCheck(const TSourceLoc& loc, const TType& type) case EvqBuffer: if (type.getBasicType() == EbtBlock) error(loc, "cannot apply to uniform or buffer block", "location", ""); + else if (type.getBasicType() == EbtSampler && type.getSampler().isAttachmentEXT()) + error(loc, "only applies to", "location", "%s with storage tileImageEXT", type.getBasicTypeString().c_str()); break; case EvqtaskPayloadSharedEXT: error(loc, "cannot apply to taskPayloadSharedEXT", "location", ""); break; -#ifndef GLSLANG_WEB case EvqPayload: case EvqPayloadIn: case EvqHitAttr: case EvqCallableData: case EvqCallableDataIn: + case EvqHitObjectAttrNV: + case EvqSpirvStorageClass: + break; + case EvqTileImageEXT: break; -#endif default: error(loc, "can only apply to uniform, buffer, in, or out storage qualifiers", "location", ""); break; @@ -6309,13 +6501,12 @@ void TParseContext::layoutTypeCheck(const TSourceLoc& loc, const TType& type) int repeated = intermediate.addUsedLocation(qualifier, type, typeCollision); if (repeated >= 0 && ! typeCollision) error(loc, "overlapping use of location", "location", "%d", repeated); - // "fragment-shader outputs ... if two variables are placed within the same + // "fragment-shader outputs/tileImageEXT ... if two variables are placed within the same // location, they must have the same underlying type (floating-point or integer)" - if (typeCollision && language == EShLangFragment && qualifier.isPipeOutput()) - error(loc, "fragment outputs sharing the same location must be the same basic type", "location", "%d", repeated); + if (typeCollision && language == EShLangFragment && (qualifier.isPipeOutput() || qualifier.storage == EvqTileImageEXT)) + error(loc, "fragment outputs or tileImageEXTs sharing the same location", "location", "%d must be the same basic type", repeated); } -#ifndef GLSLANG_WEB if (qualifier.hasXfbOffset() && qualifier.hasXfbBuffer()) { if (type.isUnsizedArray()) { error(loc, "unsized array", "xfb_offset", "in buffer %d", qualifier.layoutXfbBuffer); @@ -6344,7 +6535,6 @@ void TParseContext::layoutTypeCheck(const TSourceLoc& loc, const TType& type) if (! intermediate.setXfbBufferStride(qualifier.layoutXfbBuffer, qualifier.layoutXfbStride)) error(loc, "all stride settings must match for xfb buffer", "xfb_stride", "%d", qualifier.layoutXfbBuffer); } -#endif if (qualifier.hasBinding()) { // Binding checking, from the spec: @@ -6355,7 +6545,7 @@ void TParseContext::layoutTypeCheck(const TSourceLoc& loc, const TType& type) // an array of size N, all elements of the array from binding through binding + N - 1 must be within this // range." // - if (! type.isOpaque() && type.getBasicType() != EbtBlock) + if (!type.isOpaque() && type.getBasicType() != EbtBlock && type.getBasicType() != EbtSpirvType) error(loc, "requires block, or sampler/image, or atomic-counter type", "binding", ""); if (type.getBasicType() == EbtSampler) { int lastBinding = qualifier.layoutBinding; @@ -6364,16 +6554,12 @@ void TParseContext::layoutTypeCheck(const TSourceLoc& loc, const TType& type) if (type.isSizedArray()) lastBinding += (type.getCumulativeArraySize() - 1); else { -#ifndef GLSLANG_WEB warn(loc, "assuming binding count of one for compile-time checking of binding numbers for unsized array", "[]", ""); -#endif } } } -#ifndef GLSLANG_WEB if (spvVersion.vulkan == 0 && lastBinding >= resources.maxCombinedTextureImageUnits) error(loc, "sampler binding not less than gl_MaxCombinedTextureImageUnits", "binding", type.isArray() ? "(using array)" : ""); -#endif } if (type.isAtomic() && !spvVersion.vulkanRelaxed) { if (qualifier.layoutBinding >= (unsigned int)resources.maxAtomicCounterBindings) { @@ -6396,7 +6582,7 @@ void TParseContext::layoutTypeCheck(const TSourceLoc& loc, const TType& type) !qualifier.hasAttachment() && !qualifier.hasBufferReference()) error(loc, "uniform/buffer blocks require layout(binding=X)", "binding", ""); - else if (spvVersion.vulkan > 0 && type.getBasicType() == EbtSampler) + else if (spvVersion.vulkan > 0 && type.getBasicType() == EbtSampler && !type.getSampler().isAttachmentEXT()) error(loc, "sampler/texture/image requires layout(binding=X)", "binding", ""); } } @@ -6418,7 +6604,7 @@ void TParseContext::layoutTypeCheck(const TSourceLoc& loc, const TType& type) // Image format if (qualifier.hasFormat()) { - if (! type.isImage()) + if (! type.isImage() && !intermediate.getBindlessImageMode()) error(loc, "only apply to images", TQualifier::getLayoutFormatString(qualifier.getFormat()), ""); else { if (type.getSampler().type == EbtFloat && qualifier.getFormat() > ElfFloatGuard) @@ -6437,7 +6623,7 @@ void TParseContext::layoutTypeCheck(const TSourceLoc& loc, const TType& type) } } } - } else if (type.isImage() && ! qualifier.isWriteOnly()) { + } else if (type.isImage() && ! qualifier.isWriteOnly() && !intermediate.getBindlessImageMode()) { const char *explanation = "image variables not declared 'writeonly' and without a format layout qualifier"; requireProfile(loc, ECoreProfile | ECompatibilityProfile, explanation); profileRequires(loc, ECoreProfile | ECompatibilityProfile, 0, E_GL_EXT_shader_image_load_formatted, explanation); @@ -6458,6 +6644,8 @@ void TParseContext::layoutTypeCheck(const TSourceLoc& loc, const TType& type) // input attachment if (type.isSubpass()) { + if (extensionTurnedOn(E_GL_EXT_shader_tile_image)) + error(loc, "can not be used with GL_EXT_shader_tile_image enabled", type.getSampler().getString().c_str(), ""); if (! qualifier.hasAttachment()) error(loc, "requires an input_attachment_index layout qualifier", "subpass", ""); } else { @@ -6527,7 +6715,6 @@ void TParseContext::layoutQualifierCheck(const TSourceLoc& loc, const TQualifier // output block declarations, and output block member declarations." switch (qualifier.storage) { -#ifndef GLSLANG_WEB case EvqVaryingIn: { const char* feature = "location qualifier on input"; @@ -6562,7 +6749,6 @@ void TParseContext::layoutQualifierCheck(const TSourceLoc& loc, const TQualifier } break; } -#endif case EvqUniform: case EvqBuffer: { @@ -6625,6 +6811,14 @@ void TParseContext::layoutQualifierCheck(const TSourceLoc& loc, const TQualifier error(loc, "cannot be used with shaderRecordNV", "set", ""); } + + if (qualifier.storage == EvqTileImageEXT) { + if (qualifier.hasSet()) + error(loc, "cannot be used with tileImageEXT", "set", ""); + if (!qualifier.hasLocation()) + error(loc, "can only be used with an explicit location", "tileImageEXT", ""); + } + if (qualifier.storage == EvqHitAttr && qualifier.hasLayout()) { error(loc, "cannot apply layout qualifiers to hitAttributeNV variable", "hitAttributeNV", ""); } @@ -6633,7 +6827,6 @@ void TParseContext::layoutQualifierCheck(const TSourceLoc& loc, const TQualifier // For places that can't have shader-level layout qualifiers void TParseContext::checkNoShaderLayouts(const TSourceLoc& loc, const TShaderQualifiers& shaderQualifiers) { -#ifndef GLSLANG_WEB const char* message = "can only apply to a standalone qualifier"; if (shaderQualifiers.geometry != ElgNone) @@ -6664,6 +6857,12 @@ void TParseContext::checkNoShaderLayouts(const TSourceLoc& loc, const TShaderQua error(loc, message, "early_fragment_tests", ""); if (shaderQualifiers.postDepthCoverage) error(loc, message, "post_depth_coverage", ""); + if (shaderQualifiers.nonCoherentColorAttachmentReadEXT) + error(loc, message, "non_coherent_color_attachment_readEXT", ""); + if (shaderQualifiers.nonCoherentDepthAttachmentReadEXT) + error(loc, message, "non_coherent_depth_attachment_readEXT", ""); + if (shaderQualifiers.nonCoherentStencilAttachmentReadEXT) + error(loc, message, "non_coherent_stencil_attachment_readEXT", ""); if (shaderQualifiers.primitives != TQualifier::layoutNotSet) { if (language == EShLangMesh) error(loc, message, "max_primitives", ""); @@ -6678,14 +6877,12 @@ void TParseContext::checkNoShaderLayouts(const TSourceLoc& loc, const TShaderQua error(loc, message, TQualifier::getInterlockOrderingString(shaderQualifiers.interlockOrdering), ""); if (shaderQualifiers.layoutPrimitiveCulling) error(loc, "can only be applied as standalone", "primitive_culling", ""); -#endif } // Correct and/or advance an object's offset layout qualifier. void TParseContext::fixOffset(const TSourceLoc& loc, TSymbol& symbol) { const TQualifier& qualifier = symbol.getType().getQualifier(); -#ifndef GLSLANG_WEB if (symbol.getType().isAtomic()) { if (qualifier.hasBinding() && (int)qualifier.layoutBinding < resources.maxAtomicCounterBindings) { @@ -6719,7 +6916,6 @@ void TParseContext::fixOffset(const TSourceLoc& loc, TSymbol& symbol) atomicUintOffsets[qualifier.layoutBinding] = offset + numOffsets; } } -#endif } // @@ -6734,10 +6930,6 @@ const TFunction* TParseContext::findFunction(const TSourceLoc& loc, const TFunct return nullptr; } -#ifdef GLSLANG_WEB - return findFunctionExact(loc, call, builtIn); -#endif - const TFunction* function = nullptr; // debugPrintfEXT has var args and is in the symbol table as "debugPrintfEXT()", @@ -7064,7 +7256,6 @@ TIntermTyped* TParseContext::vkRelaxedRemapFunctionCall(const TSourceLoc& loc, T { TIntermTyped* result = nullptr; -#ifndef GLSLANG_WEB if (function->getBuiltInOp() != EOpNull) { return nullptr; } @@ -7115,7 +7306,6 @@ TIntermTyped* TParseContext::vkRelaxedRemapFunctionCall(const TSourceLoc& loc, T result = arguments->getAsTyped(); } } -#endif return result; } @@ -7124,7 +7314,6 @@ TIntermTyped* TParseContext::vkRelaxedRemapFunctionCall(const TSourceLoc& loc, T // to establish defaults. void TParseContext::declareTypeDefaults(const TSourceLoc& loc, const TPublicType& publicType) { -#ifndef GLSLANG_WEB if (publicType.basicType == EbtAtomicUint && publicType.qualifier.hasBinding()) { if (publicType.qualifier.layoutBinding >= (unsigned int)resources.maxAtomicCounterBindings) { error(loc, "atomic_uint binding is too large", "binding", ""); @@ -7141,19 +7330,51 @@ void TParseContext::declareTypeDefaults(const TSourceLoc& loc, const TPublicType if (publicType.qualifier.hasLayout() && !publicType.qualifier.hasBufferReference()) warn(loc, "useless application of layout qualifier", "layout", ""); -#endif } -bool TParseContext::vkRelaxedRemapUniformVariable(const TSourceLoc& loc, TString& identifier, const TPublicType&, +void TParseContext::coopMatTypeParametersCheck(const TSourceLoc& loc, const TPublicType& publicType) +{ + if (parsingBuiltins) + return; + if (publicType.isCoopmatKHR()) { + if (publicType.typeParameters == nullptr) { + error(loc, "coopmat missing type parameters", "", ""); + return; + } + switch (publicType.typeParameters->basicType) { + case EbtFloat: + case EbtFloat16: + case EbtInt: + case EbtInt8: + case EbtInt16: + case EbtUint: + case EbtUint8: + case EbtUint16: + break; + default: + error(loc, "coopmat invalid basic type", TType::getBasicString(publicType.typeParameters->basicType), ""); + break; + } + if (publicType.typeParameters->arraySizes->getNumDims() != 4) { + error(loc, "coopmat incorrect number of type parameters", "", ""); + return; + } + int use = publicType.typeParameters->arraySizes->getDimSize(3); + if (use < 0 || use > 2) { + error(loc, "coopmat invalid matrix Use", "", ""); + return; + } + } +} + +bool TParseContext::vkRelaxedRemapUniformVariable(const TSourceLoc& loc, TString& identifier, const TPublicType& publicType, TArraySizes*, TIntermTyped* initializer, TType& type) { + vkRelaxedRemapUniformMembers(loc, publicType, type, identifier); + if (parsingBuiltins || symbolTable.atBuiltInLevel() || !symbolTable.atGlobalLevel() || type.getQualifier().storage != EvqUniform || - !(type.containsNonOpaque() -#ifndef GLSLANG_WEB - || type.getBasicType() == EbtAtomicUint -#endif - )) { + !(type.containsNonOpaque() || type.getBasicType() == EbtAtomicUint || (type.containsSampler() && type.isStruct()))) { return false; } @@ -7182,7 +7403,6 @@ bool TParseContext::vkRelaxedRemapUniformVariable(const TSourceLoc& loc, TString int bufferBinding = TQualifier::layoutBindingEnd; TVariable* updatedBlock = nullptr; -#ifndef GLSLANG_WEB // Convert atomic_uint into members of a buffer block if (type.isAtomic()) { type.setBasicType(EbtUint); @@ -7198,7 +7418,6 @@ bool TParseContext::vkRelaxedRemapUniformVariable(const TSourceLoc& loc, TString growAtomicCounterBlock(bufferBinding, loc, type, identifier, nullptr); updatedBlock = atomicCounterBuffers[bufferBinding]; } -#endif if (!updatedBlock) { growGlobalUniformBlock(loc, type, identifier, nullptr); @@ -7229,6 +7448,251 @@ bool TParseContext::vkRelaxedRemapUniformVariable(const TSourceLoc& loc, TString return true; } +template +static void ForEachOpaque(const TType& type, const TString& path, Function callback) +{ + auto recursion = [&callback](const TType& type, const TString& path, bool skipArray, auto& recursion) -> void { + if (!skipArray && type.isArray()) + { + std::vector indices(type.getArraySizes()->getNumDims()); + for (int flatIndex = 0; + flatIndex < type.getArraySizes()->getCumulativeSize(); + ++flatIndex) + { + TString subscriptPath = path; + for (size_t dimIndex = 0; dimIndex < indices.size(); ++dimIndex) + { + int index = indices[dimIndex]; + subscriptPath.append("["); + subscriptPath.append(String(index)); + subscriptPath.append("]"); + } + + recursion(type, subscriptPath, true, recursion); + + for (size_t dimIndex = 0; dimIndex < indices.size(); ++dimIndex) + { + ++indices[dimIndex]; + if (indices[dimIndex] < type.getArraySizes()->getDimSize(dimIndex)) + break; + else + indices[dimIndex] = 0; + } + } + } + + else if (type.isStruct() && type.containsOpaque()) + { + const TTypeList& types = *type.getStruct(); + for (const TTypeLoc& typeLoc : types) + { + TString nextPath = path; + nextPath.append("."); + nextPath.append(typeLoc.type->getFieldName()); + + recursion(*(typeLoc.type), nextPath, false, recursion); + } + } + + else if (type.isOpaque()) + { + callback(type, path); + } + }; + + recursion(type, path, false, recursion); +} + +void TParseContext::vkRelaxedRemapUniformMembers(const TSourceLoc& loc, const TPublicType& publicType, const TType& type, + const TString& identifier) +{ + if (!type.isStruct() || !type.containsOpaque()) + return; + + ForEachOpaque(type, identifier, + [&publicType, &loc, this](const TType& type, const TString& path) { + TArraySizes arraySizes = {}; + if (type.getArraySizes()) arraySizes = *type.getArraySizes(); + TTypeParameters typeParameters = {}; + if (type.getTypeParameters()) typeParameters = *type.getTypeParameters(); + + TPublicType memberType{}; + memberType.basicType = type.getBasicType(); + memberType.sampler = type.getSampler(); + memberType.qualifier = type.getQualifier(); + memberType.vectorSize = type.getVectorSize(); + memberType.matrixCols = type.getMatrixCols(); + memberType.matrixRows = type.getMatrixRows(); + memberType.coopmatNV = type.isCoopMatNV(); + memberType.coopmatKHR = type.isCoopMatKHR(); + memberType.arraySizes = nullptr; + memberType.userDef = nullptr; + memberType.loc = loc; + memberType.typeParameters = (type.getTypeParameters() ? &typeParameters : nullptr); + memberType.spirvType = nullptr; + + memberType.qualifier.storage = publicType.qualifier.storage; + memberType.shaderQualifiers = publicType.shaderQualifiers; + + TString& structMemberName = *NewPoolTString(path.c_str()); // A copy is required due to declareVariable() signature. + declareVariable(loc, structMemberName, memberType, nullptr, nullptr); + }); +} + +void TParseContext::vkRelaxedRemapFunctionParameter(TFunction* function, TParameter& param, std::vector* newParams) +{ + function->addParameter(param); + + if (!param.type->isStruct() || !param.type->containsOpaque()) + return; + + ForEachOpaque(*param.type, (param.name ? *param.name : param.type->getFieldName()), + [function, param, newParams](const TType& type, const TString& path) { + TString* memberName = NewPoolTString(path.c_str()); + + TType* memberType = new TType(); + memberType->shallowCopy(type); + memberType->getQualifier().storage = param.type->getQualifier().storage; + memberType->clearArraySizes(); + + TParameter memberParam = {}; + memberParam.name = memberName; + memberParam.type = memberType; + memberParam.defaultValue = nullptr; + function->addParameter(memberParam); + if (newParams) + newParams->push_back(function->getParamCount()-1); + }); +} + +// +// Generates a valid GLSL dereferencing string for the input TIntermNode +// +struct AccessChainTraverser : public TIntermTraverser { + AccessChainTraverser() : TIntermTraverser(false, false, true) + {} + + TString path = ""; + + bool visitBinary(TVisit, TIntermBinary* binary) override { + if (binary->getOp() == EOpIndexDirectStruct) + { + const TTypeList& members = *binary->getLeft()->getType().getStruct(); + const TTypeLoc& member = + members[binary->getRight()->getAsConstantUnion()->getConstArray()[0].getIConst()]; + TString memberName = member.type->getFieldName(); + + if (path != "") + path.append("."); + + path.append(memberName); + } + + if (binary->getOp() == EOpIndexDirect) + { + const TConstUnionArray& indices = binary->getRight()->getAsConstantUnion()->getConstArray(); + for (int index = 0; index < indices.size(); ++index) + { + path.append("["); + path.append(String(indices[index].getIConst())); + path.append("]"); + } + } + + return true; + } + + void visitSymbol(TIntermSymbol* symbol) override { + if (!IsAnonymous(symbol->getName())) + path.append(symbol->getName()); + } +}; + +TIntermNode* TParseContext::vkRelaxedRemapFunctionArgument(const TSourceLoc& loc, TFunction* function, TIntermTyped* intermTyped) +{ + AccessChainTraverser accessChainTraverser{}; + intermTyped->traverse(&accessChainTraverser); + + TParameter param = { NewPoolTString(accessChainTraverser.path.c_str()), new TType }; + param.type->shallowCopy(intermTyped->getType()); + + std::vector newParams = {}; + vkRelaxedRemapFunctionParameter(function, param, &newParams); + + if (intermTyped->getType().isOpaque()) + { + TIntermNode* remappedArgument = intermTyped; + { + TIntermSymbol* intermSymbol = nullptr; + TSymbol* symbol = symbolTable.find(*param.name); + if (symbol && symbol->getAsVariable()) + intermSymbol = intermediate.addSymbol(*symbol->getAsVariable(), loc); + else + { + TVariable* variable = new TVariable(param.name, *param.type); + intermSymbol = intermediate.addSymbol(*variable, loc); + } + + remappedArgument = intermSymbol; + } + + return remappedArgument; + } + else if (!(intermTyped->isStruct() && intermTyped->getType().containsOpaque())) + return intermTyped; + else + { + TIntermNode* remappedArgument = intermTyped; + { + TSymbol* symbol = symbolTable.find(*param.name); + if (symbol && symbol->getAsVariable()) + remappedArgument = intermediate.addSymbol(*symbol->getAsVariable(), loc); + } + + if (!newParams.empty()) + remappedArgument = intermediate.makeAggregate(remappedArgument, loc); + + for (int paramIndex : newParams) + { + TParameter& newParam = function->operator[](paramIndex); + TIntermSymbol* intermSymbol = nullptr; + TSymbol* symbol = symbolTable.find(*newParam.name); + if (symbol && symbol->getAsVariable()) + intermSymbol = intermediate.addSymbol(*symbol->getAsVariable(), loc); + else + { + TVariable* variable = new TVariable(newParam.name, *newParam.type); + intermSymbol = intermediate.addSymbol(*variable, loc); + } + + remappedArgument = intermediate.growAggregate(remappedArgument, intermSymbol); + } + + return remappedArgument; + } +} + +TIntermTyped* TParseContext::vkRelaxedRemapDotDereference(const TSourceLoc&, TIntermTyped& base, const TType& member, + const TString& identifier) +{ + if (!member.isOpaque()) + return &base; + + AccessChainTraverser traverser{}; + base.traverse(&traverser); + if (!traverser.path.empty()) + traverser.path.append("."); + traverser.path.append(identifier); + + const TSymbol* symbol = symbolTable.find(traverser.path); + if (!symbol) + return &base; + + TIntermTyped* result = intermediate.addSymbol(*symbol->getAsVariable()); + result->setType(symbol->getType()); + return result; +} + // // Do everything necessary to handle a variable (non-block) declaration. // Either redeclaring a variable, or making a new one, updating the symbol @@ -7253,32 +7717,49 @@ TIntermNode* TParseContext::declareVariable(const TSourceLoc& loc, TString& iden if (initializer) { if (type.getBasicType() == EbtRayQuery) { error(loc, "ray queries can only be initialized by using the rayQueryInitializeEXT intrinsic:", "=", identifier.c_str()); + } else if (type.getBasicType() == EbtHitObjectNV) { + error(loc, "hit objects cannot be initialized using initializers", "=", identifier.c_str()); } + } - if (type.isCoopMat()) { + if (type.isCoopMatKHR()) { intermediate.setUseVulkanMemoryModel(); intermediate.setUseStorageBuffer(); - if (!publicType.typeParameters || publicType.typeParameters->getNumDims() != 4) { + if (!publicType.typeParameters || !publicType.typeParameters->arraySizes || + publicType.typeParameters->arraySizes->getNumDims() != 3) { + error(loc, "unexpected number type parameters", identifier.c_str(), ""); + } + if (publicType.typeParameters) { + if (!isTypeFloat(publicType.typeParameters->basicType) && !isTypeInt(publicType.typeParameters->basicType)) { + error(loc, "expected 8, 16, 32, or 64 bit signed or unsigned integer or 16, 32, or 64 bit float type", identifier.c_str(), ""); + } + } + } + else if (type.isCoopMatNV()) { + intermediate.setUseVulkanMemoryModel(); + intermediate.setUseStorageBuffer(); + + if (!publicType.typeParameters || publicType.typeParameters->arraySizes->getNumDims() != 4) { error(loc, "expected four type parameters", identifier.c_str(), ""); } if (publicType.typeParameters) { if (isTypeFloat(publicType.basicType) && - publicType.typeParameters->getDimSize(0) != 16 && - publicType.typeParameters->getDimSize(0) != 32 && - publicType.typeParameters->getDimSize(0) != 64) { + publicType.typeParameters->arraySizes->getDimSize(0) != 16 && + publicType.typeParameters->arraySizes->getDimSize(0) != 32 && + publicType.typeParameters->arraySizes->getDimSize(0) != 64) { error(loc, "expected 16, 32, or 64 bits for first type parameter", identifier.c_str(), ""); } if (isTypeInt(publicType.basicType) && - publicType.typeParameters->getDimSize(0) != 8 && - publicType.typeParameters->getDimSize(0) != 32) { - error(loc, "expected 8 or 32 bits for first type parameter", identifier.c_str(), ""); + publicType.typeParameters->arraySizes->getDimSize(0) != 8 && + publicType.typeParameters->arraySizes->getDimSize(0) != 16 && + publicType.typeParameters->arraySizes->getDimSize(0) != 32) { + error(loc, "expected 8, 16, or 32 bits for first type parameter", identifier.c_str(), ""); } } - } else { - if (publicType.typeParameters && publicType.typeParameters->getNumDims() != 0) { + if (publicType.typeParameters && publicType.typeParameters->arraySizes->getNumDims() != 0) { error(loc, "unexpected type parameters", identifier.c_str(), ""); } } @@ -7293,11 +7774,9 @@ TIntermNode* TParseContext::declareVariable(const TSourceLoc& loc, TString& iden samplerCheck(loc, type, identifier, initializer); transparentOpaqueCheck(loc, type, identifier); -#ifndef GLSLANG_WEB atomicUintCheck(loc, type, identifier); accStructCheck(loc, type, identifier); checkAndResizeMeshViewDim(loc, type, /*isBlockMember*/ false); -#endif if (type.getQualifier().storage == EvqConst && type.containsReference()) { error(loc, "variables with reference type can't have qualifier 'const'", "qualifier", ""); } @@ -7400,14 +7879,12 @@ TIntermNode* TParseContext::declareVariable(const TSourceLoc& loc, TString& iden // Pick up global defaults from the provide global defaults into dst. void TParseContext::inheritGlobalDefaults(TQualifier& dst) const { -#ifndef GLSLANG_WEB if (dst.storage == EvqVaryingOut) { if (! dst.hasStream() && language == EShLangGeometry) dst.layoutStream = globalOutputDefaults.layoutStream; if (! dst.hasXfbBuffer()) dst.layoutXfbBuffer = globalOutputDefaults.layoutXfbBuffer; } -#endif } // @@ -7436,9 +7913,7 @@ TVariable* TParseContext::declareNonArray(const TSourceLoc& loc, const TString& // make a new variable TVariable* variable = new TVariable(&identifier, type); -#ifndef GLSLANG_WEB ioArrayCheck(loc, type, identifier); -#endif // add variable to symbol table if (symbolTable.insert(*variable)) { @@ -7515,9 +7990,7 @@ TIntermNode* TParseContext::executeInitializer(const TSourceLoc& loc, TIntermTyp TType skeletalType; skeletalType.shallowCopy(variable->getType()); skeletalType.getQualifier().makeTemporary(); -#ifndef GLSLANG_WEB initializer = convertInitializerList(loc, skeletalType, initializer); -#endif if (! initializer) { // error recovery; don't leave const without constant values if (qualifier == EvqConst) @@ -7745,12 +8218,14 @@ TIntermTyped* TParseContext::addConstructor(const TSourceLoc& loc, TIntermNode* // Combined texture-sampler constructors are completely semantic checked // in constructorTextureSamplerError() if (op == EOpConstructTextureSampler) { - if (aggrNode->getSequence()[1]->getAsTyped()->getType().getSampler().shadow) { - // Transfer depth into the texture (SPIR-V image) type, as a hint - // for tools to know this texture/image is a depth image. - aggrNode->getSequence()[0]->getAsTyped()->getWritableType().getSampler().shadow = true; + if (aggrNode != nullptr) { + if (aggrNode->getSequence()[1]->getAsTyped()->getType().getSampler().shadow) { + // Transfer depth into the texture (SPIR-V image) type, as a hint + // for tools to know this texture/image is a depth image. + aggrNode->getSequence()[0]->getAsTyped()->getWritableType().getSampler().shadow = true; + } + return intermediate.setAggregateOperator(aggrNode, op, type, loc); } - return intermediate.setAggregateOperator(aggrNode, op, type, loc); } TTypeList::const_iterator memberTypes; @@ -7885,6 +8360,16 @@ TIntermTyped* TParseContext::constructBuiltIn(const TType& type, TOperator op, T TIntermTyped* newNode = intermediate.addBuiltInFunctionCall(node->getLoc(), EOpConvPtrToUvec2, true, node, type); return newNode; + } else if (node->getType().getBasicType() == EbtSampler) { + requireExtensions(loc, 1, &E_GL_ARB_bindless_texture, "sampler conversion to uvec2"); + // force the basic type of the constructor param to uvec2, otherwise spv builder will + // report some errors + TIntermTyped* newSrcNode = intermediate.createConversion(EbtUint, node); + newSrcNode->getAsTyped()->getWritableType().setVectorSize(2); + + TIntermTyped* newNode = + intermediate.addBuiltInFunctionCall(node->getLoc(), EOpConstructUVec2, false, newSrcNode, type); + return newNode; } case EOpConstructUVec3: case EOpConstructUVec4: @@ -7898,9 +8383,15 @@ TIntermTyped* TParseContext::constructBuiltIn(const TType& type, TOperator op, T case EOpConstructBool: basicOp = EOpConstructBool; break; - -#ifndef GLSLANG_WEB - + case EOpConstructTextureSampler: + if ((node->getType().getBasicType() == EbtUint || node->getType().getBasicType() == EbtInt) && + node->getType().getVectorSize() == 2) { + requireExtensions(loc, 1, &E_GL_ARB_bindless_texture, "ivec2/uvec2 convert to texture handle"); + // No matter ivec2 or uvec2, Set EOpPackUint2x32 just to generate an opBitcast op code + TIntermTyped* newNode = + intermediate.addBuiltInFunctionCall(node->getLoc(), EOpPackUint2x32, true, node, type); + return newNode; + } case EOpConstructDVec2: case EOpConstructDVec3: case EOpConstructDVec4: @@ -8086,14 +8577,18 @@ TIntermTyped* TParseContext::constructBuiltIn(const TType& type, TOperator op, T return nullptr; } - case EOpConstructCooperativeMatrix: + case EOpConstructCooperativeMatrixNV: + case EOpConstructCooperativeMatrixKHR: + if (node->getType() == type) { + return node; + } if (!node->getType().isCoopMat()) { if (type.getBasicType() != node->getType().getBasicType()) { node = intermediate.addConversion(type.getBasicType(), node); if (node == nullptr) return nullptr; } - node = intermediate.setAggregateOperator(node, EOpConstructCooperativeMatrix, type, node->getLoc()); + node = intermediate.setAggregateOperator(node, op, type, node->getLoc()); } else { TOperator op = EOpNull; switch (type.getBasicType()) { @@ -8106,6 +8601,8 @@ TIntermTyped* TParseContext::constructBuiltIn(const TType& type, TOperator op, T case EbtFloat16: op = EOpConvFloat16ToInt; break; case EbtUint8: op = EOpConvUint8ToInt; break; case EbtInt8: op = EOpConvInt8ToInt; break; + case EbtUint16: op = EOpConvUint16ToInt; break; + case EbtInt16: op = EOpConvInt16ToInt; break; case EbtUint: op = EOpConvUintToInt; break; default: assert(0); } @@ -8116,8 +8613,33 @@ TIntermTyped* TParseContext::constructBuiltIn(const TType& type, TOperator op, T case EbtFloat16: op = EOpConvFloat16ToUint; break; case EbtUint8: op = EOpConvUint8ToUint; break; case EbtInt8: op = EOpConvInt8ToUint; break; + case EbtUint16: op = EOpConvUint16ToUint; break; + case EbtInt16: op = EOpConvInt16ToUint; break; case EbtInt: op = EOpConvIntToUint; break; - case EbtUint: op = EOpConvUintToInt8; break; + default: assert(0); + } + break; + case EbtInt16: + switch (node->getType().getBasicType()) { + case EbtFloat: op = EOpConvFloatToInt16; break; + case EbtFloat16: op = EOpConvFloat16ToInt16; break; + case EbtUint8: op = EOpConvUint8ToInt16; break; + case EbtInt8: op = EOpConvInt8ToInt16; break; + case EbtUint16: op = EOpConvUint16ToInt16; break; + case EbtInt: op = EOpConvIntToInt16; break; + case EbtUint: op = EOpConvUintToInt16; break; + default: assert(0); + } + break; + case EbtUint16: + switch (node->getType().getBasicType()) { + case EbtFloat: op = EOpConvFloatToUint16; break; + case EbtFloat16: op = EOpConvFloat16ToUint16; break; + case EbtUint8: op = EOpConvUint8ToUint16; break; + case EbtInt8: op = EOpConvInt8ToUint16; break; + case EbtInt16: op = EOpConvInt16ToUint16; break; + case EbtInt: op = EOpConvIntToUint16; break; + case EbtUint: op = EOpConvUintToUint16; break; default: assert(0); } break; @@ -8126,6 +8648,8 @@ TIntermTyped* TParseContext::constructBuiltIn(const TType& type, TOperator op, T case EbtFloat: op = EOpConvFloatToInt8; break; case EbtFloat16: op = EOpConvFloat16ToInt8; break; case EbtUint8: op = EOpConvUint8ToInt8; break; + case EbtInt16: op = EOpConvInt16ToInt8; break; + case EbtUint16: op = EOpConvUint16ToInt8; break; case EbtInt: op = EOpConvIntToInt8; break; case EbtUint: op = EOpConvUintToInt8; break; default: assert(0); @@ -8136,6 +8660,8 @@ TIntermTyped* TParseContext::constructBuiltIn(const TType& type, TOperator op, T case EbtFloat: op = EOpConvFloatToUint8; break; case EbtFloat16: op = EOpConvFloat16ToUint8; break; case EbtInt8: op = EOpConvInt8ToUint8; break; + case EbtInt16: op = EOpConvInt16ToUint8; break; + case EbtUint16: op = EOpConvUint16ToUint8; break; case EbtInt: op = EOpConvIntToUint8; break; case EbtUint: op = EOpConvUintToUint8; break; default: assert(0); @@ -8146,6 +8672,8 @@ TIntermTyped* TParseContext::constructBuiltIn(const TType& type, TOperator op, T case EbtFloat16: op = EOpConvFloat16ToFloat; break; case EbtInt8: op = EOpConvInt8ToFloat; break; case EbtUint8: op = EOpConvUint8ToFloat; break; + case EbtInt16: op = EOpConvInt16ToFloat; break; + case EbtUint16: op = EOpConvUint16ToFloat; break; case EbtInt: op = EOpConvIntToFloat; break; case EbtUint: op = EOpConvUintToFloat; break; default: assert(0); @@ -8156,6 +8684,8 @@ TIntermTyped* TParseContext::constructBuiltIn(const TType& type, TOperator op, T case EbtFloat: op = EOpConvFloatToFloat16; break; case EbtInt8: op = EOpConvInt8ToFloat16; break; case EbtUint8: op = EOpConvUint8ToFloat16; break; + case EbtInt16: op = EOpConvInt16ToFloat16; break; + case EbtUint16: op = EOpConvUint16ToFloat16; break; case EbtInt: op = EOpConvIntToFloat16; break; case EbtUint: op = EOpConvUintToFloat16; break; default: assert(0); @@ -8184,7 +8714,6 @@ TIntermTyped* TParseContext::constructBuiltIn(const TType& type, TOperator op, T type); } else return nullptr; -#endif // GLSLANG_WEB default: error(loc, "unsupported construction", "", ""); @@ -8231,7 +8760,6 @@ TIntermTyped* TParseContext::constructAggregate(TIntermNode* node, const TType& // If a memory qualifier is present in 'to', also make it present in 'from'. void TParseContext::inheritMemoryQualifiers(const TQualifier& from, TQualifier& to) { -#ifndef GLSLANG_WEB if (from.isReadOnly()) to.readonly = from.readonly; if (from.isWriteOnly()) @@ -8242,7 +8770,30 @@ void TParseContext::inheritMemoryQualifiers(const TQualifier& from, TQualifier& to.volatil = from.volatil; if (from.restrict) to.restrict = from.restrict; -#endif +} + +// +// Update qualifier layoutBindlessImage & layoutBindlessSampler on block member +// +void TParseContext::updateBindlessQualifier(TType& memberType) +{ + if (memberType.containsSampler()) { + if (memberType.isStruct()) { + TTypeList* typeList = memberType.getWritableStruct(); + for (unsigned int member = 0; member < typeList->size(); ++member) { + TType* subMemberType = (*typeList)[member].type; + updateBindlessQualifier(*subMemberType); + } + } + else if (memberType.getSampler().isImage()) { + intermediate.setBindlessImageMode(currentCaller, AstRefTypeLayout); + memberType.getQualifier().layoutBindlessImage = true; + } + else { + intermediate.setBindlessTextureMode(currentCaller, AstRefTypeLayout); + memberType.getQualifier().layoutBindlessSampler = true; + } + } } // @@ -8271,7 +8822,6 @@ void TParseContext::declareBlock(const TSourceLoc& loc, TTypeList& typeList, con error(memberLoc, "member storage qualifier cannot contradict block storage qualifier", memberType.getFieldName().c_str(), ""); memberQualifier.storage = currentBlockQualifier.storage; globalQualifierFixCheck(memberLoc, memberQualifier); -#ifndef GLSLANG_WEB inheritMemoryQualifiers(currentBlockQualifier, memberQualifier); if (currentBlockQualifier.perPrimitiveNV) memberQualifier.perPrimitiveNV = currentBlockQualifier.perPrimitiveNV; @@ -8283,9 +8833,8 @@ void TParseContext::declareBlock(const TSourceLoc& loc, TTypeList& typeList, con memberQualifier.storage = EvqtaskPayloadSharedEXT; if (memberQualifier.storage == EvqSpirvStorageClass) error(memberLoc, "member cannot have a spirv_storage_class qualifier", memberType.getFieldName().c_str(), ""); - if (memberQualifier.hasSprivDecorate() && !memberQualifier.getSpirvDecorate().decorateIds.empty()) + if (memberQualifier.hasSpirvDecorate() && !memberQualifier.getSpirvDecorate().decorateIds.empty()) error(memberLoc, "member cannot have a spirv_decorate_id qualifier", memberType.getFieldName().c_str(), ""); -#endif if ((currentBlockQualifier.storage == EvqUniform || currentBlockQualifier.storage == EvqBuffer) && (memberQualifier.isInterpolation() || memberQualifier.isAuxiliary())) error(memberLoc, "member of uniform or buffer block cannot have an auxiliary or interpolation qualifier", memberType.getFieldName().c_str(), ""); if (memberType.isArray()) @@ -8297,8 +8846,13 @@ void TParseContext::declareBlock(const TSourceLoc& loc, TTypeList& typeList, con } } - if (memberType.containsOpaque()) - error(memberLoc, "member of block cannot be or contain a sampler, image, or atomic_uint type", typeList[member].type->getFieldName().c_str(), ""); + // For bindless texture, sampler can be declared as uniform/storage block member, + if (memberType.containsOpaque()) { + if (memberType.containsSampler() && extensionTurnedOn(E_GL_ARB_bindless_texture)) + updateBindlessQualifier(memberType); + else + error(memberLoc, "member of block cannot be or contain a sampler, image, or atomic_uint type", typeList[member].type->getFieldName().c_str(), ""); + } if (memberType.containsCoopMat()) error(memberLoc, "member of block cannot be or contain a cooperative matrix type", typeList[member].type->getFieldName().c_str(), ""); @@ -8360,7 +8914,6 @@ void TParseContext::declareBlock(const TSourceLoc& loc, TTypeList& typeList, con for (unsigned int member = 0; member < typeList.size(); ++member) { TQualifier& memberQualifier = typeList[member].type->getQualifier(); const TSourceLoc& memberLoc = typeList[member].loc; -#ifndef GLSLANG_WEB if (memberQualifier.hasStream()) { if (defaultQualification.layoutStream != memberQualifier.layoutStream) error(memberLoc, "member cannot contradict block", "stream", ""); @@ -8374,14 +8927,12 @@ void TParseContext::declareBlock(const TSourceLoc& loc, TTypeList& typeList, con if (defaultQualification.layoutXfbBuffer != memberQualifier.layoutXfbBuffer) error(memberLoc, "member cannot contradict block (or what block inherited from global)", "xfb_buffer", ""); } -#endif if (memberQualifier.hasPacking()) error(memberLoc, "member of block cannot have a packing layout qualifier", typeList[member].type->getFieldName().c_str(), ""); if (memberQualifier.hasLocation()) { const char* feature = "location on block member"; switch (currentBlockQualifier.storage) { -#ifndef GLSLANG_WEB case EvqVaryingIn: case EvqVaryingOut: requireProfile(memberLoc, ECoreProfile | ECompatibilityProfile | EEsProfile, feature); @@ -8389,7 +8940,6 @@ void TParseContext::declareBlock(const TSourceLoc& loc, TTypeList& typeList, con profileRequires(memberLoc, EEsProfile, 320, Num_AEP_shader_io_blocks, AEP_shader_io_blocks, feature); memberWithLocation = true; break; -#endif default: error(memberLoc, "can only use in an in/out block", feature, ""); break; @@ -8417,7 +8967,6 @@ void TParseContext::declareBlock(const TSourceLoc& loc, TTypeList& typeList, con layoutMemberLocationArrayCheck(loc, memberWithLocation, arraySizes); -#ifndef GLSLANG_WEB // Ensure that the block has an XfbBuffer assigned. This is needed // because if the block has a XfbOffset assigned, then it is // assumed that it has implicitly assigned the current global @@ -8427,7 +8976,6 @@ void TParseContext::declareBlock(const TSourceLoc& loc, TTypeList& typeList, con if (!currentBlockQualifier.hasXfbBuffer() && currentBlockQualifier.hasXfbOffset()) currentBlockQualifier.layoutXfbBuffer = globalOutputDefaults.layoutXfbBuffer; } -#endif // Process the members fixBlockLocations(loc, currentBlockQualifier, typeList, memberWithLocation, memberWithoutLocation); @@ -8438,13 +8986,11 @@ void TParseContext::declareBlock(const TSourceLoc& loc, TTypeList& typeList, con for (unsigned int member = 0; member < typeList.size(); ++member) layoutTypeCheck(typeList[member].loc, *typeList[member].type); -#ifndef GLSLANG_WEB if (memberWithPerViewQualifier) { for (unsigned int member = 0; member < typeList.size(); ++member) { checkAndResizeMeshViewDim(typeList[member].loc, *typeList[member].type, /*isBlockMember*/ true); } } -#endif // reverse merge, so that currentBlockQualifier now has all layout information // (can't use defaultQualification directly, it's missing other non-layout-default-class qualifiers) @@ -8458,7 +9004,6 @@ void TParseContext::declareBlock(const TSourceLoc& loc, TTypeList& typeList, con if (arraySizes != nullptr) blockType.transferArraySizes(arraySizes); -#ifndef GLSLANG_WEB if (arraySizes == nullptr) ioArrayCheck(loc, blockType, instanceName ? *instanceName : *blockName); if (currentBlockQualifier.hasBufferReference()) { @@ -8485,9 +9030,7 @@ void TParseContext::declareBlock(const TSourceLoc& loc, TTypeList& typeList, con if (!instanceName) { return; } - } else -#endif - { + } else { // // Don't make a user-defined type out of block name; that will cause an error // if the same block name gets reused in a different interface. @@ -8535,14 +9078,12 @@ void TParseContext::declareBlock(const TSourceLoc& loc, TTypeList& typeList, con // Check for general layout qualifier errors layoutObjectCheck(loc, variable); -#ifndef GLSLANG_WEB // fix up if (isIoResizeArray(blockType)) { ioArraySymbolResizeList.push_back(&variable); checkIoArraysConsistency(loc, true); } else fixIoArraySize(loc, variable.getWritableType()); -#endif // Save it in the AST for linker use. trackLinkage(variable); @@ -8607,7 +9148,6 @@ void TParseContext::blockStageIoCheck(const TSourceLoc& loc, const TQualifier& q } profileRequires(loc, EEsProfile | ECoreProfile | ECompatibilityProfile, 0, E_GL_EXT_shared_memory_block, "shared block"); break; -#ifndef GLSLANG_WEB case EvqPayload: profileRequires(loc, ~EEsProfile, 460, 2, extsrt, "rayPayloadNV block"); requireStage(loc, (EShLanguageMask)(EShLangRayGenMask | EShLangAnyHitMask | EShLangClosestHitMask | EShLangMissMask), @@ -8631,7 +9171,10 @@ void TParseContext::blockStageIoCheck(const TSourceLoc& loc, const TQualifier& q profileRequires(loc, ~EEsProfile, 460, 2, extsrt, "callableDataInNV block"); requireStage(loc, (EShLanguageMask)(EShLangCallableMask), "callableDataInNV block"); break; -#endif + case EvqHitObjectAttrNV: + profileRequires(loc, ~EEsProfile, 460, E_GL_NV_shader_invocation_reorder, "hitObjectAttributeNV block"); + requireStage(loc, (EShLanguageMask)(EShLangRayGenMask | EShLangClosestHitMask | EShLangMissMask), "hitObjectAttributeNV block"); + break; default: error(loc, "only uniform, buffer, in, or out blocks are supported", blockName->c_str(), ""); break; @@ -8720,7 +9263,6 @@ void TParseContext::fixBlockLocations(const TSourceLoc& loc, TQualifier& qualifi void TParseContext::fixXfbOffsets(TQualifier& qualifier, TTypeList& typeList) { -#ifndef GLSLANG_WEB // "If a block is qualified with xfb_offset, all its // members are assigned transform feedback buffer offsets. If a block is not qualified with xfb_offset, any // members of that block not qualified with an xfb_offset will not be assigned transform feedback buffer @@ -8754,7 +9296,6 @@ void TParseContext::fixXfbOffsets(TQualifier& qualifier, TTypeList& typeList) // The above gave all block members an offset, so we can take it off the block now, // which will avoid double counting the offset usage. qualifier.layoutXfbOffset = TQualifier::layoutXfbOffsetEnd; -#endif } // Calculate and save the offset of each block member, using the recursively @@ -8787,7 +9328,8 @@ void TParseContext::fixBlockUniformOffsets(TQualifier& qualifier, TTypeList& typ // "The specified offset must be a multiple // of the base alignment of the type of the block member it qualifies, or a compile-time error results." if (! IsMultipleOfPow2(memberQualifier.layoutOffset, memberAlignment)) - error(memberLoc, "must be a multiple of the member's alignment", "offset", ""); + error(memberLoc, "must be a multiple of the member's alignment", "offset", + "(layout offset = %d | member alignment = %d)", memberQualifier.layoutOffset, memberAlignment); // GLSL: "It is a compile-time error to specify an offset that is smaller than the offset of the previous // member in the block or that lies within the previous member of the block" @@ -8930,7 +9472,7 @@ void TParseContext::addQualifierToExisting(const TSourceLoc& loc, TQualifier qua // TParseContext::declareBlock. if (!symbol && qualifier.hasBufferReference()) { TTypeList typeList; - TType blockType(&typeList, identifier, qualifier);; + TType blockType(&typeList, identifier, qualifier); TType blockNameType(EbtReference, blockType, identifier); TVariable* blockNameVar = new TVariable(&identifier, blockNameType, true); if (! symbolTable.insert(*blockNameVar)) { @@ -9009,7 +9551,6 @@ void TParseContext::invariantCheck(const TSourceLoc& loc, const TQualifier& qual // void TParseContext::updateStandaloneQualifierDefaults(const TSourceLoc& loc, const TPublicType& publicType) { -#ifndef GLSLANG_WEB if (publicType.shaderQualifiers.vertices != TQualifier::layoutNotSet) { assert(language == EShLangTessControl || language == EShLangGeometry || language == EShLangMesh); const char* id = (language == EShLangTessControl) ? "vertices" : "max_vertices"; @@ -9101,7 +9642,7 @@ void TParseContext::updateStandaloneQualifierDefaults(const TSourceLoc& loc, con else error(loc, "can only apply to 'in'", "point_mode", ""); } -#endif + for (int i = 0; i < 3; ++i) { if (publicType.shaderQualifiers.localSizeNotDefault[i]) { if (publicType.qualifier.storage == EvqVaryingIn) { @@ -9118,9 +9659,7 @@ void TParseContext::updateStandaloneQualifierDefaults(const TSourceLoc& loc, con } if (intermediate.getLocalSize(i) > (unsigned int)max) error(loc, "too large; see gl_MaxComputeWorkGroupSize", "local_size", ""); - } -#ifndef GLSLANG_WEB - else if (language == EShLangMesh) { + } else if (language == EShLangMesh) { switch (i) { case 0: max = extensionTurnedOn(E_GL_EXT_mesh_shader) ? @@ -9170,9 +9709,7 @@ void TParseContext::updateStandaloneQualifierDefaults(const TSourceLoc& loc, con "gl_MaxTaskWorkGroupSizeEXT" : "gl_MaxTaskWorkGroupSizeNV"); error(loc, maxsErrtring.c_str(), "local_size", ""); } - } -#endif - else { + } else { assert(0); } @@ -9197,7 +9734,6 @@ void TParseContext::updateStandaloneQualifierDefaults(const TSourceLoc& loc, con } } -#ifndef GLSLANG_WEB if (publicType.shaderQualifiers.earlyFragmentTests) { if (publicType.qualifier.storage == EvqVaryingIn) intermediate.setEarlyFragmentTests(); @@ -9216,6 +9752,24 @@ void TParseContext::updateStandaloneQualifierDefaults(const TSourceLoc& loc, con else error(loc, "can only apply to 'in'", "post_coverage_coverage", ""); } + if (publicType.shaderQualifiers.nonCoherentColorAttachmentReadEXT) { + if (publicType.qualifier.storage == EvqVaryingIn) + intermediate.setNonCoherentColorAttachmentReadEXT(); + else + error(loc, "can only apply to 'in'", "non_coherent_color_attachment_readEXT", ""); + } + if (publicType.shaderQualifiers.nonCoherentDepthAttachmentReadEXT) { + if (publicType.qualifier.storage == EvqVaryingIn) + intermediate.setNonCoherentDepthAttachmentReadEXT(); + else + error(loc, "can only apply to 'in'", "non_coherent_depth_attachment_readEXT", ""); + } + if (publicType.shaderQualifiers.nonCoherentStencilAttachmentReadEXT) { + if (publicType.qualifier.storage == EvqVaryingIn) + intermediate.setNonCoherentStencilAttachmentReadEXT(); + else + error(loc, "can only apply to 'in'", "non_coherent_stencil_attachment_readEXT", ""); + } if (publicType.shaderQualifiers.hasBlendEquation()) { if (publicType.qualifier.storage != EvqVaryingOut) error(loc, "can only apply to 'out'", "blend equation", ""); @@ -9275,7 +9829,7 @@ void TParseContext::updateStandaloneQualifierDefaults(const TSourceLoc& loc, con // Exit early as further checks are not valid return; } -#endif + const TQualifier& qualifier = publicType.qualifier; if (qualifier.isAuxiliary() || @@ -9308,7 +9862,6 @@ void TParseContext::updateStandaloneQualifierDefaults(const TSourceLoc& loc, con case EvqVaryingIn: break; case EvqVaryingOut: -#ifndef GLSLANG_WEB if (qualifier.hasStream()) globalOutputDefaults.layoutStream = qualifier.layoutStream; if (qualifier.hasXfbBuffer()) @@ -9317,7 +9870,6 @@ void TParseContext::updateStandaloneQualifierDefaults(const TSourceLoc& loc, con if (! intermediate.setXfbBufferStride(globalOutputDefaults.layoutXfbBuffer, qualifier.layoutXfbStride)) error(loc, "all stride settings must match for xfb buffer", "xfb_stride", "%d", qualifier.layoutXfbBuffer); } -#endif break; case EvqShared: if (qualifier.hasMatrix()) @@ -9472,4 +10024,38 @@ const TTypeList* TParseContext::recordStructCopy(TStructRecord& record, const TT return originStruct; } +TLayoutFormat TParseContext::mapLegacyLayoutFormat(TLayoutFormat legacyLayoutFormat, TBasicType imageType) +{ + TLayoutFormat layoutFormat = ElfNone; + if (imageType == EbtFloat) { + switch (legacyLayoutFormat) { + case ElfSize1x16: layoutFormat = ElfR16f; break; + case ElfSize1x32: layoutFormat = ElfR32f; break; + case ElfSize2x32: layoutFormat = ElfRg32f; break; + case ElfSize4x32: layoutFormat = ElfRgba32f; break; + default: break; + } + } else if (imageType == EbtUint) { + switch (legacyLayoutFormat) { + case ElfSize1x8: layoutFormat = ElfR8ui; break; + case ElfSize1x16: layoutFormat = ElfR16ui; break; + case ElfSize1x32: layoutFormat = ElfR32ui; break; + case ElfSize2x32: layoutFormat = ElfRg32ui; break; + case ElfSize4x32: layoutFormat = ElfRgba32ui; break; + default: break; + } + } else if (imageType == EbtInt) { + switch (legacyLayoutFormat) { + case ElfSize1x8: layoutFormat = ElfR8i; break; + case ElfSize1x16: layoutFormat = ElfR16i; break; + case ElfSize1x32: layoutFormat = ElfR32i; break; + case ElfSize2x32: layoutFormat = ElfRg32i; break; + case ElfSize4x32: layoutFormat = ElfRgba32i; break; + default: break; + } + } + + return layoutFormat; +} + } // end namespace glslang diff --git a/glslang/MachineIndependent/ParseHelper.h b/glslang/MachineIndependent/ParseHelper.h index 64dc0053..16902aef 100755 --- a/glslang/MachineIndependent/ParseHelper.h +++ b/glslang/MachineIndependent/ParseHelper.h @@ -95,12 +95,15 @@ public: globalUniformSet(TQualifier::layoutSetEnd), atomicCounterBlockSet(TQualifier::layoutSetEnd) { + // use storage buffer on SPIR-V 1.3 and up + if (spvVersion.spv >= EShTargetSpv_1_3) + intermediate.setUseStorageBuffer(); + if (entryPoint != nullptr) sourceEntryPointName = *entryPoint; } virtual ~TParseContextBase() { } -#if !defined(GLSLANG_WEB) || defined(GLSLANG_WEB_DEVEL) virtual void C_DECL error(const TSourceLoc&, const char* szReason, const char* szToken, const char* szExtraInfoFormat, ...); virtual void C_DECL warn(const TSourceLoc&, const char* szReason, const char* szToken, @@ -109,7 +112,6 @@ public: const char* szExtraInfoFormat, ...); virtual void C_DECL ppWarn(const TSourceLoc&, const char* szReason, const char* szToken, const char* szExtraInfoFormat, ...); -#endif virtual void setLimits(const TBuiltInResource&) = 0; @@ -178,6 +180,7 @@ public: // Basic parsing state, easily accessible to the grammar TSymbolTable& symbolTable; // symbol table that goes with the current language, version, and profile + TVector relaxedSymbols; int statementNestingLevel; // 0 if outside all flow control or compound statements int loopNestingLevel; // 0 if outside all loops int structNestingLevel; // 0 if outside structures @@ -194,6 +197,7 @@ public: struct TPragma contextPragma; int beginInvocationInterlockCount; int endInvocationInterlockCount; + bool compileOnly = false; protected: TParseContextBase(TParseContextBase&); @@ -327,10 +331,8 @@ public: TIntermTyped* handleBracketDereference(const TSourceLoc&, TIntermTyped* base, TIntermTyped* index); void handleIndexLimits(const TSourceLoc&, TIntermTyped* base, TIntermTyped* index); -#ifndef GLSLANG_WEB void makeEditable(TSymbol*&) override; void ioArrayCheck(const TSourceLoc&, const TType&, const TString& identifier); -#endif bool isIoResizeArray(const TType&) const; void fixIoArraySize(const TSourceLoc&, TType&); void handleIoResizeArrayAccess(const TSourceLoc&, TIntermTyped* base); @@ -366,6 +368,10 @@ public: TIntermTyped* vkRelaxedRemapFunctionCall(const TSourceLoc&, TFunction*, TIntermNode*); // returns true if the variable was remapped to something else bool vkRelaxedRemapUniformVariable(const TSourceLoc&, TString&, const TPublicType&, TArraySizes*, TIntermTyped*, TType&); + void vkRelaxedRemapUniformMembers(const TSourceLoc&, const TPublicType&, const TType&, const TString&); + void vkRelaxedRemapFunctionParameter(TFunction*, TParameter&, std::vector* newParams = nullptr); + TIntermNode* vkRelaxedRemapFunctionArgument(const TSourceLoc&, TFunction*, TIntermTyped*); + TIntermTyped* vkRelaxedRemapDotDereference(const TSourceLoc&, TIntermTyped&, const TType&, const TString&); void assignError(const TSourceLoc&, const char* op, TString left, TString right); void unaryOpError(const TSourceLoc&, const char* op, TString operand); @@ -378,7 +384,7 @@ public: void globalCheck(const TSourceLoc&, const char* token); bool constructorError(const TSourceLoc&, TIntermNode*, TFunction&, TOperator, TType&); bool constructorTextureSamplerError(const TSourceLoc&, const TFunction&); - void arraySizeCheck(const TSourceLoc&, TIntermTyped* expr, TArraySize&, const char *sizeType); + void arraySizeCheck(const TSourceLoc&, TIntermTyped* expr, TArraySize&, const char *sizeType, const bool allowZero = false); bool arrayQualifierError(const TSourceLoc&, const TQualifier&); bool arrayError(const TSourceLoc&, const TType&); void arraySizeRequiredCheck(const TSourceLoc&, const TArraySizes&); @@ -393,14 +399,14 @@ public: void accStructCheck(const TSourceLoc & loc, const TType & type, const TString & identifier); void transparentOpaqueCheck(const TSourceLoc&, const TType&, const TString& identifier); void memberQualifierCheck(glslang::TPublicType&); - void globalQualifierFixCheck(const TSourceLoc&, TQualifier&, bool isMemberCheck = false); + void globalQualifierFixCheck(const TSourceLoc&, TQualifier&, bool isMemberCheck = false, const TPublicType* publicType = nullptr); void globalQualifierTypeCheck(const TSourceLoc&, const TQualifier&, const TPublicType&); bool structQualifierErrorCheck(const TSourceLoc&, const TPublicType& pType); void mergeQualifiers(const TSourceLoc&, TQualifier& dst, const TQualifier& src, bool force); void setDefaultPrecision(const TSourceLoc&, TPublicType&, TPrecisionQualifier); int computeSamplerTypeIndex(TSampler&); TPrecisionQualifier getDefaultPrecision(TPublicType&); - void precisionQualifierCheck(const TSourceLoc&, TBasicType, TQualifier&); + void precisionQualifierCheck(const TSourceLoc&, TBasicType, TQualifier&, bool isCoopMat); void parameterTypeCheck(const TSourceLoc&, TStorageQualifier qualifier, const TType& type); bool containsFieldWithBasicType(const TType& type ,TBasicType basicType); TSymbol* redeclareBuiltinVariable(const TSourceLoc&, const TString&, const TQualifier&, const TShaderQualifiers&); @@ -418,6 +424,7 @@ public: void inductiveLoopCheck(const TSourceLoc&, TIntermNode* init, TIntermLoop* loop); void arrayLimitCheck(const TSourceLoc&, const TString&, int size); void limitCheck(const TSourceLoc&, int value, const char* limit, const char* feature); + void coopMatTypeParametersCheck(const TSourceLoc&, const TPublicType&); void inductiveLoopBodyCheck(TIntermNode*, long long loopIndexId, TSymbolTable&); void constantIndexExpressionCheck(TIntermNode*); @@ -456,11 +463,12 @@ public: void addQualifierToExisting(const TSourceLoc&, TQualifier, TIdentifierList&); void invariantCheck(const TSourceLoc&, const TQualifier&); void updateStandaloneQualifierDefaults(const TSourceLoc&, const TPublicType&); + void updateBindlessQualifier(TType& memberType); void wrapupSwitchSubsequence(TIntermAggregate* statements, TIntermNode* branchNode); TIntermNode* addSwitch(const TSourceLoc&, TIntermTyped* expression, TIntermAggregate* body); const TTypeList* recordStructCopy(TStructRecord&, const TType*, const TType*); + TLayoutFormat mapLegacyLayoutFormat(TLayoutFormat legacyLayoutFormat, TBasicType imageType); -#ifndef GLSLANG_WEB TAttributeType attributeFromName(const TString& name) const; TAttributes* makeAttributes(const TString& identifier) const; TAttributes* makeAttributes(const TString& identifier, TIntermNode* node) const; @@ -480,14 +488,13 @@ public: TSpirvRequirement* mergeSpirvRequirements(const TSourceLoc& loc, TSpirvRequirement* spirvReq1, TSpirvRequirement* spirvReq2); TSpirvTypeParameters* makeSpirvTypeParameters(const TSourceLoc& loc, const TIntermConstantUnion* constant); + TSpirvTypeParameters* makeSpirvTypeParameters(const TSourceLoc& loc, const TPublicType& type); TSpirvTypeParameters* mergeSpirvTypeParameters(TSpirvTypeParameters* spirvTypeParams1, TSpirvTypeParameters* spirvTypeParams2); TSpirvInstruction* makeSpirvInstruction(const TSourceLoc& loc, const TString& name, const TString& value); TSpirvInstruction* makeSpirvInstruction(const TSourceLoc& loc, const TString& name, int value); TSpirvInstruction* mergeSpirvInstruction(const TSourceLoc& loc, TSpirvInstruction* spirvInst1, TSpirvInstruction* spirvInst2); -#endif - void checkAndResizeMeshViewDim(const TSourceLoc&, TType&, bool isBlockMember); protected: @@ -500,9 +507,7 @@ protected: bool isRuntimeLength(const TIntermTyped&) const; TIntermNode* executeInitializer(const TSourceLoc&, TIntermTyped* initializer, TVariable* variable); TIntermTyped* convertInitializerList(const TSourceLoc&, const TType&, TIntermTyped* initializer); -#ifndef GLSLANG_WEB void finish() override; -#endif virtual const char* getGlobalUniformBlockName() const override; virtual void finalizeGlobalUniformBlockLayout(TVariable&) override; @@ -539,7 +544,6 @@ protected: TQualifier globalOutputDefaults; TQualifier globalSharedDefaults; TString currentCaller; // name of last function body entered (not valid when at global scope) -#ifndef GLSLANG_WEB int* atomicUintOffsets; // to become an array of the right size to hold an offset per binding point bool anyIndexLimits; TIdSetType inductiveLoopIds; @@ -580,7 +584,6 @@ protected: // array-sizing declarations // TVector ioArraySymbolResizeList; -#endif }; } // end namespace glslang diff --git a/glslang/MachineIndependent/PoolAlloc.cpp b/glslang/MachineIndependent/PoolAlloc.cpp index c3a3928c..5d7173c9 100755 --- a/glslang/MachineIndependent/PoolAlloc.cpp +++ b/glslang/MachineIndependent/PoolAlloc.cpp @@ -35,34 +35,28 @@ #include "../Include/Common.h" #include "../Include/PoolAlloc.h" -#include "../Include/InitializeGlobals.h" -#include "../OSDependent/osinclude.h" - namespace glslang { -// Process-wide TLS index -OS_TLSIndex PoolIndex; +namespace { +thread_local TPoolAllocator* threadPoolAllocator = nullptr; + +TPoolAllocator* GetDefaultThreadPoolAllocator() +{ + thread_local TPoolAllocator defaultAllocator; + return &defaultAllocator; +} +} // anonymous namespace // Return the thread-specific current pool. TPoolAllocator& GetThreadPoolAllocator() { - return *static_cast(OS_GetTLSValue(PoolIndex)); + return *(threadPoolAllocator ? threadPoolAllocator : GetDefaultThreadPoolAllocator()); } // Set the thread-specific current pool. void SetThreadPoolAllocator(TPoolAllocator* poolAllocator) { - OS_SetTLSValue(PoolIndex, poolAllocator); -} - -// Process-wide set up of the TLS pool storage. -bool InitializePoolIndex() -{ - // Allocate a TLS index. - if ((PoolIndex = OS_AllocTLSIndex()) == OS_INVALID_TLS_INDEX) - return false; - - return true; + threadPoolAllocator = poolAllocator; } // @@ -137,16 +131,6 @@ TPoolAllocator::~TPoolAllocator() } } -const unsigned char TAllocation::guardBlockBeginVal = 0xfb; -const unsigned char TAllocation::guardBlockEndVal = 0xfe; -const unsigned char TAllocation::userDataFill = 0xcd; - -# ifdef GUARD_BLOCKS - const size_t TAllocation::guardBlockSize = 16; -# else - const size_t TAllocation::guardBlockSize = 0; -# endif - // // Check a single guard block for damage // diff --git a/glslang/MachineIndependent/Scan.cpp b/glslang/MachineIndependent/Scan.cpp index 7f51173e..44546596 100755 --- a/glslang/MachineIndependent/Scan.cpp +++ b/glslang/MachineIndependent/Scan.cpp @@ -324,11 +324,9 @@ struct str_hash // A single global usable by all threads, by all versions, by all languages. // After a single process-level initialization, this is read only and thread safe std::unordered_map* KeywordMap = nullptr; -#ifndef GLSLANG_WEB std::unordered_set* ReservedSet = nullptr; -#endif -}; +} namespace glslang { @@ -343,6 +341,7 @@ void TScanContext::fillInKeywordMap() (*KeywordMap)["const"] = CONST; (*KeywordMap)["uniform"] = UNIFORM; + (*KeywordMap)["tileImageEXT"] = TILEIMAGEEXT; (*KeywordMap)["buffer"] = BUFFER; (*KeywordMap)["in"] = IN; (*KeywordMap)["out"] = OUT; @@ -408,7 +407,6 @@ void TScanContext::fillInKeywordMap() (*KeywordMap)["uvec3"] = UVEC3; (*KeywordMap)["uvec4"] = UVEC4; -#ifndef GLSLANG_WEB (*KeywordMap)["nonuniformEXT"] = NONUNIFORM; (*KeywordMap)["demote"] = DEMOTE; (*KeywordMap)["attribute"] = ATTRIBUTE; @@ -598,7 +596,6 @@ void TScanContext::fillInKeywordMap() (*KeywordMap)["spirv_storage_class"] = SPIRV_STORAGE_CLASS; (*KeywordMap)["spirv_by_reference"] = SPIRV_BY_REFERENCE; (*KeywordMap)["spirv_literal"] = SPIRV_LITERAL; -#endif (*KeywordMap)["sampler2D"] = SAMPLER2D; (*KeywordMap)["samplerCube"] = SAMPLERCUBE; @@ -632,7 +629,6 @@ void TScanContext::fillInKeywordMap() (*KeywordMap)["sampler"] = SAMPLER; (*KeywordMap)["samplerShadow"] = SAMPLERSHADOW; -#ifndef GLSLANG_WEB (*KeywordMap)["textureCubeArray"] = TEXTURECUBEARRAY; (*KeywordMap)["itextureCubeArray"] = ITEXTURECUBEARRAY; (*KeywordMap)["utextureCubeArray"] = UTEXTURECUBEARRAY; @@ -685,6 +681,10 @@ void TScanContext::fillInKeywordMap() (*KeywordMap)["texture2DRect"] = TEXTURE2DRECT; (*KeywordMap)["texture1DArray"] = TEXTURE1DARRAY; + (*KeywordMap)["attachmentEXT"] = ATTACHMENTEXT; + (*KeywordMap)["iattachmentEXT"] = IATTACHMENTEXT; + (*KeywordMap)["uattachmentEXT"] = UATTACHMENTEXT; + (*KeywordMap)["subpassInput"] = SUBPASSINPUT; (*KeywordMap)["subpassInputMS"] = SUBPASSINPUTMS; (*KeywordMap)["isubpassInput"] = ISUBPASSINPUT; @@ -765,6 +765,11 @@ void TScanContext::fillInKeywordMap() (*KeywordMap)["icoopmatNV"] = ICOOPMATNV; (*KeywordMap)["ucoopmatNV"] = UCOOPMATNV; + (*KeywordMap)["coopmat"] = COOPMAT; + + (*KeywordMap)["hitObjectNV"] = HITOBJECTNV; + (*KeywordMap)["hitObjectAttributeNV"] = HITOBJECTATTRNV; + ReservedSet = new std::unordered_set; ReservedSet->insert("common"); @@ -804,17 +809,14 @@ void TScanContext::fillInKeywordMap() ReservedSet->insert("cast"); ReservedSet->insert("namespace"); ReservedSet->insert("using"); -#endif } void TScanContext::deleteKeywordMap() { delete KeywordMap; KeywordMap = nullptr; -#ifndef GLSLANG_WEB delete ReservedSet; ReservedSet = nullptr; -#endif } // Called by yylex to get the next token. @@ -895,14 +897,12 @@ int TScanContext::tokenize(TPpContext* pp, TParserToken& token) case PpAtomConstInt: parserToken->sType.lex.i = ppToken.ival; return INTCONSTANT; case PpAtomConstUint: parserToken->sType.lex.i = ppToken.ival; return UINTCONSTANT; case PpAtomConstFloat: parserToken->sType.lex.d = ppToken.dval; return FLOATCONSTANT; -#ifndef GLSLANG_WEB case PpAtomConstInt16: parserToken->sType.lex.i = ppToken.ival; return INT16CONSTANT; case PpAtomConstUint16: parserToken->sType.lex.i = ppToken.ival; return UINT16CONSTANT; case PpAtomConstInt64: parserToken->sType.lex.i64 = ppToken.i64val; return INT64CONSTANT; case PpAtomConstUint64: parserToken->sType.lex.i64 = ppToken.i64val; return UINT64CONSTANT; case PpAtomConstDouble: parserToken->sType.lex.d = ppToken.dval; return DOUBLECONSTANT; case PpAtomConstFloat16: parserToken->sType.lex.d = ppToken.dval; return FLOAT16CONSTANT; -#endif case PpAtomIdentifier: { int token = tokenizeIdentifier(); @@ -924,10 +924,8 @@ int TScanContext::tokenize(TPpContext* pp, TParserToken& token) int TScanContext::tokenizeIdentifier() { -#ifndef GLSLANG_WEB if (ReservedSet->find(tokenText) != ReservedSet->end()) return reservedWord(); -#endif auto it = KeywordMap->find(tokenText); if (it == KeywordMap->end()) { @@ -939,6 +937,7 @@ int TScanContext::tokenizeIdentifier() switch (keyword) { case CONST: case UNIFORM: + case TILEIMAGEEXT: case IN: case OUT: case INOUT: @@ -1049,7 +1048,6 @@ int TScanContext::tokenizeIdentifier() return identifierOrReserved(reserved); } -#ifndef GLSLANG_WEB case NOPERSPECTIVE: if (parseContext.extensionTurnedOn(E_GL_NV_shader_noperspective_interpolation)) return keyword; @@ -1075,12 +1073,18 @@ int TScanContext::tokenizeIdentifier() parseContext.extensionTurnedOn(E_GL_NV_ray_tracing)) return keyword; return identifierOrType(); + case ACCSTRUCTEXT: + if (parseContext.symbolTable.atBuiltInLevel() || + parseContext.extensionTurnedOn(E_GL_EXT_ray_tracing) || + parseContext.extensionTurnedOn(E_GL_EXT_ray_query) || + parseContext.extensionTurnedOn(E_GL_NV_displacement_micromap)) + return keyword; + return identifierOrType(); case PAYLOADEXT: case PAYLOADINEXT: case HITATTREXT: case CALLDATAEXT: case CALLDATAINEXT: - case ACCSTRUCTEXT: if (parseContext.symbolTable.atBuiltInLevel() || parseContext.extensionTurnedOn(E_GL_EXT_ray_tracing) || parseContext.extensionTurnedOn(E_GL_EXT_ray_query)) @@ -1136,7 +1140,7 @@ int TScanContext::tokenizeIdentifier() case SUBROUTINE: return es30ReservedFromGLSL(400); -#endif + case SHARED: if ((parseContext.isEsProfile() && parseContext.version < 300) || (!parseContext.isEsProfile() && parseContext.version < 140)) @@ -1171,7 +1175,6 @@ int TScanContext::tokenizeIdentifier() case MAT4X4: return matNxM(); -#ifndef GLSLANG_WEB case DMAT2: case DMAT3: case DMAT4: @@ -1476,7 +1479,6 @@ int TScanContext::tokenizeIdentifier() return keyword; else return identifierOrType(); -#endif case UINT: case UVEC2: @@ -1494,6 +1496,12 @@ int TScanContext::tokenizeIdentifier() case USAMPLERCUBE: case USAMPLER2DARRAY: afterType = true; + if (keyword == SAMPLER2DARRAY || keyword == SAMPLER2DARRAYSHADOW) { + if (!parseContext.isEsProfile() && + (parseContext.extensionTurnedOn(E_GL_EXT_texture_array) || parseContext.symbolTable.atBuiltInLevel())) { + return keyword; + } + } return nonreservedKeyword(300, 130); case SAMPLER3D: @@ -1531,13 +1539,18 @@ int TScanContext::tokenizeIdentifier() else return identifierOrType(); -#ifndef GLSLANG_WEB case ISAMPLER1D: case ISAMPLER1DARRAY: case SAMPLER1DARRAYSHADOW: case USAMPLER1D: case USAMPLER1DARRAY: afterType = true; + if (keyword == SAMPLER1DARRAYSHADOW) { + if (!parseContext.isEsProfile() && + (parseContext.extensionTurnedOn(E_GL_EXT_texture_array) || parseContext.symbolTable.atBuiltInLevel())) { + return keyword; + } + } return es30ReservedFromGLSL(130); case ISAMPLER2DRECT: case USAMPLER2DRECT: @@ -1607,7 +1620,9 @@ int TScanContext::tokenizeIdentifier() if (parseContext.isEsProfile() && parseContext.version == 300) reservedWord(); else if ((parseContext.isEsProfile() && parseContext.version < 300) || - (!parseContext.isEsProfile() && parseContext.version < 130)) + ((!parseContext.isEsProfile() && parseContext.version < 130) && + !parseContext.symbolTable.atBuiltInLevel() && + !parseContext.extensionTurnedOn(E_GL_EXT_texture_array))) return identifierOrType(); return keyword; @@ -1655,6 +1670,9 @@ int TScanContext::tokenizeIdentifier() case ISUBPASSINPUTMS: case USUBPASSINPUT: case USUBPASSINPUTMS: + case ATTACHMENTEXT: + case IATTACHMENTEXT: + case UATTACHMENTEXT: if (parseContext.spvVersion.vulkan > 0) return keyword; else @@ -1769,6 +1787,13 @@ int TScanContext::tokenizeIdentifier() return keyword; return identifierOrType(); + case COOPMAT: + afterType = true; + if (parseContext.symbolTable.atBuiltInLevel() || + parseContext.extensionTurnedOn(E_GL_KHR_cooperative_matrix)) + return keyword; + return identifierOrType(); + case DEMOTE: if (parseContext.extensionTurnedOn(E_GL_EXT_demote_to_helper_invocation)) return keyword; @@ -1789,7 +1814,20 @@ int TScanContext::tokenizeIdentifier() parseContext.extensionTurnedOn(E_GL_EXT_spirv_intrinsics)) return keyword; return identifierOrType(); -#endif + + case HITOBJECTNV: + if (parseContext.symbolTable.atBuiltInLevel() || + (!parseContext.isEsProfile() && parseContext.version >= 460 + && parseContext.extensionTurnedOn(E_GL_NV_shader_invocation_reorder))) + return keyword; + return identifierOrType(); + + case HITOBJECTATTRNV: + if (parseContext.symbolTable.atBuiltInLevel() || + (!parseContext.isEsProfile() && parseContext.version >= 460 + && parseContext.extensionTurnedOn(E_GL_NV_shader_invocation_reorder))) + return keyword; + return identifierOrType(); default: parseContext.infoSink.info.message(EPrefixInternalError, "Unknown glslang keyword", loc); diff --git a/glslang/MachineIndependent/ShaderLang.cpp b/glslang/MachineIndependent/ShaderLang.cpp index ed40c366..6e50a9d4 100755 --- a/glslang/MachineIndependent/ShaderLang.cpp +++ b/glslang/MachineIndependent/ShaderLang.cpp @@ -45,6 +45,7 @@ #include #include #include +#include #include "SymbolTable.h" #include "ParseHelper.h" #include "Scan.h" @@ -57,7 +58,6 @@ #endif #include "../Include/ShHandle.h" -#include "../../OGLCompilersDLL/InitializeDll.h" #include "preprocessor/PpContext.h" @@ -81,6 +81,9 @@ namespace { // anonymous namespace for file-local functions and symbols // Shared global; access should be protected by a global mutex/critical section. int NumberOfClients = 0; +// global initialization lock +std::mutex init_lock; + using namespace glslang; // Create a language specific version of parseables. @@ -295,11 +298,6 @@ void InitializeStageSymbolTable(TBuiltInParseables& builtInParseables, int versi EShLanguage language, EShSource source, TInfoSink& infoSink, TSymbolTable** commonTable, TSymbolTable** symbolTables) { -#ifdef GLSLANG_WEB - profile = EEsProfile; - version = 310; -#endif - (*symbolTables[language]).adoptLevels(*commonTable[CommonIndex(profile, language)]); InitializeSymbolTable(builtInParseables.getStageString(language), version, profile, spvVersion, language, source, infoSink, *symbolTables[language]); @@ -316,11 +314,6 @@ void InitializeStageSymbolTable(TBuiltInParseables& builtInParseables, int versi // bool InitializeSymbolTables(TInfoSink& infoSink, TSymbolTable** commonTable, TSymbolTable** symbolTables, int version, EProfile profile, const SpvVersion& spvVersion, EShSource source) { -#ifdef GLSLANG_WEB - profile = EEsProfile; - version = 310; -#endif - std::unique_ptr builtInParseables(CreateBuiltInParseables(infoSink, source)); if (builtInParseables == nullptr) @@ -343,7 +336,6 @@ bool InitializeSymbolTables(TInfoSink& infoSink, TSymbolTable** commonTable, TS InitializeStageSymbolTable(*builtInParseables, version, profile, spvVersion, EShLangFragment, source, infoSink, commonTable, symbolTables); -#ifndef GLSLANG_WEB // check for tessellation if ((profile != EEsProfile && version >= 150) || (profile == EEsProfile && version >= 310)) { @@ -392,7 +384,6 @@ bool InitializeSymbolTables(TInfoSink& infoSink, TSymbolTable** commonTable, TS (profile == EEsProfile && version >= 320)) InitializeStageSymbolTable(*builtInParseables, version, profile, spvVersion, EShLangTask, source, infoSink, commonTable, symbolTables); -#endif // !GLSLANG_WEB return true; } @@ -429,18 +420,15 @@ void SetupBuiltinSymbolTable(int version, EProfile profile, const SpvVersion& sp TInfoSink infoSink; // Make sure only one thread tries to do this at a time - glslang::GetGlobalLock(); + const std::lock_guard lock(init_lock); // See if it's already been done for this version/profile combination int versionIndex = MapVersionToIndex(version); int spvVersionIndex = MapSpvVersionToIndex(spvVersion); int profileIndex = MapProfileToIndex(profile); int sourceIndex = MapSourceToIndex(source); - if (CommonSymbolTable[versionIndex][spvVersionIndex][profileIndex][sourceIndex][EPcGeneral]) { - glslang::ReleaseGlobalLock(); - + if (CommonSymbolTable[versionIndex][spvVersionIndex][profileIndex][sourceIndex][EPcGeneral]) return; - } // Switch to a new pool TPoolAllocator& previousAllocator = GetThreadPoolAllocator(); @@ -487,20 +475,16 @@ void SetupBuiltinSymbolTable(int version, EProfile profile, const SpvVersion& sp delete builtInPoolAllocator; SetThreadPoolAllocator(&previousAllocator); - - glslang::ReleaseGlobalLock(); } // Function to Print all builtins void DumpBuiltinSymbolTable(TInfoSink& infoSink, const TSymbolTable& symbolTable) { -#if !defined(GLSLANG_WEB) infoSink.debug << "BuiltinSymbolTable {\n"; symbolTable.dump(infoSink, true); infoSink.debug << "}\n"; -#endif } // Return true if the shader was correctly specified for version/profile/stage. @@ -598,7 +582,6 @@ bool DeduceVersionProfile(TInfoSink& infoSink, EShLanguage stage, bool versionNo break; } -#if !defined(GLSLANG_WEB) // Correct for stage type... switch (stage) { case EShLangGeometry: @@ -686,7 +669,6 @@ bool DeduceVersionProfile(TInfoSink& infoSink, EShLanguage stage, bool versionNo break; } } -#endif return correct; } @@ -813,7 +795,8 @@ bool ProcessDeferred( bool requireNonempty, TShader::Includer& includer, const std::string sourceEntryPointName = "", - const TEnvironment* environment = nullptr) // optional way of fully setting all versions, overriding the above + const TEnvironment* environment = nullptr, // optional way of fully setting all versions, overriding the above + bool compileOnly = false) { // This must be undone (.pop()) by the caller, after it finishes consuming the created tree. GetThreadPoolAllocator().push(); @@ -876,7 +859,6 @@ bool ProcessDeferred( : userInput.scanVersion(version, profile, versionNotFirstToken); bool versionNotFound = version == 0; if (forceDefaultVersionAndProfile && source == EShSourceGlsl) { -#if !defined(GLSLANG_WEB) if (! (messages & EShMsgSuppressWarnings) && ! versionNotFound && (version != defaultVersion || profile != defaultProfile)) { compiler->infoSink.info << "Warning, (version, profile) forced to be (" @@ -884,7 +866,7 @@ bool ProcessDeferred( << "), while in source code it is (" << version << ", " << ProfileName(profile) << ")\n"; } -#endif + if (versionNotFound) { versionNotFirstToken = false; versionNotFirst = false; @@ -899,13 +881,7 @@ bool ProcessDeferred( bool goodVersion = DeduceVersionProfile(compiler->infoSink, stage, versionNotFirst, defaultVersion, source, version, profile, spvVersion); -#ifdef GLSLANG_WEB - profile = EEsProfile; - version = 310; -#endif - bool versionWillBeError = (versionNotFound || (profile == EEsProfile && version >= 300 && versionNotFirst)); -#if !defined(GLSLANG_WEB) bool warnVersionNotFirst = false; if (! versionWillBeError && versionNotFirstToken) { if (messages & EShMsgRelaxedErrors) @@ -913,7 +889,6 @@ bool ProcessDeferred( else versionWillBeError = true; } -#endif intermediate.setSource(source); intermediate.setVersion(version); @@ -967,6 +942,7 @@ bool ProcessDeferred( std::unique_ptr parseContext(CreateParseContext(*symbolTable, intermediate, version, profile, source, stage, compiler->infoSink, spvVersion, forwardCompatible, messages, false, sourceEntryPointName)); + parseContext->compileOnly = compileOnly; TPpContext ppContext(*parseContext, names[numPre] ? names[numPre] : "", includer); // only GLSL (bison triggered, really) needs an externally set scan context @@ -978,13 +954,11 @@ bool ProcessDeferred( parseContext->setLimits(*resources); if (! goodVersion) parseContext->addError(); -#if !defined(GLSLANG_WEB) if (warnVersionNotFirst) { TSourceLoc loc; loc.init(); parseContext->warn(loc, "Illegal to have non-comment, non-whitespace tokens before #version", "#version", ""); } -#endif parseContext->initializeExtensionBehavior(); @@ -1016,8 +990,6 @@ bool ProcessDeferred( return success; } -#if !defined(GLSLANG_WEB) - // Responsible for keeping track of the most recent source string and line in // the preprocessor and outputting newlines appropriately if the source string // or line changes. @@ -1095,8 +1067,8 @@ struct DoPreprocessing { EShOptimizationLevel, EShMessages) { // This is a list of tokens that do not require a space before or after. - static const std::string unNeededSpaceTokens = ";()[]"; - static const std::string noSpaceBeforeTokens = ","; + static const std::string noNeededSpaceBeforeTokens = ";)[].,"; + static const std::string noNeededSpaceAfterTokens = ".(["; glslang::TPpToken ppToken; parseContext.setScanner(&input); @@ -1169,6 +1141,7 @@ struct DoPreprocessing { }); int lastToken = EndOfInput; // lastToken records the last token processed. + std::string lastTokenName; do { int token = ppContext.tokenize(ppToken); if (token == EndOfInput) @@ -1187,12 +1160,23 @@ struct DoPreprocessing { // Output a space in between tokens, but not at the start of a line, // and also not around special tokens. This helps with readability // and consistency. - if (!isNewString && !isNewLine && lastToken != EndOfInput && - (unNeededSpaceTokens.find((char)token) == std::string::npos) && - (unNeededSpaceTokens.find((char)lastToken) == std::string::npos) && - (noSpaceBeforeTokens.find((char)token) == std::string::npos)) { - outputBuffer += ' '; + if (!isNewString && !isNewLine && lastToken != EndOfInput) { + // left parenthesis need a leading space, except it is in a function-call-like context. + // examples: `for (xxx)`, `a * (b + c)`, `vec(2.0)`, `foo(x, y, z)` + if (token == '(') { + if (lastToken != PpAtomIdentifier || + lastTokenName == "if" || + lastTokenName == "for" || + lastTokenName == "while" || + lastTokenName == "switch") + outputBuffer += ' '; + } else if ((noNeededSpaceBeforeTokens.find((char)token) == std::string::npos) && + (noNeededSpaceAfterTokens.find((char)lastToken) == std::string::npos)) { + outputBuffer += ' '; + } } + if (token == PpAtomIdentifier) + lastTokenName = ppToken.name; lastToken = token; if (token == PpAtomConstString) outputBuffer += "\""; @@ -1214,8 +1198,6 @@ struct DoPreprocessing { std::string* outputString; }; -#endif - // DoFullParse is a valid ProcessingConext template argument for fully // parsing the shader. It populates the "intermediate" with the AST. struct DoFullParse{ @@ -1246,7 +1228,6 @@ struct DoFullParse{ } }; -#if !defined(GLSLANG_WEB) // Take a single compilation unit, and run the preprocessor on it. // Return: True if there were no issues found in preprocessing, // False if during preprocessing any unknown version, pragmas or @@ -1281,7 +1262,6 @@ bool PreprocessDeferred( forwardCompatible, messages, intermediate, parser, false, includer, "", environment); } -#endif // // do a partial compile on the given strings for a single compilation unit @@ -1312,14 +1292,15 @@ bool CompileDeferred( TIntermediate& intermediate,// returned tree, etc. TShader::Includer& includer, const std::string sourceEntryPointName = "", - TEnvironment* environment = nullptr) + TEnvironment* environment = nullptr, + bool compileOnly = false) { DoFullParse parser; return ProcessDeferred(compiler, shaderStrings, numStrings, inputLengths, stringNames, preamble, optLevel, resources, defaultVersion, defaultProfile, forceDefaultVersionAndProfile, overrideVersion, forwardCompatible, messages, intermediate, parser, - true, includer, sourceEntryPointName, environment); + true, includer, sourceEntryPointName, environment, compileOnly); } } // end anonymous namespace for local functions @@ -1329,12 +1310,7 @@ bool CompileDeferred( // int ShInitialize() { - glslang::InitGlobalLock(); - - if (! InitProcess()) - return 0; - - glslang::GetGlobalLock(); + const std::lock_guard lock(init_lock); ++NumberOfClients; if (PerProcessGPA == nullptr) @@ -1345,7 +1321,6 @@ int ShInitialize() glslang::HlslScanContext::fillInKeywordMap(); #endif - glslang::ReleaseGlobalLock(); return 1; } @@ -1354,31 +1329,22 @@ int ShInitialize() // objects. // -ShHandle ShConstructCompiler(const EShLanguage language, int debugOptions) +ShHandle ShConstructCompiler(const EShLanguage language, int /*debugOptions unused*/) { - if (!InitThread()) - return nullptr; - - TShHandleBase* base = static_cast(ConstructCompiler(language, debugOptions)); + TShHandleBase* base = static_cast(ConstructCompiler(language, 0)); return reinterpret_cast(base); } -ShHandle ShConstructLinker(const EShExecutable executable, int debugOptions) +ShHandle ShConstructLinker(const EShExecutable executable, int /*debugOptions unused*/) { - if (!InitThread()) - return nullptr; - - TShHandleBase* base = static_cast(ConstructLinker(executable, debugOptions)); + TShHandleBase* base = static_cast(ConstructLinker(executable, 0)); return reinterpret_cast(base); } ShHandle ShConstructUniformMap() { - if (!InitThread()) - return nullptr; - TShHandleBase* base = static_cast(ConstructUniformMap()); return reinterpret_cast(base); @@ -1404,14 +1370,11 @@ void ShDestruct(ShHandle handle) // int ShFinalize() { - glslang::GetGlobalLock(); + const std::lock_guard lock(init_lock); --NumberOfClients; assert(NumberOfClients >= 0); - bool finalize = NumberOfClients == 0; - if (! finalize) { - glslang::ReleaseGlobalLock(); + if (NumberOfClients > 0) return 1; - } for (int version = 0; version < VersionCount; ++version) { for (int spvVersion = 0; spvVersion < SpvVersionCount; ++spvVersion) { @@ -1449,7 +1412,6 @@ int ShFinalize() glslang::HlslScanContext::deleteKeywordMap(); #endif - glslang::ReleaseGlobalLock(); return 1; } @@ -1542,11 +1504,10 @@ int ShLinkExt( TShHandleBase* base = reinterpret_cast(linkHandle); TLinker* linker = static_cast(base->getAsLinker()); - SetThreadPoolAllocator(linker->getPool()); - if (linker == nullptr) return 0; - + + SetThreadPoolAllocator(linker->getPool()); linker->infoSink.info.erase(); for (int i = 0; i < numHandles; ++i) { @@ -1832,8 +1793,6 @@ void TShader::setDxPositionW(bool invert) { intermediate->setDxPos void TShader::setEnhancedMsgs() { intermediate->setEnhancedMsgs(); } void TShader::setNanMinMaxClamp(bool useNonNan) { intermediate->setNanMinMaxClamp(useNonNan); } -#ifndef GLSLANG_WEB - // Set binding base for given resource type void TShader::setShiftBinding(TResourceType res, unsigned int base) { intermediate->setShiftBinding(res, base); @@ -1875,7 +1834,6 @@ void TShader::setUniformLocationBase(int base) void TShader::setNoStorageFormat(bool useUnknownFormat) { intermediate->setNoStorageFormat(useUnknownFormat); } void TShader::setResourceSetBinding(const std::vector& base) { intermediate->setResourceSetBinding(base); } void TShader::setTextureSamplerTransformMode(EShTextureSamplerTransformMode mode) { intermediate->setTextureSamplerTransformMode(mode); } -#endif void TShader::addBlockStorageOverride(const char* nameStr, TBlockStorageClass backing) { intermediate->addBlockStorageOverride(nameStr, backing); } @@ -1900,8 +1858,6 @@ void TShader::setFlattenUniformArrays(bool flatten) { intermediate->setFlatt bool TShader::parse(const TBuiltInResource* builtInResources, int defaultVersion, EProfile defaultProfile, bool forceDefaultVersionAndProfile, bool forwardCompatible, EShMessages messages, Includer& includer) { - if (! InitThread()) - return false; SetThreadPoolAllocator(pool); if (! preamble) @@ -1911,10 +1867,9 @@ bool TShader::parse(const TBuiltInResource* builtInResources, int defaultVersion preamble, EShOptNone, builtInResources, defaultVersion, defaultProfile, forceDefaultVersionAndProfile, overrideVersion, forwardCompatible, messages, *intermediate, includer, sourceEntryPointName, - &environment); + &environment, compileOnly); } -#if !defined(GLSLANG_WEB) // Fill in a string with the result of preprocessing ShaderStrings // Returns true if all extensions, pragmas and version strings were valid. // @@ -1927,8 +1882,6 @@ bool TShader::preprocess(const TBuiltInResource* builtInResources, std::string* output_string, Includer& includer) { - if (! InitThread()) - return false; SetThreadPoolAllocator(pool); if (! preamble) @@ -1940,7 +1893,6 @@ bool TShader::preprocess(const TBuiltInResource* builtInResources, forwardCompatible, message, includer, *intermediate, output_string, &environment); } -#endif const char* TShader::getInfoLog() { @@ -1952,11 +1904,7 @@ const char* TShader::getInfoDebugLog() return infoSink->debug.c_str(); } -TProgram::TProgram() : -#if !defined(GLSLANG_WEB) - reflection(nullptr), -#endif - linked(false) +TProgram::TProgram() : reflection(nullptr), linked(false) { pool = new TPoolAllocator; infoSink = new TInfoSink; @@ -1969,9 +1917,7 @@ TProgram::TProgram() : TProgram::~TProgram() { delete infoSink; -#if !defined(GLSLANG_WEB) delete reflection; -#endif for (int s = 0; s < EShLangCount; ++s) if (newedIntermediate[s]) @@ -2019,7 +1965,6 @@ bool TProgram::linkStage(EShLanguage stage, EShMessages messages) if (stages[stage].size() == 0) return true; -#if !defined(GLSLANG_WEB) int numEsShaders = 0, numNonEsShaders = 0; for (auto it = stages[stage].begin(); it != stages[stage].end(); ++it) { if ((*it)->intermediate->getProfile() == EEsProfile) { @@ -2070,9 +2015,6 @@ bool TProgram::linkStage(EShLanguage stage, EShMessages messages) for (it = stages[stage].begin(); it != stages[stage].end(); ++it) intermediate[stage]->merge(*infoSink, *(*it)->intermediate); } -#else - intermediate[stage] = stages[stage].front()->intermediate; -#endif intermediate[stage]->finalCheck(*infoSink, (messages & EShMsgKeepUncalled) != 0); if (messages & EShMsgAST) @@ -2154,8 +2096,6 @@ const char* TProgram::getInfoDebugLog() return infoSink->debug.c_str(); } -#if !defined(GLSLANG_WEB) - // // Reflection implementation. // @@ -2236,6 +2176,4 @@ bool TProgram::mapIO(TIoMapResolver* pResolver, TIoMapper* pIoMapper) return ioMapper->doMap(pResolver, *infoSink); } -#endif // !GLSLANG_WEB - } // end namespace glslang diff --git a/glslang/MachineIndependent/SpirvIntrinsics.cpp b/glslang/MachineIndependent/SpirvIntrinsics.cpp index 6650f7d9..1d08797a 100755 --- a/glslang/MachineIndependent/SpirvIntrinsics.cpp +++ b/glslang/MachineIndependent/SpirvIntrinsics.cpp @@ -33,8 +33,6 @@ // POSSIBILITY OF SUCH DAMAGE. // -#ifndef GLSLANG_WEB - // // GL_EXT_spirv_intrinsics // @@ -45,6 +43,15 @@ namespace glslang { +bool TSpirvTypeParameter::operator==(const TSpirvTypeParameter& rhs) const +{ + if (getAsConstant() != nullptr) + return getAsConstant()->getConstArray() == rhs.getAsConstant()->getConstArray(); + + assert(getAsType() != nullptr); + return *getAsType() == *rhs.getAsType(); +} + // // Handle SPIR-V requirements // @@ -67,7 +74,7 @@ TSpirvRequirement* TParseContext::makeSpirvRequirement(const TSourceLoc& loc, co spirvReq->capabilities.insert(capability->getAsConstantUnion()->getConstArray()[0].getIConst()); } } else - error(loc, "unknow SPIR-V requirement", name.c_str(), ""); + error(loc, "unknown SPIR-V requirement", name.c_str(), ""); return spirvReq; } @@ -168,7 +175,7 @@ void TQualifier::setSpirvDecorateId(int decoration, const TIntermAggregate* args TVector extraOperands; for (auto arg : args->getSequence()) { auto extraOperand = arg->getAsTyped(); - assert(extraOperand != nullptr && extraOperand->getQualifier().isConstant()); + assert(extraOperand != nullptr); extraOperands.push_back(extraOperand); } spirvDecorate->decorateIds[decoration] = extraOperands; @@ -202,30 +209,29 @@ TString TQualifier::getSpirvDecorateQualifierString() const 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(); - if (constant->getBasicType() == EbtFloat) { - float value = static_cast(constArray[0].getDConst()); - appendFloat(value); + if (constant->getAsConstantUnion()) { + auto& constArray = constant->getAsConstantUnion()->getConstArray(); + if (constant->getBasicType() == EbtFloat) { + float value = static_cast(constArray[0].getDConst()); + appendFloat(value); + } else if (constant->getBasicType() == EbtInt) { + int value = constArray[0].getIConst(); + appendInt(value); + } else if (constant->getBasicType() == EbtUint) { + unsigned value = constArray[0].getUConst(); + appendUint(value); + } else if (constant->getBasicType() == EbtBool) { + bool value = constArray[0].getBConst(); + appendBool(value); + } else if (constant->getBasicType() == EbtString) { + const TString* value = constArray[0].getSConst(); + appendStr(value->c_str()); + } else + assert(0); + } else { + assert(constant->getAsSymbolNode()); + appendStr(constant->getAsSymbolNode()->getName().c_str()); } - else if (constant->getBasicType() == EbtInt) { - int value = constArray[0].getIConst(); - appendInt(value); - } - else if (constant->getBasicType() == EbtUint) { - unsigned value = constArray[0].getUConst(); - appendUint(value); - } - else if (constant->getBasicType() == EbtBool) { - bool value = constArray[0].getBConst(); - appendBool(value); - } - else if (constant->getBasicType() == EbtString) { - const TString* value = constArray[0].getSConst(); - appendStr(value->c_str()); - } - else - assert(0); }; for (auto& decorate : spirvDecorate->decorates) { @@ -284,14 +290,20 @@ TSpirvTypeParameters* TParseContext::makeSpirvTypeParameters(const TSourceLoc& l constant->getBasicType() != EbtBool && constant->getBasicType() != EbtString) error(loc, "this type not allowed", constant->getType().getBasicString(), ""); - else { - assert(constant); + else spirvTypeParams->push_back(TSpirvTypeParameter(constant)); - } return spirvTypeParams; } +TSpirvTypeParameters* TParseContext::makeSpirvTypeParameters(const TSourceLoc& /* loc */, + 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 @@ -346,5 +358,3 @@ TSpirvInstruction* TParseContext::mergeSpirvInstruction(const TSourceLoc& loc, T } } // end namespace glslang - -#endif // GLSLANG_WEB diff --git a/glslang/MachineIndependent/SymbolTable.cpp b/glslang/MachineIndependent/SymbolTable.cpp index 57b868a2..dae5a8b9 100755 --- a/glslang/MachineIndependent/SymbolTable.cpp +++ b/glslang/MachineIndependent/SymbolTable.cpp @@ -65,7 +65,6 @@ void TType::buildMangledName(TString& mangledName) const case EbtInt: mangledName += 'i'; break; case EbtUint: mangledName += 'u'; break; case EbtBool: mangledName += 'b'; break; -#ifndef GLSLANG_WEB case EbtDouble: mangledName += 'd'; break; case EbtFloat16: mangledName += "f16"; break; case EbtInt8: mangledName += "i8"; break; @@ -78,12 +77,10 @@ void TType::buildMangledName(TString& mangledName) const case EbtAccStruct: mangledName += "as"; break; case EbtRayQuery: mangledName += "rq"; break; case EbtSpirvType: mangledName += "spv-t"; break; -#endif + case EbtHitObjectNV: mangledName += "ho"; break; case EbtSampler: switch (sampler.type) { -#ifndef GLSLANG_WEB case EbtFloat16: mangledName += "f16"; break; -#endif case EbtInt: mangledName += "i"; break; case EbtUint: mangledName += "u"; break; case EbtInt64: mangledName += "i64"; break; @@ -110,12 +107,10 @@ void TType::buildMangledName(TString& mangledName) const case Esd2D: mangledName += "2"; break; case Esd3D: mangledName += "3"; break; case EsdCube: mangledName += "C"; break; -#ifndef GLSLANG_WEB case Esd1D: mangledName += "1"; break; case EsdRect: mangledName += "R2"; break; case EsdBuffer: mangledName += "B"; break; case EsdSubpass: mangledName += "P"; break; -#endif default: break; // some compilers want this } @@ -183,8 +178,6 @@ void TType::buildMangledName(TString& mangledName) const } } -#if !defined(GLSLANG_WEB) - // // Dump functions. // @@ -263,8 +256,6 @@ void TSymbolTable::dump(TInfoSink& infoSink, bool complete) const } } -#endif - // // Functions have buried pointers to delete. // @@ -327,6 +318,16 @@ void TSymbolTableLevel::setFunctionExtensions(const char* name, int num, const c } } +// Make a single function require an extension(s). i.e., this will only set the extensions for the symbol that matches 'name' exactly. +// This is different from setFunctionExtensions, which uses std::map::lower_bound to effectively set all symbols that start with 'name'. +// Should only be used for a version/profile that actually needs the extension(s). +void TSymbolTableLevel::setSingleFunctionExtensions(const char* name, int num, const char* const extensions[]) +{ + if (auto candidate = level.find(name); candidate != level.end()) { + candidate->second->setExtensions(num, extensions); + } +} + // // Make all symbols in this table level read only. // @@ -381,7 +382,7 @@ TVariable* TVariable::clone() const TFunction::TFunction(const TFunction& copyOf) : TSymbol(copyOf) { for (unsigned int i = 0; i < copyOf.parameters.size(); ++i) { - TParameter param; + TParameter param{}; parameters.push_back(param); (void)parameters.back().copyParam(copyOf.parameters[i]); } @@ -397,9 +398,7 @@ TFunction::TFunction(const TFunction& copyOf) : TSymbol(copyOf) implicitThis = copyOf.implicitThis; illegalImplicitThis = copyOf.illegalImplicitThis; defaultParamCount = copyOf.defaultParamCount; -#ifndef GLSLANG_WEB spirvInst = copyOf.spirvInst; -#endif } TFunction* TFunction::clone() const diff --git a/glslang/MachineIndependent/SymbolTable.h b/glslang/MachineIndependent/SymbolTable.h index bf427c5e..94c3929d 100755 --- a/glslang/MachineIndependent/SymbolTable.h +++ b/glslang/MachineIndependent/SymbolTable.h @@ -117,10 +117,8 @@ public: virtual int getNumExtensions() const { return extensions == nullptr ? 0 : (int)extensions->size(); } virtual const char** getExtensions() const { return extensions->data(); } -#if !defined(GLSLANG_WEB) virtual void dump(TInfoSink& infoSink, bool complete = false) const = 0; void dumpExtensions(TInfoSink& infoSink) const; -#endif virtual bool isReadOnly() const { return ! writable; } virtual void makeReadOnly() { writable = false; } @@ -196,9 +194,7 @@ public: } virtual const char** getMemberExtensions(int member) const { return (*memberExtensions)[member].data(); } -#if !defined(GLSLANG_WEB) virtual void dump(TInfoSink& infoSink, bool complete = false) const; -#endif protected: explicit TVariable(const TVariable&); @@ -250,7 +246,8 @@ public: TSymbol(name), mangledName(*name + '('), op(tOp), - defined(false), prototyped(false), implicitThis(false), illegalImplicitThis(false), defaultParamCount(0) + defined(false), prototyped(false), implicitThis(false), illegalImplicitThis(false), defaultParamCount(0), + linkType(ELinkNone) { returnType.shallowCopy(retType); declaredBuiltIn = retType.getQualifier().builtIn; @@ -319,19 +316,19 @@ public: virtual TParameter& operator[](int i) { assert(writable); return parameters[i]; } virtual const TParameter& operator[](int i) const { return parameters[i]; } + const TQualifier& getQualifier() const { return returnType.getQualifier(); } -#ifndef GLSLANG_WEB virtual void setSpirvInstruction(const TSpirvInstruction& inst) { relateToOperator(EOpSpirvInst); spirvInst = inst; } virtual const TSpirvInstruction& getSpirvInstruction() const { return spirvInst; } -#endif -#if !defined(GLSLANG_WEB) virtual void dump(TInfoSink& infoSink, bool complete = false) const override; -#endif + + void setExport() { linkType = ELinkExport; } + TLinkType getLinkType() const { return linkType; } protected: explicit TFunction(const TFunction&); @@ -353,9 +350,8 @@ protected: // but is not allowed to use them, or see hidden symbols instead. int defaultParamCount; -#ifndef GLSLANG_WEB TSpirvInstruction spirvInst; // SPIR-V instruction qualifiers -#endif + TLinkType linkType; }; // @@ -395,9 +391,7 @@ public: virtual const char** getExtensions() const override { return anonContainer.getMemberExtensions(memberNumber); } virtual int getAnonId() const { return anonId; } -#if !defined(GLSLANG_WEB) virtual void dump(TInfoSink& infoSink, bool complete = false) const override; -#endif protected: explicit TAnonMember(const TAnonMember&); @@ -582,9 +576,8 @@ public: void relateToOperator(const char* name, TOperator op); void setFunctionExtensions(const char* name, int num, const char* const extensions[]); -#if !defined(GLSLANG_WEB) + void setSingleFunctionExtensions(const char* name, int num, const char* const extensions[]); void dump(TInfoSink& infoSink, bool complete = false) const; -#endif TSymbolTableLevel* clone() const; void readOnly(); @@ -885,6 +878,12 @@ public: table[level]->setFunctionExtensions(name, num, extensions); } + void setSingleFunctionExtensions(const char* name, int num, const char* const extensions[]) + { + for (unsigned int level = 0; level < table.size(); ++level) + table[level]->setSingleFunctionExtensions(name, num, extensions); + } + void setVariableExtensions(const char* name, int numExts, const char* const extensions[]) { TSymbol* symbol = find(TString(name)); @@ -912,9 +911,7 @@ public: } long long getMaxSymbolId() { return uniqueId; } -#if !defined(GLSLANG_WEB) void dump(TInfoSink& infoSink, bool complete = false) const; -#endif void copyTable(const TSymbolTable& copyOf); void setPreviousDefaultPrecisions(TPrecisionQualifier *p) { table[currentLevel()]->setPreviousDefaultPrecisions(p); } diff --git a/glslang/MachineIndependent/Versions.cpp b/glslang/MachineIndependent/Versions.cpp index b43f2b86..694246cb 100755 --- a/glslang/MachineIndependent/Versions.cpp +++ b/glslang/MachineIndependent/Versions.cpp @@ -151,8 +151,6 @@ namespace glslang { -#ifndef GLSLANG_WEB - // // Initialize all extensions, almost always to 'disable', as once their features // are incorporated into a core version, their features are supported through allowing that @@ -227,6 +225,7 @@ void TParseVersions::initializeExtensionBehavior() 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_bindless_texture] = EBhDisable; extensionBehavior[E_GL_ARB_fragment_coord_conventions] = EBhDisable; @@ -262,6 +261,8 @@ void TParseVersions::initializeExtensionBehavior() extensionBehavior[E_GL_EXT_fragment_shader_barycentric] = EBhDisable; + extensionBehavior[E_GL_KHR_cooperative_matrix] = EBhDisable; + // #line and #include extensionBehavior[E_GL_GOOGLE_cpp_style_line_directive] = EBhDisable; extensionBehavior[E_GL_GOOGLE_include_directive] = EBhDisable; @@ -296,14 +297,17 @@ void TParseVersions::initializeExtensionBehavior() extensionBehavior[E_GL_NV_compute_shader_derivatives] = EBhDisable; extensionBehavior[E_GL_NV_shader_texture_footprint] = EBhDisable; extensionBehavior[E_GL_NV_mesh_shader] = EBhDisable; - extensionBehavior[E_GL_NV_cooperative_matrix] = EBhDisable; extensionBehavior[E_GL_NV_shader_sm_builtins] = EBhDisable; extensionBehavior[E_GL_NV_integer_cooperative_matrix] = EBhDisable; + extensionBehavior[E_GL_NV_shader_invocation_reorder] = EBhDisable; + extensionBehavior[E_GL_NV_displacement_micromap] = EBhDisable; // ARM - extensionBehavior[E_GL_ARM_shader_core_builtins] = EBhDisable; + extensionBehavior[E_GL_ARM_shader_core_builtins] = EBhDisable; + // QCOM + extensionBehavior[E_GL_QCOM_image_processing] = EBhDisable; // AEP extensionBehavior[E_GL_ANDROID_extension_pack_es31a] = EBhDisable; @@ -352,6 +356,11 @@ void TParseVersions::initializeExtensionBehavior() extensionBehavior[E_GL_EXT_spirv_intrinsics] = EBhDisable; extensionBehavior[E_GL_EXT_mesh_shader] = EBhDisable; extensionBehavior[E_GL_EXT_opacity_micromap] = EBhDisable; + extensionBehavior[E_GL_EXT_ray_tracing_position_fetch] = EBhDisable; + extensionBehavior[E_GL_EXT_shader_tile_image] = EBhDisable; + extensionBehavior[E_GL_EXT_texture_shadow_lod] = EBhDisable; + extensionBehavior[E_GL_EXT_draw_instanced] = EBhDisable; + extensionBehavior[E_GL_EXT_texture_array] = EBhDisable; // OVR extensions extensionBehavior[E_GL_OVR_multiview] = EBhDisable; @@ -374,9 +383,10 @@ void TParseVersions::initializeExtensionBehavior() extensionBehavior[E_GL_EXT_shader_subgroup_extended_types_float16] = EBhDisable; extensionBehavior[E_GL_EXT_shader_atomic_float] = EBhDisable; extensionBehavior[E_GL_EXT_shader_atomic_float2] = EBhDisable; -} -#endif // GLSLANG_WEB + // Record extensions not for spv. + spvUnsupportedExt.push_back(E_GL_ARB_bindless_texture); +} // Get code that is not part of a shared symbol table, is specific to this shader, // or needed by the preprocessor (which does not use a shared symbol table). @@ -386,9 +396,6 @@ void TParseVersions::getPreamble(std::string& preamble) preamble = "#define GL_ES 1\n" "#define GL_FRAGMENT_PRECISION_HIGH 1\n" -#ifdef GLSLANG_WEB - ; -#else "#define GL_OES_texture_3D 1\n" "#define GL_OES_standard_derivatives 1\n" "#define GL_EXT_frag_depth 1\n" @@ -429,6 +436,8 @@ void TParseVersions::getPreamble(std::string& preamble) "#define GL_OES_texture_buffer 1\n" "#define GL_OES_texture_cube_map_array 1\n" "#define GL_EXT_shader_non_constant_global_initializers 1\n" + + "#define GL_QCOM_image_processing 1\n" ; if (version >= 300) { @@ -441,7 +450,6 @@ void TParseVersions::getPreamble(std::string& preamble) } else { // !isEsProfile() preamble = - "#define GL_FRAGMENT_PRECISION_HIGH 1\n" "#define GL_ARB_texture_rectangle 1\n" "#define GL_ARB_shading_language_420pack 1\n" "#define GL_ARB_texture_gather 1\n" @@ -481,6 +489,7 @@ void TParseVersions::getPreamble(std::string& preamble) "#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" @@ -510,6 +519,8 @@ void TParseVersions::getPreamble(std::string& preamble) "#define GL_KHR_shader_subgroup_clustered 1\n" "#define GL_KHR_shader_subgroup_quad 1\n" + "#define GL_KHR_cooperative_matrix 1\n" + "#define GL_EXT_shader_image_int64 1\n" "#define GL_EXT_shader_atomic_int64 1\n" "#define GL_EXT_shader_realtime_clock 1\n" @@ -517,6 +528,7 @@ void TParseVersions::getPreamble(std::string& preamble) "#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_ray_tracing_position_fetch 1\n" "#define GL_EXT_spirv_intrinsics 1\n" "#define GL_EXT_mesh_shader 1\n" @@ -548,6 +560,9 @@ void TParseVersions::getPreamble(std::string& preamble) "#define GL_NV_mesh_shader 1\n" "#define GL_NV_cooperative_matrix 1\n" "#define GL_NV_integer_cooperative_matrix 1\n" + "#define GL_NV_shader_invocation_reorder 1\n" + + "#define GL_QCOM_image_processing 1\n" "#define GL_EXT_shader_explicit_arithmetic_types 1\n" "#define GL_EXT_shader_explicit_arithmetic_types_int8 1\n" @@ -567,8 +582,13 @@ void TParseVersions::getPreamble(std::string& preamble) "#define GL_EXT_shader_atomic_float2 1\n" "#define GL_EXT_fragment_shader_barycentric 1\n" + "#define GL_EXT_texture_array 1\n" ; + if (spvVersion.spv == 0) { + preamble += "#define GL_ARB_bindless_texture 1\n"; + } + if (version >= 150) { // define GL_core_profile and GL_compatibility_profile preamble += "#define GL_core_profile 1\n"; @@ -580,10 +600,11 @@ void TParseVersions::getPreamble(std::string& preamble) preamble += "#define GL_EXT_null_initializer 1\n"; preamble += "#define GL_EXT_subgroup_uniform_control_flow 1\n"; } -#endif // GLSLANG_WEB + if (version >= 130) { + preamble +="#define GL_FRAGMENT_PRECISION_HIGH 1\n"; + } } -#ifndef GLSLANG_WEB if ((!isEsProfile() && version >= 140) || (isEsProfile() && version >= 310)) { preamble += @@ -611,7 +632,6 @@ void TParseVersions::getPreamble(std::string& preamble) preamble += "#define GL_EXT_terminate_invocation 1\n" ; -#endif // #define VULKAN XXXX const int numberBufSize = 12; @@ -623,7 +643,6 @@ void TParseVersions::getPreamble(std::string& preamble) preamble += "\n"; } -#ifndef GLSLANG_WEB // #define GL_SPIRV XXXX if (spvVersion.openGl > 0) { preamble += "#define GL_SPIRV "; @@ -631,9 +650,7 @@ void TParseVersions::getPreamble(std::string& preamble) preamble += numberBuf; preamble += "\n"; } -#endif -#ifndef GLSLANG_WEB // GL_EXT_spirv_intrinsics if (!isEsProfile()) { switch (language) { @@ -654,7 +671,6 @@ void TParseVersions::getPreamble(std::string& preamble) default: break; } } -#endif } // @@ -666,7 +682,6 @@ const char* StageName(EShLanguage stage) case EShLangVertex: return "vertex"; case EShLangFragment: return "fragment"; case EShLangCompute: return "compute"; -#ifndef GLSLANG_WEB case EShLangTessControl: return "tessellation control"; case EShLangTessEvaluation: return "tessellation evaluation"; case EShLangGeometry: return "geometry"; @@ -678,7 +693,6 @@ const char* StageName(EShLanguage stage) case EShLangCallable: return "callable"; case EShLangMesh: return "mesh"; case EShLangTask: return "task"; -#endif default: return "unknown stage"; } } @@ -703,7 +717,6 @@ void TParseVersions::requireStage(const TSourceLoc& loc, EShLanguage stage, cons requireStage(loc, static_cast(1 << stage), featureDesc); } -#ifndef GLSLANG_WEB // // When to use requireProfile(): // @@ -741,7 +754,6 @@ void TParseVersions::profileRequires(const TSourceLoc& loc, int profileMask, int { if (profile & profileMask) { bool okay = minVersion > 0 && version >= minVersion; -#ifndef GLSLANG_WEB for (int i = 0; i < numExtensions; ++i) { switch (getExtensionBehavior(extensions[i])) { case EBhWarn: @@ -754,7 +766,6 @@ void TParseVersions::profileRequires(const TSourceLoc& loc, int profileMask, int default: break; // some compilers want this } } -#endif if (! okay) error(loc, "not supported for this version or the enabled extensions", featureDesc, ""); } @@ -1103,6 +1114,13 @@ void TParseVersions::extensionRequires(const TSourceLoc &loc, const char * const minSpvVersion = iter->second; requireSpv(loc, extension, minSpvVersion); } + + if (spvVersion.spv != 0){ + for (auto ext : spvUnsupportedExt){ + if (strcmp(extension, ext.c_str()) == 0) + error(loc, "not allowed when using generating SPIR-V codes", extension, ""); + } + } } // Call for any operation needing full GLSL integer data-type support. @@ -1315,7 +1333,7 @@ void TParseVersions::int64Check(const TSourceLoc& loc, const char* op, bool buil } } -void TParseVersions::fcoopmatCheck(const TSourceLoc& loc, const char* op, bool builtIn) +void TParseVersions::fcoopmatCheckNV(const TSourceLoc& loc, const char* op, bool builtIn) { if (!builtIn) { const char* const extensions[] = {E_GL_NV_cooperative_matrix}; @@ -1323,14 +1341,22 @@ void TParseVersions::fcoopmatCheck(const TSourceLoc& loc, const char* op, bool b } } -void TParseVersions::intcoopmatCheck(const TSourceLoc& loc, const char* op, bool builtIn) +void TParseVersions::intcoopmatCheckNV(const TSourceLoc& loc, const char* op, bool builtIn) { if (!builtIn) { const char* const extensions[] = {E_GL_NV_integer_cooperative_matrix}; requireExtensions(loc, sizeof(extensions)/sizeof(extensions[0]), extensions, op); } } -#endif // GLSLANG_WEB + +void TParseVersions::coopmatCheck(const TSourceLoc& loc, const char* op, bool builtIn) +{ + if (!builtIn) { + const char* const extensions[] = {E_GL_KHR_cooperative_matrix}; + requireExtensions(loc, sizeof(extensions)/sizeof(extensions[0]), extensions, op); + } +} + // Call for any operation removed because SPIR-V is in use. void TParseVersions::spvRemoved(const TSourceLoc& loc, const char* op) { @@ -1348,26 +1374,20 @@ void TParseVersions::vulkanRemoved(const TSourceLoc& loc, const char* op) // Call for any operation that requires Vulkan. void TParseVersions::requireVulkan(const TSourceLoc& loc, const char* op) { -#ifndef GLSLANG_WEB if (spvVersion.vulkan == 0) error(loc, "only allowed when using GLSL for Vulkan", op, ""); -#endif } // Call for any operation that requires SPIR-V. void TParseVersions::requireSpv(const TSourceLoc& loc, const char* op) { -#ifndef GLSLANG_WEB if (spvVersion.spv == 0) error(loc, "only allowed when generating SPIR-V", op, ""); -#endif } void TParseVersions::requireSpv(const TSourceLoc& loc, const char *op, unsigned int version) { -#ifndef GLSLANG_WEB if (spvVersion.spv < version) error(loc, "not supported for current targeted SPIR-V version", op, ""); -#endif } } // end namespace glslang diff --git a/glslang/MachineIndependent/Versions.h b/glslang/MachineIndependent/Versions.h index d0a3effb..475cb893 100755 --- a/glslang/MachineIndependent/Versions.h +++ b/glslang/MachineIndependent/Versions.h @@ -163,6 +163,7 @@ const char* const E_GL_ARB_texture_query_lod = "GL_ARB_texture_query_ 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_ARB_bindless_texture = "GL_ARB_bindless_texture"; 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"; @@ -173,6 +174,7 @@ const char* const E_GL_KHR_shader_subgroup_shuffle_relative = "GL_KHR_shader_sub const char* const E_GL_KHR_shader_subgroup_clustered = "GL_KHR_shader_subgroup_clustered"; const char* const E_GL_KHR_shader_subgroup_quad = "GL_KHR_shader_subgroup_quad"; const char* const E_GL_KHR_memory_scope_semantics = "GL_KHR_memory_scope_semantics"; +const char* const E_GL_KHR_cooperative_matrix = "GL_KHR_cooperative_matrix"; const char* const E_GL_EXT_shader_atomic_int64 = "GL_EXT_shader_atomic_int64"; @@ -213,6 +215,8 @@ const char* const E_GL_EXT_spirv_intrinsics = "GL_EXT_spirv_intr const char* const E_GL_EXT_fragment_shader_barycentric = "GL_EXT_fragment_shader_barycentric"; const char* const E_GL_EXT_mesh_shader = "GL_EXT_mesh_shader"; const char* const E_GL_EXT_opacity_micromap = "GL_EXT_opacity_micromap"; +const char* const E_GL_EXT_draw_instanced = "GL_EXT_draw_instanced"; +const char* const E_GL_EXT_texture_array = "GL_EXT_texture_array"; // Arrays of extensions for the above viewportEXTs duplications @@ -264,6 +268,12 @@ const char* const E_GL_NV_fragment_shader_barycentric = "GL_NV_fragmen const char* const E_GL_NV_compute_shader_derivatives = "GL_NV_compute_shader_derivatives"; const char* const E_GL_NV_shader_texture_footprint = "GL_NV_shader_texture_footprint"; const char* const E_GL_NV_mesh_shader = "GL_NV_mesh_shader"; +const char* const E_GL_NV_cooperative_matrix = "GL_NV_cooperative_matrix"; +const char* const E_GL_NV_shader_sm_builtins = "GL_NV_shader_sm_builtins"; +const char* const E_GL_NV_integer_cooperative_matrix = "GL_NV_integer_cooperative_matrix"; +const char* const E_GL_NV_shader_invocation_reorder = "GL_NV_shader_invocation_reorder"; +const char* const E_GL_EXT_ray_tracing_position_fetch = "GL_EXT_ray_tracing_position_fetch"; +const char* const E_GL_NV_displacement_micromap = "GL_NV_displacement_micromap"; // ARM const char* const E_GL_ARM_shader_core_builtins = "GL_ARM_shader_core_builtins"; @@ -273,9 +283,8 @@ const char* const E_GL_ARM_shader_core_builtins = "GL_ARM_shader const char* const viewportEXTs[] = { E_GL_ARB_shader_viewport_layer_array, E_GL_NV_viewport_array2 }; const int Num_viewportEXTs = sizeof(viewportEXTs) / sizeof(viewportEXTs[0]); -const char* const E_GL_NV_cooperative_matrix = "GL_NV_cooperative_matrix"; -const char* const E_GL_NV_shader_sm_builtins = "GL_NV_shader_sm_builtins"; -const char* const E_GL_NV_integer_cooperative_matrix = "GL_NV_integer_cooperative_matrix"; + +const char* const E_GL_QCOM_image_processing = "GL_QCOM_image_processing"; // AEP const char* const E_GL_ANDROID_extension_pack_es31a = "GL_ANDROID_extension_pack_es31a"; @@ -325,6 +334,10 @@ const char* const E_GL_EXT_terminate_invocation = "GL_EXT_terminate_invocation"; const char* const E_GL_EXT_shader_atomic_float = "GL_EXT_shader_atomic_float"; const char* const E_GL_EXT_shader_atomic_float2 = "GL_EXT_shader_atomic_float2"; +const char* const E_GL_EXT_shader_tile_image = "GL_EXT_shader_tile_image"; + +const char* const E_GL_EXT_texture_shadow_lod = "GL_EXT_texture_shadow_lod"; + // Arrays of extensions for the above AEP duplications const char* const AEP_geometry_shader[] = { E_GL_EXT_geometry_shader, E_GL_OES_geometry_shader }; diff --git a/glslang/MachineIndependent/attribute.cpp b/glslang/MachineIndependent/attribute.cpp index df7fdc2a..a167c494 100755 --- a/glslang/MachineIndependent/attribute.cpp +++ b/glslang/MachineIndependent/attribute.cpp @@ -34,8 +34,6 @@ // POSSIBILITY OF SUCH DAMAGE. // -#ifndef GLSLANG_WEB - #include "attribute.h" #include "../Include/intermediate.h" #include "ParseHelper.h" @@ -125,6 +123,8 @@ TAttributeType TParseContext::attributeFromName(const TString& name) const return EatPartialCount; else if (name == "subgroup_uniform_control_flow") return EatSubgroupUniformControlFlow; + else if (name == "export") + return EatExport; else return EatNone; } @@ -357,6 +357,7 @@ void TParseContext::handleFunctionAttributes(const TSourceLoc& loc, const TAttri switch (it->name) { case EatSubgroupUniformControlFlow: + requireExtensions(loc, 1, &E_GL_EXT_subgroup_uniform_control_flow, "attribute"); intermediate.setSubgroupUniformControlFlow(); break; default: @@ -367,5 +368,3 @@ void TParseContext::handleFunctionAttributes(const TSourceLoc& loc, const TAttri } } // end namespace glslang - -#endif // GLSLANG_WEB diff --git a/glslang/MachineIndependent/attribute.h b/glslang/MachineIndependent/attribute.h index c5b29176..a0c4c43d 100755 --- a/glslang/MachineIndependent/attribute.h +++ b/glslang/MachineIndependent/attribute.h @@ -120,6 +120,7 @@ namespace glslang { EatNonWritable, EatNonReadable, EatSubgroupUniformControlFlow, + EatExport, }; class TIntermAggregate; diff --git a/glslang/MachineIndependent/glslang.m4 b/glslang/MachineIndependent/glslang.m4 deleted file mode 100755 index a59da443..00000000 --- a/glslang/MachineIndependent/glslang.m4 +++ /dev/null @@ -1,4422 +0,0 @@ -// -// Copyright (C) 2002-2005 3Dlabs Inc. Ltd. -// Copyright (C) 2012-2013 LunarG, Inc. -// Copyright (C) 2017 ARM Limited. -// Copyright (C) 2015-2019 Google, Inc. -// Modifications Copyright (C) 2020 Advanced Micro Devices, Inc. All rights reserved. -// -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions -// are met: -// -// Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// -// Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following -// disclaimer in the documentation and/or other materials provided -// with the distribution. -// -// Neither the name of 3Dlabs Inc. Ltd. nor the names of its -// contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -// COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. -// - -// -// Do not edit the .y file, only edit the .m4 file. -// The .y bison file is not a source file, it is a derivative of the .m4 file. -// The m4 file needs to be processed by m4 to generate the .y bison file. -// -// Code sandwiched between a pair: -// -// GLSLANG_WEB_EXCLUDE_ON -// ... -// ... -// ... -// GLSLANG_WEB_EXCLUDE_OFF -// -// Will be excluded from the grammar when m4 is executed as: -// -// m4 -P -DGLSLANG_WEB -// -// It will be included when m4 is executed as: -// -// m4 -P -// - -m4_define(`GLSLANG_WEB_EXCLUDE_ON', `m4_ifdef(`GLSLANG_WEB', `m4_divert(`-1')')') -m4_define(`GLSLANG_WEB_EXCLUDE_OFF', `m4_ifdef(`GLSLANG_WEB', `m4_divert')') - -/** - * This is bison grammar and productions for parsing all versions of the - * GLSL shading languages. - */ -%{ - -/* Based on: -ANSI C Yacc grammar - -In 1985, Jeff Lee published his Yacc grammar (which is accompanied by a -matching Lex specification) for the April 30, 1985 draft version of the -ANSI C standard. Tom Stockfisch reposted it to net.sources in 1987; that -original, as mentioned in the answer to question 17.25 of the comp.lang.c -FAQ, can be ftp'ed from ftp.uu.net, file usenet/net.sources/ansi.c.grammar.Z. - -I intend to keep this version as close to the current C Standard grammar as -possible; please let me know if you discover discrepancies. - -Jutta Degener, 1995 -*/ - -#include "SymbolTable.h" -#include "ParseHelper.h" -#include "../Public/ShaderLang.h" -#include "attribute.h" - -using namespace glslang; - -%} - -%define parse.error verbose - -%union { - struct { - glslang::TSourceLoc loc; - union { - glslang::TString *string; - int i; - unsigned int u; - long long i64; - unsigned long long u64; - bool b; - double d; - }; - glslang::TSymbol* symbol; - } lex; - struct { - glslang::TSourceLoc loc; - glslang::TOperator op; - union { - TIntermNode* intermNode; - glslang::TIntermNodePair nodePair; - glslang::TIntermTyped* intermTypedNode; - glslang::TAttributes* attributes; - glslang::TSpirvRequirement* spirvReq; - glslang::TSpirvInstruction* spirvInst; - glslang::TSpirvTypeParameters* spirvTypeParams; - }; - union { - glslang::TPublicType type; - glslang::TFunction* function; - glslang::TParameter param; - glslang::TTypeLoc typeLine; - glslang::TTypeList* typeList; - glslang::TArraySizes* arraySizes; - glslang::TIdentifierList* identifierList; - }; - glslang::TArraySizes* typeParameters; - } interm; -} - -%{ - -/* windows only pragma */ -#ifdef _MSC_VER - #pragma warning(disable : 4065) - #pragma warning(disable : 4127) - #pragma warning(disable : 4244) -#endif - -#define parseContext (*pParseContext) -#define yyerror(context, msg) context->parserError(msg) - -extern int yylex(YYSTYPE*, TParseContext&); - -%} - -%parse-param {glslang::TParseContext* pParseContext} -%lex-param {parseContext} -%pure-parser // enable thread safety -%expect 1 // One shift reduce conflict because of if | else - -%token CONST BOOL INT UINT FLOAT -%token BVEC2 BVEC3 BVEC4 -%token IVEC2 IVEC3 IVEC4 -%token UVEC2 UVEC3 UVEC4 -%token VEC2 VEC3 VEC4 -%token MAT2 MAT3 MAT4 -%token MAT2X2 MAT2X3 MAT2X4 -%token MAT3X2 MAT3X3 MAT3X4 -%token MAT4X2 MAT4X3 MAT4X4 - -// combined image/sampler -%token SAMPLER2D SAMPLER3D SAMPLERCUBE SAMPLER2DSHADOW -%token SAMPLERCUBESHADOW SAMPLER2DARRAY -%token SAMPLER2DARRAYSHADOW ISAMPLER2D ISAMPLER3D ISAMPLERCUBE -%token ISAMPLER2DARRAY USAMPLER2D USAMPLER3D -%token USAMPLERCUBE USAMPLER2DARRAY - -// separate image/sampler -%token SAMPLER SAMPLERSHADOW -%token TEXTURE2D TEXTURE3D TEXTURECUBE TEXTURE2DARRAY -%token ITEXTURE2D ITEXTURE3D ITEXTURECUBE ITEXTURE2DARRAY -%token UTEXTURE2D UTEXTURE3D UTEXTURECUBE UTEXTURE2DARRAY - -GLSLANG_WEB_EXCLUDE_ON - -%token ATTRIBUTE VARYING -%token FLOAT16_T FLOAT32_T DOUBLE FLOAT64_T -%token INT64_T UINT64_T INT32_T UINT32_T INT16_T UINT16_T INT8_T UINT8_T -%token I64VEC2 I64VEC3 I64VEC4 -%token U64VEC2 U64VEC3 U64VEC4 -%token I32VEC2 I32VEC3 I32VEC4 -%token U32VEC2 U32VEC3 U32VEC4 -%token I16VEC2 I16VEC3 I16VEC4 -%token U16VEC2 U16VEC3 U16VEC4 -%token I8VEC2 I8VEC3 I8VEC4 -%token U8VEC2 U8VEC3 U8VEC4 -%token DVEC2 DVEC3 DVEC4 DMAT2 DMAT3 DMAT4 -%token F16VEC2 F16VEC3 F16VEC4 F16MAT2 F16MAT3 F16MAT4 -%token F32VEC2 F32VEC3 F32VEC4 F32MAT2 F32MAT3 F32MAT4 -%token F64VEC2 F64VEC3 F64VEC4 F64MAT2 F64MAT3 F64MAT4 -%token DMAT2X2 DMAT2X3 DMAT2X4 -%token DMAT3X2 DMAT3X3 DMAT3X4 -%token DMAT4X2 DMAT4X3 DMAT4X4 -%token F16MAT2X2 F16MAT2X3 F16MAT2X4 -%token F16MAT3X2 F16MAT3X3 F16MAT3X4 -%token F16MAT4X2 F16MAT4X3 F16MAT4X4 -%token F32MAT2X2 F32MAT2X3 F32MAT2X4 -%token F32MAT3X2 F32MAT3X3 F32MAT3X4 -%token F32MAT4X2 F32MAT4X3 F32MAT4X4 -%token F64MAT2X2 F64MAT2X3 F64MAT2X4 -%token F64MAT3X2 F64MAT3X3 F64MAT3X4 -%token F64MAT4X2 F64MAT4X3 F64MAT4X4 -%token ATOMIC_UINT -%token ACCSTRUCTNV -%token ACCSTRUCTEXT -%token RAYQUERYEXT -%token FCOOPMATNV ICOOPMATNV UCOOPMATNV - -// combined image/sampler -%token SAMPLERCUBEARRAY SAMPLERCUBEARRAYSHADOW -%token ISAMPLERCUBEARRAY USAMPLERCUBEARRAY -%token SAMPLER1D SAMPLER1DARRAY SAMPLER1DARRAYSHADOW ISAMPLER1D SAMPLER1DSHADOW -%token SAMPLER2DRECT SAMPLER2DRECTSHADOW ISAMPLER2DRECT USAMPLER2DRECT -%token SAMPLERBUFFER ISAMPLERBUFFER USAMPLERBUFFER -%token SAMPLER2DMS ISAMPLER2DMS USAMPLER2DMS -%token SAMPLER2DMSARRAY ISAMPLER2DMSARRAY USAMPLER2DMSARRAY -%token SAMPLEREXTERNALOES -%token SAMPLEREXTERNAL2DY2YEXT -%token ISAMPLER1DARRAY USAMPLER1D USAMPLER1DARRAY -%token F16SAMPLER1D F16SAMPLER2D F16SAMPLER3D F16SAMPLER2DRECT F16SAMPLERCUBE -%token F16SAMPLER1DARRAY F16SAMPLER2DARRAY F16SAMPLERCUBEARRAY -%token F16SAMPLERBUFFER F16SAMPLER2DMS F16SAMPLER2DMSARRAY -%token F16SAMPLER1DSHADOW F16SAMPLER2DSHADOW F16SAMPLER1DARRAYSHADOW F16SAMPLER2DARRAYSHADOW -%token F16SAMPLER2DRECTSHADOW F16SAMPLERCUBESHADOW F16SAMPLERCUBEARRAYSHADOW - -// images -%token IMAGE1D IIMAGE1D UIMAGE1D IMAGE2D IIMAGE2D -%token UIMAGE2D IMAGE3D IIMAGE3D UIMAGE3D -%token IMAGE2DRECT IIMAGE2DRECT UIMAGE2DRECT -%token IMAGECUBE IIMAGECUBE UIMAGECUBE -%token IMAGEBUFFER IIMAGEBUFFER UIMAGEBUFFER -%token IMAGE1DARRAY IIMAGE1DARRAY UIMAGE1DARRAY -%token IMAGE2DARRAY IIMAGE2DARRAY UIMAGE2DARRAY -%token IMAGECUBEARRAY IIMAGECUBEARRAY UIMAGECUBEARRAY -%token IMAGE2DMS IIMAGE2DMS UIMAGE2DMS -%token IMAGE2DMSARRAY IIMAGE2DMSARRAY UIMAGE2DMSARRAY - -%token F16IMAGE1D F16IMAGE2D F16IMAGE3D F16IMAGE2DRECT -%token F16IMAGECUBE F16IMAGE1DARRAY F16IMAGE2DARRAY F16IMAGECUBEARRAY -%token F16IMAGEBUFFER F16IMAGE2DMS F16IMAGE2DMSARRAY - -%token I64IMAGE1D U64IMAGE1D -%token I64IMAGE2D U64IMAGE2D -%token I64IMAGE3D U64IMAGE3D -%token I64IMAGE2DRECT U64IMAGE2DRECT -%token I64IMAGECUBE U64IMAGECUBE -%token I64IMAGEBUFFER U64IMAGEBUFFER -%token I64IMAGE1DARRAY U64IMAGE1DARRAY -%token I64IMAGE2DARRAY U64IMAGE2DARRAY -%token I64IMAGECUBEARRAY U64IMAGECUBEARRAY -%token I64IMAGE2DMS U64IMAGE2DMS -%token I64IMAGE2DMSARRAY U64IMAGE2DMSARRAY - -// texture without sampler -%token TEXTURECUBEARRAY ITEXTURECUBEARRAY UTEXTURECUBEARRAY -%token TEXTURE1D ITEXTURE1D UTEXTURE1D -%token TEXTURE1DARRAY ITEXTURE1DARRAY UTEXTURE1DARRAY -%token TEXTURE2DRECT ITEXTURE2DRECT UTEXTURE2DRECT -%token TEXTUREBUFFER ITEXTUREBUFFER UTEXTUREBUFFER -%token TEXTURE2DMS ITEXTURE2DMS UTEXTURE2DMS -%token TEXTURE2DMSARRAY ITEXTURE2DMSARRAY UTEXTURE2DMSARRAY - -%token F16TEXTURE1D F16TEXTURE2D F16TEXTURE3D F16TEXTURE2DRECT F16TEXTURECUBE -%token F16TEXTURE1DARRAY F16TEXTURE2DARRAY F16TEXTURECUBEARRAY -%token F16TEXTUREBUFFER F16TEXTURE2DMS F16TEXTURE2DMSARRAY - -// input attachments -%token SUBPASSINPUT SUBPASSINPUTMS ISUBPASSINPUT ISUBPASSINPUTMS USUBPASSINPUT USUBPASSINPUTMS -%token F16SUBPASSINPUT F16SUBPASSINPUTMS - -// spirv intrinsics -%token SPIRV_INSTRUCTION SPIRV_EXECUTION_MODE SPIRV_EXECUTION_MODE_ID -%token SPIRV_DECORATE SPIRV_DECORATE_ID SPIRV_DECORATE_STRING -%token SPIRV_TYPE SPIRV_STORAGE_CLASS SPIRV_BY_REFERENCE SPIRV_LITERAL - -GLSLANG_WEB_EXCLUDE_OFF - -%token LEFT_OP RIGHT_OP -%token INC_OP DEC_OP LE_OP GE_OP EQ_OP NE_OP -%token AND_OP OR_OP XOR_OP MUL_ASSIGN DIV_ASSIGN ADD_ASSIGN -%token MOD_ASSIGN LEFT_ASSIGN RIGHT_ASSIGN AND_ASSIGN XOR_ASSIGN OR_ASSIGN -%token SUB_ASSIGN -%token STRING_LITERAL - -%token LEFT_PAREN RIGHT_PAREN LEFT_BRACKET RIGHT_BRACKET LEFT_BRACE RIGHT_BRACE DOT -%token COMMA COLON EQUAL SEMICOLON BANG DASH TILDE PLUS STAR SLASH PERCENT -%token LEFT_ANGLE RIGHT_ANGLE VERTICAL_BAR CARET AMPERSAND QUESTION - -%token INVARIANT -%token HIGH_PRECISION MEDIUM_PRECISION LOW_PRECISION PRECISION -%token PACKED RESOURCE SUPERP - -%token FLOATCONSTANT INTCONSTANT UINTCONSTANT BOOLCONSTANT -%token IDENTIFIER TYPE_NAME -%token CENTROID IN OUT INOUT -%token STRUCT VOID WHILE -%token BREAK CONTINUE DO ELSE FOR IF DISCARD RETURN SWITCH CASE DEFAULT -%token TERMINATE_INVOCATION -%token TERMINATE_RAY IGNORE_INTERSECTION -%token UNIFORM SHARED BUFFER -%token FLAT SMOOTH LAYOUT - -GLSLANG_WEB_EXCLUDE_ON -%token DOUBLECONSTANT INT16CONSTANT UINT16CONSTANT FLOAT16CONSTANT INT32CONSTANT UINT32CONSTANT -%token INT64CONSTANT UINT64CONSTANT -%token SUBROUTINE DEMOTE -%token PAYLOADNV PAYLOADINNV HITATTRNV CALLDATANV CALLDATAINNV -%token PAYLOADEXT PAYLOADINEXT HITATTREXT CALLDATAEXT CALLDATAINEXT -%token PATCH SAMPLE NONUNIFORM -%token COHERENT VOLATILE RESTRICT READONLY WRITEONLY DEVICECOHERENT QUEUEFAMILYCOHERENT WORKGROUPCOHERENT -%token SUBGROUPCOHERENT NONPRIVATE SHADERCALLCOHERENT -%token NOPERSPECTIVE EXPLICITINTERPAMD PERVERTEXEXT PERVERTEXNV PERPRIMITIVENV PERVIEWNV PERTASKNV PERPRIMITIVEEXT TASKPAYLOADWORKGROUPEXT -%token PRECISE -GLSLANG_WEB_EXCLUDE_OFF - -%type assignment_operator unary_operator -%type variable_identifier primary_expression postfix_expression -%type expression integer_expression assignment_expression -%type unary_expression multiplicative_expression additive_expression -%type relational_expression equality_expression -%type conditional_expression constant_expression -%type logical_or_expression logical_xor_expression logical_and_expression -%type shift_expression and_expression exclusive_or_expression inclusive_or_expression -%type function_call initializer condition conditionopt - -%type translation_unit function_definition -%type statement simple_statement -%type statement_list switch_statement_list compound_statement -%type declaration_statement selection_statement selection_statement_nonattributed expression_statement -%type switch_statement switch_statement_nonattributed case_label -%type declaration external_declaration -%type for_init_statement compound_statement_no_new_scope -%type selection_rest_statement for_rest_statement -%type iteration_statement iteration_statement_nonattributed jump_statement statement_no_new_scope statement_scoped -%type single_declaration init_declarator_list - -%type parameter_declaration parameter_declarator parameter_type_specifier - -%type array_specifier -%type invariant_qualifier interpolation_qualifier storage_qualifier precision_qualifier -%type layout_qualifier layout_qualifier_id_list layout_qualifier_id - -%type type_parameter_specifier -%type type_parameter_specifier_opt -%type type_parameter_specifier_list - -%type type_qualifier fully_specified_type type_specifier -%type single_type_qualifier -%type type_specifier_nonarray -%type struct_specifier -%type struct_declarator -%type struct_declarator_list struct_declaration struct_declaration_list -%type block_structure -%type function_header function_declarator -%type function_header_with_parameters -%type function_call_header_with_parameters function_call_header_no_parameters function_call_generic function_prototype -%type function_call_or_method function_identifier function_call_header - -%type identifier_list - -GLSLANG_WEB_EXCLUDE_ON -%type precise_qualifier non_uniform_qualifier -%type type_name_list -%type attribute attribute_list single_attribute -%type demote_statement -%type initializer_list -%type spirv_requirements_list spirv_requirements_parameter -%type spirv_extension_list spirv_capability_list -%type spirv_execution_mode_qualifier -%type spirv_execution_mode_parameter_list spirv_execution_mode_parameter spirv_execution_mode_id_parameter_list -%type spirv_storage_class_qualifier -%type spirv_decorate_qualifier -%type spirv_decorate_parameter_list spirv_decorate_parameter -%type spirv_decorate_id_parameter_list -%type spirv_decorate_string_parameter_list -%type spirv_type_specifier -%type spirv_type_parameter_list spirv_type_parameter -%type spirv_instruction_qualifier -%type spirv_instruction_qualifier_list spirv_instruction_qualifier_id -GLSLANG_WEB_EXCLUDE_OFF - -%start translation_unit -%% - -variable_identifier - : IDENTIFIER { - $$ = parseContext.handleVariable($1.loc, $1.symbol, $1.string); - } - ; - -primary_expression - : variable_identifier { - $$ = $1; - } - | LEFT_PAREN expression RIGHT_PAREN { - $$ = $2; - if ($$->getAsConstantUnion()) - $$->getAsConstantUnion()->setExpression(); - } - | FLOATCONSTANT { - $$ = parseContext.intermediate.addConstantUnion($1.d, EbtFloat, $1.loc, true); - } - | INTCONSTANT { - $$ = parseContext.intermediate.addConstantUnion($1.i, $1.loc, true); - } - | UINTCONSTANT { - parseContext.fullIntegerCheck($1.loc, "unsigned literal"); - $$ = parseContext.intermediate.addConstantUnion($1.u, $1.loc, true); - } - | BOOLCONSTANT { - $$ = parseContext.intermediate.addConstantUnion($1.b, $1.loc, true); - } -GLSLANG_WEB_EXCLUDE_ON - | STRING_LITERAL { - $$ = parseContext.intermediate.addConstantUnion($1.string, $1.loc, true); - } - | INT32CONSTANT { - parseContext.explicitInt32Check($1.loc, "32-bit signed literal"); - $$ = parseContext.intermediate.addConstantUnion($1.i, $1.loc, true); - } - | UINT32CONSTANT { - parseContext.explicitInt32Check($1.loc, "32-bit signed literal"); - $$ = parseContext.intermediate.addConstantUnion($1.u, $1.loc, true); - } - | INT64CONSTANT { - parseContext.int64Check($1.loc, "64-bit integer literal"); - $$ = parseContext.intermediate.addConstantUnion($1.i64, $1.loc, true); - } - | UINT64CONSTANT { - parseContext.int64Check($1.loc, "64-bit unsigned integer literal"); - $$ = parseContext.intermediate.addConstantUnion($1.u64, $1.loc, true); - } - | INT16CONSTANT { - parseContext.explicitInt16Check($1.loc, "16-bit integer literal"); - $$ = parseContext.intermediate.addConstantUnion((short)$1.i, $1.loc, true); - } - | UINT16CONSTANT { - parseContext.explicitInt16Check($1.loc, "16-bit unsigned integer literal"); - $$ = parseContext.intermediate.addConstantUnion((unsigned short)$1.u, $1.loc, true); - } - | DOUBLECONSTANT { - parseContext.requireProfile($1.loc, ECoreProfile | ECompatibilityProfile, "double literal"); - if (! parseContext.symbolTable.atBuiltInLevel()) - parseContext.doubleCheck($1.loc, "double literal"); - $$ = parseContext.intermediate.addConstantUnion($1.d, EbtDouble, $1.loc, true); - } - | FLOAT16CONSTANT { - parseContext.float16Check($1.loc, "half float literal"); - $$ = parseContext.intermediate.addConstantUnion($1.d, EbtFloat16, $1.loc, true); - } -GLSLANG_WEB_EXCLUDE_OFF - ; - -postfix_expression - : primary_expression { - $$ = $1; - } - | postfix_expression LEFT_BRACKET integer_expression RIGHT_BRACKET { - $$ = parseContext.handleBracketDereference($2.loc, $1, $3); - } - | function_call { - $$ = $1; - } - | postfix_expression DOT IDENTIFIER { - $$ = parseContext.handleDotDereference($3.loc, $1, *$3.string); - } - | postfix_expression INC_OP { - parseContext.variableCheck($1); - parseContext.lValueErrorCheck($2.loc, "++", $1); - $$ = parseContext.handleUnaryMath($2.loc, "++", EOpPostIncrement, $1); - } - | postfix_expression DEC_OP { - parseContext.variableCheck($1); - parseContext.lValueErrorCheck($2.loc, "--", $1); - $$ = parseContext.handleUnaryMath($2.loc, "--", EOpPostDecrement, $1); - } - ; - -integer_expression - : expression { - parseContext.integerCheck($1, "[]"); - $$ = $1; - } - ; - -function_call - : function_call_or_method { - $$ = parseContext.handleFunctionCall($1.loc, $1.function, $1.intermNode); - delete $1.function; - } - ; - -function_call_or_method - : function_call_generic { - $$ = $1; - } - ; - -function_call_generic - : function_call_header_with_parameters RIGHT_PAREN { - $$ = $1; - $$.loc = $2.loc; - } - | function_call_header_no_parameters RIGHT_PAREN { - $$ = $1; - $$.loc = $2.loc; - } - ; - -function_call_header_no_parameters - : function_call_header VOID { - $$ = $1; - } - | function_call_header { - $$ = $1; - } - ; - -function_call_header_with_parameters - : function_call_header assignment_expression { - TParameter param = { 0, new TType }; - param.type->shallowCopy($2->getType()); - $1.function->addParameter(param); - $$.function = $1.function; - $$.intermNode = $2; - } - | function_call_header_with_parameters COMMA assignment_expression { - TParameter param = { 0, new TType }; - param.type->shallowCopy($3->getType()); - $1.function->addParameter(param); - $$.function = $1.function; - $$.intermNode = parseContext.intermediate.growAggregate($1.intermNode, $3, $2.loc); - } - ; - -function_call_header - : function_identifier LEFT_PAREN { - $$ = $1; - } - ; - -// Grammar Note: Constructors look like functions, but are recognized as types. - -function_identifier - : type_specifier { - // Constructor - $$.intermNode = 0; - $$.function = parseContext.handleConstructorCall($1.loc, $1); - } - | postfix_expression { - // - // Should be a method or subroutine call, but we haven't recognized the arguments yet. - // - $$.function = 0; - $$.intermNode = 0; - - TIntermMethod* method = $1->getAsMethodNode(); - if (method) { - $$.function = new TFunction(&method->getMethodName(), TType(EbtInt), EOpArrayLength); - $$.intermNode = method->getObject(); - } else { - TIntermSymbol* symbol = $1->getAsSymbolNode(); - if (symbol) { - parseContext.reservedErrorCheck(symbol->getLoc(), symbol->getName()); - TFunction *function = new TFunction(&symbol->getName(), TType(EbtVoid)); - $$.function = function; - } else - parseContext.error($1->getLoc(), "function call, method, or subroutine call expected", "", ""); - } - - if ($$.function == 0) { - // error recover - TString* empty = NewPoolTString(""); - $$.function = new TFunction(empty, TType(EbtVoid), EOpNull); - } - } -GLSLANG_WEB_EXCLUDE_ON - | non_uniform_qualifier { - // Constructor - $$.intermNode = 0; - $$.function = parseContext.handleConstructorCall($1.loc, $1); - } -GLSLANG_WEB_EXCLUDE_OFF - ; - -unary_expression - : postfix_expression { - parseContext.variableCheck($1); - $$ = $1; - if (TIntermMethod* method = $1->getAsMethodNode()) - parseContext.error($1->getLoc(), "incomplete method syntax", method->getMethodName().c_str(), ""); - } - | INC_OP unary_expression { - parseContext.lValueErrorCheck($1.loc, "++", $2); - $$ = parseContext.handleUnaryMath($1.loc, "++", EOpPreIncrement, $2); - } - | DEC_OP unary_expression { - parseContext.lValueErrorCheck($1.loc, "--", $2); - $$ = parseContext.handleUnaryMath($1.loc, "--", EOpPreDecrement, $2); - } - | unary_operator unary_expression { - if ($1.op != EOpNull) { - char errorOp[2] = {0, 0}; - switch($1.op) { - case EOpNegative: errorOp[0] = '-'; break; - case EOpLogicalNot: errorOp[0] = '!'; break; - case EOpBitwiseNot: errorOp[0] = '~'; break; - default: break; // some compilers want this - } - $$ = parseContext.handleUnaryMath($1.loc, errorOp, $1.op, $2); - } else { - $$ = $2; - if ($$->getAsConstantUnion()) - $$->getAsConstantUnion()->setExpression(); - } - } - ; -// Grammar Note: No traditional style type casts. - -unary_operator - : PLUS { $$.loc = $1.loc; $$.op = EOpNull; } - | DASH { $$.loc = $1.loc; $$.op = EOpNegative; } - | BANG { $$.loc = $1.loc; $$.op = EOpLogicalNot; } - | TILDE { $$.loc = $1.loc; $$.op = EOpBitwiseNot; - parseContext.fullIntegerCheck($1.loc, "bitwise not"); } - ; -// Grammar Note: No '*' or '&' unary ops. Pointers are not supported. - -multiplicative_expression - : unary_expression { $$ = $1; } - | multiplicative_expression STAR unary_expression { - $$ = parseContext.handleBinaryMath($2.loc, "*", EOpMul, $1, $3); - if ($$ == 0) - $$ = $1; - } - | multiplicative_expression SLASH unary_expression { - $$ = parseContext.handleBinaryMath($2.loc, "/", EOpDiv, $1, $3); - if ($$ == 0) - $$ = $1; - } - | multiplicative_expression PERCENT unary_expression { - parseContext.fullIntegerCheck($2.loc, "%"); - $$ = parseContext.handleBinaryMath($2.loc, "%", EOpMod, $1, $3); - if ($$ == 0) - $$ = $1; - } - ; - -additive_expression - : multiplicative_expression { $$ = $1; } - | additive_expression PLUS multiplicative_expression { - $$ = parseContext.handleBinaryMath($2.loc, "+", EOpAdd, $1, $3); - if ($$ == 0) - $$ = $1; - } - | additive_expression DASH multiplicative_expression { - $$ = parseContext.handleBinaryMath($2.loc, "-", EOpSub, $1, $3); - if ($$ == 0) - $$ = $1; - } - ; - -shift_expression - : additive_expression { $$ = $1; } - | shift_expression LEFT_OP additive_expression { - parseContext.fullIntegerCheck($2.loc, "bit shift left"); - $$ = parseContext.handleBinaryMath($2.loc, "<<", EOpLeftShift, $1, $3); - if ($$ == 0) - $$ = $1; - } - | shift_expression RIGHT_OP additive_expression { - parseContext.fullIntegerCheck($2.loc, "bit shift right"); - $$ = parseContext.handleBinaryMath($2.loc, ">>", EOpRightShift, $1, $3); - if ($$ == 0) - $$ = $1; - } - ; - -relational_expression - : shift_expression { $$ = $1; } - | relational_expression LEFT_ANGLE shift_expression { - $$ = parseContext.handleBinaryMath($2.loc, "<", EOpLessThan, $1, $3); - if ($$ == 0) - $$ = parseContext.intermediate.addConstantUnion(false, $2.loc); - } - | relational_expression RIGHT_ANGLE shift_expression { - $$ = parseContext.handleBinaryMath($2.loc, ">", EOpGreaterThan, $1, $3); - if ($$ == 0) - $$ = parseContext.intermediate.addConstantUnion(false, $2.loc); - } - | relational_expression LE_OP shift_expression { - $$ = parseContext.handleBinaryMath($2.loc, "<=", EOpLessThanEqual, $1, $3); - if ($$ == 0) - $$ = parseContext.intermediate.addConstantUnion(false, $2.loc); - } - | relational_expression GE_OP shift_expression { - $$ = parseContext.handleBinaryMath($2.loc, ">=", EOpGreaterThanEqual, $1, $3); - if ($$ == 0) - $$ = parseContext.intermediate.addConstantUnion(false, $2.loc); - } - ; - -equality_expression - : relational_expression { $$ = $1; } - | equality_expression EQ_OP relational_expression { - parseContext.arrayObjectCheck($2.loc, $1->getType(), "array comparison"); - parseContext.opaqueCheck($2.loc, $1->getType(), "=="); - parseContext.specializationCheck($2.loc, $1->getType(), "=="); - parseContext.referenceCheck($2.loc, $1->getType(), "=="); - $$ = parseContext.handleBinaryMath($2.loc, "==", EOpEqual, $1, $3); - if ($$ == 0) - $$ = parseContext.intermediate.addConstantUnion(false, $2.loc); - } - | equality_expression NE_OP relational_expression { - parseContext.arrayObjectCheck($2.loc, $1->getType(), "array comparison"); - parseContext.opaqueCheck($2.loc, $1->getType(), "!="); - parseContext.specializationCheck($2.loc, $1->getType(), "!="); - parseContext.referenceCheck($2.loc, $1->getType(), "!="); - $$ = parseContext.handleBinaryMath($2.loc, "!=", EOpNotEqual, $1, $3); - if ($$ == 0) - $$ = parseContext.intermediate.addConstantUnion(false, $2.loc); - } - ; - -and_expression - : equality_expression { $$ = $1; } - | and_expression AMPERSAND equality_expression { - parseContext.fullIntegerCheck($2.loc, "bitwise and"); - $$ = parseContext.handleBinaryMath($2.loc, "&", EOpAnd, $1, $3); - if ($$ == 0) - $$ = $1; - } - ; - -exclusive_or_expression - : and_expression { $$ = $1; } - | exclusive_or_expression CARET and_expression { - parseContext.fullIntegerCheck($2.loc, "bitwise exclusive or"); - $$ = parseContext.handleBinaryMath($2.loc, "^", EOpExclusiveOr, $1, $3); - if ($$ == 0) - $$ = $1; - } - ; - -inclusive_or_expression - : exclusive_or_expression { $$ = $1; } - | inclusive_or_expression VERTICAL_BAR exclusive_or_expression { - parseContext.fullIntegerCheck($2.loc, "bitwise inclusive or"); - $$ = parseContext.handleBinaryMath($2.loc, "|", EOpInclusiveOr, $1, $3); - if ($$ == 0) - $$ = $1; - } - ; - -logical_and_expression - : inclusive_or_expression { $$ = $1; } - | logical_and_expression AND_OP inclusive_or_expression { - $$ = parseContext.handleBinaryMath($2.loc, "&&", EOpLogicalAnd, $1, $3); - if ($$ == 0) - $$ = parseContext.intermediate.addConstantUnion(false, $2.loc); - } - ; - -logical_xor_expression - : logical_and_expression { $$ = $1; } - | logical_xor_expression XOR_OP logical_and_expression { - $$ = parseContext.handleBinaryMath($2.loc, "^^", EOpLogicalXor, $1, $3); - if ($$ == 0) - $$ = parseContext.intermediate.addConstantUnion(false, $2.loc); - } - ; - -logical_or_expression - : logical_xor_expression { $$ = $1; } - | logical_or_expression OR_OP logical_xor_expression { - $$ = parseContext.handleBinaryMath($2.loc, "||", EOpLogicalOr, $1, $3); - if ($$ == 0) - $$ = parseContext.intermediate.addConstantUnion(false, $2.loc); - } - ; - -conditional_expression - : logical_or_expression { $$ = $1; } - | logical_or_expression QUESTION { - ++parseContext.controlFlowNestingLevel; - } - expression COLON assignment_expression { - --parseContext.controlFlowNestingLevel; - parseContext.boolCheck($2.loc, $1); - parseContext.rValueErrorCheck($2.loc, "?", $1); - parseContext.rValueErrorCheck($5.loc, ":", $4); - parseContext.rValueErrorCheck($5.loc, ":", $6); - $$ = parseContext.intermediate.addSelection($1, $4, $6, $2.loc); - if ($$ == 0) { - parseContext.binaryOpError($2.loc, ":", $4->getCompleteString(parseContext.intermediate.getEnhancedMsgs()), $6->getCompleteString(parseContext.intermediate.getEnhancedMsgs())); - $$ = $6; - } - } - ; - -assignment_expression - : conditional_expression { $$ = $1; } - | unary_expression assignment_operator assignment_expression { - parseContext.arrayObjectCheck($2.loc, $1->getType(), "array assignment"); - parseContext.opaqueCheck($2.loc, $1->getType(), "="); - parseContext.storage16BitAssignmentCheck($2.loc, $1->getType(), "="); - parseContext.specializationCheck($2.loc, $1->getType(), "="); - parseContext.lValueErrorCheck($2.loc, "assign", $1); - parseContext.rValueErrorCheck($2.loc, "assign", $3); - $$ = parseContext.addAssign($2.loc, $2.op, $1, $3); - if ($$ == 0) { - parseContext.assignError($2.loc, "assign", $1->getCompleteString(parseContext.intermediate.getEnhancedMsgs()), $3->getCompleteString(parseContext.intermediate.getEnhancedMsgs())); - $$ = $1; - } - } - ; - -assignment_operator - : EQUAL { - $$.loc = $1.loc; - $$.op = EOpAssign; - } - | MUL_ASSIGN { - $$.loc = $1.loc; - $$.op = EOpMulAssign; - } - | DIV_ASSIGN { - $$.loc = $1.loc; - $$.op = EOpDivAssign; - } - | MOD_ASSIGN { - parseContext.fullIntegerCheck($1.loc, "%="); - $$.loc = $1.loc; - $$.op = EOpModAssign; - } - | ADD_ASSIGN { - $$.loc = $1.loc; - $$.op = EOpAddAssign; - } - | SUB_ASSIGN { - $$.loc = $1.loc; - $$.op = EOpSubAssign; - } - | LEFT_ASSIGN { - parseContext.fullIntegerCheck($1.loc, "bit-shift left assign"); - $$.loc = $1.loc; $$.op = EOpLeftShiftAssign; - } - | RIGHT_ASSIGN { - parseContext.fullIntegerCheck($1.loc, "bit-shift right assign"); - $$.loc = $1.loc; $$.op = EOpRightShiftAssign; - } - | AND_ASSIGN { - parseContext.fullIntegerCheck($1.loc, "bitwise-and assign"); - $$.loc = $1.loc; $$.op = EOpAndAssign; - } - | XOR_ASSIGN { - parseContext.fullIntegerCheck($1.loc, "bitwise-xor assign"); - $$.loc = $1.loc; $$.op = EOpExclusiveOrAssign; - } - | OR_ASSIGN { - parseContext.fullIntegerCheck($1.loc, "bitwise-or assign"); - $$.loc = $1.loc; $$.op = EOpInclusiveOrAssign; - } - ; - -expression - : assignment_expression { - $$ = $1; - } - | expression COMMA assignment_expression { - parseContext.samplerConstructorLocationCheck($2.loc, ",", $3); - $$ = parseContext.intermediate.addComma($1, $3, $2.loc); - if ($$ == 0) { - parseContext.binaryOpError($2.loc, ",", $1->getCompleteString(parseContext.intermediate.getEnhancedMsgs()), $3->getCompleteString(parseContext.intermediate.getEnhancedMsgs())); - $$ = $3; - } - } - ; - -constant_expression - : conditional_expression { - parseContext.constantValueCheck($1, ""); - $$ = $1; - } - ; - -declaration - : function_prototype SEMICOLON { - parseContext.handleFunctionDeclarator($1.loc, *$1.function, true /* prototype */); - $$ = 0; - // TODO: 4.0 functionality: subroutines: make the identifier a user type for this signature - } -GLSLANG_WEB_EXCLUDE_ON - | spirv_instruction_qualifier function_prototype SEMICOLON { - parseContext.requireExtensions($2.loc, 1, &E_GL_EXT_spirv_intrinsics, "SPIR-V instruction qualifier"); - $2.function->setSpirvInstruction(*$1); // Attach SPIR-V intruction qualifier - parseContext.handleFunctionDeclarator($2.loc, *$2.function, true /* prototype */); - $$ = 0; - // TODO: 4.0 functionality: subroutines: make the identifier a user type for this signature - } - | spirv_execution_mode_qualifier SEMICOLON { - parseContext.globalCheck($2.loc, "SPIR-V execution mode qualifier"); - parseContext.requireExtensions($2.loc, 1, &E_GL_EXT_spirv_intrinsics, "SPIR-V execution mode qualifier"); - $$ = 0; - } -GLSLANG_WEB_EXCLUDE_OFF - | init_declarator_list SEMICOLON { - if ($1.intermNode && $1.intermNode->getAsAggregate()) - $1.intermNode->getAsAggregate()->setOperator(EOpSequence); - $$ = $1.intermNode; - } - | PRECISION precision_qualifier type_specifier SEMICOLON { - parseContext.profileRequires($1.loc, ENoProfile, 130, 0, "precision statement"); - // lazy setting of the previous scope's defaults, has effect only the first time it is called in a particular scope - parseContext.symbolTable.setPreviousDefaultPrecisions(&parseContext.defaultPrecision[0]); - parseContext.setDefaultPrecision($1.loc, $3, $2.qualifier.precision); - $$ = 0; - } - | block_structure SEMICOLON { - parseContext.declareBlock($1.loc, *$1.typeList); - $$ = 0; - } - | block_structure IDENTIFIER SEMICOLON { - parseContext.declareBlock($1.loc, *$1.typeList, $2.string); - $$ = 0; - } - | block_structure IDENTIFIER array_specifier SEMICOLON { - parseContext.declareBlock($1.loc, *$1.typeList, $2.string, $3.arraySizes); - $$ = 0; - } - | type_qualifier SEMICOLON { - parseContext.globalQualifierFixCheck($1.loc, $1.qualifier); - parseContext.updateStandaloneQualifierDefaults($1.loc, $1); - $$ = 0; - } - | type_qualifier IDENTIFIER SEMICOLON { - parseContext.checkNoShaderLayouts($1.loc, $1.shaderQualifiers); - parseContext.addQualifierToExisting($1.loc, $1.qualifier, *$2.string); - $$ = 0; - } - | type_qualifier IDENTIFIER identifier_list SEMICOLON { - parseContext.checkNoShaderLayouts($1.loc, $1.shaderQualifiers); - $3->push_back($2.string); - parseContext.addQualifierToExisting($1.loc, $1.qualifier, *$3); - $$ = 0; - } - ; - -block_structure - : type_qualifier IDENTIFIER LEFT_BRACE { parseContext.nestedBlockCheck($1.loc); } struct_declaration_list RIGHT_BRACE { - --parseContext.blockNestingLevel; - parseContext.blockName = $2.string; - parseContext.globalQualifierFixCheck($1.loc, $1.qualifier); - parseContext.checkNoShaderLayouts($1.loc, $1.shaderQualifiers); - parseContext.currentBlockQualifier = $1.qualifier; - $$.loc = $1.loc; - $$.typeList = $5; - } - -identifier_list - : COMMA IDENTIFIER { - $$ = new TIdentifierList; - $$->push_back($2.string); - } - | identifier_list COMMA IDENTIFIER { - $$ = $1; - $$->push_back($3.string); - } - ; - -function_prototype - : function_declarator RIGHT_PAREN { - $$.function = $1; - $$.loc = $2.loc; - } - | function_declarator RIGHT_PAREN attribute { - $$.function = $1; - $$.loc = $2.loc; - parseContext.requireExtensions($2.loc, 1, &E_GL_EXT_subgroup_uniform_control_flow, "attribute"); - parseContext.handleFunctionAttributes($2.loc, *$3); - } - | 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); - } - | 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); - } - ; - -function_declarator - : function_header { - $$ = $1; - } - | function_header_with_parameters { - $$ = $1; - } - ; - - -function_header_with_parameters - : function_header parameter_declaration { - // Add the parameter - $$ = $1; - if ($2.param.type->getBasicType() != EbtVoid) - $1->addParameter($2.param); - else - delete $2.param.type; - } - | function_header_with_parameters COMMA parameter_declaration { - // - // Only first parameter of one-parameter functions can be void - // The check for named parameters not being void is done in parameter_declarator - // - if ($3.param.type->getBasicType() == EbtVoid) { - // - // This parameter > first is void - // - parseContext.error($2.loc, "cannot be an argument type except for '(void)'", "void", ""); - delete $3.param.type; - } else { - // Add the parameter - $$ = $1; - $1->addParameter($3.param); - } - } - ; - -function_header - : fully_specified_type IDENTIFIER LEFT_PAREN { - if ($1.qualifier.storage != EvqGlobal && $1.qualifier.storage != EvqTemporary) { - parseContext.error($2.loc, "no qualifiers allowed for function return", - GetStorageQualifierString($1.qualifier.storage), ""); - } - if ($1.arraySizes) - parseContext.arraySizeRequiredCheck($1.loc, *$1.arraySizes); - - // Add the function as a prototype after parsing it (we do not support recursion) - TFunction *function; - TType type($1); - - // Potentially rename shader entry point function. No-op most of the time. - parseContext.renameShaderFunction($2.string); - - // Make the function - function = new TFunction($2.string, type); - $$ = function; - } - ; - -parameter_declarator - // Type + name - : type_specifier IDENTIFIER { - if ($1.arraySizes) { - parseContext.profileRequires($1.loc, ENoProfile, 120, E_GL_3DL_array_objects, "arrayed type"); - parseContext.profileRequires($1.loc, EEsProfile, 300, 0, "arrayed type"); - parseContext.arraySizeRequiredCheck($1.loc, *$1.arraySizes); - } - if ($1.basicType == EbtVoid) { - parseContext.error($2.loc, "illegal use of type 'void'", $2.string->c_str(), ""); - } - parseContext.reservedErrorCheck($2.loc, *$2.string); - - TParameter param = {$2.string, new TType($1)}; - $$.loc = $2.loc; - $$.param = param; - } - | type_specifier IDENTIFIER array_specifier { - if ($1.arraySizes) { - parseContext.profileRequires($1.loc, ENoProfile, 120, E_GL_3DL_array_objects, "arrayed type"); - parseContext.profileRequires($1.loc, EEsProfile, 300, 0, "arrayed type"); - parseContext.arraySizeRequiredCheck($1.loc, *$1.arraySizes); - } - TType* type = new TType($1); - type->transferArraySizes($3.arraySizes); - type->copyArrayInnerSizes($1.arraySizes); - - parseContext.arrayOfArrayVersionCheck($2.loc, type->getArraySizes()); - parseContext.arraySizeRequiredCheck($3.loc, *$3.arraySizes); - parseContext.reservedErrorCheck($2.loc, *$2.string); - - TParameter param = { $2.string, type }; - - $$.loc = $2.loc; - $$.param = param; - } - ; - -parameter_declaration - // - // With name - // - : type_qualifier parameter_declarator { - $$ = $2; - if ($1.qualifier.precision != EpqNone) - $$.param.type->getQualifier().precision = $1.qualifier.precision; - parseContext.precisionQualifierCheck($$.loc, $$.param.type->getBasicType(), $$.param.type->getQualifier()); - - parseContext.checkNoShaderLayouts($1.loc, $1.shaderQualifiers); - parseContext.parameterTypeCheck($2.loc, $1.qualifier.storage, *$$.param.type); - parseContext.paramCheckFix($1.loc, $1.qualifier, *$$.param.type); - - } - | parameter_declarator { - $$ = $1; - - parseContext.parameterTypeCheck($1.loc, EvqIn, *$1.param.type); - parseContext.paramCheckFixStorage($1.loc, EvqTemporary, *$$.param.type); - parseContext.precisionQualifierCheck($$.loc, $$.param.type->getBasicType(), $$.param.type->getQualifier()); - } - // - // Without name - // - | type_qualifier parameter_type_specifier { - $$ = $2; - if ($1.qualifier.precision != EpqNone) - $$.param.type->getQualifier().precision = $1.qualifier.precision; - parseContext.precisionQualifierCheck($1.loc, $$.param.type->getBasicType(), $$.param.type->getQualifier()); - - parseContext.checkNoShaderLayouts($1.loc, $1.shaderQualifiers); - parseContext.parameterTypeCheck($2.loc, $1.qualifier.storage, *$$.param.type); - parseContext.paramCheckFix($1.loc, $1.qualifier, *$$.param.type); - } - | parameter_type_specifier { - $$ = $1; - - parseContext.parameterTypeCheck($1.loc, EvqIn, *$1.param.type); - parseContext.paramCheckFixStorage($1.loc, EvqTemporary, *$$.param.type); - parseContext.precisionQualifierCheck($$.loc, $$.param.type->getBasicType(), $$.param.type->getQualifier()); - } - ; - -parameter_type_specifier - : type_specifier { - TParameter param = { 0, new TType($1) }; - $$.param = param; - if ($1.arraySizes) - parseContext.arraySizeRequiredCheck($1.loc, *$1.arraySizes); - } - ; - -init_declarator_list - : single_declaration { - $$ = $1; - } - | init_declarator_list COMMA IDENTIFIER { - $$ = $1; - parseContext.declareVariable($3.loc, *$3.string, $1.type); - } - | init_declarator_list COMMA IDENTIFIER array_specifier { - $$ = $1; - parseContext.declareVariable($3.loc, *$3.string, $1.type, $4.arraySizes); - } - | init_declarator_list COMMA IDENTIFIER array_specifier EQUAL initializer { - $$.type = $1.type; - TIntermNode* initNode = parseContext.declareVariable($3.loc, *$3.string, $1.type, $4.arraySizes, $6); - $$.intermNode = parseContext.intermediate.growAggregate($1.intermNode, initNode, $5.loc); - } - | init_declarator_list COMMA IDENTIFIER EQUAL initializer { - $$.type = $1.type; - TIntermNode* initNode = parseContext.declareVariable($3.loc, *$3.string, $1.type, 0, $5); - $$.intermNode = parseContext.intermediate.growAggregate($1.intermNode, initNode, $4.loc); - } - ; - -single_declaration - : fully_specified_type { - $$.type = $1; - $$.intermNode = 0; -GLSLANG_WEB_EXCLUDE_ON - parseContext.declareTypeDefaults($$.loc, $$.type); -GLSLANG_WEB_EXCLUDE_OFF - } - | fully_specified_type IDENTIFIER { - $$.type = $1; - $$.intermNode = 0; - parseContext.declareVariable($2.loc, *$2.string, $1); - } - | fully_specified_type IDENTIFIER array_specifier { - $$.type = $1; - $$.intermNode = 0; - parseContext.declareVariable($2.loc, *$2.string, $1, $3.arraySizes); - } - | fully_specified_type IDENTIFIER array_specifier EQUAL initializer { - $$.type = $1; - TIntermNode* initNode = parseContext.declareVariable($2.loc, *$2.string, $1, $3.arraySizes, $5); - $$.intermNode = parseContext.intermediate.growAggregate(0, initNode, $4.loc); - } - | fully_specified_type IDENTIFIER EQUAL initializer { - $$.type = $1; - TIntermNode* initNode = parseContext.declareVariable($2.loc, *$2.string, $1, 0, $4); - $$.intermNode = parseContext.intermediate.growAggregate(0, initNode, $3.loc); - } - -// Grammar Note: No 'enum', or 'typedef'. - -fully_specified_type - : type_specifier { - $$ = $1; - - parseContext.globalQualifierTypeCheck($1.loc, $1.qualifier, $$); - if ($1.arraySizes) { - parseContext.profileRequires($1.loc, ENoProfile, 120, E_GL_3DL_array_objects, "arrayed type"); - parseContext.profileRequires($1.loc, EEsProfile, 300, 0, "arrayed type"); - } - parseContext.precisionQualifierCheck($$.loc, $$.basicType, $$.qualifier); - } - | type_qualifier type_specifier { - parseContext.globalQualifierFixCheck($1.loc, $1.qualifier); - parseContext.globalQualifierTypeCheck($1.loc, $1.qualifier, $2); - - if ($2.arraySizes) { - parseContext.profileRequires($2.loc, ENoProfile, 120, E_GL_3DL_array_objects, "arrayed type"); - parseContext.profileRequires($2.loc, EEsProfile, 300, 0, "arrayed type"); - } - - if ($2.arraySizes && parseContext.arrayQualifierError($2.loc, $1.qualifier)) - $2.arraySizes = nullptr; - - parseContext.checkNoShaderLayouts($2.loc, $1.shaderQualifiers); - $2.shaderQualifiers.merge($1.shaderQualifiers); - parseContext.mergeQualifiers($2.loc, $2.qualifier, $1.qualifier, true); - parseContext.precisionQualifierCheck($2.loc, $2.basicType, $2.qualifier); - - $$ = $2; - - if (! $$.qualifier.isInterpolation() && - ((parseContext.language == EShLangVertex && $$.qualifier.storage == EvqVaryingOut) || - (parseContext.language == EShLangFragment && $$.qualifier.storage == EvqVaryingIn))) - $$.qualifier.smooth = true; - } - ; - -invariant_qualifier - : INVARIANT { - parseContext.globalCheck($1.loc, "invariant"); - parseContext.profileRequires($$.loc, ENoProfile, 120, 0, "invariant"); - $$.init($1.loc); - $$.qualifier.invariant = true; - } - ; - -interpolation_qualifier - : SMOOTH { - parseContext.globalCheck($1.loc, "smooth"); - parseContext.profileRequires($1.loc, ENoProfile, 130, 0, "smooth"); - parseContext.profileRequires($1.loc, EEsProfile, 300, 0, "smooth"); - $$.init($1.loc); - $$.qualifier.smooth = true; - } - | FLAT { - parseContext.globalCheck($1.loc, "flat"); - parseContext.profileRequires($1.loc, ENoProfile, 130, 0, "flat"); - parseContext.profileRequires($1.loc, EEsProfile, 300, 0, "flat"); - $$.init($1.loc); - $$.qualifier.flat = true; - } -GLSLANG_WEB_EXCLUDE_ON - | NOPERSPECTIVE { - parseContext.globalCheck($1.loc, "noperspective"); - parseContext.profileRequires($1.loc, EEsProfile, 0, E_GL_NV_shader_noperspective_interpolation, "noperspective"); - parseContext.profileRequires($1.loc, ENoProfile, 130, 0, "noperspective"); - $$.init($1.loc); - $$.qualifier.nopersp = true; - } - | EXPLICITINTERPAMD { - parseContext.globalCheck($1.loc, "__explicitInterpAMD"); - parseContext.profileRequires($1.loc, ECoreProfile, 450, E_GL_AMD_shader_explicit_vertex_parameter, "explicit interpolation"); - parseContext.profileRequires($1.loc, ECompatibilityProfile, 450, E_GL_AMD_shader_explicit_vertex_parameter, "explicit interpolation"); - $$.init($1.loc); - $$.qualifier.explicitInterp = true; - } - | PERVERTEXNV { - parseContext.globalCheck($1.loc, "pervertexNV"); - parseContext.profileRequires($1.loc, ECoreProfile, 0, E_GL_NV_fragment_shader_barycentric, "fragment shader barycentric"); - parseContext.profileRequires($1.loc, ECompatibilityProfile, 0, E_GL_NV_fragment_shader_barycentric, "fragment shader barycentric"); - parseContext.profileRequires($1.loc, EEsProfile, 0, E_GL_NV_fragment_shader_barycentric, "fragment shader barycentric"); - $$.init($1.loc); - $$.qualifier.pervertexNV = true; - } - | 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"); - parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangFragmentMask | EShLangMeshMask), "perprimitiveNV"); - // Fragment shader stage doesn't check for extension. So we explicitly add below extension check. - if (parseContext.language == EShLangFragment) - parseContext.requireExtensions($1.loc, 1, &E_GL_NV_mesh_shader, "perprimitiveNV"); - $$.init($1.loc); - $$.qualifier.perPrimitiveNV = true; - } - | PERPRIMITIVEEXT { - // No need for profile version or extension check. Shader stage already checks both. - parseContext.globalCheck($1.loc, "perprimitiveEXT"); - parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangFragmentMask | EShLangMeshMask), "perprimitiveEXT"); - // Fragment shader stage doesn't check for extension. So we explicitly add below extension check. - if (parseContext.language == EShLangFragment) - parseContext.requireExtensions($1.loc, 1, &E_GL_EXT_mesh_shader, "perprimitiveEXT"); - $$.init($1.loc); - $$.qualifier.perPrimitiveNV = true; - } - | PERVIEWNV { - // No need for profile version or extension check. Shader stage already checks both. - parseContext.globalCheck($1.loc, "perviewNV"); - parseContext.requireStage($1.loc, EShLangMesh, "perviewNV"); - $$.init($1.loc); - $$.qualifier.perViewNV = true; - } - | PERTASKNV { - // No need for profile version or extension check. Shader stage already checks both. - parseContext.globalCheck($1.loc, "taskNV"); - parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangTaskMask | EShLangMeshMask), "taskNV"); - $$.init($1.loc); - $$.qualifier.perTaskNV = true; - } -GLSLANG_WEB_EXCLUDE_OFF - ; - -layout_qualifier - : LAYOUT LEFT_PAREN layout_qualifier_id_list RIGHT_PAREN { - $$ = $3; - } - ; - -layout_qualifier_id_list - : layout_qualifier_id { - $$ = $1; - } - | layout_qualifier_id_list COMMA layout_qualifier_id { - $$ = $1; - $$.shaderQualifiers.merge($3.shaderQualifiers); - parseContext.mergeObjectLayoutQualifiers($$.qualifier, $3.qualifier, false); - } - -layout_qualifier_id - : IDENTIFIER { - $$.init($1.loc); - parseContext.setLayoutQualifier($1.loc, $$, *$1.string); - } - | IDENTIFIER EQUAL constant_expression { - $$.init($1.loc); - parseContext.setLayoutQualifier($1.loc, $$, *$1.string, $3); - } - | SHARED { // because "shared" is both an identifier and a keyword - $$.init($1.loc); - TString strShared("shared"); - parseContext.setLayoutQualifier($1.loc, $$, strShared); - } - ; - -GLSLANG_WEB_EXCLUDE_ON -precise_qualifier - : PRECISE { - parseContext.profileRequires($$.loc, ECoreProfile | ECompatibilityProfile, 400, E_GL_ARB_gpu_shader5, "precise"); - parseContext.profileRequires($1.loc, EEsProfile, 320, Num_AEP_gpu_shader5, AEP_gpu_shader5, "precise"); - $$.init($1.loc); - $$.qualifier.noContraction = true; - } - ; -GLSLANG_WEB_EXCLUDE_OFF - -type_qualifier - : single_type_qualifier { - $$ = $1; - } - | type_qualifier single_type_qualifier { - $$ = $1; - if ($$.basicType == EbtVoid) - $$.basicType = $2.basicType; - - $$.shaderQualifiers.merge($2.shaderQualifiers); - parseContext.mergeQualifiers($$.loc, $$.qualifier, $2.qualifier, false); - } - ; - -single_type_qualifier - : storage_qualifier { - $$ = $1; - } - | layout_qualifier { - $$ = $1; - } - | precision_qualifier { - parseContext.checkPrecisionQualifier($1.loc, $1.qualifier.precision); - $$ = $1; - } - | interpolation_qualifier { - // allow inheritance of storage qualifier from block declaration - $$ = $1; - } - | invariant_qualifier { - // allow inheritance of storage qualifier from block declaration - $$ = $1; - } -GLSLANG_WEB_EXCLUDE_ON - | precise_qualifier { - // allow inheritance of storage qualifier from block declaration - $$ = $1; - } - | non_uniform_qualifier { - $$ = $1; - } - | spirv_storage_class_qualifier { - parseContext.globalCheck($1.loc, "spirv_storage_class"); - parseContext.requireExtensions($1.loc, 1, &E_GL_EXT_spirv_intrinsics, "SPIR-V storage class qualifier"); - $$ = $1; - } - | spirv_decorate_qualifier { - parseContext.requireExtensions($1.loc, 1, &E_GL_EXT_spirv_intrinsics, "SPIR-V decorate qualifier"); - $$ = $1; - } - | SPIRV_BY_REFERENCE { - parseContext.requireExtensions($1.loc, 1, &E_GL_EXT_spirv_intrinsics, "spirv_by_reference"); - $$.init($1.loc); - $$.qualifier.setSpirvByReference(); - } - | SPIRV_LITERAL { - parseContext.requireExtensions($1.loc, 1, &E_GL_EXT_spirv_intrinsics, "spirv_by_literal"); - $$.init($1.loc); - $$.qualifier.setSpirvLiteral(); - } -GLSLANG_WEB_EXCLUDE_OFF - ; - -storage_qualifier - : CONST { - $$.init($1.loc); - $$.qualifier.storage = EvqConst; // will later turn into EvqConstReadOnly, if the initializer is not constant - } - | INOUT { - parseContext.globalCheck($1.loc, "inout"); - $$.init($1.loc); - $$.qualifier.storage = EvqInOut; - } - | IN { - parseContext.globalCheck($1.loc, "in"); - $$.init($1.loc); - // whether this is a parameter "in" or a pipeline "in" will get sorted out a bit later - $$.qualifier.storage = EvqIn; - } - | OUT { - parseContext.globalCheck($1.loc, "out"); - $$.init($1.loc); - // whether this is a parameter "out" or a pipeline "out" will get sorted out a bit later - $$.qualifier.storage = EvqOut; - } - | CENTROID { - parseContext.profileRequires($1.loc, ENoProfile, 120, 0, "centroid"); - parseContext.profileRequires($1.loc, EEsProfile, 300, 0, "centroid"); - parseContext.globalCheck($1.loc, "centroid"); - $$.init($1.loc); - $$.qualifier.centroid = true; - } - | UNIFORM { - parseContext.globalCheck($1.loc, "uniform"); - $$.init($1.loc); - $$.qualifier.storage = EvqUniform; - } - | SHARED { - parseContext.globalCheck($1.loc, "shared"); - parseContext.profileRequires($1.loc, ECoreProfile | ECompatibilityProfile, 430, E_GL_ARB_compute_shader, "shared"); - parseContext.profileRequires($1.loc, EEsProfile, 310, 0, "shared"); - parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangComputeMask | EShLangMeshMask | EShLangTaskMask), "shared"); - $$.init($1.loc); - $$.qualifier.storage = EvqShared; - } - | BUFFER { - parseContext.globalCheck($1.loc, "buffer"); - $$.init($1.loc); - $$.qualifier.storage = EvqBuffer; - } -GLSLANG_WEB_EXCLUDE_ON - | ATTRIBUTE { - parseContext.requireStage($1.loc, EShLangVertex, "attribute"); - parseContext.checkDeprecated($1.loc, ECoreProfile, 130, "attribute"); - parseContext.checkDeprecated($1.loc, ENoProfile, 130, "attribute"); - parseContext.requireNotRemoved($1.loc, ECoreProfile, 420, "attribute"); - parseContext.requireNotRemoved($1.loc, EEsProfile, 300, "attribute"); - - parseContext.globalCheck($1.loc, "attribute"); - - $$.init($1.loc); - $$.qualifier.storage = EvqVaryingIn; - } - | VARYING { - parseContext.checkDeprecated($1.loc, ENoProfile, 130, "varying"); - parseContext.checkDeprecated($1.loc, ECoreProfile, 130, "varying"); - parseContext.requireNotRemoved($1.loc, ECoreProfile, 420, "varying"); - parseContext.requireNotRemoved($1.loc, EEsProfile, 300, "varying"); - - parseContext.globalCheck($1.loc, "varying"); - - $$.init($1.loc); - if (parseContext.language == EShLangVertex) - $$.qualifier.storage = EvqVaryingOut; - else - $$.qualifier.storage = EvqVaryingIn; - } - | PATCH { - parseContext.globalCheck($1.loc, "patch"); - parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangTessControlMask | EShLangTessEvaluationMask), "patch"); - $$.init($1.loc); - $$.qualifier.patch = true; - } - | SAMPLE { - parseContext.globalCheck($1.loc, "sample"); - $$.init($1.loc); - $$.qualifier.sample = true; - } - | HITATTRNV { - parseContext.globalCheck($1.loc, "hitAttributeNV"); - parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangIntersectMask | EShLangClosestHitMask - | EShLangAnyHitMask), "hitAttributeNV"); - parseContext.profileRequires($1.loc, ECoreProfile, 460, E_GL_NV_ray_tracing, "hitAttributeNV"); - $$.init($1.loc); - $$.qualifier.storage = EvqHitAttr; - } - | HITATTREXT { - parseContext.globalCheck($1.loc, "hitAttributeEXT"); - parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangIntersectMask | EShLangClosestHitMask - | EShLangAnyHitMask), "hitAttributeEXT"); - parseContext.profileRequires($1.loc, ECoreProfile, 460, E_GL_EXT_ray_tracing, "hitAttributeNV"); - $$.init($1.loc); - $$.qualifier.storage = EvqHitAttr; - } - | PAYLOADNV { - parseContext.globalCheck($1.loc, "rayPayloadNV"); - parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangRayGenMask | EShLangClosestHitMask | - EShLangAnyHitMask | EShLangMissMask), "rayPayloadNV"); - parseContext.profileRequires($1.loc, ECoreProfile, 460, E_GL_NV_ray_tracing, "rayPayloadNV"); - $$.init($1.loc); - $$.qualifier.storage = EvqPayload; - } - | PAYLOADEXT { - parseContext.globalCheck($1.loc, "rayPayloadEXT"); - parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangRayGenMask | EShLangClosestHitMask | - EShLangAnyHitMask | EShLangMissMask), "rayPayloadEXT"); - parseContext.profileRequires($1.loc, ECoreProfile, 460, E_GL_EXT_ray_tracing, "rayPayloadEXT"); - $$.init($1.loc); - $$.qualifier.storage = EvqPayload; - } - | PAYLOADINNV { - parseContext.globalCheck($1.loc, "rayPayloadInNV"); - parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangClosestHitMask | - EShLangAnyHitMask | EShLangMissMask), "rayPayloadInNV"); - parseContext.profileRequires($1.loc, ECoreProfile, 460, E_GL_NV_ray_tracing, "rayPayloadInNV"); - $$.init($1.loc); - $$.qualifier.storage = EvqPayloadIn; - } - | PAYLOADINEXT { - parseContext.globalCheck($1.loc, "rayPayloadInEXT"); - parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangClosestHitMask | - EShLangAnyHitMask | EShLangMissMask), "rayPayloadInEXT"); - parseContext.profileRequires($1.loc, ECoreProfile, 460, E_GL_EXT_ray_tracing, "rayPayloadInEXT"); - $$.init($1.loc); - $$.qualifier.storage = EvqPayloadIn; - } - | CALLDATANV { - parseContext.globalCheck($1.loc, "callableDataNV"); - parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangRayGenMask | - EShLangClosestHitMask | EShLangMissMask | EShLangCallableMask), "callableDataNV"); - parseContext.profileRequires($1.loc, ECoreProfile, 460, E_GL_NV_ray_tracing, "callableDataNV"); - $$.init($1.loc); - $$.qualifier.storage = EvqCallableData; - } - | CALLDATAEXT { - parseContext.globalCheck($1.loc, "callableDataEXT"); - parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangRayGenMask | - EShLangClosestHitMask | EShLangMissMask | EShLangCallableMask), "callableDataEXT"); - parseContext.profileRequires($1.loc, ECoreProfile, 460, E_GL_EXT_ray_tracing, "callableDataEXT"); - $$.init($1.loc); - $$.qualifier.storage = EvqCallableData; - } - | CALLDATAINNV { - parseContext.globalCheck($1.loc, "callableDataInNV"); - parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangCallableMask), "callableDataInNV"); - parseContext.profileRequires($1.loc, ECoreProfile, 460, E_GL_NV_ray_tracing, "callableDataInNV"); - $$.init($1.loc); - $$.qualifier.storage = EvqCallableDataIn; - } - | CALLDATAINEXT { - parseContext.globalCheck($1.loc, "callableDataInEXT"); - parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangCallableMask), "callableDataInEXT"); - parseContext.profileRequires($1.loc, ECoreProfile, 460, E_GL_EXT_ray_tracing, "callableDataInEXT"); - $$.init($1.loc); - $$.qualifier.storage = EvqCallableDataIn; - } - | COHERENT { - $$.init($1.loc); - $$.qualifier.coherent = true; - } - | DEVICECOHERENT { - $$.init($1.loc); - parseContext.requireExtensions($1.loc, 1, &E_GL_KHR_memory_scope_semantics, "devicecoherent"); - $$.qualifier.devicecoherent = true; - } - | QUEUEFAMILYCOHERENT { - $$.init($1.loc); - parseContext.requireExtensions($1.loc, 1, &E_GL_KHR_memory_scope_semantics, "queuefamilycoherent"); - $$.qualifier.queuefamilycoherent = true; - } - | WORKGROUPCOHERENT { - $$.init($1.loc); - parseContext.requireExtensions($1.loc, 1, &E_GL_KHR_memory_scope_semantics, "workgroupcoherent"); - $$.qualifier.workgroupcoherent = true; - } - | SUBGROUPCOHERENT { - $$.init($1.loc); - parseContext.requireExtensions($1.loc, 1, &E_GL_KHR_memory_scope_semantics, "subgroupcoherent"); - $$.qualifier.subgroupcoherent = true; - } - | NONPRIVATE { - $$.init($1.loc); - parseContext.requireExtensions($1.loc, 1, &E_GL_KHR_memory_scope_semantics, "nonprivate"); - $$.qualifier.nonprivate = true; - } - | SHADERCALLCOHERENT { - $$.init($1.loc); - parseContext.requireExtensions($1.loc, 1, &E_GL_EXT_ray_tracing, "shadercallcoherent"); - $$.qualifier.shadercallcoherent = true; - } - | VOLATILE { - $$.init($1.loc); - $$.qualifier.volatil = true; - } - | RESTRICT { - $$.init($1.loc); - $$.qualifier.restrict = true; - } - | READONLY { - $$.init($1.loc); - $$.qualifier.readonly = true; - } - | WRITEONLY { - $$.init($1.loc); - $$.qualifier.writeonly = true; - } - | SUBROUTINE { - parseContext.spvRemoved($1.loc, "subroutine"); - parseContext.globalCheck($1.loc, "subroutine"); - parseContext.unimplemented($1.loc, "subroutine"); - $$.init($1.loc); - } - | SUBROUTINE LEFT_PAREN type_name_list RIGHT_PAREN { - parseContext.spvRemoved($1.loc, "subroutine"); - parseContext.globalCheck($1.loc, "subroutine"); - parseContext.unimplemented($1.loc, "subroutine"); - $$.init($1.loc); - } - | TASKPAYLOADWORKGROUPEXT { - // No need for profile version or extension check. Shader stage already checks both. - parseContext.globalCheck($1.loc, "taskPayloadSharedEXT"); - parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangTaskMask | EShLangMeshMask), "taskPayloadSharedEXT "); - $$.init($1.loc); - $$.qualifier.storage = EvqtaskPayloadSharedEXT; - } -GLSLANG_WEB_EXCLUDE_OFF - ; - -GLSLANG_WEB_EXCLUDE_ON -non_uniform_qualifier - : NONUNIFORM { - $$.init($1.loc); - $$.qualifier.nonUniform = true; - } - ; - -type_name_list - : IDENTIFIER { - // TODO - } - | type_name_list COMMA IDENTIFIER { - // TODO: 4.0 semantics: subroutines - // 1) make sure each identifier is a type declared earlier with SUBROUTINE - // 2) save all of the identifiers for future comparison with the declared function - } - ; -GLSLANG_WEB_EXCLUDE_OFF - -type_specifier - : type_specifier_nonarray type_parameter_specifier_opt { - $$ = $1; - $$.qualifier.precision = parseContext.getDefaultPrecision($$); - $$.typeParameters = $2; - } - | type_specifier_nonarray type_parameter_specifier_opt array_specifier { - parseContext.arrayOfArrayVersionCheck($3.loc, $3.arraySizes); - $$ = $1; - $$.qualifier.precision = parseContext.getDefaultPrecision($$); - $$.typeParameters = $2; - $$.arraySizes = $3.arraySizes; - } - ; - -array_specifier - : LEFT_BRACKET RIGHT_BRACKET { - $$.loc = $1.loc; - $$.arraySizes = new TArraySizes; - $$.arraySizes->addInnerSize(); - } - | LEFT_BRACKET conditional_expression RIGHT_BRACKET { - $$.loc = $1.loc; - $$.arraySizes = new TArraySizes; - - TArraySize size; - parseContext.arraySizeCheck($2->getLoc(), $2, size, "array size"); - $$.arraySizes->addInnerSize(size); - } - | array_specifier LEFT_BRACKET RIGHT_BRACKET { - $$ = $1; - $$.arraySizes->addInnerSize(); - } - | array_specifier LEFT_BRACKET conditional_expression RIGHT_BRACKET { - $$ = $1; - - TArraySize size; - parseContext.arraySizeCheck($3->getLoc(), $3, size, "array size"); - $$.arraySizes->addInnerSize(size); - } - ; - -type_parameter_specifier_opt - : type_parameter_specifier { - $$ = $1; - } - | /* May be null */ { - $$ = 0; - } - ; - -type_parameter_specifier - : LEFT_ANGLE type_parameter_specifier_list RIGHT_ANGLE { - $$ = $2; - } - ; - -type_parameter_specifier_list - : unary_expression { - $$ = new TArraySizes; - - TArraySize size; - parseContext.arraySizeCheck($1->getLoc(), $1, size, "type parameter"); - $$->addInnerSize(size); - } - | type_parameter_specifier_list COMMA unary_expression { - $$ = $1; - - TArraySize size; - parseContext.arraySizeCheck($3->getLoc(), $3, size, "type parameter"); - $$->addInnerSize(size); - } - ; - -type_specifier_nonarray - : VOID { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtVoid; - } - | FLOAT { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat; - } - | INT { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtInt; - } - | UINT { - parseContext.fullIntegerCheck($1.loc, "unsigned integer"); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtUint; - } - | BOOL { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtBool; - } - | VEC2 { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat; - $$.setVector(2); - } - | VEC3 { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat; - $$.setVector(3); - } - | VEC4 { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat; - $$.setVector(4); - } - | BVEC2 { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtBool; - $$.setVector(2); - } - | BVEC3 { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtBool; - $$.setVector(3); - } - | BVEC4 { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtBool; - $$.setVector(4); - } - | IVEC2 { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtInt; - $$.setVector(2); - } - | IVEC3 { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtInt; - $$.setVector(3); - } - | IVEC4 { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtInt; - $$.setVector(4); - } - | UVEC2 { - parseContext.fullIntegerCheck($1.loc, "unsigned integer vector"); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtUint; - $$.setVector(2); - } - | UVEC3 { - parseContext.fullIntegerCheck($1.loc, "unsigned integer vector"); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtUint; - $$.setVector(3); - } - | UVEC4 { - parseContext.fullIntegerCheck($1.loc, "unsigned integer vector"); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtUint; - $$.setVector(4); - } - | MAT2 { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat; - $$.setMatrix(2, 2); - } - | MAT3 { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat; - $$.setMatrix(3, 3); - } - | MAT4 { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat; - $$.setMatrix(4, 4); - } - | MAT2X2 { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat; - $$.setMatrix(2, 2); - } - | MAT2X3 { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat; - $$.setMatrix(2, 3); - } - | MAT2X4 { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat; - $$.setMatrix(2, 4); - } - | MAT3X2 { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat; - $$.setMatrix(3, 2); - } - | MAT3X3 { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat; - $$.setMatrix(3, 3); - } - | MAT3X4 { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat; - $$.setMatrix(3, 4); - } - | MAT4X2 { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat; - $$.setMatrix(4, 2); - } - | MAT4X3 { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat; - $$.setMatrix(4, 3); - } - | MAT4X4 { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat; - $$.setMatrix(4, 4); - } -GLSLANG_WEB_EXCLUDE_ON - | DOUBLE { - parseContext.requireProfile($1.loc, ECoreProfile | ECompatibilityProfile, "double"); - if (! parseContext.symbolTable.atBuiltInLevel()) - parseContext.doubleCheck($1.loc, "double"); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtDouble; - } - | FLOAT16_T { - parseContext.float16ScalarVectorCheck($1.loc, "float16_t", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat16; - } - | FLOAT32_T { - parseContext.explicitFloat32Check($1.loc, "float32_t", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat; - } - | FLOAT64_T { - parseContext.explicitFloat64Check($1.loc, "float64_t", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtDouble; - } - | INT8_T { - parseContext.int8ScalarVectorCheck($1.loc, "8-bit signed integer", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtInt8; - } - | UINT8_T { - parseContext.int8ScalarVectorCheck($1.loc, "8-bit unsigned integer", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtUint8; - } - | INT16_T { - parseContext.int16ScalarVectorCheck($1.loc, "16-bit signed integer", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtInt16; - } - | UINT16_T { - parseContext.int16ScalarVectorCheck($1.loc, "16-bit unsigned integer", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtUint16; - } - | INT32_T { - parseContext.explicitInt32Check($1.loc, "32-bit signed integer", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtInt; - } - | UINT32_T { - parseContext.explicitInt32Check($1.loc, "32-bit unsigned integer", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtUint; - } - | INT64_T { - parseContext.int64Check($1.loc, "64-bit integer", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtInt64; - } - | UINT64_T { - parseContext.int64Check($1.loc, "64-bit unsigned integer", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtUint64; - } - | DVEC2 { - parseContext.requireProfile($1.loc, ECoreProfile | ECompatibilityProfile, "double vector"); - if (! parseContext.symbolTable.atBuiltInLevel()) - parseContext.doubleCheck($1.loc, "double vector"); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtDouble; - $$.setVector(2); - } - | DVEC3 { - parseContext.requireProfile($1.loc, ECoreProfile | ECompatibilityProfile, "double vector"); - if (! parseContext.symbolTable.atBuiltInLevel()) - parseContext.doubleCheck($1.loc, "double vector"); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtDouble; - $$.setVector(3); - } - | DVEC4 { - parseContext.requireProfile($1.loc, ECoreProfile | ECompatibilityProfile, "double vector"); - if (! parseContext.symbolTable.atBuiltInLevel()) - parseContext.doubleCheck($1.loc, "double vector"); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtDouble; - $$.setVector(4); - } - | F16VEC2 { - parseContext.float16ScalarVectorCheck($1.loc, "half float vector", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat16; - $$.setVector(2); - } - | F16VEC3 { - parseContext.float16ScalarVectorCheck($1.loc, "half float vector", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat16; - $$.setVector(3); - } - | F16VEC4 { - parseContext.float16ScalarVectorCheck($1.loc, "half float vector", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat16; - $$.setVector(4); - } - | F32VEC2 { - parseContext.explicitFloat32Check($1.loc, "float32_t vector", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat; - $$.setVector(2); - } - | F32VEC3 { - parseContext.explicitFloat32Check($1.loc, "float32_t vector", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat; - $$.setVector(3); - } - | F32VEC4 { - parseContext.explicitFloat32Check($1.loc, "float32_t vector", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat; - $$.setVector(4); - } - | F64VEC2 { - parseContext.explicitFloat64Check($1.loc, "float64_t vector", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtDouble; - $$.setVector(2); - } - | F64VEC3 { - parseContext.explicitFloat64Check($1.loc, "float64_t vector", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtDouble; - $$.setVector(3); - } - | F64VEC4 { - parseContext.explicitFloat64Check($1.loc, "float64_t vector", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtDouble; - $$.setVector(4); - } - | I8VEC2 { - parseContext.int8ScalarVectorCheck($1.loc, "8-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtInt8; - $$.setVector(2); - } - | I8VEC3 { - parseContext.int8ScalarVectorCheck($1.loc, "8-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtInt8; - $$.setVector(3); - } - | I8VEC4 { - parseContext.int8ScalarVectorCheck($1.loc, "8-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtInt8; - $$.setVector(4); - } - | I16VEC2 { - parseContext.int16ScalarVectorCheck($1.loc, "16-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtInt16; - $$.setVector(2); - } - | I16VEC3 { - parseContext.int16ScalarVectorCheck($1.loc, "16-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtInt16; - $$.setVector(3); - } - | I16VEC4 { - parseContext.int16ScalarVectorCheck($1.loc, "16-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtInt16; - $$.setVector(4); - } - | I32VEC2 { - parseContext.explicitInt32Check($1.loc, "32-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtInt; - $$.setVector(2); - } - | I32VEC3 { - parseContext.explicitInt32Check($1.loc, "32-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtInt; - $$.setVector(3); - } - | I32VEC4 { - parseContext.explicitInt32Check($1.loc, "32-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtInt; - $$.setVector(4); - } - | I64VEC2 { - parseContext.int64Check($1.loc, "64-bit integer vector", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtInt64; - $$.setVector(2); - } - | I64VEC3 { - parseContext.int64Check($1.loc, "64-bit integer vector", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtInt64; - $$.setVector(3); - } - | I64VEC4 { - parseContext.int64Check($1.loc, "64-bit integer vector", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtInt64; - $$.setVector(4); - } - | U8VEC2 { - parseContext.int8ScalarVectorCheck($1.loc, "8-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtUint8; - $$.setVector(2); - } - | U8VEC3 { - parseContext.int8ScalarVectorCheck($1.loc, "8-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtUint8; - $$.setVector(3); - } - | U8VEC4 { - parseContext.int8ScalarVectorCheck($1.loc, "8-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtUint8; - $$.setVector(4); - } - | U16VEC2 { - parseContext.int16ScalarVectorCheck($1.loc, "16-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtUint16; - $$.setVector(2); - } - | U16VEC3 { - parseContext.int16ScalarVectorCheck($1.loc, "16-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtUint16; - $$.setVector(3); - } - | U16VEC4 { - parseContext.int16ScalarVectorCheck($1.loc, "16-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtUint16; - $$.setVector(4); - } - | U32VEC2 { - parseContext.explicitInt32Check($1.loc, "32-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtUint; - $$.setVector(2); - } - | U32VEC3 { - parseContext.explicitInt32Check($1.loc, "32-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtUint; - $$.setVector(3); - } - | U32VEC4 { - parseContext.explicitInt32Check($1.loc, "32-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtUint; - $$.setVector(4); - } - | U64VEC2 { - parseContext.int64Check($1.loc, "64-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtUint64; - $$.setVector(2); - } - | U64VEC3 { - parseContext.int64Check($1.loc, "64-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtUint64; - $$.setVector(3); - } - | U64VEC4 { - parseContext.int64Check($1.loc, "64-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtUint64; - $$.setVector(4); - } - | DMAT2 { - parseContext.requireProfile($1.loc, ECoreProfile | ECompatibilityProfile, "double matrix"); - if (! parseContext.symbolTable.atBuiltInLevel()) - parseContext.doubleCheck($1.loc, "double matrix"); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtDouble; - $$.setMatrix(2, 2); - } - | DMAT3 { - parseContext.requireProfile($1.loc, ECoreProfile | ECompatibilityProfile, "double matrix"); - if (! parseContext.symbolTable.atBuiltInLevel()) - parseContext.doubleCheck($1.loc, "double matrix"); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtDouble; - $$.setMatrix(3, 3); - } - | DMAT4 { - parseContext.requireProfile($1.loc, ECoreProfile | ECompatibilityProfile, "double matrix"); - if (! parseContext.symbolTable.atBuiltInLevel()) - parseContext.doubleCheck($1.loc, "double matrix"); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtDouble; - $$.setMatrix(4, 4); - } - | DMAT2X2 { - parseContext.requireProfile($1.loc, ECoreProfile | ECompatibilityProfile, "double matrix"); - if (! parseContext.symbolTable.atBuiltInLevel()) - parseContext.doubleCheck($1.loc, "double matrix"); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtDouble; - $$.setMatrix(2, 2); - } - | DMAT2X3 { - parseContext.requireProfile($1.loc, ECoreProfile | ECompatibilityProfile, "double matrix"); - if (! parseContext.symbolTable.atBuiltInLevel()) - parseContext.doubleCheck($1.loc, "double matrix"); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtDouble; - $$.setMatrix(2, 3); - } - | DMAT2X4 { - parseContext.requireProfile($1.loc, ECoreProfile | ECompatibilityProfile, "double matrix"); - if (! parseContext.symbolTable.atBuiltInLevel()) - parseContext.doubleCheck($1.loc, "double matrix"); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtDouble; - $$.setMatrix(2, 4); - } - | DMAT3X2 { - parseContext.requireProfile($1.loc, ECoreProfile | ECompatibilityProfile, "double matrix"); - if (! parseContext.symbolTable.atBuiltInLevel()) - parseContext.doubleCheck($1.loc, "double matrix"); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtDouble; - $$.setMatrix(3, 2); - } - | DMAT3X3 { - parseContext.requireProfile($1.loc, ECoreProfile | ECompatibilityProfile, "double matrix"); - if (! parseContext.symbolTable.atBuiltInLevel()) - parseContext.doubleCheck($1.loc, "double matrix"); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtDouble; - $$.setMatrix(3, 3); - } - | DMAT3X4 { - parseContext.requireProfile($1.loc, ECoreProfile | ECompatibilityProfile, "double matrix"); - if (! parseContext.symbolTable.atBuiltInLevel()) - parseContext.doubleCheck($1.loc, "double matrix"); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtDouble; - $$.setMatrix(3, 4); - } - | DMAT4X2 { - parseContext.requireProfile($1.loc, ECoreProfile | ECompatibilityProfile, "double matrix"); - if (! parseContext.symbolTable.atBuiltInLevel()) - parseContext.doubleCheck($1.loc, "double matrix"); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtDouble; - $$.setMatrix(4, 2); - } - | DMAT4X3 { - parseContext.requireProfile($1.loc, ECoreProfile | ECompatibilityProfile, "double matrix"); - if (! parseContext.symbolTable.atBuiltInLevel()) - parseContext.doubleCheck($1.loc, "double matrix"); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtDouble; - $$.setMatrix(4, 3); - } - | DMAT4X4 { - parseContext.requireProfile($1.loc, ECoreProfile | ECompatibilityProfile, "double matrix"); - if (! parseContext.symbolTable.atBuiltInLevel()) - parseContext.doubleCheck($1.loc, "double matrix"); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtDouble; - $$.setMatrix(4, 4); - } - | F16MAT2 { - parseContext.float16Check($1.loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat16; - $$.setMatrix(2, 2); - } - | F16MAT3 { - parseContext.float16Check($1.loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat16; - $$.setMatrix(3, 3); - } - | F16MAT4 { - parseContext.float16Check($1.loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat16; - $$.setMatrix(4, 4); - } - | F16MAT2X2 { - parseContext.float16Check($1.loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat16; - $$.setMatrix(2, 2); - } - | F16MAT2X3 { - parseContext.float16Check($1.loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat16; - $$.setMatrix(2, 3); - } - | F16MAT2X4 { - parseContext.float16Check($1.loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat16; - $$.setMatrix(2, 4); - } - | F16MAT3X2 { - parseContext.float16Check($1.loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat16; - $$.setMatrix(3, 2); - } - | F16MAT3X3 { - parseContext.float16Check($1.loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat16; - $$.setMatrix(3, 3); - } - | F16MAT3X4 { - parseContext.float16Check($1.loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat16; - $$.setMatrix(3, 4); - } - | F16MAT4X2 { - parseContext.float16Check($1.loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat16; - $$.setMatrix(4, 2); - } - | F16MAT4X3 { - parseContext.float16Check($1.loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat16; - $$.setMatrix(4, 3); - } - | F16MAT4X4 { - parseContext.float16Check($1.loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat16; - $$.setMatrix(4, 4); - } - | F32MAT2 { - parseContext.explicitFloat32Check($1.loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat; - $$.setMatrix(2, 2); - } - | F32MAT3 { - parseContext.explicitFloat32Check($1.loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat; - $$.setMatrix(3, 3); - } - | F32MAT4 { - parseContext.explicitFloat32Check($1.loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat; - $$.setMatrix(4, 4); - } - | F32MAT2X2 { - parseContext.explicitFloat32Check($1.loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat; - $$.setMatrix(2, 2); - } - | F32MAT2X3 { - parseContext.explicitFloat32Check($1.loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat; - $$.setMatrix(2, 3); - } - | F32MAT2X4 { - parseContext.explicitFloat32Check($1.loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat; - $$.setMatrix(2, 4); - } - | F32MAT3X2 { - parseContext.explicitFloat32Check($1.loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat; - $$.setMatrix(3, 2); - } - | F32MAT3X3 { - parseContext.explicitFloat32Check($1.loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat; - $$.setMatrix(3, 3); - } - | F32MAT3X4 { - parseContext.explicitFloat32Check($1.loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat; - $$.setMatrix(3, 4); - } - | F32MAT4X2 { - parseContext.explicitFloat32Check($1.loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat; - $$.setMatrix(4, 2); - } - | F32MAT4X3 { - parseContext.explicitFloat32Check($1.loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat; - $$.setMatrix(4, 3); - } - | F32MAT4X4 { - parseContext.explicitFloat32Check($1.loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat; - $$.setMatrix(4, 4); - } - | F64MAT2 { - parseContext.explicitFloat64Check($1.loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtDouble; - $$.setMatrix(2, 2); - } - | F64MAT3 { - parseContext.explicitFloat64Check($1.loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtDouble; - $$.setMatrix(3, 3); - } - | F64MAT4 { - parseContext.explicitFloat64Check($1.loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtDouble; - $$.setMatrix(4, 4); - } - | F64MAT2X2 { - parseContext.explicitFloat64Check($1.loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtDouble; - $$.setMatrix(2, 2); - } - | F64MAT2X3 { - parseContext.explicitFloat64Check($1.loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtDouble; - $$.setMatrix(2, 3); - } - | F64MAT2X4 { - parseContext.explicitFloat64Check($1.loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtDouble; - $$.setMatrix(2, 4); - } - | F64MAT3X2 { - parseContext.explicitFloat64Check($1.loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtDouble; - $$.setMatrix(3, 2); - } - | F64MAT3X3 { - parseContext.explicitFloat64Check($1.loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtDouble; - $$.setMatrix(3, 3); - } - | F64MAT3X4 { - parseContext.explicitFloat64Check($1.loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtDouble; - $$.setMatrix(3, 4); - } - | F64MAT4X2 { - parseContext.explicitFloat64Check($1.loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtDouble; - $$.setMatrix(4, 2); - } - | F64MAT4X3 { - parseContext.explicitFloat64Check($1.loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtDouble; - $$.setMatrix(4, 3); - } - | F64MAT4X4 { - parseContext.explicitFloat64Check($1.loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtDouble; - $$.setMatrix(4, 4); - } - | ACCSTRUCTNV { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtAccStruct; - } - | ACCSTRUCTEXT { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtAccStruct; - } - | RAYQUERYEXT { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtRayQuery; - } - | ATOMIC_UINT { - parseContext.vulkanRemoved($1.loc, "atomic counter types"); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtAtomicUint; - } - | SAMPLER1D { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtFloat, Esd1D); - } -GLSLANG_WEB_EXCLUDE_OFF - | SAMPLER2D { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtFloat, Esd2D); - } - | SAMPLER3D { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtFloat, Esd3D); - } - | SAMPLERCUBE { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtFloat, EsdCube); - } - | SAMPLER2DSHADOW { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtFloat, Esd2D, false, true); - } - | SAMPLERCUBESHADOW { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtFloat, EsdCube, false, true); - } - | SAMPLER2DARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtFloat, Esd2D, true); - } - | SAMPLER2DARRAYSHADOW { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtFloat, Esd2D, true, true); - } -GLSLANG_WEB_EXCLUDE_ON - | SAMPLER1DSHADOW { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtFloat, Esd1D, false, true); - } - | SAMPLER1DARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtFloat, Esd1D, true); - } - | SAMPLER1DARRAYSHADOW { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtFloat, Esd1D, true, true); - } - | SAMPLERCUBEARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtFloat, EsdCube, true); - } - | SAMPLERCUBEARRAYSHADOW { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtFloat, EsdCube, true, true); - } - | F16SAMPLER1D { - parseContext.float16OpaqueCheck($1.loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtFloat16, Esd1D); - } - | F16SAMPLER2D { - parseContext.float16OpaqueCheck($1.loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtFloat16, Esd2D); - } - | F16SAMPLER3D { - parseContext.float16OpaqueCheck($1.loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtFloat16, Esd3D); - } - | F16SAMPLERCUBE { - parseContext.float16OpaqueCheck($1.loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtFloat16, EsdCube); - } - | F16SAMPLER1DSHADOW { - parseContext.float16OpaqueCheck($1.loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtFloat16, Esd1D, false, true); - } - | F16SAMPLER2DSHADOW { - parseContext.float16OpaqueCheck($1.loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtFloat16, Esd2D, false, true); - } - | F16SAMPLERCUBESHADOW { - parseContext.float16OpaqueCheck($1.loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtFloat16, EsdCube, false, true); - } - | F16SAMPLER1DARRAY { - parseContext.float16OpaqueCheck($1.loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtFloat16, Esd1D, true); - } - | F16SAMPLER2DARRAY { - parseContext.float16OpaqueCheck($1.loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtFloat16, Esd2D, true); - } - | F16SAMPLER1DARRAYSHADOW { - parseContext.float16OpaqueCheck($1.loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtFloat16, Esd1D, true, true); - } - | F16SAMPLER2DARRAYSHADOW { - parseContext.float16OpaqueCheck($1.loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtFloat16, Esd2D, true, true); - } - | F16SAMPLERCUBEARRAY { - parseContext.float16OpaqueCheck($1.loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtFloat16, EsdCube, true); - } - | F16SAMPLERCUBEARRAYSHADOW { - parseContext.float16OpaqueCheck($1.loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtFloat16, EsdCube, true, true); - } - | ISAMPLER1D { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtInt, Esd1D); - } -GLSLANG_WEB_EXCLUDE_OFF - | ISAMPLER2D { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtInt, Esd2D); - } - | ISAMPLER3D { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtInt, Esd3D); - } - | ISAMPLERCUBE { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtInt, EsdCube); - } - | ISAMPLER2DARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtInt, Esd2D, true); - } - | USAMPLER2D { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtUint, Esd2D); - } - | USAMPLER3D { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtUint, Esd3D); - } - | USAMPLERCUBE { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtUint, EsdCube); - } -GLSLANG_WEB_EXCLUDE_ON - | ISAMPLER1DARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtInt, Esd1D, true); - } - | ISAMPLERCUBEARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtInt, EsdCube, true); - } - | USAMPLER1D { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtUint, Esd1D); - } - | USAMPLER1DARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtUint, Esd1D, true); - } - | USAMPLERCUBEARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtUint, EsdCube, true); - } - | TEXTURECUBEARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtFloat, EsdCube, true); - } - | ITEXTURECUBEARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtInt, EsdCube, true); - } - | UTEXTURECUBEARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtUint, EsdCube, true); - } -GLSLANG_WEB_EXCLUDE_OFF - | USAMPLER2DARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtUint, Esd2D, true); - } - | TEXTURE2D { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtFloat, Esd2D); - } - | TEXTURE3D { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtFloat, Esd3D); - } - | TEXTURE2DARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtFloat, Esd2D, true); - } - | TEXTURECUBE { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtFloat, EsdCube); - } - | ITEXTURE2D { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtInt, Esd2D); - } - | ITEXTURE3D { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtInt, Esd3D); - } - | ITEXTURECUBE { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtInt, EsdCube); - } - | ITEXTURE2DARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtInt, Esd2D, true); - } - | UTEXTURE2D { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtUint, Esd2D); - } - | UTEXTURE3D { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtUint, Esd3D); - } - | UTEXTURECUBE { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtUint, EsdCube); - } - | UTEXTURE2DARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtUint, Esd2D, true); - } - | SAMPLER { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setPureSampler(false); - } - | SAMPLERSHADOW { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setPureSampler(true); - } -GLSLANG_WEB_EXCLUDE_ON - | SAMPLER2DRECT { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtFloat, EsdRect); - } - | SAMPLER2DRECTSHADOW { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtFloat, EsdRect, false, true); - } - | F16SAMPLER2DRECT { - parseContext.float16OpaqueCheck($1.loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtFloat16, EsdRect); - } - | F16SAMPLER2DRECTSHADOW { - parseContext.float16OpaqueCheck($1.loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtFloat16, EsdRect, false, true); - } - | ISAMPLER2DRECT { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtInt, EsdRect); - } - | USAMPLER2DRECT { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtUint, EsdRect); - } - | SAMPLERBUFFER { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtFloat, EsdBuffer); - } - | F16SAMPLERBUFFER { - parseContext.float16OpaqueCheck($1.loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtFloat16, EsdBuffer); - } - | ISAMPLERBUFFER { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtInt, EsdBuffer); - } - | USAMPLERBUFFER { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtUint, EsdBuffer); - } - | SAMPLER2DMS { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtFloat, Esd2D, false, false, true); - } - | F16SAMPLER2DMS { - parseContext.float16OpaqueCheck($1.loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtFloat16, Esd2D, false, false, true); - } - | ISAMPLER2DMS { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtInt, Esd2D, false, false, true); - } - | USAMPLER2DMS { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtUint, Esd2D, false, false, true); - } - | SAMPLER2DMSARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtFloat, Esd2D, true, false, true); - } - | F16SAMPLER2DMSARRAY { - parseContext.float16OpaqueCheck($1.loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtFloat16, Esd2D, true, false, true); - } - | ISAMPLER2DMSARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtInt, Esd2D, true, false, true); - } - | USAMPLER2DMSARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtUint, Esd2D, true, false, true); - } - | TEXTURE1D { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtFloat, Esd1D); - } - | F16TEXTURE1D { - parseContext.float16OpaqueCheck($1.loc, "half float texture", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtFloat16, Esd1D); - } - | F16TEXTURE2D { - parseContext.float16OpaqueCheck($1.loc, "half float texture", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtFloat16, Esd2D); - } - | F16TEXTURE3D { - parseContext.float16OpaqueCheck($1.loc, "half float texture", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtFloat16, Esd3D); - } - | F16TEXTURECUBE { - parseContext.float16OpaqueCheck($1.loc, "half float texture", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtFloat16, EsdCube); - } - | TEXTURE1DARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtFloat, Esd1D, true); - } - | F16TEXTURE1DARRAY { - parseContext.float16OpaqueCheck($1.loc, "half float texture", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtFloat16, Esd1D, true); - } - | F16TEXTURE2DARRAY { - parseContext.float16OpaqueCheck($1.loc, "half float texture", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtFloat16, Esd2D, true); - } - | F16TEXTURECUBEARRAY { - parseContext.float16OpaqueCheck($1.loc, "half float texture", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtFloat16, EsdCube, true); - } - | ITEXTURE1D { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtInt, Esd1D); - } - | ITEXTURE1DARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtInt, Esd1D, true); - } - | UTEXTURE1D { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtUint, Esd1D); - } - | UTEXTURE1DARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtUint, Esd1D, true); - } - | TEXTURE2DRECT { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtFloat, EsdRect); - } - | F16TEXTURE2DRECT { - parseContext.float16OpaqueCheck($1.loc, "half float texture", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtFloat16, EsdRect); - } - | ITEXTURE2DRECT { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtInt, EsdRect); - } - | UTEXTURE2DRECT { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtUint, EsdRect); - } - | TEXTUREBUFFER { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtFloat, EsdBuffer); - } - | F16TEXTUREBUFFER { - parseContext.float16OpaqueCheck($1.loc, "half float texture", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtFloat16, EsdBuffer); - } - | ITEXTUREBUFFER { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtInt, EsdBuffer); - } - | UTEXTUREBUFFER { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtUint, EsdBuffer); - } - | TEXTURE2DMS { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtFloat, Esd2D, false, false, true); - } - | F16TEXTURE2DMS { - parseContext.float16OpaqueCheck($1.loc, "half float texture", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtFloat16, Esd2D, false, false, true); - } - | ITEXTURE2DMS { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtInt, Esd2D, false, false, true); - } - | UTEXTURE2DMS { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtUint, Esd2D, false, false, true); - } - | TEXTURE2DMSARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtFloat, Esd2D, true, false, true); - } - | F16TEXTURE2DMSARRAY { - parseContext.float16OpaqueCheck($1.loc, "half float texture", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtFloat16, Esd2D, true, false, true); - } - | ITEXTURE2DMSARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtInt, Esd2D, true, false, true); - } - | UTEXTURE2DMSARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtUint, Esd2D, true, false, true); - } - | IMAGE1D { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtFloat, Esd1D); - } - | F16IMAGE1D { - parseContext.float16OpaqueCheck($1.loc, "half float image", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtFloat16, Esd1D); - } - | IIMAGE1D { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtInt, Esd1D); - } - | UIMAGE1D { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtUint, Esd1D); - } - | IMAGE2D { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtFloat, Esd2D); - } - | F16IMAGE2D { - parseContext.float16OpaqueCheck($1.loc, "half float image", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtFloat16, Esd2D); - } - | IIMAGE2D { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtInt, Esd2D); - } - | UIMAGE2D { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtUint, Esd2D); - } - | IMAGE3D { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtFloat, Esd3D); - } - | F16IMAGE3D { - parseContext.float16OpaqueCheck($1.loc, "half float image", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtFloat16, Esd3D); - } - | IIMAGE3D { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtInt, Esd3D); - } - | UIMAGE3D { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtUint, Esd3D); - } - | IMAGE2DRECT { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtFloat, EsdRect); - } - | F16IMAGE2DRECT { - parseContext.float16OpaqueCheck($1.loc, "half float image", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtFloat16, EsdRect); - } - | IIMAGE2DRECT { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtInt, EsdRect); - } - | UIMAGE2DRECT { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtUint, EsdRect); - } - | IMAGECUBE { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtFloat, EsdCube); - } - | F16IMAGECUBE { - parseContext.float16OpaqueCheck($1.loc, "half float image", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtFloat16, EsdCube); - } - | IIMAGECUBE { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtInt, EsdCube); - } - | UIMAGECUBE { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtUint, EsdCube); - } - | IMAGEBUFFER { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtFloat, EsdBuffer); - } - | F16IMAGEBUFFER { - parseContext.float16OpaqueCheck($1.loc, "half float image", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtFloat16, EsdBuffer); - } - | IIMAGEBUFFER { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtInt, EsdBuffer); - } - | UIMAGEBUFFER { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtUint, EsdBuffer); - } - | IMAGE1DARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtFloat, Esd1D, true); - } - | F16IMAGE1DARRAY { - parseContext.float16OpaqueCheck($1.loc, "half float image", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtFloat16, Esd1D, true); - } - | IIMAGE1DARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtInt, Esd1D, true); - } - | UIMAGE1DARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtUint, Esd1D, true); - } - | IMAGE2DARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtFloat, Esd2D, true); - } - | F16IMAGE2DARRAY { - parseContext.float16OpaqueCheck($1.loc, "half float image", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtFloat16, Esd2D, true); - } - | IIMAGE2DARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtInt, Esd2D, true); - } - | UIMAGE2DARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtUint, Esd2D, true); - } - | IMAGECUBEARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtFloat, EsdCube, true); - } - | F16IMAGECUBEARRAY { - parseContext.float16OpaqueCheck($1.loc, "half float image", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtFloat16, EsdCube, true); - } - | IIMAGECUBEARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtInt, EsdCube, true); - } - | UIMAGECUBEARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtUint, EsdCube, true); - } - | IMAGE2DMS { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtFloat, Esd2D, false, false, true); - } - | F16IMAGE2DMS { - parseContext.float16OpaqueCheck($1.loc, "half float image", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtFloat16, Esd2D, false, false, true); - } - | IIMAGE2DMS { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtInt, Esd2D, false, false, true); - } - | UIMAGE2DMS { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtUint, Esd2D, false, false, true); - } - | IMAGE2DMSARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtFloat, Esd2D, true, false, true); - } - | F16IMAGE2DMSARRAY { - parseContext.float16OpaqueCheck($1.loc, "half float image", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtFloat16, Esd2D, true, false, true); - } - | IIMAGE2DMSARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtInt, Esd2D, true, false, true); - } - | UIMAGE2DMSARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtUint, Esd2D, true, false, true); - } - | I64IMAGE1D { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtInt64, Esd1D); - } - | U64IMAGE1D { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtUint64, Esd1D); - } - | I64IMAGE2D { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtInt64, Esd2D); - } - | U64IMAGE2D { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtUint64, Esd2D); - } - | I64IMAGE3D { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtInt64, Esd3D); - } - | U64IMAGE3D { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtUint64, Esd3D); - } - | I64IMAGE2DRECT { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtInt64, EsdRect); - } - | U64IMAGE2DRECT { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtUint64, EsdRect); - } - | I64IMAGECUBE { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtInt64, EsdCube); - } - | U64IMAGECUBE { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtUint64, EsdCube); - } - | I64IMAGEBUFFER { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtInt64, EsdBuffer); - } - | U64IMAGEBUFFER { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtUint64, EsdBuffer); - } - | I64IMAGE1DARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtInt64, Esd1D, true); - } - | U64IMAGE1DARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtUint64, Esd1D, true); - } - | I64IMAGE2DARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtInt64, Esd2D, true); - } - | U64IMAGE2DARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtUint64, Esd2D, true); - } - | I64IMAGECUBEARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtInt64, EsdCube, true); - } - | U64IMAGECUBEARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtUint64, EsdCube, true); - } - | I64IMAGE2DMS { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtInt64, Esd2D, false, false, true); - } - | U64IMAGE2DMS { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtUint64, Esd2D, false, false, true); - } - | I64IMAGE2DMSARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtInt64, Esd2D, true, false, true); - } - | U64IMAGE2DMSARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtUint64, Esd2D, true, false, true); - } - | SAMPLEREXTERNALOES { // GL_OES_EGL_image_external - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtFloat, Esd2D); - $$.sampler.external = true; - } - | SAMPLEREXTERNAL2DY2YEXT { // GL_EXT_YUV_target - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtFloat, Esd2D); - $$.sampler.yuv = true; - } - | SUBPASSINPUT { - parseContext.requireStage($1.loc, EShLangFragment, "subpass input"); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setSubpass(EbtFloat); - } - | SUBPASSINPUTMS { - parseContext.requireStage($1.loc, EShLangFragment, "subpass input"); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setSubpass(EbtFloat, true); - } - | F16SUBPASSINPUT { - parseContext.float16OpaqueCheck($1.loc, "half float subpass input", parseContext.symbolTable.atBuiltInLevel()); - parseContext.requireStage($1.loc, EShLangFragment, "subpass input"); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setSubpass(EbtFloat16); - } - | F16SUBPASSINPUTMS { - parseContext.float16OpaqueCheck($1.loc, "half float subpass input", parseContext.symbolTable.atBuiltInLevel()); - parseContext.requireStage($1.loc, EShLangFragment, "subpass input"); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setSubpass(EbtFloat16, true); - } - | ISUBPASSINPUT { - parseContext.requireStage($1.loc, EShLangFragment, "subpass input"); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setSubpass(EbtInt); - } - | ISUBPASSINPUTMS { - parseContext.requireStage($1.loc, EShLangFragment, "subpass input"); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setSubpass(EbtInt, true); - } - | USUBPASSINPUT { - parseContext.requireStage($1.loc, EShLangFragment, "subpass input"); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setSubpass(EbtUint); - } - | USUBPASSINPUTMS { - parseContext.requireStage($1.loc, EShLangFragment, "subpass input"); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setSubpass(EbtUint, true); - } - | FCOOPMATNV { - parseContext.fcoopmatCheck($1.loc, "fcoopmatNV", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat; - $$.coopmat = true; - } - | ICOOPMATNV { - parseContext.intcoopmatCheck($1.loc, "icoopmatNV", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtInt; - $$.coopmat = true; - } - | UCOOPMATNV { - parseContext.intcoopmatCheck($1.loc, "ucoopmatNV", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtUint; - $$.coopmat = true; - } - | spirv_type_specifier { - parseContext.requireExtensions($1.loc, 1, &E_GL_EXT_spirv_intrinsics, "SPIR-V type specifier"); - $$ = $1; - } -GLSLANG_WEB_EXCLUDE_OFF - | struct_specifier { - $$ = $1; - $$.qualifier.storage = parseContext.symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; - parseContext.structTypeCheck($$.loc, $$); - } - | TYPE_NAME { - // - // This is for user defined type names. The lexical phase looked up the - // type. - // - if (const TVariable* variable = ($1.symbol)->getAsVariable()) { - const TType& structure = variable->getType(); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtStruct; - $$.userDef = &structure; - } else - parseContext.error($1.loc, "expected type name", $1.string->c_str(), ""); - } - ; - -precision_qualifier - : HIGH_PRECISION { - parseContext.profileRequires($1.loc, ENoProfile, 130, 0, "highp precision qualifier"); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - parseContext.handlePrecisionQualifier($1.loc, $$.qualifier, EpqHigh); - } - | MEDIUM_PRECISION { - parseContext.profileRequires($1.loc, ENoProfile, 130, 0, "mediump precision qualifier"); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - parseContext.handlePrecisionQualifier($1.loc, $$.qualifier, EpqMedium); - } - | LOW_PRECISION { - parseContext.profileRequires($1.loc, ENoProfile, 130, 0, "lowp precision qualifier"); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - parseContext.handlePrecisionQualifier($1.loc, $$.qualifier, EpqLow); - } - ; - -struct_specifier - : STRUCT IDENTIFIER LEFT_BRACE { parseContext.nestedStructCheck($1.loc); } struct_declaration_list RIGHT_BRACE { - TType* structure = new TType($5, *$2.string); - parseContext.structArrayCheck($2.loc, *structure); - TVariable* userTypeDef = new TVariable($2.string, *structure, true); - if (! parseContext.symbolTable.insert(*userTypeDef)) - parseContext.error($2.loc, "redefinition", $2.string->c_str(), "struct"); - $$.init($1.loc); - $$.basicType = EbtStruct; - $$.userDef = structure; - --parseContext.structNestingLevel; - } - | STRUCT LEFT_BRACE { parseContext.nestedStructCheck($1.loc); } struct_declaration_list RIGHT_BRACE { - TType* structure = new TType($4, TString("")); - $$.init($1.loc); - $$.basicType = EbtStruct; - $$.userDef = structure; - --parseContext.structNestingLevel; - } - ; - -struct_declaration_list - : struct_declaration { - $$ = $1; - } - | struct_declaration_list struct_declaration { - $$ = $1; - for (unsigned int i = 0; i < $2->size(); ++i) { - for (unsigned int j = 0; j < $$->size(); ++j) { - if ((*$$)[j].type->getFieldName() == (*$2)[i].type->getFieldName()) - parseContext.error((*$2)[i].loc, "duplicate member name:", "", (*$2)[i].type->getFieldName().c_str()); - } - $$->push_back((*$2)[i]); - } - } - ; - -struct_declaration - : type_specifier struct_declarator_list SEMICOLON { - if ($1.arraySizes) { - parseContext.profileRequires($1.loc, ENoProfile, 120, E_GL_3DL_array_objects, "arrayed type"); - parseContext.profileRequires($1.loc, EEsProfile, 300, 0, "arrayed type"); - if (parseContext.isEsProfile()) - parseContext.arraySizeRequiredCheck($1.loc, *$1.arraySizes); - } - - $$ = $2; - - parseContext.voidErrorCheck($1.loc, (*$2)[0].type->getFieldName(), $1.basicType); - parseContext.precisionQualifierCheck($1.loc, $1.basicType, $1.qualifier); - - for (unsigned int i = 0; i < $$->size(); ++i) { - TType type($1); - type.setFieldName((*$$)[i].type->getFieldName()); - type.transferArraySizes((*$$)[i].type->getArraySizes()); - type.copyArrayInnerSizes($1.arraySizes); - parseContext.arrayOfArrayVersionCheck((*$$)[i].loc, type.getArraySizes()); - (*$$)[i].type->shallowCopy(type); - } - } - | type_qualifier type_specifier struct_declarator_list SEMICOLON { - if ($2.arraySizes) { - parseContext.profileRequires($2.loc, ENoProfile, 120, E_GL_3DL_array_objects, "arrayed type"); - parseContext.profileRequires($2.loc, EEsProfile, 300, 0, "arrayed type"); - if (parseContext.isEsProfile()) - parseContext.arraySizeRequiredCheck($2.loc, *$2.arraySizes); - } - - $$ = $3; - - parseContext.memberQualifierCheck($1); - parseContext.voidErrorCheck($2.loc, (*$3)[0].type->getFieldName(), $2.basicType); - parseContext.mergeQualifiers($2.loc, $2.qualifier, $1.qualifier, true); - parseContext.precisionQualifierCheck($2.loc, $2.basicType, $2.qualifier); - - for (unsigned int i = 0; i < $$->size(); ++i) { - TType type($2); - type.setFieldName((*$$)[i].type->getFieldName()); - type.transferArraySizes((*$$)[i].type->getArraySizes()); - type.copyArrayInnerSizes($2.arraySizes); - parseContext.arrayOfArrayVersionCheck((*$$)[i].loc, type.getArraySizes()); - (*$$)[i].type->shallowCopy(type); - } - } - ; - -struct_declarator_list - : struct_declarator { - $$ = new TTypeList; - $$->push_back($1); - } - | struct_declarator_list COMMA struct_declarator { - $$->push_back($3); - } - ; - -struct_declarator - : IDENTIFIER { - $$.type = new TType(EbtVoid); - $$.loc = $1.loc; - $$.type->setFieldName(*$1.string); - } - | IDENTIFIER array_specifier { - parseContext.arrayOfArrayVersionCheck($1.loc, $2.arraySizes); - - $$.type = new TType(EbtVoid); - $$.loc = $1.loc; - $$.type->setFieldName(*$1.string); - $$.type->transferArraySizes($2.arraySizes); - } - ; - -initializer - : assignment_expression { - $$ = $1; - } -GLSLANG_WEB_EXCLUDE_ON - | LEFT_BRACE initializer_list RIGHT_BRACE { - const char* initFeature = "{ } style initializers"; - parseContext.requireProfile($1.loc, ~EEsProfile, initFeature); - parseContext.profileRequires($1.loc, ~EEsProfile, 420, E_GL_ARB_shading_language_420pack, initFeature); - $$ = $2; - } - | LEFT_BRACE initializer_list COMMA RIGHT_BRACE { - const char* initFeature = "{ } style initializers"; - parseContext.requireProfile($1.loc, ~EEsProfile, initFeature); - parseContext.profileRequires($1.loc, ~EEsProfile, 420, E_GL_ARB_shading_language_420pack, initFeature); - $$ = $2; - } - | LEFT_BRACE RIGHT_BRACE { - const char* initFeature = "empty { } initializer"; - parseContext.profileRequires($1.loc, EEsProfile, 0, E_GL_EXT_null_initializer, initFeature); - parseContext.profileRequires($1.loc, ~EEsProfile, 0, E_GL_EXT_null_initializer, initFeature); - $$ = parseContext.intermediate.makeAggregate($1.loc); - } -GLSLANG_WEB_EXCLUDE_OFF - ; - -GLSLANG_WEB_EXCLUDE_ON -initializer_list - : initializer { - $$ = parseContext.intermediate.growAggregate(0, $1, $1->getLoc()); - } - | initializer_list COMMA initializer { - $$ = parseContext.intermediate.growAggregate($1, $3); - } - ; -GLSLANG_WEB_EXCLUDE_OFF - -declaration_statement - : declaration { $$ = $1; } - ; - -statement - : compound_statement { $$ = $1; } - | simple_statement { $$ = $1; } - ; - -// Grammar Note: labeled statements for switch statements only; 'goto' is not supported. - -simple_statement - : declaration_statement { $$ = $1; } - | expression_statement { $$ = $1; } - | selection_statement { $$ = $1; } - | switch_statement { $$ = $1; } - | case_label { $$ = $1; } - | iteration_statement { $$ = $1; } - | jump_statement { $$ = $1; } -GLSLANG_WEB_EXCLUDE_ON - | demote_statement { $$ = $1; } -GLSLANG_WEB_EXCLUDE_OFF - ; - -GLSLANG_WEB_EXCLUDE_ON -demote_statement - : DEMOTE SEMICOLON { - parseContext.requireStage($1.loc, EShLangFragment, "demote"); - parseContext.requireExtensions($1.loc, 1, &E_GL_EXT_demote_to_helper_invocation, "demote"); - $$ = parseContext.intermediate.addBranch(EOpDemote, $1.loc); - } - ; -GLSLANG_WEB_EXCLUDE_OFF - -compound_statement - : LEFT_BRACE RIGHT_BRACE { $$ = 0; } - | LEFT_BRACE { - parseContext.symbolTable.push(); - ++parseContext.statementNestingLevel; - } - statement_list { - parseContext.symbolTable.pop(&parseContext.defaultPrecision[0]); - --parseContext.statementNestingLevel; - } - RIGHT_BRACE { - if ($3 && $3->getAsAggregate()) - $3->getAsAggregate()->setOperator(parseContext.intermediate.getDebugInfo() ? EOpScope : EOpSequence); - $$ = $3; - } - ; - -statement_no_new_scope - : compound_statement_no_new_scope { $$ = $1; } - | simple_statement { $$ = $1; } - ; - -statement_scoped - : { - ++parseContext.controlFlowNestingLevel; - } - compound_statement { - --parseContext.controlFlowNestingLevel; - $$ = $2; - } - | { - parseContext.symbolTable.push(); - ++parseContext.statementNestingLevel; - ++parseContext.controlFlowNestingLevel; - } - simple_statement { - parseContext.symbolTable.pop(&parseContext.defaultPrecision[0]); - --parseContext.statementNestingLevel; - --parseContext.controlFlowNestingLevel; - $$ = $2; - } - -compound_statement_no_new_scope - // Statement that doesn't create a new scope, for selection_statement, iteration_statement - : LEFT_BRACE RIGHT_BRACE { - $$ = 0; - } - | LEFT_BRACE statement_list RIGHT_BRACE { - if ($2 && $2->getAsAggregate()) - $2->getAsAggregate()->setOperator(EOpSequence); - $$ = $2; - } - ; - -statement_list - : statement { - $$ = parseContext.intermediate.makeAggregate($1); - if ($1 && $1->getAsBranchNode() && ($1->getAsBranchNode()->getFlowOp() == EOpCase || - $1->getAsBranchNode()->getFlowOp() == EOpDefault)) { - parseContext.wrapupSwitchSubsequence(0, $1); - $$ = 0; // start a fresh subsequence for what's after this case - } - } - | statement_list statement { - if ($2 && $2->getAsBranchNode() && ($2->getAsBranchNode()->getFlowOp() == EOpCase || - $2->getAsBranchNode()->getFlowOp() == EOpDefault)) { - parseContext.wrapupSwitchSubsequence($1 ? $1->getAsAggregate() : 0, $2); - $$ = 0; // start a fresh subsequence for what's after this case - } else - $$ = parseContext.intermediate.growAggregate($1, $2); - } - ; - -expression_statement - : SEMICOLON { $$ = 0; } - | expression SEMICOLON { $$ = static_cast($1); } - ; - -selection_statement - : selection_statement_nonattributed { - $$ = $1; - } -GLSLANG_WEB_EXCLUDE_ON - | attribute selection_statement_nonattributed { - parseContext.requireExtensions($2->getLoc(), 1, &E_GL_EXT_control_flow_attributes, "attribute"); - parseContext.handleSelectionAttributes(*$1, $2); - $$ = $2; - } -GLSLANG_WEB_EXCLUDE_OFF - -selection_statement_nonattributed - : IF LEFT_PAREN expression RIGHT_PAREN selection_rest_statement { - parseContext.boolCheck($1.loc, $3); - $$ = parseContext.intermediate.addSelection($3, $5, $1.loc); - } - ; - -selection_rest_statement - : statement_scoped ELSE statement_scoped { - $$.node1 = $1; - $$.node2 = $3; - } - | statement_scoped { - $$.node1 = $1; - $$.node2 = 0; - } - ; - -condition - // In 1996 c++ draft, conditions can include single declarations - : expression { - $$ = $1; - parseContext.boolCheck($1->getLoc(), $1); - } - | fully_specified_type IDENTIFIER EQUAL initializer { - parseContext.boolCheck($2.loc, $1); - - TType type($1); - TIntermNode* initNode = parseContext.declareVariable($2.loc, *$2.string, $1, 0, $4); - if (initNode) - $$ = initNode->getAsTyped(); - else - $$ = 0; - } - ; - -switch_statement - : switch_statement_nonattributed { - $$ = $1; - } -GLSLANG_WEB_EXCLUDE_ON - | attribute switch_statement_nonattributed { - parseContext.requireExtensions($2->getLoc(), 1, &E_GL_EXT_control_flow_attributes, "attribute"); - parseContext.handleSwitchAttributes(*$1, $2); - $$ = $2; - } -GLSLANG_WEB_EXCLUDE_OFF - -switch_statement_nonattributed - : SWITCH LEFT_PAREN expression RIGHT_PAREN { - // start new switch sequence on the switch stack - ++parseContext.controlFlowNestingLevel; - ++parseContext.statementNestingLevel; - parseContext.switchSequenceStack.push_back(new TIntermSequence); - parseContext.switchLevel.push_back(parseContext.statementNestingLevel); - parseContext.symbolTable.push(); - } - LEFT_BRACE switch_statement_list RIGHT_BRACE { - $$ = parseContext.addSwitch($1.loc, $3, $7 ? $7->getAsAggregate() : 0); - delete parseContext.switchSequenceStack.back(); - parseContext.switchSequenceStack.pop_back(); - parseContext.switchLevel.pop_back(); - parseContext.symbolTable.pop(&parseContext.defaultPrecision[0]); - --parseContext.statementNestingLevel; - --parseContext.controlFlowNestingLevel; - } - ; - -switch_statement_list - : /* nothing */ { - $$ = 0; - } - | statement_list { - $$ = $1; - } - ; - -case_label - : CASE expression COLON { - $$ = 0; - if (parseContext.switchLevel.size() == 0) - parseContext.error($1.loc, "cannot appear outside switch statement", "case", ""); - else if (parseContext.switchLevel.back() != parseContext.statementNestingLevel) - parseContext.error($1.loc, "cannot be nested inside control flow", "case", ""); - else { - parseContext.constantValueCheck($2, "case"); - parseContext.integerCheck($2, "case"); - $$ = parseContext.intermediate.addBranch(EOpCase, $2, $1.loc); - } - } - | DEFAULT COLON { - $$ = 0; - if (parseContext.switchLevel.size() == 0) - parseContext.error($1.loc, "cannot appear outside switch statement", "default", ""); - else if (parseContext.switchLevel.back() != parseContext.statementNestingLevel) - parseContext.error($1.loc, "cannot be nested inside control flow", "default", ""); - else - $$ = parseContext.intermediate.addBranch(EOpDefault, $1.loc); - } - ; - -iteration_statement - : iteration_statement_nonattributed { - $$ = $1; - } -GLSLANG_WEB_EXCLUDE_ON - | attribute iteration_statement_nonattributed { - parseContext.requireExtensions($2->getLoc(), 1, &E_GL_EXT_control_flow_attributes, "attribute"); - parseContext.handleLoopAttributes(*$1, $2); - $$ = $2; - } -GLSLANG_WEB_EXCLUDE_OFF - -iteration_statement_nonattributed - : WHILE LEFT_PAREN { - if (! parseContext.limits.whileLoops) - parseContext.error($1.loc, "while loops not available", "limitation", ""); - parseContext.symbolTable.push(); - ++parseContext.loopNestingLevel; - ++parseContext.statementNestingLevel; - ++parseContext.controlFlowNestingLevel; - } - condition RIGHT_PAREN statement_no_new_scope { - parseContext.symbolTable.pop(&parseContext.defaultPrecision[0]); - $$ = parseContext.intermediate.addLoop($6, $4, 0, true, $1.loc); - --parseContext.loopNestingLevel; - --parseContext.statementNestingLevel; - --parseContext.controlFlowNestingLevel; - } - | DO { - parseContext.symbolTable.push(); - ++parseContext.loopNestingLevel; - ++parseContext.statementNestingLevel; - ++parseContext.controlFlowNestingLevel; - } - statement WHILE LEFT_PAREN expression RIGHT_PAREN SEMICOLON { - if (! parseContext.limits.whileLoops) - parseContext.error($1.loc, "do-while loops not available", "limitation", ""); - - parseContext.boolCheck($8.loc, $6); - - $$ = parseContext.intermediate.addLoop($3, $6, 0, false, $4.loc); - parseContext.symbolTable.pop(&parseContext.defaultPrecision[0]); - --parseContext.loopNestingLevel; - --parseContext.statementNestingLevel; - --parseContext.controlFlowNestingLevel; - } - | FOR LEFT_PAREN { - parseContext.symbolTable.push(); - ++parseContext.loopNestingLevel; - ++parseContext.statementNestingLevel; - ++parseContext.controlFlowNestingLevel; - } - for_init_statement for_rest_statement RIGHT_PAREN statement_no_new_scope { - parseContext.symbolTable.pop(&parseContext.defaultPrecision[0]); - $$ = parseContext.intermediate.makeAggregate($4, $2.loc); - TIntermLoop* forLoop = parseContext.intermediate.addLoop($7, reinterpret_cast($5.node1), reinterpret_cast($5.node2), true, $1.loc); - if (! parseContext.limits.nonInductiveForLoops) - parseContext.inductiveLoopCheck($1.loc, $4, forLoop); - $$ = parseContext.intermediate.growAggregate($$, forLoop, $1.loc); - $$->getAsAggregate()->setOperator(EOpSequence); - --parseContext.loopNestingLevel; - --parseContext.statementNestingLevel; - --parseContext.controlFlowNestingLevel; - } - ; - -for_init_statement - : expression_statement { - $$ = $1; - } - | declaration_statement { - $$ = $1; - } - ; - -conditionopt - : condition { - $$ = $1; - } - | /* May be null */ { - $$ = 0; - } - ; - -for_rest_statement - : conditionopt SEMICOLON { - $$.node1 = $1; - $$.node2 = 0; - } - | conditionopt SEMICOLON expression { - $$.node1 = $1; - $$.node2 = $3; - } - ; - -jump_statement - : CONTINUE SEMICOLON { - if (parseContext.loopNestingLevel <= 0) - parseContext.error($1.loc, "continue statement only allowed in loops", "", ""); - $$ = parseContext.intermediate.addBranch(EOpContinue, $1.loc); - } - | BREAK SEMICOLON { - if (parseContext.loopNestingLevel + parseContext.switchSequenceStack.size() <= 0) - parseContext.error($1.loc, "break statement only allowed in switch and loops", "", ""); - $$ = parseContext.intermediate.addBranch(EOpBreak, $1.loc); - } - | RETURN SEMICOLON { - $$ = parseContext.intermediate.addBranch(EOpReturn, $1.loc); - if (parseContext.currentFunctionType->getBasicType() != EbtVoid) - parseContext.error($1.loc, "non-void function must return a value", "return", ""); - if (parseContext.inMain) - parseContext.postEntryPointReturn = true; - } - | RETURN expression SEMICOLON { - $$ = parseContext.handleReturnValue($1.loc, $2); - } - | DISCARD SEMICOLON { - parseContext.requireStage($1.loc, EShLangFragment, "discard"); - $$ = parseContext.intermediate.addBranch(EOpKill, $1.loc); - } - | TERMINATE_INVOCATION SEMICOLON { - parseContext.requireStage($1.loc, EShLangFragment, "terminateInvocation"); - $$ = parseContext.intermediate.addBranch(EOpTerminateInvocation, $1.loc); - } -GLSLANG_WEB_EXCLUDE_ON - | TERMINATE_RAY SEMICOLON { - parseContext.requireStage($1.loc, EShLangAnyHit, "terminateRayEXT"); - $$ = parseContext.intermediate.addBranch(EOpTerminateRayKHR, $1.loc); - } - | IGNORE_INTERSECTION SEMICOLON { - parseContext.requireStage($1.loc, EShLangAnyHit, "ignoreIntersectionEXT"); - $$ = parseContext.intermediate.addBranch(EOpIgnoreIntersectionKHR, $1.loc); - } -GLSLANG_WEB_EXCLUDE_OFF - ; - -// Grammar Note: No 'goto'. Gotos are not supported. - -translation_unit - : external_declaration { - $$ = $1; - parseContext.intermediate.setTreeRoot($$); - } - | translation_unit external_declaration { - if ($2 != nullptr) { - $$ = parseContext.intermediate.growAggregate($1, $2); - parseContext.intermediate.setTreeRoot($$); - } - } - ; - -external_declaration - : function_definition { - $$ = $1; - } - | declaration { - $$ = $1; - } -GLSLANG_WEB_EXCLUDE_ON - | SEMICOLON { - parseContext.requireProfile($1.loc, ~EEsProfile, "extraneous semicolon"); - parseContext.profileRequires($1.loc, ~EEsProfile, 460, nullptr, "extraneous semicolon"); - $$ = nullptr; - } -GLSLANG_WEB_EXCLUDE_OFF - ; - -function_definition - : function_prototype { - $1.function = parseContext.handleFunctionDeclarator($1.loc, *$1.function, false /* not prototype */); - $1.intermNode = parseContext.handleFunctionDefinition($1.loc, *$1.function); - - // For ES 100 only, according to ES shading language 100 spec: A function - // body has a scope nested inside the function's definition. - if (parseContext.profile == EEsProfile && parseContext.version == 100) - { - parseContext.symbolTable.push(); - ++parseContext.statementNestingLevel; - } - } - compound_statement_no_new_scope { - // May be best done as post process phase on intermediate code - if (parseContext.currentFunctionType->getBasicType() != EbtVoid && ! parseContext.functionReturnsValue) - parseContext.error($1.loc, "function does not return a value:", "", $1.function->getName().c_str()); - parseContext.symbolTable.pop(&parseContext.defaultPrecision[0]); - $$ = parseContext.intermediate.growAggregate($1.intermNode, $3); - parseContext.intermediate.setAggregateOperator($$, EOpFunction, $1.function->getType(), $1.loc); - $$->getAsAggregate()->setName($1.function->getMangledName().c_str()); - - // store the pragma information for debug and optimize and other vendor specific - // information. This information can be queried from the parse tree - $$->getAsAggregate()->setOptimize(parseContext.contextPragma.optimize); - $$->getAsAggregate()->setDebug(parseContext.contextPragma.debug); - $$->getAsAggregate()->setPragmaTable(parseContext.contextPragma.pragmaTable); - - // Set currentFunctionType to empty pointer when goes outside of the function - parseContext.currentFunctionType = nullptr; - - // For ES 100 only, according to ES shading language 100 spec: A function - // body has a scope nested inside the function's definition. - if (parseContext.profile == EEsProfile && parseContext.version == 100) - { - parseContext.symbolTable.pop(&parseContext.defaultPrecision[0]); - --parseContext.statementNestingLevel; - } - } - ; - -GLSLANG_WEB_EXCLUDE_ON -attribute - : LEFT_BRACKET LEFT_BRACKET attribute_list RIGHT_BRACKET RIGHT_BRACKET { - $$ = $3; - } - -attribute_list - : single_attribute { - $$ = $1; - } - | attribute_list COMMA single_attribute { - $$ = parseContext.mergeAttributes($1, $3); - } - -single_attribute - : IDENTIFIER { - $$ = parseContext.makeAttributes(*$1.string); - } - | IDENTIFIER LEFT_PAREN constant_expression RIGHT_PAREN { - $$ = parseContext.makeAttributes(*$1.string, $3); - } -GLSLANG_WEB_EXCLUDE_OFF - -GLSLANG_WEB_EXCLUDE_ON -spirv_requirements_list - : spirv_requirements_parameter { - $$ = $1; - } - | spirv_requirements_list COMMA spirv_requirements_parameter { - $$ = parseContext.mergeSpirvRequirements($2.loc, $1, $3); - } - -spirv_requirements_parameter - : IDENTIFIER EQUAL LEFT_BRACKET spirv_extension_list RIGHT_BRACKET { - $$ = parseContext.makeSpirvRequirement($2.loc, *$1.string, $4->getAsAggregate(), nullptr); - } - | IDENTIFIER EQUAL LEFT_BRACKET spirv_capability_list RIGHT_BRACKET { - $$ = parseContext.makeSpirvRequirement($2.loc, *$1.string, nullptr, $4->getAsAggregate()); - } - -spirv_extension_list - : STRING_LITERAL { - $$ = parseContext.intermediate.makeAggregate(parseContext.intermediate.addConstantUnion($1.string, $1.loc, true)); - } - | spirv_extension_list COMMA STRING_LITERAL { - $$ = parseContext.intermediate.growAggregate($1, parseContext.intermediate.addConstantUnion($3.string, $3.loc, true)); - } - -spirv_capability_list - : INTCONSTANT { - $$ = parseContext.intermediate.makeAggregate(parseContext.intermediate.addConstantUnion($1.i, $1.loc, true)); - } - | spirv_capability_list COMMA INTCONSTANT { - $$ = parseContext.intermediate.growAggregate($1, parseContext.intermediate.addConstantUnion($3.i, $3.loc, true)); - } - -spirv_execution_mode_qualifier - : SPIRV_EXECUTION_MODE LEFT_PAREN INTCONSTANT RIGHT_PAREN { - parseContext.intermediate.insertSpirvExecutionMode($3.i); - $$ = 0; - } - | SPIRV_EXECUTION_MODE LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT RIGHT_PAREN { - parseContext.intermediate.insertSpirvRequirement($3); - parseContext.intermediate.insertSpirvExecutionMode($5.i); - $$ = 0; - } - | SPIRV_EXECUTION_MODE LEFT_PAREN INTCONSTANT COMMA spirv_execution_mode_parameter_list RIGHT_PAREN { - parseContext.intermediate.insertSpirvExecutionMode($3.i, $5->getAsAggregate()); - $$ = 0; - } - | SPIRV_EXECUTION_MODE LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT COMMA spirv_execution_mode_parameter_list RIGHT_PAREN { - parseContext.intermediate.insertSpirvRequirement($3); - parseContext.intermediate.insertSpirvExecutionMode($5.i, $7->getAsAggregate()); - $$ = 0; - } - | SPIRV_EXECUTION_MODE_ID LEFT_PAREN INTCONSTANT COMMA spirv_execution_mode_id_parameter_list RIGHT_PAREN { - parseContext.intermediate.insertSpirvExecutionModeId($3.i, $5->getAsAggregate()); - $$ = 0; - } - | SPIRV_EXECUTION_MODE_ID LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT COMMA spirv_execution_mode_id_parameter_list RIGHT_PAREN { - parseContext.intermediate.insertSpirvRequirement($3); - parseContext.intermediate.insertSpirvExecutionModeId($5.i, $7->getAsAggregate()); - $$ = 0; - } - -spirv_execution_mode_parameter_list - : spirv_execution_mode_parameter { - $$ = parseContext.intermediate.makeAggregate($1); - } - | spirv_execution_mode_parameter_list COMMA spirv_execution_mode_parameter { - $$ = parseContext.intermediate.growAggregate($1, $3); - } - -spirv_execution_mode_parameter - : FLOATCONSTANT { - $$ = parseContext.intermediate.addConstantUnion($1.d, EbtFloat, $1.loc, true); - } - | INTCONSTANT { - $$ = parseContext.intermediate.addConstantUnion($1.i, $1.loc, true); - } - | UINTCONSTANT { - $$ = parseContext.intermediate.addConstantUnion($1.u, $1.loc, true); - } - | BOOLCONSTANT { - $$ = parseContext.intermediate.addConstantUnion($1.b, $1.loc, true); - } - | STRING_LITERAL { - $$ = parseContext.intermediate.addConstantUnion($1.string, $1.loc, true); - } - -spirv_execution_mode_id_parameter_list - : constant_expression { - if ($1->getBasicType() != EbtFloat && - $1->getBasicType() != EbtInt && - $1->getBasicType() != EbtUint && - $1->getBasicType() != EbtBool && - $1->getBasicType() != EbtString) - parseContext.error($1->getLoc(), "this type not allowed", $1->getType().getBasicString(), ""); - $$ = parseContext.intermediate.makeAggregate($1); - } - | spirv_execution_mode_id_parameter_list COMMA constant_expression { - if ($3->getBasicType() != EbtFloat && - $3->getBasicType() != EbtInt && - $3->getBasicType() != EbtUint && - $3->getBasicType() != EbtBool && - $3->getBasicType() != EbtString) - parseContext.error($3->getLoc(), "this type not allowed", $3->getType().getBasicString(), ""); - $$ = parseContext.intermediate.growAggregate($1, $3); - } - -spirv_storage_class_qualifier - : SPIRV_STORAGE_CLASS LEFT_PAREN INTCONSTANT RIGHT_PAREN { - $$.init($1.loc); - $$.qualifier.storage = EvqSpirvStorageClass; - $$.qualifier.spirvStorageClass = $3.i; - } - | SPIRV_STORAGE_CLASS LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT RIGHT_PAREN { - $$.init($1.loc); - parseContext.intermediate.insertSpirvRequirement($3); - $$.qualifier.storage = EvqSpirvStorageClass; - $$.qualifier.spirvStorageClass = $5.i; - } - -spirv_decorate_qualifier - : SPIRV_DECORATE LEFT_PAREN INTCONSTANT RIGHT_PAREN{ - $$.init($1.loc); - $$.qualifier.setSpirvDecorate($3.i); - } - | SPIRV_DECORATE LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT RIGHT_PAREN{ - $$.init($1.loc); - parseContext.intermediate.insertSpirvRequirement($3); - $$.qualifier.setSpirvDecorate($5.i); - } - | SPIRV_DECORATE LEFT_PAREN INTCONSTANT COMMA spirv_decorate_parameter_list RIGHT_PAREN { - $$.init($1.loc); - $$.qualifier.setSpirvDecorate($3.i, $5->getAsAggregate()); - } - | SPIRV_DECORATE LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT COMMA spirv_decorate_parameter_list RIGHT_PAREN { - $$.init($1.loc); - parseContext.intermediate.insertSpirvRequirement($3); - $$.qualifier.setSpirvDecorate($5.i, $7->getAsAggregate()); - } - | SPIRV_DECORATE_ID LEFT_PAREN INTCONSTANT COMMA spirv_decorate_id_parameter_list RIGHT_PAREN { - $$.init($1.loc); - $$.qualifier.setSpirvDecorateId($3.i, $5->getAsAggregate()); - } - | SPIRV_DECORATE_ID LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT COMMA spirv_decorate_id_parameter_list RIGHT_PAREN { - $$.init($1.loc); - parseContext.intermediate.insertSpirvRequirement($3); - $$.qualifier.setSpirvDecorateId($5.i, $7->getAsAggregate()); - } - | SPIRV_DECORATE_STRING LEFT_PAREN INTCONSTANT COMMA spirv_decorate_string_parameter_list RIGHT_PAREN { - $$.init($1.loc); - $$.qualifier.setSpirvDecorateString($3.i, $5->getAsAggregate()); - } - | SPIRV_DECORATE_STRING LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT COMMA spirv_decorate_string_parameter_list RIGHT_PAREN { - $$.init($1.loc); - parseContext.intermediate.insertSpirvRequirement($3); - $$.qualifier.setSpirvDecorateString($5.i, $7->getAsAggregate()); - } - -spirv_decorate_parameter_list - : spirv_decorate_parameter { - $$ = parseContext.intermediate.makeAggregate($1); - } - | spirv_decorate_parameter_list COMMA spirv_decorate_parameter { - $$ = parseContext.intermediate.growAggregate($1, $3); - } - -spirv_decorate_parameter - : FLOATCONSTANT { - $$ = parseContext.intermediate.addConstantUnion($1.d, EbtFloat, $1.loc, true); - } - | INTCONSTANT { - $$ = parseContext.intermediate.addConstantUnion($1.i, $1.loc, true); - } - | UINTCONSTANT { - $$ = parseContext.intermediate.addConstantUnion($1.u, $1.loc, true); - } - | BOOLCONSTANT { - $$ = parseContext.intermediate.addConstantUnion($1.b, $1.loc, true); - } - -spirv_decorate_id_parameter_list - : constant_expression { - if ($1->getBasicType() != EbtFloat && - $1->getBasicType() != EbtInt && - $1->getBasicType() != EbtUint && - $1->getBasicType() != EbtBool) - parseContext.error($1->getLoc(), "this type not allowed", $1->getType().getBasicString(), ""); - $$ = parseContext.intermediate.makeAggregate($1); - } - | spirv_decorate_id_parameter_list COMMA constant_expression { - if ($3->getBasicType() != EbtFloat && - $3->getBasicType() != EbtInt && - $3->getBasicType() != EbtUint && - $3->getBasicType() != EbtBool) - parseContext.error($3->getLoc(), "this type not allowed", $3->getType().getBasicString(), ""); - $$ = parseContext.intermediate.growAggregate($1, $3); - } - -spirv_decorate_string_parameter_list - : STRING_LITERAL { - $$ = parseContext.intermediate.makeAggregate( - parseContext.intermediate.addConstantUnion($1.string, $1.loc, true)); - } - | spirv_decorate_string_parameter_list COMMA STRING_LITERAL { - $$ = parseContext.intermediate.growAggregate($1, parseContext.intermediate.addConstantUnion($3.string, $3.loc, true)); - } - -spirv_type_specifier - : SPIRV_TYPE LEFT_PAREN spirv_instruction_qualifier_list COMMA spirv_type_parameter_list RIGHT_PAREN { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.setSpirvType(*$3, $5); - } - | SPIRV_TYPE LEFT_PAREN spirv_requirements_list COMMA spirv_instruction_qualifier_list COMMA spirv_type_parameter_list RIGHT_PAREN { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - parseContext.intermediate.insertSpirvRequirement($3); - $$.setSpirvType(*$5, $7); - } - | SPIRV_TYPE LEFT_PAREN spirv_instruction_qualifier_list RIGHT_PAREN { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.setSpirvType(*$3); - } - | SPIRV_TYPE LEFT_PAREN spirv_requirements_list COMMA spirv_instruction_qualifier_list RIGHT_PAREN { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - parseContext.intermediate.insertSpirvRequirement($3); - $$.setSpirvType(*$5); - } - -spirv_type_parameter_list - : spirv_type_parameter { - $$ = $1; - } - | spirv_type_parameter_list COMMA spirv_type_parameter { - $$ = parseContext.mergeSpirvTypeParameters($1, $3); - } - -spirv_type_parameter - : constant_expression { - $$ = parseContext.makeSpirvTypeParameters($1->getLoc(), $1->getAsConstantUnion()); - } - -spirv_instruction_qualifier - : SPIRV_INSTRUCTION LEFT_PAREN spirv_instruction_qualifier_list RIGHT_PAREN { - $$ = $3; - } - | SPIRV_INSTRUCTION LEFT_PAREN spirv_requirements_list COMMA spirv_instruction_qualifier_list RIGHT_PAREN { - parseContext.intermediate.insertSpirvRequirement($3); - $$ = $5; - } - -spirv_instruction_qualifier_list - : spirv_instruction_qualifier_id { - $$ = $1; - } - | spirv_instruction_qualifier_list COMMA spirv_instruction_qualifier_id { - $$ = parseContext.mergeSpirvInstruction($2.loc, $1, $3); - } - -spirv_instruction_qualifier_id - : IDENTIFIER EQUAL STRING_LITERAL { - $$ = parseContext.makeSpirvInstruction($2.loc, *$1.string, *$3.string); - } - | IDENTIFIER EQUAL INTCONSTANT { - $$ = parseContext.makeSpirvInstruction($2.loc, *$1.string, $3.i); - } -GLSLANG_WEB_EXCLUDE_OFF - -%% diff --git a/glslang/MachineIndependent/glslang.y b/glslang/MachineIndependent/glslang.y index 35242f21..167cdca0 100755 --- a/glslang/MachineIndependent/glslang.y +++ b/glslang/MachineIndependent/glslang.y @@ -37,31 +37,6 @@ // POSSIBILITY OF SUCH DAMAGE. // -// -// Do not edit the .y file, only edit the .m4 file. -// The .y bison file is not a source file, it is a derivative of the .m4 file. -// The m4 file needs to be processed by m4 to generate the .y bison file. -// -// Code sandwiched between a pair: -// -// GLSLANG_WEB_EXCLUDE_ON -// ... -// ... -// ... -// GLSLANG_WEB_EXCLUDE_OFF -// -// Will be excluded from the grammar when m4 is executed as: -// -// m4 -P -DGLSLANG_WEB -// -// It will be included when m4 is executed as: -// -// m4 -P -// - - - - /** * This is bison grammar and productions for parsing all versions of the * GLSL shading languages. @@ -129,19 +104,12 @@ using namespace glslang; glslang::TArraySizes* arraySizes; glslang::TIdentifierList* identifierList; }; - glslang::TArraySizes* typeParameters; + glslang::TTypeParameters* typeParameters; } interm; } %{ -/* windows only pragma */ -#ifdef _MSC_VER - #pragma warning(disable : 4065) - #pragma warning(disable : 4127) - #pragma warning(disable : 4244) -#endif - #define parseContext (*pParseContext) #define yyerror(context, msg) context->parserError(msg) @@ -151,7 +119,7 @@ extern int yylex(YYSTYPE*, TParseContext&); %parse-param {glslang::TParseContext* pParseContext} %lex-param {parseContext} -%define api.pure // enable thread safety +%pure-parser // enable thread safety %expect 1 // One shift reduce conflict because of if | else %token CONST BOOL INT UINT FLOAT @@ -177,8 +145,6 @@ extern int yylex(YYSTYPE*, TParseContext&); %token ITEXTURE2D ITEXTURE3D ITEXTURECUBE ITEXTURE2DARRAY %token UTEXTURE2D UTEXTURE3D UTEXTURECUBE UTEXTURE2DARRAY - - %token ATTRIBUTE VARYING %token FLOAT16_T FLOAT32_T DOUBLE FLOAT64_T %token INT64_T UINT64_T INT32_T UINT32_T INT16_T UINT16_T INT8_T UINT8_T @@ -211,6 +177,8 @@ extern int yylex(YYSTYPE*, TParseContext&); %token ACCSTRUCTEXT %token RAYQUERYEXT %token FCOOPMATNV ICOOPMATNV UCOOPMATNV +%token COOPMAT +%token HITOBJECTNV HITOBJECTATTRNV // combined image/sampler %token SAMPLERCUBEARRAY SAMPLERCUBEARRAYSHADOW @@ -278,8 +246,7 @@ extern int yylex(YYSTYPE*, TParseContext&); %token SPIRV_INSTRUCTION SPIRV_EXECUTION_MODE SPIRV_EXECUTION_MODE_ID %token SPIRV_DECORATE SPIRV_DECORATE_ID SPIRV_DECORATE_STRING %token SPIRV_TYPE SPIRV_STORAGE_CLASS SPIRV_BY_REFERENCE SPIRV_LITERAL - - +%token ATTACHMENTEXT IATTACHMENTEXT UATTACHMENTEXT %token LEFT_OP RIGHT_OP %token INC_OP DEC_OP LE_OP GE_OP EQ_OP NE_OP @@ -303,14 +270,13 @@ extern int yylex(YYSTYPE*, TParseContext&); %token BREAK CONTINUE DO ELSE FOR IF DISCARD RETURN SWITCH CASE DEFAULT %token TERMINATE_INVOCATION %token TERMINATE_RAY IGNORE_INTERSECTION -%token UNIFORM SHARED BUFFER +%token UNIFORM SHARED BUFFER TILEIMAGEEXT %token FLAT SMOOTH LAYOUT - %token DOUBLECONSTANT INT16CONSTANT UINT16CONSTANT FLOAT16CONSTANT INT32CONSTANT UINT32CONSTANT %token INT64CONSTANT UINT64CONSTANT %token SUBROUTINE DEMOTE -%token PAYLOADNV PAYLOADINNV HITATTRNV CALLDATANV CALLDATAINNV +%token PAYLOADNV PAYLOADINNV HITATTRNV CALLDATANV CALLDATAINNV %token PAYLOADEXT PAYLOADINEXT HITATTREXT CALLDATAEXT CALLDATAINEXT %token PATCH SAMPLE NONUNIFORM %token COHERENT VOLATILE RESTRICT READONLY WRITEONLY DEVICECOHERENT QUEUEFAMILYCOHERENT WORKGROUPCOHERENT @@ -318,7 +284,6 @@ extern int yylex(YYSTYPE*, TParseContext&); %token NOPERSPECTIVE EXPLICITINTERPAMD PERVERTEXEXT PERVERTEXNV PERPRIMITIVENV PERVIEWNV PERTASKNV PERPRIMITIVEEXT TASKPAYLOADWORKGROUPEXT %token PRECISE - %type assignment_operator unary_operator %type variable_identifier primary_expression postfix_expression %type expression integer_expression assignment_expression @@ -364,7 +329,6 @@ extern int yylex(YYSTYPE*, TParseContext&); %type identifier_list - %type precise_qualifier non_uniform_qualifier %type type_name_list %type attribute attribute_list single_attribute @@ -377,14 +341,13 @@ extern int yylex(YYSTYPE*, TParseContext&); %type spirv_storage_class_qualifier %type spirv_decorate_qualifier %type spirv_decorate_parameter_list spirv_decorate_parameter -%type spirv_decorate_id_parameter_list +%type spirv_decorate_id_parameter_list spirv_decorate_id_parameter %type spirv_decorate_string_parameter_list %type spirv_type_specifier %type spirv_type_parameter_list spirv_type_parameter %type spirv_instruction_qualifier %type spirv_instruction_qualifier_list spirv_instruction_qualifier_id - %start translation_unit %% @@ -416,7 +379,6 @@ primary_expression | BOOLCONSTANT { $$ = parseContext.intermediate.addConstantUnion($1.b, $1.loc, true); } - | STRING_LITERAL { $$ = parseContext.intermediate.addConstantUnion($1.string, $1.loc, true); } @@ -454,7 +416,6 @@ primary_expression parseContext.float16Check($1.loc, "half float literal"); $$ = parseContext.intermediate.addConstantUnion($1.d, EbtFloat16, $1.loc, true); } - ; postfix_expression @@ -524,18 +485,41 @@ function_call_header_no_parameters function_call_header_with_parameters : function_call_header assignment_expression { - TParameter param = { 0, new TType }; - param.type->shallowCopy($2->getType()); - $1.function->addParameter(param); - $$.function = $1.function; - $$.intermNode = $2; + if (parseContext.spvVersion.vulkan > 0 + && parseContext.spvVersion.vulkanRelaxed + && $2->getType().containsOpaque()) + { + $$.intermNode = parseContext.vkRelaxedRemapFunctionArgument($$.loc, $1.function, $2); + $$.function = $1.function; + } + else + { + TParameter param = { 0, new TType }; + param.type->shallowCopy($2->getType()); + + $1.function->addParameter(param); + $$.function = $1.function; + $$.intermNode = $2; + } } | function_call_header_with_parameters COMMA assignment_expression { - TParameter param = { 0, new TType }; - param.type->shallowCopy($3->getType()); - $1.function->addParameter(param); - $$.function = $1.function; - $$.intermNode = parseContext.intermediate.growAggregate($1.intermNode, $3, $2.loc); + if (parseContext.spvVersion.vulkan > 0 + && parseContext.spvVersion.vulkanRelaxed + && $3->getType().containsOpaque()) + { + TIntermNode* remappedNode = parseContext.vkRelaxedRemapFunctionArgument($2.loc, $1.function, $3); + $$.intermNode = parseContext.intermediate.mergeAggregate($1.intermNode, remappedNode, $2.loc); + $$.function = $1.function; + } + else + { + TParameter param = { 0, new TType }; + param.type->shallowCopy($3->getType()); + + $1.function->addParameter(param); + $$.function = $1.function; + $$.intermNode = parseContext.intermediate.growAggregate($1.intermNode, $3, $2.loc); + } } ; @@ -580,13 +564,11 @@ function_identifier $$.function = new TFunction(empty, TType(EbtVoid), EOpNull); } } - | non_uniform_qualifier { // Constructor $$.intermNode = 0; $$.function = parseContext.handleConstructorCall($1.loc, $1); } - ; unary_expression @@ -896,7 +878,6 @@ declaration $$ = 0; // TODO: 4.0 functionality: subroutines: make the identifier a user type for this signature } - | spirv_instruction_qualifier function_prototype SEMICOLON { parseContext.requireExtensions($2.loc, 1, &E_GL_EXT_spirv_intrinsics, "SPIR-V instruction qualifier"); $2.function->setSpirvInstruction(*$1); // Attach SPIR-V intruction qualifier @@ -909,7 +890,6 @@ declaration parseContext.requireExtensions($2.loc, 1, &E_GL_EXT_spirv_intrinsics, "SPIR-V execution mode qualifier"); $$ = 0; } - | init_declarator_list SEMICOLON { if ($1.intermNode && $1.intermNode->getAsAggregate()) $1.intermNode->getAsAggregate()->setOperator(EOpSequence); @@ -977,24 +957,25 @@ identifier_list function_prototype : function_declarator RIGHT_PAREN { $$.function = $1; + if (parseContext.compileOnly) $$.function->setExport(); $$.loc = $2.loc; } | function_declarator RIGHT_PAREN attribute { $$.function = $1; + if (parseContext.compileOnly) $$.function->setExport(); $$.loc = $2.loc; - parseContext.requireExtensions($2.loc, 1, &E_GL_EXT_subgroup_uniform_control_flow, "attribute"); parseContext.handleFunctionAttributes($2.loc, *$3); } | attribute function_declarator RIGHT_PAREN { $$.function = $2; + if (parseContext.compileOnly) $$.function->setExport(); $$.loc = $3.loc; - parseContext.requireExtensions($3.loc, 1, &E_GL_EXT_subgroup_uniform_control_flow, "attribute"); parseContext.handleFunctionAttributes($3.loc, *$1); } | attribute function_declarator RIGHT_PAREN attribute { $$.function = $2; + if (parseContext.compileOnly) $$.function->setExport(); $$.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); } @@ -1015,7 +996,12 @@ function_header_with_parameters // Add the parameter $$ = $1; if ($2.param.type->getBasicType() != EbtVoid) - $1->addParameter($2.param); + { + if (!(parseContext.spvVersion.vulkan > 0 && parseContext.spvVersion.vulkanRelaxed)) + $1->addParameter($2.param); + else + parseContext.vkRelaxedRemapFunctionParameter($1, $2.param); + } else delete $2.param.type; } @@ -1033,7 +1019,10 @@ function_header_with_parameters } else { // Add the parameter $$ = $1; - $1->addParameter($3.param); + if (!(parseContext.spvVersion.vulkan > 0 && parseContext.spvVersion.vulkanRelaxed)) + $1->addParameter($3.param); + else + parseContext.vkRelaxedRemapFunctionParameter($1, $3.param); } } ; @@ -1106,7 +1095,7 @@ parameter_declaration $$ = $2; if ($1.qualifier.precision != EpqNone) $$.param.type->getQualifier().precision = $1.qualifier.precision; - parseContext.precisionQualifierCheck($$.loc, $$.param.type->getBasicType(), $$.param.type->getQualifier()); + parseContext.precisionQualifierCheck($$.loc, $$.param.type->getBasicType(), $$.param.type->getQualifier(), $$.param.type->isCoopMat()); parseContext.checkNoShaderLayouts($1.loc, $1.shaderQualifiers); parseContext.parameterTypeCheck($2.loc, $1.qualifier.storage, *$$.param.type); @@ -1118,7 +1107,7 @@ parameter_declaration parseContext.parameterTypeCheck($1.loc, EvqIn, *$1.param.type); parseContext.paramCheckFixStorage($1.loc, EvqTemporary, *$$.param.type); - parseContext.precisionQualifierCheck($$.loc, $$.param.type->getBasicType(), $$.param.type->getQualifier()); + parseContext.precisionQualifierCheck($$.loc, $$.param.type->getBasicType(), $$.param.type->getQualifier(), $$.param.type->isCoopMat()); } // // Without name @@ -1127,7 +1116,7 @@ parameter_declaration $$ = $2; if ($1.qualifier.precision != EpqNone) $$.param.type->getQualifier().precision = $1.qualifier.precision; - parseContext.precisionQualifierCheck($1.loc, $$.param.type->getBasicType(), $$.param.type->getQualifier()); + parseContext.precisionQualifierCheck($1.loc, $$.param.type->getBasicType(), $$.param.type->getQualifier(), $$.param.type->isCoopMat()); parseContext.checkNoShaderLayouts($1.loc, $1.shaderQualifiers); parseContext.parameterTypeCheck($2.loc, $1.qualifier.storage, *$$.param.type); @@ -1138,7 +1127,7 @@ parameter_declaration parseContext.parameterTypeCheck($1.loc, EvqIn, *$1.param.type); parseContext.paramCheckFixStorage($1.loc, EvqTemporary, *$$.param.type); - parseContext.precisionQualifierCheck($$.loc, $$.param.type->getBasicType(), $$.param.type->getQualifier()); + parseContext.precisionQualifierCheck($$.loc, $$.param.type->getBasicType(), $$.param.type->getQualifier(), $$.param.type->isCoopMat()); } ; @@ -1179,9 +1168,7 @@ single_declaration : fully_specified_type { $$.type = $1; $$.intermNode = 0; - parseContext.declareTypeDefaults($$.loc, $$.type); - } | fully_specified_type IDENTIFIER { $$.type = $1; @@ -1215,10 +1202,10 @@ fully_specified_type parseContext.profileRequires($1.loc, ENoProfile, 120, E_GL_3DL_array_objects, "arrayed type"); parseContext.profileRequires($1.loc, EEsProfile, 300, 0, "arrayed type"); } - parseContext.precisionQualifierCheck($$.loc, $$.basicType, $$.qualifier); + parseContext.precisionQualifierCheck($$.loc, $$.basicType, $$.qualifier, $$.isCoopmat()); } | type_qualifier type_specifier { - parseContext.globalQualifierFixCheck($1.loc, $1.qualifier); + parseContext.globalQualifierFixCheck($1.loc, $1.qualifier, false, &$2); parseContext.globalQualifierTypeCheck($1.loc, $1.qualifier, $2); if ($2.arraySizes) { @@ -1232,7 +1219,7 @@ fully_specified_type parseContext.checkNoShaderLayouts($2.loc, $1.shaderQualifiers); $2.shaderQualifiers.merge($1.shaderQualifiers); parseContext.mergeQualifiers($2.loc, $2.qualifier, $1.qualifier, true); - parseContext.precisionQualifierCheck($2.loc, $2.basicType, $2.qualifier); + parseContext.precisionQualifierCheck($2.loc, $2.basicType, $2.qualifier, $2.isCoopmat()); $$ = $2; @@ -1267,7 +1254,6 @@ interpolation_qualifier $$.init($1.loc); $$.qualifier.flat = true; } - | NOPERSPECTIVE { parseContext.globalCheck($1.loc, "noperspective"); parseContext.profileRequires($1.loc, EEsProfile, 0, E_GL_NV_shader_noperspective_interpolation, "noperspective"); @@ -1332,7 +1318,6 @@ interpolation_qualifier $$.init($1.loc); $$.qualifier.perTaskNV = true; } - ; layout_qualifier @@ -1367,7 +1352,6 @@ layout_qualifier_id } ; - precise_qualifier : PRECISE { parseContext.profileRequires($$.loc, ECoreProfile | ECompatibilityProfile, 400, E_GL_ARB_gpu_shader5, "precise"); @@ -1377,7 +1361,6 @@ precise_qualifier } ; - type_qualifier : single_type_qualifier { $$ = $1; @@ -1411,7 +1394,6 @@ single_type_qualifier // allow inheritance of storage qualifier from block declaration $$ = $1; } - | precise_qualifier { // allow inheritance of storage qualifier from block declaration $$ = $1; @@ -1438,7 +1420,6 @@ single_type_qualifier $$.init($1.loc); $$.qualifier.setSpirvLiteral(); } - ; storage_qualifier @@ -1475,6 +1456,11 @@ storage_qualifier $$.init($1.loc); $$.qualifier.storage = EvqUniform; } + | TILEIMAGEEXT { + parseContext.globalCheck($1.loc, "tileImageEXT"); + $$.init($1.loc); + $$.qualifier.storage = EvqTileImageEXT; + } | SHARED { parseContext.globalCheck($1.loc, "shared"); parseContext.profileRequires($1.loc, ECoreProfile | ECompatibilityProfile, 430, E_GL_ARB_compute_shader, "shared"); @@ -1488,7 +1474,6 @@ storage_qualifier $$.init($1.loc); $$.qualifier.storage = EvqBuffer; } - | ATTRIBUTE { parseContext.requireStage($1.loc, EShLangVertex, "attribute"); parseContext.checkDeprecated($1.loc, ECoreProfile, 130, "attribute"); @@ -1534,6 +1519,14 @@ storage_qualifier $$.init($1.loc); $$.qualifier.storage = EvqHitAttr; } + | HITOBJECTATTRNV { + parseContext.globalCheck($1.loc, "hitAttributeNV"); + parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangRayGenMask | EShLangClosestHitMask + | EShLangMissMask), "hitObjectAttributeNV"); + parseContext.profileRequires($1.loc, ECoreProfile, 460, E_GL_NV_shader_invocation_reorder, "hitObjectAttributeNV"); + $$.init($1.loc); + $$.qualifier.storage = EvqHitObjectAttrNV; + } | HITATTREXT { parseContext.globalCheck($1.loc, "hitAttributeEXT"); parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangIntersectMask | EShLangClosestHitMask @@ -1673,10 +1666,8 @@ storage_qualifier $$.init($1.loc); $$.qualifier.storage = EvqtaskPayloadSharedEXT; } - ; - non_uniform_qualifier : NONUNIFORM { $$.init($1.loc); @@ -1695,12 +1686,13 @@ type_name_list } ; - type_specifier : type_specifier_nonarray type_parameter_specifier_opt { $$ = $1; $$.qualifier.precision = parseContext.getDefaultPrecision($$); $$.typeParameters = $2; + parseContext.coopMatTypeParametersCheck($1.loc, $$); + } | type_specifier_nonarray type_parameter_specifier_opt array_specifier { parseContext.arrayOfArrayVersionCheck($3.loc, $3.arraySizes); @@ -1708,6 +1700,7 @@ type_specifier $$.qualifier.precision = parseContext.getDefaultPrecision($$); $$.typeParameters = $2; $$.arraySizes = $3.arraySizes; + parseContext.coopMatTypeParametersCheck($1.loc, $$); } ; @@ -1754,19 +1747,25 @@ type_parameter_specifier ; type_parameter_specifier_list - : unary_expression { - $$ = new TArraySizes; + : type_specifier { + $$ = new TTypeParameters; + $$->arraySizes = new TArraySizes; + $$->basicType = $1.basicType; + } + | unary_expression { + $$ = new TTypeParameters; + $$->arraySizes = new TArraySizes; TArraySize size; - parseContext.arraySizeCheck($1->getLoc(), $1, size, "type parameter"); - $$->addInnerSize(size); + parseContext.arraySizeCheck($1->getLoc(), $1, size, "type parameter", true); + $$->arraySizes->addInnerSize(size); } | type_parameter_specifier_list COMMA unary_expression { $$ = $1; TArraySize size; - parseContext.arraySizeCheck($3->getLoc(), $3, size, "type parameter"); - $$->addInnerSize(size); + parseContext.arraySizeCheck($3->getLoc(), $3, size, "type parameter", true); + $$->arraySizes->addInnerSize(size); } ; @@ -1915,7 +1914,6 @@ type_specifier_nonarray $$.basicType = EbtFloat; $$.setMatrix(4, 4); } - | DOUBLE { parseContext.requireProfile($1.loc, ECoreProfile | ECompatibilityProfile, "double"); if (! parseContext.symbolTable.atBuiltInLevel()) @@ -2534,7 +2532,6 @@ type_specifier_nonarray $$.basicType = EbtSampler; $$.sampler.set(EbtFloat, Esd1D); } - | SAMPLER2D { $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.basicType = EbtSampler; @@ -2570,7 +2567,6 @@ type_specifier_nonarray $$.basicType = EbtSampler; $$.sampler.set(EbtFloat, Esd2D, true, true); } - | SAMPLER1DSHADOW { $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.basicType = EbtSampler; @@ -2679,7 +2675,6 @@ type_specifier_nonarray $$.basicType = EbtSampler; $$.sampler.set(EbtInt, Esd1D); } - | ISAMPLER2D { $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.basicType = EbtSampler; @@ -2715,7 +2710,6 @@ type_specifier_nonarray $$.basicType = EbtSampler; $$.sampler.set(EbtUint, EsdCube); } - | ISAMPLER1DARRAY { $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.basicType = EbtSampler; @@ -2756,7 +2750,6 @@ type_specifier_nonarray $$.basicType = EbtSampler; $$.sampler.setTexture(EbtUint, EsdCube, true); } - | USAMPLER2DARRAY { $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.basicType = EbtSampler; @@ -2832,7 +2825,6 @@ type_specifier_nonarray $$.basicType = EbtSampler; $$.sampler.setPureSampler(true); } - | SAMPLER2DRECT { $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.basicType = EbtSampler; @@ -3437,6 +3429,24 @@ type_specifier_nonarray $$.sampler.set(EbtFloat, Esd2D); $$.sampler.yuv = true; } + | ATTACHMENTEXT { + parseContext.requireStage($1.loc, EShLangFragment, "attachmentEXT input"); + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtSampler; + $$.sampler.setAttachmentEXT(EbtFloat); + } + | IATTACHMENTEXT { + parseContext.requireStage($1.loc, EShLangFragment, "attachmentEXT input"); + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtSampler; + $$.sampler.setAttachmentEXT(EbtInt); + } + | UATTACHMENTEXT { + parseContext.requireStage($1.loc, EShLangFragment, "attachmentEXT input"); + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtSampler; + $$.sampler.setAttachmentEXT(EbtUint); + } | SUBPASSINPUT { parseContext.requireStage($1.loc, EShLangFragment, "subpass input"); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); @@ -3488,28 +3498,41 @@ type_specifier_nonarray $$.sampler.setSubpass(EbtUint, true); } | FCOOPMATNV { - parseContext.fcoopmatCheck($1.loc, "fcoopmatNV", parseContext.symbolTable.atBuiltInLevel()); + parseContext.fcoopmatCheckNV($1.loc, "fcoopmatNV", parseContext.symbolTable.atBuiltInLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.basicType = EbtFloat; - $$.coopmat = true; + $$.coopmatNV = true; + $$.coopmatKHR = false; } | ICOOPMATNV { - parseContext.intcoopmatCheck($1.loc, "icoopmatNV", parseContext.symbolTable.atBuiltInLevel()); + parseContext.intcoopmatCheckNV($1.loc, "icoopmatNV", parseContext.symbolTable.atBuiltInLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.basicType = EbtInt; - $$.coopmat = true; + $$.coopmatNV = true; + $$.coopmatKHR = false; } | UCOOPMATNV { - parseContext.intcoopmatCheck($1.loc, "ucoopmatNV", parseContext.symbolTable.atBuiltInLevel()); + parseContext.intcoopmatCheckNV($1.loc, "ucoopmatNV", parseContext.symbolTable.atBuiltInLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.basicType = EbtUint; - $$.coopmat = true; + $$.coopmatNV = true; + $$.coopmatKHR = false; + } + | COOPMAT { + parseContext.coopmatCheck($1.loc, "coopmat", parseContext.symbolTable.atBuiltInLevel()); + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtCoopmat; + $$.coopmatNV = false; + $$.coopmatKHR = true; } | spirv_type_specifier { parseContext.requireExtensions($1.loc, 1, &E_GL_EXT_spirv_intrinsics, "SPIR-V type specifier"); $$ = $1; } - + | HITOBJECTNV { + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtHitObjectNV; + } | struct_specifier { $$ = $1; $$.qualifier.storage = parseContext.symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; @@ -3550,11 +3573,17 @@ precision_qualifier struct_specifier : STRUCT IDENTIFIER LEFT_BRACE { parseContext.nestedStructCheck($1.loc); } struct_declaration_list RIGHT_BRACE { + TType* structure = new TType($5, *$2.string); parseContext.structArrayCheck($2.loc, *structure); + TVariable* userTypeDef = new TVariable($2.string, *structure, true); if (! parseContext.symbolTable.insert(*userTypeDef)) parseContext.error($2.loc, "redefinition", $2.string->c_str(), "struct"); + else if (parseContext.spvVersion.vulkanRelaxed + && structure->containsOpaque()) + parseContext.relaxedSymbols.push_back(structure->getTypeName()); + $$.init($1.loc); $$.basicType = EbtStruct; $$.userDef = structure; @@ -3597,7 +3626,7 @@ struct_declaration $$ = $2; parseContext.voidErrorCheck($1.loc, (*$2)[0].type->getFieldName(), $1.basicType); - parseContext.precisionQualifierCheck($1.loc, $1.basicType, $1.qualifier); + parseContext.precisionQualifierCheck($1.loc, $1.basicType, $1.qualifier, $1.isCoopmat()); for (unsigned int i = 0; i < $$->size(); ++i) { TType type($1); @@ -3621,7 +3650,7 @@ struct_declaration parseContext.memberQualifierCheck($1); parseContext.voidErrorCheck($2.loc, (*$3)[0].type->getFieldName(), $2.basicType); parseContext.mergeQualifiers($2.loc, $2.qualifier, $1.qualifier, true); - parseContext.precisionQualifierCheck($2.loc, $2.basicType, $2.qualifier); + parseContext.precisionQualifierCheck($2.loc, $2.basicType, $2.qualifier, $2.isCoopmat()); for (unsigned int i = 0; i < $$->size(); ++i) { TType type($2); @@ -3664,7 +3693,6 @@ initializer : assignment_expression { $$ = $1; } - | LEFT_BRACE initializer_list RIGHT_BRACE { const char* initFeature = "{ } style initializers"; parseContext.requireProfile($1.loc, ~EEsProfile, initFeature); @@ -3683,10 +3711,8 @@ initializer parseContext.profileRequires($1.loc, ~EEsProfile, 0, E_GL_EXT_null_initializer, initFeature); $$ = parseContext.intermediate.makeAggregate($1.loc); } - ; - initializer_list : initializer { $$ = parseContext.intermediate.growAggregate(0, $1, $1->getLoc()); @@ -3696,7 +3722,6 @@ initializer_list } ; - declaration_statement : declaration { $$ = $1; } ; @@ -3716,12 +3741,9 @@ simple_statement | case_label { $$ = $1; } | iteration_statement { $$ = $1; } | jump_statement { $$ = $1; } - | demote_statement { $$ = $1; } - ; - demote_statement : DEMOTE SEMICOLON { parseContext.requireStage($1.loc, EShLangFragment, "demote"); @@ -3730,7 +3752,6 @@ demote_statement } ; - compound_statement : LEFT_BRACE RIGHT_BRACE { $$ = 0; } | LEFT_BRACE { @@ -3813,14 +3834,12 @@ selection_statement : selection_statement_nonattributed { $$ = $1; } - | attribute selection_statement_nonattributed { parseContext.requireExtensions($2->getLoc(), 1, &E_GL_EXT_control_flow_attributes, "attribute"); parseContext.handleSelectionAttributes(*$1, $2); $$ = $2; } - selection_statement_nonattributed : IF LEFT_PAREN expression RIGHT_PAREN selection_rest_statement { parseContext.boolCheck($1.loc, $3); @@ -3861,14 +3880,12 @@ switch_statement : switch_statement_nonattributed { $$ = $1; } - | attribute switch_statement_nonattributed { parseContext.requireExtensions($2->getLoc(), 1, &E_GL_EXT_control_flow_attributes, "attribute"); parseContext.handleSwitchAttributes(*$1, $2); $$ = $2; } - switch_statement_nonattributed : SWITCH LEFT_PAREN expression RIGHT_PAREN { // start new switch sequence on the switch stack @@ -3926,14 +3943,12 @@ iteration_statement : iteration_statement_nonattributed { $$ = $1; } - | attribute iteration_statement_nonattributed { parseContext.requireExtensions($2->getLoc(), 1, &E_GL_EXT_control_flow_attributes, "attribute"); parseContext.handleLoopAttributes(*$1, $2); $$ = $2; } - iteration_statement_nonattributed : WHILE LEFT_PAREN { if (! parseContext.limits.whileLoops) @@ -4046,7 +4061,6 @@ jump_statement parseContext.requireStage($1.loc, EShLangFragment, "terminateInvocation"); $$ = parseContext.intermediate.addBranch(EOpTerminateInvocation, $1.loc); } - | TERMINATE_RAY SEMICOLON { parseContext.requireStage($1.loc, EShLangAnyHit, "terminateRayEXT"); $$ = parseContext.intermediate.addBranch(EOpTerminateRayKHR, $1.loc); @@ -4055,7 +4069,6 @@ jump_statement parseContext.requireStage($1.loc, EShLangAnyHit, "ignoreIntersectionEXT"); $$ = parseContext.intermediate.addBranch(EOpIgnoreIntersectionKHR, $1.loc); } - ; // Grammar Note: No 'goto'. Gotos are not supported. @@ -4080,13 +4093,11 @@ external_declaration | declaration { $$ = $1; } - | SEMICOLON { parseContext.requireProfile($1.loc, ~EEsProfile, "extraneous semicolon"); parseContext.profileRequires($1.loc, ~EEsProfile, 460, nullptr, "extraneous semicolon"); $$ = nullptr; } - ; function_definition @@ -4108,6 +4119,7 @@ function_definition parseContext.error($1.loc, "function does not return a value:", "", $1.function->getName().c_str()); parseContext.symbolTable.pop(&parseContext.defaultPrecision[0]); $$ = parseContext.intermediate.growAggregate($1.intermNode, $3); + $$->getAsAggregate()->setLinkType($1.function->getLinkType()); parseContext.intermediate.setAggregateOperator($$, EOpFunction, $1.function->getType(), $1.loc); $$->getAsAggregate()->setName($1.function->getMangledName().c_str()); @@ -4130,7 +4142,6 @@ function_definition } ; - attribute : LEFT_BRACKET LEFT_BRACKET attribute_list RIGHT_BRACKET RIGHT_BRACKET { $$ = $3; @@ -4152,8 +4163,6 @@ single_attribute $$ = parseContext.makeAttributes(*$1.string, $3); } - - spirv_requirements_list : spirv_requirements_parameter { $$ = $1; @@ -4334,23 +4343,33 @@ spirv_decorate_parameter } spirv_decorate_id_parameter_list - : constant_expression { - if ($1->getBasicType() != EbtFloat && - $1->getBasicType() != EbtInt && - $1->getBasicType() != EbtUint && - $1->getBasicType() != EbtBool) - parseContext.error($1->getLoc(), "this type not allowed", $1->getType().getBasicString(), ""); + : spirv_decorate_id_parameter { $$ = parseContext.intermediate.makeAggregate($1); } - | spirv_decorate_id_parameter_list COMMA constant_expression { - if ($3->getBasicType() != EbtFloat && - $3->getBasicType() != EbtInt && - $3->getBasicType() != EbtUint && - $3->getBasicType() != EbtBool) - parseContext.error($3->getLoc(), "this type not allowed", $3->getType().getBasicString(), ""); + | spirv_decorate_id_parameter_list COMMA spirv_decorate_id_parameter { $$ = parseContext.intermediate.growAggregate($1, $3); } +spirv_decorate_id_parameter + : variable_identifier { + if ($1->getAsConstantUnion() || $1->getAsSymbolNode()) + $$ = $1; + else + parseContext.error($1->getLoc(), "only allow constants or variables which are not elements of a composite", "", ""); + } + | FLOATCONSTANT { + $$ = parseContext.intermediate.addConstantUnion($1.d, EbtFloat, $1.loc, true); + } + | INTCONSTANT { + $$ = parseContext.intermediate.addConstantUnion($1.i, $1.loc, true); + } + | UINTCONSTANT { + $$ = parseContext.intermediate.addConstantUnion($1.u, $1.loc, true); + } + | BOOLCONSTANT { + $$ = parseContext.intermediate.addConstantUnion($1.b, $1.loc, true); + } + spirv_decorate_string_parameter_list : STRING_LITERAL { $$ = parseContext.intermediate.makeAggregate( @@ -4392,6 +4411,9 @@ spirv_type_parameter : constant_expression { $$ = parseContext.makeSpirvTypeParameters($1->getLoc(), $1->getAsConstantUnion()); } + | type_specifier_nonarray { + $$ = parseContext.makeSpirvTypeParameters($1.loc, $1); + } spirv_instruction_qualifier : SPIRV_INSTRUCTION LEFT_PAREN spirv_instruction_qualifier_list RIGHT_PAREN { @@ -4418,5 +4440,4 @@ spirv_instruction_qualifier_id $$ = parseContext.makeSpirvInstruction($2.loc, *$1.string, $3.i); } - %% diff --git a/glslang/MachineIndependent/glslang_tab.cpp b/glslang/MachineIndependent/glslang_tab.cpp index 7a5ac521..5038bebe 100755 --- a/glslang/MachineIndependent/glslang_tab.cpp +++ b/glslang/MachineIndependent/glslang_tab.cpp @@ -1,8 +1,8 @@ -/* A Bison parser, made by GNU Bison 3.7.4. */ +/* A Bison parser, made by GNU Bison 3.8.2. */ /* Bison implementation for Yacc-like parsers in C - Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2020 Free Software Foundation, + Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify @@ -16,7 +16,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program. If not, see . */ + along with this program. If not, see . */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work @@ -46,10 +46,10 @@ USER NAME SPACE" below. */ /* Identify Bison output, and Bison version. */ -#define YYBISON 30704 +#define YYBISON 30802 /* Bison version string. */ -#define YYBISON_VERSION "3.7.4" +#define YYBISON_VERSION "3.8.2" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" @@ -67,7 +67,7 @@ /* First part of user prologue. */ -#line 69 "MachineIndependent/glslang.y" +#line 44 "MachineIndependent/glslang.y" /* Based on: @@ -287,451 +287,452 @@ enum yysymbol_kind_t YYSYMBOL_FCOOPMATNV = 163, /* FCOOPMATNV */ YYSYMBOL_ICOOPMATNV = 164, /* ICOOPMATNV */ YYSYMBOL_UCOOPMATNV = 165, /* UCOOPMATNV */ - YYSYMBOL_SAMPLERCUBEARRAY = 166, /* SAMPLERCUBEARRAY */ - YYSYMBOL_SAMPLERCUBEARRAYSHADOW = 167, /* SAMPLERCUBEARRAYSHADOW */ - YYSYMBOL_ISAMPLERCUBEARRAY = 168, /* ISAMPLERCUBEARRAY */ - YYSYMBOL_USAMPLERCUBEARRAY = 169, /* USAMPLERCUBEARRAY */ - YYSYMBOL_SAMPLER1D = 170, /* SAMPLER1D */ - YYSYMBOL_SAMPLER1DARRAY = 171, /* SAMPLER1DARRAY */ - YYSYMBOL_SAMPLER1DARRAYSHADOW = 172, /* SAMPLER1DARRAYSHADOW */ - YYSYMBOL_ISAMPLER1D = 173, /* ISAMPLER1D */ - YYSYMBOL_SAMPLER1DSHADOW = 174, /* SAMPLER1DSHADOW */ - YYSYMBOL_SAMPLER2DRECT = 175, /* SAMPLER2DRECT */ - YYSYMBOL_SAMPLER2DRECTSHADOW = 176, /* SAMPLER2DRECTSHADOW */ - YYSYMBOL_ISAMPLER2DRECT = 177, /* ISAMPLER2DRECT */ - YYSYMBOL_USAMPLER2DRECT = 178, /* USAMPLER2DRECT */ - YYSYMBOL_SAMPLERBUFFER = 179, /* SAMPLERBUFFER */ - YYSYMBOL_ISAMPLERBUFFER = 180, /* ISAMPLERBUFFER */ - YYSYMBOL_USAMPLERBUFFER = 181, /* USAMPLERBUFFER */ - YYSYMBOL_SAMPLER2DMS = 182, /* SAMPLER2DMS */ - YYSYMBOL_ISAMPLER2DMS = 183, /* ISAMPLER2DMS */ - YYSYMBOL_USAMPLER2DMS = 184, /* USAMPLER2DMS */ - YYSYMBOL_SAMPLER2DMSARRAY = 185, /* SAMPLER2DMSARRAY */ - YYSYMBOL_ISAMPLER2DMSARRAY = 186, /* ISAMPLER2DMSARRAY */ - YYSYMBOL_USAMPLER2DMSARRAY = 187, /* USAMPLER2DMSARRAY */ - YYSYMBOL_SAMPLEREXTERNALOES = 188, /* SAMPLEREXTERNALOES */ - YYSYMBOL_SAMPLEREXTERNAL2DY2YEXT = 189, /* SAMPLEREXTERNAL2DY2YEXT */ - YYSYMBOL_ISAMPLER1DARRAY = 190, /* ISAMPLER1DARRAY */ - YYSYMBOL_USAMPLER1D = 191, /* USAMPLER1D */ - YYSYMBOL_USAMPLER1DARRAY = 192, /* USAMPLER1DARRAY */ - YYSYMBOL_F16SAMPLER1D = 193, /* F16SAMPLER1D */ - YYSYMBOL_F16SAMPLER2D = 194, /* F16SAMPLER2D */ - YYSYMBOL_F16SAMPLER3D = 195, /* F16SAMPLER3D */ - YYSYMBOL_F16SAMPLER2DRECT = 196, /* F16SAMPLER2DRECT */ - YYSYMBOL_F16SAMPLERCUBE = 197, /* F16SAMPLERCUBE */ - YYSYMBOL_F16SAMPLER1DARRAY = 198, /* F16SAMPLER1DARRAY */ - YYSYMBOL_F16SAMPLER2DARRAY = 199, /* F16SAMPLER2DARRAY */ - YYSYMBOL_F16SAMPLERCUBEARRAY = 200, /* F16SAMPLERCUBEARRAY */ - YYSYMBOL_F16SAMPLERBUFFER = 201, /* F16SAMPLERBUFFER */ - YYSYMBOL_F16SAMPLER2DMS = 202, /* F16SAMPLER2DMS */ - YYSYMBOL_F16SAMPLER2DMSARRAY = 203, /* F16SAMPLER2DMSARRAY */ - YYSYMBOL_F16SAMPLER1DSHADOW = 204, /* F16SAMPLER1DSHADOW */ - YYSYMBOL_F16SAMPLER2DSHADOW = 205, /* F16SAMPLER2DSHADOW */ - YYSYMBOL_F16SAMPLER1DARRAYSHADOW = 206, /* F16SAMPLER1DARRAYSHADOW */ - YYSYMBOL_F16SAMPLER2DARRAYSHADOW = 207, /* F16SAMPLER2DARRAYSHADOW */ - YYSYMBOL_F16SAMPLER2DRECTSHADOW = 208, /* F16SAMPLER2DRECTSHADOW */ - YYSYMBOL_F16SAMPLERCUBESHADOW = 209, /* F16SAMPLERCUBESHADOW */ - YYSYMBOL_F16SAMPLERCUBEARRAYSHADOW = 210, /* F16SAMPLERCUBEARRAYSHADOW */ - YYSYMBOL_IMAGE1D = 211, /* IMAGE1D */ - YYSYMBOL_IIMAGE1D = 212, /* IIMAGE1D */ - YYSYMBOL_UIMAGE1D = 213, /* UIMAGE1D */ - YYSYMBOL_IMAGE2D = 214, /* IMAGE2D */ - YYSYMBOL_IIMAGE2D = 215, /* IIMAGE2D */ - YYSYMBOL_UIMAGE2D = 216, /* UIMAGE2D */ - YYSYMBOL_IMAGE3D = 217, /* IMAGE3D */ - YYSYMBOL_IIMAGE3D = 218, /* IIMAGE3D */ - YYSYMBOL_UIMAGE3D = 219, /* UIMAGE3D */ - YYSYMBOL_IMAGE2DRECT = 220, /* IMAGE2DRECT */ - YYSYMBOL_IIMAGE2DRECT = 221, /* IIMAGE2DRECT */ - YYSYMBOL_UIMAGE2DRECT = 222, /* UIMAGE2DRECT */ - YYSYMBOL_IMAGECUBE = 223, /* IMAGECUBE */ - YYSYMBOL_IIMAGECUBE = 224, /* IIMAGECUBE */ - YYSYMBOL_UIMAGECUBE = 225, /* UIMAGECUBE */ - YYSYMBOL_IMAGEBUFFER = 226, /* IMAGEBUFFER */ - YYSYMBOL_IIMAGEBUFFER = 227, /* IIMAGEBUFFER */ - YYSYMBOL_UIMAGEBUFFER = 228, /* UIMAGEBUFFER */ - YYSYMBOL_IMAGE1DARRAY = 229, /* IMAGE1DARRAY */ - YYSYMBOL_IIMAGE1DARRAY = 230, /* IIMAGE1DARRAY */ - YYSYMBOL_UIMAGE1DARRAY = 231, /* UIMAGE1DARRAY */ - YYSYMBOL_IMAGE2DARRAY = 232, /* IMAGE2DARRAY */ - YYSYMBOL_IIMAGE2DARRAY = 233, /* IIMAGE2DARRAY */ - YYSYMBOL_UIMAGE2DARRAY = 234, /* UIMAGE2DARRAY */ - YYSYMBOL_IMAGECUBEARRAY = 235, /* IMAGECUBEARRAY */ - YYSYMBOL_IIMAGECUBEARRAY = 236, /* IIMAGECUBEARRAY */ - YYSYMBOL_UIMAGECUBEARRAY = 237, /* UIMAGECUBEARRAY */ - YYSYMBOL_IMAGE2DMS = 238, /* IMAGE2DMS */ - YYSYMBOL_IIMAGE2DMS = 239, /* IIMAGE2DMS */ - YYSYMBOL_UIMAGE2DMS = 240, /* UIMAGE2DMS */ - YYSYMBOL_IMAGE2DMSARRAY = 241, /* IMAGE2DMSARRAY */ - YYSYMBOL_IIMAGE2DMSARRAY = 242, /* IIMAGE2DMSARRAY */ - YYSYMBOL_UIMAGE2DMSARRAY = 243, /* UIMAGE2DMSARRAY */ - YYSYMBOL_F16IMAGE1D = 244, /* F16IMAGE1D */ - YYSYMBOL_F16IMAGE2D = 245, /* F16IMAGE2D */ - YYSYMBOL_F16IMAGE3D = 246, /* F16IMAGE3D */ - YYSYMBOL_F16IMAGE2DRECT = 247, /* F16IMAGE2DRECT */ - YYSYMBOL_F16IMAGECUBE = 248, /* F16IMAGECUBE */ - YYSYMBOL_F16IMAGE1DARRAY = 249, /* F16IMAGE1DARRAY */ - YYSYMBOL_F16IMAGE2DARRAY = 250, /* F16IMAGE2DARRAY */ - YYSYMBOL_F16IMAGECUBEARRAY = 251, /* F16IMAGECUBEARRAY */ - YYSYMBOL_F16IMAGEBUFFER = 252, /* F16IMAGEBUFFER */ - YYSYMBOL_F16IMAGE2DMS = 253, /* F16IMAGE2DMS */ - YYSYMBOL_F16IMAGE2DMSARRAY = 254, /* F16IMAGE2DMSARRAY */ - YYSYMBOL_I64IMAGE1D = 255, /* I64IMAGE1D */ - YYSYMBOL_U64IMAGE1D = 256, /* U64IMAGE1D */ - YYSYMBOL_I64IMAGE2D = 257, /* I64IMAGE2D */ - YYSYMBOL_U64IMAGE2D = 258, /* U64IMAGE2D */ - YYSYMBOL_I64IMAGE3D = 259, /* I64IMAGE3D */ - YYSYMBOL_U64IMAGE3D = 260, /* U64IMAGE3D */ - YYSYMBOL_I64IMAGE2DRECT = 261, /* I64IMAGE2DRECT */ - YYSYMBOL_U64IMAGE2DRECT = 262, /* U64IMAGE2DRECT */ - YYSYMBOL_I64IMAGECUBE = 263, /* I64IMAGECUBE */ - YYSYMBOL_U64IMAGECUBE = 264, /* U64IMAGECUBE */ - YYSYMBOL_I64IMAGEBUFFER = 265, /* I64IMAGEBUFFER */ - YYSYMBOL_U64IMAGEBUFFER = 266, /* U64IMAGEBUFFER */ - YYSYMBOL_I64IMAGE1DARRAY = 267, /* I64IMAGE1DARRAY */ - YYSYMBOL_U64IMAGE1DARRAY = 268, /* U64IMAGE1DARRAY */ - YYSYMBOL_I64IMAGE2DARRAY = 269, /* I64IMAGE2DARRAY */ - YYSYMBOL_U64IMAGE2DARRAY = 270, /* U64IMAGE2DARRAY */ - YYSYMBOL_I64IMAGECUBEARRAY = 271, /* I64IMAGECUBEARRAY */ - YYSYMBOL_U64IMAGECUBEARRAY = 272, /* U64IMAGECUBEARRAY */ - YYSYMBOL_I64IMAGE2DMS = 273, /* I64IMAGE2DMS */ - YYSYMBOL_U64IMAGE2DMS = 274, /* U64IMAGE2DMS */ - YYSYMBOL_I64IMAGE2DMSARRAY = 275, /* I64IMAGE2DMSARRAY */ - YYSYMBOL_U64IMAGE2DMSARRAY = 276, /* U64IMAGE2DMSARRAY */ - YYSYMBOL_TEXTURECUBEARRAY = 277, /* TEXTURECUBEARRAY */ - YYSYMBOL_ITEXTURECUBEARRAY = 278, /* ITEXTURECUBEARRAY */ - YYSYMBOL_UTEXTURECUBEARRAY = 279, /* UTEXTURECUBEARRAY */ - YYSYMBOL_TEXTURE1D = 280, /* TEXTURE1D */ - YYSYMBOL_ITEXTURE1D = 281, /* ITEXTURE1D */ - YYSYMBOL_UTEXTURE1D = 282, /* UTEXTURE1D */ - YYSYMBOL_TEXTURE1DARRAY = 283, /* TEXTURE1DARRAY */ - YYSYMBOL_ITEXTURE1DARRAY = 284, /* ITEXTURE1DARRAY */ - YYSYMBOL_UTEXTURE1DARRAY = 285, /* UTEXTURE1DARRAY */ - YYSYMBOL_TEXTURE2DRECT = 286, /* TEXTURE2DRECT */ - YYSYMBOL_ITEXTURE2DRECT = 287, /* ITEXTURE2DRECT */ - YYSYMBOL_UTEXTURE2DRECT = 288, /* UTEXTURE2DRECT */ - YYSYMBOL_TEXTUREBUFFER = 289, /* TEXTUREBUFFER */ - YYSYMBOL_ITEXTUREBUFFER = 290, /* ITEXTUREBUFFER */ - YYSYMBOL_UTEXTUREBUFFER = 291, /* UTEXTUREBUFFER */ - YYSYMBOL_TEXTURE2DMS = 292, /* TEXTURE2DMS */ - YYSYMBOL_ITEXTURE2DMS = 293, /* ITEXTURE2DMS */ - YYSYMBOL_UTEXTURE2DMS = 294, /* UTEXTURE2DMS */ - YYSYMBOL_TEXTURE2DMSARRAY = 295, /* TEXTURE2DMSARRAY */ - YYSYMBOL_ITEXTURE2DMSARRAY = 296, /* ITEXTURE2DMSARRAY */ - YYSYMBOL_UTEXTURE2DMSARRAY = 297, /* UTEXTURE2DMSARRAY */ - YYSYMBOL_F16TEXTURE1D = 298, /* F16TEXTURE1D */ - YYSYMBOL_F16TEXTURE2D = 299, /* F16TEXTURE2D */ - YYSYMBOL_F16TEXTURE3D = 300, /* F16TEXTURE3D */ - YYSYMBOL_F16TEXTURE2DRECT = 301, /* F16TEXTURE2DRECT */ - YYSYMBOL_F16TEXTURECUBE = 302, /* F16TEXTURECUBE */ - YYSYMBOL_F16TEXTURE1DARRAY = 303, /* F16TEXTURE1DARRAY */ - YYSYMBOL_F16TEXTURE2DARRAY = 304, /* F16TEXTURE2DARRAY */ - YYSYMBOL_F16TEXTURECUBEARRAY = 305, /* F16TEXTURECUBEARRAY */ - YYSYMBOL_F16TEXTUREBUFFER = 306, /* F16TEXTUREBUFFER */ - YYSYMBOL_F16TEXTURE2DMS = 307, /* F16TEXTURE2DMS */ - YYSYMBOL_F16TEXTURE2DMSARRAY = 308, /* F16TEXTURE2DMSARRAY */ - YYSYMBOL_SUBPASSINPUT = 309, /* SUBPASSINPUT */ - YYSYMBOL_SUBPASSINPUTMS = 310, /* SUBPASSINPUTMS */ - YYSYMBOL_ISUBPASSINPUT = 311, /* ISUBPASSINPUT */ - YYSYMBOL_ISUBPASSINPUTMS = 312, /* ISUBPASSINPUTMS */ - YYSYMBOL_USUBPASSINPUT = 313, /* USUBPASSINPUT */ - YYSYMBOL_USUBPASSINPUTMS = 314, /* USUBPASSINPUTMS */ - YYSYMBOL_F16SUBPASSINPUT = 315, /* F16SUBPASSINPUT */ - YYSYMBOL_F16SUBPASSINPUTMS = 316, /* F16SUBPASSINPUTMS */ - YYSYMBOL_SPIRV_INSTRUCTION = 317, /* SPIRV_INSTRUCTION */ - YYSYMBOL_SPIRV_EXECUTION_MODE = 318, /* SPIRV_EXECUTION_MODE */ - YYSYMBOL_SPIRV_EXECUTION_MODE_ID = 319, /* SPIRV_EXECUTION_MODE_ID */ - YYSYMBOL_SPIRV_DECORATE = 320, /* SPIRV_DECORATE */ - YYSYMBOL_SPIRV_DECORATE_ID = 321, /* SPIRV_DECORATE_ID */ - YYSYMBOL_SPIRV_DECORATE_STRING = 322, /* SPIRV_DECORATE_STRING */ - YYSYMBOL_SPIRV_TYPE = 323, /* SPIRV_TYPE */ - YYSYMBOL_SPIRV_STORAGE_CLASS = 324, /* SPIRV_STORAGE_CLASS */ - YYSYMBOL_SPIRV_BY_REFERENCE = 325, /* SPIRV_BY_REFERENCE */ - YYSYMBOL_SPIRV_LITERAL = 326, /* SPIRV_LITERAL */ - YYSYMBOL_LEFT_OP = 327, /* LEFT_OP */ - YYSYMBOL_RIGHT_OP = 328, /* RIGHT_OP */ - YYSYMBOL_INC_OP = 329, /* INC_OP */ - YYSYMBOL_DEC_OP = 330, /* DEC_OP */ - YYSYMBOL_LE_OP = 331, /* LE_OP */ - YYSYMBOL_GE_OP = 332, /* GE_OP */ - YYSYMBOL_EQ_OP = 333, /* EQ_OP */ - YYSYMBOL_NE_OP = 334, /* NE_OP */ - YYSYMBOL_AND_OP = 335, /* AND_OP */ - YYSYMBOL_OR_OP = 336, /* OR_OP */ - YYSYMBOL_XOR_OP = 337, /* XOR_OP */ - YYSYMBOL_MUL_ASSIGN = 338, /* MUL_ASSIGN */ - YYSYMBOL_DIV_ASSIGN = 339, /* DIV_ASSIGN */ - YYSYMBOL_ADD_ASSIGN = 340, /* ADD_ASSIGN */ - YYSYMBOL_MOD_ASSIGN = 341, /* MOD_ASSIGN */ - YYSYMBOL_LEFT_ASSIGN = 342, /* LEFT_ASSIGN */ - YYSYMBOL_RIGHT_ASSIGN = 343, /* RIGHT_ASSIGN */ - YYSYMBOL_AND_ASSIGN = 344, /* AND_ASSIGN */ - YYSYMBOL_XOR_ASSIGN = 345, /* XOR_ASSIGN */ - YYSYMBOL_OR_ASSIGN = 346, /* OR_ASSIGN */ - YYSYMBOL_SUB_ASSIGN = 347, /* SUB_ASSIGN */ - YYSYMBOL_STRING_LITERAL = 348, /* STRING_LITERAL */ - YYSYMBOL_LEFT_PAREN = 349, /* LEFT_PAREN */ - YYSYMBOL_RIGHT_PAREN = 350, /* RIGHT_PAREN */ - YYSYMBOL_LEFT_BRACKET = 351, /* LEFT_BRACKET */ - YYSYMBOL_RIGHT_BRACKET = 352, /* RIGHT_BRACKET */ - YYSYMBOL_LEFT_BRACE = 353, /* LEFT_BRACE */ - YYSYMBOL_RIGHT_BRACE = 354, /* RIGHT_BRACE */ - YYSYMBOL_DOT = 355, /* DOT */ - YYSYMBOL_COMMA = 356, /* COMMA */ - YYSYMBOL_COLON = 357, /* COLON */ - YYSYMBOL_EQUAL = 358, /* EQUAL */ - YYSYMBOL_SEMICOLON = 359, /* SEMICOLON */ - YYSYMBOL_BANG = 360, /* BANG */ - YYSYMBOL_DASH = 361, /* DASH */ - YYSYMBOL_TILDE = 362, /* TILDE */ - YYSYMBOL_PLUS = 363, /* PLUS */ - YYSYMBOL_STAR = 364, /* STAR */ - YYSYMBOL_SLASH = 365, /* SLASH */ - YYSYMBOL_PERCENT = 366, /* PERCENT */ - YYSYMBOL_LEFT_ANGLE = 367, /* LEFT_ANGLE */ - YYSYMBOL_RIGHT_ANGLE = 368, /* RIGHT_ANGLE */ - YYSYMBOL_VERTICAL_BAR = 369, /* VERTICAL_BAR */ - YYSYMBOL_CARET = 370, /* CARET */ - YYSYMBOL_AMPERSAND = 371, /* AMPERSAND */ - YYSYMBOL_QUESTION = 372, /* QUESTION */ - YYSYMBOL_INVARIANT = 373, /* INVARIANT */ - YYSYMBOL_HIGH_PRECISION = 374, /* HIGH_PRECISION */ - YYSYMBOL_MEDIUM_PRECISION = 375, /* MEDIUM_PRECISION */ - YYSYMBOL_LOW_PRECISION = 376, /* LOW_PRECISION */ - YYSYMBOL_PRECISION = 377, /* PRECISION */ - YYSYMBOL_PACKED = 378, /* PACKED */ - YYSYMBOL_RESOURCE = 379, /* RESOURCE */ - YYSYMBOL_SUPERP = 380, /* SUPERP */ - YYSYMBOL_FLOATCONSTANT = 381, /* FLOATCONSTANT */ - YYSYMBOL_INTCONSTANT = 382, /* INTCONSTANT */ - YYSYMBOL_UINTCONSTANT = 383, /* UINTCONSTANT */ - YYSYMBOL_BOOLCONSTANT = 384, /* BOOLCONSTANT */ - YYSYMBOL_IDENTIFIER = 385, /* IDENTIFIER */ - YYSYMBOL_TYPE_NAME = 386, /* TYPE_NAME */ - YYSYMBOL_CENTROID = 387, /* CENTROID */ - YYSYMBOL_IN = 388, /* IN */ - YYSYMBOL_OUT = 389, /* OUT */ - YYSYMBOL_INOUT = 390, /* INOUT */ - YYSYMBOL_STRUCT = 391, /* STRUCT */ - YYSYMBOL_VOID = 392, /* VOID */ - YYSYMBOL_WHILE = 393, /* WHILE */ - YYSYMBOL_BREAK = 394, /* BREAK */ - YYSYMBOL_CONTINUE = 395, /* CONTINUE */ - YYSYMBOL_DO = 396, /* DO */ - YYSYMBOL_ELSE = 397, /* ELSE */ - YYSYMBOL_FOR = 398, /* FOR */ - YYSYMBOL_IF = 399, /* IF */ - YYSYMBOL_DISCARD = 400, /* DISCARD */ - YYSYMBOL_RETURN = 401, /* RETURN */ - YYSYMBOL_SWITCH = 402, /* SWITCH */ - YYSYMBOL_CASE = 403, /* CASE */ - YYSYMBOL_DEFAULT = 404, /* DEFAULT */ - YYSYMBOL_TERMINATE_INVOCATION = 405, /* TERMINATE_INVOCATION */ - YYSYMBOL_TERMINATE_RAY = 406, /* TERMINATE_RAY */ - YYSYMBOL_IGNORE_INTERSECTION = 407, /* IGNORE_INTERSECTION */ - YYSYMBOL_UNIFORM = 408, /* UNIFORM */ - YYSYMBOL_SHARED = 409, /* SHARED */ - YYSYMBOL_BUFFER = 410, /* BUFFER */ - YYSYMBOL_FLAT = 411, /* FLAT */ - YYSYMBOL_SMOOTH = 412, /* SMOOTH */ - YYSYMBOL_LAYOUT = 413, /* LAYOUT */ - YYSYMBOL_DOUBLECONSTANT = 414, /* DOUBLECONSTANT */ - YYSYMBOL_INT16CONSTANT = 415, /* INT16CONSTANT */ - YYSYMBOL_UINT16CONSTANT = 416, /* UINT16CONSTANT */ - YYSYMBOL_FLOAT16CONSTANT = 417, /* FLOAT16CONSTANT */ - YYSYMBOL_INT32CONSTANT = 418, /* INT32CONSTANT */ - YYSYMBOL_UINT32CONSTANT = 419, /* UINT32CONSTANT */ - YYSYMBOL_INT64CONSTANT = 420, /* INT64CONSTANT */ - YYSYMBOL_UINT64CONSTANT = 421, /* UINT64CONSTANT */ - YYSYMBOL_SUBROUTINE = 422, /* SUBROUTINE */ - YYSYMBOL_DEMOTE = 423, /* DEMOTE */ - YYSYMBOL_PAYLOADNV = 424, /* PAYLOADNV */ - YYSYMBOL_PAYLOADINNV = 425, /* PAYLOADINNV */ - YYSYMBOL_HITATTRNV = 426, /* HITATTRNV */ - YYSYMBOL_CALLDATANV = 427, /* CALLDATANV */ - YYSYMBOL_CALLDATAINNV = 428, /* CALLDATAINNV */ - YYSYMBOL_PAYLOADEXT = 429, /* PAYLOADEXT */ - YYSYMBOL_PAYLOADINEXT = 430, /* PAYLOADINEXT */ - YYSYMBOL_HITATTREXT = 431, /* HITATTREXT */ - YYSYMBOL_CALLDATAEXT = 432, /* CALLDATAEXT */ - YYSYMBOL_CALLDATAINEXT = 433, /* CALLDATAINEXT */ - YYSYMBOL_PATCH = 434, /* PATCH */ - YYSYMBOL_SAMPLE = 435, /* SAMPLE */ - YYSYMBOL_NONUNIFORM = 436, /* NONUNIFORM */ - YYSYMBOL_COHERENT = 437, /* COHERENT */ - YYSYMBOL_VOLATILE = 438, /* VOLATILE */ - YYSYMBOL_RESTRICT = 439, /* RESTRICT */ - YYSYMBOL_READONLY = 440, /* READONLY */ - YYSYMBOL_WRITEONLY = 441, /* WRITEONLY */ - YYSYMBOL_DEVICECOHERENT = 442, /* DEVICECOHERENT */ - YYSYMBOL_QUEUEFAMILYCOHERENT = 443, /* QUEUEFAMILYCOHERENT */ - YYSYMBOL_WORKGROUPCOHERENT = 444, /* WORKGROUPCOHERENT */ - YYSYMBOL_SUBGROUPCOHERENT = 445, /* SUBGROUPCOHERENT */ - YYSYMBOL_NONPRIVATE = 446, /* NONPRIVATE */ - 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_PERPRIMITIVEEXT = 455, /* PERPRIMITIVEEXT */ - YYSYMBOL_TASKPAYLOADWORKGROUPEXT = 456, /* TASKPAYLOADWORKGROUPEXT */ - YYSYMBOL_PRECISE = 457, /* PRECISE */ - YYSYMBOL_YYACCEPT = 458, /* $accept */ - YYSYMBOL_variable_identifier = 459, /* variable_identifier */ - YYSYMBOL_primary_expression = 460, /* primary_expression */ - YYSYMBOL_postfix_expression = 461, /* postfix_expression */ - YYSYMBOL_integer_expression = 462, /* integer_expression */ - YYSYMBOL_function_call = 463, /* function_call */ - YYSYMBOL_function_call_or_method = 464, /* function_call_or_method */ - YYSYMBOL_function_call_generic = 465, /* function_call_generic */ - YYSYMBOL_function_call_header_no_parameters = 466, /* function_call_header_no_parameters */ - YYSYMBOL_function_call_header_with_parameters = 467, /* function_call_header_with_parameters */ - YYSYMBOL_function_call_header = 468, /* function_call_header */ - YYSYMBOL_function_identifier = 469, /* function_identifier */ - YYSYMBOL_unary_expression = 470, /* unary_expression */ - YYSYMBOL_unary_operator = 471, /* unary_operator */ - YYSYMBOL_multiplicative_expression = 472, /* multiplicative_expression */ - YYSYMBOL_additive_expression = 473, /* additive_expression */ - YYSYMBOL_shift_expression = 474, /* shift_expression */ - YYSYMBOL_relational_expression = 475, /* relational_expression */ - YYSYMBOL_equality_expression = 476, /* equality_expression */ - YYSYMBOL_and_expression = 477, /* and_expression */ - YYSYMBOL_exclusive_or_expression = 478, /* exclusive_or_expression */ - YYSYMBOL_inclusive_or_expression = 479, /* inclusive_or_expression */ - YYSYMBOL_logical_and_expression = 480, /* logical_and_expression */ - YYSYMBOL_logical_xor_expression = 481, /* logical_xor_expression */ - YYSYMBOL_logical_or_expression = 482, /* logical_or_expression */ - YYSYMBOL_conditional_expression = 483, /* conditional_expression */ - YYSYMBOL_484_1 = 484, /* $@1 */ - YYSYMBOL_assignment_expression = 485, /* assignment_expression */ - YYSYMBOL_assignment_operator = 486, /* assignment_operator */ - YYSYMBOL_expression = 487, /* expression */ - YYSYMBOL_constant_expression = 488, /* constant_expression */ - YYSYMBOL_declaration = 489, /* declaration */ - YYSYMBOL_block_structure = 490, /* block_structure */ - YYSYMBOL_491_2 = 491, /* $@2 */ - YYSYMBOL_identifier_list = 492, /* identifier_list */ - YYSYMBOL_function_prototype = 493, /* function_prototype */ - YYSYMBOL_function_declarator = 494, /* function_declarator */ - YYSYMBOL_function_header_with_parameters = 495, /* function_header_with_parameters */ - YYSYMBOL_function_header = 496, /* function_header */ - YYSYMBOL_parameter_declarator = 497, /* parameter_declarator */ - YYSYMBOL_parameter_declaration = 498, /* parameter_declaration */ - YYSYMBOL_parameter_type_specifier = 499, /* parameter_type_specifier */ - YYSYMBOL_init_declarator_list = 500, /* init_declarator_list */ - YYSYMBOL_single_declaration = 501, /* single_declaration */ - YYSYMBOL_fully_specified_type = 502, /* fully_specified_type */ - YYSYMBOL_invariant_qualifier = 503, /* invariant_qualifier */ - YYSYMBOL_interpolation_qualifier = 504, /* interpolation_qualifier */ - YYSYMBOL_layout_qualifier = 505, /* layout_qualifier */ - YYSYMBOL_layout_qualifier_id_list = 506, /* layout_qualifier_id_list */ - YYSYMBOL_layout_qualifier_id = 507, /* layout_qualifier_id */ - YYSYMBOL_precise_qualifier = 508, /* precise_qualifier */ - YYSYMBOL_type_qualifier = 509, /* type_qualifier */ - YYSYMBOL_single_type_qualifier = 510, /* single_type_qualifier */ - YYSYMBOL_storage_qualifier = 511, /* storage_qualifier */ - YYSYMBOL_non_uniform_qualifier = 512, /* non_uniform_qualifier */ - YYSYMBOL_type_name_list = 513, /* type_name_list */ - YYSYMBOL_type_specifier = 514, /* type_specifier */ - YYSYMBOL_array_specifier = 515, /* array_specifier */ - YYSYMBOL_type_parameter_specifier_opt = 516, /* type_parameter_specifier_opt */ - YYSYMBOL_type_parameter_specifier = 517, /* type_parameter_specifier */ - YYSYMBOL_type_parameter_specifier_list = 518, /* type_parameter_specifier_list */ - YYSYMBOL_type_specifier_nonarray = 519, /* type_specifier_nonarray */ - YYSYMBOL_precision_qualifier = 520, /* precision_qualifier */ - YYSYMBOL_struct_specifier = 521, /* struct_specifier */ - YYSYMBOL_522_3 = 522, /* $@3 */ - YYSYMBOL_523_4 = 523, /* $@4 */ - YYSYMBOL_struct_declaration_list = 524, /* struct_declaration_list */ - YYSYMBOL_struct_declaration = 525, /* struct_declaration */ - YYSYMBOL_struct_declarator_list = 526, /* struct_declarator_list */ - YYSYMBOL_struct_declarator = 527, /* struct_declarator */ - YYSYMBOL_initializer = 528, /* initializer */ - YYSYMBOL_initializer_list = 529, /* initializer_list */ - YYSYMBOL_declaration_statement = 530, /* declaration_statement */ - YYSYMBOL_statement = 531, /* statement */ - YYSYMBOL_simple_statement = 532, /* simple_statement */ - YYSYMBOL_demote_statement = 533, /* demote_statement */ - YYSYMBOL_compound_statement = 534, /* compound_statement */ - YYSYMBOL_535_5 = 535, /* $@5 */ - YYSYMBOL_536_6 = 536, /* $@6 */ - YYSYMBOL_statement_no_new_scope = 537, /* statement_no_new_scope */ - YYSYMBOL_statement_scoped = 538, /* statement_scoped */ - YYSYMBOL_539_7 = 539, /* $@7 */ - YYSYMBOL_540_8 = 540, /* $@8 */ - YYSYMBOL_compound_statement_no_new_scope = 541, /* compound_statement_no_new_scope */ - YYSYMBOL_statement_list = 542, /* statement_list */ - YYSYMBOL_expression_statement = 543, /* expression_statement */ - YYSYMBOL_selection_statement = 544, /* selection_statement */ - YYSYMBOL_selection_statement_nonattributed = 545, /* selection_statement_nonattributed */ - YYSYMBOL_selection_rest_statement = 546, /* selection_rest_statement */ - YYSYMBOL_condition = 547, /* condition */ - YYSYMBOL_switch_statement = 548, /* switch_statement */ - YYSYMBOL_switch_statement_nonattributed = 549, /* switch_statement_nonattributed */ - YYSYMBOL_550_9 = 550, /* $@9 */ - YYSYMBOL_switch_statement_list = 551, /* switch_statement_list */ - YYSYMBOL_case_label = 552, /* case_label */ - YYSYMBOL_iteration_statement = 553, /* iteration_statement */ - YYSYMBOL_iteration_statement_nonattributed = 554, /* iteration_statement_nonattributed */ - YYSYMBOL_555_10 = 555, /* $@10 */ - YYSYMBOL_556_11 = 556, /* $@11 */ - YYSYMBOL_557_12 = 557, /* $@12 */ - YYSYMBOL_for_init_statement = 558, /* for_init_statement */ - YYSYMBOL_conditionopt = 559, /* conditionopt */ - YYSYMBOL_for_rest_statement = 560, /* for_rest_statement */ - YYSYMBOL_jump_statement = 561, /* jump_statement */ - YYSYMBOL_translation_unit = 562, /* translation_unit */ - YYSYMBOL_external_declaration = 563, /* external_declaration */ - YYSYMBOL_function_definition = 564, /* function_definition */ - YYSYMBOL_565_13 = 565, /* $@13 */ - YYSYMBOL_attribute = 566, /* attribute */ - YYSYMBOL_attribute_list = 567, /* attribute_list */ - YYSYMBOL_single_attribute = 568, /* single_attribute */ - YYSYMBOL_spirv_requirements_list = 569, /* spirv_requirements_list */ - YYSYMBOL_spirv_requirements_parameter = 570, /* spirv_requirements_parameter */ - YYSYMBOL_spirv_extension_list = 571, /* spirv_extension_list */ - YYSYMBOL_spirv_capability_list = 572, /* spirv_capability_list */ - YYSYMBOL_spirv_execution_mode_qualifier = 573, /* spirv_execution_mode_qualifier */ - YYSYMBOL_spirv_execution_mode_parameter_list = 574, /* spirv_execution_mode_parameter_list */ - YYSYMBOL_spirv_execution_mode_parameter = 575, /* spirv_execution_mode_parameter */ - YYSYMBOL_spirv_execution_mode_id_parameter_list = 576, /* spirv_execution_mode_id_parameter_list */ - YYSYMBOL_spirv_storage_class_qualifier = 577, /* spirv_storage_class_qualifier */ - YYSYMBOL_spirv_decorate_qualifier = 578, /* spirv_decorate_qualifier */ - YYSYMBOL_spirv_decorate_parameter_list = 579, /* spirv_decorate_parameter_list */ - YYSYMBOL_spirv_decorate_parameter = 580, /* spirv_decorate_parameter */ - YYSYMBOL_spirv_decorate_id_parameter_list = 581, /* spirv_decorate_id_parameter_list */ - YYSYMBOL_spirv_decorate_string_parameter_list = 582, /* spirv_decorate_string_parameter_list */ - YYSYMBOL_spirv_type_specifier = 583, /* spirv_type_specifier */ - YYSYMBOL_spirv_type_parameter_list = 584, /* spirv_type_parameter_list */ - YYSYMBOL_spirv_type_parameter = 585, /* spirv_type_parameter */ - YYSYMBOL_spirv_instruction_qualifier = 586, /* spirv_instruction_qualifier */ - YYSYMBOL_spirv_instruction_qualifier_list = 587, /* spirv_instruction_qualifier_list */ - YYSYMBOL_spirv_instruction_qualifier_id = 588 /* spirv_instruction_qualifier_id */ + YYSYMBOL_COOPMAT = 166, /* COOPMAT */ + YYSYMBOL_HITOBJECTNV = 167, /* HITOBJECTNV */ + YYSYMBOL_HITOBJECTATTRNV = 168, /* HITOBJECTATTRNV */ + YYSYMBOL_SAMPLERCUBEARRAY = 169, /* SAMPLERCUBEARRAY */ + YYSYMBOL_SAMPLERCUBEARRAYSHADOW = 170, /* SAMPLERCUBEARRAYSHADOW */ + YYSYMBOL_ISAMPLERCUBEARRAY = 171, /* ISAMPLERCUBEARRAY */ + YYSYMBOL_USAMPLERCUBEARRAY = 172, /* USAMPLERCUBEARRAY */ + YYSYMBOL_SAMPLER1D = 173, /* SAMPLER1D */ + YYSYMBOL_SAMPLER1DARRAY = 174, /* SAMPLER1DARRAY */ + YYSYMBOL_SAMPLER1DARRAYSHADOW = 175, /* SAMPLER1DARRAYSHADOW */ + YYSYMBOL_ISAMPLER1D = 176, /* ISAMPLER1D */ + YYSYMBOL_SAMPLER1DSHADOW = 177, /* SAMPLER1DSHADOW */ + YYSYMBOL_SAMPLER2DRECT = 178, /* SAMPLER2DRECT */ + YYSYMBOL_SAMPLER2DRECTSHADOW = 179, /* SAMPLER2DRECTSHADOW */ + YYSYMBOL_ISAMPLER2DRECT = 180, /* ISAMPLER2DRECT */ + YYSYMBOL_USAMPLER2DRECT = 181, /* USAMPLER2DRECT */ + YYSYMBOL_SAMPLERBUFFER = 182, /* SAMPLERBUFFER */ + YYSYMBOL_ISAMPLERBUFFER = 183, /* ISAMPLERBUFFER */ + YYSYMBOL_USAMPLERBUFFER = 184, /* USAMPLERBUFFER */ + YYSYMBOL_SAMPLER2DMS = 185, /* SAMPLER2DMS */ + YYSYMBOL_ISAMPLER2DMS = 186, /* ISAMPLER2DMS */ + YYSYMBOL_USAMPLER2DMS = 187, /* USAMPLER2DMS */ + YYSYMBOL_SAMPLER2DMSARRAY = 188, /* SAMPLER2DMSARRAY */ + YYSYMBOL_ISAMPLER2DMSARRAY = 189, /* ISAMPLER2DMSARRAY */ + YYSYMBOL_USAMPLER2DMSARRAY = 190, /* USAMPLER2DMSARRAY */ + YYSYMBOL_SAMPLEREXTERNALOES = 191, /* SAMPLEREXTERNALOES */ + YYSYMBOL_SAMPLEREXTERNAL2DY2YEXT = 192, /* SAMPLEREXTERNAL2DY2YEXT */ + YYSYMBOL_ISAMPLER1DARRAY = 193, /* ISAMPLER1DARRAY */ + YYSYMBOL_USAMPLER1D = 194, /* USAMPLER1D */ + YYSYMBOL_USAMPLER1DARRAY = 195, /* USAMPLER1DARRAY */ + YYSYMBOL_F16SAMPLER1D = 196, /* F16SAMPLER1D */ + YYSYMBOL_F16SAMPLER2D = 197, /* F16SAMPLER2D */ + YYSYMBOL_F16SAMPLER3D = 198, /* F16SAMPLER3D */ + YYSYMBOL_F16SAMPLER2DRECT = 199, /* F16SAMPLER2DRECT */ + YYSYMBOL_F16SAMPLERCUBE = 200, /* F16SAMPLERCUBE */ + YYSYMBOL_F16SAMPLER1DARRAY = 201, /* F16SAMPLER1DARRAY */ + YYSYMBOL_F16SAMPLER2DARRAY = 202, /* F16SAMPLER2DARRAY */ + YYSYMBOL_F16SAMPLERCUBEARRAY = 203, /* F16SAMPLERCUBEARRAY */ + YYSYMBOL_F16SAMPLERBUFFER = 204, /* F16SAMPLERBUFFER */ + YYSYMBOL_F16SAMPLER2DMS = 205, /* F16SAMPLER2DMS */ + YYSYMBOL_F16SAMPLER2DMSARRAY = 206, /* F16SAMPLER2DMSARRAY */ + YYSYMBOL_F16SAMPLER1DSHADOW = 207, /* F16SAMPLER1DSHADOW */ + YYSYMBOL_F16SAMPLER2DSHADOW = 208, /* F16SAMPLER2DSHADOW */ + YYSYMBOL_F16SAMPLER1DARRAYSHADOW = 209, /* F16SAMPLER1DARRAYSHADOW */ + YYSYMBOL_F16SAMPLER2DARRAYSHADOW = 210, /* F16SAMPLER2DARRAYSHADOW */ + YYSYMBOL_F16SAMPLER2DRECTSHADOW = 211, /* F16SAMPLER2DRECTSHADOW */ + YYSYMBOL_F16SAMPLERCUBESHADOW = 212, /* F16SAMPLERCUBESHADOW */ + YYSYMBOL_F16SAMPLERCUBEARRAYSHADOW = 213, /* F16SAMPLERCUBEARRAYSHADOW */ + YYSYMBOL_IMAGE1D = 214, /* IMAGE1D */ + YYSYMBOL_IIMAGE1D = 215, /* IIMAGE1D */ + YYSYMBOL_UIMAGE1D = 216, /* UIMAGE1D */ + YYSYMBOL_IMAGE2D = 217, /* IMAGE2D */ + YYSYMBOL_IIMAGE2D = 218, /* IIMAGE2D */ + YYSYMBOL_UIMAGE2D = 219, /* UIMAGE2D */ + YYSYMBOL_IMAGE3D = 220, /* IMAGE3D */ + YYSYMBOL_IIMAGE3D = 221, /* IIMAGE3D */ + YYSYMBOL_UIMAGE3D = 222, /* UIMAGE3D */ + YYSYMBOL_IMAGE2DRECT = 223, /* IMAGE2DRECT */ + YYSYMBOL_IIMAGE2DRECT = 224, /* IIMAGE2DRECT */ + YYSYMBOL_UIMAGE2DRECT = 225, /* UIMAGE2DRECT */ + YYSYMBOL_IMAGECUBE = 226, /* IMAGECUBE */ + YYSYMBOL_IIMAGECUBE = 227, /* IIMAGECUBE */ + YYSYMBOL_UIMAGECUBE = 228, /* UIMAGECUBE */ + YYSYMBOL_IMAGEBUFFER = 229, /* IMAGEBUFFER */ + YYSYMBOL_IIMAGEBUFFER = 230, /* IIMAGEBUFFER */ + YYSYMBOL_UIMAGEBUFFER = 231, /* UIMAGEBUFFER */ + YYSYMBOL_IMAGE1DARRAY = 232, /* IMAGE1DARRAY */ + YYSYMBOL_IIMAGE1DARRAY = 233, /* IIMAGE1DARRAY */ + YYSYMBOL_UIMAGE1DARRAY = 234, /* UIMAGE1DARRAY */ + YYSYMBOL_IMAGE2DARRAY = 235, /* IMAGE2DARRAY */ + YYSYMBOL_IIMAGE2DARRAY = 236, /* IIMAGE2DARRAY */ + YYSYMBOL_UIMAGE2DARRAY = 237, /* UIMAGE2DARRAY */ + YYSYMBOL_IMAGECUBEARRAY = 238, /* IMAGECUBEARRAY */ + YYSYMBOL_IIMAGECUBEARRAY = 239, /* IIMAGECUBEARRAY */ + YYSYMBOL_UIMAGECUBEARRAY = 240, /* UIMAGECUBEARRAY */ + YYSYMBOL_IMAGE2DMS = 241, /* IMAGE2DMS */ + YYSYMBOL_IIMAGE2DMS = 242, /* IIMAGE2DMS */ + YYSYMBOL_UIMAGE2DMS = 243, /* UIMAGE2DMS */ + YYSYMBOL_IMAGE2DMSARRAY = 244, /* IMAGE2DMSARRAY */ + YYSYMBOL_IIMAGE2DMSARRAY = 245, /* IIMAGE2DMSARRAY */ + YYSYMBOL_UIMAGE2DMSARRAY = 246, /* UIMAGE2DMSARRAY */ + YYSYMBOL_F16IMAGE1D = 247, /* F16IMAGE1D */ + YYSYMBOL_F16IMAGE2D = 248, /* F16IMAGE2D */ + YYSYMBOL_F16IMAGE3D = 249, /* F16IMAGE3D */ + YYSYMBOL_F16IMAGE2DRECT = 250, /* F16IMAGE2DRECT */ + YYSYMBOL_F16IMAGECUBE = 251, /* F16IMAGECUBE */ + YYSYMBOL_F16IMAGE1DARRAY = 252, /* F16IMAGE1DARRAY */ + YYSYMBOL_F16IMAGE2DARRAY = 253, /* F16IMAGE2DARRAY */ + YYSYMBOL_F16IMAGECUBEARRAY = 254, /* F16IMAGECUBEARRAY */ + YYSYMBOL_F16IMAGEBUFFER = 255, /* F16IMAGEBUFFER */ + YYSYMBOL_F16IMAGE2DMS = 256, /* F16IMAGE2DMS */ + YYSYMBOL_F16IMAGE2DMSARRAY = 257, /* F16IMAGE2DMSARRAY */ + YYSYMBOL_I64IMAGE1D = 258, /* I64IMAGE1D */ + YYSYMBOL_U64IMAGE1D = 259, /* U64IMAGE1D */ + YYSYMBOL_I64IMAGE2D = 260, /* I64IMAGE2D */ + YYSYMBOL_U64IMAGE2D = 261, /* U64IMAGE2D */ + YYSYMBOL_I64IMAGE3D = 262, /* I64IMAGE3D */ + YYSYMBOL_U64IMAGE3D = 263, /* U64IMAGE3D */ + YYSYMBOL_I64IMAGE2DRECT = 264, /* I64IMAGE2DRECT */ + YYSYMBOL_U64IMAGE2DRECT = 265, /* U64IMAGE2DRECT */ + YYSYMBOL_I64IMAGECUBE = 266, /* I64IMAGECUBE */ + YYSYMBOL_U64IMAGECUBE = 267, /* U64IMAGECUBE */ + YYSYMBOL_I64IMAGEBUFFER = 268, /* I64IMAGEBUFFER */ + YYSYMBOL_U64IMAGEBUFFER = 269, /* U64IMAGEBUFFER */ + YYSYMBOL_I64IMAGE1DARRAY = 270, /* I64IMAGE1DARRAY */ + YYSYMBOL_U64IMAGE1DARRAY = 271, /* U64IMAGE1DARRAY */ + YYSYMBOL_I64IMAGE2DARRAY = 272, /* I64IMAGE2DARRAY */ + YYSYMBOL_U64IMAGE2DARRAY = 273, /* U64IMAGE2DARRAY */ + YYSYMBOL_I64IMAGECUBEARRAY = 274, /* I64IMAGECUBEARRAY */ + YYSYMBOL_U64IMAGECUBEARRAY = 275, /* U64IMAGECUBEARRAY */ + YYSYMBOL_I64IMAGE2DMS = 276, /* I64IMAGE2DMS */ + YYSYMBOL_U64IMAGE2DMS = 277, /* U64IMAGE2DMS */ + YYSYMBOL_I64IMAGE2DMSARRAY = 278, /* I64IMAGE2DMSARRAY */ + YYSYMBOL_U64IMAGE2DMSARRAY = 279, /* U64IMAGE2DMSARRAY */ + YYSYMBOL_TEXTURECUBEARRAY = 280, /* TEXTURECUBEARRAY */ + YYSYMBOL_ITEXTURECUBEARRAY = 281, /* ITEXTURECUBEARRAY */ + YYSYMBOL_UTEXTURECUBEARRAY = 282, /* UTEXTURECUBEARRAY */ + YYSYMBOL_TEXTURE1D = 283, /* TEXTURE1D */ + YYSYMBOL_ITEXTURE1D = 284, /* ITEXTURE1D */ + YYSYMBOL_UTEXTURE1D = 285, /* UTEXTURE1D */ + YYSYMBOL_TEXTURE1DARRAY = 286, /* TEXTURE1DARRAY */ + YYSYMBOL_ITEXTURE1DARRAY = 287, /* ITEXTURE1DARRAY */ + YYSYMBOL_UTEXTURE1DARRAY = 288, /* UTEXTURE1DARRAY */ + YYSYMBOL_TEXTURE2DRECT = 289, /* TEXTURE2DRECT */ + YYSYMBOL_ITEXTURE2DRECT = 290, /* ITEXTURE2DRECT */ + YYSYMBOL_UTEXTURE2DRECT = 291, /* UTEXTURE2DRECT */ + YYSYMBOL_TEXTUREBUFFER = 292, /* TEXTUREBUFFER */ + YYSYMBOL_ITEXTUREBUFFER = 293, /* ITEXTUREBUFFER */ + YYSYMBOL_UTEXTUREBUFFER = 294, /* UTEXTUREBUFFER */ + YYSYMBOL_TEXTURE2DMS = 295, /* TEXTURE2DMS */ + YYSYMBOL_ITEXTURE2DMS = 296, /* ITEXTURE2DMS */ + YYSYMBOL_UTEXTURE2DMS = 297, /* UTEXTURE2DMS */ + YYSYMBOL_TEXTURE2DMSARRAY = 298, /* TEXTURE2DMSARRAY */ + YYSYMBOL_ITEXTURE2DMSARRAY = 299, /* ITEXTURE2DMSARRAY */ + YYSYMBOL_UTEXTURE2DMSARRAY = 300, /* UTEXTURE2DMSARRAY */ + YYSYMBOL_F16TEXTURE1D = 301, /* F16TEXTURE1D */ + YYSYMBOL_F16TEXTURE2D = 302, /* F16TEXTURE2D */ + YYSYMBOL_F16TEXTURE3D = 303, /* F16TEXTURE3D */ + YYSYMBOL_F16TEXTURE2DRECT = 304, /* F16TEXTURE2DRECT */ + YYSYMBOL_F16TEXTURECUBE = 305, /* F16TEXTURECUBE */ + YYSYMBOL_F16TEXTURE1DARRAY = 306, /* F16TEXTURE1DARRAY */ + YYSYMBOL_F16TEXTURE2DARRAY = 307, /* F16TEXTURE2DARRAY */ + YYSYMBOL_F16TEXTURECUBEARRAY = 308, /* F16TEXTURECUBEARRAY */ + YYSYMBOL_F16TEXTUREBUFFER = 309, /* F16TEXTUREBUFFER */ + YYSYMBOL_F16TEXTURE2DMS = 310, /* F16TEXTURE2DMS */ + YYSYMBOL_F16TEXTURE2DMSARRAY = 311, /* F16TEXTURE2DMSARRAY */ + YYSYMBOL_SUBPASSINPUT = 312, /* SUBPASSINPUT */ + YYSYMBOL_SUBPASSINPUTMS = 313, /* SUBPASSINPUTMS */ + YYSYMBOL_ISUBPASSINPUT = 314, /* ISUBPASSINPUT */ + YYSYMBOL_ISUBPASSINPUTMS = 315, /* ISUBPASSINPUTMS */ + YYSYMBOL_USUBPASSINPUT = 316, /* USUBPASSINPUT */ + YYSYMBOL_USUBPASSINPUTMS = 317, /* USUBPASSINPUTMS */ + YYSYMBOL_F16SUBPASSINPUT = 318, /* F16SUBPASSINPUT */ + YYSYMBOL_F16SUBPASSINPUTMS = 319, /* F16SUBPASSINPUTMS */ + YYSYMBOL_SPIRV_INSTRUCTION = 320, /* SPIRV_INSTRUCTION */ + YYSYMBOL_SPIRV_EXECUTION_MODE = 321, /* SPIRV_EXECUTION_MODE */ + YYSYMBOL_SPIRV_EXECUTION_MODE_ID = 322, /* SPIRV_EXECUTION_MODE_ID */ + YYSYMBOL_SPIRV_DECORATE = 323, /* SPIRV_DECORATE */ + YYSYMBOL_SPIRV_DECORATE_ID = 324, /* SPIRV_DECORATE_ID */ + YYSYMBOL_SPIRV_DECORATE_STRING = 325, /* SPIRV_DECORATE_STRING */ + YYSYMBOL_SPIRV_TYPE = 326, /* SPIRV_TYPE */ + YYSYMBOL_SPIRV_STORAGE_CLASS = 327, /* SPIRV_STORAGE_CLASS */ + YYSYMBOL_SPIRV_BY_REFERENCE = 328, /* SPIRV_BY_REFERENCE */ + YYSYMBOL_SPIRV_LITERAL = 329, /* SPIRV_LITERAL */ + YYSYMBOL_ATTACHMENTEXT = 330, /* ATTACHMENTEXT */ + YYSYMBOL_IATTACHMENTEXT = 331, /* IATTACHMENTEXT */ + YYSYMBOL_UATTACHMENTEXT = 332, /* UATTACHMENTEXT */ + YYSYMBOL_LEFT_OP = 333, /* LEFT_OP */ + YYSYMBOL_RIGHT_OP = 334, /* RIGHT_OP */ + YYSYMBOL_INC_OP = 335, /* INC_OP */ + YYSYMBOL_DEC_OP = 336, /* DEC_OP */ + YYSYMBOL_LE_OP = 337, /* LE_OP */ + YYSYMBOL_GE_OP = 338, /* GE_OP */ + YYSYMBOL_EQ_OP = 339, /* EQ_OP */ + YYSYMBOL_NE_OP = 340, /* NE_OP */ + YYSYMBOL_AND_OP = 341, /* AND_OP */ + YYSYMBOL_OR_OP = 342, /* OR_OP */ + YYSYMBOL_XOR_OP = 343, /* XOR_OP */ + YYSYMBOL_MUL_ASSIGN = 344, /* MUL_ASSIGN */ + YYSYMBOL_DIV_ASSIGN = 345, /* DIV_ASSIGN */ + YYSYMBOL_ADD_ASSIGN = 346, /* ADD_ASSIGN */ + YYSYMBOL_MOD_ASSIGN = 347, /* MOD_ASSIGN */ + YYSYMBOL_LEFT_ASSIGN = 348, /* LEFT_ASSIGN */ + YYSYMBOL_RIGHT_ASSIGN = 349, /* RIGHT_ASSIGN */ + YYSYMBOL_AND_ASSIGN = 350, /* AND_ASSIGN */ + YYSYMBOL_XOR_ASSIGN = 351, /* XOR_ASSIGN */ + YYSYMBOL_OR_ASSIGN = 352, /* OR_ASSIGN */ + YYSYMBOL_SUB_ASSIGN = 353, /* SUB_ASSIGN */ + YYSYMBOL_STRING_LITERAL = 354, /* STRING_LITERAL */ + YYSYMBOL_LEFT_PAREN = 355, /* LEFT_PAREN */ + YYSYMBOL_RIGHT_PAREN = 356, /* RIGHT_PAREN */ + YYSYMBOL_LEFT_BRACKET = 357, /* LEFT_BRACKET */ + YYSYMBOL_RIGHT_BRACKET = 358, /* RIGHT_BRACKET */ + YYSYMBOL_LEFT_BRACE = 359, /* LEFT_BRACE */ + YYSYMBOL_RIGHT_BRACE = 360, /* RIGHT_BRACE */ + YYSYMBOL_DOT = 361, /* DOT */ + YYSYMBOL_COMMA = 362, /* COMMA */ + YYSYMBOL_COLON = 363, /* COLON */ + YYSYMBOL_EQUAL = 364, /* EQUAL */ + YYSYMBOL_SEMICOLON = 365, /* SEMICOLON */ + YYSYMBOL_BANG = 366, /* BANG */ + YYSYMBOL_DASH = 367, /* DASH */ + YYSYMBOL_TILDE = 368, /* TILDE */ + YYSYMBOL_PLUS = 369, /* PLUS */ + YYSYMBOL_STAR = 370, /* STAR */ + YYSYMBOL_SLASH = 371, /* SLASH */ + YYSYMBOL_PERCENT = 372, /* PERCENT */ + YYSYMBOL_LEFT_ANGLE = 373, /* LEFT_ANGLE */ + YYSYMBOL_RIGHT_ANGLE = 374, /* RIGHT_ANGLE */ + YYSYMBOL_VERTICAL_BAR = 375, /* VERTICAL_BAR */ + YYSYMBOL_CARET = 376, /* CARET */ + YYSYMBOL_AMPERSAND = 377, /* AMPERSAND */ + YYSYMBOL_QUESTION = 378, /* QUESTION */ + YYSYMBOL_INVARIANT = 379, /* INVARIANT */ + YYSYMBOL_HIGH_PRECISION = 380, /* HIGH_PRECISION */ + YYSYMBOL_MEDIUM_PRECISION = 381, /* MEDIUM_PRECISION */ + YYSYMBOL_LOW_PRECISION = 382, /* LOW_PRECISION */ + YYSYMBOL_PRECISION = 383, /* PRECISION */ + YYSYMBOL_PACKED = 384, /* PACKED */ + YYSYMBOL_RESOURCE = 385, /* RESOURCE */ + YYSYMBOL_SUPERP = 386, /* SUPERP */ + YYSYMBOL_FLOATCONSTANT = 387, /* FLOATCONSTANT */ + YYSYMBOL_INTCONSTANT = 388, /* INTCONSTANT */ + YYSYMBOL_UINTCONSTANT = 389, /* UINTCONSTANT */ + YYSYMBOL_BOOLCONSTANT = 390, /* BOOLCONSTANT */ + YYSYMBOL_IDENTIFIER = 391, /* IDENTIFIER */ + YYSYMBOL_TYPE_NAME = 392, /* TYPE_NAME */ + YYSYMBOL_CENTROID = 393, /* CENTROID */ + YYSYMBOL_IN = 394, /* IN */ + YYSYMBOL_OUT = 395, /* OUT */ + YYSYMBOL_INOUT = 396, /* INOUT */ + YYSYMBOL_STRUCT = 397, /* STRUCT */ + YYSYMBOL_VOID = 398, /* VOID */ + YYSYMBOL_WHILE = 399, /* WHILE */ + YYSYMBOL_BREAK = 400, /* BREAK */ + YYSYMBOL_CONTINUE = 401, /* CONTINUE */ + YYSYMBOL_DO = 402, /* DO */ + YYSYMBOL_ELSE = 403, /* ELSE */ + YYSYMBOL_FOR = 404, /* FOR */ + YYSYMBOL_IF = 405, /* IF */ + YYSYMBOL_DISCARD = 406, /* DISCARD */ + YYSYMBOL_RETURN = 407, /* RETURN */ + YYSYMBOL_SWITCH = 408, /* SWITCH */ + YYSYMBOL_CASE = 409, /* CASE */ + YYSYMBOL_DEFAULT = 410, /* DEFAULT */ + YYSYMBOL_TERMINATE_INVOCATION = 411, /* TERMINATE_INVOCATION */ + YYSYMBOL_TERMINATE_RAY = 412, /* TERMINATE_RAY */ + YYSYMBOL_IGNORE_INTERSECTION = 413, /* IGNORE_INTERSECTION */ + YYSYMBOL_UNIFORM = 414, /* UNIFORM */ + YYSYMBOL_SHARED = 415, /* SHARED */ + YYSYMBOL_BUFFER = 416, /* BUFFER */ + YYSYMBOL_TILEIMAGEEXT = 417, /* TILEIMAGEEXT */ + YYSYMBOL_FLAT = 418, /* FLAT */ + YYSYMBOL_SMOOTH = 419, /* SMOOTH */ + YYSYMBOL_LAYOUT = 420, /* LAYOUT */ + YYSYMBOL_DOUBLECONSTANT = 421, /* DOUBLECONSTANT */ + YYSYMBOL_INT16CONSTANT = 422, /* INT16CONSTANT */ + YYSYMBOL_UINT16CONSTANT = 423, /* UINT16CONSTANT */ + YYSYMBOL_FLOAT16CONSTANT = 424, /* FLOAT16CONSTANT */ + YYSYMBOL_INT32CONSTANT = 425, /* INT32CONSTANT */ + YYSYMBOL_UINT32CONSTANT = 426, /* UINT32CONSTANT */ + YYSYMBOL_INT64CONSTANT = 427, /* INT64CONSTANT */ + YYSYMBOL_UINT64CONSTANT = 428, /* UINT64CONSTANT */ + YYSYMBOL_SUBROUTINE = 429, /* SUBROUTINE */ + YYSYMBOL_DEMOTE = 430, /* DEMOTE */ + YYSYMBOL_PAYLOADNV = 431, /* PAYLOADNV */ + YYSYMBOL_PAYLOADINNV = 432, /* PAYLOADINNV */ + YYSYMBOL_HITATTRNV = 433, /* HITATTRNV */ + YYSYMBOL_CALLDATANV = 434, /* CALLDATANV */ + YYSYMBOL_CALLDATAINNV = 435, /* CALLDATAINNV */ + YYSYMBOL_PAYLOADEXT = 436, /* PAYLOADEXT */ + YYSYMBOL_PAYLOADINEXT = 437, /* PAYLOADINEXT */ + YYSYMBOL_HITATTREXT = 438, /* HITATTREXT */ + YYSYMBOL_CALLDATAEXT = 439, /* CALLDATAEXT */ + YYSYMBOL_CALLDATAINEXT = 440, /* CALLDATAINEXT */ + YYSYMBOL_PATCH = 441, /* PATCH */ + YYSYMBOL_SAMPLE = 442, /* SAMPLE */ + YYSYMBOL_NONUNIFORM = 443, /* NONUNIFORM */ + YYSYMBOL_COHERENT = 444, /* COHERENT */ + YYSYMBOL_VOLATILE = 445, /* VOLATILE */ + YYSYMBOL_RESTRICT = 446, /* RESTRICT */ + YYSYMBOL_READONLY = 447, /* READONLY */ + YYSYMBOL_WRITEONLY = 448, /* WRITEONLY */ + YYSYMBOL_DEVICECOHERENT = 449, /* DEVICECOHERENT */ + YYSYMBOL_QUEUEFAMILYCOHERENT = 450, /* QUEUEFAMILYCOHERENT */ + YYSYMBOL_WORKGROUPCOHERENT = 451, /* WORKGROUPCOHERENT */ + YYSYMBOL_SUBGROUPCOHERENT = 452, /* SUBGROUPCOHERENT */ + YYSYMBOL_NONPRIVATE = 453, /* NONPRIVATE */ + YYSYMBOL_SHADERCALLCOHERENT = 454, /* SHADERCALLCOHERENT */ + YYSYMBOL_NOPERSPECTIVE = 455, /* NOPERSPECTIVE */ + YYSYMBOL_EXPLICITINTERPAMD = 456, /* EXPLICITINTERPAMD */ + YYSYMBOL_PERVERTEXEXT = 457, /* PERVERTEXEXT */ + YYSYMBOL_PERVERTEXNV = 458, /* PERVERTEXNV */ + YYSYMBOL_PERPRIMITIVENV = 459, /* PERPRIMITIVENV */ + YYSYMBOL_PERVIEWNV = 460, /* PERVIEWNV */ + YYSYMBOL_PERTASKNV = 461, /* PERTASKNV */ + YYSYMBOL_PERPRIMITIVEEXT = 462, /* PERPRIMITIVEEXT */ + YYSYMBOL_TASKPAYLOADWORKGROUPEXT = 463, /* TASKPAYLOADWORKGROUPEXT */ + YYSYMBOL_PRECISE = 464, /* PRECISE */ + YYSYMBOL_YYACCEPT = 465, /* $accept */ + YYSYMBOL_variable_identifier = 466, /* variable_identifier */ + YYSYMBOL_primary_expression = 467, /* primary_expression */ + YYSYMBOL_postfix_expression = 468, /* postfix_expression */ + YYSYMBOL_integer_expression = 469, /* integer_expression */ + YYSYMBOL_function_call = 470, /* function_call */ + YYSYMBOL_function_call_or_method = 471, /* function_call_or_method */ + YYSYMBOL_function_call_generic = 472, /* function_call_generic */ + YYSYMBOL_function_call_header_no_parameters = 473, /* function_call_header_no_parameters */ + YYSYMBOL_function_call_header_with_parameters = 474, /* function_call_header_with_parameters */ + YYSYMBOL_function_call_header = 475, /* function_call_header */ + YYSYMBOL_function_identifier = 476, /* function_identifier */ + YYSYMBOL_unary_expression = 477, /* unary_expression */ + YYSYMBOL_unary_operator = 478, /* unary_operator */ + YYSYMBOL_multiplicative_expression = 479, /* multiplicative_expression */ + YYSYMBOL_additive_expression = 480, /* additive_expression */ + YYSYMBOL_shift_expression = 481, /* shift_expression */ + YYSYMBOL_relational_expression = 482, /* relational_expression */ + YYSYMBOL_equality_expression = 483, /* equality_expression */ + YYSYMBOL_and_expression = 484, /* and_expression */ + YYSYMBOL_exclusive_or_expression = 485, /* exclusive_or_expression */ + YYSYMBOL_inclusive_or_expression = 486, /* inclusive_or_expression */ + YYSYMBOL_logical_and_expression = 487, /* logical_and_expression */ + YYSYMBOL_logical_xor_expression = 488, /* logical_xor_expression */ + YYSYMBOL_logical_or_expression = 489, /* logical_or_expression */ + YYSYMBOL_conditional_expression = 490, /* conditional_expression */ + YYSYMBOL_491_1 = 491, /* $@1 */ + YYSYMBOL_assignment_expression = 492, /* assignment_expression */ + YYSYMBOL_assignment_operator = 493, /* assignment_operator */ + YYSYMBOL_expression = 494, /* expression */ + YYSYMBOL_constant_expression = 495, /* constant_expression */ + YYSYMBOL_declaration = 496, /* declaration */ + YYSYMBOL_block_structure = 497, /* block_structure */ + YYSYMBOL_498_2 = 498, /* $@2 */ + YYSYMBOL_identifier_list = 499, /* identifier_list */ + YYSYMBOL_function_prototype = 500, /* function_prototype */ + YYSYMBOL_function_declarator = 501, /* function_declarator */ + YYSYMBOL_function_header_with_parameters = 502, /* function_header_with_parameters */ + YYSYMBOL_function_header = 503, /* function_header */ + YYSYMBOL_parameter_declarator = 504, /* parameter_declarator */ + YYSYMBOL_parameter_declaration = 505, /* parameter_declaration */ + YYSYMBOL_parameter_type_specifier = 506, /* parameter_type_specifier */ + YYSYMBOL_init_declarator_list = 507, /* init_declarator_list */ + YYSYMBOL_single_declaration = 508, /* single_declaration */ + YYSYMBOL_fully_specified_type = 509, /* fully_specified_type */ + YYSYMBOL_invariant_qualifier = 510, /* invariant_qualifier */ + YYSYMBOL_interpolation_qualifier = 511, /* interpolation_qualifier */ + YYSYMBOL_layout_qualifier = 512, /* layout_qualifier */ + YYSYMBOL_layout_qualifier_id_list = 513, /* layout_qualifier_id_list */ + YYSYMBOL_layout_qualifier_id = 514, /* layout_qualifier_id */ + YYSYMBOL_precise_qualifier = 515, /* precise_qualifier */ + YYSYMBOL_type_qualifier = 516, /* type_qualifier */ + YYSYMBOL_single_type_qualifier = 517, /* single_type_qualifier */ + YYSYMBOL_storage_qualifier = 518, /* storage_qualifier */ + YYSYMBOL_non_uniform_qualifier = 519, /* non_uniform_qualifier */ + YYSYMBOL_type_name_list = 520, /* type_name_list */ + YYSYMBOL_type_specifier = 521, /* type_specifier */ + YYSYMBOL_array_specifier = 522, /* array_specifier */ + YYSYMBOL_type_parameter_specifier_opt = 523, /* type_parameter_specifier_opt */ + YYSYMBOL_type_parameter_specifier = 524, /* type_parameter_specifier */ + YYSYMBOL_type_parameter_specifier_list = 525, /* type_parameter_specifier_list */ + YYSYMBOL_type_specifier_nonarray = 526, /* type_specifier_nonarray */ + YYSYMBOL_precision_qualifier = 527, /* precision_qualifier */ + YYSYMBOL_struct_specifier = 528, /* struct_specifier */ + YYSYMBOL_529_3 = 529, /* $@3 */ + YYSYMBOL_530_4 = 530, /* $@4 */ + YYSYMBOL_struct_declaration_list = 531, /* struct_declaration_list */ + YYSYMBOL_struct_declaration = 532, /* struct_declaration */ + YYSYMBOL_struct_declarator_list = 533, /* struct_declarator_list */ + YYSYMBOL_struct_declarator = 534, /* struct_declarator */ + YYSYMBOL_initializer = 535, /* initializer */ + YYSYMBOL_initializer_list = 536, /* initializer_list */ + YYSYMBOL_declaration_statement = 537, /* declaration_statement */ + YYSYMBOL_statement = 538, /* statement */ + YYSYMBOL_simple_statement = 539, /* simple_statement */ + YYSYMBOL_demote_statement = 540, /* demote_statement */ + YYSYMBOL_compound_statement = 541, /* compound_statement */ + YYSYMBOL_542_5 = 542, /* $@5 */ + YYSYMBOL_543_6 = 543, /* $@6 */ + YYSYMBOL_statement_no_new_scope = 544, /* statement_no_new_scope */ + YYSYMBOL_statement_scoped = 545, /* statement_scoped */ + YYSYMBOL_546_7 = 546, /* $@7 */ + YYSYMBOL_547_8 = 547, /* $@8 */ + YYSYMBOL_compound_statement_no_new_scope = 548, /* compound_statement_no_new_scope */ + YYSYMBOL_statement_list = 549, /* statement_list */ + YYSYMBOL_expression_statement = 550, /* expression_statement */ + YYSYMBOL_selection_statement = 551, /* selection_statement */ + YYSYMBOL_selection_statement_nonattributed = 552, /* selection_statement_nonattributed */ + YYSYMBOL_selection_rest_statement = 553, /* selection_rest_statement */ + YYSYMBOL_condition = 554, /* condition */ + YYSYMBOL_switch_statement = 555, /* switch_statement */ + YYSYMBOL_switch_statement_nonattributed = 556, /* switch_statement_nonattributed */ + YYSYMBOL_557_9 = 557, /* $@9 */ + YYSYMBOL_switch_statement_list = 558, /* switch_statement_list */ + YYSYMBOL_case_label = 559, /* case_label */ + YYSYMBOL_iteration_statement = 560, /* iteration_statement */ + YYSYMBOL_iteration_statement_nonattributed = 561, /* iteration_statement_nonattributed */ + YYSYMBOL_562_10 = 562, /* $@10 */ + YYSYMBOL_563_11 = 563, /* $@11 */ + YYSYMBOL_564_12 = 564, /* $@12 */ + YYSYMBOL_for_init_statement = 565, /* for_init_statement */ + YYSYMBOL_conditionopt = 566, /* conditionopt */ + YYSYMBOL_for_rest_statement = 567, /* for_rest_statement */ + YYSYMBOL_jump_statement = 568, /* jump_statement */ + YYSYMBOL_translation_unit = 569, /* translation_unit */ + YYSYMBOL_external_declaration = 570, /* external_declaration */ + YYSYMBOL_function_definition = 571, /* function_definition */ + YYSYMBOL_572_13 = 572, /* $@13 */ + YYSYMBOL_attribute = 573, /* attribute */ + YYSYMBOL_attribute_list = 574, /* attribute_list */ + YYSYMBOL_single_attribute = 575, /* single_attribute */ + YYSYMBOL_spirv_requirements_list = 576, /* spirv_requirements_list */ + YYSYMBOL_spirv_requirements_parameter = 577, /* spirv_requirements_parameter */ + YYSYMBOL_spirv_extension_list = 578, /* spirv_extension_list */ + YYSYMBOL_spirv_capability_list = 579, /* spirv_capability_list */ + YYSYMBOL_spirv_execution_mode_qualifier = 580, /* spirv_execution_mode_qualifier */ + YYSYMBOL_spirv_execution_mode_parameter_list = 581, /* spirv_execution_mode_parameter_list */ + YYSYMBOL_spirv_execution_mode_parameter = 582, /* spirv_execution_mode_parameter */ + YYSYMBOL_spirv_execution_mode_id_parameter_list = 583, /* spirv_execution_mode_id_parameter_list */ + YYSYMBOL_spirv_storage_class_qualifier = 584, /* spirv_storage_class_qualifier */ + YYSYMBOL_spirv_decorate_qualifier = 585, /* spirv_decorate_qualifier */ + YYSYMBOL_spirv_decorate_parameter_list = 586, /* spirv_decorate_parameter_list */ + YYSYMBOL_spirv_decorate_parameter = 587, /* spirv_decorate_parameter */ + YYSYMBOL_spirv_decorate_id_parameter_list = 588, /* spirv_decorate_id_parameter_list */ + YYSYMBOL_spirv_decorate_id_parameter = 589, /* spirv_decorate_id_parameter */ + YYSYMBOL_spirv_decorate_string_parameter_list = 590, /* spirv_decorate_string_parameter_list */ + YYSYMBOL_spirv_type_specifier = 591, /* spirv_type_specifier */ + YYSYMBOL_spirv_type_parameter_list = 592, /* spirv_type_parameter_list */ + YYSYMBOL_spirv_type_parameter = 593, /* spirv_type_parameter */ + YYSYMBOL_spirv_instruction_qualifier = 594, /* spirv_instruction_qualifier */ + YYSYMBOL_spirv_instruction_qualifier_list = 595, /* spirv_instruction_qualifier_list */ + YYSYMBOL_spirv_instruction_qualifier_id = 596 /* spirv_instruction_qualifier_id */ }; typedef enum yysymbol_kind_t yysymbol_kind_t; /* Second part of user prologue. */ -#line 136 "MachineIndependent/glslang.y" +#line 111 "MachineIndependent/glslang.y" -/* windows only pragma */ -#ifdef _MSC_VER - #pragma warning(disable : 4065) - #pragma warning(disable : 4127) - #pragma warning(disable : 4244) -#endif - #define parseContext (*pParseContext) #define yyerror(context, msg) context->parserError(msg) extern int yylex(YYSTYPE*, TParseContext&); -#line 735 "MachineIndependent/glslang_tab.cpp" +#line 736 "MachineIndependent/glslang_tab.cpp" #ifdef short @@ -771,6 +772,18 @@ typedef int_least16_t yytype_int16; typedef short yytype_int16; #endif +/* Work around bug in HP-UX 11.23, which defines these macros + incorrectly for preprocessor constants. This workaround can likely + be removed in 2023, as HPE has promised support for HP-UX 11.23 + (aka HP-UX 11i v2) only through the end of 2022; see Table 2 of + . */ +#ifdef __hpux +# undef UINT_LEAST8_MAX +# undef UINT_LEAST16_MAX +# define UINT_LEAST8_MAX 255 +# define UINT_LEAST16_MAX 65535 +#endif + #if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__ typedef __UINT_LEAST8_TYPE__ yytype_uint8; #elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \ @@ -868,17 +881,23 @@ typedef int yy_state_fast_t; /* Suppress unused-variable warnings by "using" E. */ #if ! defined lint || defined __GNUC__ -# define YYUSE(E) ((void) (E)) +# define YY_USE(E) ((void) (E)) #else -# define YYUSE(E) /* empty */ +# define YY_USE(E) /* empty */ #endif -#if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ /* Suppress an incorrect diagnostic about yylval being uninitialized. */ -# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ +#if defined __GNUC__ && ! defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__ +# if __GNUC__ * 100 + __GNUC_MINOR__ < 407 +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") +# else +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ _Pragma ("GCC diagnostic push") \ _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \ _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") +# endif # define YY_IGNORE_MAYBE_UNINITIALIZED_END \ _Pragma ("GCC diagnostic pop") #else @@ -1035,21 +1054,21 @@ union yyalloc #endif /* !YYCOPY_NEEDED */ /* YYFINAL -- State number of the termination state. */ -#define YYFINAL 445 +#define YYFINAL 452 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 12503 +#define YYLAST 12701 /* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 458 +#define YYNTOKENS 465 /* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 131 +#define YYNNTS 132 /* YYNRULES -- Number of rules. */ -#define YYNRULES 686 +#define YYNRULES 700 /* YYNSTATES -- Number of states. */ -#define YYNSTATES 932 +#define YYNSTATES 946 /* YYMAXUTOK -- Last valid token kind. */ -#define YYMAXUTOK 712 +#define YYMAXUTOK 719 /* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM @@ -1134,82 +1153,84 @@ static const yytype_int16 yytranslate[] = 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, - 455, 456, 457 + 455, 456, 457, 458, 459, 460, 461, 462, 463, 464 }; #if YYDEBUG - /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ +/* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ static const yytype_int16 yyrline[] = { - 0, 392, 392, 398, 401, 406, 409, 412, 416, 420, - 423, 427, 431, 435, 439, 443, 447, 453, 461, 464, - 467, 470, 473, 478, 486, 493, 500, 506, 510, 517, - 520, 526, 533, 543, 551, 556, 584, 593, 599, 603, - 607, 627, 628, 629, 630, 636, 637, 642, 647, 656, - 657, 662, 670, 671, 677, 686, 687, 692, 697, 702, - 710, 711, 720, 732, 733, 742, 743, 752, 753, 762, - 763, 771, 772, 780, 781, 789, 790, 790, 808, 809, - 825, 829, 833, 837, 842, 846, 850, 854, 858, 862, - 866, 873, 876, 887, 894, 900, 907, 913, 918, 925, - 929, 933, 937, 942, 947, 956, 956, 967, 971, 978, - 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, 1321, 1328, 1339, 1345, - 1348, 1355, 1359, 1363, 1372, 1382, 1385, 1396, 1399, 1402, - 1406, 1410, 1415, 1419, 1422, 1427, 1431, 1436, 1445, 1449, - 1454, 1460, 1466, 1473, 1478, 1486, 1492, 1504, 1518, 1524, - 1529, 1537, 1545, 1553, 1561, 1569, 1577, 1585, 1593, 1600, - 1607, 1611, 1616, 1621, 1626, 1631, 1636, 1641, 1645, 1649, - 1653, 1657, 1663, 1669, 1681, 1688, 1691, 1700, 1705, 1715, - 1720, 1728, 1732, 1742, 1745, 1751, 1757, 1764, 1774, 1778, - 1782, 1786, 1791, 1795, 1800, 1805, 1810, 1815, 1820, 1825, - 1830, 1835, 1840, 1846, 1852, 1858, 1863, 1868, 1873, 1878, - 1883, 1888, 1893, 1898, 1903, 1908, 1913, 1919, 1926, 1931, - 1936, 1941, 1946, 1951, 1956, 1961, 1966, 1971, 1976, 1981, - 1989, 1997, 2005, 2011, 2017, 2023, 2029, 2035, 2041, 2047, - 2053, 2059, 2065, 2071, 2077, 2083, 2089, 2095, 2101, 2107, - 2113, 2119, 2125, 2131, 2137, 2143, 2149, 2155, 2161, 2167, - 2173, 2179, 2185, 2191, 2197, 2203, 2211, 2219, 2227, 2235, - 2243, 2251, 2259, 2267, 2275, 2283, 2291, 2299, 2305, 2311, - 2317, 2323, 2329, 2335, 2341, 2347, 2353, 2359, 2365, 2371, - 2377, 2383, 2389, 2395, 2401, 2407, 2413, 2419, 2425, 2431, - 2437, 2443, 2449, 2455, 2461, 2467, 2473, 2479, 2485, 2491, - 2497, 2503, 2509, 2515, 2519, 2523, 2527, 2532, 2538, 2543, - 2548, 2553, 2558, 2563, 2568, 2574, 2579, 2584, 2589, 2594, - 2599, 2605, 2611, 2617, 2623, 2629, 2635, 2641, 2647, 2653, - 2659, 2665, 2671, 2677, 2683, 2688, 2693, 2698, 2703, 2708, - 2713, 2719, 2724, 2729, 2734, 2739, 2744, 2749, 2754, 2760, - 2765, 2770, 2775, 2780, 2785, 2790, 2795, 2800, 2805, 2810, - 2815, 2820, 2825, 2830, 2836, 2841, 2846, 2852, 2858, 2863, - 2868, 2873, 2879, 2884, 2889, 2894, 2900, 2905, 2910, 2915, - 2921, 2926, 2931, 2936, 2942, 2948, 2954, 2960, 2965, 2971, - 2977, 2983, 2988, 2993, 2998, 3003, 3008, 3014, 3019, 3024, - 3029, 3035, 3040, 3045, 3050, 3056, 3061, 3066, 3071, 3077, - 3082, 3087, 3092, 3098, 3103, 3108, 3113, 3119, 3124, 3129, - 3134, 3140, 3145, 3150, 3155, 3161, 3166, 3171, 3176, 3182, - 3187, 3192, 3197, 3203, 3208, 3213, 3218, 3224, 3229, 3234, - 3239, 3245, 3250, 3255, 3260, 3266, 3271, 3276, 3281, 3287, - 3292, 3297, 3302, 3308, 3313, 3318, 3323, 3328, 3333, 3338, - 3343, 3348, 3353, 3358, 3363, 3368, 3373, 3378, 3383, 3388, - 3393, 3398, 3403, 3408, 3413, 3418, 3423, 3428, 3434, 3440, - 3446, 3452, 3459, 3466, 3472, 3478, 3484, 3490, 3496, 3502, - 3508, 3513, 3518, 3534, 3539, 3544, 3552, 3552, 3563, 3563, - 3573, 3576, 3589, 3611, 3638, 3642, 3648, 3653, 3664, 3668, - 3674, 3680, 3691, 3694, 3701, 3705, 3706, 3712, 3713, 3714, - 3715, 3716, 3717, 3718, 3720, 3726, 3735, 3736, 3740, 3736, - 3752, 3753, 3757, 3757, 3764, 3764, 3778, 3781, 3789, 3797, - 3808, 3809, 3813, 3817, 3825, 3832, 3836, 3844, 3848, 3861, - 3865, 3873, 3873, 3893, 3896, 3902, 3914, 3926, 3930, 3938, - 3938, 3953, 3953, 3971, 3971, 3992, 3995, 4001, 4004, 4010, - 4014, 4021, 4026, 4031, 4038, 4041, 4045, 4050, 4054, 4064, - 4068, 4077, 4080, 4084, 4093, 4093, 4135, 4140, 4143, 4148, - 4151, 4158, 4161, 4166, 4169, 4174, 4177, 4182, 4185, 4190, - 4194, 4199, 4203, 4208, 4212, 4219, 4222, 4227, 4230, 4233, - 4236, 4239, 4244, 4253, 4264, 4269, 4277, 4281, 4286, 4290, - 4295, 4299, 4304, 4308, 4315, 4318, 4323, 4326, 4329, 4332, - 4337, 4345, 4355, 4359, 4364, 4368, 4373, 4377, 4384, 4387, - 4392, 4397, 4400, 4406, 4409, 4414, 4417 + 0, 355, 355, 361, 364, 369, 372, 375, 379, 382, + 385, 389, 393, 397, 401, 405, 409, 415, 422, 425, + 428, 431, 434, 439, 447, 454, 461, 467, 471, 478, + 481, 487, 505, 527, 535, 540, 567, 575, 581, 585, + 589, 609, 610, 611, 612, 618, 619, 624, 629, 638, + 639, 644, 652, 653, 659, 668, 669, 674, 679, 684, + 692, 693, 702, 714, 715, 724, 725, 734, 735, 744, + 745, 753, 754, 762, 763, 771, 772, 772, 790, 791, + 807, 811, 815, 819, 824, 828, 832, 836, 840, 844, + 848, 855, 858, 869, 876, 881, 888, 893, 898, 905, + 909, 913, 917, 922, 927, 936, 936, 947, 951, 958, + 963, 969, 975, 985, 988, 995, 1008, 1031, 1054, 1069, + 1094, 1105, 1115, 1125, 1135, 1144, 1147, 1151, 1155, 1160, + 1168, 1173, 1178, 1183, 1188, 1197, 1207, 1234, 1243, 1250, + 1257, 1264, 1271, 1279, 1287, 1297, 1307, 1314, 1324, 1330, + 1333, 1340, 1344, 1348, 1356, 1365, 1368, 1379, 1382, 1385, + 1389, 1393, 1397, 1401, 1404, 1409, 1413, 1418, 1426, 1430, + 1435, 1441, 1447, 1454, 1459, 1464, 1472, 1477, 1489, 1503, + 1509, 1514, 1522, 1530, 1538, 1546, 1554, 1562, 1570, 1578, + 1586, 1593, 1600, 1604, 1609, 1614, 1619, 1624, 1629, 1634, + 1638, 1642, 1646, 1650, 1656, 1662, 1672, 1679, 1682, 1690, + 1697, 1708, 1713, 1721, 1725, 1735, 1738, 1744, 1750, 1755, + 1763, 1773, 1777, 1781, 1785, 1790, 1794, 1799, 1804, 1809, + 1814, 1819, 1824, 1829, 1834, 1839, 1845, 1851, 1857, 1862, + 1867, 1872, 1877, 1882, 1887, 1892, 1897, 1902, 1907, 1912, + 1917, 1924, 1929, 1934, 1939, 1944, 1949, 1954, 1959, 1964, + 1969, 1974, 1979, 1987, 1995, 2003, 2009, 2015, 2021, 2027, + 2033, 2039, 2045, 2051, 2057, 2063, 2069, 2075, 2081, 2087, + 2093, 2099, 2105, 2111, 2117, 2123, 2129, 2135, 2141, 2147, + 2153, 2159, 2165, 2171, 2177, 2183, 2189, 2195, 2201, 2209, + 2217, 2225, 2233, 2241, 2249, 2257, 2265, 2273, 2281, 2289, + 2297, 2303, 2309, 2315, 2321, 2327, 2333, 2339, 2345, 2351, + 2357, 2363, 2369, 2375, 2381, 2387, 2393, 2399, 2405, 2411, + 2417, 2423, 2429, 2435, 2441, 2447, 2453, 2459, 2465, 2471, + 2477, 2483, 2489, 2495, 2501, 2507, 2513, 2517, 2521, 2525, + 2530, 2535, 2540, 2545, 2550, 2555, 2560, 2565, 2570, 2575, + 2580, 2585, 2590, 2595, 2601, 2607, 2613, 2619, 2625, 2631, + 2637, 2643, 2649, 2655, 2661, 2667, 2673, 2678, 2683, 2688, + 2693, 2698, 2703, 2708, 2713, 2718, 2723, 2728, 2733, 2738, + 2743, 2748, 2753, 2758, 2763, 2768, 2773, 2778, 2783, 2788, + 2793, 2798, 2803, 2808, 2813, 2818, 2823, 2828, 2833, 2838, + 2844, 2850, 2855, 2860, 2865, 2871, 2876, 2881, 2886, 2892, + 2897, 2902, 2907, 2913, 2918, 2923, 2928, 2934, 2940, 2946, + 2952, 2957, 2963, 2969, 2975, 2980, 2985, 2990, 2995, 3000, + 3006, 3011, 3016, 3021, 3027, 3032, 3037, 3042, 3048, 3053, + 3058, 3063, 3069, 3074, 3079, 3084, 3090, 3095, 3100, 3105, + 3111, 3116, 3121, 3126, 3132, 3137, 3142, 3147, 3153, 3158, + 3163, 3168, 3174, 3179, 3184, 3189, 3195, 3200, 3205, 3210, + 3216, 3221, 3226, 3231, 3237, 3242, 3247, 3252, 3258, 3263, + 3268, 3273, 3279, 3284, 3289, 3294, 3300, 3305, 3310, 3315, + 3320, 3325, 3330, 3335, 3340, 3345, 3350, 3355, 3360, 3365, + 3370, 3375, 3380, 3385, 3390, 3395, 3400, 3405, 3410, 3415, + 3420, 3426, 3432, 3438, 3444, 3450, 3456, 3462, 3469, 3476, + 3482, 3488, 3494, 3500, 3507, 3514, 3521, 3528, 3532, 3536, + 3541, 3557, 3562, 3567, 3575, 3575, 3592, 3592, 3602, 3605, + 3618, 3640, 3667, 3671, 3677, 3682, 3693, 3696, 3702, 3708, + 3717, 3720, 3726, 3730, 3731, 3737, 3738, 3739, 3740, 3741, + 3742, 3743, 3744, 3748, 3756, 3757, 3761, 3757, 3773, 3774, + 3778, 3778, 3785, 3785, 3799, 3802, 3810, 3818, 3829, 3830, + 3834, 3837, 3844, 3851, 3855, 3863, 3867, 3880, 3883, 3890, + 3890, 3910, 3913, 3919, 3931, 3943, 3946, 3953, 3953, 3968, + 3968, 3986, 3986, 4007, 4010, 4016, 4019, 4025, 4029, 4036, + 4041, 4046, 4053, 4056, 4060, 4064, 4068, 4077, 4081, 4090, + 4093, 4096, 4104, 4104, 4146, 4151, 4154, 4159, 4162, 4167, + 4170, 4175, 4178, 4183, 4186, 4191, 4194, 4199, 4203, 4208, + 4212, 4217, 4221, 4228, 4231, 4236, 4239, 4242, 4245, 4248, + 4253, 4262, 4273, 4278, 4286, 4290, 4295, 4299, 4304, 4308, + 4313, 4317, 4324, 4327, 4332, 4335, 4338, 4341, 4346, 4349, + 4354, 4360, 4363, 4366, 4369, 4374, 4378, 4383, 4387, 4392, + 4396, 4403, 4406, 4411, 4414, 4419, 4422, 4428, 4431, 4436, + 4439 }; #endif @@ -1254,16 +1275,17 @@ static const char *const yytname[] = "F32MAT4X2", "F32MAT4X3", "F32MAT4X4", "F64MAT2X2", "F64MAT2X3", "F64MAT2X4", "F64MAT3X2", "F64MAT3X3", "F64MAT3X4", "F64MAT4X2", "F64MAT4X3", "F64MAT4X4", "ATOMIC_UINT", "ACCSTRUCTNV", "ACCSTRUCTEXT", - "RAYQUERYEXT", "FCOOPMATNV", "ICOOPMATNV", "UCOOPMATNV", - "SAMPLERCUBEARRAY", "SAMPLERCUBEARRAYSHADOW", "ISAMPLERCUBEARRAY", - "USAMPLERCUBEARRAY", "SAMPLER1D", "SAMPLER1DARRAY", - "SAMPLER1DARRAYSHADOW", "ISAMPLER1D", "SAMPLER1DSHADOW", "SAMPLER2DRECT", - "SAMPLER2DRECTSHADOW", "ISAMPLER2DRECT", "USAMPLER2DRECT", - "SAMPLERBUFFER", "ISAMPLERBUFFER", "USAMPLERBUFFER", "SAMPLER2DMS", - "ISAMPLER2DMS", "USAMPLER2DMS", "SAMPLER2DMSARRAY", "ISAMPLER2DMSARRAY", - "USAMPLER2DMSARRAY", "SAMPLEREXTERNALOES", "SAMPLEREXTERNAL2DY2YEXT", - "ISAMPLER1DARRAY", "USAMPLER1D", "USAMPLER1DARRAY", "F16SAMPLER1D", - "F16SAMPLER2D", "F16SAMPLER3D", "F16SAMPLER2DRECT", "F16SAMPLERCUBE", + "RAYQUERYEXT", "FCOOPMATNV", "ICOOPMATNV", "UCOOPMATNV", "COOPMAT", + "HITOBJECTNV", "HITOBJECTATTRNV", "SAMPLERCUBEARRAY", + "SAMPLERCUBEARRAYSHADOW", "ISAMPLERCUBEARRAY", "USAMPLERCUBEARRAY", + "SAMPLER1D", "SAMPLER1DARRAY", "SAMPLER1DARRAYSHADOW", "ISAMPLER1D", + "SAMPLER1DSHADOW", "SAMPLER2DRECT", "SAMPLER2DRECTSHADOW", + "ISAMPLER2DRECT", "USAMPLER2DRECT", "SAMPLERBUFFER", "ISAMPLERBUFFER", + "USAMPLERBUFFER", "SAMPLER2DMS", "ISAMPLER2DMS", "USAMPLER2DMS", + "SAMPLER2DMSARRAY", "ISAMPLER2DMSARRAY", "USAMPLER2DMSARRAY", + "SAMPLEREXTERNALOES", "SAMPLEREXTERNAL2DY2YEXT", "ISAMPLER1DARRAY", + "USAMPLER1D", "USAMPLER1DARRAY", "F16SAMPLER1D", "F16SAMPLER2D", + "F16SAMPLER3D", "F16SAMPLER2DRECT", "F16SAMPLERCUBE", "F16SAMPLER1DARRAY", "F16SAMPLER2DARRAY", "F16SAMPLERCUBEARRAY", "F16SAMPLERBUFFER", "F16SAMPLER2DMS", "F16SAMPLER2DMSARRAY", "F16SAMPLER1DSHADOW", "F16SAMPLER2DSHADOW", "F16SAMPLER1DARRAYSHADOW", @@ -1299,33 +1321,34 @@ static const char *const yytname[] = "F16SUBPASSINPUTMS", "SPIRV_INSTRUCTION", "SPIRV_EXECUTION_MODE", "SPIRV_EXECUTION_MODE_ID", "SPIRV_DECORATE", "SPIRV_DECORATE_ID", "SPIRV_DECORATE_STRING", "SPIRV_TYPE", "SPIRV_STORAGE_CLASS", - "SPIRV_BY_REFERENCE", "SPIRV_LITERAL", "LEFT_OP", "RIGHT_OP", "INC_OP", - "DEC_OP", "LE_OP", "GE_OP", "EQ_OP", "NE_OP", "AND_OP", "OR_OP", - "XOR_OP", "MUL_ASSIGN", "DIV_ASSIGN", "ADD_ASSIGN", "MOD_ASSIGN", - "LEFT_ASSIGN", "RIGHT_ASSIGN", "AND_ASSIGN", "XOR_ASSIGN", "OR_ASSIGN", - "SUB_ASSIGN", "STRING_LITERAL", "LEFT_PAREN", "RIGHT_PAREN", - "LEFT_BRACKET", "RIGHT_BRACKET", "LEFT_BRACE", "RIGHT_BRACE", "DOT", - "COMMA", "COLON", "EQUAL", "SEMICOLON", "BANG", "DASH", "TILDE", "PLUS", - "STAR", "SLASH", "PERCENT", "LEFT_ANGLE", "RIGHT_ANGLE", "VERTICAL_BAR", - "CARET", "AMPERSAND", "QUESTION", "INVARIANT", "HIGH_PRECISION", - "MEDIUM_PRECISION", "LOW_PRECISION", "PRECISION", "PACKED", "RESOURCE", - "SUPERP", "FLOATCONSTANT", "INTCONSTANT", "UINTCONSTANT", "BOOLCONSTANT", + "SPIRV_BY_REFERENCE", "SPIRV_LITERAL", "ATTACHMENTEXT", "IATTACHMENTEXT", + "UATTACHMENTEXT", "LEFT_OP", "RIGHT_OP", "INC_OP", "DEC_OP", "LE_OP", + "GE_OP", "EQ_OP", "NE_OP", "AND_OP", "OR_OP", "XOR_OP", "MUL_ASSIGN", + "DIV_ASSIGN", "ADD_ASSIGN", "MOD_ASSIGN", "LEFT_ASSIGN", "RIGHT_ASSIGN", + "AND_ASSIGN", "XOR_ASSIGN", "OR_ASSIGN", "SUB_ASSIGN", "STRING_LITERAL", + "LEFT_PAREN", "RIGHT_PAREN", "LEFT_BRACKET", "RIGHT_BRACKET", + "LEFT_BRACE", "RIGHT_BRACE", "DOT", "COMMA", "COLON", "EQUAL", + "SEMICOLON", "BANG", "DASH", "TILDE", "PLUS", "STAR", "SLASH", "PERCENT", + "LEFT_ANGLE", "RIGHT_ANGLE", "VERTICAL_BAR", "CARET", "AMPERSAND", + "QUESTION", "INVARIANT", "HIGH_PRECISION", "MEDIUM_PRECISION", + "LOW_PRECISION", "PRECISION", "PACKED", "RESOURCE", "SUPERP", + "FLOATCONSTANT", "INTCONSTANT", "UINTCONSTANT", "BOOLCONSTANT", "IDENTIFIER", "TYPE_NAME", "CENTROID", "IN", "OUT", "INOUT", "STRUCT", "VOID", "WHILE", "BREAK", "CONTINUE", "DO", "ELSE", "FOR", "IF", "DISCARD", "RETURN", "SWITCH", "CASE", "DEFAULT", "TERMINATE_INVOCATION", "TERMINATE_RAY", "IGNORE_INTERSECTION", "UNIFORM", "SHARED", "BUFFER", - "FLAT", "SMOOTH", "LAYOUT", "DOUBLECONSTANT", "INT16CONSTANT", - "UINT16CONSTANT", "FLOAT16CONSTANT", "INT32CONSTANT", "UINT32CONSTANT", - "INT64CONSTANT", "UINT64CONSTANT", "SUBROUTINE", "DEMOTE", "PAYLOADNV", - "PAYLOADINNV", "HITATTRNV", "CALLDATANV", "CALLDATAINNV", "PAYLOADEXT", - "PAYLOADINEXT", "HITATTREXT", "CALLDATAEXT", "CALLDATAINEXT", "PATCH", - "SAMPLE", "NONUNIFORM", "COHERENT", "VOLATILE", "RESTRICT", "READONLY", - "WRITEONLY", "DEVICECOHERENT", "QUEUEFAMILYCOHERENT", - "WORKGROUPCOHERENT", "SUBGROUPCOHERENT", "NONPRIVATE", - "SHADERCALLCOHERENT", "NOPERSPECTIVE", "EXPLICITINTERPAMD", - "PERVERTEXEXT", "PERVERTEXNV", "PERPRIMITIVENV", "PERVIEWNV", - "PERTASKNV", "PERPRIMITIVEEXT", "TASKPAYLOADWORKGROUPEXT", "PRECISE", - "$accept", "variable_identifier", "primary_expression", + "TILEIMAGEEXT", "FLAT", "SMOOTH", "LAYOUT", "DOUBLECONSTANT", + "INT16CONSTANT", "UINT16CONSTANT", "FLOAT16CONSTANT", "INT32CONSTANT", + "UINT32CONSTANT", "INT64CONSTANT", "UINT64CONSTANT", "SUBROUTINE", + "DEMOTE", "PAYLOADNV", "PAYLOADINNV", "HITATTRNV", "CALLDATANV", + "CALLDATAINNV", "PAYLOADEXT", "PAYLOADINEXT", "HITATTREXT", + "CALLDATAEXT", "CALLDATAINEXT", "PATCH", "SAMPLE", "NONUNIFORM", + "COHERENT", "VOLATILE", "RESTRICT", "READONLY", "WRITEONLY", + "DEVICECOHERENT", "QUEUEFAMILYCOHERENT", "WORKGROUPCOHERENT", + "SUBGROUPCOHERENT", "NONPRIVATE", "SHADERCALLCOHERENT", "NOPERSPECTIVE", + "EXPLICITINTERPAMD", "PERVERTEXEXT", "PERVERTEXNV", "PERPRIMITIVENV", + "PERVIEWNV", "PERTASKNV", "PERPRIMITIVEEXT", "TASKPAYLOADWORKGROUPEXT", + "PRECISE", "$accept", "variable_identifier", "primary_expression", "postfix_expression", "integer_expression", "function_call", "function_call_or_method", "function_call_generic", "function_call_header_no_parameters", @@ -1370,7 +1393,7 @@ static const char *const yytname[] = "spirv_execution_mode_id_parameter_list", "spirv_storage_class_qualifier", "spirv_decorate_qualifier", "spirv_decorate_parameter_list", "spirv_decorate_parameter", - "spirv_decorate_id_parameter_list", + "spirv_decorate_id_parameter_list", "spirv_decorate_id_parameter", "spirv_decorate_string_parameter_list", "spirv_type_specifier", "spirv_type_parameter_list", "spirv_type_parameter", "spirv_instruction_qualifier", "spirv_instruction_qualifier_list", @@ -1384,2397 +1407,364 @@ yysymbol_name (yysymbol_kind_t yysymbol) } #endif -#ifdef YYPRINT -/* YYTOKNUM[NUM] -- (External) token number corresponding to the - (internal) symbol number NUM (which must be that of a token). */ -static const yytype_int16 yytoknum[] = -{ - 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, - 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, - 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, - 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, - 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, - 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, - 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, - 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, - 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, - 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, - 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, - 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, - 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, - 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, - 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, - 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, - 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, - 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, - 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, - 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, - 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, - 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, - 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, - 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, - 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, - 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, - 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, - 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, - 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, - 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, - 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, - 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, - 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, - 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, - 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, - 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, - 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, - 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, - 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, - 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, - 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, - 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, - 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, 711, 712 -}; -#endif - -#define YYPACT_NINF (-813) +#define YYPACT_NINF (-872) #define yypact_value_is_default(Yyn) \ ((Yyn) == YYPACT_NINF) -#define YYTABLE_NINF (-573) +#define YYTABLE_NINF (-695) #define yytable_value_is_error(Yyn) \ 0 - /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing - STATE-NUM. */ +/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing + STATE-NUM. */ static const yytype_int16 yypact[] = { - 4575, -813, -813, -813, -813, -813, -813, -813, -813, -813, - -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, - -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, - -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, - -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, - -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, - -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, - -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, - -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, - -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, - -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, - -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, - -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, - -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, - -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, - -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, - -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, - -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, - -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, - -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, - -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, - -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, - -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, - -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, - -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, - -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, - -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, - -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, - -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, - -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, - -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, - -813, -813, -813, -813, -813, -300, -272, -219, -123, -120, - -118, -105, -87, -813, -813, -317, -813, -813, -813, -813, - -813, -62, -813, -813, -813, -813, -813, -324, -813, -813, - -813, -813, -813, -813, -76, -64, -813, -813, -813, -813, - -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, - -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, - -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, - -813, -319, -260, -133, -174, 7760, -191, -813, -166, -813, - -813, -813, -813, 5485, -813, -813, -813, -813, -61, -813, - -813, 935, -813, -813, 7760, -39, -813, -813, -813, 5940, - -50, -335, -267, -162, -152, -139, -50, -137, -46, 12111, - -813, -29, -339, -43, -813, -268, -813, -27, -6, 7760, - -813, -813, -813, 7760, -37, -36, -813, -298, -813, -237, - -813, -813, 10812, -5, -813, -813, -813, 1, -33, 7760, - -813, -4, -2, -3, -813, -236, -813, -227, -1, 3, - 4, 5, -225, 6, 10, 12, 13, 14, 17, -223, - 8, 18, 16, -304, -813, 21, 7760, -813, 19, -813, - -222, -813, -813, -207, 9080, -813, -247, 1390, -813, -813, - -813, -813, -813, -5, -270, -813, 9513, -250, -813, -22, - -813, -132, 10812, 10812, -813, 10812, -813, -813, -813, -813, - -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, - -813, -813, -813, -813, -813, -265, -813, -813, -813, 25, - -204, 11245, 27, -813, 10812, -813, -813, -314, 30, -6, - 33, -813, -315, -50, -813, 15, -813, -325, 32, -130, - 10812, -129, -813, -146, -125, 10812, -124, 39, -119, -50, - -813, 11678, -813, -115, 10812, 36, -46, -813, 7760, 20, - 6395, -813, 7760, 10812, -813, -339, -813, 29, -813, -813, - -47, -83, -59, -288, -18, -17, 22, 26, 54, 59, - -309, 46, 9946, -813, 37, -813, -813, 50, 56, 58, - -813, 72, 74, 65, 10379, 76, 10812, 69, 68, 73, - 75, 77, -168, -813, -813, -82, -813, -260, 79, 82, - -813, -813, -813, -813, -813, 1845, -813, -813, -813, -813, - -813, -813, -813, -813, -813, 5030, 30, 9513, -241, 8214, - -813, -813, 9513, 7760, -813, 52, -813, -813, -813, -202, - -813, -813, 10812, 55, -813, -813, 10812, 85, -813, -813, - -813, 10812, -813, -813, -813, -310, -813, -813, -197, 81, - -813, -813, -813, -813, -813, -813, -195, -813, -194, -813, - -813, -190, 87, -813, -813, -813, -813, -169, -813, -167, - -813, -165, 89, -813, -158, 90, -157, 81, -813, -156, - -813, 91, 97, -813, -813, 20, -5, -77, -813, -813, - -813, 6850, -813, -813, -813, 10812, 10812, 10812, 10812, 10812, - 10812, 10812, 10812, 10812, 10812, 10812, 10812, 10812, 10812, 10812, - 10812, 10812, 10812, 10812, -813, -813, -813, 96, -813, 2300, - -813, -813, -813, 2300, -813, 10812, -813, -813, -49, 10812, - -26, -813, -813, -813, -813, -813, -813, -813, -813, -813, - -813, -813, -813, -813, -813, -813, -813, 10812, 10812, -813, - -813, -813, -813, -813, -813, -813, 9513, -813, -813, -31, - -813, 7305, -813, -813, 98, 95, -813, -813, -813, -813, - -813, -172, -134, -813, -307, -813, -325, -813, -325, -813, - 10812, 10812, -813, -146, -813, -146, -813, 10812, 10812, -813, - 104, 39, -813, 11678, -813, 10812, -813, -813, -48, 30, - 20, -813, -813, -813, -813, -813, -47, -47, -83, -83, - -59, -59, -59, -59, -288, -288, -18, -17, 22, 26, - 54, 59, 10812, -813, 2300, 4120, 60, 3665, -155, -813, - -154, -813, -813, -813, -813, -813, 8647, -813, -813, -813, - 106, -813, -15, -813, -147, -813, -145, -813, -144, -813, - -143, -813, -142, -140, -813, -813, -813, -24, 101, 95, - 71, 107, 110, -813, -813, 4120, 109, -813, -813, -813, - -813, -813, -813, -813, -813, -813, -813, -813, 10812, -813, - 102, 2755, 10812, -813, 105, 113, 70, 112, 3210, -813, - 115, -813, 9513, -813, -813, -813, -135, 10812, 2755, 109, - -813, -813, 2300, -813, 111, 95, -813, -813, 2300, 117, - -813, -813 + 4648, -872, -872, -872, -872, -872, -872, -872, -872, -872, + -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, + -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, + -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, + -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, + -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, + -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, + -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, + -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, + -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, + -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, + -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, + -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, + -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, + -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, + -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, + -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, + -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, + -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, + -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, + -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, + -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, + -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, + -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, + -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, + -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, + -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, + -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, + -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, + -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, + -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, + -872, -872, -872, -872, -872, -872, -872, -872, -305, -301, + -289, -276, -246, -238, -227, -182, -872, -872, -872, -872, + -872, -168, -872, -872, -872, -872, -872, -55, -872, -872, + -872, -872, -872, -319, -872, -872, -872, -872, -872, -872, + -872, -135, -120, -872, -872, -872, -872, -872, -872, -872, + -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, + -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, + -872, -872, -872, -872, -872, -872, -872, -872, -327, -114, + -81, -124, 7882, -313, -872, -101, -872, -872, -872, -872, + 5572, -872, -872, -872, -872, -94, -872, -872, 952, -872, + -872, 7882, -73, -872, -872, -872, 6034, -78, -252, -250, + -216, -197, -136, -78, -127, -49, 12303, -872, -13, -346, + -39, -872, -309, -872, -10, -9, 7882, -872, -872, -872, + 7882, -38, -37, -872, -267, -872, -236, -872, -872, 10983, + -2, -872, -872, -872, 3, -35, 7882, -872, -8, -6, + -1, -872, -256, -872, -255, -4, 4, 7, 8, -237, + 10, 11, 13, 14, 15, 18, -232, 9, 19, 27, + -188, -872, -3, 7882, -872, 20, -872, -229, -872, -872, + -219, 9223, -872, -272, 1414, -872, -872, -872, -872, -872, + -2, -277, -872, 9663, -265, -872, -23, -872, -112, 10983, + 10983, -872, 10983, -872, -872, -872, -872, -872, -872, -872, + -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, + -872, -872, -253, -872, -872, -872, 29, -204, 11423, 28, + -872, 10983, -872, 31, -321, 17, -9, 32, -872, -325, + -78, -872, 5, -872, -330, 33, -125, 10983, -123, -872, + -130, -119, -146, -118, 34, -103, -78, -872, 11863, -872, + -74, 10983, 36, -49, -872, 7882, 24, 6496, -872, 7882, + 10983, -872, -346, -872, 30, -872, -872, -33, -133, -105, + -303, -11, -14, 21, 23, 48, 52, -316, 41, -872, + 10103, -872, 42, -872, -872, 46, 38, 40, -872, 64, + 67, 60, 10543, 74, 10983, 68, 65, 69, 70, 73, + -167, -872, -872, -47, -872, -114, 77, 31, -872, -872, + -872, -872, -872, 1876, -872, -872, -872, -872, -872, -872, + -872, -872, -872, 5110, 17, 9663, -261, 8343, -872, -872, + 9663, 7882, -872, 50, -872, -872, -872, -203, -872, -872, + 10983, 51, -872, -872, 10983, 87, -872, -872, -872, 10983, + -872, -872, -872, -312, -872, -872, -200, 80, -872, -872, + -872, -872, -872, -872, -199, -872, -196, -872, -872, -195, + 71, -872, -872, -872, -872, -169, -872, -164, -872, -872, + -872, -872, -872, -161, -872, 83, -872, -160, 84, -153, + 80, -872, -278, -152, -872, 91, 94, -872, -872, 24, + -2, -43, -872, -872, -872, 6958, -872, -872, -872, 10983, + 10983, 10983, 10983, 10983, 10983, 10983, 10983, 10983, 10983, 10983, + 10983, 10983, 10983, 10983, 10983, 10983, 10983, 10983, -872, -872, + -872, 93, -872, 2338, -872, -872, -872, 2338, -872, 10983, + -872, -872, -42, 10983, -32, -872, -872, -872, -872, -872, + -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, + -872, 10983, 10983, -872, -872, -872, -872, -872, -872, -872, + 9663, -872, -872, -76, -872, 7420, -872, -872, 96, 95, + -872, -872, -872, -872, -872, -132, -131, -872, -311, -872, + -330, -872, -330, -872, 10983, 10983, -872, -130, -872, -130, + -872, -146, -146, -872, 101, 34, -872, 11863, -872, 10983, + -872, -872, -41, 17, 24, -872, -872, -872, -872, -872, + -33, -33, -133, -133, -105, -105, -105, -105, -303, -303, + -11, -14, 21, 23, 48, 52, 10983, -872, 2338, 4186, + 59, 3724, -151, -872, -150, -872, -872, -872, -872, -872, + 8783, -872, -872, -872, 105, -872, 72, -872, -149, -872, + -148, -872, -141, -872, -140, -872, -139, -138, -872, -872, + -872, -28, 102, 95, 75, 107, 106, -872, -872, 4186, + 108, -872, -872, -872, -872, -872, -872, -872, -872, -872, + -872, -872, 10983, -872, 100, 2800, 10983, -872, 104, 109, + 76, 112, 3262, -872, 113, -872, 9663, -872, -872, -872, + -137, 10983, 2800, 108, -872, -872, 2338, -872, 110, 95, + -872, -872, 2338, 114, -872, -872 }; - /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. - Performed when YYTABLE does not specify something else to do. Zero - means the default is an error. */ +/* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. + Performed when YYTABLE does not specify something else to do. Zero + means the default is an error. */ static const yytype_int16 yydefact[] = { - 0, 168, 222, 220, 221, 219, 226, 227, 228, 229, - 230, 231, 232, 233, 234, 223, 224, 225, 235, 236, - 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, - 348, 349, 350, 351, 352, 353, 354, 374, 375, 376, - 377, 378, 379, 380, 389, 402, 403, 390, 391, 393, - 392, 394, 395, 396, 397, 398, 399, 400, 401, 176, - 177, 248, 249, 247, 250, 257, 258, 255, 256, 253, - 254, 251, 252, 280, 281, 282, 292, 293, 294, 277, - 278, 279, 289, 290, 291, 274, 275, 276, 286, 287, - 288, 271, 272, 273, 283, 284, 285, 259, 260, 261, - 295, 296, 297, 262, 263, 264, 307, 308, 309, 265, - 266, 267, 319, 320, 321, 268, 269, 270, 331, 332, - 333, 298, 299, 300, 301, 302, 303, 304, 305, 306, - 310, 311, 312, 313, 314, 315, 316, 317, 318, 322, - 323, 324, 325, 326, 327, 328, 329, 330, 334, 335, - 336, 337, 338, 339, 340, 341, 342, 346, 343, 344, - 345, 527, 528, 529, 358, 359, 382, 385, 347, 356, - 357, 373, 355, 404, 405, 408, 409, 410, 412, 413, - 414, 416, 417, 418, 420, 421, 517, 518, 381, 383, - 384, 360, 361, 362, 406, 363, 367, 368, 371, 411, - 415, 419, 364, 365, 369, 370, 407, 366, 372, 451, - 453, 454, 455, 457, 458, 459, 461, 462, 463, 465, - 466, 467, 469, 470, 471, 473, 474, 475, 477, 478, - 479, 481, 482, 483, 485, 486, 487, 489, 490, 491, - 493, 494, 452, 456, 460, 464, 468, 476, 480, 484, - 472, 488, 492, 495, 496, 497, 498, 499, 500, 501, + 0, 168, 225, 223, 224, 222, 229, 230, 231, 232, + 233, 234, 235, 236, 237, 226, 227, 228, 238, 239, + 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, + 351, 352, 353, 354, 355, 356, 357, 377, 378, 379, + 380, 381, 382, 383, 392, 405, 406, 393, 394, 396, + 395, 397, 398, 399, 400, 401, 402, 403, 404, 177, + 178, 251, 252, 250, 253, 260, 261, 258, 259, 256, + 257, 254, 255, 283, 284, 285, 295, 296, 297, 280, + 281, 282, 292, 293, 294, 277, 278, 279, 289, 290, + 291, 274, 275, 276, 286, 287, 288, 262, 263, 264, + 298, 299, 300, 265, 266, 267, 310, 311, 312, 268, + 269, 270, 322, 323, 324, 271, 272, 273, 334, 335, + 336, 301, 302, 303, 304, 305, 306, 307, 308, 309, + 313, 314, 315, 316, 317, 318, 319, 320, 321, 325, + 326, 327, 328, 329, 330, 331, 332, 333, 337, 338, + 339, 340, 341, 342, 343, 344, 345, 349, 346, 347, + 348, 533, 534, 535, 536, 538, 182, 361, 362, 385, + 388, 350, 359, 360, 376, 358, 407, 408, 411, 412, + 413, 415, 416, 417, 419, 420, 421, 423, 424, 520, + 521, 384, 386, 387, 363, 364, 365, 409, 366, 370, + 371, 374, 414, 418, 422, 367, 368, 372, 373, 410, + 369, 375, 454, 456, 457, 458, 460, 461, 462, 464, + 465, 466, 468, 469, 470, 472, 473, 474, 476, 477, + 478, 480, 481, 482, 484, 485, 486, 488, 489, 490, + 492, 493, 494, 496, 497, 455, 459, 463, 467, 471, + 479, 483, 487, 475, 491, 495, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, - 512, 513, 514, 515, 516, 386, 387, 388, 422, 431, - 433, 427, 432, 434, 435, 437, 438, 439, 441, 442, - 443, 445, 446, 447, 449, 450, 423, 424, 425, 436, - 426, 428, 429, 430, 440, 444, 448, 519, 520, 523, - 524, 525, 526, 521, 522, 0, 0, 0, 0, 0, - 0, 0, 0, 166, 167, 0, 623, 137, 533, 534, - 535, 0, 532, 172, 170, 171, 169, 0, 218, 173, - 174, 175, 139, 138, 0, 201, 182, 184, 180, 186, - 188, 183, 185, 181, 187, 189, 178, 179, 204, 190, - 197, 198, 199, 200, 191, 192, 193, 194, 195, 196, - 140, 141, 143, 142, 144, 146, 147, 145, 203, 154, - 622, 0, 624, 0, 114, 113, 0, 125, 130, 161, - 160, 158, 162, 0, 155, 157, 163, 135, 214, 159, - 531, 0, 619, 621, 0, 0, 164, 165, 530, 0, + 512, 513, 514, 515, 516, 517, 518, 519, 389, 390, + 391, 425, 434, 436, 430, 435, 437, 438, 440, 441, + 442, 444, 445, 446, 448, 449, 450, 452, 453, 426, + 427, 428, 439, 429, 431, 432, 433, 443, 447, 451, + 525, 526, 529, 530, 531, 532, 527, 528, 0, 0, + 0, 0, 0, 0, 0, 0, 166, 167, 522, 523, + 524, 0, 631, 137, 541, 542, 543, 0, 540, 172, + 170, 171, 169, 0, 221, 173, 175, 176, 174, 139, + 138, 0, 203, 184, 186, 181, 188, 190, 185, 187, + 183, 189, 191, 179, 180, 206, 192, 199, 200, 201, + 202, 193, 194, 195, 196, 197, 198, 140, 141, 143, + 142, 144, 146, 147, 145, 205, 154, 630, 0, 632, + 0, 114, 113, 0, 125, 130, 161, 160, 158, 162, + 0, 155, 157, 163, 135, 216, 159, 539, 0, 627, + 629, 0, 0, 164, 165, 537, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 546, 0, 0, + 0, 99, 0, 94, 0, 109, 0, 121, 115, 123, + 0, 124, 0, 97, 131, 102, 0, 156, 136, 0, + 209, 215, 1, 628, 0, 0, 0, 96, 0, 0, + 0, 639, 0, 697, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 637, + 0, 635, 0, 0, 544, 151, 153, 0, 149, 207, + 0, 0, 100, 0, 0, 633, 110, 116, 120, 122, + 118, 126, 117, 0, 132, 105, 0, 103, 0, 0, + 0, 9, 0, 43, 42, 44, 41, 5, 6, 7, + 8, 2, 16, 14, 15, 17, 10, 11, 12, 13, + 3, 18, 37, 20, 25, 26, 0, 0, 30, 0, + 219, 0, 36, 218, 0, 210, 111, 0, 95, 0, + 0, 695, 0, 647, 0, 0, 0, 0, 0, 664, + 0, 0, 0, 0, 0, 0, 0, 689, 0, 662, + 0, 0, 0, 0, 98, 0, 0, 0, 548, 0, + 0, 148, 0, 204, 0, 211, 45, 49, 52, 55, + 60, 63, 65, 67, 69, 71, 73, 75, 0, 34, + 0, 101, 575, 584, 588, 0, 0, 0, 609, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 538, 0, 0, 0, 99, 0, 94, 0, 109, 0, - 121, 115, 123, 0, 124, 0, 97, 131, 102, 0, - 156, 136, 0, 207, 213, 1, 620, 0, 0, 0, - 96, 0, 0, 0, 631, 0, 683, 0, 0, 0, + 45, 78, 91, 0, 562, 0, 163, 135, 565, 586, + 564, 572, 563, 0, 566, 567, 590, 568, 597, 569, + 570, 605, 571, 0, 119, 0, 127, 0, 556, 134, + 0, 0, 107, 0, 104, 38, 39, 0, 22, 23, + 0, 0, 28, 27, 0, 221, 31, 33, 40, 0, + 217, 112, 699, 0, 700, 640, 0, 0, 698, 659, + 655, 656, 657, 658, 0, 653, 0, 93, 660, 0, + 0, 674, 675, 676, 677, 0, 672, 0, 681, 682, + 683, 684, 680, 0, 678, 0, 685, 0, 0, 0, + 2, 693, 216, 0, 691, 0, 0, 634, 636, 0, + 554, 0, 552, 547, 549, 0, 152, 150, 208, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 629, 0, 627, 0, 0, 536, 151, 153, - 0, 149, 205, 0, 0, 100, 0, 0, 625, 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, 216, 0, 36, 34, 0, 208, 111, - 0, 95, 0, 0, 681, 0, 639, 0, 0, 0, - 0, 0, 656, 0, 0, 0, 0, 0, 0, 0, - 676, 0, 654, 0, 0, 0, 0, 98, 0, 0, - 0, 540, 0, 0, 148, 0, 202, 0, 209, 45, - 49, 52, 55, 60, 63, 65, 67, 69, 71, 73, - 75, 0, 0, 101, 567, 576, 580, 0, 0, 0, - 601, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 45, 78, 91, 0, 554, 0, 163, 135, - 557, 578, 556, 564, 555, 0, 558, 559, 582, 560, - 589, 561, 562, 597, 563, 0, 119, 0, 127, 0, - 548, 134, 0, 0, 107, 0, 104, 38, 39, 0, - 22, 23, 0, 0, 28, 27, 0, 218, 31, 33, - 40, 0, 215, 112, 685, 0, 686, 632, 0, 0, - 684, 651, 647, 648, 649, 650, 0, 645, 0, 93, - 652, 0, 0, 666, 667, 668, 669, 0, 664, 0, - 670, 0, 0, 672, 0, 0, 0, 2, 680, 0, - 678, 0, 0, 626, 628, 0, 546, 0, 544, 539, - 541, 0, 152, 150, 206, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 76, 210, 211, 0, 566, 0, - 599, 612, 611, 0, 603, 0, 615, 613, 0, 0, - 0, 596, 616, 617, 618, 565, 81, 82, 84, 83, - 86, 87, 88, 89, 90, 85, 80, 0, 0, 581, - 577, 579, 583, 590, 598, 129, 0, 551, 552, 0, - 133, 0, 108, 4, 0, 24, 21, 32, 217, 635, - 637, 0, 0, 682, 0, 641, 0, 640, 0, 643, - 0, 0, 658, 0, 657, 0, 660, 0, 0, 662, - 0, 0, 677, 0, 674, 0, 655, 630, 0, 547, - 0, 542, 537, 46, 47, 48, 51, 50, 53, 54, - 58, 59, 56, 57, 61, 62, 64, 66, 68, 70, - 72, 74, 0, 212, 568, 0, 0, 0, 0, 614, - 0, 595, 79, 92, 128, 549, 0, 106, 19, 633, - 0, 634, 0, 646, 0, 653, 0, 665, 0, 671, - 0, 673, 0, 0, 679, 543, 545, 0, 0, 587, - 0, 0, 0, 606, 605, 608, 574, 591, 550, 553, - 636, 638, 642, 644, 659, 661, 663, 675, 0, 569, - 0, 0, 0, 607, 0, 0, 586, 0, 0, 584, - 0, 77, 0, 571, 600, 570, 0, 609, 0, 574, - 573, 575, 593, 588, 0, 610, 604, 585, 594, 0, - 602, 592 + 0, 0, 0, 0, 0, 0, 0, 0, 76, 212, + 213, 0, 574, 0, 607, 620, 619, 0, 611, 0, + 623, 621, 0, 0, 0, 604, 624, 625, 626, 573, + 81, 82, 84, 83, 86, 87, 88, 89, 90, 85, + 80, 0, 0, 589, 585, 587, 591, 598, 606, 129, + 0, 559, 560, 0, 133, 0, 108, 4, 0, 24, + 21, 32, 220, 643, 645, 0, 0, 696, 0, 649, + 0, 648, 0, 651, 0, 0, 666, 0, 665, 0, + 668, 0, 0, 670, 0, 0, 690, 0, 687, 0, + 663, 638, 0, 555, 0, 550, 545, 46, 47, 48, + 51, 50, 53, 54, 58, 59, 56, 57, 61, 62, + 64, 66, 68, 70, 72, 74, 0, 214, 576, 0, + 0, 0, 0, 622, 0, 603, 79, 92, 128, 557, + 0, 106, 19, 641, 0, 642, 0, 654, 0, 661, + 0, 673, 0, 679, 0, 686, 0, 0, 692, 551, + 553, 0, 0, 595, 0, 0, 0, 614, 613, 616, + 582, 599, 558, 561, 644, 646, 650, 652, 667, 669, + 671, 688, 0, 577, 0, 0, 0, 615, 0, 0, + 594, 0, 0, 592, 0, 77, 0, 579, 608, 578, + 0, 617, 0, 582, 581, 583, 601, 596, 0, 618, + 612, 593, 602, 0, 610, 600 }; - /* YYPGOTO[NTERM-NUM]. */ +/* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { - -813, -813, -813, -813, -813, -813, -813, -813, -813, -813, - -813, -813, -429, -813, -381, -380, -483, -383, -262, -257, - -261, -258, -255, -259, -813, -479, -813, -492, -813, -495, - -536, 11, -813, -813, -813, 7, -388, -813, -813, 42, - 49, 47, -813, -813, -401, -813, -813, -813, -813, -96, - -813, -384, -371, -813, 9, -813, 0, -425, -813, -813, - -813, -813, 150, -813, -813, -813, -546, -553, -217, -338, - -607, -813, -364, -619, -812, -813, -421, -813, -813, -428, - -430, -813, -813, 64, -718, -355, -813, -141, -813, -390, - -813, -138, -813, -813, -813, -813, -136, -813, -813, -813, - -813, -813, -813, -813, -813, 92, -813, -813, 2, -813, - -68, -275, -456, -813, -813, -813, -296, -293, -301, -813, - -813, -299, -295, -303, -302, -813, -306, -311, -813, -392, - -530 + -872, -544, -872, -872, -872, -872, -872, -872, -872, -872, + -872, -872, -436, -872, -392, -391, -490, -390, -269, -266, + -268, -264, -262, -260, -872, -482, -872, -499, -872, -492, + -534, 6, -872, -872, -872, 1, -403, -872, -872, 45, + 44, 49, -872, -872, -406, -872, -872, -872, -872, -104, + -872, -389, -375, -872, 12, -872, 0, -433, -872, -872, + -872, -553, 145, -872, -872, -872, -560, -556, -233, -344, + -614, -872, -373, -626, -871, -872, -430, -872, -872, -440, + -437, -872, -872, 63, -737, -363, -872, -144, -872, -399, + -872, -142, -872, -872, -872, -872, -134, -872, -872, -872, + -872, -872, -872, -872, -872, 97, -872, -872, 2, -872, + -71, -308, -416, -872, -872, -872, -304, -307, -302, -872, + -872, -315, -310, -306, -300, -314, -872, -299, -317, -872, + -395, -538 }; - /* YYDEFGOTO[NTERM-NUM]. */ +/* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int16 yydefgoto[] = { - -1, 523, 524, 525, 784, 526, 527, 528, 529, 530, - 531, 532, 612, 534, 580, 581, 582, 583, 584, 585, - 586, 587, 588, 589, 590, 613, 842, 614, 767, 615, - 698, 616, 381, 643, 501, 617, 383, 384, 385, 430, - 431, 432, 386, 387, 388, 389, 390, 391, 480, 481, - 392, 393, 394, 395, 535, 483, 536, 486, 443, 444, - 537, 398, 399, 400, 572, 476, 570, 571, 707, 708, - 641, 779, 620, 621, 622, 623, 624, 739, 878, 914, - 906, 907, 908, 915, 625, 626, 627, 628, 909, 881, - 629, 630, 910, 929, 631, 632, 633, 845, 743, 847, - 885, 904, 905, 634, 401, 402, 403, 427, 635, 473, - 474, 453, 454, 791, 792, 405, 676, 677, 681, 406, - 407, 687, 688, 691, 694, 408, 699, 700, 409, 455, - 456 + 0, 530, 531, 532, 798, 533, 534, 535, 536, 537, + 538, 539, 620, 541, 587, 588, 589, 590, 591, 592, + 593, 594, 595, 596, 597, 621, 856, 622, 781, 623, + 711, 624, 388, 651, 508, 625, 390, 391, 392, 437, + 438, 439, 393, 394, 395, 396, 397, 398, 487, 488, + 399, 400, 401, 402, 542, 490, 599, 493, 450, 451, + 544, 405, 406, 407, 579, 483, 577, 578, 721, 722, + 649, 793, 628, 629, 630, 631, 632, 753, 892, 928, + 920, 921, 922, 929, 633, 634, 635, 636, 923, 895, + 637, 638, 924, 943, 639, 640, 641, 859, 757, 861, + 899, 918, 919, 642, 408, 409, 410, 434, 643, 480, + 481, 460, 461, 805, 806, 412, 684, 685, 689, 413, + 414, 695, 696, 703, 704, 707, 415, 713, 714, 416, + 462, 463 }; - /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If - positive, shift that token. If negative, reduce the rule whose - number is the opposite. If YYTABLE_NINF, syntax error. */ +/* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If + positive, shift that token. If negative, reduce the rule whose + number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_int16 yytable[] = { - 397, 433, 404, 448, 640, 591, 771, 382, 448, 396, - 649, 380, 497, 533, 680, 670, 447, 710, 538, 690, - 449, 844, 440, 671, 469, 449, 711, 733, 702, 420, - 775, 670, 778, 664, 418, 780, 665, 712, 789, 658, - 424, 664, 661, 722, 723, 433, 478, 457, 565, 410, - 458, 495, 566, 484, 662, 579, 672, 673, 674, 675, - 496, 421, 440, 734, 650, 651, 425, 666, 636, 638, - 479, 679, 790, 647, 648, 666, 679, 411, 440, 724, - 725, 484, 679, 484, -35, 679, 652, 667, 637, 913, - 653, 485, 568, 667, 679, 667, 921, 781, 667, 426, - 667, 592, 667, 667, 592, 660, 913, 667, 642, 748, - 592, 750, 593, 737, 544, 460, 498, 776, 458, 499, - 545, 579, 500, 546, 846, 552, 579, 560, 574, 547, - 412, 553, 579, 561, 575, 579, 459, 461, 463, 465, - 467, 468, 471, 576, 579, 640, 655, 640, 783, 577, - 640, 668, 656, 793, 768, 795, 797, 785, 710, 545, - 799, 796, 798, 579, 787, 435, 800, 696, 436, 854, - 756, 757, 758, 759, 760, 761, 762, 763, 764, 765, - 859, 802, 429, 804, 860, 806, 568, 803, 568, 805, - 766, 807, 809, 812, 814, 886, 887, 440, 810, 813, - 815, 768, 768, 892, 928, 893, 894, 895, 896, 796, - 897, 800, 803, 807, 810, 924, 815, 428, 861, 437, - 462, 768, 862, 458, 645, 771, 413, 646, 710, 414, - 464, 415, 788, 458, 448, 683, 684, 685, 686, 830, - 831, 832, 833, 466, 416, 470, 458, 447, 458, 889, - 848, 449, 678, 682, 850, 458, 458, 689, 692, 568, - 458, 458, 417, 695, 865, 680, 458, 701, 720, 721, - 458, 869, 690, 422, 768, 852, 853, 769, 718, 820, - 719, 819, 821, 670, 640, 423, 823, 824, 825, 579, - 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, - 579, 579, 579, 579, 579, 923, 442, 768, 820, 771, - 849, 875, 328, 329, 330, 726, 727, 715, 716, 717, - 450, 679, 679, 855, 477, 856, 487, 568, 679, 679, - 768, 851, 768, 898, 679, 452, 679, 826, 827, 472, - 828, 829, 482, 834, 835, 325, 484, 877, 493, 494, - 879, 539, 540, 543, 728, 541, 542, 548, 562, 549, - 550, 551, 554, 644, 640, 564, 555, 891, 556, 557, - 558, 579, 579, 559, 563, 654, 659, 573, 579, 579, - 567, 592, 495, 665, 579, 434, 579, 693, 703, 731, - 879, 738, 729, 441, 396, 730, 732, 568, 735, 740, - 669, 397, 396, 404, 397, 706, 911, 916, 382, 397, - 396, 404, 380, 396, 714, 741, 451, 742, 396, 475, - 640, 744, 925, 745, 746, 749, 751, 752, -36, 434, - 489, -34, 753, 434, 754, -29, 755, 782, 396, 794, - 786, 816, 396, 801, 880, 808, 811, 817, 843, 441, - 858, 768, 871, 882, 890, 899, 900, 901, 396, 902, - 912, 449, -572, 918, 917, 594, 836, 919, 922, 838, - 930, 931, 837, 839, 841, 491, 569, 840, 490, 713, - 492, 419, 876, 883, 880, 396, 920, 619, 818, 927, - 926, 488, 884, 446, 772, 903, 618, 773, 704, 774, - 866, 449, 864, 863, 874, 870, 868, 873, 867, 872, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 663, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 705, 0, - 569, 0, 569, 0, 0, 0, 0, 396, 0, 396, - 0, 396, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 619, 0, 0, 0, 0, - 0, 0, 0, 0, 618, 397, 0, 0, 0, 0, - 0, 0, 0, 569, 396, 0, 0, 0, 0, 0, - 0, 0, 396, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 569, 0, 0, 0, 0, 0, 0, 0, 0, - 396, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 619, - 0, 0, 0, 619, 0, 0, 0, 0, 618, 0, - 0, 0, 618, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 569, 0, 0, 0, 0, 0, 0, 0, 0, - 396, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 619, 619, 0, 619, 0, 404, - 0, 0, 0, 618, 618, 0, 618, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 619, 0, 0, 0, 0, - 0, 0, 0, 0, 618, 0, 0, 0, 0, 0, - 0, 619, 0, 0, 0, 0, 0, 0, 619, 0, - 618, 0, 0, 0, 0, 0, 0, 618, 619, 0, - 0, 0, 619, 0, 0, 0, 0, 618, 619, 0, - 0, 618, 0, 0, 0, 445, 0, 618, 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, - 377, 378, 379, 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, 502, - 503, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 504, 505, - 0, 325, 0, 594, 595, 0, 0, 0, 0, 596, - 506, 507, 508, 509, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 327, 328, 329, 330, 331, 0, 0, - 0, 510, 511, 512, 513, 514, 332, 333, 334, 335, - 336, 337, 338, 597, 598, 599, 600, 0, 601, 602, - 603, 604, 605, 606, 607, 608, 609, 610, 339, 340, - 341, 342, 343, 344, 515, 516, 517, 518, 519, 520, - 521, 522, 345, 611, 346, 347, 348, 349, 350, 351, - 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, - 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, - 372, 373, 374, 375, 376, 377, 378, 379, 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, 502, 503, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 504, 505, 0, 325, 0, 594, 770, - 0, 0, 0, 0, 596, 506, 507, 508, 509, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 327, 328, - 329, 330, 331, 0, 0, 0, 510, 511, 512, 513, - 514, 332, 333, 334, 335, 336, 337, 338, 597, 598, - 599, 600, 0, 601, 602, 603, 604, 605, 606, 607, - 608, 609, 610, 339, 340, 341, 342, 343, 344, 515, - 516, 517, 518, 519, 520, 521, 522, 345, 611, 346, - 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, - 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, - 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, - 377, 378, 379, 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, 502, - 503, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 504, 505, - 0, 325, 0, 594, 0, 0, 0, 0, 0, 596, - 506, 507, 508, 509, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 327, 328, 329, 330, 331, 0, 0, - 0, 510, 511, 512, 513, 514, 332, 333, 334, 335, - 336, 337, 338, 597, 598, 599, 600, 0, 601, 602, - 603, 604, 605, 606, 607, 608, 609, 610, 339, 340, - 341, 342, 343, 344, 515, 516, 517, 518, 519, 520, - 521, 522, 345, 611, 346, 347, 348, 349, 350, 351, - 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, - 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, - 372, 373, 374, 375, 376, 377, 378, 379, 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, 502, 503, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 504, 505, 0, 325, 0, 487, 0, - 0, 0, 0, 0, 596, 506, 507, 508, 509, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 327, 328, - 329, 330, 331, 0, 0, 0, 510, 511, 512, 513, - 514, 332, 333, 334, 335, 336, 337, 338, 597, 598, - 599, 600, 0, 601, 602, 603, 604, 605, 606, 607, - 608, 609, 610, 339, 340, 341, 342, 343, 344, 515, - 516, 517, 518, 519, 520, 521, 522, 345, 611, 346, - 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, - 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, - 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, - 377, 378, 379, 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, 502, - 503, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 504, 505, - 0, 325, 0, 0, 0, 0, 0, 0, 0, 596, - 506, 507, 508, 509, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 327, 328, 329, 330, 331, 0, 0, - 0, 510, 511, 512, 513, 514, 332, 333, 334, 335, - 336, 337, 338, 597, 598, 599, 600, 0, 601, 602, - 603, 604, 605, 606, 607, 608, 609, 610, 339, 340, - 341, 342, 343, 344, 515, 516, 517, 518, 519, 520, - 521, 522, 345, 611, 346, 347, 348, 349, 350, 351, - 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, - 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, - 372, 373, 374, 375, 376, 377, 378, 379, 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, 502, 503, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 504, 505, 0, 325, 0, 0, 0, - 0, 0, 0, 0, 596, 506, 507, 508, 509, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 327, 328, - 329, 330, 331, 0, 0, 0, 510, 511, 512, 513, - 514, 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, 515, - 516, 517, 518, 519, 520, 521, 522, 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, 378, 379, 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, 502, - 503, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 504, 505, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 506, 507, 508, 509, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 327, 328, 329, 330, 0, 0, 0, - 0, 510, 511, 512, 513, 514, 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, 515, 516, 517, 518, 519, 520, - 521, 522, 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, 378, 379, 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, - 377, 378, 379, 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, 0, 327, 328, 329, 330, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 332, 333, 334, 335, - 336, 337, 338, 597, 0, 0, 600, 0, 601, 602, - 0, 0, 605, 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, 378, 379, 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, 438, 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, - 439, 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, 378, 379, 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, 378, 379, 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, 709, - 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, 378, 379, 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, 822, 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, 378, 379, 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, 857, - 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, 378, 379, 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, 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, 378, 379, 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, 502, 503, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 504, 505, 0, 0, 0, 639, 777, 0, - 0, 0, 0, 0, 506, 507, 508, 509, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 510, 511, 512, 513, 514, - 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, 515, 516, - 517, 518, 519, 520, 521, 522, 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, 502, 503, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 504, 505, 0, 0, 0, - 639, 888, 0, 0, 0, 0, 0, 506, 507, 508, - 509, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 510, 511, - 512, 513, 514, 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, 515, 516, 517, 518, 519, 520, 521, 522, 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, 502, - 503, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 504, 505, - 0, 0, 578, 0, 0, 0, 0, 0, 0, 0, - 506, 507, 508, 509, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 510, 511, 512, 513, 514, 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, 515, 516, 517, 518, 519, 520, - 521, 522, 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, 502, 503, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 504, 505, 0, 0, 0, 639, 0, 0, 0, - 0, 0, 0, 506, 507, 508, 509, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 510, 511, 512, 513, 514, 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, 515, 516, 517, - 518, 519, 520, 521, 522, 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, 502, 503, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 504, 505, 0, 0, 736, 0, - 0, 0, 0, 0, 0, 0, 506, 507, 508, 509, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 510, 511, 512, - 513, 514, 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, - 515, 516, 517, 518, 519, 520, 521, 522, 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, 502, 503, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 504, 505, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 747, 506, - 507, 508, 509, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 510, 511, 512, 513, 514, 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, 515, 516, 517, 518, 519, 520, 521, - 522, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 358, 2, 3, 4, 5, + 404, 389, 411, 440, 648, 455, 387, 785, 454, 598, + 455, 504, 403, 540, 678, 712, 858, 545, 702, 725, + 657, 724, 456, 688, 679, 447, 747, 456, 476, 672, + 678, 789, 673, 792, 736, 737, 794, 716, 431, 666, + 427, 669, 803, 672, 927, 485, 726, 440, 491, 442, + 417, 935, 443, 670, 418, 586, 492, 680, 681, 682, + 683, 927, 748, 674, 432, 447, 419, 644, 646, 486, + 738, 739, 428, 655, 656, 687, 804, 674, -694, 420, + 491, 447, 658, 659, -694, 600, 687, 645, 502, 687, + 491, 795, 600, 601, 575, 449, 600, 503, 687, 650, + 551, 553, -35, 790, 660, 668, 552, 554, 661, 421, + 466, 468, 470, 472, 474, 475, 478, 422, 751, 559, + 762, 586, 764, 505, 567, 560, 506, 581, 423, 507, + 568, 860, 586, 582, 675, 586, 464, 583, 467, 465, + 675, 465, 675, 584, 586, 675, 648, 675, 648, 675, + 675, 648, 663, 797, 675, 676, 807, 809, 664, 782, + 811, 813, 552, 810, 586, 801, 812, 814, 799, 724, + 572, 709, 469, 424, 573, 465, 868, 770, 771, 772, + 773, 774, 775, 776, 777, 778, 779, 816, 575, 425, + 575, 471, 818, 817, 465, 820, 823, 780, 819, 942, + 447, 821, 824, 826, 828, 900, 901, 906, 907, 827, + 829, 782, 782, 810, 814, 908, 909, 910, 911, 938, + 429, 817, 821, 824, 829, 782, 873, 875, 734, 735, + 874, 876, 785, 802, 732, 430, 733, 455, 436, 724, + 454, 698, 699, 700, 701, 521, 844, 845, 846, 847, + 653, 433, 473, 654, 456, 465, 903, 691, 692, 693, + 694, 477, 575, 686, 465, 690, 465, 862, 465, 697, + 705, 864, 465, 465, 712, 435, 712, 702, 702, 449, + 879, 688, 866, 867, 869, 708, 870, 833, 465, 678, + 444, 648, 457, 837, 838, 839, 586, 586, 586, 586, + 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, + 586, 586, 937, 459, 715, 782, 785, 465, 783, 834, + 782, 834, 835, 863, 889, 334, 335, 336, 740, 741, + 782, 865, 687, 687, 782, 912, 575, 729, 730, 731, + 840, 841, 479, 842, 843, 687, 484, 687, 331, 494, + 848, 849, 489, 500, 501, 491, 547, 548, 549, 546, + 555, 550, 574, 742, 891, 569, 556, 893, 652, 557, + 558, 648, 561, 562, 600, 563, 564, 565, 586, 586, + 566, 570, 571, 667, 580, 662, -34, 502, 706, 745, + 673, 586, 441, 586, 717, 746, 677, 743, 744, 749, + 448, 754, 752, 755, 403, 756, 575, 893, 404, 389, + 411, 404, 403, 925, 387, 720, 404, 458, 411, 758, + 403, 728, 759, 403, 930, 760, 482, 648, 403, 763, + 766, 765, -36, 815, 767, 768, 441, 496, 769, 939, + 441, 796, 800, -29, 808, 822, 825, 830, 403, 543, + 831, 857, 403, 894, 872, 885, 448, 782, 896, 904, + 905, 916, 913, 915, 926, 932, 914, -580, 403, 931, + 456, 602, 936, 850, 945, 944, 852, 851, 727, 933, + 497, 853, 426, 576, 854, 498, 832, 855, 897, 499, + 890, 934, 940, 894, 627, 403, 941, 495, 898, 786, + 917, 787, 718, 877, 882, 453, 626, 881, 878, 788, + 456, 886, 888, 880, 0, 0, 884, 0, 0, 0, + 0, 883, 0, 0, 0, 0, 0, 0, 887, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 671, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 719, 0, 576, 0, 576, + 0, 0, 0, 0, 0, 0, 0, 403, 0, 403, + 0, 403, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 627, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 404, 0, 626, 0, 0, 0, 0, + 0, 576, 0, 0, 0, 403, 0, 0, 0, 0, + 0, 0, 0, 403, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 576, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 403, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 627, 0, 0, 0, 627, 0, 0, + 0, 0, 0, 0, 0, 626, 0, 0, 0, 626, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 576, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 403, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 627, 627, + 0, 627, 0, 411, 0, 0, 0, 0, 0, 0, + 626, 626, 0, 626, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 627, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 626, 0, 0, 0, 627, 0, 0, 0, 0, + 0, 0, 627, 0, 0, 0, 0, 626, 0, 0, + 0, 0, 627, 0, 626, 0, 627, 0, 0, 0, + 0, 0, 627, 0, 626, 0, 0, 0, 626, 0, + 0, 0, 452, 0, 626, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, - 56, 57, 58, 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, 502, 503, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 504, 505, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 506, 507, 508, 509, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 510, 511, 512, 513, 514, 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, 515, 516, 517, 518, - 519, 520, 521, 522, 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, 502, 503, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 504, 505, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 506, 507, 508, 509, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 510, 511, 512, 513, - 514, 332, 0, 0, 0, 0, 337, 657, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 515, - 516, 517, 518, 519, 520, 521, 522, 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, 502, 503, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 504, 505, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 506, 507, - 508, 509, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 510, - 511, 512, 513, 697, 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, 515, 516, 517, 518, 519, 520, 521, 522, - 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 -}; - -static const yytype_int16 yycheck[] = -{ - 0, 385, 0, 404, 496, 484, 625, 0, 409, 0, - 505, 0, 437, 442, 550, 545, 404, 570, 443, 555, - 404, 739, 393, 348, 416, 409, 572, 336, 564, 353, - 637, 561, 639, 348, 351, 642, 351, 573, 348, 531, - 359, 348, 356, 331, 332, 429, 385, 382, 352, 349, - 385, 349, 356, 351, 368, 484, 381, 382, 383, 384, - 358, 385, 433, 372, 329, 330, 385, 382, 493, 494, - 409, 550, 382, 502, 503, 382, 555, 349, 449, 367, - 368, 351, 561, 351, 349, 564, 351, 543, 358, 901, - 355, 359, 476, 549, 573, 551, 908, 643, 554, 359, - 556, 351, 558, 559, 351, 534, 918, 563, 358, 604, - 351, 606, 359, 592, 350, 382, 353, 358, 385, 356, - 356, 550, 359, 350, 743, 350, 555, 350, 350, 356, - 349, 356, 561, 356, 356, 564, 411, 412, 413, 414, - 415, 416, 417, 350, 573, 637, 350, 639, 350, 356, - 642, 543, 356, 350, 356, 350, 350, 652, 711, 356, - 350, 356, 356, 592, 656, 356, 356, 559, 359, 776, - 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, - 352, 350, 356, 350, 356, 350, 570, 356, 572, 356, - 358, 356, 350, 350, 350, 350, 350, 568, 356, 356, - 356, 356, 356, 350, 922, 350, 350, 350, 350, 356, - 350, 356, 356, 356, 356, 350, 356, 350, 352, 385, - 382, 356, 356, 385, 356, 844, 349, 359, 781, 349, - 382, 349, 661, 385, 635, 381, 382, 383, 384, 722, - 723, 724, 725, 382, 349, 382, 385, 635, 385, 856, - 745, 635, 382, 382, 749, 385, 385, 382, 382, 643, - 385, 385, 349, 382, 800, 801, 385, 382, 327, 328, - 385, 807, 808, 349, 356, 767, 768, 359, 361, 356, - 363, 706, 359, 813, 776, 349, 715, 716, 717, 718, - 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, - 729, 730, 731, 732, 733, 912, 367, 356, 356, 928, - 359, 359, 374, 375, 376, 333, 334, 364, 365, 366, - 359, 800, 801, 354, 353, 356, 353, 711, 807, 808, - 356, 357, 356, 357, 813, 385, 815, 718, 719, 385, - 720, 721, 385, 726, 727, 351, 351, 842, 385, 385, - 845, 350, 385, 356, 371, 359, 358, 358, 350, 356, - 356, 356, 356, 385, 856, 349, 356, 382, 356, 356, - 356, 800, 801, 356, 356, 350, 349, 358, 807, 808, - 359, 351, 349, 351, 813, 385, 815, 348, 352, 335, - 885, 354, 370, 393, 385, 369, 337, 781, 352, 349, - 385, 401, 393, 401, 404, 385, 898, 902, 401, 409, - 401, 409, 401, 404, 385, 359, 409, 359, 409, 419, - 912, 349, 917, 349, 359, 349, 357, 359, 349, 429, - 428, 349, 359, 433, 359, 350, 359, 385, 429, 358, - 385, 350, 433, 356, 845, 356, 356, 350, 352, 449, - 352, 356, 348, 393, 348, 354, 385, 350, 449, 349, - 358, 845, 353, 350, 359, 353, 728, 397, 353, 730, - 359, 354, 729, 731, 733, 433, 476, 732, 429, 575, - 433, 331, 820, 847, 885, 476, 907, 487, 705, 919, - 918, 427, 847, 401, 635, 885, 487, 635, 566, 635, - 801, 885, 798, 796, 815, 808, 805, 813, 803, 811, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 539, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 568, -1, - 570, -1, 572, -1, -1, -1, -1, 568, -1, 570, - -1, 572, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 625, -1, -1, -1, -1, - -1, -1, -1, -1, 625, 635, -1, -1, -1, -1, - -1, -1, -1, 643, 635, -1, -1, -1, -1, -1, - -1, -1, 643, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 711, -1, -1, -1, -1, -1, -1, -1, -1, - 711, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 739, - -1, -1, -1, 743, -1, -1, -1, -1, 739, -1, - -1, -1, 743, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 781, -1, -1, -1, -1, -1, -1, -1, -1, - 781, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 844, 845, -1, 847, -1, 847, - -1, -1, -1, 844, 845, -1, 847, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 885, -1, -1, -1, -1, - -1, -1, -1, -1, 885, -1, -1, -1, -1, -1, - -1, 901, -1, -1, -1, -1, -1, -1, 908, -1, - 901, -1, -1, -1, -1, -1, -1, 908, 918, -1, - -1, -1, 922, -1, -1, -1, -1, 918, 928, -1, - -1, 922, -1, -1, -1, 0, -1, 928, 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, - 455, 456, 457, 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, 456, 457, 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, 456, 457, 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, 456, 457, 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, 456, 457, 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, -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, 456, 457, 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, -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, - 455, 456, 457, 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, -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, -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, 456, 457, 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, - 455, 456, 457, 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, -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, 456, 457, 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, 359, -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, - 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, -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, 456, 457, 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, 351, -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, 456, 457, 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, 456, 457, 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, 456, 457, 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, 456, 457, 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, -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, 456, 457, 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, + 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, @@ -3800,154 +1790,27 @@ static const yytype_int16 yycheck[] = 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, - 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, 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, - -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, -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, + 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, + 326, 327, 328, 329, 330, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 331, + 0, 0, 0, 0, 0, 0, 0, 332, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 333, 334, 335, 336, 337, 0, 0, 0, 0, + 0, 0, 0, 0, 338, 339, 340, 341, 342, 343, + 344, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 345, 346, 347, 348, + 349, 350, 351, 0, 0, 0, 0, 0, 0, 0, + 0, 352, 0, 353, 354, 355, 356, 357, 358, 359, + 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, + 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, + 380, 381, 382, 383, 384, 385, 386, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, - 54, 55, 56, 57, 58, 59, 60, -1, -1, 63, + 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, @@ -3973,155 +1836,28 @@ static const yytype_int16 yycheck[] = 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, - 314, 315, 316, -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, 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, -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, 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, - 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, 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, + 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, + 324, 325, 326, 327, 328, 329, 330, 0, 0, 509, + 510, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 511, 512, + 0, 331, 0, 602, 603, 0, 0, 0, 0, 604, + 513, 514, 515, 516, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 333, 334, 335, 336, 337, 0, 0, + 0, 517, 518, 519, 520, 521, 338, 339, 340, 341, + 342, 343, 344, 605, 606, 607, 608, 0, 609, 610, + 611, 612, 613, 614, 615, 616, 617, 618, 345, 346, + 347, 348, 349, 350, 351, 522, 523, 524, 525, 526, + 527, 528, 529, 352, 619, 353, 354, 355, 356, 357, + 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, + 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, + 378, 379, 380, 381, 382, 383, 384, 385, 386, 1, + 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, - 52, 53, 54, 55, 56, 57, 58, 59, 60, -1, - -1, 63, 64, 65, 66, 67, 68, 69, 70, 71, + 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, @@ -4146,62 +1882,2337 @@ static const yytype_int16 yycheck[] = 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, - 312, 313, 314, 315, 316, -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 + 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, + 322, 323, 324, 325, 326, 327, 328, 329, 330, 0, + 0, 509, 510, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 511, 512, 0, 331, 0, 602, 784, 0, 0, 0, + 0, 604, 513, 514, 515, 516, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 333, 334, 335, 336, 337, + 0, 0, 0, 517, 518, 519, 520, 521, 338, 339, + 340, 341, 342, 343, 344, 605, 606, 607, 608, 0, + 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, + 345, 346, 347, 348, 349, 350, 351, 522, 523, 524, + 525, 526, 527, 528, 529, 352, 619, 353, 354, 355, + 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, + 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, + 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, + 386, 1, 2, 3, 4, 5, 6, 7, 8, 9, + 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, + 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, + 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, + 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, + 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, + 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, + 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, + 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, + 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, + 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, + 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, + 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, + 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, + 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, + 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, + 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, + 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, + 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, + 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, + 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, + 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, + 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, + 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, + 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, + 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, + 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, + 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, + 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, + 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, + 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, + 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, + 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, + 330, 0, 0, 509, 510, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 511, 512, 0, 331, 0, 602, 0, 0, + 0, 0, 0, 604, 513, 514, 515, 516, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 333, 334, 335, + 336, 337, 0, 0, 0, 517, 518, 519, 520, 521, + 338, 339, 340, 341, 342, 343, 344, 605, 606, 607, + 608, 0, 609, 610, 611, 612, 613, 614, 615, 616, + 617, 618, 345, 346, 347, 348, 349, 350, 351, 522, + 523, 524, 525, 526, 527, 528, 529, 352, 619, 353, + 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, + 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, + 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, + 384, 385, 386, 1, 2, 3, 4, 5, 6, 7, + 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, + 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, + 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, + 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, + 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, + 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, + 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, + 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, + 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, + 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, + 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, + 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, + 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, + 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, + 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, + 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, + 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, + 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, + 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, + 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, + 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, + 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, + 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, + 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, + 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, + 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, + 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, + 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, + 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, + 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, + 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, + 328, 329, 330, 0, 0, 509, 510, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 511, 512, 0, 331, 0, 494, + 0, 0, 0, 0, 0, 604, 513, 514, 515, 516, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 333, + 334, 335, 336, 337, 0, 0, 0, 517, 518, 519, + 520, 521, 338, 339, 340, 341, 342, 343, 344, 605, + 606, 607, 608, 0, 609, 610, 611, 612, 613, 614, + 615, 616, 617, 618, 345, 346, 347, 348, 349, 350, + 351, 522, 523, 524, 525, 526, 527, 528, 529, 352, + 619, 353, 354, 355, 356, 357, 358, 359, 360, 361, + 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, + 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, + 382, 383, 384, 385, 386, 1, 2, 3, 4, 5, + 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, + 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, + 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, + 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, + 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, + 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, + 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, + 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, + 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, + 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, + 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, + 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, + 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, + 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, + 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, + 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, + 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, + 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, + 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, + 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, + 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, + 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, + 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, + 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, + 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, + 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, + 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, + 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, + 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, + 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, + 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, + 326, 327, 328, 329, 330, 0, 0, 509, 510, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 511, 512, 0, 331, + 0, 0, 0, 0, 0, 0, 0, 604, 513, 514, + 515, 516, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 333, 334, 335, 336, 337, 0, 0, 0, 517, + 518, 519, 520, 521, 338, 339, 340, 341, 342, 343, + 344, 605, 606, 607, 608, 0, 609, 610, 611, 612, + 613, 614, 615, 616, 617, 618, 345, 346, 347, 348, + 349, 350, 351, 522, 523, 524, 525, 526, 527, 528, + 529, 352, 619, 353, 354, 355, 356, 357, 358, 359, + 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, + 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, + 380, 381, 382, 383, 384, 385, 386, 1, 2, 3, + 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, + 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, + 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, + 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, + 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, + 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, + 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, + 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, + 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, + 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, + 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, + 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, + 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, + 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, + 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, + 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, + 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, + 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, + 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, + 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, + 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, + 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, + 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, + 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, + 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, + 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, + 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, + 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, + 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, + 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, + 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, + 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, + 324, 325, 326, 327, 328, 329, 330, 0, 0, 509, + 510, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 511, 512, + 0, 331, 0, 0, 0, 0, 0, 0, 0, 604, + 513, 514, 515, 516, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 333, 334, 335, 336, 337, 0, 0, + 0, 517, 518, 519, 520, 521, 338, 339, 340, 341, + 342, 343, 344, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 345, 346, + 347, 348, 349, 350, 351, 522, 523, 524, 525, 526, + 527, 528, 529, 352, 0, 353, 354, 355, 356, 357, + 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, + 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, + 378, 379, 380, 381, 382, 383, 384, 385, 386, 1, + 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, + 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, + 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, + 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, + 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, + 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, + 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, + 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, + 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, + 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, + 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, + 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, + 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, + 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, + 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, + 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, + 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, + 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, + 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, + 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, + 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, + 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, + 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, + 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, + 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, + 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, + 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, + 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, + 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, + 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, + 312, 313, 314, 315, 316, 317, 0, 0, 0, 321, + 322, 323, 324, 325, 326, 327, 328, 329, 330, 0, + 0, 509, 510, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 511, 512, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 513, 514, 515, 516, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 333, 334, 335, 336, 0, + 0, 0, 0, 517, 518, 519, 520, 521, 338, 339, + 340, 341, 342, 343, 344, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 345, 346, 347, 348, 349, 350, 351, 522, 523, 524, + 525, 526, 527, 528, 529, 352, 0, 353, 354, 355, + 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, + 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, + 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, + 386, 1, 2, 3, 4, 5, 6, 7, 8, 9, + 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, + 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, + 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, + 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, + 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, + 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, + 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, + 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, + 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, + 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, + 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, + 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, + 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, + 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, + 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, + 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, + 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, + 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, + 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, + 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, + 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, + 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, + 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, + 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, + 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, + 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, + 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, + 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, + 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, + 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, + 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, + 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, + 330, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 331, 0, 0, 0, 0, + 0, 0, 0, 332, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 333, 334, 335, + 336, 337, 0, 0, 0, 0, 0, 0, 0, 0, + 338, 339, 340, 341, 342, 343, 344, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 345, 346, 347, 348, 349, 350, 351, 0, + 0, 0, 0, 0, 0, 0, 0, 352, 0, 353, + 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, + 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, + 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, + 384, 385, 386, 1, 2, 3, 4, 5, 6, 7, + 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, + 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, + 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, + 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, + 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, + 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, + 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, + 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, + 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, + 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, + 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, + 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, + 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, + 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, + 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, + 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, + 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, + 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, + 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, + 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, + 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, + 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, + 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, + 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, + 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, + 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, + 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, + 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, + 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, + 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, + 0, 0, 0, 321, 322, 323, 324, 325, 326, 327, + 328, 329, 330, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 333, + 334, 335, 336, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 338, 339, 340, 341, 342, 343, 344, 605, + 0, 0, 608, 0, 609, 610, 0, 0, 613, 0, + 0, 0, 0, 0, 345, 346, 347, 348, 349, 350, + 351, 0, 0, 0, 0, 0, 0, 0, 0, 352, + 0, 353, 354, 355, 356, 357, 358, 359, 360, 361, + 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, + 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, + 382, 383, 384, 385, 386, 1, 2, 3, 4, 5, + 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, + 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, + 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, + 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, + 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, + 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, + 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, + 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, + 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, + 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, + 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, + 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, + 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, + 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, + 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, + 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, + 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, + 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, + 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, + 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, + 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, + 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, + 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, + 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, + 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, + 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, + 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, + 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, + 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, + 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, + 316, 317, 0, 0, 0, 321, 322, 323, 324, 325, + 326, 327, 328, 329, 330, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 445, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 333, 334, 335, 336, 0, 0, 0, 0, 0, + 0, 0, 0, 446, 338, 339, 340, 341, 342, 343, + 344, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 345, 346, 347, 348, + 349, 350, 351, 0, 0, 0, 0, 0, 0, 0, + 0, 352, 0, 353, 354, 355, 356, 357, 358, 359, + 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, + 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, + 380, 381, 382, 383, 384, 385, 386, 1, 2, 3, + 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, + 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, + 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, + 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, + 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, + 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, + 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, + 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, + 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, + 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, + 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, + 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, + 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, + 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, + 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, + 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, + 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, + 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, + 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, + 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, + 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, + 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, + 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, + 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, + 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, + 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, + 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, + 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, + 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, + 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, + 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, + 314, 315, 316, 317, 0, 0, 0, 321, 322, 323, + 324, 325, 326, 327, 328, 329, 330, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 331, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 333, 334, 335, 336, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 338, 339, 340, 341, + 342, 343, 344, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 345, 346, + 347, 348, 349, 350, 351, 0, 0, 0, 0, 0, + 0, 0, 0, 352, 0, 353, 354, 355, 356, 357, + 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, + 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, + 378, 379, 380, 381, 382, 383, 384, 385, 386, 1, + 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, + 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, + 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, + 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, + 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, + 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, + 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, + 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, + 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, + 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, + 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, + 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, + 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, + 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, + 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, + 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, + 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, + 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, + 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, + 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, + 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, + 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, + 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, + 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, + 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, + 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, + 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, + 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, + 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, + 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, + 312, 313, 314, 315, 316, 317, 0, 0, 0, 321, + 322, 323, 324, 325, 326, 327, 328, 329, 330, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 723, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 333, 334, 335, 336, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 338, 339, + 340, 341, 342, 343, 344, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 345, 346, 347, 348, 349, 350, 351, 0, 0, 0, + 0, 0, 0, 0, 0, 352, 0, 353, 354, 355, + 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, + 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, + 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, + 386, 1, 2, 3, 4, 5, 6, 7, 8, 9, + 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, + 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, + 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, + 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, + 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, + 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, + 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, + 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, + 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, + 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, + 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, + 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, + 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, + 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, + 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, + 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, + 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, + 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, + 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, + 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, + 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, + 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, + 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, + 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, + 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, + 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, + 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, + 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, + 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, + 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, + 310, 311, 312, 313, 314, 315, 316, 317, 0, 0, + 0, 321, 322, 323, 324, 325, 326, 327, 328, 329, + 330, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 836, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 333, 334, 335, + 336, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 338, 339, 340, 341, 342, 343, 344, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 345, 346, 347, 348, 349, 350, 351, 0, + 0, 0, 0, 0, 0, 0, 0, 352, 0, 353, + 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, + 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, + 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, + 384, 385, 386, 1, 2, 3, 4, 5, 6, 7, + 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, + 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, + 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, + 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, + 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, + 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, + 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, + 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, + 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, + 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, + 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, + 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, + 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, + 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, + 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, + 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, + 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, + 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, + 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, + 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, + 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, + 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, + 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, + 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, + 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, + 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, + 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, + 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, + 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, + 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, + 0, 0, 0, 321, 322, 323, 324, 325, 326, 327, + 328, 329, 330, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 871, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 333, + 334, 335, 336, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 338, 339, 340, 341, 342, 343, 344, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 345, 346, 347, 348, 349, 350, + 351, 0, 0, 0, 0, 0, 0, 0, 0, 352, + 0, 353, 354, 355, 356, 357, 358, 359, 360, 361, + 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, + 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, + 382, 383, 384, 385, 386, 1, 2, 3, 4, 5, + 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, + 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, + 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, + 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, + 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, + 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, + 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, + 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, + 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, + 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, + 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, + 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, + 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, + 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, + 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, + 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, + 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, + 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, + 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, + 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, + 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, + 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, + 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, + 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, + 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, + 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, + 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, + 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, + 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, + 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, + 316, 317, 0, 0, 0, 321, 322, 323, 324, 325, + 326, 327, 328, 329, 330, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 333, 334, 335, 336, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 338, 339, 340, 341, 342, 343, + 344, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 345, 346, 347, 348, + 349, 350, 351, 0, 0, 0, 0, 0, 0, 0, + 0, 352, 0, 353, 354, 355, 356, 357, 358, 359, + 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, + 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, + 380, 381, 382, 383, 384, 385, 386, 2, 3, 4, + 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, + 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, + 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, + 55, 56, 57, 58, 0, 0, 61, 62, 63, 64, + 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, + 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, + 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, + 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, + 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, + 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, + 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, + 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, + 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, + 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, + 165, 0, 167, 168, 169, 170, 171, 172, 173, 174, + 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, + 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, + 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, + 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, + 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, + 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, + 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, + 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, + 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, + 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, + 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, + 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, + 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, + 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, + 315, 316, 317, 0, 0, 0, 0, 0, 0, 324, + 0, 0, 0, 328, 329, 330, 0, 0, 509, 510, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 511, 512, 0, + 0, 0, 647, 791, 0, 0, 0, 0, 0, 513, + 514, 515, 516, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 517, 518, 519, 520, 521, 338, 0, 0, 0, 0, + 343, 344, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 522, 523, 524, 525, 526, 527, + 528, 529, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 365, 2, 3, 4, + 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, + 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, + 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, + 55, 56, 57, 58, 0, 0, 61, 62, 63, 64, + 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, + 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, + 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, + 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, + 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, + 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, + 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, + 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, + 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, + 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, + 165, 0, 167, 168, 169, 170, 171, 172, 173, 174, + 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, + 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, + 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, + 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, + 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, + 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, + 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, + 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, + 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, + 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, + 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, + 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, + 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, + 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, + 315, 316, 317, 0, 0, 0, 0, 0, 0, 324, + 0, 0, 0, 328, 329, 330, 0, 0, 509, 510, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 511, 512, 0, + 0, 0, 647, 902, 0, 0, 0, 0, 0, 513, + 514, 515, 516, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 517, 518, 519, 520, 521, 338, 0, 0, 0, 0, + 343, 344, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 522, 523, 524, 525, 526, 527, + 528, 529, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 365, 2, 3, 4, + 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, + 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, + 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, + 55, 56, 57, 58, 0, 0, 61, 62, 63, 64, + 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, + 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, + 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, + 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, + 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, + 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, + 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, + 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, + 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, + 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, + 165, 0, 167, 168, 169, 170, 171, 172, 173, 174, + 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, + 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, + 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, + 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, + 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, + 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, + 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, + 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, + 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, + 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, + 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, + 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, + 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, + 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, + 315, 316, 317, 0, 0, 0, 0, 0, 0, 324, + 0, 0, 0, 328, 329, 330, 0, 0, 509, 510, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 511, 512, 0, + 0, 585, 0, 0, 0, 0, 0, 0, 0, 513, + 514, 515, 516, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 517, 518, 519, 520, 521, 338, 0, 0, 0, 0, + 343, 344, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 522, 523, 524, 525, 526, 527, + 528, 529, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 365, 2, 3, 4, + 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, + 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, + 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, + 55, 56, 57, 58, 0, 0, 61, 62, 63, 64, + 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, + 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, + 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, + 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, + 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, + 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, + 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, + 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, + 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, + 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, + 165, 0, 167, 168, 169, 170, 171, 172, 173, 174, + 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, + 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, + 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, + 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, + 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, + 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, + 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, + 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, + 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, + 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, + 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, + 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, + 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, + 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, + 315, 316, 317, 0, 0, 0, 0, 0, 0, 324, + 0, 0, 0, 328, 329, 330, 0, 0, 509, 510, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 511, 512, 0, + 0, 0, 647, 0, 0, 0, 0, 0, 0, 513, + 514, 515, 516, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 517, 518, 519, 520, 521, 338, 0, 0, 0, 0, + 343, 344, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 522, 523, 524, 525, 526, 527, + 528, 529, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 365, 2, 3, 4, + 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, + 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, + 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, + 55, 56, 57, 58, 0, 0, 61, 62, 63, 64, + 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, + 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, + 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, + 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, + 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, + 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, + 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, + 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, + 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, + 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, + 165, 0, 167, 168, 169, 170, 171, 172, 173, 174, + 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, + 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, + 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, + 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, + 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, + 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, + 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, + 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, + 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, + 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, + 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, + 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, + 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, + 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, + 315, 316, 317, 0, 0, 0, 0, 0, 0, 324, + 0, 0, 0, 328, 329, 330, 0, 0, 509, 510, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 511, 512, 0, + 0, 750, 0, 0, 0, 0, 0, 0, 0, 513, + 514, 515, 516, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 517, 518, 519, 520, 521, 338, 0, 0, 0, 0, + 343, 344, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 522, 523, 524, 525, 526, 527, + 528, 529, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 365, 2, 3, 4, + 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, + 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, + 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, + 55, 56, 57, 58, 0, 0, 61, 62, 63, 64, + 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, + 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, + 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, + 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, + 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, + 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, + 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, + 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, + 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, + 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, + 165, 0, 167, 168, 169, 170, 171, 172, 173, 174, + 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, + 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, + 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, + 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, + 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, + 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, + 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, + 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, + 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, + 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, + 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, + 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, + 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, + 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, + 315, 316, 317, 0, 0, 0, 0, 0, 0, 324, + 0, 0, 0, 328, 329, 330, 0, 0, 509, 510, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 511, 512, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 761, 513, + 514, 515, 516, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 517, 518, 519, 520, 521, 338, 0, 0, 0, 0, + 343, 344, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 522, 523, 524, 525, 526, 527, + 528, 529, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 365, 2, 3, 4, + 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, + 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, + 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, + 55, 56, 57, 58, 0, 0, 61, 62, 63, 64, + 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, + 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, + 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, + 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, + 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, + 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, + 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, + 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, + 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, + 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, + 165, 0, 167, 168, 169, 170, 171, 172, 173, 174, + 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, + 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, + 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, + 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, + 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, + 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, + 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, + 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, + 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, + 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, + 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, + 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, + 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, + 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, + 315, 316, 317, 0, 0, 0, 0, 0, 0, 324, + 0, 0, 0, 328, 329, 330, 0, 0, 509, 510, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 511, 512, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 513, + 514, 515, 516, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 517, 518, 519, 520, 521, 338, 0, 0, 0, 0, + 343, 344, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 522, 523, 524, 525, 526, 527, + 528, 529, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 365, 2, 3, 4, + 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, + 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, + 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, + 55, 56, 57, 58, 0, 0, 61, 62, 63, 64, + 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, + 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, + 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, + 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, + 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, + 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, + 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, + 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, + 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, + 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, + 165, 0, 167, 168, 169, 170, 171, 172, 173, 174, + 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, + 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, + 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, + 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, + 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, + 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, + 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, + 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, + 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, + 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, + 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, + 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, + 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, + 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, + 315, 316, 317, 0, 0, 0, 0, 0, 0, 324, + 0, 0, 0, 328, 329, 330, 0, 0, 509, 510, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 511, 512, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 513, + 514, 515, 516, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 517, 518, 519, 520, 521, 338, 0, 0, 0, 0, + 343, 665, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 522, 523, 524, 525, 526, 527, + 528, 529, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 365, 2, 3, 4, + 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, + 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, + 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, + 55, 56, 57, 58, 0, 0, 61, 62, 63, 64, + 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, + 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, + 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, + 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, + 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, + 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, + 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, + 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, + 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, + 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, + 165, 0, 167, 168, 169, 170, 171, 172, 173, 174, + 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, + 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, + 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, + 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, + 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, + 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, + 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, + 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, + 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, + 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, + 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, + 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, + 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, + 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, + 315, 316, 317, 0, 0, 0, 0, 0, 0, 324, + 0, 0, 0, 328, 329, 330, 0, 0, 509, 510, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 511, 512, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 513, + 514, 515, 516, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 517, 518, 519, 520, 710, 338, 0, 0, 0, 0, + 343, 344, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 522, 523, 524, 525, 526, 527, + 528, 529, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 365, 2, 3, 4, + 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, + 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, + 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, + 55, 56, 57, 58, 0, 0, 61, 62, 63, 64, + 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, + 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, + 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, + 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, + 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, + 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, + 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, + 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, + 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, + 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, + 165, 0, 167, 168, 169, 170, 171, 172, 173, 174, + 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, + 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, + 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, + 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, + 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, + 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, + 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, + 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, + 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, + 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, + 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, + 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, + 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, + 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, + 315, 316, 317, 0, 0, 0, 0, 0, 0, 324, + 0, 0, 0, 328, 329, 330, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 338, 0, 0, 0, 0, + 343, 344 }; - /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing - symbol of state STATE-NUM. */ +static const yytype_int16 yycheck[] = +{ + 0, 0, 0, 392, 503, 411, 0, 633, 411, 491, + 416, 444, 0, 449, 552, 568, 753, 450, 562, 579, + 512, 577, 411, 557, 354, 400, 342, 416, 423, 354, + 568, 645, 357, 647, 337, 338, 650, 571, 365, 538, + 359, 362, 354, 354, 915, 391, 580, 436, 357, 362, + 355, 922, 365, 374, 355, 491, 365, 387, 388, 389, + 390, 932, 378, 388, 391, 440, 355, 500, 501, 415, + 373, 374, 391, 509, 510, 557, 388, 388, 356, 355, + 357, 456, 335, 336, 362, 357, 568, 364, 355, 571, + 357, 651, 357, 365, 483, 373, 357, 364, 580, 364, + 356, 356, 355, 364, 357, 541, 362, 362, 361, 355, + 418, 419, 420, 421, 422, 423, 424, 355, 600, 356, + 612, 557, 614, 359, 356, 362, 362, 356, 355, 365, + 362, 757, 568, 362, 550, 571, 388, 356, 388, 391, + 556, 391, 558, 362, 580, 561, 645, 563, 647, 565, + 566, 650, 356, 356, 570, 550, 356, 356, 362, 362, + 356, 356, 362, 362, 600, 664, 362, 362, 660, 725, + 358, 566, 388, 355, 362, 391, 790, 344, 345, 346, + 347, 348, 349, 350, 351, 352, 353, 356, 577, 357, + 579, 388, 356, 362, 391, 356, 356, 364, 362, 936, + 575, 362, 362, 356, 356, 356, 356, 356, 356, 362, + 362, 362, 362, 362, 362, 356, 356, 356, 356, 356, + 355, 362, 362, 362, 362, 362, 358, 358, 333, 334, + 362, 362, 858, 669, 367, 355, 369, 643, 362, 795, + 643, 387, 388, 389, 390, 391, 736, 737, 738, 739, + 362, 365, 388, 365, 643, 391, 870, 387, 388, 389, + 390, 388, 651, 388, 391, 388, 391, 759, 391, 388, + 388, 763, 391, 391, 827, 356, 829, 821, 822, 373, + 814, 815, 781, 782, 360, 388, 362, 720, 391, 827, + 391, 790, 365, 729, 730, 731, 732, 733, 734, 735, + 736, 737, 738, 739, 740, 741, 742, 743, 744, 745, + 746, 747, 926, 391, 388, 362, 942, 391, 365, 362, + 362, 362, 365, 365, 365, 380, 381, 382, 339, 340, + 362, 363, 814, 815, 362, 363, 725, 370, 371, 372, + 732, 733, 391, 734, 735, 827, 359, 829, 357, 359, + 740, 741, 391, 391, 391, 357, 391, 365, 364, 356, + 364, 362, 365, 377, 856, 356, 362, 859, 391, 362, + 362, 870, 362, 362, 357, 362, 362, 362, 814, 815, + 362, 362, 355, 355, 364, 356, 355, 355, 354, 341, + 357, 827, 392, 829, 358, 343, 391, 376, 375, 358, + 400, 355, 360, 365, 392, 365, 795, 899, 408, 408, + 408, 411, 400, 912, 408, 391, 416, 416, 416, 355, + 408, 391, 355, 411, 916, 365, 426, 926, 416, 355, + 365, 363, 355, 362, 365, 365, 436, 435, 365, 931, + 440, 391, 391, 356, 364, 362, 362, 356, 436, 449, + 356, 358, 440, 859, 358, 354, 456, 362, 399, 354, + 388, 355, 360, 356, 364, 356, 391, 359, 456, 365, + 859, 359, 359, 742, 360, 365, 744, 743, 582, 403, + 436, 745, 337, 483, 746, 440, 719, 747, 861, 440, + 834, 921, 932, 899, 494, 483, 933, 434, 861, 643, + 899, 643, 573, 810, 819, 408, 494, 817, 812, 643, + 899, 825, 829, 815, -1, -1, 822, -1, -1, -1, + -1, 821, -1, -1, -1, -1, -1, -1, 827, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 546, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 575, -1, 577, -1, 579, + -1, -1, -1, -1, -1, -1, -1, 575, -1, 577, + -1, 579, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 633, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 643, -1, 633, -1, -1, -1, -1, + -1, 651, -1, -1, -1, 643, -1, -1, -1, -1, + -1, -1, -1, 651, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 725, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 725, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 753, -1, -1, -1, 757, -1, -1, + -1, -1, -1, -1, -1, 753, -1, -1, -1, 757, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 795, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 795, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 858, 859, + -1, 861, -1, 861, -1, -1, -1, -1, -1, -1, + 858, 859, -1, 861, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 899, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 899, -1, -1, -1, 915, -1, -1, -1, -1, + -1, -1, 922, -1, -1, -1, -1, 915, -1, -1, + -1, -1, 932, -1, 922, -1, 936, -1, -1, -1, + -1, -1, 942, -1, 932, -1, -1, -1, 936, -1, + -1, -1, 0, -1, 942, 3, 4, 5, 6, 7, + 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, + 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, + 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, + 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, + 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, + 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, + 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, + 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, + 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, + 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, + 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, + 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, + 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, + 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, + 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, + 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, + 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, + 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, + 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, + 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, + 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, + 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, + 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, + 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, + 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, + 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, + 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, + 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, + 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, + 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, + 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, + 328, 329, 330, 331, 332, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 357, + -1, -1, -1, -1, -1, -1, -1, 365, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 379, 380, 381, 382, 383, -1, -1, -1, -1, + -1, -1, -1, -1, 392, 393, 394, 395, 396, 397, + 398, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 414, 415, 416, 417, + 418, 419, 420, -1, -1, -1, -1, -1, -1, -1, + -1, 429, -1, 431, 432, 433, 434, 435, 436, 437, + 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, + 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, + 458, 459, 460, 461, 462, 463, 464, 3, 4, 5, + 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, + 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, + 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, + 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, + 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, + 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, + 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, + 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, + 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, + 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, + 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, + 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, + 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, + 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, + 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, + 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, + 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, + 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, + 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, + 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, + 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, + 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, + 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, + 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, + 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, + 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, + 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, + 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, + 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, + 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, + 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, + 326, 327, 328, 329, 330, 331, 332, -1, -1, 335, + 336, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 354, 355, + -1, 357, -1, 359, 360, -1, -1, -1, -1, 365, + 366, 367, 368, 369, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 379, 380, 381, 382, 383, -1, -1, + -1, 387, 388, 389, 390, 391, 392, 393, 394, 395, + 396, 397, 398, 399, 400, 401, 402, -1, 404, 405, + 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, + 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, + 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, + 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, + 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, + 456, 457, 458, 459, 460, 461, 462, 463, 464, 3, + 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, + 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, + 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, + 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, + 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, + 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, + 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, + 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, + 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, + 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, + 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, + 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, + 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, + 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, + 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, + 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, + 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, + 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, + 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, + 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, + 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, + 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, + 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, + 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, + 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, + 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, + 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, + 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, + 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, + 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, + 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, + 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, + 324, 325, 326, 327, 328, 329, 330, 331, 332, -1, + -1, 335, 336, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 354, 355, -1, 357, -1, 359, 360, -1, -1, -1, + -1, 365, 366, 367, 368, 369, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 379, 380, 381, 382, 383, + -1, -1, -1, 387, 388, 389, 390, 391, 392, 393, + 394, 395, 396, 397, 398, 399, 400, 401, 402, -1, + 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, + 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, + 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, + 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, + 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, + 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, + 464, 3, 4, 5, 6, 7, 8, 9, 10, 11, + 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, + 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, + 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, + 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, + 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, + 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, + 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, + 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, + 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, + 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, + 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, + 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, + 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, + 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, + 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, + 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, + 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, + 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, + 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, + 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, + 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, + 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, + 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, + 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, + 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, + 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, + 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, + 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, + 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, + 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, + 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, + 332, -1, -1, 335, 336, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 354, 355, -1, 357, -1, 359, -1, -1, + -1, -1, -1, 365, 366, 367, 368, 369, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 379, 380, 381, + 382, 383, -1, -1, -1, 387, 388, 389, 390, 391, + 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, + 402, -1, 404, 405, 406, 407, 408, 409, 410, 411, + 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, + 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, + 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, + 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, + 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, + 462, 463, 464, 3, 4, 5, 6, 7, 8, 9, + 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, + 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, + 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, + 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, + 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, + 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, + 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, + 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, + 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, + 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, + 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, + 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, + 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, + 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, + 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, + 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, + 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, + 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, + 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, + 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, + 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, + 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, + 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, + 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, + 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, + 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, + 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, + 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, + 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, + 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, + 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, + 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, + 330, 331, 332, -1, -1, 335, 336, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 354, 355, -1, 357, -1, 359, + -1, -1, -1, -1, -1, 365, 366, 367, 368, 369, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 379, + 380, 381, 382, 383, -1, -1, -1, 387, 388, 389, + 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, + 400, 401, 402, -1, 404, 405, 406, 407, 408, 409, + 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, + 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, + 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, + 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, + 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, + 460, 461, 462, 463, 464, 3, 4, 5, 6, 7, + 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, + 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, + 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, + 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, + 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, + 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, + 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, + 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, + 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, + 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, + 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, + 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, + 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, + 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, + 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, + 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, + 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, + 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, + 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, + 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, + 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, + 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, + 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, + 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, + 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, + 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, + 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, + 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, + 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, + 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, + 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, + 328, 329, 330, 331, 332, -1, -1, 335, 336, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 354, 355, -1, 357, + -1, -1, -1, -1, -1, -1, -1, 365, 366, 367, + 368, 369, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 379, 380, 381, 382, 383, -1, -1, -1, 387, + 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, + 398, 399, 400, 401, 402, -1, 404, 405, 406, 407, + 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, + 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, + 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, + 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, + 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, + 458, 459, 460, 461, 462, 463, 464, 3, 4, 5, + 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, + 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, + 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, + 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, + 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, + 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, + 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, + 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, + 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, + 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, + 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, + 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, + 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, + 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, + 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, + 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, + 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, + 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, + 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, + 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, + 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, + 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, + 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, + 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, + 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, + 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, + 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, + 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, + 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, + 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, + 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, + 326, 327, 328, 329, 330, 331, 332, -1, -1, 335, + 336, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 354, 355, + -1, 357, -1, -1, -1, -1, -1, -1, -1, 365, + 366, 367, 368, 369, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 379, 380, 381, 382, 383, -1, -1, + -1, 387, 388, 389, 390, 391, 392, 393, 394, 395, + 396, 397, 398, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 414, 415, + 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, + 426, 427, 428, 429, -1, 431, 432, 433, 434, 435, + 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, + 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, + 456, 457, 458, 459, 460, 461, 462, 463, 464, 3, + 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, + 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, + 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, + 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, + 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, + 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, + 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, + 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, + 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, + 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, + 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, + 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, + 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, + 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, + 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, + 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, + 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, + 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, + 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, + 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, + 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, + 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, + 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, + 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, + 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, + 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, + 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, + 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, + 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, + 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, + 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, + 314, 315, 316, 317, 318, 319, -1, -1, -1, 323, + 324, 325, 326, 327, 328, 329, 330, 331, 332, -1, + -1, 335, 336, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 354, 355, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 366, 367, 368, 369, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 379, 380, 381, 382, -1, + -1, -1, -1, 387, 388, 389, 390, 391, 392, 393, + 394, 395, 396, 397, 398, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, + 424, 425, 426, 427, 428, 429, -1, 431, 432, 433, + 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, + 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, + 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, + 464, 3, 4, 5, 6, 7, 8, 9, 10, 11, + 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, + 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, + 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, + 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, + 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, + 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, + 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, + 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, + 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, + 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, + 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, + 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, + 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, + 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, + 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, + 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, + 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, + 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, + 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, + 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, + 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, + 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, + 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, + 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, + 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, + 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, + 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, + 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, + 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, + 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, + 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, + 332, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 357, -1, -1, -1, -1, + -1, -1, -1, 365, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 379, 380, 381, + 382, 383, -1, -1, -1, -1, -1, -1, -1, -1, + 392, 393, 394, 395, 396, 397, 398, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 414, 415, 416, 417, 418, 419, 420, -1, + -1, -1, -1, -1, -1, -1, -1, 429, -1, 431, + 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, + 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, + 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, + 462, 463, 464, 3, 4, 5, 6, 7, 8, 9, + 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, + 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, + 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, + 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, + 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, + 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, + 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, + 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, + 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, + 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, + 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, + 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, + 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, + 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, + 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, + 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, + 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, + 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, + 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, + 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, + 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, + 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, + 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, + 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, + 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, + 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, + 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, + 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, + 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, + 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, + 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, + -1, -1, -1, 323, 324, 325, 326, 327, 328, 329, + 330, 331, 332, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 379, + 380, 381, 382, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 392, 393, 394, 395, 396, 397, 398, 399, + -1, -1, 402, -1, 404, 405, -1, -1, 408, -1, + -1, -1, -1, -1, 414, 415, 416, 417, 418, 419, + 420, -1, -1, -1, -1, -1, -1, -1, -1, 429, + -1, 431, 432, 433, 434, 435, 436, 437, 438, 439, + 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, + 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, + 460, 461, 462, 463, 464, 3, 4, 5, 6, 7, + 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, + 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, + 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, + 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, + 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, + 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, + 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, + 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, + 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, + 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, + 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, + 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, + 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, + 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, + 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, + 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, + 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, + 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, + 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, + 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, + 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, + 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, + 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, + 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, + 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, + 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, + 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, + 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, + 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, + 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, + 318, 319, -1, -1, -1, 323, 324, 325, 326, 327, + 328, 329, 330, 331, 332, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 365, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 379, 380, 381, 382, -1, -1, -1, -1, -1, + -1, -1, -1, 391, 392, 393, 394, 395, 396, 397, + 398, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 414, 415, 416, 417, + 418, 419, 420, -1, -1, -1, -1, -1, -1, -1, + -1, 429, -1, 431, 432, 433, 434, 435, 436, 437, + 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, + 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, + 458, 459, 460, 461, 462, 463, 464, 3, 4, 5, + 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, + 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, + 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, + 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, + 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, + 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, + 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, + 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, + 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, + 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, + 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, + 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, + 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, + 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, + 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, + 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, + 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, + 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, + 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, + 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, + 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, + 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, + 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, + 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, + 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, + 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, + 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, + 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, + 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, + 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, + 316, 317, 318, 319, -1, -1, -1, 323, 324, 325, + 326, 327, 328, 329, 330, 331, 332, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 357, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 379, 380, 381, 382, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 392, 393, 394, 395, + 396, 397, 398, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 414, 415, + 416, 417, 418, 419, 420, -1, -1, -1, -1, -1, + -1, -1, -1, 429, -1, 431, 432, 433, 434, 435, + 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, + 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, + 456, 457, 458, 459, 460, 461, 462, 463, 464, 3, + 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, + 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, + 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, + 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, + 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, + 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, + 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, + 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, + 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, + 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, + 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, + 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, + 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, + 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, + 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, + 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, + 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, + 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, + 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, + 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, + 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, + 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, + 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, + 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, + 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, + 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, + 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, + 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, + 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, + 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, + 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, + 314, 315, 316, 317, 318, 319, -1, -1, -1, 323, + 324, 325, 326, 327, 328, 329, 330, 331, 332, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 360, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 379, 380, 381, 382, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 392, 393, + 394, 395, 396, 397, 398, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 414, 415, 416, 417, 418, 419, 420, -1, -1, -1, + -1, -1, -1, -1, -1, 429, -1, 431, 432, 433, + 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, + 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, + 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, + 464, 3, 4, 5, 6, 7, 8, 9, 10, 11, + 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, + 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, + 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, + 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, + 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, + 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, + 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, + 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, + 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, + 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, + 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, + 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, + 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, + 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, + 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, + 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, + 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, + 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, + 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, + 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, + 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, + 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, + 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, + 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, + 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, + 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, + 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, + 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, + 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, + 312, 313, 314, 315, 316, 317, 318, 319, -1, -1, + -1, 323, 324, 325, 326, 327, 328, 329, 330, 331, + 332, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 360, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 379, 380, 381, + 382, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 392, 393, 394, 395, 396, 397, 398, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 414, 415, 416, 417, 418, 419, 420, -1, + -1, -1, -1, -1, -1, -1, -1, 429, -1, 431, + 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, + 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, + 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, + 462, 463, 464, 3, 4, 5, 6, 7, 8, 9, + 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, + 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, + 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, + 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, + 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, + 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, + 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, + 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, + 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, + 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, + 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, + 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, + 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, + 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, + 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, + 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, + 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, + 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, + 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, + 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, + 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, + 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, + 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, + 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, + 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, + 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, + 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, + 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, + 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, + 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, + 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, + -1, -1, -1, 323, 324, 325, 326, 327, 328, 329, + 330, 331, 332, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 360, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 379, + 380, 381, 382, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 392, 393, 394, 395, 396, 397, 398, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 414, 415, 416, 417, 418, 419, + 420, -1, -1, -1, -1, -1, -1, -1, -1, 429, + -1, 431, 432, 433, 434, 435, 436, 437, 438, 439, + 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, + 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, + 460, 461, 462, 463, 464, 3, 4, 5, 6, 7, + 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, + 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, + 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, + 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, + 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, + 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, + 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, + 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, + 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, + 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, + 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, + 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, + 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, + 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, + 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, + 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, + 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, + 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, + 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, + 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, + 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, + 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, + 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, + 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, + 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, + 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, + 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, + 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, + 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, + 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, + 318, 319, -1, -1, -1, 323, 324, 325, 326, 327, + 328, 329, 330, 331, 332, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 379, 380, 381, 382, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 392, 393, 394, 395, 396, 397, + 398, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 414, 415, 416, 417, + 418, 419, 420, -1, -1, -1, -1, -1, -1, -1, + -1, 429, -1, 431, 432, 433, 434, 435, 436, 437, + 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, + 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, + 458, 459, 460, 461, 462, 463, 464, 4, 5, 6, + 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, + 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, + 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, + 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, + 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, + 57, 58, 59, 60, -1, -1, 63, 64, 65, 66, + 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, + 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, + 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, + 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, + 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, + 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, + 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, + 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, + 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, + 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, + 167, -1, 169, 170, 171, 172, 173, 174, 175, 176, + 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, + 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, + 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, + 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, + 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, + 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, + 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, + 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, + 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, + 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, + 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, + 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, + 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, + 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, + 317, 318, 319, -1, -1, -1, -1, -1, -1, 326, + -1, -1, -1, 330, 331, 332, -1, -1, 335, 336, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 354, 355, -1, + -1, -1, 359, 360, -1, -1, -1, -1, -1, 366, + 367, 368, 369, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 387, 388, 389, 390, 391, 392, -1, -1, -1, -1, + 397, 398, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 421, 422, 423, 424, 425, 426, + 427, 428, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 443, 4, 5, 6, + 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, + 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, + 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, + 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, + 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, + 57, 58, 59, 60, -1, -1, 63, 64, 65, 66, + 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, + 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, + 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, + 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, + 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, + 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, + 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, + 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, + 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, + 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, + 167, -1, 169, 170, 171, 172, 173, 174, 175, 176, + 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, + 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, + 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, + 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, + 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, + 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, + 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, + 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, + 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, + 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, + 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, + 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, + 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, + 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, + 317, 318, 319, -1, -1, -1, -1, -1, -1, 326, + -1, -1, -1, 330, 331, 332, -1, -1, 335, 336, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 354, 355, -1, + -1, -1, 359, 360, -1, -1, -1, -1, -1, 366, + 367, 368, 369, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 387, 388, 389, 390, 391, 392, -1, -1, -1, -1, + 397, 398, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 421, 422, 423, 424, 425, 426, + 427, 428, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 443, 4, 5, 6, + 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, + 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, + 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, + 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, + 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, + 57, 58, 59, 60, -1, -1, 63, 64, 65, 66, + 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, + 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, + 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, + 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, + 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, + 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, + 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, + 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, + 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, + 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, + 167, -1, 169, 170, 171, 172, 173, 174, 175, 176, + 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, + 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, + 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, + 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, + 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, + 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, + 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, + 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, + 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, + 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, + 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, + 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, + 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, + 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, + 317, 318, 319, -1, -1, -1, -1, -1, -1, 326, + -1, -1, -1, 330, 331, 332, -1, -1, 335, 336, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 354, 355, -1, + -1, 358, -1, -1, -1, -1, -1, -1, -1, 366, + 367, 368, 369, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 387, 388, 389, 390, 391, 392, -1, -1, -1, -1, + 397, 398, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 421, 422, 423, 424, 425, 426, + 427, 428, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 443, 4, 5, 6, + 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, + 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, + 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, + 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, + 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, + 57, 58, 59, 60, -1, -1, 63, 64, 65, 66, + 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, + 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, + 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, + 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, + 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, + 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, + 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, + 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, + 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, + 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, + 167, -1, 169, 170, 171, 172, 173, 174, 175, 176, + 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, + 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, + 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, + 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, + 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, + 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, + 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, + 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, + 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, + 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, + 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, + 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, + 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, + 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, + 317, 318, 319, -1, -1, -1, -1, -1, -1, 326, + -1, -1, -1, 330, 331, 332, -1, -1, 335, 336, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 354, 355, -1, + -1, -1, 359, -1, -1, -1, -1, -1, -1, 366, + 367, 368, 369, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 387, 388, 389, 390, 391, 392, -1, -1, -1, -1, + 397, 398, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 421, 422, 423, 424, 425, 426, + 427, 428, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 443, 4, 5, 6, + 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, + 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, + 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, + 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, + 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, + 57, 58, 59, 60, -1, -1, 63, 64, 65, 66, + 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, + 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, + 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, + 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, + 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, + 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, + 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, + 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, + 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, + 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, + 167, -1, 169, 170, 171, 172, 173, 174, 175, 176, + 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, + 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, + 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, + 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, + 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, + 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, + 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, + 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, + 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, + 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, + 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, + 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, + 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, + 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, + 317, 318, 319, -1, -1, -1, -1, -1, -1, 326, + -1, -1, -1, 330, 331, 332, -1, -1, 335, 336, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 354, 355, -1, + -1, 358, -1, -1, -1, -1, -1, -1, -1, 366, + 367, 368, 369, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 387, 388, 389, 390, 391, 392, -1, -1, -1, -1, + 397, 398, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 421, 422, 423, 424, 425, 426, + 427, 428, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 443, 4, 5, 6, + 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, + 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, + 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, + 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, + 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, + 57, 58, 59, 60, -1, -1, 63, 64, 65, 66, + 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, + 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, + 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, + 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, + 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, + 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, + 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, + 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, + 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, + 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, + 167, -1, 169, 170, 171, 172, 173, 174, 175, 176, + 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, + 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, + 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, + 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, + 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, + 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, + 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, + 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, + 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, + 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, + 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, + 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, + 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, + 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, + 317, 318, 319, -1, -1, -1, -1, -1, -1, 326, + -1, -1, -1, 330, 331, 332, -1, -1, 335, 336, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 354, 355, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 365, 366, + 367, 368, 369, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 387, 388, 389, 390, 391, 392, -1, -1, -1, -1, + 397, 398, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 421, 422, 423, 424, 425, 426, + 427, 428, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 443, 4, 5, 6, + 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, + 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, + 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, + 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, + 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, + 57, 58, 59, 60, -1, -1, 63, 64, 65, 66, + 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, + 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, + 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, + 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, + 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, + 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, + 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, + 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, + 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, + 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, + 167, -1, 169, 170, 171, 172, 173, 174, 175, 176, + 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, + 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, + 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, + 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, + 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, + 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, + 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, + 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, + 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, + 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, + 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, + 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, + 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, + 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, + 317, 318, 319, -1, -1, -1, -1, -1, -1, 326, + -1, -1, -1, 330, 331, 332, -1, -1, 335, 336, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 354, 355, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 366, + 367, 368, 369, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 387, 388, 389, 390, 391, 392, -1, -1, -1, -1, + 397, 398, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 421, 422, 423, 424, 425, 426, + 427, 428, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 443, 4, 5, 6, + 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, + 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, + 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, + 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, + 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, + 57, 58, 59, 60, -1, -1, 63, 64, 65, 66, + 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, + 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, + 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, + 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, + 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, + 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, + 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, + 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, + 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, + 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, + 167, -1, 169, 170, 171, 172, 173, 174, 175, 176, + 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, + 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, + 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, + 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, + 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, + 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, + 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, + 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, + 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, + 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, + 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, + 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, + 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, + 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, + 317, 318, 319, -1, -1, -1, -1, -1, -1, 326, + -1, -1, -1, 330, 331, 332, -1, -1, 335, 336, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 354, 355, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 366, + 367, 368, 369, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 387, 388, 389, 390, 391, 392, -1, -1, -1, -1, + 397, 398, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 421, 422, 423, 424, 425, 426, + 427, 428, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 443, 4, 5, 6, + 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, + 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, + 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, + 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, + 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, + 57, 58, 59, 60, -1, -1, 63, 64, 65, 66, + 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, + 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, + 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, + 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, + 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, + 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, + 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, + 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, + 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, + 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, + 167, -1, 169, 170, 171, 172, 173, 174, 175, 176, + 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, + 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, + 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, + 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, + 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, + 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, + 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, + 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, + 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, + 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, + 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, + 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, + 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, + 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, + 317, 318, 319, -1, -1, -1, -1, -1, -1, 326, + -1, -1, -1, 330, 331, 332, -1, -1, 335, 336, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 354, 355, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 366, + 367, 368, 369, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 387, 388, 389, 390, 391, 392, -1, -1, -1, -1, + 397, 398, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 421, 422, 423, 424, 425, 426, + 427, 428, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 443, 4, 5, 6, + 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, + 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, + 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, + 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, + 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, + 57, 58, 59, 60, -1, -1, 63, 64, 65, 66, + 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, + 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, + 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, + 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, + 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, + 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, + 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, + 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, + 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, + 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, + 167, -1, 169, 170, 171, 172, 173, 174, 175, 176, + 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, + 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, + 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, + 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, + 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, + 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, + 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, + 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, + 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, + 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, + 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, + 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, + 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, + 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, + 317, 318, 319, -1, -1, -1, -1, -1, -1, 326, + -1, -1, -1, 330, 331, 332, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 392, -1, -1, -1, -1, + 397, 398 +}; + +/* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of + state STATE-NUM. */ static const yytype_int16 yystos[] = { 0, 3, 4, 5, 6, 7, 8, 9, 10, 11, @@ -4236,145 +4247,148 @@ static const yytype_int16 yystos[] = 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, 351, 359, 373, 374, 375, - 376, 377, 386, 387, 388, 389, 390, 391, 392, 408, - 409, 410, 411, 412, 413, 422, 424, 425, 426, 427, - 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, + 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, + 332, 357, 365, 379, 380, 381, 382, 383, 392, 393, + 394, 395, 396, 397, 398, 414, 415, 416, 417, 418, + 419, 420, 429, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, - 489, 490, 493, 494, 495, 496, 500, 501, 502, 503, - 504, 505, 508, 509, 510, 511, 512, 514, 519, 520, - 521, 562, 563, 564, 566, 573, 577, 578, 583, 586, - 349, 349, 349, 349, 349, 349, 349, 349, 351, 520, - 353, 385, 349, 349, 359, 385, 359, 565, 350, 356, - 497, 498, 499, 509, 514, 356, 359, 385, 359, 385, - 510, 514, 367, 516, 517, 0, 563, 494, 502, 509, - 359, 493, 385, 569, 570, 587, 588, 382, 385, 569, - 382, 569, 382, 569, 382, 569, 382, 569, 569, 587, - 382, 569, 385, 567, 568, 514, 523, 353, 385, 409, - 506, 507, 385, 513, 351, 359, 515, 353, 541, 566, - 498, 497, 499, 385, 385, 349, 358, 515, 353, 356, - 359, 492, 329, 330, 348, 349, 360, 361, 362, 363, - 381, 382, 383, 384, 385, 414, 415, 416, 417, 418, - 419, 420, 421, 459, 460, 461, 463, 464, 465, 466, - 467, 468, 469, 470, 471, 512, 514, 518, 515, 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, 509, 514, - 524, 525, 522, 358, 350, 356, 350, 356, 352, 470, - 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, - 482, 483, 351, 359, 353, 354, 359, 393, 394, 395, - 396, 398, 399, 400, 401, 402, 403, 404, 405, 406, - 407, 423, 470, 483, 485, 487, 489, 493, 512, 514, - 530, 531, 532, 533, 534, 542, 543, 544, 545, 548, - 549, 552, 553, 554, 561, 566, 515, 358, 515, 353, - 485, 528, 358, 491, 385, 356, 359, 470, 470, 487, - 329, 330, 351, 355, 350, 350, 356, 392, 485, 349, - 470, 356, 368, 566, 348, 351, 382, 570, 587, 385, - 588, 348, 381, 382, 383, 384, 574, 575, 382, 483, - 488, 576, 382, 381, 382, 383, 384, 579, 580, 382, - 488, 581, 382, 348, 582, 382, 587, 385, 488, 584, - 585, 382, 488, 352, 568, 514, 385, 526, 527, 354, - 525, 524, 488, 507, 385, 364, 365, 366, 361, 363, - 327, 328, 331, 332, 367, 368, 333, 334, 371, 370, - 369, 335, 337, 336, 372, 352, 352, 483, 354, 535, - 349, 359, 359, 556, 349, 349, 359, 359, 487, 349, - 487, 357, 359, 359, 359, 359, 338, 339, 340, 341, - 342, 343, 344, 345, 346, 347, 358, 486, 356, 359, - 354, 531, 545, 549, 554, 528, 358, 354, 528, 529, - 528, 524, 385, 350, 462, 487, 385, 485, 470, 348, - 382, 571, 572, 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, 526, 515, - 356, 359, 354, 470, 470, 470, 472, 472, 473, 473, - 474, 474, 474, 474, 475, 475, 476, 477, 478, 479, - 480, 481, 484, 352, 542, 555, 531, 557, 487, 359, - 487, 357, 485, 485, 528, 354, 356, 354, 352, 352, - 356, 352, 356, 575, 574, 488, 576, 580, 579, 488, - 581, 348, 582, 584, 585, 359, 527, 487, 536, 487, - 502, 547, 393, 530, 543, 558, 350, 350, 354, 528, - 348, 382, 350, 350, 350, 350, 350, 350, 357, 354, - 385, 350, 349, 547, 559, 560, 538, 539, 540, 546, - 550, 485, 358, 532, 537, 541, 487, 359, 350, 397, - 534, 532, 353, 528, 350, 487, 537, 538, 542, 551, - 359, 354 + 458, 459, 460, 461, 462, 463, 464, 496, 497, 500, + 501, 502, 503, 507, 508, 509, 510, 511, 512, 515, + 516, 517, 518, 519, 521, 526, 527, 528, 569, 570, + 571, 573, 580, 584, 585, 591, 594, 355, 355, 355, + 355, 355, 355, 355, 355, 357, 527, 359, 391, 355, + 355, 365, 391, 365, 572, 356, 362, 504, 505, 506, + 516, 521, 362, 365, 391, 365, 391, 517, 521, 373, + 523, 524, 0, 570, 501, 509, 516, 365, 500, 391, + 576, 577, 595, 596, 388, 391, 576, 388, 576, 388, + 576, 388, 576, 388, 576, 576, 595, 388, 576, 391, + 574, 575, 521, 530, 359, 391, 415, 513, 514, 391, + 520, 357, 365, 522, 359, 548, 573, 505, 504, 506, + 391, 391, 355, 364, 522, 359, 362, 365, 499, 335, + 336, 354, 355, 366, 367, 368, 369, 387, 388, 389, + 390, 391, 421, 422, 423, 424, 425, 426, 427, 428, + 466, 467, 468, 470, 471, 472, 473, 474, 475, 476, + 477, 478, 519, 521, 525, 522, 356, 391, 365, 364, + 362, 356, 362, 356, 362, 364, 362, 362, 362, 356, + 362, 362, 362, 362, 362, 362, 362, 356, 362, 356, + 362, 355, 358, 362, 365, 516, 521, 531, 532, 529, + 364, 356, 362, 356, 362, 358, 477, 479, 480, 481, + 482, 483, 484, 485, 486, 487, 488, 489, 490, 521, + 357, 365, 359, 360, 365, 399, 400, 401, 402, 404, + 405, 406, 407, 408, 409, 410, 411, 412, 413, 430, + 477, 490, 492, 494, 496, 500, 519, 521, 537, 538, + 539, 540, 541, 549, 550, 551, 552, 555, 556, 559, + 560, 561, 568, 573, 522, 364, 522, 359, 492, 535, + 364, 498, 391, 362, 365, 477, 477, 494, 335, 336, + 357, 361, 356, 356, 362, 398, 492, 355, 477, 362, + 374, 573, 354, 357, 388, 577, 595, 391, 596, 354, + 387, 388, 389, 390, 581, 582, 388, 490, 495, 583, + 388, 387, 388, 389, 390, 586, 587, 388, 387, 388, + 389, 390, 466, 588, 589, 388, 354, 590, 388, 595, + 391, 495, 526, 592, 593, 388, 495, 358, 575, 521, + 391, 533, 534, 360, 532, 531, 495, 514, 391, 370, + 371, 372, 367, 369, 333, 334, 337, 338, 373, 374, + 339, 340, 377, 376, 375, 341, 343, 342, 378, 358, + 358, 490, 360, 542, 355, 365, 365, 563, 355, 355, + 365, 365, 494, 355, 494, 363, 365, 365, 365, 365, + 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, + 364, 493, 362, 365, 360, 538, 552, 556, 561, 535, + 364, 360, 535, 536, 535, 531, 391, 356, 469, 494, + 391, 492, 477, 354, 388, 578, 579, 356, 364, 356, + 362, 356, 362, 356, 362, 362, 356, 362, 356, 362, + 356, 362, 362, 356, 362, 362, 356, 362, 356, 362, + 356, 356, 533, 522, 362, 365, 360, 477, 477, 477, + 479, 479, 480, 480, 481, 481, 481, 481, 482, 482, + 483, 484, 485, 486, 487, 488, 491, 358, 549, 562, + 538, 564, 494, 365, 494, 363, 492, 492, 535, 360, + 362, 360, 358, 358, 362, 358, 362, 582, 581, 495, + 583, 587, 586, 589, 588, 354, 590, 592, 593, 365, + 534, 494, 543, 494, 509, 554, 399, 537, 550, 565, + 356, 356, 360, 535, 354, 388, 356, 356, 356, 356, + 356, 356, 363, 360, 391, 356, 355, 554, 566, 567, + 545, 546, 547, 553, 557, 492, 364, 539, 544, 548, + 494, 365, 356, 403, 541, 539, 359, 535, 356, 494, + 544, 545, 549, 558, 365, 360 }; - /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ +/* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */ static const yytype_int16 yyr1[] = { - 0, 458, 459, 460, 460, 460, 460, 460, 460, 460, - 460, 460, 460, 460, 460, 460, 460, 460, 461, 461, - 461, 461, 461, 461, 462, 463, 464, 465, 465, 466, - 466, 467, 467, 468, 469, 469, 469, 470, 470, 470, - 470, 471, 471, 471, 471, 472, 472, 472, 472, 473, - 473, 473, 474, 474, 474, 475, 475, 475, 475, 475, - 476, 476, 476, 477, 477, 478, 478, 479, 479, 480, - 480, 481, 481, 482, 482, 483, 484, 483, 485, 485, - 486, 486, 486, 486, 486, 486, 486, 486, 486, 486, - 486, 487, 487, 488, 489, 489, 489, 489, 489, 489, - 489, 489, 489, 489, 489, 491, 490, 492, 492, 493, - 493, 493, 493, 494, 494, 495, 495, 496, 497, 497, - 498, 498, 498, 498, 499, 500, 500, 500, 500, 500, - 501, 501, 501, 501, 501, 502, 502, 503, 504, 504, - 504, 504, 504, 504, 504, 504, 504, 504, 505, 506, - 506, 507, 507, 507, 508, 509, 509, 510, 510, 510, - 510, 510, 510, 510, 510, 510, 510, 510, 511, 511, - 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, - 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, - 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, - 511, 511, 511, 511, 512, 513, 513, 514, 514, 515, - 515, 515, 515, 516, 516, 517, 518, 518, 519, 519, - 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, - 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, - 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, - 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, - 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, - 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, - 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, - 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, - 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, - 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, - 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, - 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, - 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, - 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, - 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, - 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, - 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, - 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, - 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, - 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, - 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, - 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, - 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, - 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, - 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, - 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, - 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, - 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, - 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, - 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, - 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, - 519, 519, 519, 520, 520, 520, 522, 521, 523, 521, - 524, 524, 525, 525, 526, 526, 527, 527, 528, 528, - 528, 528, 529, 529, 530, 531, 531, 532, 532, 532, - 532, 532, 532, 532, 532, 533, 534, 535, 536, 534, - 537, 537, 539, 538, 540, 538, 541, 541, 542, 542, - 543, 543, 544, 544, 545, 546, 546, 547, 547, 548, - 548, 550, 549, 551, 551, 552, 552, 553, 553, 555, - 554, 556, 554, 557, 554, 558, 558, 559, 559, 560, - 560, 561, 561, 561, 561, 561, 561, 561, 561, 562, - 562, 563, 563, 563, 565, 564, 566, 567, 567, 568, - 568, 569, 569, 570, 570, 571, 571, 572, 572, 573, - 573, 573, 573, 573, 573, 574, 574, 575, 575, 575, - 575, 575, 576, 576, 577, 577, 578, 578, 578, 578, - 578, 578, 578, 578, 579, 579, 580, 580, 580, 580, - 581, 581, 582, 582, 583, 583, 583, 583, 584, 584, - 585, 586, 586, 587, 587, 588, 588 + 0, 465, 466, 467, 467, 467, 467, 467, 467, 467, + 467, 467, 467, 467, 467, 467, 467, 467, 468, 468, + 468, 468, 468, 468, 469, 470, 471, 472, 472, 473, + 473, 474, 474, 475, 476, 476, 476, 477, 477, 477, + 477, 478, 478, 478, 478, 479, 479, 479, 479, 480, + 480, 480, 481, 481, 481, 482, 482, 482, 482, 482, + 483, 483, 483, 484, 484, 485, 485, 486, 486, 487, + 487, 488, 488, 489, 489, 490, 491, 490, 492, 492, + 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, + 493, 494, 494, 495, 496, 496, 496, 496, 496, 496, + 496, 496, 496, 496, 496, 498, 497, 499, 499, 500, + 500, 500, 500, 501, 501, 502, 502, 503, 504, 504, + 505, 505, 505, 505, 506, 507, 507, 507, 507, 507, + 508, 508, 508, 508, 508, 509, 509, 510, 511, 511, + 511, 511, 511, 511, 511, 511, 511, 511, 512, 513, + 513, 514, 514, 514, 515, 516, 516, 517, 517, 517, + 517, 517, 517, 517, 517, 517, 517, 517, 518, 518, + 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, + 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, + 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, + 518, 518, 518, 518, 518, 518, 519, 520, 520, 521, + 521, 522, 522, 522, 522, 523, 523, 524, 525, 525, + 525, 526, 526, 526, 526, 526, 526, 526, 526, 526, + 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, + 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, + 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, + 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, + 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, + 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, + 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, + 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, + 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, + 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, + 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, + 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, + 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, + 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, + 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, + 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, + 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, + 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, + 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, + 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, + 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, + 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, + 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, + 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, + 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, + 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, + 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, + 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, + 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, + 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, + 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, + 526, 527, 527, 527, 529, 528, 530, 528, 531, 531, + 532, 532, 533, 533, 534, 534, 535, 535, 535, 535, + 536, 536, 537, 538, 538, 539, 539, 539, 539, 539, + 539, 539, 539, 540, 541, 542, 543, 541, 544, 544, + 546, 545, 547, 545, 548, 548, 549, 549, 550, 550, + 551, 551, 552, 553, 553, 554, 554, 555, 555, 557, + 556, 558, 558, 559, 559, 560, 560, 562, 561, 563, + 561, 564, 561, 565, 565, 566, 566, 567, 567, 568, + 568, 568, 568, 568, 568, 568, 568, 569, 569, 570, + 570, 570, 572, 571, 573, 574, 574, 575, 575, 576, + 576, 577, 577, 578, 578, 579, 579, 580, 580, 580, + 580, 580, 580, 581, 581, 582, 582, 582, 582, 582, + 583, 583, 584, 584, 585, 585, 585, 585, 585, 585, + 585, 585, 586, 586, 587, 587, 587, 587, 588, 588, + 589, 589, 589, 589, 589, 590, 590, 591, 591, 591, + 591, 592, 592, 593, 593, 594, 594, 595, 595, 596, + 596 }; - /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ +/* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */ static const yytype_int8 yyr2[] = { 0, 2, 1, 1, 3, 1, 1, 1, 1, 1, @@ -4397,8 +4411,9 @@ 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, 4, 1, 1, 1, 3, 2, 3, 2, - 3, 3, 4, 1, 0, 3, 1, 3, 1, 1, + 1, 1, 1, 1, 4, 1, 1, 1, 3, 2, + 3, 2, 3, 3, 4, 1, 0, 3, 1, 1, + 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -4430,22 +4445,23 @@ 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, 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, 6, 1, 3, 3, 3 + 1, 1, 1, 1, 0, 6, 0, 5, 1, 2, + 3, 4, 1, 3, 1, 2, 1, 3, 4, 2, + 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 2, 2, 0, 0, 5, 1, 1, + 0, 2, 0, 2, 2, 3, 1, 2, 1, 2, + 1, 2, 5, 3, 1, 1, 4, 1, 2, 0, + 8, 0, 1, 3, 2, 1, 2, 0, 6, 0, + 8, 0, 7, 1, 1, 1, 0, 2, 3, 2, + 2, 2, 3, 2, 2, 2, 2, 1, 2, 1, + 1, 1, 0, 3, 5, 1, 3, 1, 4, 1, + 3, 5, 5, 1, 3, 1, 3, 4, 6, 6, + 8, 6, 8, 1, 3, 1, 1, 1, 1, 1, + 1, 3, 4, 6, 4, 6, 6, 8, 6, 8, + 6, 8, 1, 3, 1, 1, 1, 1, 1, 3, + 1, 1, 1, 1, 1, 1, 3, 6, 8, 4, + 6, 1, 3, 1, 1, 4, 6, 1, 3, 3, + 3 }; @@ -4457,6 +4473,7 @@ enum { YYENOMEM = -2 }; #define YYACCEPT goto yyacceptlab #define YYABORT goto yyabortlab #define YYERROR goto yyerrorlab +#define YYNOMEM goto yyexhaustedlab #define YYRECOVERING() (!!yyerrstatus) @@ -4497,10 +4514,7 @@ do { \ YYFPRINTF Args; \ } while (0) -/* This macro is provided for backward compatibility. */ -# ifndef YY_LOCATION_PRINT -# define YY_LOCATION_PRINT(File, Loc) ((void) 0) -# endif + # define YY_SYMBOL_PRINT(Title, Kind, Value, Location) \ @@ -4524,16 +4538,12 @@ yy_symbol_value_print (FILE *yyo, yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, glslang::TParseContext* pParseContext) { FILE *yyoutput = yyo; - YYUSE (yyoutput); - YYUSE (pParseContext); + YY_USE (yyoutput); + YY_USE (pParseContext); if (!yyvaluep) return; -# ifdef YYPRINT - if (yykind < YYNTOKENS) - YYPRINT (yyo, yytoknum[yykind], *yyvaluep); -# endif YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN - YYUSE (yykind); + YY_USE (yykind); YY_IGNORE_MAYBE_UNINITIALIZED_END } @@ -4914,14 +4924,14 @@ static void yydestruct (const char *yymsg, yysymbol_kind_t yykind, YYSTYPE *yyvaluep, glslang::TParseContext* pParseContext) { - YYUSE (yyvaluep); - YYUSE (pParseContext); + YY_USE (yyvaluep); + YY_USE (pParseContext); if (!yymsg) yymsg = "Deleting"; YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp); YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN - YYUSE (yykind); + YY_USE (yykind); YY_IGNORE_MAYBE_UNINITIALIZED_END } @@ -4993,6 +5003,7 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); YYDPRINTF ((stderr, "Starting parse\n")); yychar = YYEMPTY; /* Cause a token to be read. */ + goto yysetstate; @@ -5018,7 +5029,7 @@ yysetstate: if (yyss + yystacksize - 1 <= yyssp) #if !defined yyoverflow && !defined YYSTACK_RELOCATE - goto yyexhaustedlab; + YYNOMEM; #else { /* Get the current used size of the three stacks, in elements. */ @@ -5046,7 +5057,7 @@ yysetstate: # else /* defined YYSTACK_RELOCATE */ /* Extend the stack our own way. */ if (YYMAXDEPTH <= yystacksize) - goto yyexhaustedlab; + YYNOMEM; yystacksize *= 2; if (YYMAXDEPTH < yystacksize) yystacksize = YYMAXDEPTH; @@ -5057,7 +5068,7 @@ yysetstate: YY_CAST (union yyalloc *, YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize)))); if (! yyptr) - goto yyexhaustedlab; + YYNOMEM; YYSTACK_RELOCATE (yyss_alloc, yyss); YYSTACK_RELOCATE (yyvs_alloc, yyvs); # undef YYSTACK_RELOCATE @@ -5079,6 +5090,7 @@ yysetstate: } #endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */ + if (yystate == YYFINAL) YYACCEPT; @@ -5191,308 +5203,331 @@ yyreduce: switch (yyn) { case 2: /* variable_identifier: IDENTIFIER */ -#line 392 "MachineIndependent/glslang.y" +#line 355 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = parseContext.handleVariable((yyvsp[0].lex).loc, (yyvsp[0].lex).symbol, (yyvsp[0].lex).string); } -#line 5199 "MachineIndependent/glslang_tab.cpp" +#line 5211 "MachineIndependent/glslang_tab.cpp" break; case 3: /* primary_expression: variable_identifier */ -#line 398 "MachineIndependent/glslang.y" +#line 361 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 5207 "MachineIndependent/glslang_tab.cpp" +#line 5219 "MachineIndependent/glslang_tab.cpp" break; case 4: /* primary_expression: LEFT_PAREN expression RIGHT_PAREN */ -#line 401 "MachineIndependent/glslang.y" +#line 364 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = (yyvsp[-1].interm.intermTypedNode); if ((yyval.interm.intermTypedNode)->getAsConstantUnion()) (yyval.interm.intermTypedNode)->getAsConstantUnion()->setExpression(); } -#line 5217 "MachineIndependent/glslang_tab.cpp" +#line 5229 "MachineIndependent/glslang_tab.cpp" break; case 5: /* primary_expression: FLOATCONSTANT */ -#line 406 "MachineIndependent/glslang.y" +#line 369 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).d, EbtFloat, (yyvsp[0].lex).loc, true); } -#line 5225 "MachineIndependent/glslang_tab.cpp" +#line 5237 "MachineIndependent/glslang_tab.cpp" break; case 6: /* primary_expression: INTCONSTANT */ -#line 409 "MachineIndependent/glslang.y" +#line 372 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).i, (yyvsp[0].lex).loc, true); } -#line 5233 "MachineIndependent/glslang_tab.cpp" +#line 5245 "MachineIndependent/glslang_tab.cpp" break; case 7: /* primary_expression: UINTCONSTANT */ -#line 412 "MachineIndependent/glslang.y" +#line 375 "MachineIndependent/glslang.y" { parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "unsigned literal"); (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).u, (yyvsp[0].lex).loc, true); } -#line 5242 "MachineIndependent/glslang_tab.cpp" +#line 5254 "MachineIndependent/glslang_tab.cpp" break; case 8: /* primary_expression: BOOLCONSTANT */ -#line 416 "MachineIndependent/glslang.y" +#line 379 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).b, (yyvsp[0].lex).loc, true); } -#line 5250 "MachineIndependent/glslang_tab.cpp" +#line 5262 "MachineIndependent/glslang_tab.cpp" break; case 9: /* primary_expression: STRING_LITERAL */ -#line 420 "MachineIndependent/glslang.y" +#line 382 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).string, (yyvsp[0].lex).loc, true); } -#line 5258 "MachineIndependent/glslang_tab.cpp" +#line 5270 "MachineIndependent/glslang_tab.cpp" break; case 10: /* primary_expression: INT32CONSTANT */ -#line 423 "MachineIndependent/glslang.y" +#line 385 "MachineIndependent/glslang.y" { parseContext.explicitInt32Check((yyvsp[0].lex).loc, "32-bit signed literal"); (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).i, (yyvsp[0].lex).loc, true); } -#line 5267 "MachineIndependent/glslang_tab.cpp" +#line 5279 "MachineIndependent/glslang_tab.cpp" break; case 11: /* primary_expression: UINT32CONSTANT */ -#line 427 "MachineIndependent/glslang.y" +#line 389 "MachineIndependent/glslang.y" { parseContext.explicitInt32Check((yyvsp[0].lex).loc, "32-bit signed literal"); (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).u, (yyvsp[0].lex).loc, true); } -#line 5276 "MachineIndependent/glslang_tab.cpp" +#line 5288 "MachineIndependent/glslang_tab.cpp" break; case 12: /* primary_expression: INT64CONSTANT */ -#line 431 "MachineIndependent/glslang.y" +#line 393 "MachineIndependent/glslang.y" { parseContext.int64Check((yyvsp[0].lex).loc, "64-bit integer literal"); (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).i64, (yyvsp[0].lex).loc, true); } -#line 5285 "MachineIndependent/glslang_tab.cpp" +#line 5297 "MachineIndependent/glslang_tab.cpp" break; case 13: /* primary_expression: UINT64CONSTANT */ -#line 435 "MachineIndependent/glslang.y" +#line 397 "MachineIndependent/glslang.y" { parseContext.int64Check((yyvsp[0].lex).loc, "64-bit unsigned integer literal"); (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).u64, (yyvsp[0].lex).loc, true); } -#line 5294 "MachineIndependent/glslang_tab.cpp" +#line 5306 "MachineIndependent/glslang_tab.cpp" break; case 14: /* primary_expression: INT16CONSTANT */ -#line 439 "MachineIndependent/glslang.y" +#line 401 "MachineIndependent/glslang.y" { parseContext.explicitInt16Check((yyvsp[0].lex).loc, "16-bit integer literal"); (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((short)(yyvsp[0].lex).i, (yyvsp[0].lex).loc, true); } -#line 5303 "MachineIndependent/glslang_tab.cpp" +#line 5315 "MachineIndependent/glslang_tab.cpp" break; case 15: /* primary_expression: UINT16CONSTANT */ -#line 443 "MachineIndependent/glslang.y" +#line 405 "MachineIndependent/glslang.y" { parseContext.explicitInt16Check((yyvsp[0].lex).loc, "16-bit unsigned integer literal"); (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((unsigned short)(yyvsp[0].lex).u, (yyvsp[0].lex).loc, true); } -#line 5312 "MachineIndependent/glslang_tab.cpp" +#line 5324 "MachineIndependent/glslang_tab.cpp" break; case 16: /* primary_expression: DOUBLECONSTANT */ -#line 447 "MachineIndependent/glslang.y" +#line 409 "MachineIndependent/glslang.y" { parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double literal"); if (! parseContext.symbolTable.atBuiltInLevel()) parseContext.doubleCheck((yyvsp[0].lex).loc, "double literal"); (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).d, EbtDouble, (yyvsp[0].lex).loc, true); } -#line 5323 "MachineIndependent/glslang_tab.cpp" +#line 5335 "MachineIndependent/glslang_tab.cpp" break; case 17: /* primary_expression: FLOAT16CONSTANT */ -#line 453 "MachineIndependent/glslang.y" +#line 415 "MachineIndependent/glslang.y" { parseContext.float16Check((yyvsp[0].lex).loc, "half float literal"); (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).d, EbtFloat16, (yyvsp[0].lex).loc, true); } -#line 5332 "MachineIndependent/glslang_tab.cpp" +#line 5344 "MachineIndependent/glslang_tab.cpp" break; case 18: /* postfix_expression: primary_expression */ -#line 461 "MachineIndependent/glslang.y" +#line 422 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 5340 "MachineIndependent/glslang_tab.cpp" +#line 5352 "MachineIndependent/glslang_tab.cpp" break; case 19: /* postfix_expression: postfix_expression LEFT_BRACKET integer_expression RIGHT_BRACKET */ -#line 464 "MachineIndependent/glslang.y" +#line 425 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = parseContext.handleBracketDereference((yyvsp[-2].lex).loc, (yyvsp[-3].interm.intermTypedNode), (yyvsp[-1].interm.intermTypedNode)); } -#line 5348 "MachineIndependent/glslang_tab.cpp" +#line 5360 "MachineIndependent/glslang_tab.cpp" break; case 20: /* postfix_expression: function_call */ -#line 467 "MachineIndependent/glslang.y" +#line 428 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 5356 "MachineIndependent/glslang_tab.cpp" +#line 5368 "MachineIndependent/glslang_tab.cpp" break; case 21: /* postfix_expression: postfix_expression DOT IDENTIFIER */ -#line 470 "MachineIndependent/glslang.y" +#line 431 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = parseContext.handleDotDereference((yyvsp[0].lex).loc, (yyvsp[-2].interm.intermTypedNode), *(yyvsp[0].lex).string); } -#line 5364 "MachineIndependent/glslang_tab.cpp" +#line 5376 "MachineIndependent/glslang_tab.cpp" break; case 22: /* postfix_expression: postfix_expression INC_OP */ -#line 473 "MachineIndependent/glslang.y" +#line 434 "MachineIndependent/glslang.y" { parseContext.variableCheck((yyvsp[-1].interm.intermTypedNode)); parseContext.lValueErrorCheck((yyvsp[0].lex).loc, "++", (yyvsp[-1].interm.intermTypedNode)); (yyval.interm.intermTypedNode) = parseContext.handleUnaryMath((yyvsp[0].lex).loc, "++", EOpPostIncrement, (yyvsp[-1].interm.intermTypedNode)); } -#line 5374 "MachineIndependent/glslang_tab.cpp" +#line 5386 "MachineIndependent/glslang_tab.cpp" break; case 23: /* postfix_expression: postfix_expression DEC_OP */ -#line 478 "MachineIndependent/glslang.y" +#line 439 "MachineIndependent/glslang.y" { parseContext.variableCheck((yyvsp[-1].interm.intermTypedNode)); parseContext.lValueErrorCheck((yyvsp[0].lex).loc, "--", (yyvsp[-1].interm.intermTypedNode)); (yyval.interm.intermTypedNode) = parseContext.handleUnaryMath((yyvsp[0].lex).loc, "--", EOpPostDecrement, (yyvsp[-1].interm.intermTypedNode)); } -#line 5384 "MachineIndependent/glslang_tab.cpp" +#line 5396 "MachineIndependent/glslang_tab.cpp" break; case 24: /* integer_expression: expression */ -#line 486 "MachineIndependent/glslang.y" +#line 447 "MachineIndependent/glslang.y" { parseContext.integerCheck((yyvsp[0].interm.intermTypedNode), "[]"); (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 5393 "MachineIndependent/glslang_tab.cpp" +#line 5405 "MachineIndependent/glslang_tab.cpp" break; case 25: /* function_call: function_call_or_method */ -#line 493 "MachineIndependent/glslang.y" +#line 454 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = parseContext.handleFunctionCall((yyvsp[0].interm).loc, (yyvsp[0].interm).function, (yyvsp[0].interm).intermNode); delete (yyvsp[0].interm).function; } -#line 5402 "MachineIndependent/glslang_tab.cpp" +#line 5414 "MachineIndependent/glslang_tab.cpp" break; case 26: /* function_call_or_method: function_call_generic */ -#line 500 "MachineIndependent/glslang.y" +#line 461 "MachineIndependent/glslang.y" { (yyval.interm) = (yyvsp[0].interm); } -#line 5410 "MachineIndependent/glslang_tab.cpp" +#line 5422 "MachineIndependent/glslang_tab.cpp" break; case 27: /* function_call_generic: function_call_header_with_parameters RIGHT_PAREN */ -#line 506 "MachineIndependent/glslang.y" +#line 467 "MachineIndependent/glslang.y" { (yyval.interm) = (yyvsp[-1].interm); (yyval.interm).loc = (yyvsp[0].lex).loc; } -#line 5419 "MachineIndependent/glslang_tab.cpp" +#line 5431 "MachineIndependent/glslang_tab.cpp" break; case 28: /* function_call_generic: function_call_header_no_parameters RIGHT_PAREN */ -#line 510 "MachineIndependent/glslang.y" +#line 471 "MachineIndependent/glslang.y" { (yyval.interm) = (yyvsp[-1].interm); (yyval.interm).loc = (yyvsp[0].lex).loc; } -#line 5428 "MachineIndependent/glslang_tab.cpp" +#line 5440 "MachineIndependent/glslang_tab.cpp" break; case 29: /* function_call_header_no_parameters: function_call_header VOID */ -#line 517 "MachineIndependent/glslang.y" +#line 478 "MachineIndependent/glslang.y" { (yyval.interm) = (yyvsp[-1].interm); } -#line 5436 "MachineIndependent/glslang_tab.cpp" +#line 5448 "MachineIndependent/glslang_tab.cpp" break; case 30: /* function_call_header_no_parameters: function_call_header */ -#line 520 "MachineIndependent/glslang.y" +#line 481 "MachineIndependent/glslang.y" { (yyval.interm) = (yyvsp[0].interm); } -#line 5444 "MachineIndependent/glslang_tab.cpp" - break; - - case 31: /* function_call_header_with_parameters: function_call_header assignment_expression */ -#line 526 "MachineIndependent/glslang.y" - { - TParameter param = { nullptr, new TType }; - param.type->shallowCopy((yyvsp[0].interm.intermTypedNode)->getType()); - (yyvsp[-1].interm).function->addParameter(param); - (yyval.interm).function = (yyvsp[-1].interm).function; - (yyval.interm).intermNode = (yyvsp[0].interm.intermTypedNode); - } #line 5456 "MachineIndependent/glslang_tab.cpp" break; - case 32: /* function_call_header_with_parameters: function_call_header_with_parameters COMMA assignment_expression */ -#line 533 "MachineIndependent/glslang.y" - { - TParameter param = { nullptr, new TType }; - param.type->shallowCopy((yyvsp[0].interm.intermTypedNode)->getType()); - (yyvsp[-2].interm).function->addParameter(param); - (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); + case 31: /* function_call_header_with_parameters: function_call_header assignment_expression */ +#line 487 "MachineIndependent/glslang.y" + { + if (parseContext.spvVersion.vulkan > 0 + && parseContext.spvVersion.vulkanRelaxed + && (yyvsp[0].interm.intermTypedNode)->getType().containsOpaque()) + { + (yyval.interm).intermNode = parseContext.vkRelaxedRemapFunctionArgument((yyval.interm).loc, (yyvsp[-1].interm).function, (yyvsp[0].interm.intermTypedNode)); + (yyval.interm).function = (yyvsp[-1].interm).function; + } + else + { + TParameter param = { 0, new TType }; + param.type->shallowCopy((yyvsp[0].interm.intermTypedNode)->getType()); + + (yyvsp[-1].interm).function->addParameter(param); + (yyval.interm).function = (yyvsp[-1].interm).function; + (yyval.interm).intermNode = (yyvsp[0].interm.intermTypedNode); + } } -#line 5468 "MachineIndependent/glslang_tab.cpp" +#line 5479 "MachineIndependent/glslang_tab.cpp" + break; + + case 32: /* function_call_header_with_parameters: function_call_header_with_parameters COMMA assignment_expression */ +#line 505 "MachineIndependent/glslang.y" + { + if (parseContext.spvVersion.vulkan > 0 + && parseContext.spvVersion.vulkanRelaxed + && (yyvsp[0].interm.intermTypedNode)->getType().containsOpaque()) + { + TIntermNode* remappedNode = parseContext.vkRelaxedRemapFunctionArgument((yyvsp[-1].lex).loc, (yyvsp[-2].interm).function, (yyvsp[0].interm.intermTypedNode)); + (yyval.interm).intermNode = parseContext.intermediate.mergeAggregate((yyvsp[-2].interm).intermNode, remappedNode, (yyvsp[-1].lex).loc); + (yyval.interm).function = (yyvsp[-2].interm).function; + } + else + { + TParameter param = { 0, new TType }; + param.type->shallowCopy((yyvsp[0].interm.intermTypedNode)->getType()); + + (yyvsp[-2].interm).function->addParameter(param); + (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 5503 "MachineIndependent/glslang_tab.cpp" break; case 33: /* function_call_header: function_identifier LEFT_PAREN */ -#line 543 "MachineIndependent/glslang.y" +#line 527 "MachineIndependent/glslang.y" { (yyval.interm) = (yyvsp[-1].interm); } -#line 5476 "MachineIndependent/glslang_tab.cpp" +#line 5511 "MachineIndependent/glslang_tab.cpp" break; case 34: /* function_identifier: type_specifier */ -#line 551 "MachineIndependent/glslang.y" +#line 535 "MachineIndependent/glslang.y" { // Constructor - (yyval.interm).intermNode = nullptr; + (yyval.interm).intermNode = 0; (yyval.interm).function = parseContext.handleConstructorCall((yyvsp[0].interm.type).loc, (yyvsp[0].interm.type)); } -#line 5486 "MachineIndependent/glslang_tab.cpp" +#line 5521 "MachineIndependent/glslang_tab.cpp" break; case 35: /* function_identifier: postfix_expression */ -#line 556 "MachineIndependent/glslang.y" +#line 540 "MachineIndependent/glslang.y" { // // Should be a method or subroutine call, but we haven't recognized the arguments yet. // - (yyval.interm).function = nullptr; - (yyval.interm).intermNode = nullptr; + (yyval.interm).function = 0; + (yyval.interm).intermNode = 0; TIntermMethod* method = (yyvsp[0].interm.intermTypedNode)->getAsMethodNode(); if (method) { @@ -5508,56 +5543,56 @@ yyreduce: parseContext.error((yyvsp[0].interm.intermTypedNode)->getLoc(), "function call, method, or subroutine call expected", "", ""); } - if ((yyval.interm).function == nullptr) { + if ((yyval.interm).function == 0) { // error recover TString* empty = NewPoolTString(""); (yyval.interm).function = new TFunction(empty, TType(EbtVoid), EOpNull); } } -#line 5518 "MachineIndependent/glslang_tab.cpp" +#line 5553 "MachineIndependent/glslang_tab.cpp" break; case 36: /* function_identifier: non_uniform_qualifier */ -#line 584 "MachineIndependent/glslang.y" +#line 567 "MachineIndependent/glslang.y" { // Constructor - (yyval.interm).intermNode = nullptr; + (yyval.interm).intermNode = 0; (yyval.interm).function = parseContext.handleConstructorCall((yyvsp[0].interm.type).loc, (yyvsp[0].interm.type)); } -#line 5528 "MachineIndependent/glslang_tab.cpp" +#line 5563 "MachineIndependent/glslang_tab.cpp" break; case 37: /* unary_expression: postfix_expression */ -#line 593 "MachineIndependent/glslang.y" +#line 575 "MachineIndependent/glslang.y" { parseContext.variableCheck((yyvsp[0].interm.intermTypedNode)); (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); if (TIntermMethod* method = (yyvsp[0].interm.intermTypedNode)->getAsMethodNode()) parseContext.error((yyvsp[0].interm.intermTypedNode)->getLoc(), "incomplete method syntax", method->getMethodName().c_str(), ""); } -#line 5539 "MachineIndependent/glslang_tab.cpp" +#line 5574 "MachineIndependent/glslang_tab.cpp" break; case 38: /* unary_expression: INC_OP unary_expression */ -#line 599 "MachineIndependent/glslang.y" +#line 581 "MachineIndependent/glslang.y" { parseContext.lValueErrorCheck((yyvsp[-1].lex).loc, "++", (yyvsp[0].interm.intermTypedNode)); (yyval.interm.intermTypedNode) = parseContext.handleUnaryMath((yyvsp[-1].lex).loc, "++", EOpPreIncrement, (yyvsp[0].interm.intermTypedNode)); } -#line 5548 "MachineIndependent/glslang_tab.cpp" +#line 5583 "MachineIndependent/glslang_tab.cpp" break; case 39: /* unary_expression: DEC_OP unary_expression */ -#line 603 "MachineIndependent/glslang.y" +#line 585 "MachineIndependent/glslang.y" { parseContext.lValueErrorCheck((yyvsp[-1].lex).loc, "--", (yyvsp[0].interm.intermTypedNode)); (yyval.interm.intermTypedNode) = parseContext.handleUnaryMath((yyvsp[-1].lex).loc, "--", EOpPreDecrement, (yyvsp[0].interm.intermTypedNode)); } -#line 5557 "MachineIndependent/glslang_tab.cpp" +#line 5592 "MachineIndependent/glslang_tab.cpp" break; case 40: /* unary_expression: unary_operator unary_expression */ -#line 607 "MachineIndependent/glslang.y" +#line 589 "MachineIndependent/glslang.y" { if ((yyvsp[-1].interm).op != EOpNull) { char errorOp[2] = {0, 0}; @@ -5574,320 +5609,320 @@ yyreduce: (yyval.interm.intermTypedNode)->getAsConstantUnion()->setExpression(); } } -#line 5578 "MachineIndependent/glslang_tab.cpp" +#line 5613 "MachineIndependent/glslang_tab.cpp" break; case 41: /* unary_operator: PLUS */ -#line 627 "MachineIndependent/glslang.y" +#line 609 "MachineIndependent/glslang.y" { (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpNull; } -#line 5584 "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 5590 "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 5596 "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 5603 "MachineIndependent/glslang_tab.cpp" - break; - - case 45: /* multiplicative_expression: unary_expression */ -#line 636 "MachineIndependent/glslang.y" - { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 5609 "MachineIndependent/glslang_tab.cpp" - break; - - case 46: /* multiplicative_expression: multiplicative_expression STAR unary_expression */ -#line 637 "MachineIndependent/glslang.y" - { - (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "*", EOpMul, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); - if ((yyval.interm.intermTypedNode) == nullptr) - (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode); - } #line 5619 "MachineIndependent/glslang_tab.cpp" break; - case 47: /* multiplicative_expression: multiplicative_expression SLASH unary_expression */ -#line 642 "MachineIndependent/glslang.y" - { - (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "/", EOpDiv, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); - if ((yyval.interm.intermTypedNode) == nullptr) + case 42: /* unary_operator: DASH */ +#line 610 "MachineIndependent/glslang.y" + { (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpNegative; } +#line 5625 "MachineIndependent/glslang_tab.cpp" + break; + + case 43: /* unary_operator: BANG */ +#line 611 "MachineIndependent/glslang.y" + { (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpLogicalNot; } +#line 5631 "MachineIndependent/glslang_tab.cpp" + break; + + case 44: /* unary_operator: TILDE */ +#line 612 "MachineIndependent/glslang.y" + { (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpBitwiseNot; + parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "bitwise not"); } +#line 5638 "MachineIndependent/glslang_tab.cpp" + break; + + case 45: /* multiplicative_expression: unary_expression */ +#line 618 "MachineIndependent/glslang.y" + { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } +#line 5644 "MachineIndependent/glslang_tab.cpp" + break; + + case 46: /* multiplicative_expression: multiplicative_expression STAR unary_expression */ +#line 619 "MachineIndependent/glslang.y" + { + (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "*", EOpMul, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); + if ((yyval.interm.intermTypedNode) == 0) (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode); } -#line 5629 "MachineIndependent/glslang_tab.cpp" +#line 5654 "MachineIndependent/glslang_tab.cpp" + break; + + case 47: /* multiplicative_expression: multiplicative_expression SLASH unary_expression */ +#line 624 "MachineIndependent/glslang.y" + { + (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "/", EOpDiv, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); + if ((yyval.interm.intermTypedNode) == 0) + (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode); + } +#line 5664 "MachineIndependent/glslang_tab.cpp" break; case 48: /* multiplicative_expression: multiplicative_expression PERCENT unary_expression */ -#line 647 "MachineIndependent/glslang.y" +#line 629 "MachineIndependent/glslang.y" { parseContext.fullIntegerCheck((yyvsp[-1].lex).loc, "%"); (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "%", EOpMod, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); - if ((yyval.interm.intermTypedNode) == nullptr) + if ((yyval.interm.intermTypedNode) == 0) (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode); } -#line 5640 "MachineIndependent/glslang_tab.cpp" +#line 5675 "MachineIndependent/glslang_tab.cpp" break; case 49: /* additive_expression: multiplicative_expression */ -#line 656 "MachineIndependent/glslang.y" +#line 638 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 5646 "MachineIndependent/glslang_tab.cpp" +#line 5681 "MachineIndependent/glslang_tab.cpp" break; case 50: /* additive_expression: additive_expression PLUS multiplicative_expression */ -#line 657 "MachineIndependent/glslang.y" +#line 639 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "+", EOpAdd, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); - if ((yyval.interm.intermTypedNode) == nullptr) + if ((yyval.interm.intermTypedNode) == 0) (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode); } -#line 5656 "MachineIndependent/glslang_tab.cpp" +#line 5691 "MachineIndependent/glslang_tab.cpp" break; case 51: /* additive_expression: additive_expression DASH multiplicative_expression */ -#line 662 "MachineIndependent/glslang.y" +#line 644 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "-", EOpSub, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); - if ((yyval.interm.intermTypedNode) == nullptr) + if ((yyval.interm.intermTypedNode) == 0) (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode); } -#line 5666 "MachineIndependent/glslang_tab.cpp" +#line 5701 "MachineIndependent/glslang_tab.cpp" break; case 52: /* shift_expression: additive_expression */ -#line 670 "MachineIndependent/glslang.y" +#line 652 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 5672 "MachineIndependent/glslang_tab.cpp" +#line 5707 "MachineIndependent/glslang_tab.cpp" break; case 53: /* shift_expression: shift_expression LEFT_OP additive_expression */ -#line 671 "MachineIndependent/glslang.y" +#line 653 "MachineIndependent/glslang.y" { parseContext.fullIntegerCheck((yyvsp[-1].lex).loc, "bit shift left"); (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "<<", EOpLeftShift, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); - if ((yyval.interm.intermTypedNode) == nullptr) + if ((yyval.interm.intermTypedNode) == 0) (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode); } -#line 5683 "MachineIndependent/glslang_tab.cpp" +#line 5718 "MachineIndependent/glslang_tab.cpp" break; case 54: /* shift_expression: shift_expression RIGHT_OP additive_expression */ -#line 677 "MachineIndependent/glslang.y" +#line 659 "MachineIndependent/glslang.y" { parseContext.fullIntegerCheck((yyvsp[-1].lex).loc, "bit shift right"); (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, ">>", EOpRightShift, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); - if ((yyval.interm.intermTypedNode) == nullptr) + if ((yyval.interm.intermTypedNode) == 0) (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode); } -#line 5694 "MachineIndependent/glslang_tab.cpp" +#line 5729 "MachineIndependent/glslang_tab.cpp" break; case 55: /* relational_expression: shift_expression */ -#line 686 "MachineIndependent/glslang.y" +#line 668 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 5700 "MachineIndependent/glslang_tab.cpp" +#line 5735 "MachineIndependent/glslang_tab.cpp" break; case 56: /* relational_expression: relational_expression LEFT_ANGLE shift_expression */ -#line 687 "MachineIndependent/glslang.y" +#line 669 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "<", EOpLessThan, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); - if ((yyval.interm.intermTypedNode) == nullptr) + if ((yyval.interm.intermTypedNode) == 0) (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[-1].lex).loc); } -#line 5710 "MachineIndependent/glslang_tab.cpp" +#line 5745 "MachineIndependent/glslang_tab.cpp" break; case 57: /* relational_expression: relational_expression RIGHT_ANGLE shift_expression */ -#line 692 "MachineIndependent/glslang.y" +#line 674 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, ">", EOpGreaterThan, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); - if ((yyval.interm.intermTypedNode) == nullptr) + if ((yyval.interm.intermTypedNode) == 0) (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[-1].lex).loc); } -#line 5720 "MachineIndependent/glslang_tab.cpp" +#line 5755 "MachineIndependent/glslang_tab.cpp" break; case 58: /* relational_expression: relational_expression LE_OP shift_expression */ -#line 697 "MachineIndependent/glslang.y" +#line 679 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "<=", EOpLessThanEqual, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); - if ((yyval.interm.intermTypedNode) == nullptr) + if ((yyval.interm.intermTypedNode) == 0) (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[-1].lex).loc); } -#line 5730 "MachineIndependent/glslang_tab.cpp" +#line 5765 "MachineIndependent/glslang_tab.cpp" break; case 59: /* relational_expression: relational_expression GE_OP shift_expression */ -#line 702 "MachineIndependent/glslang.y" +#line 684 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, ">=", EOpGreaterThanEqual, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); - if ((yyval.interm.intermTypedNode) == nullptr) + if ((yyval.interm.intermTypedNode) == 0) (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[-1].lex).loc); } -#line 5740 "MachineIndependent/glslang_tab.cpp" +#line 5775 "MachineIndependent/glslang_tab.cpp" break; case 60: /* equality_expression: relational_expression */ -#line 710 "MachineIndependent/glslang.y" +#line 692 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 5746 "MachineIndependent/glslang_tab.cpp" +#line 5781 "MachineIndependent/glslang_tab.cpp" break; case 61: /* equality_expression: equality_expression EQ_OP relational_expression */ -#line 711 "MachineIndependent/glslang.y" +#line 693 "MachineIndependent/glslang.y" { parseContext.arrayObjectCheck((yyvsp[-1].lex).loc, (yyvsp[-2].interm.intermTypedNode)->getType(), "array comparison"); parseContext.opaqueCheck((yyvsp[-1].lex).loc, (yyvsp[-2].interm.intermTypedNode)->getType(), "=="); parseContext.specializationCheck((yyvsp[-1].lex).loc, (yyvsp[-2].interm.intermTypedNode)->getType(), "=="); parseContext.referenceCheck((yyvsp[-1].lex).loc, (yyvsp[-2].interm.intermTypedNode)->getType(), "=="); (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "==", EOpEqual, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); - if ((yyval.interm.intermTypedNode) == nullptr) + if ((yyval.interm.intermTypedNode) == 0) (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[-1].lex).loc); } -#line 5760 "MachineIndependent/glslang_tab.cpp" +#line 5795 "MachineIndependent/glslang_tab.cpp" break; case 62: /* equality_expression: equality_expression NE_OP relational_expression */ -#line 720 "MachineIndependent/glslang.y" +#line 702 "MachineIndependent/glslang.y" { parseContext.arrayObjectCheck((yyvsp[-1].lex).loc, (yyvsp[-2].interm.intermTypedNode)->getType(), "array comparison"); parseContext.opaqueCheck((yyvsp[-1].lex).loc, (yyvsp[-2].interm.intermTypedNode)->getType(), "!="); parseContext.specializationCheck((yyvsp[-1].lex).loc, (yyvsp[-2].interm.intermTypedNode)->getType(), "!="); parseContext.referenceCheck((yyvsp[-1].lex).loc, (yyvsp[-2].interm.intermTypedNode)->getType(), "!="); (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "!=", EOpNotEqual, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); - if ((yyval.interm.intermTypedNode) == nullptr) + if ((yyval.interm.intermTypedNode) == 0) (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[-1].lex).loc); } -#line 5774 "MachineIndependent/glslang_tab.cpp" +#line 5809 "MachineIndependent/glslang_tab.cpp" break; case 63: /* and_expression: equality_expression */ -#line 732 "MachineIndependent/glslang.y" +#line 714 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 5780 "MachineIndependent/glslang_tab.cpp" +#line 5815 "MachineIndependent/glslang_tab.cpp" break; case 64: /* and_expression: and_expression AMPERSAND equality_expression */ -#line 733 "MachineIndependent/glslang.y" +#line 715 "MachineIndependent/glslang.y" { parseContext.fullIntegerCheck((yyvsp[-1].lex).loc, "bitwise and"); (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "&", EOpAnd, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); - if ((yyval.interm.intermTypedNode) == nullptr) + if ((yyval.interm.intermTypedNode) == 0) (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode); } -#line 5791 "MachineIndependent/glslang_tab.cpp" +#line 5826 "MachineIndependent/glslang_tab.cpp" break; case 65: /* exclusive_or_expression: and_expression */ -#line 742 "MachineIndependent/glslang.y" +#line 724 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 5797 "MachineIndependent/glslang_tab.cpp" +#line 5832 "MachineIndependent/glslang_tab.cpp" break; case 66: /* exclusive_or_expression: exclusive_or_expression CARET and_expression */ -#line 743 "MachineIndependent/glslang.y" +#line 725 "MachineIndependent/glslang.y" { parseContext.fullIntegerCheck((yyvsp[-1].lex).loc, "bitwise exclusive or"); (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "^", EOpExclusiveOr, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); - if ((yyval.interm.intermTypedNode) == nullptr) + if ((yyval.interm.intermTypedNode) == 0) (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode); } -#line 5808 "MachineIndependent/glslang_tab.cpp" +#line 5843 "MachineIndependent/glslang_tab.cpp" break; case 67: /* inclusive_or_expression: exclusive_or_expression */ -#line 752 "MachineIndependent/glslang.y" +#line 734 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 5814 "MachineIndependent/glslang_tab.cpp" +#line 5849 "MachineIndependent/glslang_tab.cpp" break; case 68: /* inclusive_or_expression: inclusive_or_expression VERTICAL_BAR exclusive_or_expression */ -#line 753 "MachineIndependent/glslang.y" +#line 735 "MachineIndependent/glslang.y" { parseContext.fullIntegerCheck((yyvsp[-1].lex).loc, "bitwise inclusive or"); (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "|", EOpInclusiveOr, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); - if ((yyval.interm.intermTypedNode) == nullptr) + if ((yyval.interm.intermTypedNode) == 0) (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode); } -#line 5825 "MachineIndependent/glslang_tab.cpp" +#line 5860 "MachineIndependent/glslang_tab.cpp" break; case 69: /* logical_and_expression: inclusive_or_expression */ -#line 762 "MachineIndependent/glslang.y" +#line 744 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 5831 "MachineIndependent/glslang_tab.cpp" +#line 5866 "MachineIndependent/glslang_tab.cpp" break; case 70: /* logical_and_expression: logical_and_expression AND_OP inclusive_or_expression */ -#line 763 "MachineIndependent/glslang.y" +#line 745 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "&&", EOpLogicalAnd, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); - if ((yyval.interm.intermTypedNode) == nullptr) + if ((yyval.interm.intermTypedNode) == 0) (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[-1].lex).loc); } -#line 5841 "MachineIndependent/glslang_tab.cpp" +#line 5876 "MachineIndependent/glslang_tab.cpp" break; case 71: /* logical_xor_expression: logical_and_expression */ -#line 771 "MachineIndependent/glslang.y" +#line 753 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 5847 "MachineIndependent/glslang_tab.cpp" +#line 5882 "MachineIndependent/glslang_tab.cpp" break; case 72: /* logical_xor_expression: logical_xor_expression XOR_OP logical_and_expression */ -#line 772 "MachineIndependent/glslang.y" +#line 754 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "^^", EOpLogicalXor, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); - if ((yyval.interm.intermTypedNode) == nullptr) + if ((yyval.interm.intermTypedNode) == 0) (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[-1].lex).loc); } -#line 5857 "MachineIndependent/glslang_tab.cpp" +#line 5892 "MachineIndependent/glslang_tab.cpp" break; case 73: /* logical_or_expression: logical_xor_expression */ -#line 780 "MachineIndependent/glslang.y" +#line 762 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 5863 "MachineIndependent/glslang_tab.cpp" +#line 5898 "MachineIndependent/glslang_tab.cpp" break; case 74: /* logical_or_expression: logical_or_expression OR_OP logical_xor_expression */ -#line 781 "MachineIndependent/glslang.y" +#line 763 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "||", EOpLogicalOr, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); - if ((yyval.interm.intermTypedNode) == nullptr) + if ((yyval.interm.intermTypedNode) == 0) (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[-1].lex).loc); } -#line 5873 "MachineIndependent/glslang_tab.cpp" +#line 5908 "MachineIndependent/glslang_tab.cpp" break; case 75: /* conditional_expression: logical_or_expression */ -#line 789 "MachineIndependent/glslang.y" +#line 771 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 5879 "MachineIndependent/glslang_tab.cpp" +#line 5914 "MachineIndependent/glslang_tab.cpp" break; case 76: /* $@1: %empty */ -#line 790 "MachineIndependent/glslang.y" +#line 772 "MachineIndependent/glslang.y" { ++parseContext.controlFlowNestingLevel; } -#line 5887 "MachineIndependent/glslang_tab.cpp" +#line 5922 "MachineIndependent/glslang_tab.cpp" break; case 77: /* conditional_expression: logical_or_expression QUESTION $@1 expression COLON assignment_expression */ -#line 793 "MachineIndependent/glslang.y" +#line 775 "MachineIndependent/glslang.y" { --parseContext.controlFlowNestingLevel; parseContext.boolCheck((yyvsp[-4].lex).loc, (yyvsp[-5].interm.intermTypedNode)); @@ -5895,22 +5930,22 @@ yyreduce: parseContext.rValueErrorCheck((yyvsp[-1].lex).loc, ":", (yyvsp[-2].interm.intermTypedNode)); 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) == nullptr) { + 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())); (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } } -#line 5904 "MachineIndependent/glslang_tab.cpp" +#line 5939 "MachineIndependent/glslang_tab.cpp" break; case 78: /* assignment_expression: conditional_expression */ -#line 808 "MachineIndependent/glslang.y" +#line 790 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 5910 "MachineIndependent/glslang_tab.cpp" +#line 5945 "MachineIndependent/glslang_tab.cpp" break; case 79: /* assignment_expression: unary_expression assignment_operator assignment_expression */ -#line 809 "MachineIndependent/glslang.y" +#line 791 "MachineIndependent/glslang.y" { parseContext.arrayObjectCheck((yyvsp[-1].interm).loc, (yyvsp[-2].interm.intermTypedNode)->getType(), "array assignment"); parseContext.opaqueCheck((yyvsp[-1].interm).loc, (yyvsp[-2].interm.intermTypedNode)->getType(), "="); @@ -5919,264 +5954,264 @@ yyreduce: parseContext.lValueErrorCheck((yyvsp[-1].interm).loc, "assign", (yyvsp[-2].interm.intermTypedNode)); parseContext.rValueErrorCheck((yyvsp[-1].interm).loc, "assign", (yyvsp[0].interm.intermTypedNode)); (yyval.interm.intermTypedNode) = parseContext.addAssign((yyvsp[-1].interm).loc, (yyvsp[-1].interm).op, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); - if ((yyval.interm.intermTypedNode) == nullptr) { + 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())); (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode); } } -#line 5928 "MachineIndependent/glslang_tab.cpp" +#line 5963 "MachineIndependent/glslang_tab.cpp" break; case 80: /* assignment_operator: EQUAL */ -#line 825 "MachineIndependent/glslang.y" +#line 807 "MachineIndependent/glslang.y" { (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpAssign; } -#line 5937 "MachineIndependent/glslang_tab.cpp" +#line 5972 "MachineIndependent/glslang_tab.cpp" break; case 81: /* assignment_operator: MUL_ASSIGN */ -#line 829 "MachineIndependent/glslang.y" +#line 811 "MachineIndependent/glslang.y" { (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpMulAssign; } -#line 5946 "MachineIndependent/glslang_tab.cpp" +#line 5981 "MachineIndependent/glslang_tab.cpp" break; case 82: /* assignment_operator: DIV_ASSIGN */ -#line 833 "MachineIndependent/glslang.y" +#line 815 "MachineIndependent/glslang.y" { (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpDivAssign; } -#line 5955 "MachineIndependent/glslang_tab.cpp" +#line 5990 "MachineIndependent/glslang_tab.cpp" break; case 83: /* assignment_operator: MOD_ASSIGN */ -#line 837 "MachineIndependent/glslang.y" +#line 819 "MachineIndependent/glslang.y" { parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "%="); (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpModAssign; } -#line 5965 "MachineIndependent/glslang_tab.cpp" +#line 6000 "MachineIndependent/glslang_tab.cpp" break; case 84: /* assignment_operator: ADD_ASSIGN */ -#line 842 "MachineIndependent/glslang.y" +#line 824 "MachineIndependent/glslang.y" { (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpAddAssign; } -#line 5974 "MachineIndependent/glslang_tab.cpp" +#line 6009 "MachineIndependent/glslang_tab.cpp" break; case 85: /* assignment_operator: SUB_ASSIGN */ -#line 846 "MachineIndependent/glslang.y" +#line 828 "MachineIndependent/glslang.y" { (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpSubAssign; } -#line 5983 "MachineIndependent/glslang_tab.cpp" +#line 6018 "MachineIndependent/glslang_tab.cpp" break; case 86: /* assignment_operator: LEFT_ASSIGN */ -#line 850 "MachineIndependent/glslang.y" +#line 832 "MachineIndependent/glslang.y" { parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "bit-shift left assign"); (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpLeftShiftAssign; } -#line 5992 "MachineIndependent/glslang_tab.cpp" +#line 6027 "MachineIndependent/glslang_tab.cpp" break; case 87: /* assignment_operator: RIGHT_ASSIGN */ -#line 854 "MachineIndependent/glslang.y" +#line 836 "MachineIndependent/glslang.y" { parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "bit-shift right assign"); (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpRightShiftAssign; } -#line 6001 "MachineIndependent/glslang_tab.cpp" +#line 6036 "MachineIndependent/glslang_tab.cpp" break; case 88: /* assignment_operator: AND_ASSIGN */ -#line 858 "MachineIndependent/glslang.y" +#line 840 "MachineIndependent/glslang.y" { parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "bitwise-and assign"); (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpAndAssign; } -#line 6010 "MachineIndependent/glslang_tab.cpp" +#line 6045 "MachineIndependent/glslang_tab.cpp" break; case 89: /* assignment_operator: XOR_ASSIGN */ -#line 862 "MachineIndependent/glslang.y" +#line 844 "MachineIndependent/glslang.y" { parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "bitwise-xor assign"); (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpExclusiveOrAssign; } -#line 6019 "MachineIndependent/glslang_tab.cpp" +#line 6054 "MachineIndependent/glslang_tab.cpp" break; case 90: /* assignment_operator: OR_ASSIGN */ -#line 866 "MachineIndependent/glslang.y" +#line 848 "MachineIndependent/glslang.y" { parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "bitwise-or assign"); (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpInclusiveOrAssign; } -#line 6028 "MachineIndependent/glslang_tab.cpp" +#line 6063 "MachineIndependent/glslang_tab.cpp" break; case 91: /* expression: assignment_expression */ -#line 873 "MachineIndependent/glslang.y" +#line 855 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 6036 "MachineIndependent/glslang_tab.cpp" +#line 6071 "MachineIndependent/glslang_tab.cpp" break; case 92: /* expression: expression COMMA assignment_expression */ -#line 876 "MachineIndependent/glslang.y" +#line 858 "MachineIndependent/glslang.y" { parseContext.samplerConstructorLocationCheck((yyvsp[-1].lex).loc, ",", (yyvsp[0].interm.intermTypedNode)); (yyval.interm.intermTypedNode) = parseContext.intermediate.addComma((yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yyvsp[-1].lex).loc); - if ((yyval.interm.intermTypedNode) == nullptr) { + 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())); (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } } -#line 6049 "MachineIndependent/glslang_tab.cpp" +#line 6084 "MachineIndependent/glslang_tab.cpp" break; case 93: /* constant_expression: conditional_expression */ -#line 887 "MachineIndependent/glslang.y" +#line 869 "MachineIndependent/glslang.y" { parseContext.constantValueCheck((yyvsp[0].interm.intermTypedNode), ""); (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 6058 "MachineIndependent/glslang_tab.cpp" +#line 6093 "MachineIndependent/glslang_tab.cpp" break; case 94: /* declaration: function_prototype SEMICOLON */ -#line 894 "MachineIndependent/glslang.y" +#line 876 "MachineIndependent/glslang.y" { parseContext.handleFunctionDeclarator((yyvsp[-1].interm).loc, *(yyvsp[-1].interm).function, true /* prototype */); - (yyval.interm.intermNode) = nullptr; + (yyval.interm.intermNode) = 0; // TODO: 4.0 functionality: subroutines: make the identifier a user type for this signature } -#line 6068 "MachineIndependent/glslang_tab.cpp" +#line 6103 "MachineIndependent/glslang_tab.cpp" break; case 95: /* declaration: spirv_instruction_qualifier function_prototype SEMICOLON */ -#line 900 "MachineIndependent/glslang.y" +#line 881 "MachineIndependent/glslang.y" { parseContext.requireExtensions((yyvsp[-1].interm).loc, 1, &E_GL_EXT_spirv_intrinsics, "SPIR-V instruction qualifier"); (yyvsp[-1].interm).function->setSpirvInstruction(*(yyvsp[-2].interm.spirvInst)); // Attach SPIR-V intruction qualifier parseContext.handleFunctionDeclarator((yyvsp[-1].interm).loc, *(yyvsp[-1].interm).function, true /* prototype */); - (yyval.interm.intermNode) = nullptr; + (yyval.interm.intermNode) = 0; // TODO: 4.0 functionality: subroutines: make the identifier a user type for this signature } -#line 6080 "MachineIndependent/glslang_tab.cpp" +#line 6115 "MachineIndependent/glslang_tab.cpp" break; case 96: /* declaration: spirv_execution_mode_qualifier SEMICOLON */ -#line 907 "MachineIndependent/glslang.y" +#line 888 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "SPIR-V execution mode qualifier"); parseContext.requireExtensions((yyvsp[0].lex).loc, 1, &E_GL_EXT_spirv_intrinsics, "SPIR-V execution mode qualifier"); - (yyval.interm.intermNode) = nullptr; + (yyval.interm.intermNode) = 0; } -#line 6090 "MachineIndependent/glslang_tab.cpp" +#line 6125 "MachineIndependent/glslang_tab.cpp" break; case 97: /* declaration: init_declarator_list SEMICOLON */ -#line 913 "MachineIndependent/glslang.y" +#line 893 "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 6100 "MachineIndependent/glslang_tab.cpp" +#line 6135 "MachineIndependent/glslang_tab.cpp" break; case 98: /* declaration: PRECISION precision_qualifier type_specifier SEMICOLON */ -#line 918 "MachineIndependent/glslang.y" +#line 898 "MachineIndependent/glslang.y" { - parseContext.profileRequires((yyvsp[-3].lex).loc, ENoProfile, 130, nullptr, "precision statement"); + parseContext.profileRequires((yyvsp[-3].lex).loc, ENoProfile, 130, 0, "precision statement"); // lazy setting of the previous scope's defaults, has effect only the first time it is called in a particular scope parseContext.symbolTable.setPreviousDefaultPrecisions(&parseContext.defaultPrecision[0]); parseContext.setDefaultPrecision((yyvsp[-3].lex).loc, (yyvsp[-1].interm.type), (yyvsp[-2].interm.type).qualifier.precision); - (yyval.interm.intermNode) = nullptr; + (yyval.interm.intermNode) = 0; } -#line 6112 "MachineIndependent/glslang_tab.cpp" +#line 6147 "MachineIndependent/glslang_tab.cpp" break; case 99: /* declaration: block_structure SEMICOLON */ -#line 925 "MachineIndependent/glslang.y" +#line 905 "MachineIndependent/glslang.y" { parseContext.declareBlock((yyvsp[-1].interm).loc, *(yyvsp[-1].interm).typeList); - (yyval.interm.intermNode) = nullptr; + (yyval.interm.intermNode) = 0; } -#line 6121 "MachineIndependent/glslang_tab.cpp" +#line 6156 "MachineIndependent/glslang_tab.cpp" break; case 100: /* declaration: block_structure IDENTIFIER SEMICOLON */ -#line 929 "MachineIndependent/glslang.y" +#line 909 "MachineIndependent/glslang.y" { parseContext.declareBlock((yyvsp[-2].interm).loc, *(yyvsp[-2].interm).typeList, (yyvsp[-1].lex).string); - (yyval.interm.intermNode) = nullptr; + (yyval.interm.intermNode) = 0; } -#line 6130 "MachineIndependent/glslang_tab.cpp" +#line 6165 "MachineIndependent/glslang_tab.cpp" break; case 101: /* declaration: block_structure IDENTIFIER array_specifier SEMICOLON */ -#line 933 "MachineIndependent/glslang.y" +#line 913 "MachineIndependent/glslang.y" { parseContext.declareBlock((yyvsp[-3].interm).loc, *(yyvsp[-3].interm).typeList, (yyvsp[-2].lex).string, (yyvsp[-1].interm).arraySizes); - (yyval.interm.intermNode) = nullptr; + (yyval.interm.intermNode) = 0; } -#line 6139 "MachineIndependent/glslang_tab.cpp" +#line 6174 "MachineIndependent/glslang_tab.cpp" break; case 102: /* declaration: type_qualifier SEMICOLON */ -#line 937 "MachineIndependent/glslang.y" +#line 917 "MachineIndependent/glslang.y" { parseContext.globalQualifierFixCheck((yyvsp[-1].interm.type).loc, (yyvsp[-1].interm.type).qualifier); parseContext.updateStandaloneQualifierDefaults((yyvsp[-1].interm.type).loc, (yyvsp[-1].interm.type)); - (yyval.interm.intermNode) = nullptr; + (yyval.interm.intermNode) = 0; } -#line 6149 "MachineIndependent/glslang_tab.cpp" +#line 6184 "MachineIndependent/glslang_tab.cpp" break; case 103: /* declaration: type_qualifier IDENTIFIER SEMICOLON */ -#line 942 "MachineIndependent/glslang.y" +#line 922 "MachineIndependent/glslang.y" { parseContext.checkNoShaderLayouts((yyvsp[-2].interm.type).loc, (yyvsp[-2].interm.type).shaderQualifiers); parseContext.addQualifierToExisting((yyvsp[-2].interm.type).loc, (yyvsp[-2].interm.type).qualifier, *(yyvsp[-1].lex).string); - (yyval.interm.intermNode) = nullptr; + (yyval.interm.intermNode) = 0; } -#line 6159 "MachineIndependent/glslang_tab.cpp" +#line 6194 "MachineIndependent/glslang_tab.cpp" break; case 104: /* declaration: type_qualifier IDENTIFIER identifier_list SEMICOLON */ -#line 947 "MachineIndependent/glslang.y" +#line 927 "MachineIndependent/glslang.y" { parseContext.checkNoShaderLayouts((yyvsp[-3].interm.type).loc, (yyvsp[-3].interm.type).shaderQualifiers); (yyvsp[-1].interm.identifierList)->push_back((yyvsp[-2].lex).string); parseContext.addQualifierToExisting((yyvsp[-3].interm.type).loc, (yyvsp[-3].interm.type).qualifier, *(yyvsp[-1].interm.identifierList)); - (yyval.interm.intermNode) = nullptr; + (yyval.interm.intermNode) = 0; } -#line 6170 "MachineIndependent/glslang_tab.cpp" +#line 6205 "MachineIndependent/glslang_tab.cpp" break; case 105: /* $@2: %empty */ -#line 956 "MachineIndependent/glslang.y" +#line 936 "MachineIndependent/glslang.y" { parseContext.nestedBlockCheck((yyvsp[-2].interm.type).loc); } -#line 6176 "MachineIndependent/glslang_tab.cpp" +#line 6211 "MachineIndependent/glslang_tab.cpp" break; case 106: /* block_structure: type_qualifier IDENTIFIER LEFT_BRACE $@2 struct_declaration_list RIGHT_BRACE */ -#line 956 "MachineIndependent/glslang.y" +#line 936 "MachineIndependent/glslang.y" { --parseContext.blockNestingLevel; parseContext.blockName = (yyvsp[-4].lex).string; @@ -6186,101 +6221,107 @@ yyreduce: (yyval.interm).loc = (yyvsp[-5].interm.type).loc; (yyval.interm).typeList = (yyvsp[-1].interm.typeList); } -#line 6190 "MachineIndependent/glslang_tab.cpp" +#line 6225 "MachineIndependent/glslang_tab.cpp" break; case 107: /* identifier_list: COMMA IDENTIFIER */ -#line 967 "MachineIndependent/glslang.y" +#line 947 "MachineIndependent/glslang.y" { (yyval.interm.identifierList) = new TIdentifierList; (yyval.interm.identifierList)->push_back((yyvsp[0].lex).string); } -#line 6199 "MachineIndependent/glslang_tab.cpp" +#line 6234 "MachineIndependent/glslang_tab.cpp" break; case 108: /* identifier_list: identifier_list COMMA IDENTIFIER */ -#line 971 "MachineIndependent/glslang.y" +#line 951 "MachineIndependent/glslang.y" { (yyval.interm.identifierList) = (yyvsp[-2].interm.identifierList); (yyval.interm.identifierList)->push_back((yyvsp[0].lex).string); } -#line 6208 "MachineIndependent/glslang_tab.cpp" +#line 6243 "MachineIndependent/glslang_tab.cpp" break; case 109: /* function_prototype: function_declarator RIGHT_PAREN */ -#line 978 "MachineIndependent/glslang.y" +#line 958 "MachineIndependent/glslang.y" { (yyval.interm).function = (yyvsp[-1].interm.function); + if (parseContext.compileOnly) (yyval.interm).function->setExport(); (yyval.interm).loc = (yyvsp[0].lex).loc; } -#line 6217 "MachineIndependent/glslang_tab.cpp" +#line 6253 "MachineIndependent/glslang_tab.cpp" break; case 110: /* function_prototype: function_declarator RIGHT_PAREN attribute */ -#line 982 "MachineIndependent/glslang.y" +#line 963 "MachineIndependent/glslang.y" { (yyval.interm).function = (yyvsp[-2].interm.function); + if (parseContext.compileOnly) (yyval.interm).function->setExport(); (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)); } -#line 6228 "MachineIndependent/glslang_tab.cpp" +#line 6264 "MachineIndependent/glslang_tab.cpp" break; case 111: /* function_prototype: attribute function_declarator RIGHT_PAREN */ -#line 988 "MachineIndependent/glslang.y" +#line 969 "MachineIndependent/glslang.y" { (yyval.interm).function = (yyvsp[-1].interm.function); + if (parseContext.compileOnly) (yyval.interm).function->setExport(); (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)); } -#line 6239 "MachineIndependent/glslang_tab.cpp" +#line 6275 "MachineIndependent/glslang_tab.cpp" break; case 112: /* function_prototype: attribute function_declarator RIGHT_PAREN attribute */ -#line 994 "MachineIndependent/glslang.y" +#line 975 "MachineIndependent/glslang.y" { (yyval.interm).function = (yyvsp[-2].interm.function); + if (parseContext.compileOnly) (yyval.interm).function->setExport(); (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)); } -#line 6251 "MachineIndependent/glslang_tab.cpp" +#line 6287 "MachineIndependent/glslang_tab.cpp" break; case 113: /* function_declarator: function_header */ -#line 1004 "MachineIndependent/glslang.y" +#line 985 "MachineIndependent/glslang.y" { (yyval.interm.function) = (yyvsp[0].interm.function); } -#line 6259 "MachineIndependent/glslang_tab.cpp" +#line 6295 "MachineIndependent/glslang_tab.cpp" break; case 114: /* function_declarator: function_header_with_parameters */ -#line 1007 "MachineIndependent/glslang.y" +#line 988 "MachineIndependent/glslang.y" { (yyval.interm.function) = (yyvsp[0].interm.function); } -#line 6267 "MachineIndependent/glslang_tab.cpp" +#line 6303 "MachineIndependent/glslang_tab.cpp" break; case 115: /* function_header_with_parameters: function_header parameter_declaration */ -#line 1014 "MachineIndependent/glslang.y" +#line 995 "MachineIndependent/glslang.y" { // Add the parameter (yyval.interm.function) = (yyvsp[-1].interm.function); if ((yyvsp[0].interm).param.type->getBasicType() != EbtVoid) - (yyvsp[-1].interm.function)->addParameter((yyvsp[0].interm).param); + { + if (!(parseContext.spvVersion.vulkan > 0 && parseContext.spvVersion.vulkanRelaxed)) + (yyvsp[-1].interm.function)->addParameter((yyvsp[0].interm).param); + else + parseContext.vkRelaxedRemapFunctionParameter((yyvsp[-1].interm.function), (yyvsp[0].interm).param); + } else delete (yyvsp[0].interm).param.type; } -#line 6280 "MachineIndependent/glslang_tab.cpp" +#line 6321 "MachineIndependent/glslang_tab.cpp" break; case 116: /* function_header_with_parameters: function_header_with_parameters COMMA parameter_declaration */ -#line 1022 "MachineIndependent/glslang.y" +#line 1008 "MachineIndependent/glslang.y" { // // Only first parameter of one-parameter functions can be void @@ -6295,14 +6336,17 @@ yyreduce: } else { // Add the parameter (yyval.interm.function) = (yyvsp[-2].interm.function); - (yyvsp[-2].interm.function)->addParameter((yyvsp[0].interm).param); + if (!(parseContext.spvVersion.vulkan > 0 && parseContext.spvVersion.vulkanRelaxed)) + (yyvsp[-2].interm.function)->addParameter((yyvsp[0].interm).param); + else + parseContext.vkRelaxedRemapFunctionParameter((yyvsp[-2].interm.function), (yyvsp[0].interm).param); } } -#line 6302 "MachineIndependent/glslang_tab.cpp" +#line 6346 "MachineIndependent/glslang_tab.cpp" break; case 117: /* function_header: fully_specified_type IDENTIFIER LEFT_PAREN */ -#line 1042 "MachineIndependent/glslang.y" +#line 1031 "MachineIndependent/glslang.y" { if ((yyvsp[-2].interm.type).qualifier.storage != EvqGlobal && (yyvsp[-2].interm.type).qualifier.storage != EvqTemporary) { parseContext.error((yyvsp[-1].lex).loc, "no qualifiers allowed for function return", @@ -6322,15 +6366,15 @@ yyreduce: function = new TFunction((yyvsp[-1].lex).string, type); (yyval.interm.function) = function; } -#line 6326 "MachineIndependent/glslang_tab.cpp" +#line 6370 "MachineIndependent/glslang_tab.cpp" break; case 118: /* parameter_declarator: type_specifier IDENTIFIER */ -#line 1065 "MachineIndependent/glslang.y" +#line 1054 "MachineIndependent/glslang.y" { if ((yyvsp[-1].interm.type).arraySizes) { parseContext.profileRequires((yyvsp[-1].interm.type).loc, ENoProfile, 120, E_GL_3DL_array_objects, "arrayed type"); - parseContext.profileRequires((yyvsp[-1].interm.type).loc, EEsProfile, 300, nullptr, "arrayed type"); + parseContext.profileRequires((yyvsp[-1].interm.type).loc, EEsProfile, 300, 0, "arrayed type"); parseContext.arraySizeRequiredCheck((yyvsp[-1].interm.type).loc, *(yyvsp[-1].interm.type).arraySizes); } if ((yyvsp[-1].interm.type).basicType == EbtVoid) { @@ -6342,15 +6386,15 @@ yyreduce: (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).param = param; } -#line 6346 "MachineIndependent/glslang_tab.cpp" +#line 6390 "MachineIndependent/glslang_tab.cpp" break; case 119: /* parameter_declarator: type_specifier IDENTIFIER array_specifier */ -#line 1080 "MachineIndependent/glslang.y" +#line 1069 "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"); - parseContext.profileRequires((yyvsp[-2].interm.type).loc, EEsProfile, 300, nullptr, "arrayed type"); + parseContext.profileRequires((yyvsp[-2].interm.type).loc, EEsProfile, 300, 0, "arrayed type"); parseContext.arraySizeRequiredCheck((yyvsp[-2].interm.type).loc, *(yyvsp[-2].interm.type).arraySizes); } TType* type = new TType((yyvsp[-2].interm.type)); @@ -6366,197 +6410,195 @@ yyreduce: (yyval.interm).loc = (yyvsp[-1].lex).loc; (yyval.interm).param = param; } -#line 6370 "MachineIndependent/glslang_tab.cpp" +#line 6414 "MachineIndependent/glslang_tab.cpp" break; case 120: /* parameter_declaration: type_qualifier parameter_declarator */ -#line 1105 "MachineIndependent/glslang.y" +#line 1094 "MachineIndependent/glslang.y" { (yyval.interm) = (yyvsp[0].interm); if ((yyvsp[-1].interm.type).qualifier.precision != EpqNone) (yyval.interm).param.type->getQualifier().precision = (yyvsp[-1].interm.type).qualifier.precision; - parseContext.precisionQualifierCheck((yyval.interm).loc, (yyval.interm).param.type->getBasicType(), (yyval.interm).param.type->getQualifier()); + parseContext.precisionQualifierCheck((yyval.interm).loc, (yyval.interm).param.type->getBasicType(), (yyval.interm).param.type->getQualifier(), (yyval.interm).param.type->isCoopMat()); parseContext.checkNoShaderLayouts((yyvsp[-1].interm.type).loc, (yyvsp[-1].interm.type).shaderQualifiers); parseContext.parameterTypeCheck((yyvsp[0].interm).loc, (yyvsp[-1].interm.type).qualifier.storage, *(yyval.interm).param.type); parseContext.paramCheckFix((yyvsp[-1].interm.type).loc, (yyvsp[-1].interm.type).qualifier, *(yyval.interm).param.type); } -#line 6386 "MachineIndependent/glslang_tab.cpp" +#line 6430 "MachineIndependent/glslang_tab.cpp" break; case 121: /* parameter_declaration: parameter_declarator */ -#line 1116 "MachineIndependent/glslang.y" +#line 1105 "MachineIndependent/glslang.y" { (yyval.interm) = (yyvsp[0].interm); parseContext.parameterTypeCheck((yyvsp[0].interm).loc, EvqIn, *(yyvsp[0].interm).param.type); parseContext.paramCheckFixStorage((yyvsp[0].interm).loc, EvqTemporary, *(yyval.interm).param.type); - parseContext.precisionQualifierCheck((yyval.interm).loc, (yyval.interm).param.type->getBasicType(), (yyval.interm).param.type->getQualifier()); + parseContext.precisionQualifierCheck((yyval.interm).loc, (yyval.interm).param.type->getBasicType(), (yyval.interm).param.type->getQualifier(), (yyval.interm).param.type->isCoopMat()); } -#line 6398 "MachineIndependent/glslang_tab.cpp" +#line 6442 "MachineIndependent/glslang_tab.cpp" break; case 122: /* parameter_declaration: type_qualifier parameter_type_specifier */ -#line 1126 "MachineIndependent/glslang.y" +#line 1115 "MachineIndependent/glslang.y" { (yyval.interm) = (yyvsp[0].interm); if ((yyvsp[-1].interm.type).qualifier.precision != EpqNone) (yyval.interm).param.type->getQualifier().precision = (yyvsp[-1].interm.type).qualifier.precision; - parseContext.precisionQualifierCheck((yyvsp[-1].interm.type).loc, (yyval.interm).param.type->getBasicType(), (yyval.interm).param.type->getQualifier()); + parseContext.precisionQualifierCheck((yyvsp[-1].interm.type).loc, (yyval.interm).param.type->getBasicType(), (yyval.interm).param.type->getQualifier(), (yyval.interm).param.type->isCoopMat()); parseContext.checkNoShaderLayouts((yyvsp[-1].interm.type).loc, (yyvsp[-1].interm.type).shaderQualifiers); parseContext.parameterTypeCheck((yyvsp[0].interm).loc, (yyvsp[-1].interm.type).qualifier.storage, *(yyval.interm).param.type); parseContext.paramCheckFix((yyvsp[-1].interm.type).loc, (yyvsp[-1].interm.type).qualifier, *(yyval.interm).param.type); } -#line 6413 "MachineIndependent/glslang_tab.cpp" +#line 6457 "MachineIndependent/glslang_tab.cpp" break; case 123: /* parameter_declaration: parameter_type_specifier */ -#line 1136 "MachineIndependent/glslang.y" +#line 1125 "MachineIndependent/glslang.y" { (yyval.interm) = (yyvsp[0].interm); parseContext.parameterTypeCheck((yyvsp[0].interm).loc, EvqIn, *(yyvsp[0].interm).param.type); parseContext.paramCheckFixStorage((yyvsp[0].interm).loc, EvqTemporary, *(yyval.interm).param.type); - parseContext.precisionQualifierCheck((yyval.interm).loc, (yyval.interm).param.type->getBasicType(), (yyval.interm).param.type->getQualifier()); + parseContext.precisionQualifierCheck((yyval.interm).loc, (yyval.interm).param.type->getBasicType(), (yyval.interm).param.type->getQualifier(), (yyval.interm).param.type->isCoopMat()); } -#line 6425 "MachineIndependent/glslang_tab.cpp" +#line 6469 "MachineIndependent/glslang_tab.cpp" break; case 124: /* parameter_type_specifier: type_specifier */ -#line 1146 "MachineIndependent/glslang.y" +#line 1135 "MachineIndependent/glslang.y" { - TParameter param = { nullptr, new TType((yyvsp[0].interm.type)) }; + TParameter param = { 0, new TType((yyvsp[0].interm.type)) }; (yyval.interm).param = param; if ((yyvsp[0].interm.type).arraySizes) parseContext.arraySizeRequiredCheck((yyvsp[0].interm.type).loc, *(yyvsp[0].interm.type).arraySizes); } -#line 6436 "MachineIndependent/glslang_tab.cpp" +#line 6480 "MachineIndependent/glslang_tab.cpp" break; case 125: /* init_declarator_list: single_declaration */ -#line 1155 "MachineIndependent/glslang.y" +#line 1144 "MachineIndependent/glslang.y" { (yyval.interm) = (yyvsp[0].interm); } -#line 6444 "MachineIndependent/glslang_tab.cpp" +#line 6488 "MachineIndependent/glslang_tab.cpp" break; case 126: /* init_declarator_list: init_declarator_list COMMA IDENTIFIER */ -#line 1158 "MachineIndependent/glslang.y" +#line 1147 "MachineIndependent/glslang.y" { (yyval.interm) = (yyvsp[-2].interm); parseContext.declareVariable((yyvsp[0].lex).loc, *(yyvsp[0].lex).string, (yyvsp[-2].interm).type); } -#line 6453 "MachineIndependent/glslang_tab.cpp" +#line 6497 "MachineIndependent/glslang_tab.cpp" break; case 127: /* init_declarator_list: init_declarator_list COMMA IDENTIFIER array_specifier */ -#line 1162 "MachineIndependent/glslang.y" +#line 1151 "MachineIndependent/glslang.y" { (yyval.interm) = (yyvsp[-3].interm); parseContext.declareVariable((yyvsp[-1].lex).loc, *(yyvsp[-1].lex).string, (yyvsp[-3].interm).type, (yyvsp[0].interm).arraySizes); } -#line 6462 "MachineIndependent/glslang_tab.cpp" +#line 6506 "MachineIndependent/glslang_tab.cpp" break; case 128: /* init_declarator_list: init_declarator_list COMMA IDENTIFIER array_specifier EQUAL initializer */ -#line 1166 "MachineIndependent/glslang.y" +#line 1155 "MachineIndependent/glslang.y" { (yyval.interm).type = (yyvsp[-5].interm).type; TIntermNode* initNode = parseContext.declareVariable((yyvsp[-3].lex).loc, *(yyvsp[-3].lex).string, (yyvsp[-5].interm).type, (yyvsp[-2].interm).arraySizes, (yyvsp[0].interm.intermTypedNode)); (yyval.interm).intermNode = parseContext.intermediate.growAggregate((yyvsp[-5].interm).intermNode, initNode, (yyvsp[-1].lex).loc); } -#line 6472 "MachineIndependent/glslang_tab.cpp" +#line 6516 "MachineIndependent/glslang_tab.cpp" break; case 129: /* init_declarator_list: init_declarator_list COMMA IDENTIFIER EQUAL initializer */ -#line 1171 "MachineIndependent/glslang.y" +#line 1160 "MachineIndependent/glslang.y" { (yyval.interm).type = (yyvsp[-4].interm).type; - TIntermNode* initNode = parseContext.declareVariable((yyvsp[-2].lex).loc, *(yyvsp[-2].lex).string, (yyvsp[-4].interm).type, nullptr, (yyvsp[0].interm.intermTypedNode)); + 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 6482 "MachineIndependent/glslang_tab.cpp" +#line 6526 "MachineIndependent/glslang_tab.cpp" break; case 130: /* single_declaration: fully_specified_type */ -#line 1179 "MachineIndependent/glslang.y" +#line 1168 "MachineIndependent/glslang.y" { (yyval.interm).type = (yyvsp[0].interm.type); - (yyval.interm).intermNode = nullptr; - + (yyval.interm).intermNode = 0; parseContext.declareTypeDefaults((yyval.interm).loc, (yyval.interm).type); - } -#line 6494 "MachineIndependent/glslang_tab.cpp" +#line 6536 "MachineIndependent/glslang_tab.cpp" break; case 131: /* single_declaration: fully_specified_type IDENTIFIER */ -#line 1186 "MachineIndependent/glslang.y" +#line 1173 "MachineIndependent/glslang.y" { (yyval.interm).type = (yyvsp[-1].interm.type); - (yyval.interm).intermNode = nullptr; + (yyval.interm).intermNode = 0; parseContext.declareVariable((yyvsp[0].lex).loc, *(yyvsp[0].lex).string, (yyvsp[-1].interm.type)); } -#line 6504 "MachineIndependent/glslang_tab.cpp" +#line 6546 "MachineIndependent/glslang_tab.cpp" break; case 132: /* single_declaration: fully_specified_type IDENTIFIER array_specifier */ -#line 1191 "MachineIndependent/glslang.y" +#line 1178 "MachineIndependent/glslang.y" { (yyval.interm).type = (yyvsp[-2].interm.type); - (yyval.interm).intermNode = nullptr; + (yyval.interm).intermNode = 0; parseContext.declareVariable((yyvsp[-1].lex).loc, *(yyvsp[-1].lex).string, (yyvsp[-2].interm.type), (yyvsp[0].interm).arraySizes); } -#line 6514 "MachineIndependent/glslang_tab.cpp" +#line 6556 "MachineIndependent/glslang_tab.cpp" break; case 133: /* single_declaration: fully_specified_type IDENTIFIER array_specifier EQUAL initializer */ -#line 1196 "MachineIndependent/glslang.y" +#line 1183 "MachineIndependent/glslang.y" { (yyval.interm).type = (yyvsp[-4].interm.type); TIntermNode* initNode = parseContext.declareVariable((yyvsp[-3].lex).loc, *(yyvsp[-3].lex).string, (yyvsp[-4].interm.type), (yyvsp[-2].interm).arraySizes, (yyvsp[0].interm.intermTypedNode)); - (yyval.interm).intermNode = parseContext.intermediate.growAggregate(nullptr, initNode, (yyvsp[-1].lex).loc); + (yyval.interm).intermNode = parseContext.intermediate.growAggregate(0, initNode, (yyvsp[-1].lex).loc); } -#line 6524 "MachineIndependent/glslang_tab.cpp" +#line 6566 "MachineIndependent/glslang_tab.cpp" break; case 134: /* single_declaration: fully_specified_type IDENTIFIER EQUAL initializer */ -#line 1201 "MachineIndependent/glslang.y" +#line 1188 "MachineIndependent/glslang.y" { (yyval.interm).type = (yyvsp[-3].interm.type); - TIntermNode* initNode = parseContext.declareVariable((yyvsp[-2].lex).loc, *(yyvsp[-2].lex).string, (yyvsp[-3].interm.type), nullptr, (yyvsp[0].interm.intermTypedNode)); - (yyval.interm).intermNode = parseContext.intermediate.growAggregate(nullptr, initNode, (yyvsp[-1].lex).loc); + 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 6534 "MachineIndependent/glslang_tab.cpp" +#line 6576 "MachineIndependent/glslang_tab.cpp" break; case 135: /* fully_specified_type: type_specifier */ -#line 1210 "MachineIndependent/glslang.y" +#line 1197 "MachineIndependent/glslang.y" { (yyval.interm.type) = (yyvsp[0].interm.type); parseContext.globalQualifierTypeCheck((yyvsp[0].interm.type).loc, (yyvsp[0].interm.type).qualifier, (yyval.interm.type)); if ((yyvsp[0].interm.type).arraySizes) { parseContext.profileRequires((yyvsp[0].interm.type).loc, ENoProfile, 120, E_GL_3DL_array_objects, "arrayed type"); - parseContext.profileRequires((yyvsp[0].interm.type).loc, EEsProfile, 300, nullptr, "arrayed type"); + parseContext.profileRequires((yyvsp[0].interm.type).loc, EEsProfile, 300, 0, "arrayed type"); } - parseContext.precisionQualifierCheck((yyval.interm.type).loc, (yyval.interm.type).basicType, (yyval.interm.type).qualifier); + parseContext.precisionQualifierCheck((yyval.interm.type).loc, (yyval.interm.type).basicType, (yyval.interm.type).qualifier, (yyval.interm.type).isCoopmat()); } -#line 6549 "MachineIndependent/glslang_tab.cpp" +#line 6591 "MachineIndependent/glslang_tab.cpp" break; case 136: /* fully_specified_type: type_qualifier type_specifier */ -#line 1220 "MachineIndependent/glslang.y" +#line 1207 "MachineIndependent/glslang.y" { - parseContext.globalQualifierFixCheck((yyvsp[-1].interm.type).loc, (yyvsp[-1].interm.type).qualifier); + parseContext.globalQualifierFixCheck((yyvsp[-1].interm.type).loc, (yyvsp[-1].interm.type).qualifier, false, &(yyvsp[0].interm.type)); parseContext.globalQualifierTypeCheck((yyvsp[-1].interm.type).loc, (yyvsp[-1].interm.type).qualifier, (yyvsp[0].interm.type)); if ((yyvsp[0].interm.type).arraySizes) { parseContext.profileRequires((yyvsp[0].interm.type).loc, ENoProfile, 120, E_GL_3DL_array_objects, "arrayed type"); - parseContext.profileRequires((yyvsp[0].interm.type).loc, EEsProfile, 300, nullptr, "arrayed type"); + parseContext.profileRequires((yyvsp[0].interm.type).loc, EEsProfile, 300, 0, "arrayed type"); } if ((yyvsp[0].interm.type).arraySizes && parseContext.arrayQualifierError((yyvsp[0].interm.type).loc, (yyvsp[-1].interm.type).qualifier)) @@ -6565,7 +6607,7 @@ yyreduce: parseContext.checkNoShaderLayouts((yyvsp[0].interm.type).loc, (yyvsp[-1].interm.type).shaderQualifiers); (yyvsp[0].interm.type).shaderQualifiers.merge((yyvsp[-1].interm.type).shaderQualifiers); parseContext.mergeQualifiers((yyvsp[0].interm.type).loc, (yyvsp[0].interm.type).qualifier, (yyvsp[-1].interm.type).qualifier, true); - parseContext.precisionQualifierCheck((yyvsp[0].interm.type).loc, (yyvsp[0].interm.type).basicType, (yyvsp[0].interm.type).qualifier); + parseContext.precisionQualifierCheck((yyvsp[0].interm.type).loc, (yyvsp[0].interm.type).basicType, (yyvsp[0].interm.type).qualifier, (yyvsp[0].interm.type).isCoopmat()); (yyval.interm.type) = (yyvsp[0].interm.type); @@ -6574,58 +6616,58 @@ yyreduce: (parseContext.language == EShLangFragment && (yyval.interm.type).qualifier.storage == EvqVaryingIn))) (yyval.interm.type).qualifier.smooth = true; } -#line 6578 "MachineIndependent/glslang_tab.cpp" +#line 6620 "MachineIndependent/glslang_tab.cpp" break; case 137: /* invariant_qualifier: INVARIANT */ -#line 1247 "MachineIndependent/glslang.y" +#line 1234 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "invariant"); - parseContext.profileRequires((yyval.interm.type).loc, ENoProfile, 120, nullptr, "invariant"); + parseContext.profileRequires((yyval.interm.type).loc, ENoProfile, 120, 0, "invariant"); (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.invariant = true; } -#line 6589 "MachineIndependent/glslang_tab.cpp" +#line 6631 "MachineIndependent/glslang_tab.cpp" break; case 138: /* interpolation_qualifier: SMOOTH */ -#line 1256 "MachineIndependent/glslang.y" +#line 1243 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "smooth"); - parseContext.profileRequires((yyvsp[0].lex).loc, ENoProfile, 130, nullptr, "smooth"); - parseContext.profileRequires((yyvsp[0].lex).loc, EEsProfile, 300, nullptr, "smooth"); + parseContext.profileRequires((yyvsp[0].lex).loc, ENoProfile, 130, 0, "smooth"); + parseContext.profileRequires((yyvsp[0].lex).loc, EEsProfile, 300, 0, "smooth"); (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.smooth = true; } -#line 6601 "MachineIndependent/glslang_tab.cpp" +#line 6643 "MachineIndependent/glslang_tab.cpp" break; case 139: /* interpolation_qualifier: FLAT */ -#line 1263 "MachineIndependent/glslang.y" +#line 1250 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "flat"); - parseContext.profileRequires((yyvsp[0].lex).loc, ENoProfile, 130, nullptr, "flat"); - parseContext.profileRequires((yyvsp[0].lex).loc, EEsProfile, 300, nullptr, "flat"); + parseContext.profileRequires((yyvsp[0].lex).loc, ENoProfile, 130, 0, "flat"); + parseContext.profileRequires((yyvsp[0].lex).loc, EEsProfile, 300, 0, "flat"); (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.flat = true; } -#line 6613 "MachineIndependent/glslang_tab.cpp" +#line 6655 "MachineIndependent/glslang_tab.cpp" break; case 140: /* interpolation_qualifier: NOPERSPECTIVE */ -#line 1271 "MachineIndependent/glslang.y" +#line 1257 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "noperspective"); parseContext.profileRequires((yyvsp[0].lex).loc, EEsProfile, 0, E_GL_NV_shader_noperspective_interpolation, "noperspective"); - parseContext.profileRequires((yyvsp[0].lex).loc, ENoProfile, 130, nullptr, "noperspective"); + parseContext.profileRequires((yyvsp[0].lex).loc, ENoProfile, 130, 0, "noperspective"); (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.nopersp = true; } -#line 6625 "MachineIndependent/glslang_tab.cpp" +#line 6667 "MachineIndependent/glslang_tab.cpp" break; case 141: /* interpolation_qualifier: EXPLICITINTERPAMD */ -#line 1278 "MachineIndependent/glslang.y" +#line 1264 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "__explicitInterpAMD"); parseContext.profileRequires((yyvsp[0].lex).loc, ECoreProfile, 450, E_GL_AMD_shader_explicit_vertex_parameter, "explicit interpolation"); @@ -6633,11 +6675,11 @@ yyreduce: (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.explicitInterp = true; } -#line 6637 "MachineIndependent/glslang_tab.cpp" +#line 6679 "MachineIndependent/glslang_tab.cpp" break; case 142: /* interpolation_qualifier: PERVERTEXNV */ -#line 1285 "MachineIndependent/glslang.y" +#line 1271 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "pervertexNV"); parseContext.profileRequires((yyvsp[0].lex).loc, ECoreProfile, 0, E_GL_NV_fragment_shader_barycentric, "fragment shader barycentric"); @@ -6646,11 +6688,11 @@ yyreduce: (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.pervertexNV = true; } -#line 6650 "MachineIndependent/glslang_tab.cpp" +#line 6692 "MachineIndependent/glslang_tab.cpp" break; case 143: /* interpolation_qualifier: PERVERTEXEXT */ -#line 1293 "MachineIndependent/glslang.y" +#line 1279 "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"); @@ -6659,11 +6701,11 @@ yyreduce: (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.pervertexEXT = true; } -#line 6663 "MachineIndependent/glslang_tab.cpp" +#line 6705 "MachineIndependent/glslang_tab.cpp" break; case 144: /* interpolation_qualifier: PERPRIMITIVENV */ -#line 1301 "MachineIndependent/glslang.y" +#line 1287 "MachineIndependent/glslang.y" { // No need for profile version or extension check. Shader stage already checks both. parseContext.globalCheck((yyvsp[0].lex).loc, "perprimitiveNV"); @@ -6674,11 +6716,11 @@ yyreduce: (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.perPrimitiveNV = true; } -#line 6678 "MachineIndependent/glslang_tab.cpp" +#line 6720 "MachineIndependent/glslang_tab.cpp" break; case 145: /* interpolation_qualifier: PERPRIMITIVEEXT */ -#line 1311 "MachineIndependent/glslang.y" +#line 1297 "MachineIndependent/glslang.y" { // No need for profile version or extension check. Shader stage already checks both. parseContext.globalCheck((yyvsp[0].lex).loc, "perprimitiveEXT"); @@ -6689,11 +6731,11 @@ yyreduce: (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.perPrimitiveNV = true; } -#line 6693 "MachineIndependent/glslang_tab.cpp" +#line 6735 "MachineIndependent/glslang_tab.cpp" break; case 146: /* interpolation_qualifier: PERVIEWNV */ -#line 1321 "MachineIndependent/glslang.y" +#line 1307 "MachineIndependent/glslang.y" { // No need for profile version or extension check. Shader stage already checks both. parseContext.globalCheck((yyvsp[0].lex).loc, "perviewNV"); @@ -6701,11 +6743,11 @@ yyreduce: (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.perViewNV = true; } -#line 6705 "MachineIndependent/glslang_tab.cpp" +#line 6747 "MachineIndependent/glslang_tab.cpp" break; case 147: /* interpolation_qualifier: PERTASKNV */ -#line 1328 "MachineIndependent/glslang.y" +#line 1314 "MachineIndependent/glslang.y" { // No need for profile version or extension check. Shader stage already checks both. parseContext.globalCheck((yyvsp[0].lex).loc, "taskNV"); @@ -6713,84 +6755,84 @@ yyreduce: (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.perTaskNV = true; } -#line 6717 "MachineIndependent/glslang_tab.cpp" +#line 6759 "MachineIndependent/glslang_tab.cpp" break; case 148: /* layout_qualifier: LAYOUT LEFT_PAREN layout_qualifier_id_list RIGHT_PAREN */ -#line 1339 "MachineIndependent/glslang.y" +#line 1324 "MachineIndependent/glslang.y" { (yyval.interm.type) = (yyvsp[-1].interm.type); } -#line 6725 "MachineIndependent/glslang_tab.cpp" +#line 6767 "MachineIndependent/glslang_tab.cpp" break; case 149: /* layout_qualifier_id_list: layout_qualifier_id */ -#line 1345 "MachineIndependent/glslang.y" +#line 1330 "MachineIndependent/glslang.y" { (yyval.interm.type) = (yyvsp[0].interm.type); } -#line 6733 "MachineIndependent/glslang_tab.cpp" +#line 6775 "MachineIndependent/glslang_tab.cpp" break; case 150: /* layout_qualifier_id_list: layout_qualifier_id_list COMMA layout_qualifier_id */ -#line 1348 "MachineIndependent/glslang.y" +#line 1333 "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 6743 "MachineIndependent/glslang_tab.cpp" +#line 6785 "MachineIndependent/glslang_tab.cpp" break; case 151: /* layout_qualifier_id: IDENTIFIER */ -#line 1355 "MachineIndependent/glslang.y" +#line 1340 "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 6752 "MachineIndependent/glslang_tab.cpp" +#line 6794 "MachineIndependent/glslang_tab.cpp" break; case 152: /* layout_qualifier_id: IDENTIFIER EQUAL constant_expression */ -#line 1359 "MachineIndependent/glslang.y" +#line 1344 "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 6761 "MachineIndependent/glslang_tab.cpp" +#line 6803 "MachineIndependent/glslang_tab.cpp" break; case 153: /* layout_qualifier_id: SHARED */ -#line 1363 "MachineIndependent/glslang.y" +#line 1348 "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 6771 "MachineIndependent/glslang_tab.cpp" +#line 6813 "MachineIndependent/glslang_tab.cpp" break; case 154: /* precise_qualifier: PRECISE */ -#line 1372 "MachineIndependent/glslang.y" +#line 1356 "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 6782 "MachineIndependent/glslang_tab.cpp" +#line 6824 "MachineIndependent/glslang_tab.cpp" break; case 155: /* type_qualifier: single_type_qualifier */ -#line 1382 "MachineIndependent/glslang.y" +#line 1365 "MachineIndependent/glslang.y" { (yyval.interm.type) = (yyvsp[0].interm.type); } -#line 6790 "MachineIndependent/glslang_tab.cpp" +#line 6832 "MachineIndependent/glslang_tab.cpp" break; case 156: /* type_qualifier: type_qualifier single_type_qualifier */ -#line 1385 "MachineIndependent/glslang.y" +#line 1368 "MachineIndependent/glslang.y" { (yyval.interm.type) = (yyvsp[-1].interm.type); if ((yyval.interm.type).basicType == EbtVoid) @@ -6799,196 +6841,206 @@ 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 6803 "MachineIndependent/glslang_tab.cpp" +#line 6845 "MachineIndependent/glslang_tab.cpp" break; case 157: /* single_type_qualifier: storage_qualifier */ -#line 1396 "MachineIndependent/glslang.y" +#line 1379 "MachineIndependent/glslang.y" { (yyval.interm.type) = (yyvsp[0].interm.type); } -#line 6811 "MachineIndependent/glslang_tab.cpp" +#line 6853 "MachineIndependent/glslang_tab.cpp" break; case 158: /* single_type_qualifier: layout_qualifier */ -#line 1399 "MachineIndependent/glslang.y" +#line 1382 "MachineIndependent/glslang.y" { (yyval.interm.type) = (yyvsp[0].interm.type); } -#line 6819 "MachineIndependent/glslang_tab.cpp" +#line 6861 "MachineIndependent/glslang_tab.cpp" break; case 159: /* single_type_qualifier: precision_qualifier */ -#line 1402 "MachineIndependent/glslang.y" +#line 1385 "MachineIndependent/glslang.y" { parseContext.checkPrecisionQualifier((yyvsp[0].interm.type).loc, (yyvsp[0].interm.type).qualifier.precision); (yyval.interm.type) = (yyvsp[0].interm.type); } -#line 6828 "MachineIndependent/glslang_tab.cpp" +#line 6870 "MachineIndependent/glslang_tab.cpp" break; case 160: /* single_type_qualifier: interpolation_qualifier */ -#line 1406 "MachineIndependent/glslang.y" +#line 1389 "MachineIndependent/glslang.y" { // allow inheritance of storage qualifier from block declaration (yyval.interm.type) = (yyvsp[0].interm.type); } -#line 6837 "MachineIndependent/glslang_tab.cpp" +#line 6879 "MachineIndependent/glslang_tab.cpp" break; case 161: /* single_type_qualifier: invariant_qualifier */ -#line 1410 "MachineIndependent/glslang.y" +#line 1393 "MachineIndependent/glslang.y" { // allow inheritance of storage qualifier from block declaration (yyval.interm.type) = (yyvsp[0].interm.type); } -#line 6846 "MachineIndependent/glslang_tab.cpp" +#line 6888 "MachineIndependent/glslang_tab.cpp" break; case 162: /* single_type_qualifier: precise_qualifier */ -#line 1415 "MachineIndependent/glslang.y" +#line 1397 "MachineIndependent/glslang.y" { // allow inheritance of storage qualifier from block declaration (yyval.interm.type) = (yyvsp[0].interm.type); } -#line 6855 "MachineIndependent/glslang_tab.cpp" +#line 6897 "MachineIndependent/glslang_tab.cpp" break; case 163: /* single_type_qualifier: non_uniform_qualifier */ -#line 1419 "MachineIndependent/glslang.y" +#line 1401 "MachineIndependent/glslang.y" { (yyval.interm.type) = (yyvsp[0].interm.type); } -#line 6863 "MachineIndependent/glslang_tab.cpp" +#line 6905 "MachineIndependent/glslang_tab.cpp" break; case 164: /* single_type_qualifier: spirv_storage_class_qualifier */ -#line 1422 "MachineIndependent/glslang.y" +#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 6873 "MachineIndependent/glslang_tab.cpp" +#line 6915 "MachineIndependent/glslang_tab.cpp" break; case 165: /* single_type_qualifier: spirv_decorate_qualifier */ -#line 1427 "MachineIndependent/glslang.y" +#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 6882 "MachineIndependent/glslang_tab.cpp" +#line 6924 "MachineIndependent/glslang_tab.cpp" break; case 166: /* single_type_qualifier: SPIRV_BY_REFERENCE */ -#line 1431 "MachineIndependent/glslang.y" +#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 6892 "MachineIndependent/glslang_tab.cpp" +#line 6934 "MachineIndependent/glslang_tab.cpp" break; case 167: /* single_type_qualifier: SPIRV_LITERAL */ -#line 1436 "MachineIndependent/glslang.y" +#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 6902 "MachineIndependent/glslang_tab.cpp" +#line 6944 "MachineIndependent/glslang_tab.cpp" break; case 168: /* storage_qualifier: CONST */ -#line 1445 "MachineIndependent/glslang.y" +#line 1426 "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 6911 "MachineIndependent/glslang_tab.cpp" +#line 6953 "MachineIndependent/glslang_tab.cpp" break; case 169: /* storage_qualifier: INOUT */ -#line 1449 "MachineIndependent/glslang.y" +#line 1430 "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 6921 "MachineIndependent/glslang_tab.cpp" +#line 6963 "MachineIndependent/glslang_tab.cpp" break; case 170: /* storage_qualifier: IN */ -#line 1454 "MachineIndependent/glslang.y" +#line 1435 "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 6932 "MachineIndependent/glslang_tab.cpp" +#line 6974 "MachineIndependent/glslang_tab.cpp" break; case 171: /* storage_qualifier: OUT */ -#line 1460 "MachineIndependent/glslang.y" +#line 1441 "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 6943 "MachineIndependent/glslang_tab.cpp" +#line 6985 "MachineIndependent/glslang_tab.cpp" break; case 172: /* storage_qualifier: CENTROID */ -#line 1466 "MachineIndependent/glslang.y" +#line 1447 "MachineIndependent/glslang.y" { - parseContext.profileRequires((yyvsp[0].lex).loc, ENoProfile, 120, nullptr, "centroid"); - parseContext.profileRequires((yyvsp[0].lex).loc, EEsProfile, 300, nullptr, "centroid"); + parseContext.profileRequires((yyvsp[0].lex).loc, ENoProfile, 120, 0, "centroid"); + parseContext.profileRequires((yyvsp[0].lex).loc, EEsProfile, 300, 0, "centroid"); parseContext.globalCheck((yyvsp[0].lex).loc, "centroid"); (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.centroid = true; } -#line 6955 "MachineIndependent/glslang_tab.cpp" +#line 6997 "MachineIndependent/glslang_tab.cpp" break; case 173: /* storage_qualifier: UNIFORM */ -#line 1473 "MachineIndependent/glslang.y" +#line 1454 "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 6965 "MachineIndependent/glslang_tab.cpp" +#line 7007 "MachineIndependent/glslang_tab.cpp" break; - case 174: /* storage_qualifier: SHARED */ -#line 1478 "MachineIndependent/glslang.y" + case 174: /* storage_qualifier: TILEIMAGEEXT */ +#line 1459 "MachineIndependent/glslang.y" + { + parseContext.globalCheck((yyvsp[0].lex).loc, "tileImageEXT"); + (yyval.interm.type).init((yyvsp[0].lex).loc); + (yyval.interm.type).qualifier.storage = EvqTileImageEXT; + } +#line 7017 "MachineIndependent/glslang_tab.cpp" + break; + + case 175: /* storage_qualifier: SHARED */ +#line 1464 "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"); - parseContext.profileRequires((yyvsp[0].lex).loc, EEsProfile, 310, nullptr, "shared"); + parseContext.profileRequires((yyvsp[0].lex).loc, EEsProfile, 310, 0, "shared"); parseContext.requireStage((yyvsp[0].lex).loc, (EShLanguageMask)(EShLangComputeMask | EShLangMeshMask | EShLangTaskMask), "shared"); (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.storage = EvqShared; } -#line 6978 "MachineIndependent/glslang_tab.cpp" +#line 7030 "MachineIndependent/glslang_tab.cpp" break; - case 175: /* storage_qualifier: BUFFER */ -#line 1486 "MachineIndependent/glslang.y" + case 176: /* storage_qualifier: BUFFER */ +#line 1472 "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 6988 "MachineIndependent/glslang_tab.cpp" +#line 7040 "MachineIndependent/glslang_tab.cpp" break; - case 176: /* storage_qualifier: ATTRIBUTE */ -#line 1492 "MachineIndependent/glslang.y" + case 177: /* storage_qualifier: ATTRIBUTE */ +#line 1477 "MachineIndependent/glslang.y" { parseContext.requireStage((yyvsp[0].lex).loc, EShLangVertex, "attribute"); parseContext.checkDeprecated((yyvsp[0].lex).loc, ECoreProfile, 130, "attribute"); @@ -7001,11 +7053,11 @@ yyreduce: (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.storage = EvqVaryingIn; } -#line 7005 "MachineIndependent/glslang_tab.cpp" +#line 7057 "MachineIndependent/glslang_tab.cpp" break; - case 177: /* storage_qualifier: VARYING */ -#line 1504 "MachineIndependent/glslang.y" + case 178: /* storage_qualifier: VARYING */ +#line 1489 "MachineIndependent/glslang.y" { parseContext.checkDeprecated((yyvsp[0].lex).loc, ENoProfile, 130, "varying"); parseContext.checkDeprecated((yyvsp[0].lex).loc, ECoreProfile, 130, "varying"); @@ -7020,32 +7072,32 @@ yyreduce: else (yyval.interm.type).qualifier.storage = EvqVaryingIn; } -#line 7024 "MachineIndependent/glslang_tab.cpp" +#line 7076 "MachineIndependent/glslang_tab.cpp" break; - case 178: /* storage_qualifier: PATCH */ -#line 1518 "MachineIndependent/glslang.y" + case 179: /* storage_qualifier: PATCH */ +#line 1503 "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 7035 "MachineIndependent/glslang_tab.cpp" +#line 7087 "MachineIndependent/glslang_tab.cpp" break; - case 179: /* storage_qualifier: SAMPLE */ -#line 1524 "MachineIndependent/glslang.y" + case 180: /* storage_qualifier: SAMPLE */ +#line 1509 "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 7045 "MachineIndependent/glslang_tab.cpp" +#line 7097 "MachineIndependent/glslang_tab.cpp" break; - case 180: /* storage_qualifier: HITATTRNV */ -#line 1529 "MachineIndependent/glslang.y" + case 181: /* storage_qualifier: HITATTRNV */ +#line 1514 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "hitAttributeNV"); parseContext.requireStage((yyvsp[0].lex).loc, (EShLanguageMask)(EShLangIntersectMask | EShLangClosestHitMask @@ -7054,11 +7106,24 @@ yyreduce: (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.storage = EvqHitAttr; } -#line 7058 "MachineIndependent/glslang_tab.cpp" +#line 7110 "MachineIndependent/glslang_tab.cpp" break; - case 181: /* storage_qualifier: HITATTREXT */ -#line 1537 "MachineIndependent/glslang.y" + case 182: /* storage_qualifier: HITOBJECTATTRNV */ +#line 1522 "MachineIndependent/glslang.y" + { + parseContext.globalCheck((yyvsp[0].lex).loc, "hitAttributeNV"); + parseContext.requireStage((yyvsp[0].lex).loc, (EShLanguageMask)(EShLangRayGenMask | EShLangClosestHitMask + | EShLangMissMask), "hitObjectAttributeNV"); + parseContext.profileRequires((yyvsp[0].lex).loc, ECoreProfile, 460, E_GL_NV_shader_invocation_reorder, "hitObjectAttributeNV"); + (yyval.interm.type).init((yyvsp[0].lex).loc); + (yyval.interm.type).qualifier.storage = EvqHitObjectAttrNV; + } +#line 7123 "MachineIndependent/glslang_tab.cpp" + break; + + case 183: /* storage_qualifier: HITATTREXT */ +#line 1530 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "hitAttributeEXT"); parseContext.requireStage((yyvsp[0].lex).loc, (EShLanguageMask)(EShLangIntersectMask | EShLangClosestHitMask @@ -7067,11 +7132,11 @@ yyreduce: (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.storage = EvqHitAttr; } -#line 7071 "MachineIndependent/glslang_tab.cpp" +#line 7136 "MachineIndependent/glslang_tab.cpp" break; - case 182: /* storage_qualifier: PAYLOADNV */ -#line 1545 "MachineIndependent/glslang.y" + case 184: /* storage_qualifier: PAYLOADNV */ +#line 1538 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "rayPayloadNV"); parseContext.requireStage((yyvsp[0].lex).loc, (EShLanguageMask)(EShLangRayGenMask | EShLangClosestHitMask | @@ -7080,11 +7145,11 @@ yyreduce: (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.storage = EvqPayload; } -#line 7084 "MachineIndependent/glslang_tab.cpp" +#line 7149 "MachineIndependent/glslang_tab.cpp" break; - case 183: /* storage_qualifier: PAYLOADEXT */ -#line 1553 "MachineIndependent/glslang.y" + case 185: /* storage_qualifier: PAYLOADEXT */ +#line 1546 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "rayPayloadEXT"); parseContext.requireStage((yyvsp[0].lex).loc, (EShLanguageMask)(EShLangRayGenMask | EShLangClosestHitMask | @@ -7093,11 +7158,11 @@ yyreduce: (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.storage = EvqPayload; } -#line 7097 "MachineIndependent/glslang_tab.cpp" +#line 7162 "MachineIndependent/glslang_tab.cpp" break; - case 184: /* storage_qualifier: PAYLOADINNV */ -#line 1561 "MachineIndependent/glslang.y" + case 186: /* storage_qualifier: PAYLOADINNV */ +#line 1554 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "rayPayloadInNV"); parseContext.requireStage((yyvsp[0].lex).loc, (EShLanguageMask)(EShLangClosestHitMask | @@ -7106,11 +7171,11 @@ yyreduce: (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.storage = EvqPayloadIn; } -#line 7110 "MachineIndependent/glslang_tab.cpp" +#line 7175 "MachineIndependent/glslang_tab.cpp" break; - case 185: /* storage_qualifier: PAYLOADINEXT */ -#line 1569 "MachineIndependent/glslang.y" + case 187: /* storage_qualifier: PAYLOADINEXT */ +#line 1562 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "rayPayloadInEXT"); parseContext.requireStage((yyvsp[0].lex).loc, (EShLanguageMask)(EShLangClosestHitMask | @@ -7119,11 +7184,11 @@ yyreduce: (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.storage = EvqPayloadIn; } -#line 7123 "MachineIndependent/glslang_tab.cpp" +#line 7188 "MachineIndependent/glslang_tab.cpp" break; - case 186: /* storage_qualifier: CALLDATANV */ -#line 1577 "MachineIndependent/glslang.y" + case 188: /* storage_qualifier: CALLDATANV */ +#line 1570 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "callableDataNV"); parseContext.requireStage((yyvsp[0].lex).loc, (EShLanguageMask)(EShLangRayGenMask | @@ -7132,11 +7197,11 @@ yyreduce: (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.storage = EvqCallableData; } -#line 7136 "MachineIndependent/glslang_tab.cpp" +#line 7201 "MachineIndependent/glslang_tab.cpp" break; - case 187: /* storage_qualifier: CALLDATAEXT */ -#line 1585 "MachineIndependent/glslang.y" + case 189: /* storage_qualifier: CALLDATAEXT */ +#line 1578 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "callableDataEXT"); parseContext.requireStage((yyvsp[0].lex).loc, (EShLanguageMask)(EShLangRayGenMask | @@ -7145,11 +7210,11 @@ yyreduce: (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.storage = EvqCallableData; } -#line 7149 "MachineIndependent/glslang_tab.cpp" +#line 7214 "MachineIndependent/glslang_tab.cpp" break; - case 188: /* storage_qualifier: CALLDATAINNV */ -#line 1593 "MachineIndependent/glslang.y" + case 190: /* storage_qualifier: CALLDATAINNV */ +#line 1586 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "callableDataInNV"); parseContext.requireStage((yyvsp[0].lex).loc, (EShLanguageMask)(EShLangCallableMask), "callableDataInNV"); @@ -7157,11 +7222,11 @@ yyreduce: (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.storage = EvqCallableDataIn; } -#line 7161 "MachineIndependent/glslang_tab.cpp" +#line 7226 "MachineIndependent/glslang_tab.cpp" break; - case 189: /* storage_qualifier: CALLDATAINEXT */ -#line 1600 "MachineIndependent/glslang.y" + case 191: /* storage_qualifier: CALLDATAINEXT */ +#line 1593 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "callableDataInEXT"); parseContext.requireStage((yyvsp[0].lex).loc, (EShLanguageMask)(EShLangCallableMask), "callableDataInEXT"); @@ -7169,138 +7234,138 @@ yyreduce: (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.storage = EvqCallableDataIn; } -#line 7173 "MachineIndependent/glslang_tab.cpp" +#line 7238 "MachineIndependent/glslang_tab.cpp" break; - case 190: /* storage_qualifier: COHERENT */ -#line 1607 "MachineIndependent/glslang.y" + case 192: /* storage_qualifier: COHERENT */ +#line 1600 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.coherent = true; } -#line 7182 "MachineIndependent/glslang_tab.cpp" +#line 7247 "MachineIndependent/glslang_tab.cpp" break; - case 191: /* storage_qualifier: DEVICECOHERENT */ -#line 1611 "MachineIndependent/glslang.y" + case 193: /* storage_qualifier: DEVICECOHERENT */ +#line 1604 "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 7192 "MachineIndependent/glslang_tab.cpp" +#line 7257 "MachineIndependent/glslang_tab.cpp" break; - case 192: /* storage_qualifier: QUEUEFAMILYCOHERENT */ -#line 1616 "MachineIndependent/glslang.y" + case 194: /* storage_qualifier: QUEUEFAMILYCOHERENT */ +#line 1609 "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 7202 "MachineIndependent/glslang_tab.cpp" +#line 7267 "MachineIndependent/glslang_tab.cpp" break; - case 193: /* storage_qualifier: WORKGROUPCOHERENT */ -#line 1621 "MachineIndependent/glslang.y" + case 195: /* storage_qualifier: WORKGROUPCOHERENT */ +#line 1614 "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 7212 "MachineIndependent/glslang_tab.cpp" +#line 7277 "MachineIndependent/glslang_tab.cpp" break; - case 194: /* storage_qualifier: SUBGROUPCOHERENT */ -#line 1626 "MachineIndependent/glslang.y" + case 196: /* storage_qualifier: SUBGROUPCOHERENT */ +#line 1619 "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 7222 "MachineIndependent/glslang_tab.cpp" +#line 7287 "MachineIndependent/glslang_tab.cpp" break; - case 195: /* storage_qualifier: NONPRIVATE */ -#line 1631 "MachineIndependent/glslang.y" + case 197: /* storage_qualifier: NONPRIVATE */ +#line 1624 "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 7232 "MachineIndependent/glslang_tab.cpp" +#line 7297 "MachineIndependent/glslang_tab.cpp" break; - case 196: /* storage_qualifier: SHADERCALLCOHERENT */ -#line 1636 "MachineIndependent/glslang.y" + case 198: /* storage_qualifier: SHADERCALLCOHERENT */ +#line 1629 "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 7242 "MachineIndependent/glslang_tab.cpp" +#line 7307 "MachineIndependent/glslang_tab.cpp" break; - case 197: /* storage_qualifier: VOLATILE */ -#line 1641 "MachineIndependent/glslang.y" + case 199: /* storage_qualifier: VOLATILE */ +#line 1634 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.volatil = true; } -#line 7251 "MachineIndependent/glslang_tab.cpp" +#line 7316 "MachineIndependent/glslang_tab.cpp" break; - case 198: /* storage_qualifier: RESTRICT */ -#line 1645 "MachineIndependent/glslang.y" + case 200: /* storage_qualifier: RESTRICT */ +#line 1638 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.restrict = true; } -#line 7260 "MachineIndependent/glslang_tab.cpp" +#line 7325 "MachineIndependent/glslang_tab.cpp" break; - case 199: /* storage_qualifier: READONLY */ -#line 1649 "MachineIndependent/glslang.y" + case 201: /* storage_qualifier: READONLY */ +#line 1642 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.readonly = true; } -#line 7269 "MachineIndependent/glslang_tab.cpp" +#line 7334 "MachineIndependent/glslang_tab.cpp" break; - case 200: /* storage_qualifier: WRITEONLY */ -#line 1653 "MachineIndependent/glslang.y" + case 202: /* storage_qualifier: WRITEONLY */ +#line 1646 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.writeonly = true; } -#line 7278 "MachineIndependent/glslang_tab.cpp" +#line 7343 "MachineIndependent/glslang_tab.cpp" break; - case 201: /* storage_qualifier: SUBROUTINE */ -#line 1657 "MachineIndependent/glslang.y" + case 203: /* storage_qualifier: SUBROUTINE */ +#line 1650 "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 7289 "MachineIndependent/glslang_tab.cpp" +#line 7354 "MachineIndependent/glslang_tab.cpp" break; - case 202: /* storage_qualifier: SUBROUTINE LEFT_PAREN type_name_list RIGHT_PAREN */ -#line 1663 "MachineIndependent/glslang.y" + case 204: /* storage_qualifier: SUBROUTINE LEFT_PAREN type_name_list RIGHT_PAREN */ +#line 1656 "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 7300 "MachineIndependent/glslang_tab.cpp" +#line 7365 "MachineIndependent/glslang_tab.cpp" break; - case 203: /* storage_qualifier: TASKPAYLOADWORKGROUPEXT */ -#line 1669 "MachineIndependent/glslang.y" + case 205: /* storage_qualifier: TASKPAYLOADWORKGROUPEXT */ +#line 1662 "MachineIndependent/glslang.y" { // No need for profile version or extension check. Shader stage already checks both. parseContext.globalCheck((yyvsp[0].lex).loc, "taskPayloadSharedEXT"); @@ -7308,70 +7373,73 @@ yyreduce: (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.storage = EvqtaskPayloadSharedEXT; } -#line 7312 "MachineIndependent/glslang_tab.cpp" +#line 7377 "MachineIndependent/glslang_tab.cpp" break; - case 204: /* non_uniform_qualifier: NONUNIFORM */ -#line 1681 "MachineIndependent/glslang.y" + case 206: /* non_uniform_qualifier: NONUNIFORM */ +#line 1672 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.nonUniform = true; } -#line 7321 "MachineIndependent/glslang_tab.cpp" +#line 7386 "MachineIndependent/glslang_tab.cpp" break; - case 205: /* type_name_list: IDENTIFIER */ -#line 1688 "MachineIndependent/glslang.y" + case 207: /* type_name_list: IDENTIFIER */ +#line 1679 "MachineIndependent/glslang.y" { // TODO } -#line 7329 "MachineIndependent/glslang_tab.cpp" +#line 7394 "MachineIndependent/glslang_tab.cpp" break; - case 206: /* type_name_list: type_name_list COMMA IDENTIFIER */ -#line 1691 "MachineIndependent/glslang.y" + case 208: /* type_name_list: type_name_list COMMA IDENTIFIER */ +#line 1682 "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 7339 "MachineIndependent/glslang_tab.cpp" +#line 7404 "MachineIndependent/glslang_tab.cpp" break; - case 207: /* type_specifier: type_specifier_nonarray type_parameter_specifier_opt */ -#line 1700 "MachineIndependent/glslang.y" + case 209: /* type_specifier: type_specifier_nonarray type_parameter_specifier_opt */ +#line 1690 "MachineIndependent/glslang.y" { (yyval.interm.type) = (yyvsp[-1].interm.type); (yyval.interm.type).qualifier.precision = parseContext.getDefaultPrecision((yyval.interm.type)); (yyval.interm.type).typeParameters = (yyvsp[0].interm.typeParameters); + parseContext.coopMatTypeParametersCheck((yyvsp[-1].interm.type).loc, (yyval.interm.type)); + } -#line 7349 "MachineIndependent/glslang_tab.cpp" +#line 7416 "MachineIndependent/glslang_tab.cpp" break; - case 208: /* type_specifier: type_specifier_nonarray type_parameter_specifier_opt array_specifier */ -#line 1705 "MachineIndependent/glslang.y" + case 210: /* type_specifier: type_specifier_nonarray type_parameter_specifier_opt array_specifier */ +#line 1697 "MachineIndependent/glslang.y" { parseContext.arrayOfArrayVersionCheck((yyvsp[0].interm).loc, (yyvsp[0].interm).arraySizes); (yyval.interm.type) = (yyvsp[-2].interm.type); (yyval.interm.type).qualifier.precision = parseContext.getDefaultPrecision((yyval.interm.type)); (yyval.interm.type).typeParameters = (yyvsp[-1].interm.typeParameters); (yyval.interm.type).arraySizes = (yyvsp[0].interm).arraySizes; + parseContext.coopMatTypeParametersCheck((yyvsp[-2].interm.type).loc, (yyval.interm.type)); } -#line 7361 "MachineIndependent/glslang_tab.cpp" +#line 7429 "MachineIndependent/glslang_tab.cpp" break; - case 209: /* array_specifier: LEFT_BRACKET RIGHT_BRACKET */ -#line 1715 "MachineIndependent/glslang.y" + case 211: /* array_specifier: LEFT_BRACKET RIGHT_BRACKET */ +#line 1708 "MachineIndependent/glslang.y" { (yyval.interm).loc = (yyvsp[-1].lex).loc; (yyval.interm).arraySizes = new TArraySizes; (yyval.interm).arraySizes->addInnerSize(); } -#line 7371 "MachineIndependent/glslang_tab.cpp" +#line 7439 "MachineIndependent/glslang_tab.cpp" break; - case 210: /* array_specifier: LEFT_BRACKET conditional_expression RIGHT_BRACKET */ -#line 1720 "MachineIndependent/glslang.y" + case 212: /* array_specifier: LEFT_BRACKET conditional_expression RIGHT_BRACKET */ +#line 1713 "MachineIndependent/glslang.y" { (yyval.interm).loc = (yyvsp[-2].lex).loc; (yyval.interm).arraySizes = new TArraySizes; @@ -7380,20 +7448,20 @@ yyreduce: parseContext.arraySizeCheck((yyvsp[-1].interm.intermTypedNode)->getLoc(), (yyvsp[-1].interm.intermTypedNode), size, "array size"); (yyval.interm).arraySizes->addInnerSize(size); } -#line 7384 "MachineIndependent/glslang_tab.cpp" +#line 7452 "MachineIndependent/glslang_tab.cpp" break; - case 211: /* array_specifier: array_specifier LEFT_BRACKET RIGHT_BRACKET */ -#line 1728 "MachineIndependent/glslang.y" + case 213: /* array_specifier: array_specifier LEFT_BRACKET RIGHT_BRACKET */ +#line 1721 "MachineIndependent/glslang.y" { (yyval.interm) = (yyvsp[-2].interm); (yyval.interm).arraySizes->addInnerSize(); } -#line 7393 "MachineIndependent/glslang_tab.cpp" +#line 7461 "MachineIndependent/glslang_tab.cpp" break; - case 212: /* array_specifier: array_specifier LEFT_BRACKET conditional_expression RIGHT_BRACKET */ -#line 1732 "MachineIndependent/glslang.y" + case 214: /* array_specifier: array_specifier LEFT_BRACKET conditional_expression RIGHT_BRACKET */ +#line 1725 "MachineIndependent/glslang.y" { (yyval.interm) = (yyvsp[-3].interm); @@ -7401,348 +7469,359 @@ yyreduce: parseContext.arraySizeCheck((yyvsp[-1].interm.intermTypedNode)->getLoc(), (yyvsp[-1].interm.intermTypedNode), size, "array size"); (yyval.interm).arraySizes->addInnerSize(size); } -#line 7405 "MachineIndependent/glslang_tab.cpp" +#line 7473 "MachineIndependent/glslang_tab.cpp" break; - case 213: /* type_parameter_specifier_opt: type_parameter_specifier */ -#line 1742 "MachineIndependent/glslang.y" + case 215: /* type_parameter_specifier_opt: type_parameter_specifier */ +#line 1735 "MachineIndependent/glslang.y" { (yyval.interm.typeParameters) = (yyvsp[0].interm.typeParameters); } -#line 7413 "MachineIndependent/glslang_tab.cpp" +#line 7481 "MachineIndependent/glslang_tab.cpp" break; - case 214: /* type_parameter_specifier_opt: %empty */ -#line 1745 "MachineIndependent/glslang.y" + case 216: /* type_parameter_specifier_opt: %empty */ +#line 1738 "MachineIndependent/glslang.y" { - (yyval.interm.typeParameters) = nullptr; + (yyval.interm.typeParameters) = 0; } -#line 7421 "MachineIndependent/glslang_tab.cpp" +#line 7489 "MachineIndependent/glslang_tab.cpp" break; - case 215: /* type_parameter_specifier: LEFT_ANGLE type_parameter_specifier_list RIGHT_ANGLE */ -#line 1751 "MachineIndependent/glslang.y" + case 217: /* type_parameter_specifier: LEFT_ANGLE type_parameter_specifier_list RIGHT_ANGLE */ +#line 1744 "MachineIndependent/glslang.y" { (yyval.interm.typeParameters) = (yyvsp[-1].interm.typeParameters); } -#line 7429 "MachineIndependent/glslang_tab.cpp" +#line 7497 "MachineIndependent/glslang_tab.cpp" break; - case 216: /* type_parameter_specifier_list: unary_expression */ -#line 1757 "MachineIndependent/glslang.y" + case 218: /* type_parameter_specifier_list: type_specifier */ +#line 1750 "MachineIndependent/glslang.y" + { + (yyval.interm.typeParameters) = new TTypeParameters; + (yyval.interm.typeParameters)->arraySizes = new TArraySizes; + (yyval.interm.typeParameters)->basicType = (yyvsp[0].interm.type).basicType; + } +#line 7507 "MachineIndependent/glslang_tab.cpp" + break; + + case 219: /* type_parameter_specifier_list: unary_expression */ +#line 1755 "MachineIndependent/glslang.y" { - (yyval.interm.typeParameters) = new TArraySizes; + (yyval.interm.typeParameters) = new TTypeParameters; + (yyval.interm.typeParameters)->arraySizes = new TArraySizes; TArraySize size; - parseContext.arraySizeCheck((yyvsp[0].interm.intermTypedNode)->getLoc(), (yyvsp[0].interm.intermTypedNode), size, "type parameter"); - (yyval.interm.typeParameters)->addInnerSize(size); + parseContext.arraySizeCheck((yyvsp[0].interm.intermTypedNode)->getLoc(), (yyvsp[0].interm.intermTypedNode), size, "type parameter", true); + (yyval.interm.typeParameters)->arraySizes->addInnerSize(size); } -#line 7441 "MachineIndependent/glslang_tab.cpp" +#line 7520 "MachineIndependent/glslang_tab.cpp" break; - case 217: /* type_parameter_specifier_list: type_parameter_specifier_list COMMA unary_expression */ -#line 1764 "MachineIndependent/glslang.y" + case 220: /* type_parameter_specifier_list: type_parameter_specifier_list COMMA unary_expression */ +#line 1763 "MachineIndependent/glslang.y" { (yyval.interm.typeParameters) = (yyvsp[-2].interm.typeParameters); TArraySize size; - parseContext.arraySizeCheck((yyvsp[0].interm.intermTypedNode)->getLoc(), (yyvsp[0].interm.intermTypedNode), size, "type parameter"); - (yyval.interm.typeParameters)->addInnerSize(size); + parseContext.arraySizeCheck((yyvsp[0].interm.intermTypedNode)->getLoc(), (yyvsp[0].interm.intermTypedNode), size, "type parameter", true); + (yyval.interm.typeParameters)->arraySizes->addInnerSize(size); } -#line 7453 "MachineIndependent/glslang_tab.cpp" +#line 7532 "MachineIndependent/glslang_tab.cpp" break; - case 218: /* type_specifier_nonarray: VOID */ -#line 1774 "MachineIndependent/glslang.y" + case 221: /* type_specifier_nonarray: VOID */ +#line 1773 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtVoid; } -#line 7462 "MachineIndependent/glslang_tab.cpp" +#line 7541 "MachineIndependent/glslang_tab.cpp" break; - case 219: /* type_specifier_nonarray: FLOAT */ -#line 1778 "MachineIndependent/glslang.y" + case 222: /* type_specifier_nonarray: FLOAT */ +#line 1777 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat; } -#line 7471 "MachineIndependent/glslang_tab.cpp" +#line 7550 "MachineIndependent/glslang_tab.cpp" break; - case 220: /* type_specifier_nonarray: INT */ -#line 1782 "MachineIndependent/glslang.y" + case 223: /* type_specifier_nonarray: INT */ +#line 1781 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtInt; } -#line 7480 "MachineIndependent/glslang_tab.cpp" +#line 7559 "MachineIndependent/glslang_tab.cpp" break; - case 221: /* type_specifier_nonarray: UINT */ -#line 1786 "MachineIndependent/glslang.y" + case 224: /* type_specifier_nonarray: UINT */ +#line 1785 "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 7490 "MachineIndependent/glslang_tab.cpp" - break; - - case 222: /* type_specifier_nonarray: BOOL */ -#line 1791 "MachineIndependent/glslang.y" - { - (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtBool; - } -#line 7499 "MachineIndependent/glslang_tab.cpp" - break; - - case 223: /* type_specifier_nonarray: VEC2 */ -#line 1795 "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 7509 "MachineIndependent/glslang_tab.cpp" - break; - - case 224: /* type_specifier_nonarray: VEC3 */ -#line 1800 "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 7519 "MachineIndependent/glslang_tab.cpp" - break; - - case 225: /* type_specifier_nonarray: VEC4 */ -#line 1805 "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 7529 "MachineIndependent/glslang_tab.cpp" - break; - - case 226: /* type_specifier_nonarray: BVEC2 */ -#line 1810 "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 7539 "MachineIndependent/glslang_tab.cpp" - break; - - case 227: /* type_specifier_nonarray: BVEC3 */ -#line 1815 "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 7549 "MachineIndependent/glslang_tab.cpp" - break; - - case 228: /* type_specifier_nonarray: BVEC4 */ -#line 1820 "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 7559 "MachineIndependent/glslang_tab.cpp" - break; - - case 229: /* type_specifier_nonarray: IVEC2 */ -#line 1825 "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 7569 "MachineIndependent/glslang_tab.cpp" break; - case 230: /* type_specifier_nonarray: IVEC3 */ -#line 1830 "MachineIndependent/glslang.y" + case 225: /* type_specifier_nonarray: BOOL */ +#line 1790 "MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtBool; + } +#line 7578 "MachineIndependent/glslang_tab.cpp" + break; + + case 226: /* type_specifier_nonarray: VEC2 */ +#line 1794 "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 7588 "MachineIndependent/glslang_tab.cpp" + break; + + case 227: /* type_specifier_nonarray: VEC3 */ +#line 1799 "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 7598 "MachineIndependent/glslang_tab.cpp" + break; + + case 228: /* type_specifier_nonarray: VEC4 */ +#line 1804 "MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtFloat; + (yyval.interm.type).setVector(4); + } +#line 7608 "MachineIndependent/glslang_tab.cpp" + break; + + case 229: /* type_specifier_nonarray: BVEC2 */ +#line 1809 "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 7618 "MachineIndependent/glslang_tab.cpp" + break; + + case 230: /* type_specifier_nonarray: BVEC3 */ +#line 1814 "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 7628 "MachineIndependent/glslang_tab.cpp" + break; + + case 231: /* type_specifier_nonarray: BVEC4 */ +#line 1819 "MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtBool; + (yyval.interm.type).setVector(4); + } +#line 7638 "MachineIndependent/glslang_tab.cpp" + break; + + case 232: /* type_specifier_nonarray: IVEC2 */ +#line 1824 "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 7648 "MachineIndependent/glslang_tab.cpp" + break; + + case 233: /* type_specifier_nonarray: IVEC3 */ +#line 1829 "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 7579 "MachineIndependent/glslang_tab.cpp" +#line 7658 "MachineIndependent/glslang_tab.cpp" break; - case 231: /* type_specifier_nonarray: IVEC4 */ -#line 1835 "MachineIndependent/glslang.y" + case 234: /* type_specifier_nonarray: IVEC4 */ +#line 1834 "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 7589 "MachineIndependent/glslang_tab.cpp" +#line 7668 "MachineIndependent/glslang_tab.cpp" break; - case 232: /* type_specifier_nonarray: UVEC2 */ -#line 1840 "MachineIndependent/glslang.y" + case 235: /* type_specifier_nonarray: UVEC2 */ +#line 1839 "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 7600 "MachineIndependent/glslang_tab.cpp" +#line 7679 "MachineIndependent/glslang_tab.cpp" break; - case 233: /* type_specifier_nonarray: UVEC3 */ -#line 1846 "MachineIndependent/glslang.y" + case 236: /* type_specifier_nonarray: UVEC3 */ +#line 1845 "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 7611 "MachineIndependent/glslang_tab.cpp" +#line 7690 "MachineIndependent/glslang_tab.cpp" break; - case 234: /* type_specifier_nonarray: UVEC4 */ -#line 1852 "MachineIndependent/glslang.y" + case 237: /* type_specifier_nonarray: UVEC4 */ +#line 1851 "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 7622 "MachineIndependent/glslang_tab.cpp" +#line 7701 "MachineIndependent/glslang_tab.cpp" break; - case 235: /* type_specifier_nonarray: MAT2 */ -#line 1858 "MachineIndependent/glslang.y" + case 238: /* type_specifier_nonarray: MAT2 */ +#line 1857 "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 7632 "MachineIndependent/glslang_tab.cpp" +#line 7711 "MachineIndependent/glslang_tab.cpp" break; - case 236: /* type_specifier_nonarray: MAT3 */ -#line 1863 "MachineIndependent/glslang.y" + case 239: /* type_specifier_nonarray: MAT3 */ +#line 1862 "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 7642 "MachineIndependent/glslang_tab.cpp" +#line 7721 "MachineIndependent/glslang_tab.cpp" break; - case 237: /* type_specifier_nonarray: MAT4 */ -#line 1868 "MachineIndependent/glslang.y" + case 240: /* type_specifier_nonarray: MAT4 */ +#line 1867 "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 7652 "MachineIndependent/glslang_tab.cpp" +#line 7731 "MachineIndependent/glslang_tab.cpp" break; - case 238: /* type_specifier_nonarray: MAT2X2 */ -#line 1873 "MachineIndependent/glslang.y" + case 241: /* type_specifier_nonarray: MAT2X2 */ +#line 1872 "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 7662 "MachineIndependent/glslang_tab.cpp" +#line 7741 "MachineIndependent/glslang_tab.cpp" break; - case 239: /* type_specifier_nonarray: MAT2X3 */ -#line 1878 "MachineIndependent/glslang.y" + case 242: /* type_specifier_nonarray: MAT2X3 */ +#line 1877 "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 7672 "MachineIndependent/glslang_tab.cpp" +#line 7751 "MachineIndependent/glslang_tab.cpp" break; - case 240: /* type_specifier_nonarray: MAT2X4 */ -#line 1883 "MachineIndependent/glslang.y" + case 243: /* type_specifier_nonarray: MAT2X4 */ +#line 1882 "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 7682 "MachineIndependent/glslang_tab.cpp" +#line 7761 "MachineIndependent/glslang_tab.cpp" break; - case 241: /* type_specifier_nonarray: MAT3X2 */ -#line 1888 "MachineIndependent/glslang.y" + case 244: /* type_specifier_nonarray: MAT3X2 */ +#line 1887 "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 7692 "MachineIndependent/glslang_tab.cpp" +#line 7771 "MachineIndependent/glslang_tab.cpp" break; - case 242: /* type_specifier_nonarray: MAT3X3 */ -#line 1893 "MachineIndependent/glslang.y" + case 245: /* type_specifier_nonarray: MAT3X3 */ +#line 1892 "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 7702 "MachineIndependent/glslang_tab.cpp" +#line 7781 "MachineIndependent/glslang_tab.cpp" break; - case 243: /* type_specifier_nonarray: MAT3X4 */ -#line 1898 "MachineIndependent/glslang.y" + case 246: /* type_specifier_nonarray: MAT3X4 */ +#line 1897 "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 7712 "MachineIndependent/glslang_tab.cpp" +#line 7791 "MachineIndependent/glslang_tab.cpp" break; - case 244: /* type_specifier_nonarray: MAT4X2 */ -#line 1903 "MachineIndependent/glslang.y" + case 247: /* type_specifier_nonarray: MAT4X2 */ +#line 1902 "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 7722 "MachineIndependent/glslang_tab.cpp" +#line 7801 "MachineIndependent/glslang_tab.cpp" break; - case 245: /* type_specifier_nonarray: MAT4X3 */ -#line 1908 "MachineIndependent/glslang.y" + case 248: /* type_specifier_nonarray: MAT4X3 */ +#line 1907 "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 7732 "MachineIndependent/glslang_tab.cpp" +#line 7811 "MachineIndependent/glslang_tab.cpp" break; - case 246: /* type_specifier_nonarray: MAT4X4 */ -#line 1913 "MachineIndependent/glslang.y" + case 249: /* type_specifier_nonarray: MAT4X4 */ +#line 1912 "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 7742 "MachineIndependent/glslang_tab.cpp" +#line 7821 "MachineIndependent/glslang_tab.cpp" break; - case 247: /* type_specifier_nonarray: DOUBLE */ -#line 1919 "MachineIndependent/glslang.y" + case 250: /* type_specifier_nonarray: DOUBLE */ +#line 1917 "MachineIndependent/glslang.y" { parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double"); if (! parseContext.symbolTable.atBuiltInLevel()) @@ -7750,121 +7829,121 @@ yyreduce: (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtDouble; } -#line 7754 "MachineIndependent/glslang_tab.cpp" +#line 7833 "MachineIndependent/glslang_tab.cpp" break; - case 248: /* type_specifier_nonarray: FLOAT16_T */ -#line 1926 "MachineIndependent/glslang.y" + case 251: /* type_specifier_nonarray: FLOAT16_T */ +#line 1924 "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 7764 "MachineIndependent/glslang_tab.cpp" +#line 7843 "MachineIndependent/glslang_tab.cpp" break; - case 249: /* type_specifier_nonarray: FLOAT32_T */ -#line 1931 "MachineIndependent/glslang.y" + case 252: /* type_specifier_nonarray: FLOAT32_T */ +#line 1929 "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 7774 "MachineIndependent/glslang_tab.cpp" +#line 7853 "MachineIndependent/glslang_tab.cpp" break; - case 250: /* type_specifier_nonarray: FLOAT64_T */ -#line 1936 "MachineIndependent/glslang.y" + case 253: /* type_specifier_nonarray: FLOAT64_T */ +#line 1934 "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 7784 "MachineIndependent/glslang_tab.cpp" +#line 7863 "MachineIndependent/glslang_tab.cpp" break; - case 251: /* type_specifier_nonarray: INT8_T */ -#line 1941 "MachineIndependent/glslang.y" + case 254: /* type_specifier_nonarray: INT8_T */ +#line 1939 "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 7794 "MachineIndependent/glslang_tab.cpp" +#line 7873 "MachineIndependent/glslang_tab.cpp" break; - case 252: /* type_specifier_nonarray: UINT8_T */ -#line 1946 "MachineIndependent/glslang.y" + case 255: /* type_specifier_nonarray: UINT8_T */ +#line 1944 "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 7804 "MachineIndependent/glslang_tab.cpp" +#line 7883 "MachineIndependent/glslang_tab.cpp" break; - case 253: /* type_specifier_nonarray: INT16_T */ -#line 1951 "MachineIndependent/glslang.y" + case 256: /* type_specifier_nonarray: INT16_T */ +#line 1949 "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 7814 "MachineIndependent/glslang_tab.cpp" +#line 7893 "MachineIndependent/glslang_tab.cpp" break; - case 254: /* type_specifier_nonarray: UINT16_T */ -#line 1956 "MachineIndependent/glslang.y" + case 257: /* type_specifier_nonarray: UINT16_T */ +#line 1954 "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 7824 "MachineIndependent/glslang_tab.cpp" +#line 7903 "MachineIndependent/glslang_tab.cpp" break; - case 255: /* type_specifier_nonarray: INT32_T */ -#line 1961 "MachineIndependent/glslang.y" + case 258: /* type_specifier_nonarray: INT32_T */ +#line 1959 "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 7834 "MachineIndependent/glslang_tab.cpp" +#line 7913 "MachineIndependent/glslang_tab.cpp" break; - case 256: /* type_specifier_nonarray: UINT32_T */ -#line 1966 "MachineIndependent/glslang.y" + case 259: /* type_specifier_nonarray: UINT32_T */ +#line 1964 "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 7844 "MachineIndependent/glslang_tab.cpp" +#line 7923 "MachineIndependent/glslang_tab.cpp" break; - case 257: /* type_specifier_nonarray: INT64_T */ -#line 1971 "MachineIndependent/glslang.y" + case 260: /* type_specifier_nonarray: INT64_T */ +#line 1969 "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 7854 "MachineIndependent/glslang_tab.cpp" +#line 7933 "MachineIndependent/glslang_tab.cpp" break; - case 258: /* type_specifier_nonarray: UINT64_T */ -#line 1976 "MachineIndependent/glslang.y" + case 261: /* type_specifier_nonarray: UINT64_T */ +#line 1974 "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 7864 "MachineIndependent/glslang_tab.cpp" +#line 7943 "MachineIndependent/glslang_tab.cpp" break; - case 259: /* type_specifier_nonarray: DVEC2 */ -#line 1981 "MachineIndependent/glslang.y" + case 262: /* type_specifier_nonarray: DVEC2 */ +#line 1979 "MachineIndependent/glslang.y" { parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double vector"); if (! parseContext.symbolTable.atBuiltInLevel()) @@ -7873,11 +7952,11 @@ yyreduce: (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setVector(2); } -#line 7877 "MachineIndependent/glslang_tab.cpp" +#line 7956 "MachineIndependent/glslang_tab.cpp" break; - case 260: /* type_specifier_nonarray: DVEC3 */ -#line 1989 "MachineIndependent/glslang.y" + case 263: /* type_specifier_nonarray: DVEC3 */ +#line 1987 "MachineIndependent/glslang.y" { parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double vector"); if (! parseContext.symbolTable.atBuiltInLevel()) @@ -7886,400 +7965,400 @@ yyreduce: (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setVector(3); } -#line 7890 "MachineIndependent/glslang_tab.cpp" - break; - - case 261: /* type_specifier_nonarray: DVEC4 */ -#line 1997 "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(4); - } -#line 7903 "MachineIndependent/glslang_tab.cpp" - break; - - case 262: /* type_specifier_nonarray: F16VEC2 */ -#line 2005 "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 7914 "MachineIndependent/glslang_tab.cpp" - break; - - case 263: /* type_specifier_nonarray: F16VEC3 */ -#line 2011 "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 7925 "MachineIndependent/glslang_tab.cpp" - break; - - case 264: /* type_specifier_nonarray: F16VEC4 */ -#line 2017 "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 7936 "MachineIndependent/glslang_tab.cpp" - break; - - case 265: /* type_specifier_nonarray: F32VEC2 */ -#line 2023 "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 7947 "MachineIndependent/glslang_tab.cpp" - break; - - case 266: /* type_specifier_nonarray: F32VEC3 */ -#line 2029 "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 7958 "MachineIndependent/glslang_tab.cpp" - break; - - case 267: /* type_specifier_nonarray: F32VEC4 */ -#line 2035 "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 7969 "MachineIndependent/glslang_tab.cpp" break; - case 268: /* type_specifier_nonarray: F64VEC2 */ -#line 2041 "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 7980 "MachineIndependent/glslang_tab.cpp" - break; - - case 269: /* type_specifier_nonarray: F64VEC3 */ -#line 2047 "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 7991 "MachineIndependent/glslang_tab.cpp" - break; - - case 270: /* type_specifier_nonarray: F64VEC4 */ -#line 2053 "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 8002 "MachineIndependent/glslang_tab.cpp" - break; - - case 271: /* type_specifier_nonarray: I8VEC2 */ -#line 2059 "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 8013 "MachineIndependent/glslang_tab.cpp" - break; - - case 272: /* type_specifier_nonarray: I8VEC3 */ -#line 2065 "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 8024 "MachineIndependent/glslang_tab.cpp" - break; - - case 273: /* type_specifier_nonarray: I8VEC4 */ -#line 2071 "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 8035 "MachineIndependent/glslang_tab.cpp" - break; - - case 274: /* type_specifier_nonarray: I16VEC2 */ -#line 2077 "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 8046 "MachineIndependent/glslang_tab.cpp" - break; - - case 275: /* type_specifier_nonarray: I16VEC3 */ -#line 2083 "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 8057 "MachineIndependent/glslang_tab.cpp" - break; - - case 276: /* type_specifier_nonarray: I16VEC4 */ -#line 2089 "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 8068 "MachineIndependent/glslang_tab.cpp" - break; - - case 277: /* type_specifier_nonarray: I32VEC2 */ -#line 2095 "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 8079 "MachineIndependent/glslang_tab.cpp" - break; - - case 278: /* type_specifier_nonarray: I32VEC3 */ -#line 2101 "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 8090 "MachineIndependent/glslang_tab.cpp" - break; - - case 279: /* type_specifier_nonarray: I32VEC4 */ -#line 2107 "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 8101 "MachineIndependent/glslang_tab.cpp" - break; - - case 280: /* type_specifier_nonarray: I64VEC2 */ -#line 2113 "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 8112 "MachineIndependent/glslang_tab.cpp" - break; - - case 281: /* type_specifier_nonarray: I64VEC3 */ -#line 2119 "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 8123 "MachineIndependent/glslang_tab.cpp" - break; - - case 282: /* type_specifier_nonarray: I64VEC4 */ -#line 2125 "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 8134 "MachineIndependent/glslang_tab.cpp" - break; - - case 283: /* type_specifier_nonarray: U8VEC2 */ -#line 2131 "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 8145 "MachineIndependent/glslang_tab.cpp" - break; - - case 284: /* type_specifier_nonarray: U8VEC3 */ -#line 2137 "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 8156 "MachineIndependent/glslang_tab.cpp" - break; - - case 285: /* type_specifier_nonarray: U8VEC4 */ -#line 2143 "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 8167 "MachineIndependent/glslang_tab.cpp" - break; - - case 286: /* type_specifier_nonarray: U16VEC2 */ -#line 2149 "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 8178 "MachineIndependent/glslang_tab.cpp" - break; - - case 287: /* type_specifier_nonarray: U16VEC3 */ -#line 2155 "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 8189 "MachineIndependent/glslang_tab.cpp" - break; - - case 288: /* type_specifier_nonarray: U16VEC4 */ -#line 2161 "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 8200 "MachineIndependent/glslang_tab.cpp" - break; - - case 289: /* type_specifier_nonarray: U32VEC2 */ -#line 2167 "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 8211 "MachineIndependent/glslang_tab.cpp" - break; - - case 290: /* type_specifier_nonarray: U32VEC3 */ -#line 2173 "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 8222 "MachineIndependent/glslang_tab.cpp" - break; - - case 291: /* type_specifier_nonarray: U32VEC4 */ -#line 2179 "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 8233 "MachineIndependent/glslang_tab.cpp" - break; - - case 292: /* type_specifier_nonarray: U64VEC2 */ -#line 2185 "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 8244 "MachineIndependent/glslang_tab.cpp" - break; - - case 293: /* type_specifier_nonarray: U64VEC3 */ -#line 2191 "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 8255 "MachineIndependent/glslang_tab.cpp" - break; - - case 294: /* type_specifier_nonarray: U64VEC4 */ -#line 2197 "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 8266 "MachineIndependent/glslang_tab.cpp" - break; - - case 295: /* type_specifier_nonarray: DMAT2 */ -#line 2203 "MachineIndependent/glslang.y" + case 264: /* type_specifier_nonarray: DVEC4 */ +#line 1995 "MachineIndependent/glslang.y" { - parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double matrix"); + parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double vector"); if (! parseContext.symbolTable.atBuiltInLevel()) - parseContext.doubleCheck((yyvsp[0].lex).loc, "double matrix"); + 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).setMatrix(2, 2); + (yyval.interm.type).setVector(4); + } +#line 7982 "MachineIndependent/glslang_tab.cpp" + break; + + case 265: /* type_specifier_nonarray: F16VEC2 */ +#line 2003 "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 7993 "MachineIndependent/glslang_tab.cpp" + break; + + case 266: /* type_specifier_nonarray: F16VEC3 */ +#line 2009 "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 8004 "MachineIndependent/glslang_tab.cpp" + break; + + case 267: /* type_specifier_nonarray: F16VEC4 */ +#line 2015 "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 8015 "MachineIndependent/glslang_tab.cpp" + break; + + case 268: /* type_specifier_nonarray: F32VEC2 */ +#line 2021 "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 8026 "MachineIndependent/glslang_tab.cpp" + break; + + case 269: /* type_specifier_nonarray: F32VEC3 */ +#line 2027 "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 8037 "MachineIndependent/glslang_tab.cpp" + break; + + case 270: /* type_specifier_nonarray: F32VEC4 */ +#line 2033 "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 8048 "MachineIndependent/glslang_tab.cpp" + break; + + case 271: /* type_specifier_nonarray: F64VEC2 */ +#line 2039 "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 8059 "MachineIndependent/glslang_tab.cpp" + break; + + case 272: /* type_specifier_nonarray: F64VEC3 */ +#line 2045 "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 8070 "MachineIndependent/glslang_tab.cpp" + break; + + case 273: /* type_specifier_nonarray: F64VEC4 */ +#line 2051 "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 8081 "MachineIndependent/glslang_tab.cpp" + break; + + case 274: /* type_specifier_nonarray: I8VEC2 */ +#line 2057 "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 8092 "MachineIndependent/glslang_tab.cpp" + break; + + case 275: /* type_specifier_nonarray: I8VEC3 */ +#line 2063 "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 8103 "MachineIndependent/glslang_tab.cpp" + break; + + case 276: /* type_specifier_nonarray: I8VEC4 */ +#line 2069 "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 8114 "MachineIndependent/glslang_tab.cpp" + break; + + case 277: /* type_specifier_nonarray: I16VEC2 */ +#line 2075 "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 8125 "MachineIndependent/glslang_tab.cpp" + break; + + case 278: /* type_specifier_nonarray: I16VEC3 */ +#line 2081 "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 8136 "MachineIndependent/glslang_tab.cpp" + break; + + case 279: /* type_specifier_nonarray: I16VEC4 */ +#line 2087 "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 8147 "MachineIndependent/glslang_tab.cpp" + break; + + case 280: /* type_specifier_nonarray: I32VEC2 */ +#line 2093 "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 8158 "MachineIndependent/glslang_tab.cpp" + break; + + case 281: /* type_specifier_nonarray: I32VEC3 */ +#line 2099 "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 8169 "MachineIndependent/glslang_tab.cpp" + break; + + case 282: /* type_specifier_nonarray: I32VEC4 */ +#line 2105 "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 8180 "MachineIndependent/glslang_tab.cpp" + break; + + case 283: /* type_specifier_nonarray: I64VEC2 */ +#line 2111 "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 8191 "MachineIndependent/glslang_tab.cpp" + break; + + case 284: /* type_specifier_nonarray: I64VEC3 */ +#line 2117 "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 8202 "MachineIndependent/glslang_tab.cpp" + break; + + case 285: /* type_specifier_nonarray: I64VEC4 */ +#line 2123 "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 8213 "MachineIndependent/glslang_tab.cpp" + break; + + case 286: /* type_specifier_nonarray: U8VEC2 */ +#line 2129 "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 8224 "MachineIndependent/glslang_tab.cpp" + break; + + case 287: /* type_specifier_nonarray: U8VEC3 */ +#line 2135 "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 8235 "MachineIndependent/glslang_tab.cpp" + break; + + case 288: /* type_specifier_nonarray: U8VEC4 */ +#line 2141 "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 8246 "MachineIndependent/glslang_tab.cpp" + break; + + case 289: /* type_specifier_nonarray: U16VEC2 */ +#line 2147 "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 8257 "MachineIndependent/glslang_tab.cpp" + break; + + case 290: /* type_specifier_nonarray: U16VEC3 */ +#line 2153 "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 8268 "MachineIndependent/glslang_tab.cpp" + break; + + case 291: /* type_specifier_nonarray: U16VEC4 */ +#line 2159 "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 8279 "MachineIndependent/glslang_tab.cpp" break; - case 296: /* type_specifier_nonarray: DMAT3 */ -#line 2211 "MachineIndependent/glslang.y" + case 292: /* type_specifier_nonarray: U32VEC2 */ +#line 2165 "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 8290 "MachineIndependent/glslang_tab.cpp" + break; + + case 293: /* type_specifier_nonarray: U32VEC3 */ +#line 2171 "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 8301 "MachineIndependent/glslang_tab.cpp" + break; + + case 294: /* type_specifier_nonarray: U32VEC4 */ +#line 2177 "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 8312 "MachineIndependent/glslang_tab.cpp" + break; + + case 295: /* type_specifier_nonarray: U64VEC2 */ +#line 2183 "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 8323 "MachineIndependent/glslang_tab.cpp" + break; + + case 296: /* type_specifier_nonarray: U64VEC3 */ +#line 2189 "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 8334 "MachineIndependent/glslang_tab.cpp" + break; + + case 297: /* type_specifier_nonarray: U64VEC4 */ +#line 2195 "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 8345 "MachineIndependent/glslang_tab.cpp" + break; + + case 298: /* type_specifier_nonarray: DMAT2 */ +#line 2201 "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(2, 2); + } +#line 8358 "MachineIndependent/glslang_tab.cpp" + break; + + case 299: /* type_specifier_nonarray: DMAT3 */ +#line 2209 "MachineIndependent/glslang.y" { parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double matrix"); if (! parseContext.symbolTable.atBuiltInLevel()) @@ -8288,11 +8367,11 @@ yyreduce: (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setMatrix(3, 3); } -#line 8292 "MachineIndependent/glslang_tab.cpp" +#line 8371 "MachineIndependent/glslang_tab.cpp" break; - case 297: /* type_specifier_nonarray: DMAT4 */ -#line 2219 "MachineIndependent/glslang.y" + case 300: /* type_specifier_nonarray: DMAT4 */ +#line 2217 "MachineIndependent/glslang.y" { parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double matrix"); if (! parseContext.symbolTable.atBuiltInLevel()) @@ -8301,11 +8380,11 @@ yyreduce: (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setMatrix(4, 4); } -#line 8305 "MachineIndependent/glslang_tab.cpp" +#line 8384 "MachineIndependent/glslang_tab.cpp" break; - case 298: /* type_specifier_nonarray: DMAT2X2 */ -#line 2227 "MachineIndependent/glslang.y" + case 301: /* type_specifier_nonarray: DMAT2X2 */ +#line 2225 "MachineIndependent/glslang.y" { parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double matrix"); if (! parseContext.symbolTable.atBuiltInLevel()) @@ -8314,11 +8393,11 @@ yyreduce: (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setMatrix(2, 2); } -#line 8318 "MachineIndependent/glslang_tab.cpp" +#line 8397 "MachineIndependent/glslang_tab.cpp" break; - case 299: /* type_specifier_nonarray: DMAT2X3 */ -#line 2235 "MachineIndependent/glslang.y" + case 302: /* type_specifier_nonarray: DMAT2X3 */ +#line 2233 "MachineIndependent/glslang.y" { parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double matrix"); if (! parseContext.symbolTable.atBuiltInLevel()) @@ -8327,11 +8406,11 @@ yyreduce: (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setMatrix(2, 3); } -#line 8331 "MachineIndependent/glslang_tab.cpp" +#line 8410 "MachineIndependent/glslang_tab.cpp" break; - case 300: /* type_specifier_nonarray: DMAT2X4 */ -#line 2243 "MachineIndependent/glslang.y" + case 303: /* type_specifier_nonarray: DMAT2X4 */ +#line 2241 "MachineIndependent/glslang.y" { parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double matrix"); if (! parseContext.symbolTable.atBuiltInLevel()) @@ -8340,11 +8419,11 @@ yyreduce: (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setMatrix(2, 4); } -#line 8344 "MachineIndependent/glslang_tab.cpp" +#line 8423 "MachineIndependent/glslang_tab.cpp" break; - case 301: /* type_specifier_nonarray: DMAT3X2 */ -#line 2251 "MachineIndependent/glslang.y" + case 304: /* type_specifier_nonarray: DMAT3X2 */ +#line 2249 "MachineIndependent/glslang.y" { parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double matrix"); if (! parseContext.symbolTable.atBuiltInLevel()) @@ -8353,11 +8432,11 @@ yyreduce: (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setMatrix(3, 2); } -#line 8357 "MachineIndependent/glslang_tab.cpp" +#line 8436 "MachineIndependent/glslang_tab.cpp" break; - case 302: /* type_specifier_nonarray: DMAT3X3 */ -#line 2259 "MachineIndependent/glslang.y" + case 305: /* type_specifier_nonarray: DMAT3X3 */ +#line 2257 "MachineIndependent/glslang.y" { parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double matrix"); if (! parseContext.symbolTable.atBuiltInLevel()) @@ -8366,11 +8445,11 @@ yyreduce: (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setMatrix(3, 3); } -#line 8370 "MachineIndependent/glslang_tab.cpp" +#line 8449 "MachineIndependent/glslang_tab.cpp" break; - case 303: /* type_specifier_nonarray: DMAT3X4 */ -#line 2267 "MachineIndependent/glslang.y" + case 306: /* type_specifier_nonarray: DMAT3X4 */ +#line 2265 "MachineIndependent/glslang.y" { parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double matrix"); if (! parseContext.symbolTable.atBuiltInLevel()) @@ -8379,11 +8458,11 @@ yyreduce: (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setMatrix(3, 4); } -#line 8383 "MachineIndependent/glslang_tab.cpp" +#line 8462 "MachineIndependent/glslang_tab.cpp" break; - case 304: /* type_specifier_nonarray: DMAT4X2 */ -#line 2275 "MachineIndependent/glslang.y" + case 307: /* type_specifier_nonarray: DMAT4X2 */ +#line 2273 "MachineIndependent/glslang.y" { parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double matrix"); if (! parseContext.symbolTable.atBuiltInLevel()) @@ -8392,11 +8471,11 @@ yyreduce: (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setMatrix(4, 2); } -#line 8396 "MachineIndependent/glslang_tab.cpp" +#line 8475 "MachineIndependent/glslang_tab.cpp" break; - case 305: /* type_specifier_nonarray: DMAT4X3 */ -#line 2283 "MachineIndependent/glslang.y" + case 308: /* type_specifier_nonarray: DMAT4X3 */ +#line 2281 "MachineIndependent/glslang.y" { parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double matrix"); if (! parseContext.symbolTable.atBuiltInLevel()) @@ -8405,2241 +8484,2274 @@ yyreduce: (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setMatrix(4, 3); } -#line 8409 "MachineIndependent/glslang_tab.cpp" - break; - - case 306: /* type_specifier_nonarray: DMAT4X4 */ -#line 2291 "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 8422 "MachineIndependent/glslang_tab.cpp" - break; - - case 307: /* type_specifier_nonarray: F16MAT2 */ -#line 2299 "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 8433 "MachineIndependent/glslang_tab.cpp" - break; - - case 308: /* type_specifier_nonarray: F16MAT3 */ -#line 2305 "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 8444 "MachineIndependent/glslang_tab.cpp" - break; - - case 309: /* type_specifier_nonarray: F16MAT4 */ -#line 2311 "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 8455 "MachineIndependent/glslang_tab.cpp" - break; - - case 310: /* type_specifier_nonarray: F16MAT2X2 */ -#line 2317 "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 8466 "MachineIndependent/glslang_tab.cpp" - break; - - case 311: /* type_specifier_nonarray: F16MAT2X3 */ -#line 2323 "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 8477 "MachineIndependent/glslang_tab.cpp" - break; - - case 312: /* type_specifier_nonarray: F16MAT2X4 */ -#line 2329 "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 8488 "MachineIndependent/glslang_tab.cpp" break; - case 313: /* type_specifier_nonarray: F16MAT3X2 */ -#line 2335 "MachineIndependent/glslang.y" + case 309: /* type_specifier_nonarray: DMAT4X4 */ +#line 2289 "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 8501 "MachineIndependent/glslang_tab.cpp" + break; + + case 310: /* type_specifier_nonarray: F16MAT2 */ +#line 2297 "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 8512 "MachineIndependent/glslang_tab.cpp" + break; + + case 311: /* type_specifier_nonarray: F16MAT3 */ +#line 2303 "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 8523 "MachineIndependent/glslang_tab.cpp" + break; + + case 312: /* type_specifier_nonarray: F16MAT4 */ +#line 2309 "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 8534 "MachineIndependent/glslang_tab.cpp" + break; + + case 313: /* type_specifier_nonarray: F16MAT2X2 */ +#line 2315 "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 8545 "MachineIndependent/glslang_tab.cpp" + break; + + case 314: /* type_specifier_nonarray: F16MAT2X3 */ +#line 2321 "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 8556 "MachineIndependent/glslang_tab.cpp" + break; + + case 315: /* type_specifier_nonarray: F16MAT2X4 */ +#line 2327 "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 8567 "MachineIndependent/glslang_tab.cpp" + break; + + case 316: /* type_specifier_nonarray: F16MAT3X2 */ +#line 2333 "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 8499 "MachineIndependent/glslang_tab.cpp" +#line 8578 "MachineIndependent/glslang_tab.cpp" break; - case 314: /* type_specifier_nonarray: F16MAT3X3 */ -#line 2341 "MachineIndependent/glslang.y" + case 317: /* type_specifier_nonarray: F16MAT3X3 */ +#line 2339 "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 8510 "MachineIndependent/glslang_tab.cpp" +#line 8589 "MachineIndependent/glslang_tab.cpp" break; - case 315: /* type_specifier_nonarray: F16MAT3X4 */ -#line 2347 "MachineIndependent/glslang.y" + case 318: /* type_specifier_nonarray: F16MAT3X4 */ +#line 2345 "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 8521 "MachineIndependent/glslang_tab.cpp" +#line 8600 "MachineIndependent/glslang_tab.cpp" break; - case 316: /* type_specifier_nonarray: F16MAT4X2 */ -#line 2353 "MachineIndependent/glslang.y" + case 319: /* type_specifier_nonarray: F16MAT4X2 */ +#line 2351 "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 8532 "MachineIndependent/glslang_tab.cpp" +#line 8611 "MachineIndependent/glslang_tab.cpp" break; - case 317: /* type_specifier_nonarray: F16MAT4X3 */ -#line 2359 "MachineIndependent/glslang.y" + case 320: /* type_specifier_nonarray: F16MAT4X3 */ +#line 2357 "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 8543 "MachineIndependent/glslang_tab.cpp" +#line 8622 "MachineIndependent/glslang_tab.cpp" break; - case 318: /* type_specifier_nonarray: F16MAT4X4 */ -#line 2365 "MachineIndependent/glslang.y" + case 321: /* type_specifier_nonarray: F16MAT4X4 */ +#line 2363 "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 8554 "MachineIndependent/glslang_tab.cpp" +#line 8633 "MachineIndependent/glslang_tab.cpp" break; - case 319: /* type_specifier_nonarray: F32MAT2 */ -#line 2371 "MachineIndependent/glslang.y" + case 322: /* type_specifier_nonarray: F32MAT2 */ +#line 2369 "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 8565 "MachineIndependent/glslang_tab.cpp" +#line 8644 "MachineIndependent/glslang_tab.cpp" break; - case 320: /* type_specifier_nonarray: F32MAT3 */ -#line 2377 "MachineIndependent/glslang.y" + case 323: /* type_specifier_nonarray: F32MAT3 */ +#line 2375 "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 8576 "MachineIndependent/glslang_tab.cpp" +#line 8655 "MachineIndependent/glslang_tab.cpp" break; - case 321: /* type_specifier_nonarray: F32MAT4 */ -#line 2383 "MachineIndependent/glslang.y" + case 324: /* type_specifier_nonarray: F32MAT4 */ +#line 2381 "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 8587 "MachineIndependent/glslang_tab.cpp" +#line 8666 "MachineIndependent/glslang_tab.cpp" break; - case 322: /* type_specifier_nonarray: F32MAT2X2 */ -#line 2389 "MachineIndependent/glslang.y" + case 325: /* type_specifier_nonarray: F32MAT2X2 */ +#line 2387 "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 8598 "MachineIndependent/glslang_tab.cpp" +#line 8677 "MachineIndependent/glslang_tab.cpp" break; - case 323: /* type_specifier_nonarray: F32MAT2X3 */ -#line 2395 "MachineIndependent/glslang.y" + case 326: /* type_specifier_nonarray: F32MAT2X3 */ +#line 2393 "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 8609 "MachineIndependent/glslang_tab.cpp" +#line 8688 "MachineIndependent/glslang_tab.cpp" break; - case 324: /* type_specifier_nonarray: F32MAT2X4 */ -#line 2401 "MachineIndependent/glslang.y" + case 327: /* type_specifier_nonarray: F32MAT2X4 */ +#line 2399 "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 8620 "MachineIndependent/glslang_tab.cpp" +#line 8699 "MachineIndependent/glslang_tab.cpp" break; - case 325: /* type_specifier_nonarray: F32MAT3X2 */ -#line 2407 "MachineIndependent/glslang.y" + case 328: /* type_specifier_nonarray: F32MAT3X2 */ +#line 2405 "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 8631 "MachineIndependent/glslang_tab.cpp" +#line 8710 "MachineIndependent/glslang_tab.cpp" break; - case 326: /* type_specifier_nonarray: F32MAT3X3 */ -#line 2413 "MachineIndependent/glslang.y" + case 329: /* type_specifier_nonarray: F32MAT3X3 */ +#line 2411 "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 8642 "MachineIndependent/glslang_tab.cpp" +#line 8721 "MachineIndependent/glslang_tab.cpp" break; - case 327: /* type_specifier_nonarray: F32MAT3X4 */ -#line 2419 "MachineIndependent/glslang.y" + case 330: /* type_specifier_nonarray: F32MAT3X4 */ +#line 2417 "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 8653 "MachineIndependent/glslang_tab.cpp" +#line 8732 "MachineIndependent/glslang_tab.cpp" break; - case 328: /* type_specifier_nonarray: F32MAT4X2 */ -#line 2425 "MachineIndependent/glslang.y" + case 331: /* type_specifier_nonarray: F32MAT4X2 */ +#line 2423 "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 8664 "MachineIndependent/glslang_tab.cpp" +#line 8743 "MachineIndependent/glslang_tab.cpp" break; - case 329: /* type_specifier_nonarray: F32MAT4X3 */ -#line 2431 "MachineIndependent/glslang.y" + case 332: /* type_specifier_nonarray: F32MAT4X3 */ +#line 2429 "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 8675 "MachineIndependent/glslang_tab.cpp" +#line 8754 "MachineIndependent/glslang_tab.cpp" break; - case 330: /* type_specifier_nonarray: F32MAT4X4 */ -#line 2437 "MachineIndependent/glslang.y" + case 333: /* type_specifier_nonarray: F32MAT4X4 */ +#line 2435 "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 8686 "MachineIndependent/glslang_tab.cpp" +#line 8765 "MachineIndependent/glslang_tab.cpp" break; - case 331: /* type_specifier_nonarray: F64MAT2 */ -#line 2443 "MachineIndependent/glslang.y" + case 334: /* type_specifier_nonarray: F64MAT2 */ +#line 2441 "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 8697 "MachineIndependent/glslang_tab.cpp" +#line 8776 "MachineIndependent/glslang_tab.cpp" break; - case 332: /* type_specifier_nonarray: F64MAT3 */ -#line 2449 "MachineIndependent/glslang.y" + case 335: /* type_specifier_nonarray: F64MAT3 */ +#line 2447 "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 8708 "MachineIndependent/glslang_tab.cpp" +#line 8787 "MachineIndependent/glslang_tab.cpp" break; - case 333: /* type_specifier_nonarray: F64MAT4 */ -#line 2455 "MachineIndependent/glslang.y" + case 336: /* type_specifier_nonarray: F64MAT4 */ +#line 2453 "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 8719 "MachineIndependent/glslang_tab.cpp" +#line 8798 "MachineIndependent/glslang_tab.cpp" break; - case 334: /* type_specifier_nonarray: F64MAT2X2 */ -#line 2461 "MachineIndependent/glslang.y" + case 337: /* type_specifier_nonarray: F64MAT2X2 */ +#line 2459 "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 8730 "MachineIndependent/glslang_tab.cpp" +#line 8809 "MachineIndependent/glslang_tab.cpp" break; - case 335: /* type_specifier_nonarray: F64MAT2X3 */ -#line 2467 "MachineIndependent/glslang.y" + case 338: /* type_specifier_nonarray: F64MAT2X3 */ +#line 2465 "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 8741 "MachineIndependent/glslang_tab.cpp" +#line 8820 "MachineIndependent/glslang_tab.cpp" break; - case 336: /* type_specifier_nonarray: F64MAT2X4 */ -#line 2473 "MachineIndependent/glslang.y" + case 339: /* type_specifier_nonarray: F64MAT2X4 */ +#line 2471 "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 8752 "MachineIndependent/glslang_tab.cpp" +#line 8831 "MachineIndependent/glslang_tab.cpp" break; - case 337: /* type_specifier_nonarray: F64MAT3X2 */ -#line 2479 "MachineIndependent/glslang.y" + case 340: /* type_specifier_nonarray: F64MAT3X2 */ +#line 2477 "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 8763 "MachineIndependent/glslang_tab.cpp" +#line 8842 "MachineIndependent/glslang_tab.cpp" break; - case 338: /* type_specifier_nonarray: F64MAT3X3 */ -#line 2485 "MachineIndependent/glslang.y" + case 341: /* type_specifier_nonarray: F64MAT3X3 */ +#line 2483 "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 8774 "MachineIndependent/glslang_tab.cpp" +#line 8853 "MachineIndependent/glslang_tab.cpp" break; - case 339: /* type_specifier_nonarray: F64MAT3X4 */ -#line 2491 "MachineIndependent/glslang.y" + case 342: /* type_specifier_nonarray: F64MAT3X4 */ +#line 2489 "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 8785 "MachineIndependent/glslang_tab.cpp" +#line 8864 "MachineIndependent/glslang_tab.cpp" break; - case 340: /* type_specifier_nonarray: F64MAT4X2 */ -#line 2497 "MachineIndependent/glslang.y" + case 343: /* type_specifier_nonarray: F64MAT4X2 */ +#line 2495 "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 8796 "MachineIndependent/glslang_tab.cpp" +#line 8875 "MachineIndependent/glslang_tab.cpp" break; - case 341: /* type_specifier_nonarray: F64MAT4X3 */ -#line 2503 "MachineIndependent/glslang.y" + case 344: /* type_specifier_nonarray: F64MAT4X3 */ +#line 2501 "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 8807 "MachineIndependent/glslang_tab.cpp" +#line 8886 "MachineIndependent/glslang_tab.cpp" break; - case 342: /* type_specifier_nonarray: F64MAT4X4 */ -#line 2509 "MachineIndependent/glslang.y" + case 345: /* type_specifier_nonarray: F64MAT4X4 */ +#line 2507 "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 8818 "MachineIndependent/glslang_tab.cpp" +#line 8897 "MachineIndependent/glslang_tab.cpp" break; - case 343: /* type_specifier_nonarray: ACCSTRUCTNV */ -#line 2515 "MachineIndependent/glslang.y" + case 346: /* type_specifier_nonarray: ACCSTRUCTNV */ +#line 2513 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtAccStruct; } -#line 8827 "MachineIndependent/glslang_tab.cpp" +#line 8906 "MachineIndependent/glslang_tab.cpp" break; - case 344: /* type_specifier_nonarray: ACCSTRUCTEXT */ -#line 2519 "MachineIndependent/glslang.y" + case 347: /* type_specifier_nonarray: ACCSTRUCTEXT */ +#line 2517 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtAccStruct; } -#line 8836 "MachineIndependent/glslang_tab.cpp" +#line 8915 "MachineIndependent/glslang_tab.cpp" break; - case 345: /* type_specifier_nonarray: RAYQUERYEXT */ -#line 2523 "MachineIndependent/glslang.y" + case 348: /* type_specifier_nonarray: RAYQUERYEXT */ +#line 2521 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtRayQuery; } -#line 8845 "MachineIndependent/glslang_tab.cpp" +#line 8924 "MachineIndependent/glslang_tab.cpp" break; - case 346: /* type_specifier_nonarray: ATOMIC_UINT */ -#line 2527 "MachineIndependent/glslang.y" + case 349: /* type_specifier_nonarray: ATOMIC_UINT */ +#line 2525 "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 8855 "MachineIndependent/glslang_tab.cpp" +#line 8934 "MachineIndependent/glslang_tab.cpp" break; - case 347: /* type_specifier_nonarray: SAMPLER1D */ -#line 2532 "MachineIndependent/glslang.y" + case 350: /* type_specifier_nonarray: SAMPLER1D */ +#line 2530 "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 8865 "MachineIndependent/glslang_tab.cpp" +#line 8944 "MachineIndependent/glslang_tab.cpp" break; - case 348: /* type_specifier_nonarray: SAMPLER2D */ -#line 2538 "MachineIndependent/glslang.y" + case 351: /* type_specifier_nonarray: SAMPLER2D */ +#line 2535 "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 8875 "MachineIndependent/glslang_tab.cpp" +#line 8954 "MachineIndependent/glslang_tab.cpp" break; - case 349: /* type_specifier_nonarray: SAMPLER3D */ -#line 2543 "MachineIndependent/glslang.y" + case 352: /* type_specifier_nonarray: SAMPLER3D */ +#line 2540 "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 8885 "MachineIndependent/glslang_tab.cpp" +#line 8964 "MachineIndependent/glslang_tab.cpp" break; - case 350: /* type_specifier_nonarray: SAMPLERCUBE */ -#line 2548 "MachineIndependent/glslang.y" + case 353: /* type_specifier_nonarray: SAMPLERCUBE */ +#line 2545 "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 8895 "MachineIndependent/glslang_tab.cpp" +#line 8974 "MachineIndependent/glslang_tab.cpp" break; - case 351: /* type_specifier_nonarray: SAMPLER2DSHADOW */ -#line 2553 "MachineIndependent/glslang.y" + case 354: /* type_specifier_nonarray: SAMPLER2DSHADOW */ +#line 2550 "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 8905 "MachineIndependent/glslang_tab.cpp" +#line 8984 "MachineIndependent/glslang_tab.cpp" break; - case 352: /* type_specifier_nonarray: SAMPLERCUBESHADOW */ -#line 2558 "MachineIndependent/glslang.y" + case 355: /* type_specifier_nonarray: SAMPLERCUBESHADOW */ +#line 2555 "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 8915 "MachineIndependent/glslang_tab.cpp" +#line 8994 "MachineIndependent/glslang_tab.cpp" break; - case 353: /* type_specifier_nonarray: SAMPLER2DARRAY */ -#line 2563 "MachineIndependent/glslang.y" + case 356: /* type_specifier_nonarray: SAMPLER2DARRAY */ +#line 2560 "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 8925 "MachineIndependent/glslang_tab.cpp" +#line 9004 "MachineIndependent/glslang_tab.cpp" break; - case 354: /* type_specifier_nonarray: SAMPLER2DARRAYSHADOW */ -#line 2568 "MachineIndependent/glslang.y" + case 357: /* type_specifier_nonarray: SAMPLER2DARRAYSHADOW */ +#line 2565 "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 8935 "MachineIndependent/glslang_tab.cpp" +#line 9014 "MachineIndependent/glslang_tab.cpp" break; - case 355: /* type_specifier_nonarray: SAMPLER1DSHADOW */ -#line 2574 "MachineIndependent/glslang.y" + case 358: /* type_specifier_nonarray: SAMPLER1DSHADOW */ +#line 2570 "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 8945 "MachineIndependent/glslang_tab.cpp" +#line 9024 "MachineIndependent/glslang_tab.cpp" break; - case 356: /* type_specifier_nonarray: SAMPLER1DARRAY */ -#line 2579 "MachineIndependent/glslang.y" + case 359: /* type_specifier_nonarray: SAMPLER1DARRAY */ +#line 2575 "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 8955 "MachineIndependent/glslang_tab.cpp" +#line 9034 "MachineIndependent/glslang_tab.cpp" break; - case 357: /* type_specifier_nonarray: SAMPLER1DARRAYSHADOW */ -#line 2584 "MachineIndependent/glslang.y" + case 360: /* type_specifier_nonarray: SAMPLER1DARRAYSHADOW */ +#line 2580 "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 8965 "MachineIndependent/glslang_tab.cpp" +#line 9044 "MachineIndependent/glslang_tab.cpp" break; - case 358: /* type_specifier_nonarray: SAMPLERCUBEARRAY */ -#line 2589 "MachineIndependent/glslang.y" + case 361: /* type_specifier_nonarray: SAMPLERCUBEARRAY */ +#line 2585 "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 8975 "MachineIndependent/glslang_tab.cpp" +#line 9054 "MachineIndependent/glslang_tab.cpp" break; - case 359: /* type_specifier_nonarray: SAMPLERCUBEARRAYSHADOW */ -#line 2594 "MachineIndependent/glslang.y" + case 362: /* type_specifier_nonarray: SAMPLERCUBEARRAYSHADOW */ +#line 2590 "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 8985 "MachineIndependent/glslang_tab.cpp" +#line 9064 "MachineIndependent/glslang_tab.cpp" break; - case 360: /* type_specifier_nonarray: F16SAMPLER1D */ -#line 2599 "MachineIndependent/glslang.y" + case 363: /* type_specifier_nonarray: F16SAMPLER1D */ +#line 2595 "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 8996 "MachineIndependent/glslang_tab.cpp" +#line 9075 "MachineIndependent/glslang_tab.cpp" break; - case 361: /* type_specifier_nonarray: F16SAMPLER2D */ -#line 2605 "MachineIndependent/glslang.y" + case 364: /* type_specifier_nonarray: F16SAMPLER2D */ +#line 2601 "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 9007 "MachineIndependent/glslang_tab.cpp" +#line 9086 "MachineIndependent/glslang_tab.cpp" break; - case 362: /* type_specifier_nonarray: F16SAMPLER3D */ -#line 2611 "MachineIndependent/glslang.y" + case 365: /* type_specifier_nonarray: F16SAMPLER3D */ +#line 2607 "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 9018 "MachineIndependent/glslang_tab.cpp" +#line 9097 "MachineIndependent/glslang_tab.cpp" break; - case 363: /* type_specifier_nonarray: F16SAMPLERCUBE */ -#line 2617 "MachineIndependent/glslang.y" + case 366: /* type_specifier_nonarray: F16SAMPLERCUBE */ +#line 2613 "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 9029 "MachineIndependent/glslang_tab.cpp" +#line 9108 "MachineIndependent/glslang_tab.cpp" break; - case 364: /* type_specifier_nonarray: F16SAMPLER1DSHADOW */ -#line 2623 "MachineIndependent/glslang.y" + case 367: /* type_specifier_nonarray: F16SAMPLER1DSHADOW */ +#line 2619 "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 9040 "MachineIndependent/glslang_tab.cpp" +#line 9119 "MachineIndependent/glslang_tab.cpp" break; - case 365: /* type_specifier_nonarray: F16SAMPLER2DSHADOW */ -#line 2629 "MachineIndependent/glslang.y" + case 368: /* type_specifier_nonarray: F16SAMPLER2DSHADOW */ +#line 2625 "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 9051 "MachineIndependent/glslang_tab.cpp" +#line 9130 "MachineIndependent/glslang_tab.cpp" break; - case 366: /* type_specifier_nonarray: F16SAMPLERCUBESHADOW */ -#line 2635 "MachineIndependent/glslang.y" + case 369: /* type_specifier_nonarray: F16SAMPLERCUBESHADOW */ +#line 2631 "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 9062 "MachineIndependent/glslang_tab.cpp" +#line 9141 "MachineIndependent/glslang_tab.cpp" break; - case 367: /* type_specifier_nonarray: F16SAMPLER1DARRAY */ -#line 2641 "MachineIndependent/glslang.y" + case 370: /* type_specifier_nonarray: F16SAMPLER1DARRAY */ +#line 2637 "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 9073 "MachineIndependent/glslang_tab.cpp" +#line 9152 "MachineIndependent/glslang_tab.cpp" break; - case 368: /* type_specifier_nonarray: F16SAMPLER2DARRAY */ -#line 2647 "MachineIndependent/glslang.y" + case 371: /* type_specifier_nonarray: F16SAMPLER2DARRAY */ +#line 2643 "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 9084 "MachineIndependent/glslang_tab.cpp" +#line 9163 "MachineIndependent/glslang_tab.cpp" break; - case 369: /* type_specifier_nonarray: F16SAMPLER1DARRAYSHADOW */ -#line 2653 "MachineIndependent/glslang.y" + case 372: /* type_specifier_nonarray: F16SAMPLER1DARRAYSHADOW */ +#line 2649 "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 9095 "MachineIndependent/glslang_tab.cpp" +#line 9174 "MachineIndependent/glslang_tab.cpp" break; - case 370: /* type_specifier_nonarray: F16SAMPLER2DARRAYSHADOW */ -#line 2659 "MachineIndependent/glslang.y" + case 373: /* type_specifier_nonarray: F16SAMPLER2DARRAYSHADOW */ +#line 2655 "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 9106 "MachineIndependent/glslang_tab.cpp" +#line 9185 "MachineIndependent/glslang_tab.cpp" break; - case 371: /* type_specifier_nonarray: F16SAMPLERCUBEARRAY */ -#line 2665 "MachineIndependent/glslang.y" + case 374: /* type_specifier_nonarray: F16SAMPLERCUBEARRAY */ +#line 2661 "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 9117 "MachineIndependent/glslang_tab.cpp" +#line 9196 "MachineIndependent/glslang_tab.cpp" break; - case 372: /* type_specifier_nonarray: F16SAMPLERCUBEARRAYSHADOW */ -#line 2671 "MachineIndependent/glslang.y" + case 375: /* type_specifier_nonarray: F16SAMPLERCUBEARRAYSHADOW */ +#line 2667 "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 9128 "MachineIndependent/glslang_tab.cpp" +#line 9207 "MachineIndependent/glslang_tab.cpp" break; - case 373: /* type_specifier_nonarray: ISAMPLER1D */ -#line 2677 "MachineIndependent/glslang.y" + case 376: /* type_specifier_nonarray: ISAMPLER1D */ +#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, Esd1D); } -#line 9138 "MachineIndependent/glslang_tab.cpp" +#line 9217 "MachineIndependent/glslang_tab.cpp" break; - case 374: /* type_specifier_nonarray: ISAMPLER2D */ -#line 2683 "MachineIndependent/glslang.y" + case 377: /* type_specifier_nonarray: ISAMPLER2D */ +#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(EbtInt, Esd2D); } -#line 9148 "MachineIndependent/glslang_tab.cpp" +#line 9227 "MachineIndependent/glslang_tab.cpp" break; - case 375: /* type_specifier_nonarray: ISAMPLER3D */ -#line 2688 "MachineIndependent/glslang.y" + case 378: /* type_specifier_nonarray: ISAMPLER3D */ +#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(EbtInt, Esd3D); } -#line 9158 "MachineIndependent/glslang_tab.cpp" +#line 9237 "MachineIndependent/glslang_tab.cpp" break; - case 376: /* type_specifier_nonarray: ISAMPLERCUBE */ -#line 2693 "MachineIndependent/glslang.y" + case 379: /* type_specifier_nonarray: ISAMPLERCUBE */ +#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(EbtInt, EsdCube); } -#line 9168 "MachineIndependent/glslang_tab.cpp" +#line 9247 "MachineIndependent/glslang_tab.cpp" break; - case 377: /* type_specifier_nonarray: ISAMPLER2DARRAY */ -#line 2698 "MachineIndependent/glslang.y" + case 380: /* type_specifier_nonarray: ISAMPLER2DARRAY */ +#line 2693 "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 9178 "MachineIndependent/glslang_tab.cpp" +#line 9257 "MachineIndependent/glslang_tab.cpp" break; - case 378: /* type_specifier_nonarray: USAMPLER2D */ -#line 2703 "MachineIndependent/glslang.y" + case 381: /* type_specifier_nonarray: USAMPLER2D */ +#line 2698 "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 9188 "MachineIndependent/glslang_tab.cpp" +#line 9267 "MachineIndependent/glslang_tab.cpp" break; - case 379: /* type_specifier_nonarray: USAMPLER3D */ -#line 2708 "MachineIndependent/glslang.y" + case 382: /* type_specifier_nonarray: USAMPLER3D */ +#line 2703 "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 9198 "MachineIndependent/glslang_tab.cpp" +#line 9277 "MachineIndependent/glslang_tab.cpp" break; - case 380: /* type_specifier_nonarray: USAMPLERCUBE */ -#line 2713 "MachineIndependent/glslang.y" + case 383: /* type_specifier_nonarray: USAMPLERCUBE */ +#line 2708 "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 9208 "MachineIndependent/glslang_tab.cpp" +#line 9287 "MachineIndependent/glslang_tab.cpp" break; - case 381: /* type_specifier_nonarray: ISAMPLER1DARRAY */ -#line 2719 "MachineIndependent/glslang.y" + case 384: /* type_specifier_nonarray: ISAMPLER1DARRAY */ +#line 2713 "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 9218 "MachineIndependent/glslang_tab.cpp" +#line 9297 "MachineIndependent/glslang_tab.cpp" break; - case 382: /* type_specifier_nonarray: ISAMPLERCUBEARRAY */ -#line 2724 "MachineIndependent/glslang.y" + case 385: /* type_specifier_nonarray: ISAMPLERCUBEARRAY */ +#line 2718 "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 9228 "MachineIndependent/glslang_tab.cpp" +#line 9307 "MachineIndependent/glslang_tab.cpp" break; - case 383: /* type_specifier_nonarray: USAMPLER1D */ -#line 2729 "MachineIndependent/glslang.y" + case 386: /* type_specifier_nonarray: USAMPLER1D */ +#line 2723 "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 9238 "MachineIndependent/glslang_tab.cpp" +#line 9317 "MachineIndependent/glslang_tab.cpp" break; - case 384: /* type_specifier_nonarray: USAMPLER1DARRAY */ -#line 2734 "MachineIndependent/glslang.y" + case 387: /* type_specifier_nonarray: USAMPLER1DARRAY */ +#line 2728 "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 9248 "MachineIndependent/glslang_tab.cpp" +#line 9327 "MachineIndependent/glslang_tab.cpp" break; - case 385: /* type_specifier_nonarray: USAMPLERCUBEARRAY */ -#line 2739 "MachineIndependent/glslang.y" + case 388: /* type_specifier_nonarray: USAMPLERCUBEARRAY */ +#line 2733 "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 9258 "MachineIndependent/glslang_tab.cpp" +#line 9337 "MachineIndependent/glslang_tab.cpp" break; - case 386: /* type_specifier_nonarray: TEXTURECUBEARRAY */ -#line 2744 "MachineIndependent/glslang.y" + case 389: /* type_specifier_nonarray: TEXTURECUBEARRAY */ +#line 2738 "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 9268 "MachineIndependent/glslang_tab.cpp" +#line 9347 "MachineIndependent/glslang_tab.cpp" break; - case 387: /* type_specifier_nonarray: ITEXTURECUBEARRAY */ -#line 2749 "MachineIndependent/glslang.y" + case 390: /* type_specifier_nonarray: ITEXTURECUBEARRAY */ +#line 2743 "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 9278 "MachineIndependent/glslang_tab.cpp" +#line 9357 "MachineIndependent/glslang_tab.cpp" break; - case 388: /* type_specifier_nonarray: UTEXTURECUBEARRAY */ -#line 2754 "MachineIndependent/glslang.y" + case 391: /* type_specifier_nonarray: UTEXTURECUBEARRAY */ +#line 2748 "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 9288 "MachineIndependent/glslang_tab.cpp" +#line 9367 "MachineIndependent/glslang_tab.cpp" break; - case 389: /* type_specifier_nonarray: USAMPLER2DARRAY */ -#line 2760 "MachineIndependent/glslang.y" + case 392: /* type_specifier_nonarray: USAMPLER2DARRAY */ +#line 2753 "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 9298 "MachineIndependent/glslang_tab.cpp" +#line 9377 "MachineIndependent/glslang_tab.cpp" break; - case 390: /* type_specifier_nonarray: TEXTURE2D */ -#line 2765 "MachineIndependent/glslang.y" + case 393: /* type_specifier_nonarray: TEXTURE2D */ +#line 2758 "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 9308 "MachineIndependent/glslang_tab.cpp" +#line 9387 "MachineIndependent/glslang_tab.cpp" break; - case 391: /* type_specifier_nonarray: TEXTURE3D */ -#line 2770 "MachineIndependent/glslang.y" + case 394: /* type_specifier_nonarray: TEXTURE3D */ +#line 2763 "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 9318 "MachineIndependent/glslang_tab.cpp" +#line 9397 "MachineIndependent/glslang_tab.cpp" break; - case 392: /* type_specifier_nonarray: TEXTURE2DARRAY */ -#line 2775 "MachineIndependent/glslang.y" + case 395: /* type_specifier_nonarray: TEXTURE2DARRAY */ +#line 2768 "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 9328 "MachineIndependent/glslang_tab.cpp" +#line 9407 "MachineIndependent/glslang_tab.cpp" break; - case 393: /* type_specifier_nonarray: TEXTURECUBE */ -#line 2780 "MachineIndependent/glslang.y" + case 396: /* type_specifier_nonarray: TEXTURECUBE */ +#line 2773 "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 9338 "MachineIndependent/glslang_tab.cpp" +#line 9417 "MachineIndependent/glslang_tab.cpp" break; - case 394: /* type_specifier_nonarray: ITEXTURE2D */ -#line 2785 "MachineIndependent/glslang.y" + case 397: /* type_specifier_nonarray: ITEXTURE2D */ +#line 2778 "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 9348 "MachineIndependent/glslang_tab.cpp" +#line 9427 "MachineIndependent/glslang_tab.cpp" break; - case 395: /* type_specifier_nonarray: ITEXTURE3D */ -#line 2790 "MachineIndependent/glslang.y" + case 398: /* type_specifier_nonarray: ITEXTURE3D */ +#line 2783 "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 9358 "MachineIndependent/glslang_tab.cpp" +#line 9437 "MachineIndependent/glslang_tab.cpp" break; - case 396: /* type_specifier_nonarray: ITEXTURECUBE */ -#line 2795 "MachineIndependent/glslang.y" + case 399: /* type_specifier_nonarray: ITEXTURECUBE */ +#line 2788 "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 9368 "MachineIndependent/glslang_tab.cpp" +#line 9447 "MachineIndependent/glslang_tab.cpp" break; - case 397: /* type_specifier_nonarray: ITEXTURE2DARRAY */ -#line 2800 "MachineIndependent/glslang.y" + case 400: /* type_specifier_nonarray: ITEXTURE2DARRAY */ +#line 2793 "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 9378 "MachineIndependent/glslang_tab.cpp" +#line 9457 "MachineIndependent/glslang_tab.cpp" break; - case 398: /* type_specifier_nonarray: UTEXTURE2D */ -#line 2805 "MachineIndependent/glslang.y" + case 401: /* type_specifier_nonarray: UTEXTURE2D */ +#line 2798 "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 9388 "MachineIndependent/glslang_tab.cpp" +#line 9467 "MachineIndependent/glslang_tab.cpp" break; - case 399: /* type_specifier_nonarray: UTEXTURE3D */ -#line 2810 "MachineIndependent/glslang.y" + case 402: /* type_specifier_nonarray: UTEXTURE3D */ +#line 2803 "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 9398 "MachineIndependent/glslang_tab.cpp" +#line 9477 "MachineIndependent/glslang_tab.cpp" break; - case 400: /* type_specifier_nonarray: UTEXTURECUBE */ -#line 2815 "MachineIndependent/glslang.y" + case 403: /* type_specifier_nonarray: UTEXTURECUBE */ +#line 2808 "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 9408 "MachineIndependent/glslang_tab.cpp" +#line 9487 "MachineIndependent/glslang_tab.cpp" break; - case 401: /* type_specifier_nonarray: UTEXTURE2DARRAY */ -#line 2820 "MachineIndependent/glslang.y" + case 404: /* type_specifier_nonarray: UTEXTURE2DARRAY */ +#line 2813 "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 9418 "MachineIndependent/glslang_tab.cpp" +#line 9497 "MachineIndependent/glslang_tab.cpp" break; - case 402: /* type_specifier_nonarray: SAMPLER */ -#line 2825 "MachineIndependent/glslang.y" + case 405: /* type_specifier_nonarray: SAMPLER */ +#line 2818 "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 9428 "MachineIndependent/glslang_tab.cpp" +#line 9507 "MachineIndependent/glslang_tab.cpp" break; - case 403: /* type_specifier_nonarray: SAMPLERSHADOW */ -#line 2830 "MachineIndependent/glslang.y" + case 406: /* type_specifier_nonarray: SAMPLERSHADOW */ +#line 2823 "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 9438 "MachineIndependent/glslang_tab.cpp" +#line 9517 "MachineIndependent/glslang_tab.cpp" break; - case 404: /* type_specifier_nonarray: SAMPLER2DRECT */ -#line 2836 "MachineIndependent/glslang.y" + case 407: /* type_specifier_nonarray: SAMPLER2DRECT */ +#line 2828 "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 9448 "MachineIndependent/glslang_tab.cpp" +#line 9527 "MachineIndependent/glslang_tab.cpp" break; - case 405: /* type_specifier_nonarray: SAMPLER2DRECTSHADOW */ -#line 2841 "MachineIndependent/glslang.y" + case 408: /* type_specifier_nonarray: SAMPLER2DRECTSHADOW */ +#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(EbtFloat, EsdRect, false, true); } -#line 9458 "MachineIndependent/glslang_tab.cpp" +#line 9537 "MachineIndependent/glslang_tab.cpp" break; - case 406: /* type_specifier_nonarray: F16SAMPLER2DRECT */ -#line 2846 "MachineIndependent/glslang.y" + case 409: /* type_specifier_nonarray: F16SAMPLER2DRECT */ +#line 2838 "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 9469 "MachineIndependent/glslang_tab.cpp" +#line 9548 "MachineIndependent/glslang_tab.cpp" break; - case 407: /* type_specifier_nonarray: F16SAMPLER2DRECTSHADOW */ -#line 2852 "MachineIndependent/glslang.y" + case 410: /* type_specifier_nonarray: F16SAMPLER2DRECTSHADOW */ +#line 2844 "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 9480 "MachineIndependent/glslang_tab.cpp" +#line 9559 "MachineIndependent/glslang_tab.cpp" break; - case 408: /* type_specifier_nonarray: ISAMPLER2DRECT */ -#line 2858 "MachineIndependent/glslang.y" + case 411: /* type_specifier_nonarray: ISAMPLER2DRECT */ +#line 2850 "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 9490 "MachineIndependent/glslang_tab.cpp" +#line 9569 "MachineIndependent/glslang_tab.cpp" break; - case 409: /* type_specifier_nonarray: USAMPLER2DRECT */ -#line 2863 "MachineIndependent/glslang.y" + case 412: /* type_specifier_nonarray: USAMPLER2DRECT */ +#line 2855 "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 9500 "MachineIndependent/glslang_tab.cpp" +#line 9579 "MachineIndependent/glslang_tab.cpp" break; - case 410: /* type_specifier_nonarray: SAMPLERBUFFER */ -#line 2868 "MachineIndependent/glslang.y" + case 413: /* type_specifier_nonarray: SAMPLERBUFFER */ +#line 2860 "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 9510 "MachineIndependent/glslang_tab.cpp" +#line 9589 "MachineIndependent/glslang_tab.cpp" break; - case 411: /* type_specifier_nonarray: F16SAMPLERBUFFER */ -#line 2873 "MachineIndependent/glslang.y" + case 414: /* type_specifier_nonarray: F16SAMPLERBUFFER */ +#line 2865 "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 9521 "MachineIndependent/glslang_tab.cpp" +#line 9600 "MachineIndependent/glslang_tab.cpp" break; - case 412: /* type_specifier_nonarray: ISAMPLERBUFFER */ -#line 2879 "MachineIndependent/glslang.y" + case 415: /* type_specifier_nonarray: ISAMPLERBUFFER */ +#line 2871 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtInt, EsdBuffer); } -#line 9531 "MachineIndependent/glslang_tab.cpp" +#line 9610 "MachineIndependent/glslang_tab.cpp" break; - case 413: /* type_specifier_nonarray: USAMPLERBUFFER */ -#line 2884 "MachineIndependent/glslang.y" + case 416: /* type_specifier_nonarray: USAMPLERBUFFER */ +#line 2876 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtUint, EsdBuffer); } -#line 9541 "MachineIndependent/glslang_tab.cpp" +#line 9620 "MachineIndependent/glslang_tab.cpp" break; - case 414: /* type_specifier_nonarray: SAMPLER2DMS */ -#line 2889 "MachineIndependent/glslang.y" + case 417: /* type_specifier_nonarray: SAMPLER2DMS */ +#line 2881 "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 9551 "MachineIndependent/glslang_tab.cpp" +#line 9630 "MachineIndependent/glslang_tab.cpp" break; - case 415: /* type_specifier_nonarray: F16SAMPLER2DMS */ -#line 2894 "MachineIndependent/glslang.y" + case 418: /* type_specifier_nonarray: F16SAMPLER2DMS */ +#line 2886 "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 9562 "MachineIndependent/glslang_tab.cpp" +#line 9641 "MachineIndependent/glslang_tab.cpp" break; - case 416: /* type_specifier_nonarray: ISAMPLER2DMS */ -#line 2900 "MachineIndependent/glslang.y" + case 419: /* type_specifier_nonarray: ISAMPLER2DMS */ +#line 2892 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtInt, Esd2D, false, false, true); } -#line 9572 "MachineIndependent/glslang_tab.cpp" +#line 9651 "MachineIndependent/glslang_tab.cpp" break; - case 417: /* type_specifier_nonarray: USAMPLER2DMS */ -#line 2905 "MachineIndependent/glslang.y" + case 420: /* type_specifier_nonarray: USAMPLER2DMS */ +#line 2897 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtUint, Esd2D, false, false, true); } -#line 9582 "MachineIndependent/glslang_tab.cpp" +#line 9661 "MachineIndependent/glslang_tab.cpp" break; - case 418: /* type_specifier_nonarray: SAMPLER2DMSARRAY */ -#line 2910 "MachineIndependent/glslang.y" + case 421: /* type_specifier_nonarray: SAMPLER2DMSARRAY */ +#line 2902 "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 9592 "MachineIndependent/glslang_tab.cpp" +#line 9671 "MachineIndependent/glslang_tab.cpp" break; - case 419: /* type_specifier_nonarray: F16SAMPLER2DMSARRAY */ -#line 2915 "MachineIndependent/glslang.y" + case 422: /* type_specifier_nonarray: F16SAMPLER2DMSARRAY */ +#line 2907 "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 9603 "MachineIndependent/glslang_tab.cpp" +#line 9682 "MachineIndependent/glslang_tab.cpp" break; - case 420: /* type_specifier_nonarray: ISAMPLER2DMSARRAY */ -#line 2921 "MachineIndependent/glslang.y" + case 423: /* type_specifier_nonarray: ISAMPLER2DMSARRAY */ +#line 2913 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtInt, Esd2D, true, false, true); } -#line 9613 "MachineIndependent/glslang_tab.cpp" +#line 9692 "MachineIndependent/glslang_tab.cpp" break; - case 421: /* type_specifier_nonarray: USAMPLER2DMSARRAY */ -#line 2926 "MachineIndependent/glslang.y" + case 424: /* type_specifier_nonarray: USAMPLER2DMSARRAY */ +#line 2918 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtUint, Esd2D, true, false, true); } -#line 9623 "MachineIndependent/glslang_tab.cpp" +#line 9702 "MachineIndependent/glslang_tab.cpp" break; - case 422: /* type_specifier_nonarray: TEXTURE1D */ -#line 2931 "MachineIndependent/glslang.y" + case 425: /* type_specifier_nonarray: TEXTURE1D */ +#line 2923 "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 9633 "MachineIndependent/glslang_tab.cpp" +#line 9712 "MachineIndependent/glslang_tab.cpp" break; - case 423: /* type_specifier_nonarray: F16TEXTURE1D */ -#line 2936 "MachineIndependent/glslang.y" + case 426: /* type_specifier_nonarray: F16TEXTURE1D */ +#line 2928 "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 9644 "MachineIndependent/glslang_tab.cpp" +#line 9723 "MachineIndependent/glslang_tab.cpp" break; - case 424: /* type_specifier_nonarray: F16TEXTURE2D */ -#line 2942 "MachineIndependent/glslang.y" + case 427: /* type_specifier_nonarray: F16TEXTURE2D */ +#line 2934 "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 9655 "MachineIndependent/glslang_tab.cpp" +#line 9734 "MachineIndependent/glslang_tab.cpp" break; - case 425: /* type_specifier_nonarray: F16TEXTURE3D */ -#line 2948 "MachineIndependent/glslang.y" + case 428: /* type_specifier_nonarray: F16TEXTURE3D */ +#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, Esd3D); } -#line 9666 "MachineIndependent/glslang_tab.cpp" +#line 9745 "MachineIndependent/glslang_tab.cpp" break; - case 426: /* type_specifier_nonarray: F16TEXTURECUBE */ -#line 2954 "MachineIndependent/glslang.y" + case 429: /* type_specifier_nonarray: F16TEXTURECUBE */ +#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, EsdCube); } -#line 9677 "MachineIndependent/glslang_tab.cpp" +#line 9756 "MachineIndependent/glslang_tab.cpp" break; - case 427: /* type_specifier_nonarray: TEXTURE1DARRAY */ -#line 2960 "MachineIndependent/glslang.y" + case 430: /* type_specifier_nonarray: TEXTURE1DARRAY */ +#line 2952 "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 9687 "MachineIndependent/glslang_tab.cpp" +#line 9766 "MachineIndependent/glslang_tab.cpp" break; - case 428: /* type_specifier_nonarray: F16TEXTURE1DARRAY */ -#line 2965 "MachineIndependent/glslang.y" + case 431: /* type_specifier_nonarray: F16TEXTURE1DARRAY */ +#line 2957 "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 9698 "MachineIndependent/glslang_tab.cpp" +#line 9777 "MachineIndependent/glslang_tab.cpp" break; - case 429: /* type_specifier_nonarray: F16TEXTURE2DARRAY */ -#line 2971 "MachineIndependent/glslang.y" + case 432: /* type_specifier_nonarray: F16TEXTURE2DARRAY */ +#line 2963 "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 9709 "MachineIndependent/glslang_tab.cpp" +#line 9788 "MachineIndependent/glslang_tab.cpp" break; - case 430: /* type_specifier_nonarray: F16TEXTURECUBEARRAY */ -#line 2977 "MachineIndependent/glslang.y" + case 433: /* type_specifier_nonarray: F16TEXTURECUBEARRAY */ +#line 2969 "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 9720 "MachineIndependent/glslang_tab.cpp" +#line 9799 "MachineIndependent/glslang_tab.cpp" break; - case 431: /* type_specifier_nonarray: ITEXTURE1D */ -#line 2983 "MachineIndependent/glslang.y" + case 434: /* type_specifier_nonarray: ITEXTURE1D */ +#line 2975 "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 9730 "MachineIndependent/glslang_tab.cpp" +#line 9809 "MachineIndependent/glslang_tab.cpp" break; - case 432: /* type_specifier_nonarray: ITEXTURE1DARRAY */ -#line 2988 "MachineIndependent/glslang.y" + case 435: /* type_specifier_nonarray: ITEXTURE1DARRAY */ +#line 2980 "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 9740 "MachineIndependent/glslang_tab.cpp" +#line 9819 "MachineIndependent/glslang_tab.cpp" break; - case 433: /* type_specifier_nonarray: UTEXTURE1D */ -#line 2993 "MachineIndependent/glslang.y" + case 436: /* type_specifier_nonarray: UTEXTURE1D */ +#line 2985 "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 9750 "MachineIndependent/glslang_tab.cpp" +#line 9829 "MachineIndependent/glslang_tab.cpp" break; - case 434: /* type_specifier_nonarray: UTEXTURE1DARRAY */ -#line 2998 "MachineIndependent/glslang.y" + case 437: /* type_specifier_nonarray: UTEXTURE1DARRAY */ +#line 2990 "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 9760 "MachineIndependent/glslang_tab.cpp" +#line 9839 "MachineIndependent/glslang_tab.cpp" break; - case 435: /* type_specifier_nonarray: TEXTURE2DRECT */ -#line 3003 "MachineIndependent/glslang.y" + case 438: /* type_specifier_nonarray: TEXTURE2DRECT */ +#line 2995 "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 9770 "MachineIndependent/glslang_tab.cpp" +#line 9849 "MachineIndependent/glslang_tab.cpp" break; - case 436: /* type_specifier_nonarray: F16TEXTURE2DRECT */ -#line 3008 "MachineIndependent/glslang.y" + case 439: /* type_specifier_nonarray: F16TEXTURE2DRECT */ +#line 3000 "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 9781 "MachineIndependent/glslang_tab.cpp" +#line 9860 "MachineIndependent/glslang_tab.cpp" break; - case 437: /* type_specifier_nonarray: ITEXTURE2DRECT */ -#line 3014 "MachineIndependent/glslang.y" + case 440: /* type_specifier_nonarray: ITEXTURE2DRECT */ +#line 3006 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtInt, EsdRect); } -#line 9791 "MachineIndependent/glslang_tab.cpp" +#line 9870 "MachineIndependent/glslang_tab.cpp" break; - case 438: /* type_specifier_nonarray: UTEXTURE2DRECT */ -#line 3019 "MachineIndependent/glslang.y" + case 441: /* type_specifier_nonarray: UTEXTURE2DRECT */ +#line 3011 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtUint, EsdRect); } -#line 9801 "MachineIndependent/glslang_tab.cpp" +#line 9880 "MachineIndependent/glslang_tab.cpp" break; - case 439: /* type_specifier_nonarray: TEXTUREBUFFER */ -#line 3024 "MachineIndependent/glslang.y" + case 442: /* type_specifier_nonarray: TEXTUREBUFFER */ +#line 3016 "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 9811 "MachineIndependent/glslang_tab.cpp" +#line 9890 "MachineIndependent/glslang_tab.cpp" break; - case 440: /* type_specifier_nonarray: F16TEXTUREBUFFER */ -#line 3029 "MachineIndependent/glslang.y" + case 443: /* type_specifier_nonarray: F16TEXTUREBUFFER */ +#line 3021 "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 9822 "MachineIndependent/glslang_tab.cpp" +#line 9901 "MachineIndependent/glslang_tab.cpp" break; - case 441: /* type_specifier_nonarray: ITEXTUREBUFFER */ -#line 3035 "MachineIndependent/glslang.y" + case 444: /* type_specifier_nonarray: ITEXTUREBUFFER */ +#line 3027 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtInt, EsdBuffer); } -#line 9832 "MachineIndependent/glslang_tab.cpp" +#line 9911 "MachineIndependent/glslang_tab.cpp" break; - case 442: /* type_specifier_nonarray: UTEXTUREBUFFER */ -#line 3040 "MachineIndependent/glslang.y" + case 445: /* type_specifier_nonarray: UTEXTUREBUFFER */ +#line 3032 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtUint, EsdBuffer); } -#line 9842 "MachineIndependent/glslang_tab.cpp" +#line 9921 "MachineIndependent/glslang_tab.cpp" break; - case 443: /* type_specifier_nonarray: TEXTURE2DMS */ -#line 3045 "MachineIndependent/glslang.y" + case 446: /* type_specifier_nonarray: TEXTURE2DMS */ +#line 3037 "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 9852 "MachineIndependent/glslang_tab.cpp" +#line 9931 "MachineIndependent/glslang_tab.cpp" break; - case 444: /* type_specifier_nonarray: F16TEXTURE2DMS */ -#line 3050 "MachineIndependent/glslang.y" + case 447: /* type_specifier_nonarray: F16TEXTURE2DMS */ +#line 3042 "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 9863 "MachineIndependent/glslang_tab.cpp" +#line 9942 "MachineIndependent/glslang_tab.cpp" break; - case 445: /* type_specifier_nonarray: ITEXTURE2DMS */ -#line 3056 "MachineIndependent/glslang.y" + case 448: /* type_specifier_nonarray: ITEXTURE2DMS */ +#line 3048 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtInt, Esd2D, false, false, true); } -#line 9873 "MachineIndependent/glslang_tab.cpp" +#line 9952 "MachineIndependent/glslang_tab.cpp" break; - case 446: /* type_specifier_nonarray: UTEXTURE2DMS */ -#line 3061 "MachineIndependent/glslang.y" + case 449: /* type_specifier_nonarray: UTEXTURE2DMS */ +#line 3053 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtUint, Esd2D, false, false, true); } -#line 9883 "MachineIndependent/glslang_tab.cpp" +#line 9962 "MachineIndependent/glslang_tab.cpp" break; - case 447: /* type_specifier_nonarray: TEXTURE2DMSARRAY */ -#line 3066 "MachineIndependent/glslang.y" + case 450: /* type_specifier_nonarray: TEXTURE2DMSARRAY */ +#line 3058 "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 9893 "MachineIndependent/glslang_tab.cpp" +#line 9972 "MachineIndependent/glslang_tab.cpp" break; - case 448: /* type_specifier_nonarray: F16TEXTURE2DMSARRAY */ -#line 3071 "MachineIndependent/glslang.y" + case 451: /* type_specifier_nonarray: F16TEXTURE2DMSARRAY */ +#line 3063 "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 9904 "MachineIndependent/glslang_tab.cpp" +#line 9983 "MachineIndependent/glslang_tab.cpp" break; - case 449: /* type_specifier_nonarray: ITEXTURE2DMSARRAY */ -#line 3077 "MachineIndependent/glslang.y" + case 452: /* type_specifier_nonarray: ITEXTURE2DMSARRAY */ +#line 3069 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtInt, Esd2D, true, false, true); } -#line 9914 "MachineIndependent/glslang_tab.cpp" +#line 9993 "MachineIndependent/glslang_tab.cpp" break; - case 450: /* type_specifier_nonarray: UTEXTURE2DMSARRAY */ -#line 3082 "MachineIndependent/glslang.y" + case 453: /* type_specifier_nonarray: UTEXTURE2DMSARRAY */ +#line 3074 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtUint, Esd2D, true, false, true); } -#line 9924 "MachineIndependent/glslang_tab.cpp" +#line 10003 "MachineIndependent/glslang_tab.cpp" break; - case 451: /* type_specifier_nonarray: IMAGE1D */ -#line 3087 "MachineIndependent/glslang.y" + case 454: /* type_specifier_nonarray: IMAGE1D */ +#line 3079 "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 9934 "MachineIndependent/glslang_tab.cpp" +#line 10013 "MachineIndependent/glslang_tab.cpp" break; - case 452: /* type_specifier_nonarray: F16IMAGE1D */ -#line 3092 "MachineIndependent/glslang.y" + case 455: /* type_specifier_nonarray: F16IMAGE1D */ +#line 3084 "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 9945 "MachineIndependent/glslang_tab.cpp" +#line 10024 "MachineIndependent/glslang_tab.cpp" break; - case 453: /* type_specifier_nonarray: IIMAGE1D */ -#line 3098 "MachineIndependent/glslang.y" + case 456: /* type_specifier_nonarray: IIMAGE1D */ +#line 3090 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtInt, Esd1D); } -#line 9955 "MachineIndependent/glslang_tab.cpp" +#line 10034 "MachineIndependent/glslang_tab.cpp" break; - case 454: /* type_specifier_nonarray: UIMAGE1D */ -#line 3103 "MachineIndependent/glslang.y" + case 457: /* type_specifier_nonarray: UIMAGE1D */ +#line 3095 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtUint, Esd1D); } -#line 9965 "MachineIndependent/glslang_tab.cpp" +#line 10044 "MachineIndependent/glslang_tab.cpp" break; - case 455: /* type_specifier_nonarray: IMAGE2D */ -#line 3108 "MachineIndependent/glslang.y" + case 458: /* type_specifier_nonarray: IMAGE2D */ +#line 3100 "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 9975 "MachineIndependent/glslang_tab.cpp" +#line 10054 "MachineIndependent/glslang_tab.cpp" break; - case 456: /* type_specifier_nonarray: F16IMAGE2D */ -#line 3113 "MachineIndependent/glslang.y" + case 459: /* type_specifier_nonarray: F16IMAGE2D */ +#line 3105 "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 9986 "MachineIndependent/glslang_tab.cpp" +#line 10065 "MachineIndependent/glslang_tab.cpp" break; - case 457: /* type_specifier_nonarray: IIMAGE2D */ -#line 3119 "MachineIndependent/glslang.y" + case 460: /* type_specifier_nonarray: IIMAGE2D */ +#line 3111 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtInt, Esd2D); } -#line 9996 "MachineIndependent/glslang_tab.cpp" +#line 10075 "MachineIndependent/glslang_tab.cpp" break; - case 458: /* type_specifier_nonarray: UIMAGE2D */ -#line 3124 "MachineIndependent/glslang.y" + case 461: /* type_specifier_nonarray: UIMAGE2D */ +#line 3116 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtUint, Esd2D); } -#line 10006 "MachineIndependent/glslang_tab.cpp" +#line 10085 "MachineIndependent/glslang_tab.cpp" break; - case 459: /* type_specifier_nonarray: IMAGE3D */ -#line 3129 "MachineIndependent/glslang.y" + case 462: /* type_specifier_nonarray: IMAGE3D */ +#line 3121 "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 10016 "MachineIndependent/glslang_tab.cpp" +#line 10095 "MachineIndependent/glslang_tab.cpp" break; - case 460: /* type_specifier_nonarray: F16IMAGE3D */ -#line 3134 "MachineIndependent/glslang.y" + case 463: /* type_specifier_nonarray: F16IMAGE3D */ +#line 3126 "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 10027 "MachineIndependent/glslang_tab.cpp" +#line 10106 "MachineIndependent/glslang_tab.cpp" break; - case 461: /* type_specifier_nonarray: IIMAGE3D */ -#line 3140 "MachineIndependent/glslang.y" + case 464: /* type_specifier_nonarray: IIMAGE3D */ +#line 3132 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtInt, Esd3D); } -#line 10037 "MachineIndependent/glslang_tab.cpp" +#line 10116 "MachineIndependent/glslang_tab.cpp" break; - case 462: /* type_specifier_nonarray: UIMAGE3D */ -#line 3145 "MachineIndependent/glslang.y" + case 465: /* type_specifier_nonarray: UIMAGE3D */ +#line 3137 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtUint, Esd3D); } -#line 10047 "MachineIndependent/glslang_tab.cpp" +#line 10126 "MachineIndependent/glslang_tab.cpp" break; - case 463: /* type_specifier_nonarray: IMAGE2DRECT */ -#line 3150 "MachineIndependent/glslang.y" + case 466: /* type_specifier_nonarray: IMAGE2DRECT */ +#line 3142 "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 10057 "MachineIndependent/glslang_tab.cpp" +#line 10136 "MachineIndependent/glslang_tab.cpp" break; - case 464: /* type_specifier_nonarray: F16IMAGE2DRECT */ -#line 3155 "MachineIndependent/glslang.y" + case 467: /* type_specifier_nonarray: F16IMAGE2DRECT */ +#line 3147 "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 10068 "MachineIndependent/glslang_tab.cpp" +#line 10147 "MachineIndependent/glslang_tab.cpp" break; - case 465: /* type_specifier_nonarray: IIMAGE2DRECT */ -#line 3161 "MachineIndependent/glslang.y" + case 468: /* type_specifier_nonarray: IIMAGE2DRECT */ +#line 3153 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtInt, EsdRect); } -#line 10078 "MachineIndependent/glslang_tab.cpp" +#line 10157 "MachineIndependent/glslang_tab.cpp" break; - case 466: /* type_specifier_nonarray: UIMAGE2DRECT */ -#line 3166 "MachineIndependent/glslang.y" + case 469: /* type_specifier_nonarray: UIMAGE2DRECT */ +#line 3158 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtUint, EsdRect); } -#line 10088 "MachineIndependent/glslang_tab.cpp" +#line 10167 "MachineIndependent/glslang_tab.cpp" break; - case 467: /* type_specifier_nonarray: IMAGECUBE */ -#line 3171 "MachineIndependent/glslang.y" + case 470: /* type_specifier_nonarray: IMAGECUBE */ +#line 3163 "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 10098 "MachineIndependent/glslang_tab.cpp" +#line 10177 "MachineIndependent/glslang_tab.cpp" break; - case 468: /* type_specifier_nonarray: F16IMAGECUBE */ -#line 3176 "MachineIndependent/glslang.y" + case 471: /* type_specifier_nonarray: F16IMAGECUBE */ +#line 3168 "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 10109 "MachineIndependent/glslang_tab.cpp" +#line 10188 "MachineIndependent/glslang_tab.cpp" break; - case 469: /* type_specifier_nonarray: IIMAGECUBE */ -#line 3182 "MachineIndependent/glslang.y" + case 472: /* type_specifier_nonarray: IIMAGECUBE */ +#line 3174 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtInt, EsdCube); } -#line 10119 "MachineIndependent/glslang_tab.cpp" +#line 10198 "MachineIndependent/glslang_tab.cpp" break; - case 470: /* type_specifier_nonarray: UIMAGECUBE */ -#line 3187 "MachineIndependent/glslang.y" + case 473: /* type_specifier_nonarray: UIMAGECUBE */ +#line 3179 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtUint, EsdCube); } -#line 10129 "MachineIndependent/glslang_tab.cpp" +#line 10208 "MachineIndependent/glslang_tab.cpp" break; - case 471: /* type_specifier_nonarray: IMAGEBUFFER */ -#line 3192 "MachineIndependent/glslang.y" + case 474: /* type_specifier_nonarray: IMAGEBUFFER */ +#line 3184 "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 10139 "MachineIndependent/glslang_tab.cpp" +#line 10218 "MachineIndependent/glslang_tab.cpp" break; - case 472: /* type_specifier_nonarray: F16IMAGEBUFFER */ -#line 3197 "MachineIndependent/glslang.y" + case 475: /* type_specifier_nonarray: F16IMAGEBUFFER */ +#line 3189 "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 10150 "MachineIndependent/glslang_tab.cpp" +#line 10229 "MachineIndependent/glslang_tab.cpp" break; - case 473: /* type_specifier_nonarray: IIMAGEBUFFER */ -#line 3203 "MachineIndependent/glslang.y" + case 476: /* type_specifier_nonarray: IIMAGEBUFFER */ +#line 3195 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtInt, EsdBuffer); } -#line 10160 "MachineIndependent/glslang_tab.cpp" +#line 10239 "MachineIndependent/glslang_tab.cpp" break; - case 474: /* type_specifier_nonarray: UIMAGEBUFFER */ -#line 3208 "MachineIndependent/glslang.y" + case 477: /* type_specifier_nonarray: UIMAGEBUFFER */ +#line 3200 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtUint, EsdBuffer); } -#line 10170 "MachineIndependent/glslang_tab.cpp" +#line 10249 "MachineIndependent/glslang_tab.cpp" break; - case 475: /* type_specifier_nonarray: IMAGE1DARRAY */ -#line 3213 "MachineIndependent/glslang.y" + case 478: /* type_specifier_nonarray: IMAGE1DARRAY */ +#line 3205 "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 10180 "MachineIndependent/glslang_tab.cpp" +#line 10259 "MachineIndependent/glslang_tab.cpp" break; - case 476: /* type_specifier_nonarray: F16IMAGE1DARRAY */ -#line 3218 "MachineIndependent/glslang.y" + case 479: /* type_specifier_nonarray: F16IMAGE1DARRAY */ +#line 3210 "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 10191 "MachineIndependent/glslang_tab.cpp" +#line 10270 "MachineIndependent/glslang_tab.cpp" break; - case 477: /* type_specifier_nonarray: IIMAGE1DARRAY */ -#line 3224 "MachineIndependent/glslang.y" + case 480: /* type_specifier_nonarray: IIMAGE1DARRAY */ +#line 3216 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtInt, Esd1D, true); } -#line 10201 "MachineIndependent/glslang_tab.cpp" +#line 10280 "MachineIndependent/glslang_tab.cpp" break; - case 478: /* type_specifier_nonarray: UIMAGE1DARRAY */ -#line 3229 "MachineIndependent/glslang.y" + case 481: /* type_specifier_nonarray: UIMAGE1DARRAY */ +#line 3221 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtUint, Esd1D, true); } -#line 10211 "MachineIndependent/glslang_tab.cpp" +#line 10290 "MachineIndependent/glslang_tab.cpp" break; - case 479: /* type_specifier_nonarray: IMAGE2DARRAY */ -#line 3234 "MachineIndependent/glslang.y" + case 482: /* type_specifier_nonarray: IMAGE2DARRAY */ +#line 3226 "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 10221 "MachineIndependent/glslang_tab.cpp" +#line 10300 "MachineIndependent/glslang_tab.cpp" break; - case 480: /* type_specifier_nonarray: F16IMAGE2DARRAY */ -#line 3239 "MachineIndependent/glslang.y" + case 483: /* type_specifier_nonarray: F16IMAGE2DARRAY */ +#line 3231 "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 10232 "MachineIndependent/glslang_tab.cpp" +#line 10311 "MachineIndependent/glslang_tab.cpp" break; - case 481: /* type_specifier_nonarray: IIMAGE2DARRAY */ -#line 3245 "MachineIndependent/glslang.y" + case 484: /* type_specifier_nonarray: IIMAGE2DARRAY */ +#line 3237 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtInt, Esd2D, true); } -#line 10242 "MachineIndependent/glslang_tab.cpp" +#line 10321 "MachineIndependent/glslang_tab.cpp" break; - case 482: /* type_specifier_nonarray: UIMAGE2DARRAY */ -#line 3250 "MachineIndependent/glslang.y" + case 485: /* type_specifier_nonarray: UIMAGE2DARRAY */ +#line 3242 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtUint, Esd2D, true); } -#line 10252 "MachineIndependent/glslang_tab.cpp" +#line 10331 "MachineIndependent/glslang_tab.cpp" break; - case 483: /* type_specifier_nonarray: IMAGECUBEARRAY */ -#line 3255 "MachineIndependent/glslang.y" + case 486: /* type_specifier_nonarray: IMAGECUBEARRAY */ +#line 3247 "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 10262 "MachineIndependent/glslang_tab.cpp" +#line 10341 "MachineIndependent/glslang_tab.cpp" break; - case 484: /* type_specifier_nonarray: F16IMAGECUBEARRAY */ -#line 3260 "MachineIndependent/glslang.y" + case 487: /* type_specifier_nonarray: F16IMAGECUBEARRAY */ +#line 3252 "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 10273 "MachineIndependent/glslang_tab.cpp" +#line 10352 "MachineIndependent/glslang_tab.cpp" break; - case 485: /* type_specifier_nonarray: IIMAGECUBEARRAY */ -#line 3266 "MachineIndependent/glslang.y" + case 488: /* type_specifier_nonarray: IIMAGECUBEARRAY */ +#line 3258 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtInt, EsdCube, true); } -#line 10283 "MachineIndependent/glslang_tab.cpp" +#line 10362 "MachineIndependent/glslang_tab.cpp" break; - case 486: /* type_specifier_nonarray: UIMAGECUBEARRAY */ -#line 3271 "MachineIndependent/glslang.y" + case 489: /* type_specifier_nonarray: UIMAGECUBEARRAY */ +#line 3263 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtUint, EsdCube, true); } -#line 10293 "MachineIndependent/glslang_tab.cpp" +#line 10372 "MachineIndependent/glslang_tab.cpp" break; - case 487: /* type_specifier_nonarray: IMAGE2DMS */ -#line 3276 "MachineIndependent/glslang.y" + case 490: /* type_specifier_nonarray: IMAGE2DMS */ +#line 3268 "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 10303 "MachineIndependent/glslang_tab.cpp" +#line 10382 "MachineIndependent/glslang_tab.cpp" break; - case 488: /* type_specifier_nonarray: F16IMAGE2DMS */ -#line 3281 "MachineIndependent/glslang.y" + case 491: /* type_specifier_nonarray: F16IMAGE2DMS */ +#line 3273 "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 10314 "MachineIndependent/glslang_tab.cpp" +#line 10393 "MachineIndependent/glslang_tab.cpp" break; - case 489: /* type_specifier_nonarray: IIMAGE2DMS */ -#line 3287 "MachineIndependent/glslang.y" + case 492: /* type_specifier_nonarray: IIMAGE2DMS */ +#line 3279 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtInt, Esd2D, false, false, true); } -#line 10324 "MachineIndependent/glslang_tab.cpp" +#line 10403 "MachineIndependent/glslang_tab.cpp" break; - case 490: /* type_specifier_nonarray: UIMAGE2DMS */ -#line 3292 "MachineIndependent/glslang.y" + case 493: /* type_specifier_nonarray: UIMAGE2DMS */ +#line 3284 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtUint, Esd2D, false, false, true); } -#line 10334 "MachineIndependent/glslang_tab.cpp" +#line 10413 "MachineIndependent/glslang_tab.cpp" break; - case 491: /* type_specifier_nonarray: IMAGE2DMSARRAY */ -#line 3297 "MachineIndependent/glslang.y" + case 494: /* type_specifier_nonarray: IMAGE2DMSARRAY */ +#line 3289 "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 10344 "MachineIndependent/glslang_tab.cpp" +#line 10423 "MachineIndependent/glslang_tab.cpp" break; - case 492: /* type_specifier_nonarray: F16IMAGE2DMSARRAY */ -#line 3302 "MachineIndependent/glslang.y" + case 495: /* type_specifier_nonarray: F16IMAGE2DMSARRAY */ +#line 3294 "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 10355 "MachineIndependent/glslang_tab.cpp" +#line 10434 "MachineIndependent/glslang_tab.cpp" break; - case 493: /* type_specifier_nonarray: IIMAGE2DMSARRAY */ -#line 3308 "MachineIndependent/glslang.y" + case 496: /* type_specifier_nonarray: IIMAGE2DMSARRAY */ +#line 3300 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtInt, Esd2D, true, false, true); } -#line 10365 "MachineIndependent/glslang_tab.cpp" +#line 10444 "MachineIndependent/glslang_tab.cpp" break; - case 494: /* type_specifier_nonarray: UIMAGE2DMSARRAY */ -#line 3313 "MachineIndependent/glslang.y" + case 497: /* type_specifier_nonarray: UIMAGE2DMSARRAY */ +#line 3305 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtUint, Esd2D, true, false, true); } -#line 10375 "MachineIndependent/glslang_tab.cpp" +#line 10454 "MachineIndependent/glslang_tab.cpp" break; - case 495: /* type_specifier_nonarray: I64IMAGE1D */ -#line 3318 "MachineIndependent/glslang.y" + case 498: /* type_specifier_nonarray: I64IMAGE1D */ +#line 3310 "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 10385 "MachineIndependent/glslang_tab.cpp" +#line 10464 "MachineIndependent/glslang_tab.cpp" break; - case 496: /* type_specifier_nonarray: U64IMAGE1D */ -#line 3323 "MachineIndependent/glslang.y" + case 499: /* type_specifier_nonarray: U64IMAGE1D */ +#line 3315 "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 10395 "MachineIndependent/glslang_tab.cpp" +#line 10474 "MachineIndependent/glslang_tab.cpp" break; - case 497: /* type_specifier_nonarray: I64IMAGE2D */ -#line 3328 "MachineIndependent/glslang.y" + case 500: /* type_specifier_nonarray: I64IMAGE2D */ +#line 3320 "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 10405 "MachineIndependent/glslang_tab.cpp" +#line 10484 "MachineIndependent/glslang_tab.cpp" break; - case 498: /* type_specifier_nonarray: U64IMAGE2D */ -#line 3333 "MachineIndependent/glslang.y" + case 501: /* type_specifier_nonarray: U64IMAGE2D */ +#line 3325 "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 10415 "MachineIndependent/glslang_tab.cpp" +#line 10494 "MachineIndependent/glslang_tab.cpp" break; - case 499: /* type_specifier_nonarray: I64IMAGE3D */ -#line 3338 "MachineIndependent/glslang.y" + case 502: /* type_specifier_nonarray: I64IMAGE3D */ +#line 3330 "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 10425 "MachineIndependent/glslang_tab.cpp" +#line 10504 "MachineIndependent/glslang_tab.cpp" break; - case 500: /* type_specifier_nonarray: U64IMAGE3D */ -#line 3343 "MachineIndependent/glslang.y" + case 503: /* type_specifier_nonarray: U64IMAGE3D */ +#line 3335 "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 10435 "MachineIndependent/glslang_tab.cpp" +#line 10514 "MachineIndependent/glslang_tab.cpp" break; - case 501: /* type_specifier_nonarray: I64IMAGE2DRECT */ -#line 3348 "MachineIndependent/glslang.y" + case 504: /* type_specifier_nonarray: I64IMAGE2DRECT */ +#line 3340 "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 10445 "MachineIndependent/glslang_tab.cpp" +#line 10524 "MachineIndependent/glslang_tab.cpp" break; - case 502: /* type_specifier_nonarray: U64IMAGE2DRECT */ -#line 3353 "MachineIndependent/glslang.y" + case 505: /* type_specifier_nonarray: U64IMAGE2DRECT */ +#line 3345 "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 10455 "MachineIndependent/glslang_tab.cpp" +#line 10534 "MachineIndependent/glslang_tab.cpp" break; - case 503: /* type_specifier_nonarray: I64IMAGECUBE */ -#line 3358 "MachineIndependent/glslang.y" + case 506: /* type_specifier_nonarray: I64IMAGECUBE */ +#line 3350 "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 10465 "MachineIndependent/glslang_tab.cpp" +#line 10544 "MachineIndependent/glslang_tab.cpp" break; - case 504: /* type_specifier_nonarray: U64IMAGECUBE */ -#line 3363 "MachineIndependent/glslang.y" + case 507: /* type_specifier_nonarray: U64IMAGECUBE */ +#line 3355 "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 10475 "MachineIndependent/glslang_tab.cpp" +#line 10554 "MachineIndependent/glslang_tab.cpp" break; - case 505: /* type_specifier_nonarray: I64IMAGEBUFFER */ -#line 3368 "MachineIndependent/glslang.y" + case 508: /* type_specifier_nonarray: I64IMAGEBUFFER */ +#line 3360 "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 10485 "MachineIndependent/glslang_tab.cpp" +#line 10564 "MachineIndependent/glslang_tab.cpp" break; - case 506: /* type_specifier_nonarray: U64IMAGEBUFFER */ -#line 3373 "MachineIndependent/glslang.y" + case 509: /* type_specifier_nonarray: U64IMAGEBUFFER */ +#line 3365 "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 10495 "MachineIndependent/glslang_tab.cpp" +#line 10574 "MachineIndependent/glslang_tab.cpp" break; - case 507: /* type_specifier_nonarray: I64IMAGE1DARRAY */ -#line 3378 "MachineIndependent/glslang.y" + case 510: /* type_specifier_nonarray: I64IMAGE1DARRAY */ +#line 3370 "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 10505 "MachineIndependent/glslang_tab.cpp" +#line 10584 "MachineIndependent/glslang_tab.cpp" break; - case 508: /* type_specifier_nonarray: U64IMAGE1DARRAY */ -#line 3383 "MachineIndependent/glslang.y" + case 511: /* type_specifier_nonarray: U64IMAGE1DARRAY */ +#line 3375 "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 10515 "MachineIndependent/glslang_tab.cpp" +#line 10594 "MachineIndependent/glslang_tab.cpp" break; - case 509: /* type_specifier_nonarray: I64IMAGE2DARRAY */ -#line 3388 "MachineIndependent/glslang.y" + case 512: /* type_specifier_nonarray: I64IMAGE2DARRAY */ +#line 3380 "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 10525 "MachineIndependent/glslang_tab.cpp" +#line 10604 "MachineIndependent/glslang_tab.cpp" break; - case 510: /* type_specifier_nonarray: U64IMAGE2DARRAY */ -#line 3393 "MachineIndependent/glslang.y" + case 513: /* type_specifier_nonarray: U64IMAGE2DARRAY */ +#line 3385 "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 10535 "MachineIndependent/glslang_tab.cpp" +#line 10614 "MachineIndependent/glslang_tab.cpp" break; - case 511: /* type_specifier_nonarray: I64IMAGECUBEARRAY */ -#line 3398 "MachineIndependent/glslang.y" + case 514: /* type_specifier_nonarray: I64IMAGECUBEARRAY */ +#line 3390 "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 10545 "MachineIndependent/glslang_tab.cpp" +#line 10624 "MachineIndependent/glslang_tab.cpp" break; - case 512: /* type_specifier_nonarray: U64IMAGECUBEARRAY */ -#line 3403 "MachineIndependent/glslang.y" + case 515: /* type_specifier_nonarray: U64IMAGECUBEARRAY */ +#line 3395 "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 10555 "MachineIndependent/glslang_tab.cpp" +#line 10634 "MachineIndependent/glslang_tab.cpp" break; - case 513: /* type_specifier_nonarray: I64IMAGE2DMS */ -#line 3408 "MachineIndependent/glslang.y" + case 516: /* type_specifier_nonarray: I64IMAGE2DMS */ +#line 3400 "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 10565 "MachineIndependent/glslang_tab.cpp" +#line 10644 "MachineIndependent/glslang_tab.cpp" break; - case 514: /* type_specifier_nonarray: U64IMAGE2DMS */ -#line 3413 "MachineIndependent/glslang.y" + case 517: /* type_specifier_nonarray: U64IMAGE2DMS */ +#line 3405 "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 10575 "MachineIndependent/glslang_tab.cpp" +#line 10654 "MachineIndependent/glslang_tab.cpp" break; - case 515: /* type_specifier_nonarray: I64IMAGE2DMSARRAY */ -#line 3418 "MachineIndependent/glslang.y" + case 518: /* type_specifier_nonarray: I64IMAGE2DMSARRAY */ +#line 3410 "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 10585 "MachineIndependent/glslang_tab.cpp" +#line 10664 "MachineIndependent/glslang_tab.cpp" break; - case 516: /* type_specifier_nonarray: U64IMAGE2DMSARRAY */ -#line 3423 "MachineIndependent/glslang.y" + case 519: /* type_specifier_nonarray: U64IMAGE2DMSARRAY */ +#line 3415 "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 10595 "MachineIndependent/glslang_tab.cpp" +#line 10674 "MachineIndependent/glslang_tab.cpp" break; - case 517: /* type_specifier_nonarray: SAMPLEREXTERNALOES */ -#line 3428 "MachineIndependent/glslang.y" + case 520: /* type_specifier_nonarray: SAMPLEREXTERNALOES */ +#line 3420 "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 10606 "MachineIndependent/glslang_tab.cpp" +#line 10685 "MachineIndependent/glslang_tab.cpp" break; - case 518: /* type_specifier_nonarray: SAMPLEREXTERNAL2DY2YEXT */ -#line 3434 "MachineIndependent/glslang.y" + case 521: /* type_specifier_nonarray: SAMPLEREXTERNAL2DY2YEXT */ +#line 3426 "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 10617 "MachineIndependent/glslang_tab.cpp" +#line 10696 "MachineIndependent/glslang_tab.cpp" break; - case 519: /* type_specifier_nonarray: SUBPASSINPUT */ -#line 3440 "MachineIndependent/glslang.y" + case 522: /* type_specifier_nonarray: ATTACHMENTEXT */ +#line 3432 "MachineIndependent/glslang.y" + { + parseContext.requireStage((yyvsp[0].lex).loc, EShLangFragment, "attachmentEXT input"); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.setAttachmentEXT(EbtFloat); + } +#line 10707 "MachineIndependent/glslang_tab.cpp" + break; + + case 523: /* type_specifier_nonarray: IATTACHMENTEXT */ +#line 3438 "MachineIndependent/glslang.y" + { + parseContext.requireStage((yyvsp[0].lex).loc, EShLangFragment, "attachmentEXT input"); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.setAttachmentEXT(EbtInt); + } +#line 10718 "MachineIndependent/glslang_tab.cpp" + break; + + case 524: /* type_specifier_nonarray: UATTACHMENTEXT */ +#line 3444 "MachineIndependent/glslang.y" + { + parseContext.requireStage((yyvsp[0].lex).loc, EShLangFragment, "attachmentEXT input"); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.setAttachmentEXT(EbtUint); + } +#line 10729 "MachineIndependent/glslang_tab.cpp" + break; + + case 525: /* type_specifier_nonarray: SUBPASSINPUT */ +#line 3450 "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 10628 "MachineIndependent/glslang_tab.cpp" +#line 10740 "MachineIndependent/glslang_tab.cpp" break; - case 520: /* type_specifier_nonarray: SUBPASSINPUTMS */ -#line 3446 "MachineIndependent/glslang.y" + case 526: /* type_specifier_nonarray: SUBPASSINPUTMS */ +#line 3456 "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 10639 "MachineIndependent/glslang_tab.cpp" +#line 10751 "MachineIndependent/glslang_tab.cpp" break; - case 521: /* type_specifier_nonarray: F16SUBPASSINPUT */ -#line 3452 "MachineIndependent/glslang.y" + case 527: /* type_specifier_nonarray: F16SUBPASSINPUT */ +#line 3462 "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"); @@ -10647,11 +10759,11 @@ yyreduce: (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setSubpass(EbtFloat16); } -#line 10651 "MachineIndependent/glslang_tab.cpp" +#line 10763 "MachineIndependent/glslang_tab.cpp" break; - case 522: /* type_specifier_nonarray: F16SUBPASSINPUTMS */ -#line 3459 "MachineIndependent/glslang.y" + case 528: /* type_specifier_nonarray: F16SUBPASSINPUTMS */ +#line 3469 "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"); @@ -10659,107 +10771,131 @@ yyreduce: (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setSubpass(EbtFloat16, true); } -#line 10663 "MachineIndependent/glslang_tab.cpp" +#line 10775 "MachineIndependent/glslang_tab.cpp" break; - case 523: /* type_specifier_nonarray: ISUBPASSINPUT */ -#line 3466 "MachineIndependent/glslang.y" + case 529: /* type_specifier_nonarray: ISUBPASSINPUT */ +#line 3476 "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 10674 "MachineIndependent/glslang_tab.cpp" +#line 10786 "MachineIndependent/glslang_tab.cpp" break; - case 524: /* type_specifier_nonarray: ISUBPASSINPUTMS */ -#line 3472 "MachineIndependent/glslang.y" + case 530: /* type_specifier_nonarray: ISUBPASSINPUTMS */ +#line 3482 "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 10685 "MachineIndependent/glslang_tab.cpp" +#line 10797 "MachineIndependent/glslang_tab.cpp" break; - case 525: /* type_specifier_nonarray: USUBPASSINPUT */ -#line 3478 "MachineIndependent/glslang.y" + case 531: /* type_specifier_nonarray: USUBPASSINPUT */ +#line 3488 "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 10696 "MachineIndependent/glslang_tab.cpp" +#line 10808 "MachineIndependent/glslang_tab.cpp" break; - case 526: /* type_specifier_nonarray: USUBPASSINPUTMS */ -#line 3484 "MachineIndependent/glslang.y" + case 532: /* type_specifier_nonarray: USUBPASSINPUTMS */ +#line 3494 "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 10707 "MachineIndependent/glslang_tab.cpp" +#line 10819 "MachineIndependent/glslang_tab.cpp" break; - case 527: /* type_specifier_nonarray: FCOOPMATNV */ -#line 3490 "MachineIndependent/glslang.y" + case 533: /* type_specifier_nonarray: FCOOPMATNV */ +#line 3500 "MachineIndependent/glslang.y" { - parseContext.fcoopmatCheck((yyvsp[0].lex).loc, "fcoopmatNV", parseContext.symbolTable.atBuiltInLevel()); + parseContext.fcoopmatCheckNV((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; + (yyval.interm.type).coopmatNV = true; + (yyval.interm.type).coopmatKHR = false; } -#line 10718 "MachineIndependent/glslang_tab.cpp" +#line 10831 "MachineIndependent/glslang_tab.cpp" break; - case 528: /* type_specifier_nonarray: ICOOPMATNV */ -#line 3496 "MachineIndependent/glslang.y" + case 534: /* type_specifier_nonarray: ICOOPMATNV */ +#line 3507 "MachineIndependent/glslang.y" { - parseContext.intcoopmatCheck((yyvsp[0].lex).loc, "icoopmatNV", parseContext.symbolTable.atBuiltInLevel()); + parseContext.intcoopmatCheckNV((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; + (yyval.interm.type).coopmatNV = true; + (yyval.interm.type).coopmatKHR = false; } -#line 10729 "MachineIndependent/glslang_tab.cpp" +#line 10843 "MachineIndependent/glslang_tab.cpp" break; - case 529: /* type_specifier_nonarray: UCOOPMATNV */ -#line 3502 "MachineIndependent/glslang.y" + case 535: /* type_specifier_nonarray: UCOOPMATNV */ +#line 3514 "MachineIndependent/glslang.y" { - parseContext.intcoopmatCheck((yyvsp[0].lex).loc, "ucoopmatNV", parseContext.symbolTable.atBuiltInLevel()); + parseContext.intcoopmatCheckNV((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; + (yyval.interm.type).coopmatNV = true; + (yyval.interm.type).coopmatKHR = false; } -#line 10740 "MachineIndependent/glslang_tab.cpp" +#line 10855 "MachineIndependent/glslang_tab.cpp" break; - case 530: /* type_specifier_nonarray: spirv_type_specifier */ -#line 3508 "MachineIndependent/glslang.y" + case 536: /* type_specifier_nonarray: COOPMAT */ +#line 3521 "MachineIndependent/glslang.y" + { + parseContext.coopmatCheck((yyvsp[0].lex).loc, "coopmat", parseContext.symbolTable.atBuiltInLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtCoopmat; + (yyval.interm.type).coopmatNV = false; + (yyval.interm.type).coopmatKHR = true; + } +#line 10867 "MachineIndependent/glslang_tab.cpp" + break; + + case 537: /* type_specifier_nonarray: spirv_type_specifier */ +#line 3528 "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 10749 "MachineIndependent/glslang_tab.cpp" +#line 10876 "MachineIndependent/glslang_tab.cpp" break; - case 531: /* type_specifier_nonarray: struct_specifier */ -#line 3513 "MachineIndependent/glslang.y" + case 538: /* type_specifier_nonarray: HITOBJECTNV */ +#line 3532 "MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtHitObjectNV; + } +#line 10885 "MachineIndependent/glslang_tab.cpp" + break; + + case 539: /* type_specifier_nonarray: struct_specifier */ +#line 3536 "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 10759 "MachineIndependent/glslang_tab.cpp" +#line 10895 "MachineIndependent/glslang_tab.cpp" break; - case 532: /* type_specifier_nonarray: TYPE_NAME */ -#line 3518 "MachineIndependent/glslang.y" + case 540: /* type_specifier_nonarray: TYPE_NAME */ +#line 3541 "MachineIndependent/glslang.y" { // // This is for user defined type names. The lexical phase looked up the @@ -10773,69 +10909,75 @@ yyreduce: } else parseContext.error((yyvsp[0].lex).loc, "expected type name", (yyvsp[0].lex).string->c_str(), ""); } -#line 10777 "MachineIndependent/glslang_tab.cpp" +#line 10913 "MachineIndependent/glslang_tab.cpp" break; - case 533: /* precision_qualifier: HIGH_PRECISION */ -#line 3534 "MachineIndependent/glslang.y" + case 541: /* precision_qualifier: HIGH_PRECISION */ +#line 3557 "MachineIndependent/glslang.y" { - parseContext.profileRequires((yyvsp[0].lex).loc, ENoProfile, 130, nullptr, "highp precision qualifier"); + 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 10787 "MachineIndependent/glslang_tab.cpp" +#line 10923 "MachineIndependent/glslang_tab.cpp" break; - case 534: /* precision_qualifier: MEDIUM_PRECISION */ -#line 3539 "MachineIndependent/glslang.y" + case 542: /* precision_qualifier: MEDIUM_PRECISION */ +#line 3562 "MachineIndependent/glslang.y" { - parseContext.profileRequires((yyvsp[0].lex).loc, ENoProfile, 130, nullptr, "mediump precision qualifier"); + 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 10797 "MachineIndependent/glslang_tab.cpp" +#line 10933 "MachineIndependent/glslang_tab.cpp" break; - case 535: /* precision_qualifier: LOW_PRECISION */ -#line 3544 "MachineIndependent/glslang.y" + case 543: /* precision_qualifier: LOW_PRECISION */ +#line 3567 "MachineIndependent/glslang.y" { - parseContext.profileRequires((yyvsp[0].lex).loc, ENoProfile, 130, nullptr, "lowp precision qualifier"); + 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 10807 "MachineIndependent/glslang_tab.cpp" +#line 10943 "MachineIndependent/glslang_tab.cpp" break; - case 536: /* $@3: %empty */ -#line 3552 "MachineIndependent/glslang.y" + case 544: /* $@3: %empty */ +#line 3575 "MachineIndependent/glslang.y" { parseContext.nestedStructCheck((yyvsp[-2].lex).loc); } -#line 10813 "MachineIndependent/glslang_tab.cpp" +#line 10949 "MachineIndependent/glslang_tab.cpp" break; - case 537: /* struct_specifier: STRUCT IDENTIFIER LEFT_BRACE $@3 struct_declaration_list RIGHT_BRACE */ -#line 3552 "MachineIndependent/glslang.y" + case 545: /* struct_specifier: STRUCT IDENTIFIER LEFT_BRACE $@3 struct_declaration_list RIGHT_BRACE */ +#line 3575 "MachineIndependent/glslang.y" { + TType* structure = new TType((yyvsp[-1].interm.typeList), *(yyvsp[-4].lex).string); parseContext.structArrayCheck((yyvsp[-4].lex).loc, *structure); + TVariable* userTypeDef = new TVariable((yyvsp[-4].lex).string, *structure, true); if (! parseContext.symbolTable.insert(*userTypeDef)) parseContext.error((yyvsp[-4].lex).loc, "redefinition", (yyvsp[-4].lex).string->c_str(), "struct"); + else if (parseContext.spvVersion.vulkanRelaxed + && structure->containsOpaque()) + parseContext.relaxedSymbols.push_back(structure->getTypeName()); + (yyval.interm.type).init((yyvsp[-5].lex).loc); (yyval.interm.type).basicType = EbtStruct; (yyval.interm.type).userDef = structure; --parseContext.structNestingLevel; } -#line 10829 "MachineIndependent/glslang_tab.cpp" +#line 10971 "MachineIndependent/glslang_tab.cpp" break; - case 538: /* $@4: %empty */ -#line 3563 "MachineIndependent/glslang.y" + case 546: /* $@4: %empty */ +#line 3592 "MachineIndependent/glslang.y" { parseContext.nestedStructCheck((yyvsp[-1].lex).loc); } -#line 10835 "MachineIndependent/glslang_tab.cpp" +#line 10977 "MachineIndependent/glslang_tab.cpp" break; - case 539: /* struct_specifier: STRUCT LEFT_BRACE $@4 struct_declaration_list RIGHT_BRACE */ -#line 3563 "MachineIndependent/glslang.y" + case 547: /* struct_specifier: STRUCT LEFT_BRACE $@4 struct_declaration_list RIGHT_BRACE */ +#line 3592 "MachineIndependent/glslang.y" { TType* structure = new TType((yyvsp[-1].interm.typeList), TString("")); (yyval.interm.type).init((yyvsp[-4].lex).loc); @@ -10843,19 +10985,19 @@ yyreduce: (yyval.interm.type).userDef = structure; --parseContext.structNestingLevel; } -#line 10847 "MachineIndependent/glslang_tab.cpp" +#line 10989 "MachineIndependent/glslang_tab.cpp" break; - case 540: /* struct_declaration_list: struct_declaration */ -#line 3573 "MachineIndependent/glslang.y" + case 548: /* struct_declaration_list: struct_declaration */ +#line 3602 "MachineIndependent/glslang.y" { (yyval.interm.typeList) = (yyvsp[0].interm.typeList); } -#line 10855 "MachineIndependent/glslang_tab.cpp" +#line 10997 "MachineIndependent/glslang_tab.cpp" break; - case 541: /* struct_declaration_list: struct_declaration_list struct_declaration */ -#line 3576 "MachineIndependent/glslang.y" + case 549: /* struct_declaration_list: struct_declaration_list struct_declaration */ +#line 3605 "MachineIndependent/glslang.y" { (yyval.interm.typeList) = (yyvsp[-1].interm.typeList); for (unsigned int i = 0; i < (yyvsp[0].interm.typeList)->size(); ++i) { @@ -10866,15 +11008,15 @@ yyreduce: (yyval.interm.typeList)->push_back((*(yyvsp[0].interm.typeList))[i]); } } -#line 10870 "MachineIndependent/glslang_tab.cpp" +#line 11012 "MachineIndependent/glslang_tab.cpp" break; - case 542: /* struct_declaration: type_specifier struct_declarator_list SEMICOLON */ -#line 3589 "MachineIndependent/glslang.y" + case 550: /* struct_declaration: type_specifier struct_declarator_list SEMICOLON */ +#line 3618 "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"); - parseContext.profileRequires((yyvsp[-2].interm.type).loc, EEsProfile, 300, nullptr, "arrayed type"); + parseContext.profileRequires((yyvsp[-2].interm.type).loc, EEsProfile, 300, 0, "arrayed type"); if (parseContext.isEsProfile()) parseContext.arraySizeRequiredCheck((yyvsp[-2].interm.type).loc, *(yyvsp[-2].interm.type).arraySizes); } @@ -10882,7 +11024,7 @@ yyreduce: (yyval.interm.typeList) = (yyvsp[-1].interm.typeList); parseContext.voidErrorCheck((yyvsp[-2].interm.type).loc, (*(yyvsp[-1].interm.typeList))[0].type->getFieldName(), (yyvsp[-2].interm.type).basicType); - parseContext.precisionQualifierCheck((yyvsp[-2].interm.type).loc, (yyvsp[-2].interm.type).basicType, (yyvsp[-2].interm.type).qualifier); + parseContext.precisionQualifierCheck((yyvsp[-2].interm.type).loc, (yyvsp[-2].interm.type).basicType, (yyvsp[-2].interm.type).qualifier, (yyvsp[-2].interm.type).isCoopmat()); for (unsigned int i = 0; i < (yyval.interm.typeList)->size(); ++i) { TType type((yyvsp[-2].interm.type)); @@ -10893,15 +11035,15 @@ yyreduce: (*(yyval.interm.typeList))[i].type->shallowCopy(type); } } -#line 10897 "MachineIndependent/glslang_tab.cpp" +#line 11039 "MachineIndependent/glslang_tab.cpp" break; - case 543: /* struct_declaration: type_qualifier type_specifier struct_declarator_list SEMICOLON */ -#line 3611 "MachineIndependent/glslang.y" + case 551: /* struct_declaration: type_qualifier type_specifier struct_declarator_list SEMICOLON */ +#line 3640 "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"); - parseContext.profileRequires((yyvsp[-2].interm.type).loc, EEsProfile, 300, nullptr, "arrayed type"); + parseContext.profileRequires((yyvsp[-2].interm.type).loc, EEsProfile, 300, 0, "arrayed type"); if (parseContext.isEsProfile()) parseContext.arraySizeRequiredCheck((yyvsp[-2].interm.type).loc, *(yyvsp[-2].interm.type).arraySizes); } @@ -10911,7 +11053,7 @@ yyreduce: parseContext.memberQualifierCheck((yyvsp[-3].interm.type)); parseContext.voidErrorCheck((yyvsp[-2].interm.type).loc, (*(yyvsp[-1].interm.typeList))[0].type->getFieldName(), (yyvsp[-2].interm.type).basicType); parseContext.mergeQualifiers((yyvsp[-2].interm.type).loc, (yyvsp[-2].interm.type).qualifier, (yyvsp[-3].interm.type).qualifier, true); - parseContext.precisionQualifierCheck((yyvsp[-2].interm.type).loc, (yyvsp[-2].interm.type).basicType, (yyvsp[-2].interm.type).qualifier); + parseContext.precisionQualifierCheck((yyvsp[-2].interm.type).loc, (yyvsp[-2].interm.type).basicType, (yyvsp[-2].interm.type).qualifier, (yyvsp[-2].interm.type).isCoopmat()); for (unsigned int i = 0; i < (yyval.interm.typeList)->size(); ++i) { TType type((yyvsp[-2].interm.type)); @@ -10922,38 +11064,38 @@ yyreduce: (*(yyval.interm.typeList))[i].type->shallowCopy(type); } } -#line 10926 "MachineIndependent/glslang_tab.cpp" +#line 11068 "MachineIndependent/glslang_tab.cpp" break; - case 544: /* struct_declarator_list: struct_declarator */ -#line 3638 "MachineIndependent/glslang.y" + case 552: /* struct_declarator_list: struct_declarator */ +#line 3667 "MachineIndependent/glslang.y" { (yyval.interm.typeList) = new TTypeList; (yyval.interm.typeList)->push_back((yyvsp[0].interm.typeLine)); } -#line 10935 "MachineIndependent/glslang_tab.cpp" +#line 11077 "MachineIndependent/glslang_tab.cpp" break; - case 545: /* struct_declarator_list: struct_declarator_list COMMA struct_declarator */ -#line 3642 "MachineIndependent/glslang.y" + case 553: /* struct_declarator_list: struct_declarator_list COMMA struct_declarator */ +#line 3671 "MachineIndependent/glslang.y" { (yyval.interm.typeList)->push_back((yyvsp[0].interm.typeLine)); } -#line 10943 "MachineIndependent/glslang_tab.cpp" +#line 11085 "MachineIndependent/glslang_tab.cpp" break; - case 546: /* struct_declarator: IDENTIFIER */ -#line 3648 "MachineIndependent/glslang.y" + case 554: /* struct_declarator: IDENTIFIER */ +#line 3677 "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 10953 "MachineIndependent/glslang_tab.cpp" +#line 11095 "MachineIndependent/glslang_tab.cpp" break; - case 547: /* struct_declarator: IDENTIFIER array_specifier */ -#line 3653 "MachineIndependent/glslang.y" + case 555: /* struct_declarator: IDENTIFIER array_specifier */ +#line 3682 "MachineIndependent/glslang.y" { parseContext.arrayOfArrayVersionCheck((yyvsp[-1].lex).loc, (yyvsp[0].interm).arraySizes); @@ -10962,371 +11104,371 @@ yyreduce: (yyval.interm.typeLine).type->setFieldName(*(yyvsp[-1].lex).string); (yyval.interm.typeLine).type->transferArraySizes((yyvsp[0].interm).arraySizes); } -#line 10966 "MachineIndependent/glslang_tab.cpp" +#line 11108 "MachineIndependent/glslang_tab.cpp" break; - case 548: /* initializer: assignment_expression */ -#line 3664 "MachineIndependent/glslang.y" + case 556: /* initializer: assignment_expression */ +#line 3693 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 10974 "MachineIndependent/glslang_tab.cpp" +#line 11116 "MachineIndependent/glslang_tab.cpp" break; - case 549: /* initializer: LEFT_BRACE initializer_list RIGHT_BRACE */ -#line 3668 "MachineIndependent/glslang.y" + case 557: /* initializer: LEFT_BRACE initializer_list RIGHT_BRACE */ +#line 3696 "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 10985 "MachineIndependent/glslang_tab.cpp" +#line 11127 "MachineIndependent/glslang_tab.cpp" break; - case 550: /* initializer: LEFT_BRACE initializer_list COMMA RIGHT_BRACE */ -#line 3674 "MachineIndependent/glslang.y" + case 558: /* initializer: LEFT_BRACE initializer_list COMMA RIGHT_BRACE */ +#line 3702 "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 10996 "MachineIndependent/glslang_tab.cpp" +#line 11138 "MachineIndependent/glslang_tab.cpp" break; - case 551: /* initializer: LEFT_BRACE RIGHT_BRACE */ -#line 3680 "MachineIndependent/glslang.y" + case 559: /* initializer: LEFT_BRACE RIGHT_BRACE */ +#line 3708 "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 11007 "MachineIndependent/glslang_tab.cpp" +#line 11149 "MachineIndependent/glslang_tab.cpp" break; - case 552: /* initializer_list: initializer */ -#line 3691 "MachineIndependent/glslang.y" + case 560: /* initializer_list: initializer */ +#line 3717 "MachineIndependent/glslang.y" { - (yyval.interm.intermTypedNode) = parseContext.intermediate.growAggregate(nullptr, (yyvsp[0].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)->getLoc()); + (yyval.interm.intermTypedNode) = parseContext.intermediate.growAggregate(0, (yyvsp[0].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)->getLoc()); } -#line 11015 "MachineIndependent/glslang_tab.cpp" +#line 11157 "MachineIndependent/glslang_tab.cpp" break; - case 553: /* initializer_list: initializer_list COMMA initializer */ -#line 3694 "MachineIndependent/glslang.y" + case 561: /* initializer_list: initializer_list COMMA initializer */ +#line 3720 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = parseContext.intermediate.growAggregate((yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); } -#line 11023 "MachineIndependent/glslang_tab.cpp" +#line 11165 "MachineIndependent/glslang_tab.cpp" break; - case 554: /* declaration_statement: declaration */ -#line 3701 "MachineIndependent/glslang.y" - { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 11029 "MachineIndependent/glslang_tab.cpp" - break; - - case 555: /* statement: compound_statement */ -#line 3705 "MachineIndependent/glslang.y" - { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 11035 "MachineIndependent/glslang_tab.cpp" - break; - - case 556: /* statement: simple_statement */ -#line 3706 "MachineIndependent/glslang.y" - { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 11041 "MachineIndependent/glslang_tab.cpp" - break; - - case 557: /* simple_statement: declaration_statement */ -#line 3712 "MachineIndependent/glslang.y" - { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 11047 "MachineIndependent/glslang_tab.cpp" - break; - - case 558: /* simple_statement: expression_statement */ -#line 3713 "MachineIndependent/glslang.y" - { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 11053 "MachineIndependent/glslang_tab.cpp" - break; - - case 559: /* simple_statement: selection_statement */ -#line 3714 "MachineIndependent/glslang.y" - { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 11059 "MachineIndependent/glslang_tab.cpp" - break; - - case 560: /* simple_statement: switch_statement */ -#line 3715 "MachineIndependent/glslang.y" - { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 11065 "MachineIndependent/glslang_tab.cpp" - break; - - case 561: /* simple_statement: case_label */ -#line 3716 "MachineIndependent/glslang.y" - { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 11071 "MachineIndependent/glslang_tab.cpp" - break; - - case 562: /* simple_statement: iteration_statement */ -#line 3717 "MachineIndependent/glslang.y" - { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 11077 "MachineIndependent/glslang_tab.cpp" - break; - - case 563: /* simple_statement: jump_statement */ -#line 3718 "MachineIndependent/glslang.y" - { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 11083 "MachineIndependent/glslang_tab.cpp" - break; - - case 564: /* simple_statement: demote_statement */ -#line 3720 "MachineIndependent/glslang.y" - { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 11089 "MachineIndependent/glslang_tab.cpp" - break; - - case 565: /* demote_statement: DEMOTE SEMICOLON */ + case 562: /* declaration_statement: declaration */ #line 3726 "MachineIndependent/glslang.y" + { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } +#line 11171 "MachineIndependent/glslang_tab.cpp" + break; + + case 563: /* statement: compound_statement */ +#line 3730 "MachineIndependent/glslang.y" + { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } +#line 11177 "MachineIndependent/glslang_tab.cpp" + break; + + case 564: /* statement: simple_statement */ +#line 3731 "MachineIndependent/glslang.y" + { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } +#line 11183 "MachineIndependent/glslang_tab.cpp" + break; + + case 565: /* simple_statement: declaration_statement */ +#line 3737 "MachineIndependent/glslang.y" + { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } +#line 11189 "MachineIndependent/glslang_tab.cpp" + break; + + case 566: /* simple_statement: expression_statement */ +#line 3738 "MachineIndependent/glslang.y" + { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } +#line 11195 "MachineIndependent/glslang_tab.cpp" + break; + + case 567: /* simple_statement: selection_statement */ +#line 3739 "MachineIndependent/glslang.y" + { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } +#line 11201 "MachineIndependent/glslang_tab.cpp" + break; + + case 568: /* simple_statement: switch_statement */ +#line 3740 "MachineIndependent/glslang.y" + { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } +#line 11207 "MachineIndependent/glslang_tab.cpp" + break; + + case 569: /* simple_statement: case_label */ +#line 3741 "MachineIndependent/glslang.y" + { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } +#line 11213 "MachineIndependent/glslang_tab.cpp" + break; + + case 570: /* simple_statement: iteration_statement */ +#line 3742 "MachineIndependent/glslang.y" + { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } +#line 11219 "MachineIndependent/glslang_tab.cpp" + break; + + case 571: /* simple_statement: jump_statement */ +#line 3743 "MachineIndependent/glslang.y" + { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } +#line 11225 "MachineIndependent/glslang_tab.cpp" + break; + + case 572: /* simple_statement: demote_statement */ +#line 3744 "MachineIndependent/glslang.y" + { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } +#line 11231 "MachineIndependent/glslang_tab.cpp" + break; + + case 573: /* demote_statement: DEMOTE SEMICOLON */ +#line 3748 "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 11099 "MachineIndependent/glslang_tab.cpp" +#line 11241 "MachineIndependent/glslang_tab.cpp" break; - case 566: /* compound_statement: LEFT_BRACE RIGHT_BRACE */ -#line 3735 "MachineIndependent/glslang.y" - { (yyval.interm.intermNode) = nullptr; } -#line 11105 "MachineIndependent/glslang_tab.cpp" + case 574: /* compound_statement: LEFT_BRACE RIGHT_BRACE */ +#line 3756 "MachineIndependent/glslang.y" + { (yyval.interm.intermNode) = 0; } +#line 11247 "MachineIndependent/glslang_tab.cpp" break; - case 567: /* $@5: %empty */ -#line 3736 "MachineIndependent/glslang.y" + case 575: /* $@5: %empty */ +#line 3757 "MachineIndependent/glslang.y" { parseContext.symbolTable.push(); ++parseContext.statementNestingLevel; } -#line 11114 "MachineIndependent/glslang_tab.cpp" +#line 11256 "MachineIndependent/glslang_tab.cpp" break; - case 568: /* $@6: %empty */ -#line 3740 "MachineIndependent/glslang.y" + case 576: /* $@6: %empty */ +#line 3761 "MachineIndependent/glslang.y" { parseContext.symbolTable.pop(&parseContext.defaultPrecision[0]); --parseContext.statementNestingLevel; } -#line 11123 "MachineIndependent/glslang_tab.cpp" +#line 11265 "MachineIndependent/glslang_tab.cpp" break; - case 569: /* compound_statement: LEFT_BRACE $@5 statement_list $@6 RIGHT_BRACE */ -#line 3744 "MachineIndependent/glslang.y" + case 577: /* compound_statement: LEFT_BRACE $@5 statement_list $@6 RIGHT_BRACE */ +#line 3765 "MachineIndependent/glslang.y" { if ((yyvsp[-2].interm.intermNode) && (yyvsp[-2].interm.intermNode)->getAsAggregate()) (yyvsp[-2].interm.intermNode)->getAsAggregate()->setOperator(parseContext.intermediate.getDebugInfo() ? EOpScope : EOpSequence); (yyval.interm.intermNode) = (yyvsp[-2].interm.intermNode); } -#line 11133 "MachineIndependent/glslang_tab.cpp" +#line 11275 "MachineIndependent/glslang_tab.cpp" break; - case 570: /* statement_no_new_scope: compound_statement_no_new_scope */ -#line 3752 "MachineIndependent/glslang.y" + case 578: /* statement_no_new_scope: compound_statement_no_new_scope */ +#line 3773 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 11139 "MachineIndependent/glslang_tab.cpp" +#line 11281 "MachineIndependent/glslang_tab.cpp" break; - case 571: /* statement_no_new_scope: simple_statement */ -#line 3753 "MachineIndependent/glslang.y" + case 579: /* statement_no_new_scope: simple_statement */ +#line 3774 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 11145 "MachineIndependent/glslang_tab.cpp" +#line 11287 "MachineIndependent/glslang_tab.cpp" break; - case 572: /* $@7: %empty */ -#line 3757 "MachineIndependent/glslang.y" + case 580: /* $@7: %empty */ +#line 3778 "MachineIndependent/glslang.y" { ++parseContext.controlFlowNestingLevel; } -#line 11153 "MachineIndependent/glslang_tab.cpp" +#line 11295 "MachineIndependent/glslang_tab.cpp" break; - case 573: /* statement_scoped: $@7 compound_statement */ -#line 3760 "MachineIndependent/glslang.y" + case 581: /* statement_scoped: $@7 compound_statement */ +#line 3781 "MachineIndependent/glslang.y" { --parseContext.controlFlowNestingLevel; (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 11162 "MachineIndependent/glslang_tab.cpp" +#line 11304 "MachineIndependent/glslang_tab.cpp" break; - case 574: /* $@8: %empty */ -#line 3764 "MachineIndependent/glslang.y" + case 582: /* $@8: %empty */ +#line 3785 "MachineIndependent/glslang.y" { parseContext.symbolTable.push(); ++parseContext.statementNestingLevel; ++parseContext.controlFlowNestingLevel; } -#line 11172 "MachineIndependent/glslang_tab.cpp" +#line 11314 "MachineIndependent/glslang_tab.cpp" break; - case 575: /* statement_scoped: $@8 simple_statement */ -#line 3769 "MachineIndependent/glslang.y" + case 583: /* statement_scoped: $@8 simple_statement */ +#line 3790 "MachineIndependent/glslang.y" { parseContext.symbolTable.pop(&parseContext.defaultPrecision[0]); --parseContext.statementNestingLevel; --parseContext.controlFlowNestingLevel; (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 11183 "MachineIndependent/glslang_tab.cpp" +#line 11325 "MachineIndependent/glslang_tab.cpp" break; - case 576: /* compound_statement_no_new_scope: LEFT_BRACE RIGHT_BRACE */ -#line 3778 "MachineIndependent/glslang.y" + case 584: /* compound_statement_no_new_scope: LEFT_BRACE RIGHT_BRACE */ +#line 3799 "MachineIndependent/glslang.y" { - (yyval.interm.intermNode) = nullptr; + (yyval.interm.intermNode) = 0; } -#line 11191 "MachineIndependent/glslang_tab.cpp" +#line 11333 "MachineIndependent/glslang_tab.cpp" break; - case 577: /* compound_statement_no_new_scope: LEFT_BRACE statement_list RIGHT_BRACE */ -#line 3781 "MachineIndependent/glslang.y" + case 585: /* compound_statement_no_new_scope: LEFT_BRACE statement_list RIGHT_BRACE */ +#line 3802 "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 11201 "MachineIndependent/glslang_tab.cpp" +#line 11343 "MachineIndependent/glslang_tab.cpp" break; - case 578: /* statement_list: statement */ -#line 3789 "MachineIndependent/glslang.y" + case 586: /* statement_list: statement */ +#line 3810 "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 || (yyvsp[0].interm.intermNode)->getAsBranchNode()->getFlowOp() == EOpDefault)) { - parseContext.wrapupSwitchSubsequence(nullptr, (yyvsp[0].interm.intermNode)); - (yyval.interm.intermNode) = nullptr; // start a fresh subsequence for what's after this case + parseContext.wrapupSwitchSubsequence(0, (yyvsp[0].interm.intermNode)); + (yyval.interm.intermNode) = 0; // start a fresh subsequence for what's after this case } } -#line 11214 "MachineIndependent/glslang_tab.cpp" +#line 11356 "MachineIndependent/glslang_tab.cpp" break; - case 579: /* statement_list: statement_list statement */ -#line 3797 "MachineIndependent/glslang.y" + case 587: /* statement_list: statement_list statement */ +#line 3818 "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)) { - parseContext.wrapupSwitchSubsequence((yyvsp[-1].interm.intermNode) ? (yyvsp[-1].interm.intermNode)->getAsAggregate() : nullptr, (yyvsp[0].interm.intermNode)); - (yyval.interm.intermNode) = nullptr; // start a fresh subsequence for what's after this case + parseContext.wrapupSwitchSubsequence((yyvsp[-1].interm.intermNode) ? (yyvsp[-1].interm.intermNode)->getAsAggregate() : 0, (yyvsp[0].interm.intermNode)); + (yyval.interm.intermNode) = 0; // start a fresh subsequence for what's after this case } else (yyval.interm.intermNode) = parseContext.intermediate.growAggregate((yyvsp[-1].interm.intermNode), (yyvsp[0].interm.intermNode)); } -#line 11227 "MachineIndependent/glslang_tab.cpp" +#line 11369 "MachineIndependent/glslang_tab.cpp" break; - case 580: /* expression_statement: SEMICOLON */ -#line 3808 "MachineIndependent/glslang.y" - { (yyval.interm.intermNode) = nullptr; } -#line 11233 "MachineIndependent/glslang_tab.cpp" + case 588: /* expression_statement: SEMICOLON */ +#line 3829 "MachineIndependent/glslang.y" + { (yyval.interm.intermNode) = 0; } +#line 11375 "MachineIndependent/glslang_tab.cpp" break; - case 581: /* expression_statement: expression SEMICOLON */ -#line 3809 "MachineIndependent/glslang.y" + case 589: /* expression_statement: expression SEMICOLON */ +#line 3830 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = static_cast((yyvsp[-1].interm.intermTypedNode)); } -#line 11239 "MachineIndependent/glslang_tab.cpp" +#line 11381 "MachineIndependent/glslang_tab.cpp" break; - case 582: /* selection_statement: selection_statement_nonattributed */ -#line 3813 "MachineIndependent/glslang.y" + case 590: /* selection_statement: selection_statement_nonattributed */ +#line 3834 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 11247 "MachineIndependent/glslang_tab.cpp" +#line 11389 "MachineIndependent/glslang_tab.cpp" break; - case 583: /* selection_statement: attribute selection_statement_nonattributed */ -#line 3817 "MachineIndependent/glslang.y" + case 591: /* selection_statement: attribute selection_statement_nonattributed */ +#line 3837 "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 11257 "MachineIndependent/glslang_tab.cpp" +#line 11399 "MachineIndependent/glslang_tab.cpp" break; - case 584: /* selection_statement_nonattributed: IF LEFT_PAREN expression RIGHT_PAREN selection_rest_statement */ -#line 3825 "MachineIndependent/glslang.y" + case 592: /* selection_statement_nonattributed: IF LEFT_PAREN expression RIGHT_PAREN selection_rest_statement */ +#line 3844 "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 11266 "MachineIndependent/glslang_tab.cpp" +#line 11408 "MachineIndependent/glslang_tab.cpp" break; - case 585: /* selection_rest_statement: statement_scoped ELSE statement_scoped */ -#line 3832 "MachineIndependent/glslang.y" + case 593: /* selection_rest_statement: statement_scoped ELSE statement_scoped */ +#line 3851 "MachineIndependent/glslang.y" { (yyval.interm.nodePair).node1 = (yyvsp[-2].interm.intermNode); (yyval.interm.nodePair).node2 = (yyvsp[0].interm.intermNode); } -#line 11275 "MachineIndependent/glslang_tab.cpp" +#line 11417 "MachineIndependent/glslang_tab.cpp" break; - case 586: /* selection_rest_statement: statement_scoped */ -#line 3836 "MachineIndependent/glslang.y" + case 594: /* selection_rest_statement: statement_scoped */ +#line 3855 "MachineIndependent/glslang.y" { (yyval.interm.nodePair).node1 = (yyvsp[0].interm.intermNode); - (yyval.interm.nodePair).node2 = nullptr; + (yyval.interm.nodePair).node2 = 0; } -#line 11284 "MachineIndependent/glslang_tab.cpp" +#line 11426 "MachineIndependent/glslang_tab.cpp" break; - case 587: /* condition: expression */ -#line 3844 "MachineIndependent/glslang.y" + case 595: /* condition: expression */ +#line 3863 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); parseContext.boolCheck((yyvsp[0].interm.intermTypedNode)->getLoc(), (yyvsp[0].interm.intermTypedNode)); } -#line 11293 "MachineIndependent/glslang_tab.cpp" +#line 11435 "MachineIndependent/glslang_tab.cpp" break; - case 588: /* condition: fully_specified_type IDENTIFIER EQUAL initializer */ -#line 3848 "MachineIndependent/glslang.y" + case 596: /* condition: fully_specified_type IDENTIFIER EQUAL initializer */ +#line 3867 "MachineIndependent/glslang.y" { parseContext.boolCheck((yyvsp[-2].lex).loc, (yyvsp[-3].interm.type)); TType type((yyvsp[-3].interm.type)); - TIntermNode* initNode = parseContext.declareVariable((yyvsp[-2].lex).loc, *(yyvsp[-2].lex).string, (yyvsp[-3].interm.type), nullptr, (yyvsp[0].interm.intermTypedNode)); + TIntermNode* initNode = parseContext.declareVariable((yyvsp[-2].lex).loc, *(yyvsp[-2].lex).string, (yyvsp[-3].interm.type), 0, (yyvsp[0].interm.intermTypedNode)); if (initNode) (yyval.interm.intermTypedNode) = initNode->getAsTyped(); else - (yyval.interm.intermTypedNode) = nullptr; + (yyval.interm.intermTypedNode) = 0; } -#line 11308 "MachineIndependent/glslang_tab.cpp" +#line 11450 "MachineIndependent/glslang_tab.cpp" break; - case 589: /* switch_statement: switch_statement_nonattributed */ -#line 3861 "MachineIndependent/glslang.y" + case 597: /* switch_statement: switch_statement_nonattributed */ +#line 3880 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 11316 "MachineIndependent/glslang_tab.cpp" +#line 11458 "MachineIndependent/glslang_tab.cpp" break; - case 590: /* switch_statement: attribute switch_statement_nonattributed */ -#line 3865 "MachineIndependent/glslang.y" + case 598: /* switch_statement: attribute switch_statement_nonattributed */ +#line 3883 "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 11326 "MachineIndependent/glslang_tab.cpp" +#line 11468 "MachineIndependent/glslang_tab.cpp" break; - case 591: /* $@9: %empty */ -#line 3873 "MachineIndependent/glslang.y" + case 599: /* $@9: %empty */ +#line 3890 "MachineIndependent/glslang.y" { // start new switch sequence on the switch stack ++parseContext.controlFlowNestingLevel; @@ -11335,13 +11477,13 @@ yyreduce: parseContext.switchLevel.push_back(parseContext.statementNestingLevel); parseContext.symbolTable.push(); } -#line 11339 "MachineIndependent/glslang_tab.cpp" +#line 11481 "MachineIndependent/glslang_tab.cpp" break; - case 592: /* switch_statement_nonattributed: SWITCH LEFT_PAREN expression RIGHT_PAREN $@9 LEFT_BRACE switch_statement_list RIGHT_BRACE */ -#line 3881 "MachineIndependent/glslang.y" + case 600: /* switch_statement_nonattributed: SWITCH LEFT_PAREN expression RIGHT_PAREN $@9 LEFT_BRACE switch_statement_list RIGHT_BRACE */ +#line 3898 "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() : nullptr); + (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(); parseContext.switchSequenceStack.pop_back(); parseContext.switchLevel.pop_back(); @@ -11349,29 +11491,29 @@ yyreduce: --parseContext.statementNestingLevel; --parseContext.controlFlowNestingLevel; } -#line 11353 "MachineIndependent/glslang_tab.cpp" +#line 11495 "MachineIndependent/glslang_tab.cpp" break; - case 593: /* switch_statement_list: %empty */ -#line 3893 "MachineIndependent/glslang.y" + case 601: /* switch_statement_list: %empty */ +#line 3910 "MachineIndependent/glslang.y" { - (yyval.interm.intermNode) = nullptr; + (yyval.interm.intermNode) = 0; } -#line 11361 "MachineIndependent/glslang_tab.cpp" +#line 11503 "MachineIndependent/glslang_tab.cpp" break; - case 594: /* switch_statement_list: statement_list */ -#line 3896 "MachineIndependent/glslang.y" + case 602: /* switch_statement_list: statement_list */ +#line 3913 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 11369 "MachineIndependent/glslang_tab.cpp" +#line 11511 "MachineIndependent/glslang_tab.cpp" break; - case 595: /* case_label: CASE expression COLON */ -#line 3902 "MachineIndependent/glslang.y" + case 603: /* case_label: CASE expression COLON */ +#line 3919 "MachineIndependent/glslang.y" { - (yyval.interm.intermNode) = nullptr; + (yyval.interm.intermNode) = 0; if (parseContext.switchLevel.size() == 0) parseContext.error((yyvsp[-2].lex).loc, "cannot appear outside switch statement", "case", ""); else if (parseContext.switchLevel.back() != parseContext.statementNestingLevel) @@ -11382,13 +11524,13 @@ yyreduce: (yyval.interm.intermNode) = parseContext.intermediate.addBranch(EOpCase, (yyvsp[-1].interm.intermTypedNode), (yyvsp[-2].lex).loc); } } -#line 11386 "MachineIndependent/glslang_tab.cpp" +#line 11528 "MachineIndependent/glslang_tab.cpp" break; - case 596: /* case_label: DEFAULT COLON */ -#line 3914 "MachineIndependent/glslang.y" + case 604: /* case_label: DEFAULT COLON */ +#line 3931 "MachineIndependent/glslang.y" { - (yyval.interm.intermNode) = nullptr; + (yyval.interm.intermNode) = 0; if (parseContext.switchLevel.size() == 0) parseContext.error((yyvsp[-1].lex).loc, "cannot appear outside switch statement", "default", ""); else if (parseContext.switchLevel.back() != parseContext.statementNestingLevel) @@ -11396,29 +11538,29 @@ yyreduce: else (yyval.interm.intermNode) = parseContext.intermediate.addBranch(EOpDefault, (yyvsp[-1].lex).loc); } -#line 11400 "MachineIndependent/glslang_tab.cpp" +#line 11542 "MachineIndependent/glslang_tab.cpp" break; - case 597: /* iteration_statement: iteration_statement_nonattributed */ -#line 3926 "MachineIndependent/glslang.y" + case 605: /* iteration_statement: iteration_statement_nonattributed */ +#line 3943 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 11408 "MachineIndependent/glslang_tab.cpp" +#line 11550 "MachineIndependent/glslang_tab.cpp" break; - case 598: /* iteration_statement: attribute iteration_statement_nonattributed */ -#line 3930 "MachineIndependent/glslang.y" + case 606: /* iteration_statement: attribute iteration_statement_nonattributed */ +#line 3946 "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 11418 "MachineIndependent/glslang_tab.cpp" +#line 11560 "MachineIndependent/glslang_tab.cpp" break; - case 599: /* $@10: %empty */ -#line 3938 "MachineIndependent/glslang.y" + case 607: /* $@10: %empty */ +#line 3953 "MachineIndependent/glslang.y" { if (! parseContext.limits.whileLoops) parseContext.error((yyvsp[-1].lex).loc, "while loops not available", "limitation", ""); @@ -11427,62 +11569,62 @@ yyreduce: ++parseContext.statementNestingLevel; ++parseContext.controlFlowNestingLevel; } -#line 11431 "MachineIndependent/glslang_tab.cpp" +#line 11573 "MachineIndependent/glslang_tab.cpp" break; - case 600: /* iteration_statement_nonattributed: WHILE LEFT_PAREN $@10 condition RIGHT_PAREN statement_no_new_scope */ -#line 3946 "MachineIndependent/glslang.y" + case 608: /* iteration_statement_nonattributed: WHILE LEFT_PAREN $@10 condition RIGHT_PAREN statement_no_new_scope */ +#line 3961 "MachineIndependent/glslang.y" { parseContext.symbolTable.pop(&parseContext.defaultPrecision[0]); - (yyval.interm.intermNode) = parseContext.intermediate.addLoop((yyvsp[0].interm.intermNode), (yyvsp[-2].interm.intermTypedNode), nullptr, true, (yyvsp[-5].lex).loc); + (yyval.interm.intermNode) = parseContext.intermediate.addLoop((yyvsp[0].interm.intermNode), (yyvsp[-2].interm.intermTypedNode), 0, true, (yyvsp[-5].lex).loc); --parseContext.loopNestingLevel; --parseContext.statementNestingLevel; --parseContext.controlFlowNestingLevel; } -#line 11443 "MachineIndependent/glslang_tab.cpp" +#line 11585 "MachineIndependent/glslang_tab.cpp" break; - case 601: /* $@11: %empty */ -#line 3953 "MachineIndependent/glslang.y" + case 609: /* $@11: %empty */ +#line 3968 "MachineIndependent/glslang.y" { parseContext.symbolTable.push(); ++parseContext.loopNestingLevel; ++parseContext.statementNestingLevel; ++parseContext.controlFlowNestingLevel; } -#line 11454 "MachineIndependent/glslang_tab.cpp" +#line 11596 "MachineIndependent/glslang_tab.cpp" break; - case 602: /* iteration_statement_nonattributed: DO $@11 statement WHILE LEFT_PAREN expression RIGHT_PAREN SEMICOLON */ -#line 3959 "MachineIndependent/glslang.y" + case 610: /* iteration_statement_nonattributed: DO $@11 statement WHILE LEFT_PAREN expression RIGHT_PAREN SEMICOLON */ +#line 3974 "MachineIndependent/glslang.y" { if (! parseContext.limits.whileLoops) parseContext.error((yyvsp[-7].lex).loc, "do-while loops not available", "limitation", ""); parseContext.boolCheck((yyvsp[0].lex).loc, (yyvsp[-2].interm.intermTypedNode)); - (yyval.interm.intermNode) = parseContext.intermediate.addLoop((yyvsp[-5].interm.intermNode), (yyvsp[-2].interm.intermTypedNode), nullptr, false, (yyvsp[-4].lex).loc); + (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 11471 "MachineIndependent/glslang_tab.cpp" +#line 11613 "MachineIndependent/glslang_tab.cpp" break; - case 603: /* $@12: %empty */ -#line 3971 "MachineIndependent/glslang.y" + case 611: /* $@12: %empty */ +#line 3986 "MachineIndependent/glslang.y" { parseContext.symbolTable.push(); ++parseContext.loopNestingLevel; ++parseContext.statementNestingLevel; ++parseContext.controlFlowNestingLevel; } -#line 11482 "MachineIndependent/glslang_tab.cpp" +#line 11624 "MachineIndependent/glslang_tab.cpp" break; - case 604: /* iteration_statement_nonattributed: FOR LEFT_PAREN $@12 for_init_statement for_rest_statement RIGHT_PAREN statement_no_new_scope */ -#line 3977 "MachineIndependent/glslang.y" + case 612: /* iteration_statement_nonattributed: FOR LEFT_PAREN $@12 for_init_statement for_rest_statement RIGHT_PAREN statement_no_new_scope */ +#line 3992 "MachineIndependent/glslang.y" { parseContext.symbolTable.pop(&parseContext.defaultPrecision[0]); (yyval.interm.intermNode) = parseContext.intermediate.makeAggregate((yyvsp[-3].interm.intermNode), (yyvsp[-5].lex).loc); @@ -11495,81 +11637,81 @@ yyreduce: --parseContext.statementNestingLevel; --parseContext.controlFlowNestingLevel; } -#line 11499 "MachineIndependent/glslang_tab.cpp" +#line 11641 "MachineIndependent/glslang_tab.cpp" break; - case 605: /* for_init_statement: expression_statement */ -#line 3992 "MachineIndependent/glslang.y" + case 613: /* for_init_statement: expression_statement */ +#line 4007 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 11507 "MachineIndependent/glslang_tab.cpp" +#line 11649 "MachineIndependent/glslang_tab.cpp" break; - case 606: /* for_init_statement: declaration_statement */ -#line 3995 "MachineIndependent/glslang.y" + case 614: /* for_init_statement: declaration_statement */ +#line 4010 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 11515 "MachineIndependent/glslang_tab.cpp" +#line 11657 "MachineIndependent/glslang_tab.cpp" break; - case 607: /* conditionopt: condition */ -#line 4001 "MachineIndependent/glslang.y" + case 615: /* conditionopt: condition */ +#line 4016 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 11523 "MachineIndependent/glslang_tab.cpp" +#line 11665 "MachineIndependent/glslang_tab.cpp" break; - case 608: /* conditionopt: %empty */ -#line 4004 "MachineIndependent/glslang.y" + case 616: /* conditionopt: %empty */ +#line 4019 "MachineIndependent/glslang.y" { - (yyval.interm.intermTypedNode) = nullptr; + (yyval.interm.intermTypedNode) = 0; } -#line 11531 "MachineIndependent/glslang_tab.cpp" +#line 11673 "MachineIndependent/glslang_tab.cpp" break; - case 609: /* for_rest_statement: conditionopt SEMICOLON */ -#line 4010 "MachineIndependent/glslang.y" + case 617: /* for_rest_statement: conditionopt SEMICOLON */ +#line 4025 "MachineIndependent/glslang.y" { (yyval.interm.nodePair).node1 = (yyvsp[-1].interm.intermTypedNode); - (yyval.interm.nodePair).node2 = nullptr; + (yyval.interm.nodePair).node2 = 0; } -#line 11540 "MachineIndependent/glslang_tab.cpp" +#line 11682 "MachineIndependent/glslang_tab.cpp" break; - case 610: /* for_rest_statement: conditionopt SEMICOLON expression */ -#line 4014 "MachineIndependent/glslang.y" + case 618: /* for_rest_statement: conditionopt SEMICOLON expression */ +#line 4029 "MachineIndependent/glslang.y" { (yyval.interm.nodePair).node1 = (yyvsp[-2].interm.intermTypedNode); (yyval.interm.nodePair).node2 = (yyvsp[0].interm.intermTypedNode); } -#line 11549 "MachineIndependent/glslang_tab.cpp" +#line 11691 "MachineIndependent/glslang_tab.cpp" break; - case 611: /* jump_statement: CONTINUE SEMICOLON */ -#line 4021 "MachineIndependent/glslang.y" + case 619: /* jump_statement: CONTINUE SEMICOLON */ +#line 4036 "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 11559 "MachineIndependent/glslang_tab.cpp" +#line 11701 "MachineIndependent/glslang_tab.cpp" break; - case 612: /* jump_statement: BREAK SEMICOLON */ -#line 4026 "MachineIndependent/glslang.y" + case 620: /* jump_statement: BREAK SEMICOLON */ +#line 4041 "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 11569 "MachineIndependent/glslang_tab.cpp" +#line 11711 "MachineIndependent/glslang_tab.cpp" break; - case 613: /* jump_statement: RETURN SEMICOLON */ -#line 4031 "MachineIndependent/glslang.y" + case 621: /* jump_statement: RETURN SEMICOLON */ +#line 4046 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = parseContext.intermediate.addBranch(EOpReturn, (yyvsp[-1].lex).loc); if (parseContext.currentFunctionType->getBasicType() != EbtVoid) @@ -11577,101 +11719,101 @@ yyreduce: if (parseContext.inMain) parseContext.postEntryPointReturn = true; } -#line 11581 "MachineIndependent/glslang_tab.cpp" +#line 11723 "MachineIndependent/glslang_tab.cpp" break; - case 614: /* jump_statement: RETURN expression SEMICOLON */ -#line 4038 "MachineIndependent/glslang.y" + case 622: /* jump_statement: RETURN expression SEMICOLON */ +#line 4053 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = parseContext.handleReturnValue((yyvsp[-2].lex).loc, (yyvsp[-1].interm.intermTypedNode)); } -#line 11589 "MachineIndependent/glslang_tab.cpp" +#line 11731 "MachineIndependent/glslang_tab.cpp" break; - case 615: /* jump_statement: DISCARD SEMICOLON */ -#line 4041 "MachineIndependent/glslang.y" + case 623: /* jump_statement: DISCARD SEMICOLON */ +#line 4056 "MachineIndependent/glslang.y" { parseContext.requireStage((yyvsp[-1].lex).loc, EShLangFragment, "discard"); (yyval.interm.intermNode) = parseContext.intermediate.addBranch(EOpKill, (yyvsp[-1].lex).loc); } -#line 11598 "MachineIndependent/glslang_tab.cpp" +#line 11740 "MachineIndependent/glslang_tab.cpp" break; - case 616: /* jump_statement: TERMINATE_INVOCATION SEMICOLON */ -#line 4045 "MachineIndependent/glslang.y" + case 624: /* jump_statement: TERMINATE_INVOCATION SEMICOLON */ +#line 4060 "MachineIndependent/glslang.y" { parseContext.requireStage((yyvsp[-1].lex).loc, EShLangFragment, "terminateInvocation"); (yyval.interm.intermNode) = parseContext.intermediate.addBranch(EOpTerminateInvocation, (yyvsp[-1].lex).loc); } -#line 11607 "MachineIndependent/glslang_tab.cpp" +#line 11749 "MachineIndependent/glslang_tab.cpp" break; - case 617: /* jump_statement: TERMINATE_RAY SEMICOLON */ -#line 4050 "MachineIndependent/glslang.y" + case 625: /* jump_statement: TERMINATE_RAY SEMICOLON */ +#line 4064 "MachineIndependent/glslang.y" { parseContext.requireStage((yyvsp[-1].lex).loc, EShLangAnyHit, "terminateRayEXT"); (yyval.interm.intermNode) = parseContext.intermediate.addBranch(EOpTerminateRayKHR, (yyvsp[-1].lex).loc); } -#line 11616 "MachineIndependent/glslang_tab.cpp" +#line 11758 "MachineIndependent/glslang_tab.cpp" break; - case 618: /* jump_statement: IGNORE_INTERSECTION SEMICOLON */ -#line 4054 "MachineIndependent/glslang.y" + case 626: /* jump_statement: IGNORE_INTERSECTION SEMICOLON */ +#line 4068 "MachineIndependent/glslang.y" { parseContext.requireStage((yyvsp[-1].lex).loc, EShLangAnyHit, "ignoreIntersectionEXT"); (yyval.interm.intermNode) = parseContext.intermediate.addBranch(EOpIgnoreIntersectionKHR, (yyvsp[-1].lex).loc); } -#line 11625 "MachineIndependent/glslang_tab.cpp" +#line 11767 "MachineIndependent/glslang_tab.cpp" break; - case 619: /* translation_unit: external_declaration */ -#line 4064 "MachineIndependent/glslang.y" + case 627: /* translation_unit: external_declaration */ +#line 4077 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); parseContext.intermediate.setTreeRoot((yyval.interm.intermNode)); } -#line 11634 "MachineIndependent/glslang_tab.cpp" +#line 11776 "MachineIndependent/glslang_tab.cpp" break; - case 620: /* translation_unit: translation_unit external_declaration */ -#line 4068 "MachineIndependent/glslang.y" + case 628: /* translation_unit: translation_unit external_declaration */ +#line 4081 "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 11645 "MachineIndependent/glslang_tab.cpp" +#line 11787 "MachineIndependent/glslang_tab.cpp" break; - case 621: /* external_declaration: function_definition */ -#line 4077 "MachineIndependent/glslang.y" + case 629: /* external_declaration: function_definition */ +#line 4090 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 11653 "MachineIndependent/glslang_tab.cpp" +#line 11795 "MachineIndependent/glslang_tab.cpp" break; - case 622: /* external_declaration: declaration */ -#line 4080 "MachineIndependent/glslang.y" + case 630: /* external_declaration: declaration */ +#line 4093 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 11661 "MachineIndependent/glslang_tab.cpp" +#line 11803 "MachineIndependent/glslang_tab.cpp" break; - case 623: /* external_declaration: SEMICOLON */ -#line 4084 "MachineIndependent/glslang.y" + case 631: /* external_declaration: SEMICOLON */ +#line 4096 "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 11671 "MachineIndependent/glslang_tab.cpp" +#line 11813 "MachineIndependent/glslang_tab.cpp" break; - case 624: /* $@13: %empty */ -#line 4093 "MachineIndependent/glslang.y" + case 632: /* $@13: %empty */ +#line 4104 "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); @@ -11684,17 +11826,18 @@ yyreduce: ++parseContext.statementNestingLevel; } } -#line 11688 "MachineIndependent/glslang_tab.cpp" +#line 11830 "MachineIndependent/glslang_tab.cpp" break; - case 625: /* function_definition: function_prototype $@13 compound_statement_no_new_scope */ -#line 4105 "MachineIndependent/glslang.y" + case 633: /* function_definition: function_prototype $@13 compound_statement_no_new_scope */ +#line 4116 "MachineIndependent/glslang.y" { // May be best done as post process phase on intermediate code if (parseContext.currentFunctionType->getBasicType() != EbtVoid && ! parseContext.functionReturnsValue) parseContext.error((yyvsp[-2].interm).loc, "function does not return a value:", "", (yyvsp[-2].interm).function->getName().c_str()); parseContext.symbolTable.pop(&parseContext.defaultPrecision[0]); (yyval.interm.intermNode) = parseContext.intermediate.growAggregate((yyvsp[-2].interm).intermNode, (yyvsp[0].interm.intermNode)); + (yyval.interm.intermNode)->getAsAggregate()->setLinkType((yyvsp[-2].interm).function->getLinkType()); parseContext.intermediate.setAggregateOperator((yyval.interm.intermNode), EOpFunction, (yyvsp[-2].interm).function->getType(), (yyvsp[-2].interm).loc); (yyval.interm.intermNode)->getAsAggregate()->setName((yyvsp[-2].interm).function->getMangledName().c_str()); @@ -11715,228 +11858,228 @@ yyreduce: --parseContext.statementNestingLevel; } } -#line 11719 "MachineIndependent/glslang_tab.cpp" +#line 11862 "MachineIndependent/glslang_tab.cpp" break; - case 626: /* attribute: LEFT_BRACKET LEFT_BRACKET attribute_list RIGHT_BRACKET RIGHT_BRACKET */ -#line 4135 "MachineIndependent/glslang.y" + case 634: /* attribute: LEFT_BRACKET LEFT_BRACKET attribute_list RIGHT_BRACKET RIGHT_BRACKET */ +#line 4146 "MachineIndependent/glslang.y" { (yyval.interm.attributes) = (yyvsp[-2].interm.attributes); } -#line 11727 "MachineIndependent/glslang_tab.cpp" - break; - - case 627: /* attribute_list: single_attribute */ -#line 4140 "MachineIndependent/glslang.y" - { - (yyval.interm.attributes) = (yyvsp[0].interm.attributes); - } -#line 11735 "MachineIndependent/glslang_tab.cpp" - break; - - case 628: /* attribute_list: attribute_list COMMA single_attribute */ -#line 4143 "MachineIndependent/glslang.y" - { - (yyval.interm.attributes) = parseContext.mergeAttributes((yyvsp[-2].interm.attributes), (yyvsp[0].interm.attributes)); - } -#line 11743 "MachineIndependent/glslang_tab.cpp" - break; - - case 629: /* single_attribute: IDENTIFIER */ -#line 4148 "MachineIndependent/glslang.y" - { - (yyval.interm.attributes) = parseContext.makeAttributes(*(yyvsp[0].lex).string); - } -#line 11751 "MachineIndependent/glslang_tab.cpp" - break; - - case 630: /* single_attribute: IDENTIFIER LEFT_PAREN constant_expression RIGHT_PAREN */ -#line 4151 "MachineIndependent/glslang.y" - { - (yyval.interm.attributes) = parseContext.makeAttributes(*(yyvsp[-3].lex).string, (yyvsp[-1].interm.intermTypedNode)); - } -#line 11759 "MachineIndependent/glslang_tab.cpp" - break; - - case 631: /* spirv_requirements_list: spirv_requirements_parameter */ -#line 4158 "MachineIndependent/glslang.y" - { - (yyval.interm.spirvReq) = (yyvsp[0].interm.spirvReq); - } -#line 11767 "MachineIndependent/glslang_tab.cpp" - break; - - case 632: /* spirv_requirements_list: spirv_requirements_list COMMA spirv_requirements_parameter */ -#line 4161 "MachineIndependent/glslang.y" - { - (yyval.interm.spirvReq) = parseContext.mergeSpirvRequirements((yyvsp[-1].lex).loc, (yyvsp[-2].interm.spirvReq), (yyvsp[0].interm.spirvReq)); - } -#line 11775 "MachineIndependent/glslang_tab.cpp" - break; - - case 633: /* spirv_requirements_parameter: IDENTIFIER EQUAL LEFT_BRACKET spirv_extension_list RIGHT_BRACKET */ -#line 4166 "MachineIndependent/glslang.y" - { - (yyval.interm.spirvReq) = parseContext.makeSpirvRequirement((yyvsp[-3].lex).loc, *(yyvsp[-4].lex).string, (yyvsp[-1].interm.intermNode)->getAsAggregate(), nullptr); - } -#line 11783 "MachineIndependent/glslang_tab.cpp" - break; - - case 634: /* spirv_requirements_parameter: IDENTIFIER EQUAL LEFT_BRACKET spirv_capability_list RIGHT_BRACKET */ -#line 4169 "MachineIndependent/glslang.y" - { - (yyval.interm.spirvReq) = parseContext.makeSpirvRequirement((yyvsp[-3].lex).loc, *(yyvsp[-4].lex).string, nullptr, (yyvsp[-1].interm.intermNode)->getAsAggregate()); - } -#line 11791 "MachineIndependent/glslang_tab.cpp" - break; - - case 635: /* spirv_extension_list: STRING_LITERAL */ -#line 4174 "MachineIndependent/glslang.y" - { - (yyval.interm.intermNode) = parseContext.intermediate.makeAggregate(parseContext.intermediate.addConstantUnion((yyvsp[0].lex).string, (yyvsp[0].lex).loc, true)); - } -#line 11799 "MachineIndependent/glslang_tab.cpp" - break; - - case 636: /* spirv_extension_list: spirv_extension_list COMMA STRING_LITERAL */ -#line 4177 "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 11807 "MachineIndependent/glslang_tab.cpp" - break; - - case 637: /* spirv_capability_list: INTCONSTANT */ -#line 4182 "MachineIndependent/glslang.y" - { - (yyval.interm.intermNode) = parseContext.intermediate.makeAggregate(parseContext.intermediate.addConstantUnion((yyvsp[0].lex).i, (yyvsp[0].lex).loc, true)); - } -#line 11815 "MachineIndependent/glslang_tab.cpp" - break; - - case 638: /* spirv_capability_list: spirv_capability_list COMMA INTCONSTANT */ -#line 4185 "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 11823 "MachineIndependent/glslang_tab.cpp" - break; - - case 639: /* spirv_execution_mode_qualifier: SPIRV_EXECUTION_MODE LEFT_PAREN INTCONSTANT RIGHT_PAREN */ -#line 4190 "MachineIndependent/glslang.y" - { - parseContext.intermediate.insertSpirvExecutionMode((yyvsp[-1].lex).i); - (yyval.interm.intermNode) = nullptr; - } -#line 11832 "MachineIndependent/glslang_tab.cpp" - break; - - case 640: /* spirv_execution_mode_qualifier: SPIRV_EXECUTION_MODE LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT RIGHT_PAREN */ -#line 4194 "MachineIndependent/glslang.y" - { - parseContext.intermediate.insertSpirvRequirement((yyvsp[-3].interm.spirvReq)); - parseContext.intermediate.insertSpirvExecutionMode((yyvsp[-1].lex).i); - (yyval.interm.intermNode) = nullptr; - } -#line 11842 "MachineIndependent/glslang_tab.cpp" - break; - - case 641: /* spirv_execution_mode_qualifier: SPIRV_EXECUTION_MODE LEFT_PAREN INTCONSTANT COMMA spirv_execution_mode_parameter_list RIGHT_PAREN */ -#line 4199 "MachineIndependent/glslang.y" - { - parseContext.intermediate.insertSpirvExecutionMode((yyvsp[-3].lex).i, (yyvsp[-1].interm.intermNode)->getAsAggregate()); - (yyval.interm.intermNode) = nullptr; - } -#line 11851 "MachineIndependent/glslang_tab.cpp" - break; - - case 642: /* spirv_execution_mode_qualifier: SPIRV_EXECUTION_MODE LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT COMMA spirv_execution_mode_parameter_list RIGHT_PAREN */ -#line 4203 "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) = nullptr; - } -#line 11861 "MachineIndependent/glslang_tab.cpp" - break; - - case 643: /* spirv_execution_mode_qualifier: SPIRV_EXECUTION_MODE_ID LEFT_PAREN INTCONSTANT COMMA spirv_execution_mode_id_parameter_list RIGHT_PAREN */ -#line 4208 "MachineIndependent/glslang.y" - { - parseContext.intermediate.insertSpirvExecutionModeId((yyvsp[-3].lex).i, (yyvsp[-1].interm.intermNode)->getAsAggregate()); - (yyval.interm.intermNode) = nullptr; - } #line 11870 "MachineIndependent/glslang_tab.cpp" break; - case 644: /* spirv_execution_mode_qualifier: SPIRV_EXECUTION_MODE_ID LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT COMMA spirv_execution_mode_id_parameter_list RIGHT_PAREN */ + case 635: /* attribute_list: single_attribute */ +#line 4151 "MachineIndependent/glslang.y" + { + (yyval.interm.attributes) = (yyvsp[0].interm.attributes); + } +#line 11878 "MachineIndependent/glslang_tab.cpp" + break; + + case 636: /* attribute_list: attribute_list COMMA single_attribute */ +#line 4154 "MachineIndependent/glslang.y" + { + (yyval.interm.attributes) = parseContext.mergeAttributes((yyvsp[-2].interm.attributes), (yyvsp[0].interm.attributes)); + } +#line 11886 "MachineIndependent/glslang_tab.cpp" + break; + + case 637: /* single_attribute: IDENTIFIER */ +#line 4159 "MachineIndependent/glslang.y" + { + (yyval.interm.attributes) = parseContext.makeAttributes(*(yyvsp[0].lex).string); + } +#line 11894 "MachineIndependent/glslang_tab.cpp" + break; + + case 638: /* single_attribute: IDENTIFIER LEFT_PAREN constant_expression RIGHT_PAREN */ +#line 4162 "MachineIndependent/glslang.y" + { + (yyval.interm.attributes) = parseContext.makeAttributes(*(yyvsp[-3].lex).string, (yyvsp[-1].interm.intermTypedNode)); + } +#line 11902 "MachineIndependent/glslang_tab.cpp" + break; + + case 639: /* spirv_requirements_list: spirv_requirements_parameter */ +#line 4167 "MachineIndependent/glslang.y" + { + (yyval.interm.spirvReq) = (yyvsp[0].interm.spirvReq); + } +#line 11910 "MachineIndependent/glslang_tab.cpp" + break; + + case 640: /* spirv_requirements_list: spirv_requirements_list COMMA spirv_requirements_parameter */ +#line 4170 "MachineIndependent/glslang.y" + { + (yyval.interm.spirvReq) = parseContext.mergeSpirvRequirements((yyvsp[-1].lex).loc, (yyvsp[-2].interm.spirvReq), (yyvsp[0].interm.spirvReq)); + } +#line 11918 "MachineIndependent/glslang_tab.cpp" + break; + + case 641: /* spirv_requirements_parameter: IDENTIFIER EQUAL LEFT_BRACKET spirv_extension_list RIGHT_BRACKET */ +#line 4175 "MachineIndependent/glslang.y" + { + (yyval.interm.spirvReq) = parseContext.makeSpirvRequirement((yyvsp[-3].lex).loc, *(yyvsp[-4].lex).string, (yyvsp[-1].interm.intermNode)->getAsAggregate(), nullptr); + } +#line 11926 "MachineIndependent/glslang_tab.cpp" + break; + + case 642: /* spirv_requirements_parameter: IDENTIFIER EQUAL LEFT_BRACKET spirv_capability_list RIGHT_BRACKET */ +#line 4178 "MachineIndependent/glslang.y" + { + (yyval.interm.spirvReq) = parseContext.makeSpirvRequirement((yyvsp[-3].lex).loc, *(yyvsp[-4].lex).string, nullptr, (yyvsp[-1].interm.intermNode)->getAsAggregate()); + } +#line 11934 "MachineIndependent/glslang_tab.cpp" + break; + + case 643: /* spirv_extension_list: STRING_LITERAL */ +#line 4183 "MachineIndependent/glslang.y" + { + (yyval.interm.intermNode) = parseContext.intermediate.makeAggregate(parseContext.intermediate.addConstantUnion((yyvsp[0].lex).string, (yyvsp[0].lex).loc, true)); + } +#line 11942 "MachineIndependent/glslang_tab.cpp" + break; + + case 644: /* spirv_extension_list: spirv_extension_list COMMA STRING_LITERAL */ +#line 4186 "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 11950 "MachineIndependent/glslang_tab.cpp" + break; + + case 645: /* spirv_capability_list: INTCONSTANT */ +#line 4191 "MachineIndependent/glslang.y" + { + (yyval.interm.intermNode) = parseContext.intermediate.makeAggregate(parseContext.intermediate.addConstantUnion((yyvsp[0].lex).i, (yyvsp[0].lex).loc, true)); + } +#line 11958 "MachineIndependent/glslang_tab.cpp" + break; + + case 646: /* spirv_capability_list: spirv_capability_list COMMA INTCONSTANT */ +#line 4194 "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 11966 "MachineIndependent/glslang_tab.cpp" + break; + + case 647: /* spirv_execution_mode_qualifier: SPIRV_EXECUTION_MODE LEFT_PAREN INTCONSTANT RIGHT_PAREN */ +#line 4199 "MachineIndependent/glslang.y" + { + parseContext.intermediate.insertSpirvExecutionMode((yyvsp[-1].lex).i); + (yyval.interm.intermNode) = 0; + } +#line 11975 "MachineIndependent/glslang_tab.cpp" + break; + + case 648: /* spirv_execution_mode_qualifier: SPIRV_EXECUTION_MODE LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT RIGHT_PAREN */ +#line 4203 "MachineIndependent/glslang.y" + { + parseContext.intermediate.insertSpirvRequirement((yyvsp[-3].interm.spirvReq)); + parseContext.intermediate.insertSpirvExecutionMode((yyvsp[-1].lex).i); + (yyval.interm.intermNode) = 0; + } +#line 11985 "MachineIndependent/glslang_tab.cpp" + break; + + case 649: /* spirv_execution_mode_qualifier: SPIRV_EXECUTION_MODE LEFT_PAREN INTCONSTANT COMMA spirv_execution_mode_parameter_list RIGHT_PAREN */ +#line 4208 "MachineIndependent/glslang.y" + { + parseContext.intermediate.insertSpirvExecutionMode((yyvsp[-3].lex).i, (yyvsp[-1].interm.intermNode)->getAsAggregate()); + (yyval.interm.intermNode) = 0; + } +#line 11994 "MachineIndependent/glslang_tab.cpp" + break; + + case 650: /* spirv_execution_mode_qualifier: SPIRV_EXECUTION_MODE LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT COMMA spirv_execution_mode_parameter_list RIGHT_PAREN */ #line 4212 "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 12004 "MachineIndependent/glslang_tab.cpp" + break; + + case 651: /* spirv_execution_mode_qualifier: SPIRV_EXECUTION_MODE_ID LEFT_PAREN INTCONSTANT COMMA spirv_execution_mode_id_parameter_list RIGHT_PAREN */ +#line 4217 "MachineIndependent/glslang.y" + { + parseContext.intermediate.insertSpirvExecutionModeId((yyvsp[-3].lex).i, (yyvsp[-1].interm.intermNode)->getAsAggregate()); + (yyval.interm.intermNode) = 0; + } +#line 12013 "MachineIndependent/glslang_tab.cpp" + break; + + case 652: /* spirv_execution_mode_qualifier: SPIRV_EXECUTION_MODE_ID LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT COMMA spirv_execution_mode_id_parameter_list RIGHT_PAREN */ +#line 4221 "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) = nullptr; + (yyval.interm.intermNode) = 0; } -#line 11880 "MachineIndependent/glslang_tab.cpp" +#line 12023 "MachineIndependent/glslang_tab.cpp" break; - case 645: /* spirv_execution_mode_parameter_list: spirv_execution_mode_parameter */ -#line 4219 "MachineIndependent/glslang.y" + case 653: /* spirv_execution_mode_parameter_list: spirv_execution_mode_parameter */ +#line 4228 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = parseContext.intermediate.makeAggregate((yyvsp[0].interm.intermNode)); } -#line 11888 "MachineIndependent/glslang_tab.cpp" +#line 12031 "MachineIndependent/glslang_tab.cpp" break; - case 646: /* spirv_execution_mode_parameter_list: spirv_execution_mode_parameter_list COMMA spirv_execution_mode_parameter */ -#line 4222 "MachineIndependent/glslang.y" + case 654: /* spirv_execution_mode_parameter_list: spirv_execution_mode_parameter_list COMMA spirv_execution_mode_parameter */ +#line 4231 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = parseContext.intermediate.growAggregate((yyvsp[-2].interm.intermNode), (yyvsp[0].interm.intermNode)); } -#line 11896 "MachineIndependent/glslang_tab.cpp" +#line 12039 "MachineIndependent/glslang_tab.cpp" break; - case 647: /* spirv_execution_mode_parameter: FLOATCONSTANT */ -#line 4227 "MachineIndependent/glslang.y" + case 655: /* spirv_execution_mode_parameter: FLOATCONSTANT */ +#line 4236 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).d, EbtFloat, (yyvsp[0].lex).loc, true); } -#line 11904 "MachineIndependent/glslang_tab.cpp" +#line 12047 "MachineIndependent/glslang_tab.cpp" break; - case 648: /* spirv_execution_mode_parameter: INTCONSTANT */ -#line 4230 "MachineIndependent/glslang.y" + case 656: /* spirv_execution_mode_parameter: INTCONSTANT */ +#line 4239 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).i, (yyvsp[0].lex).loc, true); } -#line 11912 "MachineIndependent/glslang_tab.cpp" +#line 12055 "MachineIndependent/glslang_tab.cpp" break; - case 649: /* spirv_execution_mode_parameter: UINTCONSTANT */ -#line 4233 "MachineIndependent/glslang.y" + case 657: /* spirv_execution_mode_parameter: UINTCONSTANT */ +#line 4242 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).u, (yyvsp[0].lex).loc, true); } -#line 11920 "MachineIndependent/glslang_tab.cpp" +#line 12063 "MachineIndependent/glslang_tab.cpp" break; - case 650: /* spirv_execution_mode_parameter: BOOLCONSTANT */ -#line 4236 "MachineIndependent/glslang.y" + case 658: /* spirv_execution_mode_parameter: BOOLCONSTANT */ +#line 4245 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).b, (yyvsp[0].lex).loc, true); } -#line 11928 "MachineIndependent/glslang_tab.cpp" +#line 12071 "MachineIndependent/glslang_tab.cpp" break; - case 651: /* spirv_execution_mode_parameter: STRING_LITERAL */ -#line 4239 "MachineIndependent/glslang.y" + case 659: /* spirv_execution_mode_parameter: STRING_LITERAL */ +#line 4248 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).string, (yyvsp[0].lex).loc, true); } -#line 11936 "MachineIndependent/glslang_tab.cpp" +#line 12079 "MachineIndependent/glslang_tab.cpp" break; - case 652: /* spirv_execution_mode_id_parameter_list: constant_expression */ -#line 4244 "MachineIndependent/glslang.y" + case 660: /* spirv_execution_mode_id_parameter_list: constant_expression */ +#line 4253 "MachineIndependent/glslang.y" { if ((yyvsp[0].interm.intermTypedNode)->getBasicType() != EbtFloat && (yyvsp[0].interm.intermTypedNode)->getBasicType() != EbtInt && @@ -11946,11 +12089,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 11950 "MachineIndependent/glslang_tab.cpp" +#line 12093 "MachineIndependent/glslang_tab.cpp" break; - case 653: /* spirv_execution_mode_id_parameter_list: spirv_execution_mode_id_parameter_list COMMA constant_expression */ -#line 4253 "MachineIndependent/glslang.y" + case 661: /* spirv_execution_mode_id_parameter_list: spirv_execution_mode_id_parameter_list COMMA constant_expression */ +#line 4262 "MachineIndependent/glslang.y" { if ((yyvsp[0].interm.intermTypedNode)->getBasicType() != EbtFloat && (yyvsp[0].interm.intermTypedNode)->getBasicType() != EbtInt && @@ -11960,310 +12103,351 @@ yyreduce: parseContext.error((yyvsp[0].interm.intermTypedNode)->getLoc(), "this type not allowed", (yyvsp[0].interm.intermTypedNode)->getType().getBasicString(), ""); (yyval.interm.intermNode) = parseContext.intermediate.growAggregate((yyvsp[-2].interm.intermNode), (yyvsp[0].interm.intermTypedNode)); } -#line 11964 "MachineIndependent/glslang_tab.cpp" +#line 12107 "MachineIndependent/glslang_tab.cpp" break; - case 654: /* spirv_storage_class_qualifier: SPIRV_STORAGE_CLASS LEFT_PAREN INTCONSTANT RIGHT_PAREN */ -#line 4264 "MachineIndependent/glslang.y" + case 662: /* spirv_storage_class_qualifier: SPIRV_STORAGE_CLASS LEFT_PAREN INTCONSTANT RIGHT_PAREN */ +#line 4273 "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 11974 "MachineIndependent/glslang_tab.cpp" +#line 12117 "MachineIndependent/glslang_tab.cpp" break; - case 655: /* spirv_storage_class_qualifier: SPIRV_STORAGE_CLASS LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT RIGHT_PAREN */ -#line 4269 "MachineIndependent/glslang.y" + case 663: /* spirv_storage_class_qualifier: SPIRV_STORAGE_CLASS LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT RIGHT_PAREN */ +#line 4278 "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 11985 "MachineIndependent/glslang_tab.cpp" +#line 12128 "MachineIndependent/glslang_tab.cpp" break; - case 656: /* spirv_decorate_qualifier: SPIRV_DECORATE LEFT_PAREN INTCONSTANT RIGHT_PAREN */ -#line 4277 "MachineIndependent/glslang.y" + case 664: /* spirv_decorate_qualifier: SPIRV_DECORATE LEFT_PAREN INTCONSTANT RIGHT_PAREN */ +#line 4286 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[-3].lex).loc); (yyval.interm.type).qualifier.setSpirvDecorate((yyvsp[-1].lex).i); } -#line 11994 "MachineIndependent/glslang_tab.cpp" +#line 12137 "MachineIndependent/glslang_tab.cpp" break; - case 657: /* spirv_decorate_qualifier: SPIRV_DECORATE LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT RIGHT_PAREN */ -#line 4281 "MachineIndependent/glslang.y" + case 665: /* spirv_decorate_qualifier: SPIRV_DECORATE LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT RIGHT_PAREN */ +#line 4290 "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 12004 "MachineIndependent/glslang_tab.cpp" +#line 12147 "MachineIndependent/glslang_tab.cpp" break; - case 658: /* spirv_decorate_qualifier: SPIRV_DECORATE LEFT_PAREN INTCONSTANT COMMA spirv_decorate_parameter_list RIGHT_PAREN */ -#line 4286 "MachineIndependent/glslang.y" + case 666: /* spirv_decorate_qualifier: SPIRV_DECORATE LEFT_PAREN INTCONSTANT COMMA spirv_decorate_parameter_list RIGHT_PAREN */ +#line 4295 "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 12013 "MachineIndependent/glslang_tab.cpp" +#line 12156 "MachineIndependent/glslang_tab.cpp" break; - case 659: /* spirv_decorate_qualifier: SPIRV_DECORATE LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT COMMA spirv_decorate_parameter_list RIGHT_PAREN */ -#line 4290 "MachineIndependent/glslang.y" + case 667: /* spirv_decorate_qualifier: SPIRV_DECORATE LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT COMMA spirv_decorate_parameter_list RIGHT_PAREN */ +#line 4299 "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 12023 "MachineIndependent/glslang_tab.cpp" +#line 12166 "MachineIndependent/glslang_tab.cpp" break; - case 660: /* spirv_decorate_qualifier: SPIRV_DECORATE_ID LEFT_PAREN INTCONSTANT COMMA spirv_decorate_id_parameter_list RIGHT_PAREN */ -#line 4295 "MachineIndependent/glslang.y" + case 668: /* spirv_decorate_qualifier: SPIRV_DECORATE_ID LEFT_PAREN INTCONSTANT COMMA spirv_decorate_id_parameter_list RIGHT_PAREN */ +#line 4304 "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 12032 "MachineIndependent/glslang_tab.cpp" +#line 12175 "MachineIndependent/glslang_tab.cpp" break; - case 661: /* spirv_decorate_qualifier: SPIRV_DECORATE_ID LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT COMMA spirv_decorate_id_parameter_list RIGHT_PAREN */ -#line 4299 "MachineIndependent/glslang.y" + case 669: /* spirv_decorate_qualifier: SPIRV_DECORATE_ID LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT COMMA spirv_decorate_id_parameter_list RIGHT_PAREN */ +#line 4308 "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 12042 "MachineIndependent/glslang_tab.cpp" +#line 12185 "MachineIndependent/glslang_tab.cpp" break; - case 662: /* spirv_decorate_qualifier: SPIRV_DECORATE_STRING LEFT_PAREN INTCONSTANT COMMA spirv_decorate_string_parameter_list RIGHT_PAREN */ -#line 4304 "MachineIndependent/glslang.y" + case 670: /* spirv_decorate_qualifier: SPIRV_DECORATE_STRING LEFT_PAREN INTCONSTANT COMMA spirv_decorate_string_parameter_list RIGHT_PAREN */ +#line 4313 "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 12051 "MachineIndependent/glslang_tab.cpp" +#line 12194 "MachineIndependent/glslang_tab.cpp" break; - case 663: /* spirv_decorate_qualifier: SPIRV_DECORATE_STRING LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT COMMA spirv_decorate_string_parameter_list RIGHT_PAREN */ -#line 4308 "MachineIndependent/glslang.y" + case 671: /* spirv_decorate_qualifier: SPIRV_DECORATE_STRING LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT COMMA spirv_decorate_string_parameter_list RIGHT_PAREN */ +#line 4317 "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 12061 "MachineIndependent/glslang_tab.cpp" +#line 12204 "MachineIndependent/glslang_tab.cpp" break; - case 664: /* spirv_decorate_parameter_list: spirv_decorate_parameter */ -#line 4315 "MachineIndependent/glslang.y" + case 672: /* spirv_decorate_parameter_list: spirv_decorate_parameter */ +#line 4324 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = parseContext.intermediate.makeAggregate((yyvsp[0].interm.intermNode)); } -#line 12069 "MachineIndependent/glslang_tab.cpp" +#line 12212 "MachineIndependent/glslang_tab.cpp" break; - case 665: /* spirv_decorate_parameter_list: spirv_decorate_parameter_list COMMA spirv_decorate_parameter */ -#line 4318 "MachineIndependent/glslang.y" + case 673: /* spirv_decorate_parameter_list: spirv_decorate_parameter_list COMMA spirv_decorate_parameter */ +#line 4327 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = parseContext.intermediate.growAggregate((yyvsp[-2].interm.intermNode), (yyvsp[0].interm.intermNode)); } -#line 12077 "MachineIndependent/glslang_tab.cpp" +#line 12220 "MachineIndependent/glslang_tab.cpp" break; - case 666: /* spirv_decorate_parameter: FLOATCONSTANT */ -#line 4323 "MachineIndependent/glslang.y" + case 674: /* spirv_decorate_parameter: FLOATCONSTANT */ +#line 4332 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).d, EbtFloat, (yyvsp[0].lex).loc, true); } -#line 12085 "MachineIndependent/glslang_tab.cpp" +#line 12228 "MachineIndependent/glslang_tab.cpp" break; - case 667: /* spirv_decorate_parameter: INTCONSTANT */ -#line 4326 "MachineIndependent/glslang.y" + case 675: /* spirv_decorate_parameter: INTCONSTANT */ +#line 4335 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).i, (yyvsp[0].lex).loc, true); } -#line 12093 "MachineIndependent/glslang_tab.cpp" +#line 12236 "MachineIndependent/glslang_tab.cpp" break; - case 668: /* spirv_decorate_parameter: UINTCONSTANT */ -#line 4329 "MachineIndependent/glslang.y" + case 676: /* spirv_decorate_parameter: UINTCONSTANT */ +#line 4338 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).u, (yyvsp[0].lex).loc, true); } -#line 12101 "MachineIndependent/glslang_tab.cpp" +#line 12244 "MachineIndependent/glslang_tab.cpp" break; - case 669: /* spirv_decorate_parameter: BOOLCONSTANT */ -#line 4332 "MachineIndependent/glslang.y" + case 677: /* spirv_decorate_parameter: BOOLCONSTANT */ +#line 4341 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).b, (yyvsp[0].lex).loc, true); } -#line 12109 "MachineIndependent/glslang_tab.cpp" +#line 12252 "MachineIndependent/glslang_tab.cpp" break; - case 670: /* spirv_decorate_id_parameter_list: constant_expression */ -#line 4337 "MachineIndependent/glslang.y" + case 678: /* spirv_decorate_id_parameter_list: spirv_decorate_id_parameter */ +#line 4346 "MachineIndependent/glslang.y" + { + (yyval.interm.intermNode) = parseContext.intermediate.makeAggregate((yyvsp[0].interm.intermNode)); + } +#line 12260 "MachineIndependent/glslang_tab.cpp" + break; + + case 679: /* spirv_decorate_id_parameter_list: spirv_decorate_id_parameter_list COMMA spirv_decorate_id_parameter */ +#line 4349 "MachineIndependent/glslang.y" + { + (yyval.interm.intermNode) = parseContext.intermediate.growAggregate((yyvsp[-2].interm.intermNode), (yyvsp[0].interm.intermNode)); + } +#line 12268 "MachineIndependent/glslang_tab.cpp" + break; + + case 680: /* spirv_decorate_id_parameter: variable_identifier */ +#line 4354 "MachineIndependent/glslang.y" { - if ((yyvsp[0].interm.intermTypedNode)->getBasicType() != EbtFloat && - (yyvsp[0].interm.intermTypedNode)->getBasicType() != EbtInt && - (yyvsp[0].interm.intermTypedNode)->getBasicType() != EbtUint && - (yyvsp[0].interm.intermTypedNode)->getBasicType() != EbtBool) - 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)); + if ((yyvsp[0].interm.intermTypedNode)->getAsConstantUnion() || (yyvsp[0].interm.intermTypedNode)->getAsSymbolNode()) + (yyval.interm.intermNode) = (yyvsp[0].interm.intermTypedNode); + else + parseContext.error((yyvsp[0].interm.intermTypedNode)->getLoc(), "only allow constants or variables which are not elements of a composite", "", ""); } -#line 12122 "MachineIndependent/glslang_tab.cpp" +#line 12279 "MachineIndependent/glslang_tab.cpp" break; - case 671: /* spirv_decorate_id_parameter_list: spirv_decorate_id_parameter_list COMMA constant_expression */ -#line 4345 "MachineIndependent/glslang.y" - { - if ((yyvsp[0].interm.intermTypedNode)->getBasicType() != EbtFloat && - (yyvsp[0].interm.intermTypedNode)->getBasicType() != EbtInt && - (yyvsp[0].interm.intermTypedNode)->getBasicType() != EbtUint && - (yyvsp[0].interm.intermTypedNode)->getBasicType() != EbtBool) - 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)); + case 681: /* spirv_decorate_id_parameter: FLOATCONSTANT */ +#line 4360 "MachineIndependent/glslang.y" + { + (yyval.interm.intermNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).d, EbtFloat, (yyvsp[0].lex).loc, true); } -#line 12135 "MachineIndependent/glslang_tab.cpp" +#line 12287 "MachineIndependent/glslang_tab.cpp" break; - case 672: /* spirv_decorate_string_parameter_list: STRING_LITERAL */ -#line 4355 "MachineIndependent/glslang.y" + case 682: /* spirv_decorate_id_parameter: INTCONSTANT */ +#line 4363 "MachineIndependent/glslang.y" + { + (yyval.interm.intermNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).i, (yyvsp[0].lex).loc, true); + } +#line 12295 "MachineIndependent/glslang_tab.cpp" + break; + + case 683: /* spirv_decorate_id_parameter: UINTCONSTANT */ +#line 4366 "MachineIndependent/glslang.y" + { + (yyval.interm.intermNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).u, (yyvsp[0].lex).loc, true); + } +#line 12303 "MachineIndependent/glslang_tab.cpp" + break; + + case 684: /* spirv_decorate_id_parameter: BOOLCONSTANT */ +#line 4369 "MachineIndependent/glslang.y" + { + (yyval.interm.intermNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).b, (yyvsp[0].lex).loc, true); + } +#line 12311 "MachineIndependent/glslang_tab.cpp" + break; + + case 685: /* spirv_decorate_string_parameter_list: STRING_LITERAL */ +#line 4374 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = parseContext.intermediate.makeAggregate( parseContext.intermediate.addConstantUnion((yyvsp[0].lex).string, (yyvsp[0].lex).loc, true)); } -#line 12144 "MachineIndependent/glslang_tab.cpp" +#line 12320 "MachineIndependent/glslang_tab.cpp" break; - case 673: /* spirv_decorate_string_parameter_list: spirv_decorate_string_parameter_list COMMA STRING_LITERAL */ -#line 4359 "MachineIndependent/glslang.y" + case 686: /* spirv_decorate_string_parameter_list: spirv_decorate_string_parameter_list COMMA STRING_LITERAL */ +#line 4378 "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 12152 "MachineIndependent/glslang_tab.cpp" +#line 12328 "MachineIndependent/glslang_tab.cpp" break; - case 674: /* spirv_type_specifier: SPIRV_TYPE LEFT_PAREN spirv_instruction_qualifier_list COMMA spirv_type_parameter_list RIGHT_PAREN */ -#line 4364 "MachineIndependent/glslang.y" + case 687: /* spirv_type_specifier: SPIRV_TYPE LEFT_PAREN spirv_instruction_qualifier_list COMMA spirv_type_parameter_list RIGHT_PAREN */ +#line 4383 "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 12161 "MachineIndependent/glslang_tab.cpp" +#line 12337 "MachineIndependent/glslang_tab.cpp" break; - case 675: /* spirv_type_specifier: SPIRV_TYPE LEFT_PAREN spirv_requirements_list COMMA spirv_instruction_qualifier_list COMMA spirv_type_parameter_list RIGHT_PAREN */ -#line 4368 "MachineIndependent/glslang.y" + case 688: /* spirv_type_specifier: SPIRV_TYPE LEFT_PAREN spirv_requirements_list COMMA spirv_instruction_qualifier_list COMMA spirv_type_parameter_list RIGHT_PAREN */ +#line 4387 "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 12171 "MachineIndependent/glslang_tab.cpp" +#line 12347 "MachineIndependent/glslang_tab.cpp" break; - case 676: /* spirv_type_specifier: SPIRV_TYPE LEFT_PAREN spirv_instruction_qualifier_list RIGHT_PAREN */ -#line 4373 "MachineIndependent/glslang.y" + case 689: /* spirv_type_specifier: SPIRV_TYPE LEFT_PAREN spirv_instruction_qualifier_list RIGHT_PAREN */ +#line 4392 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[-3].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).setSpirvType(*(yyvsp[-1].interm.spirvInst)); } -#line 12180 "MachineIndependent/glslang_tab.cpp" +#line 12356 "MachineIndependent/glslang_tab.cpp" break; - case 677: /* spirv_type_specifier: SPIRV_TYPE LEFT_PAREN spirv_requirements_list COMMA spirv_instruction_qualifier_list RIGHT_PAREN */ -#line 4377 "MachineIndependent/glslang.y" + case 690: /* spirv_type_specifier: SPIRV_TYPE LEFT_PAREN spirv_requirements_list COMMA spirv_instruction_qualifier_list RIGHT_PAREN */ +#line 4396 "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 12190 "MachineIndependent/glslang_tab.cpp" +#line 12366 "MachineIndependent/glslang_tab.cpp" break; - case 678: /* spirv_type_parameter_list: spirv_type_parameter */ -#line 4384 "MachineIndependent/glslang.y" + case 691: /* spirv_type_parameter_list: spirv_type_parameter */ +#line 4403 "MachineIndependent/glslang.y" { (yyval.interm.spirvTypeParams) = (yyvsp[0].interm.spirvTypeParams); } -#line 12198 "MachineIndependent/glslang_tab.cpp" +#line 12374 "MachineIndependent/glslang_tab.cpp" break; - case 679: /* spirv_type_parameter_list: spirv_type_parameter_list COMMA spirv_type_parameter */ -#line 4387 "MachineIndependent/glslang.y" + case 692: /* spirv_type_parameter_list: spirv_type_parameter_list COMMA spirv_type_parameter */ +#line 4406 "MachineIndependent/glslang.y" { (yyval.interm.spirvTypeParams) = parseContext.mergeSpirvTypeParameters((yyvsp[-2].interm.spirvTypeParams), (yyvsp[0].interm.spirvTypeParams)); } -#line 12206 "MachineIndependent/glslang_tab.cpp" +#line 12382 "MachineIndependent/glslang_tab.cpp" break; - case 680: /* spirv_type_parameter: constant_expression */ -#line 4392 "MachineIndependent/glslang.y" + case 693: /* spirv_type_parameter: constant_expression */ +#line 4411 "MachineIndependent/glslang.y" { (yyval.interm.spirvTypeParams) = parseContext.makeSpirvTypeParameters((yyvsp[0].interm.intermTypedNode)->getLoc(), (yyvsp[0].interm.intermTypedNode)->getAsConstantUnion()); } -#line 12214 "MachineIndependent/glslang_tab.cpp" +#line 12390 "MachineIndependent/glslang_tab.cpp" break; - case 681: /* spirv_instruction_qualifier: SPIRV_INSTRUCTION LEFT_PAREN spirv_instruction_qualifier_list RIGHT_PAREN */ -#line 4397 "MachineIndependent/glslang.y" + case 694: /* spirv_type_parameter: type_specifier_nonarray */ +#line 4414 "MachineIndependent/glslang.y" + { + (yyval.interm.spirvTypeParams) = parseContext.makeSpirvTypeParameters((yyvsp[0].interm.type).loc, (yyvsp[0].interm.type)); + } +#line 12398 "MachineIndependent/glslang_tab.cpp" + break; + + case 695: /* spirv_instruction_qualifier: SPIRV_INSTRUCTION LEFT_PAREN spirv_instruction_qualifier_list RIGHT_PAREN */ +#line 4419 "MachineIndependent/glslang.y" { (yyval.interm.spirvInst) = (yyvsp[-1].interm.spirvInst); } -#line 12222 "MachineIndependent/glslang_tab.cpp" +#line 12406 "MachineIndependent/glslang_tab.cpp" break; - case 682: /* spirv_instruction_qualifier: SPIRV_INSTRUCTION LEFT_PAREN spirv_requirements_list COMMA spirv_instruction_qualifier_list RIGHT_PAREN */ -#line 4400 "MachineIndependent/glslang.y" + case 696: /* spirv_instruction_qualifier: SPIRV_INSTRUCTION LEFT_PAREN spirv_requirements_list COMMA spirv_instruction_qualifier_list RIGHT_PAREN */ +#line 4422 "MachineIndependent/glslang.y" { parseContext.intermediate.insertSpirvRequirement((yyvsp[-3].interm.spirvReq)); (yyval.interm.spirvInst) = (yyvsp[-1].interm.spirvInst); } -#line 12231 "MachineIndependent/glslang_tab.cpp" +#line 12415 "MachineIndependent/glslang_tab.cpp" break; - case 683: /* spirv_instruction_qualifier_list: spirv_instruction_qualifier_id */ -#line 4406 "MachineIndependent/glslang.y" + case 697: /* spirv_instruction_qualifier_list: spirv_instruction_qualifier_id */ +#line 4428 "MachineIndependent/glslang.y" { (yyval.interm.spirvInst) = (yyvsp[0].interm.spirvInst); } -#line 12239 "MachineIndependent/glslang_tab.cpp" +#line 12423 "MachineIndependent/glslang_tab.cpp" break; - case 684: /* spirv_instruction_qualifier_list: spirv_instruction_qualifier_list COMMA spirv_instruction_qualifier_id */ -#line 4409 "MachineIndependent/glslang.y" + case 698: /* spirv_instruction_qualifier_list: spirv_instruction_qualifier_list COMMA spirv_instruction_qualifier_id */ +#line 4431 "MachineIndependent/glslang.y" { (yyval.interm.spirvInst) = parseContext.mergeSpirvInstruction((yyvsp[-1].lex).loc, (yyvsp[-2].interm.spirvInst), (yyvsp[0].interm.spirvInst)); } -#line 12247 "MachineIndependent/glslang_tab.cpp" +#line 12431 "MachineIndependent/glslang_tab.cpp" break; - case 685: /* spirv_instruction_qualifier_id: IDENTIFIER EQUAL STRING_LITERAL */ -#line 4414 "MachineIndependent/glslang.y" + case 699: /* spirv_instruction_qualifier_id: IDENTIFIER EQUAL STRING_LITERAL */ +#line 4436 "MachineIndependent/glslang.y" { (yyval.interm.spirvInst) = parseContext.makeSpirvInstruction((yyvsp[-1].lex).loc, *(yyvsp[-2].lex).string, *(yyvsp[0].lex).string); } -#line 12255 "MachineIndependent/glslang_tab.cpp" +#line 12439 "MachineIndependent/glslang_tab.cpp" break; - case 686: /* spirv_instruction_qualifier_id: IDENTIFIER EQUAL INTCONSTANT */ -#line 4417 "MachineIndependent/glslang.y" + case 700: /* spirv_instruction_qualifier_id: IDENTIFIER EQUAL INTCONSTANT */ +#line 4439 "MachineIndependent/glslang.y" { (yyval.interm.spirvInst) = parseContext.makeSpirvInstruction((yyvsp[-1].lex).loc, *(yyvsp[-2].lex).string, (yyvsp[0].lex).i); } -#line 12263 "MachineIndependent/glslang_tab.cpp" +#line 12447 "MachineIndependent/glslang_tab.cpp" break; -#line 12267 "MachineIndependent/glslang_tab.cpp" +#line 12451 "MachineIndependent/glslang_tab.cpp" default: break; } @@ -12339,7 +12523,7 @@ yyerrlab: } yyerror (pParseContext, yymsgp); if (yysyntax_error_status == YYENOMEM) - goto yyexhaustedlab; + YYNOMEM; } } @@ -12375,6 +12559,7 @@ yyerrorlab: label yyerrorlab therefore never appears in user code. */ if (0) YYERROR; + ++yynerrs; /* Do not reclaim the symbols of the rule whose action triggered this YYERROR. */ @@ -12435,7 +12620,7 @@ yyerrlab1: `-------------------------------------*/ yyacceptlab: yyresult = 0; - goto yyreturn; + goto yyreturnlab; /*-----------------------------------. @@ -12443,24 +12628,22 @@ yyacceptlab: `-----------------------------------*/ yyabortlab: yyresult = 1; - goto yyreturn; + goto yyreturnlab; -#if 1 -/*-------------------------------------------------. -| yyexhaustedlab -- memory exhaustion comes here. | -`-------------------------------------------------*/ +/*-----------------------------------------------------------. +| yyexhaustedlab -- YYNOMEM (memory exhaustion) comes here. | +`-----------------------------------------------------------*/ yyexhaustedlab: yyerror (pParseContext, YY_("memory exhausted")); yyresult = 2; - goto yyreturn; -#endif + goto yyreturnlab; -/*-------------------------------------------------------. -| yyreturn -- parsing is finished, clean up and return. | -`-------------------------------------------------------*/ -yyreturn: +/*----------------------------------------------------------. +| yyreturnlab -- parsing is finished, clean up and return. | +`----------------------------------------------------------*/ +yyreturnlab: if (yychar != YYEMPTY) { /* Make sure we have latest lookahead translation. See comments at @@ -12488,5 +12671,5 @@ yyreturn: return yyresult; } -#line 4422 "MachineIndependent/glslang.y" +#line 4443 "MachineIndependent/glslang.y" diff --git a/glslang/MachineIndependent/glslang_tab.cpp.h b/glslang/MachineIndependent/glslang_tab.cpp.h index 18cef468..d6484924 100755 --- a/glslang/MachineIndependent/glslang_tab.cpp.h +++ b/glslang/MachineIndependent/glslang_tab.cpp.h @@ -1,8 +1,8 @@ -/* A Bison parser, made by GNU Bison 3.7.4. */ +/* A Bison parser, made by GNU Bison 3.8.2. */ /* Bison interface for Yacc-like parsers in C - Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2020 Free Software Foundation, + Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify @@ -16,7 +16,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program. If not, see . */ + along with this program. If not, see . */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work @@ -217,298 +217,305 @@ extern int yydebug; FCOOPMATNV = 418, /* FCOOPMATNV */ ICOOPMATNV = 419, /* ICOOPMATNV */ UCOOPMATNV = 420, /* UCOOPMATNV */ - SAMPLERCUBEARRAY = 421, /* SAMPLERCUBEARRAY */ - SAMPLERCUBEARRAYSHADOW = 422, /* SAMPLERCUBEARRAYSHADOW */ - ISAMPLERCUBEARRAY = 423, /* ISAMPLERCUBEARRAY */ - USAMPLERCUBEARRAY = 424, /* USAMPLERCUBEARRAY */ - SAMPLER1D = 425, /* SAMPLER1D */ - SAMPLER1DARRAY = 426, /* SAMPLER1DARRAY */ - SAMPLER1DARRAYSHADOW = 427, /* SAMPLER1DARRAYSHADOW */ - ISAMPLER1D = 428, /* ISAMPLER1D */ - SAMPLER1DSHADOW = 429, /* SAMPLER1DSHADOW */ - SAMPLER2DRECT = 430, /* SAMPLER2DRECT */ - SAMPLER2DRECTSHADOW = 431, /* SAMPLER2DRECTSHADOW */ - ISAMPLER2DRECT = 432, /* ISAMPLER2DRECT */ - USAMPLER2DRECT = 433, /* USAMPLER2DRECT */ - SAMPLERBUFFER = 434, /* SAMPLERBUFFER */ - ISAMPLERBUFFER = 435, /* ISAMPLERBUFFER */ - USAMPLERBUFFER = 436, /* USAMPLERBUFFER */ - SAMPLER2DMS = 437, /* SAMPLER2DMS */ - ISAMPLER2DMS = 438, /* ISAMPLER2DMS */ - USAMPLER2DMS = 439, /* USAMPLER2DMS */ - SAMPLER2DMSARRAY = 440, /* SAMPLER2DMSARRAY */ - ISAMPLER2DMSARRAY = 441, /* ISAMPLER2DMSARRAY */ - USAMPLER2DMSARRAY = 442, /* USAMPLER2DMSARRAY */ - SAMPLEREXTERNALOES = 443, /* SAMPLEREXTERNALOES */ - SAMPLEREXTERNAL2DY2YEXT = 444, /* SAMPLEREXTERNAL2DY2YEXT */ - ISAMPLER1DARRAY = 445, /* ISAMPLER1DARRAY */ - USAMPLER1D = 446, /* USAMPLER1D */ - USAMPLER1DARRAY = 447, /* USAMPLER1DARRAY */ - F16SAMPLER1D = 448, /* F16SAMPLER1D */ - F16SAMPLER2D = 449, /* F16SAMPLER2D */ - F16SAMPLER3D = 450, /* F16SAMPLER3D */ - F16SAMPLER2DRECT = 451, /* F16SAMPLER2DRECT */ - F16SAMPLERCUBE = 452, /* F16SAMPLERCUBE */ - F16SAMPLER1DARRAY = 453, /* F16SAMPLER1DARRAY */ - F16SAMPLER2DARRAY = 454, /* F16SAMPLER2DARRAY */ - F16SAMPLERCUBEARRAY = 455, /* F16SAMPLERCUBEARRAY */ - F16SAMPLERBUFFER = 456, /* F16SAMPLERBUFFER */ - F16SAMPLER2DMS = 457, /* F16SAMPLER2DMS */ - F16SAMPLER2DMSARRAY = 458, /* F16SAMPLER2DMSARRAY */ - F16SAMPLER1DSHADOW = 459, /* F16SAMPLER1DSHADOW */ - F16SAMPLER2DSHADOW = 460, /* F16SAMPLER2DSHADOW */ - F16SAMPLER1DARRAYSHADOW = 461, /* F16SAMPLER1DARRAYSHADOW */ - F16SAMPLER2DARRAYSHADOW = 462, /* F16SAMPLER2DARRAYSHADOW */ - F16SAMPLER2DRECTSHADOW = 463, /* F16SAMPLER2DRECTSHADOW */ - F16SAMPLERCUBESHADOW = 464, /* F16SAMPLERCUBESHADOW */ - F16SAMPLERCUBEARRAYSHADOW = 465, /* F16SAMPLERCUBEARRAYSHADOW */ - IMAGE1D = 466, /* IMAGE1D */ - IIMAGE1D = 467, /* IIMAGE1D */ - UIMAGE1D = 468, /* UIMAGE1D */ - IMAGE2D = 469, /* IMAGE2D */ - IIMAGE2D = 470, /* IIMAGE2D */ - UIMAGE2D = 471, /* UIMAGE2D */ - IMAGE3D = 472, /* IMAGE3D */ - IIMAGE3D = 473, /* IIMAGE3D */ - UIMAGE3D = 474, /* UIMAGE3D */ - IMAGE2DRECT = 475, /* IMAGE2DRECT */ - IIMAGE2DRECT = 476, /* IIMAGE2DRECT */ - UIMAGE2DRECT = 477, /* UIMAGE2DRECT */ - IMAGECUBE = 478, /* IMAGECUBE */ - IIMAGECUBE = 479, /* IIMAGECUBE */ - UIMAGECUBE = 480, /* UIMAGECUBE */ - IMAGEBUFFER = 481, /* IMAGEBUFFER */ - IIMAGEBUFFER = 482, /* IIMAGEBUFFER */ - UIMAGEBUFFER = 483, /* UIMAGEBUFFER */ - IMAGE1DARRAY = 484, /* IMAGE1DARRAY */ - IIMAGE1DARRAY = 485, /* IIMAGE1DARRAY */ - UIMAGE1DARRAY = 486, /* UIMAGE1DARRAY */ - IMAGE2DARRAY = 487, /* IMAGE2DARRAY */ - IIMAGE2DARRAY = 488, /* IIMAGE2DARRAY */ - UIMAGE2DARRAY = 489, /* UIMAGE2DARRAY */ - IMAGECUBEARRAY = 490, /* IMAGECUBEARRAY */ - IIMAGECUBEARRAY = 491, /* IIMAGECUBEARRAY */ - UIMAGECUBEARRAY = 492, /* UIMAGECUBEARRAY */ - IMAGE2DMS = 493, /* IMAGE2DMS */ - IIMAGE2DMS = 494, /* IIMAGE2DMS */ - UIMAGE2DMS = 495, /* UIMAGE2DMS */ - IMAGE2DMSARRAY = 496, /* IMAGE2DMSARRAY */ - IIMAGE2DMSARRAY = 497, /* IIMAGE2DMSARRAY */ - UIMAGE2DMSARRAY = 498, /* UIMAGE2DMSARRAY */ - F16IMAGE1D = 499, /* F16IMAGE1D */ - F16IMAGE2D = 500, /* F16IMAGE2D */ - F16IMAGE3D = 501, /* F16IMAGE3D */ - F16IMAGE2DRECT = 502, /* F16IMAGE2DRECT */ - F16IMAGECUBE = 503, /* F16IMAGECUBE */ - F16IMAGE1DARRAY = 504, /* F16IMAGE1DARRAY */ - F16IMAGE2DARRAY = 505, /* F16IMAGE2DARRAY */ - F16IMAGECUBEARRAY = 506, /* F16IMAGECUBEARRAY */ - F16IMAGEBUFFER = 507, /* F16IMAGEBUFFER */ - F16IMAGE2DMS = 508, /* F16IMAGE2DMS */ - F16IMAGE2DMSARRAY = 509, /* F16IMAGE2DMSARRAY */ - I64IMAGE1D = 510, /* I64IMAGE1D */ - U64IMAGE1D = 511, /* U64IMAGE1D */ - I64IMAGE2D = 512, /* I64IMAGE2D */ - U64IMAGE2D = 513, /* U64IMAGE2D */ - I64IMAGE3D = 514, /* I64IMAGE3D */ - U64IMAGE3D = 515, /* U64IMAGE3D */ - I64IMAGE2DRECT = 516, /* I64IMAGE2DRECT */ - U64IMAGE2DRECT = 517, /* U64IMAGE2DRECT */ - I64IMAGECUBE = 518, /* I64IMAGECUBE */ - U64IMAGECUBE = 519, /* U64IMAGECUBE */ - I64IMAGEBUFFER = 520, /* I64IMAGEBUFFER */ - U64IMAGEBUFFER = 521, /* U64IMAGEBUFFER */ - I64IMAGE1DARRAY = 522, /* I64IMAGE1DARRAY */ - U64IMAGE1DARRAY = 523, /* U64IMAGE1DARRAY */ - I64IMAGE2DARRAY = 524, /* I64IMAGE2DARRAY */ - U64IMAGE2DARRAY = 525, /* U64IMAGE2DARRAY */ - I64IMAGECUBEARRAY = 526, /* I64IMAGECUBEARRAY */ - U64IMAGECUBEARRAY = 527, /* U64IMAGECUBEARRAY */ - I64IMAGE2DMS = 528, /* I64IMAGE2DMS */ - U64IMAGE2DMS = 529, /* U64IMAGE2DMS */ - I64IMAGE2DMSARRAY = 530, /* I64IMAGE2DMSARRAY */ - U64IMAGE2DMSARRAY = 531, /* U64IMAGE2DMSARRAY */ - TEXTURECUBEARRAY = 532, /* TEXTURECUBEARRAY */ - ITEXTURECUBEARRAY = 533, /* ITEXTURECUBEARRAY */ - UTEXTURECUBEARRAY = 534, /* UTEXTURECUBEARRAY */ - TEXTURE1D = 535, /* TEXTURE1D */ - ITEXTURE1D = 536, /* ITEXTURE1D */ - UTEXTURE1D = 537, /* UTEXTURE1D */ - TEXTURE1DARRAY = 538, /* TEXTURE1DARRAY */ - ITEXTURE1DARRAY = 539, /* ITEXTURE1DARRAY */ - UTEXTURE1DARRAY = 540, /* UTEXTURE1DARRAY */ - TEXTURE2DRECT = 541, /* TEXTURE2DRECT */ - ITEXTURE2DRECT = 542, /* ITEXTURE2DRECT */ - UTEXTURE2DRECT = 543, /* UTEXTURE2DRECT */ - TEXTUREBUFFER = 544, /* TEXTUREBUFFER */ - ITEXTUREBUFFER = 545, /* ITEXTUREBUFFER */ - UTEXTUREBUFFER = 546, /* UTEXTUREBUFFER */ - TEXTURE2DMS = 547, /* TEXTURE2DMS */ - ITEXTURE2DMS = 548, /* ITEXTURE2DMS */ - UTEXTURE2DMS = 549, /* UTEXTURE2DMS */ - TEXTURE2DMSARRAY = 550, /* TEXTURE2DMSARRAY */ - ITEXTURE2DMSARRAY = 551, /* ITEXTURE2DMSARRAY */ - UTEXTURE2DMSARRAY = 552, /* UTEXTURE2DMSARRAY */ - F16TEXTURE1D = 553, /* F16TEXTURE1D */ - F16TEXTURE2D = 554, /* F16TEXTURE2D */ - F16TEXTURE3D = 555, /* F16TEXTURE3D */ - F16TEXTURE2DRECT = 556, /* F16TEXTURE2DRECT */ - F16TEXTURECUBE = 557, /* F16TEXTURECUBE */ - F16TEXTURE1DARRAY = 558, /* F16TEXTURE1DARRAY */ - F16TEXTURE2DARRAY = 559, /* F16TEXTURE2DARRAY */ - F16TEXTURECUBEARRAY = 560, /* F16TEXTURECUBEARRAY */ - F16TEXTUREBUFFER = 561, /* F16TEXTUREBUFFER */ - F16TEXTURE2DMS = 562, /* F16TEXTURE2DMS */ - F16TEXTURE2DMSARRAY = 563, /* F16TEXTURE2DMSARRAY */ - SUBPASSINPUT = 564, /* SUBPASSINPUT */ - SUBPASSINPUTMS = 565, /* SUBPASSINPUTMS */ - ISUBPASSINPUT = 566, /* ISUBPASSINPUT */ - ISUBPASSINPUTMS = 567, /* ISUBPASSINPUTMS */ - USUBPASSINPUT = 568, /* USUBPASSINPUT */ - USUBPASSINPUTMS = 569, /* USUBPASSINPUTMS */ - F16SUBPASSINPUT = 570, /* F16SUBPASSINPUT */ - F16SUBPASSINPUTMS = 571, /* F16SUBPASSINPUTMS */ - SPIRV_INSTRUCTION = 572, /* SPIRV_INSTRUCTION */ - SPIRV_EXECUTION_MODE = 573, /* SPIRV_EXECUTION_MODE */ - SPIRV_EXECUTION_MODE_ID = 574, /* SPIRV_EXECUTION_MODE_ID */ - SPIRV_DECORATE = 575, /* SPIRV_DECORATE */ - SPIRV_DECORATE_ID = 576, /* SPIRV_DECORATE_ID */ - SPIRV_DECORATE_STRING = 577, /* SPIRV_DECORATE_STRING */ - SPIRV_TYPE = 578, /* SPIRV_TYPE */ - SPIRV_STORAGE_CLASS = 579, /* SPIRV_STORAGE_CLASS */ - SPIRV_BY_REFERENCE = 580, /* SPIRV_BY_REFERENCE */ - SPIRV_LITERAL = 581, /* SPIRV_LITERAL */ - LEFT_OP = 582, /* LEFT_OP */ - RIGHT_OP = 583, /* RIGHT_OP */ - INC_OP = 584, /* INC_OP */ - DEC_OP = 585, /* DEC_OP */ - LE_OP = 586, /* LE_OP */ - GE_OP = 587, /* GE_OP */ - EQ_OP = 588, /* EQ_OP */ - NE_OP = 589, /* NE_OP */ - AND_OP = 590, /* AND_OP */ - OR_OP = 591, /* OR_OP */ - XOR_OP = 592, /* XOR_OP */ - MUL_ASSIGN = 593, /* MUL_ASSIGN */ - DIV_ASSIGN = 594, /* DIV_ASSIGN */ - ADD_ASSIGN = 595, /* ADD_ASSIGN */ - MOD_ASSIGN = 596, /* MOD_ASSIGN */ - LEFT_ASSIGN = 597, /* LEFT_ASSIGN */ - RIGHT_ASSIGN = 598, /* RIGHT_ASSIGN */ - AND_ASSIGN = 599, /* AND_ASSIGN */ - XOR_ASSIGN = 600, /* XOR_ASSIGN */ - OR_ASSIGN = 601, /* OR_ASSIGN */ - SUB_ASSIGN = 602, /* SUB_ASSIGN */ - STRING_LITERAL = 603, /* STRING_LITERAL */ - LEFT_PAREN = 604, /* LEFT_PAREN */ - RIGHT_PAREN = 605, /* RIGHT_PAREN */ - LEFT_BRACKET = 606, /* LEFT_BRACKET */ - RIGHT_BRACKET = 607, /* RIGHT_BRACKET */ - LEFT_BRACE = 608, /* LEFT_BRACE */ - RIGHT_BRACE = 609, /* RIGHT_BRACE */ - DOT = 610, /* DOT */ - COMMA = 611, /* COMMA */ - COLON = 612, /* COLON */ - EQUAL = 613, /* EQUAL */ - SEMICOLON = 614, /* SEMICOLON */ - BANG = 615, /* BANG */ - DASH = 616, /* DASH */ - TILDE = 617, /* TILDE */ - PLUS = 618, /* PLUS */ - STAR = 619, /* STAR */ - SLASH = 620, /* SLASH */ - PERCENT = 621, /* PERCENT */ - LEFT_ANGLE = 622, /* LEFT_ANGLE */ - RIGHT_ANGLE = 623, /* RIGHT_ANGLE */ - VERTICAL_BAR = 624, /* VERTICAL_BAR */ - CARET = 625, /* CARET */ - AMPERSAND = 626, /* AMPERSAND */ - QUESTION = 627, /* QUESTION */ - INVARIANT = 628, /* INVARIANT */ - HIGH_PRECISION = 629, /* HIGH_PRECISION */ - MEDIUM_PRECISION = 630, /* MEDIUM_PRECISION */ - LOW_PRECISION = 631, /* LOW_PRECISION */ - PRECISION = 632, /* PRECISION */ - PACKED = 633, /* PACKED */ - RESOURCE = 634, /* RESOURCE */ - SUPERP = 635, /* SUPERP */ - FLOATCONSTANT = 636, /* FLOATCONSTANT */ - INTCONSTANT = 637, /* INTCONSTANT */ - UINTCONSTANT = 638, /* UINTCONSTANT */ - BOOLCONSTANT = 639, /* BOOLCONSTANT */ - IDENTIFIER = 640, /* IDENTIFIER */ - TYPE_NAME = 641, /* TYPE_NAME */ - CENTROID = 642, /* CENTROID */ - IN = 643, /* IN */ - OUT = 644, /* OUT */ - INOUT = 645, /* INOUT */ - STRUCT = 646, /* STRUCT */ - VOID = 647, /* VOID */ - WHILE = 648, /* WHILE */ - BREAK = 649, /* BREAK */ - CONTINUE = 650, /* CONTINUE */ - DO = 651, /* DO */ - ELSE = 652, /* ELSE */ - FOR = 653, /* FOR */ - IF = 654, /* IF */ - DISCARD = 655, /* DISCARD */ - RETURN = 656, /* RETURN */ - SWITCH = 657, /* SWITCH */ - CASE = 658, /* CASE */ - DEFAULT = 659, /* DEFAULT */ - TERMINATE_INVOCATION = 660, /* TERMINATE_INVOCATION */ - TERMINATE_RAY = 661, /* TERMINATE_RAY */ - IGNORE_INTERSECTION = 662, /* IGNORE_INTERSECTION */ - UNIFORM = 663, /* UNIFORM */ - SHARED = 664, /* SHARED */ - BUFFER = 665, /* BUFFER */ - FLAT = 666, /* FLAT */ - SMOOTH = 667, /* SMOOTH */ - LAYOUT = 668, /* LAYOUT */ - DOUBLECONSTANT = 669, /* DOUBLECONSTANT */ - INT16CONSTANT = 670, /* INT16CONSTANT */ - UINT16CONSTANT = 671, /* UINT16CONSTANT */ - FLOAT16CONSTANT = 672, /* FLOAT16CONSTANT */ - INT32CONSTANT = 673, /* INT32CONSTANT */ - UINT32CONSTANT = 674, /* UINT32CONSTANT */ - INT64CONSTANT = 675, /* INT64CONSTANT */ - UINT64CONSTANT = 676, /* UINT64CONSTANT */ - SUBROUTINE = 677, /* SUBROUTINE */ - DEMOTE = 678, /* DEMOTE */ - PAYLOADNV = 679, /* PAYLOADNV */ - PAYLOADINNV = 680, /* PAYLOADINNV */ - HITATTRNV = 681, /* HITATTRNV */ - CALLDATANV = 682, /* CALLDATANV */ - CALLDATAINNV = 683, /* CALLDATAINNV */ - PAYLOADEXT = 684, /* PAYLOADEXT */ - PAYLOADINEXT = 685, /* PAYLOADINEXT */ - HITATTREXT = 686, /* HITATTREXT */ - CALLDATAEXT = 687, /* CALLDATAEXT */ - CALLDATAINEXT = 688, /* CALLDATAINEXT */ - PATCH = 689, /* PATCH */ - SAMPLE = 690, /* SAMPLE */ - NONUNIFORM = 691, /* NONUNIFORM */ - COHERENT = 692, /* COHERENT */ - VOLATILE = 693, /* VOLATILE */ - RESTRICT = 694, /* RESTRICT */ - READONLY = 695, /* READONLY */ - WRITEONLY = 696, /* WRITEONLY */ - DEVICECOHERENT = 697, /* DEVICECOHERENT */ - QUEUEFAMILYCOHERENT = 698, /* QUEUEFAMILYCOHERENT */ - WORKGROUPCOHERENT = 699, /* WORKGROUPCOHERENT */ - SUBGROUPCOHERENT = 700, /* SUBGROUPCOHERENT */ - NONPRIVATE = 701, /* NONPRIVATE */ - SHADERCALLCOHERENT = 702, /* SHADERCALLCOHERENT */ - NOPERSPECTIVE = 703, /* NOPERSPECTIVE */ - EXPLICITINTERPAMD = 704, /* EXPLICITINTERPAMD */ - PERVERTEXEXT = 705, /* PERVERTEXEXT */ - PERVERTEXNV = 706, /* PERVERTEXNV */ - PERPRIMITIVENV = 707, /* PERPRIMITIVENV */ - PERVIEWNV = 708, /* PERVIEWNV */ - PERTASKNV = 709, /* PERTASKNV */ - PERPRIMITIVEEXT = 710, /* PERPRIMITIVEEXT */ - TASKPAYLOADWORKGROUPEXT = 711, /* TASKPAYLOADWORKGROUPEXT */ - PRECISE = 712 /* PRECISE */ + COOPMAT = 421, /* COOPMAT */ + HITOBJECTNV = 422, /* HITOBJECTNV */ + HITOBJECTATTRNV = 423, /* HITOBJECTATTRNV */ + SAMPLERCUBEARRAY = 424, /* SAMPLERCUBEARRAY */ + SAMPLERCUBEARRAYSHADOW = 425, /* SAMPLERCUBEARRAYSHADOW */ + ISAMPLERCUBEARRAY = 426, /* ISAMPLERCUBEARRAY */ + USAMPLERCUBEARRAY = 427, /* USAMPLERCUBEARRAY */ + SAMPLER1D = 428, /* SAMPLER1D */ + SAMPLER1DARRAY = 429, /* SAMPLER1DARRAY */ + SAMPLER1DARRAYSHADOW = 430, /* SAMPLER1DARRAYSHADOW */ + ISAMPLER1D = 431, /* ISAMPLER1D */ + SAMPLER1DSHADOW = 432, /* SAMPLER1DSHADOW */ + SAMPLER2DRECT = 433, /* SAMPLER2DRECT */ + SAMPLER2DRECTSHADOW = 434, /* SAMPLER2DRECTSHADOW */ + ISAMPLER2DRECT = 435, /* ISAMPLER2DRECT */ + USAMPLER2DRECT = 436, /* USAMPLER2DRECT */ + SAMPLERBUFFER = 437, /* SAMPLERBUFFER */ + ISAMPLERBUFFER = 438, /* ISAMPLERBUFFER */ + USAMPLERBUFFER = 439, /* USAMPLERBUFFER */ + SAMPLER2DMS = 440, /* SAMPLER2DMS */ + ISAMPLER2DMS = 441, /* ISAMPLER2DMS */ + USAMPLER2DMS = 442, /* USAMPLER2DMS */ + SAMPLER2DMSARRAY = 443, /* SAMPLER2DMSARRAY */ + ISAMPLER2DMSARRAY = 444, /* ISAMPLER2DMSARRAY */ + USAMPLER2DMSARRAY = 445, /* USAMPLER2DMSARRAY */ + SAMPLEREXTERNALOES = 446, /* SAMPLEREXTERNALOES */ + SAMPLEREXTERNAL2DY2YEXT = 447, /* SAMPLEREXTERNAL2DY2YEXT */ + ISAMPLER1DARRAY = 448, /* ISAMPLER1DARRAY */ + USAMPLER1D = 449, /* USAMPLER1D */ + USAMPLER1DARRAY = 450, /* USAMPLER1DARRAY */ + F16SAMPLER1D = 451, /* F16SAMPLER1D */ + F16SAMPLER2D = 452, /* F16SAMPLER2D */ + F16SAMPLER3D = 453, /* F16SAMPLER3D */ + F16SAMPLER2DRECT = 454, /* F16SAMPLER2DRECT */ + F16SAMPLERCUBE = 455, /* F16SAMPLERCUBE */ + F16SAMPLER1DARRAY = 456, /* F16SAMPLER1DARRAY */ + F16SAMPLER2DARRAY = 457, /* F16SAMPLER2DARRAY */ + F16SAMPLERCUBEARRAY = 458, /* F16SAMPLERCUBEARRAY */ + F16SAMPLERBUFFER = 459, /* F16SAMPLERBUFFER */ + F16SAMPLER2DMS = 460, /* F16SAMPLER2DMS */ + F16SAMPLER2DMSARRAY = 461, /* F16SAMPLER2DMSARRAY */ + F16SAMPLER1DSHADOW = 462, /* F16SAMPLER1DSHADOW */ + F16SAMPLER2DSHADOW = 463, /* F16SAMPLER2DSHADOW */ + F16SAMPLER1DARRAYSHADOW = 464, /* F16SAMPLER1DARRAYSHADOW */ + F16SAMPLER2DARRAYSHADOW = 465, /* F16SAMPLER2DARRAYSHADOW */ + F16SAMPLER2DRECTSHADOW = 466, /* F16SAMPLER2DRECTSHADOW */ + F16SAMPLERCUBESHADOW = 467, /* F16SAMPLERCUBESHADOW */ + F16SAMPLERCUBEARRAYSHADOW = 468, /* F16SAMPLERCUBEARRAYSHADOW */ + IMAGE1D = 469, /* IMAGE1D */ + IIMAGE1D = 470, /* IIMAGE1D */ + UIMAGE1D = 471, /* UIMAGE1D */ + IMAGE2D = 472, /* IMAGE2D */ + IIMAGE2D = 473, /* IIMAGE2D */ + UIMAGE2D = 474, /* UIMAGE2D */ + IMAGE3D = 475, /* IMAGE3D */ + IIMAGE3D = 476, /* IIMAGE3D */ + UIMAGE3D = 477, /* UIMAGE3D */ + IMAGE2DRECT = 478, /* IMAGE2DRECT */ + IIMAGE2DRECT = 479, /* IIMAGE2DRECT */ + UIMAGE2DRECT = 480, /* UIMAGE2DRECT */ + IMAGECUBE = 481, /* IMAGECUBE */ + IIMAGECUBE = 482, /* IIMAGECUBE */ + UIMAGECUBE = 483, /* UIMAGECUBE */ + IMAGEBUFFER = 484, /* IMAGEBUFFER */ + IIMAGEBUFFER = 485, /* IIMAGEBUFFER */ + UIMAGEBUFFER = 486, /* UIMAGEBUFFER */ + IMAGE1DARRAY = 487, /* IMAGE1DARRAY */ + IIMAGE1DARRAY = 488, /* IIMAGE1DARRAY */ + UIMAGE1DARRAY = 489, /* UIMAGE1DARRAY */ + IMAGE2DARRAY = 490, /* IMAGE2DARRAY */ + IIMAGE2DARRAY = 491, /* IIMAGE2DARRAY */ + UIMAGE2DARRAY = 492, /* UIMAGE2DARRAY */ + IMAGECUBEARRAY = 493, /* IMAGECUBEARRAY */ + IIMAGECUBEARRAY = 494, /* IIMAGECUBEARRAY */ + UIMAGECUBEARRAY = 495, /* UIMAGECUBEARRAY */ + IMAGE2DMS = 496, /* IMAGE2DMS */ + IIMAGE2DMS = 497, /* IIMAGE2DMS */ + UIMAGE2DMS = 498, /* UIMAGE2DMS */ + IMAGE2DMSARRAY = 499, /* IMAGE2DMSARRAY */ + IIMAGE2DMSARRAY = 500, /* IIMAGE2DMSARRAY */ + UIMAGE2DMSARRAY = 501, /* UIMAGE2DMSARRAY */ + F16IMAGE1D = 502, /* F16IMAGE1D */ + F16IMAGE2D = 503, /* F16IMAGE2D */ + F16IMAGE3D = 504, /* F16IMAGE3D */ + F16IMAGE2DRECT = 505, /* F16IMAGE2DRECT */ + F16IMAGECUBE = 506, /* F16IMAGECUBE */ + F16IMAGE1DARRAY = 507, /* F16IMAGE1DARRAY */ + F16IMAGE2DARRAY = 508, /* F16IMAGE2DARRAY */ + F16IMAGECUBEARRAY = 509, /* F16IMAGECUBEARRAY */ + F16IMAGEBUFFER = 510, /* F16IMAGEBUFFER */ + F16IMAGE2DMS = 511, /* F16IMAGE2DMS */ + F16IMAGE2DMSARRAY = 512, /* F16IMAGE2DMSARRAY */ + I64IMAGE1D = 513, /* I64IMAGE1D */ + U64IMAGE1D = 514, /* U64IMAGE1D */ + I64IMAGE2D = 515, /* I64IMAGE2D */ + U64IMAGE2D = 516, /* U64IMAGE2D */ + I64IMAGE3D = 517, /* I64IMAGE3D */ + U64IMAGE3D = 518, /* U64IMAGE3D */ + I64IMAGE2DRECT = 519, /* I64IMAGE2DRECT */ + U64IMAGE2DRECT = 520, /* U64IMAGE2DRECT */ + I64IMAGECUBE = 521, /* I64IMAGECUBE */ + U64IMAGECUBE = 522, /* U64IMAGECUBE */ + I64IMAGEBUFFER = 523, /* I64IMAGEBUFFER */ + U64IMAGEBUFFER = 524, /* U64IMAGEBUFFER */ + I64IMAGE1DARRAY = 525, /* I64IMAGE1DARRAY */ + U64IMAGE1DARRAY = 526, /* U64IMAGE1DARRAY */ + I64IMAGE2DARRAY = 527, /* I64IMAGE2DARRAY */ + U64IMAGE2DARRAY = 528, /* U64IMAGE2DARRAY */ + I64IMAGECUBEARRAY = 529, /* I64IMAGECUBEARRAY */ + U64IMAGECUBEARRAY = 530, /* U64IMAGECUBEARRAY */ + I64IMAGE2DMS = 531, /* I64IMAGE2DMS */ + U64IMAGE2DMS = 532, /* U64IMAGE2DMS */ + I64IMAGE2DMSARRAY = 533, /* I64IMAGE2DMSARRAY */ + U64IMAGE2DMSARRAY = 534, /* U64IMAGE2DMSARRAY */ + TEXTURECUBEARRAY = 535, /* TEXTURECUBEARRAY */ + ITEXTURECUBEARRAY = 536, /* ITEXTURECUBEARRAY */ + UTEXTURECUBEARRAY = 537, /* UTEXTURECUBEARRAY */ + TEXTURE1D = 538, /* TEXTURE1D */ + ITEXTURE1D = 539, /* ITEXTURE1D */ + UTEXTURE1D = 540, /* UTEXTURE1D */ + TEXTURE1DARRAY = 541, /* TEXTURE1DARRAY */ + ITEXTURE1DARRAY = 542, /* ITEXTURE1DARRAY */ + UTEXTURE1DARRAY = 543, /* UTEXTURE1DARRAY */ + TEXTURE2DRECT = 544, /* TEXTURE2DRECT */ + ITEXTURE2DRECT = 545, /* ITEXTURE2DRECT */ + UTEXTURE2DRECT = 546, /* UTEXTURE2DRECT */ + TEXTUREBUFFER = 547, /* TEXTUREBUFFER */ + ITEXTUREBUFFER = 548, /* ITEXTUREBUFFER */ + UTEXTUREBUFFER = 549, /* UTEXTUREBUFFER */ + TEXTURE2DMS = 550, /* TEXTURE2DMS */ + ITEXTURE2DMS = 551, /* ITEXTURE2DMS */ + UTEXTURE2DMS = 552, /* UTEXTURE2DMS */ + TEXTURE2DMSARRAY = 553, /* TEXTURE2DMSARRAY */ + ITEXTURE2DMSARRAY = 554, /* ITEXTURE2DMSARRAY */ + UTEXTURE2DMSARRAY = 555, /* UTEXTURE2DMSARRAY */ + F16TEXTURE1D = 556, /* F16TEXTURE1D */ + F16TEXTURE2D = 557, /* F16TEXTURE2D */ + F16TEXTURE3D = 558, /* F16TEXTURE3D */ + F16TEXTURE2DRECT = 559, /* F16TEXTURE2DRECT */ + F16TEXTURECUBE = 560, /* F16TEXTURECUBE */ + F16TEXTURE1DARRAY = 561, /* F16TEXTURE1DARRAY */ + F16TEXTURE2DARRAY = 562, /* F16TEXTURE2DARRAY */ + F16TEXTURECUBEARRAY = 563, /* F16TEXTURECUBEARRAY */ + F16TEXTUREBUFFER = 564, /* F16TEXTUREBUFFER */ + F16TEXTURE2DMS = 565, /* F16TEXTURE2DMS */ + F16TEXTURE2DMSARRAY = 566, /* F16TEXTURE2DMSARRAY */ + SUBPASSINPUT = 567, /* SUBPASSINPUT */ + SUBPASSINPUTMS = 568, /* SUBPASSINPUTMS */ + ISUBPASSINPUT = 569, /* ISUBPASSINPUT */ + ISUBPASSINPUTMS = 570, /* ISUBPASSINPUTMS */ + USUBPASSINPUT = 571, /* USUBPASSINPUT */ + USUBPASSINPUTMS = 572, /* USUBPASSINPUTMS */ + F16SUBPASSINPUT = 573, /* F16SUBPASSINPUT */ + F16SUBPASSINPUTMS = 574, /* F16SUBPASSINPUTMS */ + SPIRV_INSTRUCTION = 575, /* SPIRV_INSTRUCTION */ + SPIRV_EXECUTION_MODE = 576, /* SPIRV_EXECUTION_MODE */ + SPIRV_EXECUTION_MODE_ID = 577, /* SPIRV_EXECUTION_MODE_ID */ + SPIRV_DECORATE = 578, /* SPIRV_DECORATE */ + SPIRV_DECORATE_ID = 579, /* SPIRV_DECORATE_ID */ + SPIRV_DECORATE_STRING = 580, /* SPIRV_DECORATE_STRING */ + SPIRV_TYPE = 581, /* SPIRV_TYPE */ + SPIRV_STORAGE_CLASS = 582, /* SPIRV_STORAGE_CLASS */ + SPIRV_BY_REFERENCE = 583, /* SPIRV_BY_REFERENCE */ + SPIRV_LITERAL = 584, /* SPIRV_LITERAL */ + ATTACHMENTEXT = 585, /* ATTACHMENTEXT */ + IATTACHMENTEXT = 586, /* IATTACHMENTEXT */ + UATTACHMENTEXT = 587, /* UATTACHMENTEXT */ + LEFT_OP = 588, /* LEFT_OP */ + RIGHT_OP = 589, /* RIGHT_OP */ + INC_OP = 590, /* INC_OP */ + DEC_OP = 591, /* DEC_OP */ + LE_OP = 592, /* LE_OP */ + GE_OP = 593, /* GE_OP */ + EQ_OP = 594, /* EQ_OP */ + NE_OP = 595, /* NE_OP */ + AND_OP = 596, /* AND_OP */ + OR_OP = 597, /* OR_OP */ + XOR_OP = 598, /* XOR_OP */ + MUL_ASSIGN = 599, /* MUL_ASSIGN */ + DIV_ASSIGN = 600, /* DIV_ASSIGN */ + ADD_ASSIGN = 601, /* ADD_ASSIGN */ + MOD_ASSIGN = 602, /* MOD_ASSIGN */ + LEFT_ASSIGN = 603, /* LEFT_ASSIGN */ + RIGHT_ASSIGN = 604, /* RIGHT_ASSIGN */ + AND_ASSIGN = 605, /* AND_ASSIGN */ + XOR_ASSIGN = 606, /* XOR_ASSIGN */ + OR_ASSIGN = 607, /* OR_ASSIGN */ + SUB_ASSIGN = 608, /* SUB_ASSIGN */ + STRING_LITERAL = 609, /* STRING_LITERAL */ + LEFT_PAREN = 610, /* LEFT_PAREN */ + RIGHT_PAREN = 611, /* RIGHT_PAREN */ + LEFT_BRACKET = 612, /* LEFT_BRACKET */ + RIGHT_BRACKET = 613, /* RIGHT_BRACKET */ + LEFT_BRACE = 614, /* LEFT_BRACE */ + RIGHT_BRACE = 615, /* RIGHT_BRACE */ + DOT = 616, /* DOT */ + COMMA = 617, /* COMMA */ + COLON = 618, /* COLON */ + EQUAL = 619, /* EQUAL */ + SEMICOLON = 620, /* SEMICOLON */ + BANG = 621, /* BANG */ + DASH = 622, /* DASH */ + TILDE = 623, /* TILDE */ + PLUS = 624, /* PLUS */ + STAR = 625, /* STAR */ + SLASH = 626, /* SLASH */ + PERCENT = 627, /* PERCENT */ + LEFT_ANGLE = 628, /* LEFT_ANGLE */ + RIGHT_ANGLE = 629, /* RIGHT_ANGLE */ + VERTICAL_BAR = 630, /* VERTICAL_BAR */ + CARET = 631, /* CARET */ + AMPERSAND = 632, /* AMPERSAND */ + QUESTION = 633, /* QUESTION */ + INVARIANT = 634, /* INVARIANT */ + HIGH_PRECISION = 635, /* HIGH_PRECISION */ + MEDIUM_PRECISION = 636, /* MEDIUM_PRECISION */ + LOW_PRECISION = 637, /* LOW_PRECISION */ + PRECISION = 638, /* PRECISION */ + PACKED = 639, /* PACKED */ + RESOURCE = 640, /* RESOURCE */ + SUPERP = 641, /* SUPERP */ + FLOATCONSTANT = 642, /* FLOATCONSTANT */ + INTCONSTANT = 643, /* INTCONSTANT */ + UINTCONSTANT = 644, /* UINTCONSTANT */ + BOOLCONSTANT = 645, /* BOOLCONSTANT */ + IDENTIFIER = 646, /* IDENTIFIER */ + TYPE_NAME = 647, /* TYPE_NAME */ + CENTROID = 648, /* CENTROID */ + IN = 649, /* IN */ + OUT = 650, /* OUT */ + INOUT = 651, /* INOUT */ + STRUCT = 652, /* STRUCT */ + VOID = 653, /* VOID */ + WHILE = 654, /* WHILE */ + BREAK = 655, /* BREAK */ + CONTINUE = 656, /* CONTINUE */ + DO = 657, /* DO */ + ELSE = 658, /* ELSE */ + FOR = 659, /* FOR */ + IF = 660, /* IF */ + DISCARD = 661, /* DISCARD */ + RETURN = 662, /* RETURN */ + SWITCH = 663, /* SWITCH */ + CASE = 664, /* CASE */ + DEFAULT = 665, /* DEFAULT */ + TERMINATE_INVOCATION = 666, /* TERMINATE_INVOCATION */ + TERMINATE_RAY = 667, /* TERMINATE_RAY */ + IGNORE_INTERSECTION = 668, /* IGNORE_INTERSECTION */ + UNIFORM = 669, /* UNIFORM */ + SHARED = 670, /* SHARED */ + BUFFER = 671, /* BUFFER */ + TILEIMAGEEXT = 672, /* TILEIMAGEEXT */ + FLAT = 673, /* FLAT */ + SMOOTH = 674, /* SMOOTH */ + LAYOUT = 675, /* LAYOUT */ + DOUBLECONSTANT = 676, /* DOUBLECONSTANT */ + INT16CONSTANT = 677, /* INT16CONSTANT */ + UINT16CONSTANT = 678, /* UINT16CONSTANT */ + FLOAT16CONSTANT = 679, /* FLOAT16CONSTANT */ + INT32CONSTANT = 680, /* INT32CONSTANT */ + UINT32CONSTANT = 681, /* UINT32CONSTANT */ + INT64CONSTANT = 682, /* INT64CONSTANT */ + UINT64CONSTANT = 683, /* UINT64CONSTANT */ + SUBROUTINE = 684, /* SUBROUTINE */ + DEMOTE = 685, /* DEMOTE */ + PAYLOADNV = 686, /* PAYLOADNV */ + PAYLOADINNV = 687, /* PAYLOADINNV */ + HITATTRNV = 688, /* HITATTRNV */ + CALLDATANV = 689, /* CALLDATANV */ + CALLDATAINNV = 690, /* CALLDATAINNV */ + PAYLOADEXT = 691, /* PAYLOADEXT */ + PAYLOADINEXT = 692, /* PAYLOADINEXT */ + HITATTREXT = 693, /* HITATTREXT */ + CALLDATAEXT = 694, /* CALLDATAEXT */ + CALLDATAINEXT = 695, /* CALLDATAINEXT */ + PATCH = 696, /* PATCH */ + SAMPLE = 697, /* SAMPLE */ + NONUNIFORM = 698, /* NONUNIFORM */ + COHERENT = 699, /* COHERENT */ + VOLATILE = 700, /* VOLATILE */ + RESTRICT = 701, /* RESTRICT */ + READONLY = 702, /* READONLY */ + WRITEONLY = 703, /* WRITEONLY */ + DEVICECOHERENT = 704, /* DEVICECOHERENT */ + QUEUEFAMILYCOHERENT = 705, /* QUEUEFAMILYCOHERENT */ + WORKGROUPCOHERENT = 706, /* WORKGROUPCOHERENT */ + SUBGROUPCOHERENT = 707, /* SUBGROUPCOHERENT */ + NONPRIVATE = 708, /* NONPRIVATE */ + SHADERCALLCOHERENT = 709, /* SHADERCALLCOHERENT */ + NOPERSPECTIVE = 710, /* NOPERSPECTIVE */ + EXPLICITINTERPAMD = 711, /* EXPLICITINTERPAMD */ + PERVERTEXEXT = 712, /* PERVERTEXEXT */ + PERVERTEXNV = 713, /* PERVERTEXNV */ + PERPRIMITIVENV = 714, /* PERPRIMITIVENV */ + PERVIEWNV = 715, /* PERVIEWNV */ + PERTASKNV = 716, /* PERTASKNV */ + PERPRIMITIVEEXT = 717, /* PERPRIMITIVEEXT */ + TASKPAYLOADWORKGROUPEXT = 718, /* TASKPAYLOADWORKGROUPEXT */ + PRECISE = 719 /* PRECISE */ }; typedef enum yytokentype yytoken_kind_t; #endif @@ -517,7 +524,7 @@ extern int yydebug; #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED union YYSTYPE { -#line 97 "MachineIndependent/glslang.y" +#line 72 "MachineIndependent/glslang.y" struct { glslang::TSourceLoc loc; @@ -553,10 +560,10 @@ union YYSTYPE glslang::TArraySizes* arraySizes; glslang::TIdentifierList* identifierList; }; - glslang::TArraySizes* typeParameters; + glslang::TTypeParameters* typeParameters; } interm; -#line 560 "MachineIndependent/glslang_tab.cpp.h" +#line 567 "MachineIndependent/glslang_tab.cpp.h" }; typedef union YYSTYPE YYSTYPE; @@ -566,6 +573,8 @@ typedef union YYSTYPE YYSTYPE; + int yyparse (glslang::TParseContext* pParseContext); + #endif /* !YY_YY_MACHINEINDEPENDENT_GLSLANG_TAB_CPP_H_INCLUDED */ diff --git a/glslang/MachineIndependent/intermOut.cpp b/glslang/MachineIndependent/intermOut.cpp index f797ada9..5b1414c9 100755 --- a/glslang/MachineIndependent/intermOut.cpp +++ b/glslang/MachineIndependent/intermOut.cpp @@ -36,8 +36,6 @@ // POSSIBILITY OF SUCH DAMAGE. // -#if !defined(GLSLANG_WEB) - #include "localintermediate.h" #include "../Include/InfoSink.h" @@ -663,13 +661,13 @@ bool TOutputTraverser::visitUnary(TVisit /* visit */, TIntermUnary* node) case EOpSubpassLoad: out.debug << "subpassLoad"; break; case EOpSubpassLoadMS: out.debug << "subpassLoadMS"; break; + case EOpColorAttachmentReadEXT: out.debug << "colorAttachmentReadEXT"; break; + case EOpConstructReference: out.debug << "Construct reference type"; break; case EOpDeclare: out.debug << "Declare"; break; -#ifndef GLSLANG_WEB case EOpSpirvInst: out.debug << "spirv_instruction"; break; -#endif default: out.debug.message(EPrefixError, "Bad unary op"); } @@ -807,7 +805,8 @@ bool TOutputTraverser::visitAggregate(TVisit /* visit */, TIntermAggregate* node case EOpConstructStruct: out.debug << "Construct structure"; break; case EOpConstructTextureSampler: out.debug << "Construct combined texture-sampler"; break; case EOpConstructReference: out.debug << "Construct reference"; break; - case EOpConstructCooperativeMatrix: out.debug << "Construct cooperative matrix"; break; + case EOpConstructCooperativeMatrixNV: out.debug << "Construct cooperative matrix NV"; break; + case EOpConstructCooperativeMatrixKHR: out.debug << "Construct cooperative matrix KHR"; break; case EOpConstructAccStruct: out.debug << "Construct acceleration structure"; break; case EOpLessThan: out.debug << "Compare Less Than"; break; @@ -1060,6 +1059,8 @@ bool TOutputTraverser::visitAggregate(TVisit /* visit */, TIntermAggregate* node case EOpSubpassLoad: out.debug << "subpassLoad"; break; case EOpSubpassLoadMS: out.debug << "subpassLoadMS"; break; + case EOpColorAttachmentReadEXT: out.debug << "colorAttachmentReadEXT"; break; + case EOpTraceNV: out.debug << "traceNV"; break; case EOpTraceRayMotionNV: out.debug << "traceRayMotionNV"; break; case EOpTraceKHR: out.debug << "traceRayKHR"; break; @@ -1097,17 +1098,55 @@ bool TOutputTraverser::visitAggregate(TVisit /* visit */, TIntermAggregate* node case EOpRayQueryGetWorldRayOrigin: out.debug << "rayQueryGetWorldRayOriginEXT"; break; case EOpRayQueryGetIntersectionObjectToWorld: out.debug << "rayQueryGetIntersectionObjectToWorldEXT"; break; case EOpRayQueryGetIntersectionWorldToObject: out.debug << "rayQueryGetIntersectionWorldToObjectEXT"; break; + case EOpRayQueryGetIntersectionTriangleVertexPositionsEXT: out.debug << "rayQueryGetIntersectionTriangleVertexPositionsEXT"; break; - case EOpCooperativeMatrixLoad: out.debug << "Load cooperative matrix"; break; - case EOpCooperativeMatrixStore: out.debug << "Store cooperative matrix"; break; - case EOpCooperativeMatrixMulAdd: out.debug << "MulAdd cooperative matrices"; break; + case EOpCooperativeMatrixLoad: out.debug << "Load cooperative matrix KHR"; break; + case EOpCooperativeMatrixStore: out.debug << "Store cooperative matrix KHR"; break; + case EOpCooperativeMatrixMulAdd: out.debug << "MulAdd cooperative matrices KHR"; break; + case EOpCooperativeMatrixLoadNV: out.debug << "Load cooperative matrix NV"; break; + case EOpCooperativeMatrixStoreNV: out.debug << "Store cooperative matrix NV"; break; + case EOpCooperativeMatrixMulAddNV: out.debug << "MulAdd cooperative matrices NV"; break; case EOpIsHelperInvocation: out.debug << "IsHelperInvocation"; break; case EOpDebugPrintf: out.debug << "Debug printf"; break; -#ifndef GLSLANG_WEB + case EOpHitObjectTraceRayNV: out.debug << "HitObjectTraceRayNV"; break; + case EOpHitObjectTraceRayMotionNV: out.debug << "HitObjectTraceRayMotionNV"; break; + case EOpHitObjectRecordHitNV: out.debug << "HitObjectRecordHitNV"; break; + case EOpHitObjectRecordHitMotionNV: out.debug << "HitObjectRecordHitMotionNV"; break; + case EOpHitObjectRecordHitWithIndexNV: out.debug << "HitObjectRecordHitWithIndexNV"; break; + case EOpHitObjectRecordHitWithIndexMotionNV: out.debug << "HitObjectRecordHitWithIndexMotionNV"; break; + case EOpHitObjectRecordMissNV: out.debug << "HitObjectRecordMissNV"; break; + case EOpHitObjectRecordMissMotionNV: out.debug << "HitObjectRecordMissMotionNV"; break; + case EOpHitObjectRecordEmptyNV: out.debug << "HitObjectRecordEmptyNV"; break; + case EOpHitObjectExecuteShaderNV: out.debug << "HitObjectExecuteShaderNV"; break; + case EOpHitObjectIsEmptyNV: out.debug << "HitObjectIsEmptyNV"; break; + case EOpHitObjectIsMissNV: out.debug << "HitObjectIsMissNV"; break; + case EOpHitObjectIsHitNV: out.debug << "HitObjectIsHitNV"; break; + case EOpHitObjectGetRayTMinNV: out.debug << "HitObjectGetRayTMinNV"; break; + case EOpHitObjectGetRayTMaxNV: out.debug << "HitObjectGetRayTMaxNV"; break; + case EOpHitObjectGetObjectRayOriginNV: out.debug << "HitObjectGetObjectRayOriginNV"; break; + case EOpHitObjectGetObjectRayDirectionNV: out.debug << "HitObjectGetObjectRayDirectionNV"; break; + case EOpHitObjectGetWorldRayOriginNV: out.debug << "HitObjectGetWorldRayOriginNV"; break; + case EOpHitObjectGetWorldRayDirectionNV: out.debug << "HitObjectGetWorldRayDirectionNV"; break; + case EOpHitObjectGetObjectToWorldNV: out.debug << "HitObjectGetObjectToWorldNV"; break; + case EOpHitObjectGetWorldToObjectNV: out.debug << "HitObjectGetWorldToObjectNV"; break; + case EOpHitObjectGetInstanceCustomIndexNV: out.debug<< "HitObjectGetInstanceCustomIndexNV"; break; + case EOpHitObjectGetInstanceIdNV: out.debug << "HitObjectGetInstaneIdNV"; break; + case EOpHitObjectGetGeometryIndexNV: out.debug << "HitObjectGetGeometryIndexNV"; break; + case EOpHitObjectGetPrimitiveIndexNV: out.debug << "HitObjectGetPrimitiveIndexNV"; break; + case EOpHitObjectGetHitKindNV: out.debug << "HitObjectGetHitKindNV"; break; + case EOpHitObjectGetAttributesNV: out.debug << "HitObjectGetAttributesNV"; break; + case EOpHitObjectGetCurrentTimeNV: out.debug << "HitObjectGetCurrentTimeNV"; break; + case EOpHitObjectGetShaderBindingTableRecordIndexNV: out.debug << "HitObjectGetShaderBindingTableRecordIndexNV"; break; + case EOpHitObjectGetShaderRecordBufferHandleNV: out.debug << "HitObjectReadShaderRecordBufferHandleNV"; break; + case EOpReorderThreadNV: out.debug << "ReorderThreadNV"; break; + case EOpFetchMicroTriangleVertexPositionNV: out.debug << "MicroTriangleVertexPositionNV"; break; + case EOpFetchMicroTriangleVertexBarycentricNV: out.debug << "MicroTriangleVertexBarycentricNV"; break; + case EOpSpirvInst: out.debug << "spirv_instruction"; break; -#endif + case EOpStencilAttachmentReadEXT: out.debug << "stencilAttachmentReadEXT"; break; + case EOpDepthAttachmentReadEXT: out.debug << "depthAttachmentReadEXT"; break; default: out.debug.message(EPrefixError, "Bad aggregation op"); } @@ -1169,12 +1208,12 @@ bool TOutputTraverser::visitSelection(TVisit /* visit */, TIntermSelection* node // - shows all digits, no premature rounding static void OutputDouble(TInfoSink& out, double value, TOutputTraverser::EExtraOutput extra) { - if (IsInfinity(value)) { + if (std::isinf(value)) { if (value < 0) out.debug << "-1.#INF"; else out.debug << "+1.#INF"; - } else if (IsNan(value)) + } else if (std::isnan(value)) out.debug << "1.#IND"; else { const int maxSize = 340; @@ -1512,6 +1551,12 @@ void TIntermediate::output(TInfoSink& infoSink, bool tree) infoSink.debug << "using early_fragment_tests\n"; if (postDepthCoverage) infoSink.debug << "using post_depth_coverage\n"; + if (nonCoherentColorAttachmentReadEXT) + infoSink.debug << "using non_coherent_color_attachment_readEXT\n"; + if (nonCoherentDepthAttachmentReadEXT) + infoSink.debug << "using non_coherent_depth_attachment_readEXT\n"; + if (nonCoherentStencilAttachmentReadEXT) + infoSink.debug << "using non_coherent_stencil_attachment_readEXT\n"; if (depthLayout != EldNone) infoSink.debug << "using " << TQualifier::getLayoutDepthString(depthLayout) << "\n"; if (blendEquations != 0) { @@ -1562,5 +1607,3 @@ void TIntermediate::output(TInfoSink& infoSink, bool tree) } } // end namespace glslang - -#endif // !GLSLANG_WEB diff --git a/glslang/MachineIndependent/iomapper.cpp b/glslang/MachineIndependent/iomapper.cpp index 0ae281d9..ed853256 100755 --- a/glslang/MachineIndependent/iomapper.cpp +++ b/glslang/MachineIndependent/iomapper.cpp @@ -33,8 +33,6 @@ // POSSIBILITY OF SUCH DAMAGE. // -#if !defined(GLSLANG_WEB) - #include "../Include/Common.h" #include "../Include/InfoSink.h" #include "../Include/Types.h" @@ -145,6 +143,8 @@ public: base->getWritableType().getQualifier().layoutComponent = at->second.newComponent; if (at->second.newIndex != -1) base->getWritableType().getQualifier().layoutIndex = at->second.newIndex; + if (at->second.upgradedToPushConstant) + base->getWritableType().getQualifier().layoutPushConstant = true; } private: @@ -866,7 +866,7 @@ int TDefaultIoResolverBase::resolveInOutLocation(EShLanguage stage, TVarEntryInf } // 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()) { + if (type.getQualifier().hasLocation() || type.isBuiltIn() || type.getQualifier().hasSpirvDecorate()) { return ent.newLocation = -1; } @@ -953,7 +953,7 @@ int TDefaultGlslIoResolver::resolveInOutLocation(EShLanguage stage, TVarEntryInf 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()) { + if (type.isBuiltIn() || type.getQualifier().hasSpirvDecorate()) { return ent.newLocation = -1; } // no locations on blocks of built-in variables @@ -1670,31 +1670,34 @@ bool TGlslIoMapper::doMap(TIoMapResolver* resolver, TInfoSink& infoSink) { } } } - // If it's been upgraded to push_constant, then remove it from the uniformVector + // If it's been upgraded to push_constant, then set the flag so when its traversed + // in the next for loop, all references to this symbol will get their flag changed. // 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; - } + std::for_each(uniformVector.begin(), uniformVector.end(), + [this](TVarLivePair& p) { + if (p.first == autoPushConstantBlockName) { + p.second.upgradedToPushConstant = true; + } + }); } } 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 - // ubo, ssbo and opaque symbols + // ubo, ssbo and opaque symbols. Assign push_constant upgrades as well. TVarLiveMap** pUniformVarMap = uniformResolve.uniformVarMap; std::for_each(uniformVector.begin(), uniformVector.end(), [pUniformVarMap, stage](TVarLivePair p) { auto at = pUniformVarMap[stage]->find(p.second.symbol->getAccessName()); if (at != pUniformVarMap[stage]->end() && at->second.id == p.second.id){ - int resolvedBinding = at->second.newBinding; - at->second = p.second; - if (resolvedBinding > 0) - at->second.newBinding = resolvedBinding; + if (p.second.upgradedToPushConstant) { + at->second.upgradedToPushConstant = true; + } else { + int resolvedBinding = at->second.newBinding; + at->second = p.second; + if (resolvedBinding > 0) + at->second.newBinding = resolvedBinding; + } } }); TVarSetTraverser iter_iomap(*intermediates[stage], *inVarMaps[stage], *outVarMaps[stage], @@ -1709,5 +1712,3 @@ bool TGlslIoMapper::doMap(TIoMapResolver* resolver, TInfoSink& infoSink) { } } // end namespace glslang - -#endif // !GLSLANG_WEB diff --git a/glslang/MachineIndependent/iomapper.h b/glslang/MachineIndependent/iomapper.h index 0003a74e..35babbce 100755 --- a/glslang/MachineIndependent/iomapper.h +++ b/glslang/MachineIndependent/iomapper.h @@ -33,8 +33,6 @@ // POSSIBILITY OF SUCH DAMAGE. // -#if !defined(GLSLANG_WEB) - #ifndef _IOMAPPER_INCLUDED #define _IOMAPPER_INCLUDED @@ -55,6 +53,7 @@ struct TVarEntryInfo { long long id; TIntermSymbol* symbol; bool live; + bool upgradedToPushConstant; int newBinding; int newSet; int newLocation; @@ -63,6 +62,7 @@ struct TVarEntryInfo { EShLanguage stage; void clearNewAssignments() { + upgradedToPushConstant = false; newBinding = -1; newSet = -1; newLocation = -1; @@ -357,5 +357,3 @@ private: } // end namespace glslang #endif // _IOMAPPER_INCLUDED - -#endif // !GLSLANG_WEB diff --git a/glslang/MachineIndependent/limits.cpp b/glslang/MachineIndependent/limits.cpp index 39157057..4404beca 100755 --- a/glslang/MachineIndependent/limits.cpp +++ b/glslang/MachineIndependent/limits.cpp @@ -187,14 +187,12 @@ bool TIndexTraverser::visitAggregate(TVisit /* visit */, TIntermAggregate* node) // void TParseContext::constantIndexExpressionCheck(TIntermNode* index) { -#ifndef GLSLANG_WEB TIndexTraverser it(inductiveLoopIds); index->traverse(&it); if (it.bad) error(it.badLoc, "Non-constant-index-expression", "limitations", ""); -#endif } } // end namespace glslang diff --git a/glslang/MachineIndependent/linkValidate.cpp b/glslang/MachineIndependent/linkValidate.cpp index ff976149..d69300b8 100755 --- a/glslang/MachineIndependent/linkValidate.cpp +++ b/glslang/MachineIndependent/linkValidate.cpp @@ -57,13 +57,11 @@ namespace glslang { // void TIntermediate::error(TInfoSink& infoSink, const char* message, EShLanguage unitStage) { -#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"; -#endif ++numErrors; } @@ -71,13 +69,11 @@ void TIntermediate::error(TInfoSink& infoSink, const char* message, EShLanguage // Link-time warning. void TIntermediate::warn(TInfoSink& infoSink, const char* message, EShLanguage unitStage) { -#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"; -#endif } // TODO: 4.4 offset/align: "Two blocks linked together in the same program with the same block @@ -89,11 +85,9 @@ void TIntermediate::warn(TInfoSink& infoSink, const char* message, EShLanguage u // void TIntermediate::merge(TInfoSink& infoSink, TIntermediate& unit) { -#if !defined(GLSLANG_WEB) mergeCallGraphs(infoSink, unit); mergeModes(infoSink, unit); mergeTrees(infoSink, unit); -#endif } // @@ -161,8 +155,6 @@ void TIntermediate::mergeCallGraphs(TInfoSink& infoSink, TIntermediate& unit) callGraph.insert(callGraph.end(), unit.callGraph.begin(), unit.callGraph.end()); } -#if !defined(GLSLANG_WEB) - #define MERGE_MAX(member) member = std::max(member, unit.member) #define MERGE_TRUE(member) if (unit.member) member = unit.member; @@ -271,6 +263,9 @@ void TIntermediate::mergeModes(TInfoSink& infoSink, TIntermediate& unit) MERGE_TRUE(earlyFragmentTests); MERGE_TRUE(postDepthCoverage); + MERGE_TRUE(nonCoherentColorAttachmentReadEXT); + MERGE_TRUE(nonCoherentDepthAttachmentReadEXT); + MERGE_TRUE(nonCoherentStencilAttachmentReadEXT); if (depthLayout == EldNone) depthLayout = unit.depthLayout; @@ -378,8 +373,6 @@ void TIntermediate::mergeTrees(TInfoSink& infoSink, TIntermediate& unit) ioAccessed.insert(unit.ioAccessed.begin(), unit.ioAccessed.end()); } -#endif - static const TString& getNameForIdMap(TIntermSymbol* symbol) { TShaderInterface si = symbol->getType().getShaderInterface(); @@ -749,6 +742,21 @@ void TIntermediate::mergeLinkerObjects(TInfoSink& infoSink, TIntermSequence& lin symbol->getQualifier().layoutLocation = unitSymbol->getQualifier().layoutLocation; } + // Update implicit array sizes + if (symbol->getWritableType().isImplicitlySizedArray() && unitSymbol->getType().isImplicitlySizedArray()) { + if (unitSymbol->getType().getImplicitArraySize() > symbol->getType().getImplicitArraySize()){ + symbol->getWritableType().updateImplicitArraySize(unitSymbol->getType().getImplicitArraySize()); + } + } + else if (symbol->getWritableType().isImplicitlySizedArray() && unitSymbol->getType().isSizedArray()) { + if (symbol->getWritableType().getImplicitArraySize() > unitSymbol->getType().getOuterArraySize()) + error(infoSink, "Implicit size of unsized array doesn't match same symbol among multiple shaders."); + } + else if (unitSymbol->getType().isImplicitlySizedArray() && symbol->getWritableType().isSizedArray()) { + if (unitSymbol->getType().getImplicitArraySize() > symbol->getWritableType().getOuterArraySize()) + error(infoSink, "Implicit size of unsized array doesn't match same symbol among multiple shaders."); + } + // Update implicit array sizes mergeImplicitArraySizes(symbol->getWritableType(), unitSymbol->getType()); @@ -759,6 +767,19 @@ void TIntermediate::mergeLinkerObjects(TInfoSink& infoSink, TIntermSequence& lin else if (symbol->getQualifier().isPushConstant() && unitSymbol->getQualifier().isPushConstant() && getStage() == unitStage) error(infoSink, "Only one push_constant block is allowed per stage"); } + + // Check conflicts between preset primitives and sizes of I/O variables among multiple geometry shaders + if (language == EShLangGeometry && unitStage == EShLangGeometry) + { + TIntermSymbol* unitSymbol = unitLinkerObjects[unitLinkObj]->getAsSymbolNode(); + if (unitSymbol->isArray() && unitSymbol->getQualifier().storage == EvqVaryingIn && unitSymbol->getQualifier().builtIn == EbvNone) + if ((unitSymbol->getArraySizes()->isImplicitlySized() && + unitSymbol->getArraySizes()->getImplicitSize() != TQualifier::mapGeometryToSize(getInputPrimitive())) || + (! unitSymbol->getArraySizes()->isImplicitlySized() && + unitSymbol->getArraySizes()->getDimSize(0) != TQualifier::mapGeometryToSize(getInputPrimitive()))) + error(infoSink, "Not all array sizes match across all geometry shaders in the program"); + } + if (merge) { linkerObjects.push_back(unitLinkerObjects[unitLinkObj]); @@ -828,7 +849,6 @@ void TIntermediate::mergeImplicitArraySizes(TType& type, const TType& unitType) // void TIntermediate::mergeErrorCheck(TInfoSink& infoSink, const TIntermSymbol& symbol, const TIntermSymbol& unitSymbol, EShLanguage unitStage) { -#if !defined(GLSLANG_WEB) bool crossStage = getStage() != unitStage; bool writeTypeComparison = false; bool errorReported = false; @@ -863,7 +883,8 @@ void TIntermediate::mergeErrorCheck(TInfoSink& infoSink, const TIntermSymbol& sy else { arraysMatch = symbol.getType().sameArrayness(unitSymbol.getType()) || (symbol.getType().isArray() && unitSymbol.getType().isArray() && - (symbol.getType().isUnsizedArray() || unitSymbol.getType().isUnsizedArray())); + (symbol.getType().isImplicitlySizedArray() || unitSymbol.getType().isImplicitlySizedArray() || + symbol.getType().isUnsizedArray() || unitSymbol.getType().isUnsizedArray())); } int lpidx = -1; @@ -1155,7 +1176,6 @@ void TIntermediate::mergeErrorCheck(TInfoSink& infoSink, const TIntermSymbol& sy } } } -#endif } void TIntermediate::sharedBlockCheck(TInfoSink& infoSink) @@ -1202,7 +1222,6 @@ void TIntermediate::finalCheck(TInfoSink& infoSink, bool keepUncalled) // overlap/alias/missing I/O, etc. inOutLocationCheck(infoSink); -#ifndef GLSLANG_WEB if (getNumPushConstants() > 1) error(infoSink, "Only one push_constant block is allowed per stage"); @@ -1360,7 +1379,6 @@ void TIntermediate::finalCheck(TInfoSink& infoSink, bool keepUncalled) } finalLinkTraverser; treeRoot->traverse(&finalLinkTraverser); -#endif } // @@ -1517,7 +1535,10 @@ void TIntermediate::checkCallGraphBodies(TInfoSink& infoSink, bool keepUncalled) if (! keepUncalled) { for (int f = 0; f < (int)functionSequence.size(); ++f) { if (! reachable[f]) + { + resetTopLevelUncalledStatus(functionSequence[f]->getAsAggregate()->getName()); functionSequence[f] = nullptr; + } } functionSequence.erase(std::remove(functionSequence.begin(), functionSequence.end(), nullptr), functionSequence.end()); } @@ -1585,7 +1606,7 @@ bool TIntermediate::userOutputUsed() const return found; } -// Accumulate locations used for inputs, outputs, and uniforms, payload and callable data +// Accumulate locations used for inputs, outputs, and uniforms, payload, callable data, and tileImageEXT // and check for collisions as the accumulation is done. // // Returns < 0 if no collision, >= 0 if collision and the value returned is a colliding value. @@ -1598,7 +1619,6 @@ int TIntermediate::addUsedLocation(const TQualifier& qualifier, const TType& typ typeCollision = false; int set; - int setRT; if (qualifier.isPipeInput()) set = 0; else if (qualifier.isPipeOutput()) @@ -1607,10 +1627,14 @@ int TIntermediate::addUsedLocation(const TQualifier& qualifier, const TType& typ set = 2; else if (qualifier.storage == EvqBuffer) set = 3; + else if (qualifier.storage == EvqTileImageEXT) + set = 4; else if (qualifier.isAnyPayload()) - setRT = 0; + set = 0; else if (qualifier.isAnyCallable()) - setRT = 1; + set = 1; + else if (qualifier.isHitObjectAttrNV()) + set = 2; else return -1; @@ -1649,13 +1673,14 @@ int TIntermediate::addUsedLocation(const TQualifier& qualifier, const TType& typ // For raytracing IO (payloads and callabledata) each declaration occupies a single // slot irrespective of type. int collision = -1; // no collision -#ifndef GLSLANG_WEB - if (qualifier.isAnyPayload() || qualifier.isAnyCallable()) { + if (qualifier.isAnyPayload() || qualifier.isAnyCallable() || qualifier.isHitObjectAttrNV()) { TRange range(qualifier.layoutLocation, qualifier.layoutLocation); - collision = checkLocationRT(setRT, qualifier.layoutLocation); + collision = checkLocationRT(set, qualifier.layoutLocation); if (collision < 0) - usedIoRT[setRT].push_back(range); - } else if (size == 2 && type.getBasicType() == EbtDouble && type.getVectorSize() == 3 && + usedIoRT[set].push_back(range); + return collision; + } + if (size == 2 && type.getBasicType() == EbtDouble && type.getVectorSize() == 3 && (qualifier.isPipeInput() || qualifier.isPipeOutput())) { // Dealing with dvec3 in/out split across two locations. // Need two io-ranges. @@ -1681,32 +1706,34 @@ int TIntermediate::addUsedLocation(const TQualifier& qualifier, const TType& typ if (collision < 0) usedIo[set].push_back(range2); } - } else -#endif - { - // Not a dvec3 in/out split across two locations, generic path. - // Need a single IO-range block. - - TRange locationRange(qualifier.layoutLocation, qualifier.layoutLocation + size - 1); - TRange componentRange(0, 3); - if (qualifier.hasComponent() || type.getVectorSize() > 0) { - int consumedComponents = type.getVectorSize() * (type.getBasicType() == EbtDouble ? 2 : 1); - if (qualifier.hasComponent()) - componentRange.start = qualifier.layoutComponent; - componentRange.last = componentRange.start + consumedComponents - 1; - } - - // combine location and component ranges - TIoRange range(locationRange, componentRange, type.getBasicType(), qualifier.hasIndex() ? qualifier.getIndex() : 0); - - // check for collisions, except for vertex inputs on desktop targeting OpenGL - if (! (!isEsProfile() && language == EShLangVertex && qualifier.isPipeInput()) || spvVersion.vulkan > 0) - collision = checkLocationRange(set, range, type, typeCollision); - - if (collision < 0) - usedIo[set].push_back(range); + return collision; } + // Not a dvec3 in/out split across two locations, generic path. + // Need a single IO-range block. + + TRange locationRange(qualifier.layoutLocation, qualifier.layoutLocation + size - 1); + TRange componentRange(0, 3); + if (qualifier.hasComponent() || type.getVectorSize() > 0) { + int consumedComponents = type.getVectorSize() * (type.getBasicType() == EbtDouble ? 2 : 1); + if (qualifier.hasComponent()) + componentRange.start = qualifier.layoutComponent; + componentRange.last = componentRange.start + consumedComponents - 1; + } + + // combine location and component ranges + TBasicType basicTy = type.getBasicType(); + if (basicTy == EbtSampler && type.getSampler().isAttachmentEXT()) + basicTy = type.getSampler().type; + TIoRange range(locationRange, componentRange, basicTy, qualifier.hasIndex() ? qualifier.getIndex() : 0); + + // check for collisions, except for vertex inputs on desktop targeting OpenGL + if (! (!isEsProfile() && language == EShLangVertex && qualifier.isPipeInput()) || spvVersion.vulkan > 0) + collision = checkLocationRange(set, range, type, typeCollision); + + if (collision < 0) + usedIo[set].push_back(range); + return collision; } @@ -1728,6 +1755,19 @@ int TIntermediate::checkLocationRange(int set, const TIoRange& range, const TTyp } } + // check typeCollision between tileImageEXT and out + if (set == 4 || set == 1) { + // if the set is "tileImageEXT", check against "out" and vice versa + int againstSet = (set == 4) ? 1 : 4; + for (size_t r = 0; r < usedIo[againstSet].size(); ++r) { + if (range.location.overlap(usedIo[againstSet][r].location) && type.getBasicType() != usedIo[againstSet][r].basicType) { + // aliased-type mismatch + typeCollision = true; + return std::max(range.location.start, usedIo[againstSet][r].location.start); + } + } + } + return -1; // no collision } @@ -1791,10 +1831,8 @@ int TIntermediate::computeTypeLocationSize(const TType& type, EShLanguage stage) if (type.isSizedArray() && !type.getQualifier().isPerView()) return type.getOuterArraySize() * computeTypeLocationSize(elementType, stage); else { -#ifndef GLSLANG_WEB // unset perViewNV attributes for arrayed per-view outputs: "perviewNV vec4 v[MAX_VIEWS][3];" elementType.getQualifier().perViewNV = false; -#endif return computeTypeLocationSize(elementType, stage); } } @@ -1870,8 +1908,6 @@ int TIntermediate::computeTypeUniformLocationSize(const TType& type) return 1; } -#ifndef GLSLANG_WEB - // Accumulate xfb buffer ranges and check for collisions as the accumulation is done. // // Returns < 0 if no collision, >= 0 if collision and the value returned is a colliding value. @@ -1989,8 +2025,6 @@ unsigned int TIntermediate::computeTypeXfbSize(const TType& type, bool& contains } } -#endif - const int baseAlignmentVec4Std140 = 16; // Return the size and alignment of a component of the given type. @@ -1998,10 +2032,6 @@ const int baseAlignmentVec4Std140 = 16; // Return value is the alignment.. int TIntermediate::getBaseAlignmentScalar(const TType& type, int& size) { -#ifdef GLSLANG_WEB - size = 4; return 4; -#endif - switch (type.getBasicType()) { case EbtInt64: case EbtUint64: @@ -2012,6 +2042,15 @@ int TIntermediate::getBaseAlignmentScalar(const TType& type, int& size) case EbtInt16: case EbtUint16: size = 2; return 2; case EbtReference: size = 8; return 8; + case EbtSampler: + { + if (type.isBindlessImage() || type.isBindlessTexture()) { + size = 8; return 8; + } + else { + size = 4; return 4; + } + } default: size = 4; return 4; } } @@ -2332,7 +2371,6 @@ int TIntermediate::computeBufferReferenceTypeSize(const TType& type) return size; } -#ifndef GLSLANG_WEB bool TIntermediate::isIoResizeArray(const TType& type, EShLanguage language) { return type.isArray() && ((language == EShLangGeometry && type.getQualifier().storage == EvqVaryingIn) || @@ -2344,6 +2382,5 @@ bool TIntermediate::isIoResizeArray(const TType& type, EShLanguage language) { (language == EShLangMesh && type.getQualifier().storage == EvqVaryingOut && !type.getQualifier().perTaskNV)); } -#endif // not GLSLANG_WEB } // end namespace glslang diff --git a/glslang/MachineIndependent/localintermediate.h b/glslang/MachineIndependent/localintermediate.h index b9ad7db3..c73f2b4d 100755 --- a/glslang/MachineIndependent/localintermediate.h +++ b/glslang/MachineIndependent/localintermediate.h @@ -43,11 +43,12 @@ #include "../Public/ShaderLang.h" #include "Versions.h" +#include +#include +#include +#include #include #include -#include -#include -#include class TInfoSink; @@ -147,7 +148,6 @@ struct TOffsetRange { TRange offset; }; -#ifndef GLSLANG_WEB // Things that need to be tracked per xfb buffer. struct TXfbBuffer { TXfbBuffer() : stride(TQualifier::layoutXfbStrideEnd), implicitStride(0), contains64BitType(false), @@ -159,7 +159,6 @@ struct TXfbBuffer { bool contains32BitType; bool contains16BitType; }; -#endif // Track a set of strings describing how the module was processed. // This includes command line options, transforms, etc., ideally inclusive enough @@ -225,6 +224,16 @@ enum ComputeDerivativeMode { LayoutDerivativeGroupLinear, // derivative_group_linearNV }; +// +// Status type on AST level. Some uncalled status or functions would be reset in call graph. +// Currently we will keep status set by explicitly declared layout or variable decl. +// +enum AstRefType { + AstRefTypeVar, // Status set by variable decl + AstRefTypeFunc, // Status set by function decl + AstRefTypeLayout, // Status set by layout decl +}; + class TIdMaps { public: TMap& operator[](long long i) { return maps[i]; } @@ -301,9 +310,7 @@ public: atomicCounterBlockName(""), globalUniformBlockSet(TQualifier::layoutSetEnd), globalUniformBlockBinding(TQualifier::layoutBindingEnd), - atomicCounterBlockSet(TQualifier::layoutSetEnd) -#ifndef GLSLANG_WEB - , + atomicCounterBlockSet(TQualifier::layoutSetEnd), implicitThisName("@this"), implicitCounterName("@count"), source(EShSourceNone), useVulkanMemoryModel(false), @@ -311,7 +318,12 @@ public: inputPrimitive(ElgNone), outputPrimitive(ElgNone), pixelCenterInteger(false), originUpperLeft(false),texCoordBuiltinRedeclared(false), vertexSpacing(EvsNone), vertexOrder(EvoNone), interlockOrdering(EioNone), pointMode(false), earlyFragmentTests(false), - postDepthCoverage(false), earlyAndLateFragmentTestsAMD(false), depthLayout(EldNone), stencilLayout(ElsNone), + postDepthCoverage(false), earlyAndLateFragmentTestsAMD(false), + nonCoherentColorAttachmentReadEXT(false), + nonCoherentDepthAttachmentReadEXT(false), + nonCoherentStencilAttachmentReadEXT(false), + depthLayout(EldNone), + stencilLayout(ElsNone), hlslFunctionality1(false), blendEquations(0), xfbMode(false), multiStream(false), layoutOverrideCoverage(false), @@ -337,7 +349,6 @@ public: spirvRequirement(nullptr), spirvExecutionMode(nullptr), uniformLocationBase(0) -#endif { localSize[0] = 1; localSize[1] = 1; @@ -348,10 +359,8 @@ public: localSizeSpecId[0] = TQualifier::layoutNotSet; localSizeSpecId[1] = TQualifier::layoutNotSet; localSizeSpecId[2] = TQualifier::layoutNotSet; -#ifndef GLSLANG_WEB xfbBuffers.resize(TQualifier::layoutXfbBufferEnd); shiftBinding.fill(0); -#endif } void setVersion(int v) @@ -519,6 +528,8 @@ public: TOperator mapTypeToConstructorOp(const TType&) const; TIntermAggregate* growAggregate(TIntermNode* left, TIntermNode* right); TIntermAggregate* growAggregate(TIntermNode* left, TIntermNode* right, const TSourceLoc&); + TIntermAggregate* mergeAggregate(TIntermNode* left, TIntermNode* right); + TIntermAggregate* mergeAggregate(TIntermNode* left, TIntermNode* right, const TSourceLoc&); TIntermAggregate* makeAggregate(TIntermNode* node); TIntermAggregate* makeAggregate(TIntermNode* node, const TSourceLoc&); TIntermAggregate* makeAggregate(const TSourceLoc&); @@ -564,7 +575,8 @@ public: TIntermTyped* foldSwizzle(TIntermTyped* node, TSwizzleSelectors& fields, const TSourceLoc&); // Tree ops - static const TIntermTyped* findLValueBase(const TIntermTyped*, bool swizzleOkay , bool BufferReferenceOk = false); + static const TIntermTyped* traverseLValueBase(const TIntermTyped*, bool swizzleOkay, bool bufferReferenceOk = false, + std::function proc = {}); // Linkage related void addSymbolLinkageNodes(TIntermAggregate*& linkage, EShLanguage, TSymbolTable&); @@ -621,35 +633,6 @@ public: localSizeSpecId[1] != TQualifier::layoutNotSet || localSizeSpecId[2] != TQualifier::layoutNotSet; } -#ifdef GLSLANG_WEB - void output(TInfoSink&, bool tree) { } - - bool isEsProfile() const { return false; } - bool getXfbMode() const { return false; } - bool isMultiStream() const { return false; } - TLayoutGeometry getOutputPrimitive() const { return ElgNone; } - bool getPostDepthCoverage() const { return false; } - bool getEarlyFragmentTests() const { return false; } - TLayoutDepth getDepth() const { return EldNone; } - bool getPixelCenterInteger() const { return false; } - void setOriginUpperLeft() { } - bool getOriginUpperLeft() const { return true; } - TInterlockOrdering getInterlockOrdering() const { return EioNone; } - - bool getAutoMapBindings() const { return false; } - bool getAutoMapLocations() const { return false; } - int getNumPushConstants() const { return 0; } - void addShaderRecordCount() { } - void addTaskNVCount() { } - void addTaskPayloadEXTCount() { } - void setUseVulkanMemoryModel() { } - bool usingVulkanMemoryModel() const { return false; } - bool usingPhysicalStorageBuffer() const { return false; } - bool usingVariablePointers() const { return false; } - unsigned getXfbStride(int buffer) const { return 0; } - bool hasLayoutDerivativeModeNone() const { return false; } - ComputeDerivativeMode getLayoutDerivativeModeNone() const { return LayoutDerivativeNone; } -#else void output(TInfoSink&, bool tree); bool isEsProfile() const { return profile == EEsProfile; } @@ -744,6 +727,65 @@ public: useVariablePointers = true; processes.addProcess("use-variable-pointers"); } + // Set the global flag for bindless texture + void setBindlessTextureMode(const TString& currentCaller, AstRefType type) + { + // When type is not func, currentCaller should be "" (empty string) + bindlessTextureModeCaller[currentCaller] = type; + } + + // Get the global flag for bindless texture + bool getBindlessTextureMode() const + { + return (bindlessTextureModeCaller.size() > 0); + } + + // Set the global flag for bindless image + void setBindlessImageMode(const TString& currentCaller, AstRefType type) + { + // When type is not func, currentCaller should be "" (empty string) + bindlessImageModeCaller[currentCaller] = type; + } + + // Get the global flag for bindless image + bool getBindlessImageMode() const + { + return (bindlessImageModeCaller.size() > 0); + } + + // Get the global flag for bindless texture + bool resetTopLevelUncalledStatus(const TString& deadCaller) + { + // For reflection collection purpose, currently uniform layout setting and some + // flags introduced by variables (IO, global, etc,.) won't be reset here. + // Remove each global status (AST top level) introduced by uncalled functions. + // If a status is set by several functions, keep those which in call graph. + bool result = false; + + // For two types of bindless mode flag, we would only reset which is set by an uncalled function. + // If one status flag's key in caller vec is empty, it should be come from a non-function setting. + if (!bindlessTextureModeCaller.empty()) { + auto caller = bindlessTextureModeCaller.find(deadCaller); + if (caller != bindlessTextureModeCaller.end() && bindlessTextureModeCaller[deadCaller] == AstRefTypeFunc) { + bindlessTextureModeCaller.erase(caller); + result = true; + } + } + if (!bindlessImageModeCaller.empty()) { + auto caller = bindlessImageModeCaller.find(deadCaller); + if (caller != bindlessImageModeCaller.end() && bindlessImageModeCaller[deadCaller] == AstRefTypeFunc) { + bindlessImageModeCaller.erase(caller); + result = true; + } + } + return result; + } + + bool getBindlessMode() const + { + return getBindlessTextureMode() || getBindlessImageMode(); + } + bool usingVariablePointers() const { return useVariablePointers; } #ifdef ENABLE_HLSL @@ -825,6 +867,12 @@ public: return true; } TLayoutGeometry getOutputPrimitive() const { return outputPrimitive; } + void setNonCoherentColorAttachmentReadEXT() { nonCoherentColorAttachmentReadEXT = true; } + bool getNonCoherentColorAttachmentReadEXT() const { return nonCoherentColorAttachmentReadEXT; } + void setNonCoherentDepthAttachmentReadEXT() { nonCoherentDepthAttachmentReadEXT = true; } + bool getNonCoherentDepthAttachmentReadEXT() const { return nonCoherentDepthAttachmentReadEXT; } + void setNonCoherentStencilAttachmentReadEXT() { nonCoherentStencilAttachmentReadEXT = true; } + bool getNonCoherentStencilAttachmentReadEXT() const { return nonCoherentStencilAttachmentReadEXT; } void setPostDepthCoverage() { postDepthCoverage = true; } bool getPostDepthCoverage() const { return postDepthCoverage; } void setEarlyFragmentTests() { earlyFragmentTests = true; } @@ -923,7 +971,6 @@ public: void insertSpirvExecutionModeId(int executionMode, const TIntermAggregate* args); bool hasSpirvExecutionMode() const { return spirvExecutionMode != nullptr; } const TSpirvExecutionMode& getSpirvExecutionMode() const { return *spirvExecutionMode; } -#endif // GLSLANG_WEB void addBlockStorageOverride(const char* nameStr, TBlockStorageClass backing) { @@ -1030,12 +1077,6 @@ public: void setUniqueId(unsigned long long id) { uniqueId = id; } // Certain explicit conversions are allowed conditionally -#ifdef GLSLANG_WEB - bool getArithemeticInt8Enabled() const { return false; } - bool getArithemeticInt16Enabled() const { return false; } - bool getArithemeticFloat16Enabled() const { return false; } - void updateNumericFeature(TNumericFeatures::feature f, bool on) { } -#else bool getArithemeticInt8Enabled() const { return numericFeatures.contains(TNumericFeatures::shader_explicit_arithmetic_types) || numericFeatures.contains(TNumericFeatures::shader_explicit_arithmetic_types_int8); @@ -1053,7 +1094,6 @@ public: } void updateNumericFeature(TNumericFeatures::feature f, bool on) { on ? numericFeatures.insert(f) : numericFeatures.erase(f); } -#endif protected: TIntermSymbol* addSymbol(long long Id, const TString&, const TType&, const TConstUnionArray&, TIntermTyped* subtree, const TSourceLoc&); @@ -1125,7 +1165,6 @@ protected: unsigned int globalUniformBlockBinding; unsigned int atomicCounterBlockSet; -#ifndef GLSLANG_WEB public: const char* const implicitThisName; const char* const implicitCounterName; @@ -1146,6 +1185,9 @@ protected: bool earlyFragmentTests; bool postDepthCoverage; bool earlyAndLateFragmentTestsAMD; + bool nonCoherentColorAttachmentReadEXT; + bool nonCoherentDepthAttachmentReadEXT; + bool nonCoherentStencilAttachmentReadEXT; TLayoutDepth depthLayout; TLayoutStencil stencilLayout; bool hlslFunctionality1; @@ -1188,18 +1230,19 @@ protected: TSpirvRequirement* spirvRequirement; TSpirvExecutionMode* spirvExecutionMode; - + std::map bindlessTextureModeCaller; + std::map bindlessImageModeCaller; std::unordered_map uniformLocationOverrides; int uniformLocationBase; TNumericFeatures numericFeatures; -#endif std::unordered_map blockBackingOverrides; std::unordered_set usedConstantId; // specialization constant ids used std::vector usedAtomics; // sets of bindings used by atomic counters std::vector usedIo[4]; // sets of used locations, one for each of in, out, uniform, and buffers - std::vector usedIoRT[2]; // sets of used location, one for rayPayload/rayPayloadIN and other - // for callableData/callableDataIn + std::vector usedIoRT[4]; // sets of used location, one for rayPayload/rayPayloadIN, + // one for callableData/callableDataIn, one for hitObjectAttributeNV and + // one for shaderrecordhitobjectNV // set of names of statically read/written I/O that might need extra checking std::set ioAccessed; diff --git a/glslang/MachineIndependent/parseVersions.h b/glslang/MachineIndependent/parseVersions.h index cdf4524c..63841c40 100755 --- a/glslang/MachineIndependent/parseVersions.h +++ b/glslang/MachineIndependent/parseVersions.h @@ -58,10 +58,8 @@ public: const SpvVersion& spvVersion, EShLanguage language, TInfoSink& infoSink, bool forwardCompatible, EShMessages messages) : -#if !defined(GLSLANG_WEB) forwardCompatible(forwardCompatible), profile(profile), -#endif infoSink(infoSink), version(version), language(language), spvVersion(spvVersion), @@ -69,54 +67,7 @@ public: virtual ~TParseVersions() { } void requireStage(const TSourceLoc&, EShLanguageMask, const char* featureDesc); void requireStage(const TSourceLoc&, EShLanguage, const char* featureDesc); -#ifdef GLSLANG_WEB - const EProfile profile = EEsProfile; - bool isEsProfile() const { return true; } - void requireProfile(const TSourceLoc& loc, int profileMask, const char* featureDesc) - { - if (! (EEsProfile & profileMask)) - error(loc, "not supported with this profile:", featureDesc, ProfileName(profile)); - } - void profileRequires(const TSourceLoc& loc, int profileMask, int minVersion, int numExtensions, - const char* const extensions[], const char* featureDesc) - { - if ((EEsProfile & profileMask) && (minVersion == 0 || version < minVersion)) - error(loc, "not supported for this version or the enabled extensions", featureDesc, ""); - } - void profileRequires(const TSourceLoc& loc, int profileMask, int minVersion, const char* extension, - const char* featureDesc) - { - profileRequires(loc, profileMask, minVersion, extension ? 1 : 0, &extension, featureDesc); - } - void initializeExtensionBehavior() { } - void checkDeprecated(const TSourceLoc&, int queryProfiles, int depVersion, const char* featureDesc) { } - void requireNotRemoved(const TSourceLoc&, int queryProfiles, int removedVersion, const char* featureDesc) { } - void requireExtensions(const TSourceLoc&, int numExtensions, const char* const extensions[], - const char* featureDesc) { } - void ppRequireExtensions(const TSourceLoc&, int numExtensions, const char* const extensions[], - const char* featureDesc) { } - TExtensionBehavior getExtensionBehavior(const char*) { return EBhMissing; } - bool extensionTurnedOn(const char* const extension) { return false; } - bool extensionsTurnedOn(int numExtensions, const char* const extensions[]) { return false; } - void updateExtensionBehavior(int line, const char* const extension, const char* behavior) { } - void updateExtensionBehavior(const char* const extension, TExtensionBehavior) { } - void checkExtensionStage(const TSourceLoc&, const char* const extension) { } - void extensionRequires(const TSourceLoc&, const char* const extension, const char* behavior) { } - void fullIntegerCheck(const TSourceLoc&, const char* op) { } - void doubleCheck(const TSourceLoc&, const char* op) { } - bool float16Arithmetic() { return false; } - void requireFloat16Arithmetic(const TSourceLoc& loc, const char* op, const char* featureDesc) { } - bool int16Arithmetic() { return false; } - void requireInt16Arithmetic(const TSourceLoc& loc, const char* op, const char* featureDesc) { } - bool int8Arithmetic() { return false; } - void requireInt8Arithmetic(const TSourceLoc& loc, const char* op, const char* featureDesc) { } - void int64Check(const TSourceLoc&, const char* op, bool builtIn = false) { } - void explicitFloat32Check(const TSourceLoc&, const char* op, bool builtIn = false) { } - void explicitFloat64Check(const TSourceLoc&, const char* op, bool builtIn = false) { } - bool relaxedErrors() const { return false; } - bool suppressWarnings() const { return true; } - bool isForwardCompatible() const { return false; } -#else + bool forwardCompatible; // true if errors are to be given for use of deprecated features EProfile profile; // the declared profile in the shader (core by default) bool isEsProfile() const { return profile == EEsProfile; } @@ -162,29 +113,19 @@ public: virtual void explicitInt32Check(const TSourceLoc&, const char* op, bool builtIn = false); virtual void explicitFloat32Check(const TSourceLoc&, const char* op, bool builtIn = false); virtual void explicitFloat64Check(const TSourceLoc&, const char* op, bool builtIn = false); - virtual void fcoopmatCheck(const TSourceLoc&, const char* op, bool builtIn = false); - virtual void intcoopmatCheck(const TSourceLoc&, const char *op, bool builtIn = false); + virtual void fcoopmatCheckNV(const TSourceLoc&, const char* op, bool builtIn = false); + virtual void intcoopmatCheckNV(const TSourceLoc&, const char *op, bool builtIn = false); + virtual void coopmatCheck(const TSourceLoc&, const char* op, bool builtIn = false); bool relaxedErrors() const { return (messages & EShMsgRelaxedErrors) != 0; } bool suppressWarnings() const { return (messages & EShMsgSuppressWarnings) != 0; } bool isForwardCompatible() const { return forwardCompatible; } -#endif // GLSLANG_WEB + virtual void spvRemoved(const TSourceLoc&, const char* op); virtual void vulkanRemoved(const TSourceLoc&, const char* op); virtual void requireVulkan(const TSourceLoc&, const char* op); virtual void requireSpv(const TSourceLoc&, const char* op); virtual void requireSpv(const TSourceLoc&, const char *op, unsigned int version); - -#if defined(GLSLANG_WEB) && !defined(GLSLANG_WEB_DEVEL) - void C_DECL error(const TSourceLoc&, const char* szReason, const char* szToken, - const char* szExtraInfoFormat, ...) { addError(); } - void C_DECL warn(const TSourceLoc&, const char* szReason, const char* szToken, - const char* szExtraInfoFormat, ...) { } - void C_DECL ppError(const TSourceLoc&, const char* szReason, const char* szToken, - const char* szExtraInfoFormat, ...) { addError(); } - void C_DECL ppWarn(const TSourceLoc&, const char* szReason, const char* szToken, - const char* szExtraInfoFormat, ...) { } -#else virtual void C_DECL error(const TSourceLoc&, const char* szReason, const char* szToken, const char* szExtraInfoFormat, ...) = 0; virtual void C_DECL warn(const TSourceLoc&, const char* szReason, const char* szToken, @@ -193,7 +134,6 @@ public: const char* szExtraInfoFormat, ...) = 0; virtual void C_DECL ppWarn(const TSourceLoc&, const char* szReason, const char* szToken, const char* szExtraInfoFormat, ...) = 0; -#endif void addError() { ++numErrors; } int getNumErrors() const { return numErrors; } @@ -226,6 +166,7 @@ public: protected: TMap extensionBehavior; // for each extension string, what its current behavior is TMap extensionMinSpv; // for each extension string, store minimum spirv required + TVector spvUnsupportedExt; // for extensions reserved for spv usage. EShMessages messages; // errors/warnings/rule-sets int numErrors; // number of compile-time errors encountered TInputScanner* currentScanner; diff --git a/glslang/MachineIndependent/preprocessor/Pp.cpp b/glslang/MachineIndependent/preprocessor/Pp.cpp index aa1e0d74..16b9d243 100755 --- a/glslang/MachineIndependent/preprocessor/Pp.cpp +++ b/glslang/MachineIndependent/preprocessor/Pp.cpp @@ -378,8 +378,6 @@ namespace { int op_cmpl(int a) { return ~a; } int op_not(int a) { return !a; } -}; - struct TBinop { int token, precedence, (*op)(int, int); } binop[] = { @@ -412,6 +410,8 @@ struct TUnop { { '!', op_not }, }; +} // anonymous namespace + #define NUM_ELEMENTS(A) (sizeof(A) / sizeof(A[0])) int TPpContext::eval(int token, int precedence, bool shortCircuit, int& res, bool& err, TPpToken* ppToken) @@ -736,7 +736,6 @@ int TPpContext::CPPline(TPpToken* ppToken) parseContext.setCurrentLine(lineRes); if (token != '\n') { -#ifndef GLSLANG_WEB if (token == PpAtomConstString) { parseContext.ppRequireExtensions(directiveLoc, 1, &E_GL_GOOGLE_cpp_style_line_directive, "filename-based #line"); // We need to save a copy of the string instead of pointing @@ -746,9 +745,7 @@ int TPpContext::CPPline(TPpToken* ppToken) parseContext.setCurrentSourceName(sourceName); hasFile = true; token = scanToken(ppToken); - } else -#endif - { + } else { token = eval(token, MIN_PRECEDENCE, false, fileRes, fileErr, ppToken); if (! fileErr) { parseContext.setCurrentString(fileRes); @@ -974,7 +971,6 @@ int TPpContext::readCPPline(TPpToken* ppToken) case PpAtomLine: token = CPPline(ppToken); break; -#ifndef GLSLANG_WEB case PpAtomInclude: if(!parseContext.isReadingHLSL()) { parseContext.ppRequireExtensions(ppToken->loc, 1, &E_GL_GOOGLE_include_directive, "#include"); @@ -984,7 +980,6 @@ int TPpContext::readCPPline(TPpToken* ppToken) case PpAtomPragma: token = CPPpragma(ppToken); break; -#endif case PpAtomUndef: token = CPPundef(ppToken); break; @@ -1126,9 +1121,6 @@ int TPpContext::tMacroInput::scan(TPpToken* ppToken) pasting = true; } - // HLSL does expand macros before concatenation - if (pasting && pp->parseContext.isReadingHLSL()) - pasting = false; // TODO: preprocessor: properly handle whitespace (or lack of it) between tokens when expanding if (token == PpAtomIdentifier) { @@ -1138,9 +1130,12 @@ int TPpContext::tMacroInput::scan(TPpToken* ppToken) break; if (i >= 0) { TokenStream* arg = expandedArgs[i]; - if (arg == nullptr || pasting) + bool expanded = !!arg && !pasting; + // HLSL does expand macros before concatenation + if (arg == nullptr || (pasting && !pp->parseContext.isReadingHLSL()) ) { arg = args[i]; - pp->pushTokenStreamInput(*arg, prepaste); + } + pp->pushTokenStreamInput(*arg, prepaste, expanded); return pp->scanToken(ppToken); } @@ -1183,6 +1178,9 @@ MacroExpandResult TPpContext::MacroExpand(TPpToken* ppToken, bool expandUndef, b { ppToken->space = false; int macroAtom = atomStrings.getAtom(ppToken->name); + if (ppToken->fullyExpanded) + return MacroExpandNotStarted; + switch (macroAtom) { case PpAtomLineMacro: // Arguments which are macro have been replaced in the first stage. @@ -1214,8 +1212,10 @@ MacroExpandResult TPpContext::MacroExpand(TPpToken* ppToken, bool expandUndef, b MacroSymbol* macro = macroAtom == 0 ? nullptr : lookupMacroDef(macroAtom); // no recursive expansions - if (macro != nullptr && macro->busy) + if (macro != nullptr && macro->busy) { + ppToken->fullyExpanded = true; return MacroExpandNotStarted; + } // not expanding undefined macros if ((macro == nullptr || macro->undef) && ! expandUndef) diff --git a/glslang/MachineIndependent/preprocessor/PpContext.h b/glslang/MachineIndependent/preprocessor/PpContext.h index 714b5ead..1ec30491 100755 --- a/glslang/MachineIndependent/preprocessor/PpContext.h +++ b/glslang/MachineIndependent/preprocessor/PpContext.h @@ -86,11 +86,6 @@ NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "../ParseHelper.h" #include "PpTokens.h" -/* windows only pragma */ -#ifdef _MSC_VER - #pragma warning(disable : 4127) -#endif - namespace glslang { class TPpToken { @@ -102,6 +97,7 @@ public: i64val = 0; loc.init(); name[0] = 0; + fullyExpanded = false; } // Used for comparing macro definitions, so checks what is relevant for that. @@ -117,6 +113,8 @@ public: // True if a space (for white space or a removed comment) should also be // recognized, in front of the token returned: bool space; + + bool fullyExpanded; // Numeric value of the token: union { int ival; @@ -217,6 +215,7 @@ public: virtual bool peekContinuedPasting(int) { return false; } // true when non-spaced tokens can paste virtual bool endOfReplacementList() { return false; } // true when at the end of a macro replacement list (RHS of #define) virtual bool isMacroInput() { return false; } + virtual bool isStringInput() { return false; } // Will be called when we start reading tokens from this instance virtual void notifyActivated() {} @@ -357,7 +356,8 @@ protected: // Scanner data: int previous_token; TParseContextBase& parseContext; - + std::vector lastLineTokens; + std::vector lastLineTokenLocs; // Get the next token from *stack* of input sources, popping input sources // that are out of tokens, down until an input source is found that has a token. // Return EndOfInput when there are no more tokens to be found by doing this. @@ -371,7 +371,31 @@ protected: break; popInput(); } - + if (!inputStack.empty() && inputStack.back()->isStringInput()) { + if (token == '\n') { + bool seenNumSign = false; + for (int i = 0; i < (int)lastLineTokens.size() - 1;) { + int curPos = i; + int curToken = lastLineTokens[i++]; + if (curToken == '#' && lastLineTokens[i] == '#') { + curToken = PpAtomPaste; + i++; + } + if (curToken == '#') { + if (seenNumSign) { + parseContext.ppError(lastLineTokenLocs[curPos], "(#) can be preceded in its line only by spaces or horizontal tabs", "#", ""); + } else { + seenNumSign = true; + } + } + } + lastLineTokens.clear(); + lastLineTokenLocs.clear(); + } else { + lastLineTokens.push_back(token); + lastLineTokenLocs.push_back(ppToken->loc); + } + } return token; } int getChar() { return inputStack.back()->getch(); } @@ -475,16 +499,27 @@ protected: // // From PpTokens.cpp // - void pushTokenStreamInput(TokenStream&, bool pasting = false); + void pushTokenStreamInput(TokenStream&, bool pasting = false, bool expanded = false); void UngetToken(int token, TPpToken*); class tTokenInput : public tInput { public: - tTokenInput(TPpContext* pp, TokenStream* t, bool prepasting) : + tTokenInput(TPpContext* pp, TokenStream* t, bool prepasting, bool expanded) : tInput(pp), tokens(t), - lastTokenPastes(prepasting) { } - virtual int scan(TPpToken *ppToken) override { return tokens->getToken(pp->parseContext, ppToken); } + lastTokenPastes(prepasting), + preExpanded(expanded) { } + virtual int scan(TPpToken *ppToken) override { + int token = tokens->getToken(pp->parseContext, ppToken); + ppToken->fullyExpanded = preExpanded; + if (tokens->atEnd() && token == PpAtomIdentifier) { + int macroAtom = pp->atomStrings.getAtom(ppToken->name); + MacroSymbol* macro = macroAtom == 0 ? nullptr : pp->lookupMacroDef(macroAtom); + if (macro && macro->functionLike) + ppToken->fullyExpanded = false; + } + return token; + } virtual int getch() override { assert(0); return EndOfInput; } virtual void ungetch() override { assert(0); } virtual bool peekPasting() override { return tokens->peekTokenizedPasting(lastTokenPastes); } @@ -492,6 +527,7 @@ protected: protected: TokenStream* tokens; bool lastTokenPastes; // true if the last token in the input is to be pasted, rather than consumed as a token + bool preExpanded; }; class tUngotTokenInput : public tInput { @@ -512,7 +548,7 @@ protected: public: tStringInput(TPpContext* pp, TInputScanner& i) : tInput(pp), input(&i) { } virtual int scan(TPpToken*) override; - + bool isStringInput() override { return true; } // Scanner used to get source stream characters. // - Escaped newlines are handled here, invisibly to the caller. // - All forms of newline are handled, and turned into just a '\n'. diff --git a/glslang/MachineIndependent/preprocessor/PpScanner.cpp b/glslang/MachineIndependent/preprocessor/PpScanner.cpp index ad117920..34dec207 100755 --- a/glslang/MachineIndependent/preprocessor/PpScanner.cpp +++ b/glslang/MachineIndependent/preprocessor/PpScanner.cpp @@ -3,6 +3,7 @@ // Copyright (C) 2013 LunarG, Inc. // Copyright (C) 2017 ARM Limited. // Copyright (C) 2015-2018 Google, Inc. +// Copyright (c) 2023, Mobica Limited // // All rights reserved. // @@ -259,7 +260,6 @@ int TPpContext::lFloatConst(int len, int ch, TPpToken* ppToken) // Suffix: bool isDouble = false; bool isFloat16 = false; -#ifndef GLSLANG_WEB if (ch == 'l' || ch == 'L') { if (ifdepth == 0 && parseContext.intermediate.getSource() == EShSourceGlsl) parseContext.doubleCheck(ppToken->loc, "double floating-point suffix"); @@ -299,14 +299,11 @@ int TPpContext::lFloatConst(int len, int ch, TPpToken* ppToken) isFloat16 = true; } } else -#endif if (ch == 'f' || ch == 'F') { -#ifndef GLSLANG_WEB if (ifdepth == 0) parseContext.profileRequires(ppToken->loc, EEsProfile, 300, nullptr, "floating-point suffix"); if (ifdepth == 0 && !parseContext.relaxedErrors()) parseContext.profileRequires(ppToken->loc, ~EEsProfile, 120, nullptr, "floating-point suffix"); -#endif if (ifdepth == 0 && !hasDecimalOrExponent) parseContext.ppError(ppToken->loc, "float literal needs a decimal point or exponent", "", ""); saveName(ch); @@ -480,9 +477,7 @@ int TPpContext::tStringInput::scan(TPpToken* ppToken) E_GL_EXT_shader_explicit_arithmetic_types_int16 }; static const int Num_Int16_Extensions = sizeof(Int16_Extensions) / sizeof(Int16_Extensions[0]); - ppToken->ival = 0; - ppToken->i64val = 0; - ppToken->space = false; + ppToken->clear(); ch = getch(); for (;;) { while (ch == ' ' || ch == '\t') { @@ -551,7 +546,7 @@ int TPpContext::tStringInput::scan(TPpToken* ppToken) ival = 0; do { - if (len < MaxTokenLength && ival <= 0x0fffffffffffffffull) { + if (len < MaxTokenLength && ival <= 0x7fffffffffffffffull) { ppToken->name[len++] = (char)ch; if (ch >= '0' && ch <= '9') { ii = ch - '0'; @@ -584,7 +579,6 @@ int TPpContext::tStringInput::scan(TPpToken* ppToken) ppToken->name[len++] = (char)ch; isUnsigned = true; -#ifndef GLSLANG_WEB int nextCh = getch(); if (nextCh == 'l' || nextCh == 'L') { if (len < MaxTokenLength) @@ -610,7 +604,6 @@ int TPpContext::tStringInput::scan(TPpToken* ppToken) if (len < MaxTokenLength) ppToken->name[len++] = (char)ch; isInt16 = true; -#endif } else ungetch(); ppToken->name[len] = '\0'; @@ -641,6 +634,108 @@ int TPpContext::tStringInput::scan(TPpToken* ppToken) ppToken->ival = (int)ival; return isUnsigned ? PpAtomConstUint : PpAtomConstInt; } + } else if ((ch == 'b' || ch == 'B') && pp->parseContext.intermediate.getSource() == EShSourceHlsl) { + // must be binary + bool isUnsigned = false; + bool isInt64 = false; + bool isInt16 = false; + ppToken->name[len++] = (char)ch; + ch = getch(); + + // Check value + if ((ch == '0' || ch == '1')) + { + ival = 0; + do { + if (len < MaxTokenLength && ival <= 0x7fffffffffffffffull) { + ppToken->name[len++] = (char)ch; + if (ch == '0' || ch == '1') { + ii = ch - '0'; + } else { + pp->parseContext.ppError(ppToken->loc, "bad digit in binary literal", "", ""); + } + ival = (ival << 1) | ii; + } + else + { + if (! AlreadyComplained) { + if(len < MaxTokenLength) + pp->parseContext.ppError(ppToken->loc, "binary literal too big", "", ""); + else + pp->parseContext.ppError(ppToken->loc, "binary literal too long", "", ""); + AlreadyComplained = 1; + } + ival = 0xffffffffffffffffull; + } + ch = getch(); + } while (ch == '0' || ch == '1'); + } + else + { + pp->parseContext.ppError(ppToken->loc, "bad digit in binary literal", "", ""); + } + + // check type + if (ch == 'u' || ch == 'U') { + if (len < MaxTokenLength) + ppToken->name[len++] = (char)ch; + isUnsigned = true; + + int nextCh = getch(); + if (nextCh == 'l' || nextCh == 'L') { + if (len < MaxTokenLength) + ppToken->name[len++] = (char)nextCh; + isInt64 = true; + } else + ungetch(); + + nextCh = getch(); + if ((nextCh == 's' || nextCh == 'S') && + pp->parseContext.intermediate.getSource() == EShSourceGlsl) { + if (len < MaxTokenLength) + ppToken->name[len++] = (char)nextCh; + isInt16 = true; + } else + ungetch(); + } else if (ch == 'l' || ch == 'L') { + if (len < MaxTokenLength) + ppToken->name[len++] = (char)ch; + isInt64 = true; + } else if ((ch == 's' || ch == 'S') && + pp->parseContext.intermediate.getSource() == EShSourceGlsl) { + if (len < MaxTokenLength) + ppToken->name[len++] = (char)ch; + isInt16 = true; + } else { + ungetch(); + } + ppToken->name[len] = '\0'; + + // Assign value + if (isInt64 && pp->parseContext.intermediate.getSource() == EShSourceGlsl) { + if (pp->ifdepth == 0) { + pp->parseContext.requireProfile(ppToken->loc, ~EEsProfile, + "64-bit binary literal"); + pp->parseContext.profileRequires(ppToken->loc, ~EEsProfile, 0, + Num_Int64_Extensions, Int64_Extensions, "64-bit binary literal"); + } + ppToken->i64val = ival; + return isUnsigned ? PpAtomConstUint64 : PpAtomConstInt64; + } else if (isInt16) { + if (pp->ifdepth == 0) { + if (pp->parseContext.intermediate.getSource() == EShSourceGlsl) { + pp->parseContext.requireProfile(ppToken->loc, ~EEsProfile, + "16-bit binary literal"); + pp->parseContext.profileRequires(ppToken->loc, ~EEsProfile, 0, + Num_Int16_Extensions, Int16_Extensions, "16-bit binary literal"); + } + } + ppToken->ival = (int)ival; + return isUnsigned ? PpAtomConstUint16 : PpAtomConstInt16; + } else { + ppToken->ival = (int)ival; + return isUnsigned ? PpAtomConstUint : PpAtomConstInt; + } } else { // could be octal integer or floating point, speculative pursue octal until it must be floating point @@ -692,7 +787,6 @@ int TPpContext::tStringInput::scan(TPpToken* ppToken) ppToken->name[len++] = (char)ch; isUnsigned = true; -#ifndef GLSLANG_WEB int nextCh = getch(); if (nextCh == 'l' || nextCh == 'L') { if (len < MaxTokenLength) @@ -718,7 +812,6 @@ int TPpContext::tStringInput::scan(TPpToken* ppToken) if (len < MaxTokenLength) ppToken->name[len++] = (char)ch; isInt16 = true; -#endif } else ungetch(); ppToken->name[len] = '\0'; @@ -781,7 +874,6 @@ int TPpContext::tStringInput::scan(TPpToken* ppToken) ppToken->name[len++] = (char)ch; isUnsigned = true; -#ifndef GLSLANG_WEB int nextCh = getch(); if (nextCh == 'l' || nextCh == 'L') { if (len < MaxTokenLength) @@ -807,7 +899,6 @@ int TPpContext::tStringInput::scan(TPpToken* ppToken) if (len < MaxTokenLength) ppToken->name[len++] = (char)ch; isInt16 = true; -#endif } else ungetch(); diff --git a/glslang/MachineIndependent/preprocessor/PpTokens.cpp b/glslang/MachineIndependent/preprocessor/PpTokens.cpp index e17eeafd..e6ee64cf 100755 --- a/glslang/MachineIndependent/preprocessor/PpTokens.cpp +++ b/glslang/MachineIndependent/preprocessor/PpTokens.cpp @@ -85,9 +85,6 @@ NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #ifndef _CRT_SECURE_NO_WARNINGS #define _CRT_SECURE_NO_WARNINGS #endif -#if (defined(_MSC_VER) && _MSC_VER < 1900 /*vs2015*/) -#define snprintf sprintf_s -#endif #include #include @@ -116,7 +113,6 @@ int TPpContext::TokenStream::getToken(TParseContextBase& parseContext, TPpToken int atom = stream[currentPos++].get(*ppToken); ppToken->loc = parseContext.getCurrentLoc(); -#ifndef GLSLANG_WEB // Check for ##, unless the current # is the last character if (atom == '#') { if (peekToken('#')) { @@ -126,7 +122,6 @@ int TPpContext::TokenStream::getToken(TParseContextBase& parseContext, TPpToken atom = PpAtomPaste; } } -#endif return atom; } @@ -195,9 +190,9 @@ bool TPpContext::TokenStream::peekUntokenizedPasting() return pasting; } -void TPpContext::pushTokenStreamInput(TokenStream& ts, bool prepasting) +void TPpContext::pushTokenStreamInput(TokenStream& ts, bool prepasting, bool expanded) { - pushInput(new tTokenInput(this, &ts, prepasting)); + pushInput(new tTokenInput(this, &ts, prepasting, expanded)); ts.reset(); } diff --git a/glslang/MachineIndependent/propagateNoContraction.cpp b/glslang/MachineIndependent/propagateNoContraction.cpp index a1aa5ea6..7b5cd03f 100755 --- a/glslang/MachineIndependent/propagateNoContraction.cpp +++ b/glslang/MachineIndependent/propagateNoContraction.cpp @@ -37,8 +37,6 @@ // propagate the 'noContraction' qualifier. // -#ifndef GLSLANG_WEB - #include "propagateNoContraction.h" #include @@ -865,6 +863,4 @@ void PropagateNoContraction(const glslang::TIntermediate& intermediate) precise_object_accesschains.erase(precise_object_accesschain); } } -}; - -#endif // GLSLANG_WEB +} diff --git a/glslang/MachineIndependent/reflection.cpp b/glslang/MachineIndependent/reflection.cpp index 144f85bd..6c7d3a2c 100755 --- a/glslang/MachineIndependent/reflection.cpp +++ b/glslang/MachineIndependent/reflection.cpp @@ -33,8 +33,6 @@ // POSSIBILITY OF SUCH DAMAGE. // -#if !defined(GLSLANG_WEB) - #include "../Include/Common.h" #include "reflection.h" #include "LiveTraverser.h" @@ -1270,5 +1268,3 @@ void TReflection::dump() } } // end namespace glslang - -#endif // !GLSLANG_WEB diff --git a/glslang/MachineIndependent/reflection.h b/glslang/MachineIndependent/reflection.h index bfd54526..221d93f8 100755 --- a/glslang/MachineIndependent/reflection.h +++ b/glslang/MachineIndependent/reflection.h @@ -33,8 +33,6 @@ // POSSIBILITY OF SUCH DAMAGE. // -#if !defined(GLSLANG_WEB) - #ifndef _REFLECTION_INCLUDED #define _REFLECTION_INCLUDED @@ -219,5 +217,3 @@ protected: } // end namespace glslang #endif // _REFLECTION_INCLUDED - -#endif // !GLSLANG_WEB diff --git a/glslang/OSDependent/Unix/CMakeLists.txt b/glslang/OSDependent/Unix/CMakeLists.txt index 7ed71fbf..ec35da30 100755 --- a/glslang/OSDependent/Unix/CMakeLists.txt +++ b/glslang/OSDependent/Unix/CMakeLists.txt @@ -36,23 +36,11 @@ set_property(TARGET OSDependent PROPERTY FOLDER glslang) set_property(TARGET OSDependent PROPERTY POSITION_INDEPENDENT_CODE ON) # Link pthread -set(CMAKE_THREAD_PREFER_PTHREAD ON) -if(${CMAKE_VERSION} VERSION_LESS "3.1.0" OR CMAKE_CROSSCOMPILING) - # Needed as long as we support CMake 2.8 for Ubuntu 14.04, - # which does not support the recommended Threads::Threads target. - # https://cmake.org/cmake/help/v2.8.12/cmake.html#module:FindThreads - # Also needed when cross-compiling to work around - # https://gitlab.kitware.com/cmake/cmake/issues/16920 - find_package(Threads) - target_link_libraries(OSDependent ${CMAKE_THREAD_LIBS_INIT}) -else() - # This is the recommended way, so we use it for 3.1+. - set(THREADS_PREFER_PTHREAD_FLAG ON) - find_package(Threads) - target_link_libraries(OSDependent Threads::Threads) -endif() +set(THREADS_PREFER_PTHREAD_FLAG ON) +find_package(Threads REQUIRED) +target_link_libraries(OSDependent Threads::Threads) -if(ENABLE_GLSLANG_INSTALL AND NOT BUILD_SHARED_LIBS) +if(PROJECT_IS_TOP_LEVEL AND NOT BUILD_SHARED_LIBS) install(TARGETS OSDependent EXPORT glslang-targets) # Backward compatibility @@ -60,7 +48,7 @@ if(ENABLE_GLSLANG_INSTALL AND NOT BUILD_SHARED_LIBS) message(WARNING \"Using `OSDependentTargets.cmake` is deprecated: use `find_package(glslang)` to find glslang CMake targets.\") if (NOT TARGET glslang::OSDependent) - include(\"\${CMAKE_CURRENT_LIST_DIR}/../../${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}/glslang-targets.cmake\") + include(\"${CMAKE_INSTALL_FULL_LIBDIR}/cmake/${PROJECT_NAME}/glslang-targets.cmake\") endif() add_library(OSDependent ALIAS glslang::OSDependent) diff --git a/glslang/OSDependent/Unix/ossource.cpp b/glslang/OSDependent/Unix/ossource.cpp index 9a31a9aa..fbb51f7b 100755 --- a/glslang/OSDependent/Unix/ossource.cpp +++ b/glslang/OSDependent/Unix/ossource.cpp @@ -36,15 +36,8 @@ // This file contains the Linux-specific functions // #include "../osinclude.h" -#include "../../../OGLCompilersDLL/InitializeDll.h" -#include -#include -#include -#include -#include #include -#include #if !defined(__Fuchsia__) #include @@ -52,104 +45,6 @@ namespace glslang { -// -// Thread cleanup -// - -// -// Thread Local Storage Operations -// -inline OS_TLSIndex PthreadKeyToTLSIndex(pthread_key_t key) -{ - return (OS_TLSIndex)((uintptr_t)key + 1); -} - -inline pthread_key_t TLSIndexToPthreadKey(OS_TLSIndex nIndex) -{ - return (pthread_key_t)((uintptr_t)nIndex - 1); -} - -OS_TLSIndex OS_AllocTLSIndex() -{ - pthread_key_t pPoolIndex; - - // - // Create global pool key. - // - if ((pthread_key_create(&pPoolIndex, nullptr)) != 0) { - assert(0 && "OS_AllocTLSIndex(): Unable to allocate Thread Local Storage"); - return OS_INVALID_TLS_INDEX; - } - else - return PthreadKeyToTLSIndex(pPoolIndex); -} - -bool OS_SetTLSValue(OS_TLSIndex nIndex, void *lpvValue) -{ - if (nIndex == OS_INVALID_TLS_INDEX) { - assert(0 && "OS_SetTLSValue(): Invalid TLS Index"); - return false; - } - - if (pthread_setspecific(TLSIndexToPthreadKey(nIndex), lpvValue) == 0) - return true; - else - return false; -} - -void* OS_GetTLSValue(OS_TLSIndex nIndex) -{ - // - // This function should return 0 if nIndex is invalid. - // - assert(nIndex != OS_INVALID_TLS_INDEX); - return pthread_getspecific(TLSIndexToPthreadKey(nIndex)); -} - -bool OS_FreeTLSIndex(OS_TLSIndex nIndex) -{ - if (nIndex == OS_INVALID_TLS_INDEX) { - assert(0 && "OS_SetTLSValue(): Invalid TLS Index"); - return false; - } - - // - // Delete the global pool key. - // - if (pthread_key_delete(TLSIndexToPthreadKey(nIndex)) == 0) - return true; - else - return false; -} - -namespace { - pthread_mutex_t gMutex; -} - -static void InitMutex(void) -{ - pthread_mutexattr_t mutexattr; - pthread_mutexattr_init(&mutexattr); - pthread_mutexattr_settype(&mutexattr, PTHREAD_MUTEX_RECURSIVE); - 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); -} - -void ReleaseGlobalLock() -{ - pthread_mutex_unlock(&gMutex); -} - // #define DUMP_COUNTERS void OS_DumpMemoryCounters() diff --git a/glslang/OSDependent/Web/CMakeLists.txt b/glslang/OSDependent/Web/CMakeLists.txt index 5bfbed41..5d174960 100755 --- a/glslang/OSDependent/Web/CMakeLists.txt +++ b/glslang/OSDependent/Web/CMakeLists.txt @@ -53,6 +53,9 @@ if(ENABLE_GLSLANG_JS) target_link_libraries(glslang.js "-s ALLOW_MEMORY_GROWTH=1") target_link_libraries(glslang.js "-s FILESYSTEM=0") + # We use ccall in glslang.pre.js, so make sure it's exposed + target_link_libraries(glslang.js "-s EXPORTED_RUNTIME_METHODS=ccall") + if(ENABLE_EMSCRIPTEN_SINGLE_FILE) target_link_libraries(glslang.js "-s SINGLE_FILE=1") endif() @@ -64,8 +67,28 @@ if(ENABLE_GLSLANG_JS) endif() if(NOT ENABLE_EMSCRIPTEN_ENVIRONMENT_NODE) - add_custom_command(TARGET glslang.js POST_BUILD - COMMAND cat ${CMAKE_CURRENT_SOURCE_DIR}/glslang.after.js >> ${CMAKE_CURRENT_BINARY_DIR}/glslang.js) + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.18") + add_custom_command(TARGET glslang.js POST_BUILD + COMMAND ${CMAKE_COMMAND} -E cat ${CMAKE_CURRENT_SOURCE_DIR}/glslang.after.js >> ${CMAKE_CURRENT_BINARY_DIR}/glslang.js + ) + else() + if (MINGW) + message(FATAL_ERROR "Must use at least CMake 3.18") + endif() + + if (CMAKE_HOST_SYSTEM MATCHES "Windows.*") + # There are several ways we could append one file to another on Windows, but unfortunately 'cat' is not one of them + # (there is no 'cat' command in cmd). Also, since this will ultimately run in cmd and not pwsh, we need to ensure + # Windows path separators are used. + file(TO_NATIVE_PATH "${CMAKE_CURRENT_BINARY_DIR}/glslang.js" glslang_js_path) + file(TO_NATIVE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/glslang.after.js" glslang_after_js_path) + add_custom_command(TARGET glslang.js POST_BUILD + COMMAND type "${glslang_after_js_path}" >> "${glslang_js_path}") + else() + add_custom_command(TARGET glslang.js POST_BUILD + COMMAND cat ${CMAKE_CURRENT_SOURCE_DIR}/glslang.after.js >> ${CMAKE_CURRENT_BINARY_DIR}/glslang.js) + endif() + endif() endif() endif() -endif() +endif() \ No newline at end of file diff --git a/glslang/OSDependent/Web/glslang.js.cpp b/glslang/OSDependent/Web/glslang.js.cpp index f2306a60..c820da6a 100755 --- a/glslang/OSDependent/Web/glslang.js.cpp +++ b/glslang/OSDependent/Web/glslang.js.cpp @@ -141,6 +141,15 @@ const TBuiltInResource DefaultTBuiltInResource = { /* .maxTaskWorkGroupSizeY_NV = */ 1, /* .maxTaskWorkGroupSizeZ_NV = */ 1, /* .maxMeshViewCountNV = */ 4, + /* .maxMeshOutputVerticesEXT = */ 256, + /* .maxMeshOutputPrimitivesEXT = */ 512, + /* .maxMeshWorkGroupSizeX_EXT = */ 32, + /* .maxMeshWorkGroupSizeY_EXT = */ 1, + /* .maxMeshWorkGroupSizeZ_EXT = */ 1, + /* .maxTaskWorkGroupSizeX_EXT = */ 32, + /* .maxTaskWorkGroupSizeY_EXT = */ 1, + /* .maxTaskWorkGroupSizeZ_EXT = */ 1, + /* .maxMeshViewCountEXT = */ 4, /* .maxDualSourceDrawBuffersEXT = */ 1, /* .limits = */ { diff --git a/glslang/OSDependent/Web/glslang.pre.js b/glslang/OSDependent/Web/glslang.pre.js index 46a56950..390390e9 100755 --- a/glslang/OSDependent/Web/glslang.pre.js +++ b/glslang/OSDependent/Web/glslang.pre.js @@ -25,7 +25,7 @@ Module['compileGLSLZeroCopy'] = function(glsl, shader_stage, gen_debug, spirv_ve var p_output = Module['_malloc'](4); var p_output_len = Module['_malloc'](4); - var id = ccall('convert_glsl_to_spirv', + var id = Module['ccall']('convert_glsl_to_spirv', 'number', ['string', 'number', 'boolean', 'number', 'number', 'number'], [glsl, shader_stage_int, gen_debug, spirv_version_int, p_output, p_output_len]); diff --git a/glslang/OSDependent/Windows/CMakeLists.txt b/glslang/OSDependent/Windows/CMakeLists.txt index 67976da8..b8af046c 100755 --- a/glslang/OSDependent/Windows/CMakeLists.txt +++ b/glslang/OSDependent/Windows/CMakeLists.txt @@ -31,15 +31,19 @@ # ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGE. -set(SOURCES ossource.cpp ../osinclude.h) +add_library(OSDependent STATIC) + +target_sources(OSDependent PRIVATE + ../osinclude.h + ossource.cpp +) -add_library(OSDependent STATIC ${SOURCES}) set_property(TARGET OSDependent PROPERTY FOLDER glslang) set_property(TARGET OSDependent PROPERTY POSITION_INDEPENDENT_CODE ON) # MinGW GCC complains about function pointer casts to void*. # Turn that off with -fpermissive. -if(${CMAKE_CXX_COMPILER_ID} MATCHES "GNU") +if(MINGW AND ${CMAKE_CXX_COMPILER_ID} MATCHES "GNU") target_compile_options(OSDependent PRIVATE -fpermissive) endif() @@ -47,7 +51,7 @@ if(WIN32) source_group("Source" FILES ${SOURCES}) endif() -if(ENABLE_GLSLANG_INSTALL) +if(PROJECT_IS_TOP_LEVEL) install(TARGETS OSDependent EXPORT glslang-targets) # Backward compatibility @@ -55,7 +59,7 @@ if(ENABLE_GLSLANG_INSTALL) message(WARNING \"Using `OSDependentTargets.cmake` is deprecated: use `find_package(glslang)` to find glslang CMake targets.\") if (NOT TARGET glslang::OSDependent) - include(\"\${CMAKE_CURRENT_LIST_DIR}/../../${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}/glslang-targets.cmake\") + include(\"${CMAKE_INSTALL_FULL_LIBDIR}/cmake/${PROJECT_NAME}/glslang-targets.cmake\") endif() add_library(OSDependent ALIAS glslang::OSDependent) diff --git a/glslang/OSDependent/Windows/ossource.cpp b/glslang/OSDependent/Windows/ossource.cpp index fa372a2c..d7f89f71 100755 --- a/glslang/OSDependent/Windows/ossource.cpp +++ b/glslang/OSDependent/Windows/ossource.cpp @@ -37,11 +37,9 @@ #define STRICT #define VC_EXTRALEAN 1 #include -#include #include #include #include -#include // // This file contains the Window-OS-specific functions @@ -53,84 +51,6 @@ namespace glslang { -inline OS_TLSIndex ToGenericTLSIndex (DWORD handle) -{ - return (OS_TLSIndex)((uintptr_t)handle + 1); -} - -inline DWORD ToNativeTLSIndex (OS_TLSIndex nIndex) -{ - return (DWORD)((uintptr_t)nIndex - 1); -} - -// -// Thread Local Storage Operations -// -OS_TLSIndex OS_AllocTLSIndex() -{ - DWORD dwIndex = TlsAlloc(); - if (dwIndex == TLS_OUT_OF_INDEXES) { - assert(0 && "OS_AllocTLSIndex(): Unable to allocate Thread Local Storage"); - return OS_INVALID_TLS_INDEX; - } - - return ToGenericTLSIndex(dwIndex); -} - -bool OS_SetTLSValue(OS_TLSIndex nIndex, void *lpvValue) -{ - if (nIndex == OS_INVALID_TLS_INDEX) { - assert(0 && "OS_SetTLSValue(): Invalid TLS Index"); - return false; - } - - if (TlsSetValue(ToNativeTLSIndex(nIndex), lpvValue)) - return true; - else - return false; -} - -void* OS_GetTLSValue(OS_TLSIndex nIndex) -{ - assert(nIndex != OS_INVALID_TLS_INDEX); - return TlsGetValue(ToNativeTLSIndex(nIndex)); -} - -bool OS_FreeTLSIndex(OS_TLSIndex nIndex) -{ - if (nIndex == OS_INVALID_TLS_INDEX) { - assert(0 && "OS_SetTLSValue(): Invalid TLS Index"); - return false; - } - - if (TlsFree(ToNativeTLSIndex(nIndex))) - return true; - else - return false; -} - -HANDLE GlobalLock; - -void InitGlobalLock() -{ - GlobalLock = CreateMutex(nullptr, false, nullptr); -} - -void GetGlobalLock() -{ - WaitForSingleObject(GlobalLock, INFINITE); -} - -void ReleaseGlobalLock() -{ - ReleaseMutex(GlobalLock); -} - -unsigned int __stdcall EnterGenericThread (void* entry) -{ - return ((TThreadEntrypoint)entry)(nullptr); -} - //#define DUMP_COUNTERS void OS_DumpMemoryCounters() diff --git a/glslang/OSDependent/osinclude.h b/glslang/OSDependent/osinclude.h index 7eaa1134..0d677e4a 100755 --- a/glslang/OSDependent/osinclude.h +++ b/glslang/OSDependent/osinclude.h @@ -37,23 +37,6 @@ namespace glslang { -// -// Thread Local Storage Operations -// -typedef void* OS_TLSIndex; -#define OS_INVALID_TLS_INDEX nullptr - -OS_TLSIndex OS_AllocTLSIndex(); -bool OS_SetTLSValue(OS_TLSIndex nIndex, void *lpvValue); -bool OS_FreeTLSIndex(OS_TLSIndex nIndex); -void* OS_GetTLSValue(OS_TLSIndex nIndex); - -void InitGlobalLock(); -void GetGlobalLock(); -void ReleaseGlobalLock(); - -typedef unsigned int (*TThreadEntrypoint)(void*); - void OS_DumpMemoryCounters(); } // end namespace glslang diff --git a/glslang/Public/ShaderLang.h b/glslang/Public/ShaderLang.h index 90a5302a..e0ec47f8 100755 --- a/glslang/Public/ShaderLang.h +++ b/glslang/Public/ShaderLang.h @@ -318,8 +318,8 @@ typedef void* ShHandle; // Driver calls these to create and destroy compiler/linker // objects. // -GLSLANG_EXPORT ShHandle ShConstructCompiler(const EShLanguage, int debugOptions); // one per shader -GLSLANG_EXPORT ShHandle ShConstructLinker(const EShExecutable, int debugOptions); // one per shader pair +GLSLANG_EXPORT ShHandle ShConstructCompiler(const EShLanguage, int /*debugOptions unused*/); // one per shader +GLSLANG_EXPORT ShHandle ShConstructLinker(const EShExecutable, int /*debugOptions unused*/); // one per shader pair GLSLANG_EXPORT ShHandle ShConstructUniformMap(); // one per uniform namespace (currently entire program object) GLSLANG_EXPORT void ShDestruct(ShHandle); @@ -330,18 +330,13 @@ GLSLANG_EXPORT void ShDestruct(ShHandle); // The info-log should be written by ShCompile into // ShHandle, so it can answer future queries. // -GLSLANG_EXPORT int ShCompile( - const ShHandle, - const char* const shaderStrings[], - const int numStrings, - const int* lengths, - const EShOptimizationLevel, - const TBuiltInResource *resources, - int debugOptions, - int defaultVersion = 110, // use 100 for ES environment, overridden by #version in shader - bool forwardCompatible = false, // give errors for use of deprecated features - EShMessages messages = EShMsgDefault // warnings and errors - ); +GLSLANG_EXPORT int ShCompile(const ShHandle, const char* const shaderStrings[], const int numStrings, + const int* lengths, const EShOptimizationLevel, const TBuiltInResource* resources, + int, // debugOptions unused + int defaultVersion = 110, // use 100 for ES environment, overridden by #version in shader + bool forwardCompatible = false, // give errors for use of deprecated features + EShMessages messages = EShMsgDefault // warnings and errors +); GLSLANG_EXPORT int ShLinkExt( const ShHandle, // linker object @@ -573,6 +568,9 @@ public: void setEnvInputVulkanRulesRelaxed() { environment.input.vulkanRulesRelaxed = true; } bool getEnvInputVulkanRulesRelaxed() const { return environment.input.vulkanRulesRelaxed; } + void setCompileOnly() { compileOnly = true; } + bool getCompileOnly() const { return compileOnly; } + // Interface to #include handlers. // // To support #include, a client of Glslang does the following: @@ -722,14 +720,15 @@ protected: TEnvironment environment; + // Indicates this shader is meant to be used without linking + bool compileOnly = false; + friend class TProgram; private: TShader& operator=(TShader&); }; -#if !defined(GLSLANG_WEB) - // // A reflection database and its interface, consistent with the OpenGL API reflection queries. // @@ -846,8 +845,6 @@ public: virtual void addStage(EShLanguage stage, TIntermediate& stageIntermediate) = 0; }; -#endif // !GLSLANG_WEB - // Make one TProgram per set of shaders that will get linked together. Add all // the shaders that are to be linked together. After calling shader.parse() // for all shaders, call link(). @@ -867,8 +864,6 @@ public: TIntermediate* getIntermediate(EShLanguage stage) const { return intermediate[stage]; } -#if !defined(GLSLANG_WEB) - // Reflection Interface // call first, to do liveness analysis, index mapping, etc.; returns false on failure @@ -961,7 +956,6 @@ public: // If resolver is not provided it uses the previous approach // and respects auto assignment and offsets. GLSLANG_EXPORT bool mapIO(TIoMapResolver* pResolver = nullptr, TIoMapper* pIoMapper = nullptr); -#endif // !GLSLANG_WEB protected: GLSLANG_EXPORT bool linkStage(EShLanguage, EShMessages); @@ -972,9 +966,7 @@ protected: TIntermediate* intermediate[EShLangCount]; bool newedIntermediate[EShLangCount]; // track which intermediate were "new" versus reusing a singleton unit in a stage TInfoSink* infoSink; -#if !defined(GLSLANG_WEB) TReflection* reflection; -#endif bool linked; private: diff --git a/StandAlone/ResourceLimits.cpp b/glslang/ResourceLimits/ResourceLimits.cpp similarity index 99% rename from StandAlone/ResourceLimits.cpp rename to glslang/ResourceLimits/ResourceLimits.cpp index 6e1a3d85..0e9d1b54 100755 --- a/StandAlone/ResourceLimits.cpp +++ b/glslang/ResourceLimits/ResourceLimits.cpp @@ -505,6 +505,8 @@ void DecodeResourceLimits(TBuiltInResource* resources, char* config) resources->maxTaskWorkGroupSizeZ_EXT = value; else if (tokenStr == "MaxMeshViewCountEXT") resources->maxMeshViewCountEXT = value; + else if (tokenStr == "MaxDualSourceDrawBuffersEXT") + resources->maxDualSourceDrawBuffersEXT = value; else if (tokenStr == "nonInductiveForLoops") resources->limits.nonInductiveForLoops = (value != 0); else if (tokenStr == "whileLoops") diff --git a/StandAlone/resource_limits_c.cpp b/glslang/ResourceLimits/resource_limits_c.cpp similarity index 84% rename from StandAlone/resource_limits_c.cpp rename to glslang/ResourceLimits/resource_limits_c.cpp index 0eeac23a..8909d9ef 100755 --- a/StandAlone/resource_limits_c.cpp +++ b/glslang/ResourceLimits/resource_limits_c.cpp @@ -42,28 +42,14 @@ const glslang_resource_t* glslang_default_resource(void) return reinterpret_cast(GetDefaultResources()); } -#if defined(__clang__) || defined(__GNUC__) -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wdeprecated-declarations" -#elif defined(_MSC_VER) -#pragma warning(push) -#pragma warning(disable : 4996) -#endif - const char* glslang_default_resource_string() { std::string cpp_str = GetDefaultTBuiltInResourceString(); char* c_str = (char*)malloc(cpp_str.length() + 1); - strcpy(c_str, cpp_str.c_str()); + strncpy(c_str, cpp_str.c_str(), cpp_str.length() + 1); return c_str; } -#if defined(__clang__) || defined(__GNUC__) -#pragma GCC diagnostic pop -#elif defined(_MSC_VER) -#pragma warning(pop) -#endif - void glslang_decode_resource_limits(glslang_resource_t* resources, char* config) { DecodeResourceLimits(reinterpret_cast(resources), config); diff --git a/glslang/updateGrammar b/glslang/updateGrammar index 9209493f..a15dc24b 100755 --- a/glslang/updateGrammar +++ b/glslang/updateGrammar @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh # Copyright (C) 2020 The Khronos Group Inc. # @@ -33,17 +33,4 @@ # ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGE. -if [ "$1" = 'web' ] -then - m4 -P -DGLSLANG_WEB MachineIndependent/glslang.m4 > MachineIndependent/glslang.y -elif [ "$#" -eq 0 ] -then - m4 -P MachineIndependent/glslang.m4 > MachineIndependent/glslang.y -else - echo usage: - echo $0 web - echo $0 - exit -fi - bison --defines=MachineIndependent/glslang_tab.cpp.h -t MachineIndependent/glslang.y -o MachineIndependent/glslang_tab.cpp diff --git a/gtests/AST.FromFile.cpp b/gtests/AST.FromFile.cpp index 1d975464..621d4fe0 100755 --- a/gtests/AST.FromFile.cpp +++ b/gtests/AST.FromFile.cpp @@ -211,6 +211,7 @@ INSTANTIATE_TEST_SUITE_P( "runtimeArray.vert", "simpleFunctionCall.frag", "stringToDouble.vert", + "struct.error.frag", "structAssignment.frag", "structDeref.frag", "structure.frag", @@ -280,6 +281,8 @@ INSTANTIATE_TEST_SUITE_P( "glsl.es320.subgroupShuffleRelative.comp", "glsl.es320.subgroupQuad.comp", "glsl.es320.subgroupVote.comp", + "glsl.es320.extTextureShadowLod.frag", + "glsl.ext.textureShadowLod.frag", "terminate.frag", "terminate.vert", "negativeWorkGroupSize.comp", @@ -291,11 +294,16 @@ INSTANTIATE_TEST_SUITE_P( "GL_EXT_shader_integer_mix.vert", "GL_ARB_draw_instanced.vert", "GL_ARB_fragment_coord_conventions.vert", + "GL_ARB_bindless_texture.frag", "BestMatchFunction.vert", "EndStreamPrimitive.geom", "floatBitsToInt.vert", "coord_conventions.frag", - "gl_FragCoord.frag" + "gl_FragCoord.frag", + "glsl.interpOp.error.frag", + "GL_EXT_draw_instanced.vert", + "overflow_underflow_toinf_0.frag", + "GL_EXT_texture_array.frag", })), FileNameAsCustomTestSuffix ); diff --git a/gtests/BuiltInResource.FromFile.cpp b/gtests/BuiltInResource.FromFile.cpp index 9a7c9b57..eeea5118 100755 --- a/gtests/BuiltInResource.FromFile.cpp +++ b/gtests/BuiltInResource.FromFile.cpp @@ -53,5 +53,15 @@ TEST_F(DefaultResourceTest, FromFile) ASSERT_EQ(expectedConfig, realConfig); } +TEST_F(DefaultResourceTest, UnrecognizedLimit) +{ + const std::string defaultConfig = GetDefaultTBuiltInResourceString(); + testing::internal::CaptureStdout(); + TBuiltInResource resources; + DecodeResourceLimits(&resources, const_cast(defaultConfig.c_str())); + std::string output = testing::internal::GetCapturedStdout(); + ASSERT_EQ(output.find("unrecognized limit"), std::string::npos); +} + } // anonymous namespace } // namespace glslangtest diff --git a/gtests/CMakeLists.txt b/gtests/CMakeLists.txt index 203812d8..8e0edd4d 100755 --- a/gtests/CMakeLists.txt +++ b/gtests/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2020 The Khronos Group Inc. +# Copyright (C) 2020-2023 The Khronos Group Inc. # # All rights reserved. # @@ -31,7 +31,7 @@ # ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGE. -if(BUILD_TESTING) +if(GLSLANG_TESTS) if(TARGET gmock) message(STATUS "Google Mock found - building tests") @@ -68,21 +68,6 @@ if(BUILD_TESTING) glslang_pch(glslangtests ${CMAKE_CURRENT_SOURCE_DIR}/pch.h) set_property(TARGET glslangtests PROPERTY FOLDER tests) glslang_set_link_args(glslangtests) - if(ENABLE_GLSLANG_INSTALL) - install(TARGETS glslangtests EXPORT glslang-targets) - - # Backward compatibility - file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/glslangtestsTargets.cmake" " - message(WARNING \"Using `glslangtestsTargets.cmake` is deprecated: use `find_package(glslang)` to find glslang CMake targets.\") - - if (NOT TARGET glslang::glslangtests) - include(\"\${CMAKE_CURRENT_LIST_DIR}/../../${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}/glslang-targets.cmake\") - endif() - - add_library(glslangtests ALIAS glslang::glslangtests) - ") - install(FILES "${CMAKE_CURRENT_BINARY_DIR}/glslangtestsTargets.cmake" DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake) - endif() set(GLSLANG_TEST_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/../Test") # Supply a default test root directory, so that manual testing @@ -97,22 +82,19 @@ if(BUILD_TESTING) ${gtest_SOURCE_DIR}/include) if(ENABLE_OPT) - target_include_directories(glslangtests - PRIVATE ${spirv-tools_SOURCE_DIR}/include + target_link_libraries(glslangtests + PRIVATE SPIRV-Tools-opt ) endif() set(LIBRARIES - glslang OSDependent OGLCompiler glslang + glslang OSDependent glslang SPIRV glslang-default-resource-limits) if(ENABLE_SPVREMAPPER) set(LIBRARIES ${LIBRARIES} SPVRemapper) endif() - if(ENABLE_HLSL) - set(LIBRARIES ${LIBRARIES} HLSL) - endif() target_link_libraries(glslangtests PRIVATE ${LIBRARIES} gmock) add_test(NAME glslang-gtests diff --git a/gtests/GlslMapIO.FromFile.cpp b/gtests/GlslMapIO.FromFile.cpp index aabb4ae2..1dba5c0c 100755 --- a/gtests/GlslMapIO.FromFile.cpp +++ b/gtests/GlslMapIO.FromFile.cpp @@ -42,7 +42,6 @@ #include "glslang/MachineIndependent/iomapper.h" #include "glslang/MachineIndependent/reflection.h" -#ifndef GLSLANG_WEB namespace glslangtest { namespace { @@ -352,4 +351,3 @@ INSTANTIATE_TEST_SUITE_P( } // anonymous namespace } // namespace glslangtest -#endif diff --git a/gtests/Hlsl.FromFile.cpp b/gtests/Hlsl.FromFile.cpp index 59742576..5d0d2d6b 100755 --- a/gtests/Hlsl.FromFile.cpp +++ b/gtests/Hlsl.FromFile.cpp @@ -59,6 +59,7 @@ std::string FileNameAsCustomTestSuffix( using HlslCompileTest = GlslangTest<::testing::TestWithParam>; using HlslVulkan1_1CompileTest = GlslangTest<::testing::TestWithParam>; +using HlslVulkan1_2CompileTest = GlslangTest<::testing::TestWithParam>; using HlslSpv1_6CompileTest = GlslangTest<::testing::TestWithParam>; using HlslCompileAndFlattenTest = GlslangTest<::testing::TestWithParam>; using HlslLegalizeTest = GlslangTest<::testing::TestWithParam>; @@ -83,6 +84,13 @@ TEST_P(HlslVulkan1_1CompileTest, FromFile) Target::BothASTAndSpv, true, GetParam().entryPoint); } +TEST_P(HlslVulkan1_2CompileTest, FromFile) +{ + loadFileCompileAndCheck(GlobalTestSettings.testRoot, GetParam().fileName, Source::HLSL, Semantics::Vulkan, + glslang::EShTargetVulkan_1_2, glslang::EShTargetSpv_1_4, Target::BothASTAndSpv, true, + GetParam().entryPoint); +} + TEST_P(HlslSpv1_6CompileTest, FromFile) { loadFileCompileAndCheck(GlobalTestSettings.testRoot, GetParam().fileName, @@ -205,6 +213,7 @@ INSTANTIATE_TEST_SUITE_P( {"hlsl.earlydepthstencil.frag", "main"}, {"hlsl.emptystructreturn.frag", "main"}, {"hlsl.emptystructreturn.vert", "main"}, + {"hlsl.emptystructreturn.tesc", "main"}, {"hlsl.emptystruct.init.vert", "main"}, {"hlsl.entry-in.frag", "PixelShaderFunction"}, {"hlsl.entry-out.frag", "PixelShaderFunction"}, @@ -309,9 +318,11 @@ INSTANTIATE_TEST_SUITE_P( {"hlsl.mul-truncate.frag", "main"}, {"hlsl.multiEntry.vert", "RealEntrypoint"}, {"hlsl.multiReturn.frag", "main"}, + {"hlsl.multiView.frag", "main"}, {"hlsl.matrixindex.frag", "main"}, {"hlsl.nonstaticMemberFunction.frag", "main"}, {"hlsl.numericsuffixes.frag", "main"}, + {"hlsl.numericsuffixes.negative.frag", "main"}, {"hlsl.numthreads.comp", "main_aux2"}, {"hlsl.overload.frag", "PixelShaderFunction"}, {"hlsl.opaque-type-bug.frag", "main"}, @@ -402,6 +413,7 @@ INSTANTIATE_TEST_SUITE_P( {"hlsl.structbuffer.rw.frag", "main"}, {"hlsl.structbuffer.rwbyte.frag", "main"}, {"hlsl.structbuffer.rwbyte2.comp", "main"}, + {"hlsl.structcopy.comp", "main"}, {"hlsl.structin.vert", "main"}, {"hlsl.structIoFourWay.frag", "main"}, {"hlsl.structStructName.frag", "main"}, @@ -417,6 +429,7 @@ INSTANTIATE_TEST_SUITE_P( {"hlsl.matType.bool.frag", "main"}, {"hlsl.matType.int.frag", "main"}, {"hlsl.max.frag", "PixelShaderFunction"}, + {"hlsl.nested-runtimeArray.frag", "main"}, {"hlsl.preprocessor.frag", "main"}, {"hlsl.precedence.frag", "PixelShaderFunction"}, {"hlsl.precedence2.frag", "PixelShaderFunction"}, @@ -465,13 +478,22 @@ INSTANTIATE_TEST_SUITE_P( }), FileNameAsCustomTestSuffix ); + +INSTANTIATE_TEST_SUITE_P( + ToSpirv, HlslVulkan1_2CompileTest, + ::testing::ValuesIn(std::vector{ + {"hlsl.buffer_ref_parameter.comp", "main"}, + }), + FileNameAsCustomTestSuffix +); // clang-format on // clang-format off INSTANTIATE_TEST_SUITE_P( ToSpirv, HlslSpv1_6CompileTest, ::testing::ValuesIn(std::vector{ - {"hlsl.spv.1.6.discard.frag", "PixelShaderFunction"} + {"hlsl.spv.1.6.discard.frag", "PixelShaderFunction"}, + {"hlsl.structcopylogical.comp","main"}, }), FileNameAsCustomTestSuffix ); diff --git a/gtests/Link.FromFile.Vk.cpp b/gtests/Link.FromFile.Vk.cpp index 6015c331..fed5d260 100755 --- a/gtests/Link.FromFile.Vk.cpp +++ b/gtests/Link.FromFile.Vk.cpp @@ -75,10 +75,8 @@ TEST_P(LinkTestVulkan, FromFile) result.linkingOutput = program.getInfoLog(); result.linkingError = program.getInfoDebugLog(); -#if !defined(GLSLANG_WEB) - if (success) - program.mapIO(); -#endif + if (success) + program.mapIO(); if (success && (controls & EShMsgSpvRules)) { spv::SpvBuildLogger logger; diff --git a/gtests/Link.FromFile.cpp b/gtests/Link.FromFile.cpp index 9e029fc7..3b769bbb 100755 --- a/gtests/Link.FromFile.cpp +++ b/gtests/Link.FromFile.cpp @@ -90,6 +90,9 @@ INSTANTIATE_TEST_SUITE_P( Glsl, LinkTest, ::testing::ValuesIn(std::vector>({ {"mains1.frag", "mains2.frag", "noMain1.geom", "noMain2.geom"}, + {"implicitArraySize.vert", "implicitArraySize.frag"}, + {"implicitArraySizeBuiltin.vert", "implicitArraySizeBuiltin.geom"}, + {"implicitArraySize1.geom", "implicitArraySize2.geom"}, {"noMain.vert", "mains.frag"}, {"link1.frag", "link2.frag", "link3.frag"}, {"recurse1.vert", "recurse1.frag", "recurse2.frag"}, diff --git a/gtests/Spv.FromFile.cpp b/gtests/Spv.FromFile.cpp index a3dc8db2..6f6a3d60 100755 --- a/gtests/Spv.FromFile.cpp +++ b/gtests/Spv.FromFile.cpp @@ -65,6 +65,7 @@ std::string FileNameAsCustomTestSuffixIoMap( } using CompileVulkanToSpirvTest = GlslangTest<::testing::TestWithParam>; +using CompileVulkanToSpirvTestNoLink = GlslangTest<::testing::TestWithParam>; using CompileVulkanToSpirvDeadCodeElimTest = GlslangTest<::testing::TestWithParam>; using CompileVulkanToDebugSpirvTest = GlslangTest<::testing::TestWithParam>; using CompileVulkan1_1ToSpirvTest = GlslangTest<::testing::TestWithParam>; @@ -76,6 +77,7 @@ using OpenGLSemantics = GlslangTest<::testing::TestWithParam>; using VulkanAstSemantics = GlslangTest<::testing::TestWithParam>; using HlslIoMap = GlslangTest<::testing::TestWithParam>; using GlslIoMap = GlslangTest<::testing::TestWithParam>; +using CompileVulkanToSpirvTestQCOM = GlslangTest<::testing::TestWithParam>; using CompileVulkanToSpirvTestAMD = GlslangTest<::testing::TestWithParam>; using CompileVulkanToSpirvTestNV = GlslangTest<::testing::TestWithParam>; using CompileVulkanToSpirv14TestNV = GlslangTest<::testing::TestWithParam>; @@ -91,6 +93,16 @@ TEST_P(CompileVulkanToSpirvTest, FromFile) Target::Spv); } +// Compiling GLSL to SPIR-V under Vulkan semantics without linking. Expected to successfully generate SPIR-V. +TEST_P(CompileVulkanToSpirvTestNoLink, FromFile) +{ + options().compileOnly = true; + // NOTE: Vulkan 1.3 is currently required to use the linkage capability + // TODO(ncesario) make sure this is actually necessary + loadFileCompileAndCheck(GlobalTestSettings.testRoot, GetParam(), Source::GLSL, Semantics::Vulkan, + glslang::EShTargetVulkan_1_3, glslang::EShTargetSpv_1_0, Target::Spv); +} + TEST_P(CompileVulkanToSpirvDeadCodeElimTest, FromFile) { loadFileCompileAndCheck(GlobalTestSettings.testRoot, GetParam(), @@ -196,6 +208,15 @@ TEST_P(GlslIoMap, FromFile) GetParam().flattenUniforms); } +// Compiling GLSL to SPIR-V under Vulkan semantics (QCOM extensions enabled). +// Expected to successfully generate SPIR-V. +TEST_P(CompileVulkanToSpirvTestQCOM, FromFile) +{ + loadFileCompileAndCheck(GlobalTestSettings.testRoot, GetParam(), + Source::GLSL, Semantics::Vulkan, glslang::EShTargetVulkan_1_0, glslang::EShTargetSpv_1_0, + Target::Spv); +} + // Compiling GLSL to SPIR-V under Vulkan semantics (AMD extensions enabled). // Expected to successfully generate SPIR-V. TEST_P(CompileVulkanToSpirvTestAMD, FromFile) @@ -345,6 +366,12 @@ INSTANTIATE_TEST_SUITE_P( "spv.conversion.frag", "spv.coopmat.comp", "spv.coopmat_Error.comp", + "spv.coopmatKHR.comp", + "spv.coopmatKHR_arithmetic.comp", + "spv.coopmatKHR_arithmeticError.comp", + "spv.coopmatKHR_Error.comp", + "spv.coopmatKHR_constructor.comp", + "spv.coopmatKHR_constructorError.comp", "spv.dataOut.frag", "spv.dataOutIndirect.frag", "spv.dataOutIndirect.vert", @@ -357,6 +384,12 @@ INSTANTIATE_TEST_SUITE_P( "spv.discard-dce.frag", "spv.doWhileLoop.frag", "spv.earlyReturnDiscard.frag", + "spv.ext.ShaderTileImage.color.frag", + "spv.ext.ShaderTileImage.depth_stencil.frag", + "spv.ext.ShaderTileImage.subpassinput.frag", + "spv.ext.ShaderTileImage.typemismatch.frag", + "spv.ext.ShaderTileImage.overlap.frag", + "spv.ext.ShaderTileImage.wronglayout.frag", "spv.extPostDepthCoverage.frag", "spv.extPostDepthCoverage_Error.frag", "spv.float16convertonlyarith.comp", @@ -384,12 +417,15 @@ INSTANTIATE_TEST_SUITE_P( "spv.intOps.vert", "spv.intrinsicsSpirvByReference.vert", "spv.intrinsicsSpirvDecorate.frag", + "spv.intrinsicsSpirvDecorateId.comp", + "spv.intrinsicsSpirvDecorateString.comp", "spv.intrinsicsSpirvExecutionMode.frag", "spv.intrinsicsSpirvInstruction.vert", "spv.intrinsicsSpirvLiteral.vert", "spv.intrinsicsSpirvStorageClass.rchit", "spv.intrinsicsSpirvType.rgen", "spv.intrinsicsSpirvTypeLocalVar.vert", + "spv.intrinsicsSpirvTypeWithTypeSpecifier.vert", "spv.invariantAll.vert", "spv.layer.tese", "spv.layoutNested.vert", @@ -441,6 +477,7 @@ INSTANTIATE_TEST_SUITE_P( "spv.sparseTexture.frag", "spv.sparseTextureClamp.frag", "spv.structAssignment.frag", + "spv.structCopy.comp", "spv.structDeref.frag", "spv.structure.frag", "spv.switch.frag", @@ -477,6 +514,9 @@ INSTANTIATE_TEST_SUITE_P( "spv.specConstant.float16.comp", "spv.specConstant.int16.comp", "spv.specConstant.int8.comp", + "spv.specConstantOp.int16.comp", + "spv.specConstantOp.int8.comp", + "spv.specConstantOp.float16.comp", "spv.storageBuffer.vert", "spv.terminate.frag", "spv.subgroupUniformControlFlow.vert", @@ -500,6 +540,18 @@ INSTANTIATE_TEST_SUITE_P( "spv.atomicAdd.bufferReference.comp", "spv.fragmentShaderBarycentric3.frag", "spv.fragmentShaderBarycentric4.frag", + "spv.ext.textureShadowLod.frag", + "spv.ext.textureShadowLod.error.frag", + "spv.floatFetch.frag", + "spv.atomicRvalue.error.vert", + })), + FileNameAsCustomTestSuffix +); + +INSTANTIATE_TEST_SUITE_P( + Glsl, CompileVulkanToSpirvTestNoLink, + ::testing::ValuesIn(std::vector({ + "spv.exportFunctions.comp", })), FileNameAsCustomTestSuffix ); @@ -644,6 +696,7 @@ INSTANTIATE_TEST_SUITE_P( // SPV_EXT_mesh_shader "spv.ext.meshShaderBuiltins.mesh", + "spv.ext.meshShaderBuiltinsShadingRate.mesh", "spv.ext.meshShaderRedeclBuiltins.mesh", "spv.ext.meshShaderTaskMem.mesh", "spv.ext.meshShaderUserDefined.mesh", @@ -652,6 +705,20 @@ INSTANTIATE_TEST_SUITE_P( "spv.atomiAddEXT.task", "spv.460.subgroupEXT.task", "spv.460.subgroupEXT.mesh", + + // SPV_NV_shader_execution_reorder + + "spv.nv.hitobject-allops.rgen", + "spv.nv.hitobject-allops.rchit", + "spv.nv.hitobject-allops.rmiss", + + // SPV_NV_displacment_micromap + + "spv.nv.dmm-allops.rgen", + "spv.nv.dmm-allops.rchit", + "spv.nv.dmm-allops.rahit", + "spv.nv.dmm-allops.mesh", + "spv.nv.dmm-allops.comp", })), FileNameAsCustomTestSuffix ); @@ -734,6 +801,7 @@ INSTANTIATE_TEST_SUITE_P( "vulkan.vert", "vulkan.comp", "samplerlessTextureFunctions.frag", + "spv.intrinsicsFakeEnable.vert", "spv.specConstArrayCheck.vert", })), FileNameAsCustomTestSuffix @@ -759,6 +827,18 @@ INSTANTIATE_TEST_SUITE_P( FileNameAsCustomTestSuffix ); +INSTANTIATE_TEST_SUITE_P( + Glsl, CompileVulkanToSpirvTestQCOM, + ::testing::ValuesIn(std::vector({ + "spv.tpipSampleWeighted.frag", + "spv.tpipBoxFilter.frag", + "spv.tpipBlockMatchSSD.frag", + "spv.tpipBlockMatchSAD.frag", + "spv.tpipTextureArrays.frag", + })), + FileNameAsCustomTestSuffix +); + INSTANTIATE_TEST_SUITE_P( Glsl, CompileVulkanToSpirvTestAMD, ::testing::ValuesIn(std::vector({ @@ -852,7 +932,10 @@ INSTANTIATE_TEST_SUITE_P( "spv.debuginfo.glsl.comp", "spv.debuginfo.glsl.geom", "spv.debuginfo.glsl.tesc", - "spv.debuginfo.glsl.tese" + "spv.debuginfo.glsl.tese", + "spv.debuginfo.bufferref.glsl.frag", + "spv.debuginfo.const_params.glsl.comp", + "spv.debuginfo.scalar_types.glsl.frag", })), FileNameAsCustomTestSuffix ); diff --git a/gtests/TestFixture.h b/gtests/TestFixture.h index 67783c0c..b23ba304 100755 --- a/gtests/TestFixture.h +++ b/gtests/TestFixture.h @@ -48,6 +48,7 @@ #include "SPIRV/disassemble.h" #include "SPIRV/doc.h" #include "SPIRV/SPVRemapper.h" +#include "glslang/Include/Types.h" #include "glslang/Public/ResourceLimits.h" #include "glslang/Public/ShaderLang.h" @@ -248,38 +249,58 @@ public: } } + if (options().compileOnly) + shader.setCompileOnly(); + bool success = compile( &shader, code, entryPointName, controls, nullptr, &shaderName); glslang::TProgram program; - program.addShader(&shader); - success &= program.link(controls); -#if !defined(GLSLANG_WEB) - if (success) - program.mapIO(); -#endif + spv::SpvBuildLogger logger; + std::vector spirv_binary; - if (success && (controls & EShMsgSpvRules)) { - spv::SpvBuildLogger logger; - std::vector spirv_binary; + if (!options().compileOnly) { + program.addShader(&shader); + success &= program.link(controls); + if (success) + program.mapIO(); + + if (success && (controls & EShMsgSpvRules)) { + options().disableOptimizer = !enableOptimizer; + options().generateDebugInfo = enableDebug; + options().emitNonSemanticShaderDebugInfo = enableNonSemanticShaderDebugInfo; + options().emitNonSemanticShaderDebugSource = enableNonSemanticShaderDebugInfo; + glslang::GlslangToSpv(*program.getIntermediate(stage), spirv_binary, &logger, &options()); + } else { + return {{ + {shaderName, shader.getInfoLog(), shader.getInfoDebugLog()}, + }, + program.getInfoLog(), + program.getInfoDebugLog(), + true, + "", + ""}; + } + } else { options().disableOptimizer = !enableOptimizer; options().generateDebugInfo = enableDebug; options().emitNonSemanticShaderDebugInfo = enableNonSemanticShaderDebugInfo; options().emitNonSemanticShaderDebugSource = enableNonSemanticShaderDebugInfo; - glslang::GlslangToSpv(*program.getIntermediate(stage), - spirv_binary, &logger, &options()); - - std::ostringstream disassembly_stream; - spv::Parameterize(); - spv::Disassemble(disassembly_stream, spirv_binary); - bool validation_result = !options().validate || logger.getAllMessages().empty(); - return {{{shaderName, shader.getInfoLog(), shader.getInfoDebugLog()},}, - program.getInfoLog(), program.getInfoDebugLog(), - validation_result, logger.getAllMessages(), disassembly_stream.str()}; - } else { - return {{{shaderName, shader.getInfoLog(), shader.getInfoDebugLog()},}, - program.getInfoLog(), program.getInfoDebugLog(), true, "", ""}; + glslang::GlslangToSpv(*shader.getIntermediate(), spirv_binary, &logger, &options()); } + + std::ostringstream disassembly_stream; + spv::Parameterize(); + spv::Disassemble(disassembly_stream, spirv_binary); + bool validation_result = !options().validate || logger.getAllMessages().empty(); + return {{ + {shaderName, shader.getInfoLog(), shader.getInfoDebugLog()}, + }, + program.getInfoLog(), + program.getInfoDebugLog(), + validation_result, + logger.getAllMessages(), + disassembly_stream.str()}; } // Compiles and links the given source |code| of the given shader @@ -318,10 +339,8 @@ public: program.addShader(&shader); success &= program.link(controls); -#if !defined(GLSLANG_WEB) if (success) program.mapIO(); -#endif spv::SpvBuildLogger logger; @@ -363,10 +382,8 @@ public: glslang::TProgram program; program.addShader(&shader); success &= program.link(controls); -#if !defined(GLSLANG_WEB) if (success) program.mapIO(); -#endif if (success && (controls & EShMsgSpvRules)) { spv::SpvBuildLogger logger; @@ -471,7 +488,7 @@ public: targetLanguageVersion, false, EShTexSampTransKeep, enableOptimizer, enableDebug, enableNonSemanticShaderDebugInfo, automap); - // Generate the hybrid output in the way of glslangValidator. + // Generate the hybrid output in the way of glslang. std::ostringstream stream; outputResultToStream(&stream, result, controls); @@ -501,7 +518,7 @@ public: GlslangResult result = compileAndLink(testName, input, entryPointName, controls, clientTargetVersion, targetLanguageVersion, false, EShTexSampTransKeep, false, automap); - // Generate the hybrid output in the way of glslangValidator. + // Generate the hybrid output in the way of glslang. std::ostringstream stream; outputResultToStream(&stream, result, controls); @@ -527,7 +544,7 @@ public: GlslangResult result = compileAndLink(testName, input, entryPointName, controls, glslang::EShTargetVulkan_1_0, glslang::EShTargetSpv_1_0, true); - // Generate the hybrid output in the way of glslangValidator. + // Generate the hybrid output in the way of glslang. std::ostringstream stream; outputResultToStream(&stream, result, controls); @@ -564,7 +581,7 @@ public: autoMapBindings, flattenUniformArrays); - // Generate the hybrid output in the way of glslangValidator. + // Generate the hybrid output in the way of glslang. std::ostringstream stream; outputResultToStream(&stream, result, controls); @@ -591,7 +608,7 @@ public: const EShMessages controls = DeriveOptions(source, semantics, target); GlslangResult result = compileLinkRemap(testName, input, entryPointName, controls, remapOptions); - // Generate the hybrid output in the way of glslangValidator. + // Generate the hybrid output in the way of glslang. std::ostringstream stream; outputResultToStream(&stream, result, controls); @@ -618,7 +635,7 @@ public: const EShMessages controls = DeriveOptions(source, semantics, target); GlslangResult result = remap(testName, input, controls, remapOptions); - // Generate the hybrid output in the way of glslangValidator. + // Generate the hybrid output in the way of glslang. std::ostringstream stream; outputResultToStream(&stream, result, controls); @@ -698,7 +715,7 @@ public: glslang::EShTargetVulkan_1_0, glslang::EShTargetSpv_1_0, false, EShTexSampTransUpgradeTextureRemoveSampler); - // Generate the hybrid output in the way of glslangValidator. + // Generate the hybrid output in the way of glslang. std::ostringstream stream; outputResultToStream(&stream, result, controls); diff --git a/gtests/VkRelaxed.FromFile.cpp b/gtests/VkRelaxed.FromFile.cpp index 96cd3cf6..67e55017 100755 --- a/gtests/VkRelaxed.FromFile.cpp +++ b/gtests/VkRelaxed.FromFile.cpp @@ -42,7 +42,6 @@ #include "glslang/MachineIndependent/iomapper.h" #include "glslang/MachineIndependent/reflection.h" -#ifndef GLSLANG_WEB namespace glslangtest { namespace { @@ -303,4 +302,3 @@ INSTANTIATE_TEST_SUITE_P( } // anonymous namespace } // namespace glslangtest -#endif diff --git a/hlsl/BUILD.gn b/hlsl/BUILD.gn deleted file mode 100755 index d4df433d..00000000 --- a/hlsl/BUILD.gn +++ /dev/null @@ -1,62 +0,0 @@ -# Copyright (c) 2022 Shenzhen Kaihong Digital Industry Development Co., Ltd. -# 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. - -# external glslang src hlsl build - -import("//build/ohos.gni") -import("//third_party/vk-gl-cts/vk_gl_cts.gni") - -config("hlsl_config") { - cflags_cc = deqp_common_cflags_cc - - cflags_cc -= [ - "-frtti", - "-fexceptions", - ] - cflags_cc += [ - "-fPIC", - "-Wno-reorder", - "-fno-rtti", - "-fno-exceptions", - ] - - defines = deqp_common_defines - defines -= [ - "DEQP_SUPPORT_DRM=0", - "DEQP_TARGET_NAME=\"Default\"", - ] - defines += [ - "ENABLE_HLSL", - "ENABLE_OPT=0", - "GLSLANG_OSINCLUDE_UNIX", - ] -} - -ohos_source_set("hlsl_source") { - sources = [ "//third_party/glslang/hlsl/stub.cpp" ] - include_dirs = [ - "//third_party/zlib/src", - "//third_party/glslang/glslang/Include", - "//third_party/glslang/glslang/Public", - ] - include_dirs += deqp_common_include_dirs - - deps = [] - configs = [ ":hlsl_config" ] -} - -ohos_shared_library("libdeqp_hlsl") { - deps = [ ":hlsl_source" ] - part_name = "graphic_2d" - subsystem_name = "graphic" -} diff --git a/hlsl/CMakeLists.txt b/hlsl/CMakeLists.txt deleted file mode 100755 index a4adb607..00000000 --- a/hlsl/CMakeLists.txt +++ /dev/null @@ -1,61 +0,0 @@ -# Copyright (C) 2020 The Khronos Group Inc. -# -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following -# disclaimer in the documentation and/or other materials provided -# with the distribution. -# -# Neither the name of The Khronos Group Inc. nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. - -# The HLSL source is directly embedded into the glslang target when ENABLE_HLSL -# is set. -# This source now lives at: glslang/HLSL/ -# The HLSL target is now just a stub that exists for backwards compatibility for -# projects that referenced this target. - -add_library(HLSL ${LIB_TYPE} "stub.cpp") -set_property(TARGET HLSL PROPERTY FOLDER hlsl) -set_property(TARGET HLSL PROPERTY POSITION_INDEPENDENT_CODE ON) - -if(WIN32 AND BUILD_SHARED_LIBS) - set_target_properties(HLSL PROPERTIES PREFIX "") -endif() - -if(ENABLE_GLSLANG_INSTALL) - install(TARGETS HLSL EXPORT glslang-targets) - - file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/HLSLTargets.cmake" " - message(WARNING \"Using `HLSLTargets.cmake` is deprecated: use `find_package(glslang)` to find glslang CMake targets.\") - - if (NOT TARGET glslang::HLSL) - include(\"\${CMAKE_CURRENT_LIST_DIR}/../../${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}/glslang-targets.cmake\") - endif() - - add_library(HLSL ALIAS glslang::HLSL) - ") - install(FILES "${CMAKE_CURRENT_BINARY_DIR}/HLSLTargets.cmake" DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake) -endif() diff --git a/hlsl/stub.cpp b/hlsl/stub.cpp deleted file mode 100755 index f1d39c15..00000000 --- a/hlsl/stub.cpp +++ /dev/null @@ -1,41 +0,0 @@ -// -// Copyright (C) 2020 Google, Inc. -// -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions -// are met: -// -// Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// -// Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following -// disclaimer in the documentation and/or other materials provided -// with the distribution. -// -// Neither the name of Google, Inc., nor the names of its -// contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -// COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. -// - -// The HLSL source is directly embedded into the glslang target when ENABLE_HLSL -// is set. -// This source now lives at: glslang/HLSL/ -// The HLSL target is now just a stub that exists for backwards compatibility -// for projects that referenced this target. As a target requires at least one -// source file to build, this file acts as that stub. diff --git a/known_good.json b/known_good.json index 41ff0dd2..08f342a7 100755 --- a/known_good.json +++ b/known_good.json @@ -5,14 +5,21 @@ "site" : "github", "subrepo" : "KhronosGroup/SPIRV-Tools", "subdir" : "External/spirv-tools", - "commit" : "40f5bf59c6acb4754a0bffd3c53a715732883a12" + "commit": "f0cc85efdbbe3a46eae90e0f915dc1509836d0fc" }, { "name" : "spirv-tools/external/spirv-headers", "site" : "github", "subrepo" : "KhronosGroup/SPIRV-Headers", "subdir" : "External/spirv-tools/external/spirv-headers", - "commit" : "1d31a100405cf8783ca7a31e31cdd727c9fc54c3" + "commit" : "1c6bb2743599e6eb6f37b2969acc0aef812e32e3" + }, + { + "name": "googletest", + "site": "github", + "subrepo": "google/googletest", + "subdir": "External/googletest", + "commit": "v1.14.0" } ] } diff --git a/known_good_khr.json b/known_good_khr.json index a64198a8..7911c714 100755 --- a/known_good_khr.json +++ b/known_good_khr.json @@ -13,6 +13,13 @@ "subrepo" : "spirv/SPIRV-Headers", "subdir" : "External/spirv-tools/external/spirv-headers", "commit" : "gitlab-prelim-rc4" + }, + { + "name": "googletest", + "site": "github", + "subrepo": "google/googletest", + "subdir": "External/googletest", + "commit": "v1.14.0" } ] } diff --git a/kokoro/android-ndk-build/build-docker.sh b/kokoro/android-ndk-build/build-docker.sh index 2b23b27a..94edcd3f 100755 --- a/kokoro/android-ndk-build/build-docker.sh +++ b/kokoro/android-ndk-build/build-docker.sh @@ -43,6 +43,7 @@ using ndk-r21d export NDK_PROJECT_PATH="${ROOT_DIR}/ndk_test" export APP_BUILD_SCRIPT="${ROOT_DIR}/ndk_test/Android.mk" +export APP_PLATFORM=android-24 # Vulkan introduced in API 24 echo "Building..." ndk-build -j diff --git a/kokoro/linux-clang-cmake/build-docker.sh b/kokoro/linux-clang-cmake/build-docker.sh index c5fdcd23..6b1d3e1a 100755 --- a/kokoro/linux-clang-cmake/build-docker.sh +++ b/kokoro/linux-clang-cmake/build-docker.sh @@ -46,5 +46,5 @@ using ninja-1.10.0 echo "Building..." mkdir /build && cd /build -cmake "$ROOT_DIR" -GNinja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$(pwd)/install" -DBUILD_SHARED_LIBS=$BUILD_SHARED_LIBS +cmake "$ROOT_DIR" -GNinja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$(pwd)/install" -DBUILD_SHARED_LIBS=$BUILD_SHARED_LIBS -DENABLE_OPT=0 ninja install diff --git a/kokoro/linux-clang-gn/build-docker.sh b/kokoro/linux-clang-gn/build-docker.sh index 1035ab88..6540b1be 100755 --- a/kokoro/linux-clang-gn/build-docker.sh +++ b/kokoro/linux-clang-gn/build-docker.sh @@ -34,8 +34,17 @@ # POSSIBILITY OF SUCH DAMAGE. set -e # Fail on any error. + +. /bin/using.sh # Declare the bash `using` function for configuring toolchains. + set -x # Display commands being run. +using ninja-1.10.0 + +# Disable git's "detected dubious ownership" error - kokoro checks out the repo +# with a different user, and we don't care about this warning. +git config --global --add safe.directory '*' + echo "Fetching external projects..." ./update_glslang_sources.py diff --git a/kokoro/linux-clang-gn/build.sh b/kokoro/linux-clang-gn/build.sh index 563432a1..111f5294 100755 --- a/kokoro/linux-clang-gn/build.sh +++ b/kokoro/linux-clang-gn/build.sh @@ -38,6 +38,7 @@ set -e # Fail on any error. SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd )" ROOT_DIR="$( cd "${SCRIPT_DIR}/../.." >/dev/null 2>&1 && pwd )" +set +e # Allow build failure docker run --rm -i \ --volume "${ROOT_DIR}:${ROOT_DIR}" \ --workdir "${ROOT_DIR}" \ @@ -46,4 +47,9 @@ docker run --rm -i \ --entrypoint "${SCRIPT_DIR}/build-docker.sh" \ "gcr.io/shaderc-build/radial-build:latest" +# This is important. If the permissions are not fixed, kokoro will fail +# to pull build artifacts, and put the build in tool-failure state, which +# blocks the logs. +RESULT=$? sudo chown -R "$(id -u):$(id -g)" "${ROOT_DIR}" +exit $RESULT diff --git a/kokoro/linux-clang-release-bazel/build.sh b/kokoro/linux-clang-release-bazel/build.sh deleted file mode 100755 index 190e3d70..00000000 --- a/kokoro/linux-clang-release-bazel/build.sh +++ /dev/null @@ -1,60 +0,0 @@ -#!/bin/bash - -# Copyright (C) 2019 Google, Inc. -# -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following -# disclaimer in the documentation and/or other materials provided -# with the distribution. -# -# Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. - -# Linux Build Script. - -# Fail on any error. -set -e -# Display commands being run. -set -x - -CC=clang -CXX=clang++ -SRC=$PWD/github/glslang -cd $SRC - -# Bazel limitation: No 'External' directory is allowed!! -mv External third_party - -gsutil cp gs://bazel/0.29.1/release/bazel-0.29.1-linux-x86_64 . -chmod +x bazel-0.29.1-linux-x86_64 - -echo $(date): Build everything... -./bazel-0.29.1-linux-x86_64 build :all -echo $(date): Build completed. - -echo $(date): Starting bazel test... -./bazel-0.29.1-linux-x86_64 test :all --test_output=all -echo $(date): Bazel test completed. diff --git a/kokoro/linux-clang-release-bazel/continuous.cfg b/kokoro/linux-clang-release-bazel/continuous.cfg deleted file mode 100755 index 767556d0..00000000 --- a/kokoro/linux-clang-release-bazel/continuous.cfg +++ /dev/null @@ -1,35 +0,0 @@ -# Copyright (C) 2019 Google, Inc. -# -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following -# disclaimer in the documentation and/or other materials provided -# with the distribution. -# -# Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. - -# Continuous build configuration. -build_file: "glslang/kokoro/linux-clang-release-bazel/build.sh" diff --git a/kokoro/linux-clang-release-bazel/presubmit.cfg b/kokoro/linux-clang-release-bazel/presubmit.cfg deleted file mode 100755 index 669491f8..00000000 --- a/kokoro/linux-clang-release-bazel/presubmit.cfg +++ /dev/null @@ -1,35 +0,0 @@ -# Copyright (C) 2019 Google, Inc. -# -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following -# disclaimer in the documentation and/or other materials provided -# with the distribution. -# -# Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. - -# Presubmit build configuration. -build_file: "glslang/kokoro/linux-clang-release-bazel/build.sh" diff --git a/kokoro/linux-gcc-cmake/build-docker.sh b/kokoro/linux-gcc-cmake/build-docker.sh index 0edc05e2..558695c8 100755 --- a/kokoro/linux-gcc-cmake/build-docker.sh +++ b/kokoro/linux-gcc-cmake/build-docker.sh @@ -46,5 +46,5 @@ using ninja-1.10.0 echo "Building..." mkdir /build && cd /build -cmake "$ROOT_DIR" -GNinja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$(pwd)/install" -DBUILD_SHARED_LIBS=$BUILD_SHARED_LIBS +cmake "$ROOT_DIR" -GNinja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$(pwd)/install" -DBUILD_SHARED_LIBS=$BUILD_SHARED_LIBS -DENABLE_OPT=0 ninja install diff --git a/kokoro/macos-clang-release-bazel/build.sh b/kokoro/macos-clang-release-bazel/build.sh deleted file mode 100755 index 8f1b2516..00000000 --- a/kokoro/macos-clang-release-bazel/build.sh +++ /dev/null @@ -1,60 +0,0 @@ -#!/bin/bash - -# Copyright (C) 2019 Google, Inc. -# -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following -# disclaimer in the documentation and/or other materials provided -# with the distribution. -# -# Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. - -# macOS Build Script. - -# Fail on any error. -set -e -# Display commands being run. -set -x - -CC=clang -CXX=clang++ -SRC=$PWD/github/glslang -cd $SRC - -mv External third_party - -# Get bazel 0.29.1. -gsutil cp gs://bazel/0.29.1/release/bazel-0.29.1-darwin-x86_64 . -chmod +x bazel-0.29.1-darwin-x86_64 - -echo $(date): Build everything... -./bazel-0.29.1-darwin-x86_64 build :all -echo $(date): Build completed. - -echo $(date): Starting bazel test... -./bazel-0.29.1-darwin-x86_64 test :all --test_output=all -echo $(date): Bazel test completed. diff --git a/kokoro/macos-clang-release-bazel/continuous.cfg b/kokoro/macos-clang-release-bazel/continuous.cfg deleted file mode 100755 index f1980790..00000000 --- a/kokoro/macos-clang-release-bazel/continuous.cfg +++ /dev/null @@ -1,35 +0,0 @@ -# Copyright (C) 2019 Google, Inc. -# -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following -# disclaimer in the documentation and/or other materials provided -# with the distribution. -# -# Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. - -# Continuous build configuration. -build_file: "glslang/kokoro/macos-clang-release-bazel/build.sh" diff --git a/kokoro/macos-clang-release-bazel/presubmit.cfg b/kokoro/macos-clang-release-bazel/presubmit.cfg deleted file mode 100755 index daa30be5..00000000 --- a/kokoro/macos-clang-release-bazel/presubmit.cfg +++ /dev/null @@ -1,35 +0,0 @@ -# Copyright (C) 2019 Google, Inc. -# -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following -# disclaimer in the documentation and/or other materials provided -# with the distribution. -# -# Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. - -# Presubmit build configuration. -build_file: "glslang/kokoro/macos-clang-release-bazel/build.sh" diff --git a/kokoro/windows-msvc-2015-release-bazel/build.bat b/kokoro/windows-msvc-2015-release-bazel/build.bat deleted file mode 100755 index fb2009b1..00000000 --- a/kokoro/windows-msvc-2015-release-bazel/build.bat +++ /dev/null @@ -1,75 +0,0 @@ -:: Copyright (C) 2019 Google, Inc. -:: -:: All rights reserved. -:: -:: Redistribution and use in source and binary forms, with or without -:: modification, are permitted provided that the following conditions -:: are met: -:: -:: Redistributions of source code must retain the above copyright -:: notice, this list of conditions and the following disclaimer. -:: -:: Redistributions in binary form must reproduce the above -:: copyright notice, this list of conditions and the following -:: disclaimer in the documentation and/or other materials provided -:: with the distribution. -:: -:: Neither the name of Google Inc. nor the names of its -:: contributors may be used to endorse or promote products derived -:: from this software without specific prior written permission. -:: -:: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -:: "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -:: LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -:: FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -:: COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -:: INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -:: BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -:: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -:: CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -:: LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -:: ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -:: POSSIBILITY OF SUCH DAMAGE. -:: Copyright (c) 2019 Google LLC. -:: -:: Windows Build Script. - -@echo on - -set SRC=%cd%\github\glslang - -:: Force usage of python 3.6 -set PATH=C:\python36;%PATH% -cd %SRC% - -mv External third_party - -:: REM Install Bazel. -wget -q https://github.com/bazelbuild/bazel/releases/download/0.29.1/bazel-0.29.1-windows-x86_64.zip -unzip -q bazel-0.29.1-windows-x86_64.zip - -:: Set up MSVC -call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x64 -set BAZEL_VS=C:\Program Files (x86)\Microsoft Visual Studio 14.0 -set BAZEL_VC=C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC -set BAZEL_SH=c:\tools\msys64\usr\bin\bash.exe -set BAZEL_PYTHON=c:\tools\python2\python.exe - -:: ######################################### -:: Start building. -:: ######################################### -echo "Build everything... %DATE% %TIME%" -bazel.exe build :all -if %ERRORLEVEL% NEQ 0 exit /b %ERRORLEVEL% -echo "Build Completed %DATE% %TIME%" - -:: ############## -:: Run the tests -:: ############## -echo "Running Tests... %DATE% %TIME%" -bazel.exe test :all --test_output=all -if %ERRORLEVEL% NEQ 0 exit /b %ERRORLEVEL% -echo "Tests Completed %DATE% %TIME%" - -exit /b 0 - diff --git a/kokoro/windows-msvc-2015-release-bazel/continuous.cfg b/kokoro/windows-msvc-2015-release-bazel/continuous.cfg deleted file mode 100755 index 554d29de..00000000 --- a/kokoro/windows-msvc-2015-release-bazel/continuous.cfg +++ /dev/null @@ -1,35 +0,0 @@ -# Copyright (C) 2019 Google, Inc. -# -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following -# disclaimer in the documentation and/or other materials provided -# with the distribution. -# -# Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. - -# Continuous build configuration. -build_file: "glslang/kokoro/windows-msvc-2015-release-bazel/build.bat" diff --git a/kokoro/windows-msvc-2015-release-bazel/presubmit.cfg b/kokoro/windows-msvc-2015-release-bazel/presubmit.cfg deleted file mode 100755 index 4980bb6b..00000000 --- a/kokoro/windows-msvc-2015-release-bazel/presubmit.cfg +++ /dev/null @@ -1,35 +0,0 @@ -# Copyright (C) 2019 Google, Inc. -# -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following -# disclaimer in the documentation and/or other materials provided -# with the distribution. -# -# Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. - -# Presubmit build configuration. -build_file: "glslang/kokoro/windows-msvc-2015-release-bazel/build.bat" diff --git a/ndk_test/Android.mk b/ndk_test/Android.mk index b1b2207c..112700c9 100755 --- a/ndk_test/Android.mk +++ b/ndk_test/Android.mk @@ -38,8 +38,8 @@ LOCAL_CPP_EXTENSION := .cc .cpp .cxx LOCAL_SRC_FILES:=test.cpp LOCAL_MODULE:=glslang_ndk_test LOCAL_LDLIBS:=-landroid -LOCAL_CXXFLAGS:=-std=c++11 -fno-exceptions -fno-rtti -Werror -LOCAL_STATIC_LIBRARIES:=glslang SPIRV HLSL +LOCAL_CXXFLAGS:=-std=c++17 -fno-exceptions -fno-rtti -Werror +LOCAL_STATIC_LIBRARIES:=glslang SPIRV include $(BUILD_SHARED_LIBRARY) include $(LOCAL_PATH)/../Android.mk diff --git a/ndk_test/jni/Application.mk b/ndk_test/jni/Application.mk index 07b76157..0eb8ffdf 100755 --- a/ndk_test/jni/Application.mk +++ b/ndk_test/jni/Application.mk @@ -34,5 +34,5 @@ APP_ABI := all APP_BUILD_SCRIPT := Android.mk APP_STL := c++_static -APP_PLATFORM := android-9 +APP_PLATFORM := android-24 NDK_TOOLCHAIN_VERSION := 4.9 diff --git a/update_glslang_sources.py b/update_glslang_sources.py index 20f303ba..2e02c96e 100755 --- a/update_glslang_sources.py +++ b/update_glslang_sources.py @@ -17,12 +17,9 @@ """Get source files for Glslang and its dependencies from public repositories. """ -from __future__ import print_function - import argparse import json -import distutils.dir_util -import os.path +import os import subprocess import sys @@ -106,7 +103,7 @@ class GoodCommit(object): cwd=self.subdir) def Clone(self): - distutils.dir_util.mkpath(self.subdir) + os.makedirs(self.subdir, exist_ok=True) command_output(['git', 'clone', self.GetUrl(), '.'], self.subdir) def Fetch(self): @@ -139,7 +136,7 @@ def main(): commits = GetGoodCommits(args.site) - distutils.dir_util.mkpath(args.dir) + os.makedirs(args.dir, exist_ok=True) print('Change directory to {d}'.format(d=args.dir)) os.chdir(args.dir)