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
This commit is contained in:
Omar Emara 2022-11-23 13:34:31 +02:00
parent 11275b7363
commit 7d44676b5f
2 changed files with 10 additions and 1 deletions

View File

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

View File

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