The Newton engine is now Open source with a zlib license.

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

Re: The Newton engine is now Open source with a zlib license

Postby JernejL » Mon Mar 07, 2011 3:37 pm

I will keep on dreaming of a GCC win32 newton.dll build.. :)
Help improving the Newton Game Dynamics WIKI
User avatar
JernejL
 
Posts: 1578
Joined: Mon Dec 06, 2004 2:00 pm
Location: Slovenia

Re: The Newton engine is now Open source with a zlib license

Postby Julio Jerez » Mon Mar 07, 2011 3:47 pm

Hey Delfi we migh be able to do even better than a GCC dll version for windows.

Intel is working on a OpenCL for X86 using SSE, and it is using the Intel compiler which apparenlly is even better than GCC.
I dowloaded already and as soon as I complete the subtitution of the intrinsics to use the new class, I will start workin of the OpenCL support.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: The Newton engine is now Open source with a zlib license

Postby Julio Jerez » Mon Mar 07, 2011 8:18 pm

yes the arm7 do has float intrisics
http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0348a/BABCIHBH.html

The only thing is to find out of the MAC SDK allows it, which I cannot imagine why it would not.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: The Newton engine is now Open source with a zlib license

Postby martinsm » Tue Mar 08, 2011 4:15 am

I already posted link to GCC ARM NEON intrinsics some time ago: viewtopic.php?p=37964#p37964 :)
martinsm
 
Posts: 86
Joined: Mon Dec 19, 2005 3:15 pm
Location: Latvia

Re: The Newton engine is now Open source with a zlib license

Postby martinsm » Tue Mar 08, 2011 5:46 am

Delfi wrote:I will keep on dreaming of a GCC win32 newton.dll build.. :)

I found that you can create makefile for that without any source modifications!
1) checkout latest 2.x source:
Code: Select all
svn checkout http://newton-dynamics.googlecode.com/svn/trunk/coreLibrary_200 newton-dynamic

2) Put both files from attachment of this post into projects\windows directory
3) run mingw32-make command from projects\windows directory
You will get in output static library libNewton.a and Newton.dll file with it's import library libNewton.dll.a file.

I tested building with official MinGW GCC v4.5.2. I you're using other (like TDM-GCC), then it's possible some tweaks to commandline will be necessary.
Attachments
mingw32_makefile.zip
(3.34 KiB) Downloaded 412 times
martinsm
 
Posts: 86
Joined: Mon Dec 19, 2005 3:15 pm
Location: Latvia

Re: The Newton engine is now Open source with a zlib license

Postby JernejL » Tue Mar 08, 2011 7:12 am

It doesn't help me since i can't compile anything - i got very little experience with mingw and other related tools..
Help improving the Newton Game Dynamics WIKI
User avatar
JernejL
 
Posts: 1578
Joined: Mon Dec 06, 2004 2:00 pm
Location: Slovenia

Re: The Newton engine is now Open source with a zlib license

Postby martinsm » Tue Mar 08, 2011 7:25 am

Then I don't get it - why do you need GCC compiled Newtond.dll file? What's wrong with MSVC compiled Newton.dll file?
martinsm
 
Posts: 86
Joined: Mon Dec 19, 2005 3:15 pm
Location: Latvia

Re: The Newton engine is now Open source with a zlib license

Postby JernejL » Tue Mar 08, 2011 9:50 am

supposedly the GCC generates faster and better optimized code.
Help improving the Newton Game Dynamics WIKI
User avatar
JernejL
 
Posts: 1578
Joined: Mon Dec 06, 2004 2:00 pm
Location: Slovenia

Re: The Newton engine is now Open source with a zlib license

Postby Julio Jerez » Tue Mar 08, 2011 11:41 pm

martinsm wrote:Oh, and by the way during porting I found small bug in Newton. When building TreeCollision NewtonTreeCollisionEndBuild was ignoring optimize parameter. I needed to passs there false (to not to optimize), because Newton was crashing when optimize=true.


Martinsm I foudn teh bug that was making newtn crash, I beleive you were amkin a floor whe all teh face were coplanar, an dteh optimizer merged then to a single polygon.
The code was asumin thet the root of the tree will have children, and that was making the build process fail.
I fixed and checked it in, if you sinc to SVN it should be fine now.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: The Newton engine is now Open source with a zlib license

Postby thedmd » Thu Mar 10, 2011 3:49 pm

