diff --git a/libs/vkd3d-shader/msl.c b/libs/vkd3d-shader/msl.c index 28aa7d00..57d01a10 100644 --- a/libs/vkd3d-shader/msl.c +++ b/libs/vkd3d-shader/msl.c @@ -590,6 +590,9 @@ static void msl_handle_instruction(struct msl_generator *gen, const struct vkd3d case VKD3DSIH_ROUND_Z: msl_intrinsic(gen, ins, "trunc"); break; + case VKD3DSIH_SQRT: + msl_intrinsic(gen, ins, "sqrt"); + break; default: msl_unhandled(gen, ins); break; diff --git a/tests/hlsl/distance.shader_test b/tests/hlsl/distance.shader_test index bc26d199..7f6924a1 100644 --- a/tests/hlsl/distance.shader_test +++ b/tests/hlsl/distance.shader_test @@ -10,7 +10,7 @@ float4 main() : sv_target [test] uniform 0 float4 -2.0 3.0 4.0 0.1 uniform 4 float4 2.0 -1.0 4.0 5.0 -todo(msl) draw quad +draw quad probe (0, 0) rgba (7.483983, 7.483983, 7.483983, 7.483983) 1 [pixel shader] diff --git a/tests/hlsl/length.shader_test b/tests/hlsl/length.shader_test index dad94971..58b051cc 100644 --- a/tests/hlsl/length.shader_test +++ b/tests/hlsl/length.shader_test @@ -8,7 +8,7 @@ float4 main() : SV_TARGET [test] uniform 0 float4 2.0 3.0 4.0 5.0 -todo(msl) draw quad +draw quad probe (0, 0) rgba (7.34846926, 7.34846926, 7.34846926, 7.34846926) 1 [pixel shader] @@ -21,7 +21,7 @@ float4 main() : SV_TARGET [test] uniform 0 float4 2.0 3.0 4.0 0.0 -todo(msl) draw quad +draw quad probe (0, 0) rgba (5.38516474, 5.38516474, 5.38516474, 5.38516474) 1 [pixel shader] @@ -34,7 +34,7 @@ float4 main() : SV_TARGET [test] uniform 0 float4 2.0 3.0 0.0 0.0 -todo(sm<4 | msl) draw quad +todo(sm<4) draw quad probe (0, 0) rgba (3.60555124, 3.60555124, 3.60555124, 3.60555124) 1 [pixel shader] @@ -47,7 +47,7 @@ float4 main() : SV_TARGET [test] uniform 0 float4 2.0 0.0 0.0 0.0 -todo(msl) draw quad +draw quad probe (0, 0) rgba (2.0, 2.0, 2.0, 2.0) [pixel shader] @@ -60,7 +60,7 @@ float4 main() : SV_TARGET [test] uniform 0 float4 2.0 0.0 0.0 0.0 -todo(msl) draw quad +draw quad probe (0, 0) rgba (2.0, 2.0, 2.0, 2.0) [pixel shader fail] diff --git a/tests/hlsl/refract.shader_test b/tests/hlsl/refract.shader_test index 7ebc3d77..0b6c34cd 100644 --- a/tests/hlsl/refract.shader_test +++ b/tests/hlsl/refract.shader_test @@ -12,10 +12,10 @@ float4 main() : sv_target uniform 0 float4 0.5 -0.1 0.2 0.3 uniform 4 float4 0.6 0.4 -0.3 1.0 uniform 8 float 0.2 -todo(msl) draw quad +draw quad probe (0, 0) rgba (-0.550931, -0.453954, 0.3654653, -1.0248856) 32 uniform 8 float 100.0 -todo(msl) draw quad +draw quad probe (0, 0) rgba (0.0, 0.0, 0.0, 0.0) [pixel shader] @@ -34,10 +34,10 @@ float4 main() : sv_target uniform 0 float4 0.5 -0.1 0.2 0.3 uniform 4 float4 0.6 0.4 -0.3 1.0 uniform 8 float 0.2 -todo(sm<4 | msl) draw quad +todo(sm<4) draw quad probe (0, 0) rgba (-0.519904912, -0.4332699, 0.0, 0.0) 32 uniform 8 float 100.0 -todo(sm<4 | msl) draw quad +todo(sm<4) draw quad probe (0, 0) rgba (0.0, 0.0, 0.0, 0.0) [pixel shader] @@ -55,10 +55,10 @@ float4 main() : sv_target uniform 0 float4 0.5 -0.1 0.2 0.3 uniform 4 float4 0.6 0.4 -0.3 1.0 uniform 8 float 0.2 -todo(sm<4 | msl) draw quad +todo(sm<4) draw quad probe (0, 0) rgba (-0.519904912, -0.4332699, 0.0, 0.0) 32 uniform 8 float 100.0 -todo(sm<4 | msl) draw quad +todo(sm<4) draw quad probe (0, 0) rgba (0.0, 0.0, 0.0, 0.0) [pixel shader] @@ -76,10 +76,10 @@ float4 main() : sv_target uniform 0 float4 0.5 -0.1 0.2 0.3 uniform 4 float4 0.6 0.4 -0.3 1.0 uniform 8 float 0.2 -todo(sm<4 | msl) draw quad +todo(sm<4) draw quad probe (0, 0) rgba (-0.519904912, -0.4332699, 0.0, 0.0) 32 uniform 8 float 100.0 -todo(sm<4 | msl) draw quad +todo(sm<4) draw quad probe (0, 0) rgba (0.0, 0.0, 0.0, 0.0) [pixel shader] @@ -98,10 +98,10 @@ float4 main() : sv_target uniform 0 float4 0.5 -0.1 0.2 0.3 uniform 4 float4 0.6 0.4 -0.3 1.0 uniform 8 float 0.2 -todo(msl) draw quad +draw quad probe (0, 0) rgba (-0.524978, 0.0, 0.0, 0.0) 32 uniform 8 float 100.0 -todo(msl) draw quad +draw quad probe (0, 0) rgba (0.0, 0.0, 0.0, 0.0) [pixel shader] @@ -118,10 +118,10 @@ float4 main() : sv_target uniform 0 float4 0.5 -0.1 0.2 0.3 uniform 4 float4 0.6 0.4 -0.3 1.0 uniform 8 float 0.2 -todo(msl) draw quad +draw quad probe (0, 0) rgba (-0.5562381, -0.6762381, -0.6162381, -0.5962381) 32 uniform 8 float 100.0 -todo(msl) draw quad +draw quad probe (0, 0) rgba (0.0, 0.0, 0.0, 0.0) [pixel shader fail(sm>=6)] @@ -138,10 +138,10 @@ float4 main() : sv_target uniform 0 float4 0.5 -0.1 0.2 0.3 uniform 4 float4 0.6 0.4 -0.3 1.0 uniform 8 float4 0.2 0.3 0.4 0.5 -if(sm<6) todo(msl) draw quad +if(sm<6) draw quad if(sm<6) probe (0,0) rgba (-0.550931, -0.453954, 0.3654653, -1.0248856) 32 uniform 8 float 100.0 -if(sm<6) todo(msl) draw quad +if(sm<6) draw quad if(sm<6) probe (0,0) rgba (0.0, 0.0, 0.0, 0.0) [pixel shader fail] diff --git a/tests/hlsl/sqrt.shader_test b/tests/hlsl/sqrt.shader_test index 896c493b..7a2b84d5 100644 --- a/tests/hlsl/sqrt.shader_test +++ b/tests/hlsl/sqrt.shader_test @@ -8,7 +8,7 @@ float4 main() : sv_target [test] uniform 0 float4 1.0 9.0 32.3 46.5 -todo(msl) draw quad +draw quad probe (0, 0) rgba (1.0, 3.0, 5.683309, 6.819091) 1 [pixel shader]