clamp after color pipeline when dst is normalized
Most code working with unorm values doesn't expect to see out-of-gamut
colors, but unorms _can_ store some out-of-gamut colors when
premultiplied and alpha is <1.
Clamping after the color (= shader + color filter) pipeline prevents us
from creating those values. This CL does appear to fix the problem we
were seeing with xfermodes2 in the narrow config.
I've kept scalepixels_unpremul working by using our old trick,
remembering that unpremul->unpremul involves the same steps as
premul->opaque. We'll take the unpremul pixels, pun them to premul to
avoid data loss, scale them up, and then avoid unpremul on the way out
by punning the surface as opaque. It all kind of just barely hangs
Commit-Queue: Mike Klein <email@example.com>
Reviewed-by: Brian Osman <firstname.lastname@example.org>
Auto-Submit: Mike Klein <email@example.com>
2 files changed