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

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

Issue 16452007: Use all available texture units. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: use fHWBoundTextures->count() rather than glCaps()->maxFragmentTextureUnits() Created 7 years, 6 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.h » ('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 8b296e360bfd5f5c61dc7b2b82e17d3b8bb7b899..fd74d50d715b1a28c20b0fc4e5ae1616418d0aaf 100644
--- a/src/gpu/gl/GrGLCaps.cpp
+++ b/src/gpu/gl/GrGLCaps.cpp
@@ -28,6 +28,7 @@ void GrGLCaps::reset() {
fFBFetchType = kNone_FBFetchType;
fMaxFragmentUniformVectors = 0;
fMaxVertexAttributes = 0;
+ fMaxFragmentTextureUnits = 0;
fRGBA8RenderbufferSupport = false;
fBGRAFormatSupport = false;
fBGRAIsInternalFormat = false;
@@ -59,6 +60,7 @@ GrGLCaps& GrGLCaps::operator = (const GrGLCaps& caps) {
fStencilVerifiedColorConfigs = caps.fStencilVerifiedColorConfigs;
fMaxFragmentUniformVectors = caps.fMaxFragmentUniformVectors;
fMaxVertexAttributes = caps.fMaxVertexAttributes;
+ fMaxFragmentTextureUnits = caps.fMaxFragmentTextureUnits;
fMSFBOType = caps.fMSFBOType;
fCoverageAAType = caps.fCoverageAAType;
fMSAACoverageModes = caps.fMSAACoverageModes;
@@ -109,6 +111,7 @@ void GrGLCaps::init(const GrGLContextInfo& ctxInfo, const GrGLInterface* gli) {
fMaxFragmentUniformVectors = max / 4;
}
GR_GL_GetIntegerv(gli, GR_GL_MAX_VERTEX_ATTRIBS, &fMaxVertexAttributes);
+ GR_GL_GetIntegerv(gli, GR_GL_MAX_TEXTURE_IMAGE_UNITS, &fMaxFragmentTextureUnits);
if (kDesktop_GrGLBinding == binding) {
fRGBA8RenderbufferSupport = true;
@@ -222,12 +225,6 @@ void GrGLCaps::init(const GrGLContextInfo& ctxInfo, const GrGLInterface* gli) {
/**************************************************************************
* GrDrawTargetCaps fields
**************************************************************************/
- GrGLint maxTextureUnits;
- // check FS and fixed-function texture unit limits
- // we only use textures in the fragment stage currently.
- // checks are > to make sure we have a spare unit.
- GR_GL_GetIntegerv(gli, GR_GL_MAX_TEXTURE_IMAGE_UNITS, &maxTextureUnits);
-
GrGLint numFormats;
GR_GL_GetIntegerv(gli, GR_GL_NUM_COMPRESSED_TEXTURE_FORMATS, &numFormats);
if (numFormats) {
« no previous file with comments | « src/gpu/gl/GrGLCaps.h ('k') | src/gpu/gl/GrGpuGL.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698