From f18747e6dd6e406a2e79c80562ab830a1da40716 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Andre Date: Mon, 18 Jul 2016 15:09:19 +0900 Subject: [PATCH] Evas GL: Use [u]int64_t directly in all APIs This removes the need for khronos_[u]int64_t as well as the special typdef EvasGL[u]int64. Hopefully this should work on all platforms (note: [u]int64_t is used in Eina APIs, so it is already required for EFL apps). Fixes T3200 --- src/lib/ector/ector_gl_internal.h | 8 ------- src/lib/evas/Evas_GL.h | 25 +++++++--------------- .../evas/engines/gl_common/evas_gl_api_ext_def.h | 6 +++--- .../evas/engines/gl_common/evas_gl_api_gles3_def.h | 10 ++++----- 4 files changed, 16 insertions(+), 33 deletions(-) diff --git a/src/lib/ector/ector_gl_internal.h b/src/lib/ector/ector_gl_internal.h index 9a4057e..2f1713a 100644 --- a/src/lib/ector/ector_gl_internal.h +++ b/src/lib/ector/ector_gl_internal.h @@ -758,14 +758,6 @@ extern Ector_GL_API GL; #include -#ifndef KHRONOS_SUPPORT_INT64 -typedef unsigned long long khronos_uint64_t; -typedef signed long long khronos_int64_t; -#endif - -typedef khronos_int64_t EvasGLint64; -typedef khronos_uint64_t EvasGLuint64; - typedef ptrdiff_t GLintptr; // Changed khronos_intptr_t typedef ptrdiff_t GLsizeiptr; // Changed khronos_ssize_t diff --git a/src/lib/evas/Evas_GL.h b/src/lib/evas/Evas_GL.h index fafa806..ddc418a 100644 --- a/src/lib/evas/Evas_GL.h +++ b/src/lib/evas/Evas_GL.h @@ -889,15 +889,6 @@ EAPI Evas_GL *evas_gl_current_evas_gl_get (Evas_GL_Context **con * Evas_GL.h as these will conflict. *-----------------------------------------------------------------------*/ -#ifndef KHRONOS_SUPPORT_INT64 -typedef unsigned long long khronos_uint64_t; -typedef signed long long khronos_int64_t; -#endif - -// Due to build conflicts on various platforms, we can't use GL[u]int64 directly -typedef khronos_int64_t EvasGLint64; -typedef khronos_uint64_t EvasGLuint64; - #if !defined(__gl2_h_) # define __gl2_h_ @@ -5262,9 +5253,9 @@ EvasGLImage *img = glapi->evasglCreateImageForContext GLsync (*glFenceSyncAPPLE) (GLenum condition, GLbitfield flags); GLboolean (*glIsSyncAPPLE) (GLsync sync); void (*glDeleteSyncAPPLE) (GLsync sync); - GLenum (*glClientWaitSyncAPPLE) (GLsync sync, GLbitfield flags, EvasGLuint64 timeout); - void (*glWaitSyncAPPLE) (GLsync sync, GLbitfield flags, EvasGLuint64 timeout); - void (*glGetInteger64vAPPLE) (GLenum pname, EvasGLint64 *params); + GLenum (*glClientWaitSyncAPPLE) (GLsync sync, GLbitfield flags, uint64_t timeout); + void (*glWaitSyncAPPLE) (GLsync sync, GLbitfield flags, uint64_t timeout); + void (*glGetInteger64vAPPLE) (GLenum pname, int64_t *params); void (*glGetSyncivAPPLE) (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values); /* GL_EXT_map_buffer_range */ @@ -5458,7 +5449,7 @@ EvasGLImage *img = glapi->evasglCreateImageForContext void (*glClearBufferfv) (GLenum buffer, GLint drawBuffer, const GLfloat * value); void (*glClearBufferiv) (GLenum buffer, GLint drawBuffer, const GLint * value); void (*glClearBufferuiv) (GLenum buffer, GLint drawBuffer, const GLuint * value); - GLenum (*glClientWaitSync) (GLsync sync, GLbitfield flags, EvasGLuint64 timeout); + GLenum (*glClientWaitSync) (GLsync sync, GLbitfield flags, uint64_t timeout); void (*glCompressedTexImage3D) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid * data); void (*glCompressedTexSubImage3D) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid * data); void (*glCopyBufferSubData) (GLenum readtarget, GLenum writetarget, GLintptr readoffset, GLintptr writeoffset, GLsizeiptr size); @@ -5484,11 +5475,11 @@ EvasGLImage *img = glapi->evasglCreateImageForContext void (*glGetActiveUniformBlockiv) (GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params); void (*glGetActiveUniformBlockName) (GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName); void (*glGetActiveUniformsiv) (GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params); - void (*glGetBufferParameteri64v) (GLenum target, GLenum value, EvasGLint64 * data); + void (*glGetBufferParameteri64v) (GLenum target, GLenum value, int64_t * data); void (*glGetBufferPointerv) (GLenum target, GLenum pname, GLvoid ** params); GLint (*glGetFragDataLocation) (GLuint program, const char * name); - void (*glGetInteger64i_v) (GLenum target, GLuint index, EvasGLint64 * data); - void (*glGetInteger64v) (GLenum pname, EvasGLint64 * data); + void (*glGetInteger64i_v) (GLenum target, GLuint index, int64_t * data); + void (*glGetInteger64v) (GLenum pname, int64_t * data); void (*glGetIntegeri_v) (GLenum target, GLuint index, GLint * data); void (*glGetInternalformativ) (GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint *params); void (*glGetProgramBinary) (GLuint program, GLsizei bufsize, GLsizei *length, GLenum *binaryFormat, void *binary); @@ -5549,7 +5540,7 @@ EvasGLImage *img = glapi->evasglCreateImageForContext void (*glVertexAttribI4ui) (GLuint index, GLuint v0, GLuint v1, GLuint v2, GLuint v3); void (*glVertexAttribI4uiv) (GLuint index, const GLuint *v); void (*glVertexAttribIPointer) (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); - void (*glWaitSync) (GLsync sync, GLbitfield flags, EvasGLuint64 timeout); + void (*glWaitSync) (GLsync sync, GLbitfield flags, uint64_t timeout); /** @} */ /** * @anchor gles3.1 diff --git a/src/modules/evas/engines/gl_common/evas_gl_api_ext_def.h b/src/modules/evas/engines/gl_common/evas_gl_api_ext_def.h index 6d4ea48..581dd6c 100644 --- a/src/modules/evas/engines/gl_common/evas_gl_api_ext_def.h +++ b/src/modules/evas/engines/gl_common/evas_gl_api_ext_def.h @@ -990,13 +990,13 @@ _EVASGL_EXT_BEGIN(APPLE_sync) _EVASGL_EXT_FUNCTION_BEGIN(void, glDeleteSyncAPPLE, (GLsync sync), (sync)) _EVASGL_EXT_FUNCTION_DRVFUNC_PROCADDR("glDeleteSyncAPPLE") _EVASGL_EXT_FUNCTION_END() - _EVASGL_EXT_FUNCTION_BEGIN(GLenum, glClientWaitSyncAPPLE, (GLsync sync, GLbitfield flags, EvasGLuint64 timeout), (sync, flags, timeout)) + _EVASGL_EXT_FUNCTION_BEGIN(GLenum, glClientWaitSyncAPPLE, (GLsync sync, GLbitfield flags, uint64_t timeout), (sync, flags, timeout)) _EVASGL_EXT_FUNCTION_DRVFUNC_PROCADDR("glClientWaitSyncAPPLE") _EVASGL_EXT_FUNCTION_END() - _EVASGL_EXT_FUNCTION_BEGIN(void, glWaitSyncAPPLE, (GLsync sync, GLbitfield flags, EvasGLuint64 timeout), (sync, flags, timeout)) + _EVASGL_EXT_FUNCTION_BEGIN(void, glWaitSyncAPPLE, (GLsync sync, GLbitfield flags, uint64_t timeout), (sync, flags, timeout)) _EVASGL_EXT_FUNCTION_DRVFUNC_PROCADDR("glWaitSyncAPPLE") _EVASGL_EXT_FUNCTION_END() - _EVASGL_EXT_FUNCTION_BEGIN(void, glGetInteger64vAPPLE, (GLenum pname, EvasGLint64 *params), (pname, params)) + _EVASGL_EXT_FUNCTION_BEGIN(void, glGetInteger64vAPPLE, (GLenum pname, int64_t *params), (pname, params)) _EVASGL_EXT_FUNCTION_DRVFUNC_PROCADDR("glGetInteger64vAPPLE") _EVASGL_EXT_FUNCTION_END() _EVASGL_EXT_FUNCTION_BEGIN(void, glGetSyncivAPPLE, (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values), (sync, pname, bufSize, length, values)) diff --git a/src/modules/evas/engines/gl_common/evas_gl_api_gles3_def.h b/src/modules/evas/engines/gl_common/evas_gl_api_gles3_def.h index a9bf105..8d852d6 100644 --- a/src/modules/evas/engines/gl_common/evas_gl_api_gles3_def.h +++ b/src/modules/evas/engines/gl_common/evas_gl_api_gles3_def.h @@ -17,7 +17,7 @@ _EVASGL_FUNCTION_BEGIN_VOID( glClearBufferfi, (GLenum buffer, GLint drawBuffer, _EVASGL_FUNCTION_BEGIN_VOID( glClearBufferfv, (GLenum buffer, GLint drawBuffer, const GLfloat * value), (buffer, drawBuffer, value)) _EVASGL_FUNCTION_BEGIN_VOID( glClearBufferiv, (GLenum buffer, GLint drawBuffer, const GLint * value), (buffer, drawBuffer, value)) _EVASGL_FUNCTION_BEGIN_VOID( glClearBufferuiv, (GLenum buffer, GLint drawBuffer, const GLuint * value), (buffer, drawBuffer, value)) -_EVASGL_FUNCTION_BEGIN(GLenum, glClientWaitSync, (GLsync sync, GLbitfield flags, EvasGLuint64 timeout), (sync, flags, timeout)) +_EVASGL_FUNCTION_BEGIN(GLenum, glClientWaitSync, (GLsync sync, GLbitfield flags, uint64_t timeout), (sync, flags, timeout)) _EVASGL_FUNCTION_BEGIN_VOID( glCompressedTexImage3D, (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid * data), (target, level, internalformat, width, height, depth, border, imageSize, data)) _EVASGL_FUNCTION_BEGIN_VOID( glCompressedTexSubImage3D, (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid * data), (target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data)) _EVASGL_FUNCTION_BEGIN_VOID( glCopyBufferSubData, (GLenum readtarget, GLenum writetarget, GLintptr readoffset, GLintptr writeoffset, GLsizeiptr size), (readtarget, writetarget, readoffset, writeoffset, size)) @@ -42,11 +42,11 @@ _EVASGL_FUNCTION_BEGIN_VOID( glGenVertexArrays, (GLsizei n, GLuint *arrays), (n, _EVASGL_FUNCTION_BEGIN_VOID( glGetActiveUniformBlockiv, (GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params), (program, uniformBlockIndex, pname, params)) _EVASGL_FUNCTION_BEGIN_VOID( glGetActiveUniformBlockName, (GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName), (program, uniformBlockIndex, bufSize, length, uniformBlockName)) _EVASGL_FUNCTION_BEGIN_VOID( glGetActiveUniformsiv, (GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params), (program, uniformCount, uniformIndices, pname, params)) -_EVASGL_FUNCTION_BEGIN_VOID( glGetBufferParameteri64v, (GLenum target, GLenum value, EvasGLint64 * data), (target, value, data)) +_EVASGL_FUNCTION_BEGIN_VOID( glGetBufferParameteri64v, (GLenum target, GLenum value, int64_t * data), (target, value, data)) _EVASGL_FUNCTION_BEGIN_VOID( glGetBufferPointerv, (GLenum target, GLenum pname, GLvoid ** params), (target, pname, params)) _EVASGL_FUNCTION_BEGIN(GLint, glGetFragDataLocation, (GLuint program, const char * name), (program, name)) -_EVASGL_FUNCTION_BEGIN_VOID( glGetInteger64i_v, (GLenum target, GLuint index, EvasGLint64 * data), (target, index, data)) -_EVASGL_FUNCTION_BEGIN_VOID( glGetInteger64v, (GLenum pname, EvasGLint64 * data), (pname, data)) +_EVASGL_FUNCTION_BEGIN_VOID( glGetInteger64i_v, (GLenum target, GLuint index, int64_t * data), (target, index, data)) +_EVASGL_FUNCTION_BEGIN_VOID( glGetInteger64v, (GLenum pname, int64_t * data), (pname, data)) _EVASGL_FUNCTION_BEGIN_VOID( glGetIntegeri_v, (GLenum target, GLuint index, GLint * data), (target, index, data)) _EVASGL_FUNCTION_BEGIN_VOID( glGetInternalformativ, (GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint *params), (target, internalformat, pname, bufSize, params)) _EVASGL_FUNCTION_BEGIN_VOID( glGetProgramBinary, (GLuint program, GLsizei bufsize, GLsizei *length, GLenum *binaryFormat, void *binary), (program, bufsize, length, binaryFormat, binary)) @@ -105,7 +105,7 @@ _EVASGL_FUNCTION_BEGIN_VOID( glVertexAttribI4iv, (GLuint index, const GLint *v), _EVASGL_FUNCTION_BEGIN_VOID( glVertexAttribI4ui, (GLuint index, GLuint v0, GLuint v1, GLuint v2, GLuint v3), (index, v0, v1, v2, v3)) _EVASGL_FUNCTION_BEGIN_VOID( glVertexAttribI4uiv, (GLuint index, const GLuint *v), (index, v)) _EVASGL_FUNCTION_BEGIN_VOID( glVertexAttribIPointer, (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer), (index, size, type, stride, pointer)) -_EVASGL_FUNCTION_BEGIN_VOID( glWaitSync, (GLsync sync, GLbitfield flags, EvasGLuint64 timeout), (sync, flags, timeout)) +_EVASGL_FUNCTION_BEGIN_VOID( glWaitSync, (GLsync sync, GLbitfield flags, uint64_t timeout), (sync, flags, timeout)) //GLES 3.1 -- 2.7.4