# o3de-spirv-cross — license-clean SPIRV-Cross binary for O3DE # # Builds the SPIRV-Cross CLI from KhronosGroup/SPIRV-Cross at tag # vulkan-sdk-1.3.275.0 (matching o3de/3p-package-source's SPIRVCross # package_version "1.3.275.0-rev2"). Configured Linux/CLI-only. # # Per the audit at 2026-05-07 (see o3de-rpm/BUNDLED_LIBRARIES.md § # "Binary-only / DXC-class dependencies"): the engine doesn't link # SPIRV-Cross at all. It shells out to the spirv-cross binary at asset- # build time (Gems/Atom/RHI/Metal/Code/Source/RHI.Builders/ # ShaderPlatformInterface.cpp:331). Zero `#include` lines for SPIRV-Cross # C++ headers anywhere in Code/ or Gems/. So this rebuild only needs to # produce a working `spirv-cross` executable. # # License: Apache-2.0 OR MIT (KhronosGroup standard dual-license). # Both Fedora-compatible; no proprietary pieces. # # This is the "PoC" stage — proves the rebuild is buildable as a Fedora- # style RPM. Sibling track to o3de-dxc-spirv. Goal of this iteration: # get a green local build + a binary RPM that produces a functioning # spirv-cross executable. %global o3de_spc_commit 117161dd546075a568f0526bccffcd7e0bc96897 %global o3de_spc_short %(c=%{o3de_spc_commit}; echo ${c:0:7}) %global o3de_spc_pkgrev rev3 Name: o3de2605-spirv-cross Version: 1.3.275.0 Release: 1.%{o3de_spc_pkgrev}%{?dist} Summary: SPIRV-Cross CLI for Open 3D Engine 26.05 License: Apache-2.0 OR MIT URL: https://github.com/KhronosGroup/SPIRV-Cross # Versioned-major rename: see o3de-rpm memory note # `project_o3de_3p_versioning_research.md` for empirical research that # motivated the o3deNNNN- naming convention. Obsoletes/Provides keep # `dnf upgrade` seamless from the unversioned o3de-spirv-cross (rev1-rev2). Obsoletes: o3de-spirv-cross < 1.3.275.0-1.rev3 Provides: o3de-spirv-cross = %{version}-%{release} # Source tarball pulled at the exact `vulkan-sdk-1.3.275.0` tag's commit # SHA (verified via `gh api /repos/o3de/3p-package-source/contents/ # package-system/SPIRVCross/build_config.json`). Tarball name uses the # short SHA to make accidental version drift visible. Source0: SPIRV-Cross-%{o3de_spc_short}.tar.gz BuildRequires: cmake BuildRequires: ninja-build BuildRequires: gcc-c++ BuildRequires: python3 # For the dxcversion.inc-style commit-hash embedding, if SPIRV-Cross # does anything similar at build time. Defensive — DXC needed it. BuildRequires: git %description SPIRV-Cross — KhronosGroup's SPIR-V to GLSL/HLSL/MSL/etc. cross-compiler. This build is the CLI binary only (no shared library), used by Open 3D Engine's asset pipeline as an external invocation: the engine shells out to spirv-cross to cross-compile shaders to MSL (Metal Shading Language) at asset-build time. This package replaces the bundled SPIRV-Cross that O3DE fetches from packages.o3de.org by default — providing a Fedora-shippable license- clean substitute. Sibling track to o3de-dxc-spirv. %prep %autosetup -n KhronosGroup-SPIRV-Cross-%{o3de_spc_short} %build # Cmake flags mirror o3de/3p-package-source/.../SPIRVCross/build_config.json's # Linux build_configs: # SPIRV_CROSS_CLI=ON — build the spirv-cross executable # SPIRV_CROSS_SHARED=OFF — no shared library; static-only # SPIRV_CROSS_STATIC=ON — implied by CLI=ON, but explicit for clarity %cmake \ -GNinja \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_POLICY_VERSION_MINIMUM=3.5 \ -DSPIRV_CROSS_CLI=ON \ -DSPIRV_CROSS_STATIC=ON \ -DSPIRV_CROSS_SHARED=OFF \ -DSPIRV_CROSS_ENABLE_TESTS=OFF %cmake_build --target spirv-cross %install # SPIRV-Cross's cmake install rules ship the binary plus a fistful of # static libraries + headers + pkg-config files. For our PoC we only # need the binary (engine shells out to it; doesn't link the C++ API). # Skip the full install, just install the binary directly. mkdir -p %{buildroot}%{_bindir} install -m 0755 %{_vpath_builddir}/spirv-cross %{buildroot}%{_bindir}/spirv-cross %files %license LICENSE %license LICENSES/ %doc README.md %{_bindir}/spirv-cross %changelog * Fri May 08 2026 Nick Schuetz - 1.3.275.0-1.rev3 - Versioned-major rename: o3de-spirv-cross -> o3de2605-spirv-cross. Mirrors the engine package's o3deNNNN naming convention so `o3de2605-spirv-cross` and a future `o3de2610-spirv-cross` can co-exist in the same COPR project, matching upstream's CDN model. Memory note: `project_o3de_3p_versioning_research.md`. - Backward compat: Obsoletes + Provides headers so `dnf upgrade` transitions seamlessly from o3de-spirv-cross rev1-rev2. - No functional change. Same upstream SHA + cmake policy fix carry forward; this revision is a name-only bump. * Thu May 07 2026 Nick Schuetz - 1.3.275.0-1.rev2 - Fix: COPR build 10434598 (rev1) failed in 7s with cmake policy error — SPIRV-Cross's `cmake_minimum_required(VERSION 3.5)` is too low for Fedora 44's modern cmake (4.x), which deprecates support for cmake policies older than 3.5. Cmake's own error message suggested the fix: add `-DCMAKE_POLICY_VERSION_MINIMUM=3.5`. Trivial. * Thu May 07 2026 Nick Schuetz - 1.3.275.0-1.rev1 - Initial PoC: license-clean SPIRV-Cross CLI build for O3DE. - Source: KhronosGroup/SPIRV-Cross at tag vulkan-sdk-1.3.275.0 (SHA 117161dd546075a568f0526bccffcd7e0bc96897), matching o3de/3p-package-source's package-system/SPIRVCross build_config.json git_tag (package_version 1.3.275.0-rev2). - Cmake flags mirror the upstream build_config.json's Linux config: SPIRV_CROSS_CLI=ON, SPIRV_CROSS_STATIC=ON, SPIRV_CROSS_SHARED=OFF, SPIRV_CROSS_ENABLE_TESTS=OFF. - Sibling track to o3de-dxc-spirv (per o3de-rpm/BUNDLED_LIBRARIES.md § "Binary-only / DXC-class dependencies"): engine shells out to the spirv-cross executable at asset-build time; no library API linkage. License: Apache-2.0 OR MIT, both Fedora-compatible.