Module: vkd3d
Branch: master
Commit: 2b1ec0cfe525c12ea05ad95a6be8209746d80abe
URL: https://gitlab.winehq.org/wine/vkd3d/-/commit/2b1ec0cfe525c12ea05ad95a6be82…
Author: Francisco Casas <fcasas(a)codeweavers.com>
Date: Wed Nov 16 15:39:51 2022 -0300
vkd3d-shader/hlsl: Add field-level documentation to struct hlsl_scope.
---
libs/vkd3d-shader/hlsl.h | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/libs/vkd3d-shader/hlsl.h b/libs/vkd3d-shader/hlsl.h
index 07718316..3317bd6f 100644
--- a/libs/vkd3d-shader/hlsl.h
+++ b/libs/vkd3d-shader/hlsl.h
@@ -598,9 +598,15 @@ struct hlsl_ir_constant
struct hlsl_scope
{
+ /* Item entry for hlsl_ctx.scopes. */
struct list entry;
+
+ /* List containing the variables declared in this scope; linked by hlsl_ir_var->scope_entry. */
struct list vars;
+ /* Tree map containing the types declared in this scope, using hlsl_tree.name as key.
+ * The types are attached through the hlsl_type.scope_entry fields. */
struct rb_tree types;
+ /* Scope containing this scope. This value is NULL for the global scope. */
struct hlsl_scope *upper;
};
Module: vkd3d
Branch: master
Commit: eabd742f3e2936a394abe438e64de226eab6027f
URL: https://gitlab.winehq.org/wine/vkd3d/-/commit/eabd742f3e2936a394abe438e64de…
Author: Francisco Casas <fcasas(a)codeweavers.com>
Date: Wed Nov 16 15:20:35 2022 -0300
vkd3d-shader/hlsl: Add field-level documentation to function structs.
---
libs/vkd3d-shader/hlsl.h | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/libs/vkd3d-shader/hlsl.h b/libs/vkd3d-shader/hlsl.h
index bc5b5fb6..07718316 100644
--- a/libs/vkd3d-shader/hlsl.h
+++ b/libs/vkd3d-shader/hlsl.h
@@ -384,21 +384,35 @@ struct hlsl_ir_var
struct hlsl_ir_function
{
+ /* Item entry in hlsl_ctx.functions */
struct rb_entry entry;
+
const char *name;
+ /* Tree containing function definitions, stored as hlsl_ir_function_decl structures, which would
+ * be more than one in case of function overloading. */
struct rb_tree overloads;
};
struct hlsl_ir_function_decl
{
struct hlsl_type *return_type;
+ /* Synthetic variable used to store the return value of the function. */
struct hlsl_ir_var *return_var;
+
struct vkd3d_shader_location loc;
+ /* Item entry in hlsl_ir_function.overloads. The paremeters' types are used as key. */
struct rb_entry entry;
+
+ /* Function to which this declaration corresponds. */
struct hlsl_ir_function *func;
+ /* List containing one variable for each parameter of the function; linked by the
+ * hlsl_ir_var.param_entry fields. */
struct list *parameters;
+
struct hlsl_block body;
bool has_body;
+ /* Array of attributes (like numthreads) specified just before the function declaration.
+ * Not to be confused with the function parameters! */
unsigned int attr_count;
const struct hlsl_attribute *const *attrs;
};