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

Unified Diff: src/gpu/gl/GrGLCaps.cpp

Issue 777443003: Move shader precision out of GrShaderVar (Closed) Base URL: https://skia.googlesource.com/skia.git@prec
Patch Set: rebase Created 6 years 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/effects/GrConfigConversionEffect.cpp ('k') | src/gpu/gl/GrGLProgramDesc.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGLCaps.cpp
diff --git a/src/gpu/gl/GrGLCaps.cpp b/src/gpu/gl/GrGLCaps.cpp
index a510cb456b030be8a39ba592aaa450a4c3e79b34..79c99c224adcfb392edaf21bea5f2390b45b5fdb 100644
--- a/src/gpu/gl/GrGLCaps.cpp
+++ b/src/gpu/gl/GrGLCaps.cpp
@@ -776,13 +776,13 @@ void GrGLCaps::initStencilFormats(const GrGLContextInfo& ctxInfo) {
fStencilVerifiedColorConfigs.push_back_n(fStencilFormats.count());
}
-static GrGLenum precision_to_gl_float_type(GrShaderVar::Precision p) {
+static GrGLenum precision_to_gl_float_type(GrSLPrecision p) {
switch (p) {
- case GrShaderVar::kLow_Precision:
+ case kLow_GrSLPrecision:
return GR_GL_LOW_FLOAT;
- case GrShaderVar::kMedium_Precision:
+ case kMedium_GrSLPrecision:
return GR_GL_MEDIUM_FLOAT;
- case GrShaderVar::kHigh_Precision:
+ case kHigh_GrSLPrecision:
return GR_GL_HIGH_FLOAT;
}
SkFAIL("Unknown precision.");
@@ -811,8 +811,8 @@ void GrGLCaps::initShaderPrecisionTable(const GrGLContextInfo& ctxInfo, const Gr
GrGLenum glShader = shader_type_to_gl_shader(shaderType);
PrecisionInfo* first = NULL;
fShaderPrecisionVaries = false;
- for (int p = 0; p < GrShaderVar::kPrecisionCount; ++p) {
- GrShaderVar::Precision precision = static_cast<GrShaderVar::Precision>(p);
+ for (int p = 0; p < kGrSLPrecisionCount; ++p) {
+ GrSLPrecision precision = static_cast<GrSLPrecision>(p);
GrGLenum glPrecision = precision_to_gl_float_type(precision);
GrGLint range[2];
GrGLint bits;
@@ -835,7 +835,7 @@ void GrGLCaps::initShaderPrecisionTable(const GrGLContextInfo& ctxInfo, const Gr
fShaderPrecisionVaries = false;
for (int s = 0; s < kGrShaderTypeCount; ++s) {
if (kGeometry_GrShaderType != s || fGeometryShaderSupport) {
- for (int p = 0; p < GrShaderVar::kPrecisionCount; ++p) {
+ for (int p = 0; p < kGrSLPrecisionCount; ++p) {
fFloatPrecisions[s][p].fLogRangeLow = 127;
fFloatPrecisions[s][p].fLogRangeHigh = 127;
fFloatPrecisions[s][p].fBits = 23;
« no previous file with comments | « src/gpu/effects/GrConfigConversionEffect.cpp ('k') | src/gpu/gl/GrGLProgramDesc.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698