[PATCH] d3dx9_36: Implement D3DXCheckTextureRequirements + tests
paulo lesgaz
jeremielapuree at yahoo.fr
Mon Apr 19 06:08:07 CDT 2010
Maybe this function should be in util.c.
A+
David
--- En date de : Lun 19.4.10, Henri Verbeet <hverbeet at gmail.com> a écrit :
De: Henri Verbeet <hverbeet at gmail.com>
Objet: Re: [PATCH] d3dx9_36: Implement D3DXCheckTextureRequirements + tests
À: wine-devel at winehq.org
Date: Lundi 19 avril 2010, 11h43
On 19 April 2010 09:43, Christian Costa <titan.costa at wanadoo.fr> wrote:
> +BOOL is_pow2(UINT num)
> +{
> + UINT i;
> +
> + if (!num) return FALSE;
> + for (i = 0; num >> 1; i++) num >>= 1;
> +
> + return (num << i) == num;
> +}
This should at least be static. You can also just replace it with
"return !(num & (num - 1));". You don't care about 0, since you
already check that earlier in D3DXCheckTextureRequirements().
make_pow2() can probably be simplified as well.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20100419/1b6ac3d0/attachment.htm>
More information about the wine-devel
mailing list