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
- 2D Physics Queries do not state that results are sorted into ascending distance order.
- Feet slide and misalign when playing retargeted animations
- IndexOutOfRangeException is thrown in NativePassCompiler when a graphics buffer is used in more than 5 render passes
- "Undo Stack Overflow" error is thrown, and Undo History is deleted when multiselected GameObjects are reparented to their GrandParents
- SearchColumn of type "ObjectReference" does not get refreshed for the custom SearchProvider when lighting generation finishes
Add comment