-
-
Notifications
You must be signed in to change notification settings - Fork 15.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
virglrenderer: enable venus and DRM native context support #382283
Conversation
Only Venus has been (superficially, but successfully) tested. Native context is untested because I didn't want to hunt down appropriately patched QEMU and Mesa versions. |
I do happen to have such a setup lying around (https://codeberg.org/kuruczgy/aarch64-gaming/commit/8e50a5d7fd17dc9ae083f5b59cd5f02a882a969e1d86e6f92dd81891cb23c487), so I tested it, drm native context seems to work well with this PR 👍 (system: aarch64, Snapdragon X Elite) |
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Testing VM:
{ nixpkgs
, testingDM ? "gdm" # "sddm" | "gdm"
, testingDE ? "gnome" # "plasma6" | "gnome"
, testingSession ? "gnome" # "gnome" | "plasma"
, testingWithAutoLogin ? true
}:
import "${nixpkgs}/nixos/tests/make-test-python.nix" ({ pkgs, lib, ... }: {
name = "venus-test";
nodes.machine = { pkgs, ... }: {
imports = [
"${nixpkgs}/nixos/tests/common/user-account.nix"
];
virtualisation.qemu.options = [
"-m 16G"
"-vga none"
"-device virtio-vga-gl,hostmem=8G,blob=true,venus=true"
"-object memory-backend-memfd,id=mem1,size=16G"
"-machine memory-backend=mem1"
"-display gtk,gl=on"
];
# Apply nixpkgs#382283
virtualisation.qemu.package = lib.mkForce (pkgs.qemu.override {
virglrenderer = pkgs.virglrenderer.overrideAttrs (prevAttrs: {
buildInputs = prevAttrs.buildInputs ++ [ pkgs.vulkan-headers pkgs.vulkan-loader ];
mesonFlags = prevAttrs.mesonFlags ++ [ (lib.mesonBool "venus" true) (lib.mesonOption "drm-renderers" "amdgpu-experimental,msm") ];
});
});
environment.systemPackages = with pkgs; [
vulkan-tools
mesa-demos
alacritty
];
services.xserver = {
enable = true;
displayManager = {
"${testingDM}".enable = true;
autoLogin = {
enable = testingWithAutoLogin;
user = "alice";
};
defaultSession = testingSession;
};
desktopManager.${testingDE}.enable = true;
};
};
# TODO: TODO
testScript =
''
start_all()
'';
})
Venus is currently required for Vulkan support in Virtio-GPU. DRM native context will allow using the native Mesa drivers in the guest, improving support and performance; support in QEMU (on the host) and Mesa (on the guest) is required and not in upstream releases yet. Fixes: NixOS#379454
0becbf9
to
d082fd7
Compare
Venus is currently required for Vulkan support in Virtio-GPU. DRM native context will allow using the native Mesa drivers in the guest, improving support and performance; support in QEMU (on the host) and Mesa (on the guest) is required and not in upstream releases yet.
Fixes: #379454
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.