forked from ShuriZma/suyu
1
0
Fork 0

metal: do not release not existing buffers

This commit is contained in:
Samuliak 2024-04-06 17:35:12 +02:00
parent e87893ec42
commit ef8b77c9a3
No known key found for this signature in database
1 changed files with 3 additions and 1 deletions

View File

@ -25,7 +25,9 @@ BoundBuffer::BoundBuffer(MTLBuffer_t buffer_, size_t offset_, size_t size_)
: buffer{[buffer_ retain]}, offset{offset_}, size{size_} {}
BoundBuffer::~BoundBuffer() {
if (buffer) {
[buffer release];
}
}
BufferView::BufferView(MTLBuffer_t buffer_, size_t offset_, size_t size_,