Reproduction steps:
1. Open the attached "ReproProj" project
2. In the Project window, click on the "Assets/MI_Light_01" material
3. In the Shader dropdown, search for "MI_Light_01" and select it
4. If it doesn't crash instantly, wait for a few seconds
5. Observe the crash
Expected results: Unity Editor does not crash
Actual results: Unity Editor crashes
Reproducible with: 2022.3.18f1, 2023.2.7f1, 2023.3.0b4
Could not test with: 2021.3.34f1 (No Forward+)
Reproducible on: Windows 11 Pro
Not reproducible on: No other environments tested
Notes:
1. Reproducible with other shaders in the project, such as "MI_DecalsGeo_01"
2. Not reproducible when Rendering Path is set to “Forward“ or “Deferred“
3. Reproducible with DirectX11 and DirectX12
4. When using DirectX11 A pop-up appears when the crash occurs with the following information:
”Failed to present D3D11 swapchain due to device reset/removed. This error can happen if you draw or dispatch very expensive workloads to the GPU, which can cause
Windows to detect a GPU Timeout and reset the device. (see https://docs.microsoft.com/en-us/windows-hardware/drivers/display/timeout-detection-and-recovery). If you believe this error is due to built-in Unity functionality, please submit a bug. This is an unrecoverable error and the editor will shut down.”
5. When using DirectX12 the Editor crashes with the following stack trace:
0x00007FF9AB48A02C (Unity) GfxDeviceD3D12Base::DrawBuffersCommon
0x00007FF9AB489B56 (Unity) GfxDeviceD3D12Base::DrawBufferRanges
0x00007FF9AB489E19 (Unity) GfxDeviceD3D12Base::DrawBuffers
0x00007FF9ACC7F8F4 (Unity) GfxDeviceWorker::RunCommand
0x00007FF9ACC82CFF (Unity) GfxDeviceWorker::RunExt