A token is allowed to parse even when it's from the wrong
version, or is not enabled by a capability or extension.
This allows more modules to parse.
Version/capability/extension checking is fully moved to
validation instead.
Fixes: #5364
* Validate layouts for PhysicalStorageBuffer pointers
Fixes#5282
* These pointers may not orginate from a variable so standard layout
validation misses them
* Now checks every instructions that results in a physical storage
buffer pointer
* May not start from a Block-decorated struct so that part is fudged
with a valid layout
* formatting
* SPV_KHR_cooperative_matrix
* Update DEPS with headers
* Update according to review recommendations
* Bugfix and formatting
* Formatting missed or damaged by VS2022
Follow up to #5249
* glslang tests that physical storage buffer pointers can be used as
varyings in shaders
* Allow physical storage buffer pointers in IO interfaces as a 64-bit
type
* Update fuzz tests to not use invalid combinations of LoopMerge + BranchConditional
New IDs were selected to make clear the transformation being done here, instead
of reordering all IDs in between or refactoring the SPIR-V in the test.
* spirv-val: Conditional Branch without an exit is invalid in loop header
From 2.16.2, for CFG:
Selections must be structured. That is, an OpSelectionMerge
instruction is required to precede:
- an OpSwitch instruction
- an OpBranchConditional instruction that has different True Label
and False Label operands where neither are declared merge blocks
or Continue Targets.
Contributes to https://github.com/KhronosGroup/glslang/issues/2439
* When OpTypeStruct is used in Vulkan env and its last member
is a RuntimeArray, check if the struct is decorated with
Block or BufferBlock, as required by VUID-...-04680.
* Validate version 5 of clspv reflection
* Add validation for instructions in versions 2 through 5
* Change the instruction reported for remaining indices on an access
chain to the access chain itself for clarity
* update spirv-headers
* Fix layout validation
Fixes#5010
* Unless scalar block layout is enabled, no member can reside at an
offset between the end of the previous member that is a struct or
array and the next multiple of that alignment
* Remove a dead if that was introduced
Co-authored-by: David Neto <dneto@google.com>
open_quote value becomes npos when it fails to find '\'' and then is used to
compute the string length for writing to result. This causes crash in win32 builds of the test.
Fixes#4671
Fixes https://crbug.com/oss-fuzz/43265
* Only validate full layout in a vulkan environment
* Universal validation still checks that the right decorations are
present, but the values are only considered for vulkan
* One exception is that invalid overlaps are only checked for vulkan
* This is a pragmatic choice as SPIR-V doesn't define the size of
types so the amount of universal checking would be quite limited
* Removed redundant check for GLSLShared and GLSLPacked decorations
* Should never have been validated as part of universal validation
* make conditionals independent
Fixes https://crbug.com/oss-fuzz/48553
* Assign a reflexive dominator if no other dominator can be found using
forward traversals
* This prevents a null dereference of a pointer in the sorting of the
output
The always-friendly messages make it harder to debug when the
disassembly is later generated without friendly names.
Additionally, the friendly-name-mapper is slow. Disabling it improves
performance of an ANGLE test that creates numerous shaders by ~5%.
Half the messages used to output 'id[%name]' and half id[%name]. With
this change, all messages consistently output 'id[%name]'. Some typos
are also fixed in the process.