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

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: Checkpoint towards core profile support. 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
« no previous file with comments | « src/gpu/gl/GrGLCaps.cpp ('k') | src/gpu/gl/GrGpuGL.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGLShaderBuilder.cpp
===================================================================
--- src/gpu/gl/GrGLShaderBuilder.cpp (revision 7907)
+++ 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";
}
}
@@ -109,7 +109,7 @@
GrAssert(NULL != coordName);
out->appendf("%s(%s, %s)",
- sample_function_name(varyingType),
+ sample_function_name(varyingType, fCtxInfo.glslGeneration()),
this->getUniformCStr(sampler.fSamplerUniform),
coordName);
append_swizzle(out, *sampler.textureAccess(), fCtxInfo.caps());
« no previous file with comments | « src/gpu/gl/GrGLCaps.cpp ('k') | src/gpu/gl/GrGpuGL.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698