-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
Implemented global const array to shaders #32751
Conversation
Have you tested this on GLES2 devices that only support up to GL 2.1 or GL ES 2.0? I don't think constant arrays are possible in GLES2 devices. Edit: I just looked at the GL ES 2.0 GLSL spec and it says that it is implementation dependant. It does not require that constant array initialization be allowed. But implementers can allow it if they want. I ran into troubles with it in my GLES2 Glow PR as it caused certain low end devices to fail to compile the shaders. |
Yeah :( It may not be supported on all devices... I want to hear a @reduz decision about this. |
We may only allow it for static indexing on GLES2, but thats more work on the compiler on our side to validate.. |
18fd471
to
79010da
Compare
I've removed it from GLES2 backend and added a check to prevent its usage on that platform... |
485231f
to
889268e
Compare
Note: I rebase it again when Vulkan will be merged to the master |
Vulkan has been merged into master, this can be rebased now. |
889268e
to
5f254a4
Compare
Rebased again... |
682620e
to
cf59861
Compare
cf59861
to
96f0a0d
Compare
96f0a0d
to
636a9d9
Compare
This PR allowed const array to be declared outside of function.
As usual, when this will be merged I've add that to Vulkan too.