Skip to content
  • Alyssa Rosenzweig's avatar
    panfrost: Handle non-dithered clear colours · 2ac29047
    Alyssa Rosenzweig authored
    In b9c095cc ("panfrost: Rewrite the clear colour packing code"),
    packing of clear colours was corrected to use the tilebuffer's
    fractional bits, fixing dithering of the clear colour with formats like
    RGB565. Unfortunately, that commit did so unconditionally. If the
    framebuffer is dithered, but dithering is disabled at the time of
    the clear, we would incorrectly dither the clear.
    
    This is a regression, as the old (broken) code passed the relevant CTS
    test. What's the catch? Depending on dither state, there are two
    formulas to pack tilebuffer colours. We need to handle both. Fixes
    KHR-GLES31.core.draw_buffers_indexed.color_masks.
    
    Fixes: b9c095cc
    
     ("panfrost: Rewrite the clear colour packing code")
    Signed-off-by: default avatarAlyssa Rosenzweig <alyssa@collabora.com>
    2ac29047