mirror of
https://github.com/KhronosGroup/SPIRV-Tools
synced 2024-12-26 01:31:06 +00:00
1cecf91701
* Support Narrow Types in BitCast Folding Rule This change adds support for narrow types in the BitCastScalarOrVector folding rule. According to Section 2.2.1 of the SPIR-V spec, types that are narrower than 32 bits are automatically either sign extended, or zero extended depending on the type. With that guaranteed, we should be able to use the first 32-bit word of any narrow type for the folding logic without performing any special conversions. In order to reduce code duplication, this change moves the GetU32BitValue and GetU64BitValue functions from IntConstant to ScalarConstant. Without this move, we would have needed an identical version of GetU32BitValue on FloatConstant. * Add Tests for 16-bit BitCast Folding This change adds several new test cases to the IntegerInstructionFoldingTest which trigger the 16-bit BitCast logic. The logic for half types was also added to the integer case since we can't easily validate half float types in C++ code. It's easier to validate them as unsigned integers instead. Pllus this also allows us to verify the SPIR-V constant sign extension logic too. * Add 8-Bit Folding Test Cases This change adds a couple more test cases to the integer instruction folding test suite in order to ensure that the BitCast logic also works correctly with the Int8 shader capability. |
||
---|---|---|
.. | ||
diff | ||
fuzz | ||
fuzzers | ||
link | ||
lint | ||
opt | ||
reduce | ||
scripts | ||
tools | ||
util | ||
val | ||
wasm | ||
assembly_context_test.cpp | ||
assembly_format_test.cpp | ||
binary_destroy_test.cpp | ||
binary_endianness_test.cpp | ||
binary_header_get_test.cpp | ||
binary_parse_test.cpp | ||
binary_strnlen_s_test.cpp | ||
binary_to_text_test.cpp | ||
binary_to_text.literal_test.cpp | ||
c_interface_test.cpp | ||
CMakeLists.txt | ||
comment_test.cpp | ||
cpp_interface_test.cpp | ||
diagnostic_test.cpp | ||
enum_set_test.cpp | ||
enum_string_mapping_test.cpp | ||
ext_inst.cldebug100_test.cpp | ||
ext_inst.debuginfo_test.cpp | ||
ext_inst.glsl_test.cpp | ||
ext_inst.non_semantic_test.cpp | ||
ext_inst.opencl_test.cpp | ||
fix_word_test.cpp | ||
generator_magic_number_test.cpp | ||
hex_float_test.cpp | ||
immediate_int_test.cpp | ||
libspirv_macros_test.cpp | ||
log_test.cpp | ||
name_mapper_test.cpp | ||
named_id_test.cpp | ||
opcode_make_test.cpp | ||
opcode_require_capabilities_test.cpp | ||
opcode_split_test.cpp | ||
opcode_table_get_test.cpp | ||
operand_capabilities_test.cpp | ||
operand_pattern_test.cpp | ||
operand_test.cpp | ||
operand-class-test-coverage.csv | ||
parse_number_test.cpp | ||
pch_test.cpp | ||
pch_test.h | ||
preserve_numeric_ids_test.cpp | ||
software_version_test.cpp | ||
string_utils_test.cpp | ||
target_env_test.cpp | ||
test_fixture.h | ||
text_advance_test.cpp | ||
text_destroy_test.cpp | ||
text_literal_test.cpp | ||
text_start_new_inst_test.cpp | ||
text_to_binary_test.cpp | ||
text_to_binary.annotation_test.cpp | ||
text_to_binary.barrier_test.cpp | ||
text_to_binary.composite_test.cpp | ||
text_to_binary.constant_test.cpp | ||
text_to_binary.control_flow_test.cpp | ||
text_to_binary.debug_test.cpp | ||
text_to_binary.device_side_enqueue_test.cpp | ||
text_to_binary.extension_test.cpp | ||
text_to_binary.function_test.cpp | ||
text_to_binary.group_test.cpp | ||
text_to_binary.image_test.cpp | ||
text_to_binary.literal_test.cpp | ||
text_to_binary.memory_test.cpp | ||
text_to_binary.misc_test.cpp | ||
text_to_binary.mode_setting_test.cpp | ||
text_to_binary.pipe_storage_test.cpp | ||
text_to_binary.reserved_sampling_test.cpp | ||
text_to_binary.subgroup_dispatch_test.cpp | ||
text_to_binary.type_declaration_test.cpp | ||
text_word_get_test.cpp | ||
timer_test.cpp | ||
unit_spirv.cpp | ||
unit_spirv.h |