SPIRV-Tools/source/val
David Neto 63f57d95d6
Support SPIR-V 1.4 (#2550)
* SPIR-V 1.4 headers, add SPV_ENV_UNIVERSAL_1_4

* Support --target-env spv1.4 in help for command line tools

* Support asm/dis of UniformId decoration

* Validate UniformId decoration

* Fix version check on instructions and operands

Also register decorations used with OpDecorateId

* Extension lists can differ between enums that match

Example: SubgroupMaskEq vs SubgroupMaskEqKHR

* Validate scope value for Uniform decoration, for SPIR-V 1.4

* More unioning of exts

* Preserve grammar order within an enum value

* 1.4: Validate OpSelect over composites

* Tools default to 1.4

* Add asm/dis test for OpCopyLogical

* 1.4: asm/dis tests for PtrEqual, PtrNotEqual, PtrDiff

* Basic asm/Dis test for OpCopyMemory

* Test asm/dis OpCopyMemory with 2-memory access

Add asm/dis tests for OpCopyMemorySized

Requires grammar update to add second optional memory access operand
to OpCopyMemory and OpCopyMemorySized

* Validate one or two memory accesses on OpCopyMemory*

* Check av/vis on CopyMemory source and target memory access

This is a proposed rule. See
https://gitlab.khronos.org/spirv/SPIR-V/issues/413

* Validate operation for OpSpecConstantOp

* Validate NonWritable decoration

Also permit NonWritable on members of UBO and SSBO.

* SPIR-V 1.4: NonWrtiable can decorate Function and Private vars

* Update optimizer CLI tests for SPIR-V 1.4

* Testing tools: Give expected SPIR-V version in message

* SPIR-V 1.4 validation for entry point interfaces

* Allow only unique interfaces
* Allow all global variables
* Check that all statically used global variables are listed
* new tests

* Add validation fixture CompileFailure

* Add 1.4 validation for pointer comparisons

* New tests

* Validate with image operands SignExtend, ZeroExtend

Since we don't actually know the image texel format, we can't fully
validate.  We need more context.

But we can make sure we allow the new image operands in known-good
cases.

* Validate OpCopyLogical

* Recursively checks subtypes
* new tests

* Add SPIR-V 1.4 tests for NoSignedWrap, NoUnsignedWrap

* Allow scalar conditions in 1.4 with OpSelect

* Allows scalar conditions with vector operands
* new tests

* Validate uniform id scope as an execution scope

* Validate the values of memory and execution scopes are valid scope
values
* new test

* Remove SPIR-V 1.4 Vulkan 1.0 environment

* SPIR-V 1.4 requires Vulkan 1.1

* FIX: include string for spvLog

* FIX: validate nonwritable

* FIX: test case suite for member decorate string

* FIX: test case for hlsl functionality1

* Validation test fixture: ease debugging

* Use binary version for SPIR-V 1.4 specific features

* Switch checks based on the SPIR-V version from the target environment
to instead use the version from the binary
* Moved header parsing into the ValidationState_t constructor (where
version based features are set)
* Added new versions of tests that assemble a 1.3 binary and validate a
1.4 environment

* Fix test for update to SPIR-V 1.4 headers

* Fix formatting

* Ext inst lookup: Add Vulkan 1.1 env with SPIR-V 1.4

* Update spirv-val help

* Operand version checks should use module version

Use the module version instead of the target environment version.

* Fix comment about two-access form of OpCopyMemory
2019-05-07 12:27:18 -04:00
..
basic_block.cpp Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
basic_block.h Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
construct.cpp Remove merge assert in block calculation (#2489) 2019-04-02 14:37:05 -04:00
construct.h Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
decoration.h Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
function.cpp Implement WebGPU specific CFG validation (#2386) 2019-03-08 13:01:09 -05:00
function.h Implement WebGPU specific CFG validation (#2386) 2019-03-08 13:01:09 -05:00
instruction.cpp Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
instruction.h Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
validate_adjacency.cpp Add passes to propagate and eliminate redundant line instructions (#2027). (#2039) 2018-11-15 14:06:17 -05:00
validate_annotation.cpp Support SPIR-V 1.4 (#2550) 2019-05-07 12:27:18 -04:00
validate_arithmetics.cpp Add validation for SPV_NV_cooperative_matrix (#2404) 2019-02-25 17:43:11 -05:00
validate_atomics.cpp SPV_EXT_physical_storage_buffer (#2267) 2019-01-07 13:19:24 -05:00
validate_barriers.cpp Support SPIR-V 1.4 (#2550) 2019-05-07 12:27:18 -04:00
validate_bitwise.cpp Update diag() usage in validate_bitwise. (#1757) 2018-08-01 09:19:37 -04:00
validate_builtins.cpp Add WebGPU specific validation for WorkgroupSize BuiltIn decoration (#2334) 2019-01-30 17:01:17 -05:00
validate_capability.cpp Allow Float16/Int8 for Vulkan 1.0 (#2153) 2018-12-03 12:50:12 -05:00
validate_cfg.cpp Remove unreachable block validation (#2525) 2019-04-17 18:21:19 -04:00
validate_composites.cpp Support SPIR-V 1.4 (#2550) 2019-05-07 12:27:18 -04:00
validate_constants.cpp Support SPIR-V 1.4 (#2550) 2019-05-07 12:27:18 -04:00
validate_conversion.cpp Add validation for SPV_NV_cooperative_matrix (#2404) 2019-02-25 17:43:11 -05:00
validate_datarules.cpp Check forward reference in OpTypeArray. (#2307) 2019-01-21 12:10:25 -05:00
validate_debug.cpp Validate that debugging instructions are not present for WebGPU (#2089) 2018-11-20 16:12:28 -05:00
validate_decorations.cpp Support SPIR-V 1.4 (#2550) 2019-05-07 12:27:18 -04:00
validate_derivatives.cpp Add support for Nvidia Turing extensions 2018-09-19 20:46:14 -04:00
validate_execution_limitations.cpp Split function opcode validation into new files. 2018-08-13 17:04:57 -04:00
validate_extensions.cpp Ensure that only whitelisted extensions are used in WebGPU (#2127) 2018-11-28 10:49:05 -05:00
validate_function.cpp Relax function call parameter check (#2448) 2019-03-14 12:45:31 -04:00
validate_id.cpp Add validation for SPV_NV_cooperative_matrix (#2404) 2019-02-25 17:43:11 -05:00
validate_image.cpp Support SPIR-V 1.4 (#2550) 2019-05-07 12:27:18 -04:00
validate_instruction.cpp Support SPIR-V 1.4 (#2550) 2019-05-07 12:27:18 -04:00
validate_interfaces.cpp Support SPIR-V 1.4 (#2550) 2019-05-07 12:27:18 -04:00
validate_layout.cpp Update diag() calls in validate_layout. (#1770) 2018-08-01 12:01:35 -04:00
validate_literals.cpp Update diag() calls in validate_literals. (#1771) 2018-08-01 12:41:46 -04:00
validate_logicals.cpp Support SPIR-V 1.4 (#2550) 2019-05-07 12:27:18 -04:00
validate_memory_semantics.cpp Remove Acquire, Release, and Relaxed from allowed Mem Sem bits for WebGPU (#2526) 2019-04-23 13:27:40 -04:00
validate_memory_semantics.h Merge two implementations of ValidateMemorySemantics (#2175) 2018-12-06 14:38:15 -05:00
validate_memory.cpp Support SPIR-V 1.4 (#2550) 2019-05-07 12:27:18 -04:00
validate_mode_setting.cpp Add validation specific to OpExecutionModeId (#2536) 2019-05-01 13:29:39 -04:00
validate_non_uniform.cpp Merge two implementations of ValidateExecutionScope (#2131) 2018-11-29 13:48:42 -05:00
validate_primitives.cpp Refactor where opcodes are validated 2018-08-07 10:29:30 -04:00
validate_scopes.cpp Support SPIR-V 1.4 (#2550) 2019-05-07 12:27:18 -04:00
validate_scopes.h Merging two ValidateMemoryScope implementations (#2132) 2018-11-29 14:51:17 -05:00
validate_type.cpp Support SPIR-V 1.4 (#2550) 2019-05-07 12:27:18 -04:00
validate.cpp Support SPIR-V 1.4 (#2550) 2019-05-07 12:27:18 -04:00
validate.h Validate Uniform decoration (#2181) 2018-12-07 09:32:57 -05:00
validation_state.cpp Support SPIR-V 1.4 (#2550) 2019-05-07 12:27:18 -04:00
validation_state.h Support SPIR-V 1.4 (#2550) 2019-05-07 12:27:18 -04:00