KhronosGroup / Vulkan-Docs

The Vulkan API Specification and related tools
Other
2.72k stars 453 forks source link

Extension request: SetStablePowerState #2101

Open MennoVink opened 1 year ago

MennoVink commented 1 year ago

Apologies if this is not the right place to request new extensions, but i wouldn't know where else to ask.

Would it be possible to get an extension enabling us to get the same functionality as DirectX's SetStablePowerState?

I'm working on a mode for my application where there are timestamp queries being placed around render passes. These queries result in a per-pass duration which is being presented to the user. The problem right now is that with variable clock speeds these results are unreliable, unreproducable and uncomparable. Having users start up low-level profilers like NSight is too much to ask. It's way too technical and more purposed towards developers optimizing their code rather than towards informing end-users how much high level application effects(passes) are costing.

Currently my approach is to create a d3d12 device on the adapter matching the one where my vulkan code is running. Then i can call SetStablePowerState and assuming the machine is in 'developer mode' it works great.

One alternative implementation is using nvidia-smi. This is far from user-friendly while also being nvidia specific. They do mention however that their implementation is better than SetStablePowerState, although i could not confirm this. There are also propietary api's from like NVPerf and GPA which might support it. So while the functionality is there, it just not accessible from native vulkan. It would be so much better if it was just a matter of enabling an extension and calling the function.

oddhack commented 1 year ago

Tagging for the SI TSG to look at. @stonesthrow are you still chairing the TSG? Unsure who to assign SI issues to make sure they reach the TSG agenda.

r-potter commented 1 year ago

@oddhack Lina (@versalinyaa) is the current chair for SI.