From 82916657fb916916e1241fbbd74c4e4bcb9f1185 Mon Sep 17 00:00:00 2001 From: PixelyIon Date: Sun, 5 Dec 2021 22:13:05 +0530 Subject: [PATCH] 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. --- app/src/main/cpp/skyline/gpu/shader_manager.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/src/main/cpp/skyline/gpu/shader_manager.cpp b/app/src/main/cpp/skyline/gpu/shader_manager.cpp index b46183be..fa237c10 100644 --- a/app/src/main/cpp/skyline/gpu/shader_manager.cpp +++ b/app/src/main/cpp/skyline/gpu/shader_manager.cpp @@ -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, },