diff --git a/rutabaga_gfx/kumquat/gpu_client/src/virtgpu/virtgpu_kumquat.rs b/rutabaga_gfx/kumquat/gpu_client/src/virtgpu/virtgpu_kumquat.rs index b62456d2a..c67a56dfd 100644 --- a/rutabaga_gfx/kumquat/gpu_client/src/virtgpu/virtgpu_kumquat.rs +++ b/rutabaga_gfx/kumquat/gpu_client/src/virtgpu/virtgpu_kumquat.rs @@ -21,7 +21,6 @@ use rutabaga_gfx::kumquat_support::RutabagaTube; use rutabaga_gfx::kumquat_support::RutabagaTubeType; use rutabaga_gfx::kumquat_support::RutabagaWriter; use rutabaga_gfx::RutabagaDescriptor; -use rutabaga_gfx::RutabagaError; use rutabaga_gfx::RutabagaErrorKind; use rutabaga_gfx::RutabagaGralloc; use rutabaga_gfx::RutabagaGrallocBackendFlags; @@ -41,8 +40,6 @@ use rutabaga_gfx::RUTABAGA_MAP_CACHE_CACHED; use crate::virtgpu::defines::*; -const VK_ICD_FILENAMES: &str = "VK_ICD_FILENAMES"; - // The Tesla V-100 driver seems to enter a power management mode and stops being available to the // Vulkan loader if more than a certain number of VK instances are created in the same process. // @@ -54,28 +51,7 @@ const VK_ICD_FILENAMES: &str = "VK_ICD_FILENAMES"; fn gralloc() -> &'static Mutex { static GRALLOC: OnceLock> = OnceLock::new(); GRALLOC.get_or_init(|| { - // The idea is to make sure the gfxstream ICD isn't loaded when gralloc starts - // up. The Nvidia ICD should be loaded. - // - // This is mostly useful for developers. For AOSP hermetic gfxstream end2end - // testing, VK_ICD_FILENAMES shouldn't be defined. For deqp-vk, this is - // useful, but not safe for multi-threaded tests. For now, since this is only - // used for end2end tests, we should be good. - let vk_icd_name_opt = match std::env::var(VK_ICD_FILENAMES) { - Ok(vk_icd_name) => { - std::env::remove_var(VK_ICD_FILENAMES); - Some(vk_icd_name) - } - Err(_) => None, - }; - - let gralloc = Mutex::new(RutabagaGralloc::new(RutabagaGrallocBackendFlags::new()).unwrap()); - - if let Some(vk_icd_name) = vk_icd_name_opt { - std::env::set_var(VK_ICD_FILENAMES, vk_icd_name); - } - - gralloc + Mutex::new(RutabagaGralloc::new(RutabagaGrallocBackendFlags::new()).unwrap()) }) }