[Mesa-dev] [PATCH 2/3] glx: add interface for flushing a drawable and throttling at the same time

Marek Olšák maraeo at gmail.com
Fri Nov 9 10:19:56 PST 2012


On Fri, Nov 9, 2012 at 6:36 PM, Eric Anholt <eric at anholt.net> wrote:
> Marek Olšák <maraeo at gmail.com> writes:
>
>> The motivation is to prevent a double flush in Gallium.
>>
>> Gallium flushes in __DRI2flushExtensionRec::flush and dri2Throttle.
>> This will help consolidate the flushing.
>
> It looks like you've changed a bunch of drivers to expose
> __DRI2_FLUSH_VERSION (4) instead of 3, without making them implement the
> new interface, so they'd just crash.  Please continue to use explicit
> numbers in drivers, so that drivers don't break when the loader
> interface is revved without updating them.

What you're saying doesn't make any sense. I changed the drivers to
expose 3, so that they don't crash.

>
> More generally, I think our loader vs driver implementation of
> swapbuffers is backwards.  I'd rather see the driver get a
> swapbuffers-specific call as immediately as possible from the loader,
> let it handle flushing and throttling, and have it call to dri2 part of
> the loader for actually telling the other side to go swap the buffers.
>
> If we had that, then hopefully getting the flushes down to 1 is obvious,
> since the driver would do that after any other things it does (like msaa
> resolves) right before asking the server for the swap.

I agree. I'd also like the driver to call to the loader to go swap the
buffers, because the radeon driver can offload flushes to another
thread, but then we have to offload the swap as well.

Marek


More information about the mesa-dev mailing list