----Message d'origine----
>Date: Tue, 06 Jun 2006 04:54:17 -0400
>De: Ivan Gyurdiev <ivg2(a)cornell.edu>
>A: fenix(a)club-internet.fr
>Copie à: wine-devel(a)winehq.org
>Sujet: Re: [WINED3D 5/5] Remove constant type field in stateblock.
>
>Hi Raphael,
>
>Strange, your email shows up as an attachment.
Yes it's my webmail who have strange behaviors :(
> > + int i, cnt = min(count, MAX_VSHADER_CONSTANTS - (start
> > + 1));
> > should be:
> > if (start > MAX_VSHADER_CONSTANTS - 1) return WINED3DERR_INVALIDCALL;
> > UINT i, cnt = min(count, MAX_VSHADER_CONSTANTS - (start + 1));
>
> > as count and start are UINT (better to avoid ugliy
> > unsigned/signed bugs).
>
>The current code checks if cnt < 0 later on.
Yes but it was buggy :)
MAX_VSHADER_CONSTANTS - (start + 1) can result on an unsigned overflow
> > Anyway what windows do if (start + count >
> > MAX_VSHADER_CONSTANTS) ?
> > The code seems handle this case truncating the input
>
>It's possible that this is buggy [ I always thought it was off by one ],
>or not handling this case properly. However, I've just copied the code
>that was already there - unrolled the existing SetConstant function into
>its callers, and made the change I was interested in. Fixing other bugs
>would go into a separate patch.
Ok, fine for me
Waiting for more patches to review :)
I'm really waiting to get my new GC to test
last impressive work on shaders.
Regards,
Raphael