DRI2: throttle swaps at submission time too
We need to throttle swaps here in addition to when the context is made current to avoid causing problems with clients that just swap. Throttling here also ensures our swaps get ordered as long as we block the client occasionally. Reported-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de> Reviewed-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
This commit is contained in:
parent
db1c7cb604
commit
0294ff2a5c
|
@ -384,6 +384,13 @@ ProcDRI2SwapBuffers(ClientPtr client)
|
|||
DixReadAccess | DixWriteAccess, &pDrawable, &status))
|
||||
return status;
|
||||
|
||||
/*
|
||||
* Ensures an out of control client can't exhaust our swap queue, and
|
||||
* also orders swaps.
|
||||
*/
|
||||
if (DRI2ThrottleClient(client, pDrawable))
|
||||
return client->noClientException;
|
||||
|
||||
target_msc = vals_to_card64(stuff->target_msc_lo, stuff->target_msc_hi);
|
||||
divisor = vals_to_card64(stuff->divisor_lo, stuff->divisor_hi);
|
||||
remainder = vals_to_card64(stuff->remainder_lo, stuff->remainder_hi);
|
||||
|
|
Loading…
Reference in New Issue
Block a user