aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2022-11-30 18:02:38 +0100
committerAlexander Orzechowski <alex@ozal.ski>2022-12-02 18:28:55 +0000
commit47a038c90e95918f9e0292c6fb34b254c51d8570 (patch)
tree57cce45417fbec6afe995d8c8dc56d0547c6b43e
parent4b3bbb0c4fc5e7aa09509abb751cff0b55fc11b2 (diff)
render/vulkan: move VkDescriptorSetAllocateInfo down
Move it down, right before it's used.
-rw-r--r--render/vulkan/renderer.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/render/vulkan/renderer.c b/render/vulkan/renderer.c
index cbd7606c..3721d466 100644
--- a/render/vulkan/renderer.c
+++ b/render/vulkan/renderer.c
@@ -88,11 +88,6 @@ static void mat3_to_mat4(const float mat3[9], float mat4[4][4]) {
struct wlr_vk_descriptor_pool *vulkan_alloc_texture_ds(
struct wlr_vk_renderer *renderer, VkDescriptorSet *ds) {
VkResult res;
- VkDescriptorSetAllocateInfo ds_info = {
- .sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO,
- .descriptorSetCount = 1,
- .pSetLayouts = &renderer->ds_layout,
- };
bool found = false;
struct wlr_vk_descriptor_pool *pool;
@@ -140,7 +135,12 @@ struct wlr_vk_descriptor_pool *vulkan_alloc_texture_ds(
wl_list_insert(&renderer->descriptor_pools, &pool->link);
}
- ds_info.descriptorPool = pool->pool;
+ VkDescriptorSetAllocateInfo ds_info = {
+ .sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO,
+ .descriptorSetCount = 1,
+ .pSetLayouts = &renderer->ds_layout,
+ .descriptorPool = pool->pool,
+ };
res = vkAllocateDescriptorSets(renderer->dev->dev, &ds_info, ds);
if (res != VK_SUCCESS) {
wlr_vk_error("vkAllocateDescriptorSets", res);