gpu/internal/vulkan: resize descriptor set pool correctly

Before this change, the resized descriptor set pool would never
increase, defeating the purpose of re-using pools.

References: https://todo.sr.ht/~eliasnaur/gio/375
Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2022-03-10 18:14:54 +01:00
parent b48b1270a3
commit c244b7c349
+1 -1
View File
@@ -691,9 +691,9 @@ func (p *descPool) bindDescriptorSet(b *Backend, cmdBuf vk.CommandBuffer, bindPo
if realloced {
panic("vulkan: vkAllocateDescriptorSet failed on a newly allocated descriptor pool")
}
newCap := p.cap * 2
destroyPool()
realloced = true
newCap := p.cap * 2
const initialPoolSize = 100
if newCap < initialPoolSize {
newCap = initialPoolSize