@@ -350,15 +350,19 @@ setup_hwaccel() {
350350# so that TOOLS_GH_REL_JSON contains the compute-runtime release metadata.
351351# Sets the variable named by $1 (default: igc_tag) to the discovered tag.
352352# ══════════════════════════════════════════════════════════════════════════════
353+ # compute-runtime pins the exact intel-igc-opencl-2 it was built against, so the
354+ # tag has to come from its release notes. Empty means unresolved: installing the
355+ # newest IGC instead gives a combination dpkg refuses.
353356_resolve_igc_tag () {
354357 local -n _out_ref=" ${1:- igc_tag} "
355- _out_ref=" latest"
356- if [[ -n " ${TOOLS_GH_REL_JSON:- } " && -f " $TOOLS_GH_REL_JSON " ]]; then
357- local _body _parsed
358- _body=$( jq -r ' .body // empty' " $TOOLS_GH_REL_JSON " 2> /dev/null) || return 0
359- _parsed=$( grep -oP ' intel-graphics-compiler/releases/tag/\K[^\s\)]+' <<< " $_body" | head -1)
360- [[ -n " $_parsed " ]] && _out_ref=" $_parsed "
361- fi
358+ _out_ref=" "
359+ [[ -n " ${TOOLS_GH_REL_JSON:- } " && -f " $TOOLS_GH_REL_JSON " ]] || return 0
360+
361+ # The file holds whatever the API returned: one release for a pinned version,
362+ # a list for 'latest'.
363+ local _body
364+ _body=$( jq -r ' if type == "array" then .[0] else . end | .body // empty' " $TOOLS_GH_REL_JSON " 2> /dev/null) || return 0
365+ _out_ref=$( grep -oP ' intel-graphics-compiler/releases/tag/\K[^\s\)]+' <<< " $_body" | head -1)
362366}
363367
364368# ══════════════════════════════════════════════════════════════════════════════
@@ -399,14 +403,18 @@ _setup_intel_arc() {
399403
400404 local igc_tag
401405 _resolve_igc_tag igc_tag
406+ if [[ -z " $igc_tag " ]]; then
407+ msg_warn " Could not read the IGC version compute-runtime pins - skipping OpenCL. VA-API still works."
408+ else
402409
403- # Intel Graphics Compiler – pinned to the version compute-runtime expects
404- fetch_and_deploy_gh_release " intel-igc-core" " intel/intel-graphics-compiler" " binary" " $igc_tag " " " " intel-igc-core-2_*_amd64.deb" || true
405- fetch_and_deploy_gh_release " intel-igc-opencl" " intel/intel-graphics-compiler" " binary" " $igc_tag " " " " intel-igc-opencl-2_*_amd64.deb" || true
410+ # Intel Graphics Compiler – pinned to the version compute-runtime expects
411+ fetch_and_deploy_gh_release " intel-igc-core" " intel/intel-graphics-compiler" " binary" " $igc_tag " " " " intel-igc-core-2_*_amd64.deb" || true
412+ fetch_and_deploy_gh_release " intel-igc-opencl" " intel/intel-graphics-compiler" " binary" " $igc_tag " " " " intel-igc-opencl-2_*_amd64.deb" || true
406413
407- # Compute Runtime (depends on IGC and gmmlib)
408- fetch_and_deploy_gh_release " intel-opencl-icd" " intel/compute-runtime" " binary" " latest" " " " intel-opencl-icd_*_amd64.deb" || true
409- fetch_and_deploy_gh_release " intel-level-zero-gpu" " intel/compute-runtime" " binary" " latest" " " " libze-intel-gpu1_*_amd64.deb" || true
414+ # Compute Runtime (depends on IGC and gmmlib)
415+ fetch_and_deploy_gh_release " intel-opencl-icd" " intel/compute-runtime" " binary" " latest" " " " intel-opencl-icd_*_amd64.deb" || true
416+ fetch_and_deploy_gh_release " intel-level-zero-gpu" " intel/compute-runtime" " binary" " latest" " " " libze-intel-gpu1_*_amd64.deb" || true
417+ fi
410418 fi
411419
412420 _cs_apt_install_optional intel-media-va-driver-non-free ocl-icd-libopencl1 libvpl2 libmfx-gen1.2 mesa-vulkan-drivers vulkan-tools vainfo intel-gpu-tools
@@ -453,13 +461,17 @@ _setup_intel_modern() {
453461
454462 local igc_tag
455463 _resolve_igc_tag igc_tag
464+ if [[ -z " $igc_tag " ]]; then
465+ msg_warn " Could not read the IGC version compute-runtime pins - skipping OpenCL. VA-API still works."
466+ else
456467
457- # Intel Graphics Compiler – pinned to the version compute-runtime expects
458- fetch_and_deploy_gh_release " intel-igc-core" " intel/intel-graphics-compiler" " binary" " $igc_tag " " " " intel-igc-core-2_*_amd64.deb" || true
459- fetch_and_deploy_gh_release " intel-igc-opencl" " intel/intel-graphics-compiler" " binary" " $igc_tag " " " " intel-igc-opencl-2_*_amd64.deb" || true
468+ # Intel Graphics Compiler – pinned to the version compute-runtime expects
469+ fetch_and_deploy_gh_release " intel-igc-core" " intel/intel-graphics-compiler" " binary" " $igc_tag " " " " intel-igc-core-2_*_amd64.deb" || true
470+ fetch_and_deploy_gh_release " intel-igc-opencl" " intel/intel-graphics-compiler" " binary" " $igc_tag " " " " intel-igc-opencl-2_*_amd64.deb" || true
460471
461- # Compute Runtime
462- fetch_and_deploy_gh_release " intel-opencl-icd" " intel/compute-runtime" " binary" " latest" " " " intel-opencl-icd_*_amd64.deb" || true
472+ # Compute Runtime
473+ fetch_and_deploy_gh_release " intel-opencl-icd" " intel/compute-runtime" " binary" " latest" " " " intel-opencl-icd_*_amd64.deb" || true
474+ fi
463475 fi
464476
465477 _cs_apt_install_optional intel-media-va-driver-non-free ocl-icd-libopencl1 mesa-vulkan-drivers vulkan-tools vainfo libmfx-gen1.2 intel-gpu-tools
0 commit comments