diff options
| author | lizzie <lizzie@eden-emu.dev> | 2026-03-06 15:05:05 +0100 |
|---|---|---|
| committer | crueter <crueter@eden-emu.dev> | 2026-03-06 15:05:05 +0100 |
| commit | 2ed1328c93c4739c069e7a284cb82b0a72762dac (patch) | |
| tree | a0cf86adc435eb4b3b3aab8f4dff1617a112f939 /src/video_core/buffer_cache | |
| parent | c70b857c4f8324621c3d3f7dfe659856c8000878 (diff) | |
[vk] use static_vector instead of small_vector for TFB and other bindings (#3641)
MK8D is a big offender, taking up lots of time memcpy'ing and memmov'ing small_vector<> AND to add salt to the wound it doesn't even do heap allocations (no game does I think) - so basically useless waste of compute time in hot path for NO reason :^)
Signed-off-by: lizzie <lizzie@eden-emu.dev>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3641
Reviewed-by: CamilleLaVey <camillelavey99@gmail.com>
Reviewed-by: DraVee <chimera@dravee.dev>
Co-authored-by: lizzie <lizzie@eden-emu.dev>
Co-committed-by: lizzie <lizzie@eden-emu.dev>
Diffstat (limited to 'src/video_core/buffer_cache')
| -rw-r--r-- | src/video_core/buffer_cache/buffer_cache_base.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/video_core/buffer_cache/buffer_cache_base.h b/src/video_core/buffer_cache/buffer_cache_base.h index 0596329392..08524bd854 100644 --- a/src/video_core/buffer_cache/buffer_cache_base.h +++ b/src/video_core/buffer_cache/buffer_cache_base.h @@ -14,9 +14,12 @@ #include <mutex> #include <numeric> #include <span> -#include <ankerl/unordered_dense.h> #include <vector> +#include <ankerl/unordered_dense.h> +#include <boost/container/static_vector.hpp> +#include <boost/container/small_vector.hpp> + #include "common/common_types.h" #include "common/div_ceil.h" #include "common/literals.h" @@ -94,10 +97,10 @@ static constexpr Binding NULL_BINDING{ template <typename Buffer> struct HostBindings { - boost::container::small_vector<Buffer*, NUM_VERTEX_BUFFERS> buffers; - boost::container::small_vector<u64, NUM_VERTEX_BUFFERS> offsets; - boost::container::small_vector<u64, NUM_VERTEX_BUFFERS> sizes; - boost::container::small_vector<u64, NUM_VERTEX_BUFFERS> strides; + boost::container::static_vector<Buffer*, NUM_VERTEX_BUFFERS> buffers; + boost::container::static_vector<u64, NUM_VERTEX_BUFFERS> offsets; + boost::container::static_vector<u64, NUM_VERTEX_BUFFERS> sizes; + boost::container::static_vector<u64, NUM_VERTEX_BUFFERS> strides; u32 min_index{NUM_VERTEX_BUFFERS}; u32 max_index{0}; }; |
