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:
parent
128d40b2dd
commit
8bb4b11298
|
@ -845,11 +845,7 @@ int
|
||||||
glamor_name_from_pixmap(PixmapPtr pixmap, CARD16 *stride, CARD32 *size)
|
glamor_name_from_pixmap(PixmapPtr pixmap, CARD16 *stride, CARD32 *size)
|
||||||
{
|
{
|
||||||
glamor_pixmap_private *pixmap_priv = glamor_get_pixmap_private(pixmap);
|
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) {
|
switch (pixmap_priv->type) {
|
||||||
case GLAMOR_TEXTURE_DRM:
|
case GLAMOR_TEXTURE_DRM:
|
||||||
case GLAMOR_TEXTURE_ONLY:
|
case GLAMOR_TEXTURE_ONLY:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user