Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Unity 2019.4 LTS critical graphic artifacts while using Graphic Jobs. [Engine Regression to 2017]

Discussion in 'General Graphics' started by GloriaVictis, Jan 6, 2021.

  1. GloriaVictis

    GloriaVictis

    Joined:
    Sep 1, 2016
    Posts:
    133
    Hello,

    We are trying to convert our project from Unity 2017 LTS into Unity 2019 LTS for quite a long time already. We are stuck on the issue which around 20% of our testing users have shown below:


    We were able to narrow down the issue that it is happening only when Graphic Jobs are enabled, it happens on every UI on every scene, but on the smaller scenes, it is much harder to reproduce for some reason.

    To mess around with these settings we have tried those commands:
    force-gfx-jobs native (it gives artifacts)
    force-gfx-jobs off (it don't give artifacts)
    force-gfx-direct (it don't give artifacts)

    The worst thing is that it doesn't happen at the Editor on the PCs affected by the issue. We have tried disabling lots of things, like all of the image effects, removing TMP from the project - it does still happen.

    Do any of you have an issue like that? It is quite sad that we are wasting months of our work time already trying to switch to another Unity version, and we are stuck on such an unexpected regression of Unity behavior.

    Of course, we were also using Graphic Jobs at Unity 2017.

    We were unable to create a minimal project with that, and the worst thing is that only around 20% of testing PC's have the same issue, yet we couldn't find anything in common.
     
    Last edited: Jan 6, 2021
    Deleted User likes this.
  2. joelv

    joelv

    Unity Technologies

    Joined:
    Mar 20, 2015
    Posts:
    203
    Can you report a bug on this?
    It would also be interesting to know if this happens on all APIs, only APIs supporting native jobs or just one specific API.
     
  3. GloriaVictis

    GloriaVictis

    Joined:
    Sep 1, 2016
    Posts:
    133
    While trying to use:
    -force-gles
    -force-vulkan
    It doesnt launch at all giving InitializeGraphicsEngine failed error

    -force-glcore - makes things works without the issue (I am not sure if its due to Api, or it's not launching Graphic Jobs because of that Api?)

    -force-d3d12 makes very weird artifacts (totally different) which I think might be related to that this notebook is really old with an integrated graphics https://i.gyazo.com/4740b195fde0a18e0bf693e705cbc2f1.mp4 [sorry for making movie of movie, it couldn't handle any recording software], this is because it is the only rig which has those issues in our office.

    Yet, it is very common to our players, and not related with "too weak hardware" of any kind, as it is actually happening to a player with I7-7700k and GTX 1060 graphics.

    All of those players, and also our testing rig have zero issues with Unity 2017 build.

    Sadly, we cannot fill a reproduction of that, first - because it doesn't happen on any test scene we try to do, it doesn't happen on the editor on the testing rig, but it happens 100% time in our game, right after getting into the game for specific players. We could give the build to the Unity, but we have not switched to Unity 2019 just because of it - I know it sounds "out of the loop" but if someone could, we would gladly share the Steam keys to the Unity support stuff, and keep getting the updated version on the beta branch on Steam, so they could try it anytime. Do you think there's even a remote chance for something like that? @joelv
     
    Last edited: Jan 7, 2021
  4. joelv

    joelv

    Unity Technologies

    Joined:
    Mar 20, 2015
    Posts:
    203
    Thanks for the information. So just to make sure I understand: the bug originally reproduced on DX11? This uses legacy graphics jobs (multi threads only the unity side of things as draw submission to the API is single threaded).

    I am not sure getting just a game build works out for us, we will need to debug this somehow. But please open a bug on this so we can track it and figure out how to investigate it. I would also love to know what other "weird artifacts (totally different)" you where seeing on DX12 so that could be investigated as well.
     
  5. GloriaVictis

    GloriaVictis

    Joined:
    Sep 1, 2016
    Posts:
    133
    Thank you for responding, we will do the bug report, but about sending an engine project to you, it won't work because we are an MMORPG game and just to launch the game fully you would need to set up database/server/lobby, etc and for obvious reasons it is impossible.

    Would sending you a developer's build of client do the job? Still, it would be viable only for Thursday because that's the day of the weekly update of our game.

    Out of curiosity - because I couldn't find that data for DX11, does it automatically work with Multithreaded Rendering?
    I believe so but just wanted to make sure, and what would be the potential drawback of turning off Graphic Jobs meantime while we are waiting for the fix?
    Our game is CPU bottlenecked on most of the rigs, yet it is rendering CPU overhead the most. We don't really have time now to do very specific tests if there will be a performance difference, yet we had a hope that getting into 2019 would give us additional optimizations out of the box but right now we are only left with Incremental GC as an improvement [which is huge and great by the way!]

    We will do a build for our players, and ask those who had this issue to record how the game will work using Dx12.
     
  6. joelv

    joelv

    Unity Technologies

    Joined:
    Mar 20, 2015
    Posts:
    203
    Ah, I understand. That's unfortunate. It might take some time for it to get to a developer but we'll get back to you on trying to find a way to debug this. A non development build might work if we can build a matching development player in debug and find out why this happens.

    How do you render the UI? If done by a unity system, which specific system is that?

    There is two different systems involved here. Multi Threaded Rendering is the system that splits the real API calls off from the main thread, and Graphics Jobs is a system to go wide using more threads.
    If the API requires command submission from a single thread we can use graphics jobs to go wide and still do the API calls from the render thread (DX11 and OpenGL). Otherwise we can use the graphics jobs to build native command buffers and submit them natively without any extra work being done on the render thread (DX12/Vulkan/Metal).

    Disabling graphics jobs might make your main thread CPU times go up. Also note that graphics jobs are not enabled in the editor which is why you can only reproduce this in a build.

    As a side note, you cannot force switch to an API not in the build list for the stand alone player. So that might explain why vulkan fails to initialize.
     
  7. GloriaVictis

    GloriaVictis

    Joined:
    Sep 1, 2016
    Posts:
    133
    We use Unity's Canvas component to render UI with "Screen Space - Overlay" render mode. The only custom thing we do is that we use our own UI components that inherit directly from Unity's ugui components eg. Image, Button, Toggle, and so on. However, we are not intentionally changing the way those components render UI (apart from occasionally using a material with a custom shader set inside the Image component).

    I have filled a bug report with it, will send you a private with the FogBugz link.