From b7bf13ed1cc2dee10e052d099bb49d7ad7c015c3 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sat, 4 Jun 2016 02:35:06 +0200 Subject: [PATCH] Update GLSM --- libretro-common/glsm/glsm.c | 26 ++++++++++++++++++++++++++ libretro-common/include/glsm/glsmsym.h | 4 ++++ 2 files changed, 30 insertions(+) diff --git a/libretro-common/glsm/glsm.c b/libretro-common/glsm/glsm.c index 2239e1615a..3e4767df07 100644 --- a/libretro-common/glsm/glsm.c +++ b/libretro-common/glsm/glsm.c @@ -1803,6 +1803,32 @@ void rglDeleteVertexArrays(GLsizei n, const GLuint *arrays) #endif } +/* + * + * Core in: + * OpenGL : 3.2 + * OpenGLES : 3.0 + */ +GLsync rglFenceSync(GLenum condition, GLbitfield flags) +{ +#if defined(HAVE_OPENGL) || defined(HAVE_OPENGLES) && defined(HAVE_OPENGLES3) + return glFenceSync(condition, flags); +#endif +} + +/* + * + * Core in: + * OpenGL : 3.2 + * OpenGLES : 3.0 + */ +void rglWaitSync(GLsync sync, GLbitfield flags, GLuint64 timeout) +{ +#if defined(HAVE_OPENGL) || defined(HAVE_OPENGLES) && defined(HAVE_OPENGLES3) + glWaitSync(sync, flags, timeout); +#endif +} + /* GLSM-side */ static void glsm_state_setup(void) diff --git a/libretro-common/include/glsm/glsmsym.h b/libretro-common/include/glsm/glsmsym.h index 7c98daca51..b00908ba61 100644 --- a/libretro-common/include/glsm/glsmsym.h +++ b/libretro-common/include/glsm/glsmsym.h @@ -158,6 +158,8 @@ RETRO_BEGIN_DECLS #define glTexBuffer rglTexBuffer #define glClearBufferfv rglClearBufferfv #define glClearBufferfi rglClearBufferfi +#define glWaitSync rglWaitSync +#define glFenceSync rglFenceSync const GLubyte* rglGetStringi(GLenum name, GLuint index); void rglTexBuffer(GLenum target, GLenum internalFormat, GLuint buffer); @@ -391,6 +393,8 @@ void rglTexSubImage2D( GLenum target, GLenum type, const GLvoid * pixels); void rglDeleteVertexArrays(GLsizei n, const GLuint *arrays); +GLsync rglFenceSync(GLenum condition, GLbitfield flags); +void rglWaitSync(GLsync sync, GLbitfield flags, GLuint64 timeout); RETRO_END_DECLS