-
Notifications
You must be signed in to change notification settings - Fork 358
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Write a new test which covers 'advanced data uploading' from docs #433
Comments
I like the idea of adding this test. I found few issues with the proposed code: Major issues: You test uniform, vertex, and index buffer, but inside the lambda function you always transition to You use flags Minor issues: myData[index] = static_cast<uint32_t>(rand());
VkBuffer uniformBuffer = VK_NULL_HANDLE;
VmaAllocation uniformBufferAlloc{}; You initialize one with
|
Alright I will add your fixes and open a pull request. I think it's somehow possible to label this test as a doxygen "\snippet" so it can be referenced in the docs instead of the commented code. This way, we display real code which is working in the docs and avoid unnecessary duplicates. I will look into this. |
I still have some problems to understand which combination of
|
It depends on what do you want to test or demonstrate with your code. The sample code from "Advanced data uploading" documentation chapter demonstrate the usage of I think it doesn't make much sense to test uniform / vertex / index buffer, as they are all very similar, differ only by buffer I recommend to maybe go with a single usage (e.g. uniform buffer) but write 3 separate tests:
What do you think? |
I agree, I write the tests that way. |
In my opinion, it would be better to have a test which covers the topic of advanced data uploading in detail. The current sample code from the docs still has the following issues:
I think programmers could learn a lot a test that covers most common cases (vertex, index, and uniform buffer maybe?), especially when it comes to correct barrier placement. The benefit of such a test would be that we can run it with synchronization validation layers to ensure the barriers are correct. This would give new programmers a good, safe code to use as reference.
I propose to add the following test in
Tests.cpp
:This code works on NVIDIA RTX 3090, AMD Ryzen™ 9 7950X, and Intel Arc A770 without validation warnings or errors for
TestAdvancedDataUploading
.The text was updated successfully, but these errors were encountered: