[PATCH 7/7] d3dx9: Support skip_constants parameter for effect.

Matteo Bruni matteo.mystral at gmail.com
Tue Jul 18 11:46:02 CDT 2017


2017-07-11 10:50 GMT+02:00 Paul Gofman <gofmanp at gmail.com>:
> On 07/11/2017 12:04 AM, Matteo Bruni wrote:
>>
>>
>>> +        for (j = 0; j < skip_constant_name_count; ++j)
>>> +        {
>>> +            if (!strcmp(cdesc[index].Name, skip_constants_names[j]))
>>
>> I assume the skip_constants thing isn't used often and, when it is,
>> very few constants (1-3) are in the list. If that's not the case, we
>> might want to use an rbtree for the constant names.
>>
>>
> The only program I know to use it is that one in the bug, and it uses ~5-6
> constants in the list.

That is also pretty low.

> It is not likely that we can expect much more
> constants somewhere. This loop affects effect creation only. Besides, I am
> not sure rbtree will provide much of optimization for such number of
> constants (and probably its creation effort is also should taken into
> account), the optimization would require some profiling on this. I would
> suggest to leave it as a plain array lookup and not to make this part more
> complicated. If we ever find reasonable to optimize effect creation, I
> suppose there are much wider used parts to start from. What do you think?

Yep, agreed.



More information about the wine-devel mailing list