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

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

Issue 1785873003: Implement GL support for buffer textures (Closed) Base URL: https://skia.googlesource.com/skia.git@upload_glTexBuffer
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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/glsl/GrGLSL.h ('k') | src/gpu/glsl/GrGLSLShaderBuilder.h » ('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 83b50ad534a8cf4f6a89608a851b34502219d92c..5275f6e32834ef4372c9f775394595632d9a3b1b 100644
--- a/src/gpu/glsl/GrGLSLProgramBuilder.cpp
+++ b/src/gpu/glsl/GrGLSLProgramBuilder.cpp
@@ -240,6 +240,12 @@ void GrGLSLProgramBuilder::emitSamplers(const GrProcessor& processor,
this->addFeature(visibility,
1 << GrGLSLShaderBuilder::kExternalTexture_GLSLPrivateFeature,
externalFeatureString);
+ } else if (kSamplerBuffer_GrSLType == samplerType) {
+ if (const char* extension = this->glslCaps()->bufferTextureExtensionString()) {
+ this->addFeature(visibility,
+ 1 << GrGLSLShaderBuilder::kBufferTexture_GLSLPrivateFeature,
+ extension);
+ }
}
name.printf("Sampler%d", t);
localSamplerUniforms[t] = this->uniformHandler()->addUniform(access.getVisibility(),
« no previous file with comments | « src/gpu/glsl/GrGLSL.h ('k') | src/gpu/glsl/GrGLSLShaderBuilder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698