mirror of
https://github.com/love2d/love.git
synced 2026-08-17 19:23:38 +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)
|
if (mapBuffer != nil)
|
||||||
{
|
{
|
||||||
mappedRange = r;
|
mappedRange = r;
|
||||||
|
mapped = true;
|
||||||
return mapBuffer.contents;
|
return mapBuffer.contents;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -142,6 +143,7 @@ void Buffer::unmap(size_t usedoffset, size_t usedsize)
|
|||||||
size:usedsize];
|
size:usedsize];
|
||||||
|
|
||||||
mapBuffer = nil;
|
mapBuffer = nil;
|
||||||
|
mapped = false;
|
||||||
}}
|
}}
|
||||||
|
|
||||||
void Buffer::fill(size_t offset, size_t size, const void *data)
|
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
|
void Graphics::getAPIStats(int &shaderswitches) const
|
||||||
{
|
{
|
||||||
|
// TODO
|
||||||
shaderswitches = 0;
|
shaderswitches = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -427,9 +427,11 @@ Shader::~Shader()
|
|||||||
|
|
||||||
for (const auto &it : uniforms)
|
for (const auto &it : uniforms)
|
||||||
{
|
{
|
||||||
free(it.second.data);
|
|
||||||
if (it.second.textures != nullptr)
|
if (it.second.textures != nullptr)
|
||||||
|
{
|
||||||
|
free(it.second.data);
|
||||||
delete[] it.second.textures;
|
delete[] it.second.textures;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
delete[] localUniformBufferData;
|
delete[] localUniformBufferData;
|
||||||
|
|||||||
Reference in New Issue
Block a user