Fix 32&24 ->16 bit bitmap uploads.
Change-Id: If8c52dd8ff34393c2908516e702a2d5daeb7bbb3
diff --git a/libs/rs/rsAllocation.cpp b/libs/rs/rsAllocation.cpp
index 289cb30..d9d0bc5 100644
--- a/libs/rs/rsAllocation.cpp
+++ b/libs/rs/rsAllocation.cpp
@@ -559,7 +559,7 @@
if (srcGLType == GL_UNSIGNED_BYTE &&
srcGLFmt == GL_RGB &&
dstGLType == GL_UNSIGNED_SHORT_5_6_5 &&
- dstGLType == GL_RGB) {
+ dstGLFmt == GL_RGB) {
return elementConverter_888_to_565;
}
@@ -567,12 +567,16 @@
if (srcGLType == GL_UNSIGNED_BYTE &&
srcGLFmt == GL_RGBA &&
dstGLType == GL_UNSIGNED_SHORT_5_6_5 &&
- dstGLType == GL_RGB) {
+ dstGLFmt == GL_RGB) {
return elementConverter_8888_to_565;
}
LOGE("pickConverter, unsuported combo, src %p, dst %p", src, dst);
+ LOGE("pickConverter, srcGLType = %x, srcGLFmt = %x", srcGLType, srcGLFmt);
+ LOGE("pickConverter, dstGLType = %x, dstGLFmt = %x", dstGLType, dstGLFmt);
+ src->dumpLOGV("SRC ");
+ dst->dumpLOGV("DST ");
return 0;
}