-
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 struct constructors/initializers bug on Chrome on Andriod in fragment (maybe vertex?) #1302
Comments
Reproduceable issue on Nexus 5 with latest Andriod OS and Chrome as of November 7, 2015. |
Thanks @bhouston for this bug report. Could you please help us out by creating a small test case for this problem? We have multiple outstanding bug reports against multiple GPUs right now (most of which are probably bugs in the drivers) and it would really speed up the process if you could create a small test in this directory: https://github.com/KhronosGroup/WebGL/tree/master/sdk/tests/conformance/glsl/bugs which you've verified reproduces the problem. |
P.S. It would be best if you didn't copy the shader verbatim but rather reduced it to the minimum one which reproduces the problem. |
#1316 addresses this issue. |
Yes. A conformance test's been added for this problem and a bug's been filed with Qualcomm. I hope it will be fixed in a future Android release. Closing as fixed (there's nothing more that can be done from the WebGL implementers' standpoint). |
(Per @kenrussell's request here: mrdoob/three.js#7556 (comment))
So on the ThreeJS project we ran into a unique problem on Chrome on Android after we adopted structs in a lighting code refactoring. On Chrome on Android (but no on Chrome on OSX, Chrome on Windows, IE/Edge on Windows, Firefox on Andriod, Firefox on Windows, or Safari anywhere) it appears that struct constructors/initializers (I'm not sure of the proper name) do not actually initialize the struct contents, they remained zeros. We worked around this bug with this PR:
mrdoob/three.js#7556
You can see that this above PR didn't do anything but avoid using the struct initializer/constructors. This fixed the issue.
I am not complete sure, but think that the struct initializers in the vertex shader worked, but not in the fragment shader, but I avoided their use in both cases in this PR anyhow, just to be safe.
Here it the light refactoring PR in ThreeJS that exposed this issue: mrdoob/three.js#7324
Thus I suggest that struct initializer in both the vertex and fragment shader be added as a test to the WebGL conformance suite.
The text was updated successfully, but these errors were encountered: