KhronosGroup / KhronosGroup/Vulkan-Docs
Expose driver-side debugging features (related to PSO creation)
- Dominant language
- JavaScript
- Stars
- 3.3k
- Forks
- 549
- Avg merge
- 5d 5h
- Merged PRs (30d)
- 2
Description
@Tobski requested I post this here
So day to day we encounter a lot of these kind of crashes during development, driver doesn't really matter and neither does vendor, it's a common pattern among all. Typically this is because one of the drivers doesn't recognize an opcode or sequence of opcodes.
Usually the only way to debug this, would be to strip the shader down, bisect stuff and hope you find the sequence and then write something else that works, file a bug, or both.
Obviously all software has bugs, but the way to debug this kind of problem is... Barbaric. We discuss a lot a out the advantages of having a debugger over printf debugging, but this is stochastic debugging if you ask me. Having symbols here would already be a massive step forward (usually if you have them you can correlate the callstack with the AST for example).

In this case it's a crash into an Nvidia driver, but a typical case when iterating on a shader is that we just get a access violation somewhere directly inside the driver, and with no real way of debugging this from our point of view, we just end up manually permuting the shader that we're working on.
Any kind of additional information that the driver can output here would be useful; the current OpCode being processed, a detailed log that can be enabled (through an env-var, or otherwise) that printf's a trace of what's going on, some asserts and the text they include etc etc would all be extremely helpful here.
My expectation is that most drivers have these kind of tools build in already to help driver engineers assist in debugging these kinds of issues already, mostly as a normal part of their development processes. For example; typical clang based tooling could turn on and display it's asserts.
Contributor guide
Research direction
No files, tests, or entry points are identified in the issue. Start by clarifying which driver-facing debugging interface is in scope and which requested diagnostics—opcodes, traces, asserts, or symbols—would define completion.
Written by the indexing model from the issue text.
Assessment
- Domain
- computer-graphics
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100