Closed thedax closed 11 years ago
Does this solve anything (over just not upgrading the projects)? Does the LittleBigPlanet video play without issues under the interpreter or something? Or is it just to get rid of the "(Visual Studio 2010)" in the Solution Explorer?
-[Unknown]
What's littlebigplanet have to do with anything? O.o
Anyway, I'd like to be able to compile using visual studio 2012's native libraries and compiler, so I don't need to keep visual studio 2010 around as well.
https://github.com/hrydgard/ppsspp/issues/464 LittleBigPlanet triggers what I think is a MSVC compiler bug.
-[Unknown]
Do you mean glitches like in cloud's video? I don't see it with this 2012 compiled executable, with interpreter mode..
However, I don't notice any glitches with a 2010 compiled one either(with 8.1-760 as the base)..are you sure it was a compiler bug?
I still see the glitches with a US version of the game in 32-bit. It doesn't happen in 64-bit builds. It also doesn't seem to happen using gcc or clang, from what I recall.
It can be made to happen even with jit enabled by disabling jit for the vmmov instruction when the source and destination overlap (e.g. swizzle.) I "accidentally" fixed it when I wrote the jit for that instruction.
-[Unknown]
@unknownbrackets : with a 2012 compiled 32-bit build, I don't see the glitches, so it is indeed a compiler bug with 2010, it seems..
Also, for the record, I'm not wanting to replace 2010 support so much as just have its newer and younger brother 2012 be able to compile it natively, too.
Send a pull request with those two header additions, seems fine.
Closing due to this being merged.
Actually, there's one more issue to iron out, in native/thread/thread.h, we have this code:
template <typename C>
class Func
{
public:
Func(C _func) : func(_func) {}
void Run() { func(); }
private:
C const func;
};
Visual Studio 2012(native compiling/upgraded from 2012) doesn't like the "C const func" line. It claims:
Error 1 error C3848: expression having type 'const std::_Bind<_Forced,_Ret,_Fun,_V0_t,_V1_t,_V2_t,_V3_t,_V4_t,_V5_t,
Is there a better way to fix the error than to simply remove the const? I'm not real familiar with templates.
Also, @unknownbrackets ' https://github.com/hrydgard/ppsspp/pull/2931 seems to bring back the std::bind errors, probably due to the native commit..
Hm, it seems as if the const func issue has vanished. I guess a native update fixed it? I'm puzzled, but it's no longer relevant again, so I'm re-closing this. No current 2012 compilation issues are known to me now.
What would the best way to add official support for this? Include a v11.suo file with some defaults so that the user just ends up upgrading the visual studio 2010 sln with the needed macros already added?
To get it to compile natively I had to add this macro to Common and native(otherwise i was getting std::bind errors, about having too many args), and GPU too: _VARIADIC_MAX=10
And to both stdafx.h files(common & native):
undef _WIN32_WINNT
if _MSC_VER < 1700
define _WIN32_WINNT 0x501 // Compile for XP if we don't have 2012
else
define _WIN32_WINNT 0x600 // Otherwise if we do, compile for Vista and above
endif
With these added, it compiles just fine.