
Originally Posted by
BlueCrab
Multi-buffering stuff was committed to the KOS repository as r647. It doesn't work exactly as JLF65 proposed. The implementation that I committed adds a a whole set of video modes that support 4 framebuffers, while leaving the old versions intact. They can be selected directly with the newly provided display modes (the specific modes that end in _MB), or by using a generic display mode ORed with DM_MULTIBUFFER.
Since the video modes must be set explicitly, vram_s and vram_l will always point to the "drawing" buffer (as long as vid_flip is used, i.e, the next framebuffer that would be selected by a vid_flip(-1), much like dvram_s/dvram_l in JLF65's original modifications). As a result of this, there is no point to dvram_*, and no need for the second clearing function.
I believe that this is a sane and safe compromise between the two extremes (leaving it alone and changing everything for multi-buffering with no regard for possible consequences). I've tested everything out with both PVR-based rendering (not specifying a multi-buffered video mode), as well as with software rendering (specifying a multi-buffered video mode), and haven't seen any problems.
Bookmarks