Merge pull request #7 from KhronosGroup/master
Sync code from glslang base repo
This commit is contained in:
commit
4200c91666
805 changed files with 30766 additions and 12021 deletions
|
|
@ -66,7 +66,6 @@ after_test:
|
||||||
bin\glslangValidator.exe
|
bin\glslangValidator.exe
|
||||||
bin\spirv-remap.exe
|
bin\spirv-remap.exe
|
||||||
include\glslang\*
|
include\glslang\*
|
||||||
include\SPIRV\*
|
|
||||||
lib\glslang%SUFFIX%.lib
|
lib\glslang%SUFFIX%.lib
|
||||||
lib\HLSL%SUFFIX%.lib
|
lib\HLSL%SUFFIX%.lib
|
||||||
lib\OGLCompiler%SUFFIX%.lib
|
lib\OGLCompiler%SUFFIX%.lib
|
||||||
|
|
|
||||||
|
|
@ -99,7 +99,6 @@ after_success:
|
||||||
zip ${TARBALL}
|
zip ${TARBALL}
|
||||||
bin/glslangValidator
|
bin/glslangValidator
|
||||||
include/glslang/*
|
include/glslang/*
|
||||||
include/SPIRV/*
|
|
||||||
lib/libglslang${SUFFIX}.a
|
lib/libglslang${SUFFIX}.a
|
||||||
lib/libHLSL${SUFFIX}.a
|
lib/libHLSL${SUFFIX}.a
|
||||||
lib/libOGLCompiler${SUFFIX}.a
|
lib/libOGLCompiler${SUFFIX}.a
|
||||||
|
|
|
||||||
245
BUILD.bazel
Normal file
245
BUILD.bazel
Normal file
|
|
@ -0,0 +1,245 @@
|
||||||
|
package(
|
||||||
|
default_visibility = ["//visibility:public"],
|
||||||
|
)
|
||||||
|
|
||||||
|
# Description:
|
||||||
|
#
|
||||||
|
# Khronos reference front-end for GLSL and ESSL, and sample SPIR-V generator.
|
||||||
|
|
||||||
|
licenses(["notice"])
|
||||||
|
|
||||||
|
exports_files(["LICENSE"])
|
||||||
|
|
||||||
|
COMMON_COPTS = select({
|
||||||
|
"@bazel_tools//src/conditions:windows": [""],
|
||||||
|
"//conditions:default": [
|
||||||
|
"-Wall",
|
||||||
|
"-Wuninitialized",
|
||||||
|
"-Wunused",
|
||||||
|
"-Wunused-local-typedefs",
|
||||||
|
"-Wunused-parameter",
|
||||||
|
"-Wunused-value",
|
||||||
|
"-Wunused-variable",
|
||||||
|
"-Wno-reorder",
|
||||||
|
"-std=c++11",
|
||||||
|
"-fvisibility=hidden",
|
||||||
|
"-fvisibility-inlines-hidden",
|
||||||
|
"-fno-exceptions",
|
||||||
|
"-fno-rtti",
|
||||||
|
],
|
||||||
|
})
|
||||||
|
|
||||||
|
cc_library(
|
||||||
|
name = "glslang",
|
||||||
|
srcs = glob(
|
||||||
|
[
|
||||||
|
"glslang/GenericCodeGen/*.cpp",
|
||||||
|
"glslang/MachineIndependent/*.cpp",
|
||||||
|
"glslang/MachineIndependent/preprocessor/*.cpp",
|
||||||
|
"hlsl/*.cpp",
|
||||||
|
],
|
||||||
|
exclude = [
|
||||||
|
"glslang/MachineIndependent/pch.cpp",
|
||||||
|
"glslang/MachineIndependent/pch.h",
|
||||||
|
"hlsl/pch.cpp",
|
||||||
|
"hlsl/pch.h",
|
||||||
|
],
|
||||||
|
) + [
|
||||||
|
"OGLCompilersDLL/InitializeDll.cpp",
|
||||||
|
] + select({
|
||||||
|
"@bazel_tools//src/conditions:windows":
|
||||||
|
["glslang/OSDependent/Windows/ossource.cpp"],
|
||||||
|
"//conditions:default":
|
||||||
|
["glslang/OSDependent/Unix/ossource.cpp"],
|
||||||
|
}),
|
||||||
|
hdrs = glob([
|
||||||
|
"glslang/Include/*.h",
|
||||||
|
"glslang/MachineIndependent/*.h",
|
||||||
|
"glslang/MachineIndependent/preprocessor/*.h",
|
||||||
|
"hlsl/*.h",
|
||||||
|
]) + [
|
||||||
|
"OGLCompilersDLL/InitializeDll.h",
|
||||||
|
"StandAlone/DirStackFileIncluder.h",
|
||||||
|
"glslang/OSDependent/osinclude.h",
|
||||||
|
"glslang/Public/ShaderLang.h",
|
||||||
|
],
|
||||||
|
copts = COMMON_COPTS,
|
||||||
|
defines = [
|
||||||
|
"AMD_EXTENSIONS",
|
||||||
|
"ENABLE_HLSL=0",
|
||||||
|
"ENABLE_OPT=0",
|
||||||
|
"NV_EXTENSIONS",
|
||||||
|
],
|
||||||
|
linkopts = select({
|
||||||
|
"@bazel_tools//src/conditions:windows": [""],
|
||||||
|
"//conditions:default": ["-lm", "-lpthread"],
|
||||||
|
}),
|
||||||
|
linkstatic = 1,
|
||||||
|
)
|
||||||
|
|
||||||
|
genrule(
|
||||||
|
name = "export_spirv_headers",
|
||||||
|
srcs = [
|
||||||
|
"SPIRV/GLSL.ext.AMD.h",
|
||||||
|
"SPIRV/GLSL.ext.EXT.h",
|
||||||
|
"SPIRV/GLSL.ext.KHR.h",
|
||||||
|
"SPIRV/GLSL.ext.NV.h",
|
||||||
|
"SPIRV/GLSL.std.450.h",
|
||||||
|
"SPIRV/spirv.hpp",
|
||||||
|
],
|
||||||
|
outs = [
|
||||||
|
"include/SPIRV/GLSL.ext.AMD.h",
|
||||||
|
"include/SPIRV/GLSL.ext.EXT.h",
|
||||||
|
"include/SPIRV/GLSL.ext.KHR.h",
|
||||||
|
"include/SPIRV/GLSL.ext.NV.h",
|
||||||
|
"include/SPIRV/GLSL.std.450.h",
|
||||||
|
"include/SPIRV/spirv.hpp",
|
||||||
|
],
|
||||||
|
cmd = "mkdir -p $(@D)/include/SPIRV && cp $(SRCS) $(@D)/include/SPIRV/",
|
||||||
|
)
|
||||||
|
|
||||||
|
cc_library(
|
||||||
|
name = "SPIRV_headers",
|
||||||
|
hdrs = [":export_spirv_headers"],
|
||||||
|
copts = COMMON_COPTS,
|
||||||
|
includes = [
|
||||||
|
"include",
|
||||||
|
"include/SPIRV",
|
||||||
|
],
|
||||||
|
linkstatic = 1,
|
||||||
|
)
|
||||||
|
|
||||||
|
cc_library(
|
||||||
|
name = "SPIRV",
|
||||||
|
srcs = glob(
|
||||||
|
["SPIRV/*.cpp"],
|
||||||
|
exclude = [
|
||||||
|
"SPIRV/SpvTools.cpp",
|
||||||
|
],
|
||||||
|
),
|
||||||
|
hdrs = [
|
||||||
|
"SPIRV/GlslangToSpv.h",
|
||||||
|
"SPIRV/Logger.h",
|
||||||
|
"SPIRV/SPVRemapper.h",
|
||||||
|
"SPIRV/SpvBuilder.h",
|
||||||
|
"SPIRV/SpvTools.h",
|
||||||
|
"SPIRV/bitutils.h",
|
||||||
|
"SPIRV/disassemble.h",
|
||||||
|
"SPIRV/doc.h",
|
||||||
|
"SPIRV/hex_float.h",
|
||||||
|
"SPIRV/spvIR.h",
|
||||||
|
],
|
||||||
|
copts = COMMON_COPTS,
|
||||||
|
includes = ["SPIRV"],
|
||||||
|
linkopts = select({
|
||||||
|
"@bazel_tools//src/conditions:windows": [""],
|
||||||
|
"//conditions:default": ["-lm"],
|
||||||
|
}),
|
||||||
|
linkstatic = 1,
|
||||||
|
deps = [
|
||||||
|
":SPIRV_headers",
|
||||||
|
":glslang",
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
|
cc_library(
|
||||||
|
name = "glslang-default-resource-limits",
|
||||||
|
srcs = ["StandAlone/ResourceLimits.cpp"],
|
||||||
|
hdrs = ["StandAlone/ResourceLimits.h"],
|
||||||
|
copts = COMMON_COPTS,
|
||||||
|
linkstatic = 1,
|
||||||
|
deps = [":glslang"],
|
||||||
|
)
|
||||||
|
|
||||||
|
cc_binary(
|
||||||
|
name = "glslangValidator",
|
||||||
|
srcs = [
|
||||||
|
"StandAlone/StandAlone.cpp",
|
||||||
|
"StandAlone/Worklist.h",
|
||||||
|
],
|
||||||
|
copts = COMMON_COPTS,
|
||||||
|
deps = [
|
||||||
|
":SPIRV",
|
||||||
|
":glslang",
|
||||||
|
":glslang-default-resource-limits",
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
|
cc_binary(
|
||||||
|
name = "spirv-remap",
|
||||||
|
srcs = ["StandAlone/spirv-remap.cpp"],
|
||||||
|
copts = COMMON_COPTS,
|
||||||
|
deps = [
|
||||||
|
":SPIRV",
|
||||||
|
":glslang",
|
||||||
|
":glslang-default-resource-limits",
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
|
filegroup(
|
||||||
|
name = "test_files",
|
||||||
|
srcs = glob(
|
||||||
|
["Test/**"],
|
||||||
|
exclude = [
|
||||||
|
"Test/bump",
|
||||||
|
"Test/glslangValidator",
|
||||||
|
"Test/runtests",
|
||||||
|
],
|
||||||
|
),
|
||||||
|
)
|
||||||
|
|
||||||
|
cc_library(
|
||||||
|
name = "glslang_test_lib",
|
||||||
|
testonly = 1,
|
||||||
|
srcs = [
|
||||||
|
"gtests/HexFloat.cpp",
|
||||||
|
"gtests/Initializer.h",
|
||||||
|
"gtests/Settings.cpp",
|
||||||
|
"gtests/Settings.h",
|
||||||
|
"gtests/TestFixture.cpp",
|
||||||
|
"gtests/TestFixture.h",
|
||||||
|
"gtests/main.cpp",
|
||||||
|
],
|
||||||
|
copts = COMMON_COPTS,
|
||||||
|
data = [":test_files"],
|
||||||
|
defines = select({
|
||||||
|
# Unfortunately we can't use $(location) in cc_library at the moment.
|
||||||
|
# See https://github.com/bazelbuild/bazel/issues/1023
|
||||||
|
# So we'll specify the path manually.
|
||||||
|
"@bazel_tools//src/conditions:windows":
|
||||||
|
["GLSLANG_TEST_DIRECTORY='\"../../../../../Test\"'"],
|
||||||
|
"//conditions:default":
|
||||||
|
["GLSLANG_TEST_DIRECTORY='\"Test\"'"],
|
||||||
|
}),
|
||||||
|
linkstatic = 1,
|
||||||
|
deps = [
|
||||||
|
":SPIRV",
|
||||||
|
":glslang",
|
||||||
|
":glslang-default-resource-limits",
|
||||||
|
"@com_google_googletest//:gtest",
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
|
GLSLANG_TESTS = glob(
|
||||||
|
["gtests/*.FromFile.cpp"],
|
||||||
|
# Since we are not building the SPIRV-Tools dependency, the following tests
|
||||||
|
# cannot be performed.
|
||||||
|
exclude = [
|
||||||
|
"gtests/Hlsl.FromFile.cpp",
|
||||||
|
"gtests/Spv.FromFile.cpp",
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
|
[cc_test(
|
||||||
|
name = test_file.replace("gtests/", "").replace(".FromFile.cpp", "") + "_test",
|
||||||
|
srcs = [test_file],
|
||||||
|
copts = COMMON_COPTS,
|
||||||
|
data = [
|
||||||
|
":test_files",
|
||||||
|
],
|
||||||
|
deps = [
|
||||||
|
":SPIRV",
|
||||||
|
":glslang",
|
||||||
|
":glslang_test_lib",
|
||||||
|
],
|
||||||
|
) for test_file in GLSLANG_TESTS]
|
||||||
30
BUILD.gn
30
BUILD.gn
|
|
@ -33,6 +33,19 @@
|
||||||
|
|
||||||
import("//build_overrides/glslang.gni")
|
import("//build_overrides/glslang.gni")
|
||||||
|
|
||||||
|
# Both Chromium and Fuchsia use by default a set of warning errors
|
||||||
|
# that is far too strict to compile this project. These are also
|
||||||
|
# typically appended after |cflags|, overriding target-specific
|
||||||
|
# definitions. To work around this, determine which configs to
|
||||||
|
# add and remove in order to succesfully build the project.
|
||||||
|
if (defined(is_fuchsia_tree) && is_fuchsia_tree) {
|
||||||
|
_configs_to_remove = [ "//build/config:default_warnings" ]
|
||||||
|
_configs_to_add = []
|
||||||
|
} else {
|
||||||
|
_configs_to_remove = [ "//build/config/compiler:chromium_code" ]
|
||||||
|
_configs_to_add = [ "//build/config/compiler:no_chromium_code" ]
|
||||||
|
}
|
||||||
|
|
||||||
spirv_tools_dir = glslang_spirv_tools_dir
|
spirv_tools_dir = glslang_spirv_tools_dir
|
||||||
|
|
||||||
config("glslang_public") {
|
config("glslang_public") {
|
||||||
|
|
@ -47,8 +60,10 @@ source_set("glslang_sources") {
|
||||||
sources = [
|
sources = [
|
||||||
"OGLCompilersDLL/InitializeDll.cpp",
|
"OGLCompilersDLL/InitializeDll.cpp",
|
||||||
"OGLCompilersDLL/InitializeDll.h",
|
"OGLCompilersDLL/InitializeDll.h",
|
||||||
|
"SPIRV/GLSL.ext.AMD.h",
|
||||||
"SPIRV/GLSL.ext.EXT.h",
|
"SPIRV/GLSL.ext.EXT.h",
|
||||||
"SPIRV/GLSL.ext.KHR.h",
|
"SPIRV/GLSL.ext.KHR.h",
|
||||||
|
"SPIRV/GLSL.ext.NV.h",
|
||||||
"SPIRV/GLSL.std.450.h",
|
"SPIRV/GLSL.std.450.h",
|
||||||
"SPIRV/GlslangToSpv.cpp",
|
"SPIRV/GlslangToSpv.cpp",
|
||||||
"SPIRV/GlslangToSpv.h",
|
"SPIRV/GlslangToSpv.h",
|
||||||
|
|
@ -159,7 +174,7 @@ source_set("glslang_sources") {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_clang) {
|
if (is_clang) {
|
||||||
cflags_cc = [
|
cflags = [
|
||||||
"-Wno-extra-semi",
|
"-Wno-extra-semi",
|
||||||
"-Wno-ignored-qualifiers",
|
"-Wno-ignored-qualifiers",
|
||||||
"-Wno-implicit-fallthrough",
|
"-Wno-implicit-fallthrough",
|
||||||
|
|
@ -167,6 +182,7 @@ source_set("glslang_sources") {
|
||||||
"-Wno-sign-compare",
|
"-Wno-sign-compare",
|
||||||
"-Wno-unused-variable",
|
"-Wno-unused-variable",
|
||||||
"-Wno-missing-field-initializers",
|
"-Wno-missing-field-initializers",
|
||||||
|
"-Wno-newline-eof",
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
if (is_win && !is_clang) {
|
if (is_win && !is_clang) {
|
||||||
|
|
@ -180,6 +196,9 @@ source_set("glslang_sources") {
|
||||||
"${spirv_tools_dir}:spvtools_opt",
|
"${spirv_tools_dir}:spvtools_opt",
|
||||||
"${spirv_tools_dir}:spvtools_val",
|
"${spirv_tools_dir}:spvtools_val",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
configs -= _configs_to_remove
|
||||||
|
configs += _configs_to_add
|
||||||
}
|
}
|
||||||
|
|
||||||
source_set("glslang_default_resource_limits_sources") {
|
source_set("glslang_default_resource_limits_sources") {
|
||||||
|
|
@ -191,6 +210,9 @@ source_set("glslang_default_resource_limits_sources") {
|
||||||
":glslang_sources",
|
":glslang_sources",
|
||||||
]
|
]
|
||||||
public_configs = [ ":glslang_public" ]
|
public_configs = [ ":glslang_public" ]
|
||||||
|
|
||||||
|
configs -= _configs_to_remove
|
||||||
|
configs += _configs_to_add
|
||||||
}
|
}
|
||||||
|
|
||||||
executable("glslang_validator") {
|
executable("glslang_validator") {
|
||||||
|
|
@ -206,6 +228,9 @@ executable("glslang_validator") {
|
||||||
":glslang_default_resource_limits_sources",
|
":glslang_default_resource_limits_sources",
|
||||||
":glslang_sources",
|
":glslang_sources",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
configs -= _configs_to_remove
|
||||||
|
configs += _configs_to_add
|
||||||
}
|
}
|
||||||
|
|
||||||
executable("spirv-remap") {
|
executable("spirv-remap") {
|
||||||
|
|
@ -216,4 +241,7 @@ executable("spirv-remap") {
|
||||||
deps = [
|
deps = [
|
||||||
":glslang_sources",
|
":glslang_sources",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
configs -= _configs_to_remove
|
||||||
|
configs += _configs_to_add
|
||||||
}
|
}
|
||||||
|
|
|
||||||
108
CMakeLists.txt
108
CMakeLists.txt
|
|
@ -6,6 +6,9 @@ if (POLICY CMP0048)
|
||||||
endif()
|
endif()
|
||||||
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
|
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
|
||||||
|
|
||||||
|
# Enable compile commands database
|
||||||
|
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||||
|
|
||||||
# Adhere to GNU filesystem layout conventions
|
# Adhere to GNU filesystem layout conventions
|
||||||
include(GNUInstallDirs)
|
include(GNUInstallDirs)
|
||||||
|
|
||||||
|
|
@ -13,6 +16,7 @@ include(GNUInstallDirs)
|
||||||
include(CMakeDependentOption)
|
include(CMakeDependentOption)
|
||||||
|
|
||||||
option(BUILD_SHARED_LIBS "Build Shared Libraries" OFF)
|
option(BUILD_SHARED_LIBS "Build Shared Libraries" OFF)
|
||||||
|
option(BUILD_EXTERNAL "Build external dependencies in /External" ON)
|
||||||
|
|
||||||
set(LIB_TYPE STATIC)
|
set(LIB_TYPE STATIC)
|
||||||
|
|
||||||
|
|
@ -28,13 +32,16 @@ option(ENABLE_SPVREMAPPER "Enables building of SPVRemapper" ON)
|
||||||
|
|
||||||
option(ENABLE_GLSLANG_BINARIES "Builds glslangValidator and spirv-remap" ON)
|
option(ENABLE_GLSLANG_BINARIES "Builds glslangValidator and spirv-remap" ON)
|
||||||
|
|
||||||
option(ENABLE_GLSLANG_WEB "Reduces glslang to minumum needed for web use" OFF)
|
option(ENABLE_GLSLANG_WEB "Reduces glslang to minimum needed for web use" OFF)
|
||||||
option(ENABLE_EMSCRIPTEN_SINGLE_FILE "If using emscripten, enables SINGLE_FILE build" OFF)
|
option(ENABLE_GLSLANG_WEB_DEVEL "For ENABLE_GLSLANG_WEB builds, enables compilation error messages" OFF)
|
||||||
option(ENABLE_EMSCRIPTEN_ENVIRONMENT_NODE "If using emscripten, builds to run on Node instead of Web" OFF)
|
option(ENABLE_EMSCRIPTEN_SINGLE_FILE "If using Emscripten, enables SINGLE_FILE build" OFF)
|
||||||
|
option(ENABLE_EMSCRIPTEN_ENVIRONMENT_NODE "If using Emscripten, builds to run on Node instead of Web" OFF)
|
||||||
|
|
||||||
CMAKE_DEPENDENT_OPTION(ENABLE_HLSL "Enables HLSL input support" ON "NOT ENABLE_GLSLANG_WEB" OFF)
|
CMAKE_DEPENDENT_OPTION(ENABLE_HLSL "Enables HLSL input support" ON "NOT ENABLE_GLSLANG_WEB" OFF)
|
||||||
|
|
||||||
option(ENABLE_OPT "Enables spirv-opt capability if present" ON)
|
option(ENABLE_OPT "Enables spirv-opt capability if present" ON)
|
||||||
|
option(ENABLE_PCH "Enables Precompiled header" ON)
|
||||||
|
option(ENABLE_CTEST "Enables testing" ON)
|
||||||
|
|
||||||
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT AND WIN32)
|
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT AND WIN32)
|
||||||
set(CMAKE_INSTALL_PREFIX "install" CACHE STRING "..." FORCE)
|
set(CMAKE_INSTALL_PREFIX "install" CACHE STRING "..." FORCE)
|
||||||
|
|
@ -50,7 +57,7 @@ endif()
|
||||||
|
|
||||||
# Precompiled header macro. Parameters are source file list and filename for pch cpp file.
|
# Precompiled header macro. Parameters are source file list and filename for pch cpp file.
|
||||||
macro(glslang_pch SRCS PCHCPP)
|
macro(glslang_pch SRCS PCHCPP)
|
||||||
if(MSVC AND CMAKE_GENERATOR MATCHES "^Visual Studio")
|
if(MSVC AND CMAKE_GENERATOR MATCHES "^Visual Studio" AND ENABLE_PCH)
|
||||||
set(PCH_NAME "$(IntDir)\\pch.pch")
|
set(PCH_NAME "$(IntDir)\\pch.pch")
|
||||||
# make source files use/depend on PCH_NAME
|
# make source files use/depend on PCH_NAME
|
||||||
set_source_files_properties(${${SRCS}} PROPERTIES COMPILE_FLAGS "/Yupch.h /FIpch.h /Fp${PCH_NAME} /Zm300" OBJECT_DEPENDS "${PCH_NAME}")
|
set_source_files_properties(${${SRCS}} PROPERTIES COMPILE_FLAGS "/Yupch.h /FIpch.h /Fp${PCH_NAME} /Zm300" OBJECT_DEPENDS "${PCH_NAME}")
|
||||||
|
|
@ -61,8 +68,10 @@ macro(glslang_pch SRCS PCHCPP)
|
||||||
endmacro(glslang_pch)
|
endmacro(glslang_pch)
|
||||||
|
|
||||||
project(glslang)
|
project(glslang)
|
||||||
# make testing optional
|
|
||||||
include(CTest)
|
if(ENABLE_CTEST)
|
||||||
|
include(CTest)
|
||||||
|
endif()
|
||||||
|
|
||||||
if(ENABLE_HLSL)
|
if(ENABLE_HLSL)
|
||||||
add_definitions(-DENABLE_HLSL)
|
add_definitions(-DENABLE_HLSL)
|
||||||
|
|
@ -70,6 +79,9 @@ endif(ENABLE_HLSL)
|
||||||
|
|
||||||
if(ENABLE_GLSLANG_WEB)
|
if(ENABLE_GLSLANG_WEB)
|
||||||
add_definitions(-DGLSLANG_WEB)
|
add_definitions(-DGLSLANG_WEB)
|
||||||
|
if(ENABLE_GLSLANG_WEB_DEVEL)
|
||||||
|
add_definitions(-DGLSLANG_WEB_DEVEL)
|
||||||
|
endif(ENABLE_GLSLANG_WEB_DEVEL)
|
||||||
endif(ENABLE_GLSLANG_WEB)
|
endif(ENABLE_GLSLANG_WEB)
|
||||||
|
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
|
|
@ -98,38 +110,29 @@ elseif(${CMAKE_CXX_COMPILER_ID} MATCHES "MSVC")
|
||||||
add_compile_options(/GR-) # Disable RTTI
|
add_compile_options(/GR-) # Disable RTTI
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(ENABLE_GLSLANG_WEB)
|
if(EMSCRIPTEN)
|
||||||
if(EMSCRIPTEN)
|
add_compile_options(-Os -fno-exceptions)
|
||||||
add_compile_options(-Os -fno-exceptions)
|
add_compile_options("SHELL: -s WASM=1")
|
||||||
add_compile_options("SHELL: -s WASM=1")
|
add_compile_options("SHELL: -s WASM_OBJECT_FILES=0")
|
||||||
add_compile_options("SHELL: -s WASM_OBJECT_FILES=0")
|
add_link_options(-Os)
|
||||||
add_link_options(-Os)
|
add_link_options("SHELL: -s FILESYSTEM=0")
|
||||||
add_link_options("SHELL: -s FILESYSTEM=0")
|
add_link_options("SHELL: --llvm-lto 1")
|
||||||
add_link_options("SHELL: --llvm-lto 1")
|
add_link_options("SHELL: --closure 1")
|
||||||
add_link_options("SHELL: --closure 1")
|
add_link_options("SHELL: -s ALLOW_MEMORY_GROWTH=1")
|
||||||
add_link_options("SHELL: -s ALLOW_MEMORY_GROWTH=1")
|
|
||||||
|
|
||||||
add_link_options("SHELL: -s MODULARIZE=1")
|
if(ENABLE_EMSCRIPTEN_SINGLE_FILE)
|
||||||
if(ENABLE_EMSCRIPTEN_SINGLE_FILE)
|
add_link_options("SHELL: -s SINGLE_FILE=1")
|
||||||
add_link_options("SHELL: -s SINGLE_FILE=1")
|
endif(ENABLE_EMSCRIPTEN_SINGLE_FILE)
|
||||||
endif(ENABLE_EMSCRIPTEN_SINGLE_FILE)
|
else()
|
||||||
|
if(ENABLE_GLSLANG_WEB)
|
||||||
if(ENABLE_EMSCRIPTEN_ENVIRONMENT_NODE)
|
if(MSVC)
|
||||||
add_link_options("SHELL: -s ENVIRONMENT=node")
|
add_compile_options(/Os /GR-)
|
||||||
add_link_options("SHELL: -s BINARYEN_ASYNC_COMPILATION=0")
|
|
||||||
else()
|
else()
|
||||||
add_link_options("SHELL: -s ENVIRONMENT=web,worker")
|
add_compile_options(-Os -fno-exceptions)
|
||||||
add_link_options("SHELL: -s EXPORT_ES6=1")
|
add_link_options(-Os)
|
||||||
endif()
|
endif()
|
||||||
else()
|
endif(ENABLE_GLSLANG_WEB)
|
||||||
if(MSVC)
|
endif(EMSCRIPTEN)
|
||||||
add_compile_options(/Os /GR-)
|
|
||||||
else()
|
|
||||||
add_compile_options(-Os -fno-exceptions)
|
|
||||||
add_link_options(-Os)
|
|
||||||
endif()
|
|
||||||
endif(EMSCRIPTEN)
|
|
||||||
endif(ENABLE_GLSLANG_WEB)
|
|
||||||
|
|
||||||
# Request C++11
|
# Request C++11
|
||||||
if(${CMAKE_VERSION} VERSION_LESS 3.1)
|
if(${CMAKE_VERSION} VERSION_LESS 3.1)
|
||||||
|
|
@ -153,12 +156,12 @@ endfunction(glslang_set_link_args)
|
||||||
|
|
||||||
# CMake needs to find the right version of python, right from the beginning,
|
# CMake needs to find the right version of python, right from the beginning,
|
||||||
# otherwise, it will find the wrong version and fail later
|
# otherwise, it will find the wrong version and fail later
|
||||||
if(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/External)
|
if(BUILD_EXTERNAL AND IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/External)
|
||||||
find_package(PythonInterp 3 REQUIRED)
|
find_package(PythonInterp 3 REQUIRED)
|
||||||
endif()
|
|
||||||
|
|
||||||
# We depend on these for later projects, so they should come first.
|
# We depend on these for later projects, so they should come first.
|
||||||
add_subdirectory(External)
|
add_subdirectory(External)
|
||||||
|
endif()
|
||||||
|
|
||||||
if(NOT TARGET SPIRV-Tools-opt)
|
if(NOT TARGET SPIRV-Tools-opt)
|
||||||
set(ENABLE_OPT OFF)
|
set(ENABLE_OPT OFF)
|
||||||
|
|
@ -183,4 +186,29 @@ add_subdirectory(SPIRV)
|
||||||
if(ENABLE_HLSL)
|
if(ENABLE_HLSL)
|
||||||
add_subdirectory(hlsl)
|
add_subdirectory(hlsl)
|
||||||
endif(ENABLE_HLSL)
|
endif(ENABLE_HLSL)
|
||||||
add_subdirectory(gtests)
|
if(ENABLE_CTEST)
|
||||||
|
add_subdirectory(gtests)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(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)
|
||||||
|
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(CMAKE_CONFIGURATION_TYPES)
|
||||||
|
set(RESULTS_PATH ${CMAKE_CURRENT_BINARY_DIR}/localResults)
|
||||||
|
set(VALIDATOR_PATH ${CMAKE_CURRENT_BINARY_DIR}/StandAlone/glslangValidator)
|
||||||
|
set(REMAP_PATH ${CMAKE_CURRENT_BINARY_DIR}/StandAlone/spirv-remap)
|
||||||
|
endif(CMAKE_CONFIGURATION_TYPES)
|
||||||
|
|
||||||
|
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(BUILD_TESTING)
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,7 @@ if(WIN32)
|
||||||
endif(WIN32)
|
endif(WIN32)
|
||||||
|
|
||||||
if(ENABLE_GLSLANG_INSTALL)
|
if(ENABLE_GLSLANG_INSTALL)
|
||||||
install(TARGETS OGLCompiler
|
install(TARGETS OGLCompiler EXPORT OGLCompilerTargets
|
||||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||||
|
install(EXPORT OGLCompilerTargets DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake)
|
||||||
endif(ENABLE_GLSLANG_INSTALL)
|
endif(ENABLE_GLSLANG_INSTALL)
|
||||||
|
|
|
||||||
52
README.md
52
README.md
|
|
@ -28,6 +28,15 @@ comment in `glslang/MachineIndependent/Versions.cpp`.
|
||||||
|
|
||||||
Tasks waiting to be done are documented as GitHub issues.
|
Tasks waiting to be done are documented as GitHub issues.
|
||||||
|
|
||||||
|
Deprecations
|
||||||
|
------------
|
||||||
|
|
||||||
|
1. 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 then May 1, 2020. See issue #1964.
|
||||||
|
|
||||||
Execution of Standalone Wrapper
|
Execution of Standalone Wrapper
|
||||||
-------------------------------
|
-------------------------------
|
||||||
|
|
||||||
|
|
@ -94,8 +103,8 @@ cd ../..
|
||||||
```
|
```
|
||||||
|
|
||||||
If you wish to assure that SPIR-V generated from HLSL is legal for Vulkan,
|
If you wish to assure that SPIR-V generated from HLSL is legal for Vulkan,
|
||||||
or wish to invoke -Os to reduce SPIR-V size from HLSL or GLSL, install
|
wish to invoke -Os to reduce SPIR-V size from HLSL or GLSL, or wish to run the
|
||||||
spirv-tools with this:
|
integrated test suite, install spirv-tools with this:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
./update_glslang_sources.py
|
./update_glslang_sources.py
|
||||||
|
|
@ -166,26 +175,30 @@ when executed from the glslang subdirectory of the glslang repository.
|
||||||
With no arguments it builds the full grammar, and with a "web" argument,
|
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).
|
the web grammar subset (see more about the web subset in the next section).
|
||||||
|
|
||||||
### WASM for the the Web
|
### Building to WASM for the Web and Node
|
||||||
|
|
||||||
Use the steps in [Build Steps](#build-steps), which following notes/exceptions:
|
Use the steps in [Build Steps](#build-steps), with the following notes/exceptions:
|
||||||
* For building the web subset of core glslang:
|
* For building the web subset of core glslang:
|
||||||
+ `m4` also needs a `-DGLSLANG_WEB` argument, or simply execute `updateGrammar web` from the glslang subdirectory
|
+ execute `updateGrammar web` from the glslang subdirectory
|
||||||
+ turn off the CMAKE options for `BUILD_TESTING`, `ENABLE_OPT`, and `INSTALL_GTEST`,
|
(or if using your own scripts, `m4` needs a `-DGLSLANG_WEB` argument)
|
||||||
while turning on `ENABLE_GLSLANG_WEB`
|
+ set `-DENABLE_HLSL=OFF -DBUILD_TESTING=OFF -DENABLE_OPT=OFF -DINSTALL_GTEST=OFF`
|
||||||
|
+ turn on `-DENABLE_GLSLANG_WEB=ON`
|
||||||
|
+ optionally, for GLSL compilation error messages, turn on `-DENABLE_GLSLANG_WEB_DEVEL=ON`
|
||||||
* `emsdk` needs to be present in your executable search path, *PATH* for
|
* `emsdk` needs to be present in your executable search path, *PATH* for
|
||||||
Bash-like enivironments
|
Bash-like enivironments
|
||||||
+ Instructions located
|
+ [Instructions located
|
||||||
[here](https://emscripten.org/docs/getting_started/downloads.html#sdk-download-and-install)
|
here](https://emscripten.org/docs/getting_started/downloads.html#sdk-download-and-install)
|
||||||
* Do not checkout SPIRV-Tools into `External`
|
* Wrap cmake call: `emcmake cmake`
|
||||||
+ Does not work correctly with emscripten out of the box and we don't want it
|
* To get a fully minimized build, make sure to use `brotli` to compress the .js
|
||||||
in the build anyway. *TBD* Have build ignore SPIRV-Tools for web build
|
|
||||||
* Wrap call to `cmake` using `emconfigure` with ENABLE_GLSLANG_WEB=ON:
|
|
||||||
+ e.g. For Linux, `emconfigure cmake -DCMAKE_BUILD_TYPE=Release
|
|
||||||
-DENABLE_GLSLANG_WEB=ON -DCMAKE_INSTALL_PREFIX="$(pwd)/install" ..`
|
|
||||||
* To get a 'true' minimized build, make sure to use `brotli` to compress the .js
|
|
||||||
and .wasm files
|
and .wasm files
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
emcmake cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_GLSLANG_WEB=ON \
|
||||||
|
-DENABLE_HLSL=OFF -DBUILD_TESTING=OFF -DENABLE_OPT=OFF -DINSTALL_GTEST=OFF ..
|
||||||
|
```
|
||||||
|
|
||||||
Testing
|
Testing
|
||||||
-------
|
-------
|
||||||
|
|
||||||
|
|
@ -223,6 +236,11 @@ Running `runtests` script-backed tests:
|
||||||
cd $SOURCE_DIR/Test && ./runtests
|
cd $SOURCE_DIR/Test && ./runtests
|
||||||
```
|
```
|
||||||
|
|
||||||
|
If some tests fail with validation errors, there may be a mismatch between the
|
||||||
|
version of `spirv-val` on the system and the version of glslang. In this
|
||||||
|
case, it is necessary to run `update_glslang_sources.py`. See "Check-Out
|
||||||
|
External Projects" above for more details.
|
||||||
|
|
||||||
### Contributing tests
|
### Contributing tests
|
||||||
|
|
||||||
Test results should always be included with a pull request that modifies
|
Test results should always be included with a pull request that modifies
|
||||||
|
|
@ -303,7 +321,7 @@ See `ShaderLang.h` and the usage of it in `StandAlone/StandAlone.cpp` for more
|
||||||
details. There is a block comment giving more detail above the calls for
|
details. There is a block comment giving more detail above the calls for
|
||||||
`setEnvInput, setEnvClient, and setEnvTarget`.
|
`setEnvInput, setEnvClient, and setEnvTarget`.
|
||||||
|
|
||||||
### C Functional Interface (orignal)
|
### C Functional Interface (original)
|
||||||
|
|
||||||
This interface is in roughly the first 2/3 of `ShaderLang.h`, and referred to
|
This interface is in roughly the first 2/3 of `ShaderLang.h`, and referred to
|
||||||
as the `Sh*()` interface, as all the entry points start `Sh`.
|
as the `Sh*()` interface, as all the entry points start `Sh`.
|
||||||
|
|
|
||||||
23
SPIRV/CMakeLists.txt
Normal file → Executable file
23
SPIRV/CMakeLists.txt
Normal file → Executable file
|
|
@ -36,7 +36,9 @@ set(SPVREMAP_HEADERS
|
||||||
add_library(SPIRV ${LIB_TYPE} ${SOURCES} ${HEADERS})
|
add_library(SPIRV ${LIB_TYPE} ${SOURCES} ${HEADERS})
|
||||||
set_property(TARGET SPIRV PROPERTY FOLDER glslang)
|
set_property(TARGET SPIRV PROPERTY FOLDER glslang)
|
||||||
set_property(TARGET SPIRV PROPERTY POSITION_INDEPENDENT_CODE ON)
|
set_property(TARGET SPIRV PROPERTY POSITION_INDEPENDENT_CODE ON)
|
||||||
target_include_directories(SPIRV PUBLIC ..)
|
target_include_directories(SPIRV PUBLIC
|
||||||
|
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/..>
|
||||||
|
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)
|
||||||
|
|
||||||
if (ENABLE_SPVREMAPPER)
|
if (ENABLE_SPVREMAPPER)
|
||||||
add_library(SPVRemapper ${LIB_TYPE} ${SPVREMAP_SOURCES} ${SPVREMAP_HEADERS})
|
add_library(SPVRemapper ${LIB_TYPE} ${SPVREMAP_SOURCES} ${SPVREMAP_HEADERS})
|
||||||
|
|
@ -57,7 +59,9 @@ if(ENABLE_OPT)
|
||||||
PRIVATE ${spirv-tools_SOURCE_DIR}/source
|
PRIVATE ${spirv-tools_SOURCE_DIR}/source
|
||||||
)
|
)
|
||||||
target_link_libraries(SPIRV glslang SPIRV-Tools-opt)
|
target_link_libraries(SPIRV glslang SPIRV-Tools-opt)
|
||||||
target_include_directories(SPIRV PUBLIC ../External)
|
target_include_directories(SPIRV PUBLIC
|
||||||
|
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../External>
|
||||||
|
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/External>)
|
||||||
else()
|
else()
|
||||||
target_link_libraries(SPIRV glslang)
|
target_link_libraries(SPIRV glslang)
|
||||||
endif(ENABLE_OPT)
|
endif(ENABLE_OPT)
|
||||||
|
|
@ -70,22 +74,29 @@ endif(WIN32)
|
||||||
if(ENABLE_GLSLANG_INSTALL)
|
if(ENABLE_GLSLANG_INSTALL)
|
||||||
if(BUILD_SHARED_LIBS)
|
if(BUILD_SHARED_LIBS)
|
||||||
if (ENABLE_SPVREMAPPER)
|
if (ENABLE_SPVREMAPPER)
|
||||||
install(TARGETS SPVRemapper
|
install(TARGETS SPVRemapper EXPORT SPVRemapperTargets
|
||||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||||
endif()
|
endif()
|
||||||
install(TARGETS SPIRV
|
install(TARGETS SPIRV EXPORT SPIRVTargets
|
||||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||||
else()
|
else()
|
||||||
if (ENABLE_SPVREMAPPER)
|
if (ENABLE_SPVREMAPPER)
|
||||||
install(TARGETS SPVRemapper
|
install(TARGETS SPVRemapper EXPORT SPVRemapperTargets
|
||||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||||
endif()
|
endif()
|
||||||
install(TARGETS SPIRV
|
install(TARGETS SPIRV EXPORT SPIRVTargets
|
||||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if (ENABLE_SPVREMAPPER)
|
||||||
|
install(EXPORT SPVRemapperTargets DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
install(EXPORT SPIRVTargets DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake)
|
||||||
|
|
||||||
install(FILES ${HEADERS} ${SPVREMAP_HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/SPIRV/)
|
install(FILES ${HEADERS} ${SPVREMAP_HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/SPIRV/)
|
||||||
|
install(FILES ${HEADERS} ${SPVREMAP_HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/glslang/SPIRV/)
|
||||||
endif(ENABLE_GLSLANG_INSTALL)
|
endif(ENABLE_GLSLANG_INSTALL)
|
||||||
|
|
|
||||||
|
|
@ -41,6 +41,7 @@ static const char* const E_SPV_KHR_storage_buffer_storage_class = "SPV_KHR_stora
|
||||||
static const char* const E_SPV_KHR_post_depth_coverage = "SPV_KHR_post_depth_coverage";
|
static const char* const E_SPV_KHR_post_depth_coverage = "SPV_KHR_post_depth_coverage";
|
||||||
static const char* const E_SPV_KHR_vulkan_memory_model = "SPV_KHR_vulkan_memory_model";
|
static const char* const E_SPV_KHR_vulkan_memory_model = "SPV_KHR_vulkan_memory_model";
|
||||||
static const char* const E_SPV_EXT_physical_storage_buffer = "SPV_EXT_physical_storage_buffer";
|
static const char* const E_SPV_EXT_physical_storage_buffer = "SPV_EXT_physical_storage_buffer";
|
||||||
|
static const char* const E_SPV_KHR_physical_storage_buffer = "SPV_KHR_physical_storage_buffer";
|
||||||
static const char* const E_SPV_EXT_fragment_shader_interlock = "SPV_EXT_fragment_shader_interlock";
|
static const char* const E_SPV_EXT_fragment_shader_interlock = "SPV_EXT_fragment_shader_interlock";
|
||||||
static const char* const E_SPV_KHR_shader_clock = "SPV_KHR_shader_clock";
|
static const char* const E_SPV_KHR_shader_clock = "SPV_KHR_shader_clock";
|
||||||
|
|
||||||
|
|
|
||||||
347
SPIRV/GlslangToSpv.cpp
Normal file → Executable file
347
SPIRV/GlslangToSpv.cpp
Normal file → Executable file
|
|
@ -100,11 +100,11 @@ struct OpDecorations {
|
||||||
spv::Decoration precision;
|
spv::Decoration precision;
|
||||||
|
|
||||||
#ifdef GLSLANG_WEB
|
#ifdef GLSLANG_WEB
|
||||||
void addNoContraction(spv::Builder&, spv::Id) const { };
|
void addNoContraction(spv::Builder&, spv::Id) const { }
|
||||||
void addNonUniform(spv::Builder&, spv::Id) const { };
|
void addNonUniform(spv::Builder&, spv::Id) const { }
|
||||||
#else
|
#else
|
||||||
void addNoContraction(spv::Builder& builder, spv::Id t) { builder.addDecoration(t, noContraction); };
|
void addNoContraction(spv::Builder& builder, spv::Id t) { builder.addDecoration(t, noContraction); }
|
||||||
void addNonUniform(spv::Builder& builder, spv::Id t) { builder.addDecoration(t, nonUniform); };
|
void addNonUniform(spv::Builder& builder, spv::Id t) { builder.addDecoration(t, nonUniform); }
|
||||||
protected:
|
protected:
|
||||||
spv::Decoration noContraction;
|
spv::Decoration noContraction;
|
||||||
spv::Decoration nonUniform;
|
spv::Decoration nonUniform;
|
||||||
|
|
@ -217,11 +217,6 @@ protected:
|
||||||
bool isTrivial(const glslang::TIntermTyped* node);
|
bool isTrivial(const glslang::TIntermTyped* node);
|
||||||
spv::Id createShortCircuit(glslang::TOperator, glslang::TIntermTyped& left, glslang::TIntermTyped& right);
|
spv::Id createShortCircuit(glslang::TOperator, glslang::TIntermTyped& left, glslang::TIntermTyped& right);
|
||||||
spv::Id getExtBuiltins(const char* name);
|
spv::Id getExtBuiltins(const char* name);
|
||||||
void addPre13Extension(const char* ext)
|
|
||||||
{
|
|
||||||
if (builder.getSpvVersion() < glslang::EShTargetSpv_1_3)
|
|
||||||
builder.addExtension(ext);
|
|
||||||
}
|
|
||||||
std::pair<spv::Id, spv::Id> getForcedType(spv::BuiltIn, const glslang::TType&);
|
std::pair<spv::Id, spv::Id> getForcedType(spv::BuiltIn, const glslang::TType&);
|
||||||
spv::Id translateForcedType(spv::Id object);
|
spv::Id translateForcedType(spv::Id object);
|
||||||
spv::Id createCompositeConstruct(spv::Id typeId, std::vector<spv::Id> constituents);
|
spv::Id createCompositeConstruct(spv::Id typeId, std::vector<spv::Id> constituents);
|
||||||
|
|
@ -297,8 +292,8 @@ spv::ExecutionModel TranslateExecutionModel(EShLanguage stage)
|
||||||
switch (stage) {
|
switch (stage) {
|
||||||
case EShLangVertex: return spv::ExecutionModelVertex;
|
case EShLangVertex: return spv::ExecutionModelVertex;
|
||||||
case EShLangFragment: return spv::ExecutionModelFragment;
|
case EShLangFragment: return spv::ExecutionModelFragment;
|
||||||
#ifndef GLSLANG_WEB
|
|
||||||
case EShLangCompute: return spv::ExecutionModelGLCompute;
|
case EShLangCompute: return spv::ExecutionModelGLCompute;
|
||||||
|
#ifndef GLSLANG_WEB
|
||||||
case EShLangTessControl: return spv::ExecutionModelTessellationControl;
|
case EShLangTessControl: return spv::ExecutionModelTessellationControl;
|
||||||
case EShLangTessEvaluation: return spv::ExecutionModelTessellationEvaluation;
|
case EShLangTessEvaluation: return spv::ExecutionModelTessellationEvaluation;
|
||||||
case EShLangGeometry: return spv::ExecutionModelGeometry;
|
case EShLangGeometry: return spv::ExecutionModelGeometry;
|
||||||
|
|
@ -379,22 +374,20 @@ spv::Decoration TranslateBlockDecoration(const glslang::TType& type, bool useSto
|
||||||
// Translate glslang type to SPIR-V memory decorations.
|
// Translate glslang type to SPIR-V memory decorations.
|
||||||
void TranslateMemoryDecoration(const glslang::TQualifier& qualifier, std::vector<spv::Decoration>& memory, bool useVulkanMemoryModel)
|
void TranslateMemoryDecoration(const glslang::TQualifier& qualifier, std::vector<spv::Decoration>& memory, bool useVulkanMemoryModel)
|
||||||
{
|
{
|
||||||
#ifndef GLSLANG_WEB
|
|
||||||
if (!useVulkanMemoryModel) {
|
if (!useVulkanMemoryModel) {
|
||||||
if (qualifier.coherent)
|
if (qualifier.isCoherent())
|
||||||
memory.push_back(spv::DecorationCoherent);
|
memory.push_back(spv::DecorationCoherent);
|
||||||
if (qualifier.volatil) {
|
if (qualifier.isVolatile()) {
|
||||||
memory.push_back(spv::DecorationVolatile);
|
memory.push_back(spv::DecorationVolatile);
|
||||||
memory.push_back(spv::DecorationCoherent);
|
memory.push_back(spv::DecorationCoherent);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (qualifier.restrict)
|
if (qualifier.isRestrict())
|
||||||
memory.push_back(spv::DecorationRestrict);
|
memory.push_back(spv::DecorationRestrict);
|
||||||
if (qualifier.isReadOnly())
|
if (qualifier.isReadOnly())
|
||||||
memory.push_back(spv::DecorationNonWritable);
|
memory.push_back(spv::DecorationNonWritable);
|
||||||
if (qualifier.isWriteOnly())
|
if (qualifier.isWriteOnly())
|
||||||
memory.push_back(spv::DecorationNonReadable);
|
memory.push_back(spv::DecorationNonReadable);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Translate glslang type to SPIR-V layout decorations.
|
// Translate glslang type to SPIR-V layout decorations.
|
||||||
|
|
@ -517,7 +510,7 @@ spv::Decoration TGlslangToSpvTraverser::TranslateNonUniformDecoration(const glsl
|
||||||
{
|
{
|
||||||
#ifndef GLSLANG_WEB
|
#ifndef GLSLANG_WEB
|
||||||
if (qualifier.isNonUniform()) {
|
if (qualifier.isNonUniform()) {
|
||||||
builder.addExtension("SPV_EXT_descriptor_indexing");
|
builder.addIncorporatedExtension("SPV_EXT_descriptor_indexing", spv::Spv_1_5);
|
||||||
builder.addCapability(spv::CapabilityShaderNonUniformEXT);
|
builder.addCapability(spv::CapabilityShaderNonUniformEXT);
|
||||||
return spv::DecorationNonUniformEXT;
|
return spv::DecorationNonUniformEXT;
|
||||||
} else
|
} else
|
||||||
|
|
@ -678,6 +671,13 @@ spv::BuiltIn TGlslangToSpvTraverser::TranslateBuiltInDecoration(glslang::TBuiltI
|
||||||
case glslang::EbvFace: return spv::BuiltInFrontFacing;
|
case glslang::EbvFace: return spv::BuiltInFrontFacing;
|
||||||
case glslang::EbvFragDepth: return spv::BuiltInFragDepth;
|
case glslang::EbvFragDepth: return spv::BuiltInFragDepth;
|
||||||
|
|
||||||
|
case glslang::EbvNumWorkGroups: return spv::BuiltInNumWorkgroups;
|
||||||
|
case glslang::EbvWorkGroupSize: return spv::BuiltInWorkgroupSize;
|
||||||
|
case glslang::EbvWorkGroupId: return spv::BuiltInWorkgroupId;
|
||||||
|
case glslang::EbvLocalInvocationId: return spv::BuiltInLocalInvocationId;
|
||||||
|
case glslang::EbvLocalInvocationIndex: return spv::BuiltInLocalInvocationIndex;
|
||||||
|
case glslang::EbvGlobalInvocationId: return spv::BuiltInGlobalInvocationId;
|
||||||
|
|
||||||
#ifndef GLSLANG_WEB
|
#ifndef GLSLANG_WEB
|
||||||
// These *Distance capabilities logically belong here, but if the member is declared and
|
// These *Distance capabilities logically belong here, but if the member is declared and
|
||||||
// then never used, consumers of SPIR-V prefer the capability not be declared.
|
// then never used, consumers of SPIR-V prefer the capability not be declared.
|
||||||
|
|
@ -701,7 +701,7 @@ spv::BuiltIn TGlslangToSpvTraverser::TranslateBuiltInDecoration(glslang::TBuiltI
|
||||||
glslangIntermediate->getStage() == EShLangTessControl ||
|
glslangIntermediate->getStage() == EShLangTessControl ||
|
||||||
glslangIntermediate->getStage() == EShLangTessEvaluation) {
|
glslangIntermediate->getStage() == EShLangTessEvaluation) {
|
||||||
|
|
||||||
builder.addExtension(spv::E_SPV_EXT_shader_viewport_index_layer);
|
builder.addIncorporatedExtension(spv::E_SPV_EXT_shader_viewport_index_layer, spv::Spv_1_5);
|
||||||
builder.addCapability(spv::CapabilityShaderViewportIndexLayerEXT);
|
builder.addCapability(spv::CapabilityShaderViewportIndexLayerEXT);
|
||||||
}
|
}
|
||||||
return spv::BuiltInViewportIndex;
|
return spv::BuiltInViewportIndex;
|
||||||
|
|
@ -726,23 +726,23 @@ spv::BuiltIn TGlslangToSpvTraverser::TranslateBuiltInDecoration(glslang::TBuiltI
|
||||||
glslangIntermediate->getStage() == EShLangTessControl ||
|
glslangIntermediate->getStage() == EShLangTessControl ||
|
||||||
glslangIntermediate->getStage() == EShLangTessEvaluation) {
|
glslangIntermediate->getStage() == EShLangTessEvaluation) {
|
||||||
|
|
||||||
builder.addExtension(spv::E_SPV_EXT_shader_viewport_index_layer);
|
builder.addIncorporatedExtension(spv::E_SPV_EXT_shader_viewport_index_layer, spv::Spv_1_5);
|
||||||
builder.addCapability(spv::CapabilityShaderViewportIndexLayerEXT);
|
builder.addCapability(spv::CapabilityShaderViewportIndexLayerEXT);
|
||||||
}
|
}
|
||||||
return spv::BuiltInLayer;
|
return spv::BuiltInLayer;
|
||||||
|
|
||||||
case glslang::EbvBaseVertex:
|
case glslang::EbvBaseVertex:
|
||||||
addPre13Extension(spv::E_SPV_KHR_shader_draw_parameters);
|
builder.addIncorporatedExtension(spv::E_SPV_KHR_shader_draw_parameters, spv::Spv_1_3);
|
||||||
builder.addCapability(spv::CapabilityDrawParameters);
|
builder.addCapability(spv::CapabilityDrawParameters);
|
||||||
return spv::BuiltInBaseVertex;
|
return spv::BuiltInBaseVertex;
|
||||||
|
|
||||||
case glslang::EbvBaseInstance:
|
case glslang::EbvBaseInstance:
|
||||||
addPre13Extension(spv::E_SPV_KHR_shader_draw_parameters);
|
builder.addIncorporatedExtension(spv::E_SPV_KHR_shader_draw_parameters, spv::Spv_1_3);
|
||||||
builder.addCapability(spv::CapabilityDrawParameters);
|
builder.addCapability(spv::CapabilityDrawParameters);
|
||||||
return spv::BuiltInBaseInstance;
|
return spv::BuiltInBaseInstance;
|
||||||
|
|
||||||
case glslang::EbvDrawId:
|
case glslang::EbvDrawId:
|
||||||
addPre13Extension(spv::E_SPV_KHR_shader_draw_parameters);
|
builder.addIncorporatedExtension(spv::E_SPV_KHR_shader_draw_parameters, spv::Spv_1_3);
|
||||||
builder.addCapability(spv::CapabilityDrawParameters);
|
builder.addCapability(spv::CapabilityDrawParameters);
|
||||||
return spv::BuiltInDrawIndex;
|
return spv::BuiltInDrawIndex;
|
||||||
|
|
||||||
|
|
@ -762,12 +762,6 @@ spv::BuiltIn TGlslangToSpvTraverser::TranslateBuiltInDecoration(glslang::TBuiltI
|
||||||
case glslang::EbvTessCoord: return spv::BuiltInTessCoord;
|
case glslang::EbvTessCoord: return spv::BuiltInTessCoord;
|
||||||
case glslang::EbvPatchVertices: return spv::BuiltInPatchVertices;
|
case glslang::EbvPatchVertices: return spv::BuiltInPatchVertices;
|
||||||
case glslang::EbvHelperInvocation: return spv::BuiltInHelperInvocation;
|
case glslang::EbvHelperInvocation: return spv::BuiltInHelperInvocation;
|
||||||
case glslang::EbvNumWorkGroups: return spv::BuiltInNumWorkgroups;
|
|
||||||
case glslang::EbvWorkGroupSize: return spv::BuiltInWorkgroupSize;
|
|
||||||
case glslang::EbvWorkGroupId: return spv::BuiltInWorkgroupId;
|
|
||||||
case glslang::EbvLocalInvocationId: return spv::BuiltInLocalInvocationId;
|
|
||||||
case glslang::EbvLocalInvocationIndex: return spv::BuiltInLocalInvocationIndex;
|
|
||||||
case glslang::EbvGlobalInvocationId: return spv::BuiltInGlobalInvocationId;
|
|
||||||
|
|
||||||
case glslang::EbvSubGroupSize:
|
case glslang::EbvSubGroupSize:
|
||||||
builder.addExtension(spv::E_SPV_KHR_shader_ballot);
|
builder.addExtension(spv::E_SPV_KHR_shader_ballot);
|
||||||
|
|
@ -874,12 +868,12 @@ spv::BuiltIn TGlslangToSpvTraverser::TranslateBuiltInDecoration(glslang::TBuiltI
|
||||||
return spv::BuiltInBaryCoordPullModelAMD;
|
return spv::BuiltInBaryCoordPullModelAMD;
|
||||||
|
|
||||||
case glslang::EbvDeviceIndex:
|
case glslang::EbvDeviceIndex:
|
||||||
addPre13Extension(spv::E_SPV_KHR_device_group);
|
builder.addIncorporatedExtension(spv::E_SPV_KHR_device_group, spv::Spv_1_3);
|
||||||
builder.addCapability(spv::CapabilityDeviceGroup);
|
builder.addCapability(spv::CapabilityDeviceGroup);
|
||||||
return spv::BuiltInDeviceIndex;
|
return spv::BuiltInDeviceIndex;
|
||||||
|
|
||||||
case glslang::EbvViewIndex:
|
case glslang::EbvViewIndex:
|
||||||
addPre13Extension(spv::E_SPV_KHR_multiview);
|
builder.addIncorporatedExtension(spv::E_SPV_KHR_multiview, spv::Spv_1_3);
|
||||||
builder.addCapability(spv::CapabilityMultiView);
|
builder.addCapability(spv::CapabilityMultiView);
|
||||||
return spv::BuiltInViewIndex;
|
return spv::BuiltInViewIndex;
|
||||||
|
|
||||||
|
|
@ -1192,7 +1186,7 @@ spv::StorageClass TGlslangToSpvTraverser::TranslateStorageClass(const glslang::T
|
||||||
}
|
}
|
||||||
|
|
||||||
if (glslangIntermediate->usingStorageBuffer() && type.getQualifier().storage == glslang::EvqBuffer) {
|
if (glslangIntermediate->usingStorageBuffer() && type.getQualifier().storage == glslang::EvqBuffer) {
|
||||||
addPre13Extension(spv::E_SPV_KHR_storage_buffer_storage_class);
|
builder.addIncorporatedExtension(spv::E_SPV_KHR_storage_buffer_storage_class, spv::Spv_1_3);
|
||||||
return spv::StorageClassStorageBuffer;
|
return spv::StorageClassStorageBuffer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1208,8 +1202,8 @@ spv::StorageClass TGlslangToSpvTraverser::TranslateStorageClass(const glslang::T
|
||||||
case glslang::EvqGlobal: return spv::StorageClassPrivate;
|
case glslang::EvqGlobal: return spv::StorageClassPrivate;
|
||||||
case glslang::EvqConstReadOnly: return spv::StorageClassFunction;
|
case glslang::EvqConstReadOnly: return spv::StorageClassFunction;
|
||||||
case glslang::EvqTemporary: return spv::StorageClassFunction;
|
case glslang::EvqTemporary: return spv::StorageClassFunction;
|
||||||
#ifndef GLSLANG_WEB
|
|
||||||
case glslang::EvqShared: return spv::StorageClassWorkgroup;
|
case glslang::EvqShared: return spv::StorageClassWorkgroup;
|
||||||
|
#ifndef GLSLANG_WEB
|
||||||
case glslang::EvqPayloadNV: return spv::StorageClassRayPayloadNV;
|
case glslang::EvqPayloadNV: return spv::StorageClassRayPayloadNV;
|
||||||
case glslang::EvqPayloadInNV: return spv::StorageClassIncomingRayPayloadNV;
|
case glslang::EvqPayloadInNV: return spv::StorageClassIncomingRayPayloadNV;
|
||||||
case glslang::EvqHitAttrNV: return spv::StorageClassHitAttributeNV;
|
case glslang::EvqHitAttrNV: return spv::StorageClassHitAttributeNV;
|
||||||
|
|
@ -1253,13 +1247,13 @@ void TGlslangToSpvTraverser::addIndirectionIndexCapabilities(const glslang::TTyp
|
||||||
// assume a dynamically uniform index
|
// assume a dynamically uniform index
|
||||||
if (baseType.getBasicType() == glslang::EbtSampler) {
|
if (baseType.getBasicType() == glslang::EbtSampler) {
|
||||||
if (baseType.getQualifier().hasAttachment()) {
|
if (baseType.getQualifier().hasAttachment()) {
|
||||||
builder.addExtension("SPV_EXT_descriptor_indexing");
|
builder.addIncorporatedExtension("SPV_EXT_descriptor_indexing", spv::Spv_1_5);
|
||||||
builder.addCapability(spv::CapabilityInputAttachmentArrayDynamicIndexingEXT);
|
builder.addCapability(spv::CapabilityInputAttachmentArrayDynamicIndexingEXT);
|
||||||
} else if (baseType.isImage() && baseType.getSampler().isBuffer()) {
|
} else if (baseType.isImage() && baseType.getSampler().isBuffer()) {
|
||||||
builder.addExtension("SPV_EXT_descriptor_indexing");
|
builder.addIncorporatedExtension("SPV_EXT_descriptor_indexing", spv::Spv_1_5);
|
||||||
builder.addCapability(spv::CapabilityStorageTexelBufferArrayDynamicIndexingEXT);
|
builder.addCapability(spv::CapabilityStorageTexelBufferArrayDynamicIndexingEXT);
|
||||||
} else if (baseType.isTexture() && baseType.getSampler().isBuffer()) {
|
} else if (baseType.isTexture() && baseType.getSampler().isBuffer()) {
|
||||||
builder.addExtension("SPV_EXT_descriptor_indexing");
|
builder.addIncorporatedExtension("SPV_EXT_descriptor_indexing", spv::Spv_1_5);
|
||||||
builder.addCapability(spv::CapabilityUniformTexelBufferArrayDynamicIndexingEXT);
|
builder.addCapability(spv::CapabilityUniformTexelBufferArrayDynamicIndexingEXT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1404,13 +1398,13 @@ TGlslangToSpvTraverser::TGlslangToSpvTraverser(unsigned int spvVersion, const gl
|
||||||
|
|
||||||
if (glslangIntermediate->usingPhysicalStorageBuffer()) {
|
if (glslangIntermediate->usingPhysicalStorageBuffer()) {
|
||||||
addressingModel = spv::AddressingModelPhysicalStorageBuffer64EXT;
|
addressingModel = spv::AddressingModelPhysicalStorageBuffer64EXT;
|
||||||
builder.addExtension(spv::E_SPV_EXT_physical_storage_buffer);
|
builder.addIncorporatedExtension(spv::E_SPV_EXT_physical_storage_buffer, spv::Spv_1_5);
|
||||||
builder.addCapability(spv::CapabilityPhysicalStorageBufferAddressesEXT);
|
builder.addCapability(spv::CapabilityPhysicalStorageBufferAddressesEXT);
|
||||||
};
|
};
|
||||||
if (glslangIntermediate->usingVulkanMemoryModel()) {
|
if (glslangIntermediate->usingVulkanMemoryModel()) {
|
||||||
memoryModel = spv::MemoryModelVulkanKHR;
|
memoryModel = spv::MemoryModelVulkanKHR;
|
||||||
builder.addCapability(spv::CapabilityVulkanMemoryModelKHR);
|
builder.addCapability(spv::CapabilityVulkanMemoryModelKHR);
|
||||||
builder.addExtension(spv::E_SPV_KHR_vulkan_memory_model);
|
builder.addIncorporatedExtension(spv::E_SPV_KHR_vulkan_memory_model, spv::Spv_1_5);
|
||||||
}
|
}
|
||||||
builder.setMemoryModel(addressingModel, memoryModel);
|
builder.setMemoryModel(addressingModel, memoryModel);
|
||||||
|
|
||||||
|
|
@ -1470,13 +1464,20 @@ TGlslangToSpvTraverser::TGlslangToSpvTraverser(unsigned int spvVersion, const gl
|
||||||
if (mode != spv::ExecutionModeMax)
|
if (mode != spv::ExecutionModeMax)
|
||||||
builder.addExecutionMode(shaderEntry, (spv::ExecutionMode)mode);
|
builder.addExecutionMode(shaderEntry, (spv::ExecutionMode)mode);
|
||||||
switch (glslangIntermediate->getInterlockOrdering()) {
|
switch (glslangIntermediate->getInterlockOrdering()) {
|
||||||
case glslang::EioPixelInterlockOrdered: mode = spv::ExecutionModePixelInterlockOrderedEXT; break;
|
case glslang::EioPixelInterlockOrdered: mode = spv::ExecutionModePixelInterlockOrderedEXT;
|
||||||
case glslang::EioPixelInterlockUnordered: mode = spv::ExecutionModePixelInterlockUnorderedEXT; break;
|
break;
|
||||||
case glslang::EioSampleInterlockOrdered: mode = spv::ExecutionModeSampleInterlockOrderedEXT; break;
|
case glslang::EioPixelInterlockUnordered: mode = spv::ExecutionModePixelInterlockUnorderedEXT;
|
||||||
case glslang::EioSampleInterlockUnordered: mode = spv::ExecutionModeSampleInterlockUnorderedEXT; break;
|
break;
|
||||||
case glslang::EioShadingRateInterlockOrdered: mode = spv::ExecutionModeShadingRateInterlockOrderedEXT; break;
|
case glslang::EioSampleInterlockOrdered: mode = spv::ExecutionModeSampleInterlockOrderedEXT;
|
||||||
case glslang::EioShadingRateInterlockUnordered: mode = spv::ExecutionModeShadingRateInterlockUnorderedEXT; break;
|
break;
|
||||||
default: mode = spv::ExecutionModeMax; break;
|
case glslang::EioSampleInterlockUnordered: mode = spv::ExecutionModeSampleInterlockUnorderedEXT;
|
||||||
|
break;
|
||||||
|
case glslang::EioShadingRateInterlockOrdered: mode = spv::ExecutionModeShadingRateInterlockOrderedEXT;
|
||||||
|
break;
|
||||||
|
case glslang::EioShadingRateInterlockUnordered: mode = spv::ExecutionModeShadingRateInterlockUnorderedEXT;
|
||||||
|
break;
|
||||||
|
default: mode = spv::ExecutionModeMax;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
if (mode != spv::ExecutionModeMax) {
|
if (mode != spv::ExecutionModeMax) {
|
||||||
builder.addExecutionMode(shaderEntry, (spv::ExecutionMode)mode);
|
builder.addExecutionMode(shaderEntry, (spv::ExecutionMode)mode);
|
||||||
|
|
@ -1494,7 +1495,6 @@ TGlslangToSpvTraverser::TGlslangToSpvTraverser(unsigned int spvVersion, const gl
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
|
|
||||||
#ifndef GLSLANG_WEB
|
|
||||||
case EShLangCompute:
|
case EShLangCompute:
|
||||||
builder.addCapability(spv::CapabilityShader);
|
builder.addCapability(spv::CapabilityShader);
|
||||||
builder.addExecutionMode(shaderEntry, spv::ExecutionModeLocalSize, glslangIntermediate->getLocalSize(0),
|
builder.addExecutionMode(shaderEntry, spv::ExecutionModeLocalSize, glslangIntermediate->getLocalSize(0),
|
||||||
|
|
@ -1510,6 +1510,7 @@ TGlslangToSpvTraverser::TGlslangToSpvTraverser(unsigned int spvVersion, const gl
|
||||||
builder.addExtension(spv::E_SPV_NV_compute_shader_derivatives);
|
builder.addExtension(spv::E_SPV_NV_compute_shader_derivatives);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
#ifndef GLSLANG_WEB
|
||||||
case EShLangTessEvaluation:
|
case EShLangTessEvaluation:
|
||||||
case EShLangTessControl:
|
case EShLangTessControl:
|
||||||
builder.addCapability(spv::CapabilityTessellation);
|
builder.addCapability(spv::CapabilityTessellation);
|
||||||
|
|
@ -1629,11 +1630,11 @@ void TGlslangToSpvTraverser::finishSpv()
|
||||||
for (auto it = iOSet.cbegin(); it != iOSet.cend(); ++it)
|
for (auto it = iOSet.cbegin(); it != iOSet.cend(); ++it)
|
||||||
entryPoint->addIdOperand(*it);
|
entryPoint->addIdOperand(*it);
|
||||||
|
|
||||||
#ifndef GLSLANG_WEB
|
// Add capabilities, extensions, remove unneeded decorations, etc.,
|
||||||
// Add capabilities, extensions, remove unneeded decorations, etc.,
|
|
||||||
// based on the resulting SPIR-V.
|
// based on the resulting SPIR-V.
|
||||||
|
// Note: WebGPU code generation must have the opportunity to aggressively
|
||||||
|
// prune unreachable merge blocks and continue targets.
|
||||||
builder.postProcess();
|
builder.postProcess();
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Write the SPV into 'out'.
|
// Write the SPV into 'out'.
|
||||||
|
|
@ -2551,7 +2552,6 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
|
||||||
binOp = glslang::EOpMod;
|
binOp = glslang::EOpMod;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
#ifndef GLSLANG_WEB
|
|
||||||
case glslang::EOpEmitVertex:
|
case glslang::EOpEmitVertex:
|
||||||
case glslang::EOpEndPrimitive:
|
case glslang::EOpEndPrimitive:
|
||||||
case glslang::EOpBarrier:
|
case glslang::EOpBarrier:
|
||||||
|
|
@ -2575,10 +2575,6 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
|
||||||
// These all have 0 operands and will naturally finish up in the code below for 0 operands
|
// These all have 0 operands and will naturally finish up in the code below for 0 operands
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case glslang::EOpAtomicStore:
|
|
||||||
noReturnValue = true;
|
|
||||||
// fallthrough
|
|
||||||
case glslang::EOpAtomicLoad:
|
|
||||||
case glslang::EOpAtomicAdd:
|
case glslang::EOpAtomicAdd:
|
||||||
case glslang::EOpAtomicMin:
|
case glslang::EOpAtomicMin:
|
||||||
case glslang::EOpAtomicMax:
|
case glslang::EOpAtomicMax:
|
||||||
|
|
@ -2590,6 +2586,14 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
|
||||||
atomic = true;
|
atomic = true;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
#ifndef GLSLANG_WEB
|
||||||
|
case glslang::EOpAtomicStore:
|
||||||
|
noReturnValue = true;
|
||||||
|
// fallthrough
|
||||||
|
case glslang::EOpAtomicLoad:
|
||||||
|
atomic = true;
|
||||||
|
break;
|
||||||
|
|
||||||
case glslang::EOpAtomicCounterAdd:
|
case glslang::EOpAtomicCounterAdd:
|
||||||
case glslang::EOpAtomicCounterSubtract:
|
case glslang::EOpAtomicCounterSubtract:
|
||||||
case glslang::EOpAtomicCounterMin:
|
case glslang::EOpAtomicCounterMin:
|
||||||
|
|
@ -2604,6 +2608,17 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
|
||||||
atomic = true;
|
atomic = true;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case glslang::EOpAbsDifference:
|
||||||
|
case glslang::EOpAddSaturate:
|
||||||
|
case glslang::EOpSubSaturate:
|
||||||
|
case glslang::EOpAverage:
|
||||||
|
case glslang::EOpAverageRounded:
|
||||||
|
case glslang::EOpMul32x16:
|
||||||
|
builder.addCapability(spv::CapabilityIntegerFunctions2INTEL);
|
||||||
|
builder.addExtension("SPV_INTEL_shader_integer_functions2");
|
||||||
|
binOp = node->getOp();
|
||||||
|
break;
|
||||||
|
|
||||||
case glslang::EOpIgnoreIntersectionNV:
|
case glslang::EOpIgnoreIntersectionNV:
|
||||||
case glslang::EOpTerminateRayNV:
|
case glslang::EOpTerminateRayNV:
|
||||||
case glslang::EOpTraceNV:
|
case glslang::EOpTraceNV:
|
||||||
|
|
@ -2672,6 +2687,19 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
|
||||||
if (arg == 1)
|
if (arg == 1)
|
||||||
lvalue = true;
|
lvalue = true;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case glslang::EOpAtomicAdd:
|
||||||
|
case glslang::EOpAtomicMin:
|
||||||
|
case glslang::EOpAtomicMax:
|
||||||
|
case glslang::EOpAtomicAnd:
|
||||||
|
case glslang::EOpAtomicOr:
|
||||||
|
case glslang::EOpAtomicXor:
|
||||||
|
case glslang::EOpAtomicExchange:
|
||||||
|
case glslang::EOpAtomicCompSwap:
|
||||||
|
if (arg == 0)
|
||||||
|
lvalue = true;
|
||||||
|
break;
|
||||||
|
|
||||||
#ifndef GLSLANG_WEB
|
#ifndef GLSLANG_WEB
|
||||||
case glslang::EOpFrexp:
|
case glslang::EOpFrexp:
|
||||||
if (arg == 1)
|
if (arg == 1)
|
||||||
|
|
@ -2690,14 +2718,6 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
|
||||||
invertedType = convertGlslangToSpvType(glslangOperands[0]->getAsBinaryNode()->getLeft()->getType());
|
invertedType = convertGlslangToSpvType(glslangOperands[0]->getAsBinaryNode()->getLeft()->getType());
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case glslang::EOpAtomicAdd:
|
|
||||||
case glslang::EOpAtomicMin:
|
|
||||||
case glslang::EOpAtomicMax:
|
|
||||||
case glslang::EOpAtomicAnd:
|
|
||||||
case glslang::EOpAtomicOr:
|
|
||||||
case glslang::EOpAtomicXor:
|
|
||||||
case glslang::EOpAtomicExchange:
|
|
||||||
case glslang::EOpAtomicCompSwap:
|
|
||||||
case glslang::EOpAtomicLoad:
|
case glslang::EOpAtomicLoad:
|
||||||
case glslang::EOpAtomicStore:
|
case glslang::EOpAtomicStore:
|
||||||
case glslang::EOpAtomicCounterAdd:
|
case glslang::EOpAtomicCounterAdd:
|
||||||
|
|
@ -2823,12 +2843,12 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
|
||||||
|
|
||||||
builder.createNoResultOp(spv::OpCooperativeMatrixStoreNV, idImmOps);
|
builder.createNoResultOp(spv::OpCooperativeMatrixStoreNV, idImmOps);
|
||||||
result = 0;
|
result = 0;
|
||||||
} else if (atomic) {
|
|
||||||
// Handle all atomics
|
|
||||||
result = createAtomicOperation(node->getOp(), precision, resultType(), operands, node->getBasicType(), lvalueCoherentFlags);
|
|
||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
{
|
if (atomic) {
|
||||||
|
// Handle all atomics
|
||||||
|
result = createAtomicOperation(node->getOp(), precision, resultType(), operands, node->getBasicType(), lvalueCoherentFlags);
|
||||||
|
} else {
|
||||||
// Pass through to generic operations.
|
// Pass through to generic operations.
|
||||||
switch (glslangOperands.size()) {
|
switch (glslangOperands.size()) {
|
||||||
case 0:
|
case 0:
|
||||||
|
|
@ -3242,11 +3262,11 @@ spv::Id TGlslangToSpvTraverser::createSpvVariable(const glslang::TIntermSymbol*
|
||||||
switch (storageClass) {
|
switch (storageClass) {
|
||||||
case spv::StorageClassInput:
|
case spv::StorageClassInput:
|
||||||
case spv::StorageClassOutput:
|
case spv::StorageClassOutput:
|
||||||
addPre13Extension(spv::E_SPV_KHR_16bit_storage);
|
builder.addIncorporatedExtension(spv::E_SPV_KHR_16bit_storage, spv::Spv_1_3);
|
||||||
builder.addCapability(spv::CapabilityStorageInputOutput16);
|
builder.addCapability(spv::CapabilityStorageInputOutput16);
|
||||||
break;
|
break;
|
||||||
case spv::StorageClassUniform:
|
case spv::StorageClassUniform:
|
||||||
addPre13Extension(spv::E_SPV_KHR_16bit_storage);
|
builder.addIncorporatedExtension(spv::E_SPV_KHR_16bit_storage, spv::Spv_1_3);
|
||||||
if (node->getType().getQualifier().storage == glslang::EvqBuffer)
|
if (node->getType().getQualifier().storage == glslang::EvqBuffer)
|
||||||
builder.addCapability(spv::CapabilityStorageUniformBufferBlock16);
|
builder.addCapability(spv::CapabilityStorageUniformBufferBlock16);
|
||||||
else
|
else
|
||||||
|
|
@ -3254,12 +3274,12 @@ spv::Id TGlslangToSpvTraverser::createSpvVariable(const glslang::TIntermSymbol*
|
||||||
break;
|
break;
|
||||||
#ifndef GLSLANG_WEB
|
#ifndef GLSLANG_WEB
|
||||||
case spv::StorageClassPushConstant:
|
case spv::StorageClassPushConstant:
|
||||||
addPre13Extension(spv::E_SPV_KHR_16bit_storage);
|
builder.addIncorporatedExtension(spv::E_SPV_KHR_16bit_storage, spv::Spv_1_3);
|
||||||
builder.addCapability(spv::CapabilityStoragePushConstant16);
|
builder.addCapability(spv::CapabilityStoragePushConstant16);
|
||||||
break;
|
break;
|
||||||
case spv::StorageClassStorageBuffer:
|
case spv::StorageClassStorageBuffer:
|
||||||
case spv::StorageClassPhysicalStorageBufferEXT:
|
case spv::StorageClassPhysicalStorageBufferEXT:
|
||||||
addPre13Extension(spv::E_SPV_KHR_16bit_storage);
|
builder.addIncorporatedExtension(spv::E_SPV_KHR_16bit_storage, spv::Spv_1_3);
|
||||||
builder.addCapability(spv::CapabilityStorageUniformBufferBlock16);
|
builder.addCapability(spv::CapabilityStorageUniformBufferBlock16);
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -3274,13 +3294,13 @@ spv::Id TGlslangToSpvTraverser::createSpvVariable(const glslang::TIntermSymbol*
|
||||||
|
|
||||||
if (node->getType().contains8BitInt()) {
|
if (node->getType().contains8BitInt()) {
|
||||||
if (storageClass == spv::StorageClassPushConstant) {
|
if (storageClass == spv::StorageClassPushConstant) {
|
||||||
builder.addExtension(spv::E_SPV_KHR_8bit_storage);
|
builder.addIncorporatedExtension(spv::E_SPV_KHR_8bit_storage, spv::Spv_1_5);
|
||||||
builder.addCapability(spv::CapabilityStoragePushConstant8);
|
builder.addCapability(spv::CapabilityStoragePushConstant8);
|
||||||
} else if (storageClass == spv::StorageClassUniform) {
|
} else if (storageClass == spv::StorageClassUniform) {
|
||||||
builder.addExtension(spv::E_SPV_KHR_8bit_storage);
|
builder.addIncorporatedExtension(spv::E_SPV_KHR_8bit_storage, spv::Spv_1_5);
|
||||||
builder.addCapability(spv::CapabilityUniformAndStorageBuffer8BitAccess);
|
builder.addCapability(spv::CapabilityUniformAndStorageBuffer8BitAccess);
|
||||||
} else if (storageClass == spv::StorageClassStorageBuffer) {
|
} else if (storageClass == spv::StorageClassStorageBuffer) {
|
||||||
builder.addExtension(spv::E_SPV_KHR_8bit_storage);
|
builder.addIncorporatedExtension(spv::E_SPV_KHR_8bit_storage, spv::Spv_1_5);
|
||||||
builder.addCapability(spv::CapabilityStorageBuffer8BitAccess);
|
builder.addCapability(spv::CapabilityStorageBuffer8BitAccess);
|
||||||
} else {
|
} else {
|
||||||
builder.addCapability(spv::CapabilityInt8);
|
builder.addCapability(spv::CapabilityInt8);
|
||||||
|
|
@ -3537,11 +3557,11 @@ spv::Id TGlslangToSpvTraverser::convertGlslangToSpvType(const glslang::TType& ty
|
||||||
else {
|
else {
|
||||||
#ifndef GLSLANG_WEB
|
#ifndef GLSLANG_WEB
|
||||||
if (!lastBufferBlockMember) {
|
if (!lastBufferBlockMember) {
|
||||||
builder.addExtension("SPV_EXT_descriptor_indexing");
|
builder.addIncorporatedExtension("SPV_EXT_descriptor_indexing", spv::Spv_1_5);
|
||||||
builder.addCapability(spv::CapabilityRuntimeDescriptorArrayEXT);
|
builder.addCapability(spv::CapabilityRuntimeDescriptorArrayEXT);
|
||||||
}
|
}
|
||||||
spvType = builder.makeRuntimeArray(spvType);
|
|
||||||
#endif
|
#endif
|
||||||
|
spvType = builder.makeRuntimeArray(spvType);
|
||||||
}
|
}
|
||||||
if (stride > 0)
|
if (stride > 0)
|
||||||
builder.addDecoration(spvType, spv::DecorationArrayStride, stride);
|
builder.addDecoration(spvType, spv::DecorationArrayStride, stride);
|
||||||
|
|
@ -3706,6 +3726,7 @@ void TGlslangToSpvTraverser::decorateStructType(const glslang::TType& type,
|
||||||
for (unsigned int i = 0; i < memory.size(); ++i)
|
for (unsigned int i = 0; i < memory.size(); ++i)
|
||||||
builder.addMemberDecoration(spvType, member, memory[i]);
|
builder.addMemberDecoration(spvType, member, memory[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Location assignment was already completed correctly by the front end,
|
// Location assignment was already completed correctly by the front end,
|
||||||
|
|
@ -4164,9 +4185,11 @@ void TGlslangToSpvTraverser::makeFunctions(const glslang::TIntermSequence& glslF
|
||||||
// memory and use RestrictPointer/AliasedPointer.
|
// memory and use RestrictPointer/AliasedPointer.
|
||||||
if (originalParam(type.getQualifier().storage, type, false) ||
|
if (originalParam(type.getQualifier().storage, type, false) ||
|
||||||
!writableParam(type.getQualifier().storage)) {
|
!writableParam(type.getQualifier().storage)) {
|
||||||
decorations.push_back(type.getQualifier().restrict ? spv::DecorationRestrict : spv::DecorationAliased);
|
decorations.push_back(type.getQualifier().isRestrict() ? spv::DecorationRestrict :
|
||||||
|
spv::DecorationAliased);
|
||||||
} else {
|
} else {
|
||||||
decorations.push_back(type.getQualifier().restrict ? spv::DecorationRestrictPointerEXT : spv::DecorationAliasedPointerEXT);
|
decorations.push_back(type.getQualifier().isRestrict() ? spv::DecorationRestrictPointerEXT :
|
||||||
|
spv::DecorationAliasedPointerEXT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
@ -4974,6 +4997,7 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef GLSLANG_WEB
|
||||||
// nonprivate
|
// nonprivate
|
||||||
if (imageType.getQualifier().nonprivate) {
|
if (imageType.getQualifier().nonprivate) {
|
||||||
params.nonprivate = true;
|
params.nonprivate = true;
|
||||||
|
|
@ -4983,6 +5007,7 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO
|
||||||
if (imageType.getQualifier().volatil) {
|
if (imageType.getQualifier().volatil) {
|
||||||
params.volatil = true;
|
params.volatil = true;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
std::vector<spv::Id> result( 1,
|
std::vector<spv::Id> result( 1,
|
||||||
builder.createTextureCall(precision, resultType(), sparse, cracked.fetch, cracked.proj, cracked.gather,
|
builder.createTextureCall(precision, resultType(), sparse, cracked.fetch, cracked.proj, cracked.gather,
|
||||||
|
|
@ -5217,6 +5242,30 @@ spv::Id TGlslangToSpvTraverser::createBinaryOperation(glslang::TOperator op, OpD
|
||||||
binOp = spv::OpLogicalNotEqual;
|
binOp = spv::OpLogicalNotEqual;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case glslang::EOpAbsDifference:
|
||||||
|
binOp = isUnsigned ? spv::OpAbsUSubINTEL : spv::OpAbsISubINTEL;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case glslang::EOpAddSaturate:
|
||||||
|
binOp = isUnsigned ? spv::OpUAddSatINTEL : spv::OpIAddSatINTEL;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case glslang::EOpSubSaturate:
|
||||||
|
binOp = isUnsigned ? spv::OpUSubSatINTEL : spv::OpISubSatINTEL;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case glslang::EOpAverage:
|
||||||
|
binOp = isUnsigned ? spv::OpUAverageINTEL : spv::OpIAverageINTEL;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case glslang::EOpAverageRounded:
|
||||||
|
binOp = isUnsigned ? spv::OpUAverageRoundedINTEL : spv::OpIAverageRoundedINTEL;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case glslang::EOpMul32x16:
|
||||||
|
binOp = isUnsigned ? spv::OpUMul32x16INTEL : spv::OpIMul32x16INTEL;
|
||||||
|
break;
|
||||||
|
|
||||||
case glslang::EOpLessThan:
|
case glslang::EOpLessThan:
|
||||||
case glslang::EOpGreaterThan:
|
case glslang::EOpGreaterThan:
|
||||||
case glslang::EOpLessThanEqual:
|
case glslang::EOpLessThanEqual:
|
||||||
|
|
@ -5731,6 +5780,18 @@ spv::Id TGlslangToSpvTraverser::createUnaryOperation(glslang::TOperator op, OpDe
|
||||||
libCall = spv::GLSLstd450FindSMsb;
|
libCall = spv::GLSLstd450FindSMsb;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case glslang::EOpCountLeadingZeros:
|
||||||
|
builder.addCapability(spv::CapabilityIntegerFunctions2INTEL);
|
||||||
|
builder.addExtension("SPV_INTEL_shader_integer_functions2");
|
||||||
|
unaryOp = spv::OpUCountLeadingZerosINTEL;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case glslang::EOpCountTrailingZeros:
|
||||||
|
builder.addCapability(spv::CapabilityIntegerFunctions2INTEL);
|
||||||
|
builder.addExtension("SPV_INTEL_shader_integer_functions2");
|
||||||
|
unaryOp = spv::OpUCountTrailingZerosINTEL;
|
||||||
|
break;
|
||||||
|
|
||||||
case glslang::EOpBallot:
|
case glslang::EOpBallot:
|
||||||
case glslang::EOpReadFirstInvocation:
|
case glslang::EOpReadFirstInvocation:
|
||||||
case glslang::EOpAnyInvocation:
|
case glslang::EOpAnyInvocation:
|
||||||
|
|
@ -6278,6 +6339,13 @@ spv::Id TGlslangToSpvTraverser::createConversion(glslang::TOperator op, OpDecora
|
||||||
case glslang::EOpConvPtrToUint64:
|
case glslang::EOpConvPtrToUint64:
|
||||||
convOp = spv::OpConvertPtrToU;
|
convOp = spv::OpConvertPtrToU;
|
||||||
break;
|
break;
|
||||||
|
case glslang::EOpConvPtrToUvec2:
|
||||||
|
case glslang::EOpConvUvec2ToPtr:
|
||||||
|
if (builder.isVector(operand))
|
||||||
|
builder.promoteIncorporatedExtension(spv::E_SPV_EXT_physical_storage_buffer,
|
||||||
|
spv::E_SPV_KHR_physical_storage_buffer, spv::Spv_1_5);
|
||||||
|
convOp = spv::OpBitcast;
|
||||||
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
@ -6399,7 +6467,7 @@ spv::Id TGlslangToSpvTraverser::createAtomicOperation(glslang::TOperator op, spv
|
||||||
scopeId = builder.makeUintConstant(spv::ScopeDevice);
|
scopeId = builder.makeUintConstant(spv::ScopeDevice);
|
||||||
}
|
}
|
||||||
// semantics default to relaxed
|
// semantics default to relaxed
|
||||||
spv::Id semanticsId = builder.makeUintConstant(lvalueCoherentFlags.isVolatile() ?
|
spv::Id semanticsId = builder.makeUintConstant(lvalueCoherentFlags.isVolatile() && glslangIntermediate->usingVulkanMemoryModel() ?
|
||||||
spv::MemorySemanticsVolatileMask :
|
spv::MemorySemanticsVolatileMask :
|
||||||
spv::MemorySemanticsMaskNone);
|
spv::MemorySemanticsMaskNone);
|
||||||
spv::Id semanticsId2 = semanticsId;
|
spv::Id semanticsId2 = semanticsId;
|
||||||
|
|
@ -6837,8 +6905,9 @@ spv::Id TGlslangToSpvTraverser::createSubgroupOperation(glslang::TOperator op, s
|
||||||
default: assert(0 && "Unhandled subgroup operation!");
|
default: assert(0 && "Unhandled subgroup operation!");
|
||||||
}
|
}
|
||||||
|
|
||||||
const bool isUnsigned = typeProxy == glslang::EbtUint || typeProxy == glslang::EbtUint64;
|
|
||||||
const bool isFloat = typeProxy == glslang::EbtFloat || typeProxy == glslang::EbtDouble;
|
const bool isUnsigned = isTypeUnsignedInt(typeProxy);
|
||||||
|
const bool isFloat = isTypeFloat(typeProxy);
|
||||||
const bool isBool = typeProxy == glslang::EbtBool;
|
const bool isBool = typeProxy == glslang::EbtBool;
|
||||||
|
|
||||||
spv::Op opCode = spv::OpNop;
|
spv::Op opCode = spv::OpNop;
|
||||||
|
|
@ -7167,6 +7236,48 @@ spv::Id TGlslangToSpvTraverser::createMiscOperation(glslang::TOperator op, spv::
|
||||||
case glslang::EOpRefract:
|
case glslang::EOpRefract:
|
||||||
libCall = spv::GLSLstd450Refract;
|
libCall = spv::GLSLstd450Refract;
|
||||||
break;
|
break;
|
||||||
|
case glslang::EOpBarrier:
|
||||||
|
{
|
||||||
|
// This is for the extended controlBarrier function, with four operands.
|
||||||
|
// The unextended barrier() goes through createNoArgOperation.
|
||||||
|
assert(operands.size() == 4);
|
||||||
|
unsigned int executionScope = builder.getConstantScalar(operands[0]);
|
||||||
|
unsigned int memoryScope = builder.getConstantScalar(operands[1]);
|
||||||
|
unsigned int semantics = builder.getConstantScalar(operands[2]) | builder.getConstantScalar(operands[3]);
|
||||||
|
builder.createControlBarrier((spv::Scope)executionScope, (spv::Scope)memoryScope, (spv::MemorySemanticsMask)semantics);
|
||||||
|
if (semantics & (spv::MemorySemanticsMakeAvailableKHRMask |
|
||||||
|
spv::MemorySemanticsMakeVisibleKHRMask |
|
||||||
|
spv::MemorySemanticsOutputMemoryKHRMask |
|
||||||
|
spv::MemorySemanticsVolatileMask)) {
|
||||||
|
builder.addCapability(spv::CapabilityVulkanMemoryModelKHR);
|
||||||
|
}
|
||||||
|
if (glslangIntermediate->usingVulkanMemoryModel() && (executionScope == spv::ScopeDevice || memoryScope == spv::ScopeDevice)) {
|
||||||
|
builder.addCapability(spv::CapabilityVulkanMemoryModelDeviceScopeKHR);
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case glslang::EOpMemoryBarrier:
|
||||||
|
{
|
||||||
|
// This is for the extended memoryBarrier function, with three operands.
|
||||||
|
// The unextended memoryBarrier() goes through createNoArgOperation.
|
||||||
|
assert(operands.size() == 3);
|
||||||
|
unsigned int memoryScope = builder.getConstantScalar(operands[0]);
|
||||||
|
unsigned int semantics = builder.getConstantScalar(operands[1]) | builder.getConstantScalar(operands[2]);
|
||||||
|
builder.createMemoryBarrier((spv::Scope)memoryScope, (spv::MemorySemanticsMask)semantics);
|
||||||
|
if (semantics & (spv::MemorySemanticsMakeAvailableKHRMask |
|
||||||
|
spv::MemorySemanticsMakeVisibleKHRMask |
|
||||||
|
spv::MemorySemanticsOutputMemoryKHRMask |
|
||||||
|
spv::MemorySemanticsVolatileMask)) {
|
||||||
|
builder.addCapability(spv::CapabilityVulkanMemoryModelKHR);
|
||||||
|
}
|
||||||
|
if (glslangIntermediate->usingVulkanMemoryModel() && memoryScope == spv::ScopeDevice) {
|
||||||
|
builder.addCapability(spv::CapabilityVulkanMemoryModelDeviceScopeKHR);
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
#ifndef GLSLANG_WEB
|
#ifndef GLSLANG_WEB
|
||||||
case glslang::EOpInterpolateAtSample:
|
case glslang::EOpInterpolateAtSample:
|
||||||
if (typeProxy == glslang::EbtFloat16)
|
if (typeProxy == glslang::EbtFloat16)
|
||||||
|
|
@ -7325,47 +7436,6 @@ spv::Id TGlslangToSpvTraverser::createMiscOperation(glslang::TOperator op, spv::
|
||||||
extBuiltins = getExtBuiltins(spv::E_SPV_AMD_shader_explicit_vertex_parameter);
|
extBuiltins = getExtBuiltins(spv::E_SPV_AMD_shader_explicit_vertex_parameter);
|
||||||
libCall = spv::InterpolateAtVertexAMD;
|
libCall = spv::InterpolateAtVertexAMD;
|
||||||
break;
|
break;
|
||||||
case glslang::EOpBarrier:
|
|
||||||
{
|
|
||||||
// This is for the extended controlBarrier function, with four operands.
|
|
||||||
// The unextended barrier() goes through createNoArgOperation.
|
|
||||||
assert(operands.size() == 4);
|
|
||||||
unsigned int executionScope = builder.getConstantScalar(operands[0]);
|
|
||||||
unsigned int memoryScope = builder.getConstantScalar(operands[1]);
|
|
||||||
unsigned int semantics = builder.getConstantScalar(operands[2]) | builder.getConstantScalar(operands[3]);
|
|
||||||
builder.createControlBarrier((spv::Scope)executionScope, (spv::Scope)memoryScope, (spv::MemorySemanticsMask)semantics);
|
|
||||||
if (semantics & (spv::MemorySemanticsMakeAvailableKHRMask |
|
|
||||||
spv::MemorySemanticsMakeVisibleKHRMask |
|
|
||||||
spv::MemorySemanticsOutputMemoryKHRMask |
|
|
||||||
spv::MemorySemanticsVolatileMask)) {
|
|
||||||
builder.addCapability(spv::CapabilityVulkanMemoryModelKHR);
|
|
||||||
}
|
|
||||||
if (glslangIntermediate->usingVulkanMemoryModel() && (executionScope == spv::ScopeDevice || memoryScope == spv::ScopeDevice)) {
|
|
||||||
builder.addCapability(spv::CapabilityVulkanMemoryModelDeviceScopeKHR);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case glslang::EOpMemoryBarrier:
|
|
||||||
{
|
|
||||||
// This is for the extended memoryBarrier function, with three operands.
|
|
||||||
// The unextended memoryBarrier() goes through createNoArgOperation.
|
|
||||||
assert(operands.size() == 3);
|
|
||||||
unsigned int memoryScope = builder.getConstantScalar(operands[0]);
|
|
||||||
unsigned int semantics = builder.getConstantScalar(operands[1]) | builder.getConstantScalar(operands[2]);
|
|
||||||
builder.createMemoryBarrier((spv::Scope)memoryScope, (spv::MemorySemanticsMask)semantics);
|
|
||||||
if (semantics & (spv::MemorySemanticsMakeAvailableKHRMask |
|
|
||||||
spv::MemorySemanticsMakeVisibleKHRMask |
|
|
||||||
spv::MemorySemanticsOutputMemoryKHRMask |
|
|
||||||
spv::MemorySemanticsVolatileMask)) {
|
|
||||||
builder.addCapability(spv::CapabilityVulkanMemoryModelKHR);
|
|
||||||
}
|
|
||||||
if (glslangIntermediate->usingVulkanMemoryModel() && memoryScope == spv::ScopeDevice) {
|
|
||||||
builder.addCapability(spv::CapabilityVulkanMemoryModelDeviceScopeKHR);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case glslang::EOpReportIntersectionNV:
|
case glslang::EOpReportIntersectionNV:
|
||||||
{
|
{
|
||||||
|
|
@ -7473,17 +7543,10 @@ spv::Id TGlslangToSpvTraverser::createMiscOperation(glslang::TOperator op, spv::
|
||||||
// Intrinsics with no arguments (or no return value, and no precision).
|
// Intrinsics with no arguments (or no return value, and no precision).
|
||||||
spv::Id TGlslangToSpvTraverser::createNoArgOperation(glslang::TOperator op, spv::Decoration precision, spv::Id typeId)
|
spv::Id TGlslangToSpvTraverser::createNoArgOperation(glslang::TOperator op, spv::Decoration precision, spv::Id typeId)
|
||||||
{
|
{
|
||||||
#ifndef GLSLANG_WEB
|
|
||||||
// GLSL memory barriers use queuefamily scope in new model, device scope in old model
|
// GLSL memory barriers use queuefamily scope in new model, device scope in old model
|
||||||
spv::Scope memoryBarrierScope = glslangIntermediate->usingVulkanMemoryModel() ? spv::ScopeQueueFamilyKHR : spv::ScopeDevice;
|
spv::Scope memoryBarrierScope = glslangIntermediate->usingVulkanMemoryModel() ? spv::ScopeQueueFamilyKHR : spv::ScopeDevice;
|
||||||
|
|
||||||
switch (op) {
|
switch (op) {
|
||||||
case glslang::EOpEmitVertex:
|
|
||||||
builder.createNoResultOp(spv::OpEmitVertex);
|
|
||||||
return 0;
|
|
||||||
case glslang::EOpEndPrimitive:
|
|
||||||
builder.createNoResultOp(spv::OpEndPrimitive);
|
|
||||||
return 0;
|
|
||||||
case glslang::EOpBarrier:
|
case glslang::EOpBarrier:
|
||||||
if (glslangIntermediate->getStage() == EShLangTessControl) {
|
if (glslangIntermediate->getStage() == EShLangTessControl) {
|
||||||
if (glslangIntermediate->usingVulkanMemoryModel()) {
|
if (glslangIntermediate->usingVulkanMemoryModel()) {
|
||||||
|
|
@ -7504,18 +7567,10 @@ spv::Id TGlslangToSpvTraverser::createNoArgOperation(glslang::TOperator op, spv:
|
||||||
builder.createMemoryBarrier(memoryBarrierScope, spv::MemorySemanticsAllMemory |
|
builder.createMemoryBarrier(memoryBarrierScope, spv::MemorySemanticsAllMemory |
|
||||||
spv::MemorySemanticsAcquireReleaseMask);
|
spv::MemorySemanticsAcquireReleaseMask);
|
||||||
return 0;
|
return 0;
|
||||||
case glslang::EOpMemoryBarrierAtomicCounter:
|
|
||||||
builder.createMemoryBarrier(memoryBarrierScope, spv::MemorySemanticsAtomicCounterMemoryMask |
|
|
||||||
spv::MemorySemanticsAcquireReleaseMask);
|
|
||||||
return 0;
|
|
||||||
case glslang::EOpMemoryBarrierBuffer:
|
case glslang::EOpMemoryBarrierBuffer:
|
||||||
builder.createMemoryBarrier(memoryBarrierScope, spv::MemorySemanticsUniformMemoryMask |
|
builder.createMemoryBarrier(memoryBarrierScope, spv::MemorySemanticsUniformMemoryMask |
|
||||||
spv::MemorySemanticsAcquireReleaseMask);
|
spv::MemorySemanticsAcquireReleaseMask);
|
||||||
return 0;
|
return 0;
|
||||||
case glslang::EOpMemoryBarrierImage:
|
|
||||||
builder.createMemoryBarrier(memoryBarrierScope, spv::MemorySemanticsImageMemoryMask |
|
|
||||||
spv::MemorySemanticsAcquireReleaseMask);
|
|
||||||
return 0;
|
|
||||||
case glslang::EOpMemoryBarrierShared:
|
case glslang::EOpMemoryBarrierShared:
|
||||||
builder.createMemoryBarrier(memoryBarrierScope, spv::MemorySemanticsWorkgroupMemoryMask |
|
builder.createMemoryBarrier(memoryBarrierScope, spv::MemorySemanticsWorkgroupMemoryMask |
|
||||||
spv::MemorySemanticsAcquireReleaseMask);
|
spv::MemorySemanticsAcquireReleaseMask);
|
||||||
|
|
@ -7524,6 +7579,15 @@ spv::Id TGlslangToSpvTraverser::createNoArgOperation(glslang::TOperator op, spv:
|
||||||
builder.createMemoryBarrier(spv::ScopeWorkgroup, spv::MemorySemanticsAllMemory |
|
builder.createMemoryBarrier(spv::ScopeWorkgroup, spv::MemorySemanticsAllMemory |
|
||||||
spv::MemorySemanticsAcquireReleaseMask);
|
spv::MemorySemanticsAcquireReleaseMask);
|
||||||
return 0;
|
return 0;
|
||||||
|
#ifndef GLSLANG_WEB
|
||||||
|
case glslang::EOpMemoryBarrierAtomicCounter:
|
||||||
|
builder.createMemoryBarrier(memoryBarrierScope, spv::MemorySemanticsAtomicCounterMemoryMask |
|
||||||
|
spv::MemorySemanticsAcquireReleaseMask);
|
||||||
|
return 0;
|
||||||
|
case glslang::EOpMemoryBarrierImage:
|
||||||
|
builder.createMemoryBarrier(memoryBarrierScope, spv::MemorySemanticsImageMemoryMask |
|
||||||
|
spv::MemorySemanticsAcquireReleaseMask);
|
||||||
|
return 0;
|
||||||
case glslang::EOpAllMemoryBarrierWithGroupSync:
|
case glslang::EOpAllMemoryBarrierWithGroupSync:
|
||||||
builder.createControlBarrier(spv::ScopeWorkgroup, spv::ScopeDevice,
|
builder.createControlBarrier(spv::ScopeWorkgroup, spv::ScopeDevice,
|
||||||
spv::MemorySemanticsAllMemory |
|
spv::MemorySemanticsAllMemory |
|
||||||
|
|
@ -7568,6 +7632,14 @@ spv::Id TGlslangToSpvTraverser::createNoArgOperation(glslang::TOperator op, spv:
|
||||||
builder.createMemoryBarrier(spv::ScopeSubgroup, spv::MemorySemanticsWorkgroupMemoryMask |
|
builder.createMemoryBarrier(spv::ScopeSubgroup, spv::MemorySemanticsWorkgroupMemoryMask |
|
||||||
spv::MemorySemanticsAcquireReleaseMask);
|
spv::MemorySemanticsAcquireReleaseMask);
|
||||||
return spv::NoResult;
|
return spv::NoResult;
|
||||||
|
|
||||||
|
case glslang::EOpEmitVertex:
|
||||||
|
builder.createNoResultOp(spv::OpEmitVertex);
|
||||||
|
return 0;
|
||||||
|
case glslang::EOpEndPrimitive:
|
||||||
|
builder.createNoResultOp(spv::OpEndPrimitive);
|
||||||
|
return 0;
|
||||||
|
|
||||||
case glslang::EOpSubgroupElect: {
|
case glslang::EOpSubgroupElect: {
|
||||||
std::vector<spv::Id> operands;
|
std::vector<spv::Id> operands;
|
||||||
return createSubgroupOperation(op, typeId, operands, glslang::EbtVoid);
|
return createSubgroupOperation(op, typeId, operands, glslang::EbtVoid);
|
||||||
|
|
@ -7615,10 +7687,10 @@ spv::Id TGlslangToSpvTraverser::createNoArgOperation(glslang::TOperator op, spv:
|
||||||
builder.addCapability(spv::CapabilityShaderClockKHR);
|
builder.addCapability(spv::CapabilityShaderClockKHR);
|
||||||
return builder.createOp(spv::OpReadClockKHR, typeId, args);
|
return builder.createOp(spv::OpReadClockKHR, typeId, args);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
logger->missingFunctionality("unknown operation with no arguments");
|
logger->missingFunctionality("unknown operation with no arguments");
|
||||||
|
|
||||||
|
|
@ -7823,7 +7895,6 @@ spv::Id TGlslangToSpvTraverser::createSpvConstant(const glslang::TIntermTyped& n
|
||||||
|
|
||||||
// We now know we have a specialization constant to build
|
// We now know we have a specialization constant to build
|
||||||
|
|
||||||
#ifndef GLSLANG_WEB
|
|
||||||
// gl_WorkGroupSize is a special case until the front-end handles hierarchical specialization constants,
|
// gl_WorkGroupSize is a special case until the front-end handles hierarchical specialization constants,
|
||||||
// even then, it's specialization ids are handled by special case syntax in GLSL: layout(local_size_x = ...
|
// even then, it's specialization ids are handled by special case syntax in GLSL: layout(local_size_x = ...
|
||||||
if (node.getType().getQualifier().builtIn == glslang::EbvWorkGroupSize) {
|
if (node.getType().getQualifier().builtIn == glslang::EbvWorkGroupSize) {
|
||||||
|
|
@ -7838,7 +7909,6 @@ spv::Id TGlslangToSpvTraverser::createSpvConstant(const glslang::TIntermTyped& n
|
||||||
}
|
}
|
||||||
return builder.makeCompositeConstant(builder.makeVectorType(builder.makeUintType(32), 3), dimConstId, true);
|
return builder.makeCompositeConstant(builder.makeVectorType(builder.makeUintType(32), 3), dimConstId, true);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
// An AST node labelled as specialization constant should be a symbol node.
|
// An AST node labelled as specialization constant should be a symbol node.
|
||||||
// Its initializer should either be a sub tree with constant nodes, or a constant union array.
|
// Its initializer should either be a sub tree with constant nodes, or a constant union array.
|
||||||
|
|
@ -8174,7 +8244,8 @@ int GetSpirvGeneratorVersion()
|
||||||
// return 5; // make OpArrayLength result type be an int with signedness of 0
|
// return 5; // make OpArrayLength result type be an int with signedness of 0
|
||||||
// return 6; // revert version 5 change, which makes a different (new) kind of incorrect code,
|
// return 6; // revert version 5 change, which makes a different (new) kind of incorrect code,
|
||||||
// versions 4 and 6 each generate OpArrayLength as it has long been done
|
// versions 4 and 6 each generate OpArrayLength as it has long been done
|
||||||
return 7; // GLSL volatile keyword maps to both SPIR-V decorations Volatile and Coherent
|
// return 7; // GLSL volatile keyword maps to both SPIR-V decorations Volatile and Coherent
|
||||||
|
return 8; // switch to new dead block eliminator; use OpUnreachable
|
||||||
}
|
}
|
||||||
|
|
||||||
// Write SPIR-V out to a binary file
|
// Write SPIR-V out to a binary file
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "SpvTools.h"
|
#include "SpvTools.h"
|
||||||
#include "../glslang/Include/intermediate.h"
|
#include "glslang/Include/intermediate.h"
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
|
||||||
|
|
@ -61,17 +61,22 @@ namespace {
|
||||||
// Use by calling visit() on the root block.
|
// Use by calling visit() on the root block.
|
||||||
class ReadableOrderTraverser {
|
class ReadableOrderTraverser {
|
||||||
public:
|
public:
|
||||||
explicit ReadableOrderTraverser(std::function<void(Block*)> callback) : callback_(callback) {}
|
ReadableOrderTraverser(std::function<void(Block*, spv::ReachReason, Block*)> callback)
|
||||||
|
: callback_(callback) {}
|
||||||
// Visits the block if it hasn't been visited already and isn't currently
|
// Visits the block if it hasn't been visited already and isn't currently
|
||||||
// being delayed. Invokes callback(block), then descends into its
|
// being delayed. Invokes callback(block, why, header), then descends into its
|
||||||
// successors. Delays merge-block and continue-block processing until all
|
// successors. Delays merge-block and continue-block processing until all
|
||||||
// the branches have been completed.
|
// the branches have been completed. If |block| is an unreachable merge block or
|
||||||
void visit(Block* block)
|
// an unreachable continue target, then |header| is the corresponding header block.
|
||||||
|
void visit(Block* block, spv::ReachReason why, Block* header)
|
||||||
{
|
{
|
||||||
assert(block);
|
assert(block);
|
||||||
|
if (why == spv::ReachViaControlFlow) {
|
||||||
|
reachableViaControlFlow_.insert(block);
|
||||||
|
}
|
||||||
if (visited_.count(block) || delayed_.count(block))
|
if (visited_.count(block) || delayed_.count(block))
|
||||||
return;
|
return;
|
||||||
callback_(block);
|
callback_(block, why, header);
|
||||||
visited_.insert(block);
|
visited_.insert(block);
|
||||||
Block* mergeBlock = nullptr;
|
Block* mergeBlock = nullptr;
|
||||||
Block* continueBlock = nullptr;
|
Block* continueBlock = nullptr;
|
||||||
|
|
@ -87,27 +92,40 @@ public:
|
||||||
delayed_.insert(continueBlock);
|
delayed_.insert(continueBlock);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const auto successors = block->getSuccessors();
|
if (why == spv::ReachViaControlFlow) {
|
||||||
for (auto it = successors.cbegin(); it != successors.cend(); ++it)
|
const auto& successors = block->getSuccessors();
|
||||||
visit(*it);
|
for (auto it = successors.cbegin(); it != successors.cend(); ++it)
|
||||||
|
visit(*it, why, nullptr);
|
||||||
|
}
|
||||||
if (continueBlock) {
|
if (continueBlock) {
|
||||||
|
const spv::ReachReason continueWhy =
|
||||||
|
(reachableViaControlFlow_.count(continueBlock) > 0)
|
||||||
|
? spv::ReachViaControlFlow
|
||||||
|
: spv::ReachDeadContinue;
|
||||||
delayed_.erase(continueBlock);
|
delayed_.erase(continueBlock);
|
||||||
visit(continueBlock);
|
visit(continueBlock, continueWhy, block);
|
||||||
}
|
}
|
||||||
if (mergeBlock) {
|
if (mergeBlock) {
|
||||||
|
const spv::ReachReason mergeWhy =
|
||||||
|
(reachableViaControlFlow_.count(mergeBlock) > 0)
|
||||||
|
? spv::ReachViaControlFlow
|
||||||
|
: spv::ReachDeadMerge;
|
||||||
delayed_.erase(mergeBlock);
|
delayed_.erase(mergeBlock);
|
||||||
visit(mergeBlock);
|
visit(mergeBlock, mergeWhy, block);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::function<void(Block*)> callback_;
|
std::function<void(Block*, spv::ReachReason, Block*)> callback_;
|
||||||
// Whether a block has already been visited or is being delayed.
|
// Whether a block has already been visited or is being delayed.
|
||||||
std::unordered_set<Block *> visited_, delayed_;
|
std::unordered_set<Block *> visited_, delayed_;
|
||||||
|
|
||||||
|
// The set of blocks that actually are reached via control flow.
|
||||||
|
std::unordered_set<Block *> reachableViaControlFlow_;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
void spv::inReadableOrder(Block* root, std::function<void(Block*)> callback)
|
void spv::inReadableOrder(Block* root, std::function<void(Block*, spv::ReachReason, Block*)> callback)
|
||||||
{
|
{
|
||||||
ReadableOrderTraverser(callback).visit(root);
|
ReadableOrderTraverser(callback).visit(root, spv::ReachViaControlFlow, nullptr);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -67,6 +67,7 @@ typedef enum {
|
||||||
Spv_1_2 = (1 << 16) | (2 << 8),
|
Spv_1_2 = (1 << 16) | (2 << 8),
|
||||||
Spv_1_3 = (1 << 16) | (3 << 8),
|
Spv_1_3 = (1 << 16) | (3 << 8),
|
||||||
Spv_1_4 = (1 << 16) | (4 << 8),
|
Spv_1_4 = (1 << 16) | (4 << 8),
|
||||||
|
Spv_1_5 = (1 << 16) | (5 << 8),
|
||||||
} SpvVersion;
|
} SpvVersion;
|
||||||
|
|
||||||
class Builder {
|
class Builder {
|
||||||
|
|
@ -105,6 +106,20 @@ public:
|
||||||
void addModuleProcessed(const std::string& p) { moduleProcesses.push_back(p.c_str()); }
|
void addModuleProcessed(const std::string& p) { moduleProcesses.push_back(p.c_str()); }
|
||||||
void setEmitOpLines() { emitOpLines = true; }
|
void setEmitOpLines() { emitOpLines = true; }
|
||||||
void addExtension(const char* ext) { extensions.insert(ext); }
|
void addExtension(const char* ext) { extensions.insert(ext); }
|
||||||
|
void removeExtension(const char* ext)
|
||||||
|
{
|
||||||
|
extensions.erase(ext);
|
||||||
|
}
|
||||||
|
void addIncorporatedExtension(const char* ext, SpvVersion incorporatedVersion)
|
||||||
|
{
|
||||||
|
if (getSpvVersion() < static_cast<unsigned>(incorporatedVersion))
|
||||||
|
addExtension(ext);
|
||||||
|
}
|
||||||
|
void promoteIncorporatedExtension(const char* baseExt, const char* promoExt, SpvVersion incorporatedVersion)
|
||||||
|
{
|
||||||
|
removeExtension(baseExt);
|
||||||
|
addIncorporatedExtension(promoExt, incorporatedVersion);
|
||||||
|
}
|
||||||
void addInclude(const std::string& name, const std::string& text)
|
void addInclude(const std::string& name, const std::string& text)
|
||||||
{
|
{
|
||||||
spv::Id incId = getStringId(name);
|
spv::Id incId = getStringId(name);
|
||||||
|
|
@ -668,16 +683,21 @@ public:
|
||||||
// based on the type of the base and the chain of dereferences.
|
// based on the type of the base and the chain of dereferences.
|
||||||
Id accessChainGetInferredType();
|
Id accessChainGetInferredType();
|
||||||
|
|
||||||
// Add capabilities, extensions, remove unneeded decorations, etc.,
|
// Add capabilities, extensions, remove unneeded decorations, etc.,
|
||||||
// based on the resulting SPIR-V.
|
// based on the resulting SPIR-V.
|
||||||
void postProcess();
|
void postProcess();
|
||||||
|
|
||||||
|
// 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
|
// Hook to visit each instruction in a block in a function
|
||||||
void postProcess(Instruction&);
|
void postProcess(Instruction&);
|
||||||
// Hook to visit each instruction in a reachable block in a function.
|
|
||||||
void postProcessReachable(const Instruction&);
|
|
||||||
// Hook to visit each non-32-bit sized float/int operation in a block.
|
// Hook to visit each non-32-bit sized float/int operation in a block.
|
||||||
void postProcessType(const Instruction&, spv::Id typeId);
|
void postProcessType(const Instruction&, spv::Id typeId);
|
||||||
|
#endif
|
||||||
|
|
||||||
void dump(std::vector<unsigned int>&) const;
|
void dump(std::vector<unsigned int>&) const;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -39,6 +39,7 @@
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
|
|
||||||
|
#include <unordered_map>
|
||||||
#include <unordered_set>
|
#include <unordered_set>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
|
|
@ -57,6 +58,7 @@ namespace spv {
|
||||||
|
|
||||||
namespace spv {
|
namespace spv {
|
||||||
|
|
||||||
|
#ifndef GLSLANG_WEB
|
||||||
// Hook to visit each operand type and result type of an instruction.
|
// Hook to visit each operand type and result type of an instruction.
|
||||||
// Will be called multiple times for one instruction, once for each typed
|
// Will be called multiple times for one instruction, once for each typed
|
||||||
// operand and the result.
|
// operand and the result.
|
||||||
|
|
@ -318,17 +320,16 @@ void Builder::postProcess(Instruction& inst)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
// Called for each instruction in a reachable block.
|
|
||||||
void Builder::postProcessReachable(const Instruction&)
|
|
||||||
{
|
|
||||||
// did have code here, but questionable to do so without deleting the instructions
|
|
||||||
}
|
|
||||||
|
|
||||||
// comment in header
|
// comment in header
|
||||||
void Builder::postProcess()
|
void Builder::postProcessCFG()
|
||||||
{
|
{
|
||||||
|
// reachableBlocks is the set of blockss reached via control flow, or which are
|
||||||
|
// unreachable continue targert or unreachable merge.
|
||||||
std::unordered_set<const Block*> reachableBlocks;
|
std::unordered_set<const Block*> reachableBlocks;
|
||||||
|
std::unordered_map<Block*, Block*> headerForUnreachableContinue;
|
||||||
|
std::unordered_set<Block*> unreachableMerges;
|
||||||
std::unordered_set<Id> unreachableDefinitions;
|
std::unordered_set<Id> unreachableDefinitions;
|
||||||
// Collect IDs defined in unreachable blocks. For each function, label the
|
// Collect IDs defined in unreachable blocks. For each function, label the
|
||||||
// reachable blocks first. Then for each unreachable block, collect the
|
// reachable blocks first. Then for each unreachable block, collect the
|
||||||
|
|
@ -336,16 +337,41 @@ void Builder::postProcess()
|
||||||
for (auto fi = module.getFunctions().cbegin(); fi != module.getFunctions().cend(); fi++) {
|
for (auto fi = module.getFunctions().cbegin(); fi != module.getFunctions().cend(); fi++) {
|
||||||
Function* f = *fi;
|
Function* f = *fi;
|
||||||
Block* entry = f->getEntryBlock();
|
Block* entry = f->getEntryBlock();
|
||||||
inReadableOrder(entry, [&reachableBlocks](const Block* b) { reachableBlocks.insert(b); });
|
inReadableOrder(entry,
|
||||||
|
[&reachableBlocks, &unreachableMerges, &headerForUnreachableContinue]
|
||||||
|
(Block* b, ReachReason why, Block* header) {
|
||||||
|
reachableBlocks.insert(b);
|
||||||
|
if (why == ReachDeadContinue) headerForUnreachableContinue[b] = header;
|
||||||
|
if (why == ReachDeadMerge) unreachableMerges.insert(b);
|
||||||
|
});
|
||||||
for (auto bi = f->getBlocks().cbegin(); bi != f->getBlocks().cend(); bi++) {
|
for (auto bi = f->getBlocks().cbegin(); bi != f->getBlocks().cend(); bi++) {
|
||||||
Block* b = *bi;
|
Block* b = *bi;
|
||||||
if (reachableBlocks.count(b) == 0) {
|
if (unreachableMerges.count(b) != 0 || headerForUnreachableContinue.count(b) != 0) {
|
||||||
for (auto ii = b->getInstructions().cbegin(); ii != b->getInstructions().cend(); ii++)
|
auto ii = b->getInstructions().cbegin();
|
||||||
|
++ii; // Keep potential decorations on the label.
|
||||||
|
for (; ii != b->getInstructions().cend(); ++ii)
|
||||||
|
unreachableDefinitions.insert(ii->get()->getResultId());
|
||||||
|
} else if (reachableBlocks.count(b) == 0) {
|
||||||
|
// The normal case for unreachable code. All definitions are considered dead.
|
||||||
|
for (auto ii = b->getInstructions().cbegin(); ii != b->getInstructions().cend(); ++ii)
|
||||||
unreachableDefinitions.insert(ii->get()->getResultId());
|
unreachableDefinitions.insert(ii->get()->getResultId());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Modify unreachable merge blocks and unreachable continue targets.
|
||||||
|
// Delete their contents.
|
||||||
|
for (auto mergeIter = unreachableMerges.begin(); mergeIter != unreachableMerges.end(); ++mergeIter) {
|
||||||
|
(*mergeIter)->rewriteAsCanonicalUnreachableMerge();
|
||||||
|
}
|
||||||
|
for (auto continueIter = headerForUnreachableContinue.begin();
|
||||||
|
continueIter != headerForUnreachableContinue.end();
|
||||||
|
++continueIter) {
|
||||||
|
Block* continue_target = continueIter->first;
|
||||||
|
Block* header = continueIter->second;
|
||||||
|
continue_target->rewriteAsCanonicalUnreachableContinue(header);
|
||||||
|
}
|
||||||
|
|
||||||
// Remove unneeded decorations, for unreachable instructions
|
// Remove unneeded decorations, for unreachable instructions
|
||||||
decorations.erase(std::remove_if(decorations.begin(), decorations.end(),
|
decorations.erase(std::remove_if(decorations.begin(), decorations.end(),
|
||||||
[&unreachableDefinitions](std::unique_ptr<Instruction>& I) -> bool {
|
[&unreachableDefinitions](std::unique_ptr<Instruction>& I) -> bool {
|
||||||
|
|
@ -353,7 +379,11 @@ void Builder::postProcess()
|
||||||
return unreachableDefinitions.count(decoration_id) != 0;
|
return unreachableDefinitions.count(decoration_id) != 0;
|
||||||
}),
|
}),
|
||||||
decorations.end());
|
decorations.end());
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifndef GLSLANG_WEB
|
||||||
|
// comment in header
|
||||||
|
void Builder::postProcessFeatures() {
|
||||||
// Add per-instruction capabilities, extensions, etc.,
|
// Add per-instruction capabilities, extensions, etc.,
|
||||||
|
|
||||||
// Look for any 8/16 bit type in physical storage buffer class, and set the
|
// Look for any 8/16 bit type in physical storage buffer class, and set the
|
||||||
|
|
@ -363,24 +393,17 @@ void Builder::postProcess()
|
||||||
Instruction* type = groupedTypes[OpTypePointer][t];
|
Instruction* type = groupedTypes[OpTypePointer][t];
|
||||||
if (type->getImmediateOperand(0) == (unsigned)StorageClassPhysicalStorageBufferEXT) {
|
if (type->getImmediateOperand(0) == (unsigned)StorageClassPhysicalStorageBufferEXT) {
|
||||||
if (containsType(type->getIdOperand(1), OpTypeInt, 8)) {
|
if (containsType(type->getIdOperand(1), OpTypeInt, 8)) {
|
||||||
addExtension(spv::E_SPV_KHR_8bit_storage);
|
addIncorporatedExtension(spv::E_SPV_KHR_8bit_storage, spv::Spv_1_5);
|
||||||
addCapability(spv::CapabilityStorageBuffer8BitAccess);
|
addCapability(spv::CapabilityStorageBuffer8BitAccess);
|
||||||
}
|
}
|
||||||
if (containsType(type->getIdOperand(1), OpTypeInt, 16) ||
|
if (containsType(type->getIdOperand(1), OpTypeInt, 16) ||
|
||||||
containsType(type->getIdOperand(1), OpTypeFloat, 16)) {
|
containsType(type->getIdOperand(1), OpTypeFloat, 16)) {
|
||||||
addExtension(spv::E_SPV_KHR_16bit_storage);
|
addIncorporatedExtension(spv::E_SPV_KHR_16bit_storage, spv::Spv_1_3);
|
||||||
addCapability(spv::CapabilityStorageBuffer16BitAccess);
|
addCapability(spv::CapabilityStorageBuffer16BitAccess);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// process all reachable instructions...
|
|
||||||
for (auto bi = reachableBlocks.cbegin(); bi != reachableBlocks.cend(); ++bi) {
|
|
||||||
const Block* block = *bi;
|
|
||||||
const auto function = [this](const std::unique_ptr<Instruction>& inst) { postProcessReachable(*inst.get()); };
|
|
||||||
std::for_each(block->getInstructions().begin(), block->getInstructions().end(), function);
|
|
||||||
}
|
|
||||||
|
|
||||||
// process all block-contained instructions
|
// process all block-contained instructions
|
||||||
for (auto fi = module.getFunctions().cbegin(); fi != module.getFunctions().cend(); fi++) {
|
for (auto fi = module.getFunctions().cbegin(); fi != module.getFunctions().cend(); fi++) {
|
||||||
Function* f = *fi;
|
Function* f = *fi;
|
||||||
|
|
@ -414,5 +437,14 @@ void Builder::postProcess()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// comment in header
|
||||||
|
void Builder::postProcess() {
|
||||||
|
postProcessCFG();
|
||||||
|
#ifndef GLSLANG_WEB
|
||||||
|
postProcessFeatures();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
}; // end spv namespace
|
}; // end spv namespace
|
||||||
|
|
|
||||||
|
|
@ -173,6 +173,7 @@ void SpirvToolsLegalize(const glslang::TIntermediate&, std::vector<unsigned int>
|
||||||
if (options->generateDebugInfo) {
|
if (options->generateDebugInfo) {
|
||||||
optimizer.RegisterPass(spvtools::CreatePropagateLineInfoPass());
|
optimizer.RegisterPass(spvtools::CreatePropagateLineInfoPass());
|
||||||
}
|
}
|
||||||
|
optimizer.RegisterPass(spvtools::CreateWrapOpKillPass());
|
||||||
optimizer.RegisterPass(spvtools::CreateDeadBranchElimPass());
|
optimizer.RegisterPass(spvtools::CreateDeadBranchElimPass());
|
||||||
optimizer.RegisterPass(spvtools::CreateMergeReturnPass());
|
optimizer.RegisterPass(spvtools::CreateMergeReturnPass());
|
||||||
optimizer.RegisterPass(spvtools::CreateInlineExhaustivePass());
|
optimizer.RegisterPass(spvtools::CreateInlineExhaustivePass());
|
||||||
|
|
@ -196,8 +197,6 @@ void SpirvToolsLegalize(const glslang::TIntermediate&, std::vector<unsigned int>
|
||||||
optimizer.RegisterPass(spvtools::CreateDeadInsertElimPass());
|
optimizer.RegisterPass(spvtools::CreateDeadInsertElimPass());
|
||||||
if (options->optimizeSize) {
|
if (options->optimizeSize) {
|
||||||
optimizer.RegisterPass(spvtools::CreateRedundancyEliminationPass());
|
optimizer.RegisterPass(spvtools::CreateRedundancyEliminationPass());
|
||||||
// TODO(greg-lunarg): Add this when AMD driver issues are resolved
|
|
||||||
// optimizer.RegisterPass(CreateCommonUniformElimPass());
|
|
||||||
}
|
}
|
||||||
optimizer.RegisterPass(spvtools::CreateAggressiveDCEPass());
|
optimizer.RegisterPass(spvtools::CreateAggressiveDCEPass());
|
||||||
optimizer.RegisterPass(spvtools::CreateCFGCleanupPass());
|
optimizer.RegisterPass(spvtools::CreateCFGCleanupPass());
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,7 @@
|
||||||
#include <ostream>
|
#include <ostream>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "../glslang/MachineIndependent/localintermediate.h"
|
#include "glslang/MachineIndependent/localintermediate.h"
|
||||||
#include "Logger.h"
|
#include "Logger.h"
|
||||||
|
|
||||||
namespace glslang {
|
namespace glslang {
|
||||||
|
|
|
||||||
|
|
@ -931,6 +931,8 @@ const char* CapabilityString(int info)
|
||||||
case CapabilityDemoteToHelperInvocationEXT: return "DemoteToHelperInvocationEXT";
|
case CapabilityDemoteToHelperInvocationEXT: return "DemoteToHelperInvocationEXT";
|
||||||
case CapabilityShaderClockKHR: return "ShaderClockKHR";
|
case CapabilityShaderClockKHR: return "ShaderClockKHR";
|
||||||
|
|
||||||
|
case CapabilityIntegerFunctions2INTEL: return "CapabilityIntegerFunctions2INTEL";
|
||||||
|
|
||||||
default: return "Bad";
|
default: return "Bad";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -91,6 +91,7 @@ enum AddressingModel {
|
||||||
AddressingModelLogical = 0,
|
AddressingModelLogical = 0,
|
||||||
AddressingModelPhysical32 = 1,
|
AddressingModelPhysical32 = 1,
|
||||||
AddressingModelPhysical64 = 2,
|
AddressingModelPhysical64 = 2,
|
||||||
|
AddressingModelPhysicalStorageBuffer64 = 5348,
|
||||||
AddressingModelPhysicalStorageBuffer64EXT = 5348,
|
AddressingModelPhysicalStorageBuffer64EXT = 5348,
|
||||||
AddressingModelMax = 0x7fffffff,
|
AddressingModelMax = 0x7fffffff,
|
||||||
};
|
};
|
||||||
|
|
@ -99,6 +100,7 @@ enum MemoryModel {
|
||||||
MemoryModelSimple = 0,
|
MemoryModelSimple = 0,
|
||||||
MemoryModelGLSL450 = 1,
|
MemoryModelGLSL450 = 1,
|
||||||
MemoryModelOpenCL = 2,
|
MemoryModelOpenCL = 2,
|
||||||
|
MemoryModelVulkan = 3,
|
||||||
MemoryModelVulkanKHR = 3,
|
MemoryModelVulkanKHR = 3,
|
||||||
MemoryModelMax = 0x7fffffff,
|
MemoryModelMax = 0x7fffffff,
|
||||||
};
|
};
|
||||||
|
|
@ -183,6 +185,7 @@ enum StorageClass {
|
||||||
StorageClassHitAttributeNV = 5339,
|
StorageClassHitAttributeNV = 5339,
|
||||||
StorageClassIncomingRayPayloadNV = 5342,
|
StorageClassIncomingRayPayloadNV = 5342,
|
||||||
StorageClassShaderRecordBufferNV = 5343,
|
StorageClassShaderRecordBufferNV = 5343,
|
||||||
|
StorageClassPhysicalStorageBuffer = 5349,
|
||||||
StorageClassPhysicalStorageBufferEXT = 5349,
|
StorageClassPhysicalStorageBufferEXT = 5349,
|
||||||
StorageClassMax = 0x7fffffff,
|
StorageClassMax = 0x7fffffff,
|
||||||
};
|
};
|
||||||
|
|
@ -311,9 +314,13 @@ enum ImageOperandsShift {
|
||||||
ImageOperandsConstOffsetsShift = 5,
|
ImageOperandsConstOffsetsShift = 5,
|
||||||
ImageOperandsSampleShift = 6,
|
ImageOperandsSampleShift = 6,
|
||||||
ImageOperandsMinLodShift = 7,
|
ImageOperandsMinLodShift = 7,
|
||||||
|
ImageOperandsMakeTexelAvailableShift = 8,
|
||||||
ImageOperandsMakeTexelAvailableKHRShift = 8,
|
ImageOperandsMakeTexelAvailableKHRShift = 8,
|
||||||
|
ImageOperandsMakeTexelVisibleShift = 9,
|
||||||
ImageOperandsMakeTexelVisibleKHRShift = 9,
|
ImageOperandsMakeTexelVisibleKHRShift = 9,
|
||||||
|
ImageOperandsNonPrivateTexelShift = 10,
|
||||||
ImageOperandsNonPrivateTexelKHRShift = 10,
|
ImageOperandsNonPrivateTexelKHRShift = 10,
|
||||||
|
ImageOperandsVolatileTexelShift = 11,
|
||||||
ImageOperandsVolatileTexelKHRShift = 11,
|
ImageOperandsVolatileTexelKHRShift = 11,
|
||||||
ImageOperandsSignExtendShift = 12,
|
ImageOperandsSignExtendShift = 12,
|
||||||
ImageOperandsZeroExtendShift = 13,
|
ImageOperandsZeroExtendShift = 13,
|
||||||
|
|
@ -330,9 +337,13 @@ enum ImageOperandsMask {
|
||||||
ImageOperandsConstOffsetsMask = 0x00000020,
|
ImageOperandsConstOffsetsMask = 0x00000020,
|
||||||
ImageOperandsSampleMask = 0x00000040,
|
ImageOperandsSampleMask = 0x00000040,
|
||||||
ImageOperandsMinLodMask = 0x00000080,
|
ImageOperandsMinLodMask = 0x00000080,
|
||||||
|
ImageOperandsMakeTexelAvailableMask = 0x00000100,
|
||||||
ImageOperandsMakeTexelAvailableKHRMask = 0x00000100,
|
ImageOperandsMakeTexelAvailableKHRMask = 0x00000100,
|
||||||
|
ImageOperandsMakeTexelVisibleMask = 0x00000200,
|
||||||
ImageOperandsMakeTexelVisibleKHRMask = 0x00000200,
|
ImageOperandsMakeTexelVisibleKHRMask = 0x00000200,
|
||||||
|
ImageOperandsNonPrivateTexelMask = 0x00000400,
|
||||||
ImageOperandsNonPrivateTexelKHRMask = 0x00000400,
|
ImageOperandsNonPrivateTexelKHRMask = 0x00000400,
|
||||||
|
ImageOperandsVolatileTexelMask = 0x00000800,
|
||||||
ImageOperandsVolatileTexelKHRMask = 0x00000800,
|
ImageOperandsVolatileTexelKHRMask = 0x00000800,
|
||||||
ImageOperandsSignExtendMask = 0x00001000,
|
ImageOperandsSignExtendMask = 0x00001000,
|
||||||
ImageOperandsZeroExtendMask = 0x00002000,
|
ImageOperandsZeroExtendMask = 0x00002000,
|
||||||
|
|
@ -448,8 +459,11 @@ enum Decoration {
|
||||||
DecorationPerViewNV = 5272,
|
DecorationPerViewNV = 5272,
|
||||||
DecorationPerTaskNV = 5273,
|
DecorationPerTaskNV = 5273,
|
||||||
DecorationPerVertexNV = 5285,
|
DecorationPerVertexNV = 5285,
|
||||||
|
DecorationNonUniform = 5300,
|
||||||
DecorationNonUniformEXT = 5300,
|
DecorationNonUniformEXT = 5300,
|
||||||
|
DecorationRestrictPointer = 5355,
|
||||||
DecorationRestrictPointerEXT = 5355,
|
DecorationRestrictPointerEXT = 5355,
|
||||||
|
DecorationAliasedPointer = 5356,
|
||||||
DecorationAliasedPointerEXT = 5356,
|
DecorationAliasedPointerEXT = 5356,
|
||||||
DecorationCounterBuffer = 5634,
|
DecorationCounterBuffer = 5634,
|
||||||
DecorationHlslCounterBufferGOOGLE = 5634,
|
DecorationHlslCounterBufferGOOGLE = 5634,
|
||||||
|
|
@ -630,8 +644,11 @@ enum MemorySemanticsShift {
|
||||||
MemorySemanticsCrossWorkgroupMemoryShift = 9,
|
MemorySemanticsCrossWorkgroupMemoryShift = 9,
|
||||||
MemorySemanticsAtomicCounterMemoryShift = 10,
|
MemorySemanticsAtomicCounterMemoryShift = 10,
|
||||||
MemorySemanticsImageMemoryShift = 11,
|
MemorySemanticsImageMemoryShift = 11,
|
||||||
|
MemorySemanticsOutputMemoryShift = 12,
|
||||||
MemorySemanticsOutputMemoryKHRShift = 12,
|
MemorySemanticsOutputMemoryKHRShift = 12,
|
||||||
|
MemorySemanticsMakeAvailableShift = 13,
|
||||||
MemorySemanticsMakeAvailableKHRShift = 13,
|
MemorySemanticsMakeAvailableKHRShift = 13,
|
||||||
|
MemorySemanticsMakeVisibleShift = 14,
|
||||||
MemorySemanticsMakeVisibleKHRShift = 14,
|
MemorySemanticsMakeVisibleKHRShift = 14,
|
||||||
MemorySemanticsVolatileShift = 15,
|
MemorySemanticsVolatileShift = 15,
|
||||||
MemorySemanticsMax = 0x7fffffff,
|
MemorySemanticsMax = 0x7fffffff,
|
||||||
|
|
@ -649,8 +666,11 @@ enum MemorySemanticsMask {
|
||||||
MemorySemanticsCrossWorkgroupMemoryMask = 0x00000200,
|
MemorySemanticsCrossWorkgroupMemoryMask = 0x00000200,
|
||||||
MemorySemanticsAtomicCounterMemoryMask = 0x00000400,
|
MemorySemanticsAtomicCounterMemoryMask = 0x00000400,
|
||||||
MemorySemanticsImageMemoryMask = 0x00000800,
|
MemorySemanticsImageMemoryMask = 0x00000800,
|
||||||
|
MemorySemanticsOutputMemoryMask = 0x00001000,
|
||||||
MemorySemanticsOutputMemoryKHRMask = 0x00001000,
|
MemorySemanticsOutputMemoryKHRMask = 0x00001000,
|
||||||
|
MemorySemanticsMakeAvailableMask = 0x00002000,
|
||||||
MemorySemanticsMakeAvailableKHRMask = 0x00002000,
|
MemorySemanticsMakeAvailableKHRMask = 0x00002000,
|
||||||
|
MemorySemanticsMakeVisibleMask = 0x00004000,
|
||||||
MemorySemanticsMakeVisibleKHRMask = 0x00004000,
|
MemorySemanticsMakeVisibleKHRMask = 0x00004000,
|
||||||
MemorySemanticsVolatileMask = 0x00008000,
|
MemorySemanticsVolatileMask = 0x00008000,
|
||||||
};
|
};
|
||||||
|
|
@ -659,8 +679,11 @@ enum MemoryAccessShift {
|
||||||
MemoryAccessVolatileShift = 0,
|
MemoryAccessVolatileShift = 0,
|
||||||
MemoryAccessAlignedShift = 1,
|
MemoryAccessAlignedShift = 1,
|
||||||
MemoryAccessNontemporalShift = 2,
|
MemoryAccessNontemporalShift = 2,
|
||||||
|
MemoryAccessMakePointerAvailableShift = 3,
|
||||||
MemoryAccessMakePointerAvailableKHRShift = 3,
|
MemoryAccessMakePointerAvailableKHRShift = 3,
|
||||||
|
MemoryAccessMakePointerVisibleShift = 4,
|
||||||
MemoryAccessMakePointerVisibleKHRShift = 4,
|
MemoryAccessMakePointerVisibleKHRShift = 4,
|
||||||
|
MemoryAccessNonPrivatePointerShift = 5,
|
||||||
MemoryAccessNonPrivatePointerKHRShift = 5,
|
MemoryAccessNonPrivatePointerKHRShift = 5,
|
||||||
MemoryAccessMax = 0x7fffffff,
|
MemoryAccessMax = 0x7fffffff,
|
||||||
};
|
};
|
||||||
|
|
@ -670,8 +693,11 @@ enum MemoryAccessMask {
|
||||||
MemoryAccessVolatileMask = 0x00000001,
|
MemoryAccessVolatileMask = 0x00000001,
|
||||||
MemoryAccessAlignedMask = 0x00000002,
|
MemoryAccessAlignedMask = 0x00000002,
|
||||||
MemoryAccessNontemporalMask = 0x00000004,
|
MemoryAccessNontemporalMask = 0x00000004,
|
||||||
|
MemoryAccessMakePointerAvailableMask = 0x00000008,
|
||||||
MemoryAccessMakePointerAvailableKHRMask = 0x00000008,
|
MemoryAccessMakePointerAvailableKHRMask = 0x00000008,
|
||||||
|
MemoryAccessMakePointerVisibleMask = 0x00000010,
|
||||||
MemoryAccessMakePointerVisibleKHRMask = 0x00000010,
|
MemoryAccessMakePointerVisibleKHRMask = 0x00000010,
|
||||||
|
MemoryAccessNonPrivatePointerMask = 0x00000020,
|
||||||
MemoryAccessNonPrivatePointerKHRMask = 0x00000020,
|
MemoryAccessNonPrivatePointerKHRMask = 0x00000020,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -681,6 +707,7 @@ enum Scope {
|
||||||
ScopeWorkgroup = 2,
|
ScopeWorkgroup = 2,
|
||||||
ScopeSubgroup = 3,
|
ScopeSubgroup = 3,
|
||||||
ScopeInvocation = 4,
|
ScopeInvocation = 4,
|
||||||
|
ScopeQueueFamily = 5,
|
||||||
ScopeQueueFamilyKHR = 5,
|
ScopeQueueFamilyKHR = 5,
|
||||||
ScopeMax = 0x7fffffff,
|
ScopeMax = 0x7fffffff,
|
||||||
};
|
};
|
||||||
|
|
@ -781,6 +808,8 @@ enum Capability {
|
||||||
CapabilityGroupNonUniformShuffleRelative = 66,
|
CapabilityGroupNonUniformShuffleRelative = 66,
|
||||||
CapabilityGroupNonUniformClustered = 67,
|
CapabilityGroupNonUniformClustered = 67,
|
||||||
CapabilityGroupNonUniformQuad = 68,
|
CapabilityGroupNonUniformQuad = 68,
|
||||||
|
CapabilityShaderLayer = 69,
|
||||||
|
CapabilityShaderViewportIndex = 70,
|
||||||
CapabilitySubgroupBallotKHR = 4423,
|
CapabilitySubgroupBallotKHR = 4423,
|
||||||
CapabilityDrawParameters = 4427,
|
CapabilityDrawParameters = 4427,
|
||||||
CapabilitySubgroupVoteKHR = 4431,
|
CapabilitySubgroupVoteKHR = 4431,
|
||||||
|
|
@ -825,21 +854,36 @@ enum Capability {
|
||||||
CapabilityFragmentDensityEXT = 5291,
|
CapabilityFragmentDensityEXT = 5291,
|
||||||
CapabilityShadingRateNV = 5291,
|
CapabilityShadingRateNV = 5291,
|
||||||
CapabilityGroupNonUniformPartitionedNV = 5297,
|
CapabilityGroupNonUniformPartitionedNV = 5297,
|
||||||
|
CapabilityShaderNonUniform = 5301,
|
||||||
CapabilityShaderNonUniformEXT = 5301,
|
CapabilityShaderNonUniformEXT = 5301,
|
||||||
|
CapabilityRuntimeDescriptorArray = 5302,
|
||||||
CapabilityRuntimeDescriptorArrayEXT = 5302,
|
CapabilityRuntimeDescriptorArrayEXT = 5302,
|
||||||
|
CapabilityInputAttachmentArrayDynamicIndexing = 5303,
|
||||||
CapabilityInputAttachmentArrayDynamicIndexingEXT = 5303,
|
CapabilityInputAttachmentArrayDynamicIndexingEXT = 5303,
|
||||||
|
CapabilityUniformTexelBufferArrayDynamicIndexing = 5304,
|
||||||
CapabilityUniformTexelBufferArrayDynamicIndexingEXT = 5304,
|
CapabilityUniformTexelBufferArrayDynamicIndexingEXT = 5304,
|
||||||
|
CapabilityStorageTexelBufferArrayDynamicIndexing = 5305,
|
||||||
CapabilityStorageTexelBufferArrayDynamicIndexingEXT = 5305,
|
CapabilityStorageTexelBufferArrayDynamicIndexingEXT = 5305,
|
||||||
|
CapabilityUniformBufferArrayNonUniformIndexing = 5306,
|
||||||
CapabilityUniformBufferArrayNonUniformIndexingEXT = 5306,
|
CapabilityUniformBufferArrayNonUniformIndexingEXT = 5306,
|
||||||
|
CapabilitySampledImageArrayNonUniformIndexing = 5307,
|
||||||
CapabilitySampledImageArrayNonUniformIndexingEXT = 5307,
|
CapabilitySampledImageArrayNonUniformIndexingEXT = 5307,
|
||||||
|
CapabilityStorageBufferArrayNonUniformIndexing = 5308,
|
||||||
CapabilityStorageBufferArrayNonUniformIndexingEXT = 5308,
|
CapabilityStorageBufferArrayNonUniformIndexingEXT = 5308,
|
||||||
|
CapabilityStorageImageArrayNonUniformIndexing = 5309,
|
||||||
CapabilityStorageImageArrayNonUniformIndexingEXT = 5309,
|
CapabilityStorageImageArrayNonUniformIndexingEXT = 5309,
|
||||||
|
CapabilityInputAttachmentArrayNonUniformIndexing = 5310,
|
||||||
CapabilityInputAttachmentArrayNonUniformIndexingEXT = 5310,
|
CapabilityInputAttachmentArrayNonUniformIndexingEXT = 5310,
|
||||||
|
CapabilityUniformTexelBufferArrayNonUniformIndexing = 5311,
|
||||||
CapabilityUniformTexelBufferArrayNonUniformIndexingEXT = 5311,
|
CapabilityUniformTexelBufferArrayNonUniformIndexingEXT = 5311,
|
||||||
|
CapabilityStorageTexelBufferArrayNonUniformIndexing = 5312,
|
||||||
CapabilityStorageTexelBufferArrayNonUniformIndexingEXT = 5312,
|
CapabilityStorageTexelBufferArrayNonUniformIndexingEXT = 5312,
|
||||||
CapabilityRayTracingNV = 5340,
|
CapabilityRayTracingNV = 5340,
|
||||||
|
CapabilityVulkanMemoryModel = 5345,
|
||||||
CapabilityVulkanMemoryModelKHR = 5345,
|
CapabilityVulkanMemoryModelKHR = 5345,
|
||||||
|
CapabilityVulkanMemoryModelDeviceScope = 5346,
|
||||||
CapabilityVulkanMemoryModelDeviceScopeKHR = 5346,
|
CapabilityVulkanMemoryModelDeviceScopeKHR = 5346,
|
||||||
|
CapabilityPhysicalStorageBufferAddresses = 5347,
|
||||||
CapabilityPhysicalStorageBufferAddressesEXT = 5347,
|
CapabilityPhysicalStorageBufferAddressesEXT = 5347,
|
||||||
CapabilityComputeDerivativeGroupLinearNV = 5350,
|
CapabilityComputeDerivativeGroupLinearNV = 5350,
|
||||||
CapabilityCooperativeMatrixNV = 5357,
|
CapabilityCooperativeMatrixNV = 5357,
|
||||||
|
|
|
||||||
|
|
@ -226,6 +226,36 @@ public:
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Change this block into a canonical dead merge block. Delete instructions
|
||||||
|
// as necessary. A canonical dead merge block has only an OpLabel and an
|
||||||
|
// OpUnreachable.
|
||||||
|
void rewriteAsCanonicalUnreachableMerge() {
|
||||||
|
assert(localVariables.empty());
|
||||||
|
// Delete all instructions except for the label.
|
||||||
|
assert(instructions.size() > 0);
|
||||||
|
instructions.resize(1);
|
||||||
|
successors.clear();
|
||||||
|
Instruction* unreachable = new Instruction(OpUnreachable);
|
||||||
|
addInstruction(std::unique_ptr<Instruction>(unreachable));
|
||||||
|
}
|
||||||
|
// Change this block into a canonical dead continue target branching to the
|
||||||
|
// given header ID. Delete instructions as necessary. A canonical dead continue
|
||||||
|
// target has only an OpLabel and an unconditional branch back to the corresponding
|
||||||
|
// header.
|
||||||
|
void rewriteAsCanonicalUnreachableContinue(Block* header) {
|
||||||
|
assert(localVariables.empty());
|
||||||
|
// Delete all instructions except for the label.
|
||||||
|
assert(instructions.size() > 0);
|
||||||
|
instructions.resize(1);
|
||||||
|
successors.clear();
|
||||||
|
// Add OpBranch back to the header.
|
||||||
|
assert(header != nullptr);
|
||||||
|
Instruction* branch = new Instruction(OpBranch);
|
||||||
|
branch->addIdOperand(header->getId());
|
||||||
|
addInstruction(std::unique_ptr<Instruction>(branch));
|
||||||
|
successors.push_back(header);
|
||||||
|
}
|
||||||
|
|
||||||
bool isTerminated() const
|
bool isTerminated() const
|
||||||
{
|
{
|
||||||
switch (instructions.back()->getOpCode()) {
|
switch (instructions.back()->getOpCode()) {
|
||||||
|
|
@ -235,6 +265,7 @@ public:
|
||||||
case OpKill:
|
case OpKill:
|
||||||
case OpReturn:
|
case OpReturn:
|
||||||
case OpReturnValue:
|
case OpReturnValue:
|
||||||
|
case OpUnreachable:
|
||||||
return true;
|
return true;
|
||||||
default:
|
default:
|
||||||
return false;
|
return false;
|
||||||
|
|
@ -268,10 +299,24 @@ protected:
|
||||||
bool unreachable;
|
bool unreachable;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// The different reasons for reaching a block in the inReadableOrder traversal.
|
||||||
|
enum ReachReason {
|
||||||
|
// Reachable from the entry block via transfers of control, i.e. branches.
|
||||||
|
ReachViaControlFlow = 0,
|
||||||
|
// A continue target that is not reachable via control flow.
|
||||||
|
ReachDeadContinue,
|
||||||
|
// A merge block that is not reachable via control flow.
|
||||||
|
ReachDeadMerge
|
||||||
|
};
|
||||||
|
|
||||||
// Traverses the control-flow graph rooted at root in an order suited for
|
// Traverses the control-flow graph rooted at root in an order suited for
|
||||||
// readable code generation. Invokes callback at every node in the traversal
|
// readable code generation. Invokes callback at every node in the traversal
|
||||||
// order.
|
// order. The callback arguments are:
|
||||||
void inReadableOrder(Block* root, std::function<void(Block*)> callback);
|
// - the block,
|
||||||
|
// - the reason we reached the block,
|
||||||
|
// - if the reason was that block is an unreachable continue or unreachable merge block
|
||||||
|
// then the last parameter is the corresponding header block.
|
||||||
|
void inReadableOrder(Block* root, std::function<void(Block*, ReachReason, Block* header)> callback);
|
||||||
|
|
||||||
//
|
//
|
||||||
// SPIR-V IR Function.
|
// SPIR-V IR Function.
|
||||||
|
|
@ -321,7 +366,7 @@ public:
|
||||||
parameterInstructions[p]->dump(out);
|
parameterInstructions[p]->dump(out);
|
||||||
|
|
||||||
// Blocks
|
// Blocks
|
||||||
inReadableOrder(blocks[0], [&out](const Block* b) { b->dump(out); });
|
inReadableOrder(blocks[0], [&out](const Block* b, ReachReason, Block*) { b->dump(out); });
|
||||||
Instruction end(0, 0, OpFunctionEnd);
|
Instruction end(0, 0, OpFunctionEnd);
|
||||||
end.dump(out);
|
end.dump(out);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,25 +4,25 @@ set_property(TARGET glslang-default-resource-limits PROPERTY FOLDER glslang)
|
||||||
set_property(TARGET glslang-default-resource-limits PROPERTY POSITION_INDEPENDENT_CODE ON)
|
set_property(TARGET glslang-default-resource-limits PROPERTY POSITION_INDEPENDENT_CODE ON)
|
||||||
|
|
||||||
target_include_directories(glslang-default-resource-limits
|
target_include_directories(glslang-default-resource-limits
|
||||||
PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}
|
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
||||||
PUBLIC ${PROJECT_SOURCE_DIR})
|
PUBLIC $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}>)
|
||||||
|
|
||||||
|
|
||||||
set(SOURCES StandAlone.cpp DirStackFileIncluder.h)
|
set(SOURCES StandAlone.cpp DirStackFileIncluder.h)
|
||||||
set(REMAPPER_SOURCES spirv-remap.cpp)
|
|
||||||
|
|
||||||
add_executable(glslangValidator ${SOURCES})
|
add_executable(glslangValidator ${SOURCES})
|
||||||
add_executable(spirv-remap ${REMAPPER_SOURCES})
|
|
||||||
set_property(TARGET glslangValidator PROPERTY FOLDER tools)
|
set_property(TARGET glslangValidator PROPERTY FOLDER tools)
|
||||||
set_property(TARGET spirv-remap PROPERTY FOLDER tools)
|
|
||||||
glslang_set_link_args(glslangValidator)
|
glslang_set_link_args(glslangValidator)
|
||||||
glslang_set_link_args(spirv-remap)
|
|
||||||
|
|
||||||
set(LIBRARIES
|
set(LIBRARIES
|
||||||
glslang
|
glslang
|
||||||
SPIRV
|
SPIRV
|
||||||
SPVRemapper
|
|
||||||
glslang-default-resource-limits)
|
glslang-default-resource-limits)
|
||||||
|
|
||||||
|
if(ENABLE_SPVREMAPPER)
|
||||||
|
set(LIBRARIES ${LIBRARIES} SPVRemapper)
|
||||||
|
endif()
|
||||||
|
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
set(LIBRARIES ${LIBRARIES} psapi)
|
set(LIBRARIES ${LIBRARIES} psapi)
|
||||||
elseif(UNIX)
|
elseif(UNIX)
|
||||||
|
|
@ -32,22 +32,36 @@ elseif(UNIX)
|
||||||
endif(WIN32)
|
endif(WIN32)
|
||||||
|
|
||||||
target_link_libraries(glslangValidator ${LIBRARIES})
|
target_link_libraries(glslangValidator ${LIBRARIES})
|
||||||
target_link_libraries(spirv-remap ${LIBRARIES})
|
target_include_directories(glslangValidator PUBLIC
|
||||||
target_include_directories(glslangValidator PUBLIC ../External)
|
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../External>
|
||||||
|
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/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})
|
||||||
|
endif()
|
||||||
|
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
source_group("Source" FILES ${SOURCES})
|
source_group("Source" FILES ${SOURCES})
|
||||||
endif(WIN32)
|
endif(WIN32)
|
||||||
|
|
||||||
if(ENABLE_GLSLANG_INSTALL)
|
if(ENABLE_GLSLANG_INSTALL)
|
||||||
install(TARGETS glslangValidator
|
install(TARGETS glslangValidator EXPORT glslangValidatorTargets
|
||||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||||
|
install(EXPORT glslangValidatorTargets DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake)
|
||||||
|
|
||||||
install(TARGETS spirv-remap
|
if(ENABLE_SPVREMAPPER)
|
||||||
|
install(TARGETS spirv-remap EXPORT spirv-remapTargets
|
||||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||||
|
install(EXPORT spirv-remapTargets DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake)
|
||||||
|
endif()
|
||||||
|
|
||||||
if(BUILD_SHARED_LIBS)
|
if(BUILD_SHARED_LIBS)
|
||||||
install(TARGETS glslang-default-resource-limits
|
install(TARGETS glslang-default-resource-limits EXPORT glslang-default-resource-limitsTargets
|
||||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||||
|
install(EXPORT glslang-default-resource-limitsTargets DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake)
|
||||||
endif()
|
endif()
|
||||||
endif(ENABLE_GLSLANG_INSTALL)
|
endif(ENABLE_GLSLANG_INSTALL)
|
||||||
|
|
|
||||||
|
|
@ -615,8 +615,12 @@ void ProcessArguments(std::vector<std::unique_ptr<glslang::TWorkItem>>& workItem
|
||||||
} else if (strcmp(argv[1], "spirv1.4") == 0) {
|
} else if (strcmp(argv[1], "spirv1.4") == 0) {
|
||||||
TargetLanguage = glslang::EShTargetSpv;
|
TargetLanguage = glslang::EShTargetSpv;
|
||||||
TargetVersion = glslang::EShTargetSpv_1_4;
|
TargetVersion = glslang::EShTargetSpv_1_4;
|
||||||
|
} else if (strcmp(argv[1], "spirv1.5") == 0) {
|
||||||
|
TargetLanguage = glslang::EShTargetSpv;
|
||||||
|
TargetVersion = glslang::EShTargetSpv_1_5;
|
||||||
} else
|
} else
|
||||||
Error("--target-env expected one of: vulkan1.0, vulkan1.1, opengl, spirv1.0, spirv1.1, spirv1.2, or spirv1.3");
|
Error("--target-env expected one of: vulkan1.0, vulkan1.1, opengl,\n"
|
||||||
|
"spirv1.0, spirv1.1, spirv1.2, spirv1.3, spirv1.4, or spirv1.5");
|
||||||
}
|
}
|
||||||
bumpArg();
|
bumpArg();
|
||||||
} else if (lowerword == "variable-name" || // synonyms
|
} else if (lowerword == "variable-name" || // synonyms
|
||||||
|
|
@ -984,7 +988,7 @@ void CompileAndLinkShaderUnits(std::vector<ShaderCompUnit> compUnits)
|
||||||
|
|
||||||
// Set base bindings
|
// Set base bindings
|
||||||
shader->setShiftBinding(res, baseBinding[res][compUnit.stage]);
|
shader->setShiftBinding(res, baseBinding[res][compUnit.stage]);
|
||||||
|
|
||||||
// Set bindings for particular resource sets
|
// Set bindings for particular resource sets
|
||||||
// TODO: use a range based for loop here, when available in all environments.
|
// TODO: use a range based for loop here, when available in all environments.
|
||||||
for (auto i = baseBindingForSet[res][compUnit.stage].begin();
|
for (auto i = baseBindingForSet[res][compUnit.stage].begin();
|
||||||
|
|
@ -1618,7 +1622,7 @@ void usage()
|
||||||
" --stdin read from stdin instead of from a file;\n"
|
" --stdin read from stdin instead of from a file;\n"
|
||||||
" requires providing the shader stage using -S\n"
|
" requires providing the shader stage using -S\n"
|
||||||
" --target-env {vulkan1.0 | vulkan1.1 | opengl | \n"
|
" --target-env {vulkan1.0 | vulkan1.1 | opengl | \n"
|
||||||
" spirv1.0 | spirv1.1 | spirv1.2 | spirv1.3}\n"
|
" spirv1.0 | spirv1.1 | spirv1.2 | spirv1.3 | spirv1.4 | spirv1.5}\n"
|
||||||
" set execution environment that emitted code\n"
|
" set execution environment that emitted code\n"
|
||||||
" will execute in (versus source language\n"
|
" will execute in (versus source language\n"
|
||||||
" semantics selected by --client) defaults:\n"
|
" semantics selected by --client) defaults:\n"
|
||||||
|
|
|
||||||
|
|
@ -219,6 +219,9 @@ int init1 = gl_FrontFacing ? 1 : 2; // ERROR, non-const initializer
|
||||||
|
|
||||||
int init2 = gl_FrontFacing ? 1 : 2;
|
int init2 = gl_FrontFacing ? 1 : 2;
|
||||||
|
|
||||||
|
#define A__B // error
|
||||||
|
int a__b; // error
|
||||||
|
|
||||||
#pragma STDGL invariant(all)
|
#pragma STDGL invariant(all)
|
||||||
|
|
||||||
#line 3000
|
#line 3000
|
||||||
|
|
|
||||||
|
|
@ -167,3 +167,12 @@ void qux2()
|
||||||
}
|
}
|
||||||
|
|
||||||
layout(early_fragment_tests) out; // ERROR
|
layout(early_fragment_tests) out; // ERROR
|
||||||
|
|
||||||
|
#extension GL_ARB_explicit_uniform_location : enable
|
||||||
|
|
||||||
|
layout(location = 3) uniform vec4 ucolor0; // ERROR: explicit attrib location is also required for version < 330
|
||||||
|
|
||||||
|
#extension GL_ARB_explicit_attrib_location : enable
|
||||||
|
|
||||||
|
layout(location = 4) uniform vec4 ucolor1;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -47,4 +47,5 @@ void barWxyz()
|
||||||
int primitiveID()
|
int primitiveID()
|
||||||
{
|
{
|
||||||
return gl_PrimitiveID;
|
return gl_PrimitiveID;
|
||||||
|
gl_PerFragment; // ERROR, block name can't get reused
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -149,4 +149,17 @@ void fooKeyMem()
|
||||||
KeyMem.precise;
|
KeyMem.precise;
|
||||||
}
|
}
|
||||||
|
|
||||||
layout(location=28, index=2) out vec4 outIndex2; // ERROR index out of range
|
layout(location=28, index=2) out vec4 outIndex2; // ERROR index out of range
|
||||||
|
|
||||||
|
layout(location=4) uniform vec4 ucolor0; // ERROR: extension is not enabled
|
||||||
|
|
||||||
|
#extension GL_ARB_explicit_uniform_location : enable
|
||||||
|
|
||||||
|
layout(location=5) uniform vec4 ucolor1;
|
||||||
|
|
||||||
|
layout(location=6) uniform ColorsBuffer // ERROR: location cannot be applied in uniform buffer block
|
||||||
|
{
|
||||||
|
vec4 colors[128];
|
||||||
|
} colorsBuffer;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -48,6 +48,9 @@ shared vec4 s;
|
||||||
layout(location = 2) shared vec4 sl; // ERROR
|
layout(location = 2) shared vec4 sl; // ERROR
|
||||||
shared float fs = 4.2; // ERROR
|
shared float fs = 4.2; // ERROR
|
||||||
|
|
||||||
|
layout(local_size_y = 1) in;
|
||||||
|
layout(local_size_y = 2) in; // ERROR, changing
|
||||||
|
layout(local_size_y = 1) in;
|
||||||
layout(local_size_x = 2, local_size_y = 3, local_size_z = 4) out; // ERROR
|
layout(local_size_x = 2, local_size_y = 3, local_size_z = 4) out; // ERROR
|
||||||
|
|
||||||
int arrX[gl_WorkGroupSize.x];
|
int arrX[gl_WorkGroupSize.x];
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
hlsl.aliasOpaque.frag
|
hlsl.aliasOpaque.frag
|
||||||
// Module Version 10000
|
// Module Version 10000
|
||||||
// Generated by (magic number): 80007
|
// Generated by (magic number): 80008
|
||||||
// Id's are bound by 87
|
// Id's are bound by 87
|
||||||
|
|
||||||
Capability Shader
|
Capability Shader
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
hlsl.flattenOpaque.frag
|
hlsl.flattenOpaque.frag
|
||||||
// Module Version 10000
|
// Module Version 10000
|
||||||
// Generated by (magic number): 80007
|
// Generated by (magic number): 80008
|
||||||
// Id's are bound by 185
|
// Id's are bound by 185
|
||||||
|
|
||||||
Capability Shader
|
Capability Shader
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
hlsl.flattenOpaqueInit.vert
|
hlsl.flattenOpaqueInit.vert
|
||||||
// Module Version 10000
|
// Module Version 10000
|
||||||
// Generated by (magic number): 80007
|
// Generated by (magic number): 80008
|
||||||
// Id's are bound by 134
|
// Id's are bound by 134
|
||||||
|
|
||||||
Capability Shader
|
Capability Shader
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
hlsl.flattenOpaqueInitMix.vert
|
hlsl.flattenOpaqueInitMix.vert
|
||||||
// Module Version 10000
|
// Module Version 10000
|
||||||
// Generated by (magic number): 80007
|
// Generated by (magic number): 80008
|
||||||
// Id's are bound by 97
|
// Id's are bound by 97
|
||||||
|
|
||||||
Capability Shader
|
Capability Shader
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
hlsl.flattenSubset.frag
|
hlsl.flattenSubset.frag
|
||||||
// Module Version 10000
|
// Module Version 10000
|
||||||
// Generated by (magic number): 80007
|
// Generated by (magic number): 80008
|
||||||
// Id's are bound by 66
|
// Id's are bound by 66
|
||||||
|
|
||||||
Capability Shader
|
Capability Shader
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
hlsl.flattenSubset2.frag
|
hlsl.flattenSubset2.frag
|
||||||
// Module Version 10000
|
// Module Version 10000
|
||||||
// Generated by (magic number): 80007
|
// Generated by (magic number): 80008
|
||||||
// Id's are bound by 53
|
// Id's are bound by 53
|
||||||
|
|
||||||
Capability Shader
|
Capability Shader
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
hlsl.partialFlattenLocal.vert
|
hlsl.partialFlattenLocal.vert
|
||||||
// Module Version 10000
|
// Module Version 10000
|
||||||
// Generated by (magic number): 80007
|
// Generated by (magic number): 80008
|
||||||
// Id's are bound by 158
|
// Id's are bound by 158
|
||||||
|
|
||||||
Capability Shader
|
Capability Shader
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
hlsl.partialFlattenMixed.vert
|
hlsl.partialFlattenMixed.vert
|
||||||
// Module Version 10000
|
// Module Version 10000
|
||||||
// Generated by (magic number): 80007
|
// Generated by (magic number): 80008
|
||||||
// Id's are bound by 36
|
// Id's are bound by 36
|
||||||
|
|
||||||
Capability Shader
|
Capability Shader
|
||||||
|
|
|
||||||
|
|
@ -83,9 +83,11 @@ ERROR: 0:193: '.length' : not supported for this version or the enabled extensio
|
||||||
ERROR: 0:194: '.' : cannot apply to an array: method
|
ERROR: 0:194: '.' : cannot apply to an array: method
|
||||||
ERROR: 0:194: 'a' : can't use function syntax on variable
|
ERROR: 0:194: 'a' : can't use function syntax on variable
|
||||||
ERROR: 0:214: 'non-constant global initializer (needs GL_EXT_shader_non_constant_global_initializers)' : not supported for this version or the enabled extensions
|
ERROR: 0:214: 'non-constant global initializer (needs GL_EXT_shader_non_constant_global_initializers)' : not supported for this version or the enabled extensions
|
||||||
|
ERROR: 0:222: '#define' : names containing consecutive underscores are reserved, and an error if version < 300: A__B
|
||||||
|
ERROR: 0:223: 'a__b' : identifiers containing consecutive underscores ("__") are reserved, and an error if version < 300
|
||||||
ERROR: 0:3000: '#error' : line of this error should be 3000
|
ERROR: 0:3000: '#error' : line of this error should be 3000
|
||||||
ERROR: 0:3002: '' : syntax error, unexpected IDENTIFIER, expecting LEFT_BRACE or COMMA or SEMICOLON
|
ERROR: 0:3002: '' : syntax error, unexpected IDENTIFIER, expecting LEFT_BRACE or COMMA or SEMICOLON
|
||||||
ERROR: 77 compilation errors. No code generated.
|
ERROR: 79 compilation errors. No code generated.
|
||||||
|
|
||||||
|
|
||||||
Shader version: 100
|
Shader version: 100
|
||||||
|
|
@ -421,6 +423,7 @@ ERROR: node is still EOpNull!
|
||||||
0:? 5.000000
|
0:? 5.000000
|
||||||
0:? 'init1' ( global mediump int)
|
0:? 'init1' ( global mediump int)
|
||||||
0:? 'init2' ( global mediump int)
|
0:? 'init2' ( global mediump int)
|
||||||
|
0:? 'a__b' ( global mediump int)
|
||||||
|
|
||||||
|
|
||||||
Linked fragment stage:
|
Linked fragment stage:
|
||||||
|
|
@ -573,4 +576,5 @@ ERROR: node is still EOpNull!
|
||||||
0:? 5.000000
|
0:? 5.000000
|
||||||
0:? 'init1' ( global mediump int)
|
0:? 'init1' ( global mediump int)
|
||||||
0:? 'init2' ( global mediump int)
|
0:? 'init2' ( global mediump int)
|
||||||
|
0:? 'a__b' ( global mediump int)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -29,10 +29,13 @@ ERROR: 0:153: 'early_fragment_tests' : not supported for this version or the ena
|
||||||
ERROR: 0:154: 'image load store' : not supported for this version or the enabled extensions
|
ERROR: 0:154: 'image load store' : not supported for this version or the enabled extensions
|
||||||
ERROR: 0:154: 'iimage2D' : Reserved word.
|
ERROR: 0:154: 'iimage2D' : Reserved word.
|
||||||
ERROR: 0:169: 'early_fragment_tests' : can only apply to 'in'
|
ERROR: 0:169: 'early_fragment_tests' : can only apply to 'in'
|
||||||
ERROR: 28 compilation errors. No code generated.
|
ERROR: 0:173: 'location qualifier on uniform or buffer' : not supported for this version or the enabled extensions
|
||||||
|
ERROR: 29 compilation errors. No code generated.
|
||||||
|
|
||||||
|
|
||||||
Shader version: 130
|
Shader version: 130
|
||||||
|
Requested GL_ARB_explicit_attrib_location
|
||||||
|
Requested GL_ARB_explicit_uniform_location
|
||||||
Requested GL_ARB_gpu_shader5
|
Requested GL_ARB_gpu_shader5
|
||||||
Requested GL_ARB_separate_shader_objects
|
Requested GL_ARB_separate_shader_objects
|
||||||
Requested GL_ARB_shader_image_load_store
|
Requested GL_ARB_shader_image_load_store
|
||||||
|
|
@ -402,12 +405,16 @@ ERROR: node is still EOpNull!
|
||||||
0:? 'gl_FogFragCoord' ( smooth in float)
|
0:? 'gl_FogFragCoord' ( smooth in float)
|
||||||
0:? 'iimg2Dbad' (layout( r32i) uniform iimage2D)
|
0:? 'iimg2Dbad' (layout( r32i) uniform iimage2D)
|
||||||
0:? 'iimg2D' (layout( r32i) uniform iimage2D)
|
0:? 'iimg2D' (layout( r32i) uniform iimage2D)
|
||||||
|
0:? 'ucolor0' (layout( location=3) uniform 4-component vector of float)
|
||||||
|
0:? 'ucolor1' (layout( location=4) uniform 4-component vector of float)
|
||||||
|
|
||||||
|
|
||||||
Linked fragment stage:
|
Linked fragment stage:
|
||||||
|
|
||||||
|
|
||||||
Shader version: 130
|
Shader version: 130
|
||||||
|
Requested GL_ARB_explicit_attrib_location
|
||||||
|
Requested GL_ARB_explicit_uniform_location
|
||||||
Requested GL_ARB_gpu_shader5
|
Requested GL_ARB_gpu_shader5
|
||||||
Requested GL_ARB_separate_shader_objects
|
Requested GL_ARB_separate_shader_objects
|
||||||
Requested GL_ARB_shader_image_load_store
|
Requested GL_ARB_shader_image_load_store
|
||||||
|
|
@ -457,4 +464,6 @@ ERROR: node is still EOpNull!
|
||||||
0:? 'gl_FogFragCoord' ( smooth in float)
|
0:? 'gl_FogFragCoord' ( smooth in float)
|
||||||
0:? 'iimg2Dbad' (layout( r32i) uniform iimage2D)
|
0:? 'iimg2Dbad' (layout( r32i) uniform iimage2D)
|
||||||
0:? 'iimg2D' (layout( r32i) uniform iimage2D)
|
0:? 'iimg2D' (layout( r32i) uniform iimage2D)
|
||||||
|
0:? 'ucolor0' (layout( location=3) uniform 4-component vector of float)
|
||||||
|
0:? 'ucolor1' (layout( location=4) uniform 4-component vector of float)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,9 @@ ERROR: 0:4: 'redeclaration' : cannot redeclare with different qualification: gl_
|
||||||
ERROR: 0:5: 'redeclaration' : cannot redeclare with different qualification: gl_FragCoord
|
ERROR: 0:5: 'redeclaration' : cannot redeclare with different qualification: gl_FragCoord
|
||||||
ERROR: 0:6: 'layout qualifier' : can only apply origin_upper_left and pixel_center_origin to gl_FragCoord
|
ERROR: 0:6: 'layout qualifier' : can only apply origin_upper_left and pixel_center_origin to gl_FragCoord
|
||||||
ERROR: 0:14: 'gl_FragCoord' : cannot redeclare after use
|
ERROR: 0:14: 'gl_FragCoord' : cannot redeclare after use
|
||||||
ERROR: 4 compilation errors. No code generated.
|
ERROR: 0:50: 'gl_PerFragment' : cannot be used (maybe an instance name is needed)
|
||||||
|
ERROR: 0:50: 'gl_PerFragment' : undeclared identifier
|
||||||
|
ERROR: 6 compilation errors. No code generated.
|
||||||
|
|
||||||
|
|
||||||
Shader version: 150
|
Shader version: 150
|
||||||
|
|
@ -106,6 +108,7 @@ ERROR: node is still EOpNull!
|
||||||
0:49 Sequence
|
0:49 Sequence
|
||||||
0:49 Branch: Return with expression
|
0:49 Branch: Return with expression
|
||||||
0:49 'gl_PrimitiveID' ( flat in int PrimitiveID)
|
0:49 'gl_PrimitiveID' ( flat in int PrimitiveID)
|
||||||
|
0:50 'gl_PerFragment' ( temp float)
|
||||||
0:? Linker Objects
|
0:? Linker Objects
|
||||||
0:? 'gl_FragCoord' ( gl_FragCoord 4-component vector of float FragCoord)
|
0:? 'gl_FragCoord' ( gl_FragCoord 4-component vector of float FragCoord)
|
||||||
0:? 'foo' ( smooth in 4-component vector of float)
|
0:? 'foo' ( smooth in 4-component vector of float)
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
300BuiltIns.frag
|
300BuiltIns.frag
|
||||||
ERROR: 0:6: 'float' : type requires declaration of default precision qualifier
|
ERROR: 0:6: 'float' : type requires declaration of default precision qualifier
|
||||||
ERROR: 0:70: 'noise2' : no matching overloaded function found
|
ERROR: 0:70: 'noise2' : no matching overloaded function found
|
||||||
ERROR: 0:72: 't__' : identifiers containing consecutive underscores ("__") are reserved, and an error if version <= 300
|
WARNING: 0:72: 't__' : identifiers containing consecutive underscores ("__") are reserved
|
||||||
ERROR: 0:75: '#define' : names containing consecutive underscores are reserved, and an error if version <= 300: __D
|
WARNING: 0:75: '#define' : names containing consecutive underscores are reserved: __D
|
||||||
ERROR: 4 compilation errors. No code generated.
|
ERROR: 2 compilation errors. No code generated.
|
||||||
|
|
||||||
|
|
||||||
Shader version: 300
|
Shader version: 300
|
||||||
|
|
|
||||||
|
|
@ -40,11 +40,14 @@ ERROR: 0:140: 'assign' : cannot convert from ' const float' to ' temp 2-compone
|
||||||
ERROR: 0:141: 'textureQueryLod' : no matching overloaded function found
|
ERROR: 0:141: 'textureQueryLod' : no matching overloaded function found
|
||||||
ERROR: 0:141: 'assign' : cannot convert from ' const float' to ' temp 2-component vector of float'
|
ERROR: 0:141: 'assign' : cannot convert from ' const float' to ' temp 2-component vector of float'
|
||||||
ERROR: 0:152: 'index' : value must be 0 or 1
|
ERROR: 0:152: 'index' : value must be 0 or 1
|
||||||
ERROR: 41 compilation errors. No code generated.
|
ERROR: 0:154: 'location qualifier on uniform or buffer' : not supported for this version or the enabled extensions
|
||||||
|
ERROR: 0:160: 'location' : cannot apply to uniform or buffer block
|
||||||
|
ERROR: 43 compilation errors. No code generated.
|
||||||
|
|
||||||
|
|
||||||
Shader version: 330
|
Shader version: 330
|
||||||
Requested GL_ARB_enhanced_layouts
|
Requested GL_ARB_enhanced_layouts
|
||||||
|
Requested GL_ARB_explicit_uniform_location
|
||||||
Requested GL_ARB_separate_shader_objects
|
Requested GL_ARB_separate_shader_objects
|
||||||
ERROR: node is still EOpNull!
|
ERROR: node is still EOpNull!
|
||||||
0:8 Function Definition: main( ( global void)
|
0:8 Function Definition: main( ( global void)
|
||||||
|
|
@ -126,6 +129,9 @@ ERROR: node is still EOpNull!
|
||||||
0:? 'precise' ( global int)
|
0:? 'precise' ( global int)
|
||||||
0:? 'KeyMem' ( global structure{ global int precise})
|
0:? 'KeyMem' ( global structure{ global int precise})
|
||||||
0:? 'outIndex2' (layout( location=28 index=0) out 4-component vector of float)
|
0:? 'outIndex2' (layout( location=28 index=0) out 4-component vector of float)
|
||||||
|
0:? 'ucolor0' (layout( location=4) uniform 4-component vector of float)
|
||||||
|
0:? 'ucolor1' (layout( location=5) uniform 4-component vector of float)
|
||||||
|
0:? 'colorsBuffer' (layout( location=6 column_major shared) uniform block{layout( column_major shared) uniform 128-element array of 4-component vector of float colors})
|
||||||
|
|
||||||
|
|
||||||
Linked fragment stage:
|
Linked fragment stage:
|
||||||
|
|
@ -135,6 +141,7 @@ ERROR: Linking fragment stage: Cannot use both gl_FragColor and gl_FragData
|
||||||
|
|
||||||
Shader version: 330
|
Shader version: 330
|
||||||
Requested GL_ARB_enhanced_layouts
|
Requested GL_ARB_enhanced_layouts
|
||||||
|
Requested GL_ARB_explicit_uniform_location
|
||||||
Requested GL_ARB_separate_shader_objects
|
Requested GL_ARB_separate_shader_objects
|
||||||
ERROR: node is still EOpNull!
|
ERROR: node is still EOpNull!
|
||||||
0:8 Function Definition: main( ( global void)
|
0:8 Function Definition: main( ( global void)
|
||||||
|
|
@ -191,4 +198,7 @@ ERROR: node is still EOpNull!
|
||||||
0:? 'precise' ( global int)
|
0:? 'precise' ( global int)
|
||||||
0:? 'KeyMem' ( global structure{ global int precise})
|
0:? 'KeyMem' ( global structure{ global int precise})
|
||||||
0:? 'outIndex2' (layout( location=28 index=0) out 4-component vector of float)
|
0:? 'outIndex2' (layout( location=28 index=0) out 4-component vector of float)
|
||||||
|
0:? 'ucolor0' (layout( location=4) uniform 4-component vector of float)
|
||||||
|
0:? 'ucolor1' (layout( location=5) uniform 4-component vector of float)
|
||||||
|
0:? 'colorsBuffer' (layout( location=6 column_major shared) uniform block{layout( column_major shared) uniform 128-element array of 4-component vector of float colors})
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,14 +8,15 @@ ERROR: 0:45: 'out' : global storage output qualifier cannot be used in a compute
|
||||||
ERROR: 0:48: 'shared' : cannot apply layout qualifiers to a shared variable
|
ERROR: 0:48: 'shared' : cannot apply layout qualifiers to a shared variable
|
||||||
ERROR: 0:48: 'location' : can only apply to uniform, buffer, in, or out storage qualifiers
|
ERROR: 0:48: 'location' : can only apply to uniform, buffer, in, or out storage qualifiers
|
||||||
ERROR: 0:49: 'shared' : cannot initialize this type of qualifier
|
ERROR: 0:49: 'shared' : cannot initialize this type of qualifier
|
||||||
ERROR: 0:51: 'local_size' : can only apply to 'in'
|
ERROR: 0:52: 'local_size' : cannot change previously set size
|
||||||
ERROR: 0:51: 'local_size' : can only apply to 'in'
|
ERROR: 0:54: 'local_size' : can only apply to 'in'
|
||||||
ERROR: 0:51: 'local_size' : can only apply to 'in'
|
ERROR: 0:54: 'local_size' : can only apply to 'in'
|
||||||
ERROR: 0:65: 'assign' : l-value required "ro" (can't modify a readonly buffer)
|
ERROR: 0:54: 'local_size' : can only apply to 'in'
|
||||||
ERROR: 0:77: '=' : cannot convert from ' temp double' to ' temp int'
|
ERROR: 0:68: 'assign' : l-value required "ro" (can't modify a readonly buffer)
|
||||||
ERROR: 0:81: 'input block' : not supported in this stage: compute
|
ERROR: 0:80: '=' : cannot convert from ' temp double' to ' temp int'
|
||||||
ERROR: 0:85: 'output block' : not supported in this stage: compute
|
ERROR: 0:84: 'input block' : not supported in this stage: compute
|
||||||
ERROR: 16 compilation errors. No code generated.
|
ERROR: 0:88: 'output block' : not supported in this stage: compute
|
||||||
|
ERROR: 17 compilation errors. No code generated.
|
||||||
|
|
||||||
|
|
||||||
Shader version: 430
|
Shader version: 430
|
||||||
|
|
@ -51,77 +52,77 @@ ERROR: node is still EOpNull!
|
||||||
0:39 10 (const int)
|
0:39 10 (const int)
|
||||||
0:39 true case
|
0:39 true case
|
||||||
0:40 Barrier ( global void)
|
0:40 Barrier ( global void)
|
||||||
0:63 Function Definition: foo( ( global void)
|
0:66 Function Definition: foo( ( global void)
|
||||||
0:63 Function Parameters:
|
0:66 Function Parameters:
|
||||||
0:65 Sequence
|
0:68 Sequence
|
||||||
0:65 move second child to first child ( temp float)
|
0:68 move second child to first child ( temp float)
|
||||||
0:65 direct index (layout( column_major shared) readonly temp float)
|
0:68 direct index (layout( column_major shared) readonly temp float)
|
||||||
0:65 values: direct index for structure (layout( column_major shared) readonly buffer unsized 3-element array of float)
|
0:68 values: direct index for structure (layout( column_major shared) readonly buffer unsized 3-element array of float)
|
||||||
0:65 'ro' (layout( column_major shared) readonly buffer block{layout( column_major shared) readonly buffer int value, layout( column_major shared) readonly buffer unsized 3-element array of float values})
|
0:68 'ro' (layout( column_major shared) readonly buffer block{layout( column_major shared) readonly buffer int value, layout( column_major shared) readonly buffer unsized 3-element array of float values})
|
||||||
0:65 Constant:
|
0:68 Constant:
|
||||||
0:65 1 (const int)
|
0:68 1 (const int)
|
||||||
0:65 Constant:
|
0:68 Constant:
|
||||||
0:65 2 (const int)
|
0:68 2 (const int)
|
||||||
0:65 Constant:
|
0:68 Constant:
|
||||||
0:65 4.700000
|
0:68 4.700000
|
||||||
0:66 array length ( temp int)
|
0:69 array length ( temp int)
|
||||||
0:66 values: direct index for structure (layout( column_major shared) readonly buffer unsized 3-element array of float)
|
0:69 values: direct index for structure (layout( column_major shared) readonly buffer unsized 3-element array of float)
|
||||||
0:66 'ro' (layout( column_major shared) readonly buffer block{layout( column_major shared) readonly buffer int value, layout( column_major shared) readonly buffer unsized 3-element array of float values})
|
0:69 'ro' (layout( column_major shared) readonly buffer block{layout( column_major shared) readonly buffer int value, layout( column_major shared) readonly buffer unsized 3-element array of float values})
|
||||||
0:66 Constant:
|
0:69 Constant:
|
||||||
0:66 1 (const int)
|
0:69 1 (const int)
|
||||||
0:67 Barrier ( global void)
|
0:70 Barrier ( global void)
|
||||||
0:72 Function Definition: fooaoeu( ( global void)
|
0:75 Function Definition: fooaoeu( ( global void)
|
||||||
0:72 Function Parameters:
|
0:75 Function Parameters:
|
||||||
0:73 Sequence
|
0:76 Sequence
|
||||||
0:73 Sequence
|
|
||||||
0:73 move second child to first child ( temp 2-component vector of int)
|
|
||||||
0:73 'storePos' ( temp 2-component vector of int)
|
|
||||||
0:73 Convert uint to int ( temp 2-component vector of int)
|
|
||||||
0:73 vector swizzle ( temp 2-component vector of uint)
|
|
||||||
0:73 'gl_GlobalInvocationID' ( in 3-component vector of uint GlobalInvocationID)
|
|
||||||
0:73 Sequence
|
|
||||||
0:73 Constant:
|
|
||||||
0:73 0 (const int)
|
|
||||||
0:73 Constant:
|
|
||||||
0:73 1 (const int)
|
|
||||||
0:74 Sequence
|
|
||||||
0:74 move second child to first child ( temp double)
|
|
||||||
0:74 'localCoef' ( temp double)
|
|
||||||
0:74 Convert float to double ( temp double)
|
|
||||||
0:74 length ( global float)
|
|
||||||
0:74 divide ( temp 2-component vector of float)
|
|
||||||
0:74 Convert int to float ( temp 2-component vector of float)
|
|
||||||
0:74 subtract ( temp 2-component vector of int)
|
|
||||||
0:74 Convert uint to int ( temp 2-component vector of int)
|
|
||||||
0:74 vector swizzle ( temp 2-component vector of uint)
|
|
||||||
0:74 'gl_LocalInvocationID' ( in 3-component vector of uint LocalInvocationID)
|
|
||||||
0:74 Sequence
|
|
||||||
0:74 Constant:
|
|
||||||
0:74 0 (const int)
|
|
||||||
0:74 Constant:
|
|
||||||
0:74 1 (const int)
|
|
||||||
0:74 Constant:
|
|
||||||
0:74 8 (const int)
|
|
||||||
0:74 Constant:
|
|
||||||
0:74 8.000000
|
|
||||||
0:75 Sequence
|
|
||||||
0:75 move second child to first child ( temp 4-component vector of double)
|
|
||||||
0:75 'aa' ( temp 4-component vector of double)
|
|
||||||
0:75 Constant:
|
|
||||||
0:75 0.400000
|
|
||||||
0:75 0.200000
|
|
||||||
0:75 0.300000
|
|
||||||
0:75 0.400000
|
|
||||||
0:76 Sequence
|
0:76 Sequence
|
||||||
0:76 move second child to first child ( temp double)
|
0:76 move second child to first child ( temp 2-component vector of int)
|
||||||
0:76 'globalCoef' ( temp double)
|
0:76 'storePos' ( temp 2-component vector of int)
|
||||||
0:76 Constant:
|
0:76 Convert uint to int ( temp 2-component vector of int)
|
||||||
0:76 1.000000
|
0:76 vector swizzle ( temp 2-component vector of uint)
|
||||||
|
0:76 'gl_GlobalInvocationID' ( in 3-component vector of uint GlobalInvocationID)
|
||||||
|
0:76 Sequence
|
||||||
|
0:76 Constant:
|
||||||
|
0:76 0 (const int)
|
||||||
|
0:76 Constant:
|
||||||
|
0:76 1 (const int)
|
||||||
|
0:77 Sequence
|
||||||
|
0:77 move second child to first child ( temp double)
|
||||||
|
0:77 'localCoef' ( temp double)
|
||||||
|
0:77 Convert float to double ( temp double)
|
||||||
|
0:77 length ( global float)
|
||||||
|
0:77 divide ( temp 2-component vector of float)
|
||||||
|
0:77 Convert int to float ( temp 2-component vector of float)
|
||||||
|
0:77 subtract ( temp 2-component vector of int)
|
||||||
|
0:77 Convert uint to int ( temp 2-component vector of int)
|
||||||
|
0:77 vector swizzle ( temp 2-component vector of uint)
|
||||||
|
0:77 'gl_LocalInvocationID' ( in 3-component vector of uint LocalInvocationID)
|
||||||
|
0:77 Sequence
|
||||||
|
0:77 Constant:
|
||||||
|
0:77 0 (const int)
|
||||||
|
0:77 Constant:
|
||||||
|
0:77 1 (const int)
|
||||||
|
0:77 Constant:
|
||||||
|
0:77 8 (const int)
|
||||||
|
0:77 Constant:
|
||||||
|
0:77 8.000000
|
||||||
0:78 Sequence
|
0:78 Sequence
|
||||||
0:78 move second child to first child ( temp double)
|
0:78 move second child to first child ( temp 4-component vector of double)
|
||||||
0:78 'di' ( temp double)
|
0:78 'aa' ( temp 4-component vector of double)
|
||||||
0:78 Convert int to double ( temp double)
|
0:78 Constant:
|
||||||
0:78 'i' ( temp int)
|
0:78 0.400000
|
||||||
|
0:78 0.200000
|
||||||
|
0:78 0.300000
|
||||||
|
0:78 0.400000
|
||||||
|
0:79 Sequence
|
||||||
|
0:79 move second child to first child ( temp double)
|
||||||
|
0:79 'globalCoef' ( temp double)
|
||||||
|
0:79 Constant:
|
||||||
|
0:79 1.000000
|
||||||
|
0:81 Sequence
|
||||||
|
0:81 move second child to first child ( temp double)
|
||||||
|
0:81 'di' ( temp double)
|
||||||
|
0:81 Convert int to double ( temp double)
|
||||||
|
0:81 'i' ( temp int)
|
||||||
0:? Linker Objects
|
0:? Linker Objects
|
||||||
0:? 'gl_WorkGroupSize' ( const 3-component vector of uint WorkGroupSize)
|
0:? 'gl_WorkGroupSize' ( const 3-component vector of uint WorkGroupSize)
|
||||||
0:? 2 (const uint)
|
0:? 2 (const uint)
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
compoundsuffix.frag.hlsl
|
compoundsuffix.frag.hlsl
|
||||||
// Module Version 10000
|
// Module Version 10000
|
||||||
// Generated by (magic number): 80007
|
// Generated by (magic number): 80008
|
||||||
// Id's are bound by 22
|
// Id's are bound by 22
|
||||||
|
|
||||||
Capability Shader
|
Capability Shader
|
||||||
|
|
|
||||||
|
|
@ -85,11 +85,13 @@ ERROR: 0:95: 'subgroupPartitionedExclusiveMaxNV' : required extension not reques
|
||||||
ERROR: 0:96: 'subgroupPartitionedExclusiveAndNV' : required extension not requested: GL_NV_shader_subgroup_partitioned
|
ERROR: 0:96: 'subgroupPartitionedExclusiveAndNV' : required extension not requested: GL_NV_shader_subgroup_partitioned
|
||||||
ERROR: 0:97: 'subgroupPartitionedExclusiveOrNV' : required extension not requested: GL_NV_shader_subgroup_partitioned
|
ERROR: 0:97: 'subgroupPartitionedExclusiveOrNV' : required extension not requested: GL_NV_shader_subgroup_partitioned
|
||||||
ERROR: 0:98: 'subgroupPartitionedExclusiveXorNV' : required extension not requested: GL_NV_shader_subgroup_partitioned
|
ERROR: 0:98: 'subgroupPartitionedExclusiveXorNV' : required extension not requested: GL_NV_shader_subgroup_partitioned
|
||||||
ERROR: 0:232: 'gl_WarpsPerSMNV' : required extension not requested: GL_NV_shader_sm_builtins
|
ERROR: 0:124: 'id' : argument must be compile-time constant
|
||||||
ERROR: 0:233: 'gl_SMCountNV' : required extension not requested: GL_NV_shader_sm_builtins
|
ERROR: 0:199: 'id' : argument must be compile-time constant
|
||||||
ERROR: 0:234: 'gl_WarpIDNV' : required extension not requested: GL_NV_shader_sm_builtins
|
ERROR: 0:236: 'gl_WarpsPerSMNV' : required extension not requested: GL_NV_shader_sm_builtins
|
||||||
ERROR: 0:235: 'gl_SMIDNV' : required extension not requested: GL_NV_shader_sm_builtins
|
ERROR: 0:237: 'gl_SMCountNV' : required extension not requested: GL_NV_shader_sm_builtins
|
||||||
ERROR: 90 compilation errors. No code generated.
|
ERROR: 0:238: 'gl_WarpIDNV' : required extension not requested: GL_NV_shader_sm_builtins
|
||||||
|
ERROR: 0:239: 'gl_SMIDNV' : required extension not requested: GL_NV_shader_sm_builtins
|
||||||
|
ERROR: 92 compilation errors. No code generated.
|
||||||
|
|
||||||
|
|
||||||
Shader version: 450
|
Shader version: 450
|
||||||
|
|
@ -352,270 +354,278 @@ ERROR: node is still EOpNull!
|
||||||
0:116 Function Definition: ballot_works(vf4; ( global void)
|
0:116 Function Definition: ballot_works(vf4; ( global void)
|
||||||
0:116 Function Parameters:
|
0:116 Function Parameters:
|
||||||
0:116 'f4' ( in 4-component vector of float)
|
0:116 'f4' ( in 4-component vector of float)
|
||||||
0:117 Sequence
|
0:? Sequence
|
||||||
0:117 'gl_SubgroupEqMask' ( flat in 4-component vector of uint SubgroupEqMask)
|
0:118 'gl_SubgroupEqMask' ( flat in 4-component vector of uint SubgroupEqMask)
|
||||||
0:118 'gl_SubgroupGeMask' ( flat in 4-component vector of uint SubgroupGeMask)
|
0:119 'gl_SubgroupGeMask' ( flat in 4-component vector of uint SubgroupGeMask)
|
||||||
0:119 'gl_SubgroupGtMask' ( flat in 4-component vector of uint SubgroupGtMask)
|
0:120 'gl_SubgroupGtMask' ( flat in 4-component vector of uint SubgroupGtMask)
|
||||||
0:120 'gl_SubgroupLeMask' ( flat in 4-component vector of uint SubgroupLeMask)
|
0:121 'gl_SubgroupLeMask' ( flat in 4-component vector of uint SubgroupLeMask)
|
||||||
0:121 'gl_SubgroupLtMask' ( flat in 4-component vector of uint SubgroupLtMask)
|
0:122 'gl_SubgroupLtMask' ( flat in 4-component vector of uint SubgroupLtMask)
|
||||||
0:122 subgroupBroadcast ( global 4-component vector of float)
|
0:123 subgroupBroadcast ( global 4-component vector of float)
|
||||||
0:122 'f4' ( in 4-component vector of float)
|
|
||||||
0:122 Constant:
|
|
||||||
0:122 0 (const uint)
|
|
||||||
0:123 subgroupBroadcastFirst ( global 4-component vector of float)
|
|
||||||
0:123 'f4' ( in 4-component vector of float)
|
0:123 'f4' ( in 4-component vector of float)
|
||||||
0:124 Sequence
|
0:123 Constant:
|
||||||
0:124 move second child to first child ( temp 4-component vector of uint)
|
0:123 0 (const uint)
|
||||||
0:124 'ballot' ( temp 4-component vector of uint)
|
0:124 subgroupBroadcast ( global 4-component vector of float)
|
||||||
0:124 subgroupBallot ( global 4-component vector of uint)
|
0:124 'f4' ( in 4-component vector of float)
|
||||||
0:124 Constant:
|
0:124 Convert int to uint ( temp uint)
|
||||||
0:124 false (const bool)
|
0:124 'i' ( temp int)
|
||||||
0:125 subgroupInverseBallot ( global bool)
|
0:125 subgroupBroadcastFirst ( global 4-component vector of float)
|
||||||
0:125 Constant:
|
0:125 'f4' ( in 4-component vector of float)
|
||||||
0:125 1 (const uint)
|
0:126 Sequence
|
||||||
0:125 1 (const uint)
|
0:126 move second child to first child ( temp 4-component vector of uint)
|
||||||
0:125 1 (const uint)
|
0:126 'ballot' ( temp 4-component vector of uint)
|
||||||
0:125 1 (const uint)
|
0:126 subgroupBallot ( global 4-component vector of uint)
|
||||||
0:126 subgroupBallotBitExtract ( global bool)
|
0:126 Constant:
|
||||||
0:126 'ballot' ( temp 4-component vector of uint)
|
0:126 false (const bool)
|
||||||
0:126 Constant:
|
0:127 subgroupInverseBallot ( global bool)
|
||||||
0:126 0 (const uint)
|
0:127 Constant:
|
||||||
0:127 subgroupBallotBitCount ( global uint)
|
0:127 1 (const uint)
|
||||||
0:127 'ballot' ( temp 4-component vector of uint)
|
0:127 1 (const uint)
|
||||||
0:128 subgroupBallotInclusiveBitCount ( global uint)
|
0:127 1 (const uint)
|
||||||
|
0:127 1 (const uint)
|
||||||
|
0:128 subgroupBallotBitExtract ( global bool)
|
||||||
0:128 'ballot' ( temp 4-component vector of uint)
|
0:128 'ballot' ( temp 4-component vector of uint)
|
||||||
0:129 subgroupBallotExclusiveBitCount ( global uint)
|
0:128 Constant:
|
||||||
|
0:128 0 (const uint)
|
||||||
|
0:129 subgroupBallotBitCount ( global uint)
|
||||||
0:129 'ballot' ( temp 4-component vector of uint)
|
0:129 'ballot' ( temp 4-component vector of uint)
|
||||||
0:130 subgroupBallotFindLSB ( global uint)
|
0:130 subgroupBallotInclusiveBitCount ( global uint)
|
||||||
0:130 'ballot' ( temp 4-component vector of uint)
|
0:130 'ballot' ( temp 4-component vector of uint)
|
||||||
0:131 subgroupBallotFindMSB ( global uint)
|
0:131 subgroupBallotExclusiveBitCount ( global uint)
|
||||||
0:131 'ballot' ( temp 4-component vector of uint)
|
0:131 'ballot' ( temp 4-component vector of uint)
|
||||||
0:135 Function Definition: vote_works(vf4; ( global void)
|
0:132 subgroupBallotFindLSB ( global uint)
|
||||||
0:135 Function Parameters:
|
0:132 'ballot' ( temp 4-component vector of uint)
|
||||||
0:135 'f4' ( in 4-component vector of float)
|
0:133 subgroupBallotFindMSB ( global uint)
|
||||||
0:137 Sequence
|
0:133 'ballot' ( temp 4-component vector of uint)
|
||||||
0:137 subgroupAll ( global bool)
|
0:137 Function Definition: vote_works(vf4; ( global void)
|
||||||
0:137 Constant:
|
0:137 Function Parameters:
|
||||||
0:137 true (const bool)
|
0:137 'f4' ( in 4-component vector of float)
|
||||||
0:138 subgroupAny ( global bool)
|
0:139 Sequence
|
||||||
0:138 Constant:
|
0:139 subgroupAll ( global bool)
|
||||||
0:138 false (const bool)
|
0:139 Constant:
|
||||||
0:139 subgroupAllEqual ( global bool)
|
0:139 true (const bool)
|
||||||
0:139 'f4' ( in 4-component vector of float)
|
0:140 subgroupAny ( global bool)
|
||||||
0:144 Function Definition: shuffle_works(vf4; ( global void)
|
0:140 Constant:
|
||||||
0:144 Function Parameters:
|
0:140 false (const bool)
|
||||||
0:144 'f4' ( in 4-component vector of float)
|
0:141 subgroupAllEqual ( global bool)
|
||||||
0:146 Sequence
|
0:141 'f4' ( in 4-component vector of float)
|
||||||
0:146 subgroupShuffle ( global 4-component vector of float)
|
0:146 Function Definition: shuffle_works(vf4; ( global void)
|
||||||
0:146 'f4' ( in 4-component vector of float)
|
0:146 Function Parameters:
|
||||||
0:146 Constant:
|
0:146 'f4' ( in 4-component vector of float)
|
||||||
0:146 0 (const uint)
|
0:148 Sequence
|
||||||
0:147 subgroupShuffleXor ( global 4-component vector of float)
|
0:148 subgroupShuffle ( global 4-component vector of float)
|
||||||
0:147 'f4' ( in 4-component vector of float)
|
|
||||||
0:147 Constant:
|
|
||||||
0:147 1 (const uint)
|
|
||||||
0:148 subgroupShuffleUp ( global 4-component vector of float)
|
|
||||||
0:148 'f4' ( in 4-component vector of float)
|
0:148 'f4' ( in 4-component vector of float)
|
||||||
0:148 Constant:
|
0:148 Constant:
|
||||||
0:148 1 (const uint)
|
0:148 0 (const uint)
|
||||||
0:149 subgroupShuffleDown ( global 4-component vector of float)
|
0:149 subgroupShuffleXor ( global 4-component vector of float)
|
||||||
0:149 'f4' ( in 4-component vector of float)
|
0:149 'f4' ( in 4-component vector of float)
|
||||||
0:149 Constant:
|
0:149 Constant:
|
||||||
0:149 1 (const uint)
|
0:149 1 (const uint)
|
||||||
0:153 Function Definition: arith_works(vf4; ( global void)
|
0:150 subgroupShuffleUp ( global 4-component vector of float)
|
||||||
0:153 Function Parameters:
|
0:150 'f4' ( in 4-component vector of float)
|
||||||
0:153 'f4' ( in 4-component vector of float)
|
0:150 Constant:
|
||||||
|
0:150 1 (const uint)
|
||||||
|
0:151 subgroupShuffleDown ( global 4-component vector of float)
|
||||||
|
0:151 'f4' ( in 4-component vector of float)
|
||||||
|
0:151 Constant:
|
||||||
|
0:151 1 (const uint)
|
||||||
|
0:155 Function Definition: arith_works(vf4; ( global void)
|
||||||
|
0:155 Function Parameters:
|
||||||
|
0:155 'f4' ( in 4-component vector of float)
|
||||||
0:? Sequence
|
0:? Sequence
|
||||||
0:156 subgroupAdd ( global 4-component vector of float)
|
0:158 subgroupAdd ( global 4-component vector of float)
|
||||||
0:156 'f4' ( in 4-component vector of float)
|
|
||||||
0:157 subgroupMul ( global 4-component vector of float)
|
|
||||||
0:157 'f4' ( in 4-component vector of float)
|
|
||||||
0:158 subgroupMin ( global 4-component vector of float)
|
|
||||||
0:158 'f4' ( in 4-component vector of float)
|
0:158 'f4' ( in 4-component vector of float)
|
||||||
0:159 subgroupMax ( global 4-component vector of float)
|
0:159 subgroupMul ( global 4-component vector of float)
|
||||||
0:159 'f4' ( in 4-component vector of float)
|
0:159 'f4' ( in 4-component vector of float)
|
||||||
0:160 subgroupAnd ( global 4-component vector of uint)
|
0:160 subgroupMin ( global 4-component vector of float)
|
||||||
0:160 'ballot' ( temp 4-component vector of uint)
|
0:160 'f4' ( in 4-component vector of float)
|
||||||
0:161 subgroupOr ( global 4-component vector of uint)
|
0:161 subgroupMax ( global 4-component vector of float)
|
||||||
0:161 'ballot' ( temp 4-component vector of uint)
|
0:161 'f4' ( in 4-component vector of float)
|
||||||
0:162 subgroupXor ( global 4-component vector of uint)
|
0:162 subgroupAnd ( global 4-component vector of uint)
|
||||||
0:162 'ballot' ( temp 4-component vector of uint)
|
0:162 'ballot' ( temp 4-component vector of uint)
|
||||||
0:163 subgroupInclusiveAdd ( global 4-component vector of float)
|
0:163 subgroupOr ( global 4-component vector of uint)
|
||||||
0:163 'f4' ( in 4-component vector of float)
|
0:163 'ballot' ( temp 4-component vector of uint)
|
||||||
0:164 subgroupInclusiveMul ( global 4-component vector of float)
|
0:164 subgroupXor ( global 4-component vector of uint)
|
||||||
0:164 'f4' ( in 4-component vector of float)
|
0:164 'ballot' ( temp 4-component vector of uint)
|
||||||
0:165 subgroupInclusiveMin ( global 4-component vector of float)
|
0:165 subgroupInclusiveAdd ( global 4-component vector of float)
|
||||||
0:165 'f4' ( in 4-component vector of float)
|
0:165 'f4' ( in 4-component vector of float)
|
||||||
0:166 subgroupInclusiveMax ( global 4-component vector of float)
|
0:166 subgroupInclusiveMul ( global 4-component vector of float)
|
||||||
0:166 'f4' ( in 4-component vector of float)
|
0:166 'f4' ( in 4-component vector of float)
|
||||||
0:167 subgroupInclusiveAnd ( global 4-component vector of uint)
|
0:167 subgroupInclusiveMin ( global 4-component vector of float)
|
||||||
0:167 'ballot' ( temp 4-component vector of uint)
|
0:167 'f4' ( in 4-component vector of float)
|
||||||
0:168 subgroupInclusiveOr ( global 4-component vector of uint)
|
0:168 subgroupInclusiveMax ( global 4-component vector of float)
|
||||||
0:168 'ballot' ( temp 4-component vector of uint)
|
0:168 'f4' ( in 4-component vector of float)
|
||||||
0:169 subgroupInclusiveXor ( global 4-component vector of uint)
|
0:169 subgroupInclusiveAnd ( global 4-component vector of uint)
|
||||||
0:169 'ballot' ( temp 4-component vector of uint)
|
0:169 'ballot' ( temp 4-component vector of uint)
|
||||||
0:170 subgroupExclusiveAdd ( global 4-component vector of float)
|
0:170 subgroupInclusiveOr ( global 4-component vector of uint)
|
||||||
0:170 'f4' ( in 4-component vector of float)
|
0:170 'ballot' ( temp 4-component vector of uint)
|
||||||
0:171 subgroupExclusiveMul ( global 4-component vector of float)
|
0:171 subgroupInclusiveXor ( global 4-component vector of uint)
|
||||||
0:171 'f4' ( in 4-component vector of float)
|
0:171 'ballot' ( temp 4-component vector of uint)
|
||||||
0:172 subgroupExclusiveMin ( global 4-component vector of float)
|
0:172 subgroupExclusiveAdd ( global 4-component vector of float)
|
||||||
0:172 'f4' ( in 4-component vector of float)
|
0:172 'f4' ( in 4-component vector of float)
|
||||||
0:173 subgroupExclusiveMax ( global 4-component vector of float)
|
0:173 subgroupExclusiveMul ( global 4-component vector of float)
|
||||||
0:173 'f4' ( in 4-component vector of float)
|
0:173 'f4' ( in 4-component vector of float)
|
||||||
0:174 subgroupExclusiveAnd ( global 4-component vector of uint)
|
0:174 subgroupExclusiveMin ( global 4-component vector of float)
|
||||||
0:174 'ballot' ( temp 4-component vector of uint)
|
0:174 'f4' ( in 4-component vector of float)
|
||||||
0:175 subgroupExclusiveOr ( global 4-component vector of uint)
|
0:175 subgroupExclusiveMax ( global 4-component vector of float)
|
||||||
0:175 'ballot' ( temp 4-component vector of uint)
|
0:175 'f4' ( in 4-component vector of float)
|
||||||
0:176 subgroupExclusiveXor ( global 4-component vector of uint)
|
0:176 subgroupExclusiveAnd ( global 4-component vector of uint)
|
||||||
0:176 'ballot' ( temp 4-component vector of uint)
|
0:176 'ballot' ( temp 4-component vector of uint)
|
||||||
0:180 Function Definition: clustered_works(vf4; ( global void)
|
0:177 subgroupExclusiveOr ( global 4-component vector of uint)
|
||||||
0:180 Function Parameters:
|
0:177 'ballot' ( temp 4-component vector of uint)
|
||||||
0:180 'f4' ( in 4-component vector of float)
|
0:178 subgroupExclusiveXor ( global 4-component vector of uint)
|
||||||
0:182 Sequence
|
0:178 'ballot' ( temp 4-component vector of uint)
|
||||||
0:182 Sequence
|
0:182 Function Definition: clustered_works(vf4; ( global void)
|
||||||
0:182 move second child to first child ( temp 4-component vector of uint)
|
0:182 Function Parameters:
|
||||||
0:182 'ballot' ( temp 4-component vector of uint)
|
0:182 'f4' ( in 4-component vector of float)
|
||||||
0:182 Constant:
|
0:184 Sequence
|
||||||
0:182 85 (const uint)
|
0:184 Sequence
|
||||||
0:182 0 (const uint)
|
0:184 move second child to first child ( temp 4-component vector of uint)
|
||||||
0:182 0 (const uint)
|
0:184 'ballot' ( temp 4-component vector of uint)
|
||||||
0:182 0 (const uint)
|
0:184 Constant:
|
||||||
0:183 subgroupClusteredAdd ( global 4-component vector of float)
|
0:184 85 (const uint)
|
||||||
0:183 'f4' ( in 4-component vector of float)
|
0:184 0 (const uint)
|
||||||
0:183 Constant:
|
0:184 0 (const uint)
|
||||||
0:183 2 (const uint)
|
0:184 0 (const uint)
|
||||||
0:184 subgroupClusteredMul ( global 4-component vector of float)
|
0:185 subgroupClusteredAdd ( global 4-component vector of float)
|
||||||
0:184 'f4' ( in 4-component vector of float)
|
|
||||||
0:184 Constant:
|
|
||||||
0:184 2 (const uint)
|
|
||||||
0:185 subgroupClusteredMin ( global 4-component vector of float)
|
|
||||||
0:185 'f4' ( in 4-component vector of float)
|
0:185 'f4' ( in 4-component vector of float)
|
||||||
0:185 Constant:
|
0:185 Constant:
|
||||||
0:185 2 (const uint)
|
0:185 2 (const uint)
|
||||||
0:186 subgroupClusteredMax ( global 4-component vector of float)
|
0:186 subgroupClusteredMul ( global 4-component vector of float)
|
||||||
0:186 'f4' ( in 4-component vector of float)
|
0:186 'f4' ( in 4-component vector of float)
|
||||||
0:186 Constant:
|
0:186 Constant:
|
||||||
0:186 2 (const uint)
|
0:186 2 (const uint)
|
||||||
0:187 subgroupClusteredAnd ( global 4-component vector of uint)
|
0:187 subgroupClusteredMin ( global 4-component vector of float)
|
||||||
0:187 'ballot' ( temp 4-component vector of uint)
|
0:187 'f4' ( in 4-component vector of float)
|
||||||
0:187 Constant:
|
0:187 Constant:
|
||||||
0:187 2 (const uint)
|
0:187 2 (const uint)
|
||||||
0:188 subgroupClusteredOr ( global 4-component vector of uint)
|
0:188 subgroupClusteredMax ( global 4-component vector of float)
|
||||||
0:188 'ballot' ( temp 4-component vector of uint)
|
0:188 'f4' ( in 4-component vector of float)
|
||||||
0:188 Constant:
|
0:188 Constant:
|
||||||
0:188 2 (const uint)
|
0:188 2 (const uint)
|
||||||
0:189 subgroupClusteredXor ( global 4-component vector of uint)
|
0:189 subgroupClusteredAnd ( global 4-component vector of uint)
|
||||||
0:189 'ballot' ( temp 4-component vector of uint)
|
0:189 'ballot' ( temp 4-component vector of uint)
|
||||||
0:189 Constant:
|
0:189 Constant:
|
||||||
0:189 2 (const uint)
|
0:189 2 (const uint)
|
||||||
0:193 Function Definition: quad_works(vf4; ( global void)
|
0:190 subgroupClusteredOr ( global 4-component vector of uint)
|
||||||
0:193 Function Parameters:
|
0:190 'ballot' ( temp 4-component vector of uint)
|
||||||
0:193 'f4' ( in 4-component vector of float)
|
0:190 Constant:
|
||||||
0:195 Sequence
|
0:190 2 (const uint)
|
||||||
0:195 subgroupQuadBroadcast ( global 4-component vector of float)
|
0:191 subgroupClusteredXor ( global 4-component vector of uint)
|
||||||
0:195 'f4' ( in 4-component vector of float)
|
0:191 'ballot' ( temp 4-component vector of uint)
|
||||||
0:195 Constant:
|
0:191 Constant:
|
||||||
0:195 0 (const uint)
|
0:191 2 (const uint)
|
||||||
0:196 subgroupQuadSwapHorizontal ( global 4-component vector of float)
|
0:195 Function Definition: quad_works(vf4; ( global void)
|
||||||
0:196 'f4' ( in 4-component vector of float)
|
0:195 Function Parameters:
|
||||||
0:197 subgroupQuadSwapVertical ( global 4-component vector of float)
|
0:195 'f4' ( in 4-component vector of float)
|
||||||
0:197 'f4' ( in 4-component vector of float)
|
0:? Sequence
|
||||||
0:198 subgroupQuadSwapDiagonal ( global 4-component vector of float)
|
0:198 subgroupQuadBroadcast ( global 4-component vector of float)
|
||||||
0:198 'f4' ( in 4-component vector of float)
|
0:198 'f4' ( in 4-component vector of float)
|
||||||
0:202 Function Definition: partitioned_works(vf4; ( global void)
|
0:198 Constant:
|
||||||
0:202 Function Parameters:
|
0:198 0 (const uint)
|
||||||
0:202 'f4' ( in 4-component vector of float)
|
0:199 subgroupQuadBroadcast ( global 4-component vector of float)
|
||||||
0:204 Sequence
|
0:199 'f4' ( in 4-component vector of float)
|
||||||
0:204 Sequence
|
0:199 Convert int to uint ( temp uint)
|
||||||
0:204 move second child to first child ( temp 4-component vector of uint)
|
0:199 'i' ( temp int)
|
||||||
0:204 'parti' ( temp 4-component vector of uint)
|
0:200 subgroupQuadSwapHorizontal ( global 4-component vector of float)
|
||||||
0:204 subgroupPartitionNV ( global 4-component vector of uint)
|
0:200 'f4' ( in 4-component vector of float)
|
||||||
0:204 'f4' ( in 4-component vector of float)
|
0:201 subgroupQuadSwapVertical ( global 4-component vector of float)
|
||||||
0:205 Sequence
|
0:201 'f4' ( in 4-component vector of float)
|
||||||
0:205 move second child to first child ( temp 4-component vector of uint)
|
0:202 subgroupQuadSwapDiagonal ( global 4-component vector of float)
|
||||||
0:205 'ballot' ( temp 4-component vector of uint)
|
0:202 'f4' ( in 4-component vector of float)
|
||||||
0:205 Constant:
|
0:206 Function Definition: partitioned_works(vf4; ( global void)
|
||||||
0:205 85 (const uint)
|
0:206 Function Parameters:
|
||||||
0:205 0 (const uint)
|
0:206 'f4' ( in 4-component vector of float)
|
||||||
0:205 0 (const uint)
|
0:208 Sequence
|
||||||
0:205 0 (const uint)
|
0:208 Sequence
|
||||||
0:206 subgroupPartitionedAddNV ( global 4-component vector of float)
|
0:208 move second child to first child ( temp 4-component vector of uint)
|
||||||
0:206 'f4' ( in 4-component vector of float)
|
0:208 'parti' ( temp 4-component vector of uint)
|
||||||
0:206 'parti' ( temp 4-component vector of uint)
|
0:208 subgroupPartitionNV ( global 4-component vector of uint)
|
||||||
0:207 subgroupPartitionedMulNV ( global 4-component vector of float)
|
0:208 'f4' ( in 4-component vector of float)
|
||||||
0:207 'f4' ( in 4-component vector of float)
|
0:209 Sequence
|
||||||
0:207 'parti' ( temp 4-component vector of uint)
|
0:209 move second child to first child ( temp 4-component vector of uint)
|
||||||
0:208 subgroupPartitionedMinNV ( global 4-component vector of float)
|
0:209 'ballot' ( temp 4-component vector of uint)
|
||||||
0:208 'f4' ( in 4-component vector of float)
|
0:209 Constant:
|
||||||
0:208 'parti' ( temp 4-component vector of uint)
|
0:209 85 (const uint)
|
||||||
0:209 subgroupPartitionedMaxNV ( global 4-component vector of float)
|
0:209 0 (const uint)
|
||||||
0:209 'f4' ( in 4-component vector of float)
|
0:209 0 (const uint)
|
||||||
0:209 'parti' ( temp 4-component vector of uint)
|
0:209 0 (const uint)
|
||||||
0:210 subgroupPartitionedAndNV ( global 4-component vector of uint)
|
0:210 subgroupPartitionedAddNV ( global 4-component vector of float)
|
||||||
0:210 'ballot' ( temp 4-component vector of uint)
|
0:210 'f4' ( in 4-component vector of float)
|
||||||
0:210 'parti' ( temp 4-component vector of uint)
|
0:210 'parti' ( temp 4-component vector of uint)
|
||||||
0:211 subgroupPartitionedOrNV ( global 4-component vector of uint)
|
0:211 subgroupPartitionedMulNV ( global 4-component vector of float)
|
||||||
0:211 'ballot' ( temp 4-component vector of uint)
|
0:211 'f4' ( in 4-component vector of float)
|
||||||
0:211 'parti' ( temp 4-component vector of uint)
|
0:211 'parti' ( temp 4-component vector of uint)
|
||||||
0:212 subgroupPartitionedXorNV ( global 4-component vector of uint)
|
0:212 subgroupPartitionedMinNV ( global 4-component vector of float)
|
||||||
0:212 'ballot' ( temp 4-component vector of uint)
|
0:212 'f4' ( in 4-component vector of float)
|
||||||
0:212 'parti' ( temp 4-component vector of uint)
|
0:212 'parti' ( temp 4-component vector of uint)
|
||||||
0:213 subgroupPartitionedInclusiveAddNV ( global 4-component vector of float)
|
0:213 subgroupPartitionedMaxNV ( global 4-component vector of float)
|
||||||
0:213 'f4' ( in 4-component vector of float)
|
0:213 'f4' ( in 4-component vector of float)
|
||||||
0:213 'parti' ( temp 4-component vector of uint)
|
0:213 'parti' ( temp 4-component vector of uint)
|
||||||
0:214 subgroupPartitionedInclusiveMulNV ( global 4-component vector of float)
|
0:214 subgroupPartitionedAndNV ( global 4-component vector of uint)
|
||||||
0:214 'f4' ( in 4-component vector of float)
|
0:214 'ballot' ( temp 4-component vector of uint)
|
||||||
0:214 'parti' ( temp 4-component vector of uint)
|
0:214 'parti' ( temp 4-component vector of uint)
|
||||||
0:215 subgroupPartitionedInclusiveMinNV ( global 4-component vector of float)
|
0:215 subgroupPartitionedOrNV ( global 4-component vector of uint)
|
||||||
0:215 'f4' ( in 4-component vector of float)
|
0:215 'ballot' ( temp 4-component vector of uint)
|
||||||
0:215 'parti' ( temp 4-component vector of uint)
|
0:215 'parti' ( temp 4-component vector of uint)
|
||||||
0:216 subgroupPartitionedInclusiveMaxNV ( global 4-component vector of float)
|
0:216 subgroupPartitionedXorNV ( global 4-component vector of uint)
|
||||||
0:216 'f4' ( in 4-component vector of float)
|
0:216 'ballot' ( temp 4-component vector of uint)
|
||||||
0:216 'parti' ( temp 4-component vector of uint)
|
0:216 'parti' ( temp 4-component vector of uint)
|
||||||
0:217 subgroupPartitionedInclusiveAndNV ( global 4-component vector of uint)
|
0:217 subgroupPartitionedInclusiveAddNV ( global 4-component vector of float)
|
||||||
0:217 'ballot' ( temp 4-component vector of uint)
|
0:217 'f4' ( in 4-component vector of float)
|
||||||
0:217 'parti' ( temp 4-component vector of uint)
|
0:217 'parti' ( temp 4-component vector of uint)
|
||||||
0:218 subgroupPartitionedInclusiveOrNV ( global 4-component vector of uint)
|
0:218 subgroupPartitionedInclusiveMulNV ( global 4-component vector of float)
|
||||||
0:218 'ballot' ( temp 4-component vector of uint)
|
0:218 'f4' ( in 4-component vector of float)
|
||||||
0:218 'parti' ( temp 4-component vector of uint)
|
0:218 'parti' ( temp 4-component vector of uint)
|
||||||
0:219 subgroupPartitionedInclusiveXorNV ( global 4-component vector of uint)
|
0:219 subgroupPartitionedInclusiveMinNV ( global 4-component vector of float)
|
||||||
0:219 'ballot' ( temp 4-component vector of uint)
|
0:219 'f4' ( in 4-component vector of float)
|
||||||
0:219 'parti' ( temp 4-component vector of uint)
|
0:219 'parti' ( temp 4-component vector of uint)
|
||||||
0:220 subgroupPartitionedExclusiveAddNV ( global 4-component vector of float)
|
0:220 subgroupPartitionedInclusiveMaxNV ( global 4-component vector of float)
|
||||||
0:220 'f4' ( in 4-component vector of float)
|
0:220 'f4' ( in 4-component vector of float)
|
||||||
0:220 'parti' ( temp 4-component vector of uint)
|
0:220 'parti' ( temp 4-component vector of uint)
|
||||||
0:221 subgroupPartitionedExclusiveMulNV ( global 4-component vector of float)
|
0:221 subgroupPartitionedInclusiveAndNV ( global 4-component vector of uint)
|
||||||
0:221 'f4' ( in 4-component vector of float)
|
0:221 'ballot' ( temp 4-component vector of uint)
|
||||||
0:221 'parti' ( temp 4-component vector of uint)
|
0:221 'parti' ( temp 4-component vector of uint)
|
||||||
0:222 subgroupPartitionedExclusiveMinNV ( global 4-component vector of float)
|
0:222 subgroupPartitionedInclusiveOrNV ( global 4-component vector of uint)
|
||||||
0:222 'f4' ( in 4-component vector of float)
|
0:222 'ballot' ( temp 4-component vector of uint)
|
||||||
0:222 'parti' ( temp 4-component vector of uint)
|
0:222 'parti' ( temp 4-component vector of uint)
|
||||||
0:223 subgroupPartitionedExclusiveMaxNV ( global 4-component vector of float)
|
0:223 subgroupPartitionedInclusiveXorNV ( global 4-component vector of uint)
|
||||||
0:223 'f4' ( in 4-component vector of float)
|
0:223 'ballot' ( temp 4-component vector of uint)
|
||||||
0:223 'parti' ( temp 4-component vector of uint)
|
0:223 'parti' ( temp 4-component vector of uint)
|
||||||
0:224 subgroupPartitionedExclusiveAndNV ( global 4-component vector of uint)
|
0:224 subgroupPartitionedExclusiveAddNV ( global 4-component vector of float)
|
||||||
0:224 'ballot' ( temp 4-component vector of uint)
|
0:224 'f4' ( in 4-component vector of float)
|
||||||
0:224 'parti' ( temp 4-component vector of uint)
|
0:224 'parti' ( temp 4-component vector of uint)
|
||||||
0:225 subgroupPartitionedExclusiveOrNV ( global 4-component vector of uint)
|
0:225 subgroupPartitionedExclusiveMulNV ( global 4-component vector of float)
|
||||||
0:225 'ballot' ( temp 4-component vector of uint)
|
0:225 'f4' ( in 4-component vector of float)
|
||||||
0:225 'parti' ( temp 4-component vector of uint)
|
0:225 'parti' ( temp 4-component vector of uint)
|
||||||
0:226 subgroupPartitionedExclusiveXorNV ( global 4-component vector of uint)
|
0:226 subgroupPartitionedExclusiveMinNV ( global 4-component vector of float)
|
||||||
0:226 'ballot' ( temp 4-component vector of uint)
|
0:226 'f4' ( in 4-component vector of float)
|
||||||
0:226 'parti' ( temp 4-component vector of uint)
|
0:226 'parti' ( temp 4-component vector of uint)
|
||||||
0:230 Function Definition: sm_builtins_err( ( global void)
|
0:227 subgroupPartitionedExclusiveMaxNV ( global 4-component vector of float)
|
||||||
0:230 Function Parameters:
|
0:227 'f4' ( in 4-component vector of float)
|
||||||
0:232 Sequence
|
0:227 'parti' ( temp 4-component vector of uint)
|
||||||
0:232 'gl_WarpsPerSMNV' ( flat in uint WarpsPerSMNV)
|
0:228 subgroupPartitionedExclusiveAndNV ( global 4-component vector of uint)
|
||||||
0:233 'gl_SMCountNV' ( flat in uint SMCountNV)
|
0:228 'ballot' ( temp 4-component vector of uint)
|
||||||
0:234 'gl_WarpIDNV' ( flat in uint WarpIDNV)
|
0:228 'parti' ( temp 4-component vector of uint)
|
||||||
0:235 'gl_SMIDNV' ( flat in uint SMIDNV)
|
0:229 subgroupPartitionedExclusiveOrNV ( global 4-component vector of uint)
|
||||||
0:242 Function Definition: sm_builtins( ( global void)
|
0:229 'ballot' ( temp 4-component vector of uint)
|
||||||
0:242 Function Parameters:
|
0:229 'parti' ( temp 4-component vector of uint)
|
||||||
0:244 Sequence
|
0:230 subgroupPartitionedExclusiveXorNV ( global 4-component vector of uint)
|
||||||
0:244 'gl_WarpsPerSMNV' ( flat in uint WarpsPerSMNV)
|
0:230 'ballot' ( temp 4-component vector of uint)
|
||||||
0:245 'gl_SMCountNV' ( flat in uint SMCountNV)
|
0:230 'parti' ( temp 4-component vector of uint)
|
||||||
0:246 'gl_WarpIDNV' ( flat in uint WarpIDNV)
|
0:234 Function Definition: sm_builtins_err( ( global void)
|
||||||
0:247 'gl_SMIDNV' ( flat in uint SMIDNV)
|
0:234 Function Parameters:
|
||||||
|
0:236 Sequence
|
||||||
|
0:236 'gl_WarpsPerSMNV' ( flat in uint WarpsPerSMNV)
|
||||||
|
0:237 'gl_SMCountNV' ( flat in uint SMCountNV)
|
||||||
|
0:238 'gl_WarpIDNV' ( flat in uint WarpIDNV)
|
||||||
|
0:239 'gl_SMIDNV' ( flat in uint SMIDNV)
|
||||||
|
0:246 Function Definition: sm_builtins( ( global void)
|
||||||
|
0:246 Function Parameters:
|
||||||
|
0:248 Sequence
|
||||||
|
0:248 'gl_WarpsPerSMNV' ( flat in uint WarpsPerSMNV)
|
||||||
|
0:249 'gl_SMCountNV' ( flat in uint SMCountNV)
|
||||||
|
0:250 'gl_WarpIDNV' ( flat in uint WarpIDNV)
|
||||||
|
0:251 'gl_SMIDNV' ( flat in uint SMIDNV)
|
||||||
0:? Linker Objects
|
0:? Linker Objects
|
||||||
0:? 'data' (layout( location=0) out 4-component vector of uint)
|
0:? 'data' (layout( location=0) out 4-component vector of uint)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ glsl.entryPointRename.vert
|
||||||
ERROR: Source entry point must be "main"
|
ERROR: Source entry point must be "main"
|
||||||
|
|
||||||
// Module Version 10000
|
// Module Version 10000
|
||||||
// Generated by (magic number): 80007
|
// Generated by (magic number): 80008
|
||||||
// Id's are bound by 20
|
// Id's are bound by 20
|
||||||
|
|
||||||
Capability Shader
|
Capability Shader
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
glsl.entryPointRename.vert
|
glsl.entryPointRename.vert
|
||||||
// Module Version 10000
|
// Module Version 10000
|
||||||
// Generated by (magic number): 80007
|
// Generated by (magic number): 80008
|
||||||
// Id's are bound by 20
|
// Id's are bound by 20
|
||||||
|
|
||||||
Capability Shader
|
Capability Shader
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
glspv.esversion.vert
|
glspv.esversion.vert
|
||||||
// Module Version 10000
|
// Module Version 10000
|
||||||
// Generated by (magic number): 80007
|
// Generated by (magic number): 80008
|
||||||
// Id's are bound by 10
|
// Id's are bound by 10
|
||||||
|
|
||||||
Capability Shader
|
Capability Shader
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ glspv.version.frag
|
||||||
ERROR: #version: compilation for SPIR-V does not support the compatibility profile
|
ERROR: #version: compilation for SPIR-V does not support the compatibility profile
|
||||||
|
|
||||||
// Module Version 10000
|
// Module Version 10000
|
||||||
// Generated by (magic number): 80007
|
// Generated by (magic number): 80008
|
||||||
// Id's are bound by 6
|
// Id's are bound by 6
|
||||||
|
|
||||||
Capability Shader
|
Capability Shader
|
||||||
|
|
|
||||||
|
|
@ -71,7 +71,7 @@ output primitive = line_strip
|
||||||
|
|
||||||
Validation failed
|
Validation failed
|
||||||
// Module Version 10000
|
// Module Version 10000
|
||||||
// Generated by (magic number): 80007
|
// Generated by (magic number): 80008
|
||||||
// Id's are bound by 36
|
// Id's are bound by 36
|
||||||
|
|
||||||
Capability Geometry
|
Capability Geometry
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@ Shader version: 500
|
||||||
0:? '@entryPointOutput' ( out float PointSize)
|
0:? '@entryPointOutput' ( out float PointSize)
|
||||||
|
|
||||||
// Module Version 10000
|
// Module Version 10000
|
||||||
// Generated by (magic number): 80007
|
// Generated by (magic number): 80008
|
||||||
// Id's are bound by 16
|
// Id's are bound by 16
|
||||||
|
|
||||||
Capability Shader
|
Capability Shader
|
||||||
|
|
|
||||||
|
|
@ -143,7 +143,7 @@ gl_FragCoord origin is upper left
|
||||||
0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float)
|
0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float)
|
||||||
|
|
||||||
// Module Version 10000
|
// Module Version 10000
|
||||||
// Generated by (magic number): 80007
|
// Generated by (magic number): 80008
|
||||||
// Id's are bound by 64
|
// Id's are bound by 64
|
||||||
|
|
||||||
Capability Shader
|
Capability Shader
|
||||||
|
|
|
||||||
|
|
@ -160,7 +160,7 @@ gl_FragCoord origin is upper left
|
||||||
0:? 'm' ( global 4-component vector of float)
|
0:? 'm' ( global 4-component vector of float)
|
||||||
|
|
||||||
// Module Version 10000
|
// Module Version 10000
|
||||||
// Generated by (magic number): 80007
|
// Generated by (magic number): 80008
|
||||||
// Id's are bound by 57
|
// Id's are bound by 57
|
||||||
|
|
||||||
Capability Shader
|
Capability Shader
|
||||||
|
|
|
||||||
|
|
@ -345,7 +345,7 @@ gl_FragCoord origin is upper left
|
||||||
0:? 'ps_output.color' (layout( location=0) out 4-component vector of float)
|
0:? 'ps_output.color' (layout( location=0) out 4-component vector of float)
|
||||||
|
|
||||||
// Module Version 10000
|
// Module Version 10000
|
||||||
// Generated by (magic number): 80007
|
// Generated by (magic number): 80008
|
||||||
// Id's are bound by 143
|
// Id's are bound by 143
|
||||||
|
|
||||||
Capability Shader
|
Capability Shader
|
||||||
|
|
|
||||||
|
|
@ -290,7 +290,7 @@ gl_FragCoord origin is upper left
|
||||||
0:? 'input' (layout( location=1) in 3-element array of 4-component vector of float)
|
0:? 'input' (layout( location=1) in 3-element array of 4-component vector of float)
|
||||||
|
|
||||||
// Module Version 10000
|
// Module Version 10000
|
||||||
// Generated by (magic number): 80007
|
// Generated by (magic number): 80008
|
||||||
// Id's are bound by 126
|
// Id's are bound by 126
|
||||||
|
|
||||||
Capability Shader
|
Capability Shader
|
||||||
|
|
|
||||||
|
|
@ -163,7 +163,7 @@ gl_FragCoord origin is upper left
|
||||||
0:? 'g_mystruct' ( global 2-element array of structure{ temp int i, temp float f})
|
0:? 'g_mystruct' ( global 2-element array of structure{ temp int i, temp float f})
|
||||||
|
|
||||||
// Module Version 10000
|
// Module Version 10000
|
||||||
// Generated by (magic number): 80007
|
// Generated by (magic number): 80008
|
||||||
// Id's are bound by 72
|
// Id's are bound by 72
|
||||||
|
|
||||||
Capability Shader
|
Capability Shader
|
||||||
|
|
|
||||||
|
|
@ -134,7 +134,7 @@ gl_FragCoord origin is upper left
|
||||||
0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
|
0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
|
||||||
|
|
||||||
// Module Version 10000
|
// Module Version 10000
|
||||||
// Generated by (magic number): 80007
|
// Generated by (magic number): 80008
|
||||||
// Id's are bound by 57
|
// Id's are bound by 57
|
||||||
|
|
||||||
Capability Shader
|
Capability Shader
|
||||||
|
|
|
||||||
|
|
@ -132,7 +132,7 @@ gl_FragCoord origin is upper left
|
||||||
0:? 'a5' (layout( location=4) in 4-component vector of float)
|
0:? 'a5' (layout( location=4) in 4-component vector of float)
|
||||||
|
|
||||||
// Module Version 10000
|
// Module Version 10000
|
||||||
// Generated by (magic number): 80007
|
// Generated by (magic number): 80008
|
||||||
// Id's are bound by 58
|
// Id's are bound by 58
|
||||||
|
|
||||||
Capability Shader
|
Capability Shader
|
||||||
|
|
|
||||||
|
|
@ -82,7 +82,7 @@ local_size = (4, 6, 8)
|
||||||
0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float)
|
0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float)
|
||||||
|
|
||||||
// Module Version 10000
|
// Module Version 10000
|
||||||
// Generated by (magic number): 80007
|
// Generated by (magic number): 80008
|
||||||
// Id's are bound by 39
|
// Id's are bound by 39
|
||||||
|
|
||||||
Capability Shader
|
Capability Shader
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,7 @@ gl_FragCoord origin is upper left
|
||||||
0:? 'input' (layout( location=0) in 4-component vector of float)
|
0:? 'input' (layout( location=0) in 4-component vector of float)
|
||||||
|
|
||||||
// Module Version 10000
|
// Module Version 10000
|
||||||
// Generated by (magic number): 80007
|
// Generated by (magic number): 80008
|
||||||
// Id's are bound by 24
|
// Id's are bound by 24
|
||||||
|
|
||||||
Capability Shader
|
Capability Shader
|
||||||
|
|
|
||||||
|
|
@ -95,7 +95,7 @@ gl_FragCoord origin is upper left
|
||||||
|
|
||||||
Validation failed
|
Validation failed
|
||||||
// Module Version 10000
|
// Module Version 10000
|
||||||
// Generated by (magic number): 80007
|
// Generated by (magic number): 80008
|
||||||
// Id's are bound by 51
|
// Id's are bound by 51
|
||||||
|
|
||||||
Capability Shader
|
Capability Shader
|
||||||
|
|
|
||||||
|
|
@ -56,7 +56,7 @@ gl_FragCoord origin is upper left
|
||||||
0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float)
|
0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float)
|
||||||
|
|
||||||
// Module Version 10000
|
// Module Version 10000
|
||||||
// Generated by (magic number): 80007
|
// Generated by (magic number): 80008
|
||||||
// Id's are bound by 28
|
// Id's are bound by 28
|
||||||
|
|
||||||
Capability Shader
|
Capability Shader
|
||||||
|
|
|
||||||
|
|
@ -64,7 +64,7 @@ local_size = (1, 1, 1)
|
||||||
0:? 'gti' ( in 3-component vector of int LocalInvocationID)
|
0:? 'gti' ( in 3-component vector of int LocalInvocationID)
|
||||||
|
|
||||||
// Module Version 10000
|
// Module Version 10000
|
||||||
// Generated by (magic number): 80007
|
// Generated by (magic number): 80008
|
||||||
// Id's are bound by 38
|
// Id's are bound by 38
|
||||||
|
|
||||||
Capability Shader
|
Capability Shader
|
||||||
|
|
|
||||||
|
|
@ -188,7 +188,7 @@ output primitive = line_strip
|
||||||
0:? 'OutputStream.something' (layout( location=1) out int)
|
0:? 'OutputStream.something' (layout( location=1) out int)
|
||||||
|
|
||||||
// Module Version 10000
|
// Module Version 10000
|
||||||
// Generated by (magic number): 80007
|
// Generated by (magic number): 80008
|
||||||
// Id's are bound by 68
|
// Id's are bound by 68
|
||||||
|
|
||||||
Capability Geometry
|
Capability Geometry
|
||||||
|
|
|
||||||
|
|
@ -204,7 +204,7 @@ Shader version: 500
|
||||||
0:? '@entryPointOutput' ( out 4-component vector of float Position)
|
0:? '@entryPointOutput' ( out 4-component vector of float Position)
|
||||||
|
|
||||||
// Module Version 10000
|
// Module Version 10000
|
||||||
// Generated by (magic number): 80007
|
// Generated by (magic number): 80008
|
||||||
// Id's are bound by 99
|
// Id's are bound by 99
|
||||||
|
|
||||||
Capability Shader
|
Capability Shader
|
||||||
|
|
|
||||||
|
|
@ -147,7 +147,7 @@ gl_FragCoord origin is upper left
|
||||||
|
|
||||||
Validation failed
|
Validation failed
|
||||||
// Module Version 10000
|
// Module Version 10000
|
||||||
// Generated by (magic number): 80007
|
// Generated by (magic number): 80008
|
||||||
// Id's are bound by 73
|
// Id's are bound by 73
|
||||||
|
|
||||||
Capability Shader
|
Capability Shader
|
||||||
|
|
|
||||||
|
|
@ -358,7 +358,7 @@ using depth_any
|
||||||
0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
|
0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
|
||||||
|
|
||||||
// Module Version 10000
|
// Module Version 10000
|
||||||
// Generated by (magic number): 80007
|
// Generated by (magic number): 80008
|
||||||
// Id's are bound by 148
|
// Id's are bound by 148
|
||||||
|
|
||||||
Capability Shader
|
Capability Shader
|
||||||
|
|
|
||||||
|
|
@ -358,7 +358,7 @@ using depth_any
|
||||||
0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
|
0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
|
||||||
|
|
||||||
// Module Version 10000
|
// Module Version 10000
|
||||||
// Generated by (magic number): 80007
|
// Generated by (magic number): 80008
|
||||||
// Id's are bound by 148
|
// Id's are bound by 148
|
||||||
|
|
||||||
Capability Shader
|
Capability Shader
|
||||||
|
|
|
||||||
|
|
@ -70,7 +70,7 @@ gl_FragCoord origin is upper left
|
||||||
0:? 'input' (layout( location=0) in 4-component vector of float)
|
0:? 'input' (layout( location=0) in 4-component vector of float)
|
||||||
|
|
||||||
// Module Version 10000
|
// Module Version 10000
|
||||||
// Generated by (magic number): 80007
|
// Generated by (magic number): 80008
|
||||||
// Id's are bound by 34
|
// Id's are bound by 34
|
||||||
|
|
||||||
Capability Shader
|
Capability Shader
|
||||||
|
|
|
||||||
|
|
@ -250,7 +250,7 @@ Shader version: 500
|
||||||
0:? 'input.Norm' (layout( location=1) in 3-component vector of float)
|
0:? 'input.Norm' (layout( location=1) in 3-component vector of float)
|
||||||
|
|
||||||
// Module Version 10000
|
// Module Version 10000
|
||||||
// Generated by (magic number): 80007
|
// Generated by (magic number): 80008
|
||||||
// Id's are bound by 93
|
// Id's are bound by 93
|
||||||
|
|
||||||
Capability Shader
|
Capability Shader
|
||||||
|
|
|
||||||
|
|
@ -146,7 +146,7 @@ Shader version: 500
|
||||||
0:? '@entryPointOutput' ( out 4-component vector of float Position)
|
0:? '@entryPointOutput' ( out 4-component vector of float Position)
|
||||||
|
|
||||||
// Module Version 10000
|
// Module Version 10000
|
||||||
// Generated by (magic number): 80007
|
// Generated by (magic number): 80008
|
||||||
// Id's are bound by 58
|
// Id's are bound by 58
|
||||||
|
|
||||||
Capability Shader
|
Capability Shader
|
||||||
|
|
|
||||||
|
|
@ -74,7 +74,7 @@ gl_FragCoord origin is upper left
|
||||||
0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float)
|
0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float)
|
||||||
|
|
||||||
// Module Version 10000
|
// Module Version 10000
|
||||||
// Generated by (magic number): 80007
|
// Generated by (magic number): 80008
|
||||||
// Id's are bound by 30
|
// Id's are bound by 30
|
||||||
|
|
||||||
Capability Shader
|
Capability Shader
|
||||||
|
|
|
||||||
|
|
@ -98,7 +98,7 @@ gl_FragCoord origin is upper left
|
||||||
0:? 'cull' ( in 1-element array of float CullDistance)
|
0:? 'cull' ( in 1-element array of float CullDistance)
|
||||||
|
|
||||||
// Module Version 10000
|
// Module Version 10000
|
||||||
// Generated by (magic number): 80007
|
// Generated by (magic number): 80008
|
||||||
// Id's are bound by 53
|
// Id's are bound by 53
|
||||||
|
|
||||||
Capability Shader
|
Capability Shader
|
||||||
|
|
|
||||||
|
|
@ -550,7 +550,7 @@ output primitive = line_strip
|
||||||
0:? 'OutputStream.clip' ( out 2-element array of float ClipDistance)
|
0:? 'OutputStream.clip' ( out 2-element array of float ClipDistance)
|
||||||
|
|
||||||
// Module Version 10000
|
// Module Version 10000
|
||||||
// Generated by (magic number): 80007
|
// Generated by (magic number): 80008
|
||||||
// Id's are bound by 118
|
// Id's are bound by 118
|
||||||
|
|
||||||
Capability Geometry
|
Capability Geometry
|
||||||
|
|
|
||||||
|
|
@ -108,7 +108,7 @@ Shader version: 500
|
||||||
0:? 'cull' ( out 1-element array of float CullDistance)
|
0:? 'cull' ( out 1-element array of float CullDistance)
|
||||||
|
|
||||||
// Module Version 10000
|
// Module Version 10000
|
||||||
// Generated by (magic number): 80007
|
// Generated by (magic number): 80008
|
||||||
// Id's are bound by 46
|
// Id's are bound by 46
|
||||||
|
|
||||||
Capability Shader
|
Capability Shader
|
||||||
|
|
|
||||||
|
|
@ -290,7 +290,7 @@ gl_FragCoord origin is upper left
|
||||||
0:? 'cull' ( in 4-element array of float CullDistance)
|
0:? 'cull' ( in 4-element array of float CullDistance)
|
||||||
|
|
||||||
// Module Version 10000
|
// Module Version 10000
|
||||||
// Generated by (magic number): 80007
|
// Generated by (magic number): 80008
|
||||||
// Id's are bound by 84
|
// Id's are bound by 84
|
||||||
|
|
||||||
Capability Shader
|
Capability Shader
|
||||||
|
|
|
||||||
|
|
@ -724,7 +724,7 @@ output primitive = line_strip
|
||||||
0:? 'OutputStream.clip' ( out 4-element array of float ClipDistance)
|
0:? 'OutputStream.clip' ( out 4-element array of float ClipDistance)
|
||||||
|
|
||||||
// Module Version 10000
|
// Module Version 10000
|
||||||
// Generated by (magic number): 80007
|
// Generated by (magic number): 80008
|
||||||
// Id's are bound by 128
|
// Id's are bound by 128
|
||||||
|
|
||||||
Capability Geometry
|
Capability Geometry
|
||||||
|
|
|
||||||
|
|
@ -420,7 +420,7 @@ Shader version: 500
|
||||||
0:? 'cull' ( out 4-element array of float CullDistance)
|
0:? 'cull' ( out 4-element array of float CullDistance)
|
||||||
|
|
||||||
// Module Version 10000
|
// Module Version 10000
|
||||||
// Generated by (magic number): 80007
|
// Generated by (magic number): 80008
|
||||||
// Id's are bound by 89
|
// Id's are bound by 89
|
||||||
|
|
||||||
Capability Shader
|
Capability Shader
|
||||||
|
|
|
||||||
|
|
@ -98,7 +98,7 @@ gl_FragCoord origin is upper left
|
||||||
0:? 'cull' ( in 2-element array of float CullDistance)
|
0:? 'cull' ( in 2-element array of float CullDistance)
|
||||||
|
|
||||||
// Module Version 10000
|
// Module Version 10000
|
||||||
// Generated by (magic number): 80007
|
// Generated by (magic number): 80008
|
||||||
// Id's are bound by 53
|
// Id's are bound by 53
|
||||||
|
|
||||||
Capability Shader
|
Capability Shader
|
||||||
|
|
|
||||||
|
|
@ -630,7 +630,7 @@ output primitive = line_strip
|
||||||
0:? 'OutputStream.clip1' ( out 4-element array of float ClipDistance)
|
0:? 'OutputStream.clip1' ( out 4-element array of float ClipDistance)
|
||||||
|
|
||||||
// Module Version 10000
|
// Module Version 10000
|
||||||
// Generated by (magic number): 80007
|
// Generated by (magic number): 80008
|
||||||
// Id's are bound by 127
|
// Id's are bound by 127
|
||||||
|
|
||||||
Capability Geometry
|
Capability Geometry
|
||||||
|
|
|
||||||
|
|
@ -136,7 +136,7 @@ Shader version: 500
|
||||||
0:? 'cull' ( out 2-element array of float CullDistance)
|
0:? 'cull' ( out 2-element array of float CullDistance)
|
||||||
|
|
||||||
// Module Version 10000
|
// Module Version 10000
|
||||||
// Generated by (magic number): 80007
|
// Generated by (magic number): 80008
|
||||||
// Id's are bound by 51
|
// Id's are bound by 51
|
||||||
|
|
||||||
Capability Shader
|
Capability Shader
|
||||||
|
|
|
||||||
|
|
@ -174,7 +174,7 @@ gl_FragCoord origin is upper left
|
||||||
0:? 'v.ClipRect' ( in 4-element array of float ClipDistance)
|
0:? 'v.ClipRect' ( in 4-element array of float ClipDistance)
|
||||||
|
|
||||||
// Module Version 10000
|
// Module Version 10000
|
||||||
// Generated by (magic number): 80007
|
// Generated by (magic number): 80008
|
||||||
// Id's are bound by 57
|
// Id's are bound by 57
|
||||||
|
|
||||||
Capability Shader
|
Capability Shader
|
||||||
|
|
|
||||||
|
|
@ -612,7 +612,7 @@ output primitive = line_strip
|
||||||
0:? 'OutputStream.clip1' ( out 4-element array of float ClipDistance)
|
0:? 'OutputStream.clip1' ( out 4-element array of float ClipDistance)
|
||||||
|
|
||||||
// Module Version 10000
|
// Module Version 10000
|
||||||
// Generated by (magic number): 80007
|
// Generated by (magic number): 80008
|
||||||
// Id's are bound by 130
|
// Id's are bound by 130
|
||||||
|
|
||||||
Capability Geometry
|
Capability Geometry
|
||||||
|
|
|
||||||
|
|
@ -270,7 +270,7 @@ Shader version: 500
|
||||||
0:? '@entryPointOutput.ClipRect' ( out 4-element array of float ClipDistance)
|
0:? '@entryPointOutput.ClipRect' ( out 4-element array of float ClipDistance)
|
||||||
|
|
||||||
// Module Version 10000
|
// Module Version 10000
|
||||||
// Generated by (magic number): 80007
|
// Generated by (magic number): 80008
|
||||||
// Id's are bound by 72
|
// Id's are bound by 72
|
||||||
|
|
||||||
Capability Shader
|
Capability Shader
|
||||||
|
|
|
||||||
|
|
@ -232,7 +232,7 @@ gl_FragCoord origin is upper left
|
||||||
0:? 'v.ClipRect' ( in 4-element array of float ClipDistance)
|
0:? 'v.ClipRect' ( in 4-element array of float ClipDistance)
|
||||||
|
|
||||||
// Module Version 10000
|
// Module Version 10000
|
||||||
// Generated by (magic number): 80007
|
// Generated by (magic number): 80008
|
||||||
// Id's are bound by 62
|
// Id's are bound by 62
|
||||||
|
|
||||||
Capability Shader
|
Capability Shader
|
||||||
|
|
|
||||||
|
|
@ -318,7 +318,7 @@ Shader version: 500
|
||||||
0:? '@entryPointOutput.ClipRect' ( out 4-element array of float ClipDistance)
|
0:? '@entryPointOutput.ClipRect' ( out 4-element array of float ClipDistance)
|
||||||
|
|
||||||
// Module Version 10000
|
// Module Version 10000
|
||||||
// Generated by (magic number): 80007
|
// Generated by (magic number): 80008
|
||||||
// Id's are bound by 73
|
// Id's are bound by 73
|
||||||
|
|
||||||
Capability Shader
|
Capability Shader
|
||||||
|
|
|
||||||
|
|
@ -282,7 +282,7 @@ gl_FragCoord origin is upper left
|
||||||
0:? 'v.clip1' ( in 8-element array of float ClipDistance)
|
0:? 'v.clip1' ( in 8-element array of float ClipDistance)
|
||||||
|
|
||||||
// Module Version 10000
|
// Module Version 10000
|
||||||
// Generated by (magic number): 80007
|
// Generated by (magic number): 80008
|
||||||
// Id's are bound by 79
|
// Id's are bound by 79
|
||||||
|
|
||||||
Capability Shader
|
Capability Shader
|
||||||
|
|
|
||||||
|
|
@ -428,7 +428,7 @@ Shader version: 500
|
||||||
0:? '@entryPointOutput.clip1' ( out 8-element array of float ClipDistance)
|
0:? '@entryPointOutput.clip1' ( out 8-element array of float ClipDistance)
|
||||||
|
|
||||||
// Module Version 10000
|
// Module Version 10000
|
||||||
// Generated by (magic number): 80007
|
// Generated by (magic number): 80008
|
||||||
// Id's are bound by 86
|
// Id's are bound by 86
|
||||||
|
|
||||||
Capability Shader
|
Capability Shader
|
||||||
|
|
|
||||||
|
|
@ -270,7 +270,7 @@ gl_FragCoord origin is upper left
|
||||||
0:? 'v.clip1' ( in 8-element array of float ClipDistance)
|
0:? 'v.clip1' ( in 8-element array of float ClipDistance)
|
||||||
|
|
||||||
// Module Version 10000
|
// Module Version 10000
|
||||||
// Generated by (magic number): 80007
|
// Generated by (magic number): 80008
|
||||||
// Id's are bound by 78
|
// Id's are bound by 78
|
||||||
|
|
||||||
Capability Shader
|
Capability Shader
|
||||||
|
|
|
||||||
|
|
@ -384,7 +384,7 @@ Shader version: 500
|
||||||
0:? '@entryPointOutput.clip1' ( out 8-element array of float ClipDistance)
|
0:? '@entryPointOutput.clip1' ( out 8-element array of float ClipDistance)
|
||||||
|
|
||||||
// Module Version 10000
|
// Module Version 10000
|
||||||
// Generated by (magic number): 80007
|
// Generated by (magic number): 80008
|
||||||
// Id's are bound by 81
|
// Id's are bound by 81
|
||||||
|
|
||||||
Capability Shader
|
Capability Shader
|
||||||
|
|
|
||||||
|
|
@ -186,7 +186,7 @@ gl_FragCoord origin is upper left
|
||||||
0:? 'v.clip1' ( in 4-element array of float ClipDistance)
|
0:? 'v.clip1' ( in 4-element array of float ClipDistance)
|
||||||
|
|
||||||
// Module Version 10000
|
// Module Version 10000
|
||||||
// Generated by (magic number): 80007
|
// Generated by (magic number): 80008
|
||||||
// Id's are bound by 65
|
// Id's are bound by 65
|
||||||
|
|
||||||
Capability Shader
|
Capability Shader
|
||||||
|
|
|
||||||
|
|
@ -240,7 +240,7 @@ Shader version: 500
|
||||||
0:? '@entryPointOutput.clip1' ( out 4-element array of float ClipDistance)
|
0:? '@entryPointOutput.clip1' ( out 4-element array of float ClipDistance)
|
||||||
|
|
||||||
// Module Version 10000
|
// Module Version 10000
|
||||||
// Generated by (magic number): 80007
|
// Generated by (magic number): 80008
|
||||||
// Id's are bound by 62
|
// Id's are bound by 62
|
||||||
|
|
||||||
Capability Shader
|
Capability Shader
|
||||||
|
|
|
||||||
|
|
@ -144,7 +144,7 @@ gl_FragCoord origin is upper left
|
||||||
0:? 'clip0' ( in 4-element array of float ClipDistance)
|
0:? 'clip0' ( in 4-element array of float ClipDistance)
|
||||||
|
|
||||||
// Module Version 10000
|
// Module Version 10000
|
||||||
// Generated by (magic number): 80007
|
// Generated by (magic number): 80008
|
||||||
// Id's are bound by 68
|
// Id's are bound by 68
|
||||||
|
|
||||||
Capability Shader
|
Capability Shader
|
||||||
|
|
|
||||||
|
|
@ -194,7 +194,7 @@ Shader version: 500
|
||||||
0:? 'clip0' ( out 4-element array of float ClipDistance)
|
0:? 'clip0' ( out 4-element array of float ClipDistance)
|
||||||
|
|
||||||
// Module Version 10000
|
// Module Version 10000
|
||||||
// Generated by (magic number): 80007
|
// Generated by (magic number): 80008
|
||||||
// Id's are bound by 67
|
// Id's are bound by 67
|
||||||
|
|
||||||
Capability Shader
|
Capability Shader
|
||||||
|
|
|
||||||
|
|
@ -356,7 +356,7 @@ triangle order = cw
|
||||||
0:? '@patchConstantOutput.inside' ( patch out 2-element array of float TessLevelInner)
|
0:? '@patchConstantOutput.inside' ( patch out 2-element array of float TessLevelInner)
|
||||||
|
|
||||||
// Module Version 10000
|
// Module Version 10000
|
||||||
// Generated by (magic number): 80007
|
// Generated by (magic number): 80008
|
||||||
// Id's are bound by 127
|
// Id's are bound by 127
|
||||||
|
|
||||||
Capability Tessellation
|
Capability Tessellation
|
||||||
|
|
|
||||||
|
|
@ -262,7 +262,7 @@ gl_FragCoord origin is upper left
|
||||||
0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
|
0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
|
||||||
|
|
||||||
// Module Version 10000
|
// Module Version 10000
|
||||||
// Generated by (magic number): 80007
|
// Generated by (magic number): 80008
|
||||||
// Id's are bound by 96
|
// Id's are bound by 96
|
||||||
|
|
||||||
Capability Shader
|
Capability Shader
|
||||||
|
|
|
||||||
|
|
@ -522,7 +522,7 @@ gl_FragCoord origin is upper left
|
||||||
0:? 'input' (layout( location=0) in 4-component vector of float)
|
0:? 'input' (layout( location=0) in 4-component vector of float)
|
||||||
|
|
||||||
// Module Version 10000
|
// Module Version 10000
|
||||||
// Generated by (magic number): 80007
|
// Generated by (magic number): 80008
|
||||||
// Id's are bound by 206
|
// Id's are bound by 206
|
||||||
|
|
||||||
Capability Shader
|
Capability Shader
|
||||||
|
|
|
||||||
|
|
@ -133,7 +133,7 @@ gl_FragCoord origin is upper left
|
||||||
|
|
||||||
Validation failed
|
Validation failed
|
||||||
// Module Version 10000
|
// Module Version 10000
|
||||||
// Generated by (magic number): 80007
|
// Generated by (magic number): 80008
|
||||||
// Id's are bound by 66
|
// Id's are bound by 66
|
||||||
|
|
||||||
Capability Shader
|
Capability Shader
|
||||||
|
|
@ -240,6 +240,5 @@ Validation failed
|
||||||
60: 7(fvec4) CompositeConstruct 59 59 59 59
|
60: 7(fvec4) CompositeConstruct 59 59 59 59
|
||||||
ReturnValue 60
|
ReturnValue 60
|
||||||
30: Label
|
30: Label
|
||||||
62: 7(fvec4) Undef
|
Unreachable
|
||||||
ReturnValue 62
|
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
|
|
|
||||||
|
|
@ -268,7 +268,7 @@ Shader version: 500
|
||||||
0:? '@entryPointOutput' ( out 4-component vector of float Position)
|
0:? '@entryPointOutput' ( out 4-component vector of float Position)
|
||||||
|
|
||||||
// Module Version 10000
|
// Module Version 10000
|
||||||
// Generated by (magic number): 80007
|
// Generated by (magic number): 80008
|
||||||
// Id's are bound by 89
|
// Id's are bound by 89
|
||||||
|
|
||||||
Capability Shader
|
Capability Shader
|
||||||
|
|
|
||||||
|
|
@ -104,7 +104,7 @@ gl_FragCoord origin is upper left
|
||||||
0:? '@entryPointOutput.color' (layout( location=0) out 4-component vector of float)
|
0:? '@entryPointOutput.color' (layout( location=0) out 4-component vector of float)
|
||||||
|
|
||||||
// Module Version 10000
|
// Module Version 10000
|
||||||
// Generated by (magic number): 80007
|
// Generated by (magic number): 80008
|
||||||
// Id's are bound by 40
|
// Id's are bound by 40
|
||||||
|
|
||||||
Capability Shader
|
Capability Shader
|
||||||
|
|
|
||||||
|
|
@ -545,7 +545,7 @@ gl_FragCoord origin is upper left
|
||||||
|
|
||||||
Validation failed
|
Validation failed
|
||||||
// Module Version 10000
|
// Module Version 10000
|
||||||
// Generated by (magic number): 80007
|
// Generated by (magic number): 80008
|
||||||
// Id's are bound by 98
|
// Id's are bound by 98
|
||||||
|
|
||||||
Capability Shader
|
Capability Shader
|
||||||
|
|
|
||||||
|
|
@ -119,7 +119,7 @@ gl_FragCoord origin is upper left
|
||||||
|
|
||||||
Validation failed
|
Validation failed
|
||||||
// Module Version 10000
|
// Module Version 10000
|
||||||
// Generated by (magic number): 80007
|
// Generated by (magic number): 80008
|
||||||
// Id's are bound by 52
|
// Id's are bound by 52
|
||||||
|
|
||||||
Capability Shader
|
Capability Shader
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
hlsl.dashI.vert
|
hlsl.dashI.vert
|
||||||
// Module Version 10000
|
// Module Version 10000
|
||||||
// Generated by (magic number): 80007
|
// Generated by (magic number): 80008
|
||||||
// Id's are bound by 40
|
// Id's are bound by 40
|
||||||
|
|
||||||
Capability Shader
|
Capability Shader
|
||||||
|
|
|
||||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue