Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(71)

Side by Side Diff: src/gpu/gl/GrGLCaps.cpp

Issue 1414743008: Disable MIP mapping on PowerVR 54x. This GPU spews a lot of errors when using GenerateMipMaps. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698