-
Notifications
You must be signed in to change notification settings - Fork 7
RDKEVD-4390: Align Vulkan + SPIR-V versioning #317
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| SUMMARY = "Machine-readable files for the SPIR-V Registry" | ||
| DESCRIPTION = "Headers are provided in the include directory, with up-to-date \ | ||
| headers in the unified1 subdirectory. Older headers are provided according to \ | ||
| their version." | ||
| SECTION = "graphics" | ||
| HOMEPAGE = "https://www.khronos.org/registry/spir-v" | ||
|
|
||
| LICENSE = "MIT" | ||
| LIC_FILES_CHKSUM = "file://LICENSE;md5=c938b85bceb8fb26c1a807f28a52ae2d" | ||
|
|
||
| SRC_URI = "git://github.com/KhronosGroup/SPIRV-Headers;protocol=https;branch=main" | ||
|
|
||
| PE = "1" | ||
| UPSTREAM_CHECK_GITTAGREGEX = "sdk-(?P<pver>\\d+(\\.\\d+)+)" | ||
| S = "${WORKDIR}/git" | ||
|
|
||
| inherit cmake | ||
|
|
||
| BBCLASSEXTEND = "native nativesdk" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| require spirv-headers.inc | ||
|
|
||
| PV = "1.3.247" | ||
| # sdk-1.3.246.1 tag is the upstream drop published alongside Vulkan SDK 1.3.247 | ||
| SRCREV = "1feaf4414eb2b353764d01d88f8aa4bcc67b60db" | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| require spirv-headers.inc | ||
|
|
||
| PV = "1.3.260" | ||
| # PV tracks the Vulkan SDK version (1.3.260); the SPIR-V headers are taken from | ||
| # the sdk-1.3.261.1 tag, which is the closest Khronos drop compatible with 1.3.260. | ||
| SRCREV = "124a9665e464ef98b8b718d572d5f329311061eb" |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,40 @@ | ||||||||||||||||||||
| SUMMARY = "The SPIR-V Tools project provides an API and commands for processing SPIR-V modules" | ||||||||||||||||||||
| DESCRIPTION = "The project includes an assembler, binary module parser, disassembler, validator, and optimizer for SPIR-V." | ||||||||||||||||||||
| SECTION = "graphics" | ||||||||||||||||||||
| HOMEPAGE = "https://github.com/KhronosGroup/SPIRV-Tools" | ||||||||||||||||||||
|
|
||||||||||||||||||||
| LICENSE = "Apache-2.0" | ||||||||||||||||||||
| LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" | ||||||||||||||||||||
|
|
||||||||||||||||||||
| SRC_URI = "git://github.com/KhronosGroup/SPIRV-Tools.git;protocol=https;branch=main" | ||||||||||||||||||||
|
|
||||||||||||||||||||
| PE = "1" | ||||||||||||||||||||
| UPSTREAM_CHECK_GITTAGREGEX = "sdk-(?P<pver>\\d+(\\.\\d+)+)" | ||||||||||||||||||||
| S = "${WORKDIR}/git" | ||||||||||||||||||||
|
|
||||||||||||||||||||
| inherit cmake python3native | ||||||||||||||||||||
|
|
||||||||||||||||||||
| DEPENDS = "spirv-headers" | ||||||||||||||||||||
|
|
||||||||||||||||||||
| EXTRA_OECMAKE += "\ | ||||||||||||||||||||
| -DSPIRV-Headers_SOURCE_DIR=${STAGING_EXECPREFIXDIR} \ | ||||||||||||||||||||
| -DSPIRV_TOOLS_BUILD_STATIC=OFF \ | ||||||||||||||||||||
| -DBUILD_SHARED_LIBS=ON \ | ||||||||||||||||||||
| -DSPIRV_SKIP_TESTS=ON \ | ||||||||||||||||||||
| " | ||||||||||||||||||||
|
|
||||||||||||||||||||
|
Comment on lines
+20
to
+25
|
||||||||||||||||||||
| -DSPIRV-Headers_SOURCE_DIR=${STAGING_EXECPREFIXDIR} \ | |
| -DSPIRV_TOOLS_BUILD_STATIC=OFF \ | |
| -DBUILD_SHARED_LIBS=ON \ | |
| -DSPIRV_SKIP_TESTS=ON \ | |
| " | |
| -DSPIRV_TOOLS_BUILD_STATIC=OFF \ | |
| -DBUILD_SHARED_LIBS=ON \ | |
| -DSPIRV_SKIP_TESTS=ON \ | |
| " |
Copilot
AI
Feb 10, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The sed -i invocation places the target file path before -e, which GNU sed will interpret as the script/commands rather than an input file (likely causing do_install to fail). Reorder arguments so options/scripts come before the file path (e.g., sed -i -e ... <file>).
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| do_install:append:class-target() { | ||
| sed -i -e 's:${STAGING_DIR_HOST}${libdir}/::g' \ | ||
| ${D}${libdir}/cmake/SPIRV-Tools/SPIRV-ToolsTarget.cmake | ||
| } | ||
|
Comment on lines
+1
to
+4
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| require spirv-tools.inc | ||
|
|
||
| PV = "1.3.247" | ||
| # Note: this recipe uses the SPIR-V Tools SDK drop sdk-1.3.246.1, which ships as part of | ||
| # Vulkan SDK 1.3.247. PV is intentionally set to the Vulkan SDK version (1.3.247) rather | ||
| # than the SPIR-V SDK tag to follow the Vulkan SDK versioning convention in this layer. | ||
| SRCREV = "44d72a9b36702f093dd20815561a56778b2d181e" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| require spirv-tools.inc | ||
|
|
||
| PV = "1.3.260" | ||
| # Note: PV tracks the Vulkan SDK version (1.3.260), but upstream does not | ||
| # provide an exact SPIR-V Tools tag for this SDK release. We therefore pin | ||
| # SRCREV to sdk-1.3.261.1, which is the closest published SPIR-V Tools drop | ||
| # corresponding to Vulkan SDK 1.3.260. | ||
| SRCREV = "e553b884c7c9febaa4e52334f683641fb5f196a0" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| # Vulkan SDK Integration | ||
|
|
||
| This directory contains recipes for Vulkan SDK components used across STB and TV platforms in RDK. | ||
|
|
||
| ## Integration Strategy | ||
|
|
||
| - RDK provides common, unmodified Khronos Vulkan components as external recipes: | ||
|
|
||
| | Component | Description | | ||
| |---------------------------|------------------------------------------------| | ||
| | `vulkan-headers` | Vulkan API headers from Khronos | | ||
| | `vulkan-loader` | Khronos Vulkan loader (`libvulkan.so`) | | ||
| | `vulkan-tools` | Vulkan info and utilities (`vulkaninfo`) | | ||
| | `vulkan-validationlayers` | Optional validation layers for debugging | | ||
|
|
||
| - SoC vendors are expected to: | ||
| - Provide only their Vulkan **ICD JSON** and **driver** | ||
| - Not include their own `libvulkan.so` | ||
|
|
||
| - All components are built via Yocto, and versioned recipes are maintained for platform-specific needs. | ||
|
|
||
| ## OpenEmbedded-Core Integration | ||
|
|
||
| For version 1.3.204, this layer extends the recipes provided by the Yocto Kirkstone (OE-Core) layer: | ||
| - `vulkan-headers_1.3.204.1` - Uses OE-core recipe | ||
| - `vulkan-loader_1.3.204.1` - Uses OE-core recipe | ||
| - `vulkan-tools_1.3.204.1` - Uses OE-core recipe with custom patches via bbappend | ||
| - `spirv-headers_1.3.204.1` / `spirv-tools_1.3.204.1` - Provided by OE-core and extended as needed | ||
|
|
||
| The bbappend for vulkan-tools adds: | ||
| - CUBE build support (`-DBUILD_CUBE=ON`) | ||
| - Custom patches for Wayland support | ||
|
|
||
| ## Versioning and Platform Usage | ||
|
|
||
| Platform-specific version selection is done via: | ||
|
|
||
| ```conf | ||
| PREFERRED_VERSION_vulkan-headers = "1.3.260" | ||
| PREFERRED_VERSION_vulkan-loader = "1.3.260" | ||
| PREFERRED_VERSION_vulkan-tools = "1.3.260" | ||
| PREFERRED_VERSION_vulkan-validationlayers = "1.3.260" | ||
| ``` | ||
|
|
||
| These can be overridden per-platform in machine configuration files. | ||
|
|
||
| ## Recipe Structure | ||
|
|
||
| - **Version 1.3.204**: Uses OE-core (Kirkstone) recipes with bbappends for customizations | ||
| - **Versions 1.3.247 and 1.3.260**: Complete recipes in this layer (not in OE-core) | ||
| - **vulkan-validationlayers**: All versions in this layer (not in OE-core) | ||
| - **SPIR-V dependencies**: For 1.3.204, `spirv-headers` and `spirv-tools` come from OE-core (Kirkstone); for newer SDKs, versions 1.3.247 and 1.3.260 are provided in this layer and follow the same versioning as the Vulkan components to keep the toolchain aligned with headers, loader, and validation layers | ||
|
|
||
| ## Notes | ||
| - The upstream SPIR-V repositories do not ship explicit 1.3.247 / 1.3.260 tags; the recipes therefore use the closest published SDK tags (1.3.246.1 and 1.3.261.1) that ship with those Vulkan SDK drops. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| SUMMARY = "Vulkan Header files and API registry" | ||
| DESCRIPTION = "Vulkan is a 3D graphics and compute API providing cross-platform access \ | ||
| to modern GPUs with low overhead and targeting realtime graphics applications such as \ | ||
| games and interactive media. This package contains the development headers \ | ||
| for packages wanting to make use of Vulkan." | ||
| HOMEPAGE = "https://www.khronos.org/vulkan/" | ||
| BUGTRACKER = "https://github.com/KhronosGroup/Vulkan-Headers" | ||
| SECTION = "libs" | ||
|
|
||
| LICENSE = "Apache-2.0" | ||
| LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=3b83ef96387f14655fc854ddc3c6bd57" | ||
|
|
||
| SRC_URI = "git://github.com/KhronosGroup/Vulkan-Headers.git;branch=main;protocol=https" | ||
|
|
||
| S = "${WORKDIR}/git" | ||
|
|
||
| inherit cmake | ||
|
|
||
| FILES:${PN} = "${includedir}/vulkan ${datadir}/cmake/VulkanHeaders" | ||
|
|
||
| do_install:append() { | ||
| rm -rf ${D}${datadir}/vulkan | ||
| } | ||
|
|
||
| UPSTREAM_CHECK_GITTAGREGEX = "sdk-(?P<pver>\d+(\.\d+)+)" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| require vulkan-headers.inc | ||
|
|
||
| SRCREV = "95a13d7b7118d3824f0ef236bb0438d9d51f3634" | ||
| PV = "1.3.247" | ||
|
|
||
| PACKAGES := "${PN} ${PN}-dev" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| require vulkan-headers.inc | ||
|
|
||
| SRCREV = "94bb3c998b9156b9101421f7614617dfcf7f4256" | ||
| PV = "1.3.260" | ||
|
|
||
| PACKAGES := "${PN} ${PN}-dev" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| SUMMARY = "3D graphics and compute API common loader" | ||
| DESCRIPTION = "Vulkan is a new generation graphics and compute API \ | ||
| that provides efficient access to modern GPUs. These packages \ | ||
| provide only the common vendor-agnostic library loader, headers and \ | ||
| the vulkaninfo utility." | ||
| HOMEPAGE = "https://www.khronos.org/vulkan/" | ||
| BUGTRACKER = "https://github.com/KhronosGroup/Vulkan-Loader" | ||
| SECTION = "libs" | ||
|
|
||
| LICENSE = "Apache-2.0" | ||
| LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=7dbefed23242760aa3475ee42801c5ac" | ||
|
|
||
| SRC_URI = "git://github.com/KhronosGroup/Vulkan-Loader.git;branch=main;protocol=https" | ||
|
|
||
| S = "${WORKDIR}/git" | ||
|
|
||
| REQUIRED_DISTRO_FEATURES = "vulkan" | ||
| ANY_OF_DISTRO_FEATURES = "x11 wayland" | ||
|
|
||
| inherit cmake features_check pkgconfig | ||
|
|
||
| DEPENDS += "vulkan-headers" | ||
|
|
||
| EXTRA_OECMAKE = "\ | ||
| -DBUILD_TESTS=OFF \ | ||
| -DPYTHON_EXECUTABLE=${HOSTTOOLS_DIR}/python3 \ | ||
| -DASSEMBLER_WORKS=FALSE \ | ||
| -DVulkanHeaders_INCLUDE_DIR=${STAGING_INCDIR} \ | ||
| " | ||
|
|
||
| PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'wayland x11', d)}" | ||
|
|
||
| PACKAGECONFIG[x11] = "-DBUILD_WSI_XLIB_SUPPORT=ON -DBUILD_WSI_XCB_SUPPORT=ON, -DBUILD_WSI_XLIB_SUPPORT=OFF -DBUILD_WSI_XCB_SUPPORT=OFF, libxcb libx11 libxrandr" | ||
| PACKAGECONFIG[wayland] = "-DBUILD_WSI_WAYLAND_SUPPORT=ON, -DBUILD_WSI_WAYLAND_SUPPORT=OFF, wayland" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| require vulkan-loader.inc | ||
|
|
||
| SRCREV = "797ffe01088e61daa9d12c3810e0bbaa9652558a" | ||
| PV = "1.3.247" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| require vulkan-loader.inc | ||
|
|
||
| SRCREV = "5bc25766b0fa8cd17d4f1f112a5c58828997cf81" | ||
| PV = "1.3.260" |
| Original file line number | Diff line number | Diff line change | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,50 @@ | ||||||||||||
| SUMMARY = "Vulkan Utilities and Tools" | ||||||||||||
| DESCRIPTION = "Assist development by enabling developers to verify their application's correct use of the Vulkan API." | ||||||||||||
| HOMEPAGE = "https://www.khronos.org/vulkan/" | ||||||||||||
| BUGTRACKER = "https://github.com/KhronosGroup/Vulkan-Tools" | ||||||||||||
| SECTION = "libs" | ||||||||||||
|
|
||||||||||||
| LICENSE = "Apache-2.0" | ||||||||||||
| LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=3b83ef96387f14655fc854ddc3c6bd57" | ||||||||||||
|
|
||||||||||||
| SRC_URI = "git://github.com/KhronosGroup/Vulkan-Tools.git;branch=main;protocol=https" | ||||||||||||
| S = "${WORKDIR}/git" | ||||||||||||
|
|
||||||||||||
| inherit cmake features_check pkgconfig | ||||||||||||
|
|
||||||||||||
| # Wayland is required for vulkan-tools (e.g. vkcube) on RDKE | ||||||||||||
| REQUIRED_DISTRO_FEATURES = "vulkan wayland" | ||||||||||||
|
|
||||||||||||
| DEPENDS += " \ | ||||||||||||
| vulkan-headers \ | ||||||||||||
| vulkan-loader \ | ||||||||||||
| wayland \ | ||||||||||||
| wayland-protocols \ | ||||||||||||
| wayland-native \ | ||||||||||||
|
Comment on lines
+21
to
+23
|
||||||||||||
| wayland \ | |
| wayland-protocols \ | |
| wayland-native \ |
Copilot
AI
Feb 10, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
EXTRA_OECMAKE forces -DCUBE_WSI_SELECTION=WAYLAND unconditionally, even when PACKAGECONFIG resolves to x11 only. This can lead to inconsistent configuration (and potential build failures) when Wayland support is disabled via PACKAGECONFIG/DISTRO_FEATURES. Consider setting CUBE_WSI_SELECTION based on PACKAGECONFIG (or default it to XCB when only x11 is enabled).
| -DCUBE_WSI_SELECTION=WAYLAND \ | |
| " | |
| " | |
| EXTRA_OECMAKE:append = " ${@'-DCUBE_WSI_SELECTION=WAYLAND' if 'wayland' in d.getVar('PACKAGECONFIG').split() else '-DCUBE_WSI_SELECTION=XCB'}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The PV is set to 1.3.247 while the actual SPIR-V headers SDK tag is 1.3.246.1 (as noted in the comment). This creates a version number mismatch that could cause confusion. Consider whether PV should match the actual SPIR-V SDK version to maintain accurate version tracking.