Commit: 99520a79b6dbd65d8cac6e0def7a1f4cbbc97c1c
Author: Jeroen Bakker
Date:   Thu Feb 2 07:43:18 2023 +0100
Branches: master
https://developer.blender.org/rB99520a79b6dbd65d8cac6e0def7a1f4cbbc97c1c

Viewport Compositor: Platform support message.

In the previous situation the message was shown for Apple devices.
But this is not correct and confusing.

- Apple with Metal backend are supported, OpenGL on Apple isn't
- Legacy devices on Windows or Linux are also not supported.

This change will check that the capabilities of the GPU match the
requirements to use Viewport compositor. Based on those capabilities
a message is shown and the panel is activated.

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

M       release/scripts/startup/bl_ui/space_view3d.py

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

diff --git a/release/scripts/startup/bl_ui/space_view3d.py 
b/release/scripts/startup/bl_ui/space_view3d.py
index 50629e70aae..d5fe24c1b62 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -6195,14 +6195,15 @@ class VIEW3D_PT_shading_compositor(Panel):
     def draw(self, context):
         shading = context.space_data.shading
 
-        import sys
-        is_macos = sys.platform == "darwin"
+        import gpu
+        is_supported = (gpu.capabilities.compute_shader_support_get()
+                        and 
gpu.capabilities.shader_image_load_store_support_get())
 
         row = self.layout.row()
-        row.active = not is_macos
+        row.active = is_supported
         row.prop(shading, "use_compositor", expand=True)
-        if is_macos and shading.use_compositor != "DISABLED":
-            self.layout.label(text="Compositor not supported on MacOS", 
icon='ERROR')
+        if shading.use_compositor != "DISABLED" and not is_supported:
+            self.layout.label(text="Compositor not supported on this 
platform", icon='ERROR')
 
 
 class VIEW3D_PT_gizmo_display(Panel):

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
List details, subscription details or unsubscribe:
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to