mirror of
https://github.com/godotengine/godot.git
synced 2025-01-22 18:43:29 -05:00
cccd2432c3
In order to make CommandQueueMT more maintainable this PR changes the previous macro hell with variadic templates instead. This makes the class far more explicit and will allow us to more easily change the way the class functions in the future. Furthermore this refactoring has allowed for some optimizations. In particular by using std::forward to delay the decision of decaying the type to as late as possible we are able to move the data from the callsite into our Command buffer and later move it to the call. In practice what this means is that compared to the old version instead of copying values 3 times, we can now get away with 1 copy, and 1 move for lvalues, and just 2 moves for rvalues. This saves quite a few operations in a hot codepath. We also now test to make sure that the amount of copies and moves are what we expect. This way we can spot performance regressions in this code easily. Somewhat unscientifically, running TPS-demo by pressing enter and not touching the controls average mspf, repeatable across many runs: before: 6.467 after : 6.202 |
||
---|---|---|
.. | ||
alpha_stitch.glsl | ||
bc1.glsl | ||
bc4.glsl | ||
bc6h.glsl | ||
betsy_bc1.h | ||
config.py | ||
CrossPlatformSettings_piece_all.glsl | ||
image_compress_betsy.cpp | ||
image_compress_betsy.h | ||
register_types.cpp | ||
register_types.h | ||
SCsub | ||
UavCrossPlatform_piece_all.glsl |