Zebediah Figura (@zfigura) commented about libs/vkd3d-shader/hlsl.c:
return swizzle;
}
+bool hlsl_index_is_crooked_matrix_indexing(struct hlsl_ir_index *index) +{
- struct hlsl_type *type = index->val.node->data_type;
- return type->type == HLSL_CLASS_MATRIX && !hlsl_type_is_row_major(type);
+}
So I think the dead code in 3/7 is fine, even for upstream, because it's simple and clear what it's used for. hlsl_index_is_crooked_matrix_indexing(), on the other hand, isn't used in this patch (anymore), and is less clear, so I'd be inclined to defer it until it's used.
Wrt naming, perhaps invert the meaning and say "contiguous" rather than "crooked"? (And "matrix_indexing" is probably redundant.)