From a2520d787431c9b48cf30091187f429f5ff4ecaa Mon Sep 17 00:00:00 2001 From: Ken Mixter Date: Fri, 6 Dec 2013 15:43:45 -0800 Subject: emulator/opengl: A few debugging, stability improvements to emugl * Zero output parameters so that errors don't return random data (even if the target code was careful to zero its output parameters.) Spec says that we will not modify values in case of an error, which is not currently possible, but at least this means we return deterministic values. * Similarly, avoid passing uninitialized data if an error occurs during getting the viewport. * Fix a bug where glGetError may be called when NULL is decoded in CHECK_GL_ERROR mode. * Output more information about the stream in DEBUG_PRINTOUT mode to help separate from multiple streams. Change-Id: I31706b92642efe4c7ed38d178b49e72835a9c9a6 --- emulator/opengl/host/libs/Translator/GLES_CM/GLEScmImp.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'emulator/opengl/host/libs/Translator') diff --git a/emulator/opengl/host/libs/Translator/GLES_CM/GLEScmImp.cpp b/emulator/opengl/host/libs/Translator/GLES_CM/GLEScmImp.cpp index 3443f59..dd74750 100644 --- a/emulator/opengl/host/libs/Translator/GLES_CM/GLEScmImp.cpp +++ b/emulator/opengl/host/libs/Translator/GLES_CM/GLEScmImp.cpp @@ -2227,7 +2227,7 @@ void glDrawTexOES (T x, T y, T z, T width, T height) { int numClipPlanes; - GLint viewport[4]; + GLint viewport[4] = {}; z = (z>1 ? 1 : (z<0 ? 0 : z)); T vertices[4*3] = { -- cgit v1.1