Henri Verbeet : wined3d: Always include any depth/stencil attachment in the Vulkan framebuffer.

Alexandre Julliard julliard at winehq.org
Thu Jan 21 16:19:15 CST 2021


Module: wine
Branch: master
Commit: a3f829bbb8894410c7e2e5f909ef37415c33deac
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=a3f829bbb8894410c7e2e5f909ef37415c33deac

Author: Henri Verbeet <hverbeet at codeweavers.com>
Date:   Thu Jan 21 10:55:51 2021 +0100

wined3d: Always include any depth/stencil attachment in the Vulkan framebuffer.

Analogous to the GL backend. The alternative would be to potentially
invalidate STATE_FRAMEBUFFER when changing the depth/stencil state object,
which doesn't seem worth it.

Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/wined3d/context_vk.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/wined3d/context_vk.c b/dlls/wined3d/context_vk.c
index 04d24ba163a..b8414155dc0 100644
--- a/dlls/wined3d/context_vk.c
+++ b/dlls/wined3d/context_vk.c
@@ -2174,7 +2174,7 @@ static bool wined3d_context_vk_begin_render_pass(struct wined3d_context_vk *cont
         ++attachment_count;
     }
 
-    if (wined3d_state_uses_depth_buffer(state) && (view = state->fb.depth_stencil))
+    if ((view = state->fb.depth_stencil))
     {
         rtv_vk = wined3d_rendertarget_view_vk(view);
         vk_views[attachment_count] = wined3d_rendertarget_view_vk_get_image_view(rtv_vk, context_vk);
@@ -2191,7 +2191,7 @@ static bool wined3d_context_vk_begin_render_pass(struct wined3d_context_vk *cont
     }
 
     if (!(context_vk->vk_render_pass = wined3d_context_vk_get_render_pass(context_vk, &state->fb,
-            ARRAY_SIZE(state->fb.render_targets), wined3d_state_uses_depth_buffer(state), 0)))
+            ARRAY_SIZE(state->fb.render_targets), !!state->fb.depth_stencil, 0)))
     {
         ERR("Failed to get render pass.\n");
         return false;




More information about the wine-cvs mailing list