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

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: another small typo 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
Index: src/gpu/gl/GrGpuGL.cpp
diff --git a/src/gpu/gl/GrGpuGL.cpp b/src/gpu/gl/GrGpuGL.cpp
index 2eb76a5aff43137e69a0d2461efa0f2a1ec0ffb9..166c20b8acad5272876ee82e919cc6ec2d184fd6 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;
}

Powered by Google App Engine
This is Rietveld 408576698