http://bugs.winehq.org/show_bug.cgi?id=33456
Bug #: 33456 Summary: D3DXMatrixTransformation: Broken calculation when scalingrotation and scaling is used Product: Wine Version: unspecified Platform: x86 OS/Version: Linux Status: NEW Keywords: testcase Severity: normal Priority: P2 Component: directx-d3dx9 AssignedTo: wine-bugs@winehq.org ReportedBy: kgbricola@web.de CC: wine-bugs@winehq.org Classification: Unclassified
Created attachment 44286 --> http://bugs.winehq.org/attachment.cgi?id=44286 D3DXMatrixTransformation test case - 22 failed tests
While trying to improve the speed of D3DXMatrixTransformation(), I found that the calculation when using scalingrotation and scaling at the same time is wrong.
The full formula is (according to msdn): Mout = (Msc)-1 * (Msr)-1 * Ms * Msr * Msc * (Mrc)-1 * Mr * Mrc * Mt while the failing part is: (Msr)-1 * Ms * Msr
So this might not be the correct equivalent: ... D3DXMatrixRotationQuaternion(&m4, pscalingrotation); //Msr D3DXMatrixInverse(&m2, NULL, &m4); //Msr-1 D3DXMatrixScaling(&m3, pscaling->x, pscaling->y, pscaling->z); //Ms ... D3DXMatrixMultiply(&m1, &m1, &m2); D3DXMatrixMultiply(&m1, &m1, &m3); D3DXMatrixMultiply(&m1, &m1, &m4); ...
This may affect other functions as well (e.g. D3DXMatrixTransformation2D()).
https://bugs.winehq.org/show_bug.cgi?id=33456
--- Comment #1 from Austin English austinenglish@gmail.com --- This is your friendly reminder that there has been no bug activity for over a year. Is this still an issue in current (1.7.37 or newer) wine? If so, please attach the terminal output in 1.7.37 (see http://wiki.winehq.org/FAQ#get_log).
https://bugs.winehq.org/show_bug.cgi?id=33456
joaopa jeremielapuree@yahoo.fr changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jeremielapuree@yahoo.fr
--- Comment #2 from joaopa jeremielapuree@yahoo.fr --- Bug still there in current wine
https://bugs.winehq.org/show_bug.cgi?id=33456
Alistair Leslie-Hughes leslie_alistair@hotmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |patch
https://bugs.winehq.org/show_bug.cgi?id=33456
Paul Gofman gofmanp@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |gofmanp@gmail.com
https://bugs.winehq.org/show_bug.cgi?id=33456
--- Comment #3 from joaopa jeremielapuree@yahoo.fr --- Created attachment 53994 --> https://bugs.winehq.org/attachment.cgi?id=53994 Fix for D3DXMatrixTransformation
This patches fixes the Rico's tests and a bunch of new added tests.
https://bugs.winehq.org/show_bug.cgi?id=33456
Alistair Leslie-Hughes leslie_alistair@hotmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |leslie_alistair@hotmail.com
--- Comment #4 from Alistair Leslie-Hughes leslie_alistair@hotmail.com --- (In reply to joaopa from comment #3)
Created attachment 53994 [details] Fix for D3DXMatrixTransformation
This patches fixes the Rico's tests and a bunch of new added tests.
Was this patch ever sent to wine-patches?
https://bugs.winehq.org/show_bug.cgi?id=33456
--- Comment #5 from Alistair Leslie-Hughes leslie_alistair@hotmail.com --- All test pass. http://testbot.winehq.org/JobDetails.pl?Key=22350
https://bugs.winehq.org/show_bug.cgi?id=33456
--- Comment #6 from joaopa jeremielapuree@yahoo.fr ---
Was this patch ever sent to wine-patches?
No
https://bugs.winehq.org/show_bug.cgi?id=33456
--- Comment #7 from joaopa jeremielapuree@yahoo.fr --- Bug still there in current wine
https://bugs.winehq.org/show_bug.cgi?id=33456
--- Comment #8 from joaopa jeremielapuree@yahoo.fr --- Bug still there in current wine.
https://bugs.winehq.org/show_bug.cgi?id=33456
--- Comment #9 from Gijs Vermeulen gijsvrm@gmail.com --- (In reply to joaopa from comment #8)
Would you consider sending your patch to wine-devel? Or maybe it could be considered for addition in staging?
https://bugs.winehq.org/show_bug.cgi?id=33456
joaopa jeremielapuree@yahoo.fr changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #53994|0 |1 is obsolete| |
--- Comment #10 from joaopa jeremielapuree@yahoo.fr --- Created attachment 62754 --> https://bugs.winehq.org/attachment.cgi?id=62754 Updated patch
Patch was sent to wine-devel. But it does not appear in listing of submitted patches. So attaching it here to not lose it.
https://bugs.winehq.org/show_bug.cgi?id=33456
Alistair Leslie-Hughes leslie_alistair@hotmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |STAGED Staged patchset| |https://github.com/wine-sta | |ging/wine-staging/tree/mast | |er/patches/d3dx9_36-D3DXMat | |rixTransformation
https://bugs.winehq.org/show_bug.cgi?id=33456
--- Comment #11 from joaopa jeremielapuree@yahoo.fr --- Matteo's patch is in GIT. Can an administrator close this bug as FIXED?
https://bugs.winehq.org/show_bug.cgi?id=33456
Alistair Leslie-Hughes leslie_alistair@hotmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Fixed by SHA1| |f54260a789387ab40de3d80291a | |d9000176dabe1 Status|STAGED |RESOLVED
--- Comment #12 from Alistair Leslie-Hughes leslie_alistair@hotmail.com --- Fixed by https://source.winehq.org/git/wine.git/?a=commit;h=f54260a789387ab40de3d8029...
https://bugs.winehq.org/show_bug.cgi?id=33456
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #13 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 4.1.
https://bugs.winehq.org/show_bug.cgi?id=33456
Michael Stefaniuc mstefani@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |4.0.x
https://bugs.winehq.org/show_bug.cgi?id=33456
Michael Stefaniuc mstefani@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|4.0.x |---
--- Comment #14 from Michael Stefaniuc mstefani@winehq.org --- Removing the 4.0.x milestone from bug fixes included in 4.0.1.