2

I am trying to setup AVX support for Unreal Engine 4. It is using SSE2 by default as far as I know and it's own NMake so there are no Visual Studio properties page to access and add arch to.

Where am I supposed to set this up?

NOTE: Trying to support AVX, AVX2 and AVX512.

phuclv
  • 37,963
  • 15
  • 156
  • 475
Nick
  • 54
  • 6

1 Answers1

2

Look for the VSToolChain.cs file in the UE4 source code. That file is setting up all the compiler flags for MSVC.

In there, search for where it's doing /arch:AVX. It's in some if(). To force usage of AVX or AVX2 or AVX512, just put /arch:AVX or /arch:AVX2 or /arch:AVX512 at the top of that function so that the flag always gets added. Then recompile the engine.

JohnAl
  • 1,064
  • 2
  • 10
  • 18