-
a607e1ca
by Francisco Casas at 2026-04-02T15:31:38+02:00
vkd3d-common: Track the debug level per translation unit.
Instead of using the static "level" variable in vkd3d_dbg_get_level().
We want to avoid having only a single instance of the "level" variable
for both libvkd3d and libvkd3d-shader in executables statically linking
to libvkd3d.
-
0228b08d
by Francisco Casas at 2026-04-02T15:31:38+02:00
vkd3d-common: Introduce debug classes.
Replacing the existing debug levels. The main difference is that debug
classes are independent of each other. For example, "warn" messages can
now be enabled without necessarily also enabling "fixme" messages, while
previously the "warn" level would also enable "fixme", "err", and
"message" output.
Adapted from the equivalent code in Wine.
-
547c729b
by Francisco Casas at 2026-04-02T15:31:38+02:00
vkd3d-common: Introduce debug channels.
Adapted from the equivalent code in Wine.
The immediate reason is to be able to selectively disable
copy propagation debug output in libvkd3d-shader, as implemented by the
commit following this one. In the future, we may also want to use
separate debug channels for e.g. the HLSL compiler and the SPIR-V
backend.
This generally follows the Wine syntax for the VKD3D_DEBUG and
VKD3D_SHADER_DEBUG environment variables, but the existing debug level
syntax continues to work as before as well.
The default channel is currently "vkd3d" for all parts of vkd3d,
including e.g. libvkd3d-shader. This may change in the future.
-
6c590723
by Francisco Casas at 2026-04-02T15:31:38+02:00
vkd3d-shader/hlsl: Use a separate debug channel for copy propagation traces.
Currently, copy propagation trace messages are quite verbose, specially
during loop unrolling where this pass can be called several times during
the same iteration. This makes output files quite big and compilation
slower when VKD3D_SHADER_DEBUG=trace is set.