Zebediah Figura (@zfigura) commented about libs/vkd3d-shader/hlsl.h:
+ /* Item entry in hlsl_ctx.extern_vars, if the variable is extern. */ + struct list extern_entry; + + /* Indexes of the IR instructions where the variable is first written and last read (liveness + * range). The IR instructions are numerated starting from 2, because 0 means unused, and 1 + * means function entry. */ unsigned int first_write, last_read; + /* Offset where the variable's value is stored within its buffer in numeric register components. + * This in case the variable is uniform. */ unsigned int buffer_offset; + /* Register to which the variable is allocated during its lifetime. + * In case that the variable uses more than one register, this refers to the starting one. + * The register type is inferred from the data type and the storage of the variable. + * Uniforms and builtin semantics don't use the field. + * If the variable is an input semantic copy, the register is 'v'. + * If the variable is an output semantic copy, the register is 'o'. Uniforms do use this field in sm1 [allocate_const_registers()], but not sm4. I'd mention also *why* it's unused for sm4 uniforms (viz. because they use the buffer hlsl_reg and buffer_offset instead.)
-- https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/50#note_17518