amethyst/rendy

rendy-descriptor tries to create a pool of size 0

kvark opened this issue · 6 comments

kvark commented

Reported in gfx-rs/wgpu-rs#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

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.

kvark commented

Doesn't Vulkan allow empty descriptor sets and layouts? In this code - gfx-rs/wgpu#240 (comment) , 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.

hbina commented

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$ 
kvark commented

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

hbina commented

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

kvark commented

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 gfx-rs/wgpu-rs@1e3b1a3