Vulkan: print instance version if no vulkan drivers found

This commit is contained in:
Carter Li
2024-01-15 10:32:03 +08:00
committed by 李通洲
parent 5a34b8d01f
commit 01de158bba
3 changed files with 14 additions and 17 deletions
+9 -7
View File
@@ -17,16 +17,17 @@ void ffPrintVulkan(FFVulkanOptions* options)
return;
}
if (vulkan->apiVersion.length == 0 && vulkan->driver.length == 0)
{
ffPrintError(FF_VULKAN_MODULE_NAME, 0, &options->moduleArgs, "No Vulkan drivers found");
return;
}
if(options->moduleArgs.outputFormat.length == 0)
{
ffPrintLogoAndKey(FF_VULKAN_MODULE_NAME, 0, &options->moduleArgs, FF_PRINT_TYPE_DEFAULT);
if (vulkan->apiVersion.length == 0 && vulkan->driver.length == 0)
{
ffStrbufWriteTo(&vulkan->instanceVersion, stdout);
puts(" [Software only]");
return;
}
if(vulkan->apiVersion.length > 0)
{
ffStrbufWriteTo(&vulkan->apiVersion, stdout);
@@ -145,7 +146,8 @@ void ffPrintVulkanHelpFormat(void)
ffPrintModuleFormatHelp(FF_VULKAN_MODULE_NAME, "{2} - {1}", FF_VULKAN_NUM_FORMAT_ARGS, (const char* []) {
"Driver name",
"API version",
"Conformance version"
"Conformance version",
"Instance version",
});
}