diff options
author | Alex VillacĂs Lasso <a_villacis@palosanto.com> | 2009-04-12 16:07:06 -0500 |
---|---|---|
committer | Alex Deucher <alexdeucher@gmail.com> | 2009-05-27 18:00:11 -0400 |
commit | f2742755352d49a1ff4cbf9a1a5050a0a50e9e6b (patch) | |
tree | 7ef9e6590ed012b1bd1eba6aa29cc30374db3d07 /src/savage_dri.c | |
parent | a5ad3e8f509ca07c429a43810cc3e2f80e70a1dc (diff) |
Do not use XAAGetCopyROP outside of XAA-specific code
The DRI code attempts to use XAAGetCopyROP without checking whether XAA or EXA is in effect. This results in the server crashing with an undefined-symbol error when enabling EXA, then starting glxgears under GNOME/Metacity and attempting to drag the glxgears window.
The EXA code happens to have a functional duplicate of the required code under the name SavageGetCopyROP(). This patch moves the code to savage_accel.c where it is now shared between EXA and the DRI code.
It is disturbing that this has not been caught before.
Diffstat (limited to 'src/savage_dri.c')
-rw-r--r-- | src/savage_dri.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/savage_dri.c b/src/savage_dri.c index 216c915..190e8ee 100644 --- a/src/savage_dri.c +++ b/src/savage_dri.c @@ -1578,6 +1578,9 @@ SAVAGEDRIMoveBuffers(WindowPtr pParent, DDXPointRec ptOldOrg, psav->AccelInfoRec->NeedToSync = TRUE; } +/* Definition in savage_accel.c */ +int SavageGetCopyROP(int rop); + static void SAVAGEDRISetupForScreenToScreenCopy( ScrnInfoPtr pScrn, @@ -1591,7 +1594,7 @@ SAVAGEDRISetupForScreenToScreenCopy( int cmd =0; cmd = BCI_CMD_RECT | BCI_CMD_DEST_PBD | BCI_CMD_SRC_PBD_COLOR; - BCI_CMD_SET_ROP( cmd, XAAGetCopyROP(rop) ); + BCI_CMD_SET_ROP( cmd, SavageGetCopyROP(rop) ); if (transparency_color != -1) cmd |= BCI_CMD_SEND_COLOR | BCI_CMD_SRC_TRANSPARENT; |