mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
vkd3d-shader/hlsl: Add field-level documentation to struct hlsl_ir_node.
This commit is contained in:
parent
9157a5e73f
commit
04108c0e21
Notes:
Alexandre Julliard
2023-01-11 22:39:24 +01:00
Approved-by: Giovanni Mascellani (@giomasce) Approved-by: Zebediah Figura (@zfigura) Approved-by: Henri Verbeet (@hverbeet) Approved-by: Alexandre Julliard (@julliard) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/50
@ -217,6 +217,11 @@ struct hlsl_reg
|
|||||||
bool allocated;
|
bool allocated;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* Types of instruction nodes for the IR.
|
||||||
|
* Each type of instruction node is associated to a struct with the same name in lower case.
|
||||||
|
* e.g. for HLSL_IR_CONSTANT there exists struct hlsl_ir_constant.
|
||||||
|
* Each one of these structs start with a struct hlsl_ir_node field, so pointers to values of these
|
||||||
|
* types can be casted seamlessly to (struct hlsl_ir_node *) and vice-versa. */
|
||||||
enum hlsl_ir_node_type
|
enum hlsl_ir_node_type
|
||||||
{
|
{
|
||||||
HLSL_IR_CONSTANT,
|
HLSL_IR_CONSTANT,
|
||||||
@ -231,12 +236,22 @@ enum hlsl_ir_node_type
|
|||||||
HLSL_IR_SWIZZLE,
|
HLSL_IR_SWIZZLE,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* Common data for every type of IR instruction node. */
|
||||||
struct hlsl_ir_node
|
struct hlsl_ir_node
|
||||||
{
|
{
|
||||||
|
/* Item entry for storing the instruction in a list of instructions. */
|
||||||
struct list entry;
|
struct list entry;
|
||||||
|
|
||||||
|
/* Type of node, which means that a pointer to this struct hlsl_ir_node can be casted to a
|
||||||
|
* pointer to the struct with the same name. */
|
||||||
enum hlsl_ir_node_type type;
|
enum hlsl_ir_node_type type;
|
||||||
|
/* HLSL data type of the node, when used by other nodes as a source (through an hlsl_src).
|
||||||
|
* HLSL_IR_CONSTANT, HLSL_IR_EXPR, HLSL_IR_LOAD, HLSL_IR_RESOURCE_LOAD, and HLSL_IR_SWIZZLE
|
||||||
|
* have a data type and can be used through an hlsl_src; other types of node don't. */
|
||||||
struct hlsl_type *data_type;
|
struct hlsl_type *data_type;
|
||||||
|
|
||||||
|
/* List containing all the struct hlsl_src·s that point to this node; linked by the
|
||||||
|
* hlsl_src.entry fields. */
|
||||||
struct list uses;
|
struct list uses;
|
||||||
|
|
||||||
struct vkd3d_shader_location loc;
|
struct vkd3d_shader_location loc;
|
||||||
@ -246,6 +261,7 @@ struct hlsl_ir_node
|
|||||||
* true even for loops, since currently we can't have a reference to a
|
* true even for loops, since currently we can't have a reference to a
|
||||||
* value generated in an earlier iteration of the loop. */
|
* value generated in an earlier iteration of the loop. */
|
||||||
unsigned int index, last_read;
|
unsigned int index, last_read;
|
||||||
|
/* Temp. register allocated to store the result of this instruction (if any). */
|
||||||
struct hlsl_reg reg;
|
struct hlsl_reg reg;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user