diff options
author | jimqu <Jim.Qu@amd.com> | 2016-02-16 17:05:48 +0900 |
---|---|---|
committer | Michel Dänzer <michel@daenzer.net> | 2016-02-17 11:44:19 +0900 |
commit | 7bc089ee9740a3ef91f16e36786d8ed64e165acd (patch) | |
tree | 3a937c4161482bd08081e5d0fbe6c198ef699a5b /src/radeon_glamor.c | |
parent | 4cc32031467157ab8788f5c684fb1ac67ae96ff9 (diff) |
glamor: Return NullPixmap on failure to create shareable pixmap
If we were asked to create a shareable pixmap, it doesn't make sense
to return a pixmap which isn't shareable. Doing so caused trouble down
the line such as a crash with older versions of glamor when trying to
use GLX pixmaps of bpp < 32 via DRI2.
Signed-off-by: JimQu <jim.qu@amd.com>
(ported from amdgpu commit 2fcb7dadd3c71cd405cbbaafc777697538ca9c29)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'src/radeon_glamor.c')
-rw-r--r-- | src/radeon_glamor.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/radeon_glamor.c b/src/radeon_glamor.c index 6a12b334..cc2b1f2a 100644 --- a/src/radeon_glamor.c +++ b/src/radeon_glamor.c @@ -262,7 +262,9 @@ fallback_glamor: */ xf86DrvMsg(scrn->scrnIndex, X_WARNING, "Failed to create textured DRI2/PRIME pixmap."); - return pixmap; + + radeon_glamor_destroy_pixmap(pixmap); + return NullPixmap; } /* Create textured pixmap failed means glamor failed to * create a texture from current BO for some reasons. We turn |