Fix debug name for DirectX resources

This commit is contained in:
Wojciech Figat
2022-06-20 12:25:57 +02:00
parent f31ba5cad8
commit da85c1f55c

View File

@@ -388,8 +388,9 @@ inline void SetDebugObjectName(T* resource, const Char* data, UINT size)
if (data && size > 0)
resource->SetName(data);
#else
char* ansi = (char*)Allocator::Allocate(size);
char* ansi = (char*)Allocator::Allocate(size + 1);
StringUtils::ConvertUTF162ANSI(data, ansi, size);
ansi[size] ='\0';
SetDebugObjectName(resource, ansi, size);
Allocator::Free(ansi);
#endif