Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Bug Performance deteriorates when creating a new project in Unity 2020.3.23f1 or later.

Discussion in 'General Graphics' started by ushui, May 23, 2022.

  1. ushui

    ushui

    Joined:
    Jul 25, 2020
    Posts:
    14
    I happened to have stopped the version at 2020.3.22f1 for about 6 months, but it occurred about a week ago when I upgraded the Unity version.
    I am at a loss as to the cause.

    Here is a new project created with Unity 2020.3.22f1 and the play button is pressed.



    However, when I do the same with Unity 2020.3.23f1, the following happens.
    Note the graph in the profiler.


    This phenomenon also occurred in 2021.3.3f1.
    The above is a new project, so we are able to maintain close to 60 frames, but this strange phenomenon occurred during the development of an existing project.
    In that project, the frame rate, which was over 120 fps, dropped to about 20 fps.

    At first I suspected it was the assets or my own scripts, but after trying various things, I discovered that it had gone wrong from the time I created a new project.

    Looking in the profiler, I found that a process called Semaphore.WaitForSignal was taking up CPU time.
    I am not sure if this is a bug in Unity or something specific to the environment.

    Environments
    Mac mini 2018
    macOS 12.3.1
     
  2. ushui

    ushui

    Joined:
    Jul 25, 2020
    Posts:
    14
    For some reason, some of the images are not being referenced, so I uploaded the files.
     

    Attached Files:

  3. enhawk

    enhawk

    Joined:
    Aug 22, 2013
    Posts:
    832
    I had this same issue on Mac, and investigated switching API to OpenGLCore which removes wait for signal entirely, bumping the frame rate up considerably and not causing the GPU to go wild.

    Sadly I also noticed that antialiasing isn’t working in OpenGLCore API

    if you’re interested in seeing the difference, turn off “auto api” and add the API using the + button in Player Settings > Player
     
  4. ushui

    ushui

    Joined:
    Jul 25, 2020
    Posts:
    14
    I am very relieved to find others with the same problem.

    I changed the Mac API to OpenGLCore and it did indeed settle down.
    In my case, I will not be building for Mac, so this will be operational.
    Thanks for sharing!

    I assume that the graphics API for the Mac environment is Metal selected by default.
    As far as the release notes for 2020.3.23f1 are concerned, the fixes that may be relevant are as follows.
    https://unity3d.com/jp/unity/whats-new/2020.3.23

    > Graphics: Fixed a rendering issue so that Game and Scene View no longer renders artifacts on Apple M1. (1368374)
    > Graphics: Fixed an issue on Metal that depth clearing is enforced now when the "Don't care" load action is used.(1330613)

    However, I am an Intel Mac, not a Mac with an M1 chip.
    There may be others, but these corrections may have had an impact.
     
  5. ushui

    ushui

    Joined:
    Jul 25, 2020
    Posts:
    14
    Last edited: Jun 8, 2022
    Neil-Corre likes this.