aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/sksl/ast
diff options
context:
space:
mode:
authorGravatar Greg Daniel <egdaniel@google.com>2016-11-22 09:44:03 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2016-11-22 15:31:02 +0000
commit64773e6c9f61fb319f597a8d7dd7ee377d51a43a (patch)
treee8ceb0267585ec660844e85d2869d01cf2e3c855 /src/sksl/ast
parent71fecc32b1b4f71ef3c6467b1f5e0b55c2a12428 (diff)
Add support for input attachments in SkSL spirv
BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=5115 Change-Id: I3e03a465a10c9aff62491d0f6e71105d1b650dab Reviewed-on: https://skia-review.googlesource.com/5115 Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
Diffstat (limited to 'src/sksl/ast')
-rw-r--r--src/sksl/ast/SkSLASTLayout.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/sksl/ast/SkSLASTLayout.h b/src/sksl/ast/SkSLASTLayout.h
index cb7f3c175c..a77e8388ed 100644
--- a/src/sksl/ast/SkSLASTLayout.h
+++ b/src/sksl/ast/SkSLASTLayout.h
@@ -78,13 +78,15 @@ struct ASTLayout : public ASTNode {
}
// For int parameters, a -1 means no value
- ASTLayout(int location, int binding, int index, int set, int builtin, bool originUpperLeft,
- bool overrideCoverage, bool blendSupportAllEquations, Format format)
+ ASTLayout(int location, int binding, int index, int set, int builtin, int inputAttachmentIndex,
+ bool originUpperLeft, bool overrideCoverage, bool blendSupportAllEquations,
+ Format format)
: fLocation(location)
, fBinding(binding)
, fIndex(index)
, fSet(set)
, fBuiltin(builtin)
+ , fInputAttachmentIndex(inputAttachmentIndex)
, fOriginUpperLeft(originUpperLeft)
, fOverrideCoverage(overrideCoverage)
, fBlendSupportAllEquations(blendSupportAllEquations)
@@ -113,6 +115,10 @@ struct ASTLayout : public ASTNode {
result += separator + "builtin = " + to_string(fBuiltin);
separator = ", ";
}
+ if (fInputAttachmentIndex >= 0) {
+ result += separator + "input_attachment_index = " + to_string(fBuiltin);
+ separator = ", ";
+ }
if (fOriginUpperLeft) {
result += separator + "origin_upper_left";
separator = ", ";
@@ -140,6 +146,7 @@ struct ASTLayout : public ASTNode {
const int fIndex;
const int fSet;
const int fBuiltin;
+ const int fInputAttachmentIndex;
const bool fOriginUpperLeft;
const bool fOverrideCoverage;
const bool fBlendSupportAllEquations;