I have a vertex shader that uses 2 array uniforms, and a for loop to iterate them:
This shader runs flawless on a variety of devices, except "some" (mostly Galaxy S4 / ACE, the common factor is being adreno 200/320 GPU) where the line with pt[i] gives error during compile/link:
1. In some cases there is no error message text at-all
2. In other cases there is error text "SEMANTIC-20 (line 33) Indexing with an integral constant expression greater than declared size"
3. (this seems to be the exception rather than the rule) on some S4 models it runs without issue (maybe a driver difference); which is a pitty, since I am unable to reproduct the issue on Samsung Remote Test labs device (hampering my effort to find a workaround).
OpenGL ES 2.0 shader language spec says that for Uniforms, array indexes can be "Any integer"; the for loop also is within spec AFAIK.
Please advice on how to work around this? (willing to share entire shader code if so required)
Thank you in advance, any help would be greatly appreciated.
Worked around issue by unrolling the loop manually, eliminating the 'for' construct; so far no more reports of the issue.