From 98291869ac4a542a0b478920586407ff9d2c8ef0 Mon Sep 17 00:00:00 2001 From: Tom St Denis Date: Wed, 11 Nov 2015 16:01:41 +0900 Subject: Clean up radeon_dri2_create_buffer2() Remove the depth_pixmap variable from the function and clear out any dead/odd behaviour that results. Signed-off-by: Tom St Denis (ported from amdgpu commit 6000aef4e2f0a121b94023484406fb6f04688f74) Reviewed-by: Alex Deucher --- src/radeon_dri2.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/src/radeon_dri2.c b/src/radeon_dri2.c index 466d7004..d30bbd0b 100644 --- a/src/radeon_dri2.c +++ b/src/radeon_dri2.c @@ -181,7 +181,7 @@ radeon_dri2_create_buffer2(ScreenPtr pScreen, RADEONInfoPtr info = RADEONPTR(pScrn); BufferPtr buffers; struct dri2_buffer_priv *privates; - PixmapPtr pixmap, depth_pixmap; + PixmapPtr pixmap; int flags; unsigned front_width; uint32_t tiling = 0; @@ -209,10 +209,9 @@ radeon_dri2_create_buffer2(ScreenPtr pScreen, cpp = drawable->bitsPerPixel / 8; } - pixmap = pScreen->GetScreenPixmap(pScreen); - front_width = pixmap->drawable.width; + front_width = pScreen->GetScreenPixmap(pScreen)->drawable.width; - pixmap = depth_pixmap = NULL; + pixmap = NULL; if (attachment == DRI2BufferFrontLeft) { uint32_t handle; @@ -227,9 +226,6 @@ radeon_dri2_create_buffer2(ScreenPtr pScreen, pixmap = NULL; } else pixmap->refcnt++; - } else if (attachment == DRI2BufferStencil && depth_pixmap) { - pixmap = depth_pixmap; - pixmap->refcnt++; } if (!pixmap && (is_glamor_pixmap || attachment != DRI2BufferFrontLeft)) { @@ -314,10 +310,6 @@ radeon_dri2_create_buffer2(ScreenPtr pScreen, if (buffers == NULL) goto error; - if (attachment == DRI2BufferDepth) { - depth_pixmap = pixmap; - } - if (pixmap) { if (!info->use_glamor) { info->exa_force_create = TRUE; -- cgit v1.2.3