Fix T92090: Eevee crash with Intel HD 4000 and macOS 10.15.7
A recent security update to macOS 10.15.7 causes crashes when using Eevee and various other 3D viewport features. It appears that glGenerateMipmap is broken, causing a crash whenever its commands are flushed/submitted to the GPU. Ideally this would be fixed in a driver update, however it's unlikely this will happen. Earlier macOS versions have been receiving security updates for 2 years, and that window has just passed for 10.15. Further, computers with these GPUs can't upgrade to a newer macOS version. As a workaround, disable mipmaps on these GPUs, by setting the mipmap max level to 0 and not calling glGenerateMipmaps. Effects like depth of field also use mipmaps, but fill in the mip levels by other means. In those cases we keep the mipmap level. Differential Revision: https://developer.blender.org/D13295
This commit is contained in:
@@ -412,6 +412,12 @@ static void detect_workarounds()
|
||||
if (GLContext::debug_layer_support == false) {
|
||||
GLContext::debug_layer_workaround = true;
|
||||
}
|
||||
|
||||
/* Broken glGenerateMipmap on macOS 10.15.7 security update. */
|
||||
if (GPU_type_matches(GPU_DEVICE_INTEL, GPU_OS_MAC, GPU_DRIVER_ANY) &&
|
||||
strstr(renderer, "HD Graphics 4000")) {
|
||||
GLContext::generate_mipmap_workaround = true;
|
||||
}
|
||||
} // namespace blender::gpu
|
||||
|
||||
/** Internal capabilities. */
|
||||
@@ -436,6 +442,7 @@ bool GLContext::vertex_attrib_binding_support = false;
|
||||
/** Workarounds. */
|
||||
bool GLContext::debug_layer_workaround = false;
|
||||
bool GLContext::unused_fb_slot_workaround = false;
|
||||
bool GLContext::generate_mipmap_workaround = false;
|
||||
float GLContext::derivative_signs[2] = {1.0f, 1.0f};
|
||||
|
||||
void GLBackend::capabilities_init()
|
||||
|
||||
Reference in New Issue
Block a user