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

Unified Diff: src/gpu/glsl/GrGLSLFragmentShaderBuilder.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/glsl/GrGLSLFragmentShaderBuilder.h ('k') | src/gpu/glsl/GrGLSLShaderBuilder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/glsl/GrGLSLFragmentShaderBuilder.cpp
diff --git a/src/gpu/glsl/GrGLSLFragmentShaderBuilder.cpp b/src/gpu/glsl/GrGLSLFragmentShaderBuilder.cpp
index 903b03af9594b1a4477d6562f3ad167902f5ccdb..8651827841a103dae9f21fa598e3bf682e49556c 100644
--- a/src/gpu/glsl/GrGLSLFragmentShaderBuilder.cpp
+++ b/src/gpu/glsl/GrGLSLFragmentShaderBuilder.cpp
@@ -77,46 +77,25 @@
}
bool GrGLSLFragmentShaderBuilder::enableFeature(GLSLFeature feature) {
- const GrGLSLCaps& glslCaps = *fProgramBuilder->glslCaps();
switch (feature) {
- case kStandardDerivatives_GLSLFeature:
- if (!glslCaps.shaderDerivativeSupport()) {
+ case kStandardDerivatives_GLSLFeature: {
+ if (!fProgramBuilder->glslCaps()->shaderDerivativeSupport()) {
return false;
}
- if (const char* extension = glslCaps.shaderDerivativeExtensionString()) {
+ const char* extension = fProgramBuilder->glslCaps()->shaderDerivativeExtensionString();
+ if (extension) {
this->addFeature(1 << kStandardDerivatives_GLSLFeature, extension);
}
return true;
- case kPixelLocalStorage_GLSLFeature:
+ }
+ case kPixelLocalStorage_GLSLFeature: {
if (fProgramBuilder->glslCaps()->pixelLocalStorageSize() <= 0) {
return false;
}
this->addFeature(1 << kPixelLocalStorage_GLSLFeature,
"GL_EXT_shader_pixel_local_storage");
return true;
- case kSampleVariables_GLSLFeature:
- if (!glslCaps.sampleVariablesSupport()) {
- return false;
- }
- if (const char* extension = glslCaps.sampleVariablesExtensionString()) {
- this->addFeature(1 << kSampleVariables_GLSLFeature, extension);
- }
- return true;
- case kSampleMaskOverrideCoverage_GLSLFeature:
- if (!glslCaps.sampleMaskOverrideCoverageSupport()) {
- return false;
- }
- if (!this->enableFeature(kSampleVariables_GLSLFeature)) {
- return false;
- }
- if (this->addFeature(1 << kSampleMaskOverrideCoverage_GLSLFeature,
- "GL_NV_sample_mask_override_coverage")) {
- // Redeclare gl_SampleMask with layout(override_coverage) if we haven't already.
- fOutputs.push_back().set(kInt_GrSLType, GrShaderVar::kOut_TypeModifier,
- "gl_SampleMask", 1, kHigh_GrSLPrecision,
- "override_coverage");
- }
- return true;
+ }
default:
SkFAIL("Unexpected GLSLFeature requested.");
return false;
« no previous file with comments | « src/gpu/glsl/GrGLSLFragmentShaderBuilder.h ('k') | src/gpu/glsl/GrGLSLShaderBuilder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698