diff --git a/libs/vkd3d-shader/msl.c b/libs/vkd3d-shader/msl.c index 61e943ff..04914e4a 100644 --- a/libs/vkd3d-shader/msl.c +++ b/libs/vkd3d-shader/msl.c @@ -648,6 +648,9 @@ static void msl_handle_instruction(struct msl_generator *gen, const struct vkd3d case VKD3DSIH_LTO: msl_relop(gen, ins, "<"); break; + case VKD3DSIH_MAD: + msl_intrinsic(gen, ins, "fma"); + break; case VKD3DSIH_MAX: msl_intrinsic(gen, ins, "max"); break; diff --git a/tests/hlsl/arithmetic-float-uniform.shader_test b/tests/hlsl/arithmetic-float-uniform.shader_test index f63a6a9c..b2741dd9 100644 --- a/tests/hlsl/arithmetic-float-uniform.shader_test +++ b/tests/hlsl/arithmetic-float-uniform.shader_test @@ -103,7 +103,7 @@ float4 main() : sv_target uniform 0 float4 1.00000007 -42.1 4.0 45.0 uniform 4 float4 1.625 -5.0 4.125 5.0 uniform 8 float4 1.00000007 -1.0 0.5 -0.5 -todo(msl) draw quad +draw quad probe (0, 0) rgba (2.62500024, 209.5, 17.0, 224.5) 1 % precise mad() is not allowed to fuse, even though unfused is less precise. @@ -120,7 +120,7 @@ float4 main() : sv_target uniform 0 float4 1.00000007 -42.1 4.0 45.0 uniform 4 float4 1.625 -5.0 4.125 5.0 uniform 8 float4 1.00000007 -1.0 0.5 -0.5 -todo(msl) draw quad +draw quad probe (0, 0) rgba (2.62500048, 209.5, 17.0, 224.5) 1 [require]