[Mesa-dev] [PATCH v3 12/15] gallium: introduce format modifier querying
Varad Gautam
varadgautam at gmail.com
Wed May 10 17:45:39 UTC 2017
From: Varad Gautam <varad.gautam at collabora.com>
format modifiers tokens are driver specific, and hence, need to come
in from the driver. this allows drivers to be queried for supported
format modifiers for EGL_EXT_image_dma_buf_import_modifiers.
v2: rebase to master.
v3: drivers must return false on query failure.
v4: use pscreen->is_format_supported instead of adding a separate
format query handle, remove PIPE_CAP_QUERY_DMABUF_ATTRIBS.
(Lucas Stach)
Signed-off-by: Varad Gautam <varad.gautam at collabora.com>
---
src/gallium/include/pipe/p_screen.h | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/src/gallium/include/pipe/p_screen.h b/src/gallium/include/pipe/p_screen.h
index 8b4239c..276d126 100644
--- a/src/gallium/include/pipe/p_screen.h
+++ b/src/gallium/include/pipe/p_screen.h
@@ -328,6 +328,17 @@ struct pipe_screen {
* driver doesn't support an on-disk shader cache.
*/
struct disk_cache *(*get_disk_shader_cache)(struct pipe_screen *screen);
+
+ /**
+ * Get supported modifiers for a format.
+ * If \p max is 0, the total number of supported modifiers for the supplied
+ * format is returned in \p count, with no modification to \p modifiers.
+ * Otherwise, \p modifiers is filled with upto \p max supported modifier
+ * codes, and \p count with the number of modifiers copied.
+ */
+ void (*query_dmabuf_modifiers)(struct pipe_screen *screen,
+ enum pipe_format format, int max,
+ uint64_t *modifiers, int *count);
};
--
2.10.0
More information about the mesa-dev
mailing list