Module: vkd3d Branch: master Commit: 3fbe272659c3b96757028521afa867fc2141d90f URL: https://gitlab.winehq.org/wine/vkd3d/-/commit/3fbe272659c3b96757028521afa867...
Author: Francisco Casas fcasas@codeweavers.com Date: Tue Nov 15 00:37:07 2022 -0300
vkd3d-shader/hlsl: Add field-level documentation to struct hlsl_src.
---
libs/vkd3d-shader/hlsl.h | 7 +++++++ 1 file changed, 7 insertions(+)
diff --git a/libs/vkd3d-shader/hlsl.h b/libs/vkd3d-shader/hlsl.h index 41dc3295..f365f588 100644 --- a/libs/vkd3d-shader/hlsl.h +++ b/libs/vkd3d-shader/hlsl.h @@ -270,9 +270,16 @@ struct hlsl_block struct list instrs; };
+/* A reference to an instruction node (struct hlsl_ir_node), usable as a field in other structs. + * struct hlsl_src is more powerful than a mere pointer to an hlsl_ir_node because it also + * contains a linked list item entry, which is used by the referenced instruction node to keep + * track of all the hlsl_srcĀ·s that reference it. + * This allows replacing any hlsl_ir_node with any other in all the places it is used, or checking + * that a node has no uses before it is removed. */ struct hlsl_src { struct hlsl_ir_node *node; + /* Item entry for node->uses. */ struct list entry; };