On Thu, 2018-06-21 at 08:38 +0100, Daniel Stone wrote: > Hey Lyude, > On Thu, 21 Jun 2018 at 00:13, Lyude Paul <ly...@redhat.com> wrote: > > - /* Pixmaps with multi-planes/modifier are not supported in this > > interface */ > > - if (ret != 1 || offsets[0] != 0) { > > - while (ret > 0) > > - close(fds[--ret]); > > + ret = _glamor_fds_from_pixmap(screen, pixmap, &fd, &stride32, NULL, > > size, > > + NULL); > > + if (ret != 1) > > return -1; > > This needs the removed code just above it, where it closes excess FDs. > I think the rest looks good though; I don't have a PRIME system so > wasn't able to test at the time. I think there is a misunderstanding here, as that bit of code was the bug this patch is supposed to fix. There's nothing excess it's closing, it either gets a single plane non-modifier bo (which never actually happens) and returns that, or gets a multi plane bo with modifiers and drops the bo entirely by closing all of it's file descriptors and returning -1.
We avoid that problem entirely in the new code by making it so that glamor_fd_from_pixmap() doesn't pass modifiers to _glamor_fds_from_pixmap(), which makes _glamor_fds_from_pixmap() call glamor_egl_fd_from_pixmap() which is only capable of returning a single file descriptor for a bo without modifiers or multiple planes. > > Cheers, > Daniel > _______________________________________________ > xorg-devel@lists.x.org: X.Org development > Archives: http://lists.x.org/archives/xorg-devel > Info: https://lists.x.org/mailman/listinfo/xorg-devel -- Cheers, Lyude Paul _______________________________________________ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel