Commit Graph

5090 Commits

Author SHA1 Message Date
Juan Ramos
719b6b7deb Remove outdated comments about travis 2023-11-29 08:21:11 -05:00
Juan Ramos
6be56e45e5 Remove OGLCompiler and HLSL stub libraries from build
Fixes ranlib warnings complaining about empty archive libraries.

Simplifie build/code.
2023-11-29 08:20:27 -05:00
Samuel Bourasseau
c59b876ca0
Implement relaxed rule for opaque struct members 2023-11-28 19:19:02 -05:00
Juan Ramos
a3069e1df4 cmake: Remove SPIRV-Tools workaround
As of KhronosGroup/SPIRV-Tools/pull/5482

SPIRV-Tools builds cleanly for Android/iOS by default
2023-11-28 19:17:51 -05:00
Nathaniel Cesario
40394bf5c6 Fix conversion warnings related to bitfields
This fixes several GCC warnings about converting from signed integers to
signed bitfields.
2023-11-28 19:16:16 -05:00
Nathaniel Cesario
19d541a91d Fix some compiler warnings
This change primarily fixes some -Wconversion warnings from gcc, but
also silences a warning triggered in glslang_tab.cpp, which is generated
code from bison.

There are still several GCC conversion warnings in Types.h due to the
use of bit fields that will be resolved in a future change.
2023-11-28 19:16:16 -05:00
Moritz Heinemann
b820431a2c No external install include dir 2023-11-27 19:13:13 -05:00
dependabot[bot]
920a1424c9 Bump github/codeql-action from 2.22.7 to 2.22.8
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.22.7 to 2.22.8.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](66b90a5db1...407ffafae6)

