Open asuessenbach opened 1 month ago
Could you add some comments to the allocated class? I'm having a hard time understand what it does and why we need it (instead of e.g. simply using a buffer class). Having some comment for the class would make things easier to understand.
Could you add some comments to the allocated class?
I think, I have not removed any comment for this class. Maybe @jherico can add some comments, as he introduced that class with #906.
Yeah, that class never was properly commented, so it's up to the original author. As someone who is not doing C++ on a professional basis it's getting harder and harder for me to understand and use the framework, and having proper code comments would really help.
I can create a PR improving the comments for the the allocated class and it's children. Should I create it against the main branch or against your branch @asuessenbach ?
@jherico Would be great, if you would comment against my branch. But commenting against main would be ok as well, I'd rebase my PR then.
@asuessenbach so, the purpose behind breaking up Allocated
and AllocatedBase
was that AllocatedBase
wasn't templated and therefore most of the implementation could be put in the CPP file. This was beneficial when I was working on this code base because modifying ANYTHING in the class triggered a rebuild of basically everything else in the project.
If AllocatedBase
is going to require a template argument and therefore have its implementation line in the header, there's no real reason to have it a distinct class from Allocated
.
I can try to merge the two classes in the header in my PR, or I can just leave it as is (likely with a note in the AllocatedBase
class description that the original reason for the distinction is gone and some future work could be done to merge them.
I also see the builder base class has been moved to its own file, but even in that file it should probably still be in the allocated
namespace since many of the methods are still very much tied to the VMA. If the intent is to use the builder pattern elsewhere with additional Vulkan types, then it should be broken into multiple classes, one of which should be focused on the VMA allocated resources and remain in the allocated
namespace.
I can try to merge the two classes in the header in my PR
Would be great, if you would. But that could also be done after this PR has been merged.
I also see the builder base class has been moved to its own file, but even in that file it should probably still be in the allocated namespace since many of the methods are still very much tied to the VMA
If you think, it's worth to move the builder base class into the allocated
namespace, I'm fine with it.
Description
Next class unified between C- and C++-bindings.
Build tested on Win10 with VS2022. Run tested on Win10 with NVidia GPU.
General Checklist:
Please ensure the following points are checked:
[x] This PR describes the scope and expected impact of the changes I am making
Note: The Samples CI runs a number of checks including:
If this PR contains framework changes:
batch
command line argument to make sure all samples still work properlySample Checklist
If your PR contains a new or modified sample, these further checks must be carried out in addition to the General Checklist: