gfxreconstruct icon indicating copy to clipboard operation
gfxreconstruct copied to clipboard

[replay] Adding a D3D12 tool parameter to resize the heaps for placed resources

Open MickAlmighty opened this issue 3 months ago • 1 comments

I don't know if this is the right place to give some ideas, but I'll try it anyway.

The problem I captured a stream from cyberpunk 2077 using Intel Arc B580 because there was a corruption in the game. Then I wanted to replay that stream on RTX 2060 to check if the corruption will persist during replay, but during the startup it crashed on NV RTX 2060.

From the output I recognized the issue is with with general difference in resource sizes between HW vendors (NV's resources seems to be larger than Intel's). The error was failed placed resource creation.

I captured a PIX on Intel based on the gfxreconstruct stream, The pix frame didn't launch on NV too. I managed to overcome this by generating the cpp and resize every placed resource heap (in this case x2 the original size). Then the compiled *.exe was running on NV without problems.

Potential solution / feature request Is there any way you could add an argument/parameter for D3D12, for example, --resize-placed-resource-heaps with base value of 2x but with ability to pass own number? I've seen there's something similar (I guess) for Vulkan API. This should have minor risk and impact on the code but could improve tool usage a lot in my use case. The worst case user scenario is the tool will crash because of the lack of gpu memory.

BR, Michal

MickAlmighty avatar Sep 26 '25 10:09 MickAlmighty

For this scenario, you could try https://github.com/ARM-software/gfxreconstruct-arm/commits/dev-arm/ which manage D3D12 memory through https://github.com/GPUOpen-LibrariesAndSDKs/D3D12MemoryAllocator. Still WIP for more corner cases, but at least can replay Cyberpunk2077 across AMD,NV,Intel.

zhangzhousuper avatar Oct 30 '25 06:10 zhangzhousuper