| 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 545 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 556 fLATCAlias = alias; | 556 fLATCAlias = alias; |
| 557 | 557 |
| 558 // Check for R11_EAC | 558 // Check for R11_EAC |
| 559 if (kGL_GrGLStandard == standard) { | 559 if (kGL_GrGLStandard == standard) { |
| 560 fConfigTextureSupport[kR11_EAC_GrPixelConfig] = | 560 fConfigTextureSupport[kR11_EAC_GrPixelConfig] = |
| 561 version >= GR_GL_VER(4, 3) || ctxInfo.hasExtension("GL_ARB_ES3_compa
tibility"); | 561 version >= GR_GL_VER(4, 3) || ctxInfo.hasExtension("GL_ARB_ES3_compa
tibility"); |
| 562 } else { | 562 } else { |
| 563 fConfigTextureSupport[kR11_EAC_GrPixelConfig] = version >= GR_GL_VER(3,
0); | 563 fConfigTextureSupport[kR11_EAC_GrPixelConfig] = version >= GR_GL_VER(3,
0); |
| 564 } | 564 } |
| 565 | 565 |
| 566 // Check for ASTC |
| 567 fConfigTextureSupport[kASTC_12x12_GrPixelConfig] = |
| 568 ctxInfo.hasExtension("GL_KHR_texture_compression_astc_hdr") || |
| 569 ctxInfo.hasExtension("GL_KHR_texture_compression_astc_ldr") || |
| 570 ctxInfo.hasExtension("GL_OES_texture_compression_astc"); |
| 571 |
| 566 // Check for floating point texture support | 572 // Check for floating point texture support |
| 567 // NOTE: We disallow floating point textures on ES devices if linear | 573 // NOTE: We disallow floating point textures on ES devices if linear |
| 568 // filtering modes are not supported. This is for simplicity, but a more | 574 // filtering modes are not supported. This is for simplicity, but a more |
| 569 // granular approach is possible. Coincidentally, floating point textures b
ecame part of | 575 // granular approach is possible. Coincidentally, floating point textures b
ecame part of |
| 570 // the standard in ES3.1 / OGL 3.1, hence the shorthand | 576 // the standard in ES3.1 / OGL 3.1, hence the shorthand |
| 571 bool hasFPTextures = version >= GR_GL_VER(3, 1); | 577 bool hasFPTextures = version >= GR_GL_VER(3, 1); |
| 572 if (!hasFPTextures) { | 578 if (!hasFPTextures) { |
| 573 hasFPTextures = ctxInfo.hasExtension("GL_ARB_texture_float") || | 579 hasFPTextures = ctxInfo.hasExtension("GL_ARB_texture_float") || |
| 574 (ctxInfo.hasExtension("OES_texture_float_linear") && | 580 (ctxInfo.hasExtension("OES_texture_float_linear") && |
| 575 ctxInfo.hasExtension("GL_OES_texture_float")); | 581 ctxInfo.hasExtension("GL_OES_texture_float")); |
| (...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 827 r.appendf("Two Format Limit: %s\n", (fTwoFormatLimit ? "YES": "NO")); | 833 r.appendf("Two Format Limit: %s\n", (fTwoFormatLimit ? "YES": "NO")); |
| 828 r.appendf("Fragment coord conventions support: %s\n", | 834 r.appendf("Fragment coord conventions support: %s\n", |
| 829 (fFragCoordsConventionSupport ? "YES": "NO")); | 835 (fFragCoordsConventionSupport ? "YES": "NO")); |
| 830 r.appendf("Vertex array object support: %s\n", (fVertexArrayObjectSupport ?
"YES": "NO")); | 836 r.appendf("Vertex array object support: %s\n", (fVertexArrayObjectSupport ?
"YES": "NO")); |
| 831 r.appendf("Use non-VBO for dynamic data: %s\n", | 837 r.appendf("Use non-VBO for dynamic data: %s\n", |
| 832 (fUseNonVBOVertexAndIndexDynamicData ? "YES" : "NO")); | 838 (fUseNonVBOVertexAndIndexDynamicData ? "YES" : "NO")); |
| 833 r.appendf("Full screen clear is free: %s\n", (fFullClearIsFree ? "YES" : "NO
")); | 839 r.appendf("Full screen clear is free: %s\n", (fFullClearIsFree ? "YES" : "NO
")); |
| 834 r.appendf("Drops tile on zero divide: %s\n", (fDropsTileOnZeroDivide ? "YES"
: "NO")); | 840 r.appendf("Drops tile on zero divide: %s\n", (fDropsTileOnZeroDivide ? "YES"
: "NO")); |
| 835 return r; | 841 return r; |
| 836 } | 842 } |
| OLD | NEW |