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

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

Issue 359803003: 32 bpp floating point textures (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: feedback incorporated Created 6 years, 5 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/GrRenderTarget.cpp ('k') | src/gpu/gl/GrGLDefines.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 8f2d4c129742fb9cbcb0be099b7538fbbec386d4..178550bd5c61d27e05aec082b92f2bcf94132bbf 100644
--- a/src/gpu/gl/GrGLCaps.cpp
+++ b/src/gpu/gl/GrGLCaps.cpp
@@ -444,6 +444,10 @@ void GrGLCaps::initConfigRenderableTable(const GrGLContextInfo& ctxInfo) {
}
}
+ if (this->isConfigTexturable(kRGBA_float_GrPixelConfig)) {
+ fConfigRenderSupport[kRGBA_float_GrPixelConfig][kNo_MSAA] = true;
+ }
+
// If we don't support MSAA then undo any places above where we set a config as renderable with
// msaa.
if (kNone_MSFBOType == fMSFBOType) {
@@ -504,7 +508,7 @@ void GrGLCaps::initConfigTexturableTable(const GrGLContextInfo& ctxInfo, const G
// First check version for support
if (kGL_GrGLStandard == standard) {
hasETC1 = hasCompressTex2D &&
- (version >= GR_GL_VER(4, 3) ||
+ (version >= GR_GL_VER(4, 3) ||
ctxInfo.hasExtension("GL_ARB_ES3_compatibility"));
} else {
hasETC1 = hasCompressTex2D &&
@@ -558,6 +562,19 @@ void GrGLCaps::initConfigTexturableTable(const GrGLContextInfo& ctxInfo, const G
} else {
fConfigTextureSupport[kR11_EAC_GrPixelConfig] = version >= GR_GL_VER(3, 0);
}
+
+ // Check for floating point texture support
+ // NOTE: We disallow floating point textures on ES devices if linear
+ // filtering modes are not supported. This is for simplicity, but a more
+ // granular approach is possible. Coincidentally, floating point textures became part of
+ // the standard in ES3.1 / OGL 3.1, hence the shorthand
+ bool hasFPTextures = version >= GR_GL_VER(3, 1);
+ if (!hasFPTextures) {
+ hasFPTextures = ctxInfo.hasExtension("GL_ARB_texture_float") ||
+ (ctxInfo.hasExtension("OES_texture_float_linear") &&
+ ctxInfo.hasExtension("GL_OES_texture_float"));
+ }
+ fConfigTextureSupport[kRGBA_float_GrPixelConfig] = hasFPTextures;
}
bool GrGLCaps::readPixelsSupported(const GrGLInterface* intf,
« no previous file with comments | « src/gpu/GrRenderTarget.cpp ('k') | src/gpu/gl/GrGLDefines.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698