Commit Graph

4000 Commits

Author SHA1 Message Date
Karol Herbst
e99a5c033e
spirv-link: allow linking functions with different pointer arguments (#5534)
* linker: run dedup earlier

Otherwise `linkings_to_do` might end up with stale IDs.

* linker: allow linking functions with different pointer arguments

Since llvm-17 there are no typed pointers and hte SPIRV-LLVM-Translator
doesn't know the function signature of imported functions.

I'm investigating different ways of solving this problem and adding an
option to work around it inside `spirv-link` is one of those.

The code is almost complete, just I'm having troubles constructing the
bitcast to cast the pointer parameters to the final type.

Closes: https://github.com/KhronosGroup/SPIRV-LLVM-Translator/issues/2153

* test/linker: add tests to test the AllowPtrTypeMismatch feature
2024-07-24 08:38:19 -04:00
Steven Perron
ca373497f1
[opt] Fix pointer stores in DCE (#5739)
When a trying to mark store that use the same address as a load live, we
consider any use of the pointer in the store instruction enough to make
the store live. This is not correct. We should only mark the store as
live if it store to the pointer, and not storing the pointer to another
memory location.

This causes DCE to miss some dead code.
2024-07-24 14:36:26 +02:00
Ben Ashbaugh
a0817526b8
properly handle the load and store cache control operand types (#5664)
* properly handle the load and store cache control operand types

Without handling these operand types, disassembling a SPIR-V module that uses the cache control extension produces an invalid operand type error.

* add a round trip test for SPV_INTEL_cache_controls
2024-07-22 11:18:16 -04:00
dependabot[bot]
d1b35bb171
build(deps): bump the github-actions group with 2 updates (#5744)
Bumps the github-actions group with 2 updates: [lukka/get-cmake](https://github.com/lukka/get-cmake) and [github/codeql-action](https://github.com/github/codeql-action).


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

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

---
updated-dependencies:
- dependency-name: lukka/get-cmake
  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-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-07-22 09:34:13 -04:00
github-actions[bot]
626dfbff49
Roll external/abseil_cpp/ eb8522077..3cb498899 (4 commits) (#5741)
eb85220775...3cb4988999

Created with:
  roll-dep external/abseil_cpp

Co-authored-by: GitHub Actions[bot] <>
2024-07-19 16:04:25 +00:00
Nathan Gauër
2ea4003633
opt: split composite from array flattening (#5733)
* opt: split composite from array flattening

DXC has an option to flatten resource arrays. But when this option
is not used, the resource arrays should be kept as-is.
On the other hand, when a struct contains resources, we MUST flatten is
to be compliant with the Vulkan spec.

Because this pass flattens both types of resources, using a struct of
resources automatically implied flattening arrays.
By adding those 2 new settings, we decide if the pass flattens only one type
of resources, or both.
Note: the flatten_arrays flag only impacts resource arrays.
Arrays of composites containing resources are still flattened.

Since the API is considered stable, I added 2 new functions to create
passes with one flag or the other, and kept the original behavior as-is.

Related to https://github.com/microsoft/DirectXShaderCompiler/issues/6745

Signed-off-by: Nathan Gauër <brioche@google.com>

* add commandline options

Signed-off-by: Nathan Gauër <brioche@google.com>

* clang-format

Signed-off-by: Nathan Gauër <brioche@google.com>

---------

Signed-off-by: Nathan Gauër <brioche@google.com>
2024-07-19 11:48:21 -04:00
github-actions[bot]
4c7e1fa5c3
Roll external/abseil_cpp/ 074a32af6..af4c589ed (1 commit) (#5731)
* Roll external/googletest/ 34ad51b3d..9ff2450a5 (8 commits)

34ad51b3dc...9ff2450a56

Created with:
  roll-dep external/googletest

* Roll external/abseil_cpp/ 074a32af6..eb8522077 (13 commits)

074a32af66...eb85220775

Created with:
  roll-dep external/abseil_cpp

* Roll external/effcee/ d74d33d93..2c97e5689 (1 commit)

d74d33d930...2c97e5689e

Created with:
  roll-dep external/effcee

---------

Co-authored-by: GitHub Actions[bot] <>
2024-07-18 02:54:47 +00:00
alan-baker
3ab0d22608
Support SPV_KHR_untyped_pointers (#5736)
* Support SPV_KHR_untyped_pointers

Covers:
- assembler
- disassembler
- validator

fix copyright

Validate OpTypeUntypedPointerKHR

* Disallow an untyped pointer in a typed pointer
* Validate capability requirements for untyped pointer
* Allow duplicate untyped pointer declarations

Add round trip tests

Validate OpUntypedVariableKHR

Validate untyped access chains

* Add a test for opcodes that generate untyped pointers
* simplify some checks for operands needing types
* validate OpUnypedAccessChainKHR, OpUntypedInBoundsAccessChainKHR,
  OpUntypedPtrAccessChainKHR, OpUntypedInBoundsPtrAccessChainKHR

Unify variable validation

Validate OpCopyMemorySized

* Fix some opcode tests to accound for untyped pointers
* Add validation for OpCopyMemorySized for shaders and untyped pointers
* fix up tests

Validate pointer comparisons and bitcast

* Update more helpers
* Fix entry validation to allow OpUntypedVariableKHR
* Validate OpPtrEqual, OpPtrNotEqual and OpPtrDiff
* Validate OpBitcast

Validate atomics and untyped pointers

Make interface variable validation aware of untyped pointers

* Check OpUntypedVariableKHR in interface validation

More untyped pointer validation

* Validate interfaces more thoroughly
* Validate layouts for untyped pointer uses
* Improve capability checks for vulkan with OpTypeUntypedPointerKHR
* workgroup member explicit layout validation updates

More validation

* validate function arguments and parameters
* handle untyped pointer and variable in more places

Add a friendly assembly name for untyped pointers

Update OpCopyMemory validation and tests

Fix test for token update

Fixes for validation

* Allow typed pointers to contain untyped pointers
* Fix decoration validation
* add untyped pointer as a case for size and alignments

Fix interface validation

* Grabbed the wrong storage class operand for untyped variables
* Add ability to specify assembler options in validation tests

Add passthrough validation for OpUntypedArrayLengthKHR

More validation of untyped pointers

* Validate OpUntypedArrayLengthKHR
* Validate layout for OpLoad, OpStore, and OpUntypedArrayLengthKHR

Validation support for cooperative matrix and untyped pointers

* Allow untyped pointers for cooperative matrix KHR load and store

Updates to match spec

* Remove extra capability references
* Swap untyped variable data type and storage class operands
* update validation of variables

* update deps

---------

Co-authored-by: David Neto <dneto@google.com>
2024-07-17 14:51:37 -04:00
Steven Perron
6248fda376
Handle coop matrix in fix storage class (#5729) 2024-07-17 15:22:32 +02:00
LU-JOHN
7c778973e5
Allow fmt arg to printf to be an array of i8 in non-constant space (#5677)
* In spirv-val allow format arg to printf to be an array of i8 in Generic space

Signed-off-by: Lu, John <john.lu@intel.com>

* Allow more addr spaces for printf format string

Signed-off-by: Lu, John <john.lu@intel.com>

* Update printf format arg testcase

Signed-off-by: Lu, John <john.lu@intel.com>

* Apply clang-format

Signed-off-by: Lu, John <john.lu@intel.com>

* Reorder code for clarity

Signed-off-by: Lu, John <john.lu@intel.com>

* Only allow other addr spaces if extension is seen

Signed-off-by: Lu, John <john.lu@intel.com>

* Add test to check printf format with extension

Signed-off-by: Lu, John <john.lu@intel.com>

* Add extension correctly

Signed-off-by: Lu, John <john.lu@intel.com>

---------

Signed-off-by: Lu, John <john.lu@intel.com>
2024-07-16 09:20:04 -04:00
dependabot[bot]
257cacfb3e
build(deps): bump the github-actions group across 1 directory with 4 updates (#5734)
Bumps the github-actions group with 4 updates in the / directory: [actions/checkout](https://github.com/actions/checkout), [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 `actions/checkout` from 4.1.6 to 4.1.7
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](a5ac7e51b4...692973e3d9)

Updates `lukka/get-cmake` from 3.29.4 to 3.30.0
- [Release notes](https://github.com/lukka/get-cmake/releases)
- [Commits](85652a37b1...983956e4a5)

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

Updates `github/codeql-action` from 3.25.8 to 3.25.12
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](2e230e8fe0...4fa2a79536)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions
- dependency-name: lukka/get-cmake
  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-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-07-15 20:48:59 -04:00
Sven van Haastregt
6a5fa5f70a
Fix SPRIV -> SPIRV typos (#5735)
Fix all occurrences of "spriv" typos (irrespective of case).

Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
2024-07-15 20:10:06 -04:00
David Neto
9f2ccaef5f
kokoro: use Python 3.12 in Linux builds (#5730)
Bug: crbug.com/350048185
2024-07-05 18:18:59 -04:00
github-actions[bot]
beabd8b7f4
Roll external/abseil_cpp/ 1278ee9bd..0d9c2fc76 (2 commits) (#5724)
* Roll external/abseil_cpp/ 1278ee9bd..074a32af6 (5 commits)

1278ee9bd9...074a32af66

Created with:
  roll-dep external/abseil_cpp

* Roll external/spirv-headers/ 2acb319af..41a8eb27f (1 commit)

2acb319af3...41a8eb27f1

Created with:
  roll-dep external/spirv-headers

---------

Co-authored-by: GitHub Actions[bot] <>
2024-07-05 13:31:32 +00:00
David Neto
216574bedb
Allow for empty list of enums for an operand (#5727)
Insert a placeholder enum that is never valid.
This allows compilation to pass on MSVC, which doesn't like
creating an array with explicit type elem[] but which has an empty
initializer.

Bug: crbug.com/351140758
2024-07-04 10:28:38 -04:00
Victor Lomuller
3bc9744d0a
Add FPEncoding operand type. (#5726)
This patch adds the optional FPEncoding operand that can be added to OpTypeFloat.
At the moment there is no usable operand, so support is limited to adding the entry.

Co-authored-by: Kévin Petit <kevin.petit@arm.com>
Co-authored-by: David Neto <dneto@google.com>
2024-07-03 13:18:40 -04:00
github-actions[bot]
973e791a9a
Roll external/abseil_cpp/ 16452e141..a7c5f985f (5 commits) (#5722)
* Roll external/re2/ 6144b62be..6dcd83d60 (4 commits)

6144b62bec...6dcd83d60f

Created with:
  roll-dep external/re2

* Roll external/googletest/ 1d17ea141..34ad51b3d (1 commit)

1d17ea141d...34ad51b3dc

Created with:
  roll-dep external/googletest

* Roll external/abseil_cpp/ 16452e141..1278ee9bd (11 commits)

16452e1418...1278ee9bd9

Created with:
  roll-dep external/abseil_cpp

---------

Co-authored-by: GitHub Actions[bot] <>
2024-07-02 13:14:18 +00:00
github-actions[bot]
c91d9ec158
Roll external/abseil_cpp/ 1315c900e..b4e4b6259 (1 commit) (#5716)
* Roll external/re2/ 4a8cee3dd..6144b62be (5 commits)

4a8cee3dd3...6144b62bec

Created with:
  roll-dep external/re2

* Roll external/abseil_cpp/ 1315c900e..16452e141 (19 commits)

1315c900e1...16452e1418

Created with:
  roll-dep external/abseil_cpp

---------

Co-authored-by: GitHub Actions[bot] <>
2024-06-27 06:52:47 -04:00
Steven Perron
ca004da9f9
Add knowledge of cooperative matrices (#5720)
* Add knowledge of cooperative matrices

Some optimizations are not aware of cooperative matrices, and either do
nothing or assert. This commits fixes that up.

* Add int tests, and a handle a couple more cases.

* Add float tests, and a handle a couple more cases.

* Add NV coop matrix as well.
2024-06-26 08:00:29 -04:00
Nathan Gauër
64d37e2811
[NFC] Fix potential buffer overflow (#5715)
Fixing a clusterfuzz finding.
If the given binary has debug instruction which contained
a badly formatted ANSI escape sequence, the iteration could
go beyond the string length.

Signed-off-by: Nathan Gauër <brioche@google.com>
2024-06-25 06:08:28 -04:00
Natalie Chouinard
b9d8114695
Add re2 dep back to Bazel build (#5721)
This explicit dep was removed in #5707 but it is still used by the test
library. Not sure why the Bazel build didn't catch the indirect
dependence on another module but it is causing build failures
downstream.
2024-06-24 14:17:34 -04:00
Steven Perron
0cfe9e7219
Prepare release v2024.3 (#5719) 2024-06-20 10:29:42 -04:00
Steven Perron
581279dedd
[OPT] Zero-extend unsigned 16-bit integers when bitcasting (#5714)
The folding rule `BitCastScalarOrVector` was incorrectly handling
bitcasting to unsigned integers smaller than 32-bits. It was simply
copying the entire 32-bit word containing the integer. This conflicts with the
requirement in section 2.2.1 of the SPIR-V spec which states that
unsigned numeric types with a bit width less than 32-bits must have the
high-order bits set to 0.

This change include a refactor of the bit extension code to be able to
test it better, and to use it in multiple files.

Fixes https://github.com/microsoft/DirectXShaderCompiler/issues/6319.
2024-06-19 19:17:05 +02:00
Cassandra Beckley
80a1aed219
Use bzlmod for effcee (#5707) 2024-06-18 17:52:50 +00:00
github-actions[bot]
7bf2d0275e
roll deps (#5685)
* Roll external/re2/ 917047f36..4a8cee3dd (27 commits)

917047f360...4a8cee3dd3

Created with:
  roll-dep external/re2

* Roll external/googletest/ 9b4993ca7..1d17ea141 (3 commits)

9b4993ca7d...1d17ea141d

Created with:
  roll-dep external/googletest

* Roll external/abseil_cpp/ 1a31b81c0..1315c900e (91 commits)

1a31b81c0a...1315c900e1

Created with:
  roll-dep external/abseil_cpp

* Roll external/spirv-headers/ eb49bb7b1..2acb319af (1 commit)

eb49bb7b11...2acb319af3

Created with:
  roll-dep external/spirv-headers

* Roll external/effcee/ 19b4aa87a..d74d33d93 (4 commits)

19b4aa87af...d74d33d930

Created with:
  roll-dep external/effcee

* Update module.bazel to find re2

---------

Co-authored-by: GitHub Actions[bot] <>
Co-authored-by: Steven Perron <stevenperron@google.com>
2024-06-17 11:18:20 -04:00
Nathan Gauër
6c8b460eb1
misc: remove encoding parameter (#5710)
Those scripts are running on Python2.7 if build with the NDK tools.
Under python2.7, io.open will load as "utf-8" since we give the encoding
option, and return a "unicode" string.
Under Python3, the open() function will return a UTF-8 string.
This means the XMLParser needs to have a different 'encoding' option
depending on the python version.

For some reason I don't know, the XMLParser still fails if we use
'unicode' under Python2.7. But converting the unicode string to utf-8
does work.

Signed-off-by: Nathan Gauër <brioche@google.com>
2024-06-17 16:08:55 +02:00
Shahbaz Youssefi
7564e142d6
spirv-dis: Add --nested-indent and --reorder-blocks (#5671)
With --nested-indent, the SPIR-V blocks are nested according to the
structured control flow.  Each OpLabel is nested that much with the
contents of the block nested a little more.  The blocks are separated by
a blank line for better visualization.

With --reorder-blocks, the SPIR-V blocks are reordered according to the
structured control flow.  This is particularly useful with
--nested-indent.

Note that with --nested-indent, the disassembly does not exactly show
the binary as-is, and the instructions may be reordered.
2024-06-17 09:54:18 -04:00
Nathan Gauër
bc28ac7c19
opt: add OpExtInst forward ref fixup pass (#5708)
This pass fixups the opcode used for OpExtInst instructions
to use OpExtInstWithForwardRefsKHR when it contains a forward
reference.
This pass is agnostic to the extension used, hence the validity
of the code depends of the validity of the usage:

If a forward reference is used on a non-semantic extended instruction,
the generated code will remain invalid, but the opcode will change.
What this pass guarantees is valid code won't become invalid.

---------

Signed-off-by: Nathan Gauër <brioche@google.com>
Co-authored-by: Steven Perron <stevenperron@google.com>
2024-06-13 02:09:58 -07:00
Nathan Gauër
65d30c3150
opt: fix Subgroup* trimming (#5706)
PR #5648 added support for the GroupNonUniformPartitionedNV. But there
was an issue: the opcodes are enabled by multiple capabilities, and the
actual operand is what matters.

Added testing coverage and the implementation to correctly trim a few
NonUniform capabilities.

Signed-off-by: Nathan Gauër <brioche@google.com>
2024-06-11 17:13:46 +02:00
Shahbaz Youssefi
c3178da8ea
spirv-dis: add decorations to comments (#5675) 2024-06-10 15:22:25 -04:00
Nathan Gauër
ce46482db7
Add KHR suffix to OpExtInstWithForwardRef opcode. (#5704)
The KHR suffix was missing from the published SPIR-V extension.
This is now fixed, but requires some patches in SPIRV-Tools.

Signed-off-by: Nathan Gauër <brioche@google.com>
2024-06-06 03:17:51 -07:00
alan-baker
7b5691084a
update tests for disassembly changes (#5694)
* update tests for disassembly changes
* use DEPS in wasm build
2024-06-05 13:23:01 -07:00
dependabot[bot]
e1c0ad23f7
build(deps): bump the github-actions group across 1 directory with 2 updates (#5702)
Bumps the github-actions group with 2 updates in the / directory: [lukka/get-cmake](https://github.com/lukka/get-cmake) and [github/codeql-action](https://github.com/github/codeql-action).


Updates `lukka/get-cmake` from 3.29.3 to 3.29.4
- [Release notes](https://github.com/lukka/get-cmake/releases)
- [Commits](c57ffe818c...85652a37b1)

Updates `github/codeql-action` from 3.25.6 to 3.25.8
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](9fdb3e4972...2e230e8fe0)

---
updated-dependencies:
- dependency-name: lukka/get-cmake
  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-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-06-05 10:22:32 -07:00
Steven Perron
9db5b5ec19
Add assert header to val/decoration.h (#5703)
Some platforms fail to compile if the cassert header is not included in
decoration.h. Adding it to make those work.
2024-06-05 06:22:58 -07:00
Nathan Gauër
6a2bdeee75
spirv-val, core: add support for OpExtInstWithForwardRefs (#5698)
* val, core: add support for OpExtInstWithForwardRefs

This commit adds validation and support for
OpExtInstWithForwardRefs. This new instruction will be used
for non-semantic debug info, when forward references are
required.

For now, this commit only fixes the code to handle this new instruction,
and adds validation rules. But it does not add the pass to generate/fix
the OpExtInst instruction when forward references are in use.
Such pass would be useful for DXC or other tools, but I wanted to land
validation rules first.

This commit also bumps SPIRV-Headers to get this new opcode.

---------

Signed-off-by: Nathan Gauër <brioche@google.com>
2024-06-04 16:18:06 +02:00
Steven Perron
4a2e0c9b36
Fix comments in liveness.h (#5699)
Addressed comments from #5693 that were not fixed before merging.
2024-06-03 12:05:04 -04:00
alan-baker
70ad4dae7d
OpSampledImage extra validation (#5695)
* Validate that the type of Image operand matches the result type's
  Image operand
2024-06-03 10:43:26 -04:00
Steven Perron
fd96922e9a
Remove calls to GetId in liveness analysis (#5693)
Part of #5691
2024-06-03 15:21:14 +02:00
Steven Perron
95681dc42f
Remove implicit call to GetId in ConvertToSampledImagePass. (#5692)
We replace getting the id of a poitner type with a specific funciton
call to FindPointerToType. Also, FindPointerToType is updated to not
indirectly call GetId. This leads to a linear search for an existing
type in all cases, but it is necessary.

Note that this function could have a similar problem. There could be two
pointer types with the same pointee and storage class, and the first one
will be returned. I have checked the ~20 uses, and they are all used in
situations where the id is used to create something new, and it does not
have to match an existing type. These will not cause problems.

Part of #5691
2024-06-03 15:07:52 +02:00
Steven Perron
148c97f687
Avoid use of type manager in extact->construct folding (#5684)
* Avoid use of type manager in extact->construct folding

When dealing with structs the type manager merge two different structs
into a single entry if they have all of the same decorations and
element types. This is because they hash to the same value in the hash
table. This can cause problems if you need to get the id of a type from
the type manager because you could get either one. In this case, it
returns the wrong one.

The fix avoids using the type manager in one place. I have not
looked closely at other places the type manager is used to make
sure it is used safely everywhere.

Fixes #5624

* Remove use of TypeManager::GetId

This removes a use of TypeManager::GetId by keeping the id around. This
avoid a potential problem if the type manager gets confused. These types
of bugs are hard to generate test cases for, so I do not have a test.
However, existing tests make sure that do not regress.
2024-05-31 14:13:20 +02:00
Sven van Haastregt
142bf7de83
spirv-val: Fix indentation of --version output (#5686)
The last three elements in the list of supported targets were
misaligned:

```
Targets:
  SPIR-V 1.0
  SPIR-V 1.1
  ...
  SPIR-V 1.3 (under Vulkan 1.1 semantics)
 SPIR-V 1.4 (under Vulkan 1.1 semantics)
 SPIR-V 1.5 (under Vulkan 1.2 semantics)
 SPIR-V 1.6 (under Vulkan 1.3 semantics)
```

Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
2024-05-30 11:01:35 -04:00
Kévin Petit
7e1a8cdc53
Basic support for SPV_EXT_replicated_composites (#5690)
* Basic support for SPV_EXT_replicated_composites

Validation will follow as a separate PR (still need to write a test suite)

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

* Update SPIRV-Headers

Change-Id: I6c0df248d99c13b49d78528d035a4222027c0232

---------

Signed-off-by: Kevin Petit <kevin.petit@arm.com>
2024-05-30 10:58:44 -04:00
Spencer Fricke
3d24089292
spirv-val: Add Duplicate EntryPoint Builtin check (#5678)
* spirv-val: Add Decoration::builtin()
* spirv-val: Add Duplicate EntryPoint Builtin check
* spirv-val: Handle Built-ins in/out of block
* spirv-val: Remove extra CheckBuiltInVariable
2024-05-29 14:38:37 -04:00
github-actions[bot]
77c40bece1
Roll deps
* Roll external/googletest/ 5a37b517a..9b4993ca7 (8 commits)

5a37b517ad...9b4993ca7d

Created with:
  roll-dep external/googletest

* Roll external/abseil_cpp/ 79ca5d7aa..1a31b81c0 (602 commits)

79ca5d7aad...1a31b81c0a

Created with:
  roll-dep external/abseil_cpp

* Roll external/spirv-headers/ 4f7b471f1..49a1fceb9 (3 commits)

4f7b471f1a...49a1fceb9b

Created with:
  roll-dep external/spirv-headers

---------

Co-authored-by: GitHub Actions[bot] <>
2024-05-23 16:18:51 -04:00
Steven Perron
336b5710a5
Do not fold mul and adds to generate fmas (#5682)
This removes the folding rules added in #4783 and #4808. They lead to
poor code generation on Adreno devices when 16-bit floating point values
were used. Since this change is transformation is suppose to be neutral,
there is no general reason to continue doing it.

I have talked to the owners of SwiftShader, and they do not mind if the
transform is removed. They were the ones the requested the change in the
first place.

Fixes #5658
2024-05-22 13:01:26 -04:00
Steven Perron
ee749f5057
Add abseil to the autoroller (#5680)
The autoroller does not update abseil, and that it stopping us from
updating RE2. This change will update the auto roller, then the next
time it runs, we should be able to update everything.
2024-05-21 22:15:30 -04:00
Sven van Haastregt
e2646f5e95
spirv-val: Consider target env for OpReadClockKHR scope (#5681)
The Scope operand of `OpReadClockKHR` was always validated using the
Vulkan environment rules, which only allow `Subgroup` or `Device`.
For the OpenCL environment, `Workgroup` is also a valid Scope, so
`Workgroup` should not be rejected in the universal environment.

Guard the existing Scope check behind `spvIsVulkanEnv` and add a new
Scope check for the OpenCL environment.

Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
2024-05-21 13:02:17 -04:00
Zheng Shaokun
e4b1a48aab
Use raw string to avoid unintended escapes in regex (#5676) 2024-05-21 11:34:06 -04:00
dependabot[bot]
14fe558c07
--- (#5679)
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions
- 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-patch
  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-05-21 10:09:12 -04:00
alan-baker
ccf3e3c103
Improve matrix layout validation (#5662)
* Check for matrix decorations on arrays of matrices
  * MatrixStide, RowMajor and ColMajor can be applied to matrix or
    arrays of matrix members
  * Check that matrix stride satisfies alignment in arrays
2024-05-14 15:13:54 -04:00