Commit Graph

4055 Commits

Author SHA1 Message Date
dependabot[bot]
c173df736c
build(deps): bump github/codeql-action in the github-actions group (#5831)
Bumps the github-actions group with 1 update: [github/codeql-action](https://github.com/github/codeql-action).


Updates `github/codeql-action` from 3.26.9 to 3.26.10
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](461ef6c76d...e2b3eafc8d)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-02 11:36:27 -04:00
github-actions[bot]
4554c6b7ea
Roll external/abseil_cpp/ 482ca0b9d..c6b27359c (1 commit) (#5829)
* Roll external/googletest/ 6dae7eb4a..a1e255a58 (1 commit)

6dae7eb4a5...a1e255a582

Created with:
  roll-dep external/googletest

* Roll external/abseil_cpp/ 482ca0b9d..c6b27359c (1 commit)

482ca0b9d6...c6b27359c3

Created with:
  roll-dep external/abseil_cpp

---------

Co-authored-by: GitHub Actions[bot] <>
2024-10-02 15:19:52 +00:00
Cassandra Beckley
48f9f4a99e
opt: Update copy prop arrays to handle InterpolateAt* instructions (#5827)
Adds support for `InterpolateAtCentroid`, `InterpolateAtSample`, and `InterpolateAtOffset` to the copy propagate arrays pass, as well as propagating pointers with the `Input` storage class. Also handles situations where variables should be propagated in an order different than the order that they are declared in the source.
2024-10-02 09:38:32 -04:00
github-actions[bot]
d9c1aee6a6
Roll external/abseil_cpp/ ba5fd0979..482ca0b9d (1 commit) (#5828)
ba5fd0979b...482ca0b9d6

Created with:
  roll-dep external/abseil_cpp

Co-authored-by: GitHub Actions[bot] <>
2024-09-27 14:54:25 +00:00
Cassandra Beckley
b1ad37b175
opt: Mark InterpolateAt* argument as live for DCE (#5824)
The GLSL 450 InterpolateAt* instructions should be treated as a load by dead code elimination. This is part of https://github.com/microsoft/DirectXShaderCompiler/issues/3649.
2024-09-26 16:49:36 -04:00
Steven Perron
5b38abc877
Do not distrubute OpSNegate into OpUDiv (#5823)
We cannot apply the negate to an operand of an OpUDiv instead of it
result. This is because the operands of the OpUDiv are interpreted as
unsigned. We stop the optimizer from doing that.

There were no tests for distributing a negate into OpIMul, OpSDiv, and
OpUDiv. Tests are added for all of these.

Fixes #5822
2024-09-26 15:00:56 -04:00
dependabot[bot]
5c8442f7fc
build(deps-dev): bump rollup from 3.23.0 to 3.29.5 in /tools/sva (#5826)
Bumps [rollup](https://github.com/rollup/rollup) from 3.23.0 to 3.29.5.
- [Release notes](https://github.com/rollup/rollup/releases)
- [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rollup/rollup/compare/v3.23.0...v3.29.5)

---
updated-dependencies:
- dependency-name: rollup
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-26 13:45:37 -04:00
dependabot[bot]
c0e6399dfb
build(deps): bump the github-actions group across 1 directory with 2 updates (#5825)
Bumps the github-actions group with 2 updates in the / directory: [actions/checkout](https://github.com/actions/checkout) and [github/codeql-action](https://github.com/github/codeql-action).


Updates `actions/checkout` from 4.1.7 to 4.2.0
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](692973e3d9...d632683dd7)

Updates `github/codeql-action` from 3.26.8 to 3.26.9
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](294a9d9291...461ef6c76d)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-26 13:40:52 -04:00
github-actions[bot]
3656c4bd1a
Roll external/abseil_cpp/ c0b9bd08e..ba5fd0979 (2 commits) (#5818)
* Roll external/abseil_cpp/ c0b9bd08e..ba5fd0979 (2 commits)

c0b9bd08e0...ba5fd0979b

Created with:
  roll-dep external/abseil_cpp

* Roll external/spirv-headers/ 2a9b6f951..ec59c77a3 (2 commits)

2a9b6f951c...ec59c77a3b

Created with:
  roll-dep external/spirv-headers

---------

Co-authored-by: GitHub Actions[bot] <>
2024-09-26 17:20:46 +00:00
JN Mo
44936c4a9d
Add support for SPV_KHR_compute_shader_derivative (#5817)
* Add support for SPV_KHR_compute_shader_derivative

* Update tests for SPV_KHR_compute_shader_derivatives

---------

Co-authored-by: MagicPoncho <magicponcho@gmail.com>
2024-09-25 09:59:33 -04:00
alan-baker
362ce7c60d
Allow more levels of arrays with component decoration (#5820)
Fixes #5819

* Allow multiple levels of arrays in a variable with component
  decoration
2024-09-24 11:14:28 -04:00
dependabot[bot]
24849751c4
build(deps): bump github/codeql-action in the github-actions group (#5813)
Bumps the github-actions group with 1 update: [github/codeql-action](https://github.com/github/codeql-action).


Updates `github/codeql-action` from 3.26.7 to 3.26.8
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](8214744c54...294a9d9291)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-23 11:44:51 -04:00
github-actions[bot]
c405baf8c9
Roll external/abseil_cpp/ 0df567400..c0b9bd08e (3 commits) (#5812)
0df5674003...c0b9bd08e0

Created with:
  roll-dep external/abseil_cpp

Co-authored-by: GitHub Actions[bot] <>
2024-09-23 15:24:08 +00:00
Sven van Haastregt
7ba72f14f2
spirv-val: Disallow stores according to VUID 06924 (#5368)
Ensure that the validator rejects stores to objects of types
`OpTypeImage`, `OpTypeSampler`, `OpTypeSampledImage`,
`OpTypeAccelerationStructureKHR`, and arrays of these types, according
to `VUID-StandaloneSpirv-OpTypeImage-06924`.

Guard the check behind the before_hlsl_legalization option, as
sometimes we may have temporaries or local variables that are expected
to get optimized away.

Fixes #4796


Change-Id: Ie035c01c5f94e7bdfc16b5c6c85705f302b7bda3

Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
2024-09-23 08:34:30 -04:00
Viktoria Maximova
01c8438ee4
[SPV_KHR_untyped_pointers] Fix verification for OpenCL.std instructions (#5810)
Allow `p` to be untyped pointer for `fract`, `frexp`, `lgamma_r`,
`modf`, `remquo`, and `sincos`.

```
operand must be a pointer(p1, ...).If it is a typed pointer, it must
point to data types.

```

https://htmlpreview.github.io/?https://github.com/KhronosGroup/SPIRV-Registry/blob/main/extensions/KHR/SPV_KHR_untyped_pointers.html#_modifications_to_the_opencl_std_extended_instruction_set
2024-09-20 11:31:46 -04:00
Cassandra Beckley
6dcc7e350a
Prepare release v2024.4 (#5811) 2024-09-19 15:28:18 -04:00
github-actions[bot]
04bdb6c7c9
roll deps (#5809)
* Roll external/googletest/ 0953a17a4..6dae7eb4a (1 commit)

0953a17a42...6dae7eb4a5

Created with:
  roll-dep external/googletest

* Roll external/abseil_cpp/ f7c22f52a..0df567400 (10 commits)

f7c22f52a7...0df5674003

Created with:
  roll-dep external/abseil_cpp

---------

Co-authored-by: GitHub Actions[bot] <>
2024-09-18 10:53:02 +00:00
Ben Ashbaugh
20788a4c5f
add support for SPV_INTEL_global_variable_host_access (#5786) 2024-09-17 12:31:29 -04:00
dependabot[bot]
04ad1e1ce3
build(deps): bump github/codeql-action in the github-actions group (#5808)
Bumps the github-actions group with 1 update: [github/codeql-action](https://github.com/github/codeql-action).


Updates `github/codeql-action` from 3.26.6 to 3.26.7
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](4dd16135b6...8214744c54)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-16 10:20:42 -04:00
Steven Perron
d85446fd7e
[OPT] Fix generating debugLocalVariable from debugGlobalVariable (#5803)
The code converting the global to local was generating an extra operand
that was incorrect. Fixed the code, and added a unit test.

Fixes #5776
2024-09-16 10:11:22 -04:00
github-actions[bot]
a2c9c2387e
Roll external/abseil_cpp/ 1d4466e8d..f7c22f52a (3 commits) (#5806)
1d4466e8d3...f7c22f52a7

Created with:
  roll-dep external/abseil_cpp

Co-authored-by: GitHub Actions[bot] <>
2024-09-15 12:57:18 +00:00
Nielsbishere
4c2094ee9b
Made libspirv include relative to allow better portability (#5807) 2024-09-14 10:36:17 -04:00
David Neto
4451f6ab13
Implement to_string(uint32_t) without using the locale (#5805)
Using the locale takes a mutex deep in the C++ library.
Avoid this on hot compilation paths, e.g. in the validator.

Fixed: #5802
2024-09-12 14:30:18 -07:00
github-actions[bot]
7c9210cc1d
Roll external/abseil_cpp/ 67d126083..1d4466e8d (2 commits) (#5801)
67d126083c...1d4466e8d3

Created with:
  roll-dep external/abseil_cpp

Co-authored-by: GitHub Actions[bot] <>
2024-09-12 15:04:34 +00:00
cheneym2
37d2fcb485
spirv-opt: fix crash in function declarations (#5796)
* spirv-opt: fix crash in function declarations

Function declarations contain no blocks, so bail before segfaulting
in function optimization passes that operate on blocks.

Fixes #5795

* spirv-opt: add test for optimizing declarations
2024-09-12 07:21:12 -04:00
alan-baker
380275eacd
Do not check structurally unreachable continue target predecessors (#5800)
Fixes #5784

* Rules only apply to structurally reachable blocks
2024-09-11 14:50:30 -04:00
github-actions[bot]
d160e170d7
Roll external/abseil_cpp/ f7f316824..67d126083 (3 commits) (#5787)
f7f316824d...67d126083c

Created with:
  roll-dep external/abseil_cpp

Co-authored-by: GitHub Actions[bot] <>
2024-09-09 23:14:26 -04:00
alan-baker
6209efd77c
Update SPIRV-Headers (#5793)
* Fix capability trimming tests to use KHR names for compute derivatives
2024-09-09 18:47:40 -04:00
Steven Perron
05be5b2466
Fix build.gn build. (#5791) 2024-09-09 16:05:32 -04:00
alan-baker
e9915cea8d
Update sampled image validation (#5789)
Fixes #5781

* Requires all image operands to match except for depth between operand
  and result
2024-09-09 13:09:19 -04:00
Nathan Gauër
07f49ce65d
spirv-opt: make traversal deterministic (#5790)
Related to https://github.com/microsoft/DirectXShaderCompiler/issues/6804
2024-09-09 08:59:51 -04:00
Viktoria Maximova
f914d9c8a4
[SPV_KHR_untyped_pointers] Fix verification of vload/vstore OpenCL.std instructions (#5788)
* [SPV_KHR_untyped_pointers] Fix verification of vload/vstore OpenCL.std instructions

Allow `p` to be untyped pointer.

```
operand must be a pointer(p1, ...).If it is a typed pointer, it must point to data types.

```

https://htmlpreview.github.io/?https://github.com/KhronosGroup/SPIRV-Registry/blob/main/extensions/KHR/SPV_KHR_untyped_pointers.html#_modifications_to_the_opencl_std_extended_instruction_set

* relax printf check as well
2024-09-06 10:59:59 -04:00
Laura Hermanns
b31baff4ee
[opt] Add struct-packing pass and unit test. (#5778)
This pass allows to re-assign offset layout decorations
to tightly pack a struct according to its packing rules.
2024-09-05 15:24:29 -04:00
github-actions[bot]
2a67ced433
Roll external/abseil_cpp/ e64dd622d..f7f316824 (2 commits) (#5782)
e64dd622d7...f7f316824d

Created with:
  roll-dep external/abseil_cpp

Co-authored-by: GitHub Actions[bot] <>
2024-09-05 17:46:13 +00:00
Yoann Congal
bc4060ed27
update_build_version.py: support an envvar to force the description (#5758)
FORCED_BUILD_VERSION_DESCRIPTION envvar can be used to force a version
description instead of resorting to git describe which can change for a
given commit if multiple lightweight commits point ot it.

Signed-off-by: Yoann Congal <yoann.congal@smile.fr>
2024-09-05 15:06:17 +02:00
alan-baker
61d6952e2e
Revert "OpSampledImage extra validation (#5695)" (#5785)
This reverts commit 70ad4dae7d.

Contributes to #5781

SPIR WG 2024-09-04: decision to relax validation requirement in the spec.
2024-09-04 14:59:51 -04:00
github-actions[bot]
e1782d6675
Roll external/abseil_cpp/ fd7713cb9..fd58e18f2 (2 commits) (#5773)
* Roll external/googletest/ ff233bdd4..0953a17a4 (1 commit)

ff233bdd4c...0953a17a42

Created with:
  roll-dep external/googletest

* Roll external/abseil_cpp/ fd7713cb9..e64dd622d (10 commits)

fd7713cb9a...e64dd622d7

Created with:
  roll-dep external/abseil_cpp

* Roll external/spirv-headers/ 69ab0f32d..efb6b4099 (2 commits)

69ab0f32dc...efb6b4099d

Created with:
  roll-dep external/spirv-headers

---------

Co-authored-by: GitHub Actions[bot] <>
2024-09-03 16:56:01 +00:00
dependabot[bot]
88c25a71d9
build(deps): bump the github-actions group across 1 directory with 3 updates (#5780)
Bumps the github-actions group with 3 updates in the / directory: [lukka/get-cmake](https://github.com/lukka/get-cmake), [actions/upload-artifact](https://github.com/actions/upload-artifact) and [github/codeql-action](https://github.com/github/codeql-action).


Updates `lukka/get-cmake` from 3.30.2 to 3.30.3
- [Release notes](https://github.com/lukka/get-cmake/releases)
- [Commits](a70f1cfa18...070a0507a7)

Updates `actions/upload-artifact` from 4.3.6 to 4.4.0
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](834a144ee9...50769540e7)

Updates `github/codeql-action` from 3.26.4 to 3.26.6
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](f0f3afee80...4dd16135b6)

---
updated-dependencies:
- dependency-name: lukka/get-cmake
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-03 12:40:03 -04:00
Kévin Petit
b21dda0ee7
Validate presence of Stride operand to OpCooperativeMatrix{Load,Store}KHR (#5777)
* Validate Stride operand to OpCooperativeMatrix{Load,Store}KHR

The specification requires the Stride operand for the RowMajorKHR and
ColumnMajorKHR layouts.

Signed-off-by: Kevin Petit <kevin.petit@arm.com>
Change-Id: I51084b9b8dedebf9cab7ae25334ee56b75ef0126

* Update source/val/validate_memory.cpp

Co-authored-by: alan-baker <alanbaker@google.com>

* add test to exercise memory layout from spec constant and fix validation

Change-Id: I06d7308c4a2b62d26d69e88e03bfa009a7f8fff3

* format fixes

Change-Id: I9cbabec0ed2172dcd228cc385551cb7a5b79df1a

---------

Signed-off-by: Kevin Petit <kevin.petit@arm.com>
Co-authored-by: alan-baker <alanbaker@google.com>
2024-08-29 08:15:31 -04:00
dependabot[bot]
edc68950bf
build(deps): bump github/codeql-action in the github-actions group (#5772)
Bumps the github-actions group with 1 update: [github/codeql-action](https://github.com/github/codeql-action).


Updates `github/codeql-action` from 3.26.3 to 3.26.4
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](883d8588e5...f0f3afee80)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-22 07:23:27 -04:00
github-actions[bot]
a85a703e3b
roll deps (#5771)
* Roll external/abseil_cpp/ 5a01d0f77..fd7713cb9 (1 commit)

5a01d0f77e...fd7713cb9a

Created with:
  roll-dep external/abseil_cpp

* Roll external/spirv-headers/ 1b75a4ae0..69ab0f32d (1 commit)

1b75a4ae0b...69ab0f32dc

Created with:
  roll-dep external/spirv-headers

---------

Co-authored-by: GitHub Actions[bot] <>
2024-08-22 10:50:19 +00:00
github-actions[bot]
25b4e42ead
roll deps (#5754)
* Roll external/googletest/ 5bcb2d78a..ff233bdd4 (3 commits)

5bcb2d78a1...ff233bdd4c

Created with:
  roll-dep external/googletest

* Roll external/abseil_cpp/ 52fad5aa0..bd0c9c58c (11 commits)

52fad5aa02...bd0c9c58ca

Created with:
  roll-dep external/abseil_cpp

---------

Co-authored-by: GitHub Actions[bot] <>
2024-08-21 16:06:38 +00:00
Steven Perron
0c40b591a3
[OPT] Add SPV_KHR_ray_tracing_position_fetch to allow lists (#5757)
Fixes https://github.com/microsoft/DirectXShaderCompiler/issues/6844
2024-08-21 11:05:43 -04:00
Kaylee Lubick
e8c2fbca1e
Remove local attribute from build_version_inc genrule (#5766) 2024-08-21 11:04:38 -04:00
dependabot[bot]
988995c3b7
build(deps): bump github/codeql-action (#5769)
Bumps the github-actions group with 1 update in the / directory: [github/codeql-action](https://github.com/github/codeql-action).


Updates `github/codeql-action` from 3.26.0 to 3.26.3
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](eb055d739a...883d8588e5)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-21 10:57:06 -04:00
dependabot[bot]
87fcbaf1bc
build(deps): bump the github-actions group across 1 directory with 4 updates (#5761)
Bumps the github-actions group with 4 updates in the / directory: [lukka/get-cmake](https://github.com/lukka/get-cmake), [ossf/scorecard-action](https://github.com/ossf/scorecard-action), [actions/upload-artifact](https://github.com/actions/upload-artifact) and [github/codeql-action](https://github.com/github/codeql-action).


Updates `lukka/get-cmake` from 3.30.1 to 3.30.2
- [Release notes](https://github.com/lukka/get-cmake/releases)
- [Commits](34181361be...a70f1cfa18)

Updates `ossf/scorecard-action` from 2.3.3 to 2.4.0
- [Release notes](https://github.com/ossf/scorecard-action/releases)
- [Changelog](https://github.com/ossf/scorecard-action/blob/main/RELEASE.md)
- [Commits](dc50aa9510...62b2cac7ed)

Updates `actions/upload-artifact` from 4.3.4 to 4.3.6
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](0b2256b8c0...834a144ee9)

Updates `github/codeql-action` from 3.25.13 to 3.26.0
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](2d790406f5...eb055d739a)

---
updated-dependencies:
- dependency-name: lukka/get-cmake
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions
- dependency-name: ossf/scorecard-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-09 14:31:05 -04:00
Markus Tavenrath
b64a423b44
Workaround issue in MSVC arm64 compiler returning random upper 32-bits in function spvtools::util::CountSetBits. (#5763)
Fix issue #5762
2024-08-07 14:11:11 -04:00
Steven Perron
72c291332a
Add OpTypeRuntimeArray to composite types (#5765) 2024-08-07 12:33:51 -04:00
Steven Perron
bc2478c922
Use "docker compose" in wasm build (#5764)
The wasm github action is using the deprecated `docker-compose` command.
This is update to use `docker compose`.
2024-08-07 10:43:18 -04:00
Steven Perron
246daf246b
[OPT] Avoid assert in generatecopy (#5756)
We want to be able to recover when fix storage class is not able to fix
everything, and just leave the spir-v in an invalid state. The pass
should not fail because of that.
2024-07-31 14:11:45 -07:00