mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-01-28 13:05:02 -08:00
tests: Adjust array-size-expr.shader_test to pass with 1.x.
Pixel shader 1.x constants must be between -1 and 1, or they will be clamped, even constants defined in the shader. Also mark 1.x-specific features if any.
This commit is contained in:
parent
e5ec52d63b
commit
e805fe3e36
Notes:
Henri Verbeet
2025-01-22 15:03:30 +01:00
Approved-by: Giovanni Mascellani (@giomasce) Approved-by: Henri Verbeet (@hverbeet) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1324
@ -1,11 +1,11 @@
|
|||||||
[pixel shader]
|
[pixel shader]
|
||||||
static const float4 array_st[(2 + 1) * 2] = {
|
static const float4 array_st[(2 + 1) * 2] = {
|
||||||
11, 12, 13, 14,
|
.11, .12, .13, .14,
|
||||||
21, 22, 23, 24,
|
.21, .22, .23, .24,
|
||||||
31, 32, 33, 34,
|
.31, .32, .33, .34,
|
||||||
41, 42, 43, 44,
|
.41, .42, .43, .44,
|
||||||
51, 52, 53, 54,
|
.51, .52, .53, .54,
|
||||||
61, 62, 63, 64,
|
.61, .62, .63, .64,
|
||||||
};
|
};
|
||||||
|
|
||||||
float4 main() : SV_TARGET
|
float4 main() : SV_TARGET
|
||||||
@ -15,19 +15,19 @@ float4 main() : SV_TARGET
|
|||||||
|
|
||||||
[test]
|
[test]
|
||||||
draw quad
|
draw quad
|
||||||
probe (0, 0) rgba (21, 22, 23, 24)
|
probe (0, 0) rgba (.21, .22, .23, .24)
|
||||||
|
|
||||||
|
|
||||||
[pixel shader]
|
[pixel shader]
|
||||||
static const float4 array_st[2*2][1+1] = {
|
static const float4 array_st[2*2][1+1] = {
|
||||||
11, 12, 13, 14,
|
.11, .12, .13, .14,
|
||||||
21, 22, 23, 24,
|
.21, .22, .23, .24,
|
||||||
31, 32, 33, 34,
|
.31, .32, .33, .34,
|
||||||
41, 42, 43, 44,
|
.41, .42, .43, .44,
|
||||||
51, 52, 53, 54,
|
.51, .52, .53, .54,
|
||||||
61, 62, 63, 64,
|
.61, .62, .63, .64,
|
||||||
71, 72, 73, 74,
|
.71, .72, .73, .74,
|
||||||
81, 82, 83, 84,
|
.81, .82, .83, .84,
|
||||||
};
|
};
|
||||||
|
|
||||||
float4 main() : SV_TARGET
|
float4 main() : SV_TARGET
|
||||||
@ -37,11 +37,11 @@ float4 main() : SV_TARGET
|
|||||||
|
|
||||||
[test]
|
[test]
|
||||||
draw quad
|
draw quad
|
||||||
probe (0, 0) rgba (61, 62, 63, 64)
|
probe (0, 0) rgba (.61, .62, .63, .64)
|
||||||
|
|
||||||
[pixel shader]
|
[pixel shader]
|
||||||
static const int size = 8;
|
static const int size = 8;
|
||||||
static const float array[size] = {1, 2, 3, 4, 5, 6, 7, 8};
|
static const float array[size] = {.1, .2, .3, .4, .5, .6, .7, .8};
|
||||||
|
|
||||||
float4 main() : sv_target
|
float4 main() : sv_target
|
||||||
{
|
{
|
||||||
@ -50,13 +50,13 @@ float4 main() : sv_target
|
|||||||
|
|
||||||
[test]
|
[test]
|
||||||
draw quad
|
draw quad
|
||||||
probe (0, 0) rgba (2, 3, 6, 1)
|
probe (0, 0) rgba (.2, .3, .6, .1)
|
||||||
|
|
||||||
% Additional level of indirection
|
% Additional level of indirection
|
||||||
[pixel shader fail(sm>=6)]
|
[pixel shader fail(sm>=6)]
|
||||||
static const float array[8] = {1, 2, 3, 4, 5, 6, 7, 8};
|
static const float array[8] = {.1, .2, 3, .4, .5, .6, .7, .8};
|
||||||
static const int idx = 2;
|
static const int idx = 2;
|
||||||
static const float array2[array[idx]] = {1, 2, 3};
|
static const float array2[array[idx]] = {1, 2, .3};
|
||||||
|
|
||||||
float4 main() : sv_target
|
float4 main() : sv_target
|
||||||
{
|
{
|
||||||
@ -65,7 +65,7 @@ float4 main() : sv_target
|
|||||||
|
|
||||||
[test]
|
[test]
|
||||||
draw quad
|
draw quad
|
||||||
probe (0, 0) rgba (2, 3, 6, 1)
|
probe (0, 0) rgba (.2, .3, .6, .1)
|
||||||
|
|
||||||
|
|
||||||
[pixel shader fail(sm>=6)]
|
[pixel shader fail(sm>=6)]
|
||||||
@ -87,6 +87,6 @@ uniform 0 float 0.0
|
|||||||
uniform 4 float 0.0
|
uniform 4 float 0.0
|
||||||
uniform 8 float 0.0
|
uniform 8 float 0.0
|
||||||
uniform 12 float 0.0
|
uniform 12 float 0.0
|
||||||
uniform 16 float 42.0
|
uniform 16 float 0.42
|
||||||
draw quad
|
draw quad
|
||||||
probe (0, 0) rgba (42, 42, 42, 42)
|
probe (0, 0) rgba (0.42, 0.42, 0.42, 0.42)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user