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

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

Issue 799593002: Fix float and half float support on mobile. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Rearrange format setup to get around GCC 4.8 Created 6 years 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 | « no previous file | 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 ea34a0046d0a995898e2e8345f2d657ed314016d..8b26282968ba8bb4ea91371ee05c6b464d3dca2b 100644
--- a/src/gpu/gl/GrGLCaps.cpp
+++ b/src/gpu/gl/GrGLCaps.cpp
@@ -470,21 +470,28 @@ void GrGLCaps::initConfigRenderableTable(const GrGLContextInfo& ctxInfo) {
}
if (this->isConfigTexturable(kRGBA_float_GrPixelConfig)) {
- fConfigRenderSupport[kRGBA_float_GrPixelConfig][kNo_MSAA] = true;
if (kGL_GrGLStandard == standard) {
+ fConfigRenderSupport[kRGBA_float_GrPixelConfig][kNo_MSAA] = true;
fConfigRenderSupport[kRGBA_float_GrPixelConfig][kYes_MSAA] = true;
} else {
- // for now we don't support float point MSAA on ES
+ if (ctxInfo.hasExtension("GL_EXT_color_buffer_float")) {
+ fConfigRenderSupport[kRGBA_float_GrPixelConfig][kNo_MSAA] = true;
+ } else {
+ 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;
}
}
if (this->isConfigTexturable(kAlpha_half_GrPixelConfig)) {
- fConfigRenderSupport[kAlpha_half_GrPixelConfig][kNo_MSAA] = true;
if (kGL_GrGLStandard == standard) {
+ fConfigRenderSupport[kAlpha_half_GrPixelConfig][kNo_MSAA] = true;
fConfigRenderSupport[kAlpha_half_GrPixelConfig][kYes_MSAA] = true;
} else {
- // for now we don't support float point MSAA on ES
+ // in theory, check for "GL_EXT_color_buffer_half_float"
+ // for now we don't support half float alpha render target on ES
+ fConfigRenderSupport[kAlpha_half_GrPixelConfig][kNo_MSAA] = false;
fConfigRenderSupport[kAlpha_half_GrPixelConfig][kYes_MSAA] = false;
}
}
@@ -620,7 +627,7 @@ void GrGLCaps::initConfigTexturableTable(const GrGLContextInfo& ctxInfo, const G
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_linear") &&
ctxInfo.hasExtension("GL_OES_texture_float"));
}
fConfigTextureSupport[kRGBA_float_GrPixelConfig] = hasFPTextures;
@@ -633,7 +640,7 @@ void GrGLCaps::initConfigTexturableTable(const GrGLContextInfo& ctxInfo, const G
bool hasHalfFPTextures = version >= GR_GL_VER(3, 1);
if (!hasHalfFPTextures) {
hasHalfFPTextures = ctxInfo.hasExtension("GL_ARB_texture_float") ||
- (ctxInfo.hasExtension("OES_texture_half_float_linear") &&
+ (ctxInfo.hasExtension("GL_OES_texture_half_float_linear") &&
ctxInfo.hasExtension("GL_OES_texture_half_float"));
}
fConfigTextureSupport[kAlpha_half_GrPixelConfig] = hasHalfFPTextures && fTextureRedSupport;
« no previous file with comments | « no previous file | src/gpu/gl/GrGpuGL.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698