From 5bd0dea85d138d27a70ed9a03aa75615b05b04d6 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Thu, 8 Feb 2024 18:07:43 -0600 Subject: [PATCH] Enable Metal validation in debug builds --- app/main.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/main.cpp b/app/main.cpp index 2a376861..67eac1d7 100644 --- a/app/main.cpp +++ b/app/main.cpp @@ -418,6 +418,12 @@ int main(int argc, char *argv[]) qputenv("QSG_RENDER_LOOP", "basic"); #endif +#if defined(Q_OS_DARWIN) && defined(QT_DEBUG) + // Enable Metal valiation for debug builds + qputenv("MTL_DEBUG_LAYER", "1"); + qputenv("MTL_SHADER_VALIDATION", "1"); +#endif + // We don't want system proxies to apply to us QNetworkProxyFactory::setUseSystemConfiguration(false);