glamor: Always return 0 from glamor_fds_from_pixmap on error
This matches what glamor_egl_fds_from_pixmap and dri3_fds_from_pixmap do and what proc_dri3_buffers_from_pixmap expects. Fixes:c8c276c956
"glamor: Implement PixmapFromBuffers and BuffersFromPixmap" Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com> (cherry picked from commit3da999a039
)
This commit is contained in:
parent
a9a17581ce
commit
544caffae1
|
@ -836,20 +836,20 @@ glamor_fds_from_pixmap(ScreenPtr screen, PixmapPtr pixmap, int *fds,
|
||||||
glamor_get_screen_private(pixmap->drawable.pScreen);
|
glamor_get_screen_private(pixmap->drawable.pScreen);
|
||||||
|
|
||||||
if (!glamor_priv->dri3_enabled)
|
if (!glamor_priv->dri3_enabled)
|
||||||
return -1;
|
return 0;
|
||||||
switch (pixmap_priv->type) {
|
switch (pixmap_priv->type) {
|
||||||
case GLAMOR_TEXTURE_DRM:
|
case GLAMOR_TEXTURE_DRM:
|
||||||
case GLAMOR_TEXTURE_ONLY:
|
case GLAMOR_TEXTURE_ONLY:
|
||||||
if (!glamor_pixmap_ensure_fbo(pixmap, pixmap->drawable.depth == 30 ?
|
if (!glamor_pixmap_ensure_fbo(pixmap, pixmap->drawable.depth == 30 ?
|
||||||
GL_RGB10_A2 : GL_RGBA, 0))
|
GL_RGB10_A2 : GL_RGBA, 0))
|
||||||
return -1;
|
return 0;
|
||||||
return glamor_egl_fds_from_pixmap(screen, pixmap, fds,
|
return glamor_egl_fds_from_pixmap(screen, pixmap, fds,
|
||||||
strides, offsets,
|
strides, offsets,
|
||||||
modifier);
|
modifier);
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return -1;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
_X_EXPORT int
|
_X_EXPORT int
|
||||||
|
|
Loading…
Reference in New Issue