[Intel-gfx] [RFC] DRI2 swapbuffers (yes yet again)
krh at bitplanet.net
Tue May 5 10:27:12 PDT 2009
On Tue, May 5, 2009 at 12:20 PM, Jesse Barnes <jbarnes at virtuousgeek.org> wrote:
> On Mon, 04 May 2009 19:14:29 -0700
> Ian Romanick <idr at freedesktop.org> wrote:
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>> Jesse Barnes wrote:
>> > On Mon, 04 May 2009 14:45:07 -0700
>> > Ian Romanick <idr at freedesktop.org> wrote:
>> >> There's a problem in dri2SwapBuffers. If a new libGL is used with
>> >> an old driver, psc->dri2->setBuffers won't be set, right?
>> > Yes. I should probably add an #ifdef for that like ->flush has.
>> No, I mean what happens you if you build a driver from, say,
>> mesa_7_4_branch and use it with libGL that has your patches applied.
>> The compile-time check won't cut it.
> Oh runtime mixing too... is that common?
>> >> Also, should there be a mechanism for the 3D driver to force swap
>> >> buffers to be implemented with a copy?
>> > Hm, well the 2D driver can easily force it by not implementing a
>> > swapbuffers function or by returning NULL, but I guess allowing the
>> > 3D driver to force it would be ok to. Could probably just check for
>> > ->setbuffers? Or maybe add a way for the driver to set the
>> > swapAvailable flag...
>> Having this ability would allow us to advertise some fbconfigs with
>> GLX_SWAP_METHOD_OML = GLX_SWAP_COPY_OML. We obviously don't have any
>> apps that use that today, but I can think of a couple that should. :)
> Yeah, ok.
It's not something that needs to be exposed in the protocol or dri2
module. If you want the copy behaviour, use DRI2CopyRegion().
Another point about GLX_SWAP_METHOD_OML is that we can't really
implement the "always swap" (GLX_SWAP_EXCHANGE_OML) behaviour without
a fair bit of yucky code, and without that we can't really claim to
support the extension.
More information about the Intel-gfx