Closed gegogi closed 6 years ago
Hi there, without a repro case or more information it's not possible for me to diagnose this further, as I don't know what the error is or what the UAV was.
Descriptor
to see what parameters are set.Thanks for the clarification. I tried testing with the CMAA 1 sample as well but I wasn't able to repro. I'd be interested to know if it crashes for you too. Otherwise yes if you're able to produce a smaller repro that would be great.
Here is the log with DX debug layer attached on renderdoc side. I have no idea why desc.Format was UNKNOWN. Without renderdoc, it runs well with DX debug layer attached.
'qrenderdoc.exe' (Win32): Loaded 'D:\Code\renderdoc-1.1\x64\Development\qrenderdoc.exe'. Symbols loaded.
'qrenderdoc.exe' (Win32): Loaded 'C:\Windows\System32\ntdll.dll'. Symbols loaded.
'qrenderdoc.exe' (Win32): Loaded 'C:\Windows\System32\kernel32.dll'. Symbols loaded.
'qrenderdoc.exe' (Win32): Loaded 'C:\Windows\System32\KernelBase.dll'. Symbols loaded.
'qrenderdoc.exe' (Win32): Loaded 'C:\Windows\System32\user32.dll'. Symbols loaded.
'qrenderdoc.exe' (Win32): Loaded 'C:\Windows\System32\win32u.dll'. Symbols loaded.
'qrenderdoc.exe' (Win32): Loaded 'C:\Windows\System32\gdi32.dll'. Symbols loaded.
'qrenderdoc.exe' (Win32): Loaded 'C:\Windows\System32\gdi32full.dll'. Symbols loaded.
'qrenderdoc.exe' (Win32): Loaded 'C:\Windows\System32\msvcp_win.dll'. Symbols loaded.
'qrenderdoc.exe' (Win32): Loaded 'C:\Windows\System32\ucrtbase.dll'. Symbols loaded.
'qrenderdoc.exe' (Win32): Loaded 'D:\Code\renderdoc-1.1\x64\Development\python36.dll'. Cannot find or open the PDB file.
'qrenderdoc.exe' (Win32): Loaded 'D:\Code\renderdoc-1.1\x64\Development\Qt5Widgets.dll'. Cannot find or open the PDB file.
'qrenderdoc.exe' (Win32): Loaded 'D:\Code\renderdoc-1.1\x64\Development\Qt5Gui.dll'. Cannot find or open the PDB file.
'qrenderdoc.exe' (Win32): Loaded 'C:\Windows\System32\shlwapi.dll'. Symbols loaded.
'qrenderdoc.exe' (Win32): Loaded 'C:\Windows\System32\shell32.dll'. Symbols loaded.
'qrenderdoc.exe' (Win32): Loaded 'C:\Windows\System32\ole32.dll'. Symbols loaded.
'qrenderdoc.exe' (Win32): Loaded 'C:\Windows\System32\msvcrt.dll'. Symbols loaded.
'qrenderdoc.exe' (Win32): Loaded 'C:\Windows\System32\cfgmgr32.dll'. Symbols loaded.
'qrenderdoc.exe' (Win32): Loaded 'C:\Windows\System32\combase.dll'. Symbols loaded.
'qrenderdoc.exe' (Win32): Loaded 'C:\Windows\System32\rpcrt4.dll'. Symbols loaded.
'qrenderdoc.exe' (Win32): Loaded 'C:\Windows\System32\combase.dll'. Symbols loaded.
'qrenderdoc.exe' (Win32): Loaded 'C:\Windows\System32\SHCore.dll'. Symbols loaded.
'qrenderdoc.exe' (Win32): Unloaded 'C:\Windows\System32\combase.dll'
'qrenderdoc.exe' (Win32): Loaded 'C:\Windows\System32\ws2_32.dll'. Symbols loaded.
'qrenderdoc.exe' (Win32): Loaded 'C:\Windows\System32\bcryptprimitives.dll'. Symbols loaded.
'qrenderdoc.exe' (Win32): Loaded 'C:\Windows\System32\advapi32.dll'. Symbols loaded.
'qrenderdoc.exe' (Win32): Loaded 'C:\Windows\System32\windows.storage.dll'. Symbols loaded.
'qrenderdoc.exe' (Win32): Loaded 'C:\Windows\System32\kernel.appcore.dll'. Symbols loaded.
'qrenderdoc.exe' (Win32): Loaded 'C:\Windows\System32\sechost.dll'. Symbols loaded.
'qrenderdoc.exe' (Win32): Loaded 'C:\Windows\System32\sechost.dll'. Symbols loaded.
'qrenderdoc.exe' (Win32): Unloaded 'C:\Windows\System32\sechost.dll'
'qrenderdoc.exe' (Win32): Loaded 'C:\Windows\System32\profapi.dll'. Symbols loaded.
'qrenderdoc.exe' (Win32): Loaded 'C:\Windows\System32\oleaut32.dll'. Symbols loaded.
'qrenderdoc.exe' (Win32): Loaded 'D:\Code\renderdoc-1.1\x64\Development\Qt5Core.dll'. Cannot find or open the PDB file.
'qrenderdoc.exe' (Win32): Loaded 'C:\Windows\System32\powrprof.dll'. Symbols loaded.
'qrenderdoc.exe' (Win32): Loaded 'D:\Code\renderdoc-1.1\x64\Development\Qt5Svg.dll'. Cannot find or open the PDB file.
'qrenderdoc.exe' (Win32): Loaded 'C:\Windows\System32\fltLib.dll'. Symbols loaded.
'qrenderdoc.exe' (Win32): Loaded 'D:\Code\renderdoc-1.1\x64\Development\Qt5Network.dll'. Cannot find or open the PDB file.
'qrenderdoc.exe' (Win32): Loaded 'C:\Windows\System32\version.dll'. Symbols loaded.
'qrenderdoc.exe' (Win32): Loaded 'C:\Windows\System32\shell32.dll'. Symbols loaded.
'qrenderdoc.exe' (Win32): Unloaded 'C:\Windows\System32\shell32.dll'
'qrenderdoc.exe' (Win32): Loaded 'C:\Windows\System32\crypt32.dll'. Symbols loaded.
'qrenderdoc.exe' (Win32): Loaded 'C:\Windows\System32\msasn1.dll'. Symbols loaded.
'qrenderdoc.exe' (Win32): Loaded 'C:\Windows\System32\vcruntime140.dll'. Symbols loaded.
'qrenderdoc.exe' (Win32): Loaded 'C:\Windows\System32\msvcp140.dll'. Symbols loaded.
'qrenderdoc.exe' (Win32): Loaded 'C:\Windows\System32\mpr.dll'. Symbols loaded.
'qrenderdoc.exe' (Win32): Loaded 'C:\Windows\System32\winmm.dll'. Symbols loaded.
'qrenderdoc.exe' (Win32): Loaded 'C:\Windows\System32\uxtheme.dll'. Symbols loaded.
'qrenderdoc.exe' (Win32): Loaded 'C:\Windows\System32\dwmapi.dll'. Symbols loaded.
'qrenderdoc.exe' (Win32): Loaded 'C:\Windows\System32\dnsapi.dll'. Symbols loaded.
'qrenderdoc.exe' (Win32): Loaded 'D:\Code\renderdoc-1.1\x64\Development\renderdoc.dll'. Symbols loaded.
'qrenderdoc.exe' (Win32): Loaded 'C:\Windows\System32\nsi.dll'. Symbols loaded.
'qrenderdoc.exe' (Win32): Loaded 'C:\Windows\System32\comdlg32.dll'. Symbols loaded.
'qrenderdoc.exe' (Win32): Loaded 'C:\Windows\System32\winmmbase.dll'. Symbols loaded.
'qrenderdoc.exe' (Win32): Unloaded 'C:\Windows\System32\winmmbase.dll'
'qrenderdoc.exe' (Win32): Loaded 'C:\Windows\System32\winmmbase.dll'. Symbols loaded.
'qrenderdoc.exe' (Win32): Loaded 'C:\Windows\System32\IPHLPAPI.DLL'. Symbols loaded.
'qrenderdoc.exe' (Win32): Loaded 'C:\Windows\WinSxS\amd64_microsoft.windows.common-controls_6595b64144ccf1df_5.82.17134.228_none_f95000f73097dead\comctl32.dll'. Symbols loaded.
'qrenderdoc.exe' (Win32): Loaded 'C:\Windows\System32\imm32.dll'. Symbols loaded.
RDOC 022136: [16:47:29] wrapped_pool.h( 160) - Debug - WrappingPool
Is it possible that this ID3D11UnorderedAccessView
is being created for a backbuffer image obtained from an IDXGISwapChain
? That might explain the problem and also would be easy to fix.
You can double check if while debugging you look at the pResource
pointer, and if it's a WrappedID3D11Texture2D1
expand the members to see if m_RealDescriptor
is NULL
or a valid descriptor.
Yes. I am exactly doing it to run CMAA onto back buffer image. I will double check the pResource pointer. Thank you.
OK I should be able to fix that then, I didn't realise D3D11 allowed UAVs of the backbuffer.
That commit should now fixup the view descriptor when creating a UAV of the backbuffer. Let me know if you still have trouble loading the capture.
Description
In the game I am developing, RenderDoc fails to play a capture when there are specific UAV bindable resources. When I look at the RenderDoc source code around d3d11_device_wrap.cpp( 921) which diagnostic log is pointing, I found it is related to UAV and disabling some of my code resolved the situation temporarily. It is actually CMAA antialiasing code developed by Intel.
RDOC 026548: [17:07:55] d3d11_device.cpp(1425) - Log - Starting capture, frame 2387 RDOC 026548: [17:07:55] d3d11_device.cpp(1461) - Log - Finished capture, Frame 2388 RDOC 026548: [17:07:55] rdcfile.cpp(1084) - Log - Finishing write to section 1 (renderdoc/internal/framecapture). Compressed from 341674560 bytes to 41134329 RDOC 026548: [17:07:55] core.cpp(1092) - Log - Written to disk: C:/Users/gegogi.TS.000/AppData/Local/Temp/RenderDoc/Pything_2018.09.14_08.07.02_frame2387.rdc RDOC 026548: [17:07:55] rdcfile.cpp( 239) - Log - Opening RDCFile C:/Users/gegogi.TS.000/AppData/Local/Temp/RenderDoc/Pything_2018.09.14_08.07.02_frame2387.rdc RDOC 006880: [17:07:55] target_control.cpp( 673) - Log - Got a new capture: 0 (time 1536912475) 381124 byte thumbnail RDOC 006880: [17:07:57] rdcfile.cpp( 239) - Log - Opening RDCFile C:\Users\gegogi.TS.000\AppData\Local\Temp\RenderDoc\Pything_2018.09.14_08.07.02_frame2387.rdc RDOC 006880: [17:07:57] rdcfile.cpp( 239) - Log - Opening RDCFile C:\Users\gegogi.TS.000\AppData\Local\Temp\RenderDoc\Pything_2018.09.14_08.07.02_frame2387.rdc RDOC 006880: [17:07:57] d3d11_replay.cpp(3626) - Log - Created device. RDOC 006880: [17:07:58] d3d11_replay.cpp( 170) - Log - nVidia GPU detected - trying to initialise nVidia counters RDOC 006880: [17:07:58] nv_counters.cpp( 205) - Warning - NV GPU performance counters could not locate 'NvPmApi.Core.dll' RDOC 006880: [17:07:58] replay_controller.cpp(1869) - Log - Created replay driver. RDOC 006880: [17:07:58] d3d11_device_wrap.cpp( 921) - Error - Failed on resource serialise-creation, HRESULT: E_INVALIDARG RDOC 006880: [17:07:58] d3d11_device.cpp(1016) - Log - Timer chunk initialisation - 22.796 ms RDOC 006880: [17:07:58] replay_controller.cpp( 188) - Log - Shutting down replay renderer
Repro steps
I couldn't reduce the issue to a minimal setup for reproduction.
Environment
RenderDoc 1.1 64 bit Windows 10 D3D11 ( In-house graphics engine ) GeForce 1060