mirror of
https://github.com/skyline-emu/skyline.git
synced 2024-12-23 19:51:52 +01:00
Add a mutex to allow preventing buffer recreation
This commit is contained in:
parent
379b4f163d
commit
542651232b
@ -64,6 +64,7 @@ namespace skyline::gpu {
|
||||
}
|
||||
|
||||
BufferManager::LockedBuffer BufferManager::CoalesceBuffers(span<u8> range, const LockedBuffers &srcBuffers, ContextTag tag) {
|
||||
std::scoped_lock lock{recreationMutex};
|
||||
if (!range.valid())
|
||||
range = span<u8>{srcBuffers.front().buffer->guest->begin(), srcBuffers.back().buffer->guest->end()};
|
||||
|
||||
|
@ -70,6 +70,8 @@ namespace skyline::gpu {
|
||||
static bool BufferLessThan(const std::shared_ptr<Buffer> &it, u8 *pointer);
|
||||
|
||||
public:
|
||||
std::mutex recreationMutex;
|
||||
|
||||
BufferManager(GPU &gpu);
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user