NcStudios / NcEngine

NcEngine: 3D game engine written in modern C++ and Vulkan
https://ncstudios.itch.io/
MIT License
50 stars 2 forks source link

Expand support for lower-end hardware. #458

Open jaremieromer opened 12 months ago

jaremieromer commented 12 months ago

Lower end and older GPU drivers do not support having unbound arrays in shaders.

layout(std140, set=0, binding = 0) readonly buffer ObjectBuffer
{
    ObjectData objects[];
} objectBuffer;

This is due to lacking the following indexing extensions: RuntimeDescriptorArray DescriptorBindingPartiallyBound

The fix is to allow for devices that do not support these extensions to use an alternate flow:

-new descriptor set with descriptors that do not have the vk::DescriptorBindingFlagBitsEXT::ePartiallyBound flag set -new descriptor pool without vk::DescriptorPoolCreateFlagBits::eUpdateAfterBind. -shaders all have arrays declared with hardcoded max. ... possibly more.

The following branch: https://github.com/NcStudios/NcEngine/tree/jare-add-support-for-lower-end-hardware has begun the work to support this.

jaremieromer commented 9 months ago

This is fixed in the dev-game-jam branch. #515