rendy icon indicating copy to clipboard operation
rendy copied to clipboard

rendy-descriptor tries to create a pool of size 0

Open kvark opened this issue 6 years ago • 6 comments

Reported in https://github.com/gfx-rs/wgpu-rs/issues/149

VALIDATION [VUID-VkDescriptorPoolCreateInfo-poolSizeCount-arraylength (0)] : vkCreateDescriptorPool: parameter pCreateInfo->poolSizeCount must be greater than 0. The Vulkan spec states: poolSizeCount must be greater than 0 (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-VkDescriptorPoolCreateInfo-poolSizeCount-arraylength) object info: (type: UNKNOWN, hndl: 0)

Way to reproduce:

git clone https://github.com/gfx-rs/wgpu-rs
cd wgpu-rs
cargo run --example hello-triangle

kvark avatar Jan 10 '20 15:01 kvark

Not just pool of size 0, but pool without any sizes. Each size is for different descriptor types. Which means that wgpu tries to allocate descriptor set without any descriptors.

zakarumych avatar Jan 14 '20 09:01 zakarumych

Doesn't Vulkan allow empty descriptor sets and layouts? In this code - https://github.com/gfx-rs/wgpu/issues/240#issue-461599114 , for example the validation layer doesn't complain about the descriptor set layout. Which means, from wgpu perspective this is a valid thing to ask Rendy, and rendy-descriptor should handle this and not try to allocate an empty pool.

kvark avatar Jan 14 '20 16:01 kvark

Is this bug fixed already? I am not able to reproduce

hbina@hbinalapt:~/git/wgpu-rs$ cargo run --example hello-triangle
    Finished dev [unoptimized + debuginfo] target(s) in 0.34s
     Running `target/debug/examples/hello-triangle`
hbina@hbinalapt:~/git/wgpu-rs$ 

hbina avatar May 27 '20 18:05 hbina

No, we changed the example to not do this any more

kvark avatar May 27 '20 18:05 kvark

So where should I look to fix this bug? The repository is enough.

hbina avatar May 31 '20 16:05 hbina

wgpu has switched to a fork of rendy libraries in https://github.com/gfx-rs/gfx-extras . You can reproduce it by running hello-triangle example in https://github.com/gfx-rs/wgpu-rs/commit/1e3b1a38fe599420f15741114ecd0fcdee8c43f3

kvark avatar May 31 '20 16:05 kvark