Front-ends GLSL/HLSL: Fix initializer lists for structs of one member.
Single member structs initialized with an initializer list had an incorrect argument for constructor emulation.
This commit is contained in:
parent
96e9f47cbb
commit
ff13213547
8 changed files with 567 additions and 331 deletions
|
|
@ -2,5 +2,5 @@
|
|||
// For the version, it uses the latest git tag followed by the number of commits.
|
||||
// For the date, it uses the current date (when then script is run).
|
||||
|
||||
#define GLSLANG_REVISION "SPIRV99.1365"
|
||||
#define GLSLANG_REVISION "SPIRV99.1367"
|
||||
#define GLSLANG_DATE "29-Jul-2016"
|
||||
|
|
|
|||
|
|
@ -5145,8 +5145,14 @@ TIntermTyped* TParseContext::convertInitializerList(const TSourceLoc& loc, const
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
// now that the subtree is processed, process this node
|
||||
return addConstructor(loc, initList, type);
|
||||
// Now that the subtree is processed, process this node as if the
|
||||
// initializer list is a set of arguments to a constructor.
|
||||
TIntermNode* emulatedConstructorArguments;
|
||||
if (initList->getSequence().size() == 1)
|
||||
emulatedConstructorArguments = initList->getSequence()[0];
|
||||
else
|
||||
emulatedConstructorArguments = initList;
|
||||
return addConstructor(loc, emulatedConstructorArguments, type);
|
||||
}
|
||||
|
||||
//
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue