From b96a7b72045b9b41f41b33f76f23d2936d945844 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Thu, 26 Sep 2024 13:39:22 +0200 Subject: [PATCH] Fix #127622: 4.1 splash screen won't render with MetalRT The commit which made the issue to be more easily discoverable is 4651f8a08f. The fix is similar to #127114. Pull Request: https://projects.blender.org/blender/blender/pulls/128173 --- intern/cycles/device/metal/device_impl.h | 2 +- intern/cycles/device/metal/device_impl.mm | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/intern/cycles/device/metal/device_impl.h b/intern/cycles/device/metal/device_impl.h index 8a5f7ff5ef4..8e267dc4f34 100644 --- a/intern/cycles/device/metal/device_impl.h +++ b/intern/cycles/device/metal/device_impl.h @@ -54,7 +54,7 @@ class MetalDevice : public Device { id accel_struct = nil; /*---------------------------------------------------*/ - uint kernel_features; + uint kernel_features = 0; bool using_nanovdb = false; MTLResourceOptions default_storage_mode; int max_threads_per_threadgroup; diff --git a/intern/cycles/device/metal/device_impl.mm b/intern/cycles/device/metal/device_impl.mm index 7439378fba1..3bcec510742 100644 --- a/intern/cycles/device/metal/device_impl.mm +++ b/intern/cycles/device/metal/device_impl.mm @@ -426,7 +426,7 @@ void MetalDevice::make_source(MetalPipelineType pso_type, const uint kernel_feat bool MetalDevice::load_kernels(const uint _kernel_features) { @autoreleasepool { - kernel_features = _kernel_features; + kernel_features |= _kernel_features; /* check if GPU is supported */ if (!support_device(kernel_features)) @@ -436,7 +436,7 @@ bool MetalDevice::load_kernels(const uint _kernel_features) * This is necessary since objects may be reported to have motion if the Vector pass is * active, but may still need to be rendered without motion blur if that isn't active as well. */ - motion_blur = kernel_features & KERNEL_FEATURE_OBJECT_MOTION; + motion_blur |= kernel_features & KERNEL_FEATURE_OBJECT_MOTION; /* Only request generic kernels if they aren't cached in memory. */ refresh_source_and_kernels_md5(PSO_GENERIC);