Search Issue Tracker
Won't Fix
Won't Fix in 6000.4.X
Votes
0
Found in
6000.0.60f1
6000.2.8f1
6000.3.0b6
6000.4.0a2
Issue ID
UUM-122634
Regression
No
Constant buffers are redundantly uploaded when consecutive compute dispatches are executed on DirectX11
Reproduction steps:
1. Open the attached project "ReproProj"
2. Open the “/Assets/Scenes/SampleScene.unity” Scene
3. Right-click on the Game view tab and select “Load RenderDoc“
4. Enter the Play mode
5. Select the “Camera“ icon at the top of the Game view to take a RenderDoc Capture
6. Load Capture in RenderDoc
7. In the Event Browser, filter by term “ExecuteSetPositionsBuffer“
8. Expand “UIR.DrawChain“
9. Expand “SceneCamera.Render“
10. Select “ExecuteSetPositionsBuffer“
11. Remove the search term and press the “Enter” key
12. Expand “ExecuteSetPositionsBuffer“
13. Observe the first and second dispatch
Expected result: The second Map/Unmap/CSSetConstantBuffers sequence is skipped
Actual result: CSConstantBuffer-0-16 is being Map/Unmap twice between two consecutive Dispatch calls
Reproducible with: 6000.0.60f1, 6000.2.8f1, 6000.3.0b6, 6000.4.0a2
Reproducible on:
Play Mode
Could not test on:
Windows Standalone Player (Assets\Scripts\MeshSaverEditor.cs(7,40): error CS0246: The type or namespace name 'MenuCommand' could not be found)
Testing environment: Windows 10 Enterprise 21H2
Not reproducible on: No other environment tested
Notes:
- Reproducible with DX11
- Not reproducible with DX12
- Reproduction code is present in “RedundantConstantBufferTest.cs”
- Forum threads: https://discussions.unity.com/t/redundant-constant-buffer-writes-between-compute-shader-dispatches/1681303 , https://discussions.unity.com/t/3-questions-about-compute-shader-performance/857993
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- “FMOD failed to set the software format to the custom sample rate…” warnings are thrown as System Sample Rate value is being changed in Audio section of Project Settings window
- VFX Marquee selection does match the visual indicator
- “Invalid AABB aabb” errors are spammed when “Infinity” value is entered in Collider Component fields
- Editor Role does not sync with the MPPM Play Mode Scenario Role when entering Play mode
- Long asset names cause overlap with the “Find” function in search result tabs
Resolution Note:
Unity's existing implementation of compute dispatch does not know if constant buffer contents have changed and so this update is expected between each dispatch.
We constantly consider performance improvements to Unity and will consider this feedback in future work.
Resolution Note (6000.4.X):
Unity's existing implementation of compute dispatch does not know if constant buffer contents have changed and so this update is expected between each dispatch.
We constantly consider performance improvements to Unity and will consider this feedback in future work.