glamor: Propagate glamor_fds_from_pixmap error in glamor_fd_from_pixmap
glamor_fds_from_pixmap returns 0 on error, but we were treating that as success, continuing with uninitialized stride and fd values. Also bail if the offset isn't 0, same as in dri3_fd_from_pixmap. v2: * Reduce to a simple one-liner fix (Emil Velikov) Fixes:c8c276c956
"glamor: Implement PixmapFromBuffers and BuffersFromPixmap" Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com> (cherry picked from commit4d5950ce14
)
This commit is contained in:
parent
544caffae1
commit
33f20c38fc
|
@ -865,7 +865,7 @@ glamor_fd_from_pixmap(ScreenPtr screen,
|
|||
&modifier);
|
||||
|
||||
/* Pixmaps with multi-planes/modifier are not supported in this interface */
|
||||
if (ret > 1) {
|
||||
if (ret != 1 || offsets[0] != 0) {
|
||||
while (ret > 0)
|
||||
close(fds[--ret]);
|
||||
return -1;
|
||||
|
|
Loading…
Reference in New Issue