<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, May 19, 2017 at 2:37 AM, Daniel Stone <span dir="ltr"><<a href="mailto:daniels@collabora.com" target="_blank">daniels@collabora.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">From: Varad Gautam <<a href="mailto:varad.gautam@collabora.com">varad.gautam@collabora.com</a>><br>
<br>
these allow querying the driver for supported dmabuf formats and<br>
modifiers.<br>
<br>
v2: move to __DRIimageExtension version 16.<br>
v3: return GLBoolean for error reporting, document params better.<br>
<br>
Signed-off-by: Varad Gautam <<a href="mailto:varad.gautam@collabora.com">varad.gautam@collabora.com</a>><br>
Reviewed-by: Daniel Stone <<a href="mailto:daniels@collabora.com">daniels@collabora.com</a>><br>
Signed-off-by: Daniel Stone <<a href="mailto:daniels@collabora.com">daniels@collabora.com</a>><br>
---<br>
include/GL/internal/dri_<wbr>interface.h | 42 ++++++++++++++++++++++++++++++<wbr>++++++-<br>
1 file changed, 41 insertions(+), 1 deletion(-)<br>
<br>
diff --git a/include/GL/internal/dri_<wbr>interface.h b/include/GL/internal/dri_<wbr>interface.h<br>
index 53b95dd93d..37bd48b0b6 100644<br>
--- a/include/GL/internal/dri_<wbr>interface.h<br>
+++ b/include/GL/internal/dri_<wbr>interface.h<br>
@@ -1137,7 +1137,7 @@ struct __DRIdri2ExtensionRec {<br>
* extensions.<br>
*/<br>
#define __DRI_IMAGE "DRI_IMAGE"<br>
-#define __DRI_IMAGE_VERSION 15<br>
+#define __DRI_IMAGE_VERSION 16 <br></blockquote><div><br></div><div>Do we really need to bump the extension version twice in one patch series? Seems like we could just as easily merge this into patch 3. Not that it matters...<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
/**<br>
* These formats correspond to the similarly named MESA_FORMAT_*<br>
@@ -1513,6 +1513,46 @@ struct __DRIimageExtensionRec {<br>
enum __DRIChromaSiting vert_siting,<br>
unsigned *error,<br>
void *loaderPrivate);<br>
+<br>
+ /*<br>
+ * dmabuf format query to support EGL_EXT_image_dma_buf_import_<wbr>modifiers.<br>
+ *<br>
+ * \param max Maximum number of formats that can be accomodated into<br>
+ * \param formats. If zero, no formats are returned -<br>
+ * instead, the driver returns the total number of<br>
+ * supported dmabuf formats in \param count.<br>
+ * \param formats Buffer to fill formats into.<br>
+ * \param count Count of formats returned, or, total number of<br>
+ * supported formats in case \param max is zero.<br>
+ *<br>
+ * Returns true on success.<br>
+ *<br>
+ * \since 16<br>
+ */<br>
+ GLboolean (*queryDmaBufFormats)(__<wbr>DRIscreen *screen, int max, int *formats,<br>
+ int *count);<br>
+<br>
+ /*<br>
+ * dmabuf format modifier query for a given format to support<br>
+ * EGL_EXT_image_dma_buf_import_<wbr>modifiers.<br>
+ *<br>
+ * \param fourcc The format to query modifiers for. If this format<br>
+ * is not supported by the driver, return false.<br>
+ * \param max Maximum number of modifiers that can be accomodated in<br>
+ * \param modifiers. If zero, no modifiers are returned -<br>
+ * instead, the driver returns the total number of<br>
+ * modifiers for \param format in \param count.<br>
+ * \param modifiers Buffer to fill modifiers into.<br>
+ * \param count Count of the modifiers returned, or, total number of<br>
+ * supported modifiers for \param fourcc in case<br>
+ * \param max is zero.<br>
+ *<br>
+ * Returns true upon success.<br>
+ *<br>
+ * \since 16<br>
+ */<br>
+ GLboolean (*queryDmaBufModifiers)(__<wbr>DRIscreen *screen, int fourcc, int max,<br>
+ uint64_t *modifiers, int *count);<br>
};<br>
<span class="HOEnZb"><font color="#888888"><br>
<br>
--<br>
2.13.0<br>
<br>
______________________________<wbr>_________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/mesa-dev</a><br>
</font></span></blockquote></div><br></div></div>