Add more fine-grained buffer recreation locking

This commit is contained in:
Billy Laws
2023-01-09 21:16:23 +00:00
parent 85a23e73ba
commit 2b282ece1a
8 changed files with 52 additions and 33 deletions

View File

@ -697,6 +697,11 @@ namespace skyline::gpu {
return delegate->GetBuffer();
}
BufferBinding BufferView::GetBinding(GPU &gpu) const {
std::scoped_lock lock{gpu.buffer.recreationMutex};
return {delegate->GetBuffer()->GetBacking(), offset + delegate->GetOffset(), size};
}
vk::DeviceSize BufferView::GetOffset() const {
return offset + delegate->GetOffset();
}