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

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

Issue 1693113002: Revert of Add infastructure for gl_SampleMask (Closed) Base URL: https://skia.googlesource.com/skia.git@upload7_interp
Patch Set: 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 | « no previous file | src/gpu/gl/GrGLGLSL.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 533 matching lines...) Expand 10 before | Expand all | Expand 10 after
544 if (kGLES_GrGLStandard == standard) { 544 if (kGLES_GrGLStandard == standard) {
545 return "#version 300 es\n"; 545 return "#version 300 es\n";
546 } else { 546 } else {
547 SkASSERT(kGL_GrGLStandard == standard); 547 SkASSERT(kGL_GrGLStandard == standard);
548 if (isCoreProfile) { 548 if (isCoreProfile) {
549 return "#version 330\n"; 549 return "#version 330\n";
550 } else { 550 } else {
551 return "#version 330 compatibility\n"; 551 return "#version 330 compatibility\n";
552 } 552 }
553 } 553 }
554 case k400_GrGLSLGeneration:
555 SkASSERT(kGL_GrGLStandard == standard);
556 if (isCoreProfile) {
557 return "#version 400\n";
558 } else {
559 return "#version 400 compatibility\n";
560 }
561 case k310es_GrGLSLGeneration: 554 case k310es_GrGLSLGeneration:
562 SkASSERT(kGLES_GrGLStandard == standard); 555 SkASSERT(kGLES_GrGLStandard == standard);
563 return "#version 310 es\n"; 556 return "#version 310 es\n";
564 case k320es_GrGLSLGeneration:
565 SkASSERT(kGLES_GrGLStandard == standard);
566 return "#version 320 es\n";
567 } 557 }
568 return "<no version>"; 558 return "<no version>";
569 } 559 }
570 560
571 void GrGLCaps::initGLSL(const GrGLContextInfo& ctxInfo) { 561 void GrGLCaps::initGLSL(const GrGLContextInfo& ctxInfo) {
572 GrGLStandard standard = ctxInfo.standard(); 562 GrGLStandard standard = ctxInfo.standard();
573 GrGLVersion version = ctxInfo.version(); 563 GrGLVersion version = ctxInfo.version();
574 564
575 /************************************************************************** 565 /**************************************************************************
576 * Caps specific to GrGLSLCaps 566 * Caps specific to GrGLSLCaps
(...skipping 21 matching lines...) Expand all
598 glslCaps->fFBFetchSupport = true; 588 glslCaps->fFBFetchSupport = true;
599 glslCaps->fFBFetchColorName = "gl_LastFragColorARM"; 589 glslCaps->fFBFetchColorName = "gl_LastFragColorARM";
600 glslCaps->fFBFetchExtensionString = "GL_ARM_shader_framebuffer_fetch "; 590 glslCaps->fFBFetchExtensionString = "GL_ARM_shader_framebuffer_fetch ";
601 } 591 }
602 glslCaps->fUsesPrecisionModifiers = true; 592 glslCaps->fUsesPrecisionModifiers = true;
603 } 593 }
604 594
605 glslCaps->fBindlessTextureSupport = ctxInfo.hasExtension("GL_NV_bindless_tex ture"); 595 glslCaps->fBindlessTextureSupport = ctxInfo.hasExtension("GL_NV_bindless_tex ture");
606 596
607 if (kGL_GrGLStandard == standard) { 597 if (kGL_GrGLStandard == standard) {
608 glslCaps->fSampleVariablesSupport = ctxInfo.glslGeneration() >= k400_GrG LSLGeneration;
609 } else {
610 if (ctxInfo.glslGeneration() >= k320es_GrGLSLGeneration) {
611 glslCaps->fSampleVariablesSupport = true;
612 } else if (ctxInfo.hasExtension("GL_OES_sample_variables")) {
613 glslCaps->fSampleVariablesSupport = true;
614 glslCaps->fSampleVariablesExtensionString = "GL_OES_sample_variables ";
615 }
616 }
617
618 if (glslCaps->fSampleVariablesSupport) {
619 glslCaps->fSampleMaskOverrideCoverageSupport =
620 ctxInfo.hasExtension("GL_NV_sample_mask_override_coverage");
621 }
622
623 if (kGL_GrGLStandard == standard) {
624 glslCaps->fFlatInterpolationSupport = ctxInfo.glslGeneration() >= k130_G rGLSLGeneration; 598 glslCaps->fFlatInterpolationSupport = ctxInfo.glslGeneration() >= k130_G rGLSLGeneration;
625 } else { 599 } else {
626 glslCaps->fFlatInterpolationSupport = 600 glslCaps->fFlatInterpolationSupport =
627 ctxInfo.glslGeneration() >= k330_GrGLSLGeneration; // This is the va lue for GLSL ES 3.0. 601 ctxInfo.glslGeneration() >= k330_GrGLSLGeneration; // This is the va lue for GLSL ES 3.0.
628 } 602 }
629 603
630 if (kGL_GrGLStandard == standard) { 604 if (kGL_GrGLStandard == standard) {
631 glslCaps->fNoPerspectiveInterpolationSupport = 605 glslCaps->fNoPerspectiveInterpolationSupport =
632 ctxInfo.glslGeneration() >= k130_GrGLSLGeneration; 606 ctxInfo.glslGeneration() >= k130_GrGLSLGeneration;
633 } else { 607 } else {
(...skipping 1074 matching lines...) Expand 10 before | Expand all | Expand 10 after
1708 for (int j = 0; j < kExternalFormatUsageCnt; ++j) { 1682 for (int j = 0; j < kExternalFormatUsageCnt; ++j) {
1709 SkASSERT(defaultEntry.fFormats.fExternalFormat[j] != 1683 SkASSERT(defaultEntry.fFormats.fExternalFormat[j] !=
1710 fConfigTable[i].fFormats.fExternalFormat[j]); 1684 fConfigTable[i].fFormats.fExternalFormat[j]);
1711 } 1685 }
1712 SkASSERT(defaultEntry.fFormats.fExternalType != fConfigTable[i].fFormats .fExternalType); 1686 SkASSERT(defaultEntry.fFormats.fExternalType != fConfigTable[i].fFormats .fExternalType);
1713 } 1687 }
1714 #endif 1688 #endif
1715 } 1689 }
1716 1690
1717 void GrGLCaps::onApplyOptionsOverrides(const GrContextOptions& options) {} 1691 void GrGLCaps::onApplyOptionsOverrides(const GrContextOptions& options) {}
OLDNEW
« no previous file with comments | « no previous file | src/gpu/gl/GrGLGLSL.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698