diff options
author | Brian Salomon <bsalomon@google.com> | 2016-11-16 12:06:01 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2016-11-16 19:31:11 +0000 |
commit | 2a51de82ceb6790f329b9f4cc85e61f34fc2d0d4 (patch) | |
tree | 90fe38a87ff97476dea77d88c1583350a8980e12 /src/sksl/ir | |
parent | 50500ad470af3d82c68144fec7e55c9cdffb5d98 (diff) |
Revert "Revert "Add support for image load to SkSL""
This reverts commit cb115bdeed5898ded3fdbe572a14616cff809b7c.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4900
Change-Id: Ibcb381bae83d0cfc1a1226be90792061d401426a
Reviewed-on: https://skia-review.googlesource.com/4900
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/sksl/ir')
-rw-r--r-- | src/sksl/ir/SkSLLayout.h | 27 |
1 files changed, 23 insertions, 4 deletions
diff --git a/src/sksl/ir/SkSLLayout.h b/src/sksl/ir/SkSLLayout.h index 24087d0612..4cfd1a2771 100644 --- a/src/sksl/ir/SkSLLayout.h +++ b/src/sksl/ir/SkSLLayout.h @@ -24,10 +24,11 @@ struct Layout { , fBuiltin(layout.fBuiltin) , fOriginUpperLeft(layout.fOriginUpperLeft) , fOverrideCoverage(layout.fOverrideCoverage) - , fBlendSupportAllEquations(layout.fBlendSupportAllEquations) {} + , fBlendSupportAllEquations(layout.fBlendSupportAllEquations) + , fFormat(layout.fFormat) {} Layout(int location, int binding, int index, int set, int builtin, bool originUpperLeft, - bool overrideCoverage, bool blendSupportAllEquations) + bool overrideCoverage, bool blendSupportAllEquations, ASTLayout::Format format) : fLocation(location) , fBinding(binding) , fIndex(index) @@ -35,7 +36,19 @@ struct Layout { , fBuiltin(builtin) , fOriginUpperLeft(originUpperLeft) , fOverrideCoverage(overrideCoverage) - , fBlendSupportAllEquations(blendSupportAllEquations) {} + , fBlendSupportAllEquations(blendSupportAllEquations) + , fFormat(format) {} + + Layout() + : fLocation(-1) + , fBinding(-1) + , fIndex(-1) + , fSet(-1) + , fBuiltin(-1) + , fOriginUpperLeft(false) + , fOverrideCoverage(false) + , fBlendSupportAllEquations(false) + , fFormat(ASTLayout::Format::kUnspecified) {} std::string description() const { std::string result; @@ -72,6 +85,10 @@ struct Layout { result += separator + "blend_support_all_equations"; separator = ", "; } + if (ASTLayout::Format::kUnspecified != fFormat) { + result += separator + ASTLayout::FormatToStr(fFormat); + separator = ", "; + } if (result.length() > 0) { result = "layout (" + result + ")"; } @@ -86,7 +103,8 @@ struct Layout { fBuiltin == other.fBuiltin && fOriginUpperLeft == other.fOriginUpperLeft && fOverrideCoverage == other.fOverrideCoverage && - fBlendSupportAllEquations == other.fBlendSupportAllEquations; + fBlendSupportAllEquations == other.fBlendSupportAllEquations && + fFormat == other.fFormat; } bool operator!=(const Layout& other) const { @@ -103,6 +121,7 @@ struct Layout { bool fOriginUpperLeft; bool fOverrideCoverage; bool fBlendSupportAllEquations; + ASTLayout::Format fFormat; }; } // namespace |