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

vkd3d-shader/hlsl: Write SM4 rsq instructions.

parent d600f048
No related branches found
No related tags found
1 merge request!23Use our compiler to build shaders in demos.
......@@ -1669,6 +1669,11 @@ static void write_sm4_expr(struct hlsl_ctx *ctx,
write_sm4_unary_op(buffer, VKD3D_SM4_OP_ROUND_NE, &expr->node, arg1, 0);
break;
case HLSL_OP1_RSQ:
assert(type_is_float(dst_type));
write_sm4_unary_op(buffer, VKD3D_SM4_OP_RSQ, &expr->node, arg1, 0);
break;
case HLSL_OP1_SAT:
assert(type_is_float(dst_type));
write_sm4_unary_op(buffer, VKD3D_SM4_OP_MOV
......
......@@ -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 (0.272165537, 0.408248305, 0.544331074, 0.680413842) 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 (0.371390700, 0.557086051, 0.742781401, 0.0) 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 (0.554700196, 0.832050323, 0.0, 0.0) 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 (1.0, 1.0, 1.0, 1.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 (1.0, 1.0, 1.0, 1.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