Fix incorrect buffer type in some protected memory tests
authorChristopher Gautier <chrgau01@arm.com>
Wed, 19 Aug 2020 12:18:19 +0000 (14:18 +0200)
committerAlexander Galazin <Alexander.Galazin@arm.com>
Thu, 20 Aug 2020 18:30:23 +0000 (14:30 -0400)
commit8d42d5d9c0e48ea76fad2cb4e232334b4a849d0f
tree97baaadd0346ab322c6deaaad19211dad9b3093f
parentce82fe2a30cce820921fb834850dac80f1a27502
Fix incorrect buffer type in some protected memory tests

Certain Vulkan tests, such as
dEQP-VK.protected_memory.buffer.fill.<type>_buffer.*, create a BufferView with
a format that is always set to VK_FORMAT_R32G32B32A32_UINT, independently of
the actual test type (float_buffer, integer_buffer, unsigned_buffer). Reading
floats from an integer BufferView may return incorrect values on some
implementations.

This patch propagates a VkFormat parameter so that each test can create a
BufferView with the appropriate format.

Components: Vulkan

Affects:
 - dEQP-VK.protected_memory.buffer.copy.*
 - dEQP-VK.protected_memory.buffer.fill.*
 - dEQP-VK.protected_memory.buffer.update.*

VK-GL-CTS Issue: 2551

Change-Id: I1e79ae2761a028025148c3a63775a0d464278285
external/vulkancts/modules/vulkan/protected_memory/vktProtectedMemBufferValidator.hpp
external/vulkancts/modules/vulkan/protected_memory/vktProtectedMemCopyImageToBufferTests.cpp
external/vulkancts/modules/vulkan/protected_memory/vktProtectedMemFillUpdateCopyBufferTests.cpp
external/vulkancts/modules/vulkan/protected_memory/vktProtectedMemStorageBufferTests.cpp