[WINED3D 5/5] Remove constant type field in stateblock.

Ivan Gyurdiev ivg2 at cornell.edu
Tue Jun 6 03:54:17 CDT 2006

Hi Raphael,
Strange, your email shows up as an attachment.

 > +    int i, cnt = min(count, MAX_VSHADER_CONSTANTS - (start
 > + 1));
 > should be:
 >   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.

 > Anyway what windows do if (start + count >
 > 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.

More information about the wine-devel mailing list