# Use RenderDoc to debug and analyze workloads

## In this learning path

- [Introduction](https://learn.arm.com/learning-paths/mobile-graphics-and-gaming/vulkan-ml-sample/)
- [Run neural graphics workloads with ML Extensions for Vulkan](https://learn.arm.com/learning-paths/mobile-graphics-and-gaming/vulkan-ml-sample/1-introduction/)
- [Set up the ML Emulation Layers for Vulkan](https://learn.arm.com/learning-paths/mobile-graphics-and-gaming/vulkan-ml-sample/2-ml-ext-for-vulkan/)
- [Simple Tensor and Data Graph](https://learn.arm.com/learning-paths/mobile-graphics-and-gaming/vulkan-ml-sample/3-first-sample/)
- [Run an ML workload with Scenario Runner](https://learn.arm.com/learning-paths/mobile-graphics-and-gaming/vulkan-ml-sample/4-scenario-runner/)
- [Use RenderDoc to debug and analyze workloads](https://learn.arm.com/learning-paths/mobile-graphics-and-gaming/vulkan-ml-sample/5-renderdoc/)
- [Wrapping up](https://learn.arm.com/learning-paths/mobile-graphics-and-gaming/vulkan-ml-sample/6-wrapping-up/)
- [Next Steps](https://learn.arm.com/learning-paths/mobile-graphics-and-gaming/vulkan-ml-sample/_next-steps/)

## Inspect and debug Vulkan workloads with RenderDoc
Integrating machine learning into real-time rendering requires tools to inspect and debug Vulkan workloads. RenderDoc is a GPU frame capture tool that lets developers examine Vulkan API calls, shaders, and GPU resources.

With RenderDoc, you can:
- Step through a frame’s rendering process
- Inspect Vulkan API calls
- View shader inputs and outputs
- Examine GPU resource states and memory usage

## Install Arm Performance Studio
To use RenderDoc with ML Extensions for Vulkan, install the Arm-customized version included with Arm Performance Studio:
1. **Download Arm Performance Studio** from the [Arm Developer website](https://developer.arm.com/Tools%20and%20Software/Arm%20Performance%20Studio#Downloads). Use version 2025.4 or later.
2. Run the installer:  
   `Arm_Performance_Studio_<version>_windows_x86-64.exe`
3. Follow the installation instructions.

## View the Neural Super Sampling output
You can use RenderDoc for Arm GPUs to view the DDS images generated by Scenario Runner in the previous section.

The `out_colour.dds` image uses the `B10G11R11_UFLOAT` format, which is not widely supported by standard image viewers.
1. Launch **RenderDoc for Arm GPUs** from the Windows Start menu.
2. Select **File → Open Capture**.
3. Set the file filter to **All Files**.
4. Navigate to the `neural-super-sampling\scenario\out_high` directory and open `out_colour.dds`.
5. Select the **Texture Viewer** tab to inspect the image.

The output image has a resolution of 1920 × 1080.

## Capture Vulkan frames with RenderDoc
So far, you’ve used RenderDoc to view the output of the Neural Super Sampling workload. You can also use RenderDoc to capture and inspect Vulkan API calls during application execution.

To explore this functionality, return to the Simple Tensor and Data Graph sample you ran earlier in this Learning Path. By capturing a frame, you can inspect Vulkan operations, resource bindings, and data graph pipeline execution.
1. **Open RenderDoc**, and in the main window, go to the **Launch Application** section.
2. Configure the following fields:
   - **Executable Path**: Path to the built executable `vulkan_samples.exe`.
   - **Working Directory**: Path to the root of the Vulkan Samples project.
   - **Command-line Arguments**:  
     ``` 
     sample simple_tensor_and_data_graph 
     ```
     You can substitute `simple_tensor_and_data_graph` with any of the other sample names as needed.
3. Select **Launch**. The selected sample starts running.
4. When the application window is active, press **F12** to capture a frame.
5. The captured frame appears in RenderDoc’s capture list. Double-click it to explore the frame and inspect ML Extensions for Vulkan calls in detail.

## Learn more
This workflow gives you a detailed view of how Vulkan builds and executes ML graphs when you optimize pipelines or debug integration issues. To learn more, see the [Debug with RenderDoc User Guide](https://developer.arm.com/documentation/109669/latest).

Continue to the final section to review what you’ve learned and explore additional resources.
