Fabian Maurer : wined3d: Unbind currently bound FBOs before dispatching compute shaders.

Alexandre Julliard julliard at winehq.org
Mon Dec 4 14:58:21 CST 2017


Module: wine
Branch: master
Commit: 0d45106054b8fedd8b05bada8e0e589c11bf6375
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=0d45106054b8fedd8b05bada8e0e589c11bf6375

Author: Fabian Maurer <dark.shadow4 at web.de>
Date:   Mon Dec  4 17:30:24 2017 +0330

wined3d: Unbind currently bound FBOs before dispatching compute shaders.

Many thanks to Matias N. Goldberg and Philip Rebohle for investigating and
solving the bug!

Signed-off-by: Fabian Maurer <dark.shadow4 at web.de>
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/wined3d/context.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
index 8af9e4b..23f63aa 100644
--- a/dlls/wined3d/context.c
+++ b/dlls/wined3d/context.c
@@ -4013,6 +4013,16 @@ void context_apply_compute_state(struct wined3d_context *context,
         context->update_unordered_access_view_bindings = 1;
     }
 
+    /* Updates to currently bound render targets aren't necessarily coherent
+     * between the graphics and compute pipelines. Unbind any currently bound
+     * FBO here to ensure preceding updates to its attachments by the graphics
+     * pipeline are visible to the compute pipeline.
+     *
+     * Without this, the bloom effect in Nier:Automata is too bright on the
+     * Mesa radeonsi driver, and presumably on other Mesa based drivers. */
+    context_bind_fbo(context, GL_FRAMEBUFFER, 0);
+    context_invalidate_state(context, STATE_FRAMEBUFFER);
+
     context->last_was_blit = FALSE;
 }
 




More information about the wine-cvs mailing list