aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/gl/GrGLInterface.cpp
diff options
context:
space:
mode:
authorGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-08-30 15:52:12 +0000
committerGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-08-30 15:52:12 +0000
commit46fbfe0cd1bbe60fd15ce52e784f5d51450ff5fd (patch)
tree5294defd03e5943f05e23499f8c65a5f197c60ae /src/gpu/gl/GrGLInterface.cpp
parente60730feea0f95b428790da73fc568f51e6660dc (diff)
Add glTexGen funcs to interface
R=robertphillips@google.com Author: bsalomon@google.com Review URL: https://chromiumcodereview.appspot.com/23513006 git-svn-id: http://skia.googlecode.com/svn/trunk@11032 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/gpu/gl/GrGLInterface.cpp')
-rw-r--r--src/gpu/gl/GrGLInterface.cpp31
1 files changed, 23 insertions, 8 deletions
diff --git a/src/gpu/gl/GrGLInterface.cpp b/src/gpu/gl/GrGLInterface.cpp
index a5ddd9f83c..38a7f9d7f4 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 ||
@@ -199,14 +209,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 ||