[client] egl: use glGetError and codes for errors in gl* functions

We used to use DEBUG_EGL_ERROR for gl* functions, which just yields
EGL_SUCCESS even when there are errors.
This commit is contained in:
Quantum
2021-07-19 04:12:29 -04:00
committed by Geoffrey McRae
parent 0cbc529640
commit b8effaf42c
3 changed files with 26 additions and 4 deletions

View File

@@ -21,9 +21,16 @@
#include "common/debug.h"
const char * egl_getErrorStr(void);
const char * gl_getErrorStr(void);
#define DEBUG_EGL_WARN(fmt, ...) \
DEBUG_WARN(fmt " (%s)", ##__VA_ARGS__, egl_getErrorStr())
#define DEBUG_EGL_ERROR(fmt, ...) \
DEBUG_ERROR(fmt " (%s)", ##__VA_ARGS__, egl_getErrorStr())
#define DEBUG_GL_WARN(fmt, ...) \
DEBUG_WARN(fmt " (%s)", ##__VA_ARGS__, gl_getErrorStr())
#define DEBUG_GL_ERROR(fmt, ...) \
DEBUG_ERROR(fmt " (%s)", ##__VA_ARGS__, gl_getErrorStr())