summaryrefslogtreecommitdiffstats
path: root/recipes-graphics/mesa/mesa/0001-dri-add-createImageWithModifiers2-interface.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-graphics/mesa/mesa/0001-dri-add-createImageWithModifiers2-interface.patch')
-rw-r--r--recipes-graphics/mesa/mesa/0001-dri-add-createImageWithModifiers2-interface.patch67
1 files changed, 67 insertions, 0 deletions
diff --git a/recipes-graphics/mesa/mesa/0001-dri-add-createImageWithModifiers2-interface.patch b/recipes-graphics/mesa/mesa/0001-dri-add-createImageWithModifiers2-interface.patch
new file mode 100644
index 00000000..261c54cc
--- /dev/null
+++ b/recipes-graphics/mesa/mesa/0001-dri-add-createImageWithModifiers2-interface.patch
@@ -0,0 +1,67 @@
1From afd8b2f498a417de6ecdbd13045d97c9ecf4391b Mon Sep 17 00:00:00 2001
2From: Simon Ser <contact@emersion.fr>
3Date: Mon, 14 Dec 2020 18:32:47 +0100
4Subject: [PATCH] dri: add createImageWithModifiers2 interface
5
6With the addition of createImageWithModifiers usage flags were
7dropped, as it was believed at the time that modifers will be a
8full replacement for the usage flags. This has turned out to be
9untrue, as modifiers are not able to describe buffer placement.
10
11Add a new version of the interface, that allows to specifiy
12use flags in addition to the modifier.
13
14Signed-off-by: Simon Ser <contact@emersion.fr>
15Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
16Reviewed-by: Daniel Stone <daniels@collabora.com>
17Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8106>
18Upstream-Status: Applied [https://gitlab.freedesktop.org/mesa/mesa/-/commit/afd8b2f498a417de6ecdbd13045d97c9ecf4391b]
19---
20 include/GL/internal/dri_interface.h | 24 +++++++++++++++++++++++-
21 1 file changed, 23 insertions(+), 1 deletion(-)
22
23diff --git a/include/GL/internal/dri_interface.h b/include/GL/internal/dri_interface.h
24index 9b85e67ce49..a7d9903f94e 100644
25--- a/include/GL/internal/dri_interface.h
26+++ b/include/GL/internal/dri_interface.h
27@@ -1328,7 +1328,7 @@ struct __DRIdri2ExtensionRec {
28 * extensions.
29 */
30 #define __DRI_IMAGE "DRI_IMAGE"
31-#define __DRI_IMAGE_VERSION 18
32+#define __DRI_IMAGE_VERSION 19
33
34 /**
35 * These formats correspond to the similarly named MESA_FORMAT_*
36@@ -1803,6 +1803,28 @@ struct __DRIimageExtensionRec {
37 uint32_t flags,
38 unsigned *error,
39 void *loaderPrivate);
40+
41+ /**
42+ * Creates an image with implementation's favorite modifiers and the
43+ * provided usage flags.
44+ *
45+ * This acts like createImageWithModifiers except usage is also specified.
46+ *
47+ * The created image should be destroyed with destroyImage().
48+ *
49+ * Returns the new DRIimage. The chosen modifier can be obtained later on
50+ * and passed back to things like the kernel's AddFB2 interface.
51+ *
52+ * \sa __DRIimageRec::createImage
53+ *
54+ * \since 19
55+ */
56+ __DRIimage *(*createImageWithModifiers2)(__DRIscreen *screen,
57+ int width, int height, int format,
58+ const uint64_t *modifiers,
59+ const unsigned int modifier_count,
60+ unsigned int use,
61+ void *loaderPrivate);
62 };
63
64
65--
662.31.1
67