Giovanni Mascellani (@giomasce) commented about libs/vkd3d-shader/hlsl.c:
if (t1->class == HLSL_CLASS_ARRAY) return t1->e.array.elements_count == t2->e.array.elements_count && hlsl_types_are_equal(t1->e.array.type, t2->e.array.type);
- if (t1->base_type == HLSL_TYPE_TECHNIQUE && t1->e.version != t2->e.version)
I don't think it's a good idea to use `base_type` before having made sure that it is relevant for this type. Maybe it doesn't happen in practice now, but in theory `base_type` could happen to be `HLSL_TYPE_TECHNIQUE` even if, say, `class` is `HLSL_CLASS_STRUCT`, just because the irrelevant field was left uninitialized, and then setting `version` would be wrong. Defensively, I would try to avoid that and check `base_type` only if `class == HLSL_CLASS_OBJECT`.
Speaking of that, your changes make the documentation comment for field `base_type` in `struct hlsl_type` outdated, so you should fix that too. Notice that `type` is now called `class`, so you could take the chance to fix that too.