From 0d0b054ac40661a86e5051cba5ed6ebd5059991a Mon Sep 17 00:00:00 2001 From: Ludovico de Nittis <ludovico.denittis@collabora.com> Date: Fri, 22 Jan 2021 17:05:43 +0100 Subject: [PATCH] check-vulkan: Try to draw with all the available devices Signed-off-by: Ludovico de Nittis <ludovico.denittis@collabora.com> --- helpers/check-vulkan.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/helpers/check-vulkan.c b/helpers/check-vulkan.c index da4145408..1fd68ae41 100644 --- a/helpers/check-vulkan.c +++ b/helpers/check-vulkan.c @@ -1372,11 +1372,20 @@ int main (int argc, for (i = 0; i < physical_device_count; i++) print_physical_device_info (physical_devices[i], stderr); - result = draw_test_triangle (vk_instance, physical_devices[0], error); - print_draw_test_result (0, result, local_error, stderr); + for (i = 0; i < physical_device_count; i++) + { + result = draw_test_triangle (vk_instance, physical_devices[i], error); + print_draw_test_result (i, result, local_error, stderr); + + if (local_error != NULL) + g_printerr ("%s", local_error->message); - if (result) - ret = EXIT_SUCCESS; + g_clear_error (error); + + /* Return exit success if we are able to draw with at least one device */ + if (result) + ret = EXIT_SUCCESS; + } out: if (local_error != NULL) -- GitLab