Add new tests for advanced data uploading#474
Merged
adam-sawicki-a merged 2 commits intoGPUOpen-LibrariesAndSDKs:masterfrom Apr 1, 2025
IAmNotHanni:master
Merged
Add new tests for advanced data uploading#474adam-sawicki-a merged 2 commits intoGPUOpen-LibrariesAndSDKs:masterfrom IAmNotHanni:master
adam-sawicki-a merged 2 commits intoGPUOpen-LibrariesAndSDKs:masterfrom
IAmNotHanni:master
Conversation
adam-sawicki-a
suggested changes
Apr 1, 2025
Contributor
adam-sawicki-a
left a comment
There was a problem hiding this comment.
Thank you for adding these tests. I'm happy to merge when the issues I posted as comments are fixed.
Contributor
Author
Contributor
|
Thank you for this contribution! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #433
What do you think? The new tests don't show any validation layer warnigns or errors on my system.
I still need to find a way to link the code in the doxygen documentation, but that's for another pr.
I still have some questions:
In
TestDataUploadingWithStagingBuffer, I explicitely check if the memory did not end up in mappable memory withTEST(!(memPropFlags & VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT));. Does this make sense like this? Because if this is not true, it would be a bug in vma, right? (The same argument is forTEST(memPropFlags & VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT);inTestDataUploadingWithMappedMemory).Besides
vmaFlushAllocation, should we maybe also mention in a comment that the user needs to callvmaInvalidateAllocationif reading from gpu -> cpu is the desired use case?In theory, we could abstract
TestAdvancedDataUploadinginto a function (as I did with the lambda in the ticket here) so we have less duplicate code. The functionsTestDataUploadingWithMappedMemoryandTestDataUploadingWithStagingBufferwould then call that function with the flags required. While this leads to less code, I am not sure if it would be easier for beginners to understand.Also, I think it would be worth mentioning in the docs that both
vmaFlushAllocationandvmaInvalidateAllocationcheck internally if the memory isVK_MEMORY_PROPERTY_HOST_COHERENT_BIT, meaning we don't need to check for manually this when calling these functionsDo we need some additional tests if the data uploading was successful?
Johannes