GameTechDev/XeGTAO

cannot run the demo

Closed this issue · 16 comments

just crash at startup

image

Thanks for the report!! Seems like a DirectX crash - can you perhaps run in Debug and let me know what warnings appeared on the output (or attach the "log.txt" from the /Build folder where the executable is)? Also, what GPU are you using? Many thanks!

Seeing this as well although at a different spot. Using an Nvidia RTX 3090

log.txt

image

image

the crash is the same as the link.

log.txt

here is the output.txt

and the GPU is AMD 6800XT

i just do not think it is relevant with graphics cards

here is the output message in Debug

file 'vaRenderMaterial.hlsl' for 'lib_6_3', entry '', not found in cache; recompiling...
file 'vaRenderMesh.hlsl' for 'vs_6_3', entry 'VS_Standard', not found in cache; recompiling...
file 'vaRenderMaterial.hlsl' for 'ps_6_3', entry 'PS_Forward', not found in cache; recompiling...
file 'vaRenderMaterial.hlsl' for 'ps_6_3', entry 'PS_RichPrepass', not found in cache; recompiling...
file 'vaRenderMaterial.hlsl' for 'lib_6_3', entry '', not found in cache; recompiling...
file 'vaRenderMesh.hlsl' for 'vs_6_3', entry 'VS_Standard', not found in cache; recompiling...
file 'vaRenderMaterial.hlsl' for 'ps_6_3', entry 'PS_Forward', not found in cache; recompiling...
file 'vaRenderMaterial.hlsl' for 'ps_6_3', entry 'PS_RichPrepass', not found in cache; recompiling...
file 'vaRenderMaterial.hlsl' for 'lib_6_3', entry '', not found in cache; recompiling...
D3D12 ERROR: ID3D12CommandList::ClearUnorderedAccessViewUint: Specified GPU descriptor handle ptr=0x240 does not refer to a location in a descriptor heap. UnorderedAccessViewGPUHandle is the issue. [ EXECUTION ERROR #646: INVALID_DESCRIPTOR_HANDLE]
D3D12: BREAK enabled for the previous message, which was: [ ERROR EXECUTION #646: INVALID_DESCRIPTOR_HANDLE ]
Exception thrown at 0x00007FFD55B54F69 (KernelBase.dll) in VanillaD.exe: 0x0000087A (parameters: 0x0000000000000001, 0x00000070A42F5B70, 0x00000070A42F7940).
Unhandled exception at 0x00007FFD55B54F69 (KernelBase.dll) in VanillaD.exe: 0x0000087A (parameters: 0x0000000000000001, 0x00000070A42F5B70, 0x00000070A42F7940).

Noted, thanks for the output message in Debug - that points to a specific place related to clearing UAVs. I don't know what it could be but I'll dig in and investigate and keep you all posted.

I couldn't reproduce it on any of my systems but I don't have an AMD RX 68XX, only earlier modesl. However had another identical report on RX 6600. I think I might just replace all UAV clearing with manual 'clear' compute shaders, which will potentially be a bit less efficient but should solve this and simplify some other stuff with descriptors as well.

can i ask about why this happened?

I'm not entirely sure - could be user error or driver error - hard to debug without access to RX 68XX. The error message that you get says that the GPU descriptor handle isn't on a descriptor heap, but that really shouldn't be the case.

I have a buffer with two Unordered Access Views on it: one is used to access it as a RWStructuredBuffer and another plain R32_UINT used only for clears. Then, for ClearUnorderedAccessViewXXX, as Sergio explained on the gamdevnet post, you need two descriptors from two different heaps: CPU descriptor from a non shader visible heap and GPU descriptor from a shader visible heap, because "some GPUs require the descriptor in GPU visible memory, while others use the data that is copy to the command list when you call the method (clear in this case), so the API force you to have both so it will run on any GPU.".

I think I'm doing all by the specs but I'm not sure - if I'm not, then the DX12 debug layer doesn't notice it on Nvidia & Intel GPUs so I get no warnings. Or, it could be a driver error on AMD.

Since it's a non-common use case and the whole ClearUnorderedAccessViewXXX API seems a bit wonky, I've removed the whole ClearUAV path for buffers and switched to manually resetting the values by copying via upload buffer (since it's a tiny buffer anyway).

When I update the codebase, I'll post here to let you know - hopefully that will fix it for you!

Hi, sorry for the delay, latest merge #5 contains changes that should fix this.

Please let me know if it helps!

(Also disabled bundle command lists in 1e897962e9a79dbaf5c007514216c39070520894 as it could be causing an unrelated but similar issue on the same HW)

sorry for the late check, and the answer is still no. here is the result. happy to help

image

Ah, thanks hyc0612, we're back to UAV clears except it's the 2D texture this time, not a buffer. I suppose I could replace that with a manual clear - I'll dig into it and let you know when it's there :)

Ok, all UAV clears replaced by manual compute shader-based clears. hyc0612, can you please try again? :) Thanks!

Fantastic, thanks for letting me know hyc0612! I'll close the issue - all the best! :)