[Piglit] Switching to the GL 4.4 sRGB rules for glBlitFramebuffer().

Kenneth Graunke kenneth at whitecape.org
Thu Aug 4 23:14:41 UTC 2016


This combined patch series updates both Piglit and Mesa to implement
the modern GL 4.4+ rules for sRGB encoding/decoding in BlitFramebuffer().

The new GL 4.4 rules make it possible to match the behavior of ES 3.x
(always encode and decode), and the old behavior (never encode or decode).
If GL_FRAMEBUFFER_SRGB is enabled, encode and decode happen.  If not,
no conversions apply.  This is a change in behavior, which could break

Paul Berry wrote Piglit tests in 2012 which matched the NVIDIA driver
behavior at the time, which was to never apply conversions.  It appears
that NVIDIA has changed their behavior, and now implements the GL 4.4
rules.  They fail the Piglit tests, but begin passing after my patches.
I'm told that AMD/Catalyst follows the 4.4+ rules too, but I haven't
tested that personally.

Left 4 Dead 2 used to require the old behavior, but I retested with
these patches, and it seems to be working fine.  I'm assuming they
updated their application when the closed drivers changed behavior.

I've updated Gallium, Meta, and i965/blorp.  Please review - this
will impact everyone.  I highly recommend reading patch 3, as it
summarizes the changes in all GL 4.x specs.

Because working on sRGB drives people insane, here's an ode to
non-linear colorspaces:

    sRGB rules, GL broke
    some rendering glistened brightly
    some rendering grew bleak
    spec reformulations greatly bewilder
    surprisingly reasonable GL became

    should review go badly,
    submitter's rationality goes b'bye


More information about the Piglit mailing list