mirror of
https://github.com/Takiiiiiiii/strato.git
synced 2025-07-17 08:46:39 +00:00
Only reallocate MegaBuffer
on usage
Certain submissions might not utilize megabuffering but reserve a `MegaBuffer` regardless, this is not optimal since it can inflate the allocations and waste memory. This commit addresses the issue by eliding the allocation given the current submission doesn't utilize them.
This commit is contained in:
@ -91,6 +91,17 @@ namespace skyline::gpu {
|
||||
|
||||
MegaBuffer &operator=(MegaBuffer &&other);
|
||||
|
||||
/**
|
||||
* @return If any allocations into the megabuffer were done at the time of the call
|
||||
*/
|
||||
bool WasUsed();
|
||||
|
||||
/**
|
||||
* @brief Replaces the cycle associated with the underlying megabuffer with the supplied cycle
|
||||
* @note The megabuffer must **NOT** have any dependencies that aren't conveyed by the supplied cycle
|
||||
*/
|
||||
void ReplaceCycle(const std::shared_ptr<FenceCycle> &cycle);
|
||||
|
||||
/**
|
||||
* @brief Resets the free region of the megabuffer to its initial state, data is left intact but may be overwritten
|
||||
*/
|
||||
|
Reference in New Issue
Block a user