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

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

Issue 1688233003: Add arb_texture_rectangle support properly in GLES3 shaders Base URL: https://skia.googlesource.com/skia.git@command-buffer-es3
Patch Set: Created 4 years, 10 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/GrGLCaps.cpp ('k') | src/gpu/gl/builders/GrGLProgramBuilder.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGLGpu.cpp
diff --git a/src/gpu/gl/GrGLGpu.cpp b/src/gpu/gl/GrGLGpu.cpp
index e29a7f81f317aa189e7263dc23416263cb264e8e..7822e872b2f5215eafc3353181e62c6afe419934 100644
--- a/src/gpu/gl/GrGLGpu.cpp
+++ b/src/gpu/gl/GrGLGpu.cpp
@@ -3319,7 +3319,15 @@ void GrGLGpu::createCopyPrograms() {
if (kSamplerTypes[i] == kSamplerExternal_GrSLType) {
fshaderTxt.appendf("#extension %s : require\n",
this->glCaps().glslCaps()->externalTextureExtensionString());
+ } else if (kSamplerTypes[i] == kSampler2DRect_GrSLType) {
+ const char* rectangleFeatureString =
+ this->glCaps().glslCaps()->rectangleTextureExtensionString();
+ if (rectangleFeatureString) {
+ fshaderTxt.appendf("#extension %s : require\n",
+ rectangleFeatureString);
+ }
}
+
GrGLSLAppendDefaultFloatPrecisionDeclaration(kDefault_GrSLPrecision,
*this->glCaps().glslCaps(),
&fshaderTxt);
@@ -3342,8 +3350,8 @@ void GrGLGpu::createCopyPrograms() {
" %s = %s(u_texture, v_texCoord);"
"}",
fsOutName,
- GrGLSLTexture2DFunctionName(kVec2f_GrSLType, kSamplerTypes[i], this->glslGeneration())
- );
+ GrGLSLTexture2DFunctionName(kVec2f_GrSLType, kSamplerTypes[i],
+ *this->glCaps().glslCaps()));
GL_CALL_RET(fCopyPrograms[i].fProgram, CreateProgram());
const char* str;
« no previous file with comments | « src/gpu/gl/GrGLCaps.cpp ('k') | src/gpu/gl/builders/GrGLProgramBuilder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698