diff options
author | Tom St Denis <tom.stdenis@amd.com> | 2015-10-14 13:25:59 -0400 |
---|---|---|
committer | Michel Dänzer <michel.daenzer@amd.com> | 2015-10-15 10:08:58 +0900 |
commit | 6000aef4e2f0a121b94023484406fb6f04688f74 (patch) | |
tree | 3bc3f2a85a04ac3dd3e1c7f2a6f76c4bf4d45071 /src | |
parent | 21e72fb2418b5cc7fc849a9cf951186e209036b0 (diff) |
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@amd.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/amdgpu_dri2.c | 14 |
1 files changed, 3 insertions, 11 deletions
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; |