diff options
-rw-r--r-- | src/gpu/gl/builders/GrGLProgramBuilder.cpp | 2 | ||||
-rw-r--r-- | src/gpu/glsl/GrGLSLFragmentShaderBuilder.cpp | 5 | ||||
-rw-r--r-- | src/gpu/glsl/GrGLSLFragmentShaderBuilder.h | 1 | ||||
-rw-r--r-- | src/gpu/glsl/GrGLSLProgramBuilder.h | 2 | ||||
-rw-r--r-- | src/gpu/vk/GrVkPipelineStateBuilder.cpp | 1 | ||||
-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 |
10 files changed, 2 insertions, 21 deletions
diff --git a/src/gpu/gl/builders/GrGLProgramBuilder.cpp b/src/gpu/gl/builders/GrGLProgramBuilder.cpp index dd982b91c6..8fb3589df7 100644 --- a/src/gpu/gl/builders/GrGLProgramBuilder.cpp +++ b/src/gpu/gl/builders/GrGLProgramBuilder.cpp @@ -154,8 +154,6 @@ GrGLProgram* GrGLProgramBuilder::finalize() { settings.fCaps = this->gpu()->glCaps().shaderCaps(); settings.fFlipY = this->pipeline().proxy()->origin() != kTopLeft_GrSurfaceOrigin; settings.fSharpenTextures = this->gpu()->getContext()->contextPriv().sharpenMipmappedTextures(); - settings.fFragColorIsInOut = this->fragColorIsInOut(); - SkSL::Program::Inputs inputs; SkTDArray<GrGLuint> shadersToDelete; bool cached = fGpu->glCaps().programBinarySupport() && nullptr != fCached.get(); diff --git a/src/gpu/glsl/GrGLSLFragmentShaderBuilder.cpp b/src/gpu/glsl/GrGLSLFragmentShaderBuilder.cpp index 9afd470776..8ad3a058eb 100644 --- a/src/gpu/glsl/GrGLSLFragmentShaderBuilder.cpp +++ b/src/gpu/glsl/GrGLSLFragmentShaderBuilder.cpp @@ -170,11 +170,6 @@ const char* GrGLSLFragmentShaderBuilder::getPrimaryColorOutputName() const { return fHasCustomColorOutput ? DeclaredColorOutputName() : "sk_FragColor"; } -bool GrGLSLFragmentShaderBuilder::primaryColorOutputIsInOut() const { - return fHasCustomColorOutput && - fOutputs[fCustomColorOutputIndex].getTypeModifier() == GrShaderVar::kInOut_TypeModifier; -} - void GrGLSLFragmentBuilder::declAppendf(const char* fmt, ...) { va_list argp; va_start(argp, fmt); diff --git a/src/gpu/glsl/GrGLSLFragmentShaderBuilder.h b/src/gpu/glsl/GrGLSLFragmentShaderBuilder.h index 0e0794fd37..5a73c17d9a 100644 --- a/src/gpu/glsl/GrGLSLFragmentShaderBuilder.h +++ b/src/gpu/glsl/GrGLSLFragmentShaderBuilder.h @@ -119,7 +119,6 @@ private: void enableSecondaryOutput(); const char* getPrimaryColorOutputName() const; const char* getSecondaryColorOutputName() const; - bool primaryColorOutputIsInOut() const; #ifdef SK_DEBUG // As GLSLProcessors emit code, there are some conditions we need to verify. We use the below diff --git a/src/gpu/glsl/GrGLSLProgramBuilder.h b/src/gpu/glsl/GrGLSLProgramBuilder.h index d4d2099a41..ac2d4965b5 100644 --- a/src/gpu/glsl/GrGLSLProgramBuilder.h +++ b/src/gpu/glsl/GrGLSLProgramBuilder.h @@ -115,8 +115,6 @@ protected: void finalizeShaders(); - bool fragColorIsInOut() const { return fFS.primaryColorOutputIsInOut(); } - private: // reset is called by program creator between each processor's emit code. It increments the // stage offset for variable name mangling, and also ensures verfication variables in the diff --git a/src/gpu/vk/GrVkPipelineStateBuilder.cpp b/src/gpu/vk/GrVkPipelineStateBuilder.cpp index 392c152b22..a263b776d1 100644 --- a/src/gpu/vk/GrVkPipelineStateBuilder.cpp +++ b/src/gpu/vk/GrVkPipelineStateBuilder.cpp @@ -144,7 +144,6 @@ GrVkPipelineState* GrVkPipelineStateBuilder::finalize(const GrStencilSettings& s settings.fCaps = this->caps()->shaderCaps(); settings.fFlipY = this->pipeline().proxy()->origin() != kTopLeft_GrSurfaceOrigin; settings.fSharpenTextures = this->gpu()->getContext()->contextPriv().sharpenMipmappedTextures(); - SkASSERT(!this->fragColorIsInOut()); SkAssertResult(this->createVkShaderModule(VK_SHADER_STAGE_VERTEX_BIT, fVS, &vertShaderModule, 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; |