On 2/4/21 12:16 PM, Matteo Bruni wrote:
Signed-off-by: Matteo Bruni mbruni@codeweavers.com
Nice. Just a question / nitpick:
-const char *debug_base_type(const struct hlsl_type *type) +const char *hlsl_base_type_to_string(const struct hlsl_type *type)
vs
-const char *debug_modifiers(DWORD modifiers) +const char *hlsl_debug_modifiers(DWORD modifiers)
What makes one a "_to_string" and the other keep the "_debug_"?
The difference is that hlsl_debug_modifiers() uses vkd3d debugging utilities (vkd3d_dbg_sprintf()).
I have patches to restructure things a bit so that compiler error messages don't use vkd3d_dbg_sprintf(). There are a couple reasons I think it's a good idea to do this:
* it has subtle constraints around buffer length and thread safety. Admittedly, vkd3d provides plenty of debug buffer space, so this may never be a problem in practice, but it is theoretically possible for things to be truncated or replaced.
* a potential build option could remove all debugging code at compile time, for the sake of performance. Granted, I don't know if this would actually provide any performance benefit, and vkd3d_dbg_sprintf() could always be left in...