Ensure texture uploads are tightly packed 52/253852/1
authorDavid Steele <david.steele@samsung.com>
Thu, 18 Feb 2021 16:46:26 +0000 (16:46 +0000)
committerDavid Steele <david.steele@samsung.com>
Thu, 18 Feb 2021 16:46:26 +0000 (16:46 +0000)
Change-Id: If37c96bb51c60070c3abae6b3e4dc7c69f916676

dali/internal/graphics/gles-impl/egl-graphics-controller.cpp
dali/internal/graphics/gles-impl/gles-graphics-types.h

index 4f5bee0..e296bee 100644 (file)
@@ -266,6 +266,8 @@ void EglGraphicsController::ProcessTextureUpdateQueue()
       auto*       texture    = static_cast<GLES::Texture*>(info.dstTexture);
       const auto& createInfo = texture->GetCreateInfo();
 
+      mGlAbstraction->PixelStorei(GL_UNPACK_ALIGNMENT, 1);
+
       mGlAbstraction->BindTexture(GL_TEXTURE_2D, texture->GetGLTexture());
       mGlAbstraction->TexSubImage2D(GL_TEXTURE_2D,
                                     info.level,
index 1ee1885..04efefb 100644 (file)
@@ -34,12 +34,12 @@ struct GLTextureFormatType
       // Luminance formats
       case Graphics::Format::L8:
       {
-        Assign(GL_RED, GL_UNSIGNED_BYTE);
+        Assign(GL_LUMINANCE, GL_UNSIGNED_BYTE);
         break;
       }
       case Graphics::Format::L8A8:
       {
-        Assign(0, 0);
+        Assign(GL_LUMINANCE_ALPHA, GL_UNSIGNED_BYTE);
         break;
       }