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

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

Issue 1673093002: Use noperspective interpolation for 2D draws (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fName -> fVsOut Created 4 years, 10 months 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 | « src/gpu/batches/GrPLSPathRenderer.cpp ('k') | src/gpu/gl/GrGLGpu.cpp » ('j') | 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 576 matching lines...) Expand 10 before | Expand all | Expand 10 after
587 glslCaps->fFBFetchNeedsCustomOutput = false; 587 glslCaps->fFBFetchNeedsCustomOutput = false;
588 glslCaps->fFBFetchSupport = true; 588 glslCaps->fFBFetchSupport = true;
589 glslCaps->fFBFetchColorName = "gl_LastFragColorARM"; 589 glslCaps->fFBFetchColorName = "gl_LastFragColorARM";
590 glslCaps->fFBFetchExtensionString = "GL_ARM_shader_framebuffer_fetch "; 590 glslCaps->fFBFetchExtensionString = "GL_ARM_shader_framebuffer_fetch ";
591 } 591 }
592 glslCaps->fUsesPrecisionModifiers = true; 592 glslCaps->fUsesPrecisionModifiers = true;
593 } 593 }
594 594
595 glslCaps->fBindlessTextureSupport = ctxInfo.hasExtension("GL_NV_bindless_tex ture"); 595 glslCaps->fBindlessTextureSupport = ctxInfo.hasExtension("GL_NV_bindless_tex ture");
596 596
597 if (kGL_GrGLStandard == standard) {
598 glslCaps->fFlatInterpolationSupport = ctxInfo.glslGeneration() >= k130_G rGLSLGeneration;
599 } else {
600 glslCaps->fFlatInterpolationSupport =
601 ctxInfo.glslGeneration() >= k330_GrGLSLGeneration; // This is the va lue for GLSL ES 3.0.
602 }
603
604 if (kGL_GrGLStandard == standard) {
605 glslCaps->fNoPerspectiveInterpolationSupport =
606 ctxInfo.glslGeneration() >= k130_GrGLSLGeneration;
607 } else {
608 if (ctxInfo.hasExtension("GL_NV_shader_noperspective_interpolation")) {
609 glslCaps->fNoPerspectiveInterpolationSupport = true;
610 glslCaps->fNoPerspectiveInterpolationExtensionString =
611 "GL_NV_shader_noperspective_interpolation";
612 }
613 }
614
597 // Adreno GPUs have a tendency to drop tiles when there is a divide-by-zero in a shader 615 // Adreno GPUs have a tendency to drop tiles when there is a divide-by-zero in a shader
598 glslCaps->fDropsTileOnZeroDivide = kQualcomm_GrGLVendor == ctxInfo.vendor(); 616 glslCaps->fDropsTileOnZeroDivide = kQualcomm_GrGLVendor == ctxInfo.vendor();
599 617
600 // On the NexusS and GalaxyNexus, the use of 'any' causes the compilation er ror "Calls to any 618 // On the NexusS and GalaxyNexus, the use of 'any' causes the compilation er ror "Calls to any
601 // function that may require a gradient calculation inside a conditional blo ck may return 619 // function that may require a gradient calculation inside a conditional blo ck may return
602 // undefined results". This appears to be an issue with the 'any' call since even the simple 620 // undefined results". This appears to be an issue with the 'any' call since even the simple
603 // "result=black; if (any()) result=white;" code fails to compile. This issu e comes into play 621 // "result=black; if (any()) result=white;" code fails to compile. This issu e comes into play
604 // from our GrTextureDomain processor. 622 // from our GrTextureDomain processor.
605 glslCaps->fCanUseAnyFunctionInShader = kImagination_GrGLVendor != ctxInfo.ve ndor(); 623 glslCaps->fCanUseAnyFunctionInShader = kImagination_GrGLVendor != ctxInfo.ve ndor();
606 624
(...skipping 1057 matching lines...) Expand 10 before | Expand all | Expand 10 after
1664 for (int j = 0; j < kExternalFormatUsageCnt; ++j) { 1682 for (int j = 0; j < kExternalFormatUsageCnt; ++j) {
1665 SkASSERT(defaultEntry.fFormats.fExternalFormat[j] != 1683 SkASSERT(defaultEntry.fFormats.fExternalFormat[j] !=
1666 fConfigTable[i].fFormats.fExternalFormat[j]); 1684 fConfigTable[i].fFormats.fExternalFormat[j]);
1667 } 1685 }
1668 SkASSERT(defaultEntry.fFormats.fExternalType != fConfigTable[i].fFormats .fExternalType); 1686 SkASSERT(defaultEntry.fFormats.fExternalType != fConfigTable[i].fFormats .fExternalType);
1669 } 1687 }
1670 #endif 1688 #endif
1671 } 1689 }
1672 1690
1673 void GrGLCaps::onApplyOptionsOverrides(const GrContextOptions& options) {} 1691 void GrGLCaps::onApplyOptionsOverrides(const GrContextOptions& options) {}
OLDNEW
« no previous file with comments | « src/gpu/batches/GrPLSPathRenderer.cpp ('k') | src/gpu/gl/GrGLGpu.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698