Skip to contentSkip to conversation

package/sunxi-mali: fix conflicting data types between GLES2/gl2.h and GLES/gl.h

PATCH Superseded Romain Naour 2 participants 3 messages Jun 5, 2017 – Jun 9, 2017 Arm/Allwinner sunXi SoC support

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 package/sunxi-mali: fix conflicting data types between GLES2/gl2.h and GLES/gl.h

When OpenGL ES 1.1 and OpenGL ES 2.0 are used at the same time, the build fail since GLintptr and GLsizeiptr data type are not the same in GLES2/gl2.h and GLES/gl.h.

Also sync the data type of GLbyte, GLubyte, GLfloat, GLclampf and GLfixed.

Fixes:
http://autobuild.buildroot.net/results/258/25898b45cefde9661d8ac87dd84bc883bb5283d1

Cc Spenser Gilliland <[email protected]>

---
v2: fix a typo in title
Also change all remaining data type (Thomas)

---
 ...ting-data-types-between-GLES2-gl2.h-and-G.patch | 57 ++++++++++++++++++++++
 1 file changed, 57 insertions(+)
 create mode 100644 package/sunxi-mali/0003-fix-conflicting-data-types-between-GLES2-gl2.h-and-G.patch
package/sunxi-mali/0003-fix-conflicting-data-types-between-GLES2-gl2.h-and-G.patch new file +57 -0
new file mode 100644
index 0000000..62e1b17
@@ -0,0 +1,57 @@
+From 5bf4d4f9c759fdb3c0db61a781042223236169c6 Mon Sep 17 00:00:00 2001
+From: Romain Naour <[email protected]>
+Date: Mon, 5 Jun 2017 12:40:16 +0200
+Subject: [PATCH] fix conflicting data types between GLES2/gl2.h and GLES/gl.h
+
+When OpenGL ES 1.1 and OpenGL ES 2.0 are used at the same time, the
+build fail since GLintptr and GLsizeiptr data type are not the same in
+GLES2/gl2.h and GLES/gl.h.
+
+Also sync the data type of GLbyte, GLubyte, GLfloat, GLclampf and
+GLfixed.
+
+Fixes:
+http://autobuild.buildroot.net/results/258/25898b45cefde9661d8ac87dd84bc883bb5283d1
+
+Signed-off-by: Romain Naour <[email protected]>
+---
+ include/GLES/gl.h | 15 +++++++--------
+ 1 file changed, 7 insertions(+), 8 deletions(-)
+
+diff --git a/include/GLES/gl.h b/include/GLES/gl.h
+index a6bb591..799408b 100644
+--- a/include/GLES/gl.h
++++ b/include/GLES/gl.h
+@@ -18,22 +18,21 @@ typedef void             GLvoid;
+ typedef unsigned int     GLenum;
+ typedef unsigned char    GLboolean;
+ typedef unsigned int     GLbitfield;
+-typedef signed char		   GLbyte;
++typedef khronos_int8_t   GLbyte;
+ typedef short            GLshort;
+ typedef int              GLint;
+ typedef int              GLsizei;
+-typedef unsigned char			GLubyte;
++typedef khronos_uint8_t  GLubyte;
+ typedef unsigned short   GLushort;
+ typedef unsigned int     GLuint;
+-typedef float  GLfloat;
+-typedef float  GLclampf;
+-typedef signed int  GLfixed;
++typedef khronos_float_t  GLfloat;
++typedef khronos_float_t  GLclampf;
++typedef khronos_int32_t  GLfixed;
+ typedef signed int  GLclampx;
+ typedef char GLchar;
+ 
+-typedef int * GLintptr;
+-typedef int *  GLsizeiptr;
+-
++typedef khronos_intptr_t GLintptr;
++typedef khronos_ssize_t  GLsizeiptr;
+ 
+ /*************************************************************/
+ 
+-- 
+2.9.4
+
Signature · 1 line
2.9.4
#1 lore raw

PATCH v2 1/1 package/sunxi-mali: fix conflicting data types between GLES2/gl2.h and GLES/gl.h

Hello,

Quoted 12 lines · Romain Naour

When OpenGL ES 1.1 and OpenGL ES 2.0 are used at the same time, the build fail since GLintptr and GLsizeiptr data type are not the same in GLES2/gl2.h and GLES/gl.h.

Also sync the data type of GLbyte, GLubyte, GLfloat, GLclampf and GLfixed.

Fixes:
http://autobuild.buildroot.net/results/258/25898b45cefde9661d8ac87dd84bc883bb5283d1

Cc Spenser Gilliland <[email protected]>
Quoted 7 lines

---
v2: fix a typo in title
Also change all remaining data type (Thomas)

---
 ...ting-data-types-between-GLES2-gl2.h-and-G.patch | 57 ++++++++++++++++++++++
 1 file changed, 57 insertions(+)
 create mode 100644 package/sunxi-mali/0003-fix-conflicting-data-types-between-GLES2-gl2.h-and-G.patch

Applied to master, thanks. Please submit upstream, it's easy, just open a pull request on the github project.

Thanks,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#2 lore raw

PATCH v2 1/1 package/sunxi-mali: fix conflicting data types between GLES2/gl2.h and GLES/gl.h

Hi Thomas,

Le 08/06/2017 ? 22:05, Thomas Petazzoni a ?crit :

Quoted 23 lines

Hello,

Quoted 12 lines · Romain Naour

When OpenGL ES 1.1 and OpenGL ES 2.0 are used at the same time, the build fail since GLintptr and GLsizeiptr data type are not the same in GLES2/gl2.h and GLES/gl.h.

Also sync the data type of GLbyte, GLubyte, GLfloat, GLclampf and GLfixed.

Fixes:
http://autobuild.buildroot.net/results/258/25898b45cefde9661d8ac87dd84bc883bb5283d1

Cc Spenser Gilliland <[email protected]>
Quoted 7 lines

---
v2: fix a typo in title
Also change all remaining data type (Thomas)

---
 ...ting-data-types-between-GLES2-gl2.h-and-G.patch | 57 ++++++++++++++++++++++
 1 file changed, 57 insertions(+)
 create mode 100644 package/sunxi-mali/0003-fix-conflicting-data-types-between-GLES2-gl2.h-and-G.patch
Quoted 2 lines

Applied to master, thanks. Please submit upstream, it's easy, just open a pull request on the github project.

Well, upstream github seems dead... see the pull request from Rahul Bedarkar from 2014 [1].

But ok, done [2].

Best regards,
Romain

[1] https://github.com/linux-sunxi/sunxi-mali/pull/8
[2] https://github.com/linux-sunxi/sunxi-mali/pull/19

Quoted 5 lines

Thanks,

Thomas