- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hey,
Since shader profiling is finally available again I wanted to give it a try. I develop a webgpu application (based on wgpu-native) that runs GLSL fragment shaders, through naga translation it can make use of different backedns such as Vulkan, D3D12 and OpenGL.
As far as I understand it, shader profiling is only available via D3D12 (DirectX 12). So I managed to launch my applcation through graphics monitor and capture a frame.
I see that the compiler flags select shader model ps_5_1 for my fragment shaders. If I understand the docs correctly GPA will recompile my shaders if I make changes and use these flags for the compiler (dxc). So ... can I change them in GPA directly? I couldn't find anything in the docs, but the shader profiling only works for ISA simd16 on shadermodel < 6.0.
So I don't see the profiling in the HLSL view nor the HLSL to ISA side by side.
question being: can I set the compiler target directly in GPA or do I need to force it in my own app?
Jan
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Vipitis,
Thank you for your post and sorry for the late reply!
Yes that is correct - shader profiling is only available for DirectX 12. It supports profiling in ISA.
Currently, as seen below, Frame Analyzer displays the compile entrypoint/target/flags which you noticed, but it does not allow custom compile flag overrides to be set upon recompilation of shaders. This is a feature that we would like to develop in the future, and I will update you if an Intel GPA version with this feature is released.
So yes, your best option currently is to force the compile flag overrides you would like to use in your application.
You mentioned you weren't able to enable the shader profiler in the HLSL view. The Shader Profiler does not support profiling HLSL currently. In the past the Shader Profiler supported mapping ISA instructions to lines of code in high-level shading languages such as HLSL, as well as providing profiling information in these languages. We would like to reintroduce this feature at some point, and I will update you if Intel GPA supports this feature in the future.
To just view the HLSL and ISA side by side, click the split screen icon to the right of the Shader language drop down menu
Thank you again for your post!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hey, thanks for the reply!
I am working on getting the Dx12 compiler to run with a debug flags, but might have hit some upstream issue that's on me to solve first. ref
For reference/motivation: I would love to provide shader artists with an automated and easy to understand profiling report for their GLSL shaders. Perhaps even give a per line/block/statement value to show particularly slow lines. Also enable easy A/B testing between different approaches. Think about something like godbolt/shader-playground but with uops.info attached for GPUs. This might be vendor and microarchitecture specific but I can only develop it for the hardware I am using myself. As an alternative to end-to-end performance benchmark looking at frametimes or framerate. Once I can see it work manually I will look into automating via the SDK.
This split view button is greyed out on shadermodel 5.1 but it works for 6.0+ even if I don't have the debug info there I can split view between ISA and DXB.
Is there was to community contribute to GPA?
Jan
Jan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hey Vipitis!
Thanks for sharing - that would be great to have a profile report generation tool for shader artists. And best of luck with the issue your encountering!
It sounds like if the Shader Profile supported mapping ISA instructions to lines of code in GLSL/HLSL, that could enable some of the use case you described. I'll add a note regarding this to our ticket for reintroducing this feature.
In the meantime, the shader profiler can provide per-line timing analysis in ISA on both the original shader and edited shaders. As an example, here is the shader profile of an edited HLSL shader which I had loop 999999 times:
Versus the original shader:
Of course the ISA is not easy to understand compared to GLSL/HLSL. But I thought I'd share that this functionality exists on the ISA level. And we will update you if Intel GPA supports this mapping feature in the future.
Unfortunately since Intel® GPA is not open-source at this time, we won't be able to take community contributions. However, we have open-sourced our Vulkan backend if you are interested:
If you decide to use the GPA Framework tools in your automations, keep in mind that you can also build a customized layer which may run in GPA Framework. (We use is a cross-platform, cross-API layer system similar to the Vulkan* layer paradigm)
Here are a couple links to help with using GPA Framework:
Getting Started — Intel® GPA Framework documentation
Please reach out with any questions you have - we would love to help you in any way we can.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi again Vipitis,
Making another post here to inform you that due to the end-of-life deprecation announcement of Intel GPA, no new features are planned including adding custom compile flag overrides to be set upon recompilation of shaders.
I apologize for this feature gap and wish the best for your future profiling.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hey,
yeah - I saw the notice last weekend and was a little sad. I will investigate with VTune can fit our usecase (perhaps even better), do you expect some of the GPA functionality to live on in VTune in the future?
From the announcement it is not clear if GPA will be archived or completely inaccessible in the future.
Jan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hey Jan,
Yeah, its very sad news for us too. We do plan on integrating some GPA features into Intel VTune Profiler, but what that feature set looks like and the timeframe this may occur in is still to be determined.
Yes, definitely give VTune a try! As it stands right now, VTune is mainly focused on the compute side of APIs (OpenCL, DirectML) and profiles serial/multithreaded applications on CPU, GPU, and NPU platforms. It does not provide a view into shader code or perform shader editing experiments. It does collect GPU Metrics, as well as Metric Discovery API Library metrics if you have an Intel GPU and setup your environment. You can also collect Direct3D 12 "parallel execution" (windows only) with VTune and examine it along with GPU Metrics overtime. It gives insights of how draw, clear, dispatch calls and resource barriers encoded in a command buffer uploaded to the GPU are really executed. VTune could also perform GPU Rendering analysis for OpenGL-ES applications on Linux to detect performance-critical Graphics API calls, although we haven't tested it recently. VTune has a product support forum as well here: Analyzers - Intel Community.
As for GPA's availability, it will be accessible and downloadable throughout all of 2025. Our understanding is that because it won't have continual security fixes, in 2026 the GPA download link must be removed and will not be accessible through an Intel website.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @Vipitis, You’re right — right now Intel GPA doesn’t let you change the compiler flags directly in the tool. The only way to use custom flags is to set them in your own application before the shaders are compiled. Shader profiling only works on DirectX 12 at the moment, and unfortunately the HLSL-to-ISA mapping isn’t fully supported yet. If you want to see HLSL and ISA side by side, the split-screen view in the Shader Profiler works well.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hey, I am surprised to get another reply here. Is iGPA no longer getting discontinued?
It turns out there is some upstream issue that is yet unanswered https://github.com/gfx-rs/wgpu-native/issues/487 so I might have to raise the issue to the upstream library... But very much out of my depth with rust. FXC always gives debug symbols while DXC doesn't honor the flag. Neither in iGPA or RenderDoc. And FXC targets a shadermodel 5 so I can't do the profiling in the translated HLSL.
I implemented the instance extras flags and wrote examples for DXC and debugging (with RenderDoc) for our library (recent comments here: https://github.com/pygfx/wgpu-py/commits?author=Vipitis) so if you have to capacity to test this on your end, give it a try.
I never got Vulkan capturing to work, it would just crash. I did manage to do tracing with Vulkan tho. legacy backends like OpenGL did capture but then I couldn't open the captures.
If iGPA stays available, I might find the time again to dig deeper. But I sorta gave up after the end of life notice.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Vipitis,
Yeah, the status of GPA end-of-life has not changed since June unfortunately.
Regarding Vulkan, we are continuing development on the vulkan backend (GVK) which now has a frontend GUI (Pipeline Explorer). This repository is open-sourced and takes community contributions.
intel/gvk: A collection of Vulkan C++ utilities with a general focus on tools development
It is currently focused on real-time analysis, and attaches itself as a layer into the vulkan application you want to perform analysis on. Here is a video of the GUI in action:
Pipeline Explorer Demo - Vulkan Application Analysis - YouTube
We don't have shader profiling with per-line SPIR-V to GLSL/HLSL mapping on the roadmap right now, but the mapping itself would be doable using the Khronos SPIRV-Cross library. Currently GVK is provided as source code so you'll have to build it yourself, although that might change in the future. If you are interested in using GVK, we can drop our email here for quicker communication
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page