Julio, you may find this interesting. One of the bugfixes in the VS2010 SP1 is "C++ compiler generates incorrect movups instructions iso movss" http://connect.microsoft.com/VisualStudio/feedback/details/548432.
Maybe this also solve the problem with simd_128 class and wrong alignment.
"God started from scratch too"
User avatar
thedmd
 
Posts: 149
Joined: Fri Jun 26, 2009 11:52 pm

Re: The Newton engine is now Open source with a zlib license

Postby martinsm » Thu Mar 10, 2011 5:20 pm

Julio Jerez wrote:Martinsm I foudn teh bug that was making newtn crash, I beleive you were amkin a floor whe all teh face were coplanar, an dteh optimizer merged then to a single polygon.
The code was asumin thet the root of the tree will have children, and that was making the build process fail.
I fixed and checked it in, if you sinc to SVN it should be fine now.


Thanks. I took & compiled latest source - and can confirm that this fixed bug on Android. I indeed was creating TreeCollision with all faces coplanar. Now I have no problem creating these (and all other) TreeCollisions with optimized flag = true.

thedmd wrote:Maybe this also solve the problem with simd_128 class and wrong alignment.

I really doubt that has something to do with passing arguments on stack unaligned. I guess it's problem of Windows OS ABI by design.
martinsm
 
Posts: 86
Joined: Mon Dec 19, 2005 3:15 pm
Location: Latvia

Re: The Newton engine is now Open source with a zlib license

Postby Julio Jerez » Thu Mar 10, 2011 6:37 pm

thedmd wrote:Julio, you may find this interesting. One of the bugfixes in the VS2010 SP1 is "C++ compiler generates incorrect movups instructions iso movss" http://connect.microsoft.com/VisualStudio/feedback/details/548432.
Maybe this also solve the problem with simd_128 class and wrong alignment.


you know that is exactly the problem, I am getting the wrong mov intructions, The thing is I am getting with VS 2008, I have not tested with VS2010.
Anyway it is not big deal. we can just simple if def that out and have oen class for MS and one for GCC.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: The Newton engine is now Open source with a zlib license

Postby JernejL » Thu Mar 10, 2011 8:38 pm

martinsm wrote:
Delfi wrote:I will keep on dreaming of a GCC win32 newton.dll build.. :)

I found that you can create makefile for that without any source modifications!
1) checkout latest 2.x source:
Code: Select all
svn checkout http://newton-dynamics.googlecode.com/svn/trunk/coreLibrary_200 newton-dynamic

2) Put both files from attachment of this post into projects\windows directory
3) run mingw32-make command from projects\windows directory
You will get in output static library libNewton.a and Newton.dll file with it's import library libNewton.dll.a file.

I tested building with official MinGW GCC v4.5.2. I you're using other (like TDM-GCC), then it's possible some tweaks to commandline will be necessary.


Can you compile us a single precision newton win32 dll for testing?
Help improving the Newton Game Dynamics WIKI
User avatar
JernejL
 
Posts: 1578
Joined: Mon Dec 06, 2004 2:00 pm
Location: Slovenia

Re: The Newton engine is now Open source with a zlib license

Postby martinsm » Fri Mar 11, 2011 6:11 am

Delfi wrote:Can you compile us a single precision newton win32 dll for testing?

Here you go: http://www.box.net/shared/kd7t4vdcv9
Built from rev282.

Here is alternative if above one is unstable/not working (I played a bit with optimization flags): http://www.box.net/shared/qa75l5rv3v
And here I turned more aggressive optimization flags (should be faster, but may not work at all): http://www.box.net/shared/vr1dnqzvi6

Note that GCC has many useful platform specific optimization flags that can be turned for specific CPU's (like -march=core2 if you have core 2 CPU). That usually will give you really good boost in performance. I built with -march=i686: http://gcc.gnu.org/onlinedocs/gcc/i386- ... tions.html
martinsm
 
Posts: 86
Joined: Mon Dec 19, 2005 3:15 pm
Location: Latvia

Re: The Newton engine is now Open source with a zlib license

Postby JernejL » Fri Mar 11, 2011 1:56 pm

I get a crash in NewtonSetWorldSize:

Code: Select all
  va := makevector(0, -255, 0);
  vb := makevector(255, 0, 8);
  NewtonSetWorldSize(nworld, @va, @vb);


Is this a single or double precision build?
Help improving the Newton Game Dynamics WIKI
User avatar
JernejL
 
Posts: 1578
Joined: Mon Dec 06, 2004 2:00 pm
Location: Slovenia

PreviousNext

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 10 guests