Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ The Vulkan Guide can be built as a single page using `asciidoctor guide.adoc`

= Using Vulkan

== xref:{chapters}ide.adoc[Development Environments & IDEs]

== xref:{chapters}vulkan_profiles.adoc[Vulkan Profiles]

== xref:{chapters}loader.adoc[Loader]
Expand Down
1 change: 1 addition & 0 deletions antora/modules/ROOT/nav.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
** xref:{chapters}portability_initiative.adoc[]
** xref:{chapters}vulkan_cts.adoc[]
** xref:{chapters}development_tools.adoc[]
** xref:{chapters}ide.adoc[]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be the order it is in README/Guide (above Vulkan Profiles)

or make the README/Guide.adoc match here

personally I think the spot here make sense and the READEME/Guide should be adjusted

** xref:{chapters}validation_overview.adoc[]
** xref:{chapters}decoder_ring.adoc[]
* Using Vulkan
Expand Down
115 changes: 103 additions & 12 deletions chapters/development_tools.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Layers are optional components that augment the Vulkan system. They can intercep
The validation layer included multiple features:
** link:https://vulkan.lunarg.com/doc/sdk/latest/windows/synchronization_usage.html[Synchronization Validation]: Identify resource access conflicts due to missing or incorrect synchronization operations between actions (Draw, Copy, Dispatch, Blit) reading or writing the same regions of memory.
** link:https://vulkan.lunarg.com/doc/sdk/latest/windows/gpu_validation.html[GPU-Assisted Validation]: Instrument shader code to perform run-time checks for error conditions produced during shader execution.
** link:https://vulkan.lunarg.com/doc/sdk/latest/windows/debug_printf.html[Shader printf]: Debug shader code by "`printing`" any values of interest to the debug callback or stdout.
** link:https://vulkan.lunarg.com/doc/sdk/latest/windows/debug_printf.html[Shader printf]: Debug shader code by "`printing`" any values of interest to the debug callback or stdout. Environment variables provide a fast path for enabling this feature without code changes.
** link:https://vulkan.lunarg.com/doc/sdk/latest/windows/best_practices.html[Best Practices Warnings]: Highlights potential performance issues, questionable usage patterns, common mistakes.

=== Vulkan SDK layers
Expand Down Expand Up @@ -60,7 +60,7 @@ There are also other publicly available layers that can be used to help in devel
* link:https://developer.qualcomm.com/software/adreno-gpu-sdk/tools[`VK_LAYER_adreno`], the Vulkan Adreno Layer.
Checks Vulkan applications for best practices on Qualcomm Adreno devices.

== Debugging
== Debugging

Debugging something running on a GPU can be incredibly hard, luckily there are tools out there to help.

Expand All @@ -78,16 +78,107 @@ The following tools help debug crashes.
* link:https://gpuopen.com/radeon-gpu-detective[AMD GPU detective]
* link:https://developer.nvidia.com/nsight-aftermath[NVIDIA Nsight Aftermath SDK]

=== Shader Debugging

Debugging shaders requires specialized tools and techniques. For comprehensive guidance on shader debugging in Vulkan applications, including:

* Shader debugging tools and their IDE integration
* GPU-Assisted Validation for shader debugging
* Shader printf techniques for both GLSL and HLSL
* IDE-specific shader debugging configurations
* Best practices for shader debugging workflows

See the xref:{chapters}ide.adoc#shader-debugging[Shader Debugging Integration] section in the Development Environments & IDEs chapter.

[[profiling]]
== Profiling

With anything related to a GPU it is best to not assume and profile when possible. Here is a list of known profilers to aid in your development.
With anything related to a GPU it is best to not assume and profile when possible. Profiling tools can help identify performance bottlenecks, analyze GPU workloads, and optimize your Vulkan applications. For IDE-specific profiling integration, see the xref:{chapters}ide.adoc[Development Environments & IDEs] chapter.

* link:https://gpuopen.com/rgp/[AMD Radeon GPU Profiler] - Low-level performance analysis tool for AMD Radeon GPUs.
* link:https://developer.android.com/agi[Android GPU Inspector (AGI)] - Google's profiler for the Android platform with support for Vulkan
* link:https://developer.arm.com/Tools%20and%20Software/Streamline%20Performance%20Analyzer[Arm Streamline Performance Analyzer] - Visualize the performance of mobile games and applications for a broad range of devices, using Arm Mobile Studio.
* link:https://www.intel.com/content/www/us/en/developer/tools/graphics-performance-analyzers/overview.html[Intel(R) GPA] - Intel's Graphics Performance Analyzers that supports capturing and analyzing multi-frame streams of Vulkan apps.
* link:https://developer.nvidia.com/nsight-graphics[NVIDIA Nsight]
* link:https://github.com/GPUOpen-Tools/OCAT[OCAT] - The Open Capture and Analytics Tool (OCAT) provides an FPS overlay and performance measurement for D3D11, D3D12, and Vulkan.
* link:https://developer.imaginationtech.com[PVRTune]
* link:https://developer.qualcomm.com/software/snapdragon-profiler[Qualcomm Snapdragon Profiler] - Profiling tool targeting Adreno GPU.
* link:https://www.vktracer.com[VKtracer] - Cross-vendor and cross-platform profiler.
=== Vendor-Specific Profiling Tools

