vkd3d-shader/msl: Implement VSIR_OP_ASIN.

This commit is contained in:
Henri Verbeet
2025-09-22 17:33:42 +02:00
parent b2aac30430
commit d9d2a00ef3
Notes: Henri Verbeet 2025-09-30 17:26:19 +02:00
Approved-by: Giovanni Mascellani (@giomasce)
Approved-by: Henri Verbeet (@hverbeet)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1759
2 changed files with 13 additions and 11 deletions

View File

@@ -1470,6 +1470,9 @@ static void msl_handle_instruction(struct msl_generator *gen, const struct vkd3d
case VSIR_OP_AND: case VSIR_OP_AND:
msl_binop(gen, ins, "&"); msl_binop(gen, ins, "&");
break; break;
case VSIR_OP_ASIN:
msl_intrinsic(gen, ins, "asin");
break;
case VSIR_OP_BREAK: case VSIR_OP_BREAK:
msl_break(gen); msl_break(gen);
break; break;

View File

@@ -44,8 +44,8 @@ float4 main() : sv_target
[test] [test]
uniform 0 float4 -1.0 0.0 0.0 0.0 uniform 0 float4 -1.0 0.0 0.0 0.0
todo(msl & sm>=6) draw quad draw quad
probe (0, 0) rgba (-31416.0, 0.0, 0.0, 0.0) probe (0, 0) f32(-31416.0, 0.0, 0.0, 0.0)
[require] [require]
shader model < 6.0 shader model < 6.0
@@ -72,25 +72,24 @@ shader model >= 6.0
% RADV are a bit lower than these, hence the large max ulp difference. % RADV are a bit lower than these, hence the large max ulp difference.
[test] [test]
uniform 0 float4 -0.5 0.0 0.0 0.0 uniform 0 float4 -0.5 0.0 0.0 0.0
todo(msl & sm>=6) draw quad draw quad
probe (0, 0) rgba (-10472.0, 0.0, 0.0, 0.0) 4096 probe (0, 0) f32(-10472.0, 0.0, 0.0, 0.0) 4096
uniform 0 float4 0.0 0.0 0.0 0.0 uniform 0 float4 0.0 0.0 0.0 0.0
todo(msl & sm>=6) draw quad draw quad
probe (0, 0) rgba (0.0, 0.0, 0.0, 0.0) probe (0, 0) f32(0.0, 0.0, 0.0, 0.0)
uniform 0 float4 0.5 0.0 0.0 0.0 uniform 0 float4 0.5 0.0 0.0 0.0
todo(msl & sm>=6) draw quad draw quad
probe (0, 0) rgba (10472.0, 0.0, 0.0, 0.0) 4096 probe (0, 0) f32(10472.0, 0.0, 0.0, 0.0) 4096
[require] [require]
% reset requirements % reset requirements
[test] [test]
uniform 0 float4 1.0 0.0 0.0 0.0 uniform 0 float4 1.0 0.0 0.0 0.0
todo(msl & sm>=6) draw quad draw quad
probe (0, 0) rgba (31416.0, 0.0, 0.0, 0.0) probe (0, 0) f32(31416.0, 0.0, 0.0, 0.0)
[pixel shader] [pixel shader]
uniform float4 a; uniform float4 a;