mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-07 10:25:37 +00:00
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 {
|
if realloced {
|
||||||
panic("vulkan: vkAllocateDescriptorSet failed on a newly allocated descriptor pool")
|
panic("vulkan: vkAllocateDescriptorSet failed on a newly allocated descriptor pool")
|
||||||
}
|
}
|
||||||
|
newCap := p.cap * 2
|
||||||
destroyPool()
|
destroyPool()
|
||||||
realloced = true
|
realloced = true
|
||||||
newCap := p.cap * 2
|
|
||||||
const initialPoolSize = 100
|
const initialPoolSize = 100
|
||||||
if newCap < initialPoolSize {
|
if newCap < initialPoolSize {
|
||||||
newCap = initialPoolSize
|
newCap = initialPoolSize
|
||||||
|
|||||||
Reference in New Issue
Block a user