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
This commit is contained in:
Sergey Sharybin
2024-09-26 13:39:22 +02:00
committed by Sergey Sharybin
parent 381898b6dc
commit b96a7b7204
2 changed files with 3 additions and 3 deletions

View File

@@ -54,7 +54,7 @@ class MetalDevice : public Device {
id<MTLAccelerationStructure> accel_struct = nil;
/*---------------------------------------------------*/
uint kernel_features;
uint kernel_features = 0;
bool using_nanovdb = false;
MTLResourceOptions default_storage_mode;
int max_threads_per_threadgroup;

View File

@@ -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);