It's actually not that bad if you want to cheese it. Just compile twice into two DLLs, once with AVX and once without. Try to load and run the first one, if it crashes, load and run the second one. Done. (AVX on non-AVX CPUs will fault)
-
-
Replying to @cmuratori @TylerGlaiel
Prob not a good idea that now every matrix multiplication or vector addition or whatever now involves chasing down pointers in a DLL's Import Address Table
1 reply 0 retweets 0 likes -
Replying to @Wunkolo @TylerGlaiel
No you compile _the entire EXE_ this way. So, you make an EXE with nothing in it but LoadLibrary and then you call StartGame. Everything is in the game_avx.dll and game_sse.dll. Right?
1 reply 0 retweets 5 likes -
So there is zero performance overhead for this.
1 reply 0 retweets 3 likes -
Replying to @cmuratori @TylerGlaiel
Ah, you're talking about what ClearLinux does where the repository ships multiple different versions of the executable towards a bunch of different architectures and the user's OS "picks" the right one to download. Unlikely with shipped games though to be able to ship 12+ .exes
1 reply 0 retweets 0 likes -
Replying to @Wunkolo @TylerGlaiel
It's literally 2 DLLs. Most games already have way more than 2 DLLs that they ship.
1 reply 0 retweets 5 likes -
Replying to @cmuratori @Wunkolo
I static link everything I can [only need steam_api64.dll currently]. not against adding more I just find it nice to not need them
1 reply 0 retweets 0 likes -
Replying to @TylerGlaiel @Wunkolo
How do you do dynamic code reloading? Or do you not do that?
1 reply 0 retweets 0 likes -
Also, again, none of this is necessary if you just want to produce one exe, just compile twice but into the same EXE, and then have the startup routine call the right function. Ie., in a single-translation-unit build, just do one with AVX and one with SSE. Same exe, done.
1 reply 0 retweets 2 likes -
If we’re talking custom packers, that’ll need to be done at the level of mainCRTStartup though, since compilers are gonna introduce AVX instructions throughout the CRT initialisation (that is if you’re using the CRT). Or are we talking 2 binaries (AVX/SSE) + launcher?
1 reply 0 retweets 0 likes
Neither - you can just compile multiple CPPs, some with AVX and some with SSE into the same binary. Presumably if you're worried about this sort of thing you are not calling the CRT for anything math-related, since it is an epic disaster! So you can just use SSE CRT.
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.