summaryrefslogtreecommitdiff
path: root/src/radeon_dri2.c
diff options
context:
space:
mode:
authorTom St Denis <tom.stdenis@amd.com>2015-11-11 16:01:41 +0900
committerMichel Dänzer <michel@daenzer.net>2015-11-12 11:27:33 +0900
commit98291869ac4a542a0b478920586407ff9d2c8ef0 (patch)
treee4af007cacbaeb712f29b910cc6be9de955ce05e /src/radeon_dri2.c
parentc6fc7e309a8a922f94a1f5f3e8bfb9058cff7ad1 (diff)
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 <tom.stdenis@amd.com> (ported from amdgpu commit 6000aef4e2f0a121b94023484406fb6f04688f74) Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'src/radeon_dri2.c')
-rw-r--r--src/radeon_dri2.c14
1 files 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;