vkd3d-shader/glsl: Implement VKD3DSIH_DP4.

This commit is contained in:
Henri Verbeet 2024-05-02 01:20:45 +02:00
parent 93cd63bc93
commit b9d8b84b06
Notes: Henri Verbeet 2024-09-26 01:25:28 +02:00
Approved-by: Giovanni Mascellani (@giomasce)
Approved-by: Henri Verbeet (@hverbeet)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1113
4 changed files with 10 additions and 7 deletions

View File

@ -715,6 +715,9 @@ static void vkd3d_glsl_handle_instruction(struct vkd3d_glsl_generator *gen,
case VKD3DSIH_DP3:
shader_glsl_dot(gen, ins, vkd3d_write_mask_from_component_count(3));
break;
case VKD3DSIH_DP4:
shader_glsl_dot(gen, ins, VKD3DSP_WRITEMASK_ALL);
break;
case VKD3DSIH_FRC:
shader_glsl_intrinsic(gen, ins, "fract");
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 8 float4 9.0 10.0 11.0 12.0
uniform 12 float4 13.0 14.0 15.0 16.0
todo(glsl) draw quad
draw quad
probe (0, 0) rgba (-672.0, -672.0, -672.0, -672.0)
[pixel shader]

View File

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

View File

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