Triple Buffering on the 360

As I said earlier, the games are totally v-synced, so having a double buffered setup would actually make the control sluggish due to constant drops.

I didn't think triple buffering had anything to do with improving frame rate, only having an extra buffer to call on when your next frame isn't done rendering to avoid tearing, no?

still an insult
i was not confused
i was under the impression that triple buffers was done to increase the framerate, that was wrong but that doesnt make me confused

I'm sorry but I see no reason why anyone here would care to insult anyone. People took the time and effort to try and explain to you, quite clearly, how triple buffering is possible on the 360. It's up to you at that point to take the time to read, comprehend, and consider what they are trying to teach you.
 
With the 360 though, the eDRAM sort of gives you a scratchpad for rendering, what is in it still needs a copy out to the back buffer if it's double buffered or not. The display hardware still needs a completed true back buffer in main RAM before it can do the pointer swap though.

It was wrong for me to say the backbuffer goes in edram - the backbuffer is in main memory. I was using the term loosely (incorrectly) to describe the portion of what will make up the backbuffer currently being rendered. If you aren't tiling then that's the whole frame.

If you time the copy-out-to-backbuffer correctly I understand that you can get the same effect as double buffering, but without having two frame buffers in main memory (I think I read that here on B3D actually). [Edit]Can you have a backbuffer without a frontbuffer? Wouldn't you just have a "framebuffer"?[/Edit]

It seems likely then that if you were using two buffers (back and front in main memory) you could achieve a similar effect to triple buffering by starting to render [a new frame] to edram immediately after finishing work on the backbuffer. [Dumb ass Edit. Doh.]...
I guess it does mean there is less need to use triple buffering on the 360, because (unless you are tiling) the backbuffer in main memory is only modified during the resolve from edram (which is typically quite fast). Whereas with the PS3, the contents of the buffer is naturally being constructed for the duration of the frame.
Ah, I get it now. Page 1. :(
[/Edit]


still an insult
i was not confused
i was under the impression that triple buffers was done to increase the framerate, that was wrong but that doesnt make me confused

It might be helpful to think of triple buffering more as something that reduces the severity of frame rate drops over a period of time rather than something that simply "increases" frame rate. It doesn't increase the work you have to do per frame, or the number of copy-outs from edram for each frame, but it does reduce the amount of time your renderer has to wait after finishing a frame before it can start on the next.

Another way to eliminate this wait is to ignore vsync, but the cost is tearing.
 
Last edited by a moderator:
It seems likely then that if you were using two buffers (back and front in main memory) you could achieve a similar effect to triple buffering by starting to render [a new frame] to edram immediately after finishing work on the backbuffer.

I suppose that you could if you could resolve the whole frame in there without tiling.
 
Even if you were tiling, you might be able to get to work on the first tile of a third (currently bufferless) frame.

... and if you were tiling horizontally, maybe you could copy out and overwrite part of the front buffer, once that part had been read out to the display device, leaving you free to start on the next tile.

Would be pretty cool if you could do this sort of thing.
 
I think EDRAM helps decouple things, but there is only 1 EDRAM and a resolve takes longer than a flip, so it doesn't constitute triple buffering.

An EDRAM resolve can overlap a flip opportunity (vblank)

If that happens you have no choice but to wait for the next flip (otherwise you could show the same frame ad infinitum)

But!

If you know how long the EDRAM resolve takes, and you have access to vertical timing information you can decide if it is safe to request a resolve now or wait until after the next flip or start drawing the next frame ...

Another approach to tearing is to turn vsync off but only flip buffers when the vertical trace is near to the top, or bottom of the screen.

That is what old video games seem to do ...
 
Back
Top