From 5acb99d2c5679973ed658d994073895ce9640f29 Mon Sep 17 00:00:00 2001
From: Ludovico de Nittis <ludovico.denittis@collabora.com>
Date: Tue, 28 Apr 2020 17:18:38 +0200
Subject: [PATCH] Add missing "x11/vaapi" to the s-r-s-i report

Signed-off-by: Ludovico de Nittis <ludovico.denittis@collabora.com>
---
 steam-runtime-tools/system-info.c |  7 +++++++
 tests/system-info-cli.c           | 10 ++++++++++
 2 files changed, 17 insertions(+)

diff --git a/steam-runtime-tools/system-info.c b/steam-runtime-tools/system-info.c
index 749d6899c..6325dcfd8 100644
--- a/steam-runtime-tools/system-info.c
+++ b/steam-runtime-tools/system-info.c
@@ -1576,6 +1576,13 @@ GList * srt_system_info_check_all_graphics (SrtSystemInfo *self,
                                     SRT_RENDERING_INTERFACE_VDPAU,
                                     NULL);
 
+  abi->cached_combined_issues |=
+    srt_system_info_check_graphics (self,
+                                    multiarch_tuple,
+                                    SRT_WINDOW_SYSTEM_X11,
+                                    SRT_RENDERING_INTERFACE_VAAPI,
+                                    NULL);
+
   abi->graphics_cache_available = TRUE;
 
   list = g_list_sort (g_hash_table_get_values (abi->cached_graphics_results),
diff --git a/tests/system-info-cli.c b/tests/system-info-cli.c
index 974474784..7b03d1c8b 100644
--- a/tests/system-info-cli.c
+++ b/tests/system-info-cli.c
@@ -95,6 +95,7 @@ libraries_presence (Fixture *f,
   JsonNode *node = NULL;
   JsonObject *json;
   JsonObject *json_arch;
+  JsonObject *json_graphics;
   GError *error = NULL;
   gchar *output = NULL;
   SrtSystemInfo *info = srt_system_info_new (NULL);
@@ -156,6 +157,15 @@ libraries_presence (Fixture *f,
       g_assert_true (json_object_has_member (json_arch, "va-api_drivers"));
       g_assert_true (json_object_has_member (json_arch, "vdpau_drivers"));
       g_assert_true (json_object_has_member (json_arch, "glx_drivers"));
+
+      g_assert_true (json_object_has_member (json_arch, "graphics-details"));
+      json_graphics = json_object_get_object_member (json_arch, "graphics-details");
+      g_assert_true (json_object_has_member (json_graphics, "x11/vulkan"));
+      g_assert_true (json_object_has_member (json_graphics, "x11/vdpau"));
+      g_assert_true (json_object_has_member (json_graphics, "x11/vaapi"));
+      g_assert_true (json_object_has_member (json_graphics, "glx/gl"));
+      g_assert_true (json_object_has_member (json_graphics, "egl_x11/gl"));
+      g_assert_true (json_object_has_member (json_graphics, "egl_x11/glesv2"));
     }
 
   g_object_unref (parser);
-- 
GitLab