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

Unified Diff: src/gpu/gl/GrGLSL.cpp

Issue 1160923007: Disable dual source blending support when GLSL version is too old (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: string Created 5 years, 6 months 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 | « src/gpu/gl/GrGLSL.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGLSL.cpp
diff --git a/src/gpu/gl/GrGLSL.cpp b/src/gpu/gl/GrGLSL.cpp
index f4caf5201292ffbe837129d077fccbbc1d0586b1..20e6e209384ddfc12339ac46532311673186aa95 100644
--- a/src/gpu/gl/GrGLSL.cpp
+++ b/src/gpu/gl/GrGLSL.cpp
@@ -85,10 +85,22 @@ const char* GrGetGLSLVersionDecl(const GrGLContextInfo& info) {
case k310es_GrGLSLGeneration:
SkASSERT(kGLES_GrGLStandard == info.standard());
return "#version 310 es\n";
- default:
- SkFAIL("Unknown GL version.");
- return ""; // suppress warning
}
+ return "<no version>";
+}
+
+bool GrGLSLSupportsNamedFragmentShaderOutputs(GrGLSLGeneration gen) {
+ switch (gen) {
+ case k110_GrGLSLGeneration:
+ return false;
+ case k130_GrGLSLGeneration:
+ case k140_GrGLSLGeneration:
+ case k150_GrGLSLGeneration:
+ case k330_GrGLSLGeneration:
+ case k310es_GrGLSLGeneration:
+ return true;
+ }
+ return false;
}
void GrGLSLAppendDefaultFloatPrecisionDeclaration(GrSLPrecision p, GrGLStandard s, SkString* out) {
« no previous file with comments | « src/gpu/gl/GrGLSL.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698