Please add support for the Imagination Video/GPU Cards. Many of the newer Riscv SBC's and other boards have these GPU's built in and it would be nice to be able to use them without having to make changes to Gentoo ebuilds.
Looks like since the last time you requested this (bug #904036) the kernel driver has landed upstream -- in v6.8. The configuration option in Mesa is still called `imagination-experimental`, but the kernel ABI must be stable.
Please enable it as you have already done it for Microsoft where theirs is called microsoft-experimental See Example vulkan_enable video_cards_d3d12 microsoft-experimental
Additionally I think llvm-orcjit should be enable on RISCV devices
Yeah, I'm just thinking out loud since I had to go look up the status of the drivers.
(In reply to Andrew Cameron from comment #3) > Additionally I think llvm-orcjit should be enable on RISCV devices https://gitlab.freedesktop.org/mesa/mesa/-/commit/56f38672a28b91f4be8cf2bb89a47df75a67a663 suggests that this already happens automatically for RISC-V. Is that not the case?
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9ebb9d277a637bd9f005bf41c90e2004c5786816 commit 9ebb9d277a637bd9f005bf41c90e2004c5786816 Author: Matt Turner <mattst88@gentoo.org> AuthorDate: 2025-05-05 16:12:09 +0000 Commit: Matt Turner <mattst88@gentoo.org> CommitDate: 2025-05-05 16:29:48 +0000 media-libs/mesa: Add VIDEO_CARDS=imagination Bug: https://bugs.gentoo.org/955269 Signed-off-by: Matt Turner <mattst88@gentoo.org> media-libs/mesa/mesa-9999.ebuild | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=97513b1a1141aa21c7ea4cab7fe44c128218c130 commit 97513b1a1141aa21c7ea4cab7fe44c128218c130 Author: Matt Turner <mattst88@gentoo.org> AuthorDate: 2025-05-05 16:23:44 +0000 Commit: Matt Turner <mattst88@gentoo.org> CommitDate: 2025-05-05 16:29:48 +0000 profiles/arch/riscv: Unmask video_cards_imagination Bug: https://bugs.gentoo.org/955269 Signed-off-by: Matt Turner <mattst88@gentoo.org> profiles/arch/riscv/use.mask | 3 +++ 1 file changed, 3 insertions(+) https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a961e47435d75c6695c3e248a9c737aab6ee4119 commit a961e47435d75c6695c3e248a9c737aab6ee4119 Author: Matt Turner <mattst88@gentoo.org> AuthorDate: 2025-05-05 16:16:56 +0000 Commit: Matt Turner <mattst88@gentoo.org> CommitDate: 2025-05-05 16:29:48 +0000 profiles: Add VIDEO_CARDS=imagination Bug: Bug: https://bugs.gentoo.org/955269 Signed-off-by: Matt Turner <mattst88@gentoo.org> profiles/arch/base/use.mask | 1 + profiles/desc/video_cards.desc | 1 + 2 files changed, 2 insertions(+)
I've added VIDEO_CARDS=imagination to mesa-9999, added it to profiles/, and unmasked it on riscv. Please confirm that this works for you.
The change is not visible yet https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=97513b1a1141aa21c7ea4cab7fe44c128218c130 And mesa-9999 is not updated yet when I checked. It may need to propagate still
I have it running now. I added the following to the ebuild as these settings are also needed if use video_cards_imagination; then emesonargs+=(-Dimagination-srv=true) emesonargs+=(-Dtools="imagination") fi Once this is added then its good to go and so far seems to be working on the vulkan side. [I] x11-apps/mesa-progs Available versions: (~)9.0.0 **9999*l {X gles2 vulkan wayland ABI_MIPS="n32 n64 o32" ABI_S390="32 64" ABI_X86="32 64 x32"} Installed versions: 9.0.0(13:51:24 05/04/25)(X vulkan wayland -gles2 ABI_MIPS="-n32 -n64 -o32" ABI_S390="-32 -64" ABI_X86="-32 -64 -x32") Homepage: https://www.mesa3d.org/ https://mesa.freedesktop.org/ https://gitlab.freedesktop.org/mesa/demos Description: Mesa's OpenGL utility and demo programs (glxgears and glxinfo)
(In reply to Andrew Cameron from comment #9) > I have it running now. > > I added the following to the ebuild as these settings are also needed > > if use video_cards_imagination; then > emesonargs+=(-Dimagination-srv=true) What does this do? Does Vulkan not work without it? What are the implications of enabling vs disabling it? (It's off by default) > emesonargs+=(-Dtools="imagination") This appears to build an executable called `rogue_vk_compiler`. Is this really something users are going to want? I'm not familiar with Imagination, so it would be helpful if you just lead with information that you think would be useful. Otherwise I'm just having to dig into the build system to understand what these options do, and even then not getting any sense for why we need these.
I've filed an issue upstream with my questions: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13105
(In reply to Matt Turner from comment #11) > I've filed an issue upstream with my questions: > https://gitlab.freedesktop.org/mesa/mesa/-/issues/13105 Lets see what they say. However the tools flag turns on this https://gitlab.freedesktop.org/mesa/mesa/-/blob/main/src/imagination/rogue/tools/vk_compiler.c?ref_type=heads Which is "The Rogue offline Vulkan shader compiler" And the imagination-srv Enables Services backend for Imagination Technologies All my custom ebuilds have always turned these settings on.
(In reply to Andrew Cameron from comment #12) > And the imagination-srv Enables Services backend for Imagination > Technologies You recognize that this description contains no actual information, right?
(In reply to Matt Turner from comment #13) > (In reply to Andrew Cameron from comment #12) > > And the imagination-srv Enables Services backend for Imagination > > Technologies > > You recognize that this description contains no actual information, right? It adds the support services driver which seems to have an api to communicate with the firmware Have a look at https://gitlab.freedesktop.org/mesa/mesa/-/blob/main/src/imagination/vulkan/meson.build?ref_type=heads It adds the following to the build if with_imagination_srv pvr_files += files( 'winsys/pvrsrvkm/pvr_srv.c', 'winsys/pvrsrvkm/pvr_srv_bo.c', 'winsys/pvrsrvkm/pvr_srv_bridge.c', 'winsys/pvrsrvkm/pvr_srv_job_common.c', 'winsys/pvrsrvkm/pvr_srv_job_compute.c', 'winsys/pvrsrvkm/pvr_srv_job_null.c', 'winsys/pvrsrvkm/pvr_srv_job_render.c', 'winsys/pvrsrvkm/pvr_srv_job_transfer.c', 'winsys/pvrsrvkm/pvr_srv_sync.c', 'winsys/pvrsrvkm/pvr_srv_sync_prim.c', ) pvr_flags += '-DPVR_SUPPORT_SERVICES_DRIVER' endif
From https://gitlab.freedesktop.org/mesa/mesa/-/issues/13105#note_2898778: >> Are you ready for distributions to begin shipping the Vulkan driver? > > No, not yet. We still have quite a big back log of changes in our public repo > (https://gitlab.freedesktop.org/imagination/mesa/-/tree/dev/bxs) that needs > upstreaming to make the driver fully functional and conformant. The Imagination developers don't want distributions to begin shipping the driver. I'll leave support in the -9999 ebuild, but I won't add VIDEO_CARDS=imagination to non-live ebuilds for now.
(In reply to Matt Turner from comment #15) > From https://gitlab.freedesktop.org/mesa/mesa/-/issues/13105#note_2898778: > > >> Are you ready for distributions to begin shipping the Vulkan driver? > > > > No, not yet. We still have quite a big back log of changes in our public repo > > (https://gitlab.freedesktop.org/imagination/mesa/-/tree/dev/bxs) that needs > > upstreaming to make the driver fully functional and conformant. > > The Imagination developers don't want distributions to begin shipping the > driver. I'll leave support in the -9999 ebuild, but I won't add > VIDEO_CARDS=imagination to non-live ebuilds for now. Thank you for following up on this.