vkd3d-shader/hlsl: Store SM4 MOD in the vsir program.

This commit is contained in:
Francisco Casas
2024-11-06 00:58:39 -03:00
committed by Henri Verbeet
parent 30bc6965a2
commit 5df836c513
Notes: Henri Verbeet 2024-11-06 23:02:23 +01:00
Approved-by: Elizabeth Figura (@zfigura)
Approved-by: Henri Verbeet (@hverbeet)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1251
2 changed files with 13 additions and 60 deletions

View File

@@ -8436,6 +8436,18 @@ static bool sm4_generate_vsir_instr_expr(struct hlsl_ctx *ctx,
return false;
}
case HLSL_OP2_MOD:
switch (dst_type->e.numeric.type)
{
case HLSL_TYPE_UINT:
sm4_generate_vsir_expr_with_two_destinations(ctx, program, VKD3DSIH_UDIV, expr, 1);
return true;
default:
hlsl_fixme(ctx, &expr->node.loc, "SM4 %s modulus expression.", dst_type_name);
return false;
}
case HLSL_OP2_MUL:
switch (dst_type->e.numeric.type)
{
@@ -8488,6 +8500,7 @@ static bool sm4_generate_vsir_instr_expr(struct hlsl_ctx *ctx,
return true;
default:
hlsl_fixme(ctx, &expr->node.loc, "SM4 %s expression.", debug_hlsl_expr_op(expr->op));
return false;
}
}