This actually stored the values as 8bit linear values in the cache,
then did another srgb->linear conversion...
We don't want to do the former (decoding 8bit srgb values to 8bit linear
completely defeats the purpose of srgb in the first place), so just decode
to 8bit srgb.
Fixes piglit.spec.ext_texture_srgb.texwrap formats-s3tc tests.
(type.length == 1 || (type.length % 4 == 0)) &&
cache) {
const struct util_format_description *format_decompressed;
+ const struct util_format_description *flinear_desc;
LLVMValueRef packed;
+ flinear_desc = util_format_description(util_format_linear(format_desc->format));
packed = lp_build_fetch_cached_texels(gallivm,
- format_desc,
+ flinear_desc,
type.length,
base_ptr,
offset,