From abdb682d379ff84ac6169410ecb447dd200dacc1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Foucault?= Date: Thu, 16 Oct 2025 19:24:55 +0200 Subject: [PATCH] Fix #141198: EEVEE: DOF is incorrect at low resolutions on AMD + Mesa Caused by some driver synchronization bug. Also fixes #147879. --- source/blender/draw/engines/eevee/eevee_depth_of_field.cc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/source/blender/draw/engines/eevee/eevee_depth_of_field.cc b/source/blender/draw/engines/eevee/eevee_depth_of_field.cc index 338ad52a0bc..95e2701e0ca 100644 --- a/source/blender/draw/engines/eevee/eevee_depth_of_field.cc +++ b/source/blender/draw/engines/eevee/eevee_depth_of_field.cc @@ -728,6 +728,14 @@ void DepthOfField::render(View &view, scatter_fb.ensure(GPU_ATTACHMENT_NONE, GPU_ATTACHMENT_TEXTURE(color_tx.current())); + if (GPU_type_matches_ex( + GPU_DEVICE_ATI, GPU_OS_UNIX, GPU_DRIVER_OPENSOURCE, GPU_BACKEND_OPENGL)) + { + /* WORKAROUND(fclem): Mesa has some synchronization issues between the previous compute + * shader and the following graphic pass (see #141198). */ + GPU_flush(); + } + GPU_framebuffer_bind(scatter_fb); drw.submit(scatter_ps, view);