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 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
351 // ES3 has no limitations. | 351 // ES3 has no limitations. |
352 fNPOTTextureTileSupport = ctxInfo.version() >= GR_GL_VER(3,0) || | 352 fNPOTTextureTileSupport = ctxInfo.version() >= GR_GL_VER(3,0) || |
353 ctxInfo.hasExtension("GL_OES_texture_npot"); | 353 ctxInfo.hasExtension("GL_OES_texture_npot"); |
354 // ES2 supports MIP mapping for POT textures but our caps don't allow fo
r limited MIP | 354 // ES2 supports MIP mapping for POT textures but our caps don't allow fo
r limited MIP |
355 // support. The OES extension or ES 3.0 allow for MIPS on NPOT textures.
So, apparently, | 355 // support. The OES extension or ES 3.0 allow for MIPS on NPOT textures.
So, apparently, |
356 // does the undocumented GL_IMG_texture_npot extension. This extension d
oes not seem to | 356 // does the undocumented GL_IMG_texture_npot extension. This extension d
oes not seem to |
357 // to alllow arbitrary wrap modes, however. | 357 // to alllow arbitrary wrap modes, however. |
358 fMipMapSupport = fNPOTTextureTileSupport || ctxInfo.hasExtension("GL_IMG
_texture_npot"); | 358 fMipMapSupport = fNPOTTextureTileSupport || ctxInfo.hasExtension("GL_IMG
_texture_npot"); |
359 } | 359 } |
360 | 360 |
| 361 // Using MIPs on this GPU seems to be a source of trouble. |
| 362 if (kPowerVR54x_GrGLRenderer == ctxInfo.renderer()) { |
| 363 fMipMapSupport = false; |
| 364 } |
| 365 |
361 GR_GL_GetIntegerv(gli, GR_GL_MAX_TEXTURE_SIZE, &fMaxTextureSize); | 366 GR_GL_GetIntegerv(gli, GR_GL_MAX_TEXTURE_SIZE, &fMaxTextureSize); |
362 GR_GL_GetIntegerv(gli, GR_GL_MAX_RENDERBUFFER_SIZE, &fMaxRenderTargetSize); | 367 GR_GL_GetIntegerv(gli, GR_GL_MAX_RENDERBUFFER_SIZE, &fMaxRenderTargetSize); |
363 // Our render targets are always created with textures as the color | 368 // Our render targets are always created with textures as the color |
364 // attachment, hence this min: | 369 // attachment, hence this min: |
365 fMaxRenderTargetSize = SkTMin(fMaxTextureSize, fMaxRenderTargetSize); | 370 fMaxRenderTargetSize = SkTMin(fMaxTextureSize, fMaxRenderTargetSize); |
366 | 371 |
367 // This GPU seems to have problems when tiling small textures | 372 // This GPU seems to have problems when tiling small textures |
368 if (kPowerVR54x_GrGLRenderer == ctxInfo.renderer()) { | 373 if (kPowerVR54x_GrGLRenderer == ctxInfo.renderer()) { |
369 fMinTextureSize = 16; | 374 fMinTextureSize = 16; |
370 } | 375 } |
(...skipping 895 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1266 for (int p = 0; p < kGrSLPrecisionCount; ++p) { | 1271 for (int p = 0; p < kGrSLPrecisionCount; ++p) { |
1267 glslCaps->fFloatPrecisions[kGeometry_GrShaderType][p] = | 1272 glslCaps->fFloatPrecisions[kGeometry_GrShaderType][p] = |
1268 glslCaps->fFloatPrecisions[kVerte
x_GrShaderType][p]; | 1273 glslCaps->fFloatPrecisions[kVerte
x_GrShaderType][p]; |
1269 } | 1274 } |
1270 } | 1275 } |
1271 } | 1276 } |
1272 | 1277 |
1273 | 1278 |
1274 | 1279 |
1275 | 1280 |
OLD | NEW |