aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/sksl/ir/SkSLLayout.h
diff options
context:
space:
mode:
authorGravatar ethannicholas <ethannicholas@google.com>2016-11-22 08:39:36 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2016-11-22 08:39:36 -0800
commit8ac838d978578c44b75a801489c985e5284dd66f (patch)
treeb53cdcf94cdd49e3d7867099d0d2018a41fc1a05 /src/sksl/ir/SkSLLayout.h
parent64773e6c9f61fb319f597a8d7dd7ee377d51a43a (diff)
added support for push_constant layout
Diffstat (limited to 'src/sksl/ir/SkSLLayout.h')
-rw-r--r--src/sksl/ir/SkSLLayout.h16
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