[Bf-blender-cvs] [7d44676b5f2] master: Realtime Compositor: Disable on MacOS

Omar Emara noreply at git.blender.org
Wed Nov 23 12:36:40 CET 2022


Commit: 7d44676b5f22bb07f94631f13d40b317fbc5114d
Author: Omar Emara
Date:   Wed Nov 23 13:34:31 2022 +0200
Branches: master
https://developer.blender.org/rB7d44676b5f22bb07f94631f13d40b317fbc5114d

Realtime Compositor: Disable on MacOS

This patch disables the realtime compositor on MacOS until Metal is
supported. This is because MacOS doesn't support the necessary GPU
features to make it work.

An engine error overlay is displayed if it is enabled and the option
itself is greyed out.

See T102353.

Differential Revision: https://developer.blender.org/D16510

Reviewed By: Clement Foucault

===================================================================

M	release/scripts/startup/bl_ui/space_view3d.py
M	source/blender/draw/engines/compositor/compositor_engine.cc

===================================================================

diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index dda5e8beb10..656ef6663e4 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -6212,6 +6212,8 @@ class VIEW3D_PT_shading_compositor(Panel):
         shading = context.space_data.shading
 
         row = self.layout.row()
+        import sys
+        row.active = sys.platform != "darwin"
         row.prop(shading, "use_compositor", expand=True)
 
 
diff --git a/source/blender/draw/engines/compositor/compositor_engine.cc b/source/blender/draw/engines/compositor/compositor_engine.cc
index 2c9e5182b01..3b7378f280b 100644
--- a/source/blender/draw/engines/compositor/compositor_engine.cc
+++ b/source/blender/draw/engines/compositor/compositor_engine.cc
@@ -163,7 +163,14 @@ static void compositor_engine_free(void *instance_data)
 
 static void compositor_engine_draw(void *data)
 {
-  const COMPOSITOR_Data *compositor_data = static_cast<COMPOSITOR_Data *>(data);
+  COMPOSITOR_Data *compositor_data = static_cast<COMPOSITOR_Data *>(data);
+
+#if defined(__APPLE__)
+  blender::StringRef("Viewport compositor not supported on MacOS")
+      .copy(compositor_data->info, GPU_INFO_SIZE);
+  return;
+#endif
+
   compositor_data->instance_data->draw();
 }



More information about the Bf-blender-cvs mailing list