vblanco20-1 / vkguide-comments

Storage for the comments of vulkan-guide
0 stars 0 forks source link

Descriptor Abstraction Comments #11

Open utterances-bot opened 2 years ago

utterances-bot commented 2 years ago

A thin abstraction for descriptor sets - Vulkan Guide

Practical guide to vulkan graphics programming

https://www.vkguide.dev/docs/extra-chapter/abstracting_descriptors/

Siguantu commented 2 years ago

Thank you for this chapter! Just a small detail - If I'm not mistaken, you should use the new pool when the first allocation fails in DescriptorAllocator::allocate() (?) -

// ...
if (needReallocate) {
    currentPool = grab_pool();
    usedPools.push_back(currentPool);
    allocInfo.descriptorPool = currentPool; // <------

    allocResult = vkAllocateDescriptorSets(device, &allocInfo, set);
// ...
IAmNotHanni commented 1 year ago

Hey there. Thanks for the tutorial. Small typos: "go trhough all", "bulding the descriptor set".

IAmNotHanni commented 1 year ago

I think your builder class needs to .clear() the writes after building, otherwise the following uses of that instance of the builder will not work.