![]() |
![]() |
|
|
||||
|
||||
|
Quote:
![]() Quote:
__________________
"A programmer is just a tool which converts caffeine into code" |
|
#22
|
||||
|
||||
|
"A programmer is just a tool which converts caffeine into code"
Man, ain't that the truth. ![]() |
|
#23
|
||||
|
||||
|
Quote:
How is this situation better than being stalled for the N+1'th frame with OFTL off (even more, it is worse as you are one frame behind) Correct me if I'm wrong ofcourse ![]() I also note that for myself, I gain little to no fps from OFTL, only some input lag.
__________________
aka Wakke |
|
|
||||
|
||||
|
Ok, for the sake of argument let's assume that your game thread consistently takes 5ms to run and the render thread takes 10ms to run.
If you run with OFTL off, once the render thread has finished rendering the frame (10ms), it has to wait an additional 5ms for the game thread to finish computing the next frame before it can do any work. Since the render thread is not allowed to lag behind (also read as since the game thread is not allowed to work ahead) there is no queued frame. Hence, the effective time to render a frame from the render thread's perspective becomes 15ms. On the other hand, if you have OFTL enabled, by the time the render thread has finished rendering one frame, it will already have a queued up frame to work on immediately. So the effective render time is now 10ms as opposed to 15ms. Of course, if the render thread is more than 2 times slower than the game thread, then it will not always have a queued up frame, and as a result OFTL will yield diminishing returns.
__________________
"A programmer is just a tool which converts caffeine into code" |
|
#25
|
||||
|
||||
|
Quote:
"While the Nth frame is being rendered, the game thread can compute your (N+1)th frame in parallel." This seems in conflict with the quoted sentence above?
__________________
aka Wakke |
|
|
||||
|
||||
|
Quote:
Quote:
The game thread is not dependent on the render thread, and hence can start computing the next frame before the render thread has finished. But the render thread is dependent on the game thread, and cannot begin a frame before the game thread has finished. Also, I was being very simplistic in my 5ms, 10ms example. I hope you get the idea. You'll just have to put 2 and 2 together. Unfortunately, this is about as much detail I can go into in the forums.
__________________
"A programmer is just a tool which converts caffeine into code" Last edited by [TW]redeye; 06-01-2012 at 11:25 AM. Reason: Clarification |
|
#27
|
||||
|
||||
|
Sometimes pictures say more than words, so here is my understanding of the scenario where game thread = 5ms and render thread = 10ms.
Beyond the initial throughput increase for the game thread, I see no advantage of OFTL. Where is this interpretation wrong? Note: I realize this is a simplified scenario, but it gets my point across. In cases where the render thread is sometimes faster and sometimes slower than the game thread, I can imagine there being more benefit.
__________________
aka Wakke Last edited by Proud_God; 06-01-2012 at 12:20 PM. |
|
#28
|
||||
|
||||
|
Quote:
Each frame is different, and as such takes more or less time to finish rendering. Having that n+1 th game thread I think makes more of a difference when things slow down and speed back up again.
__________________
Join us on one of our four servers! |
![]() |
| Thread Tools | |
| Display Modes | |
|
|