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

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

Issue 12330181: Checkpoint towards core profile support. (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 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
Index: src/gpu/gl/GrGLShaderBuilder.cpp
===================================================================
--- src/gpu/gl/GrGLShaderBuilder.cpp (revision 7894)
+++ src/gpu/gl/GrGLShaderBuilder.cpp (working copy)
@@ -24,12 +24,12 @@
namespace {
-inline const char* sample_function_name(GrSLType type) {
+inline const char* sample_function_name(GrSLType type, GrGLSLGeneration glslGen) {
if (kVec2f_GrSLType == type) {
- return "texture2D";
+ return glslGen >= k130_GrGLSLGeneration ? "texture" : "texture2D";
} else {
GrAssert(kVec3f_GrSLType == type);
- return "texture2DProj";
+ return glslGen >= k130_GrGLSLGeneration ? "textureProj" : "texture2DProj";
}
}
@@ -108,7 +108,7 @@
GrAssert(NULL != coordName);
out->appendf("%s(%s, %s)",
- sample_function_name(varyingType),
+ sample_function_name(varyingType, fContext.glslGeneration()),
this->getUniformCStr(sampler.fSamplerUniform),
coordName);
append_swizzle(out, *sampler.textureAccess(), fContext.caps());
« no previous file with comments | « src/gpu/gl/GrGLCaps.cpp ('k') | src/gpu/gl/GrGpuGL.cpp » ('j') | src/gpu/gl/GrGpuGL.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698