GPU Dedicated Memory leak in DX12

Hi, I wanted to make a forum post about this since I cannot find anyone else posting about having this issue in DX12 on either 5.0.3 or 5.1.1. I have made a Bug Report on the form a few days ago since noticing my issue.

Initially just assumed that UE5 was just going to be heavier on resources since my general Editor experience has been a bit chunkier but recently wanted to look at GPU memory in Task Manager. Hopefully this is why I have entirely been unable to use Nanite in any capacity.

I experience this on clean empty projects and empty Windows 10 or 11 installs. So I ruled out my own personal project and setup. Have tried both Radeon Pro drivers as well as the regular gaming drivers.

Using a Gigabyte Eagle RX 6650 XT with a ASUS B450-F motherboard. Attached a video clip of it occurring when I resize an editor window, but also seems to happen just floating around in an empty test project’s map.

I currently am using DX11 on a personal project to circumvent this but that also means I cannot try Nanite.


DxDiag.txt (97.4 KB)

Hey there @Louie_M! Welcome back to the community! Does the excess memory get garbage collected when you close the window you were resizing? How long did it take to generate that much bloat?

Edit to clarify No, it does not get garbage collection as far as I can tell.

DWM doesn’t seem to get any garbage collection when I try this in DX12. But also UE5 GPU memory usage doesn’t seem to ever go away either until closing the editor. Resizing windows might only be a way to exacerbate the symptom and not the only cause. It really doesn’t take very long for me to produce a very unreasonable amount of Dedicated GPU Memory used.

I’m not 100% sure window rendering is the only source of the memory management problem. But it is a very quick and sure way of me producing an issue.

In Vulkan it happens only in UnrealEditor.exe and DWM.exe is untouched but memory usage constantly and rapidly increases.

That’s interesting! I can’t easily recreate it! Generally when I release the window, the excess memory drops back to where it was (relatively). I can’t reproduce infinite scaling with just the resizing, could it be the GPU drivers misreporting memory? I’m working from a 1660 and 2070 respectively for reference. DWM shifting as much as it does there might also point to those issues. If it does turn out not to be environmental we may need to report this as a bug for sure.

In DX12 I can’t tell 100% or not if the DWM issue is the primary source of my slowdown and memory experiences. But I did report this previously on February 23 with
“Case # 00535428: Resizing editor windows leaks incredible amounts of Dedicated GPU Memory to be allocated by DWM has been received”

Might spend a bit of time in my personal project while trying DX12 to see what things might come up.

Vulkan it definitely scales exponentially on its own for me which isn’t good either but I only noticed this from trying out different RHI options and see what would be best for now.

AMD GPU’s seem to be a common variable in some of the memory issues I’ve seen come up on the bug tracker or forum though.

I’m not certain but it’s got the signs of being a driver issue. Trust me, the jump to DX12/SM6.6 has been a rough one for all cards. A majority of the GPU driver issues I come across here on the forums (likely due to market-share) are Nvidia cards, so it’s more of an overall issue between the connective tissue with User’s environments, GPUs and their drivers, and Unreal itself not really AMD only issue, just harder to work with since there’s less data. This makes for many possible variables where things can go wrong, and in most cases unless you’re a software engineer or other IT legend, it’s going to take a bit of trial and error to find what we’re looking for.

One of the issues I see often are cards/drivers not fit for 6.6 and many only supporting up to 6.5 which makes everything work fine except some very specific instructions and then everything breaks. Though it looks like the Eagle is rated up to 6.7 so that’s likely not the case here. If you hear back about that report making it to an issues thread or find more information, let me know! I’ll save this thread and update you if I come across more information!

If you are experiencing a dedicated GPU memory leak in DX12, there are several steps you can take to try and resolve the issue:

  1. Update your graphics drivers: Check for any available updates for your GPU drivers and install them. Sometimes outdated drivers can cause memory leaks.
  2. Reduce graphics settings: Try lowering graphics settings in the game or application you are using to reduce the load on your GPU memory.
  3. Check for background applications: Close any background applications or processes that are not needed to free up memory for your GPU.
  4. Disable overclocking: If you have overclocked your GPU, try disabling it to see if it resolves the memory leak issue.
  5. Run a memory diagnostic: Use a memory diagnostic tool to check for any issues with your GPU memory. This can help identify any hardware issues that may be causing the leak.
  6. Check for any known issues: Check online forums and support pages for any known issues with your GPU model and DX12.

Hello, I know I haven’t updated any info about this topic in a long while. But for some reason I found a way to fix/circumvent? this issue. Since my last post I had tried the earliest version of Windows 10 that I could use for UE5.2.1 and the earliest drivers possible for my GPU just to rule out those possibilities.

But cause of the FSR3 plugin released recently, I was playing with DX12 only features including Ray Tracing support. And for some reason I have no issues with GPU memory and garbage collection if I have Ray Tracing support enabled? I don’t even think I see the Video Memory depleted red message text with it ray tracing on.

Must be related to what you said previously about it probably being weird Shader Model stuff interfacing wrong. Cause if I have Ray Tracing enabled in the project settings the editor works great.

Hey there again @Louie_M! A couple months after your post, we did confirm an issue in 5.1 and 5.2 were having GPU memory errors on specific systems. I believe 5.3.1 corrected a significant number of them. Is raytracing required for you on 5.3.1 as well?

I won’t be able to test that until power is restored in my area after a storm this week.

But I hadn’t committed to updating to 5.3 due to API changes with the new Cable Component not keeping simulation when attached to moving points. The issue is backlogged in the bug tracker currently. UE-187623 (5.1 cable is still functional in 5.2)

But thank you for the info.

Testing with 5.3.2 the issue is gone for me.

But correction earlier, my 5.2.1 and previous memory issues are “fixed” by the FSR 3.0 plugin’s alternative D3D12 RHI implementation and was a coincidence I was looking at the same time as playing with Ray Tracing. But at the very least I have a workaround while I’m still on 5.2.1 for the Cable Component dynamics I am a bit reliant on atm.

Fantastic, glad that will work in the meantime and a fix is in the pipeline for the rest. If you backport the changes yourself let me know how it goes!

I haven’t tried a newer in development build of Windows in a while. But 26100 seems to be vastly better for my personal setup. So maybe it’s also not entirely on the engine side.