KhronosGroup / Vulkan-Tools

Vulkan Development Tools
Apache License 2.0
362 stars 153 forks source link

On-Screen Frame Counter for vkcube #672

Open andrew-lunarg opened 2 years ago

andrew-lunarg commented 2 years ago

Downstream tools such as layers which display overlays are able to paint the current frame number but it would be useful at least as a check on them or to simplify the layer stack for the vkcube app to print it's idea of the current frame number into the framebuffer. This would mostly be of interest as a visual confirmation for authors of tools which are able to take actions over specific frame ranges such as trace capture and replay that those tools selected the correct frames to operate on. Of course the big issue would be, does the frame count start at zero or one?

charles-lunarg commented 2 years ago

Are you suggesting a new vulkan layer which adds a frame counter overlay?

I imagine such a layer would be a lot of work to write while only printing a single number. The monitor layer already exists in LunarG/VulkanTools, which writes the frame to the titlebar rather than the window.

I do see the utility, especially in frame capture/replay tools. A big "Frame: 20" would be helpful while stepping through a frame in order to select the start/end frames.

As a side note, Renderdoc already has such functionality built into the capture layer. Maybe any layers that need such info could print it themselves? That way the version is internally consistent.

andrew-lunarg commented 2 years ago

Are you suggesting a new vulkan layer which adds a frame counter overlay?

Apologies, I have updated the title to reflect my intent. The reason for doing it in vkcube is that that app seems to be used as a sanity check in discussions of capture issues. Another layer would be more complexity while debugging.

charles-lunarg commented 2 years ago

Ahh that makes way more sense. Yes, this is something that could be added to vkcube, and would be useful for anyone running tests which use vkcube.

sl1pkn07 commented 10 months ago

mangohud?

xantares commented 2 months ago

+1 for this