mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
vkd3d-shader/tpf: Add support for ceil().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
This commit is contained in:
parent
4284b7c522
commit
494f681bf6
Notes:
Alexandre Julliard
2023-11-08 23:02:33 +01:00
Approved-by: Giovanni Mascellani (@giomasce) Approved-by: Zebediah Figura (@zfigura) Approved-by: Francisco Casas (@fcasas) Approved-by: Henri Verbeet (@hverbeet) Approved-by: Alexandre Julliard (@julliard) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/417
@ -4931,6 +4931,11 @@ static void write_sm4_expr(const struct tpf_writer *tpf, const struct hlsl_ir_ex
|
||||
write_sm4_cast(tpf, expr);
|
||||
break;
|
||||
|
||||
case HLSL_OP1_CEIL:
|
||||
assert(type_is_float(dst_type));
|
||||
write_sm4_unary_op(tpf, VKD3D_SM4_OP_ROUND_PI, &expr->node, arg1, 0);
|
||||
break;
|
||||
|
||||
case HLSL_OP1_COS:
|
||||
assert(type_is_float(dst_type));
|
||||
write_sm4_unary_op_with_two_destinations(tpf, VKD3D_SM4_OP_SINCOS, &expr->node, 1, arg1);
|
||||
|
@ -1,14 +1,14 @@
|
||||
[pixel shader todo]
|
||||
[pixel shader]
|
||||
float4 main() : sv_target
|
||||
{
|
||||
return ceil(float4(-0.5, 6.5, 7.5, 3.4));
|
||||
}
|
||||
|
||||
[test]
|
||||
todo(sm<6) draw quad
|
||||
todo(sm<6) probe all rgba (0.0, 7.0, 8.0, 4.0) 4
|
||||
draw quad
|
||||
probe all rgba (0.0, 7.0, 8.0, 4.0) 4
|
||||
|
||||
[pixel shader todo]
|
||||
[pixel shader]
|
||||
uniform float4 u;
|
||||
|
||||
float4 main() : sv_target
|
||||
@ -18,10 +18,10 @@ float4 main() : sv_target
|
||||
|
||||
[test]
|
||||
uniform 0 float4 -0.5 6.5 7.5 3.4
|
||||
todo draw quad
|
||||
todo probe all rgba (0.0, 7.0, 8.0, 4.0) 4
|
||||
todo(sm>=6) draw quad
|
||||
probe all rgba (0.0, 7.0, 8.0, 4.0) 4
|
||||
|
||||
[pixel shader todo]
|
||||
[pixel shader]
|
||||
uniform float4 u;
|
||||
|
||||
float4 main() : sv_target
|
||||
@ -34,13 +34,13 @@ float4 main() : sv_target
|
||||
|
||||
[test]
|
||||
uniform 0 float4 -0.5 6.5 7.5 3.4
|
||||
todo draw quad
|
||||
todo probe all rgba (7.0, 8.0, 0.0, 4.0) 4
|
||||
todo(sm>=6) draw quad
|
||||
probe all rgba (7.0, 8.0, 0.0, 4.0) 4
|
||||
|
||||
[require]
|
||||
shader model >= 4.0
|
||||
|
||||
[pixel shader todo]
|
||||
[pixel shader]
|
||||
uniform int4 u;
|
||||
|
||||
float4 main() : sv_target
|
||||
@ -53,5 +53,5 @@ float4 main() : sv_target
|
||||
|
||||
[test]
|
||||
uniform 0 int4 -1 6 7 3
|
||||
todo draw quad
|
||||
todo probe all rgba (6.0, 7.0, -1.0, 3.0) 4
|
||||
todo(sm>=6) draw quad
|
||||
probe all rgba (6.0, 7.0, -1.0, 3.0) 4
|
||||
|
Loading…
Reference in New Issue
Block a user