build: remove debug_opengl
This option was always misdocumented, as it only controlled whether GL debugging is on by default. You can still control it with the TAISEI_GL_DEBUG environment variable, which is set to 1 in meson devenv.
This commit is contained in:
parent
4c659ba195
commit
b2de61f5c5
6 changed files with 20 additions and 33 deletions
|
@ -134,7 +134,7 @@ Video and OpenGL
|
|||
portable).
|
||||
|
||||
**TAISEI_GL_DEBUG**
|
||||
| Default: ``0`` for release builds, ``1`` for debug builds
|
||||
| Default: ``0``
|
||||
|
||||
Enables OpenGL debugging. A debug context will be requested, all OpenGL
|
||||
messages will be logged, and errors are fatal. Requires the ``KHR_debug``
|
||||
|
|
|
@ -403,7 +403,6 @@ config.set('TAISEI_BUILDCONF_LOG_FATAL_MSGBOX', (
|
|||
host_machine.system() == 'darwin' or
|
||||
not is_developer_build
|
||||
))
|
||||
config.set('TAISEI_BUILDCONF_DEBUG_OPENGL', get_option('debug_opengl'))
|
||||
|
||||
if host_machine.system() == 'windows'
|
||||
custom_target('COPYING.txt',
|
||||
|
|
|
@ -99,13 +99,6 @@ option(
|
|||
deprecated : 'prefer_static'
|
||||
)
|
||||
|
||||
option(
|
||||
'debug_opengl',
|
||||
type : 'boolean',
|
||||
value : true,
|
||||
description : 'Enable OpenGL debugging. Create a debug context, enable logging, and crash the game on errors. Only available in debug builds'
|
||||
)
|
||||
|
||||
option(
|
||||
'docs',
|
||||
type : 'feature',
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
#include "taisei.h"
|
||||
|
||||
#include "arch_switch.h"
|
||||
#include "renderer/glcommon/debug.h"
|
||||
|
||||
#include <unistd.h>
|
||||
#include <switch/services/applet.h>
|
||||
|
@ -58,24 +59,24 @@ void userAppInit(void) {
|
|||
|
||||
getcwd(g_programDir, FS_MAX_PATH);
|
||||
|
||||
#if defined(DEBUG) && defined(TAISEI_BUILDCONF_DEBUG_OPENGL)
|
||||
// enable Mesa logging:
|
||||
NX_SETENV("EGL_LOG_LEVEL", "debug");
|
||||
NX_SETENV("MESA_VERBOSE", "all");
|
||||
NX_SETENV("MESA_DEBUG", "1");
|
||||
NX_SETENV("MESA_INFO", "1");
|
||||
NX_SETENV("MESA_GLSL", "errors");
|
||||
NX_SETENV("NOUVEAU_MESA_DEBUG", "1");
|
||||
NX_SETENV("LIBGL_DEBUG", "verbose");
|
||||
if(glcommon_debug_requested()) {
|
||||
// enable Mesa logging:
|
||||
NX_SETENV("EGL_LOG_LEVEL", "debug");
|
||||
NX_SETENV("MESA_VERBOSE", "all");
|
||||
NX_SETENV("MESA_DEBUG", "1");
|
||||
NX_SETENV("MESA_INFO", "1");
|
||||
NX_SETENV("MESA_GLSL", "errors");
|
||||
NX_SETENV("NOUVEAU_MESA_DEBUG", "1");
|
||||
NX_SETENV("LIBGL_DEBUG", "verbose");
|
||||
|
||||
// enable shader debugging in Nouveau:
|
||||
NX_SETENV("NV50_PROG_OPTIMIZE", "0");
|
||||
NX_SETENV("NV50_PROG_DEBUG", "1");
|
||||
NX_SETENV("NV50_PROG_CHIPSET", "0x120");
|
||||
#else
|
||||
// disable error checking and save CPU time
|
||||
NX_SETENV("MESA_NO_ERROR", "1");
|
||||
#endif
|
||||
// enable shader debugging in Nouveau:
|
||||
NX_SETENV("NV50_PROG_OPTIMIZE", "0");
|
||||
NX_SETENV("NV50_PROG_DEBUG", "1");
|
||||
NX_SETENV("NV50_PROG_CHIPSET", "0x120");
|
||||
} else {
|
||||
// disable error checking and save CPU time
|
||||
NX_SETENV("MESA_NO_ERROR", "1");
|
||||
}
|
||||
}
|
||||
|
||||
attr_used
|
||||
|
|
|
@ -113,7 +113,7 @@ void glcommon_debug_enable(void) {
|
|||
#endif
|
||||
|
||||
bool glcommon_debug_requested(void) {
|
||||
return env_get("TAISEI_GL_DEBUG", DEBUG_GL_DEFAULT);
|
||||
return env_get("TAISEI_GL_DEBUG", false);
|
||||
}
|
||||
|
||||
void glcommon_set_debug_label_local(char *label_storage, const char *kind_name, GLuint gl_handle, const char *label) {
|
||||
|
|
|
@ -148,12 +148,6 @@ ext_flag_t glcommon_check_extension(const char *ext) attr_nonnull_all;
|
|||
ext_flag_t glcommon_require_extension(const char *ext) attr_nonnull_all;
|
||||
void glcommon_setup_attributes(SDL_GLprofile profile, uint major, uint minor, SDL_GLcontextFlag ctxflags);
|
||||
|
||||
#if defined(DEBUG) && defined(TAISEI_BUILDCONF_DEBUG_OPENGL)
|
||||
#define DEBUG_GL_DEFAULT 1
|
||||
#else
|
||||
#define DEBUG_GL_DEFAULT 0
|
||||
#endif
|
||||
|
||||
struct glext_s {
|
||||
struct {
|
||||
char major;
|
||||
|
|
Loading…
Reference in a new issue