[gtk+] vulkan: Reallocate descriptor sets
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] vulkan: Reallocate descriptor sets
- Date: Fri, 6 Jan 2017 17:10:54 +0000 (UTC)
commit e4d0459d52e4ce47815dbb06354848339e0f4d33
Author: Benjamin Otte <otte redhat com>
Date: Fri Jan 6 18:10:12 2017 +0100
vulkan: Reallocate descriptor sets
Because wee now reset the descriptor pool, we also need to reallocate
the descriptor sets.
gsk/gskvulkanrender.c | 27 ++++++++++++++-------------
1 files changed, 14 insertions(+), 13 deletions(-)
---
diff --git a/gsk/gskvulkanrender.c b/gsk/gskvulkanrender.c
index f510750..6c664ae 100644
--- a/gsk/gskvulkanrender.c
+++ b/gsk/gskvulkanrender.c
@@ -420,22 +420,23 @@ gsk_vulkan_render_prepare_descriptor_sets (GskVulkanRender *self,
self->n_descriptor_sets = needed_sets;
self->descriptor_sets = g_renew (VkDescriptorSet, self->descriptor_sets, needed_sets);
+ }
- VkDescriptorSetLayout *layouts = g_newa (VkDescriptorSetLayout, needed_sets);
- for (i = 0; i < needed_sets; i++)
- {
- layouts[i] = gsk_vulkan_pipeline_layout_get_descriptor_set_layout (self->layout);
- }
- GSK_VK_CHECK (vkAllocateDescriptorSets, device,
- &(VkDescriptorSetAllocateInfo) {
- .sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO,
- .descriptorPool = self->descriptor_pool,
- .descriptorSetCount = needed_sets,
- .pSetLayouts = layouts
- },
- self->descriptor_sets);
+ VkDescriptorSetLayout *layouts = g_newa (VkDescriptorSetLayout, needed_sets);
+ for (i = 0; i < needed_sets; i++)
+ {
+ layouts[i] = gsk_vulkan_pipeline_layout_get_descriptor_set_layout (self->layout);
}
+ GSK_VK_CHECK (vkAllocateDescriptorSets, device,
+ &(VkDescriptorSetAllocateInfo) {
+ .sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO,
+ .descriptorPool = self->descriptor_pool,
+ .descriptorSetCount = needed_sets,
+ .pSetLayouts = layouts
+ },
+ self->descriptor_sets);
+
g_hash_table_iter_init (&iter, self->descriptor_set_indexes);
while (g_hash_table_iter_next (&iter, &key, &value))
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]