aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-graphics/userland/files/0015-EGL-glplatform.h-define-EGL_CAST.patch
blob: 5a5a0322dd03bd33c77f2b2d67e5e47599dcb73f (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
From 90f6ebc04c688720f45c7009d12d524d33f51781 Mon Sep 17 00:00:00 2001
From: Andrea Galbusera <gizero@gmail.com>
Date: Fri, 14 Jul 2017 09:52:54 +0200
Subject: [PATCH 15/18] EGL/glplatform.h: define EGL_CAST

C++ / C typecast macros for special EGL handle values: used by libepoxy code
The definition comes from the updated version of this header in mesa.

Upstream-Status: Pending
---
 interface/khronos/include/EGL/eglplatform.h | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/interface/khronos/include/EGL/eglplatform.h b/interface/khronos/include/EGL/eglplatform.h
index 1f7c930..c39d425 100644
--- a/interface/khronos/include/EGL/eglplatform.h
+++ b/interface/khronos/include/EGL/eglplatform.h
@@ -202,4 +202,11 @@ EGLAPI void EGLAPIENTRY BEGL_GetDefaultDriverInterfaces(BEGL_DriverInterfaces *i
 #include "interface/khronos/common/khrn_client_mangle.h"
 #endif
 
+/* C++ / C typecast macros for special EGL handle values */
+#if defined(__cplusplus)
+#define EGL_CAST(type, value) (static_cast<type>(value))
+#else
+#define EGL_CAST(type, value) ((type) (value))
+#endif
+
 #endif /* __eglplatform_h */
-- 
2.21.0