Search Issue Tracker
Fixed in 2022.2.X
Duplicate in 2020.3.X, 2021.3.X
Votes
0
Found in
2019.4
2021.2
2021.2.7f1
2022.1
2022.2
Issue ID
1389382
Regression
No
Unable to modify RWStructuredBuffer elements via indirect dispatch of a compute shader when using the Direct3D11 API
Reproduction steps:
1. Open project "dispatch_indirect_bug.zip"
2. Open Scene "TestScene"
3. Enter Play Mode
4. Observe Game view
Expected result: RWStructuredBuffer is modified and Scene's background color is green
Actual result: RWStructuredBuffer is not modified and Scene's background color is red
Reproducible with: 2019.4.36f1, 2021.2.15f1, 2022.1.0b11, 2022.2.0a7
Notes:
- Doesn't happen with OpenGLES3, OpenGLCore, Direct3D12 and Vulkan graphics API
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
- SystemInfo.get_graphicsDeviceName() is generating garbage GC Alloc when using Metal graphics API
- Crash on D3D12CommonShader::ApplyGpuProgram when attaching material which samples "_UnityFBInput0" to "Full Screen Pass Renderer Feature" Component
- SpeedTree meshes and objects count differs when comparing the numbers in the Player with the Editor
- Model and Prefab Preview icons are not updated after upgrading associated Materials to URP
- Game view is rendered white when viewing the Editor with HDR display and Post Proccesing is enabled on the Main Camera with 2D URP
Resolution Note (fix version 2022.2):
Fixed in: 2022.2.0a9
An indirect argument buffer needs to be given the correct buffer type to work on DX11
i.e. IndirectBuffer = new ComputeBuffer(3, sizeof(int), ComputeBufferType.IndirectArguments);
Although the project script will need changing, we are adding an additional message to indicate when a buffer without the correct flags is used with dispatch indirect