[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Public WebGL] maximum length of identifiers in WebGL GLSL
On Fri, Jul 30, 2010 at 1:51 AM, Cedric Vivier <firstname.lastname@example.org>
On Fri, Jul 30, 2010 at 06:11, Gregg Tavares (wrk) <email@example.com>
I didn't see one in the GLSL spec. I was going to write a test with really long identifiers (4meg) to see if I could find some drivers that had problems with them but it might be better to just require WebGL to enforce some maximum length. 64 chars? 128 chars? 256 chars which will make shaders less likely to fail on some drivers.
The results of the test you were going to write would be great to decide if and how big the limit should be I guess ;-)
Coincidently I was going to post a similar question with regards to gl_MaxVertexUniformVectors, gl_MaxFragmentUniformVectors and gl_MaxVaryingVectors ; they do not exist on GL desktop so I guess a GLSL ES to GLSL validator/translator needs to do something here.
Should the translator replace references to those with a literal value as in ES 2.0 spec (ie. 256, 256 and 15 respectively) or use a calculated value using the desktop's gl_Max**Components* with some formula to find the **Vector* equivalent ?
The translator already does this and uses values queried from GL
max_fragment_uniform_vectors_ /= 4;
max_varying_vectors_ /= 4;
max_vertex_uniform_vectors_ /= 4;