Only Enable Shader Compiler Debug Mode in Debug Builds

Sets properties that relate to debugging in `Shader::Settings` to `true` only for debug builds while leaving them disabled for release builds.
This commit is contained in:
PixelyIon 2021-12-05 22:13:05 +05:30
parent b09f28c0ba
commit 82916657fb

View File

@ -22,7 +22,7 @@ namespace Shader::Log {
namespace skyline::gpu {
ShaderManager::ShaderManager(const DeviceState &state, GPU &gpu) : gpu(gpu) {
auto& quirks{gpu.quirks};
auto &quirks{gpu.quirks};
hostTranslateInfo = Shader::HostTranslateInfo{
.support_float16 = quirks.supportsFloat16,
.support_int64 = quirks.supportsInt64,
@ -63,8 +63,13 @@ namespace skyline::gpu {
};
Shader::Settings::values = {
#ifdef NDEBUG
.renderer_debug = false,
.disable_shader_loop_safety_checks = false,
#else
.renderer_debug = true,
.disable_shader_loop_safety_checks = true,
#endif
.resolution_info = {
.active = false,
},