[4/5] wined3d: Use a bitmask to store which bool and int constants are set.

Alexandre Julliard julliard at winehq.org
Wed Dec 3 03:17:57 CST 2008


"Henri Verbeet" <hverbeet at gmail.com> writes:

> 2008/12/3 Juan Lang <juan.lang at gmail.com>:
>>> Why is this a good thing - this just artificially caps your constants at
>>> 32. If I remember correctly I had to change shaders to do the exact
>>> opposite change, because newer versions introduced more than 32 constants.
>>
>> I agree with you, this is a questionable change.  The benefit in
>> reduced data results in a gain of code size and runtime cost.
>> --Juan
>>
> Perhaps setting constants becomes slightly more expensive this way,
> but I'm not convinced it's very significant. The more performance
> critical code that applies the constants becomes significantly cheaper
> though.

I expect most operations will become faster, because the data is more
likely to be kept in cache and in registers. It could probably be made
even more efficient by getting rid of most of the remaining loops.
I think it's a very reasonable change, using array of BOOLs is really
wasteful.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list