Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 84bb8e40 authored by Peiyong Lin's avatar Peiyong Lin
Browse files

[GLUtils] Return the correct pixel format for GL_SRGB8_ALPHA8.

The pixel format for GL_SRGB8_ALPHA8 should be GL_RGBA. Previously we added
support for explicitly passing in GL_SRGB8_ALPHA8 as internal format, in this
patch we make sure we pick the correct pixel format.

BUG: 117886297
Test: Build, flash and boot, test with hacked app
Change-Id: Ied6b7a649c9f64ba2afffd6627ebb0d14154d1f6
parent 0c6b2afb
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -657,6 +657,7 @@ static int getPixelFormatFromInternalFormat(uint32_t internalFormat) {
    switch (internalFormat) {
        // For sized internal format.
        case GL_RGBA16F:
        case GL_SRGB8_ALPHA8:
            return GL_RGBA;
        // Base internal formats and pixel formats are still the same, see Table 1 in
        // https://www.khronos.org/registry/OpenGL-Refpages/es3.1/html/glTexImage2D.xhtml