[v10 1/4] d3dx9: Implement fxlc constants (expressions) in effect.

Matteo Bruni matteo.mystral at gmail.com
Wed Apr 13 14:53:47 CDT 2016

2016-04-12 11:41 GMT+02:00 Paul Gofman <gofmanp at gmail.com>:
> On 04/11/2016 07:52 PM, Matteo Bruni wrote:
>>> +        if (oi->func_all_comps)
>>> +        {
>>> +            if (oi->input_count * ins->component_count > ARGS_ARRAY_SIZE)
>>> +            {
>>> +                FIXME("Too many arguments (%u) for one instruction.\n", oi->input_count * ins->component_count);
>>> +                return E_FAIL;
>>> +            }
>> I think this check should be outside of the if (oi->func_all_comps) block.
>     For 'else' case all the components are not put in this array
> together, only oi->input_count arguments at once. I could add such a
> check in else but this would effectively be a plain static check that
> ARGS_ARRAY_SIZE >= MAX_INPUTS_COUNT, so I left this unchanged for now.

Right, I probably misread that.

>     BTW I encountered d3ts_dotswiz preshader opcode which can take 6 or
> 8 arguments. Adding it required the appropriate increase of
> MAX_INPUTS_COUNT and a bit different handling of op table (not to
> introduce a variable input count in instructions and not to take back
> the input arguments count into instruction structure), but
> ARGS_ARRAY_SIZE remained unchanged.

Cool. How did you test that 6 and 8 are the only possible argument counts?
I don't know how you changed the opcode handling but otherwise you
could probably just use two separate opcodes for dotswiz 6 and dotswiz

More information about the wine-devel mailing list