Michael Jones
007184bcf2
Enable inlining on Apple Silicon. Use new process-wide ShaderCache in order to safely re-enable binary archives
This patch is the same as D14763, but with a fix for unit test failures caused by ShaderCache fetch logic not working in the non-MetalRT case:
```
diff --git a/intern/cycles/device/metal/kernel.mm b/intern/cycles/device/metal/kernel.mm
index ad268ae7057..6aa1a56056e 100644
--- a/intern/cycles/device/metal/kernel.mm
+++ b/intern/cycles/device/metal/kernel.mm
@@ -203,9 +203,12 @@ bool kernel_has_intersection(DeviceKernel device_kernel)
/* metalrt options */
request.pipeline->use_metalrt = device->use_metalrt;
- request.pipeline->metalrt_hair = device->kernel_features & KERNEL_FEATURE_HAIR;
- request.pipeline->metalrt_hair_thick = device->kernel_features & KERNEL_FEATURE_HAIR_THICK;
- request.pipeline->metalrt_pointcloud = device->kernel_features & KERNEL_FEATURE_POINTCLOUD;
+ request.pipeline->metalrt_hair = device->use_metalrt &&
+ (device->kernel_features & KERNEL_FEATURE_HAIR);
+ request.pipeline->metalrt_hair_thick = device->use_metalrt &&
+ (device->kernel_features & KERNEL_FEATURE_HAIR_THICK);
+ request.pipeline->metalrt_pointcloud = device->use_metalrt &&
+ (device->kernel_features & KERNEL_FEATURE_POINTCLOUD);
{
thread_scoped_lock lock(cache_mutex);
@@ -225,9 +228,9 @@ bool kernel_has_intersection(DeviceKernel device_kernel)
/* metalrt options */
bool use_metalrt = device->use_metalrt;
- bool metalrt_hair = device->kernel_features & KERNEL_FEATURE_HAIR;
- bool metalrt_hair_thick = device->kernel_features & KERNEL_FEATURE_HAIR_THICK;
- bool metalrt_pointcloud = device->kernel_features & KERNEL_FEATURE_POINTCLOUD;
+ bool metalrt_hair = use_metalrt && (device->kernel_features & KERNEL_FEATURE_HAIR);
+ bool metalrt_hair_thick = use_metalrt && (device->kernel_features & KERNEL_FEATURE_HAIR_THICK);
+ bool metalrt_pointcloud = use_metalrt && (device->kernel_features & KERNEL_FEATURE_POINTCLOUD);
MetalKernelPipeline *best_pipeline = nullptr;
for (auto &pipeline : collection) {
```
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D14923
2022-05-11 16:20:59 +01:00
..
2022-02-22 15:13:27 +01:00
2022-04-19 10:32:07 +02:00
2022-02-11 17:47:34 +01:00
2022-04-19 10:32:07 +02:00
2022-05-11 16:20:59 +01:00
2022-02-11 17:47:34 +01:00
2022-05-06 18:27:44 +10:00
2022-04-07 19:52:53 +02:00
2022-02-11 17:47:34 +01:00
2022-02-11 17:47:34 +01:00
2022-02-11 17:47:34 +01:00
2022-02-11 17:47:34 +01:00
2022-02-11 17:47:34 +01:00
2022-02-11 17:47:34 +01:00
2022-02-11 17:47:34 +01:00
2022-02-11 17:47:34 +01:00
2022-02-11 17:47:34 +01:00
2022-02-11 17:47:34 +01:00
2022-02-11 17:47:34 +01:00
2022-04-19 10:32:07 +02:00