[Mesa-dev] [PATCH 5/5] dri3: Use SwapBuffer flips for back- and fake front

Axel Davy axel.davy at normalesup.org
Wed Jun 28 18:48:40 UTC 2017


On 28/06/2017 20:40, Thomas Hellstrom wrote:
> On 06/28/2017 07:36 PM, Axel Davy wrote:
>> Hi,
>>
>> To my knowledge, this is invalid to switch the front fake buffer with 
>> the back buffer.
>>
>> The front buffer is supposed to take into account what the app draws 
>> with the xserver commands, etc.
>
> SwapBuffers should bring the contents of the back buffer to the front 
> (and fake front if applicable) buffer, and the backbuffer contents 
> become undefined, or tagged with a certain age. None of this is 
> violated here. The old back buffer will become the new fake front and 
> appropriately synced with X rendering as needed.
>
> Is there a specific scenario you are concerned with?

When I investigated the use of front buffer when writing the patch to 
add secondary gpu support, I understood almost all apps don't use front 
buffer at all, but when they do, it's to interact with the real content 
displayed to the user, which can see some modifications.

>
>>
>> Plus, if there is draw->width and back->width, I guess they can be 
>> different size, thus switching may be incorrect relative to buffer 
>> size too.
>
> Fake front and back are resized at the same time with dri3 AFAICT. 
> This means that with respect to dimensions, the new code should be 
> equivalent to the old one.
I don't remember the code enough to remember if and why the sizes can be 
different.
>
> Thanks,
>
> Thomas
>
>
>
Yours,


Axel Davy



More information about the mesa-dev mailing list