All right
Thank you guys, I added the solution that Sweenie proposed to the dScene utility library.
It is all check in and should work for everyone without changing anything on you OS.
on the bright side we found few issues.
The stack overrun but is a real Visual studio 2012 express, problem with inline function in debug mode
basically if you set the project to inline when ever possible in debug, the compile inline some functions but the PBD will no be aware of the and the debugger will interpreted as a memory overrun.
That was the bug that Joe had, and I get when I first converted the VS2010 to VS 2012 projects.
after I set the compiler setting to default, the stack crash was fixed.
the secund thing is that we now have VS 2012 project.
I now see that VS 2012 is by far so much superior that VS 2010.
VS 2010 in my opinion was by far the worse version of Visual studio, and it look like on 2012 the add what the promise for 2010 and what the could not fix the took it away.
the remove all of the Bach Build and Back clean functionality, which for me was useful but now no as much, this si no big deal.
the added more instruction set to eh 32 bit compiler, because it compile code to x87, and it never use some of the predicates instruction like conditional movs.
the was whi VS in 32 bit was so much slawer that GCC, LLVM, and Intel.
I guess the completion force then to improve the 32 bit compiler.
there is auto factorization, but it is not vectorizing the vector class.
I thonk it is because the vector class is writin in a way the is no friendly for that for example the Add function is writeen like this
- Code: Select all
template<class T>
TemplateVector<T> TemplateVector<T>::operator+ (const TemplateVector<T> &B) const
{
return TemplateVector<T> (m_x + B.m_x, m_y + B.m_y, m_z + B.m_z, m_w);
}
I will probably have to write like this
- Code: Select all
template<class T>
TemplateVector<T> TemplateVector<T>::operator+ (const TemplateVector<T> &B) const
{
return TemplateVector<T> (m_x + B.m_x, m_y + B.m_y, m_z + B.m_z, m_w + B.m_w);
}
or add a union of an array of four floats, to the class and write it like this
- Code: Select all
template<class T>
TemplateVector<T> TemplateVector<T>::operator+ (const TemplateVector<T> &B) const
{
TemplateVector<T> tmp;
for (I = 0; I < 4; I ++) {
tmp.vect[I] = vect[I] + B.m_vect[I];
}
return tmp;
}
if either of these two modes works, and yield packed simd binaries, I will get rid of all of the simd code in the engine.
all in all VS 2012 seem so much better and should generate better 32 bit code than old previous versions.
Now we can go to deal with the rest of the Player controller modifications.
Please do some last test to see if this fix actually solve the bug.