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

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

Issue 23513006: Add glTexGen funcs to interface (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: mesa Created 7 years, 4 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/GrGLDefines.h ('k') | src/gpu/gl/GrGLNoOpInterface.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGLInterface.cpp
diff --git a/src/gpu/gl/GrGLInterface.cpp b/src/gpu/gl/GrGLInterface.cpp
index 0aba95eaed0e38177b970b749a04d7ca0a96ea66..fb6cb1c54d71978f69114f66bab48959b3a0c83a 100644
--- a/src/gpu/gl/GrGLInterface.cpp
+++ b/src/gpu/gl/GrGLInterface.cpp
@@ -44,6 +44,16 @@ bool GrGLInterface::validate(GrGLBinding binding) const {
return false;
}
+ bool isCoreProfile = false;
+ if (kDesktop_GrGLBinding == binding) {
+ if (NULL == this->fGetIntegerv) {
+ return false;
+ }
+ GrGLint profileMask = 0;
+ fGetIntegerv(GR_GL_CONTEXT_PROFILE_MASK, &profileMask);
+ isCoreProfile = SkToBool(profileMask & GR_GL_CONTEXT_CORE_PROFILE_BIT);
+ }
+
// functions that are always required
if (NULL == fActiveTexture ||
NULL == fAttachShader ||
@@ -198,14 +208,19 @@ bool GrGLInterface::validate(GrGLBinding binding) const {
return false;
}
}
- // The below two blocks are checks for functions used with
- // GL_NV_path_rendering. We're not enforcing that they be non-NULL
- // because they aren't actually called at this time.
- if (false &&
- (NULL == fMatrixMode ||
- NULL == fLoadIdentity ||
- NULL == fLoadMatrixf)) {
- return false;
+ if (!isCoreProfile) {
+ if (NULL == fClientActiveTexture ||
+ NULL == fDisableClientState ||
+ NULL == fEnableClientState ||
+ NULL == fLoadIdentity ||
+ NULL == fLoadMatrixf ||
+ NULL == fMatrixMode ||
+ NULL == fTexGenf ||
+ NULL == fTexGenfv ||
+ NULL == fTexGeni ||
+ NULL == fVertexPointer) {
+ return false;
+ }
}
if (false && extensions.has("GL_NV_path_rendering")) {
if (NULL == fPathCommands ||
« no previous file with comments | « src/gpu/gl/GrGLDefines.h ('k') | src/gpu/gl/GrGLNoOpInterface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698