aboutsummaryrefslogtreecommitdiffstats
path: root/meta-xilinx-core/recipes-graphics/mesa/mesa-demos/0002-src-egl-eglinfo-Use-EGL_PLATFORM_DEVICE_EXT-only-if-.patch
blob: 7212ef2794f9ca146b8bb940ff6392965e997412 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
From 040b0b79a8e73a3348ab2e95f817636a7d479f18 Mon Sep 17 00:00:00 2001
From: Madhurkiran Harikrishnan <madhurkiran.harikrishnan@xilinx.com>
Date: Tue, 28 Jan 2020 16:17:46 -0800
Subject: [PATCH 2/2] src: egl: eglinfo: Use EGL_PLATFORM_DEVICE_EXT only if
 the EGL provider supports it

Compiling against the other EGL provider like mali fails, as they dont
support this macro as one of thier supported platforms

Signed-off-by: Madhurkiran Harikrishnan <madhurkiran.harikrishnan@xilinx.com>
Upstream-Status: Inappropriate [Xilinx specific]
Signed-off-by: Mark Hatle <mark.hatle@amd.com>
---
 src/egl/opengl/eglinfo.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/egl/opengl/eglinfo.c b/src/egl/opengl/eglinfo.c
index e8a0225..bc0e869 100644
--- a/src/egl/opengl/eglinfo.c
+++ b/src/egl/opengl/eglinfo.c
@@ -243,6 +243,7 @@ doOneDisplay(EGLDisplay d, const char *name)
 static int
 doOneDevice(EGLDeviceEXT d, int i)
 {
+#ifdef EGL_PLATFORM_DEVICE_EXT
    PFNEGLGETPLATFORMDISPLAYEXTPROC getPlatformDisplay =
      (PFNEGLGETPLATFORMDISPLAYEXTPROC)
      eglGetProcAddress("eglGetPlatformDisplayEXT");
@@ -253,6 +254,9 @@ doOneDevice(EGLDeviceEXT d, int i)
 
    return doOneDisplay(getPlatformDisplay(EGL_PLATFORM_DEVICE_EXT, d, NULL),
                        "Platform Device");
+#else
+   return 0;
+#endif
 }
 
 
-- 
2.17.1