Skip to content
Snippets Groups Projects
Commit 5442f423 authored by Giovanni Mascellani's avatar Giovanni Mascellani Committed by Alexandre Julliard
Browse files

vkd3d-shader/hlsl: Write SM4 square root instructions.

parent 8e5aefb3
No related branches found
No related tags found
1 merge request!28Support length(), int division and int absolute value.
......@@ -1685,6 +1685,11 @@ static void write_sm4_expr(struct hlsl_ctx *ctx,
&expr->node, arg1, 0);
break;
case HLSL_OP1_SQRT:
assert(type_is_float(dst_type));
write_sm4_unary_op(buffer, VKD3D_SM4_OP_SQRT, &expr->node, arg1, 0);
break;
case HLSL_OP2_ADD:
switch (dst_type->base_type)
{
......
......@@ -8,7 +8,7 @@ float4 main() : SV_TARGET
[test]
uniform 0 float4 2.0 3.0 4.0 5.0
todo draw quad
draw quad
probe all rgba (7.34846926, 7.34846926, 7.34846926, 7.34846926) 1
[pixel shader]
......@@ -21,7 +21,7 @@ float4 main() : SV_TARGET
[test]
uniform 0 float4 2.0 3.0 4.0 0.0
todo draw quad
draw quad
probe all rgba (5.38516474, 5.38516474, 5.38516474, 5.38516474) 1
[pixel shader]
......@@ -34,7 +34,7 @@ float4 main() : SV_TARGET
[test]
uniform 0 float4 2.0 3.0 0.0 0.0
todo draw quad
draw quad
probe all rgba (3.60555124, 3.60555124, 3.60555124, 3.60555124) 1
[pixel shader]
......@@ -47,7 +47,7 @@ float4 main() : SV_TARGET
[test]
uniform 0 float4 2.0 0.0 0.0 0.0
todo draw quad
draw quad
probe all rgba (2.0, 2.0, 2.0, 2.0)
[pixel shader]
......@@ -60,7 +60,7 @@ float4 main() : SV_TARGET
[test]
uniform 0 float4 2.0 0.0 0.0 0.0
todo draw quad
draw quad
probe all rgba (2.0, 2.0, 2.0, 2.0)
[pixel shader fail]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment