From: Francisco Casas fcasas@codeweavers.com
--- libs/vkd3d-shader/hlsl.h | 13 +++++++++++++ 1 file changed, 13 insertions(+)
diff --git a/libs/vkd3d-shader/hlsl.h b/libs/vkd3d-shader/hlsl.h index 36125cdf..bf65dbcc 100644 --- a/libs/vkd3d-shader/hlsl.h +++ b/libs/vkd3d-shader/hlsl.h @@ -451,13 +451,26 @@ struct hlsl_ir_swizzle DWORD swizzle; };
+/* Reference to a variable, or a part of it (e.g. a vector within a matrix within a struct). */ struct hlsl_deref { + /* Pointer to the referenced variable */ struct hlsl_ir_var *var;
+ /* An array of references to instruction nodes, of HLSL 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 HLSL 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 lowered to this single offset before translating the dereferences to + * the target binary format. */ struct hlsl_src offset; };