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

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

Issue 277323002: Make GrGLConfigConversionEffect work for Imagination and some other GPUs. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Only affect PowerVR Rogue Hood Created 6 years, 6 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 | « no previous file | src/gpu/gl/GrGLUtil.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGLShaderBuilder.cpp
diff --git a/src/gpu/gl/GrGLShaderBuilder.cpp b/src/gpu/gl/GrGLShaderBuilder.cpp
index c5df4c803ce501011616bef7c7d458d1668d8996..be10594c85d950f5189b5f28728ce0544100a519 100644
--- a/src/gpu/gl/GrGLShaderBuilder.cpp
+++ b/src/gpu/gl/GrGLShaderBuilder.cpp
@@ -693,9 +693,17 @@ static GrGLuint attach_shader(const GrGLContext& glCtx,
bool GrGLShaderBuilder::compileAndAttachShaders(GrGLuint programId, SkTDArray<GrGLuint>* shaderIds) const {
SkString fragShaderSrc(GrGetGLSLVersionDecl(this->ctxInfo()));
fragShaderSrc.append(fFSExtensions);
- append_default_precision_qualifier(kDefaultFragmentPrecision,
- fGpu->glStandard(),
- &fragShaderSrc);
+
+ if (kImagination_GrGLVendor == this->ctxInfo().vendor() &&
+ kPVRRogueHood_GrGLRenderer == this->ctxInfo().renderer())
+ append_default_precision_qualifier(GrGLShaderVar::kHigh_Precision,
bsalomon 2014/06/09 13:56:45 Can you not just apply highp to the vars emitted b
changjun.yang 2014/06/10 11:41:17 Thanks! Pls see my comments above.
+ fGpu->glStandard(),
+ &fragShaderSrc);
+ else
+ append_default_precision_qualifier(kDefaultFragmentPrecision,
+ fGpu->glStandard(),
+ &fragShaderSrc);
+
this->appendUniformDecls(kFragment_Visibility, &fragShaderSrc);
this->appendDecls(fFSInputs, &fragShaderSrc);
// We shouldn't have declared outputs on 1.10
« no previous file with comments | « no previous file | src/gpu/gl/GrGLUtil.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698