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

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

Issue 1722363002: Add cap and builder feature for multisample interpolation (Closed) Base URL: https://skia.googlesource.com/skia.git@upload_samplelocations
Patch Set: simplify Created 4 years, 9 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 | « no previous file | src/gpu/glsl/GrGLSLCaps.h » ('j') | src/gpu/glsl/GrGLSLCaps.cpp » ('J')
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 622 matching lines...) Expand 10 before | Expand all | Expand 10 after
633 ctxInfo.glslGeneration() >= k130_GrGLSLGeneration; 633 ctxInfo.glslGeneration() >= k130_GrGLSLGeneration;
634 } else { 634 } else {
635 if (ctxInfo.hasExtension("GL_NV_shader_noperspective_interpolation")) { 635 if (ctxInfo.hasExtension("GL_NV_shader_noperspective_interpolation")) {
636 glslCaps->fNoPerspectiveInterpolationSupport = true; 636 glslCaps->fNoPerspectiveInterpolationSupport = true;
637 glslCaps->fNoPerspectiveInterpolationExtensionString = 637 glslCaps->fNoPerspectiveInterpolationExtensionString =
638 "GL_NV_shader_noperspective_interpolation"; 638 "GL_NV_shader_noperspective_interpolation";
639 } 639 }
640 } 640 }
641 641
642 if (kGL_GrGLStandard == standard) { 642 if (kGL_GrGLStandard == standard) {
643 glslCaps->fMultisampleInterpolationSupport =
644 ctxInfo.glslGeneration() >= k400_GrGLSLGeneration;
645 } else {
646 if (ctxInfo.glslGeneration() >= k320es_GrGLSLGeneration) {
647 glslCaps->fMultisampleInterpolationSupport = true;
648 } else if (ctxInfo.hasExtension("GL_OES_shader_multisample_interpolation ")) {
649 glslCaps->fMultisampleInterpolationSupport = true;
650 glslCaps->fMultisampleInterpolationExtensionString =
651 "GL_OES_shader_multisample_interpolation";
652 }
653 }
654
655 if (kGL_GrGLStandard == standard) {
643 glslCaps->fSampleVariablesSupport = ctxInfo.glslGeneration() >= k400_GrG LSLGeneration; 656 glslCaps->fSampleVariablesSupport = ctxInfo.glslGeneration() >= k400_GrG LSLGeneration;
644 } else { 657 } else {
645 if (ctxInfo.glslGeneration() >= k320es_GrGLSLGeneration) { 658 if (ctxInfo.glslGeneration() >= k320es_GrGLSLGeneration) {
646 glslCaps->fSampleVariablesSupport = true; 659 glslCaps->fSampleVariablesSupport = true;
647 } else if (ctxInfo.hasExtension("GL_OES_sample_variables")) { 660 } else if (ctxInfo.hasExtension("GL_OES_sample_variables")) {
648 glslCaps->fSampleVariablesSupport = true; 661 glslCaps->fSampleVariablesSupport = true;
649 glslCaps->fSampleVariablesExtensionString = "GL_OES_sample_variables "; 662 glslCaps->fSampleVariablesExtensionString = "GL_OES_sample_variables ";
650 } 663 }
651 } 664 }
652 665
(...skipping 1137 matching lines...) Expand 10 before | Expand all | Expand 10 after
1790 for (int j = 0; j < kExternalFormatUsageCnt; ++j) { 1803 for (int j = 0; j < kExternalFormatUsageCnt; ++j) {
1791 SkASSERT(defaultEntry.fFormats.fExternalFormat[j] != 1804 SkASSERT(defaultEntry.fFormats.fExternalFormat[j] !=
1792 fConfigTable[i].fFormats.fExternalFormat[j]); 1805 fConfigTable[i].fFormats.fExternalFormat[j]);
1793 } 1806 }
1794 SkASSERT(defaultEntry.fFormats.fExternalType != fConfigTable[i].fFormats .fExternalType); 1807 SkASSERT(defaultEntry.fFormats.fExternalType != fConfigTable[i].fFormats .fExternalType);
1795 } 1808 }
1796 #endif 1809 #endif
1797 } 1810 }
1798 1811
1799 void GrGLCaps::onApplyOptionsOverrides(const GrContextOptions& options) {} 1812 void GrGLCaps::onApplyOptionsOverrides(const GrContextOptions& options) {}
OLDNEW
« no previous file with comments | « no previous file | src/gpu/glsl/GrGLSLCaps.h » ('j') | src/gpu/glsl/GrGLSLCaps.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698