Merge remote-tracking branch 'upstream/master' into patch-3
This commit is contained in:
commit
08e4874a56
0
.gitattributes
vendored
Executable file → Normal file
0
.gitattributes
vendored
Executable file → Normal file
7
.gitignore
vendored
7
.gitignore
vendored
@ -11,3 +11,10 @@ Test/localResults/
|
|||||||
External/googletest
|
External/googletest
|
||||||
External/spirv-tools
|
External/spirv-tools
|
||||||
out/
|
out/
|
||||||
|
|
||||||
|
# GN generated files
|
||||||
|
.cipd/
|
||||||
|
*.gclient_entries
|
||||||
|
third_party/
|
||||||
|
buildtools/
|
||||||
|
tools/
|
||||||
|
|||||||
39
.gn
Normal file
39
.gn
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
# Copyright (C) 2020 The Khronos Group Inc.
|
||||||
|
#
|
||||||
|
# All rights reserved.
|
||||||
|
#
|
||||||
|
# Redistribution and use in source and binary forms, with or without
|
||||||
|
# modification, are permitted provided that the following conditions
|
||||||
|
# are met:
|
||||||
|
#
|
||||||
|
# Redistributions of source code must retain the above copyright
|
||||||
|
# notice, this list of conditions and the following disclaimer.
|
||||||
|
#
|
||||||
|
# Redistributions in binary form must reproduce the above
|
||||||
|
# copyright notice, this list of conditions and the following
|
||||||
|
# disclaimer in the documentation and/or other materials provided
|
||||||
|
# with the distribution.
|
||||||
|
#
|
||||||
|
# Neither the name of The Khronos Group Inc. nor the names of its
|
||||||
|
# contributors may be used to endorse or promote products derived
|
||||||
|
# from this software without specific prior written permission.
|
||||||
|
#
|
||||||
|
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||||
|
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||||
|
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||||
|
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||||
|
# COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||||
|
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||||
|
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
|
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||||
|
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||||
|
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||||
|
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
|
# POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
|
buildconfig = "//build/config/BUILDCONFIG.gn"
|
||||||
|
|
||||||
|
default_args = {
|
||||||
|
clang_use_chrome_plugins = false
|
||||||
|
use_custom_libcxx = false
|
||||||
|
}
|
||||||
12
.travis.yml
12
.travis.yml
@ -61,7 +61,17 @@ install:
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
before_script:
|
before_script:
|
||||||
- git clone --depth=1 https://github.com/google/googletest.git External/googletest
|
# check out pre-breakage version of googletest; can be deleted when
|
||||||
|
# issue 3128 is fixed
|
||||||
|
# git clone --depth=1 https://github.com/google/googletest.git External/googletest
|
||||||
|
- mkdir -p External/googletest
|
||||||
|
- cd External/googletest
|
||||||
|
- git init
|
||||||
|
- git remote add origin https://github.com/google/googletest.git
|
||||||
|
- git fetch --depth 1 origin 0c400f67fcf305869c5fb113dd296eca266c9725
|
||||||
|
- git reset --hard FETCH_HEAD
|
||||||
|
- cd ../..
|
||||||
|
# get spirv-tools and spirv-headers
|
||||||
- ./update_glslang_sources.py
|
- ./update_glslang_sources.py
|
||||||
|
|
||||||
script:
|
script:
|
||||||
|
|||||||
15
BUILD.gn
15
BUILD.gn
@ -76,6 +76,9 @@ if (!defined(glslang_angle)) {
|
|||||||
|
|
||||||
config("glslang_public") {
|
config("glslang_public") {
|
||||||
include_dirs = [ "." ]
|
include_dirs = [ "." ]
|
||||||
|
if (!is_win || is_clang) {
|
||||||
|
cflags = [ "-Wno-conversion" ]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
config("glslang_hlsl") {
|
config("glslang_hlsl") {
|
||||||
@ -243,6 +246,8 @@ template("glslang_sources_common") {
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
include_dirs = [ "${target_gen_dir}/include" ]
|
||||||
|
|
||||||
deps = [ ":glslang_build_info" ]
|
deps = [ ":glslang_build_info" ]
|
||||||
|
|
||||||
if (invoker.enable_opt) {
|
if (invoker.enable_opt) {
|
||||||
@ -250,10 +255,9 @@ template("glslang_sources_common") {
|
|||||||
"${spirv_tools_dir}:spvtools_opt",
|
"${spirv_tools_dir}:spvtools_opt",
|
||||||
"${spirv_tools_dir}:spvtools_val",
|
"${spirv_tools_dir}:spvtools_val",
|
||||||
]
|
]
|
||||||
|
include_dirs += [ "${spirv_tools_dir}/include" ]
|
||||||
}
|
}
|
||||||
|
|
||||||
include_dirs = [ "${target_gen_dir}/include" ]
|
|
||||||
|
|
||||||
configs -= _configs_to_remove
|
configs -= _configs_to_remove
|
||||||
configs += _configs_to_add
|
configs += _configs_to_add
|
||||||
}
|
}
|
||||||
@ -299,7 +303,10 @@ executable("glslang_validator") {
|
|||||||
]
|
]
|
||||||
public_configs = [ ":glslang_hlsl" ]
|
public_configs = [ ":glslang_hlsl" ]
|
||||||
|
|
||||||
include_dirs = [ "${target_gen_dir}/include" ]
|
include_dirs = [
|
||||||
|
"${target_gen_dir}/include",
|
||||||
|
"${spirv_tools_dir}/include",
|
||||||
|
]
|
||||||
|
|
||||||
configs -= _configs_to_remove
|
configs -= _configs_to_remove
|
||||||
configs += _configs_to_add
|
configs += _configs_to_add
|
||||||
@ -310,6 +317,8 @@ executable("spirv-remap") {
|
|||||||
defines = [ "ENABLE_OPT=1" ]
|
defines = [ "ENABLE_OPT=1" ]
|
||||||
deps = [ ":glslang_sources" ]
|
deps = [ ":glslang_sources" ]
|
||||||
|
|
||||||
|
include_dirs = [ "${spirv_tools_dir}/include" ]
|
||||||
|
|
||||||
configs -= _configs_to_remove
|
configs -= _configs_to_remove
|
||||||
configs += _configs_to_add
|
configs += _configs_to_add
|
||||||
}
|
}
|
||||||
|
|||||||
@ -228,9 +228,15 @@ function(glslang_set_link_args TARGET)
|
|||||||
endif()
|
endif()
|
||||||
endfunction(glslang_set_link_args)
|
endfunction(glslang_set_link_args)
|
||||||
|
|
||||||
|
if(NOT COMMAND find_host_package)
|
||||||
|
macro(find_host_package)
|
||||||
|
find_package(${ARGN})
|
||||||
|
endmacro()
|
||||||
|
endif()
|
||||||
|
|
||||||
# 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
|
||||||
find_package(PythonInterp 3 REQUIRED)
|
find_host_package(PythonInterp 3 REQUIRED)
|
||||||
|
|
||||||
# Root directory for build-time generated include files
|
# Root directory for build-time generated include files
|
||||||
set(GLSLANG_GENERATED_INCLUDEDIR "${CMAKE_BINARY_DIR}/include")
|
set(GLSLANG_GENERATED_INCLUDEDIR "${CMAKE_BINARY_DIR}/include")
|
||||||
|
|||||||
82
DEPS
Normal file
82
DEPS
Normal file
@ -0,0 +1,82 @@
|
|||||||
|
# Copyright (C) 2020 The Khronos Group Inc.
|
||||||
|
#
|
||||||
|
# All rights reserved.
|
||||||
|
#
|
||||||
|
# Redistribution and use in source and binary forms, with or without
|
||||||
|
# modification, are permitted provided that the following conditions
|
||||||
|
# are met:
|
||||||
|
#
|
||||||
|
# Redistributions of source code must retain the above copyright
|
||||||
|
# notice, this list of conditions and the following disclaimer.
|
||||||
|
#
|
||||||
|
# Redistributions in binary form must reproduce the above
|
||||||
|
# copyright notice, this list of conditions and the following
|
||||||
|
# disclaimer in the documentation and/or other materials provided
|
||||||
|
# with the distribution.
|
||||||
|
#
|
||||||
|
# Neither the name of The Khronos Group Inc. nor the names of its
|
||||||
|
# contributors may be used to endorse or promote products derived
|
||||||
|
# from this software without specific prior written permission.
|
||||||
|
#
|
||||||
|
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||||
|
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||||
|
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||||
|
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||||
|
# COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||||
|
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||||
|
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
|
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||||
|
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||||
|
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||||
|
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
|
# POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
|
use_relative_paths = True
|
||||||
|
|
||||||
|
gclient_gn_args_file = 'build/config/gclient_args.gni'
|
||||||
|
|
||||||
|
vars = {
|
||||||
|
'chromium_git': 'https://chromium.googlesource.com',
|
||||||
|
'build_with_chromium': False,
|
||||||
|
}
|
||||||
|
|
||||||
|
deps = {
|
||||||
|
|
||||||
|
'./build': {
|
||||||
|
'url': '{chromium_git}/chromium/src/build.git@85ee3b7692e5284f08bd3c9459fb5685eed7b838',
|
||||||
|
'condition': 'not build_with_chromium',
|
||||||
|
},
|
||||||
|
|
||||||
|
'./buildtools': {
|
||||||
|
'url': '{chromium_git}/chromium/src/buildtools.git@4be464e050b3d05060471788f926b34c641db9fd',
|
||||||
|
'condition': 'not build_with_chromium',
|
||||||
|
},
|
||||||
|
|
||||||
|
'./tools/clang': {
|
||||||
|
'url': '{chromium_git}/chromium/src/tools/clang.git@3a982adabb720aa8f3e3885d40bf3fe506990157',
|
||||||
|
'condition': 'not build_with_chromium',
|
||||||
|
},
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
hooks = [
|
||||||
|
{
|
||||||
|
'name': 'sysroot_x64',
|
||||||
|
'pattern': '.',
|
||||||
|
'condition': 'checkout_linux and (checkout_x64 and not build_with_chromium)',
|
||||||
|
'action': ['python', './build/linux/sysroot_scripts/install-sysroot.py',
|
||||||
|
'--arch=x64'],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
# Note: On Win, this should run after win_toolchain, as it may use it.
|
||||||
|
'name': 'clang',
|
||||||
|
'pattern': '.',
|
||||||
|
'action': ['python', './tools/clang/scripts/update.py'],
|
||||||
|
'condition': 'not build_with_chromium',
|
||||||
|
},
|
||||||
|
]
|
||||||
|
|
||||||
|
recursedeps = [
|
||||||
|
# buildtools provides clang_format, libc++, and libc++abi
|
||||||
|
'buildtools',
|
||||||
|
]
|
||||||
41
README.md
Executable file → Normal file
41
README.md
Executable file → Normal file
@ -88,7 +88,7 @@ The applied stage-specific rules are based on the file extension:
|
|||||||
There is also a non-shader extension
|
There is also a non-shader extension
|
||||||
* `.conf` for a configuration file of limits, see usage statement for example
|
* `.conf` for a configuration file of limits, see usage statement for example
|
||||||
|
|
||||||
## Building
|
## Building (CMake)
|
||||||
|
|
||||||
Instead of building manually, you can also download the binaries for your
|
Instead of building manually, you can also download the binaries for your
|
||||||
platform directly from the [master-tot release][master-tot-release] on GitHub.
|
platform directly from the [master-tot release][master-tot-release] on GitHub.
|
||||||
@ -125,6 +125,15 @@ cd <the directory glslang was cloned to, "External" will be a subdirectory>
|
|||||||
git clone https://github.com/google/googletest.git External/googletest
|
git clone https://github.com/google/googletest.git External/googletest
|
||||||
```
|
```
|
||||||
|
|
||||||
|
TEMPORARY NOTICE: additionally perform the following to avoid a current
|
||||||
|
breakage in googletest:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cd External/googletest
|
||||||
|
git checkout 0c400f67fcf305869c5fb113dd296eca266c9725
|
||||||
|
cd ../..
|
||||||
|
```
|
||||||
|
|
||||||
If you wish to assure that SPIR-V generated from HLSL is legal for Vulkan,
|
If you wish to assure that SPIR-V generated from HLSL is legal for Vulkan,
|
||||||
wish to invoke -Os to reduce SPIR-V size from HLSL or GLSL, or wish to run the
|
wish to invoke -Os to reduce SPIR-V size from HLSL or GLSL, or wish to run the
|
||||||
integrated test suite, install spirv-tools with this:
|
integrated test suite, install spirv-tools with this:
|
||||||
@ -184,6 +193,36 @@ cmake --build . --config Release --target install
|
|||||||
If using MSVC, after running CMake to configure, use the
|
If using MSVC, after running CMake to configure, use the
|
||||||
Configuration Manager to check the `INSTALL` project.
|
Configuration Manager to check the `INSTALL` project.
|
||||||
|
|
||||||
|
### Building (GN)
|
||||||
|
|
||||||
|
glslang can also be built with the [GN build system](https://gn.googlesource.com/gn/).
|
||||||
|
|
||||||
|
#### 1) Install `depot_tools`
|
||||||
|
|
||||||
|
Download [depot_tools.zip](https://storage.googleapis.com/chrome-infra/depot_tools.zip),
|
||||||
|
extract to a directory, and add this directory to your `PATH`.
|
||||||
|
|
||||||
|
#### 2) Synchronize dependencies and generate build files
|
||||||
|
|
||||||
|
This only needs to be done once after updating `glslang`.
|
||||||
|
|
||||||
|
With the current directory set to your `glslang` checkout, type:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
./update_glslang_sources.py
|
||||||
|
gclient sync --gclientfile=standalone.gclient
|
||||||
|
gn gen out/Default
|
||||||
|
```
|
||||||
|
|
||||||
|
#### 3) Build
|
||||||
|
|
||||||
|
With the current directory set to your `glslang` checkout, type:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cd out/Default
|
||||||
|
ninja
|
||||||
|
```
|
||||||
|
|
||||||
### If you need to change the GLSL grammar
|
### If you need to change the GLSL grammar
|
||||||
|
|
||||||
The grammar in `glslang/MachineIndependent/glslang.y` has to be recompiled with
|
The grammar in `glslang/MachineIndependent/glslang.y` has to be recompiled with
|
||||||
|
|||||||
@ -36,5 +36,6 @@ static const char* const E_SPV_EXT_fragment_fully_covered = "SPV_EXT_fragment_fu
|
|||||||
static const char* const E_SPV_EXT_fragment_invocation_density = "SPV_EXT_fragment_invocation_density";
|
static const char* const E_SPV_EXT_fragment_invocation_density = "SPV_EXT_fragment_invocation_density";
|
||||||
static const char* const E_SPV_EXT_demote_to_helper_invocation = "SPV_EXT_demote_to_helper_invocation";
|
static const char* const E_SPV_EXT_demote_to_helper_invocation = "SPV_EXT_demote_to_helper_invocation";
|
||||||
static const char* const E_SPV_EXT_shader_atomic_float_add = "SPV_EXT_shader_atomic_float_add";
|
static const char* const E_SPV_EXT_shader_atomic_float_add = "SPV_EXT_shader_atomic_float_add";
|
||||||
|
static const char* const E_SPV_EXT_shader_image_int64 = "SPV_EXT_shader_image_int64";
|
||||||
|
|
||||||
#endif // #ifndef GLSLextEXT_H
|
#endif // #ifndef GLSLextEXT_H
|
||||||
|
|||||||
@ -48,4 +48,7 @@ static const char* const E_SPV_KHR_shader_clock = "SPV_KHR_shade
|
|||||||
static const char* const E_SPV_KHR_non_semantic_info = "SPV_KHR_non_semantic_info";
|
static const char* const E_SPV_KHR_non_semantic_info = "SPV_KHR_non_semantic_info";
|
||||||
static const char* const E_SPV_KHR_ray_tracing = "SPV_KHR_ray_tracing";
|
static const char* const E_SPV_KHR_ray_tracing = "SPV_KHR_ray_tracing";
|
||||||
static const char* const E_SPV_KHR_ray_query = "SPV_KHR_ray_query";
|
static const char* const E_SPV_KHR_ray_query = "SPV_KHR_ray_query";
|
||||||
|
static const char* const E_SPV_KHR_fragment_shading_rate = "SPV_KHR_fragment_shading_rate";
|
||||||
|
static const char* const E_SPV_KHR_terminate_invocation = "SPV_KHR_terminate_invocation";
|
||||||
|
|
||||||
#endif // #ifndef GLSLextKHR_H
|
#endif // #ifndef GLSLextKHR_H
|
||||||
|
|||||||
@ -149,6 +149,7 @@ protected:
|
|||||||
spv::Decoration TranslateInterpolationDecoration(const glslang::TQualifier& qualifier);
|
spv::Decoration TranslateInterpolationDecoration(const glslang::TQualifier& qualifier);
|
||||||
spv::Decoration TranslateAuxiliaryStorageDecoration(const glslang::TQualifier& qualifier);
|
spv::Decoration TranslateAuxiliaryStorageDecoration(const glslang::TQualifier& qualifier);
|
||||||
spv::Decoration TranslateNonUniformDecoration(const glslang::TQualifier& qualifier);
|
spv::Decoration TranslateNonUniformDecoration(const glslang::TQualifier& qualifier);
|
||||||
|
spv::Decoration TranslateNonUniformDecoration(const spv::Builder::AccessChain::CoherentFlags& coherentFlags);
|
||||||
spv::Builder::AccessChain::CoherentFlags TranslateCoherent(const glslang::TType& type);
|
spv::Builder::AccessChain::CoherentFlags TranslateCoherent(const glslang::TType& type);
|
||||||
spv::MemoryAccessMask TranslateMemoryAccess(const spv::Builder::AccessChain::CoherentFlags &coherentFlags);
|
spv::MemoryAccessMask TranslateMemoryAccess(const spv::Builder::AccessChain::CoherentFlags &coherentFlags);
|
||||||
spv::ImageOperandsMask TranslateImageOperands(const spv::Builder::AccessChain::CoherentFlags &coherentFlags);
|
spv::ImageOperandsMask TranslateImageOperands(const spv::Builder::AccessChain::CoherentFlags &coherentFlags);
|
||||||
@ -189,6 +190,7 @@ protected:
|
|||||||
bool originalParam(glslang::TStorageQualifier, const glslang::TType&, bool implicitThisParam);
|
bool originalParam(glslang::TStorageQualifier, const glslang::TType&, bool implicitThisParam);
|
||||||
void makeFunctions(const glslang::TIntermSequence&);
|
void makeFunctions(const glslang::TIntermSequence&);
|
||||||
void makeGlobalInitializers(const glslang::TIntermSequence&);
|
void makeGlobalInitializers(const glslang::TIntermSequence&);
|
||||||
|
void collectRayTracingLinkerObjects();
|
||||||
void visitFunctions(const glslang::TIntermSequence&);
|
void visitFunctions(const glslang::TIntermSequence&);
|
||||||
void handleFunctionEntry(const glslang::TIntermAggregate* node);
|
void handleFunctionEntry(const glslang::TIntermAggregate* node);
|
||||||
void translateArguments(const glslang::TIntermAggregate& node, std::vector<spv::Id>& arguments,
|
void translateArguments(const glslang::TIntermAggregate& node, std::vector<spv::Id>& arguments,
|
||||||
@ -272,6 +274,9 @@ protected:
|
|||||||
// requiring local translation to and from SPIR-V type on every access.
|
// requiring local translation to and from SPIR-V type on every access.
|
||||||
// Maps <builtin-variable-id -> AST-required-type-id>
|
// Maps <builtin-variable-id -> AST-required-type-id>
|
||||||
std::unordered_map<spv::Id, spv::Id> forceType;
|
std::unordered_map<spv::Id, spv::Id> forceType;
|
||||||
|
|
||||||
|
// Used later for generating OpTraceKHR/OpExecuteCallableKHR
|
||||||
|
std::unordered_map<unsigned int, glslang::TIntermSymbol *> locationToSymbol[2];
|
||||||
};
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
@ -539,6 +544,20 @@ spv::Decoration TGlslangToSpvTraverser::TranslateNonUniformDecoration(const glsl
|
|||||||
return spv::DecorationMax;
|
return spv::DecorationMax;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// If lvalue flags contains nonUniform, return SPIR-V NonUniform decoration.
|
||||||
|
spv::Decoration TGlslangToSpvTraverser::TranslateNonUniformDecoration(
|
||||||
|
const spv::Builder::AccessChain::CoherentFlags& coherentFlags)
|
||||||
|
{
|
||||||
|
#ifndef GLSLANG_WEB
|
||||||
|
if (coherentFlags.isNonUniform()) {
|
||||||
|
builder.addIncorporatedExtension("SPV_EXT_descriptor_indexing", spv::Spv_1_5);
|
||||||
|
builder.addCapability(spv::CapabilityShaderNonUniformEXT);
|
||||||
|
return spv::DecorationNonUniformEXT;
|
||||||
|
} else
|
||||||
|
#endif
|
||||||
|
return spv::DecorationMax;
|
||||||
|
}
|
||||||
|
|
||||||
spv::MemoryAccessMask TGlslangToSpvTraverser::TranslateMemoryAccess(
|
spv::MemoryAccessMask TGlslangToSpvTraverser::TranslateMemoryAccess(
|
||||||
const spv::Builder::AccessChain::CoherentFlags &coherentFlags)
|
const spv::Builder::AccessChain::CoherentFlags &coherentFlags)
|
||||||
{
|
{
|
||||||
@ -614,6 +633,7 @@ spv::Builder::AccessChain::CoherentFlags TGlslangToSpvTraverser::TranslateCohere
|
|||||||
flags.volatil;
|
flags.volatil;
|
||||||
flags.isImage = type.getBasicType() == glslang::EbtSampler;
|
flags.isImage = type.getBasicType() == glslang::EbtSampler;
|
||||||
#endif
|
#endif
|
||||||
|
flags.nonUniform = type.getQualifier().nonUniform;
|
||||||
return flags;
|
return flags;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -709,14 +729,21 @@ spv::BuiltIn TGlslangToSpvTraverser::TranslateBuiltInDecoration(glslang::TBuiltI
|
|||||||
return spv::BuiltInCullDistance;
|
return spv::BuiltInCullDistance;
|
||||||
|
|
||||||
case glslang::EbvViewportIndex:
|
case glslang::EbvViewportIndex:
|
||||||
|
if (glslangIntermediate->getStage() == EShLangGeometry ||
|
||||||
|
glslangIntermediate->getStage() == EShLangFragment) {
|
||||||
builder.addCapability(spv::CapabilityMultiViewport);
|
builder.addCapability(spv::CapabilityMultiViewport);
|
||||||
|
}
|
||||||
if (glslangIntermediate->getStage() == EShLangVertex ||
|
if (glslangIntermediate->getStage() == EShLangVertex ||
|
||||||
glslangIntermediate->getStage() == EShLangTessControl ||
|
glslangIntermediate->getStage() == EShLangTessControl ||
|
||||||
glslangIntermediate->getStage() == EShLangTessEvaluation) {
|
glslangIntermediate->getStage() == EShLangTessEvaluation) {
|
||||||
|
|
||||||
|
if (builder.getSpvVersion() < spv::Spv_1_5) {
|
||||||
builder.addIncorporatedExtension(spv::E_SPV_EXT_shader_viewport_index_layer, spv::Spv_1_5);
|
builder.addIncorporatedExtension(spv::E_SPV_EXT_shader_viewport_index_layer, spv::Spv_1_5);
|
||||||
builder.addCapability(spv::CapabilityShaderViewportIndexLayerEXT);
|
builder.addCapability(spv::CapabilityShaderViewportIndexLayerEXT);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
builder.addCapability(spv::CapabilityShaderViewportIndex);
|
||||||
|
}
|
||||||
return spv::BuiltInViewportIndex;
|
return spv::BuiltInViewportIndex;
|
||||||
|
|
||||||
case glslang::EbvSampleId:
|
case glslang::EbvSampleId:
|
||||||
@ -734,13 +761,19 @@ spv::BuiltIn TGlslangToSpvTraverser::TranslateBuiltInDecoration(glslang::TBuiltI
|
|||||||
if (glslangIntermediate->getStage() == EShLangMeshNV) {
|
if (glslangIntermediate->getStage() == EShLangMeshNV) {
|
||||||
return spv::BuiltInLayer;
|
return spv::BuiltInLayer;
|
||||||
}
|
}
|
||||||
|
if (glslangIntermediate->getStage() == EShLangGeometry ||
|
||||||
|
glslangIntermediate->getStage() == EShLangFragment) {
|
||||||
builder.addCapability(spv::CapabilityGeometry);
|
builder.addCapability(spv::CapabilityGeometry);
|
||||||
|
}
|
||||||
if (glslangIntermediate->getStage() == EShLangVertex ||
|
if (glslangIntermediate->getStage() == EShLangVertex ||
|
||||||
glslangIntermediate->getStage() == EShLangTessControl ||
|
glslangIntermediate->getStage() == EShLangTessControl ||
|
||||||
glslangIntermediate->getStage() == EShLangTessEvaluation) {
|
glslangIntermediate->getStage() == EShLangTessEvaluation) {
|
||||||
|
|
||||||
|
if (builder.getSpvVersion() < spv::Spv_1_5) {
|
||||||
builder.addIncorporatedExtension(spv::E_SPV_EXT_shader_viewport_index_layer, spv::Spv_1_5);
|
builder.addIncorporatedExtension(spv::E_SPV_EXT_shader_viewport_index_layer, spv::Spv_1_5);
|
||||||
builder.addCapability(spv::CapabilityShaderViewportIndexLayerEXT);
|
builder.addCapability(spv::CapabilityShaderViewportIndexLayerEXT);
|
||||||
|
} else
|
||||||
|
builder.addCapability(spv::CapabilityShaderLayer);
|
||||||
}
|
}
|
||||||
return spv::BuiltInLayer;
|
return spv::BuiltInLayer;
|
||||||
|
|
||||||
@ -769,6 +802,16 @@ spv::BuiltIn TGlslangToSpvTraverser::TranslateBuiltInDecoration(glslang::TBuiltI
|
|||||||
builder.addCapability(spv::CapabilityStencilExportEXT);
|
builder.addCapability(spv::CapabilityStencilExportEXT);
|
||||||
return spv::BuiltInFragStencilRefEXT;
|
return spv::BuiltInFragStencilRefEXT;
|
||||||
|
|
||||||
|
case glslang::EbvShadingRateKHR:
|
||||||
|
builder.addExtension(spv::E_SPV_KHR_fragment_shading_rate);
|
||||||
|
builder.addCapability(spv::CapabilityFragmentShadingRateKHR);
|
||||||
|
return spv::BuiltInShadingRateKHR;
|
||||||
|
|
||||||
|
case glslang::EbvPrimitiveShadingRateKHR:
|
||||||
|
builder.addExtension(spv::E_SPV_KHR_fragment_shading_rate);
|
||||||
|
builder.addCapability(spv::CapabilityFragmentShadingRateKHR);
|
||||||
|
return spv::BuiltInPrimitiveShadingRateKHR;
|
||||||
|
|
||||||
case glslang::EbvInvocationId: return spv::BuiltInInvocationId;
|
case glslang::EbvInvocationId: return spv::BuiltInInvocationId;
|
||||||
case glslang::EbvTessLevelInner: return spv::BuiltInTessLevelInner;
|
case glslang::EbvTessLevelInner: return spv::BuiltInTessLevelInner;
|
||||||
case glslang::EbvTessLevelOuter: return spv::BuiltInTessLevelOuter;
|
case glslang::EbvTessLevelOuter: return spv::BuiltInTessLevelOuter;
|
||||||
@ -963,7 +1006,17 @@ spv::BuiltIn TGlslangToSpvTraverser::TranslateBuiltInDecoration(glslang::TBuiltI
|
|||||||
case glslang::EbvInstanceCustomIndex:
|
case glslang::EbvInstanceCustomIndex:
|
||||||
return spv::BuiltInInstanceCustomIndexKHR;
|
return spv::BuiltInInstanceCustomIndexKHR;
|
||||||
case glslang::EbvHitT:
|
case glslang::EbvHitT:
|
||||||
return spv::BuiltInHitTKHR;
|
{
|
||||||
|
// this is a GLSL alias of RayTmax
|
||||||
|
// in SPV_NV_ray_tracing it has a dedicated builtin
|
||||||
|
// but in SPV_KHR_ray_tracing it gets mapped to RayTmax
|
||||||
|
auto& extensions = glslangIntermediate->getRequestedExtensions();
|
||||||
|
if (extensions.find("GL_NV_ray_tracing") != extensions.end()) {
|
||||||
|
return spv::BuiltInHitTNV;
|
||||||
|
} else {
|
||||||
|
return spv::BuiltInRayTmaxKHR;
|
||||||
|
}
|
||||||
|
}
|
||||||
case glslang::EbvHitKind:
|
case glslang::EbvHitKind:
|
||||||
return spv::BuiltInHitKindKHR;
|
return spv::BuiltInHitKindKHR;
|
||||||
case glslang::EbvObjectToWorld:
|
case glslang::EbvObjectToWorld:
|
||||||
@ -1071,6 +1124,10 @@ spv::ImageFormat TGlslangToSpvTraverser::TranslateImageFormat(const glslang::TTy
|
|||||||
builder.addCapability(spv::CapabilityStorageImageExtendedFormats);
|
builder.addCapability(spv::CapabilityStorageImageExtendedFormats);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case glslang::ElfR64ui:
|
||||||
|
case glslang::ElfR64i:
|
||||||
|
builder.addExtension(spv::E_SPV_EXT_shader_image_int64);
|
||||||
|
builder.addCapability(spv::CapabilityInt64ImageEXT);
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -1117,6 +1174,8 @@ spv::ImageFormat TGlslangToSpvTraverser::TranslateImageFormat(const glslang::TTy
|
|||||||
case glslang::ElfRg8ui: return spv::ImageFormatRg8ui;
|
case glslang::ElfRg8ui: return spv::ImageFormatRg8ui;
|
||||||
case glslang::ElfR16ui: return spv::ImageFormatR16ui;
|
case glslang::ElfR16ui: return spv::ImageFormatR16ui;
|
||||||
case glslang::ElfR8ui: return spv::ImageFormatR8ui;
|
case glslang::ElfR8ui: return spv::ImageFormatR8ui;
|
||||||
|
case glslang::ElfR64ui: return spv::ImageFormatR64ui;
|
||||||
|
case glslang::ElfR64i: return spv::ImageFormatR64i;
|
||||||
default: return spv::ImageFormatMax;
|
default: return spv::ImageFormatMax;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1187,7 +1246,7 @@ spv::LoopControlMask TGlslangToSpvTraverser::TranslateLoopControl(const glslang:
|
|||||||
spv::StorageClass TGlslangToSpvTraverser::TranslateStorageClass(const glslang::TType& type)
|
spv::StorageClass TGlslangToSpvTraverser::TranslateStorageClass(const glslang::TType& type)
|
||||||
{
|
{
|
||||||
if (type.getBasicType() == glslang::EbtRayQuery)
|
if (type.getBasicType() == glslang::EbtRayQuery)
|
||||||
return spv::StorageClassFunction;
|
return spv::StorageClassPrivate;
|
||||||
if (type.getQualifier().isPipeInput())
|
if (type.getQualifier().isPipeInput())
|
||||||
return spv::StorageClassInput;
|
return spv::StorageClassInput;
|
||||||
if (type.getQualifier().isPipeOutput())
|
if (type.getQualifier().isPipeOutput())
|
||||||
@ -1353,6 +1412,8 @@ void InheritQualifiers(glslang::TQualifier& child, const glslang::TQualifier& pa
|
|||||||
if (parent.writeonly)
|
if (parent.writeonly)
|
||||||
child.writeonly = true;
|
child.writeonly = true;
|
||||||
#endif
|
#endif
|
||||||
|
if (parent.nonUniform)
|
||||||
|
child.nonUniform = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool HasNonLayoutQualifiers(const glslang::TType& type, const glslang::TQualifier& qualifier)
|
bool HasNonLayoutQualifiers(const glslang::TType& type, const glslang::TQualifier& qualifier)
|
||||||
@ -1454,7 +1515,7 @@ TGlslangToSpvTraverser::TGlslangToSpvTraverser(unsigned int spvVersion,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (glslangIntermediate->getLayoutPrimitiveCulling()) {
|
if (glslangIntermediate->getLayoutPrimitiveCulling()) {
|
||||||
builder.addCapability(spv::CapabilityRayTraversalPrimitiveCullingProvisionalKHR);
|
builder.addCapability(spv::CapabilityRayTraversalPrimitiveCullingKHR);
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned int mode;
|
unsigned int mode;
|
||||||
@ -1621,7 +1682,7 @@ TGlslangToSpvTraverser::TGlslangToSpvTraverser(unsigned int spvVersion,
|
|||||||
{
|
{
|
||||||
auto& extensions = glslangIntermediate->getRequestedExtensions();
|
auto& extensions = glslangIntermediate->getRequestedExtensions();
|
||||||
if (extensions.find("GL_NV_ray_tracing") == extensions.end()) {
|
if (extensions.find("GL_NV_ray_tracing") == extensions.end()) {
|
||||||
builder.addCapability(spv::CapabilityRayTracingProvisionalKHR);
|
builder.addCapability(spv::CapabilityRayTracingKHR);
|
||||||
builder.addExtension("SPV_KHR_ray_tracing");
|
builder.addExtension("SPV_KHR_ray_tracing");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -1710,6 +1771,12 @@ void TGlslangToSpvTraverser::visitSymbol(glslang::TIntermSymbol* symbol)
|
|||||||
if (symbol->getType().getQualifier().isSpecConstant())
|
if (symbol->getType().getQualifier().isSpecConstant())
|
||||||
spec_constant_op_mode_setter.turnOnSpecConstantOpMode();
|
spec_constant_op_mode_setter.turnOnSpecConstantOpMode();
|
||||||
|
|
||||||
|
#ifdef ENABLE_HLSL
|
||||||
|
// Skip symbol handling if it is string-typed
|
||||||
|
if (symbol->getBasicType() == glslang::EbtString)
|
||||||
|
return;
|
||||||
|
#endif
|
||||||
|
|
||||||
// getSymbolId() will set up all the IO decorations on the first call.
|
// getSymbolId() will set up all the IO decorations on the first call.
|
||||||
// Formal function parameters were mapped during makeFunctions().
|
// Formal function parameters were mapped during makeFunctions().
|
||||||
spv::Id id = getSymbolId(symbol);
|
spv::Id id = getSymbolId(symbol);
|
||||||
@ -1852,9 +1919,11 @@ bool TGlslangToSpvTraverser::visitBinary(glslang::TVisit /* visit */, glslang::T
|
|||||||
spv::Id leftRValue = accessChainLoad(node->getLeft()->getType());
|
spv::Id leftRValue = accessChainLoad(node->getLeft()->getType());
|
||||||
|
|
||||||
// do the operation
|
// do the operation
|
||||||
|
spv::Builder::AccessChain::CoherentFlags coherentFlags = TranslateCoherent(node->getLeft()->getType());
|
||||||
|
coherentFlags |= TranslateCoherent(node->getRight()->getType());
|
||||||
OpDecorations decorations = { TranslatePrecisionDecoration(node->getOperationPrecision()),
|
OpDecorations decorations = { TranslatePrecisionDecoration(node->getOperationPrecision()),
|
||||||
TranslateNoContractionDecoration(node->getType().getQualifier()),
|
TranslateNoContractionDecoration(node->getType().getQualifier()),
|
||||||
TranslateNonUniformDecoration(node->getType().getQualifier()) };
|
TranslateNonUniformDecoration(coherentFlags) };
|
||||||
rValue = createBinaryOperation(node->getOp(), decorations,
|
rValue = createBinaryOperation(node->getOp(), decorations,
|
||||||
convertGlslangToSpvType(node->getType()), leftRValue, rValue,
|
convertGlslangToSpvType(node->getType()), leftRValue, rValue,
|
||||||
node->getType().getBasicType());
|
node->getType().getBasicType());
|
||||||
@ -1885,13 +1954,16 @@ bool TGlslangToSpvTraverser::visitBinary(glslang::TVisit /* visit */, glslang::T
|
|||||||
if (! node->getLeft()->getType().isArray() &&
|
if (! node->getLeft()->getType().isArray() &&
|
||||||
node->getLeft()->getType().isVector() &&
|
node->getLeft()->getType().isVector() &&
|
||||||
node->getOp() == glslang::EOpIndexDirect) {
|
node->getOp() == glslang::EOpIndexDirect) {
|
||||||
|
// Swizzle is uniform so propagate uniform into access chain
|
||||||
|
spv::Builder::AccessChain::CoherentFlags coherentFlags = TranslateCoherent(node->getLeft()->getType());
|
||||||
|
coherentFlags.nonUniform = 0;
|
||||||
// This is essentially a hard-coded vector swizzle of size 1,
|
// This is essentially a hard-coded vector swizzle of size 1,
|
||||||
// so short circuit the access-chain stuff with a swizzle.
|
// so short circuit the access-chain stuff with a swizzle.
|
||||||
std::vector<unsigned> swizzle;
|
std::vector<unsigned> swizzle;
|
||||||
swizzle.push_back(glslangIndex);
|
swizzle.push_back(glslangIndex);
|
||||||
int dummySize;
|
int dummySize;
|
||||||
builder.accessChainPushSwizzle(swizzle, convertGlslangToSpvType(node->getLeft()->getType()),
|
builder.accessChainPushSwizzle(swizzle, convertGlslangToSpvType(node->getLeft()->getType()),
|
||||||
TranslateCoherent(node->getLeft()->getType()),
|
coherentFlags,
|
||||||
glslangIntermediate->getBaseAlignmentScalar(
|
glslangIntermediate->getBaseAlignmentScalar(
|
||||||
node->getLeft()->getType(), dummySize));
|
node->getLeft()->getType(), dummySize));
|
||||||
} else {
|
} else {
|
||||||
@ -1922,9 +1994,14 @@ bool TGlslangToSpvTraverser::visitBinary(glslang::TVisit /* visit */, glslang::T
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Struct reference propagates uniform lvalue
|
||||||
|
spv::Builder::AccessChain::CoherentFlags coherentFlags =
|
||||||
|
TranslateCoherent(node->getLeft()->getType());
|
||||||
|
coherentFlags.nonUniform = 0;
|
||||||
|
|
||||||
// normal case for indexing array or structure or block
|
// normal case for indexing array or structure or block
|
||||||
builder.accessChainPush(builder.makeIntConstant(spvIndex),
|
builder.accessChainPush(builder.makeIntConstant(spvIndex),
|
||||||
TranslateCoherent(node->getLeft()->getType()),
|
coherentFlags,
|
||||||
node->getLeft()->getType().getBufferReferenceAlignment());
|
node->getLeft()->getType().getBufferReferenceAlignment());
|
||||||
|
|
||||||
// Add capabilities here for accessing PointSize and clip/cull distance.
|
// Add capabilities here for accessing PointSize and clip/cull distance.
|
||||||
@ -1958,14 +2035,19 @@ bool TGlslangToSpvTraverser::visitBinary(glslang::TVisit /* visit */, glslang::T
|
|||||||
// restore the saved access chain
|
// restore the saved access chain
|
||||||
builder.setAccessChain(partial);
|
builder.setAccessChain(partial);
|
||||||
|
|
||||||
|
// Only if index is nonUniform should we propagate nonUniform into access chain
|
||||||
|
spv::Builder::AccessChain::CoherentFlags index_flags = TranslateCoherent(node->getRight()->getType());
|
||||||
|
spv::Builder::AccessChain::CoherentFlags coherent_flags = TranslateCoherent(node->getLeft()->getType());
|
||||||
|
coherent_flags.nonUniform = index_flags.nonUniform;
|
||||||
|
|
||||||
if (! node->getLeft()->getType().isArray() && node->getLeft()->getType().isVector()) {
|
if (! node->getLeft()->getType().isArray() && node->getLeft()->getType().isVector()) {
|
||||||
int dummySize;
|
int dummySize;
|
||||||
builder.accessChainPushComponent(index, convertGlslangToSpvType(node->getLeft()->getType()),
|
builder.accessChainPushComponent(
|
||||||
TranslateCoherent(node->getLeft()->getType()),
|
index, convertGlslangToSpvType(node->getLeft()->getType()), coherent_flags,
|
||||||
glslangIntermediate->getBaseAlignmentScalar(node->getLeft()->getType(),
|
glslangIntermediate->getBaseAlignmentScalar(node->getLeft()->getType(),
|
||||||
dummySize));
|
dummySize));
|
||||||
} else
|
} else
|
||||||
builder.accessChainPush(index, TranslateCoherent(node->getLeft()->getType()),
|
builder.accessChainPush(index, coherent_flags,
|
||||||
node->getLeft()->getType().getBufferReferenceAlignment());
|
node->getLeft()->getType().getBufferReferenceAlignment());
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
@ -2050,8 +2132,9 @@ std::pair<spv::Id, spv::Id> TGlslangToSpvTraverser::getForcedType(glslang::TBuil
|
|||||||
// these require changing a 64-bit scaler -> a vector of 32-bit components
|
// these require changing a 64-bit scaler -> a vector of 32-bit components
|
||||||
if (glslangType.isVector())
|
if (glslangType.isVector())
|
||||||
break;
|
break;
|
||||||
std::pair<spv::Id, spv::Id> ret(builder.makeVectorType(builder.makeUintType(32), 4),
|
spv::Id ivec4_type = builder.makeVectorType(builder.makeUintType(32), 4);
|
||||||
builder.makeUintType(64));
|
spv::Id uint64_type = builder.makeUintType(64);
|
||||||
|
std::pair<spv::Id, spv::Id> ret(ivec4_type, uint64_type);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
// There are no SPIR-V builtins defined for these and map onto original non-transposed
|
// There are no SPIR-V builtins defined for these and map onto original non-transposed
|
||||||
@ -2090,7 +2173,7 @@ spv::Id TGlslangToSpvTraverser::translateForcedType(spv::Id object)
|
|||||||
// handle 32-bit v.xy* -> 64-bit
|
// handle 32-bit v.xy* -> 64-bit
|
||||||
builder.clearAccessChain();
|
builder.clearAccessChain();
|
||||||
builder.setAccessChainLValue(object);
|
builder.setAccessChainLValue(object);
|
||||||
object = builder.accessChainLoad(spv::NoPrecision, spv::DecorationMax, objectTypeId);
|
object = builder.accessChainLoad(spv::NoPrecision, spv::DecorationMax, spv::DecorationMax, objectTypeId);
|
||||||
std::vector<spv::Id> components;
|
std::vector<spv::Id> components;
|
||||||
components.push_back(builder.createCompositeExtract(object, builder.getContainedTypeId(objectTypeId), 0));
|
components.push_back(builder.createCompositeExtract(object, builder.getContainedTypeId(objectTypeId), 0));
|
||||||
components.push_back(builder.createCompositeExtract(object, builder.getContainedTypeId(objectTypeId), 1));
|
components.push_back(builder.createCompositeExtract(object, builder.getContainedTypeId(objectTypeId), 1));
|
||||||
@ -2106,7 +2189,7 @@ spv::Id TGlslangToSpvTraverser::translateForcedType(spv::Id object)
|
|||||||
// and we insert a transpose after loading the original non-transposed builtins
|
// and we insert a transpose after loading the original non-transposed builtins
|
||||||
builder.clearAccessChain();
|
builder.clearAccessChain();
|
||||||
builder.setAccessChainLValue(object);
|
builder.setAccessChainLValue(object);
|
||||||
object = builder.accessChainLoad(spv::NoPrecision, spv::DecorationMax, objectTypeId);
|
object = builder.accessChainLoad(spv::NoPrecision, spv::DecorationMax, spv::DecorationMax, objectTypeId);
|
||||||
return builder.createUnaryOp(spv::OpTranspose, desiredTypeId, object);
|
return builder.createUnaryOp(spv::OpTranspose, desiredTypeId, object);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
@ -2292,7 +2375,8 @@ bool TGlslangToSpvTraverser::visitUnary(glslang::TVisit /* visit */, glslang::TI
|
|||||||
|
|
||||||
// The result of operation is always stored, but conditionally the
|
// The result of operation is always stored, but conditionally the
|
||||||
// consumed result. The consumed result is always an r-value.
|
// consumed result. The consumed result is always an r-value.
|
||||||
builder.accessChainStore(result);
|
builder.accessChainStore(result,
|
||||||
|
TranslateNonUniformDecoration(builder.getAccessChain().coherentFlags));
|
||||||
builder.clearAccessChain();
|
builder.clearAccessChain();
|
||||||
if (node->getOp() == glslang::EOpPreIncrement ||
|
if (node->getOp() == glslang::EOpPreIncrement ||
|
||||||
node->getOp() == glslang::EOpPreDecrement)
|
node->getOp() == glslang::EOpPreDecrement)
|
||||||
@ -2421,6 +2505,10 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
|
|||||||
// anything else gets there, so visit out of order, doing them all now.
|
// anything else gets there, so visit out of order, doing them all now.
|
||||||
makeGlobalInitializers(node->getAsAggregate()->getSequence());
|
makeGlobalInitializers(node->getAsAggregate()->getSequence());
|
||||||
|
|
||||||
|
//Pre process linker objects for ray tracing stages
|
||||||
|
if (glslangIntermediate->isRayTracingStage())
|
||||||
|
collectRayTracingLinkerObjects();
|
||||||
|
|
||||||
// Initializers are done, don't want to visit again, but functions and link objects need to be processed,
|
// Initializers are done, don't want to visit again, but functions and link objects need to be processed,
|
||||||
// so do them manually.
|
// so do them manually.
|
||||||
visitFunctions(node->getAsAggregate()->getSequence());
|
visitFunctions(node->getAsAggregate()->getSequence());
|
||||||
@ -2611,6 +2699,10 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
|
|||||||
else
|
else
|
||||||
constructed = builder.createConstructor(precision, arguments, resultType());
|
constructed = builder.createConstructor(precision, arguments, resultType());
|
||||||
|
|
||||||
|
if (node->getType().getQualifier().isNonUniform()) {
|
||||||
|
builder.addDecoration(constructed, spv::DecorationNonUniformEXT);
|
||||||
|
}
|
||||||
|
|
||||||
builder.clearAccessChain();
|
builder.clearAccessChain();
|
||||||
builder.setAccessChainRValue(constructed);
|
builder.setAccessChainRValue(constructed);
|
||||||
|
|
||||||
@ -2726,10 +2818,12 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
|
|||||||
binOp = node->getOp();
|
binOp = node->getOp();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case glslang::EOpIgnoreIntersection:
|
case glslang::EOpIgnoreIntersectionNV:
|
||||||
case glslang::EOpTerminateRay:
|
case glslang::EOpTerminateRayNV:
|
||||||
case glslang::EOpTrace:
|
case glslang::EOpTraceNV:
|
||||||
case glslang::EOpExecuteCallable:
|
case glslang::EOpTraceKHR:
|
||||||
|
case glslang::EOpExecuteCallableNV:
|
||||||
|
case glslang::EOpExecuteCallableKHR:
|
||||||
case glslang::EOpWritePackedPrimitiveIndices4x8NV:
|
case glslang::EOpWritePackedPrimitiveIndices4x8NV:
|
||||||
noReturnValue = true;
|
noReturnValue = true;
|
||||||
break;
|
break;
|
||||||
@ -2738,7 +2832,7 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
|
|||||||
case glslang::EOpRayQueryGenerateIntersection:
|
case glslang::EOpRayQueryGenerateIntersection:
|
||||||
case glslang::EOpRayQueryConfirmIntersection:
|
case glslang::EOpRayQueryConfirmIntersection:
|
||||||
builder.addExtension("SPV_KHR_ray_query");
|
builder.addExtension("SPV_KHR_ray_query");
|
||||||
builder.addCapability(spv::CapabilityRayQueryProvisionalKHR);
|
builder.addCapability(spv::CapabilityRayQueryKHR);
|
||||||
noReturnValue = true;
|
noReturnValue = true;
|
||||||
break;
|
break;
|
||||||
case glslang::EOpRayQueryProceed:
|
case glslang::EOpRayQueryProceed:
|
||||||
@ -2761,7 +2855,7 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
|
|||||||
case glslang::EOpRayQueryGetIntersectionObjectToWorld:
|
case glslang::EOpRayQueryGetIntersectionObjectToWorld:
|
||||||
case glslang::EOpRayQueryGetIntersectionWorldToObject:
|
case glslang::EOpRayQueryGetIntersectionWorldToObject:
|
||||||
builder.addExtension("SPV_KHR_ray_query");
|
builder.addExtension("SPV_KHR_ray_query");
|
||||||
builder.addCapability(spv::CapabilityRayQueryProvisionalKHR);
|
builder.addCapability(spv::CapabilityRayQueryKHR);
|
||||||
break;
|
break;
|
||||||
case glslang::EOpCooperativeMatrixLoad:
|
case glslang::EOpCooperativeMatrixLoad:
|
||||||
case glslang::EOpCooperativeMatrixStore:
|
case glslang::EOpCooperativeMatrixStore:
|
||||||
@ -3014,11 +3108,18 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
|
|||||||
)) {
|
)) {
|
||||||
bool cond = glslangOperands[arg]->getAsConstantUnion()->getConstArray()[0].getBConst();
|
bool cond = glslangOperands[arg]->getAsConstantUnion()->getConstArray()[0].getBConst();
|
||||||
operands.push_back(builder.makeIntConstant(cond ? 1 : 0));
|
operands.push_back(builder.makeIntConstant(cond ? 1 : 0));
|
||||||
}
|
} else if ((arg == 10 && glslangOp == glslang::EOpTraceKHR) ||
|
||||||
else {
|
(arg == 1 && glslangOp == glslang::EOpExecuteCallableKHR)) {
|
||||||
|
const int opdNum = glslangOp == glslang::EOpTraceKHR ? 10 : 1;
|
||||||
|
const int set = glslangOp == glslang::EOpTraceKHR ? 0 : 1;
|
||||||
|
const int location = glslangOperands[opdNum]->getAsConstantUnion()->getConstArray()[0].getUConst();
|
||||||
|
auto itNode = locationToSymbol[set].find(location);
|
||||||
|
visitSymbol(itNode->second);
|
||||||
|
spv::Id symId = getSymbolId(itNode->second);
|
||||||
|
operands.push_back(symId);
|
||||||
|
} else {
|
||||||
operands.push_back(accessChainLoad(glslangOperands[arg]->getAsTyped()->getType()));
|
operands.push_back(accessChainLoad(glslangOperands[arg]->getAsTyped()->getType()));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3089,7 +3190,8 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
|
|||||||
|
|
||||||
for (unsigned int i = 0; i < temporaryLvalues.size(); ++i) {
|
for (unsigned int i = 0; i < temporaryLvalues.size(); ++i) {
|
||||||
builder.setAccessChain(complexLvalues[i]);
|
builder.setAccessChain(complexLvalues[i]);
|
||||||
builder.accessChainStore(builder.createLoad(temporaryLvalues[i], spv::NoPrecision));
|
builder.accessChainStore(builder.createLoad(temporaryLvalues[i], spv::NoPrecision),
|
||||||
|
TranslateNonUniformDecoration(complexLvalues[i].coherentFlags));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3420,7 +3522,11 @@ bool TGlslangToSpvTraverser::visitBranch(glslang::TVisit /* visit */, glslang::T
|
|||||||
|
|
||||||
switch (node->getFlowOp()) {
|
switch (node->getFlowOp()) {
|
||||||
case glslang::EOpKill:
|
case glslang::EOpKill:
|
||||||
builder.makeDiscard();
|
builder.makeStatementTerminator(spv::OpKill, "post-discard");
|
||||||
|
break;
|
||||||
|
case glslang::EOpTerminateInvocation:
|
||||||
|
builder.addExtension(spv::E_SPV_KHR_terminate_invocation);
|
||||||
|
builder.makeStatementTerminator(spv::OpTerminateInvocation, "post-terminate-invocation");
|
||||||
break;
|
break;
|
||||||
case glslang::EOpBreak:
|
case glslang::EOpBreak:
|
||||||
if (breakForLoop.top())
|
if (breakForLoop.top())
|
||||||
@ -3457,6 +3563,12 @@ bool TGlslangToSpvTraverser::visitBranch(glslang::TVisit /* visit */, glslang::T
|
|||||||
builder.addExtension(spv::E_SPV_EXT_demote_to_helper_invocation);
|
builder.addExtension(spv::E_SPV_EXT_demote_to_helper_invocation);
|
||||||
builder.addCapability(spv::CapabilityDemoteToHelperInvocationEXT);
|
builder.addCapability(spv::CapabilityDemoteToHelperInvocationEXT);
|
||||||
break;
|
break;
|
||||||
|
case glslang::EOpTerminateRayKHR:
|
||||||
|
builder.makeStatementTerminator(spv::OpTerminateRayKHR, "post-terminateRayKHR");
|
||||||
|
break;
|
||||||
|
case glslang::EOpIgnoreIntersectionKHR:
|
||||||
|
builder.makeStatementTerminator(spv::OpIgnoreIntersectionKHR, "post-ignoreIntersectionKHR");
|
||||||
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
default:
|
default:
|
||||||
@ -3564,6 +3676,12 @@ spv::Id TGlslangToSpvTraverser::getSampledType(const glslang::TSampler& sampler)
|
|||||||
builder.addExtension(spv::E_SPV_AMD_gpu_shader_half_float_fetch);
|
builder.addExtension(spv::E_SPV_AMD_gpu_shader_half_float_fetch);
|
||||||
builder.addCapability(spv::CapabilityFloat16ImageAMD);
|
builder.addCapability(spv::CapabilityFloat16ImageAMD);
|
||||||
return builder.makeFloatType(16);
|
return builder.makeFloatType(16);
|
||||||
|
case glslang::EbtInt64: return builder.makeIntType(64);
|
||||||
|
builder.addExtension(spv::E_SPV_EXT_shader_image_int64);
|
||||||
|
builder.addCapability(spv::CapabilityFloat16ImageAMD);
|
||||||
|
case glslang::EbtUint64: return builder.makeUintType(64);
|
||||||
|
builder.addExtension(spv::E_SPV_EXT_shader_image_int64);
|
||||||
|
builder.addCapability(spv::CapabilityFloat16ImageAMD);
|
||||||
#endif
|
#endif
|
||||||
default:
|
default:
|
||||||
assert(0);
|
assert(0);
|
||||||
@ -3670,10 +3788,36 @@ spv::Id TGlslangToSpvTraverser::convertGlslangToSpvType(const glslang::TType& ty
|
|||||||
spvType = builder.makeUintType(32);
|
spvType = builder.makeUintType(32);
|
||||||
break;
|
break;
|
||||||
case glslang::EbtAccStruct:
|
case glslang::EbtAccStruct:
|
||||||
|
switch (glslangIntermediate->getStage()) {
|
||||||
|
case EShLangRayGen:
|
||||||
|
case EShLangIntersect:
|
||||||
|
case EShLangAnyHit:
|
||||||
|
case EShLangClosestHit:
|
||||||
|
case EShLangMiss:
|
||||||
|
case EShLangCallable:
|
||||||
|
// these all should have the RayTracingNV/KHR capability already
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
{
|
||||||
|
auto& extensions = glslangIntermediate->getRequestedExtensions();
|
||||||
|
if (extensions.find("GL_EXT_ray_query") != extensions.end()) {
|
||||||
|
builder.addExtension(spv::E_SPV_KHR_ray_query);
|
||||||
|
builder.addCapability(spv::CapabilityRayQueryKHR);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
spvType = builder.makeAccelerationStructureType();
|
spvType = builder.makeAccelerationStructureType();
|
||||||
break;
|
break;
|
||||||
case glslang::EbtRayQuery:
|
case glslang::EbtRayQuery:
|
||||||
|
{
|
||||||
|
auto& extensions = glslangIntermediate->getRequestedExtensions();
|
||||||
|
if (extensions.find("GL_EXT_ray_query") != extensions.end()) {
|
||||||
|
builder.addExtension(spv::E_SPV_KHR_ray_query);
|
||||||
|
builder.addCapability(spv::CapabilityRayQueryKHR);
|
||||||
|
}
|
||||||
spvType = builder.makeRayQueryType();
|
spvType = builder.makeRayQueryType();
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case glslang::EbtReference:
|
case glslang::EbtReference:
|
||||||
{
|
{
|
||||||
@ -3929,6 +4073,8 @@ void TGlslangToSpvTraverser::decorateStructType(const glslang::TType& type,
|
|||||||
// Name and decorate the non-hidden members
|
// Name and decorate the non-hidden members
|
||||||
int offset = -1;
|
int offset = -1;
|
||||||
int locationOffset = 0; // for use within the members of this struct
|
int locationOffset = 0; // for use within the members of this struct
|
||||||
|
bool memberLocationInvalid = type.isArrayOfArrays() ||
|
||||||
|
(type.isArray() && (type.getQualifier().isArrayedIo(glslangIntermediate->getStage()) == false));
|
||||||
for (int i = 0; i < (int)glslangMembers->size(); i++) {
|
for (int i = 0; i < (int)glslangMembers->size(); i++) {
|
||||||
glslang::TType& glslangMember = *(*glslangMembers)[i].type;
|
glslang::TType& glslangMember = *(*glslangMembers)[i].type;
|
||||||
int member = i;
|
int member = i;
|
||||||
@ -3981,7 +4127,7 @@ void TGlslangToSpvTraverser::decorateStructType(const glslang::TType& type,
|
|||||||
// just track whether a member needs to be decorated.
|
// just track whether a member needs to be decorated.
|
||||||
// Ignore member locations if the container is an array, as that's
|
// Ignore member locations if the container is an array, as that's
|
||||||
// ill-specified and decisions have been made to not allow this.
|
// ill-specified and decisions have been made to not allow this.
|
||||||
if (! type.isArray() && memberQualifier.hasLocation())
|
if (!memberLocationInvalid && memberQualifier.hasLocation())
|
||||||
builder.addMemberDecoration(spvType, member, spv::DecorationLocation, memberQualifier.layoutLocation);
|
builder.addMemberDecoration(spvType, member, spv::DecorationLocation, memberQualifier.layoutLocation);
|
||||||
|
|
||||||
if (qualifier.hasLocation()) // track for upcoming inheritance
|
if (qualifier.hasLocation()) // track for upcoming inheritance
|
||||||
@ -4087,6 +4233,7 @@ spv::Id TGlslangToSpvTraverser::accessChainLoad(const glslang::TType& type)
|
|||||||
alignment |= type.getBufferReferenceAlignment();
|
alignment |= type.getBufferReferenceAlignment();
|
||||||
|
|
||||||
spv::Id loadedId = builder.accessChainLoad(TranslatePrecisionDecoration(type),
|
spv::Id loadedId = builder.accessChainLoad(TranslatePrecisionDecoration(type),
|
||||||
|
TranslateNonUniformDecoration(builder.getAccessChain().coherentFlags),
|
||||||
TranslateNonUniformDecoration(type.getQualifier()),
|
TranslateNonUniformDecoration(type.getQualifier()),
|
||||||
nominalTypeId,
|
nominalTypeId,
|
||||||
spv::MemoryAccessMask(TranslateMemoryAccess(coherentFlags) & ~spv::MemoryAccessMakePointerAvailableKHRMask),
|
spv::MemoryAccessMask(TranslateMemoryAccess(coherentFlags) & ~spv::MemoryAccessMakePointerAvailableKHRMask),
|
||||||
@ -4154,7 +4301,7 @@ void TGlslangToSpvTraverser::accessChainStore(const glslang::TType& type, spv::I
|
|||||||
unsigned int alignment = builder.getAccessChain().alignment;
|
unsigned int alignment = builder.getAccessChain().alignment;
|
||||||
alignment |= type.getBufferReferenceAlignment();
|
alignment |= type.getBufferReferenceAlignment();
|
||||||
|
|
||||||
builder.accessChainStore(rvalue,
|
builder.accessChainStore(rvalue, TranslateNonUniformDecoration(builder.getAccessChain().coherentFlags),
|
||||||
spv::MemoryAccessMask(TranslateMemoryAccess(coherentFlags) &
|
spv::MemoryAccessMask(TranslateMemoryAccess(coherentFlags) &
|
||||||
~spv::MemoryAccessMakePointerVisibleKHRMask),
|
~spv::MemoryAccessMakePointerVisibleKHRMask),
|
||||||
TranslateMemoryScope(coherentFlags), alignment);
|
TranslateMemoryScope(coherentFlags), alignment);
|
||||||
@ -4542,7 +4689,39 @@ void TGlslangToSpvTraverser::makeGlobalInitializers(const glslang::TIntermSequen
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// Walk over all linker objects to create a map for payload and callable data linker objects
|
||||||
|
// and their location to be used during codegen for OpTraceKHR and OpExecuteCallableKHR
|
||||||
|
// This is done here since it is possible that these linker objects are not be referenced in the AST
|
||||||
|
void TGlslangToSpvTraverser::collectRayTracingLinkerObjects()
|
||||||
|
{
|
||||||
|
glslang::TIntermAggregate* linkerObjects = glslangIntermediate->findLinkerObjects();
|
||||||
|
for (auto& objSeq : linkerObjects->getSequence()) {
|
||||||
|
auto objNode = objSeq->getAsSymbolNode();
|
||||||
|
if (objNode != nullptr) {
|
||||||
|
if (objNode->getQualifier().hasLocation()) {
|
||||||
|
unsigned int location = objNode->getQualifier().layoutLocation;
|
||||||
|
auto st = objNode->getQualifier().storage;
|
||||||
|
int set;
|
||||||
|
switch (st)
|
||||||
|
{
|
||||||
|
case glslang::EvqPayload:
|
||||||
|
case glslang::EvqPayloadIn:
|
||||||
|
set = 0;
|
||||||
|
break;
|
||||||
|
case glslang::EvqCallableData:
|
||||||
|
case glslang::EvqCallableDataIn:
|
||||||
|
set = 1;
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
set = -1;
|
||||||
|
}
|
||||||
|
if (set != -1)
|
||||||
|
locationToSymbol[set].insert(std::make_pair(location, objNode));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
// Process all the functions, while skipping initializers.
|
// Process all the functions, while skipping initializers.
|
||||||
void TGlslangToSpvTraverser::visitFunctions(const glslang::TIntermSequence& glslFunctions)
|
void TGlslangToSpvTraverser::visitFunctions(const glslang::TIntermSequence& glslFunctions)
|
||||||
{
|
{
|
||||||
@ -4686,8 +4865,10 @@ void TGlslangToSpvTraverser::translateArguments(const glslang::TIntermAggregate&
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (lvalue) {
|
if (lvalue) {
|
||||||
arguments.push_back(builder.accessChainGetLValue());
|
spv::Id lvalue_id = builder.accessChainGetLValue();
|
||||||
|
arguments.push_back(lvalue_id);
|
||||||
lvalueCoherentFlags = builder.getAccessChain().coherentFlags;
|
lvalueCoherentFlags = builder.getAccessChain().coherentFlags;
|
||||||
|
builder.addDecoration(lvalue_id, TranslateNonUniformDecoration(lvalueCoherentFlags));
|
||||||
lvalueCoherentFlags |= TranslateCoherent(glslangArguments[i]->getAsTyped()->getType());
|
lvalueCoherentFlags |= TranslateCoherent(glslangArguments[i]->getAsTyped()->getType());
|
||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
@ -4750,12 +4931,15 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO
|
|||||||
|
|
||||||
const bool isUnsignedResult = node->getType().getBasicType() == glslang::EbtUint;
|
const bool isUnsignedResult = node->getType().getBasicType() == glslang::EbtUint;
|
||||||
|
|
||||||
|
if (builder.isSampledImage(params.sampler) &&
|
||||||
|
((cracked.query && node->getOp() != glslang::EOpTextureQueryLod) || cracked.fragMask || cracked.fetch)) {
|
||||||
|
params.sampler = builder.createUnaryOp(spv::OpImage, builder.getImageType(params.sampler), params.sampler);
|
||||||
|
if (imageType.getQualifier().isNonUniform()) {
|
||||||
|
builder.addDecoration(params.sampler, spv::DecorationNonUniformEXT);
|
||||||
|
}
|
||||||
|
}
|
||||||
// Check for queries
|
// Check for queries
|
||||||
if (cracked.query) {
|
if (cracked.query) {
|
||||||
// OpImageQueryLod works on a sampled image, for other queries the image has to be extracted first
|
|
||||||
if (node->getOp() != glslang::EOpTextureQueryLod && builder.isSampledImage(params.sampler))
|
|
||||||
params.sampler = builder.createUnaryOp(spv::OpImage, builder.getImageType(params.sampler), params.sampler);
|
|
||||||
|
|
||||||
switch (node->getOp()) {
|
switch (node->getOp()) {
|
||||||
case glslang::EOpImageQuerySize:
|
case glslang::EOpImageQuerySize:
|
||||||
case glslang::EOpTextureQuerySize:
|
case glslang::EOpTextureQuerySize:
|
||||||
@ -5009,10 +5193,6 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO
|
|||||||
auto opIt = arguments.begin();
|
auto opIt = arguments.begin();
|
||||||
std::vector<spv::Id> operands;
|
std::vector<spv::Id> operands;
|
||||||
|
|
||||||
// Extract the image if necessary
|
|
||||||
if (builder.isSampledImage(params.sampler))
|
|
||||||
params.sampler = builder.createUnaryOp(spv::OpImage, builder.getImageType(params.sampler), params.sampler);
|
|
||||||
|
|
||||||
operands.push_back(params.sampler);
|
operands.push_back(params.sampler);
|
||||||
++opIt;
|
++opIt;
|
||||||
|
|
||||||
@ -5073,13 +5253,6 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO
|
|||||||
bias = true;
|
bias = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// See if the sampler param should really be just the SPV image part
|
|
||||||
if (cracked.fetch) {
|
|
||||||
// a fetch needs to have the image extracted first
|
|
||||||
if (builder.isSampledImage(params.sampler))
|
|
||||||
params.sampler = builder.createUnaryOp(spv::OpImage, builder.getImageType(params.sampler), params.sampler);
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifndef GLSLANG_WEB
|
#ifndef GLSLANG_WEB
|
||||||
if (cracked.gather) {
|
if (cracked.gather) {
|
||||||
const auto& sourceExtensions = glslangIntermediate->getRequestedExtensions();
|
const auto& sourceExtensions = glslangIntermediate->getRequestedExtensions();
|
||||||
@ -5239,7 +5412,7 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO
|
|||||||
|
|
||||||
builder.accessChainPush(builder.makeIntConstant(i), flags, 0);
|
builder.accessChainPush(builder.makeIntConstant(i), flags, 0);
|
||||||
builder.accessChainStore(builder.createCompositeExtract(res, builder.getContainedTypeId(resType, i+1),
|
builder.accessChainStore(builder.createCompositeExtract(res, builder.getContainedTypeId(resType, i+1),
|
||||||
i+1));
|
i+1), TranslateNonUniformDecoration(imageType.getQualifier()));
|
||||||
}
|
}
|
||||||
return builder.createCompositeExtract(res, resultType(), 0);
|
return builder.createCompositeExtract(res, resultType(), 0);
|
||||||
}
|
}
|
||||||
@ -5375,6 +5548,7 @@ spv::Id TGlslangToSpvTraverser::handleUserFunctionCall(const glslang::TIntermAgg
|
|||||||
// 3. Make the call.
|
// 3. Make the call.
|
||||||
spv::Id result = builder.createFunctionCall(function, spvArgs);
|
spv::Id result = builder.createFunctionCall(function, spvArgs);
|
||||||
builder.setPrecision(result, TranslatePrecisionDecoration(node->getType()));
|
builder.setPrecision(result, TranslatePrecisionDecoration(node->getType()));
|
||||||
|
builder.addDecoration(result, TranslateNonUniformDecoration(node->getType().getQualifier()));
|
||||||
|
|
||||||
// 4. Copy back out an "out" arguments.
|
// 4. Copy back out an "out" arguments.
|
||||||
lValueCount = 0;
|
lValueCount = 0;
|
||||||
@ -5384,6 +5558,7 @@ spv::Id TGlslangToSpvTraverser::handleUserFunctionCall(const glslang::TIntermAgg
|
|||||||
else if (writableParam(qualifiers[a])) {
|
else if (writableParam(qualifiers[a])) {
|
||||||
if (qualifiers[a] == glslang::EvqOut || qualifiers[a] == glslang::EvqInOut) {
|
if (qualifiers[a] == glslang::EvqOut || qualifiers[a] == glslang::EvqInOut) {
|
||||||
spv::Id copy = builder.createLoad(spvArgs[a], spv::NoPrecision);
|
spv::Id copy = builder.createLoad(spvArgs[a], spv::NoPrecision);
|
||||||
|
builder.addDecoration(copy, TranslateNonUniformDecoration(argTypes[a]->getQualifier()));
|
||||||
builder.setAccessChain(lValues[lValueCount]);
|
builder.setAccessChain(lValues[lValueCount]);
|
||||||
multiTypeStore(*argTypes[a], copy);
|
multiTypeStore(*argTypes[a], copy);
|
||||||
}
|
}
|
||||||
@ -6171,6 +6346,11 @@ spv::Id TGlslangToSpvTraverser::createUnaryOperation(glslang::TOperator op, OpDe
|
|||||||
case glslang::EOpConstructReference:
|
case glslang::EOpConstructReference:
|
||||||
unaryOp = spv::OpBitcast;
|
unaryOp = spv::OpBitcast;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case glslang::EOpConvUint64ToAccStruct:
|
||||||
|
case glslang::EOpConvUvec2ToAccStruct:
|
||||||
|
unaryOp = spv::OpConvertUToAccelerationStructureKHR;
|
||||||
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
case glslang::EOpCopyObject:
|
case glslang::EOpCopyObject:
|
||||||
@ -7757,10 +7937,16 @@ spv::Id TGlslangToSpvTraverser::createMiscOperation(glslang::TOperator op, spv::
|
|||||||
typeId = builder.makeBoolType();
|
typeId = builder.makeBoolType();
|
||||||
opCode = spv::OpReportIntersectionKHR;
|
opCode = spv::OpReportIntersectionKHR;
|
||||||
break;
|
break;
|
||||||
case glslang::EOpTrace:
|
case glslang::EOpTraceNV:
|
||||||
|
builder.createNoResultOp(spv::OpTraceNV, operands);
|
||||||
|
return 0;
|
||||||
|
case glslang::EOpTraceKHR:
|
||||||
builder.createNoResultOp(spv::OpTraceRayKHR, operands);
|
builder.createNoResultOp(spv::OpTraceRayKHR, operands);
|
||||||
return 0;
|
return 0;
|
||||||
case glslang::EOpExecuteCallable:
|
case glslang::EOpExecuteCallableNV:
|
||||||
|
builder.createNoResultOp(spv::OpExecuteCallableNV, operands);
|
||||||
|
return 0;
|
||||||
|
case glslang::EOpExecuteCallableKHR:
|
||||||
builder.createNoResultOp(spv::OpExecuteCallableKHR, operands);
|
builder.createNoResultOp(spv::OpExecuteCallableKHR, operands);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
@ -7805,7 +7991,7 @@ spv::Id TGlslangToSpvTraverser::createMiscOperation(glslang::TOperator op, spv::
|
|||||||
opCode = spv::OpRayQueryGetIntersectionInstanceIdKHR;
|
opCode = spv::OpRayQueryGetIntersectionInstanceIdKHR;
|
||||||
break;
|
break;
|
||||||
case glslang::EOpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffset:
|
case glslang::EOpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffset:
|
||||||
typeId = builder.makeIntType(32);
|
typeId = builder.makeUintType(32);
|
||||||
opCode = spv::OpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR;
|
opCode = spv::OpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR;
|
||||||
break;
|
break;
|
||||||
case glslang::EOpRayQueryGetIntersectionGeometryIndex:
|
case glslang::EOpRayQueryGetIntersectionGeometryIndex:
|
||||||
@ -8048,11 +8234,11 @@ spv::Id TGlslangToSpvTraverser::createNoArgOperation(glslang::TOperator op, spv:
|
|||||||
spv::Id id = builder.createBuiltinCall(typeId, getExtBuiltins(spv::E_SPV_AMD_gcn_shader), spv::TimeAMD, args);
|
spv::Id id = builder.createBuiltinCall(typeId, getExtBuiltins(spv::E_SPV_AMD_gcn_shader), spv::TimeAMD, args);
|
||||||
return builder.setPrecision(id, precision);
|
return builder.setPrecision(id, precision);
|
||||||
}
|
}
|
||||||
case glslang::EOpIgnoreIntersection:
|
case glslang::EOpIgnoreIntersectionNV:
|
||||||
builder.createNoResultOp(spv::OpIgnoreIntersectionKHR);
|
builder.createNoResultOp(spv::OpIgnoreIntersectionNV);
|
||||||
return 0;
|
return 0;
|
||||||
case glslang::EOpTerminateRay:
|
case glslang::EOpTerminateRayNV:
|
||||||
builder.createNoResultOp(spv::OpTerminateRayKHR);
|
builder.createNoResultOp(spv::OpTerminateRayNV);
|
||||||
return 0;
|
return 0;
|
||||||
case glslang::EOpRayQueryInitialize:
|
case glslang::EOpRayQueryInitialize:
|
||||||
builder.createNoResultOp(spv::OpRayQueryInitializeKHR);
|
builder.createNoResultOp(spv::OpRayQueryInitializeKHR);
|
||||||
@ -8180,7 +8366,8 @@ spv::Id TGlslangToSpvTraverser::getSymbolId(const glslang::TIntermSymbol* symbol
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifndef GLSLANG_WEB
|
#ifndef GLSLANG_WEB
|
||||||
if (symbol->getType().isImage()) {
|
// Subgroup builtins which have input storage class are volatile for ray tracing stages.
|
||||||
|
if (symbol->getType().isImage() || symbol->getQualifier().isPipeInput()) {
|
||||||
std::vector<spv::Decoration> memory;
|
std::vector<spv::Decoration> memory;
|
||||||
TranslateMemoryDecoration(symbol->getType().getQualifier(), memory,
|
TranslateMemoryDecoration(symbol->getType().getQualifier(), memory,
|
||||||
glslangIntermediate->usingVulkanMemoryModel());
|
glslangIntermediate->usingVulkanMemoryModel());
|
||||||
@ -8188,9 +8375,6 @@ spv::Id TGlslangToSpvTraverser::getSymbolId(const glslang::TIntermSymbol* symbol
|
|||||||
builder.addDecoration(id, memory[i]);
|
builder.addDecoration(id, memory[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
// nonuniform
|
|
||||||
builder.addDecoration(id, TranslateNonUniformDecoration(symbol->getType().getQualifier()));
|
|
||||||
|
|
||||||
if (builtIn == spv::BuiltInSampleMask) {
|
if (builtIn == spv::BuiltInSampleMask) {
|
||||||
spv::Decoration decoration;
|
spv::Decoration decoration;
|
||||||
// GL_NV_sample_mask_override_coverage extension
|
// GL_NV_sample_mask_override_coverage extension
|
||||||
|
|||||||
0
SPIRV/GlslangToSpv.h
Executable file → Normal file
0
SPIRV/GlslangToSpv.h
Executable file → Normal file
@ -625,6 +625,9 @@ namespace spv {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case spv::OperandVariableLiteralStrings:
|
||||||
|
return nextInst;
|
||||||
|
|
||||||
// Execution mode might have extra literal operands. Skip them.
|
// Execution mode might have extra literal operands. Skip them.
|
||||||
case spv::OperandExecutionMode:
|
case spv::OperandExecutionMode:
|
||||||
return nextInst;
|
return nextInst;
|
||||||
@ -827,7 +830,15 @@ namespace spv {
|
|||||||
[&](spv::Id& id) {
|
[&](spv::Id& id) {
|
||||||
if (thisOpCode != spv::OpNop) {
|
if (thisOpCode != spv::OpNop) {
|
||||||
++idCounter;
|
++idCounter;
|
||||||
const std::uint32_t hashval = opCounter[thisOpCode] * thisOpCode * 50047 + idCounter + fnId * 117;
|
const std::uint32_t hashval =
|
||||||
|
// Explicitly cast operands to unsigned int to avoid integer
|
||||||
|
// promotion to signed int followed by integer overflow,
|
||||||
|
// which would result in undefined behavior.
|
||||||
|
static_cast<unsigned int>(opCounter[thisOpCode])
|
||||||
|
* thisOpCode
|
||||||
|
* 50047
|
||||||
|
+ idCounter
|
||||||
|
+ static_cast<unsigned int>(fnId) * 117;
|
||||||
|
|
||||||
if (isOldIdUnmapped(id))
|
if (isOldIdUnmapped(id))
|
||||||
localId(id, nextUnusedId(hashval % softTypeIdLimit + firstMappedID));
|
localId(id, nextUnusedId(hashval % softTypeIdLimit + firstMappedID));
|
||||||
|
|||||||
@ -621,13 +621,13 @@ Id Builder::makeAccelerationStructureType()
|
|||||||
Id Builder::makeRayQueryType()
|
Id Builder::makeRayQueryType()
|
||||||
{
|
{
|
||||||
Instruction *type;
|
Instruction *type;
|
||||||
if (groupedTypes[OpTypeRayQueryProvisionalKHR].size() == 0) {
|
if (groupedTypes[OpTypeRayQueryKHR].size() == 0) {
|
||||||
type = new Instruction(getUniqueId(), NoType, OpTypeRayQueryProvisionalKHR);
|
type = new Instruction(getUniqueId(), NoType, OpTypeRayQueryKHR);
|
||||||
groupedTypes[OpTypeRayQueryProvisionalKHR].push_back(type);
|
groupedTypes[OpTypeRayQueryKHR].push_back(type);
|
||||||
constantsTypesGlobals.push_back(std::unique_ptr<Instruction>(type));
|
constantsTypesGlobals.push_back(std::unique_ptr<Instruction>(type));
|
||||||
module.mapInstruction(type);
|
module.mapInstruction(type);
|
||||||
} else {
|
} else {
|
||||||
type = groupedTypes[OpTypeRayQueryProvisionalKHR].back();
|
type = groupedTypes[OpTypeRayQueryKHR].back();
|
||||||
}
|
}
|
||||||
|
|
||||||
return type->getResultId();
|
return type->getResultId();
|
||||||
@ -1183,6 +1183,28 @@ void Builder::addExecutionMode(Function* entryPoint, ExecutionMode mode, int val
|
|||||||
executionModes.push_back(std::unique_ptr<Instruction>(instr));
|
executionModes.push_back(std::unique_ptr<Instruction>(instr));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Builder::addExecutionMode(Function* entryPoint, ExecutionMode mode, const std::vector<unsigned>& literals)
|
||||||
|
{
|
||||||
|
Instruction* instr = new Instruction(OpExecutionMode);
|
||||||
|
instr->addIdOperand(entryPoint->getId());
|
||||||
|
instr->addImmediateOperand(mode);
|
||||||
|
for (auto literal : literals)
|
||||||
|
instr->addImmediateOperand(literal);
|
||||||
|
|
||||||
|
executionModes.push_back(std::unique_ptr<Instruction>(instr));
|
||||||
|
}
|
||||||
|
|
||||||
|
void Builder::addExecutionModeId(Function* entryPoint, ExecutionMode mode, const std::vector<Id>& operandIds)
|
||||||
|
{
|
||||||
|
Instruction* instr = new Instruction(OpExecutionModeId);
|
||||||
|
instr->addIdOperand(entryPoint->getId());
|
||||||
|
instr->addImmediateOperand(mode);
|
||||||
|
for (auto operandId : operandIds)
|
||||||
|
instr->addIdOperand(operandId);
|
||||||
|
|
||||||
|
executionModes.push_back(std::unique_ptr<Instruction>(instr));
|
||||||
|
}
|
||||||
|
|
||||||
void Builder::addName(Id id, const char* string)
|
void Builder::addName(Id id, const char* string)
|
||||||
{
|
{
|
||||||
Instruction* name = new Instruction(OpName);
|
Instruction* name = new Instruction(OpName);
|
||||||
@ -1221,7 +1243,7 @@ void Builder::addDecoration(Id id, Decoration decoration, const char* s)
|
|||||||
if (decoration == spv::DecorationMax)
|
if (decoration == spv::DecorationMax)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
Instruction* dec = new Instruction(OpDecorateStringGOOGLE);
|
Instruction* dec = new Instruction(OpDecorateString);
|
||||||
dec->addIdOperand(id);
|
dec->addIdOperand(id);
|
||||||
dec->addImmediateOperand(decoration);
|
dec->addImmediateOperand(decoration);
|
||||||
dec->addStringOperand(s);
|
dec->addStringOperand(s);
|
||||||
@ -1229,6 +1251,34 @@ void Builder::addDecoration(Id id, Decoration decoration, const char* s)
|
|||||||
decorations.push_back(std::unique_ptr<Instruction>(dec));
|
decorations.push_back(std::unique_ptr<Instruction>(dec));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Builder::addDecoration(Id id, Decoration decoration, const std::vector<unsigned>& literals)
|
||||||
|
{
|
||||||
|
if (decoration == spv::DecorationMax)
|
||||||
|
return;
|
||||||
|
|
||||||
|
Instruction* dec = new Instruction(OpDecorate);
|
||||||
|
dec->addIdOperand(id);
|
||||||
|
dec->addImmediateOperand(decoration);
|
||||||
|
for (auto literal : literals)
|
||||||
|
dec->addImmediateOperand(literal);
|
||||||
|
|
||||||
|
decorations.push_back(std::unique_ptr<Instruction>(dec));
|
||||||
|
}
|
||||||
|
|
||||||
|
void Builder::addDecoration(Id id, Decoration decoration, const std::vector<const char*>& strings)
|
||||||
|
{
|
||||||
|
if (decoration == spv::DecorationMax)
|
||||||
|
return;
|
||||||
|
|
||||||
|
Instruction* dec = new Instruction(OpDecorateString);
|
||||||
|
dec->addIdOperand(id);
|
||||||
|
dec->addImmediateOperand(decoration);
|
||||||
|
for (auto string : strings)
|
||||||
|
dec->addStringOperand(string);
|
||||||
|
|
||||||
|
decorations.push_back(std::unique_ptr<Instruction>(dec));
|
||||||
|
}
|
||||||
|
|
||||||
void Builder::addDecorationId(Id id, Decoration decoration, Id idDecoration)
|
void Builder::addDecorationId(Id id, Decoration decoration, Id idDecoration)
|
||||||
{
|
{
|
||||||
if (decoration == spv::DecorationMax)
|
if (decoration == spv::DecorationMax)
|
||||||
@ -1242,6 +1292,21 @@ void Builder::addDecorationId(Id id, Decoration decoration, Id idDecoration)
|
|||||||
decorations.push_back(std::unique_ptr<Instruction>(dec));
|
decorations.push_back(std::unique_ptr<Instruction>(dec));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Builder::addDecorationId(Id id, Decoration decoration, const std::vector<Id>& operandIds)
|
||||||
|
{
|
||||||
|
if(decoration == spv::DecorationMax)
|
||||||
|
return;
|
||||||
|
|
||||||
|
Instruction* dec = new Instruction(OpDecorateId);
|
||||||
|
dec->addIdOperand(id);
|
||||||
|
dec->addImmediateOperand(decoration);
|
||||||
|
|
||||||
|
for (auto operandId : operandIds)
|
||||||
|
dec->addIdOperand(operandId);
|
||||||
|
|
||||||
|
decorations.push_back(std::unique_ptr<Instruction>(dec));
|
||||||
|
}
|
||||||
|
|
||||||
void Builder::addMemberDecoration(Id id, unsigned int member, Decoration decoration, int num)
|
void Builder::addMemberDecoration(Id id, unsigned int member, Decoration decoration, int num)
|
||||||
{
|
{
|
||||||
if (decoration == spv::DecorationMax)
|
if (decoration == spv::DecorationMax)
|
||||||
@ -1271,6 +1336,36 @@ void Builder::addMemberDecoration(Id id, unsigned int member, Decoration decorat
|
|||||||
decorations.push_back(std::unique_ptr<Instruction>(dec));
|
decorations.push_back(std::unique_ptr<Instruction>(dec));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Builder::addMemberDecoration(Id id, unsigned int member, Decoration decoration, const std::vector<unsigned>& literals)
|
||||||
|
{
|
||||||
|
if (decoration == spv::DecorationMax)
|
||||||
|
return;
|
||||||
|
|
||||||
|
Instruction* dec = new Instruction(OpMemberDecorate);
|
||||||
|
dec->addIdOperand(id);
|
||||||
|
dec->addImmediateOperand(member);
|
||||||
|
dec->addImmediateOperand(decoration);
|
||||||
|
for (auto literal : literals)
|
||||||
|
dec->addImmediateOperand(literal);
|
||||||
|
|
||||||
|
decorations.push_back(std::unique_ptr<Instruction>(dec));
|
||||||
|
}
|
||||||
|
|
||||||
|
void Builder::addMemberDecoration(Id id, unsigned int member, Decoration decoration, const std::vector<const char*>& strings)
|
||||||
|
{
|
||||||
|
if (decoration == spv::DecorationMax)
|
||||||
|
return;
|
||||||
|
|
||||||
|
Instruction* dec = new Instruction(OpMemberDecorateString);
|
||||||
|
dec->addIdOperand(id);
|
||||||
|
dec->addImmediateOperand(member);
|
||||||
|
dec->addImmediateOperand(decoration);
|
||||||
|
for (auto string : strings)
|
||||||
|
dec->addStringOperand(string);
|
||||||
|
|
||||||
|
decorations.push_back(std::unique_ptr<Instruction>(dec));
|
||||||
|
}
|
||||||
|
|
||||||
// Comments in header
|
// Comments in header
|
||||||
Function* Builder::makeEntryPoint(const char* entryPoint)
|
Function* Builder::makeEntryPoint(const char* entryPoint)
|
||||||
{
|
{
|
||||||
@ -1352,10 +1447,10 @@ void Builder::leaveFunction()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Comments in header
|
// Comments in header
|
||||||
void Builder::makeDiscard()
|
void Builder::makeStatementTerminator(spv::Op opcode, const char *name)
|
||||||
{
|
{
|
||||||
buildPoint->addInstruction(std::unique_ptr<Instruction>(new Instruction(OpKill)));
|
buildPoint->addInstruction(std::unique_ptr<Instruction>(new Instruction(opcode)));
|
||||||
createAndSetNoPredecessorBlock("post-discard");
|
createAndSetNoPredecessorBlock(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Comments in header
|
// Comments in header
|
||||||
@ -2666,12 +2761,14 @@ void Builder::accessChainPushSwizzle(std::vector<unsigned>& swizzle, Id preSwizz
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Comments in header
|
// Comments in header
|
||||||
void Builder::accessChainStore(Id rvalue, spv::MemoryAccessMask memoryAccess, spv::Scope scope, unsigned int alignment)
|
void Builder::accessChainStore(Id rvalue, Decoration nonUniform, spv::MemoryAccessMask memoryAccess, spv::Scope scope, unsigned int alignment)
|
||||||
{
|
{
|
||||||
assert(accessChain.isRValue == false);
|
assert(accessChain.isRValue == false);
|
||||||
|
|
||||||
transferAccessChainSwizzle(true);
|
transferAccessChainSwizzle(true);
|
||||||
Id base = collapseAccessChain();
|
Id base = collapseAccessChain();
|
||||||
|
addDecoration(base, nonUniform);
|
||||||
|
|
||||||
Id source = rvalue;
|
Id source = rvalue;
|
||||||
|
|
||||||
// dynamic component should be gone
|
// dynamic component should be gone
|
||||||
@ -2694,8 +2791,9 @@ void Builder::accessChainStore(Id rvalue, spv::MemoryAccessMask memoryAccess, sp
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Comments in header
|
// Comments in header
|
||||||
Id Builder::accessChainLoad(Decoration precision, Decoration nonUniform, Id resultType,
|
Id Builder::accessChainLoad(Decoration precision, Decoration l_nonUniform,
|
||||||
spv::MemoryAccessMask memoryAccess, spv::Scope scope, unsigned int alignment)
|
Decoration r_nonUniform, Id resultType, spv::MemoryAccessMask memoryAccess,
|
||||||
|
spv::Scope scope, unsigned int alignment)
|
||||||
{
|
{
|
||||||
Id id;
|
Id id;
|
||||||
|
|
||||||
@ -2759,9 +2857,9 @@ Id Builder::accessChainLoad(Decoration precision, Decoration nonUniform, Id resu
|
|||||||
// Buffer accesses need the access chain decorated, and this is where
|
// Buffer accesses need the access chain decorated, and this is where
|
||||||
// loaded image types get decorated. TODO: This should maybe move to
|
// loaded image types get decorated. TODO: This should maybe move to
|
||||||
// createImageTextureFunctionCall.
|
// createImageTextureFunctionCall.
|
||||||
addDecoration(id, nonUniform);
|
addDecoration(id, l_nonUniform);
|
||||||
id = createLoad(id, precision, memoryAccess, scope, alignment);
|
id = createLoad(id, precision, memoryAccess, scope, alignment);
|
||||||
addDecoration(id, nonUniform);
|
addDecoration(id, r_nonUniform);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Done, unless there are swizzles to do
|
// Done, unless there are swizzles to do
|
||||||
@ -2782,7 +2880,7 @@ Id Builder::accessChainLoad(Decoration precision, Decoration nonUniform, Id resu
|
|||||||
if (accessChain.component != NoResult)
|
if (accessChain.component != NoResult)
|
||||||
id = setPrecision(createVectorExtractDynamic(id, resultType, accessChain.component), precision);
|
id = setPrecision(createVectorExtractDynamic(id, resultType, accessChain.component), precision);
|
||||||
|
|
||||||
addDecoration(id, nonUniform);
|
addDecoration(id, r_nonUniform);
|
||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -321,13 +321,20 @@ public:
|
|||||||
// Methods for adding information outside the CFG.
|
// Methods for adding information outside the CFG.
|
||||||
Instruction* addEntryPoint(ExecutionModel, Function*, const char* name);
|
Instruction* addEntryPoint(ExecutionModel, Function*, const char* name);
|
||||||
void addExecutionMode(Function*, ExecutionMode mode, int value1 = -1, int value2 = -1, int value3 = -1);
|
void addExecutionMode(Function*, ExecutionMode mode, int value1 = -1, int value2 = -1, int value3 = -1);
|
||||||
|
void addExecutionMode(Function*, ExecutionMode mode, const std::vector<unsigned>& literals);
|
||||||
|
void addExecutionModeId(Function*, ExecutionMode mode, const std::vector<Id>& operandIds);
|
||||||
void addName(Id, const char* name);
|
void addName(Id, const char* name);
|
||||||
void addMemberName(Id, int member, const char* name);
|
void addMemberName(Id, int member, const char* name);
|
||||||
void addDecoration(Id, Decoration, int num = -1);
|
void addDecoration(Id, Decoration, int num = -1);
|
||||||
void addDecoration(Id, Decoration, const char*);
|
void addDecoration(Id, Decoration, const char*);
|
||||||
|
void addDecoration(Id, Decoration, const std::vector<unsigned>& literals);
|
||||||
|
void addDecoration(Id, Decoration, const std::vector<const char*>& strings);
|
||||||
void addDecorationId(Id id, Decoration, Id idDecoration);
|
void addDecorationId(Id id, Decoration, Id idDecoration);
|
||||||
|
void addDecorationId(Id id, Decoration, const std::vector<Id>& operandIds);
|
||||||
void addMemberDecoration(Id, unsigned int member, Decoration, int num = -1);
|
void addMemberDecoration(Id, unsigned int member, Decoration, int num = -1);
|
||||||
void addMemberDecoration(Id, unsigned int member, Decoration, const char*);
|
void addMemberDecoration(Id, unsigned int member, Decoration, const char*);
|
||||||
|
void addMemberDecoration(Id, unsigned int member, Decoration, const std::vector<unsigned>& literals);
|
||||||
|
void addMemberDecoration(Id, unsigned int member, Decoration, const std::vector<const char*>& strings);
|
||||||
|
|
||||||
// At the end of what block do the next create*() instructions go?
|
// At the end of what block do the next create*() instructions go?
|
||||||
void setBuildPoint(Block* bp) { buildPoint = bp; }
|
void setBuildPoint(Block* bp) { buildPoint = bp; }
|
||||||
@ -350,8 +357,9 @@ public:
|
|||||||
// Generate all the code needed to finish up a function.
|
// Generate all the code needed to finish up a function.
|
||||||
void leaveFunction();
|
void leaveFunction();
|
||||||
|
|
||||||
// Create a discard.
|
// Create block terminator instruction for certain statements like
|
||||||
void makeDiscard();
|
// discard, terminate-invocation, terminateRayEXT, or ignoreIntersectionEXT
|
||||||
|
void makeStatementTerminator(spv::Op opcode, const char *name);
|
||||||
|
|
||||||
// Create a global or function local or IO variable.
|
// Create a global or function local or IO variable.
|
||||||
Id createVariable(Decoration precision, StorageClass, Id type, const char* name = nullptr,
|
Id createVariable(Decoration precision, StorageClass, Id type, const char* name = nullptr,
|
||||||
@ -617,6 +625,7 @@ public:
|
|||||||
CoherentFlags operator |=(const CoherentFlags &other) { return *this; }
|
CoherentFlags operator |=(const CoherentFlags &other) { return *this; }
|
||||||
#else
|
#else
|
||||||
bool isVolatile() const { return volatil; }
|
bool isVolatile() const { return volatil; }
|
||||||
|
bool isNonUniform() const { return nonUniform; }
|
||||||
bool anyCoherent() const {
|
bool anyCoherent() const {
|
||||||
return coherent || devicecoherent || queuefamilycoherent || workgroupcoherent ||
|
return coherent || devicecoherent || queuefamilycoherent || workgroupcoherent ||
|
||||||
subgroupcoherent || shadercallcoherent;
|
subgroupcoherent || shadercallcoherent;
|
||||||
@ -631,6 +640,7 @@ public:
|
|||||||
unsigned nonprivate : 1;
|
unsigned nonprivate : 1;
|
||||||
unsigned volatil : 1;
|
unsigned volatil : 1;
|
||||||
unsigned isImage : 1;
|
unsigned isImage : 1;
|
||||||
|
unsigned nonUniform : 1;
|
||||||
|
|
||||||
void clear() {
|
void clear() {
|
||||||
coherent = 0;
|
coherent = 0;
|
||||||
@ -642,6 +652,7 @@ public:
|
|||||||
nonprivate = 0;
|
nonprivate = 0;
|
||||||
volatil = 0;
|
volatil = 0;
|
||||||
isImage = 0;
|
isImage = 0;
|
||||||
|
nonUniform = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
CoherentFlags operator |=(const CoherentFlags &other) {
|
CoherentFlags operator |=(const CoherentFlags &other) {
|
||||||
@ -654,6 +665,7 @@ public:
|
|||||||
nonprivate |= other.nonprivate;
|
nonprivate |= other.nonprivate;
|
||||||
volatil |= other.volatil;
|
volatil |= other.volatil;
|
||||||
isImage |= other.isImage;
|
isImage |= other.isImage;
|
||||||
|
nonUniform |= other.nonUniform;
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@ -714,11 +726,12 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
// use accessChain and swizzle to store value
|
// use accessChain and swizzle to store value
|
||||||
void accessChainStore(Id rvalue, spv::MemoryAccessMask memoryAccess = spv::MemoryAccessMaskNone,
|
void accessChainStore(Id rvalue, Decoration nonUniform,
|
||||||
|
spv::MemoryAccessMask memoryAccess = spv::MemoryAccessMaskNone,
|
||||||
spv::Scope scope = spv::ScopeMax, unsigned int alignment = 0);
|
spv::Scope scope = spv::ScopeMax, unsigned int alignment = 0);
|
||||||
|
|
||||||
// use accessChain and swizzle to load an r-value
|
// use accessChain and swizzle to load an r-value
|
||||||
Id accessChainLoad(Decoration precision, Decoration nonUniform, Id ResultType,
|
Id accessChainLoad(Decoration precision, Decoration l_nonUniform, Decoration r_nonUniform, Id ResultType,
|
||||||
spv::MemoryAccessMask memoryAccess = spv::MemoryAccessMaskNone, spv::Scope scope = spv::ScopeMax,
|
spv::MemoryAccessMask memoryAccess = spv::MemoryAccessMaskNone, spv::Scope scope = spv::ScopeMax,
|
||||||
unsigned int alignment = 0);
|
unsigned int alignment = 0);
|
||||||
|
|
||||||
|
|||||||
@ -44,7 +44,6 @@
|
|||||||
|
|
||||||
#include "SpvTools.h"
|
#include "SpvTools.h"
|
||||||
#include "spirv-tools/optimizer.hpp"
|
#include "spirv-tools/optimizer.hpp"
|
||||||
#include "spirv-tools/libspirv.h"
|
|
||||||
|
|
||||||
namespace glslang {
|
namespace glslang {
|
||||||
|
|
||||||
@ -114,11 +113,18 @@ void OptimizerMesssageConsumer(spv_message_level_t level, const char *source,
|
|||||||
out << std::endl;
|
out << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Use the SPIRV-Tools disassembler to print SPIR-V.
|
// Use the SPIRV-Tools disassembler to print SPIR-V using a SPV_ENV_UNIVERSAL_1_3 environment.
|
||||||
void SpirvToolsDisassemble(std::ostream& out, const std::vector<unsigned int>& spirv)
|
void SpirvToolsDisassemble(std::ostream& out, const std::vector<unsigned int>& spirv)
|
||||||
|
{
|
||||||
|
SpirvToolsDisassemble(out, spirv, spv_target_env::SPV_ENV_UNIVERSAL_1_3);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Use the SPIRV-Tools disassembler to print SPIR-V with a provided SPIR-V environment.
|
||||||
|
void SpirvToolsDisassemble(std::ostream& out, const std::vector<unsigned int>& spirv,
|
||||||
|
spv_target_env requested_context)
|
||||||
{
|
{
|
||||||
// disassemble
|
// disassemble
|
||||||
spv_context context = spvContextCreate(SPV_ENV_UNIVERSAL_1_3);
|
spv_context context = spvContextCreate(requested_context);
|
||||||
spv_text text;
|
spv_text text;
|
||||||
spv_diagnostic diagnostic = nullptr;
|
spv_diagnostic diagnostic = nullptr;
|
||||||
spvBinaryToText(context, spirv.data(), spirv.size(),
|
spvBinaryToText(context, spirv.data(), spirv.size(),
|
||||||
@ -174,10 +180,7 @@ void SpirvToolsTransform(const glslang::TIntermediate& intermediate, std::vector
|
|||||||
// line information into all SPIR-V instructions. This avoids loss of
|
// line information into all SPIR-V instructions. This avoids loss of
|
||||||
// information when instructions are deleted or moved. Later, remove
|
// information when instructions are deleted or moved. Later, remove
|
||||||
// redundant information to minimize final SPRIR-V size.
|
// redundant information to minimize final SPRIR-V size.
|
||||||
if (options->generateDebugInfo) {
|
if (options->stripDebugInfo) {
|
||||||
optimizer.RegisterPass(spvtools::CreatePropagateLineInfoPass());
|
|
||||||
}
|
|
||||||
else if (options->stripDebugInfo) {
|
|
||||||
optimizer.RegisterPass(spvtools::CreateStripDebugInfoPass());
|
optimizer.RegisterPass(spvtools::CreateStripDebugInfoPass());
|
||||||
}
|
}
|
||||||
optimizer.RegisterPass(spvtools::CreateWrapOpKillPass());
|
optimizer.RegisterPass(spvtools::CreateWrapOpKillPass());
|
||||||
@ -207,9 +210,6 @@ void SpirvToolsTransform(const glslang::TIntermediate& intermediate, std::vector
|
|||||||
}
|
}
|
||||||
optimizer.RegisterPass(spvtools::CreateAggressiveDCEPass());
|
optimizer.RegisterPass(spvtools::CreateAggressiveDCEPass());
|
||||||
optimizer.RegisterPass(spvtools::CreateCFGCleanupPass());
|
optimizer.RegisterPass(spvtools::CreateCFGCleanupPass());
|
||||||
if (options->generateDebugInfo) {
|
|
||||||
optimizer.RegisterPass(spvtools::CreateRedundantLineInfoElimPass());
|
|
||||||
}
|
|
||||||
|
|
||||||
spvtools::OptimizerOptions spvOptOptions;
|
spvtools::OptimizerOptions spvOptOptions;
|
||||||
optimizer.SetTargetEnv(MapToSpirvToolsEnv(intermediate.getSpv(), logger));
|
optimizer.SetTargetEnv(MapToSpirvToolsEnv(intermediate.getSpv(), logger));
|
||||||
|
|||||||
@ -41,9 +41,10 @@
|
|||||||
#ifndef GLSLANG_SPV_TOOLS_H
|
#ifndef GLSLANG_SPV_TOOLS_H
|
||||||
#define GLSLANG_SPV_TOOLS_H
|
#define GLSLANG_SPV_TOOLS_H
|
||||||
|
|
||||||
#ifdef ENABLE_OPT
|
#if ENABLE_OPT
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <ostream>
|
#include <ostream>
|
||||||
|
#include "spirv-tools/libspirv.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "glslang/MachineIndependent/localintermediate.h"
|
#include "glslang/MachineIndependent/localintermediate.h"
|
||||||
@ -62,11 +63,15 @@ struct SpvOptions {
|
|||||||
bool validate;
|
bool validate;
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef ENABLE_OPT
|
#if ENABLE_OPT
|
||||||
|
|
||||||
// Use the SPIRV-Tools disassembler to print SPIR-V.
|
// Use the SPIRV-Tools disassembler to print SPIR-V using a SPV_ENV_UNIVERSAL_1_3 environment.
|
||||||
void SpirvToolsDisassemble(std::ostream& out, const std::vector<unsigned int>& spirv);
|
void SpirvToolsDisassemble(std::ostream& out, const std::vector<unsigned int>& spirv);
|
||||||
|
|
||||||
|
// Use the SPIRV-Tools disassembler to print SPIR-V with a provided SPIR-V environment.
|
||||||
|
void SpirvToolsDisassemble(std::ostream& out, const std::vector<unsigned int>& spirv,
|
||||||
|
spv_target_env requested_context);
|
||||||
|
|
||||||
// Apply the SPIRV-Tools validator to generated SPIR-V.
|
// Apply the SPIRV-Tools validator to generated SPIR-V.
|
||||||
void SpirvToolsValidate(const glslang::TIntermediate& intermediate, std::vector<unsigned int>& spirv,
|
void SpirvToolsValidate(const glslang::TIntermediate& intermediate, std::vector<unsigned int>& spirv,
|
||||||
spv::SpvBuildLogger*, bool prelegalization);
|
spv::SpvBuildLogger*, bool prelegalization);
|
||||||
|
|||||||
@ -46,7 +46,6 @@
|
|||||||
|
|
||||||
#include "disassemble.h"
|
#include "disassemble.h"
|
||||||
#include "doc.h"
|
#include "doc.h"
|
||||||
#include "SpvTools.h"
|
|
||||||
|
|
||||||
namespace spv {
|
namespace spv {
|
||||||
extern "C" {
|
extern "C" {
|
||||||
@ -519,6 +518,10 @@ void SpirvStream::disassembleInstruction(Id resultId, Id /*typeId*/, Op opCode,
|
|||||||
case OperandLiteralString:
|
case OperandLiteralString:
|
||||||
numOperands -= disassembleString();
|
numOperands -= disassembleString();
|
||||||
break;
|
break;
|
||||||
|
case OperandVariableLiteralStrings:
|
||||||
|
while (numOperands > 0)
|
||||||
|
numOperands -= disassembleString();
|
||||||
|
return;
|
||||||
case OperandMemoryAccess:
|
case OperandMemoryAccess:
|
||||||
outputMask(OperandMemoryAccess, stream[word++]);
|
outputMask(OperandMemoryAccess, stream[word++]);
|
||||||
--numOperands;
|
--numOperands;
|
||||||
|
|||||||
@ -372,6 +372,8 @@ const char* BuiltInString(int builtIn)
|
|||||||
case 4424: return "BaseVertex";
|
case 4424: return "BaseVertex";
|
||||||
case 4425: return "BaseInstance";
|
case 4425: return "BaseInstance";
|
||||||
case 4426: return "DrawIndex";
|
case 4426: return "DrawIndex";
|
||||||
|
case 4432: return "PrimitiveShadingRateKHR";
|
||||||
|
case 4444: return "ShadingRateKHR";
|
||||||
case 5014: return "FragStencilRefEXT";
|
case 5014: return "FragStencilRefEXT";
|
||||||
|
|
||||||
case 4992: return "BaryCoordNoPerspAMD";
|
case 4992: return "BaryCoordNoPerspAMD";
|
||||||
@ -393,7 +395,7 @@ const char* BuiltInString(int builtIn)
|
|||||||
case BuiltInRayGeometryIndexKHR: return "RayGeometryIndexKHR";
|
case BuiltInRayGeometryIndexKHR: return "RayGeometryIndexKHR";
|
||||||
case BuiltInObjectToWorldKHR: return "ObjectToWorldKHR";
|
case BuiltInObjectToWorldKHR: return "ObjectToWorldKHR";
|
||||||
case BuiltInWorldToObjectKHR: return "WorldToObjectKHR";
|
case BuiltInWorldToObjectKHR: return "WorldToObjectKHR";
|
||||||
case BuiltInHitTKHR: return "HitTKHR";
|
case BuiltInHitTNV: return "HitTNV";
|
||||||
case BuiltInHitKindKHR: return "HitKindKHR";
|
case BuiltInHitKindKHR: return "HitKindKHR";
|
||||||
case BuiltInIncomingRayFlagsKHR: return "IncomingRayFlagsKHR";
|
case BuiltInIncomingRayFlagsKHR: return "IncomingRayFlagsKHR";
|
||||||
case BuiltInViewportMaskNV: return "ViewportMaskNV";
|
case BuiltInViewportMaskNV: return "ViewportMaskNV";
|
||||||
@ -521,6 +523,8 @@ const char* ImageFormatString(int format)
|
|||||||
case 37: return "Rg8ui";
|
case 37: return "Rg8ui";
|
||||||
case 38: return "R16ui";
|
case 38: return "R16ui";
|
||||||
case 39: return "R8ui";
|
case 39: return "R8ui";
|
||||||
|
case 40: return "R64ui";
|
||||||
|
case 41: return "R64i";
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return "Bad";
|
return "Bad";
|
||||||
@ -911,9 +915,9 @@ const char* CapabilityString(int info)
|
|||||||
case CapabilityPerViewAttributesNV: return "PerViewAttributesNV";
|
case CapabilityPerViewAttributesNV: return "PerViewAttributesNV";
|
||||||
case CapabilityGroupNonUniformPartitionedNV: return "GroupNonUniformPartitionedNV";
|
case CapabilityGroupNonUniformPartitionedNV: return "GroupNonUniformPartitionedNV";
|
||||||
case CapabilityRayTracingNV: return "RayTracingNV";
|
case CapabilityRayTracingNV: return "RayTracingNV";
|
||||||
case CapabilityRayTracingProvisionalKHR: return "RayTracingProvisionalKHR";
|
case CapabilityRayTracingKHR: return "RayTracingKHR";
|
||||||
case CapabilityRayQueryProvisionalKHR: return "RayQueryProvisionalKHR";
|
case CapabilityRayQueryKHR: return "RayQueryKHR";
|
||||||
case CapabilityRayTraversalPrimitiveCullingProvisionalKHR: return "RayTraversalPrimitiveCullingProvisionalKHR";
|
case CapabilityRayTraversalPrimitiveCullingKHR: return "RayTraversalPrimitiveCullingKHR";
|
||||||
case CapabilityComputeDerivativeGroupQuadsNV: return "ComputeDerivativeGroupQuadsNV";
|
case CapabilityComputeDerivativeGroupQuadsNV: return "ComputeDerivativeGroupQuadsNV";
|
||||||
case CapabilityComputeDerivativeGroupLinearNV: return "ComputeDerivativeGroupLinearNV";
|
case CapabilityComputeDerivativeGroupLinearNV: return "ComputeDerivativeGroupLinearNV";
|
||||||
case CapabilityFragmentBarycentricNV: return "FragmentBarycentricNV";
|
case CapabilityFragmentBarycentricNV: return "FragmentBarycentricNV";
|
||||||
@ -952,8 +956,11 @@ const char* CapabilityString(int info)
|
|||||||
case CapabilityFragmentShaderPixelInterlockEXT: return "CapabilityFragmentShaderPixelInterlockEXT";
|
case CapabilityFragmentShaderPixelInterlockEXT: return "CapabilityFragmentShaderPixelInterlockEXT";
|
||||||
case CapabilityFragmentShaderShadingRateInterlockEXT: return "CapabilityFragmentShaderShadingRateInterlockEXT";
|
case CapabilityFragmentShaderShadingRateInterlockEXT: return "CapabilityFragmentShaderShadingRateInterlockEXT";
|
||||||
|
|
||||||
|
case CapabilityFragmentShadingRateKHR: return "FragmentShadingRateKHR";
|
||||||
|
|
||||||
case CapabilityDemoteToHelperInvocationEXT: return "DemoteToHelperInvocationEXT";
|
case CapabilityDemoteToHelperInvocationEXT: return "DemoteToHelperInvocationEXT";
|
||||||
case CapabilityShaderClockKHR: return "ShaderClockKHR";
|
case CapabilityShaderClockKHR: return "ShaderClockKHR";
|
||||||
|
case CapabilityInt64ImageEXT: return "Int64ImageEXT";
|
||||||
|
|
||||||
case CapabilityIntegerFunctions2INTEL: return "CapabilityIntegerFunctions2INTEL";
|
case CapabilityIntegerFunctions2INTEL: return "CapabilityIntegerFunctions2INTEL";
|
||||||
|
|
||||||
@ -1329,6 +1336,8 @@ const char* OpcodeString(int op)
|
|||||||
case 365: return "OpGroupNonUniformQuadBroadcast";
|
case 365: return "OpGroupNonUniformQuadBroadcast";
|
||||||
case 366: return "OpGroupNonUniformQuadSwap";
|
case 366: return "OpGroupNonUniformQuadSwap";
|
||||||
|
|
||||||
|
case OpTerminateInvocation: return "OpTerminateInvocation";
|
||||||
|
|
||||||
case 4421: return "OpSubgroupBallotKHR";
|
case 4421: return "OpSubgroupBallotKHR";
|
||||||
case 4422: return "OpSubgroupFirstInvocationKHR";
|
case 4422: return "OpSubgroupFirstInvocationKHR";
|
||||||
case 4428: return "OpSubgroupAllKHR";
|
case 4428: return "OpSubgroupAllKHR";
|
||||||
@ -1355,17 +1364,23 @@ const char* OpcodeString(int op)
|
|||||||
case OpDecorateStringGOOGLE: return "OpDecorateStringGOOGLE";
|
case OpDecorateStringGOOGLE: return "OpDecorateStringGOOGLE";
|
||||||
case OpMemberDecorateStringGOOGLE: return "OpMemberDecorateStringGOOGLE";
|
case OpMemberDecorateStringGOOGLE: return "OpMemberDecorateStringGOOGLE";
|
||||||
|
|
||||||
case OpGroupNonUniformPartitionNV: return "OpGroupNonUniformPartitionNV";
|
|
||||||
case OpReportIntersectionKHR: return "OpReportIntersectionKHR";
|
case OpReportIntersectionKHR: return "OpReportIntersectionKHR";
|
||||||
|
case OpIgnoreIntersectionNV: return "OpIgnoreIntersectionNV";
|
||||||
case OpIgnoreIntersectionKHR: return "OpIgnoreIntersectionKHR";
|
case OpIgnoreIntersectionKHR: return "OpIgnoreIntersectionKHR";
|
||||||
|
case OpTerminateRayNV: return "OpTerminateRayNV";
|
||||||
case OpTerminateRayKHR: return "OpTerminateRayKHR";
|
case OpTerminateRayKHR: return "OpTerminateRayKHR";
|
||||||
|
case OpTraceNV: return "OpTraceNV";
|
||||||
case OpTraceRayKHR: return "OpTraceRayKHR";
|
case OpTraceRayKHR: return "OpTraceRayKHR";
|
||||||
case OpTypeAccelerationStructureKHR: return "OpTypeAccelerationStructureKHR";
|
case OpTypeAccelerationStructureKHR: return "OpTypeAccelerationStructureKHR";
|
||||||
|
case OpExecuteCallableNV: return "OpExecuteCallableNV";
|
||||||
case OpExecuteCallableKHR: return "OpExecuteCallableKHR";
|
case OpExecuteCallableKHR: return "OpExecuteCallableKHR";
|
||||||
|
case OpConvertUToAccelerationStructureKHR: return "OpConvertUToAccelerationStructureKHR";
|
||||||
|
|
||||||
|
case OpGroupNonUniformPartitionNV: return "OpGroupNonUniformPartitionNV";
|
||||||
case OpImageSampleFootprintNV: return "OpImageSampleFootprintNV";
|
case OpImageSampleFootprintNV: return "OpImageSampleFootprintNV";
|
||||||
case OpWritePackedPrimitiveIndices4x8NV: return "OpWritePackedPrimitiveIndices4x8NV";
|
case OpWritePackedPrimitiveIndices4x8NV: return "OpWritePackedPrimitiveIndices4x8NV";
|
||||||
|
|
||||||
case OpTypeRayQueryProvisionalKHR: return "OpTypeRayQueryProvisionalKHR";
|
case OpTypeRayQueryKHR: return "OpTypeRayQueryKHR";
|
||||||
case OpRayQueryInitializeKHR: return "OpRayQueryInitializeKHR";
|
case OpRayQueryInitializeKHR: return "OpRayQueryInitializeKHR";
|
||||||
case OpRayQueryTerminateKHR: return "OpRayQueryTerminateKHR";
|
case OpRayQueryTerminateKHR: return "OpRayQueryTerminateKHR";
|
||||||
case OpRayQueryGenerateIntersectionKHR: return "OpRayQueryGenerateIntersectionKHR";
|
case OpRayQueryGenerateIntersectionKHR: return "OpRayQueryGenerateIntersectionKHR";
|
||||||
@ -1497,6 +1512,7 @@ void Parameterize()
|
|||||||
InstructionDesc[OpBranchConditional].setResultAndType(false, false);
|
InstructionDesc[OpBranchConditional].setResultAndType(false, false);
|
||||||
InstructionDesc[OpSwitch].setResultAndType(false, false);
|
InstructionDesc[OpSwitch].setResultAndType(false, false);
|
||||||
InstructionDesc[OpKill].setResultAndType(false, false);
|
InstructionDesc[OpKill].setResultAndType(false, false);
|
||||||
|
InstructionDesc[OpTerminateInvocation].setResultAndType(false, false);
|
||||||
InstructionDesc[OpReturn].setResultAndType(false, false);
|
InstructionDesc[OpReturn].setResultAndType(false, false);
|
||||||
InstructionDesc[OpReturnValue].setResultAndType(false, false);
|
InstructionDesc[OpReturnValue].setResultAndType(false, false);
|
||||||
InstructionDesc[OpUnreachable].setResultAndType(false, false);
|
InstructionDesc[OpUnreachable].setResultAndType(false, false);
|
||||||
@ -1727,7 +1743,7 @@ void Parameterize()
|
|||||||
|
|
||||||
InstructionDesc[OpDecorateStringGOOGLE].operands.push(OperandId, "'Target'");
|
InstructionDesc[OpDecorateStringGOOGLE].operands.push(OperandId, "'Target'");
|
||||||
InstructionDesc[OpDecorateStringGOOGLE].operands.push(OperandDecoration, "");
|
InstructionDesc[OpDecorateStringGOOGLE].operands.push(OperandDecoration, "");
|
||||||
InstructionDesc[OpDecorateStringGOOGLE].operands.push(OperandLiteralString, "'Literal String'");
|
InstructionDesc[OpDecorateStringGOOGLE].operands.push(OperandVariableLiteralStrings, "'Literal Strings'");
|
||||||
|
|
||||||
InstructionDesc[OpMemberDecorate].operands.push(OperandId, "'Structure Type'");
|
InstructionDesc[OpMemberDecorate].operands.push(OperandId, "'Structure Type'");
|
||||||
InstructionDesc[OpMemberDecorate].operands.push(OperandLiteralNumber, "'Member'");
|
InstructionDesc[OpMemberDecorate].operands.push(OperandLiteralNumber, "'Member'");
|
||||||
@ -1737,7 +1753,7 @@ void Parameterize()
|
|||||||
InstructionDesc[OpMemberDecorateStringGOOGLE].operands.push(OperandId, "'Structure Type'");
|
InstructionDesc[OpMemberDecorateStringGOOGLE].operands.push(OperandId, "'Structure Type'");
|
||||||
InstructionDesc[OpMemberDecorateStringGOOGLE].operands.push(OperandLiteralNumber, "'Member'");
|
InstructionDesc[OpMemberDecorateStringGOOGLE].operands.push(OperandLiteralNumber, "'Member'");
|
||||||
InstructionDesc[OpMemberDecorateStringGOOGLE].operands.push(OperandDecoration, "");
|
InstructionDesc[OpMemberDecorateStringGOOGLE].operands.push(OperandDecoration, "");
|
||||||
InstructionDesc[OpMemberDecorateStringGOOGLE].operands.push(OperandLiteralString, "'Literal String'");
|
InstructionDesc[OpMemberDecorateStringGOOGLE].operands.push(OperandVariableLiteralStrings, "'Literal Strings'");
|
||||||
|
|
||||||
InstructionDesc[OpGroupDecorate].operands.push(OperandId, "'Decoration Group'");
|
InstructionDesc[OpGroupDecorate].operands.push(OperandId, "'Decoration Group'");
|
||||||
InstructionDesc[OpGroupDecorate].operands.push(OperandVariableIds, "'Targets'");
|
InstructionDesc[OpGroupDecorate].operands.push(OperandVariableIds, "'Targets'");
|
||||||
@ -2761,7 +2777,20 @@ void Parameterize()
|
|||||||
|
|
||||||
InstructionDesc[OpTypeAccelerationStructureKHR].setResultAndType(true, false);
|
InstructionDesc[OpTypeAccelerationStructureKHR].setResultAndType(true, false);
|
||||||
|
|
||||||
InstructionDesc[OpTraceRayKHR].operands.push(OperandId, "'NV Acceleration Structure'");
|
InstructionDesc[OpTraceNV].operands.push(OperandId, "'Acceleration Structure'");
|
||||||
|
InstructionDesc[OpTraceNV].operands.push(OperandId, "'Ray Flags'");
|
||||||
|
InstructionDesc[OpTraceNV].operands.push(OperandId, "'Cull Mask'");
|
||||||
|
InstructionDesc[OpTraceNV].operands.push(OperandId, "'SBT Record Offset'");
|
||||||
|
InstructionDesc[OpTraceNV].operands.push(OperandId, "'SBT Record Stride'");
|
||||||
|
InstructionDesc[OpTraceNV].operands.push(OperandId, "'Miss Index'");
|
||||||
|
InstructionDesc[OpTraceNV].operands.push(OperandId, "'Ray Origin'");
|
||||||
|
InstructionDesc[OpTraceNV].operands.push(OperandId, "'TMin'");
|
||||||
|
InstructionDesc[OpTraceNV].operands.push(OperandId, "'Ray Direction'");
|
||||||
|
InstructionDesc[OpTraceNV].operands.push(OperandId, "'TMax'");
|
||||||
|
InstructionDesc[OpTraceNV].operands.push(OperandId, "'Payload'");
|
||||||
|
InstructionDesc[OpTraceNV].setResultAndType(false, false);
|
||||||
|
|
||||||
|
InstructionDesc[OpTraceRayKHR].operands.push(OperandId, "'Acceleration Structure'");
|
||||||
InstructionDesc[OpTraceRayKHR].operands.push(OperandId, "'Ray Flags'");
|
InstructionDesc[OpTraceRayKHR].operands.push(OperandId, "'Ray Flags'");
|
||||||
InstructionDesc[OpTraceRayKHR].operands.push(OperandId, "'Cull Mask'");
|
InstructionDesc[OpTraceRayKHR].operands.push(OperandId, "'Cull Mask'");
|
||||||
InstructionDesc[OpTraceRayKHR].operands.push(OperandId, "'SBT Record Offset'");
|
InstructionDesc[OpTraceRayKHR].operands.push(OperandId, "'SBT Record Offset'");
|
||||||
@ -2777,17 +2806,28 @@ void Parameterize()
|
|||||||
InstructionDesc[OpReportIntersectionKHR].operands.push(OperandId, "'Hit Parameter'");
|
InstructionDesc[OpReportIntersectionKHR].operands.push(OperandId, "'Hit Parameter'");
|
||||||
InstructionDesc[OpReportIntersectionKHR].operands.push(OperandId, "'Hit Kind'");
|
InstructionDesc[OpReportIntersectionKHR].operands.push(OperandId, "'Hit Kind'");
|
||||||
|
|
||||||
|
InstructionDesc[OpIgnoreIntersectionNV].setResultAndType(false, false);
|
||||||
|
|
||||||
InstructionDesc[OpIgnoreIntersectionKHR].setResultAndType(false, false);
|
InstructionDesc[OpIgnoreIntersectionKHR].setResultAndType(false, false);
|
||||||
|
|
||||||
|
InstructionDesc[OpTerminateRayNV].setResultAndType(false, false);
|
||||||
|
|
||||||
InstructionDesc[OpTerminateRayKHR].setResultAndType(false, false);
|
InstructionDesc[OpTerminateRayKHR].setResultAndType(false, false);
|
||||||
|
|
||||||
|
InstructionDesc[OpExecuteCallableNV].operands.push(OperandId, "SBT Record Index");
|
||||||
|
InstructionDesc[OpExecuteCallableNV].operands.push(OperandId, "CallableData ID");
|
||||||
|
InstructionDesc[OpExecuteCallableNV].setResultAndType(false, false);
|
||||||
|
|
||||||
InstructionDesc[OpExecuteCallableKHR].operands.push(OperandId, "SBT Record Index");
|
InstructionDesc[OpExecuteCallableKHR].operands.push(OperandId, "SBT Record Index");
|
||||||
InstructionDesc[OpExecuteCallableKHR].operands.push(OperandId, "CallableData ID");
|
InstructionDesc[OpExecuteCallableKHR].operands.push(OperandId, "CallableData");
|
||||||
InstructionDesc[OpExecuteCallableKHR].setResultAndType(false, false);
|
InstructionDesc[OpExecuteCallableKHR].setResultAndType(false, false);
|
||||||
|
|
||||||
|
InstructionDesc[OpConvertUToAccelerationStructureKHR].operands.push(OperandId, "Value");
|
||||||
|
InstructionDesc[OpConvertUToAccelerationStructureKHR].setResultAndType(true, true);
|
||||||
|
|
||||||
// Ray Query
|
// Ray Query
|
||||||
InstructionDesc[OpTypeAccelerationStructureKHR].setResultAndType(true, false);
|
InstructionDesc[OpTypeAccelerationStructureKHR].setResultAndType(true, false);
|
||||||
InstructionDesc[OpTypeRayQueryProvisionalKHR].setResultAndType(true, false);
|
InstructionDesc[OpTypeRayQueryKHR].setResultAndType(true, false);
|
||||||
|
|
||||||
InstructionDesc[OpRayQueryInitializeKHR].operands.push(OperandId, "'RayQuery'");
|
InstructionDesc[OpRayQueryInitializeKHR].operands.push(OperandId, "'RayQuery'");
|
||||||
InstructionDesc[OpRayQueryInitializeKHR].operands.push(OperandId, "'AccelerationS'");
|
InstructionDesc[OpRayQueryInitializeKHR].operands.push(OperandId, "'AccelerationS'");
|
||||||
|
|||||||
@ -125,6 +125,7 @@ enum OperandClass {
|
|||||||
OperandVariableLiteralId,
|
OperandVariableLiteralId,
|
||||||
OperandLiteralNumber,
|
OperandLiteralNumber,
|
||||||
OperandLiteralString,
|
OperandLiteralString,
|
||||||
|
OperandVariableLiteralStrings,
|
||||||
OperandSource,
|
OperandSource,
|
||||||
OperandExecutionModel,
|
OperandExecutionModel,
|
||||||
OperandAddressing,
|
OperandAddressing,
|
||||||
|
|||||||
@ -50,11 +50,11 @@ namespace spv {
|
|||||||
typedef unsigned int Id;
|
typedef unsigned int Id;
|
||||||
|
|
||||||
#define SPV_VERSION 0x10500
|
#define SPV_VERSION 0x10500
|
||||||
#define SPV_REVISION 3
|
#define SPV_REVISION 4
|
||||||
|
|
||||||
static const unsigned int MagicNumber = 0x07230203;
|
static const unsigned int MagicNumber = 0x07230203;
|
||||||
static const unsigned int Version = 0x00010500;
|
static const unsigned int Version = 0x00010500;
|
||||||
static const unsigned int Revision = 3;
|
static const unsigned int Revision = 4;
|
||||||
static const unsigned int OpCodeMask = 0xffff;
|
static const unsigned int OpCodeMask = 0xffff;
|
||||||
static const unsigned int WordCountShift = 16;
|
static const unsigned int WordCountShift = 16;
|
||||||
|
|
||||||
@ -274,6 +274,8 @@ enum ImageFormat {
|
|||||||
ImageFormatRg8ui = 37,
|
ImageFormatRg8ui = 37,
|
||||||
ImageFormatR16ui = 38,
|
ImageFormatR16ui = 38,
|
||||||
ImageFormatR8ui = 39,
|
ImageFormatR8ui = 39,
|
||||||
|
ImageFormatR64ui = 40,
|
||||||
|
ImageFormatR64i = 41,
|
||||||
ImageFormatMax = 0x7fffffff,
|
ImageFormatMax = 0x7fffffff,
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -558,8 +560,10 @@ enum BuiltIn {
|
|||||||
BuiltInBaseVertex = 4424,
|
BuiltInBaseVertex = 4424,
|
||||||
BuiltInBaseInstance = 4425,
|
BuiltInBaseInstance = 4425,
|
||||||
BuiltInDrawIndex = 4426,
|
BuiltInDrawIndex = 4426,
|
||||||
|
BuiltInPrimitiveShadingRateKHR = 4432,
|
||||||
BuiltInDeviceIndex = 4438,
|
BuiltInDeviceIndex = 4438,
|
||||||
BuiltInViewIndex = 4440,
|
BuiltInViewIndex = 4440,
|
||||||
|
BuiltInShadingRateKHR = 4444,
|
||||||
BuiltInBaryCoordNoPerspAMD = 4992,
|
BuiltInBaryCoordNoPerspAMD = 4992,
|
||||||
BuiltInBaryCoordNoPerspCentroidAMD = 4993,
|
BuiltInBaryCoordNoPerspCentroidAMD = 4993,
|
||||||
BuiltInBaryCoordNoPerspSampleAMD = 4994,
|
BuiltInBaryCoordNoPerspSampleAMD = 4994,
|
||||||
@ -610,7 +614,6 @@ enum BuiltIn {
|
|||||||
BuiltInObjectToWorldNV = 5330,
|
BuiltInObjectToWorldNV = 5330,
|
||||||
BuiltInWorldToObjectKHR = 5331,
|
BuiltInWorldToObjectKHR = 5331,
|
||||||
BuiltInWorldToObjectNV = 5331,
|
BuiltInWorldToObjectNV = 5331,
|
||||||
BuiltInHitTKHR = 5332,
|
|
||||||
BuiltInHitTNV = 5332,
|
BuiltInHitTNV = 5332,
|
||||||
BuiltInHitKindKHR = 5333,
|
BuiltInHitKindKHR = 5333,
|
||||||
BuiltInHitKindNV = 5333,
|
BuiltInHitKindNV = 5333,
|
||||||
@ -870,6 +873,7 @@ enum Capability {
|
|||||||
CapabilityGroupNonUniformQuad = 68,
|
CapabilityGroupNonUniformQuad = 68,
|
||||||
CapabilityShaderLayer = 69,
|
CapabilityShaderLayer = 69,
|
||||||
CapabilityShaderViewportIndex = 70,
|
CapabilityShaderViewportIndex = 70,
|
||||||
|
CapabilityFragmentShadingRateKHR = 4422,
|
||||||
CapabilitySubgroupBallotKHR = 4423,
|
CapabilitySubgroupBallotKHR = 4423,
|
||||||
CapabilityDrawParameters = 4427,
|
CapabilityDrawParameters = 4427,
|
||||||
CapabilitySubgroupVoteKHR = 4431,
|
CapabilitySubgroupVoteKHR = 4431,
|
||||||
@ -894,12 +898,15 @@ enum Capability {
|
|||||||
CapabilityRoundingModeRTE = 4467,
|
CapabilityRoundingModeRTE = 4467,
|
||||||
CapabilityRoundingModeRTZ = 4468,
|
CapabilityRoundingModeRTZ = 4468,
|
||||||
CapabilityRayQueryProvisionalKHR = 4471,
|
CapabilityRayQueryProvisionalKHR = 4471,
|
||||||
CapabilityRayTraversalPrimitiveCullingProvisionalKHR = 4478,
|
CapabilityRayQueryKHR = 4472,
|
||||||
|
CapabilityRayTraversalPrimitiveCullingKHR = 4478,
|
||||||
|
CapabilityRayTracingKHR = 4479,
|
||||||
CapabilityFloat16ImageAMD = 5008,
|
CapabilityFloat16ImageAMD = 5008,
|
||||||
CapabilityImageGatherBiasLodAMD = 5009,
|
CapabilityImageGatherBiasLodAMD = 5009,
|
||||||
CapabilityFragmentMaskAMD = 5010,
|
CapabilityFragmentMaskAMD = 5010,
|
||||||
CapabilityStencilExportEXT = 5013,
|
CapabilityStencilExportEXT = 5013,
|
||||||
CapabilityImageReadWriteLodAMD = 5015,
|
CapabilityImageReadWriteLodAMD = 5015,
|
||||||
|
CapabilityInt64ImageEXT = 5016,
|
||||||
CapabilityShaderClockKHR = 5055,
|
CapabilityShaderClockKHR = 5055,
|
||||||
CapabilitySampleMaskOverrideCoverageNV = 5249,
|
CapabilitySampleMaskOverrideCoverageNV = 5249,
|
||||||
CapabilityGeometryShaderPassthroughNV = 5251,
|
CapabilityGeometryShaderPassthroughNV = 5251,
|
||||||
@ -1024,6 +1031,22 @@ enum RayQueryCandidateIntersectionType {
|
|||||||
RayQueryCandidateIntersectionTypeMax = 0x7fffffff,
|
RayQueryCandidateIntersectionTypeMax = 0x7fffffff,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum FragmentShadingRateShift {
|
||||||
|
FragmentShadingRateVertical2PixelsShift = 0,
|
||||||
|
FragmentShadingRateVertical4PixelsShift = 1,
|
||||||
|
FragmentShadingRateHorizontal2PixelsShift = 2,
|
||||||
|
FragmentShadingRateHorizontal4PixelsShift = 3,
|
||||||
|
FragmentShadingRateMax = 0x7fffffff,
|
||||||
|
};
|
||||||
|
|
||||||
|
enum FragmentShadingRateMask {
|
||||||
|
FragmentShadingRateMaskNone = 0,
|
||||||
|
FragmentShadingRateVertical2PixelsMask = 0x00000001,
|
||||||
|
FragmentShadingRateVertical4PixelsMask = 0x00000002,
|
||||||
|
FragmentShadingRateHorizontal2PixelsMask = 0x00000004,
|
||||||
|
FragmentShadingRateHorizontal4PixelsMask = 0x00000008,
|
||||||
|
};
|
||||||
|
|
||||||
enum Op {
|
enum Op {
|
||||||
OpNop = 0,
|
OpNop = 0,
|
||||||
OpUndef = 1,
|
OpUndef = 1,
|
||||||
@ -1369,13 +1392,19 @@ enum Op {
|
|||||||
OpPtrEqual = 401,
|
OpPtrEqual = 401,
|
||||||
OpPtrNotEqual = 402,
|
OpPtrNotEqual = 402,
|
||||||
OpPtrDiff = 403,
|
OpPtrDiff = 403,
|
||||||
|
OpTerminateInvocation = 4416,
|
||||||
OpSubgroupBallotKHR = 4421,
|
OpSubgroupBallotKHR = 4421,
|
||||||
OpSubgroupFirstInvocationKHR = 4422,
|
OpSubgroupFirstInvocationKHR = 4422,
|
||||||
OpSubgroupAllKHR = 4428,
|
OpSubgroupAllKHR = 4428,
|
||||||
OpSubgroupAnyKHR = 4429,
|
OpSubgroupAnyKHR = 4429,
|
||||||
OpSubgroupAllEqualKHR = 4430,
|
OpSubgroupAllEqualKHR = 4430,
|
||||||
OpSubgroupReadInvocationKHR = 4432,
|
OpSubgroupReadInvocationKHR = 4432,
|
||||||
OpTypeRayQueryProvisionalKHR = 4472,
|
OpTraceRayKHR = 4445,
|
||||||
|
OpExecuteCallableKHR = 4446,
|
||||||
|
OpConvertUToAccelerationStructureKHR = 4447,
|
||||||
|
OpIgnoreIntersectionKHR = 4448,
|
||||||
|
OpTerminateRayKHR = 4449,
|
||||||
|
OpTypeRayQueryKHR = 4472,
|
||||||
OpRayQueryInitializeKHR = 4473,
|
OpRayQueryInitializeKHR = 4473,
|
||||||
OpRayQueryTerminateKHR = 4474,
|
OpRayQueryTerminateKHR = 4474,
|
||||||
OpRayQueryGenerateIntersectionKHR = 4475,
|
OpRayQueryGenerateIntersectionKHR = 4475,
|
||||||
@ -1398,15 +1427,11 @@ enum Op {
|
|||||||
OpWritePackedPrimitiveIndices4x8NV = 5299,
|
OpWritePackedPrimitiveIndices4x8NV = 5299,
|
||||||
OpReportIntersectionKHR = 5334,
|
OpReportIntersectionKHR = 5334,
|
||||||
OpReportIntersectionNV = 5334,
|
OpReportIntersectionNV = 5334,
|
||||||
OpIgnoreIntersectionKHR = 5335,
|
|
||||||
OpIgnoreIntersectionNV = 5335,
|
OpIgnoreIntersectionNV = 5335,
|
||||||
OpTerminateRayKHR = 5336,
|
|
||||||
OpTerminateRayNV = 5336,
|
OpTerminateRayNV = 5336,
|
||||||
OpTraceNV = 5337,
|
OpTraceNV = 5337,
|
||||||
OpTraceRayKHR = 5337,
|
|
||||||
OpTypeAccelerationStructureKHR = 5341,
|
OpTypeAccelerationStructureKHR = 5341,
|
||||||
OpTypeAccelerationStructureNV = 5341,
|
OpTypeAccelerationStructureNV = 5341,
|
||||||
OpExecuteCallableKHR = 5344,
|
|
||||||
OpExecuteCallableNV = 5344,
|
OpExecuteCallableNV = 5344,
|
||||||
OpTypeCooperativeMatrixNV = 5358,
|
OpTypeCooperativeMatrixNV = 5358,
|
||||||
OpCooperativeMatrixLoadNV = 5359,
|
OpCooperativeMatrixLoadNV = 5359,
|
||||||
@ -1939,13 +1964,19 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) {
|
|||||||
case OpPtrEqual: *hasResult = true; *hasResultType = true; break;
|
case OpPtrEqual: *hasResult = true; *hasResultType = true; break;
|
||||||
case OpPtrNotEqual: *hasResult = true; *hasResultType = true; break;
|
case OpPtrNotEqual: *hasResult = true; *hasResultType = true; break;
|
||||||
case OpPtrDiff: *hasResult = true; *hasResultType = true; break;
|
case OpPtrDiff: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case OpTerminateInvocation: *hasResult = false; *hasResultType = false; break;
|
||||||
case OpSubgroupBallotKHR: *hasResult = true; *hasResultType = true; break;
|
case OpSubgroupBallotKHR: *hasResult = true; *hasResultType = true; break;
|
||||||
case OpSubgroupFirstInvocationKHR: *hasResult = true; *hasResultType = true; break;
|
case OpSubgroupFirstInvocationKHR: *hasResult = true; *hasResultType = true; break;
|
||||||
case OpSubgroupAllKHR: *hasResult = true; *hasResultType = true; break;
|
case OpSubgroupAllKHR: *hasResult = true; *hasResultType = true; break;
|
||||||
case OpSubgroupAnyKHR: *hasResult = true; *hasResultType = true; break;
|
case OpSubgroupAnyKHR: *hasResult = true; *hasResultType = true; break;
|
||||||
case OpSubgroupAllEqualKHR: *hasResult = true; *hasResultType = true; break;
|
case OpSubgroupAllEqualKHR: *hasResult = true; *hasResultType = true; break;
|
||||||
case OpSubgroupReadInvocationKHR: *hasResult = true; *hasResultType = true; break;
|
case OpSubgroupReadInvocationKHR: *hasResult = true; *hasResultType = true; break;
|
||||||
case OpTypeRayQueryProvisionalKHR: *hasResult = true; *hasResultType = false; break;
|
case OpTraceRayKHR: *hasResult = false; *hasResultType = false; break;
|
||||||
|
case OpExecuteCallableKHR: *hasResult = false; *hasResultType = false; break;
|
||||||
|
case OpConvertUToAccelerationStructureKHR: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case OpIgnoreIntersectionKHR: *hasResult = false; *hasResultType = false; break;
|
||||||
|
case OpTerminateRayKHR: *hasResult = false; *hasResultType = false; break;
|
||||||
|
case OpTypeRayQueryKHR: *hasResult = true; *hasResultType = false; break;
|
||||||
case OpRayQueryInitializeKHR: *hasResult = false; *hasResultType = false; break;
|
case OpRayQueryInitializeKHR: *hasResult = false; *hasResultType = false; break;
|
||||||
case OpRayQueryTerminateKHR: *hasResult = false; *hasResultType = false; break;
|
case OpRayQueryTerminateKHR: *hasResult = false; *hasResultType = false; break;
|
||||||
case OpRayQueryGenerateIntersectionKHR: *hasResult = false; *hasResultType = false; break;
|
case OpRayQueryGenerateIntersectionKHR: *hasResult = false; *hasResultType = false; break;
|
||||||
@ -2164,6 +2195,7 @@ inline MemorySemanticsMask operator|(MemorySemanticsMask a, MemorySemanticsMask
|
|||||||
inline MemoryAccessMask operator|(MemoryAccessMask a, MemoryAccessMask b) { return MemoryAccessMask(unsigned(a) | unsigned(b)); }
|
inline MemoryAccessMask operator|(MemoryAccessMask a, MemoryAccessMask b) { return MemoryAccessMask(unsigned(a) | unsigned(b)); }
|
||||||
inline KernelProfilingInfoMask operator|(KernelProfilingInfoMask a, KernelProfilingInfoMask b) { return KernelProfilingInfoMask(unsigned(a) | unsigned(b)); }
|
inline KernelProfilingInfoMask operator|(KernelProfilingInfoMask a, KernelProfilingInfoMask b) { return KernelProfilingInfoMask(unsigned(a) | unsigned(b)); }
|
||||||
inline RayFlagsMask operator|(RayFlagsMask a, RayFlagsMask b) { return RayFlagsMask(unsigned(a) | unsigned(b)); }
|
inline RayFlagsMask operator|(RayFlagsMask a, RayFlagsMask b) { return RayFlagsMask(unsigned(a) | unsigned(b)); }
|
||||||
|
inline FragmentShadingRateMask operator|(FragmentShadingRateMask a, FragmentShadingRateMask b) { return FragmentShadingRateMask(unsigned(a) | unsigned(b)); }
|
||||||
|
|
||||||
} // end namespace spv
|
} // end namespace spv
|
||||||
|
|
||||||
|
|||||||
1
SPIRV/spvIR.h
Executable file → Normal file
1
SPIRV/spvIR.h
Executable file → Normal file
@ -263,6 +263,7 @@ public:
|
|||||||
case OpBranchConditional:
|
case OpBranchConditional:
|
||||||
case OpSwitch:
|
case OpSwitch:
|
||||||
case OpKill:
|
case OpKill:
|
||||||
|
case OpTerminateInvocation:
|
||||||
case OpReturn:
|
case OpReturn:
|
||||||
case OpReturnValue:
|
case OpReturnValue:
|
||||||
case OpUnreachable:
|
case OpUnreachable:
|
||||||
|
|||||||
@ -41,7 +41,6 @@ target_include_directories(glslang-default-resource-limits
|
|||||||
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
||||||
PUBLIC $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}>)
|
PUBLIC $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}>)
|
||||||
|
|
||||||
|
|
||||||
set(SOURCES StandAlone.cpp DirStackFileIncluder.h)
|
set(SOURCES StandAlone.cpp DirStackFileIncluder.h)
|
||||||
|
|
||||||
add_executable(glslangValidator ${SOURCES})
|
add_executable(glslangValidator ${SOURCES})
|
||||||
@ -70,6 +69,12 @@ target_include_directories(glslangValidator PUBLIC
|
|||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../External>
|
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../External>
|
||||||
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/External>)
|
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/External>)
|
||||||
|
|
||||||
|
if(ENABLE_OPT)
|
||||||
|
target_include_directories(glslangValidator
|
||||||
|
PRIVATE ${spirv-tools_SOURCE_DIR}/include
|
||||||
|
)
|
||||||
|
endif(ENABLE_OPT)
|
||||||
|
|
||||||
if(ENABLE_SPVREMAPPER)
|
if(ENABLE_SPVREMAPPER)
|
||||||
set(REMAPPER_SOURCES spirv-remap.cpp)
|
set(REMAPPER_SOURCES spirv-remap.cpp)
|
||||||
add_executable(spirv-remap ${REMAPPER_SOURCES})
|
add_executable(spirv-remap ${REMAPPER_SOURCES})
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
int f(int a, int b, int c)
|
int f(int a, int b, int c)
|
||||||
{
|
{
|
||||||
int a = b; // ERROR, redefinition
|
int a = b;
|
||||||
|
|
||||||
{
|
{
|
||||||
float a = float(a) + 1.0;
|
float a = float(a) + 1.0;
|
||||||
|
|||||||
0
Test/310.frag
Executable file → Normal file
0
Test/310.frag
Executable file → Normal file
@ -1,5 +1,4 @@
|
|||||||
100scope.vert
|
100scope.vert
|
||||||
ERROR: 0:5: 'a' : redefinition
|
|
||||||
ERROR: 0:17: 'b' : function name is redeclaration of existing name
|
ERROR: 0:17: 'b' : function name is redeclaration of existing name
|
||||||
ERROR: 0:20: 'c' : redefinition
|
ERROR: 0:20: 'c' : redefinition
|
||||||
ERROR: 0:22: 'f' : redefinition
|
ERROR: 0:22: 'f' : redefinition
|
||||||
@ -13,7 +12,7 @@ ERROR: 0:57: 'z' : undeclared identifier
|
|||||||
ERROR: 0:57: 'z' : redefinition
|
ERROR: 0:57: 'z' : redefinition
|
||||||
ERROR: 0:73: 'degrees' : can't use function syntax on variable
|
ERROR: 0:73: 'degrees' : can't use function syntax on variable
|
||||||
ERROR: 0:76: 'vertex-shader struct output' : not supported for this version or the enabled extensions
|
ERROR: 0:76: 'vertex-shader struct output' : not supported for this version or the enabled extensions
|
||||||
ERROR: 14 compilation errors. No code generated.
|
ERROR: 13 compilation errors. No code generated.
|
||||||
|
|
||||||
|
|
||||||
Shader version: 100
|
Shader version: 100
|
||||||
@ -23,18 +22,22 @@ ERROR: node is still EOpNull!
|
|||||||
0:3 'a' ( in highp int)
|
0:3 'a' ( in highp int)
|
||||||
0:3 'b' ( in highp int)
|
0:3 'b' ( in highp int)
|
||||||
0:3 'c' ( in highp int)
|
0:3 'c' ( in highp int)
|
||||||
0:? Sequence
|
0:5 Sequence
|
||||||
|
0:5 Sequence
|
||||||
|
0:5 move second child to first child ( temp highp int)
|
||||||
|
0:5 'a' ( temp highp int)
|
||||||
|
0:5 'b' ( in highp int)
|
||||||
0:8 Sequence
|
0:8 Sequence
|
||||||
0:8 Sequence
|
0:8 Sequence
|
||||||
0:8 move second child to first child ( temp highp float)
|
0:8 move second child to first child ( temp highp float)
|
||||||
0:8 'a' ( temp highp float)
|
0:8 'a' ( temp highp float)
|
||||||
0:8 add ( temp highp float)
|
0:8 add ( temp highp float)
|
||||||
0:8 Convert int to float ( temp highp float)
|
0:8 Convert int to float ( temp highp float)
|
||||||
0:8 'a' ( in highp int)
|
0:8 'a' ( temp highp int)
|
||||||
0:8 Constant:
|
0:8 Constant:
|
||||||
0:8 1.000000
|
0:8 1.000000
|
||||||
0:11 Branch: Return with expression
|
0:11 Branch: Return with expression
|
||||||
0:11 'a' ( in highp int)
|
0:11 'a' ( temp highp int)
|
||||||
0:25 Function Definition: cos(f1; ( global highp float)
|
0:25 Function Definition: cos(f1; ( global highp float)
|
||||||
0:25 Function Parameters:
|
0:25 Function Parameters:
|
||||||
0:25 'x' ( in highp float)
|
0:25 'x' ( in highp float)
|
||||||
@ -138,18 +141,22 @@ ERROR: node is still EOpNull!
|
|||||||
0:3 'a' ( in highp int)
|
0:3 'a' ( in highp int)
|
||||||
0:3 'b' ( in highp int)
|
0:3 'b' ( in highp int)
|
||||||
0:3 'c' ( in highp int)
|
0:3 'c' ( in highp int)
|
||||||
0:? Sequence
|
0:5 Sequence
|
||||||
|
0:5 Sequence
|
||||||
|
0:5 move second child to first child ( temp highp int)
|
||||||
|
0:5 'a' ( temp highp int)
|
||||||
|
0:5 'b' ( in highp int)
|
||||||
0:8 Sequence
|
0:8 Sequence
|
||||||
0:8 Sequence
|
0:8 Sequence
|
||||||
0:8 move second child to first child ( temp highp float)
|
0:8 move second child to first child ( temp highp float)
|
||||||
0:8 'a' ( temp highp float)
|
0:8 'a' ( temp highp float)
|
||||||
0:8 add ( temp highp float)
|
0:8 add ( temp highp float)
|
||||||
0:8 Convert int to float ( temp highp float)
|
0:8 Convert int to float ( temp highp float)
|
||||||
0:8 'a' ( in highp int)
|
0:8 'a' ( temp highp int)
|
||||||
0:8 Constant:
|
0:8 Constant:
|
||||||
0:8 1.000000
|
0:8 1.000000
|
||||||
0:11 Branch: Return with expression
|
0:11 Branch: Return with expression
|
||||||
0:11 'a' ( in highp int)
|
0:11 'a' ( temp highp int)
|
||||||
0:36 Function Definition: main( ( global void)
|
0:36 Function Definition: main( ( global void)
|
||||||
0:36 Function Parameters:
|
0:36 Function Parameters:
|
||||||
0:? Sequence
|
0:? Sequence
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
300layout.vert
|
300layout.vert
|
||||||
ERROR: 0:7: 'vertex input arrays' : not supported with this profile: es
|
ERROR: 0:7: 'vertex input arrays' : not supported with this profile: es
|
||||||
ERROR: 0:8: 'in' : cannot be a structure or array
|
ERROR: 0:8: 'in' : cannot be a structure or array
|
||||||
|
ERROR: 0:8: 's' : A structure containing an array is not allowed as input in ES
|
||||||
ERROR: 0:8: 'vertex input arrays' : not supported with this profile: es
|
ERROR: 0:8: 'vertex input arrays' : not supported with this profile: es
|
||||||
ERROR: 0:8: 'location' : overlapping use of location 10
|
ERROR: 0:8: 'location' : overlapping use of location 10
|
||||||
ERROR: 0:12: 'layout' : cannot specify matrix layout on a variable declaration
|
ERROR: 0:12: 'layout' : cannot specify matrix layout on a variable declaration
|
||||||
@ -18,7 +19,7 @@ ERROR: 0:50: 'shared' : not supported for this version or the enabled extensions
|
|||||||
ERROR: 0:50: 'shared' : not supported in this stage: vertex
|
ERROR: 0:50: 'shared' : not supported in this stage: vertex
|
||||||
ERROR: 0:54: 'layout' : cannot specify packing on a variable declaration
|
ERROR: 0:54: 'layout' : cannot specify packing on a variable declaration
|
||||||
ERROR: 0:57: 'location' : overlapping use of location 40
|
ERROR: 0:57: 'location' : overlapping use of location 40
|
||||||
ERROR: 19 compilation errors. No code generated.
|
ERROR: 20 compilation errors. No code generated.
|
||||||
|
|
||||||
|
|
||||||
Shader version: 300
|
Shader version: 300
|
||||||
|
|||||||
@ -40,10 +40,14 @@ ERROR: 0:112: 'out' : cannot be a matrix
|
|||||||
ERROR: 0:114: 'in' : cannot be bool
|
ERROR: 0:114: 'in' : cannot be bool
|
||||||
ERROR: 0:115: 'sampler2D' : sampler/image types can only be used in uniform variables or function parameters: ino
|
ERROR: 0:115: 'sampler2D' : sampler/image types can only be used in uniform variables or function parameters: ino
|
||||||
ERROR: 0:117: 'fragment-shader array-of-array input' : not supported with this profile: es
|
ERROR: 0:117: 'fragment-shader array-of-array input' : not supported with this profile: es
|
||||||
|
ERROR: 0:120: 'S' : A structure containing an array is not allowed as input in ES
|
||||||
ERROR: 0:120: 'fragment-shader array-of-struct input' : not supported with this profile: es
|
ERROR: 0:120: 'fragment-shader array-of-struct input' : not supported with this profile: es
|
||||||
|
ERROR: 0:121: 'S' : A structure containing an array is not allowed as input in ES
|
||||||
ERROR: 0:121: 'fragment-shader array-of-struct input' : not supported with this profile: es
|
ERROR: 0:121: 'fragment-shader array-of-struct input' : not supported with this profile: es
|
||||||
ERROR: 0:123: 'fragment-shader struct input containing an array' : not supported with this profile: es
|
ERROR: 0:123: 'fragment-shader struct input containing an array' : not supported with this profile: es
|
||||||
|
ERROR: 0:123: 'SA' : A structure containing an array is not allowed as input in ES
|
||||||
ERROR: 0:125: 'fragment-shader struct input containing structure' : not supported with this profile: es
|
ERROR: 0:125: 'fragment-shader struct input containing structure' : not supported with this profile: es
|
||||||
|
ERROR: 0:125: 'SS' : A structure containing an struct is not allowed as input in ES
|
||||||
ERROR: 0:133: 'output block' : not supported in this stage: fragment
|
ERROR: 0:133: 'output block' : not supported in this stage: fragment
|
||||||
ERROR: 0:138: '' : cannot nest a structure definition inside a structure or block
|
ERROR: 0:138: '' : cannot nest a structure definition inside a structure or block
|
||||||
ERROR: 0:146: 'location' : overlapping use of location 13
|
ERROR: 0:146: 'location' : overlapping use of location 13
|
||||||
@ -139,7 +143,7 @@ ERROR: 0:461: 'func' : function already has a body
|
|||||||
ERROR: 0:463: 'return' : void function cannot return a value
|
ERROR: 0:463: 'return' : void function cannot return a value
|
||||||
ERROR: 0:472: '=' : cannot convert from ' temp mediump uint' to ' temp mediump int'
|
ERROR: 0:472: '=' : cannot convert from ' temp mediump uint' to ' temp mediump int'
|
||||||
ERROR: 0:485: '=' : cannot convert from ' global mediump int' to ' temp mediump uint'
|
ERROR: 0:485: '=' : cannot convert from ' global mediump int' to ' temp mediump uint'
|
||||||
ERROR: 132 compilation errors. No code generated.
|
ERROR: 136 compilation errors. No code generated.
|
||||||
|
|
||||||
|
|
||||||
Shader version: 310
|
Shader version: 310
|
||||||
|
|||||||
@ -21,6 +21,7 @@ ERROR: 0:105: 'location' : overlapping use of location 12
|
|||||||
ERROR: 0:107: 'input block' : not supported in this stage: vertex
|
ERROR: 0:107: 'input block' : not supported in this stage: vertex
|
||||||
ERROR: 0:109: 'gl_PerVertex' : block redeclaration has extra members
|
ERROR: 0:109: 'gl_PerVertex' : block redeclaration has extra members
|
||||||
ERROR: 0:119: 'gl_PointSize' : member of nameless block was not redeclared
|
ERROR: 0:119: 'gl_PointSize' : member of nameless block was not redeclared
|
||||||
|
ERROR: 0:119: 'assign' : l-value required "gl_PerVertex" (can't modify void)
|
||||||
ERROR: 0:119: 'assign' : cannot convert from ' const float' to ' gl_PointSize highp void PointSize'
|
ERROR: 0:119: 'assign' : cannot convert from ' const float' to ' gl_PointSize highp void PointSize'
|
||||||
ERROR: 0:122: 'gl_PerVertex' : can only redeclare a built-in block once, and before any use
|
ERROR: 0:122: 'gl_PerVertex' : can only redeclare a built-in block once, and before any use
|
||||||
ERROR: 0:127: 'flat/smooth/noperspective' : cannot use interpolation qualifiers on an interface block
|
ERROR: 0:127: 'flat/smooth/noperspective' : cannot use interpolation qualifiers on an interface block
|
||||||
@ -96,7 +97,7 @@ ERROR: 0:389: 'sample' : Reserved word.
|
|||||||
ERROR: 0:400: 'interpolateAtCentroid' : no matching overloaded function found
|
ERROR: 0:400: 'interpolateAtCentroid' : no matching overloaded function found
|
||||||
ERROR: 0:401: 'interpolateAtSample' : no matching overloaded function found
|
ERROR: 0:401: 'interpolateAtSample' : no matching overloaded function found
|
||||||
ERROR: 0:402: 'interpolateAtOffset' : no matching overloaded function found
|
ERROR: 0:402: 'interpolateAtOffset' : no matching overloaded function found
|
||||||
ERROR: 93 compilation errors. No code generated.
|
ERROR: 94 compilation errors. No code generated.
|
||||||
|
|
||||||
|
|
||||||
Shader version: 310
|
Shader version: 310
|
||||||
|
|||||||
@ -4,6 +4,7 @@ ERROR: 0:14: 'location' : overlapping use of location 12
|
|||||||
ERROR: 0:16: 'input block' : not supported in this stage: vertex
|
ERROR: 0:16: 'input block' : not supported in this stage: vertex
|
||||||
ERROR: 0:18: 'gl_PerVertex' : block redeclaration has extra members
|
ERROR: 0:18: 'gl_PerVertex' : block redeclaration has extra members
|
||||||
ERROR: 0:28: 'gl_PointSize' : member of nameless block was not redeclared
|
ERROR: 0:28: 'gl_PointSize' : member of nameless block was not redeclared
|
||||||
|
ERROR: 0:28: 'assign' : l-value required "gl_PerVertex" (can't modify void)
|
||||||
ERROR: 0:28: 'assign' : cannot convert from ' const float' to ' gl_PointSize highp void PointSize'
|
ERROR: 0:28: 'assign' : cannot convert from ' const float' to ' gl_PointSize highp void PointSize'
|
||||||
ERROR: 0:31: 'gl_PerVertex' : can only redeclare a built-in block once, and before any use
|
ERROR: 0:31: 'gl_PerVertex' : can only redeclare a built-in block once, and before any use
|
||||||
ERROR: 0:36: 'flat/smooth/noperspective' : cannot use interpolation qualifiers on an interface block
|
ERROR: 0:36: 'flat/smooth/noperspective' : cannot use interpolation qualifiers on an interface block
|
||||||
@ -33,7 +34,7 @@ ERROR: 0:211: '=' : cannot convert from ' const float' to ' temp highp 3-compon
|
|||||||
ERROR: 0:252: 'interpolateAtCentroid' : no matching overloaded function found
|
ERROR: 0:252: 'interpolateAtCentroid' : no matching overloaded function found
|
||||||
ERROR: 0:253: 'interpolateAtSample' : no matching overloaded function found
|
ERROR: 0:253: 'interpolateAtSample' : no matching overloaded function found
|
||||||
ERROR: 0:254: 'interpolateAtOffset' : no matching overloaded function found
|
ERROR: 0:254: 'interpolateAtOffset' : no matching overloaded function found
|
||||||
ERROR: 34 compilation errors. No code generated.
|
ERROR: 35 compilation errors. No code generated.
|
||||||
|
|
||||||
|
|
||||||
Shader version: 320
|
Shader version: 320
|
||||||
|
|||||||
@ -5,9 +5,10 @@ ERROR: 0:20: 'gl_PerVertex' : can only redeclare a built-in block once, and befo
|
|||||||
ERROR: 0:32: 'gl_Position' : no such field in structure
|
ERROR: 0:32: 'gl_Position' : no such field in structure
|
||||||
ERROR: 0:32: '=' : cannot convert from ' temp block{ in float PointSize gl_PointSize}' to ' temp 4-component vector of float'
|
ERROR: 0:32: '=' : cannot convert from ' temp block{ in float PointSize gl_PointSize}' to ' temp 4-component vector of float'
|
||||||
ERROR: 0:33: 'gl_Position' : member of nameless block was not redeclared
|
ERROR: 0:33: 'gl_Position' : member of nameless block was not redeclared
|
||||||
|
ERROR: 0:33: 'assign' : l-value required "gl_PerVertex" (can't modify void)
|
||||||
ERROR: 0:33: 'assign' : cannot convert from ' const 4-component vector of float' to 'layout( stream=0) gl_Position void Position'
|
ERROR: 0:33: 'assign' : cannot convert from ' const 4-component vector of float' to 'layout( stream=0) gl_Position void Position'
|
||||||
WARNING: 0:38: 'return' : type conversion on return values was not explicitly allowed until version 420
|
WARNING: 0:38: 'return' : type conversion on return values was not explicitly allowed until version 420
|
||||||
ERROR: 7 compilation errors. No code generated.
|
ERROR: 8 compilation errors. No code generated.
|
||||||
|
|
||||||
|
|
||||||
Shader version: 410
|
Shader version: 410
|
||||||
|
|||||||
0
Test/baseResults/contradict_0.geom.out
Executable file → Normal file
0
Test/baseResults/contradict_0.geom.out
Executable file → Normal file
0
Test/baseResults/cppBad3.vert.out
Executable file → Normal file
0
Test/baseResults/cppBad3.vert.out
Executable file → Normal file
0
Test/baseResults/cppBad4.vert.out
Executable file → Normal file
0
Test/baseResults/cppBad4.vert.out
Executable file → Normal file
0
Test/baseResults/cppBad5.vert.out
Executable file → Normal file
0
Test/baseResults/cppBad5.vert.out
Executable file → Normal file
@ -1,7 +1,7 @@
|
|||||||
cppDeepNest.frag
|
cppDeepNest.frag
|
||||||
ERROR: 0:66: '#if/#ifdef/#ifndef' : maximum nesting depth exceeded
|
ERROR: 0:66: '#if/#ifdef/#ifndef' : maximum nesting depth exceeded
|
||||||
ERROR: 0:66: '' : missing #endif
|
ERROR: 0:66: '' : missing #endif
|
||||||
ERROR: 0:66: '' : syntax error, unexpected $end
|
ERROR: 0:66: '' : syntax error, unexpected end of file
|
||||||
ERROR: 3 compilation errors. No code generated.
|
ERROR: 3 compilation errors. No code generated.
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
0
Test/baseResults/cppMerge.frag.out
Executable file → Normal file
0
Test/baseResults/cppMerge.frag.out
Executable file → Normal file
@ -109,8 +109,8 @@ ERROR: node is still EOpNull!
|
|||||||
0:4 Function Parameters:
|
0:4 Function Parameters:
|
||||||
0:4 'f4' ( in 4-component vector of float)
|
0:4 'f4' ( in 4-component vector of float)
|
||||||
0:? Sequence
|
0:? Sequence
|
||||||
0:7 'gl_SubgroupSize' ( in uint SubgroupSize)
|
0:7 'gl_SubgroupSize' ( volatile in uint SubgroupSize)
|
||||||
0:8 'gl_SubgroupInvocationID' ( in uint SubgroupInvocationID)
|
0:8 'gl_SubgroupInvocationID' ( volatile in uint SubgroupInvocationID)
|
||||||
0:9 subgroupBarrier ( global void)
|
0:9 subgroupBarrier ( global void)
|
||||||
0:10 subgroupMemoryBarrier ( global void)
|
0:10 subgroupMemoryBarrier ( global void)
|
||||||
0:11 subgroupMemoryBarrierBuffer ( global void)
|
0:11 subgroupMemoryBarrierBuffer ( global void)
|
||||||
@ -128,11 +128,11 @@ ERROR: node is still EOpNull!
|
|||||||
0:19 false (const bool)
|
0:19 false (const bool)
|
||||||
0:20 subgroupAllEqual ( global bool)
|
0:20 subgroupAllEqual ( global bool)
|
||||||
0:20 'f4' ( in 4-component vector of float)
|
0:20 'f4' ( in 4-component vector of float)
|
||||||
0:22 'gl_SubgroupEqMask' ( in 4-component vector of uint SubgroupEqMask)
|
0:22 'gl_SubgroupEqMask' ( volatile in 4-component vector of uint SubgroupEqMask)
|
||||||
0:23 'gl_SubgroupGeMask' ( in 4-component vector of uint SubgroupGeMask)
|
0:23 'gl_SubgroupGeMask' ( volatile in 4-component vector of uint SubgroupGeMask)
|
||||||
0:24 'gl_SubgroupGtMask' ( in 4-component vector of uint SubgroupGtMask)
|
0:24 'gl_SubgroupGtMask' ( volatile in 4-component vector of uint SubgroupGtMask)
|
||||||
0:25 'gl_SubgroupLeMask' ( in 4-component vector of uint SubgroupLeMask)
|
0:25 'gl_SubgroupLeMask' ( volatile in 4-component vector of uint SubgroupLeMask)
|
||||||
0:26 'gl_SubgroupLtMask' ( in 4-component vector of uint SubgroupLtMask)
|
0:26 'gl_SubgroupLtMask' ( volatile in 4-component vector of uint SubgroupLtMask)
|
||||||
0:27 subgroupBroadcast ( global 4-component vector of float)
|
0:27 subgroupBroadcast ( global 4-component vector of float)
|
||||||
0:27 'f4' ( in 4-component vector of float)
|
0:27 'f4' ( in 4-component vector of float)
|
||||||
0:27 Constant:
|
0:27 Constant:
|
||||||
@ -359,8 +359,8 @@ ERROR: node is still EOpNull!
|
|||||||
0:119 Function Definition: basic_works( ( global void)
|
0:119 Function Definition: basic_works( ( global void)
|
||||||
0:119 Function Parameters:
|
0:119 Function Parameters:
|
||||||
0:121 Sequence
|
0:121 Sequence
|
||||||
0:121 'gl_SubgroupSize' ( in uint SubgroupSize)
|
0:121 'gl_SubgroupSize' ( volatile in uint SubgroupSize)
|
||||||
0:122 'gl_SubgroupInvocationID' ( in uint SubgroupInvocationID)
|
0:122 'gl_SubgroupInvocationID' ( volatile in uint SubgroupInvocationID)
|
||||||
0:123 subgroupBarrier ( global void)
|
0:123 subgroupBarrier ( global void)
|
||||||
0:124 subgroupMemoryBarrier ( global void)
|
0:124 subgroupMemoryBarrier ( global void)
|
||||||
0:125 subgroupMemoryBarrierBuffer ( global void)
|
0:125 subgroupMemoryBarrierBuffer ( global void)
|
||||||
@ -370,11 +370,11 @@ ERROR: node is still EOpNull!
|
|||||||
0:131 Function Parameters:
|
0:131 Function Parameters:
|
||||||
0:131 'f4' ( in 4-component vector of float)
|
0:131 'f4' ( in 4-component vector of float)
|
||||||
0:132 Sequence
|
0:132 Sequence
|
||||||
0:132 'gl_SubgroupEqMask' ( in 4-component vector of uint SubgroupEqMask)
|
0:132 'gl_SubgroupEqMask' ( volatile in 4-component vector of uint SubgroupEqMask)
|
||||||
0:133 'gl_SubgroupGeMask' ( in 4-component vector of uint SubgroupGeMask)
|
0:133 'gl_SubgroupGeMask' ( volatile in 4-component vector of uint SubgroupGeMask)
|
||||||
0:134 'gl_SubgroupGtMask' ( in 4-component vector of uint SubgroupGtMask)
|
0:134 'gl_SubgroupGtMask' ( volatile in 4-component vector of uint SubgroupGtMask)
|
||||||
0:135 'gl_SubgroupLeMask' ( in 4-component vector of uint SubgroupLeMask)
|
0:135 'gl_SubgroupLeMask' ( volatile in 4-component vector of uint SubgroupLeMask)
|
||||||
0:136 'gl_SubgroupLtMask' ( in 4-component vector of uint SubgroupLtMask)
|
0:136 'gl_SubgroupLtMask' ( volatile in 4-component vector of uint SubgroupLtMask)
|
||||||
0:137 subgroupBroadcast ( global 4-component vector of float)
|
0:137 subgroupBroadcast ( global 4-component vector of float)
|
||||||
0:137 'f4' ( in 4-component vector of float)
|
0:137 'f4' ( in 4-component vector of float)
|
||||||
0:137 Constant:
|
0:137 Constant:
|
||||||
@ -624,15 +624,15 @@ ERROR: node is still EOpNull!
|
|||||||
0:247 Sequence
|
0:247 Sequence
|
||||||
0:247 'gl_WarpsPerSMNV' ( in uint WarpsPerSMNV)
|
0:247 'gl_WarpsPerSMNV' ( in uint WarpsPerSMNV)
|
||||||
0:248 'gl_SMCountNV' ( in uint SMCountNV)
|
0:248 'gl_SMCountNV' ( in uint SMCountNV)
|
||||||
0:249 'gl_WarpIDNV' ( in uint WarpIDNV)
|
0:249 'gl_WarpIDNV' ( volatile in uint WarpIDNV)
|
||||||
0:250 'gl_SMIDNV' ( in uint SMIDNV)
|
0:250 'gl_SMIDNV' ( volatile in uint SMIDNV)
|
||||||
0:257 Function Definition: sm_builtins( ( global void)
|
0:257 Function Definition: sm_builtins( ( global void)
|
||||||
0:257 Function Parameters:
|
0:257 Function Parameters:
|
||||||
0:259 Sequence
|
0:259 Sequence
|
||||||
0:259 'gl_WarpsPerSMNV' ( in uint WarpsPerSMNV)
|
0:259 'gl_WarpsPerSMNV' ( in uint WarpsPerSMNV)
|
||||||
0:260 'gl_SMCountNV' ( in uint SMCountNV)
|
0:260 'gl_SMCountNV' ( in uint SMCountNV)
|
||||||
0:261 'gl_WarpIDNV' ( in uint WarpIDNV)
|
0:261 'gl_WarpIDNV' ( volatile in uint WarpIDNV)
|
||||||
0:262 'gl_SMIDNV' ( in uint SMIDNV)
|
0:262 'gl_SMIDNV' ( volatile in uint SMIDNV)
|
||||||
0:? Linker Objects
|
0:? Linker Objects
|
||||||
0:? 'data0' (layout( location=0) callableDataNV 4-component vector of float)
|
0:? 'data0' (layout( location=0) callableDataNV 4-component vector of float)
|
||||||
0:? 'anon@0' (layout( location=1) callableDataInNV block{ callableDataInNV uint data1})
|
0:? 'anon@0' (layout( location=1) callableDataInNV block{ callableDataInNV uint data1})
|
||||||
|
|||||||
@ -109,8 +109,8 @@ ERROR: node is still EOpNull!
|
|||||||
0:4 Function Parameters:
|
0:4 Function Parameters:
|
||||||
0:4 'f4' ( in 4-component vector of float)
|
0:4 'f4' ( in 4-component vector of float)
|
||||||
0:? Sequence
|
0:? Sequence
|
||||||
0:7 'gl_SubgroupSize' ( in uint SubgroupSize)
|
0:7 'gl_SubgroupSize' ( volatile in uint SubgroupSize)
|
||||||
0:8 'gl_SubgroupInvocationID' ( in uint SubgroupInvocationID)
|
0:8 'gl_SubgroupInvocationID' ( volatile in uint SubgroupInvocationID)
|
||||||
0:9 subgroupBarrier ( global void)
|
0:9 subgroupBarrier ( global void)
|
||||||
0:10 subgroupMemoryBarrier ( global void)
|
0:10 subgroupMemoryBarrier ( global void)
|
||||||
0:11 subgroupMemoryBarrierBuffer ( global void)
|
0:11 subgroupMemoryBarrierBuffer ( global void)
|
||||||
@ -128,11 +128,11 @@ ERROR: node is still EOpNull!
|
|||||||
0:19 false (const bool)
|
0:19 false (const bool)
|
||||||
0:20 subgroupAllEqual ( global bool)
|
0:20 subgroupAllEqual ( global bool)
|
||||||
0:20 'f4' ( in 4-component vector of float)
|
0:20 'f4' ( in 4-component vector of float)
|
||||||
0:22 'gl_SubgroupEqMask' ( in 4-component vector of uint SubgroupEqMask)
|
0:22 'gl_SubgroupEqMask' ( volatile in 4-component vector of uint SubgroupEqMask)
|
||||||
0:23 'gl_SubgroupGeMask' ( in 4-component vector of uint SubgroupGeMask)
|
0:23 'gl_SubgroupGeMask' ( volatile in 4-component vector of uint SubgroupGeMask)
|
||||||
0:24 'gl_SubgroupGtMask' ( in 4-component vector of uint SubgroupGtMask)
|
0:24 'gl_SubgroupGtMask' ( volatile in 4-component vector of uint SubgroupGtMask)
|
||||||
0:25 'gl_SubgroupLeMask' ( in 4-component vector of uint SubgroupLeMask)
|
0:25 'gl_SubgroupLeMask' ( volatile in 4-component vector of uint SubgroupLeMask)
|
||||||
0:26 'gl_SubgroupLtMask' ( in 4-component vector of uint SubgroupLtMask)
|
0:26 'gl_SubgroupLtMask' ( volatile in 4-component vector of uint SubgroupLtMask)
|
||||||
0:27 subgroupBroadcast ( global 4-component vector of float)
|
0:27 subgroupBroadcast ( global 4-component vector of float)
|
||||||
0:27 'f4' ( in 4-component vector of float)
|
0:27 'f4' ( in 4-component vector of float)
|
||||||
0:27 Constant:
|
0:27 Constant:
|
||||||
@ -425,8 +425,8 @@ ERROR: node is still EOpNull!
|
|||||||
0:129 Function Definition: basic_works( ( global void)
|
0:129 Function Definition: basic_works( ( global void)
|
||||||
0:129 Function Parameters:
|
0:129 Function Parameters:
|
||||||
0:131 Sequence
|
0:131 Sequence
|
||||||
0:131 'gl_SubgroupSize' ( in uint SubgroupSize)
|
0:131 'gl_SubgroupSize' ( volatile in uint SubgroupSize)
|
||||||
0:132 'gl_SubgroupInvocationID' ( in uint SubgroupInvocationID)
|
0:132 'gl_SubgroupInvocationID' ( volatile in uint SubgroupInvocationID)
|
||||||
0:133 subgroupBarrier ( global void)
|
0:133 subgroupBarrier ( global void)
|
||||||
0:134 subgroupMemoryBarrier ( global void)
|
0:134 subgroupMemoryBarrier ( global void)
|
||||||
0:135 subgroupMemoryBarrierBuffer ( global void)
|
0:135 subgroupMemoryBarrierBuffer ( global void)
|
||||||
@ -436,11 +436,11 @@ ERROR: node is still EOpNull!
|
|||||||
0:141 Function Parameters:
|
0:141 Function Parameters:
|
||||||
0:141 'f4' ( in 4-component vector of float)
|
0:141 'f4' ( in 4-component vector of float)
|
||||||
0:142 Sequence
|
0:142 Sequence
|
||||||
0:142 'gl_SubgroupEqMask' ( in 4-component vector of uint SubgroupEqMask)
|
0:142 'gl_SubgroupEqMask' ( volatile in 4-component vector of uint SubgroupEqMask)
|
||||||
0:143 'gl_SubgroupGeMask' ( in 4-component vector of uint SubgroupGeMask)
|
0:143 'gl_SubgroupGeMask' ( volatile in 4-component vector of uint SubgroupGeMask)
|
||||||
0:144 'gl_SubgroupGtMask' ( in 4-component vector of uint SubgroupGtMask)
|
0:144 'gl_SubgroupGtMask' ( volatile in 4-component vector of uint SubgroupGtMask)
|
||||||
0:145 'gl_SubgroupLeMask' ( in 4-component vector of uint SubgroupLeMask)
|
0:145 'gl_SubgroupLeMask' ( volatile in 4-component vector of uint SubgroupLeMask)
|
||||||
0:146 'gl_SubgroupLtMask' ( in 4-component vector of uint SubgroupLtMask)
|
0:146 'gl_SubgroupLtMask' ( volatile in 4-component vector of uint SubgroupLtMask)
|
||||||
0:147 subgroupBroadcast ( global 4-component vector of float)
|
0:147 subgroupBroadcast ( global 4-component vector of float)
|
||||||
0:147 'f4' ( in 4-component vector of float)
|
0:147 'f4' ( in 4-component vector of float)
|
||||||
0:147 Constant:
|
0:147 Constant:
|
||||||
@ -690,15 +690,15 @@ ERROR: node is still EOpNull!
|
|||||||
0:257 Sequence
|
0:257 Sequence
|
||||||
0:257 'gl_WarpsPerSMNV' ( in uint WarpsPerSMNV)
|
0:257 'gl_WarpsPerSMNV' ( in uint WarpsPerSMNV)
|
||||||
0:258 'gl_SMCountNV' ( in uint SMCountNV)
|
0:258 'gl_SMCountNV' ( in uint SMCountNV)
|
||||||
0:259 'gl_WarpIDNV' ( in uint WarpIDNV)
|
0:259 'gl_WarpIDNV' ( volatile in uint WarpIDNV)
|
||||||
0:260 'gl_SMIDNV' ( in uint SMIDNV)
|
0:260 'gl_SMIDNV' ( volatile in uint SMIDNV)
|
||||||
0:267 Function Definition: sm_builtins( ( global void)
|
0:267 Function Definition: sm_builtins( ( global void)
|
||||||
0:267 Function Parameters:
|
0:267 Function Parameters:
|
||||||
0:269 Sequence
|
0:269 Sequence
|
||||||
0:269 'gl_WarpsPerSMNV' ( in uint WarpsPerSMNV)
|
0:269 'gl_WarpsPerSMNV' ( in uint WarpsPerSMNV)
|
||||||
0:270 'gl_SMCountNV' ( in uint SMCountNV)
|
0:270 'gl_SMCountNV' ( in uint SMCountNV)
|
||||||
0:271 'gl_WarpIDNV' ( in uint WarpIDNV)
|
0:271 'gl_WarpIDNV' ( volatile in uint WarpIDNV)
|
||||||
0:272 'gl_SMIDNV' ( in uint SMIDNV)
|
0:272 'gl_SMIDNV' ( volatile in uint SMIDNV)
|
||||||
0:? Linker Objects
|
0:? Linker Objects
|
||||||
0:? 'accNV' (layout( set=0 binding=0) uniform accelerationStructureNV)
|
0:? 'accNV' (layout( set=0 binding=0) uniform accelerationStructureNV)
|
||||||
0:? 'localPayload' (layout( location=0) rayPayloadNV 4-component vector of float)
|
0:? 'localPayload' (layout( location=0) rayPayloadNV 4-component vector of float)
|
||||||
|
|||||||
@ -109,8 +109,8 @@ ERROR: node is still EOpNull!
|
|||||||
0:4 Function Parameters:
|
0:4 Function Parameters:
|
||||||
0:4 'f4' ( in 4-component vector of float)
|
0:4 'f4' ( in 4-component vector of float)
|
||||||
0:? Sequence
|
0:? Sequence
|
||||||
0:7 'gl_SubgroupSize' ( in uint SubgroupSize)
|
0:7 'gl_SubgroupSize' ( volatile in uint SubgroupSize)
|
||||||
0:8 'gl_SubgroupInvocationID' ( in uint SubgroupInvocationID)
|
0:8 'gl_SubgroupInvocationID' ( volatile in uint SubgroupInvocationID)
|
||||||
0:9 subgroupBarrier ( global void)
|
0:9 subgroupBarrier ( global void)
|
||||||
0:10 subgroupMemoryBarrier ( global void)
|
0:10 subgroupMemoryBarrier ( global void)
|
||||||
0:11 subgroupMemoryBarrierBuffer ( global void)
|
0:11 subgroupMemoryBarrierBuffer ( global void)
|
||||||
@ -128,11 +128,11 @@ ERROR: node is still EOpNull!
|
|||||||
0:19 false (const bool)
|
0:19 false (const bool)
|
||||||
0:20 subgroupAllEqual ( global bool)
|
0:20 subgroupAllEqual ( global bool)
|
||||||
0:20 'f4' ( in 4-component vector of float)
|
0:20 'f4' ( in 4-component vector of float)
|
||||||
0:22 'gl_SubgroupEqMask' ( in 4-component vector of uint SubgroupEqMask)
|
0:22 'gl_SubgroupEqMask' ( volatile in 4-component vector of uint SubgroupEqMask)
|
||||||
0:23 'gl_SubgroupGeMask' ( in 4-component vector of uint SubgroupGeMask)
|
0:23 'gl_SubgroupGeMask' ( volatile in 4-component vector of uint SubgroupGeMask)
|
||||||
0:24 'gl_SubgroupGtMask' ( in 4-component vector of uint SubgroupGtMask)
|
0:24 'gl_SubgroupGtMask' ( volatile in 4-component vector of uint SubgroupGtMask)
|
||||||
0:25 'gl_SubgroupLeMask' ( in 4-component vector of uint SubgroupLeMask)
|
0:25 'gl_SubgroupLeMask' ( volatile in 4-component vector of uint SubgroupLeMask)
|
||||||
0:26 'gl_SubgroupLtMask' ( in 4-component vector of uint SubgroupLtMask)
|
0:26 'gl_SubgroupLtMask' ( volatile in 4-component vector of uint SubgroupLtMask)
|
||||||
0:27 subgroupBroadcast ( global 4-component vector of float)
|
0:27 subgroupBroadcast ( global 4-component vector of float)
|
||||||
0:27 'f4' ( in 4-component vector of float)
|
0:27 'f4' ( in 4-component vector of float)
|
||||||
0:27 Constant:
|
0:27 Constant:
|
||||||
@ -389,8 +389,8 @@ ERROR: node is still EOpNull!
|
|||||||
0:123 Function Definition: basic_works( ( global void)
|
0:123 Function Definition: basic_works( ( global void)
|
||||||
0:123 Function Parameters:
|
0:123 Function Parameters:
|
||||||
0:125 Sequence
|
0:125 Sequence
|
||||||
0:125 'gl_SubgroupSize' ( in uint SubgroupSize)
|
0:125 'gl_SubgroupSize' ( volatile in uint SubgroupSize)
|
||||||
0:126 'gl_SubgroupInvocationID' ( in uint SubgroupInvocationID)
|
0:126 'gl_SubgroupInvocationID' ( volatile in uint SubgroupInvocationID)
|
||||||
0:127 subgroupBarrier ( global void)
|
0:127 subgroupBarrier ( global void)
|
||||||
0:128 subgroupMemoryBarrier ( global void)
|
0:128 subgroupMemoryBarrier ( global void)
|
||||||
0:129 subgroupMemoryBarrierBuffer ( global void)
|
0:129 subgroupMemoryBarrierBuffer ( global void)
|
||||||
@ -400,11 +400,11 @@ ERROR: node is still EOpNull!
|
|||||||
0:135 Function Parameters:
|
0:135 Function Parameters:
|
||||||
0:135 'f4' ( in 4-component vector of float)
|
0:135 'f4' ( in 4-component vector of float)
|
||||||
0:136 Sequence
|
0:136 Sequence
|
||||||
0:136 'gl_SubgroupEqMask' ( in 4-component vector of uint SubgroupEqMask)
|
0:136 'gl_SubgroupEqMask' ( volatile in 4-component vector of uint SubgroupEqMask)
|
||||||
0:137 'gl_SubgroupGeMask' ( in 4-component vector of uint SubgroupGeMask)
|
0:137 'gl_SubgroupGeMask' ( volatile in 4-component vector of uint SubgroupGeMask)
|
||||||
0:138 'gl_SubgroupGtMask' ( in 4-component vector of uint SubgroupGtMask)
|
0:138 'gl_SubgroupGtMask' ( volatile in 4-component vector of uint SubgroupGtMask)
|
||||||
0:139 'gl_SubgroupLeMask' ( in 4-component vector of uint SubgroupLeMask)
|
0:139 'gl_SubgroupLeMask' ( volatile in 4-component vector of uint SubgroupLeMask)
|
||||||
0:140 'gl_SubgroupLtMask' ( in 4-component vector of uint SubgroupLtMask)
|
0:140 'gl_SubgroupLtMask' ( volatile in 4-component vector of uint SubgroupLtMask)
|
||||||
0:141 subgroupBroadcast ( global 4-component vector of float)
|
0:141 subgroupBroadcast ( global 4-component vector of float)
|
||||||
0:141 'f4' ( in 4-component vector of float)
|
0:141 'f4' ( in 4-component vector of float)
|
||||||
0:141 Constant:
|
0:141 Constant:
|
||||||
@ -654,15 +654,15 @@ ERROR: node is still EOpNull!
|
|||||||
0:251 Sequence
|
0:251 Sequence
|
||||||
0:251 'gl_WarpsPerSMNV' ( in uint WarpsPerSMNV)
|
0:251 'gl_WarpsPerSMNV' ( in uint WarpsPerSMNV)
|
||||||
0:252 'gl_SMCountNV' ( in uint SMCountNV)
|
0:252 'gl_SMCountNV' ( in uint SMCountNV)
|
||||||
0:253 'gl_WarpIDNV' ( in uint WarpIDNV)
|
0:253 'gl_WarpIDNV' ( volatile in uint WarpIDNV)
|
||||||
0:254 'gl_SMIDNV' ( in uint SMIDNV)
|
0:254 'gl_SMIDNV' ( volatile in uint SMIDNV)
|
||||||
0:261 Function Definition: sm_builtins( ( global void)
|
0:261 Function Definition: sm_builtins( ( global void)
|
||||||
0:261 Function Parameters:
|
0:261 Function Parameters:
|
||||||
0:263 Sequence
|
0:263 Sequence
|
||||||
0:263 'gl_WarpsPerSMNV' ( in uint WarpsPerSMNV)
|
0:263 'gl_WarpsPerSMNV' ( in uint WarpsPerSMNV)
|
||||||
0:264 'gl_SMCountNV' ( in uint SMCountNV)
|
0:264 'gl_SMCountNV' ( in uint SMCountNV)
|
||||||
0:265 'gl_WarpIDNV' ( in uint WarpIDNV)
|
0:265 'gl_WarpIDNV' ( volatile in uint WarpIDNV)
|
||||||
0:266 'gl_SMIDNV' ( in uint SMIDNV)
|
0:266 'gl_SMIDNV' ( volatile in uint SMIDNV)
|
||||||
0:? Linker Objects
|
0:? Linker Objects
|
||||||
0:? 'accNV0' (layout( set=0 binding=0) uniform accelerationStructureNV)
|
0:? 'accNV0' (layout( set=0 binding=0) uniform accelerationStructureNV)
|
||||||
0:? 'accNV1' (layout( set=0 binding=1) uniform accelerationStructureNV)
|
0:? 'accNV1' (layout( set=0 binding=1) uniform accelerationStructureNV)
|
||||||
|
|||||||
@ -109,8 +109,8 @@ ERROR: node is still EOpNull!
|
|||||||
0:5 Function Parameters:
|
0:5 Function Parameters:
|
||||||
0:5 'f4' ( in 4-component vector of float)
|
0:5 'f4' ( in 4-component vector of float)
|
||||||
0:? Sequence
|
0:? Sequence
|
||||||
0:8 'gl_SubgroupSize' ( in uint SubgroupSize)
|
0:8 'gl_SubgroupSize' ( volatile in uint SubgroupSize)
|
||||||
0:9 'gl_SubgroupInvocationID' ( in uint SubgroupInvocationID)
|
0:9 'gl_SubgroupInvocationID' ( volatile in uint SubgroupInvocationID)
|
||||||
0:10 subgroupBarrier ( global void)
|
0:10 subgroupBarrier ( global void)
|
||||||
0:11 subgroupMemoryBarrier ( global void)
|
0:11 subgroupMemoryBarrier ( global void)
|
||||||
0:12 subgroupMemoryBarrierBuffer ( global void)
|
0:12 subgroupMemoryBarrierBuffer ( global void)
|
||||||
@ -128,11 +128,11 @@ ERROR: node is still EOpNull!
|
|||||||
0:20 false (const bool)
|
0:20 false (const bool)
|
||||||
0:21 subgroupAllEqual ( global bool)
|
0:21 subgroupAllEqual ( global bool)
|
||||||
0:21 'f4' ( in 4-component vector of float)
|
0:21 'f4' ( in 4-component vector of float)
|
||||||
0:23 'gl_SubgroupEqMask' ( in 4-component vector of uint SubgroupEqMask)
|
0:23 'gl_SubgroupEqMask' ( volatile in 4-component vector of uint SubgroupEqMask)
|
||||||
0:24 'gl_SubgroupGeMask' ( in 4-component vector of uint SubgroupGeMask)
|
0:24 'gl_SubgroupGeMask' ( volatile in 4-component vector of uint SubgroupGeMask)
|
||||||
0:25 'gl_SubgroupGtMask' ( in 4-component vector of uint SubgroupGtMask)
|
0:25 'gl_SubgroupGtMask' ( volatile in 4-component vector of uint SubgroupGtMask)
|
||||||
0:26 'gl_SubgroupLeMask' ( in 4-component vector of uint SubgroupLeMask)
|
0:26 'gl_SubgroupLeMask' ( volatile in 4-component vector of uint SubgroupLeMask)
|
||||||
0:27 'gl_SubgroupLtMask' ( in 4-component vector of uint SubgroupLtMask)
|
0:27 'gl_SubgroupLtMask' ( volatile in 4-component vector of uint SubgroupLtMask)
|
||||||
0:28 subgroupBroadcast ( global 4-component vector of float)
|
0:28 subgroupBroadcast ( global 4-component vector of float)
|
||||||
0:28 'f4' ( in 4-component vector of float)
|
0:28 'f4' ( in 4-component vector of float)
|
||||||
0:28 Constant:
|
0:28 Constant:
|
||||||
@ -403,8 +403,8 @@ ERROR: node is still EOpNull!
|
|||||||
0:129 Function Definition: basic_works( ( global void)
|
0:129 Function Definition: basic_works( ( global void)
|
||||||
0:129 Function Parameters:
|
0:129 Function Parameters:
|
||||||
0:131 Sequence
|
0:131 Sequence
|
||||||
0:131 'gl_SubgroupSize' ( in uint SubgroupSize)
|
0:131 'gl_SubgroupSize' ( volatile in uint SubgroupSize)
|
||||||
0:132 'gl_SubgroupInvocationID' ( in uint SubgroupInvocationID)
|
0:132 'gl_SubgroupInvocationID' ( volatile in uint SubgroupInvocationID)
|
||||||
0:133 subgroupBarrier ( global void)
|
0:133 subgroupBarrier ( global void)
|
||||||
0:134 subgroupMemoryBarrier ( global void)
|
0:134 subgroupMemoryBarrier ( global void)
|
||||||
0:135 subgroupMemoryBarrierBuffer ( global void)
|
0:135 subgroupMemoryBarrierBuffer ( global void)
|
||||||
@ -414,11 +414,11 @@ ERROR: node is still EOpNull!
|
|||||||
0:141 Function Parameters:
|
0:141 Function Parameters:
|
||||||
0:141 'f4' ( in 4-component vector of float)
|
0:141 'f4' ( in 4-component vector of float)
|
||||||
0:142 Sequence
|
0:142 Sequence
|
||||||
0:142 'gl_SubgroupEqMask' ( in 4-component vector of uint SubgroupEqMask)
|
0:142 'gl_SubgroupEqMask' ( volatile in 4-component vector of uint SubgroupEqMask)
|
||||||
0:143 'gl_SubgroupGeMask' ( in 4-component vector of uint SubgroupGeMask)
|
0:143 'gl_SubgroupGeMask' ( volatile in 4-component vector of uint SubgroupGeMask)
|
||||||
0:144 'gl_SubgroupGtMask' ( in 4-component vector of uint SubgroupGtMask)
|
0:144 'gl_SubgroupGtMask' ( volatile in 4-component vector of uint SubgroupGtMask)
|
||||||
0:145 'gl_SubgroupLeMask' ( in 4-component vector of uint SubgroupLeMask)
|
0:145 'gl_SubgroupLeMask' ( volatile in 4-component vector of uint SubgroupLeMask)
|
||||||
0:146 'gl_SubgroupLtMask' ( in 4-component vector of uint SubgroupLtMask)
|
0:146 'gl_SubgroupLtMask' ( volatile in 4-component vector of uint SubgroupLtMask)
|
||||||
0:147 subgroupBroadcast ( global 4-component vector of float)
|
0:147 subgroupBroadcast ( global 4-component vector of float)
|
||||||
0:147 'f4' ( in 4-component vector of float)
|
0:147 'f4' ( in 4-component vector of float)
|
||||||
0:147 Constant:
|
0:147 Constant:
|
||||||
@ -668,15 +668,15 @@ ERROR: node is still EOpNull!
|
|||||||
0:257 Sequence
|
0:257 Sequence
|
||||||
0:257 'gl_WarpsPerSMNV' ( in uint WarpsPerSMNV)
|
0:257 'gl_WarpsPerSMNV' ( in uint WarpsPerSMNV)
|
||||||
0:258 'gl_SMCountNV' ( in uint SMCountNV)
|
0:258 'gl_SMCountNV' ( in uint SMCountNV)
|
||||||
0:259 'gl_WarpIDNV' ( in uint WarpIDNV)
|
0:259 'gl_WarpIDNV' ( volatile in uint WarpIDNV)
|
||||||
0:260 'gl_SMIDNV' ( in uint SMIDNV)
|
0:260 'gl_SMIDNV' ( volatile in uint SMIDNV)
|
||||||
0:267 Function Definition: sm_builtins( ( global void)
|
0:267 Function Definition: sm_builtins( ( global void)
|
||||||
0:267 Function Parameters:
|
0:267 Function Parameters:
|
||||||
0:269 Sequence
|
0:269 Sequence
|
||||||
0:269 'gl_WarpsPerSMNV' ( in uint WarpsPerSMNV)
|
0:269 'gl_WarpsPerSMNV' ( in uint WarpsPerSMNV)
|
||||||
0:270 'gl_SMCountNV' ( in uint SMCountNV)
|
0:270 'gl_SMCountNV' ( in uint SMCountNV)
|
||||||
0:271 'gl_WarpIDNV' ( in uint WarpIDNV)
|
0:271 'gl_WarpIDNV' ( volatile in uint WarpIDNV)
|
||||||
0:272 'gl_SMIDNV' ( in uint SMIDNV)
|
0:272 'gl_SMIDNV' ( volatile in uint SMIDNV)
|
||||||
0:? Linker Objects
|
0:? Linker Objects
|
||||||
0:? 'iAttr' ( hitAttributeNV 4-component vector of float)
|
0:? 'iAttr' ( hitAttributeNV 4-component vector of float)
|
||||||
|
|
||||||
|
|||||||
@ -109,8 +109,8 @@ ERROR: node is still EOpNull!
|
|||||||
0:5 Function Parameters:
|
0:5 Function Parameters:
|
||||||
0:5 'f4' ( in 4-component vector of float)
|
0:5 'f4' ( in 4-component vector of float)
|
||||||
0:? Sequence
|
0:? Sequence
|
||||||
0:8 'gl_SubgroupSize' ( in uint SubgroupSize)
|
0:8 'gl_SubgroupSize' ( volatile in uint SubgroupSize)
|
||||||
0:9 'gl_SubgroupInvocationID' ( in uint SubgroupInvocationID)
|
0:9 'gl_SubgroupInvocationID' ( volatile in uint SubgroupInvocationID)
|
||||||
0:10 subgroupBarrier ( global void)
|
0:10 subgroupBarrier ( global void)
|
||||||
0:11 subgroupMemoryBarrier ( global void)
|
0:11 subgroupMemoryBarrier ( global void)
|
||||||
0:12 subgroupMemoryBarrierBuffer ( global void)
|
0:12 subgroupMemoryBarrierBuffer ( global void)
|
||||||
@ -128,11 +128,11 @@ ERROR: node is still EOpNull!
|
|||||||
0:20 false (const bool)
|
0:20 false (const bool)
|
||||||
0:21 subgroupAllEqual ( global bool)
|
0:21 subgroupAllEqual ( global bool)
|
||||||
0:21 'f4' ( in 4-component vector of float)
|
0:21 'f4' ( in 4-component vector of float)
|
||||||
0:23 'gl_SubgroupEqMask' ( in 4-component vector of uint SubgroupEqMask)
|
0:23 'gl_SubgroupEqMask' ( volatile in 4-component vector of uint SubgroupEqMask)
|
||||||
0:24 'gl_SubgroupGeMask' ( in 4-component vector of uint SubgroupGeMask)
|
0:24 'gl_SubgroupGeMask' ( volatile in 4-component vector of uint SubgroupGeMask)
|
||||||
0:25 'gl_SubgroupGtMask' ( in 4-component vector of uint SubgroupGtMask)
|
0:25 'gl_SubgroupGtMask' ( volatile in 4-component vector of uint SubgroupGtMask)
|
||||||
0:26 'gl_SubgroupLeMask' ( in 4-component vector of uint SubgroupLeMask)
|
0:26 'gl_SubgroupLeMask' ( volatile in 4-component vector of uint SubgroupLeMask)
|
||||||
0:27 'gl_SubgroupLtMask' ( in 4-component vector of uint SubgroupLtMask)
|
0:27 'gl_SubgroupLtMask' ( volatile in 4-component vector of uint SubgroupLtMask)
|
||||||
0:28 subgroupBroadcast ( global 4-component vector of float)
|
0:28 subgroupBroadcast ( global 4-component vector of float)
|
||||||
0:28 'f4' ( in 4-component vector of float)
|
0:28 'f4' ( in 4-component vector of float)
|
||||||
0:28 Constant:
|
0:28 Constant:
|
||||||
@ -397,8 +397,8 @@ ERROR: node is still EOpNull!
|
|||||||
0:123 Function Definition: basic_works( ( global void)
|
0:123 Function Definition: basic_works( ( global void)
|
||||||
0:123 Function Parameters:
|
0:123 Function Parameters:
|
||||||
0:125 Sequence
|
0:125 Sequence
|
||||||
0:125 'gl_SubgroupSize' ( in uint SubgroupSize)
|
0:125 'gl_SubgroupSize' ( volatile in uint SubgroupSize)
|
||||||
0:126 'gl_SubgroupInvocationID' ( in uint SubgroupInvocationID)
|
0:126 'gl_SubgroupInvocationID' ( volatile in uint SubgroupInvocationID)
|
||||||
0:127 subgroupBarrier ( global void)
|
0:127 subgroupBarrier ( global void)
|
||||||
0:128 subgroupMemoryBarrier ( global void)
|
0:128 subgroupMemoryBarrier ( global void)
|
||||||
0:129 subgroupMemoryBarrierBuffer ( global void)
|
0:129 subgroupMemoryBarrierBuffer ( global void)
|
||||||
@ -408,11 +408,11 @@ ERROR: node is still EOpNull!
|
|||||||
0:135 Function Parameters:
|
0:135 Function Parameters:
|
||||||
0:135 'f4' ( in 4-component vector of float)
|
0:135 'f4' ( in 4-component vector of float)
|
||||||
0:136 Sequence
|
0:136 Sequence
|
||||||
0:136 'gl_SubgroupEqMask' ( in 4-component vector of uint SubgroupEqMask)
|
0:136 'gl_SubgroupEqMask' ( volatile in 4-component vector of uint SubgroupEqMask)
|
||||||
0:137 'gl_SubgroupGeMask' ( in 4-component vector of uint SubgroupGeMask)
|
0:137 'gl_SubgroupGeMask' ( volatile in 4-component vector of uint SubgroupGeMask)
|
||||||
0:138 'gl_SubgroupGtMask' ( in 4-component vector of uint SubgroupGtMask)
|
0:138 'gl_SubgroupGtMask' ( volatile in 4-component vector of uint SubgroupGtMask)
|
||||||
0:139 'gl_SubgroupLeMask' ( in 4-component vector of uint SubgroupLeMask)
|
0:139 'gl_SubgroupLeMask' ( volatile in 4-component vector of uint SubgroupLeMask)
|
||||||
0:140 'gl_SubgroupLtMask' ( in 4-component vector of uint SubgroupLtMask)
|
0:140 'gl_SubgroupLtMask' ( volatile in 4-component vector of uint SubgroupLtMask)
|
||||||
0:141 subgroupBroadcast ( global 4-component vector of float)
|
0:141 subgroupBroadcast ( global 4-component vector of float)
|
||||||
0:141 'f4' ( in 4-component vector of float)
|
0:141 'f4' ( in 4-component vector of float)
|
||||||
0:141 Constant:
|
0:141 Constant:
|
||||||
@ -662,15 +662,15 @@ ERROR: node is still EOpNull!
|
|||||||
0:251 Sequence
|
0:251 Sequence
|
||||||
0:251 'gl_WarpsPerSMNV' ( in uint WarpsPerSMNV)
|
0:251 'gl_WarpsPerSMNV' ( in uint WarpsPerSMNV)
|
||||||
0:252 'gl_SMCountNV' ( in uint SMCountNV)
|
0:252 'gl_SMCountNV' ( in uint SMCountNV)
|
||||||
0:253 'gl_WarpIDNV' ( in uint WarpIDNV)
|
0:253 'gl_WarpIDNV' ( volatile in uint WarpIDNV)
|
||||||
0:254 'gl_SMIDNV' ( in uint SMIDNV)
|
0:254 'gl_SMIDNV' ( volatile in uint SMIDNV)
|
||||||
0:261 Function Definition: sm_builtins( ( global void)
|
0:261 Function Definition: sm_builtins( ( global void)
|
||||||
0:261 Function Parameters:
|
0:261 Function Parameters:
|
||||||
0:263 Sequence
|
0:263 Sequence
|
||||||
0:263 'gl_WarpsPerSMNV' ( in uint WarpsPerSMNV)
|
0:263 'gl_WarpsPerSMNV' ( in uint WarpsPerSMNV)
|
||||||
0:264 'gl_SMCountNV' ( in uint SMCountNV)
|
0:264 'gl_SMCountNV' ( in uint SMCountNV)
|
||||||
0:265 'gl_WarpIDNV' ( in uint WarpIDNV)
|
0:265 'gl_WarpIDNV' ( volatile in uint WarpIDNV)
|
||||||
0:266 'gl_SMIDNV' ( in uint SMIDNV)
|
0:266 'gl_SMIDNV' ( volatile in uint SMIDNV)
|
||||||
0:? Linker Objects
|
0:? Linker Objects
|
||||||
0:? 'accNV' (layout( set=0 binding=0) uniform accelerationStructureNV)
|
0:? 'accNV' (layout( set=0 binding=0) uniform accelerationStructureNV)
|
||||||
0:? 'localPayload' (layout( location=0) rayPayloadNV 4-component vector of float)
|
0:? 'localPayload' (layout( location=0) rayPayloadNV 4-component vector of float)
|
||||||
|
|||||||
0
Test/baseResults/hlsl.earlydepthstencil.frag.out
Executable file → Normal file
0
Test/baseResults/hlsl.earlydepthstencil.frag.out
Executable file → Normal file
178
Test/baseResults/hlsl.printf.comp.out
Normal file
178
Test/baseResults/hlsl.printf.comp.out
Normal file
@ -0,0 +1,178 @@
|
|||||||
|
hlsl.printf.comp
|
||||||
|
Shader version: 500
|
||||||
|
local_size = (1, 1, 1)
|
||||||
|
0:? Sequence
|
||||||
|
0:4 Function Definition: @main( ( temp void)
|
||||||
|
0:4 Function Parameters:
|
||||||
|
0:? Sequence
|
||||||
|
0:5 Debug printf ( temp void)
|
||||||
|
0:5 Constant:
|
||||||
|
0:5 "first string"
|
||||||
|
0:6 Debug printf ( temp void)
|
||||||
|
0:6 Constant:
|
||||||
|
0:6 "please print this message."
|
||||||
|
0:7 Debug printf ( temp void)
|
||||||
|
0:7 Constant:
|
||||||
|
0:7 "Variables are: %d %d %.2f"
|
||||||
|
0:7 Constant:
|
||||||
|
0:7 1 (const uint)
|
||||||
|
0:7 Constant:
|
||||||
|
0:7 2 (const uint)
|
||||||
|
0:7 Constant:
|
||||||
|
0:7 1.500000
|
||||||
|
0:8 Debug printf ( temp void)
|
||||||
|
0:8 Constant:
|
||||||
|
0:8 "Integers are: %d %d %d"
|
||||||
|
0:8 Constant:
|
||||||
|
0:8 1 (const int)
|
||||||
|
0:8 Constant:
|
||||||
|
0:8 2 (const int)
|
||||||
|
0:8 Constant:
|
||||||
|
0:8 3 (const int)
|
||||||
|
0:9 Debug printf ( temp void)
|
||||||
|
0:9 Constant:
|
||||||
|
0:9 "More: %d %d %d %d %d %d %d %d %d %d"
|
||||||
|
0:9 Constant:
|
||||||
|
0:9 1 (const int)
|
||||||
|
0:9 Constant:
|
||||||
|
0:9 2 (const int)
|
||||||
|
0:9 Constant:
|
||||||
|
0:9 3 (const int)
|
||||||
|
0:9 Constant:
|
||||||
|
0:9 4 (const int)
|
||||||
|
0:9 Constant:
|
||||||
|
0:9 5 (const int)
|
||||||
|
0:9 Constant:
|
||||||
|
0:9 6 (const int)
|
||||||
|
0:9 Constant:
|
||||||
|
0:9 7 (const int)
|
||||||
|
0:9 Constant:
|
||||||
|
0:9 8 (const int)
|
||||||
|
0:9 Constant:
|
||||||
|
0:9 9 (const int)
|
||||||
|
0:9 Constant:
|
||||||
|
0:9 10 (const int)
|
||||||
|
0:4 Function Definition: main( ( temp void)
|
||||||
|
0:4 Function Parameters:
|
||||||
|
0:? Sequence
|
||||||
|
0:4 Function Call: @main( ( temp void)
|
||||||
|
0:? Linker Objects
|
||||||
|
0:? 'first' ( const string)
|
||||||
|
0:? "first string"
|
||||||
|
|
||||||
|
|
||||||
|
Linked compute stage:
|
||||||
|
|
||||||
|
|
||||||
|
Shader version: 500
|
||||||
|
local_size = (1, 1, 1)
|
||||||
|
0:? Sequence
|
||||||
|
0:4 Function Definition: @main( ( temp void)
|
||||||
|
0:4 Function Parameters:
|
||||||
|
0:? Sequence
|
||||||
|
0:5 Debug printf ( temp void)
|
||||||
|
0:5 Constant:
|
||||||
|
0:5 "first string"
|
||||||
|
0:6 Debug printf ( temp void)
|
||||||
|
0:6 Constant:
|
||||||
|
0:6 "please print this message."
|
||||||
|
0:7 Debug printf ( temp void)
|
||||||
|
0:7 Constant:
|
||||||
|
0:7 "Variables are: %d %d %.2f"
|
||||||
|
0:7 Constant:
|
||||||
|
0:7 1 (const uint)
|
||||||
|
0:7 Constant:
|
||||||
|
0:7 2 (const uint)
|
||||||
|
0:7 Constant:
|
||||||
|
0:7 1.500000
|
||||||
|
0:8 Debug printf ( temp void)
|
||||||
|
0:8 Constant:
|
||||||
|
0:8 "Integers are: %d %d %d"
|
||||||
|
0:8 Constant:
|
||||||
|
0:8 1 (const int)
|
||||||
|
0:8 Constant:
|
||||||
|
0:8 2 (const int)
|
||||||
|
0:8 Constant:
|
||||||
|
0:8 3 (const int)
|
||||||
|
0:9 Debug printf ( temp void)
|
||||||
|
0:9 Constant:
|
||||||
|
0:9 "More: %d %d %d %d %d %d %d %d %d %d"
|
||||||
|
0:9 Constant:
|
||||||
|
0:9 1 (const int)
|
||||||
|
0:9 Constant:
|
||||||
|
0:9 2 (const int)
|
||||||
|
0:9 Constant:
|
||||||
|
0:9 3 (const int)
|
||||||
|
0:9 Constant:
|
||||||
|
0:9 4 (const int)
|
||||||
|
0:9 Constant:
|
||||||
|
0:9 5 (const int)
|
||||||
|
0:9 Constant:
|
||||||
|
0:9 6 (const int)
|
||||||
|
0:9 Constant:
|
||||||
|
0:9 7 (const int)
|
||||||
|
0:9 Constant:
|
||||||
|
0:9 8 (const int)
|
||||||
|
0:9 Constant:
|
||||||
|
0:9 9 (const int)
|
||||||
|
0:9 Constant:
|
||||||
|
0:9 10 (const int)
|
||||||
|
0:4 Function Definition: main( ( temp void)
|
||||||
|
0:4 Function Parameters:
|
||||||
|
0:? Sequence
|
||||||
|
0:4 Function Call: @main( ( temp void)
|
||||||
|
0:? Linker Objects
|
||||||
|
0:? 'first' ( const string)
|
||||||
|
0:? "first string"
|
||||||
|
|
||||||
|
// Module Version 10000
|
||||||
|
// Generated by (magic number): 8000a
|
||||||
|
// Id's are bound by 36
|
||||||
|
|
||||||
|
Capability Shader
|
||||||
|
Extension "SPV_KHR_non_semantic_info"
|
||||||
|
1: ExtInstImport "GLSL.std.450"
|
||||||
|
9: ExtInstImport "NonSemantic.DebugPrintf"
|
||||||
|
MemoryModel Logical GLSL450
|
||||||
|
EntryPoint GLCompute 4 "main"
|
||||||
|
ExecutionMode 4 LocalSize 1 1 1
|
||||||
|
8: String "first string"
|
||||||
|
11: String "please print this message."
|
||||||
|
13: String "Variables are: %d %d %.2f"
|
||||||
|
20: String "Integers are: %d %d %d"
|
||||||
|
26: String "More: %d %d %d %d %d %d %d %d %d %d"
|
||||||
|
Source HLSL 500
|
||||||
|
Name 4 "main"
|
||||||
|
Name 6 "@main("
|
||||||
|
2: TypeVoid
|
||||||
|
3: TypeFunction 2
|
||||||
|
14: TypeInt 32 0
|
||||||
|
15: 14(int) Constant 1
|
||||||
|
16: 14(int) Constant 2
|
||||||
|
17: TypeFloat 32
|
||||||
|
18: 17(float) Constant 1069547520
|
||||||
|
21: TypeInt 32 1
|
||||||
|
22: 21(int) Constant 1
|
||||||
|
23: 21(int) Constant 2
|
||||||
|
24: 21(int) Constant 3
|
||||||
|
27: 21(int) Constant 4
|
||||||
|
28: 21(int) Constant 5
|
||||||
|
29: 21(int) Constant 6
|
||||||
|
30: 21(int) Constant 7
|
||||||
|
31: 21(int) Constant 8
|
||||||
|
32: 21(int) Constant 9
|
||||||
|
33: 21(int) Constant 10
|
||||||
|
4(main): 2 Function None 3
|
||||||
|
5: Label
|
||||||
|
35: 2 FunctionCall 6(@main()
|
||||||
|
Return
|
||||||
|
FunctionEnd
|
||||||
|
6(@main(): 2 Function None 3
|
||||||
|
7: Label
|
||||||
|
10: 2 ExtInst 9(NonSemantic.DebugPrintf) 1(DebugPrintf) 8
|
||||||
|
12: 2 ExtInst 9(NonSemantic.DebugPrintf) 1(DebugPrintf) 11
|
||||||
|
19: 2 ExtInst 9(NonSemantic.DebugPrintf) 1(DebugPrintf) 13 15 16 18
|
||||||
|
25: 2 ExtInst 9(NonSemantic.DebugPrintf) 1(DebugPrintf) 20 22 23 24
|
||||||
|
34: 2 ExtInst 9(NonSemantic.DebugPrintf) 1(DebugPrintf) 26 22 23 24 27 28 29 30 31 32 33
|
||||||
|
Return
|
||||||
|
FunctionEnd
|
||||||
60
Test/baseResults/hlsl.round.dx10.frag.out
Normal file
60
Test/baseResults/hlsl.round.dx10.frag.out
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
hlsl.round.dx10.frag
|
||||||
|
Shader version: 500
|
||||||
|
gl_FragCoord origin is upper left
|
||||||
|
0:? Sequence
|
||||||
|
0:2 Function Definition: PixelShaderFunction(vf4; ( temp 4-component vector of float)
|
||||||
|
0:2 Function Parameters:
|
||||||
|
0:2 'input' ( in 4-component vector of float)
|
||||||
|
0:? Sequence
|
||||||
|
0:3 Branch: Return with expression
|
||||||
|
0:3 roundEven ( temp 4-component vector of float)
|
||||||
|
0:3 'input' ( in 4-component vector of float)
|
||||||
|
0:? Linker Objects
|
||||||
|
|
||||||
|
|
||||||
|
Linked fragment stage:
|
||||||
|
|
||||||
|
WARNING: Linking fragment stage: Entry point not found
|
||||||
|
|
||||||
|
Shader version: 500
|
||||||
|
gl_FragCoord origin is upper left
|
||||||
|
0:? Sequence
|
||||||
|
0:2 Function Definition: PixelShaderFunction(vf4; ( temp 4-component vector of float)
|
||||||
|
0:2 Function Parameters:
|
||||||
|
0:2 'input' ( in 4-component vector of float)
|
||||||
|
0:? Sequence
|
||||||
|
0:3 Branch: Return with expression
|
||||||
|
0:3 roundEven ( temp 4-component vector of float)
|
||||||
|
0:3 'input' ( in 4-component vector of float)
|
||||||
|
0:? Linker Objects
|
||||||
|
|
||||||
|
// Module Version 10000
|
||||||
|
// Generated by (magic number): 8000a
|
||||||
|
// Id's are bound by 17
|
||||||
|
|
||||||
|
Capability Shader
|
||||||
|
1: ExtInstImport "GLSL.std.450"
|
||||||
|
MemoryModel Logical GLSL450
|
||||||
|
EntryPoint Fragment 4 "main"
|
||||||
|
ExecutionMode 4 OriginUpperLeft
|
||||||
|
Source HLSL 500
|
||||||
|
Name 4 "main"
|
||||||
|
Name 11 "PixelShaderFunction(vf4;"
|
||||||
|
Name 10 "input"
|
||||||
|
2: TypeVoid
|
||||||
|
3: TypeFunction 2
|
||||||
|
6: TypeFloat 32
|
||||||
|
7: TypeVector 6(float) 4
|
||||||
|
8: TypePointer Function 7(fvec4)
|
||||||
|
9: TypeFunction 7(fvec4) 8(ptr)
|
||||||
|
4(main): 2 Function None 3
|
||||||
|
5: Label
|
||||||
|
Return
|
||||||
|
FunctionEnd
|
||||||
|
11(PixelShaderFunction(vf4;): 7(fvec4) Function None 9
|
||||||
|
10(input): 8(ptr) FunctionParameter
|
||||||
|
12: Label
|
||||||
|
13: 7(fvec4) Load 10(input)
|
||||||
|
14: 7(fvec4) ExtInst 1(GLSL.std.450) 2(RoundEven) 13
|
||||||
|
ReturnValue 14
|
||||||
|
FunctionEnd
|
||||||
70
Test/baseResults/hlsl.round.dx9.frag.out
Normal file
70
Test/baseResults/hlsl.round.dx9.frag.out
Normal file
@ -0,0 +1,70 @@
|
|||||||
|
hlsl.round.dx9.frag
|
||||||
|
Shader version: 500
|
||||||
|
gl_FragCoord origin is upper left
|
||||||
|
0:? Sequence
|
||||||
|
0:2 Function Definition: PixelShaderFunction(vf4; ( temp 4-component vector of float)
|
||||||
|
0:2 Function Parameters:
|
||||||
|
0:2 'input' ( in 4-component vector of float)
|
||||||
|
0:? Sequence
|
||||||
|
0:3 Branch: Return with expression
|
||||||
|
0:3 round ( temp 4-component vector of float)
|
||||||
|
0:3 'input' ( in 4-component vector of float)
|
||||||
|
0:? Linker Objects
|
||||||
|
|
||||||
|
|
||||||
|
Linked fragment stage:
|
||||||
|
|
||||||
|
WARNING: Linking fragment stage: Entry point not found
|
||||||
|
|
||||||
|
Shader version: 500
|
||||||
|
gl_FragCoord origin is upper left
|
||||||
|
0:? Sequence
|
||||||
|
0:2 Function Definition: PixelShaderFunction(vf4; ( temp 4-component vector of float)
|
||||||
|
0:2 Function Parameters:
|
||||||
|
0:2 'input' ( in 4-component vector of float)
|
||||||
|
0:? Sequence
|
||||||
|
0:3 Branch: Return with expression
|
||||||
|
0:3 round ( temp 4-component vector of float)
|
||||||
|
0:3 'input' ( in 4-component vector of float)
|
||||||
|
0:? Linker Objects
|
||||||
|
|
||||||
|
// Module Version 10000
|
||||||
|
// Generated by (magic number): 8000a
|
||||||
|
// Id's are bound by 18
|
||||||
|
|
||||||
|
Capability Shader
|
||||||
|
2: ExtInstImport "GLSL.std.450"
|
||||||
|
MemoryModel Logical GLSL450
|
||||||
|
EntryPoint Fragment 5 "main"
|
||||||
|
ExecutionMode 5 OriginUpperLeft
|
||||||
|
1: String ""
|
||||||
|
Source HLSL 500 1 "// OpModuleProcessed auto-map-locations
|
||||||
|
// OpModuleProcessed auto-map-bindings
|
||||||
|
// OpModuleProcessed entry-point main
|
||||||
|
// OpModuleProcessed client vulkan100
|
||||||
|
// OpModuleProcessed target-env vulkan1.0
|
||||||
|
// OpModuleProcessed keep-uncalled
|
||||||
|
// OpModuleProcessed hlsl-offsets
|
||||||
|
#line 1
|
||||||
|
"
|
||||||
|
Name 5 "main"
|
||||||
|
Name 12 "PixelShaderFunction(vf4;"
|
||||||
|
Name 11 "input"
|
||||||
|
3: TypeVoid
|
||||||
|
4: TypeFunction 3
|
||||||
|
7: TypeFloat 32
|
||||||
|
8: TypeVector 7(float) 4
|
||||||
|
9: TypePointer Function 8(fvec4)
|
||||||
|
10: TypeFunction 8(fvec4) 9(ptr)
|
||||||
|
5(main): 3 Function None 4
|
||||||
|
6: Label
|
||||||
|
Return
|
||||||
|
FunctionEnd
|
||||||
|
12(PixelShaderFunction(vf4;): 8(fvec4) Function None 10
|
||||||
|
11(input): 9(ptr) FunctionParameter
|
||||||
|
13: Label
|
||||||
|
Line 1 3 0
|
||||||
|
14: 8(fvec4) Load 11(input)
|
||||||
|
15: 8(fvec4) ExtInst 2(GLSL.std.450) 1(Round) 14
|
||||||
|
ReturnValue 15
|
||||||
|
FunctionEnd
|
||||||
@ -97,6 +97,7 @@ gl_FragCoord origin is upper left
|
|||||||
0:? 'g_tBuf1du1' (layout( binding=3 r32ui) uniform uimageBuffer)
|
0:? 'g_tBuf1du1' (layout( binding=3 r32ui) uniform uimageBuffer)
|
||||||
0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
|
0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
|
||||||
|
|
||||||
|
Validation failed
|
||||||
// Module Version 10000
|
// Module Version 10000
|
||||||
// Generated by (magic number): 8000a
|
// Generated by (magic number): 8000a
|
||||||
// Id's are bound by 42
|
// Id's are bound by 42
|
||||||
|
|||||||
@ -1689,6 +1689,7 @@ gl_FragCoord origin is upper left
|
|||||||
0:? 'anon@0' (layout( row_major std140) uniform block{ uniform int c1, uniform 2-component vector of int c2, uniform 3-component vector of int c3, uniform 4-component vector of int c4, uniform int o1, uniform 2-component vector of int o2, uniform 3-component vector of int o3, uniform 4-component vector of int o4, uniform float uf1, uniform int ui1, uniform uint uu1})
|
0:? 'anon@0' (layout( row_major std140) uniform block{ uniform int c1, uniform 2-component vector of int c2, uniform 3-component vector of int c3, uniform 4-component vector of int c4, uniform int o1, uniform 2-component vector of int o2, uniform 3-component vector of int o3, uniform 4-component vector of int o4, uniform float uf1, uniform int ui1, uniform uint uu1})
|
||||||
0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
|
0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
|
||||||
|
|
||||||
|
Validation failed
|
||||||
// Module Version 10000
|
// Module Version 10000
|
||||||
// Generated by (magic number): 8000a
|
// Generated by (magic number): 8000a
|
||||||
// Id's are bound by 571
|
// Id's are bound by 571
|
||||||
|
|||||||
@ -1707,6 +1707,7 @@ gl_FragCoord origin is upper left
|
|||||||
0:? 'anon@0' (layout( row_major std140) uniform block{ uniform int c1, uniform 2-component vector of int c2, uniform 3-component vector of int c3, uniform 4-component vector of int c4, uniform int o1, uniform 2-component vector of int o2, uniform 3-component vector of int o3, uniform 4-component vector of int o4, uniform 2-component vector of float uf2, uniform 2-component vector of int ui2, uniform 2-component vector of uint uu2})
|
0:? 'anon@0' (layout( row_major std140) uniform block{ uniform int c1, uniform 2-component vector of int c2, uniform 3-component vector of int c3, uniform 4-component vector of int c4, uniform int o1, uniform 2-component vector of int o2, uniform 3-component vector of int o3, uniform 4-component vector of int o4, uniform 2-component vector of float uf2, uniform 2-component vector of int ui2, uniform 2-component vector of uint uu2})
|
||||||
0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
|
0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
|
||||||
|
|
||||||
|
Validation failed
|
||||||
// Module Version 10000
|
// Module Version 10000
|
||||||
// Generated by (magic number): 8000a
|
// Generated by (magic number): 8000a
|
||||||
// Id's are bound by 605
|
// Id's are bound by 605
|
||||||
|
|||||||
0
Test/baseResults/hlsl.singleArgIntPromo.vert.out
Executable file → Normal file
0
Test/baseResults/hlsl.singleArgIntPromo.vert.out
Executable file → Normal file
0
Test/baseResults/hlsl.specConstant.frag.out
Executable file → Normal file
0
Test/baseResults/hlsl.specConstant.frag.out
Executable file → Normal file
@ -190,13 +190,13 @@ Validation failed
|
|||||||
Decorate 9 BufferBlock
|
Decorate 9 BufferBlock
|
||||||
Decorate 12 BufferBlock
|
Decorate 12 BufferBlock
|
||||||
Decorate 49(sbuf_a) DescriptorSet 0
|
Decorate 49(sbuf_a) DescriptorSet 0
|
||||||
Decorate 49(sbuf_a) Binding 4
|
Decorate 49(sbuf_a) Binding 0
|
||||||
Decorate 50(sbuf_a@count) DescriptorSet 0
|
Decorate 50(sbuf_a@count) DescriptorSet 0
|
||||||
Decorate 50(sbuf_a@count) Binding 6
|
Decorate 50(sbuf_a@count) Binding 0
|
||||||
Decorate 51(sbuf_c) DescriptorSet 0
|
Decorate 51(sbuf_c) DescriptorSet 0
|
||||||
Decorate 51(sbuf_c) Binding 5
|
Decorate 51(sbuf_c) Binding 1
|
||||||
Decorate 52(sbuf_c@count) DescriptorSet 0
|
Decorate 52(sbuf_c@count) DescriptorSet 0
|
||||||
Decorate 52(sbuf_c@count) Binding 7
|
Decorate 52(sbuf_c@count) Binding 0
|
||||||
Decorate 58(pos) Flat
|
Decorate 58(pos) Flat
|
||||||
Decorate 58(pos) Location 0
|
Decorate 58(pos) Location 0
|
||||||
Decorate 61(@entryPointOutput) Location 0
|
Decorate 61(@entryPointOutput) Location 0
|
||||||
|
|||||||
@ -191,9 +191,9 @@ Validation failed
|
|||||||
Decorate 18 BufferBlock
|
Decorate 18 BufferBlock
|
||||||
Decorate 20 BufferBlock
|
Decorate 20 BufferBlock
|
||||||
Decorate 47(sbuf2) DescriptorSet 0
|
Decorate 47(sbuf2) DescriptorSet 0
|
||||||
Decorate 47(sbuf2) Binding 2
|
Decorate 47(sbuf2) Binding 0
|
||||||
Decorate 48(sbuf2@count) DescriptorSet 0
|
Decorate 48(sbuf2@count) DescriptorSet 0
|
||||||
Decorate 48(sbuf2@count) Binding 3
|
Decorate 48(sbuf2@count) Binding 0
|
||||||
Decorate 50(sbuf) DescriptorSet 0
|
Decorate 50(sbuf) DescriptorSet 0
|
||||||
Decorate 50(sbuf) Binding 10
|
Decorate 50(sbuf) Binding 10
|
||||||
Decorate 63(pos) Flat
|
Decorate 63(pos) Flat
|
||||||
|
|||||||
0
Test/baseResults/link.multiAnonBlocksInvalid.0.0.vert.out
Executable file → Normal file
0
Test/baseResults/link.multiAnonBlocksInvalid.0.0.vert.out
Executable file → Normal file
0
Test/baseResults/link.multiAnonBlocksValid.0.0.vert.out
Executable file → Normal file
0
Test/baseResults/link.multiAnonBlocksValid.0.0.vert.out
Executable file → Normal file
0
Test/baseResults/link.multiBlocksInvalid.0.0.vert.out
Executable file → Normal file
0
Test/baseResults/link.multiBlocksInvalid.0.0.vert.out
Executable file → Normal file
0
Test/baseResults/link.multiBlocksValid.1.0.vert.out
Executable file → Normal file
0
Test/baseResults/link.multiBlocksValid.1.0.vert.out
Executable file → Normal file
0
Test/baseResults/link.vk.differentPC.0.0.frag.out
Executable file → Normal file
0
Test/baseResults/link.vk.differentPC.0.0.frag.out
Executable file → Normal file
0
Test/baseResults/link.vk.differentPC.1.0.frag.out
Executable file → Normal file
0
Test/baseResults/link.vk.differentPC.1.0.frag.out
Executable file → Normal file
0
Test/baseResults/link.vk.matchingPC.0.0.frag.out
Executable file → Normal file
0
Test/baseResults/link.vk.matchingPC.0.0.frag.out
Executable file → Normal file
4
Test/baseResults/link.vk.multiBlocksValid.0.0.vert.out
Executable file → Normal file
4
Test/baseResults/link.vk.multiBlocksValid.0.0.vert.out
Executable file → Normal file
@ -211,7 +211,7 @@ Shader version: 430
|
|||||||
Name 70 "BufferBlock"
|
Name 70 "BufferBlock"
|
||||||
MemberName 70(BufferBlock) 0 "p"
|
MemberName 70(BufferBlock) 0 "p"
|
||||||
Name 72 "uBuf"
|
Name 72 "uBuf"
|
||||||
Decorate 14(oColor) Location 4
|
Decorate 14(oColor) Location 2
|
||||||
MemberDecorate 16(ColorBlock) 0 Offset 0
|
MemberDecorate 16(ColorBlock) 0 Offset 0
|
||||||
MemberDecorate 16(ColorBlock) 1 Offset 16
|
MemberDecorate 16(ColorBlock) 1 Offset 16
|
||||||
MemberDecorate 16(ColorBlock) 2 Offset 32
|
MemberDecorate 16(ColorBlock) 2 Offset 32
|
||||||
@ -224,7 +224,7 @@ Shader version: 430
|
|||||||
Decorate 28(uColorBuf) DescriptorSet 0
|
Decorate 28(uColorBuf) DescriptorSet 0
|
||||||
Decorate 28(uColorBuf) Binding 0
|
Decorate 28(uColorBuf) Binding 0
|
||||||
Decorate 32(Vertex) Block
|
Decorate 32(Vertex) Block
|
||||||
Decorate 34(oV) Location 2
|
Decorate 34(oV) Location 0
|
||||||
MemberDecorate 40(gl_PerVertex) 0 BuiltIn Position
|
MemberDecorate 40(gl_PerVertex) 0 BuiltIn Position
|
||||||
MemberDecorate 40(gl_PerVertex) 1 BuiltIn PointSize
|
MemberDecorate 40(gl_PerVertex) 1 BuiltIn PointSize
|
||||||
MemberDecorate 40(gl_PerVertex) 2 BuiltIn ClipDistance
|
MemberDecorate 40(gl_PerVertex) 2 BuiltIn ClipDistance
|
||||||
|
|||||||
8
Test/baseResults/link.vk.multiBlocksValid.1.0.geom.out
Executable file → Normal file
8
Test/baseResults/link.vk.multiBlocksValid.1.0.geom.out
Executable file → Normal file
@ -304,7 +304,7 @@ output primitive = triangle_strip
|
|||||||
MemberName 95(BufferBlock) 0 "p"
|
MemberName 95(BufferBlock) 0 "p"
|
||||||
Name 97 "uBuf"
|
Name 97 "uBuf"
|
||||||
Name 100 "P"
|
Name 100 "P"
|
||||||
Decorate 18(oColor) Location 2
|
Decorate 18(oColor) Location 1
|
||||||
MemberDecorate 20(ColorBlock) 0 Offset 0
|
MemberDecorate 20(ColorBlock) 0 Offset 0
|
||||||
MemberDecorate 20(ColorBlock) 1 Offset 16
|
MemberDecorate 20(ColorBlock) 1 Offset 16
|
||||||
MemberDecorate 20(ColorBlock) 2 Offset 32
|
MemberDecorate 20(ColorBlock) 2 Offset 32
|
||||||
@ -326,16 +326,16 @@ output primitive = triangle_strip
|
|||||||
Decorate 50(uM) DescriptorSet 0
|
Decorate 50(uM) DescriptorSet 0
|
||||||
Decorate 50(uM) Binding 0
|
Decorate 50(uM) Binding 0
|
||||||
Decorate 59(Vertex) Block
|
Decorate 59(Vertex) Block
|
||||||
Decorate 61(oV) Location 1
|
Decorate 61(oV) Location 0
|
||||||
Decorate 64(Vertex) Block
|
Decorate 64(Vertex) Block
|
||||||
Decorate 68(iV) Location 0
|
Decorate 68(iV) Location 1
|
||||||
MemberDecorate 95(BufferBlock) 0 ColMajor
|
MemberDecorate 95(BufferBlock) 0 ColMajor
|
||||||
MemberDecorate 95(BufferBlock) 0 Offset 0
|
MemberDecorate 95(BufferBlock) 0 Offset 0
|
||||||
MemberDecorate 95(BufferBlock) 0 MatrixStride 16
|
MemberDecorate 95(BufferBlock) 0 MatrixStride 16
|
||||||
Decorate 95(BufferBlock) BufferBlock
|
Decorate 95(BufferBlock) BufferBlock
|
||||||
Decorate 97(uBuf) DescriptorSet 0
|
Decorate 97(uBuf) DescriptorSet 0
|
||||||
Decorate 97(uBuf) Binding 1
|
Decorate 97(uBuf) Binding 1
|
||||||
Decorate 100(P) Location 4
|
Decorate 100(P) Location 0
|
||||||
2: TypeVoid
|
2: TypeVoid
|
||||||
3: TypeFunction 2
|
3: TypeFunction 2
|
||||||
6: TypeFloat 32
|
6: TypeFloat 32
|
||||||
|
|||||||
0
Test/baseResults/link.vk.pcNamingInvalid.0.0.vert.out
Executable file → Normal file
0
Test/baseResults/link.vk.pcNamingInvalid.0.0.vert.out
Executable file → Normal file
0
Test/baseResults/link.vk.pcNamingValid.0.0.vert.out
Executable file → Normal file
0
Test/baseResults/link.vk.pcNamingValid.0.0.vert.out
Executable file → Normal file
@ -12,7 +12,7 @@ ERROR: 0:88: '' : float literal needs a decimal point or exponent
|
|||||||
ERROR: 0:98: '' : numeric literal too big
|
ERROR: 0:98: '' : numeric literal too big
|
||||||
ERROR: 0:101: '' : numeric literal too big
|
ERROR: 0:101: '' : numeric literal too big
|
||||||
ERROR: 0:104: '#' : preprocessor directive cannot be preceded by another token
|
ERROR: 0:104: '#' : preprocessor directive cannot be preceded by another token
|
||||||
ERROR: 0:104: '' : syntax error, unexpected $end, expecting COMMA or SEMICOLON
|
ERROR: 0:104: '' : syntax error, unexpected end of file, expecting COMMA or SEMICOLON
|
||||||
ERROR: 14 compilation errors. No code generated.
|
ERROR: 14 compilation errors. No code generated.
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -4,8 +4,8 @@ rayQuery-allOps.comp
|
|||||||
// Id's are bound by 258
|
// Id's are bound by 258
|
||||||
|
|
||||||
Capability Shader
|
Capability Shader
|
||||||
Capability RayQueryProvisionalKHR
|
Capability RayQueryKHR
|
||||||
Capability RayTraversalPrimitiveCullingProvisionalKHR
|
Capability RayTraversalPrimitiveCullingKHR
|
||||||
Extension "SPV_KHR_ray_query"
|
Extension "SPV_KHR_ray_query"
|
||||||
1: ExtInstImport "GLSL.std.450"
|
1: ExtInstImport "GLSL.std.450"
|
||||||
MemoryModel Logical GLSL450
|
MemoryModel Logical GLSL450
|
||||||
@ -86,8 +86,9 @@ rayQuery-allOps.comp
|
|||||||
35: TypePointer Function 8(float)
|
35: TypePointer Function 8(float)
|
||||||
37: 18(int) Constant 3
|
37: 18(int) Constant 3
|
||||||
38: 8(float) Constant 1176255488
|
38: 8(float) Constant 1176255488
|
||||||
45: TypeRayQueryProvisionalKHR
|
45: TypeRayQueryKHR
|
||||||
46: TypePointer Function 45
|
46: TypePointer Private 45
|
||||||
|
47(rayQuery): 46(ptr) Variable Private
|
||||||
48: TypeAccelerationStructureKHR
|
48: TypeAccelerationStructureKHR
|
||||||
49: TypePointer UniformConstant 48
|
49: TypePointer UniformConstant 48
|
||||||
50(rtas): 49(ptr) Variable UniformConstant
|
50(rtas): 49(ptr) Variable UniformConstant
|
||||||
@ -114,7 +115,6 @@ rayQuery-allOps.comp
|
|||||||
4(main): 2 Function None 3
|
4(main): 2 Function None 3
|
||||||
5: Label
|
5: Label
|
||||||
43(ray): 25(ptr) Variable Function
|
43(ray): 25(ptr) Variable Function
|
||||||
47(rayQuery): 46(ptr) Variable Function
|
|
||||||
69(candidateType): 68(ptr) Variable Function
|
69(candidateType): 68(ptr) Variable Function
|
||||||
78(_mat4x3): 77(ptr) Variable Function
|
78(_mat4x3): 77(ptr) Variable Function
|
||||||
83(_mat3x4): 82(ptr) Variable Function
|
83(_mat3x4): 82(ptr) Variable Function
|
||||||
@ -223,7 +223,7 @@ rayQuery-allOps.comp
|
|||||||
129: 2 FunctionCall 6(doSomething()
|
129: 2 FunctionCall 6(doSomething()
|
||||||
Branch 128
|
Branch 128
|
||||||
128: Label
|
128: Label
|
||||||
130: 18(int) RayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR 47(rayQuery) 23
|
130: 14(int) RayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR 47(rayQuery) 23
|
||||||
131: 66(bool) UGreaterThan 130 20
|
131: 66(bool) UGreaterThan 130 20
|
||||||
SelectionMerge 133 None
|
SelectionMerge 133 None
|
||||||
BranchConditional 131 132 133
|
BranchConditional 131 132 133
|
||||||
|
|||||||
@ -4,7 +4,7 @@ rayQuery-allOps.frag
|
|||||||
// Id's are bound by 257
|
// Id's are bound by 257
|
||||||
|
|
||||||
Capability Shader
|
Capability Shader
|
||||||
Capability RayQueryProvisionalKHR
|
Capability RayQueryKHR
|
||||||
Extension "SPV_KHR_ray_query"
|
Extension "SPV_KHR_ray_query"
|
||||||
1: ExtInstImport "GLSL.std.450"
|
1: ExtInstImport "GLSL.std.450"
|
||||||
MemoryModel Logical GLSL450
|
MemoryModel Logical GLSL450
|
||||||
@ -85,8 +85,9 @@ rayQuery-allOps.frag
|
|||||||
35: TypePointer Function 8(float)
|
35: TypePointer Function 8(float)
|
||||||
37: 18(int) Constant 3
|
37: 18(int) Constant 3
|
||||||
38: 8(float) Constant 1176255488
|
38: 8(float) Constant 1176255488
|
||||||
45: TypeRayQueryProvisionalKHR
|
45: TypeRayQueryKHR
|
||||||
46: TypePointer Function 45
|
46: TypePointer Private 45
|
||||||
|
47(rayQuery): 46(ptr) Variable Private
|
||||||
48: TypeAccelerationStructureKHR
|
48: TypeAccelerationStructureKHR
|
||||||
49: TypePointer UniformConstant 48
|
49: TypePointer UniformConstant 48
|
||||||
50(rtas): 49(ptr) Variable UniformConstant
|
50(rtas): 49(ptr) Variable UniformConstant
|
||||||
@ -112,7 +113,6 @@ rayQuery-allOps.frag
|
|||||||
4(main): 2 Function None 3
|
4(main): 2 Function None 3
|
||||||
5: Label
|
5: Label
|
||||||
43(ray): 25(ptr) Variable Function
|
43(ray): 25(ptr) Variable Function
|
||||||
47(rayQuery): 46(ptr) Variable Function
|
|
||||||
69(candidateType): 68(ptr) Variable Function
|
69(candidateType): 68(ptr) Variable Function
|
||||||
78(_mat4x3): 77(ptr) Variable Function
|
78(_mat4x3): 77(ptr) Variable Function
|
||||||
83(_mat3x4): 82(ptr) Variable Function
|
83(_mat3x4): 82(ptr) Variable Function
|
||||||
@ -221,7 +221,7 @@ rayQuery-allOps.frag
|
|||||||
129: 2 FunctionCall 6(doSomething()
|
129: 2 FunctionCall 6(doSomething()
|
||||||
Branch 128
|
Branch 128
|
||||||
128: Label
|
128: Label
|
||||||
130: 18(int) RayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR 47(rayQuery) 23
|
130: 14(int) RayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR 47(rayQuery) 23
|
||||||
131: 66(bool) UGreaterThan 130 20
|
131: 66(bool) UGreaterThan 130 20
|
||||||
SelectionMerge 133 None
|
SelectionMerge 133 None
|
||||||
BranchConditional 131 132 133
|
BranchConditional 131 132 133
|
||||||
|
|||||||
@ -3,7 +3,7 @@ rayQuery-allOps.rgen
|
|||||||
// Generated by (magic number): 8000a
|
// Generated by (magic number): 8000a
|
||||||
// Id's are bound by 257
|
// Id's are bound by 257
|
||||||
|
|
||||||
Capability RayQueryProvisionalKHR
|
Capability RayQueryKHR
|
||||||
Capability RayTracingNV
|
Capability RayTracingNV
|
||||||
Extension "SPV_KHR_ray_query"
|
Extension "SPV_KHR_ray_query"
|
||||||
Extension "SPV_NV_ray_tracing"
|
Extension "SPV_NV_ray_tracing"
|
||||||
@ -85,8 +85,9 @@ rayQuery-allOps.rgen
|
|||||||
35: TypePointer Function 8(float)
|
35: TypePointer Function 8(float)
|
||||||
37: 18(int) Constant 3
|
37: 18(int) Constant 3
|
||||||
38: 8(float) Constant 1176255488
|
38: 8(float) Constant 1176255488
|
||||||
45: TypeRayQueryProvisionalKHR
|
45: TypeRayQueryKHR
|
||||||
46: TypePointer Function 45
|
46: TypePointer Private 45
|
||||||
|
47(rayQuery): 46(ptr) Variable Private
|
||||||
48: TypeAccelerationStructureKHR
|
48: TypeAccelerationStructureKHR
|
||||||
49: TypePointer UniformConstant 48
|
49: TypePointer UniformConstant 48
|
||||||
50(rtas): 49(ptr) Variable UniformConstant
|
50(rtas): 49(ptr) Variable UniformConstant
|
||||||
@ -112,7 +113,6 @@ rayQuery-allOps.rgen
|
|||||||
4(main): 2 Function None 3
|
4(main): 2 Function None 3
|
||||||
5: Label
|
5: Label
|
||||||
43(ray): 25(ptr) Variable Function
|
43(ray): 25(ptr) Variable Function
|
||||||
47(rayQuery): 46(ptr) Variable Function
|
|
||||||
69(candidateType): 68(ptr) Variable Function
|
69(candidateType): 68(ptr) Variable Function
|
||||||
78(_mat4x3): 77(ptr) Variable Function
|
78(_mat4x3): 77(ptr) Variable Function
|
||||||
83(_mat3x4): 82(ptr) Variable Function
|
83(_mat3x4): 82(ptr) Variable Function
|
||||||
@ -221,7 +221,7 @@ rayQuery-allOps.rgen
|
|||||||
129: 2 FunctionCall 6(doSomething()
|
129: 2 FunctionCall 6(doSomething()
|
||||||
Branch 128
|
Branch 128
|
||||||
128: Label
|
128: Label
|
||||||
130: 18(int) RayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR 47(rayQuery) 23
|
130: 14(int) RayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR 47(rayQuery) 23
|
||||||
131: 66(bool) UGreaterThan 130 20
|
131: 66(bool) UGreaterThan 130 20
|
||||||
SelectionMerge 133 None
|
SelectionMerge 133 None
|
||||||
BranchConditional 131 132 133
|
BranchConditional 131 132 133
|
||||||
|
|||||||
76
Test/baseResults/rayQuery-global.rgen.out
Normal file
76
Test/baseResults/rayQuery-global.rgen.out
Normal file
@ -0,0 +1,76 @@
|
|||||||
|
rayQuery-global.rgen
|
||||||
|
// Module Version 10000
|
||||||
|
// Generated by (magic number): 8000a
|
||||||
|
// Id's are bound by 44
|
||||||
|
|
||||||
|
Capability RayQueryKHR
|
||||||
|
Capability RayTracingKHR
|
||||||
|
Extension "SPV_KHR_ray_query"
|
||||||
|
Extension "SPV_KHR_ray_tracing"
|
||||||
|
1: ExtInstImport "GLSL.std.450"
|
||||||
|
MemoryModel Logical GLSL450
|
||||||
|
EntryPoint RayGenerationKHR 4 "main"
|
||||||
|
Source GLSL 460
|
||||||
|
SourceExtension "GL_EXT_ray_flags_primitive_culling"
|
||||||
|
SourceExtension "GL_EXT_ray_query"
|
||||||
|
Name 4 "main"
|
||||||
|
Name 10 "otherWrapper(rq1;"
|
||||||
|
Name 9 "rq"
|
||||||
|
Name 13 "wrapper(rq1;"
|
||||||
|
Name 12 "rq"
|
||||||
|
Name 17 "rqGlobal"
|
||||||
|
Name 22 "rq2"
|
||||||
|
Name 27 "rtas"
|
||||||
|
Name 40 "rq2"
|
||||||
|
Decorate 27(rtas) DescriptorSet 0
|
||||||
|
Decorate 27(rtas) Binding 1
|
||||||
|
2: TypeVoid
|
||||||
|
3: TypeFunction 2
|
||||||
|
6: TypeRayQueryKHR
|
||||||
|
7: TypePointer Private 6
|
||||||
|
8: TypeFunction 2 7(ptr)
|
||||||
|
15: TypeBool
|
||||||
|
17(rqGlobal): 7(ptr) Variable Private
|
||||||
|
22(rq2): 7(ptr) Variable Private
|
||||||
|
25: TypeAccelerationStructureKHR
|
||||||
|
26: TypePointer UniformConstant 25
|
||||||
|
27(rtas): 26(ptr) Variable UniformConstant
|
||||||
|
29: TypeInt 32 0
|
||||||
|
30: 29(int) Constant 0
|
||||||
|
31: 29(int) Constant 255
|
||||||
|
32: TypeFloat 32
|
||||||
|
33: TypeVector 32(float) 3
|
||||||
|
34: 32(float) Constant 0
|
||||||
|
35: 33(fvec3) ConstantComposite 34 34 34
|
||||||
|
36: 32(float) Constant 1065353216
|
||||||
|
37: 33(fvec3) ConstantComposite 36 34 34
|
||||||
|
40(rq2): 7(ptr) Variable Private
|
||||||
|
4(main): 2 Function None 3
|
||||||
|
5: Label
|
||||||
|
28: 25 Load 27(rtas)
|
||||||
|
RayQueryInitializeKHR 17(rqGlobal) 28 30 31 35 34 37 36
|
||||||
|
38: 2 FunctionCall 13(wrapper(rq1;) 17(rqGlobal)
|
||||||
|
39: 2 FunctionCall 10(otherWrapper(rq1;) 17(rqGlobal)
|
||||||
|
41: 25 Load 27(rtas)
|
||||||
|
RayQueryInitializeKHR 40(rq2) 41 30 31 35 34 37 36
|
||||||
|
42: 2 FunctionCall 13(wrapper(rq1;) 40(rq2)
|
||||||
|
43: 2 FunctionCall 10(otherWrapper(rq1;) 40(rq2)
|
||||||
|
Return
|
||||||
|
FunctionEnd
|
||||||
|
10(otherWrapper(rq1;): 2 Function None 8
|
||||||
|
9(rq): 7(ptr) FunctionParameter
|
||||||
|
11: Label
|
||||||
|
16: 15(bool) RayQueryProceedKHR 9(rq)
|
||||||
|
18: 15(bool) RayQueryProceedKHR 17(rqGlobal)
|
||||||
|
Return
|
||||||
|
FunctionEnd
|
||||||
|
13(wrapper(rq1;): 2 Function None 8
|
||||||
|
12(rq): 7(ptr) FunctionParameter
|
||||||
|
14: Label
|
||||||
|
19: 15(bool) RayQueryProceedKHR 12(rq)
|
||||||
|
20: 15(bool) RayQueryProceedKHR 17(rqGlobal)
|
||||||
|
21: 2 FunctionCall 10(otherWrapper(rq1;) 12(rq)
|
||||||
|
23: 2 FunctionCall 10(otherWrapper(rq1;) 22(rq2)
|
||||||
|
24: 2 FunctionCall 10(otherWrapper(rq1;) 17(rqGlobal)
|
||||||
|
Return
|
||||||
|
FunctionEnd
|
||||||
@ -3,7 +3,7 @@ rayQuery-initialize.rgen
|
|||||||
// Generated by (magic number): 8000a
|
// Generated by (magic number): 8000a
|
||||||
// Id's are bound by 103
|
// Id's are bound by 103
|
||||||
|
|
||||||
Capability RayQueryProvisionalKHR
|
Capability RayQueryKHR
|
||||||
Capability RayTracingNV
|
Capability RayTracingNV
|
||||||
Extension "SPV_KHR_ray_query"
|
Extension "SPV_KHR_ray_query"
|
||||||
Extension "SPV_NV_ray_tracing"
|
Extension "SPV_NV_ray_tracing"
|
||||||
@ -55,8 +55,8 @@ rayQuery-initialize.rgen
|
|||||||
3: TypeFunction 2
|
3: TypeFunction 2
|
||||||
6: TypeInt 32 0
|
6: TypeInt 32 0
|
||||||
7: TypeFunction 6(int)
|
7: TypeFunction 6(int)
|
||||||
10: TypeRayQueryProvisionalKHR
|
10: TypeRayQueryKHR
|
||||||
11: TypePointer Function 10
|
11: TypePointer Private 10
|
||||||
12: TypeFloat 32
|
12: TypeFloat 32
|
||||||
13: TypeVector 12(float) 3
|
13: TypeVector 12(float) 3
|
||||||
14(Ray): TypeStruct 13(fvec3) 12(float) 13(fvec3) 12(float)
|
14(Ray): TypeStruct 13(fvec3) 12(float) 13(fvec3) 12(float)
|
||||||
@ -88,12 +88,12 @@ rayQuery-initialize.rgen
|
|||||||
75: TypePointer Uniform 74(Rays)
|
75: TypePointer Uniform 74(Rays)
|
||||||
76: 75(ptr) Variable Uniform
|
76: 75(ptr) Variable Uniform
|
||||||
78: TypePointer Uniform 72(Ray)
|
78: TypePointer Uniform 72(Ray)
|
||||||
|
89(rayQuery): 11(ptr) Variable Private
|
||||||
94: 6(int) Constant 32
|
94: 6(int) Constant 32
|
||||||
4(main): 2 Function None 3
|
4(main): 2 Function None 3
|
||||||
5: Label
|
5: Label
|
||||||
69(index): 68(ptr) Variable Function
|
69(index): 68(ptr) Variable Function
|
||||||
71(ray): 15(ptr) Variable Function
|
71(ray): 15(ptr) Variable Function
|
||||||
89(rayQuery): 11(ptr) Variable Function
|
|
||||||
90(param): 15(ptr) Variable Function
|
90(param): 15(ptr) Variable Function
|
||||||
70: 6(int) FunctionCall 8(launchIndex()
|
70: 6(int) FunctionCall 8(launchIndex()
|
||||||
Store 69(index) 70
|
Store 69(index) 70
|
||||||
|
|||||||
@ -3,7 +3,7 @@ rayQuery-no-cse.rgen
|
|||||||
// Generated by (magic number): 8000a
|
// Generated by (magic number): 8000a
|
||||||
// Id's are bound by 107
|
// Id's are bound by 107
|
||||||
|
|
||||||
Capability RayQueryProvisionalKHR
|
Capability RayQueryKHR
|
||||||
Capability RayTracingNV
|
Capability RayTracingNV
|
||||||
Extension "SPV_KHR_ray_query"
|
Extension "SPV_KHR_ray_query"
|
||||||
Extension "SPV_NV_ray_tracing"
|
Extension "SPV_NV_ray_tracing"
|
||||||
@ -57,8 +57,8 @@ rayQuery-no-cse.rgen
|
|||||||
3: TypeFunction 2
|
3: TypeFunction 2
|
||||||
6: TypeInt 32 0
|
6: TypeInt 32 0
|
||||||
7: TypeFunction 6(int)
|
7: TypeFunction 6(int)
|
||||||
10: TypeRayQueryProvisionalKHR
|
10: TypeRayQueryKHR
|
||||||
11: TypePointer Function 10
|
11: TypePointer Private 10
|
||||||
12: TypeFloat 32
|
12: TypeFloat 32
|
||||||
13: TypeVector 12(float) 3
|
13: TypeVector 12(float) 3
|
||||||
14(Ray): TypeStruct 13(fvec3) 12(float) 13(fvec3) 12(float)
|
14(Ray): TypeStruct 13(fvec3) 12(float) 13(fvec3) 12(float)
|
||||||
@ -90,14 +90,14 @@ rayQuery-no-cse.rgen
|
|||||||
75: TypePointer Uniform 74(Rays)
|
75: TypePointer Uniform 74(Rays)
|
||||||
76: 75(ptr) Variable Uniform
|
76: 75(ptr) Variable Uniform
|
||||||
78: TypePointer Uniform 72(Ray)
|
78: TypePointer Uniform 72(Ray)
|
||||||
|
89(rayQuery1): 11(ptr) Variable Private
|
||||||
94: 6(int) Constant 32
|
94: 6(int) Constant 32
|
||||||
|
103(rayQuery2): 11(ptr) Variable Private
|
||||||
4(main): 2 Function None 3
|
4(main): 2 Function None 3
|
||||||
5: Label
|
5: Label
|
||||||
69(index): 68(ptr) Variable Function
|
69(index): 68(ptr) Variable Function
|
||||||
71(ray): 15(ptr) Variable Function
|
71(ray): 15(ptr) Variable Function
|
||||||
89(rayQuery1): 11(ptr) Variable Function
|
|
||||||
90(param): 15(ptr) Variable Function
|
90(param): 15(ptr) Variable Function
|
||||||
103(rayQuery2): 11(ptr) Variable Function
|
|
||||||
104(param): 15(ptr) Variable Function
|
104(param): 15(ptr) Variable Function
|
||||||
70: 6(int) FunctionCall 8(launchIndex()
|
70: 6(int) FunctionCall 8(launchIndex()
|
||||||
Store 69(index) 70
|
Store 69(index) 70
|
||||||
|
|||||||
152
Test/baseResults/rayQuery-types.comp.out
Normal file
152
Test/baseResults/rayQuery-types.comp.out
Normal file
@ -0,0 +1,152 @@
|
|||||||
|
rayQuery-types.comp
|
||||||
|
// Module Version 10000
|
||||||
|
// Generated by (magic number): 8000a
|
||||||
|
// Id's are bound by 86
|
||||||
|
|
||||||
|
Capability Shader
|
||||||
|
Capability RayQueryKHR
|
||||||
|
Extension "SPV_KHR_ray_query"
|
||||||
|
1: ExtInstImport "GLSL.std.450"
|
||||||
|
MemoryModel Logical GLSL450
|
||||||
|
EntryPoint GLCompute 4 "main"
|
||||||
|
ExecutionMode 4 LocalSize 16 8 1
|
||||||
|
Source GLSL 460
|
||||||
|
SourceExtension "GL_EXT_ray_query"
|
||||||
|
Name 4 "main"
|
||||||
|
Name 8 "rayQuery"
|
||||||
|
Name 11 "tlas"
|
||||||
|
Name 25 "rq_proceed"
|
||||||
|
Name 35 "intersectionType"
|
||||||
|
Name 41 "rayTMin"
|
||||||
|
Name 43 "rayFlags"
|
||||||
|
Name 46 "worldRayOrigin"
|
||||||
|
Name 48 "worldDirection"
|
||||||
|
Name 50 "intersectionT"
|
||||||
|
Name 53 "customIndex"
|
||||||
|
Name 55 "instanceId"
|
||||||
|
Name 57 "sbtOffset"
|
||||||
|
Name 59 "geometryIndex"
|
||||||
|
Name 61 "primitiveIndex"
|
||||||
|
Name 65 "barys"
|
||||||
|
Name 67 "frontface"
|
||||||
|
Name 69 "aabbOpaque"
|
||||||
|
Name 71 "objRayDirection"
|
||||||
|
Name 73 "objRayOrigin"
|
||||||
|
Name 77 "objToWorld"
|
||||||
|
Name 79 "worldToObj"
|
||||||
|
Decorate 11(tlas) DescriptorSet 0
|
||||||
|
Decorate 11(tlas) Binding 0
|
||||||
|
Decorate 85 BuiltIn WorkgroupSize
|
||||||
|
2: TypeVoid
|
||||||
|
3: TypeFunction 2
|
||||||
|
6: TypeRayQueryKHR
|
||||||
|
7: TypePointer Private 6
|
||||||
|
8(rayQuery): 7(ptr) Variable Private
|
||||||
|
9: TypeAccelerationStructureKHR
|
||||||
|
10: TypePointer UniformConstant 9
|
||||||
|
11(tlas): 10(ptr) Variable UniformConstant
|
||||||
|
13: TypeInt 32 0
|
||||||
|
14: 13(int) Constant 0
|
||||||
|
15: 13(int) Constant 255
|
||||||
|
16: TypeFloat 32
|
||||||
|
17: TypeVector 16(float) 3
|
||||||
|
18: 16(float) Constant 0
|
||||||
|
19: 17(fvec3) ConstantComposite 18 18 18
|
||||||
|
20: 16(float) Constant 1065353216
|
||||||
|
21: 17(fvec3) ConstantComposite 20 18 18
|
||||||
|
22: 16(float) Constant 1176256512
|
||||||
|
23: TypeBool
|
||||||
|
24: TypePointer Function 23(bool)
|
||||||
|
34: TypePointer Function 13(int)
|
||||||
|
36: 23(bool) ConstantTrue
|
||||||
|
37: TypeInt 32 1
|
||||||
|
38: 37(int) Constant 1
|
||||||
|
40: TypePointer Function 16(float)
|
||||||
|
45: TypePointer Function 17(fvec3)
|
||||||
|
52: TypePointer Function 37(int)
|
||||||
|
63: TypeVector 16(float) 2
|
||||||
|
64: TypePointer Function 63(fvec2)
|
||||||
|
75: TypeMatrix 17(fvec3) 4
|
||||||
|
76: TypePointer Function 75
|
||||||
|
81: TypeVector 13(int) 3
|
||||||
|
82: 13(int) Constant 16
|
||||||
|
83: 13(int) Constant 8
|
||||||
|
84: 13(int) Constant 1
|
||||||
|
85: 81(ivec3) ConstantComposite 82 83 84
|
||||||
|
4(main): 2 Function None 3
|
||||||
|
5: Label
|
||||||
|
25(rq_proceed): 24(ptr) Variable Function
|
||||||
|
35(intersectionType): 34(ptr) Variable Function
|
||||||
|
41(rayTMin): 40(ptr) Variable Function
|
||||||
|
43(rayFlags): 34(ptr) Variable Function
|
||||||
|
46(worldRayOrigin): 45(ptr) Variable Function
|
||||||
|
48(worldDirection): 45(ptr) Variable Function
|
||||||
|
50(intersectionT): 40(ptr) Variable Function
|
||||||
|
53(customIndex): 52(ptr) Variable Function
|
||||||
|
55(instanceId): 52(ptr) Variable Function
|
||||||
|
57(sbtOffset): 34(ptr) Variable Function
|
||||||
|
59(geometryIndex): 52(ptr) Variable Function
|
||||||
|
61(primitiveIndex): 52(ptr) Variable Function
|
||||||
|
65(barys): 64(ptr) Variable Function
|
||||||
|
67(frontface): 24(ptr) Variable Function
|
||||||
|
69(aabbOpaque): 24(ptr) Variable Function
|
||||||
|
71(objRayDirection): 45(ptr) Variable Function
|
||||||
|
73(objRayOrigin): 45(ptr) Variable Function
|
||||||
|
77(objToWorld): 76(ptr) Variable Function
|
||||||
|
79(worldToObj): 76(ptr) Variable Function
|
||||||
|
12: 9 Load 11(tlas)
|
||||||
|
RayQueryInitializeKHR 8(rayQuery) 12 14 15 19 18 21 22
|
||||||
|
26: 23(bool) RayQueryProceedKHR 8(rayQuery)
|
||||||
|
Store 25(rq_proceed) 26
|
||||||
|
Branch 27
|
||||||
|
27: Label
|
||||||
|
LoopMerge 29 30 None
|
||||||
|
Branch 31
|
||||||
|
31: Label
|
||||||
|
32: 23(bool) Load 25(rq_proceed)
|
||||||
|
BranchConditional 32 28 29
|
||||||
|
28: Label
|
||||||
|
33: 23(bool) RayQueryProceedKHR 8(rayQuery)
|
||||||
|
Store 25(rq_proceed) 33
|
||||||
|
Branch 30
|
||||||
|
30: Label
|
||||||
|
Branch 27
|
||||||
|
29: Label
|
||||||
|
39: 13(int) RayQueryGetIntersectionTypeKHR 8(rayQuery) 38
|
||||||
|
Store 35(intersectionType) 39
|
||||||
|
42: 16(float) RayQueryGetRayTMinKHR 8(rayQuery)
|
||||||
|
Store 41(rayTMin) 42
|
||||||
|
44: 13(int) RayQueryGetRayFlagsKHR 8(rayQuery)
|
||||||
|
Store 43(rayFlags) 44
|
||||||
|
47: 17(fvec3) RayQueryGetWorldRayOriginKHR 8(rayQuery)
|
||||||
|
Store 46(worldRayOrigin) 47
|
||||||
|
49: 17(fvec3) RayQueryGetWorldRayDirectionKHR 8(rayQuery)
|
||||||
|
Store 48(worldDirection) 49
|
||||||
|
51: 16(float) RayQueryGetIntersectionTKHR 8(rayQuery) 38
|
||||||
|
Store 50(intersectionT) 51
|
||||||
|
54: 37(int) RayQueryGetIntersectionInstanceCustomIndexKHR 8(rayQuery) 38
|
||||||
|
Store 53(customIndex) 54
|
||||||
|
56: 37(int) RayQueryGetIntersectionInstanceIdKHR 8(rayQuery) 38
|
||||||
|
Store 55(instanceId) 56
|
||||||
|
58: 13(int) RayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR 8(rayQuery) 38
|
||||||
|
Store 57(sbtOffset) 58
|
||||||
|
60: 37(int) RayQueryGetIntersectionGeometryIndexKHR 8(rayQuery) 38
|
||||||
|
Store 59(geometryIndex) 60
|
||||||
|
62: 37(int) RayQueryGetIntersectionPrimitiveIndexKHR 8(rayQuery) 38
|
||||||
|
Store 61(primitiveIndex) 62
|
||||||
|
66: 63(fvec2) RayQueryGetIntersectionBarycentricsKHR 8(rayQuery) 38
|
||||||
|
Store 65(barys) 66
|
||||||
|
68: 23(bool) RayQueryGetIntersectionFrontFaceKHR 8(rayQuery) 38
|
||||||
|
Store 67(frontface) 68
|
||||||
|
70: 23(bool) RayQueryGetIntersectionCandidateAABBOpaqueKHR 8(rayQuery)
|
||||||
|
Store 69(aabbOpaque) 70
|
||||||
|
72: 17(fvec3) RayQueryGetIntersectionObjectRayDirectionKHR 8(rayQuery) 38
|
||||||
|
Store 71(objRayDirection) 72
|
||||||
|
74: 17(fvec3) RayQueryGetIntersectionObjectRayOriginKHR 8(rayQuery) 38
|
||||||
|
Store 73(objRayOrigin) 74
|
||||||
|
78: 75 RayQueryGetIntersectionObjectToWorldKHR 8(rayQuery) 38
|
||||||
|
Store 77(objToWorld) 78
|
||||||
|
80: 75 RayQueryGetIntersectionWorldToObjectKHR 8(rayQuery) 38
|
||||||
|
Store 79(worldToObj) 80
|
||||||
|
Return
|
||||||
|
FunctionEnd
|
||||||
@ -3,7 +3,7 @@ rayQuery.rgen
|
|||||||
// Generated by (magic number): 8000a
|
// Generated by (magic number): 8000a
|
||||||
// Id's are bound by 44
|
// Id's are bound by 44
|
||||||
|
|
||||||
Capability RayQueryProvisionalKHR
|
Capability RayQueryKHR
|
||||||
Capability RayTracingNV
|
Capability RayTracingNV
|
||||||
Extension "SPV_KHR_ray_query"
|
Extension "SPV_KHR_ray_query"
|
||||||
Extension "SPV_NV_ray_tracing"
|
Extension "SPV_NV_ray_tracing"
|
||||||
@ -39,8 +39,9 @@ rayQuery.rgen
|
|||||||
11: TypePointer Function 10(float)
|
11: TypePointer Function 10(float)
|
||||||
13: 10(float) Constant 0
|
13: 10(float) Constant 0
|
||||||
15: 10(float) Constant 1148846080
|
15: 10(float) Constant 1148846080
|
||||||
16: TypeRayQueryProvisionalKHR
|
16: TypeRayQueryKHR
|
||||||
17: TypePointer Function 16
|
17: TypePointer Private 16
|
||||||
|
18(localRayQuery): 17(ptr) Variable Private
|
||||||
19: TypeAccelerationStructureKHR
|
19: TypeAccelerationStructureKHR
|
||||||
20: TypePointer UniformConstant 19
|
20: TypePointer UniformConstant 19
|
||||||
21(acc0): 20(ptr) Variable UniformConstant
|
21(acc0): 20(ptr) Variable UniformConstant
|
||||||
@ -59,7 +60,6 @@ rayQuery.rgen
|
|||||||
8(rayFlags): 7(ptr) Variable Function
|
8(rayFlags): 7(ptr) Variable Function
|
||||||
12(tMin): 11(ptr) Variable Function
|
12(tMin): 11(ptr) Variable Function
|
||||||
14(tMax): 11(ptr) Variable Function
|
14(tMax): 11(ptr) Variable Function
|
||||||
18(localRayQuery): 17(ptr) Variable Function
|
|
||||||
Store 8(rayFlags) 9
|
Store 8(rayFlags) 9
|
||||||
Store 12(tMin) 13
|
Store 12(tMin) 13
|
||||||
Store 14(tMax) 15
|
Store 14(tMax) 15
|
||||||
|
|||||||
0
Test/baseResults/spv.1.4.NonWritable.frag.out
Executable file → Normal file
0
Test/baseResults/spv.1.4.NonWritable.frag.out
Executable file → Normal file
0
Test/baseResults/spv.1.4.OpEntryPoint.opaqueParams.vert.out
Executable file → Normal file
0
Test/baseResults/spv.1.4.OpEntryPoint.opaqueParams.vert.out
Executable file → Normal file
0
Test/baseResults/spv.1.4.OpSelect.frag.out
Executable file → Normal file
0
Test/baseResults/spv.1.4.OpSelect.frag.out
Executable file → Normal file
0
Test/baseResults/spv.1.4.image.frag.out
Executable file → Normal file
0
Test/baseResults/spv.1.4.image.frag.out
Executable file → Normal file
0
Test/baseResults/spv.1.4.sparseTexture.frag.out
Executable file → Normal file
0
Test/baseResults/spv.1.4.sparseTexture.frag.out
Executable file → Normal file
0
Test/baseResults/spv.1.4.texture.frag.out
Executable file → Normal file
0
Test/baseResults/spv.1.4.texture.frag.out
Executable file → Normal file
@ -53,7 +53,7 @@ spv.AnyHitShader.rahit
|
|||||||
Decorate 42(gl_ObjectRayDirectionNV) BuiltIn ObjectRayDirectionKHR
|
Decorate 42(gl_ObjectRayDirectionNV) BuiltIn ObjectRayDirectionKHR
|
||||||
Decorate 47(gl_RayTminNV) BuiltIn RayTminKHR
|
Decorate 47(gl_RayTminNV) BuiltIn RayTminKHR
|
||||||
Decorate 50(gl_RayTmaxNV) BuiltIn RayTmaxKHR
|
Decorate 50(gl_RayTmaxNV) BuiltIn RayTmaxKHR
|
||||||
Decorate 53(gl_HitTNV) BuiltIn HitTKHR
|
Decorate 53(gl_HitTNV) BuiltIn HitTNV
|
||||||
Decorate 58(gl_HitKindNV) BuiltIn HitKindKHR
|
Decorate 58(gl_HitKindNV) BuiltIn HitKindKHR
|
||||||
Decorate 64(gl_ObjectToWorldNV) BuiltIn ObjectToWorldKHR
|
Decorate 64(gl_ObjectToWorldNV) BuiltIn ObjectToWorldKHR
|
||||||
Decorate 67(gl_WorldToObjectNV) BuiltIn WorldToObjectKHR
|
Decorate 67(gl_WorldToObjectNV) BuiltIn WorldToObjectKHR
|
||||||
@ -153,10 +153,10 @@ spv.AnyHitShader.rahit
|
|||||||
SelectionMerge 79 None
|
SelectionMerge 79 None
|
||||||
BranchConditional 77 78 80
|
BranchConditional 77 78 80
|
||||||
78: Label
|
78: Label
|
||||||
IgnoreIntersectionKHR
|
IgnoreIntersectionNV
|
||||||
Branch 79
|
Branch 79
|
||||||
80: Label
|
80: Label
|
||||||
TerminateRayKHR
|
TerminateRayNV
|
||||||
Branch 79
|
Branch 79
|
||||||
79: Label
|
79: Label
|
||||||
Return
|
Return
|
||||||
|
|||||||
@ -55,7 +55,7 @@ spv.ClosestHitShader.rchit
|
|||||||
Decorate 42(gl_ObjectRayDirectionNV) BuiltIn ObjectRayDirectionKHR
|
Decorate 42(gl_ObjectRayDirectionNV) BuiltIn ObjectRayDirectionKHR
|
||||||
Decorate 47(gl_RayTminNV) BuiltIn RayTminKHR
|
Decorate 47(gl_RayTminNV) BuiltIn RayTminKHR
|
||||||
Decorate 50(gl_RayTmaxNV) BuiltIn RayTmaxKHR
|
Decorate 50(gl_RayTmaxNV) BuiltIn RayTmaxKHR
|
||||||
Decorate 53(gl_HitTNV) BuiltIn HitTKHR
|
Decorate 53(gl_HitTNV) BuiltIn HitTNV
|
||||||
Decorate 58(gl_HitKindNV) BuiltIn HitKindKHR
|
Decorate 58(gl_HitKindNV) BuiltIn HitKindKHR
|
||||||
Decorate 64(gl_ObjectToWorldNV) BuiltIn ObjectToWorldKHR
|
Decorate 64(gl_ObjectToWorldNV) BuiltIn ObjectToWorldKHR
|
||||||
Decorate 67(gl_WorldToObjectNV) BuiltIn WorldToObjectKHR
|
Decorate 67(gl_WorldToObjectNV) BuiltIn WorldToObjectKHR
|
||||||
@ -164,6 +164,6 @@ spv.ClosestHitShader.rchit
|
|||||||
68: 60 Load 67(gl_WorldToObjectNV)
|
68: 60 Load 67(gl_WorldToObjectNV)
|
||||||
Store 66(v14) 68
|
Store 66(v14) 68
|
||||||
72: 69 Load 71(accNV)
|
72: 69 Load 71(accNV)
|
||||||
TraceRayKHR 72 73 74 75 76 73 78 77 80 81 82
|
TraceNV 72 73 74 75 76 73 78 77 80 81 82
|
||||||
Return
|
Return
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
|
|||||||
@ -1,13 +1,13 @@
|
|||||||
spv.MissShader.rmiss
|
spv.MissShader.rmiss
|
||||||
// Module Version 10000
|
// Module Version 10000
|
||||||
// Generated by (magic number): 8000a
|
// Generated by (magic number): 8000a
|
||||||
// Id's are bound by 60
|
// Id's are bound by 59
|
||||||
|
|
||||||
Capability RayTracingNV
|
Capability RayTracingNV
|
||||||
Extension "SPV_NV_ray_tracing"
|
Extension "SPV_NV_ray_tracing"
|
||||||
1: ExtInstImport "GLSL.std.450"
|
1: ExtInstImport "GLSL.std.450"
|
||||||
MemoryModel Logical GLSL450
|
MemoryModel Logical GLSL450
|
||||||
EntryPoint MissKHR 4 "main" 11 14 21 24 27 30 35 38
|
EntryPoint MissKHR 4 "main" 11 14 21 24 29 34 37
|
||||||
Source GLSL 460
|
Source GLSL 460
|
||||||
SourceExtension "GL_NV_ray_tracing"
|
SourceExtension "GL_NV_ray_tracing"
|
||||||
Name 4 "main"
|
Name 4 "main"
|
||||||
@ -19,29 +19,26 @@ spv.MissShader.rmiss
|
|||||||
Name 21 "gl_WorldRayOriginNV"
|
Name 21 "gl_WorldRayOriginNV"
|
||||||
Name 23 "v3"
|
Name 23 "v3"
|
||||||
Name 24 "gl_WorldRayDirectionNV"
|
Name 24 "gl_WorldRayDirectionNV"
|
||||||
Name 26 "v4"
|
Name 27 "v4"
|
||||||
Name 27 "gl_ObjectRayOriginNV"
|
Name 29 "gl_IncomingRayFlagsNV"
|
||||||
Name 29 "v5"
|
Name 32 "v6"
|
||||||
Name 30 "gl_ObjectRayDirectionNV"
|
Name 34 "gl_RayTminNV"
|
||||||
Name 33 "v6"
|
Name 36 "v7"
|
||||||
Name 35 "gl_RayTminNV"
|
Name 37 "gl_RayTmaxNV"
|
||||||
Name 37 "v7"
|
Name 41 "accNV"
|
||||||
Name 38 "gl_RayTmaxNV"
|
Name 56 "localPayload"
|
||||||
Name 42 "accNV"
|
Name 58 "incomingPayload"
|
||||||
Name 57 "localPayload"
|
|
||||||
Name 59 "incomingPayload"
|
|
||||||
Decorate 11(gl_LaunchIDNV) BuiltIn LaunchIdKHR
|
Decorate 11(gl_LaunchIDNV) BuiltIn LaunchIdKHR
|
||||||
Decorate 14(gl_LaunchSizeNV) BuiltIn LaunchSizeKHR
|
Decorate 14(gl_LaunchSizeNV) BuiltIn LaunchSizeKHR
|
||||||
Decorate 21(gl_WorldRayOriginNV) BuiltIn WorldRayOriginKHR
|
Decorate 21(gl_WorldRayOriginNV) BuiltIn WorldRayOriginKHR
|
||||||
Decorate 24(gl_WorldRayDirectionNV) BuiltIn WorldRayDirectionKHR
|
Decorate 24(gl_WorldRayDirectionNV) BuiltIn WorldRayDirectionKHR
|
||||||
Decorate 27(gl_ObjectRayOriginNV) BuiltIn ObjectRayOriginKHR
|
Decorate 29(gl_IncomingRayFlagsNV) BuiltIn IncomingRayFlagsKHR
|
||||||
Decorate 30(gl_ObjectRayDirectionNV) BuiltIn ObjectRayDirectionKHR
|
Decorate 34(gl_RayTminNV) BuiltIn RayTminKHR
|
||||||
Decorate 35(gl_RayTminNV) BuiltIn RayTminKHR
|
Decorate 37(gl_RayTmaxNV) BuiltIn RayTmaxKHR
|
||||||
Decorate 38(gl_RayTmaxNV) BuiltIn RayTmaxKHR
|
Decorate 41(accNV) DescriptorSet 0
|
||||||
Decorate 42(accNV) DescriptorSet 0
|
Decorate 41(accNV) Binding 0
|
||||||
Decorate 42(accNV) Binding 0
|
Decorate 56(localPayload) Location 0
|
||||||
Decorate 57(localPayload) Location 0
|
Decorate 58(incomingPayload) Location 1
|
||||||
Decorate 59(incomingPayload) Location 1
|
|
||||||
2: TypeVoid
|
2: TypeVoid
|
||||||
3: TypeFunction 2
|
3: TypeFunction 2
|
||||||
6: TypeInt 32 0
|
6: TypeInt 32 0
|
||||||
@ -56,41 +53,41 @@ spv.MissShader.rmiss
|
|||||||
20: TypePointer Input 17(fvec3)
|
20: TypePointer Input 17(fvec3)
|
||||||
21(gl_WorldRayOriginNV): 20(ptr) Variable Input
|
21(gl_WorldRayOriginNV): 20(ptr) Variable Input
|
||||||
24(gl_WorldRayDirectionNV): 20(ptr) Variable Input
|
24(gl_WorldRayDirectionNV): 20(ptr) Variable Input
|
||||||
27(gl_ObjectRayOriginNV): 20(ptr) Variable Input
|
26: TypePointer Function 6(int)
|
||||||
30(gl_ObjectRayDirectionNV): 20(ptr) Variable Input
|
28: TypePointer Input 6(int)
|
||||||
32: TypePointer Function 16(float)
|
29(gl_IncomingRayFlagsNV): 28(ptr) Variable Input
|
||||||
34: TypePointer Input 16(float)
|
31: TypePointer Function 16(float)
|
||||||
35(gl_RayTminNV): 34(ptr) Variable Input
|
33: TypePointer Input 16(float)
|
||||||
38(gl_RayTmaxNV): 34(ptr) Variable Input
|
34(gl_RayTminNV): 33(ptr) Variable Input
|
||||||
40: TypeAccelerationStructureKHR
|
37(gl_RayTmaxNV): 33(ptr) Variable Input
|
||||||
41: TypePointer UniformConstant 40
|
39: TypeAccelerationStructureKHR
|
||||||
42(accNV): 41(ptr) Variable UniformConstant
|
40: TypePointer UniformConstant 39
|
||||||
44: 6(int) Constant 0
|
41(accNV): 40(ptr) Variable UniformConstant
|
||||||
45: 6(int) Constant 1
|
43: 6(int) Constant 0
|
||||||
46: 6(int) Constant 2
|
44: 6(int) Constant 1
|
||||||
47: 6(int) Constant 3
|
45: 6(int) Constant 2
|
||||||
48: 16(float) Constant 1056964608
|
46: 6(int) Constant 3
|
||||||
49: 17(fvec3) ConstantComposite 48 48 48
|
47: 16(float) Constant 1056964608
|
||||||
50: 16(float) Constant 1065353216
|
48: 17(fvec3) ConstantComposite 47 47 47
|
||||||
51: 17(fvec3) ConstantComposite 50 50 50
|
49: 16(float) Constant 1065353216
|
||||||
52: 16(float) Constant 1061158912
|
50: 17(fvec3) ConstantComposite 49 49 49
|
||||||
53: TypeInt 32 1
|
51: 16(float) Constant 1061158912
|
||||||
54: 53(int) Constant 1
|
52: TypeInt 32 1
|
||||||
55: TypeVector 16(float) 4
|
53: 52(int) Constant 1
|
||||||
56: TypePointer RayPayloadKHR 55(fvec4)
|
54: TypeVector 16(float) 4
|
||||||
57(localPayload): 56(ptr) Variable RayPayloadKHR
|
55: TypePointer RayPayloadKHR 54(fvec4)
|
||||||
58: TypePointer IncomingRayPayloadKHR 55(fvec4)
|
56(localPayload): 55(ptr) Variable RayPayloadKHR
|
||||||
59(incomingPayload): 58(ptr) Variable IncomingRayPayloadKHR
|
57: TypePointer IncomingRayPayloadKHR 54(fvec4)
|
||||||
|
58(incomingPayload): 57(ptr) Variable IncomingRayPayloadKHR
|
||||||
4(main): 2 Function None 3
|
4(main): 2 Function None 3
|
||||||
5: Label
|
5: Label
|
||||||
9(v0): 8(ptr) Variable Function
|
9(v0): 8(ptr) Variable Function
|
||||||
13(v1): 8(ptr) Variable Function
|
13(v1): 8(ptr) Variable Function
|
||||||
19(v2): 18(ptr) Variable Function
|
19(v2): 18(ptr) Variable Function
|
||||||
23(v3): 18(ptr) Variable Function
|
23(v3): 18(ptr) Variable Function
|
||||||
26(v4): 18(ptr) Variable Function
|
27(v4): 26(ptr) Variable Function
|
||||||
29(v5): 18(ptr) Variable Function
|
32(v6): 31(ptr) Variable Function
|
||||||
33(v6): 32(ptr) Variable Function
|
36(v7): 31(ptr) Variable Function
|
||||||
37(v7): 32(ptr) Variable Function
|
|
||||||
12: 7(ivec3) Load 11(gl_LaunchIDNV)
|
12: 7(ivec3) Load 11(gl_LaunchIDNV)
|
||||||
Store 9(v0) 12
|
Store 9(v0) 12
|
||||||
15: 7(ivec3) Load 14(gl_LaunchSizeNV)
|
15: 7(ivec3) Load 14(gl_LaunchSizeNV)
|
||||||
@ -99,15 +96,13 @@ spv.MissShader.rmiss
|
|||||||
Store 19(v2) 22
|
Store 19(v2) 22
|
||||||
25: 17(fvec3) Load 24(gl_WorldRayDirectionNV)
|
25: 17(fvec3) Load 24(gl_WorldRayDirectionNV)
|
||||||
Store 23(v3) 25
|
Store 23(v3) 25
|
||||||
28: 17(fvec3) Load 27(gl_ObjectRayOriginNV)
|
30: 6(int) Load 29(gl_IncomingRayFlagsNV)
|
||||||
Store 26(v4) 28
|
Store 27(v4) 30
|
||||||
31: 17(fvec3) Load 30(gl_ObjectRayDirectionNV)
|
35: 16(float) Load 34(gl_RayTminNV)
|
||||||
Store 29(v5) 31
|
Store 32(v6) 35
|
||||||
36: 16(float) Load 35(gl_RayTminNV)
|
38: 16(float) Load 37(gl_RayTmaxNV)
|
||||||
Store 33(v6) 36
|
Store 36(v7) 38
|
||||||
39: 16(float) Load 38(gl_RayTmaxNV)
|
42: 39 Load 41(accNV)
|
||||||
Store 37(v7) 39
|
TraceNV 42 43 44 45 46 43 48 47 50 51 53
|
||||||
43: 40 Load 42(accNV)
|
|
||||||
TraceRayKHR 43 44 45 46 47 44 49 48 51 52 54
|
|
||||||
Return
|
Return
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
|
|||||||
@ -55,6 +55,6 @@ spv.RayCallable.rcall
|
|||||||
Store 13(size) 15
|
Store 13(size) 15
|
||||||
23: 22(ptr) AccessChain 18 20
|
23: 22(ptr) AccessChain 18 20
|
||||||
Store 23 21
|
Store 23 21
|
||||||
ExecuteCallableKHR 24 25
|
ExecuteCallableNV 24 25
|
||||||
Return
|
Return
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
|
|||||||
@ -41,6 +41,6 @@ spv.RayConstants.rgen
|
|||||||
4(main): 2 Function None 3
|
4(main): 2 Function None 3
|
||||||
5: Label
|
5: Label
|
||||||
9: 6 Load 8(accNV)
|
9: 6 Load 8(accNV)
|
||||||
TraceRayKHR 9 11 12 13 13 12 17 18 20 21 23
|
TraceNV 9 11 12 13 13 12 17 18 20 21 23
|
||||||
Return
|
Return
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
|
|||||||
@ -92,6 +92,6 @@ spv.RayGenShader.rgen
|
|||||||
44: 36(fvec3) Load 43
|
44: 36(fvec3) Load 43
|
||||||
47: 42(ptr) AccessChain 39 46
|
47: 42(ptr) AccessChain 39 46
|
||||||
48: 36(fvec3) Load 47
|
48: 36(fvec3) Load 47
|
||||||
TraceRayKHR 30 31 32 33 34 12 44 45 48 49 41
|
TraceNV 30 31 32 33 34 12 44 45 48 49 41
|
||||||
Return
|
Return
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
|
|||||||
2
Test/baseResults/spv.RayGenShader11.rgen.out
Executable file → Normal file
2
Test/baseResults/spv.RayGenShader11.rgen.out
Executable file → Normal file
@ -88,6 +88,6 @@ spv.RayGenShader11.rgen
|
|||||||
44: 36(fvec3) Load 43
|
44: 36(fvec3) Load 43
|
||||||
47: 42(ptr) AccessChain 39 46
|
47: 42(ptr) AccessChain 39 46
|
||||||
48: 36(fvec3) Load 47
|
48: 36(fvec3) Load 47
|
||||||
TraceRayKHR 30 31 32 33 34 12 44 45 48 49 41
|
TraceNV 30 31 32 33 34 12 44 45 48 49 41
|
||||||
Return
|
Return
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
|
|||||||
@ -111,7 +111,7 @@ spv.RayGenShaderArray.rgen
|
|||||||
51: 32(fvec3) Load 50
|
51: 32(fvec3) Load 50
|
||||||
54: 49(ptr) AccessChain 36 53
|
54: 49(ptr) AccessChain 36 53
|
||||||
55: 32(fvec3) Load 54
|
55: 32(fvec3) Load 54
|
||||||
TraceRayKHR 43 44 45 46 47 12 51 52 55 56 48
|
TraceNV 43 44 45 46 47 12 51 52 55 56 48
|
||||||
61: 38(ptr) AccessChain 36 37
|
61: 38(ptr) AccessChain 36 37
|
||||||
62: 33(int) Load 61
|
62: 33(int) Load 61
|
||||||
63: 41(ptr) AccessChain 60(accNV1) 62
|
63: 41(ptr) AccessChain 60(accNV1) 62
|
||||||
@ -124,7 +124,7 @@ spv.RayGenShaderArray.rgen
|
|||||||
70: 32(fvec3) Load 69
|
70: 32(fvec3) Load 69
|
||||||
71: 49(ptr) AccessChain 36 53
|
71: 49(ptr) AccessChain 36 53
|
||||||
72: 32(fvec3) Load 71
|
72: 32(fvec3) Load 71
|
||||||
TraceRayKHR 64 65 66 67 68 12 70 52 72 56 48
|
TraceNV 64 65 66 67 68 12 70 52 72 56 48
|
||||||
73: 38(ptr) AccessChain 36 37
|
73: 38(ptr) AccessChain 36 37
|
||||||
74: 33(int) Load 73
|
74: 33(int) Load 73
|
||||||
75: 33(int) CopyObject 74
|
75: 33(int) CopyObject 74
|
||||||
@ -138,6 +138,6 @@ spv.RayGenShaderArray.rgen
|
|||||||
83: 32(fvec3) Load 82
|
83: 32(fvec3) Load 82
|
||||||
84: 49(ptr) AccessChain 36 53
|
84: 49(ptr) AccessChain 36 53
|
||||||
85: 32(fvec3) Load 84
|
85: 32(fvec3) Load 84
|
||||||
TraceRayKHR 77 78 79 80 81 12 83 52 85 56 48
|
TraceNV 77 78 79 80 81 12 83 52 85 56 48
|
||||||
Return
|
Return
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
|
|||||||
0
Test/baseResults/spv.atomicFloat.comp.out
Executable file → Normal file
0
Test/baseResults/spv.atomicFloat.comp.out
Executable file → Normal file
0
Test/baseResults/spv.atomicFloat_Error.comp.out
Executable file → Normal file
0
Test/baseResults/spv.atomicFloat_Error.comp.out
Executable file → Normal file
0
Test/baseResults/spv.bufferhandleUvec2.frag.out
Executable file → Normal file
0
Test/baseResults/spv.bufferhandleUvec2.frag.out
Executable file → Normal file
@ -0,0 +1,53 @@
|
|||||||
|
spv.builtin.PrimitiveShadingRateEXT.vert
|
||||||
|
// Module Version 10000
|
||||||
|
// Generated by (magic number): 8000a
|
||||||
|
// Id's are bound by 26
|
||||||
|
|
||||||
|
Capability Shader
|
||||||
|
Capability FragmentShadingRateKHR
|
||||||
|
Extension "SPV_KHR_fragment_shading_rate"
|
||||||
|
1: ExtInstImport "GLSL.std.450"
|
||||||
|
MemoryModel Logical GLSL450
|
||||||
|
EntryPoint Vertex 4 "main" 8 16
|
||||||
|
Source GLSL 450
|
||||||
|
SourceExtension "GL_EXT_fragment_shading_rate"
|
||||||
|
Name 4 "main"
|
||||||
|
Name 8 "id"
|
||||||
|
Name 16 "gl_PrimitiveShadingRateEXT"
|
||||||
|
Decorate 8(id) Location 0
|
||||||
|
Decorate 16(gl_PrimitiveShadingRateEXT) BuiltIn PrimitiveShadingRateKHR
|
||||||
|
2: TypeVoid
|
||||||
|
3: TypeFunction 2
|
||||||
|
6: TypeInt 32 1
|
||||||
|
7: TypePointer Input 6(int)
|
||||||
|
8(id): 7(ptr) Variable Input
|
||||||
|
15: TypePointer Output 6(int)
|
||||||
|
16(gl_PrimitiveShadingRateEXT): 15(ptr) Variable Output
|
||||||
|
17: 6(int) Constant 5
|
||||||
|
19: 6(int) Constant 9
|
||||||
|
21: 6(int) Constant 6
|
||||||
|
23: 6(int) Constant 10
|
||||||
|
4(main): 2 Function None 3
|
||||||
|
5: Label
|
||||||
|
9: 6(int) Load 8(id)
|
||||||
|
SelectionMerge 14 None
|
||||||
|
Switch 9 14
|
||||||
|
case 0: 10
|
||||||
|
case 1: 11
|
||||||
|
case 2: 12
|
||||||
|
case 3: 13
|
||||||
|
10: Label
|
||||||
|
Store 16(gl_PrimitiveShadingRateEXT) 17
|
||||||
|
Branch 14
|
||||||
|
11: Label
|
||||||
|
Store 16(gl_PrimitiveShadingRateEXT) 19
|
||||||
|
Branch 14
|
||||||
|
12: Label
|
||||||
|
Store 16(gl_PrimitiveShadingRateEXT) 21
|
||||||
|
Branch 14
|
||||||
|
13: Label
|
||||||
|
Store 16(gl_PrimitiveShadingRateEXT) 23
|
||||||
|
Branch 14
|
||||||
|
14: Label
|
||||||
|
Return
|
||||||
|
FunctionEnd
|
||||||
36
Test/baseResults/spv.builtin.ShadingRateEXT.frag.out
Normal file
36
Test/baseResults/spv.builtin.ShadingRateEXT.frag.out
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
spv.builtin.ShadingRateEXT.frag
|
||||||
|
WARNING: 0:5: '' : all default precisions are highp; use precision statements to quiet warning, e.g.:
|
||||||
|
"precision mediump int; precision highp float;"
|
||||||
|
|
||||||
|
// Module Version 10000
|
||||||
|
// Generated by (magic number): 8000a
|
||||||
|
// Id's are bound by 12
|
||||||
|
|
||||||
|
Capability Shader
|
||||||
|
Capability FragmentShadingRateKHR
|
||||||
|
Extension "SPV_KHR_fragment_shading_rate"
|
||||||
|
1: ExtInstImport "GLSL.std.450"
|
||||||
|
MemoryModel Logical GLSL450
|
||||||
|
EntryPoint Fragment 4 "main" 8 10
|
||||||
|
ExecutionMode 4 OriginUpperLeft
|
||||||
|
Source GLSL 450
|
||||||
|
SourceExtension "GL_EXT_fragment_shading_rate"
|
||||||
|
Name 4 "main"
|
||||||
|
Name 8 "val"
|
||||||
|
Name 10 "gl_ShadingRateEXT"
|
||||||
|
Decorate 8(val) Location 0
|
||||||
|
Decorate 10(gl_ShadingRateEXT) Flat
|
||||||
|
Decorate 10(gl_ShadingRateEXT) BuiltIn ShadingRateKHR
|
||||||
|
2: TypeVoid
|
||||||
|
3: TypeFunction 2
|
||||||
|
6: TypeInt 32 1
|
||||||
|
7: TypePointer Output 6(int)
|
||||||
|
8(val): 7(ptr) Variable Output
|
||||||
|
9: TypePointer Input 6(int)
|
||||||
|
10(gl_ShadingRateEXT): 9(ptr) Variable Input
|
||||||
|
4(main): 2 Function None 3
|
||||||
|
5: Label
|
||||||
|
11: 6(int) Load 10(gl_ShadingRateEXT)
|
||||||
|
Store 8(val) 11
|
||||||
|
Return
|
||||||
|
FunctionEnd
|
||||||
41
Test/baseResults/spv.ext.AccelDecl.frag.out
Normal file
41
Test/baseResults/spv.ext.AccelDecl.frag.out
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
spv.ext.AccelDecl.frag
|
||||||
|
// Module Version 10400
|
||||||
|
// Generated by (magic number): 8000a
|
||||||
|
// Id's are bound by 15
|
||||||
|
|
||||||
|
Capability Shader
|
||||||
|
Capability RayQueryKHR
|
||||||
|
Extension "SPV_KHR_ray_query"
|
||||||
|
1: ExtInstImport "GLSL.std.450"
|
||||||
|
MemoryModel Logical GLSL450
|
||||||
|
EntryPoint Fragment 4 "main" 9 14
|
||||||
|
ExecutionMode 4 OriginUpperLeft
|
||||||
|
Source GLSL 460
|
||||||
|
SourceExtension "GL_ARB_separate_shader_objects"
|
||||||
|
SourceExtension "GL_EXT_nonuniform_qualifier"
|
||||||
|
SourceExtension "GL_EXT_ray_query"
|
||||||
|
SourceExtension "GL_EXT_scalar_block_layout"
|
||||||
|
SourceExtension "GL_GOOGLE_cpp_style_line_directive"
|
||||||
|
SourceExtension "GL_GOOGLE_include_directive"
|
||||||
|
Name 4 "main"
|
||||||
|
Name 9 "outColor"
|
||||||
|
Name 14 "topLevelAS"
|
||||||
|
Decorate 9(outColor) Location 0
|
||||||
|
Decorate 14(topLevelAS) DescriptorSet 0
|
||||||
|
Decorate 14(topLevelAS) Binding 1
|
||||||
|
2: TypeVoid
|
||||||
|
3: TypeFunction 2
|
||||||
|
6: TypeFloat 32
|
||||||
|
7: TypeVector 6(float) 4
|
||||||
|
8: TypePointer Output 7(fvec4)
|
||||||
|
9(outColor): 8(ptr) Variable Output
|
||||||
|
10: 6(float) Constant 0
|
||||||
|
11: 7(fvec4) ConstantComposite 10 10 10 10
|
||||||
|
12: TypeAccelerationStructureKHR
|
||||||
|
13: TypePointer UniformConstant 12
|
||||||
|
14(topLevelAS): 13(ptr) Variable UniformConstant
|
||||||
|
4(main): 2 Function None 3
|
||||||
|
5: Label
|
||||||
|
Store 9(outColor) 11
|
||||||
|
Return
|
||||||
|
FunctionEnd
|
||||||
@ -1,15 +1,17 @@
|
|||||||
spv.ext.AnyHitShader.rahit
|
spv.ext.AnyHitShader.rahit
|
||||||
// Module Version 10400
|
// Module Version 10400
|
||||||
// Generated by (magic number): 8000a
|
// Generated by (magic number): 8000a
|
||||||
// Id's are bound by 94
|
// Id's are bound by 107
|
||||||
|
|
||||||
Capability RayTracingProvisionalKHR
|
Capability GroupNonUniform
|
||||||
|
Capability RayTracingKHR
|
||||||
Extension "SPV_KHR_ray_tracing"
|
Extension "SPV_KHR_ray_tracing"
|
||||||
1: ExtInstImport "GLSL.std.450"
|
1: ExtInstImport "GLSL.std.450"
|
||||||
MemoryModel Logical GLSL450
|
MemoryModel Logical GLSL450
|
||||||
EntryPoint AnyHitKHR 4 "main" 11 14 20 23 26 33 36 39 42 47 50 53 58 64 67 70 76 80 84
|
EntryPoint AnyHitKHR 4 "main" 11 14 20 23 26 33 36 39 42 47 50 53 58 64 67 70 76 80 84 98
|
||||||
Source GLSL 460
|
Source GLSL 460
|
||||||
SourceExtension "GL_EXT_ray_tracing"
|
SourceExtension "GL_EXT_ray_tracing"
|
||||||
|
SourceExtension "GL_KHR_shader_subgroup_basic"
|
||||||
Name 4 "main"
|
Name 4 "main"
|
||||||
Name 9 "v0"
|
Name 9 "v0"
|
||||||
Name 11 "gl_LaunchIDEXT"
|
Name 11 "gl_LaunchIDEXT"
|
||||||
@ -48,6 +50,7 @@ spv.ext.AnyHitShader.rahit
|
|||||||
Name 79 "v17"
|
Name 79 "v17"
|
||||||
Name 80 "gl_WorldToObject3x4EXT"
|
Name 80 "gl_WorldToObject3x4EXT"
|
||||||
Name 84 "incomingPayload"
|
Name 84 "incomingPayload"
|
||||||
|
Name 98 "gl_SubgroupSize"
|
||||||
Decorate 11(gl_LaunchIDEXT) BuiltIn LaunchIdKHR
|
Decorate 11(gl_LaunchIDEXT) BuiltIn LaunchIdKHR
|
||||||
Decorate 14(gl_LaunchSizeEXT) BuiltIn LaunchSizeKHR
|
Decorate 14(gl_LaunchSizeEXT) BuiltIn LaunchSizeKHR
|
||||||
Decorate 20(gl_PrimitiveID) BuiltIn PrimitiveId
|
Decorate 20(gl_PrimitiveID) BuiltIn PrimitiveId
|
||||||
@ -59,7 +62,7 @@ spv.ext.AnyHitShader.rahit
|
|||||||
Decorate 42(gl_ObjectRayDirectionEXT) BuiltIn ObjectRayDirectionKHR
|
Decorate 42(gl_ObjectRayDirectionEXT) BuiltIn ObjectRayDirectionKHR
|
||||||
Decorate 47(gl_RayTminEXT) BuiltIn RayTminKHR
|
Decorate 47(gl_RayTminEXT) BuiltIn RayTminKHR
|
||||||
Decorate 50(gl_RayTmaxEXT) BuiltIn RayTmaxKHR
|
Decorate 50(gl_RayTmaxEXT) BuiltIn RayTmaxKHR
|
||||||
Decorate 53(gl_HitTEXT) BuiltIn HitTKHR
|
Decorate 53(gl_HitTEXT) BuiltIn RayTmaxKHR
|
||||||
Decorate 58(gl_HitKindEXT) BuiltIn HitKindKHR
|
Decorate 58(gl_HitKindEXT) BuiltIn HitKindKHR
|
||||||
Decorate 64(gl_ObjectToWorldEXT) BuiltIn ObjectToWorldKHR
|
Decorate 64(gl_ObjectToWorldEXT) BuiltIn ObjectToWorldKHR
|
||||||
Decorate 67(gl_WorldToObjectEXT) BuiltIn WorldToObjectKHR
|
Decorate 67(gl_WorldToObjectEXT) BuiltIn WorldToObjectKHR
|
||||||
@ -67,6 +70,9 @@ spv.ext.AnyHitShader.rahit
|
|||||||
Decorate 76(gl_ObjectToWorld3x4EXT) BuiltIn ObjectToWorldKHR
|
Decorate 76(gl_ObjectToWorld3x4EXT) BuiltIn ObjectToWorldKHR
|
||||||
Decorate 80(gl_WorldToObject3x4EXT) BuiltIn WorldToObjectKHR
|
Decorate 80(gl_WorldToObject3x4EXT) BuiltIn WorldToObjectKHR
|
||||||
Decorate 84(incomingPayload) Location 1
|
Decorate 84(incomingPayload) Location 1
|
||||||
|
Decorate 98(gl_SubgroupSize) RelaxedPrecision
|
||||||
|
Decorate 98(gl_SubgroupSize) BuiltIn SubgroupSize
|
||||||
|
Decorate 99 RelaxedPrecision
|
||||||
2: TypeVoid
|
2: TypeVoid
|
||||||
3: TypeFunction 2
|
3: TypeFunction 2
|
||||||
6: TypeInt 32 0
|
6: TypeInt 32 0
|
||||||
@ -114,6 +120,9 @@ spv.ext.AnyHitShader.rahit
|
|||||||
86: 72(fvec4) ConstantComposite 85 85 85 85
|
86: 72(fvec4) ConstantComposite 85 85 85 85
|
||||||
88: 16(int) Constant 1
|
88: 16(int) Constant 1
|
||||||
89: TypeBool
|
89: TypeBool
|
||||||
|
94: 6(int) Constant 0
|
||||||
|
98(gl_SubgroupSize): 57(ptr) Variable Input
|
||||||
|
101: TypePointer IncomingRayPayloadKHR 28(float)
|
||||||
4(main): 2 Function None 3
|
4(main): 2 Function None 3
|
||||||
5: Label
|
5: Label
|
||||||
9(v0): 8(ptr) Variable Function
|
9(v0): 8(ptr) Variable Function
|
||||||
@ -176,13 +185,16 @@ spv.ext.AnyHitShader.rahit
|
|||||||
87: 16(int) Load 18(v2)
|
87: 16(int) Load 18(v2)
|
||||||
90: 89(bool) IEqual 87 88
|
90: 89(bool) IEqual 87 88
|
||||||
SelectionMerge 92 None
|
SelectionMerge 92 None
|
||||||
BranchConditional 90 91 93
|
BranchConditional 90 91 92
|
||||||
91: Label
|
91: Label
|
||||||
IgnoreIntersectionKHR
|
IgnoreIntersectionKHR
|
||||||
Branch 92
|
|
||||||
93: Label
|
|
||||||
TerminateRayKHR
|
|
||||||
Branch 92
|
|
||||||
92: Label
|
92: Label
|
||||||
Return
|
99: 6(int) Load 98(gl_SubgroupSize)
|
||||||
|
100: 28(float) ConvertUToF 99
|
||||||
|
102: 101(ptr) AccessChain 84(incomingPayload) 94
|
||||||
|
103: 28(float) Load 102
|
||||||
|
104: 28(float) FAdd 103 100
|
||||||
|
105: 101(ptr) AccessChain 84(incomingPayload) 94
|
||||||
|
Store 105 104
|
||||||
|
TerminateRayKHR
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
|
|||||||
@ -3,7 +3,7 @@ spv.ext.ClosestHitShader.rchit
|
|||||||
// Generated by (magic number): 8000a
|
// Generated by (magic number): 8000a
|
||||||
// Id's are bound by 101
|
// Id's are bound by 101
|
||||||
|
|
||||||
Capability RayTracingProvisionalKHR
|
Capability RayTracingKHR
|
||||||
Extension "SPV_KHR_ray_tracing"
|
Extension "SPV_KHR_ray_tracing"
|
||||||
1: ExtInstImport "GLSL.std.450"
|
1: ExtInstImport "GLSL.std.450"
|
||||||
MemoryModel Logical GLSL450
|
MemoryModel Logical GLSL450
|
||||||
@ -48,8 +48,8 @@ spv.ext.ClosestHitShader.rchit
|
|||||||
Name 79 "v17"
|
Name 79 "v17"
|
||||||
Name 80 "gl_WorldToObject3x4EXT"
|
Name 80 "gl_WorldToObject3x4EXT"
|
||||||
Name 85 "accEXT"
|
Name 85 "accEXT"
|
||||||
Name 98 "localPayload"
|
Name 98 "incomingPayload"
|
||||||
Name 100 "incomingPayload"
|
Name 100 "localPayload"
|
||||||
Decorate 11(gl_LaunchIDEXT) BuiltIn LaunchIdKHR
|
Decorate 11(gl_LaunchIDEXT) BuiltIn LaunchIdKHR
|
||||||
Decorate 14(gl_LaunchSizeEXT) BuiltIn LaunchSizeKHR
|
Decorate 14(gl_LaunchSizeEXT) BuiltIn LaunchSizeKHR
|
||||||
Decorate 20(gl_PrimitiveID) BuiltIn PrimitiveId
|
Decorate 20(gl_PrimitiveID) BuiltIn PrimitiveId
|
||||||
@ -61,7 +61,7 @@ spv.ext.ClosestHitShader.rchit
|
|||||||
Decorate 42(gl_ObjectRayDirectionEXT) BuiltIn ObjectRayDirectionKHR
|
Decorate 42(gl_ObjectRayDirectionEXT) BuiltIn ObjectRayDirectionKHR
|
||||||
Decorate 47(gl_RayTminEXT) BuiltIn RayTminKHR
|
Decorate 47(gl_RayTminEXT) BuiltIn RayTminKHR
|
||||||
Decorate 50(gl_RayTmaxEXT) BuiltIn RayTmaxKHR
|
Decorate 50(gl_RayTmaxEXT) BuiltIn RayTmaxKHR
|
||||||
Decorate 53(gl_HitTEXT) BuiltIn HitTKHR
|
Decorate 53(gl_HitTEXT) BuiltIn RayTmaxKHR
|
||||||
Decorate 58(gl_HitKindEXT) BuiltIn HitKindKHR
|
Decorate 58(gl_HitKindEXT) BuiltIn HitKindKHR
|
||||||
Decorate 64(gl_ObjectToWorldEXT) BuiltIn ObjectToWorldKHR
|
Decorate 64(gl_ObjectToWorldEXT) BuiltIn ObjectToWorldKHR
|
||||||
Decorate 67(gl_WorldToObjectEXT) BuiltIn WorldToObjectKHR
|
Decorate 67(gl_WorldToObjectEXT) BuiltIn WorldToObjectKHR
|
||||||
@ -70,8 +70,8 @@ spv.ext.ClosestHitShader.rchit
|
|||||||
Decorate 80(gl_WorldToObject3x4EXT) BuiltIn WorldToObjectKHR
|
Decorate 80(gl_WorldToObject3x4EXT) BuiltIn WorldToObjectKHR
|
||||||
Decorate 85(accEXT) DescriptorSet 0
|
Decorate 85(accEXT) DescriptorSet 0
|
||||||
Decorate 85(accEXT) Binding 0
|
Decorate 85(accEXT) Binding 0
|
||||||
Decorate 98(localPayload) Location 0
|
Decorate 98(incomingPayload) Location 1
|
||||||
Decorate 100(incomingPayload) Location 1
|
Decorate 100(localPayload) Location 0
|
||||||
2: TypeVoid
|
2: TypeVoid
|
||||||
3: TypeFunction 2
|
3: TypeFunction 2
|
||||||
6: TypeInt 32 0
|
6: TypeInt 32 0
|
||||||
@ -126,10 +126,10 @@ spv.ext.ClosestHitShader.rchit
|
|||||||
94: 29(fvec3) ConstantComposite 93 93 93
|
94: 29(fvec3) ConstantComposite 93 93 93
|
||||||
95: 28(float) Constant 1061158912
|
95: 28(float) Constant 1061158912
|
||||||
96: 16(int) Constant 1
|
96: 16(int) Constant 1
|
||||||
97: TypePointer RayPayloadKHR 72(fvec4)
|
97: TypePointer IncomingRayPayloadKHR 72(fvec4)
|
||||||
98(localPayload): 97(ptr) Variable RayPayloadKHR
|
98(incomingPayload): 97(ptr) Variable IncomingRayPayloadKHR
|
||||||
99: TypePointer IncomingRayPayloadKHR 72(fvec4)
|
99: TypePointer RayPayloadKHR 72(fvec4)
|
||||||
100(incomingPayload): 99(ptr) Variable IncomingRayPayloadKHR
|
100(localPayload): 99(ptr) Variable RayPayloadKHR
|
||||||
4(main): 2 Function None 3
|
4(main): 2 Function None 3
|
||||||
5: Label
|
5: Label
|
||||||
9(v0): 8(ptr) Variable Function
|
9(v0): 8(ptr) Variable Function
|
||||||
@ -189,6 +189,6 @@ spv.ext.ClosestHitShader.rchit
|
|||||||
82: 73 Transpose 81
|
82: 73 Transpose 81
|
||||||
Store 79(v17) 82
|
Store 79(v17) 82
|
||||||
86: 83 Load 85(accEXT)
|
86: 83 Load 85(accEXT)
|
||||||
TraceRayKHR 86 87 88 89 90 87 92 91 94 95 96
|
TraceRayKHR 86 87 88 89 90 87 92 91 94 95 98(incomingPayload)
|
||||||
Return
|
Return
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
|
|||||||
@ -1,10 +1,12 @@
|
|||||||
spv.ext.ClosestHitShader_Errors.rchit
|
spv.ext.ClosestHitShader_Errors.rchit
|
||||||
ERROR: 0:8: 'assign' : l-value required "payload" (cannot modify hitAttributeNV in this stage)
|
ERROR: 0:6: 'location' : overlapping use of location 2
|
||||||
ERROR: 0:9: 'reportIntersectionEXT' : no matching overloaded function found
|
ERROR: 0:9: 'assign' : l-value required "payload" (cannot modify hitAttributeNV in this stage)
|
||||||
ERROR: 0:10: 'terminateRayEXT' : no matching overloaded function found
|
ERROR: 0:10: 'reportIntersectionEXT' : no matching overloaded function found
|
||||||
ERROR: 0:11: 'ignoreIntersectionEXT' : no matching overloaded function found
|
ERROR: 0:11: 'terminateRayEXT' : not supported in this stage: closest-hit
|
||||||
ERROR: 0:12: 'gl_RayFlagsSkipAABBEXT' : required extension not requested: GL_EXT_ray_flags_primitive_culling
|
ERROR: 0:12: 'ignoreIntersectionEXT' : not supported in this stage: closest-hit
|
||||||
ERROR: 5 compilation errors. No code generated.
|
ERROR: 0:13: 'gl_RayFlagsSkipAABBEXT' : required extension not requested: GL_EXT_ray_flags_primitive_culling
|
||||||
|
ERROR: 0:14: 'no rayPayloadEXT/rayPayloadInEXT declared' : with layout(location = 0)
|
||||||
|
ERROR: 7 compilation errors. No code generated.
|
||||||
|
|
||||||
|
|
||||||
SPIR-V is not generated for failed compile or link
|
SPIR-V is not generated for failed compile or link
|
||||||
|
|||||||
114
Test/baseResults/spv.ext.ClosestHitShader_Subgroup.rchit.out
Normal file
114
Test/baseResults/spv.ext.ClosestHitShader_Subgroup.rchit.out
Normal file
@ -0,0 +1,114 @@
|
|||||||
|
spv.ext.ClosestHitShader_Subgroup.rchit
|
||||||
|
// Module Version 10400
|
||||||
|
// Generated by (magic number): 8000a
|
||||||
|
// Id's are bound by 67
|
||||||
|
|
||||||
|
Capability Int64
|
||||||
|
Capability GroupNonUniform
|
||||||
|
Capability GroupNonUniformBallot
|
||||||
|
Capability SubgroupBallotKHR
|
||||||
|
Capability RayTracingKHR
|
||||||
|
Capability VulkanMemoryModelKHR
|
||||||
|
Capability ShaderSMBuiltinsNV
|
||||||
|
Extension "SPV_KHR_ray_tracing"
|
||||||
|
Extension "SPV_KHR_shader_ballot"
|
||||||
|
Extension "SPV_KHR_vulkan_memory_model"
|
||||||
|
Extension "SPV_NV_shader_sm_builtins"
|
||||||
|
1: ExtInstImport "GLSL.std.450"
|
||||||
|
MemoryModel Logical VulkanKHR
|
||||||
|
EntryPoint ClosestHitKHR 4 "main" 8 26 28 34 43 48 53 61
|
||||||
|
Source GLSL 460
|
||||||
|
SourceExtension "GL_ARB_shader_ballot"
|
||||||
|
SourceExtension "GL_EXT_ray_tracing"
|
||||||
|
SourceExtension "GL_KHR_shader_subgroup_ballot"
|
||||||
|
SourceExtension "GL_KHR_shader_subgroup_basic"
|
||||||
|
SourceExtension "GL_NV_shader_sm_builtins"
|
||||||
|
Name 4 "main"
|
||||||
|
Name 8 "accEXT"
|
||||||
|
Name 26 "incomingPayload"
|
||||||
|
Name 28 "gl_SubgroupInvocationID"
|
||||||
|
Name 34 "gl_SubGroupGeMaskARB"
|
||||||
|
Name 43 "gl_SubgroupGtMask"
|
||||||
|
Name 48 "gl_SubgroupLeMask"
|
||||||
|
Name 53 "gl_SubGroupLtMaskARB"
|
||||||
|
Name 61 "gl_SMIDNV"
|
||||||
|
Decorate 8(accEXT) DescriptorSet 0
|
||||||
|
Decorate 8(accEXT) Binding 0
|
||||||
|
Decorate 26(incomingPayload) Location 1
|
||||||
|
Decorate 28(gl_SubgroupInvocationID) RelaxedPrecision
|
||||||
|
Decorate 28(gl_SubgroupInvocationID) BuiltIn SubgroupLocalInvocationId
|
||||||
|
Decorate 29 RelaxedPrecision
|
||||||
|
Decorate 34(gl_SubGroupGeMaskARB) BuiltIn SubgroupGeMaskKHR
|
||||||
|
Decorate 43(gl_SubgroupGtMask) BuiltIn SubgroupGtMaskKHR
|
||||||
|
Decorate 48(gl_SubgroupLeMask) BuiltIn SubgroupLeMaskKHR
|
||||||
|
Decorate 53(gl_SubGroupLtMaskARB) BuiltIn SubgroupLtMaskKHR
|
||||||
|
Decorate 61(gl_SMIDNV) BuiltIn SMIDNV
|
||||||
|
2: TypeVoid
|
||||||
|
3: TypeFunction 2
|
||||||
|
6: TypeAccelerationStructureKHR
|
||||||
|
7: TypePointer UniformConstant 6
|
||||||
|
8(accEXT): 7(ptr) Variable UniformConstant
|
||||||
|
10: TypeInt 32 0
|
||||||
|
11: 10(int) Constant 0
|
||||||
|
12: 10(int) Constant 1
|
||||||
|
13: 10(int) Constant 2
|
||||||
|
14: 10(int) Constant 3
|
||||||
|
15: TypeFloat 32
|
||||||
|
16: TypeVector 15(float) 3
|
||||||
|
17: 15(float) Constant 1056964608
|
||||||
|
18: 16(fvec3) ConstantComposite 17 17 17
|
||||||
|
19: 15(float) Constant 1065353216
|
||||||
|
20: 16(fvec3) ConstantComposite 19 19 19
|
||||||
|
21: 15(float) Constant 1061158912
|
||||||
|
22: TypeInt 32 1
|
||||||
|
23: 22(int) Constant 1
|
||||||
|
24: TypeVector 15(float) 4
|
||||||
|
25: TypePointer IncomingRayPayloadKHR 24(fvec4)
|
||||||
|
26(incomingPayload): 25(ptr) Variable IncomingRayPayloadKHR
|
||||||
|
27: TypePointer Input 10(int)
|
||||||
|
28(gl_SubgroupInvocationID): 27(ptr) Variable Input
|
||||||
|
31: TypeVector 10(int) 4
|
||||||
|
32: TypeInt 64 0
|
||||||
|
33: TypePointer Input 31(ivec4)
|
||||||
|
34(gl_SubGroupGeMaskARB): 33(ptr) Variable Input
|
||||||
|
38: TypeVector 10(int) 2
|
||||||
|
43(gl_SubgroupGtMask): 33(ptr) Variable Input
|
||||||
|
48(gl_SubgroupLeMask): 33(ptr) Variable Input
|
||||||
|
53(gl_SubGroupLtMaskARB): 33(ptr) Variable Input
|
||||||
|
61(gl_SMIDNV): 27(ptr) Variable Input
|
||||||
|
65: TypePointer IncomingRayPayloadKHR 15(float)
|
||||||
|
4(main): 2 Function None 3
|
||||||
|
5: Label
|
||||||
|
9: 6 Load 8(accEXT)
|
||||||
|
TraceRayKHR 9 11 12 13 14 11 18 17 20 21 26(incomingPayload)
|
||||||
|
29: 10(int) Load 28(gl_SubgroupInvocationID) Volatile
|
||||||
|
30: 15(float) ConvertUToF 29
|
||||||
|
35: 31(ivec4) Load 34(gl_SubGroupGeMaskARB)
|
||||||
|
36: 10(int) CompositeExtract 35 0
|
||||||
|
37: 10(int) CompositeExtract 35 1
|
||||||
|
39: 38(ivec2) CompositeConstruct 36 37
|
||||||
|
40: 32(int64_t) Bitcast 39
|
||||||
|
41: 15(float) ConvertUToF 40
|
||||||
|
42: 15(float) FAdd 30 41
|
||||||
|
44: 31(ivec4) Load 43(gl_SubgroupGtMask) Volatile
|
||||||
|
45: 24(fvec4) ConvertUToF 44
|
||||||
|
46: 15(float) CompositeExtract 45 0
|
||||||
|
47: 15(float) FAdd 42 46
|
||||||
|
49: 31(ivec4) Load 48(gl_SubgroupLeMask) Volatile
|
||||||
|
50: 24(fvec4) ConvertUToF 49
|
||||||
|
51: 15(float) CompositeExtract 50 0
|
||||||
|
52: 15(float) FAdd 47 51
|
||||||
|
54: 31(ivec4) Load 53(gl_SubGroupLtMaskARB)
|
||||||
|
55: 10(int) CompositeExtract 54 0
|
||||||
|
56: 10(int) CompositeExtract 54 1
|
||||||
|
57: 38(ivec2) CompositeConstruct 55 56
|
||||||
|
58: 32(int64_t) Bitcast 57
|
||||||
|
59: 15(float) ConvertUToF 58
|
||||||
|
60: 15(float) FAdd 52 59
|
||||||
|
62: 10(int) Load 61(gl_SMIDNV) Volatile
|
||||||
|
63: 15(float) ConvertUToF 62
|
||||||
|
64: 15(float) FAdd 60 63
|
||||||
|
66: 65(ptr) AccessChain 26(incomingPayload) 11
|
||||||
|
Store 66 64
|
||||||
|
Return
|
||||||
|
FunctionEnd
|
||||||
@ -3,7 +3,7 @@ spv.ext.IntersectShader.rint
|
|||||||
// Generated by (magic number): 8000a
|
// Generated by (magic number): 8000a
|
||||||
// Id's are bound by 81
|
// Id's are bound by 81
|
||||||
|
|
||||||
Capability RayTracingProvisionalKHR
|
Capability RayTracingKHR
|
||||||
Extension "SPV_KHR_ray_tracing"
|
Extension "SPV_KHR_ray_tracing"
|
||||||
1: ExtInstImport "GLSL.std.450"
|
1: ExtInstImport "GLSL.std.450"
|
||||||
MemoryModel Logical GLSL450
|
MemoryModel Logical GLSL450
|
||||||
@ -53,6 +53,8 @@ spv.ext.IntersectShader.rint
|
|||||||
Decorate 42(gl_ObjectRayDirectionEXT) BuiltIn ObjectRayDirectionKHR
|
Decorate 42(gl_ObjectRayDirectionEXT) BuiltIn ObjectRayDirectionKHR
|
||||||
Decorate 47(gl_RayTminEXT) BuiltIn RayTminKHR
|
Decorate 47(gl_RayTminEXT) BuiltIn RayTminKHR
|
||||||
Decorate 50(gl_RayTmaxEXT) BuiltIn RayTmaxKHR
|
Decorate 50(gl_RayTmaxEXT) BuiltIn RayTmaxKHR
|
||||||
|
Decorate 50(gl_RayTmaxEXT) Volatile
|
||||||
|
Decorate 50(gl_RayTmaxEXT) Coherent
|
||||||
Decorate 56(gl_ObjectToWorldEXT) BuiltIn ObjectToWorldKHR
|
Decorate 56(gl_ObjectToWorldEXT) BuiltIn ObjectToWorldKHR
|
||||||
Decorate 59(gl_WorldToObjectEXT) BuiltIn WorldToObjectKHR
|
Decorate 59(gl_WorldToObjectEXT) BuiltIn WorldToObjectKHR
|
||||||
Decorate 65(gl_ObjectToWorld3x4EXT) BuiltIn ObjectToWorldKHR
|
Decorate 65(gl_ObjectToWorld3x4EXT) BuiltIn ObjectToWorldKHR
|
||||||
|
|||||||
@ -1,15 +1,25 @@
|
|||||||
spv.ext.MissShader.rmiss
|
spv.ext.MissShader.rmiss
|
||||||
// Module Version 10400
|
// Module Version 10400
|
||||||
// Generated by (magic number): 8000a
|
// Generated by (magic number): 8000a
|
||||||
// Id's are bound by 54
|
// Id's are bound by 71
|
||||||
|
|
||||||
Capability RayTracingProvisionalKHR
|
Capability GroupNonUniform
|
||||||
|
Capability GroupNonUniformBallot
|
||||||
|
Capability SubgroupBallotKHR
|
||||||
|
Capability RayTracingKHR
|
||||||
|
Capability ShaderSMBuiltinsNV
|
||||||
Extension "SPV_KHR_ray_tracing"
|
Extension "SPV_KHR_ray_tracing"
|
||||||
|
Extension "SPV_KHR_shader_ballot"
|
||||||
|
Extension "SPV_NV_shader_sm_builtins"
|
||||||
1: ExtInstImport "GLSL.std.450"
|
1: ExtInstImport "GLSL.std.450"
|
||||||
MemoryModel Logical GLSL450
|
MemoryModel Logical GLSL450
|
||||||
EntryPoint MissKHR 4 "main" 11 14 21 24 29 32 36 51 53
|
EntryPoint MissKHR 4 "main" 11 14 21 24 29 32 36 51 53 58 63 70
|
||||||
Source GLSL 460
|
Source GLSL 460
|
||||||
|
SourceExtension "GL_ARB_shader_ballot"
|
||||||
SourceExtension "GL_EXT_ray_tracing"
|
SourceExtension "GL_EXT_ray_tracing"
|
||||||
|
SourceExtension "GL_KHR_shader_subgroup_ballot"
|
||||||
|
SourceExtension "GL_KHR_shader_subgroup_basic"
|
||||||
|
SourceExtension "GL_NV_shader_sm_builtins"
|
||||||
Name 4 "main"
|
Name 4 "main"
|
||||||
Name 9 "v0"
|
Name 9 "v0"
|
||||||
Name 11 "gl_LaunchIDEXT"
|
Name 11 "gl_LaunchIDEXT"
|
||||||
@ -24,8 +34,11 @@ spv.ext.MissShader.rmiss
|
|||||||
Name 31 "v5"
|
Name 31 "v5"
|
||||||
Name 32 "gl_RayTmaxEXT"
|
Name 32 "gl_RayTmaxEXT"
|
||||||
Name 36 "accEXT"
|
Name 36 "accEXT"
|
||||||
Name 51 "localPayload"
|
Name 51 "incomingPayload"
|
||||||
Name 53 "incomingPayload"
|
Name 53 "gl_SubGroupSizeARB"
|
||||||
|
Name 58 "gl_SubgroupEqMask"
|
||||||
|
Name 63 "gl_WarpIDNV"
|
||||||
|
Name 70 "localPayload"
|
||||||
Decorate 11(gl_LaunchIDEXT) BuiltIn LaunchIdKHR
|
Decorate 11(gl_LaunchIDEXT) BuiltIn LaunchIdKHR
|
||||||
Decorate 14(gl_LaunchSizeEXT) BuiltIn LaunchSizeKHR
|
Decorate 14(gl_LaunchSizeEXT) BuiltIn LaunchSizeKHR
|
||||||
Decorate 21(gl_WorldRayOriginEXT) BuiltIn WorldRayOriginKHR
|
Decorate 21(gl_WorldRayOriginEXT) BuiltIn WorldRayOriginKHR
|
||||||
@ -34,8 +47,17 @@ spv.ext.MissShader.rmiss
|
|||||||
Decorate 32(gl_RayTmaxEXT) BuiltIn RayTmaxKHR
|
Decorate 32(gl_RayTmaxEXT) BuiltIn RayTmaxKHR
|
||||||
Decorate 36(accEXT) DescriptorSet 0
|
Decorate 36(accEXT) DescriptorSet 0
|
||||||
Decorate 36(accEXT) Binding 0
|
Decorate 36(accEXT) Binding 0
|
||||||
Decorate 51(localPayload) Location 0
|
Decorate 51(incomingPayload) Location 1
|
||||||
Decorate 53(incomingPayload) Location 1
|
Decorate 53(gl_SubGroupSizeARB) BuiltIn SubgroupSize
|
||||||
|
Decorate 53(gl_SubGroupSizeARB) Volatile
|
||||||
|
Decorate 53(gl_SubGroupSizeARB) Coherent
|
||||||
|
Decorate 58(gl_SubgroupEqMask) BuiltIn SubgroupEqMaskKHR
|
||||||
|
Decorate 58(gl_SubgroupEqMask) Volatile
|
||||||
|
Decorate 58(gl_SubgroupEqMask) Coherent
|
||||||
|
Decorate 63(gl_WarpIDNV) BuiltIn WarpIDNV
|
||||||
|
Decorate 63(gl_WarpIDNV) Volatile
|
||||||
|
Decorate 63(gl_WarpIDNV) Coherent
|
||||||
|
Decorate 70(localPayload) Location 0
|
||||||
2: TypeVoid
|
2: TypeVoid
|
||||||
3: TypeFunction 2
|
3: TypeFunction 2
|
||||||
6: TypeInt 32 0
|
6: TypeInt 32 0
|
||||||
@ -69,10 +91,17 @@ spv.ext.MissShader.rmiss
|
|||||||
47: TypeInt 32 1
|
47: TypeInt 32 1
|
||||||
48: 47(int) Constant 1
|
48: 47(int) Constant 1
|
||||||
49: TypeVector 16(float) 4
|
49: TypeVector 16(float) 4
|
||||||
50: TypePointer RayPayloadKHR 49(fvec4)
|
50: TypePointer IncomingRayPayloadKHR 49(fvec4)
|
||||||
51(localPayload): 50(ptr) Variable RayPayloadKHR
|
51(incomingPayload): 50(ptr) Variable IncomingRayPayloadKHR
|
||||||
52: TypePointer IncomingRayPayloadKHR 49(fvec4)
|
52: TypePointer Input 6(int)
|
||||||
53(incomingPayload): 52(ptr) Variable IncomingRayPayloadKHR
|
53(gl_SubGroupSizeARB): 52(ptr) Variable Input
|
||||||
|
56: TypeVector 6(int) 4
|
||||||
|
57: TypePointer Input 56(ivec4)
|
||||||
|
58(gl_SubgroupEqMask): 57(ptr) Variable Input
|
||||||
|
63(gl_WarpIDNV): 52(ptr) Variable Input
|
||||||
|
67: TypePointer IncomingRayPayloadKHR 16(float)
|
||||||
|
69: TypePointer RayPayloadKHR 49(fvec4)
|
||||||
|
70(localPayload): 69(ptr) Variable RayPayloadKHR
|
||||||
4(main): 2 Function None 3
|
4(main): 2 Function None 3
|
||||||
5: Label
|
5: Label
|
||||||
9(v0): 8(ptr) Variable Function
|
9(v0): 8(ptr) Variable Function
|
||||||
@ -94,6 +123,17 @@ spv.ext.MissShader.rmiss
|
|||||||
33: 16(float) Load 32(gl_RayTmaxEXT)
|
33: 16(float) Load 32(gl_RayTmaxEXT)
|
||||||
Store 31(v5) 33
|
Store 31(v5) 33
|
||||||
37: 34 Load 36(accEXT)
|
37: 34 Load 36(accEXT)
|
||||||
TraceRayKHR 37 38 39 40 41 38 43 42 45 46 48
|
TraceRayKHR 37 38 39 40 41 38 43 42 45 46 51(incomingPayload)
|
||||||
|
54: 6(int) Load 53(gl_SubGroupSizeARB)
|
||||||
|
55: 16(float) ConvertUToF 54
|
||||||
|
59: 56(ivec4) Load 58(gl_SubgroupEqMask)
|
||||||
|
60: 49(fvec4) ConvertUToF 59
|
||||||
|
61: 16(float) CompositeExtract 60 0
|
||||||
|
62: 16(float) FAdd 55 61
|
||||||
|
64: 6(int) Load 63(gl_WarpIDNV)
|
||||||
|
65: 16(float) ConvertUToF 64
|
||||||
|
66: 16(float) FAdd 62 65
|
||||||
|
68: 67(ptr) AccessChain 51(incomingPayload) 38
|
||||||
|
Store 68 66
|
||||||
Return
|
Return
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
|
|||||||
@ -13,8 +13,8 @@ ERROR: 0:10: '=' : cannot convert from ' temp float' to ' temp highp 4X3 matrix
|
|||||||
ERROR: 0:11: 'gl_HitTEXT' : undeclared identifier
|
ERROR: 0:11: 'gl_HitTEXT' : undeclared identifier
|
||||||
ERROR: 0:12: 'gl_HitKindEXT' : undeclared identifier
|
ERROR: 0:12: 'gl_HitKindEXT' : undeclared identifier
|
||||||
ERROR: 0:13: 'reportIntersectionEXT' : no matching overloaded function found
|
ERROR: 0:13: 'reportIntersectionEXT' : no matching overloaded function found
|
||||||
ERROR: 0:14: 'ignoreIntersectionEXT' : no matching overloaded function found
|
ERROR: 0:14: 'ignoreIntersectionEXT' : not supported in this stage: miss
|
||||||
ERROR: 0:15: 'terminateRayEXT' : no matching overloaded function found
|
ERROR: 0:15: 'terminateRayEXT' : not supported in this stage: miss
|
||||||
ERROR: 16 compilation errors. No code generated.
|
ERROR: 16 compilation errors. No code generated.
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user