Commit bc75f36b by Shannon Woods

Fix nameless struct handling.

BUG=401296 The addition of layout qualifier handling in es3 development inadvertently broke handling of nameless structs. Change-Id: I805bab7a981d1f7f6227ae043720296fc3454662 Reviewed-on: https://chromium-review.googlesource.com/211860Reviewed-by: 's avatarZhenyao Mo <zmo@chromium.org> Tested-by: 's avatarShannon Woods <shannonwoods@chromium.org>
parent 6f4423af
...@@ -137,7 +137,12 @@ TString UniformHLSL::uniformsHeader(ShShaderOutput outputType, const ReferencedS ...@@ -137,7 +137,12 @@ TString UniformHLSL::uniformsHeader(ShShaderOutput outputType, const ReferencedS
else else
{ {
const TStructure *structure = type.getStruct(); const TStructure *structure = type.getStruct();
const TString &typeName = (structure ? QualifiedStructNameString(*structure, false, false) : TypeString(type)); // If this is a nameless struct, we need to use its full definition, rather than its (empty) name.
// TypeString() will invoke defineNameless in this case, but layout qualifiers will not be taken into
// account in this case.
// TODO: handle nameless structs with layout qualifiers.
const TString &typeName = ((structure && !structure->name().empty()) ?
QualifiedStructNameString(*structure, false, false) : TypeString(type));
const TString &registerString = TString("register(") + UniformRegisterPrefix(type) + str(registerIndex) + ")"; const TString &registerString = TString("register(") + UniformRegisterPrefix(type) + str(registerIndex) + ")";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment