mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
vkd3d-shader/hlsl: Cast round() input to float.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com> Signed-off-by: Zebediah Figura <zfigura@codeweavers.com> Signed-off-by: Matteo Bruni <mbruni@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
committed by
Alexandre Julliard
parent
7710f5deaf
commit
22d8b0a033
@@ -24,3 +24,16 @@ float4 main(uniform float4 u) : sv_target
|
||||
uniform 0 float4 -0.5 6.5 7.5 3.4
|
||||
draw quad
|
||||
probe all rgba (6.0, 8.0, 0.0, 3.0) 4
|
||||
|
||||
|
||||
|
||||
[pixel shader]
|
||||
float4 main(uniform int4 u) : sv_target
|
||||
{
|
||||
return round(u);
|
||||
}
|
||||
|
||||
[test]
|
||||
uniform 0 int4 -1 0 2 10
|
||||
draw quad
|
||||
probe all rgba (-1.0, 0.0, 2.0, 10.0) 4
|
||||
|
@@ -368,6 +368,14 @@ static void parse_test_directive(struct shader_context *context, const char *lin
|
||||
fatal_error("Malformed float constant '%s'.\n", line);
|
||||
set_uniforms(context, offset, 1, &f);
|
||||
}
|
||||
else if (match_string(line, "int4", &line))
|
||||
{
|
||||
int v[4];
|
||||
|
||||
if (sscanf(line, "%d %d %d %d", &v[0], &v[1], &v[2], &v[3]) < 4)
|
||||
fatal_error("Malformed int4 constant '%s'.\n", line);
|
||||
set_uniforms(context, offset, 4, v);
|
||||
}
|
||||
else if (match_string(line, "int", &line))
|
||||
{
|
||||
int i;
|
||||
|
Reference in New Issue
Block a user