Skip to content
  • Roland Scheidegger's avatar
    fbo-blending-snorm: new test for testing snorm blend behavior · 1c80d7d2
    Roland Scheidegger authored
    The existing fbo-blending-formats test is mostly useless for anything but
    unorm formats, since it does not test any values outside [0,1] (neither for
    src, dst, intermeidate calculations, blend result).
    I tried to enhance it but it got too complex, in particular because I really
    want to test snorm, not floats (which aren't really validated much neither),
    because if you actually use int math for them it's difficult to handle and
    llvmpipe had lots of bugs. And it's not even obvious from the GL spec when
    clamping actually happens (in particular, the inverse blend factors will be
    in range [0,2]). snorm blending is sort of semi-supported in GL, the
    presence of EXT_texture_snorm doesn't guarantee it (and nvidia doesn't support
    the extension, presumably because they can't or don't want to deal with the
    legacy alpha/luminance/intensity formats), and while GL 3.1 introduces the
    snorm formats too it isn't guaranteed for rendering neither (for GLES OTOH
    th...
    1c80d7d2