baldurk / renderdoc

RenderDoc is a stand-alone graphics debugging tool.
https://renderdoc.org
MIT License
8.88k stars 1.33k forks source link

Deus Ex: Mankind Divided DX12 capture load causes Renderdoc to crash #518

Closed sniverty closed 7 years ago

sniverty commented 7 years ago

Hello,

I was overjoyed to see that renderdoc capture for DeusEx: mankind divided was working on the DX12 version of the game. However, the capture file itself fails to load, resulting in renderdoc to crash. I understand that Renderdoc is still in beta stage as far as DX12 support is concerned. However, I was wondering if there was simple fix for this. I've pasted the error spew for the crash below.

Thanks!

RDOC 013140: [23:25:07] core.cpp( 308) - Log - RenderDoc v0.32 x64 (6a5ba7e6359e7b928fc460070a3bd5abff4d2c8e-official) loaded in replay application

RDOC 013140: [23:25:17] replay_renderer.cpp(1526) - Log - Creating replay device for C:\Users\snive\Desktop\RenderDocCaptures\dxmd_d3d12_ui1.rdc

RDOC 013140: [23:25:18] d3d12_replay.cpp(1787) - Log - Created device.

RDOC 013140: [23:25:18] replay_renderer.cpp(1545) - Log - Created replay driver.

RDOC 013140: [23:25:19] d3d12_device_wrap.cpp( 456) - Error - Failed on resource serialise-creation, HRESULT: 0x80070057

RDOC 013140: [23:25:20] resource_manager.h(1328) - Error - Assertion failed: 'HasLiveResource(origid)' (origid=ResID_162)

RDOC 013140: [23:25:20] d3d12_manager.cpp( 938) - Error - Assertion failed: 'res != 0'

RDOC 013140: [23:25:20] resource_manager.h(1418) - Error - Assertion failed: 'm_LiveIDs.find(id) != m_LiveIDs.end()' (id=ResID_162)

baldurk commented 7 years ago

It looks like there's a problem recreating an object during replay - the 0x80070057 is E_INVALIDARG.

Can you upload the capture somewhere so I can look at it?

sniverty commented 7 years ago

How about a Google drive link? https://drive.google.com/open?id=0Bz9pzRUAjfXaT21hV0phZ05WYW8

If you'd like me to upload it elsewhere, do let me know. Thanks for the quick response!

baldurk commented 7 years ago

I think that commit should stop the crash, although it's not a proper fix. Unfortunately because D3D12 is a bad API, I don't think it's actually possible to fix completely robustly. As it is there is a small chance that in cases like this some features will just break.

Note that although this lets the capture open it still seems to be replaying incorrectly when it loads for me. I can't tell if that's because of hardware differences between your PC and mine, or a bug at capture time, or a bug at replay time. I've captured DX:MD plenty myself and haven't seen these errors before, so I'll look into it some more and see if I can figure it out.

sniverty commented 7 years ago

Thanks for the quick fix. The replay seems to be incorrect for me too, even with new captures. The color passes in the later parts of the frame don't show the right output textures, while the depth and compute passes seem to be okay.

baldurk commented 7 years ago

Yes from what I saw in the capture you sent, some constants were corrupt at some point causing a bad colour multiplier in post processing. It's hard to tell from the capture though what went wrong - it might be something that happened in the application itself. I'll try and investigate more but I might need to be able to repro it myself.

Can you tell me what hardware and driver you were capturing on?

sniverty commented 7 years ago

Hardware: GTX 970, i5-4460 3.2GHz, 16GB RAM Driver: GeForce Game Ready Driver - Version: 378.66

baldurk commented 7 years ago

FYI - I've been able to repro the corruption, so I've put this on my list to investigate. I'm going to close this issue since the original crash when opening a capture has been fixed. If you want to open a new issue to track the corruption problems then please do so, otherwise I can comment here if I find anything.

sniverty commented 7 years ago

Thanks! No need to open a new issue I think, I'll just look for updates here.