vkd3d: Add asserts() for root descriptor indices.

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:
Józef Kucia 2018-10-17 17:59:33 +02:00 committed by Alexandre Julliard
parent 35ead5825d
commit 5a2dc97a5a

View File

@ -3405,6 +3405,7 @@ static void d3d12_command_list_set_root_cbv(struct d3d12_command_list *list,
root_parameter, bindings->descriptor_set, NULL, &buffer_info); root_parameter, bindings->descriptor_set, NULL, &buffer_info);
VK_CALL(vkUpdateDescriptorSets(list->device->vk_device, 1, &descriptor_write, 0, NULL)); VK_CALL(vkUpdateDescriptorSets(list->device->vk_device, 1, &descriptor_write, 0, NULL));
assert(index < ARRAY_SIZE(bindings->push_descriptors));
bindings->push_descriptors[index].u.cbv.vk_buffer = buffer_info.buffer; bindings->push_descriptors[index].u.cbv.vk_buffer = buffer_info.buffer;
bindings->push_descriptors[index].u.cbv.offset = buffer_info.offset; bindings->push_descriptors[index].u.cbv.offset = buffer_info.offset;
bindings->push_descriptor_dirty_mask |= 1u << index; bindings->push_descriptor_dirty_mask |= 1u << index;
@ -3478,6 +3479,7 @@ static void d3d12_command_list_set_root_descriptor(struct d3d12_command_list *li
root_parameter, bindings->descriptor_set, &vk_buffer_view, NULL); root_parameter, bindings->descriptor_set, &vk_buffer_view, NULL);
VK_CALL(vkUpdateDescriptorSets(list->device->vk_device, 1, &descriptor_write, 0, NULL)); VK_CALL(vkUpdateDescriptorSets(list->device->vk_device, 1, &descriptor_write, 0, NULL));
assert(index < ARRAY_SIZE(bindings->push_descriptors));
bindings->push_descriptors[index].u.vk_buffer_view = vk_buffer_view; bindings->push_descriptors[index].u.vk_buffer_view = vk_buffer_view;
bindings->push_descriptor_dirty_mask |= 1u << index; bindings->push_descriptor_dirty_mask |= 1u << index;
bindings->push_descriptor_active_mask |= 1u << index; bindings->push_descriptor_active_mask |= 1u << index;