summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2016-01-05 16:36:28 -0800
committerEric Anholt <[email protected]>2016-01-06 12:43:09 -0800
commit7a9eb76786ea5534d395eef199974f8221e047d8 (patch)
tree26c00de9f2e1a8b398f5796ba9b6944e736045be /src/gallium
parentf01ca9eeda266af8c622b07b92543aae802c9fed (diff)
vc4: Add missing sRGB decode to texel fetches.
We only see txf on MSAA textures, currently, and apparently this didn't impact any of our piglit tests.
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/vc4/vc4_program.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gallium/drivers/vc4/vc4_program.c b/src/gallium/drivers/vc4/vc4_program.c
index 9d686f72877..e04cca1c09d 100644
--- a/src/gallium/drivers/vc4/vc4_program.c
+++ b/src/gallium/drivers/vc4/vc4_program.c
@@ -328,6 +328,11 @@ ntq_emit_txf(struct vc4_compile *c, nir_tex_instr *instr)
for (int i = 0; i < 4; i++)
dest[i] = qir_UNPACK_8_F(c, tex, i);
}
+
+ for (int i = 0; i < 4; i++) {
+ if (c->tex_srgb_decode[unit] & (1 << i))
+ dest[i] = qir_srgb_decode(c, dest[i]);
+ }
}
static void