---
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-11-27 12:54:40 -05:00
dependabot[bot]
bc566d393a Bump mymindstorm/setup-emsdk from 12 to 13
Bumps [mymindstorm/setup-emsdk](https://github.com/mymindstorm/setup-emsdk) from 12 to 13.
- [Release notes](https://github.com/mymindstorm/setup-emsdk/releases)
- [Commits](ab889da2ab...d233ac12b0)

---
updated-dependencies:
- dependency-name: mymindstorm/setup-emsdk
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-27 12:04:17 -05:00
FrostyLeaves
153064f2c7 fix: Support SV_ViewID keywords for hlsl. 2023-11-22 17:04:38 -05:00
Juan Ramos
7c5fb5c1a8
cmake: Cleanup ENABLE_PCH
Min is 3.17 checks for 3.16 are no longer needed.
2023-11-22 16:50:04 -05:00
Juan Ramos
4c121b68c8
cmake: Remove find_host_package macro
Originally added in https://github.com/KhronosGroup/glslang/pull/2395

With the rational of causing issues when cross-compiling for iOS.

This is no longer the case.
2023-11-22 16:48:14 -05:00
Juan Ramos
1a370bede9
cmake: Remove OVERRIDE_MSVCCRT
CMake 3.15 removes the need for all of this custom code.
2023-11-22 16:44:30 -05:00
Juan Ramos
b008c0ee45 Fix unused parameter warning
paramNames was going unused in makeFunctionEntry
2023-11-22 16:42:21 -05:00
Juan Ramos
fd403737d2 Replace Darwin check with Apple check
Darwin excludes iOS
2023-11-21 19:11:24 -05:00
Juan Ramos
cd5ea90aee Fix Xcode 15 linker warning
XCode 15 includes a completely new linker implementation.
Hence some flags are deprecated.

The default is now error so we can simply remove the linker option.
2023-11-21 19:11:24 -05:00
Juan Ramos
b3c8e99b68
Cleanup MacOS CI
* ci: Test macos-12 and macos-13 instead of macos-11 and macos-12
  Developer survey shows little to no users still use MacOS 11 or earlier.
* Remove pointless comment about travis
* Fix minor indent issue
2023-11-21 19:04:52 -05:00
Juan Ramos
a7b18c08d0
Add iOS build to CI
Fix iOS build as well as minor Android cleanup since the
problems for both platforms are so similar
2023-11-21 18:59:26 -05:00
Juan Ramos
5fcac839ca cmake: Cleanup usage of option
By default option is OFF
2023-11-21 18:21:00 -05:00
dependabot[bot]
4efde4c4c1 Bump actions/github-script from 6.4.1 to 7.0.1
Bumps [actions/github-script](https://github.com/actions/github-script) from 6.4.1 to 7.0.1.
- [Release notes](https://github.com/actions/github-script/releases)
- [Commits](d7906e4ad0...60a0d83039)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-20 19:27:55 -05:00
dependabot[bot]
3392416ea4 Bump github/codeql-action from 2.22.5 to 2.22.7
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.22.5 to 2.22.7.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](74483a38d3...66b90a5db1)

---
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-11-20 18:53:11 -05:00
Arcady Goldmints-Orlov
f6cc939499 Remove custom implementations of isinf and isnan
Use the ones from the <cmath> header instead, now that that is available
on all the currently supported versions of MSVC.
2023-11-20 18:30:35 -05:00
Juan Ramos
6b72472f28 Fix Android CI
NDK 23.2.8568313 was removed from the latest runner

Hardcoding the NDK versions like before is asking for a CI
breakage.

Use ANDROID_NDK_HOME environment variable which is set by the
runner
2023-11-20 18:29:59 -05:00
Moritz Heinemann
eac012fff3 Fix spirv-tools dependency 2023-11-20 18:28:38 -05:00
“jimihe”
854db99ff1 Out-of-range floats should overflow/underflow to infinity/0.0
glslang representing literal constants with double precision, so 1.0e40 and 1.0e-50 are normal values.

        Shader1:
        precision highp float;
        out vec4 my_FragColor;
        void main()
        {
        // Out-of-range floats should overflow to infinity
        // GLSL ES 3.00.6 section 4.1.4 Floats:
        // "If the value of the floating point number is too large (small) to be stored as a single precision value, it is converted to positive (negative) infinity"
        float correct = isinf(1.0e40) ? 1.0 : 0.0;
        my_FragColor = vec4(0.0, correct, 0.0, 1.0);
        }
        The expected ouput result of this test is vec4(0.0, 1.0, 0.0, 1.0),
        but it's vec4(0.0,0.0,0.0,1.0).Because the return value of isInf is
        false.

        precision highp float;
        out vec4 my_FragColor;
        void main()
        {
        // GLSL ES 3.00.6 section 4.1.4 Floats:
        // "A value with a magnitude too small to be represented as a mantissa and exponent is converted to zero."
        // 1.0e-50 is small enough that it can't even be stored as subnormal.
        float correct = (1.0e-50 == 0.0) ? 1.0 : 0.0;
        my_FragColor = vec4(0.0, correct, 0.0, 1.0);
        }
        The expected ouput result of this test is vec4(0.0, 1.0, 0.0, 1.0),
        but it's vec4(0.0,0.0,0.0,1.0).

        For f32 and f16 type, when the literal constant out of range of the f32
        and f16 number, the value should overflow or underflow to inf or zero.

            glcts test item
        KHR-GLES3.number_parsing.float_out_of_range_as_infinity
2023-11-17 16:30:22 -05:00
Qingyuan Zheng
845e5d5a28 Fix the corrupted test because of rebase 2023-11-14 14:46:44 -07:00
Qingyuan Zheng
109b5979d3 Support NonSemantic DebugValue and generate it for const arg
For passing-by-value semantic, DebugDeclare cannot be used for parameters because there's no pointer.
2023-11-14 14:46:44 -07:00
Arcady Goldmints-Orlov
1dcb072cda cmake: only install public headers
Only the headers that are part of glslang's public interface are
installed. Previously, all of its headers were installed, which exposed
a lot of internal implementation details and made it difficult to
maintain backward compatiblity. This reduces the API surface somewhat
and will make it easier to maintain API and ABI compatibility.
2023-11-11 08:55:43 -07:00
Arcady Goldmints-Orlov
806d9abbad Remove SPVRemapper.h dependency on spvIR.h
The only thing it uses from spvIR.h is the NoResult constant, which is
now defined inline.
2023-11-11 08:55:43 -07:00
Arcady Goldmints-Orlov
6f9ab3c2de Remove GlslangToSpv.h dependency on SpvTools.h
The dependency was only because of the SpvOptions struct which is used
in both, but really is part of the glslang public interface and should
be in the public GlslangToSpv.h header.
2023-11-11 08:55:43 -07:00
Arcady Goldmints-Orlov
62de186c33 Remove GlslangToSpv.h dependency on intermediate.h
GlslangToSpv.h only declares functions with opaque references to to
TIntermediate, for which a simple "class TIntermediate;" declaration is
adequate. This means that Include/intermediate.h no longer needs to be
installed as part of glslang's public interface.
2023-11-11 08:55:43 -07:00
Nathaniel Cesario
52c59ecd3d Fix interpolant ES error
The restriction of no swizzling and no struct fields as an interpolant
were not being checked when using the ES profile.

Fixes #3277.
2023-11-11 08:53:16 -07:00
Rex Xu
a8d39f97cd Add a helper applySpirvDecorate to handle spirv_decorate_xxx directives
Some code paths could be shared.
2023-11-09 08:49:40 -07:00
Nathaniel Cesario
091b9fd979 Fix GL_ARB_shader_storage_buffer_object version
Ensure that GL_ARB_shader_storage_buffer_object is available from
version GL 400 to GL 420.

Closes #3263.
2023-11-07 15:56:52 -07:00
Arcady Goldmints-Orlov
f102d0f4fa Fix update_glslang_sources.py to not use distutils
The distutils package was removed in Python 3.12, however its only
usage in this script can easily be replaced with functionality available
in the builtin os package in Python 3.2 and later.

Fixes #3393
2023-11-07 15:51:45 -07:00
Rex Xu
65f59c81e7 GL_EXT_spirv_intrinsics: Fix a typo in function naming
hasSprivDecorate => hasSpirvDecorate

Also, revise a comment.
2023-11-06 12:50:02 -05:00
Juan Ramos
302a663a38 Use googletest version 1.14.0 2023-10-31 16:47:37 -04:00
Malcolm Bechard
1dde7113bb tweak error behavior for redeclared uniforms for vulkan-relaxed
avoids nullptr crash from reading memberType's name, and more user
friendly error message.
2023-10-31 15:02:38 -04:00
dependabot[bot]
f8dd5adde4 Bump github/codeql-action from 2.22.4 to 2.22.5
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.22.4 to 2.22.5.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](49abf0ba24...74483a38d3)

---
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-30 14:16:54 -04:00
dependabot[bot]
24914a47b2 Bump ossf/scorecard-action from 2.3.0 to 2.3.1
Bumps [ossf/scorecard-action](https://github.com/ossf/scorecard-action) from 2.3.0 to 2.3.1.
- [Release notes](https://github.com/ossf/scorecard-action/releases)
- [Changelog](https://github.com/ossf/scorecard-action/blob/main/RELEASE.md)
- [Commits](483ef80eb9...0864cf1902)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-30 14:16:10 -04:00
Nathaniel Cesario
8fa46582ec Remove debugOptions from internal classes
The debug options passed down from the public ShConstruct* functions to
internal code is unused. This change removes the internal debugOptions
fields and attempts to make it more obvious these fields are not used.

This change does not change the public-facing interface.

This change also adds the -Wshorten-64-to-32 warning to the StandAlone
build in order to avoid unwanted 64-to-32 bit conversions in the future.

Closes #3348.
2023-10-25 20:13:20 -04:00
Kévin Petit
a9e698322e
Align spirv.hpp to SPIRV-Headers for SPV_KHR_cooperative_matrix
Some of the enumerants used by this extension were missing a KHR suffix.
2023-10-25 19:59:52 -04:00
Nathaniel Cesario
ffac211098 Fix Windows GHA Tests
The Windows tests job in Github Actions was incorrectly reporting
'success' on failed runs. This change ensures a single command is run in
each test 'step' to help remove any guesswork w.r.t. the shell behavior
on each platform.

This change also takes the oppportunity to make the formatting more
consistent in continuous_integration.yml.
2023-10-25 17:34:53 -06:00
ncesario-lunarg
e6fbb65699
Merge pull request #3357 from chaocNV/addLineForDebugFunction
Add correct line number to OpDebugFunction and OpDebugScope for function
2023-10-25 12:12:59 -06:00
Chao Chen
979423d84f Add correct line number to OpDebugFunction and OpDebugScope for function:
1. Pull OpDebugFunction, OpDebugScope and OpDebugVariable for params out
   of makeFunctionEntry.
2. Put above in a separate function called setupDebugFunctionEntry,
   which also accept line number and set it correctly in builder.
3. Call setupDebugFunctionEntry in makeFunction. Also special case
   handle entry function since it's created ealier elsewhere.
2023-10-24 13:37:19 -07:00
dependabot[bot]
a2fb1ba2ad Bump github/codeql-action from 2.22.3 to 2.22.4
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.22.3 to 2.22.4.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](0116bc2df5...49abf0ba24)

---
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-24 12:26:47 -04:00
dependabot[bot]
ab030e9fc2 Bump actions/checkout from 4.1.0 to 4.1.1
Bumps [actions/checkout](https://github.com/actions/checkout) from 4.1.0 to 4.1.1.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](8ade135a41...b4ffde65f4)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-24 12:26:29 -04:00
Arcady Goldmints-Orlov
7fa0731a80 Initialize spv_options in glslang_program_SPIRV_generate
This will prevent any recurrence of issues like the one addressed by
PR #3364.
2023-10-19 16:57:31 -04:00
dependabot[bot]
ebb0a8b28e Bump github/codeql-action from 2.22.0 to 2.22.3
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.22.0 to 2.22.3.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](2cb752a87e...0116bc2df5)

---
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-17 14:00:45 -04:00
dependabot[bot]
6a6fcc292e Bump actions/setup-python from 4.7.0 to 4.7.1
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 4.7.0 to 4.7.1.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](61a6322f88...65d7f2d534)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-17 14:00:01 -04:00