From 59cba7075176ea482d667d90fbc5afb5829c4806 Mon Sep 17 00:00:00 2001 From: Karol Herbst Date: Wed, 21 Feb 2024 18:24:36 +0100 Subject: [PATCH] rusticl/spirv: mark SPIRVBin as Send and Sync Part-of: --- src/gallium/frontends/rusticl/mesa/compiler/clc/spirv.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/gallium/frontends/rusticl/mesa/compiler/clc/spirv.rs b/src/gallium/frontends/rusticl/mesa/compiler/clc/spirv.rs index 11b60ef3360..281bc7ed74b 100644 --- a/src/gallium/frontends/rusticl/mesa/compiler/clc/spirv.rs +++ b/src/gallium/frontends/rusticl/mesa/compiler/clc/spirv.rs @@ -25,6 +25,10 @@ pub struct SPIRVBin { info: Option, } +// Safety: SPIRVBin is not mutable and is therefore Send and Sync, needed due to `clc_binary::data` +unsafe impl Send for SPIRVBin {} +unsafe impl Sync for SPIRVBin {} + #[derive(PartialEq, Eq, Hash, Clone)] pub struct SPIRVKernelArg { pub name: String,