Commit Graph

156 Commits

Author SHA1 Message Date
Spencer Fricke
0c4ce11b4a
spirv-val: Update VUID from 1.3.228 Vulkan spec (#4936)
Co-authored-by: alan-baker <alanbaker@google.com>
2022-09-16 14:51:36 -04:00
Spencer Fricke
5f4ce362ad
spirv-val: Label VUID 07290 (#4927) 2022-09-16 14:05:40 -04:00
Spencer Fricke
8422d8a44b
spirv-val: Label ShaderRecordBufferKHR VUID (#4926) 2022-09-16 14:05:23 -04:00
Pankaj Mistry
4c456f7da6
Implement tool changes for SPV_EXT_mesh_shader. (#4915)
- Added validation rule to support EXT_mesh_shader from SPIRV 1.4 onwards
2022-09-01 20:36:15 -04:00
Spencer Fricke
f76431cbaf
spirv-val: Add SPV_KHR_ray_tracing storage class (#4868)
* Added VUID labels
2022-08-29 11:09:06 -04:00
Spencer Fricke
08c542d344
spirv-val: Label VUID 06997 (#4881) 2022-08-03 10:42:13 -04:00
Pankaj Mistry
60615b8ec6
Implement SPV_NV_bindless_texture related changes (#4847)
* Add validation for SPV_NV_bindless_texture
2022-07-19 14:41:19 -04:00
Spencer Fricke
93ebf698a0
spirv-val: Add OpConvertUToAccelerationStructureKHR (#4838) 2022-07-15 09:55:33 -04:00
Spencer Fricke
e2cf769302
spirv-val: Label VUID 06925 (#4852) 2022-07-13 10:05:52 -04:00
Spencer Fricke
bc5c8760af
spirv-val: Add Vulkan decoration interface (#4831) 2022-07-07 13:03:52 -04:00
Spencer Fricke
bfc611b03e
spirv-val: Label 06807 and 06808 VUID (#4817) 2022-06-15 11:25:16 -04:00
Spencer Fricke
82d91083cb
spirv-val: Add PerVertexKHR (#4807) 2022-05-26 13:11:05 -04:00
stu-s
c267127846
Add SPV_KHR_fragment_shader_barycentric support (#4805)
* Add SPV_KHR_fragment_shader_barycentric support
2022-05-25 09:20:39 -04:00
Daniel Koch
9e377b0f97
spirv-val: Add CullMaskKHR support (#4792)
Co-authored-by: sfricke-samsung <s.fricke@samsung.com>
2022-05-06 07:32:56 -04:00
sfricke-samsung
fa5d424830
spirv-val: Add more Vulkan VUID labels (#4764) 2022-03-25 09:29:19 -04:00
sfricke-samsung
90728d2dff
spirv-val: Clean up VariablePointers logic (#4755) 2022-03-24 12:02:29 -04:00
Roy.li
cab0b7715a
Use types have same widths in loop condition. (#4763) 2022-03-24 14:07:22 +00:00
sfricke-samsung
b3c1790632
spirv-val: Add Vulkan 32-bit bit op Base (#4758) 2022-03-23 13:55:42 -04:00
sfricke-samsung
9668d2e4e4
spirv-val: Label and add test for PSB Aligned (#4756) 2022-03-23 11:08:21 -04:00
sfricke-samsung
7963fa13c7
spirv-val: Add Vulkan Dref not allowed 3D dim VUID (#4751) 2022-03-10 13:08:26 -05:00
sfricke-samsung
5c9d55a59a
spirv-val: Add Vulkan Image VUID 06214 (#4750) 2022-03-10 13:06:48 -05:00
sfricke-samsung
9700708570
spirv-val: Label Vulkan RuntimeArray VUID (#4749) 2022-03-10 13:05:26 -05:00
sfricke-samsung
273d2a45ad
spirv-val: Label VUID 06491 (#4745) 2022-03-07 12:30:05 -05:00
sfricke-samsung
d1addc44b2
spirv-val: Label Vulkan VUID 04734 (#4739) 2022-03-04 10:07:24 -05:00
luzpaz
65ecfd1093
Fix various source comment (doxygen) typos (#4680)
Found via `codespell -q 3 -L fo,lod,parm
2022-01-26 15:13:08 -05:00
alan-baker
6938af7f82
Vulkan 1.3 (#4686)
* Add new environment enum for Vulkan 1,3
* Do not require --allow-localsizeid in Vulkan 1.3 to use LocalSizeId
  execution mode
2022-01-25 10:36:08 -05:00
David Neto
5d0e3240f0
Patch location validation VUIDs (#4664)
* spirv-val: Add Vulkan Location VUID

* Simplify: interface checking already does all the work

Co-authored-by: sfricke_samsung <s.fricke@samsung.com>
2021-12-16 15:25:23 -05:00
alan-baker
7d768812e2
Basic support for SPIR-V 1.6 (#4663)
* Basic support for SPIR-V 1.6

* Update SPIRV-Headers deps
* Add new environment enum for SPIR-V 1.6
* Make default environment 1.6 for most tools
* Update tests
* Disallow conditional branch with duplicate labels
* Disallow Dim=Buffer with sampled images
* Do not require the non-semantic extension after SPIR-V 1.5
2021-12-15 14:38:28 -05:00
Marius Hillenbrand
1ed847f438
Fix endianness of string literals (#4622)
* Fix endianness of string literals

To get correct and consistent encoding and decoding of string literals
on big-endian platforms, use spvtools::utils::MakeString and MakeVector
(or wrapper functions) consistently for handling string literals.

- add variant of MakeVector that encodes a string literal into an
  existing vector of words
- add variants of MakeString
- add a wrapper spvDecodeLiteralStringOperand in source/
- fix wrapper Operand::AsString to use MakeString (source/opt)
- remove Operand::AsCString as broken and unused
- add a variant of GetOperandAs for string literals (source/val)
... and apply those wrappers throughout the code.

Fixes  #149

* Extend round trip test for StringLiterals to flip word order

In the encoding/decoding roundtrip tests for string literals, include
a case that flips byte order in words after encoding and then checks for
successful decoding. That is, on a little-endian host flip to big-endian
byte order and then decode, and vice versa.

* BinaryParseTest.InstructionWithStringOperand: also flip byte order

Test binary parsing of string operands both with the host's and with the
reversed byte order.
2021-12-08 12:01:26 -05:00
alan-baker
339d4475c1
Improve decoration validation (#4490)
Fixes #4469

* Checks that decorations only usable with structure members are not
  used by OpDecorate or OpDecorateId
* Checks that decorations not allowed on structure members are not used
  with OpMemberDecorate
* Checks decoration targets for most core decorations
* Performs some Vulkan specific validation on deorations
2021-11-05 13:18:19 -04:00
sfricke-samsung
c194bb2a7f
spirv-val Update LocalSizeId VUID (#4602) 2021-10-29 11:58:02 -04:00
alan-baker
4f4f76037c
Change validator boolean tests to avoid asserts (#4503)
Fixes https://crbug.com/38102

* Check for valid instructions in many boolean tests instead of
  asserting in ValidationState_t
2021-09-12 19:14:33 -04:00
gnl21
ee30773650
Add a feature for allowing LocalSizeId (#4492)
Allow LocalSizeId as a way of sizing compute workgroups where the
environment allows it. A command-line switch is also added to force
acceptance even where the environment would not otherwise allow it.
2021-08-26 14:33:19 -04:00
alan-baker
b2e36b67ec
Disallow loading a runtime-sized array (#4473)
* Disallow loading a runtime-sized array

Fixes #4472

* Disallow loading a runtime-sized array or a composite containing one
* Refactor type traversal into a separate function used by both runtime
  array checks and sized int/float checks
* Update invalid tests
2021-08-16 18:23:10 -04:00
sfricke-samsung
f8eafd4d83
spirv-val: Label VUID 04780 (#4334) 2021-06-21 09:33:07 -04:00
sfricke-samsung
e84bcb251d
spirv-val: Add GLCompute to VUID 04644 message (#4333) 2021-06-21 09:31:55 -04:00
sfricke-samsung
ecdd9a3e6b
spirv-val: Vulkan Storage Class for Execution Model (#4212) 2021-06-10 08:38:23 -04:00
sfricke-samsung
8f421ced3e
spirv-val: Label VUID 04643 (#4202) 2021-03-19 09:02:48 -04:00
sfricke-samsung
2b0d16a059
spirv-val: Label VUID 04667 (#4201) 2021-03-19 08:57:36 -04:00
sfricke-samsung
c040bd3ae5
spirv-val: Add Vulkan Execution Scope checks (#4183)
* spirv-val: Add Vulkan Execution Scope checks
2021-03-17 10:00:11 -04:00
sfricke-samsung
042eff73fe
spirv-val: Add Vulkan Invocation Sematics check (#4182) 2021-03-16 10:53:37 -04:00
sfricke-samsung
03f23106c6
spirv-val: Label VUID 04634 (#4181) 2021-03-16 10:53:27 -04:00
Corentin Wallez
4a59fd4763
Fix -Wextra-semi-stmt -Wsuggest-destructor-override -Wdeprecated-copy-dtor (#4164)
* Fix -Wextra-semi-stmt
* Fix -Wsuggest-destructor-override
* Fix -Wdeprecated-copy-dtor
2021-03-09 13:16:43 +00:00
sfricke-samsung
f0c96f40c7
spriv-val: Vulkan image gather constant component (#4133) 2021-02-05 15:12:38 -05:00
sfricke-samsung
3ad7e5fcc0
spirv-val: Fix/Label UniformConstant VUID (#4134) 2021-02-05 09:57:00 -05:00
sfricke-samsung
f11f743481
spirv-val: Add Vulkan Invariant Decoration VUID (#4132) 2021-02-05 09:49:14 -05:00
sfricke-samsung
c91a25af13
spirv-val: label tests for VUID 04657 (#4119) 2021-02-02 10:54:26 -05:00
sfricke-samsung
d61a7d110d
spirv-val: Add Vulkan PSB64 convert VUID (#4122) 2021-02-01 10:39:44 -05:00
Caio Marcelo de Oliveira Filho
b812fd634e
Validate SPV_KHR_workgroup_memory_explicit_layout (#4128)
* Validate SPV_KHR_workgroup_memory_explicit_layout

* Check if SPIR-V is at least 1.4 to use the extension.

* Check if either only Workgroup Blocks or only Workgroup non-Blocks
  are used.

* Check that if more than one Workgroup Block is used, variables are
  decorated with Aliased.

* Check layout decorations for Workgroup Blocks.

* Implicitly use main capability if the ...8BitAccess or
  ...16BitAccess are used.

* Allow 8-bit and 16-bit types when ...8BitAccess and ...16BitAccess
  are used respectively.

* Update SPIRV-Headers dependency

Bump it to include SPV_KHR_workgroup_memory_explicit_layout.

* Add option to validate Workgroup blocks with scalar layout

Validate the equivalent of scalarBlockLayout for Workgroup storage
class Block variables from SPV_KHR_workgroup_memory_explicit_layout.
Add option to the API and command line tool.
2021-01-27 19:38:38 -05:00
sfricke-samsung
d71ac38b8e
spirv-val: Add Vulkan image gather offset VUID (#4118) 2021-01-27 19:37:45 -05:00