+ /* Before normalization, this is the register index in the source shader. + * After normalization (or always for DXIL), this is the *signature* index. */ unsigned int register_index; unsigned int register_count; unsigned int mask; unsigned int used_mask; enum vkd3d_shader_minimum_precision min_precision; + /* Register index / location in the target shader. */ + unsigned int target_location;
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.
+ 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?
+ 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?