Devsh-Graphics-Programming / Nabla

Vulkan, OptiX and CUDA Interoperation Modular Rendering Library and Framework for PC/Linux/Android
http://devsh.eu
Apache License 2.0
443 stars 48 forks source link

Remove _DYNAMIC descriptors and make descriptor bindings alway have the `UPDATE_AFTER_BIND_BIT` flag #694

Open devshgraphicsprogramming opened 2 months ago

devshgraphicsprogramming commented 2 months ago

Description

Bindings with UPDATE_AFTER_BIND_BIT and DYNAMIC SSBO and UBO are not allowed within the same Descriptor Set Layout.

The extra array of offsets during binding a set for DYNAMIC bindings is annoying unclear API. The way the offsets sum with the Descriptor Set's Buffer Range.

SSBOs are obsoleted by BDA anyway, and WHOLE_BUFFER never worked with dynamic offsets.

If we can have 500k UBOs which can be indexed, then we can create lots of bindings at different offsets to index instead of playing with dynamic offsets.

Also UPDATE_AFTER_BIND_BIT relaxes external synchronization requirements, making descrptor sets more thread safe.