summaryrefslogtreecommitdiff
path: root/src/radeon_glamor.c
diff options
context:
space:
mode:
authorMichel Dänzer <michel.daenzer@amd.com>2018-08-24 11:00:16 +0200
committerMichel Dänzer <michel@daenzer.net>2018-08-29 17:23:34 +0200
commitde88ea2755611bdcb18d91d8234d2ab5be8ff2e9 (patch)
treedc2e183faf70db64720c462bbb74fce3f754a25c /src/radeon_glamor.c
parent84bde2df5b453f8aab35aa18b0cf1f20b8d20488 (diff)
glamor: Handle ihandle == -1 in radeon_glamor_set_shared_pixmap_backing
Diffstat (limited to 'src/radeon_glamor.c')
-rw-r--r--src/radeon_glamor.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/radeon_glamor.c b/src/radeon_glamor.c
index c733d192..bffc89ec 100644
--- a/src/radeon_glamor.c
+++ b/src/radeon_glamor.c
@@ -402,11 +402,13 @@ radeon_glamor_set_shared_pixmap_backing(PixmapPtr pixmap, void *handle)
{
ScreenPtr screen = pixmap->drawable.pScreen;
ScrnInfoPtr scrn = xf86ScreenToScrn(screen);
+ int ihandle = (int)(long)handle;
if (!radeon_set_shared_pixmap_backing(pixmap, handle, NULL))
return FALSE;
- if (!radeon_glamor_create_textured_pixmap(pixmap,
+ if (ihandle != -1 &&
+ !radeon_glamor_create_textured_pixmap(pixmap,
radeon_get_pixmap_bo(pixmap))) {
xf86DrvMsg(scrn->scrnIndex, X_ERROR,
"Failed to get PRIME drawable for glamor pixmap.\n");