Zebediah Figura (@zfigura) commented about libs/vkd3d-shader/hlsl_codegen.c:
buffer = var1->buffer;if (!buffer->used_size)continue;LIST_FOR_EACH_ENTRY(var2, &ctx->extern_vars, struct hlsl_ir_var, extern_entry){unsigned int var1_reg_size, var2_reg_size;if (!var2->is_uniform || var2->data_type->type == HLSL_CLASS_OBJECT)continue;if (var1 == var2 || var1->buffer != var2->buffer)continue;if (strcmp(var1->name, var2->name) >= 0)continue;
I guess, but if we really need to optimize, we shouldn't be doing a nested loop in the first place, so this just looks odd.