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>
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.
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.
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
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.
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.
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
```
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
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.
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
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.
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.
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