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

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

Issue 580863004: Adding 3D lut color filter (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Added generationID for 3D texture key Created 6 years, 3 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
Index: src/gpu/gl/GrGLCaps.cpp
diff --git a/src/gpu/gl/GrGLCaps.cpp b/src/gpu/gl/GrGLCaps.cpp
index dc4ef4c160459fbc655287446d50322bfd0c4e5a..a4829564b487ac00dbf46f8d9e63de3c12f8ced7 100644
--- a/src/gpu/gl/GrGLCaps.cpp
+++ b/src/gpu/gl/GrGLCaps.cpp
@@ -599,6 +599,16 @@ void GrGLCaps::initConfigTexturableTable(const GrGLContextInfo& ctxInfo, const G
ctxInfo.hasExtension("GL_OES_texture_float"));
}
fConfigTextureSupport[kRGBA_float_GrPixelConfig] = hasFPTextures;
+
+ // 3D textures. Texture wrap modes and mip-mapping is supported for power
+ // of two 3D textures. Mip-mapping and texture wrap modes other than
+ // CLAMP_TO_EDGE are not supported for non-power of two 3D textures.
+ // The OES_texture_npot extension, if supported, will enable mip-mapping
+ // and other wrap modes for non-power of two 3D textures.
+ f3DTexImageSupport =
+ (version >= GR_GL_VER(1, 2)) || // glTexture3D has been core since OpenGL 1.2
+ ctxInfo.hasExtension("GL_EXT_texture_3D") ||
+ ctxInfo.hasExtension("GL_OES_texture_3D"); // No need for npot for now
}
bool GrGLCaps::readPixelsSupported(const GrGLInterface* intf,

Powered by Google App Engine
This is Rietveld 408576698