diff options
author | ethannicholas <ethannicholas@google.com> | 2016-11-22 08:39:36 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-11-22 08:39:36 -0800 |
commit | 8ac838d978578c44b75a801489c985e5284dd66f (patch) | |
tree | b53cdcf94cdd49e3d7867099d0d2018a41fc1a05 /src/sksl/ir/SkSLLayout.h | |
parent | 64773e6c9f61fb319f597a8d7dd7ee377d51a43a (diff) |
added support for push_constant layout
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2187433003
Committed: https://skia.googlesource.com/skia/+/fa5f65ac61fd525029aa9dab161ffe4896c10f6d
Review-Url: https://codereview.chromium.org/2187433003
Diffstat (limited to 'src/sksl/ir/SkSLLayout.h')
-rw-r--r-- | src/sksl/ir/SkSLLayout.h | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/sksl/ir/SkSLLayout.h b/src/sksl/ir/SkSLLayout.h index c5753e010c..f433614da9 100644 --- a/src/sksl/ir/SkSLLayout.h +++ b/src/sksl/ir/SkSLLayout.h @@ -26,11 +26,12 @@ struct Layout { , fOriginUpperLeft(layout.fOriginUpperLeft) , fOverrideCoverage(layout.fOverrideCoverage) , fBlendSupportAllEquations(layout.fBlendSupportAllEquations) - , fFormat(layout.fFormat) {} + , fFormat(layout.fFormat) + , fPushConstant(layout.fPushConstant) {} Layout(int location, int binding, int index, int set, int builtin, int inputAttachmentIndex, bool originUpperLeft, bool overrideCoverage, bool blendSupportAllEquations, - ASTLayout::Format format) + ASTLayout::Format format, bool pushconstant) : fLocation(location) , fBinding(binding) , fIndex(index) @@ -40,7 +41,8 @@ struct Layout { , fOriginUpperLeft(originUpperLeft) , fOverrideCoverage(overrideCoverage) , fBlendSupportAllEquations(blendSupportAllEquations) - , fFormat(format) {} + , fFormat(format) + , fPushConstant(pushconstant) {} Layout() : fLocation(-1) @@ -52,7 +54,8 @@ struct Layout { , fOriginUpperLeft(false) , fOverrideCoverage(false) , fBlendSupportAllEquations(false) - , fFormat(ASTLayout::Format::kUnspecified) {} + , fFormat(ASTLayout::Format::kUnspecified) + , fPushConstant(false) {} SkString description() const { SkString result; @@ -97,6 +100,10 @@ struct Layout { result += separator + ASTLayout::FormatToStr(fFormat); separator = ", "; } + if (fPushConstant) { + result += separator + "push_constant"; + separator = ", "; + } if (result.size() > 0) { result = "layout (" + result + ")"; } @@ -134,6 +141,7 @@ struct Layout { bool fOverrideCoverage; bool fBlendSupportAllEquations; ASTLayout::Format fFormat; + bool fPushConstant; }; } // namespace |