Compare commits

...

201 Commits

Author SHA1 Message Date
06aba7dee9 Fixed my previous fixes. 2024-06-26 18:21:58 +02:00
c622ed7f86 Fixed MSVC build warnings. 2024-06-26 10:02:58 +02:00
6cccd7458d Increased size used for semantics so I can use a lot more of them. 2023-12-11 18:05:44 +01:00
41137b6df3 Fixed that the passed resolver wasn't actually used. 2023-11-25 15:05:07 +01:00
bb2d06b0a3 Added semantic and semantic_idx layout qualifiers. 2023-11-21 20:12:47 +01:00
e87d0d5703 Added cast to fix compiler warning. 2023-11-11 00:26:38 +01:00
2b71254a49 Fixed unused parameter warning. 2023-11-04 22:35:20 +01:00
b2b90e54e2 Added function to merge source files when linking shaders. 2023-11-04 21:22:53 +01:00
ec5a3c423e Added code to allow moving TShaders (and storing them inside STL containers). 2023-11-04 21:21:15 +01:00
8f0a4c64db Several fixes to make glslang compile with higher warning levels. 2023-11-04 21:21:13 +01:00
Jeremy Hayes
be564292f0 Update CHANGES for release 13.1.0 2023-10-14 16:09:27 -06:00
Arcady Goldmints-Orlov
0504953b35 spirv: don't emit invalid debuginfo for buffer references
Currently no debug info is emitted for buffer reference types, which
resulted in the SPIR-V backend code asserting when trying to emit the
debug info for struct member that had such a type. Instead, the code now
skips such struct members. Full debug info for buffer references may
require forward references in the debug info instructions, which is
currently prohibited by the spec.
2023-10-13 17:49:26 -04:00
Arcady Goldmints-Orlov
48f9ed8b08 spirv: only set LocalSizeId mode when necessary
SPIR-V 1.6 added the LocalSizeId execution mode that allows using
spec constants for setting the work-group size, however it does not
deprecate the LocalSize mode. This change causes the LocalSizeId mode to
only be used when at least one of the workgroup size is actually
specified with a spec constant.

Fixes #3200
2023-10-12 14:45:33 -04:00
Jeremy Hayes
4ce1a1a68d Update known_good.json 2023-10-12 13:25:58 -04:00
dependabot[bot]
277d09e679 Bump ossf/scorecard-action from 2.2.0 to 2.3.0
Bumps [ossf/scorecard-action](https://github.com/ossf/scorecard-action) from 2.2.0 to 2.3.0.
- [Release notes](https://github.com/ossf/scorecard-action/releases)
- [Changelog](https://github.com/ossf/scorecard-action/blob/main/RELEASE.md)
- [Commits](08b4669551...483ef80eb9)

---
updated-dependencies:
- dependency-name: ossf/scorecard-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-09 12:23:35 -04:00
dependabot[bot]
43ec5f13f4 Bump github/codeql-action from 2.21.9 to 2.22.0
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.21.9 to 2.22.0.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](ddccb87388...2cb752a87e)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-09 12:23:03 -04:00
dependabot[bot]
715e36a0cc Bump lukka/get-cmake from 3.27.6 to 3.27.7
Bumps [lukka/get-cmake](https://github.com/lukka/get-cmake) from 3.27.6 to 3.27.7.
- [Release notes](https://github.com/lukka/get-cmake/releases)
- [Commits](aa2e3cb80f...8be6cca406)

---
updated-dependencies:
- dependency-name: lukka/get-cmake
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-09 12:22:41 -04:00
Pankaj Mistry
5ff0c048b7
Clean the implementation of GL_EXT_texture_shadow_lod.
Move the parameter verifictation to a centralized place where all the builtins
are verified for correctness.

Add verification for the new builtins with version and extension check
These builtins are supported on GLSL since version 130 and GLES since
version 300.
2023-10-02 15:10:11 -04:00
alelenv
3f02132668
Add support for GL_NV_displacement_micromap.
* Add support for GL_NV_displacement_micromap.
* Update known_good for spirv-headers and spirv-tools.
2023-10-02 15:07:50 -04:00
dependabot[bot]
86151772b2 Bump github/codeql-action from 2.21.7 to 2.21.9
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.21.7 to 2.21.9.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](04daf014b5...ddccb87388)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-02 14:19:29 -04:00
dependabot[bot]
95c29a9a78 Bump lukka/get-cmake from 3.27.4 to 3.27.6
Bumps [lukka/get-cmake](https://github.com/lukka/get-cmake) from 3.27.4 to 3.27.6.
- [Release notes](https://github.com/lukka/get-cmake/releases)
- [Commits](4dcd3eb730...aa2e3cb80f)

---
updated-dependencies:
- dependency-name: lukka/get-cmake
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-02 14:18:35 -04:00
dependabot[bot]
3359d240cf Bump actions/checkout from 4.0.0 to 4.1.0
Bumps [actions/checkout](https://github.com/actions/checkout) from 4.0.0 to 4.1.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](3df4ab11eb...8ade135a41)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-02 12:35:44 -04:00
Nathaniel Cesario
b0ed478885 Fix race condition identified by TSAN
Guard global variables 'CompileFailed' and 'LinkFailed' in the
StandAlone application with atomics.
2023-09-29 18:39:17 -04:00
Nathaniel Cesario
90f7810584 Add ASAN integration testing
Add jobs for testing with -fsanitize=address and -fsanitize=thread.
2023-09-29 18:39:17 -04:00
chirsz-ever
2bfacdac91 Improve preprocessor ouput format
Modify preprocessor.simple.vert to test spaces before parenthesis.
2023-09-22 16:34:08 -04:00
Nathaniel Cesario
4c57db1595 Add --no-link option
Adds the --no-link option which outputs the compiled shader binaries
without linking them. This is a first step towards allowing users to
create SPIR-v binary, non-executable libraries.

When using the --no-link option, all functions are decorated with the
Export linkage attribute.
2023-09-18 17:31:05 -04:00
dependabot[bot]
a4aceb57de Bump github/codeql-action from 2.21.5 to 2.21.7
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.21.5 to 2.21.7.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](00e563ead9...04daf014b5)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-18 11:52:50 -04:00
Nathaniel Cesario
efc33d1ee5 Fix segfault with atomic arg check
Makes sure that we have an l-value before checking the storage type of
the mem argument passed to an atomic memory operation.

Fixes #3332.
2023-09-15 17:43:04 -04:00
Rex Xu
323836e46b Use std::variant to represent TSpirvTypeParameter
This PR is try to address the review comment:
https://github.com/KhronosGroup/glslang/pull/3253#discussion_r1254932979.
2023-09-11 21:12:35 -04:00
Sajjad Mirza
afe6e781bd
Emit correct nonsemantic debug info for explicitly sized types
Previously, the type names in the nonsemantic shader debug info would be
"int", "uint", or "float" for all numeric types. This change makes the
correct names such as "int8_t" or "float16_t" get emitted.
2023-09-11 20:11:22 -04:00
dependabot[bot]
b2dc622faf Bump actions/upload-artifact from 3.1.2 to 3.1.3
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 3.1.2 to 3.1.3.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](0b7f8abb15...a8a3f3ad30)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-11 19:52:18 -04:00
dependabot[bot]
f89684110b Bump actions/checkout from 3.6.0 to 4.0.0
Bumps [actions/checkout](https://github.com/actions/checkout) from 3.6.0 to 4.0.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](f43a0e5ff2...3df4ab11eb)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-11 17:51:58 -04:00
Joyce
d3b8d91a93 Add license to dependabot.yml
Signed-off-by: Joyce <joycebrum@google.com>
2023-09-11 17:29:05 -04:00
Nathaniel Cesario
f3f23fece3 Add a generic texel fetch test
Test all core sampler functions.
2023-09-11 16:51:11 -04:00
Nathaniel Cesario
e8d657bdbe Fix textureOffset overload
float textureOffset(sampler2DArrayShadow sampler, vec4 P, ivec2 offset)
was incorrectly requiring the GL_EXT_texture_shadow_lod extension.

NOTE: Prior to GLSL 440, this prototype was defined as

float textureOffset(sampler2DArrayShadow sampler, vec4 P, vec2 offset)

i.e., the type of 'offset' was specified as 'vec2' rather than 'ivec2'.
This is believed to be a typo.

Fixes #3325.
2023-09-11 16:51:11 -04:00
Arcady Goldmints-Orlov
fb2882a3c3 kokoro: explicitly set ENABLE_OPT=0 in cmake builds
This is needed now that we force the user to explicitly choose between
disabling use of SPIRV-Tools, using a version installed on the system,
or using the version obtained by update_glslang_source.py
2023-09-06 13:16:16 -04:00
Arcady Goldmints-Orlov
589431af5c cmake: add more verbose messages if SPIRV-Tools is not found
This makes it more clear to users when SPIR-V optimization is disabled
because SPIRV-Tools could not be found, and suggests alternatives for
finding it.
2023-09-06 13:16:16 -04:00
Nathaniel Cesario
0bbe74c709 Use temporary parser for mangled names
Use a temporary parser to retrieve the mangled names of specific
function overloads. This is necessary for GL_EXT_texture_shadow_lod.
2023-09-05 19:00:10 -04:00
Nathaniel Cesario
ffefbcd9f3 Add GL_EXT_texture_shadow_lod support
Closes #3302.
2023-09-05 19:00:10 -04:00
Ralf Habacker
3787b6947f Revert "CMake: Make glslang-default-resource-limits STATIC"
Fixes #3316

This reverts commit 6f22e41e0de13aff75807cca9662730d8b3e54b6.
2023-09-05 15:53:50 -04:00
Joyce Brum
e3a711b6fc Squashed changes about hash pin and dependabot
Signed-off-by: Joyce Brum <joycebrum@google.com>
2023-09-01 08:39:32 -06:00
Nathaniel Cesario
a1f8cd429f Fix ByteAddressBuffer as function parameter
Make sure that an id represents a variable before adding it to an entry
point's interface.

Fixes #3297.
2023-08-31 16:22:03 -06:00
Pedro Olsen Ferreira
adfcaba7ae Fix ODR violations
On a shared build, these symbols exist in both libglslang.so and
libSPIRV.so, leading to an ODR violation at runtime.
2023-08-24 12:48:35 -06:00
Jeremy Hayes
f1cb8608b3 Update CHANGES for release 13.0.0 2023-08-23 17:24:25 -06:00
Wooyoung Kim
db8719ae07
extension: GL_QCOM_image_processing support 2023-08-21 18:14:52 -06:00
Joyce
4e7ccd4af5 Add badge to README.md
Signed-off-by: Joyce <joycebrum@google.com>
2023-08-21 12:34:22 -06:00
Joyce
d072aa6676 Create scorecard.yml
Signed-off-by: Joyce <joycebrum@google.com>
2023-08-21 12:34:22 -06:00
Nathaniel Cesario
c5117b328a Fix CI build badge
Replaces the appveyor build (which is no longer used) with a badge
pointing to the continuous_integration.yml job status.
2023-08-18 14:36:47 -06:00
Sven van Haastregt
70d125b924 cmake: Don't link SPVRemapper into glslang executable
The functionality of `libSPVRemapper` is only used by the
`spirv-remap` executable, so don't link it into the `glslang`
executable.
2023-08-18 09:52:54 -06:00
Pedro Olsen Ferreira
98aa694422 [cmake] Use CMake property for symbol visibility
CMake provides a target property to set default symbol visibility which
supports different toolchains transparently.
2023-08-18 09:52:03 -06:00
Kacper Michajłow
3805888a57 Look for external SPIR-V Tools build, if not building in-tree
This allows to build with optimizer enabled, if external SPIR-V tools
libraries are available in the system. It is quite common in *nix world
to package spirv-tools and glslang separately.

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2023-08-17 11:56:22 -06:00
Rex Xu
b70669a059 Spirv_intrinsics: Remove early return in layoutTypeCheck
Previously, when GL_EXT_spirv_intrinsics are enabled, we disable all
checks in layoutTypeCheck. This is too coarse because we can use nothing
in GL_EXT_spirv_intrinsics in a shader while the necessary processing is
skipped, such as addUsedLocation.

In this change, we apply fine check and more might be added if we
encounter new cases in the future.
2023-08-15 09:37:26 -06:00
Nathaniel Cesario
76b52ebf77 Update known_good.json
SPIRV-Tools: v2023.4.rc2
2023-08-08 12:49:36 -06:00
Arseny Kapoulkine
34d4f78f03
Fix interaction between GL_EXT_mesh_shader and GL_EXT_fragment_shading_rate
Before this change, using gl_MeshPrimitivesEXT in mesh shader would
unconditionally create gl_MeshPrimitivesEXT.gl_PrimitiveShadingRateEXT
field and add PrimitiveShadingRateKHR capability to the output SPIRV
file, which would subsequently trigger validation errors when creating
the shader module unless the application requested primitive shading
rate feature.

What should happen instead is that unless GL_EXT_fragment_shading_rate
extension is enabled, we should not allow using
gl_PrimitiveShadingRateEXT and should not emit the associated fields
into the output.

This change fixes this by using existing filterMember mechanism that is
already used in a few other cases like this, and adjusting the required
extension on the field member which will generate an error when
gl_PrimitiveShadingRateEXT is used without enabling the extension.
2023-08-07 11:38:17 -06:00
Nathaniel Cesario
79a9f7f652 Fix continuous deployment
There should not be a '/' after $ENV{DESTDIR} in the cmake install script.

This change also:
- Uses lukka/get-cmake github action consistently across jobs
- Add the glslang binary to the continuous deployment archive
2023-08-07 10:52:22 -06:00
Nathaniel Cesario
bfd96d3044 Add emscripten build to CI
Adds a build-only (no test) job for testing the emscripten (web) build
on github actions.
2023-08-02 16:43:05 -06:00
Arcady Goldmints-Orlov
396596ca4a Replace GlobalLock functions with std::mutex
The usage of GetGlobalLock/ReleaseGlobalLock/InitGlobalLock is replaced
by std::lock_guard which is available as of c++11, and the functions are
removed from the OSDependent ossource.cpp files.
The standalone glslang binary now explicitly depends on OSDependent, as
nothing in in the glslang library uses those functions anymore and they
are not implicitly picked up by the linker.
2023-07-31 20:12:51 -06:00
Tim Biermann
171a322025 respect destdir for compat symlink 2023-07-31 14:04:22 -06:00
Arcady Goldmints-Orlov
54726b3c1c Remove glslang.m4
The m4 grammar build mechanism was only ever needed as a preprocessor
for bison, to be used with GLSLANG_WEB, which has now been removed.

Fixes #2958
2023-07-28 15:14:48 -06:00
Arcady Goldmints-Orlov
6bc35749ec Remove a stray GLSLANG_WEB ifdef 2023-07-28 15:14:48 -06:00
dan sinclair
d291b15911
Remove GLSLANG_WEB and GLSLANG_WEB_DEVEL
This CL removes the GLSLANG_WEB and GLSLANG_WEB_DEVEL
cmake build options and their usage in the codebase.

Issue #2958
2023-07-28 11:49:10 -06:00
Allan MacKinnon
c8c669fc2a
spirv-remap: Support outputting each SPIR-V module to a filename
The `spirv-remap` tool now supports two output modes:
  * Outputting one or more inputs to a single directory -- the previous
    behavior
  * One output file per input -- new behavior.
2023-07-28 10:13:55 -06:00
Juan Ramos
0f873e757e ci: Test CMake minimum 2023-07-28 08:48:09 -06:00
Juan Ramos
47454f5078 cmake: Raise minimum to 3.17.2
Build fails due to external dependency on SPIRV-Tools.

EX:

```
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
CMake Error at External/spirv-tools/CMakeLists.txt:15 (cmake_minimum_required):
  CMake 3.17.2 or higher is required.  You are running version 3.14.0
```
2023-07-28 08:48:09 -06:00
画卦伏羲
3c98026a1c
Fix [type] command file url forward slashes issue when use mingw 2023-07-27 11:34:20 -06:00
Arcady Goldmints-Orlov
4420f9b33b Remove OSDependent TLS functions
These are no longer used now that the PoolAllocator uses the standard
c++11 thread_local storage mechanism.
2023-07-26 18:11:41 -06:00
Ben Clayton
a0010e27ba Deprecate InitializeDll functions
These were only used for TThreadPool, which now uses `thread_local`.
2023-07-26 18:11:41 -06:00
Ben Clayton
775864ef74 Simplify PoolAlloc with use of thread_local.
glslang is using C++ 11, which has first class support for variables of the `thread_local` storage class.

By dropping the use of the `OS_[GS]etTLSValue`, we can simplify the logic, and have it support a thread-local default allocator if none is provided.

Issue: #2346
2023-07-26 18:11:41 -06:00
Boris Zanin
808c7ed17c Implement support for GL_KHR_cooperative_matrix extension 2023-07-26 16:39:17 -06:00
Sven van Haastregt
91a97b4c69 Fix typo in error message 2023-07-26 10:09:43 -06:00
Juan Ramos
29b87a4e69 Modernize linux CI
- Test Ubuntu-22.04
- Use ccache
- Ensure backwards compatibility with Ubuntu-20.04
2023-07-25 17:02:59 -06:00
Juan Ramos
4aa56496d6 git: Ignore CMakeUserPresets.json
CMakeUserPresets.json can be useful for developers and is not
meant to be checked in.
2023-07-24 18:43:25 -06:00
Juan Ramos
026a9bcdb2 ci: Test Android NDK matrix combinations 2023-07-24 18:42:14 -06:00
scribam
c81b34fb24 Remove useless semicolons 2023-07-24 15:36:54 -06:00
Sven van Haastregt
fe82779952 Silence unused parameter warning
The parameter could be removed, but keep it for consistency with other
`makeSpirvTypeParameters` overloads.
2023-07-24 10:54:56 -06:00
Arcady Goldmints-Orlov
65397339c5 Remove obsolete files
WORKSPACE is related to Bazel, which is no longer supported
Test/makeDoc uses an option that glslang no longer supports.
2023-07-20 16:12:44 -06:00
Jeremy Hayes
4f3ae4b03d Update CHANGES for release 12.3.1 2023-07-20 14:53:51 -06:00
Nathaniel Cesario
45ce545ad3 web: Fix emscripten build
The web/emscripten build has been broken for an unknown amount of time
and for multiple reasons:
  - Calling `cat` on Windows
  - The latest version of wasm-ld does not support the `--no-undefined`
    flag
  - `ccall` was not being exported

Fixes #3272.
2023-07-20 13:59:11 -06:00
David Neto
77417d5c9e Support MinGW build with Clang, not just GCC
Fixes: #3270
2023-07-19 20:02:03 -06:00
Nathaniel Cesario
865fe73958 cmake: Fix symlink on Windows
Copy the old glslangValidator name on Windows rather than creating a
symlink. While cmake 3.13 and above supports creating symlinks on
Windows, a security policy change is required in general to allow
the creation of symlinks for non-trusted users. See
https://learn.microsoft.com/en-us/windows/security/threat-protection/security-policy-settings/create-symbolic-links

Fixes #3268.
2023-07-19 17:16:37 -06:00
Jeremy Hayes
9b1a0f4d3e Update CHANGES for release 12.3.0 2023-07-19 12:57:07 -06:00
Jeremy Hayes
2af597d1a8 Update known_good.json 2023-07-18 15:29:59 -06:00
Nathaniel Cesario
856e280502 cmake: Rename glslang to glslangValidator
Rename glslangValidator to glslang and adds a glslangValidator symlink
to the build and install directories.

Closes #47.
2023-07-18 15:23:50 -06:00
Juan Ramos
a9a2625416 cmake: Fix Android build for r25 NDK
Currently with the build instructions provided in README.md
the build will fail.

In the r25 NDK the CMake toolchain defaults to the legacy path,
due to a bug in the current implementation.

https://github.com/android/ndk/issues/323
2023-07-18 13:08:33 -06:00
Pedro Olsen Ferreira
9afd346127 Fix maybe-uninitialized warning
The 'set' and 'setRT' variables were warning as maybe-uninitialized even
though in practice that case would never trigger (due to how the
function flow-controls).
The code blocks where these variables are actually read do not overlap,
so merge them into the same 'set' variable.
Simplify the control flow of the function with early-returns, which
drops indentation and simplifies the function.
2023-07-18 12:05:43 -06:00
Dawid-Lorenz-Mobica
d5f3ad6c9a
HLSL: support binary literals
Fixes #3089
2023-07-18 09:35:36 -06:00
Zeqiang Li
9e41635d74
Add missing initialization members for web (#3246) 2023-07-17 17:11:32 -06:00
Malcolm Bechard
6defcb2478 Rework how auto push_constant upgrading works a bit.
Ensure we traverse the entire tree and upgrade all references to the
given symbol so it can be upgraded to push_constant. Without this change
only one instance was upgraded, and others were left as uniform buffers.
2023-07-17 14:42:20 -04:00
Nathaniel Cesario
8a6a311d22 build: Remove bazel build support 2023-07-17 12:17:55 -04:00
Arcady Goldmints-Orlov
f47028995c Use std::call_once in spv::Parameterize()
There was a race condition in this function as it used a static variable
to attempt to ensure global initialization was only done once, which was
not thread-safe. Instead, use std::call_once, which was added to C++11
for this exact case.

Fixes #342
2023-07-13 18:14:29 -04:00
Joyce
d9a6fb2247
Create a Security Policy (#3169)
* Create SECURITY.md

Signed-off-by: Joyce <joycebrum@google.com>
2023-07-13 13:58:05 -04:00
Dawid Lorenz
44779f508a Add support for pre and post HLSL qualifier validation
The change makes it possible to define a const variable after the marked
type. Example "float const"
2023-07-11 13:36:38 -04:00
Dawid Lorenz
4ae01c5f41 Add support for pre and post HLSL qualifier validation
The change makes it possible to define a const variable after the marked
type. Example "float const"
2023-07-11 13:36:38 -04:00
Rex Xu
051f18c0cc Spirv_intrinsics: Add support of type specifier to spirv_type
Previously, spirv_type doesn't accept type specifier as its parameter.
With this change, we can input non-array type specifier. This is because
some SPIR-V type definition intructions often need to reference other
SPIR-V types as its source operands. We add the support to facilitate
such usage.
2023-07-11 13:26:22 -04:00
Nathaniel Cesario
eaa7057768 Fix C example in README
Remove the usage of C++ STL types in the C-only interface example.

Fixes #3239.
2023-07-07 16:33:08 -04:00
Arcady Goldmints-Orlov
3ebb72cc74 Add an assert that ID operands are non-zero
Zero is not a valid ID value and the SPIR-V emitter library should never
be emitting instructions with ID values of 0.
2023-06-27 13:49:14 -04:00
Arcady Goldmints-Orlov
d89c0b1d13 Force generateDebugInfo when non-semantic debug info is enabled
From the command line, the debug options "stack", with -gVS enabling all
of generateDebugInfo, emitNonSemanticShaderDebugInfo and
emitNonSemanticShaderDebugSource, however the programmatic interface
allows setting the latter options without the former. In this case, the
string corresponding to the source filename never gets emitted and some
debuginfo instructions end up with zero ID operands, resulting in
invalid SPIR-V.

Fixes #3240
2023-06-27 13:49:14 -04:00
Sven van Haastregt
9575e33186 Fix unused parameter warning in Release builds
The `function` parameter is only used by an assert currently, so mark
it as "maybe unused".  Alternatively the parameter could be removed,
but avoid such API churn for now.
2023-06-21 16:43:18 -04:00
Jason Liu
6a7ec4be7b Fix linking error "ld: unknown option: --no-undefined" on macOS 2023-06-19 14:32:31 -04:00
juan-lunarg
5793fbd624 cmake: Fix CMake 3.27 warnings
The FindPythonInterp and FindPythonLibs modules, which have
been deprecated since CMake 3.12, have been removed by policy
CMP0148. Port projects to FindPython3, FindPython2, or FindPython.
2023-06-16 16:12:26 -04:00
Pablo Delgado Krämer
72713baf74 Fix GL_NV_shader_invocation_reorder #define typo 2023-06-12 13:06:02 -07:00
Sven van Haastregt
4d95e22826 Fix -Wmaybe-uninitialized warnings
Fix some potentially uninitialized uses that are reported by GCC 13
with `-O3`.
2023-06-12 07:52:56 -07:00
David Neto
a6662c53ce ndk-build: test Android API 24
Vulkan was introduced in Android API 24.
Test against that API level.
NDKs drop support for older APIs

Google-internal BUG=285134453
2023-05-31 15:50:03 -04:00
rcombs
b587425025 glslang_c_interface: use valid C function prototypes
Prototypes are required in C.
2023-05-29 14:55:51 -06:00
Rémi Verschelde
48a467b413 CMake: Use set_target_properties instead of set_property
This makes the cmake code a bit cleaner and more consistent.
2023-05-25 14:34:34 -06:00
Arcady Goldmints-Orlov
6f22e41e0d CMake: Make glslang-default-resource-limits STATIC 2023-05-25 14:34:34 -06:00
Allan MacKinnon
9fbc561947
glslangValidator: Exit with an error if output file cannot be written
Propagate the error from glslang::OutputSpv[Hex|Bin] and exit with an error code if there is an error.
2023-05-23 14:07:48 -06:00
Allan MacKinnon
a5bf69936d [glslang] Strip trailing whitespace
There are many other files in the repo that have trailing whitespace
but this PR only cleans `glslang/SPIRV` and `glslang/Standalone`.
2023-05-22 12:04:40 -06:00
Arcady Goldmints-Orlov
e06bd35fea Switch Android.mk to use --std=c++17 2023-05-22 12:01:20 -06:00
Arcady Goldmints-Orlov
4c9cc240e6 Switch Bazel to c++17 2023-05-22 12:01:20 -06:00
Arcady Goldmints-Orlov
9caca7a17b Add decorations to structs with buffer references
The containsPhysicalStorageBufferOrArray function now handles struct
types correctly, checking their contents recursively for buffer
reference types. As a result, OpVariables containing structs that have
members that are buffer references now have the appropriate
AliasedPointer or RestrictPointer decoration as per the spec.

Fixes #3188
2023-05-19 11:35:18 -06:00
Jeremy Hayes
d1517d64cf Update CHANGES for release 12.2.0 2023-05-17 14:47:56 -06:00
Jeremy Hayes
f697b55c92 Update known_good.json 2023-05-16 17:03:00 -06:00
Arcady Goldmints-Orlov
1e4955adbc Include <cstdint> header in Common.h
This change also cleans up some ifdef'd code for no longer supported
versions of MSVC.

Fixes: #3139
2023-05-15 14:06:02 -06:00
Johannes Kauffmann
d9c3c7538b Common.h: don't use to_string workaround on MSVC
Pre-VS2012 is no longer supported.

It might still be needed on Android, I haven't tested this.
2023-05-10 09:55:02 -06:00
Johannes Kauffmann
f202aa665e PP: remove workaround for VS2015 2023-05-10 09:55:02 -06:00
Johannes Kauffmann
e00517acfe SPIRV: remove pre-C++11 workaround 2023-05-10 09:55:02 -06:00
Johannes Kauffmann
076c35863e SPIRV: hex_float: remove workaround for VS2013 2023-05-10 09:55:02 -06:00
Arcady Goldmints-Orlov
14e57abf26 Enable constructor reorder warnings
They no longer happen "all over" as the comment suggests, and downstream
builds have them enabled already.
2023-05-09 14:37:10 -06:00
Ryan Harrison
a02dde76f6 Correct ctor order to make '-Wreorder-ctor' pass
These lines in the ctor being out of order are causing -Wreorder-ctor
to fire when trying to integrate glslang ToT into Chromium/Dawn/etc,
https://logs.chromium.org/logs/dawn/buildbucket/cr-buildbucket/8781562047251466593/+/u/compile_with_ninja/stdout.
2023-05-09 12:39:09 -06:00
Steven Perron
49aad1361e Remove the windows-msvc-2015-release-bazel config
The VS2015 bazel test has been stopped, so we can not remove the config
file. We have the windows-msvc-2019-release-bazel to replace it. It is
already running, and it is passing.
2023-05-09 11:33:42 -06:00
Alexey Ozeritskiy
84d11c472a Use custom callbacks if they are available in 'i->callbacks' 2023-05-09 10:38:08 -06:00
Steven Perron
1397890e8e Add windows-msvc-2019-release-bazel CI config
The `windows-msvc-2015-release-bazel` build config name is misleading.
It now runs VS2019. We should rename it. This is the first part: create
the new config files.
2023-05-09 09:29:29 -06:00
Jeremy Hayes
010019f93b Fix windows-msvc-2015-bazel CI job
The build file is updated to use MSVC 2019 as well as bazel 5.0.0.
2023-05-09 08:31:04 -06:00
janharaldfredriksen-arm
0bbec2e8f6 Add GLSL_EXT_shader_tile_image 2023-05-08 19:49:25 -06:00
juan-lunarg
a3310b7cff ci: Test GCC on MacOS CI
closes #3062
2023-05-05 22:02:16 -06:00
juan-lunarg
9743480f3c cmake: Don't set CMAKE_INSTALL_PREFIX
While trying to set a default for CMAKE_INSTALL_PREFIX sounds
appealing it has multiple issues.

It's particularly problematic for open source projects where
many users try to accomplish many different things.

It's also conflicting with the new way of installing with cmake

IE: `cmake --install build --prefix build/install`

I've already removed similar logic in various other Khronos
repositories a while ago to address similar complaints.

closes #1015
2023-05-05 10:17:32 -06:00
Eric Werness
9d8c7b75c9 GL_EXT_ray_tracing_position_fetch 2023-05-05 09:12:37 -06:00
juan-lunarg
d6e9d3bb4e cmake: Remove USE_CCACHE
This is no longer needed with modern CMake.

I've already removed this from several Khronos repos.

See this stackoverflow for modern approaches to setting ccache via cmake:
https://stackoverflow.com/a/74120112/19739129
2023-05-05 09:11:06 -06:00
juan-lunarg
955f21aad2 cmake: Remove explicitly setting CMAKE_EXPORT_COMPILE_COMMANDS
Modern IDEs / C++ environments will just set this for you.

EX: vscode will set this for you.
2023-05-05 09:11:06 -06:00
Sruthik P
bc6b2bc17a glslang: Do not link with pthread on QNX
On QNX, pthread APIs are provided as part of libc and a separate pthread
library does not exist.

This change updates the makefile of glslang to not link with pthread on
QNX, thereby enabling glslang to be built for QNX platforms.
2023-05-03 09:09:01 -06:00
Chuang Zhu
dfc97740ff Use CMAKE_INSTALL_FULL_LIBDIR in compat cmake files
According to
https://cmake.org/cmake/help/v3.25/module/GNUInstallDirs.html,
CMAKE_INSTALL_LIBDIR can be an absolute path. For instance, Nixpkgs
[defined it to an absolute path in /nix/store](3d17b4c305/pkgs/development/tools/build-managers/cmake/setup-hook.sh (L101)).
The output in this case is:

	# result-glslang/lib/cmake/glslangTargets.cmake:5
	include("${CMAKE_CURRENT_LIST_DIR}/../..//nix/store/3mif2zibig0cilk5dbz334278n0vlq9s-glslang-1.3.231.0/lib/glslang/glslang-targets.cmake")

Signed-off-by: Chuang Zhu <git@chuang.cz>
2023-05-02 15:46:45 -06:00
Brad Smith
9c7fd1a33e Fix building on OpenBSD when building shared libs
OpenBSD does not link shared libs against libc so it is expected
that the use of --no-undefined when linking will fail.

Also garbage collect CMAKE_VERSION check while here, as requested, since
the minimum version is already 3.14.
2023-04-21 20:51:32 -04:00
David Neto
b8955549ef fix error message for vertex struct input
Vertex shaders can have pipeline inputs that are arrays, but not structure
inputs. (GLSL 4.5 section 4.3.4)

But the error message for struct inputs says "cannot be a structure or array".
This PR removes the "or array" part.

Note: The array case is handled immediately after the check for
structure type.

Co-authored-by: Arcady Goldmints-Orlov <arcady@lunarg.com>
2023-04-20 18:25:55 -04:00
Jeremy Hayes
dfdd0ed2ca Delete appveyor configuration
Windows CI is now covered by GitHub actions.
2023-04-20 11:03:54 -06:00
sean
f46f4b192a Fix: Migrate Windows CI to GitHub Actions 2023-04-19 14:51:55 -06:00
Arcady Goldmints-Orlov
68f073b195 Add a test for empty structs in HLSL hull shaders 2023-04-13 09:49:00 -04:00
Try
4142fead74 fix crash in HLSL frontend
fix crash, when converting HLSL return of hull shader into spirv/glsl like arrayed output.

fix #2914
2023-04-13 09:49:00 -04:00
Arcady Goldmints-Orlov
f766ee96f5 Improve help text for the new -P option 2023-04-12 18:24:35 -04:00
Jeremy Hayes
a270fdae55 Fix appveyor build worker image 2023-04-11 13:38:56 -06:00
spencer-lunarg
9fe5223370 Improve error message of alignment offset 2023-04-10 16:21:15 -04:00
Moritz Heinemann
bdba39bae6 Add more preamble tests 2023-04-06 13:38:39 -04:00
Moritz Heinemann
893145ead2 Add option to glslangValidator to inject preamble 2023-04-06 13:38:39 -04:00
Jeremy Hayes
1aefd184a6 Fix DebugCompilationUnit scope
Fix 3167.
2023-04-04 10:56:17 -04:00
Rex Xu
77f7cdfb1e Fix an issue when we merge multiple spirv_decorate_xxx directives
There is a typo.
2023-04-03 18:02:49 -04:00
Rex Xu
8ff8b45131 Parameters of spirv_decorate_id should accept variables
spirv_decorate_id will generate OpDecorateId. The parameter list should
accept variables as part of decorations. This is because OpDecorateId
allows this. The spec says:

  All such <id> Extra Operands must be constant instructions or
  OpVariable instructions.
2023-04-03 18:02:49 -04:00
Arcady Goldmints-Orlov
adcc7e8163 Add tests for conditionals that return a struct value
There are 3 separate tests added to cover the 3 cases in
visitSelection(). With SPIR-V versions prior to 1.4, control flow is
generated, with GLSL generating code to execute only the appropriate
branch of the conditional while HLSL executes both branches and uses the
control flow to select the appropriate one. Finally, with SPIR-V
versions newer than 1.4, OpSelect can be used on structs.

Note that the hlsl.structcopy.comp and hlsl.structcopylogical.comp tests
have identical shader code, but are compiled with different versions of
SPIR-V and result in different codepaths being used and different SPIR-V
generated.
2023-04-03 12:33:59 -04:00
Arcady Goldmints-Orlov
cdb350b356 Fix generation of conditionals with a struct result in SPIR-V
It is possible for the SPIR-V code generator to receive a conditional
where the two branches have the same shader language level type but
different SPIR-V types because of things like offset decorations. This
change modifies visitSelection() to handle this case by using either
multiTypeStore() or, if that is available, OpCopyLogical.

Fixes #3164
2023-04-03 12:33:59 -04:00
Qingyuan Zheng
f8a2442a16 Improve line info for symbol access and assignment 2023-04-01 21:04:46 -06:00
Arcady Goldmints-Orlov
fbabd37aca Remove a redundant condition in an if statement
This was added erroneously in commit 12bc9aa9c.
2023-03-31 19:53:42 -06:00
Arcady Goldmints-Orlov
2aca6d419c Refactor Builder::createTextureCall() to use std::vector
Use a temporary std::vector to accumulate arguments, rather than a
stack-allocated array with a fixed size. This is safer and more
future-proof.
2023-03-31 19:53:42 -06:00
Faith Ekstrand
45405e1d94 Add a .mailmap file
This will make my name and e-mail address remap properly in command-line
Git tools.
2023-03-25 12:26:55 -04:00
Moritz Heinemann
1db9cd2854 Fix CMake for OSDependent install 2023-03-24 16:31:40 -04:00
Arcady Goldmints-Orlov
c43008e829 Fix double expansion of macro arguments.
This adds a new fullyExpanded flag that makes sure that macro arguments
only get expanded once. This can happen either in PrescanMacroArg, or, if
there is token pasting or a function-like macro name has been passed as
an argument and may need to be expanded when used as a function.
2023-03-23 17:45:57 -04:00
Jeremy Hayes
14e5a04e70 Update CHANGES for release 12.1.0 2023-03-21 16:20:54 -06:00
Jeremy Hayes
59abdcf912 Update known_good.json 2023-03-21 15:38:26 -06:00
Nathan Gauër
b34f619e1c kokoro: always chown files after build 2023-03-17 12:53:47 -06:00
Juan Ramos
ef77cf3a92 cmake: No need to set CMP0048/CMP0054
Now that the minimum is 3.14.0 setting these policies is redundant
2023-03-16 10:41:39 -06:00
Juan Ramos
43978b7c96 cmake: Remove outdated comment 2023-03-16 10:41:39 -06:00
Jeremy Hayes
0094e47972 Fix outdated cmake conditional
Remove cmake condition. The minimum is 3.14. The condition is no longer
required.

C++17 is now required. Update the landing page.
2023-03-16 10:05:58 -06:00
Joyce
cd2082e058
Set token permissions to workflows (#3156)
Signed-off-by: Joyce <joycebrum@google.com>
2023-03-08 11:27:09 -05:00
Greg Fischer
204812694c
Merge pull request #3153 from greg-lunarg/i3150
Fix installation of resource limits headers
2023-03-03 16:08:30 -07:00
Greg Fischer
aae2a7ae08 Fix installation of resource limits headers
Fixes #3150
2023-03-03 15:17:03 -07:00
Greg Fischer
2ca0ee3ba4
Merge pull request #3137 from moritz-h/resource-limits
Move ResourceLimits from StandAlone to glslang dir
2023-03-02 11:43:06 -07:00
Johan Mattsson
9cdfc5a511 Fix potential NULL dereference 2023-02-20 18:31:34 -05:00
Johan Mattsson
c64c98267c Fix potential NULL dereference 2023-02-20 17:33:15 -05:00
Moritz Heinemann
f5fa593143 move ResourceLimits from StandAlone to glslang dir (Fix #3064) 2023-02-15 20:06:26 +01:00
Randall C. O'Reilly
6d41bb9c55 updated test to test atomic float add and test results 2023-02-08 13:28:52 -07:00
Randall C. O'Reilly
ae55d83a88 change HLSL/hlslParseables.cpp to support InterlockedAdd on F=float types 2023-02-08 13:28:52 -07:00
Jan Engelhardt
4386679bcd build: set SOVERSION on all libraries
Commit fbe9a23baf2cb020fe3f80d68d972e2a97d9b954 erroneously
only added SOVERSION to libglslang.so, but none of the others
that are produced.

Signed-off-by: Jan Engelhardt <jengelh@inai.de>
2023-02-03 15:19:35 -07:00
David Neto
d62ef8a20a Use the ninja already in the docker build. 2023-02-02 16:34:01 -07:00
David Neto
8329d4a44b kokoro: avoid git permissions issue that GN fails on
In the docker build script that Kokoro runs, the directories
are owned by a different user.  Git complains about that and in the GN
flow GN will error out.
In this docker flow we don't care about that warning, so within
the docker config set a git global option to ignore the issue.
2023-02-02 16:34:01 -07:00
Maciej
d604f26843 Add test 2023-02-02 16:33:32 -07:00
Maciej
95ad533eb0 Block-decorate Vulkan Structs with RuntimeArrays
Fixes KhronosGroup/glslang#2439

When decorating a struct for Vulkan, add [Buffer]Block decoration if the
struct has a RuntimeArray member, as required by VUID-...-04680.
2023-02-02 16:33:32 -07:00
Hans Wennborg
7341a21b34 GLSL: Fix integer overflow warnings in Constant.cpp
New versions of Clang warn:

```
glslang/MachineIndependent/Constant.cpp(216,114):
error: overflow in expression; result is -9223372036854775808 with type 'long long' [-Werror,-Winteger-overflow]
                else if (rightUnionArray[i].getI64Const() == -1 && leftUnionArray[i].getI64Const() == (long long)-0x8000000000000000ll)
                                                                                                                 ^
glslang/MachineIndependent/Constant.cpp(217,61):
error: overflow in expression; result is -9223372036854775808 with type 'long long' [-Werror,-Winteger-overflow]
                    newConstArray[i].setI64Const((long long)-0x8000000000000000ll);
                                                            ^
2 errors generated.
```

Using LLONG_MIN instead avoids the problem. I think it's also more
clear, and the code for EOpMod further down already does this.
2023-02-02 11:20:54 -07:00
rdb
5137ce1a95 HLSL: Add missing relaxed-precision float/int matrix expansions 2023-02-02 11:14:33 -07:00
Jeremy Hayes
58d302cfa2 Rename master to main and update news
Update CI and README to reflect rename.
Update News:
    * Notify users of rename.
    * Update minimum required VS compiler to 2019.
    * Remove notice about versioning. This has been completed.
    * Remove notice about SPIRV folder relocation. It has been 2.5 years
    since this occured.
2023-01-30 15:31:05 -07:00
Maciej
4e9cde50bb Move check if useStorageBuffer needs to be set.
From TParseContext used only by GLSL, to TParseContextBase inherited by both GLSL and HLSL paths.
It caused compilations from HLSL to SPIR-V 1.3+ to use BufferBlock decoration which is no longer valid.
2023-01-23 12:49:48 -07:00
Arcady Goldmints-Orlov
0d3211ff7b Reject non-float inputs/outputs with version < 120
GLSL 1.20 and prior stated that "the attribute qualifier can be used
only with float, floating-point vectors, and matrices" and likewise
for varying.

Fixes: #3111
2023-01-20 17:45:18 -07:00
Amir Masoud Abdol
8504d5ae1c Replace the deprecated $<CONFIGURATION> with $<CONFIG> 2023-01-20 10:27:13 -07:00
Jeremy Hayes
51813b65e9 Update readme with upcoming branch rename 2023-01-20 09:34:34 -07:00
Jeremy Hayes
ca8d07d0bc Update CHANGES for release 12.0.0 2023-01-19 09:57:51 -07:00
Jeremy Hayes
615741f278 Update known_good.json 2023-01-18 14:59:26 -07:00
Jeremy Hayes
42e94ee67e Update appveyor environment
SPIRV-Tools now requires 3.17.2 or higher. The version provided by
Visual Studio 2015 is 3.16.2.
2023-01-18 13:57:06 -07:00
Greg Fischer
1fb2f1d789
Merge pull request #3108 from greg-lunarg/i3105
Fix crash on bad structure member reference
2023-01-11 18:39:49 -07:00
Greg Fischer
9b67d41b85 Fix crash on bad structure member reference
Fixes #3105
2023-01-11 16:53:39 -07:00
Juan Ramos
06a7078ce7 build: Remove AMD_EXTENSIONS / NV_EXTENSIONS defines
These defines aren't needed anymore
2023-01-05 09:51:53 -07:00
Greg Fischer
1d978158de
Merge pull request #3100 from daniel-story/fix-dual-src-draw-buffers
Fix issues with MaxDualSourceDrawBuffersEXT
2022-12-29 12:09:46 -07:00
Greg Fischer
d1fc064e79
Merge pull request #3102 from jeremy-lunarg/hayes-fix-debuginfo-disassembly
Fix debuginfo disassembly
2022-12-26 13:30:34 -07:00
Jeremy Hayes
d38d06c03f Fix debuginfo disassembly 2022-12-22 15:43:03 -07:00
Greg Fischer
68935bc2c6
Merge pull request #3099 from jeremy-lunarg/hayes-fix-issue-3095
Fix const parameter debug types
2022-12-22 10:03:12 -07:00
Jeremy Hayes
bec8359bf7 Fix const parameter debug types
Constant qualified parameter types were not being correctly added to
the DebugTypeFunction instruction.

Fix #3095.
2022-12-21 14:20:44 -07:00
Daniel Story
a88f674124 Fix issues with MaxDualSourceDrawBuffersEXT 2022-12-21 11:53:50 -08:00
Jeremy Hayes
dcae187376 Remove languages from cmake project statement
Fix #3088
2022-12-20 09:33:05 -07:00
Chow
f9b760e6c7
[glslang] Refine implicit array size interfaces. (#3074)
* [glslang] Refine implicit array size interfaces.

Help to check builtin and other variables if across stages.
2022-12-13 11:20:28 -07:00
Greg Fischer
c6b3f279a7
Merge pull request #3087 from dneto0/remove-unused
Remove the name of unused formal paramters
2022-12-12 10:34:33 -07:00
David Neto
4fe00178c8 Remove the name of unused formal paramters
This eliminates a compiler warning in some configurations.
2022-12-09 15:51:35 -05:00
alelenv
6d8b00b1c6
Add support for GL_NV_shader_invocation_reorder. (#3054) 2022-12-09 13:19:51 -07:00
alelenv
4fc43cd3c1
Add support for GL_NV_shader_invocation_reorder. (#3054) 2022-12-09 13:19:08 -07:00
Greg Fischer
19d816c8c9
Merge pull request #3086 from jeremy-lunarg/hayes-fix-3073
Guard AppleClang linker options
2022-12-09 10:39:14 -07:00
Jeremy Hayes
586baa35a4 Guard AppleClang linker options
Fix #3073
2022-12-08 16:57:43 -07:00
327 changed files with 40265 additions and 26282 deletions

View File

@ -1,108 +0,0 @@
# Windows Build Configuration for AppVeyor
# http://www.appveyor.com/docs/appveyor-yml
# build version format
version: "{build}"
os: Visual Studio 2015
platform:
- x64
configuration:
- Debug
- Release
branches:
only:
- master
# changes to these files don't need to trigger testing
skip_commits:
files:
- README.md
- README-spirv-remap.txt
- LICENSE.txt
- CODE_OF_CONDUCT.md
- BUILD.*
- WORKSPACE
- kokoro/*
- make-revision
- Android.mk
- _config.yml
# Travis advances the master-tot tag to current top of the tree after
# each push into the master branch, because it relies on that tag to
# upload build artifacts to the master-tot release. This will cause
# double testing for each push on Appveyor: one for the push, one for
# the tag advance. Disable testing tags.
skip_tags: true
clone_depth: 5
matrix:
fast_finish: true # Show final status immediately if a test fails.
# scripts that run after cloning repository
install:
- C:/Python27/python.exe update_glslang_sources.py
- set PATH=C:\ninja;C:\Python36;%PATH%
- git clone https://github.com/google/googletest.git External/googletest
build:
parallel: true # enable MSBuild parallel builds
verbosity: minimal
build_script:
- mkdir build && cd build
- cmake -G "Visual Studio 14 2015 Win64" -DCMAKE_INSTALL_PREFIX=install ..
- cmake --build . --config %CONFIGURATION% --target install
test_script:
- ctest -C %CONFIGURATION% --output-on-failure
- cd ../Test && bash runtests
- cd ../build
after_test:
# For debug build, the generated dll has a postfix "d" in its name.
- ps: >-
If ($env:configuration -Match "Debug") {
$env:SUFFIX="d"
} Else {
$env:SUFFIX=""
}
- cd install
# Zip all glslang artifacts for uploading and deploying
- 7z a glslang-master-windows-"%PLATFORM%"-"%CONFIGURATION%".zip
bin\glslangValidator.exe
bin\spirv-remap.exe
include\glslang\*
lib\GenericCodeGen%SUFFIX%.lib
lib\glslang%SUFFIX%.lib
lib\glslang-default-resource-limits%SUFFIX%.lib
lib\HLSL%SUFFIX%.lib
lib\MachineIndependent%SUFFIX%.lib
lib\OGLCompiler%SUFFIX%.lib
lib\OSDependent%SUFFIX%.lib
lib\SPIRV%SUFFIX%.lib
lib\SPVRemapper%SUFFIX%.lib
lib\SPIRV-Tools%SUFFIX%.lib
lib\SPIRV-Tools-opt%SUFFIX%.lib
artifacts:
- path: build\install\*.zip
name: artifacts-zip
deploy:
- provider: GitHub
auth_token:
secure: YglcSYdl0TylEa59H4K6lylBEDr586NAt2EMgZquSo+iuPrwgZQuJLPCoihSm9y6
release: master-tot
description: "Continuous build of the latest master branch by Appveyor and Github"
artifact: artifacts-zip
draft: false
prerelease: false
force_update: true
on:
branch: master
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015

22
.github/dependabot.yml vendored Normal file
View File

@ -0,0 +1,22 @@
# Copyright 2023 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
version: 2
updates:
- package-ecosystem: "github-actions" # Necessary to update action hashes
directory: "/"
schedule:
interval: "weekly"
# Allow up to 3 opened pull requests for github-actions versions
open-pull-requests-limit: 3

View File

@ -20,11 +20,26 @@ on:
workflow_dispatch:
push:
branches:
- master
- main
paths-ignore:
- 'README.md'
- 'README-spirv-remap.txt'
- 'LICENSE.txt'
- 'CODE_OF_CONDUCT.md'
- 'BUILD.*'
- 'WORKSPACE'
- 'kokoro/*'
- 'make-revision'
- 'Android.mk'
- '_config.yml'
permissions: read-all
jobs:
linux:
runs-on: ${{matrix.os.genus}}
permissions:
contents: write
strategy:
fail-fast: false
matrix:
@ -32,8 +47,9 @@ jobs:
compiler: [{cc: clang, cxx: clang++}, {cc: gcc, cxx: g++}]
cmake_build_type: [Debug, Release]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
- uses: lukka/get-cmake@8be6cca406b575906541e8e3b885d46f416bba39 # v3.27.7
- uses: actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1 # v4.7.0
with:
python-version: '3.7'
- name: Install Ubuntu Package Dependencies
@ -71,10 +87,11 @@ jobs:
- name: Zip
if: ${{ matrix.compiler.cc == 'clang' }}
env:
ARCHIVE: glslang-master-${{matrix.os.family}}-${{matrix.cmake_build_type}}.zip
ARCHIVE: glslang-main-${{matrix.os.family}}-${{matrix.cmake_build_type}}.zip
run: |
cd build/install
zip ${ARCHIVE} \
bin/glslang \
bin/glslangValidator \
include/glslang/* \
include/glslang/**/* \
@ -92,8 +109,8 @@ jobs:
- name: Deploy
if: ${{ matrix.compiler.cc == 'clang' }}
env:
ARCHIVE: glslang-master-${{matrix.os.family}}-${{matrix.cmake_build_type}}.zip
uses: actions/github-script@v5
ARCHIVE: glslang-main-${{matrix.os.family}}-${{matrix.cmake_build_type}}.zip
uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410 # v6.4.1
with:
script: |
const script = require('.github/workflows/deploy.js')
@ -101,6 +118,8 @@ jobs:
macos:
runs-on: ${{matrix.os.genus}}
permissions:
contents: write
strategy:
fail-fast: false
matrix:
@ -108,8 +127,9 @@ jobs:
compiler: [{cc: clang, cxx: clang++}]
cmake_build_type: [Debug, Release]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
- uses: lukka/get-cmake@8be6cca406b575906541e8e3b885d46f416bba39 # v3.27.7
- uses: actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1 # v4.7.0
with:
python-version: '3.7'
- name: Install GoogleTest
@ -142,10 +162,11 @@ jobs:
cd ../Test && ./runtests
- name: Zip
env:
ARCHIVE: glslang-master-${{matrix.os.family}}-${{matrix.cmake_build_type}}.zip
ARCHIVE: glslang-main-${{matrix.os.family}}-${{matrix.cmake_build_type}}.zip
run: |
cd build/install
zip ${ARCHIVE} \
bin/glslang \
bin/glslangValidator \
include/glslang/* \
include/glslang/**/* \
@ -162,8 +183,100 @@ jobs:
lib/libSPIRV-Tools-opt.a
- name: Deploy
env:
ARCHIVE: glslang-master-${{matrix.os.family}}-${{matrix.cmake_build_type}}.zip
uses: actions/github-script@v5
ARCHIVE: glslang-main-${{matrix.os.family}}-${{matrix.cmake_build_type}}.zip
uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410 # v6.4.1
with:
script: |
const script = require('.github/workflows/deploy.js')
await script({github, context, core})
windows:
runs-on: ${{matrix.os.genus}}
permissions:
contents: write
strategy:
fail-fast: false
matrix:
os: [{genus: windows-2019, family: windows}]
cmake_build_type: [Debug, Release]
steps:
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
- uses: lukka/get-cmake@8be6cca406b575906541e8e3b885d46f416bba39 # v3.27.7
- uses: actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1 # v4.7.0
with:
python-version: '3.7'
- name: Install GoogleTest
run: |
# 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 ../..
- name: Update Glslang Sources
run: |
python update_glslang_sources.py
- name: Build
run: |
cmake -S. -Bbuild -G "Visual Studio 16 2019" -A x64 -DCMAKE_INSTALL_PREFIX="$PWD/build/install"
cmake --build build --config ${{matrix.cmake_build_type}} --target install
- name: Test
run: |
cd build
ctest -C ${{matrix.cmake_build_type}} --output-on-failure
cd ../Test && bash runtests
- name: Zip
if: ${{ matrix.cmake_build_type == 'Debug' }}
env:
ARCHIVE: glslang-master-${{matrix.os.family}}-Debug.zip
run: |
cd build/install
7z a ${{env.ARCHIVE}} `
bin/glslang.exe `
bin/glslangValidator.exe `
bin/spirv-remap.exe `
include/glslang/* `
lib/GenericCodeGend.lib `
lib/glslangd.lib `
lib/glslang-default-resource-limitsd.lib `
lib/HLSLd.lib `
lib/MachineIndependentd.lib `
lib/OGLCompilerd.lib `
lib/OSDependentd.lib `
lib/SPIRVd.lib `
lib/SPVRemapperd.lib `
lib/SPIRV-Toolsd.lib `
lib/SPIRV-Tools-optd.lib
- name: Zip
if: ${{ matrix.cmake_build_type == 'Release' }}
env:
ARCHIVE: glslang-master-${{matrix.os.family}}-Release.zip
run: |
cd build/install
7z a ${{env.ARCHIVE}} `
bin/glslang.exe `
bin/glslangValidator.exe `
bin/spirv-remap.exe `
include/glslang/* `
lib/GenericCodeGen.lib `
lib/glslang.lib `
lib/glslang-default-resource-limits.lib `
lib/HLSL.lib `
lib/MachineIndependent.lib `
lib/OGLCompiler.lib `
lib/OSDependent.lib `
lib/SPIRV.lib `
lib/SPVRemapper.lib `
lib/SPIRV-Tools.lib `
lib/SPIRV-Tools-opt.lib
- name: Deploy
env:
ARCHIVE: glslang-master-${{matrix.os.family}}-${{matrix.cmake_build_type}}.zip
uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410 # v6.4.1
with:
script: |
const script = require('.github/workflows/deploy.js')

View File

@ -10,26 +10,28 @@ on:
workflow_dispatch:
pull_request:
branches:
- master
- main
permissions: read-all
jobs:
linux:
runs-on: ${{matrix.os}}
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04]
compiler: [{cc: clang, cxx: clang++}, {cc: gcc, cxx: g++}]
cmake_build_type: [Debug, Release]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
- uses: lukka/get-cmake@8be6cca406b575906541e8e3b885d46f416bba39 # v3.27.7
- uses: actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1 # v4.7.0
with:
python-version: '3.7'
- name: Install Ubuntu Package Dependencies
run: |
sudo apt-get -qq update
sudo apt-get install -y clang-6.0
- name: Setup ccache
uses: hendrikmuhs/ccache-action@6d1841ec156c39a52b1b23a810da917ab98da1f4 # v1.2.10
with:
key: ubuntu-22-${{ matrix.cmake_build_type }}-${{ matrix.compiler.cc }}-${{matrix.compiler.cxx}}
- name: Install GoogleTest
run: |
# check out pre-breakage version of googletest; can be deleted when
@ -43,16 +45,117 @@ jobs:
git reset --hard FETCH_HEAD
cd ../..
- name: Update Glslang Sources
run: |
./update_glslang_sources.py
- name: Build
run: ./update_glslang_sources.py
- name: Configure
run: cmake -S . -B build -D CMAKE_BUILD_TYPE=${{ matrix.cmake_build_type }}
env:
CC: ${{matrix.compiler.cc}}
CXX: ${{matrix.compiler.cxx}}
CMAKE_GENERATOR: Ninja
CMAKE_C_COMPILER_LAUNCHER: ccache
CMAKE_CXX_COMPILER_LAUNCHER: ccache
- name: Build
run: cmake --build build
- name: Install
run: cmake --install build --prefix build/install
- name: Test
run: |
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=${{matrix.cmake_build_type}} -DCMAKE_INSTALL_PREFIX=`pwd`/install ..
make -j4 install
cd build
ctest --output-on-failure &&
cd ../Test && ./runtests
linux-asan:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
compiler: [{cc: gcc, cxx: g++}]
cmake_build_type: [Debug]
flags: ['-fsanitize=address', '-fsanitize=thread']
steps:
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
- uses: lukka/get-cmake@8be6cca406b575906541e8e3b885d46f416bba39 # v3.27.7
- uses: actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1 # v4.7.0
with:
python-version: '3.7'
- name: Setup ccache
uses: hendrikmuhs/ccache-action@6d1841ec156c39a52b1b23a810da917ab98da1f4 # v1.2.10
with:
key: ubuntu-22-${{ matrix.cmake_build_type }}-${{ matrix.compiler.cc }}-${{matrix.compiler.cxx}}-${{matrix.flags}}
- name: Install GoogleTest
run: |
# 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 ../..
- name: Update Glslang Sources
run: ./update_glslang_sources.py
- name: Configure
run: cmake -S . -B build -D CMAKE_BUILD_TYPE=${{ matrix.cmake_build_type }}
env:
CC: ${{matrix.compiler.cc}}
CXX: ${{matrix.compiler.cxx}}
CMAKE_GENERATOR: Ninja
CMAKE_C_COMPILER_LAUNCHER: ccache
CMAKE_CXX_COMPILER_LAUNCHER: ccache
CFLAGS: ${{matrix.flags}}
CXXFLAGS: ${{matrix.flags}}
LDFLAGS: ${{matrix.flags}}
- name: Build
run: cmake --build build
- name: Install
run: cmake --install build --prefix build/install
- name: Test
run: |
cd build
ctest --output-on-failure &&
cd ../Test && ./runtests
# Ensure we can compile/run on an older distro
linux_min:
name: Linux Backcompat
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
- uses: actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1 # v4.7.0
with:
python-version: '3.7'
- uses: lukka/get-cmake@8be6cca406b575906541e8e3b885d46f416bba39 # v3.27.7
with:
cmakeVersion: 3.17.2
- name: Setup ccache
uses: hendrikmuhs/ccache-action@6d1841ec156c39a52b1b23a810da917ab98da1f4 # v1.2.10
with:
key: linux_backcompat
- name: Install GoogleTest
run: |
# 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 ../..
- name: Update Glslang Sources
run: ./update_glslang_sources.py
- name: Configure
run: cmake -S . -B build -D CMAKE_BUILD_TYPE=Release
env:
CMAKE_C_COMPILER_LAUNCHER: ccache
CMAKE_CXX_COMPILER_LAUNCHER: ccache
- name: Build
run: cmake --build build
- name: Install
run: cmake --install build --prefix build/install
- name: Test
run: |
cd build
@ -64,14 +167,15 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [macos-11]
compiler: [{cc: clang, cxx: clang++}]
os: [macos-11, macos-12]
compiler: [{cc: clang, cxx: clang++}, {cc: gcc, cxx: g++}]
cmake_build_type: [Debug, Release]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
- uses: actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1 # v4.7.0
with:
python-version: '3.7'
- uses: lukka/get-cmake@8be6cca406b575906541e8e3b885d46f416bba39 # v3.27.7
- name: Install GoogleTest
run: |
# check out pre-breakage version of googletest; can be deleted when
@ -85,49 +189,37 @@ jobs:
git reset --hard FETCH_HEAD
cd ../..
- name: Update Glslang Sources
run: |
./update_glslang_sources.py
- name: Build
run: ./update_glslang_sources.py
- name: Configure
run: cmake -S . -B build -D CMAKE_BUILD_TYPE=${{matrix.cmake_build_type}} -G "Ninja"
env:
CC: ${{matrix.compiler.cc}}
CXX: ${{matrix.compiler.cxx}}
run: |
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=${{matrix.cmake_build_type}} -DCMAKE_INSTALL_PREFIX=`pwd`/install ..
make -j4 install
- name: Build
run: cmake --build build
- name: Install
run: cmake --install build --prefix build/install
- name: Test
run: |
cd build
ctest --output-on-failure &&
cd ../Test && ./runtests
android:
runs-on: ${{matrix.os}}
windows:
runs-on: ${{matrix.os.genus}}
permissions:
contents: write
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04]
compiler: [{cc: clang, cxx: clang++}]
cmake_build_type: [Release]
os: [{genus: windows-2019, family: windows}]
cmake_build_type: [Debug, Release]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
- uses: lukka/get-cmake@8be6cca406b575906541e8e3b885d46f416bba39 # v3.27.7
- uses: actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1 # v4.7.0
with:
python-version: '3.7'
- name: Install Ubuntu Package Dependencies
if: ${{matrix.os == 'ubuntu-20.04'}}
run: |
sudo apt-get -qq update
sudo apt-get install -y clang-6.0
- name: Install Android NDK
run: |
export ANDROID_NDK=$HOME/android-ndk
git init $ANDROID_NDK
pushd $ANDROID_NDK
git remote add dneto0 https://github.com/dneto0/android-ndk.git
git fetch --depth=1 dneto0 r17b-strip
git checkout FETCH_HEAD
popd
- name: Install GoogleTest
run: |
# check out pre-breakage version of googletest; can be deleted when
@ -142,16 +234,74 @@ jobs:
cd ../..
- name: Update Glslang Sources
run: |
./update_glslang_sources.py
python update_glslang_sources.py
- name: Build
env:
CC: ${{matrix.compiler.cc}}
CXX: ${{matrix.compiler.cxx}}
run: |
export ANDROID_NDK=$HOME/android-ndk
export TOOLCHAIN_PATH=$ANDROID_NDK/build/cmake/android.toolchain.cmake
echo $ANDROID_NDK
echo $TOOLCHAIN_PATH
mkdir build && cd build
cmake -DCMAKE_TOOLCHAIN_FILE=${TOOLCHAIN_PATH} -DANDROID_NATIVE_API_LEVEL=android-14 -DCMAKE_BUILD_TYPE=${{matrix.cmake_build_type}} -DANDROID_ABI="armeabi-v7a with NEON" -DBUILD_TESTING=OFF ..
make -j4
cmake -S. -Bbuild -G "Visual Studio 16 2019" -A x64 -DCMAKE_INSTALL_PREFIX="$PWD/build/install"
cmake --build build --config ${{matrix.cmake_build_type}} --target install
- name: Test
run: |
cd build
ctest -C ${{matrix.cmake_build_type}} --output-on-failure
cd ../Test && bash runtests
android:
runs-on: ubuntu-22.04
strategy:
matrix:
# Android NDK currently offers 2 different toolchains.
# Test both to ensure we are compatible with either approach.
LEGACY: [ON, OFF]
# Oldest/newest NDK currently provided by GitHub runners
# https://github.com/actions/runner-images/blob/main/images/linux/Ubuntu2204-Readme.md#android
NDK: [23.2.8568313, 25.2.9519653]
steps:
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
- uses: actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1 # v4.7.0
with:
python-version: '3.7'
- uses: lukka/get-cmake@8be6cca406b575906541e8e3b885d46f416bba39 # v3.27.7
- name: Setup ccache
uses: hendrikmuhs/ccache-action@6d1841ec156c39a52b1b23a810da917ab98da1f4 # v1.2.10
with:
key: android-${{ matrix.LEGACY }}-${{ matrix.NDK }}
- name: Update Glslang Sources
run: ./update_glslang_sources.py
- name: Configure
run: |
cmake -S . -B build/ \
--toolchain $ANDROID_HOME/ndk/${{ matrix.NDK }}/build/cmake/android.toolchain.cmake \
-D CMAKE_BUILD_TYPE=Release \
-D ANDROID_ABI=armeabi-v7a \
-D ANDROID_USE_LEGACY_TOOLCHAIN_FILE=${{ matrix.LEGACY }} \
-D BUILD_TESTING=OFF
env:
CMAKE_GENERATOR: Ninja
CMAKE_C_COMPILER_LAUNCHER: ccache
CMAKE_CXX_COMPILER_LAUNCHER: ccache
- name: Build
run: cmake --build build/
emscripten:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
- uses: actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1 # v4.7.0
with:
python-version: '3.7'
- uses: lukka/get-cmake@8be6cca406b575906541e8e3b885d46f416bba39 # v3.27.7
- name: Setup ccache
uses: hendrikmuhs/ccache-action@6d1841ec156c39a52b1b23a810da917ab98da1f4 # v1.2.10
with:
key: ubuntu-emscripten
- uses: mymindstorm/setup-emsdk@ab889da2abbcbb280f91ec4c215d3bb4f3a8f775 # v12
- name: Update Glslang Sources
run: ./update_glslang_sources.py
- name: Configure
run: emcmake cmake -GNinja -Bbuild/web -DCMAKE_BUILD_TYPE=Release -DENABLE_GLSLANG_JS=ON -DBUILD_TESTING=OFF -DENABLE_OPT=OFF
env:
CMAKE_GENERATOR: Ninja
CMAKE_C_COMPILER_LAUNCHER: ccache
CMAKE_CXX_COMPILER_LAUNCHER: ccache
- name: Build
run: cmake --build build/web

View File

@ -3,11 +3,11 @@ module.exports = async ({github, context, core}) => {
await github.rest.git.updateRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: 'tags/master-tot',
ref: 'tags/main-tot',
sha: context.sha
})
} catch (error) {
core.setFailed(`upload master-tot tag; ${error.name}; ${error.message}`)
core.setFailed(`upload main-tot tag; ${error.name}; ${error.message}`)
}
let release
@ -15,10 +15,10 @@ module.exports = async ({github, context, core}) => {
release = await github.rest.repos.getReleaseByTag({
owner: context.repo.owner,
repo: context.repo.repo,
tag: 'master-tot'
tag: 'main-tot'
})
} catch (error) {
core.setFailed(`get the master release; ${error.name}; ${error.message}`)
core.setFailed(`get the main release; ${error.name}; ${error.message}`)
}
try {
@ -28,7 +28,7 @@ module.exports = async ({github, context, core}) => {
release_id: release.data.id
})
} catch (error) {
core.setFailed(`update the master release; ${error.name}; ${error.message}`)
core.setFailed(`update the main release; ${error.name}; ${error.message}`)
}
let release_assets

53
.github/workflows/scorecard.yml vendored Normal file
View File

@ -0,0 +1,53 @@
name: Scorecard supply-chain security
on:
# For Branch-Protection check. Only the default branch is supported. See
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection
branch_protection_rule:
# To guarantee Maintained check is occasionally updated. See
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#maintained
schedule:
- cron: '36 17 * * 5'
push:
branches: [ "main" ]
# Declare default permissions as read only.
permissions: read-all
jobs:
analysis:
name: Scorecard analysis
runs-on: ubuntu-latest
permissions:
security-events: write # to upload the results to code-scanning dashboard
id-token: write # to publish results and get a badge
steps:
- name: "Checkout code"
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
with:
persist-credentials: false
- name: "Run analysis"
uses: ossf/scorecard-action@483ef80eb98fb506c348f7d62e28055e49fe2398 # v2.3.0
with:
results_file: results.sarif
results_format: sarif
# To enable Branch-Protection uncomment the `repo_token` line below
# To create the Fine-grained PAT, follow the steps in https://github.com/ossf/scorecard-action#authentication-with-fine-grained-pat-optional.
# repo_token: ${{ secrets.SCORECARD_TOKEN }}
publish_results: true # allows the repo to include the Scorecard badge
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
# format to the repository Actions tab.
- name: "Upload artifact"
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
with:
name: SARIF file
path: results.sarif
retention-days: 5
# Upload the results to GitHub's code scanning dashboard.
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@2cb752a87e96af96708ab57187ab6372ee1973ab # v2.22.0
with:
sarif_file: results.sarif

9
.gitignore vendored
View File

@ -11,6 +11,8 @@ Test/localResults/
External/googletest
External/spirv-tools
out/
CMakeUserPresets.json
*.obj
# GN generated files
.cipd/
@ -19,6 +21,13 @@ third_party/
buildtools/
tools/
# S++ generated files
.spp_script_run
# Random OS stuff
.DS_Store
._*
# Generated files
include/
glslang/build_info.h

3
.mailmap Normal file
View File

@ -0,0 +1,3 @@
Faith Ekstrand <faith.ekstrand@collabora.com> <jason@jlekstrand.net>
Faith Ekstrand <faith.ekstrand@collabora.com> <jason.ekstrand@intel.com>
Faith Ekstrand <faith.ekstrand@collabora.com> <jason.ekstrand@collabora.com>

View File

@ -1,4 +1,4 @@
# Copyright (C) 2020 The Khronos Group Inc.
# Copyright (C) 2020-2023 The Khronos Group Inc.
#
# All rights reserved.
#
@ -53,11 +53,11 @@ $(eval $(call gen_glslang_build_info_h))
GLSLANG_OS_FLAGS := -DGLSLANG_OSINCLUDE_UNIX
# AMD and NV extensions are turned on by default in upstream Glslang.
GLSLANG_DEFINES:= -DAMD_EXTENSIONS -DNV_EXTENSIONS -DENABLE_HLSL $(GLSLANG_OS_FLAGS)
GLSLANG_DEFINES:= -DENABLE_HLSL $(GLSLANG_OS_FLAGS)
include $(CLEAR_VARS)
LOCAL_MODULE:=OSDependent
LOCAL_CXXFLAGS:=-std=c++11 -fno-exceptions -fno-rtti $(GLSLANG_DEFINES)
LOCAL_CXXFLAGS:=-std=c++17 -fno-exceptions -fno-rtti $(GLSLANG_DEFINES)
LOCAL_EXPORT_C_INCLUDES:=$(LOCAL_PATH)
LOCAL_SRC_FILES:=glslang/OSDependent/Unix/ossource.cpp
LOCAL_C_INCLUDES:=$(LOCAL_PATH) $(LOCAL_PATH)/glslang/OSDependent/Unix/
@ -66,7 +66,7 @@ include $(BUILD_STATIC_LIBRARY)
include $(CLEAR_VARS)
LOCAL_MODULE:=OGLCompiler
LOCAL_CXXFLAGS:=-std=c++11 -fno-exceptions -fno-rtti $(GLSLANG_DEFINES)
LOCAL_CXXFLAGS:=-std=c++17 -fno-exceptions -fno-rtti $(GLSLANG_DEFINES)
LOCAL_EXPORT_C_INCLUDES:=$(LOCAL_PATH)
LOCAL_SRC_FILES:=OGLCompilersDLL/InitializeDll.cpp
LOCAL_C_INCLUDES:=$(LOCAL_PATH)/OGLCompiler
@ -78,7 +78,7 @@ include $(BUILD_STATIC_LIBRARY)
# instead.
include $(CLEAR_VARS)
LOCAL_MODULE:=HLSL
LOCAL_CXXFLAGS:=-std=c++11 -fno-exceptions -fno-rtti $(GLSLANG_DEFINES)
LOCAL_CXXFLAGS:=-std=c++17 -fno-exceptions -fno-rtti $(GLSLANG_DEFINES)
LOCAL_SRC_FILES:= \
hlsl/stub.cpp
LOCAL_C_INCLUDES:=$(LOCAL_PATH) \
@ -93,7 +93,7 @@ $(LOCAL_PATH)/glslang/MachineIndependent/ShaderLang.cpp: \
$(GLSLANG_BUILD_INFO_H)
LOCAL_MODULE:=glslang
LOCAL_CXXFLAGS:=-std=c++11 -fno-exceptions -fno-rtti $(GLSLANG_DEFINES)
LOCAL_CXXFLAGS:=-std=c++17 -fno-exceptions -fno-rtti $(GLSLANG_DEFINES)
LOCAL_EXPORT_C_INCLUDES:=$(LOCAL_PATH)
LOCAL_SRC_FILES:= \
glslang/CInterface/glslang_c_interface.cpp \
@ -148,7 +148,7 @@ $(LOCAL_PATH)/SPIRV/GlslangToSpv.cpp: \
$(GLSLANG_BUILD_INFO_H)
LOCAL_MODULE:=SPIRV
LOCAL_CXXFLAGS:=-std=c++11 -fno-exceptions -fno-rtti -Werror $(GLSLANG_DEFINES)
LOCAL_CXXFLAGS:=-std=c++17 -fno-exceptions -fno-rtti -Werror $(GLSLANG_DEFINES)
LOCAL_SRC_FILES:= \
SPIRV/CInterface/spirv_c_interface.cpp \
SPIRV/GlslangToSpv.cpp \

View File

@ -1,313 +0,0 @@
# Copyright (C) 2020 The Khronos Group Inc.
#
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following
# disclaimer in the documentation and/or other materials provided
# with the distribution.
#
# Neither the name of The Khronos Group Inc. nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
# COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
package(
default_visibility = ["//visibility:public"],
)
# Description:
#
# Khronos reference front-end for GLSL and ESSL, and sample SPIR-V generator.
licenses(["notice"])
exports_files(["LICENSE"])
# Build information generation script
py_binary(
name = "build_info",
srcs = ["build_info.py"],
)
py_binary(
name = "gen_extension_headers",
srcs = ["gen_extension_headers.py"],
)
genrule(
name = "gen_build_info_h",
srcs = ["CHANGES.md", "build_info.h.tmpl"],
outs = ["glslang/build_info.h"],
cmd_bash = "$(location build_info) $$(dirname $(location CHANGES.md)) -i $(location build_info.h.tmpl) -o $(location glslang/build_info.h)",
cmd_bat = "for %F in ($(location CHANGES.md)) do $(location build_info) %~dpF -i $(location build_info.h.tmpl) -o $(location glslang/build_info.h)",
tools = [":build_info"],
)
genrule(
name = "gen_extension_headers_h",
srcs = ["glslang/ExtensionHeaders", "gen_extension_headers.py"],
outs = ["glslang/glsl_intrinsic_header.h"],
cmd_bash = "$(location gen_extension_headers) -i $(location glslang/ExtensionHeaders) -o $(location glslang/glsl_intrinsic_header.h)",
tools = [":gen_extension_headers"],
)
COMMON_COPTS = select({
"@bazel_tools//src/conditions:windows": [""],
"//conditions:default": [
"-Wall",
"-Wuninitialized",
"-Wunused",
"-Wunused-local-typedefs",
"-Wunused-parameter",
"-Wunused-value",
"-Wunused-variable",
"-Wno-reorder",
"-std=c++11",
"-fvisibility=hidden",
"-fvisibility-inlines-hidden",
"-fno-exceptions",
"-fno-rtti",
],
})
cc_library(
name = "glslang",
srcs = glob(
[
"glslang/GenericCodeGen/*.cpp",
"glslang/HLSL/*.cpp",
"glslang/MachineIndependent/*.cpp",
"glslang/MachineIndependent/preprocessor/*.cpp",
],
exclude = [
"glslang/HLSL/pch.h",
"glslang/MachineIndependent/pch.h",
],
) + [
"OGLCompilersDLL/InitializeDll.cpp",
] + select({
"@bazel_tools//src/conditions:windows":
["glslang/OSDependent/Windows/ossource.cpp"],
"//conditions:default":
["glslang/OSDependent/Unix/ossource.cpp"],
}),
hdrs = glob([
"glslang/HLSL/*.h",
"glslang/Include/*.h",
"glslang/MachineIndependent/*.h",
"glslang/MachineIndependent/preprocessor/*.h",
]) + [
"OGLCompilersDLL/InitializeDll.h",
"StandAlone/DirStackFileIncluder.h",
"glslang/OSDependent/osinclude.h",
"glslang/Public/ShaderLang.h",
":gen_build_info_h",
],
copts = COMMON_COPTS,
defines = [
"AMD_EXTENSIONS",
"ENABLE_HLSL=0",
"ENABLE_OPT=0",
"NV_EXTENSIONS",
],
linkopts = select({
"@bazel_tools//src/conditions:windows": [""],
"//conditions:default": ["-lm", "-lpthread"],
}),
linkstatic = 1,
)
genrule(
name = "export_spirv_headers",
srcs = [
"SPIRV/GLSL.ext.AMD.h",
"SPIRV/GLSL.ext.EXT.h",
"SPIRV/GLSL.ext.KHR.h",
"SPIRV/GLSL.ext.NV.h",
"SPIRV/GLSL.ext.ARM.h",
"SPIRV/GLSL.std.450.h",
"SPIRV/NonSemanticDebugPrintf.h",
"SPIRV/NonSemanticShaderDebugInfo100.h",
"SPIRV/spirv.hpp",
],
outs = [
"include/SPIRV/GLSL.ext.AMD.h",
"include/SPIRV/GLSL.ext.EXT.h",
"include/SPIRV/GLSL.ext.KHR.h",
"include/SPIRV/GLSL.ext.NV.h",
"include/SPIRV/GLSL.ext.ARM.h",
"include/SPIRV/GLSL.std.450.h",
"include/SPIRV/NonSemanticDebugPrintf.h",
"include/SPIRV/NonSemanticShaderDebugInfo100.h",
"include/SPIRV/spirv.hpp",
],
cmd_bash = "mkdir -p $(@D)/include/SPIRV && cp $(SRCS) $(@D)/include/SPIRV/",
cmd_bat = "(if not exist $(@D)\\include\\SPIRV mkdir $(@D)\\include\\SPIRV) && (for %S in ($(SRCS)) do @xcopy /q %S $(@D)\\include\\SPIRV\\ >NUL)",
)
cc_library(
name = "SPIRV_headers",
hdrs = [":export_spirv_headers"],
copts = COMMON_COPTS,
includes = [
"include",
"include/SPIRV",
],
linkstatic = 1,
)
cc_library(
name = "SPIRV",
srcs = glob(
["SPIRV/*.cpp"],
exclude = [
"SPIRV/SpvTools.cpp",
],
),
hdrs = [
"SPIRV/GlslangToSpv.h",
"SPIRV/Logger.h",
"SPIRV/SPVRemapper.h",
"SPIRV/SpvBuilder.h",
"SPIRV/SpvTools.h",
"SPIRV/bitutils.h",
"SPIRV/disassemble.h",
"SPIRV/doc.h",
"SPIRV/hex_float.h",
"SPIRV/spvIR.h",
],
copts = COMMON_COPTS,
includes = ["SPIRV"],
linkopts = select({
"@bazel_tools//src/conditions:windows": [""],
"//conditions:default": ["-lm"],
}),
linkstatic = 1,
deps = [
":SPIRV_headers",
":glslang",
],
)
cc_library(
name = "glslang-default-resource-limits",
srcs = ["StandAlone/ResourceLimits.cpp"],
hdrs = ["glslang/Public/ResourceLimits.h"],
copts = COMMON_COPTS,
linkstatic = 1,
deps = [":glslang"],
)
cc_binary(
name = "glslangValidator",
srcs = [
"StandAlone/StandAlone.cpp",
"StandAlone/Worklist.h",
":glslang/glsl_intrinsic_header.h"
],
copts = COMMON_COPTS,
deps = [
":SPIRV",
":glslang",
":glslang-default-resource-limits",
],
)
cc_binary(
name = "spirv-remap",
srcs = ["StandAlone/spirv-remap.cpp"],
copts = COMMON_COPTS,
deps = [
":SPIRV",
":glslang",
":glslang-default-resource-limits",
],
)
filegroup(
name = "test_files",
srcs = glob(
["Test/**"],
exclude = [
"Test/bump",
"Test/glslangValidator",
"Test/runtests",
],
),
)
cc_library(
name = "glslang_test_lib",
testonly = 1,
srcs = [
"gtests/HexFloat.cpp",
"gtests/Initializer.h",
"gtests/Settings.cpp",
"gtests/Settings.h",
"gtests/TestFixture.cpp",
"gtests/TestFixture.h",
"gtests/main.cpp",
],
copts = COMMON_COPTS,
data = [":test_files"],
defines = select({
# Unfortunately we can't use $(location) in cc_library at the moment.
# See https://github.com/bazelbuild/bazel/issues/1023
# So we'll specify the path manually.
"@bazel_tools//src/conditions:windows":
["GLSLANG_TEST_DIRECTORY='\"../../../../../Test\"'"],
"//conditions:default":
["GLSLANG_TEST_DIRECTORY='\"Test\"'"],
}),
linkstatic = 1,
deps = [
":SPIRV",
":glslang",
":glslang-default-resource-limits",
"@com_google_googletest//:gtest",
],
)
GLSLANG_TESTS = glob(
["gtests/*.FromFile.cpp"],
# Since we are not building the SPIRV-Tools dependency, the following tests
# cannot be performed.
exclude = [
"gtests/Hlsl.FromFile.cpp",
"gtests/Spv.FromFile.cpp",
],
)
[cc_test(
name = test_file.replace("gtests/", "").replace(".FromFile.cpp", "") + "_test",
srcs = [test_file],
copts = COMMON_COPTS,
data = [
":test_files",
],
deps = [
":SPIRV",
":glslang",
":glslang_test_lib",
],
) for test_file in GLSLANG_TESTS]

View File

@ -124,6 +124,7 @@ template("glslang_sources_common") {
"SPIRV/GLSL.ext.KHR.h",
"SPIRV/GLSL.ext.NV.h",
"SPIRV/GLSL.ext.ARM.h",
"SPIRV/GLSL.ext.QCOM.h",
"SPIRV/GLSL.std.450.h",
"SPIRV/GlslangToSpv.cpp",
"SPIRV/GlslangToSpv.h",
@ -299,7 +300,7 @@ glslang_sources_common("glslang_sources") {
source_set("glslang_default_resource_limits_sources") {
sources = [
"StandAlone/ResourceLimits.cpp",
"glslang/ResourceLimits/ResourceLimits.cpp",
"glslang/Public/ResourceLimits.h",
"glslang/Include/ResourceLimits.h",
]

View File

@ -3,6 +3,88 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](https://semver.org/).
## 13.1.0 2023-10-13
* Support GL_EXT_texture_shadow_lod
* Support GL_NV_displacement_micromap
* Fix ByteAddressBuffer when used a function parameter
* Add more verbose messages if SPIRV-Tools is not found
* Fix names for explicitly sized types when emitting nonsemantic debug info
* Emit error for r-value arguments in atomic memory operations
* Add --no-link option
* Beautify preprocessor output format
* Fix race condition in glslangValidator
* Only set LocalSizeId mode when necessary
* Don't emit invalid debug info for buffer references
## 13.0.0 2023-08-23
### Breaking changes
* Simplify PoolAlloc via thread_local
* Remove InitializeDLL functions
* Remove OSDependent TLS functions
* Remove GLSLANG_WEB and GLSLANG_WEB_DEVEL code paths
### Other changes
* Raise CMAKE minimum to 3.17.2
* Support GL_KHR_cooperative_matrix
* Support GL_QCOM_image_processing_support
* Support outputting each module to a filename with spirv-remap
* Generate an error when gl_PrimitiveShaderRateEXT is used without enabling the extension
* Improve layout checking when GL_EXT_spirv_intrinsics is enabled
## 12.3.1 2023-07-20
### Other changes
* Improve backward compatibility for glslangValidator rename on Windows
## 12.3.0 2023-07-19
### Other changes
* Rename glslangValidator to glslang and create glslangValidator symlink
* Support HLSL binary literals
* Add missing initialization members for web
* Improve push_constant upgrading
* Fix race condition in spirv remap
* Support pre and post HLSL qualifier validation
* Force generateDebugInfo when non-semantic debug info is enabled
* Exit with error if output file cannot be written
* Fix struct member buffer reference decorations
## 12.2.0 2023-05-17
### Other changes
* Support GLSL_EXT_shader_tile_image
* Support GL_EXT_ray_tracing_position_fetch
* Support custom include callbacks via the C API
* Add preamble-text command-line option
* Accept variables as parameters of spirv_decorate_id
* Fix generation of conditionals with a struct result
* Fix double expansion of macros
* Fix DebugCompilationUnit scope
* Improve line information
## 12.1.0 2023-03-21
### Other changes
* Reject non-float inputs/outputs for version less than 120
* Fix invalid BufferBlock decoration for SPIR-V 1.3 and above
* Add HLSL relaxed-precision float/int matrix expansions
* Block decorate Vulkan structs with RuntimeArrays
* Support InterlockedAdd on float types
## 12.0.0 2023-01-18
### Breaking changes
* An ABI was accidentally broken in #3014. Consequently, we have incremented the major revision number.
### Other changes
* Add support for ARB_bindless_texture.
* Add support for GL_NV_shader_invocation_reorder.
* Fix const parameter debug types when using NonSemantic.Shader.DebugInfo.100.
* Fix NonSemantic.Shader.DebugInfo.100 disassembly.
* Fix MaxDualSourceDrawBuffersEXT usage.
* Fix structure member reference crash.
## 11.13.0 2022-12-06
### Other changes

View File

@ -1,4 +1,4 @@
# Copyright (C) 2020 The Khronos Group Inc.
# Copyright (C) 2020-2023 The Khronos Group Inc.
#
# All rights reserved.
#
@ -30,24 +30,11 @@
# 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.
# increase to 3.1 once all major distributions
# include a version of CMake >= 3.1
cmake_minimum_required(VERSION 3.14.0)
if (POLICY CMP0048)
cmake_policy(SET CMP0048 NEW)
endif()
if(POLICY CMP0054)
cmake_policy(SET CMP0054 NEW)
endif()
project(glslang LANGUAGES CXX)
cmake_minimum_required(VERSION 3.17.2)
project(glslang)
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
# Enable compile commands database
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
# Adhere to GNU filesystem layout conventions
include(GNUInstallDirs)
include(CMakePackageConfigHelpers)
@ -78,18 +65,10 @@ if(NOT ${SKIP_GLSLANG_INSTALL})
endif()
option(ENABLE_SPVREMAPPER "Enables building of SPVRemapper" ON)
option(ENABLE_GLSLANG_BINARIES "Builds glslangValidator and spirv-remap" ON)
option(ENABLE_GLSLANG_BINARIES "Builds glslang and spirv-remap" ON)
option(ENABLE_GLSLANG_JS
"If using Emscripten, build glslang.js. Otherwise, builds a sample executable for binary-size testing." OFF)
CMAKE_DEPENDENT_OPTION(ENABLE_GLSLANG_WEBMIN
"Reduces glslang to minimum needed for web use"
OFF "ENABLE_GLSLANG_JS"
OFF)
CMAKE_DEPENDENT_OPTION(ENABLE_GLSLANG_WEBMIN_DEVEL
"For ENABLE_GLSLANG_WEBMIN builds, enables compilation error messages"
OFF "ENABLE_GLSLANG_WEBMIN"
OFF)
CMAKE_DEPENDENT_OPTION(ENABLE_EMSCRIPTEN_SINGLE_FILE
"If using Emscripten, enables SINGLE_FILE build"
OFF "ENABLE_GLSLANG_JS AND EMSCRIPTEN"
@ -99,11 +78,7 @@ CMAKE_DEPENDENT_OPTION(ENABLE_EMSCRIPTEN_ENVIRONMENT_NODE
OFF "ENABLE_GLSLANG_JS AND EMSCRIPTEN"
OFF)
CMAKE_DEPENDENT_OPTION(ENABLE_HLSL
"Enables HLSL input support"
ON "NOT ENABLE_GLSLANG_WEBMIN"
OFF)
option(ENABLE_HLSL "Enables HLSL input support" ON)
option(ENABLE_RTTI "Enables RTTI" OFF)
option(ENABLE_EXCEPTIONS "Enables Exceptions" OFF)
option(ENABLE_OPT "Enables spirv-opt capability if present" ON)
@ -117,18 +92,6 @@ else()
endif()
option(ENABLE_CTEST "Enables testing" ON)
if(ENABLE_GLSLANG_INSTALL AND CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT AND WIN32)
set(CMAKE_INSTALL_PREFIX "install" CACHE STRING "..." FORCE)
endif()
option(USE_CCACHE "Use ccache" OFF)
if(USE_CCACHE)
find_program(CCACHE_FOUND ccache)
if(CCACHE_FOUND)
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
endif()
endif()
if(ENABLE_CTEST)
include(CTest)
endif()
@ -137,13 +100,6 @@ if(ENABLE_HLSL)
add_definitions(-DENABLE_HLSL)
endif()
if(ENABLE_GLSLANG_WEBMIN)
add_definitions(-DGLSLANG_WEB)
if(ENABLE_GLSLANG_WEBMIN_DEVEL)
add_definitions(-DGLSLANG_WEB_DEVEL)
endif()
endif()
if(WIN32)
set(CMAKE_DEBUG_POSTFIX "d")
option(OVERRIDE_MSVCCRT "Overrides runtime of MSVC " ON)
@ -151,7 +107,7 @@ if(WIN32)
include(ChooseMSVCCRT.cmake)
endif()
add_definitions(-DGLSLANG_OSINCLUDE_WIN32)
elseif(UNIX)
elseif(UNIX OR ANDROID)
add_definitions(-DGLSLANG_OSINCLUDE_UNIX)
else()
message("unknown platform")
@ -160,7 +116,6 @@ endif()
if(${CMAKE_CXX_COMPILER_ID} MATCHES "GNU")
add_compile_options(-Wall -Wmaybe-uninitialized -Wuninitialized -Wunused -Wunused-local-typedefs
-Wunused-parameter -Wunused-value -Wunused-variable -Wunused-but-set-parameter -Wunused-but-set-variable -fno-exceptions)
add_compile_options(-Wno-reorder) # disable this from -Wall, since it happens all over.
if(NOT ENABLE_RTTI)
add_compile_options(-fno-rtti)
endif()
@ -171,16 +126,13 @@ if(${CMAKE_CXX_COMPILER_ID} MATCHES "GNU")
add_compile_options(-Werror=deprecated-copy)
endif()
if(NOT CMAKE_VERSION VERSION_LESS "3.13" AND NOT CMAKE_SYSTEM_NAME STREQUAL "Darwin")
if(NOT CMAKE_SYSTEM_NAME STREQUAL "OpenBSD" AND NOT CMAKE_SYSTEM_NAME STREQUAL "Darwin")
# Error if there's symbols that are not found at link time.
# add_link_options() was added in CMake 3.13 - if using an earlier
# version don't set this - it should be caught by presubmits anyway.
add_link_options("-Wl,--no-undefined")
endif()
elseif(${CMAKE_CXX_COMPILER_ID} MATCHES "Clang" AND NOT MSVC)
add_compile_options(-Wall -Wuninitialized -Wunused -Wunused-local-typedefs
-Wunused-parameter -Wunused-value -Wunused-variable)
add_compile_options(-Wno-reorder) # disable this from -Wall, since it happens all over.
if(NOT ENABLE_RTTI)
add_compile_options(-fno-rtti)
endif()
@ -188,14 +140,12 @@ elseif(${CMAKE_CXX_COMPILER_ID} MATCHES "Clang" AND NOT MSVC)
add_compile_options(-fno-exceptions)
endif()
if(NOT CMAKE_VERSION VERSION_LESS "3.13")
# Error if there's symbols that are not found at link time.
# add_link_options() was added in CMake 3.13 - if using an earlier
# version don't set this - it should be caught by presubmits anyway.
if (WIN32)
add_link_options("-Wl,--no-undefined")
else()
if(NOT (CMAKE_SYSTEM_NAME STREQUAL "OpenBSD" OR CMAKE_SYSTEM_NAME STREQUAL "Emscripten"))
# Error if there's symbols that are not found at link time. Some linkers do not support this flag.
if (CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
add_link_options("-Wl,-undefined,error")
elseif(NOT APPLE)
add_link_options("-Wl,--no-undefined")
endif()
endif()
elseif(MSVC)
@ -227,21 +177,16 @@ if(ENABLE_GLSLANG_JS)
endif()
endif()
# Request C++11
if(${CMAKE_VERSION} VERSION_LESS 3.1)
# CMake versions before 3.1 do not understand CMAKE_CXX_STANDARD
# remove this block once CMake >=3.1 has fixated in the ecosystem
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
else()
set(CMAKE_CXX_STANDARD 11)
# Request C++17
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
endif()
function(glslang_set_link_args TARGET)
# For MinGW compiles, statically link against the GCC and C++ runtimes.
# This avoids the need to ship those runtimes as DLLs.
if(WIN32 AND ${CMAKE_CXX_COMPILER_ID} MATCHES "GNU")
# This is supported by GCC and Clang.
if(WIN32 AND NOT MSVC)
set_target_properties(${TARGET} PROPERTIES
LINK_FLAGS "-static -static-libgcc -static-libstdc++")
endif()
@ -289,10 +234,9 @@ endfunction()
function(glslang_only_export_explicit_symbols target)
if(BUILD_SHARED_LIBS)
target_compile_definitions(${target} PUBLIC "GLSLANG_IS_SHARED_LIBRARY=1")
set_target_properties(${target} PROPERTIES CMAKE_CXX_VISIBILITY_PRESET hidden)
if(WIN32)
target_compile_definitions(${target} PRIVATE "GLSLANG_EXPORTING=1")
else()
target_compile_options(${target} PRIVATE "-fvisibility=hidden")
endif()
endif()
endfunction()
@ -313,15 +257,31 @@ else()
endif()
if(BUILD_EXTERNAL AND IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/External)
find_host_package(PythonInterp 3 REQUIRED)
find_host_package(Python3 REQUIRED)
# We depend on these for later projects, so they should come first.
add_subdirectory(External)
endif()
option(ALLOW_EXTERNAL_SPIRV_TOOLS "Allows to build against installed SPIRV-Tools-opt" OFF)
if(NOT TARGET SPIRV-Tools-opt)
if(ALLOW_EXTERNAL_SPIRV_TOOLS)
# Look for external SPIR-V Tools build, if not building in-tree
message(STATUS "Trying to find local SPIR-V tools")
find_package(SPIRV-Tools-opt)
if(NOT TARGET SPIRV-Tools-opt)
if(ENABLE_OPT)
message(WARNING "ENABLE_OPT set but SPIR-V tools not found! Disabling SPIR-V optimization.")
endif()
set(ENABLE_OPT OFF)
endif()
else()
if(ENABLE_OPT)
message(SEND_ERROR "ENABLE_OPT set but SPIR-V tools not found. Please run update_glslang_sources.py, "
"set the ALLOW_EXTERNAL_SPIRV_TOOLS option to use a local install of SPIRV-Tools, or set ENABLE_OPT=0.")
endif()
endif()
endif()
if(ENABLE_OPT)
message(STATUS "optimizer enabled")
@ -355,12 +315,12 @@ if(ENABLE_CTEST AND BUILD_TESTING)
endif()
if (CMAKE_CONFIGURATION_TYPES)
set(RESULTS_PATH ${CMAKE_CURRENT_BINARY_DIR}/$<CONFIGURATION>/localResults)
set(VALIDATOR_PATH ${CMAKE_CURRENT_BINARY_DIR}/StandAlone/$<CONFIGURATION>/glslangValidator)
set(REMAP_PATH ${CMAKE_CURRENT_BINARY_DIR}/StandAlone/$<CONFIGURATION>/spirv-remap)
set(RESULTS_PATH ${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>/localResults)
set(VALIDATOR_PATH ${CMAKE_CURRENT_BINARY_DIR}/StandAlone/$<CONFIG>/glslang)
set(REMAP_PATH ${CMAKE_CURRENT_BINARY_DIR}/StandAlone/$<CONFIG>/spirv-remap)
else()
set(RESULTS_PATH ${CMAKE_CURRENT_BINARY_DIR}/localResults)
set(VALIDATOR_PATH ${CMAKE_CURRENT_BINARY_DIR}/StandAlone/glslangValidator)
set(VALIDATOR_PATH ${CMAKE_CURRENT_BINARY_DIR}/StandAlone/glslang)
set(REMAP_PATH ${CMAKE_CURRENT_BINARY_DIR}/StandAlone/spirv-remap)
endif()
@ -372,10 +332,18 @@ endif()
if(ENABLE_GLSLANG_INSTALL)
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/glslang-config.cmake.in" [=[
@PACKAGE_INIT@
@INSTALL_CONFIG_UNIX@
include("@PACKAGE_PATH_EXPORT_TARGETS@")
]=])
set(PATH_EXPORT_TARGETS "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}/glslang-targets.cmake")
if(UNIX OR "${CMAKE_SYSTEM_NAME}" STREQUAL "Fuchsia")
set(INSTALL_CONFIG_UNIX [=[
include(CMakeFindDependencyMacro)
set(THREADS_PREFER_PTHREAD_FLAG ON)
find_dependency(Threads REQUIRED)
]=])
endif()
configure_package_config_file(
"${CMAKE_CURRENT_BINARY_DIR}/glslang-config.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/glslang-config.cmake"

View File

@ -49,7 +49,7 @@ if(ENABLE_GLSLANG_INSTALL AND NOT BUILD_SHARED_LIBS)
message(WARNING \"Using `OGLCompilerTargets.cmake` is deprecated: use `find_package(glslang)` to find glslang CMake targets.\")
if (NOT TARGET glslang::OGLCompiler)
include(\"\${CMAKE_CURRENT_LIST_DIR}/../../${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}/glslang-targets.cmake\")
include(\"${CMAKE_INSTALL_FULL_LIBDIR}/cmake/${PROJECT_NAME}/glslang-targets.cmake\")
endif()
add_library(OGLCompiler ALIAS glslang::OGLCompiler)

View File

@ -32,134 +32,6 @@
// POSSIBILITY OF SUCH DAMAGE.
//
#define SH_EXPORTING
#include <cassert>
#include "InitializeDll.h"
#include "../glslang/Include/InitializeGlobals.h"
#include "../glslang/Public/ShaderLang.h"
#include "../glslang/Include/PoolAlloc.h"
namespace glslang {
OS_TLSIndex ThreadInitializeIndex = OS_INVALID_TLS_INDEX;
// Per-process initialization.
// Needs to be called at least once before parsing, etc. is done.
// Will also do thread initialization for the calling thread; other
// threads will need to do that explicitly.
bool InitProcess()
{
glslang::GetGlobalLock();
if (ThreadInitializeIndex != OS_INVALID_TLS_INDEX) {
//
// Function is re-entrant.
//
glslang::ReleaseGlobalLock();
return true;
}
ThreadInitializeIndex = OS_AllocTLSIndex();
if (ThreadInitializeIndex == OS_INVALID_TLS_INDEX) {
assert(0 && "InitProcess(): Failed to allocate TLS area for init flag");
glslang::ReleaseGlobalLock();
return false;
}
if (! InitializePoolIndex()) {
assert(0 && "InitProcess(): Failed to initialize global pool");
glslang::ReleaseGlobalLock();
return false;
}
if (! InitThread()) {
assert(0 && "InitProcess(): Failed to initialize thread");
glslang::ReleaseGlobalLock();
return false;
}
glslang::ReleaseGlobalLock();
return true;
}
// Per-thread scoped initialization.
// Must be called at least once by each new thread sharing the
// symbol tables, etc., needed to parse.
bool InitThread()
{
//
// This function is re-entrant
//
if (ThreadInitializeIndex == OS_INVALID_TLS_INDEX) {
assert(0 && "InitThread(): Process hasn't been initalised.");
return false;
}
if (OS_GetTLSValue(ThreadInitializeIndex) != nullptr)
return true;
if (! OS_SetTLSValue(ThreadInitializeIndex, (void *)1)) {
assert(0 && "InitThread(): Unable to set init flag.");
return false;
}
glslang::SetThreadPoolAllocator(nullptr);
return true;
}
// Not necessary to call this: InitThread() is reentrant, and the need
// to do per thread tear down has been removed.
//
// This is kept, with memory management removed, to satisfy any exiting
// calls to it that rely on it.
bool DetachThread()
{
bool success = true;
if (ThreadInitializeIndex == OS_INVALID_TLS_INDEX)
return true;
//
// Function is re-entrant and this thread may not have been initialized.
//
if (OS_GetTLSValue(ThreadInitializeIndex) != nullptr) {
if (!OS_SetTLSValue(ThreadInitializeIndex, nullptr)) {
assert(0 && "DetachThread(): Unable to clear init flag.");
success = false;
}
}
return success;
}
// Not necessary to call this: InitProcess() is reentrant.
//
// This is kept, with memory management removed, to satisfy any exiting
// calls to it that rely on it.
//
// Users of glslang should call shFinalize() or glslang::FinalizeProcess() for
// process-scoped memory tear down.
bool DetachProcess()
{
bool success = true;
if (ThreadInitializeIndex == OS_INVALID_TLS_INDEX)
return true;
success = DetachThread();
OS_FreeTLSIndex(ThreadInitializeIndex);
ThreadInitializeIndex = OS_INVALID_TLS_INDEX;
return success;
}
} // end namespace glslang

View File

@ -38,10 +38,10 @@
namespace glslang {
bool InitProcess();
bool InitThread();
bool DetachThread(); // not called from standalone, perhaps other tools rely on parts of it
bool DetachProcess(); // not called from standalone, perhaps other tools rely on parts of it
inline bool InitProcess() { return true; } // DEPRECATED
inline bool InitThread() { return true; } // DEPRECATED
inline bool DetachThread() { return true; } // DEPRECATED
inline bool DetachProcess() { return true; } // DEPRECATED
} // end namespace glslang

View File

@ -112,7 +112,7 @@ BUILD DEPENDENCIES:
BUILDING
--------------------------------------------------------------------------------
The standalone remapper is built along side glslangValidator through its
The standalone remapper is built along side glslang through its
normal build process.

View File

@ -1,26 +1,19 @@
# News
1. Visual Studio 2013 is no longer supported
1. [As discussed in #3107](https://github.com/KhronosGroup/glslang/issues/3107), the default branch of this repository is now 'main'. This change should be transparent to repository users, since github rewrites many references to the old 'master' branch to 'main'. However, if you have a checked-out local clone, you may wish to take the following steps as recommended by github:
[As scheduled](https://github.com/KhronosGroup/glslang/blob/9eef54b2513ca6b40b47b07d24f453848b65c0df/README.md#planned-deprecationsremovals),
Microsoft Visual Studio 2013 is no longer officially supported. \
Please upgrade to at least Visual Studio 2015.
```sh
git branch -m master main
git fetch origin
git branch -u origin/main main
git remote set-head origin -a
```
2. The versioning scheme is being improved, and you might notice some differences. This is currently WIP, but will be coming soon. See, for example, PR #2277.
2. C++17 (all platforms) and Visual Studio 2019 (Windows) are now required. This change was driven by the external dependency on SPIRV-Tools.
3. If you get a new **compilation error due to a missing header**, it might be caused by this planned removal:
**SPIRV Folder, 1-May, 2020.** Glslang, when installed through CMake,
will install a `SPIRV` folder into `${CMAKE_INSTALL_INCLUDEDIR}`.
This `SPIRV` folder is being moved to `glslang/SPIRV`.
During the transition the `SPIRV` folder will be installed into both locations.
The old install of `SPIRV/` will be removed as a CMake install target no sooner than May 1, 2020.
See issue #1964.
If people are only using this location to get spirv.hpp, I recommend they get that from [SPIRV-Headers](https://github.com/KhronosGroup/SPIRV-Headers) instead.
[![appveyor status](https://ci.appveyor.com/api/projects/status/q6fi9cb0qnhkla68/branch/master?svg=true)](https://ci.appveyor.com/project/Khronoswebmaster/glslang/branch/master)
![Continuous Integration](https://github.com/KhronosGroup/glslang/actions/workflows/continuous_integration.yml/badge.svg)
![Continuous Deployment](https://github.com/KhronosGroup/glslang/actions/workflows/continuous_deployment.yml/badge.svg)
[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/KhronosGroup/glslang/badge)](https://securityscorecards.dev/viewer/?uri=github.com/KhronosGroup/glslang)
# Glslang Components and Status
@ -55,7 +48,7 @@ An API for getting reflection information from the AST, reflection types/variabl
### Standalone Wrapper
`glslangValidator` is command-line tool for accessing the functionality above.
`glslang` is command-line tool for accessing the functionality above.
Status: Complete.
@ -73,7 +66,7 @@ The above page, while not kept up to date, includes additional information regar
## Execution of Standalone Wrapper
To use the standalone binary form, execute `glslangValidator`, and it will print
To use the standalone binary form, execute `glslang`, and it will print
a usage statement. Basic operation is to give it a file containing a shader,
and it will print out warnings/errors and optionally an AST.
@ -99,15 +92,15 @@ There is also a non-shader extension:
## Building (CMake)
Instead of building manually, you can also download the binaries for your
platform directly from the [master-tot release][master-tot-release] on GitHub.
platform directly from the [main-tot release][main-tot-release] on GitHub.
Those binaries are automatically uploaded by the buildbots after successful
testing and they always reflect the current top of the tree of the master
testing and they always reflect the current top of the tree of the main
branch.
### Dependencies
* A C++11 compiler.
(For MSVS: use 2015 or later.)
* A C++17 compiler.
(For MSVS: use 2019 or later.)
* [CMake][cmake]: for generating compilation targets.
* make: _Linux_, ninja is an alternative, if configured.
* [Python 3.x][python]: for executing SPIRV-Tools scripts. (Optional if not using SPIRV-Tools and the 'External' subdirectory does not exist.)
@ -242,16 +235,13 @@ changes are quite infrequent. For windows you can get binaries from
The command to rebuild is:
```bash
m4 -P MachineIndependent/glslang.m4 > MachineIndependent/glslang.y
bison --defines=MachineIndependent/glslang_tab.cpp.h
-t MachineIndependent/glslang.y
-o MachineIndependent/glslang_tab.cpp
```
The above commands are also available in the bash script in `updateGrammar`,
The above command is also available in the bash script in `updateGrammar`,
when executed from the glslang subdirectory of the glslang repository.
With no arguments it builds the full grammar, and with a "web" argument,
the web grammar subset (see more about the web subset in the next section).
### Building to WASM for the Web and Node
### Building a standalone JS/WASM library for the Web and Node
@ -261,15 +251,9 @@ Use the steps in [Build Steps](#build-steps), with the following notes/exception
Bash-like environments:
+ [Instructions located here](https://emscripten.org/docs/getting_started/downloads.html#sdk-download-and-install)
* Wrap cmake call: `emcmake cmake`
* Set `-DBUILD_TESTING=OFF -DENABLE_OPT=OFF -DINSTALL_GTEST=OFF`.
* Set `-DBUILD_TESTING=OFF -DENABLE_OPT=OFF`.
* Set `-DENABLE_HLSL=OFF` if HLSL is not needed.
* For a standalone JS/WASM library, turn on `-DENABLE_GLSLANG_JS=ON`.
* For building a minimum-size web subset of core glslang:
+ turn on `-DENABLE_GLSLANG_WEBMIN=ON` (disables HLSL)
+ execute `updateGrammar web` from the glslang subdirectory
(or if using your own scripts, `m4` needs a `-DGLSLANG_WEB` argument)
+ optionally, for GLSL compilation error messages, turn on
`-DENABLE_GLSLANG_WEBMIN_DEVEL=ON`
* To get a fully minimized build, make sure to use `brotli` to compress the .js
and .wasm files
@ -277,7 +261,7 @@ Example:
```sh
emcmake cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_GLSLANG_JS=ON \
-DENABLE_HLSL=OFF -DBUILD_TESTING=OFF -DENABLE_OPT=OFF -DINSTALL_GTEST=OFF ..
-DENABLE_HLSL=OFF -DBUILD_TESTING=OFF -DENABLE_OPT=OFF ..
```
## Building glslang - Using vcpkg
@ -433,9 +417,18 @@ warning/error and other options for controlling compilation.
This interface is located `glslang_c_interface.h` and exposes functionality similar to the C++ interface. The following snippet is a complete example showing how to compile GLSL into SPIR-V 1.5 for Vulkan 1.2.
```cxx
std::vector<uint32_t> compileShaderToSPIRV_Vulkan(glslang_stage_t stage, const char* shaderSource, const char* fileName)
{
```c
#include <glslang/Include/glslang_c_interface.h>
// Required for use of glslang_default_resource
#include <glslang/Public/resource_limits_c.h>
typedef struct SpirVBinary {
uint32_t *words; // SPIR-V words
int size; // number of words in SPIR-V binary
} SpirVBinary;
SpirVBinary compileShaderToSPIRV_Vulkan(glslang_stage_t stage, const char* shaderSource, const char* fileName) {
const glslang_input_t input = {
.language = GLSLANG_SOURCE_GLSL,
.stage = stage,
@ -449,18 +442,22 @@ std::vector<uint32_t> compileShaderToSPIRV_Vulkan(glslang_stage_t stage, const c
.force_default_version_and_profile = false,
.forward_compatible = false,
.messages = GLSLANG_MSG_DEFAULT_BIT,
.resource = reinterpret_cast<const glslang_resource_t*>(&glslang::DefaultTBuiltInResource),
.resource = glslang_default_resource(),
};
glslang_shader_t* shader = glslang_shader_create(&input);
SpirVBinary bin = {
.words = NULL,
.size = 0,
};
if (!glslang_shader_preprocess(shader, &input)) {
printf("GLSL preprocessing failed %s\n", fileName);
printf("%s\n", glslang_shader_get_info_log(shader));
printf("%s\n", glslang_shader_get_info_debug_log(shader));
printf("%s\n", input.code);
glslang_shader_delete(shader);
return std::vector<uint32_t>();
return bin;
}
if (!glslang_shader_parse(shader, &input)) {
@ -469,7 +466,7 @@ std::vector<uint32_t> compileShaderToSPIRV_Vulkan(glslang_stage_t stage, const c
printf("%s\n", glslang_shader_get_info_debug_log(shader));
printf("%s\n", glslang_shader_get_preprocessed_code(shader));
glslang_shader_delete(shader);
return std::vector<uint32_t>();
return bin;
}
glslang_program_t* program = glslang_program_create();
@ -481,13 +478,14 @@ std::vector<uint32_t> compileShaderToSPIRV_Vulkan(glslang_stage_t stage, const c
printf("%s\n", glslang_program_get_info_debug_log(program));
glslang_program_delete(program);
glslang_shader_delete(shader);
return std::vector<uint32_t>();
return bin;
}
glslang_program_SPIRV_generate(program, stage);
std::vector<uint32_t> outShaderModule(glslang_program_SPIRV_get_size(program));
glslang_program_SPIRV_get(program, outShaderModule.data());
bin.size = glslang_program_SPIRV_get_size(program);
bin.words = malloc(bin.size * sizeof(uint32_t));
glslang_program_SPIRV_get(program, bin.words);
const char* spirv_messages = glslang_program_SPIRV_get_messages(program);
if (spirv_messages)
@ -496,7 +494,7 @@ std::vector<uint32_t> compileShaderToSPIRV_Vulkan(glslang_stage_t stage, const c
glslang_program_delete(program);
glslang_shader_delete(shader);
return outShaderModule;
return bin;
}
```
@ -555,4 +553,4 @@ std::vector<uint32_t> compileShaderToSPIRV_Vulkan(glslang_stage_t stage, const c
[bison]: https://www.gnu.org/software/bison/
[googletest]: https://github.com/google/googletest
[bison-gnu-win32]: http://gnuwin32.sourceforge.net/packages/bison.htm
[master-tot-release]: https://github.com/KhronosGroup/glslang/releases/tag/master-tot
[main-tot-release]: https://github.com/KhronosGroup/glslang/releases/tag/main-tot

6
SECURITY.md Normal file
View File

@ -0,0 +1,6 @@
# Security Policy
To report a security issue, please disclose it at [security advisory](https://github.com/KhronosGroup/glslang/security/advisories/new).
This project is maintained by a team of volunteers on a reasonable-effort basis. As
such, please give us at least 90 days to work on a fix before public exposure.

View File

@ -71,8 +71,11 @@ set(SPVREMAP_HEADERS
doc.h)
add_library(SPIRV ${LIB_TYPE} ${SOURCES} ${HEADERS})
set_property(TARGET SPIRV PROPERTY FOLDER glslang)
set_property(TARGET SPIRV PROPERTY POSITION_INDEPENDENT_CODE ON)
set_target_properties(SPIRV PROPERTIES
FOLDER glslang
POSITION_INDEPENDENT_CODE ON
VERSION "${GLSLANG_VERSION}"
SOVERSION "${GLSLANG_VERSION_MAJOR}")
target_include_directories(SPIRV PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/..>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)
@ -81,8 +84,11 @@ glslang_add_build_info_dependency(SPIRV)
if (ENABLE_SPVREMAPPER)
add_library(SPVRemapper ${LIB_TYPE} ${SPVREMAP_SOURCES} ${SPVREMAP_HEADERS})
set_property(TARGET SPVRemapper PROPERTY FOLDER glslang)
set_property(TARGET SPVRemapper PROPERTY POSITION_INDEPENDENT_CODE ON)
set_target_properties(SPVRemapper PROPERTIES
FOLDER glslang
POSITION_INDEPENDENT_CODE ON
VERSION "${GLSLANG_VERSION}"
SOVERSION "${GLSLANG_VERSION_MAJOR}")
endif()
if(WIN32 AND BUILD_SHARED_LIBS)
@ -123,7 +129,7 @@ if(ENABLE_GLSLANG_INSTALL)
message(WARNING \"Using `SPVRemapperTargets.cmake` is deprecated: use `find_package(glslang)` to find glslang CMake targets.\")
if (NOT TARGET glslang::SPVRemapper)
include(\"\${CMAKE_CURRENT_LIST_DIR}/../../${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}/glslang-targets.cmake\")
include(\"${CMAKE_INSTALL_FULL_LIBDIR}/cmake/${PROJECT_NAME}/glslang-targets.cmake\")
endif()
add_library(SPVRemapper ALIAS glslang::SPVRemapper)
@ -135,7 +141,7 @@ if(ENABLE_GLSLANG_INSTALL)
message(WARNING \"Using `SPIRVTargets.cmake` is deprecated: use `find_package(glslang)` to find glslang CMake targets.\")
if (NOT TARGET glslang::SPIRV)
include(\"\${CMAKE_CURRENT_LIST_DIR}/../../${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}/glslang-targets.cmake\")
include(\"${CMAKE_INSTALL_FULL_LIBDIR}/cmake/${PROJECT_NAME}/glslang-targets.cmake\")
endif()
add_library(SPIRV ALIAS glslang::SPIRV)

View File

@ -39,6 +39,7 @@ static const char* const E_SPV_EXT_shader_atomic_float_add = "SPV_EXT_shader_ato
static const char* const E_SPV_EXT_shader_atomic_float16_add = "SPV_EXT_shader_atomic_float16_add";
static const char* const E_SPV_EXT_shader_atomic_float_min_max = "SPV_EXT_shader_atomic_float_min_max";
static const char* const E_SPV_EXT_shader_image_int64 = "SPV_EXT_shader_image_int64";
static const char* const E_SPV_EXT_shader_tile_image = "SPV_EXT_shader_tile_image";
static const char* const E_SPV_EXT_mesh_shader = "SPV_EXT_mesh_shader";
#endif // #ifndef GLSLextEXT_H

View File

@ -54,5 +54,7 @@ static const char* const E_SPV_KHR_workgroup_memory_explicit_layout = "SPV_KHR_w
static const char* const E_SPV_KHR_subgroup_uniform_control_flow = "SPV_KHR_subgroup_uniform_control_flow";
static const char* const E_SPV_KHR_fragment_shader_barycentric = "SPV_KHR_fragment_shader_barycentric";
static const char* const E_SPV_AMD_shader_early_and_late_fragment_tests = "SPV_AMD_shader_early_and_late_fragment_tests";
static const char* const E_SPV_KHR_ray_tracing_position_fetch = "SPV_KHR_ray_tracing_position_fetch";
static const char* const E_SPV_KHR_cooperative_matrix = "SPV_KHR_cooperative_matrix";
#endif // #ifndef GLSLextKHR_H

View File

@ -81,4 +81,10 @@ const char* const E_SPV_NV_cooperative_matrix = "SPV_NV_cooperative_matrix";
//SPV_NV_shader_sm_builtins
const char* const E_SPV_NV_shader_sm_builtins = "SPV_NV_shader_sm_builtins";
//SPV_NV_shader_execution_reorder
const char* const E_SPV_NV_shader_invocation_reorder = "SPV_NV_shader_invocation_reorder";
//SPV_NV_displacement_micromap
const char* const E_SPV_NV_displacement_micromap = "SPV_NV_displacement_micromap";
#endif // #ifndef GLSLextNV_H

41
SPIRV/GLSL.ext.QCOM.h Normal file
View File

@ -0,0 +1,41 @@
/*
** Copyright (c) 2021 The Khronos Group Inc.
**
** Permission is hereby granted, free of charge, to any person obtaining a copy
** of this software and/or associated documentation files (the "Materials"),
** to deal in the Materials without restriction, including without limitation
** the rights to use, copy, modify, merge, publish, distribute, sublicense,
** and/or sell copies of the Materials, and to permit persons to whom the
** Materials are furnished to do so, subject to the following conditions:
**
** The above copyright notice and this permission notice shall be included in
** all copies or substantial portions of the Materials.
**
** MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS KHRONOS
** STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND
** HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/
**
** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
** OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
** FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
** THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
** LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
** FROM,OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS
** IN THE MATERIALS.
*/
#ifndef GLSLextQCOM_H
#define GLSLextQCOM_H
enum BuiltIn;
enum Decoration;
enum Op;
enum Capability;
static const int GLSLextQCOMVersion = 100;
static const int GLSLextQCOMRevision = 1;
//SPV_QCOM_image_processing
const char* const E_SPV_QCOM_image_processing = "SPV_QCOM_image_processing";
#endif // #ifndef GLSLextQCOM_H

1115
SPIRV/GlslangToSpv.cpp Normal file → Executable file

File diff suppressed because it is too large Load Diff

View File

@ -55,7 +55,7 @@ void GlslangToSpv(const glslang::TIntermediate& intermediate, std::vector<unsign
SpvOptions* options = nullptr);
void GlslangToSpv(const glslang::TIntermediate& intermediate, std::vector<unsigned int>& spirv,
spv::SpvBuildLogger* logger, SpvOptions* options = nullptr);
void OutputSpvBin(const std::vector<unsigned int>& spirv, const char* baseName);
void OutputSpvHex(const std::vector<unsigned int>& spirv, const char* baseName, const char* varName);
bool OutputSpvBin(const std::vector<unsigned int>& spirv, const char* baseName);
bool OutputSpvHex(const std::vector<unsigned int>& spirv, const char* baseName, const char* varName);
}

View File

@ -32,8 +32,6 @@
// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
#ifndef GLSLANG_WEB
#include "Logger.h"
#include <algorithm>
@ -68,5 +66,3 @@ std::string SpvBuildLogger::getAllMessages() const {
}
} // end spv namespace
#endif

View File

@ -46,14 +46,6 @@ class SpvBuildLogger {
public:
SpvBuildLogger() {}
#ifdef GLSLANG_WEB
void tbdFunctionality(const std::string& f) { }
void missingFunctionality(const std::string& f) { }
void warning(const std::string& w) { }
void error(const std::string& e) { errors.push_back(e); }
std::string getAllMessages() { return ""; }
#else
// Registers a TBD functionality.
void tbdFunctionality(const std::string& f);
// Registers a missing functionality.
@ -67,7 +59,6 @@ public:
// Returns all messages accumulated in the order of:
// TBD functionalities, missing functionalities, warnings, errors.
std::string getAllMessages() const;
#endif
private:
SpvBuildLogger(const SpvBuildLogger&);

View File

@ -36,10 +36,6 @@
#include "SPVRemapper.h"
#include "doc.h"
#if !defined (use_cpp11)
// ... not supported before C++11
#else // defined (use_cpp11)
#include <algorithm>
#include <cassert>
#include "../glslang/Include/Common.h"
@ -316,14 +312,16 @@ namespace spv {
literal.reserve(16);
do {
spirword_t word = *pos;
// BEGIN @MEWIN - 2024-06-26 - Fixed shadowing warning.
spirword_t posWord = *pos;
for (int i = 0; i < 4; i++) {
char c = word & 0xff;
char c = posWord & 0xff;
if (c == '\0')
return literal;
literal += c;
word >>= 8;
posWord >>= 8;
}
// END @MEWIN
pos++;
} while (true);
}
@ -684,6 +682,7 @@ namespace spv {
case spv::OperandKernelEnqueueFlags:
case spv::OperandKernelProfilingInfo:
case spv::OperandCapability:
case spv::OperandCooperativeMatrixOperands:
++word;
break;
@ -1528,5 +1527,3 @@ namespace spv {
} // namespace SPV
#endif // defined (use_cpp11)

View File

@ -43,12 +43,6 @@
namespace spv {
// MSVC defines __cplusplus as an older value, even when it supports almost all of 11.
// We handle that here by making our own symbol.
#if __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1700)
# define use_cpp11 1
#endif
class spirvbin_base_t
{
public:
@ -74,27 +68,6 @@ public:
} // namespace SPV
#if !defined (use_cpp11)
#include <cstdio>
#include <cstdint>
namespace spv {
class spirvbin_t : public spirvbin_base_t
{
public:
spirvbin_t(int /*verbose = 0*/) { }
void remap(std::vector<std::uint32_t>& /*spv*/, unsigned int /*opts = 0*/)
{
printf("Tool not compiled for C++11, which is required for SPIR-V remapping.\n");
exit(5);
}
};
} // namespace SPV
#else // defined (use_cpp11)
#include <functional>
#include <cstdint>
#include <unordered_map>
@ -308,5 +281,4 @@ private:
} // namespace SPV
#endif // defined (use_cpp11)
#endif // SPIRVREMAPPER_H

View File

@ -46,10 +46,7 @@
#include <algorithm>
#include "SpvBuilder.h"
#ifndef GLSLANG_WEB
#include "hex_float.h"
#endif
#ifndef _WIN32
#include <cstdio>
@ -144,6 +141,7 @@ void Builder::addLine(Id fileName, int lineNum, int column)
void Builder::addDebugScopeAndLine(Id fileName, int lineNum, int column)
{
assert(!currentDebugScopeId.empty());
if (currentDebugScopeId.top() != lastDebugScopeId) {
spv::Id resultId = getUniqueId();
Instruction* scopeInst = new Instruction(resultId, makeVoidType(), OpExtInst);
@ -282,11 +280,6 @@ Id Builder::makePointerFromForwardPointer(StorageClass storageClass, Id forwardP
Id Builder::makeIntegerType(int width, bool hasSign)
{
#ifdef GLSLANG_WEB
assert(width == 32);
width = 32;
#endif
// try to find it
Instruction* type;
for (int t = 0; t < (int)groupedTypes[OpTypeInt].size(); ++t) {
@ -328,11 +321,6 @@ Id Builder::makeIntegerType(int width, bool hasSign)
Id Builder::makeFloatType(int width)
{
#ifdef GLSLANG_WEB
assert(width == 32);
width = 32;
#endif
// try to find it
Instruction* type;
for (int t = 0; t < (int)groupedTypes[OpTypeFloat].size(); ++t) {
@ -480,15 +468,41 @@ Id Builder::makeMatrixType(Id component, int cols, int rows)
return type->getResultId();
}
Id Builder::makeCooperativeMatrixType(Id component, Id scope, Id rows, Id cols)
Id Builder::makeCooperativeMatrixTypeKHR(Id component, Id scope, Id rows, Id cols, Id use)
{
// try to find it
Instruction* type;
for (int t = 0; t < (int)groupedTypes[OpTypeCooperativeMatrixKHR].size(); ++t) {
type = groupedTypes[OpTypeCooperativeMatrixKHR][t];
if (type->getIdOperand(0) == component &&
type->getIdOperand(1) == scope &&
type->getIdOperand(2) == rows &&
type->getIdOperand(3) == cols &&
type->getIdOperand(4) == use)
return type->getResultId();
}
// not found, make it
type = new Instruction(getUniqueId(), NoType, OpTypeCooperativeMatrixKHR);
type->addIdOperand(component);
type->addIdOperand(scope);
type->addIdOperand(rows);
type->addIdOperand(cols);
type->addIdOperand(use);
groupedTypes[OpTypeCooperativeMatrixKHR].push_back(type);
constantsTypesGlobals.push_back(std::unique_ptr<Instruction>(type));
module.mapInstruction(type);
return type->getResultId();
}
Id Builder::makeCooperativeMatrixTypeNV(Id component, Id scope, Id rows, Id cols)
{
// try to find it
Instruction* type;
for (int t = 0; t < (int)groupedTypes[OpTypeCooperativeMatrixNV].size(); ++t) {
type = groupedTypes[OpTypeCooperativeMatrixNV][t];
if (type->getIdOperand(0) == component &&
type->getIdOperand(1) == scope &&
type->getIdOperand(2) == rows &&
if (type->getIdOperand(0) == component && type->getIdOperand(1) == scope && type->getIdOperand(2) == rows &&
type->getIdOperand(3) == cols)
return type->getResultId();
}
@ -506,6 +520,17 @@ Id Builder::makeCooperativeMatrixType(Id component, Id scope, Id rows, Id cols)
return type->getResultId();
}
Id Builder::makeCooperativeMatrixTypeWithSameShape(Id component, Id otherType)
{
Instruction* instr = module.getInstruction(otherType);
if (instr->getOpCode() == OpTypeCooperativeMatrixNV) {
return makeCooperativeMatrixTypeNV(component, instr->getIdOperand(1), instr->getIdOperand(2), instr->getIdOperand(3));
} else {
assert(instr->getOpCode() == OpTypeCooperativeMatrixKHR);
return makeCooperativeMatrixTypeKHR(component, instr->getIdOperand(1), instr->getIdOperand(2), instr->getIdOperand(3), instr->getIdOperand(4));
}
}
Id Builder::makeGenericType(spv::Op opcode, std::vector<spv::IdImmediate>& operands)
{
// try to find it
@ -650,9 +675,13 @@ Id Builder::makeDebugFunctionType(Id returnType, const std::vector<Id>& paramTyp
type->addIdOperand(makeUintConstant(NonSemanticShaderDebugInfo100FlagIsPublic));
type->addIdOperand(debugId[returnType]);
for (auto const paramType : paramTypes) {
assert(isPointerType(paramType) || isArrayType(paramType));
if (isPointerType(paramType) || isArrayType(paramType)) {
type->addIdOperand(debugId[getContainedTypeId(paramType)]);
}
else {
type->addIdOperand(debugId[paramType]);
}
}
constantsTypesGlobals.push_back(std::unique_ptr<Instruction>(type));
module.mapInstruction(type);
return typeId;
@ -691,7 +720,6 @@ Id Builder::makeImageType(Id sampledType, Dim dim, bool depth, bool arrayed, boo
constantsTypesGlobals.push_back(std::unique_ptr<Instruction>(type));
module.mapInstruction(type);
#ifndef GLSLANG_WEB
// deal with capabilities
switch (dim) {
case DimBuffer:
@ -737,7 +765,6 @@ Id Builder::makeImageType(Id sampledType, Dim dim, bool depth, bool arrayed, boo
addCapability(CapabilityImageMSArray);
}
}
#endif
if (emitNonSemanticShaderDebugInfo)
{
@ -832,13 +859,21 @@ Id Builder::makeBoolDebugType(int const size)
Id Builder::makeIntegerDebugType(int const width, bool const hasSign)
{
const char* typeName = nullptr;
switch (width) {
case 8: typeName = hasSign ? "int8_t" : "uint8_t"; break;
case 16: typeName = hasSign ? "int16_t" : "uint16_t"; break;
case 64: typeName = hasSign ? "int64_t" : "uint64_t"; break;
default: typeName = hasSign ? "int" : "uint";
}
auto nameId = getStringId(typeName);
// try to find it
Instruction* type;
for (int t = 0; t < (int)groupedDebugTypes[NonSemanticShaderDebugInfo100DebugTypeBasic].size(); ++t) {
type = groupedDebugTypes[NonSemanticShaderDebugInfo100DebugTypeBasic][t];
if (type->getIdOperand(0) == (hasSign ? getStringId("int") : getStringId("uint")) &&
if (type->getIdOperand(0) == nameId &&
type->getIdOperand(1) == static_cast<unsigned int>(width) &&
type->getIdOperand(2) == (hasSign ? NonSemanticShaderDebugInfo100Signed : NonSemanticShaderDebugInfo100Unsigned))
type->getIdOperand(2) == static_cast<unsigned int>(hasSign ? NonSemanticShaderDebugInfo100Signed : NonSemanticShaderDebugInfo100Unsigned)) // @MEWIN - 2024-06-26 - Fixed comparison warning.
return type->getResultId();
}
@ -846,11 +881,7 @@ Id Builder::makeIntegerDebugType(int const width, bool const hasSign)
type = new Instruction(getUniqueId(), makeVoidType(), OpExtInst);
type->addIdOperand(nonSemanticShaderDebugInfo);
type->addImmediateOperand(NonSemanticShaderDebugInfo100DebugTypeBasic);
if(hasSign == true) {
type->addIdOperand(getStringId("int")); // name id
} else {
type->addIdOperand(getStringId("uint")); // name id
}
type->addIdOperand(nameId); // name id
type->addIdOperand(makeUintConstant(width)); // size id
if(hasSign == true) {
type->addIdOperand(makeUintConstant(NonSemanticShaderDebugInfo100Signed)); // encoding id
@ -868,11 +899,18 @@ Id Builder::makeIntegerDebugType(int const width, bool const hasSign)
Id Builder::makeFloatDebugType(int const width)
{
const char* typeName = nullptr;
switch (width) {
case 16: typeName = "float16_t"; break;
case 64: typeName = "double"; break;
default: typeName = "float"; break;
}
auto nameId = getStringId(typeName);
// try to find it
Instruction* type;
for (int t = 0; t < (int)groupedDebugTypes[NonSemanticShaderDebugInfo100DebugTypeBasic].size(); ++t) {
type = groupedDebugTypes[NonSemanticShaderDebugInfo100DebugTypeBasic][t];
if (type->getIdOperand(0) == getStringId("float") &&
if (type->getIdOperand(0) == nameId &&
type->getIdOperand(1) == static_cast<unsigned int>(width) &&
type->getIdOperand(2) == NonSemanticShaderDebugInfo100Float)
return type->getResultId();
@ -882,7 +920,7 @@ Id Builder::makeFloatDebugType(int const width)
type = new Instruction(getUniqueId(), makeVoidType(), OpExtInst);
type->addIdOperand(nonSemanticShaderDebugInfo);
type->addImmediateOperand(NonSemanticShaderDebugInfo100DebugTypeBasic);
type->addIdOperand(getStringId("float")); // name id
type->addIdOperand(nameId); // name id
type->addIdOperand(makeUintConstant(width)); // size id
type->addIdOperand(makeUintConstant(NonSemanticShaderDebugInfo100Float)); // encoding id
type->addIdOperand(makeUintConstant(NonSemanticShaderDebugInfo100None)); // flags id
@ -929,7 +967,7 @@ Id Builder::makeArrayDebugType(Id const baseType, Id const componentCount)
Id Builder::makeVectorDebugType(Id const baseType, int const componentCount)
{
return makeSequentialDebugType(baseType, makeUintConstant(componentCount), NonSemanticShaderDebugInfo100DebugTypeVector);;
return makeSequentialDebugType(baseType, makeUintConstant(componentCount), NonSemanticShaderDebugInfo100DebugTypeVector);
}
Id Builder::makeMatrixDebugType(Id const vectorType, int const vectorCount, bool columnMajor)
@ -991,6 +1029,9 @@ Id Builder::makeCompositeDebugType(std::vector<Id> const& memberTypes, char cons
for(auto const memberType : memberTypes) {
assert(debugTypeLocs.find(memberType) != debugTypeLocs.end());
// There _should_ be debug types for all the member types but currently buffer references
// do not have member debug info generated.
if (debugId[memberType])
memberDebugTypes.emplace_back(makeMemberDebugType(memberType, debugTypeLocs[memberType]));
// TODO: Need to rethink this method of passing location information.
@ -1067,6 +1108,12 @@ Id Builder::makeDebugCompilationUnit() {
constantsTypesGlobals.push_back(std::unique_ptr<Instruction>(sourceInst));
module.mapInstruction(sourceInst);
nonSemanticShaderCompilationUnitId = resultId;
// We can reasonably assume that makeDebugCompilationUnit will be called before any of
// debug-scope stack. Function scopes and lexical scopes will occur afterward.
assert(currentDebugScopeId.empty());
currentDebugScopeId.push(nonSemanticShaderCompilationUnitId);
return resultId;
}
@ -1096,6 +1143,8 @@ Id Builder::createDebugGlobalVariable(Id const type, char const*const name, Id c
Id Builder::createDebugLocalVariable(Id type, char const*const name, size_t const argNumber)
{
assert(name != nullptr);
assert(!currentDebugScopeId.empty());
Instruction* inst = new Instruction(getUniqueId(), makeVoidType(), OpExtInst);
inst->addIdOperand(nonSemanticShaderDebugInfo);
inst->addImmediateOperand(NonSemanticShaderDebugInfo100DebugLocalVariable);
@ -1107,7 +1156,7 @@ Id Builder::createDebugLocalVariable(Id type, char const*const name, size_t cons
inst->addIdOperand(currentDebugScopeId.top()); // scope id
inst->addIdOperand(makeUintConstant(NonSemanticShaderDebugInfo100FlagIsLocal)); // flags id
if(argNumber != 0) {
inst->addIdOperand(makeUintConstant(argNumber));
inst->addIdOperand(makeUintConstant(static_cast<unsigned>(argNumber))); // @MEWIN - 2024-06-26 - Fixed cast warning.
}
constantsTypesGlobals.push_back(std::unique_ptr<Instruction>(inst));
@ -1146,7 +1195,6 @@ Id Builder::makeDebugDeclare(Id const debugLocalVariable, Id const localVariable
return inst->getResultId();
}
#ifndef GLSLANG_WEB
Id Builder::makeAccelerationStructureType()
{
Instruction *type;
@ -1176,7 +1224,21 @@ Id Builder::makeRayQueryType()
return type->getResultId();
}
#endif
Id Builder::makeHitObjectNVType()
{
Instruction *type;
if (groupedTypes[OpTypeHitObjectNV].size() == 0) {
type = new Instruction(getUniqueId(), NoType, OpTypeHitObjectNV);
groupedTypes[OpTypeHitObjectNV].push_back(type);
constantsTypesGlobals.push_back(std::unique_ptr<Instruction>(type));
module.mapInstruction(type);
} else {
type = groupedTypes[OpTypeHitObjectNV].back();
}
return type->getResultId();
}
Id Builder::getDerefTypeId(Id resultId) const
{
@ -1226,6 +1288,7 @@ int Builder::getNumTypeConstituents(Id typeId) const
}
case OpTypeStruct:
return instr->getNumOperands();
case OpTypeCooperativeMatrixKHR:
case OpTypeCooperativeMatrixNV:
// has only one constituent when used with OpCompositeConstruct.
return 1;
@ -1275,6 +1338,7 @@ Id Builder::getContainedTypeId(Id typeId, int member) const
case OpTypeMatrix:
case OpTypeArray:
case OpTypeRuntimeArray:
case OpTypeCooperativeMatrixKHR:
case OpTypeCooperativeMatrixNV:
return instr->getIdOperand(0);
case OpTypePointer:
@ -1345,7 +1409,7 @@ bool Builder::containsType(Id typeId, spv::Op typeOp, unsigned int width) const
}
// return true if the type is a pointer to PhysicalStorageBufferEXT or an
// array of such pointers. These require restrict/aliased decorations.
// contains such a pointer. These require restrict/aliased decorations.
bool Builder::containsPhysicalStorageBufferOrArray(Id typeId) const
{
const Instruction& instr = *module.getInstruction(typeId);
@ -1357,6 +1421,12 @@ bool Builder::containsPhysicalStorageBufferOrArray(Id typeId) const
return getTypeStorageClass(typeId) == StorageClassPhysicalStorageBufferEXT;
case OpTypeArray:
return containsPhysicalStorageBufferOrArray(getContainedTypeId(typeId));
case OpTypeStruct:
for (int m = 0; m < instr.getNumOperands(); ++m) {
if (containsPhysicalStorageBufferOrArray(instr.getIdOperand(m)))
return true;
}
return false;
default:
return false;
}
@ -1570,10 +1640,6 @@ Id Builder::makeFloatConstant(float f, bool specConstant)
Id Builder::makeDoubleConstant(double d, bool specConstant)
{
#ifdef GLSLANG_WEB
assert(0);
return NoResult;
#else
Op opcode = specConstant ? OpSpecConstant : OpConstant;
Id typeId = makeFloatType(64);
union { double db; unsigned long long ull; } u;
@ -1598,15 +1664,10 @@ Id Builder::makeDoubleConstant(double d, bool specConstant)
module.mapInstruction(c);
return c->getResultId();
#endif
}
Id Builder::makeFloat16Constant(float f16, bool specConstant)
{
#ifdef GLSLANG_WEB
assert(0);
return NoResult;
#else
Op opcode = specConstant ? OpSpecConstant : OpConstant;
Id typeId = makeFloatType(16);
@ -1631,17 +1692,11 @@ Id Builder::makeFloat16Constant(float f16, bool specConstant)
module.mapInstruction(c);
return c->getResultId();
#endif
}
Id Builder::makeFpConstant(Id type, double d, bool specConstant)
{
#ifdef GLSLANG_WEB
const int width = 32;
assert(width == getScalarTypeWidth(type));
#else
const int width = getScalarTypeWidth(type);
#endif
assert(isFloatType(type));
@ -1735,6 +1790,7 @@ Id Builder::makeCompositeConstant(Id typeId, const std::vector<Id>& members, boo
case OpTypeVector:
case OpTypeArray:
case OpTypeMatrix:
case OpTypeCooperativeMatrixKHR:
case OpTypeCooperativeMatrixNV:
if (! specConstant) {
Id existing = findCompositeConstant(typeClass, typeId, members);
@ -1782,6 +1838,10 @@ Instruction* Builder::addEntryPoint(ExecutionModel model, Function* function, co
// Currently relying on the fact that all 'value' of interest are small non-negative values.
void Builder::addExecutionMode(Function* entryPoint, ExecutionMode mode, int value1, int value2, int value3)
{
// entryPoint can be null if we are in compile-only mode
if (!entryPoint)
return;
Instruction* instr = new Instruction(OpExecutionMode);
instr->addIdOperand(entryPoint->getId());
instr->addImmediateOperand(mode);
@ -1797,6 +1857,10 @@ void Builder::addExecutionMode(Function* entryPoint, ExecutionMode mode, int val
void Builder::addExecutionMode(Function* entryPoint, ExecutionMode mode, const std::vector<unsigned>& literals)
{
// entryPoint can be null if we are in compile-only mode
if (!entryPoint)
return;
Instruction* instr = new Instruction(OpExecutionMode);
instr->addIdOperand(entryPoint->getId());
instr->addImmediateOperand(mode);
@ -1808,6 +1872,10 @@ void Builder::addExecutionMode(Function* entryPoint, ExecutionMode mode, const s
void Builder::addExecutionModeId(Function* entryPoint, ExecutionMode mode, const std::vector<Id>& operandIds)
{
// entryPoint can be null if we are in compile-only mode
if (!entryPoint)
return;
Instruction* instr = new Instruction(OpExecutionModeId);
instr->addIdOperand(entryPoint->getId());
instr->addImmediateOperand(mode);
@ -1877,7 +1945,7 @@ void Builder::addDecoration(Id id, Decoration decoration, const std::vector<unsi
decorations.push_back(std::unique_ptr<Instruction>(dec));
}
void Builder::addDecoration(Id id, Decoration decoration, const std::vector<const char*>& strings)
void Builder::addDecoration(Id id, Decoration decoration, const std::vector<const char*>& stringOps) // @MEWIN - 2024-06-26 - Fixed shadowing warning.
{
if (decoration == spv::DecorationMax)
return;
@ -1885,8 +1953,20 @@ void Builder::addDecoration(Id id, Decoration decoration, const std::vector<cons
Instruction* dec = new Instruction(OpDecorateString);
dec->addIdOperand(id);
dec->addImmediateOperand(decoration);
for (auto string : strings)
dec->addStringOperand(string);
// BEGIN @MEWIN - 2024-06-26 - Fixed shadowing warning.
for (auto stringOp : stringOps)
dec->addStringOperand(stringOp);
// END @MEWIN
decorations.push_back(std::unique_ptr<Instruction>(dec));
}
void Builder::addLinkageDecoration(Id id, const char* name, spv::LinkageType linkType) {
Instruction* dec = new Instruction(OpDecorate);
dec->addIdOperand(id);
dec->addImmediateOperand(spv::DecorationLinkageAttributes);
dec->addStringOperand(name);
dec->addImmediateOperand(linkType);
decorations.push_back(std::unique_ptr<Instruction>(dec));
}
@ -1963,7 +2043,7 @@ void Builder::addMemberDecoration(Id id, unsigned int member, Decoration decorat
decorations.push_back(std::unique_ptr<Instruction>(dec));
}
void Builder::addMemberDecoration(Id id, unsigned int member, Decoration decoration, const std::vector<const char*>& strings)
void Builder::addMemberDecoration(Id id, unsigned int member, Decoration decoration, const std::vector<const char*>& stringOps) // @MEWIN - 2024-06-26 - Fixed shadowing warning.
{
if (decoration == spv::DecorationMax)
return;
@ -1972,8 +2052,10 @@ void Builder::addMemberDecoration(Id id, unsigned int member, Decoration decorat
dec->addIdOperand(id);
dec->addImmediateOperand(member);
dec->addImmediateOperand(decoration);
for (auto string : strings)
dec->addStringOperand(string);
// BEGIN @MEWIN - 2024-06-26 - Fixed shadowing warning.
for (auto stringOp : stringOps)
dec->addStringOperand(stringOp);
// END @MEWIN
decorations.push_back(std::unique_ptr<Instruction>(dec));
}
@ -1986,7 +2068,7 @@ Function* Builder::makeEntryPoint(const char* entryPoint)
Block* entry;
std::vector<Id> paramsTypes;
std::vector<char const*> paramNames;
std::vector<std::vector<Decoration>> decorations;
std::vector<std::vector<Decoration>> decos; // @MEWIN - 2024-06-26 - Fixed shadowing warning.
auto const returnType = makeVoidType();
@ -1995,7 +2077,7 @@ Function* Builder::makeEntryPoint(const char* entryPoint)
emitNonSemanticShaderDebugInfo = false;
}
entryPointFunction = makeFunctionEntry(NoPrecision, returnType, entryPoint, paramsTypes, paramNames, decorations, &entry);
entryPointFunction = makeFunctionEntry(NoPrecision, returnType, entryPoint, LinkageTypeMax, paramsTypes, paramNames, decos, &entry); // @MEWIN - 2024-06-26 - Fixed shadowing warning.
emitNonSemanticShaderDebugInfo = restoreNonSemanticShaderDebugInfo;
@ -2003,23 +2085,25 @@ Function* Builder::makeEntryPoint(const char* entryPoint)
}
// Comments in header
Function* Builder::makeFunctionEntry(Decoration precision, Id returnType, const char* name,
Function* Builder::makeFunctionEntry(Decoration precision, Id returnType, const char* name, LinkageType linkType,
const std::vector<Id>& paramTypes, const std::vector<char const*>& paramNames,
const std::vector<std::vector<Decoration>>& decorations, Block **entry)
const std::vector<std::vector<Decoration>>& decos, Block **entry) // @MEWIN - 2024-06-26 - Fixed shadowing warning.
{
// Make the function and initial instructions in it
Id typeId = makeFunctionType(returnType, paramTypes);
Id firstParamId = paramTypes.size() == 0 ? 0 : getUniqueIds((int)paramTypes.size());
Id funcId = getUniqueId();
Function* function = new Function(funcId, returnType, typeId, firstParamId, module);
Function* function = new Function(funcId, returnType, typeId, firstParamId, linkType, name, module);
// Set up the precisions
setPrecision(function->getId(), precision);
function->setReturnPrecision(precision);
for (unsigned p = 0; p < (unsigned)decorations.size(); ++p) {
for (int d = 0; d < (int)decorations[p].size(); ++d) {
addDecoration(firstParamId + p, decorations[p][d]);
function->addParamPrecision(p, decorations[p][d]);
// BEGIN @MEWIN - 2024-06-26 - Fixed shadowing warning.
for (unsigned p = 0; p < (unsigned)decos.size(); ++p) {
for (int d = 0; d < (int)decos[p].size(); ++d) {
addDecoration(firstParamId + p, decos[p][d]);
function->addParamPrecision(p, decos[p][d]);
// END @MEWIN
}
}
@ -2047,14 +2131,19 @@ Function* Builder::makeFunctionEntry(Decoration precision, Id returnType, const
assert(paramTypes.size() == paramNames.size());
for(size_t p = 0; p < paramTypes.size(); ++p)
{
auto const& paramType = paramTypes[p];
assert(isPointerType(paramType) || isArrayType(paramType));
assert(debugId[getContainedTypeId(paramType)] != 0);
auto getParamTypeId = [this](Id const& typeId) {
if (isPointerType(typeId) || isArrayType(typeId)) {
return getContainedTypeId(typeId);
}
else {
return typeId;
}
};
auto const& paramName = paramNames[p];
auto const debugLocalVariableId = createDebugLocalVariable(debugId[getContainedTypeId(paramType)], paramName, p+1);
debugId[firstParamId + p] = debugLocalVariableId;
auto const debugLocalVariableId = createDebugLocalVariable(debugId[getParamTypeId(paramTypes[p])], paramName, p+1);
debugId[static_cast<unsigned>(firstParamId + p)] = debugLocalVariableId; // @MEWIN - 2024-06-26 - Fixed cast warning.
makeDebugDeclare(debugLocalVariableId, firstParamId + p);
makeDebugDeclare(debugLocalVariableId, static_cast<spv::Id>(firstParamId + p)); // @MEWIN - 2024-06-26 - Fixed cast warning.
}
}
@ -2070,7 +2159,8 @@ Function* Builder::makeFunctionEntry(Decoration precision, Id returnType, const
return function;
}
Id Builder::makeDebugFunction(Function* function, Id nameId, Id funcTypeId) {
Id Builder::makeDebugFunction([[maybe_unused]] Function* function, Id nameId, Id funcTypeId)
{
assert(function != nullptr);
assert(nameId != 0);
assert(funcTypeId != 0);
@ -2095,6 +2185,8 @@ Id Builder::makeDebugFunction(Function* function, Id nameId, Id funcTypeId) {
}
Id Builder::makeDebugLexicalBlock(uint32_t line) {
assert(!currentDebugScopeId.empty());
Id lexId = getUniqueId();
auto lex = new Instruction(lexId, makeVoidType(), OpExtInst);
lex->addIdOperand(nonSemanticShaderDebugInfo);
@ -2173,6 +2265,12 @@ void Builder::enterFunction(Function const* function)
defInst->addIdOperand(funcId);
buildPoint->addInstruction(std::unique_ptr<Instruction>(defInst));
}
if (auto linkType = function->getLinkType(); linkType != LinkageTypeMax) {
Id funcId = function->getFuncId();
addCapability(CapabilityLinkage);
addLinkageDecoration(funcId, function->getExportName(), linkType);
}
}
// Comments in header
@ -2363,7 +2461,24 @@ Id Builder::createArrayLength(Id base, unsigned int member)
return length->getResultId();
}
Id Builder::createCooperativeMatrixLength(Id type)
Id Builder::createCooperativeMatrixLengthKHR(Id type)
{
spv::Id intType = makeUintType(32);
// Generate code for spec constants if in spec constant operation
// generation mode.
if (generatingOpCodeForSpecConst) {
return createSpecConstantOp(OpCooperativeMatrixLengthKHR, intType, std::vector<Id>(1, type), std::vector<Id>());
}
Instruction* length = new Instruction(getUniqueId(), intType, OpCooperativeMatrixLengthKHR);
length->addIdOperand(type);
buildPoint->addInstruction(std::unique_ptr<Instruction>(length));
return length->getResultId();
}
Id Builder::createCooperativeMatrixLengthNV(Id type)
{
spv::Id intType = makeUintType(32);
@ -2734,52 +2849,47 @@ Id Builder::createBuiltinCall(Id resultType, Id builtins, int entryPoint, const
Id Builder::createTextureCall(Decoration precision, Id resultType, bool sparse, bool fetch, bool proj, bool gather,
bool noImplicitLod, const TextureParameters& parameters, ImageOperandsMask signExtensionMask)
{
static const int maxTextureArgs = 10;
Id texArgs[maxTextureArgs] = {};
std::vector<Id> texArgs;
//
// Set up the fixed arguments
//
int numArgs = 0;
bool explicitLod = false;
texArgs[numArgs++] = parameters.sampler;
texArgs[numArgs++] = parameters.coords;
texArgs.push_back(parameters.sampler);
texArgs.push_back(parameters.coords);
if (parameters.Dref != NoResult)
texArgs[numArgs++] = parameters.Dref;
texArgs.push_back(parameters.Dref);
if (parameters.component != NoResult)
texArgs[numArgs++] = parameters.component;
texArgs.push_back(parameters.component);
#ifndef GLSLANG_WEB
if (parameters.granularity != NoResult)
texArgs[numArgs++] = parameters.granularity;
texArgs.push_back(parameters.granularity);
if (parameters.coarse != NoResult)
texArgs[numArgs++] = parameters.coarse;
#endif
texArgs.push_back(parameters.coarse);
//
// Set up the optional arguments
//
int optArgNum = numArgs; // track which operand, if it exists, is the mask of optional arguments
++numArgs; // speculatively make room for the mask operand
size_t optArgNum = texArgs.size(); // the position of the mask for the optional arguments, if any.
ImageOperandsMask mask = ImageOperandsMaskNone; // the mask operand
if (parameters.bias) {
mask = (ImageOperandsMask)(mask | ImageOperandsBiasMask);
texArgs[numArgs++] = parameters.bias;
texArgs.push_back(parameters.bias);
}
if (parameters.lod) {
mask = (ImageOperandsMask)(mask | ImageOperandsLodMask);
texArgs[numArgs++] = parameters.lod;
texArgs.push_back(parameters.lod);
explicitLod = true;
} else if (parameters.gradX) {
mask = (ImageOperandsMask)(mask | ImageOperandsGradMask);
texArgs[numArgs++] = parameters.gradX;
texArgs[numArgs++] = parameters.gradY;
texArgs.push_back(parameters.gradX);
texArgs.push_back(parameters.gradY);
explicitLod = true;
} else if (noImplicitLod && ! fetch && ! gather) {
// have to explicitly use lod of 0 if not allowed to have them be implicit, and
// we would otherwise be about to issue an implicit instruction
mask = (ImageOperandsMask)(mask | ImageOperandsLodMask);
texArgs[numArgs++] = makeFloatConstant(0.0);
texArgs.push_back(makeFloatConstant(0.0));
explicitLod = true;
}
if (parameters.offset) {
@ -2789,24 +2899,23 @@ Id Builder::createTextureCall(Decoration precision, Id resultType, bool sparse,
addCapability(CapabilityImageGatherExtended);
mask = (ImageOperandsMask)(mask | ImageOperandsOffsetMask);
}
texArgs[numArgs++] = parameters.offset;
texArgs.push_back(parameters.offset);
}
if (parameters.offsets) {
addCapability(CapabilityImageGatherExtended);
mask = (ImageOperandsMask)(mask | ImageOperandsConstOffsetsMask);
texArgs[numArgs++] = parameters.offsets;
texArgs.push_back(parameters.offsets);
}
#ifndef GLSLANG_WEB
if (parameters.sample) {
mask = (ImageOperandsMask)(mask | ImageOperandsSampleMask);
texArgs[numArgs++] = parameters.sample;
texArgs.push_back(parameters.sample);
}
if (parameters.lodClamp) {
// capability if this bit is used
addCapability(CapabilityMinLod);
mask = (ImageOperandsMask)(mask | ImageOperandsMinLodMask);
texArgs[numArgs++] = parameters.lodClamp;
texArgs.push_back(parameters.lodClamp);
}
if (parameters.nonprivate) {
mask = mask | ImageOperandsNonPrivateTexelKHRMask;
@ -2814,12 +2923,10 @@ Id Builder::createTextureCall(Decoration precision, Id resultType, bool sparse,
if (parameters.volatil) {
mask = mask | ImageOperandsVolatileTexelKHRMask;
}
#endif
mask = mask | signExtensionMask;
if (mask == ImageOperandsMaskNone)
--numArgs; // undo speculative reservation for the mask argument
else
texArgs[optArgNum] = mask;
// insert the operand for the mask, if any bits were set.
if (mask != ImageOperandsMaskNone)
texArgs.insert(texArgs.begin() + optArgNum, mask);
//
// Set up the instruction
@ -2830,7 +2937,6 @@ Id Builder::createTextureCall(Decoration precision, Id resultType, bool sparse,
opCode = OpImageSparseFetch;
else
opCode = OpImageFetch;
#ifndef GLSLANG_WEB
} else if (parameters.granularity && parameters.coarse) {
opCode = OpImageSampleFootprintNV;
} else if (gather) {
@ -2844,7 +2950,6 @@ Id Builder::createTextureCall(Decoration precision, Id resultType, bool sparse,
opCode = OpImageSparseGather;
else
opCode = OpImageGather;
#endif
} else if (explicitLod) {
if (parameters.Dref) {
if (proj)
@ -2923,11 +3028,11 @@ Id Builder::createTextureCall(Decoration precision, Id resultType, bool sparse,
// Build the SPIR-V instruction
Instruction* textureInst = new Instruction(getUniqueId(), resultType, opCode);
for (int op = 0; op < optArgNum; ++op)
for (size_t op = 0; op < optArgNum; ++op)
textureInst->addIdOperand(texArgs[op]);
if (optArgNum < numArgs)
if (optArgNum < texArgs.size())
textureInst->addImmediateOperand(texArgs[optArgNum]);
for (int op = optArgNum + 1; op < numArgs; ++op)
for (size_t op = optArgNum + 1; op < texArgs.size(); ++op)
textureInst->addIdOperand(texArgs[op]);
setPrecision(textureInst->getResultId(), precision);
buildPoint->addInstruction(std::unique_ptr<Instruction>(textureInst));
@ -3207,12 +3312,7 @@ Id Builder::createMatrixConstructor(Decoration precision, const std::vector<Id>&
int numRows = getTypeNumRows(resultTypeId);
Instruction* instr = module.getInstruction(componentTypeId);
#ifdef GLSLANG_WEB
const unsigned bitCount = 32;
assert(bitCount == instr->getImmediateOperand(0));
#else
const unsigned bitCount = instr->getImmediateOperand(0);
#endif
// Optimize matrix constructed from a bigger matrix
if (isMatrix(sources[0]) && getNumColumns(sources[0]) >= numCols && getNumRows(sources[0]) >= numRows) {
@ -4033,4 +4133,4 @@ void Builder::dumpModuleProcesses(std::vector<unsigned int>& out) const
}
}
}; // end spv namespace
} // end spv namespace

View File

@ -203,7 +203,9 @@ public:
Id makeImageType(Id sampledType, Dim, bool depth, bool arrayed, bool ms, unsigned sampled, ImageFormat format);
Id makeSamplerType();
Id makeSampledImageType(Id imageType);
Id makeCooperativeMatrixType(Id component, Id scope, Id rows, Id cols);
Id makeCooperativeMatrixTypeKHR(Id component, Id scope, Id rows, Id cols, Id use);
Id makeCooperativeMatrixTypeNV(Id component, Id scope, Id rows, Id cols);
Id makeCooperativeMatrixTypeWithSameShape(Id component, Id otherType);
Id makeGenericType(spv::Op opcode, std::vector<spv::IdImmediate>& operands);
// SPIR-V NonSemantic Shader DebugInfo Instructions
@ -240,6 +242,8 @@ public:
Id makeAccelerationStructureType();
// rayQueryEXT type
Id makeRayQueryType();
// hitObjectNV type
Id makeHitObjectNVType();
// For querying about types.
Id getTypeId(Id resultId) const { return module.getTypeId(resultId); }
@ -257,6 +261,7 @@ public:
ImageFormat getImageTypeFormat(Id typeId) const
{ return (ImageFormat)module.getInstruction(typeId)->getImmediateOperand(6); }
Id getResultingAccessChainType() const;
Id getIdOperand(Id resultId, int idx) { return module.getInstruction(resultId)->getIdOperand(idx); }
bool isPointer(Id resultId) const { return isPointerType(getTypeId(resultId)); }
bool isScalar(Id resultId) const { return isScalarType(getTypeId(resultId)); }
@ -281,11 +286,10 @@ public:
bool isMatrixType(Id typeId) const { return getTypeClass(typeId) == OpTypeMatrix; }
bool isStructType(Id typeId) const { return getTypeClass(typeId) == OpTypeStruct; }
bool isArrayType(Id typeId) const { return getTypeClass(typeId) == OpTypeArray; }
#ifdef GLSLANG_WEB
bool isCooperativeMatrixType(Id typeId)const { return false; }
#else
bool isCooperativeMatrixType(Id typeId)const { return getTypeClass(typeId) == OpTypeCooperativeMatrixNV; }
#endif
bool isCooperativeMatrixType(Id typeId)const
{
return getTypeClass(typeId) == OpTypeCooperativeMatrixKHR || getTypeClass(typeId) == OpTypeCooperativeMatrixNV;
}
bool isAggregateType(Id typeId) const
{ return isArrayType(typeId) || isStructType(typeId) || isCooperativeMatrixType(typeId); }
bool isImageType(Id typeId) const { return getTypeClass(typeId) == OpTypeImage; }
@ -389,6 +393,7 @@ public:
void addDecoration(Id, Decoration, const char*);
void addDecoration(Id, Decoration, const std::vector<unsigned>& literals);
void addDecoration(Id, Decoration, const std::vector<const char*>& strings);
void addLinkageDecoration(Id id, const char* name, spv::LinkageType linkType);
void addDecorationId(Id id, Decoration, Id idDecoration);
void addDecorationId(Id id, Decoration, const std::vector<Id>& operandIds);
void addMemberDecoration(Id, unsigned int member, Decoration, int num = -1);
@ -413,7 +418,8 @@ public:
// Return the function, pass back the entry.
// The returned pointer is only valid for the lifetime of this builder.
Function* makeFunctionEntry(Decoration precision, Id returnType, const char* name,
const std::vector<Id>& paramTypes, const std::vector<char const*>& paramNames,
LinkageType linkType, const std::vector<Id>& paramTypes,
const std::vector<char const*>& paramNames,
const std::vector<std::vector<Decoration>>& precisions, Block **entry = nullptr);
// Create a return. An 'implicit' return is one not appearing in the source
@ -462,8 +468,10 @@ public:
// Create an OpArrayLength instruction
Id createArrayLength(Id base, unsigned int member);
// Create an OpCooperativeMatrixLengthKHR instruction
Id createCooperativeMatrixLengthKHR(Id type);
// Create an OpCooperativeMatrixLengthNV instruction
Id createCooperativeMatrixLength(Id type);
Id createCooperativeMatrixLengthNV(Id type);
// Create an OpCompositeExtract instruction
Id createCompositeExtract(Id composite, Id typeId, unsigned index);
@ -698,11 +706,6 @@ public:
// Accumulate whether anything in the chain of structures has coherent decorations.
struct CoherentFlags {
CoherentFlags() { clear(); }
#ifdef GLSLANG_WEB
void clear() { }
bool isVolatile() const { return false; }
CoherentFlags operator |=(const CoherentFlags &other) { return *this; }
#else
bool isVolatile() const { return volatil; }
bool isNonUniform() const { return nonUniform; }
bool anyCoherent() const {
@ -747,7 +750,6 @@ public:
nonUniform |= other.nonUniform;
return *this;
}
#endif
};
CoherentFlags coherentFlags;
};
@ -828,19 +830,17 @@ public:
// Add capabilities, extensions, remove unneeded decorations, etc.,
// based on the resulting SPIR-V.
void postProcess();
void postProcess(bool compileOnly);
// Prune unreachable blocks in the CFG and remove unneeded decorations.
void postProcessCFG();
#ifndef GLSLANG_WEB
// Add capabilities, extensions based on instructions in the module.
void postProcessFeatures();
// Hook to visit each instruction in a block in a function
void postProcess(Instruction&);
// Hook to visit each non-32-bit sized float/int operation in a block.
void postProcessType(const Instruction&, spv::Id typeId);
#endif
void dump(std::vector<unsigned int>&) const;

View File

@ -53,11 +53,11 @@ namespace spv {
#include "GLSL.ext.AMD.h"
#include "GLSL.ext.NV.h"
#include "GLSL.ext.ARM.h"
#include "GLSL.ext.QCOM.h"
}
namespace spv {
#ifndef GLSLANG_WEB
// Hook to visit each operand type and result type of an instruction.
// Will be called multiple times for one instruction, once for each typed
// operand and the result.
@ -181,6 +181,7 @@ void Builder::postProcessType(const Instruction& inst, Id typeId)
else if (width == 8)
addCapability(CapabilityInt8);
}
[[fallthrough]]; // @MEWIN - 2022-12-07 - Added this to get rid of implicit-fallthrough warning.
default:
if (basicTypeOp == OpTypeInt) {
if (width == 16)
@ -245,9 +246,11 @@ void Builder::postProcess(Instruction& inst)
// (set via Builder::AccessChain::alignment) only accounts for the base of
// the reference type and any scalar component selection in the accesschain,
// and this function computes the rest from the SPIR-V Offset decorations.
Instruction *accessChain = module.getInstruction(inst.getIdOperand(0));
if (accessChain->getOpCode() == OpAccessChain) {
Instruction *base = module.getInstruction(accessChain->getIdOperand(0));
// BEGIN @MEWIN - 2024-06-26 - Fixed shadowing warning.
Instruction *accChain = module.getInstruction(inst.getIdOperand(0));
if (accChain->getOpCode() == OpAccessChain) {
Instruction *base = module.getInstruction(accChain->getIdOperand(0));
// END @MEWIN
// Get the type of the base of the access chain. It must be a pointer type.
Id typeId = base->getTypeId();
Instruction *type = module.getInstruction(typeId);
@ -263,8 +266,10 @@ void Builder::postProcess(Instruction& inst)
// Offset/ArrayStride/MatrixStride decorations, and bitwise OR them all
// together.
int alignment = 0;
for (int i = 1; i < accessChain->getNumOperands(); ++i) {
Instruction *idx = module.getInstruction(accessChain->getIdOperand(i));
// BEGIN @MEWIN - 2024-06-26 - Fixed shadowing warning.
for (int i = 1; i < accChain->getNumOperands(); ++i) {
Instruction *idx = module.getInstruction(accChain->getIdOperand(i));
// END @MEWIN
if (type->getOpCode() == OpTypeStruct) {
assert(idx->getOpCode() == OpConstant);
unsigned int c = idx->getImmediateOperand(0);
@ -334,7 +339,6 @@ void Builder::postProcess(Instruction& inst)
}
}
}
#endif
// comment in header
void Builder::postProcessCFG()
@ -395,7 +399,6 @@ void Builder::postProcessCFG()
decorations.end());
}
#ifndef GLSLANG_WEB
// comment in header
void Builder::postProcessFeatures() {
// Add per-instruction capabilities, extensions, etc.,
@ -483,14 +486,15 @@ void Builder::postProcessFeatures() {
}
}
}
#endif
// comment in header
void Builder::postProcess() {
void Builder::postProcess(bool compileOnly)
{
// postProcessCFG needs an entrypoint to determine what is reachable, but if we are not creating an "executable" shader, we don't have an entrypoint
if (!compileOnly)
postProcessCFG();
#ifndef GLSLANG_WEB
postProcessFeatures();
#endif
}
}; // end spv namespace

View File

@ -226,7 +226,7 @@ void SpirvToolsTransform(const glslang::TIntermediate& intermediate, std::vector
bool SpirvToolsAnalyzeDeadOutputStores(spv_target_env target_env, std::vector<unsigned int>& spirv,
std::unordered_set<uint32_t>* live_locs,
std::unordered_set<uint32_t>* live_builtins,
spv::SpvBuildLogger* logger)
spv::SpvBuildLogger*)
{
spvtools::Optimizer optimizer(target_env);
optimizer.SetMessageConsumer(OptimizerMesssageConsumer);
@ -242,7 +242,7 @@ bool SpirvToolsAnalyzeDeadOutputStores(spv_target_env target_env, std::vector<un
void SpirvToolsEliminateDeadOutputStores(spv_target_env target_env, std::vector<unsigned int>& spirv,
std::unordered_set<uint32_t>* live_locs,
std::unordered_set<uint32_t>* live_builtins,
spv::SpvBuildLogger* logger)
spv::SpvBuildLogger*)
{
spvtools::Optimizer optimizer(target_env);
optimizer.SetMessageConsumer(OptimizerMesssageConsumer);
@ -259,7 +259,7 @@ void SpirvToolsEliminateDeadOutputStores(spv_target_env target_env, std::vector<
}
void SpirvToolsEliminateDeadInputComponents(spv_target_env target_env, std::vector<unsigned int>& spirv,
spv::SpvBuildLogger* logger)
spv::SpvBuildLogger*)
{
spvtools::Optimizer optimizer(target_env);
optimizer.SetMessageConsumer(OptimizerMesssageConsumer);

View File

@ -61,6 +61,7 @@ struct SpvOptions {
bool validate {false};
bool emitNonSemanticShaderDebugInfo {false};
bool emitNonSemanticShaderDebugSource{ false };
bool compileOnly{false};
};
#if ENABLE_OPT

View File

@ -55,6 +55,8 @@ namespace spv {
#include "GLSL.ext.AMD.h"
#include "GLSL.ext.NV.h"
#include "GLSL.ext.ARM.h"
#include "NonSemanticShaderDebugInfo100.h"
#include "GLSL.ext.QCOM.h"
}
}
const char* GlslStd450DebugNames[spv::GLSLstd450Count];
@ -63,6 +65,7 @@ namespace spv {
static const char* GLSLextAMDGetDebugNames(const char*, unsigned);
static const char* GLSLextNVGetDebugNames(const char*, unsigned);
static const char* NonSemanticShaderDebugInfo100GetDebugNames(unsigned);
static void Kill(std::ostream& out, const char* message)
{
@ -77,6 +80,7 @@ enum ExtInstSet {
GLSLextNVInst,
OpenCLExtInst,
NonSemanticDebugPrintfExtInst,
NonSemanticShaderDebugInfo100
};
// Container class for a single instance of a SPIR-V stream, with methods for disassembly.
@ -502,6 +506,8 @@ void SpirvStream::disassembleInstruction(Id resultId, Id /*typeId*/, Op opCode,
extInstSet = OpenCLExtInst;
} else if (strcmp("NonSemantic.DebugPrintf", name) == 0) {
extInstSet = NonSemanticDebugPrintfExtInst;
} else if (strcmp("NonSemantic.Shader.DebugInfo.100", name) == 0) {
extInstSet = NonSemanticShaderDebugInfo100;
} else if (strcmp(spv::E_SPV_AMD_shader_ballot, name) == 0 ||
strcmp(spv::E_SPV_AMD_shader_trinary_minmax, name) == 0 ||
strcmp(spv::E_SPV_AMD_shader_explicit_vertex_parameter, name) == 0 ||
@ -527,6 +533,8 @@ void SpirvStream::disassembleInstruction(Id resultId, Id /*typeId*/, Op opCode,
out << "(" << GLSLextNVGetDebugNames(name, entrypoint) << ")";
} else if (extInstSet == NonSemanticDebugPrintfExtInst) {
out << "(DebugPrintf)";
} else if (extInstSet == NonSemanticShaderDebugInfo100) {
out << "(" << NonSemanticShaderDebugInfo100GetDebugNames(entrypoint) << ")";
}
}
break;
@ -750,6 +758,59 @@ static const char* GLSLextNVGetDebugNames(const char* name, unsigned entrypoint)
return "Bad";
}
static const char* NonSemanticShaderDebugInfo100GetDebugNames(unsigned entrypoint)
{
switch (entrypoint) {
case NonSemanticShaderDebugInfo100DebugInfoNone: return "DebugInfoNone";
case NonSemanticShaderDebugInfo100DebugCompilationUnit: return "DebugCompilationUnit";
case NonSemanticShaderDebugInfo100DebugTypeBasic: return "DebugTypeBasic";
case NonSemanticShaderDebugInfo100DebugTypePointer: return "DebugTypePointer";
case NonSemanticShaderDebugInfo100DebugTypeQualifier: return "DebugTypeQualifier";
case NonSemanticShaderDebugInfo100DebugTypeArray: return "DebugTypeArray";
case NonSemanticShaderDebugInfo100DebugTypeVector: return "DebugTypeVector";
case NonSemanticShaderDebugInfo100DebugTypedef: return "DebugTypedef";
case NonSemanticShaderDebugInfo100DebugTypeFunction: return "DebugTypeFunction";
case NonSemanticShaderDebugInfo100DebugTypeEnum: return "DebugTypeEnum";
case NonSemanticShaderDebugInfo100DebugTypeComposite: return "DebugTypeComposite";
case NonSemanticShaderDebugInfo100DebugTypeMember: return "DebugTypeMember";
case NonSemanticShaderDebugInfo100DebugTypeInheritance: return "DebugTypeInheritance";
case NonSemanticShaderDebugInfo100DebugTypePtrToMember: return "DebugTypePtrToMember";
case NonSemanticShaderDebugInfo100DebugTypeTemplate: return "DebugTypeTemplate";
case NonSemanticShaderDebugInfo100DebugTypeTemplateParameter: return "DebugTypeTemplateParameter";
case NonSemanticShaderDebugInfo100DebugTypeTemplateTemplateParameter: return "DebugTypeTemplateTemplateParameter";
case NonSemanticShaderDebugInfo100DebugTypeTemplateParameterPack: return "DebugTypeTemplateParameterPack";
case NonSemanticShaderDebugInfo100DebugGlobalVariable: return "DebugGlobalVariable";
case NonSemanticShaderDebugInfo100DebugFunctionDeclaration: return "DebugFunctionDeclaration";
case NonSemanticShaderDebugInfo100DebugFunction: return "DebugFunction";
case NonSemanticShaderDebugInfo100DebugLexicalBlock: return "DebugLexicalBlock";
case NonSemanticShaderDebugInfo100DebugLexicalBlockDiscriminator: return "DebugLexicalBlockDiscriminator";
case NonSemanticShaderDebugInfo100DebugScope: return "DebugScope";
case NonSemanticShaderDebugInfo100DebugNoScope: return "DebugNoScope";
case NonSemanticShaderDebugInfo100DebugInlinedAt: return "DebugInlinedAt";
case NonSemanticShaderDebugInfo100DebugLocalVariable: return "DebugLocalVariable";
case NonSemanticShaderDebugInfo100DebugInlinedVariable: return "DebugInlinedVariable";
case NonSemanticShaderDebugInfo100DebugDeclare: return "DebugDeclare";
case NonSemanticShaderDebugInfo100DebugValue: return "DebugValue";
case NonSemanticShaderDebugInfo100DebugOperation: return "DebugOperation";
case NonSemanticShaderDebugInfo100DebugExpression: return "DebugExpression";
case NonSemanticShaderDebugInfo100DebugMacroDef: return "DebugMacroDef";
case NonSemanticShaderDebugInfo100DebugMacroUndef: return "DebugMacroUndef";
case NonSemanticShaderDebugInfo100DebugImportedEntity: return "DebugImportedEntity";
case NonSemanticShaderDebugInfo100DebugSource: return "DebugSource";
case NonSemanticShaderDebugInfo100DebugFunctionDefinition: return "DebugFunctionDefinition";
case NonSemanticShaderDebugInfo100DebugSourceContinued: return "DebugSourceContinued";
case NonSemanticShaderDebugInfo100DebugLine: return "DebugLine";
case NonSemanticShaderDebugInfo100DebugNoLine: return "DebugNoLine";
case NonSemanticShaderDebugInfo100DebugBuildIdentifier: return "DebugBuildIdentifier";
case NonSemanticShaderDebugInfo100DebugStoragePath: return "DebugStoragePath";
case NonSemanticShaderDebugInfo100DebugEntryPoint: return "DebugEntryPoint";
case NonSemanticShaderDebugInfo100DebugTypeMatrix: return "DebugTypeMatrix";
default: return "Bad";
}
return "Bad";
}
void Disassemble(std::ostream& out, const std::vector<unsigned int>& stream)
{
SpirvStream SpirvStream(out, stream);

375
SPIRV/doc.cpp Normal file → Executable file
View File

@ -45,6 +45,7 @@
#include <cstdio>
#include <cstring>
#include <algorithm>
#include <mutex>
namespace spv {
extern "C" {
@ -54,6 +55,7 @@ namespace spv {
#include "GLSL.ext.AMD.h"
#include "GLSL.ext.NV.h"
#include "GLSL.ext.ARM.h"
#include "GLSL.ext.QCOM.h"
}
}
@ -215,6 +217,10 @@ const char* ExecutionModeString(int mode)
case ExecutionModeNoGlobalOffsetINTEL: return "NoGlobalOffsetINTEL";
case ExecutionModeNumSIMDWorkitemsINTEL: return "NumSIMDWorkitemsINTEL";
case ExecutionModeNonCoherentColorAttachmentReadEXT: return "NonCoherentColorAttachmentReadEXT";
case ExecutionModeNonCoherentDepthAttachmentReadEXT: return "NonCoherentDepthAttachmentReadEXT";
case ExecutionModeNonCoherentStencilAttachmentReadEXT: return "NonCoherentStencilAttachmentReadEXT";
case ExecutionModeCeiling:
default: return "Bad";
}
@ -246,6 +252,8 @@ const char* StorageClassString(int StorageClass)
case StorageClassPhysicalStorageBufferEXT: return "PhysicalStorageBufferEXT";
case StorageClassTaskPayloadWorkgroupEXT: return "TaskPayloadWorkgroupEXT";
case StorageClassHitObjectAttributeNV: return "HitObjectAttributeNV";
case StorageClassTileImageEXT: return "TileImageEXT";
default: return "Bad";
}
}
@ -304,6 +312,8 @@ const char* DecorationString(int decoration)
case DecorationCeiling:
default: return "Bad";
case DecorationWeightTextureQCOM: return "DecorationWeightTextureQCOM";
case DecorationBlockMatchTextureQCOM: return "DecorationBlockMatchTextureQCOM";
case DecorationExplicitInterpAMD: return "ExplicitInterpAMD";
case DecorationOverrideCoverageNV: return "OverrideCoverageNV";
case DecorationPassthroughNV: return "PassthroughNV";
@ -320,6 +330,8 @@ const char* DecorationString(int decoration)
case DecorationHlslSemanticGOOGLE: return "DecorationHlslSemanticGOOGLE";
case DecorationRestrictPointerEXT: return "DecorationRestrictPointerEXT";
case DecorationAliasedPointerEXT: return "DecorationAliasedPointerEXT";
case DecorationHitObjectShaderRecordBufferNV: return "DecorationHitObjectShaderRecordBufferNV";
}
}
@ -401,6 +413,11 @@ const char* BuiltInString(int builtIn)
case BuiltInRayTminKHR: return "RayTminKHR";
case BuiltInRayTmaxKHR: return "RayTmaxKHR";
case BuiltInCullMaskKHR: return "CullMaskKHR";
case BuiltInHitTriangleVertexPositionsKHR: return "HitTriangleVertexPositionsKHR";
case BuiltInHitMicroTriangleVertexPositionsNV: return "HitMicroTriangleVertexPositionsNV";
case BuiltInHitMicroTriangleVertexBarycentricsNV: return "HitMicroTriangleVertexBarycentricsNV";
case BuiltInHitKindFrontFacingMicroTriangleNV: return "HitKindFrontFacingMicroTriangleNV";
case BuiltInHitKindBackFacingMicroTriangleNV: return "HitKindBackFacingMicroTriangleNV";
case BuiltInInstanceCustomIndexKHR: return "InstanceCustomIndexKHR";
case BuiltInRayGeometryIndexKHR: return "RayGeometryIndexKHR";
case BuiltInObjectToWorldKHR: return "ObjectToWorldKHR";
@ -460,6 +477,7 @@ const char* DimensionString(int dim)
case 4: return "Rect";
case 5: return "Buffer";
case 6: return "SubpassData";
case DimTileImageDataEXT: return "TileImageDataEXT";
default: return "Bad";
}
@ -779,6 +797,21 @@ const char* MemoryAccessString(int mem)
}
}
const int CooperativeMatrixOperandsCeiling = 6;
const char* CooperativeMatrixOperandsString(int op)
{
switch (op) {
case CooperativeMatrixOperandsMatrixASignedComponentsShift: return "ASignedComponents";
case CooperativeMatrixOperandsMatrixBSignedComponentsShift: return "BSignedComponents";
case CooperativeMatrixOperandsMatrixCSignedComponentsShift: return "CSignedComponents";
case CooperativeMatrixOperandsMatrixResultSignedComponentsShift: return "ResultSignedComponents";
case CooperativeMatrixOperandsSaturatingAccumulationShift: return "SaturatingAccumulation";
default: return "Bad";
}
}
const char* ScopeString(int mem)
{
switch (mem) {
@ -947,6 +980,10 @@ const char* CapabilityString(int info)
case CapabilityRayQueryKHR: return "RayQueryKHR";
case CapabilityRayTracingProvisionalKHR: return "RayTracingProvisionalKHR";
case CapabilityRayTraversalPrimitiveCullingKHR: return "RayTraversalPrimitiveCullingKHR";
case CapabilityRayTracingPositionFetchKHR: return "RayTracingPositionFetchKHR";
case CapabilityDisplacementMicromapNV: return "DisplacementMicromapNV";
case CapabilityRayTracingDisplacementMicromapNV: return "CapabilityRayTracingDisplacementMicromapNV";
case CapabilityRayQueryPositionFetchKHR: return "RayQueryPositionFetchKHR";
case CapabilityComputeDerivativeGroupQuadsNV: return "ComputeDerivativeGroupQuadsNV";
case CapabilityComputeDerivativeGroupLinearNV: return "ComputeDerivativeGroupLinearNV";
case CapabilityFragmentBarycentricKHR: return "FragmentBarycentricKHR";
@ -980,12 +1017,17 @@ const char* CapabilityString(int info)
case CapabilityVariablePointers: return "VariablePointers";
case CapabilityCooperativeMatrixNV: return "CooperativeMatrixNV";
case CapabilityCooperativeMatrixKHR: return "CooperativeMatrixKHR";
case CapabilityShaderSMBuiltinsNV: return "ShaderSMBuiltinsNV";
case CapabilityFragmentShaderSampleInterlockEXT: return "CapabilityFragmentShaderSampleInterlockEXT";
case CapabilityFragmentShaderPixelInterlockEXT: return "CapabilityFragmentShaderPixelInterlockEXT";
case CapabilityFragmentShaderShadingRateInterlockEXT: return "CapabilityFragmentShaderShadingRateInterlockEXT";
case CapabilityTileImageColorReadAccessEXT: return "TileImageColorReadAccessEXT";
case CapabilityTileImageDepthReadAccessEXT: return "TileImageDepthReadAccessEXT";
case CapabilityTileImageStencilReadAccessEXT: return "TileImageStencilReadAccessEXT";
case CapabilityFragmentShadingRateKHR: return "FragmentShadingRateKHR";
case CapabilityDemoteToHelperInvocationEXT: return "DemoteToHelperInvocationEXT";
@ -1006,6 +1048,12 @@ const char* CapabilityString(int info)
case CapabilityWorkgroupMemoryExplicitLayout16BitAccessKHR: return "CapabilityWorkgroupMemoryExplicitLayout16BitAccessKHR";
case CapabilityCoreBuiltinsARM: return "CoreBuiltinsARM";
case CapabilityShaderInvocationReorderNV: return "ShaderInvocationReorderNV";
case CapabilityTextureSampleWeightedQCOM: return "TextureSampleWeightedQCOM";
case CapabilityTextureBoxFilterQCOM: return "TextureBoxFilterQCOM";
case CapabilityTextureBlockMatchQCOM: return "TextureBlockMatchQCOM";
default: return "Bad";
}
}
@ -1448,18 +1496,70 @@ const char* OpcodeString(int op)
case OpRayQueryGetWorldRayOriginKHR: return "OpRayQueryGetWorldRayOriginKHR";
case OpRayQueryGetIntersectionObjectToWorldKHR: return "OpRayQueryGetIntersectionObjectToWorldKHR";
case OpRayQueryGetIntersectionWorldToObjectKHR: return "OpRayQueryGetIntersectionWorldToObjectKHR";
case OpRayQueryGetIntersectionTriangleVertexPositionsKHR: return "OpRayQueryGetIntersectionTriangleVertexPositionsKHR";
case OpTypeCooperativeMatrixNV: return "OpTypeCooperativeMatrixNV";
case OpCooperativeMatrixLoadNV: return "OpCooperativeMatrixLoadNV";
case OpCooperativeMatrixStoreNV: return "OpCooperativeMatrixStoreNV";
case OpCooperativeMatrixMulAddNV: return "OpCooperativeMatrixMulAddNV";
case OpCooperativeMatrixLengthNV: return "OpCooperativeMatrixLengthNV";
case OpTypeCooperativeMatrixKHR: return "OpTypeCooperativeMatrixKHR";
case OpCooperativeMatrixLoadKHR: return "OpCooperativeMatrixLoadKHR";
case OpCooperativeMatrixStoreKHR: return "OpCooperativeMatrixStoreKHR";
case OpCooperativeMatrixMulAddKHR: return "OpCooperativeMatrixMulAddKHR";
case OpCooperativeMatrixLengthKHR: return "OpCooperativeMatrixLengthKHR";
case OpDemoteToHelperInvocationEXT: return "OpDemoteToHelperInvocationEXT";
case OpIsHelperInvocationEXT: return "OpIsHelperInvocationEXT";
case OpBeginInvocationInterlockEXT: return "OpBeginInvocationInterlockEXT";
case OpEndInvocationInterlockEXT: return "OpEndInvocationInterlockEXT";
case OpTypeHitObjectNV: return "OpTypeHitObjectNV";
case OpHitObjectTraceRayNV: return "OpHitObjectTraceRayNV";
case OpHitObjectTraceRayMotionNV: return "OpHitObjectTraceRayMotionNV";
case OpHitObjectRecordHitNV: return "OpHitObjectRecordHitNV";
case OpHitObjectRecordHitMotionNV: return "OpHitObjectRecordHitMotionNV";
case OpHitObjectRecordHitWithIndexNV: return "OpHitObjectRecordHitWithIndexNV";
case OpHitObjectRecordHitWithIndexMotionNV: return "OpHitObjectRecordHitWithIndexMotionNV";
case OpHitObjectRecordMissNV: return "OpHitObjectRecordMissNV";
case OpHitObjectRecordMissMotionNV: return "OpHitObjectRecordMissMotionNV";
case OpHitObjectRecordEmptyNV: return "OpHitObjectRecordEmptyNV";
case OpHitObjectExecuteShaderNV: return "OpHitObjectExecuteShaderNV";
case OpReorderThreadWithHintNV: return "OpReorderThreadWithHintNV";
case OpReorderThreadWithHitObjectNV: return "OpReorderThreadWithHitObjectNV";
case OpHitObjectGetCurrentTimeNV: return "OpHitObjectGetCurrentTimeNV";
case OpHitObjectGetAttributesNV: return "OpHitObjectGetAttributesNV";
case OpHitObjectGetHitKindNV: return "OpHitObjectGetFrontFaceNV";
case OpHitObjectGetPrimitiveIndexNV: return "OpHitObjectGetPrimitiveIndexNV";
case OpHitObjectGetGeometryIndexNV: return "OpHitObjectGetGeometryIndexNV";
case OpHitObjectGetInstanceIdNV: return "OpHitObjectGetInstanceIdNV";
case OpHitObjectGetInstanceCustomIndexNV: return "OpHitObjectGetInstanceCustomIndexNV";
case OpHitObjectGetObjectRayDirectionNV: return "OpHitObjectGetObjectRayDirectionNV";
case OpHitObjectGetObjectRayOriginNV: return "OpHitObjectGetObjectRayOriginNV";
case OpHitObjectGetWorldRayDirectionNV: return "OpHitObjectGetWorldRayDirectionNV";
case OpHitObjectGetWorldRayOriginNV: return "OpHitObjectGetWorldRayOriginNV";
case OpHitObjectGetWorldToObjectNV: return "OpHitObjectGetWorldToObjectNV";
case OpHitObjectGetObjectToWorldNV: return "OpHitObjectGetObjectToWorldNV";
case OpHitObjectGetRayTMaxNV: return "OpHitObjectGetRayTMaxNV";
case OpHitObjectGetRayTMinNV: return "OpHitObjectGetRayTMinNV";
case OpHitObjectIsEmptyNV: return "OpHitObjectIsEmptyNV";
case OpHitObjectIsHitNV: return "OpHitObjectIsHitNV";
case OpHitObjectIsMissNV: return "OpHitObjectIsMissNV";
case OpHitObjectGetShaderBindingTableRecordIndexNV: return "OpHitObjectGetShaderBindingTableRecordIndexNV";
case OpHitObjectGetShaderRecordBufferHandleNV: return "OpHitObjectGetShaderRecordBufferHandleNV";
case OpFetchMicroTriangleVertexBarycentricNV: return "OpFetchMicroTriangleVertexBarycentricNV";
case OpFetchMicroTriangleVertexPositionNV: return "OpFetchMicroTriangleVertexPositionNV";
case OpColorAttachmentReadEXT: return "OpColorAttachmentReadEXT";
case OpDepthAttachmentReadEXT: return "OpDepthAttachmentReadEXT";
case OpStencilAttachmentReadEXT: return "OpStencilAttachmentReadEXT";
case OpImageSampleWeightedQCOM: return "OpImageSampleWeightedQCOM";
case OpImageBoxFilterQCOM: return "OpImageBoxFilterQCOM";
case OpImageBlockMatchSADQCOM: return "OpImageBlockMatchSADQCOM";
case OpImageBlockMatchSSDQCOM: return "OpImageBlockMatchSSDQCOM";
default:
return "Bad";
}
@ -1479,15 +1579,14 @@ EnumParameters LoopControlParams[FunctionControlCeiling];
EnumParameters SelectionControlParams[SelectControlCeiling];
EnumParameters FunctionControlParams[FunctionControlCeiling];
EnumParameters MemoryAccessParams[MemoryAccessCeiling];
EnumParameters CooperativeMatrixOperandsParams[CooperativeMatrixOperandsCeiling];
// Set up all the parameterizing descriptions of the opcodes, operands, etc.
void Parameterize()
{
// only do this once.
static bool initialized = false;
if (initialized)
return;
initialized = true;
static std::once_flag initialized;
std::call_once(initialized, [](){
// Exceptions to having a result <id> and a resulting type <id>.
// (Everything is initialized to have both).
@ -1575,6 +1674,8 @@ void Parameterize()
InstructionDesc[OpModuleProcessed].setResultAndType(false, false);
InstructionDesc[OpTypeCooperativeMatrixNV].setResultAndType(true, false);
InstructionDesc[OpCooperativeMatrixStoreNV].setResultAndType(false, false);
InstructionDesc[OpTypeCooperativeMatrixKHR].setResultAndType(true, false);
InstructionDesc[OpCooperativeMatrixStoreKHR].setResultAndType(false, false);
InstructionDesc[OpBeginInvocationInterlockEXT].setResultAndType(false, false);
InstructionDesc[OpEndInvocationInterlockEXT].setResultAndType(false, false);
@ -1646,6 +1747,7 @@ void Parameterize()
OperandClassParams[OperandKernelEnqueueFlags].set(0, KernelEnqueueFlagsString, nullptr);
OperandClassParams[OperandKernelProfilingInfo].set(0, KernelProfilingInfoString, nullptr, true);
OperandClassParams[OperandCapability].set(0, CapabilityString, nullptr);
OperandClassParams[OperandCooperativeMatrixOperands].set(CooperativeMatrixOperandsCeiling, CooperativeMatrixOperandsString, CooperativeMatrixOperandsParams, true);
OperandClassParams[OperandOpcode].set(OpCodeMask + 1, OpcodeString, nullptr);
// set name of operator, an initial set of <id> style operands, and the description
@ -2987,6 +3089,10 @@ void Parameterize()
InstructionDesc[OpRayQueryGetIntersectionWorldToObjectKHR].operands.push(OperandId, "'Committed'");
InstructionDesc[OpRayQueryGetIntersectionWorldToObjectKHR].setResultAndType(true, true);
InstructionDesc[OpRayQueryGetIntersectionTriangleVertexPositionsKHR].operands.push(OperandId, "'RayQuery'");
InstructionDesc[OpRayQueryGetIntersectionTriangleVertexPositionsKHR].operands.push(OperandId, "'Committed'");
InstructionDesc[OpRayQueryGetIntersectionTriangleVertexPositionsKHR].setResultAndType(true, true);
InstructionDesc[OpImageSampleFootprintNV].operands.push(OperandId, "'Sampled Image'");
InstructionDesc[OpImageSampleFootprintNV].operands.push(OperandId, "'Coordinate'");
InstructionDesc[OpImageSampleFootprintNV].operands.push(OperandId, "'Granularity'");
@ -3034,9 +3140,270 @@ void Parameterize()
InstructionDesc[OpCooperativeMatrixLengthNV].operands.push(OperandId, "'Type'");
InstructionDesc[OpTypeCooperativeMatrixKHR].operands.push(OperandId, "'Component Type'");
InstructionDesc[OpTypeCooperativeMatrixKHR].operands.push(OperandId, "'Scope'");
InstructionDesc[OpTypeCooperativeMatrixKHR].operands.push(OperandId, "'Rows'");
InstructionDesc[OpTypeCooperativeMatrixKHR].operands.push(OperandId, "'Columns'");
InstructionDesc[OpTypeCooperativeMatrixKHR].operands.push(OperandId, "'Use'");
InstructionDesc[OpCooperativeMatrixLoadKHR].operands.push(OperandId, "'Pointer'");
InstructionDesc[OpCooperativeMatrixLoadKHR].operands.push(OperandId, "'Memory Layout'");
InstructionDesc[OpCooperativeMatrixLoadKHR].operands.push(OperandId, "'Stride'");
InstructionDesc[OpCooperativeMatrixLoadKHR].operands.push(OperandMemoryAccess, "'Memory Access'");
InstructionDesc[OpCooperativeMatrixLoadKHR].operands.push(OperandLiteralNumber, "", true);
InstructionDesc[OpCooperativeMatrixLoadKHR].operands.push(OperandId, "", true);
InstructionDesc[OpCooperativeMatrixStoreKHR].operands.push(OperandId, "'Pointer'");
InstructionDesc[OpCooperativeMatrixStoreKHR].operands.push(OperandId, "'Object'");
InstructionDesc[OpCooperativeMatrixStoreKHR].operands.push(OperandId, "'Memory Layout'");
InstructionDesc[OpCooperativeMatrixStoreKHR].operands.push(OperandId, "'Stride'");
InstructionDesc[OpCooperativeMatrixStoreKHR].operands.push(OperandMemoryAccess, "'Memory Access'");
InstructionDesc[OpCooperativeMatrixStoreKHR].operands.push(OperandLiteralNumber, "", true);
InstructionDesc[OpCooperativeMatrixStoreKHR].operands.push(OperandId, "", true);
InstructionDesc[OpCooperativeMatrixMulAddKHR].operands.push(OperandId, "'A'");
InstructionDesc[OpCooperativeMatrixMulAddKHR].operands.push(OperandId, "'B'");
InstructionDesc[OpCooperativeMatrixMulAddKHR].operands.push(OperandId, "'C'");
InstructionDesc[OpCooperativeMatrixMulAddKHR].operands.push(OperandCooperativeMatrixOperands, "'Cooperative Matrix Operands'", true);
InstructionDesc[OpCooperativeMatrixLengthKHR].operands.push(OperandId, "'Type'");
InstructionDesc[OpDemoteToHelperInvocationEXT].setResultAndType(false, false);
InstructionDesc[OpReadClockKHR].operands.push(OperandScope, "'Scope'");
InstructionDesc[OpTypeHitObjectNV].setResultAndType(true, false);
InstructionDesc[OpHitObjectGetShaderRecordBufferHandleNV].operands.push(OperandId, "'HitObject'");
InstructionDesc[OpHitObjectGetShaderRecordBufferHandleNV].setResultAndType(true, true);
InstructionDesc[OpReorderThreadWithHintNV].operands.push(OperandId, "'Hint'");
InstructionDesc[OpReorderThreadWithHintNV].operands.push(OperandId, "'Bits'");
InstructionDesc[OpReorderThreadWithHintNV].setResultAndType(false, false);
InstructionDesc[OpReorderThreadWithHitObjectNV].operands.push(OperandId, "'HitObject'");
InstructionDesc[OpReorderThreadWithHitObjectNV].operands.push(OperandId, "'Hint'");
InstructionDesc[OpReorderThreadWithHitObjectNV].operands.push(OperandId, "'Bits'");
InstructionDesc[OpReorderThreadWithHitObjectNV].setResultAndType(false, false);
InstructionDesc[OpHitObjectGetCurrentTimeNV].operands.push(OperandId, "'HitObject'");
InstructionDesc[OpHitObjectGetCurrentTimeNV].setResultAndType(true, true);
InstructionDesc[OpHitObjectGetHitKindNV].operands.push(OperandId, "'HitObject'");
InstructionDesc[OpHitObjectGetHitKindNV].setResultAndType(true, true);
InstructionDesc[OpHitObjectGetPrimitiveIndexNV].operands.push(OperandId, "'HitObject'");
InstructionDesc[OpHitObjectGetPrimitiveIndexNV].setResultAndType(true, true);
InstructionDesc[OpHitObjectGetGeometryIndexNV].operands.push(OperandId, "'HitObject'");
InstructionDesc[OpHitObjectGetGeometryIndexNV].setResultAndType(true, true);
InstructionDesc[OpHitObjectGetInstanceIdNV].operands.push(OperandId, "'HitObject'");
InstructionDesc[OpHitObjectGetInstanceIdNV].setResultAndType(true, true);
InstructionDesc[OpHitObjectGetInstanceCustomIndexNV].operands.push(OperandId, "'HitObject'");
InstructionDesc[OpHitObjectGetInstanceCustomIndexNV].setResultAndType(true, true);
InstructionDesc[OpHitObjectGetObjectRayDirectionNV].operands.push(OperandId, "'HitObject'");
InstructionDesc[OpHitObjectGetObjectRayDirectionNV].setResultAndType(true, true);
InstructionDesc[OpHitObjectGetObjectRayOriginNV].operands.push(OperandId, "'HitObject'");
InstructionDesc[OpHitObjectGetObjectRayOriginNV].setResultAndType(true, true);
InstructionDesc[OpHitObjectGetWorldRayDirectionNV].operands.push(OperandId, "'HitObject'");
InstructionDesc[OpHitObjectGetWorldRayDirectionNV].setResultAndType(true, true);
InstructionDesc[OpHitObjectGetWorldRayOriginNV].operands.push(OperandId, "'HitObject'");
InstructionDesc[OpHitObjectGetWorldRayOriginNV].setResultAndType(true, true);
InstructionDesc[OpHitObjectGetWorldToObjectNV].operands.push(OperandId, "'HitObject'");
InstructionDesc[OpHitObjectGetWorldToObjectNV].setResultAndType(true, true);
InstructionDesc[OpHitObjectGetObjectToWorldNV].operands.push(OperandId, "'HitObject'");
InstructionDesc[OpHitObjectGetObjectToWorldNV].setResultAndType(true, true);
InstructionDesc[OpHitObjectGetRayTMaxNV].operands.push(OperandId, "'HitObject'");
InstructionDesc[OpHitObjectGetRayTMaxNV].setResultAndType(true, true);
InstructionDesc[OpHitObjectGetRayTMinNV].operands.push(OperandId, "'HitObject'");
InstructionDesc[OpHitObjectGetRayTMinNV].setResultAndType(true, true);
InstructionDesc[OpHitObjectGetShaderBindingTableRecordIndexNV].operands.push(OperandId, "'HitObject'");
InstructionDesc[OpHitObjectGetShaderBindingTableRecordIndexNV].setResultAndType(true, true);
InstructionDesc[OpHitObjectIsEmptyNV].operands.push(OperandId, "'HitObject'");
InstructionDesc[OpHitObjectIsEmptyNV].setResultAndType(true, true);
InstructionDesc[OpHitObjectIsHitNV].operands.push(OperandId, "'HitObject'");
InstructionDesc[OpHitObjectIsHitNV].setResultAndType(true, true);
InstructionDesc[OpHitObjectIsMissNV].operands.push(OperandId, "'HitObject'");
InstructionDesc[OpHitObjectIsMissNV].setResultAndType(true, true);
InstructionDesc[OpHitObjectGetAttributesNV].operands.push(OperandId, "'HitObject'");
InstructionDesc[OpHitObjectGetAttributesNV].operands.push(OperandId, "'HitObjectAttribute'");
InstructionDesc[OpHitObjectGetAttributesNV].setResultAndType(false, false);
InstructionDesc[OpHitObjectExecuteShaderNV].operands.push(OperandId, "'HitObject'");
InstructionDesc[OpHitObjectExecuteShaderNV].operands.push(OperandId, "'Payload'");
InstructionDesc[OpHitObjectExecuteShaderNV].setResultAndType(false, false);
InstructionDesc[OpHitObjectRecordHitNV].operands.push(OperandId, "'HitObject'");
InstructionDesc[OpHitObjectRecordHitNV].operands.push(OperandId, "'Acceleration Structure'");
InstructionDesc[OpHitObjectRecordHitNV].operands.push(OperandId, "'InstanceId'");
InstructionDesc[OpHitObjectRecordHitNV].operands.push(OperandId, "'PrimitiveId'");
InstructionDesc[OpHitObjectRecordHitNV].operands.push(OperandId, "'GeometryIndex'");
InstructionDesc[OpHitObjectRecordHitNV].operands.push(OperandId, "'HitKind'");
InstructionDesc[OpHitObjectRecordHitNV].operands.push(OperandId, "'SBT Record Offset'");
InstructionDesc[OpHitObjectRecordHitNV].operands.push(OperandId, "'SBT Record Stride'");
InstructionDesc[OpHitObjectRecordHitNV].operands.push(OperandId, "'Origin'");
InstructionDesc[OpHitObjectRecordHitNV].operands.push(OperandId, "'TMin'");
InstructionDesc[OpHitObjectRecordHitNV].operands.push(OperandId, "'Direction'");
InstructionDesc[OpHitObjectRecordHitNV].operands.push(OperandId, "'TMax'");
InstructionDesc[OpHitObjectRecordHitNV].operands.push(OperandId, "'HitObject Attribute'");
InstructionDesc[OpHitObjectRecordHitNV].setResultAndType(false, false);
InstructionDesc[OpHitObjectRecordHitMotionNV].operands.push(OperandId, "'HitObject'");
InstructionDesc[OpHitObjectRecordHitMotionNV].operands.push(OperandId, "'Acceleration Structure'");
InstructionDesc[OpHitObjectRecordHitMotionNV].operands.push(OperandId, "'InstanceId'");
InstructionDesc[OpHitObjectRecordHitMotionNV].operands.push(OperandId, "'PrimitiveId'");
InstructionDesc[OpHitObjectRecordHitMotionNV].operands.push(OperandId, "'GeometryIndex'");
InstructionDesc[OpHitObjectRecordHitMotionNV].operands.push(OperandId, "'HitKind'");
InstructionDesc[OpHitObjectRecordHitMotionNV].operands.push(OperandId, "'SBT Record Offset'");
InstructionDesc[OpHitObjectRecordHitMotionNV].operands.push(OperandId, "'SBT Record Stride'");
InstructionDesc[OpHitObjectRecordHitMotionNV].operands.push(OperandId, "'Origin'");
InstructionDesc[OpHitObjectRecordHitMotionNV].operands.push(OperandId, "'TMin'");
InstructionDesc[OpHitObjectRecordHitMotionNV].operands.push(OperandId, "'Direction'");
InstructionDesc[OpHitObjectRecordHitMotionNV].operands.push(OperandId, "'TMax'");
InstructionDesc[OpHitObjectRecordHitMotionNV].operands.push(OperandId, "'Current Time'");
InstructionDesc[OpHitObjectRecordHitMotionNV].operands.push(OperandId, "'HitObject Attribute'");
InstructionDesc[OpHitObjectRecordHitMotionNV].setResultAndType(false, false);
InstructionDesc[OpHitObjectRecordHitWithIndexNV].operands.push(OperandId, "'HitObject'");
InstructionDesc[OpHitObjectRecordHitWithIndexNV].operands.push(OperandId, "'Acceleration Structure'");
InstructionDesc[OpHitObjectRecordHitWithIndexNV].operands.push(OperandId, "'InstanceId'");
InstructionDesc[OpHitObjectRecordHitWithIndexNV].operands.push(OperandId, "'PrimitiveId'");
InstructionDesc[OpHitObjectRecordHitWithIndexNV].operands.push(OperandId, "'GeometryIndex'");
InstructionDesc[OpHitObjectRecordHitWithIndexNV].operands.push(OperandId, "'HitKind'");
InstructionDesc[OpHitObjectRecordHitWithIndexNV].operands.push(OperandId, "'SBT Record Index'");
InstructionDesc[OpHitObjectRecordHitWithIndexNV].operands.push(OperandId, "'Origin'");
InstructionDesc[OpHitObjectRecordHitWithIndexNV].operands.push(OperandId, "'TMin'");
InstructionDesc[OpHitObjectRecordHitWithIndexNV].operands.push(OperandId, "'Direction'");
InstructionDesc[OpHitObjectRecordHitWithIndexNV].operands.push(OperandId, "'TMax'");
InstructionDesc[OpHitObjectRecordHitWithIndexNV].operands.push(OperandId, "'HitObject Attribute'");
InstructionDesc[OpHitObjectRecordHitWithIndexNV].setResultAndType(false, false);
InstructionDesc[OpHitObjectRecordHitWithIndexMotionNV].operands.push(OperandId, "'HitObject'");
InstructionDesc[OpHitObjectRecordHitWithIndexMotionNV].operands.push(OperandId, "'Acceleration Structure'");
InstructionDesc[OpHitObjectRecordHitWithIndexMotionNV].operands.push(OperandId, "'InstanceId'");
InstructionDesc[OpHitObjectRecordHitWithIndexMotionNV].operands.push(OperandId, "'PrimitiveId'");
InstructionDesc[OpHitObjectRecordHitWithIndexMotionNV].operands.push(OperandId, "'GeometryIndex'");
InstructionDesc[OpHitObjectRecordHitWithIndexMotionNV].operands.push(OperandId, "'HitKind'");
InstructionDesc[OpHitObjectRecordHitWithIndexMotionNV].operands.push(OperandId, "'SBT Record Index'");
InstructionDesc[OpHitObjectRecordHitWithIndexMotionNV].operands.push(OperandId, "'Origin'");
InstructionDesc[OpHitObjectRecordHitWithIndexMotionNV].operands.push(OperandId, "'TMin'");
InstructionDesc[OpHitObjectRecordHitWithIndexMotionNV].operands.push(OperandId, "'Direction'");
InstructionDesc[OpHitObjectRecordHitWithIndexMotionNV].operands.push(OperandId, "'TMax'");
InstructionDesc[OpHitObjectRecordHitWithIndexMotionNV].operands.push(OperandId, "'Current Time'");
InstructionDesc[OpHitObjectRecordHitWithIndexMotionNV].operands.push(OperandId, "'HitObject Attribute'");
InstructionDesc[OpHitObjectRecordHitWithIndexMotionNV].setResultAndType(false, false);
InstructionDesc[OpHitObjectRecordMissNV].operands.push(OperandId, "'HitObject'");
InstructionDesc[OpHitObjectRecordMissNV].operands.push(OperandId, "'SBT Index'");
InstructionDesc[OpHitObjectRecordMissNV].operands.push(OperandId, "'Origin'");
InstructionDesc[OpHitObjectRecordMissNV].operands.push(OperandId, "'TMin'");
InstructionDesc[OpHitObjectRecordMissNV].operands.push(OperandId, "'Direction'");
InstructionDesc[OpHitObjectRecordMissNV].operands.push(OperandId, "'TMax'");
InstructionDesc[OpHitObjectRecordMissNV].setResultAndType(false, false);
InstructionDesc[OpHitObjectRecordMissMotionNV].operands.push(OperandId, "'HitObject'");
InstructionDesc[OpHitObjectRecordMissMotionNV].operands.push(OperandId, "'SBT Index'");
InstructionDesc[OpHitObjectRecordMissMotionNV].operands.push(OperandId, "'Origin'");
InstructionDesc[OpHitObjectRecordMissMotionNV].operands.push(OperandId, "'TMin'");
InstructionDesc[OpHitObjectRecordMissMotionNV].operands.push(OperandId, "'Direction'");
InstructionDesc[OpHitObjectRecordMissMotionNV].operands.push(OperandId, "'TMax'");
InstructionDesc[OpHitObjectRecordMissMotionNV].operands.push(OperandId, "'Current Time'");
InstructionDesc[OpHitObjectRecordMissMotionNV].setResultAndType(false, false);
InstructionDesc[OpHitObjectRecordEmptyNV].operands.push(OperandId, "'HitObject'");
InstructionDesc[OpHitObjectRecordEmptyNV].setResultAndType(false, false);
InstructionDesc[OpHitObjectTraceRayNV].operands.push(OperandId, "'HitObject'");
InstructionDesc[OpHitObjectTraceRayNV].operands.push(OperandId, "'Acceleration Structure'");
InstructionDesc[OpHitObjectTraceRayNV].operands.push(OperandId, "'RayFlags'");
InstructionDesc[OpHitObjectTraceRayNV].operands.push(OperandId, "'Cullmask'");
InstructionDesc[OpHitObjectTraceRayNV].operands.push(OperandId, "'SBT Record Offset'");
InstructionDesc[OpHitObjectTraceRayNV].operands.push(OperandId, "'SBT Record Stride'");
InstructionDesc[OpHitObjectTraceRayNV].operands.push(OperandId, "'Miss Index'");
InstructionDesc[OpHitObjectTraceRayNV].operands.push(OperandId, "'Origin'");
InstructionDesc[OpHitObjectTraceRayNV].operands.push(OperandId, "'TMin'");
InstructionDesc[OpHitObjectTraceRayNV].operands.push(OperandId, "'Direction'");
InstructionDesc[OpHitObjectTraceRayNV].operands.push(OperandId, "'TMax'");
InstructionDesc[OpHitObjectTraceRayNV].operands.push(OperandId, "'Payload'");
InstructionDesc[OpHitObjectTraceRayNV].setResultAndType(false, false);
InstructionDesc[OpHitObjectTraceRayMotionNV].operands.push(OperandId, "'HitObject'");
InstructionDesc[OpHitObjectTraceRayMotionNV].operands.push(OperandId, "'Acceleration Structure'");
InstructionDesc[OpHitObjectTraceRayMotionNV].operands.push(OperandId, "'RayFlags'");
InstructionDesc[OpHitObjectTraceRayMotionNV].operands.push(OperandId, "'Cullmask'");
InstructionDesc[OpHitObjectTraceRayMotionNV].operands.push(OperandId, "'SBT Record Offset'");
InstructionDesc[OpHitObjectTraceRayMotionNV].operands.push(OperandId, "'SBT Record Stride'");
InstructionDesc[OpHitObjectTraceRayMotionNV].operands.push(OperandId, "'Miss Index'");
InstructionDesc[OpHitObjectTraceRayMotionNV].operands.push(OperandId, "'Origin'");
InstructionDesc[OpHitObjectTraceRayMotionNV].operands.push(OperandId, "'TMin'");
InstructionDesc[OpHitObjectTraceRayMotionNV].operands.push(OperandId, "'Direction'");
InstructionDesc[OpHitObjectTraceRayMotionNV].operands.push(OperandId, "'TMax'");
InstructionDesc[OpHitObjectTraceRayMotionNV].operands.push(OperandId, "'Time'");
InstructionDesc[OpHitObjectTraceRayMotionNV].operands.push(OperandId, "'Payload'");
InstructionDesc[OpHitObjectTraceRayMotionNV].setResultAndType(false, false);
InstructionDesc[OpFetchMicroTriangleVertexBarycentricNV].operands.push(OperandId, "'Acceleration Structure'");
InstructionDesc[OpFetchMicroTriangleVertexBarycentricNV].operands.push(OperandId, "'Instance ID'");
InstructionDesc[OpFetchMicroTriangleVertexBarycentricNV].operands.push(OperandId, "'Geometry Index'");
InstructionDesc[OpFetchMicroTriangleVertexBarycentricNV].operands.push(OperandId, "'Primitive Index'");
InstructionDesc[OpFetchMicroTriangleVertexBarycentricNV].operands.push(OperandId, "'Barycentrics'");
InstructionDesc[OpFetchMicroTriangleVertexBarycentricNV].setResultAndType(true, true);
InstructionDesc[OpFetchMicroTriangleVertexPositionNV].operands.push(OperandId, "'Acceleration Structure'");
InstructionDesc[OpFetchMicroTriangleVertexPositionNV].operands.push(OperandId, "'Instance ID'");
InstructionDesc[OpFetchMicroTriangleVertexPositionNV].operands.push(OperandId, "'Geometry Index'");
InstructionDesc[OpFetchMicroTriangleVertexPositionNV].operands.push(OperandId, "'Primitive Index'");
InstructionDesc[OpFetchMicroTriangleVertexPositionNV].operands.push(OperandId, "'Barycentrics'");
InstructionDesc[OpFetchMicroTriangleVertexPositionNV].setResultAndType(true, true);
InstructionDesc[OpColorAttachmentReadEXT].operands.push(OperandId, "'Attachment'");
InstructionDesc[OpColorAttachmentReadEXT].operands.push(OperandId, "'Sample'", true);
InstructionDesc[OpStencilAttachmentReadEXT].operands.push(OperandId, "'Sample'", true);
InstructionDesc[OpDepthAttachmentReadEXT].operands.push(OperandId, "'Sample'", true);
InstructionDesc[OpImageSampleWeightedQCOM].operands.push(OperandId, "'source texture'");
InstructionDesc[OpImageSampleWeightedQCOM].operands.push(OperandId, "'texture coordinates'");
InstructionDesc[OpImageSampleWeightedQCOM].operands.push(OperandId, "'weights texture'");
InstructionDesc[OpImageSampleWeightedQCOM].operands.push(OperandImageOperands, "", true);
InstructionDesc[OpImageSampleWeightedQCOM].setResultAndType(true, true);
InstructionDesc[OpImageBoxFilterQCOM].operands.push(OperandId, "'source texture'");
InstructionDesc[OpImageBoxFilterQCOM].operands.push(OperandId, "'texture coordinates'");
InstructionDesc[OpImageBoxFilterQCOM].operands.push(OperandId, "'box size'");
InstructionDesc[OpImageBoxFilterQCOM].operands.push(OperandImageOperands, "", true);
InstructionDesc[OpImageBoxFilterQCOM].setResultAndType(true, true);
InstructionDesc[OpImageBlockMatchSADQCOM].operands.push(OperandId, "'target texture'");
InstructionDesc[OpImageBlockMatchSADQCOM].operands.push(OperandId, "'target coordinates'");
InstructionDesc[OpImageBlockMatchSADQCOM].operands.push(OperandId, "'reference texture'");
InstructionDesc[OpImageBlockMatchSADQCOM].operands.push(OperandId, "'reference coordinates'");
InstructionDesc[OpImageBlockMatchSADQCOM].operands.push(OperandId, "'block size'");
InstructionDesc[OpImageBlockMatchSADQCOM].operands.push(OperandImageOperands, "", true);
InstructionDesc[OpImageBlockMatchSADQCOM].setResultAndType(true, true);
InstructionDesc[OpImageBlockMatchSSDQCOM].operands.push(OperandId, "'target texture'");
InstructionDesc[OpImageBlockMatchSSDQCOM].operands.push(OperandId, "'target coordinates'");
InstructionDesc[OpImageBlockMatchSSDQCOM].operands.push(OperandId, "'reference texture'");
InstructionDesc[OpImageBlockMatchSSDQCOM].operands.push(OperandId, "'reference coordinates'");
InstructionDesc[OpImageBlockMatchSSDQCOM].operands.push(OperandId, "'block size'");
InstructionDesc[OpImageBlockMatchSSDQCOM].operands.push(OperandImageOperands, "", true);
InstructionDesc[OpImageBlockMatchSSDQCOM].setResultAndType(true, true);
});
}
}; // end spv namespace

View File

@ -156,6 +156,7 @@ enum OperandClass {
OperandKernelEnqueueFlags,
OperandKernelProfilingInfo,
OperandCapability,
OperandCooperativeMatrixOperands,
OperandOpcode,
@ -239,8 +240,8 @@ public:
OperandParameters operands;
protected:
int typePresent : 1;
int resultPresent : 1;
unsigned typePresent : 1; // @MEWIN - 2022-12-07 - Changed to unsigned to get rid of -Woverflow warnings.
unsigned resultPresent : 1; // @MEWIN - 2022-12-07 - Changed to unsigned to get rid of -Woverflow warnings.
};
// The set of objects that hold all the instruction/operand

View File

@ -23,19 +23,6 @@
#include <limits>
#include <sstream>
#if defined(_MSC_VER) && _MSC_VER < 1800
namespace std {
bool isnan(double f)
{
return ::_isnan(f) != 0;
}
bool isinf(double f)
{
return ::_finite(f) == 0;
}
}
#endif
#include "bitutils.h"
namespace spvutils {

View File

@ -26,7 +26,7 @@
// the Binary Section of the SPIR-V specification.
// Enumeration tokens for SPIR-V, in various styles:
// C, C++, C++11, JSON, Lua, Python, C#, D
// C, C++, C++11, JSON, Lua, Python, C#, D, Beef
//
// - C will have tokens with a "Spv" prefix, e.g.: SpvSourceLanguageGLSL
// - C++ will have tokens in the "spv" name space, e.g.: spv::SourceLanguageGLSL
@ -36,6 +36,8 @@
// - C# will use enum classes in the Specification class located in the "Spv" namespace,
// e.g.: Spv.Specification.SourceLanguage.GLSL
// - D will have tokens under the "spv" module, e.g: spv.SourceLanguage.GLSL
// - Beef will use enum classes in the Specification class located in the "Spv" namespace,
// e.g.: Spv.Specification.SourceLanguage.GLSL
//
// Some tokens act like mask values, which can be OR'd together,
// while others are mutually exclusive. The mask-like ones have
@ -66,6 +68,7 @@ enum SourceLanguage {
SourceLanguageOpenCL_CPP = 4,
SourceLanguageHLSL = 5,
SourceLanguageCPP_for_OpenCL = 6,
SourceLanguageSYCL = 7,
SourceLanguageMax = 0x7fffffff,
};
@ -153,6 +156,9 @@ enum ExecutionMode {
ExecutionModeSubgroupsPerWorkgroupId = 37,
ExecutionModeLocalSizeId = 38,
ExecutionModeLocalSizeHintId = 39,
ExecutionModeNonCoherentColorAttachmentReadEXT = 4169,
ExecutionModeNonCoherentDepthAttachmentReadEXT = 4170,
ExecutionModeNonCoherentStencilAttachmentReadEXT = 4171,
ExecutionModeSubgroupUniformControlFlowKHR = 4421,
ExecutionModePostDepthCoverage = 4446,
ExecutionModeDenormPreserve = 4459,
@ -192,6 +198,8 @@ enum ExecutionMode {
ExecutionModeNoGlobalOffsetINTEL = 5895,
ExecutionModeNumSIMDWorkitemsINTEL = 5896,
ExecutionModeSchedulerTargetFmaxMhzINTEL = 5903,
ExecutionModeStreamingInterfaceINTEL = 6154,
ExecutionModeNamedBarrierCountINTEL = 6417,
ExecutionModeMax = 0x7fffffff,
};
@ -209,6 +217,7 @@ enum StorageClass {
StorageClassAtomicCounter = 10,
StorageClassImage = 11,
StorageClassStorageBuffer = 12,
StorageClassTileImageEXT = 4172,
StorageClassCallableDataKHR = 5328,
StorageClassCallableDataNV = 5328,
StorageClassIncomingCallableDataKHR = 5329,
@ -223,6 +232,7 @@ enum StorageClass {
StorageClassShaderRecordBufferNV = 5343,
StorageClassPhysicalStorageBuffer = 5349,
StorageClassPhysicalStorageBufferEXT = 5349,
StorageClassHitObjectAttributeNV = 5385,
StorageClassTaskPayloadWorkgroupEXT = 5402,
StorageClassCodeSectionINTEL = 5605,
StorageClassDeviceOnlyINTEL = 5936,
@ -238,6 +248,7 @@ enum Dim {
DimRect = 4,
DimBuffer = 5,
DimSubpassData = 6,
DimTileImageDataEXT = 4173,
DimMax = 0x7fffffff,
};
@ -448,6 +459,7 @@ enum FunctionParameterAttribute {
FunctionParameterAttributeNoCapture = 5,
FunctionParameterAttributeNoWrite = 6,
FunctionParameterAttributeNoReadWrite = 7,
FunctionParameterAttributeRuntimeAlignedINTEL = 5940,
FunctionParameterAttributeMax = 0x7fffffff,
};
@ -501,6 +513,8 @@ enum Decoration {
DecorationMaxByteOffsetId = 47,
DecorationNoSignedWrap = 4469,
DecorationNoUnsignedWrap = 4470,
DecorationWeightTextureQCOM = 4487,
DecorationBlockMatchTextureQCOM = 4488,
DecorationExplicitInterpAMD = 4999,
DecorationOverrideCoverageNV = 5248,
DecorationPassthroughNV = 5250,
@ -518,6 +532,7 @@ enum Decoration {
DecorationRestrictPointerEXT = 5355,
DecorationAliasedPointer = 5356,
DecorationAliasedPointerEXT = 5356,
DecorationHitObjectShaderRecordBufferNV = 5386,
DecorationBindlessSamplerNV = 5398,
DecorationBindlessImageNV = 5399,
DecorationBoundSamplerNV = 5400,
@ -556,12 +571,27 @@ enum Decoration {
DecorationPrefetchINTEL = 5902,
DecorationStallEnableINTEL = 5905,
DecorationFuseLoopsInFunctionINTEL = 5907,
DecorationMathOpDSPModeINTEL = 5909,
DecorationAliasScopeINTEL = 5914,
DecorationNoAliasINTEL = 5915,
DecorationInitiationIntervalINTEL = 5917,
DecorationMaxConcurrencyINTEL = 5918,
DecorationPipelineEnableINTEL = 5919,
DecorationBufferLocationINTEL = 5921,
DecorationIOPipeStorageINTEL = 5944,
DecorationFunctionFloatingPointModeINTEL = 6080,
DecorationSingleElementVectorINTEL = 6085,
DecorationVectorComputeCallableFunctionINTEL = 6087,
DecorationMediaBlockIOINTEL = 6140,
DecorationConduitKernelArgumentINTEL = 6175,
DecorationRegisterMapKernelArgumentINTEL = 6176,
DecorationMMHostInterfaceAddressWidthINTEL = 6177,
DecorationMMHostInterfaceDataWidthINTEL = 6178,
DecorationMMHostInterfaceLatencyINTEL = 6179,
DecorationMMHostInterfaceReadWriteModeINTEL = 6180,
DecorationMMHostInterfaceMaxBurstINTEL = 6181,
DecorationMMHostInterfaceWaitRequestINTEL = 6182,
DecorationStableKernelArgumentINTEL = 6183,
DecorationMax = 0x7fffffff,
};
@ -607,8 +637,8 @@ enum BuiltIn {
BuiltInSubgroupLocalInvocationId = 41,
BuiltInVertexIndex = 42,
BuiltInInstanceIndex = 43,
BuiltInCoreCountARM = 4161,
BuiltInCoreIDARM = 4160,
BuiltInCoreCountARM = 4161,
BuiltInCoreMaxIDARM = 4162,
BuiltInWarpIDARM = 4163,
BuiltInWarpMaxIDARM = 4164,
@ -689,6 +719,11 @@ enum BuiltIn {
BuiltInHitKindKHR = 5333,
BuiltInHitKindNV = 5333,
BuiltInCurrentRayTimeNV = 5334,
BuiltInHitTriangleVertexPositionsKHR = 5335,
BuiltInHitMicroTriangleVertexPositionsNV = 5337,
BuiltInHitMicroTriangleVertexBarycentricsNV = 5344,
BuiltInHitKindFrontFacingMicroTriangleNV = 5405,
BuiltInHitKindBackFacingMicroTriangleNV = 5406,
BuiltInIncomingRayFlagsKHR = 5351,
BuiltInIncomingRayFlagsNV = 5351,
BuiltInRayGeometryIndexKHR = 5352,
@ -730,6 +765,8 @@ enum LoopControlShift {
LoopControlMaxInterleavingINTELShift = 21,
LoopControlSpeculatedIterationsINTELShift = 22,
LoopControlNoFusionINTELShift = 23,
LoopControlLoopCountINTELShift = 24,
LoopControlMaxReinvocationDelayINTELShift = 25,
LoopControlMax = 0x7fffffff,
};
@ -752,6 +789,8 @@ enum LoopControlMask {
LoopControlMaxInterleavingINTELMask = 0x00200000,
LoopControlSpeculatedIterationsINTELMask = 0x00400000,
LoopControlNoFusionINTELMask = 0x00800000,
LoopControlLoopCountINTELMask = 0x01000000,
LoopControlMaxReinvocationDelayINTELMask = 0x02000000,
};
enum FunctionControlShift {
@ -824,6 +863,8 @@ enum MemoryAccessShift {
MemoryAccessMakePointerVisibleKHRShift = 4,
MemoryAccessNonPrivatePointerShift = 5,
MemoryAccessNonPrivatePointerKHRShift = 5,
MemoryAccessAliasScopeINTELMaskShift = 16,
MemoryAccessNoAliasINTELMaskShift = 17,
MemoryAccessMax = 0x7fffffff,
};
@ -838,6 +879,8 @@ enum MemoryAccessMask {
MemoryAccessMakePointerVisibleKHRMask = 0x00000010,
MemoryAccessNonPrivatePointerMask = 0x00000020,
MemoryAccessNonPrivatePointerKHRMask = 0x00000020,
MemoryAccessAliasScopeINTELMaskMask = 0x00010000,
MemoryAccessNoAliasINTELMaskMask = 0x00020000,
};
enum Scope {
@ -952,6 +995,9 @@ enum Capability {
CapabilityShaderViewportIndex = 70,
CapabilityUniformDecoration = 71,
CapabilityCoreBuiltinsARM = 4165,
CapabilityTileImageColorReadAccessEXT = 4166,
CapabilityTileImageDepthReadAccessEXT = 4167,
CapabilityTileImageStencilReadAccessEXT = 4168,
CapabilityFragmentShadingRateKHR = 4422,
CapabilitySubgroupBallotKHR = 4423,
CapabilityDrawParameters = 4427,
@ -983,6 +1029,9 @@ enum Capability {
CapabilityRayQueryKHR = 4472,
CapabilityRayTraversalPrimitiveCullingKHR = 4478,
CapabilityRayTracingKHR = 4479,
CapabilityTextureSampleWeightedQCOM = 4484,
CapabilityTextureBoxFilterQCOM = 4485,
CapabilityTextureBlockMatchQCOM = 4486,
CapabilityFloat16ImageAMD = 5008,
CapabilityImageGatherBiasLodAMD = 5009,
CapabilityFragmentMaskAMD = 5010,
@ -1031,6 +1080,7 @@ enum Capability {
CapabilityUniformTexelBufferArrayNonUniformIndexingEXT = 5311,
CapabilityStorageTexelBufferArrayNonUniformIndexing = 5312,
CapabilityStorageTexelBufferArrayNonUniformIndexingEXT = 5312,
CapabilityRayTracingPositionFetchKHR = 5336,
CapabilityRayTracingNV = 5340,
CapabilityRayTracingMotionBlurNV = 5341,
CapabilityVulkanMemoryModel = 5345,
@ -1048,7 +1098,12 @@ enum Capability {
CapabilityFragmentShaderPixelInterlockEXT = 5378,
CapabilityDemoteToHelperInvocation = 5379,
CapabilityDemoteToHelperInvocationEXT = 5379,
CapabilityDisplacementMicromapNV = 5380,
CapabilityRayTracingDisplacementMicromapNV = 5409,
CapabilityRayTracingOpacityMicromapEXT = 5381,
CapabilityShaderInvocationReorderNV = 5383,
CapabilityBindlessTextureNV = 5390,
CapabilityRayQueryPositionFetchKHR = 5391,
CapabilitySubgroupShuffleINTEL = 5568,
CapabilitySubgroupBufferBlockIOINTEL = 5569,
CapabilitySubgroupImageBlockIOINTEL = 5570,
@ -1081,9 +1136,13 @@ enum Capability {
CapabilityFPGAMemoryAccessesINTEL = 5898,
CapabilityFPGAClusterAttributesINTEL = 5904,
CapabilityLoopFuseINTEL = 5906,
CapabilityFPGADSPControlINTEL = 5908,
CapabilityMemoryAccessAliasingINTEL = 5910,
CapabilityFPGAInvocationPipeliningAttributesINTEL = 5916,
CapabilityFPGABufferLocationINTEL = 5920,
CapabilityArbitraryPrecisionFixedPointINTEL = 5922,
CapabilityUSMStorageClassesINTEL = 5935,
CapabilityRuntimeAlignedAttributeINTEL = 5939,
CapabilityIOPipesINTEL = 5943,
CapabilityBlockingPipesINTEL = 5945,
CapabilityFPGARegINTEL = 5948,
@ -1096,13 +1155,18 @@ enum Capability {
CapabilityDotProduct = 6019,
CapabilityDotProductKHR = 6019,
CapabilityRayCullMaskKHR = 6020,
CapabilityCooperativeMatrixKHR = 6022,
CapabilityBitInstructions = 6025,
CapabilityGroupNonUniformRotateKHR = 6026,
CapabilityAtomicFloat32AddEXT = 6033,
CapabilityAtomicFloat64AddEXT = 6034,
CapabilityLongConstantCompositeINTEL = 6089,
CapabilityOptNoneINTEL = 6094,
CapabilityAtomicFloat16AddEXT = 6095,
CapabilityDebugInfoModuleINTEL = 6114,
CapabilitySplitBarrierINTEL = 6141,
CapabilityFPGAArgumentInterfacesINTEL = 6174,
CapabilityGroupUniformArithmeticKHR = 6400,
CapabilityMax = 0x7fffffff,
};
@ -1117,6 +1181,7 @@ enum RayFlagsShift {
RayFlagsCullNoOpaqueKHRShift = 7,
RayFlagsSkipTrianglesKHRShift = 8,
RayFlagsSkipAABBsKHRShift = 9,
RayFlagsForceOpacityMicromap2StateEXTShift = 10,
RayFlagsMax = 0x7fffffff,
};
@ -1132,6 +1197,7 @@ enum RayFlagsMask {
RayFlagsCullNoOpaqueKHRMask = 0x00000080,
RayFlagsSkipTrianglesKHRMask = 0x00000100,
RayFlagsSkipAABBsKHRMask = 0x00000200,
RayFlagsForceOpacityMicromap2StateEXTMask = 0x00000400,
};
enum RayQueryIntersection {
@ -1207,6 +1273,37 @@ enum PackedVectorFormat {
PackedVectorFormatMax = 0x7fffffff,
};
enum CooperativeMatrixOperandsShift {
CooperativeMatrixOperandsMatrixASignedComponentsShift = 0,
CooperativeMatrixOperandsMatrixBSignedComponentsShift = 1,
CooperativeMatrixOperandsMatrixCSignedComponentsShift = 2,
CooperativeMatrixOperandsMatrixResultSignedComponentsShift = 3,
CooperativeMatrixOperandsSaturatingAccumulationShift = 4,
CooperativeMatrixOperandsMax = 0x7fffffff,
};
enum CooperativeMatrixOperandsMask {
CooperativeMatrixOperandsMaskNone = 0,
CooperativeMatrixOperandsMatrixASignedComponentsMask = 0x00000001,
CooperativeMatrixOperandsMatrixBSignedComponentsMask = 0x00000002,
CooperativeMatrixOperandsMatrixCSignedComponentsMask = 0x00000004,
CooperativeMatrixOperandsMatrixResultSignedComponentsMask = 0x00000008,
CooperativeMatrixOperandsSaturatingAccumulationMask = 0x00000010,
};
enum CooperativeMatrixLayout {
CooperativeMatrixLayoutCooperativeMatrixRowMajorKHR = 0,
CooperativeMatrixLayoutCooperativeMatrixColumnMajorKHR = 1,
CooperativeMatrixLayoutMax = 0x7fffffff,
};
enum CooperativeMatrixUse {
CooperativeMatrixUseMatrixAKHR = 0,
CooperativeMatrixUseMatrixBKHR = 1,
CooperativeMatrixUseMatrixAccumulatorKHR = 2,
CooperativeMatrixUseMax = 0x7fffffff,
};
enum Op {
OpNop = 0,
OpUndef = 1,
@ -1552,12 +1649,16 @@ enum Op {
OpPtrEqual = 401,
OpPtrNotEqual = 402,
OpPtrDiff = 403,
OpColorAttachmentReadEXT = 4160,
OpDepthAttachmentReadEXT = 4161,
OpStencilAttachmentReadEXT = 4162,
OpTerminateInvocation = 4416,
OpSubgroupBallotKHR = 4421,
OpSubgroupFirstInvocationKHR = 4422,
OpSubgroupAllKHR = 4428,
OpSubgroupAnyKHR = 4429,
OpSubgroupAllEqualKHR = 4430,
OpGroupNonUniformRotateKHR = 4431,
OpSubgroupReadInvocationKHR = 4432,
OpTraceRayKHR = 4445,
OpExecuteCallableKHR = 4446,
@ -1576,6 +1677,11 @@ enum Op {
OpUDotAccSatKHR = 4454,
OpSUDotAccSat = 4455,
OpSUDotAccSatKHR = 4455,
OpTypeCooperativeMatrixKHR = 4456,
OpCooperativeMatrixLoadKHR = 4457,
OpCooperativeMatrixStoreKHR = 4458,
OpCooperativeMatrixMulAddKHR = 4459,
OpCooperativeMatrixLengthKHR = 4460,
OpTypeRayQueryKHR = 4472,
OpRayQueryInitializeKHR = 4473,
OpRayQueryTerminateKHR = 4474,
@ -1583,6 +1689,10 @@ enum Op {
OpRayQueryConfirmIntersectionKHR = 4476,
OpRayQueryProceedKHR = 4477,
OpRayQueryGetIntersectionTypeKHR = 4479,
OpImageSampleWeightedQCOM = 4480,
OpImageBoxFilterQCOM = 4481,
OpImageBlockMatchSSDQCOM = 4482,
OpImageBlockMatchSADQCOM = 4483,
OpGroupIAddNonUniformAMD = 5000,
OpGroupFAddNonUniformAMD = 5001,
OpGroupFMinNonUniformAMD = 5002,
@ -1594,11 +1704,46 @@ enum Op {
OpFragmentMaskFetchAMD = 5011,
OpFragmentFetchAMD = 5012,
OpReadClockKHR = 5056,
OpHitObjectRecordHitMotionNV = 5249,
OpHitObjectRecordHitWithIndexMotionNV = 5250,
OpHitObjectRecordMissMotionNV = 5251,
OpHitObjectGetWorldToObjectNV = 5252,
OpHitObjectGetObjectToWorldNV = 5253,
OpHitObjectGetObjectRayDirectionNV = 5254,
OpHitObjectGetObjectRayOriginNV = 5255,
OpHitObjectTraceRayMotionNV = 5256,
OpHitObjectGetShaderRecordBufferHandleNV = 5257,
OpHitObjectGetShaderBindingTableRecordIndexNV = 5258,
OpHitObjectRecordEmptyNV = 5259,
OpHitObjectTraceRayNV = 5260,
OpHitObjectRecordHitNV = 5261,
OpHitObjectRecordHitWithIndexNV = 5262,
OpHitObjectRecordMissNV = 5263,
OpHitObjectExecuteShaderNV = 5264,
OpHitObjectGetCurrentTimeNV = 5265,
OpHitObjectGetAttributesNV = 5266,
OpHitObjectGetHitKindNV = 5267,
OpHitObjectGetPrimitiveIndexNV = 5268,
OpHitObjectGetGeometryIndexNV = 5269,
OpHitObjectGetInstanceIdNV = 5270,
OpHitObjectGetInstanceCustomIndexNV = 5271,
OpHitObjectGetWorldRayDirectionNV = 5272,
OpHitObjectGetWorldRayOriginNV = 5273,
OpHitObjectGetRayTMaxNV = 5274,
OpHitObjectGetRayTMinNV = 5275,
OpHitObjectIsEmptyNV = 5276,
OpHitObjectIsHitNV = 5277,
OpHitObjectIsMissNV = 5278,
OpReorderThreadWithHitObjectNV = 5279,
OpReorderThreadWithHintNV = 5280,
OpTypeHitObjectNV = 5281,
OpImageSampleFootprintNV = 5283,
OpEmitMeshTasksEXT = 5294,
OpSetMeshOutputsEXT = 5295,
OpGroupNonUniformPartitionNV = 5296,
OpWritePackedPrimitiveIndices4x8NV = 5299,
OpFetchMicroTriangleVertexPositionNV = 5300,
OpFetchMicroTriangleVertexBarycentricNV = 5301,
OpReportIntersectionKHR = 5334,
OpReportIntersectionNV = 5334,
OpIgnoreIntersectionNV = 5335,
@ -1606,6 +1751,7 @@ enum Op {
OpTraceNV = 5337,
OpTraceMotionNV = 5338,
OpTraceRayMotionNV = 5339,
OpRayQueryGetIntersectionTriangleVertexPositionsKHR = 5340,
OpTypeAccelerationStructureKHR = 5341,
OpTypeAccelerationStructureNV = 5341,
OpExecuteCallableNV = 5344,
@ -1826,6 +1972,9 @@ enum Op {
OpArbitraryFloatPowRINTEL = 5881,
OpArbitraryFloatPowNINTEL = 5882,
OpLoopControlINTEL = 5887,
OpAliasDomainDeclINTEL = 5911,
OpAliasScopeDeclINTEL = 5912,
OpAliasScopeListDeclINTEL = 5913,
OpFixedSqrtINTEL = 5923,
OpFixedRecipINTEL = 5924,
OpFixedRsqrtINTEL = 5925,
@ -1864,10 +2013,23 @@ enum Op {
OpTypeStructContinuedINTEL = 6090,
OpConstantCompositeContinuedINTEL = 6091,
OpSpecConstantCompositeContinuedINTEL = 6092,
OpControlBarrierArriveINTEL = 6142,
OpControlBarrierWaitINTEL = 6143,
OpGroupIMulKHR = 6401,
OpGroupFMulKHR = 6402,
OpGroupBitwiseAndKHR = 6403,
OpGroupBitwiseOrKHR = 6404,
OpGroupBitwiseXorKHR = 6405,
OpGroupLogicalAndKHR = 6406,
OpGroupLogicalOrKHR = 6407,
OpGroupLogicalXorKHR = 6408,
OpMax = 0x7fffffff,
};
#ifdef SPV_ENABLE_UTILITY_CODE
#ifndef __cplusplus
#include <stdbool.h>
#endif
inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) {
*hasResult = *hasResultType = false;
switch (opcode) {
@ -2216,12 +2378,16 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) {
case OpPtrEqual: *hasResult = true; *hasResultType = true; break;
case OpPtrNotEqual: *hasResult = true; *hasResultType = true; break;
case OpPtrDiff: *hasResult = true; *hasResultType = true; break;
case OpColorAttachmentReadEXT: *hasResult = true; *hasResultType = true; break;
case OpDepthAttachmentReadEXT: *hasResult = true; *hasResultType = true; break;
case OpStencilAttachmentReadEXT: *hasResult = true; *hasResultType = true; break;
case OpTerminateInvocation: *hasResult = false; *hasResultType = false; break;
case OpSubgroupBallotKHR: *hasResult = true; *hasResultType = true; break;
case OpSubgroupFirstInvocationKHR: *hasResult = true; *hasResultType = true; break;
case OpSubgroupAllKHR: *hasResult = true; *hasResultType = true; break;
case OpSubgroupAnyKHR: *hasResult = true; *hasResultType = true; break;
case OpSubgroupAllEqualKHR: *hasResult = true; *hasResultType = true; break;
case OpGroupNonUniformRotateKHR: *hasResult = true; *hasResultType = true; break;
case OpSubgroupReadInvocationKHR: *hasResult = true; *hasResultType = true; break;
case OpTraceRayKHR: *hasResult = false; *hasResultType = false; break;
case OpExecuteCallableKHR: *hasResult = false; *hasResultType = false; break;
@ -2234,6 +2400,11 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) {
case OpSDotAccSat: *hasResult = true; *hasResultType = true; break;
case OpUDotAccSat: *hasResult = true; *hasResultType = true; break;
case OpSUDotAccSat: *hasResult = true; *hasResultType = true; break;
case OpTypeCooperativeMatrixKHR: *hasResult = true; *hasResultType = false; break;
case OpCooperativeMatrixLoadKHR: *hasResult = true; *hasResultType = true; break;
case OpCooperativeMatrixStoreKHR: *hasResult = false; *hasResultType = false; break;
case OpCooperativeMatrixMulAddKHR: *hasResult = true; *hasResultType = true; break;
case OpCooperativeMatrixLengthKHR: *hasResult = true; *hasResultType = true; break;
case OpTypeRayQueryKHR: *hasResult = true; *hasResultType = false; break;
case OpRayQueryInitializeKHR: *hasResult = false; *hasResultType = false; break;
case OpRayQueryTerminateKHR: *hasResult = false; *hasResultType = false; break;
@ -2241,6 +2412,10 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) {
case OpRayQueryConfirmIntersectionKHR: *hasResult = false; *hasResultType = false; break;
case OpRayQueryProceedKHR: *hasResult = true; *hasResultType = true; break;
case OpRayQueryGetIntersectionTypeKHR: *hasResult = true; *hasResultType = true; break;
case OpImageSampleWeightedQCOM: *hasResult = true; *hasResultType = true; break;
case OpImageBoxFilterQCOM: *hasResult = true; *hasResultType = true; break;
case OpImageBlockMatchSSDQCOM: *hasResult = true; *hasResultType = true; break;
case OpImageBlockMatchSADQCOM: *hasResult = true; *hasResultType = true; break;
case OpGroupIAddNonUniformAMD: *hasResult = true; *hasResultType = true; break;
case OpGroupFAddNonUniformAMD: *hasResult = true; *hasResultType = true; break;
case OpGroupFMinNonUniformAMD: *hasResult = true; *hasResultType = true; break;
@ -2252,10 +2427,43 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) {
case OpFragmentMaskFetchAMD: *hasResult = true; *hasResultType = true; break;
case OpFragmentFetchAMD: *hasResult = true; *hasResultType = true; break;
case OpReadClockKHR: *hasResult = true; *hasResultType = true; break;
case OpHitObjectRecordHitMotionNV: *hasResult = false; *hasResultType = false; break;
case OpHitObjectRecordHitWithIndexMotionNV: *hasResult = false; *hasResultType = false; break;
case OpHitObjectRecordMissMotionNV: *hasResult = false; *hasResultType = false; break;
case OpHitObjectGetWorldToObjectNV: *hasResult = true; *hasResultType = true; break;
case OpHitObjectGetObjectToWorldNV: *hasResult = true; *hasResultType = true; break;
case OpHitObjectGetObjectRayDirectionNV: *hasResult = true; *hasResultType = true; break;
case OpHitObjectGetObjectRayOriginNV: *hasResult = true; *hasResultType = true; break;
case OpHitObjectTraceRayMotionNV: *hasResult = false; *hasResultType = false; break;
case OpHitObjectGetShaderRecordBufferHandleNV: *hasResult = true; *hasResultType = true; break;
case OpHitObjectGetShaderBindingTableRecordIndexNV: *hasResult = true; *hasResultType = true; break;
case OpHitObjectRecordEmptyNV: *hasResult = false; *hasResultType = false; break;
case OpHitObjectTraceRayNV: *hasResult = false; *hasResultType = false; break;
case OpHitObjectRecordHitNV: *hasResult = false; *hasResultType = false; break;
case OpHitObjectRecordHitWithIndexNV: *hasResult = false; *hasResultType = false; break;
case OpHitObjectRecordMissNV: *hasResult = false; *hasResultType = false; break;
case OpHitObjectExecuteShaderNV: *hasResult = false; *hasResultType = false; break;
case OpHitObjectGetCurrentTimeNV: *hasResult = true; *hasResultType = true; break;
case OpHitObjectGetAttributesNV: *hasResult = false; *hasResultType = false; break;
case OpHitObjectGetHitKindNV: *hasResult = true; *hasResultType = true; break;
case OpHitObjectGetPrimitiveIndexNV: *hasResult = true; *hasResultType = true; break;
case OpHitObjectGetGeometryIndexNV: *hasResult = true; *hasResultType = true; break;
case OpHitObjectGetInstanceIdNV: *hasResult = true; *hasResultType = true; break;
case OpHitObjectGetInstanceCustomIndexNV: *hasResult = true; *hasResultType = true; break;
case OpHitObjectGetWorldRayDirectionNV: *hasResult = true; *hasResultType = true; break;
case OpHitObjectGetWorldRayOriginNV: *hasResult = true; *hasResultType = true; break;
case OpHitObjectGetRayTMaxNV: *hasResult = true; *hasResultType = true; break;
case OpHitObjectGetRayTMinNV: *hasResult = true; *hasResultType = true; break;
case OpHitObjectIsEmptyNV: *hasResult = true; *hasResultType = true; break;
case OpHitObjectIsHitNV: *hasResult = true; *hasResultType = true; break;
case OpHitObjectIsMissNV: *hasResult = true; *hasResultType = true; break;
case OpReorderThreadWithHitObjectNV: *hasResult = false; *hasResultType = false; break;
case OpReorderThreadWithHintNV: *hasResult = false; *hasResultType = false; break;
case OpTypeHitObjectNV: *hasResult = true; *hasResultType = false; break;
case OpImageSampleFootprintNV: *hasResult = true; *hasResultType = true; break;
case OpGroupNonUniformPartitionNV: *hasResult = true; *hasResultType = true; break;
case OpEmitMeshTasksEXT: *hasResult = false; *hasResultType = false; break;
case OpSetMeshOutputsEXT: *hasResult = false; *hasResultType = false; break;
case OpGroupNonUniformPartitionNV: *hasResult = true; *hasResultType = true; break;
case OpWritePackedPrimitiveIndices4x8NV: *hasResult = false; *hasResultType = false; break;
case OpReportIntersectionNV: *hasResult = true; *hasResultType = true; break;
case OpIgnoreIntersectionNV: *hasResult = false; *hasResultType = false; break;
@ -2263,6 +2471,7 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) {
case OpTraceNV: *hasResult = false; *hasResultType = false; break;
case OpTraceMotionNV: *hasResult = false; *hasResultType = false; break;
case OpTraceRayMotionNV: *hasResult = false; *hasResultType = false; break;
case OpRayQueryGetIntersectionTriangleVertexPositionsKHR: *hasResult = true; *hasResultType = true; break;
case OpTypeAccelerationStructureNV: *hasResult = true; *hasResultType = false; break;
case OpExecuteCallableNV: *hasResult = false; *hasResultType = false; break;
case OpTypeCooperativeMatrixNV: *hasResult = true; *hasResultType = false; break;
@ -2479,6 +2688,9 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) {
case OpArbitraryFloatPowRINTEL: *hasResult = true; *hasResultType = true; break;
case OpArbitraryFloatPowNINTEL: *hasResult = true; *hasResultType = true; break;
case OpLoopControlINTEL: *hasResult = false; *hasResultType = false; break;
case OpAliasDomainDeclINTEL: *hasResult = true; *hasResultType = false; break;
case OpAliasScopeDeclINTEL: *hasResult = true; *hasResultType = false; break;
case OpAliasScopeListDeclINTEL: *hasResult = true; *hasResultType = false; break;
case OpFixedSqrtINTEL: *hasResult = true; *hasResultType = true; break;
case OpFixedRecipINTEL: *hasResult = true; *hasResultType = true; break;
case OpFixedRsqrtINTEL: *hasResult = true; *hasResultType = true; break;
@ -2517,23 +2729,68 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) {
case OpTypeStructContinuedINTEL: *hasResult = false; *hasResultType = false; break;
case OpConstantCompositeContinuedINTEL: *hasResult = false; *hasResultType = false; break;
case OpSpecConstantCompositeContinuedINTEL: *hasResult = false; *hasResultType = false; break;
case OpControlBarrierArriveINTEL: *hasResult = false; *hasResultType = false; break;
case OpControlBarrierWaitINTEL: *hasResult = false; *hasResultType = false; break;
case OpGroupIMulKHR: *hasResult = true; *hasResultType = true; break;
case OpGroupFMulKHR: *hasResult = true; *hasResultType = true; break;
case OpGroupBitwiseAndKHR: *hasResult = true; *hasResultType = true; break;
case OpGroupBitwiseOrKHR: *hasResult = true; *hasResultType = true; break;
case OpGroupBitwiseXorKHR: *hasResult = true; *hasResultType = true; break;
case OpGroupLogicalAndKHR: *hasResult = true; *hasResultType = true; break;
case OpGroupLogicalOrKHR: *hasResult = true; *hasResultType = true; break;
case OpGroupLogicalXorKHR: *hasResult = true; *hasResultType = true; break;
}
}
#endif /* SPV_ENABLE_UTILITY_CODE */
// Overload operator| for mask bit combining
// Overload bitwise operators for mask bit combining
inline ImageOperandsMask operator|(ImageOperandsMask a, ImageOperandsMask b) { return ImageOperandsMask(unsigned(a) | unsigned(b)); }
inline ImageOperandsMask operator&(ImageOperandsMask a, ImageOperandsMask b) { return ImageOperandsMask(unsigned(a) & unsigned(b)); }
inline ImageOperandsMask operator^(ImageOperandsMask a, ImageOperandsMask b) { return ImageOperandsMask(unsigned(a) ^ unsigned(b)); }
inline ImageOperandsMask operator~(ImageOperandsMask a) { return ImageOperandsMask(~unsigned(a)); }
inline FPFastMathModeMask operator|(FPFastMathModeMask a, FPFastMathModeMask b) { return FPFastMathModeMask(unsigned(a) | unsigned(b)); }
inline FPFastMathModeMask operator&(FPFastMathModeMask a, FPFastMathModeMask b) { return FPFastMathModeMask(unsigned(a) & unsigned(b)); }
inline FPFastMathModeMask operator^(FPFastMathModeMask a, FPFastMathModeMask b) { return FPFastMathModeMask(unsigned(a) ^ unsigned(b)); }
inline FPFastMathModeMask operator~(FPFastMathModeMask a) { return FPFastMathModeMask(~unsigned(a)); }
inline SelectionControlMask operator|(SelectionControlMask a, SelectionControlMask b) { return SelectionControlMask(unsigned(a) | unsigned(b)); }
inline SelectionControlMask operator&(SelectionControlMask a, SelectionControlMask b) { return SelectionControlMask(unsigned(a) & unsigned(b)); }
inline SelectionControlMask operator^(SelectionControlMask a, SelectionControlMask b) { return SelectionControlMask(unsigned(a) ^ unsigned(b)); }
inline SelectionControlMask operator~(SelectionControlMask a) { return SelectionControlMask(~unsigned(a)); }
inline LoopControlMask operator|(LoopControlMask a, LoopControlMask b) { return LoopControlMask(unsigned(a) | unsigned(b)); }
inline LoopControlMask operator&(LoopControlMask a, LoopControlMask b) { return LoopControlMask(unsigned(a) & unsigned(b)); }
inline LoopControlMask operator^(LoopControlMask a, LoopControlMask b) { return LoopControlMask(unsigned(a) ^ unsigned(b)); }
inline LoopControlMask operator~(LoopControlMask a) { return LoopControlMask(~unsigned(a)); }
inline FunctionControlMask operator|(FunctionControlMask a, FunctionControlMask b) { return FunctionControlMask(unsigned(a) | unsigned(b)); }
inline FunctionControlMask operator&(FunctionControlMask a, FunctionControlMask b) { return FunctionControlMask(unsigned(a) & unsigned(b)); }
inline FunctionControlMask operator^(FunctionControlMask a, FunctionControlMask b) { return FunctionControlMask(unsigned(a) ^ unsigned(b)); }
inline FunctionControlMask operator~(FunctionControlMask a) { return FunctionControlMask(~unsigned(a)); }
inline MemorySemanticsMask operator|(MemorySemanticsMask a, MemorySemanticsMask b) { return MemorySemanticsMask(unsigned(a) | unsigned(b)); }
inline MemorySemanticsMask operator&(MemorySemanticsMask a, MemorySemanticsMask b) { return MemorySemanticsMask(unsigned(a) & unsigned(b)); }
inline MemorySemanticsMask operator^(MemorySemanticsMask a, MemorySemanticsMask b) { return MemorySemanticsMask(unsigned(a) ^ unsigned(b)); }
inline MemorySemanticsMask operator~(MemorySemanticsMask a) { return MemorySemanticsMask(~unsigned(a)); }
inline MemoryAccessMask operator|(MemoryAccessMask a, MemoryAccessMask b) { return MemoryAccessMask(unsigned(a) | unsigned(b)); }
inline MemoryAccessMask operator&(MemoryAccessMask a, MemoryAccessMask b) { return MemoryAccessMask(unsigned(a) & unsigned(b)); }
inline MemoryAccessMask operator^(MemoryAccessMask a, MemoryAccessMask b) { return MemoryAccessMask(unsigned(a) ^ unsigned(b)); }
inline MemoryAccessMask operator~(MemoryAccessMask a) { return MemoryAccessMask(~unsigned(a)); }
inline KernelProfilingInfoMask operator|(KernelProfilingInfoMask a, KernelProfilingInfoMask b) { return KernelProfilingInfoMask(unsigned(a) | unsigned(b)); }
inline KernelProfilingInfoMask operator&(KernelProfilingInfoMask a, KernelProfilingInfoMask b) { return KernelProfilingInfoMask(unsigned(a) & unsigned(b)); }
inline KernelProfilingInfoMask operator^(KernelProfilingInfoMask a, KernelProfilingInfoMask b) { return KernelProfilingInfoMask(unsigned(a) ^ unsigned(b)); }
inline KernelProfilingInfoMask operator~(KernelProfilingInfoMask a) { return KernelProfilingInfoMask(~unsigned(a)); }
inline RayFlagsMask operator|(RayFlagsMask a, RayFlagsMask b) { return RayFlagsMask(unsigned(a) | unsigned(b)); }
inline RayFlagsMask operator&(RayFlagsMask a, RayFlagsMask b) { return RayFlagsMask(unsigned(a) & unsigned(b)); }
inline RayFlagsMask operator^(RayFlagsMask a, RayFlagsMask b) { return RayFlagsMask(unsigned(a) ^ unsigned(b)); }
inline RayFlagsMask operator~(RayFlagsMask a) { return RayFlagsMask(~unsigned(a)); }
inline FragmentShadingRateMask operator|(FragmentShadingRateMask a, FragmentShadingRateMask b) { return FragmentShadingRateMask(unsigned(a) | unsigned(b)); }
inline FragmentShadingRateMask operator&(FragmentShadingRateMask a, FragmentShadingRateMask b) { return FragmentShadingRateMask(unsigned(a) & unsigned(b)); }
inline FragmentShadingRateMask operator^(FragmentShadingRateMask a, FragmentShadingRateMask b) { return FragmentShadingRateMask(unsigned(a) ^ unsigned(b)); }
inline FragmentShadingRateMask operator~(FragmentShadingRateMask a) { return FragmentShadingRateMask(~unsigned(a)); }
inline CooperativeMatrixOperandsMask operator|(CooperativeMatrixOperandsMask a, CooperativeMatrixOperandsMask b) { return CooperativeMatrixOperandsMask(unsigned(a) | unsigned(b)); }
inline CooperativeMatrixOperandsMask operator&(CooperativeMatrixOperandsMask a, CooperativeMatrixOperandsMask b) { return CooperativeMatrixOperandsMask(unsigned(a) & unsigned(b)); }
inline CooperativeMatrixOperandsMask operator^(CooperativeMatrixOperandsMask a, CooperativeMatrixOperandsMask b) { return CooperativeMatrixOperandsMask(unsigned(a) ^ unsigned(b)); }
inline CooperativeMatrixOperandsMask operator~(CooperativeMatrixOperandsMask a) { return CooperativeMatrixOperandsMask(~unsigned(a)); }
} // end namespace spv
#endif // #ifndef spirv_HPP

View File

@ -97,6 +97,8 @@ public:
explicit Instruction(Op opCode) : resultId(NoResult), typeId(NoType), opCode(opCode), block(nullptr) { }
virtual ~Instruction() {}
void addIdOperand(Id id) {
// ids can't be 0
assert(id);
operands.push_back(id);
idOperand.push_back(true);
}
@ -321,7 +323,7 @@ void inReadableOrder(Block* root, std::function<void(Block*, ReachReason, Block*
class Function {
public:
Function(Id id, Id resultType, Id functionType, Id firstParam, Module& parent);
Function(Id id, Id resultType, Id functionType, Id firstParam, LinkageType linkage, const std::string& name, Module& parent);
virtual ~Function()
{
for (int i = 0; i < (int)parameterInstructions.size(); ++i)
@ -400,6 +402,9 @@ public:
end.dump(out);
}
LinkageType getLinkType() const { return linkType; }
const char* getExportName() const { return exportName.c_str(); }
protected:
Function(const Function&);
Function& operator=(Function&);
@ -412,6 +417,8 @@ protected:
bool implicitThis; // true if this is a member function expecting to be passed a 'this' as the first argument
bool reducedPrecisionReturn;
std::set<int> reducedPrecisionParams; // list of parameter indexes that need a relaxed precision arg
LinkageType linkType;
std::string exportName;
};
//
@ -471,10 +478,11 @@ protected:
// Add both
// - the OpFunction instruction
// - all the OpFunctionParameter instructions
__inline Function::Function(Id id, Id resultType, Id functionType, Id firstParamId, Module& parent)
__inline Function::Function(Id id, Id resultType, Id functionType, Id firstParamId, LinkageType linkage, const std::string& name, Module& parent)
: parent(parent), lineInstruction(nullptr),
functionInstruction(id, resultType, OpFunction), implicitThis(false),
reducedPrecisionReturn(false)
reducedPrecisionReturn(false),
linkType(linkage)
{
// OpFunction
functionInstruction.addImmediateOperand(FunctionControlMaskNone);
@ -490,6 +498,11 @@ __inline Function::Function(Id id, Id resultType, Id functionType, Id firstParam
parent.mapInstruction(param);
parameterInstructions.push_back(param);
}
// If importing/exporting, save the function name (without the mangled parameters) for the linkage decoration
if (linkType != LinkageTypeMax) {
exportName = name.substr(0, name.find_first_of('('));
}
}
__inline void Function::addLocalVariable(std::unique_ptr<Instruction> inst)

View File

@ -1,4 +1,4 @@
# Copyright (C) 2020 The Khronos Group Inc.
# Copyright (C) 2020-2023 The Khronos Group Inc.
#
# All rights reserved.
#
@ -31,7 +31,7 @@
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
find_host_package(PythonInterp 3 REQUIRED)
find_host_package(Python3 REQUIRED)
set(GLSLANG_INTRINSIC_H "${GLSLANG_GENERATED_INCLUDEDIR}/glslang/glsl_intrinsic_header.h")
set(GLSLANG_INTRINSIC_PY "${CMAKE_CURRENT_SOURCE_DIR}/../gen_extension_headers.py")
@ -39,54 +39,40 @@ set(GLSLANG_INTRINSIC_HEADER_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../glslang/Extensi
add_custom_command(
OUTPUT ${GLSLANG_INTRINSIC_H}
COMMAND ${PYTHON_EXECUTABLE} "${GLSLANG_INTRINSIC_PY}"
COMMAND Python3::Interpreter "${GLSLANG_INTRINSIC_PY}"
"-i" ${GLSLANG_INTRINSIC_HEADER_DIR}
"-o" ${GLSLANG_INTRINSIC_H}
DEPENDS ${GLSLANG_INTRINSIC_PY}
COMMENT "Generating ${GLSLANG_INTRINSIC_H}")
#add_custom_target(glslangValidator DEPENDS ${GLSLANG_INTRINSIC_H})
add_library(glslang-default-resource-limits
${CMAKE_CURRENT_SOURCE_DIR}/ResourceLimits.cpp
${CMAKE_CURRENT_SOURCE_DIR}/resource_limits_c.cpp)
set_property(TARGET glslang-default-resource-limits PROPERTY FOLDER glslang)
set_property(TARGET glslang-default-resource-limits PROPERTY POSITION_INDEPENDENT_CODE ON)
target_include_directories(glslang-default-resource-limits
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
PUBLIC $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}>)
set(SOURCES StandAlone.cpp DirStackFileIncluder.h ${GLSLANG_INTRINSIC_H})
add_executable(glslangValidator ${SOURCES})
set_property(TARGET glslangValidator PROPERTY FOLDER tools)
glslang_set_link_args(glslangValidator)
add_executable(glslang-standalone ${SOURCES})
set_property(TARGET glslang-standalone PROPERTY FOLDER tools)
set_property(TARGET glslang-standalone PROPERTY OUTPUT_NAME glslang)
glslang_set_link_args(glslang-standalone)
set(LIBRARIES
glslang
OSDependent
SPIRV
glslang-default-resource-limits)
if(ENABLE_SPVREMAPPER)
set(LIBRARIES ${LIBRARIES} SPVRemapper)
endif()
if(WIN32)
set(LIBRARIES ${LIBRARIES} psapi)
elseif(UNIX)
if(NOT ANDROID)
if(NOT ANDROID AND NOT QNX)
set(LIBRARIES ${LIBRARIES} pthread)
endif()
endif()
target_link_libraries(glslangValidator ${LIBRARIES})
target_include_directories(glslangValidator PUBLIC
target_link_libraries(glslang-standalone ${LIBRARIES})
target_include_directories(glslang-standalone PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../External>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/External>)
if(ENABLE_OPT)
target_include_directories(glslangValidator
target_include_directories(glslang-standalone
PRIVATE ${spirv-tools_SOURCE_DIR}/include
)
endif()
@ -96,7 +82,7 @@ if(ENABLE_SPVREMAPPER)
add_executable(spirv-remap ${REMAPPER_SOURCES})
set_property(TARGET spirv-remap PROPERTY FOLDER tools)
glslang_set_link_args(spirv-remap)
target_link_libraries(spirv-remap ${LIBRARIES})
target_link_libraries(spirv-remap SPVRemapper ${LIBRARIES})
endif()
if(WIN32)
@ -104,19 +90,35 @@ if(WIN32)
endif()
if(ENABLE_GLSLANG_INSTALL)
install(TARGETS glslangValidator EXPORT glslang-targets)
install(TARGETS glslang-standalone EXPORT glslang-targets)
# Backward compatibility
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/glslangValidatorTargets.cmake" "
message(WARNING \"Using `glslangValidatorTargets.cmake` is deprecated: use `find_package(glslang)` to find glslang CMake targets.\")
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/glslang-standaloneTargets.cmake" "
message(WARNING \"Using `glslang-standaloneTargets.cmake` is deprecated: use `find_package(glslang)` to find glslang CMake targets.\")
if (NOT TARGET glslang::glslangValidator)
include(\"\${CMAKE_CURRENT_LIST_DIR}/../../${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}/glslang-targets.cmake\")
if (NOT TARGET glslang::glslang-standalone)
include(\"${CMAKE_INSTALL_FULL_LIBDIR}/cmake/${PROJECT_NAME}/glslang-targets.cmake\")
endif()
add_library(glslangValidator ALIAS glslang::glslangValidator)
add_library(glslang-standalone ALIAS glslang::glslang-standalone)
")
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/glslangValidatorTargets.cmake" DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/glslang-standaloneTargets.cmake" DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake)
# Create a symbolic link to glslang named glslangValidator for backwards compatibility
set(legacy_glslang_name "glslangValidator${CMAKE_EXECUTABLE_SUFFIX}")
set(link_method create_symlink)
if (WIN32 OR MINGW)
set(link_method copy_if_different)
endif()
add_custom_command(TARGET glslang-standalone
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E ${link_method} $<TARGET_FILE_NAME:glslang-standalone> ${legacy_glslang_name}
WORKING_DIRECTORY $<TARGET_FILE_DIR:glslang-standalone>)
# Create the same symlink at install time
install(CODE "execute_process( \
COMMAND ${CMAKE_COMMAND} -E ${link_method} $<TARGET_FILE_NAME:glslang-standalone> ${legacy_glslang_name} \
WORKING_DIRECTORY \$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR})")
if(ENABLE_SPVREMAPPER)
install(TARGETS spirv-remap EXPORT glslang-targets)
@ -126,7 +128,7 @@ if(ENABLE_GLSLANG_INSTALL)
message(WARNING \"Using `spirv-remapTargets.cmake` is deprecated: use `find_package(glslang)` to find glslang CMake targets.\")
if (NOT TARGET glslang::spirv-remap)
include(\"\${CMAKE_CURRENT_LIST_DIR}/../../${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}/glslang-targets.cmake\")
include(\"${CMAKE_INSTALL_FULL_LIBDIR}/cmake/${PROJECT_NAME}/glslang-targets.cmake\")
endif()
add_library(spirv-remap ALIAS glslang::spirv-remap)
@ -134,18 +136,4 @@ if(ENABLE_GLSLANG_INSTALL)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/spirv-remapTargets.cmake" DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake)
endif()
install(TARGETS glslang-default-resource-limits EXPORT glslang-targets)
# Backward compatibility
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/glslang-default-resource-limitsTargets.cmake" "
message(WARNING \"Using `glslang-default-resource-limitsTargets.cmake` is deprecated: use `find_package(glslang)` to find glslang CMake targets.\")
if (NOT TARGET glslang::glslang-default-resource-limits)
include(\"\${CMAKE_CURRENT_LIST_DIR}/../../${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}/glslang-targets.cmake\")
endif()
add_library(glslang-default-resource-limits ALIAS glslang::glslang-default-resource-limits)
")
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/glslang-default-resource-limitsTargets.cmake" DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake)
endif()

View File

@ -51,15 +51,16 @@
#include "../SPIRV/doc.h"
#include "../SPIRV/disassemble.h"
#include <cstring>
#include <cstdlib>
#include <array>
#include <atomic>
#include <cctype>
#include <cmath>
#include <array>
#include <cstdlib>
#include <cstring>
#include <map>
#include <memory>
#include <thread>
#include <set>
#include <thread>
#include "../glslang/OSDependent/osinclude.h"
@ -73,40 +74,41 @@ extern "C" {
}
// Command-line options
enum TOptions {
enum TOptions : uint64_t {
EOptionNone = 0,
EOptionIntermediate = (1 << 0),
EOptionSuppressInfolog = (1 << 1),
EOptionMemoryLeakMode = (1 << 2),
EOptionRelaxedErrors = (1 << 3),
EOptionGiveWarnings = (1 << 4),
EOptionLinkProgram = (1 << 5),
EOptionMultiThreaded = (1 << 6),
EOptionDumpConfig = (1 << 7),
EOptionDumpReflection = (1 << 8),
EOptionSuppressWarnings = (1 << 9),
EOptionDumpVersions = (1 << 10),
EOptionSpv = (1 << 11),
EOptionHumanReadableSpv = (1 << 12),
EOptionVulkanRules = (1 << 13),
EOptionDefaultDesktop = (1 << 14),
EOptionOutputPreprocessed = (1 << 15),
EOptionOutputHexadecimal = (1 << 16),
EOptionReadHlsl = (1 << 17),
EOptionCascadingErrors = (1 << 18),
EOptionAutoMapBindings = (1 << 19),
EOptionFlattenUniformArrays = (1 << 20),
EOptionNoStorageFormat = (1 << 21),
EOptionKeepUncalled = (1 << 22),
EOptionHlslOffsets = (1 << 23),
EOptionHlslIoMapping = (1 << 24),
EOptionAutoMapLocations = (1 << 25),
EOptionDebug = (1 << 26),
EOptionStdin = (1 << 27),
EOptionOptimizeDisable = (1 << 28),
EOptionOptimizeSize = (1 << 29),
EOptionInvertY = (1 << 30),
EOptionDumpBareVersion = (1 << 31),
EOptionIntermediate = (1ull << 0),
EOptionSuppressInfolog = (1ull << 1),
EOptionMemoryLeakMode = (1ull << 2),
EOptionRelaxedErrors = (1ull << 3),
EOptionGiveWarnings = (1ull << 4),
EOptionLinkProgram = (1ull << 5),
EOptionMultiThreaded = (1ull << 6),
EOptionDumpConfig = (1ull << 7),
EOptionDumpReflection = (1ull << 8),
EOptionSuppressWarnings = (1ull << 9),
EOptionDumpVersions = (1ull << 10),
EOptionSpv = (1ull << 11),
EOptionHumanReadableSpv = (1ull << 12),
EOptionVulkanRules = (1ull << 13),
EOptionDefaultDesktop = (1ull << 14),
EOptionOutputPreprocessed = (1ull << 15),
EOptionOutputHexadecimal = (1ull << 16),
EOptionReadHlsl = (1ull << 17),
EOptionCascadingErrors = (1ull << 18),
EOptionAutoMapBindings = (1ull << 19),
EOptionFlattenUniformArrays = (1ull << 20),
EOptionNoStorageFormat = (1ull << 21),
EOptionKeepUncalled = (1ull << 22),
EOptionHlslOffsets = (1ull << 23),
EOptionHlslIoMapping = (1ull << 24),
EOptionAutoMapLocations = (1ull << 25),
EOptionDebug = (1ull << 26),
EOptionStdin = (1ull << 27),
EOptionOptimizeDisable = (1ull << 28),
EOptionOptimizeSize = (1ull << 29),
EOptionInvertY = (1ull << 30),
EOptionDumpBareVersion = (1ull << 31),
EOptionCompileOnly = (1ull << 32),
};
bool targetHlslFunctionality1 = false;
bool SpvToolsDisassembler = false;
@ -143,8 +145,9 @@ void FreeFileData(char* data);
void InfoLogMsg(const char* msg, const char* name, const int num);
// Globally track if any compile or link failure.
bool CompileFailed = false;
bool LinkFailed = false;
std::atomic<int8_t> CompileFailed{0};
std::atomic<int8_t> LinkFailed{0};
std::atomic<int8_t> CompileOrLinkFailed{0};
// array of unique places to leave the shader names and infologs for the asynchronous compiles
std::vector<std::unique_ptr<glslang::TWorkItem>> WorkItems;
@ -158,17 +161,15 @@ void ProcessConfigFile()
{
if (ConfigFile.size() == 0)
*GetResources() = *GetDefaultResources();
#ifndef GLSLANG_WEB
else {
char* configString = ReadFileData(ConfigFile.c_str());
DecodeResourceLimits(GetResources(), configString);
FreeFileData(configString);
}
#endif
}
int ReflectOptions = EShReflectionDefault;
int Options = 0;
std::underlying_type_t<TOptions> Options = EOptionNone;
const char* ExecutableName = nullptr;
const char* binaryFileName = nullptr;
const char* depencyFileName = nullptr;
@ -258,6 +259,17 @@ public:
text.append("\n");
}
void addText(std::string preambleText)
{
fixLine(preambleText);
Processes.push_back("preamble-text");
Processes.back().append(preambleText);
text.append(preambleText);
text.append("\n");
}
protected:
void fixLine(std::string& line)
{
@ -727,6 +739,13 @@ void ProcessArguments(std::vector<std::unique_ptr<glslang::TWorkItem>>& workItem
} else if (lowerword == "no-storage-format" || // synonyms
lowerword == "nsf") {
Options |= EOptionNoStorageFormat;
} else if (lowerword == "preamble-text" ||
lowerword == "p") {
if (argc > 1)
UserPreamble.addText(argv[1]);
else
Error("expects <text>", argv[0]);
bumpArg();
} else if (lowerword == "relaxed-errors") {
Options |= EOptionRelaxedErrors;
} else if (lowerword == "reflect-strict-array-suffix") {
@ -873,6 +892,8 @@ void ProcessArguments(std::vector<std::unique_ptr<glslang::TWorkItem>>& workItem
bumpArg();
} else if (lowerword == "version") {
Options |= EOptionDumpVersions;
} else if (lowerword == "no-link") {
Options |= EOptionCompileOnly;
} else if (lowerword == "help") {
usage();
break;
@ -926,6 +947,9 @@ void ProcessArguments(std::vector<std::unique_ptr<glslang::TWorkItem>>& workItem
else
Error("unknown -O option");
break;
case 'P':
UserPreamble.addText(getStringOperand("-P<text>"));
break;
case 'R':
VulkanRulesRelaxed = true;
break;
@ -1144,6 +1168,7 @@ void CompileShaders(glslang::TWorklist& worklist)
if (Options & EOptionDebug)
Error("cannot generate debug information unless linking to generate code");
// NOTE: TWorkList::remove is thread-safe
glslang::TWorkItem* workItem;
if (Options & EOptionStdin) {
if (worklist.remove(workItem)) {
@ -1291,6 +1316,7 @@ void CompileAndLinkShaderUnits(std::vector<ShaderCompUnit> compUnits)
//
glslang::TProgram& program = *new glslang::TProgram;
const bool compileOnly = (Options & EOptionCompileOnly) != 0;
for (auto it = compUnits.cbegin(); it != compUnits.cend(); ++it) {
const auto &compUnit = *it;
for (int i = 0; i < compUnit.count; i++) {
@ -1307,6 +1333,9 @@ void CompileAndLinkShaderUnits(std::vector<ShaderCompUnit> compUnits)
shader->setSourceEntryPoint(sourceEntryPointName);
}
if (compileOnly)
shader->setCompileOnly();
shader->setOverrideVersion(GlslVersion);
std::string intrinsicString = getIntrinsic(compUnit.text, compUnit.count);
@ -1321,7 +1350,6 @@ void CompileAndLinkShaderUnits(std::vector<ShaderCompUnit> compUnits)
shader->setPreamble(PreambleString.c_str());
shader->addProcesses(Processes);
#ifndef GLSLANG_WEB
// Set IO mapper binding shift values
for (int r = 0; r < glslang::EResCount; ++r) {
const glslang::TResourceType res = glslang::TResourceType(r);
@ -1353,7 +1381,6 @@ void CompileAndLinkShaderUnits(std::vector<ShaderCompUnit> compUnits)
}
shader->setUniformLocationBase(uniformBase);
#endif
if (VulkanRulesRelaxed) {
for (auto& storageOverride : blockStorageOverrides) {
@ -1413,23 +1440,22 @@ void CompileAndLinkShaderUnits(std::vector<ShaderCompUnit> compUnits)
const int defaultVersion = Options & EOptionDefaultDesktop ? 110 : 100;
#ifndef GLSLANG_WEB
if (Options & EOptionOutputPreprocessed) {
std::string str;
if (shader->preprocess(GetResources(), defaultVersion, ENoProfile, false, false, messages, &str, includer)) {
PutsIfNonEmpty(str.c_str());
} else {
CompileFailed = true;
CompileFailed = 1;
}
StderrIfNonEmpty(shader->getInfoLog());
StderrIfNonEmpty(shader->getInfoDebugLog());
continue;
}
#endif
if (! shader->parse(GetResources(), defaultVersion, false, messages, includer))
CompileFailed = true;
CompileFailed = 1;
if (!compileOnly)
program.addShader(shader);
if (! (Options & EOptionSuppressInfolog) &&
@ -1445,42 +1471,54 @@ void CompileAndLinkShaderUnits(std::vector<ShaderCompUnit> compUnits)
// Program-level processing...
//
if (!compileOnly) {
// Link
if (!(Options & EOptionOutputPreprocessed) && !program.link(messages))
LinkFailed = true;
#ifndef GLSLANG_WEB
// Map IO
if (Options & EOptionSpv) {
if (!program.mapIO())
LinkFailed = true;
}
#endif
// Report
if (! (Options & EOptionSuppressInfolog) &&
! (Options & EOptionMemoryLeakMode)) {
if (!(Options & EOptionSuppressInfolog) && !(Options & EOptionMemoryLeakMode)) {
PutsIfNonEmpty(program.getInfoLog());
PutsIfNonEmpty(program.getInfoDebugLog());
}
#ifndef GLSLANG_WEB
// Reflect
if (Options & EOptionDumpReflection) {
program.buildReflection(ReflectOptions);
program.dumpReflection();
}
#endif
}
std::vector<std::string> outputFiles;
// Dump SPIR-V
if (Options & EOptionSpv) {
if (CompileFailed || LinkFailed)
CompileOrLinkFailed.fetch_or(CompileFailed);
CompileOrLinkFailed.fetch_or(LinkFailed);
if (static_cast<bool>(CompileOrLinkFailed.load()))
printf("SPIR-V is not generated for failed compile or link\n");
else {
std::vector<glslang::TIntermediate*> intermediates;
if (!compileOnly) {
for (int stage = 0; stage < EShLangCount; ++stage) {
if (program.getIntermediate((EShLanguage)stage)) {
if (auto* i = program.getIntermediate((EShLanguage)stage)) {
intermediates.emplace_back(i);
}
}
} else {
for (const auto* shader : shaders) {
if (auto* i = shader->getIntermediate()) {
intermediates.emplace_back(i);
}
}
}
for (auto* intermediate : intermediates) {
std::vector<unsigned int> spirv;
spv::SpvBuildLogger logger;
glslang::SpvOptions spvOptions;
@ -1498,30 +1536,33 @@ void CompileAndLinkShaderUnits(std::vector<ShaderCompUnit> compUnits)
spvOptions.optimizeSize = (Options & EOptionOptimizeSize) != 0;
spvOptions.disassemble = SpvToolsDisassembler;
spvOptions.validate = SpvToolsValidate;
glslang::GlslangToSpv(*program.getIntermediate((EShLanguage)stage), spirv, &logger, &spvOptions);
spvOptions.compileOnly = compileOnly;
glslang::GlslangToSpv(*intermediate, spirv, &logger, &spvOptions);
// Dump the spv to a file or stdout, etc., but only if not doing
// memory/perf testing, as it's not internal to programmatic use.
if (!(Options & EOptionMemoryLeakMode)) {
printf("%s", logger.getAllMessages().c_str());
const auto filename = GetBinaryName(intermediate->getStage());
if (Options & EOptionOutputHexadecimal) {
glslang::OutputSpvHex(spirv, GetBinaryName((EShLanguage)stage), variableName);
if (!glslang::OutputSpvHex(spirv, filename, variableName))
exit(EFailUsage);
} else {
glslang::OutputSpvBin(spirv, GetBinaryName((EShLanguage)stage));
if (!glslang::OutputSpvBin(spirv, filename))
exit(EFailUsage);
}
outputFiles.push_back(GetBinaryName((EShLanguage)stage));
#ifndef GLSLANG_WEB
outputFiles.push_back(filename);
if (!SpvToolsDisassembler && (Options & EOptionHumanReadableSpv))
spv::Disassemble(std::cout, spirv);
#endif
}
}
}
}
}
if (depencyFileName && !(CompileFailed || LinkFailed)) {
CompileOrLinkFailed.fetch_or(CompileFailed);
CompileOrLinkFailed.fetch_or(LinkFailed);
if (depencyFileName && !static_cast<bool>(CompileOrLinkFailed.load())) {
std::set<std::string> includedFiles = includer.getIncludedFiles();
sources.insert(sources.end(), includedFiles.begin(), includedFiles.end());
@ -1609,13 +1650,11 @@ int singleMain()
workList.add(item.get());
});
#ifndef GLSLANG_WEB
if (Options & EOptionDumpConfig) {
printf("%s", GetDefaultTBuiltInResourceString().c_str());
if (workList.empty())
return ESuccess;
}
#endif
if (Options & EOptionDumpBareVersion) {
printf("%d:%d.%d.%d%s\n", glslang::GetSpirvGeneratorVersion(), GLSLANG_VERSION_MAJOR, GLSLANG_VERSION_MINOR,
@ -1699,9 +1738,9 @@ int singleMain()
ShFinalize();
}
if (CompileFailed)
if (CompileFailed.load())
return EFailCompile;
if (LinkFailed)
if (LinkFailed.load())
return EFailLink;
return 0;
@ -1832,7 +1871,7 @@ void CompileFile(const char* fileName, ShHandle compiler)
SetMessageOptions(messages);
if (UserPreamble.isSet())
Error("-D and -U options require -l (linking)\n");
Error("-D, -U and -P options require -l (linking)\n");
for (int i = 0; i < ((Options & EOptionMemoryLeakMode) ? 100 : 1); ++i) {
for (int j = 0; j < ((Options & EOptionMemoryLeakMode) ? 100 : 1); ++j) {
@ -1861,7 +1900,7 @@ void CompileFile(const char* fileName, ShHandle compiler)
//
void usage()
{
printf("Usage: glslangValidator [option]... [file]...\n"
printf("Usage: glslang [option]... [file]...\n"
"\n"
"'file' can end in .<stage> for auto-stage classification, where <stage> is:\n"
" .conf to provide a config file that replaces the default configuration\n"
@ -1902,6 +1941,9 @@ void usage()
" is searched first, followed by left-to-right order of -I\n"
" -Od disables optimization; may cause illegal SPIR-V for HLSL\n"
" -Os optimizes SPIR-V to minimize size\n"
" -P<text> | --preamble-text <text> | --P <text>\n"
" inject custom preamble text, which is treated as if it\n"
" appeared immediately after the version declaration (if any).\n"
" -R use relaxed verification rules for generating Vulkan SPIR-V,\n"
" allowing the use of default uniforms, atomic_uints, and\n"
" gl_VertexID and gl_InstanceID keywords.\n"
@ -2064,7 +2106,9 @@ void usage()
" --vn <name> creates a C header file that contains a\n"
" uint32_t array named <name>\n"
" initialized with the shader binary code\n"
);
" --no-link Only compile shader; do not link (GLSL-only)\n"
" NOTE: this option will set the export linkage\n"
" attribute on all functions\n");
exit(EFailUsage);
}

View File

@ -37,7 +37,11 @@
#include <fstream>
#include <cstring>
#include <stdexcept>
#include <filesystem>
//
// Include remapper
//
#include "../SPIRV/SPVRemapper.h"
namespace {
@ -172,7 +176,7 @@ namespace {
<< " [--strip-all | --strip all | -s]"
<< " [--strip-white-list]"
<< " [--do-everything]"
<< " --input | -i file1 [file2...] --output|-o DESTDIR"
<< " --input | -i file1 [file2...] --output|-o DESTDIR | destfile1 [destfile2...]"
<< std::endl;
std::cout << " " << basename(name) << " [--version | -V]" << std::endl;
@ -182,29 +186,42 @@ namespace {
}
// grind through each SPIR in turn
void execute(const std::vector<std::string>& inputFile, const std::string& outputDir,
const std::string& whiteListFile, int opts, int verbosity)
void execute(const std::vector<std::string>& inputFiles,
const std::vector<std::string>& outputDirOrFiles,
const bool isSingleOutputDir,
const std::string& whiteListFile,
int opts,
int verbosity)
{
std::vector<std::string> whiteListStrings;
if (!whiteListFile.empty())
read(whiteListStrings, whiteListFile, verbosity);
for (auto it = inputFile.cbegin(); it != inputFile.cend(); ++it) {
const std::string &filename = *it;
for (std::size_t ii=0; ii<inputFiles.size(); ii++) {
std::vector<SpvWord> spv;
read(spv, filename, verbosity);
read(spv, inputFiles[ii], verbosity);
spv::spirvbin_t(verbosity).remap(spv, whiteListStrings, opts);
const std::string outfile = outputDir + path_sep_char() + basename(filename);
write(spv, outfile, verbosity);
if (isSingleOutputDir) {
// write all outputs to same directory
const std::string outFile = outputDirOrFiles[0] + path_sep_char() + basename(inputFiles[ii]);
write(spv, outFile, verbosity);
} else {
// write each input to its associated output
write(spv, outputDirOrFiles[ii], verbosity);
}
}
if (verbosity > 0)
std::cout << "Done: " << inputFile.size() << " file(s) processed" << std::endl;
std::cout << "Done: " << inputFiles.size() << " file(s) processed" << std::endl;
}
// Parse command line options
void parseCmdLine(int argc, char** argv, std::vector<std::string>& inputFile,
std::string& outputDir,
void parseCmdLine(int argc,
char** argv,
std::vector<std::string>& inputFiles,
std::vector<std::string>& outputDirOrFiles,
std::string& stripWhiteListFile,
int& options,
int& verbosity)
@ -222,18 +239,19 @@ namespace {
const std::string arg = argv[a];
if (arg == "--output" || arg == "-o") {
// Output directory
if (++a >= argc)
// Collect output dirs or files
for (++a; a < argc && argv[a][0] != '-'; ++a)
outputDirOrFiles.push_back(argv[a]);
if (outputDirOrFiles.size() == 0)
usage(argv[0], "--output requires an argument");
if (!outputDir.empty())
usage(argv[0], "--output can be provided only once");
outputDir = argv[a++];
// Remove trailing directory separator characters
while (!outputDir.empty() && outputDir.back() == path_sep_char())
outputDir.pop_back();
// Remove trailing directory separator characters from all paths
for (std::size_t ii=0; ii<outputDirOrFiles.size(); ii++) {
auto path = outputDirOrFiles[ii];
while (!path.empty() && path.back() == path_sep_char())
path.pop_back();
}
}
else if (arg == "-vv") { verbosity = 2; ++a; } // verbosity shortcuts
else if (arg == "-vvv") { verbosity = 3; ++a; } // ...
@ -262,7 +280,7 @@ namespace {
} else if (arg == "--input" || arg == "-i") {
// Collect input files
for (++a; a < argc && argv[a][0] != '-'; ++a)
inputFile.push_back(argv[a]);
inputFiles.push_back(argv[a]);
} else if (arg == "--do-everything") {
++a;
options = options | spv::spirvbin_t::DO_EVERYTHING;
@ -346,30 +364,39 @@ namespace {
int main(int argc, char** argv)
{
std::vector<std::string> inputFile;
std::string outputDir;
std::vector<std::string> inputFiles;
std::vector<std::string> outputDirOrFiles;
std::string whiteListFile;
int opts;
int verbosity;
#ifdef use_cpp11
// handle errors by exiting
spv::spirvbin_t::registerErrorHandler(errHandler);
// Log messages to std::cout
spv::spirvbin_t::registerLogHandler(logHandler);
#endif
if (argc < 2)
usage(argv[0]);
parseCmdLine(argc, argv, inputFile, outputDir, whiteListFile, opts, verbosity);
parseCmdLine(argc, argv, inputFiles, outputDirOrFiles, whiteListFile, opts, verbosity);
if (outputDir.empty())
usage(argv[0], "Output directory required");
if (outputDirOrFiles.empty())
usage(argv[0], "Output directory or file(s) required.");
const bool isMultiInput = inputFiles.size() > 1;
const bool isMultiOutput = outputDirOrFiles.size() > 1;
const bool isSingleOutputDir = !isMultiOutput && std::filesystem::is_directory(outputDirOrFiles[0]);
if (isMultiInput && !isMultiOutput && !isSingleOutputDir)
usage(argv[0], "Output is not a directory.");
if (isMultiInput && isMultiOutput && (outputDirOrFiles.size() != inputFiles.size()))
usage(argv[0], "Output must be either a single directory or one output file per input.");
// Main operations: read, remap, and write.
execute(inputFile, outputDir, whiteListFile, opts, verbosity);
execute(inputFiles, outputDirOrFiles, isSingleOutputDir, whiteListFile, opts, verbosity);
// If we get here, everything went OK! Nothing more to be done.
}

View File

@ -46,6 +46,7 @@ ERROR: 0:108: 'overloadE' : no matching overloaded function found
ERROR: 0:111: 'overloadE' : no matching overloaded function found
ERROR: 0:117: 'overloadF' : no matching overloaded function found
ERROR: 0:121: 'gl_TexCoord array size' : must be less than or equal to gl_MaxTextureCoords (32)
ERROR: 0:154: 'non-float shader input/output' : not supported for this version or the enabled extensions
ERROR: 0:165: 'switch' : Reserved word.
ERROR: 0:171: 'default' : Reserved word.
ERROR: 0:165: 'switch statements' : not supported for this version or the enabled extensions
@ -80,7 +81,7 @@ ERROR: 0:195: 'gl_ModelViewMatrix' : identifiers starting with "gl_" are reserve
ERROR: 0:200: 'token pasting (##)' : not supported for this version or the enabled extensions
ERROR: 0:203: 'token pasting (##)' : not supported for this version or the enabled extensions
ERROR: 0:205: '' : syntax error, unexpected IDENTIFIER
ERROR: 81 compilation errors. No code generated.
ERROR: 82 compilation errors. No code generated.
Shader version: 120

View File

@ -1,6 +1,6 @@
300layout.vert
ERROR: 0:7: 'vertex input arrays' : not supported with this profile: es
ERROR: 0:8: 'in' : cannot be a structure or array
ERROR: 0:8: 'in' : cannot be a structure
ERROR: 0:8: 's' : A structure containing an array is not allowed as input in ES
ERROR: 0:8: 'vertex input arrays' : not supported with this profile: es
ERROR: 0:8: 'location' : overlapping use of location 10

View File

@ -1,7 +1,7 @@
440.frag
ERROR: 0:11: 'location' : overlapping use of location 4
ERROR: 0:13: 'component' : type overflows the available 4 components
ERROR: 0:22: 'location' : fragment outputs sharing the same location must be the same basic type 30
ERROR: 0:22: 'location' : fragment outputs or tileImageEXTs sharing the same location 30 must be the same basic type
ERROR: 0:24: 'qualifier' : cannot use auxiliary, memory, interpolation, or precision qualifier in a default qualifier declaration (declaration with no type)
ERROR: 0:25: 'qualifier' : cannot use auxiliary, memory, interpolation, or precision qualifier in a default qualifier declaration (declaration with no type)
ERROR: 0:26: 'qualifier' : cannot use auxiliary, memory, interpolation, or precision qualifier in a default qualifier declaration (declaration with no type)
@ -43,11 +43,11 @@ ERROR: 0:62: 'layout' : offset/align can only be used on a uniform or buffer
ERROR: 0:63: 'layout' : offset/align can only be used on a uniform or buffer
ERROR: 0:84: 'align' : must be a power of 2
ERROR: 0:83: 'offset' : cannot lie in previous members
ERROR: 0:85: 'offset' : must be a multiple of the member's alignment
ERROR: 0:85: 'offset' : must be a multiple of the member's alignment (layout offset = 68 | member alignment = 8)
ERROR: 0:103: 'align' : must be a power of 2
ERROR: 0:105: 'align' : must be a power of 2
ERROR: 0:102: 'offset' : cannot lie in previous members
ERROR: 0:104: 'offset' : must be a multiple of the member's alignment
ERROR: 0:104: 'offset' : must be a multiple of the member's alignment (layout offset = 68 | member alignment = 8)
ERROR: 49 compilation errors. No code generated.

View File

@ -1,5 +1,5 @@
atomicAdd.comp
ERROR: 0:18: 'atomicAdd' : Atomic memory function can only be used for shader storage block member or shared variable.
ERROR: 0:18: 'atomicAdd' : Only l-values corresponding to shader block storage or shared variables can be used with atomic memory functions.
ERROR: 1 compilation errors. No code generated.

View File

@ -0,0 +1,35 @@
glsl.-P.frag
Shader version: 450
0:? Sequence
0:5 Function Definition: main( ( global void)
0:5 Function Parameters:
0:19 Sequence
0:19 move second child to first child ( temp 4-component vector of float)
0:19 'color' (layout( location=0) out 4-component vector of float)
0:19 Constant:
0:19 1.000000
0:19 1.000000
0:19 1.000000
0:19 1.000000
0:? Linker Objects
0:? 'color' (layout( location=0) out 4-component vector of float)
Linked fragment stage:
Shader version: 450
0:? Sequence
0:5 Function Definition: main( ( global void)
0:5 Function Parameters:
0:19 Sequence
0:19 move second child to first child ( temp 4-component vector of float)
0:19 'color' (layout( location=0) out 4-component vector of float)
0:19 Constant:
0:19 1.000000
0:19 1.000000
0:19 1.000000
0:19 1.000000
0:? Linker Objects
0:? 'color' (layout( location=0) out 4-component vector of float)

View File

@ -0,0 +1,45 @@
glsl.-P.function.frag
Shader version: 450
0:? Sequence
-1:1 Function Definition: getColor( ( global 4-component vector of float)
-1:1 Function Parameters:
-1:1 Sequence
-1:1 Branch: Return with expression
-1:1 Constant:
-1:1 1.000000
-1:1 1.000000
-1:1 1.000000
-1:1 1.000000
0:5 Function Definition: main( ( global void)
0:5 Function Parameters:
0:7 Sequence
0:7 move second child to first child ( temp 4-component vector of float)
0:7 'color' (layout( location=0) out 4-component vector of float)
0:7 Function Call: getColor( ( global 4-component vector of float)
0:? Linker Objects
0:? 'color' (layout( location=0) out 4-component vector of float)
Linked fragment stage:
Shader version: 450
0:? Sequence
-1:1 Function Definition: getColor( ( global 4-component vector of float)
-1:1 Function Parameters:
-1:1 Sequence
-1:1 Branch: Return with expression
-1:1 Constant:
-1:1 1.000000
-1:1 1.000000
-1:1 1.000000
-1:1 1.000000
0:5 Function Definition: main( ( global void)
0:5 Function Parameters:
0:7 Sequence
0:7 move second child to first child ( temp 4-component vector of float)
0:7 'color' (layout( location=0) out 4-component vector of float)
0:7 Function Call: getColor( ( global 4-component vector of float)
0:? Linker Objects
0:? 'color' (layout( location=0) out 4-component vector of float)

View File

@ -0,0 +1,49 @@
glsl.-P.include.frag
Shader version: 450
Requested GL_GOOGLE_cpp_style_line_directive
Requested GL_GOOGLE_include_directive
0:? Sequence
0:1 Function Definition: getColor( ( global 4-component vector of float)
0:1 Function Parameters:
0:3 Sequence
0:3 Branch: Return with expression
0:3 Constant:
0:3 1.000000
0:3 1.000000
0:3 1.000000
0:3 1.000000
0:7 Function Definition: main( ( global void)
0:7 Function Parameters:
0:9 Sequence
0:9 move second child to first child ( temp 4-component vector of float)
0:9 'color' (layout( location=0) out 4-component vector of float)
0:9 Function Call: getColor( ( global 4-component vector of float)
0:? Linker Objects
0:? 'color' (layout( location=0) out 4-component vector of float)
Linked fragment stage:
Shader version: 450
Requested GL_GOOGLE_cpp_style_line_directive
Requested GL_GOOGLE_include_directive
0:? Sequence
0:1 Function Definition: getColor( ( global 4-component vector of float)
0:1 Function Parameters:
0:3 Sequence
0:3 Branch: Return with expression
0:3 Constant:
0:3 1.000000
0:3 1.000000
0:3 1.000000
0:3 1.000000
0:7 Function Definition: main( ( global void)
0:7 Function Parameters:
0:9 Sequence
0:9 move second child to first child ( temp 4-component vector of float)
0:9 'color' (layout( location=0) out 4-component vector of float)
0:9 Function Call: getColor( ( global 4-component vector of float)
0:? Linker Objects
0:? 'color' (layout( location=0) out 4-component vector of float)

View File

@ -0,0 +1,149 @@
glsl.es320.extTextureShadowLod.frag
Shader version: 320
Requested GL_EXT_texture_shadow_lod
0:? Sequence
0:12 Function Definition: main( ( global void)
0:12 Function Parameters:
0:14 Sequence
0:14 move second child to first child ( temp lowp float)
0:14 'c' ( out lowp float)
0:14 texture ( global lowp float)
0:14 's2da' ( uniform lowp sampler2DArrayShadow)
0:14 'tc' ( smooth in lowp 4-component vector of float)
0:14 Constant:
0:14 0.000000
0:15 move second child to first child ( temp lowp float)
0:15 'c' ( out lowp float)
0:15 texture ( global lowp float)
0:15 'sca' ( uniform lowp samplerCubeArrayShadow)
0:15 'tc' ( smooth in lowp 4-component vector of float)
0:15 Constant:
0:15 0.000000
0:15 Constant:
0:15 0.000000
0:16 move second child to first child ( temp lowp float)
0:16 'c' ( out lowp float)
0:16 textureOffset ( global lowp float)
0:16 's2da' ( uniform lowp sampler2DArrayShadow)
0:16 'tc' ( smooth in lowp 4-component vector of float)
0:16 Constant:
0:16 0 (const int)
0:16 0 (const int)
0:16 Constant:
0:16 0.000000
0:17 move second child to first child ( temp lowp float)
0:17 'c' ( out lowp float)
0:17 textureLod ( global lowp float)
0:17 's2da' ( uniform lowp sampler2DArrayShadow)
0:17 'tc' ( smooth in lowp 4-component vector of float)
0:17 Constant:
0:17 0.000000
0:18 move second child to first child ( temp lowp float)
0:18 'c' ( out lowp float)
0:18 textureLod ( global lowp float)
0:18 'sc' ( uniform lowp samplerCubeShadow)
0:18 'tc' ( smooth in lowp 4-component vector of float)
0:18 Constant:
0:18 0.000000
0:19 move second child to first child ( temp lowp float)
0:19 'c' ( out lowp float)
0:19 textureLod ( global lowp float)
0:19 'sca' ( uniform lowp samplerCubeArrayShadow)
0:19 'tc' ( smooth in lowp 4-component vector of float)
0:19 Constant:
0:19 0.000000
0:19 Constant:
0:19 0.000000
0:20 move second child to first child ( temp lowp float)
0:20 'c' ( out lowp float)
0:20 textureLodOffset ( global lowp float)
0:20 's2da' ( uniform lowp sampler2DArrayShadow)
0:20 'tc' ( smooth in lowp 4-component vector of float)
0:20 Constant:
0:20 0.000000
0:20 Constant:
0:20 0 (const int)
0:20 0 (const int)
0:? Linker Objects
0:? 's2da' ( uniform lowp sampler2DArrayShadow)
0:? 'sca' ( uniform lowp samplerCubeArrayShadow)
0:? 'sc' ( uniform lowp samplerCubeShadow)
0:? 'tc' ( smooth in lowp 4-component vector of float)
0:? 'c' ( out lowp float)
Linked fragment stage:
Shader version: 320
Requested GL_EXT_texture_shadow_lod
0:? Sequence
0:12 Function Definition: main( ( global void)
0:12 Function Parameters:
0:14 Sequence
0:14 move second child to first child ( temp lowp float)
0:14 'c' ( out lowp float)
0:14 texture ( global lowp float)
0:14 's2da' ( uniform lowp sampler2DArrayShadow)
0:14 'tc' ( smooth in lowp 4-component vector of float)
0:14 Constant:
0:14 0.000000
0:15 move second child to first child ( temp lowp float)
0:15 'c' ( out lowp float)
0:15 texture ( global lowp float)
0:15 'sca' ( uniform lowp samplerCubeArrayShadow)
0:15 'tc' ( smooth in lowp 4-component vector of float)
0:15 Constant:
0:15 0.000000
0:15 Constant:
0:15 0.000000
0:16 move second child to first child ( temp lowp float)
0:16 'c' ( out lowp float)
0:16 textureOffset ( global lowp float)
0:16 's2da' ( uniform lowp sampler2DArrayShadow)
0:16 'tc' ( smooth in lowp 4-component vector of float)
0:16 Constant:
0:16 0 (const int)
0:16 0 (const int)
0:16 Constant:
0:16 0.000000
0:17 move second child to first child ( temp lowp float)
0:17 'c' ( out lowp float)
0:17 textureLod ( global lowp float)
0:17 's2da' ( uniform lowp sampler2DArrayShadow)
0:17 'tc' ( smooth in lowp 4-component vector of float)
0:17 Constant:
0:17 0.000000
0:18 move second child to first child ( temp lowp float)
0:18 'c' ( out lowp float)
0:18 textureLod ( global lowp float)
0:18 'sc' ( uniform lowp samplerCubeShadow)
0:18 'tc' ( smooth in lowp 4-component vector of float)
0:18 Constant:
0:18 0.000000
0:19 move second child to first child ( temp lowp float)
0:19 'c' ( out lowp float)
0:19 textureLod ( global lowp float)
0:19 'sca' ( uniform lowp samplerCubeArrayShadow)
0:19 'tc' ( smooth in lowp 4-component vector of float)
0:19 Constant:
0:19 0.000000
0:19 Constant:
0:19 0.000000
0:20 move second child to first child ( temp lowp float)
0:20 'c' ( out lowp float)
0:20 textureLodOffset ( global lowp float)
0:20 's2da' ( uniform lowp sampler2DArrayShadow)
0:20 'tc' ( smooth in lowp 4-component vector of float)
0:20 Constant:
0:20 0.000000
0:20 Constant:
0:20 0 (const int)
0:20 0 (const int)
0:? Linker Objects
0:? 's2da' ( uniform lowp sampler2DArrayShadow)
0:? 'sca' ( uniform lowp samplerCubeArrayShadow)
0:? 'sc' ( uniform lowp samplerCubeShadow)
0:? 'tc' ( smooth in lowp 4-component vector of float)
0:? 'c' ( out lowp float)

View File

@ -0,0 +1,160 @@
glsl.ext.textureShadowLod.frag
ERROR: 0:24: 'texture(..., float bias)' : required extension not requested: GL_EXT_texture_shadow_lod
ERROR: 0:25: 'texture(..., float bias)' : required extension not requested: GL_EXT_texture_shadow_lod
ERROR: 0:26: 'textureOffset for sampler2DArrayShadow' : required extension not requested: GL_EXT_texture_shadow_lod
ERROR: 0:27: 'textureLod(..., float lod)' : required extension not requested: GL_EXT_texture_shadow_lod
ERROR: 0:28: 'textureLod(..., float lod)' : required extension not requested: GL_EXT_texture_shadow_lod
ERROR: 0:29: 'textureLod(..., float lod)' : required extension not requested: GL_EXT_texture_shadow_lod
ERROR: 0:30: 'textureLodOffset for sampler2DArrayShadow' : required extension not requested: GL_EXT_texture_shadow_lod
ERROR: 7 compilation errors. No code generated.
Shader version: 450
Requested GL_EXT_texture_shadow_lod
ERROR: node is still EOpNull!
0:11 Function Definition: pass( ( global void)
0:11 Function Parameters:
0:12 Sequence
0:12 move second child to first child ( temp float)
0:12 'c' ( out float)
0:12 texture ( global float)
0:12 's2da' ( uniform sampler2DArrayShadow)
0:12 'tc' ( smooth in 4-component vector of float)
0:12 Constant:
0:12 0.000000
0:13 move second child to first child ( temp float)
0:13 'c' ( out float)
0:13 texture ( global float)
0:13 'sca' ( uniform samplerCubeArrayShadow)
0:13 'tc' ( smooth in 4-component vector of float)
0:13 Constant:
0:13 0.000000
0:13 Constant:
0:13 0.000000
0:14 move second child to first child ( temp float)
0:14 'c' ( out float)
0:14 textureOffset ( global float)
0:14 's2da' ( uniform sampler2DArrayShadow)
0:14 'tc' ( smooth in 4-component vector of float)
0:14 Constant:
0:14 0 (const int)
0:14 0 (const int)
0:14 Constant:
0:14 0.000000
0:15 move second child to first child ( temp float)
0:15 'c' ( out float)
0:15 textureLod ( global float)
0:15 's2da' ( uniform sampler2DArrayShadow)
0:15 'tc' ( smooth in 4-component vector of float)
0:15 Constant:
0:15 0.000000
0:16 move second child to first child ( temp float)
0:16 'c' ( out float)
0:16 textureLod ( global float)
0:16 'sc' ( uniform samplerCubeShadow)
0:16 'tc' ( smooth in 4-component vector of float)
0:16 Constant:
0:16 0.000000
0:17 move second child to first child ( temp float)
0:17 'c' ( out float)
0:17 textureLod ( global float)
0:17 'sca' ( uniform samplerCubeArrayShadow)
0:17 'tc' ( smooth in 4-component vector of float)
0:17 Constant:
0:17 0.000000
0:17 Constant:
0:17 0.000000
0:18 move second child to first child ( temp float)
0:18 'c' ( out float)
0:18 textureLodOffset ( global float)
0:18 's2da' ( uniform sampler2DArrayShadow)
0:18 'tc' ( smooth in 4-component vector of float)
0:18 Constant:
0:18 0.000000
0:18 Constant:
0:18 0 (const int)
0:18 0 (const int)
0:22 Function Definition: fail( ( global void)
0:22 Function Parameters:
0:24 Sequence
0:24 move second child to first child ( temp float)
0:24 'c' ( out float)
0:24 texture ( global float)
0:24 's2da' ( uniform sampler2DArrayShadow)
0:24 'tc' ( smooth in 4-component vector of float)
0:24 Constant:
0:24 0.000000
0:25 move second child to first child ( temp float)
0:25 'c' ( out float)
0:25 texture ( global float)
0:25 'sca' ( uniform samplerCubeArrayShadow)
0:25 'tc' ( smooth in 4-component vector of float)
0:25 Constant:
0:25 0.000000
0:25 Constant:
0:25 0.000000
0:26 move second child to first child ( temp float)
0:26 'c' ( out float)
0:26 textureOffset ( global float)
0:26 's2da' ( uniform sampler2DArrayShadow)
0:26 'tc' ( smooth in 4-component vector of float)
0:26 Constant:
0:26 0 (const int)
0:26 0 (const int)
0:26 Constant:
0:26 0.000000
0:27 move second child to first child ( temp float)
0:27 'c' ( out float)
0:27 textureLod ( global float)
0:27 's2da' ( uniform sampler2DArrayShadow)
0:27 'tc' ( smooth in 4-component vector of float)
0:27 Constant:
0:27 0.000000
0:28 move second child to first child ( temp float)
0:28 'c' ( out float)
0:28 textureLod ( global float)
0:28 'sc' ( uniform samplerCubeShadow)
0:28 'tc' ( smooth in 4-component vector of float)
0:28 Constant:
0:28 0.000000
0:29 move second child to first child ( temp float)
0:29 'c' ( out float)
0:29 textureLod ( global float)
0:29 'sca' ( uniform samplerCubeArrayShadow)
0:29 'tc' ( smooth in 4-component vector of float)
0:29 Constant:
0:29 0.000000
0:29 Constant:
0:29 0.000000
0:30 move second child to first child ( temp float)
0:30 'c' ( out float)
0:30 textureLodOffset ( global float)
0:30 's2da' ( uniform sampler2DArrayShadow)
0:30 'tc' ( smooth in 4-component vector of float)
0:30 Constant:
0:30 0.000000
0:30 Constant:
0:30 0 (const int)
0:30 0 (const int)
0:? Linker Objects
0:? 's2da' ( uniform sampler2DArrayShadow)
0:? 'sca' ( uniform samplerCubeArrayShadow)
0:? 'sc' ( uniform samplerCubeShadow)
0:? 'c' ( out float)
0:? 'tc' ( smooth in 4-component vector of float)
Linked fragment stage:
ERROR: Linking fragment stage: Missing entry point: Each stage requires one entry point
Shader version: 450
Requested GL_EXT_texture_shadow_lod
ERROR: node is still EOpNull!
0:? Linker Objects
0:? 's2da' ( uniform sampler2DArrayShadow)
0:? 'sca' ( uniform samplerCubeArrayShadow)
0:? 'sc' ( uniform samplerCubeShadow)
0:? 'c' ( out float)
0:? 'tc' ( smooth in 4-component vector of float)

View File

@ -0,0 +1,390 @@
hlsl.buffer_ref_parameter.comp
Shader version: 500
local_size = (64, 1, 1)
0:? Sequence
0:4 Function Definition: pull_position(block--u1[0]1;u1; ( temp 3-component vector of float)
0:4 Function Parameters:
0:4 'buffer_position' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of uint @data})
0:4 'vertex_id' ( in uint)
0:? Sequence
0:5 Branch: Return with expression
0:? intBitsToFloat ( temp 3-component vector of float)
0:? Sequence
0:5 move second child to first child ( temp int)
0:5 'byteAddrTemp' ( temp int)
0:5 right-shift ( temp int)
0:5 component-wise multiply ( temp uint)
0:5 component-wise multiply ( temp uint)
0:5 'vertex_id' ( in uint)
0:5 Constant:
0:5 3 (const uint)
0:5 Constant:
0:5 4 (const uint)
0:5 Constant:
0:5 2 (const int)
0:? Construct vec3 ( temp 3-component vector of uint)
0:5 indirect index ( temp uint)
0:5 @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of uint)
0:5 'buffer_position' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of uint @data})
0:5 Constant:
0:5 0 (const uint)
0:5 'byteAddrTemp' ( temp int)
0:5 indirect index ( temp uint)
0:5 @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of uint)
0:5 'buffer_position' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of uint @data})
0:5 Constant:
0:5 0 (const uint)
0:5 add ( temp int)
0:5 'byteAddrTemp' ( temp int)
0:5 Constant:
0:5 1 (const int)
0:5 indirect index ( temp uint)
0:5 @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of uint)
0:5 'buffer_position' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of uint @data})
0:5 Constant:
0:5 0 (const uint)
0:5 add ( temp int)
0:5 'byteAddrTemp' ( temp int)
0:5 Constant:
0:5 2 (const int)
0:9 Function Definition: @main(u1; ( temp void)
0:9 Function Parameters:
0:9 'gi' ( in uint)
0:? Sequence
0:10 Sequence
0:10 move second child to first child ( temp 3-component vector of float)
0:10 'position_ms' ( temp 3-component vector of float)
0:10 Function Call: pull_position(block--u1[0]1;u1; ( temp 3-component vector of float)
0:10 'buffer_position_ms' (layout( set=0 binding=0 row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of uint @data})
0:10 'gi' ( in uint)
0:? Sequence
0:12 move second child to first child ( temp int)
0:12 'byteAddrTemp' ( temp int)
0:12 right-shift ( temp int)
0:12 Constant:
0:12 0 (const int)
0:12 Constant:
0:12 2 (const int)
0:12 move second child to first child ( temp uint)
0:12 indirect index (layout( row_major std430) buffer uint)
0:12 @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of uint)
0:12 'r' (layout( set=0 binding=1 row_major std430) buffer block{layout( row_major std430) buffer unsized 1-element array of uint @data})
0:12 Constant:
0:12 0 (const uint)
0:12 'byteAddrTemp' ( temp int)
0:12 direct index ( temp uint)
0:12 floatBitsToUint ( temp 3-component vector of uint)
0:12 'position_ms' ( temp 3-component vector of float)
0:12 Constant:
0:12 0 (const int)
0:12 move second child to first child ( temp uint)
0:12 indirect index (layout( row_major std430) buffer uint)
0:12 @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of uint)
0:12 'r' (layout( set=0 binding=1 row_major std430) buffer block{layout( row_major std430) buffer unsized 1-element array of uint @data})
0:12 Constant:
0:12 0 (const uint)
0:12 add ( temp int)
0:12 'byteAddrTemp' ( temp int)
0:12 Constant:
0:12 1 (const int)
0:12 direct index ( temp uint)
0:12 floatBitsToUint ( temp 3-component vector of uint)
0:12 'position_ms' ( temp 3-component vector of float)
0:12 Constant:
0:12 1 (const int)
0:12 move second child to first child ( temp uint)
0:12 indirect index (layout( row_major std430) buffer uint)
0:12 @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of uint)
0:12 'r' (layout( set=0 binding=1 row_major std430) buffer block{layout( row_major std430) buffer unsized 1-element array of uint @data})
0:12 Constant:
0:12 0 (const uint)
0:12 add ( temp int)
0:12 'byteAddrTemp' ( temp int)
0:12 Constant:
0:12 2 (const int)
0:12 direct index ( temp uint)
0:12 floatBitsToUint ( temp 3-component vector of uint)
0:12 'position_ms' ( temp 3-component vector of float)
0:12 Constant:
0:12 2 (const int)
0:9 Function Definition: main( ( temp void)
0:9 Function Parameters:
0:? Sequence
0:9 move second child to first child ( temp uint)
0:? 'gi' ( temp uint)
0:? 'gi' ( in uint LocalInvocationIndex)
0:9 Function Call: @main(u1; ( temp void)
0:? 'gi' ( temp uint)
0:? Linker Objects
0:? 'buffer_position_ms' (layout( set=0 binding=0 row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of uint @data})
0:? 'r' (layout( set=0 binding=1 row_major std430) buffer block{layout( row_major std430) buffer unsized 1-element array of uint @data})
0:? 'gi' ( in uint LocalInvocationIndex)
Linked compute stage:
Shader version: 500
local_size = (64, 1, 1)
0:? Sequence
0:4 Function Definition: pull_position(block--u1[0]1;u1; ( temp 3-component vector of float)
0:4 Function Parameters:
0:4 'buffer_position' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of uint @data})
0:4 'vertex_id' ( in uint)
0:? Sequence
0:5 Branch: Return with expression
0:? intBitsToFloat ( temp 3-component vector of float)
0:? Sequence
0:5 move second child to first child ( temp int)
0:5 'byteAddrTemp' ( temp int)
0:5 right-shift ( temp int)
0:5 component-wise multiply ( temp uint)
0:5 component-wise multiply ( temp uint)
0:5 'vertex_id' ( in uint)
0:5 Constant:
0:5 3 (const uint)
0:5 Constant:
0:5 4 (const uint)
0:5 Constant:
0:5 2 (const int)
0:? Construct vec3 ( temp 3-component vector of uint)
0:5 indirect index ( temp uint)
0:5 @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of uint)
0:5 'buffer_position' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of uint @data})
0:5 Constant:
0:5 0 (const uint)
0:5 'byteAddrTemp' ( temp int)
0:5 indirect index ( temp uint)
0:5 @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of uint)
0:5 'buffer_position' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of uint @data})
0:5 Constant:
0:5 0 (const uint)
0:5 add ( temp int)
0:5 'byteAddrTemp' ( temp int)
0:5 Constant:
0:5 1 (const int)
0:5 indirect index ( temp uint)
0:5 @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of uint)
0:5 'buffer_position' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of uint @data})
0:5 Constant:
0:5 0 (const uint)
0:5 add ( temp int)
0:5 'byteAddrTemp' ( temp int)
0:5 Constant:
0:5 2 (const int)
0:9 Function Definition: @main(u1; ( temp void)
0:9 Function Parameters:
0:9 'gi' ( in uint)
0:? Sequence
0:10 Sequence
0:10 move second child to first child ( temp 3-component vector of float)
0:10 'position_ms' ( temp 3-component vector of float)
0:10 Function Call: pull_position(block--u1[0]1;u1; ( temp 3-component vector of float)
0:10 'buffer_position_ms' (layout( set=0 binding=0 row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of uint @data})
0:10 'gi' ( in uint)
0:? Sequence
0:12 move second child to first child ( temp int)
0:12 'byteAddrTemp' ( temp int)
0:12 right-shift ( temp int)
0:12 Constant:
0:12 0 (const int)
0:12 Constant:
0:12 2 (const int)
0:12 move second child to first child ( temp uint)
0:12 indirect index (layout( row_major std430) buffer uint)
0:12 @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of uint)
0:12 'r' (layout( set=0 binding=1 row_major std430) buffer block{layout( row_major std430) buffer unsized 1-element array of uint @data})
0:12 Constant:
0:12 0 (const uint)
0:12 'byteAddrTemp' ( temp int)
0:12 direct index ( temp uint)
0:12 floatBitsToUint ( temp 3-component vector of uint)
0:12 'position_ms' ( temp 3-component vector of float)
0:12 Constant:
0:12 0 (const int)
0:12 move second child to first child ( temp uint)
0:12 indirect index (layout( row_major std430) buffer uint)
0:12 @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of uint)
0:12 'r' (layout( set=0 binding=1 row_major std430) buffer block{layout( row_major std430) buffer unsized 1-element array of uint @data})
0:12 Constant:
0:12 0 (const uint)
0:12 add ( temp int)
0:12 'byteAddrTemp' ( temp int)
0:12 Constant:
0:12 1 (const int)
0:12 direct index ( temp uint)
0:12 floatBitsToUint ( temp 3-component vector of uint)
0:12 'position_ms' ( temp 3-component vector of float)
0:12 Constant:
0:12 1 (const int)
0:12 move second child to first child ( temp uint)
0:12 indirect index (layout( row_major std430) buffer uint)
0:12 @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of uint)
0:12 'r' (layout( set=0 binding=1 row_major std430) buffer block{layout( row_major std430) buffer unsized 1-element array of uint @data})
0:12 Constant:
0:12 0 (const uint)
0:12 add ( temp int)
0:12 'byteAddrTemp' ( temp int)
0:12 Constant:
0:12 2 (const int)
0:12 direct index ( temp uint)
0:12 floatBitsToUint ( temp 3-component vector of uint)
0:12 'position_ms' ( temp 3-component vector of float)
0:12 Constant:
0:12 2 (const int)
0:9 Function Definition: main( ( temp void)
0:9 Function Parameters:
0:? Sequence
0:9 move second child to first child ( temp uint)
0:? 'gi' ( temp uint)
0:? 'gi' ( in uint LocalInvocationIndex)
0:9 Function Call: @main(u1; ( temp void)
0:? 'gi' ( temp uint)
0:? Linker Objects
0:? 'buffer_position_ms' (layout( set=0 binding=0 row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of uint @data})
0:? 'r' (layout( set=0 binding=1 row_major std430) buffer block{layout( row_major std430) buffer unsized 1-element array of uint @data})
0:? 'gi' ( in uint LocalInvocationIndex)
// Module Version 10400
// Generated by (magic number): 8000b
// Id's are bound by 90
Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint GLCompute 4 "main" 53 62 85
ExecutionMode 4 LocalSize 64 1 1
Source HLSL 500
Name 4 "main"
Name 8 ""
MemberName 8 0 "@data"
Name 16 "pull_position(block--u1[0]1;u1;"
Name 14 "buffer_position"
Name 15 "vertex_id"
Name 20 "@main(u1;"
Name 19 "gi"
Name 24 "byteAddrTemp"
Name 52 "position_ms"
Name 53 "buffer_position_ms"
Name 54 "param"
Name 57 "byteAddrTemp"
Name 60 "r"
MemberName 60(r) 0 "@data"
Name 62 "r"
Name 83 "gi"
Name 85 "gi"
Name 87 "param"
Decorate 7 ArrayStride 4
MemberDecorate 8 0 NonWritable
MemberDecorate 8 0 Offset 0
Decorate 8 Block
Decorate 14(buffer_position) NonWritable
Decorate 53(buffer_position_ms) DescriptorSet 0
Decorate 53(buffer_position_ms) Binding 0
Decorate 59 ArrayStride 4
MemberDecorate 60(r) 0 Offset 0
Decorate 60(r) Block
Decorate 62(r) DescriptorSet 0
Decorate 62(r) Binding 1
Decorate 85(gi) BuiltIn LocalInvocationIndex
2: TypeVoid
3: TypeFunction 2
6: TypeInt 32 0
7: TypeRuntimeArray 6(int)
8: TypeStruct 7
9: TypePointer StorageBuffer 8(struct)
10: TypePointer Function 6(int)
11: TypeFloat 32
12: TypeVector 11(float) 3
13: TypeFunction 12(fvec3) 9(ptr) 10(ptr)
18: TypeFunction 2 10(ptr)
22: TypeInt 32 1
23: TypePointer Function 22(int)
26: 6(int) Constant 3
28: 6(int) Constant 4
30: 22(int) Constant 2
32: 22(int) Constant 0
34: TypePointer StorageBuffer 6(int)
38: 22(int) Constant 1
46: TypeVector 6(int) 3
51: TypePointer Function 12(fvec3)
53(buffer_position_ms): 9(ptr) Variable StorageBuffer
59: TypeRuntimeArray 6(int)
60(r): TypeStruct 59
61: TypePointer StorageBuffer 60(r)
62(r): 61(ptr) Variable StorageBuffer
66: 6(int) Constant 0
73: 6(int) Constant 1
80: 6(int) Constant 2
84: TypePointer Input 6(int)
85(gi): 84(ptr) Variable Input
4(main): 2 Function None 3
5: Label
83(gi): 10(ptr) Variable Function
87(param): 10(ptr) Variable Function
86: 6(int) Load 85(gi)
Store 83(gi) 86
88: 6(int) Load 83(gi)
Store 87(param) 88
89: 2 FunctionCall 20(@main(u1;) 87(param)
Return
FunctionEnd
16(pull_position(block--u1[0]1;u1;): 12(fvec3) Function None 13
14(buffer_position): 9(ptr) FunctionParameter
15(vertex_id): 10(ptr) FunctionParameter
17: Label
24(byteAddrTemp): 23(ptr) Variable Function
25: 6(int) Load 15(vertex_id)
27: 6(int) IMul 25 26
29: 6(int) IMul 27 28
31: 22(int) ShiftRightLogical 29 30
Store 24(byteAddrTemp) 31
33: 22(int) Load 24(byteAddrTemp)
35: 34(ptr) AccessChain 14(buffer_position) 32 33
36: 6(int) Load 35
37: 22(int) Load 24(byteAddrTemp)
39: 22(int) IAdd 37 38
40: 34(ptr) AccessChain 14(buffer_position) 32 39
41: 6(int) Load 40
42: 22(int) Load 24(byteAddrTemp)
43: 22(int) IAdd 42 30
44: 34(ptr) AccessChain 14(buffer_position) 32 43
45: 6(int) Load 44
47: 46(ivec3) CompositeConstruct 36 41 45
48: 12(fvec3) Bitcast 47
ReturnValue 48
FunctionEnd
20(@main(u1;): 2 Function None 18
19(gi): 10(ptr) FunctionParameter
21: Label
52(position_ms): 51(ptr) Variable Function
54(param): 10(ptr) Variable Function
57(byteAddrTemp): 23(ptr) Variable Function
55: 6(int) Load 19(gi)
Store 54(param) 55
56: 12(fvec3) FunctionCall 16(pull_position(block--u1[0]1;u1;) 53(buffer_position_ms) 54(param)
Store 52(position_ms) 56
58: 22(int) ShiftRightArithmetic 32 30
Store 57(byteAddrTemp) 58
63: 22(int) Load 57(byteAddrTemp)
64: 12(fvec3) Load 52(position_ms)
65: 46(ivec3) Bitcast 64
67: 6(int) CompositeExtract 65 0
68: 34(ptr) AccessChain 62(r) 32 63
Store 68 67
69: 22(int) Load 57(byteAddrTemp)
70: 22(int) IAdd 69 38
71: 12(fvec3) Load 52(position_ms)
72: 46(ivec3) Bitcast 71
74: 6(int) CompositeExtract 72 1
75: 34(ptr) AccessChain 62(r) 32 70
Store 75 74
76: 22(int) Load 57(byteAddrTemp)
77: 22(int) IAdd 76 30
78: 12(fvec3) Load 52(position_ms)
79: 46(ivec3) Bitcast 78
81: 6(int) CompositeExtract 79 2
82: 34(ptr) AccessChain 62(r) 32 77
Store 82 81
Return
FunctionEnd

View File

@ -216,33 +216,98 @@ gl_FragCoord origin is upper left
0:39 Convert int to float ( temp float)
0:39 'd' ( temp int)
0:39 'input' ( in 4-component vector of float)
0:41 Branch: Return with expression
0:40 add ( temp 4-component vector of float)
0:40 add ( temp 4-component vector of float)
0:40 add ( temp 4-component vector of float)
0:40 add ( temp 4-component vector of float)
0:40 vector-scale ( temp 4-component vector of float)
0:40 Sequence
0:40 move second child to first child ( temp uint)
0:40 'g' ( temp uint)
0:40 Test condition and select ( temp uint): no shortcircuit
0:40 Condition
0:40 Compare Greater Than ( temp bool)
0:40 Convert int to float ( temp float)
0:40 'e' ( temp int)
0:40 'ret' ( temp 4-component vector of float)
0:40 'f' ( temp 4-component vector of float)
0:40 Function Call: vectorCond( ( temp 4-component vector of float)
0:40 Function Call: scalarCond( ( temp 4-component vector of float)
0:41 Construct vec4 ( temp 4-component vector of float)
0:41 Function Call: fbSelect(vb2;vf2;vf2; ( temp 2-component vector of float)
0:40 'd' ( temp int)
0:40 Constant:
0:40 0.000000
0:40 true case
0:40 Constant:
0:40 21 (const uint)
0:40 false case
0:40 Constant:
0:40 0 (const uint)
0:41 Sequence
0:41 move second child to first child ( temp uint)
0:41 'h' ( temp uint)
0:41 Test condition and select ( temp uint): no shortcircuit
0:41 Condition
0:41 Compare Greater Than ( temp bool)
0:41 Convert uint to float ( temp float)
0:41 'g' ( temp uint)
0:41 Constant:
0:41 true (const bool)
0:41 false (const bool)
0:41 0.000000
0:41 true case
0:41 Constant:
0:41 1.000000
0:41 2.000000
0:41 63 (const uint)
0:41 false case
0:41 Constant:
0:41 3.000000
0:41 4.000000
0:41 Constant:
0:41 10.000000
0:41 Constant:
0:41 10.000000
0:41 0 (const uint)
0:42 Sequence
0:42 move second child to first child ( temp uint)
0:42 'i' ( temp uint)
0:42 Test condition and select ( temp uint): no shortcircuit
0:42 Condition
0:42 Compare Greater Than ( temp bool)
0:42 Convert uint to float ( temp float)
0:42 'h' ( temp uint)
0:42 Constant:
0:42 0.000000
0:42 true case
0:42 Constant:
0:42 5 (const uint)
0:42 false case
0:42 Constant:
0:42 1 (const uint)
0:43 Sequence
0:43 move second child to first child ( temp uint)
0:43 'j' ( temp uint)
0:43 Convert int to uint ( temp uint)
0:43 Test condition and select ( temp int): no shortcircuit
0:43 Condition
0:43 Compare Greater Than ( temp bool)
0:43 Convert uint to float ( temp float)
0:43 'i' ( temp uint)
0:43 Constant:
0:43 0.000000
0:43 true case
0:43 Constant:
0:43 43981 (const int)
0:43 false case
0:43 Constant:
0:43 48346 (const int)
0:45 Branch: Return with expression
0:44 add ( temp 4-component vector of float)
0:44 add ( temp 4-component vector of float)
0:44 add ( temp 4-component vector of float)
0:44 add ( temp 4-component vector of float)
0:44 vector-scale ( temp 4-component vector of float)
0:44 Convert int to float ( temp float)
0:44 'e' ( temp int)
0:44 'ret' ( temp 4-component vector of float)
0:44 'f' ( temp 4-component vector of float)
0:44 Function Call: vectorCond( ( temp 4-component vector of float)
0:44 Function Call: scalarCond( ( temp 4-component vector of float)
0:45 Construct vec4 ( temp 4-component vector of float)
0:45 Function Call: fbSelect(vb2;vf2;vf2; ( temp 2-component vector of float)
0:45 Constant:
0:45 true (const bool)
0:45 false (const bool)
0:45 Constant:
0:45 1.000000
0:45 2.000000
0:45 Constant:
0:45 3.000000
0:45 4.000000
0:45 Constant:
0:45 10.000000
0:45 Constant:
0:45 10.000000
0:27 Function Definition: PixelShaderFunction( ( temp void)
0:27 Function Parameters:
0:? Sequence
@ -479,33 +544,98 @@ gl_FragCoord origin is upper left
0:39 Convert int to float ( temp float)
0:39 'd' ( temp int)
0:39 'input' ( in 4-component vector of float)
0:41 Branch: Return with expression
0:40 add ( temp 4-component vector of float)
0:40 add ( temp 4-component vector of float)
0:40 add ( temp 4-component vector of float)
0:40 add ( temp 4-component vector of float)
0:40 vector-scale ( temp 4-component vector of float)
0:40 Sequence
0:40 move second child to first child ( temp uint)
0:40 'g' ( temp uint)
0:40 Test condition and select ( temp uint): no shortcircuit
0:40 Condition
0:40 Compare Greater Than ( temp bool)
0:40 Convert int to float ( temp float)
0:40 'e' ( temp int)
0:40 'ret' ( temp 4-component vector of float)
0:40 'f' ( temp 4-component vector of float)
0:40 Function Call: vectorCond( ( temp 4-component vector of float)
0:40 Function Call: scalarCond( ( temp 4-component vector of float)
0:41 Construct vec4 ( temp 4-component vector of float)
0:41 Function Call: fbSelect(vb2;vf2;vf2; ( temp 2-component vector of float)
0:40 'd' ( temp int)
0:40 Constant:
0:40 0.000000
0:40 true case
0:40 Constant:
0:40 21 (const uint)
0:40 false case
0:40 Constant:
0:40 0 (const uint)
0:41 Sequence
0:41 move second child to first child ( temp uint)
0:41 'h' ( temp uint)
0:41 Test condition and select ( temp uint): no shortcircuit
0:41 Condition
0:41 Compare Greater Than ( temp bool)
0:41 Convert uint to float ( temp float)
0:41 'g' ( temp uint)
0:41 Constant:
0:41 true (const bool)
0:41 false (const bool)
0:41 0.000000
0:41 true case
0:41 Constant:
0:41 1.000000
0:41 2.000000
0:41 63 (const uint)
0:41 false case
0:41 Constant:
0:41 3.000000
0:41 4.000000
0:41 Constant:
0:41 10.000000
0:41 Constant:
0:41 10.000000
0:41 0 (const uint)
0:42 Sequence
0:42 move second child to first child ( temp uint)
0:42 'i' ( temp uint)
0:42 Test condition and select ( temp uint): no shortcircuit
0:42 Condition
0:42 Compare Greater Than ( temp bool)
0:42 Convert uint to float ( temp float)
0:42 'h' ( temp uint)
0:42 Constant:
0:42 0.000000
0:42 true case
0:42 Constant:
0:42 5 (const uint)
0:42 false case
0:42 Constant:
0:42 1 (const uint)
0:43 Sequence
0:43 move second child to first child ( temp uint)
0:43 'j' ( temp uint)
0:43 Convert int to uint ( temp uint)
0:43 Test condition and select ( temp int): no shortcircuit
0:43 Condition
0:43 Compare Greater Than ( temp bool)
0:43 Convert uint to float ( temp float)
0:43 'i' ( temp uint)
0:43 Constant:
0:43 0.000000
0:43 true case
0:43 Constant:
0:43 43981 (const int)
0:43 false case
0:43 Constant:
0:43 48346 (const int)
0:45 Branch: Return with expression
0:44 add ( temp 4-component vector of float)
0:44 add ( temp 4-component vector of float)
0:44 add ( temp 4-component vector of float)
0:44 add ( temp 4-component vector of float)
0:44 vector-scale ( temp 4-component vector of float)
0:44 Convert int to float ( temp float)
0:44 'e' ( temp int)
0:44 'ret' ( temp 4-component vector of float)
0:44 'f' ( temp 4-component vector of float)
0:44 Function Call: vectorCond( ( temp 4-component vector of float)
0:44 Function Call: scalarCond( ( temp 4-component vector of float)
0:45 Construct vec4 ( temp 4-component vector of float)
0:45 Function Call: fbSelect(vb2;vf2;vf2; ( temp 2-component vector of float)
0:45 Constant:
0:45 true (const bool)
0:45 false (const bool)
0:45 Constant:
0:45 1.000000
0:45 2.000000
0:45 Constant:
0:45 3.000000
0:45 4.000000
0:45 Constant:
0:45 10.000000
0:45 Constant:
0:45 10.000000
0:27 Function Definition: PixelShaderFunction( ( temp void)
0:27 Function Parameters:
0:? Sequence
@ -523,12 +653,12 @@ gl_FragCoord origin is upper left
// Module Version 10000
// Generated by (magic number): 8000b
// Id's are bound by 206
// Id's are bound by 233
Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Fragment 4 "PixelShaderFunction" 199 202
EntryPoint Fragment 4 "PixelShaderFunction" 226 229
ExecutionMode 4 OriginUpperLeft
Source HLSL 500
Name 4 "PixelShaderFunction"
@ -555,13 +685,17 @@ gl_FragCoord origin is upper left
Name 117 "ret"
Name 137 "e"
Name 150 "f"
Name 186 "param"
Name 187 "param"
Name 188 "param"
Name 197 "input"
Name 199 "input"
Name 202 "@entryPointOutput"
Name 203 "param"
Name 169 "g"
Name 175 "h"
Name 181 "i"
Name 187 "j"
Name 213 "param"
Name 214 "param"
Name 215 "param"
Name 224 "input"
Name 226 "input"
Name 229 "@entryPointOutput"
Name 230 "param"
MemberDecorate 29($Global) 0 Offset 0
MemberDecorate 29($Global) 1 Offset 16
MemberDecorate 29($Global) 2 Offset 32
@ -570,8 +704,8 @@ gl_FragCoord origin is upper left
Decorate 29($Global) Block
Decorate 31 DescriptorSet 0
Decorate 31 Binding 0
Decorate 199(input) Location 0
Decorate 202(@entryPointOutput) Location 0
Decorate 226(input) Location 0
Decorate 229(@entryPointOutput) Location 0
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
@ -611,29 +745,35 @@ gl_FragCoord origin is upper left
148: 32(int) Constant 11
151: TypePointer Function 6(float)
154: 139(int) Constant 1
178: 13(bool) ConstantTrue
179: 13(bool) ConstantFalse
180: 14(bvec2) ConstantComposite 178 179
181: 6(float) Constant 1073741824
182: 16(fvec2) ConstantComposite 96 181
183: 6(float) Constant 1077936128
184: 6(float) Constant 1082130432
185: 16(fvec2) ConstantComposite 183 184
190: 6(float) Constant 1092616192
198: TypePointer Input 7(fvec4)
199(input): 198(ptr) Variable Input
201: TypePointer Output 7(fvec4)
202(@entryPointOutput): 201(ptr) Variable Output
168: TypePointer Function 139(int)
173: 139(int) Constant 21
179: 139(int) Constant 63
185: 139(int) Constant 5
191: 32(int) Constant 43981
192: 32(int) Constant 48346
205: 13(bool) ConstantTrue
206: 13(bool) ConstantFalse
207: 14(bvec2) ConstantComposite 205 206
208: 6(float) Constant 1073741824
209: 16(fvec2) ConstantComposite 96 208
210: 6(float) Constant 1077936128
211: 6(float) Constant 1082130432
212: 16(fvec2) ConstantComposite 210 211
217: 6(float) Constant 1092616192
225: TypePointer Input 7(fvec4)
226(input): 225(ptr) Variable Input
228: TypePointer Output 7(fvec4)
229(@entryPointOutput): 228(ptr) Variable Output
4(PixelShaderFunction): 2 Function None 3
5: Label
197(input): 24(ptr) Variable Function
203(param): 24(ptr) Variable Function
200: 7(fvec4) Load 199(input)
Store 197(input) 200
204: 7(fvec4) Load 197(input)
Store 203(param) 204
205: 7(fvec4) FunctionCall 27(@PixelShaderFunction(vf4;) 203(param)
Store 202(@entryPointOutput) 205
224(input): 24(ptr) Variable Function
230(param): 24(ptr) Variable Function
227: 7(fvec4) Load 226(input)
Store 224(input) 227
231: 7(fvec4) Load 224(input)
Store 230(param) 231
232: 7(fvec4) FunctionCall 27(@PixelShaderFunction(vf4;) 230(param)
Store 229(@entryPointOutput) 232
Return
FunctionEnd
9(vectorCond(): 7(fvec4) Function None 8
@ -720,9 +860,13 @@ gl_FragCoord origin is upper left
117(ret): 24(ptr) Variable Function
137(e): 109(ptr) Variable Function
150(f): 24(ptr) Variable Function
186(param): 15(ptr) Variable Function
187(param): 17(ptr) Variable Function
188(param): 17(ptr) Variable Function
169(g): 168(ptr) Variable Function
175(h): 168(ptr) Variable Function
181(i): 168(ptr) Variable Function
187(j): 168(ptr) Variable Function
213(param): 15(ptr) Variable Function
214(param): 17(ptr) Variable Function
215(param): 17(ptr) Variable Function
Store 110(a) 111
Store 112(b) 113
Store 114(c) 115
@ -776,23 +920,44 @@ gl_FragCoord origin is upper left
166: 43(bvec4) CompositeConstruct 157 157 157 157
167: 7(fvec4) Select 166 161 165
Store 150(f) 167
168: 32(int) Load 137(e)
169: 6(float) ConvertSToF 168
170: 7(fvec4) Load 117(ret)
171: 7(fvec4) VectorTimesScalar 170 169
172: 7(fvec4) Load 150(f)
173: 7(fvec4) FAdd 171 172
174: 7(fvec4) FunctionCall 9(vectorCond()
175: 7(fvec4) FAdd 173 174
176: 7(fvec4) FunctionCall 11(scalarCond()
177: 7(fvec4) FAdd 175 176
Store 186(param) 180
Store 187(param) 182
Store 188(param) 185
189: 16(fvec2) FunctionCall 22(fbSelect(vb2;vf2;vf2;) 186(param) 187(param) 188(param)
191: 6(float) CompositeExtract 189 0
192: 6(float) CompositeExtract 189 1
193: 7(fvec4) CompositeConstruct 191 192 190 190
194: 7(fvec4) FAdd 177 193
ReturnValue 194
170: 32(int) Load 116(d)
171: 6(float) ConvertSToF 170
172: 13(bool) FOrdGreaterThan 171 44
174: 139(int) Select 172 173 140
Store 169(g) 174
176: 139(int) Load 169(g)
177: 6(float) ConvertUToF 176
178: 13(bool) FOrdGreaterThan 177 44
180: 139(int) Select 178 179 140
Store 175(h) 180
182: 139(int) Load 175(h)
183: 6(float) ConvertUToF 182
184: 13(bool) FOrdGreaterThan 183 44
186: 139(int) Select 184 185 154
Store 181(i) 186
188: 139(int) Load 181(i)
189: 6(float) ConvertUToF 188
190: 13(bool) FOrdGreaterThan 189 44
193: 32(int) Select 190 191 192
194: 139(int) Bitcast 193
Store 187(j) 194
195: 32(int) Load 137(e)
196: 6(float) ConvertSToF 195
197: 7(fvec4) Load 117(ret)
198: 7(fvec4) VectorTimesScalar 197 196
199: 7(fvec4) Load 150(f)
200: 7(fvec4) FAdd 198 199
201: 7(fvec4) FunctionCall 9(vectorCond()
202: 7(fvec4) FAdd 200 201
203: 7(fvec4) FunctionCall 11(scalarCond()
204: 7(fvec4) FAdd 202 203
Store 213(param) 207
Store 214(param) 209
Store 215(param) 212
216: 16(fvec2) FunctionCall 22(fbSelect(vb2;vf2;vf2;) 213(param) 214(param) 215(param)
218: 6(float) CompositeExtract 216 0
219: 6(float) CompositeExtract 216 1
220: 7(fvec4) CompositeConstruct 218 219 217 217
221: 7(fvec4) FAdd 204 220
ReturnValue 221
FunctionEnd

View File

@ -0,0 +1,606 @@
hlsl.emptystructreturn.tesc
Shader version: 500
vertices = 3
vertex spacing = equal_spacing
triangle order = cw
0:? Sequence
0:16 Function Definition: blob(struct-HullInputType-vf41[3]; ( temp void)
0:16 Function Parameters:
0:16 'patch' ( in 3-element array of structure{ temp 4-component vector of float position})
0:20 Function Definition: ColorPatchConstantFunction(struct-HullInputType-vf41[3];u1; ( temp structure{ temp 3-element array of float edges, temp float inside})
0:20 Function Parameters:
0:20 'inputPatch' ( in 3-element array of structure{ temp 4-component vector of float position})
0:20 'patchId' ( in uint)
0:? Sequence
0:24 move second child to first child ( temp float)
0:24 direct index ( temp float)
0:24 edges: direct index for structure ( temp 3-element array of float)
0:24 'output' ( temp structure{ temp 3-element array of float edges, temp float inside})
0:24 Constant:
0:24 0 (const int)
0:24 Constant:
0:24 0 (const int)
0:24 Constant:
0:24 2.000000
0:25 move second child to first child ( temp float)
0:25 direct index ( temp float)
0:25 edges: direct index for structure ( temp 3-element array of float)
0:25 'output' ( temp structure{ temp 3-element array of float edges, temp float inside})
0:25 Constant:
0:25 0 (const int)
0:25 Constant:
0:25 1 (const int)
0:25 Constant:
0:25 2.000000
0:26 move second child to first child ( temp float)
0:26 direct index ( temp float)
0:26 edges: direct index for structure ( temp 3-element array of float)
0:26 'output' ( temp structure{ temp 3-element array of float edges, temp float inside})
0:26 Constant:
0:26 0 (const int)
0:26 Constant:
0:26 2 (const int)
0:26 Constant:
0:26 2.000000
0:29 move second child to first child ( temp float)
0:29 inside: direct index for structure ( temp float)
0:29 'output' ( temp structure{ temp 3-element array of float edges, temp float inside})
0:29 Constant:
0:29 1 (const int)
0:29 Constant:
0:29 2.000000
0:31 Branch: Return with expression
0:31 'output' ( temp structure{ temp 3-element array of float edges, temp float inside})
0:42 Function Definition: @main(struct-EmptyStruct1;struct-HullInputType-vf41[3];u1;u1; ( temp structure{})
0:42 Function Parameters:
0:42 'stage_input' ( in structure{})
0:42 'patch' ( in 3-element array of structure{ temp 4-component vector of float position})
0:42 'pointId' ( in uint)
0:42 'patchId' ( in uint)
0:? Sequence
0:44 Function Call: blob(struct-HullInputType-vf41[3]; ( temp void)
0:44 'patch' ( in 3-element array of structure{ temp 4-component vector of float position})
0:46 Branch: Return with expression
0:46 'output' ( temp structure{})
0:42 Function Definition: main( ( temp void)
0:42 Function Parameters:
0:? Sequence
0:42 Sequence
0:42 move second child to first child ( temp structure{})
0:? 'stage_input' ( temp structure{})
0:? 'stage_input' ( in structure{})
0:42 Sequence
0:42 move second child to first child ( temp 4-component vector of float)
0:42 position: direct index for structure ( temp 4-component vector of float)
0:42 direct index ( temp structure{ temp 4-component vector of float position})
0:? 'patch' ( temp 3-element array of structure{ temp 4-component vector of float position})
0:42 Constant:
0:42 0 (const int)
0:42 Constant:
0:42 0 (const int)
0:42 direct index ( in 4-component vector of float Position)
0:? 'patch.position' ( in 3-element array of 4-component vector of float Position)
0:42 Constant:
0:42 0 (const int)
0:42 move second child to first child ( temp 4-component vector of float)
0:42 position: direct index for structure ( temp 4-component vector of float)
0:42 direct index ( temp structure{ temp 4-component vector of float position})
0:? 'patch' ( temp 3-element array of structure{ temp 4-component vector of float position})
0:42 Constant:
0:42 1 (const int)
0:42 Constant:
0:42 0 (const int)
0:42 direct index ( in 4-component vector of float Position)
0:? 'patch.position' ( in 3-element array of 4-component vector of float Position)
0:42 Constant:
0:42 1 (const int)
0:42 move second child to first child ( temp 4-component vector of float)
0:42 position: direct index for structure ( temp 4-component vector of float)
0:42 direct index ( temp structure{ temp 4-component vector of float position})
0:? 'patch' ( temp 3-element array of structure{ temp 4-component vector of float position})
0:42 Constant:
0:42 2 (const int)
0:42 Constant:
0:42 0 (const int)
0:42 direct index ( in 4-component vector of float Position)
0:? 'patch.position' ( in 3-element array of 4-component vector of float Position)
0:42 Constant:
0:42 2 (const int)
0:42 move second child to first child ( temp uint)
0:? 'pointId' ( temp uint)
0:? 'pointId' ( in uint InvocationID)
0:42 move second child to first child ( temp uint)
0:? 'patchId' ( temp uint)
0:? 'patchId' ( in uint PrimitiveID)
0:42 Sequence
0:42 move second child to first child ( temp structure{})
0:42 indirect index ( out structure{})
0:? '@entryPointOutput' ( out 3-element array of structure{})
0:? 'pointId' ( in uint InvocationID)
0:42 Function Call: @main(struct-EmptyStruct1;struct-HullInputType-vf41[3];u1;u1; ( temp structure{})
0:? 'stage_input' ( temp structure{})
0:? 'patch' ( temp 3-element array of structure{ temp 4-component vector of float position})
0:? 'pointId' ( temp uint)
0:? 'patchId' ( temp uint)
0:? Barrier ( temp void)
0:? Test condition and select ( temp void)
0:? Condition
0:? Compare Equal ( temp bool)
0:? 'pointId' ( in uint InvocationID)
0:? Constant:
0:? 0 (const int)
0:? true case
0:? Sequence
0:? move second child to first child ( temp structure{ temp 3-element array of float edges, temp float inside})
0:? '@patchConstantResult' ( temp structure{ temp 3-element array of float edges, temp float inside})
0:? Function Call: ColorPatchConstantFunction(struct-HullInputType-vf41[3];u1; ( temp structure{ temp 3-element array of float edges, temp float inside})
0:? 'patch' ( temp 3-element array of structure{ temp 4-component vector of float position})
0:? 'patchId' ( in uint PrimitiveID)
0:? Sequence
0:? move second child to first child ( temp float)
0:? direct index ( patch out float TessLevelOuter)
0:? '@patchConstantOutput.edges' ( patch out 4-element array of float TessLevelOuter)
0:? Constant:
0:? 0 (const int)
0:? direct index ( temp float)
0:? edges: direct index for structure ( temp 3-element array of float)
0:? '@patchConstantResult' ( temp structure{ temp 3-element array of float edges, temp float inside})
0:? Constant:
0:? 0 (const int)
0:? Constant:
0:? 0 (const int)
0:? move second child to first child ( temp float)
0:? direct index ( patch out float TessLevelOuter)
0:? '@patchConstantOutput.edges' ( patch out 4-element array of float TessLevelOuter)
0:? Constant:
0:? 1 (const int)
0:? direct index ( temp float)
0:? edges: direct index for structure ( temp 3-element array of float)
0:? '@patchConstantResult' ( temp structure{ temp 3-element array of float edges, temp float inside})
0:? Constant:
0:? 0 (const int)
0:? Constant:
0:? 1 (const int)
0:? move second child to first child ( temp float)
0:? direct index ( patch out float TessLevelOuter)
0:? '@patchConstantOutput.edges' ( patch out 4-element array of float TessLevelOuter)
0:? Constant:
0:? 2 (const int)
0:? direct index ( temp float)
0:? edges: direct index for structure ( temp 3-element array of float)
0:? '@patchConstantResult' ( temp structure{ temp 3-element array of float edges, temp float inside})
0:? Constant:
0:? 0 (const int)
0:? Constant:
0:? 2 (const int)
0:? move second child to first child ( temp float)
0:? direct index ( patch out float TessLevelInner)
0:? '@patchConstantOutput.inside' ( patch out 2-element array of float TessLevelInner)
0:? Constant:
0:? 0 (const int)
0:? inside: direct index for structure ( temp float)
0:? '@patchConstantResult' ( temp structure{ temp 3-element array of float edges, temp float inside})
0:? Constant:
0:? 1 (const int)
0:? Linker Objects
0:? 'patch.position' ( in 3-element array of 4-component vector of float Position)
0:? 'pointId' ( in uint InvocationID)
0:? 'patchId' ( in uint PrimitiveID)
0:? '@patchConstantOutput.edges' ( patch out 4-element array of float TessLevelOuter)
0:? '@patchConstantOutput.inside' ( patch out 2-element array of float TessLevelInner)
Linked tessellation control stage:
Shader version: 500
vertices = 3
vertex spacing = equal_spacing
triangle order = cw
0:? Sequence
0:16 Function Definition: blob(struct-HullInputType-vf41[3]; ( temp void)
0:16 Function Parameters:
0:16 'patch' ( in 3-element array of structure{ temp 4-component vector of float position})
0:20 Function Definition: ColorPatchConstantFunction(struct-HullInputType-vf41[3];u1; ( temp structure{ temp 3-element array of float edges, temp float inside})
0:20 Function Parameters:
0:20 'inputPatch' ( in 3-element array of structure{ temp 4-component vector of float position})
0:20 'patchId' ( in uint)
0:? Sequence
0:24 move second child to first child ( temp float)
0:24 direct index ( temp float)
0:24 edges: direct index for structure ( temp 3-element array of float)
0:24 'output' ( temp structure{ temp 3-element array of float edges, temp float inside})
0:24 Constant:
0:24 0 (const int)
0:24 Constant:
0:24 0 (const int)
0:24 Constant:
0:24 2.000000
0:25 move second child to first child ( temp float)
0:25 direct index ( temp float)
0:25 edges: direct index for structure ( temp 3-element array of float)
0:25 'output' ( temp structure{ temp 3-element array of float edges, temp float inside})
0:25 Constant:
0:25 0 (const int)
0:25 Constant:
0:25 1 (const int)
0:25 Constant:
0:25 2.000000
0:26 move second child to first child ( temp float)
0:26 direct index ( temp float)
0:26 edges: direct index for structure ( temp 3-element array of float)
0:26 'output' ( temp structure{ temp 3-element array of float edges, temp float inside})
0:26 Constant:
0:26 0 (const int)
0:26 Constant:
0:26 2 (const int)
0:26 Constant:
0:26 2.000000
0:29 move second child to first child ( temp float)
0:29 inside: direct index for structure ( temp float)
0:29 'output' ( temp structure{ temp 3-element array of float edges, temp float inside})
0:29 Constant:
0:29 1 (const int)
0:29 Constant:
0:29 2.000000
0:31 Branch: Return with expression
0:31 'output' ( temp structure{ temp 3-element array of float edges, temp float inside})
0:42 Function Definition: @main(struct-EmptyStruct1;struct-HullInputType-vf41[3];u1;u1; ( temp structure{})
0:42 Function Parameters:
0:42 'stage_input' ( in structure{})
0:42 'patch' ( in 3-element array of structure{ temp 4-component vector of float position})
0:42 'pointId' ( in uint)
0:42 'patchId' ( in uint)
0:? Sequence
0:44 Function Call: blob(struct-HullInputType-vf41[3]; ( temp void)
0:44 'patch' ( in 3-element array of structure{ temp 4-component vector of float position})
0:46 Branch: Return with expression
0:46 'output' ( temp structure{})
0:42 Function Definition: main( ( temp void)
0:42 Function Parameters:
0:? Sequence
0:42 Sequence
0:42 move second child to first child ( temp structure{})
0:? 'stage_input' ( temp structure{})
0:? 'stage_input' ( in structure{})
0:42 Sequence
0:42 move second child to first child ( temp 4-component vector of float)
0:42 position: direct index for structure ( temp 4-component vector of float)
0:42 direct index ( temp structure{ temp 4-component vector of float position})
0:? 'patch' ( temp 3-element array of structure{ temp 4-component vector of float position})
0:42 Constant:
0:42 0 (const int)
0:42 Constant:
0:42 0 (const int)
0:42 direct index ( in 4-component vector of float Position)
0:? 'patch.position' ( in 3-element array of 4-component vector of float Position)
0:42 Constant:
0:42 0 (const int)
0:42 move second child to first child ( temp 4-component vector of float)
0:42 position: direct index for structure ( temp 4-component vector of float)
0:42 direct index ( temp structure{ temp 4-component vector of float position})
0:? 'patch' ( temp 3-element array of structure{ temp 4-component vector of float position})
0:42 Constant:
0:42 1 (const int)
0:42 Constant:
0:42 0 (const int)
0:42 direct index ( in 4-component vector of float Position)
0:? 'patch.position' ( in 3-element array of 4-component vector of float Position)
0:42 Constant:
0:42 1 (const int)
0:42 move second child to first child ( temp 4-component vector of float)
0:42 position: direct index for structure ( temp 4-component vector of float)
0:42 direct index ( temp structure{ temp 4-component vector of float position})
0:? 'patch' ( temp 3-element array of structure{ temp 4-component vector of float position})
0:42 Constant:
0:42 2 (const int)
0:42 Constant:
0:42 0 (const int)
0:42 direct index ( in 4-component vector of float Position)
0:? 'patch.position' ( in 3-element array of 4-component vector of float Position)
0:42 Constant:
0:42 2 (const int)
0:42 move second child to first child ( temp uint)
0:? 'pointId' ( temp uint)
0:? 'pointId' ( in uint InvocationID)
0:42 move second child to first child ( temp uint)
0:? 'patchId' ( temp uint)
0:? 'patchId' ( in uint PrimitiveID)
0:42 Sequence
0:42 move second child to first child ( temp structure{})
0:42 indirect index ( out structure{})
0:? '@entryPointOutput' ( out 3-element array of structure{})
0:? 'pointId' ( in uint InvocationID)
0:42 Function Call: @main(struct-EmptyStruct1;struct-HullInputType-vf41[3];u1;u1; ( temp structure{})
0:? 'stage_input' ( temp structure{})
0:? 'patch' ( temp 3-element array of structure{ temp 4-component vector of float position})
0:? 'pointId' ( temp uint)
0:? 'patchId' ( temp uint)
0:? Barrier ( temp void)
0:? Test condition and select ( temp void)
0:? Condition
0:? Compare Equal ( temp bool)
0:? 'pointId' ( in uint InvocationID)
0:? Constant:
0:? 0 (const int)
0:? true case
0:? Sequence
0:? move second child to first child ( temp structure{ temp 3-element array of float edges, temp float inside})
0:? '@patchConstantResult' ( temp structure{ temp 3-element array of float edges, temp float inside})
0:? Function Call: ColorPatchConstantFunction(struct-HullInputType-vf41[3];u1; ( temp structure{ temp 3-element array of float edges, temp float inside})
0:? 'patch' ( temp 3-element array of structure{ temp 4-component vector of float position})
0:? 'patchId' ( in uint PrimitiveID)
0:? Sequence
0:? move second child to first child ( temp float)
0:? direct index ( patch out float TessLevelOuter)
0:? '@patchConstantOutput.edges' ( patch out 4-element array of float TessLevelOuter)
0:? Constant:
0:? 0 (const int)
0:? direct index ( temp float)
0:? edges: direct index for structure ( temp 3-element array of float)
0:? '@patchConstantResult' ( temp structure{ temp 3-element array of float edges, temp float inside})
0:? Constant:
0:? 0 (const int)
0:? Constant:
0:? 0 (const int)
0:? move second child to first child ( temp float)
0:? direct index ( patch out float TessLevelOuter)
0:? '@patchConstantOutput.edges' ( patch out 4-element array of float TessLevelOuter)
0:? Constant:
0:? 1 (const int)
0:? direct index ( temp float)
0:? edges: direct index for structure ( temp 3-element array of float)
0:? '@patchConstantResult' ( temp structure{ temp 3-element array of float edges, temp float inside})
0:? Constant:
0:? 0 (const int)
0:? Constant:
0:? 1 (const int)
0:? move second child to first child ( temp float)
0:? direct index ( patch out float TessLevelOuter)
0:? '@patchConstantOutput.edges' ( patch out 4-element array of float TessLevelOuter)
0:? Constant:
0:? 2 (const int)
0:? direct index ( temp float)
0:? edges: direct index for structure ( temp 3-element array of float)
0:? '@patchConstantResult' ( temp structure{ temp 3-element array of float edges, temp float inside})
0:? Constant:
0:? 0 (const int)
0:? Constant:
0:? 2 (const int)
0:? move second child to first child ( temp float)
0:? direct index ( patch out float TessLevelInner)
0:? '@patchConstantOutput.inside' ( patch out 2-element array of float TessLevelInner)
0:? Constant:
0:? 0 (const int)
0:? inside: direct index for structure ( temp float)
0:? '@patchConstantResult' ( temp structure{ temp 3-element array of float edges, temp float inside})
0:? Constant:
0:? 1 (const int)
0:? Linker Objects
0:? 'patch.position' ( in 3-element array of 4-component vector of float Position)
0:? 'pointId' ( in uint InvocationID)
0:? 'patchId' ( in uint PrimitiveID)
0:? '@patchConstantOutput.edges' ( patch out 4-element array of float TessLevelOuter)
0:? '@patchConstantOutput.inside' ( patch out 2-element array of float TessLevelInner)
Validation failed
// Module Version 10000
// Generated by (magic number): 8000b
// Id's are bound by 132
Capability Tessellation
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint TessellationControl 4 "main" 65 79 82 115 128
ExecutionMode 4 OutputVertices 3
ExecutionMode 4 Triangles
ExecutionMode 4 SpacingEqual
ExecutionMode 4 VertexOrderCw
Source HLSL 500
Name 4 "main"
Name 8 "HullInputType"
MemberName 8(HullInputType) 0 "position"
Name 15 "blob(struct-HullInputType-vf41[3];"
Name 14 "patch"
Name 19 "ConstantOutputType"
MemberName 19(ConstantOutputType) 0 "edges"
MemberName 19(ConstantOutputType) 1 "inside"
Name 23 "ColorPatchConstantFunction(struct-HullInputType-vf41[3];u1;"
Name 21 "inputPatch"
Name 22 "patchId"
Name 25 "EmptyStruct"
Name 27 "HullOutputType"
Name 33 "@main(struct-EmptyStruct1;struct-HullInputType-vf41[3];u1;u1;"
Name 29 "stage_input"
Name 30 "patch"
Name 31 "pointId"
Name 32 "patchId"
Name 36 "output"
Name 50 "param"
Name 54 "output"
Name 58 "stage_input"
Name 60 "stage_input"
Name 62 "patch"
Name 65 "patch.position"
Name 77 "pointId"
Name 79 "pointId"
Name 81 "patchId"
Name 82 "patchId"
Name 86 "@entryPointOutput"
Name 88 "param"
Name 90 "param"
Name 92 "param"
Name 94 "param"
Name 107 "@patchConstantResult"
Name 108 "param"
Name 110 "param"
Name 115 "@patchConstantOutput.edges"
Name 128 "@patchConstantOutput.inside"
Decorate 65(patch.position) BuiltIn Position
Decorate 79(pointId) BuiltIn InvocationId
Decorate 82(patchId) BuiltIn PrimitiveId
Decorate 115(@patchConstantOutput.edges) Patch
Decorate 115(@patchConstantOutput.edges) BuiltIn TessLevelOuter
Decorate 128(@patchConstantOutput.inside) Patch
Decorate 128(@patchConstantOutput.inside) BuiltIn TessLevelInner
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
7: TypeVector 6(float) 4
8(HullInputType): TypeStruct 7(fvec4)
9: TypeInt 32 0
10: 9(int) Constant 3
11: TypeArray 8(HullInputType) 10
12: TypePointer Function 11
13: TypeFunction 2 12(ptr)
17: TypePointer Function 9(int)
18: TypeArray 6(float) 10
19(ConstantOutputType): TypeStruct 18 6(float)
20: TypeFunction 19(ConstantOutputType) 12(ptr) 17(ptr)
25(EmptyStruct): TypeStruct
26: TypePointer Function 25(EmptyStruct)
27(HullOutputType): TypeStruct
28: TypeFunction 27(HullOutputType) 26(ptr) 12(ptr) 17(ptr) 17(ptr)
35: TypePointer Function 19(ConstantOutputType)
37: TypeInt 32 1
38: 37(int) Constant 0
39: 6(float) Constant 1073741824
40: TypePointer Function 6(float)
42: 37(int) Constant 1
44: 37(int) Constant 2
53: TypePointer Function 27(HullOutputType)
59: TypePointer Input 25(EmptyStruct)
60(stage_input): 59(ptr) Variable Input
63: TypeArray 7(fvec4) 10
64: TypePointer Input 63
65(patch.position): 64(ptr) Variable Input
66: TypePointer Input 7(fvec4)
69: TypePointer Function 7(fvec4)
78: TypePointer Input 9(int)
79(pointId): 78(ptr) Variable Input
82(patchId): 78(ptr) Variable Input
84: TypeArray 27(HullOutputType) 10
85: TypePointer Output 84
86(@entryPointOutput): 85(ptr) Variable Output
97: TypePointer Output 27(HullOutputType)
99: 9(int) Constant 2
100: 9(int) Constant 4
101: 9(int) Constant 0
103: TypeBool
113: TypeArray 6(float) 100
114: TypePointer Output 113
115(@patchConstantOutput.edges): 114(ptr) Variable Output
118: TypePointer Output 6(float)
126: TypeArray 6(float) 99
127: TypePointer Output 126
128(@patchConstantOutput.inside): 127(ptr) Variable Output
4(main): 2 Function None 3
5: Label
58(stage_input): 26(ptr) Variable Function
62(patch): 12(ptr) Variable Function
77(pointId): 17(ptr) Variable Function
81(patchId): 17(ptr) Variable Function
88(param): 26(ptr) Variable Function
90(param): 12(ptr) Variable Function
92(param): 17(ptr) Variable Function
94(param): 17(ptr) Variable Function
107(@patchConstantResult): 35(ptr) Variable Function
108(param): 12(ptr) Variable Function
110(param): 17(ptr) Variable Function
61:25(EmptyStruct) Load 60(stage_input)
Store 58(stage_input) 61
67: 66(ptr) AccessChain 65(patch.position) 38
68: 7(fvec4) Load 67
70: 69(ptr) AccessChain 62(patch) 38 38
Store 70 68
71: 66(ptr) AccessChain 65(patch.position) 42
72: 7(fvec4) Load 71
73: 69(ptr) AccessChain 62(patch) 42 38
Store 73 72
74: 66(ptr) AccessChain 65(patch.position) 44
75: 7(fvec4) Load 74
76: 69(ptr) AccessChain 62(patch) 44 38
Store 76 75
80: 9(int) Load 79(pointId)
Store 77(pointId) 80
83: 9(int) Load 82(patchId)
Store 81(patchId) 83
87: 9(int) Load 79(pointId)
89:25(EmptyStruct) Load 58(stage_input)
Store 88(param) 89
91: 11 Load 62(patch)
Store 90(param) 91
93: 9(int) Load 77(pointId)
Store 92(param) 93
95: 9(int) Load 81(patchId)
Store 94(param) 95
96:27(HullOutputType) FunctionCall 33(@main(struct-EmptyStruct1;struct-HullInputType-vf41[3];u1;u1;) 88(param) 90(param) 92(param) 94(param)
98: 97(ptr) AccessChain 86(@entryPointOutput) 87
Store 98 96
ControlBarrier 99 100 101
102: 9(int) Load 79(pointId)
104: 103(bool) IEqual 102 38
SelectionMerge 106 None
BranchConditional 104 105 106
105: Label
109: 11 Load 62(patch)
Store 108(param) 109
111: 9(int) Load 82(patchId)
Store 110(param) 111
112:19(ConstantOutputType) FunctionCall 23(ColorPatchConstantFunction(struct-HullInputType-vf41[3];u1;) 108(param) 110(param)
Store 107(@patchConstantResult) 112
116: 40(ptr) AccessChain 107(@patchConstantResult) 38 38
117: 6(float) Load 116
119: 118(ptr) AccessChain 115(@patchConstantOutput.edges) 38
Store 119 117
120: 40(ptr) AccessChain 107(@patchConstantResult) 38 42
121: 6(float) Load 120
122: 118(ptr) AccessChain 115(@patchConstantOutput.edges) 42
Store 122 121
123: 40(ptr) AccessChain 107(@patchConstantResult) 38 44
124: 6(float) Load 123
125: 118(ptr) AccessChain 115(@patchConstantOutput.edges) 44
Store 125 124
129: 40(ptr) AccessChain 107(@patchConstantResult) 42
130: 6(float) Load 129
131: 118(ptr) AccessChain 128(@patchConstantOutput.inside) 38
Store 131 130
Branch 106
106: Label
Return
FunctionEnd
15(blob(struct-HullInputType-vf41[3];): 2 Function None 13
14(patch): 12(ptr) FunctionParameter
16: Label
Return
FunctionEnd
23(ColorPatchConstantFunction(struct-HullInputType-vf41[3];u1;):19(ConstantOutputType) Function None 20
21(inputPatch): 12(ptr) FunctionParameter
22(patchId): 17(ptr) FunctionParameter
24: Label
36(output): 35(ptr) Variable Function
41: 40(ptr) AccessChain 36(output) 38 38
Store 41 39
43: 40(ptr) AccessChain 36(output) 38 42
Store 43 39
45: 40(ptr) AccessChain 36(output) 38 44
Store 45 39
46: 40(ptr) AccessChain 36(output) 42
Store 46 39
47:19(ConstantOutputType) Load 36(output)
ReturnValue 47
FunctionEnd
33(@main(struct-EmptyStruct1;struct-HullInputType-vf41[3];u1;u1;):27(HullOutputType) Function None 28
29(stage_input): 26(ptr) FunctionParameter
30(patch): 12(ptr) FunctionParameter
31(pointId): 17(ptr) FunctionParameter
32(patchId): 17(ptr) FunctionParameter
34: Label
50(param): 12(ptr) Variable Function
54(output): 53(ptr) Variable Function
51: 11 Load 30(patch)
Store 50(param) 51
52: 2 FunctionCall 15(blob(struct-HullInputType-vf41[3];) 50(param)
55:27(HullOutputType) Load 54(output)
ReturnValue 55
FunctionEnd

View File

@ -1,6 +1,6 @@
hlsl.function.frag
ERROR: 0:24: 'fun1' : unknown variable
ERROR: 0:24: 'return' : type does not match, or is not convertible to, the function's return type
ERROR: 0:29: 'fun1' : unknown variable
ERROR: 0:29: 'return' : type does not match, or is not convertible to, the function's return type
ERROR: 2 compilation errors. No code generated.
@ -16,45 +16,63 @@ ERROR: node is still EOpNull!
0:3 1.000000
0:3 1.000000
0:3 1.000000
0:7 Function Definition: fun2(vf4; ( temp uint)
0:7 Function Definition: fun2(vf4; ( temp 4-component vector of float)
0:7 Function Parameters:
0:7 'col' ( in 4-component vector of float)
0:7 'col' ( const (read only) 4-component vector of float)
0:? Sequence
0:8 Branch: Return with expression
0:8 Construct vec4 ( temp 4-component vector of float)
0:8 Comma ( temp float)
0:8 Comma ( temp float)
0:8 Comma ( temp float)
0:8 Constant:
0:8 7 (const uint)
0:12 Function Definition: fun4(u1;u1; ( temp 4-component vector of float)
0:8 1.000000
0:8 Constant:
0:8 2.000000
0:8 Constant:
0:8 3.000000
0:8 Constant:
0:8 4.000000
0:12 Function Definition: fun3(vf4; ( temp uint)
0:12 Function Parameters:
0:12 'id1' ( in uint)
0:12 'id2' ( uniform uint)
0:12 'col' ( const (read only) 4-component vector of float)
0:? Sequence
0:13 Branch: Return with expression
0:13 Construct vec4 ( temp 4-component vector of float)
0:13 Convert uint to float ( temp float)
0:13 component-wise multiply ( temp uint)
0:13 'id1' ( in uint)
0:13 'id2' ( uniform uint)
0:17 Function Definition: fun1(i1; ( temp 4-component vector of float)
0:13 Constant:
0:13 7 (const uint)
0:17 Function Definition: fun4(u1;u1; ( temp 4-component vector of float)
0:17 Function Parameters:
0:17 'index' ( in int)
0:17 'id1' ( in uint)
0:17 'id2' ( uniform uint)
0:? Sequence
0:18 Sequence
0:18 move second child to first child ( temp uint)
0:18 'entityId' ( temp uint)
0:18 Function Call: fun2(vf4; ( temp uint)
0:18 Function Call: fun0( ( temp 4-component vector of float)
0:19 Branch: Return with expression
0:19 Function Call: fun4(u1;u1; ( temp 4-component vector of float)
0:19 'entityId' ( temp uint)
0:19 'entityId' ( temp uint)
0:23 Function Definition: @main( ( temp int)
0:23 Function Parameters:
0:23 Function Definition: main( ( temp void)
0:23 Function Parameters:
0:18 Branch: Return with expression
0:18 Construct vec4 ( temp 4-component vector of float)
0:18 Convert uint to float ( temp float)
0:18 component-wise multiply ( temp uint)
0:18 'id1' ( in uint)
0:18 'id2' ( uniform uint)
0:22 Function Definition: fun1(i1; ( temp 4-component vector of float)
0:22 Function Parameters:
0:22 'index' ( in int)
0:? Sequence
0:23 move second child to first child ( temp int)
0:23 Sequence
0:23 move second child to first child ( temp uint)
0:23 'entityId' ( temp uint)
0:23 Function Call: fun3(vf4; ( temp uint)
0:23 Function Call: fun2(vf4; ( temp 4-component vector of float)
0:23 Function Call: fun0( ( temp 4-component vector of float)
0:24 Branch: Return with expression
0:24 Function Call: fun4(u1;u1; ( temp 4-component vector of float)
0:24 'entityId' ( temp uint)
0:24 'entityId' ( temp uint)
0:28 Function Definition: @main( ( temp int)
0:28 Function Parameters:
0:28 Function Definition: main( ( temp void)
0:28 Function Parameters:
0:? Sequence
0:28 move second child to first child ( temp int)
0:? '@entryPointOutput' (layout( location=0) out int)
0:23 Function Call: @main( ( temp int)
0:28 Function Call: @main( ( temp int)
0:? Linker Objects
0:? '@entryPointOutput' (layout( location=0) out int)
@ -74,45 +92,63 @@ ERROR: node is still EOpNull!
0:3 1.000000
0:3 1.000000
0:3 1.000000
0:7 Function Definition: fun2(vf4; ( temp uint)
0:7 Function Definition: fun2(vf4; ( temp 4-component vector of float)
0:7 Function Parameters:
0:7 'col' ( in 4-component vector of float)
0:7 'col' ( const (read only) 4-component vector of float)
0:? Sequence
0:8 Branch: Return with expression
0:8 Construct vec4 ( temp 4-component vector of float)
0:8 Comma ( temp float)
0:8 Comma ( temp float)
0:8 Comma ( temp float)
0:8 Constant:
0:8 7 (const uint)
0:12 Function Definition: fun4(u1;u1; ( temp 4-component vector of float)
0:8 1.000000
0:8 Constant:
0:8 2.000000
0:8 Constant:
0:8 3.000000
0:8 Constant:
0:8 4.000000
0:12 Function Definition: fun3(vf4; ( temp uint)
0:12 Function Parameters:
0:12 'id1' ( in uint)
0:12 'id2' ( uniform uint)
0:12 'col' ( const (read only) 4-component vector of float)
0:? Sequence
0:13 Branch: Return with expression
0:13 Construct vec4 ( temp 4-component vector of float)
0:13 Convert uint to float ( temp float)
0:13 component-wise multiply ( temp uint)
0:13 'id1' ( in uint)
0:13 'id2' ( uniform uint)
0:17 Function Definition: fun1(i1; ( temp 4-component vector of float)
0:13 Constant:
0:13 7 (const uint)
0:17 Function Definition: fun4(u1;u1; ( temp 4-component vector of float)
0:17 Function Parameters:
0:17 'index' ( in int)
0:17 'id1' ( in uint)
0:17 'id2' ( uniform uint)
0:? Sequence
0:18 Sequence
0:18 move second child to first child ( temp uint)
0:18 'entityId' ( temp uint)
0:18 Function Call: fun2(vf4; ( temp uint)
0:18 Function Call: fun0( ( temp 4-component vector of float)
0:19 Branch: Return with expression
0:19 Function Call: fun4(u1;u1; ( temp 4-component vector of float)
0:19 'entityId' ( temp uint)
0:19 'entityId' ( temp uint)
0:23 Function Definition: @main( ( temp int)
0:23 Function Parameters:
0:23 Function Definition: main( ( temp void)
0:23 Function Parameters:
0:18 Branch: Return with expression
0:18 Construct vec4 ( temp 4-component vector of float)
0:18 Convert uint to float ( temp float)
0:18 component-wise multiply ( temp uint)
0:18 'id1' ( in uint)
0:18 'id2' ( uniform uint)
0:22 Function Definition: fun1(i1; ( temp 4-component vector of float)
0:22 Function Parameters:
0:22 'index' ( in int)
0:? Sequence
0:23 move second child to first child ( temp int)
0:23 Sequence
0:23 move second child to first child ( temp uint)
0:23 'entityId' ( temp uint)
0:23 Function Call: fun3(vf4; ( temp uint)
0:23 Function Call: fun2(vf4; ( temp 4-component vector of float)
0:23 Function Call: fun0( ( temp 4-component vector of float)
0:24 Branch: Return with expression
0:24 Function Call: fun4(u1;u1; ( temp 4-component vector of float)
0:24 'entityId' ( temp uint)
0:24 'entityId' ( temp uint)
0:28 Function Definition: @main( ( temp int)
0:28 Function Parameters:
0:28 Function Definition: main( ( temp void)
0:28 Function Parameters:
0:? Sequence
0:28 move second child to first child ( temp int)
0:? '@entryPointOutput' (layout( location=0) out int)
0:23 Function Call: @main( ( temp int)
0:28 Function Call: @main( ( temp int)
0:? Linker Objects
0:? '@entryPointOutput' (layout( location=0) out int)

View File

@ -31,29 +31,20 @@ gl_FragCoord origin is upper left
0:20 10.000000
0:22 Constant:
0:22 10.000000
0:25 Sequence
0:25 move second child to first child ( temp float)
0:25 'n' ( temp float)
0:25 Constant:
0:25 0.000000
0:26 Sequence
0:26 move second child to first child ( temp 8-element array of 3-component vector of float)
0:26 'a' ( const (read only) 8-element array of 3-component vector of float)
0:26 Construct vec3 ( temp 8-element array of 3-component vector of float)
0:27 vector-scale ( temp 3-component vector of float)
0:27 Constant:
0:27 0.577350
0:27 0.577350
0:27 0.577350
0:27 add second child into first child ( temp float)
0:27 'n' ( temp float)
0:27 Constant:
0:27 1.000000
0:26 move second child to first child ( temp float)
0:26 'n' ( temp float)
0:26 Constant:
0:26 0.000000
0:27 Sequence
0:27 move second child to first child ( temp 8-element array of 3-component vector of float)
0:27 'a' ( const (read only) 8-element array of 3-component vector of float)
0:27 Construct vec3 ( temp 8-element array of 3-component vector of float)
0:28 vector-scale ( temp 3-component vector of float)
0:28 Constant:
0:28 -0.577350
0:28 -0.577350
0:28 -0.577350
0:28 0.577350
0:28 0.577350
0:28 0.577350
0:28 add second child into first child ( temp float)
0:28 'n' ( temp float)
0:28 Constant:
@ -62,7 +53,7 @@ gl_FragCoord origin is upper left
0:29 Constant:
0:29 -0.577350
0:29 -0.577350
0:29 0.577350
0:29 -0.577350
0:29 add second child into first child ( temp float)
0:29 'n' ( temp float)
0:29 Constant:
@ -70,8 +61,8 @@ gl_FragCoord origin is upper left
0:30 vector-scale ( temp 3-component vector of float)
0:30 Constant:
0:30 -0.577350
0:30 0.577350
0:30 -0.577350
0:30 0.577350
0:30 add second child into first child ( temp float)
0:30 'n' ( temp float)
0:30 Constant:
@ -80,16 +71,16 @@ gl_FragCoord origin is upper left
0:31 Constant:
0:31 -0.577350
0:31 0.577350
0:31 0.577350
0:31 -0.577350
0:31 add second child into first child ( temp float)
0:31 'n' ( temp float)
0:31 Constant:
0:31 1.000000
0:32 vector-scale ( temp 3-component vector of float)
0:32 Constant:
0:32 -0.577350
0:32 0.577350
0:32 0.577350
0:32 -0.577350
0:32 -0.577350
0:32 add second child into first child ( temp float)
0:32 'n' ( temp float)
0:32 Constant:
@ -98,7 +89,7 @@ gl_FragCoord origin is upper left
0:33 Constant:
0:33 0.577350
0:33 -0.577350
0:33 0.577350
0:33 -0.577350
0:33 add second child into first child ( temp float)
0:33 'n' ( temp float)
0:33 Constant:
@ -106,38 +97,38 @@ gl_FragCoord origin is upper left
0:34 vector-scale ( temp 3-component vector of float)
0:34 Constant:
0:34 0.577350
0:34 0.577350
0:34 -0.577350
0:34 0.577350
0:34 add second child into first child ( temp float)
0:34 'n' ( temp float)
0:34 Constant:
0:34 1.000000
0:36 Sequence
0:36 move second child to first child ( temp structure{ temp 3-component vector of float a})
0:36 'oneNonConst' ( const (read only) structure{ temp 3-component vector of float a})
0:36 Construct structure ( temp structure{ temp 3-component vector of float a})
0:36 vector-scale ( temp 3-component vector of float)
0:36 Constant:
0:36 -0.577350
0:36 0.577350
0:36 0.577350
0:36 add second child into first child ( temp float)
0:36 'n' ( temp float)
0:36 Constant:
0:36 1.000000
0:38 Sequence
0:38 move second child to first child ( temp structure{ temp 3-component vector of float a, temp 3-component vector of float b})
0:38 'twoNonConst' ( const (read only) structure{ temp 3-component vector of float a, temp 3-component vector of float b})
0:38 Construct structure ( temp structure{ temp 3-component vector of float a, temp 3-component vector of float b})
0:38 vector-scale ( temp 3-component vector of float)
0:38 Constant:
0:38 -0.577350
0:38 0.577350
0:38 0.577350
0:38 add second child into first child ( temp float)
0:38 'n' ( temp float)
0:38 Constant:
0:38 1.000000
0:35 vector-scale ( temp 3-component vector of float)
0:35 Constant:
0:35 0.577350
0:35 0.577350
0:35 -0.577350
0:35 add second child into first child ( temp float)
0:35 'n' ( temp float)
0:35 Constant:
0:35 1.000000
0:37 Sequence
0:37 move second child to first child ( temp structure{ temp 3-component vector of float a})
0:37 'oneNonConst' ( const (read only) structure{ temp 3-component vector of float a})
0:37 Construct structure ( temp structure{ temp 3-component vector of float a})
0:37 vector-scale ( temp 3-component vector of float)
0:37 Constant:
0:37 -0.577350
0:37 0.577350
0:37 0.577350
0:37 add second child into first child ( temp float)
0:37 'n' ( temp float)
0:37 Constant:
0:37 1.000000
0:39 Sequence
0:39 move second child to first child ( temp structure{ temp 3-component vector of float a, temp 3-component vector of float b})
0:39 'twoNonConst' ( const (read only) structure{ temp 3-component vector of float a, temp 3-component vector of float b})
0:39 Construct structure ( temp structure{ temp 3-component vector of float a, temp 3-component vector of float b})
0:39 vector-scale ( temp 3-component vector of float)
0:39 Constant:
0:39 -0.577350
@ -147,32 +138,41 @@ gl_FragCoord origin is upper left
0:39 'n' ( temp float)
0:39 Constant:
0:39 1.000000
0:45 Function Definition: @main( ( temp structure{ temp 4-component vector of float color})
0:45 Function Parameters:
0:40 vector-scale ( temp 3-component vector of float)
0:40 Constant:
0:40 -0.577350
0:40 0.577350
0:40 0.577350
0:40 add second child into first child ( temp float)
0:40 'n' ( temp float)
0:40 Constant:
0:40 1.000000
0:46 Function Definition: @main( ( temp structure{ temp 4-component vector of float color})
0:46 Function Parameters:
0:? Sequence
0:46 Function Call: Test1( ( temp void)
0:49 move second child to first child ( temp 4-component vector of float)
0:49 color: direct index for structure ( temp 4-component vector of float)
0:49 'ps_output' ( temp structure{ temp 4-component vector of float color})
0:49 Constant:
0:49 0 (const int)
0:49 Constant:
0:49 1.000000
0:49 1.000000
0:49 1.000000
0:49 1.000000
0:50 Branch: Return with expression
0:47 Function Call: Test1( ( temp void)
0:50 move second child to first child ( temp 4-component vector of float)
0:50 color: direct index for structure ( temp 4-component vector of float)
0:50 'ps_output' ( temp structure{ temp 4-component vector of float color})
0:45 Function Definition: main( ( temp void)
0:45 Function Parameters:
0:50 Constant:
0:50 0 (const int)
0:50 Constant:
0:50 1.000000
0:50 1.000000
0:50 1.000000
0:50 1.000000
0:51 Branch: Return with expression
0:51 'ps_output' ( temp structure{ temp 4-component vector of float color})
0:46 Function Definition: main( ( temp void)
0:46 Function Parameters:
0:? Sequence
0:45 Sequence
0:45 move second child to first child ( temp 4-component vector of float)
0:46 Sequence
0:46 move second child to first child ( temp 4-component vector of float)
0:? '@entryPointOutput.color' (layout( location=0) out 4-component vector of float)
0:45 color: direct index for structure ( temp 4-component vector of float)
0:45 Function Call: @main( ( temp structure{ temp 4-component vector of float color})
0:45 Constant:
0:45 0 (const int)
0:46 color: direct index for structure ( temp 4-component vector of float)
0:46 Function Call: @main( ( temp structure{ temp 4-component vector of float color})
0:46 Constant:
0:46 0 (const int)
0:? Linker Objects
0:? '@entryPointOutput.color' (layout( location=0) out 4-component vector of float)
@ -212,29 +212,20 @@ gl_FragCoord origin is upper left
0:20 10.000000
0:22 Constant:
0:22 10.000000
0:25 Sequence
0:25 move second child to first child ( temp float)
0:25 'n' ( temp float)
0:25 Constant:
0:25 0.000000
0:26 Sequence
0:26 move second child to first child ( temp 8-element array of 3-component vector of float)
0:26 'a' ( const (read only) 8-element array of 3-component vector of float)
0:26 Construct vec3 ( temp 8-element array of 3-component vector of float)
0:27 vector-scale ( temp 3-component vector of float)
0:27 Constant:
0:27 0.577350
0:27 0.577350
0:27 0.577350
0:27 add second child into first child ( temp float)
0:27 'n' ( temp float)
0:27 Constant:
0:27 1.000000
0:26 move second child to first child ( temp float)
0:26 'n' ( temp float)
0:26 Constant:
0:26 0.000000
0:27 Sequence
0:27 move second child to first child ( temp 8-element array of 3-component vector of float)
0:27 'a' ( const (read only) 8-element array of 3-component vector of float)
0:27 Construct vec3 ( temp 8-element array of 3-component vector of float)
0:28 vector-scale ( temp 3-component vector of float)
0:28 Constant:
0:28 -0.577350
0:28 -0.577350
0:28 -0.577350
0:28 0.577350
0:28 0.577350
0:28 0.577350
0:28 add second child into first child ( temp float)
0:28 'n' ( temp float)
0:28 Constant:
@ -243,7 +234,7 @@ gl_FragCoord origin is upper left
0:29 Constant:
0:29 -0.577350
0:29 -0.577350
0:29 0.577350
0:29 -0.577350
0:29 add second child into first child ( temp float)
0:29 'n' ( temp float)
0:29 Constant:
@ -251,8 +242,8 @@ gl_FragCoord origin is upper left
0:30 vector-scale ( temp 3-component vector of float)
0:30 Constant:
0:30 -0.577350
0:30 0.577350
0:30 -0.577350
0:30 0.577350
0:30 add second child into first child ( temp float)
0:30 'n' ( temp float)
0:30 Constant:
@ -261,16 +252,16 @@ gl_FragCoord origin is upper left
0:31 Constant:
0:31 -0.577350
0:31 0.577350
0:31 0.577350
0:31 -0.577350
0:31 add second child into first child ( temp float)
0:31 'n' ( temp float)
0:31 Constant:
0:31 1.000000
0:32 vector-scale ( temp 3-component vector of float)
0:32 Constant:
0:32 -0.577350
0:32 0.577350
0:32 0.577350
0:32 -0.577350
0:32 -0.577350
0:32 add second child into first child ( temp float)
0:32 'n' ( temp float)
0:32 Constant:
@ -279,7 +270,7 @@ gl_FragCoord origin is upper left
0:33 Constant:
0:33 0.577350
0:33 -0.577350
0:33 0.577350
0:33 -0.577350
0:33 add second child into first child ( temp float)
0:33 'n' ( temp float)
0:33 Constant:
@ -287,38 +278,38 @@ gl_FragCoord origin is upper left
0:34 vector-scale ( temp 3-component vector of float)
0:34 Constant:
0:34 0.577350
0:34 0.577350
0:34 -0.577350
0:34 0.577350
0:34 add second child into first child ( temp float)
0:34 'n' ( temp float)
0:34 Constant:
0:34 1.000000
0:36 Sequence
0:36 move second child to first child ( temp structure{ temp 3-component vector of float a})
0:36 'oneNonConst' ( const (read only) structure{ temp 3-component vector of float a})
0:36 Construct structure ( temp structure{ temp 3-component vector of float a})
0:36 vector-scale ( temp 3-component vector of float)
0:36 Constant:
0:36 -0.577350
0:36 0.577350
0:36 0.577350
0:36 add second child into first child ( temp float)
0:36 'n' ( temp float)
0:36 Constant:
0:36 1.000000
0:38 Sequence
0:38 move second child to first child ( temp structure{ temp 3-component vector of float a, temp 3-component vector of float b})
0:38 'twoNonConst' ( const (read only) structure{ temp 3-component vector of float a, temp 3-component vector of float b})
0:38 Construct structure ( temp structure{ temp 3-component vector of float a, temp 3-component vector of float b})
0:38 vector-scale ( temp 3-component vector of float)
0:38 Constant:
0:38 -0.577350
0:38 0.577350
0:38 0.577350
0:38 add second child into first child ( temp float)
0:38 'n' ( temp float)
0:38 Constant:
0:38 1.000000
0:35 vector-scale ( temp 3-component vector of float)
0:35 Constant:
0:35 0.577350
0:35 0.577350
0:35 -0.577350
0:35 add second child into first child ( temp float)
0:35 'n' ( temp float)
0:35 Constant:
0:35 1.000000
0:37 Sequence
0:37 move second child to first child ( temp structure{ temp 3-component vector of float a})
0:37 'oneNonConst' ( const (read only) structure{ temp 3-component vector of float a})
0:37 Construct structure ( temp structure{ temp 3-component vector of float a})
0:37 vector-scale ( temp 3-component vector of float)
0:37 Constant:
0:37 -0.577350
0:37 0.577350
0:37 0.577350
0:37 add second child into first child ( temp float)
0:37 'n' ( temp float)
0:37 Constant:
0:37 1.000000
0:39 Sequence
0:39 move second child to first child ( temp structure{ temp 3-component vector of float a, temp 3-component vector of float b})
0:39 'twoNonConst' ( const (read only) structure{ temp 3-component vector of float a, temp 3-component vector of float b})
0:39 Construct structure ( temp structure{ temp 3-component vector of float a, temp 3-component vector of float b})
0:39 vector-scale ( temp 3-component vector of float)
0:39 Constant:
0:39 -0.577350
@ -328,32 +319,41 @@ gl_FragCoord origin is upper left
0:39 'n' ( temp float)
0:39 Constant:
0:39 1.000000
0:45 Function Definition: @main( ( temp structure{ temp 4-component vector of float color})
0:45 Function Parameters:
0:40 vector-scale ( temp 3-component vector of float)
0:40 Constant:
0:40 -0.577350
0:40 0.577350
0:40 0.577350
0:40 add second child into first child ( temp float)
0:40 'n' ( temp float)
0:40 Constant:
0:40 1.000000
0:46 Function Definition: @main( ( temp structure{ temp 4-component vector of float color})
0:46 Function Parameters:
0:? Sequence
0:46 Function Call: Test1( ( temp void)
0:49 move second child to first child ( temp 4-component vector of float)
0:49 color: direct index for structure ( temp 4-component vector of float)
0:49 'ps_output' ( temp structure{ temp 4-component vector of float color})
0:49 Constant:
0:49 0 (const int)
0:49 Constant:
0:49 1.000000
0:49 1.000000
0:49 1.000000
0:49 1.000000
0:50 Branch: Return with expression
0:47 Function Call: Test1( ( temp void)
0:50 move second child to first child ( temp 4-component vector of float)
0:50 color: direct index for structure ( temp 4-component vector of float)
0:50 'ps_output' ( temp structure{ temp 4-component vector of float color})
0:45 Function Definition: main( ( temp void)
0:45 Function Parameters:
0:50 Constant:
0:50 0 (const int)
0:50 Constant:
0:50 1.000000
0:50 1.000000
0:50 1.000000
0:50 1.000000
0:51 Branch: Return with expression
0:51 'ps_output' ( temp structure{ temp 4-component vector of float color})
0:46 Function Definition: main( ( temp void)
0:46 Function Parameters:
0:? Sequence
0:45 Sequence
0:45 move second child to first child ( temp 4-component vector of float)
0:46 Sequence
0:46 move second child to first child ( temp 4-component vector of float)
0:? '@entryPointOutput.color' (layout( location=0) out 4-component vector of float)
0:45 color: direct index for structure ( temp 4-component vector of float)
0:45 Function Call: @main( ( temp structure{ temp 4-component vector of float color})
0:45 Constant:
0:45 0 (const int)
0:46 color: direct index for structure ( temp 4-component vector of float)
0:46 Function Call: @main( ( temp structure{ temp 4-component vector of float color})
0:46 Constant:
0:46 0 (const int)
0:? Linker Objects
0:? '@entryPointOutput.color' (layout( location=0) out 4-component vector of float)

File diff suppressed because it is too large Load Diff

View File

@ -5,33 +5,69 @@ gl_FragCoord origin is upper left
0:9 Function Definition: @main( ( temp structure{ temp 4-component vector of float Color})
0:9 Function Parameters:
0:? Sequence
0:40 add ( temp mediump 2-component vector of float)
0:40 'mf16_2' ( temp mediump 2-component vector of float)
0:40 'mf16' ( temp mediump float)
0:41 add ( temp mediump 2-component vector of float)
0:41 'mf10_2' ( temp mediump 2-component vector of float)
0:41 'mf10' ( temp mediump float)
0:42 add ( temp mediump 2-component vector of int)
0:42 'mi16_2' ( temp mediump 2-component vector of int)
0:42 'mi16' ( temp mediump int)
0:43 add ( temp mediump 2-component vector of int)
0:43 'mi12_2' ( temp mediump 2-component vector of int)
0:43 'mi12' ( temp mediump int)
0:44 add ( temp mediump 2-component vector of uint)
0:44 'mu16_2' ( temp mediump 2-component vector of uint)
0:44 'mu16' ( temp mediump uint)
0:47 move second child to first child ( temp 4-component vector of float)
0:47 Color: direct index for structure ( temp 4-component vector of float)
0:47 'psout' ( temp structure{ temp 4-component vector of float Color})
0:47 Constant:
0:47 0 (const int)
0:47 Constant:
0:47 0.000000
0:47 0.000000
0:47 0.000000
0:47 0.000000
0:48 Branch: Return with expression
0:48 'psout' ( temp structure{ temp 4-component vector of float Color})
0:85 add ( temp mediump 2-component vector of float)
0:85 'mf16_2' ( temp mediump 2-component vector of float)
0:85 'mf16' ( temp mediump float)
0:86 add ( temp mediump 2-component vector of float)
0:86 'mf10_2' ( temp mediump 2-component vector of float)
0:86 'mf10' ( temp mediump float)
0:87 add ( temp mediump 2-component vector of int)
0:87 'mi16_2' ( temp mediump 2-component vector of int)
0:87 'mi16' ( temp mediump int)
0:88 add ( temp mediump 2-component vector of int)
0:88 'mi12_2' ( temp mediump 2-component vector of int)
0:88 'mi12' ( temp mediump int)
0:89 add ( temp mediump 2-component vector of uint)
0:89 'mu16_2' ( temp mediump 2-component vector of uint)
0:89 'mu16' ( temp mediump uint)
0:91 matrix-times-vector ( temp mediump 4-component vector of float)
0:91 'mf16_2x4' ( temp mediump 2X4 matrix of float)
0:91 'mf16_2' ( temp mediump 2-component vector of float)
0:92 matrix-times-vector ( temp mediump 4-component vector of float)
0:92 'mf16_3x4' ( temp mediump 3X4 matrix of float)
0:92 'mf16_3' ( temp mediump 3-component vector of float)
0:93 matrix-times-vector ( temp mediump 4-component vector of float)
0:93 'mf16_4x4' ( temp mediump 4X4 matrix of float)
0:93 'mf16_4' ( temp mediump 4-component vector of float)
0:94 vector-times-matrix ( temp mediump 4-component vector of float)
0:94 'mf16_2' ( temp mediump 2-component vector of float)
0:94 'mf16_4x2' ( temp mediump 4X2 matrix of float)
0:95 vector-times-matrix ( temp mediump 4-component vector of float)
0:95 'mf16_3' ( temp mediump 3-component vector of float)
0:95 'mf16_4x3' ( temp mediump 4X3 matrix of float)
0:96 vector-times-matrix ( temp mediump 4-component vector of float)
0:96 'mf16_4' ( temp mediump 4-component vector of float)
0:96 'mf16_4x4' ( temp mediump 4X4 matrix of float)
0:98 matrix-times-vector ( temp mediump 4-component vector of float)
0:98 'mf10_2x4' ( temp mediump 2X4 matrix of float)
0:98 'mf10_2' ( temp mediump 2-component vector of float)
0:99 matrix-times-vector ( temp mediump 4-component vector of float)
0:99 'mf10_3x4' ( temp mediump 3X4 matrix of float)
0:99 'mf10_3' ( temp mediump 3-component vector of float)
0:100 matrix-times-vector ( temp mediump 4-component vector of float)
0:100 'mf10_4x4' ( temp mediump 4X4 matrix of float)
0:100 'mf10_4' ( temp mediump 4-component vector of float)
0:101 vector-times-matrix ( temp mediump 4-component vector of float)
0:101 'mf10_2' ( temp mediump 2-component vector of float)
0:101 'mf10_4x2' ( temp mediump 4X2 matrix of float)
0:102 vector-times-matrix ( temp mediump 4-component vector of float)
0:102 'mf10_3' ( temp mediump 3-component vector of float)
0:102 'mf10_4x3' ( temp mediump 4X3 matrix of float)
0:103 vector-times-matrix ( temp mediump 4-component vector of float)
0:103 'mf10_4' ( temp mediump 4-component vector of float)
0:103 'mf10_4x4' ( temp mediump 4X4 matrix of float)
0:106 move second child to first child ( temp 4-component vector of float)
0:106 Color: direct index for structure ( temp 4-component vector of float)
0:106 'psout' ( temp structure{ temp 4-component vector of float Color})
0:106 Constant:
0:106 0 (const int)
0:106 Constant:
0:106 0.000000
0:106 0.000000
0:106 0.000000
0:106 0.000000
0:107 Branch: Return with expression
0:107 'psout' ( temp structure{ temp 4-component vector of float Color})
0:9 Function Definition: main( ( temp void)
0:9 Function Parameters:
0:? Sequence
@ -56,33 +92,69 @@ gl_FragCoord origin is upper left
0:9 Function Definition: @main( ( temp structure{ temp 4-component vector of float Color})
0:9 Function Parameters:
0:? Sequence
0:40 add ( temp mediump 2-component vector of float)
0:40 'mf16_2' ( temp mediump 2-component vector of float)
0:40 'mf16' ( temp mediump float)
0:41 add ( temp mediump 2-component vector of float)
0:41 'mf10_2' ( temp mediump 2-component vector of float)
0:41 'mf10' ( temp mediump float)
0:42 add ( temp mediump 2-component vector of int)
0:42 'mi16_2' ( temp mediump 2-component vector of int)
0:42 'mi16' ( temp mediump int)
0:43 add ( temp mediump 2-component vector of int)
0:43 'mi12_2' ( temp mediump 2-component vector of int)
0:43 'mi12' ( temp mediump int)
0:44 add ( temp mediump 2-component vector of uint)
0:44 'mu16_2' ( temp mediump 2-component vector of uint)
0:44 'mu16' ( temp mediump uint)
0:47 move second child to first child ( temp 4-component vector of float)
0:47 Color: direct index for structure ( temp 4-component vector of float)
0:47 'psout' ( temp structure{ temp 4-component vector of float Color})
0:47 Constant:
0:47 0 (const int)
0:47 Constant:
0:47 0.000000
0:47 0.000000
0:47 0.000000
0:47 0.000000
0:48 Branch: Return with expression
0:48 'psout' ( temp structure{ temp 4-component vector of float Color})
0:85 add ( temp mediump 2-component vector of float)
0:85 'mf16_2' ( temp mediump 2-component vector of float)
0:85 'mf16' ( temp mediump float)
0:86 add ( temp mediump 2-component vector of float)
0:86 'mf10_2' ( temp mediump 2-component vector of float)
0:86 'mf10' ( temp mediump float)
0:87 add ( temp mediump 2-component vector of int)
0:87 'mi16_2' ( temp mediump 2-component vector of int)
0:87 'mi16' ( temp mediump int)
0:88 add ( temp mediump 2-component vector of int)
0:88 'mi12_2' ( temp mediump 2-component vector of int)
0:88 'mi12' ( temp mediump int)
0:89 add ( temp mediump 2-component vector of uint)
0:89 'mu16_2' ( temp mediump 2-component vector of uint)
0:89 'mu16' ( temp mediump uint)
0:91 matrix-times-vector ( temp mediump 4-component vector of float)
0:91 'mf16_2x4' ( temp mediump 2X4 matrix of float)
0:91 'mf16_2' ( temp mediump 2-component vector of float)
0:92 matrix-times-vector ( temp mediump 4-component vector of float)
0:92 'mf16_3x4' ( temp mediump 3X4 matrix of float)
0:92 'mf16_3' ( temp mediump 3-component vector of float)
0:93 matrix-times-vector ( temp mediump 4-component vector of float)
0:93 'mf16_4x4' ( temp mediump 4X4 matrix of float)
0:93 'mf16_4' ( temp mediump 4-component vector of float)
0:94 vector-times-matrix ( temp mediump 4-component vector of float)
0:94 'mf16_2' ( temp mediump 2-component vector of float)
0:94 'mf16_4x2' ( temp mediump 4X2 matrix of float)
0:95 vector-times-matrix ( temp mediump 4-component vector of float)
0:95 'mf16_3' ( temp mediump 3-component vector of float)
0:95 'mf16_4x3' ( temp mediump 4X3 matrix of float)
0:96 vector-times-matrix ( temp mediump 4-component vector of float)
0:96 'mf16_4' ( temp mediump 4-component vector of float)
0:96 'mf16_4x4' ( temp mediump 4X4 matrix of float)
0:98 matrix-times-vector ( temp mediump 4-component vector of float)
0:98 'mf10_2x4' ( temp mediump 2X4 matrix of float)
0:98 'mf10_2' ( temp mediump 2-component vector of float)
0:99 matrix-times-vector ( temp mediump 4-component vector of float)
0:99 'mf10_3x4' ( temp mediump 3X4 matrix of float)
0:99 'mf10_3' ( temp mediump 3-component vector of float)
0:100 matrix-times-vector ( temp mediump 4-component vector of float)
0:100 'mf10_4x4' ( temp mediump 4X4 matrix of float)
0:100 'mf10_4' ( temp mediump 4-component vector of float)
0:101 vector-times-matrix ( temp mediump 4-component vector of float)
0:101 'mf10_2' ( temp mediump 2-component vector of float)
0:101 'mf10_4x2' ( temp mediump 4X2 matrix of float)
0:102 vector-times-matrix ( temp mediump 4-component vector of float)
0:102 'mf10_3' ( temp mediump 3-component vector of float)
0:102 'mf10_4x3' ( temp mediump 4X3 matrix of float)
0:103 vector-times-matrix ( temp mediump 4-component vector of float)
0:103 'mf10_4' ( temp mediump 4-component vector of float)
0:103 'mf10_4x4' ( temp mediump 4X4 matrix of float)
0:106 move second child to first child ( temp 4-component vector of float)
0:106 Color: direct index for structure ( temp 4-component vector of float)
0:106 'psout' ( temp structure{ temp 4-component vector of float Color})
0:106 Constant:
0:106 0 (const int)
0:106 Constant:
0:106 0.000000
0:106 0.000000
0:106 0.000000
0:106 0.000000
0:107 Branch: Return with expression
0:107 'psout' ( temp structure{ temp 4-component vector of float Color})
0:9 Function Definition: main( ( temp void)
0:9 Function Parameters:
0:? Sequence
@ -99,12 +171,12 @@ gl_FragCoord origin is upper left
// Module Version 10000
// Generated by (magic number): 8000b
// Id's are bound by 70
// Id's are bound by 132
Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" 64
EntryPoint Fragment 4 "main" 126
ExecutionMode 4 OriginUpperLeft
Source HLSL 500
Name 4 "main"
@ -121,12 +193,26 @@ gl_FragCoord origin is upper left
Name 39 "mi12"
Name 46 "mu16_2"
Name 49 "mu16"
Name 54 "psout"
Name 64 "@entryPointOutput.Color"
Name 67 "$Global"
MemberName 67($Global) 0 "b1a"
MemberName 67($Global) 1 "b1b"
Name 69 ""
Name 55 "mf16_2x4"
Name 61 "mf16_3x4"
Name 65 "mf16_3"
Name 70 "mf16_4x4"
Name 73 "mf16_4"
Name 79 "mf16_4x2"
Name 85 "mf16_4x3"
Name 91 "mf10_2x4"
Name 95 "mf10_3x4"
Name 97 "mf10_3"
Name 100 "mf10_4x4"
Name 102 "mf10_4"
Name 106 "mf10_4x2"
Name 110 "mf10_4x3"
Name 117 "psout"
Name 126 "@entryPointOutput.Color"
Name 129 "$Global"
MemberName 129($Global) 0 "b1a"
MemberName 129($Global) 1 "b1b"
Name 131 ""
Decorate 14(mf16_2) RelaxedPrecision
Decorate 15 RelaxedPrecision
Decorate 17(mf16) RelaxedPrecision
@ -157,14 +243,64 @@ gl_FragCoord origin is upper left
Decorate 50 RelaxedPrecision
Decorate 51 RelaxedPrecision
Decorate 52 RelaxedPrecision
Decorate 64(@entryPointOutput.Color) Location 0
MemberDecorate 67($Global) 0 RelaxedPrecision
MemberDecorate 67($Global) 0 Offset 0
MemberDecorate 67($Global) 1 RelaxedPrecision
MemberDecorate 67($Global) 1 Offset 4
Decorate 67($Global) Block
Decorate 69 DescriptorSet 0
Decorate 69 Binding 0
Decorate 55(mf16_2x4) RelaxedPrecision
Decorate 56 RelaxedPrecision
Decorate 57 RelaxedPrecision
Decorate 58 RelaxedPrecision
Decorate 61(mf16_3x4) RelaxedPrecision
Decorate 62 RelaxedPrecision
Decorate 65(mf16_3) RelaxedPrecision
Decorate 66 RelaxedPrecision
Decorate 67 RelaxedPrecision
Decorate 70(mf16_4x4) RelaxedPrecision
Decorate 71 RelaxedPrecision
Decorate 73(mf16_4) RelaxedPrecision
Decorate 74 RelaxedPrecision
Decorate 75 RelaxedPrecision
Decorate 76 RelaxedPrecision
Decorate 79(mf16_4x2) RelaxedPrecision
Decorate 80 RelaxedPrecision
Decorate 81 RelaxedPrecision
Decorate 82 RelaxedPrecision
Decorate 85(mf16_4x3) RelaxedPrecision
Decorate 86 RelaxedPrecision
Decorate 87 RelaxedPrecision
Decorate 88 RelaxedPrecision
Decorate 89 RelaxedPrecision
Decorate 90 RelaxedPrecision
Decorate 91(mf10_2x4) RelaxedPrecision
Decorate 92 RelaxedPrecision
Decorate 93 RelaxedPrecision
Decorate 94 RelaxedPrecision
Decorate 95(mf10_3x4) RelaxedPrecision
Decorate 96 RelaxedPrecision
Decorate 97(mf10_3) RelaxedPrecision
Decorate 98 RelaxedPrecision
Decorate 99 RelaxedPrecision
Decorate 100(mf10_4x4) RelaxedPrecision
Decorate 101 RelaxedPrecision
Decorate 102(mf10_4) RelaxedPrecision
Decorate 103 RelaxedPrecision
Decorate 104 RelaxedPrecision
Decorate 105 RelaxedPrecision
Decorate 106(mf10_4x2) RelaxedPrecision
Decorate 107 RelaxedPrecision
Decorate 108 RelaxedPrecision
Decorate 109 RelaxedPrecision
Decorate 110(mf10_4x3) RelaxedPrecision
Decorate 111 RelaxedPrecision
Decorate 112 RelaxedPrecision
Decorate 113 RelaxedPrecision
Decorate 114 RelaxedPrecision
Decorate 115 RelaxedPrecision
Decorate 126(@entryPointOutput.Color) Location 0
MemberDecorate 129($Global) 0 RelaxedPrecision
MemberDecorate 129($Global) 0 Offset 0
MemberDecorate 129($Global) 1 RelaxedPrecision
MemberDecorate 129($Global) 1 Offset 4
Decorate 129($Global) Block
Decorate 131 DescriptorSet 0
Decorate 131 Binding 0
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
@ -182,21 +318,33 @@ gl_FragCoord origin is upper left
44: TypeVector 43(int) 2
45: TypePointer Function 44(ivec2)
48: TypePointer Function 43(int)
53: TypePointer Function 8(PS_OUTPUT)
55: 27(int) Constant 0
56: 6(float) Constant 0
57: 7(fvec4) ConstantComposite 56 56 56 56
58: TypePointer Function 7(fvec4)
63: TypePointer Output 7(fvec4)
64(@entryPointOutput.Color): 63(ptr) Variable Output
67($Global): TypeStruct 6(float) 6(float)
68: TypePointer Uniform 67($Global)
69: 68(ptr) Variable Uniform
53: TypeMatrix 7(fvec4) 2
54: TypePointer Function 53
59: TypeMatrix 7(fvec4) 3
60: TypePointer Function 59
63: TypeVector 6(float) 3
64: TypePointer Function 63(fvec3)
68: TypeMatrix 7(fvec4) 4
69: TypePointer Function 68
72: TypePointer Function 7(fvec4)
77: TypeMatrix 12(fvec2) 4
78: TypePointer Function 77
83: TypeMatrix 63(fvec3) 4
84: TypePointer Function 83
116: TypePointer Function 8(PS_OUTPUT)
118: 27(int) Constant 0
119: 6(float) Constant 0
120: 7(fvec4) ConstantComposite 119 119 119 119
125: TypePointer Output 7(fvec4)
126(@entryPointOutput.Color): 125(ptr) Variable Output
129($Global): TypeStruct 6(float) 6(float)
130: TypePointer Uniform 129($Global)
131: 130(ptr) Variable Uniform
4(main): 2 Function None 3
5: Label
65:8(PS_OUTPUT) FunctionCall 10(@main()
66: 7(fvec4) CompositeExtract 65 0
Store 64(@entryPointOutput.Color) 66
127:8(PS_OUTPUT) FunctionCall 10(@main()
128: 7(fvec4) CompositeExtract 127 0
Store 126(@entryPointOutput.Color) 128
Return
FunctionEnd
10(@main():8(PS_OUTPUT) Function None 9
@ -211,7 +359,21 @@ gl_FragCoord origin is upper left
39(mi12): 32(ptr) Variable Function
46(mu16_2): 45(ptr) Variable Function
49(mu16): 48(ptr) Variable Function
54(psout): 53(ptr) Variable Function
55(mf16_2x4): 54(ptr) Variable Function
61(mf16_3x4): 60(ptr) Variable Function
65(mf16_3): 64(ptr) Variable Function
70(mf16_4x4): 69(ptr) Variable Function
73(mf16_4): 72(ptr) Variable Function
79(mf16_4x2): 78(ptr) Variable Function
85(mf16_4x3): 84(ptr) Variable Function
91(mf10_2x4): 54(ptr) Variable Function
95(mf10_3x4): 60(ptr) Variable Function
97(mf10_3): 64(ptr) Variable Function
100(mf10_4x4): 69(ptr) Variable Function
102(mf10_4): 72(ptr) Variable Function
106(mf10_4x2): 78(ptr) Variable Function
110(mf10_4x3): 84(ptr) Variable Function
117(psout): 116(ptr) Variable Function
15: 12(fvec2) Load 14(mf16_2)
18: 6(float) Load 17(mf16)
19: 12(fvec2) CompositeConstruct 18 18
@ -232,8 +394,44 @@ gl_FragCoord origin is upper left
50: 43(int) Load 49(mu16)
51: 44(ivec2) CompositeConstruct 50 50
52: 44(ivec2) IAdd 47 51
59: 58(ptr) AccessChain 54(psout) 55
Store 59 57
60:8(PS_OUTPUT) Load 54(psout)
ReturnValue 60
56: 53 Load 55(mf16_2x4)
57: 12(fvec2) Load 14(mf16_2)
58: 7(fvec4) MatrixTimesVector 56 57
62: 59 Load 61(mf16_3x4)
66: 63(fvec3) Load 65(mf16_3)
67: 7(fvec4) MatrixTimesVector 62 66
71: 68 Load 70(mf16_4x4)
74: 7(fvec4) Load 73(mf16_4)
75: 7(fvec4) MatrixTimesVector 71 74
76: 12(fvec2) Load 14(mf16_2)
80: 77 Load 79(mf16_4x2)
81: 7(fvec4) VectorTimesMatrix 76 80
82: 63(fvec3) Load 65(mf16_3)
86: 83 Load 85(mf16_4x3)
87: 7(fvec4) VectorTimesMatrix 82 86
88: 7(fvec4) Load 73(mf16_4)
89: 68 Load 70(mf16_4x4)
90: 7(fvec4) VectorTimesMatrix 88 89
92: 53 Load 91(mf10_2x4)
93: 12(fvec2) Load 21(mf10_2)
94: 7(fvec4) MatrixTimesVector 92 93
96: 59 Load 95(mf10_3x4)
98: 63(fvec3) Load 97(mf10_3)
99: 7(fvec4) MatrixTimesVector 96 98
101: 68 Load 100(mf10_4x4)
103: 7(fvec4) Load 102(mf10_4)
104: 7(fvec4) MatrixTimesVector 101 103
105: 12(fvec2) Load 21(mf10_2)
107: 77 Load 106(mf10_4x2)
108: 7(fvec4) VectorTimesMatrix 105 107
109: 63(fvec3) Load 97(mf10_3)
111: 83 Load 110(mf10_4x3)
112: 7(fvec4) VectorTimesMatrix 109 111
113: 7(fvec4) Load 102(mf10_4)
114: 68 Load 100(mf10_4x4)
115: 7(fvec4) VectorTimesMatrix 113 114
121: 72(ptr) AccessChain 117(psout) 118
Store 121 120
122:8(PS_OUTPUT) Load 117(psout)
ReturnValue 122
FunctionEnd

View File

@ -0,0 +1,119 @@
hlsl.nested-runtimeArray.frag
Shader version: 500
gl_FragCoord origin is upper left
0:? Sequence
0:7 Function Definition: @main( ( temp float)
0:7 Function Parameters:
0:? Sequence
0:8 Branch: Return with expression
0:8 direct index ( temp float)
0:8 a: direct index for structure ( temp unsized 1-element array of float)
0:8 direct index (layout( row_major std430) buffer structure{ temp unsized 1-element array of float a})
0:8 @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of structure{ temp unsized 1-element array of float a})
0:8 'B' (layout( row_major std430) buffer block{layout( row_major std430) buffer unsized 1-element array of structure{ temp unsized 1-element array of float a} @data})
0:8 Constant:
0:8 0 (const uint)
0:8 Constant:
0:8 0 (const int)
0:8 Constant:
0:8 0 (const int)
0:8 Constant:
0:8 0 (const int)
0:7 Function Definition: main( ( temp void)
0:7 Function Parameters:
0:? Sequence
0:7 move second child to first child ( temp float)
0:? '@entryPointOutput' (layout( location=0) out float)
0:7 Function Call: @main( ( temp float)
0:? Linker Objects
0:? 'B' (layout( row_major std430) buffer block{layout( row_major std430) buffer unsized 1-element array of structure{ temp unsized 1-element array of float a} @data})
0:? '@entryPointOutput' (layout( location=0) out float)
Linked fragment stage:
Shader version: 500
gl_FragCoord origin is upper left
0:? Sequence
0:7 Function Definition: @main( ( temp float)
0:7 Function Parameters:
0:? Sequence
0:8 Branch: Return with expression
0:8 direct index ( temp float)
0:8 a: direct index for structure ( temp unsized 1-element array of float)
0:8 direct index (layout( row_major std430) buffer structure{ temp unsized 1-element array of float a})
0:8 @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of structure{ temp unsized 1-element array of float a})
0:8 'B' (layout( row_major std430) buffer block{layout( row_major std430) buffer unsized 1-element array of structure{ temp unsized 1-element array of float a} @data})
0:8 Constant:
0:8 0 (const uint)
0:8 Constant:
0:8 0 (const int)
0:8 Constant:
0:8 0 (const int)
0:8 Constant:
0:8 0 (const int)
0:7 Function Definition: main( ( temp void)
0:7 Function Parameters:
0:? Sequence
0:7 move second child to first child ( temp float)
0:? '@entryPointOutput' (layout( location=0) out float)
0:7 Function Call: @main( ( temp float)
0:? Linker Objects
0:? 'B' (layout( row_major std430) buffer block{layout( row_major std430) buffer unsized 1-element array of structure{ temp unsized 1-element array of float a} @data})
0:? '@entryPointOutput' (layout( location=0) out float)
// Module Version 10000
// Generated by (magic number): 8000b
// Id's are bound by 26
Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" 24
ExecutionMode 4 OriginUpperLeft
Source HLSL 500
Name 4 "main"
Name 8 "@main("
Name 11 "A"
MemberName 11(A) 0 "a"
Name 13 "B"
MemberName 13(B) 0 "@data"
Name 15 "B"
Name 24 "@entryPointOutput"
Decorate 10 ArrayStride 4
MemberDecorate 11(A) 0 Offset 0
Decorate 11(A) BufferBlock
Decorate 12 ArrayStride 4
MemberDecorate 13(B) 0 Offset 0
Decorate 13(B) BufferBlock
Decorate 15(B) DescriptorSet 0
Decorate 15(B) Binding 0
Decorate 24(@entryPointOutput) Location 0
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
7: TypeFunction 6(float)
10: TypeRuntimeArray 6(float)
11(A): TypeStruct 10
12: TypeRuntimeArray 11(A)
13(B): TypeStruct 12
14: TypePointer Uniform 13(B)
15(B): 14(ptr) Variable Uniform
16: TypeInt 32 1
17: 16(int) Constant 0
18: TypePointer Uniform 6(float)
23: TypePointer Output 6(float)
24(@entryPointOutput): 23(ptr) Variable Output
4(main): 2 Function None 3
5: Label
25: 6(float) FunctionCall 8(@main()
Store 24(@entryPointOutput) 25
Return
FunctionEnd
8(@main(): 6(float) Function None 7
9: Label
19: 18(ptr) AccessChain 15(B) 17 17 17 17
20: 6(float) Load 19
ReturnValue 20
FunctionEnd

View File

@ -2,94 +2,124 @@ hlsl.numericsuffixes.frag
Shader version: 500
gl_FragCoord origin is upper left
0:? Sequence
0:5 Function Definition: @main( ( temp structure{ temp 4-component vector of float color})
0:5 Function Parameters:
0:8 Function Definition: @main( ( temp structure{ temp 4-component vector of float color})
0:8 Function Parameters:
0:? Sequence
0:7 Sequence
0:7 move second child to first child ( temp float)
0:7 'r00' ( temp float)
0:7 Constant:
0:7 1.000000
0:8 Sequence
0:8 move second child to first child ( temp uint)
0:8 'r01' ( temp uint)
0:8 Constant:
0:8 1 (const uint)
0:9 Sequence
0:9 move second child to first child ( temp uint)
0:9 'r02' ( temp uint)
0:9 Constant:
0:9 2 (const uint)
0:10 Sequence
0:10 move second child to first child ( temp uint)
0:10 'r03' ( temp uint)
0:10 move second child to first child ( temp float)
0:10 'r00' ( temp float)
0:10 Constant:
0:10 2748 (const uint)
0:10 1.000000
0:11 Sequence
0:11 move second child to first child ( temp uint)
0:11 'r04' ( temp uint)
0:11 'r01' ( temp uint)
0:11 Constant:
0:11 2748 (const uint)
0:11 1 (const uint)
0:12 Sequence
0:12 move second child to first child ( temp int)
0:12 'r05' ( temp int)
0:12 move second child to first child ( temp uint)
0:12 'r02' ( temp uint)
0:12 Constant:
0:12 5 (const int)
0:12 2 (const uint)
0:13 Sequence
0:13 move second child to first child ( temp int)
0:13 'r06' ( temp int)
0:13 move second child to first child ( temp uint)
0:13 'r03' ( temp uint)
0:13 Constant:
0:13 6 (const int)
0:13 2748 (const uint)
0:14 Sequence
0:14 move second child to first child ( temp int)
0:14 'r07' ( temp int)
0:14 move second child to first child ( temp uint)
0:14 'r04' ( temp uint)
0:14 Constant:
0:14 57 (const int)
0:14 2748 (const uint)
0:15 Sequence
0:15 move second child to first child ( temp uint)
0:15 'r08' ( temp uint)
0:15 move second child to first child ( temp int)
0:15 'r05' ( temp int)
0:15 Constant:
0:15 58 (const uint)
0:15 5 (const int)
0:16 Sequence
0:16 move second child to first child ( temp float)
0:16 'r09' ( temp float)
0:16 move second child to first child ( temp int)
0:16 'r06' ( temp int)
0:16 Constant:
0:16 1.000000
0:16 6 (const int)
0:17 Sequence
0:17 move second child to first child ( temp float)
0:17 'r10' ( temp float)
0:17 move second child to first child ( temp int)
0:17 'r07' ( temp int)
0:17 Constant:
0:17 1.000000
0:17 57 (const int)
0:18 Sequence
0:18 move second child to first child ( temp float)
0:18 'r11' ( temp float)
0:18 move second child to first child ( temp uint)
0:18 'r08' ( temp uint)
0:18 Constant:
0:18 1.100000
0:18 58 (const uint)
0:19 Sequence
0:19 move second child to first child ( temp float)
0:19 'r12' ( temp float)
0:19 'r09' ( temp float)
0:19 Constant:
0:19 1.100000
0:22 move second child to first child ( temp 4-component vector of float)
0:22 color: direct index for structure ( temp 4-component vector of float)
0:22 'ps_output' ( temp structure{ temp 4-component vector of float color})
0:19 1.000000
0:20 Sequence
0:20 move second child to first child ( temp float)
0:20 'r10' ( temp float)
0:20 Constant:
0:20 1.000000
0:21 Sequence
0:21 move second child to first child ( temp float)
0:21 'r11' ( temp float)
0:21 Constant:
0:21 1.100000
0:22 Sequence
0:22 move second child to first child ( temp float)
0:22 'r12' ( temp float)
0:22 Constant:
0:22 0 (const int)
0:22 Construct vec4 ( temp 4-component vector of float)
0:22 Convert int to float ( temp float)
0:22 'r07' ( temp int)
0:23 Branch: Return with expression
0:23 'ps_output' ( temp structure{ temp 4-component vector of float color})
0:5 Function Definition: main( ( temp void)
0:5 Function Parameters:
0:22 1.100000
0:23 Sequence
0:23 move second child to first child ( temp uint)
0:23 'r13' ( temp uint)
0:23 Constant:
0:23 1 (const uint)
0:24 Sequence
0:24 move second child to first child ( temp uint)
0:24 'r14' ( temp uint)
0:24 Constant:
0:24 2 (const uint)
0:25 Sequence
0:25 move second child to first child ( temp int)
0:25 'r15' ( temp int)
0:25 Constant:
0:25 3 (const int)
0:26 Sequence
0:26 move second child to first child ( temp int)
0:26 'r16' ( temp int)
0:26 Constant:
0:26 4 (const int)
0:27 Sequence
0:27 move second child to first child ( temp uint)
0:27 'r17' ( temp uint)
0:27 Constant:
0:27 1 (const uint)
0:28 Sequence
0:28 move second child to first child ( temp int)
0:28 'r18' ( temp int)
0:28 Constant:
0:28 3 (const int)
0:31 move second child to first child ( temp 4-component vector of float)
0:31 color: direct index for structure ( temp 4-component vector of float)
0:31 'ps_output' ( temp structure{ temp 4-component vector of float color})
0:31 Constant:
0:31 0 (const int)
0:31 Construct vec4 ( temp 4-component vector of float)
0:31 Convert int to float ( temp float)
0:31 'r07' ( temp int)
0:32 Branch: Return with expression
0:32 'ps_output' ( temp structure{ temp 4-component vector of float color})
0:8 Function Definition: main( ( temp void)
0:8 Function Parameters:
0:? Sequence
0:5 Sequence
0:5 move second child to first child ( temp 4-component vector of float)
0:8 Sequence
0:8 move second child to first child ( temp 4-component vector of float)
0:? '@entryPointOutput.color' (layout( location=0) out 4-component vector of float)
0:5 color: direct index for structure ( temp 4-component vector of float)
0:5 Function Call: @main( ( temp structure{ temp 4-component vector of float color})
0:5 Constant:
0:5 0 (const int)
0:8 color: direct index for structure ( temp 4-component vector of float)
0:8 Function Call: @main( ( temp structure{ temp 4-component vector of float color})
0:8 Constant:
0:8 0 (const int)
0:? Linker Objects
0:? '@entryPointOutput.color' (layout( location=0) out 4-component vector of float)
@ -100,105 +130,135 @@ Linked fragment stage:
Shader version: 500
gl_FragCoord origin is upper left
0:? Sequence
0:5 Function Definition: @main( ( temp structure{ temp 4-component vector of float color})
0:5 Function Parameters:
0:8 Function Definition: @main( ( temp structure{ temp 4-component vector of float color})
0:8 Function Parameters:
0:? Sequence
0:7 Sequence
0:7 move second child to first child ( temp float)
0:7 'r00' ( temp float)
0:7 Constant:
0:7 1.000000
0:8 Sequence
0:8 move second child to first child ( temp uint)
0:8 'r01' ( temp uint)
0:8 Constant:
0:8 1 (const uint)
0:9 Sequence
0:9 move second child to first child ( temp uint)
0:9 'r02' ( temp uint)
0:9 Constant:
0:9 2 (const uint)
0:10 Sequence
0:10 move second child to first child ( temp uint)
0:10 'r03' ( temp uint)
0:10 move second child to first child ( temp float)
0:10 'r00' ( temp float)
0:10 Constant:
0:10 2748 (const uint)
0:10 1.000000
0:11 Sequence
0:11 move second child to first child ( temp uint)
0:11 'r04' ( temp uint)
0:11 'r01' ( temp uint)
0:11 Constant:
0:11 2748 (const uint)
0:11 1 (const uint)
0:12 Sequence
0:12 move second child to first child ( temp int)
0:12 'r05' ( temp int)
0:12 move second child to first child ( temp uint)
0:12 'r02' ( temp uint)
0:12 Constant:
0:12 5 (const int)
0:12 2 (const uint)
0:13 Sequence
0:13 move second child to first child ( temp int)
0:13 'r06' ( temp int)
0:13 move second child to first child ( temp uint)
0:13 'r03' ( temp uint)
0:13 Constant:
0:13 6 (const int)
0:13 2748 (const uint)
0:14 Sequence
0:14 move second child to first child ( temp int)
0:14 'r07' ( temp int)
0:14 move second child to first child ( temp uint)
0:14 'r04' ( temp uint)
0:14 Constant:
0:14 57 (const int)
0:14 2748 (const uint)
0:15 Sequence
0:15 move second child to first child ( temp uint)
0:15 'r08' ( temp uint)
0:15 move second child to first child ( temp int)
0:15 'r05' ( temp int)
0:15 Constant:
0:15 58 (const uint)
0:15 5 (const int)
0:16 Sequence
0:16 move second child to first child ( temp float)
0:16 'r09' ( temp float)
0:16 move second child to first child ( temp int)
0:16 'r06' ( temp int)
0:16 Constant:
0:16 1.000000
0:16 6 (const int)
0:17 Sequence
0:17 move second child to first child ( temp float)
0:17 'r10' ( temp float)
0:17 move second child to first child ( temp int)
0:17 'r07' ( temp int)
0:17 Constant:
0:17 1.000000
0:17 57 (const int)
0:18 Sequence
0:18 move second child to first child ( temp float)
0:18 'r11' ( temp float)
0:18 move second child to first child ( temp uint)
0:18 'r08' ( temp uint)
0:18 Constant:
0:18 1.100000
0:18 58 (const uint)
0:19 Sequence
0:19 move second child to first child ( temp float)
0:19 'r12' ( temp float)
0:19 'r09' ( temp float)
0:19 Constant:
0:19 1.100000
0:22 move second child to first child ( temp 4-component vector of float)
0:22 color: direct index for structure ( temp 4-component vector of float)
0:22 'ps_output' ( temp structure{ temp 4-component vector of float color})
0:19 1.000000
0:20 Sequence
0:20 move second child to first child ( temp float)
0:20 'r10' ( temp float)
0:20 Constant:
0:20 1.000000
0:21 Sequence
0:21 move second child to first child ( temp float)
0:21 'r11' ( temp float)
0:21 Constant:
0:21 1.100000
0:22 Sequence
0:22 move second child to first child ( temp float)
0:22 'r12' ( temp float)
0:22 Constant:
0:22 0 (const int)
0:22 Construct vec4 ( temp 4-component vector of float)
0:22 Convert int to float ( temp float)
0:22 'r07' ( temp int)
0:23 Branch: Return with expression
0:23 'ps_output' ( temp structure{ temp 4-component vector of float color})
0:5 Function Definition: main( ( temp void)
0:5 Function Parameters:
0:22 1.100000
0:23 Sequence
0:23 move second child to first child ( temp uint)
0:23 'r13' ( temp uint)
0:23 Constant:
0:23 1 (const uint)
0:24 Sequence
0:24 move second child to first child ( temp uint)
0:24 'r14' ( temp uint)
0:24 Constant:
0:24 2 (const uint)
0:25 Sequence
0:25 move second child to first child ( temp int)
0:25 'r15' ( temp int)
0:25 Constant:
0:25 3 (const int)
0:26 Sequence
0:26 move second child to first child ( temp int)
0:26 'r16' ( temp int)
0:26 Constant:
0:26 4 (const int)
0:27 Sequence
0:27 move second child to first child ( temp uint)
0:27 'r17' ( temp uint)
0:27 Constant:
0:27 1 (const uint)
0:28 Sequence
0:28 move second child to first child ( temp int)
0:28 'r18' ( temp int)
0:28 Constant:
0:28 3 (const int)
0:31 move second child to first child ( temp 4-component vector of float)
0:31 color: direct index for structure ( temp 4-component vector of float)
0:31 'ps_output' ( temp structure{ temp 4-component vector of float color})
0:31 Constant:
0:31 0 (const int)
0:31 Construct vec4 ( temp 4-component vector of float)
0:31 Convert int to float ( temp float)
0:31 'r07' ( temp int)
0:32 Branch: Return with expression
0:32 'ps_output' ( temp structure{ temp 4-component vector of float color})
0:8 Function Definition: main( ( temp void)
0:8 Function Parameters:
0:? Sequence
0:5 Sequence
0:5 move second child to first child ( temp 4-component vector of float)
0:8 Sequence
0:8 move second child to first child ( temp 4-component vector of float)
0:? '@entryPointOutput.color' (layout( location=0) out 4-component vector of float)
0:5 color: direct index for structure ( temp 4-component vector of float)
0:5 Function Call: @main( ( temp structure{ temp 4-component vector of float color})
0:5 Constant:
0:5 0 (const int)
0:8 color: direct index for structure ( temp 4-component vector of float)
0:8 Function Call: @main( ( temp structure{ temp 4-component vector of float color})
0:8 Constant:
0:8 0 (const int)
0:? Linker Objects
0:? '@entryPointOutput.color' (layout( location=0) out 4-component vector of float)
// Module Version 10000
// Generated by (magic number): 8000b
// Id's are bound by 54
// Id's are bound by 62
Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" 51
EntryPoint Fragment 4 "main" 59
ExecutionMode 4 OriginUpperLeft
Source HLSL 500
Name 4 "main"
@ -218,9 +278,15 @@ gl_FragCoord origin is upper left
Name 35 "r10"
Name 36 "r11"
Name 38 "r12"
Name 40 "ps_output"
Name 51 "@entryPointOutput.color"
Decorate 51(@entryPointOutput.color) Location 0
Name 39 "r13"
Name 40 "r14"
Name 41 "r15"
Name 43 "r16"
Name 45 "r17"
Name 46 "r18"
Name 48 "ps_output"
Name 59 "@entryPointOutput.color"
Decorate 59(@entryPointOutput.color) Location 0
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
@ -241,16 +307,18 @@ gl_FragCoord origin is upper left
31: 24(int) Constant 57
33: 15(int) Constant 58
37: 6(float) Constant 1066192077
39: TypePointer Function 8(PS_OUTPUT)
41: 24(int) Constant 0
45: TypePointer Function 7(fvec4)
50: TypePointer Output 7(fvec4)
51(@entryPointOutput.color): 50(ptr) Variable Output
42: 24(int) Constant 3
44: 24(int) Constant 4
47: TypePointer Function 8(PS_OUTPUT)
49: 24(int) Constant 0
53: TypePointer Function 7(fvec4)
58: TypePointer Output 7(fvec4)
59(@entryPointOutput.color): 58(ptr) Variable Output
4(main): 2 Function None 3
5: Label
52:8(PS_OUTPUT) FunctionCall 10(@main()
53: 7(fvec4) CompositeExtract 52 0
Store 51(@entryPointOutput.color) 53
60:8(PS_OUTPUT) FunctionCall 10(@main()
61: 7(fvec4) CompositeExtract 60 0
Store 59(@entryPointOutput.color) 61
Return
FunctionEnd
10(@main():8(PS_OUTPUT) Function None 9
@ -268,7 +336,13 @@ gl_FragCoord origin is upper left
35(r10): 12(ptr) Variable Function
36(r11): 12(ptr) Variable Function
38(r12): 12(ptr) Variable Function
40(ps_output): 39(ptr) Variable Function
39(r13): 16(ptr) Variable Function
40(r14): 16(ptr) Variable Function
41(r15): 25(ptr) Variable Function
43(r16): 25(ptr) Variable Function
45(r17): 16(ptr) Variable Function
46(r18): 25(ptr) Variable Function
48(ps_output): 47(ptr) Variable Function
Store 13(r00) 14
Store 17(r01) 18
Store 19(r02) 20
@ -282,11 +356,17 @@ gl_FragCoord origin is upper left
Store 35(r10) 14
Store 36(r11) 37
Store 38(r12) 37
42: 24(int) Load 30(r07)
43: 6(float) ConvertSToF 42
44: 7(fvec4) CompositeConstruct 43 43 43 43
46: 45(ptr) AccessChain 40(ps_output) 41
Store 46 44
47:8(PS_OUTPUT) Load 40(ps_output)
ReturnValue 47
Store 39(r13) 18
Store 40(r14) 20
Store 41(r15) 42
Store 43(r16) 44
Store 45(r17) 18
Store 46(r18) 42
50: 24(int) Load 30(r07)
51: 6(float) ConvertSToF 50
52: 7(fvec4) CompositeConstruct 51 51 51 51
54: 53(ptr) AccessChain 48(ps_output) 49
Store 54 52
55:8(PS_OUTPUT) Load 48(ps_output)
ReturnValue 55
FunctionEnd

View File

@ -0,0 +1,109 @@
hlsl.numericsuffixes.negative.frag
ERROR: 0:7: '' : bad digit in binary literal
ERROR: 0:8: '' : binary literal too big
ERROR: 0:9: '' : bad digit in hexadecimal literal
ERROR: 0:10: '' : hexadecimal literal too big
ERROR: 4 compilation errors. No code generated.
Shader version: 500
gl_FragCoord origin is upper left
ERROR: node is still EOpNull!
0:5 Function Definition: @main( ( temp structure{ temp 4-component vector of float color})
0:5 Function Parameters:
0:? Sequence
0:7 Sequence
0:7 move second child to first child ( temp uint)
0:7 'r01' ( temp uint)
0:7 Constant:
0:7 0 (const uint)
0:8 Sequence
0:8 move second child to first child ( temp uint)
0:8 'r02' ( temp uint)
0:8 Constant:
0:8 4294967295 (const uint)
0:10 Sequence
0:9 move second child to first child ( temp uint)
0:9 'r03' ( temp uint)
0:9 Constant:
0:9 0 (const uint)
0:10 move second child to first child ( temp uint)
0:10 'r04' ( temp uint)
0:10 Constant:
0:10 4294967295 (const uint)
0:13 move second child to first child ( temp 4-component vector of float)
0:13 color: direct index for structure ( temp 4-component vector of float)
0:13 'ps_output' ( temp structure{ temp 4-component vector of float color})
0:13 Constant:
0:13 0 (const int)
0:13 Construct vec4 ( temp 4-component vector of float)
0:13 Convert uint to float ( temp float)
0:13 'r01' ( temp uint)
0:14 Branch: Return with expression
0:14 'ps_output' ( temp structure{ temp 4-component vector of float color})
0:5 Function Definition: main( ( temp void)
0:5 Function Parameters:
0:? Sequence
0:5 Sequence
0:5 move second child to first child ( temp 4-component vector of float)
0:? '@entryPointOutput.color' (layout( location=0) out 4-component vector of float)
0:5 color: direct index for structure ( temp 4-component vector of float)
0:5 Function Call: @main( ( temp structure{ temp 4-component vector of float color})
0:5 Constant:
0:5 0 (const int)
0:? Linker Objects
0:? '@entryPointOutput.color' (layout( location=0) out 4-component vector of float)
Linked fragment stage:
Shader version: 500
gl_FragCoord origin is upper left
ERROR: node is still EOpNull!
0:5 Function Definition: @main( ( temp structure{ temp 4-component vector of float color})
0:5 Function Parameters:
0:? Sequence
0:7 Sequence
0:7 move second child to first child ( temp uint)
0:7 'r01' ( temp uint)
0:7 Constant:
0:7 0 (const uint)
0:8 Sequence
0:8 move second child to first child ( temp uint)
0:8 'r02' ( temp uint)
0:8 Constant:
0:8 4294967295 (const uint)
0:10 Sequence
0:9 move second child to first child ( temp uint)
0:9 'r03' ( temp uint)
0:9 Constant:
0:9 0 (const uint)
0:10 move second child to first child ( temp uint)
0:10 'r04' ( temp uint)
0:10 Constant:
0:10 4294967295 (const uint)
0:13 move second child to first child ( temp 4-component vector of float)
0:13 color: direct index for structure ( temp 4-component vector of float)
0:13 'ps_output' ( temp structure{ temp 4-component vector of float color})
0:13 Constant:
0:13 0 (const int)
0:13 Construct vec4 ( temp 4-component vector of float)
0:13 Convert uint to float ( temp float)
0:13 'r01' ( temp uint)
0:14 Branch: Return with expression
0:14 'ps_output' ( temp structure{ temp 4-component vector of float color})
0:5 Function Definition: main( ( temp void)
0:5 Function Parameters:
0:? Sequence
0:5 Sequence
0:5 move second child to first child ( temp 4-component vector of float)
0:? '@entryPointOutput.color' (layout( location=0) out 4-component vector of float)
0:5 color: direct index for structure ( temp 4-component vector of float)
0:5 Function Call: @main( ( temp structure{ temp 4-component vector of float color})
0:5 Constant:
0:5 0 (const int)
0:? Linker Objects
0:? '@entryPointOutput.color' (layout( location=0) out 4-component vector of float)
SPIR-V is not generated for failed compile or link

View File

@ -0,0 +1,402 @@
hlsl.structcopy.comp
Shader version: 500
local_size = (128, 1, 1)
0:? Sequence
0:20 Function Definition: @main(u1; ( temp void)
0:20 Function Parameters:
0:20 'id' ( in uint)
0:? Sequence
0:21 move second child to first child ( temp structure{ temp uint a, temp uint b, temp uint c})
0:21 direct index ( temp structure{ temp uint a, temp uint b, temp uint c})
0:21 's' ( shared 128-element array of structure{ temp uint a, temp uint b, temp uint c})
0:21 Constant:
0:21 0 (const int)
0:21 Constant:
0:21 1 (const uint)
0:21 2 (const uint)
0:21 3 (const uint)
0:22 Sequence
0:22 move second child to first child ( temp uint)
0:22 'count' ( temp uint)
0:22 count: direct index for structure ( temp uint)
0:22 direct index (layout( row_major std430) buffer structure{ temp uint count, temp unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} data})
0:22 @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of structure{ temp uint count, temp unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} data})
0:22 'sb' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of structure{ temp uint count, temp unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} data} @data})
0:22 Constant:
0:22 0 (const uint)
0:22 Constant:
0:22 0 (const int)
0:22 Constant:
0:22 0 (const int)
0:23 Sequence
0:23 move second child to first child ( temp structure{ temp uint a, temp uint b, temp uint c})
0:23 'ms' ( temp structure{ temp uint a, temp uint b, temp uint c})
0:23 Test condition and select ( temp structure{ temp uint a, temp uint b, temp uint c}): no shortcircuit
0:23 Condition
0:23 Compare Greater Than ( temp bool)
0:23 'id' ( in uint)
0:23 'count' ( temp uint)
0:23 true case
0:23 indirect index ( temp structure{ temp uint a, temp uint b, temp uint c})
0:23 's' ( shared 128-element array of structure{ temp uint a, temp uint b, temp uint c})
0:23 subtract ( temp uint)
0:23 'id' ( in uint)
0:23 'count' ( temp uint)
0:23 false case
0:23 indirect index ( temp structure{ temp uint a, temp uint b, temp uint c})
0:23 data: direct index for structure ( temp unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c})
0:23 direct index (layout( row_major std430) buffer structure{ temp uint count, temp unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} data})
0:23 @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of structure{ temp uint count, temp unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} data})
0:23 'sb' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of structure{ temp uint count, temp unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} data} @data})
0:23 Constant:
0:23 0 (const uint)
0:23 Constant:
0:23 0 (const int)
0:23 Constant:
0:23 1 (const int)
0:23 'id' ( in uint)
0:25 AtomicAdd ( temp uint)
0:25 a: direct index for structure ( temp uint)
0:25 direct index (layout( row_major std430) buffer structure{ temp uint a, temp uint b, temp uint c})
0:25 @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c})
0:25 'o' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} @data})
0:25 Constant:
0:25 0 (const uint)
0:25 Constant:
0:25 0 (const int)
0:25 Constant:
0:25 0 (const int)
0:25 a: direct index for structure ( temp uint)
0:25 'ms' ( temp structure{ temp uint a, temp uint b, temp uint c})
0:25 Constant:
0:25 0 (const int)
0:26 AtomicAdd ( temp uint)
0:26 b: direct index for structure ( temp uint)
0:26 direct index (layout( row_major std430) buffer structure{ temp uint a, temp uint b, temp uint c})
0:26 @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c})
0:26 'o' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} @data})
0:26 Constant:
0:26 0 (const uint)
0:26 Constant:
0:26 0 (const int)
0:26 Constant:
0:26 1 (const int)
0:26 b: direct index for structure ( temp uint)
0:26 'ms' ( temp structure{ temp uint a, temp uint b, temp uint c})
0:26 Constant:
0:26 1 (const int)
0:27 AtomicAdd ( temp uint)
0:27 c: direct index for structure ( temp uint)
0:27 direct index (layout( row_major std430) buffer structure{ temp uint a, temp uint b, temp uint c})
0:27 @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c})
0:27 'o' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} @data})
0:27 Constant:
0:27 0 (const uint)
0:27 Constant:
0:27 0 (const int)
0:27 Constant:
0:27 2 (const int)
0:27 c: direct index for structure ( temp uint)
0:27 'ms' ( temp structure{ temp uint a, temp uint b, temp uint c})
0:27 Constant:
0:27 2 (const int)
0:20 Function Definition: main( ( temp void)
0:20 Function Parameters:
0:? Sequence
0:20 move second child to first child ( temp uint)
0:? 'id' ( temp uint)
0:? 'id' ( in uint LocalInvocationIndex)
0:20 Function Call: @main(u1; ( temp void)
0:? 'id' ( temp uint)
0:? Linker Objects
0:? 'sb' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of structure{ temp uint count, temp unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} data} @data})
0:? 'o' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} @data})
0:? 's' ( shared 128-element array of structure{ temp uint a, temp uint b, temp uint c})
0:? 'deflt' ( const structure{ temp uint a, temp uint b, temp uint c})
0:? 1 (const uint)
0:? 2 (const uint)
0:? 3 (const uint)
0:? 'id' ( in uint LocalInvocationIndex)
Linked compute stage:
Shader version: 500
local_size = (128, 1, 1)
0:? Sequence
0:20 Function Definition: @main(u1; ( temp void)
0:20 Function Parameters:
0:20 'id' ( in uint)
0:? Sequence
0:21 move second child to first child ( temp structure{ temp uint a, temp uint b, temp uint c})
0:21 direct index ( temp structure{ temp uint a, temp uint b, temp uint c})
0:21 's' ( shared 128-element array of structure{ temp uint a, temp uint b, temp uint c})
0:21 Constant:
0:21 0 (const int)
0:21 Constant:
0:21 1 (const uint)
0:21 2 (const uint)
0:21 3 (const uint)
0:22 Sequence
0:22 move second child to first child ( temp uint)
0:22 'count' ( temp uint)
0:22 count: direct index for structure ( temp uint)
0:22 direct index (layout( row_major std430) buffer structure{ temp uint count, temp unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} data})
0:22 @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of structure{ temp uint count, temp unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} data})
0:22 'sb' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of structure{ temp uint count, temp unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} data} @data})
0:22 Constant:
0:22 0 (const uint)
0:22 Constant:
0:22 0 (const int)
0:22 Constant:
0:22 0 (const int)
0:23 Sequence
0:23 move second child to first child ( temp structure{ temp uint a, temp uint b, temp uint c})
0:23 'ms' ( temp structure{ temp uint a, temp uint b, temp uint c})
0:23 Test condition and select ( temp structure{ temp uint a, temp uint b, temp uint c}): no shortcircuit
0:23 Condition
0:23 Compare Greater Than ( temp bool)
0:23 'id' ( in uint)
0:23 'count' ( temp uint)
0:23 true case
0:23 indirect index ( temp structure{ temp uint a, temp uint b, temp uint c})
0:23 's' ( shared 128-element array of structure{ temp uint a, temp uint b, temp uint c})
0:23 subtract ( temp uint)
0:23 'id' ( in uint)
0:23 'count' ( temp uint)
0:23 false case
0:23 indirect index ( temp structure{ temp uint a, temp uint b, temp uint c})
0:23 data: direct index for structure ( temp unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c})
0:23 direct index (layout( row_major std430) buffer structure{ temp uint count, temp unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} data})
0:23 @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of structure{ temp uint count, temp unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} data})
0:23 'sb' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of structure{ temp uint count, temp unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} data} @data})
0:23 Constant:
0:23 0 (const uint)
0:23 Constant:
0:23 0 (const int)
0:23 Constant:
0:23 1 (const int)
0:23 'id' ( in uint)
0:25 AtomicAdd ( temp uint)
0:25 a: direct index for structure ( temp uint)
0:25 direct index (layout( row_major std430) buffer structure{ temp uint a, temp uint b, temp uint c})
0:25 @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c})
0:25 'o' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} @data})
0:25 Constant:
0:25 0 (const uint)
0:25 Constant:
0:25 0 (const int)
0:25 Constant:
0:25 0 (const int)
0:25 a: direct index for structure ( temp uint)
0:25 'ms' ( temp structure{ temp uint a, temp uint b, temp uint c})
0:25 Constant:
0:25 0 (const int)
0:26 AtomicAdd ( temp uint)
0:26 b: direct index for structure ( temp uint)
0:26 direct index (layout( row_major std430) buffer structure{ temp uint a, temp uint b, temp uint c})
0:26 @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c})
0:26 'o' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} @data})
0:26 Constant:
0:26 0 (const uint)
0:26 Constant:
0:26 0 (const int)
0:26 Constant:
0:26 1 (const int)
0:26 b: direct index for structure ( temp uint)
0:26 'ms' ( temp structure{ temp uint a, temp uint b, temp uint c})
0:26 Constant:
0:26 1 (const int)
0:27 AtomicAdd ( temp uint)
0:27 c: direct index for structure ( temp uint)
0:27 direct index (layout( row_major std430) buffer structure{ temp uint a, temp uint b, temp uint c})
0:27 @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c})
0:27 'o' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} @data})
0:27 Constant:
0:27 0 (const uint)
0:27 Constant:
0:27 0 (const int)
0:27 Constant:
0:27 2 (const int)
0:27 c: direct index for structure ( temp uint)
0:27 'ms' ( temp structure{ temp uint a, temp uint b, temp uint c})
0:27 Constant:
0:27 2 (const int)
0:20 Function Definition: main( ( temp void)
0:20 Function Parameters:
0:? Sequence
0:20 move second child to first child ( temp uint)
0:? 'id' ( temp uint)
0:? 'id' ( in uint LocalInvocationIndex)
0:20 Function Call: @main(u1; ( temp void)
0:? 'id' ( temp uint)
0:? Linker Objects
0:? 'sb' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of structure{ temp uint count, temp unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} data} @data})
0:? 'o' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} @data})
0:? 's' ( shared 128-element array of structure{ temp uint a, temp uint b, temp uint c})
0:? 'deflt' ( const structure{ temp uint a, temp uint b, temp uint c})
0:? 1 (const uint)
0:? 2 (const uint)
0:? 3 (const uint)
0:? 'id' ( in uint LocalInvocationIndex)
// Module Version 10000
// Generated by (magic number): 8000b
// Id's are bound by 88
Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint GLCompute 4 "main" 83
ExecutionMode 4 LocalSize 128 1 1
Source HLSL 500
Name 4 "main"
Name 10 "@main(u1;"
Name 9 "id"
Name 12 "MyStruct"
MemberName 12(MyStruct) 0 "a"
MemberName 12(MyStruct) 1 "b"
MemberName 12(MyStruct) 2 "c"
Name 16 "s"
Name 25 "count"
Name 26 "MyStruct"
MemberName 26(MyStruct) 0 "a"
MemberName 26(MyStruct) 1 "b"
MemberName 26(MyStruct) 2 "c"
Name 28 "MyStructs"
MemberName 28(MyStructs) 0 "count"
MemberName 28(MyStructs) 1 "data"
Name 30 "sb"
MemberName 30(sb) 0 "@data"
Name 32 "sb"
Name 37 "ms"
Name 65 "o"
MemberName 65(o) 0 "@data"
Name 67 "o"
Name 81 "id"
Name 83 "id"
Name 85 "param"
MemberDecorate 26(MyStruct) 0 Offset 0
MemberDecorate 26(MyStruct) 1 Offset 4
MemberDecorate 26(MyStruct) 2 Offset 8
Decorate 27 ArrayStride 12
MemberDecorate 28(MyStructs) 0 Offset 0
MemberDecorate 28(MyStructs) 1 Offset 4
Decorate 28(MyStructs) BufferBlock
Decorate 29 ArrayStride 16
MemberDecorate 30(sb) 0 NonWritable
MemberDecorate 30(sb) 0 Offset 0
Decorate 30(sb) BufferBlock
Decorate 32(sb) DescriptorSet 0
Decorate 32(sb) Binding 0
Decorate 64 ArrayStride 12
MemberDecorate 65(o) 0 NonWritable
MemberDecorate 65(o) 0 Offset 0
Decorate 65(o) BufferBlock
Decorate 67(o) DescriptorSet 0
Decorate 67(o) Binding 1
Decorate 83(id) BuiltIn LocalInvocationIndex
2: TypeVoid
3: TypeFunction 2
6: TypeInt 32 0
7: TypePointer Function 6(int)
8: TypeFunction 2 7(ptr)
12(MyStruct): TypeStruct 6(int) 6(int) 6(int)
13: 6(int) Constant 128
14: TypeArray 12(MyStruct) 13
15: TypePointer Workgroup 14
16(s): 15(ptr) Variable Workgroup
17: TypeInt 32 1
18: 17(int) Constant 0
19: 6(int) Constant 1
20: 6(int) Constant 2
21: 6(int) Constant 3
22:12(MyStruct) ConstantComposite 19 20 21
23: TypePointer Workgroup 12(MyStruct)
26(MyStruct): TypeStruct 6(int) 6(int) 6(int)
27: TypeRuntimeArray 26(MyStruct)
28(MyStructs): TypeStruct 6(int) 27
29: TypeRuntimeArray 28(MyStructs)
30(sb): TypeStruct 29
31: TypePointer Uniform 30(sb)
32(sb): 31(ptr) Variable Uniform
33: TypePointer Uniform 6(int)
36: TypePointer Function 12(MyStruct)
40: TypeBool
47: 17(int) Constant 1
49: TypePointer Uniform 26(MyStruct)
61: 17(int) Constant 2
64: TypeRuntimeArray 26(MyStruct)
65(o): TypeStruct 64
66: TypePointer Uniform 65(o)
67(o): 66(ptr) Variable Uniform
71: 6(int) Constant 0
82: TypePointer Input 6(int)
83(id): 82(ptr) Variable Input
4(main): 2 Function None 3
5: Label
81(id): 7(ptr) Variable Function
85(param): 7(ptr) Variable Function
84: 6(int) Load 83(id)
Store 81(id) 84
86: 6(int) Load 81(id)
Store 85(param) 86
87: 2 FunctionCall 10(@main(u1;) 85(param)
Return
FunctionEnd
10(@main(u1;): 2 Function None 8
9(id): 7(ptr) FunctionParameter
11: Label
25(count): 7(ptr) Variable Function
37(ms): 36(ptr) Variable Function
52: 36(ptr) Variable Function
24: 23(ptr) AccessChain 16(s) 18
Store 24 22
34: 33(ptr) AccessChain 32(sb) 18 18 18
35: 6(int) Load 34
Store 25(count) 35
38: 6(int) Load 9(id)
39: 6(int) Load 25(count)
41: 40(bool) UGreaterThan 38 39
42: 6(int) Load 9(id)
43: 6(int) Load 25(count)
44: 6(int) ISub 42 43
45: 23(ptr) AccessChain 16(s) 44
46:12(MyStruct) Load 45
48: 6(int) Load 9(id)
50: 49(ptr) AccessChain 32(sb) 18 18 47 48
51:26(MyStruct) Load 50
SelectionMerge 54 None
BranchConditional 41 53 55
53: Label
Store 52 46
Branch 54
55: Label
56: 6(int) CompositeExtract 51 0
57: 7(ptr) AccessChain 52 18
Store 57 56
58: 6(int) CompositeExtract 51 1
59: 7(ptr) AccessChain 52 47
Store 59 58
60: 6(int) CompositeExtract 51 2
62: 7(ptr) AccessChain 52 61
Store 62 60
Branch 54
54: Label
63:12(MyStruct) Load 52
Store 37(ms) 63
68: 33(ptr) AccessChain 67(o) 18 18 18
69: 7(ptr) AccessChain 37(ms) 18
70: 6(int) Load 69
72: 6(int) AtomicIAdd 68 19 71 70
73: 33(ptr) AccessChain 67(o) 18 18 47
74: 7(ptr) AccessChain 37(ms) 47
75: 6(int) Load 74
76: 6(int) AtomicIAdd 73 19 71 75
77: 33(ptr) AccessChain 67(o) 18 18 61
78: 7(ptr) AccessChain 37(ms) 61
79: 6(int) Load 78
80: 6(int) AtomicIAdd 77 19 71 79
Return
FunctionEnd

View File

@ -0,0 +1,385 @@
hlsl.structcopylogical.comp
Shader version: 500
local_size = (128, 1, 1)
0:? Sequence
0:20 Function Definition: @main(u1; ( temp void)
0:20 Function Parameters:
0:20 'id' ( in uint)
0:? Sequence
0:21 move second child to first child ( temp structure{ temp uint a, temp uint b, temp uint c})
0:21 direct index ( temp structure{ temp uint a, temp uint b, temp uint c})
0:21 's' ( shared 128-element array of structure{ temp uint a, temp uint b, temp uint c})
0:21 Constant:
0:21 0 (const int)
0:21 Constant:
0:21 1 (const uint)
0:21 2 (const uint)
0:21 3 (const uint)
0:22 Sequence
0:22 move second child to first child ( temp uint)
0:22 'count' ( temp uint)
0:22 count: direct index for structure ( temp uint)
0:22 direct index (layout( row_major std430) buffer structure{ temp uint count, temp unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} data})
0:22 @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of structure{ temp uint count, temp unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} data})
0:22 'sb' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of structure{ temp uint count, temp unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} data} @data})
0:22 Constant:
0:22 0 (const uint)
0:22 Constant:
0:22 0 (const int)
0:22 Constant:
0:22 0 (const int)
0:23 Sequence
0:23 move second child to first child ( temp structure{ temp uint a, temp uint b, temp uint c})
0:23 'ms' ( temp structure{ temp uint a, temp uint b, temp uint c})
0:23 Test condition and select ( temp structure{ temp uint a, temp uint b, temp uint c}): no shortcircuit
0:23 Condition
0:23 Compare Greater Than ( temp bool)
0:23 'id' ( in uint)
0:23 'count' ( temp uint)
0:23 true case
0:23 indirect index ( temp structure{ temp uint a, temp uint b, temp uint c})
0:23 's' ( shared 128-element array of structure{ temp uint a, temp uint b, temp uint c})
0:23 subtract ( temp uint)
0:23 'id' ( in uint)
0:23 'count' ( temp uint)
0:23 false case
0:23 indirect index ( temp structure{ temp uint a, temp uint b, temp uint c})
0:23 data: direct index for structure ( temp unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c})
0:23 direct index (layout( row_major std430) buffer structure{ temp uint count, temp unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} data})
0:23 @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of structure{ temp uint count, temp unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} data})
0:23 'sb' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of structure{ temp uint count, temp unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} data} @data})
0:23 Constant:
0:23 0 (const uint)
0:23 Constant:
0:23 0 (const int)
0:23 Constant:
0:23 1 (const int)
0:23 'id' ( in uint)
0:25 AtomicAdd ( temp uint)
0:25 a: direct index for structure ( temp uint)
0:25 direct index (layout( row_major std430) buffer structure{ temp uint a, temp uint b, temp uint c})
0:25 @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c})
0:25 'o' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} @data})
0:25 Constant:
0:25 0 (const uint)
0:25 Constant:
0:25 0 (const int)
0:25 Constant:
0:25 0 (const int)
0:25 a: direct index for structure ( temp uint)
0:25 'ms' ( temp structure{ temp uint a, temp uint b, temp uint c})
0:25 Constant:
0:25 0 (const int)
0:26 AtomicAdd ( temp uint)
0:26 b: direct index for structure ( temp uint)
0:26 direct index (layout( row_major std430) buffer structure{ temp uint a, temp uint b, temp uint c})
0:26 @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c})
0:26 'o' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} @data})
0:26 Constant:
0:26 0 (const uint)
0:26 Constant:
0:26 0 (const int)
0:26 Constant:
0:26 1 (const int)
0:26 b: direct index for structure ( temp uint)
0:26 'ms' ( temp structure{ temp uint a, temp uint b, temp uint c})
0:26 Constant:
0:26 1 (const int)
0:27 AtomicAdd ( temp uint)
0:27 c: direct index for structure ( temp uint)
0:27 direct index (layout( row_major std430) buffer structure{ temp uint a, temp uint b, temp uint c})
0:27 @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c})
0:27 'o' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} @data})
0:27 Constant:
0:27 0 (const uint)
0:27 Constant:
0:27 0 (const int)
0:27 Constant:
0:27 2 (const int)
0:27 c: direct index for structure ( temp uint)
0:27 'ms' ( temp structure{ temp uint a, temp uint b, temp uint c})
0:27 Constant:
0:27 2 (const int)
0:20 Function Definition: main( ( temp void)
0:20 Function Parameters:
0:? Sequence
0:20 move second child to first child ( temp uint)
0:? 'id' ( temp uint)
0:? 'id' ( in uint LocalInvocationIndex)
0:20 Function Call: @main(u1; ( temp void)
0:? 'id' ( temp uint)
0:? Linker Objects
0:? 'sb' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of structure{ temp uint count, temp unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} data} @data})
0:? 'o' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} @data})
0:? 's' ( shared 128-element array of structure{ temp uint a, temp uint b, temp uint c})
0:? 'deflt' ( const structure{ temp uint a, temp uint b, temp uint c})
0:? 1 (const uint)
0:? 2 (const uint)
0:? 3 (const uint)
0:? 'id' ( in uint LocalInvocationIndex)
Linked compute stage:
Shader version: 500
local_size = (128, 1, 1)
0:? Sequence
0:20 Function Definition: @main(u1; ( temp void)
0:20 Function Parameters:
0:20 'id' ( in uint)
0:? Sequence
0:21 move second child to first child ( temp structure{ temp uint a, temp uint b, temp uint c})
0:21 direct index ( temp structure{ temp uint a, temp uint b, temp uint c})
0:21 's' ( shared 128-element array of structure{ temp uint a, temp uint b, temp uint c})
0:21 Constant:
0:21 0 (const int)
0:21 Constant:
0:21 1 (const uint)
0:21 2 (const uint)
0:21 3 (const uint)
0:22 Sequence
0:22 move second child to first child ( temp uint)
0:22 'count' ( temp uint)
0:22 count: direct index for structure ( temp uint)
0:22 direct index (layout( row_major std430) buffer structure{ temp uint count, temp unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} data})
0:22 @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of structure{ temp uint count, temp unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} data})
0:22 'sb' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of structure{ temp uint count, temp unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} data} @data})
0:22 Constant:
0:22 0 (const uint)
0:22 Constant:
0:22 0 (const int)
0:22 Constant:
0:22 0 (const int)
0:23 Sequence
0:23 move second child to first child ( temp structure{ temp uint a, temp uint b, temp uint c})
0:23 'ms' ( temp structure{ temp uint a, temp uint b, temp uint c})
0:23 Test condition and select ( temp structure{ temp uint a, temp uint b, temp uint c}): no shortcircuit
0:23 Condition
0:23 Compare Greater Than ( temp bool)
0:23 'id' ( in uint)
0:23 'count' ( temp uint)
0:23 true case
0:23 indirect index ( temp structure{ temp uint a, temp uint b, temp uint c})
0:23 's' ( shared 128-element array of structure{ temp uint a, temp uint b, temp uint c})
0:23 subtract ( temp uint)
0:23 'id' ( in uint)
0:23 'count' ( temp uint)
0:23 false case
0:23 indirect index ( temp structure{ temp uint a, temp uint b, temp uint c})
0:23 data: direct index for structure ( temp unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c})
0:23 direct index (layout( row_major std430) buffer structure{ temp uint count, temp unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} data})
0:23 @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of structure{ temp uint count, temp unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} data})
0:23 'sb' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of structure{ temp uint count, temp unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} data} @data})
0:23 Constant:
0:23 0 (const uint)
0:23 Constant:
0:23 0 (const int)
0:23 Constant:
0:23 1 (const int)
0:23 'id' ( in uint)
0:25 AtomicAdd ( temp uint)
0:25 a: direct index for structure ( temp uint)
0:25 direct index (layout( row_major std430) buffer structure{ temp uint a, temp uint b, temp uint c})
0:25 @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c})
0:25 'o' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} @data})
0:25 Constant:
0:25 0 (const uint)
0:25 Constant:
0:25 0 (const int)
0:25 Constant:
0:25 0 (const int)
0:25 a: direct index for structure ( temp uint)
0:25 'ms' ( temp structure{ temp uint a, temp uint b, temp uint c})
0:25 Constant:
0:25 0 (const int)
0:26 AtomicAdd ( temp uint)
0:26 b: direct index for structure ( temp uint)
0:26 direct index (layout( row_major std430) buffer structure{ temp uint a, temp uint b, temp uint c})
0:26 @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c})
0:26 'o' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} @data})
0:26 Constant:
0:26 0 (const uint)
0:26 Constant:
0:26 0 (const int)
0:26 Constant:
0:26 1 (const int)
0:26 b: direct index for structure ( temp uint)
0:26 'ms' ( temp structure{ temp uint a, temp uint b, temp uint c})
0:26 Constant:
0:26 1 (const int)
0:27 AtomicAdd ( temp uint)
0:27 c: direct index for structure ( temp uint)
0:27 direct index (layout( row_major std430) buffer structure{ temp uint a, temp uint b, temp uint c})
0:27 @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c})
0:27 'o' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} @data})
0:27 Constant:
0:27 0 (const uint)
0:27 Constant:
0:27 0 (const int)
0:27 Constant:
0:27 2 (const int)
0:27 c: direct index for structure ( temp uint)
0:27 'ms' ( temp structure{ temp uint a, temp uint b, temp uint c})
0:27 Constant:
0:27 2 (const int)
0:20 Function Definition: main( ( temp void)
0:20 Function Parameters:
0:? Sequence
0:20 move second child to first child ( temp uint)
0:? 'id' ( temp uint)
0:? 'id' ( in uint LocalInvocationIndex)
0:20 Function Call: @main(u1; ( temp void)
0:? 'id' ( temp uint)
0:? Linker Objects
0:? 'sb' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of structure{ temp uint count, temp unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} data} @data})
0:? 'o' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} @data})
0:? 's' ( shared 128-element array of structure{ temp uint a, temp uint b, temp uint c})
0:? 'deflt' ( const structure{ temp uint a, temp uint b, temp uint c})
0:? 1 (const uint)
0:? 2 (const uint)
0:? 3 (const uint)
0:? 'id' ( in uint LocalInvocationIndex)
// Module Version 10600
// Generated by (magic number): 8000b
// Id's are bound by 79
Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint GLCompute 4 "main" 16 32 57 74
ExecutionMode 4 LocalSize 128 1 1
Source HLSL 500
Name 4 "main"
Name 10 "@main(u1;"
Name 9 "id"
Name 12 "MyStruct"
MemberName 12(MyStruct) 0 "a"
MemberName 12(MyStruct) 1 "b"
MemberName 12(MyStruct) 2 "c"
Name 16 "s"
Name 25 "count"
Name 26 "MyStruct"
MemberName 26(MyStruct) 0 "a"
MemberName 26(MyStruct) 1 "b"
MemberName 26(MyStruct) 2 "c"
Name 28 "MyStructs"
MemberName 28(MyStructs) 0 "count"
MemberName 28(MyStructs) 1 "data"
Name 30 "sb"
MemberName 30(sb) 0 "@data"
Name 32 "sb"
Name 37 "ms"
Name 55 "o"
MemberName 55(o) 0 "@data"
Name 57 "o"
Name 72 "id"
Name 74 "id"
Name 76 "param"
MemberDecorate 26(MyStruct) 0 Offset 0
MemberDecorate 26(MyStruct) 1 Offset 4
MemberDecorate 26(MyStruct) 2 Offset 8
Decorate 27 ArrayStride 12
MemberDecorate 28(MyStructs) 0 Offset 0
MemberDecorate 28(MyStructs) 1 Offset 4
Decorate 28(MyStructs) Block
Decorate 29 ArrayStride 16
MemberDecorate 30(sb) 0 NonWritable
MemberDecorate 30(sb) 0 Offset 0
Decorate 30(sb) Block
Decorate 32(sb) DescriptorSet 0
Decorate 32(sb) Binding 0
Decorate 54 ArrayStride 12
MemberDecorate 55(o) 0 NonWritable
MemberDecorate 55(o) 0 Offset 0
Decorate 55(o) Block
Decorate 57(o) DescriptorSet 0
Decorate 57(o) Binding 1
Decorate 74(id) BuiltIn LocalInvocationIndex
2: TypeVoid
3: TypeFunction 2
6: TypeInt 32 0
7: TypePointer Function 6(int)
8: TypeFunction 2 7(ptr)
12(MyStruct): TypeStruct 6(int) 6(int) 6(int)
13: 6(int) Constant 128
14: TypeArray 12(MyStruct) 13
15: TypePointer Workgroup 14
16(s): 15(ptr) Variable Workgroup
17: TypeInt 32 1
18: 17(int) Constant 0
19: 6(int) Constant 1
20: 6(int) Constant 2
21: 6(int) Constant 3
22:12(MyStruct) ConstantComposite 19 20 21
23: TypePointer Workgroup 12(MyStruct)
26(MyStruct): TypeStruct 6(int) 6(int) 6(int)
27: TypeRuntimeArray 26(MyStruct)
28(MyStructs): TypeStruct 6(int) 27
29: TypeRuntimeArray 28(MyStructs)
30(sb): TypeStruct 29
31: TypePointer StorageBuffer 30(sb)
32(sb): 31(ptr) Variable StorageBuffer
33: TypePointer StorageBuffer 6(int)
36: TypePointer Function 12(MyStruct)
40: TypeBool
47: 17(int) Constant 1
49: TypePointer StorageBuffer 26(MyStruct)
54: TypeRuntimeArray 26(MyStruct)
55(o): TypeStruct 54
56: TypePointer StorageBuffer 55(o)
57(o): 56(ptr) Variable StorageBuffer
61: 6(int) Constant 0
67: 17(int) Constant 2
73: TypePointer Input 6(int)
74(id): 73(ptr) Variable Input
4(main): 2 Function None 3
5: Label
72(id): 7(ptr) Variable Function
76(param): 7(ptr) Variable Function
75: 6(int) Load 74(id)
Store 72(id) 75
77: 6(int) Load 72(id)
Store 76(param) 77
78: 2 FunctionCall 10(@main(u1;) 76(param)
Return
FunctionEnd
10(@main(u1;): 2 Function None 8
9(id): 7(ptr) FunctionParameter
11: Label
25(count): 7(ptr) Variable Function
37(ms): 36(ptr) Variable Function
24: 23(ptr) AccessChain 16(s) 18
Store 24 22
34: 33(ptr) AccessChain 32(sb) 18 18 18
35: 6(int) Load 34
Store 25(count) 35
38: 6(int) Load 9(id)
39: 6(int) Load 25(count)
41: 40(bool) UGreaterThan 38 39
42: 6(int) Load 9(id)
43: 6(int) Load 25(count)
44: 6(int) ISub 42 43
45: 23(ptr) AccessChain 16(s) 44
46:12(MyStruct) Load 45
48: 6(int) Load 9(id)
50: 49(ptr) AccessChain 32(sb) 18 18 47 48
51:26(MyStruct) Load 50
52:12(MyStruct) CopyLogical 51
53:12(MyStruct) Select 41 46 52
Store 37(ms) 53
58: 33(ptr) AccessChain 57(o) 18 18 18
59: 7(ptr) AccessChain 37(ms) 18
60: 6(int) Load 59
62: 6(int) AtomicIAdd 58 19 61 60
63: 33(ptr) AccessChain 57(o) 18 18 47
64: 7(ptr) AccessChain 37(ms) 47
65: 6(int) Load 64
66: 6(int) AtomicIAdd 63 19 61 65
68: 33(ptr) AccessChain 57(o) 18 18 67
69: 7(ptr) AccessChain 37(ms) 67
70: 6(int) Load 69
71: 6(int) AtomicIAdd 68 19 61 70
Return
FunctionEnd

View File

@ -2331,7 +2331,7 @@ local_size = (32, 16, 1)
MemberDecorate 20(Types) 3 Offset 64
Decorate 21 ArrayStride 96
MemberDecorate 22(data) 0 Offset 0
Decorate 22(data) BufferBlock
Decorate 22(data) Block
Decorate 24(data) DescriptorSet 0
Decorate 24(data) Binding 0
Decorate 388(dti) BuiltIn GlobalInvocationId
@ -2351,31 +2351,31 @@ local_size = (32, 16, 1)
20(Types): TypeStruct 13(ivec4) 15(ivec4) 17(fvec4) 19(f64vec4)
21: TypeRuntimeArray 20(Types)
22(data): TypeStruct 21
23: TypePointer Uniform 22(data)
24(data): 23(ptr) Variable Uniform
23: TypePointer StorageBuffer 22(data)
24(data): 23(ptr) Variable StorageBuffer
25: 14(int) Constant 0
26: 6(int) Constant 0
27: TypePointer Function 6(int)
32: TypePointer Uniform 13(ivec4)
32: TypePointer StorageBuffer 13(ivec4)
35: 6(int) Constant 13
36: 6(int) Constant 3
43: TypePointer Uniform 6(int)
43: TypePointer StorageBuffer 6(int)
52: TypeVector 6(int) 2
59: 6(int) Constant 1
74: 6(int) Constant 2
79: 14(int) Constant 1
82: TypePointer Uniform 15(ivec4)
91: TypePointer Uniform 14(int)
82: TypePointer StorageBuffer 15(ivec4)
91: TypePointer StorageBuffer 14(int)
100: TypeVector 14(int) 2
113: TypeVector 14(int) 3
126: 14(int) Constant 2
129: TypePointer Uniform 17(fvec4)
138: TypePointer Uniform 16(float)
129: TypePointer StorageBuffer 17(fvec4)
138: TypePointer StorageBuffer 16(float)
147: TypeVector 16(float) 2
160: TypeVector 16(float) 3
173: 14(int) Constant 3
176: TypePointer Uniform 19(f64vec4)
185: TypePointer Uniform 18(float64_t)
176: TypePointer StorageBuffer 19(f64vec4)
185: TypePointer StorageBuffer 18(float64_t)
194: TypeVector 18(float64_t) 2
207: TypeVector 18(float64_t) 3
387: TypePointer Input 7(ivec3)

View File

@ -2355,7 +2355,7 @@ local_size = (32, 16, 1)
MemberDecorate 20(Types) 3 Offset 64
Decorate 21 ArrayStride 96
MemberDecorate 22(data) 0 Offset 0
Decorate 22(data) BufferBlock
Decorate 22(data) Block
Decorate 24(data) DescriptorSet 0
Decorate 24(data) Binding 0
Decorate 398(dti) BuiltIn GlobalInvocationId
@ -2375,30 +2375,30 @@ local_size = (32, 16, 1)
20(Types): TypeStruct 13(ivec4) 15(ivec4) 17(fvec4) 19(f64vec4)
21: TypeRuntimeArray 20(Types)
22(data): TypeStruct 21
23: TypePointer Uniform 22(data)
24(data): 23(ptr) Variable Uniform
23: TypePointer StorageBuffer 22(data)
24(data): 23(ptr) Variable StorageBuffer
25: 14(int) Constant 0
26: 6(int) Constant 0
27: TypePointer Function 6(int)
32: TypePointer Uniform 13(ivec4)
32: TypePointer StorageBuffer 13(ivec4)
35: 6(int) Constant 3
42: TypePointer Uniform 6(int)
42: TypePointer StorageBuffer 6(int)
51: TypeVector 6(int) 2
58: 6(int) Constant 1
73: 6(int) Constant 2
78: 14(int) Constant 1
81: TypePointer Uniform 15(ivec4)
90: TypePointer Uniform 14(int)
81: TypePointer StorageBuffer 15(ivec4)
90: TypePointer StorageBuffer 14(int)
99: TypeVector 14(int) 2
112: TypeVector 14(int) 3
125: 14(int) Constant 2
128: TypePointer Uniform 17(fvec4)
137: TypePointer Uniform 16(float)
128: TypePointer StorageBuffer 17(fvec4)
137: TypePointer StorageBuffer 16(float)
146: TypeVector 16(float) 2
159: TypeVector 16(float) 3
172: 14(int) Constant 3
175: TypePointer Uniform 19(f64vec4)
184: TypePointer Uniform 18(float64_t)
175: TypePointer StorageBuffer 19(f64vec4)
184: TypePointer StorageBuffer 18(float64_t)
193: TypeVector 18(float64_t) 2
206: TypeVector 18(float64_t) 3
391: TypeBool

View File

@ -8058,7 +8058,7 @@ local_size = (32, 16, 1)
MemberDecorate 20(Types) 3 Offset 64
Decorate 21 ArrayStride 96
MemberDecorate 22(data) 0 Offset 0
Decorate 22(data) BufferBlock
Decorate 22(data) Block
Decorate 24(data) DescriptorSet 0
Decorate 24(data) Binding 0
Decorate 1227(dti) BuiltIn GlobalInvocationId
@ -8078,30 +8078,30 @@ local_size = (32, 16, 1)
20(Types): TypeStruct 13(ivec4) 15(ivec4) 17(fvec4) 19(f64vec4)
21: TypeRuntimeArray 20(Types)
22(data): TypeStruct 21
23: TypePointer Uniform 22(data)
24(data): 23(ptr) Variable Uniform
23: TypePointer StorageBuffer 22(data)
24(data): 23(ptr) Variable StorageBuffer
25: 14(int) Constant 0
26: 6(int) Constant 0
27: TypePointer Function 6(int)
32: TypePointer Uniform 13(ivec4)
32: TypePointer StorageBuffer 13(ivec4)
35: 6(int) Constant 3
42: TypePointer Uniform 6(int)
42: TypePointer StorageBuffer 6(int)
51: TypeVector 6(int) 2
58: 6(int) Constant 1
73: 6(int) Constant 2
78: 14(int) Constant 1
81: TypePointer Uniform 15(ivec4)
90: TypePointer Uniform 14(int)
81: TypePointer StorageBuffer 15(ivec4)
90: TypePointer StorageBuffer 14(int)
99: TypeVector 14(int) 2
112: TypeVector 14(int) 3
125: 14(int) Constant 2
128: TypePointer Uniform 17(fvec4)
137: TypePointer Uniform 16(float)
128: TypePointer StorageBuffer 17(fvec4)
137: TypePointer StorageBuffer 16(float)
146: TypeVector 16(float) 2
159: TypeVector 16(float) 3
172: 14(int) Constant 3
175: TypePointer Uniform 19(f64vec4)
184: TypePointer Uniform 18(float64_t)
175: TypePointer StorageBuffer 19(f64vec4)
184: TypePointer StorageBuffer 18(float64_t)
193: TypeVector 18(float64_t) 2
206: TypeVector 18(float64_t) 3
1226: TypePointer Input 7(ivec3)

View File

@ -79,7 +79,7 @@ local_size = (32, 16, 1)
Name 21 "@gl_SubgroupSize"
Decorate 9 ArrayStride 4
MemberDecorate 10(data) 0 Offset 0
Decorate 10(data) BufferBlock
Decorate 10(data) Block
Decorate 12(data) DescriptorSet 0
Decorate 12(data) Binding 0
Decorate 16(@gl_SubgroupInvocationID) BuiltIn SubgroupLocalInvocationId
@ -89,8 +89,8 @@ local_size = (32, 16, 1)
8: TypeInt 32 0
9: TypeRuntimeArray 8(int)
10(data): TypeStruct 9
11: TypePointer Uniform 10(data)
12(data): 11(ptr) Variable Uniform
11: TypePointer StorageBuffer 10(data)
12(data): 11(ptr) Variable StorageBuffer
13: TypeInt 32 1
14: 13(int) Constant 0
15: TypePointer Input 8(int)
@ -99,7 +99,7 @@ local_size = (32, 16, 1)
19: 8(int) Constant 3
21(@gl_SubgroupSize): 15(ptr) Variable Input
23: 8(int) Constant 0
25: TypePointer Uniform 8(int)
25: TypePointer StorageBuffer 8(int)
4(CSMain): 2 Function None 3
5: Label
27: 2 FunctionCall 6(@CSMain()

View File

@ -6219,7 +6219,7 @@ local_size = (32, 16, 1)
MemberDecorate 20(Types) 3 Offset 64
Decorate 21 ArrayStride 96
MemberDecorate 22(data) 0 Offset 0
Decorate 22(data) BufferBlock
Decorate 22(data) Block
Decorate 24(data) DescriptorSet 0
Decorate 24(data) Binding 0
Decorate 986(dti) BuiltIn GlobalInvocationId
@ -6239,30 +6239,30 @@ local_size = (32, 16, 1)
20(Types): TypeStruct 13(ivec4) 15(ivec4) 17(fvec4) 19(f64vec4)
21: TypeRuntimeArray 20(Types)
22(data): TypeStruct 21
23: TypePointer Uniform 22(data)
24(data): 23(ptr) Variable Uniform
23: TypePointer StorageBuffer 22(data)
24(data): 23(ptr) Variable StorageBuffer
25: 14(int) Constant 0
26: 6(int) Constant 0
27: TypePointer Function 6(int)
32: TypePointer Uniform 13(ivec4)
32: TypePointer StorageBuffer 13(ivec4)
35: 6(int) Constant 3
42: TypePointer Uniform 6(int)
42: TypePointer StorageBuffer 6(int)
51: TypeVector 6(int) 2
58: 6(int) Constant 1
73: 6(int) Constant 2
78: 14(int) Constant 1
81: TypePointer Uniform 15(ivec4)
90: TypePointer Uniform 14(int)
81: TypePointer StorageBuffer 15(ivec4)
90: TypePointer StorageBuffer 14(int)
99: TypeVector 14(int) 2
112: TypeVector 14(int) 3
125: 14(int) Constant 2
128: TypePointer Uniform 17(fvec4)
137: TypePointer Uniform 16(float)
128: TypePointer StorageBuffer 17(fvec4)
137: TypePointer StorageBuffer 16(float)
146: TypeVector 16(float) 2
159: TypeVector 16(float) 3
172: 14(int) Constant 3
175: TypePointer Uniform 19(f64vec4)
184: TypePointer Uniform 18(float64_t)
175: TypePointer StorageBuffer 19(f64vec4)
184: TypePointer StorageBuffer 18(float64_t)
193: TypeVector 18(float64_t) 2
206: TypeVector 18(float64_t) 3
979: TypeBool

View File

@ -228,7 +228,7 @@ local_size = (32, 16, 1)
Name 72 "param"
Decorate 14 ArrayStride 8
MemberDecorate 15(data) 0 Offset 0
Decorate 15(data) BufferBlock
Decorate 15(data) Block
Decorate 17(data) DescriptorSet 0
Decorate 17(data) Binding 0
Decorate 70(dti) BuiltIn GlobalInvocationId
@ -241,8 +241,8 @@ local_size = (32, 16, 1)
13: TypeInt 64 0
14: TypeRuntimeArray 13(int64_t)
15(data): TypeStruct 14
16: TypePointer Uniform 15(data)
17(data): 16(ptr) Variable Uniform
16: TypePointer StorageBuffer 15(data)
17(data): 16(ptr) Variable StorageBuffer
18: TypeInt 32 1
19: 18(int) Constant 0
20: 6(int) Constant 0
@ -251,7 +251,7 @@ local_size = (32, 16, 1)
28: 6(int) Constant 3
30: TypeVector 6(int) 4
32: TypeVector 13(int64_t) 4
35: TypePointer Uniform 13(int64_t)
35: TypePointer StorageBuffer 13(int64_t)
37: 6(int) Constant 1
48: 6(int) Constant 2
69: TypePointer Input 7(ivec3)

View File

@ -0,0 +1,115 @@
implicitArraySize.vert
Shader version: 460
0:? Sequence
0:5 Function Definition: main( ( global void)
0:5 Function Parameters:
0:6 Sequence
0:6 move second child to first child ( temp float)
0:6 direct index ( smooth temp float)
0:6 'a' ( smooth out unsized 1-element array of float)
0:6 Constant:
0:6 0 (const int)
0:6 Constant:
0:6 0.100000
0:7 move second child to first child ( temp float)
0:7 direct index ( smooth temp float)
0:7 'c' ( smooth out unsized 6-element array of float)
0:7 Constant:
0:7 5 (const int)
0:7 Constant:
0:7 0.100000
0:? Linker Objects
0:? 'a' ( smooth out unsized 1-element array of float)
0:? 'c' ( smooth out unsized 6-element array of float)
0:? 'gl_VertexID' ( gl_VertexId int VertexId)
0:? 'gl_InstanceID' ( gl_InstanceId int InstanceId)
implicitArraySize.frag
Shader version: 460
0:? Sequence
0:6 Function Definition: main( ( global void)
0:6 Function Parameters:
0:7 Sequence
0:7 move second child to first child ( temp float)
0:7 direct index ( temp float)
0:7 'b' ( out 5-element array of float)
0:7 Constant:
0:7 0 (const int)
0:7 direct index ( smooth temp float)
0:7 'a' ( smooth in unsized 2-element array of float)
0:7 Constant:
0:7 1 (const int)
0:8 move second child to first child ( temp float)
0:8 direct index ( temp float)
0:8 'b' ( out 5-element array of float)
0:8 Constant:
0:8 1 (const int)
0:8 direct index ( smooth temp float)
0:8 'c' ( smooth in 3-element array of float)
0:8 Constant:
0:8 1 (const int)
0:? Linker Objects
0:? 'a' ( smooth in unsized 2-element array of float)
0:? 'c' ( smooth in 3-element array of float)
0:? 'b' ( out 5-element array of float)
Linked vertex stage:
Linked fragment stage:
ERROR: Linking vertex stage: Implicit size of unsized array doesn't match same symbol among multiple shaders.
Shader version: 460
0:? Sequence
0:5 Function Definition: main( ( global void)
0:5 Function Parameters:
0:6 Sequence
0:6 move second child to first child ( temp float)
0:6 direct index ( smooth temp float)
0:6 'a' ( smooth out 1-element array of float)
0:6 Constant:
0:6 0 (const int)
0:6 Constant:
0:6 0.100000
0:7 move second child to first child ( temp float)
0:7 direct index ( smooth temp float)
0:7 'c' ( smooth out 6-element array of float)
0:7 Constant:
0:7 5 (const int)
0:7 Constant:
0:7 0.100000
0:? Linker Objects
0:? 'a' ( smooth out 1-element array of float)
0:? 'c' ( smooth out 6-element array of float)
0:? 'gl_VertexID' ( gl_VertexId int VertexId)
0:? 'gl_InstanceID' ( gl_InstanceId int InstanceId)
Shader version: 460
0:? Sequence
0:6 Function Definition: main( ( global void)
0:6 Function Parameters:
0:7 Sequence
0:7 move second child to first child ( temp float)
0:7 direct index ( temp float)
0:7 'b' ( out 5-element array of float)
0:7 Constant:
0:7 0 (const int)
0:7 direct index ( smooth temp float)
0:7 'a' ( smooth in 2-element array of float)
0:7 Constant:
0:7 1 (const int)
0:8 move second child to first child ( temp float)
0:8 direct index ( temp float)
0:8 'b' ( out 5-element array of float)
0:8 Constant:
0:8 1 (const int)
0:8 direct index ( smooth temp float)
0:8 'c' ( smooth in 3-element array of float)
0:8 Constant:
0:8 1 (const int)
0:? Linker Objects
0:? 'a' ( smooth in 2-element array of float)
0:? 'c' ( smooth in 3-element array of float)
0:? 'b' ( out 5-element array of float)

View File

@ -0,0 +1,99 @@
implicitArraySize1.geom
Shader version: 460
invocations = -1
max_vertices = 204
input primitive = triangles
output primitive = line_strip
0:? Sequence
0:11 Function Definition: main( ( global void)
0:11 Function Parameters:
0:12 Sequence
0:12 Function Call: f( ( global void)
0:13 move second child to first child ( temp float)
0:13 direct index (layout( stream=0) temp float)
0:13 'o' (layout( stream=0) out 3-element array of float)
0:13 Constant:
0:13 1 (const int)
0:13 direct index ( temp float)
0:13 direct index ( temp 3-element array of float)
0:13 'g' ( in 3-element array of 3-element array of float)
0:13 Constant:
0:13 2 (const int)
0:13 Constant:
0:13 1 (const int)
0:? Linker Objects
0:? 'g' ( in 3-element array of 3-element array of float)
0:? 'o' (layout( stream=0) out 3-element array of float)
implicitArraySize2.geom
Shader version: 460
invocations = -1
max_vertices = -1
input primitive = none
output primitive = none
0:? Sequence
0:6 Function Definition: f( ( global void)
0:6 Function Parameters:
0:7 Sequence
0:7 move second child to first child ( temp float)
0:7 direct index (layout( stream=0) temp float)
0:7 'o' (layout( stream=0) out unsized 2-element array of float)
0:7 Constant:
0:7 1 (const int)
0:7 direct index ( temp float)
0:7 direct index ( temp 3-element array of float)
0:7 'g' ( in unsized 2-element array of 3-element array of float)
0:7 Constant:
0:7 1 (const int)
0:7 Constant:
0:7 1 (const int)
0:? Linker Objects
0:? 'g' ( in unsized 2-element array of 3-element array of float)
0:? 'o' (layout( stream=0) out unsized 2-element array of float)
Linked geometry stage:
ERROR: Linking geometry stage: Not all array sizes match across all geometry shaders in the program
Shader version: 460
invocations = 1
max_vertices = 204
input primitive = triangles
output primitive = line_strip
0:? Sequence
0:11 Function Definition: main( ( global void)
0:11 Function Parameters:
0:12 Sequence
0:12 Function Call: f( ( global void)
0:13 move second child to first child ( temp float)
0:13 direct index (layout( stream=0) temp float)
0:13 'o' (layout( stream=0) out 3-element array of float)
0:13 Constant:
0:13 1 (const int)
0:13 direct index ( temp float)
0:13 direct index ( temp 3-element array of float)
0:13 'g' ( in 3-element array of 3-element array of float)
0:13 Constant:
0:13 2 (const int)
0:13 Constant:
0:13 1 (const int)
0:6 Function Definition: f( ( global void)
0:6 Function Parameters:
0:7 Sequence
0:7 move second child to first child ( temp float)
0:7 direct index (layout( stream=0) temp float)
0:7 'o' (layout( stream=0) out 2-element array of float)
0:7 Constant:
0:7 1 (const int)
0:7 direct index ( temp float)
0:7 direct index ( temp 3-element array of float)
0:7 'g' ( in 2-element array of 3-element array of float)
0:7 Constant:
0:7 1 (const int)
0:7 Constant:
0:7 1 (const int)
0:? Linker Objects
0:? 'g' ( in 3-element array of 3-element array of float)
0:? 'o' (layout( stream=0) out 3-element array of float)

View File

@ -0,0 +1,176 @@
implicitArraySizeBuiltin.vert
Shader version: 460
0:? Sequence
0:3 Function Definition: f1(f1; ( global void)
0:3 Function Parameters:
0:3 'x' ( in float)
0:5 Sequence
0:5 move second child to first child ( temp float)
0:5 direct index ( temp float ClipDistance)
0:5 gl_ClipDistance: direct index for structure ( out unsized 7-element array of float ClipDistance)
0:5 'anon@0' ( out block{ gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out unsized 7-element array of float ClipDistance gl_ClipDistance, out unsized 2-element array of float CullDistance gl_CullDistance})
0:5 Constant:
0:5 2 (const uint)
0:5 Constant:
0:5 6 (const int)
0:5 'x' ( in float)
0:6 move second child to first child ( temp float)
0:6 direct index ( temp float CullDistance)
0:6 gl_CullDistance: direct index for structure ( out unsized 2-element array of float CullDistance)
0:6 'anon@0' ( out block{ gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out unsized 7-element array of float ClipDistance gl_ClipDistance, out unsized 2-element array of float CullDistance gl_CullDistance})
0:6 Constant:
0:6 3 (const uint)
0:6 Constant:
0:6 1 (const int)
0:6 'x' ( in float)
0:9 Function Definition: main( ( global void)
0:9 Function Parameters:
0:10 Sequence
0:10 Function Call: f1(f1; ( global void)
0:10 Constant:
0:10 0.100000
0:? Linker Objects
0:? 'anon@0' ( out block{ gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out unsized 7-element array of float ClipDistance gl_ClipDistance, out unsized 2-element array of float CullDistance gl_CullDistance})
0:? 'gl_VertexID' ( gl_VertexId int VertexId)
0:? 'gl_InstanceID' ( gl_InstanceId int InstanceId)
implicitArraySizeBuiltin.geom
Shader version: 460
invocations = -1
max_vertices = 204
input primitive = triangles
output primitive = line_strip
0:? Sequence
0:6 Function Definition: f2(f1; ( global void)
0:6 Function Parameters:
0:6 'x' ( in float)
0:8 Sequence
0:8 move second child to first child ( temp float)
0:8 direct index (layout( stream=0) temp float ClipDistance)
0:8 gl_ClipDistance: direct index for structure (layout( stream=0) out unsized 7-element array of float ClipDistance)
0:8 'anon@0' (layout( stream=0) out block{layout( stream=0) gl_Position 4-component vector of float Position gl_Position, layout( stream=0) gl_PointSize float PointSize gl_PointSize, layout( stream=0) out unsized 7-element array of float ClipDistance gl_ClipDistance, layout( stream=0) out unsized 2-element array of float CullDistance gl_CullDistance})
0:8 Constant:
0:8 2 (const uint)
0:8 Constant:
0:8 6 (const int)
0:8 direct index ( temp float ClipDistance)
0:8 gl_ClipDistance: direct index for structure ( in unsized 7-element array of float ClipDistance)
0:8 direct index ( temp block{ in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in unsized 7-element array of float ClipDistance gl_ClipDistance, in unsized 2-element array of float CullDistance gl_CullDistance, in 4-component vector of float SecondaryPositionNV gl_SecondaryPositionNV, in unsized 1-element array of 4-component vector of float PositionPerViewNV gl_PositionPerViewNV})
0:8 'gl_in' ( in 3-element array of block{ in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in unsized 7-element array of float ClipDistance gl_ClipDistance, in unsized 2-element array of float CullDistance gl_CullDistance, in 4-component vector of float SecondaryPositionNV gl_SecondaryPositionNV, in unsized 1-element array of 4-component vector of float PositionPerViewNV gl_PositionPerViewNV})
0:8 Constant:
0:8 0 (const int)
0:8 Constant:
0:8 2 (const int)
0:8 Constant:
0:8 6 (const int)
0:10 Function Definition: f3(f1; ( global void)
0:10 Function Parameters:
0:10 'x' ( in float)
0:12 Sequence
0:12 move second child to first child ( temp float)
0:12 direct index (layout( stream=0) temp float CullDistance)
0:12 gl_CullDistance: direct index for structure (layout( stream=0) out unsized 2-element array of float CullDistance)
0:12 'anon@0' (layout( stream=0) out block{layout( stream=0) gl_Position 4-component vector of float Position gl_Position, layout( stream=0) gl_PointSize float PointSize gl_PointSize, layout( stream=0) out unsized 7-element array of float ClipDistance gl_ClipDistance, layout( stream=0) out unsized 2-element array of float CullDistance gl_CullDistance})
0:12 Constant:
0:12 3 (const uint)
0:12 Constant:
0:12 1 (const int)
0:12 direct index ( temp float CullDistance)
0:12 gl_CullDistance: direct index for structure ( in unsized 2-element array of float CullDistance)
0:12 direct index ( temp block{ in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in unsized 7-element array of float ClipDistance gl_ClipDistance, in unsized 2-element array of float CullDistance gl_CullDistance, in 4-component vector of float SecondaryPositionNV gl_SecondaryPositionNV, in unsized 1-element array of 4-component vector of float PositionPerViewNV gl_PositionPerViewNV})
0:12 'gl_in' ( in 3-element array of block{ in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in unsized 7-element array of float ClipDistance gl_ClipDistance, in unsized 2-element array of float CullDistance gl_CullDistance, in 4-component vector of float SecondaryPositionNV gl_SecondaryPositionNV, in unsized 1-element array of 4-component vector of float PositionPerViewNV gl_PositionPerViewNV})
0:12 Constant:
0:12 0 (const int)
0:12 Constant:
0:12 3 (const int)
0:12 Constant:
0:12 1 (const int)
0:15 Function Definition: main( ( global void)
0:15 Function Parameters:
0:19 Sequence
0:19 Function Call: f3(f1; ( global void)
0:19 Constant:
0:19 0.100000
0:? Linker Objects
0:? 'anon@0' (layout( stream=0) out block{layout( stream=0) gl_Position 4-component vector of float Position gl_Position, layout( stream=0) gl_PointSize float PointSize gl_PointSize, layout( stream=0) out unsized 7-element array of float ClipDistance gl_ClipDistance, layout( stream=0) out unsized 2-element array of float CullDistance gl_CullDistance})
0:? 'gl_in' ( in 3-element array of block{ in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in unsized 7-element array of float ClipDistance gl_ClipDistance, in unsized 2-element array of float CullDistance gl_CullDistance, in 4-component vector of float SecondaryPositionNV gl_SecondaryPositionNV, in unsized 1-element array of 4-component vector of float PositionPerViewNV gl_PositionPerViewNV})
Linked vertex stage:
Linked geometry stage:
Shader version: 460
0:? Sequence
0:3 Function Definition: f1(f1; ( global void)
0:3 Function Parameters:
0:3 'x' ( in float)
0:5 Sequence
0:5 move second child to first child ( temp float)
0:5 direct index ( temp float ClipDistance)
0:5 gl_ClipDistance: direct index for structure ( out 7-element array of float ClipDistance)
0:5 'anon@0' ( out block{ gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 7-element array of float ClipDistance gl_ClipDistance, out 2-element array of float CullDistance gl_CullDistance})
0:5 Constant:
0:5 2 (const uint)
0:5 Constant:
0:5 6 (const int)
0:5 'x' ( in float)
0:6 move second child to first child ( temp float)
0:6 direct index ( temp float CullDistance)
0:6 gl_CullDistance: direct index for structure ( out 2-element array of float CullDistance)
0:6 'anon@0' ( out block{ gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 7-element array of float ClipDistance gl_ClipDistance, out 2-element array of float CullDistance gl_CullDistance})
0:6 Constant:
0:6 3 (const uint)
0:6 Constant:
0:6 1 (const int)
0:6 'x' ( in float)
0:9 Function Definition: main( ( global void)
0:9 Function Parameters:
0:10 Sequence
0:10 Function Call: f1(f1; ( global void)
0:10 Constant:
0:10 0.100000
0:? Linker Objects
0:? 'anon@0' ( out block{ gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 7-element array of float ClipDistance gl_ClipDistance, out 2-element array of float CullDistance gl_CullDistance})
0:? 'gl_VertexID' ( gl_VertexId int VertexId)
0:? 'gl_InstanceID' ( gl_InstanceId int InstanceId)
Shader version: 460
invocations = 1
max_vertices = 204
input primitive = triangles
output primitive = line_strip
0:? Sequence
0:10 Function Definition: f3(f1; ( global void)
0:10 Function Parameters:
0:10 'x' ( in float)
0:12 Sequence
0:12 move second child to first child ( temp float)
0:12 direct index (layout( stream=0) temp float CullDistance)
0:12 gl_CullDistance: direct index for structure (layout( stream=0) out 2-element array of float CullDistance)
0:12 'anon@0' (layout( stream=0) out block{layout( stream=0) gl_Position 4-component vector of float Position gl_Position, layout( stream=0) gl_PointSize float PointSize gl_PointSize, layout( stream=0) out 7-element array of float ClipDistance gl_ClipDistance, layout( stream=0) out 2-element array of float CullDistance gl_CullDistance})
0:12 Constant:
0:12 3 (const uint)
0:12 Constant:
0:12 1 (const int)
0:12 direct index ( temp float CullDistance)
0:12 gl_CullDistance: direct index for structure ( in 2-element array of float CullDistance)
0:12 direct index ( temp block{ in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in 7-element array of float ClipDistance gl_ClipDistance, in 2-element array of float CullDistance gl_CullDistance, in 4-component vector of float SecondaryPositionNV gl_SecondaryPositionNV, in 1-element array of 4-component vector of float PositionPerViewNV gl_PositionPerViewNV})
0:12 'gl_in' ( in 3-element array of block{ in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in 7-element array of float ClipDistance gl_ClipDistance, in 2-element array of float CullDistance gl_CullDistance, in 4-component vector of float SecondaryPositionNV gl_SecondaryPositionNV, in 1-element array of 4-component vector of float PositionPerViewNV gl_PositionPerViewNV})
0:12 Constant:
0:12 0 (const int)
0:12 Constant:
0:12 3 (const int)
0:12 Constant:
0:12 1 (const int)
0:15 Function Definition: main( ( global void)
0:15 Function Parameters:
0:19 Sequence
0:19 Function Call: f3(f1; ( global void)
0:19 Constant:
0:19 0.100000
0:? Linker Objects
0:? 'anon@0' (layout( stream=0) out block{layout( stream=0) gl_Position 4-component vector of float Position gl_Position, layout( stream=0) gl_PointSize float PointSize gl_PointSize, layout( stream=0) out 7-element array of float ClipDistance gl_ClipDistance, layout( stream=0) out 2-element array of float CullDistance gl_CullDistance})
0:? 'gl_in' ( in 3-element array of block{ in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in 7-element array of float ClipDistance gl_ClipDistance, in 2-element array of float CullDistance gl_CullDistance, in 4-component vector of float SecondaryPositionNV gl_SecondaryPositionNV, in 1-element array of 4-component vector of float PositionPerViewNV gl_PositionPerViewNV})

View File

@ -13,9 +13,12 @@
int main() {
gl_Position = vec4(3 + 1, 3 + 4, 3 + 1);
gl_Position = vec4(1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12);
gl_Position = vec4(4 + 3 + 3);
gl_Position = 4 + 3 + F.a;
}

View File

@ -46,6 +46,8 @@ struct S {
void bar(int x) { }
void foo()
{
S s;
@ -55,6 +57,9 @@ void foo()
s.member2.yyz;
s.member2.xxyz();
s.member2.yzy;
for (int i = 0; i < 100; i = i + 1) {
bar(i)
}
vec3 a = vec3(0); vec3 b = a.zxyz; vec3 b = a.xxyz; vec3 b = a.yyz; vec3 b = a.xxyz(); vec3 b = a.yzy; vec3 b = a.z;

View File

@ -1,12 +1,14 @@
rayQuery-allOps.comp
// Module Version 10000
// Generated by (magic number): 8000b
// Id's are bound by 258
// Id's are bound by 275
Capability Shader
Capability RayQueryKHR
Capability RayTraversalPrimitiveCullingKHR
Capability RayQueryPositionFetchKHR
Extension "SPV_KHR_ray_query"
Extension "SPV_KHR_ray_tracing_position_fetch"
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint GLCompute 4 "main"
@ -14,6 +16,7 @@ rayQuery-allOps.comp
Source GLSL 460
SourceExtension "GL_EXT_ray_flags_primitive_culling"
SourceExtension "GL_EXT_ray_query"
SourceExtension "GL_EXT_ray_tracing_position_fetch"
Name 4 "main"
Name 6 "doSomething("
Name 10 "Ray"
@ -35,16 +38,17 @@ rayQuery-allOps.comp
Name 83 "_mat3x4"
Name 143 "t"
Name 156 "committedStatus"
Name 241 "o"
Name 243 "d"
Name 253 "Ray"
MemberName 253(Ray) 0 "pos"
MemberName 253(Ray) 1 "tmin"
MemberName 253(Ray) 2 "dir"
MemberName 253(Ray) 3 "tmax"
Name 255 "Rays"
MemberName 255(Rays) 0 "rays"
Name 257 ""
Name 184 "positions"
Name 258 "o"
Name 260 "d"
Name 270 "Ray"
MemberName 270(Ray) 0 "pos"
MemberName 270(Ray) 1 "tmin"
MemberName 270(Ray) 2 "dir"
MemberName 270(Ray) 3 "tmax"
Name 272 "Rays"
MemberName 272(Rays) 0 "rays"
Name 274 ""
MemberDecorate 15(Log) 0 Offset 0
MemberDecorate 15(Log) 1 Offset 4
Decorate 15(Log) BufferBlock
@ -52,15 +56,15 @@ rayQuery-allOps.comp
Decorate 17 Binding 0
Decorate 50(rtas) DescriptorSet 0
Decorate 50(rtas) Binding 1
MemberDecorate 253(Ray) 0 Offset 0
MemberDecorate 253(Ray) 1 Offset 12
MemberDecorate 253(Ray) 2 Offset 16
MemberDecorate 253(Ray) 3 Offset 28
Decorate 254 ArrayStride 32
MemberDecorate 255(Rays) 0 Offset 0
Decorate 255(Rays) BufferBlock
Decorate 257 DescriptorSet 0
Decorate 257 Binding 2
MemberDecorate 270(Ray) 0 Offset 0
MemberDecorate 270(Ray) 1 Offset 12
MemberDecorate 270(Ray) 2 Offset 16
MemberDecorate 270(Ray) 3 Offset 28
Decorate 271 ArrayStride 32
MemberDecorate 272(Rays) 0 Offset 0
Decorate 272(Rays) BufferBlock
Decorate 274 DescriptorSet 0
Decorate 274 Binding 2
2: TypeVoid
3: TypeFunction 2
8: TypeFloat 32
@ -105,13 +109,16 @@ rayQuery-allOps.comp
91: TypeVector 8(float) 2
144: 8(float) Constant 1056964608
175: 14(int) Constant 1
198: 14(int) Constant 2
231: 14(int) Constant 256
253(Ray): TypeStruct 9(fvec3) 8(float) 9(fvec3) 8(float)
254: TypeRuntimeArray 253(Ray)
255(Rays): TypeStruct 254
256: TypePointer Uniform 255(Rays)
257: 256(ptr) Variable Uniform
181: 14(int) Constant 3
182: TypeArray 9(fvec3) 181
183: TypePointer Function 182
215: 14(int) Constant 2
248: 14(int) Constant 256
270(Ray): TypeStruct 9(fvec3) 8(float) 9(fvec3) 8(float)
271: TypeRuntimeArray 270(Ray)
272(Rays): TypeStruct 271
273: TypePointer Uniform 272(Rays)
274: 273(ptr) Variable Uniform
4(main): 2 Function None 3
5: Label
43(ray): 25(ptr) Variable Function
@ -120,8 +127,9 @@ rayQuery-allOps.comp
83(_mat3x4): 82(ptr) Variable Function
143(t): 35(ptr) Variable Function
156(committedStatus): 68(ptr) Variable Function
241(o): 29(ptr) Variable Function
243(d): 29(ptr) Variable Function
184(positions): 183(ptr) Variable Function
258(o): 29(ptr) Variable Function
260(d): 29(ptr) Variable Function
44: 10(Ray) FunctionCall 12(makeRayDesc()
Store 43(ray) 44
51: 48 Load 50(rtas)
@ -303,110 +311,130 @@ rayQuery-allOps.comp
180: 2 FunctionCall 6(doSomething()
Branch 179
179: Label
Branch 162
161: Label
182: 18(int) RayQueryGetIntersectionGeometryIndexKHR 47(rayQuery) 23
183: 66(bool) SGreaterThan 182 19
SelectionMerge 185 None
BranchConditional 183 184 185
184: Label
186: 2 FunctionCall 6(doSomething()
Branch 185
185: Label
187: 18(int) RayQueryGetIntersectionInstanceIdKHR 47(rayQuery) 23
188: 66(bool) SGreaterThan 187 19
185: 182 RayQueryGetIntersectionTriangleVertexPositionsKHR 47(rayQuery) 23
Store 184(positions) 185
186: 35(ptr) AccessChain 184(positions) 19 20
187: 8(float) Load 186
188: 66(bool) FOrdLessThan 187 27
SelectionMerge 190 None
BranchConditional 188 189 190
189: Label
191: 2 FunctionCall 6(doSomething()
191: 35(ptr) AccessChain 184(positions) 31 175
192: 8(float) Load 191
193: 66(bool) FOrdGreaterThan 192 27
Branch 190
190: Label
192: 18(int) RayQueryGetIntersectionInstanceCustomIndexKHR 47(rayQuery) 23
193: 66(bool) SGreaterThan 192 19
SelectionMerge 195 None
BranchConditional 193 194 195
194: Label
196: 2 FunctionCall 6(doSomething()
Branch 195
194: 66(bool) Phi 188 179 193 189
SelectionMerge 196 None
BranchConditional 194 195 196
195: Label
197: 9(fvec3) RayQueryGetIntersectionObjectRayDirectionKHR 47(rayQuery) 23
199: 8(float) CompositeExtract 197 2
200: 66(bool) FOrdGreaterThan 199 27
197: 2 FunctionCall 6(doSomething()
Branch 196
196: Label
Branch 162
161: Label
199: 18(int) RayQueryGetIntersectionGeometryIndexKHR 47(rayQuery) 23
200: 66(bool) SGreaterThan 199 19
SelectionMerge 202 None
BranchConditional 200 201 202
201: Label
203: 2 FunctionCall 6(doSomething()
Branch 202
202: Label
204: 9(fvec3) RayQueryGetIntersectionObjectRayOriginKHR 47(rayQuery) 23
205: 8(float) CompositeExtract 204 0
206: 66(bool) FOrdGreaterThan 205 27
SelectionMerge 208 None
BranchConditional 206 207 208
204: 18(int) RayQueryGetIntersectionInstanceIdKHR 47(rayQuery) 23
205: 66(bool) SGreaterThan 204 19
SelectionMerge 207 None
BranchConditional 205 206 207
206: Label
208: 2 FunctionCall 6(doSomething()
Branch 207
207: Label
209: 2 FunctionCall 6(doSomething()
Branch 208
208: Label
210: 18(int) RayQueryGetIntersectionPrimitiveIndexKHR 47(rayQuery) 23
211: 66(bool) SGreaterThan 210 19
SelectionMerge 213 None
BranchConditional 211 212 213
209: 18(int) RayQueryGetIntersectionInstanceCustomIndexKHR 47(rayQuery) 23
210: 66(bool) SGreaterThan 209 19
SelectionMerge 212 None
BranchConditional 210 211 212
211: Label
213: 2 FunctionCall 6(doSomething()
Branch 212
212: Label
214: 2 FunctionCall 6(doSomething()
Branch 213
213: Label
215: 8(float) RayQueryGetIntersectionTKHR 47(rayQuery) 23
216: 66(bool) FOrdGreaterThan 215 27
SelectionMerge 218 None
BranchConditional 216 217 218
217: Label
219: 2 FunctionCall 6(doSomething()
Branch 218
214: 9(fvec3) RayQueryGetIntersectionObjectRayDirectionKHR 47(rayQuery) 23
216: 8(float) CompositeExtract 214 2
217: 66(bool) FOrdGreaterThan 216 27
SelectionMerge 219 None
BranchConditional 217 218 219
218: Label
220: 2 FunctionCall 6(doSomething()
Branch 219
219: Label
221: 9(fvec3) RayQueryGetIntersectionObjectRayOriginKHR 47(rayQuery) 23
222: 8(float) CompositeExtract 221 0
223: 66(bool) FOrdGreaterThan 222 27
SelectionMerge 225 None
BranchConditional 223 224 225
224: Label
226: 2 FunctionCall 6(doSomething()
Branch 225
225: Label
227: 18(int) RayQueryGetIntersectionPrimitiveIndexKHR 47(rayQuery) 23
228: 66(bool) SGreaterThan 227 19
SelectionMerge 230 None
BranchConditional 228 229 230
229: Label
231: 2 FunctionCall 6(doSomething()
Branch 230
230: Label
232: 8(float) RayQueryGetIntersectionTKHR 47(rayQuery) 23
233: 66(bool) FOrdGreaterThan 232 27
SelectionMerge 235 None
BranchConditional 233 234 235
234: Label
236: 2 FunctionCall 6(doSomething()
Branch 235
235: Label
Branch 162
162: Label
222: 35(ptr) AccessChain 83(_mat3x4) 19 20
223: 8(float) Load 222
224: 35(ptr) AccessChain 78(_mat4x3) 19 20
225: 8(float) Load 224
226: 66(bool) FOrdEqual 223 225
SelectionMerge 228 None
BranchConditional 226 227 228
227: Label
229: 2 FunctionCall 6(doSomething()
Branch 228
228: Label
230: 14(int) RayQueryGetRayFlagsKHR 47(rayQuery)
232: 66(bool) UGreaterThan 230 231
SelectionMerge 234 None
BranchConditional 232 233 234
233: Label
235: 2 FunctionCall 6(doSomething()
Branch 234
234: Label
236: 8(float) RayQueryGetRayTMinKHR 47(rayQuery)
237: 66(bool) FOrdGreaterThan 236 27
SelectionMerge 239 None
BranchConditional 237 238 239
238: Label
240: 2 FunctionCall 6(doSomething()
Branch 239
239: Label
242: 9(fvec3) RayQueryGetWorldRayOriginKHR 47(rayQuery)
Store 241(o) 242
244: 9(fvec3) RayQueryGetWorldRayDirectionKHR 47(rayQuery)
Store 243(d) 244
245: 35(ptr) AccessChain 241(o) 20
246: 8(float) Load 245
247: 35(ptr) AccessChain 243(d) 198
248: 8(float) Load 247
249: 66(bool) FOrdEqual 246 248
239: 35(ptr) AccessChain 83(_mat3x4) 19 20
240: 8(float) Load 239
241: 35(ptr) AccessChain 78(_mat4x3) 19 20
242: 8(float) Load 241
243: 66(bool) FOrdEqual 240 242
SelectionMerge 245 None
BranchConditional 243 244 245
244: Label
246: 2 FunctionCall 6(doSomething()
Branch 245
245: Label
247: 14(int) RayQueryGetRayFlagsKHR 47(rayQuery)
249: 66(bool) UGreaterThan 247 248
SelectionMerge 251 None
BranchConditional 249 250 251
250: Label
252: 2 FunctionCall 6(doSomething()
Branch 251
251: Label
253: 8(float) RayQueryGetRayTMinKHR 47(rayQuery)
254: 66(bool) FOrdGreaterThan 253 27
SelectionMerge 256 None
BranchConditional 254 255 256
255: Label
257: 2 FunctionCall 6(doSomething()
Branch 256
256: Label
259: 9(fvec3) RayQueryGetWorldRayOriginKHR 47(rayQuery)
Store 258(o) 259
261: 9(fvec3) RayQueryGetWorldRayDirectionKHR 47(rayQuery)
Store 260(d) 261
262: 35(ptr) AccessChain 258(o) 20
263: 8(float) Load 262
264: 35(ptr) AccessChain 260(d) 215
265: 8(float) Load 264
266: 66(bool) FOrdEqual 263 265
SelectionMerge 268 None
BranchConditional 266 267 268
267: Label
269: 2 FunctionCall 6(doSomething()
Branch 268
268: Label
Return
FunctionEnd
6(doSomething(): 2 Function None 3

View File

@ -1 +1 @@
399360 ../build/install/bin/glslangValidator.exe
399360 ../build/install/bin/glslang.exe

View File

@ -13,10 +13,8 @@ spv.460.subgroupEXT.mesh
Capability GroupNonUniformShuffleRelative
Capability GroupNonUniformClustered
Capability GroupNonUniformQuad
Capability FragmentShadingRateKHR
Capability MeshShadingEXT
Extension "SPV_EXT_mesh_shader"
Extension "SPV_KHR_fragment_shading_rate"
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint MeshEXT 4 "main" 35 41 57 109 147 161 162 167 168 171 172 173 174 175
@ -65,7 +63,6 @@ spv.460.subgroupEXT.mesh
MemberName 106(gl_MeshPerPrimitiveEXT) 1 "gl_Layer"
MemberName 106(gl_MeshPerPrimitiveEXT) 2 "gl_ViewportIndex"
MemberName 106(gl_MeshPerPrimitiveEXT) 3 "gl_CullPrimitiveEXT"
MemberName 106(gl_MeshPerPrimitiveEXT) 4 "gl_PrimitiveShadingRateEXT"
Name 109 "gl_MeshPrimitivesEXT"
Name 147 "gl_PrimitiveTriangleIndicesEXT"
Name 161 "gl_SubgroupSize"
@ -95,8 +92,6 @@ spv.460.subgroupEXT.mesh
MemberDecorate 106(gl_MeshPerPrimitiveEXT) 2 BuiltIn ViewportIndex
MemberDecorate 106(gl_MeshPerPrimitiveEXT) 3 PerPrimitiveNV
MemberDecorate 106(gl_MeshPerPrimitiveEXT) 3 BuiltIn CullPrimitiveEXT
MemberDecorate 106(gl_MeshPerPrimitiveEXT) 4 PerPrimitiveNV
MemberDecorate 106(gl_MeshPerPrimitiveEXT) 4 BuiltIn PrimitiveShadingRateKHR
Decorate 106(gl_MeshPerPrimitiveEXT) Block
Decorate 147(gl_PrimitiveTriangleIndicesEXT) BuiltIn PrimitiveTriangleIndicesEXT
Decorate 161(gl_SubgroupSize) RelaxedPrecision
@ -151,7 +146,7 @@ spv.460.subgroupEXT.mesh
79: 30(int) Constant 264
80: 30(int) Constant 2
105: TypeBool
106(gl_MeshPerPrimitiveEXT): TypeStruct 59(int) 59(int) 59(int) 105(bool) 59(int)
106(gl_MeshPerPrimitiveEXT): TypeStruct 59(int) 59(int) 59(int) 105(bool)
107: TypeArray 106(gl_MeshPerPrimitiveEXT) 47
108: TypePointer Output 107
109(gl_MeshPrimitivesEXT): 108(ptr) Variable Output

View File

@ -0,0 +1,9 @@
spv.atomicRvalue.error.vert
ERROR: 0:5: 'assign' : l-value required
ERROR: 0:5: 'out' : Non-L-value cannot be passed for 'out' or 'inout' parameters.
ERROR: 0:5: 'atomicAdd' : Only l-values corresponding to shader block storage or shared variables can be used with atomic memory functions.
ERROR: 0:6: 'atomicAdd' : Only l-values corresponding to shader block storage or shared variables can be used with atomic memory functions.
ERROR: 4 compilation errors. No code generated.
SPIR-V is not generated for failed compile or link

View File

@ -1,7 +1,7 @@
spv.bufferhandle8.frag
// Module Version 10000
// Generated by (magic number): 8000b
// Id's are bound by 27
// Id's are bound by 39
Capability Shader
Capability PhysicalStorageBufferAddressesEXT
@ -21,41 +21,46 @@ spv.bufferhandle8.frag
MemberName 10(T1) 0 "x"
Name 11 "T2"
MemberName 11(T2) 0 "x"
Name 13 "T3"
MemberName 13(T3) 0 "Bindings"
Name 15 "t3"
Name 23 "t2"
MemberName 23(t2) 0 "f"
MemberName 23(t2) 1 "g"
Name 24 "blockType"
MemberName 24(blockType) 0 "a"
MemberName 24(blockType) 1 "b"
MemberName 24(blockType) 2 "c"
MemberName 24(blockType) 3 "d"
MemberName 24(blockType) 4 "e"
Name 26 "t"
MemberDecorate 8(Blah) 0 Offset 0
MemberDecorate 8(Blah) 1 Offset 8
Name 13 "x"
Name 14 "Blah"
MemberName 14(Blah) 0 "t1"
MemberName 14(Blah) 1 "t2"
Name 16 "T3"
MemberName 16(T3) 0 "Bindings"
Name 18 "t3"
Name 35 "t2"
MemberName 35(t2) 0 "f"
MemberName 35(t2) 1 "g"
Name 36 "blockType"
MemberName 36(blockType) 0 "a"
MemberName 36(blockType) 1 "b"
MemberName 36(blockType) 2 "c"
MemberName 36(blockType) 3 "d"
MemberName 36(blockType) 4 "e"
Name 38 "t"
MemberDecorate 10(T1) 0 Offset 0
Decorate 10(T1) Block
MemberDecorate 11(T2) 0 Offset 0
Decorate 11(T2) Block
Decorate 12 ArrayStride 16
MemberDecorate 13(T3) 0 Offset 0
Decorate 13(T3) Block
Decorate 15(t3) DescriptorSet 0
Decorate 15(t3) Binding 0
MemberDecorate 23(t2) 0 Offset 0
MemberDecorate 23(t2) 1 Offset 8
Decorate 23(t2) Block
MemberDecorate 24(blockType) 0 Offset 0
MemberDecorate 24(blockType) 1 Offset 4
MemberDecorate 24(blockType) 2 Offset 8
MemberDecorate 24(blockType) 3 Offset 12
MemberDecorate 24(blockType) 4 Offset 16
Decorate 24(blockType) Block
Decorate 26(t) DescriptorSet 0
Decorate 26(t) Binding 0
MemberDecorate 14(Blah) 0 Offset 0
MemberDecorate 14(Blah) 1 Offset 8
Decorate 15 ArrayStride 16
MemberDecorate 16(T3) 0 Offset 0
Decorate 16(T3) Block
Decorate 18(t3) DescriptorSet 0
Decorate 18(t3) Binding 0
MemberDecorate 35(t2) 0 Offset 0
MemberDecorate 35(t2) 1 Offset 8
Decorate 35(t2) Block
MemberDecorate 36(blockType) 0 Offset 0
MemberDecorate 36(blockType) 1 Offset 4
MemberDecorate 36(blockType) 2 Offset 8
MemberDecorate 36(blockType) 3 Offset 12
MemberDecorate 36(blockType) 4 Offset 16
Decorate 36(blockType) Block
Decorate 38(t) DescriptorSet 0
Decorate 38(t) Binding 0
Decorate 13(x) DecorationAliasedPointerEXT
2: TypeVoid
3: TypeFunction 2
TypeForwardPointer 6 PhysicalStorageBufferEXT
@ -66,24 +71,38 @@ spv.bufferhandle8.frag
6: TypePointer PhysicalStorageBufferEXT 10(T1)
11(T2): TypeStruct 9(int)
7: TypePointer PhysicalStorageBufferEXT 11(T2)
12: TypeRuntimeArray 8(Blah)
13(T3): TypeStruct 12
14: TypePointer StorageBuffer 13(T3)
15(t3): 14(ptr) Variable StorageBuffer
16: 9(int) Constant 0
17: 9(int) Constant 1
18: TypePointer StorageBuffer 8(Blah)
TypeForwardPointer 22 PhysicalStorageBufferEXT
23(t2): TypeStruct 22 22
24(blockType): TypeStruct 9(int) 9(int) 9(int) 9(int) 9(int)
22: TypePointer PhysicalStorageBufferEXT 24(blockType)
25: TypePointer StorageBuffer 23(t2)
26(t): 25(ptr) Variable StorageBuffer
12: TypePointer Function 8(Blah)
14(Blah): TypeStruct 6(ptr) 7(ptr)
15: TypeRuntimeArray 14(Blah)
16(T3): TypeStruct 15
17: TypePointer StorageBuffer 16(T3)
18(t3): 17(ptr) Variable StorageBuffer
19: 9(int) Constant 0
20: 9(int) Constant 2
21: TypePointer StorageBuffer 14(Blah)
25: TypePointer Function 6(ptr)
28: 9(int) Constant 1
29: TypePointer Function 7(ptr)
TypeForwardPointer 34 PhysicalStorageBufferEXT
35(t2): TypeStruct 34 34
36(blockType): TypeStruct 9(int) 9(int) 9(int) 9(int) 9(int)
34: TypePointer PhysicalStorageBufferEXT 36(blockType)
37: TypePointer StorageBuffer 35(t2)
38(t): 37(ptr) Variable StorageBuffer
4(main): 2 Function None 3
5: Label
19: 18(ptr) AccessChain 15(t3) 16 17
20: 8(Blah) Load 19
21: 18(ptr) AccessChain 15(t3) 16 16
Store 21 20
13(x): 12(ptr) Variable Function
22: 21(ptr) AccessChain 18(t3) 19 20
23: 14(Blah) Load 22
24: 6(ptr) CompositeExtract 23 0
26: 25(ptr) AccessChain 13(x) 19
Store 26 24
27: 7(ptr) CompositeExtract 23 1
30: 29(ptr) AccessChain 13(x) 28
Store 30 27
31: 21(ptr) AccessChain 18(t3) 19 28
32: 14(Blah) Load 31
33: 21(ptr) AccessChain 18(t3) 19 19
Store 33 32
Return
FunctionEnd

View File

@ -0,0 +1,402 @@
spv.coopmatKHR.comp
// Module Version 10000
// Generated by (magic number): 8000b
// Id's are bound by 250
Capability Shader
Capability Float16
Capability Int16
Capability Int8
Capability StorageUniformBufferBlock16
Capability VulkanMemoryModelKHR
Capability PhysicalStorageBufferAddressesEXT
Capability CooperativeMatrixKHR
Extension "SPV_KHR_16bit_storage"
Extension "SPV_KHR_cooperative_matrix"
Extension "SPV_KHR_physical_storage_buffer"
Extension "SPV_KHR_storage_buffer_storage_class"
Extension "SPV_KHR_vulkan_memory_model"
1: ExtInstImport "GLSL.std.450"
MemoryModel PhysicalStorageBuffer64EXT VulkanKHR
EntryPoint GLCompute 4 "main"
ExecutionMode 4 LocalSize 64 1 1
Source GLSL 450
SourceExtension "GL_EXT_buffer_reference"
SourceExtension "GL_EXT_shader_explicit_arithmetic_types"
SourceExtension "GL_KHR_cooperative_matrix"
SourceExtension "GL_KHR_memory_scope_semantics"
Name 4 "main"
Name 15 "f16(f161;"
Name 14 "m"
Name 22 "f32(f1;"
Name 21 "m"
Name 35 "m"
Name 53 "m2"
Name 57 "x"
Name 65 "tempArg"
Name 69 "Block"
MemberName 69(Block) 0 "y"
MemberName 69(Block) 1 "x"
Name 71 "block"
Name 80 "tempArg"
Name 85 "Block16"
MemberName 85(Block16) 0 "y"
MemberName 85(Block16) 1 "x"
MemberName 85(Block16) 2 "b"
Name 88 "Block"
MemberName 88(Block) 0 "y"
MemberName 88(Block) 1 "x"
Name 90 "block16"
Name 97 "tempArg"
Name 110 "D"
Name 114 "A"
Name 118 "B"
Name 120 "C"
Name 124 "l"
Name 128 "Y"
Name 129 "Z"
Name 132 "F"
Name 137 "a"
Name 141 "md1"
Name 152 "mC2"
Name 157 "tempArg"
Name 163 "tempArg"
Name 169 "p1"
Name 170 "param"
Name 173 "p2"
Name 174 "param"
Name 188 "tempArg"
Name 193 "shmatrix"
Name 197 "ms"
Name 204 "ms8A"
Name 208 "ms8B"
Name 212 "ms8C"
Name 227 "m16"
Name 233 "mC"
Name 234 "F"
Name 239 "S"
MemberName 239(S) 0 "a"
MemberName 239(S) 1 "b"
MemberName 239(S) 2 "c"
Name 244 "SC"
Name 249 "scm"
Decorate 67 ArrayStride 4
Decorate 68 ArrayStride 4
MemberDecorate 69(Block) 0 Offset 0
MemberDecorate 69(Block) 1 Offset 4194304
Decorate 69(Block) Block
Decorate 71(block) DescriptorSet 0
Decorate 71(block) Binding 0
Decorate 81 ArrayStride 2
Decorate 83 ArrayStride 2
MemberDecorate 85(Block16) 0 Offset 0
MemberDecorate 85(Block16) 1 Offset 2097152
MemberDecorate 85(Block16) 2 Offset 2097160
Decorate 85(Block16) Block
Decorate 86 ArrayStride 4
Decorate 87 ArrayStride 4
MemberDecorate 88(Block) 0 Offset 0
MemberDecorate 88(Block) 1 Offset 4194304
Decorate 88(Block) Block
Decorate 90(block16) DescriptorSet 0
Decorate 90(block16) Binding 0
Decorate 128(Y) SpecId 0
Decorate 232 BuiltIn WorkgroupSize
Decorate 234(F) SpecId 1
Decorate 244(SC) SpecId 2
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 16
7: TypeInt 32 0
8: 7(int) Constant 3
9: 7(int) Constant 8
10: 7(int) Constant 2
11: TypeCooperativeMatrixKHR 6(float16_t) 8 9 9 10
12: TypePointer Function 11
13: TypeFunction 11 12(ptr)
17: TypeFloat 32
18: TypeCooperativeMatrixKHR 17(float) 8 9 9 10
19: TypePointer Function 18
20: TypeFunction 18 19(ptr)
32: 7(int) Constant 16
33: TypeCooperativeMatrixKHR 17(float) 8 32 9 10
34: TypePointer Function 33
36: 17(float) Constant 0
37: 33 ConstantComposite 36
46: 17(float) Constant 1073741824
51: TypeCooperativeMatrixKHR 6(float16_t) 8 32 9 10
52: TypePointer Function 51
56: TypePointer Function 17(float)
58: TypeInt 32 1
59: 58(int) Constant 1
62: 58(int) Constant 0
66: 7(int) Constant 1048576
67: TypeArray 17(float) 66
68: TypeRuntimeArray 17(float)
69(Block): TypeStruct 67 68
70: TypePointer StorageBuffer 69(Block)
71(block): 70(ptr) Variable StorageBuffer
72: 7(int) Constant 5
73: TypePointer StorageBuffer 17(float)
75: 7(int) Constant 128
81: TypeArray 6(float16_t) 66
82: 7(int) Constant 1
83: TypeArray 6(float16_t) 82
TypeForwardPointer 84 PhysicalStorageBufferEXT
85(Block16): TypeStruct 81 83 84
86: TypeArray 17(float) 66
87: TypeRuntimeArray 17(float)
88(Block): TypeStruct 86 87
84: TypePointer PhysicalStorageBufferEXT 88(Block)
89: TypePointer StorageBuffer 85(Block16)
90(block16): 89(ptr) Variable StorageBuffer
91: TypePointer StorageBuffer 6(float16_t)
98: 58(int) Constant 2
99: TypePointer StorageBuffer 84(ptr)
102: TypePointer PhysicalStorageBufferEXT 17(float)
111: 7(int) Constant 0
112: TypeCooperativeMatrixKHR 6(float16_t) 8 32 9 111
113: TypePointer Function 112
116: TypeCooperativeMatrixKHR 6(float16_t) 8 9 9 82
117: TypePointer Function 116
123: TypePointer Function 58(int)
127: 58(int) Constant 8
128(Y): 58(int) SpecConstant 2
129(Z): 58(int) SpecConstantOp 132 127 128(Y)
130: TypeCooperativeMatrixKHR 6(float16_t) 8 129(Z) 129(Z) 10
131: TypePointer Function 130
133:6(float16_t) Constant 0
134: 130 ConstantComposite 133
135: TypeArray 33 72
136: TypePointer Function 135
138: 58(int) Constant 3
139: 17(float) Constant 1065353216
145: 58(int) Constant 1234
149: TypeCooperativeMatrixKHR 6(float16_t) 8 129(Z) 9 10
150: TypeArray 149 8
151: TypePointer Private 150
152(mC2): 151(ptr) Variable Private
153: TypePointer Private 149
177: 11 ConstantComposite 133
178: 18 ConstantComposite 36
182:6(float16_t) Constant 16384
185: 17(float) Constant 1082130432
189: TypeVector 7(int) 4
190: 7(int) Constant 32
191: TypeArray 189(ivec4) 190
192: TypePointer Workgroup 191
193(shmatrix): 192(ptr) Variable Workgroup
194: TypePointer Workgroup 189(ivec4)
201: TypeInt 8 1
202: TypeCooperativeMatrixKHR 201(int8_t) 8 9 9 111
203: TypePointer Function 202
206: TypeCooperativeMatrixKHR 201(int8_t) 8 9 9 82
207: TypePointer Function 206
210: TypeCooperativeMatrixKHR 201(int8_t) 8 9 9 10
211: TypePointer Function 210
222: 58(int) Constant 16
224: TypeInt 16 1
225: TypeCooperativeMatrixKHR 224(int16_t) 8 9 9 111
226: TypePointer Function 225
230: TypeVector 7(int) 3
231: 7(int) Constant 64
232: 230(ivec3) ConstantComposite 231 82 82
233(mC): 153(ptr) Variable Private
234(F): 17(float) SpecConstant 1077936128
235: TypeCooperativeMatrixKHR 17(float) 8 129(Z) 9 10
236: 235 ConstantComposite 36
237:6(float16_t) Constant 15360
238: 11 ConstantComposite 237
239(S): TypeStruct 58(int) 58(int) 58(int)
240: 58(int) Constant 12
241: 58(int) Constant 23
242: 58(int) Constant 34
243: 239(S) ConstantComposite 240 241 242
244(SC): 58(int) SpecConstant 1
245: TypeCooperativeMatrixKHR 6(float16_t) 8 244(SC) 244(SC) 10
246: TypeArray 245 244(SC)
247: TypeArray 246 244(SC)
248: TypePointer Private 247
249(scm): 248(ptr) Variable Private
4(main): 2 Function None 3
5: Label
35(m): 34(ptr) Variable Function
53(m2): 52(ptr) Variable Function
57(x): 56(ptr) Variable Function
65(tempArg): 34(ptr) Variable Function
80(tempArg): 52(ptr) Variable Function
97(tempArg): 34(ptr) Variable Function
110(D): 34(ptr) Variable Function
114(A): 113(ptr) Variable Function
118(B): 117(ptr) Variable Function
120(C): 34(ptr) Variable Function
124(l): 123(ptr) Variable Function
132(F): 131(ptr) Variable Function
137(a): 136(ptr) Variable Function
141(md1): 56(ptr) Variable Function
157(tempArg): 34(ptr) Variable Function
163(tempArg): 52(ptr) Variable Function
169(p1): 12(ptr) Variable Function
170(param): 12(ptr) Variable Function
173(p2): 19(ptr) Variable Function
174(param): 19(ptr) Variable Function
188(tempArg): 52(ptr) Variable Function
197(ms): 52(ptr) Variable Function
204(ms8A): 203(ptr) Variable Function
208(ms8B): 207(ptr) Variable Function
212(ms8C): 211(ptr) Variable Function
227(m16): 226(ptr) Variable Function
Store 35(m) 37
38: 33 Load 35(m)
39: 33 Load 35(m)
40: 33 FAdd 38 39
Store 35(m) 40
41: 33 Load 35(m)
42: 33 Load 35(m)
43: 33 FSub 41 42
Store 35(m) 43
44: 33 Load 35(m)
45: 33 FNegate 44
Store 35(m) 45
47: 33 Load 35(m)
48: 33 MatrixTimesScalar 47 46
Store 35(m) 48
49: 33 Load 35(m)
50: 33 MatrixTimesScalar 49 46
Store 35(m) 50
54: 33 Load 35(m)
55: 51 FConvert 54
Store 53(m2) 55
60: 56(ptr) AccessChain 35(m) 59
61: 17(float) Load 60
Store 57(x) 61
63: 17(float) Load 57(x)
64: 56(ptr) AccessChain 35(m) 62
Store 64 63
74: 73(ptr) AccessChain 71(block) 59 32
76: 33 CooperativeMatrixLoadKHR 74 62 75 MakePointerVisibleKHR NonPrivatePointerKHR 72
Store 65(tempArg) 76
77: 33 Load 65(tempArg)
Store 35(m) 77
78: 33 Load 35(m)
79: 73(ptr) AccessChain 71(block) 59 32
CooperativeMatrixStoreKHR 79 78 62 75 MakePointerAvailableKHR NonPrivatePointerKHR 72
92: 91(ptr) AccessChain 90(block16) 59 32
93: 51 CooperativeMatrixLoadKHR 92 62 75 MakePointerVisibleKHR NonPrivatePointerKHR 72
Store 80(tempArg) 93
94: 51 Load 80(tempArg)
Store 53(m2) 94
95: 51 Load 53(m2)
96: 91(ptr) AccessChain 90(block16) 59 32
CooperativeMatrixStoreKHR 96 95 62 75 MakePointerAvailableKHR NonPrivatePointerKHR 72
100: 99(ptr) AccessChain 90(block16) 98
101: 84(ptr) Load 100 MakePointerVisibleKHR NonPrivatePointerKHR 72
103: 102(ptr) AccessChain 101 59 32
104: 33 CooperativeMatrixLoadKHR 103 62 75 Aligned MakePointerVisibleKHR NonPrivatePointerKHR 16 72
Store 97(tempArg) 104
105: 33 Load 97(tempArg)
Store 35(m) 105
106: 33 Load 35(m)
107: 99(ptr) AccessChain 90(block16) 98
108: 84(ptr) Load 107 MakePointerVisibleKHR NonPrivatePointerKHR 72
109: 102(ptr) AccessChain 108 59 32
CooperativeMatrixStoreKHR 109 106 62 75 Aligned MakePointerAvailableKHR NonPrivatePointerKHR 16 72
115: 112 Load 114(A)
119: 116 Load 118(B)
121: 33 Load 120(C)
122: 33 CooperativeMatrixMulAddKHR 115 119 121
Store 110(D) 122
125: 7(int) CooperativeMatrixLengthKHR 33
126: 58(int) Bitcast 125
Store 124(l) 126
Store 132(F) 134
140: 56(ptr) AccessChain 137(a) 138 62
Store 140 139
Store 141(md1) 36
142: 33 Load 35(m)
143: 33 Load 35(m)
144: 33 FAdd 143 142
Store 35(m) 144
146: 17(float) CompositeExtract 144 1234
147: 17(float) Load 141(md1)
148: 17(float) FAdd 147 146
Store 141(md1) 148
154: 153(ptr) AccessChain 152(mC2) 98
155: 149 Load 154
156: 153(ptr) AccessChain 152(mC2) 59
Store 156 155
158: 73(ptr) AccessChain 71(block) 62 32
159: 33 CooperativeMatrixLoadKHR 158 62 75 MakePointerVisibleKHR NonPrivatePointerKHR 72
Store 157(tempArg) 159
160: 33 Load 157(tempArg)
Store 35(m) 160
161: 33 Load 35(m)
162: 73(ptr) AccessChain 71(block) 62 32
CooperativeMatrixStoreKHR 162 161 62 75 MakePointerAvailableKHR NonPrivatePointerKHR 72
164: 91(ptr) AccessChain 90(block16) 62 32
165: 51 CooperativeMatrixLoadKHR 164 62 75 MakePointerVisibleKHR NonPrivatePointerKHR 72
Store 163(tempArg) 165
166: 51 Load 163(tempArg)
Store 53(m2) 166
167: 51 Load 53(m2)
168: 91(ptr) AccessChain 90(block16) 62 32
CooperativeMatrixStoreKHR 168 167 62 75 MakePointerAvailableKHR NonPrivatePointerKHR 72
171: 11 Load 169(p1)
Store 170(param) 171
172: 11 FunctionCall 15(f16(f161;) 170(param)
Store 169(p1) 172
175: 18 Load 173(p2)
Store 174(param) 175
176: 18 FunctionCall 22(f32(f1;) 174(param)
Store 173(p2) 176
Store 169(p1) 177
Store 173(p2) 178
179: 11 Load 169(p1)
180: 11 Load 169(p1)
181: 11 FDiv 180 179
Store 169(p1) 181
183: 11 Load 169(p1)
184: 11 MatrixTimesScalar 183 182
Store 169(p1) 184
186: 18 Load 173(p2)
187: 18 MatrixTimesScalar 186 185
Store 173(p2) 187
195: 194(ptr) AccessChain 193(shmatrix) 82
196: 51 CooperativeMatrixLoadKHR 195 62 10 MakePointerVisibleKHR NonPrivatePointerKHR 10
Store 188(tempArg) 196
198: 51 Load 188(tempArg)
Store 197(ms) 198
199: 51 Load 197(ms)
200: 194(ptr) AccessChain 193(shmatrix) 82
CooperativeMatrixStoreKHR 200 199 62 10 MakePointerAvailableKHR NonPrivatePointerKHR 10
205: 202 Load 204(ms8A)
209: 206 Load 208(ms8B)
213: 210 Load 212(ms8C)
214: 210 CooperativeMatrixMulAddKHR 205 209 213 ASignedComponents BSignedComponents CSignedComponents ResultSignedComponents
215: 202 Load 204(ms8A)
216: 206 Load 208(ms8B)
217: 210 Load 212(ms8C)
218: 210 CooperativeMatrixMulAddKHR 215 216 217 ASignedComponents BSignedComponents CSignedComponents ResultSignedComponents
219: 202 Load 204(ms8A)
220: 206 Load 208(ms8B)
221: 210 Load 212(ms8C)
223: 210 CooperativeMatrixMulAddKHR 219 220 221 ASignedComponents BSignedComponents CSignedComponents ResultSignedComponents SaturatingAccumulation
228: 225 Load 227(m16)
229: 194(ptr) AccessChain 193(shmatrix) 82
CooperativeMatrixStoreKHR 229 228 62 10 MakePointerAvailableKHR NonPrivatePointerKHR 10
Return
FunctionEnd
15(f16(f161;): 11 Function None 13
14(m): 12(ptr) FunctionParameter
16: Label
24: 11 Load 14(m)
25: 11 FNegate 24
ReturnValue 25
FunctionEnd
22(f32(f1;): 18 Function None 20
21(m): 19(ptr) FunctionParameter
23: Label
28: 18 Load 21(m)
29: 18 FNegate 28
ReturnValue 29
FunctionEnd

View File

@ -0,0 +1,38 @@
spv.coopmatKHR_Error.comp
ERROR: 0:8: 'ftemplate16' : unexpected type parameters
ERROR: 0:10: '' : coopmat missing type parameters
ERROR: 0:10: 'fnoparams' : unexpected number type parameters
ERROR: 0:17: 'void' : coopmat invalid basic type
ERROR: 0:17: 'fbadtype' : expected 8, 16, 32, or 64 bit signed or unsigned integer or 16, 32, or 64 bit float type
ERROR: 0:17: 'fbadtype' : illegal use of type 'void'
ERROR: 0:18: '' : type parameter must be a constant integer expression
ERROR: 0:18: 'void' : coopmat invalid basic type
ERROR: 0:18: '' : coopmat incorrect number of type parameters
ERROR: 0:18: 'fbadtype2' : unexpected number type parameters
ERROR: 0:18: 'fbadtype2' : expected 8, 16, 32, or 64 bit signed or unsigned integer or 16, 32, or 64 bit float type
ERROR: 0:18: 'fbadtype2' : illegal use of type 'void'
ERROR: 0:19: 'void' : coopmat invalid basic type
ERROR: 0:19: '' : coopmat incorrect number of type parameters
ERROR: 0:19: 'fbadtype3' : unexpected number type parameters
ERROR: 0:19: 'fbadtype3' : expected 8, 16, 32, or 64 bit signed or unsigned integer or 16, 32, or 64 bit float type
ERROR: 0:19: 'fbadtype3' : illegal use of type 'void'
ERROR: 0:21: '' : coopmat incorrect number of type parameters
ERROR: 0:25: '' : type parameter must be a constant integer expression
ERROR: 0:29: '' : coopmat incorrect number of type parameters
ERROR: 0:29: 'Cooperative matrix types must not be used in shared memory' : qualifier
ERROR: 0:32: 'bufmat' : member of block cannot be or contain a cooperative matrix type
ERROR: 0:41: 'assign' : cannot convert from ' temp coopmat<3, 16, 8, 0> float16_t' to ' temp coopmat<3, 16, 8, 0> float'
ERROR: 0:42: 'assign' : cannot convert from ' temp coopmat<3, 16, 8, 0> float16_t' to ' temp coopmat<3, 16, 8, 0> float'
ERROR: 0:47: 'assign' : cannot convert from ' temp coopmat<3, 8, 8, 0> float16_t' to ' temp coopmat<3, 16, 8, 0> float16_t'
ERROR: 0:53: 'assign' : cannot convert from ' temp coopmat<3, 8, 1, 0> float16_t' to ' temp coopmat<3, 8, 1, 0> float16_t'
ERROR: 0:56: 'constructor' : too many arguments
ERROR: 0:56: 'assign' : cannot convert from ' const float' to ' temp coopmat<3, 8, 8, 0> float16_t'
ERROR: 0:60: 'constructor' : Cooperative matrix constructor argument must be scalar or cooperative matrix
ERROR: 0:60: '=' : cannot convert from ' const float' to ' temp coopmat<3, 4, 4, 0> float'
ERROR: 0:63: 'expression' : left of '[' is not of type array, matrix, or vector
ERROR: 0:66: '.' : cannot apply to a cooperative matrix type: x
ERROR: 0:68: 'transpose' : no matching overloaded function found
ERROR: 33 compilation errors. No code generated.
SPIR-V is not generated for failed compile or link

View File

@ -0,0 +1,248 @@
spv.coopmatKHR_arithmetic.comp
// Module Version 10000
// Generated by (magic number): 8000b
// Id's are bound by 196
Capability Shader
Capability Float16
Capability Int8
Capability VulkanMemoryModelKHR
Capability CooperativeMatrixKHR
Extension "SPV_KHR_cooperative_matrix"
Extension "SPV_KHR_vulkan_memory_model"
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical VulkanKHR
EntryPoint GLCompute 4 "main"
ExecutionMode 4 LocalSize 64 1 1
Source GLSL 450
SourceExtension "GL_EXT_shader_explicit_arithmetic_types"
SourceExtension "GL_KHR_cooperative_matrix"
SourceExtension "GL_KHR_memory_scope_semantics"
Name 4 "main"
Name 13 "f"
Name 48 "f16"
Name 82 "u32"
Name 117 "u8"
Name 152 "i8"
Decorate 195 BuiltIn WorkgroupSize
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
7: TypeInt 32 0
8: 7(int) Constant 3
9: 7(int) Constant 8
10: 7(int) Constant 0
11: TypeCooperativeMatrixKHR 6(float) 8 9 9 10
12: TypePointer Function 11
39: 6(float) Constant 1073741824
45: TypeFloat 16
46: TypeCooperativeMatrixKHR 45(float16_t) 8 9 9 10
47: TypePointer Function 46
74:45(float16_t) Constant 16384
80: TypeCooperativeMatrixKHR 7(int) 8 9 9 10
81: TypePointer Function 80
108: 7(int) Constant 2
114: TypeInt 8 0
115: TypeCooperativeMatrixKHR 114(int8_t) 8 9 9 10
116: TypePointer Function 115
143: 114(int8_t) Constant 2
149: TypeInt 8 1
150: TypeCooperativeMatrixKHR 149(int8_t) 8 9 9 10
151: TypePointer Function 150
178: 149(int8_t) Constant 2
192: TypeVector 7(int) 3
193: 7(int) Constant 64
194: 7(int) Constant 1
195: 192(ivec3) ConstantComposite 193 194 194
4(main): 2 Function None 3
5: Label
13(f): 12(ptr) Variable Function
48(f16): 47(ptr) Variable Function
82(u32): 81(ptr) Variable Function
117(u8): 116(ptr) Variable Function
152(i8): 151(ptr) Variable Function
14: 11 Load 13(f)
15: 11 Load 13(f)
16: 11 FAdd 14 15
17: 11 Load 13(f)
18: 11 Load 13(f)
19: 11 FSub 17 18
20: 11 Load 13(f)
21: 11 Load 13(f)
22: 11 FMul 20 21
23: 11 Load 13(f)
24: 11 Load 13(f)
25: 11 FDiv 23 24
26: 11 Load 13(f)
27: 11 Load 13(f)
28: 11 FAdd 27 26
Store 13(f) 28
29: 11 Load 13(f)
30: 11 Load 13(f)
31: 11 FSub 30 29
Store 13(f) 31
32: 11 Load 13(f)
33: 11 Load 13(f)
34: 11 FMul 33 32
Store 13(f) 34
35: 11 Load 13(f)
36: 11 Load 13(f)
37: 11 FDiv 36 35
Store 13(f) 37
38: 11 Load 13(f)
40: 11 MatrixTimesScalar 38 39
41: 11 Load 13(f)
42: 11 MatrixTimesScalar 41 39
43: 11 Load 13(f)
44: 11 MatrixTimesScalar 43 39
Store 13(f) 44
49: 46 Load 48(f16)
50: 46 Load 48(f16)
51: 46 FAdd 49 50
52: 46 Load 48(f16)
53: 46 Load 48(f16)
54: 46 FSub 52 53
55: 46 Load 48(f16)
56: 46 Load 48(f16)
57: 46 FMul 55 56
58: 46 Load 48(f16)
59: 46 Load 48(f16)
60: 46 FDiv 58 59
61: 46 Load 48(f16)
62: 46 Load 48(f16)
63: 46 FAdd 62 61
Store 48(f16) 63
64: 46 Load 48(f16)
65: 46 Load 48(f16)
66: 46 FSub 65 64
Store 48(f16) 66
67: 46 Load 48(f16)
68: 46 Load 48(f16)
69: 46 FMul 68 67
Store 48(f16) 69
70: 46 Load 48(f16)
71: 46 Load 48(f16)
72: 46 FDiv 71 70
Store 48(f16) 72
73: 46 Load 48(f16)
75: 46 MatrixTimesScalar 73 74
76: 46 Load 48(f16)
77: 46 MatrixTimesScalar 76 74
78: 46 Load 48(f16)
79: 46 MatrixTimesScalar 78 74
Store 48(f16) 79
83: 80 Load 82(u32)
84: 80 Load 82(u32)
85: 80 IAdd 83 84
86: 80 Load 82(u32)
87: 80 Load 82(u32)
88: 80 ISub 86 87
89: 80 Load 82(u32)
90: 80 Load 82(u32)
91: 80 IMul 89 90
92: 80 Load 82(u32)
93: 80 Load 82(u32)
94: 80 UDiv 92 93
95: 80 Load 82(u32)
96: 80 Load 82(u32)
97: 80 IAdd 96 95
Store 82(u32) 97
98: 80 Load 82(u32)
99: 80 Load 82(u32)
100: 80 ISub 99 98
Store 82(u32) 100
101: 80 Load 82(u32)
102: 80 Load 82(u32)
103: 80 IMul 102 101
Store 82(u32) 103
104: 80 Load 82(u32)
105: 80 Load 82(u32)
106: 80 UDiv 105 104
Store 82(u32) 106
107: 80 Load 82(u32)
109: 80 MatrixTimesScalar 107 108
110: 80 Load 82(u32)
111: 80 MatrixTimesScalar 110 108
112: 80 Load 82(u32)
113: 80 MatrixTimesScalar 112 108
Store 82(u32) 113
118: 115 Load 117(u8)
119: 115 Load 117(u8)
120: 115 IAdd 118 119
121: 115 Load 117(u8)
122: 115 Load 117(u8)
123: 115 ISub 121 122
124: 115 Load 117(u8)
125: 115 Load 117(u8)
126: 115 IMul 124 125
127: 115 Load 117(u8)
128: 115 Load 117(u8)
129: 115 UDiv 127 128
130: 115 Load 117(u8)
131: 115 Load 117(u8)
132: 115 IAdd 131 130
Store 117(u8) 132
133: 115 Load 117(u8)
134: 115 Load 117(u8)
135: 115 ISub 134 133
Store 117(u8) 135
136: 115 Load 117(u8)
137: 115 Load 117(u8)
138: 115 IMul 137 136
Store 117(u8) 138
139: 115 Load 117(u8)
140: 115 Load 117(u8)
141: 115 UDiv 140 139
Store 117(u8) 141
142: 115 Load 117(u8)
144: 115 MatrixTimesScalar 142 143
145: 115 Load 117(u8)
146: 115 MatrixTimesScalar 145 143
147: 115 Load 117(u8)
148: 115 MatrixTimesScalar 147 143
Store 117(u8) 148
153: 150 Load 152(i8)
154: 150 Load 152(i8)
155: 150 IAdd 153 154
156: 150 Load 152(i8)
157: 150 Load 152(i8)
158: 150 ISub 156 157
159: 150 Load 152(i8)
160: 150 Load 152(i8)
161: 150 IMul 159 160
162: 150 Load 152(i8)
163: 150 Load 152(i8)
164: 150 SDiv 162 163
165: 150 Load 152(i8)
166: 150 Load 152(i8)
167: 150 IAdd 166 165
Store 152(i8) 167
168: 150 Load 152(i8)
169: 150 Load 152(i8)
170: 150 ISub 169 168
Store 152(i8) 170
171: 150 Load 152(i8)
172: 150 Load 152(i8)
173: 150 IMul 172 171
Store 152(i8) 173
174: 150 Load 152(i8)
175: 150 Load 152(i8)
176: 150 SDiv 175 174
Store 152(i8) 176
177: 150 Load 152(i8)
179: 150 MatrixTimesScalar 177 178
180: 150 Load 152(i8)
181: 150 MatrixTimesScalar 180 178
182: 150 Load 152(i8)
183: 150 MatrixTimesScalar 182 178
Store 152(i8) 183
184: 11 Load 13(f)
185: 11 FNegate 184
186: 46 Load 48(f16)
187: 46 FNegate 186
188: 150 Load 152(i8)
189: 150 SNegate 188
190: 115 Load 117(u8)
191: 115 SNegate 190
Return
FunctionEnd

View File

@ -0,0 +1,64 @@
spv.coopmatKHR_arithmeticError.comp
ERROR: 0:21: '+' : wrong operand types: no operation '+' exists that takes a left-hand operand of type ' temp coopmat<3, 8, 8, 0> float' and a right operand of type ' const float' (or there is no acceptable conversion)
ERROR: 0:22: '-' : wrong operand types: no operation '-' exists that takes a left-hand operand of type ' temp coopmat<3, 8, 8, 0> float' and a right operand of type ' const float' (or there is no acceptable conversion)
ERROR: 0:23: '/' : wrong operand types: no operation '/' exists that takes a left-hand operand of type ' temp coopmat<3, 8, 8, 0> float' and a right operand of type ' const float' (or there is no acceptable conversion)
ERROR: 0:24: '+' : wrong operand types: no operation '+' exists that takes a left-hand operand of type ' const float' and a right operand of type ' temp coopmat<3, 8, 8, 0> float' (or there is no acceptable conversion)
ERROR: 0:25: '-' : wrong operand types: no operation '-' exists that takes a left-hand operand of type ' const float' and a right operand of type ' temp coopmat<3, 8, 8, 0> float' (or there is no acceptable conversion)
ERROR: 0:26: '/' : wrong operand types: no operation '/' exists that takes a left-hand operand of type ' const float' and a right operand of type ' temp coopmat<3, 8, 8, 0> float' (or there is no acceptable conversion)
ERROR: 0:27: 'assign' : cannot convert from ' const float' to ' temp coopmat<3, 8, 8, 0> float'
ERROR: 0:28: 'assign' : cannot convert from ' const float' to ' temp coopmat<3, 8, 8, 0> float'
ERROR: 0:29: 'assign' : cannot convert from ' const float' to ' temp coopmat<3, 8, 8, 0> float'
ERROR: 0:31: '+' : wrong operand types: no operation '+' exists that takes a left-hand operand of type ' temp coopmat<3, 8, 8, 0> float' and a right operand of type ' temp coopmat<3, 8, 8, 0> float16_t' (or there is no acceptable conversion)
ERROR: 0:32: '-' : wrong operand types: no operation '-' exists that takes a left-hand operand of type ' temp coopmat<3, 8, 8, 0> float' and a right operand of type ' temp coopmat<3, 8, 8, 0> float16_t' (or there is no acceptable conversion)
ERROR: 0:33: '*' : wrong operand types: no operation '*' exists that takes a left-hand operand of type ' temp coopmat<3, 8, 8, 0> float' and a right operand of type ' temp coopmat<3, 8, 8, 0> float16_t' (or there is no acceptable conversion)
ERROR: 0:34: '/' : wrong operand types: no operation '/' exists that takes a left-hand operand of type ' temp coopmat<3, 8, 8, 0> float' and a right operand of type ' temp coopmat<3, 8, 8, 0> float16_t' (or there is no acceptable conversion)
ERROR: 0:35: 'assign' : cannot convert from ' temp coopmat<3, 8, 8, 0> float16_t' to ' temp coopmat<3, 8, 8, 0> float'
ERROR: 0:36: 'assign' : cannot convert from ' temp coopmat<3, 8, 8, 0> float16_t' to ' temp coopmat<3, 8, 8, 0> float'
ERROR: 0:37: 'assign' : cannot convert from ' temp coopmat<3, 8, 8, 0> float16_t' to ' temp coopmat<3, 8, 8, 0> float'
ERROR: 0:38: 'assign' : cannot convert from ' temp coopmat<3, 8, 8, 0> float16_t' to ' temp coopmat<3, 8, 8, 0> float'
ERROR: 0:40: '+' : wrong operand types: no operation '+' exists that takes a left-hand operand of type ' temp coopmat<3, 8, 8, 0> float' and a right operand of type ' temp coopmat<3, 8, 8, 1> float' (or there is no acceptable conversion)
ERROR: 0:41: '-' : wrong operand types: no operation '-' exists that takes a left-hand operand of type ' temp coopmat<3, 8, 8, 0> float' and a right operand of type ' temp coopmat<3, 8, 8, 1> float' (or there is no acceptable conversion)
ERROR: 0:42: '*' : wrong operand types: no operation '*' exists that takes a left-hand operand of type ' temp coopmat<3, 8, 8, 0> float' and a right operand of type ' temp coopmat<3, 8, 8, 1> float' (or there is no acceptable conversion)
ERROR: 0:43: '/' : wrong operand types: no operation '/' exists that takes a left-hand operand of type ' temp coopmat<3, 8, 8, 0> float' and a right operand of type ' temp coopmat<3, 8, 8, 1> float' (or there is no acceptable conversion)
ERROR: 0:44: 'assign' : cannot convert from ' temp coopmat<3, 8, 8, 1> float' to ' temp coopmat<3, 8, 8, 0> float'
ERROR: 0:45: 'assign' : cannot convert from ' temp coopmat<3, 8, 8, 1> float' to ' temp coopmat<3, 8, 8, 0> float'
ERROR: 0:46: 'assign' : cannot convert from ' temp coopmat<3, 8, 8, 1> float' to ' temp coopmat<3, 8, 8, 0> float'
ERROR: 0:47: 'assign' : cannot convert from ' temp coopmat<3, 8, 8, 1> float' to ' temp coopmat<3, 8, 8, 0> float'
ERROR: 0:49: '+' : wrong operand types: no operation '+' exists that takes a left-hand operand of type ' temp coopmat<3, 8, 8, 0> float' and a right operand of type ' temp coopmat<3, 16, 8, 0> float' (or there is no acceptable conversion)
ERROR: 0:50: '-' : wrong operand types: no operation '-' exists that takes a left-hand operand of type ' temp coopmat<3, 8, 8, 0> float' and a right operand of type ' temp coopmat<3, 16, 8, 0> float' (or there is no acceptable conversion)
ERROR: 0:51: '*' : wrong operand types: no operation '*' exists that takes a left-hand operand of type ' temp coopmat<3, 8, 8, 0> float' and a right operand of type ' temp coopmat<3, 16, 8, 0> float' (or there is no acceptable conversion)
ERROR: 0:52: '/' : wrong operand types: no operation '/' exists that takes a left-hand operand of type ' temp coopmat<3, 8, 8, 0> float' and a right operand of type ' temp coopmat<3, 16, 8, 0> float' (or there is no acceptable conversion)
ERROR: 0:53: 'assign' : cannot convert from ' temp coopmat<3, 16, 8, 0> float' to ' temp coopmat<3, 8, 8, 0> float'
ERROR: 0:54: 'assign' : cannot convert from ' temp coopmat<3, 16, 8, 0> float' to ' temp coopmat<3, 8, 8, 0> float'
ERROR: 0:55: 'assign' : cannot convert from ' temp coopmat<3, 16, 8, 0> float' to ' temp coopmat<3, 8, 8, 0> float'
ERROR: 0:56: 'assign' : cannot convert from ' temp coopmat<3, 16, 8, 0> float' to ' temp coopmat<3, 8, 8, 0> float'
ERROR: 0:58: '+' : wrong operand types: no operation '+' exists that takes a left-hand operand of type ' temp coopmat<3, 8, 8, 0> uint8_t' and a right operand of type ' temp coopmat<3, 8, 8, 0> int8_t' (or there is no acceptable conversion)
ERROR: 0:59: '-' : wrong operand types: no operation '-' exists that takes a left-hand operand of type ' temp coopmat<3, 8, 8, 0> uint8_t' and a right operand of type ' temp coopmat<3, 8, 8, 0> int8_t' (or there is no acceptable conversion)
ERROR: 0:60: '*' : wrong operand types: no operation '*' exists that takes a left-hand operand of type ' temp coopmat<3, 8, 8, 0> uint8_t' and a right operand of type ' temp coopmat<3, 8, 8, 0> int8_t' (or there is no acceptable conversion)
ERROR: 0:61: '/' : wrong operand types: no operation '/' exists that takes a left-hand operand of type ' temp coopmat<3, 8, 8, 0> uint8_t' and a right operand of type ' temp coopmat<3, 8, 8, 0> int8_t' (or there is no acceptable conversion)
ERROR: 0:62: 'assign' : cannot convert from ' temp coopmat<3, 8, 8, 0> int8_t' to ' temp coopmat<3, 8, 8, 0> uint8_t'
ERROR: 0:63: 'assign' : cannot convert from ' temp coopmat<3, 8, 8, 0> int8_t' to ' temp coopmat<3, 8, 8, 0> uint8_t'
ERROR: 0:64: 'assign' : cannot convert from ' temp coopmat<3, 8, 8, 0> int8_t' to ' temp coopmat<3, 8, 8, 0> uint8_t'
ERROR: 0:65: 'assign' : cannot convert from ' temp coopmat<3, 8, 8, 0> int8_t' to ' temp coopmat<3, 8, 8, 0> uint8_t'
ERROR: 0:67: '+' : wrong operand types: no operation '+' exists that takes a left-hand operand of type ' temp coopmat<3, 8, 8, 0> uint8_t' and a right operand of type ' const uint8_t' (or there is no acceptable conversion)
ERROR: 0:68: '-' : wrong operand types: no operation '-' exists that takes a left-hand operand of type ' temp coopmat<3, 8, 8, 0> uint8_t' and a right operand of type ' const uint8_t' (or there is no acceptable conversion)
ERROR: 0:69: '/' : wrong operand types: no operation '/' exists that takes a left-hand operand of type ' temp coopmat<3, 8, 8, 0> uint8_t' and a right operand of type ' const uint8_t' (or there is no acceptable conversion)
ERROR: 0:70: 'assign' : cannot convert from ' const uint8_t' to ' temp coopmat<3, 8, 8, 0> uint8_t'
ERROR: 0:71: 'assign' : cannot convert from ' const uint8_t' to ' temp coopmat<3, 8, 8, 0> uint8_t'
ERROR: 0:72: 'assign' : cannot convert from ' const uint8_t' to ' temp coopmat<3, 8, 8, 0> uint8_t'
ERROR: 0:74: '+' : wrong operand types: no operation '+' exists that takes a left-hand operand of type ' temp coopmat<3, 8, 8, 0> int8_t' and a right operand of type ' const int8_t' (or there is no acceptable conversion)
ERROR: 0:75: '-' : wrong operand types: no operation '-' exists that takes a left-hand operand of type ' temp coopmat<3, 8, 8, 0> int8_t' and a right operand of type ' const int8_t' (or there is no acceptable conversion)
ERROR: 0:76: '/' : wrong operand types: no operation '/' exists that takes a left-hand operand of type ' temp coopmat<3, 8, 8, 0> int8_t' and a right operand of type ' const int8_t' (or there is no acceptable conversion)
ERROR: 0:77: 'assign' : cannot convert from ' const int8_t' to ' temp coopmat<3, 8, 8, 0> int8_t'
ERROR: 0:78: 'assign' : cannot convert from ' const int8_t' to ' temp coopmat<3, 8, 8, 0> int8_t'
ERROR: 0:79: 'assign' : cannot convert from ' const int8_t' to ' temp coopmat<3, 8, 8, 0> int8_t'
ERROR: 0:81: '+' : wrong operand types: no operation '+' exists that takes a left-hand operand of type ' temp coopmat<3, 8, 8, 0> int' and a right operand of type ' const int' (or there is no acceptable conversion)
ERROR: 0:82: '-' : wrong operand types: no operation '-' exists that takes a left-hand operand of type ' temp coopmat<3, 8, 8, 0> int' and a right operand of type ' const int' (or there is no acceptable conversion)
ERROR: 0:83: '/' : wrong operand types: no operation '/' exists that takes a left-hand operand of type ' temp coopmat<3, 8, 8, 0> int' and a right operand of type ' const int' (or there is no acceptable conversion)
ERROR: 0:84: 'assign' : cannot convert from ' const int' to ' temp coopmat<3, 8, 8, 0> int'
ERROR: 0:85: 'assign' : cannot convert from ' const int' to ' temp coopmat<3, 8, 8, 0> int'
ERROR: 0:86: 'assign' : cannot convert from ' const int' to ' temp coopmat<3, 8, 8, 0> int'
ERROR: 59 compilation errors. No code generated.
SPIR-V is not generated for failed compile or link

View File

@ -0,0 +1,632 @@
spv.coopmatKHR_constructor.comp
// Module Version 10000
// Generated by (magic number): 8000b
// Id's are bound by 481
Capability Shader
Capability Float16
Capability Int16
Capability Int8
Capability VulkanMemoryModelKHR
Capability CooperativeMatrixKHR
Extension "SPV_KHR_cooperative_matrix"
Extension "SPV_KHR_vulkan_memory_model"
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical VulkanKHR
EntryPoint GLCompute 4 "main"
ExecutionMode 4 LocalSize 64 1 1
Source GLSL 450
SourceExtension "GL_EXT_shader_explicit_arithmetic_types"
SourceExtension "GL_KHR_cooperative_matrix"
SourceExtension "GL_KHR_memory_scope_semantics"
Name 4 "main"
Name 154 "v"
Name 158 "v"
Name 164 "v"
Name 170 "v"
Name 176 "v"
Name 182 "v"
Name 188 "v"
Name 194 "v"
Name 199 "v"
Name 204 "v"
Name 207 "v"
Name 212 "v"
Name 217 "v"
Name 222 "v"
Name 227 "v"
Name 232 "v"
Name 237 "v"
Name 242 "v"
Name 247 "v"
Name 250 "v"
Name 255 "v"
Name 260 "v"
Name 265 "v"
Name 271 "v"
Name 277 "v"
Name 282 "v"
Name 287 "v"
Name 292 "v"
Name 295 "v"
Name 300 "v"
Name 306 "v"
Name 311 "v"
Name 317 "v"
Name 322 "v"
Name 327 "v"
Name 332 "v"
Name 337 "v"
Name 340 "v"
Name 346 "v"
Name 352 "v"
Name 357 "v"
Name 362 "v"
Name 367 "v"
Name 372 "v"
Name 378 "v"
Name 384 "v"
Name 387 "v"
Name 392 "v"
Name 397 "v"
Name 402 "v"
Name 407 "v"
Name 413 "v"
Name 418 "v"
Name 424 "v"
Name 429 "v"
Name 432 "v"
Name 437 "v"
Name 442 "v"
Name 447 "v"
Name 453 "v"
Name 459 "v"
Name 464 "v"
Name 469 "v"
Name 474 "v"
Decorate 480 BuiltIn WorkgroupSize
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
7: TypeInt 32 0
8: 7(int) Constant 3
9: 7(int) Constant 8
10: 7(int) Constant 0
11: TypeCooperativeMatrixKHR 6(float) 8 9 9 10
12: 6(float) Constant 1065353216
13: 11 ConstantComposite 12
14: 6(float) Constant 1073741824
15: 11 ConstantComposite 14
16: 6(float) Constant 1077936128
17: 11 ConstantComposite 16
18: 6(float) Constant 1082130432
19: 11 ConstantComposite 18
20: 6(float) Constant 1084227584
21: 11 ConstantComposite 20
22: 6(float) Constant 1086324736
23: 11 ConstantComposite 22
24: 6(float) Constant 1088421888
25: 11 ConstantComposite 24
26: 6(float) Constant 1090519040
27: 11 ConstantComposite 26
28: TypeFloat 16
29: TypeCooperativeMatrixKHR 28(float16_t) 8 9 9 10
30:28(float16_t) Constant 18816
31: 29 ConstantComposite 30
32:28(float16_t) Constant 18944
33: 29 ConstantComposite 32
34:28(float16_t) Constant 19072
35: 29 ConstantComposite 34
36:28(float16_t) Constant 19200
37: 29 ConstantComposite 36
38:28(float16_t) Constant 19328
39: 29 ConstantComposite 38
40:28(float16_t) Constant 19456
41: 29 ConstantComposite 40
42:28(float16_t) Constant 19520
43: 29 ConstantComposite 42
44:28(float16_t) Constant 19584
45: 29 ConstantComposite 44
46: TypeCooperativeMatrixKHR 7(int) 8 9 9 10
47: 7(int) Constant 21
48: 46 ConstantComposite 47
49: 7(int) Constant 22
50: 46 ConstantComposite 49
51: 7(int) Constant 23
52: 46 ConstantComposite 51
53: 7(int) Constant 24
54: 46 ConstantComposite 53
55: 7(int) Constant 25
56: 46 ConstantComposite 55
57: 7(int) Constant 26
58: 46 ConstantComposite 57
59: 7(int) Constant 27
60: 46 ConstantComposite 59
61: 7(int) Constant 28
62: 46 ConstantComposite 61
63: TypeInt 16 0
64: TypeCooperativeMatrixKHR 63(int16_t) 8 9 9 10
65: 63(int16_t) Constant 31
66: 64 ConstantComposite 65
67: 63(int16_t) Constant 32
68: 64 ConstantComposite 67
69: 63(int16_t) Constant 33
70: 64 ConstantComposite 69
71: 63(int16_t) Constant 34
72: 64 ConstantComposite 71
73: 63(int16_t) Constant 35
74: 64 ConstantComposite 73
75: 63(int16_t) Constant 36
76: 64 ConstantComposite 75
77: 63(int16_t) Constant 37
78: 64 ConstantComposite 77
79: 63(int16_t) Constant 38
80: 64 ConstantComposite 79
81: TypeInt 8 0
82: TypeCooperativeMatrixKHR 81(int8_t) 8 9 9 10
83: 81(int8_t) Constant 41
84: 82 ConstantComposite 83
85: 81(int8_t) Constant 42
86: 82 ConstantComposite 85
87: 81(int8_t) Constant 43
88: 82 ConstantComposite 87
89: 81(int8_t) Constant 44
90: 82 ConstantComposite 89
91: 81(int8_t) Constant 45
92: 82 ConstantComposite 91
93: 81(int8_t) Constant 46
94: 82 ConstantComposite 93
95: 81(int8_t) Constant 47
96: 82 ConstantComposite 95
97: 81(int8_t) Constant 48
98: 82 ConstantComposite 97
99: TypeInt 32 1
100: TypeCooperativeMatrixKHR 99(int) 8 9 9 10
101: 99(int) Constant 51
102: 100 ConstantComposite 101
103: 99(int) Constant 52
104: 100 ConstantComposite 103
105: 99(int) Constant 53
106: 100 ConstantComposite 105
107: 99(int) Constant 54
108: 100 ConstantComposite 107
109: 99(int) Constant 55
110: 100 ConstantComposite 109
111: 99(int) Constant 56
112: 100 ConstantComposite 111
113: 99(int) Constant 57
114: 100 ConstantComposite 113
115: 99(int) Constant 58
116: 100 ConstantComposite 115
117: TypeInt 16 1
118: TypeCooperativeMatrixKHR 117(int16_t) 8 9 9 10
119:117(int16_t) Constant 61
120: 118 ConstantComposite 119
121:117(int16_t) Constant 62
122: 118 ConstantComposite 121
123:117(int16_t) Constant 63
124: 118 ConstantComposite 123
125:117(int16_t) Constant 64
126: 118 ConstantComposite 125
127:117(int16_t) Constant 65
128: 118 ConstantComposite 127
129:117(int16_t) Constant 66
130: 118 ConstantComposite 129
131:117(int16_t) Constant 67
132: 118 ConstantComposite 131
133:117(int16_t) Constant 68
134: 118 ConstantComposite 133
135: TypeInt 8 1
136: TypeCooperativeMatrixKHR 135(int8_t) 8 9 9 10
137: 135(int8_t) Constant 71
138: 136 ConstantComposite 137
139: 135(int8_t) Constant 72
140: 136 ConstantComposite 139
141: 135(int8_t) Constant 73
142: 136 ConstantComposite 141
143: 135(int8_t) Constant 74
144: 136 ConstantComposite 143
145: 135(int8_t) Constant 75
146: 136 ConstantComposite 145
147: 135(int8_t) Constant 76
148: 136 ConstantComposite 147
149: 135(int8_t) Constant 77
150: 136 ConstantComposite 149
151: 135(int8_t) Constant 78
152: 136 ConstantComposite 151
153: TypePointer Function 11
155: 6(float) Constant 1120534528
156: 11 ConstantComposite 155
157: TypePointer Function 29
159:28(float16_t) Constant 22112
160: 29 ConstantComposite 159
163: TypePointer Function 46
165: 7(int) Constant 103
166: 46 ConstantComposite 165
169: TypePointer Function 64
171: 63(int16_t) Constant 104
172: 64 ConstantComposite 171
175: TypePointer Function 82
177: 81(int8_t) Constant 105
178: 82 ConstantComposite 177
181: TypePointer Function 100
183: 99(int) Constant 106
184: 100 ConstantComposite 183
187: TypePointer Function 118
189:117(int16_t) Constant 107
190: 118 ConstantComposite 189
193: TypePointer Function 136
195: 135(int8_t) Constant 108
196: 136 ConstantComposite 195
200: 6(float) Constant 1121845248
201: 11 ConstantComposite 200
205:28(float16_t) Constant 22272
206: 29 ConstantComposite 205
208: 7(int) Constant 113
209: 46 ConstantComposite 208
213: 63(int16_t) Constant 114
214: 64 ConstantComposite 213
218: 81(int8_t) Constant 115
219: 82 ConstantComposite 218
223: 99(int) Constant 116
224: 100 ConstantComposite 223
228:117(int16_t) Constant 117
229: 118 ConstantComposite 228
233: 135(int8_t) Constant 118
234: 136 ConstantComposite 233
238: 6(float) Constant 1123155968
239: 11 ConstantComposite 238
243:28(float16_t) Constant 22432
244: 29 ConstantComposite 243
248: 7(int) Constant 123
249: 46 ConstantComposite 248
251: 63(int16_t) Constant 124
252: 64 ConstantComposite 251
256: 81(int8_t) Constant 125
257: 82 ConstantComposite 256
261: 99(int) Constant 126
262: 100 ConstantComposite 261
266:117(int16_t) Constant 127
267: 118 ConstantComposite 266
272: 135(int8_t) Constant 4294967168
273: 136 ConstantComposite 272
278: 6(float) Constant 1124270080
279: 11 ConstantComposite 278
283:28(float16_t) Constant 22560
284: 29 ConstantComposite 283
288: 7(int) Constant 133
289: 46 ConstantComposite 288
293: 63(int16_t) Constant 134
294: 64 ConstantComposite 293
296: 81(int8_t) Constant 135
297: 82 ConstantComposite 296
301: 99(int) Constant 136
302: 100 ConstantComposite 301
307:117(int16_t) Constant 137
308: 118 ConstantComposite 307
312: 135(int8_t) Constant 4294967178
313: 136 ConstantComposite 312
318: 6(float) Constant 1124925440
319: 11 ConstantComposite 318
323:28(float16_t) Constant 22640
324: 29 ConstantComposite 323
328: 7(int) Constant 143
329: 46 ConstantComposite 328
333: 63(int16_t) Constant 144
334: 64 ConstantComposite 333
338: 81(int8_t) Constant 145
339: 82 ConstantComposite 338
341: 99(int) Constant 146
342: 100 ConstantComposite 341
347:117(int16_t) Constant 147
348: 118 ConstantComposite 347
353: 135(int8_t) Constant 4294967188
354: 136 ConstantComposite 353
358: 6(float) Constant 1125580800
359: 11 ConstantComposite 358
363:28(float16_t) Constant 22720
364: 29 ConstantComposite 363
368: 7(int) Constant 153
369: 46 ConstantComposite 368
373: 63(int16_t) Constant 154
374: 64 ConstantComposite 373
379: 81(int8_t) Constant 155
380: 82 ConstantComposite 379
385: 99(int) Constant 156
386: 100 ConstantComposite 385
388:117(int16_t) Constant 157
389: 118 ConstantComposite 388
393: 135(int8_t) Constant 4294967198
394: 136 ConstantComposite 393
398: 6(float) Constant 1126236160
399: 11 ConstantComposite 398
403:28(float16_t) Constant 22800
404: 29 ConstantComposite 403
408: 7(int) Constant 163
409: 46 ConstantComposite 408
414: 63(int16_t) Constant 164
415: 64 ConstantComposite 414
419: 81(int8_t) Constant 165
420: 82 ConstantComposite 419
425: 99(int) Constant 166
426: 100 ConstantComposite 425
430:117(int16_t) Constant 167
431: 118 ConstantComposite 430
433: 135(int8_t) Constant 4294967208
434: 136 ConstantComposite 433
438: 6(float) Constant 1126891520
439: 11 ConstantComposite 438
443:28(float16_t) Constant 22880
444: 29 ConstantComposite 443
448: 7(int) Constant 173
449: 46 ConstantComposite 448
454: 63(int16_t) Constant 174
455: 64 ConstantComposite 454
460: 81(int8_t) Constant 175
461: 82 ConstantComposite 460
465: 99(int) Constant 176
466: 100 ConstantComposite 465
470:117(int16_t) Constant 177
471: 118 ConstantComposite 470
475: 135(int8_t) Constant 4294967218
476: 136 ConstantComposite 475
477: TypeVector 7(int) 3
478: 7(int) Constant 64
479: 7(int) Constant 1
480: 477(ivec3) ConstantComposite 478 479 479
4(main): 2 Function None 3
5: Label
154(v): 153(ptr) Variable Function
158(v): 157(ptr) Variable Function
164(v): 163(ptr) Variable Function
170(v): 169(ptr) Variable Function
176(v): 175(ptr) Variable Function
182(v): 181(ptr) Variable Function
188(v): 187(ptr) Variable Function
194(v): 193(ptr) Variable Function
199(v): 153(ptr) Variable Function
204(v): 157(ptr) Variable Function
207(v): 163(ptr) Variable Function
212(v): 169(ptr) Variable Function
217(v): 175(ptr) Variable Function
222(v): 181(ptr) Variable Function
227(v): 187(ptr) Variable Function
232(v): 193(ptr) Variable Function
237(v): 153(ptr) Variable Function
242(v): 157(ptr) Variable Function
247(v): 163(ptr) Variable Function
250(v): 169(ptr) Variable Function
255(v): 175(ptr) Variable Function
260(v): 181(ptr) Variable Function
265(v): 187(ptr) Variable Function
271(v): 193(ptr) Variable Function
277(v): 153(ptr) Variable Function
282(v): 157(ptr) Variable Function
287(v): 163(ptr) Variable Function
292(v): 169(ptr) Variable Function
295(v): 175(ptr) Variable Function
300(v): 181(ptr) Variable Function
306(v): 187(ptr) Variable Function
311(v): 193(ptr) Variable Function
317(v): 153(ptr) Variable Function
322(v): 157(ptr) Variable Function
327(v): 163(ptr) Variable Function
332(v): 169(ptr) Variable Function
337(v): 175(ptr) Variable Function
340(v): 181(ptr) Variable Function
346(v): 187(ptr) Variable Function
352(v): 193(ptr) Variable Function
357(v): 153(ptr) Variable Function
362(v): 157(ptr) Variable Function
367(v): 163(ptr) Variable Function
372(v): 169(ptr) Variable Function
378(v): 175(ptr) Variable Function
384(v): 181(ptr) Variable Function
387(v): 187(ptr) Variable Function
392(v): 193(ptr) Variable Function
397(v): 153(ptr) Variable Function
402(v): 157(ptr) Variable Function
407(v): 163(ptr) Variable Function
413(v): 169(ptr) Variable Function
418(v): 175(ptr) Variable Function
424(v): 181(ptr) Variable Function
429(v): 187(ptr) Variable Function
432(v): 193(ptr) Variable Function
437(v): 153(ptr) Variable Function
442(v): 157(ptr) Variable Function
447(v): 163(ptr) Variable Function
453(v): 169(ptr) Variable Function
459(v): 175(ptr) Variable Function
464(v): 181(ptr) Variable Function
469(v): 187(ptr) Variable Function
474(v): 193(ptr) Variable Function
Store 154(v) 156
Store 158(v) 160
161: 29 Load 158(v)
162: 11 FConvert 161
Store 164(v) 166
167: 46 Load 164(v)
168: 11 ConvertUToF 167
Store 170(v) 172
173: 64 Load 170(v)
174: 11 ConvertUToF 173
Store 176(v) 178
179: 82 Load 176(v)
180: 11 ConvertUToF 179
Store 182(v) 184
185: 100 Load 182(v)
186: 11 ConvertSToF 185
Store 188(v) 190
191: 118 Load 188(v)
192: 11 ConvertSToF 191
Store 194(v) 196
197: 136 Load 194(v)
198: 11 ConvertSToF 197
Store 199(v) 201
202: 11 Load 199(v)
203: 29 FConvert 202
Store 204(v) 206
Store 207(v) 209
210: 46 Load 207(v)
211: 29 ConvertUToF 210
Store 212(v) 214
215: 64 Load 212(v)
216: 29 ConvertUToF 215
Store 217(v) 219
220: 82 Load 217(v)
221: 29 ConvertUToF 220
Store 222(v) 224
225: 100 Load 222(v)
226: 29 ConvertSToF 225
Store 227(v) 229
230: 118 Load 227(v)
231: 29 ConvertSToF 230
Store 232(v) 234
235: 136 Load 232(v)
236: 29 ConvertSToF 235
Store 237(v) 239
240: 11 Load 237(v)
241: 46 ConvertFToU 240
Store 242(v) 244
245: 29 Load 242(v)
246: 46 ConvertFToU 245
Store 247(v) 249
Store 250(v) 252
253: 64 Load 250(v)
254: 46 UConvert 253
Store 255(v) 257
258: 82 Load 255(v)
259: 46 UConvert 258
Store 260(v) 262
263: 100 Load 260(v)
264: 46 Bitcast 263
Store 265(v) 267
268: 118 Load 265(v)
269: 100 SConvert 268
270: 46 Bitcast 269
Store 271(v) 273
274: 136 Load 271(v)
275: 100 SConvert 274
276: 46 Bitcast 275
Store 277(v) 279
280: 11 Load 277(v)
281: 64 ConvertFToU 280
Store 282(v) 284
285: 29 Load 282(v)
286: 64 ConvertFToU 285
Store 287(v) 289
290: 46 Load 287(v)
291: 64 UConvert 290
Store 292(v) 294
Store 295(v) 297
298: 82 Load 295(v)
299: 64 UConvert 298
Store 300(v) 302
303: 100 Load 300(v)
304: 118 SConvert 303
305: 64 Bitcast 304
Store 306(v) 308
309: 118 Load 306(v)
310: 64 Bitcast 309
Store 311(v) 313
314: 136 Load 311(v)
315: 118 SConvert 314
316: 64 Bitcast 315
Store 317(v) 319
320: 11 Load 317(v)
321: 82 ConvertFToU 320
Store 322(v) 324
325: 29 Load 322(v)
326: 82 ConvertFToU 325
Store 327(v) 329
330: 46 Load 327(v)
331: 82 UConvert 330
Store 332(v) 334
335: 64 Load 332(v)
336: 82 UConvert 335
Store 337(v) 339
Store 340(v) 342
343: 100 Load 340(v)
344: 136 SConvert 343
345: 82 Bitcast 344
Store 346(v) 348
349: 118 Load 346(v)
350: 136 SConvert 349
351: 82 Bitcast 350
Store 352(v) 354
355: 136 Load 352(v)
356: 82 Bitcast 355
Store 357(v) 359
360: 11 Load 357(v)
361: 100 ConvertFToS 360
Store 362(v) 364
365: 29 Load 362(v)
366: 100 ConvertFToS 365
Store 367(v) 369
370: 46 Load 367(v)
371: 100 Bitcast 370
Store 372(v) 374
375: 64 Load 372(v)
376: 46 UConvert 375
377: 100 Bitcast 376
Store 378(v) 380
381: 82 Load 378(v)
382: 46 UConvert 381
383: 100 Bitcast 382
Store 384(v) 386
Store 387(v) 389
390: 118 Load 387(v)
391: 100 SConvert 390
Store 392(v) 394
395: 136 Load 392(v)
396: 100 SConvert 395
Store 397(v) 399
400: 11 Load 397(v)
401: 118 ConvertFToS 400
Store 402(v) 404
405: 29 Load 402(v)
406: 118 ConvertFToS 405
Store 407(v) 409
410: 46 Load 407(v)
411: 64 UConvert 410
412: 118 Bitcast 411
Store 413(v) 415
416: 64 Load 413(v)
417: 118 Bitcast 416
Store 418(v) 420
421: 82 Load 418(v)
422: 64 UConvert 421
423: 118 Bitcast 422
Store 424(v) 426
427: 100 Load 424(v)
428: 118 SConvert 427
Store 429(v) 431
Store 432(v) 434
435: 136 Load 432(v)
436: 118 SConvert 435
Store 437(v) 439
440: 11 Load 437(v)
441: 136 ConvertFToS 440
Store 442(v) 444
445: 29 Load 442(v)
446: 136 ConvertFToS 445
Store 447(v) 449
450: 46 Load 447(v)
451: 82 UConvert 450
452: 136 Bitcast 451
Store 453(v) 455
456: 64 Load 453(v)
457: 82 UConvert 456
458: 136 Bitcast 457
Store 459(v) 461
462: 82 Load 459(v)
463: 136 Bitcast 462
Store 464(v) 466
467: 100 Load 464(v)
468: 136 SConvert 467
Store 469(v) 471
472: 118 Load 469(v)
473: 136 SConvert 472
Store 474(v) 476
Return
FunctionEnd

View File

@ -0,0 +1,9 @@
spv.coopmatKHR_constructorError.comp
ERROR: 0:12: 'constructor' : Cooperative matrix type parameters mismatch
ERROR: 0:13: 'constructor' : Cooperative matrix type parameters mismatch
ERROR: 0:14: 'constructor' : Cooperative matrix type parameters mismatch
ERROR: 0:15: 'constructor' : Cooperative matrix type parameters mismatch
ERROR: 4 compilation errors. No code generated.
SPIR-V is not generated for failed compile or link

View File

@ -1,12 +1,12 @@
spv.debugInfo.frag
// Module Version 10300
// Generated by (magic number): 8000b
// Id's are bound by 124
// Id's are bound by 187
Capability Shader
2: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Fragment 5 "main" 24 52
EntryPoint Fragment 5 "main" 30 104
ExecutionMode 5 OriginUpperLeft
1: String "spv.debugInfo.frag"
Source GLSL 450 1 "#version 450
@ -36,9 +36,40 @@ vec4 foo(S s)
return r;
}
float testBranch(float x, float y)
{
float result = 0;
bool b = x > 0;
// branch with load
if (b) {
result += 1;
}
else {
result -= 1;
}
// branch with expression
if (x > y) {
result += x - y;
}
// selection with load
result += b ?
1 : -1;
// selection with expression
result += x < y ?
y :
float(b);
return result;
}
void main()
{
outv = foo(s);
outv += testBranch(inv.x, inv.y);
outv += texture(s2d, vec2(0.5));
switch (s.a) {
@ -66,17 +97,24 @@ void main()
MemberName 8(S) 0 "a"
Name 14 "foo(struct-S-i11;"
Name 13 "s"
Name 17 "r"
Name 24 "inv"
Name 52 "outv"
Name 53 "S"
MemberName 53(S) 0 "a"
Name 54 "ubuf"
MemberName 54(ubuf) 0 "s"
Name 56 ""
Name 57 "param"
Name 67 "s2d"
Name 97 "i"
Name 20 "testBranch(f1;f1;"
Name 18 "x"
Name 19 "y"
Name 23 "r"
Name 30 "inv"
Name 56 "result"
Name 59 "b"
Name 104 "outv"
Name 105 "S"
MemberName 105(S) 0 "a"
Name 106 "ubuf"
MemberName 106(ubuf) 0 "s"
Name 108 ""
Name 109 "param"
Name 116 "param"
Name 120 "param"
Name 131 "s2d"
Name 161 "i"
ModuleProcessed "no-storage-format"
ModuleProcessed "resource-set-binding 3"
ModuleProcessed "auto-map-bindings"
@ -88,15 +126,15 @@ void main()
ModuleProcessed "suppress-warnings"
ModuleProcessed "hlsl-offsets"
ModuleProcessed "entry-point main"
Decorate 24(inv) Location 0
Decorate 52(outv) Location 0
MemberDecorate 53(S) 0 Offset 0
MemberDecorate 54(ubuf) 0 Offset 0
Decorate 54(ubuf) Block
Decorate 56 DescriptorSet 3
Decorate 56 Binding 0
Decorate 67(s2d) DescriptorSet 3
Decorate 67(s2d) Binding 1
Decorate 30(inv) Location 0
Decorate 104(outv) Location 0
MemberDecorate 105(S) 0 Offset 0
MemberDecorate 106(ubuf) 0 Offset 0
Decorate 106(ubuf) Block
Decorate 108 DescriptorSet 3
Decorate 108 Binding 0
Decorate 131(s2d) DescriptorSet 3
Decorate 131(s2d) Binding 1
3: TypeVoid
4: TypeFunction 3
7: TypeInt 32 1
@ -105,179 +143,280 @@ void main()
10: TypeFloat 32
11: TypeVector 10(float) 4
12: TypeFunction 11(fvec4) 9(ptr)
16: TypePointer Function 11(fvec4)
18: 7(int) Constant 0
19: TypePointer Function 7(int)
23: TypePointer Input 11(fvec4)
24(inv): 23(ptr) Variable Input
28: 10(float) Constant 1065353216
31: TypeInt 32 0
32: 31(int) Constant 0
33: TypePointer Function 10(float)
36: 10(float) Constant 1077936128
37: TypeBool
45: 10(float) Constant 1073741824
51: TypePointer Output 11(fvec4)
52(outv): 51(ptr) Variable Output
53(S): TypeStruct 7(int)
54(ubuf): TypeStruct 53(S)
55: TypePointer Uniform 54(ubuf)
56: 55(ptr) Variable Uniform
58: TypePointer Uniform 53(S)
64: TypeImage 10(float) 2D sampled format:Unknown
65: TypeSampledImage 64
66: TypePointer UniformConstant 65
67(s2d): 66(ptr) Variable UniformConstant
69: TypeVector 10(float) 2
70: 10(float) Constant 1056964608
71: 69(fvec2) ConstantComposite 70 70
75: TypePointer Uniform 7(int)
104: 7(int) Constant 10
109: 7(int) Constant 1
111: TypePointer Output 10(float)
114: 10(float) Constant 1092616192
Line 1 28 11
16: TypePointer Function 10(float)
17: TypeFunction 10(float) 16(ptr) 16(ptr)
22: TypePointer Function 11(fvec4)
24: 7(int) Constant 0
25: TypePointer Function 7(int)
29: TypePointer Input 11(fvec4)
30(inv): 29(ptr) Variable Input
34: 10(float) Constant 1065353216
37: TypeInt 32 0
38: 37(int) Constant 0
41: 10(float) Constant 1077936128
42: TypeBool
50: 10(float) Constant 1073741824
57: 10(float) Constant 0
58: TypePointer Function 42(bool)
81: 7(int) Constant 1
82: 7(int) Constant 4294967295
103: TypePointer Output 11(fvec4)
104(outv): 103(ptr) Variable Output
105(S): TypeStruct 7(int)
106(ubuf): TypeStruct 105(S)
107: TypePointer Uniform 106(ubuf)
108: 107(ptr) Variable Uniform
110: TypePointer Uniform 105(S)
117: TypePointer Input 10(float)
121: 37(int) Constant 1
128: TypeImage 10(float) 2D sampled format:Unknown
129: TypeSampledImage 128
130: TypePointer UniformConstant 129
131(s2d): 130(ptr) Variable UniformConstant
133: TypeVector 10(float) 2
134: 10(float) Constant 1056964608
135: 133(fvec2) ConstantComposite 134 134
139: TypePointer Uniform 7(int)
168: 7(int) Constant 10
174: TypePointer Output 10(float)
177: 10(float) Constant 1092616192
Line 1 58 11
5(main): 3 Function None 4
6: Label
57(param): 9(ptr) Variable Function
97(i): 19(ptr) Variable Function
116: 16(ptr) Variable Function
Line 1 30 0
59: 58(ptr) AccessChain 56 18
60: 53(S) Load 59
61: 7(int) CompositeExtract 60 0
62: 19(ptr) AccessChain 57(param) 18
Store 62 61
63: 11(fvec4) FunctionCall 14(foo(struct-S-i11;) 57(param)
Store 52(outv) 63
Line 1 31 0
68: 65 Load 67(s2d)
72: 11(fvec4) ImageSampleImplicitLod 68 71
73: 11(fvec4) Load 52(outv)
74: 11(fvec4) FAdd 73 72
Store 52(outv) 74
Line 1 33 0
76: 75(ptr) AccessChain 56 18 18
77: 7(int) Load 76
SelectionMerge 81 None
Switch 77 80
case 10: 78
case 20: 79
80: Label
Line 1 42 0
92: 11(fvec4) Load 52(outv)
93: 11(fvec4) CompositeConstruct 28 28 28 28
94: 11(fvec4) FSub 92 93
Store 52(outv) 94
Line 1 43 0
Branch 81
78: Label
Line 1 35 0
82: 11(fvec4) Load 52(outv)
83: 11(fvec4) CompositeConstruct 28 28 28 28
84: 11(fvec4) FAdd 82 83
Store 52(outv) 84
Line 1 36 0
Branch 81
79: Label
Line 1 38 0
86: 11(fvec4) Load 52(outv)
87: 11(fvec4) VectorTimesScalar 86 45
Store 52(outv) 87
Line 1 39 0
88: 11(fvec4) Load 52(outv)
89: 11(fvec4) CompositeConstruct 28 28 28 28
90: 11(fvec4) FAdd 88 89
Store 52(outv) 90
Line 1 40 0
Branch 81
81: Label
Line 1 46 0
Store 97(i) 18
Branch 98
98: Label
Line 1 46 0
LoopMerge 100 101 None
Branch 102
102: Label
Line 1 46 0
103: 7(int) Load 97(i)
105: 37(bool) SLessThan 103 104
BranchConditional 105 99 100
99: Label
Line 1 47 0
106: 11(fvec4) Load 52(outv)
107: 11(fvec4) VectorTimesScalar 106 36
Store 52(outv) 107
Branch 101
101: Label
Line 1 46 0
108: 7(int) Load 97(i)
110: 7(int) IAdd 108 109
Store 97(i) 110
Branch 98
100: Label
Line 1 49 0
112: 111(ptr) AccessChain 52(outv) 32
113: 10(float) Load 112
115: 37(bool) FOrdLessThan 113 114
SelectionMerge 118 None
BranchConditional 115 117 121
117: Label
Line 1 50 0
119: 11(fvec4) Load 52(outv)
120: 11(fvec4) ExtInst 2(GLSL.std.450) 13(Sin) 119
Store 52(outv) 120
Store 116 120
Branch 118
121: Label
Line 1 51 0
122: 11(fvec4) Load 52(outv)
123: 11(fvec4) ExtInst 2(GLSL.std.450) 14(Cos) 122
Store 52(outv) 123
Store 116 123
Branch 118
118: Label
109(param): 9(ptr) Variable Function
116(param): 16(ptr) Variable Function
120(param): 16(ptr) Variable Function
161(i): 25(ptr) Variable Function
179: 22(ptr) Variable Function
Line 1 60 0
111: 110(ptr) AccessChain 108 24
112: 105(S) Load 111
113: 7(int) CompositeExtract 112 0
114: 25(ptr) AccessChain 109(param) 24
Store 114 113
115: 11(fvec4) FunctionCall 14(foo(struct-S-i11;) 109(param)
Store 104(outv) 115
Line 1 61 0
118: 117(ptr) AccessChain 30(inv) 38
119: 10(float) Load 118
Store 116(param) 119
122: 117(ptr) AccessChain 30(inv) 121
123: 10(float) Load 122
Store 120(param) 123
124: 10(float) FunctionCall 20(testBranch(f1;f1;) 116(param) 120(param)
125: 11(fvec4) Load 104(outv)
126: 11(fvec4) CompositeConstruct 124 124 124 124
127: 11(fvec4) FAdd 125 126
Store 104(outv) 127
Line 1 62 0
132: 129 Load 131(s2d)
136: 11(fvec4) ImageSampleImplicitLod 132 135
137: 11(fvec4) Load 104(outv)
138: 11(fvec4) FAdd 137 136
Store 104(outv) 138
Line 1 64 0
140: 139(ptr) AccessChain 108 24 24
141: 7(int) Load 140
SelectionMerge 145 None
Switch 141 144
case 10: 142
case 20: 143
144: Label
Line 1 73 0
156: 11(fvec4) Load 104(outv)
157: 11(fvec4) CompositeConstruct 34 34 34 34
158: 11(fvec4) FSub 156 157
Store 104(outv) 158
Line 1 74 0
Branch 145
142: Label
Line 1 66 0
146: 11(fvec4) Load 104(outv)
147: 11(fvec4) CompositeConstruct 34 34 34 34
148: 11(fvec4) FAdd 146 147
Store 104(outv) 148
Line 1 67 0
Branch 145
143: Label
Line 1 69 0
150: 11(fvec4) Load 104(outv)
151: 11(fvec4) VectorTimesScalar 150 50
Store 104(outv) 151
Line 1 70 0
152: 11(fvec4) Load 104(outv)
153: 11(fvec4) CompositeConstruct 34 34 34 34
154: 11(fvec4) FAdd 152 153
Store 104(outv) 154
Line 1 71 0
Branch 145
145: Label
Line 1 77 0
Store 161(i) 24
Branch 162
162: Label
Line 1 77 0
LoopMerge 164 165 None
Branch 166
166: Label
Line 1 77 0
167: 7(int) Load 161(i)
169: 42(bool) SLessThan 167 168
BranchConditional 169 163 164
163: Label
Line 1 78 0
170: 11(fvec4) Load 104(outv)
171: 11(fvec4) VectorTimesScalar 170 41
Store 104(outv) 171
Branch 165
165: Label
Line 1 77 0
172: 7(int) Load 161(i)
173: 7(int) IAdd 172 81
Store 161(i) 173
Branch 162
164: Label
Line 1 80 0
175: 174(ptr) AccessChain 104(outv) 38
176: 10(float) Load 175
178: 42(bool) FOrdLessThan 176 177
SelectionMerge 181 None
BranchConditional 178 180 184
180: Label
Line 1 81 0
182: 11(fvec4) Load 104(outv)
183: 11(fvec4) ExtInst 2(GLSL.std.450) 13(Sin) 182
Store 104(outv) 183
Store 179 183
Branch 181
184: Label
Line 1 82 0
185: 11(fvec4) Load 104(outv)
186: 11(fvec4) ExtInst 2(GLSL.std.450) 14(Cos) 185
Store 104(outv) 186
Store 179 186
Branch 181
181: Label
Return
FunctionEnd
Line 1 16 13
14(foo(struct-S-i11;): 11(fvec4) Function None 12
13(s): 9(ptr) FunctionParameter
15: Label
17(r): 16(ptr) Variable Function
23(r): 22(ptr) Variable Function
Line 1 18 0
20: 19(ptr) AccessChain 13(s) 18
21: 7(int) Load 20
22: 10(float) ConvertSToF 21
25: 11(fvec4) Load 24(inv)
26: 11(fvec4) VectorTimesScalar 25 22
Store 17(r) 26
26: 25(ptr) AccessChain 13(s) 24
27: 7(int) Load 26
28: 10(float) ConvertSToF 27
31: 11(fvec4) Load 30(inv)
32: 11(fvec4) VectorTimesScalar 31 28
Store 23(r) 32
Line 1 19 0
27: 11(fvec4) Load 17(r)
29: 11(fvec4) CompositeConstruct 28 28 28 28
30: 11(fvec4) FAdd 27 29
Store 17(r) 30
33: 11(fvec4) Load 23(r)
35: 11(fvec4) CompositeConstruct 34 34 34 34
36: 11(fvec4) FAdd 33 35
Store 23(r) 36
Line 1 20 0
34: 33(ptr) AccessChain 17(r) 32
35: 10(float) Load 34
38: 37(bool) FOrdGreaterThan 35 36
SelectionMerge 40 None
BranchConditional 38 39 44
39: Label
Line 1 21 0
41: 11(fvec4) Load 17(r)
42: 11(fvec4) CompositeConstruct 28 28 28 28
43: 11(fvec4) FSub 41 42
Store 17(r) 43
Branch 40
39: 16(ptr) AccessChain 23(r) 38
40: 10(float) Load 39
43: 42(bool) FOrdGreaterThan 40 41
SelectionMerge 45 None
BranchConditional 43 44 49
44: Label
Line 1 21 0
46: 11(fvec4) Load 23(r)
47: 11(fvec4) CompositeConstruct 34 34 34 34
48: 11(fvec4) FSub 46 47
Store 23(r) 48
Branch 45
49: Label
Line 1 23 0
46: 11(fvec4) Load 17(r)
47: 11(fvec4) VectorTimesScalar 46 45
Store 17(r) 47
Branch 40
40: Label
51: 11(fvec4) Load 23(r)
52: 11(fvec4) VectorTimesScalar 51 50
Store 23(r) 52
Branch 45
45: Label
Line 1 25 0
48: 11(fvec4) Load 17(r)
ReturnValue 48
53: 11(fvec4) Load 23(r)
ReturnValue 53
FunctionEnd
Line 1 28 34
20(testBranch(f1;f1;): 10(float) Function None 17
18(x): 16(ptr) FunctionParameter
19(y): 16(ptr) FunctionParameter
21: Label
56(result): 16(ptr) Variable Function
59(b): 58(ptr) Variable Function
90: 16(ptr) Variable Function
Line 1 30 0
Store 56(result) 57
Line 1 31 0
60: 10(float) Load 18(x)
61: 42(bool) FOrdGreaterThan 60 57
Store 59(b) 61
Line 1 34 0
62: 42(bool) Load 59(b)
SelectionMerge 64 None
BranchConditional 62 63 67
63: Label
Line 1 35 0
65: 10(float) Load 56(result)
66: 10(float) FAdd 65 34
Store 56(result) 66
Branch 64
67: Label
Line 1 38 0
68: 10(float) Load 56(result)
69: 10(float) FSub 68 34
Store 56(result) 69
Branch 64
64: Label
Line 1 42 0
70: 10(float) Load 18(x)
71: 10(float) Load 19(y)
72: 42(bool) FOrdGreaterThan 70 71
SelectionMerge 74 None
BranchConditional 72 73 74
73: Label
Line 1 43 0
75: 10(float) Load 18(x)
76: 10(float) Load 19(y)
77: 10(float) FSub 75 76
78: 10(float) Load 56(result)
79: 10(float) FAdd 78 77
Store 56(result) 79
Branch 74
74: Label
Line 1 47 0
80: 42(bool) Load 59(b)
83: 7(int) Select 80 81 82
84: 10(float) ConvertSToF 83
85: 10(float) Load 56(result)
86: 10(float) FAdd 85 84
Store 56(result) 86
Line 1 51 0
87: 10(float) Load 18(x)
88: 10(float) Load 19(y)
89: 42(bool) FOrdLessThan 87 88
SelectionMerge 92 None
BranchConditional 89 91 94
91: Label
Line 1 52 0
93: 10(float) Load 19(y)
Store 90 93
Branch 92
94: Label
Line 1 53 0
95: 42(bool) Load 59(b)
96: 10(float) Select 95 34 57
Store 90 96
Branch 92
92: Label
97: 10(float) Load 90
Line 1 51 0
98: 10(float) Load 56(result)
99: 10(float) FAdd 98 97
Store 56(result) 99
Line 1 55 0
100: 10(float) Load 56(result)
ReturnValue 100
FunctionEnd

View File

@ -1,12 +1,12 @@
spv.debugInfo.frag
// Module Version 10000
// Generated by (magic number): 8000b
// Id's are bound by 124
// Id's are bound by 187
Capability Shader
2: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Fragment 5 "main" 24 52
EntryPoint Fragment 5 "main" 30 104
ExecutionMode 5 OriginLowerLeft
1: String "spv.debugInfo.frag"
Source GLSL 450 1 "// OpModuleProcessed no-storage-format
@ -47,9 +47,40 @@ vec4 foo(S s)
return r;
}
float testBranch(float x, float y)
{
float result = 0;
bool b = x > 0;
// branch with load
if (b) {
result += 1;
}
else {
result -= 1;
}
// branch with expression
if (x > y) {
result += x - y;
}
// selection with load
result += b ?
1 : -1;
// selection with expression
result += x < y ?
y :
float(b);
return result;
}
void main()
{
outv = foo(s);
outv += testBranch(inv.x, inv.y);
outv += texture(s2d, vec2(0.5));
switch (s.a) {
@ -77,27 +108,34 @@ void main()
MemberName 8(S) 0 "a"
Name 14 "foo(struct-S-i11;"
Name 13 "s"
Name 17 "r"
Name 24 "inv"
Name 52 "outv"
Name 53 "S"
MemberName 53(S) 0 "a"
Name 54 "ubuf"
MemberName 54(ubuf) 0 "s"
Name 56 ""
Name 57 "param"
Name 67 "s2d"
Name 97 "i"
Decorate 24(inv) Location 0
Decorate 52(outv) Location 0
MemberDecorate 53(S) 0 Offset 0
MemberDecorate 54(ubuf) 0 Offset 0
Decorate 54(ubuf) Block
Decorate 56 DescriptorSet 3
Decorate 56 Binding 0
Decorate 67(s2d) Location 0
Decorate 67(s2d) DescriptorSet 3
Decorate 67(s2d) Binding 1
Name 20 "testBranch(f1;f1;"
Name 18 "x"
Name 19 "y"
Name 23 "r"
Name 30 "inv"
Name 56 "result"
Name 59 "b"
Name 104 "outv"
Name 105 "S"
MemberName 105(S) 0 "a"
Name 106 "ubuf"
MemberName 106(ubuf) 0 "s"
Name 108 ""
Name 109 "param"
Name 116 "param"
Name 120 "param"
Name 131 "s2d"
Name 161 "i"
Decorate 30(inv) Location 0
Decorate 104(outv) Location 0
MemberDecorate 105(S) 0 Offset 0
MemberDecorate 106(ubuf) 0 Offset 0
Decorate 106(ubuf) Block
Decorate 108 DescriptorSet 3
Decorate 108 Binding 0
Decorate 131(s2d) Location 0
Decorate 131(s2d) DescriptorSet 3
Decorate 131(s2d) Binding 1
3: TypeVoid
4: TypeFunction 3
7: TypeInt 32 1
@ -106,179 +144,280 @@ void main()
10: TypeFloat 32
11: TypeVector 10(float) 4
12: TypeFunction 11(fvec4) 9(ptr)
16: TypePointer Function 11(fvec4)
18: 7(int) Constant 0
19: TypePointer Function 7(int)
23: TypePointer Input 11(fvec4)
24(inv): 23(ptr) Variable Input
28: 10(float) Constant 1065353216
31: TypeInt 32 0
32: 31(int) Constant 0
33: TypePointer Function 10(float)
36: 10(float) Constant 1077936128
37: TypeBool
45: 10(float) Constant 1073741824
51: TypePointer Output 11(fvec4)
52(outv): 51(ptr) Variable Output
53(S): TypeStruct 7(int)
54(ubuf): TypeStruct 53(S)
55: TypePointer Uniform 54(ubuf)
56: 55(ptr) Variable Uniform
58: TypePointer Uniform 53(S)
64: TypeImage 10(float) 2D sampled format:Unknown
65: TypeSampledImage 64
66: TypePointer UniformConstant 65
67(s2d): 66(ptr) Variable UniformConstant
69: TypeVector 10(float) 2
70: 10(float) Constant 1056964608
71: 69(fvec2) ConstantComposite 70 70
75: TypePointer Uniform 7(int)
104: 7(int) Constant 10
109: 7(int) Constant 1
111: TypePointer Output 10(float)
114: 10(float) Constant 1092616192
Line 1 28 11
16: TypePointer Function 10(float)
17: TypeFunction 10(float) 16(ptr) 16(ptr)
22: TypePointer Function 11(fvec4)
24: 7(int) Constant 0
25: TypePointer Function 7(int)
29: TypePointer Input 11(fvec4)
30(inv): 29(ptr) Variable Input
34: 10(float) Constant 1065353216
37: TypeInt 32 0
38: 37(int) Constant 0
41: 10(float) Constant 1077936128
42: TypeBool
50: 10(float) Constant 1073741824
57: 10(float) Constant 0
58: TypePointer Function 42(bool)
81: 7(int) Constant 1
82: 7(int) Constant 4294967295
103: TypePointer Output 11(fvec4)
104(outv): 103(ptr) Variable Output
105(S): TypeStruct 7(int)
106(ubuf): TypeStruct 105(S)
107: TypePointer Uniform 106(ubuf)
108: 107(ptr) Variable Uniform
110: TypePointer Uniform 105(S)
117: TypePointer Input 10(float)
121: 37(int) Constant 1
128: TypeImage 10(float) 2D sampled format:Unknown
129: TypeSampledImage 128
130: TypePointer UniformConstant 129
131(s2d): 130(ptr) Variable UniformConstant
133: TypeVector 10(float) 2
134: 10(float) Constant 1056964608
135: 133(fvec2) ConstantComposite 134 134
139: TypePointer Uniform 7(int)
168: 7(int) Constant 10
174: TypePointer Output 10(float)
177: 10(float) Constant 1092616192
Line 1 58 11
5(main): 3 Function None 4
6: Label
57(param): 9(ptr) Variable Function
97(i): 19(ptr) Variable Function
116: 16(ptr) Variable Function
Line 1 30 0
59: 58(ptr) AccessChain 56 18
60: 53(S) Load 59
61: 7(int) CompositeExtract 60 0
62: 19(ptr) AccessChain 57(param) 18
Store 62 61
63: 11(fvec4) FunctionCall 14(foo(struct-S-i11;) 57(param)
Store 52(outv) 63
Line 1 31 0
68: 65 Load 67(s2d)
72: 11(fvec4) ImageSampleImplicitLod 68 71
73: 11(fvec4) Load 52(outv)
74: 11(fvec4) FAdd 73 72
Store 52(outv) 74
Line 1 33 0
76: 75(ptr) AccessChain 56 18 18
77: 7(int) Load 76
SelectionMerge 81 None
Switch 77 80
case 10: 78
case 20: 79
80: Label
Line 1 42 0
92: 11(fvec4) Load 52(outv)
93: 11(fvec4) CompositeConstruct 28 28 28 28
94: 11(fvec4) FSub 92 93
Store 52(outv) 94
Line 1 43 0
Branch 81
78: Label
Line 1 35 0
82: 11(fvec4) Load 52(outv)
83: 11(fvec4) CompositeConstruct 28 28 28 28
84: 11(fvec4) FAdd 82 83
Store 52(outv) 84
Line 1 36 0
Branch 81
79: Label
Line 1 38 0
86: 11(fvec4) Load 52(outv)
87: 11(fvec4) VectorTimesScalar 86 45
Store 52(outv) 87
Line 1 39 0
88: 11(fvec4) Load 52(outv)
89: 11(fvec4) CompositeConstruct 28 28 28 28
90: 11(fvec4) FAdd 88 89
Store 52(outv) 90
Line 1 40 0
Branch 81
81: Label
Line 1 46 0
Store 97(i) 18
Branch 98
98: Label
Line 1 46 0
LoopMerge 100 101 None
Branch 102
102: Label
Line 1 46 0
103: 7(int) Load 97(i)
105: 37(bool) SLessThan 103 104
BranchConditional 105 99 100
99: Label
Line 1 47 0
106: 11(fvec4) Load 52(outv)
107: 11(fvec4) VectorTimesScalar 106 36
Store 52(outv) 107
Branch 101
101: Label
Line 1 46 0
108: 7(int) Load 97(i)
110: 7(int) IAdd 108 109
Store 97(i) 110
Branch 98
100: Label
Line 1 49 0
112: 111(ptr) AccessChain 52(outv) 32
113: 10(float) Load 112
115: 37(bool) FOrdLessThan 113 114
SelectionMerge 118 None
BranchConditional 115 117 121
117: Label
Line 1 50 0
119: 11(fvec4) Load 52(outv)
120: 11(fvec4) ExtInst 2(GLSL.std.450) 13(Sin) 119
Store 52(outv) 120
Store 116 120
Branch 118
121: Label
Line 1 51 0
122: 11(fvec4) Load 52(outv)
123: 11(fvec4) ExtInst 2(GLSL.std.450) 14(Cos) 122
Store 52(outv) 123
Store 116 123
Branch 118
118: Label
109(param): 9(ptr) Variable Function
116(param): 16(ptr) Variable Function
120(param): 16(ptr) Variable Function
161(i): 25(ptr) Variable Function
179: 22(ptr) Variable Function
Line 1 60 0
111: 110(ptr) AccessChain 108 24
112: 105(S) Load 111
113: 7(int) CompositeExtract 112 0
114: 25(ptr) AccessChain 109(param) 24
Store 114 113
115: 11(fvec4) FunctionCall 14(foo(struct-S-i11;) 109(param)
Store 104(outv) 115
Line 1 61 0
118: 117(ptr) AccessChain 30(inv) 38
119: 10(float) Load 118
Store 116(param) 119
122: 117(ptr) AccessChain 30(inv) 121
123: 10(float) Load 122
Store 120(param) 123
124: 10(float) FunctionCall 20(testBranch(f1;f1;) 116(param) 120(param)
125: 11(fvec4) Load 104(outv)
126: 11(fvec4) CompositeConstruct 124 124 124 124
127: 11(fvec4) FAdd 125 126
Store 104(outv) 127
Line 1 62 0
132: 129 Load 131(s2d)
136: 11(fvec4) ImageSampleImplicitLod 132 135
137: 11(fvec4) Load 104(outv)
138: 11(fvec4) FAdd 137 136
Store 104(outv) 138
Line 1 64 0
140: 139(ptr) AccessChain 108 24 24
141: 7(int) Load 140
SelectionMerge 145 None
Switch 141 144
case 10: 142
case 20: 143
144: Label
Line 1 73 0
156: 11(fvec4) Load 104(outv)
157: 11(fvec4) CompositeConstruct 34 34 34 34
158: 11(fvec4) FSub 156 157
Store 104(outv) 158
Line 1 74 0
Branch 145
142: Label
Line 1 66 0
146: 11(fvec4) Load 104(outv)
147: 11(fvec4) CompositeConstruct 34 34 34 34
148: 11(fvec4) FAdd 146 147
Store 104(outv) 148
Line 1 67 0
Branch 145
143: Label
Line 1 69 0
150: 11(fvec4) Load 104(outv)
151: 11(fvec4) VectorTimesScalar 150 50
Store 104(outv) 151
Line 1 70 0
152: 11(fvec4) Load 104(outv)
153: 11(fvec4) CompositeConstruct 34 34 34 34
154: 11(fvec4) FAdd 152 153
Store 104(outv) 154
Line 1 71 0
Branch 145
145: Label
Line 1 77 0
Store 161(i) 24
Branch 162
162: Label
Line 1 77 0
LoopMerge 164 165 None
Branch 166
166: Label
Line 1 77 0
167: 7(int) Load 161(i)
169: 42(bool) SLessThan 167 168
BranchConditional 169 163 164
163: Label
Line 1 78 0
170: 11(fvec4) Load 104(outv)
171: 11(fvec4) VectorTimesScalar 170 41
Store 104(outv) 171
Branch 165
165: Label
Line 1 77 0
172: 7(int) Load 161(i)
173: 7(int) IAdd 172 81
Store 161(i) 173
Branch 162
164: Label
Line 1 80 0
175: 174(ptr) AccessChain 104(outv) 38
176: 10(float) Load 175
178: 42(bool) FOrdLessThan 176 177
SelectionMerge 181 None
BranchConditional 178 180 184
180: Label
Line 1 81 0
182: 11(fvec4) Load 104(outv)
183: 11(fvec4) ExtInst 2(GLSL.std.450) 13(Sin) 182
Store 104(outv) 183
Store 179 183
Branch 181
184: Label
Line 1 82 0
185: 11(fvec4) Load 104(outv)
186: 11(fvec4) ExtInst 2(GLSL.std.450) 14(Cos) 185
Store 104(outv) 186
Store 179 186
Branch 181
181: Label
Return
FunctionEnd
Line 1 16 13
14(foo(struct-S-i11;): 11(fvec4) Function None 12
13(s): 9(ptr) FunctionParameter
15: Label
17(r): 16(ptr) Variable Function
23(r): 22(ptr) Variable Function
Line 1 18 0
20: 19(ptr) AccessChain 13(s) 18
21: 7(int) Load 20
22: 10(float) ConvertSToF 21
25: 11(fvec4) Load 24(inv)
26: 11(fvec4) VectorTimesScalar 25 22
Store 17(r) 26
26: 25(ptr) AccessChain 13(s) 24
27: 7(int) Load 26
28: 10(float) ConvertSToF 27
31: 11(fvec4) Load 30(inv)
32: 11(fvec4) VectorTimesScalar 31 28
Store 23(r) 32
Line 1 19 0
27: 11(fvec4) Load 17(r)
29: 11(fvec4) CompositeConstruct 28 28 28 28
30: 11(fvec4) FAdd 27 29
Store 17(r) 30
33: 11(fvec4) Load 23(r)
35: 11(fvec4) CompositeConstruct 34 34 34 34
36: 11(fvec4) FAdd 33 35
Store 23(r) 36
Line 1 20 0
34: 33(ptr) AccessChain 17(r) 32
35: 10(float) Load 34
38: 37(bool) FOrdGreaterThan 35 36
SelectionMerge 40 None
BranchConditional 38 39 44
39: Label
Line 1 21 0
41: 11(fvec4) Load 17(r)
42: 11(fvec4) CompositeConstruct 28 28 28 28
43: 11(fvec4) FSub 41 42
Store 17(r) 43
Branch 40
39: 16(ptr) AccessChain 23(r) 38
40: 10(float) Load 39
43: 42(bool) FOrdGreaterThan 40 41
SelectionMerge 45 None
BranchConditional 43 44 49
44: Label
Line 1 21 0
46: 11(fvec4) Load 23(r)
47: 11(fvec4) CompositeConstruct 34 34 34 34
48: 11(fvec4) FSub 46 47
Store 23(r) 48
Branch 45
49: Label
Line 1 23 0
46: 11(fvec4) Load 17(r)
47: 11(fvec4) VectorTimesScalar 46 45
Store 17(r) 47
Branch 40
40: Label
51: 11(fvec4) Load 23(r)
52: 11(fvec4) VectorTimesScalar 51 50
Store 23(r) 52
Branch 45
45: Label
Line 1 25 0
48: 11(fvec4) Load 17(r)
ReturnValue 48
53: 11(fvec4) Load 23(r)
ReturnValue 53
FunctionEnd
Line 1 28 34
20(testBranch(f1;f1;): 10(float) Function None 17
18(x): 16(ptr) FunctionParameter
19(y): 16(ptr) FunctionParameter
21: Label
56(result): 16(ptr) Variable Function
59(b): 58(ptr) Variable Function
90: 16(ptr) Variable Function
Line 1 30 0
Store 56(result) 57
Line 1 31 0
60: 10(float) Load 18(x)
61: 42(bool) FOrdGreaterThan 60 57
Store 59(b) 61
Line 1 34 0
62: 42(bool) Load 59(b)
SelectionMerge 64 None
BranchConditional 62 63 67
63: Label
Line 1 35 0
65: 10(float) Load 56(result)
66: 10(float) FAdd 65 34
Store 56(result) 66
Branch 64
67: Label
Line 1 38 0
68: 10(float) Load 56(result)
69: 10(float) FSub 68 34
Store 56(result) 69
Branch 64
64: Label
Line 1 42 0
70: 10(float) Load 18(x)
71: 10(float) Load 19(y)
72: 42(bool) FOrdGreaterThan 70 71
SelectionMerge 74 None
BranchConditional 72 73 74
73: Label
Line 1 43 0
75: 10(float) Load 18(x)
76: 10(float) Load 19(y)
77: 10(float) FSub 75 76
78: 10(float) Load 56(result)
79: 10(float) FAdd 78 77
Store 56(result) 79
Branch 74
74: Label
Line 1 47 0
80: 42(bool) Load 59(b)
83: 7(int) Select 80 81 82
84: 10(float) ConvertSToF 83
85: 10(float) Load 56(result)
86: 10(float) FAdd 85 84
Store 56(result) 86
Line 1 51 0
87: 10(float) Load 18(x)
88: 10(float) Load 19(y)
89: 42(bool) FOrdLessThan 87 88
SelectionMerge 92 None
BranchConditional 89 91 94
91: Label
Line 1 52 0
93: 10(float) Load 19(y)
Store 90 93
Branch 92
94: Label
Line 1 53 0
95: 42(bool) Load 59(b)
96: 10(float) Select 95 34 57
Store 90 96
Branch 92
92: Label
97: 10(float) Load 90
Line 1 51 0
98: 10(float) Load 56(result)
99: 10(float) FAdd 98 97
Store 56(result) 99
Line 1 55 0
100: 10(float) Load 56(result)
ReturnValue 100
FunctionEnd

View File

@ -0,0 +1,186 @@
spv.debuginfo.bufferref.glsl.frag
// Module Version 10000
// Generated by (magic number): 8000b
// Id's are bound by 131
Capability Shader
Capability PhysicalStorageBufferAddressesEXT
Extension "SPV_KHR_non_semantic_info"
Extension "SPV_KHR_physical_storage_buffer"
Extension "SPV_KHR_storage_buffer_storage_class"
2: ExtInstImport "NonSemantic.Shader.DebugInfo.100"
3: ExtInstImport "GLSL.std.450"
MemoryModel PhysicalStorageBuffer64EXT GLSL450
EntryPoint Fragment 14 "main" 69 122
ExecutionMode 14 OriginUpperLeft
1: String ""
8: String "uint"
15: String "main"
18: String "// OpModuleProcessed auto-map-locations
// OpModuleProcessed auto-map-bindings
// OpModuleProcessed client vulkan100
// OpModuleProcessed target-env vulkan1.0
// OpModuleProcessed keep-uncalled
// OpModuleProcessed entry-point main
#line 1
"
31: String "Mesh"
33: String "float"
39: String "data"
43: String "MeshVertexPositions"
47: String "meshData"
59: String "PerPass_meshes"
63: String "perPass_meshes"
65: String "int"
71: String "tri_idx0"
86: String "vertex_pos0"
124: String "out_fragColor"
SourceExtension "GL_EXT_buffer_reference"
Name 14 "main"
Name 29 "Mesh"
MemberName 29(Mesh) 0 "positions"
Name 37 "MeshVertexPositions"
MemberName 37(MeshVertexPositions) 0 "data"
Name 45 "meshData"
Name 50 "Mesh"
MemberName 50(Mesh) 0 "positions"
Name 54 "PerPass_meshes"
MemberName 54(PerPass_meshes) 0 "data"
Name 61 "perPass_meshes"
Name 69 "tri_idx0"
Name 84 "vertex_pos0"
Name 122 "out_fragColor"
Decorate 35 ArrayStride 4
MemberDecorate 37(MeshVertexPositions) 0 Offset 0
Decorate 37(MeshVertexPositions) Block
MemberDecorate 50(Mesh) 0 Offset 0
Decorate 52 ArrayStride 8
MemberDecorate 54(PerPass_meshes) 0 NonWritable
MemberDecorate 54(PerPass_meshes) 0 Offset 0
Decorate 54(PerPass_meshes) Block
Decorate 61(perPass_meshes) DescriptorSet 0
Decorate 61(perPass_meshes) Binding 0
Decorate 69(tri_idx0) Flat
Decorate 69(tri_idx0) Location 0
Decorate 122(out_fragColor) Location 0
Decorate 45(meshData) DecorationAliasedPointerEXT
4: TypeVoid
5: TypeFunction 4
7: TypeInt 32 0
10: 7(int) Constant 32
11: 7(int) Constant 6
12: 7(int) Constant 0
9: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 8 10 11 12
13: 7(int) Constant 3
6: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 8(DebugTypeFunction) 13 4
17: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 35(DebugSource) 1 18
20: 7(int) Constant 1
21: 7(int) Constant 4
22: 7(int) Constant 2
19: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 1(DebugCompilationUnit) 20 21 17 22
16: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 20(DebugFunction) 15 6 17 12 12 19 15 13 12
27: 7(int) Constant 21
TypeForwardPointer 28 PhysicalStorageBufferEXT
29(Mesh): TypeStruct 28
30: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 31 20 17 27 12 19 31 12 13
32: TypeFloat 32
34: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 33 10 13 12
35: TypeRuntimeArray 32(float)
36: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 34 12
37(MeshVertexPositions): TypeStruct 35
40: 7(int) Constant 5
41: 7(int) Constant 9
38: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 39 36 17 40 41 12 12 13
42: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 43 20 17 27 12 19 43 12 13 38
28: TypePointer PhysicalStorageBufferEXT 37(MeshVertexPositions)
44: TypePointer Function 29(Mesh)
46: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 47 30 17 27 12 16 21
49: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 31(DebugExpression)
50(Mesh): TypeStruct 28(ptr)
51: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 31 20 17 27 12 19 31 12 13
52: TypeRuntimeArray 50(Mesh)
53: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 51 12
54(PerPass_meshes): TypeStruct 52
56: 7(int) Constant 13
57: 7(int) Constant 8
55: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 39 53 17 56 57 12 12 13
58: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 59 20 17 27 12 19 59 12 13 55
60: TypePointer StorageBuffer 54(PerPass_meshes)
61(perPass_meshes): 60(ptr) Variable StorageBuffer
62: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 63 58 17 27 12 19 63 61(perPass_meshes) 57
64: TypeInt 32 1
66: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 65 10 21 12
67: 64(int) Constant 0
68: TypePointer Input 7(int)
69(tri_idx0): 68(ptr) Variable Input
70: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 71 9 17 27 12 19 71 69(tri_idx0) 57
73: TypePointer StorageBuffer 50(Mesh)
77: TypePointer Function 28(ptr)
80: 7(int) Constant 23
81: TypeVector 32(float) 3
82: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 34 13
83: TypePointer Function 81(fvec3)
85: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 86 82 17 80 12 16 21
89: 7(int) Constant 25
95: TypePointer PhysicalStorageBufferEXT 32(float)
99: 7(int) Constant 24
118: 7(int) Constant 27
119: TypeVector 32(float) 4
120: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 34 21
121: TypePointer Output 119(fvec4)
122(out_fragColor): 121(ptr) Variable Output
123: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 124 120 17 118 12 19 124 122(out_fragColor) 57
126: 32(float) Constant 1065353216
Line 1 20 11
14(main): 4 Function None 5
23: Label
45(meshData): 44(ptr) Variable Function
84(vertex_pos0): 83(ptr) Variable Function
24: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 101(DebugFunctionDefinition) 16 14(main)
25: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 16
26: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 27 27 12 12
48: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 46 45(meshData) 49
72: 7(int) Load 69(tri_idx0)
74: 73(ptr) AccessChain 61(perPass_meshes) 67 72
75: 50(Mesh) Load 74
76: 28(ptr) CompositeExtract 75 0
78: 77(ptr) AccessChain 45(meshData) 67
Store 78 76
79: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 80 80 12 12
87: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 85 84(vertex_pos0) 49
88: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 89 89 12 12
90: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 80 80 12 12
91: 77(ptr) AccessChain 45(meshData) 67
92: 28(ptr) Load 91
93: 7(int) Load 69(tri_idx0)
94: 7(int) IMul 13 93
96: 95(ptr) AccessChain 92 67 94
97: 32(float) Load 96 Aligned 4
98: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 99 99 12 12
100: 77(ptr) AccessChain 45(meshData) 67
101: 28(ptr) Load 100
102: 7(int) Load 69(tri_idx0)
103: 7(int) IMul 13 102
104: 7(int) IAdd 103 20
105: 95(ptr) AccessChain 101 67 104
106: 32(float) Load 105 Aligned 4
107: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 89 89 12 12
108: 77(ptr) AccessChain 45(meshData) 67
109: 28(ptr) Load 108
110: 7(int) Load 69(tri_idx0)
111: 7(int) IMul 13 110
112: 7(int) IAdd 111 22
113: 95(ptr) AccessChain 109 67 112
114: 32(float) Load 113 Aligned 4
115: 81(fvec3) CompositeConstruct 97 106 114
116: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 80 80 12 12
Store 84(vertex_pos0) 115
117: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 118 118 12 12
125: 81(fvec3) Load 84(vertex_pos0)
127: 32(float) CompositeExtract 125 0
128: 32(float) CompositeExtract 125 1
129: 32(float) CompositeExtract 125 2
130: 119(fvec4) CompositeConstruct 127 128 129 126
Store 122(out_fragColor) 130
Return
FunctionEnd

View File

@ -0,0 +1,96 @@
spv.debuginfo.const_params.glsl.comp
// Module Version 10000
// Generated by (magic number): 8000b
// Id's are bound by 68
Capability Shader
Extension "SPV_KHR_non_semantic_info"
2: ExtInstImport "NonSemantic.Shader.DebugInfo.100"
3: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint GLCompute 14 "main"
ExecutionMode 14 LocalSize 1 1 1
1: String ""
8: String "uint"
15: String "main"
18: String "// OpModuleProcessed auto-map-locations
// OpModuleProcessed auto-map-bindings
// OpModuleProcessed client vulkan100
// OpModuleProcessed target-env vulkan1.0
// OpModuleProcessed keep-uncalled
// OpModuleProcessed entry-point main
#line 1
"
25: String "float"
40: String "function"
46: String "f"
50: String "f2"
53: String "f3"
56: String "f4"
Name 14 "main"
Name 39 "function(f1;vf2;vf3;vf4;"
Name 35 "f"
Name 36 "f2"
Name 37 "f3"
Name 38 "f4"
4: TypeVoid
5: TypeFunction 4
7: TypeInt 32 0
10: 7(int) Constant 32
11: 7(int) Constant 6
12: 7(int) Constant 0
9: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 8 10 11 12
13: 7(int) Constant 3
6: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 8(DebugTypeFunction) 13 4
17: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 35(DebugSource) 1 18
20: 7(int) Constant 1
21: 7(int) Constant 4
22: 7(int) Constant 2
19: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 1(DebugCompilationUnit) 20 21 17 22
16: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 20(DebugFunction) 15 6 17 12 12 19 15 13 12
24: TypeFloat 32
26: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 25 10 13 12
27: TypeVector 24(float) 2
28: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 26 22
29: TypeVector 24(float) 3
30: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 26 13
31: TypeVector 24(float) 4
32: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 26 21
33: TypeFunction 4 24(float) 27(fvec2) 29(fvec3) 31(fvec4)
34: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 8(DebugTypeFunction) 13 4 26 28 30 32
41: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 20(DebugFunction) 40 34 17 12 12 19 40 13 12
45: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 46 26 17 12 12 41 21 20
48: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 31(DebugExpression)
49: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 50 28 17 12 12 41 21 22
52: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 53 30 17 12 12 41 21 13
55: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 56 32 17 12 12 41 21 21
62: 7(int) Constant 13
63: 24(float) Constant 0
64: 27(fvec2) ConstantComposite 63 63
65: 29(fvec3) ConstantComposite 63 63 63
66: 31(fvec4) ConstantComposite 63 63 63 63
Line 1 11 11
14(main): 4 Function None 5
23: Label
59: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 101(DebugFunctionDefinition) 16 14(main)
60: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 16
61: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 62 62 12 12
67: 4 FunctionCall 39(function(f1;vf2;vf3;vf4;) 63 64 65 66
Return
FunctionEnd
Line 1 7 18
39(function(f1;vf2;vf3;vf4;): 4 Function None 33
35(f): 24(float) FunctionParameter
36(f2): 27(fvec2) FunctionParameter
37(f3): 29(fvec3) FunctionParameter
38(f4): 31(fvec4) FunctionParameter
42: Label
43: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 41
44: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 12 12 12 12
47: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 45 35(f) 48
51: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 49 36(f2) 48
54: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 52 37(f3) 48
57: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 55 38(f4) 48
58: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 101(DebugFunctionDefinition) 41 39(function(f1;vf2;vf3;vf4;)
Return
FunctionEnd

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,332 +1,364 @@
spv.debuginfo.glsl.geom
Validation failed
// Module Version 10000
// Generated by (magic number): 8000b
// Id's are bound by 231
// Id's are bound by 256
Capability Geometry
Capability MultiViewport
Extension "SPV_KHR_non_semantic_info"
1: ExtInstImport "NonSemantic.Shader.DebugInfo.100"
2: ExtInstImport "GLSL.std.450"
2: ExtInstImport "NonSemantic.Shader.DebugInfo.100"
3: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Geometry 13 "main" 52 85 104 112 116 146 181 189 206 216 221 225
ExecutionMode 13 Triangles
ExecutionMode 13 Invocations 2
ExecutionMode 13 OutputTriangleStrip
ExecutionMode 13 OutputVertices 3
EntryPoint Geometry 14 "main" 62 94 113 123 126 157 196 205 222 234 240 243
ExecutionMode 14 Triangles
ExecutionMode 14 Invocations 2
ExecutionMode 14 OutputTriangleStrip
ExecutionMode 14 OutputVertices 3
1: String ""
8: String "uint"
14: String "main"
17: String ""
25: String "int"
30: String "i"
43: String "bool"
47: String "float"
54: String "outNormal"
68: String "projection"
72: String "modelview"
75: String "lightPos"
78: String "UBO"
82: String "ubo"
87: String "gl_InvocationID"
106: String "inNormal"
114: String "outColor"
118: String "inColor"
125: String "pos"
132: String "gl_Position"
135: String "gl_PointSize"
138: String "gl_CullDistance"
142: String "gl_PerVertex"
148: String "gl_in"
155: String "worldPos"
166: String "lPos"
183: String "outLightVec"
191: String "outViewVec"
218: String "gl_ViewportIndex"
223: String "gl_PrimitiveID"
227: String "gl_PrimitiveIDIn"
15: String "main"
18: String "// OpModuleProcessed auto-map-locations
// OpModuleProcessed auto-map-bindings
// OpModuleProcessed client vulkan100
// OpModuleProcessed target-env vulkan1.0
// OpModuleProcessed keep-uncalled
// OpModuleProcessed entry-point main
#line 1
"
29: String "int"
34: String "i"
50: String "bool"
57: String "float"
64: String "outNormal"
77: String "projection"
81: String "modelview"
84: String "lightPos"
87: String "UBO"
91: String "ubo"
96: String "gl_InvocationID"
115: String "inNormal"
125: String "outColor"
128: String "inColor"
137: String "pos"
143: String "gl_Position"
146: String "gl_PointSize"
149: String "gl_CullDistance"
153: String "gl_PerVertex"
159: String "gl_in"
168: String "worldPos"
180: String "lPos"
198: String "outLightVec"
207: String "outViewVec"
236: String "gl_ViewportIndex"
242: String "gl_PrimitiveID"
245: String "gl_PrimitiveIDIn"
SourceExtension "GL_ARB_viewport_array"
Name 13 "main"
Name 28 "i"
Name 52 "outNormal"
Name 66 "UBO"
MemberName 66(UBO) 0 "projection"
MemberName 66(UBO) 1 "modelview"
MemberName 66(UBO) 2 "lightPos"
Name 80 "ubo"
Name 85 "gl_InvocationID"
Name 104 "inNormal"
Name 112 "outColor"
Name 116 "inColor"
Name 123 "pos"
Name 130 "gl_PerVertex"
MemberName 130(gl_PerVertex) 0 "gl_Position"
MemberName 130(gl_PerVertex) 1 "gl_PointSize"
MemberName 130(gl_PerVertex) 2 "gl_ClipDistance"
MemberName 130(gl_PerVertex) 3 "gl_CullDistance"
Name 146 "gl_in"
Name 153 "worldPos"
Name 164 "lPos"
Name 181 "outLightVec"
Name 189 "outViewVec"
Name 196 "gl_PerVertex"
MemberName 196(gl_PerVertex) 0 "gl_Position"
MemberName 196(gl_PerVertex) 1 "gl_PointSize"
MemberName 196(gl_PerVertex) 2 "gl_ClipDistance"
MemberName 196(gl_PerVertex) 3 "gl_CullDistance"
Name 206 ""
Name 216 "gl_ViewportIndex"
Name 221 "gl_PrimitiveID"
Name 225 "gl_PrimitiveIDIn"
Decorate 52(outNormal) Location 0
Decorate 62 ArrayStride 64
Decorate 64 ArrayStride 64
MemberDecorate 66(UBO) 0 ColMajor
MemberDecorate 66(UBO) 0 Offset 0
MemberDecorate 66(UBO) 0 MatrixStride 16
MemberDecorate 66(UBO) 1 ColMajor
MemberDecorate 66(UBO) 1 Offset 128
MemberDecorate 66(UBO) 1 MatrixStride 16
MemberDecorate 66(UBO) 2 Offset 256
Decorate 66(UBO) Block
Decorate 80(ubo) DescriptorSet 0
Decorate 80(ubo) Binding 0
Decorate 85(gl_InvocationID) BuiltIn InvocationId
Decorate 104(inNormal) Location 0
Decorate 112(outColor) Location 1
Decorate 116(inColor) Location 1
MemberDecorate 130(gl_PerVertex) 0 BuiltIn Position
MemberDecorate 130(gl_PerVertex) 1 BuiltIn PointSize
MemberDecorate 130(gl_PerVertex) 2 BuiltIn ClipDistance
MemberDecorate 130(gl_PerVertex) 3 BuiltIn CullDistance
Decorate 130(gl_PerVertex) Block
Decorate 181(outLightVec) Location 3
Decorate 189(outViewVec) Location 2
MemberDecorate 196(gl_PerVertex) 0 BuiltIn Position
MemberDecorate 196(gl_PerVertex) 1 BuiltIn PointSize
MemberDecorate 196(gl_PerVertex) 2 BuiltIn ClipDistance
MemberDecorate 196(gl_PerVertex) 3 BuiltIn CullDistance
Decorate 196(gl_PerVertex) Block
Decorate 216(gl_ViewportIndex) BuiltIn ViewportIndex
Decorate 221(gl_PrimitiveID) BuiltIn PrimitiveId
Decorate 225(gl_PrimitiveIDIn) BuiltIn PrimitiveId
3: TypeVoid
4: TypeFunction 3
6: TypeInt 32 0
9: 6(int) Constant 32
10: 6(int) Constant 6
11: 6(int) Constant 0
7: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 8 9 10 11
12: 6(int) Constant 3
5: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 8(Floor) 12 3
16: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 35(Modf) 0 17
19: 6(int) Constant 1
20: 6(int) Constant 4
21: 6(int) Constant 2
18: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 1(Round) 19 20 16 21
15: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 20(Cosh) 14 5 16 11 11 18 14 12 11
24: TypeInt 32 1
26: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 25 9 20 11
27: TypePointer Function 24(int)
31: 6(int) Constant 49
29: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 30 26 16 31 11 15 20
33: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 31(Sqrt)
34: 24(int) Constant 0
41: 24(int) Constant 3
42: TypeBool
44: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 43 9 21 11
46: TypeFloat 32
48: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 47 9 12 11
49: TypeVector 46(float) 3
50: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 6(FSign) 48 12
51: TypePointer Output 49(fvec3)
52(outNormal): 51(ptr) Variable Output
55: 6(int) Constant 51
56: 6(int) Constant 8
53: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(Atan) 54 50 16 55 11 18 54 52(outNormal) 56
57: TypeVector 46(float) 4
58: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 6(FSign) 48 20
59: TypeMatrix 57(fvec4) 4
61: 42(bool) ConstantTrue
60: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 108 58 20 61
62: TypeArray 59 21
63: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 5(SAbs) 60 21
64: TypeArray 59 21
65: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 5(SAbs) 60 21
66(UBO): TypeStruct 62 64 57(fvec4)
69: 6(int) Constant 34
70: 6(int) Constant 7
67: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 68 63 16 69 70 11 11 12
73: 6(int) Constant 35
71: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 72 65 16 73 70 11 11 12
76: 6(int) Constant 36
74: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 75 58 16 76 70 11 11 12
77: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(Fract) 78 19 16 55 11 18 78 11 12 67 71 74
79: TypePointer Uniform 66(UBO)
80(ubo): 79(ptr) Variable Uniform
81: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(Atan) 82 77 16 55 11 18 82 80(ubo) 56
83: 24(int) Constant 1
84: TypePointer Input 24(int)
85(gl_InvocationID): 84(ptr) Variable Input
86: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(Atan) 87 26 16 55 11 18 87 85(gl_InvocationID) 56
89: TypePointer Uniform 59
92: TypeMatrix 49(fvec3) 3
93: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 108 50 12 61
101: TypeArray 49(fvec3) 12
102: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 5(SAbs) 50 12
103: TypePointer Input 101
104(inNormal): 103(ptr) Variable Input
105: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(Atan) 106 102 16 55 11 18 106 104(inNormal) 56
108: TypePointer Input 49(fvec3)
112(outColor): 51(ptr) Variable Output
115: 6(int) Constant 52
113: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(Atan) 114 50 16 115 11 18 114 112(outColor) 56
116(inColor): 103(ptr) Variable Input
117: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(Atan) 118 102 16 115 11 18 118 116(inColor) 56
122: TypePointer Function 57(fvec4)
126: 6(int) Constant 54
124: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 125 58 16 126 11 15 20
128: TypeArray 46(float) 19
129: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 5(SAbs) 48 19
130(gl_PerVertex): TypeStruct 57(fvec4) 46(float) 128 128
133: 6(int) Constant 23
131: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 132 58 16 21 133 11 11 12
136: 6(int) Constant 41
134: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 135 48 16 21 136 11 11 12
139: 6(int) Constant 84
137: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 138 129 16 21 139 11 11 12
140: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 138 129 16 21 139 11 11 12
141: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(Fract) 142 19 16 126 11 18 142 11 12 131 134 137 140
143: TypeArray 130(gl_PerVertex) 12
144: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 5(SAbs) 141 12
145: TypePointer Input 143
146(gl_in): 145(ptr) Variable Input
147: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(Atan) 148 144 16 126 11 18 148 146(gl_in) 56
150: TypePointer Input 57(fvec4)
156: 6(int) Constant 55
154: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 155 58 16 156 11 15 20
163: TypePointer Function 49(fvec3)
167: 6(int) Constant 57
165: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 166 50 16 167 11 15 20
172: 24(int) Constant 2
173: TypePointer Uniform 57(fvec4)
181(outLightVec): 51(ptr) Variable Output
184: 6(int) Constant 58
182: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(Atan) 183 50 16 184 11 18 183 181(outLightVec) 56
189(outViewVec): 51(ptr) Variable Output
192: 6(int) Constant 59
190: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(Atan) 191 50 16 192 11 18 191 189(outViewVec) 56
196(gl_PerVertex): TypeStruct 57(fvec4) 46(float) 128 128
198: 6(int) Constant 215
197: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 132 58 16 21 198 11 11 12
200: 6(int) Constant 233
199: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 135 48 16 21 200 11 11 12
201: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 138 129 16 12 70 11 11 12
202: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 138 129 16 12 70 11 11 12
204: 6(int) Constant 61
203: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(Fract) 142 19 16 204 11 18 142 11 12 197 199 201 202
205: TypePointer Output 196(gl_PerVertex)
206: 205(ptr) Variable Output
207: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(Atan) 17 203 16 204 11 18 17 206 56
213: TypePointer Output 57(fvec4)
215: TypePointer Output 24(int)
216(gl_ViewportIndex): 215(ptr) Variable Output
219: 6(int) Constant 64
217: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(Atan) 218 26 16 219 11 18 218 216(gl_ViewportIndex) 56
221(gl_PrimitiveID): 215(ptr) Variable Output
224: 6(int) Constant 65
222: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(Atan) 223 26 16 224 11 18 223 221(gl_PrimitiveID) 56
225(gl_PrimitiveIDIn): 84(ptr) Variable Input
226: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(Atan) 227 26 16 224 11 18 227 225(gl_PrimitiveIDIn) 56
13(main): 3 Function None 4
22: Label
28(i): 27(ptr) Variable Function
123(pos): 122(ptr) Variable Function
153(worldPos): 122(ptr) Variable Function
164(lPos): 163(ptr) Variable Function
23: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 101 15 13(main)
32: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 29 28(i) 33
Store 28(i) 34
Branch 35
35: Label
LoopMerge 37 38 None
Branch 39
39: Label
40: 24(int) Load 28(i)
45: 42(bool) SLessThan 40 41
BranchConditional 45 36 37
36: Label
88: 24(int) Load 85(gl_InvocationID)
90: 89(ptr) AccessChain 80(ubo) 83 88
91: 59 Load 90
94: 57(fvec4) CompositeExtract 91 0
95: 49(fvec3) VectorShuffle 94 94 0 1 2
96: 57(fvec4) CompositeExtract 91 1
97: 49(fvec3) VectorShuffle 96 96 0 1 2
98: 57(fvec4) CompositeExtract 91 2
99: 49(fvec3) VectorShuffle 98 98 0 1 2
100: 92 CompositeConstruct 95 97 99
107: 24(int) Load 28(i)
109: 108(ptr) AccessChain 104(inNormal) 107
110: 49(fvec3) Load 109
111: 49(fvec3) MatrixTimesVector 100 110
Store 52(outNormal) 111
119: 24(int) Load 28(i)
120: 108(ptr) AccessChain 116(inColor) 119
121: 49(fvec3) Load 120
Store 112(outColor) 121
127: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 124 123(pos) 33
149: 24(int) Load 28(i)
151: 150(ptr) AccessChain 146(gl_in) 149 34
152: 57(fvec4) Load 151
Store 123(pos) 152
157: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 154 153(worldPos) 33
158: 24(int) Load 85(gl_InvocationID)
159: 89(ptr) AccessChain 80(ubo) 83 158
160: 59 Load 159
161: 57(fvec4) Load 123(pos)
162: 57(fvec4) MatrixTimesVector 160 161
Store 153(worldPos) 162
168: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 165 164(lPos) 33
169: 24(int) Load 85(gl_InvocationID)
170: 89(ptr) AccessChain 80(ubo) 83 169
171: 59 Load 170
174: 173(ptr) AccessChain 80(ubo) 172
175: 57(fvec4) Load 174
176: 57(fvec4) MatrixTimesVector 171 175
177: 46(float) CompositeExtract 176 0
178: 46(float) CompositeExtract 176 1
179: 46(float) CompositeExtract 176 2
180: 49(fvec3) CompositeConstruct 177 178 179
Store 164(lPos) 180
185: 49(fvec3) Load 164(lPos)
186: 57(fvec4) Load 153(worldPos)
187: 49(fvec3) VectorShuffle 186 186 0 1 2
188: 49(fvec3) FSub 185 187
Store 181(outLightVec) 188
193: 57(fvec4) Load 153(worldPos)
194: 49(fvec3) VectorShuffle 193 193 0 1 2
195: 49(fvec3) FNegate 194
Store 189(outViewVec) 195
208: 24(int) Load 85(gl_InvocationID)
209: 89(ptr) AccessChain 80(ubo) 34 208
210: 59 Load 209
211: 57(fvec4) Load 153(worldPos)
212: 57(fvec4) MatrixTimesVector 210 211
214: 213(ptr) AccessChain 206 34
Store 214 212
220: 24(int) Load 85(gl_InvocationID)
Store 216(gl_ViewportIndex) 220
228: 24(int) Load 225(gl_PrimitiveIDIn)
Store 221(gl_PrimitiveID) 228
EmitVertex
Name 14 "main"
Name 32 "i"
Name 62 "outNormal"
Name 75 "UBO"
MemberName 75(UBO) 0 "projection"
MemberName 75(UBO) 1 "modelview"
MemberName 75(UBO) 2 "lightPos"
Name 89 "ubo"
Name 94 "gl_InvocationID"
Name 113 "inNormal"
Name 123 "outColor"
Name 126 "inColor"
Name 135 "pos"
Name 141 "gl_PerVertex"
MemberName 141(gl_PerVertex) 0 "gl_Position"
MemberName 141(gl_PerVertex) 1 "gl_PointSize"
MemberName 141(gl_PerVertex) 2 "gl_ClipDistance"
MemberName 141(gl_PerVertex) 3 "gl_CullDistance"
Name 157 "gl_in"
Name 166 "worldPos"
Name 178 "lPos"
Name 196 "outLightVec"
Name 205 "outViewVec"
Name 213 "gl_PerVertex"
MemberName 213(gl_PerVertex) 0 "gl_Position"
MemberName 213(gl_PerVertex) 1 "gl_PointSize"
MemberName 213(gl_PerVertex) 2 "gl_ClipDistance"
MemberName 213(gl_PerVertex) 3 "gl_CullDistance"
Name 222 ""
Name 234 "gl_ViewportIndex"
Name 240 "gl_PrimitiveID"
Name 243 "gl_PrimitiveIDIn"
Decorate 62(outNormal) Location 0
Decorate 71 ArrayStride 64
Decorate 73 ArrayStride 64
MemberDecorate 75(UBO) 0 ColMajor
MemberDecorate 75(UBO) 0 Offset 0
MemberDecorate 75(UBO) 0 MatrixStride 16
MemberDecorate 75(UBO) 1 ColMajor
MemberDecorate 75(UBO) 1 Offset 128
MemberDecorate 75(UBO) 1 MatrixStride 16
MemberDecorate 75(UBO) 2 Offset 256
Decorate 75(UBO) Block
Decorate 89(ubo) DescriptorSet 0
Decorate 89(ubo) Binding 0
Decorate 94(gl_InvocationID) BuiltIn InvocationId
Decorate 113(inNormal) Location 0
Decorate 123(outColor) Location 1
Decorate 126(inColor) Location 1
MemberDecorate 141(gl_PerVertex) 0 BuiltIn Position
MemberDecorate 141(gl_PerVertex) 1 BuiltIn PointSize
MemberDecorate 141(gl_PerVertex) 2 BuiltIn ClipDistance
MemberDecorate 141(gl_PerVertex) 3 BuiltIn CullDistance
Decorate 141(gl_PerVertex) Block
Decorate 196(outLightVec) Location 3
Decorate 205(outViewVec) Location 2
MemberDecorate 213(gl_PerVertex) 0 BuiltIn Position
MemberDecorate 213(gl_PerVertex) 1 BuiltIn PointSize
MemberDecorate 213(gl_PerVertex) 2 BuiltIn ClipDistance
MemberDecorate 213(gl_PerVertex) 3 BuiltIn CullDistance
Decorate 213(gl_PerVertex) Block
Decorate 234(gl_ViewportIndex) BuiltIn ViewportIndex
Decorate 240(gl_PrimitiveID) BuiltIn PrimitiveId
Decorate 243(gl_PrimitiveIDIn) BuiltIn PrimitiveId
4: TypeVoid
5: TypeFunction 4
7: TypeInt 32 0
10: 7(int) Constant 32
11: 7(int) Constant 6
12: 7(int) Constant 0
9: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 8 10 11 12
13: 7(int) Constant 3
6: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 8(DebugTypeFunction) 13 4
17: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 35(DebugSource) 1 18
20: 7(int) Constant 1
21: 7(int) Constant 4
22: 7(int) Constant 2
19: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 1(DebugCompilationUnit) 20 21 17 22
16: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 20(DebugFunction) 15 6 17 12 12 19 15 13 12
27: 7(int) Constant 49
28: TypeInt 32 1
30: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 29 10 21 12
31: TypePointer Function 28(int)
33: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 34 30 17 27 12 16 21
36: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 31(DebugExpression)
37: 28(int) Constant 0
48: 28(int) Constant 3
49: TypeBool
51: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 50 10 22 12
55: 7(int) Constant 51
56: TypeFloat 32
58: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 57 10 13 12
59: TypeVector 56(float) 3
60: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 58 13
61: TypePointer Output 59(fvec3)
62(outNormal): 61(ptr) Variable Output
65: 7(int) Constant 8
63: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 64 60 17 55 12 19 64 62(outNormal) 65
66: TypeVector 56(float) 4
67: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 58 21
68: TypeMatrix 66(fvec4) 4
70: 49(bool) ConstantTrue
69: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 108(DebugTypeMatrix) 67 21 70
71: TypeArray 68 22
72: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 69 22
73: TypeArray 68 22
74: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 69 22
75(UBO): TypeStruct 71 73 66(fvec4)
78: 7(int) Constant 34
79: 7(int) Constant 7
76: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 77 72 17 78 79 12 12 13
82: 7(int) Constant 35
80: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 81 74 17 82 79 12 12 13
85: 7(int) Constant 36
83: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 84 67 17 85 79 12 12 13
86: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 87 20 17 55 12 19 87 12 13 76 80 83
88: TypePointer Uniform 75(UBO)
89(ubo): 88(ptr) Variable Uniform
90: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 91 86 17 55 12 19 91 89(ubo) 65
92: 28(int) Constant 1
93: TypePointer Input 28(int)
94(gl_InvocationID): 93(ptr) Variable Input
95: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 96 30 17 55 12 19 96 94(gl_InvocationID) 65
98: TypePointer Uniform 68
101: TypeMatrix 59(fvec3) 3
102: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 108(DebugTypeMatrix) 60 13 70
110: TypeArray 59(fvec3) 13
111: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 60 13
112: TypePointer Input 110
113(inNormal): 112(ptr) Variable Input
114: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 115 111 17 55 12 19 115 113(inNormal) 65
117: TypePointer Input 59(fvec3)
122: 7(int) Constant 52
123(outColor): 61(ptr) Variable Output
124: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 125 60 17 122 12 19 125 123(outColor) 65
126(inColor): 112(ptr) Variable Input
127: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 128 111 17 122 12 19 128 126(inColor) 65
133: 7(int) Constant 54
134: TypePointer Function 66(fvec4)
136: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 137 67 17 133 12 16 21
139: TypeArray 56(float) 20
140: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 58 20
141(gl_PerVertex): TypeStruct 66(fvec4) 56(float) 139 139
144: 7(int) Constant 23
142: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 143 67 17 22 144 12 12 13
147: 7(int) Constant 41
145: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 146 58 17 22 147 12 12 13
150: 7(int) Constant 84
148: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 149 140 17 22 150 12 12 13
151: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 149 140 17 22 150 12 12 13
152: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 153 20 17 133 12 19 153 12 13 142 145 148 151
154: TypeArray 141(gl_PerVertex) 13
155: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 152 13
156: TypePointer Input 154
157(gl_in): 156(ptr) Variable Input
158: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 159 155 17 133 12 19 159 157(gl_in) 65
161: TypePointer Input 66(fvec4)
165: 7(int) Constant 55
167: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 168 67 17 165 12 16 21
176: 7(int) Constant 57
177: TypePointer Function 59(fvec3)
179: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 180 60 17 176 12 16 21
185: 28(int) Constant 2
186: TypePointer Uniform 66(fvec4)
195: 7(int) Constant 58
196(outLightVec): 61(ptr) Variable Output
197: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 198 60 17 195 12 19 198 196(outLightVec) 65
204: 7(int) Constant 59
205(outViewVec): 61(ptr) Variable Output
206: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 207 60 17 204 12 19 207 205(outViewVec) 65
212: 7(int) Constant 61
213(gl_PerVertex): TypeStruct 66(fvec4) 56(float) 139 139
215: 7(int) Constant 215
214: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 143 67 17 22 215 12 12 13
217: 7(int) Constant 233
216: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 146 58 17 22 217 12 12 13
218: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 149 140 17 13 79 12 12 13
219: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 149 140 17 13 79 12 12 13
220: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 153 20 17 212 12 19 153 12 13 214 216 218 219
221: TypePointer Output 213(gl_PerVertex)
222: 221(ptr) Variable Output
223: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 1 220 17 212 12 19 1 222 65
229: TypePointer Output 66(fvec4)
232: 7(int) Constant 64
233: TypePointer Output 28(int)
234(gl_ViewportIndex): 233(ptr) Variable Output
235: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 236 30 17 232 12 19 236 234(gl_ViewportIndex) 65
239: 7(int) Constant 65
240(gl_PrimitiveID): 233(ptr) Variable Output
241: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 242 30 17 239 12 19 242 240(gl_PrimitiveID) 65
243(gl_PrimitiveIDIn): 93(ptr) Variable Input
244: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 245 30 17 239 12 19 245 243(gl_PrimitiveIDIn) 65
248: 7(int) Constant 66
255: 7(int) Constant 68
Line 1 47 15
14(main): 4 Function None 5
23: Label
32(i): 31(ptr) Variable Function
135(pos): 134(ptr) Variable Function
166(worldPos): 134(ptr) Variable Function
178(lPos): 177(ptr) Variable Function
24: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 101(DebugFunctionDefinition) 16 14(main)
25: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 16
26: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 27 27 12 12
35: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 33 32(i) 36
Store 32(i) 37
Branch 38
38: Label
229: 24(int) Load 28(i)
230: 24(int) IAdd 229 83
Store 28(i) 230
Branch 35
37: Label
42: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 16
43: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 27 27 12 12
LoopMerge 40 41 None
Branch 44
44: Label
45: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 16
46: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 27 27 12 12
47: 28(int) Load 32(i)
52: 49(bool) SLessThan 47 48
BranchConditional 52 39 40
39: Label
53: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 16
54: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 55 55 12 12
97: 28(int) Load 94(gl_InvocationID)
99: 98(ptr) AccessChain 89(ubo) 92 97
100: 68 Load 99
103: 66(fvec4) CompositeExtract 100 0
104: 59(fvec3) VectorShuffle 103 103 0 1 2
105: 66(fvec4) CompositeExtract 100 1
106: 59(fvec3) VectorShuffle 105 105 0 1 2
107: 66(fvec4) CompositeExtract 100 2
108: 59(fvec3) VectorShuffle 107 107 0 1 2
109: 101 CompositeConstruct 104 106 108
116: 28(int) Load 32(i)
118: 117(ptr) AccessChain 113(inNormal) 116
119: 59(fvec3) Load 118
120: 59(fvec3) MatrixTimesVector 109 119
Store 62(outNormal) 120
121: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 122 122 12 12
129: 28(int) Load 32(i)
130: 117(ptr) AccessChain 126(inColor) 129
131: 59(fvec3) Load 130
Store 123(outColor) 131
132: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 133 133 12 12
138: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 136 135(pos) 36
160: 28(int) Load 32(i)
162: 161(ptr) AccessChain 157(gl_in) 160 37
163: 66(fvec4) Load 162
Store 135(pos) 163
164: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 165 165 12 12
169: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 167 166(worldPos) 36
170: 28(int) Load 94(gl_InvocationID)
171: 98(ptr) AccessChain 89(ubo) 92 170
172: 68 Load 171
173: 66(fvec4) Load 135(pos)
174: 66(fvec4) MatrixTimesVector 172 173
Store 166(worldPos) 174
175: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 176 176 12 12
181: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 179 178(lPos) 36
182: 28(int) Load 94(gl_InvocationID)
183: 98(ptr) AccessChain 89(ubo) 92 182
184: 68 Load 183
187: 186(ptr) AccessChain 89(ubo) 185
188: 66(fvec4) Load 187
189: 66(fvec4) MatrixTimesVector 184 188
190: 56(float) CompositeExtract 189 0
191: 56(float) CompositeExtract 189 1
192: 56(float) CompositeExtract 189 2
193: 59(fvec3) CompositeConstruct 190 191 192
Store 178(lPos) 193
194: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 195 195 12 12
199: 59(fvec3) Load 178(lPos)
200: 66(fvec4) Load 166(worldPos)
201: 59(fvec3) VectorShuffle 200 200 0 1 2
202: 59(fvec3) FSub 199 201
Store 196(outLightVec) 202
203: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 204 204 12 12
208: 66(fvec4) Load 166(worldPos)
209: 59(fvec3) VectorShuffle 208 208 0 1 2
210: 59(fvec3) FNegate 209
Store 205(outViewVec) 210
211: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 212 212 12 12
224: 28(int) Load 94(gl_InvocationID)
225: 98(ptr) AccessChain 89(ubo) 37 224
226: 68 Load 225
227: 66(fvec4) Load 166(worldPos)
228: 66(fvec4) MatrixTimesVector 226 227
230: 229(ptr) AccessChain 222 37
Store 230 228
231: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 232 232 12 12
237: 28(int) Load 94(gl_InvocationID)
Store 234(gl_ViewportIndex) 237
238: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 239 239 12 12
246: 28(int) Load 243(gl_PrimitiveIDIn)
Store 240(gl_PrimitiveID) 246
247: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 248 248 12 12
EmitVertex
Branch 41
41: Label
249: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 16
250: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 27 27 12 12
251: 28(int) Load 32(i)
252: 28(int) IAdd 251 92
Store 32(i) 252
Branch 38
40: Label
253: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 16
254: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 255 255 12 12
EndPrimitive
Return
FunctionEnd

File diff suppressed because it is too large Load Diff

View File

@ -1,421 +1,445 @@
spv.debuginfo.glsl.tese
Validation failed
// Module Version 10000
// Generated by (magic number): 8000b
// Id's are bound by 315
// Id's are bound by 332
Capability Tessellation
Extension "SPV_KHR_non_semantic_info"
1: ExtInstImport "NonSemantic.Shader.DebugInfo.100"
2: ExtInstImport "GLSL.std.450"
2: ExtInstImport "NonSemantic.Shader.DebugInfo.100"
3: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint TessellationEvaluation 13 "main" 39 56 80 99 124 160 267 279 286 297 303
ExecutionMode 13 Quads
ExecutionMode 13 SpacingEqual
ExecutionMode 13 VertexOrderCw
EntryPoint TessellationEvaluation 14 "main" 42 59 86 105 133 169 280 294 302 314 321
ExecutionMode 14 Quads
ExecutionMode 14 SpacingEqual
ExecutionMode 14 VertexOrderCw
1: String ""
8: String "uint"
14: String "main"
17: String ""
25: String "float"
32: String "uv1"
41: String "inUV"
44: String "int"
58: String "gl_TessCoord"
66: String "uv2"
82: String "outUV"
93: String "n1"
101: String "inNormal"
112: String "n2"
126: String "outNormal"
139: String "pos1"
146: String "gl_Position"
149: String "gl_PointSize"
152: String "gl_CullDistance"
156: String "gl_PerVertex"
162: String "gl_in"
174: String "pos2"
187: String "pos"
198: String "type.2d.image"
200: String "@type.2d.image"
204: String "type.sampled.image"
205: String "@type.sampled.image"
209: String "displacementMap"
223: String "modelview"
228: String "lightPos"
231: String "frustumPlanes"
233: String "tessellatedEdgeSize"
237: String "viewportDim"
241: String "UBO"
245: String "ubo"
281: String "outViewVec"
288: String "outLightVec"
299: String "outWorldPos"
305: String "outEyePos"
Name 13 "main"
Name 30 "uv1"
Name 39 "inUV"
Name 56 "gl_TessCoord"
Name 64 "uv2"
Name 80 "outUV"
Name 91 "n1"
Name 99 "inNormal"
Name 110 "n2"
Name 124 "outNormal"
Name 137 "pos1"
Name 144 "gl_PerVertex"
MemberName 144(gl_PerVertex) 0 "gl_Position"
MemberName 144(gl_PerVertex) 1 "gl_PointSize"
MemberName 144(gl_PerVertex) 2 "gl_ClipDistance"
MemberName 144(gl_PerVertex) 3 "gl_CullDistance"
Name 160 "gl_in"
Name 172 "pos2"
Name 185 "pos"
Name 207 "displacementMap"
Name 221 "UBO"
MemberName 221(UBO) 0 "projection"
MemberName 221(UBO) 1 "modelview"
MemberName 221(UBO) 2 "lightPos"
MemberName 221(UBO) 3 "frustumPlanes"
MemberName 221(UBO) 4 "displacementFactor"
MemberName 221(UBO) 5 "tessellationFactor"
MemberName 221(UBO) 6 "viewportDim"
MemberName 221(UBO) 7 "tessellatedEdgeSize"
Name 243 "ubo"
Name 256 "gl_PerVertex"
MemberName 256(gl_PerVertex) 0 "gl_Position"
MemberName 256(gl_PerVertex) 1 "gl_PointSize"
MemberName 256(gl_PerVertex) 2 "gl_ClipDistance"
MemberName 256(gl_PerVertex) 3 "gl_CullDistance"
Name 267 ""
Name 279 "outViewVec"
Name 286 "outLightVec"
Name 297 "outWorldPos"
Name 303 "outEyePos"
Decorate 39(inUV) Location 1
Decorate 56(gl_TessCoord) BuiltIn TessCoord
Decorate 80(outUV) Location 1
Decorate 99(inNormal) Location 0
Decorate 124(outNormal) Location 0
MemberDecorate 144(gl_PerVertex) 0 BuiltIn Position
MemberDecorate 144(gl_PerVertex) 1 BuiltIn PointSize
MemberDecorate 144(gl_PerVertex) 2 BuiltIn ClipDistance
MemberDecorate 144(gl_PerVertex) 3 BuiltIn CullDistance
Decorate 144(gl_PerVertex) Block
Decorate 207(displacementMap) DescriptorSet 0
Decorate 207(displacementMap) Binding 1
Decorate 219 ArrayStride 16
MemberDecorate 221(UBO) 0 ColMajor
MemberDecorate 221(UBO) 0 Offset 0
MemberDecorate 221(UBO) 0 MatrixStride 16
MemberDecorate 221(UBO) 1 ColMajor
MemberDecorate 221(UBO) 1 Offset 64
MemberDecorate 221(UBO) 1 MatrixStride 16
MemberDecorate 221(UBO) 2 Offset 128
MemberDecorate 221(UBO) 3 Offset 144
MemberDecorate 221(UBO) 4 Offset 240
MemberDecorate 221(UBO) 5 Offset 244
MemberDecorate 221(UBO) 6 Offset 248
MemberDecorate 221(UBO) 7 Offset 256
Decorate 221(UBO) Block
Decorate 243(ubo) DescriptorSet 0
Decorate 243(ubo) Binding 0
MemberDecorate 256(gl_PerVertex) 0 BuiltIn Position
MemberDecorate 256(gl_PerVertex) 1 BuiltIn PointSize
MemberDecorate 256(gl_PerVertex) 2 BuiltIn ClipDistance
MemberDecorate 256(gl_PerVertex) 3 BuiltIn CullDistance
Decorate 256(gl_PerVertex) Block
Decorate 279(outViewVec) Location 2
Decorate 286(outLightVec) Location 3
Decorate 297(outWorldPos) Location 5
Decorate 303(outEyePos) Location 4
3: TypeVoid
4: TypeFunction 3
6: TypeInt 32 0
9: 6(int) Constant 32
10: 6(int) Constant 6
11: 6(int) Constant 0
7: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 8 9 10 11
12: 6(int) Constant 3
5: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 8(Floor) 12 3
16: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 35(Modf) 0 17
19: 6(int) Constant 1
20: 6(int) Constant 4
21: 6(int) Constant 2
18: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 1(Round) 19 20 16 21
15: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 20(Cosh) 14 5 16 11 11 18 14 12 11
24: TypeFloat 32
26: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 25 9 12 11
27: TypeVector 24(float) 2
28: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 6(FSign) 26 21
29: TypePointer Function 27(fvec2)
33: 6(int) Constant 56
31: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 32 28 16 33 11 15 20
35: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 31(Sqrt)
36: TypeArray 27(fvec2) 9
37: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 5(SAbs) 28 9
38: TypePointer Input 36
39(inUV): 38(ptr) Variable Input
42: 6(int) Constant 8
40: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(Atan) 41 37 16 33 11 18 41 39(inUV) 42
43: TypeInt 32 1
45: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 44 9 20 11
46: 43(int) Constant 0
47: TypePointer Input 27(fvec2)
50: 43(int) Constant 1
53: TypeVector 24(float) 3
54: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 6(FSign) 26 12
55: TypePointer Input 53(fvec3)
56(gl_TessCoord): 55(ptr) Variable Input
57: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(Atan) 58 54 16 33 11 18 58 56(gl_TessCoord) 42
59: TypePointer Input 24(float)
67: 6(int) Constant 57
65: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 66 28 16 67 11 15 20
69: 43(int) Constant 3
72: 43(int) Constant 2
79: TypePointer Output 27(fvec2)
80(outUV): 79(ptr) Variable Output
83: 6(int) Constant 58
81: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(Atan) 82 28 16 83 11 18 82 80(outUV) 42
90: TypePointer Function 53(fvec3)
94: 6(int) Constant 60
92: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 93 54 16 94 11 15 20
96: TypeArray 53(fvec3) 9
97: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 5(SAbs) 54 9
98: TypePointer Input 96
99(inNormal): 98(ptr) Variable Input
100: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(Atan) 101 97 16 94 11 18 101 99(inNormal) 42
113: 6(int) Constant 61
111: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 112 54 16 113 11 15 20
123: TypePointer Output 53(fvec3)
124(outNormal): 123(ptr) Variable Output
127: 6(int) Constant 62
125: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(Atan) 126 54 16 127 11 18 126 124(outNormal) 42
134: TypeVector 24(float) 4
135: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 6(FSign) 26 20
136: TypePointer Function 134(fvec4)
140: 6(int) Constant 65
138: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 139 135 16 140 11 15 20
142: TypeArray 24(float) 19
143: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 5(SAbs) 26 19
144(gl_PerVertex): TypeStruct 134(fvec4) 24(float) 142 142
147: 6(int) Constant 1756
145: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 146 135 16 19 147 11 11 12
150: 6(int) Constant 1774
148: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 149 26 16 19 150 11 11 12
153: 6(int) Constant 1817
151: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 152 143 16 19 153 11 11 12
154: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 152 143 16 19 153 11 11 12
155: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(Fract) 156 19 16 140 11 18 156 11 12 145 148 151 154
157: TypeArray 144(gl_PerVertex) 9
158: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 5(SAbs) 155 9
159: TypePointer Input 157
160(gl_in): 159(ptr) Variable Input
161: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(Atan) 162 158 16 140 11 18 162 160(gl_in) 42
163: TypePointer Input 134(fvec4)
175: 6(int) Constant 66
173: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 174 135 16 175 11 15 20
188: 6(int) Constant 67
186: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 187 135 16 188 11 15 20
196: TypeImage 24(float) 2D sampled format:Unknown
199: 6(int) Constant 69
201: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 0(Unknown)
197: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(Fract) 198 11 16 199 11 18 200 201 12
202: TypeSampledImage 196
203: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(Fract) 204 11 16 199 11 18 205 201 12
206: TypePointer UniformConstant 202
207(displacementMap): 206(ptr) Variable UniformConstant
208: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(Atan) 209 203 16 199 11 18 209 207(displacementMap) 42
212: 24(float) Constant 0
215: TypeMatrix 134(fvec4) 4
217: TypeBool
218: 217(bool) ConstantTrue
216: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 108 135 20 218
219: TypeArray 134(fvec4) 10
220: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 5(SAbs) 135 10
221(UBO): TypeStruct 215 215 134(fvec4) 219 24(float) 24(float) 27(fvec2) 24(float)
224: 6(int) Constant 30
225: 6(int) Constant 7
222: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 223 216 16 224 225 11 11 12
226: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 223 216 16 224 225 11 11 12
229: 6(int) Constant 31
227: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 228 135 16 229 225 11 11 12
230: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 231 220 16 9 225 11 11 12
234: 6(int) Constant 36
232: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 233 26 16 234 42 11 11 12
235: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 233 26 16 234 42 11 11 12
238: 6(int) Constant 35
236: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 237 28 16 238 225 11 11 12
239: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 233 26 16 234 42 11 11 12
240: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(Fract) 241 19 16 199 11 18 241 11 12 222 226 227 230 232 235 236 239
242: TypePointer Uniform 221(UBO)
243(ubo): 242(ptr) Variable Uniform
244: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(Atan) 245 240 16 199 11 18 245 243(ubo) 42
246: 43(int) Constant 4
247: TypePointer Uniform 24(float)
251: TypePointer Function 24(float)
256(gl_PerVertex): TypeStruct 134(fvec4) 24(float) 142 142
258: 6(int) Constant 165
257: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 146 135 16 19 258 11 11 12
260: 6(int) Constant 183
259: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 149 26 16 19 260 11 11 12
262: 6(int) Constant 226
261: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 152 143 16 19 262 11 11 12
263: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 152 143 16 19 262 11 11 12
265: 6(int) Constant 71
264: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(Fract) 156 19 16 265 11 18 156 11 12 257 259 261 263
266: TypePointer Output 256(gl_PerVertex)
267: 266(ptr) Variable Output
268: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(Atan) 17 264 16 265 11 18 17 267 42
269: TypePointer Uniform 215
277: TypePointer Output 134(fvec4)
279(outViewVec): 123(ptr) Variable Output
282: 6(int) Constant 74
280: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(Atan) 281 54 16 282 11 18 281 279(outViewVec) 42
286(outLightVec): 123(ptr) Variable Output
289: 6(int) Constant 75
287: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(Atan) 288 54 16 289 11 18 288 286(outLightVec) 42
290: TypePointer Uniform 134(fvec4)
297(outWorldPos): 123(ptr) Variable Output
300: 6(int) Constant 76
298: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(Atan) 299 54 16 300 11 18 299 297(outWorldPos) 42
303(outEyePos): 123(ptr) Variable Output
306: 6(int) Constant 77
304: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(Atan) 305 54 16 306 11 18 305 303(outEyePos) 42
13(main): 3 Function None 4
22: Label
30(uv1): 29(ptr) Variable Function
64(uv2): 29(ptr) Variable Function
91(n1): 90(ptr) Variable Function
110(n2): 90(ptr) Variable Function
137(pos1): 136(ptr) Variable Function
172(pos2): 136(ptr) Variable Function
185(pos): 136(ptr) Variable Function
23: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 101 15 13(main)
34: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 31 30(uv1) 35
48: 47(ptr) AccessChain 39(inUV) 46
49: 27(fvec2) Load 48
51: 47(ptr) AccessChain 39(inUV) 50
52: 27(fvec2) Load 51
60: 59(ptr) AccessChain 56(gl_TessCoord) 11
61: 24(float) Load 60
62: 27(fvec2) CompositeConstruct 61 61
63: 27(fvec2) ExtInst 2(GLSL.std.450) 46(FMix) 49 52 62
Store 30(uv1) 63
68: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 65 64(uv2) 35
70: 47(ptr) AccessChain 39(inUV) 69
71: 27(fvec2) Load 70
73: 47(ptr) AccessChain 39(inUV) 72
74: 27(fvec2) Load 73
75: 59(ptr) AccessChain 56(gl_TessCoord) 11
76: 24(float) Load 75
77: 27(fvec2) CompositeConstruct 76 76
78: 27(fvec2) ExtInst 2(GLSL.std.450) 46(FMix) 71 74 77
Store 64(uv2) 78
84: 27(fvec2) Load 30(uv1)
85: 27(fvec2) Load 64(uv2)
86: 59(ptr) AccessChain 56(gl_TessCoord) 19
87: 24(float) Load 86
88: 27(fvec2) CompositeConstruct 87 87
89: 27(fvec2) ExtInst 2(GLSL.std.450) 46(FMix) 84 85 88
Store 80(outUV) 89
95: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 92 91(n1) 35
102: 55(ptr) AccessChain 99(inNormal) 46
103: 53(fvec3) Load 102
104: 55(ptr) AccessChain 99(inNormal) 50
105: 53(fvec3) Load 104
106: 59(ptr) AccessChain 56(gl_TessCoord) 11
107: 24(float) Load 106
108: 53(fvec3) CompositeConstruct 107 107 107
109: 53(fvec3) ExtInst 2(GLSL.std.450) 46(FMix) 103 105 108
Store 91(n1) 109
114: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 111 110(n2) 35
115: 55(ptr) AccessChain 99(inNormal) 69
116: 53(fvec3) Load 115
117: 55(ptr) AccessChain 99(inNormal) 72
118: 53(fvec3) Load 117
119: 59(ptr) AccessChain 56(gl_TessCoord) 11
120: 24(float) Load 119
121: 53(fvec3) CompositeConstruct 120 120 120
122: 53(fvec3) ExtInst 2(GLSL.std.450) 46(FMix) 116 118 121
Store 110(n2) 122
128: 53(fvec3) Load 91(n1)
129: 53(fvec3) Load 110(n2)
130: 59(ptr) AccessChain 56(gl_TessCoord) 19
131: 24(float) Load 130
132: 53(fvec3) CompositeConstruct 131 131 131
133: 53(fvec3) ExtInst 2(GLSL.std.450) 46(FMix) 128 129 132
Store 124(outNormal) 133
141: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 138 137(pos1) 35
164: 163(ptr) AccessChain 160(gl_in) 46 46
165: 134(fvec4) Load 164
166: 163(ptr) AccessChain 160(gl_in) 50 46
167: 134(fvec4) Load 166
168: 59(ptr) AccessChain 56(gl_TessCoord) 11
169: 24(float) Load 168
170: 134(fvec4) CompositeConstruct 169 169 169 169
171: 134(fvec4) ExtInst 2(GLSL.std.450) 46(FMix) 165 167 170
Store 137(pos1) 171
176: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 173 172(pos2) 35
177: 163(ptr) AccessChain 160(gl_in) 69 46
178: 134(fvec4) Load 177
179: 163(ptr) AccessChain 160(gl_in) 72 46
180: 134(fvec4) Load 179
181: 59(ptr) AccessChain 56(gl_TessCoord) 11
182: 24(float) Load 181
183: 134(fvec4) CompositeConstruct 182 182 182 182
184: 134(fvec4) ExtInst 2(GLSL.std.450) 46(FMix) 178 180 183
Store 172(pos2) 184
189: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 186 185(pos) 35
190: 134(fvec4) Load 137(pos1)
191: 134(fvec4) Load 172(pos2)
192: 59(ptr) AccessChain 56(gl_TessCoord) 19
193: 24(float) Load 192
194: 134(fvec4) CompositeConstruct 193 193 193 193
195: 134(fvec4) ExtInst 2(GLSL.std.450) 46(FMix) 190 191 194
Store 185(pos) 195
210: 202 Load 207(displacementMap)
211: 27(fvec2) Load 80(outUV)
213: 134(fvec4) ImageSampleExplicitLod 210 211 Lod 212
214: 24(float) CompositeExtract 213 0
248: 247(ptr) AccessChain 243(ubo) 246
249: 24(float) Load 248
250: 24(float) FMul 214 249
252: 251(ptr) AccessChain 185(pos) 19
253: 24(float) Load 252
254: 24(float) FSub 253 250
255: 251(ptr) AccessChain 185(pos) 19
Store 255 254
270: 269(ptr) AccessChain 243(ubo) 46
271: 215 Load 270
272: 269(ptr) AccessChain 243(ubo) 50
273: 215 Load 272
274: 215 MatrixTimesMatrix 271 273
275: 134(fvec4) Load 185(pos)
276: 134(fvec4) MatrixTimesVector 274 275
278: 277(ptr) AccessChain 267 46
Store 278 276
283: 134(fvec4) Load 185(pos)
284: 53(fvec3) VectorShuffle 283 283 0 1 2
285: 53(fvec3) FNegate 284
Store 279(outViewVec) 285
291: 290(ptr) AccessChain 243(ubo) 72
292: 134(fvec4) Load 291
293: 53(fvec3) VectorShuffle 292 292 0 1 2
294: 53(fvec3) Load 279(outViewVec)
295: 53(fvec3) FAdd 293 294
296: 53(fvec3) ExtInst 2(GLSL.std.450) 69(Normalize) 295
Store 286(outLightVec) 296
301: 134(fvec4) Load 185(pos)
302: 53(fvec3) VectorShuffle 301 301 0 1 2
Store 297(outWorldPos) 302
307: 269(ptr) AccessChain 243(ubo) 50
308: 215 Load 307
309: 134(fvec4) Load 185(pos)
310: 134(fvec4) MatrixTimesVector 308 309
311: 24(float) CompositeExtract 310 0
312: 24(float) CompositeExtract 310 1
313: 24(float) CompositeExtract 310 2
314: 53(fvec3) CompositeConstruct 311 312 313
Store 303(outEyePos) 314
15: String "main"
18: String "// OpModuleProcessed auto-map-locations
// OpModuleProcessed auto-map-bindings
// OpModuleProcessed client vulkan100
// OpModuleProcessed target-env vulkan1.0
// OpModuleProcessed keep-uncalled
// OpModuleProcessed entry-point main
#line 1
"
29: String "float"
36: String "uv1"
44: String "inUV"
47: String "int"
61: String "gl_TessCoord"
71: String "uv2"
88: String "outUV"
100: String "n1"
107: String "inNormal"
120: String "n2"
135: String "outNormal"
149: String "pos1"
155: String "gl_Position"
158: String "gl_PointSize"
161: String "gl_CullDistance"
165: String "gl_PerVertex"
171: String "gl_in"
185: String "pos2"
199: String "pos"
211: String "type.2d.image"
212: String "@type.2d.image"
216: String "type.sampled.image"
217: String "@type.sampled.image"
221: String "displacementMap"
235: String "modelview"
240: String "lightPos"
243: String "frustumPlanes"
245: String "tessellatedEdgeSize"
249: String "viewportDim"
253: String "UBO"
257: String "ubo"
296: String "outViewVec"
304: String "outLightVec"
316: String "outWorldPos"
323: String "outEyePos"
Name 14 "main"
Name 34 "uv1"
Name 42 "inUV"
Name 59 "gl_TessCoord"
Name 69 "uv2"
Name 86 "outUV"
Name 98 "n1"
Name 105 "inNormal"
Name 118 "n2"
Name 133 "outNormal"
Name 147 "pos1"
Name 153 "gl_PerVertex"
MemberName 153(gl_PerVertex) 0 "gl_Position"
MemberName 153(gl_PerVertex) 1 "gl_PointSize"
MemberName 153(gl_PerVertex) 2 "gl_ClipDistance"
MemberName 153(gl_PerVertex) 3 "gl_CullDistance"
Name 169 "gl_in"
Name 183 "pos2"
Name 197 "pos"
Name 219 "displacementMap"
Name 233 "UBO"
MemberName 233(UBO) 0 "projection"
MemberName 233(UBO) 1 "modelview"
MemberName 233(UBO) 2 "lightPos"
MemberName 233(UBO) 3 "frustumPlanes"
MemberName 233(UBO) 4 "displacementFactor"
MemberName 233(UBO) 5 "tessellationFactor"
MemberName 233(UBO) 6 "viewportDim"
MemberName 233(UBO) 7 "tessellatedEdgeSize"
Name 255 "ubo"
Name 270 "gl_PerVertex"
MemberName 270(gl_PerVertex) 0 "gl_Position"
MemberName 270(gl_PerVertex) 1 "gl_PointSize"
MemberName 270(gl_PerVertex) 2 "gl_ClipDistance"
MemberName 270(gl_PerVertex) 3 "gl_CullDistance"
Name 280 ""
Name 294 "outViewVec"
Name 302 "outLightVec"
Name 314 "outWorldPos"
Name 321 "outEyePos"
Decorate 42(inUV) Location 1
Decorate 59(gl_TessCoord) BuiltIn TessCoord
Decorate 86(outUV) Location 1
Decorate 105(inNormal) Location 0
Decorate 133(outNormal) Location 0
MemberDecorate 153(gl_PerVertex) 0 BuiltIn Position
MemberDecorate 153(gl_PerVertex) 1 BuiltIn PointSize
MemberDecorate 153(gl_PerVertex) 2 BuiltIn ClipDistance
MemberDecorate 153(gl_PerVertex) 3 BuiltIn CullDistance
Decorate 153(gl_PerVertex) Block
Decorate 219(displacementMap) DescriptorSet 0
Decorate 219(displacementMap) Binding 1
Decorate 231 ArrayStride 16
MemberDecorate 233(UBO) 0 ColMajor
MemberDecorate 233(UBO) 0 Offset 0
MemberDecorate 233(UBO) 0 MatrixStride 16
MemberDecorate 233(UBO) 1 ColMajor
MemberDecorate 233(UBO) 1 Offset 64
MemberDecorate 233(UBO) 1 MatrixStride 16
MemberDecorate 233(UBO) 2 Offset 128
MemberDecorate 233(UBO) 3 Offset 144
MemberDecorate 233(UBO) 4 Offset 240
MemberDecorate 233(UBO) 5 Offset 244
MemberDecorate 233(UBO) 6 Offset 248
MemberDecorate 233(UBO) 7 Offset 256
Decorate 233(UBO) Block
Decorate 255(ubo) DescriptorSet 0
Decorate 255(ubo) Binding 0
MemberDecorate 270(gl_PerVertex) 0 BuiltIn Position
MemberDecorate 270(gl_PerVertex) 1 BuiltIn PointSize
MemberDecorate 270(gl_PerVertex) 2 BuiltIn ClipDistance
MemberDecorate 270(gl_PerVertex) 3 BuiltIn CullDistance
Decorate 270(gl_PerVertex) Block
Decorate 294(outViewVec) Location 2
Decorate 302(outLightVec) Location 3
Decorate 314(outWorldPos) Location 5
Decorate 321(outEyePos) Location 4
4: TypeVoid
5: TypeFunction 4
7: TypeInt 32 0
10: 7(int) Constant 32
11: 7(int) Constant 6
12: 7(int) Constant 0
9: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 8 10 11 12
13: 7(int) Constant 3
6: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 8(DebugTypeFunction) 13 4
17: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 35(DebugSource) 1 18
20: 7(int) Constant 1
21: 7(int) Constant 4
22: 7(int) Constant 2
19: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 1(DebugCompilationUnit) 20 21 17 22
16: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 20(DebugFunction) 15 6 17 12 12 19 15 13 12
27: 7(int) Constant 56
28: TypeFloat 32
30: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 29 10 13 12
31: TypeVector 28(float) 2
32: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 30 22
33: TypePointer Function 31(fvec2)
35: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 36 32 17 27 12 16 21
38: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 31(DebugExpression)
39: TypeArray 31(fvec2) 10
40: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 32 10
41: TypePointer Input 39
42(inUV): 41(ptr) Variable Input
45: 7(int) Constant 8
43: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 44 40 17 27 12 19 44 42(inUV) 45
46: TypeInt 32 1
48: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 47 10 21 12
49: 46(int) Constant 0
50: TypePointer Input 31(fvec2)
53: 46(int) Constant 1
56: TypeVector 28(float) 3
57: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 30 13
58: TypePointer Input 56(fvec3)
59(gl_TessCoord): 58(ptr) Variable Input
60: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 61 57 17 27 12 19 61 59(gl_TessCoord) 45
62: TypePointer Input 28(float)
68: 7(int) Constant 57
70: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 71 32 17 68 12 16 21
73: 46(int) Constant 3
76: 46(int) Constant 2
84: 7(int) Constant 58
85: TypePointer Output 31(fvec2)
86(outUV): 85(ptr) Variable Output
87: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 88 32 17 84 12 19 88 86(outUV) 45
96: 7(int) Constant 60
97: TypePointer Function 56(fvec3)
99: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 100 57 17 96 12 16 21
102: TypeArray 56(fvec3) 10
103: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 57 10
104: TypePointer Input 102
105(inNormal): 104(ptr) Variable Input
106: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 107 103 17 96 12 19 107 105(inNormal) 45
117: 7(int) Constant 61
119: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 120 57 17 117 12 16 21
131: 7(int) Constant 62
132: TypePointer Output 56(fvec3)
133(outNormal): 132(ptr) Variable Output
134: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 135 57 17 131 12 19 135 133(outNormal) 45
143: 7(int) Constant 65
144: TypeVector 28(float) 4
145: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 30 21
146: TypePointer Function 144(fvec4)
148: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 149 145 17 143 12 16 21
151: TypeArray 28(float) 20
152: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 30 20
153(gl_PerVertex): TypeStruct 144(fvec4) 28(float) 151 151
156: 7(int) Constant 1756
154: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 155 145 17 20 156 12 12 13
159: 7(int) Constant 1774
157: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 158 30 17 20 159 12 12 13
162: 7(int) Constant 1817
160: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 161 152 17 20 162 12 12 13
163: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 161 152 17 20 162 12 12 13
164: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 165 20 17 143 12 19 165 12 13 154 157 160 163
166: TypeArray 153(gl_PerVertex) 10
167: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 164 10
168: TypePointer Input 166
169(gl_in): 168(ptr) Variable Input
170: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 171 167 17 143 12 19 171 169(gl_in) 45
172: TypePointer Input 144(fvec4)
182: 7(int) Constant 66
184: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 185 145 17 182 12 16 21
196: 7(int) Constant 67
198: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 199 145 17 196 12 16 21
208: 7(int) Constant 69
209: TypeImage 28(float) 2D sampled format:Unknown
213: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 0(DebugInfoNone)
210: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 211 12 17 208 12 19 212 213 13
214: TypeSampledImage 209
215: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 216 12 17 208 12 19 217 213 13
218: TypePointer UniformConstant 214
219(displacementMap): 218(ptr) Variable UniformConstant
220: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 221 215 17 208 12 19 221 219(displacementMap) 45
224: 28(float) Constant 0
227: TypeMatrix 144(fvec4) 4
229: TypeBool
230: 229(bool) ConstantTrue
228: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 108(DebugTypeMatrix) 145 21 230
231: TypeArray 144(fvec4) 11
232: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 145 11
233(UBO): TypeStruct 227 227 144(fvec4) 231 28(float) 28(float) 31(fvec2) 28(float)
236: 7(int) Constant 30
237: 7(int) Constant 7
234: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 235 228 17 236 237 12 12 13
238: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 235 228 17 236 237 12 12 13
241: 7(int) Constant 31
239: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 240 145 17 241 237 12 12 13
242: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 243 232 17 10 237 12 12 13
246: 7(int) Constant 36
244: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 245 30 17 246 45 12 12 13
247: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 245 30 17 246 45 12 12 13
250: 7(int) Constant 35
248: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 249 32 17 250 237 12 12 13
251: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 245 30 17 246 45 12 12 13
252: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 253 20 17 208 12 19 253 12 13 234 238 239 242 244 247 248 251
254: TypePointer Uniform 233(UBO)
255(ubo): 254(ptr) Variable Uniform
256: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 257 252 17 208 12 19 257 255(ubo) 45
258: 46(int) Constant 4
259: TypePointer Uniform 28(float)
263: TypePointer Function 28(float)
269: 7(int) Constant 71
270(gl_PerVertex): TypeStruct 144(fvec4) 28(float) 151 151
272: 7(int) Constant 165
271: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 155 145 17 20 272 12 12 13
274: 7(int) Constant 183
273: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 158 30 17 20 274 12 12 13
276: 7(int) Constant 226
275: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 161 152 17 20 276 12 12 13
277: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 161 152 17 20 276 12 12 13
278: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 165 20 17 269 12 19 165 12 13 271 273 275 277
279: TypePointer Output 270(gl_PerVertex)
280: 279(ptr) Variable Output
281: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 1 278 17 269 12 19 1 280 45
282: TypePointer Uniform 227
290: TypePointer Output 144(fvec4)
293: 7(int) Constant 74
294(outViewVec): 132(ptr) Variable Output
295: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 296 57 17 293 12 19 296 294(outViewVec) 45
301: 7(int) Constant 75
302(outLightVec): 132(ptr) Variable Output
303: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 304 57 17 301 12 19 304 302(outLightVec) 45
305: TypePointer Uniform 144(fvec4)
313: 7(int) Constant 76
314(outWorldPos): 132(ptr) Variable Output
315: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 316 57 17 313 12 19 316 314(outWorldPos) 45
320: 7(int) Constant 77
321(outEyePos): 132(ptr) Variable Output
322: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 323 57 17 320 12 19 323 321(outEyePos) 45
Line 1 53 11
14(main): 4 Function None 5
23: Label
34(uv1): 33(ptr) Variable Function
69(uv2): 33(ptr) Variable Function
98(n1): 97(ptr) Variable Function
118(n2): 97(ptr) Variable Function
147(pos1): 146(ptr) Variable Function
183(pos2): 146(ptr) Variable Function
197(pos): 146(ptr) Variable Function
24: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 101(DebugFunctionDefinition) 16 14(main)
25: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 16
26: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 27 27 12 12
37: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 35 34(uv1) 38
51: 50(ptr) AccessChain 42(inUV) 49
52: 31(fvec2) Load 51
54: 50(ptr) AccessChain 42(inUV) 53
55: 31(fvec2) Load 54
63: 62(ptr) AccessChain 59(gl_TessCoord) 12
64: 28(float) Load 63
65: 31(fvec2) CompositeConstruct 64 64
66: 31(fvec2) ExtInst 3(GLSL.std.450) 46(FMix) 52 55 65
Store 34(uv1) 66
67: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 68 68 12 12
72: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 70 69(uv2) 38
74: 50(ptr) AccessChain 42(inUV) 73
75: 31(fvec2) Load 74
77: 50(ptr) AccessChain 42(inUV) 76
78: 31(fvec2) Load 77
79: 62(ptr) AccessChain 59(gl_TessCoord) 12
80: 28(float) Load 79
81: 31(fvec2) CompositeConstruct 80 80
82: 31(fvec2) ExtInst 3(GLSL.std.450) 46(FMix) 75 78 81
Store 69(uv2) 82
83: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 84 84 12 12
89: 31(fvec2) Load 34(uv1)
90: 31(fvec2) Load 69(uv2)
91: 62(ptr) AccessChain 59(gl_TessCoord) 20
92: 28(float) Load 91
93: 31(fvec2) CompositeConstruct 92 92
94: 31(fvec2) ExtInst 3(GLSL.std.450) 46(FMix) 89 90 93
Store 86(outUV) 94
95: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 96 96 12 12
101: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 99 98(n1) 38
108: 58(ptr) AccessChain 105(inNormal) 49
109: 56(fvec3) Load 108
110: 58(ptr) AccessChain 105(inNormal) 53
111: 56(fvec3) Load 110
112: 62(ptr) AccessChain 59(gl_TessCoord) 12
113: 28(float) Load 112
114: 56(fvec3) CompositeConstruct 113 113 113
115: 56(fvec3) ExtInst 3(GLSL.std.450) 46(FMix) 109 111 114
Store 98(n1) 115
116: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 117 117 12 12
121: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 119 118(n2) 38
122: 58(ptr) AccessChain 105(inNormal) 73
123: 56(fvec3) Load 122
124: 58(ptr) AccessChain 105(inNormal) 76
125: 56(fvec3) Load 124
126: 62(ptr) AccessChain 59(gl_TessCoord) 12
127: 28(float) Load 126
128: 56(fvec3) CompositeConstruct 127 127 127
129: 56(fvec3) ExtInst 3(GLSL.std.450) 46(FMix) 123 125 128
Store 118(n2) 129
130: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 131 131 12 12
136: 56(fvec3) Load 98(n1)
137: 56(fvec3) Load 118(n2)
138: 62(ptr) AccessChain 59(gl_TessCoord) 20
139: 28(float) Load 138
140: 56(fvec3) CompositeConstruct 139 139 139
141: 56(fvec3) ExtInst 3(GLSL.std.450) 46(FMix) 136 137 140
Store 133(outNormal) 141
142: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 143 143 12 12
150: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 148 147(pos1) 38
173: 172(ptr) AccessChain 169(gl_in) 49 49
174: 144(fvec4) Load 173
175: 172(ptr) AccessChain 169(gl_in) 53 49
176: 144(fvec4) Load 175
177: 62(ptr) AccessChain 59(gl_TessCoord) 12
178: 28(float) Load 177
179: 144(fvec4) CompositeConstruct 178 178 178 178
180: 144(fvec4) ExtInst 3(GLSL.std.450) 46(FMix) 174 176 179
Store 147(pos1) 180
181: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 182 182 12 12
186: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 184 183(pos2) 38
187: 172(ptr) AccessChain 169(gl_in) 73 49
188: 144(fvec4) Load 187
189: 172(ptr) AccessChain 169(gl_in) 76 49
190: 144(fvec4) Load 189
191: 62(ptr) AccessChain 59(gl_TessCoord) 12
192: 28(float) Load 191
193: 144(fvec4) CompositeConstruct 192 192 192 192
194: 144(fvec4) ExtInst 3(GLSL.std.450) 46(FMix) 188 190 193
Store 183(pos2) 194
195: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 196 196 12 12
200: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 198 197(pos) 38
201: 144(fvec4) Load 147(pos1)
202: 144(fvec4) Load 183(pos2)
203: 62(ptr) AccessChain 59(gl_TessCoord) 20
204: 28(float) Load 203
205: 144(fvec4) CompositeConstruct 204 204 204 204
206: 144(fvec4) ExtInst 3(GLSL.std.450) 46(FMix) 201 202 205
Store 197(pos) 206
207: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 208 208 12 12
222: 214 Load 219(displacementMap)
223: 31(fvec2) Load 86(outUV)
225: 144(fvec4) ImageSampleExplicitLod 222 223 Lod 224
226: 28(float) CompositeExtract 225 0
260: 259(ptr) AccessChain 255(ubo) 258
261: 28(float) Load 260
262: 28(float) FMul 226 261
264: 263(ptr) AccessChain 197(pos) 20
265: 28(float) Load 264
266: 28(float) FSub 265 262
267: 263(ptr) AccessChain 197(pos) 20
Store 267 266
268: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 269 269 12 12
283: 282(ptr) AccessChain 255(ubo) 49
284: 227 Load 283
285: 282(ptr) AccessChain 255(ubo) 53
286: 227 Load 285
287: 227 MatrixTimesMatrix 284 286
288: 144(fvec4) Load 197(pos)
289: 144(fvec4) MatrixTimesVector 287 288
291: 290(ptr) AccessChain 280 49
Store 291 289
292: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 293 293 12 12
297: 144(fvec4) Load 197(pos)
298: 56(fvec3) VectorShuffle 297 297 0 1 2
299: 56(fvec3) FNegate 298
Store 294(outViewVec) 299
300: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 301 301 12 12
306: 305(ptr) AccessChain 255(ubo) 76
307: 144(fvec4) Load 306
308: 56(fvec3) VectorShuffle 307 307 0 1 2
309: 56(fvec3) Load 294(outViewVec)
310: 56(fvec3) FAdd 308 309
311: 56(fvec3) ExtInst 3(GLSL.std.450) 69(Normalize) 310
Store 302(outLightVec) 311
312: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 313 313 12 12
317: 144(fvec4) Load 197(pos)
318: 56(fvec3) VectorShuffle 317 317 0 1 2
Store 314(outWorldPos) 318
319: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 320 320 12 12
324: 282(ptr) AccessChain 255(ubo) 53
325: 227 Load 324
326: 144(fvec4) Load 197(pos)
327: 144(fvec4) MatrixTimesVector 325 326
328: 28(float) CompositeExtract 327 0
329: 28(float) CompositeExtract 327 1
330: 28(float) CompositeExtract 327 2
331: 56(fvec3) CompositeConstruct 328 329 330
Store 321(outEyePos) 331
Return
FunctionEnd

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,458 +1,499 @@
spv.debuginfo.hlsl.geom
Validation failed
// Module Version 10000
// Generated by (magic number): 8000b
// Id's are bound by 322
// Id's are bound by 353
Capability Geometry
Capability MultiViewport
Extension "SPV_KHR_non_semantic_info"
1: ExtInstImport "NonSemantic.Shader.DebugInfo.100"
2: ExtInstImport "GLSL.std.450"
2: ExtInstImport "NonSemantic.Shader.DebugInfo.100"
3: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Geometry 5 "main" 228 235 240 246 251 256 261 271 278 283 307 310
ExecutionMode 5 Triangles
ExecutionMode 5 Invocations 2
ExecutionMode 5 OutputTriangleStrip
ExecutionMode 5 OutputVertices 3
EntryPoint Geometry 6 "main" 255 261 266 272 277 282 287 302 309 314 338 341
ExecutionMode 6 Triangles
ExecutionMode 6 Invocations 2
ExecutionMode 6 OutputTriangleStrip
ExecutionMode 6 OutputVertices 3
1: String ""
9: String "float"
12: String "uint"
24: String "Pos"
26: String ""
30: String "Color"
35: String "VSOutput"
46: String "PrimitiveID"
51: String "LightVec"
57: String "GSOutput"
67: String "@main"
73: String "input"
77: String "outStream"
81: String "InvocationID"
87: String "int"
92: String "i"
104: String "bool"
109: String "output"
130: String "projection"
134: String "modelview"
138: String "lightPos"
142: String "UBO"
146: String "ubo"
177: String "pos"
185: String "worldPos"
195: String "lPos"
230: String "outStream.Pos"
237: String "outStream.ViewportIndex"
242: String "outStream.PrimitiveID"
248: String "outStream.Normal"
253: String "outStream.Color"
258: String "outStream.ViewVec"
263: String "outStream.LightVec"
Name 5 "main"
Name 22 "VSOutput"
MemberName 22(VSOutput) 0 "Pos"
MemberName 22(VSOutput) 1 "Normal"
MemberName 22(VSOutput) 2 "Color"
Name 42 "GSOutput"
MemberName 42(GSOutput) 0 "Pos"
MemberName 42(GSOutput) 1 "ViewportIndex"
MemberName 42(GSOutput) 2 "PrimitiveID"
MemberName 42(GSOutput) 3 "Normal"
MemberName 42(GSOutput) 4 "Color"
MemberName 42(GSOutput) 5 "ViewVec"
MemberName 42(GSOutput) 6 "LightVec"
Name 66 "@main(struct-VSOutput-vf4-vf3-vf31[3];struct-GSOutput-vf4-u1-u1-vf3-vf3-vf3-vf31;u1;u1;"
Name 62 "input"
Name 63 "outStream"
Name 64 "InvocationID"
Name 65 "PrimitiveID"
Name 90 "i"
Name 107 "output"
Name 128 "UBO"
MemberName 128(UBO) 0 "projection"
MemberName 128(UBO) 1 "modelview"
MemberName 128(UBO) 2 "lightPos"
Name 144 "ubo"
MemberName 144(ubo) 0 "ubo"
Name 150 ""
Name 175 "pos"
Name 183 "worldPos"
Name 193 "lPos"
Name 228 "outStream.Pos"
Name 235 "outStream.ViewportIndex"
Name 240 "outStream.PrimitiveID"
Name 246 "outStream.Normal"
Name 251 "outStream.Color"
Name 256 "outStream.ViewVec"
Name 261 "outStream.LightVec"
Name 268 "input"
Name 271 "input.Pos"
Name 278 "input.Normal"
Name 283 "input.Color"
Name 305 "InvocationID"
Name 307 "InvocationID"
Name 309 "PrimitiveID"
Name 310 "PrimitiveID"
Name 312 "outStream"
Name 313 "param"
Name 315 "param"
Name 316 "param"
Name 318 "param"
Decorate 124 ArrayStride 64
Decorate 126 ArrayStride 64
MemberDecorate 128(UBO) 0 RowMajor
MemberDecorate 128(UBO) 0 Offset 0
MemberDecorate 128(UBO) 0 MatrixStride 16
MemberDecorate 128(UBO) 1 RowMajor
MemberDecorate 128(UBO) 1 Offset 128
MemberDecorate 128(UBO) 1 MatrixStride 16
MemberDecorate 128(UBO) 2 Offset 256
MemberDecorate 144(ubo) 0 Offset 0
Decorate 144(ubo) Block
Decorate 150 DescriptorSet 0
Decorate 150 Binding 0
Decorate 228(outStream.Pos) BuiltIn Position
Decorate 235(outStream.ViewportIndex) BuiltIn ViewportIndex
Decorate 240(outStream.PrimitiveID) BuiltIn PrimitiveId
Decorate 246(outStream.Normal) Location 0
Decorate 251(outStream.Color) Location 1
Decorate 256(outStream.ViewVec) Location 2
Decorate 261(outStream.LightVec) Location 3
Decorate 271(input.Pos) BuiltIn Position
Decorate 278(input.Normal) Location 0
Decorate 283(input.Color) Location 1
Decorate 307(InvocationID) BuiltIn InvocationId
Decorate 310(PrimitiveID) BuiltIn PrimitiveId
3: TypeVoid
4: TypeFunction 3
7: TypeFloat 32
10: TypeInt 32 0
13: 10(int) Constant 32
14: 10(int) Constant 6
15: 10(int) Constant 0
11: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 12 13 14 15
16: 10(int) Constant 3
8: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 9 13 16 15
17: TypeVector 7(float) 4
18: 10(int) Constant 4
19: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 6(FSign) 8 18
20: TypeVector 7(float) 3
21: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 6(FSign) 8 16
22(VSOutput): TypeStruct 17(fvec4) 20(fvec3) 20(fvec3)
25: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 35(Modf) 0 26
27: 10(int) Constant 37
28: 10(int) Constant 13
23: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 24 19 25 27 28 15 15 16
31: 10(int) Constant 39
32: 10(int) Constant 34
29: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 30 21 25 31 32 15 15 16
33: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 30 21 25 31 32 15 15 16
36: 10(int) Constant 1
38: 10(int) Constant 5
37: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 1(Round) 36 18 25 38
34: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(Fract) 35 36 25 15 15 37 35 15 16 23 29 33
39: TypeArray 22(VSOutput) 16
40: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 5(SAbs) 34 16
41: TypePointer Function 39
42(GSOutput): TypeStruct 17(fvec4) 10(int) 10(int) 20(fvec3) 20(fvec3) 20(fvec3) 20(fvec3)
44: 10(int) Constant 44
43: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 24 19 25 44 28 15 15 16
47: 10(int) Constant 46
48: 10(int) Constant 19
45: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 46 11 25 47 48 15 15 16
49: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 46 11 25 47 48 15 15 16
52: 10(int) Constant 50
50: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 51 21 25 52 27 15 15 16
53: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 51 21 25 52 27 15 15 16
54: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 51 21 25 52 27 15 15 16
55: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 51 21 25 52 27 15 15 16
56: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(Fract) 57 36 25 15 15 37 57 15 16 43 45 49 50 53 54 55
58: TypePointer Function 42(GSOutput)
59: TypePointer Function 10(int)
60: TypeFunction 3 41(ptr) 58(ptr) 59(ptr) 59(ptr)
61: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 8(Floor) 16 3 40 56 11 11
68: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 20(Cosh) 67 61 25 15 15 37 67 16 15
72: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 73 40 25 15 15 68 18 36
75: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 31(Sqrt)
78: 10(int) Constant 2
76: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 77 56 25 15 15 68 18 78
80: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 81 11 25 15 15 68 18 16
83: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 46 11 25 15 15 68 18 18
86: TypeInt 32 1
88: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 87 13 18 15
89: TypePointer Function 86(int)
93: 10(int) Constant 57
91: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 92 88 25 93 15 68 18
95: 86(int) Constant 0
102: 86(int) Constant 3
103: TypeBool
105: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(RoundEven) 104 13 78 15
110: 10(int) Constant 59
108: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 109 56 25 110 15 68 18
112: 7(float) Constant 0
113: 17(fvec4) ConstantComposite 112 112 112 112
114: 20(fvec3) ConstantComposite 112 112 112
115:42(GSOutput) ConstantComposite 113 15 15 114 114 114 114
117: 86(int) Constant 1
118: TypePointer Function 20(fvec3)
121: TypeMatrix 17(fvec4) 4
123: 103(bool) ConstantTrue
122: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 108 19 18 123
124: TypeArray 121 78
125: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 5(SAbs) 122 78
126: TypeArray 121 78
127: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 5(SAbs) 122 78
128(UBO): TypeStruct 124 126 17(fvec4)
131: 10(int) Constant 28
132: 10(int) Constant 21
129: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 130 125 25 131 132 15 15 16
135: 10(int) Constant 29
136: 10(int) Constant 20
133: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 134 127 25 135 136 15 15 16
139: 10(int) Constant 30
140: 10(int) Constant 17
137: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 138 19 25 139 140 15 15 16
143: 10(int) Constant 60
141: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(Fract) 142 36 25 143 15 37 142 15 16 129 133 137
144(ubo): TypeStruct 128(UBO)
147: 10(int) Constant 33
145: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(Radians) 146 141 25 147 27 15 15 16
148: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(Fract) 146 36 25 143 15 37 146 15 16 145
149: TypePointer Uniform 144(ubo)
150: 149(ptr) Variable Uniform
152: 10(int) Constant 8
151: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(Atan) 26 148 25 143 15 37 26 150 152
154: TypePointer Uniform 121
157: TypeMatrix 20(fvec3) 3
158: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 108 21 16 123
168: 86(int) Constant 4
170: 86(int) Constant 2
174: TypePointer Function 17(fvec4)
178: 10(int) Constant 63
176: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 177 19 25 178 15 68 18
186: 10(int) Constant 64
184: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 185 19 25 186 15 68 18
196: 10(int) Constant 66
194: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(Pow) 195 21 25 196 15 68 18
198: TypePointer Uniform 17(fvec4)
206: 86(int) Constant 6
212: 86(int) Constant 5
227: TypePointer Output 17(fvec4)
228(outStream.Pos): 227(ptr) Variable Output
231: 10(int) Constant 75
229: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(Atan) 230 19 25 231 15 37 230 228(outStream.Pos) 152
234: TypePointer Output 10(int)
235(outStream.ViewportIndex): 234(ptr) Variable Output
236: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(Atan) 237 11 25 231 15 37 237 235(outStream.ViewportIndex) 152
240(outStream.PrimitiveID): 234(ptr) Variable Output
241: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(Atan) 242 11 25 231 15 37 242 240(outStream.PrimitiveID) 152
245: TypePointer Output 20(fvec3)
246(outStream.Normal): 245(ptr) Variable Output
247: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(Atan) 248 21 25 231 15 37 248 246(outStream.Normal) 152
251(outStream.Color): 245(ptr) Variable Output
252: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(Atan) 253 21 25 231 15 37 253 251(outStream.Color) 152
256(outStream.ViewVec): 245(ptr) Variable Output
257: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(Atan) 258 21 25 231 15 37 258 256(outStream.ViewVec) 152
261(outStream.LightVec): 245(ptr) Variable Output
262: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(Atan) 263 21 25 231 15 37 263 261(outStream.LightVec) 152
269: TypeArray 17(fvec4) 16
270: TypePointer Input 269
271(input.Pos): 270(ptr) Variable Input
272: TypePointer Input 17(fvec4)
276: TypeArray 20(fvec3) 16
277: TypePointer Input 276
278(input.Normal): 277(ptr) Variable Input
279: TypePointer Input 20(fvec3)
283(input.Color): 277(ptr) Variable Input
306: TypePointer Input 10(int)
307(InvocationID): 306(ptr) Variable Input
310(PrimitiveID): 306(ptr) Variable Input
5(main): 3 Function None 4
6: Label
268(input): 41(ptr) Variable Function
305(InvocationID): 59(ptr) Variable Function
309(PrimitiveID): 59(ptr) Variable Function
312(outStream): 58(ptr) Variable Function
313(param): 41(ptr) Variable Function
315(param): 58(ptr) Variable Function
316(param): 59(ptr) Variable Function
318(param): 59(ptr) Variable Function
273: 272(ptr) AccessChain 271(input.Pos) 95
274: 17(fvec4) Load 273
275: 174(ptr) AccessChain 268(input) 95 95
Store 275 274
280: 279(ptr) AccessChain 278(input.Normal) 95
281: 20(fvec3) Load 280
282: 118(ptr) AccessChain 268(input) 95 117
Store 282 281
284: 279(ptr) AccessChain 283(input.Color) 95
285: 20(fvec3) Load 284
286: 118(ptr) AccessChain 268(input) 95 170
Store 286 285
287: 272(ptr) AccessChain 271(input.Pos) 117
288: 17(fvec4) Load 287
289: 174(ptr) AccessChain 268(input) 117 95
Store 289 288
290: 279(ptr) AccessChain 278(input.Normal) 117
291: 20(fvec3) Load 290
292: 118(ptr) AccessChain 268(input) 117 117
Store 292 291
293: 279(ptr) AccessChain 283(input.Color) 117
294: 20(fvec3) Load 293
295: 118(ptr) AccessChain 268(input) 117 170
Store 295 294
296: 272(ptr) AccessChain 271(input.Pos) 170
297: 17(fvec4) Load 296
298: 174(ptr) AccessChain 268(input) 170 95
Store 298 297
299: 279(ptr) AccessChain 278(input.Normal) 170
300: 20(fvec3) Load 299
301: 118(ptr) AccessChain 268(input) 170 117
Store 301 300
302: 279(ptr) AccessChain 283(input.Color) 170
303: 20(fvec3) Load 302
304: 118(ptr) AccessChain 268(input) 170 170
Store 304 303
308: 10(int) Load 307(InvocationID)
Store 305(InvocationID) 308
311: 10(int) Load 310(PrimitiveID)
Store 309(PrimitiveID) 311
314: 39 Load 268(input)
Store 313(param) 314
317: 10(int) Load 305(InvocationID)
Store 316(param) 317
319: 10(int) Load 309(PrimitiveID)
Store 318(param) 319
320: 3 FunctionCall 66(@main(struct-VSOutput-vf4-vf3-vf31[3];struct-GSOutput-vf4-u1-u1-vf3-vf3-vf3-vf31;u1;u1;) 313(param) 315(param) 316(param) 318(param)
321:42(GSOutput) Load 315(param)
Store 312(outStream) 321
25: String "Pos"
27: String "// OpModuleProcessed auto-map-locations
// OpModuleProcessed auto-map-bindings
// OpModuleProcessed entry-point main
// OpModuleProcessed client vulkan100
// OpModuleProcessed target-env vulkan1.0
// OpModuleProcessed keep-uncalled
// OpModuleProcessed hlsl-offsets
#line 1
"
31: String "Color"
36: String "VSOutput"
47: String "PrimitiveID"
52: String "LightVec"
58: String "GSOutput"
68: String "@main"
74: String "input"
78: String "outStream"
82: String "InvocationID"
91: String "int"
96: String "i"
111: String "bool"
119: String "output"
141: String "projection"
145: String "modelview"
149: String "lightPos"
153: String "UBO"
156: String "ubo"
191: String "pos"
200: String "worldPos"
211: String "lPos"
257: String "outStream.Pos"
263: String "outStream.ViewportIndex"
268: String "outStream.PrimitiveID"
274: String "outStream.Normal"
279: String "outStream.Color"
284: String "outStream.ViewVec"
289: String "outStream.LightVec"
Name 6 "main"
Name 23 "VSOutput"
MemberName 23(VSOutput) 0 "Pos"
MemberName 23(VSOutput) 1 "Normal"
MemberName 23(VSOutput) 2 "Color"
Name 43 "GSOutput"
MemberName 43(GSOutput) 0 "Pos"
MemberName 43(GSOutput) 1 "ViewportIndex"
MemberName 43(GSOutput) 2 "PrimitiveID"
MemberName 43(GSOutput) 3 "Normal"
MemberName 43(GSOutput) 4 "Color"
MemberName 43(GSOutput) 5 "ViewVec"
MemberName 43(GSOutput) 6 "LightVec"
Name 67 "@main(struct-VSOutput-vf4-vf3-vf31[3];struct-GSOutput-vf4-u1-u1-vf3-vf3-vf3-vf31;u1;u1;"
Name 63 "input"
Name 64 "outStream"
Name 65 "InvocationID"
Name 66 "PrimitiveID"
Name 94 "i"
Name 117 "output"
Name 139 "UBO"
MemberName 139(UBO) 0 "projection"
MemberName 139(UBO) 1 "modelview"
MemberName 139(UBO) 2 "lightPos"
Name 154 "ubo"
MemberName 154(ubo) 0 "ubo"
Name 160 ""
Name 189 "pos"
Name 198 "worldPos"
Name 209 "lPos"
Name 255 "outStream.Pos"
Name 261 "outStream.ViewportIndex"
Name 266 "outStream.PrimitiveID"
Name 272 "outStream.Normal"
Name 277 "outStream.Color"
Name 282 "outStream.ViewVec"
Name 287 "outStream.LightVec"
Name 299 "input"
Name 302 "input.Pos"
Name 309 "input.Normal"
Name 314 "input.Color"
Name 336 "InvocationID"
Name 338 "InvocationID"
Name 340 "PrimitiveID"
Name 341 "PrimitiveID"
Name 343 "outStream"
Name 344 "param"
Name 346 "param"
Name 347 "param"
Name 349 "param"
Decorate 135 ArrayStride 64
Decorate 137 ArrayStride 64
MemberDecorate 139(UBO) 0 RowMajor
MemberDecorate 139(UBO) 0 Offset 0
MemberDecorate 139(UBO) 0 MatrixStride 16
MemberDecorate 139(UBO) 1 RowMajor
MemberDecorate 139(UBO) 1 Offset 128
MemberDecorate 139(UBO) 1 MatrixStride 16
MemberDecorate 139(UBO) 2 Offset 256
MemberDecorate 154(ubo) 0 Offset 0
Decorate 154(ubo) Block
Decorate 160 DescriptorSet 0
Decorate 160 Binding 0
Decorate 255(outStream.Pos) BuiltIn Position
Decorate 261(outStream.ViewportIndex) BuiltIn ViewportIndex
Decorate 266(outStream.PrimitiveID) BuiltIn PrimitiveId
Decorate 272(outStream.Normal) Location 0
Decorate 277(outStream.Color) Location 1
Decorate 282(outStream.ViewVec) Location 2
Decorate 287(outStream.LightVec) Location 3
Decorate 302(input.Pos) BuiltIn Position
Decorate 309(input.Normal) Location 0
Decorate 314(input.Color) Location 1
Decorate 338(InvocationID) BuiltIn InvocationId
Decorate 341(PrimitiveID) BuiltIn PrimitiveId
4: TypeVoid
5: TypeFunction 4
8: TypeFloat 32
11: TypeInt 32 0
14: 11(int) Constant 32
15: 11(int) Constant 6
16: 11(int) Constant 0
13: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 12 14 15 16
17: 11(int) Constant 3
10: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 9 14 17 16
18: TypeVector 8(float) 4
19: 11(int) Constant 4
20: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 10 19
21: TypeVector 8(float) 3
22: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 10 17
23(VSOutput): TypeStruct 18(fvec4) 21(fvec3) 21(fvec3)
26: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 35(DebugSource) 1 27
28: 11(int) Constant 37
29: 11(int) Constant 13
24: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 25 20 26 28 29 16 16 17
32: 11(int) Constant 39
33: 11(int) Constant 34
30: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 31 22 26 32 33 16 16 17
34: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 31 22 26 32 33 16 16 17
37: 11(int) Constant 1
39: 11(int) Constant 5
38: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 1(DebugCompilationUnit) 37 19 26 39
35: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 36 37 26 16 16 38 36 16 17 24 30 34
40: TypeArray 23(VSOutput) 17
41: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 35 17
42: TypePointer Function 40
43(GSOutput): TypeStruct 18(fvec4) 11(int) 11(int) 21(fvec3) 21(fvec3) 21(fvec3) 21(fvec3)
45: 11(int) Constant 44
44: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 25 20 26 45 29 16 16 17
48: 11(int) Constant 46
49: 11(int) Constant 19
46: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 47 13 26 48 49 16 16 17
50: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 47 13 26 48 49 16 16 17
53: 11(int) Constant 50
51: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 52 22 26 53 28 16 16 17
54: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 52 22 26 53 28 16 16 17
55: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 52 22 26 53 28 16 16 17
56: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 52 22 26 53 28 16 16 17
57: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 58 37 26 16 16 38 58 16 17 44 46 50 51 54 55 56
59: TypePointer Function 43(GSOutput)
60: TypePointer Function 11(int)
61: TypeFunction 4 42(ptr) 59(ptr) 60(ptr) 60(ptr)
62: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 8(DebugTypeFunction) 17 4 41 57 13 13
69: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 20(DebugFunction) 68 62 26 16 16 38 68 17 16
73: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 74 41 26 16 16 69 19 37
76: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 31(DebugExpression)
79: 11(int) Constant 2
77: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 78 57 26 16 16 69 19 79
81: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 82 13 26 16 16 69 19 17
84: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 47 13 26 16 16 69 19 19
89: 11(int) Constant 57
90: TypeInt 32 1
92: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 91 14 19 16
93: TypePointer Function 90(int)
95: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 96 92 26 89 16 69 19
98: 90(int) Constant 0
109: 90(int) Constant 3
110: TypeBool
112: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 111 14 79 16
116: 11(int) Constant 59
118: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 119 57 26 116 16 69 19
121: 8(float) Constant 0
122: 18(fvec4) ConstantComposite 121 121 121 121
123: 21(fvec3) ConstantComposite 121 121 121
124:43(GSOutput) ConstantComposite 122 16 16 123 123 123 123
126: 11(int) Constant 60
128: 90(int) Constant 1
129: TypePointer Function 21(fvec3)
132: TypeMatrix 18(fvec4) 4
134: 110(bool) ConstantTrue
133: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 108(DebugTypeMatrix) 20 19 134
135: TypeArray 132 79
136: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 133 79
137: TypeArray 132 79
138: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 133 79
139(UBO): TypeStruct 135 137 18(fvec4)
142: 11(int) Constant 28
143: 11(int) Constant 21
140: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 141 136 26 142 143 16 16 17
146: 11(int) Constant 29
147: 11(int) Constant 20
144: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 145 138 26 146 147 16 16 17
150: 11(int) Constant 30
151: 11(int) Constant 17
148: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 149 20 26 150 151 16 16 17
152: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 153 37 26 126 16 38 153 16 17 140 144 148
154(ubo): TypeStruct 139(UBO)
157: 11(int) Constant 33
155: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 156 152 26 157 28 16 16 17
158: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 156 37 26 126 16 38 156 16 17 155
159: TypePointer Uniform 154(ubo)
160: 159(ptr) Variable Uniform
162: 11(int) Constant 8
161: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 1 158 26 126 16 38 1 160 162
164: TypePointer Uniform 132
167: TypeMatrix 21(fvec3) 3
168: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 108(DebugTypeMatrix) 22 17 134
179: 11(int) Constant 61
180: 90(int) Constant 4
182: 90(int) Constant 2
187: 11(int) Constant 63
188: TypePointer Function 18(fvec4)
190: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 191 20 26 187 16 69 19
197: 11(int) Constant 64
199: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 200 20 26 197 16 69 19
208: 11(int) Constant 66
210: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 211 22 26 208 16 69 19
213: TypePointer Uniform 18(fvec4)
222: 11(int) Constant 67
223: 90(int) Constant 6
230: 11(int) Constant 68
231: 90(int) Constant 5
237: 11(int) Constant 70
245: 11(int) Constant 73
249: 11(int) Constant 74
253: 11(int) Constant 75
254: TypePointer Output 18(fvec4)
255(outStream.Pos): 254(ptr) Variable Output
256: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 257 20 26 253 16 38 257 255(outStream.Pos) 162
260: TypePointer Output 11(int)
261(outStream.ViewportIndex): 260(ptr) Variable Output
262: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 263 13 26 253 16 38 263 261(outStream.ViewportIndex) 162
266(outStream.PrimitiveID): 260(ptr) Variable Output
267: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 268 13 26 253 16 38 268 266(outStream.PrimitiveID) 162
271: TypePointer Output 21(fvec3)
272(outStream.Normal): 271(ptr) Variable Output
273: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 274 22 26 253 16 38 274 272(outStream.Normal) 162
277(outStream.Color): 271(ptr) Variable Output
278: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 279 22 26 253 16 38 279 277(outStream.Color) 162
282(outStream.ViewVec): 271(ptr) Variable Output
283: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 284 22 26 253 16 38 284 282(outStream.ViewVec) 162
287(outStream.LightVec): 271(ptr) Variable Output
288: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 289 22 26 253 16 38 289 287(outStream.LightVec) 162
298: 11(int) Constant 78
300: TypeArray 18(fvec4) 17
301: TypePointer Input 300
302(input.Pos): 301(ptr) Variable Input
303: TypePointer Input 18(fvec4)
307: TypeArray 21(fvec3) 17
308: TypePointer Input 307
309(input.Normal): 308(ptr) Variable Input
310: TypePointer Input 21(fvec3)
314(input.Color): 308(ptr) Variable Input
337: TypePointer Input 11(int)
338(InvocationID): 337(ptr) Variable Input
341(PrimitiveID): 337(ptr) Variable Input
Line 1 56 1
6(main): 4 Function None 5
7: Label
299(input): 42(ptr) Variable Function
336(InvocationID): 60(ptr) Variable Function
340(PrimitiveID): 60(ptr) Variable Function
343(outStream): 59(ptr) Variable Function
344(param): 42(ptr) Variable Function
346(param): 59(ptr) Variable Function
347(param): 60(ptr) Variable Function
349(param): 60(ptr) Variable Function
Line 1 56 0
304: 303(ptr) AccessChain 302(input.Pos) 98
305: 18(fvec4) Load 304
306: 188(ptr) AccessChain 299(input) 98 98
Store 306 305
311: 310(ptr) AccessChain 309(input.Normal) 98
312: 21(fvec3) Load 311
313: 129(ptr) AccessChain 299(input) 98 128
Store 313 312
315: 310(ptr) AccessChain 314(input.Color) 98
316: 21(fvec3) Load 315
317: 129(ptr) AccessChain 299(input) 98 182
Store 317 316
318: 303(ptr) AccessChain 302(input.Pos) 128
319: 18(fvec4) Load 318
320: 188(ptr) AccessChain 299(input) 128 98
Store 320 319
321: 310(ptr) AccessChain 309(input.Normal) 128
322: 21(fvec3) Load 321
323: 129(ptr) AccessChain 299(input) 128 128
Store 323 322
324: 310(ptr) AccessChain 314(input.Color) 128
325: 21(fvec3) Load 324
326: 129(ptr) AccessChain 299(input) 128 182
Store 326 325
327: 303(ptr) AccessChain 302(input.Pos) 182
328: 18(fvec4) Load 327
329: 188(ptr) AccessChain 299(input) 182 98
Store 329 328
330: 310(ptr) AccessChain 309(input.Normal) 182
331: 21(fvec3) Load 330
332: 129(ptr) AccessChain 299(input) 182 128
Store 332 331
333: 310(ptr) AccessChain 314(input.Color) 182
334: 21(fvec3) Load 333
335: 129(ptr) AccessChain 299(input) 182 182
Store 335 334
339: 11(int) Load 338(InvocationID)
Store 336(InvocationID) 339
342: 11(int) Load 341(PrimitiveID)
Store 340(PrimitiveID) 342
345: 40 Load 299(input)
Store 344(param) 345
348: 11(int) Load 336(InvocationID)
Store 347(param) 348
350: 11(int) Load 340(PrimitiveID)
Store 349(param) 350
351: 4 FunctionCall 67(@main(struct-VSOutput-vf4-vf3-vf31[3];struct-GSOutput-vf4-u1-u1-vf3-vf3-vf3-vf31;u1;u1;) 344(param) 346(param) 347(param) 349(param)
352:43(GSOutput) Load 346(param)
Store 343(outStream) 352
Return
FunctionEnd
66(@main(struct-VSOutput-vf4-vf3-vf31[3];struct-GSOutput-vf4-u1-u1-vf3-vf3-vf3-vf31;u1;u1;): 3 Function None 60
62(input): 41(ptr) FunctionParameter
63(outStream): 58(ptr) FunctionParameter
64(InvocationID): 59(ptr) FunctionParameter
65(PrimitiveID): 59(ptr) FunctionParameter
69: Label
90(i): 89(ptr) Variable Function
107(output): 58(ptr) Variable Function
175(pos): 174(ptr) Variable Function
183(worldPos): 174(ptr) Variable Function
193(lPos): 118(ptr) Variable Function
70: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(Acosh) 68
71: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103 25 15 15 15 15
74: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 72 62(input) 75
79: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 76 63(outStream) 75
82: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 80 64(InvocationID) 75
84: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 83 65(PrimitiveID) 75
85: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 101 68 66(@main(struct-VSOutput-vf4-vf3-vf31[3];struct-GSOutput-vf4-u1-u1-vf3-vf3-vf3-vf31;u1;u1;)
94: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 91 90(i) 75
Store 90(i) 95
Branch 96
96: Label
LoopMerge 98 99 None
Branch 100
100: Label
101: 86(int) Load 90(i)
106: 103(bool) SLessThan 101 102
BranchConditional 106 97 98
97: Label
111: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 108 107(output) 75
Store 107(output) 115
116: 86(int) Load 90(i)
119: 118(ptr) AccessChain 62(input) 116 117
120: 20(fvec3) Load 119
153: 10(int) Load 64(InvocationID)
155: 154(ptr) AccessChain 150 95 117 153
156: 121 Load 155
159: 17(fvec4) CompositeExtract 156 0
160: 20(fvec3) VectorShuffle 159 159 0 1 2
161: 17(fvec4) CompositeExtract 156 1
162: 20(fvec3) VectorShuffle 161 161 0 1 2
163: 17(fvec4) CompositeExtract 156 2
164: 20(fvec3) VectorShuffle 163 163 0 1 2
165: 157 CompositeConstruct 160 162 164
166: 20(fvec3) VectorTimesMatrix 120 165
167: 118(ptr) AccessChain 107(output) 102
Store 167 166
169: 86(int) Load 90(i)
171: 118(ptr) AccessChain 62(input) 169 170
172: 20(fvec3) Load 171
173: 118(ptr) AccessChain 107(output) 168
Store 173 172
179: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 176 175(pos) 75
180: 86(int) Load 90(i)
181: 174(ptr) AccessChain 62(input) 180 95
182: 17(fvec4) Load 181
Store 175(pos) 182
187: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 184 183(worldPos) 75
188: 17(fvec4) Load 175(pos)
189: 10(int) Load 64(InvocationID)
190: 154(ptr) AccessChain 150 95 117 189
191: 121 Load 190
192: 17(fvec4) VectorTimesMatrix 188 191
Store 183(worldPos) 192
197: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(Log) 194 193(lPos) 75
199: 198(ptr) AccessChain 150 95 170
200: 17(fvec4) Load 199
201: 10(int) Load 64(InvocationID)
202: 154(ptr) AccessChain 150 95 117 201
203: 121 Load 202
204: 17(fvec4) VectorTimesMatrix 200 203
205: 20(fvec3) VectorShuffle 204 204 0 1 2
Store 193(lPos) 205
207: 20(fvec3) Load 193(lPos)
208: 17(fvec4) Load 183(worldPos)
209: 20(fvec3) VectorShuffle 208 208 0 1 2
210: 20(fvec3) FSub 207 209
211: 118(ptr) AccessChain 107(output) 206
Store 211 210
213: 17(fvec4) Load 183(worldPos)
214: 20(fvec3) VectorShuffle 213 213 0 1 2
215: 20(fvec3) FNegate 214
216: 118(ptr) AccessChain 107(output) 212
Store 216 215
217: 17(fvec4) Load 183(worldPos)
218: 10(int) Load 64(InvocationID)
219: 154(ptr) AccessChain 150 95 95 218
220: 121 Load 219
221: 17(fvec4) VectorTimesMatrix 217 220
222: 174(ptr) AccessChain 107(output) 95
Store 222 221
223: 10(int) Load 64(InvocationID)
224: 59(ptr) AccessChain 107(output) 117
Store 224 223
225: 10(int) Load 65(PrimitiveID)
226: 59(ptr) AccessChain 107(output) 170
Store 226 225
232: 174(ptr) AccessChain 107(output) 95
233: 17(fvec4) Load 232
Store 228(outStream.Pos) 233
238: 59(ptr) AccessChain 107(output) 117
239: 10(int) Load 238
Store 235(outStream.ViewportIndex) 239
243: 59(ptr) AccessChain 107(output) 170
244: 10(int) Load 243
Store 240(outStream.PrimitiveID) 244
249: 118(ptr) AccessChain 107(output) 102
250: 20(fvec3) Load 249
Store 246(outStream.Normal) 250
254: 118(ptr) AccessChain 107(output) 168
255: 20(fvec3) Load 254
Store 251(outStream.Color) 255
259: 118(ptr) AccessChain 107(output) 212
260: 20(fvec3) Load 259
Store 256(outStream.ViewVec) 260
264: 118(ptr) AccessChain 107(output) 206
265: 20(fvec3) Load 264
Store 261(outStream.LightVec) 265
EmitVertex
Line 1 56 1
67(@main(struct-VSOutput-vf4-vf3-vf31[3];struct-GSOutput-vf4-u1-u1-vf3-vf3-vf3-vf31;u1;u1;): 4 Function None 61
63(input): 42(ptr) FunctionParameter
64(outStream): 59(ptr) FunctionParameter
65(InvocationID): 60(ptr) FunctionParameter
66(PrimitiveID): 60(ptr) FunctionParameter
70: Label
94(i): 93(ptr) Variable Function
117(output): 59(ptr) Variable Function
189(pos): 188(ptr) Variable Function
198(worldPos): 188(ptr) Variable Function
209(lPos): 129(ptr) Variable Function
71: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 69
72: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 26 16 16 16 16
75: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 73 63(input) 76
80: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 77 64(outStream) 76
83: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 81 65(InvocationID) 76
85: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 84 66(PrimitiveID) 76
86: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 101(DebugFunctionDefinition) 69 67(@main(struct-VSOutput-vf4-vf3-vf31[3];struct-GSOutput-vf4-u1-u1-vf3-vf3-vf3-vf31;u1;u1;)
87: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 69
88: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 26 89 89 16 16
97: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 95 94(i) 76
Store 94(i) 98
Branch 99
99: Label
266: 86(int) Load 90(i)
267: 86(int) IAdd 266 117
Store 90(i) 267
Branch 96
98: Label
103: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 69
104: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 26 89 89 16 16
LoopMerge 101 102 None
Branch 105
105: Label
106: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 69
107: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 26 89 89 16 16
108: 90(int) Load 94(i)
113: 110(bool) SLessThan 108 109
BranchConditional 113 100 101
100: Label
114: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 69
115: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 26 116 116 16 16
120: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 118 117(output) 76
Store 117(output) 124
125: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 26 126 126 16 16
127: 90(int) Load 94(i)
130: 129(ptr) AccessChain 63(input) 127 128
131: 21(fvec3) Load 130
163: 11(int) Load 65(InvocationID)
165: 164(ptr) AccessChain 160 98 128 163
166: 132 Load 165
169: 18(fvec4) CompositeExtract 166 0
170: 21(fvec3) VectorShuffle 169 169 0 1 2
171: 18(fvec4) CompositeExtract 166 1
172: 21(fvec3) VectorShuffle 171 171 0 1 2
173: 18(fvec4) CompositeExtract 166 2
174: 21(fvec3) VectorShuffle 173 173 0 1 2
175: 167 CompositeConstruct 170 172 174
176: 21(fvec3) VectorTimesMatrix 131 175
177: 129(ptr) AccessChain 117(output) 109
Store 177 176
178: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 26 179 179 16 16
181: 90(int) Load 94(i)
183: 129(ptr) AccessChain 63(input) 181 182
184: 21(fvec3) Load 183
185: 129(ptr) AccessChain 117(output) 180
Store 185 184
186: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 26 187 187 16 16
192: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 190 189(pos) 76
193: 90(int) Load 94(i)
194: 188(ptr) AccessChain 63(input) 193 98
195: 18(fvec4) Load 194
Store 189(pos) 195
196: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 26 197 197 16 16
201: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 199 198(worldPos) 76
202: 18(fvec4) Load 189(pos)
203: 11(int) Load 65(InvocationID)
204: 164(ptr) AccessChain 160 98 128 203
205: 132 Load 204
206: 18(fvec4) VectorTimesMatrix 202 205
Store 198(worldPos) 206
207: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 26 208 208 16 16
212: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 210 209(lPos) 76
214: 213(ptr) AccessChain 160 98 182
215: 18(fvec4) Load 214
216: 11(int) Load 65(InvocationID)
217: 164(ptr) AccessChain 160 98 128 216
218: 132 Load 217
219: 18(fvec4) VectorTimesMatrix 215 218
220: 21(fvec3) VectorShuffle 219 219 0 1 2
Store 209(lPos) 220
221: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 26 222 222 16 16
224: 21(fvec3) Load 209(lPos)
225: 18(fvec4) Load 198(worldPos)
226: 21(fvec3) VectorShuffle 225 225 0 1 2
227: 21(fvec3) FSub 224 226
228: 129(ptr) AccessChain 117(output) 223
Store 228 227
229: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 26 230 230 16 16
232: 18(fvec4) Load 198(worldPos)
233: 21(fvec3) VectorShuffle 232 232 0 1 2
234: 21(fvec3) FNegate 233
235: 129(ptr) AccessChain 117(output) 231
Store 235 234
236: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 26 237 237 16 16
238: 18(fvec4) Load 198(worldPos)
239: 11(int) Load 65(InvocationID)
240: 164(ptr) AccessChain 160 98 98 239
241: 132 Load 240
242: 18(fvec4) VectorTimesMatrix 238 241
243: 188(ptr) AccessChain 117(output) 98
Store 243 242
244: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 26 245 245 16 16
246: 11(int) Load 65(InvocationID)
247: 60(ptr) AccessChain 117(output) 128
Store 247 246
248: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 26 249 249 16 16
250: 11(int) Load 66(PrimitiveID)
251: 60(ptr) AccessChain 117(output) 182
Store 251 250
252: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 26 253 253 16 16
258: 188(ptr) AccessChain 117(output) 98
259: 18(fvec4) Load 258
Store 255(outStream.Pos) 259
264: 60(ptr) AccessChain 117(output) 128
265: 11(int) Load 264
Store 261(outStream.ViewportIndex) 265
269: 60(ptr) AccessChain 117(output) 182
270: 11(int) Load 269
Store 266(outStream.PrimitiveID) 270
275: 129(ptr) AccessChain 117(output) 109
276: 21(fvec3) Load 275
Store 272(outStream.Normal) 276
280: 129(ptr) AccessChain 117(output) 180
281: 21(fvec3) Load 280
Store 277(outStream.Color) 281
285: 129(ptr) AccessChain 117(output) 231
286: 21(fvec3) Load 285
Store 282(outStream.ViewVec) 286
290: 129(ptr) AccessChain 117(output) 223
291: 21(fvec3) Load 290
Store 287(outStream.LightVec) 291
EmitVertex
Branch 102
102: Label
292: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 69
293: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 26 89 89 16 16
294: 90(int) Load 94(i)
295: 90(int) IAdd 294 128
Store 94(i) 295
Branch 99
101: Label
296: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 69
297: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 26 298 298 16 16
EndPrimitive
Return
FunctionEnd

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