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

Gfx.PresentFrame and Gfx.WaitForPresent in the same frame

Discussion in 'Editor & General Support' started by Janisse_Dev, Mar 9, 2018.

  1. Janisse_Dev

    Janisse_Dev

    Joined:
    Sep 18, 2015
    Posts:
    3
    Hello,

    We have an issue with the player on a Galaxy S4 and a Galaxy S4 Mini, the application runs around 10-15 FPS.

    The profiler shows us that the CPU wait for GPU and the GPU wait for the CPU in the same frame. It's a never ending loop, and it badly drops the framerate.

    We searched on google if anybody have these two Gfx message in a single frame, but we didn't find any similar case.

    Have you seen a similar case?
    Have you a clue of what can cause this?


    WaitLoop.png
     
  2. Nicolas1212

    Nicolas1212

    Joined:
    Dec 18, 2014
    Posts:
    139
    The first PresentFrame is from the previous frame, which is overlapping (look at the bars which start before the white line defining the frame boundary). The CPU needs to wait on it (the first WaitForPresent), before it can do its business, then you have the second PresentFrame, which overlaps the next frame, etc
     
    MartinTilo likes this.
  3. byton

    byton

    Joined:
    Apr 1, 2017
    Posts:
    2

    Hello, We have same problem in Simple LWRP Project.
    How did you defeat this problem? And did you win at all?
     
  4. MartinTilo

    MartinTilo

    Unity Technologies

    Joined:
    Aug 16, 2017
    Posts:
    2,431
    @byton: I guess the issue here was just the amount of stuff thrown at the GPU. You might be encountering the same in your LWRP project but the problem description is very general and LWRP wasn't even used here so I don't think there's much value for here, you'd need to dig deeper and elaborate more on your particular project.