From 7b2f55fa62dcc61523a4aeb217e2cb475ee5f619 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Thu, 27 Jan 2022 08:50:23 +0100 Subject: [PATCH] Add script to debug Metal frames --- script/metal-debug | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100755 script/metal-debug diff --git a/script/metal-debug b/script/metal-debug new file mode 100755 index 0000000000..6fc18e5ebd --- /dev/null +++ b/script/metal-debug @@ -0,0 +1,13 @@ +#!/bin/bash + +export GPUTOOLS_LOAD_GTMTLCAPTURE=1 +export DYLD_LIBRARY_PATH="/usr/lib/system/introspection" +export METAL_LOAD_INTERPOSER=1 +export DYLD_INSERT_LIBRARIES="/usr/lib/libMTLCapture.dylib" +export DYMTL_TOOLS_DYLIB_PATH="/usr/lib/libMTLCapture.dylib" +export METAL_DEVICE_WRAPPER_TYPE=1 +export GPUProfilerEnabled="YES" +export METAL_DEBUG_ERROR_MODE=0 +export LD_LIBRARY_PATH="/Applications/Xcode.app/Contents/Developer/../SharedFrameworks/" + +cargo run $@