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

Side by Side Diff: src/gpu/glsl/GrGLSLProgramBuilder.cpp

Issue 1784023002: Add sampler precision to GrTextureAccess (Closed) Base URL: https://skia.googlesource.com/skia.git@upload2_verttex
Patch Set: rebase Created 4 years, 9 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 unified diff | Download patch
« no previous file with comments | « src/gpu/gl/GrGLUniformHandler.cpp ('k') | src/gpu/glsl/GrGLSLShaderVar.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2015 Google Inc. 2 * Copyright 2015 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "glsl/GrGLSLProgramBuilder.h" 8 #include "glsl/GrGLSLProgramBuilder.h"
9 9
10 #include "GrPipeline.h" 10 #include "GrPipeline.h"
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 const char* externalFeatureString = this->glslCaps()->externalTextur eExtensionString(); 233 const char* externalFeatureString = this->glslCaps()->externalTextur eExtensionString();
234 // We shouldn't ever create a GrGLTexture that requires external sam pler type 234 // We shouldn't ever create a GrGLTexture that requires external sam pler type
235 SkASSERT(externalFeatureString); 235 SkASSERT(externalFeatureString);
236 this->addFeature(visibility, 236 this->addFeature(visibility,
237 1 << GrGLSLShaderBuilder::kExternalTexture_GLSLPriv ateFeature, 237 1 << GrGLSLShaderBuilder::kExternalTexture_GLSLPriv ateFeature,
238 externalFeatureString); 238 externalFeatureString);
239 } 239 }
240 name.printf("Sampler%d", t); 240 name.printf("Sampler%d", t);
241 localSamplerUniforms[t] = this->uniformHandler()->addUniform(access.getV isibility(), 241 localSamplerUniforms[t] = this->uniformHandler()->addUniform(access.getV isibility(),
242 samplerType , 242 samplerType ,
243 kDefault_Gr SLPrecision, 243 access.getP recision(),
244 name.c_str( )); 244 name.c_str( ));
245 outSamplers->emplace_back(localSamplerUniforms[t], access); 245 outSamplers->emplace_back(localSamplerUniforms[t], access);
246 } 246 }
247 } 247 }
248 248
249 void GrGLSLProgramBuilder::emitFSOutputSwizzle(bool hasSecondaryOutput) { 249 void GrGLSLProgramBuilder::emitFSOutputSwizzle(bool hasSecondaryOutput) {
250 // Swizzle the fragment shader outputs if necessary. 250 // Swizzle the fragment shader outputs if necessary.
251 GrSwizzle swizzle; 251 GrSwizzle swizzle;
252 swizzle.setFromKey(this->desc().header().fOutputSwizzle); 252 swizzle.setFromKey(this->desc().header().fOutputSwizzle);
253 if (swizzle != GrSwizzle::RGBA()) { 253 if (swizzle != GrSwizzle::RGBA()) {
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 delete fFragmentProcessors[i]; 359 delete fFragmentProcessors[i];
360 } 360 }
361 } 361 }
362 362
363 void GrGLSLProgramBuilder::finalizeShaders() { 363 void GrGLSLProgramBuilder::finalizeShaders() {
364 this->varyingHandler()->finalize(); 364 this->varyingHandler()->finalize();
365 fVS.finalize(kVertex_GrShaderFlag); 365 fVS.finalize(kVertex_GrShaderFlag);
366 fFS.finalize(kFragment_GrShaderFlag); 366 fFS.finalize(kFragment_GrShaderFlag);
367 367
368 } 368 }
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLUniformHandler.cpp ('k') | src/gpu/glsl/GrGLSLShaderVar.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698