From e1a6d10a548a56bfe9a32078a670045b5e5874d7 Mon Sep 17 00:00:00 2001 From: Liran Date: Sun, 31 Jul 2011 10:43:24 +0300 Subject: [PATCH] opengles emulator: GLES2 codec - glFinishRoundTrip fix glFinishRoundTrip the function was not implemented on the host side, calling glFinish caused segfault Change-Id: Ic3a726d22a499f6560d905d177dcb7f997397628 --- tools/emulator/opengl/host/libs/GLESv2_dec/GL2Decoder.cpp | 8 ++++++++ tools/emulator/opengl/host/libs/GLESv2_dec/GL2Decoder.h | 1 + 2 files changed, 9 insertions(+) diff --git a/tools/emulator/opengl/host/libs/GLESv2_dec/GL2Decoder.cpp b/tools/emulator/opengl/host/libs/GLESv2_dec/GL2Decoder.cpp index ec6e1922f..0457fdc07 100644 --- a/tools/emulator/opengl/host/libs/GLESv2_dec/GL2Decoder.cpp +++ b/tools/emulator/opengl/host/libs/GLESv2_dec/GL2Decoder.cpp @@ -58,10 +58,18 @@ int GL2Decoder::initGL(get_proc_func_t getProcFunc, void *getProcFuncData) set_glDrawElementsOffset(s_glDrawElementsOffset); set_glDrawElementsData(s_glDrawElementsData); set_glShaderString(s_glShaderString); + set_glFinishRoundTrip(s_glFinishRoundTrip); return 0; } +int GL2Decoder::s_glFinishRoundTrip(void *self) +{ + GL2Decoder *ctx = (GL2Decoder *)self; + ctx->glFinish(); + return 0; +} + void GL2Decoder::s_glGetCompressedTextureFormats(void *self, int count, GLint *formats) { GL2Decoder *ctx = (GL2Decoder *) self; diff --git a/tools/emulator/opengl/host/libs/GLESv2_dec/GL2Decoder.h b/tools/emulator/opengl/host/libs/GLESv2_dec/GL2Decoder.h index cf1491781..24d01dab9 100644 --- a/tools/emulator/opengl/host/libs/GLESv2_dec/GL2Decoder.h +++ b/tools/emulator/opengl/host/libs/GLESv2_dec/GL2Decoder.h @@ -31,5 +31,6 @@ private: static void gl2_APIENTRY s_glDrawElementsOffset(void *self, GLenum mode, GLsizei count, GLenum type, GLuint offset); static void gl2_APIENTRY s_glDrawElementsData(void *self, GLenum mode, GLsizei count, GLenum type, void * data, GLuint datalen); static void gl2_APIENTRY s_glShaderString(void *self, GLuint shader, const GLchar* string, GLsizei len); + static int gl2_APIENTRY s_glFinishRoundTrip(void *self); }; #endif