mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-04-13 05:43:18 -07:00
vkd3d: Validate image views before creating framebuffers.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
fd48757d25
commit
a844d8f0a8
@ -1858,6 +1858,7 @@ static bool d3d12_command_list_update_current_framebuffer(struct d3d12_command_l
|
|||||||
struct VkFramebufferCreateInfo fb_desc;
|
struct VkFramebufferCreateInfo fb_desc;
|
||||||
VkFramebuffer vk_framebuffer;
|
VkFramebuffer vk_framebuffer;
|
||||||
size_t start_idx = 0;
|
size_t start_idx = 0;
|
||||||
|
unsigned int i;
|
||||||
VkResult vr;
|
VkResult vr;
|
||||||
|
|
||||||
if (list->current_framebuffer != VK_NULL_HANDLE)
|
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)
|
if (!list->state->u.graphics.rt_idx)
|
||||||
++start_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.sType = VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO;
|
||||||
fb_desc.pNext = NULL;
|
fb_desc.pNext = NULL;
|
||||||
fb_desc.flags = 0;
|
fb_desc.flags = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user