vkd3d-shader/msl: Implement VKD3DSIH_ULT.

This commit is contained in:
Henri Verbeet
2025-05-23 21:11:04 +02:00
parent 6a159a5565
commit 36a999e09f
Notes: Henri Verbeet 2025-06-11 20:37:50 +02:00
Approved-by: Giovanni Mascellani (@giomasce)
Approved-by: Henri Verbeet (@hverbeet)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1560
3 changed files with 18 additions and 17 deletions

View File

@@ -1096,6 +1096,7 @@ static void msl_handle_instruction(struct msl_generator *gen, const struct vkd3d
break; break;
case VKD3DSIH_ILT: case VKD3DSIH_ILT:
case VKD3DSIH_LTO: case VKD3DSIH_LTO:
case VKD3DSIH_ULT:
msl_relop(gen, ins, "<"); msl_relop(gen, ins, "<");
break; break;
case VKD3DSIH_MAD: case VKD3DSIH_MAD:

View File

@@ -15,77 +15,77 @@ uint4 main() : sv_target
[test] [test]
uniform 0 float 42.0 uniform 0 float 42.0
todo(msl) draw quad draw quad
probe (0, 0) u32(0x5140, 0x5140, 0x5140, 0x5140) probe (0, 0) u32(0x5140, 0x5140, 0x5140, 0x5140)
% zero % zero
uniform 0 float 0.0 uniform 0 float 0.0
todo(msl) draw quad draw quad
probe (0, 0) u32(0x0, 0x0, 0x0, 0x0) probe (0, 0) u32(0x0, 0x0, 0x0, 0x0)
% negative zero % negative zero
uniform 0 uint 0x8000 uniform 0 uint 0x8000
todo(msl) draw quad draw quad
probe (0, 0) rgba(-0.0, -0.0, -0.0, -0.0) probe (0, 0) rgba(-0.0, -0.0, -0.0, -0.0)
% subnormal number % subnormal number
uniform 0 float 5.9604645e-08 uniform 0 float 5.9604645e-08
todo(msl) draw quad draw quad
probe (0, 0) u32(0x1, 0x1, 0x1, 0x1) probe (0, 0) u32(0x1, 0x1, 0x1, 0x1)
% subnormal number % subnormal number
uniform 0 float 1.1920929e-07 uniform 0 float 1.1920929e-07
todo(msl) draw quad draw quad
probe (0, 0) u32(0x2, 0x2, 0x2, 0x2) probe (0, 0) u32(0x2, 0x2, 0x2, 0x2)
% subnormal number % subnormal number
uniform 0 float 2.3841858e-07 uniform 0 float 2.3841858e-07
todo(msl) draw quad draw quad
probe (0, 0) u32(0x4, 0x4, 0x4, 0x4) probe (0, 0) u32(0x4, 0x4, 0x4, 0x4)
% subnormal number % subnormal number
uniform 0 float 4.7683716e-07 uniform 0 float 4.7683716e-07
todo(msl) draw quad draw quad
probe (0, 0) u32(0x8, 0x8, 0x8, 0x8) probe (0, 0) u32(0x8, 0x8, 0x8, 0x8)
% subnormal number % subnormal number
uniform 0 float 9.536743e-07 uniform 0 float 9.536743e-07
todo(msl) draw quad draw quad
probe (0, 0) u32(0x10, 0x10, 0x10, 0x10) probe (0, 0) u32(0x10, 0x10, 0x10, 0x10)
% subnormal number % subnormal number
uniform 0 float 1.9073486e-06 uniform 0 float 1.9073486e-06
todo(msl) draw quad draw quad
probe (0, 0) u32(0x20, 0x20, 0x20, 0x20) probe (0, 0) u32(0x20, 0x20, 0x20, 0x20)
% subnormal number % subnormal number
uniform 0 float 3.8146973e-06 uniform 0 float 3.8146973e-06
todo(msl) draw quad draw quad
probe (0, 0) u32(0x40, 0x40, 0x40, 0x40) probe (0, 0) u32(0x40, 0x40, 0x40, 0x40)
% subnormal number % subnormal number
uniform 0 float 7.6293945e-06 uniform 0 float 7.6293945e-06
todo(msl) draw quad draw quad
probe (0, 0) u32(0x80, 0x80, 0x80, 0x80) probe (0, 0) u32(0x80, 0x80, 0x80, 0x80)
% subnormal number % subnormal number
uniform 0 float 1.5258789e-05 uniform 0 float 1.5258789e-05
todo(msl) draw quad draw quad
probe (0, 0) u32(0x100, 0x100, 0x100, 0x100) probe (0, 0) u32(0x100, 0x100, 0x100, 0x100)
% subnormal number % subnormal number
uniform 0 float 3.0517578e-05 uniform 0 float 3.0517578e-05
todo(msl) draw quad draw quad
probe (0, 0) u32(0x200, 0x200, 0x200, 0x200) probe (0, 0) u32(0x200, 0x200, 0x200, 0x200)
% I'd love to use rgba probes here but msvc doesn't scanf infinity :( % I'd love to use rgba probes here but msvc doesn't scanf infinity :(
% positive infinity % positive infinity
uniform 0 uint 0x7f800000 uniform 0 uint 0x7f800000
todo(msl) draw quad draw quad
probe (0, 0) u32(0x7c00, 0x7c00, 0x7c00, 0x7c00) probe (0, 0) u32(0x7c00, 0x7c00, 0x7c00, 0x7c00)
% negative infinity % negative infinity
uniform 0 uint 0xff800000 uniform 0 uint 0xff800000
todo(msl) draw quad draw quad
probe (0, 0) u32(0xfc00, 0xfc00, 0xfc00, 0xfc00) probe (0, 0) u32(0xfc00, 0xfc00, 0xfc00, 0xfc00)

View File

@@ -612,10 +612,10 @@ float4 main() : sv_target
[test] [test]
uniform 0 float4 0 0 3 1 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) probe (0, 0) rgba (304.0, 305.0, 306.0, 307.0)
uniform 0 float4 1 0 3 1 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) probe (0, 0) rgba (3.0, 4.0, 5.0, 6.0)
[require] [require]