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-03-15 17:29:54 +11:00
2022-02-11 15:15:49 +11:00
2022-02-11 09:14:36 +11:00
2022-05-11 16:20:59 +01:00
2022-03-18 12:07:08 +01:00
2022-02-11 15:15:49 +11:00
2022-02-22 17:34:07 +01:00
2022-05-06 17:56:59 +10:00
2022-02-11 09:14:36 +11:00
2022-03-16 12:38:23 +01:00
2022-03-11 18:27:58 +01:00
2022-03-25 12:10:30 +11:00
2022-02-11 09:14:36 +11:00
2022-05-11 09:33:45 +02:00
2022-02-11 14:56:03 +11:00
2022-03-18 12:07:08 +01:00
2022-02-11 09:14:36 +11:00
2022-04-23 15:09:41 +02:00
2022-04-11 20:10:42 +02:00
2022-04-20 21:32:03 +02:00
2022-02-11 09:14:36 +11:00
2022-02-11 09:14:36 +11:00
2022-04-01 18:30:09 -05:00
2022-02-11 15:15:49 +11:00
2022-04-13 13:47:04 +10:00
2022-02-11 09:14:36 +11:00