mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-28 12:08:24 +02:00
glx/dri2: Don't call X server for SwapBuffers when there's no back buffer.
As already done in dri2CopySubBuffer().
Should fix:
https://bugs.freedesktop.org/show_bug.cgi?id=36371
https://bugs.freedesktop.org/show_bug.cgi?id=40533
Might fix:
https://bugs.freedesktop.org/show_bug.cgi?id=32589
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
(cherry picked from commit d8c443ddde)
This commit is contained in:
parent
0502da1ade
commit
942c1b8de1
1 changed files with 4 additions and 0 deletions
|
|
@ -539,6 +539,10 @@ dri2SwapBuffers(__GLXDRIdrawable *pdraw, int64_t target_msc, int64_t divisor,
|
|||
(struct dri2_display *)dpyPriv->dri2Display;
|
||||
CARD64 ret = 0;
|
||||
|
||||
/* Check we have the right attachments */
|
||||
if (!priv->have_back)
|
||||
return ret;
|
||||
|
||||
/* Old servers can't handle swapbuffers */
|
||||
if (!pdp->swapAvailable) {
|
||||
dri2CopySubBuffer(pdraw, 0, 0, priv->width, priv->height);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue