It's probably out of scope for this series, but it seems like some renaming is in order here; we probably don't want the meaning of "register_index" to change like that.
Er... that's actually an error on my part; it's still the register index. It's only the register index in registers that changes meaning. I'll remove that part.
+ if (parser->shader_version.major < 4 && parser->shader_version.type == VKD3D_SHADER_TYPE_VERTEX + && (result = remap_output_signature(&parser->shader_desc.output_signature, compile_info)) < 0) + return result;
I don't mind too much, but do we need to limit this like that? I can't say it would necessarily be terribly useful, but if someone wanted to remap e.g. sm4 vertex shader outputs, should we try to stop them?
Probably not. I'll adjust.
+ else + { + varyings[count].output_signature_index = unused_signature_idx++; + }
It's probably inconsequential, but we could just set this to "output_signature->element_count", right?
Yes. I don't know why I thought I had to do it this way. Possibly a leftover from trying to assign unique locations to unused indices to make spirv happy.