Skip to content

panfrost: protect alpha calculation from accessing non-existent component

Eric Smith requested to merge ericsmith/mesa:ericsmith/fix-oob-alpha-check into main
panfrost: protect alpha calculation from accessing non-existent component

We had a "Don't read out-of-bounds" sanity check for creating an alpha
when ATEST was needed, but that check happened only after we already
did a bi_extract(), which meant that the bi_extract could get into
trouble and assert() when there weren't enough components. Fixed by
re-arranging the calculation.

Signed-off-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund>@collabora.com>
Cc: mesa-stable
Edited by Eric Smith

Merge request reports

Loading