Search Issue Tracker
Third Party Issue
Votes
0
Found in
2022.3.61f1
6000.0.47f1
6000.1.0b15
6000.2.0a9
6000.3.0a1
Issue ID
UUM-103217
Regression
No
[Android] The calculation results differ on some devices when the code uses half-precision variables and/or has an if statement with branching
Reproduction steps:
1. Open the attached “IN-99292“ project
2. Build and Run the Android Player
3. In the Player, slide the slider all the way to the right and wait a few seconds
4. Slide the slider back to the left
5. Observe the animated squares
Expected result: The animation on all squares is the same
Actual result: The animation on the bottom right and/or top right squares differs from the others
Reproducible with: 2022.3.61f1, 6000.0.47f1, 6000.1.0b15, 6000.2.0a9
Couldn’t test with: 2022.1.0b1 (BuildFailedException: Burst compiler (1.8.21) failed running)
Reproducible environments: macOS 15.4 (M3 Max)
Not reproducible environments: No other environments tested
Reproducible with these devices:
VLNQA00460 - Google Pixel 6 (Pixel 6), CPU: Google Tensor (Whitechapel), GPU: Mali-G78, OS: 14
Reporter’s info - Pixel 8 Pro, CPU: Google Tensor G3, GPU: Immortalis-G715s
Reporter’s info - Motorola Moto G24, CPU: Mediatek MT6769Z Helio G85, GPU: Mali-G52
Not reproducible with these devices:
VLNQA00519 - Google Pixel 4 (Pixel 4), CPU: Snapdragon 855 SM8150, GPU: Adreno 640, OS: 12
VLNQA00372 - Galaxy S21 5G (SM-G991U), CPU: Snapdragon 888, GPU: Adreno 660, OS: 12
Reporter’s info - ASUS ROG Phone
Notes:
- Reproduces on Mali GPUs
- In 2022.3.61f1 and 6000.0.47f1, the bottom right animation differs (half-precision: true, branching: true)
- In 6000.1.0b15 and 6000.2.0a9, both the top and the bottom right animations differ (half-precision: true, branching: any)
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
- Tile Palette grid is moved after entering Play Mode
- Tile Palette Edit mode turns off in Play Mode
- The Editor crashes when Generating Font Atlas in the Font Asset Creator with “9999999999” padding and 256x256 Atlas Resolution
- [iOS] An “ArgumentNullException” error is thrown when GetIntroductoryPriceDictionary() method is called
- Font Import Settings documentation page is missing when the documentation button is pressed in the Inspector window
Resolution Note:
GLSL ES Specification 3.20 defines precision qualifiers as:
> highp floating-point values are stored in IEEE 754 single precision floating-point format. mediump and lowp floating-point values have minimum range and precision requirements as detailed below and have maximum range and precision as defined by IEEE 754.
Specification description of precision qualifier boils down to:
- highp float must be 32bit single precision floating-point format
- mediump float has minimum requirement of 16bits
- lowp float has minimum requirement of 9bits
For your calculation to work, you need full 32bit precision. Adreno devices in vertex stage for lowp and mediump implement 32bit numbers, so there is no artifact. As for Mali device, lowp and mediump is represented with 16bit floating point format. When float gets bigger, precision with fraction part is lost. This is why, image offset appears to be degrading by the steps of 1/8, 1/4, 1/2 and then 1. We would suggest using highp for this calculation as either way you are promoting it to highp before sending it to next stage