Add tests for sparseImageFloat32Atomics
authorRicardo Garcia <rgarcia@igalia.com>
Fri, 5 Feb 2021 14:56:21 +0000 (15:56 +0100)
committerAlexander Galazin <Alexander.Galazin@arm.com>
Thu, 25 Feb 2021 19:14:21 +0000 (19:14 +0000)
commitbafdfc42c69646ec18bd9f5d4702c5b36bd8bd62
tree1a6674d45eaddb220159b235c013530ae0f0448b
parent61ae90c222a135f7a32010d1a9d7d85c229da66b
Add tests for sparseImageFloat32Atomics

This commit adds image atomic operation tests using sparse images in
order to check the sparseImageFloat32Atomics feature.

In addition, it addresses several issues with the image atomic operation
tests, related to the tests behaving differently depending on which
features the implementation supported:

* If supported, transfer operations were performed on storage images,
  with a code path containing a fallback using shaders.

* 64-bit formats always used shaders instead of transfer operations.

* When reading values back from images using shaders, if the
  implementation supported shaderResourceResidency, values were read
  back using sparseImageLoadARB instead of normal reads.

These behaviors are now encoded in the test parameters and combined,
producing a higher number of variants without losing test coverage.

Also in addition, this commit adds the de::dataOrNull function to obtain
a vector's data pointer or a null pointer when the vector is empty.
Similar functions and checks are commonly performed in many tests, but
this commit does not attempt to replace existing uses.

Affected and new tests:
dEQP-VK.image.atomic_operations.*

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

Change-Id: I5c77eb42990ad57fdd43e6e4a7e74b7c149f8e14
13 files changed:
android/cts/master/src/vk-master-2019-03-01.txt
android/cts/master/vk-master-2019-03-01.txt
android/cts/master/vk-master-2020-03-01.txt
android/cts/master/vk-master.txt
external/vulkancts/framework/vulkan/vkCmdUtil.cpp
external/vulkancts/framework/vulkan/vkCmdUtil.hpp
external/vulkancts/framework/vulkan/vkImageUtil.cpp
external/vulkancts/framework/vulkan/vkImageUtil.hpp
external/vulkancts/modules/vulkan/image/vktImageAtomicOperationTests.cpp
external/vulkancts/modules/vulkan/image/vktImageTestsUtil.cpp
external/vulkancts/modules/vulkan/image/vktImageTestsUtil.hpp
external/vulkancts/mustpass/master/vk-default.txt
framework/delibs/decpp/deSTLUtil.hpp