This isn't perfect -- the filtering is happening on the srgb values, and we're decoding afterwards, which is not what you want. I think that's the cause of some additional texwrap(GL_CLAMP, LINEAR) failures, though many other texwrap tests on srgb start to pass since unfiltered values come out correct.
24d9980 vc4: Add support for sampling from sRGB.
src/gallium/drivers/vc4/vc4_program.c | 52 +++++++++++++++++++++++++++------
src/gallium/drivers/vc4/vc4_qir.h | 8 +++++
2 files changed, 51 insertions(+), 9 deletions(-)
Upstream: cgit.freedesktop.org