=?UTF-8?Q?J=C3=B3zef=20Kucia=20?=: vkd3d: Validate image views before creating framebuffers.

Alexandre Julliard julliard at winehq.org
Thu Mar 7 16:20:51 CST 2019


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

Author: Józef Kucia <jkucia at codeweavers.com>
Date:   Thu Mar  7 11:01:13 2019 +0100

vkd3d: Validate image views before creating framebuffers.

Signed-off-by: Józef Kucia <jkucia at codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 libs/vkd3d/command.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/libs/vkd3d/command.c b/libs/vkd3d/command.c
index 4999280..e535f20 100644
--- a/libs/vkd3d/command.c
+++ b/libs/vkd3d/command.c
@@ -1858,6 +1858,7 @@ static bool d3d12_command_list_update_current_framebuffer(struct d3d12_command_l
     struct VkFramebufferCreateInfo fb_desc;
     VkFramebuffer vk_framebuffer;
     size_t start_idx = 0;
+    unsigned int i;
     VkResult vr;
 
     if (list->current_framebuffer != VK_NULL_HANDLE)
@@ -1866,6 +1867,15 @@ static bool d3d12_command_list_update_current_framebuffer(struct d3d12_command_l
     if (!list->state->u.graphics.rt_idx)
         ++start_idx;
 
+    for (i = 0; i < list->state->u.graphics.attachment_count; ++i)
+    {
+        if (!list->views[start_idx + i])
+        {
+            FIXME("Invalid attachment %u.\n", i);
+            return false;
+        }
+    }
+
     fb_desc.sType = VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO;
     fb_desc.pNext = NULL;
     fb_desc.flags = 0;




More information about the wine-cvs mailing list