Skip to content

Commit 9734e0d

Browse files
committed
libs::mesa3d: enable clc for llvmpipe and iris
Mesa needs clc for some drivers. ATM llvmpipe and iris are known to require clc.
1 parent 0876052 commit 9734e0d

1 file changed

Lines changed: 13 additions & 4 deletions

File tree

recipes/libs/mesa3d.yaml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -150,14 +150,14 @@ multiPackage:
150150
- libs::xorg::libXxf86vm-tgt
151151
- virtual::core::udev-tgt
152152

153-
- if: "$(match,$MESA3D_GALLIUM_DRIVERS,llvmpipe)"
153+
- if: "$(match,$MESA3D_GALLIUM_DRIVERS,[llvmpipe|iris])"
154154
depends:
155155
- devel::llvm-libs-dev
156156
- use: []
157157
depends:
158158
- devel::llvm-libs-tgt
159159

160-
- if: "$(match,$MESA3D_GALLIUM_DRIVERS,iris)"
160+
- if: "$(match,$MESA3D_GALLIUM_DRIVERS,[llvmpipe|iris])"
161161
tools:
162162
target-toolchain: host-compat-toolchain
163163
depends:
@@ -172,11 +172,20 @@ multiPackage:
172172
cross_file.txt
173173
fi
174174
buildTools:
175-
- if: "$(match,$MESA3D_GALLIUM_DRIVERS,iris)"
175+
- if: "$(match,$MESA3D_GALLIUM_DRIVERS,[llvmpipe|iris])"
176176
name: mesa_clc
177177
buildVars: [MESA3D_GALLIUM_DRIVERS, MESA3D_GLX, MESA3D_PLATFORM,
178178
MESA3D_GLX_READ_ONLY_TEXT]
179179
buildScript: |
180+
CLC_DRIVERS=("llvmpipe" "iris")
181+
ENABLE_LLV=false
182+
IFS=',' read -ra ENABLED_DRIVERS <<< "$MESA3D_GALLIUM_DRIVERS"
183+
for i in "${ENABLED_DRIVERS[@]}"; do
184+
if [[ " ${CLC_DRIVERS[*]} " == *" $i "* ]]; then
185+
ENABLE_LLV=true
186+
fi
187+
done
188+
180189
mesonBuild $1 \
181190
-Dglx=$([[ $MESA3D_PLATFORM == x11 ]] && echo ${MESA3D_GLX} || echo disabled) \
182191
-Dglvnd=disabled \
@@ -190,7 +199,7 @@ multiPackage:
190199
-Dgles2=enabled \
191200
-Dglx-read-only-text=$([[ $MESA3D_GLX_READ_ONLY_TEXT -ne 0 ]] && echo true || echo false) \
192201
-Dvalgrind=disabled \
193-
-Dllvm=$([[ "$MESA3D_GALLIUM_DRIVERS" =~ "llvmpipe" ]] && echo 'enabled' || echo 'disabled') \
202+
-Dllvm=$($ENABLE_LLV && echo 'enabled' || echo 'disabled') \
194203
${BOB_TOOL_PATHS[mesa_clc]+-Dmesa-clc=system} \
195204
196205
multiPackage:

0 commit comments

Comments
 (0)