Fundamentally, I think vkd3d-shader compiler output should go through vkd3d_shader_message_context instead of TRACE/WARN/FIXME/ERR.
Yes, although I think there's also clearly some things that belong in the debug channels. We still have a few FIXME that should be hlsl_fixme(), but...
The question would then be whether the existing API is sufficient for d3dcompiler, vkd3d, and wined3d. If it's not, we could certainly introduce additional API to fix that. For example, we could introduce callbacks that receive compiler output with the location, log level, error code, and message already separated out. It's not necessarily clear to me that some variant of what wined3d does in shader_spirv_compile_shader() wouldn't be sufficient for d3dcompiler/vkd3d though.
Broadly, except that currently the program might suppress the log level, and we probably don't want to print warnings by default.
I'm hesitant to make the location and error code fully structured, because I think both could easily change. (Locations can be of varying levels of specificity and sophistication, and error codes can easily constrain us to a poorly organized classification.) But separating messages by log level at least could make sense.
Actually, I guess now is a good time to bring up a related discussion—the error code schema doesn't make much sense to me currently. I can see the point of applying codes to warnings, so that they can be selectively disabled. I'm not sure it's the best way to handle it in general, though. I think the gcc approach is more expressive and allows reclassifying some warnings, e.g. you can divide up what was previously one warning into multiple by applying an extra argument (consider -Wshift-overflow). I suppose we could claim no API stability around warnings, though; it's not like gcc guarantees that either...
I don't see the point of applying codes to errors, though. Disabling or even reporting them selectively doesn't make sense.
The other main RFC related to warnings is: currently we have not been matching the native HLSL compiler at all with respect to warnings. Should that change? One good reason it potentially should is to allow "#pragma warning" to work as intended.