Add format check to SharedPresentableImageTest
authorMikolaj Chadzynski <m.chadzynski@partner.samsung.com>
Thu, 23 Dec 2021 08:38:54 +0000 (09:38 +0100)
committerMatthew Netsch <quic_mnetsch@quicinc.com>
Fri, 14 Jan 2022 05:19:16 +0000 (05:19 +0000)
commitc858709abe047df3b3c1fcf2a3fe96bad2b4599d
tree42b825441977d102d3eb8ee60dfb5cefb1bb66b4
parent2429b3450e11a2c8b897bb7705f808e66a606e84
Add format check to SharedPresentableImageTest

The SharedPresentableImageTest does not follow Vulkan spec.
The SurfaceFormats got by getPhysicalDeviceSurfaceFormats ->
getPhysicalDeviceSurfaceFormatsKHR should be checked by
vkGetPhysicalDeviceImageFormatProperties. This is according to:
www.khronos.org/registry/vulkan/specs/1.2-extensions/html/chap33.html
"33.5. Surface Queries
In addition to the surface capabilities as obtained by surface queries
below, swapchain images are also subject to ordinary image creation
limits as reported by vkGetPhysicalDeviceImageFormatProperties. As an
application is instructed by the appropriate Valid Usage sections, both
the surface capabilities and the image creation limits have to be
satisfied whenever swapchain images are created."

Unsupported format can lead to non-deterministic behavior e.g.
a segmentation fault, a null pointer dereference in a test or a driver.

VK-GL-CTS issue: 3422

Affects:
dEQP-VK.wsi.android.shared_presentable_image.*

Components: Vulkan

Change-Id: Id4bb4d1c81e090ed1d7f34a76f3cfafc464d8cf8
external/vulkancts/modules/vulkan/wsi/vktWsiSharedPresentableImageTests.cpp