mirror of
https://github.com/X11Libre/xserver.git
synced 2026-10-09 23:22:22 +00:00
DRI2: Don't return junk reply instead of blocking in glXWaitForSbcOML()
DRI2WaitSBC() didn't block if requested targetSBC wasn't yet reached. Instead it returned a xreply with uninitialized junk return values, then blocked the connection until targetSBC was reached. Therefore the client didn't block, but continued with bogus return values from glXWaitForSbcOML. This patch fixes the problem by implementing DRI2WaitSBC similar to the clean and proven DRI2WaitMSC implementation. Signed-off-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de> Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
parent
7287ef9e6c
commit
b3548612c7
3 changed files with 8 additions and 21 deletions
|
|
@ -520,9 +520,8 @@ static int
|
|||
ProcDRI2WaitSBC(ClientPtr client)
|
||||
{
|
||||
REQUEST(xDRI2WaitSBCReq);
|
||||
xDRI2MSCReply rep;
|
||||
DrawablePtr pDrawable;
|
||||
CARD64 target, ust, msc, sbc;
|
||||
CARD64 target;
|
||||
int status;
|
||||
|
||||
REQUEST_SIZE_MATCH(xDRI2WaitSBCReq);
|
||||
|
|
@ -532,18 +531,9 @@ ProcDRI2WaitSBC(ClientPtr client)
|
|||
return status;
|
||||
|
||||
target = vals_to_card64(stuff->target_sbc_lo, stuff->target_sbc_hi);
|
||||
status = DRI2WaitSBC(client, pDrawable, target, &ust, &msc, &sbc);
|
||||
if (status != Success)
|
||||
return status;
|
||||
status = DRI2WaitSBC(client, pDrawable, target);
|
||||
|
||||
rep.type = X_Reply;
|
||||
rep.length = 0;
|
||||
rep.sequenceNumber = client->sequence;
|
||||
load_msc_reply(&rep, ust, msc, sbc);
|
||||
|
||||
WriteToClient(client, sizeof(xDRI2MSCReply), &rep);
|
||||
|
||||
return Success;
|
||||
return status;
|
||||
}
|
||||
|
||||
static int
|
||||
|
|
|
|||
Loading…
Reference in a new issue