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 | |
bsalomon
2014/09/19 13:47:04
Need tests for support on OpenGL, not just GLES.
sugoi1
2014/09/24 19:12:48
Done.
| |
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 ctxInfo.hasExtension("GL_OES_texture_3D"); // No need for npot for now | |
602 } | 610 } |
603 | 611 |
604 bool GrGLCaps::readPixelsSupported(const GrGLInterface* intf, | 612 bool GrGLCaps::readPixelsSupported(const GrGLInterface* intf, |
605 GrGLenum format, | 613 GrGLenum format, |
606 GrGLenum type) const { | 614 GrGLenum type) const { |
607 if (GR_GL_RGBA == format && GR_GL_UNSIGNED_BYTE == type) { | 615 if (GR_GL_RGBA == format && GR_GL_UNSIGNED_BYTE == type) { |
608 // ES 2 guarantees this format is supported | 616 // ES 2 guarantees this format is supported |
609 return true; | 617 return true; |
610 } | 618 } |
611 | 619 |
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
841 r.appendf("Two Format Limit: %s\n", (fTwoFormatLimit ? "YES": "NO")); | 849 r.appendf("Two Format Limit: %s\n", (fTwoFormatLimit ? "YES": "NO")); |
842 r.appendf("Fragment coord conventions support: %s\n", | 850 r.appendf("Fragment coord conventions support: %s\n", |
843 (fFragCoordsConventionSupport ? "YES": "NO")); | 851 (fFragCoordsConventionSupport ? "YES": "NO")); |
844 r.appendf("Vertex array object support: %s\n", (fVertexArrayObjectSupport ? "YES": "NO")); | 852 r.appendf("Vertex array object support: %s\n", (fVertexArrayObjectSupport ? "YES": "NO")); |
845 r.appendf("Use non-VBO for dynamic data: %s\n", | 853 r.appendf("Use non-VBO for dynamic data: %s\n", |
846 (fUseNonVBOVertexAndIndexDynamicData ? "YES" : "NO")); | 854 (fUseNonVBOVertexAndIndexDynamicData ? "YES" : "NO")); |
847 r.appendf("Full screen clear is free: %s\n", (fFullClearIsFree ? "YES" : "NO ")); | 855 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")); | 856 r.appendf("Drops tile on zero divide: %s\n", (fDropsTileOnZeroDivide ? "YES" : "NO")); |
849 return r; | 857 return r; |
850 } | 858 } |
OLD | NEW |