On Thu Mar 14 19:30:43 2024 +0000, Francisco Casas wrote:
I did it this way because we also wrap on `if (TRACE_ON())` other similar calls to ``` // on spirv.c if (TRACE_ON()) rb_for_each_entry(&ctx->functions, dump_function, ctx); ``` ``` // on ir.c and hlsl_codegen.c if (TRACE_ON()) rb_for_each_entry(&ctx->functions, dump_function, ctx); ``` Even though all these functions call `vkd3d_string_buffer_trace()` which also does the check. The point is to avoid doing expensive-looking processing (e.g. iterating a list or rbtree) that doesn't do anything if we aren't ultimately going to trace. But in this case we can just move it to the function body.
I don't care that much though. -- https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/708#note_64787