From: Francisco Casas <fcasas(a)codeweavers.com> While some of the components of vec4 immconsts may not be used, they are still written in the immconst declaration, so it is better if they are initialized as zero. --- libs/vkd3d-shader/hlsl_codegen.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libs/vkd3d-shader/hlsl_codegen.c b/libs/vkd3d-shader/hlsl_codegen.c index bfa605f4..d3676c09 100644 --- a/libs/vkd3d-shader/hlsl_codegen.c +++ b/libs/vkd3d-shader/hlsl_codegen.c @@ -2355,7 +2355,7 @@ static bool lower_round(struct hlsl_ctx *ctx, struct hlsl_ir_node *instr, void * { struct hlsl_ir_node *arg, *neg, *sum, *frc, *half, *replacement; struct hlsl_type *type = instr->data_type; - struct hlsl_constant_value half_value; + struct hlsl_constant_value half_value = {}; unsigned int i, component_count; struct hlsl_ir_expr *expr; @@ -2466,7 +2466,7 @@ static bool lower_int_division(struct hlsl_ctx *ctx, struct hlsl_ir_node *instr, { struct hlsl_ir_node *arg1, *arg2, *xor, *and, *abs1, *abs2, *div, *neg, *cast1, *cast2, *cast3, *high_bit; struct hlsl_type *type = instr->data_type, *utype; - struct hlsl_constant_value high_bit_value; + struct hlsl_constant_value high_bit_value = {}; struct hlsl_ir_expr *expr; unsigned int i; @@ -2532,7 +2532,7 @@ static bool lower_int_modulus(struct hlsl_ctx *ctx, struct hlsl_ir_node *instr, { struct hlsl_ir_node *arg1, *arg2, *and, *abs1, *abs2, *div, *neg, *cast1, *cast2, *cast3, *high_bit; struct hlsl_type *type = instr->data_type, *utype; - struct hlsl_constant_value high_bit_value; + struct hlsl_constant_value high_bit_value = {}; struct hlsl_ir_expr *expr; unsigned int i; @@ -2675,7 +2675,7 @@ static bool lower_float_modulus(struct hlsl_ctx *ctx, struct hlsl_ir_node *instr { struct hlsl_ir_node *arg1, *arg2, *mul1, *neg1, *ge, *neg2, *div, *mul2, *frc, *cond, *one, *mul3; struct hlsl_type *type = instr->data_type, *btype; - struct hlsl_constant_value one_value; + struct hlsl_constant_value one_value = {}; struct hlsl_ir_expr *expr; unsigned int i; -- GitLab https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/308