HLSL: Fix a grammar error related to constructors in parenthetical expressions
This commit is contained in:
parent
ff13213547
commit
5964c64b2a
7 changed files with 212 additions and 34 deletions
23
Test/hlsl.init2.frag
Normal file
23
Test/hlsl.init2.frag
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
|
||||
void Test1()
|
||||
{
|
||||
struct mystruct { float2 a; };
|
||||
mystruct test1 = {
|
||||
{ 1, 2, }, // test trailing commas
|
||||
};
|
||||
|
||||
mystruct test2 = {
|
||||
{ { 1, 2, } }, // test unneeded levels
|
||||
};
|
||||
|
||||
float test3 = { 1 } ; // test scalar initialization
|
||||
}
|
||||
|
||||
struct PS_OUTPUT { float4 color : SV_Target0; };
|
||||
|
||||
PS_OUTPUT main()
|
||||
{
|
||||
PS_OUTPUT ps_output;
|
||||
ps_output.color = 1.0;
|
||||
return ps_output;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue