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
unsigned int first_write, last_read;* means function entry. */
- /* Offset where the variable's value is stored within its buffer in numeric register components.
unsigned int buffer_offset;* This in case the variable is uniform. */
- /* 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."