diff options
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.patch | 67 |
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 @@ | |||
1 | From afd8b2f498a417de6ecdbd13045d97c9ecf4391b Mon Sep 17 00:00:00 2001 | ||
2 | From: Simon Ser <contact@emersion.fr> | ||
3 | Date: Mon, 14 Dec 2020 18:32:47 +0100 | ||
4 | Subject: [PATCH] dri: add createImageWithModifiers2 interface | ||
5 | |||
6 | With the addition of createImageWithModifiers usage flags were | ||
7 | dropped, as it was believed at the time that modifers will be a | ||
8 | full replacement for the usage flags. This has turned out to be | ||
9 | untrue, as modifiers are not able to describe buffer placement. | ||
10 | |||
11 | Add a new version of the interface, that allows to specifiy | ||
12 | use flags in addition to the modifier. | ||
13 | |||
14 | Signed-off-by: Simon Ser <contact@emersion.fr> | ||
15 | Signed-off-by: Lucas Stach <l.stach@pengutronix.de> | ||
16 | Reviewed-by: Daniel Stone <daniels@collabora.com> | ||
17 | Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8106> | ||
18 | Upstream-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 | |||
23 | diff --git a/include/GL/internal/dri_interface.h b/include/GL/internal/dri_interface.h | ||
24 | index 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 | -- | ||
66 | 2.31.1 | ||
67 | |||