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

Unified Diff: src/sksl/ast/SkSLASTLayout.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/SkSLSPIRVCodeGenerator.cpp ('k') | src/sksl/ir/SkSLLayout.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/sksl/ast/SkSLASTLayout.h
diff --git a/src/sksl/ast/SkSLASTLayout.h b/src/sksl/ast/SkSLASTLayout.h
index a77e8388ed6901c25cb5c291d1ea02dc8b894cb0..4c36af46a15ccbe8c13d637776ea056eb8a6e223 100644
--- a/src/sksl/ast/SkSLASTLayout.h
+++ b/src/sksl/ast/SkSLASTLayout.h
@@ -80,7 +80,7 @@ struct ASTLayout : public ASTNode {
// For int parameters, a -1 means no value
ASTLayout(int location, int binding, int index, int set, int builtin, int inputAttachmentIndex,
bool originUpperLeft, bool overrideCoverage, bool blendSupportAllEquations,
- Format format)
+ Format format, bool pushConstant)
: fLocation(location)
, fBinding(binding)
, fIndex(index)
@@ -90,7 +90,8 @@ struct ASTLayout : public ASTNode {
, fOriginUpperLeft(originUpperLeft)
, fOverrideCoverage(overrideCoverage)
, fBlendSupportAllEquations(blendSupportAllEquations)
- , fFormat(format) {}
+ , fFormat(format)
+ , fPushConstant(pushConstant) {}
SkString description() const {
SkString result;
@@ -135,6 +136,10 @@ struct ASTLayout : public ASTNode {
result += separator + FormatToStr(fFormat);
separator = ", ";
}
+ if (fPushConstant) {
+ result += separator + "push_constant";
+ separator = ", ";
+ }
if (result.size() > 0) {
result = "layout (" + result + ")";
}
@@ -151,6 +156,7 @@ struct ASTLayout : public ASTNode {
const bool fOverrideCoverage;
const bool fBlendSupportAllEquations;
const Format fFormat;
+ const bool fPushConstant;
};
} // namespace
« no previous file with comments | « src/sksl/SkSLSPIRVCodeGenerator.cpp ('k') | src/sksl/ir/SkSLLayout.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698