blob: ab72b4f3c98be847026deb256a483199470d5d4f [file] [log] [blame]
Andrew Geissler517393d2023-01-13 08:55:19 -06001From: Vincent Davis Jr <vince@underview.tech>
2Date: Fri, 07 Jan 2022 07:01:47 PM CST
3Subject: [PATCH] Fix EGL macro undeclared and EGLImageKHR
4
5Upstream-Status: Inappropriate
6
7RPI-Distro repo forks original vlc and applies patches to enable
8raspiberry pi support.
9
10* Fixes compiler issues related to EGL macro constant/enum value type not being defined
11* Updates EGLImage to EGLImageKHR
12
13Signed-off-by: Vincent Davis Jr <vince@underview.tech>
14diff --git a/modules/hw/mmal/converter_mmal.c b/modules/hw/mmal/converter_mmal.c
15index f31cb81d8..426af668b 100644
16--- a/modules/hw/mmal/converter_mmal.c
17+++ b/modules/hw/mmal/converter_mmal.c
18@@ -28,6 +28,34 @@
19
20 #define TRACE_ALL 0
21
22+// Pass Yocto related build errors
23+#define EGL_LINUX_DMA_BUF_EXT 0x3270
24+#define EGL_LINUX_DRM_FOURCC_EXT 0x3271
25+#define EGL_DMA_BUF_PLANE0_FD_EXT 0x3272
26+#define EGL_DMA_BUF_PLANE0_OFFSET_EXT 0x3273
27+#define EGL_DMA_BUF_PLANE0_PITCH_EXT 0x3274
28+#define EGL_DMA_BUF_PLANE1_FD_EXT 0x3275
29+#define EGL_DMA_BUF_PLANE1_OFFSET_EXT 0x3276
30+#define EGL_DMA_BUF_PLANE1_PITCH_EXT 0x3277
31+#define EGL_DMA_BUF_PLANE2_FD_EXT 0x3278
32+#define EGL_DMA_BUF_PLANE2_OFFSET_EXT 0x3279
33+#define EGL_DMA_BUF_PLANE2_PITCH_EXT 0x327A
34+#define EGL_YUV_COLOR_SPACE_HINT_EXT 0x327B
35+#define EGL_SAMPLE_RANGE_HINT_EXT 0x327C
36+#define EGL_YUV_CHROMA_HORIZONTAL_SITING_HINT_EXT 0x327D
37+#define EGL_YUV_CHROMA_VERTICAL_SITING_HINT_EXT 0x327E
38+#define EGL_DMA_BUF_PLANE0_MODIFIER_LO_EXT 0x3443
39+#define EGL_DMA_BUF_PLANE0_MODIFIER_HI_EXT 0x3444
40+#define EGL_DMA_BUF_PLANE1_MODIFIER_LO_EXT 0x3445
41+#define EGL_DMA_BUF_PLANE1_MODIFIER_HI_EXT 0x3446
42+#define EGL_DMA_BUF_PLANE2_MODIFIER_LO_EXT 0x3447
43+#define EGL_DMA_BUF_PLANE2_MODIFIER_HI_EXT 0x3448
44+#define EGL_DMA_BUF_PLANE3_FD_EXT 0x3440
45+#define EGL_DMA_BUF_PLANE3_OFFSET_EXT 0x3441
46+#define EGL_DMA_BUF_PLANE3_PITCH_EXT 0x3442
47+#define EGL_DMA_BUF_PLANE3_MODIFIER_LO_EXT 0x3449
48+#define EGL_DMA_BUF_PLANE3_MODIFIER_HI_EXT 0x344A
49+
50 typedef struct mmal_gl_converter_s
51 {
52 EGLint drm_fourcc;
53@@ -199,7 +227,7 @@ static tex_context_t * get_tex_context(const opengl_tex_converter_t * const tc,
54
55 *a = EGL_NONE;
56
57- const EGLImage image = tc->gl->egl.createImageKHR(tc->gl, EGL_LINUX_DMA_BUF_EXT, NULL, attribs);
58+ const EGLImageKHR image = tc->gl->egl.createImageKHR(tc->gl, EGL_LINUX_DMA_BUF_EXT, NULL, attribs);
59 if (!image) {
60 msg_Err(tc, "Failed to import fd %d: Err=%#x", fd, tc->vt->GetError());
61 goto fail;