-
Notifications
You must be signed in to change notification settings - Fork 670
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GLSL ES 3.0 uint on Adreno 5xx/6xx #2989
Comments
Casting value twice fixes the computation: int v2 = int(uint(uint(d.x & 0xFE000000)) >> 25U); The issue doesn't seem to be present on Intel, NVIDIA, or ARM Mali chips. |
Same bug on Adreno 630 and Adreno 512. |
Thanks for the report. Could you please provide a reduced conformance test covering this under https://github.com/KhronosGroup/WebGL/tree/master/sdk/tests/conformance2/glsl3 ? Bonus points if you can see whether this is already covered under the drawElements tests, which are the OpenGL ES test suite on Android: |
Exposes bug on Adreno GPUs with shifting of uint values in shaders. Casting the value twice (uint(uint(int))) produces correct result. Vector types are not affected. Fixes #2989.
From the spec:
Shift operators (
<<
) and (>>
)And (
&
)Conversion and Scalar Constructors
Following the definitions above, these two expressions must produce the same value.
On Adreno 5xx (checked 508 and 540) devices,
uint(...)
cast is apparently ignored, so the right shift always operates on a signed value.The text was updated successfully, but these errors were encountered: