Search Issue Tracker
Fixed in 5.4.0
Votes
0
Found in
5.4.0a6
Issue ID
755070
Regression
No
[HardwareInstancing][DX] GPU instancing stops working after changing DX mode at runtime
Steps to reproduce:
1. Open Unity;
2. Open attached project and 'Main.unity' scene;
3. Enter Play Mode;
4. Open 'Rendering' tab in the Profiler window;
5. Notice that there are instanced draw calls batched together, that proves that GPU instancing works correctly;
6. Go to Edit --> Project Settings --> Player;
7. Switch Graphics API to DirectX 9 by dragging 'Direct3D9' field on top of 'Direct3D11' field;
8. Enter Play mode;
9. Observe the Profiler;
10. Notice that graphics mode is switched and instancing stopped working (as expected - DX9 is not supported for instancing);
11. Stop the scene;
12. Switch DX mode to DX11 again;
13. Enter Play mode;
14. Observe the Profiler and Scene/Game View.
Actual result:
- Non-instanced draw calls has been increased by 1000 times (form 50 to 50000) and instanced draw calls are increased by more than 10 times (from 5000 to 50000;
- The scene rendering is broken (it doesn't look like when initially starting the scene in DX11).
See attached gif video and actual.png screenshot.
Expected result:
After switching back to DX11 mode draw calls and scene rendering in Scene/Game view should be the same like they were when initially starting the scene. Most of the calls should be batched together.
See attached expected.png screenshot.
Workaround is to restart Editor when swithing back to DX11 - in this draw calls are batched and rendering is correct.
Notes:
- Reproduces on Windows 10 for Unity 5.4.0a6 and 5.4.0b1;
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Mono Windows Builds don't produce full log callstacks when generating logs
- AssetBundles fail to load when running in Built Players for Mobile Devices
- UI elements with text gets bigger and grey when Player window is moved to another screen with different resolution
- System name accepts multiline text but crops it on confirmation, duplicates input, and shrinks the field when empty
- UI element scale and position are wrong in project build when DRS is changed with HDR and Software Dynamic Resolution enabled
Add comment