vkd3d-shader/hlsl: Declare vars individually when parsing struct declarations.

A struct declaration with variables is now absorbed into the 'declaration'
rule, like any other variable declaration.

A struct declaration without variables is now reduced to the
'struct_declaration_without_vars' rule.

They both are reduced to a 'declaration_statement' in the end.
This commit is contained in:
Francisco Casas
2023-06-26 15:47:56 -04:00
committed by Alexandre Julliard
parent 62c891b796
commit 01800942a9
Notes: Alexandre Julliard 2023-07-04 23:25:04 +02: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/250
2 changed files with 31 additions and 52 deletions

View File

@@ -20,7 +20,7 @@ float4 main() : sv_target
}
[pixel shader todo]
[pixel shader]
float4 main() : sv_target
{
struct apple {
@@ -32,11 +32,11 @@ float4 main() : sv_target
}
[test]
todo draw quad
draw quad
probe all rgba (7.2, 8.0, 7.2, 8.0)
[pixel shader todo]
[pixel shader]
float4 main() : sv_target
{
struct apple {
@@ -48,5 +48,5 @@ float4 main() : sv_target
}
[test]
todo draw quad
draw quad
probe all rgba (5.2, 9.0, 5.2, 9.0)