From fdafeaf46dbc70760b7bba7eb814a789c1f7c867 Mon Sep 17 00:00:00 2001 From: Giulio Eulisse <10544+ktf@users.noreply.github.com> Date: Fri, 20 Nov 2026 21:10:58 +0100 Subject: [PATCH] GPU TPC: let InterpolationErrors compile as Metal code The static constexpr data member added by the merger rebuild is a program-scope variable in MSL, which must be in the constant address space: the Metal IR fails with "program scope variable must reside in constant address space". An enumerator gives the same constant without a variable. --- GPU/GPUTracking/Merger/GPUTPCGMMergerTypes.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GPU/GPUTracking/Merger/GPUTPCGMMergerTypes.h b/GPU/GPUTracking/Merger/GPUTPCGMMergerTypes.h index 249d61bfc3b90..f447e2d23b25b 100644 --- a/GPU/GPUTracking/Merger/GPUTPCGMMergerTypes.h +++ b/GPU/GPUTracking/Merger/GPUTPCGMMergerTypes.h @@ -51,7 +51,7 @@ struct InterpolationErrorHit { }; struct InterpolationErrors { - static constexpr size_t size = constants::MERGER_MAX_TRACK_CLUSTERS; + enum : uint32_t { size = constants::MERGER_MAX_TRACK_CLUSTERS }; // Not a static data member: Metal and OpenCL allow program-scope variables only in the constant address space InterpolationErrorHit hit[size]; };