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);
+}
+struct hlsl_ir_index *hlsl_new_index(struct hlsl_ctx *ctx, struct hlsl_ir_node *val,
struct hlsl_ir_node *idx, const struct vkd3d_shader_location *loc)
For new code I think we want to return hlsl_ir_node here, unless there's some reason we can't quite do that?
(The basic reason, which I might have gone into before, is that this firstly simplifies code a bit, by turning e.g. "&index->node" into "index" in a lot of places, and secondly, I have plans in the works that we can then return nodes of type HLSL_IR_ERROR, potentially negating the need to check for allocation failure.)