From 4e87d9bcae01c01c08ed836cd039627e2f99fb6a Mon Sep 17 00:00:00 2001 From: Alexander Tretyakov Date: Mon, 23 Sep 2024 17:41:59 +0300 Subject: [PATCH] Fix resource name not being set for debug layer logging. --- .../private/render/directx/resources/DirectXResource.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/engine_lib/private/render/directx/resources/DirectXResource.cpp b/src/engine_lib/private/render/directx/resources/DirectXResource.cpp index ee6352fa4..3482738c2 100644 --- a/src/engine_lib/private/render/directx/resources/DirectXResource.cpp +++ b/src/engine_lib/private/render/directx/resources/DirectXResource.cpp @@ -65,7 +65,10 @@ namespace ne { pCreatedResource->pInternalResource = pCreatedResource->pAllocatedResource->GetResource(); // Assign resource name. - pCreatedResource->pAllocatedResource->SetName(Globals::stringToWstring(sResourceName).c_str()); + pCreatedResource->pAllocatedResource->SetName( + Globals::stringToWstring(sResourceName).c_str()); // name for D3D12MA logging + pCreatedResource->pInternalResource->SetName( + pCreatedResource->pAllocatedResource->GetName()); // name for debug layer logging return pCreatedResource; }