docs: new page with mdbook (#8342)

- Use mdbook to generate a book from collection of documents
 - documents are
     - copied and processed from READMEs
     - original content stored in the docs_src folder
     - markdeep docs transformed into embedded html
 - Main logic is in script docs_src/build/run.py
This commit is contained in:
Powei Feng
2025-01-14 06:56:30 +00:00
committed by GitHub
parent 65c30f3199
commit 026b985c07
212 changed files with 15354 additions and 384 deletions
+42
View File
@@ -0,0 +1,42 @@
# Debugging Metal
## Enable Metal Validation
To enable the Metal validation layers when running a sample through the command-line, set the
following environment variable:
```
export METAL_DEVICE_WRAPPER_TYPE=1
```
You should then see the following output when running a sample with the Metal backend:
```
2020-10-13 18:01:44.101 gltf_viewer[73303:4946828] Metal API Validation Enabled
```
## Metal Frame Capture from gltf_viewer
To capture Metal frames from within gltf_viewer:
### 1. Create an Info.plist file
Create an `Info.plist` file in the same directory as `gltf_viewer` (`cmake/samples`). Set its
contents to:
```
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>MetalCaptureEnabled</key>
<true/>
</dict>
</plist>
```
### 2. Capture a frame
Run gltf_viewer as normal, and hit the "Capture frame" button under the Debug menu. The captured
frame will be saved to `filament.gputrace` in the current working directory. This file can then be
opened with Xcode for inspection.