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 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
202 if (kIntel_GrGLVendor != ctxInfo.vendor()) { | 202 if (kIntel_GrGLVendor != ctxInfo.vendor()) { |
203 fFragCoordsConventionSupport = ctxInfo.glslGeneration() >= k150_GrGLSLGe
neration || | 203 fFragCoordsConventionSupport = ctxInfo.glslGeneration() >= k150_GrGLSLGe
neration || |
204 ctxInfo.hasExtension("GL_ARB_fragment_coo
rd_conventions"); | 204 ctxInfo.hasExtension("GL_ARB_fragment_coo
rd_conventions"); |
205 } | 205 } |
206 | 206 |
207 // SGX and Mali GPUs that are based on a tiled-deferred architecture that ha
ve trouble with | 207 // SGX and Mali GPUs that are based on a tiled-deferred architecture that ha
ve trouble with |
208 // frequently changing VBOs. We've measured a performance increase using non
-VBO vertex | 208 // frequently changing VBOs. We've measured a performance increase using non
-VBO vertex |
209 // data for dynamic content on these GPUs. Perhaps we should read the render
er string and | 209 // data for dynamic content on these GPUs. Perhaps we should read the render
er string and |
210 // limit this decision to specific GPU families rather than basing it on the
vendor alone. | 210 // limit this decision to specific GPU families rather than basing it on the
vendor alone. |
211 if (!GR_GL_MUST_USE_VBO && | 211 if (!GR_GL_MUST_USE_VBO && |
212 (kARM_GrGLVendor == ctxInfo.vendor() || kImagination_GrGLVendor == ctxIn
fo.vendor())) { | 212 (kARM_GrGLVendor == ctxInfo.vendor() || |
| 213 kImagination_GrGLVendor == ctxInfo.vendor() || |
| 214 kQualcomm_GrGLVendor == ctxInfo.vendor())) { |
213 fUseNonVBOVertexAndIndexDynamicData = true; | 215 fUseNonVBOVertexAndIndexDynamicData = true; |
214 } | 216 } |
215 | 217 |
216 if ((kGL_GrGLStandard == standard && version >= GR_GL_VER(4,3)) || | 218 if ((kGL_GrGLStandard == standard && version >= GR_GL_VER(4,3)) || |
217 (kGLES_GrGLStandard == standard && version >= GR_GL_VER(3,0)) || | 219 (kGLES_GrGLStandard == standard && version >= GR_GL_VER(3,0)) || |
218 ctxInfo.hasExtension("GL_ARB_invalidate_subdata")) { | 220 ctxInfo.hasExtension("GL_ARB_invalidate_subdata")) { |
219 fDiscardRenderTargetSupport = true; | 221 fDiscardRenderTargetSupport = true; |
220 fInvalidateFBType = kInvalidate_InvalidateFBType; | 222 fInvalidateFBType = kInvalidate_InvalidateFBType; |
221 } else if (ctxInfo.hasExtension("GL_EXT_discard_framebuffer")) { | 223 } else if (ctxInfo.hasExtension("GL_EXT_discard_framebuffer")) { |
222 fDiscardRenderTargetSupport = true; | 224 fDiscardRenderTargetSupport = true; |
(...skipping 616 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
839 r.appendf("Two Format Limit: %s\n", (fTwoFormatLimit ? "YES": "NO")); | 841 r.appendf("Two Format Limit: %s\n", (fTwoFormatLimit ? "YES": "NO")); |
840 r.appendf("Fragment coord conventions support: %s\n", | 842 r.appendf("Fragment coord conventions support: %s\n", |
841 (fFragCoordsConventionSupport ? "YES": "NO")); | 843 (fFragCoordsConventionSupport ? "YES": "NO")); |
842 r.appendf("Vertex array object support: %s\n", (fVertexArrayObjectSupport ?
"YES": "NO")); | 844 r.appendf("Vertex array object support: %s\n", (fVertexArrayObjectSupport ?
"YES": "NO")); |
843 r.appendf("Use non-VBO for dynamic data: %s\n", | 845 r.appendf("Use non-VBO for dynamic data: %s\n", |
844 (fUseNonVBOVertexAndIndexDynamicData ? "YES" : "NO")); | 846 (fUseNonVBOVertexAndIndexDynamicData ? "YES" : "NO")); |
845 r.appendf("Full screen clear is free: %s\n", (fFullClearIsFree ? "YES" : "NO
")); | 847 r.appendf("Full screen clear is free: %s\n", (fFullClearIsFree ? "YES" : "NO
")); |
846 r.appendf("Drops tile on zero divide: %s\n", (fDropsTileOnZeroDivide ? "YES"
: "NO")); | 848 r.appendf("Drops tile on zero divide: %s\n", (fDropsTileOnZeroDivide ? "YES"
: "NO")); |
847 return r; | 849 return r; |
848 } | 850 } |
OLD | NEW |