Allocate light data UBO from per-frame allocator, misc. fixes and cleanup #5970
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.
Another general collection of "fix" commits.
This PR adds additional profiling information to the renderer, and resolves an "early serialization" point which required the previous frame's rendering to be ~mostly complete before starting to record commands for the current frame.
I don't expect any significant performance increase from this PR, except in the case of extremely GPU-bound devices where you might see an improvement of up to a few milliseconds in frame-time, as more CPU work is able to be overlapped with the previous frame's GPU execution time.
This change does fully enforce the existing invariant that you must call
Renderer::SetLights()
before attempting to record a draw command using a lit material. An assertion will be thrown in debug mode if this invariant is broken.It also fixes #5940 - turned out to be quite a simple one-liner once I realized what the problem was.