[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Public WebGL] Re: maximum length of identifiers in WebGL GLSL



OK - so we have:

     abcdefg.hijklmnop.qrstuv.wxyz

Are we talking about the length of the whole thing - or just the length
of one part (like 'qrstuv' in the example above)?

* If it's the latter, then (IMHO) a 64 character limit is fine - nobody
likes to type 64 character variable names!
* If it's the former then 64 is perhaps a little tight and we should
consider requiring 128...although I guess I could live with 64 if it
were absolutely necessary.

  -- Steve

Vladimir Vukicevic wrote:
> I would be fine with a 128 character limit; 64 might also be fine, but I worry that someone making extensive use of structs could end up with some fairly lengthy identifiers.  64 is still a good bit even with structs though; does anyone have any experience with long identifiers in actual real-world GLSL?
>
>     - Vlad
>
> ----- Original Message -----
>   
>> ping.
>>
>>
>> Anyone have an opinion on this?
>>
>>
>> There are 2 issues.
>>
>>
>> Issue #1: It's possible a GL driver could be exploited by passing it
>> giant identifiers. Examples.
>>
>>
>> ctx.bindAttribLocation(program, 4MegIdentifier, location);
>> ctx.shaderSource(shader, shaderWith4MegIdentifiers, ...);
>>
>>
>> Issue #2: Having a Min/Max identifier size of WebGL means programs
>> will be more likely to work across platforms.
>>
>>
>> Right now one platform might have a 64 character limit, another a 128
>> character limit. If you're developing on the 128 character limit
>> system you won't know your WebGL program is not going to work on some
>> other system. If instead the spec says it must support 128 characters
>> to be WebGL conformance than an system who's OpenGL driver does not
>> support 128 character will either need a new driver or the WebGL
>> implementation will need to alias the ids. In either case WebGL
>> becomes more compatible across system.
>>
>>
>> Note that the GLSL translator everyone is currently using already has
>> a 128 character limit but it would be nice if that limit (or some
>> limit) was formalized in the spec.
>>
>>
>>
>>
>>
>>
>>
>> On Thu, Jul 29, 2010 at 3:11 PM, Gregg Tavares (wrk) < gman@google.com
>>     
>>> wrote:
>>>       
>> Do we want to specify a maximum identifier length for WebGL GLSL?
>>
>>
>> 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.
>>
>>
>> Thoughts?
>>     
> -----------------------------------------------------------
> You are currently subscribed to public_webgl@khronos.org.
> To unsubscribe, send an email to majordomo@khronos.org with
> the following command in the body of your email:
>
>   

-----------------------------------------------------------
You are currently subscribed to public_webgl@khronos.org.
To unsubscribe, send an email to majordomo@khronos.org with
the following command in the body of your email: