mirror of
				https://gitlab.freedesktop.org/wlroots/wlroots.git
				synced 2025-11-03 09:01:40 -05:00 
			
		
		
		
	render/vulkan: increase next descriptor pool size
This ensures that the pool sizes grow exponentially, making the number of pools needed logarithmic in the number of descriptors, instead of linear. Since the first pool's size is 256, this change only has an effect when the compositor creates a large number of textures.
This commit is contained in:
		
							parent
							
								
									d933f5204b
								
							
						
					
					
						commit
						e6fc5d1e49
					
				
					 1 changed files with 2 additions and 1 deletions
				
			
		| 
						 | 
					@ -107,7 +107,7 @@ struct wlr_vk_descriptor_pool *vulkan_alloc_texture_ds(
 | 
				
			||||||
			return NULL;
 | 
								return NULL;
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		size_t count = renderer->last_pool_size;
 | 
							size_t count = 2 * renderer->last_pool_size;
 | 
				
			||||||
		if (!count) {
 | 
							if (!count) {
 | 
				
			||||||
			count = start_descriptor_pool_size;
 | 
								count = start_descriptor_pool_size;
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
| 
						 | 
					@ -134,6 +134,7 @@ struct wlr_vk_descriptor_pool *vulkan_alloc_texture_ds(
 | 
				
			||||||
			return NULL;
 | 
								return NULL;
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							renderer->last_pool_size = count;
 | 
				
			||||||
		wl_list_insert(&renderer->descriptor_pools, &pool->link);
 | 
							wl_list_insert(&renderer->descriptor_pools, &pool->link);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue