From bbf05759dedafcc924fe2247f2cbdd30688a3bfe Mon Sep 17 00:00:00 2001 From: Brian Salomon Date: Thu, 30 Nov 2017 11:30:48 -0500 Subject: Reland "Set multitexturing threshold for NVIDIA" This is a reland of b4ec10431818200a41a082cfe2e82fe58a9b1ecc Original change's description: > Set multitexturing threshold for NVIDIA > > Change-Id: Ie992b34b8fdd3bf569241cce7c851880258f05df > Reviewed-on: https://skia-review.googlesource.com/78261 > Commit-Queue: Brian Salomon > Reviewed-by: Robert Phillips Change-Id: I13254698530e6f7b13f632a4a7b034ea6aef130f Reviewed-on: https://skia-review.googlesource.com/79262 Reviewed-by: Brian Salomon Commit-Queue: Brian Salomon --- src/gpu/gl/GrGLCaps.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/gpu/gl/GrGLCaps.cpp') diff --git a/src/gpu/gl/GrGLCaps.cpp b/src/gpu/gl/GrGLCaps.cpp index a2bb363648..134692d7ac 100644 --- a/src/gpu/gl/GrGLCaps.cpp +++ b/src/gpu/gl/GrGLCaps.cpp @@ -358,6 +358,17 @@ void GrGLCaps::init(const GrContextOptions& contextOptions, GR_GL_GetIntegerv(gli, GR_GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS, &maxSamplers); shaderCaps->fMaxCombinedSamplers = SkTMin(kMaxSaneSamplers, maxSamplers); + // This is all *very* approximate. + switch (ctxInfo.vendor()) { + case kNVIDIA_GrGLVendor: + // We've seen a range from 100 x 100 (TegraK1, GTX660) up to 300 x 300 (GTX 1070) + // but it doesn't clearly align with Pascal vs Maxwell vs Kepler. + fShaderCaps->fDisableImageMultitexturingDstRectAreaThreshold = 150 * 150; + break; + default: + break; + } + // SGX and Mali GPUs that are based on a tiled-deferred architecture that have trouble with // frequently changing VBOs. We've measured a performance increase using non-VBO vertex // data for dynamic content on these GPUs. Perhaps we should read the renderer string and -- cgit v1.2.3