This essentially works for me, but note that it doesn't currently apply cleanly.
Yep, I have been told to leave the rebases for after the MR is agreed upon.
I generally prefer doing changes like these function by function; start in write_sm4_shdr(), and then push down from there. That would also make potential conflicts easier to handle/avoid. I think this change is straightforward enough that I'm not going to require splitting the commit, but please take it into future consideration.
Okay, it didn't occur to me doing this from the top-down.
That works, but it might be nice to introduce a tpf_writer_init() function as well, particularly once the lookup tables are introduced.
Done.
This works too, but perhaps something like the following is nicer?
const struct vkd3d_sm4_register_type_info *info; ... for (i = 0; i < ARRAY_SIZE(register_type_table); ++i) { info = ®ister_type_table[i]; lookup->register_type_info_from_sm4[info->sm4_type] = info; lookup->register_type_info_from_vkd3d[info->vkd3d_type] = info; }
Done.