vkd3d-shader/msl: Implement VSIR_OP_FREM.

This commit is contained in:
Henri Verbeet
2025-09-22 17:54:51 +02:00
parent 521efaeb7b
commit 6174d1af5d
Notes: Henri Verbeet 2025-09-30 17:26:19 +02:00
Approved-by: Giovanni Mascellani (@giomasce)
Approved-by: Henri Verbeet (@hverbeet)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1759
2 changed files with 9 additions and 9 deletions

View File

@@ -1543,6 +1543,9 @@ static void msl_handle_instruction(struct msl_generator *gen, const struct vkd3d
case VSIR_OP_FRC:
msl_intrinsic(gen, ins, "fract");
break;
case VSIR_OP_FREM:
msl_intrinsic(gen, ins, "fmod");
break;
case VSIR_OP_FTOI:
msl_cast(gen, ins, "int");
break;

View File

@@ -43,9 +43,8 @@ float4 main() : SV_TARGET
[test]
uniform 0 float4 42.0 5.0 0.0 0.0
todo(msl & sm>=6) draw quad
probe (0, 0) rgba (2.0, -2.0, 2.0, -2.0) 16
draw quad
probe (0, 0) f32(2.0, -2.0, 2.0, -2.0) 16
[pixel shader fail(sm<2)]
uniform float2 a;
@@ -59,9 +58,8 @@ float4 main() : SV_TARGET
[test]
uniform 0 float4 45.0 5.0 0.0 0.0
todo(msl & sm>=6) draw quad
probe (0, 0) rgba (0.0, 0.0, 0.0, 0.0)
draw quad
probe (0, 0) f32(0.0, 0.0, 0.0, 0.0)
[pixel shader fail(sm<2)]
float4 x, y;
@@ -74,9 +72,8 @@ float4 main() : sv_target
[test]
uniform 0 float4 5.0 -42.1 4.0 45.0
uniform 4 float4 15.0 -5.0 4.1 5.0
todo(msl & sm>=6) draw quad
probe (0, 0) rgba (5.0, -2.1, 4.0, 0.0) 6
draw quad
probe (0, 0) f32(5.0, -2.1, 4.0, 0.0) 6
[pixel shader notimpl(sm<2)]
uniform float2 a;