Check queue availability in vulkan compute-only test

This commit is contained in:
baldurk
2022-06-24 12:22:13 +01:00
parent 67920a37b4
commit 4d9f53427e
2 changed files with 21 additions and 19 deletions
+6 -1
View File
@@ -58,12 +58,17 @@ void main()
)EOSHADER";
int main()
void Prepare(int argc, char **argv)
{
headless = true;
queueFlagsRequired = VK_QUEUE_COMPUTE_BIT;
queueFlagsBanned = VK_QUEUE_GRAPHICS_BIT;
VulkanGraphicsTest::Prepare(argc, argv);
}
int main()
{
// initialise, create window, create context, etc
if(!Init())
return 3;
+15 -18
View File
@@ -566,22 +566,6 @@ void VulkanGraphicsTest::Prepare(int argc, char **argv)
}
}
}
}
bool VulkanGraphicsTest::Init()
{
// parse parameters here to override parameters
if(!GraphicsTest::Init())
return false;
if(debugDevice)
{
CHECK_VKR(vkCreateDebugUtilsMessengerEXT(
instance, vkh::DebugUtilsMessengerCreateInfoEXT(
&vulkanCallback, NULL, VK_DEBUG_UTILS_MESSAGE_SEVERITY_WARNING_BIT_EXT |
VK_DEBUG_UTILS_MESSAGE_SEVERITY_ERROR_BIT_EXT),
NULL, &debugUtilsMessenger));
}
std::vector<VkQueueFamilyProperties> queueProps;
vkh::getQueueFamilyProperties(queueProps, phys);
@@ -620,9 +604,22 @@ bool VulkanGraphicsTest::Init()
}
if(queueFamilyIndex == ~0U)
{
TEST_ERROR("No satisfactory queue family available");
Avail = "No satisfactory queue family available";
}
bool VulkanGraphicsTest::Init()
{
// parse parameters here to override parameters
if(!GraphicsTest::Init())
return false;
if(debugDevice)
{
CHECK_VKR(vkCreateDebugUtilsMessengerEXT(
instance, vkh::DebugUtilsMessengerCreateInfoEXT(
&vulkanCallback, NULL, VK_DEBUG_UTILS_MESSAGE_SEVERITY_WARNING_BIT_EXT |
VK_DEBUG_UTILS_MESSAGE_SEVERITY_ERROR_BIT_EXT),
NULL, &debugUtilsMessenger));
}
std::vector<VkExtensionProperties> supportedExts;