metal: implement buffer/texture debug names.

This commit is contained in:
Sasha Szpakowski
2023-12-13 20:27:58 -04:00
parent 7b899fbc17
commit 059cab0364
2 changed files with 9 additions and 0 deletions
+3
View File
@@ -76,6 +76,9 @@ Buffer::Buffer(love::graphics::Graphics *gfx, id<MTLDevice> device, const Settin
if (buffer == nil)
throw love::Exception("Could not create buffer with %d bytes (out of VRAM?)", size);
if (!debugName.empty())
buffer.label = @(debugName.c_str());
if (usageFlags & BUFFERUSAGEFLAG_TEXEL)
{
if (@available(iOS 12, macOS 10.14, *))