summaryrefslogtreecommitdiffstats
path: root/src/gallium/include
diff options
context:
space:
mode:
authorVarad Gautam <[email protected]>2017-05-30 17:23:43 +0530
committerEmil Velikov <[email protected]>2017-06-09 14:12:37 +0100
commitf61a8ba1688193080ffe7f419fde1605d0f72dc9 (patch)
treeb500b58d63629efb0bda47e6eb488cef171032e4 /src/gallium/include
parentd33fe8b84e45308a26068d3f015e033de93315b1 (diff)
st/dri: implement createImageWithModifiers in DRIimage
adds a pscreen->resource_create_with_modifiers() to create textures with modifier. v2: - stylefixes (Emil Velikov) - don't return selected modifier from resource_create_with_modifiers. we can use the winsys_handle to get this. Signed-off-by: Varad Gautam <[email protected]> Reviewed-by: Lucas Stach <[email protected]> (v1) Cc: Lucas Stach <[email protected]> Reviewed-by: Lucas Stach <[email protected]>
Diffstat (limited to 'src/gallium/include')
-rw-r--r--src/gallium/include/pipe/p_screen.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/gallium/include/pipe/p_screen.h b/src/gallium/include/pipe/p_screen.h
index 8b4239c61ae..5102827440e 100644
--- a/src/gallium/include/pipe/p_screen.h
+++ b/src/gallium/include/pipe/p_screen.h
@@ -328,6 +328,21 @@ struct pipe_screen {
* driver doesn't support an on-disk shader cache.
*/
struct disk_cache *(*get_disk_shader_cache)(struct pipe_screen *screen);
+
+ /**
+ * Create a new texture object from the given template info, taking
+ * format modifiers into account. \p modifiers specifies a list of format
+ * modifier tokens, as defined in drm_fourcc.h. The driver then picks the
+ * best modifier among these and creates the resource. \p count must
+ * contain the size of \p modifiers array.
+ *
+ * Returns NULL if an entry in \p modifiers is unsupported by the driver,
+ * or if only DRM_FORMAT_MOD_INVALID is provided.
+ */
+ struct pipe_resource * (*resource_create_with_modifiers)(
+ struct pipe_screen *,
+ const struct pipe_resource *templat,
+ const uint64_t *modifiers, int count);
};