move clamp outside of clut
This is a tiny code size win and, unexpectedly, a tiny perf win.
I really just wanted to focus the code while I try to refactor it.
It's safe to do this because the CLUT R,G,B inputs will be overwritten,
and A will either be overwritten to 1 or pass through. It's harmless to
clamp a pass-through alpha to [0,1].
I almost did the same to table lookups, but that's a bad idea. Tables
are sometimes used in mixed situations where we clamp some channels as
inputs to tables but leave others as unclamped inputs to parametrics.
Kind of rare, I guess, but possible.
Auto-Submit: Mike Klein <email@example.com>
Commit-Queue: Brian Osman <firstname.lastname@example.org>
Reviewed-by: Brian Osman <email@example.com>
2 files changed