[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Public WebGL] Re: maximum length of identifiers in WebGL GLSL
- To: "Gregg Tavares (wrk)" <email@example.com>
- Subject: Re: [Public WebGL] Re: maximum length of identifiers in WebGL GLSL
- From: Thatcher Ulrich <firstname.lastname@example.org>
- Date: Mon, 2 Aug 2010 17:03:01 -0400
- Cc: public webgl <email@example.com>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=gDie58wNFcCy2zANfmnBJPidYVsJ7+EuQ5h4lDgVrfI=; b=QifJixU9gTk1tRkIj4R96Sd0krWCwYx/Qqs89wwnLZyuWkeuzOpi7agHeNCVzhogAo fA17ZrWh61oBeiqPB5Hs51U/n747Mrf8cmIaaCU0J4Ki6xnKXKEvFMpKgzoUoofDCeDG U2y9f7kXNsHHKYJ997vq4bRqvgtf37BPH637o=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=wlFZI3wG+Qi1S+ZYIGrtCF1GUG/Onh1LwQLL6hEk2KKHzsv1SzYG7+b3GArVwIxwRz +QlDNQARBO1N010J+9+VaEB12Amj1HTYRElcLt0IMgbK4WMetO04KWivWaIVnmA2z6lD QIyO7tEcpOFfamtD4wixQtwWdpRu7JjxAKIso=
- In-reply-to: <AANLkTi=8oQv81_a+8J5Ws7vCx+osj-ewK3O_kUfJWTMJ@mail.gmail.com>
- References: <AANLkTinPwuNQZnCXAkSJO5SFhf1bueO2bdpnV3FNSGHC@mail.gmail.com> <AANLkTi=8oQv81_a+8J5Ws7vCx+osj-ewK3O_kUfJWTMJ@mail.gmail.com>
- Sender: firstname.lastname@example.org
* a fixed specified limit is good.
* it should be a generous limit, since some devs will probably
machine-generate their shaders (think C++ name mangling etc). On the
other hand, a huge limit won't be exercised much. How about 256
chars? That should encompass all human-written shaders, and then
some. For machine-written shaders, it could be exceeded but it's
plenty of chars to generate a unique ID by hashing down a very long
On Mon, Aug 2, 2010 at 4:39 PM, Gregg Tavares (wrk) <email@example.com> wrote:
> 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) <firstname.lastname@example.org>
>> 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.
You are currently subscribed to email@example.com.
To unsubscribe, send an email to firstname.lastname@example.org with
the following command in the body of your email: