Disabling Bindless With D3D12 Causes A Descriptor Leak And A DMA Page Fault

For some context, the main driving factor for wanting to disable bindless is simply to make debugging raytracing shaders possible with PIX (with bindless enabled, you simply can’t see SRVs / UAVs).

If you leave it running for a while you’ll eventually hit:

LogD3D12RHI: Error: Explicit view descriptor heap overflow. Current frame will not be rendered correctly. Increase r.D3D12.RayTracingViewDescriptorHeapSize to at least 524288 to fix this issue.

Adding a bit of debugging around that region (`int32 FD3D12ExplicitDescriptorHeap::Allocate(uint32 InNumDescriptors)`):

`int32 FD3D12ExplicitDescriptorHeap::Allocate(uint32 InNumDescriptors)
{
int32 Result = FPlatformAtomics::InterlockedAdd(&NumAllocatedDescriptors, InNumDescriptors);

vvvvvvvvvvvvvvvvvv
if (Type != D3D12_DESCRIPTOR_HEAP_TYPE_SAMPLER)
{
UE_LOG(LogTemp, Warning, TEXT(“[Result=%d, MaxNumDescriptors=%d]”), Result, MaxNumDescriptors);
}
^^^^^^^^^^^^^`

You’ll notice every frame spams descriptors being allocated, without being recycled (see attached picture).

---

However, I’ve also noticed an additional problem, it seems incredibly liable to hit a DMA page fault on NVIDIA (using a 3070 on 576.52), always apparently accessing a texture after it’s been deleted (observed via aftermath), if it doesn’t hit it, there’s usually some amount of corruption that occurs on the Lumen scene (also attached).

2025.06.17-08.16.54:373][543]LogD3D12RHI: Error: PageFault: PageFault at VA GPUAddress "0x2433A00000" (GPU 0) [2025.06.17-08.16.54:373][543]LogD3D12RHI: Error: PageFault: Last completed frame ID: -1 (cached: 540) - Current frame ID: 544 [2025.06.17-08.16.54:373][543]LogD3D12RHI: Error: PageFault: Logging all resource enabled: No [2025.06.17-08.16.54:373][543]LogD3D12RHI: Error: PageFault: Found 0 active tracked resources in 16.00 MB range of page fault address [2025.06.17-08.16.54:373][543]LogD3D12RHI: Error: PageFault: Found 0 active heaps containing page fault address [2025.06.17-08.16.54:373][543]LogD3D12RHI: Error: PageFault: Found 0 released resources containing the page fault address during last 100 frames [2025.06.17-08.16.54:373][543]LogD3D12RHI: Error: DRED: No breadcrumb head found. [2025.06.17-08.16.54:373][543]LogD3D12RHI: Error: DRED: No PageFault data. [2025.06.17-08.16.54:373][543]LogD3D12RHI: Error: Video Memory Stats from frame ID 542: [2025.06.17-08.16.54:373][543]LogD3D12RHI: Error: Local Budget: 7250.00 MB [2025.06.17-08.16.54:374][543]LogD3D12RHI: Error: System Budget: 64722.00 MB [2025.06.17-08.16.54:374][543]LogD3D12RHI: Error: System Used: 243.61 MB [2025.06.17-08.16.54:374][543]LogD3D12RHI: Error: Local Used: 3067.18 MB

Leading me to believe there is some amount of cheeky UB going on.

Many thanks,

Alister

Steps to Reproduce
To replicate, you’ll need to disable bindless in one of the windows configuration ini, e.g:

[PCD3D_SM6] BindlessResources=Disabled BindlessSamplers=Disabled

Having a raytracing GPU and opening Lyra with no other changes should be enough after that.

Hi,

make sure to also disable shader binding layout with StaticShaderBindingLayoutSupport when disabling bindless for raytracing because that won’t work otherwise and can cause visual corruption. I am not sure if that will fix the resource leaking though.

Kind regards,

Kenzo

Hi,

You also need to disable persistent SBTs in r.RayTracing.PersistentSBT=0 because those also won’t work without StaticShaderBindingLayoutSupport.

We ideally want to just move forward with bindless and deprecate the non-bindless code path for ray tracing because maintaining both code paths isn’t easy and the non bindless one will hardly be tested. We understand the debugability problem but PIX normally supports the option to fetch all the bound bindless resources but unsure if this works with raytracing as well (it’s a bit of a hit and miss right now but reaching out to MS and pix team to complain it’s not working would be really good).

Are you debugging the hit lighting code path or Lumen inline raytracing code path?

Kind regards,

Kenzo

Hi Alister, did you have a chance to try Kenzo’s suggestions (disable StaticShaderBindingLayourSupport and PersistentSBT)? Also, like Kenzo said we’re looking into removing non-bindless path for HWRT.

I wasn’t really sure if not having bindless for raytracing is even really supported anymore (given you need to change the windows configuration, due to the rhi cvar only overriding if its not disabled).

Out of curiosity, how does Epic go about debugging raytracing stuff with bindless? I’d assume PIX, but given it simply doesn’t show any resources, i’d wager you must have another way?

A mix of custom code that piggy backs of pathtracing, but also just general in scene (so generally lumen).

I have tried it and it does mostly seem to work