Add buffer_copy
method to RenderingDevice
#80424
Merged
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.
Includes a Vulkan implementation.
Direct buffer copies are required to perform certain operations more efficiently, as the only current alternative is to download the buffer to the CPU and upload it again.
As mentioned in #80414, the only alternative was to download the buffer to the CPU, which induces an extremely inefficient stall when all that is needed is to just copy the buffer directly on the GPU.
This PR should have no current effect in any rendering code whatsoever as nothing calls it yet. Once it is merged I can provide an implementation for multimesh that takes advantage of this new function to handle the resize path more efficiently.