Rework GPU BufferView to have handle-like semantics

We wanted views to extend the lifetime of the underlying buffers and at the same time preserve all views until the destruction of the buffer to prevent recreation which might be costly in the future when we need `VkBufferView`s of the buffer but also require a centralized list of all views for recreation of the buffer. It also removes the inconsistency between `BufferView*` being returned in `GetXView` in `GraphicsContext`.
This commit is contained in:
PixelyIon
2022-03-17 19:02:06 +05:30
parent fae5332f20
commit 7a5c771f44
7 changed files with 76 additions and 60 deletions

View File

@ -37,6 +37,6 @@ namespace skyline::gpu {
/**
* @return A pre-existing or newly created Buffer object which covers the supplied mappings
*/
std::shared_ptr<BufferView> FindOrCreate(const GuestBuffer &guest);
BufferView FindOrCreate(const GuestBuffer &guest);
};
}