Whether right or wrong, 0 above is VKD3D_DATA_FLOAT. That happens in a couple of other places as well. (I'd argue for "wrong, but largely irrelevant" for most of these; we could fix them up in follow-up patches if we care.)
Yep, in these cases I used zero to preserve the current behavior given by `memset(.,0,.)`,
Right, but the current behaviour is to initialise these with VKD3D_DATA_FLOAT. The existing code just does that in a more implicit/obfuscated way; let's make it clearer what's actually happening.
I'd argue for "vsir_dimension_from_sm4()".
Okay, I renamed the function.
However, I have been told that it is better if function names start with a verb, but I guess we are not following that rule much in this part of the code base.
That rule is news to me. :) And yeah, most vkd3d and wined3d code starts function names with the main structure/object the function is operating on. Actually, tangentially, we'll probably want to go with "vsir_dimension" instead of "vkd3d_shader_dimension" as well if we're going to rename it shortly anyway.
@@ -5258,10 +5258,7 @@ static void spirv_compiler_emit_hull_shader_builtins(struct spirv_compiler *comp struct vkd3d_shader_dst_param dst; memset(&dst, 0, sizeof(dst)); - dst.reg.type = VKD3DSPR_OUTPOINTID; - dst.reg.idx[0].offset = ~0u; - dst.reg.idx[1].offset = ~0u; - dst.reg.idx_count = 0; + vsir_register_init(&dst.reg, VKD3DSPR_OUTPOINTID, 0, 0); dst.write_mask = VKD3DSP_WRITEMASK_0; spirv_compiler_emit_input_register(compiler, &dst); }
Do we need to retain the memset() here?