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

Unified Diff: src/gpu/gl/GrGpuGL.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/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/GrGpuGL.cpp
diff --git a/src/gpu/gl/GrGpuGL.cpp b/src/gpu/gl/GrGpuGL.cpp
index eddccc39f67e626a0beb814cd4016a5ce6e8bf0b..b66feb27c06f954f691260dea5672b35edfd2c4d 100644
--- a/src/gpu/gl/GrGpuGL.cpp
+++ b/src/gpu/gl/GrGpuGL.cpp
@@ -639,7 +639,8 @@ bool GrGpuGL::uploadTexData(const GrGLTexture::Desc& desc,
if (glFlipY) {
GL_CALL(PixelStorei(GR_GL_UNPACK_FLIP_Y, GR_GL_TRUE));
}
- GL_CALL(PixelStorei(GR_GL_UNPACK_ALIGNMENT, static_cast<GrGLint>(bpp)));
+ GL_CALL(PixelStorei(GR_GL_UNPACK_ALIGNMENT,
+ static_cast<GrGLint>(GrUnpackAlignment(dataConfig))));
}
bool succeeded = true;
if (isNewTexture &&
@@ -2697,6 +2698,11 @@ bool GrGpuGL::configToGLFormats(GrPixelConfig config,
case kR11_EAC_GrPixelConfig:
*internalFormat = GR_GL_COMPRESSED_R11;
break;
+ case kRGBA_float_GrPixelConfig:
+ *internalFormat = GR_GL_RGBA32F;
+ *externalFormat = GR_GL_RGBA;
+ *externalType = GR_GL_FLOAT;
+ 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