mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
vkd3d-shader/hlsl: Write SM4 square root instructions.
This commit is contained in:
parent
8e5aefb309
commit
5442f4236c
Notes:
Alexandre Julliard
2022-10-18 00:13:00 +02:00
Approved-by: Zebediah Figura (@zfigura) Approved-by: Henri Verbeet (@hverbeet) Approved-by: Alexandre Julliard (@julliard) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/28
@ -1685,6 +1685,11 @@ static void write_sm4_expr(struct hlsl_ctx *ctx,
|
|||||||
&expr->node, arg1, 0);
|
&expr->node, arg1, 0);
|
||||||
break;
|
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:
|
case HLSL_OP2_ADD:
|
||||||
switch (dst_type->base_type)
|
switch (dst_type->base_type)
|
||||||
{
|
{
|
||||||
|
@ -8,7 +8,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
|
||||||
todo draw quad
|
draw quad
|
||||||
probe all rgba (7.34846926, 7.34846926, 7.34846926, 7.34846926) 1
|
probe all rgba (7.34846926, 7.34846926, 7.34846926, 7.34846926) 1
|
||||||
|
|
||||||
[pixel shader]
|
[pixel shader]
|
||||||
@ -21,7 +21,7 @@ float4 main() : SV_TARGET
|
|||||||
|
|
||||||
[test]
|
[test]
|
||||||
uniform 0 float4 2.0 3.0 4.0 0.0
|
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
|
probe all rgba (5.38516474, 5.38516474, 5.38516474, 5.38516474) 1
|
||||||
|
|
||||||
[pixel shader]
|
[pixel shader]
|
||||||
@ -34,7 +34,7 @@ float4 main() : SV_TARGET
|
|||||||
|
|
||||||
[test]
|
[test]
|
||||||
uniform 0 float4 2.0 3.0 0.0 0.0
|
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
|
probe all rgba (3.60555124, 3.60555124, 3.60555124, 3.60555124) 1
|
||||||
|
|
||||||
[pixel shader]
|
[pixel shader]
|
||||||
@ -47,7 +47,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
|
||||||
todo draw quad
|
draw quad
|
||||||
probe all rgba (2.0, 2.0, 2.0, 2.0)
|
probe all rgba (2.0, 2.0, 2.0, 2.0)
|
||||||
|
|
||||||
[pixel shader]
|
[pixel shader]
|
||||||
@ -60,7 +60,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
|
||||||
todo draw quad
|
draw quad
|
||||||
probe all rgba (2.0, 2.0, 2.0, 2.0)
|
probe all rgba (2.0, 2.0, 2.0, 2.0)
|
||||||
|
|
||||||
[pixel shader fail]
|
[pixel shader fail]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user