On 27 September 2017 at 16:00, Daniel Stone <[email protected]> wrote: > Hi Marek, > > On 27 September 2017 at 15:55, Marek Olšák <[email protected]> wrote: >> if (dmabuf_ret && dmabuf_ret->val.val_bool) { >> uint64_t cap; >> >> if (drmGetCap(sPriv->fd, DRM_CAP_PRIME, &cap) == 0 && >> (cap & DRM_PRIME_CAP_IMPORT)) { >> dri2ImageExtension.createImageFromFds = dri2_from_fds; >> dri2ImageExtension.createImageFromDmaBufs = dri2_from_dma_bufs; >> dri2ImageExtension.createImageFromDmaBufs2 = dri2_from_dma_bufs2; >> dri2ImageExtension.queryDmaBufFormats = dri2_query_dma_buf_formats; >> - dri2ImageExtension.queryDmaBufModifiers = >> - dri2_query_dma_buf_modifiers; >> + if (pscreen->query_dmabuf_modifiers) { >> + dri2ImageExtension.queryDmaBufModifiers = >> + dri2_query_dma_buf_modifiers; >> + } > > This should also not expose queryDmaBufFormats, since that is also > part of EGL_EXT_image_dma_buf_import_modifiers, which is pretty > useless without modifiers. > True, it's useless. Suggestion makes the code a bit confusing though. After all EGL already checks that all the entry points are present before advertising the extension.
Either way, I think we want this in stable, right? Emil _______________________________________________ mesa-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-dev
