Merge pull request #2768 from Themaister/master

Vulkan: Allocate correct number of descriptors.
This commit is contained in:
Twinaphex 2016-03-01 14:28:41 +01:00
commit 89bcdeaf0b
3 changed files with 7 additions and 7 deletions

View File

@ -341,8 +341,8 @@ static void init_descriptor(void)
binding.stageFlags = VK_SHADER_STAGE_VERTEX_BIT;
binding.pImmutableSamplers = NULL;
static const VkDescriptorPoolSize pool_sizes[1] = {
{ VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, 1 },
const VkDescriptorPoolSize pool_sizes[1] = {
{ VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, vk.num_swapchain_images },
};
VkDescriptorSetLayoutCreateInfo set_layout_info = { VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO };

View File

@ -454,8 +454,8 @@ static void vulkan_init_descriptor_pool(vk_t *vk)
VkDescriptorPoolCreateInfo pool_info = {
VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO };
static const VkDescriptorPoolSize pool_sizes[2] = {
{ VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, 1 },
{ VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, 1 },
{ VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, VULKAN_DESCRIPTOR_MANAGER_BLOCK_SETS },
{ VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, VULKAN_DESCRIPTOR_MANAGER_BLOCK_SETS },
};
for (i = 0; i < vk->num_swapchain_images; i++)

View File

@ -693,9 +693,9 @@ bool Pass::init_pipeline_layout()
VK_SHADER_STAGE_FRAGMENT_BIT,
nullptr });
desc_counts.push_back({ VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, 1 });
desc_counts.push_back({ VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, 1 });
desc_counts.push_back({ VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, 1 });
desc_counts.push_back({ VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, num_sync_indices });
desc_counts.push_back({ VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, num_sync_indices });
desc_counts.push_back({ VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, num_sync_indices });
VkDescriptorSetLayoutCreateInfo set_layout_info = {
VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO };