From 40d7a402c3e87ef6fffab8d7a500b9e5cb6ffa06 Mon Sep 17 00:00:00 2001 From: Simon McVittie <smcv@collabora.com> Date: Tue, 20 Jul 2021 15:52:26 +0100 Subject: [PATCH] runtime: Share /usr/share/nvidia if we have at least one libGLX_nvidia If we have libGLX_nvidia.so.0 for *any* architecture - even if we are msising some instances - then we still want to share /usr/share/nvidia with the container. Because we always use libGLX_nvidia.so.0 from the graphics stack provider and do not have a concept of whether it is older or newer, and we do not expect our runtime to have a copy of libGLX_nvidia.so.0, we do not need to worry about giving the runtime's library an incompatible version of the data files from the provider. Signed-off-by: Simon McVittie <smcv@collabora.com> --- pressure-vessel/runtime.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/pressure-vessel/runtime.c b/pressure-vessel/runtime.c index b54fbd44d..38b2f805d 100644 --- a/pressure-vessel/runtime.c +++ b/pressure-vessel/runtime.c @@ -4771,7 +4771,6 @@ pv_runtime_use_provider_graphics_stack (PvRuntime *self, const GList *icd_iter; gboolean all_libglx_from_provider = TRUE; gboolean all_libdrm_from_provider = TRUE; - gboolean all_nvidia_from_provider = TRUE; g_autoptr(GHashTable) drirc_data_in_provider = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL); @@ -5127,12 +5126,6 @@ pv_runtime_use_provider_graphics_stack (PvRuntime *self, PV_RUNTIME_DATA_FLAGS_USR_SHARE_FIRST, nvidia_data_in_provider); } - else - { - /* For at least a single architecture, libGLX_nvidia is newer in the container */ - all_nvidia_from_provider = FALSE; - } - dirs = multiarch_details_get_libdirs (arch->details, MULTIARCH_LIBDIRS_FLAGS_NONE); @@ -5238,8 +5231,7 @@ pv_runtime_use_provider_graphics_stack (PvRuntime *self, return FALSE; if (!pv_runtime_finish_lib_data (self, bwrap, "nvidia", "libGLX_nvidia.so.0", - all_nvidia_from_provider, - nvidia_data_in_provider, error)) + TRUE, nvidia_data_in_provider, error)) return FALSE; g_debug ("Setting up EGL ICD JSON..."); -- GitLab