From 36a999e09fbd9d03e9eb28a77a93fe99229ceaad Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Fri, 23 May 2025 21:11:04 +0200 Subject: [PATCH] vkd3d-shader/msl: Implement VKD3DSIH_ULT. --- libs/vkd3d-shader/msl.c | 1 + tests/hlsl/f32tof16.shader_test | 30 +++++++++++++++--------------- tests/hlsl/switch.shader_test | 4 ++-- 3 files changed, 18 insertions(+), 17 deletions(-) diff --git a/libs/vkd3d-shader/msl.c b/libs/vkd3d-shader/msl.c index f5472bab2..a2e218b52 100644 --- a/libs/vkd3d-shader/msl.c +++ b/libs/vkd3d-shader/msl.c @@ -1096,6 +1096,7 @@ static void msl_handle_instruction(struct msl_generator *gen, const struct vkd3d break; case VKD3DSIH_ILT: case VKD3DSIH_LTO: + case VKD3DSIH_ULT: msl_relop(gen, ins, "<"); break; case VKD3DSIH_MAD: diff --git a/tests/hlsl/f32tof16.shader_test b/tests/hlsl/f32tof16.shader_test index 141fce1b9..1e1bd69f5 100644 --- a/tests/hlsl/f32tof16.shader_test +++ b/tests/hlsl/f32tof16.shader_test @@ -15,77 +15,77 @@ uint4 main() : sv_target [test] uniform 0 float 42.0 -todo(msl) draw quad +draw quad probe (0, 0) u32(0x5140, 0x5140, 0x5140, 0x5140) % zero uniform 0 float 0.0 -todo(msl) draw quad +draw quad probe (0, 0) u32(0x0, 0x0, 0x0, 0x0) % negative zero uniform 0 uint 0x8000 -todo(msl) draw quad +draw quad probe (0, 0) rgba(-0.0, -0.0, -0.0, -0.0) % subnormal number uniform 0 float 5.9604645e-08 -todo(msl) draw quad +draw quad probe (0, 0) u32(0x1, 0x1, 0x1, 0x1) % subnormal number uniform 0 float 1.1920929e-07 -todo(msl) draw quad +draw quad probe (0, 0) u32(0x2, 0x2, 0x2, 0x2) % subnormal number uniform 0 float 2.3841858e-07 -todo(msl) draw quad +draw quad probe (0, 0) u32(0x4, 0x4, 0x4, 0x4) % subnormal number uniform 0 float 4.7683716e-07 -todo(msl) draw quad +draw quad probe (0, 0) u32(0x8, 0x8, 0x8, 0x8) % subnormal number uniform 0 float 9.536743e-07 -todo(msl) draw quad +draw quad probe (0, 0) u32(0x10, 0x10, 0x10, 0x10) % subnormal number uniform 0 float 1.9073486e-06 -todo(msl) draw quad +draw quad probe (0, 0) u32(0x20, 0x20, 0x20, 0x20) % subnormal number uniform 0 float 3.8146973e-06 -todo(msl) draw quad +draw quad probe (0, 0) u32(0x40, 0x40, 0x40, 0x40) % subnormal number uniform 0 float 7.6293945e-06 -todo(msl) draw quad +draw quad probe (0, 0) u32(0x80, 0x80, 0x80, 0x80) % subnormal number uniform 0 float 1.5258789e-05 -todo(msl) draw quad +draw quad probe (0, 0) u32(0x100, 0x100, 0x100, 0x100) % subnormal number uniform 0 float 3.0517578e-05 -todo(msl) draw quad +draw quad probe (0, 0) u32(0x200, 0x200, 0x200, 0x200) % I'd love to use rgba probes here but msvc doesn't scanf infinity :( % positive infinity uniform 0 uint 0x7f800000 -todo(msl) draw quad +draw quad probe (0, 0) u32(0x7c00, 0x7c00, 0x7c00, 0x7c00) % negative infinity uniform 0 uint 0xff800000 -todo(msl) draw quad +draw quad probe (0, 0) u32(0xfc00, 0xfc00, 0xfc00, 0xfc00) diff --git a/tests/hlsl/switch.shader_test b/tests/hlsl/switch.shader_test index c2e553743..37c0aee92 100644 --- a/tests/hlsl/switch.shader_test +++ b/tests/hlsl/switch.shader_test @@ -612,10 +612,10 @@ float4 main() : sv_target [test] uniform 0 float4 0 0 3 1 -todo(msl) draw quad +draw quad probe (0, 0) rgba (304.0, 305.0, 306.0, 307.0) uniform 0 float4 1 0 3 1 -todo(msl) draw quad +draw quad probe (0, 0) rgba (3.0, 4.0, 5.0, 6.0) [require]