Hi,
On 19/12/21 13:41, Nikolay Sivov wrote:
@@ -1675,7 +1687,8 @@ static bool intrinsic_pow(struct hlsl_ctx *ctx, static bool intrinsic_round(struct hlsl_ctx *ctx, const struct parse_initializer *params, const struct vkd3d_shader_location *loc) {
- return !!add_unary_arithmetic_expr(ctx, params->instrs, HLSL_OP1_ROUND, params->args[0], loc);
- struct hlsl_ir_node *arg = intrinsic_float_convert_arg(ctx, params, params->args[0], loc);
- return !!add_unary_arithmetic_expr(ctx, params->instrs, HLSL_OP1_ROUND, arg, loc); }
add_unary_arithmetic_expr() assume that the nodes it receives are not NULL, therefore you should check before passing.
Same thing for the following patches.
Giovanni.