nixpkgs/pkgs/by-name/in/intel-media-sdk/nixos-search-onevplrt-in-run-opengl-driver-lib.patch
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

46 lines
2.0 KiB
Diff

From aceb689ae69857def8a26a8d1ceb114ccfbb2569 Mon Sep 17 00:00:00 2001
From: Philipp Jungkamp <p.jungkamp@gmx.net>
Date: Tue, 28 May 2024 19:22:29 +0200
Subject: [PATCH] NixOS: Search ONEVPLRT in /run/opengl-driver/lib
---
api/mfx_dispatch/linux/mfxloader.cpp | 2 ++
.../suites/mfx_dispatch/linux/mfx_dispatch_test_cases_libs.cpp | 1 +
2 files changed, 3 insertions(+)
diff --git a/api/mfx_dispatch/linux/mfxloader.cpp b/api/mfx_dispatch/linux/mfxloader.cpp
index 39b6bff1..f76ed65d 100644
--- a/api/mfx_dispatch/linux/mfxloader.cpp
+++ b/api/mfx_dispatch/linux/mfxloader.cpp
@@ -193,6 +193,7 @@ mfxStatus LoaderCtx::Init(mfxInitParam& par)
if (selected_runtime && strcmp(selected_runtime, "ONEVPL") == 0) {
libs.emplace_back(ONEVPLRT);
libs.emplace_back(MFX_MODULES_DIR "/" ONEVPLRT);
+ libs.emplace_back("/run/opengl-driver/lib/" ONEVPLRT);
} else if ((selected_runtime && strcmp(selected_runtime, "MSDK") == 0) || (platform != MFX_HW_UNKNOWN)) {
if (MFX_IMPL_BASETYPE(par.Implementation) == MFX_IMPL_AUTO ||
MFX_IMPL_BASETYPE(par.Implementation) == MFX_IMPL_AUTO_ANY) {
@@ -213,6 +214,7 @@ mfxStatus LoaderCtx::Init(mfxInitParam& par)
} else {
libs.emplace_back(ONEVPLRT);
libs.emplace_back(MFX_MODULES_DIR "/" ONEVPLRT);
+ libs.emplace_back("/run/opengl-driver/lib/" ONEVPLRT);
}
mfxStatus mfx_res = MFX_ERR_UNSUPPORTED;
diff --git a/tests/unit/suites/mfx_dispatch/linux/mfx_dispatch_test_cases_libs.cpp b/tests/unit/suites/mfx_dispatch/linux/mfx_dispatch_test_cases_libs.cpp
index dedee0b3..9657da4b 100644
--- a/tests/unit/suites/mfx_dispatch/linux/mfx_dispatch_test_cases_libs.cpp
+++ b/tests/unit/suites/mfx_dispatch/linux/mfx_dispatch_test_cases_libs.cpp
@@ -123,6 +123,7 @@ TEST_P(DispatcherLibsTestParametrized, ShouldEnumerateCorrectLibNames)
{
libs.emplace_back(ONEVPLRT);
libs.emplace_back(modules_dir + "/" + ONEVPLRT);
+ libs.emplace_back("/run/opengl-driver/lib/" + ONEVPLRT);
}
for (const std::string& lib : libs)
--
2.44.0