Skip to content
Permalink
Browse files

tests: set target API version correctly for some tests

Both tests had been configured for Vulkan 1.0 version but
used some non-KHR functions that were not in core until 1.1,
so the respective pointer was NULL and used stubs instead,
which means than some objects were not properly initialized.

As these are tests for the validation layers themselves, the
patch sets the target version to Vulkan 1.1 to fix this.

Fixes segfaults on the following tests on Intel's ANV driver:

VkPositiveLayerTest.MultiplaneImageTests
VkLayerTest.MultiplaneImageSamplerConversionMismatch
  • Loading branch information...
samuelig authored and daveh-lunarg committed Mar 5, 2019
1 parent ac25f1e commit b8faf5651a86d6566480279c036b98d785dc7587
Showing with 2 additions and 0 deletions.
  1. +2 −0 tests/layer_validation_tests.cpp
if (mp_extensions) {
m_instance_extension_names.push_back(VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME);
}
SetTargetApiVersion(VK_API_VERSION_1_1);
ASSERT_NO_FATAL_FAILURE(InitFramework(myDbgFunc, m_errorMonitor));
mp_extensions = mp_extensions && DeviceExtensionSupported(gpu(), nullptr, VK_KHR_MAINTENANCE1_EXTENSION_NAME);
mp_extensions = mp_extensions && DeviceExtensionSupported(gpu(), nullptr, VK_KHR_GET_MEMORY_REQUIREMENTS_2_EXTENSION_NAME);
if (mp_extensions) {
m_instance_extension_names.push_back(VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME);
}
SetTargetApiVersion(VK_API_VERSION_1_1);
ASSERT_NO_FATAL_FAILURE(InitFramework(myDbgFunc, m_errorMonitor));
mp_extensions = mp_extensions && DeviceExtensionSupported(gpu(), nullptr, VK_KHR_MAINTENANCE1_EXTENSION_NAME);
mp_extensions = mp_extensions && DeviceExtensionSupported(gpu(), nullptr, VK_KHR_GET_MEMORY_REQUIREMENTS_2_EXTENSION_NAME);

0 comments on commit b8faf56

Please sign in to comment.
You can’t perform that action at this time.