aboutsummaryrefslogtreecommitdiffstats
path: root/emulator
diff options
context:
space:
mode:
authorDavid 'Digit' Turner <digit@google.com>2014-06-04 11:15:53 +0200
committerDavid 'Digit' Turner <digit@google.com>2014-06-04 11:15:53 +0200
commitf7ca633e49f6f490efd875f63708017bdbb0084c (patch)
tree5614b94a998a68c6b801aaeaa568037b0e2c9263 /emulator
parenta509402a6b907a871b62f89ea713ff63286c23ae (diff)
downloadsdk-f7ca633e49f6f490efd875f63708017bdbb0084c.zip
sdk-f7ca633e49f6f490efd875f63708017bdbb0084c.tar.gz
sdk-f7ca633e49f6f490efd875f63708017bdbb0084c.tar.bz2
emulator/opengl: Fix GPU emulation library crash on Windows.
The definitions of two EGL translator functions were missing EGLAPI / EGLAPIENTRY macros. On Windows, these enforces the __stdcall procedure call modifier, which changes the way the stack pointer is modified on function exit. Without this patch, a call to these function will result in a corrupted stack pointer in the caller, quickly followed by a random crash. BUG=15402623 Change-Id: Ia0f7ebef29e1252086fb59ebf2e6f907c2a69487
Diffstat (limited to 'emulator')
-rw-r--r--emulator/opengl/host/libs/Translator/EGL/EglImp.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/emulator/opengl/host/libs/Translator/EGL/EglImp.cpp b/emulator/opengl/host/libs/Translator/EGL/EglImp.cpp
index 58180ed..8896698 100644
--- a/emulator/opengl/host/libs/Translator/EGL/EglImp.cpp
+++ b/emulator/opengl/host/libs/Translator/EGL/EglImp.cpp
@@ -1022,7 +1022,7 @@ void detachEGLImage(unsigned int imageId)
}
-EGLImageKHR eglCreateImageKHR(EGLDisplay display, EGLContext context, EGLenum target, EGLClientBuffer buffer, const EGLint *attrib_list)
+EGLAPI EGLImageKHR EGLAPIENTRY eglCreateImageKHR(EGLDisplay display, EGLContext context, EGLenum target, EGLClientBuffer buffer, const EGLint *attrib_list)
{
VALIDATE_DISPLAY(display);
VALIDATE_CONTEXT(context);
@@ -1059,7 +1059,7 @@ EGLImageKHR eglCreateImageKHR(EGLDisplay display, EGLContext context, EGLenum ta
}
-EGLBoolean eglDestroyImageKHR(EGLDisplay display, EGLImageKHR image)
+EGLAPI EGLBoolean EGLAPIENTRY eglDestroyImageKHR(EGLDisplay display, EGLImageKHR image)
{
VALIDATE_DISPLAY(display);
return dpy->destroyImageKHR(image) ? EGL_TRUE:EGL_FALSE;