#Graphics.DrawMeshInstanced causes editor crash when using in RPManager.beginCameraRendering?

1 messages · Page 1 of 1 (latest)

lean monolith
#

I started using RenderPipelineManager.beginCameraRendering to render my instanced grass for each camera and cull it by distance for each camera separately. Over time, the editor crashes, and it happens only when I minimize it. If I stay in the window, everything is fine, but as soon as I minimize it for 10 seconds, it crashes immediately.

Logs:
https://pastebin.com/Xqvn6C6R

The most interesting part in the logs:

Assertion failed on expression: 'm_CmdState == kActive'
Crash!!!
d3d12: swapchain present failed (887a0005).
d3d12: swapchain present failed (887a0005).
d3d12: Device failed error (887a0005).
d3d12: Device removed reason (887a0006).
d3d12: GfxDevice was not out of Local memory
d3d12: Local memory usage:
 Budget: 7618953216
 CurrentUsage: 642113536
 AvailableForReservation: 67108864
 CurrentReservation: 3943694336
d3d12: GfxDevice was not out of Non-Local memory
d3d12: Non-Local memory usage:
 Budget: 16335927296
 CurrentUsage: 545198080
 AvailableForReservation: 0
 CurrentReservation: 8302181376

GrassRenderer:
https://pastebin.com/Q7ywEGET

Before that, I got a scene view camera in editor mode and the main camera in play mode, and everything worked fine. The number of instances is ~7.5k, the number of visible instances is ~1.5k at a rendering distance of 100 m.

I'm using 6000.3.4f1 version

lean monolith
#

it is a dx12 issue, with dx11 it doesn't crash. It seems like this is a dx12 backend problem

plucky grove
#

It's not necessarily a dx12 backend issue. Dx12 is just less forgiving. It's very likely there is a real issue either on your side or possibly even a combo of several programs that use the gpu. Overlay apps are an often culprit.

plucky grove
#

The error code is pointing to a GPU hung. It might help looking at the shader you're using for that draw.

lean monolith
plucky grove
#

I see. Well, I guess if you're fine with dx11, there's no point to pursue this.