==== AMD

* link:https://gpuopen.com/rgp/[AMD Radeon GPU Profiler (RGP)] - Low-level performance analysis tool for AMD Radeon GPUs.
** Provides detailed timing information for Vulkan API calls and GPU workloads
** Visualizes the rendering pipeline and identifies bottlenecks
** Supports hardware-based ray tracing analysis
** Integrates with xref:{chapters}ide.adoc#visual-studio[Visual Studio] through the Radeon Developer Panel

==== NVIDIA

* link:https://developer.nvidia.com/nsight-graphics[NVIDIA Nsight Graphics] - Comprehensive graphics debugger and profiler for NVIDIA GPUs.
** Provides frame debugging, GPU trace capture, and performance analysis
** Supports Vulkan API debugging and optimization
** Includes shader profiling and memory analysis
** Integrates with xref:{chapters}ide.adoc#visual-studio[Visual Studio] and can be used standalone

==== ARM

* link:https://developer.arm.com/Tools%20and%20Software/Streamline%20Performance%20Analyzer[Arm Streamline Performance Analyzer] - Performance analysis tool for Arm-based devices.
** Visualizes the performance of mobile games and applications
** Provides CPU, GPU, and system-level performance metrics
** Supports Vulkan workload analysis
** Part of Arm Mobile Studio, which integrates with various IDEs

==== Imagination Technologies

* link:https://developer.imaginationtech.com[PVRTune] - Performance analysis tool for PowerVR GPUs.
** Provides real-time hardware performance metrics
** Supports Vulkan API tracing and analysis
** Helps identify bottlenecks in PowerVR-based devices
** Works with xref:{chapters}ide.adoc#android-studio[Android Studio] for mobile development

==== Qualcomm

* link:https://developer.qualcomm.com/software/snapdragon-profiler[Qualcomm Snapdragon Profiler] - Profiling tool targeting Adreno GPUs.
** Provides detailed GPU metrics for Qualcomm Snapdragon devices
** Supports Vulkan API trace capture and analysis
** Includes shader profiling and optimization suggestions
** Integrates with xref:{chapters}ide.adoc#android-studio[Android Studio] for Android development

=== Platform-Specific Profiling Tools

==== Android

* link:https://developer.android.com/agi[Android GPU Inspector (AGI)] - Google's profiler for the Android platform.
** Provides Vulkan API tracing and GPU performance analysis
** Supports system trace correlation with GPU workloads
** Helps identify rendering bottlenecks on Android devices
** Integrates with xref:{chapters}ide.adoc#android-studio[Android Studio]

=== Cross-Platform Profiling Tools

* link:https://github.com/GPUOpen-Tools/OCAT[OCAT] (Open Capture and Analytics Tool) - FPS overlay and performance measurement tool.
** Provides real-time FPS monitoring and performance metrics
** Supports D3D11, D3D12, and Vulkan
** Generates detailed performance reports
** Works alongside any development environment

* link:https://www.vktracer.com[VKtracer] - Cross-vendor and cross-platform Vulkan profiler.
** Captures and analyzes Vulkan API calls
** Works with all Vulkan-compatible GPUs
** Provides timing information and bottleneck identification
** Compatible with various development environments

* link:https://vulkan.lunarg.com/doc/sdk/latest/windows/capture_tools.html[GFXReconstruct] - Frame capture and replay tool for Vulkan.
** Captures Vulkan API calls for later analysis
** Supports cross-platform capture and replay
** Helps identify performance issues and bugs
** Included in the Vulkan SDK and works with all major IDEs

=== Profiling Best Practices

When profiling Vulkan applications, consider the following best practices:

1. **Start with validation layers**: Before profiling, ensure your application passes validation to avoid measuring performance of incorrect code.

2. **Profile on target hardware**: Performance characteristics can vary significantly between different GPUs and platforms.

3. **Use vendor-specific tools** for the most detailed insights on specific hardware.

4. **Combine CPU and GPU profiling** to identify bottlenecks across the entire rendering pipeline.

5. **Profile regularly** throughout development to catch performance regressions early.

For IDE-specific profiling workflows, refer to the relevant sections in the xref:{chapters}ide.adoc[Development Environments & IDEs] chapter.
Loading