Giovanni Mascellani (@giomasce) commented about libs/vkd3d-shader/hlsl.h:
{ struct hlsl_ir_var *var;
/* An array of references to instruction nodes, of data type uint, that are used to reach the
* desired part of the variable.
* If path_len is 0, then this is a reference to the whole variable.
* The value of each instruction node in the path corresponds to the index of the element/field
* that has to be selected on each nesting level to reach this part.
* The path shall not contain additional values once a type that cannot be subdivided
* (a.k.a. "component") is reached. */
unsigned int path_len; struct hlsl_src *path;
/* Single instruction node of data type uint used to represent the register offset (in register
* components), from the start of the variable, of the part referenced.
* Currently, the path is being lowered to this single offset before writing the bytecode. */
The combination of "currently", "is being" and "before ..." makes it hard for me to understand whatever timing seems to be implied by this sentence. I'd drop the "currently" (all comments are assumed to be "current", hopefully) and use the present tense: "The path is lowered to this single offset before writing the bytecode". I might even add a note mentioning that the value stored here depends (also) on the shader model.