Mac: Enable Metal as default gpu backend.

Currently Metal is more stable then the OpenGL backend on apple
devices. Also the Metal backend supports more features then the
OpenGL backend. For example the viewport compositor and rendering
of production files.

This has been validated with users and studios.

This patch will default to the Metal backend when starting
Blender 3.5 for the first time or when loading factory startup. It
is still possible to switch to OpenGL via the user preferences.

It will not automatically select the Metal backend when there is
already user preferences available for Blender 3.5.
This commit is contained in:
Jeroen Bakker 2023-02-20 10:51:15 +01:00
parent 25e57c39b1
commit 87e5d7212c
2 changed files with 8 additions and 0 deletions

View File

@ -101,7 +101,11 @@ const UserDef U_default = {
.gp_euclideandist = 2,
.gp_eraser = 25,
.gp_settings = 0,
#ifdef __APPLE__
.gpu_backend = GPU_BACKEND_METAL,
#else
.gpu_backend = GPU_BACKEND_OPENGL,
#endif
/** Initialized by: #BKE_studiolight_default. */
.light_param = {{0}},

View File

@ -770,7 +770,11 @@ void blo_do_versions_userdef(UserDef *userdef)
/* Set GPU backend to OpenGL. */
if (!USER_VERSION_ATLEAST(305, 5)) {
#ifdef __APPLE__
userdef->gpu_backend = GPU_BACKEND_METAL;
#else
userdef->gpu_backend = GPU_BACKEND_OPENGL;
#endif
}
if (!USER_VERSION_ATLEAST(305, 10)) {