mirror of
https://github.com/X11Libre/xf86-video-ati.git
synced 2026-03-24 01:24:43 +00:00
Guard local variable priv only used with glamor
Fixes compile errors with glamor disabled:
../../src/radeon_present.c: In function ‘radeon_present_check_flip’:
../../src/radeon_present.c:281:21: error: invalid use of undefined type ‘struct radeon_pixmap’
281 | if (priv && priv->fb_failed)
| ^~
../../src/radeon_present.c:288:19: error: invalid use of undefined type ‘struct radeon_pixmap’
288 | if (priv && !priv->fb_failed) {
| ^~
../../src/radeon_present.c:292:10: error: invalid use of undefined type ‘struct radeon_pixmap’
292 | priv->fb_failed = TRUE;
| ^~
This commit is contained in:
committed by
Michel Dänzer
parent
8da3e4561e
commit
3c7c84ed49
@@ -254,7 +254,9 @@ radeon_present_check_flip(RRCrtcPtr crtc, WindowPtr window, PixmapPtr pixmap,
|
||||
xf86CrtcPtr xf86_crtc = crtc->devPrivate;
|
||||
ScreenPtr screen = window->drawable.pScreen;
|
||||
ScrnInfoPtr scrn = xf86_crtc->scrn;
|
||||
#ifdef USE_GLAMOR
|
||||
struct radeon_pixmap *priv = radeon_get_pixmap_private(pixmap);
|
||||
#endif
|
||||
xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(scrn);
|
||||
RADEONInfoPtr info = RADEONPTR(scrn);
|
||||
PixmapPtr screen_pixmap = screen->GetScreenPixmap(screen);
|
||||
@@ -278,10 +280,13 @@ radeon_present_check_flip(RRCrtcPtr crtc, WindowPtr window, PixmapPtr pixmap,
|
||||
return FALSE;
|
||||
#endif
|
||||
|
||||
#ifdef USE_GLAMOR
|
||||
if (priv && priv->fb_failed)
|
||||
return FALSE;
|
||||
#endif
|
||||
|
||||
if (!radeon_pixmap_get_fb(pixmap)) {
|
||||
#ifdef USE_GLAMOR
|
||||
if (!priv)
|
||||
priv = radeon_get_pixmap_private(pixmap);
|
||||
|
||||
@@ -291,6 +296,7 @@ radeon_present_check_flip(RRCrtcPtr crtc, WindowPtr window, PixmapPtr pixmap,
|
||||
"normal if using PRIME render offloading)\n");
|
||||
priv->fb_failed = TRUE;
|
||||
}
|
||||
#endif
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user