mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-27 10:08:13 +02:00
When debugging a problem in a trace, CTS test,... that is caused by a known compiler feature, the first step is usually to find which shader causes the problem. This is often non-trivial as the amount of shaders in a trace can be huge. This commit adds a debugging tool to help with this. The idea behind this tool is to assign every shader a deterministic (pre-compilation) ID that can be used to order shaders. Once we have this, we can use it to bisect which shader causes the problem. This obviously only works if the problem can be traced back to a single shader. In my experience, this is often the case. This tool reuses the shader cache key as deterministic ID. It is concatenated with the variant ID to distinguish the different variants of a shader. In practice, bisecting the shaders in a test run works like this: - Gate the problematic compiler feature using ir3_shader_bisect_select; E.g., if (ir3_shader_bisect_select(v)) IR3_PASS(...); - Run test with IR3_SHADER_BISECT_DUMP_IDS_PATH=ids.txt - Sort ids.txt - Bisect the shader IDs using IR3_SHADER_BISECT_LO/IR3_SHADER_BISECT_HI. - Dump the problematic shader using IR3_SHADER_BISECT_DISASM. A Python script is provided to make all this easier: - ir3_shader_bisect.py dump-ids -o ids.txt 'test args' - ir3_shader_bisect.py bisect -i ids.txt 'test args' Signed-off-by: Job Noorman <jnoorman@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33602> |
||
|---|---|---|
| .. | ||
| afuc | ||
| ci | ||
| common | ||
| computerator | ||
| decode | ||
| drm | ||
| drm-shim | ||
| ds | ||
| fdl | ||
| ir2 | ||
| ir3 | ||
| isa | ||
| perfcntrs | ||
| registers | ||
| rnn | ||
| tests | ||
| vulkan | ||
| .clang-format | ||
| .dir-locals.el | ||
| .editorconfig | ||
| meson.build | ||