When the size of Buffer<int>exceeds 65535, the atomic addition operation performed on the portion of Buffer that exceeds 65535 will not truly take effect.
I tested it using UE5's compute shader.
I tested it on MediaTek Dimensity 9300, which is G720. Is this a driver issue or a hardware limitation?
Qualcomm's Snapdragon 8Gen3 does not have this issue
Are you using any mediump/relaxed precision in your shader? Does it still happen if you remove that?
When you say "size" do you mean number of bytes or number of ints?
It's hard to be more specific without more information - please can you share your shader? You can contact developer@arm.com if this is not something you can share publicly.
Kind regards, Pete
The driver team confirm that we do indeed have a compiler erratum that truncates the index of buffers atomics array accesses to 16-bits, which matches the fault that you are seeing. We don't know of any "neat" workaround unfortunately, so the options are really:
Thanks for your reply!65535 indeed refers to the number of ints in the buffer.
Is it possible to update the driver and then OTA it to the user's phone for this issue? Although I know that many users do not update their phone systems frequently.
Will this issue occur on Mali-GPU other than G720?
We don't yet have a driver shipping with a fix - we found the erratum recently - but it will be in an Arm driver release "soon". We don't control whether OEMs take our driver updates or back-port fixes - many do not unfortunately - so I can't really provide any useful insights there.
This issue impacts all Arm GPUs, it's not restricted to Mali-G720 series.