On 10/7/21 13:47, Matteo Bruni wrote:
On Wed, Oct 6, 2021 at 4:45 PM Zebediah Figura zfigura@codeweavers.com wrote:
Signed-off-by: Zebediah Figura zfigura@codeweavers.com
libs/vkd3d-shader/hlsl.c | 46 ++++++++++++++ libs/vkd3d-shader/hlsl.h | 24 ++++++++ libs/vkd3d-shader/hlsl.y | 100 ++++++++++++++++++++++++++++++- libs/vkd3d-shader/hlsl_codegen.c | 14 +++++ libs/vkd3d-shader/hlsl_sm1.c | 5 ++ libs/vkd3d-shader/hlsl_sm4.c | 5 ++ 6 files changed, 193 insertions(+), 1 deletion(-)
diff --git a/libs/vkd3d-shader/hlsl.y b/libs/vkd3d-shader/xhlsl.y index 32dd418d1..3bf40563f 100644 --- a/libs/vkd3d-shader/hlsl.y +++ b/libs/vkd3d-shader/hlsl.y
@@ -1757,6 +1780,65 @@ static struct list *add_constructor(struct hlsl_ctx *ctx, struct hlsl_type *type return params->instrs; }
+static bool add_method_call(struct hlsl_ctx *ctx, struct list *instrs, struct hlsl_ir_node *object,
const char *name, const struct parse_initializer *params, struct vkd3d_shader_location loc)
We have a mix of functions taking the location by value or by pointer. I think we want to consistently pass it by pointer, going forward.
The main reason I wanted to pass it by value was to avoid the "&@" cluster, which is not particularly easy to read. I'll set that concern aside from now on, though.