Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(444)

Unified Diff: src/gpu/gl/builders/GrGLShaderBuilder.cpp

Issue 1408063009: Fix assert in GrGLShaderBuilder regarding shader outputs (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/builders/GrGLShaderBuilder.cpp
diff --git a/src/gpu/gl/builders/GrGLShaderBuilder.cpp b/src/gpu/gl/builders/GrGLShaderBuilder.cpp
index 95607ecabe98a06489a3598d2a14b52ed578831d..03dc1667c76fe81e04d4814ac8e6832f46023461 100644
--- a/src/gpu/gl/builders/GrGLShaderBuilder.cpp
+++ b/src/gpu/gl/builders/GrGLShaderBuilder.cpp
@@ -178,10 +178,13 @@ void GrGLShaderBuilder::finalize(uint32_t visibility) {
SkASSERT(!fFinalized);
this->versionDecl() = fProgramBuilder->glslCaps()->versionDeclString();
this->compileAndAppendLayoutQualifiers();
+ SkASSERT(visibility);
fProgramBuilder->appendUniformDecls((GrGLProgramBuilder::ShaderVisibility) visibility,
&this->uniforms());
this->appendDecls(fInputs, &this->inputs());
- SkASSERT(k110_GrGLSLGeneration != fProgramBuilder->glslCaps()->generation() ||
+ // We should not have any outputs in the fragment shader when using version 1.10
+ SkASSERT(GrGLProgramBuilder::kFragment_Visibility != visibility ||
+ k110_GrGLSLGeneration != fProgramBuilder->glslCaps()->generation() ||
fOutputs.empty());
this->appendDecls(fOutputs, &this->outputs());
this->onFinalize();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698