vkd3d-shader/msl: Implement VKD3DSIH_EQO.

This commit is contained in:
Henri Verbeet
2025-05-23 09:40:12 +02:00
parent fc6249a228
commit cc33439f19
Notes: Henri Verbeet 2025-06-09 16:31:45 +02:00
Approved-by: Giovanni Mascellani (@giomasce)
Approved-by: Henri Verbeet (@hverbeet)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1547
3 changed files with 3 additions and 2 deletions

View File

@@ -957,6 +957,7 @@ static void msl_handle_instruction(struct msl_generator *gen, const struct vkd3d
case VKD3DSIH_ENDIF: case VKD3DSIH_ENDIF:
msl_end_block(gen); msl_end_block(gen);
break; break;
case VKD3DSIH_EQO:
case VKD3DSIH_IEQ: case VKD3DSIH_IEQ:
msl_relop(gen, ins, "=="); msl_relop(gen, ins, "==");
break; break;

View File

@@ -55,7 +55,7 @@ float4 main() : sv_target
[test] [test]
uniform 0 float4 0.0 1.5 1.5 0.0 uniform 0 float4 0.0 1.5 1.5 0.0
todo(msl) draw quad draw quad
% SM1-3 apparently treats '0/0' as zero. % SM1-3 apparently treats '0/0' as zero.
if(sm<4) todo probe (0,0) rgba (1010101.0, 11001100.0, 1101001.0, 11.0) if(sm<4) todo probe (0,0) rgba (1010101.0, 11001100.0, 1101001.0, 11.0)
% SM4-5 optimises away the 'not' by inverting the condition, even though this is invalid for NaN. % SM4-5 optimises away the 'not' by inverting the condition, even though this is invalid for NaN.

View File

@@ -181,7 +181,7 @@ uint4 main() : sv_target
uniform 0 float4 1.0 2.0 3.0 4.0 uniform 0 float4 1.0 2.0 3.0 4.0
uniform 4 float4 11.0 12.0 13.0 14.0 uniform 4 float4 11.0 12.0 13.0 14.0
uniform 8 float4 21.0 22.0 23.0 24.0 uniform 8 float4 21.0 22.0 23.0 24.0
todo(msl) draw quad draw quad
probe (0, 0) rgbaui(1, 1, 1, 1) probe (0, 0) rgbaui(1, 1, 1, 1)
[require] [require]