Optimize GPU Resource name to prevent memory allocs when changing name frequently
This commit is contained in:
committed by
Wojtek Figat
parent
70cce0e1ee
commit
67c63f1410
@@ -174,7 +174,7 @@ bool GPUBufferDX12::OnInit()
|
||||
if (_desc.Flags & GPUBufferFlags::Counter || _desc.Flags & GPUBufferFlags::Append)
|
||||
{
|
||||
#if GPU_ENABLE_RESOURCE_NAMING
|
||||
String name = GetName() + TEXT(".Counter");
|
||||
String name = String(GetName()) + TEXT(".Counter");
|
||||
_counter = ::New<GPUBufferDX12>(_device, name);
|
||||
#else
|
||||
_counter = ::New<GPUBufferDX12>(_device, String::Empty);
|
||||
|
||||
Reference in New Issue
Block a user