On Mon Oct 10 00:52:11 2022 +0000, Matteo Bruni wrote:
It would be nice to have some tests for this, checking that your implementation matches native behavior for both normal and edge cases (e.g. for the latter, what happens when data or param are NULL). You can probably use the last couple of tests at the end of d3dx9_36/tests/effect.c as reference. Also nitpick, the prefix in the commit subject should be "d3dx9:".
OK, fixed the commit subject.
I've also added some tests. There will need to be another revision to this MR for wine to pass them correctly, but they currently pass without error on Win10.
I do have a few questions:
1) Is there a preferred method for testing byte-misaligned floats in wine tests? Currently, I'm setting the unaffected parts of the array in the initializer, and then fixing it up at runtime with a memcpy(). Is there another method I should use?
2) As Win10 allows setting the byte-misaligned float, how should I deal with the assert in param_get_data_and_dirtify()? As the tests currently fail under wine due to it.
3) How did you get fx.exe to output DWORDs? I can manually clean it up but I'd prefer to have less to do. :smile:
4) Any other clean ups or tests to recommend?