Support allocating into spans in the linear allocator

This commit is contained in:
Billy Laws 2022-09-22 00:12:30 +01:00
parent 04cea9239f
commit f1600f5ad0
2 changed files with 8 additions and 2 deletions

View File

@ -189,6 +189,7 @@ add_library(skyline SHARED
${source_DIR}/skyline/gpu/interconnect/maxwell_3d/packed_pipeline_state.cpp
${source_DIR}/skyline/gpu/interconnect/maxwell_3d/pipeline_manager.cpp
${source_DIR}/skyline/gpu/interconnect/maxwell_3d/constant_buffers.cpp
${source_DIR}/skyline/gpu/interconnect/maxwell_3d/samplers.cpp
${source_DIR}/skyline/gpu/interconnect/maxwell_3d/maxwell_3d.cpp
${source_DIR}/skyline/gpu/interconnect/command_executor.cpp
${source_DIR}/skyline/gpu/interconnect/command_nodes.cpp

View File

@ -58,8 +58,13 @@ namespace skyline {
}
template<typename T>
T *AllocateUntracked(size_t count = 1) {
return reinterpret_cast<T *>(Allocate(sizeof(T) * count, false));
T *AllocateUntracked() {
return reinterpret_cast<T *>(Allocate(sizeof(T), false));
}
template<typename T>
span<T> AllocateUntracked(size_t count) {
return {reinterpret_cast<T *>(Allocate(sizeof(T) * count, false)), count};
}
template<typename T, class... Args>