| 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 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 262 fTwoSidedStencilSupport = (ctxInfo.version() >= GR_GL_VER(2,0)); | 262 fTwoSidedStencilSupport = (ctxInfo.version() >= GR_GL_VER(2,0)); |
| 263 // supported on GL 1.4 and higher or by extension | 263 // supported on GL 1.4 and higher or by extension |
| 264 fStencilWrapOpsSupport = (ctxInfo.version() >= GR_GL_VER(1,4)) || | 264 fStencilWrapOpsSupport = (ctxInfo.version() >= GR_GL_VER(1,4)) || |
| 265 ctxInfo.hasExtension("GL_EXT_stencil_wrap"); | 265 ctxInfo.hasExtension("GL_EXT_stencil_wrap"); |
| 266 } else { | 266 } else { |
| 267 // ES 2 has two sided stencil and stencil wrap | 267 // ES 2 has two sided stencil and stencil wrap |
| 268 fTwoSidedStencilSupport = true; | 268 fTwoSidedStencilSupport = true; |
| 269 fStencilWrapOpsSupport = true; | 269 fStencilWrapOpsSupport = true; |
| 270 } | 270 } |
| 271 | 271 |
| 272 // Disabling advanced blend until we can resolve various bugs |
| 273 #if 0 |
| 272 if (kIntel_GrGLVendor != ctxInfo.vendor()) { | 274 if (kIntel_GrGLVendor != ctxInfo.vendor()) { |
| 273 if (ctxInfo.hasExtension("GL_KHR_blend_equation_advanced_coherent") || | 275 if (ctxInfo.hasExtension("GL_KHR_blend_equation_advanced_coherent") || |
| 274 ctxInfo.hasExtension("GL_NV_blend_equation_advanced_coherent")) { | 276 ctxInfo.hasExtension("GL_NV_blend_equation_advanced_coherent")) { |
| 275 fBlendEquationSupport = kAdvancedCoherent_BlendEquationSupport; | 277 fBlendEquationSupport = kAdvancedCoherent_BlendEquationSupport; |
| 276 } else if (ctxInfo.hasExtension("GL_KHR_blend_equation_advanced") || | 278 } else if (ctxInfo.hasExtension("GL_KHR_blend_equation_advanced") || |
| 277 ctxInfo.hasExtension("GL_NV_blend_equation_advanced")) { | 279 ctxInfo.hasExtension("GL_NV_blend_equation_advanced")) { |
| 278 fBlendEquationSupport = kAdvanced_BlendEquationSupport; | 280 fBlendEquationSupport = kAdvanced_BlendEquationSupport; |
| 279 } else { | 281 } else { |
| 280 fBlendEquationSupport = kBasic_BlendEquationSupport; | 282 fBlendEquationSupport = kBasic_BlendEquationSupport; |
| 281 } | 283 } |
| 282 } else { | 284 } else { |
| 283 // On Intel platforms, KHR_blend_equation_advanced is not conformant. | 285 // On Intel platforms, KHR_blend_equation_advanced is not conformant. |
| 284 fBlendEquationSupport = kBasic_BlendEquationSupport; | 286 fBlendEquationSupport = kBasic_BlendEquationSupport; |
| 285 } | 287 } |
| 286 | 288 #endif |
| 287 if (kGL_GrGLStandard == standard) { | 289 if (kGL_GrGLStandard == standard) { |
| 288 fMapBufferFlags = kCanMap_MapFlag; // we require VBO support and the des
ktop VBO | 290 fMapBufferFlags = kCanMap_MapFlag; // we require VBO support and the des
ktop VBO |
| 289 // extension includes glMapBuffer. | 291 // extension includes glMapBuffer. |
| 290 if (version >= GR_GL_VER(3, 0) || ctxInfo.hasExtension("GL_ARB_map_buffe
r_range")) { | 292 if (version >= GR_GL_VER(3, 0) || ctxInfo.hasExtension("GL_ARB_map_buffe
r_range")) { |
| 291 fMapBufferFlags |= kSubset_MapFlag; | 293 fMapBufferFlags |= kSubset_MapFlag; |
| 292 fMapBufferType = kMapBufferRange_MapBufferType; | 294 fMapBufferType = kMapBufferRange_MapBufferType; |
| 293 } else { | 295 } else { |
| 294 fMapBufferType = kMapBuffer_MapBufferType; | 296 fMapBufferType = kMapBuffer_MapBufferType; |
| 295 } | 297 } |
| 296 } else { | 298 } else { |
| (...skipping 850 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1147 if (fGeometryShaderSupport) { | 1149 if (fGeometryShaderSupport) { |
| 1148 for (int p = 0; p < kGrSLPrecisionCount; ++p) { | 1150 for (int p = 0; p < kGrSLPrecisionCount; ++p) { |
| 1149 fFloatPrecisions[kGeometry_GrShaderType][p] = fFloatPrecisions[kVert
ex_GrShaderType][p]; | 1151 fFloatPrecisions[kGeometry_GrShaderType][p] = fFloatPrecisions[kVert
ex_GrShaderType][p]; |
| 1150 } | 1152 } |
| 1151 } | 1153 } |
| 1152 } | 1154 } |
| 1153 | 1155 |
| 1154 | 1156 |
| 1155 | 1157 |
| 1156 | 1158 |
| OLD | NEW |