OLD | NEW |
---|---|
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 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
223 fTwoSidedStencilSupport = (ctxInfo.version() >= GR_GL_VER(2,0)); | 223 fTwoSidedStencilSupport = (ctxInfo.version() >= GR_GL_VER(2,0)); |
224 // supported on GL 1.4 and higher or by extension | 224 // supported on GL 1.4 and higher or by extension |
225 fStencilWrapOpsSupport = (ctxInfo.version() >= GR_GL_VER(1,4)) || | 225 fStencilWrapOpsSupport = (ctxInfo.version() >= GR_GL_VER(1,4)) || |
226 ctxInfo.hasExtension("GL_EXT_stencil_wrap"); | 226 ctxInfo.hasExtension("GL_EXT_stencil_wrap"); |
227 } else { | 227 } else { |
228 // ES 2 has two sided stencil and stencil wrap | 228 // ES 2 has two sided stencil and stencil wrap |
229 fTwoSidedStencilSupport = true; | 229 fTwoSidedStencilSupport = true; |
230 fStencilWrapOpsSupport = true; | 230 fStencilWrapOpsSupport = true; |
231 } | 231 } |
232 | 232 |
233 // Disabling advanced blend until we can resolve various bugs | 233 // Only allowing advanced blend on NVIDIA until we can resolve various bugs. |
234 #if 0 | 234 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
| |
235 if (kIntel_GrGLVendor != ctxInfo.vendor()) { | |
236 if (ctxInfo.hasExtension("GL_KHR_blend_equation_advanced_coherent") || | 235 if (ctxInfo.hasExtension("GL_KHR_blend_equation_advanced_coherent") || |
237 ctxInfo.hasExtension("GL_NV_blend_equation_advanced_coherent")) { | 236 ctxInfo.hasExtension("GL_NV_blend_equation_advanced_coherent")) { |
238 fBlendEquationSupport = kAdvancedCoherent_BlendEquationSupport; | 237 fBlendEquationSupport = kAdvancedCoherent_BlendEquationSupport; |
239 } else if (ctxInfo.hasExtension("GL_KHR_blend_equation_advanced") || | 238 } else if (ctxInfo.driverVersion() >= GR_GL_DRIVER_VER(337,00)) { |
240 ctxInfo.hasExtension("GL_NV_blend_equation_advanced")) { | 239 // Non-coherent advanced blend has an issue before 337.00. |
241 fBlendEquationSupport = kAdvanced_BlendEquationSupport; | 240 if (ctxInfo.hasExtension("GL_KHR_blend_equation_advanced") || |
242 } else { | 241 ctxInfo.hasExtension("GL_NV_blend_equation_advanced")) { |
243 fBlendEquationSupport = kBasic_BlendEquationSupport; | 242 fBlendEquationSupport = kAdvanced_BlendEquationSupport; |
243 } | |
244 } | 244 } |
245 } else { | 245 if (this->advancedBlendEquationSupport()) { |
246 // On Intel platforms, KHR_blend_equation_advanced is not conformant. | 246 // Blacklist color-dodge and color-burn until the NVIDIA fix is rele ased. |
247 fBlendEquationSupport = kBasic_BlendEquationSupport; | 247 fAdvBlendEqBlacklist |= (1 << kColorDodge_GrBlendEquation) | |
248 (1 << kColorBurn_GrBlendEquation); | |
249 } | |
248 } | 250 } |
249 #endif | 251 |
250 if (kGL_GrGLStandard == standard) { | 252 if (kGL_GrGLStandard == standard) { |
251 fMapBufferFlags = kCanMap_MapFlag; // we require VBO support and the des ktop VBO | 253 fMapBufferFlags = kCanMap_MapFlag; // we require VBO support and the des ktop VBO |
252 // extension includes glMapBuffer. | 254 // extension includes glMapBuffer. |
253 if (version >= GR_GL_VER(3, 0) || ctxInfo.hasExtension("GL_ARB_map_buffe r_range")) { | 255 if (version >= GR_GL_VER(3, 0) || ctxInfo.hasExtension("GL_ARB_map_buffe r_range")) { |
254 fMapBufferFlags |= kSubset_MapFlag; | 256 fMapBufferFlags |= kSubset_MapFlag; |
255 fMapBufferType = kMapBufferRange_MapBufferType; | 257 fMapBufferType = kMapBufferRange_MapBufferType; |
256 } else { | 258 } else { |
257 fMapBufferType = kMapBuffer_MapBufferType; | 259 fMapBufferType = kMapBuffer_MapBufferType; |
258 } | 260 } |
259 } else { | 261 } else { |
(...skipping 861 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1121 if (fGeometryShaderSupport) { | 1123 if (fGeometryShaderSupport) { |
1122 for (int p = 0; p < kGrSLPrecisionCount; ++p) { | 1124 for (int p = 0; p < kGrSLPrecisionCount; ++p) { |
1123 fFloatPrecisions[kGeometry_GrShaderType][p] = fFloatPrecisions[kVert ex_GrShaderType][p]; | 1125 fFloatPrecisions[kGeometry_GrShaderType][p] = fFloatPrecisions[kVert ex_GrShaderType][p]; |
1124 } | 1126 } |
1125 } | 1127 } |
1126 } | 1128 } |
1127 | 1129 |
1128 | 1130 |
1129 | 1131 |
1130 | 1132 |
OLD | NEW |