[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Public WebGL] webgl texture format conversions: doable in 17k of executable code (x86-64) !
- To: Benoit Jacob <bjacob@mozilla.com>
- Subject: Re: [Public WebGL] webgl texture format conversions: doable in 17k of executable code (x86-64) !
- From: Kenneth Russell <kbr@google.com>
- Date: Tue, 8 May 2012 11:24:42 -0700
- Cc: public webgl <public_webgl@khronos.org>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding:x-system-of-record; bh=V1joZWDwR+Tr/tvapPnEN8q5G6Srboct95uDNOmnDvU=; b=hAWWYAbWU59ctX5kccvYsmVsy8hh+OI8uNAKLvc+4fNFyInNpQZoecKEBS8BE2t7KD vDPKTeq4bSCiOqziRON67wzPftx5iwYBBFNZMJj7GPrVvV12IFfyhDGD04IytjsyajKX P3VSo5pDYWt25UcH/hBtNVrDK63d0/QVkxjxO8eQiLq5EJOdpq61hEqE3u9lrJJoOLWS AO1BWvamxxNkMkZjFvEMtZTfQBQmiPl5bF8XF906bOdaFRvLufTWjKk+pRzmTPZx/l4+ eKZC2GmlN+IwFJF06R3pnz92tsbEwZ8xBnxavNgbdkVyV2XFeCvNeuaiFpjkK2iRy2wE h5uQ==
- In-reply-to: <756322726.3637398.1336485951321.JavaMail.root@mozilla.com>
- List-id: Public WebGL Mailing List <public_webgl.khronos.org>
- References: <2062929252.3633086.1336485716302.JavaMail.root@mozilla.com> <756322726.3637398.1336485951321.JavaMail.root@mozilla.com>
- Sender: owner-public_webgl@khronos.org
Nice work! Thanks for contributing this to the community. I'm looking
at integrating your new code back into WebKit now.
-Ken
On Tue, May 8, 2012 at 7:05 AM, Benoit Jacob <bjacob@mozilla.com> wrote:
>
> Hi,
>
> This email is 50% bragging rights and 50% sharing hopefully useful info with other browser vendors.
>
> You know that a WebGL implementation has to handle a large number of cases of texture format conversions: there are many source formats, many destination formats, and the possibility of premultiplication or unpremultiplication.
>
> Here is a changeset (currently only on mozilla-inbound) that brings this code size down to 17k on x86-64 (as measured with nm -S on linux). Our previous version, which was already quite careful, was 44k. This is using the 'fully templatized' approach i.e. a separate conversion loop is compiled for each case, traversing the bitmaps only once, with all the texel conversion functions inlined into it.
>
> Changeset:
> https://hg.mozilla.org/integration/mozilla-inbound/rev/9f87dbd4d39c
>
> The key was to avoid compiling paths that are never called, the code for this is there:
> https://hg.mozilla.org/integration/mozilla-inbound/rev/9f87dbd4d39c#l4.82
>
> Cheers,
> Benoit
>
> -----------------------------------------------------------
> 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:
> unsubscribe public_webgl
> -----------------------------------------------------------
>
-----------------------------------------------------------
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:
unsubscribe public_webgl
-----------------------------------------------------------