Revert "libs/vkd3d: Skip unbound UAV counters."

This reverts commit d9bc635d1a.

We should not need to handle this invalid behavior. It was triggered
by the bug in d3d12_command_list_update_descriptor_table().
This commit is contained in:
Józef Kucia 2017-09-11 22:35:16 +02:00
parent 1cde37d341
commit a78fe60ef8

View File

@ -1918,7 +1918,7 @@ static void d3d12_command_list_update_uav_counter_descriptors(struct d3d12_comma
VkDescriptorSet vk_descriptor_set;
VkDescriptorPoolSize pool_size;
unsigned int uav_counter_count;
unsigned int i, j;
unsigned int i;
if (!state || !(state->uav_counter_mask & bindings->uav_counter_dirty_mask))
return;
@ -1933,31 +1933,26 @@ static void d3d12_command_list_update_uav_counter_descriptors(struct d3d12_comma
if (!(vk_descriptor_writes = vkd3d_calloc(uav_counter_count, sizeof(*vk_descriptor_writes))))
return;
for (i = 0, j = 0; i < uav_counter_count; ++i)
for (i = 0; i < uav_counter_count; ++i)
{
const struct vkd3d_shader_uav_counter_binding *uav_counter = &state->uav_counters[i];
const VkBufferView *vk_uav_counter_views = bindings->vk_uav_counter_views;
if (!vk_uav_counter_views[uav_counter->register_index])
{
FIXME("UAV counter %u descriptor is not initialized.\n", uav_counter->register_index);
continue;
}
assert(vk_uav_counter_views[uav_counter->register_index]);
vk_descriptor_writes[j].sType = VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET;
vk_descriptor_writes[j].pNext = NULL;
vk_descriptor_writes[j].dstSet = vk_descriptor_set;
vk_descriptor_writes[j].dstBinding = uav_counter->binding.binding;
vk_descriptor_writes[j].dstArrayElement = 0;
vk_descriptor_writes[j].descriptorCount = 1;
vk_descriptor_writes[j].descriptorType = pool_size.type;
vk_descriptor_writes[j].pImageInfo = NULL;
vk_descriptor_writes[j].pBufferInfo = NULL;
vk_descriptor_writes[j].pTexelBufferView = &vk_uav_counter_views[uav_counter->register_index];
++j;
vk_descriptor_writes[i].sType = VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET;
vk_descriptor_writes[i].pNext = NULL;
vk_descriptor_writes[i].dstSet = vk_descriptor_set;
vk_descriptor_writes[i].dstBinding = uav_counter->binding.binding;
vk_descriptor_writes[i].dstArrayElement = 0;
vk_descriptor_writes[i].descriptorCount = 1;
vk_descriptor_writes[i].descriptorType = pool_size.type;
vk_descriptor_writes[i].pImageInfo = NULL;
vk_descriptor_writes[i].pBufferInfo = NULL;
vk_descriptor_writes[i].pTexelBufferView = &vk_uav_counter_views[uav_counter->register_index];
}
VK_CALL(vkUpdateDescriptorSets(vk_device, j, vk_descriptor_writes, 0, NULL));
VK_CALL(vkUpdateDescriptorSets(vk_device, uav_counter_count, vk_descriptor_writes, 0, NULL));
vkd3d_free(vk_descriptor_writes);
VK_CALL(vkCmdBindDescriptorSets(list->vk_command_buffer, bind_point,