mirror of
https://github.com/love2d/love.git
synced 2026-08-16 00:02:12 +02:00
metal: fix Buffers, fix shader cleanup
This commit is contained in:
@@ -116,6 +116,7 @@ void *Buffer::map(MapType /*map*/, size_t offset, size_t size)
|
||||
if (mapBuffer != nil)
|
||||
{
|
||||
mappedRange = r;
|
||||
mapped = true;
|
||||
return mapBuffer.contents;
|
||||
}
|
||||
|
||||
@@ -142,6 +143,7 @@ void Buffer::unmap(size_t usedoffset, size_t usedsize)
|
||||
size:usedsize];
|
||||
|
||||
mapBuffer = nil;
|
||||
mapped = false;
|
||||
}}
|
||||
|
||||
void Buffer::fill(size_t offset, size_t size, const void *data)
|
||||
|
||||
@@ -1637,6 +1637,7 @@ void Graphics::initCapabilities()
|
||||
|
||||
void Graphics::getAPIStats(int &shaderswitches) const
|
||||
{
|
||||
// TODO
|
||||
shaderswitches = 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -427,9 +427,11 @@ Shader::~Shader()
|
||||
|
||||
for (const auto &it : uniforms)
|
||||
{
|
||||
free(it.second.data);
|
||||
if (it.second.textures != nullptr)
|
||||
{
|
||||
free(it.second.data);
|
||||
delete[] it.second.textures;
|
||||
}
|
||||
}
|
||||
|
||||
delete[] localUniformBufferData;
|
||||
|
||||
Reference in New Issue
Block a user