SPIRV-Tools/source/val
sfricke-samsung 2c60d16a64
spirv-val: Add Vulkan VUID labels to BuiltIn (#3756)
The Vulkan 1.2.152 headers/spec now include Valid Usage IDs (VUID)
for every BuiltIn. This change adds labeling to help aid tracking
the coverage gap in Vulkan targeted validation. This is done with
a script in the Validation Layers that parses the source for VUID
strings, both that there is an implementation and a test for it.

There are 2 main changes:

1. A VUID string is added where applicable. It is wrapped in a function
that at runtimes checks if Vulkan is the target so that other targets
will not be effected as the output error only changes for Vulkan and
the overhead only occurs if there is an error at all.

2. For unit test, a new parameter value was added to allow make sure
that for each VUID there is a matching test. There are cases where the
same unit test checks multiple VUs via the parameter feature of gtest.
For this, I added a custom gMock Matcher to simply loop over a list
of VUID strings
2020-09-02 14:02:13 -04:00
..
basic_block.cpp Fix reachability in the validator (#3541) 2020-07-15 21:27:03 -04:00
basic_block.h Fix reachability in the validator (#3541) 2020-07-15 21:27:03 -04:00
construct.cpp Fix structured exit validation (#3141) 2020-01-23 18:04:21 -05:00
construct.h Allows breaks selection breaks to switches (#2605) 2019-05-21 22:49:37 -07:00
decoration.h Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
function.cpp Fix reachability in the validator (#3541) 2020-07-15 21:27:03 -04:00
function.h Fix reachability in the validator (#3541) 2020-07-15 21:27:03 -04:00
instruction.cpp Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
instruction.h Handle conflict between debug info and existing validation rule (#3104) 2020-01-23 17:04:30 -05:00
validate_adjacency.cpp Handle conflict between debug info and existing validation rule (#3104) 2020-01-23 17:04:30 -05:00
validate_annotation.cpp Add support for SPV_KHR_non_semantic_info (#3110) 2019-12-18 18:10:29 -05:00
validate_arithmetics.cpp Add validation for SPV_NV_cooperative_matrix (#2404) 2019-02-25 17:43:11 -05:00
validate_atomics.cpp Add changes for SPV_EXT_shader_atomic_float (#3562) 2020-07-21 10:31:05 -04: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 spirv-val: Add Vulkan VUID labels to BuiltIn (#3756) 2020-09-02 14:02:13 -04:00
validate_capability.cpp Update OpenCL capabilities validation (#3149) 2020-07-27 13:01:45 -04:00
validate_cfg.cpp Support SPV_KHR_terminate_invocation (#3568) 2020-07-22 11:45:02 -04:00
validate_composites.cpp Disallow use of OpCompositeExtract/OpCompositeInsert with no indices (#2980) 2019-10-17 13:53:34 -04:00
validate_constants.cpp Validate physical storage buffer restrictions (#2930) 2019-10-02 21:12:57 -04:00
validate_conversion.cpp Relaxed bitcast with pointers (#2878) 2019-09-18 11:55:39 -04:00
validate_debug.cpp Permit the debug instructions in WebGPU SPIR-V (#3063) 2019-11-26 14:04:57 -05:00
validate_decorations.cpp Validate location assignments (#3308) 2020-06-25 13:22:45 -04:00
validate_derivatives.cpp Check that derivatives operate on 32-bit values (#2983) 2019-10-18 09:02:25 -04:00
validate_execution_limitations.cpp Add validation for SPV_EXT_fragment_shader_interlock (#2650) 2019-06-03 10:55:07 -04:00
validate_extensions.cpp Allow DebugTypeTemplate for Type operand (#3702) 2020-08-16 23:42:59 -04:00
validate_function.cpp Fix validation failure on OpDecorationGroup (#3365) 2020-05-21 13:15:41 -04:00
validate_id.cpp Add validation rules for OpenCL.DebugInfo.100 extension (#3133) 2020-02-25 16:47:03 -05:00
validate_image.cpp Update some language usage. (#3611) 2020-07-29 13:50:58 -04:00
validate_instruction.cpp Support SPV_KHR_terminate_invocation (#3568) 2020-07-22 11:45:02 -04:00
validate_interfaces.cpp Only validation locations for appropriate execution models (#3656) 2020-08-11 18:51:49 -04:00
validate_layout.cpp Handle conflict between debug info and existing validation rule (#3104) 2020-01-23 17:04:30 -05: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 Update WebGPU validation rules of OpAtomic*s (#2777) 2019-07-31 17:15:47 -04:00
validate_memory_semantics.h Merge two implementations of ValidateMemorySemantics (#2175) 2018-12-06 14:38:15 -05:00
validate_memory.cpp Add support for KHR_ray_{query,tracing} extensions (#3235) 2020-03-17 15:30:19 -04:00
validate_misc.cpp Re-enable OpReadClockKHR validation (#3013) 2019-11-07 09:51:38 -05:00
validate_mode_setting.cpp Permit Simple and GLSL450 memory model in WEBGPU_0 (#3463) 2020-07-17 12:23:11 -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 Validate ShaderCallKHR memory scope (#3332) 2020-05-05 13:08:28 -04:00
validate_scopes.h Re-enable OpReadClockKHR validation (#3013) 2019-11-07 09:51:38 -05:00
validate_small_type_uses.cpp Extra small storage validation (#2732) 2019-07-11 13:05:14 -04:00
validate_type.cpp Add support for SPV_KHR_non_semantic_info (#3110) 2019-12-18 18:10:29 -05:00
validate.cpp Fix reachability in the validator (#3541) 2020-07-15 21:27:03 -04:00
validate.h Fix reachability in the validator (#3541) 2020-07-15 21:27:03 -04:00
validation_state.cpp spirv-val: Add Vulkan VUID labels to BuiltIn (#3756) 2020-09-02 14:02:13 -04:00
validation_state.h spirv-val: Add Vulkan VUID labels to BuiltIn (#3756) 2020-09-02 14:02:13 -04:00