Commit Graph

4802 Commits

Author SHA1 Message Date
Arcady Goldmints-Orlov
9b67a0ae3c 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-12-11 20:03:18 +00:00
Jeremy Hayes
f412fbc986 Update known_good.json 2023-12-11 20:03:18 +00:00
dependabot[bot]
a4aa5e9787 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-12-11 20:03:18 +00:00
dependabot[bot]
9b25ae7cff 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-12-11 20:03:18 +00:00
dependabot[bot]
8381e343d8 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-12-11 20:03:18 +00:00
Pankaj Mistry
d6da7656ea 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-12-11 20:03:18 +00:00
alelenv
1ace3e8355 Add support for GL_NV_displacement_micromap.
* Add support for GL_NV_displacement_micromap.
* Update known_good for spirv-headers and spirv-tools.
2023-12-11 20:03:18 +00:00
dependabot[bot]
b4d221c848 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-12-11 20:03:18 +00:00
dependabot[bot]
38fb6a9117 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-12-11 20:03:18 +00:00
dependabot[bot]
031b49c599 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-12-11 20:03:18 +00:00
Nathaniel Cesario
5f784a00e3 Fix race condition identified by TSAN
Guard global variables 'CompileFailed' and 'LinkFailed' in the
StandAlone application with atomics.
2023-12-11 20:03:18 +00:00
Nathaniel Cesario
5b3676ec7d Add ASAN integration testing
Add jobs for testing with -fsanitize=address and -fsanitize=thread.
2023-12-11 20:03:18 +00:00
chirsz-ever
3877be8117 Improve preprocessor ouput format
Modify preprocessor.simple.vert to test spaces before parenthesis.
2023-12-11 20:03:18 +00:00
Nathaniel Cesario
ad982d811d 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-12-11 20:03:18 +00:00
dependabot[bot]
936281ad2a 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-12-11 20:03:18 +00:00
Nathaniel Cesario
d4b7b7b77b 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-12-11 20:03:18 +00:00
Rex Xu
717e3ddf66 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-12-11 20:03:18 +00:00
Sajjad Mirza
33cef2f02d 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-12-11 20:03:18 +00:00
dependabot[bot]
b198f9b9bb 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-12-11 20:03:17 +00:00
dependabot[bot]
1b063e0962 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-12-11 20:03:17 +00:00
Joyce
727d9eea5c Add license to dependabot.yml
Signed-off-by: Joyce <joycebrum@google.com>
2023-12-11 20:03:17 +00:00
Nathaniel Cesario
85308a427f Add a generic texel fetch test
Test all core sampler functions.
2023-12-11 20:03:17 +00:00
Nathaniel Cesario
dddab4ac77 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-12-11 20:03:17 +00:00
Arcady Goldmints-Orlov
54fccb6e36 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-12-11 20:03:17 +00:00
Arcady Goldmints-Orlov
708069d81d 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-12-11 20:03:17 +00:00
Nathaniel Cesario
467e8804e4 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-12-11 20:03:17 +00:00
Nathaniel Cesario
23c80a83a8 Add GL_EXT_texture_shadow_lod support
Closes #3302.
2023-12-11 20:03:17 +00:00
Ralf Habacker
f121169feb Revert "CMake: Make glslang-default-resource-limits STATIC"
Fixes #3316

This reverts commit 6f22e41e0de13aff75807cca9662730d8b3e54b6.
2023-12-11 20:03:17 +00:00
Joyce Brum
16753a10c9 Squashed changes about hash pin and dependabot
Signed-off-by: Joyce Brum <joycebrum@google.com>
2023-12-11 20:03:17 +00:00
Nathaniel Cesario
504608c6e3 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-12-11 20:03:17 +00:00
Pedro Olsen Ferreira
a9a481664d 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-12-11 20:03:17 +00:00
Jeremy Hayes
64b3c862d8 Update CHANGES for release 13.0.0 2023-12-11 20:03:17 +00:00
Wooyoung Kim
bd0edbc7e0 extension: GL_QCOM_image_processing support 2023-12-11 20:03:17 +00:00
Joyce
e07c1bb5fc Add badge to README.md
Signed-off-by: Joyce <joycebrum@google.com>
2023-12-11 20:03:17 +00:00
Joyce
7884e50c41 Create scorecard.yml
Signed-off-by: Joyce <joycebrum@google.com>
2023-12-11 20:03:17 +00:00
Nathaniel Cesario
368549ffe6 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-12-11 20:03:17 +00:00
Sven van Haastregt
4b165580ae 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-12-11 20:03:17 +00:00
Pedro Olsen Ferreira
f9a15613b0 [cmake] Use CMake property for symbol visibility
CMake provides a target property to set default symbol visibility which
supports different toolchains transparently.
2023-12-11 20:03:17 +00:00
Kacper Michajłow
99da060110 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-12-11 20:03:17 +00:00
Rex Xu
0da98c51c4 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-12-11 20:03:17 +00:00
Nathaniel Cesario
e69f74f010 Update known_good.json
SPIRV-Tools: v2023.4.rc2
2023-12-11 20:03:17 +00:00
Arseny Kapoulkine
76dd399629 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-12-11 20:03:17 +00:00
Nathaniel Cesario
43a1334078 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-12-11 20:03:17 +00:00
Nathaniel Cesario
270b1f34f7 Add emscripten build to CI
Adds a build-only (no test) job for testing the emscripten (web) build
on github actions.
2023-12-11 20:03:17 +00:00
Arcady Goldmints-Orlov
b4443eb859 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-12-11 20:03:17 +00:00
Tim Biermann
1b37f3a490 respect destdir for compat symlink 2023-12-11 20:03:17 +00:00
Arcady Goldmints-Orlov
e40191047c 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-12-11 20:03:17 +00:00
Arcady Goldmints-Orlov
73b75b1998 Remove a stray GLSLANG_WEB ifdef 2023-12-11 20:03:17 +00:00
dan sinclair
1352540a63 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-12-11 20:03:17 +00:00
Allan MacKinnon
91cf7eea89 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-12-11 20:03:17 +00:00