mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
vkd3d: Check for mutable descriptor set allocation failure in d3d12_descriptor_heap_create_descriptor_set().
This commit is contained in:
parent
f090d1e80d
commit
ae25c80498
Notes:
Alexandre Julliard
2024-05-27 23:14:17 +02:00
Approved-by: Giovanni Mascellani (@giomasce) Approved-by: Henri Verbeet (@hverbeet) Approved-by: Alexandre Julliard (@julliard) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/882
@ -4284,12 +4284,14 @@ static HRESULT d3d12_descriptor_heap_create_descriptor_set(struct d3d12_descript
|
|||||||
VkDescriptorSetVariableDescriptorCountAllocateInfoEXT set_size;
|
VkDescriptorSetVariableDescriptorCountAllocateInfoEXT set_size;
|
||||||
VkDescriptorSetAllocateInfo set_desc;
|
VkDescriptorSetAllocateInfo set_desc;
|
||||||
VkResult vr;
|
VkResult vr;
|
||||||
|
HRESULT hr;
|
||||||
|
|
||||||
if (!device->vk_descriptor_heap_layouts[set].vk_set_layout)
|
if (!device->vk_descriptor_heap_layouts[set].vk_set_layout)
|
||||||
{
|
{
|
||||||
/* Set 0 uses mutable descriptors, and this set is unused. */
|
/* Set 0 uses mutable descriptors, and this set is unused. */
|
||||||
if (!descriptor_heap->vk_descriptor_sets[0].vk_set)
|
if (!descriptor_heap->vk_descriptor_sets[0].vk_set
|
||||||
d3d12_descriptor_heap_create_descriptor_set(descriptor_heap, device, 0);
|
&& FAILED(hr = d3d12_descriptor_heap_create_descriptor_set(descriptor_heap, device, 0)))
|
||||||
|
return hr;
|
||||||
descriptor_set->vk_set = descriptor_heap->vk_descriptor_sets[0].vk_set;
|
descriptor_set->vk_set = descriptor_heap->vk_descriptor_sets[0].vk_set;
|
||||||
descriptor_set->vk_type = device->vk_descriptor_heap_layouts[set].type;
|
descriptor_set->vk_type = device->vk_descriptor_heap_layouts[set].type;
|
||||||
return S_OK;
|
return S_OK;
|
||||||
|
Loading…
Reference in New Issue
Block a user