mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-01-28 13:05:02 -08:00
tests: Do not use global half values.
They are not allowed by the native compiler, except in compatibility mode.
This commit is contained in:
parent
54239da200
commit
90f9407b80
Notes:
Alexandre Julliard
2023-10-18 22:51:21 +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/412
@ -98,6 +98,7 @@ vkd3d_shader_tests = \
|
|||||||
tests/hlsl/gather-offset.shader_test \
|
tests/hlsl/gather-offset.shader_test \
|
||||||
tests/hlsl/gather.shader_test \
|
tests/hlsl/gather.shader_test \
|
||||||
tests/hlsl/getdimensions.shader_test \
|
tests/hlsl/getdimensions.shader_test \
|
||||||
|
tests/hlsl/half.shader_test \
|
||||||
tests/hlsl/initializer-flatten.shader_test \
|
tests/hlsl/initializer-flatten.shader_test \
|
||||||
tests/hlsl/initializer-implicit-array.shader_test \
|
tests/hlsl/initializer-implicit-array.shader_test \
|
||||||
tests/hlsl/initializer-invalid-arg-count.shader_test \
|
tests/hlsl/initializer-invalid-arg-count.shader_test \
|
||||||
|
@ -5,7 +5,7 @@ shader model >= 4.0
|
|||||||
uniform float f;
|
uniform float f;
|
||||||
uniform int i;
|
uniform int i;
|
||||||
uniform uint u;
|
uniform uint u;
|
||||||
uniform half h;
|
uniform float h;
|
||||||
|
|
||||||
float4 main() : sv_target
|
float4 main() : sv_target
|
||||||
{
|
{
|
||||||
@ -14,7 +14,7 @@ float4 main() : sv_target
|
|||||||
ret.x = asfloat(f);
|
ret.x = asfloat(f);
|
||||||
ret.y = asfloat(i);
|
ret.y = asfloat(i);
|
||||||
ret.z = asfloat(u);
|
ret.z = asfloat(u);
|
||||||
ret.w = asfloat(h);
|
ret.w = asfloat((half)h);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@ shader model >= 4.0
|
|||||||
uniform float f;
|
uniform float f;
|
||||||
uniform int i;
|
uniform int i;
|
||||||
uniform uint u;
|
uniform uint u;
|
||||||
uniform half h;
|
uniform float h;
|
||||||
|
|
||||||
float4 main() : sv_target
|
float4 main() : sv_target
|
||||||
{
|
{
|
||||||
@ -14,7 +14,7 @@ float4 main() : sv_target
|
|||||||
ret.x = asuint(f);
|
ret.x = asuint(f);
|
||||||
ret.y = asuint(i);
|
ret.y = asuint(i);
|
||||||
ret.z = asuint(u);
|
ret.z = asuint(u);
|
||||||
ret.w = asuint(h);
|
ret.w = asuint((half)h);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5,11 +5,11 @@ shader model >= 4.0
|
|||||||
uniform int i;
|
uniform int i;
|
||||||
uniform uint u;
|
uniform uint u;
|
||||||
uniform bool b;
|
uniform bool b;
|
||||||
uniform half h;
|
uniform float h;
|
||||||
|
|
||||||
float4 main() : sv_target
|
float4 main() : sv_target
|
||||||
{
|
{
|
||||||
return float4(((float)i) + 1.5, ((float)u) - 2.5, ((float)b) / 2, h);
|
return float4(((float)i) + 1.5, ((float)u) - 2.5, ((float)b) / 2, (half)h);
|
||||||
}
|
}
|
||||||
|
|
||||||
[test]
|
[test]
|
||||||
|
@ -5,7 +5,7 @@ shader model >= 4.0
|
|||||||
uniform float f;
|
uniform float f;
|
||||||
uniform uint u;
|
uniform uint u;
|
||||||
uniform bool b;
|
uniform bool b;
|
||||||
uniform half h;
|
uniform float h;
|
||||||
|
|
||||||
float4 main() : sv_target
|
float4 main() : sv_target
|
||||||
{
|
{
|
||||||
@ -14,7 +14,7 @@ float4 main() : sv_target
|
|||||||
ret.x = ((float)(int)f) - 1.5;
|
ret.x = ((float)(int)f) - 1.5;
|
||||||
ret.y = ((float)(int)u) + 2.5;
|
ret.y = ((float)(int)u) + 2.5;
|
||||||
ret.z = ((float)(int)b) / 2;
|
ret.z = ((float)(int)b) / 2;
|
||||||
ret.w = ((float)(int)h) + 3.5;
|
ret.w = ((float)(int)(half)h) + 3.5;
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@ shader model >= 4.0
|
|||||||
uniform float f;
|
uniform float f;
|
||||||
uniform int i;
|
uniform int i;
|
||||||
uniform bool b;
|
uniform bool b;
|
||||||
uniform half h;
|
uniform float h;
|
||||||
|
|
||||||
float4 main() : sv_target
|
float4 main() : sv_target
|
||||||
{
|
{
|
||||||
@ -14,7 +14,7 @@ float4 main() : sv_target
|
|||||||
ret.x = ((float)(uint)f) - 1.5;
|
ret.x = ((float)(uint)f) - 1.5;
|
||||||
ret.y = ((float)(uint)i) - 1.5;
|
ret.y = ((float)(uint)i) - 1.5;
|
||||||
ret.z = ((float)(uint)b) / 2;
|
ret.z = ((float)(uint)b) / 2;
|
||||||
ret.w = ((float)(uint)h) + 0.5;
|
ret.w = ((float)(uint)(half)h) + 0.5;
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
23
tests/hlsl/half.shader_test
Normal file
23
tests/hlsl/half.shader_test
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
[pixel shader fail(sm<6) todo]
|
||||||
|
uniform half h;
|
||||||
|
|
||||||
|
float4 main() : sv_target
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
[require]
|
||||||
|
options: backcompat
|
||||||
|
|
||||||
|
[pixel shader]
|
||||||
|
uniform half h;
|
||||||
|
|
||||||
|
float4 main() : sv_target
|
||||||
|
{
|
||||||
|
return h;
|
||||||
|
}
|
||||||
|
|
||||||
|
[test]
|
||||||
|
uniform 0 float 10.0
|
||||||
|
todo(sm>=6) draw quad
|
||||||
|
probe all rgba (10.0, 10.0, 10.0, 10.0)
|
Loading…
x
Reference in New Issue
Block a user