Many players – me included – have found Cyberpunk 2077 crashing in various places every time we try to run it. Classics include sitting down in the Corpo Office chair or trying to leave the bar in Street Kid. This is caused by how the game was compiled, namely with something called the AVX-512 instruction set.
This is an augmentation of the original instructions the x86 CPU can understand, presumably to make it work more efficiently. Similar to the x86_64 instruction set, it’s a “bolt-on” to the machine code that can be executed by the original 8086 processor nearly 50 years ago, on top of which all modern x86 processors are still built.
Over the decades, Intel added ways to make that relic faster and more efficient with various additions, while maintaining backward compatibility, implementing new instruction sets that augmented what the original 8086 could understand. The AVX-512 instructions were proposed in 2013 and implemented in CPUs released in the following years. If you buy a new i5, i7 or Xeon today, it’ll understand AVX-512. The same goes for modern AMD processors. However, if you have a CPU from 2015 or earlier, there’s a good chance such instructions are not understood. Send the CPU an AVX code and it’ll return “…sorry what?”, causing a crash.
Cyberpunk 2077 was compiled assuming every CPU would understand these instructions. A clever compiler would have checked if these instructions are available on the current CPU, and if not simply skip them. There’s no need to use those instructions, and programmes work just as fine without them – but such an “if/then” mechanism needs to be in place when the programme is build.
I’m not sure if this is something that can be rectified via a user facing option during the compilation, or of this is a bug inherent in C++ itself (there was a similar issue a few years ago that has been taken care of). Essentially the code should ask “is AVX 512 available go ahead and use it… but if not, then don’t”. Projekt RED didn’t do that and still have this issue, even in the hotfix version 1.04. I’m pretty sure they know that it exists by now.
Thankfully there’s community hack that was released by someone who knows hat they’re doing (more so than the game developers). It lets users with older CPUs like me play the Cyberpunk 2077 without crashes in the same places. If I understand it correctly, the patch simply skips all AVX instructions, making older CPUs happy (and the people that use them too). You can download the patch here:
Thank you so much, m1k3im 😍
- find out more about AVX here: https://en.wikipedia.org/wiki/AVX-512
- C++ bug from a few years ago, exhibiting similar issues (long fixed of course): https://developercommunity.visualstudio.com/content/problem/166375/avx-instructions-generated-since-155-update.html