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

Unified Diff: src/gpu/glsl/GrGLSLProgramBuilder.cpp

Issue 1846963004: Infer sampler precision from pixel config (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: ... and gcc doesn't like the enums Created 4 years, 8 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/GrGLSLCaps.cpp ('k') | src/gpu/vk/GrVkCaps.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/glsl/GrGLSLProgramBuilder.cpp
diff --git a/src/gpu/glsl/GrGLSLProgramBuilder.cpp b/src/gpu/glsl/GrGLSLProgramBuilder.cpp
index 512d9d14d9302c272b55a94df65e619f9cc1caa3..4e9045292577c9a3e4d1fe2f8e1cd9f6aee5f69f 100644
--- a/src/gpu/glsl/GrGLSLProgramBuilder.cpp
+++ b/src/gpu/glsl/GrGLSLProgramBuilder.cpp
@@ -241,10 +241,12 @@ void GrGLSLProgramBuilder::emitSamplers(const GrProcessor& processor,
1 << GrGLSLShaderBuilder::kExternalTexture_GLSLPrivateFeature,
externalFeatureString);
}
+ GrSLPrecision precision = this->glslCaps()->samplerPrecision(access.getTexture()->config(),
+ visibility);
name.printf("Sampler%d", t);
- localSamplerUniforms[t] = this->uniformHandler()->addUniform(access.getVisibility(),
+ localSamplerUniforms[t] = this->uniformHandler()->addUniform(visibility,
samplerType,
- access.getPrecision(),
+ precision,
name.c_str());
outSamplers->emplace_back(localSamplerUniforms[t], access);
}
« no previous file with comments | « src/gpu/glsl/GrGLSLCaps.cpp ('k') | src/gpu/vk/GrVkCaps.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698