rusticl/program: mark NirKernelBuild as Send and Sync

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26040>
This commit is contained in:
Karol Herbst 2023-10-05 12:51:12 +02:00 committed by Marge Bot
parent dd5b0adc79
commit 98dab1aad5

View file

@ -91,6 +91,11 @@ pub struct NirKernelBuild {
pub printf_info: Option<NirPrintfInfo>,
}
// SAFETY: `CSOWrapper` is only safe to use if the device supports `PIPE_CAP_SHAREABLE_SHADERS` and
// we make sure to set `nir_or_cso` to `KernelDevStateVariant::Cso` only if that's the case.
unsafe impl Send for NirKernelBuild {}
unsafe impl Sync for NirKernelBuild {}
pub struct ProgramBuild {
pub builds: HashMap<&'static Device, ProgramDevBuild>,
pub kernel_info: HashMap<String, KernelInfo>,