Skip to content

Commit

Permalink
profiles/graphic_drivers: Force use of RUSTICL_ENABLE variable
Browse files Browse the repository at this point in the history
Signed-off-by: Vasiliy Stelmachenok <ventureo@yandex.ru>
  • Loading branch information
ventureoo committed Dec 12, 2024
1 parent 3b288ba commit 94dff4f
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions profiles/pci/graphic_drivers/profiles.toml
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,15 @@ if [ -z "$(lspci -d "10de:*:030x")" ]; then
echo "opencl-rusticl-mesa lib32-opencl-rusticl-mesa"
fi
"""
post_install = """
if [ -z "$(lspci -d "10de:*:030x")" ]; then
# Force the use of Rusticl, otherwise it will be just a stub
echo "export RUSTICL_ENABLE=nouveau" > /etc/profile.d/opencl.sh
fi
"""
post_remove = """
rm -f /etc/profile.d/opencl.sh
"""

[intel]
desc = "Mesa open source driver for Intel"
Expand All @@ -190,6 +199,15 @@ if [ -z "$(lspci -d "10de:*:030x")" ]; then
echo "opencl-rusticl-mesa lib32-opencl-rusticl-mesa"
fi
"""
post_install = """
if [ -z "$(lspci -d "10de:*:030x")" ]; then
# Force the use of Rusticl, otherwise it will be just a stub
echo "export RUSTICL_ENABLE=iris" > /etc/profile.d/opencl.sh
fi
"""
post_remove = """
rm -f /etc/profile.d/opencl.sh
"""

[amd]
desc = "Mesa open source driver for AMD"
Expand All @@ -203,6 +221,15 @@ if [ -z "$(lspci -d "10de:*:030x")" ]; then
echo "opencl-rusticl-mesa lib32-opencl-rusticl-mesa"
fi
"""
post_install = """
if [ -z "$(lspci -d "10de:*:030x")" ]; then
# Force the use of Rusticl, otherwise it will be just a stub
echo "export RUSTICL_ENABLE=radeonsi" > /etc/profile.d/opencl.sh
fi
"""
post_remove = """
rm -f /etc/profile.d/opencl.sh
"""

[fallback]
desc = 'Fallback profile'
Expand Down

0 comments on commit 94dff4f

Please sign in to comment.