Skip to content
Snippets Groups Projects
Commit 05a7d15d authored by Simon McVittie's avatar Simon McVittie
Browse files

graphics: Reduce duplication


The GLESv2 and GL cases for _argv_for_graphics_test() are essentially
the same, so take advantage of that.

Signed-off-by: default avatarSimon McVittie <smcv@collabora.com>
parent bd36701d
Branches
Tags
1 merge request!77Look for vulkaninfo, wflinfo in SRT_HELPERS_PATH
...@@ -487,8 +487,11 @@ _argv_for_graphics_test (const char *helpers_path, ...@@ -487,8 +487,11 @@ _argv_for_graphics_test (const char *helpers_path,
g_ptr_array_add (argv, g_strdup ("10")); g_ptr_array_add (argv, g_strdup ("10"));
} }
if (rendering_interface == SRT_RENDERING_INTERFACE_GL) if (rendering_interface == SRT_RENDERING_INTERFACE_GL
|| rendering_interface == SRT_RENDERING_INTERFACE_GLESV2)
{ {
const char *api;
if (helpers_path != NULL) if (helpers_path != NULL)
{ {
g_ptr_array_add (argv, g_strdup_printf ("%s/%s-wflinfo", helpers_path, multiarch_tuple)); g_ptr_array_add (argv, g_strdup_printf ("%s/%s-wflinfo", helpers_path, multiarch_tuple));
...@@ -497,22 +500,14 @@ _argv_for_graphics_test (const char *helpers_path, ...@@ -497,22 +500,14 @@ _argv_for_graphics_test (const char *helpers_path,
{ {
g_ptr_array_add (argv, g_strdup_printf ("%s-wflinfo", multiarch_tuple)); g_ptr_array_add (argv, g_strdup_printf ("%s-wflinfo", multiarch_tuple));
} }
g_ptr_array_add (argv, g_strdup_printf ("--platform=%s", platformstring));
g_ptr_array_add (argv, g_strdup ("--api=gl")); if (rendering_interface == SRT_RENDERING_INTERFACE_GLESV2)
g_ptr_array_add (argv, g_strdup ("--format=json")); api = "gles2";
}
else if (rendering_interface == SRT_RENDERING_INTERFACE_GLESV2)
{
if (helpers_path != NULL)
{
g_ptr_array_add (argv, g_strdup_printf ("%s/%s-wflinfo", helpers_path, multiarch_tuple));
}
else else
{ api = "gl";
g_ptr_array_add (argv, g_strdup_printf ("%s-wflinfo", multiarch_tuple));
}
g_ptr_array_add (argv, g_strdup_printf ("--platform=%s", platformstring)); g_ptr_array_add (argv, g_strdup_printf ("--platform=%s", platformstring));
g_ptr_array_add (argv, g_strdup ("--api=gles2")); g_ptr_array_add (argv, g_strdup_printf ("--api=%s", api));
g_ptr_array_add (argv, g_strdup ("--format=json")); g_ptr_array_add (argv, g_strdup ("--format=json"));
} }
else if (rendering_interface == SRT_RENDERING_INTERFACE_VULKAN) else if (rendering_interface == SRT_RENDERING_INTERFACE_VULKAN)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment