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. 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.