From 3f4bb5d524c8b3935d3a4c0e4de178709c527677 Mon Sep 17 00:00:00 2001 From: allusive-dev Date: Thu, 16 Nov 2023 08:45:41 +1100 Subject: Hide unneeded GL errors. Fix modulemap --- src/backend/gl/gl_common.h | 19 ++-- src/compfy.modulemap | 214 +++++++++++++++++++++++++++++++++++++++++++++ src/picom.modulemap | 214 --------------------------------------------- 3 files changed, 225 insertions(+), 222 deletions(-) create mode 100644 src/compfy.modulemap delete mode 100644 src/picom.modulemap (limited to 'src') diff --git a/src/backend/gl/gl_common.h b/src/backend/gl/gl_common.h index f4eee29..cfe473a 100644 --- a/src/backend/gl/gl_common.h +++ b/src/backend/gl/gl_common.h @@ -195,7 +195,7 @@ static inline const char *gl_get_err_str(GLenum err) { CASESTRRET(GL_INVALID_ENUM); CASESTRRET(GL_INVALID_VALUE); CASESTRRET(GL_INVALID_OPERATION); - CASESTRRET(GL_INVALID_FRAMEBUFFER_OPERATION); + // CASESTRRET(GL_INVALID_FRAMEBUFFER_OPERATION); CASESTRRET(GL_OUT_OF_MEMORY); CASESTRRET(GL_STACK_UNDERFLOW); CASESTRRET(GL_STACK_OVERFLOW); @@ -221,13 +221,16 @@ static inline void gl_check_err_(const char *func, int line) { 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); - } + + // Hide GL Errors Temporarily. -Allusive + + // 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); + // } } } diff --git a/src/compfy.modulemap b/src/compfy.modulemap new file mode 100644 index 0000000..621ad81 --- /dev/null +++ b/src/compfy.modulemap @@ -0,0 +1,214 @@ +// modulemap + +module compiler { + header "compiler.h" +} +module string_utils { + header "string_utils.h" +} +module dbus { + header "dbus.h" +} +module kernel { + header "kernel.h" +} +module utils { + // Has macros expands to calloc/malloc + header "utils.h" + export libc.stdlib +} +module region { + header "region.h" +} +module compfy { + header "compfy.h" +} +module types { + header "types.h" +} +module c2 { + header "c2.h" +} +module render { + header "render.h" +} +module options { + header "options.h" +} +module opengl { + header "opengl.h" +} +module diagnostic { + header "diagnostic.h" +} +module win_defs { + header "win_defs.h" +} +module win { + header "win.h" + export win_defs +} +module log { + header "log.h" + export compiler +} +module x { + header "x.h" +} +module vsync { + header "vsync.h" +} +module common { + header "common.h" +} +module config { + header "config.h" +} +module xrescheck { + header "xrescheck.h" +} +module cache { + header "cache.h" +} +module backend { + module gl { + module gl_common { + header "backend/gl/gl_common.h" + } + module glx { + header "backend/gl/glx.h" + export GL.glx + } + } + module backend { + header "backend/backend.h" + } + module backend_common { + header "backend/backend_common.h" + } +} +module xcb [system] { + module xcb { + header "/usr/include/xcb/xcb.h" + export * + } + module randr { + header "/usr/include/xcb/randr.h" + export * + } + module render { + header "/usr/include/xcb/render.h" + export * + } + module sync { + header "/usr/include/xcb/sync.h" + export * + } + module composite { + header "/usr/include/xcb/composite.h" + export * + } + module xfixes { + header "/usr/include/xcb/xfixes.h" + export * + } + module damage { + header "/usr/include/xcb/damage.h" + export * + } + module xproto { + header "/usr/include/xcb/xproto.h" + export * + } + module present { + header "/usr/include/xcb/present.h" + } + module util { + module render { + header "/usr/include/xcb/xcb_renderutil.h" + export * + } + } +} +module X11 [system] { + module Xlib { + header "/usr/include/X11/Xlib.h" + export * + } + module Xutil { + header "/usr/include/X11/Xutil.h" + export * + } +} +module GL [system] { + module glx { + header "/usr/include/GL/glx.h" + export * + } + module gl { + header "/usr/include/GL/gl.h" + export * + } +} +module libc [system] { + export * + module assert { + export * + textual header "/usr/include/assert.h" + } + module string { + export * + header "/usr/include/string.h" + } + module ctype { + export * + header "/usr/include/ctype.h" + } + module errno { + export * + header "/usr/include/errno.h" + } + module fenv { + export * + header "/usr/include/fenv.h" + } + module inttypes { + export * + header "/usr/include/inttypes.h" + } + module math { + export * + header "/usr/include/math.h" + } + module setjmp { + export * + header "/usr/include/setjmp.h" + } + module stdio { + export * + header "/usr/include/stdio.h" + } + + module stdlib [system] { + export * + header "/usr/include/stdlib.h" + } +} + +// glib specific header. In it's own module because it +// doesn't exist on some systems with unpatched glib 2.26+ +module "xlocale.h" [system] { + export * + header "/usr/include/xlocale.h" +} + +// System header that we have difficult with merging. +module "sys_types.h" [system] { + export * + header "/usr/include/sys/types.h" +} + +module "signal.h" [system] { + export * + header "/usr/include/signal.h" +} diff --git a/src/picom.modulemap b/src/picom.modulemap deleted file mode 100644 index 621ad81..0000000 --- a/src/picom.modulemap +++ /dev/null @@ -1,214 +0,0 @@ -// modulemap - -module compiler { - header "compiler.h" -} -module string_utils { - header "string_utils.h" -} -module dbus { - header "dbus.h" -} -module kernel { - header "kernel.h" -} -module utils { - // Has macros expands to calloc/malloc - header "utils.h" - export libc.stdlib -} -module region { - header "region.h" -} -module compfy { - header "compfy.h" -} -module types { - header "types.h" -} -module c2 { - header "c2.h" -} -module render { - header "render.h" -} -module options { - header "options.h" -} -module opengl { - header "opengl.h" -} -module diagnostic { - header "diagnostic.h" -} -module win_defs { - header "win_defs.h" -} -module win { - header "win.h" - export win_defs -} -module log { - header "log.h" - export compiler -} -module x { - header "x.h" -} -module vsync { - header "vsync.h" -} -module common { - header "common.h" -} -module config { - header "config.h" -} -module xrescheck { - header "xrescheck.h" -} -module cache { - header "cache.h" -} -module backend { - module gl { - module gl_common { - header "backend/gl/gl_common.h" - } - module glx { - header "backend/gl/glx.h" - export GL.glx - } - } - module backend { - header "backend/backend.h" - } - module backend_common { - header "backend/backend_common.h" - } -} -module xcb [system] { - module xcb { - header "/usr/include/xcb/xcb.h" - export * - } - module randr { - header "/usr/include/xcb/randr.h" - export * - } - module render { - header "/usr/include/xcb/render.h" - export * - } - module sync { - header "/usr/include/xcb/sync.h" - export * - } - module composite { - header "/usr/include/xcb/composite.h" - export * - } - module xfixes { - header "/usr/include/xcb/xfixes.h" - export * - } - module damage { - header "/usr/include/xcb/damage.h" - export * - } - module xproto { - header "/usr/include/xcb/xproto.h" - export * - } - module present { - header "/usr/include/xcb/present.h" - } - module util { - module render { - header "/usr/include/xcb/xcb_renderutil.h" - export * - } - } -} -module X11 [system] { - module Xlib { - header "/usr/include/X11/Xlib.h" - export * - } - module Xutil { - header "/usr/include/X11/Xutil.h" - export * - } -} -module GL [system] { - module glx { - header "/usr/include/GL/glx.h" - export * - } - module gl { - header "/usr/include/GL/gl.h" - export * - } -} -module libc [system] { - export * - module assert { - export * - textual header "/usr/include/assert.h" - } - module string { - export * - header "/usr/include/string.h" - } - module ctype { - export * - header "/usr/include/ctype.h" - } - module errno { - export * - header "/usr/include/errno.h" - } - module fenv { - export * - header "/usr/include/fenv.h" - } - module inttypes { - export * - header "/usr/include/inttypes.h" - } - module math { - export * - header "/usr/include/math.h" - } - module setjmp { - export * - header "/usr/include/setjmp.h" - } - module stdio { - export * - header "/usr/include/stdio.h" - } - - module stdlib [system] { - export * - header "/usr/include/stdlib.h" - } -} - -// glib specific header. In it's own module because it -// doesn't exist on some systems with unpatched glib 2.26+ -module "xlocale.h" [system] { - export * - header "/usr/include/xlocale.h" -} - -// System header that we have difficult with merging. -module "sys_types.h" [system] { - export * - header "/usr/include/sys/types.h" -} - -module "signal.h" [system] { - export * - header "/usr/include/signal.h" -} -- cgit v1.2.3