mesa/src/freedreno
Job Noorman b101aecb03
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
ir3: add shader bisect debug tool
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>
2025-08-03 09:30:49 +00:00
..
afuc build: avoid redefining unreachable() which is standard in C23 2025-07-31 17:49:42 +00:00
ci freedreno/ci: document new flakes 2025-08-01 09:42:03 +03:00
common build: avoid redefining unreachable() which is standard in C23 2025-07-31 17:49:42 +00:00
computerator freedreno/computerator: add support for UBOs 2025-07-11 16:01:07 +00:00
decode freedreno/crashdec: Add option to export a snapshot 2025-08-01 19:33:28 +00:00
drm freedreno/drm: fix libvdrm inclusion logic 2025-06-26 01:02:37 +02:00
drm-shim freedreno/drm-shim: add support for MSM_PARAM_UCHE_TRAP_BASE 2025-05-21 11:29:31 +00:00
ds build: avoid redefining unreachable() which is standard in C23 2025-07-31 17:49:42 +00:00
fdl build: avoid redefining unreachable() which is standard in C23 2025-07-31 17:49:42 +00:00
ir2 freedreno: use unicode © instead of DOS-like (C) copyright sign 2024-08-28 08:54:00 +00:00
ir3 ir3: add shader bisect debug tool 2025-08-03 09:30:49 +00:00
isa ir3/isa: ignore bit 54 in alias encoding 2025-07-01 14:07:59 +00:00
perfcntrs freedreno/a6xx: Add single common source for a6xx.xml.h 2025-07-03 12:50:04 +00:00
registers freedreno/registers: Fix DBGC_CFG_DBGBUS_SEL_D definition 2025-08-01 19:33:28 +00:00
rnn freedreno/decode: Add enum value decoding 2025-08-01 19:33:27 +00:00
tests freedreno/regs: update A2D definitions 2025-07-04 11:25:09 +00:00
vulkan treewide: simplify nir_def_rewrite_uses_after 2025-08-01 15:34:24 +00:00
.clang-format freedreno: add missing entries to ForEachMacros 2025-01-24 12:15:31 +00:00
.dir-locals.el
.editorconfig
meson.build meson: Update Lua dependency version to 5.3 2024-08-14 03:03:46 +00:00