[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Public WebGL] Spec change request.
- To: Chris Marrin <email@example.com>
- Subject: Re: [Public WebGL] Spec change request.
- From: Steve Baker <firstname.lastname@example.org>
- Date: Mon, 06 Dec 2010 18:28:26 -0600
- Cc: public webgl <email@example.com>
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed; d=sjbaker.org; h=message-id :date:from:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; s=sjbaker.org; bh=QZjVE QK7AKNDLNabShw5/oJsiOc=; b=d/ot4uiTg3C5be51RfLJh56i5lnLX4f3FGipm Ifg3tago8oFs6IiTqonW6GsWEy2wDXRlRtnkdXUqD4zhcb1gl8Ekzc6q2nYsNwRH bYRiNIhRgsU7uMEce9y7rETrXF8EgqrlyPiaGQYFycbp4YjHvLsRRIKW76LP1lbd 3fLVlk=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=sjbaker.org; h=message-id:date :from:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; q=dns; s=sjbaker.org; b=k/OhUKyUJyrZ+lwWS7MqxtC05XxShc90atfEAHijvFWH+qVTphr1Bw3eGd1Ft r0ast9p/3pPtM4RtV5q3aJMeJIxD3MmVR6hvgjBiiHBgwZk1M9InwT6Np5DL8oqk 8r1VzSARIcH/bjwEGEb3NK4wehGsJRBgjTN7z2E3scBW88=
- In-reply-to: <54F31E4E-976A-4D06-8A1D-FFBBB8027D6A@apple.com>
- List-id: Public WebGL Mailing List <public_webgl.khronos.org>
- References: <4CFB0851.firstname.lastname@example.org> <54F31E4E-976A-4D06-8A1D-FFBBB8027D6A@apple.com>
- Sender: email@example.com
- User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:188.8.131.52) Gecko/20100520 SUSE/3.0.5 Thunderbird/3.0.5
On 12/06/2010 04:17 PM, Chris Marrin wrote:
> On Dec 4, 2010, at 7:34 PM, Steve Baker wrote:
>> When I benchmark my rendering code - I find that an unreasonable
>> percentage of the time is spent doing this:
>> if ( someUniformLocation != null )
>> <==== THIS!
>> gl.uniformXXX ( someUniformLocation, XXX ) ;
>> ...in situations where a uniform variable might not exist in the shader
>> in some rendering passes but does exist in others (eg, when the shadow
>> and depth rendering passes don't need to see textures and such).
>> Losing the 'if' test would speed things up significantly.
>> It would be a performance win if all of the various uniform setter
>> functions would legally accept a 'null' location (and do nothing)
>> without flagging an error in that circumstance. An 'if' in C++ (which
>> you're probably doing anyway in order to do error detection) is much
>> Any chance of a spec change?
> What happens today if you get rid of the if? Coredump? Failed rendering? Nothing bad?
It used to generate an error - but not any more...evidently the spec
changed in exactly the way I was requesting...I just hadn't noticed the
change. I removed the 'if' and everything works exactly the same...and
I get back a little performance...and every little helps!
You are currently subscribed to firstname.lastname@example.org.
To unsubscribe, send an email to email@example.com with
the following command in the body of your email: