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 453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
464 if (kPowerVR54x_GrGLRenderer == ctxInfo.renderer() || | 464 if (kPowerVR54x_GrGLRenderer == ctxInfo.renderer() || |
465 kPowerVRRogue_GrGLRenderer == ctxInfo.renderer() || | 465 kPowerVRRogue_GrGLRenderer == ctxInfo.renderer() || |
466 kAdreno3xx_GrGLRenderer == ctxInfo.renderer()) { | 466 kAdreno3xx_GrGLRenderer == ctxInfo.renderer()) { |
467 fUseDrawInsteadOfClear = true; | 467 fUseDrawInsteadOfClear = true; |
468 } | 468 } |
469 | 469 |
470 if (kAdreno4xx_GrGLRenderer == ctxInfo.renderer()) { | 470 if (kAdreno4xx_GrGLRenderer == ctxInfo.renderer()) { |
471 fUseDrawInsteadOfPartialRenderTargetWrite = true; | 471 fUseDrawInsteadOfPartialRenderTargetWrite = true; |
472 } | 472 } |
473 | 473 |
| 474 #ifdef SK_BUILD_FOR_WIN |
| 475 // On ANGLE deferring flushes can lead to GPU starvation |
| 476 fPreferVRAMUseOverFlushes = !isANGLE; |
| 477 #endif |
| 478 |
474 if (kChromium_GrGLDriver == ctxInfo.driver()) { | 479 if (kChromium_GrGLDriver == ctxInfo.driver()) { |
475 fMustClearUploadedBufferData = true; | 480 fMustClearUploadedBufferData = true; |
476 } | 481 } |
477 | 482 |
478 if (kGL_GrGLStandard == standard) { | 483 if (kGL_GrGLStandard == standard) { |
479 // ARB allows mixed size FBO attachments, EXT does not. | 484 // ARB allows mixed size FBO attachments, EXT does not. |
480 if (ctxInfo.version() >= GR_GL_VER(3, 0) || | 485 if (ctxInfo.version() >= GR_GL_VER(3, 0) || |
481 ctxInfo.hasExtension("GL_ARB_framebuffer_object")) { | 486 ctxInfo.hasExtension("GL_ARB_framebuffer_object")) { |
482 fOversizedStencilSupport = true; | 487 fOversizedStencilSupport = true; |
483 } else { | 488 } else { |
(...skipping 656 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1140 r.appendf("Fragment coord conventions support: %s\n", | 1145 r.appendf("Fragment coord conventions support: %s\n", |
1141 (fFragCoordsConventionSupport ? "YES": "NO")); | 1146 (fFragCoordsConventionSupport ? "YES": "NO")); |
1142 r.appendf("Vertex array object support: %s\n", (fVertexArrayObjectSupport ?
"YES": "NO")); | 1147 r.appendf("Vertex array object support: %s\n", (fVertexArrayObjectSupport ?
"YES": "NO")); |
1143 r.appendf("Instanced drawing support: %s\n", (fInstancedDrawingSupport ? "YE
S": "NO")); | 1148 r.appendf("Instanced drawing support: %s\n", (fInstancedDrawingSupport ? "YE
S": "NO")); |
1144 r.appendf("Direct state access support: %s\n", (fDirectStateAccessSupport ?
"YES": "NO")); | 1149 r.appendf("Direct state access support: %s\n", (fDirectStateAccessSupport ?
"YES": "NO")); |
1145 r.appendf("Debug support: %s\n", (fDebugSupport ? "YES": "NO")); | 1150 r.appendf("Debug support: %s\n", (fDebugSupport ? "YES": "NO")); |
1146 r.appendf("Multisample disable support: %s\n", (fMultisampleDisableSupport ?
"YES" : "NO")); | 1151 r.appendf("Multisample disable support: %s\n", (fMultisampleDisableSupport ?
"YES" : "NO")); |
1147 r.appendf("Use non-VBO for dynamic data: %s\n", | 1152 r.appendf("Use non-VBO for dynamic data: %s\n", |
1148 (fUseNonVBOVertexAndIndexDynamicData ? "YES" : "NO")); | 1153 (fUseNonVBOVertexAndIndexDynamicData ? "YES" : "NO")); |
1149 r.appendf("SRGB write contol: %s\n", (fSRGBWriteControl ? "YES" : "NO")); | 1154 r.appendf("SRGB write contol: %s\n", (fSRGBWriteControl ? "YES" : "NO")); |
1150 r.appendf("RGBA 8888 pixel ops are slow: %s\n", (fRGBA8888PixelsOpsAreSlow?
"YES" : "NO")); | 1155 r.appendf("RGBA 8888 pixel ops are slow: %s\n", (fRGBA8888PixelsOpsAreSlow ?
"YES" : "NO")); |
1151 r.appendf("Partial FBO read is slow: %s\n", (fPartialFBOReadIsSlow? "YES" :
"NO")); | 1156 r.appendf("Partial FBO read is slow: %s\n", (fPartialFBOReadIsSlow ? "YES" :
"NO")); |
1152 return r; | 1157 return r; |
1153 } | 1158 } |
1154 | 1159 |
1155 static GrGLenum precision_to_gl_float_type(GrSLPrecision p) { | 1160 static GrGLenum precision_to_gl_float_type(GrSLPrecision p) { |
1156 switch (p) { | 1161 switch (p) { |
1157 case kLow_GrSLPrecision: | 1162 case kLow_GrSLPrecision: |
1158 return GR_GL_LOW_FLOAT; | 1163 return GR_GL_LOW_FLOAT; |
1159 case kMedium_GrSLPrecision: | 1164 case kMedium_GrSLPrecision: |
1160 return GR_GL_MEDIUM_FLOAT; | 1165 return GR_GL_MEDIUM_FLOAT; |
1161 case kHigh_GrSLPrecision: | 1166 case kHigh_GrSLPrecision: |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1232 for (int p = 0; p < kGrSLPrecisionCount; ++p) { | 1237 for (int p = 0; p < kGrSLPrecisionCount; ++p) { |
1233 glslCaps->fFloatPrecisions[kGeometry_GrShaderType][p] = | 1238 glslCaps->fFloatPrecisions[kGeometry_GrShaderType][p] = |
1234 glslCaps->fFloatPrecisions[kVerte
x_GrShaderType][p]; | 1239 glslCaps->fFloatPrecisions[kVerte
x_GrShaderType][p]; |
1235 } | 1240 } |
1236 } | 1241 } |
1237 } | 1242 } |
1238 | 1243 |
1239 | 1244 |
1240 | 1245 |
1241 | 1246 |
OLD | NEW |