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

Side by Side Diff: src/gpu/gl/GrGLCaps.cpp

Issue 1216963004: Workaround for blacklist KHR_blend_equation_advanced on ARM GPU (Closed) Base URL: ssh://mpg-bsp.cambridge.arm.com:29418/middleware/skia@blend_equation_advanced_workaround
Patch Set: set upsteam to master Created 5 years, 5 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 unified diff | Download patch
« no previous file with comments | « no previous file | src/gpu/gl/GrGLGpu.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2012 Google Inc. 2 * Copyright 2012 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 8
9 #include "GrGLCaps.h" 9 #include "GrGLCaps.h"
10 10
(...skipping 834 matching lines...) Expand 10 before | Expand all | Expand 10 after
845 } 845 }
846 } 846 }
847 847
848 void GrGLCaps::initBlendEqationSupport(const GrGLContextInfo& ctxInfo) { 848 void GrGLCaps::initBlendEqationSupport(const GrGLContextInfo& ctxInfo) {
849 GrGLSLCaps* glslCaps = static_cast<GrGLSLCaps*>(fShaderCaps.get()); 849 GrGLSLCaps* glslCaps = static_cast<GrGLSLCaps*>(fShaderCaps.get());
850 850
851 // Disabling advanced blend on various platforms with major known issues. We also block Chrome 851 // Disabling advanced blend on various platforms with major known issues. We also block Chrome
852 // for now until its own blacklists can be updated. 852 // for now until its own blacklists can be updated.
853 if (kAdreno4xx_GrGLRenderer == ctxInfo.renderer() || 853 if (kAdreno4xx_GrGLRenderer == ctxInfo.renderer() ||
854 kIntel_GrGLDriver == ctxInfo.driver() || 854 kIntel_GrGLDriver == ctxInfo.driver() ||
855 kChromium_GrGLDriver == ctxInfo.driver() || 855 kChromium_GrGLDriver == ctxInfo.driver()) {
856 kARM_GrGLVendor == ctxInfo.vendor()) {
857 return; 856 return;
858 } 857 }
859 858
860 if (ctxInfo.hasExtension("GL_NV_blend_equation_advanced_coherent")) { 859 if (ctxInfo.hasExtension("GL_NV_blend_equation_advanced_coherent")) {
861 fBlendEquationSupport = kAdvancedCoherent_BlendEquationSupport; 860 fBlendEquationSupport = kAdvancedCoherent_BlendEquationSupport;
862 glslCaps->fAdvBlendEqInteraction = GrGLSLCaps::kAutomatic_AdvBlendEqInte raction; 861 glslCaps->fAdvBlendEqInteraction = GrGLSLCaps::kAutomatic_AdvBlendEqInte raction;
863 } else if (ctxInfo.hasExtension("GL_KHR_blend_equation_advanced_coherent")) { 862 } else if (ctxInfo.hasExtension("GL_KHR_blend_equation_advanced_coherent")) {
864 fBlendEquationSupport = kAdvancedCoherent_BlendEquationSupport; 863 fBlendEquationSupport = kAdvancedCoherent_BlendEquationSupport;
865 glslCaps->fAdvBlendEqInteraction = GrGLSLCaps::kGeneralEnable_AdvBlendEq Interaction; 864 glslCaps->fAdvBlendEqInteraction = GrGLSLCaps::kGeneralEnable_AdvBlendEq Interaction;
866 } else if (kNVIDIA_GrGLDriver == ctxInfo.driver() && 865 } else if (kNVIDIA_GrGLDriver == ctxInfo.driver() &&
(...skipping 12 matching lines...) Expand all
879 return; // No advanced blend support. 878 return; // No advanced blend support.
880 } 879 }
881 880
882 SkASSERT(this->advancedBlendEquationSupport()); 881 SkASSERT(this->advancedBlendEquationSupport());
883 882
884 if (kNVIDIA_GrGLDriver == ctxInfo.driver()) { 883 if (kNVIDIA_GrGLDriver == ctxInfo.driver()) {
885 // Blacklist color-dodge and color-burn on NVIDIA until the fix is relea sed. 884 // Blacklist color-dodge and color-burn on NVIDIA until the fix is relea sed.
886 fAdvBlendEqBlacklist |= (1 << kColorDodge_GrBlendEquation) | 885 fAdvBlendEqBlacklist |= (1 << kColorDodge_GrBlendEquation) |
887 (1 << kColorBurn_GrBlendEquation); 886 (1 << kColorBurn_GrBlendEquation);
888 } 887 }
888 if (kARM_GrGLVendor == ctxInfo.vendor()) {
889 // Blacklist color-burn on ARM until the fix is released.
890 fAdvBlendEqBlacklist |= (1 << kColorBurn_GrBlendEquation);
891 }
889 } 892 }
890 893
891 namespace { 894 namespace {
892 const GrGLuint kUnknownBitCount = GrGLStencilAttachment::kUnknownBitCount; 895 const GrGLuint kUnknownBitCount = GrGLStencilAttachment::kUnknownBitCount;
893 } 896 }
894 897
895 void GrGLCaps::initStencilFormats(const GrGLContextInfo& ctxInfo) { 898 void GrGLCaps::initStencilFormats(const GrGLContextInfo& ctxInfo) {
896 899
897 // Build up list of legal stencil formats (though perhaps not supported on 900 // Build up list of legal stencil formats (though perhaps not supported on
898 // the particular gpu/driver) from most preferred to least. 901 // the particular gpu/driver) from most preferred to least.
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
1158 for (int p = 0; p < kGrSLPrecisionCount; ++p) { 1161 for (int p = 0; p < kGrSLPrecisionCount; ++p) {
1159 glslCaps->fFloatPrecisions[kGeometry_GrShaderType][p] = 1162 glslCaps->fFloatPrecisions[kGeometry_GrShaderType][p] =
1160 glslCaps->fFloatPrecisions[kVerte x_GrShaderType][p]; 1163 glslCaps->fFloatPrecisions[kVerte x_GrShaderType][p];
1161 } 1164 }
1162 } 1165 }
1163 } 1166 }
1164 1167
1165 1168
1166 1169
1167 1170
OLDNEW
« no previous file with comments | « no previous file | src/gpu/gl/GrGLGpu.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698