On 7/5/22 06:26, Giovanni Mascellani wrote:
Hi,
Il 01/07/22 23:24, Francisco Casas ha scritto:
+struct hlsl_ir_node *hlsl_new_offset_from_path_index(struct hlsl_ctx *ctx, struct hlsl_block *block, + struct hlsl_type *type, struct hlsl_ir_node *offset, struct hlsl_ir_node *idx, + const struct vkd3d_shader_location *loc)
Any reason why you're passing a struct hlsl_block and then copying the instructions instead of the usual pattern of passing the instruction list in depth?
This was my suggestion; the idea is that it allows one to generate multiple instructions without necessarily needing to append them to the end of a block. It may not be necessary in this case, but it could end up being useful in the future. The use of "struct hlsl_block" instead of passing an untyped list is something I think we want to encourage more of, though.