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

Unified Diff: src/gpu/gl/builders/GrGLVertexShaderBuilder.cpp

Issue 1417993004: Add version string and force highp NDS transfrom to GLSLCaps (Closed) Base URL: https://skia.googlesource.com/skia.git@renameShaderVar
Patch Set: Fix glslInit Created 5 years, 2 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/gl/builders/GrGLFragmentShaderBuilder.cpp ('k') | src/gpu/glsl/GrGLSLCaps.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/builders/GrGLVertexShaderBuilder.cpp
diff --git a/src/gpu/gl/builders/GrGLVertexShaderBuilder.cpp b/src/gpu/gl/builders/GrGLVertexShaderBuilder.cpp
index de0bb03aa38e7b6fb148f2bd91ec00fa0ce35cce..c1a7dee56a3c54ce8c0a8dff92434652ca32b5a9 100644
--- a/src/gpu/gl/builders/GrGLVertexShaderBuilder.cpp
+++ b/src/gpu/gl/builders/GrGLVertexShaderBuilder.cpp
@@ -39,7 +39,7 @@ void GrGLVertexBuilder::transformToNormalizedDeviceSpace(const GrShaderVar& posV
SkASSERT(!fRtAdjustName);
GrSLPrecision precision = kDefault_GrSLPrecision;
- if (fProgramBuilder->ctxInfo().vendor() == kARM_GrGLVendor) {
+ if (fProgramBuilder->glslCaps()->forceHighPrecisionNDSTransform()) {
precision = kHigh_GrSLPrecision;
}
@@ -89,7 +89,7 @@ void GrGLVertexBuilder::bindVertexAttributes(GrGLuint programID) {
bool
GrGLVertexBuilder::compileAndAttachShaders(GrGLuint programId, SkTDArray<GrGLuint>* shaderIds) {
- this->versionDecl() = GrGLGetGLSLVersionDecl(fProgramBuilder->ctxInfo());
+ this->versionDecl() = fProgramBuilder->glslCaps()->versionDeclString();
this->compileAndAppendLayoutQualifiers();
fProgramBuilder->appendUniformDecls(GrGLProgramBuilder::kVertex_Visibility, &this->uniforms());
this->appendDecls(fInputs, &this->inputs());
« no previous file with comments | « src/gpu/gl/builders/GrGLFragmentShaderBuilder.cpp ('k') | src/gpu/glsl/GrGLSLCaps.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698