• Alyssa Rosenzweig's avatar
    panfrost/decode: Decode blend constant · ae705387
    Alyssa Rosenzweig authored
    This adds a forgotten decode line on Midgard and adds the field of a
    blend constant on Bifrost. The Bifrost encoding is fairly weird; whereas
    Midgard is just a regular 32-bit float, Bifrost uses a fancy
    fixed-point-esque encoding. The decode logic here is experimentally
    correct. The encode logic is a sort of "guesstimate", assuming that the
    high byte is just int(f / 255.0) and then solving algebraicly for the
    low byte. This might be slightly off in some cases.
    Signed-off-by: Alyssa Rosenzweig's avatarAlyssa Rosenzweig <alyssa@rosenzweig.io>
    Reviewed-by: Ryan Houdek's avatarRyan Houdek <Sonicadvance1@gmail.com>
    ae705387
decode.c 79.7 KB