Go to file
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
.github GitHub: add PR template 2021-10-23 10:49:51 +05:30
build_files Cleanup: spelling in comments/strings 2022-05-11 17:02:06 +10:00
doc Cleanup: format 2022-05-11 11:02:01 +10:00
extern Update Ceres to latest upstream version 2.1.0 2022-05-11 09:33:45 +02:00
intern Enable inlining on Apple Silicon. Use new process-wide ShaderCache in order to safely re-enable binary archives 2022-05-11 16:20:59 +01:00
release Curves: Adjust sculpt mode UI layouts 2022-05-11 15:47:49 +02:00
source UI: Update rest of UI code for increased button flag bitfield 2022-05-11 17:07:02 +02:00
tests Cleanup: line length for Python scripts 2022-04-26 15:16:11 +10:00
.arcconfig Fix .arcconfig not working with latest arcanist version 2020-03-01 22:35:31 +01:00
.clang-format Cleanup: clang-format 2022-04-04 12:35:33 +10:00
.clang-tidy Clang-tidy: Ignore variable name length and .c/.cc include warnings 2022-05-06 15:26:54 +02:00
.editorconfig pyproject: add configuration for autopep8 2022-04-22 10:13:39 +10:00
.git-blame-ignore-revs Cleanup: git-blame-ignore-revs: Update policy & commits 2021-01-29 13:20:32 +05:30
.gitignore Compositor automated testing 2021-03-26 16:15:02 +01:00
.gitmodules Update for moving blender2.8 to master. 2018-12-21 12:15:21 +01:00
CMakeLists.txt Update Ceres to latest upstream version 2.1.0 2022-05-11 09:33:45 +02:00
COPYING == docs == 2010-10-13 14:44:22 +00:00
GNUmakefile GNUmakefile: include autopep8 in the "make format" target 2022-05-03 18:32:00 +10:00
make.bat make.bat: unify python detection 2022-01-25 09:19:03 -07:00
pyproject.toml pyproject: enable aggressive, ignore E501 (line wrapping) 2022-04-26 14:59:41 +10:00
readme.rst Blender README: Fix the full license name. 2021-04-09 12:39:33 +02:00

.. Keep this document short & concise,
   linking to external resources instead of including content in-line.
   See 'release/text/readme.html' for the end user read-me.


Blender
=======

Blender is the free and open source 3D creation suite.
It supports the entirety of the 3D pipeline-modeling, rigging, animation, simulation, rendering, compositing,
motion tracking and video editing.

.. figure:: https://code.blender.org/wp-content/uploads/2018/12/springrg.jpg
   :scale: 50 %
   :align: center


Project Pages
-------------

- `Main Website <http://www.blender.org>`__
- `Reference Manual <https://docs.blender.org/manual/en/latest/index.html>`__
- `User Community <https://www.blender.org/community/>`__

Development
-----------

- `Build Instructions <https://wiki.blender.org/wiki/Building_Blender>`__
- `Code Review & Bug Tracker <https://developer.blender.org>`__
- `Developer Forum <https://devtalk.blender.org>`__
- `Developer Documentation <https://wiki.blender.org>`__


License
-------

Blender as a whole is licensed under the GNU General Public License, Version 3.
Individual files may have a different, but compatible license.

See `blender.org/about/license <https://www.blender.org/about/license>`__ for details.