SPIRV-Tools/test/opt
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
..
dominator_tree Enable precompiled headers for spirv-tools(-shared) and some unit tests (#2026) 2018-11-06 09:26:23 -05:00
loop_optimizations In LICM don't place code between merge instruction and branch. (#2252) 2018-12-20 18:33:52 -05:00
aggressive_dead_code_elim_test.cpp Handle variable pointer in some optimizations (#2490) 2019-04-03 12:47:51 -04:00
assembly_builder_test.cpp Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
assembly_builder.h Rewrite include guards (#1793) 2018-08-03 08:05:33 -04:00
block_merge_test.cpp Validate that OpUnreacahble is not statically reachable (#2473) 2019-03-29 10:49:37 -04:00
ccp_test.cpp Removing decorations when doing constant propagation. (#2444) 2019-03-13 10:40:49 -04:00
cfg_cleanup_test.cpp Add validation for execution modes 2018-10-02 10:22:23 -04:00
cfg_test.cpp Change implementation of post order CFG traversal (#2543) 2019-04-29 17:09:20 -04:00
CMakeLists.txt Change implementation of post order CFG traversal (#2543) 2019-04-29 17:09:20 -04:00
code_sink_test.cpp Handle instructions not in blocks in code sinking. (#2308) 2019-01-21 12:09:56 -05:00
combine_access_chains_test.cpp Make EFFCEE required (#1943) 2018-10-04 10:00:11 -04:00
common_uniform_elim_test.cpp Handle variable pointer in some optimizations (#2490) 2019-04-03 12:47:51 -04:00
compact_ids_test.cpp Validate the input to Optimizer::Run (#1799) 2018-08-08 11:16:19 -04:00
constant_manager_test.cpp Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
copy_prop_array_test.cpp Add a nullptr check to array copy propagation. (#1987) 2018-10-19 12:53:40 -04:00
dead_branch_elim_test.cpp Change prioritization of unreachable merge and continue (#2460) 2019-04-03 12:50:08 -04:00
dead_insert_elim_test.cpp Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
dead_variable_elim_test.cpp Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
decompose_initialized_variables_test.cpp Add support for Private & Output to initializer decompose flag (#2537) 2019-04-25 16:24:32 -04:00
decoration_manager_test.cpp Support SPIR-V 1.4 (#2550) 2019-05-07 12:27:18 -04:00
def_use_test.cpp Remove use of deprecated googletest macro (#2286) 2019-01-29 18:56:52 -05:00
eliminate_dead_const_test.cpp Remove use of deprecated googletest macro (#2286) 2019-01-29 18:56:52 -05:00
eliminate_dead_functions_test.cpp Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
eliminate_dead_member_test.cpp Don't change type of input and output var in dead member elim (#2412) 2019-02-20 18:59:41 -05:00
feature_manager_test.cpp Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
fix_storage_class_test.cpp Fix up type mismatches. (#2545) 2019-05-02 09:31:46 -04:00
flatten_decoration_test.cpp Remove use of deprecated googletest macro (#2286) 2019-01-29 18:56:52 -05:00
fold_spec_const_op_composite_test.cpp Remove use of deprecated googletest macro (#2286) 2019-01-29 18:56:52 -05:00
fold_test.cpp Remove duplicates from list of interface IDs in OpEntryPoint instruction (#2449) 2019-03-13 15:46:31 -04:00
freeze_spec_const_test.cpp Remove use of deprecated googletest macro (#2286) 2019-01-29 18:56:52 -05:00
function_test.cpp Don't inline recursive functions. (#2130) 2018-11-29 14:24:58 -05:00
function_utils.h Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
generate_webgpu_initializers_test.cpp Implement WebGPU->Vulkan initializer conversion for 'Function' variables (#2513) 2019-04-16 14:31:36 -04:00
if_conversion_test.cpp Fix restrictions in if conversion (#1998) 2018-10-19 15:16:46 -04:00
inline_opaque_test.cpp Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
inline_test.cpp Validate that OpUnreacahble is not statically reachable (#2473) 2019-03-29 10:49:37 -04:00
insert_extract_elim_test.cpp Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
inst_bindless_check_test.cpp Bindless Validation: Descriptor Initialization Check (#2419) 2019-03-19 09:53:43 -04:00
instruction_list_test.cpp Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
instruction_test.cpp Instruction::GetBaseAddress to handle OpPtrAccessChain (#2050) 2018-11-14 12:42:25 -05:00
ir_builder.cpp Recognize OpTypeAccelerationStructureNV as a type instruction (#2190) 2018-12-11 19:03:55 -05:00
ir_context_test.cpp Document in the context what happens with id overflow. (#2159) 2018-12-06 09:07:00 -05:00
ir_loader_test.cpp Remove source/message.h (#1838) 2018-08-14 15:41:21 -04:00
iterator_test.cpp Move make_unique to source/util. (#1836) 2018-08-14 12:44:54 -04:00
legalize_vector_shuffle_test.cpp Implement WebGPU->Vulkan initializer conversion for 'Function' variables (#2513) 2019-04-16 14:31:36 -04:00
line_debug_info_test.cpp Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
local_access_chain_convert_test.cpp Handle variable pointer in some optimizations (#2490) 2019-04-03 12:47:51 -04:00
local_redundancy_elimination_test.cpp Make EFFCEE required (#1943) 2018-10-04 10:00:11 -04:00
local_single_block_elim.cpp Handle variable pointer in some optimizations (#2490) 2019-04-03 12:47:51 -04:00
local_single_store_elim_test.cpp Handle variable pointer in some optimizations (#2490) 2019-04-03 12:47:51 -04:00
local_ssa_elim_test.cpp Handle variable pointer in some optimizations (#2490) 2019-04-03 12:47:51 -04:00
module_test.cpp Add option for the max id bound. (#1870) 2018-09-10 11:49:41 -04:00
module_utils.h Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
optimizer_test.cpp Implement WebGPU->Vulkan initializer conversion for 'Function' variables (#2513) 2019-04-16 14:31:36 -04:00
pass_fixture.h Upgrade modf and frexp (#2266) 2019-01-07 12:36:38 -05:00
pass_manager_test.cpp Fix memory leak in unrolling. (#2301) 2019-01-17 16:02:43 -05:00
pass_merge_return_test.cpp Fix merge return in the face of breaks (#2466) 2019-04-02 10:05:28 -04:00
pass_remove_duplicates_test.cpp Fixup readabilty/inheritance warnings (#1805) 2018-08-07 09:10:03 -04:00
pass_utils.cpp Check for unreachable blocks in merge-return. (#1966) 2018-10-10 15:18:15 -04:00
pass_utils.h Fix gtest.h include in test/opt/pass_utils.h 2018-10-12 10:22:25 -04:00
pch_test_opt.cpp Rename PCH macro to spvtools_pch to avoid conflicts with other projects. Also add pch to test/opt. (#2034) 2018-11-07 09:15:04 -05:00
pch_test_opt.h Rename PCH macro to spvtools_pch to avoid conflicts with other projects. Also add pch to test/opt. (#2034) 2018-11-07 09:15:04 -05:00
private_to_local_test.cpp Make EFFCEE required (#1943) 2018-10-04 10:00:11 -04:00
process_lines_test.cpp Add passes to propagate and eliminate redundant line instructions (#2027). (#2039) 2018-11-15 14:06:17 -05:00
propagator_test.cpp Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
reduce_load_size_test.cpp Have replace load size handle extact with no index. (#2261) 2019-01-03 13:02:10 -05:00
redundancy_elimination_test.cpp Make EFFCEE required (#1943) 2018-10-04 10:00:11 -04:00
register_liveness.cpp Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
replace_invalid_opc_test.cpp Check for unreachable blocks in merge-return. (#1966) 2018-10-10 15:18:15 -04:00
scalar_analysis.cpp Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
scalar_replacement_test.cpp Handle access chain with no index in SROA. (#2304) 2019-01-18 14:19:43 -05:00
set_spec_const_default_value_test.cpp Remove use of deprecated googletest macro (#2286) 2019-01-29 18:56:52 -05:00
simplification_test.cpp Make EFFCEE required (#1943) 2018-10-04 10:00:11 -04:00
strength_reduction_test.cpp Make EFFCEE required (#1943) 2018-10-04 10:00:11 -04:00
strip_atomic_counter_memory_test.cpp Implement WebGPU->Vulkan initializer conversion for 'Function' variables (#2513) 2019-04-16 14:31:36 -04:00
strip_debug_info_test.cpp Remove use of deprecated googletest macro (#2286) 2019-01-29 18:56:52 -05:00
strip_reflect_info_test.cpp Remove MemberDecorateStringGOOGLE during stript-refect. (#2021) 2018-10-30 16:17:35 -04:00
struct_cfg_analysis_test.cpp Handle function decls in Structured CFG analysis (#2474) 2019-03-26 14:39:16 -04:00
type_manager_test.cpp Added additional changes for the new AccelerationStructureNV type. (#2218) 2018-12-19 21:42:39 +00:00
types_test.cpp Recognize OpTypeAccelerationStructureNV as a type instruction (#2190) 2018-12-11 19:03:55 -05:00
unify_const_test.cpp Remove use of deprecated googletest macro (#2286) 2019-01-29 18:56:52 -05:00
upgrade_memory_model_test.cpp Upgrade modf and frexp (#2266) 2019-01-07 12:36:38 -05:00
utils_test.cpp Remove use of deprecated googletest macro (#2286) 2019-01-29 18:56:52 -05:00
value_table_test.cpp Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
vector_dce_test.cpp Handle extract with no index in VDCE. (#2305) 2019-01-18 15:43:36 -05:00
workaround1209_test.cpp Make EFFCEE required (#1943) 2018-10-04 10:00:11 -04:00