Lazy activation of GPU heaps in FD3D12BindlessResourceManager

The ctor of FD3D12BindlessResourceManager implies that GPU heap activation is intended to occur lazily with ERHIBindlessConfiguration::RayTracingShaders, however any call to FD3D12BindlessResourceManager::GrowCPUHeap() (as a consequence of needing to allocate additional bindless descriptors) will cause a GPU heap activation, whether it is needed or not.

The negative consequence of this is that we use more GPU memory than necessary with D3D12 RHI.

Perhaps a check on ActiveGpuHeapIndex >= 0 is needed before setting bRequestNewActiveGpuHeap and bCPUHeapResized in FD3D12BindlessResourceManager::GrowCPUHeap()?

Steps to Reproduce
rhi.Bindless.Resources set to RayTracingOnly

Thanks for reporting this unintentional memory usage! We’re not sure yet what logic change we’ll make to avoid this, but I’ve created an internal ticket that should be visible publicly soon and can be used for tracking Unreal Engine Issues and Bug Tracker (UE\-323791)