[v2 1/2] d3dx9: Add 'exp' preshader opcode.

Matteo Bruni matteo.mystral at gmail.com
Sun May 1 18:29:41 CDT 2016


2016-04-25 10:52 GMT+02:00 Paul Gofman <gofmanp at gmail.com>:

> +    op_step = 2 + (args_count + 1) * 3;

You could instead calculate that in the caller and pass it in place of
args_count. Or, probably better, you could pass the entire op_tests[]
table entry to the function, you're currently passing all the fields
one by one anyway.

> +    for (i = 0; i < 4; ++i)
> +        todo_wine_if(todo && todo[i])
> +        ok(compare_float(v[i], ((float *)expected_result)[i], ulps),
> +                "Operation %s, component %u, expected %#x (%g), got %#x (%g).\n", op_mnem,
> +                i, expected_result[i], ((float *)expected_result)[i], ((unsigned int *)v)[i], v[i]);

todo currently can never be NULL.

> +    for (i = 0; i < ARRAY_SIZE(op_tests); ++i)
> +        test_preshader_op(device, test_effect_preshader_effect_blob, sizeof test_effect_preshader_effect_blob,
> +                blob_position[op_tests[i].args_count].pos, blob_position[op_tests[i].args_count].result_index,
> +                op_tests[i].mnem, op_tests[i].opcode, op_tests[i].args_count,
> +                op_tests[i].expected_result, &op_tests[i].fvect1, &op_tests[i].fvect2,
> +                op_tests[i].ulps, op_tests[i].todo);

Parenthesis around sizeof operand, please.



More information about the wine-devel mailing list