tests: Add some tests for effects groups syntax.

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
This commit is contained in:
Nikolay Sivov 2023-11-02 15:26:38 +01:00 committed by Alexandre Julliard
parent 017f86aaaf
commit ffae369748
Notes: Alexandre Julliard 2024-01-11 23:13:27 +01:00
Approved-by: Giovanni Mascellani (@giomasce)
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/443
3 changed files with 120 additions and 0 deletions

View File

@ -38,6 +38,13 @@ float4 main() : sv_target
return float4(0, 0, 0, 0);
}
[pixel shader fail todo]
float4 main() : sv_target
{
float4 fxgroup = {0, 0, 0, 0};
return fxgroup;
}
[pixel shader]
typedef float4 Technique10;
typedef float4 Technique11;
@ -62,6 +69,13 @@ float4 main() : sv_target
return teChnique11;
}
[pixel shader]
float4 main() : sv_target
{
float4 fxGroup = {0, 0, 0, 0};
return fxGroup;
}
[effect todo]
technique
{
@ -103,6 +117,12 @@ tEchnique11
{
}
[effect fail]
// Empty groups are not allowed
fxgroup group
{
}
% Regular shaders with technique blocks
[vertex shader todo]
float4 main() : sv_position
@ -122,6 +142,11 @@ technique11
{
}
fxgroup group
{
technique10 {}
}
[pixel shader todo]
float4 main() : sv_target
{
@ -139,3 +164,8 @@ technique10
technique11
{
}
fxgroup group
{
technique10 {}
}

View File

@ -9,6 +9,13 @@ float4 main() : sv_target
return teChnique;
}
[pixel shader fail todo]
float4 main() : sv_target
{
float4 fxgroup = {0, 0, 0, 0};
return fxgroup;
}
[pixel shader]
float4 main() : sv_target
{
@ -23,6 +30,13 @@ float4 main() : sv_target
return teChnique11;
}
[pixel shader]
float4 main() : sv_target
{
float4 fxGroup = {0, 0, 0, 0};
return fxGroup;
}
[effect todo]
technique
{
@ -101,6 +115,11 @@ technique11
{
}
fxgroup group
{
technique10 {}
}
[pixel shader todo]
float4 main() : sv_target
{
@ -118,3 +137,8 @@ technique10
technique11
{
}
fxgroup group
{
technique10 {}
}

View File

@ -9,6 +9,13 @@ float4 main() : sv_target
return teChnique;
}
[pixel shader fail todo]
float4 main() : sv_target
{
float4 fxgroup = {0, 0, 0, 0};
return fxgroup;
}
[pixel shader]
float4 main() : sv_target
{
@ -23,6 +30,13 @@ float4 main() : sv_target
return teChnique11;
}
[pixel shader]
float4 main() : sv_target
{
float4 fxGroup = {0, 0, 0, 0};
return fxGroup;
}
[effect todo]
technique
{
@ -101,6 +115,11 @@ technique11
{
}
fxgroup group
{
technique10 {}
}
[pixel shader todo]
float4 main() : sv_target
{
@ -118,3 +137,50 @@ technique10
technique11
{
}
fxgroup group
{
technique10 {}
}
% Groups syntax
% Name has to be specified, it belongs to global scope
[effect fail]
fxgroup
{
}
% Group can't be empty
[effect fail]
fxgroup group
{
}
[effect fail]
float4 group;
fxgroup group
{
}
% Groups can only contain a list of techniques
[effect fail]
fxgroup group
{
float4 v;
technique11 {}
}
% Group provides scope for techniques
[effect todo]
fxgroup group1
{
technique11 tech0 {}
}
fxgroup group2
{
technique11 tech0 {}
}