Re: [PATCH v2 0/7] MR739: vkd3d-shader/hlsl: Parse state blocks, part 1.
Nikolay Sivov (@nsivov) commented about libs/vkd3d-shader/hlsl.h:
+ /* Whether the lhs in an assignment is an array and, in that case, its size. */ + bool lhs_is_array; + unsigned int lhs_array_size; + + /* For assignments, instructions present in the rhs. For function calls, instructions present + * in the function arguments. */ + struct hlsl_block *instrs; + + /* For assignments, arguments of the rhs initializer. For function calls, the function + * arguments. */ + struct hlsl_ir_node **args; + unsigned int args_count; + + /* For assignments, whether the rhs is wrapped in braces or not. */ + bool rhs_braces; +}; My concern, just by looking at it, is about how hard would it be to extract relevant cases from instructions. Is it easy to tell already that we got a constant load, array variable load with constant index, array variable load with variable index, or more complicated expression? Those are important to distinguish, because they are encoded differently.
-- https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/739#note_65840
participants (1)
-
Nikolay Sivov (@nsivov)