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

Unified Diff: src/gpu/gl/GrGLGpu.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/gl/GrGLDefines.h ('k') | tests/FloatingPointTextureTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGLGpu.cpp
diff --git a/src/gpu/gl/GrGLGpu.cpp b/src/gpu/gl/GrGLGpu.cpp
index df3a5e66846f0ab070d7a4ce32a20987a86418aa..6a8d83b019fdd4d060b8773ad4ffcdd60fc2d5a8 100644
--- a/src/gpu/gl/GrGLGpu.cpp
+++ b/src/gpu/gl/GrGLGpu.cpp
@@ -2493,6 +2493,16 @@ bool GrGLGpu::configToGLFormats(GrPixelConfig config,
}
break;
+ case kRGBA_half_GrPixelConfig:
+ *internalFormat = GR_GL_RGBA16F;
+ *externalFormat = GR_GL_RGBA;
+ if (kGL_GrGLStandard == this->glStandard() || this->glVersion() >= GR_GL_VER(3, 0)) {
+ *externalType = GR_GL_HALF_FLOAT;
+ } else {
+ *externalType = GR_GL_HALF_FLOAT_OES;
+ }
+ break;
+
default:
return false;
}
« no previous file with comments | « src/gpu/gl/GrGLDefines.h ('k') | tests/FloatingPointTextureTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698