aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/sksl/ast
diff options
context:
space:
mode:
authorGravatar Stan Iliev <stani@google.com>2016-11-16 15:25:42 +0000
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2016-11-16 15:25:57 +0000
commitcb115bdeed5898ded3fdbe572a14616cff809b7c (patch)
tree7402c43ca87f7ad7edf64f5ed0a02de28a242259 /src/sksl/ast
parentcfcf624c39683a8364fa7f22235b787a23675780 (diff)
Revert "Add support for image load to SkSL"
This reverts commit bd85a105ba7b3ee2008d20fb9281bfb47325ad0e. Reason for revert: Needing to revert a dependent CL Original change's description: > Add support for image load to SkSL > > GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4865 > > Change-Id: I4647e6b255946ced2b1b8cb05e62f0f5a8ad28b6 > Reviewed-on: https://skia-review.googlesource.com/4865 > Commit-Queue: Brian Salomon <bsalomon@google.com> > Reviewed-by: Ethan Nicholas <ethannicholas@google.com> > TBR=bsalomon@google.com,ethannicholas@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I45932a53c606aadd645ee2b8264f08ad63429939 Reviewed-on: https://skia-review.googlesource.com/4892 Commit-Queue: Stan Iliev <stani@google.com> Reviewed-by: Stan Iliev <stani@google.com>
Diffstat (limited to 'src/sksl/ast')
-rw-r--r--src/sksl/ast/SkSLASTLayout.h69
1 files changed, 2 insertions, 67 deletions
diff --git a/src/sksl/ast/SkSLASTLayout.h b/src/sksl/ast/SkSLASTLayout.h
index e7bfd12056..2aec31e4df 100644
--- a/src/sksl/ast/SkSLASTLayout.h
+++ b/src/sksl/ast/SkSLASTLayout.h
@@ -19,68 +19,9 @@ namespace SkSL {
* layout (location = 0) int x;
*/
struct ASTLayout : public ASTNode {
- // These are used by images in GLSL. We only support a subset of what GL supports.
- enum class Format {
- kUnspecified = -1,
- kRGBA32F,
- kR32F,
- kRGBA16F,
- kR16F,
- kRGBA8,
- kR8,
- kRGBA8I,
- kR8I,
- };
-
- static const char* FormatToStr(Format format) {
- switch (format) {
- case Format::kUnspecified: return "";
- case Format::kRGBA32F: return "rgba32f";
- case Format::kR32F: return "r32f";
- case Format::kRGBA16F: return "rgba16f";
- case Format::kR16F: return "r16f";
- case Format::kRGBA8: return "rgba8";
- case Format::kR8: return "r8";
- case Format::kRGBA8I: return "rgba8i";
- case Format::kR8I: return "r8i";
- }
- SkFAIL("Unexpected format");
- return "";
- }
-
- static bool ReadFormat(std::string str, Format* format) {
- if (str == "rgba32f") {
- *format = Format::kRGBA32F;
- return true;
- } else if (str == "r32f") {
- *format = Format::kR32F;
- return true;
- } else if (str == "rgba16f") {
- *format = Format::kRGBA16F;
- return true;
- } else if (str == "r16f") {
- *format = Format::kR16F;
- return true;
- } else if (str == "rgba8") {
- *format = Format::kRGBA8;
- return true;
- } else if (str == "r8") {
- *format = Format::kR8;
- return true;
- } else if (str == "rgba8i") {
- *format = Format::kRGBA8I;
- return true;
- } else if (str == "r8i") {
- *format = Format::kR8I;
- return true;
- }
- return false;
- }
-
// 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, bool pushConstant,
- Format format)
+ bool overrideCoverage, bool blendSupportAllEquations, bool pushConstant)
: fLocation(location)
, fBinding(binding)
, fIndex(index)
@@ -89,8 +30,7 @@ struct ASTLayout : public ASTNode {
, fOriginUpperLeft(originUpperLeft)
, fOverrideCoverage(overrideCoverage)
, fBlendSupportAllEquations(blendSupportAllEquations)
- , fPushConstant(pushConstant)
- , fFormat(format) {}
+ , fPushConstant(pushConstant) {}
std::string description() const {
std::string result;
@@ -131,10 +71,6 @@ struct ASTLayout : public ASTNode {
result += separator + "push_constant";
separator = ", ";
}
- if (fFormat != Format::kUnspecified) {
- result += separator + FormatToStr(fFormat);
- separator = ", ";
- }
if (result.length() > 0) {
result = "layout (" + result + ")";
}
@@ -150,7 +86,6 @@ struct ASTLayout : public ASTNode {
const bool fOverrideCoverage;
const bool fBlendSupportAllEquations;
const bool fPushConstant;
- const Format fFormat;
};
} // namespace