http://bugs.winehq.org/show_bug.cgi?id=14609
Summary: Some DirectX vector math functions need to take a copy of the input vector. Product: Wine Version: 1.1.1 Platform: All OS/Version: All Status: UNCONFIRMED Severity: normal Priority: P2 Component: directx-d3d AssignedTo: wine-bugs@winehq.org ReportedBy: andrew@nelless.net CC: spam@sentrika.net
Hi,
A friend (CC'd) reports that WINE's D3DXVec3TransformCoord() [dlls/d3dx8/math.c:1226] is producing different output to the native Windows version. He narrowed the problem down to the function not taking a copy of the input vector when the input vector and the output vector pointers are the same.
In TransformCoord(), when pout == pv, pout->x and pout->y are written and then used immediately through pv->x and pv->y, respectively, resulting in completely skewed output.
This most likely effects many other D3DXVec* functions too.
http://bugs.winehq.org/show_bug.cgi?id=14609
--- Comment #1 from Andrew andrew@nelless.net 2008-07-23 08:11:09 --- Created an attachment (id=15005) --> (http://bugs.winehq.org/attachment.cgi?id=15005) Test case.
Attached is a example/test case.
All credit goes to my friend David, he tested it on Dev-C++ MingW on Windows XP. The function was lifted from WINE 1.1.1. Output on his machine is at the bottom. As expected the Y and Z components of the vector are skewed.
http://bugs.winehq.org/show_bug.cgi?id=14609
--- Comment #2 from Vijay Kamuju infyquest@gmail.com 2008-07-23 08:44:56 --- please send the fix and the test case to wine-patches@winehq.org to be included in next release
http://bugs.winehq.org/show_bug.cgi?id=14609
Vitaliy Margolen vitaliy@kievinfo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #15005|text/x-c++src |text/plain mime type| |
http://bugs.winehq.org/show_bug.cgi?id=14609
Vitaliy Margolen vitaliy@kievinfo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |patch, source
http://bugs.winehq.org/show_bug.cgi?id=14609
Philip Nilsson leffeman@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |leffeman@gmail.com
--- Comment #3 from Philip Nilsson leffeman@gmail.com 2008-07-24 07:20:49 --- I've got a patch for most of the functions (excepting only the ones where the arguments are of different types, such as VEC2 and VEC3), I tried sending it after the thawing, but now that there's a bug I'll try it again.
http://bugs.winehq.org/show_bug.cgi?id=14609
joaopa jeremielapuree@yahoo.fr changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jeremielapuree@yahoo.fr
--- Comment #4 from joaopa jeremielapuree@yahoo.fr 2008-07-24 10:17:07 --- Philip, I take advantage of this bug to remind you that you did not implement the function D3DXPlaneTransformArray. Could you implement it, please?
Thanks in advance
Joaopa
http://bugs.winehq.org/show_bug.cgi?id=14609
scguy318 nodisgod@yahoo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |nodisgod@yahoo.com
--- Comment #5 from scguy318 nodisgod@yahoo.com 2008-07-25 05:26:05 --- I submitted two patches before reading Philip Nilsson's comment:
http://www.winehq.org/pipermail/wine-patches/2008-July/058556.html http://www.winehq.org/pipermail/wine-patches/2008-July/058557.html
http://bugs.winehq.org/show_bug.cgi?id=14609
--- Comment #6 from scguy318 nodisgod@yahoo.com 2008-07-25 09:55:56 --- Philip Nilsson's patch was committed:
http://www.winehq.org/pipermail/wine-cvs/2008-July/045809.html
I presume this bug is fixed?
http://bugs.winehq.org/show_bug.cgi?id=14609
--- Comment #7 from Andrew andrew@nelless.net 2008-07-28 12:13:58 --- If the patch has been committed (for 1.2.x?) then this can be closed.
There might be other vector math functions that have similar problems though.
http://bugs.winehq.org/show_bug.cgi?id=14609
--- Comment #8 from joaopa jeremielapuree@yahoo.fr 2008-09-06 02:57:27 --- This bug is fixed in current git.
Joaopa
http://bugs.winehq.org/show_bug.cgi?id=14609
Vitaliy Margolen vitaliy@kievinfo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |FIXED
--- Comment #9 from Vitaliy Margolen vitaliy@kievinfo.com 2008-09-06 11:21:46 --- Original reported problem was fixed. We can't have bugs that say "something else might still be broken". When you find that "something else" please open a new bug.
http://bugs.winehq.org/show_bug.cgi?id=14609
Vitaliy Margolen vitaliy@kievinfo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #10 from Vitaliy Margolen vitaliy@kievinfo.com 2008-09-06 11:22:11 --- Closing fixed in wine-1.1.2
http://bugs.winehq.org/show_bug.cgi?id=14609
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Platform|All |Other OS/Version|All |other
--- Comment #11 from Austin English austinenglish@gmail.com 2012-02-23 15:13:04 CST --- Removing deprecated 'All' Platform/OS.