ValveSoftware / ValveSoftware/steam-runtime
[Feature Request] apitrace/renderdoc capture support
Nobody has claimed this yet.
- Dominant language
- Shell
- Stars
- 1.5k
- Forks
- 97
- PR merge metrics
- No merged PRs in 30d
Description
A common method of debugging issues with applications is tracing/capturing graphics API calls - on Linux the two most prominent tools are RenderDoc, for Vulkan and OpenGL (Core Profile), and apitrace, for OpenGL (Core and Compatibility Profiles).
For 3.0 and newer this is easier said than done - a frustrating part of this process is having to LD_PRELOAD tracer binaries, unless the tool has a nicer way of injecting its tracer. Problem is, you currently have to either preload a system-installed tracer, which can easily break for a multitude of reasons (libstdc++ breakages, apps being built with RUNPATH which LD_PRELOAD seems to erase for some reason, etc), or manually build the tracer just for SLR, which is possible...
https://flibitijibibo.com/files/steamrt3-tracers.tar.bz2
... but still a mess to guide users through, and only works if you built with -Wl,--disable-new-dtags to use RPATH which doesn't get erased by LD_PRELOAD, or somehow install the entire tracing tool to the SLR sysroot (or have developers add the tool to the game depot directly, which is maybe the worst route of all).
The best example I have right now is N++, which recently upgraded to SDL3 and SLR 3.0:
https://store.steampowered.com/app/230270/N_NPLUSPLUS/
The latest build now ships with RPATH instead of RUNPATH, so if you take the tracers archive above and set LD_PRELOAD=/path/to/glxtrace.so SDL_VIDEO_DRIVER=x11 %command% you should be able to make a trace file. This took a lot of trial-and-error to get working, and it's still a lot to ask of users to preload an arbitrary sofile from some random dork's personal website.
It would be extremely useful for customers and developers alike to be able to trivially set up apitrace/renderdoc captures, so that customers can provide the best diagnostic information possible both for app developers as well as driver developers, who can work best when they have trace data to reproduce issues locally.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the capture workflow described here, including RenderDoc, apitrace, LD_PRELOAD, and the Steam Linux Runtime context. Define a user-facing approach that supports the stated Vulkan and OpenGL capture scenarios without requiring arbitrary external tracer setup, then validate it against the N++ example.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- linux
- Domain
- devtools, operating-systems
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100