diff options
author | Brian Salomon <bsalomon@google.com> | 2018-04-04 13:58:33 +0000 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-04-04 13:58:42 +0000 |
commit | d40133092ae138b3d47a1158101faec3c53c6b1f (patch) | |
tree | c4be5ef8824ea756d0aef46c1aca04bf9318146a /src/sksl | |
parent | a24d505f2a60315996b2ca426bf3b7815132beab (diff) |
Revert "Make SkSL GLSL generator declare sk_FragColor inout when EXT fb fetch is used."
This reverts commit 7e1dd2017a59a748c6cb10160868780d2dffdbc0.
Reason for revert: breaking fp compilation
Original change's description:
> Make SkSL GLSL generator declare sk_FragColor inout when EXT fb fetch is used.
>
> Change-Id: I5e6e3263bb49febc757cd63d5d6c1518f174322d
> Reviewed-on: https://skia-review.googlesource.com/118420
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>
TBR=egdaniel@google.com,bsalomon@google.com
Change-Id: I2aedfaff93150ba8cd1ed9fed22f3cfdd509695a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/118600
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/sksl')
-rw-r--r-- | src/sksl/SkSLGLSLCodeGenerator.cpp | 6 | ||||
-rw-r--r-- | src/sksl/SkSLIRGenerator.cpp | 1 | ||||
-rw-r--r-- | src/sksl/SkSLMetalCodeGenerator.cpp | 2 | ||||
-rw-r--r-- | src/sksl/SkSLSPIRVCodeGenerator.cpp | 1 | ||||
-rw-r--r-- | src/sksl/ir/SkSLProgram.h | 2 |
5 files changed, 2 insertions, 10 deletions
diff --git a/src/sksl/SkSLGLSLCodeGenerator.cpp b/src/sksl/SkSLGLSLCodeGenerator.cpp index 43c1c95327..996714ec62 100644 --- a/src/sksl/SkSLGLSLCodeGenerator.cpp +++ b/src/sksl/SkSLGLSLCodeGenerator.cpp @@ -1270,11 +1270,7 @@ void GLSLCodeGenerator::writeProgramElement(const ProgramElement& e) { this->writeLine(); } else if (builtin == SK_FRAGCOLOR_BUILTIN && fProgram.fSettings.fCaps->mustDeclareFragmentShaderOutput()) { - if (fProgram.fSettings.fFragColorIsInOut) { - this->write("inout "); - } else { - this->write("out "); - } + this->write("out "); if (usesPrecisionModifiers()) { this->write("mediump "); } diff --git a/src/sksl/SkSLIRGenerator.cpp b/src/sksl/SkSLIRGenerator.cpp index ec3f6068fe..56d8e5e952 100644 --- a/src/sksl/SkSLIRGenerator.cpp +++ b/src/sksl/SkSLIRGenerator.cpp @@ -126,6 +126,7 @@ static void fill_caps(const SKSL_CAPS_CLASS& caps, #define CAP(name) capsMap->insert(std::make_pair(String(#name), \ Program::Settings::Value(caps.name()))); CAP(fbFetchSupport); + CAP(fbFetchNeedsCustomOutput); CAP(dropsTileOnZeroDivide); CAP(flatInterpolationSupport); CAP(noperspectiveInterpolationSupport); diff --git a/src/sksl/SkSLMetalCodeGenerator.cpp b/src/sksl/SkSLMetalCodeGenerator.cpp index 88ab7ad682..de6b1d0854 100644 --- a/src/sksl/SkSLMetalCodeGenerator.cpp +++ b/src/sksl/SkSLMetalCodeGenerator.cpp @@ -451,8 +451,6 @@ void MetalCodeGenerator::writeFunction(const FunctionDefinition& f) { } this->writeLine(") {"); - SkASSERT(!fProgram.fSettings.fFragColorIsInOut); - if ("main" == f.fDeclaration.fName) { switch (fProgram.fKind) { case Program::kFragment_Kind: diff --git a/src/sksl/SkSLSPIRVCodeGenerator.cpp b/src/sksl/SkSLSPIRVCodeGenerator.cpp index 84bc4d85c7..dadab91753 100644 --- a/src/sksl/SkSLSPIRVCodeGenerator.cpp +++ b/src/sksl/SkSLSPIRVCodeGenerator.cpp @@ -2545,7 +2545,6 @@ void SPIRVCodeGenerator::writeGlobalVars(Program::Kind kind, const VarDeclaratio } if (var->fModifiers.fLayout.fBuiltin == SK_FRAGCOLOR_BUILTIN && kind != Program::kFragment_Kind) { - SkASSERT(!fProgram.fSettings.fFragColorIsInOut); continue; } if (!var->fReadCount && !var->fWriteCount && diff --git a/src/sksl/ir/SkSLProgram.h b/src/sksl/ir/SkSLProgram.h index 03a94fa03f..cbb9dfe1a7 100644 --- a/src/sksl/ir/SkSLProgram.h +++ b/src/sksl/ir/SkSLProgram.h @@ -71,8 +71,6 @@ struct Program { // if false, sk_FragCoord is exactly the same as gl_FragCoord. If true, the y coordinate // must be flipped. bool fFlipY = false; - // If true the destination fragment color is read sk_FragColor. It must be declared inout. - bool fFragColorIsInOut = false; // if true, Setting objects (e.g. sk_Caps.fbFetchSupport) should be replaced with their // constant equivalents during compilation bool fReplaceSettings = true; |