diff options
author | Michel Dänzer <mdaenzer@redhat.com> | 2021-03-26 17:42:10 +0100 |
---|---|---|
committer | Michel Dänzer <michel@daenzer.net> | 2021-03-26 17:42:50 +0100 |
commit | 3c7c84ed49564907a148ae99b03200e0be350060 (patch) | |
tree | ad59e3231567ca5e57843a0f1cc0a86cfe929ba1 | |
parent | 8da3e4561ef82bb78c9a17b8cd8bf139b9cfd680 (diff) |
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;
| ^~
-rw-r--r-- | src/radeon_present.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/radeon_present.c b/src/radeon_present.c index 494655c9..d010aa19 100644 --- a/src/radeon_present.c +++ b/src/radeon_present.c @@ -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; } |