vkd3d-shader/msl: Implement VKD3DSIH_DP4.

This commit is contained in:
Feifan He 2024-11-22 15:45:54 +08:00 committed by Henri Verbeet
parent 046e9b5286
commit 6f7ee57e29
Notes: Henri Verbeet 2024-12-03 14:57:01 +01:00
Approved-by: Henri Verbeet (@hverbeet)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1291
4 changed files with 10 additions and 7 deletions

View File

@ -543,6 +543,9 @@ static void msl_handle_instruction(struct msl_generator *gen, const struct vkd3d
case VKD3DSIH_DP3: case VKD3DSIH_DP3:
msl_dot(gen, ins, vkd3d_write_mask_from_component_count(3)); msl_dot(gen, ins, vkd3d_write_mask_from_component_count(3));
break; break;
case VKD3DSIH_DP4:
msl_dot(gen, ins, VKD3DSP_WRITEMASK_ALL);
break;
case VKD3DSIH_FRC: case VKD3DSIH_FRC:
msl_intrinsic(gen, ins, "fract"); msl_intrinsic(gen, ins, "fract");
break; break;

View File

@ -80,7 +80,7 @@ uniform 0 float4 1.0 -2.0 3.0 4.0
uniform 4 float4 5.0 6.0 -7.0 8.0 uniform 4 float4 5.0 6.0 -7.0 8.0
uniform 8 float4 9.0 10.0 11.0 12.0 uniform 8 float4 9.0 10.0 11.0 12.0
uniform 12 float4 13.0 14.0 15.0 16.0 uniform 12 float4 13.0 14.0 15.0 16.0
todo(msl) draw quad draw quad
probe (0, 0) rgba (-672.0, -672.0, -672.0, -672.0) probe (0, 0) rgba (-672.0, -672.0, -672.0, -672.0)
[pixel shader] [pixel shader]

View File

@ -10,7 +10,7 @@ float4 main() : SV_TARGET
[test] [test]
uniform 0 float4 2.0 3.0 4.0 5.0 uniform 0 float4 2.0 3.0 4.0 5.0
uniform 4 float4 10.0 11.0 12.0 13.0 uniform 4 float4 10.0 11.0 12.0 13.0
todo(msl) draw quad draw quad
probe (0, 0) rgba (166.0, 166.0, 166.0, 166.0) probe (0, 0) rgba (166.0, 166.0, 166.0, 166.0)
[pixel shader] [pixel shader]
@ -40,7 +40,7 @@ float4 main() : SV_TARGET
[test] [test]
uniform 0 float4 2.0 0.0 0.0 0.0 uniform 0 float4 2.0 0.0 0.0 0.0
uniform 4 float4 10.0 11.0 12.0 13.0 uniform 4 float4 10.0 11.0 12.0 13.0
todo(msl) draw quad draw quad
probe (0, 0) rgba (92.0, 92.0, 92.0, 92.0) probe (0, 0) rgba (92.0, 92.0, 92.0, 92.0)
[pixel shader] [pixel shader]
@ -55,7 +55,7 @@ float4 main() : SV_TARGET
[test] [test]
uniform 0 float4 10.0 11.0 12.0 13.0 uniform 0 float4 10.0 11.0 12.0 13.0
uniform 4 float4 2.0 0.0 0.0 0.0 uniform 4 float4 2.0 0.0 0.0 0.0
todo(msl) draw quad draw quad
probe (0, 0) rgba (92.0, 92.0, 92.0, 92.0) probe (0, 0) rgba (92.0, 92.0, 92.0, 92.0)
[pixel shader] [pixel shader]

View File

@ -10,7 +10,7 @@ float4 main() : sv_target
[test] [test]
uniform 0 float4 0.5 -0.1 0.2 0.3 uniform 0 float4 0.5 -0.1 0.2 0.3
uniform 4 float4 0.6 0.4 -0.3 1.0 uniform 4 float4 0.6 0.4 -0.3 1.0
todo(msl) draw quad draw quad
probe (0, 0) rgba (-0.1, -0.5, 0.5, -0.7) 4 probe (0, 0) rgba (-0.1, -0.5, 0.5, -0.7) 4
[pixel shader] [pixel shader]
@ -27,7 +27,7 @@ float4 main() : sv_target
[test] [test]
uniform 0 float4 0.5 0.0 0.0 0.0 uniform 0 float4 0.5 0.0 0.0 0.0
uniform 4 float4 0.6 0.4 -0.3 1.0 uniform 4 float4 0.6 0.4 -0.3 1.0
todo(msl) draw quad draw quad
probe (0, 0) rgba (-0.52, -0.18, 1.01, -1.2) 4 probe (0, 0) rgba (-0.52, -0.18, 1.01, -1.2) 4
[pixel shader] [pixel shader]
@ -44,7 +44,7 @@ float4 main() : sv_target
[test] [test]
uniform 0 float4 0.5 -0.1 0.2 0.3 uniform 0 float4 0.5 -0.1 0.2 0.3
uniform 4 float4 0.6 0.0 0.0 0.0 uniform 4 float4 0.6 0.0 0.0 0.0
todo(msl) draw quad draw quad
probe (0, 0) rgba (-0.148, -0.748, -0.448, -0.348) 4 probe (0, 0) rgba (-0.148, -0.748, -0.448, -0.348) 4
[pixel shader] [pixel shader]