NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.6k stars 13.76k forks source link

ladybird: add GPU support #322203

Closed nonetrix closed 2 months ago

nonetrix commented 3 months ago

Describe the bug

The Ladybird package assumes it doesn't need GPU so if you run with --enable-gpu-painting it will return Configured to use GPU painter, but current platform does not have accelerated graphics I have had similar issues to this with other packages so I think that it is likely to be a issue with said Nix package

Steps To Reproduce

Steps to reproduce the behavior:

  1. Run Ladybird with Ladybird --enable-gpu-painting
  2. Observe

Expected behavior

It runs with GPU support and doesn't make errors

Screenshots

image

Additional context

I have AMD RX 6800 GPU and this seems like a experimental feature, also I am pretty sure QT can use the GPU as well so I think this might enable that? Benefit of that likely to be small at best but still

Notify maintainers

@fgaz

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
this path will be fetched (0.01 MiB download, 0.05 MiB unpacked):
  /nix/store/d3dzfy4amjl826fb8j00qp1d9887h7hm-stdenv-linux
copying path '/nix/store/d3dzfy4amjl826fb8j00qp1d9887h7hm-stdenv-linux' from 'https://cache.nixos.org'...
 - system: `"x86_64-linux"`
 - host os: `Linux 6.9.6, NixOS, 24.11 (Vicuna), 24.11.20240622.a71e967`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.2`
 - channels(root): `"home-manager, nixos"`
 - nixpkgs: `/nix/store/yqy82fn77fy3rv7lpwa9m11w3a2nnqg5-source`

Add a :+1: reaction to issues you find important.

nonetrix commented 3 months ago

I assume Sika needs to be included? Just a guess

fgaz commented 3 months ago

Currently we disable hardware acceleration at compile time:

https://github.com/NixOS/nixpkgs/blob/97c5d4cffffb0cb92f14ac514fe5ed31ae5585f0/pkgs/applications/networking/browsers/ladybird/default.nix#L137-L138

I'll try to enable it again and see if it works, after I do these higher priority tasks:

nonetrix commented 3 months ago

Ah sorry didn't catch that

ADKaster commented 2 months ago

Note that the ENABLE_ACCELERATED_GRAPHICS flag (which uses OpenGL) is planned to be deprecated for using Skia to access the GPU. Ideally with a Vulkan dep on Linux and Metal dep on macOS.

ADKaster commented 2 months ago

Ah. By 'soon', I actually mean 'already' https://github.com/LadybirdBrowser/ladybird/pull/428

nonetrix commented 2 months ago

That's what I assumed that flag did sorry

fgaz commented 2 months ago

Thank you for informing us @ADKaster. Then I'll consider this closed when I finish #325045