Merge pull request #371 from zed-industries/metal-debug

Add script to debug Metal frames
This commit is contained in:
Antonio Scandurra 2022-01-27 08:56:05 +01:00 committed by GitHub
commit dc95cd9e20
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

13
script/metal-debug Executable file
View file

@ -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 $@