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

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

Issue 1148243002: Add RGBA half float texture format. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 7 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/GrDrawTarget.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 7d9c50d16b4965e07c80880e2eda11cfd1988abc..ea6b83f2b13ba43cb22a7487a6934c41c64c7562 100644
--- a/src/gpu/gl/GrGLCaps.cpp
+++ b/src/gpu/gl/GrGLCaps.cpp
@@ -483,7 +483,7 @@ void GrGLCaps::initConfigRenderableTable(const GrGLContextInfo& ctxInfo) {
fConfigRenderSupport[kRGBA_float_GrPixelConfig][kNo_MSAA] = false;
}
// for now we don't support floating point MSAA on ES
- fConfigRenderSupport[kAlpha_half_GrPixelConfig][kYes_MSAA] = false;
+ fConfigRenderSupport[kRGBA_float_GrPixelConfig][kYes_MSAA] = false;
}
}
@@ -506,6 +506,25 @@ void GrGLCaps::initConfigRenderableTable(const GrGLContextInfo& ctxInfo) {
}
}
+ if (this->isConfigTexturable(kRGBA_half_GrPixelConfig)) {
+ if (kGL_GrGLStandard == standard) {
+ fConfigRenderSupport[kRGBA_half_GrPixelConfig][kNo_MSAA] = true;
+ fConfigRenderSupport[kRGBA_half_GrPixelConfig][kYes_MSAA] = true;
+ } else if (ctxInfo.version() >= GR_GL_VER(3, 0)) {
+ fConfigRenderSupport[kRGBA_half_GrPixelConfig][kNo_MSAA] = true;
+ // for now we don't support floating point MSAA on ES
+ fConfigRenderSupport[kRGBA_half_GrPixelConfig][kYes_MSAA] = false;
+ } else {
+ if (ctxInfo.hasExtension("GL_EXT_color_buffer_half_float")) {
+ fConfigRenderSupport[kRGBA_half_GrPixelConfig][kNo_MSAA] = true;
+ } else {
+ fConfigRenderSupport[kRGBA_half_GrPixelConfig][kNo_MSAA] = false;
+ }
+ // for now we don't support floating point MSAA on ES
+ fConfigRenderSupport[kRGBA_half_GrPixelConfig][kYes_MSAA] = false;
+ }
+ }
+
// If we don't support MSAA then undo any places above where we set a config as renderable with
// msaa.
if (kNone_MSFBOType == fMSFBOType) {
@@ -663,6 +682,7 @@ void GrGLCaps::initConfigTexturableTable(const GrGLContextInfo& ctxInfo, const G
ctxInfo.hasExtension("GL_OES_texture_half_float"));
}
fConfigTextureSupport[kAlpha_half_GrPixelConfig] = hasHalfFPTextures;
+ fConfigTextureSupport[kRGBA_half_GrPixelConfig] = hasHalfFPTextures;
}
bool GrGLCaps::doReadPixelsSupported(const GrGLInterface* intf,
« no previous file with comments | « src/gpu/GrDrawTarget.cpp ('k') | src/gpu/gl/GrGLDefines.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698