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 #include "GrGLContext.h" | 10 #include "GrGLContext.h" |
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
299 GR_GL_GetIntegerv(gli, GR_GL_MAX_TEXTURE_SIZE, &fMaxTextureSize); | 299 GR_GL_GetIntegerv(gli, GR_GL_MAX_TEXTURE_SIZE, &fMaxTextureSize); |
300 GR_GL_GetIntegerv(gli, GR_GL_MAX_RENDERBUFFER_SIZE, &fMaxRenderTargetSize); | 300 GR_GL_GetIntegerv(gli, GR_GL_MAX_RENDERBUFFER_SIZE, &fMaxRenderTargetSize); |
301 // Our render targets are always created with textures as the color | 301 // Our render targets are always created with textures as the color |
302 // attachment, hence this min: | 302 // attachment, hence this min: |
303 fMaxRenderTargetSize = GrMin(fMaxTextureSize, fMaxRenderTargetSize); | 303 fMaxRenderTargetSize = GrMin(fMaxTextureSize, fMaxRenderTargetSize); |
304 | 304 |
305 fPathRenderingSupport = GR_GL_USE_NV_PATH_RENDERING && | 305 fPathRenderingSupport = GR_GL_USE_NV_PATH_RENDERING && |
306 ctxInfo.hasExtension("GL_NV_path_rendering"); | 306 ctxInfo.hasExtension("GL_NV_path_rendering"); |
307 | 307 |
308 fDstReadInShaderSupport = kNone_FBFetchType != fFBFetchType; | 308 fDstReadInShaderSupport = kNone_FBFetchType != fFBFetchType; |
309 | |
310 #if 0 | |
311 // This has to be temporarily disabled. On Android it causes the texture | |
312 // usage to become front loaded and the OS kills the process. It can | |
313 // be re-enabled once the more dynamic (ref-driven) cache clearing | |
314 // system is in place. | |
315 fReuseScratchTextures = kARM_GrGLVendor != ctxInfo.vendor(); | 309 fReuseScratchTextures = kARM_GrGLVendor != ctxInfo.vendor(); |
316 #else | |
317 fReuseScratchTextures = true; | |
318 #endif | |
319 | 310 |
320 // Enable supported shader-related caps | 311 // Enable supported shader-related caps |
321 if (kDesktop_GrGLBinding == binding) { | 312 if (kDesktop_GrGLBinding == binding) { |
322 fDualSourceBlendingSupport = ctxInfo.version() >= GR_GL_VER(3,3) || | 313 fDualSourceBlendingSupport = ctxInfo.version() >= GR_GL_VER(3,3) || |
323 ctxInfo.hasExtension("GL_ARB_blend_func_ext
ended"); | 314 ctxInfo.hasExtension("GL_ARB_blend_func_ext
ended"); |
324 fShaderDerivativeSupport = true; | 315 fShaderDerivativeSupport = true; |
325 // we don't support GL_ARB_geometry_shader4, just GL 3.2+ GS | 316 // we don't support GL_ARB_geometry_shader4, just GL 3.2+ GS |
326 fGeometryShaderSupport = ctxInfo.version() >= GR_GL_VER(3,2) && | 317 fGeometryShaderSupport = ctxInfo.version() >= GR_GL_VER(3,2) && |
327 ctxInfo.glslGeneration() >= k150_GrGLSLGenerati
on; | 318 ctxInfo.glslGeneration() >= k150_GrGLSLGenerati
on; |
328 } else { | 319 } else { |
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
651 GrPrintf("GL_R support: %s\n", (fTextureRedSupport ? "YES": "NO")); | 642 GrPrintf("GL_R support: %s\n", (fTextureRedSupport ? "YES": "NO")); |
652 GrPrintf("GL_ARB_imaging support: %s\n", (fImagingSupport ? "YES": "NO")); | 643 GrPrintf("GL_ARB_imaging support: %s\n", (fImagingSupport ? "YES": "NO")); |
653 GrPrintf("Two Format Limit: %s\n", (fTwoFormatLimit ? "YES": "NO")); | 644 GrPrintf("Two Format Limit: %s\n", (fTwoFormatLimit ? "YES": "NO")); |
654 GrPrintf("Fragment coord conventions support: %s\n", | 645 GrPrintf("Fragment coord conventions support: %s\n", |
655 (fFragCoordsConventionSupport ? "YES": "NO")); | 646 (fFragCoordsConventionSupport ? "YES": "NO")); |
656 GrPrintf("Vertex array object support: %s\n", (fVertexArrayObjectSupport ? "
YES": "NO")); | 647 GrPrintf("Vertex array object support: %s\n", (fVertexArrayObjectSupport ? "
YES": "NO")); |
657 GrPrintf("Use non-VBO for dynamic data: %s\n", | 648 GrPrintf("Use non-VBO for dynamic data: %s\n", |
658 (fUseNonVBOVertexAndIndexDynamicData ? "YES" : "NO")); | 649 (fUseNonVBOVertexAndIndexDynamicData ? "YES" : "NO")); |
659 GrPrintf("Discard FrameBuffer support: %s\n", (fDiscardFBSupport ? "YES" : "
NO")); | 650 GrPrintf("Discard FrameBuffer support: %s\n", (fDiscardFBSupport ? "YES" : "
NO")); |
660 } | 651 } |
OLD | NEW |