Forum Discussion

Re: Cpu does not have POPCNT! help

@TheMightyShank  Very interesting, this POPCNT Emulator.

Of course a Respawn Technical Director could probably assign this to a couple of intern coders fresh out of college and have it buttoned-up in a week, integrated in code seamlessly and ready to include in the next game patch, with no effect on existing users.

Welcoming several more players into the game, and adding potential microtransaction buyers.

17 Replies

  • @RevGunthakAs much as that would be great it's probably not gonna happen because EA most likely isn't gonna try to fix an issue that only a very small percent of players have...as well as the fact that since we are under the system requirements anyways...that gives them the liberty to blame our systems instead of their game, thus getting this whole problem off their backs.
    Which is why I'm suggesting that, as a community of RetroCPU users, we try to find a solution ourselves so that we can get this game up and running as soon as possible.

  • aries1470's avatar
    aries1470
    7 years ago
    @TheMightyShank @RevGunthak
    This is an easy fix apparantly.
    The game is based on TitanFall, and TitalFall can be played on Core2Quad/ Xeons etc, but due to the other program, that is why that call is required. It can easily be re-done, or a patch be made available just for people with this class of CPU's.
    Now, if EA wants to do it is a totally different matter.
    For further reading:
    https://www.eurogamer.net/articles/digitalfoundry-2019-apex-legends-tech-analysis
    So yeah, game engine is mostly the same...
  • Carbonic's avatar
    Carbonic
    Hero+
    7 years ago

    @aries1470 wrote:
    @TheMightyShank @RevGunthak
    This is an easy fix apparantly.
    The game is based on TitanFall, and TitalFall can be played on Core2Quad/ Xeons etc, but due to the other program, that is why that call is required. It can easily be re-done, or a patch be made available just for people with this class of CPU's.
    Now, if EA wants to do it is a totally different matter.
    For further reading:
    https://www.eurogamer.net/articles/digitalfoundry-2019-apex-legends-tech-analysis
    So yeah, game engine is mostly the same...

    I'm sorry. You cannot use that article as it doesn't talk about anything that relates to how easy or how hard the change of use of certain CPU instruction sets are.

    You cannot call it "an easy fix" based on nothing.

  • It is very simple, the hardware based instruction popcnt, is an optimization for a specific  operation known as Population count, everything practically ever compiled that works with older cpus , uses a software based version of this, by default GCC and many other compilers use their own implementation of  popcnt.  you have to explicitly ENABLE popcnt support or target a system using -march=native that has hardware support for popcnt to make this issue appear.

    There are 2 ways of fixing this problem, either set the compiler being used, to not use the popcnt instruction which is as easy as adding -mno-popcnt to the compiler flags, which will incur a >2% performance hit, if at all, or  add a a few of lines of code to use a different version of population count if an older cpu is detected. both of which are something any incompetent oaf can do.

    this whole thing is frankly ridiculous

    if you understand high-school level algebra you can see that this function is stupidly simple.

    https://en.wikichip.org/wiki/population_count

    I have refrained from posting until now because i thought " there is no way they wont fix this "

    but it seems there is some-kind of major communication problem within ea's management, hopefully you guys will figure that stuff out, before it further degrades your PR's reputation.

    not impressed.

  • @AlphaSoda  Yep, this is it.

    Respawn just needs to get around to assigning it to someone.

    As the launch chaos/honeymoon phase relaxes a bit, some resources will free up.

  • I should also add that , the native popcnt instruction isn't even really faster on modern cpus

    https://github.com/WojciechMula/sse-popcount/blob/master/results/skylake/skylake-i7-6700-gcc5.3.0-avx2.rst

    here is a table of various popcnt implementations being benchmarked on a modern cpu and in not one the native popcnt instruction actually wins, while this will not be the same across all compilers, the fact is , there is virtually no reason to use the native hardware instruction, it can even make your code slower!

  • Wait for patch SSE4.2. EV come on! In fact, SSE4.1 can be considered first. Restriction configuration also needs to be improved step by step!

  • Carbonic's avatar
    Carbonic
    Hero+
    7 years ago

    @AlphaSoda wrote:

    It is very simple, the hardware based instruction popcnt, is an optimization for a specific  operation known as Population count, everything practically ever compiled that works with older cpus , uses a software based version of this, by default GCC and many other compilers use their own implementation of  popcnt.  you have to explicitly ENABLE popcnt support or target a system using -march=native that has hardware support for popcnt to make this issue appear.

    There are 2 ways of fixing this problem, either set the compiler being used, to not use the popcnt instruction which is as easy as adding -mno-popcnt to the compiler flags, which will incur a >2% performance hit, if at all, or  add a a few of lines of code to use a different version of population count if an older cpu is detected. both of which are something any incompetent oaf can do.

    this whole thing is frankly ridiculous

    if you understand high-school level algebra you can see that this function is stupidly simple.

    https://en.wikichip.org/wiki/population_count

    I have refrained from posting until now because i thought " there is no way they wont fix this "

    but it seems there is some-kind of major communication problem within ea's management, hopefully you guys will figure that stuff out, before it further degrades your PR's reputation.

    not impressed.


    Thanks for the interesting post @AlphaSoda 

    I have a question, hope you don't mind.

    The game complaining about the CPU not having POPCNT is probably just the first instruction it checks for and many others are also needed which also would need software implementations that cause performance hits.

    Do you think there's a chance that the accumulative effect of all these performance hits to all these old systems (that already would struggle with the game) could render the game pretty much unplayable anyway, making the support for these old CPUs pointless?

  • @Carbonic 

    "Do you think there's a chance that the accumulative effect of all these performance hits to all these old systems (that already would struggle with the game) could render the game pretty much unplayable anyway, making the support for these old CPUs pointless?"

    ----------------------------------------------------

    I bolded the key point.

    Systems that demonstrably would NOT struggle with Apex instantly kill that argument.

    Without trying to come off as a douche, I've been regularly answering posts from people with Intel C2Q/Xeons that were never going to run Apex well anyway, irrespective of instruction set compatibility.

    I've implored people to set their expectations accordingly. Like the guy running a 2.4Ghz Core 2 Quad paired with 4GB of system ram and a 2GB GTX 750...

    That person was never going to be able to run Apex to begin with (unless you count 720p at 15fps as "playing" a game).

    People need to set their expectations accordingly.

    However, if you're rocking a very fast quad, tons of system RAM, and a beefy recent GPU with ample VRAM...

    And you're already doing 1080p/High/60fps in MANY recent 2018-2019 games, including ALL of Apex Legends' competition in battle royale...

    ...There's nothing 'pointless' about supporting those players. Perhaps all those other devs made a "pointless" choice? Nah.

  • "Hey man, just because your system -

    Intel Xeon X5470 quad at 3.8 GHz.

    16 GB of fast DDR3 system RAM.

    RX 580 graphics card w/ 8 GB VRAM.

    - happens to run ALL these games at 1080p/High/60fps -

    The Witcher 3

    Dark Souls 3

    GTA V

    PUBG

    Fear the Wolves

    Fortnite

    H1Z1

    DOOM

    Killing Floor 2

    Destiny 2

    Dishonored 1/2

    Deus Ex HR/Mankind Divided

    Prey

    Final Fantasy XIV and XV

    Resident Evil 2 Remake

    that doesn't mean it should be able to run Apex, too!"

    - Said nobody, ever.

    (Please add compatibility. POPCNT is entirely tweakable).

  • @AlphaSoda wrote:

    "It is very simple, the hardware based instruction popcnt, is an optimization for a specific  operation known as Population count, everything practically ever compiled that works with older cpus , uses a software based version of this, by default GCC and many other compilers use their own implementation of  popcnt.  you have to explicitly ENABLE popcnt support or target a system using -march=native that has hardware support for popcnt to make this issue appear.

    There are 2 ways of fixing this problem, either set the compiler being used, to not use the popcnt instruction which is as easy as adding -mno-popcnt to the compiler flags, which will incur a >2% performance hit, if at all, or  add a a few of lines of code to use a different version of population count if an older cpu is detected. both of which are something any incompetent oaf can do"

    --------------------

    Thanks for this.

  • @RevGunthakand @AlphaSoda those are both great suggesions...why not try to implement them yourselves and post the fix? lol I so far have not been able to implement a fix myself as I don't know my way around the code...do you also have this issue or have you just not tried?

  • @Carbonic

    That is unlikely, the game runs on first gen core ix derived pentiums, which lack avx, the difference in supported instruction set is basically popcnt, and whatever else was added with sse 4.2, which again is something the _compiler_ would be responsible for dealing with , and shouldn't have to be dealt with by a human, with minimal if any performance hit.

    The game will not struggle on these older systems, i have a laptop with a 2ghz core i7 and it is capable of running the game >100fps. the engine is well optimized and would probably run on something like the nintendo switch will no issues (hint hint)

    I'd almost be willing to bet that this problem is purely due to whoever setting the compiler flags , choosing first gen i7 as the build target( unnecessary in my opinion, especially for a source engine game).

    edit : also

    for reference, sse 4.1 is the base spec, and sse 4.2 only adds a few instructions that are supposed to speed up a few things ,  simply telling the compiler to not use them _should_ fix a presumed problem. https://en.wikipedia.org/wiki/SSE4#SSE4.2, none of these are close to make or break level of performance differences. (guessing >1% for this type of application)

  • Dear mods/CMs, how's about you unflag this as 'SOLVED'.

    We have actual solutions in the thread.

    Or, with respect, do your job and make sure EA and Respawn QA are aware of various details in here, so they can forward it to Respawn techs.

    It's a "Technical Issues" section, after all, and your players have very specific information here.

    Thank you.

  • @Carbonic 

    so  I ended up taking a look at intel's compiler docs(which is probably what respawn is using, since the game needs ssse3) and came across this https://software.intel.com/en-us/cpp-compiler-developer-guide-and-reference-ax-qax, turns out that you can infact have multiple code paths generate automatically, by using this option, it can generate multiple code paths to allow more optimized code to run on newer cpus, and leave a generic path as well for cpus that do not support certain features, mind you i dont know what effect this will have on performance, but it seems like a possible solution.

  • We may be able to get this thread reopened, by opening multiple new threads each unsolved and asking them to un-solve this one, because guaranteed no devs are actually reading through any of these messages

Featured Places

Node avatar for Apex Legends Technical Issues

Apex Legends Technical Issues

Having issues with Apex Legends? Join here to find help with connectivity, performance issues, crashes and more.Latest Activity: 3 hours ago
40,668 Posts