update glslang: vulkan-sdk-1.3.275.0

Signed-off-by: goujingjing <goujingjing@kaihong.com>
This commit is contained in:
goujingjing
2024-04-18 21:06:02 +08:00
parent 4de3811f2c
commit edc8aa4d4a
361 changed files with 44161 additions and 28343 deletions
Regular → Executable
+1
View File
@@ -11,6 +11,7 @@ Test/localResults/
External/googletest
External/spirv-tools
out/
CMakeUserPresets.json
# GN generated files
.cipd/
+6 -27
View File
@@ -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 \
+7 -10
View File
@@ -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",
]
}
+113
View File
@@ -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
+118 -148
View File
@@ -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 <target> for the pre-compiled
# header file <pch>. 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}/$<CONFIG>/localResults)
set(VALIDATOR_PATH ${CMAKE_CURRENT_BINARY_DIR}/StandAlone/$<CONFIG>/glslang)
set(REMAP_PATH ${CMAKE_CURRENT_BINARY_DIR}/StandAlone/$<CONFIG>/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}/$<CONFIGURATION>/localResults)
set(VALIDATOR_PATH ${CMAKE_CURRENT_BINARY_DIR}/StandAlone/$<CONFIGURATION>/glslangValidator)
set(REMAP_PATH ${CMAKE_CURRENT_BINARY_DIR}/StandAlone/$<CONFIGURATION>/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()
endif()
+2 -2
View File
@@ -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()
-63
View File
@@ -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"
}
-59
View File
@@ -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()
-165
View File
@@ -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 <cassert>
#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
-49
View File
@@ -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
+1 -1
View File
@@ -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.
+45 -66
View File
@@ -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 <the directory glslang was cloned to, "External" will be a subdirectory>
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<uint32_t> compileShaderToSPIRV_Vulkan(glslang_stage_t stage, const char* shaderSource, const char* fileName)
{
```c
#include <glslang/Include/glslang_c_interface.h>
// Required for use of glslang_default_resource
#include <glslang/Public/resource_limits_c.h>
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<uint32_t> 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<const glslang_resource_t*>(&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<uint32_t>();
return bin;
}
if (!glslang_shader_parse(shader, &input)) {
@@ -469,7 +447,7 @@ std::vector<uint32_t> 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<uint32_t>();
return bin;
}
glslang_program_t* program = glslang_program_create();
@@ -481,13 +459,14 @@ std::vector<uint32_t> 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<uint32_t>();
return bin;
}
glslang_program_SPIRV_generate(program, stage);
std::vector<uint32_t> 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<uint32_t> 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<uint32_t> 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
Executable
+6
View File
@@ -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.
+2 -2
View File
@@ -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",
+1 -7
View File
@@ -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);
+23 -15
View File
@@ -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
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/..>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)
@@ -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
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../External>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/External>)
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../External>)
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()
+1
View File
@@ -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
+2
View File
@@ -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
+6
View File
@@ -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
+41
View File
@@ -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
+1 -1
View File
@@ -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,
+952 -420
View File
File diff suppressed because it is too large Load Diff
+15 -9
View File
@@ -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 <string>
#include <vector>
#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<unsign
SpvOptions* options = nullptr);
void GlslangToSpv(const glslang::TIntermediate& intermediate, std::vector<unsigned int>& spirv,
spv::SpvBuildLogger* logger, SpvOptions* options = nullptr);
void OutputSpvBin(const std::vector<unsigned int>& spirv, const char* baseName);
void OutputSpvHex(const std::vector<unsigned int>& spirv, const char* baseName, const char* varName);
bool OutputSpvBin(const std::vector<unsigned int>& spirv, const char* baseName);
bool OutputSpvHex(const std::vector<unsigned int>& spirv, const char* baseName, const char* varName);
}
-4
View File
@@ -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 <algorithm>
@@ -68,5 +66,3 @@ std::string SpvBuildLogger::getAllMessages() const {
}
} // end spv namespace
#endif
-9
View File
@@ -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&);
+5 -5
View File
@@ -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_
+5 -5
View File
@@ -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
+1 -6
View File
@@ -36,10 +36,6 @@
#include "SPVRemapper.h"
#include "doc.h"
#if !defined (use_cpp11)
// ... not supported before C++11
#else // defined (use_cpp11)
#include <algorithm>
#include <cassert>
#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)
+1 -29
View File
@@ -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 <cstdio>
#include <cstdint>
namespace spv {
class spirvbin_t : public spirvbin_base_t
{
public:
spirvbin_t(int /*verbose = 0*/) { }
void remap(std::vector<std::uint32_t>& /*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 <functional>
#include <cstdint>
#include <unordered_map>
@@ -104,9 +77,9 @@ public:
#include <cassert>
#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
+274 -140
View File
@@ -46,10 +46,7 @@
#include <algorithm>
#include "SpvBuilder.h"
#ifndef GLSLANG_WEB
#include "hex_float.h"
#endif
#ifndef _WIN32
#include <cstdio>
@@ -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<Instruction>(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<Instruction>(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<spv::IdImmediate>& operands)
{
// try to find it
@@ -650,8 +676,12 @@ Id Builder::makeDebugFunctionType(Id returnType, const std::vector<Id>& 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<Instruction>(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<Instruction>(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<unsigned int>(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<unsigned int>(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<Id> 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<Instruction>(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<Instruction>(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<Instruction>(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<Instruction>(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<Id>& 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<unsigned>& 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<Id>& 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<cons
decorations.push_back(std::unique_ptr<Instruction>(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<Instruction>(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<Id> paramsTypes;
std::vector<char const*> paramNames;
std::vector<std::vector<Decoration>> 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<Id>& paramTypes, const std::vector<char const*>& paramNames,
const std::vector<std::vector<Decoration>>& decorations, Block **entry)
Function* Builder::makeFunctionEntry(Decoration precision, Id returnType, const char* name, LinkageType linkType,
const std::vector<Id>& paramTypes,
const std::vector<std::vector<Decoration>>& decorations, Block** entry)
{
// Make the function and initial instructions in it
Id typeId = makeFunctionType(returnType, paramTypes);
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>(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<Id>& paramTypes,
const std::vector<char const*>& 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<Id>(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<Instruction>(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<Instruction>(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<Id>(1, type), std::vector<Id>());
}
Instruction* length = new Instruction(getUniqueId(), intType, OpCooperativeMatrixLengthKHR);
length->addIdOperand(type);
buildPoint->addInstruction(std::unique_ptr<Instruction>(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<Id>& op
module.mapInstruction(op);
constantsTypesGlobals.push_back(std::unique_ptr<Instruction>(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<Id> 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<Instruction>(textureInst));
@@ -3207,12 +3346,7 @@ Id Builder::createMatrixConstructor(Decoration precision, const std::vector<Id>&
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<unsigned int>& out) const
}
}
}; // end spv namespace
} // end spv namespace
+24 -22
View File
@@ -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<spv::IdImmediate>& 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<Id>& 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<Id>& paramTypes,
const std::vector<char const*>& 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<unsigned>& literals);
void addDecoration(Id, Decoration, const std::vector<const char*>& 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<Id>& 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<Id>& paramTypes, const std::vector<char const*>& paramNames,
const std::vector<std::vector<Decoration>>& precisions, Block **entry = nullptr);
Function* makeFunctionEntry(Decoration precision, Id returnType, const char* name, LinkageType linkType,
const std::vector<Id>& paramTypes,
const std::vector<std::vector<Decoration>>& 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<unsigned int>&) const;
+8 -9
View File
@@ -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
+3 -3
View File
@@ -226,7 +226,7 @@ void SpirvToolsTransform(const glslang::TIntermediate& intermediate, std::vector
bool SpirvToolsAnalyzeDeadOutputStores(spv_target_env target_env, std::vector<unsigned int>& spirv,
std::unordered_set<uint32_t>* live_locs,
std::unordered_set<uint32_t>* 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<un
void SpirvToolsEliminateDeadOutputStores(spv_target_env target_env, std::vector<unsigned int>& spirv,
std::unordered_set<uint32_t>* live_locs,
std::unordered_set<uint32_t>* 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<unsigned int>& spirv,
spv::SpvBuildLogger* logger)
spv::SpvBuildLogger*)
{
spvtools::Optimizer optimizer(target_env);
optimizer.SetMessageConsumer(OptimizerMesssageConsumer);
+1 -11
View File
@@ -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.
+62 -1
View File
@@ -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<unsigned int>& stream)
{
SpirvStream SpirvStream(out, stream);
+1723 -1356
View File
File diff suppressed because it is too large Load Diff
+4 -3
View File
@@ -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
-13
View File
@@ -23,19 +23,6 @@
#include <limits>
#include <sstream>
#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 {
+262 -5
View File
@@ -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 <stdbool.h>
#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
+18 -4
View File
@@ -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<void(Block*, ReachReason, Block*
class Function {
public:
Function(Id id, Id resultType, Id functionType, Id firstParam, Module& parent);
Function(Id id, Id resultType, Id functionType, Id firstParam, LinkageType linkage, const std::string& name, Module& parent);
virtual ~Function()
{
for (int i = 0; i < (int)parameterInstructions.size(); ++i)
@@ -350,6 +352,7 @@ public:
void addLocalVariable(std::unique_ptr<Instruction> 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<int> 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<Instruction> inst)
+43 -57
View File
@@ -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 $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
PUBLIC $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}>)
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
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../External>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/External>)
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
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../External>)
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} $<TARGET_FILE_NAME:glslang-standalone> ${legacy_glslang_name}
WORKING_DIRECTORY $<TARGET_FILE_DIR:glslang-standalone>)
# Create the same symlink at install time
install(CODE "execute_process( \
COMMAND ${CMAKE_COMMAND} -E ${link_method} $<TARGET_FILE_NAME:glslang-standalone> ${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()
-57
View File
@@ -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 <string>
#include "../glslang/Include/ResourceLimits.h"
namespace glslang {
// These are the default resources for TBuiltInResources, used for both
// - parsing this string for the case where the user didn't supply one,
// - dumping out a template for user construction of a config file.
extern const TBuiltInResource DefaultTBuiltInResource;
// Returns the DefaultTBuiltInResource as a human-readable string.
std::string GetDefaultTBuiltInResourceString();
// Decodes the resource limits from |config| to |resources|.
void DecodeResourceLimits(TBuiltInResource* resources, char* config);
} // end namespace glslang
#endif // _STAND_ALONE_RESOURCE_LIMITS_INCLUDED_
+172 -126
View File
@@ -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 <cstring>
#include <cstdlib>
#include <array>
#include <atomic>
#include <cctype>
#include <cmath>
#include <array>
#include <cstdlib>
#include <cstring>
#include <map>
#include <memory>
#include <thread>
#include <set>
#include <thread>
#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<int8_t> CompileFailed{0};
std::atomic<int8_t> LinkFailed{0};
std::atomic<int8_t> CompileOrLinkFailed{0};
// array of unique places to leave the shader names and infologs for the asynchronous compiles
std::vector<std::unique_ptr<glslang::TWorkItem>> 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<TOptions> 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<int>(::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<int>(::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<std::unique_ptr<glslang::TWorkItem>>& workItem
exit(EFailUsage);
}
errno = 0;
int location = ::strtol(split + 1, nullptr, 10);
int location = static_cast<int>(::strtol(split + 1, nullptr, 10));
if (errno) {
printf("%s: invalid location\n", arg);
exit(EFailUsage);
@@ -626,7 +639,7 @@ void ProcessArguments(std::vector<std::unique_ptr<glslang::TWorkItem>>& workItem
} else if (lowerword == "uniform-base") {
if (argc <= 1)
Error("no <base> provided", lowerword.c_str());
uniformBase = ::strtol(argv[1], nullptr, 10);
uniformBase = static_cast<int>(::strtol(argv[1], nullptr, 10));
bumpArg();
break;
} else if (lowerword == "client") {
@@ -714,7 +727,7 @@ void ProcessArguments(std::vector<std::unique_ptr<glslang::TWorkItem>>& 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<std::unique_ptr<glslang::TWorkItem>>& 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 <text>", 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<std::unique_ptr<glslang::TWorkItem>>& 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<std::unique_ptr<glslang::TWorkItem>>& workItem
else
Error("unknown -O option");
break;
case 'P':
UserPreamble.addText(getStringOperand("-P<text>"));
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<ShaderCompUnit> 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<ShaderCompUnit> 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<ShaderCompUnit> 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<ShaderCompUnit> compUnits)
}
shader->setUniformLocationBase(uniformBase);
#endif
if (VulkanRulesRelaxed) {
for (auto& storageOverride : blockStorageOverrides) {
@@ -1413,24 +1441,23 @@ void CompileAndLinkShaderUnits(std::vector<ShaderCompUnit> 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<ShaderCompUnit> 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<std::string> outputFiles;
// Dump SPIR-V
if (Options & EOptionSpv) {
if (CompileFailed || LinkFailed)
CompileOrLinkFailed.fetch_or(CompileFailed);
CompileOrLinkFailed.fetch_or(LinkFailed);
if (static_cast<bool>(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<unsigned int> 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<glslang::TIntermediate*> 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<unsigned int> 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<bool>(CompileOrLinkFailed.load())) {
std::set<std::string> 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 .<stage> for auto-stage classification, where <stage> 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<text> | --preamble-text <text> | --P <text>\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<ver>|opengl<ver>} see -V and -G\n"
" --depfile <file> writes depfile for build systems\n"
@@ -2064,7 +2108,9 @@ void usage()
" --vn <name> creates a C header file that contains a\n"
" uint32_t array named <name>\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);
}
-54
View File
@@ -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_
+61 -34
View File
@@ -37,7 +37,11 @@
#include <fstream>
#include <cstring>
#include <stdexcept>
#include <filesystem>
//
// 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<std::string>& inputFile, const std::string& outputDir,
const std::string& whiteListFile, int opts, int verbosity)
void execute(const std::vector<std::string>& inputFiles,
const std::vector<std::string>& outputDirOrFiles,
const bool isSingleOutputDir,
const std::string& whiteListFile,
int opts,
int verbosity)
{
std::vector<std::string> 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<inputFiles.size(); ii++) {
std::vector<SpvWord> 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<std::string>& inputFile,
std::string& outputDir,
std::string& stripWhiteListFile,
int& options,
int& verbosity)
void parseCmdLine(int argc,
char** argv,
std::vector<std::string>& inputFiles,
std::vector<std::string>& 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<outputDirOrFiles.size(); ii++) {
auto path = outputDirOrFiles[ii];
while (!path.empty() && path.back() == path_sep_char())
path.pop_back();
}
}
else if (arg == "-vv") { verbosity = 2; ++a; } // verbosity shortcuts
else if (arg == "-vvv") { verbosity = 3; ++a; } // ...
@@ -262,7 +280,7 @@ namespace {
} else if (arg == "--input" || arg == "-i") {
// Collect input files
for (++a; a < argc && argv[a][0] != '-'; ++a)
inputFile.push_back(argv[a]);
inputFiles.push_back(argv[a]);
} else if (arg == "--do-everything") {
++a;
options = options | spv::spirvbin_t::DO_EVERYTHING;
@@ -346,30 +364,39 @@ namespace {
int main(int argc, char** argv)
{
std::vector<std::string> inputFile;
std::string outputDir;
std::vector<std::string> inputFiles;
std::vector<std::string> 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.
}
+33
View File
@@ -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;
+50
View File
@@ -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));
}
+18
View File
@@ -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;
}
+34
View File
@@ -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();
}
+2 -1
View File
@@ -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
+7 -4
View File
@@ -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)
+1 -1
View File
@@ -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
File diff suppressed because it is too large Load Diff
+3 -3
View File
@@ -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.
+205
View File
@@ -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)
+173
View File
@@ -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)
+149
View File
@@ -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)
+1 -1
View File
@@ -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.
+1 -1
View File
@@ -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)
+3 -1
View File
@@ -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
+2 -1
View File
@@ -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
+35
View File
@@ -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)
+45
View File
@@ -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)
+49
View File
@@ -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)
+149
View File
@@ -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)
+160
View File
@@ -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)
+501
View File
@@ -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)
+390
View File
@@ -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
+267 -102
View File
@@ -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
+606
View File
@@ -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
+96 -60
View File
@@ -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)
+152 -152
View File
@@ -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)
File diff suppressed because it is too large Load Diff
@@ -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
+286 -88
View File
@@ -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
+121
View File
@@ -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
+119
View File
@@ -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
+225 -145
View File
@@ -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
+109
View File
@@ -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
+1 -1
View File
@@ -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()
+402
View File
@@ -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
+385
View File
@@ -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
+11 -11
View File
@@ -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)
+11 -11
View File
@@ -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
+11 -11
View File
@@ -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)
+4 -4
View File
@@ -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()
+11 -11
View File
@@ -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
+4 -4
View File
@@ -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)
+115
View File
@@ -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)
+99
View File
@@ -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)
+176
View File
@@ -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})
+75
View File
@@ -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)
@@ -10,7 +10,7 @@
void main(){
void main() {
gl_Position = vec4(3 + 2 + 2 * 4 + 2 + 3 * 2);
}
@@ -7,6 +7,6 @@
#extension unknown_extension : require
int main(){
int main() {
}
@@ -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;
}
+1 -1
View File
@@ -1,5 +1,5 @@
#version 310 es
#line 1 2
#pragma something
void main(){ }
void main() { }
+1 -1
View File
@@ -23,7 +23,7 @@
#line 8
void main(){
void main() {
gl_Position = vec4(10);
}
@@ -9,6 +9,6 @@
#pragma once
int main(){
int main() {
}
+15 -10
View File
@@ -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;
@@ -1,4 +1,4 @@
int x(){
int x() {
something that shouldnt compile;
}

Some files were not shown because too many files have changed in this diff Show More