metal: add debug labels for internal buffers.

This commit is contained in:
Sasha Szpakowski
2024-03-10 13:08:04 -03:00
parent b6c47cd3ec
commit 75fd2fa06e
2 changed files with 3 additions and 0 deletions
+1
View File
@@ -341,6 +341,7 @@ Graphics::Graphics()
};
Buffer::Settings attribsettings(BUFFERUSAGEFLAG_VERTEX, BUFFERDATAUSAGE_STATIC);
attribsettings.debugName = "Default Vertex Attributes";
defaultAttributesBuffer = newBuffer(attribsettings, dataformat, &defaults, sizeof(DefaultVertexAttributes), 0);
}
@@ -48,6 +48,8 @@ public:
if (buffer == nil)
throw love::Exception("Out of graphics memory.");
buffer.label = [NSString stringWithFormat:@"StreamBuffer (usage: %d, size: %ld)", usage, size];
data = (uint8 *) buffer.contents;
for (int i = 0; i < BUFFER_FRAMES; i++)