Skip to content
  • Tomeu Vizoso's avatar
    st/mesa/i965: Allow decompressing ETC2 to GL_RGBA · e5604ef7
    Tomeu Vizoso authored and Gert Wollny's avatar Gert Wollny committed
    
    
    When Mesa itself implements ETC2 decompression, it currently
    decompresses to formats in the GL_BGRA component order.
    
    That can be problematic for drivers which cannot upload the texture data
    as GL_BGRA, such as Virgl when it's backed by GLES on the host.
    
    So this commit adds a flag to _mesa_unpack_etc2_format so callers can
    specify the optimal component order.
    
    In Gallium's case, it will be requested if the format isn't in
    PIPE_FORMAT_B8G8R8A8_SRGB format.
    
    For i965, it will remain GL_BGRA, as before.
    
    v2: * Remove unnecesary include (Emil Velikov)
    
    Signed-off-by: default avatarTomeu Vizoso <tomeu.vizoso@collabora.com>
    Reviewed-by: default avatarMarek Olšák <marek.olsak@amd.com>
    e5604ef7