SPIRV-Tools/source/val
David Neto e70b009b0f
Add support for SPV_KHR_non_semantic_info (#3110)
Add support for SPV_KHR_non_semantic_info

This entails a couple of changes:

- Allowing unknown OpExtInstImport that begin with the prefix `NonSemantic.`
- Allowing OpExtInst that reference any of those sets to contain unknown
  ext inst instruction numbers, and assume the format is always a series of IDs
  as guaranteed by the extension.
- Allowing those OpExtInst to appear in the types/variables/constants section.
- Not stripping OpString in the --strip-debug pass, since it may be referenced
  by these non-semantic OpExtInsts.
- Stripping them instead in the --strip-reflect pass.

* Add adjacency validation of non-semantic OpExtInst

- We validate and test that OpExtInst cannot appear before or between
  OpPhi instructions, or before/between OpFunctionParameter
  instructions.

* Change non-semantic extinst type to single value

* Add helper function spvExtInstIsNonSemantic() which will check if the extinst
  set is non-semantic or not, either the unknown generic value or any future
  recognised non-semantic set.

* Add test of a complex non-semantic extinst

* Use DefUseManager in StripDebugInfoPass to strip some OpStrings

* Any OpString used by a non-semantic instruction cannot be stripped, all others
  can so we search for uses to see if each string can be removed.
* We only do this if the non-semantic debug info extension is enabled, otherwise
  all strings can be trivially removed.

* Silence -Winconsistent-missing-override in protobufs
2019-12-18 18:10:29 -05:00
..
basic_block.cpp Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
basic_block.h Validate nested constructs (#3068) 2019-11-27 16:45:57 -05:00
construct.cpp Allows breaks selection breaks to switches (#2605) 2019-05-21 22:49:37 -07: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 Validate nested constructs (#3068) 2019-11-27 16:45:57 -05:00
function.h Add validation for SPV_EXT_fragment_shader_interlock (#2650) 2019-06-03 10:55:07 -04:00
instruction.cpp Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
instruction.h Add support for SPV_KHR_non_semantic_info (#3110) 2019-12-18 18:10:29 -05: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 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 Validate storage class OpenCL environment rules for atomics (#2750) 2019-07-22 08:38:42 -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 Remove validate_datarules.cpp (#2911) 2019-09-24 17:55:12 -04:00
validate_capability.cpp Allow Float16/Int8 for Vulkan 1.0 (#2153) 2018-12-03 12:50:12 -05:00
validate_cfg.cpp Validate nested constructs (#3068) 2019-11-27 16:45:57 -05: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 Add support for SPV_KHR_non_semantic_info (#3110) 2019-12-18 18:10:29 -05: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 Add support for SPV_KHR_non_semantic_info (#3110) 2019-12-18 18:10:29 -05:00
validate_function.cpp Add support for SPV_KHR_non_semantic_info (#3110) 2019-12-18 18:10:29 -05:00
validate_id.cpp Add support for SPV_KHR_non_semantic_info (#3110) 2019-12-18 18:10:29 -05:00
validate_image.cpp Allow LOD ops in compute shaders with derivative group execution modes (#2752) 2019-07-22 08:37:44 -04:00
validate_instruction.cpp Refactor the InstructionPass (#2924) 2019-09-27 00:06:36 -04:00
validate_interfaces.cpp Support SPIR-V 1.4 (#2550) 2019-05-07 12:27:18 -04:00
validate_layout.cpp Add support for SPV_KHR_non_semantic_info (#3110) 2019-12-18 18:10:29 -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 Validate physical storage buffer restrictions (#2930) 2019-10-02 21:12:57 -04:00
validate_misc.cpp Re-enable OpReadClockKHR validation (#3013) 2019-11-07 09:51:38 -05:00
validate_mode_setting.cpp Refactor the InstructionPass (#2924) 2019-09-27 00:06:36 -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 Re-enable OpReadClockKHR validation (#3013) 2019-11-07 09:51:38 -05: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 Remove validate_datarules.cpp (#2911) 2019-09-24 17:55:12 -04:00
validate.h Remove validate_datarules.cpp (#2911) 2019-09-24 17:55:12 -04:00
validation_state.cpp Add support for SPV_KHR_non_semantic_info (#3110) 2019-12-18 18:10:29 -05:00
validation_state.h Refactor the InstructionPass (#2924) 2019-09-27 00:06:36 -04:00