glamor: Make glamor_name_from_pixmap work without DRI3

This function is used by the modesetting driver to implement DRI2 and
shouldn't fail on systems that don't support DRI3.

v2: Drop stale commit message wording, fix compiler warning (by anholt)

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Eric Anholt <eric@anholt.net>
This commit is contained in:
Matthieu Herrb 2016-09-23 16:56:06 +03:00 committed by Eric Anholt
parent 128d40b2dd
commit 8bb4b11298
1 changed files with 0 additions and 4 deletions

View File

@ -845,11 +845,7 @@ int
glamor_name_from_pixmap(PixmapPtr pixmap, CARD16 *stride, CARD32 *size)
{
glamor_pixmap_private *pixmap_priv = glamor_get_pixmap_private(pixmap);
glamor_screen_private *glamor_priv =
glamor_get_screen_private(pixmap->drawable.pScreen);
if (!glamor_priv->dri3_enabled)
return -1;
switch (pixmap_priv->type) {
case GLAMOR_TEXTURE_DRM:
case GLAMOR_TEXTURE_ONLY: