summaryrefslogtreecommitdiffstats
path: root/meta-xilinx-core/dynamic-layers
diff options
context:
space:
mode:
Diffstat (limited to 'meta-xilinx-core/dynamic-layers')
-rw-r--r--meta-xilinx-core/dynamic-layers/openembedded-layer/recipes-benchmark/glmark2/files/0002-native-state-fbdev-Add-support-for-glmark2-es2-fbdev.patch375
-rw-r--r--meta-xilinx-core/dynamic-layers/openembedded-layer/recipes-benchmark/glmark2/files/0003-EGL-eglplatform.h-Remove-the-eglplatform.h-header.patch194
-rw-r--r--meta-xilinx-core/dynamic-layers/openembedded-layer/recipes-benchmark/glmark2/glmark2_%.bbappend16
3 files changed, 585 insertions, 0 deletions
diff --git a/meta-xilinx-core/dynamic-layers/openembedded-layer/recipes-benchmark/glmark2/files/0002-native-state-fbdev-Add-support-for-glmark2-es2-fbdev.patch b/meta-xilinx-core/dynamic-layers/openembedded-layer/recipes-benchmark/glmark2/files/0002-native-state-fbdev-Add-support-for-glmark2-es2-fbdev.patch
new file mode 100644
index 00000000..5b4ffaaf
--- /dev/null
+++ b/meta-xilinx-core/dynamic-layers/openembedded-layer/recipes-benchmark/glmark2/files/0002-native-state-fbdev-Add-support-for-glmark2-es2-fbdev.patch
@@ -0,0 +1,375 @@
1From f5d9664b86592dabeec33421f62eb3cfb43d7f05 Mon Sep 17 00:00:00 2001
2From: Madhurkiran Harikrishnan <madhurkiran.harikrishnan@xilinx.com>
3Date: Thu, 30 Jan 2020 14:30:06 -0800
4Subject: [PATCH 2/3] native-state-fbdev: Add support for glmark2-es2-fbdev
5
6This patch add support for mali specific fbdev backend.
7
8Signed-off-by: Madhurkiran Harikrishnan <madhurkiran.harikrishnan@xilinx.com>
9Upstream-status: Inappropriate [Xilinx specific]
10Signed-off-by: Mark Hatle <mark.hatle@amd.com>
11---
12 src/gl-state-egl.cpp | 4 +
13 src/main.cpp | 4 +
14 src/native-state-fbdev.cpp | 172 +++++++++++++++++++++++++++++++++++++
15 src/native-state-fbdev.h | 59 +++++++++++++
16 src/wscript_build | 5 ++
17 wscript | 2 +
18 6 files changed, 246 insertions(+)
19 create mode 100644 src/native-state-fbdev.cpp
20 create mode 100644 src/native-state-fbdev.h
21
22diff --git a/src/gl-state-egl.cpp b/src/gl-state-egl.cpp
23index 5a6843c..14c7dac 100644
24--- a/src/gl-state-egl.cpp
25+++ b/src/gl-state-egl.cpp
26@@ -510,6 +510,7 @@ GLStateEGL::gotValidDisplay()
27 return false;
28 }
29
30+#ifndef GLMARK2_USE_FBDEV
31 char const * __restrict const supported_extensions =
32 egl_query_string(EGL_NO_DISPLAY, EGL_EXTENSIONS);
33
34@@ -543,6 +544,9 @@ GLStateEGL::gotValidDisplay()
35 Log::debug("Falling back to eglGetDisplay()\n");
36 egl_display_ = egl_get_display(native_display_);
37 }
38+#else
39+ egl_display_ = eglGetDisplay(EGL_DEFAULT_DISPLAY);
40+#endif
41
42 if (!egl_display_) {
43 Log::error("eglGetDisplay() failed with error: 0x%x\n", egl_get_error());
44diff --git a/src/main.cpp b/src/main.cpp
45index ce8b094..7c9f501 100644
46--- a/src/main.cpp
47+++ b/src/main.cpp
48@@ -36,6 +36,8 @@
49
50 #if GLMARK2_USE_X11
51 #include "native-state-x11.h"
52+#elif GLMARK2_USE_FBDEV
53+#include "native-state-fbdev.h"
54 #elif GLMARK2_USE_DRM
55 #include "native-state-drm.h"
56 #elif GLMARK2_USE_MIR
57@@ -172,6 +174,8 @@ main(int argc, char *argv[])
58 // Create the canvas
59 #if GLMARK2_USE_X11
60 NativeStateX11 native_state;
61+#elif GLMARK2_USE_FBDEV
62+ NativeStateFbdev native_state;
63 #elif GLMARK2_USE_DRM
64 NativeStateDRM native_state;
65 #elif GLMARK2_USE_MIR
66diff --git a/src/native-state-fbdev.cpp b/src/native-state-fbdev.cpp
67new file mode 100644
68index 0000000..0c82a25
69--- /dev/null
70+++ b/src/native-state-fbdev.cpp
71@@ -0,0 +1,172 @@
72+
73+/*
74+ * Copyright © 2018 Xilinx Inc
75+ *
76+ * This file is part of the glmark2 OpenGL (ES) 2.0 benchmark.
77+ *
78+ * glmark2 is free software: you can redistribute it and/or modify it under the
79+ * terms of the GNU General Public License as published by the Free Software
80+ * Foundation, either version 3 of the License, or (at your option) any later
81+ * version.
82+ *
83+ * glmark2 is distributed in the hope that it will be useful, but WITHOUT ANY
84+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
85+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
86+ * details.
87+ *
88+ * You should have received a copy of the GNU General Public License along with
89+ * glmark2. If not, see <http://www.gnu.org/licenses/>.
90+ *
91+ * Authors:
92+ * Madhurkiran Harikrishnan <madhurkiran.harikrishnan@xilinx.com>
93+ */
94+
95+#include <cstring>
96+#include <csignal>
97+#include <fcntl.h>
98+#include <libudev.h>
99+#include <linux/fb.h>
100+#include "log.h"
101+#include "native-state-fbdev.h"
102+#include <sys/ioctl.h>
103+#include <unistd.h>
104+
105+volatile bool NativeStateFbdev::should_quit_ = false;
106+
107+NativeStateFbdev::~NativeStateFbdev()
108+{
109+ if (isvalid_fd(fd_)) {
110+ close(fd_);
111+ fd_ = -1;
112+ }
113+}
114+
115+bool
116+NativeStateFbdev::init_display()
117+{
118+ struct sigaction new_action;
119+
120+ new_action.sa_handler = &NativeStateFbdev::quit_handler;
121+ new_action.sa_flags = 0;
122+ sigemptyset(&new_action.sa_mask);
123+
124+ sigaction(SIGINT, &new_action, NULL);
125+ sigaction(SIGTERM, &new_action, NULL);
126+
127+ fd_ = get_fd();
128+ if (!isvalid_fd(fd_)) {
129+ Log::error("Failed to find a suitable FB device\n");
130+ return false;
131+ }
132+
133+ return true;
134+}
135+
136+void*
137+NativeStateFbdev::display()
138+{
139+ if (!isvalid_fd(fd_)) {
140+ Log::error("Failed to initalize display\n");
141+ return NULL;
142+ }
143+
144+ return reinterpret_cast<void*>(fd_);
145+}
146+
147+bool
148+NativeStateFbdev::create_window(WindowProperties const& /*properties*/)
149+{
150+ if (!isvalid_fd(fd_)) {
151+ Log::error("Failed to initalize display\n");
152+ should_quit_ = true;
153+ return false;
154+ }
155+
156+ if (ioctl(fd_, FBIOGET_VSCREENINFO, &fb_info_)) {
157+ Log::error("Failed to get Frame buffer info\n");
158+ should_quit_ = true;
159+ return false;
160+ }
161+ return true;
162+}
163+
164+void*
165+NativeStateFbdev::window(WindowProperties& properties)
166+{
167+ properties = WindowProperties(fb_info_.xres, fb_info_.yres, true, 0);
168+
169+ return 0;
170+}
171+
172+void
173+NativeStateFbdev::visible(bool /*visible*/)
174+{
175+}
176+
177+bool
178+NativeStateFbdev::should_quit()
179+{
180+ return should_quit_;
181+}
182+
183+void
184+NativeStateFbdev::flip()
185+{
186+}
187+
188+void
189+NativeStateFbdev::quit_handler(int /*signum*/)
190+{
191+ should_quit_ = true;
192+}
193+
194+bool
195+NativeStateFbdev::isvalid_fd(int fd)
196+{
197+ return fd >= 0;
198+}
199+
200+int
201+NativeStateFbdev::get_fd()
202+{
203+ std::string node_path;
204+ struct fb_var_screeninfo fb_info;
205+ int fd = -1, temp_fd;
206+
207+ Log::debug("Using Udev to detect the right fb node to use\n");
208+ auto udev_cntx = udev_new();
209+ auto dev_enum = udev_enumerate_new(udev_cntx);
210+
211+ udev_enumerate_add_match_sysname(dev_enum, "fb[0-9]*");
212+ udev_enumerate_scan_devices(dev_enum);
213+
214+ Log::debug("Looking for the right fb node...\n");
215+
216+ auto entity = udev_enumerate_get_list_entry(dev_enum);
217+
218+ while (entity && !isvalid_fd(fd)) {
219+ char const * __restrict entity_sys_path =
220+ udev_list_entry_get_name(entity);
221+
222+ if (entity_sys_path) {
223+ struct udev_device* dev =
224+ udev_device_new_from_syspath(udev_cntx,
225+ entity_sys_path);
226+ const char * dev_node_path =
227+ udev_device_get_devnode(dev);
228+
229+ temp_fd = open(dev_node_path, O_RDWR);
230+
231+ if (!ioctl(temp_fd, FBIOGET_VSCREENINFO, &fb_info)) {
232+ fd = temp_fd;
233+ break;
234+ }
235+
236+ udev_device_unref(dev);
237+ }
238+
239+ entity = udev_list_entry_get_next(entity);
240+ }
241+
242+ return fd;
243+}
244diff --git a/src/native-state-fbdev.h b/src/native-state-fbdev.h
245new file mode 100644
246index 0000000..0162ee0
247--- /dev/null
248+++ b/src/native-state-fbdev.h
249@@ -0,0 +1,59 @@
250+/*
251+ * Copyright © 2018 Xilinx Inc
252+ *
253+ * This file is part of the glmark2 OpenGL (ES) 2.0 benchmark.
254+ *
255+ * glmark2 is free software: you can redistribute it and/or modify it under the
256+ * terms of the GNU General Public License as published by the Free Software
257+ * Foundation, either version 3 of the License, or (at your option) any later
258+ * version.
259+ *
260+ * glmark2 is distributed in the hope that it will be useful, but WITHOUT ANY
261+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
262+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
263+ * details.
264+ *
265+ * You should have received a copy of the GNU General Public License along with
266+ * glmark2. If not, see <http://www.gnu.org/licenses/>.
267+ *
268+ * Authors:
269+ * Madhurkiran Harikrishnan <madhurkiran.harikrishnan@xilinx.com>
270+ */
271+
272+#ifndef GLMARK2_NATIVE_STATE_FBDEV_H_
273+#define GLMARK2_NATIVE_STATE_FBDEV_H_
274+
275+#include <csignal>
276+#include <cstring>
277+#include <EGL/egl.h>
278+#include <EGL/eglplatform.h>
279+#include <linux/fb.h>
280+#include "native-state.h"
281+
282+class NativeStateFbdev : public NativeState
283+{
284+public:
285+ NativeStateFbdev() :
286+ fd_(-1),
287+ native_window_((EGLNativeWindowType)NULL) {}
288+ ~NativeStateFbdev();
289+
290+ bool init_display();
291+ void* display();
292+ bool create_window(WindowProperties const& properties);
293+ void* window(WindowProperties& properties);
294+ void visible(bool v);
295+ bool should_quit();
296+ void flip();
297+
298+private:
299+ int fd_;
300+ struct fb_var_screeninfo fb_info_;
301+ NativeWindowType native_window_;
302+ static volatile bool should_quit_;
303+ static void quit_handler(int signum);
304+ static bool isvalid_fd(int fd);
305+ static int get_fd();
306+};
307+
308+#endif /* GLMARK2_NATIVE_STATE_FBDEV_H_ */
309diff --git a/src/wscript_build b/src/wscript_build
310index a01c8a8..c179342 100644
311--- a/src/wscript_build
312+++ b/src/wscript_build
313@@ -90,6 +90,7 @@ flavor_sources = {
314 'win32-glesv2': common_flavor_sources + ['native-state-win32.cpp', 'gl-state-egl.cpp'],
315 'x11-gl' : common_flavor_sources + ['native-state-x11.cpp', 'gl-state-glx.cpp'],
316 'x11-glesv2' : common_flavor_sources + ['native-state-x11.cpp', 'gl-state-egl.cpp'],
317+ 'fbdev-glesv2' : common_flavor_sources + ['native-state-fbdev.cpp', 'gl-state-egl.cpp']
318 }
319 flavor_uselibs = {
320 'dispmanx-glesv2' : ['glad-egl-dispmanx', 'glad-glesv2', 'matrix-glesv2', 'common-glesv2', 'dispmanx'],
321@@ -103,6 +104,7 @@ flavor_uselibs = {
322 'win32-glesv2': ['glad-egl-win32', 'glad-glesv2', 'matrix-glesv2', 'common-glesv2'],
323 'x11-gl' : ['x11', 'glad-gl', 'glad-glx', 'matrix-gl', 'common-gl'],
324 'x11-glesv2' : ['x11', 'glad-egl-x11', 'glad-glesv2', 'matrix-glesv2', 'common-glesv2'],
325+ 'fbdev-glesv2' : ['udev', 'glad-egl-fbdev', 'glad-glesv2', 'matrix-glesv2', 'common-glesv2']
326 }
327
328 flavor_defines = {
329@@ -117,6 +119,7 @@ flavor_defines = {
330 'win32-glesv2': ['GLMARK2_USE_WIN32', 'GLMARK2_USE_GLESv2', 'GLMARK2_USE_EGL'],
331 'x11-gl' : ['GLMARK2_USE_X11', 'GLMARK2_USE_GL', 'GLMARK2_USE_GLX'],
332 'x11-glesv2' : ['GLMARK2_USE_X11', 'GLMARK2_USE_GLESv2', 'GLMARK2_USE_EGL'],
333+ 'fbdev-glesv2' : ['GLMARK2_USE_FBDEV', 'GLMARK2_USE_GLESv2', 'GLMARK2_USE_EGL']
334 }
335 flavor_libs = {
336 'dispmanx-glesv2' : [],
337@@ -156,6 +159,7 @@ flavor_sources_gen = {
338 'win32-glesv2' : [],
339 'x11-gl' : [],
340 'x11-glesv2' : [],
341+ 'fbdev-glesv2' : []
342 }
343 egl_platform_defines = {
344 'dispmanx' : ['MESA_EGL_NO_X11_HEADERS'],
345@@ -164,6 +168,7 @@ egl_platform_defines = {
346 'wayland' : ['WL_EGL_PLATFORM'],
347 'win32' : [],
348 'x11' : [],
349+ 'fbdev' : ['MESA_EGL_NO_X11_HEADERS']
350 }
351
352 includes = ['.', 'scene-ideas', 'scene-terrain'] + platform_includes
353diff --git a/wscript b/wscript
354index cecc3d9..4ae50d8 100644
355--- a/wscript
356+++ b/wscript
357@@ -19,6 +19,7 @@ FLAVORS = {
358 'win32-glesv2': 'glmark2-es2',
359 'x11-gl' : 'glmark2',
360 'x11-glesv2' : 'glmark2-es2',
361+ 'fbdev-glesv2' : 'glmark2-es2-fbdev',
362 }
363 FLAVORS_STR = ", ".join(sorted(list(FLAVORS) + ['all-linux', 'all-win32']))
364
365@@ -213,6 +214,7 @@ def configure_linux(ctx):
366 ('gbm','gbm', None, list_contains(ctx.options.flavors, 'drm')),
367 ('libudev', 'udev', None, list_contains(ctx.options.flavors, 'drm')),
368 ('mirclient','mirclient', '0.13', list_contains(ctx.options.flavors, 'mir')),
369+ ('libudev', 'udev', None, list_contains(ctx.options.flavors, 'fbdev')),
370 ('wayland-client','wayland-client', None, list_contains(ctx.options.flavors, 'wayland')),
371 ('wayland-cursor','wayland-cursor', None, list_contains(ctx.options.flavors, 'wayland')),
372 ('wayland-egl','wayland-egl', None, list_contains(ctx.options.flavors, 'wayland'))]
373--
3742.17.1
375
diff --git a/meta-xilinx-core/dynamic-layers/openembedded-layer/recipes-benchmark/glmark2/files/0003-EGL-eglplatform.h-Remove-the-eglplatform.h-header.patch b/meta-xilinx-core/dynamic-layers/openembedded-layer/recipes-benchmark/glmark2/files/0003-EGL-eglplatform.h-Remove-the-eglplatform.h-header.patch
new file mode 100644
index 00000000..5cdeda6a
--- /dev/null
+++ b/meta-xilinx-core/dynamic-layers/openembedded-layer/recipes-benchmark/glmark2/files/0003-EGL-eglplatform.h-Remove-the-eglplatform.h-header.patch
@@ -0,0 +1,194 @@
1From 60f7cd3378f2ce6c1202dbe1593f8617d8a1e178 Mon Sep 17 00:00:00 2001
2From: Madhurkiran Harikrishnan <madhurkiran.harikrishnan@xilinx.com>
3Date: Thu, 18 Mar 2021 11:53:50 -0700
4Subject: [PATCH 3/3] EGL: eglplatform.h: Remove the eglplatform.h header
5
6As eglplatform.h header is provided by the EGL library provider, we need
7not have a copy of it within the src directory as it causes ambiguity.
8
9Signed-off-by: Madhurkiran Harikrishnan <madhurkiran.harikrishnan@xilinx.com>
10Upstream-status: Pending
11Signed-off-by: Mark Hatle <mark.hatle@amd.com>
12---
13 src/glad/include/EGL/eglplatform.h | 169 -----------------------------
14 1 file changed, 169 deletions(-)
15 delete mode 100644 src/glad/include/EGL/eglplatform.h
16
17diff --git a/src/glad/include/EGL/eglplatform.h b/src/glad/include/EGL/eglplatform.h
18deleted file mode 100644
19index 1edbafa..0000000
20--- a/src/glad/include/EGL/eglplatform.h
21+++ /dev/null
22@@ -1,169 +0,0 @@
23-#ifndef __eglplatform_h_
24-#define __eglplatform_h_
25-
26-/*
27-** Copyright 2007-2020 The Khronos Group Inc.
28-** SPDX-License-Identifier: Apache-2.0
29-*/
30-
31-/* Platform-specific types and definitions for egl.h
32- *
33- * Adopters may modify khrplatform.h and this file to suit their platform.
34- * You are encouraged to submit all modifications to the Khronos group so that
35- * they can be included in future versions of this file. Please submit changes
36- * by filing an issue or pull request on the public Khronos EGL Registry, at
37- * https://www.github.com/KhronosGroup/EGL-Registry/
38- */
39-
40-#include <KHR/khrplatform.h>
41-
42-/* Macros used in EGL function prototype declarations.
43- *
44- * EGL functions should be prototyped as:
45- *
46- * EGLAPI return-type EGLAPIENTRY eglFunction(arguments);
47- * typedef return-type (EXPAPIENTRYP PFNEGLFUNCTIONPROC) (arguments);
48- *
49- * KHRONOS_APICALL and KHRONOS_APIENTRY are defined in KHR/khrplatform.h
50- */
51-
52-#ifndef EGLAPI
53-#define EGLAPI KHRONOS_APICALL
54-#endif
55-
56-#ifndef EGLAPIENTRY
57-#define EGLAPIENTRY KHRONOS_APIENTRY
58-#endif
59-#define EGLAPIENTRYP EGLAPIENTRY*
60-
61-/* The types NativeDisplayType, NativeWindowType, and NativePixmapType
62- * are aliases of window-system-dependent types, such as X Display * or
63- * Windows Device Context. They must be defined in platform-specific
64- * code below. The EGL-prefixed versions of Native*Type are the same
65- * types, renamed in EGL 1.3 so all types in the API start with "EGL".
66- *
67- * Khronos STRONGLY RECOMMENDS that you use the default definitions
68- * provided below, since these changes affect both binary and source
69- * portability of applications using EGL running on different EGL
70- * implementations.
71- */
72-
73-#if defined(EGL_NO_PLATFORM_SPECIFIC_TYPES)
74-
75-typedef void *EGLNativeDisplayType;
76-typedef void *EGLNativePixmapType;
77-typedef void *EGLNativeWindowType;
78-
79-#elif defined(_WIN32) || defined(__VC32__) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__) /* Win32 and WinCE */
80-#ifndef WIN32_LEAN_AND_MEAN
81-#define WIN32_LEAN_AND_MEAN 1
82-#endif
83-#include <windows.h>
84-
85-typedef HDC EGLNativeDisplayType;
86-typedef HBITMAP EGLNativePixmapType;
87-typedef HWND EGLNativeWindowType;
88-
89-#elif defined(__EMSCRIPTEN__)
90-
91-typedef int EGLNativeDisplayType;
92-typedef int EGLNativePixmapType;
93-typedef int EGLNativeWindowType;
94-
95-#elif defined(__WINSCW__) || defined(__SYMBIAN32__) /* Symbian */
96-
97-typedef int EGLNativeDisplayType;
98-typedef void *EGLNativePixmapType;
99-typedef void *EGLNativeWindowType;
100-
101-#elif defined(WL_EGL_PLATFORM)
102-
103-typedef struct wl_display *EGLNativeDisplayType;
104-typedef struct wl_egl_pixmap *EGLNativePixmapType;
105-typedef struct wl_egl_window *EGLNativeWindowType;
106-
107-#elif defined(__GBM__)
108-
109-typedef struct gbm_device *EGLNativeDisplayType;
110-typedef struct gbm_bo *EGLNativePixmapType;
111-typedef void *EGLNativeWindowType;
112-
113-#elif defined(__ANDROID__) || defined(ANDROID)
114-
115-struct ANativeWindow;
116-struct egl_native_pixmap_t;
117-
118-typedef void* EGLNativeDisplayType;
119-typedef struct egl_native_pixmap_t* EGLNativePixmapType;
120-typedef struct ANativeWindow* EGLNativeWindowType;
121-
122-#elif defined(USE_OZONE)
123-
124-typedef intptr_t EGLNativeDisplayType;
125-typedef intptr_t EGLNativePixmapType;
126-typedef intptr_t EGLNativeWindowType;
127-
128-#elif defined(__unix__) && defined(EGL_NO_X11)
129-
130-typedef void *EGLNativeDisplayType;
131-typedef khronos_uintptr_t EGLNativePixmapType;
132-typedef khronos_uintptr_t EGLNativeWindowType;
133-
134-#elif defined(__unix__) || defined(USE_X11)
135-
136-/* X11 (tentative) */
137-#include <X11/Xlib.h>
138-#include <X11/Xutil.h>
139-
140-typedef Display *EGLNativeDisplayType;
141-typedef Pixmap EGLNativePixmapType;
142-typedef Window EGLNativeWindowType;
143-
144-#elif defined(__APPLE__)
145-
146-typedef int EGLNativeDisplayType;
147-typedef void *EGLNativePixmapType;
148-typedef void *EGLNativeWindowType;
149-
150-#elif defined(__HAIKU__)
151-
152-#include <kernel/image.h>
153-
154-typedef void *EGLNativeDisplayType;
155-typedef khronos_uintptr_t EGLNativePixmapType;
156-typedef khronos_uintptr_t EGLNativeWindowType;
157-
158-#elif defined(__Fuchsia__)
159-
160-typedef void *EGLNativeDisplayType;
161-typedef khronos_uintptr_t EGLNativePixmapType;
162-typedef khronos_uintptr_t EGLNativeWindowType;
163-
164-#else
165-#error "Platform not recognized"
166-#endif
167-
168-/* EGL 1.2 types, renamed for consistency in EGL 1.3 */
169-typedef EGLNativeDisplayType NativeDisplayType;
170-typedef EGLNativePixmapType NativePixmapType;
171-typedef EGLNativeWindowType NativeWindowType;
172-
173-
174-/* Define EGLint. This must be a signed integral type large enough to contain
175- * all legal attribute names and values passed into and out of EGL, whether
176- * their type is boolean, bitmask, enumerant (symbolic constant), integer,
177- * handle, or other. While in general a 32-bit integer will suffice, if
178- * handles are 64 bit types, then EGLint should be defined as a signed 64-bit
179- * integer type.
180- */
181-typedef khronos_int32_t EGLint;
182-
183-
184-/* C++ / C typecast macros for special EGL handle values */
185-#if defined(__cplusplus)
186-#define EGL_CAST(type, value) (static_cast<type>(value))
187-#else
188-#define EGL_CAST(type, value) ((type) (value))
189-#endif
190-
191-#endif /* __eglplatform_h */
192--
1932.17.1
194
diff --git a/meta-xilinx-core/dynamic-layers/openembedded-layer/recipes-benchmark/glmark2/glmark2_%.bbappend b/meta-xilinx-core/dynamic-layers/openembedded-layer/recipes-benchmark/glmark2/glmark2_%.bbappend
new file mode 100644
index 00000000..f47178a6
--- /dev/null
+++ b/meta-xilinx-core/dynamic-layers/openembedded-layer/recipes-benchmark/glmark2/glmark2_%.bbappend
@@ -0,0 +1,16 @@
1FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
2
3SRC_URI:append = " \
4 file://0002-native-state-fbdev-Add-support-for-glmark2-es2-fbdev.patch \
5 file://0003-EGL-eglplatform.h-Remove-the-eglplatform.h-header.patch \
6"
7
8PACKAGECONFIG[fbdev-glesv2] = ",,virtual/libgles2 virtual/egl"
9
10EXTRA_OECONF:append = "${@bb.utils.contains('DISTRO_FEATURES', 'fbdev', ' --with-flavors=fbdev-glesv2', '', d)}"
11
12# Links to libmali-xlnx, so it becomes MACHINE_ARCH specific
13DEFAULT_PACKAGE_ARCH := "${PACKAGE_ARCH}"
14MALI_PACKAGE_ARCH = "${@'${MACHINE_ARCH}' if d.getVar('PREFERRED_PROVIDER_virtual/libgles1') == 'libmali-xlnx' else '${DEFAULT_PACKAGE_ARCH}'}"
15PACKAGE_ARCH = "${@bb.utils.contains_any('DEPENDS', 'virtual/libgles1 virtual/libgles2 virtual/egl virtual/libgbm', '${MALI_PACKAGE_ARCH}', '${DEFAULT_PACKAGE_ARCH}', d)}"
16