Skip to content
  • Carlos Garnacho's avatar
    cogl: Read pixels as per the stored format · 44a7f74d
    Carlos Garnacho authored and Florian Müllner's avatar Florian Müllner committed
    By the looks of it, commit 95e9fa10 was taping over an Intel DRI bug
    that would make it return post-swizzling pixel data on glReadPixels().
    There's been reports over time of that commit resulting in wrong colors
    on other drivers, and lately Mesa >17.3 started showing the same symptoms
    on Intel.
    
    But texture swizzling works by changing parameters before fragment shaders
    and reading pixels from an already drawn FBO/texture doesn't involve those.
    This should thus use pixel_format_to_gl_with_target(), which will result in
    correctly requesting the same pixel format than the underlying texture,
    while still considering it BGRA for the upper layers in the swizzling case.
    
    GNOME/mutter#72
    
    Closes: #72
    44a7f74d