godot/modules/betsy
HP van Braam cccd2432c3 Refactor CommandQueueMT to use vararg templates
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
2025-01-02 15:35:08 +01:00
..
alpha_stitch.glsl Betsy: Add BC3 and BC5 support 2024-11-27 12:27:05 +01:00
bc1.glsl Betsy: Add caching and BC1 compression support 2024-09-11 23:48:29 +02:00
bc4.glsl Betsy: Implement BC4 compression 2024-09-22 10:16:37 +02:00
bc6h.glsl Betsy: Add signed mode for BC6 2024-09-02 09:49:14 +02:00
betsy_bc1.h Betsy: Add caching and BC1 compression support 2024-09-11 23:48:29 +02:00
config.py
CrossPlatformSettings_piece_all.glsl Style: Add 19.1.0 LLVM options to .clang-format 2024-11-22 09:24:32 -06:00
image_compress_betsy.cpp Betsy: Fix stack-use-after-scope when using BC3 and BC5 2024-12-19 08:42:21 +08:00
image_compress_betsy.h Refactor CommandQueueMT to use vararg templates 2025-01-02 15:35:08 +01:00
register_types.cpp Betsy: Add caching and BC1 compression support 2024-09-11 23:48:29 +02:00
register_types.h
SCsub Betsy: Add BC3 and BC5 support 2024-11-27 12:27:05 +01:00
UavCrossPlatform_piece_all.glsl Style: Add 19.1.0 LLVM options to .clang-format 2024-11-22 09:24:32 -06:00