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 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 fTexStorageSupport = version >= GR_GL_VER(4,2) || | 171 fTexStorageSupport = version >= GR_GL_VER(4,2) || |
172 ctxInfo.hasExtension("GL_ARB_texture_storage") || | 172 ctxInfo.hasExtension("GL_ARB_texture_storage") || |
173 ctxInfo.hasExtension("GL_EXT_texture_storage"); | 173 ctxInfo.hasExtension("GL_EXT_texture_storage"); |
174 } else { | 174 } else { |
175 // Qualcomm Adreno drivers appear to have issues with texture storage. | 175 // Qualcomm Adreno drivers appear to have issues with texture storage. |
176 fTexStorageSupport = (version >= GR_GL_VER(3,0) && | 176 fTexStorageSupport = (version >= GR_GL_VER(3,0) && |
177 kQualcomm_GrGLVendor != ctxInfo.vendor()) || | 177 kQualcomm_GrGLVendor != ctxInfo.vendor()) || |
178 ctxInfo.hasExtension("GL_EXT_texture_storage"); | 178 ctxInfo.hasExtension("GL_EXT_texture_storage"); |
179 } | 179 } |
180 | 180 |
181 // ARB_texture_rg is part of OpenGL 3.0, but mesa doesn't support it if | 181 // ARB_texture_rg is part of OpenGL 3.0, but mesa doesn't support GL_RED |
182 // it doesn't have ARB_texture_rg extension. | 182 // and GL_RG on FBO textures. |
183 if (kGL_GrGLStandard == standard) { | 183 if (!ctxInfo.isMesa()) { |
184 if (ctxInfo.isMesa()) { | 184 if (kGL_GrGLStandard == standard) { |
185 fTextureRedSupport = ctxInfo.hasExtension("GL_ARB_texture_rg"); | |
186 } else { | |
187 fTextureRedSupport = version >= GR_GL_VER(3,0) || | 185 fTextureRedSupport = version >= GR_GL_VER(3,0) || |
188 ctxInfo.hasExtension("GL_ARB_texture_rg"); | 186 ctxInfo.hasExtension("GL_ARB_texture_rg"); |
| 187 } else { |
| 188 fTextureRedSupport = version >= GR_GL_VER(3,0) || |
| 189 ctxInfo.hasExtension("GL_EXT_texture_rg"); |
189 } | 190 } |
190 } else { | |
191 fTextureRedSupport = version >= GR_GL_VER(3,0) || | |
192 ctxInfo.hasExtension("GL_EXT_texture_rg"); | |
193 } | 191 } |
194 | |
195 fImagingSupport = kGL_GrGLStandard == standard && | 192 fImagingSupport = kGL_GrGLStandard == standard && |
196 ctxInfo.hasExtension("GL_ARB_imaging"); | 193 ctxInfo.hasExtension("GL_ARB_imaging"); |
197 | 194 |
198 // ES 2 only guarantees RGBA/uchar + one other format/type combo for | 195 // ES 2 only guarantees RGBA/uchar + one other format/type combo for |
199 // ReadPixels. The other format has to checked at run-time since it | 196 // ReadPixels. The other format has to checked at run-time since it |
200 // can change based on which render target is bound | 197 // can change based on which render target is bound |
201 fTwoFormatLimit = kGLES_GrGLStandard == standard; | 198 fTwoFormatLimit = kGLES_GrGLStandard == standard; |
202 | 199 |
203 // Frag Coords Convention support is not part of ES | 200 // Frag Coords Convention support is not part of ES |
204 // Known issue on at least some Intel platforms: | 201 // Known issue on at least some Intel platforms: |
(...skipping 667 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
872 r.appendf("Two Format Limit: %s\n", (fTwoFormatLimit ? "YES": "NO")); | 869 r.appendf("Two Format Limit: %s\n", (fTwoFormatLimit ? "YES": "NO")); |
873 r.appendf("Fragment coord conventions support: %s\n", | 870 r.appendf("Fragment coord conventions support: %s\n", |
874 (fFragCoordsConventionSupport ? "YES": "NO")); | 871 (fFragCoordsConventionSupport ? "YES": "NO")); |
875 r.appendf("Vertex array object support: %s\n", (fVertexArrayObjectSupport ?
"YES": "NO")); | 872 r.appendf("Vertex array object support: %s\n", (fVertexArrayObjectSupport ?
"YES": "NO")); |
876 r.appendf("Use non-VBO for dynamic data: %s\n", | 873 r.appendf("Use non-VBO for dynamic data: %s\n", |
877 (fUseNonVBOVertexAndIndexDynamicData ? "YES" : "NO")); | 874 (fUseNonVBOVertexAndIndexDynamicData ? "YES" : "NO")); |
878 r.appendf("Full screen clear is free: %s\n", (fFullClearIsFree ? "YES" : "NO
")); | 875 r.appendf("Full screen clear is free: %s\n", (fFullClearIsFree ? "YES" : "NO
")); |
879 r.appendf("Drops tile on zero divide: %s\n", (fDropsTileOnZeroDivide ? "YES"
: "NO")); | 876 r.appendf("Drops tile on zero divide: %s\n", (fDropsTileOnZeroDivide ? "YES"
: "NO")); |
880 return r; | 877 return r; |
881 } | 878 } |
OLD | NEW |