aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorallusive-dev <[email protected]>2023-11-16 11:40:42 +1100
committerallusive-dev <[email protected]>2023-11-16 11:40:42 +1100
commitd89ff3e14012620969243a6f51f8f6a62f2c299c (patch)
tree4552630142c1c8cccbeeb00b46559d832c43feb9
parentmedia and icons (diff)
downloadcompfy-d89ff3e14012620969243a6f51f8f6a62f2c299c.tar.xz
compfy-d89ff3e14012620969243a6f51f8f6a62f2c299c.zip
restore glx errors except for 'GL_INVALID_FRAMEBUFFER_OPERATION'
-rw-r--r--src/backend/gl/gl_common.h23
1 files changed, 11 insertions, 12 deletions
diff --git a/src/backend/gl/gl_common.h b/src/backend/gl/gl_common.h
index a476119..63805bb 100644
--- a/src/backend/gl/gl_common.h
+++ b/src/backend/gl/gl_common.h
@@ -221,20 +221,19 @@ static inline const char *gl_get_err_str(GLenum err) {
// const char *func, int line
-static inline void gl_check_err_() {
+static inline void gl_check_err_(const char *func, int line) {
GLenum err = GL_NO_ERROR;
- // while (GL_NO_ERROR != (err = glGetError())) {
- // const char *errtext = gl_get_err_str(err);
-
- // if (errtext) {
- // log_printf(tls_logger, LOG_LEVEL_ERROR, func,
- // "GLX error at line %d: %s", line, errtext);
- // } else {
- // log_printf(tls_logger, LOG_LEVEL_ERROR, func,
- // "GLX error at line %d: %d", line, err);
- // }
- // }
+ while (GL_NO_ERROR != (err = glGetError())) {
+ const char *errtext = gl_get_err_str(err);
+ if (errtext) {
+ log_printf(tls_logger, LOG_LEVEL_ERROR, func,
+ "GL error at line %d: %s", line, errtext);
+ } else if (err != 1286) {
+ log_printf(tls_logger, LOG_LEVEL_ERROR, func,
+ "GL error at line %d: %d", line, err);
+ }
+ }
}
static inline void gl_clear_err(void) {