[GPU] D3D12 backend debug markers were being cut

Code used wcslen that return number of characters, but D3D12 debug layer uses bytes + wide chars
This commit is contained in:
Edu Garcia 2025-02-11 11:18:23 +00:00 committed by Sam Lantinga
parent 0bce19cf15
commit 9b18e8438f
1 changed files with 2 additions and 2 deletions

View File

@ -2028,7 +2028,7 @@ static void D3D12_InsertDebugLabel(
d3d12CommandBuffer->graphicsCommandList,
0,
wchar_text,
(UINT)SDL_wcslen(wchar_text));
(UINT)SDL_wcslen(wchar_text) * sizeof(WCHAR));
SDL_free(wchar_text);
}
@ -2044,7 +2044,7 @@ static void D3D12_PushDebugGroup(
d3d12CommandBuffer->graphicsCommandList,
0,
wchar_text,
(UINT)SDL_wcslen(wchar_text));
(UINT)SDL_wcslen(wchar_text) * sizeof(WCHAR));
SDL_free(wchar_text);
}