xf86-video-amdgpu: Branch 'master'

Michel Dänzer daenzer at kemper.freedesktop.org
Wed Oct 14 18:12:29 PDT 2015


 src/amdgpu_dri2.c |   14 +++-----------
 1 file changed, 3 insertions(+), 11 deletions(-)

New commits:
commit 6000aef4e2f0a121b94023484406fb6f04688f74
Author: Tom St Denis <tom.stdenis at amd.com>
Date:   Wed Oct 14 13:25:59 2015 -0400

    Clean up amdgpu_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 at amd.com>

diff --git a/src/amdgpu_dri2.c b/src/amdgpu_dri2.c
index 756d6ad..48d55c1 100644
--- a/src/amdgpu_dri2.c
+++ b/src/amdgpu_dri2.c
@@ -153,7 +153,7 @@ amdgpu_dri2_create_buffer2(ScreenPtr pScreen,
 	AMDGPUInfoPtr info = AMDGPUPTR(pScrn);
 	BufferPtr buffers;
 	struct dri2_buffer_priv *privates;
-	PixmapPtr pixmap, depth_pixmap;
+	PixmapPtr pixmap;
 	struct amdgpu_buffer *bo = NULL;
 	unsigned front_width;
 	unsigned aligned_width = drawable->width;
@@ -180,10 +180,9 @@ amdgpu_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) {
 		pixmap = get_drawable_pixmap(drawable);
@@ -196,9 +195,6 @@ amdgpu_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)) {
@@ -216,10 +212,6 @@ amdgpu_dri2_create_buffer2(ScreenPtr pScreen,
 	if (buffers == NULL)
 		goto error;
 
-	if (attachment == DRI2BufferDepth) {
-		depth_pixmap = pixmap;
-	}
-
 	if (pixmap) {
 		struct drm_gem_flink flink;
 		union gbm_bo_handle bo_handle;


More information about the xorg-commit mailing list