@@ -691,7 +691,7 @@ radv_descriptor_set_create(struct radv_device *device, struct radv_descriptor_po
691691 pool -> entries [pool -> entry_count ].size = layout_size ;
692692 pool -> entries [pool -> entry_count ].set = set ;
693693 } else {
694- pool -> layouts [pool -> entry_count ] = layout ;
694+ pool -> sets [pool -> entry_count ] = set ;
695695 }
696696
697697 pool -> current_offset += layout_size ;
@@ -775,7 +775,8 @@ radv_destroy_descriptor_pool(struct radv_device *device, const VkAllocationCallb
775775 }
776776 } else {
777777 for (uint32_t i = 0 ; i < pool -> entry_count ; ++ i ) {
778- vk_descriptor_set_layout_unref (& device -> vk , & pool -> layouts [i ]-> vk );
778+ vk_descriptor_set_layout_unref (& device -> vk , & pool -> sets [i ]-> header .layout -> vk );
779+ vk_object_base_finish (& pool -> sets [i ]-> header .base );
779780 }
780781 }
781782
@@ -881,15 +882,15 @@ radv_create_descriptor_pool(struct radv_device *device, const VkDescriptorPoolCr
881882 bo_size += 16 * MIN2 (num_16byte_descriptors , pCreateInfo -> maxSets );
882883 }
883884
884- uint64_t layouts_size = 0 ;
885+ uint64_t sets_size = 0 ;
885886
886887 if (!(pCreateInfo -> flags & VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT )) {
887888 size += pCreateInfo -> maxSets * sizeof (struct radv_descriptor_set );
888889 size += sizeof (struct radeon_winsys_bo * ) * bo_count ;
889890 size += sizeof (struct radv_descriptor_range ) * range_count ;
890891
891- layouts_size = sizeof (struct radv_descriptor_set_layout * ) * pCreateInfo -> maxSets ;
892- size += layouts_size ;
892+ sets_size = sizeof (struct radv_descriptor_set * ) * pCreateInfo -> maxSets ;
893+ size += sets_size ;
893894 } else {
894895 size += sizeof (struct radv_descriptor_pool_entry ) * pCreateInfo -> maxSets ;
895896 }
@@ -903,7 +904,7 @@ radv_create_descriptor_pool(struct radv_device *device, const VkDescriptorPoolCr
903904 vk_object_base_init (& device -> vk , & pool -> base , VK_OBJECT_TYPE_DESCRIPTOR_POOL );
904905
905906 if (!(pCreateInfo -> flags & VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT )) {
906- pool -> host_memory_base = (uint8_t * )pool + sizeof (struct radv_descriptor_pool ) + layouts_size ;
907+ pool -> host_memory_base = (uint8_t * )pool + sizeof (struct radv_descriptor_pool ) + sets_size ;
907908 pool -> host_memory_ptr = pool -> host_memory_base ;
908909 pool -> host_memory_end = (uint8_t * )pool + size ;
909910 }
@@ -975,7 +976,8 @@ radv_ResetDescriptorPool(VkDevice _device, VkDescriptorPool descriptorPool, VkDe
975976 }
976977 } else {
977978 for (uint32_t i = 0 ; i < pool -> entry_count ; ++ i ) {
978- vk_descriptor_set_layout_unref (& device -> vk , & pool -> layouts [i ]-> vk );
979+ vk_descriptor_set_layout_unref (& device -> vk , & pool -> sets [i ]-> header .layout -> vk );
980+ vk_object_base_finish (& pool -> sets [i ]-> header .base );
979981 }
980982 }
981983
0 commit comments