Vulkan: Add struct sampler parsing.
Vulkan requires all uniforms to be declared in a block. Uniform
blocks can't have store samplers. Thus we can't use structs in
samplers with Vulkan GLSL.
To work around this limitation we extract samplers from structs
and move them into standalone types. The samplers are named
according to the variable and struct fields.
Arrays of structs and nested structs to come later.
Bug: angleproject:2494
Change-Id: I83a94ab082c6ce7ee68ec1290751ecee18820683
Reviewed-on: https://chromium-review.googlesource.com/1101567
Reviewed-by: Olli Etuaho <oetuaho@nvidia.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
diff --git a/src/compiler/translator/Symbol.cpp b/src/compiler/translator/Symbol.cpp
index 9b60d10..12d0ef3 100644
--- a/src/compiler/translator/Symbol.cpp
+++ b/src/compiler/translator/Symbol.cpp
@@ -84,6 +84,7 @@
unionArray(nullptr)
{
ASSERT(mType);
+ ASSERT(name.empty() || symbolType != SymbolType::Empty);
}
TStructure::TStructure(TSymbolTable *symbolTable,