cancel
Showing results for 
Search instead for 
Did you mean: 

Application vs Compositor? Wanting to understand the performance HUD better

F4CEpa1m
Level 5
Hullo people much smarter than I!!

Just wanted to get comments and/or corrections on the below from someone who understands this all better than myself.

Any input would be much appreciated.

Here goes!!:

As far as I understand it, the application frames come before compositor frames. 
So basically it's like app > timewarp (ASW/ATW) > compositor > your eye
(i'm cutting a lot out here btw, but this is the relevant stuff)

In the graphics pipeline, the application is your games raw output.  
This output then gets effects like lighting and textures applied.
Then the output of that gets passed on to the compositor (combines of all the elements that make up a frame).

The thing to remember is that for 90fps gameplay in VR, vsync will happen 90 times per second.
This means that 1 frame needs to be ready each 11ms (90/1000=11ms)
You can think of vsync like a gate, and the app and compositor need to be ready at that gate with their full frames before the gate opens, otherwise they will be turned away at the door (dropping a frame)

If the application and then the compositor don't have a full frame ready at the 11ms mark, then frames are dropped, which means you don't get to see that frame.

So as far as I can gather, the application gets a frame ready for vsync, if that doesn't happen then that frame is dropped.
At which time timewarp (ATW/ASW) kicks in and starts smoothing shit out by creating fake frames to hand to the compositor so that the compositor can present a full frame at vsync
(note: this could be an actual full frame if the application was ready for vsync, or if it wasn't then this could be a 'fake' frame created by ATW/ASW)

Essentially, no dropped frames is perfect.  
Occasional dropped frames, like a few here and there is fine.  
A lot of dropped frames by the app or compositor is bad mmkay.

Usually I just keep an eye on the 'App Frame rate (Hz)' graph first and foremost.  
I want that running at 90fps with the OCCASIONAL dump to 45fps.

Then the 'Performance' graph, I like to see at least 10% headroom there constantly.

I'll also keep an eye on the 'Application' and 'Compositor' frames dropped to make sure I'm seeing 90fps.

If I don't see those things then I ease off on the in game settings or Supersampling if I have it on.

Any thoughts, comments, corrections on the above?

Trying to keep it as simple and relevant as possible..

Cheers!

x_0
4 REPLIES 4

kojack
Volunteer Moderator
Volunteer Moderator

F4CEpa1m said:


So as far as I can gather, the application gets a frame ready for vsync, if that doesn't happen then that frame is dropped.
At which time timewarp (ATW/ASW) kicks in and starts smoothing shit out by creating fake frames to hand to the compositor so that the compositor can present a full frame at vsync
(note: this could be an actual full frame if the application was ready for vsync, or if it wasn't then this could be a 'fake' frame created by ATW/ASW)
For ASW, that's correct. When it is active (you dropped below 90fps), games render at 45Hz and extra frames are generated by positional reprojection to give a 90Hz final result.

Time warp (ATW) is different though. It's not about generating extra frames. ATW reduces latency of head tracking between rendering and display. A game reads head tracking, then renders the frame. By the time the oculus system gets the frame, the head tracking might be 11ms or more out of date (depends on how long it took to render the frame). What ATW does is do another read of the headset tracking after the game submits it's frame, compare the amount of rotation that happened before and after the frame was rendered, then do a rotational reprojection of the frame to compensate. ATW happens every frame, regardless of framerate, and can't be disabled.

Both ATW and ASW can be active at once, they solve different problems.

Author: Oculus Monitor,  Auto Oculus Touch,  Forum Dark Mode, Phantom Touch Remover,  X-Plane Fixer
Hardware: Threadripper 1950x, MSI Gaming Trio 2080TI, Asrock X399 Taich
Headsets: Wrap 1200VR, DK1, DK2, CV1, Rift-S, GearVR, Go, Quest, Quest 2, Reverb G2

F4CEpa1m
Level 5

kojack said:

What ATW does is do another read of the headset tracking after the game submits it's frame, compare the amount of rotation that happened before and after the frame was rendered, then do a rotational reprojection of the frame to compensate. 



First of all, thanks for taking the time to reply. 

So, that would add additional latency yeah? 

Is the idea then that the frames first render is presented a little faster than the vsync time (11ms in this case) of that frame, which allows that extra moment or two for ATW to do its thing? 

Meaning the initial render of the frame and ATW reprojecting a frame all takes place before the 11ms mark when vsync occurs.

Is that any closer? 

kojack
Volunteer Moderator
Volunteer Moderator
There's always a little overhead added to the frame time. The oculus runtime can't use the image the game provides directly, it needs to do a few rendering things too. It takes all of the layers you are using and composites them together (most software is only using 1 layer, but more are possible), and performs the distortion correction step (barrel distortion, rescale to panel resolution and chromatic aberration correction) via a distortion mesh. The timewarp rotation is performed as part of this process.
So if your game was taking just on 11ms to render a frame, the extra VR work that still needs to be done would push it past vsync. Even without timewarp, there's still a fair bit of work being done on the end of every frame to get things ready for the headset..


Author: Oculus Monitor,  Auto Oculus Touch,  Forum Dark Mode, Phantom Touch Remover,  X-Plane Fixer
Hardware: Threadripper 1950x, MSI Gaming Trio 2080TI, Asrock X399 Taich
Headsets: Wrap 1200VR, DK1, DK2, CV1, Rift-S, GearVR, Go, Quest, Quest 2, Reverb G2

MowTin
Level 11
The CPU has to prepare the frame and then hand it off to the GPU. 

I notice GPU render time and CPU render time. Do they happen sequentially? 

When I play IL-2 I get high CPU render times ~12 ms and low GPU render times >1 ms. Does that mean the CPU is spending less than 1 ms to render a frame? 
i7 9700k 3090 rtx   CV1, Rift-S, Index, G2