From: Francisco Casas fcasas@codeweavers.com
--- libs/vkd3d-shader/hlsl.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)
diff --git a/libs/vkd3d-shader/hlsl.h b/libs/vkd3d-shader/hlsl.h index 1bf0a964..0dc5254d 100644 --- a/libs/vkd3d-shader/hlsl.h +++ b/libs/vkd3d-shader/hlsl.h @@ -340,23 +340,39 @@ struct hlsl_ir_var uint32_t is_param : 1; };
+/* A HLSL function. */ struct hlsl_ir_function { + /* Entry for the function in the context's search tree. */ struct rb_entry entry; + /* Name of the function. */ const char *name; + /* Search tree for the overloads of this function, as hlsl_ir_function_decls. + * The parameters' types are used as key. */ struct rb_tree overloads; + /* Whether the function is intrinsic or not, if we ever want to store an intrinsic function + * within the context's search tree of functions. */ bool intrinsic; };
+/* A specific HLSL function definition, with specific parameter types. */ struct hlsl_ir_function_decl { + /* Type of the returnd value. */ struct hlsl_type *return_type; + /* Pointer to a synthetic variable used to store the return value of the function. */ struct hlsl_ir_var *return_var; + /* Location of the declaration in the HLSL shader. */ struct vkd3d_shader_location loc; + /* Entry for the declaration within the hlsl_ir_function's search tree of overloads. */ struct rb_entry entry; + /* Pointer to the hlsl_ir_function to which this declaration corresponds. */ struct hlsl_ir_function *func; + /* List of variables. One variable is created for each parameter of the function. */ struct list *parameters; + /* Instructions within the body of the function. */ struct hlsl_block body; + /* Whether the function declaration contains a definition with instructions. */ bool has_body; };