Zebediah Figura (@zfigura) commented about libs/vkd3d-shader/hlsl.h:
+ /* Item entry in hlsl_scope.vars. Specifically hlsl_ctx.globals.vars if the variable is global. */ + struct list scope_entry; + /* Item entry in hlsl_ir_function_decl.parameters, if the variable is a function parameter. */ + struct list param_entry; + /* 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. This makes it sound like the variable can change registers. How about this wording:
"If the variable is larger than one register, this describes the start of the register range." -- https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/50#note_17517