Commit Graph

5008 Commits

Author SHA1 Message Date
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