Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1096)

Unified Diff: src/sksl/ir/SkSLLayout.h

Issue 2187433003: added support for push_constant layout (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: rebased Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/sksl/ast/SkSLASTLayout.h ('k') | src/sksl/ir/SkSLType.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/sksl/ir/SkSLLayout.h
diff --git a/src/sksl/ir/SkSLLayout.h b/src/sksl/ir/SkSLLayout.h
index c5753e010cc0bdbba0a8335526323af852030f66..f433614da9df3bec73291382321d5d1f2ee30e4a 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
« no previous file with comments | « src/sksl/ast/SkSLASTLayout.h ('k') | src/sksl/ir/SkSLType.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698