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 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
297 if (kGL_GrGLStandard == standard) { | 297 if (kGL_GrGLStandard == standard) { |
298 if (version >= GR_GL_VER(3, 0)) { | 298 if (version >= GR_GL_VER(3, 0)) { |
299 fBindFragDataLocationSupport = true; | 299 fBindFragDataLocationSupport = true; |
300 } | 300 } |
301 } else { | 301 } else { |
302 if (version >= GR_GL_VER(3, 0) && ctxInfo.hasExtension("GL_EXT_blend_fun
c_extended")) { | 302 if (version >= GR_GL_VER(3, 0) && ctxInfo.hasExtension("GL_EXT_blend_fun
c_extended")) { |
303 fBindFragDataLocationSupport = true; | 303 fBindFragDataLocationSupport = true; |
304 } | 304 } |
305 } | 305 } |
306 | 306 |
| 307 fBindUniformLocationSupport = ctxInfo.hasExtension("GL_CHROMIUM_bind_uniform
_location"); |
| 308 |
307 #ifdef SK_BUILD_FOR_WIN | 309 #ifdef SK_BUILD_FOR_WIN |
308 // We're assuming that on Windows Chromium we're using ANGLE. | 310 // We're assuming that on Windows Chromium we're using ANGLE. |
309 bool isANGLE = kANGLE_GrGLDriver == ctxInfo.driver() || | 311 bool isANGLE = kANGLE_GrGLDriver == ctxInfo.driver() || |
310 kChromium_GrGLDriver == ctxInfo.driver(); | 312 kChromium_GrGLDriver == ctxInfo.driver(); |
311 // Angle has slow read/write pixel paths for 32bit RGBA (but fast for BGRA).
| 313 // Angle has slow read/write pixel paths for 32bit RGBA (but fast for BGRA).
|
312 fRGBA8888PixelsOpsAreSlow = isANGLE; | 314 fRGBA8888PixelsOpsAreSlow = isANGLE; |
313 // On DX9 ANGLE reading a partial FBO is slow. TODO: Check whether this is s
till true and | 315 // On DX9 ANGLE reading a partial FBO is slow. TODO: Check whether this is s
till true and |
314 // check DX11 ANGLE. | 316 // check DX11 ANGLE. |
315 fPartialFBOReadIsSlow = isANGLE; | 317 fPartialFBOReadIsSlow = isANGLE; |
316 #endif | 318 #endif |
(...skipping 785 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1102 r.appendf("Vertex array object support: %s\n", (fVertexArrayObjectSupport ?
"YES": "NO")); | 1104 r.appendf("Vertex array object support: %s\n", (fVertexArrayObjectSupport ?
"YES": "NO")); |
1103 r.appendf("Instanced drawing support: %s\n", (fInstancedDrawingSupport ? "YE
S": "NO")); | 1105 r.appendf("Instanced drawing support: %s\n", (fInstancedDrawingSupport ? "YE
S": "NO")); |
1104 r.appendf("Direct state access support: %s\n", (fDirectStateAccessSupport ?
"YES": "NO")); | 1106 r.appendf("Direct state access support: %s\n", (fDirectStateAccessSupport ?
"YES": "NO")); |
1105 r.appendf("Debug support: %s\n", (fDebugSupport ? "YES": "NO")); | 1107 r.appendf("Debug support: %s\n", (fDebugSupport ? "YES": "NO")); |
1106 r.appendf("Multisample disable support: %s\n", (fMultisampleDisableSupport ?
"YES" : "NO")); | 1108 r.appendf("Multisample disable support: %s\n", (fMultisampleDisableSupport ?
"YES" : "NO")); |
1107 r.appendf("Use non-VBO for dynamic data: %s\n", | 1109 r.appendf("Use non-VBO for dynamic data: %s\n", |
1108 (fUseNonVBOVertexAndIndexDynamicData ? "YES" : "NO")); | 1110 (fUseNonVBOVertexAndIndexDynamicData ? "YES" : "NO")); |
1109 r.appendf("SRGB write contol: %s\n", (fSRGBWriteControl ? "YES" : "NO")); | 1111 r.appendf("SRGB write contol: %s\n", (fSRGBWriteControl ? "YES" : "NO")); |
1110 r.appendf("RGBA 8888 pixel ops are slow: %s\n", (fRGBA8888PixelsOpsAreSlow ?
"YES" : "NO")); | 1112 r.appendf("RGBA 8888 pixel ops are slow: %s\n", (fRGBA8888PixelsOpsAreSlow ?
"YES" : "NO")); |
1111 r.appendf("Partial FBO read is slow: %s\n", (fPartialFBOReadIsSlow ? "YES" :
"NO")); | 1113 r.appendf("Partial FBO read is slow: %s\n", (fPartialFBOReadIsSlow ? "YES" :
"NO")); |
| 1114 r.appendf("Bind uniform location support: %s\n", (fBindUniformLocationSuppor
t ? "YES" : "NO")); |
1112 return r; | 1115 return r; |
1113 } | 1116 } |
1114 | 1117 |
1115 static GrGLenum precision_to_gl_float_type(GrSLPrecision p) { | 1118 static GrGLenum precision_to_gl_float_type(GrSLPrecision p) { |
1116 switch (p) { | 1119 switch (p) { |
1117 case kLow_GrSLPrecision: | 1120 case kLow_GrSLPrecision: |
1118 return GR_GL_LOW_FLOAT; | 1121 return GR_GL_LOW_FLOAT; |
1119 case kMedium_GrSLPrecision: | 1122 case kMedium_GrSLPrecision: |
1120 return GR_GL_MEDIUM_FLOAT; | 1123 return GR_GL_MEDIUM_FLOAT; |
1121 case kHigh_GrSLPrecision: | 1124 case kHigh_GrSLPrecision: |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1192 for (int p = 0; p < kGrSLPrecisionCount; ++p) { | 1195 for (int p = 0; p < kGrSLPrecisionCount; ++p) { |
1193 glslCaps->fFloatPrecisions[kGeometry_GrShaderType][p] = | 1196 glslCaps->fFloatPrecisions[kGeometry_GrShaderType][p] = |
1194 glslCaps->fFloatPrecisions[kVerte
x_GrShaderType][p]; | 1197 glslCaps->fFloatPrecisions[kVerte
x_GrShaderType][p]; |
1195 } | 1198 } |
1196 } | 1199 } |
1197 } | 1200 } |
1198 | 1201 |
1199 | 1202 |
1200 | 1203 |
1201 | 1204 |
OLD | NEW |