Store delegate attached state within the delegate itself

Avoids a costly map lookup for every AttachBuffer call, this was a serious bottleneck in SMO
This commit is contained in:
Billy Laws
2022-07-31 13:24:31 +01:00
parent 0268e1d5a0
commit 70eec5a414
3 changed files with 12 additions and 5 deletions

View File

@ -100,6 +100,7 @@ namespace skyline::gpu {
struct BufferDelegate {
LockableSharedPtr<Buffer> buffer;
const Buffer::BufferViewStorage *view;
bool attached{};
std::function<void(const BufferViewStorage &, const std::shared_ptr<Buffer> &)> usageCallback;
std::list<BufferDelegate *>::iterator iterator;