forked from joejulian/gio
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user