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 581 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
592 // filtering modes are not supported. This is for simplicity, but a more | 592 // filtering modes are not supported. This is for simplicity, but a more |
593 // granular approach is possible. Coincidentally, floating point textures b
ecame part of | 593 // granular approach is possible. Coincidentally, floating point textures b
ecame part of |
594 // the standard in ES3.1 / OGL 3.1, hence the shorthand | 594 // the standard in ES3.1 / OGL 3.1, hence the shorthand |
595 bool hasFPTextures = version >= GR_GL_VER(3, 1); | 595 bool hasFPTextures = version >= GR_GL_VER(3, 1); |
596 if (!hasFPTextures) { | 596 if (!hasFPTextures) { |
597 hasFPTextures = ctxInfo.hasExtension("GL_ARB_texture_float") || | 597 hasFPTextures = ctxInfo.hasExtension("GL_ARB_texture_float") || |
598 (ctxInfo.hasExtension("OES_texture_float_linear") && | 598 (ctxInfo.hasExtension("OES_texture_float_linear") && |
599 ctxInfo.hasExtension("GL_OES_texture_float")); | 599 ctxInfo.hasExtension("GL_OES_texture_float")); |
600 } | 600 } |
601 fConfigTextureSupport[kRGBA_float_GrPixelConfig] = hasFPTextures; | 601 fConfigTextureSupport[kRGBA_float_GrPixelConfig] = hasFPTextures; |
| 602 |
| 603 // 3D textures. Texture wrap modes and mip-mapping is supported for power |
| 604 // of two 3D textures. Mip-mapping and texture wrap modes other than |
| 605 // CLAMP_TO_EDGE are not supported for non-power of two 3D textures. |
| 606 // The OES_texture_npot extension, if supported, will enable mip-mapping |
| 607 // and other wrap modes for non-power of two 3D textures. |
| 608 f3DTexImageSupport = |
| 609 (version >= GR_GL_VER(1, 2)) || // glTexture3D has been core since OpenG
L 1.2 |
| 610 ctxInfo.hasExtension("GL_EXT_texture_3D") || |
| 611 ctxInfo.hasExtension("GL_OES_texture_3D"); // No need for npot for now |
602 } | 612 } |
603 | 613 |
604 bool GrGLCaps::readPixelsSupported(const GrGLInterface* intf, | 614 bool GrGLCaps::readPixelsSupported(const GrGLInterface* intf, |
605 GrGLenum format, | 615 GrGLenum format, |
606 GrGLenum type) const { | 616 GrGLenum type) const { |
607 if (GR_GL_RGBA == format && GR_GL_UNSIGNED_BYTE == type) { | 617 if (GR_GL_RGBA == format && GR_GL_UNSIGNED_BYTE == type) { |
608 // ES 2 guarantees this format is supported | 618 // ES 2 guarantees this format is supported |
609 return true; | 619 return true; |
610 } | 620 } |
611 | 621 |
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
841 r.appendf("Two Format Limit: %s\n", (fTwoFormatLimit ? "YES": "NO")); | 851 r.appendf("Two Format Limit: %s\n", (fTwoFormatLimit ? "YES": "NO")); |
842 r.appendf("Fragment coord conventions support: %s\n", | 852 r.appendf("Fragment coord conventions support: %s\n", |
843 (fFragCoordsConventionSupport ? "YES": "NO")); | 853 (fFragCoordsConventionSupport ? "YES": "NO")); |
844 r.appendf("Vertex array object support: %s\n", (fVertexArrayObjectSupport ?
"YES": "NO")); | 854 r.appendf("Vertex array object support: %s\n", (fVertexArrayObjectSupport ?
"YES": "NO")); |
845 r.appendf("Use non-VBO for dynamic data: %s\n", | 855 r.appendf("Use non-VBO for dynamic data: %s\n", |
846 (fUseNonVBOVertexAndIndexDynamicData ? "YES" : "NO")); | 856 (fUseNonVBOVertexAndIndexDynamicData ? "YES" : "NO")); |
847 r.appendf("Full screen clear is free: %s\n", (fFullClearIsFree ? "YES" : "NO
")); | 857 r.appendf("Full screen clear is free: %s\n", (fFullClearIsFree ? "YES" : "NO
")); |
848 r.appendf("Drops tile on zero divide: %s\n", (fDropsTileOnZeroDivide ? "YES"
: "NO")); | 858 r.appendf("Drops tile on zero divide: %s\n", (fDropsTileOnZeroDivide ? "YES"
: "NO")); |
849 return r; | 859 return r; |
850 } | 860 } |
OLD | NEW |