Test shift ops in OpSpecConstantOp with more bit widths
authorRicardo Garcia <rgarcia@igalia.com>
Tue, 14 Jan 2020 16:38:18 +0000 (17:38 +0100)
committerAlexander Galazin <Alexander.Galazin@arm.com>
Fri, 14 Feb 2020 11:35:03 +0000 (06:35 -0500)
commit41758d553d211f33a5bacebd06826686c5bd68bd
tree88030c7967c0c07e56bf7990fb63cce59cbb1585
parent8ae6139ae84469d026cc4ba671992d3598b2abdb
Test shift ops in OpSpecConstantOp with more bit widths

This commit adds tests to check bit shifting operations work properly
when used with OpSpecConstantOp and different bit widths. New tests are
divided in two categories: either both the value being shifted and the
shift amount use the new bit width, or only the shift amount uses the
new bit width.

In addition, the OpSpecConstantOp test mini-framework for testing two
integers has been expanded and made more flexible in order to accomodate
the new tests and to avoid some hackish handmade conversions from
floating point to integers when passing floating point values.

Also, arithmetic bit shifting operations to the right have been modified
to use negative values in order to verify the sign bit is preserved
properly.

New tests:
dEQP-VK.spirv_assembly.instruction.*.opspecconstantop.*i64*
dEQP-VK.spirv_assembly.instruction.*.opspecconstantop.*i16*
dEQP-VK.spirv_assembly.instruction.*.opspecconstantop.*i8*

Affected tests:
dEQP-VK.spirv_assembly.instruction.*.opspecconstantop.*

Components: Framework, Vulkan
VK-GL-CTS issue: 2164

Change-Id: I3b71431ceb0022c661abdc645a2de09e9867e8ab
android/cts/master/vk-master.txt
external/vulkancts/modules/vulkan/spirv_assembly/vktSpvAsmComputeShaderCase.cpp
external/vulkancts/modules/vulkan/spirv_assembly/vktSpvAsmInstructionTests.cpp
external/vulkancts/mustpass/master/vk-default-no-waivers.txt
external/vulkancts/mustpass/master/vk-default.txt