0007-GLES2-gl2ext.h-add-GLint64-GLuint64-and-GLsync-typed.patch 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. From ffb8eafe2d745ddf2f44101ffc4e6599ed096e69 Mon Sep 17 00:00:00 2001
  2. From: Peter Seiderer <ps.report@gmx.net>
  3. Date: Mon, 10 May 2021 19:15:48 +0200
  4. Subject: [PATCH] GLES2/gl2ext.h: add GLint64, GLuint64 and GLsync typedefs
  5. MIME-Version: 1.0
  6. Content-Type: text/plain; charset=UTF-8
  7. Content-Transfer-Encoding: 8bit
  8. Fixes:
  9. .../host/arm-linucleus-linux-gnueabihf/sysroot/usr/include/gstreamer-1.0/gst/gl/glprototypes/gstgl_compat.h:40:18: error: conflicting declaration ‘typedef void* GLsync’
  10. 40 | typedef gpointer GLsync;
  11. | ^~~~~~
  12. .../host/arm-linucleus-linux-gnueabihf/sysroot/usr/include/qt5/QtGui/qopengles2ext.h:24:26: note: previous declaration as ‘typedef struct __GLsync* GLsync’
  13. 24 | typedef struct __GLsync *GLsync;
  14. | ^~~~~~
  15. File gstgl_compat.h:
  16. 39 #if !GST_GL_HAVE_GLSYNC
  17. 40 typedef gpointer GLsync;
  18. 41 #endif
  19. File qopengles2ext.h:
  20. 1 #ifndef __gles2_gl2ext_h_
  21. 2 #define __gles2_gl2ext_h_ 1
  22. 3
  23. 4 #if 0
  24. 5 #pragma qt_no_master_include
  25. 6 #pragma qt_sync_skip_header_check
  26. 7 #pragma qt_sync_stop_processing
  27. 8 #endif
  28. 9
  29. 10 #ifdef __cplusplus
  30. 11 extern "C" {
  31. 12 #endif
  32. 13
  33. 14 #ifndef __gl3_h_
  34. 15 /* These types are defined with reference to <inttypes.h>
  35. 16 * in the Apple extension spec, but here we use the Khronos
  36. 17 * portable types in khrplatform.h, and assume those types
  37. 18 * are always defined.
  38. 19 * If any other extensions using these types are defined,
  39. 20 * the typedefs must move out of this block and be shared.
  40. 21 */
  41. 22 typedef khronos_int64_t GLint64;
  42. 23 typedef khronos_uint64_t GLuint64;
  43. 24 typedef struct __GLsync *GLsync;
  44. 25 #endif
  45. The problem is that rpi-userland doesn't define GLsync, and both
  46. GStreamer and Qt have their own definition of GLsync in this case, but
  47. they are not the same.
  48. We reported this issue to:
  49. * rpi-userland, to get the headers updated:
  50. https://github.com/raspberrypi/userland/issues/469#issuecomment-1193864294
  51. * gstreamer, to get their bogus definition of GLsync fixed:
  52. https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/issues/973
  53. In the mean time, fix this by adding the missing definitions to
  54. rpi-userland, so that GStreamer and Qt don't try to provide their own.
  55. Signed-off-by: Peter Seiderer <ps.report@gmx.net>
  56. ---
  57. interface/khronos/include/GLES2/gl2ext.h | 13 +++++++++++++
  58. 1 file changed, 13 insertions(+)
  59. diff --git a/interface/khronos/include/GLES2/gl2ext.h b/interface/khronos/include/GLES2/gl2ext.h
  60. index 4eacf7f..96e87ec 100644
  61. --- a/interface/khronos/include/GLES2/gl2ext.h
  62. +++ b/interface/khronos/include/GLES2/gl2ext.h
  63. @@ -33,6 +33,19 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  64. extern "C" {
  65. #endif
  66. +#ifndef __gl3_h_
  67. +/* These types are defined with reference to <inttypes.h>
  68. + * in the Apple extension spec, but here we use the Khronos
  69. + * portable types in khrplatform.h, and assume those types
  70. + * are always defined.
  71. + * If any other extensions using these types are defined,
  72. + * the typedefs must move out of this block and be shared.
  73. + */
  74. +typedef khronos_int64_t GLint64;
  75. +typedef khronos_uint64_t GLuint64;
  76. +typedef struct __GLsync *GLsync;
  77. +#endif
  78. +
  79. /* We want this */
  80. #ifndef GL_GLEXT_PROTOTYPES
  81. #define GL_GLEXT_PROTOTYPES
  82. --
  83. 2.31.1