From 8bc49f9536058a8373d3057324e22fcbf79a7d89 Mon Sep 17 00:00:00 2001 From: Matt Turner Date: Sat, 11 Apr 2015 14:51:13 -0700 Subject: [PATCH] i965/fs: Set compression only if writing two registers. We don't want to set compression control on a SIMD16 instruction operating on words or smaller. Reviewed-by: Jason Ekstrand --- src/mesa/drivers/dri/i965/brw_fs_generator.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs_generator.cpp b/src/mesa/drivers/dri/i965/brw_fs_generator.cpp index af08f9d6d07..397d8257a91 100644 --- a/src/mesa/drivers/dri/i965/brw_fs_generator.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs_generator.cpp @@ -1631,7 +1631,10 @@ fs_generator::generate_code(const cfg_t *cfg, int dispatch_width) break; case 16: case 32: - brw_set_default_compression_control(p, BRW_COMPRESSION_COMPRESSED); + if (type_sz(inst->dst.type) < sizeof(float)) + brw_set_default_compression_control(p, BRW_COMPRESSION_NONE); + else + brw_set_default_compression_control(p, BRW_COMPRESSION_COMPRESSED); break; default: unreachable("Invalid instruction width"); -- 2.30.2