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

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

Issue 1166513002: Re-enable advanced blend with a blacklist (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 5 years, 7 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/effects/GrCustomXfermodePriv.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/GrGLCaps.cpp
diff --git a/src/gpu/gl/GrGLCaps.cpp b/src/gpu/gl/GrGLCaps.cpp
index dd4ba65f771195133150fc34719408054427d38b..32e63382e12936fefef52a9ffe70617e599e6809 100644
--- a/src/gpu/gl/GrGLCaps.cpp
+++ b/src/gpu/gl/GrGLCaps.cpp
@@ -230,23 +230,25 @@ void GrGLCaps::init(const GrGLContextInfo& ctxInfo, const GrGLInterface* gli) {
fStencilWrapOpsSupport = true;
}
-// Disabling advanced blend until we can resolve various bugs
-#if 0
- if (kIntel_GrGLVendor != ctxInfo.vendor()) {
+ // Only allowing advanced blend on NVIDIA until we can resolve various bugs.
+ if (kNVIDIA_GrGLDriver == ctxInfo.driver()) {
egdaniel 2015/06/05 18:18:04 Outside of intel which I believe you had said had
nv_mark 2015/06/05 19:09:38 I question if blacking listing the individual Dodg
if (ctxInfo.hasExtension("GL_KHR_blend_equation_advanced_coherent") ||
ctxInfo.hasExtension("GL_NV_blend_equation_advanced_coherent")) {
fBlendEquationSupport = kAdvancedCoherent_BlendEquationSupport;
- } else if (ctxInfo.hasExtension("GL_KHR_blend_equation_advanced") ||
- ctxInfo.hasExtension("GL_NV_blend_equation_advanced")) {
- fBlendEquationSupport = kAdvanced_BlendEquationSupport;
- } else {
- fBlendEquationSupport = kBasic_BlendEquationSupport;
+ } else if (ctxInfo.driverVersion() >= GR_GL_DRIVER_VER(337,00)) {
+ // Non-coherent advanced blend has an issue before 337.00.
+ if (ctxInfo.hasExtension("GL_KHR_blend_equation_advanced") ||
+ ctxInfo.hasExtension("GL_NV_blend_equation_advanced")) {
+ fBlendEquationSupport = kAdvanced_BlendEquationSupport;
+ }
+ }
+ if (this->advancedBlendEquationSupport()) {
+ // Blacklist color-dodge and color-burn until the NVIDIA fix is released.
+ fAdvBlendEqBlacklist |= (1 << kColorDodge_GrBlendEquation) |
+ (1 << kColorBurn_GrBlendEquation);
}
- } else {
- // On Intel platforms, KHR_blend_equation_advanced is not conformant.
- fBlendEquationSupport = kBasic_BlendEquationSupport;
}
-#endif
+
if (kGL_GrGLStandard == standard) {
fMapBufferFlags = kCanMap_MapFlag; // we require VBO support and the desktop VBO
// extension includes glMapBuffer.
« no previous file with comments | « src/gpu/effects/GrCustomXfermodePriv.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698