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

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

Issue 23587014: Add bit to GrGLCaps for fixed function support (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Add printout for new bool and other fields 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/GrGLCaps.h ('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/GrGLCaps.cpp
diff --git a/src/gpu/gl/GrGLCaps.cpp b/src/gpu/gl/GrGLCaps.cpp
index a6740cc5177982275a28629b0a0251f809dfdf00..382bfba68daf67831f9f120be0c358e5b2f0a54b 100644
--- a/src/gpu/gl/GrGLCaps.cpp
+++ b/src/gpu/gl/GrGLCaps.cpp
@@ -47,6 +47,7 @@ void GrGLCaps::reset() {
fVertexArrayObjectSupport = false;
fUseNonVBOVertexAndIndexDynamicData = false;
fIsCoreProfile = false;
+ fFixedFunctionSupport = false;
fDiscardFBSupport = false;
}
@@ -84,6 +85,7 @@ GrGLCaps& GrGLCaps::operator = (const GrGLCaps& caps) {
fVertexArrayObjectSupport = caps.fVertexArrayObjectSupport;
fUseNonVBOVertexAndIndexDynamicData = caps.fUseNonVBOVertexAndIndexDynamicData;
fIsCoreProfile = caps.fIsCoreProfile;
+ fFixedFunctionSupport = caps.fFixedFunctionSupport;
fDiscardFBSupport = caps.fDiscardFBSupport;
return *this;
@@ -117,6 +119,7 @@ void GrGLCaps::init(const GrGLContextInfo& ctxInfo, const GrGLInterface* gli) {
fIsCoreProfile = SkToBool(profileMask & GR_GL_CONTEXT_CORE_PROFILE_BIT);
}
if (!fIsCoreProfile) {
+ fFixedFunctionSupport = true;
GR_GL_GetIntegerv(gli, GR_GL_MAX_TEXTURE_COORDS, &fMaxFixedFunctionTextureCoords);
// Sanity check
SkASSERT(fMaxFixedFunctionTextureCoords > 0 && fMaxFixedFunctionTextureCoords < 128);
@@ -589,9 +592,15 @@ void GrGLCaps::print() const {
GR_STATIC_ASSERT(GR_ARRAY_COUNT(kFBFetchTypeStr) == kLast_FBFetchType + 1);
+ GrPrintf("Core Profile: %s\n", (fIsCoreProfile ? "YES" : "NO"));
+ GrPrintf("Fixed Function Support: %s\n", (fFixedFunctionSupport ? "YES" : "NO"));
GrPrintf("MSAA Type: %s\n", kMSFBOExtStr[fMSFBOType]);
GrPrintf("FB Fetch Type: %s\n", kFBFetchTypeStr[fFBFetchType]);
GrPrintf("Max FS Uniform Vectors: %d\n", fMaxFragmentUniformVectors);
+ GrPrintf("Max FS Texture Units: %d\n", fMaxFragmentTextureUnits);
+ if (fFixedFunctionSupport) {
+ GrPrintf("Max Fixed Function Texture Coords: %d\n", fMaxFixedFunctionTextureCoords);
+ }
GrPrintf("Max Vertex Attributes: %d\n", fMaxVertexAttributes);
GrPrintf("Support RGBA8 Render Buffer: %s\n", (fRGBA8RenderbufferSupport ? "YES": "NO"));
GrPrintf("BGRA support: %s\n", (fBGRAFormatSupport ? "YES": "NO"));
@@ -612,6 +621,5 @@ void GrGLCaps::print() const {
GrPrintf("Vertex array object support: %s\n", (fVertexArrayObjectSupport ? "YES": "NO"));
GrPrintf("Use non-VBO for dynamic data: %s\n",
(fUseNonVBOVertexAndIndexDynamicData ? "YES" : "NO"));
- GrPrintf("Core Profile: %s\n", (fIsCoreProfile ? "YES" : "NO"));
GrPrintf("Discard FrameBuffer support: %s\n", (fDiscardFBSupport ? "YES" : "NO"));
}
« no previous file with comments | « src/gpu/gl/GrGLCaps.h ('k') | src/gpu/gl/GrGpuGL.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698