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 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
299 fTwoSidedStencilSupport = (ctxInfo.version() >= GR_GL_VER(2,0)); | 299 fTwoSidedStencilSupport = (ctxInfo.version() >= GR_GL_VER(2,0)); |
300 // supported on GL 1.4 and higher or by extension | 300 // supported on GL 1.4 and higher or by extension |
301 fStencilWrapOpsSupport = (ctxInfo.version() >= GR_GL_VER(1,4)) || | 301 fStencilWrapOpsSupport = (ctxInfo.version() >= GR_GL_VER(1,4)) || |
302 ctxInfo.hasExtension("GL_EXT_stencil_wrap"); | 302 ctxInfo.hasExtension("GL_EXT_stencil_wrap"); |
303 } else { | 303 } else { |
304 // ES 2 has two sided stencil and stencil wrap | 304 // ES 2 has two sided stencil and stencil wrap |
305 fTwoSidedStencilSupport = true; | 305 fTwoSidedStencilSupport = true; |
306 fStencilWrapOpsSupport = true; | 306 fStencilWrapOpsSupport = true; |
307 } | 307 } |
308 | 308 |
| 309 // GL_KHR_blend_equation_advanced is a proper subset of GL_NV_blend_equation
_advanced, with all |
| 310 // the same enums, but we still check for the NV variants to support legacy
drivers that didn't |
| 311 // export the KHR extension yet. |
| 312 if (ctxInfo.hasExtension("GL_KHR_blend_equation_advanced_coherent") || |
| 313 ctxInfo.hasExtension("GL_NV_blend_equation_advanced_coherent")) { |
| 314 fBlendEquationSupport = kAdvancedCoherent_BlendEquationSupport; |
| 315 } else if (ctxInfo.hasExtension("GL_KHR_blend_equation_advanced") || |
| 316 ctxInfo.hasExtension("GL_NV_blend_equation_advanced")) { |
| 317 fBlendEquationSupport = kAdvanced_BlendEquationSupport; |
| 318 } else { |
| 319 fBlendEquationSupport = kBasic_BlendEquationSupport; |
| 320 } |
| 321 |
309 if (kGL_GrGLStandard == standard) { | 322 if (kGL_GrGLStandard == standard) { |
310 fMapBufferFlags = kCanMap_MapFlag; // we require VBO support and the des
ktop VBO | 323 fMapBufferFlags = kCanMap_MapFlag; // we require VBO support and the des
ktop VBO |
311 // extension includes glMapBuffer. | 324 // extension includes glMapBuffer. |
312 if (version >= GR_GL_VER(3, 0) || ctxInfo.hasExtension("GL_ARB_map_buffe
r_range")) { | 325 if (version >= GR_GL_VER(3, 0) || ctxInfo.hasExtension("GL_ARB_map_buffe
r_range")) { |
313 fMapBufferFlags |= kSubset_MapFlag; | 326 fMapBufferFlags |= kSubset_MapFlag; |
314 fMapBufferType = kMapBufferRange_MapBufferType; | 327 fMapBufferType = kMapBufferRange_MapBufferType; |
315 } else { | 328 } else { |
316 fMapBufferType = kMapBuffer_MapBufferType; | 329 fMapBufferType = kMapBuffer_MapBufferType; |
317 } | 330 } |
318 } else { | 331 } else { |
(...skipping 739 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1058 r.appendf("Two Format Limit: %s\n", (fTwoFormatLimit ? "YES": "NO")); | 1071 r.appendf("Two Format Limit: %s\n", (fTwoFormatLimit ? "YES": "NO")); |
1059 r.appendf("Fragment coord conventions support: %s\n", | 1072 r.appendf("Fragment coord conventions support: %s\n", |
1060 (fFragCoordsConventionSupport ? "YES": "NO")); | 1073 (fFragCoordsConventionSupport ? "YES": "NO")); |
1061 r.appendf("Vertex array object support: %s\n", (fVertexArrayObjectSupport ?
"YES": "NO")); | 1074 r.appendf("Vertex array object support: %s\n", (fVertexArrayObjectSupport ?
"YES": "NO")); |
1062 r.appendf("Use non-VBO for dynamic data: %s\n", | 1075 r.appendf("Use non-VBO for dynamic data: %s\n", |
1063 (fUseNonVBOVertexAndIndexDynamicData ? "YES" : "NO")); | 1076 (fUseNonVBOVertexAndIndexDynamicData ? "YES" : "NO")); |
1064 r.appendf("Full screen clear is free: %s\n", (fFullClearIsFree ? "YES" : "NO
")); | 1077 r.appendf("Full screen clear is free: %s\n", (fFullClearIsFree ? "YES" : "NO
")); |
1065 r.appendf("Drops tile on zero divide: %s\n", (fDropsTileOnZeroDivide ? "YES"
: "NO")); | 1078 r.appendf("Drops tile on zero divide: %s\n", (fDropsTileOnZeroDivide ? "YES"
: "NO")); |
1066 return r; | 1079 return r; |
1067 } | 1080 } |
OLD | NEW |